aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ARCMT/GC-check-warn-nsalloc.m9
-rw-r--r--test/ARCMT/GC-check.m1
-rw-r--r--test/ARCMT/GC-no-arc-runtime.m1
-rw-r--r--test/ARCMT/GC-no-arc-runtime.m.result1
-rw-r--r--test/ARCMT/GC-no-finalize-removal.m1
-rw-r--r--test/ARCMT/GC-no-finalize-removal.m.result1
-rw-r--r--test/ARCMT/GC.m1
-rw-r--r--test/ARCMT/GC.m.result1
-rw-r--r--test/ARCMT/Inputs/Module.framework/Frameworks/SubFramework.framework/Headers/SubFramework.h5
-rw-r--r--test/ARCMT/Inputs/Module.framework/Headers/Buried/Treasure.h1
-rw-r--r--test/ARCMT/Inputs/Module.framework/Headers/Module.h28
-rw-r--r--test/ARCMT/Inputs/Module.framework/Headers/NotInModule.h1
-rw-r--r--test/ARCMT/Inputs/Module.framework/Headers/Sub.h3
-rw-r--r--test/ARCMT/Inputs/Module.framework/Headers/Sub2.h1
-rw-r--r--test/ARCMT/Inputs/Module.framework/Module (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/el/fp64/crtbegin.o)0
-rw-r--r--test/ARCMT/Inputs/Module.framework/PrivateHeaders/ModulePrivate.h1
-rw-r--r--test/ARCMT/Inputs/module.map309
-rw-r--r--test/ARCMT/api.m1
-rw-r--r--test/ARCMT/api.m.result1
-rw-r--r--test/ARCMT/assign-prop-with-arc-runtime.m1
-rw-r--r--test/ARCMT/assign-prop-with-arc-runtime.m.result1
-rw-r--r--test/ARCMT/atautorelease-2.m1
-rw-r--r--test/ARCMT/atautorelease-2.m.result1
-rw-r--r--test/ARCMT/atautorelease-3.m1
-rw-r--r--test/ARCMT/atautorelease-3.m.result1
-rw-r--r--test/ARCMT/atautorelease-check.m1
-rw-r--r--test/ARCMT/atautorelease.m1
-rw-r--r--test/ARCMT/atautorelease.m.result1
-rw-r--r--test/ARCMT/autoreleases.m1
-rw-r--r--test/ARCMT/autoreleases.m.result1
-rw-r--r--test/ARCMT/check-with-pch.m1
-rw-r--r--test/ARCMT/checking-in-arc.m1
-rw-r--r--test/ARCMT/checking.m7
-rw-r--r--test/ARCMT/cxx-checking.mm3
-rw-r--r--test/ARCMT/cxx-rewrite.mm1
-rw-r--r--test/ARCMT/cxx-rewrite.mm.result1
-rw-r--r--test/ARCMT/dealloc.m1
-rw-r--r--test/ARCMT/dealloc.m.result1
-rw-r--r--test/ARCMT/designated-init-in-header/designated-init-in-header.m3
-rw-r--r--test/ARCMT/designated-init-in-header/file1.m.in2
-rw-r--r--test/ARCMT/designated-init-in-header/file2.m.in14
-rw-r--r--test/ARCMT/designated-init-in-header/file2.m.in.result14
-rw-r--r--test/ARCMT/designated-init-in-header/header1.h14
-rw-r--r--test/ARCMT/designated-init-in-header/header1.h.result13
-rw-r--r--test/ARCMT/init.m1
-rw-r--r--test/ARCMT/init.m.result1
-rw-r--r--test/ARCMT/migrate-on-pch-and-module.m12
-rw-r--r--test/ARCMT/migrate-plist-output.m1
-rw-r--r--test/ARCMT/migrate-space-in-path.m1
-rw-r--r--test/ARCMT/migrate-with-pch.m1
-rw-r--r--test/ARCMT/migrate.m1
-rw-r--r--test/ARCMT/no-canceling-bridge-to-bridge-cast.m1
-rw-r--r--test/ARCMT/nonobjc-to-objc-cast-2.m1
-rw-r--r--test/ARCMT/nonobjc-to-objc-cast.m1
-rw-r--r--test/ARCMT/nonobjc-to-objc-cast.m.result1
-rw-r--r--test/ARCMT/objcmt-arc-cf-annotations.m48
-rw-r--r--test/ARCMT/objcmt-arc-cf-annotations.m.result48
-rw-r--r--test/ARCMT/objcmt-atomic-property.m.result44
-rw-r--r--test/ARCMT/objcmt-deprecated-category.m48
-rw-r--r--test/ARCMT/objcmt-deprecated-category.m.result48
-rw-r--r--test/ARCMT/objcmt-designated-initializer.m44
-rw-r--r--test/ARCMT/objcmt-designated-initializer.m.result44
-rw-r--r--test/ARCMT/objcmt-instancetype-2.m.result8
-rw-r--r--test/ARCMT/objcmt-instancetype-unnecessary-diff.m10
-rw-r--r--test/ARCMT/objcmt-ns-nonatomic-iosonly.m.result44
-rw-r--r--test/ARCMT/objcmt-property-availability.m.result10
-rw-r--r--test/ARCMT/objcmt-property.m3
-rw-r--r--test/ARCMT/objcmt-property.m.result47
-rw-r--r--test/ARCMT/objcmt-protocol-conformance.m16
-rw-r--r--test/ARCMT/objcmt-protocol-conformance.m.result16
-rw-r--r--test/ARCMT/protected-scope.m1
-rw-r--r--test/ARCMT/protected-scope.m.result1
-rw-r--r--test/ARCMT/whitelisted/header1.h1
-rw-r--r--test/ARCMT/whitelisted/header1.h.result1
-rw-r--r--test/ARCMT/whitelisted/objcmt-with-whitelist-impl.m18
-rw-r--r--test/ARCMT/whitelisted/objcmt-with-whitelist-impl.m.result18
-rw-r--r--test/ARCMT/whitelisted/objcmt-with-whitelist.m4
-rw-r--r--test/Analysis/Inputs/system-header-simulator-cxx.h33
-rw-r--r--test/Analysis/Inputs/system-header-simulator-objc.h7
-rw-r--r--test/Analysis/NSContainers.m18
-rw-r--r--test/Analysis/NewDelete-checker-test.cpp6
-rw-r--r--test/Analysis/NewDelete-variadic.cpp16
-rw-r--r--test/Analysis/NewDeleteLeaks-PR18394.cpp16
-rw-r--r--test/Analysis/NoReturn.m2
-rw-r--r--test/Analysis/PR9741.cpp2
-rw-r--r--test/Analysis/analyzer-stats.c2
-rw-r--r--test/Analysis/auto-obj-dtors-cfg-output.cpp16
-rw-r--r--test/Analysis/bitwise-ops.c20
-rw-r--r--test/Analysis/call-invalidation.cpp29
-rw-r--r--test/Analysis/casts.c3
-rw-r--r--test/Analysis/casts.cpp13
-rw-r--r--test/Analysis/cfg.cpp256
-rw-r--r--test/Analysis/checker-plugins.c10
-rw-r--r--test/Analysis/ctor.mm30
-rw-r--r--test/Analysis/dead-stores.c12
-rw-r--r--test/Analysis/dead-stores.m8
-rw-r--r--test/Analysis/default-analyze.m2
-rw-r--r--test/Analysis/diagnostics/undef-value-param.m2
-rw-r--r--test/Analysis/dtor-cxx11.cpp15
-rw-r--r--test/Analysis/dtor.cpp71
-rw-r--r--test/Analysis/dynamic-cast.cpp2
-rw-r--r--test/Analysis/exercise-ps.c2
-rw-r--r--test/Analysis/idempotent-operations-limited-loops.c21
-rw-r--r--test/Analysis/idempotent-operations.c244
-rw-r--r--test/Analysis/idempotent-operations.cpp34
-rw-r--r--test/Analysis/idempotent-operations.m55
-rw-r--r--test/Analysis/identical-expressions.cpp571
-rw-r--r--test/Analysis/inline.cpp3
-rw-r--r--test/Analysis/inlining/containers.cpp50
-rw-r--r--test/Analysis/inlining/dyn-dispatch-bifurcate.cpp2
-rw-r--r--test/Analysis/inlining/path-notes.cpp20
-rw-r--r--test/Analysis/inlining/stl.cpp5
-rw-r--r--test/Analysis/kmalloc-linux.c58
-rw-r--r--test/Analysis/malloc-three-arg.c58
-rw-r--r--test/Analysis/malloc.c216
-rw-r--r--test/Analysis/malloc.m5
-rw-r--r--test/Analysis/member-expr.cpp20
-rw-r--r--test/Analysis/method-arg-decay.m4
-rw-r--r--test/Analysis/misc-ps-region-store.cpp5
-rw-r--r--test/Analysis/misc-ps-region-store.m10
-rw-r--r--test/Analysis/misc-ps.m12
-rw-r--r--test/Analysis/new.cpp2
-rw-r--r--test/Analysis/no-outofbounds.c4
-rw-r--r--test/Analysis/nonnull.m56
-rw-r--r--test/Analysis/null-deref-ps.c8
-rw-r--r--test/Analysis/objc-arc.m2
-rw-r--r--test/Analysis/objc-boxing.m17
-rw-r--r--test/Analysis/objc-for.m2
-rw-r--r--test/Analysis/objc-properties.m4
-rw-r--r--test/Analysis/objc-radar17039661.m60
-rw-r--r--test/Analysis/objc-string.mm2
-rw-r--r--test/Analysis/objc/direct-ivar-assignment-in-annotated-functions.m4
-rw-r--r--test/Analysis/properties.m180
-rw-r--r--test/Analysis/properties.mm79
-rw-r--r--test/Analysis/pthreadlock.c263
-rw-r--r--test/Analysis/ptr-arith.c4
-rw-r--r--test/Analysis/reference.cpp2
-rw-r--r--test/Analysis/region-1.m2
-rw-r--r--test/Analysis/retain-release-cache-out.m27
-rw-r--r--test/Analysis/retain-release.m10983
-rw-r--r--test/Analysis/stack-addr-ps.cpp2
-rw-r--r--test/Analysis/stackaddrleak.c4
-rw-r--r--test/Analysis/superclass.m2
-rw-r--r--test/Analysis/temp-obj-dtors-cfg-output.cpp506
-rw-r--r--test/Analysis/temporaries.cpp65
-rw-r--r--test/Analysis/test-after-div-zero.c204
-rw-r--r--test/Analysis/uninit-const.c216
-rw-r--r--test/Analysis/uninit-const.cpp128
-rw-r--r--test/Analysis/uninit-vals-ps-region.m4
-rw-r--r--test/Analysis/weak-functions.c2
-rw-r--r--test/CMakeLists.txt103
-rw-r--r--test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp3
-rw-r--r--test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp11
-rw-r--r--test/CXX/basic/basic.lookup/basic.lookup.qual/p6-0x.cpp25
-rw-r--r--test/CXX/basic/basic.lookup/basic.lookup.qual/p6.cpp3
-rw-r--r--test/CXX/basic/basic.lookup/basic.lookup.unqual/p15.cpp10
-rw-r--r--test/CXX/basic/basic.scope/basic.scope.local/p2.cpp10
-rw-r--r--test/CXX/basic/basic.start/basic.start.init/p3.cpp24
-rw-r--r--test/CXX/basic/basic.start/basic.start.main/p2.cpp2
-rw-r--r--test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp3
-rw-r--r--test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp3
-rw-r--r--test/CXX/class.access/class.access.base/p1.cpp15
-rw-r--r--test/CXX/class.access/p4.cpp4
-rw-r--r--test/CXX/class.access/p6.cpp2
-rw-r--r--test/CXX/class/class.static/class.static.data/p4.cpp9
-rw-r--r--test/CXX/class/class.union/p8.cpp10
-rw-r--r--test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp32
-rw-r--r--test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p5-cxx0x.cpp4
-rw-r--r--test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p6-cxx0x.cpp2
-rw-r--r--test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p8-cxx0x.cpp104
-rw-r--r--test/CXX/dcl.dcl/dcl.attr/dcl.align/p5.cpp1
-rw-r--r--test/CXX/dcl.dcl/dcl.attr/dcl.attr.deprecated/p1.cpp14
-rw-r--r--test/CXX/dcl.dcl/dcl.attr/dcl.attr.noreturn/p1.cpp2
-rw-r--r--test/CXX/dcl.dcl/dcl.enum/p2.cpp6
-rw-r--r--test/CXX/dcl.dcl/dcl.link/p2.cpp14
-rw-r--r--test/CXX/dcl.dcl/dcl.link/p7.cpp4
-rw-r--r--test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p1.cpp4
-rw-r--r--test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p2.cpp2
-rw-r--r--test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p6.cpp2
-rw-r--r--test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p4.cpp7
-rw-r--r--test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp4
-rw-r--r--test/CXX/dcl.dcl/dcl.spec/dcl.stc/p10.cpp5
-rw-r--r--test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p4.cpp25
-rw-r--r--test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.simple/p5-cxx0x.cpp32
-rw-r--r--test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp30
-rw-r--r--test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp2
-rw-r--r--test/CXX/dcl.decl/dcl.init/dcl.init.list/basic.cpp4
-rw-r--r--test/CXX/dcl.decl/dcl.init/dcl.init.list/p3-0x.cpp16
-rw-r--r--test/CXX/dcl.decl/dcl.init/dcl.init.list/p7-0x-fixits.cpp2
-rw-r--r--test/CXX/dcl.decl/dcl.init/dcl.init.list/p7-0x.cpp105
-rw-r--r--test/CXX/dcl.decl/dcl.init/dcl.init.list/p7-cxx11-nowarn.cpp91
-rw-r--r--test/CXX/dcl.decl/dcl.meaning/dcl.fct/p6-0x.cpp15
-rw-r--r--test/CXX/dcl.decl/dcl.meaning/dcl.fct/p6.cpp13
-rw-r--r--test/CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp6
-rw-r--r--test/CXX/dcl.decl/dcl.meaning/dcl.mptr/p3.cpp2
-rw-r--r--test/CXX/dcl.decl/dcl.meaning/dcl.ref/p6-0x.cpp5
-rw-r--r--test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp80
-rw-r--r--test/CXX/dcl.decl/dcl.meaning/p1.cpp18
-rw-r--r--test/CXX/drs/dr0xx.cpp77
-rw-r--r--test/CXX/drs/dr10xx.cpp33
-rw-r--r--test/CXX/drs/dr13xx.cpp29
-rw-r--r--test/CXX/drs/dr14xx.cpp196
-rw-r--r--test/CXX/drs/dr15xx.cpp20
-rw-r--r--test/CXX/drs/dr1xx.cpp27
-rw-r--r--test/CXX/drs/dr2xx.cpp337
-rw-r--r--test/CXX/drs/dr3xx.cpp1285
-rw-r--r--test/CXX/drs/dr412.cpp20
-rw-r--r--test/CXX/drs/dr4xx.cpp1197
-rw-r--r--test/CXX/drs/dr5xx.cpp212
-rw-r--r--test/CXX/drs/dr9xx.cpp45
-rw-r--r--test/CXX/except/except.spec/canonical.cpp10
-rw-r--r--test/CXX/except/except.spec/p11.cpp2
-rw-r--r--test/CXX/except/except.spec/p14-ir.cpp4
-rw-r--r--test/CXX/except/except.spec/p15.cpp20
-rw-r--r--test/CXX/expr/expr.const/p2-0x.cpp6
-rw-r--r--test/CXX/expr/expr.const/p3-0x.cpp2
-rw-r--r--test/CXX/expr/expr.mptr.oper/p5.cpp28
-rw-r--r--test/CXX/expr/expr.mptr.oper/p6-0x.cpp8
-rw-r--r--test/CXX/expr/expr.prim/expr.prim.general/p4-0x.cpp2
-rw-r--r--test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm20
-rw-r--r--test/CXX/expr/expr.prim/expr.prim.lambda/generic-lambda-unimplemented-1y.cpp31
-rw-r--r--test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp9
-rw-r--r--test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp2
-rw-r--r--test/CXX/expr/expr.prim/expr.prim.lambda/p2-generic-lambda-1y.cpp50
-rw-r--r--test/CXX/expr/expr.prim/expr.prim.lambda/p5-generic-lambda-1y.cpp262
-rw-r--r--test/CXX/expr/expr.unary/expr.new/p2-cxx0x.cpp2
-rw-r--r--test/CXX/expr/expr.unary/expr.unary.op/p4.cpp2
-rw-r--r--test/CXX/expr/expr.unary/expr.unary.op/p6.cpp2
-rw-r--r--test/CXX/over/over.match/over.match.funcs/over.match.oper/p3.cpp28
-rw-r--r--test/CXX/special/class.copy/implicit-move-def.cpp6
-rw-r--r--test/CXX/special/class.copy/implicit-move.cpp10
-rw-r--r--test/CXX/special/class.copy/p11.0x.copy.cpp19
-rw-r--r--test/CXX/special/class.copy/p11.0x.move.cpp34
-rw-r--r--test/CXX/special/class.copy/p13-0x.cpp15
-rw-r--r--test/CXX/special/class.copy/p23-cxx11.cpp19
-rw-r--r--test/CXX/special/class.copy/p33-0x.cpp2
-rw-r--r--test/CXX/special/class.dtor/p10-0x.cpp2
-rw-r--r--test/CXX/special/class.dtor/p3-0x.cpp2
-rw-r--r--test/CXX/special/class.dtor/p9.cpp9
-rw-r--r--test/CXX/special/class.inhctor/elsewhere.cpp6
-rw-r--r--test/CXX/special/class.inhctor/p4.cpp4
-rw-r--r--test/CXX/special/class.init/class.base.init/p8-0x.cpp15
-rw-r--r--test/CXX/special/class.temporary/p1.cpp2
-rw-r--r--test/CXX/temp/p3.cpp3
-rw-r--r--test/CXX/temp/temp.arg/temp.arg.nontype/p5.cpp2
-rw-r--r--test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp4
-rw-r--r--test/CXX/temp/temp.decls/temp.fct/temp.func.order/p3-0x.cpp52
-rw-r--r--test/CXX/temp/temp.decls/temp.fct/temp.func.order/p3.cpp42
-rw-r--r--test/CXX/temp/temp.decls/temp.mem/p3.cpp2
-rw-r--r--test/CXX/temp/temp.decls/temp.variadic/fixed-expansion.cpp15
-rw-r--r--test/CXX/temp/temp.decls/temp.variadic/p5.cpp4
-rw-r--r--test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p9-0x.cpp2
-rw-r--r--test/CXX/temp/temp.param/p14.cpp5
-rw-r--r--test/CXX/temp/temp.res/temp.local/p3.cpp2
-rw-r--r--test/CXX/temp/temp.spec/cxx1y-variable-template-no-body.cpp6
-rw-r--r--test/CXX/temp/temp.spec/no-body.cpp4
-rw-r--r--test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp44
-rw-r--r--test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp2
-rw-r--r--test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp4
-rw-r--r--test/CodeCompletion/objc-message.mm46
-rw-r--r--test/CodeGen/2007-06-18-SextAttrAggregate.c2
-rw-r--r--test/CodeGen/2009-02-13-zerosize-union-field-ppc.c2
-rw-r--r--test/CodeGen/2010-01-13-MemBarrier.c1
-rw-r--r--test/CodeGen/2010-06-17-asmcrash.c5
-rw-r--r--test/CodeGen/Atomics.c81
-rw-r--r--test/CodeGen/PR4611-bitfield-layout.c2
-rw-r--r--test/CodeGen/PR8880.c173
-rw-r--r--test/CodeGen/a15.c5
-rw-r--r--test/CodeGen/a5.c5
-rw-r--r--test/CodeGen/aarch64-arguments.c194
-rw-r--r--test/CodeGen/aarch64-inline-asm.c2
-rw-r--r--test/CodeGen/aarch64-neon-2velem.c1362
-rw-r--r--test/CodeGen/aarch64-neon-3v.c486
-rw-r--r--test/CodeGen/aarch64-neon-across.c90
-rw-r--r--test/CodeGen/aarch64-neon-copy.c1319
-rw-r--r--test/CodeGen/aarch64-neon-crypto.c94
-rw-r--r--test/CodeGen/aarch64-neon-extract.c92
-rw-r--r--test/CodeGen/aarch64-neon-fcvt-intrinsics.c84
-rw-r--r--test/CodeGen/aarch64-neon-fma.c199
-rw-r--r--test/CodeGen/aarch64-neon-intrinsics.c5234
-rw-r--r--test/CodeGen/aarch64-neon-ldst-one.c1384
-rw-r--r--test/CodeGen/aarch64-neon-misc.c834
-rw-r--r--test/CodeGen/aarch64-neon-perm.c471
-rw-r--r--test/CodeGen/aarch64-neon-scalar-copy.c86
-rw-r--r--test/CodeGen/aarch64-neon-scalar-x-indexed-elem.c151
-rw-r--r--test/CodeGen/aarch64-neon-shifts.c2
-rw-r--r--test/CodeGen/aarch64-neon-tbl.c302
-rw-r--r--test/CodeGen/aarch64-neon-vcombine.c3
-rw-r--r--test/CodeGen/aarch64-neon-vget-hilo.c116
-rw-r--r--test/CodeGen/aarch64-poly128.c205
-rw-r--r--test/CodeGen/aarch64-poly64.c149
-rw-r--r--test/CodeGen/aarch64-type-sizes.c6
-rw-r--r--test/CodeGen/aarch64-varargs.c23
-rw-r--r--test/CodeGen/alias.c11
-rw-r--r--test/CodeGen/altivec.c1
-rw-r--r--test/CodeGen/arm-aapcs-vfp.c70
-rw-r--r--test/CodeGen/arm-arguments.c8
-rw-r--r--test/CodeGen/arm-asm-deprecated.c13
-rw-r--r--test/CodeGen/arm-atomics-m.c35
-rw-r--r--test/CodeGen/arm-atomics-m0.c35
-rw-r--r--test/CodeGen/arm-atomics.c37
-rw-r--r--test/CodeGen/arm-be-result-return.c37
-rw-r--r--test/CodeGen/arm-byval-align.c14
-rw-r--r--test/CodeGen/arm-cortex-cpus.c11
-rw-r--r--test/CodeGen/arm-homogenous.c58
-rw-r--r--test/CodeGen/arm-metadata.c12
-rw-r--r--test/CodeGen/arm-microsoft-intrinsics.c63
-rw-r--r--test/CodeGen/arm-neon-vcvtX.c99
-rw-r--r--test/CodeGen/arm64-aapcs-arguments.c42
-rw-r--r--test/CodeGen/arm64-abi-vector.c430
-rw-r--r--test/CodeGen/arm64-arguments.c719
-rw-r--r--test/CodeGen/arm64-be-bitfield.c9
-rw-r--r--test/CodeGen/arm64-be-hfa-vararg.c13
-rw-r--r--test/CodeGen/arm64-crc32.c55
-rw-r--r--test/CodeGen/arm64-lanes.c74
-rw-r--r--test/CodeGen/arm64-scalar-test.c547
-rw-r--r--test/CodeGen/arm64-vrnd.c51
-rw-r--r--test/CodeGen/arm64-vrsqrt.c43
-rw-r--r--test/CodeGen/arm64_crypto.c93
-rw-r--r--test/CodeGen/arm64_neon_high_half.c559
-rw-r--r--test/CodeGen/arm64_vCMP.c108
-rw-r--r--test/CodeGen/arm64_vLdStNum_lane.c141
-rw-r--r--test/CodeGen/arm64_vMaxMin.c207
-rw-r--r--test/CodeGen/arm64_vadd.c102
-rw-r--r--test/CodeGen/arm64_vca.c59
-rw-r--r--test/CodeGen/arm64_vcopy.c69
-rw-r--r--test/CodeGen/arm64_vcreate.c23
-rw-r--r--test/CodeGen/arm64_vcvtfp.c48
-rw-r--r--test/CodeGen/arm64_vdup.c42
-rw-r--r--test/CodeGen/arm64_vdupq_n_f64.c88
-rw-r--r--test/CodeGen/arm64_vecCmpBr.c111
-rw-r--r--test/CodeGen/arm64_vext.c239
-rw-r--r--test/CodeGen/arm64_vfma.c136
-rw-r--r--test/CodeGen/arm64_vget.c13
-rw-r--r--test/CodeGen/arm64_vneg.c18
-rw-r--r--test/CodeGen/arm64_vqmov.c77
-rw-r--r--test/CodeGen/arm64_vrecps.c26
-rw-r--r--test/CodeGen/arm64_vset_lane.c31
-rw-r--r--test/CodeGen/arm64_vshift.c357
-rw-r--r--test/CodeGen/arm64_vsli.c148
-rw-r--r--test/CodeGen/arm64_vsri.c149
-rw-r--r--test/CodeGen/arm64_vtst.c22
-rw-r--r--test/CodeGen/arm_acle.c209
-rw-r--r--test/CodeGen/arm_neon_intrinsics.c4028
-rw-r--r--test/CodeGen/asan-globals.cpp36
-rw-r--r--test/CodeGen/asm.c9
-rw-r--r--test/CodeGen/asm_arm64.c45
-rw-r--r--test/CodeGen/atomic-arm64.c73
-rw-r--r--test/CodeGen/atomic-ops-libcall.c37
-rw-r--r--test/CodeGen/atomic-ops.c210
-rw-r--r--test/CodeGen/atomic.c15
-rw-r--r--test/CodeGen/attr-optnone.c25
-rw-r--r--test/CodeGen/avx-builtins.c12
-rw-r--r--test/CodeGen/avx-shuffle-builtins.c34
-rw-r--r--test/CodeGen/avx2-builtins.c27
-rw-r--r--test/CodeGen/big-atomic-ops.c11
-rw-r--r--test/CodeGen/bitfield-2.c8
-rw-r--r--test/CodeGen/blocks-opencl.cl16
-rw-r--r--test/CodeGen/blockstret.c9
-rw-r--r--test/CodeGen/bmi-builtins.c87
-rw-r--r--test/CodeGen/bool-convert.c16
-rw-r--r--test/CodeGen/bool-init.c3
-rw-r--r--test/CodeGen/bool_test.c2
-rw-r--r--test/CodeGen/branch-on-bool.c8
-rw-r--r--test/CodeGen/builtin-assume.c8
-rw-r--r--test/CodeGen/builtin-ms-noop.cpp30
-rw-r--r--test/CodeGen/builtins-aarch64.c6
-rw-r--r--test/CodeGen/builtins-arm-exclusive.c265
-rw-r--r--test/CodeGen/builtins-arm-microsoft.c41
-rw-r--r--test/CodeGen/builtins-arm.c40
-rw-r--r--test/CodeGen/builtins-arm64.c31
-rw-r--r--test/CodeGen/builtins-mips-msa.c18
-rw-r--r--test/CodeGen/builtins-nvptx.c1
-rw-r--r--test/CodeGen/builtins-ppc-altivec.c10993
-rw-r--r--test/CodeGen/builtins-ppc.c2
-rw-r--r--test/CodeGen/builtins-x86.c7
-rw-r--r--test/CodeGen/builtinshufflevector2.c24
-rw-r--r--test/CodeGen/c-strings.c15
-rw-r--r--test/CodeGen/c11atomics.c5
-rw-r--r--test/CodeGen/captured-statements-nested.c34
-rw-r--r--test/CodeGen/captured-statements.c20
-rw-r--r--test/CodeGen/catch-undef-behavior.c82
-rw-r--r--test/CodeGen/cfstring.c6
-rw-r--r--test/CodeGen/clear_cache.c12
-rw-r--r--test/CodeGen/complex-convert.c11
-rw-r--r--test/CodeGen/cxx-default-arg.cpp2
-rw-r--r--test/CodeGen/darwin-string-literals.c12
-rw-r--r--test/CodeGen/debug-dead-local-var.c14
-rw-r--r--test/CodeGen/debug-info-block.c1
-rw-r--r--test/CodeGen/debug-info-enum.c10
-rw-r--r--test/CodeGen/debug-info-iv.c36
-rw-r--r--test/CodeGen/debug-info-scope-file.c20
-rw-r--r--test/CodeGen/debug-info-typedef.c11
-rw-r--r--test/CodeGen/debug-info-var-location.c3
-rw-r--r--test/CodeGen/debug-info-version.c2
-rw-r--r--test/CodeGen/dependent-lib.c8
-rw-r--r--test/CodeGen/disable-tail-calls.c16
-rw-r--r--test/CodeGen/dllexport.c115
-rw-r--r--test/CodeGen/dllimport-dllexport.c12
-rw-r--r--test/CodeGen/dllimport.c93
-rw-r--r--test/CodeGen/dwarf-version.c12
-rw-r--r--test/CodeGen/exceptions-seh.c5
-rw-r--r--test/CodeGen/ffp-contract-option.c2
-rw-r--r--test/CodeGen/flatten.c19
-rw-r--r--test/CodeGen/fp-contract-pragma.cpp2
-rw-r--r--test/CodeGen/fp16-ops.c258
-rw-r--r--test/CodeGen/function-attributes.c11
-rw-r--r--test/CodeGen/function-sections.c28
-rw-r--r--test/CodeGen/hidden-alias-to-internal-function.c8
-rw-r--r--test/CodeGen/indirect-goto.c2
-rw-r--r--test/CodeGen/init.c8
-rw-r--r--test/CodeGen/inline.c5
-rw-r--r--test/CodeGen/inline2.c9
-rw-r--r--test/CodeGen/le32-vaarg.c28
-rw-r--r--test/CodeGen/libcall-declarations.c21
-rw-r--r--test/CodeGen/libcalls.c12
-rw-r--r--test/CodeGen/lineno-dbginfo.c2
-rw-r--r--test/CodeGen/long-double-x86-nacl.c7
-rw-r--r--test/CodeGen/malign-double-x86-nacl.c43
-rw-r--r--test/CodeGen/mangle-windows.c3
-rw-r--r--test/CodeGen/mips-count-builtins.c32
-rw-r--r--test/CodeGen/mips-target-data.c16
-rw-r--r--test/CodeGen/mips-type-sizes-int128.c13
-rw-r--r--test/CodeGen/mips-type-sizes.c92
-rw-r--r--test/CodeGen/mmx-builtins.c2
-rw-r--r--test/CodeGen/mmx-inline-asm-error.c6
-rw-r--r--test/CodeGen/mozilla-ms-inline-asm.c61
-rw-r--r--test/CodeGen/ms-inline-asm-64.c6
-rw-r--r--test/CodeGen/ms-inline-asm.c78
-rw-r--r--test/CodeGen/ms-inline-asm.cpp36
-rw-r--r--test/CodeGen/ms-intrinsics.c38
-rw-r--r--test/CodeGen/ms_struct-bitfield.c78
-rw-r--r--test/CodeGen/ms_struct-pack.c21
-rw-r--r--test/CodeGen/named_reg_global.c47
-rw-r--r--test/CodeGen/neon-crypto.c96
-rw-r--r--test/CodeGen/noduplicate-cxx11-test.cpp20
-rw-r--r--test/CodeGen/noinline.c7
-rw-r--r--test/CodeGen/nonnull.c23
-rw-r--r--test/CodeGen/overloadable.c4
-rw-r--r--test/CodeGen/packed-nest-unpacked.c2
-rw-r--r--test/CodeGen/packed-union.c4
-rw-r--r--test/CodeGen/powerpc_types.c1
-rw-r--r--test/CodeGen/ppc64-align-long-double.c4
-rw-r--r--test/CodeGen/ppc64-align-struct.c154
-rw-r--r--test/CodeGen/ppc64-complex-parms.c1
-rw-r--r--test/CodeGen/ppc64-complex-return.c2
-rw-r--r--test/CodeGen/ppc64-extend.c2
-rw-r--r--test/CodeGen/ppc64-inline-asm.c26
-rw-r--r--test/CodeGen/ppc64-struct-onefloat.c2
-rw-r--r--test/CodeGen/ppc64-struct-onevect.c2
-rw-r--r--test/CodeGen/ppc64-varargs-complex.c2
-rw-r--r--test/CodeGen/ppc64-varargs-struct.c2
-rw-r--r--test/CodeGen/ppc64-vector.c52
-rw-r--r--test/CodeGen/ppc64le-aggregates.c423
-rw-r--r--test/CodeGen/ppc64le-varargs-complex.c69
-rw-r--r--test/CodeGen/pr18235.c3
-rw-r--r--test/CodeGen/pr19841.cpp29
-rw-r--r--test/CodeGen/pragma-comment.c4
-rw-r--r--test/CodeGen/pragma-detect_mismatch.c4
-rw-r--r--test/CodeGen/pragma-loop.cpp129
-rw-r--r--test/CodeGen/pragma-pack-1.c4
-rw-r--r--test/CodeGen/pragma-pack-2.c3
-rw-r--r--test/CodeGen/pragma-unroll.cpp99
-rw-r--r--test/CodeGen/predefined-expr.c1
-rw-r--r--test/CodeGen/r5.c5
-rw-r--r--test/CodeGen/sanitize-init-order.cpp20
-rw-r--r--test/CodeGen/sanitize-use-after-scope.c22
-rw-r--r--test/CodeGen/sections.c75
-rw-r--r--test/CodeGen/sparc-target-data.c5
-rw-r--r--test/CodeGen/sparcv9-abi.c3
-rw-r--r--test/CodeGen/sparcv9-dwarf.c99
-rw-r--r--test/CodeGen/split-stacks.c26
-rw-r--r--test/CodeGen/sret.c2
-rw-r--r--test/CodeGen/sret2.c2
-rw-r--r--test/CodeGen/sse-builtins-dbg.c12
-rw-r--r--test/CodeGen/sse-builtins.c22
-rw-r--r--test/CodeGen/stack-protector.c6
-rw-r--r--test/CodeGen/string-literal-short-wstring.c9
-rw-r--r--test/CodeGen/struct-x86-darwin.c20
-rw-r--r--test/CodeGen/target-data.c172
-rw-r--r--test/CodeGen/tbaa-for-vptr.cpp21
-rw-r--r--test/CodeGen/tbaa-ms-abi.cpp6
-rw-r--r--test/CodeGen/tbaa-struct.cpp11
-rw-r--r--test/CodeGen/ubsan-type-blacklist.cpp25
-rw-r--r--test/CodeGen/union.c13
-rw-r--r--test/CodeGen/utf16-cfstrings.c2
-rw-r--r--test/CodeGen/varargs.c10
-rw-r--r--test/CodeGen/variadic-gpfp-x86.c15
-rw-r--r--test/CodeGen/vla.c9
-rw-r--r--test/CodeGen/volatile-complex.c12
-rw-r--r--test/CodeGen/volatile.c21
-rw-r--r--test/CodeGen/wchar-const.c2
-rw-r--r--test/CodeGen/windows-itanium.c15
-rw-r--r--test/CodeGen/windows-on-arm-dllimport-dllexport.c25
-rw-r--r--test/CodeGen/x86-64-inline-asm.c17
-rw-r--r--test/CodeGen/x86_64-atomic-128.c29
-rw-r--r--test/CodeGen/xcore-abi.c23
-rw-r--r--test/CodeGen/xcore-abi.cpp27
-rw-r--r--test/CodeGen/xcore-stringtype.c179
-rw-r--r--test/CodeGenCUDA/Inputs/cuda.h20
-rw-r--r--test/CodeGenCUDA/address-spaces.cu74
-rw-r--r--test/CodeGenCUDA/device-stub.cu2
-rw-r--r--test/CodeGenCUDA/filter-decl.cu6
-rw-r--r--test/CodeGenCUDA/kernel-call.cu2
-rw-r--r--test/CodeGenCUDA/launch-bounds.cu30
-rw-r--r--test/CodeGenCUDA/ptx-kernels.cu2
-rw-r--r--test/CodeGenCXX/2003-11-27-MultipleInheritanceThunk.cpp3
-rw-r--r--test/CodeGenCXX/2004-03-08-ReinterpretCastCopy.cpp3
-rw-r--r--test/CodeGenCXX/2004-03-09-UnmangledBuiltinMethods.cpp2
-rw-r--r--test/CodeGenCXX/2006-09-12-OpaqueStructCrash.cpp3
-rw-r--r--test/CodeGenCXX/2010-05-11-alwaysinlineinstantiation.cpp2
-rw-r--r--test/CodeGenCXX/Inputs/debug-info-class-limited.cpp49
-rw-r--r--test/CodeGenCXX/PR19955.cpp27
-rw-r--r--test/CodeGenCXX/PR20038.cpp16
-rw-r--r--test/CodeGenCXX/PR5050-constructor-conversion.cpp15
-rw-r--r--test/CodeGenCXX/PR5093-static-member-function.cpp2
-rw-r--r--test/CodeGenCXX/PR5863-unreachable-block.cpp2
-rw-r--r--test/CodeGenCXX/aarch64-arguments.cpp2
-rw-r--r--test/CodeGenCXX/aarch64-cxxabi.cpp6
-rw-r--r--test/CodeGenCXX/aarch64-mangle-neon-vectors.cpp7
-rw-r--r--test/CodeGenCXX/aarch64-neon.cpp6
-rw-r--r--test/CodeGenCXX/abstract-class-ctors-dtors.cpp4
-rw-r--r--test/CodeGenCXX/address-of-fntemplate.cpp2
-rw-r--r--test/CodeGenCXX/address-space-ref.cpp34
-rw-r--r--test/CodeGenCXX/apple-kext.cpp4
-rw-r--r--test/CodeGenCXX/arm.cpp18
-rw-r--r--test/CodeGenCXX/arm64-constructor-return.cpp19
-rw-r--r--test/CodeGenCXX/arm64-darwinpcs.cpp15
-rw-r--r--test/CodeGenCXX/arm64-empty-struct.cpp27
-rw-r--r--test/CodeGenCXX/arm64.cpp88
-rw-r--r--test/CodeGenCXX/array-construction.cpp14
-rw-r--r--test/CodeGenCXX/array-operator-delete-call.cpp13
-rw-r--r--test/CodeGenCXX/atomicinit.cpp56
-rw-r--r--test/CodeGenCXX/attr-cleanup.cpp2
-rw-r--r--test/CodeGenCXX/attr-used.cpp20
-rw-r--r--test/CodeGenCXX/bitfield-layout.cpp2
-rw-r--r--test/CodeGenCXX/bitfield.cpp58
-rw-r--r--test/CodeGenCXX/block-byref-cxx-objc.cpp2
-rw-r--r--test/CodeGenCXX/block-in-ctor-dtor.cpp4
-rw-r--r--test/CodeGenCXX/block.cpp3
-rw-r--r--test/CodeGenCXX/blocks-cxx11.cpp2
-rw-r--r--test/CodeGenCXX/blocks.cpp2
-rw-r--r--test/CodeGenCXX/c-linkage.cpp4
-rw-r--r--test/CodeGenCXX/call-arg-zero-temp.cpp2
-rw-r--r--test/CodeGenCXX/captured-statements.cpp2
-rw-r--r--test/CodeGenCXX/cast-conversion.cpp28
-rw-r--r--test/CodeGenCXX/catch-undef-behavior.cpp48
-rw-r--r--test/CodeGenCXX/class-layout.cpp11
-rw-r--r--test/CodeGenCXX/conditional-gnu-ext.cpp4
-rw-r--r--test/CodeGenCXX/const-base-cast.cpp2
-rw-r--r--test/CodeGenCXX/const-global-linkage.cpp2
-rw-r--r--test/CodeGenCXX/const-init-cxx11.cpp42
-rw-r--r--test/CodeGenCXX/const-init-cxx1y.cpp55
-rw-r--r--test/CodeGenCXX/constructor-attr.cpp2
-rw-r--r--test/CodeGenCXX/constructor-conversion.cpp19
-rw-r--r--test/CodeGenCXX/constructor-default-arg.cpp19
-rw-r--r--test/CodeGenCXX/constructor-destructor-return-this.cpp49
-rw-r--r--test/CodeGenCXX/constructor-direct-call.cpp15
-rw-r--r--test/CodeGenCXX/constructor-for-array-members.cpp13
-rw-r--r--test/CodeGenCXX/constructor-init-reference.cpp4
-rw-r--r--test/CodeGenCXX/constructor-init.cpp2
-rw-r--r--test/CodeGenCXX/constructor-template.cpp2
-rw-r--r--test/CodeGenCXX/constructors.cpp32
-rw-r--r--test/CodeGenCXX/convert-to-fptr.cpp17
-rw-r--r--test/CodeGenCXX/copy-assign-synthesis-1.cpp4
-rw-r--r--test/CodeGenCXX/copy-assign-synthesis-2.cpp4
-rw-r--r--test/CodeGenCXX/copy-constructor-elim-2.cpp3
-rw-r--r--test/CodeGenCXX/copy-constructor-elim.cpp9
-rw-r--r--test/CodeGenCXX/copy-constructor-synthesis-2.cpp4
-rw-r--r--test/CodeGenCXX/copy-constructor-synthesis.cpp18
-rw-r--r--test/CodeGenCXX/coverage.cpp2
-rw-r--r--test/CodeGenCXX/ctor-dtor-alias.cpp4
-rw-r--r--test/CodeGenCXX/cxx0x-defaulted-templates.cpp6
-rw-r--r--test/CodeGenCXX/cxx0x-delegating-ctors.cpp22
-rw-r--r--test/CodeGenCXX/cxx0x-initializer-stdinitializerlist-pr12086.cpp128
-rw-r--r--test/CodeGenCXX/cxx0x-initializer-stdinitializerlist-startend.cpp4
-rw-r--r--test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp54
-rw-r--r--test/CodeGenCXX/cxx11-exception-spec.cpp3
-rw-r--r--test/CodeGenCXX/cxx11-initializer-aggregate.cpp21
-rw-r--r--test/CodeGenCXX/cxx11-initializer-array-new.cpp86
-rw-r--r--test/CodeGenCXX/cxx11-noreturn.cpp2
-rw-r--r--test/CodeGenCXX/cxx11-thread-local-reference.cpp4
-rw-r--r--test/CodeGenCXX/cxx11-thread-local.cpp32
-rw-r--r--test/CodeGenCXX/cxx11-unrestricted-union.cpp2
-rw-r--r--test/CodeGenCXX/cxx1y-initializer-aggregate.cpp2
-rw-r--r--test/CodeGenCXX/cxx1y-variable-template.cpp4
-rw-r--r--test/CodeGenCXX/debug-info-alias.cpp37
-rw-r--r--test/CodeGenCXX/debug-info-anon-union-vars.cpp28
-rw-r--r--test/CodeGenCXX/debug-info-byval.cpp3
-rw-r--r--test/CodeGenCXX/debug-info-char16.cpp2
-rw-r--r--test/CodeGenCXX/debug-info-class-limited-plugin.test2
-rw-r--r--test/CodeGenCXX/debug-info-class-limited.cpp52
-rw-r--r--test/CodeGenCXX/debug-info-class-limited.test1
-rw-r--r--test/CodeGenCXX/debug-info-class-nolimit.cpp4
-rw-r--r--test/CodeGenCXX/debug-info-class.cpp15
-rw-r--r--test/CodeGenCXX/debug-info-ctor2.cpp3
-rw-r--r--test/CodeGenCXX/debug-info-dup-fwd-decl.cpp2
-rw-r--r--test/CodeGenCXX/debug-info-enum-class.cpp52
-rw-r--r--test/CodeGenCXX/debug-info-enum.cpp11
-rw-r--r--test/CodeGenCXX/debug-info-function-context.cpp8
-rw-r--r--test/CodeGenCXX/debug-info-gline-tables-only.cpp2
-rw-r--r--test/CodeGenCXX/debug-info-global-ctor-dtor.cpp4
-rw-r--r--test/CodeGenCXX/debug-info-global.cpp19
-rw-r--r--test/CodeGenCXX/debug-info-indirect-field-decl.cpp17
-rw-r--r--test/CodeGenCXX/debug-info-limited.cpp3
-rw-r--r--test/CodeGenCXX/debug-info-line-if.cpp20
-rw-r--r--test/CodeGenCXX/debug-info-member.cpp3
-rw-r--r--test/CodeGenCXX/debug-info-method-spec.cpp3
-rw-r--r--test/CodeGenCXX/debug-info-method.cpp2
-rw-r--r--test/CodeGenCXX/debug-info-method2.cpp2
-rw-r--r--test/CodeGenCXX/debug-info-namespace.cpp34
-rw-r--r--test/CodeGenCXX/debug-info-pubtypes.cpp16
-rw-r--r--test/CodeGenCXX/debug-info-qualifiers.cpp26
-rw-r--r--test/CodeGenCXX/debug-info-same-line.cpp155
-rw-r--r--test/CodeGenCXX/debug-info-scope.cpp4
-rw-r--r--test/CodeGenCXX/debug-info-template-explicit-specialization.cpp93
-rw-r--r--test/CodeGenCXX/debug-info-template-fwd.cpp27
-rw-r--r--test/CodeGenCXX/debug-info-template-limit.cpp2
-rw-r--r--test/CodeGenCXX/debug-info-template-member.cpp6
-rw-r--r--test/CodeGenCXX/debug-info-template-partial-specialization.cpp31
-rw-r--r--test/CodeGenCXX/debug-info-template.cpp10
-rw-r--r--test/CodeGenCXX/debug-info-thunk.cpp2
-rw-r--r--test/CodeGenCXX/debug-info-use-after-free.cpp2
-rw-r--r--test/CodeGenCXX/debug-info-uuid.cpp2
-rw-r--r--test/CodeGenCXX/debug-info-varargs.cpp22
-rw-r--r--test/CodeGenCXX/debug-info-vtable-optzn.cpp22
-rw-r--r--test/CodeGenCXX/debug-info.cpp20
-rw-r--r--test/CodeGenCXX/decl-ref-init.cpp16
-rw-r--r--test/CodeGenCXX/default-arg-temps.cpp4
-rw-r--r--test/CodeGenCXX/default-arguments.cpp6
-rw-r--r--test/CodeGenCXX/default-constructor-default-argument.cpp2
-rw-r--r--test/CodeGenCXX/default-constructor-for-members.cpp13
-rw-r--r--test/CodeGenCXX/default-constructor-template-member.cpp2
-rw-r--r--test/CodeGenCXX/default-destructor-nested.cpp2
-rw-r--r--test/CodeGenCXX/deferred-global-init.cpp4
-rw-r--r--test/CodeGenCXX/delayed-template-parsing.cpp4
-rw-r--r--test/CodeGenCXX/delete-two-arg.cpp3
-rw-r--r--test/CodeGenCXX/dependent-type-member-pointer.cpp1
-rw-r--r--test/CodeGenCXX/derived-to-base-conv.cpp4
-rw-r--r--test/CodeGenCXX/derived-to-virtual-base-class-calls-final.cpp4
-rw-r--r--test/CodeGenCXX/destructor-exception-spec.cpp6
-rw-r--r--test/CodeGenCXX/destructors.cpp37
-rw-r--r--test/CodeGenCXX/dllexport-members.cpp647
-rw-r--r--test/CodeGenCXX/dllexport.cpp686
-rw-r--r--test/CodeGenCXX/dllimport-members.cpp875
-rw-r--r--test/CodeGenCXX/dllimport-rtti.cpp13
-rw-r--r--test/CodeGenCXX/dllimport.cpp771
-rw-r--r--test/CodeGenCXX/duplicate-mangled-name.cpp10
-rw-r--r--test/CodeGenCXX/dynamic_cast-no-rtti.cpp2
-rw-r--r--test/CodeGenCXX/eh.cpp11
-rw-r--r--test/CodeGenCXX/elide-call-reference.cpp2
-rw-r--r--test/CodeGenCXX/empty-nontrivially-copyable.cpp3
-rw-r--r--test/CodeGenCXX/enable_if.cpp20
-rw-r--r--test/CodeGenCXX/exceptions-no-rtti.cpp10
-rw-r--r--test/CodeGenCXX/exceptions.cpp2
-rw-r--r--test/CodeGenCXX/explicit-instantiation.cpp76
-rw-r--r--test/CodeGenCXX/extern-c.cpp18
-rw-r--r--test/CodeGenCXX/fastcall.cpp2
-rw-r--r--test/CodeGenCXX/field-access-debug-info.cpp7
-rw-r--r--test/CodeGenCXX/flatten.cpp10
-rw-r--r--test/CodeGenCXX/funcsig.cpp29
-rw-r--r--test/CodeGenCXX/function-template-explicit-specialization.cpp2
-rw-r--r--test/CodeGenCXX/function-template-specialization.cpp2
-rw-r--r--test/CodeGenCXX/global-array-destruction.cpp4
-rw-r--r--test/CodeGenCXX/global-init.cpp6
-rw-r--r--test/CodeGenCXX/global-llvm-constant.cpp2
-rw-r--r--test/CodeGenCXX/globalinit-loc.cpp23
-rw-r--r--test/CodeGenCXX/goto.cpp2
-rw-r--r--test/CodeGenCXX/implicit-copy-assign-operator.cpp3
-rw-r--r--test/CodeGenCXX/implicit-copy-constructor.cpp2
-rw-r--r--test/CodeGenCXX/implicit-instantiation-1.cpp2
-rw-r--r--test/CodeGenCXX/inheriting-constructor.cpp4
-rw-r--r--test/CodeGenCXX/init-priority-attr.cpp26
-rw-r--r--test/CodeGenCXX/inline-functions.cpp58
-rw-r--r--test/CodeGenCXX/instrument-functions.cpp2
-rw-r--r--test/CodeGenCXX/int64_uint64.cpp23
-rw-r--r--test/CodeGenCXX/internal-linkage.cpp2
-rw-r--r--test/CodeGenCXX/linetable-cleanup.cpp6
-rw-r--r--test/CodeGenCXX/linetable-eh.cpp44
-rw-r--r--test/CodeGenCXX/linetable-fnbegin.cpp28
-rw-r--r--test/CodeGenCXX/linkage.cpp42
-rw-r--r--test/CodeGenCXX/mangle-abi-examples.cpp2
-rw-r--r--test/CodeGenCXX/mangle-address-space.cpp2
-rw-r--r--test/CodeGenCXX/mangle-alias-template.cpp7
-rw-r--r--test/CodeGenCXX/mangle-lambdas.cpp2
-rw-r--r--test/CodeGenCXX/mangle-local-class-names.cpp2
-rw-r--r--test/CodeGenCXX/mangle-local-class-vtables.cpp2
-rw-r--r--test/CodeGenCXX/mangle-local-classes-nested.cpp2
-rw-r--r--test/CodeGenCXX/mangle-ms-abi-examples.cpp8
-rw-r--r--test/CodeGenCXX/mangle-ms-arg-qualifiers.cpp24
-rw-r--r--test/CodeGenCXX/mangle-ms-back-references-pr13207.cpp2
-rw-r--r--test/CodeGenCXX/mangle-ms-back-references.cpp2
-rw-r--r--test/CodeGenCXX/mangle-ms-cxx11.cpp132
-rw-r--r--test/CodeGenCXX/mangle-ms-cxx14.cpp40
-rw-r--r--test/CodeGenCXX/mangle-ms-return-qualifiers.cpp8
-rw-r--r--test/CodeGenCXX/mangle-ms-string-literals.cpp721
-rw-r--r--test/CodeGenCXX/mangle-ms-template-callback.cpp19
-rw-r--r--test/CodeGenCXX/mangle-ms-templates-memptrs-2.cpp45
-rw-r--r--test/CodeGenCXX/mangle-ms-templates-memptrs.cpp143
-rw-r--r--test/CodeGenCXX/mangle-ms-templates.cpp18
-rw-r--r--test/CodeGenCXX/mangle-ms-vector-types.cpp2
-rw-r--r--test/CodeGenCXX/mangle-ms.cpp19
-rw-r--r--test/CodeGenCXX/mangle-neon-vectors.cpp43
-rw-r--r--test/CodeGenCXX/mangle-nullptr-arg.cpp2
-rw-r--r--test/CodeGenCXX/mangle-std-externc.cpp4
-rw-r--r--test/CodeGenCXX/mangle-subst-std.cpp2
-rw-r--r--test/CodeGenCXX/mangle-template.cpp30
-rw-r--r--test/CodeGenCXX/mangle-windows.cpp4
-rw-r--r--test/CodeGenCXX/mangle.cpp52
-rw-r--r--test/CodeGenCXX/member-alignment.cpp2
-rw-r--r--test/CodeGenCXX/member-function-pointer-calls.cpp5
-rw-r--r--test/CodeGenCXX/member-init-anon-union.cpp34
-rw-r--r--test/CodeGenCXX/member-templates.cpp2
-rw-r--r--test/CodeGenCXX/microsoft-abi-alignment-fail.cpp8
-rw-r--r--test/CodeGenCXX/microsoft-abi-arg-order.cpp74
-rw-r--r--test/CodeGenCXX/microsoft-abi-array-cookies.cpp2
-rw-r--r--test/CodeGenCXX/microsoft-abi-byval-sret.cpp29
-rw-r--r--test/CodeGenCXX/microsoft-abi-byval-vararg.cpp52
-rw-r--r--test/CodeGenCXX/microsoft-abi-cdecl-method-sret.cpp44
-rw-r--r--test/CodeGenCXX/microsoft-abi-constexpr-vs-inheritance.cpp2
-rw-r--r--test/CodeGenCXX/microsoft-abi-default-cc.cpp4
-rw-r--r--test/CodeGenCXX/microsoft-abi-dynamic-cast.cpp130
-rw-r--r--test/CodeGenCXX/microsoft-abi-exceptions.cpp65
-rwxr-xr-xtest/CodeGenCXX/microsoft-abi-member-pointers.cpp180
-rw-r--r--test/CodeGenCXX/microsoft-abi-methods.cpp2
-rw-r--r--test/CodeGenCXX/microsoft-abi-multiple-nonvirtual-inheritance.cpp2
-rwxr-xr-xtest/CodeGenCXX/microsoft-abi-non-virtual-base-ordering.cpp10
-rw-r--r--test/CodeGenCXX/microsoft-abi-nontrivial-covariant-thunk.cpp24
-rw-r--r--test/CodeGenCXX/microsoft-abi-rtti.cpp267
-rw-r--r--test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp158
-rw-r--r--test/CodeGenCXX/microsoft-abi-static-initializers.cpp123
-rw-r--r--test/CodeGenCXX/microsoft-abi-structors-alias.cpp21
-rw-r--r--test/CodeGenCXX/microsoft-abi-structors.cpp145
-rw-r--r--test/CodeGenCXX/microsoft-abi-thunks.cpp23
-rw-r--r--test/CodeGenCXX/microsoft-abi-try-throw.cpp23
-rw-r--r--test/CodeGenCXX/microsoft-abi-typeid.cpp52
-rw-r--r--test/CodeGenCXX/microsoft-abi-vbtables.cpp53
-rw-r--r--test/CodeGenCXX/microsoft-abi-vftables.cpp42
-rw-r--r--test/CodeGenCXX/microsoft-abi-virtual-inheritance-vtordisps.cpp10
-rw-r--r--test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp152
-rw-r--r--test/CodeGenCXX/microsoft-abi-virtual-member-pointers.cpp80
-rw-r--r--test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-no-thunks.cpp302
-rw-r--r--test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-pure-virtual.cpp35
-rw-r--r--test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-return-adjustment.cpp297
-rw-r--r--test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-this-adjustment.cpp140
-rw-r--r--test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-vdtors.cpp94
-rw-r--r--test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance.cpp579
-rw-r--r--test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp106
-rw-r--r--test/CodeGenCXX/microsoft-abi-vtables-single-inheritance.cpp279
-rw-r--r--test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance-vtordisps.cpp411
-rw-r--r--test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp667
-rw-r--r--test/CodeGenCXX/microsoft-compatibility.cpp21
-rw-r--r--test/CodeGenCXX/microsoft-interface.cpp25
-rw-r--r--test/CodeGenCXX/microsoft-new.cpp78
-rw-r--r--test/CodeGenCXX/microsoft-no-rtti-data.cpp21
-rw-r--r--test/CodeGenCXX/microsoft-templ-uuidof.cpp37
-rw-r--r--test/CodeGenCXX/microsoft-uuidof.cpp6
-rw-r--r--test/CodeGenCXX/mingw-new-abi.cpp13
-rw-r--r--test/CodeGenCXX/mips-size_t-ptrdiff_t.cpp49
-rw-r--r--test/CodeGenCXX/ms-integer-static-data-members-exported.cpp22
-rw-r--r--test/CodeGenCXX/ms-integer-static-data-members.cpp8
-rw-r--r--test/CodeGenCXX/ms_wide_predefined_expr.cpp2
-rw-r--r--test/CodeGenCXX/new-array-init.cpp19
-rw-r--r--test/CodeGenCXX/new.cpp17
-rw-r--r--test/CodeGenCXX/no-elide-constructors.cpp35
-rw-r--r--test/CodeGenCXX/noinline-template.cpp4
-rw-r--r--test/CodeGenCXX/nrvo.cpp50
-rw-r--r--test/CodeGenCXX/pod-member-memcpys.cpp52
-rw-r--r--test/CodeGenCXX/pointers-to-data-members.cpp2
-rw-r--r--test/CodeGenCXX/poly-unsigned.cpp20
-rw-r--r--test/CodeGenCXX/pr11797.cpp2
-rw-r--r--test/CodeGenCXX/pr12104.cpp6
-rw-r--r--test/CodeGenCXX/pr13396.cpp4
-rw-r--r--test/CodeGenCXX/pr18661.cpp14
-rw-r--r--test/CodeGenCXX/pr18962.cpp32
-rw-r--r--test/CodeGenCXX/pr9965.cpp2
-rw-r--r--test/CodeGenCXX/pragma-init_seg.cpp72
-rw-r--r--test/CodeGenCXX/pragma-pack-3.cpp18
-rw-r--r--test/CodeGenCXX/pragma-weak.cpp4
-rw-r--r--test/CodeGenCXX/predefined-expr.cpp12
-rw-r--r--test/CodeGenCXX/ptr-to-member-function.cpp17
-rw-r--r--test/CodeGenCXX/reference-cast.cpp18
-rw-r--r--test/CodeGenCXX/reference-field.cpp4
-rw-r--r--test/CodeGenCXX/reference-init.cpp2
-rw-r--r--test/CodeGenCXX/references.cpp4
-rw-r--r--test/CodeGenCXX/return.cpp4
-rw-r--r--test/CodeGenCXX/rtti-fundamental.cpp125
-rw-r--r--test/CodeGenCXX/rtti-linkage.cpp113
-rw-r--r--test/CodeGenCXX/rtti-visibility.cpp12
-rw-r--r--test/CodeGenCXX/runtimecc.cpp2
-rw-r--r--test/CodeGenCXX/rvalue-references.cpp16
-rw-r--r--test/CodeGenCXX/scoped-enums.cpp2
-rw-r--r--test/CodeGenCXX/sparcv9-abi.cpp26
-rw-r--r--test/CodeGenCXX/specialized-static-data-mem-init.cpp6
-rw-r--r--test/CodeGenCXX/split-stacks.cpp33
-rw-r--r--test/CodeGenCXX/static-init-3.cpp4
-rw-r--r--test/CodeGenCXX/static-init.cpp12
-rw-r--r--test/CodeGenCXX/static-member-variable-explicit-specialization.cpp20
-rw-r--r--test/CodeGenCXX/stmtexpr.cpp2
-rw-r--r--test/CodeGenCXX/template-dependent-bind-temporary.cpp2
-rw-r--r--test/CodeGenCXX/template-inner-struct-visibility-hidden.cpp6
-rw-r--r--test/CodeGenCXX/template-instantiation.cpp28
-rw-r--r--test/CodeGenCXX/temporaries.cpp87
-rw-r--r--test/CodeGenCXX/throw-expression-dtor.cpp2
-rw-r--r--test/CodeGenCXX/throw-expressions.cpp45
-rw-r--r--test/CodeGenCXX/thunk-use-after-free.cpp2
-rw-r--r--test/CodeGenCXX/thunks.cpp9
-rw-r--r--test/CodeGenCXX/tls-init-funcs.cpp26
-rw-r--r--test/CodeGenCXX/trivial-constructor-init.cpp2
-rw-r--r--test/CodeGenCXX/type-traits.cpp6
-rw-r--r--test/CodeGenCXX/type_visibility.cpp36
-rw-r--r--test/CodeGenCXX/typeid-should-throw.cpp82
-rw-r--r--test/CodeGenCXX/unary-type-trait.cpp4
-rw-r--r--test/CodeGenCXX/uncopyable-args.cpp206
-rw-r--r--test/CodeGenCXX/value-init.cpp53
-rw-r--r--test/CodeGenCXX/vararg-non-pod.cpp2
-rw-r--r--test/CodeGenCXX/virt-dtor-gen.cpp4
-rw-r--r--test/CodeGenCXX/virt-dtor-key.cpp4
-rw-r--r--test/CodeGenCXX/virt-template-vtable.cpp2
-rw-r--r--test/CodeGenCXX/virtual-base-cast.cpp2
-rw-r--r--test/CodeGenCXX/virtual-base-ctor.cpp2
-rw-r--r--test/CodeGenCXX/virtual-base-destructor-call.cpp2
-rw-r--r--test/CodeGenCXX/virtual-bases.cpp4
-rw-r--r--test/CodeGenCXX/virtual-destructor-calls.cpp10
-rw-r--r--test/CodeGenCXX/virtual-destructor-synthesis.cpp2
-rw-r--r--test/CodeGenCXX/virtual-function-calls.cpp6
-rw-r--r--test/CodeGenCXX/virtual-implicit-copy-assignment.cpp2
-rw-r--r--test/CodeGenCXX/virtual-implicit-move-assignment.cpp2
-rw-r--r--test/CodeGenCXX/virtual-inherited-destructor.cpp2
-rw-r--r--test/CodeGenCXX/virtual-pseudo-destructor-call.cpp2
-rw-r--r--test/CodeGenCXX/visibility-hidden-extern-templates.cpp10
-rw-r--r--test/CodeGenCXX/visibility-ms-compat.cpp12
-rw-r--r--test/CodeGenCXX/vla.cpp2
-rw-r--r--test/CodeGenCXX/volatile-1.cpp6
-rw-r--r--test/CodeGenCXX/volatile.cpp2
-rw-r--r--test/CodeGenCXX/vtable-available-externally.cpp2
-rw-r--r--test/CodeGenCXX/vtable-cast-crash.cpp2
-rw-r--r--test/CodeGenCXX/vtable-key-function-arm.cpp26
-rw-r--r--test/CodeGenCXX/vtable-key-function-ios.cpp18
-rw-r--r--test/CodeGenCXX/vtable-layout-abi-examples.cpp2
-rw-r--r--test/CodeGenCXX/vtable-linkage.cpp32
-rw-r--r--test/CodeGenCXX/weak-extern-typeinfo.cpp16
-rw-r--r--test/CodeGenCXX/weak-external.cpp2
-rw-r--r--test/CodeGenCXX/windows-itanium-exceptions.cpp47
-rw-r--r--test/CodeGenObjC/2009-08-05-utf16.m2
-rw-r--r--test/CodeGenObjC/2010-02-01-utf16-with-null.m6
-rw-r--r--test/CodeGenObjC/arc-arm.m17
-rw-r--r--test/CodeGenObjC/arc-foreach.m2
-rw-r--r--test/CodeGenObjC/arc-ivar-layout.m11
-rw-r--r--test/CodeGenObjC/arc-linetable-autorelease.m9
-rw-r--r--test/CodeGenObjC/arc-linetable.m27
-rw-r--r--test/CodeGenObjC/arc-property.m2
-rw-r--r--test/CodeGenObjC/arc.m10
-rw-r--r--test/CodeGenObjC/arm64-int32-ivar.m17
-rw-r--r--test/CodeGenObjC/attr-callconv.m13
-rw-r--r--test/CodeGenObjC/block-var-layout.m8
-rw-r--r--test/CodeGenObjC/blocks.m2
-rw-r--r--test/CodeGenObjC/boxing.m24
-rw-r--r--test/CodeGenObjC/complex-property.m4
-rw-r--r--test/CodeGenObjC/constant-strings.m2
-rw-r--r--test/CodeGenObjC/debug-info-block-helper.m2
-rw-r--r--test/CodeGenObjC/debug-info-block-line.m2
-rw-r--r--test/CodeGenObjC/debug-info-blocks.m2
-rw-r--r--test/CodeGenObjC/debug-info-class-extension.m3
-rw-r--r--test/CodeGenObjC/debug-info-class-extension2.m3
-rw-r--r--test/CodeGenObjC/debug-info-crash-2.m2
-rw-r--r--test/CodeGenObjC/debug-info-getter-name.m2
-rw-r--r--test/CodeGenObjC/debug-info-ivars-indirect.m29
-rw-r--r--test/CodeGenObjC/debug-info-lifetime-crash.m2
-rw-r--r--test/CodeGenObjC/debug-info-property.m3
-rw-r--r--test/CodeGenObjC/debug-info-property2.m3
-rw-r--r--test/CodeGenObjC/debug-info-property4.m3
-rw-r--r--test/CodeGenObjC/debug-info-property5.m3
-rw-r--r--test/CodeGenObjC/debug-info-pubtypes.m2
-rw-r--r--test/CodeGenObjC/debug-info-self.m2
-rw-r--r--test/CodeGenObjC/debug-property-synth.m28
-rw-r--r--test/CodeGenObjC/encode-cstyle-method.m2
-rw-r--r--test/CodeGenObjC/encode-test-6.m19
-rw-r--r--test/CodeGenObjC/encode-test.m10
-rw-r--r--test/CodeGenObjC/exceptions-asm-attribute.m86
-rw-r--r--test/CodeGenObjC/externally-initialized-selectors.m6
-rw-r--r--test/CodeGenObjC/forward-protocol-metadata-symbols.m26
-rw-r--r--test/CodeGenObjC/getter-property-mismatch.m2
-rw-r--r--test/CodeGenObjC/image-info.m20
-rw-r--r--test/CodeGenObjC/instance-method-metadata.m2
-rw-r--r--test/CodeGenObjC/interface-layout-64.m18
-rw-r--r--test/CodeGenObjC/ivar-base-as-invariant-load.m8
-rw-r--r--test/CodeGenObjC/ivar-layout-64.m26
-rw-r--r--test/CodeGenObjC/ivar-layout-array0-struct.m2
-rw-r--r--test/CodeGenObjC/ivar-layout-no-optimize.m2
-rw-r--r--test/CodeGenObjC/metadata-symbols-32.m48
-rw-r--r--test/CodeGenObjC/metadata-symbols-64.m44
-rw-r--r--test/CodeGenObjC/metadata_symbols.m4
-rw-r--r--test/CodeGenObjC/no-vararg-messaging.m2
-rw-r--r--test/CodeGenObjC/non-lazy-classes.m4
-rw-r--r--test/CodeGenObjC/objc-align.m34
-rw-r--r--test/CodeGenObjC/objc-asm-attribute-neg-test.m34
-rw-r--r--test/CodeGenObjC/objc-asm-attribute-test.m54
-rw-r--r--test/CodeGenObjC/objc-read-weak-byref.m16
-rw-r--r--test/CodeGenObjC/objc2-weak-block-call.m2
-rw-r--r--test/CodeGenObjC/objc2-weak-import-attribute.m2
-rw-r--r--test/CodeGenObjC/optimize-ivar-offset-load.m64
-rw-r--r--test/CodeGenObjC/overloadable.m8
-rw-r--r--test/CodeGenObjC/property-array-type.m30
-rw-r--r--test/CodeGenObjC/property-category-impl.m4
-rw-r--r--test/CodeGenObjC/property-dbg.m3
-rw-r--r--test/CodeGenObjC/property-list-in-class.m2
-rw-r--r--test/CodeGenObjC/property-section-attribute.m13
-rw-r--r--test/CodeGenObjC/protocol-in-extended-class.m2
-rw-r--r--test/CodeGenObjC/reorder-synthesized-ivars.m36
-rw-r--r--test/CodeGenObjC/return-objc-object.mm4
-rw-r--r--test/CodeGenObjC/stret-1.m20
-rw-r--r--test/CodeGenObjC/stret.m22
-rw-r--r--test/CodeGenObjC/try.m2
-rw-r--r--test/CodeGenObjC/weak-metaclass-visibility.m60
-rw-r--r--test/CodeGenObjCXX/arc-blocks.mm4
-rw-r--r--test/CodeGenObjCXX/arc-cxx11-member-init.mm32
-rw-r--r--test/CodeGenObjCXX/arc-globals.mm2
-rw-r--r--test/CodeGenObjCXX/arc-mangle.mm2
-rw-r--r--test/CodeGenObjCXX/arc-move.mm6
-rw-r--r--test/CodeGenObjCXX/arc-special-member-functions.mm2
-rw-r--r--test/CodeGenObjCXX/encode.mm2
-rw-r--r--test/CodeGenObjCXX/externally-initialized-selectors.mm6
-rw-r--r--test/CodeGenObjCXX/implicit-copy-assign-operator.mm2
-rw-r--r--test/CodeGenObjCXX/implicit-copy-constructor.mm2
-rw-r--r--test/CodeGenObjCXX/lambda-expressions.mm4
-rw-r--r--test/CodeGenObjCXX/lvalue-reference-getter.mm4
-rw-r--r--test/CodeGenObjCXX/message-reference.mm2
-rw-r--r--test/CodeGenObjCXX/microsoft-abi-arc-param-order.mm20
-rw-r--r--test/CodeGenObjCXX/property-dot-reference.mm10
-rw-r--r--test/CodeGenObjCXX/property-lvalue-capture.mm53
-rw-r--r--test/CodeGenObjCXX/property-object-reference-2.mm4
-rw-r--r--test/CodeGenObjCXX/property-objects.mm6
-rw-r--r--test/CodeGenObjCXX/property-reference.mm6
-rw-r--r--test/CodeGenObjCXX/rtti.mm14
-rw-r--r--test/CodeGenOpenCL/address-space-constant-initializers.cl20
-rw-r--r--test/CodeGenOpenCL/address-spaces-mangling.cl4
-rw-r--r--test/CodeGenOpenCL/builtins-r600.cl114
-rw-r--r--test/CodeGenOpenCL/kernel-arg-info.cl10
-rw-r--r--test/CodeGenOpenCL/local.cl4
-rw-r--r--test/CodeGenOpenCL/str_literals.cl2
-rw-r--r--test/Coverage/c-language-features.inc12
-rw-r--r--test/Coverage/html-diagnostics.c2
-rw-r--r--test/Driver/Inputs/basic_android_tree/aarch64-linux-android/bin/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/el/fp64/bits/.keep)0
-rw-r--r--test/Driver/Inputs/basic_android_tree/aarch64-linux-android/include/c++/4.8/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/fp64/bits/.keep)0
-rw-r--r--test/Driver/Inputs/basic_android_tree/aarch64-linux-android/lib/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/micromips/el/fp64/bits/.keep)0
-rwxr-xr-x[-rw-r--r--]test/Driver/Inputs/basic_android_tree/arm-linux-androideabi/bin/ld (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/el/fp64/crtend.o)0
-rwxr-xr-x[-rw-r--r--]test/Driver/Inputs/basic_android_tree/arm-linux-androideabi/bin/ld.bfd (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/el/fp64/nan2008/crtbegin.o)0
-rwxr-xr-x[-rw-r--r--]test/Driver/Inputs/basic_android_tree/arm-linux-androideabi/bin/ld.gold (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/el/fp64/nan2008/crtend.o)0
-rwxr-xr-x[-rw-r--r--]test/Driver/Inputs/basic_android_tree/bin/arm-linux-androideabi-ld (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/fp64/crtbegin.o)0
-rwxr-xr-x[-rw-r--r--]test/Driver/Inputs/basic_android_tree/bin/arm-linux-androideabi-ld.bfd (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/fp64/crtend.o)0
-rwxr-xr-x[-rw-r--r--]test/Driver/Inputs/basic_android_tree/bin/arm-linux-androideabi-ld.gold (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/fp64/nan2008/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/basic_android_tree/lib/gcc/aarch64-linux-android/4.8/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/micromips/el/fp64/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/basic_android_tree/lib/gcc/aarch64-linux-android/4.8/crtbeginS.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/fp64/nan2008/crtend.o)0
-rw-r--r--test/Driver/Inputs/basic_android_tree/lib/gcc/aarch64-linux-android/4.8/crtbeginT.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/micromips/el/fp64/crtend.o)0
-rw-r--r--test/Driver/Inputs/basic_android_tree/lib/gcc/aarch64-linux-android/4.8/crtend.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/micromips/el/fp64/nan2008/crtend.o)0
-rw-r--r--test/Driver/Inputs/basic_android_tree/lib/gcc/aarch64-linux-android/4.8/crtendS.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/micromips/el/fp64/nan2008/crtbegin.o)0
-rwxr-xr-x[-rw-r--r--]test/Driver/Inputs/basic_freebsd_tree/usr/bin/ld.bfd (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/micromips/fp64/crtbegin.o)0
-rwxr-xr-x[-rw-r--r--]test/Driver/Inputs/basic_freebsd_tree/usr/bin/ld.gold (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/micromips/fp64/crtend.o)0
-rw-r--r--test/Driver/Inputs/basic_linux_libcxx_tree/usr/bin/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/micromips/fp64/bits/.keep)0
-rw-r--r--test/Driver/Inputs/basic_linux_libcxx_tree/usr/include/c++/v1/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips16/el/fp64/bits/.keep)0
-rw-r--r--test/Driver/Inputs/basic_linux_libcxx_tree/usr/lib/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips16/fp64/bits/.keep)0
-rw-r--r--test/Driver/Inputs/basic_netbsd_tree/usr/lib/64/crti.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/el/fp64/nan2008/usr/lib/crti.o)0
-rw-r--r--test/Driver/Inputs/basic_netbsd_tree/usr/lib/eabi/crti.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/el/fp64/usr/lib/crti.o)0
-rw-r--r--test/Driver/Inputs/basic_netbsd_tree/usr/lib/i386/crti.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/fp64/nan2008/usr/lib/crti.o)0
-rw-r--r--test/Driver/Inputs/basic_netbsd_tree/usr/lib/o32/crti.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/fp64/usr/lib/crti.o)0
-rw-r--r--test/Driver/Inputs/basic_netbsd_tree/usr/lib/oabi/crti.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/el/fp64/nan2008/usr/lib/crti.o)0
-rw-r--r--test/Driver/Inputs/basic_netbsd_tree/usr/lib/sparc/crti.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/el/fp64/usr/lib/crti.o)0
-rw-r--r--test/Driver/Inputs/cl-libs/cl-test.lib (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/micromips/fp64/nan2008/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/debian_6_mips64_tree/lib/mips64-linux-gnuabi64/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips32/el/fp64/bits/.keep)0
-rw-r--r--test/Driver/Inputs/debian_6_mips64_tree/lib/mips64el-linux-gnuabi64/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips32/fp64/bits/.keep)0
-rw-r--r--test/Driver/Inputs/debian_6_mips64_tree/usr/include/c++/4.9/backward/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/64/el/fp64/bits/.keep)0
-rw-r--r--test/Driver/Inputs/debian_6_mips64_tree/usr/include/c++/4.9/mips64-linux-gnuabi64/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/64/fp64/bits/.keep)0
-rw-r--r--test/Driver/Inputs/debian_6_mips64_tree/usr/include/c++/4.9/mips64el-linux-gnuabi64/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/el/fp64/bits/.keep)0
-rw-r--r--test/Driver/Inputs/debian_6_mips64_tree/usr/include/mips64-linux-gnuabi64/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/fp64/bits/.keep)0
-rw-r--r--test/Driver/Inputs/debian_6_mips64_tree/usr/include/mips64el-linux-gnuabi64/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/64/el/fp64/bits/.keep)0
-rw-r--r--test/Driver/Inputs/debian_6_mips64_tree/usr/lib/gcc/mips64-linux-gnuabi64/4.9/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips16/el/fp64/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/debian_6_mips64_tree/usr/lib/gcc/mips64-linux-gnuabi64/4.9/crtend.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/micromips/fp64/nan2008/crtend.o)0
-rw-r--r--test/Driver/Inputs/debian_6_mips64_tree/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips16/el/fp64/nan2008/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/debian_6_mips64_tree/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/crtend.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips16/el/fp64/crtend.o)0
-rw-r--r--test/Driver/Inputs/debian_6_mips64_tree/usr/lib/mips64-linux-gnuabi64/crt1.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/el/fp64/nan2008/usr/lib/crt1.o)0
-rw-r--r--test/Driver/Inputs/debian_6_mips64_tree/usr/lib/mips64-linux-gnuabi64/crti.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/fp64/nan2008/usr/lib/crti.o)0
-rw-r--r--test/Driver/Inputs/debian_6_mips64_tree/usr/lib/mips64-linux-gnuabi64/crtn.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/el/fp64/nan2008/usr/lib/crtn.o)0
-rw-r--r--test/Driver/Inputs/debian_6_mips64_tree/usr/lib/mips64el-linux-gnuabi64/crt1.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/el/fp64/usr/lib/crt1.o)0
-rw-r--r--test/Driver/Inputs/debian_6_mips64_tree/usr/lib/mips64el-linux-gnuabi64/crti.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/fp64/usr/lib/crti.o)0
-rw-r--r--test/Driver/Inputs/debian_6_mips64_tree/usr/lib/mips64el-linux-gnuabi64/crtn.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/el/fp64/usr/lib/crtn.o)0
-rw-r--r--test/Driver/Inputs/debian_reduced_mips_tree/lib/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/64/fp64/bits/.keep)0
-rw-r--r--test/Driver/Inputs/debian_reduced_mips_tree/lib/mips-linux-gnu/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/el/fp64/bits/.keep)0
-rw-r--r--test/Driver/Inputs/debian_reduced_mips_tree/lib/mipsel-linux-gnu/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/fp64/bits/.keep)0
-rw-r--r--test/Driver/Inputs/debian_reduced_mips_tree/usr/include/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/el/fp64/nan2008/.keep)0
-rw-r--r--test/Driver/Inputs/debian_reduced_mips_tree/usr/include/c++/4.7/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/fp64/nan2008/.keep)0
-rw-r--r--test/Driver/Inputs/debian_reduced_mips_tree/usr/include/c++/4.7/backward/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/micromips/el/fp64/nan2008/.keep)0
-rw-r--r--test/Driver/Inputs/debian_reduced_mips_tree/usr/include/c++/4.7/mips-linux-gnu/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/micromips/fp64/nan2008/.keep)0
-rw-r--r--test/Driver/Inputs/debian_reduced_mips_tree/usr/include/c++/4.7/mipsel-linux-gnu/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips16/el/fp64/nan2008/.keep)0
-rw-r--r--test/Driver/Inputs/debian_reduced_mips_tree/usr/include/mips-linux-gnu/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips16/fp64/nan2008/.keep)0
-rw-r--r--test/Driver/Inputs/debian_reduced_mips_tree/usr/include/mipsel-linux-gnu/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips32/el/fp64/nan2008/.keep)0
-rw-r--r--test/Driver/Inputs/debian_reduced_mips_tree/usr/lib/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips32/fp64/nan2008/.keep)0
-rw-r--r--test/Driver/Inputs/debian_reduced_mips_tree/usr/lib/gcc/mips-linux-gnu/4.7/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips16/fp64/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/debian_reduced_mips_tree/usr/lib/gcc/mipsel-linux-gnu/4.7/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips16/fp64/nan2008/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/debian_reduced_mips_tree/usr/lib/mips-linux-gnu/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips32/mips16/el/fp64/nan2008/.keep)0
-rw-r--r--test/Driver/Inputs/debian_reduced_mips_tree/usr/lib/mipsel-linux-gnu/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips32/mips16/fp64/nan2008/.keep)0
-rw-r--r--test/Driver/Inputs/fedora_21_tree/usr/lib/gcc/aarch64-redhat-linux/4.9.0/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/el/fp64/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/fedora_21_tree/usr/lib/gcc/aarch64-redhat-linux/4.9.0/crtend.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips16/el/fp64/nan2008/crtend.o)0
-rw-r--r--test/Driver/Inputs/fedora_21_tree/usr/lib64/crt1.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/fp64/nan2008/usr/lib/crt1.o)0
-rw-r--r--test/Driver/Inputs/fedora_21_tree/usr/lib64/crti.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/el/fp64/nan2008/usr/lib/crti.o)0
-rw-r--r--test/Driver/Inputs/fedora_21_tree/usr/lib64/crtn.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/fp64/nan2008/usr/lib/crtn.o)0
-rw-r--r--test/Driver/Inputs/file.ll (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips16/fp64/crtend.o)0
-rw-r--r--test/Driver/Inputs/gentoo_linux_gcc_4.6.2_tree/usr/include/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips64/64/el/fp64/nan2008/.keep)0
-rw-r--r--test/Driver/Inputs/gentoo_linux_gcc_4.6.4_tree/usr/include/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips64/64/fp64/nan2008/.keep)0
-rw-r--r--test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/include-fixed/nan2008/el/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips64/el/fp64/nan2008/.keep)0
-rw-r--r--test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/nan2008/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/el/fp64/nan2008/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/nan2008/crtend.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips16/fp64/nan2008/crtend.o)0
-rw-r--r--test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/nan2008/el/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/fp64/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/nan2008/el/crtend.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/el/fp64/crtend.o)0
-rw-r--r--test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/lib/nan2008/el/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips64/fp64/nan2008/.keep)0
-rw-r--r--test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/el/lib/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips64r2/64/el/fp64/nan2008/.keep)0
-rw-r--r--test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/el/usr/lib/crt1.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/fp64/usr/lib/crt1.o)0
-rw-r--r--test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/el/usr/lib/crti.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/el/fp64/usr/lib/crti.o)0
-rw-r--r--test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/el/usr/lib/crtn.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/fp64/usr/lib/crtn.o)0
-rw-r--r--test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/lib/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips64r2/64/fp64/nan2008/.keep)0
-rw-r--r--test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/usr/lib/crt1.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/el/fp64/nan2008/usr/lib/crt1.o)0
-rw-r--r--test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/usr/lib/crti.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/fp64/nan2008/usr/lib/crti.o)0
-rw-r--r--test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/usr/lib/crtn.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/el/fp64/nan2008/usr/lib/crtn.o)0
-rw-r--r--test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/el/fp64/nan2008/usr/lib/crti.o0
-rw-r--r--test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/el/fp64/nan2008/usr/lib/crtn.o0
-rw-r--r--test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/el/fp64/usr/lib/crt1.o0
-rw-r--r--test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/el/fp64/usr/lib/crti.o0
-rw-r--r--test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/el/fp64/usr/lib/crtn.o0
-rw-r--r--test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/fp64/nan2008/usr/lib/crt1.o0
-rw-r--r--test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/fp64/nan2008/usr/lib/crti.o0
-rw-r--r--test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/fp64/nan2008/usr/lib/crtn.o0
-rw-r--r--test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/fp64/usr/lib/crt1.o0
-rw-r--r--test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/fp64/usr/lib/crti.o0
-rw-r--r--test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/fp64/usr/lib/crtn.o0
-rw-r--r--test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/el/fp64/nan2008/usr/lib/crt1.o0
-rw-r--r--test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/el/fp64/nan2008/usr/lib/crti.o0
-rw-r--r--test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/el/fp64/nan2008/usr/lib/crtn.o0
-rw-r--r--test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/el/fp64/usr/lib/crt1.o0
-rw-r--r--test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/el/fp64/usr/lib/crti.o0
-rw-r--r--test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/el/fp64/usr/lib/crtn.o0
-rw-r--r--test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/fp64/nan2008/usr/lib/crt1.o0
-rw-r--r--test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/fp64/nan2008/usr/lib/crti.o0
-rw-r--r--test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/fp64/nan2008/usr/lib/crtn.o0
-rw-r--r--test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/fp64/usr/lib/crt1.o0
-rw-r--r--test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/fp64/usr/lib/crti.o0
-rw-r--r--test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/fp64/usr/lib/crtn.o0
-rw-r--r--test/Driver/Inputs/mips_img_tree/bin/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips64r2/el/fp64/nan2008/.keep)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/fp64/nan2008/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/crtend.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/el/fp64/nan2008/crtend.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/el/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/mips16/el/fp64/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/el/crtend.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/fp64/crtend.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include-fixed/el/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips64r2/fp64/nan2008/.keep)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include-fixed/mips64r6/64/el/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/fp64/nan2008/crtend.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include-fixed/mips64r6/el/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/mips16/el/fp64/crtend.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/mips16/el/fp64/nan2008/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/mips16/fp64/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/crtend.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/mips16/el/fp64/nan2008/crtend.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/el/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/mips16/fp64/nan2008/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/el/crtend.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/mips16/fp64/crtend.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/64/el/fp64/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/crtend.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/mips16/fp64/nan2008/crtend.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/el/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/64/el/fp64/nan2008/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/el/crtend.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/64/el/fp64/crtend.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/bin/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/64/el/fp64/nan2008/crtend.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/include/c++/4.9.0/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/64/fp64/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/lib/el/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/64/fp64/crtend.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/lib/mips64r6/64/el/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/64/fp64/nan2008/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/lib/mips64r6/el/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/64/fp64/nan2008/crtend.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/el/usr/bin/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/el/fp64/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/el/usr/lib/crt1.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/el/fp64/usr/lib/crt1.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/el/usr/lib/crti.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/fp64/usr/lib/crti.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/el/usr/lib/crtn.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/el/fp64/usr/lib/crtn.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/el/usr/sbin/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/el/fp64/crtend.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/bin/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/el/fp64/nan2008/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/lib/crt1.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/fp64/nan2008/usr/lib/crt1.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/lib/crti.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/el/fp64/nan2008/usr/lib/crti.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/lib/crtn.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/fp64/nan2008/usr/lib/crtn.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/sbin/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/el/fp64/nan2008/crtend.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/bin/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/fp64/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/lib/crt1.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/fp64/usr/lib/crt1.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/lib/crti.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/el/fp64/usr/lib/crti.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/lib/crtn.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/fp64/usr/lib/crtn.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/sbin/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/fp64/crtend.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/bin/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/fp64/nan2008/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/lib/crt1.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/el/fp64/nan2008/usr/lib/crt1.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/lib/crti.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/fp64/nan2008/usr/lib/crti.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/lib/crtn.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/el/fp64/nan2008/usr/lib/crtn.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/sbin/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/fp64/nan2008/crtend.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/bin/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/64/el/fp64/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/lib/crt1.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/el/fp64/usr/lib/crt1.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/lib/crti.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/fp64/usr/lib/crti.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/lib/crtn.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/el/fp64/usr/lib/crtn.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/sbin/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/64/el/fp64/crtend.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/usr/bin/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/64/el/fp64/nan2008/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/usr/include/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/64/el/fp64/nan2008/crtend.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/usr/lib/crt1.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/fp64/nan2008/usr/lib/crt1.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/usr/lib/crti.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/el/fp64/nan2008/usr/lib/crti.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/usr/lib/crtn.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/fp64/nan2008/usr/lib/crtn.o)0
-rw-r--r--test/Driver/Inputs/mips_img_tree/sysroot/usr/sbin/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/64/fp64/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/module/module.modulemap4
-rw-r--r--test/Driver/Inputs/module/simple.h1
-rw-r--r--test/Driver/Inputs/multilib_64bit_linux_tree/libx32/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/64/fp64/crtend.o)0
-rw-r--r--test/Driver/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/x32/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/64/fp64/nan2008/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/multilib_64bit_linux_tree/usr/libx32/gcc/x86_64-unknown-gnu/4.6.0/32/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/el/fp64/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/multilib_64bit_linux_tree/usr/libx32/gcc/x86_64-unknown-gnu/4.6.0/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/el/fp64/nan2008/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/multilib_64bit_linux_tree/usr/libx32/gcc/x86_64-unknown-gnu/4.6.0/x32/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/fp64/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/multilib_64bit_linux_tree/usr/x86_64-unknown-linux/libx32/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/64/fp64/nan2008/crtend.o)0
-rw-r--r--test/Driver/Inputs/resource_dir/lib/macho_embedded/libclang_rt.hard_pic.a (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/el/fp64/crtend.o)0
-rw-r--r--test/Driver/Inputs/resource_dir/lib/macho_embedded/libclang_rt.hard_static.a (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/el/fp64/nan2008/crtend.o)0
-rw-r--r--test/Driver/Inputs/resource_dir/lib/macho_embedded/libclang_rt.soft_pic.a (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/fp64/crtend.o)0
-rw-r--r--test/Driver/Inputs/resource_dir/lib/macho_embedded/libclang_rt.soft_static.a (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/fp64/nan2008/crtbegin.o)0
-rw-r--r--test/Driver/Inputs/ubuntu_14.04_multiarch_tree/lib/powerpc64le-linux-gnu/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/fp64/nan2008/crtend.o)0
-rwxr-xr-x[-rw-r--r--]test/Driver/Inputs/ubuntu_14.04_multiarch_tree/lib/x86_64-linux-gnu/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/fp64/usr/lib/crt1.o)0
-rw-r--r--test/Driver/Inputs/ubuntu_14.04_multiarch_tree/libx32/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/fp64/usr/lib/crtn.o)0
-rwxr-xr-x[-rw-r--r--]test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/include/c++/4.8/backward/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/el/fp64/nan2008/usr/lib/crt1.o)0
-rw-r--r--test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/include/powerpc64le-linux-gnu/c++/4.8/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/el/fp64/nan2008/usr/lib/crtn.o)0
-rwxr-xr-x[-rw-r--r--]test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/include/x86_64-linux-gnu/c++/4.8/32/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/el/fp64/usr/lib/crt1.o)0
-rw-r--r--test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/include/x86_64-linux-gnu/c++/4.8/x32/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/el/fp64/usr/lib/crtn.o)0
-rw-r--r--test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/gcc/powerpc64le-linux-gnu/4.8/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/fp64/nan2008/usr/lib/crt1.o)0
-rw-r--r--test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/gcc/powerpc64le-linux-gnu/4.8/crtend.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/fp64/nan2008/usr/lib/crtn.o)0
-rw-r--r--test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/gcc/powerpc64le-linux-gnu/4.9/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/fp64/usr/lib/crt1.o)0
-rwxr-xr-x[-rw-r--r--]test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/gcc/x86_64-linux-gnu/4.8/32/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/fp64/usr/lib/crtn.o)0
-rwxr-xr-x[-rw-r--r--]test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/gcc/x86_64-linux-gnu/4.8/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/el/fp64/nan2008/usr/lib/crt1.o)0
-rw-r--r--test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/gcc/x86_64-linux-gnu/4.8/x32/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/el/fp64/nan2008/usr/lib/crtn.o)0
-rw-r--r--test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/gcc/x86_64-linux-gnu/4.8/x32/crtend.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/el/fp64/usr/lib/crt1.o)0
-rw-r--r--test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/gcc/x86_64-linux-gnu/4.9/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/el/fp64/usr/lib/crti.o)0
-rw-r--r--test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/powerpc64le-linux-gnu/crt1.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/fp64/nan2008/usr/lib/crt1.o)0
-rw-r--r--test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/powerpc64le-linux-gnu/crti.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/fp64/nan2008/usr/lib/crti.o)0
-rw-r--r--test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/powerpc64le-linux-gnu/crtn.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/el/fp64/usr/lib/crtn.o)0
-rw-r--r--test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/x86_64-linux-gnu/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/fp64/nan2008/usr/lib/crtn.o)0
-rw-r--r--test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/libx32/crt1.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/fp64/usr/lib/crt1.o)0
-rw-r--r--test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/libx32/crti.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/fp64/usr/lib/crti.o)0
-rw-r--r--test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/libx32/crtn.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/fp64/usr/lib/crtn.o)0
-rw-r--r--test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/lib/i386-linux-gnu/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/el/fp64/nan2008/usr/lib/crt1.o)0
-rwxr-xr-x[-rw-r--r--]test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/lib/x86_64-linux-gnu/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/el/fp64/nan2008/usr/lib/crti.o)0
-rwxr-xr-x[-rw-r--r--]test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/usr/include/c++/4.8/backward/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/el/fp64/nan2008/usr/lib/crtn.o)0
-rw-r--r--test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/usr/include/i386-linux-gnu/c++/4.8/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/el/fp64/usr/lib/crt1.o)0
-rwxr-xr-x[-rw-r--r--]test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/usr/include/x86_64-linux-gnu/c++/4.8/32/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/el/fp64/usr/lib/crti.o)0
-rw-r--r--test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/usr/lib/gcc/i686-linux-gnu/4.8/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/el/fp64/usr/lib/crtn.o)0
-rwxr-xr-x[-rw-r--r--]test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/usr/lib/gcc/x86_64-linux-gnu/4.8/32/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/fp64/nan2008/usr/lib/crt1.o)0
-rwxr-xr-x[-rw-r--r--]test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/usr/lib/gcc/x86_64-linux-gnu/4.8/crtbegin.o (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/fp64/nan2008/usr/lib/crti.o)0
-rw-r--r--test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/usr/lib/i386-linux-gnu/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/fp64/nan2008/usr/lib/crtn.o)0
-rw-r--r--test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/usr/lib/x86_64-linux-gnu/.keep (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/fp64/usr/lib/crt1.o)0
-rw-r--r--test/Driver/Inputs/wildcard1.c (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/fp64/usr/lib/crti.o)0
-rw-r--r--test/Driver/Inputs/wildcard2.c (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/fp64/usr/lib/crtn.o)0
-rw-r--r--test/Driver/Xlinker-args.c8
-rw-r--r--test/Driver/aarch64-cpus.c81
-rw-r--r--test/Driver/aarch64-features.c1
-rw-r--r--test/Driver/aarch64-mfpu.c26
-rw-r--r--test/Driver/aarch64-mgeneral_regs_only.c9
-rw-r--r--test/Driver/altivec-asm.S1
-rw-r--r--test/Driver/android-standalone.cpp30
-rw-r--r--test/Driver/arm-alignment.c41
-rw-r--r--test/Driver/arm-arch-darwin.c6
-rw-r--r--test/Driver/arm-cortex-cpus.c256
-rw-r--r--test/Driver/arm-hwdiv.c5
-rw-r--r--test/Driver/arm-long-calls.c15
-rw-r--r--test/Driver/arm-mfpu.c35
-rw-r--r--test/Driver/arm64-as.s5
-rw-r--r--test/Driver/arm64-darwinpcs.c3
-rw-r--r--test/Driver/asan.c11
-rw-r--r--test/Driver/at_file_missing.c7
-rw-r--r--test/Driver/bindings.c4
-rw-r--r--test/Driver/bitrig.c12
-rw-r--r--test/Driver/bounds-checking.c11
-rw-r--r--test/Driver/cfi.c9
-rw-r--r--test/Driver/cl-eh.cpp24
-rw-r--r--test/Driver/cl-fallback.c40
-rw-r--r--test/Driver/cl-inputs.c17
-rw-r--r--test/Driver/cl-link.c5
-rw-r--r--test/Driver/cl-options.c116
-rw-r--r--test/Driver/cl-outputs.c12
-rw-r--r--test/Driver/cl-x86-flags.c83
-rw-r--r--test/Driver/cl.c1
-rw-r--r--test/Driver/clang-g-opts.c14
-rw-r--r--test/Driver/clang-translation.c63
-rw-r--r--test/Driver/clang_f_opts.c103
-rw-r--r--test/Driver/code-model.c13
-rw-r--r--test/Driver/compress.c8
-rw-r--r--test/Driver/constructors.c9
-rw-r--r--test/Driver/coverage-ld.c9
-rw-r--r--test/Driver/crash-report-modules.m32
-rw-r--r--test/Driver/crash-report.c3
-rw-r--r--test/Driver/cross-linux.c8
-rw-r--r--test/Driver/darwin-asan-nofortify.c3
-rw-r--r--test/Driver/darwin-dsymutil.c3
-rw-r--r--test/Driver/darwin-eabi.c12
-rw-r--r--test/Driver/darwin-embedded.c60
-rw-r--r--test/Driver/darwin-ld.c50
-rw-r--r--test/Driver/darwin-objc-defaults.m9
-rw-r--r--test/Driver/darwin-objc-options.m3
-rw-r--r--test/Driver/darwin-verify-debug.c10
-rw-r--r--test/Driver/debug-options.c56
-rw-r--r--test/Driver/dwarf2-cfi-asm.c35
-rw-r--r--test/Driver/dyld-prefix.c3
-rw-r--r--test/Driver/fast-math.c3
-rw-r--r--test/Driver/freebsd-mips-as.c28
-rw-r--r--test/Driver/freebsd.c39
-rw-r--r--test/Driver/fsanitize.c89
-rw-r--r--test/Driver/function-sections.c62
-rw-r--r--test/Driver/fuse-ld.c63
-rw-r--r--test/Driver/gcc_forward.c15
-rw-r--r--test/Driver/gold-lto.c5
-rw-r--r--test/Driver/hexagon-toolchain-elf.c40
-rw-r--r--test/Driver/hexagon-toolchain.c40
-rw-r--r--test/Driver/ident_md.c4
-rw-r--r--test/Driver/implicit-function-as-error.c9
-rw-r--r--test/Driver/instrprof-ld.c58
-rw-r--r--test/Driver/integrated-as.c11
-rw-r--r--test/Driver/integrated-as.s28
-rw-r--r--test/Driver/krait-cpu.c3
-rw-r--r--test/Driver/linker-opts.c5
-rw-r--r--test/Driver/linux-as.c26
-rw-r--r--test/Driver/linux-header-search.cpp119
-rw-r--r--test/Driver/linux-ld.c491
-rw-r--r--test/Driver/macho-embedded.c15
-rw-r--r--test/Driver/masm.c12
-rw-r--r--test/Driver/mips-abi.c101
-rw-r--r--test/Driver/mips-as.c196
-rw-r--r--test/Driver/mips-cs-header-search.cpp257
-rw-r--r--test/Driver/mips-cs-ld.c288
-rw-r--r--test/Driver/mips-cs.cpp504
-rw-r--r--test/Driver/mips-eleb.c12
-rw-r--r--test/Driver/mips-features.c34
-rw-r--r--test/Driver/mips-float.c18
-rw-r--r--test/Driver/mips-fsf.cpp1256
-rw-r--r--test/Driver/mips-img.cpp163
-rw-r--r--test/Driver/mips-integrated-as.s207
-rw-r--r--test/Driver/mips-reduced-toolchain.cpp28
-rw-r--r--test/Driver/mno-global-merge.c8
-rw-r--r--test/Driver/modules.m15
-rw-r--r--test/Driver/msc-version.c68
-rw-r--r--test/Driver/netbsd.c231
-rw-r--r--test/Driver/netbsd.cpp166
-rw-r--r--test/Driver/no-integrated-as.c19
-rw-r--r--test/Driver/nostdincxx.cpp4
-rw-r--r--test/Driver/nozlibcompress.c6
-rw-r--r--test/Driver/openbsd.c15
-rw-r--r--test/Driver/pch-deps.c10
-rw-r--r--test/Driver/pic.c24
-rw-r--r--test/Driver/ppc-features.cpp29
-rw-r--r--test/Driver/preprocess-multiple.c6
-rw-r--r--test/Driver/qa_override.c6
-rw-r--r--test/Driver/r600-mcpu.cl2
-rw-r--r--test/Driver/sanitize_unwind_tables.c11
-rw-r--r--test/Driver/sanitizer-ld.c98
-rw-r--r--test/Driver/sparc-float.c38
-rw-r--r--test/Driver/stack-protector.c20
-rw-r--r--test/Driver/std.cpp8
-rw-r--r--test/Driver/target-triple-deployment.c12
-rw-r--r--test/Driver/target.c6
-rw-r--r--test/Driver/unknown-gcc-arch.c40
-rw-r--r--test/Driver/verify_pch.m12
-rw-r--r--test/Driver/vfsoverlay.c5
-rw-r--r--test/Driver/via-file-asm.c10
-rw-r--r--test/Driver/visibility.cpp16
-rw-r--r--test/Driver/windows-arm-minimal-arch.c5
-rw-r--r--test/Driver/windows-wildcard-expansion.c7
-rw-r--r--test/Driver/woa-restrict-it.c4
-rw-r--r--test/Driver/x86_m16.c4
-rw-r--r--test/Driver/xcore-opts.c27
-rw-r--r--test/FixIt/fixit-cxx0x.cpp23
-rw-r--r--test/FixIt/fixit-include.h2
-rw-r--r--test/FixIt/fixit-multiple-selector-warnings.m26
-rw-r--r--test/FixIt/fixit-objc-arc.m24
-rw-r--r--test/FixIt/fixit-objc-bridge-related-attr.m35
-rw-r--r--test/FixIt/fixit-objc-bridge-related-property.m23
-rw-r--r--test/FixIt/fixit-objc-bridge-related.m43
-rw-r--r--test/FixIt/fixit-objc.m20
-rw-r--r--test/FixIt/fixit-unicode-with-utf8-output.c1
-rw-r--r--test/FixIt/fixit.cpp6
-rw-r--r--test/FixIt/format-darwin.m34
-rw-r--r--test/FixIt/format.m30
-rw-r--r--test/FixIt/lit.local.cfg2
-rw-r--r--test/FixIt/no-diagnostics-fixit-info.c16
-rw-r--r--test/FixIt/typo-location-bugs.cpp15
-rw-r--r--test/Format/disable-format.cpp6
-rw-r--r--test/Format/language-detection.cpp7
-rw-r--r--test/Format/style-on-command-line.cpp19
-rw-r--r--test/Frontend/Inputs/rewrite-includes-messages.h4
-rw-r--r--test/Frontend/backend-diagnostic.c31
-rw-r--r--test/Frontend/darwin-eabi.c2
-rw-r--r--test/Frontend/darwin-version.c2
-rw-r--r--test/Frontend/disable-output.c7
-rw-r--r--test/Frontend/exceptions.c6
-rw-r--r--test/Frontend/invalid-o-level.c2
-rw-r--r--test/Frontend/ir-support-codegen.ll10
-rw-r--r--test/Frontend/ir-support.c19
-rw-r--r--test/Frontend/lit.local.cfg2
-rw-r--r--test/Frontend/optimization-remark-line-directive.c12
-rw-r--r--test/Frontend/optimization-remark.c51
-rw-r--r--test/Frontend/plugins.c5
-rw-r--r--test/Frontend/print-header-includes.c8
-rw-r--r--test/Frontend/rewrite-includes-bom.c6
-rw-r--r--test/Frontend/rewrite-includes-cli-include.c9
-rw-r--r--test/Frontend/rewrite-includes-eof.c4
-rw-r--r--test/Frontend/rewrite-includes-messages.c7
-rw-r--r--test/Frontend/rewrite-includes-missing.c1
-rw-r--r--test/Frontend/rewrite-includes-modules.c2
-rw-r--r--test/Frontend/rewrite-includes.c11
-rw-r--r--test/Frontend/rewrite-macros.c2
-rw-r--r--test/Frontend/stdlang.c9
-rw-r--r--test/Frontend/system-header-prefix.c9
-rw-r--r--test/Frontend/verify.c11
-rw-r--r--test/Frontend/verify2.c21
-rw-r--r--test/Frontend/verify2.h4
-rw-r--r--test/Frontend/warning-options.cpp4
-rw-r--r--test/Frontend/windows-nul.c8
-rw-r--r--test/Headers/Inputs/include/setjmp.h8
-rw-r--r--test/Headers/altivec-header.c9
-rw-r--r--test/Headers/arm-acle-header.c9
-rw-r--r--test/Headers/c11.c12
-rw-r--r--test/Headers/cxx11.cpp2
-rw-r--r--test/Headers/ms-intrin.cpp26
-rw-r--r--test/Headers/ms-null-ms-header-vs-stddef.cpp2
-rw-r--r--test/Headers/stddefneeds.cpp69
-rw-r--r--test/Headers/xmmintrin.c13
-rw-r--r--test/Index/Inputs/CommentXML/valid-function-02.xml11
-rw-r--r--test/Index/Inputs/Frameworks/DocCommentsA.framework/Headers/DocCommentsA.h8
-rw-r--r--test/Index/Inputs/Frameworks/DocCommentsB.framework/Headers/DocCommentsB.h7
-rw-r--r--test/Index/Inputs/Frameworks/DocCommentsC.framework/Headers/DocCommentsC.h2
-rw-r--r--test/Index/Inputs/base_module_needs_vfs.h1
-rw-r--r--test/Index/Inputs/crash-recovery-code-complete-remap.c4
-rw-r--r--test/Index/Inputs/module.map6
-rw-r--r--test/Index/Inputs/module_needs_vfs.h4
-rw-r--r--test/Index/Inputs/retain-comments-from-system-headers-module.map4
-rw-r--r--test/Index/Inputs/usrs-system.h1
-rw-r--r--test/Index/Inputs/vfsoverlay.yaml18
-rw-r--r--test/Index/annotate-comments-objc.m74
-rw-r--r--test/Index/annotate-comments-typedef.m2
-rw-r--r--test/Index/annotate-deep-statements.cpp4
-rw-r--r--test/Index/annotate-module.m2
-rw-r--r--test/Index/annotate-tokens-cxx0x.cpp4
-rw-r--r--test/Index/annotate-tokens.cpp28
-rw-r--r--test/Index/attributes-cuda.cu15
-rw-r--r--test/Index/attributes.c10
-rw-r--r--test/Index/comment-cplus-decls.cpp2
-rw-r--r--test/Index/comment-cplus-template-decls.cpp17
-rw-r--r--test/Index/comment-to-html-xml-conversion.cpp196
-rw-r--r--test/Index/comment-xml-schema.c1
-rw-r--r--test/Index/complete-macros.c23
-rw-r--r--test/Index/complete-macros.h6
-rw-r--r--test/Index/complete-method-decls.m19
-rw-r--r--test/Index/complete-property-flags.m12
-rw-r--r--test/Index/complete-recovery.m2
-rw-r--r--test/Index/crash-recovery-code-complete.c4
-rw-r--r--test/Index/crash-recovery-reparse.c2
-rw-r--r--test/Index/crash-recovery.c1
-rw-r--r--test/Index/cxx11-lambdas.cpp4
-rw-r--r--test/Index/fix-its.m2
-rw-r--r--test/Index/index-module-with-vfs.m26
-rw-r--r--test/Index/index-module.m14
-rw-r--r--test/Index/index-pch-objc.m10
-rw-r--r--test/Index/index-refs.cpp2
-rw-r--r--test/Index/index-templates.cpp2
-rw-r--r--test/Index/load-classes.cpp32
-rw-r--r--test/Index/load-decls.c7
-rw-r--r--test/Index/load-namespaces.cpp2
-rw-r--r--test/Index/local-symbols.m7
-rw-r--r--test/Index/pch-depending-on-deleted-module.c14
-rw-r--r--test/Index/preamble-reparse-cmd-define.c2
-rw-r--r--test/Index/preamble-reparse-warn-end-of-file.c11
-rw-r--r--test/Index/preamble-reparse-warn-macro.c12
-rw-r--r--test/Index/preamble-reparse.c2
-rw-r--r--test/Index/preamble.c16
-rw-r--r--test/Index/print-type-cxx11.cpp4
-rw-r--r--test/Index/print-type.c16
-rw-r--r--test/Index/print-type.cpp99
-rw-r--r--test/Index/print-type.m2
-rw-r--r--test/Index/recursive-cxx-member-calls.cpp200
-rw-r--r--test/Index/remap-complete.c2
-rw-r--r--test/Index/remap-cursor-at.c2
-rw-r--r--test/Index/remap-load.c2
-rw-r--r--test/Index/reparse-with-remaps/reparse.c8
-rw-r--r--test/Index/reparse-with-remaps/test.h3
-rw-r--r--test/Index/reparse-with-remaps/test.h-06
-rw-r--r--test/Index/reparse-with-remaps/test.h-16
-rw-r--r--test/Index/retain-comments-from-system-headers.c6
-rw-r--r--test/Index/skipped-ranges.c25
-rw-r--r--test/Index/usrs.cpp14
-rw-r--r--test/Index/usrs.m51
-rw-r--r--test/Integration/carbon.c (renamed from test/Sema/carbon.c)0
-rw-r--r--test/Integration/cocoa-pch.m (renamed from test/PCH/cocoa.m)0
-rw-r--r--test/Integration/cocoa.m5
-rw-r--r--test/Layout/ms-x86-alias-avoidance-padding.cpp599
-rw-r--r--test/Layout/ms-x86-aligned-tail-padding.cpp640
-rw-r--r--test/Layout/ms-x86-basic-layout.cpp1174
-rw-r--r--test/Layout/ms-x86-bitfields-vbases.cpp160
-rw-r--r--test/Layout/ms-x86-empty-base-after-base-with-vbptr.cpp336
-rw-r--r--test/Layout/ms-x86-empty-nonvirtual-bases.cpp180
-rw-r--r--test/Layout/ms-x86-empty-virtual-base.cpp1079
-rw-r--r--test/Layout/ms-x86-lazy-empty-nonvirtual-base.cpp1154
-rw-r--r--test/Layout/ms-x86-member-pointers.cpp80
-rw-r--r--test/Layout/ms-x86-misalignedarray.cpp38
-rw-r--r--test/Layout/ms-x86-pack-and-align.cpp683
-rw-r--r--test/Layout/ms-x86-primary-bases.cpp454
-rw-r--r--test/Layout/ms-x86-size-alignment-fail.cpp160
-rw-r--r--test/Layout/ms-x86-vfvb-alignment.cpp580
-rw-r--r--test/Layout/ms-x86-vfvb-sharing.cpp186
-rw-r--r--test/Layout/ms-x86-vtordisp.cpp473
-rw-r--r--test/Lexer/Inputs/success.h1
-rw-r--r--test/Lexer/bcpl-escaped-newline.c1
-rw-r--r--test/Lexer/clang-keywords.cpp4
-rw-r--r--test/Lexer/cross-windows-on-linux-default.cpp6
-rw-r--r--test/Lexer/cross-windows-on-linux.cpp15
-rw-r--r--test/Lexer/cxx0x_keyword.cpp2
-rw-r--r--test/Lexer/cxx1y_digit_separators.cpp36
-rw-r--r--test/Lexer/cxx1z-trigraphs.cpp9
-rw-r--r--test/Lexer/gnu_keywords.c13
-rw-r--r--test/Lexer/has_feature_cxx0x.cpp20
-rw-r--r--test/Lexer/has_feature_exceptions.cpp8
-rw-r--r--test/Lexer/has_feature_type_traits.cpp5
-rw-r--r--test/Lexer/hexfloat.cpp2
-rw-r--r--test/Lexer/keywords_test.c29
-rw-r--r--test/Lexer/keywords_test.cpp34
-rw-r--r--test/Lexer/ms-extensions.c8
-rw-r--r--test/Lexer/warn-date-time.c23
-rw-r--r--test/Makefile4
-rw-r--r--test/Misc/Inputs/serialized-diags-stable.diabin0 -> 580 bytes
-rw-r--r--test/Misc/ast-dump-arm-attr.c5
-rw-r--r--test/Misc/ast-dump-attr.cpp50
-rw-r--r--test/Misc/ast-dump-color.cpp64
-rw-r--r--test/Misc/ast-dump-comment.cpp8
-rw-r--r--test/Misc/ast-dump-decl.c4
-rw-r--r--test/Misc/ast-dump-decl.cpp43
-rw-r--r--test/Misc/ast-dump-msp430-attr.c5
-rw-r--r--test/Misc/ast-print-pragmas-xfail.cpp21
-rw-r--r--test/Misc/ast-print-pragmas.cpp40
-rw-r--r--test/Misc/backend-optimization-failure.cpp21
-rw-r--r--test/Misc/backend-stack-frame-diagnostics-fallback.cpp18
-rw-r--r--test/Misc/backend-stack-frame-diagnostics.cpp85
-rw-r--r--test/Misc/diag-format.c22
-rw-r--r--test/Misc/diag-mapping2.c11
-rw-r--r--test/Misc/diag-template-diffing.cpp191
-rw-r--r--test/Misc/driver-verify.c6
-rw-r--r--test/Misc/error-limit-multiple-notes.cpp16
-rw-r--r--test/Misc/interpreter.c10
-rw-r--r--test/Misc/languageOptsOpenCL.cl26
-rw-r--r--test/Misc/serialized-diags-stable.c20
-rw-r--r--test/Misc/verify.c10
-rw-r--r--test/Misc/warn-sysheader.cpp33
-rw-r--r--test/Misc/warning-flags.c45
-rw-r--r--test/Misc/win32-macho.c2
-rw-r--r--test/Modules/Inputs/ModuleMapLocations/Both/a.h (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/el/fp64/nan2008/usr/lib/crt1.o)0
-rw-r--r--test/Modules/Inputs/ModuleMapLocations/Both/b.h1
-rw-r--r--test/Modules/Inputs/ModuleMapLocations/Both/module.map3
-rw-r--r--test/Modules/Inputs/ModuleMapLocations/Both/module.modulemap3
-rw-r--r--test/Modules/Inputs/ModuleMapLocations/Both_F.framework/Headers/a.h1
-rw-r--r--test/Modules/Inputs/ModuleMapLocations/Both_F.framework/Headers/b.h1
-rw-r--r--test/Modules/Inputs/ModuleMapLocations/Both_F.framework/Modules/module.modulemap3
-rw-r--r--test/Modules/Inputs/ModuleMapLocations/Both_F.framework/module.map3
-rw-r--r--test/Modules/Inputs/ModuleMapLocations/Inferred.framework/Headers/Inferred.h (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/el/fp64/nan2008/usr/lib/crti.o)0
-rw-r--r--test/Modules/Inputs/ModuleMapLocations/Module_ModuleMap/a.h1
-rw-r--r--test/Modules/Inputs/ModuleMapLocations/Module_ModuleMap/module.modulemap3
-rw-r--r--test/Modules/Inputs/ModuleMapLocations/Module_ModuleMap_F.framework/Headers/a.h (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/el/fp64/nan2008/usr/lib/crtn.o)0
-rw-r--r--test/Modules/Inputs/ModuleMapLocations/Module_ModuleMap_F.framework/Modules/module.modulemap3
-rw-r--r--test/Modules/Inputs/ModuleMapLocations/Module_ModuleMap_F.framework/Modules/module.private.modulemap3
-rw-r--r--test/Modules/Inputs/ModuleMapLocations/Module_ModuleMap_F.framework/PrivateHeaders/private.h (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/el/fp64/usr/lib/crt1.o)0
-rw-r--r--test/Modules/Inputs/ModuleMapLocations/module.modulemap2
-rw-r--r--test/Modules/Inputs/autolink-sub3.h1
-rw-r--r--test/Modules/Inputs/autolink-sub3.pch1
-rw-r--r--test/Modules/Inputs/c-header-bad.h4
-rw-r--r--test/Modules/Inputs/c-header.h1
-rw-r--r--test/Modules/Inputs/cxx-decls-imported.h20
-rw-r--r--test/Modules/Inputs/cxx-decls-merged.h1
-rw-r--r--test/Modules/Inputs/cxx-header.h1
-rw-r--r--test/Modules/Inputs/cxx-inline-namespace-b.h5
-rw-r--r--test/Modules/Inputs/cxx-inline-namespace.h6
-rw-r--r--test/Modules/Inputs/cxx-irgen-left.h11
-rw-r--r--test/Modules/Inputs/cxx-irgen-right.h3
-rw-r--r--test/Modules/Inputs/cxx-irgen-top.h16
-rw-r--r--test/Modules/Inputs/cxx-templates-a.h25
-rw-r--r--test/Modules/Inputs/cxx-templates-b-impl.h7
-rw-r--r--test/Modules/Inputs/cxx-templates-b.h5
-rw-r--r--test/Modules/Inputs/cxx-templates-c.h6
-rw-r--r--test/Modules/Inputs/cxx-templates-common.h27
-rw-r--r--test/Modules/Inputs/declare-use/e.h3
-rw-r--r--test/Modules/Inputs/declare-use/h.h2
-rw-r--r--test/Modules/Inputs/declare-use/i.h1
-rw-r--r--test/Modules/Inputs/declare-use/j.h14
-rw-r--r--test/Modules/Inputs/declare-use/module.map13
-rw-r--r--test/Modules/Inputs/declare-use/s.h (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/el/fp64/usr/lib/crti.o)0
-rw-r--r--test/Modules/Inputs/elsewhere/c-header-indirect.h1
-rw-r--r--test/Modules/Inputs/elsewhere/module.map1
-rw-r--r--test/Modules/Inputs/exclude-header/module.map3
-rw-r--r--test/Modules/Inputs/exclude-header/x/a.h1
-rw-r--r--test/Modules/Inputs/exclude-header/x/bad.h1
-rw-r--r--test/Modules/Inputs/exclude-header/y/b.h1
-rw-r--r--test/Modules/Inputs/include-relative/a.h1
-rw-r--r--test/Modules/Inputs/include-relative/module.map1
-rw-r--r--test/Modules/Inputs/macro-hiding/a1.h1
-rw-r--r--test/Modules/Inputs/macro-hiding/a2.h (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/el/fp64/usr/lib/crtn.o)0
-rw-r--r--test/Modules/Inputs/macro-hiding/b1.h (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/fp64/nan2008/usr/lib/crt1.o)0
-rw-r--r--test/Modules/Inputs/macro-hiding/b2.h2
-rw-r--r--test/Modules/Inputs/macro-hiding/c1.h2
-rw-r--r--test/Modules/Inputs/macro-hiding/d1.h2
-rw-r--r--test/Modules/Inputs/macro-hiding/e1.h1
-rw-r--r--test/Modules/Inputs/macro-hiding/e2.h2
-rw-r--r--test/Modules/Inputs/macro-hiding/module.modulemap18
-rw-r--r--test/Modules/Inputs/macro-undef-through-pch/A.h2
-rw-r--r--test/Modules/Inputs/macro-undef-through-pch/foo.h1
-rw-r--r--test/Modules/Inputs/macro-undef-through-pch/module.map3
-rw-r--r--test/Modules/Inputs/macros_other.h7
-rw-r--r--test/Modules/Inputs/macros_right.h2
-rw-r--r--test/Modules/Inputs/macros_right_undef.h3
-rw-r--r--test/Modules/Inputs/macros_top.h8
-rw-r--r--test/Modules/Inputs/macros_top_b.h5
-rw-r--r--test/Modules/Inputs/macros_top_c.h2
-rw-r--r--test/Modules/Inputs/malformed/a1.h1
-rw-r--r--test/Modules/Inputs/malformed/a2.h1
-rw-r--r--test/Modules/Inputs/malformed/b1.h3
-rw-r--r--test/Modules/Inputs/malformed/b2.h1
-rw-r--r--test/Modules/Inputs/malformed/module.map8
-rw-r--r--test/Modules/Inputs/module.map31
-rw-r--r--test/Modules/Inputs/modules-with-same-name/DependsOnA/DependsOnA.h1
-rw-r--r--test/Modules/Inputs/modules-with-same-name/DependsOnA/module.modulemap4
-rw-r--r--test/Modules/Inputs/modules-with-same-name/path1/A/a.h1
-rw-r--r--test/Modules/Inputs/modules-with-same-name/path1/A/module.modulemap5
-rw-r--r--test/Modules/Inputs/modules-with-same-name/path2/A/a.h1
-rw-r--r--test/Modules/Inputs/modules-with-same-name/path2/A/module.modulemap5
-rw-r--r--test/Modules/Inputs/namespaces-left.h13
-rw-r--r--test/Modules/Inputs/namespaces-top.h4
-rw-r--r--test/Modules/Inputs/recursive1.h1
-rw-r--r--test/Modules/Inputs/recursive2.h1
-rw-r--r--test/Modules/Inputs/redecl-add-after-load-decls.h24
-rw-r--r--test/Modules/Inputs/redecl-add-after-load-top.h5
-rw-r--r--test/Modules/Inputs/redecl-add-after-load.h23
-rw-r--r--test/Modules/Inputs/require-modular-includes/A.framework/Headers/A.h1
-rw-r--r--test/Modules/Inputs/require-modular-includes/AnotherModule.h1
-rw-r--r--test/Modules/Inputs/require-modular-includes/AnotherModuleExcluded.h1
-rw-r--r--test/Modules/Inputs/require-modular-includes/B.framework/Headers/B.h1
-rw-r--r--test/Modules/Inputs/require-modular-includes/C.h1
-rw-r--r--test/Modules/Inputs/require-modular-includes/ExcludedFromAnotherModule.framework/Headers/ExcludedFromAnotherModule.h1
-rw-r--r--test/Modules/Inputs/require-modular-includes/FromAnotherModule.framework/Headers/FromAnotherModule.h1
-rw-r--r--test/Modules/Inputs/require-modular-includes/FromImportedModuleFail.framework/Headers/FromImportedModuleFail.h2
-rw-r--r--test/Modules/Inputs/require-modular-includes/FromImportedModuleOK.framework/Headers/FromImportedModuleOK.h1
-rw-r--r--test/Modules/Inputs/require-modular-includes/FromImportedModuleOK.framework/Headers/FromImportedModuleOK2.h1
-rw-r--r--test/Modules/Inputs/require-modular-includes/FromImportedModuleOK.framework/Modules/module.modulemap4
-rw-r--r--test/Modules/Inputs/require-modular-includes/FromImportedSubModule.framework/Headers/Header.h2
-rw-r--r--test/Modules/Inputs/require-modular-includes/FromImportedSubModule.framework/Modules/module.modulemap5
-rw-r--r--test/Modules/Inputs/require-modular-includes/FromNonModularSubframework.framework/Frameworks/Subframework.framework/Headers/Subframework.h (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/fp64/nan2008/usr/lib/crti.o)0
-rw-r--r--test/Modules/Inputs/require-modular-includes/FromNonModularSubframework.framework/Headers/FromNonModularSubframework.h1
-rw-r--r--test/Modules/Inputs/require-modular-includes/FromNonModularSubframework.framework/Modules/module.modulemap3
-rw-r--r--test/Modules/Inputs/require-modular-includes/FromSubframework.framework/Frameworks/Subframework.framework/Headers/Subframework.h1
-rw-r--r--test/Modules/Inputs/require-modular-includes/FromSubframework.framework/Headers/FromSubframework.h1
-rw-r--r--test/Modules/Inputs/require-modular-includes/FromSubframework.framework/Modules/module.modulemap7
-rw-r--r--test/Modules/Inputs/require-modular-includes/FromUmbrella.framework/Headers/FromUmbrella.h2
-rw-r--r--test/Modules/Inputs/require-modular-includes/IncludeExcluded.framework/Headers/Excluded.h1
-rw-r--r--test/Modules/Inputs/require-modular-includes/IncludeExcluded.framework/Headers/IncludeExcluded.h1
-rw-r--r--test/Modules/Inputs/require-modular-includes/IncludeExcluded.framework/Modules/module.modulemap4
-rw-r--r--test/Modules/Inputs/require-modular-includes/NotFramework.h2
-rw-r--r--test/Modules/Inputs/require-modular-includes/NotInModule.h1
-rw-r--r--test/Modules/Inputs/require-modular-includes/module.modulemap12
-rw-r--r--test/Modules/Inputs/require-modular-includes/umbrella/bar/bar.h1
-rw-r--r--test/Modules/Inputs/require-modular-includes/umbrella/foo.h1
-rw-r--r--test/Modules/Inputs/string_names/a.h4
-rw-r--r--test/Modules/Inputs/string_names/b.h4
-rw-r--r--test/Modules/Inputs/string_names/c.h4
-rw-r--r--test/Modules/Inputs/string_names/module.map16
-rw-r--r--test/Modules/Inputs/string_names/sub.h4
-rw-r--r--test/Modules/Inputs/submodules/import-self-b.h4
-rw-r--r--test/Modules/Inputs/submodules/module.map20
-rw-r--r--test/Modules/Inputs/submodules/not_missing.h2
-rw-r--r--test/Modules/Inputs/template-specialization-visibility/a.h8
-rw-r--r--test/Modules/Inputs/template-specialization-visibility/b.h7
-rw-r--r--test/Modules/Inputs/template-specialization-visibility/c.h6
-rw-r--r--test/Modules/Inputs/template-specialization-visibility/d.h5
-rw-r--r--test/Modules/Inputs/template-specialization-visibility/e.h6
-rw-r--r--test/Modules/Inputs/template-specialization-visibility/module.map7
-rw-r--r--test/Modules/Inputs/templates-left.h27
-rw-r--r--test/Modules/Inputs/templates-right.h12
-rw-r--r--test/Modules/Inputs/templates-top.h17
-rw-r--r--test/Modules/Inputs/undefined-type-fixit/module.map9
-rw-r--r--test/Modules/Inputs/undefined-type-fixit/public1.h6
-rw-r--r--test/Modules/Inputs/undefined-type-fixit/public2.h6
-rw-r--r--test/Modules/Inputs/undefined-type-fixit/public2sub.h6
-rw-r--r--test/Modules/Inputs/unnecessary-module-map-parsing/a1.h1
-rw-r--r--test/Modules/Inputs/unnecessary-module-map-parsing/module.map3
-rw-r--r--test/Modules/Inputs/update-after-load/a.h1
-rw-r--r--test/Modules/Inputs/update-after-load/b.h2
-rw-r--r--test/Modules/Inputs/update-after-load/module.map1
-rw-r--r--test/Modules/Inputs/update-after-load/modules.timestamp (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/fp64/nan2008/usr/lib/crtn.o)0
-rw-r--r--test/Modules/Rmodule-build.m34
-rw-r--r--test/Modules/Werror-Wsystem-headers.m23
-rw-r--r--test/Modules/Werror.m75
-rw-r--r--test/Modules/auto-module-import.m6
-rw-r--r--test/Modules/autolink.m16
-rw-r--r--test/Modules/compiler_builtins_arm.m1
-rw-r--r--test/Modules/config_macros.m2
-rw-r--r--test/Modules/cxx-decls.cpp15
-rw-r--r--test/Modules/cxx-inline-namespace.cpp3
-rw-r--r--test/Modules/cxx-irgen.cpp22
-rw-r--r--test/Modules/cxx-templates.cpp54
-rw-r--r--test/Modules/declare-use.S5
-rw-r--r--test/Modules/declare-use1.cpp7
-rw-r--r--test/Modules/declare-use2.cpp4
-rw-r--r--test/Modules/declare-use3.cpp4
-rw-r--r--test/Modules/declare-use4.cpp10
-rw-r--r--test/Modules/decldef.mm43
-rw-r--r--test/Modules/dependency-dump-dependent-module.m22
-rw-r--r--test/Modules/dependency-dump.m15
-rw-r--r--test/Modules/dependency-gen-inferred-map.m8
-rw-r--r--test/Modules/dependency-gen-pch.m12
-rw-r--r--test/Modules/dependency-gen.m22
-rw-r--r--test/Modules/diag-pragma.c2
-rw-r--r--test/Modules/diamond-pch.c4
-rw-r--r--test/Modules/diamond.c2
-rw-r--r--test/Modules/exclude-header.c11
-rw-r--r--test/Modules/extern_c.cpp81
-rw-r--r--test/Modules/extern_c_bad.cpp2
-rw-r--r--test/Modules/fatal-module-loader-error.m2
-rw-r--r--test/Modules/fmodules-validate-once-per-build-session.c45
-rw-r--r--test/Modules/import-self.m11
-rw-r--r--test/Modules/include-relative.c12
-rw-r--r--test/Modules/inferred-framework-case.m7
-rw-r--r--test/Modules/irgen.c2
-rw-r--r--test/Modules/linkage-merge.cpp5
-rw-r--r--test/Modules/linkage-merge.m2
-rw-r--r--test/Modules/load-after-failure.m25
-rw-r--r--test/Modules/load_failure.c4
-rw-r--r--test/Modules/lookup.cpp4
-rw-r--r--test/Modules/lookup.m4
-rw-r--r--test/Modules/macro-hiding.cpp104
-rw-r--r--test/Modules/macro-reexport/a1.h1
-rw-r--r--test/Modules/macro-reexport/a2.h (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/fp64/usr/lib/crt1.o)0
-rw-r--r--test/Modules/macro-reexport/b1.h (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/fp64/usr/lib/crti.o)0
-rw-r--r--test/Modules/macro-reexport/b2.h2
-rw-r--r--test/Modules/macro-reexport/c1.h2
-rw-r--r--test/Modules/macro-reexport/d1.h2
-rw-r--r--test/Modules/macro-reexport/d2.h1
-rw-r--r--test/Modules/macro-reexport/macro-reexport.cpp13
-rw-r--r--test/Modules/macro-reexport/module.modulemap15
-rw-r--r--test/Modules/macro-undef-through-pch.m10
-rw-r--r--test/Modules/macros.c43
-rw-r--r--test/Modules/macros2.c83
-rw-r--r--test/Modules/malformed.cpp23
-rw-r--r--test/Modules/missing-header.m13
-rw-r--r--test/Modules/missing-submodule.m7
-rw-r--r--test/Modules/module-private.cpp2
-rw-r--r--test/Modules/module_file_info.m12
-rw-r--r--test/Modules/modulemap-locations.m18
-rw-r--r--test/Modules/modules-with-same-name.m35
-rw-r--r--test/Modules/namespaces.cpp7
-rw-r--r--test/Modules/no-stale-modtime.m37
-rw-r--r--test/Modules/objc-categories.m2
-rw-r--r--test/Modules/objc_redef.m2
-rw-r--r--test/Modules/prune.m20
-rw-r--r--test/Modules/recursive.c11
-rw-r--r--test/Modules/redecl-add-after-load.cpp59
-rw-r--r--test/Modules/redecl-namespaces.mm2
-rw-r--r--test/Modules/redeclarations.m2
-rw-r--r--test/Modules/redecls/main.m6
-rw-r--r--test/Modules/renamed.m2
-rw-r--r--test/Modules/require-modular-includes.m83
-rw-r--r--test/Modules/resolution-change.m27
-rw-r--r--test/Modules/strict-decluse.cpp9
-rw-r--r--test/Modules/string_names.cpp6
-rw-r--r--test/Modules/subframework-from-intermediate-path.m5
-rw-r--r--test/Modules/submodules.cpp8
-rw-r--r--test/Modules/system_version.m6
-rw-r--r--test/Modules/template-specialization-visibility.cpp26
-rw-r--r--test/Modules/templates.mm37
-rw-r--r--test/Modules/undefined-type-fixit1.cpp12
-rw-r--r--test/Modules/unnecessary-module-map-parsing.c8
-rw-r--r--test/Modules/update-after-load.cpp8
-rw-r--r--test/Modules/validate-system-headers.m43
-rw-r--r--test/OpenMP/barrier_ast_print.cpp32
-rw-r--r--test/OpenMP/barrier_messages.cpp110
-rw-r--r--test/OpenMP/critical_ast_print.cpp29
-rw-r--r--test/OpenMP/critical_messages.cpp72
-rw-r--r--test/OpenMP/flush_ast_print.cpp38
-rw-r--r--test/OpenMP/flush_messages.cpp134
-rw-r--r--test/OpenMP/for_ast_print.cpp64
-rw-r--r--test/OpenMP/for_collapse_messages.cpp83
-rw-r--r--test/OpenMP/for_firstprivate_messages.cpp293
-rw-r--r--test/OpenMP/for_lastprivate_messages.cpp266
-rw-r--r--test/OpenMP/for_loop_messages.cpp694
-rw-r--r--test/OpenMP/for_misc_messages.c363
-rw-r--r--test/OpenMP/for_private_messages.cpp173
-rw-r--r--test/OpenMP/for_reduction_messages.cpp350
-rw-r--r--test/OpenMP/for_schedule_messages.cpp91
-rw-r--r--test/OpenMP/linking.c57
-rw-r--r--test/OpenMP/master_ast_print.cpp32
-rw-r--r--test/OpenMP/master_messages.cpp64
-rw-r--r--test/OpenMP/nesting_of_regions.cpp2278
-rw-r--r--test/OpenMP/no_option.c2
-rw-r--r--test/OpenMP/no_option_no_warn.c2
-rw-r--r--test/OpenMP/openmp_common.c2
-rw-r--r--test/OpenMP/parallel_ast_print.cpp72
-rw-r--r--test/OpenMP/parallel_codegen.cpp145
-rw-r--r--test/OpenMP/parallel_copyin_messages.cpp67
-rw-r--r--test/OpenMP/parallel_default_messages.cpp2
-rw-r--r--test/OpenMP/parallel_firstprivate_messages.cpp2
-rw-r--r--test/OpenMP/parallel_for_ast_print.cpp64
-rw-r--r--test/OpenMP/parallel_for_collapse_messages.cpp83
-rw-r--r--test/OpenMP/parallel_for_copyin_messages.cpp93
-rw-r--r--test/OpenMP/parallel_for_default_messages.cpp36
-rw-r--r--test/OpenMP/parallel_for_firstprivate_messages.cpp252
-rw-r--r--test/OpenMP/parallel_for_if_messages.cpp69
-rw-r--r--test/OpenMP/parallel_for_lastprivate_messages.cpp226
-rw-r--r--test/OpenMP/parallel_for_loop_messages.cpp593
-rw-r--r--test/OpenMP/parallel_for_messages.cpp86
-rw-r--r--test/OpenMP/parallel_for_misc_messages.c309
-rw-r--r--test/OpenMP/parallel_for_num_threads_messages.cpp65
-rw-r--r--test/OpenMP/parallel_for_private_messages.cpp173
-rw-r--r--test/OpenMP/parallel_for_proc_bind_messages.cpp35
-rw-r--r--test/OpenMP/parallel_for_reduction_messages.cpp295
-rw-r--r--test/OpenMP/parallel_for_schedule_messages.cpp91
-rw-r--r--test/OpenMP/parallel_if_messages.cpp46
-rw-r--r--test/OpenMP/parallel_messages.cpp17
-rw-r--r--test/OpenMP/parallel_num_threads_messages.cpp44
-rw-r--r--test/OpenMP/parallel_private_messages.cpp14
-rw-r--r--test/OpenMP/parallel_proc_bind_messages.cpp21
-rw-r--r--test/OpenMP/parallel_reduction_messages.cpp240
-rw-r--r--test/OpenMP/parallel_sections_ast_print.cpp144
-rw-r--r--test/OpenMP/parallel_sections_copyin_messages.cpp105
-rw-r--r--test/OpenMP/parallel_sections_default_messages.cpp39
-rw-r--r--test/OpenMP/parallel_sections_firstprivate_messages.cpp295
-rw-r--r--test/OpenMP/parallel_sections_if_messages.cpp113
-rw-r--r--test/OpenMP/parallel_sections_lastprivate_messages.cpp269
-rw-r--r--test/OpenMP/parallel_sections_messages.cpp85
-rw-r--r--test/OpenMP/parallel_sections_misc_messages.c260
-rw-r--r--test/OpenMP/parallel_sections_num_threads_messages.cpp63
-rw-r--r--test/OpenMP/parallel_sections_private_messages.cpp204
-rw-r--r--test/OpenMP/parallel_sections_proc_bind_messages.cpp28
-rw-r--r--test/OpenMP/parallel_sections_reduction_messages.cpp358
-rw-r--r--test/OpenMP/parallel_sections_shared_messages.cpp110
-rw-r--r--test/OpenMP/parallel_shared_messages.cpp2
-rw-r--r--test/OpenMP/predefined_macro.c16
-rw-r--r--test/OpenMP/sections_ast_print.cpp52
-rw-r--r--test/OpenMP/sections_firstprivate_messages.cpp335
-rw-r--r--test/OpenMP/sections_lastprivate_messages.cpp309
-rw-r--r--test/OpenMP/sections_misc_messages.c299
-rw-r--r--test/OpenMP/sections_private_messages.cpp204
-rw-r--r--test/OpenMP/sections_reduction_messages.cpp413
-rw-r--r--test/OpenMP/simd_aligned_messages.cpp201
-rw-r--r--test/OpenMP/simd_ast_print.cpp126
-rw-r--r--test/OpenMP/simd_collapse_messages.cpp83
-rw-r--r--test/OpenMP/simd_lastprivate_messages.cpp208
-rw-r--r--test/OpenMP/simd_linear_messages.cpp206
-rw-r--r--test/OpenMP/simd_loop_messages.cpp579
-rw-r--r--test/OpenMP/simd_metadata.c51
-rw-r--r--test/OpenMP/simd_misc_messages.c555
-rw-r--r--test/OpenMP/simd_private_messages.cpp134
-rw-r--r--test/OpenMP/simd_reduction_messages.cpp298
-rw-r--r--test/OpenMP/simd_safelen_messages.cpp79
-rw-r--r--test/OpenMP/single_ast_print.cpp38
-rw-r--r--test/OpenMP/single_copyprivate_messages.cpp157
-rw-r--r--test/OpenMP/single_firstprivate_messages.cpp239
-rw-r--r--test/OpenMP/single_misc_messages.c156
-rw-r--r--test/OpenMP/single_private_messages.cpp140
-rw-r--r--test/OpenMP/task_ast_print.cpp96
-rw-r--r--test/OpenMP/task_default_messages.cpp21
-rw-r--r--test/OpenMP/task_final_messages.cpp46
-rw-r--r--test/OpenMP/task_firstprivate_messages.cpp86
-rw-r--r--test/OpenMP/task_if_messages.cpp46
-rw-r--r--test/OpenMP/task_messages.cpp275
-rw-r--r--test/OpenMP/task_private_messages.cpp85
-rw-r--r--test/OpenMP/task_shared_messages.cpp102
-rw-r--r--test/OpenMP/taskwait_ast_print.cpp32
-rw-r--r--test/OpenMP/taskwait_messages.cpp110
-rw-r--r--test/OpenMP/taskyield_ast_print.cpp32
-rw-r--r--test/OpenMP/taskyield_messages.cpp110
-rw-r--r--test/OpenMP/threadprivate_ast_print.cpp15
-rw-r--r--test/OpenMP/threadprivate_messages.cpp31
-rw-r--r--test/PCH/Inputs/chain-selectors2.h2
-rw-r--r--test/PCH/Inputs/cuda.h20
-rw-r--r--test/PCH/chain-pending-instantiations.cpp2
-rw-r--r--test/PCH/chain-selectors.m6
-rw-r--r--test/PCH/cuda-kernel-call.cu2
-rw-r--r--test/PCH/cxx-key-functions.cpp97
-rw-r--r--test/PCH/cxx-mangling.cpp28
-rw-r--r--test/PCH/cxx-reference.cpp6
-rw-r--r--test/PCH/cxx-required-decls.cpp6
-rw-r--r--test/PCH/cxx-templates.cpp26
-rw-r--r--test/PCH/cxx-templates.h47
-rw-r--r--test/PCH/cxx-traits.h4
-rw-r--r--test/PCH/cxx11-exception-spec.cpp47
-rw-r--r--test/PCH/cxx11-inheriting-ctors.cpp39
-rw-r--r--test/PCH/different-diagnostic-level.c17
-rw-r--r--test/PCH/different-linker-version.c17
-rw-r--r--test/PCH/field-designator.c6
-rw-r--r--test/PCH/irgen-rdar13114142.mm4
-rw-r--r--test/PCH/local_static.cpp20
-rw-r--r--test/PCH/local_static.h7
-rw-r--r--test/PCH/macro-undef.cpp36
-rw-r--r--test/PCH/modified-module-dependency.m20
-rw-r--r--test/PCH/modified-module-dependency.module.map4
-rw-r--r--test/PCH/objc_container.m4
-rw-r--r--test/PCH/objc_literals.mm8
-rw-r--r--test/PCH/objcxx-ivar-class.mm8
-rw-r--r--test/PCH/pr18806.cpp31
-rw-r--r--test/PCH/pr4489.c6
-rw-r--r--test/PCH/pragma-loop.cpp90
-rw-r--r--test/PCH/pragma-optimize.c27
-rw-r--r--test/PCH/single-token-macro.c5
-rw-r--r--test/PCH/stmt-attrs.cpp24
-rw-r--r--test/PCH/thread-safety-attrs.cpp32
-rw-r--r--test/PCH/verify_pch.m30
-rw-r--r--test/Parser/DelayedTemplateParsing.cpp60
-rw-r--r--test/Parser/MicrosoftExtensions.c119
-rw-r--r--test/Parser/MicrosoftExtensions.cpp156
-rw-r--r--test/Parser/MicrosoftExtensionsInlineAsm.c13
-rw-r--r--test/Parser/altivec-csk-bool.c3
-rw-r--r--test/Parser/altivec.c6
-rw-r--r--test/Parser/arm-windows-calling-convention-handling.c10
-rw-r--r--test/Parser/asm.c13
-rw-r--r--test/Parser/attr-availability.c2
-rw-r--r--test/Parser/attributes.c15
-rw-r--r--test/Parser/attributes.mm4
-rw-r--r--test/Parser/bad-control.c15
-rw-r--r--test/Parser/brackets.c79
-rw-r--r--test/Parser/brackets.cpp153
-rw-r--r--test/Parser/builtin_classify_type.c2
-rw-r--r--test/Parser/check-objc2-syntax-1.m4
-rw-r--r--test/Parser/compound_literal.c4
-rw-r--r--test/Parser/cuda-kernel-call-c++11.cu20
-rw-r--r--test/Parser/cuda-kernel-call.cu3
-rw-r--r--test/Parser/cxx-altivec.cpp6
-rw-r--r--test/Parser/cxx-ambig-decl-expr-xfail.cpp2
-rw-r--r--test/Parser/cxx-casting.cpp17
-rw-r--r--test/Parser/cxx-class.cpp28
-rw-r--r--test/Parser/cxx-decl.cpp21
-rw-r--r--test/Parser/cxx-friend.cpp2
-rw-r--r--test/Parser/cxx-reference.cpp2
-rw-r--r--test/Parser/cxx-template-argument.cpp1
-rw-r--r--test/Parser/cxx-template-decl.cpp83
-rw-r--r--test/Parser/cxx-using-declaration.cpp2
-rw-r--r--test/Parser/cxx0x-ambig.cpp4
-rw-r--r--test/Parser/cxx0x-attributes.cpp42
-rw-r--r--test/Parser/cxx0x-decl.cpp18
-rw-r--r--test/Parser/cxx0x-for-range.cpp34
-rw-r--r--test/Parser/cxx0x-lambda-expressions.cpp30
-rw-r--r--test/Parser/cxx0x-member-initializers.cpp4
-rw-r--r--test/Parser/cxx0x-rvalue-reference.cpp2
-rw-r--r--test/Parser/cxx11-type-specifier.cpp4
-rw-r--r--test/Parser/cxx11-user-defined-literals.cpp34
-rw-r--r--test/Parser/declarators.c35
-rw-r--r--test/Parser/diag-crash.c6
-rw-r--r--test/Parser/eof.cpp13
-rw-r--r--test/Parser/expressions.c6
-rw-r--r--test/Parser/ms-if-exists.cpp117
-rw-r--r--test/Parser/ms-inline-asm-nested-braces.c9
-rw-r--r--test/Parser/ms-inline-asm.c16
-rw-r--r--test/Parser/namespace-alias-attr.cpp2
-rw-r--r--test/Parser/objc-error-qualified-implementation.m10
-rw-r--r--test/Parser/objcbridge-related-attribute.m15
-rw-r--r--test/Parser/objcxx11-attributes.mm4
-rw-r--r--test/Parser/opencl-astype.cl2
-rw-r--r--test/Parser/opencl-keywords.cl8
-rw-r--r--test/Parser/pragma-loop.cpp166
-rw-r--r--test/Parser/pragma-optimize-diagnostics.cpp28
-rw-r--r--test/Parser/pragma-unroll.cpp89
-rw-r--r--test/Parser/recovery.cpp77
-rw-r--r--test/Parser/switch-recovery.cpp50
-rw-r--r--test/Parser/warn-cuda-compat.cu13
-rw-r--r--test/Parser/warn-semicolon-before-method-body.m2
-rw-r--r--test/Preprocessor/Inputs/headermap-rel/Foo.framework/Headers/Foo.h2
-rw-r--r--test/Preprocessor/Inputs/headermap-rel/foo.hmapbin0 -> 804 bytes
-rw-r--r--test/Preprocessor/Inputs/headermap-rel2/Product/someheader.h1
-rw-r--r--test/Preprocessor/Inputs/headermap-rel2/project-headers.hmapbin0 -> 108 bytes
-rw-r--r--test/Preprocessor/Inputs/headermap-rel2/system/usr/include/someheader.h1
-rw-r--r--test/Preprocessor/Inputs/microsoft-header-search/a/b/include3.h5
-rw-r--r--test/Preprocessor/Inputs/microsoft-header-search/a/findme.h3
-rw-r--r--test/Preprocessor/Inputs/microsoft-header-search/a/include2.h6
-rw-r--r--test/Preprocessor/Inputs/microsoft-header-search/falsepos.h3
-rw-r--r--test/Preprocessor/Inputs/microsoft-header-search/findme.h3
-rw-r--r--test/Preprocessor/Inputs/microsoft-header-search/include1.h6
-rw-r--r--test/Preprocessor/aarch64-target-features.c73
-rw-r--r--test/Preprocessor/arm-acle-6.4.c40
-rw-r--r--test/Preprocessor/arm-target-features.c88
-rw-r--r--test/Preprocessor/cxx_oper_keyword.cpp30
-rw-r--r--test/Preprocessor/cxx_oper_keyword_ms_compat.cpp10
-rw-r--r--test/Preprocessor/has_attribute.c12
-rw-r--r--test/Preprocessor/header_lookup1.c2
-rw-r--r--test/Preprocessor/headermap-rel.c12
-rw-r--r--test/Preprocessor/headermap-rel2.c14
-rw-r--r--test/Preprocessor/ifdef-recover.c13
-rw-r--r--test/Preprocessor/ignore-pragmas.c10
-rw-r--r--test/Preprocessor/init.c3692
-rw-r--r--test/Preprocessor/macho-embedded-predefines.c20
-rw-r--r--test/Preprocessor/macro-multiline.c7
-rw-r--r--test/Preprocessor/macro-multiline.c.ignoreme8
-rw-r--r--test/Preprocessor/macro_arg_empty.c7
-rw-r--r--test/Preprocessor/macro_expand_empty.c9
-rw-r--r--test/Preprocessor/macro_paste_commaext.c4
-rw-r--r--test/Preprocessor/macro_paste_spacing.c16
-rw-r--r--test/Preprocessor/macro_redefined.c19
-rw-r--r--test/Preprocessor/macro_space.c36
-rw-r--r--test/Preprocessor/microsoft-header-search.c8
-rw-r--r--test/Preprocessor/predefined-arch-macros.c70
-rw-r--r--test/Preprocessor/predefined-macros.c76
-rw-r--r--test/Preprocessor/print-pragma-microsoft.c20
-rw-r--r--test/Preprocessor/stdint.c96
-rw-r--r--test/Preprocessor/ucn-allowed-chars.c2
-rw-r--r--test/Preprocessor/ucn-pp-identifier.c6
-rw-r--r--test/Preprocessor/woa-defaults.c33
-rw-r--r--test/Preprocessor/woa-wchar_t.c5
-rw-r--r--test/Preprocessor/x86_target_features.c10
-rw-r--r--test/Profile/Inputs/c-attributes.proftext34
-rw-r--r--test/Profile/Inputs/c-captured.proftext25
-rw-r--r--test/Profile/Inputs/c-counter-overflows.proftext12
-rw-r--r--test/Profile/Inputs/c-general.proftext157
-rw-r--r--test/Profile/Inputs/c-outdated-data.proftext12
-rw-r--r--test/Profile/Inputs/c-unprofiled-blocks.proftext32
-rw-r--r--test/Profile/Inputs/c-unprofiled.proftext10
-rw-r--r--test/Profile/Inputs/cxx-class.proftext41
-rw-r--r--test/Profile/Inputs/cxx-lambda.proftext20
-rw-r--r--test/Profile/Inputs/cxx-templates.proftext17
-rw-r--r--test/Profile/Inputs/cxx-throws.proftext18
-rw-r--r--test/Profile/Inputs/objc-general.proftext17
-rw-r--r--test/Profile/Inputs/profiled_header.h3
-rw-r--r--test/Profile/README16
-rw-r--r--test/Profile/c-attributes.c48
-rw-r--r--test/Profile/c-captured.c59
-rw-r--r--test/Profile/c-counter-overflows.c49
-rw-r--r--test/Profile/c-general.c544
-rw-r--r--test/Profile/c-linkage-available_externally.c12
-rw-r--r--test/Profile/c-linkage.c37
-rw-r--r--test/Profile/c-outdated-data.c28
-rw-r--r--test/Profile/c-unprofiled-blocks.c69
-rw-r--r--test/Profile/c-unprofiled.c26
-rw-r--r--test/Profile/cxx-class.cpp78
-rw-r--r--test/Profile/cxx-implicit.cpp17
-rw-r--r--test/Profile/cxx-lambda.cpp58
-rw-r--r--test/Profile/cxx-linkage.cpp36
-rw-r--r--test/Profile/cxx-templates.cpp42
-rw-r--r--test/Profile/cxx-throws.cpp73
-rw-r--r--test/Profile/objc-general.m75
-rw-r--r--test/Rewriter/dllimport-typedef.c17
-rw-r--r--test/Rewriter/finally.m2
-rw-r--r--test/Rewriter/lit.local.cfg3
-rw-r--r--test/Rewriter/missing-dllimport.c17
-rw-r--r--test/Rewriter/no-integrated-preprocessing-64bit.m2
-rw-r--r--test/Rewriter/no-integrated-preprocessing.m4
-rw-r--r--test/Rewriter/protocol-rewrite-1.m27
-rw-r--r--test/Sema/2007-10-01-BuildArrayRef.c6
-rw-r--r--test/Sema/2009-03-09-WeakDeclarations-1.c6
-rw-r--r--test/Sema/2009-04-22-UnknownSize.c2
-rw-r--r--test/Sema/2009-07-17-VoidParameter.c4
-rw-r--r--test/Sema/Inputs/ms-keyword-system-header.h2
-rw-r--r--test/Sema/Inputs/warn-unreachable.h7
-rw-r--r--test/Sema/MicrosoftCompatibility.c4
-rw-r--r--test/Sema/MicrosoftExtensions.c27
-rw-r--r--test/Sema/__try.c19
-rw-r--r--test/Sema/aarch64-neon-ranges.c218
-rw-r--r--test/Sema/aarch64-neon-vector-types.c17
-rw-r--r--test/Sema/align-x86.c4
-rw-r--r--test/Sema/alloc_size.c27
-rw-r--r--test/Sema/arm-interrupt-attr.c4
-rw-r--r--test/Sema/arm-neon-types.c2
-rw-r--r--test/Sema/arm64-inline-asm.c9
-rw-r--r--test/Sema/arm64-neon-args.c14
-rw-r--r--test/Sema/arm_acle.c32
-rw-r--r--test/Sema/array-init.c7
-rw-r--r--test/Sema/asm.c21
-rw-r--r--test/Sema/ast-print.c21
-rw-r--r--test/Sema/atomic-compare.c21
-rw-r--r--test/Sema/atomic-expr.c3
-rw-r--r--test/Sema/atomic-ops.c223
-rw-r--r--test/Sema/attr-alias-elf.c15
-rw-r--r--test/Sema/attr-aligned.c20
-rw-r--r--test/Sema/attr-availability-ios.c8
-rw-r--r--test/Sema/attr-availability-macosx.c4
-rw-r--r--test/Sema/attr-availability.c4
-rw-r--r--test/Sema/attr-capabilities.c62
-rw-r--r--test/Sema/attr-cleanup.c2
-rw-r--r--test/Sema/attr-coldhot.c4
-rw-r--r--test/Sema/attr-deprecated-message.c8
-rw-r--r--test/Sema/attr-deprecated.c24
-rw-r--r--test/Sema/attr-malloc.c4
-rw-r--r--test/Sema/attr-msp430.c6
-rw-r--r--test/Sema/attr-noduplicate.c8
-rw-r--r--test/Sema/attr-ownership.c6
-rw-r--r--test/Sema/attr-section.c4
-rw-r--r--test/Sema/attr-unavailable-message.c12
-rw-r--r--test/Sema/attr-used.c8
-rw-r--r--test/Sema/big-endian-neon-initializers.c13
-rw-r--r--test/Sema/bitfield-layout.c15
-rw-r--r--test/Sema/block-misc.c2
-rw-r--r--test/Sema/block-return.c2
-rw-r--r--test/Sema/bool-compare.c162
-rw-r--r--test/Sema/builtin-assume.c11
-rw-r--r--test/Sema/builtin-clear_cache.c1
-rw-r--r--test/Sema/builtins-aarch64.c2
-rw-r--r--test/Sema/builtins-arm-exclusive.c51
-rw-r--r--test/Sema/builtins-arm.c6
-rw-r--r--test/Sema/builtins-arm64-exclusive.c108
-rw-r--r--test/Sema/builtins-arm64.c24
-rw-r--r--test/Sema/builtins-gnu-mode.c8
-rw-r--r--test/Sema/builtins.c5
-rw-r--r--test/Sema/c89.c2
-rw-r--r--test/Sema/callingconv.c2
-rw-r--r--test/Sema/const-eval.c2
-rw-r--r--test/Sema/constant-builtins-2.c90
-rw-r--r--test/Sema/constructor-attribute.c8
-rw-r--r--test/Sema/conversion.c12
-rw-r--r--test/Sema/crash-invalid-array.c8
-rw-r--r--test/Sema/decl-in-prototype.c10
-rw-r--r--test/Sema/decl-invalid.c1
-rw-r--r--test/Sema/dllexport.c138
-rw-r--r--test/Sema/dllimport-dllexport.c48
-rw-r--r--test/Sema/dllimport.c137
-rw-r--r--test/Sema/empty1.c4
-rw-r--r--test/Sema/enable_if.c97
-rw-r--r--test/Sema/ext_vector_casts.c76
-rw-r--r--test/Sema/fn-ptr-as-fn-prototype.c2
-rw-r--r--test/Sema/format-strings-c90.c2
-rw-r--r--test/Sema/format-strings-darwin.c12
-rw-r--r--test/Sema/format-strings-enum-fixed-type.cpp18
-rw-r--r--test/Sema/format-strings-enum.c4
-rw-r--r--test/Sema/format-strings-fixit.c23
-rw-r--r--test/Sema/format-strings-ms.c2
-rw-r--r--test/Sema/format-strings-non-iso.c2
-rw-r--r--test/Sema/format-strings-scanf.c9
-rw-r--r--test/Sema/format-strings.c20
-rw-r--r--test/Sema/i-c-e.c2
-rw-r--r--test/Sema/implicit-builtin-decl.c11
-rw-r--r--test/Sema/implicit-cast-dump.c2
-rw-r--r--test/Sema/inline-asm-validate.c9
-rw-r--r--test/Sema/invalid-decl.c2
-rw-r--r--test/Sema/lit.local.cfg4
-rw-r--r--test/Sema/loop-control.c121
-rw-r--r--test/Sema/ms-inline-asm.c69
-rw-r--r--test/Sema/ms-wchar.c4
-rw-r--r--test/Sema/ms_bitfield_layout.c26
-rw-r--r--test/Sema/ms_class_layout.cpp20
-rw-r--r--test/Sema/neon-vector-types.c3
-rw-r--r--test/Sema/nonnull.c34
-rw-r--r--test/Sema/overloadable.c2
-rw-r--r--test/Sema/pragma-ms_struct.c10
-rw-r--r--test/Sema/pragma-pack-apple.c4
-rw-r--r--test/Sema/pragma-section.c44
-rw-r--r--test/Sema/private-extern.c8
-rw-r--r--test/Sema/return-noreturn.c12
-rw-r--r--test/Sema/return.c43
-rw-r--r--test/Sema/sentinel-attribute.c2
-rw-r--r--test/Sema/shift.c2
-rw-r--r--test/Sema/statements.c5
-rw-r--r--test/Sema/static-init.c2
-rw-r--r--test/Sema/struct-decl.c3
-rw-r--r--test/Sema/switch.c58
-rw-r--r--test/Sema/tentative-decls.c4
-rw-r--r--test/Sema/thread-specifier.c27
-rw-r--r--test/Sema/tls.c9
-rw-r--r--test/Sema/transparent-union.c24
-rw-r--r--test/Sema/typedef-retain.c4
-rw-r--r--test/Sema/typeof-use-deprecated.c12
-rw-r--r--test/Sema/types.c11
-rw-r--r--test/Sema/unused-expr.c20
-rw-r--r--test/Sema/var-redecl.c2
-rw-r--r--test/Sema/variadic-promotion.c2
-rw-r--r--test/Sema/vector-assign.c40
-rw-r--r--test/Sema/vector-cast.c32
-rw-r--r--test/Sema/vector-init.c2
-rw-r--r--test/Sema/vector-ops.c6
-rw-r--r--test/Sema/vla.c8
-rw-r--r--test/Sema/warn-absolute-value-header.c36
-rw-r--r--test/Sema/warn-absolute-value.c782
-rw-r--r--test/Sema/warn-bitwise-compare.c28
-rw-r--r--test/Sema/warn-documentation-almost-trailing.c5
-rw-r--r--test/Sema/warn-documentation.cpp112
-rw-r--r--test/Sema/warn-main-return-type.c10
-rw-r--r--test/Sema/warn-missing-variable-declarations.c2
-rw-r--r--test/Sema/warn-null.c3
-rw-r--r--test/Sema/warn-outof-range-assign-enum.c18
-rw-r--r--test/Sema/warn-overlap.c64
-rw-r--r--test/Sema/warn-thread-safety-analysis.c41
-rw-r--r--test/Sema/warn-type-safety.c4
-rw-r--r--test/Sema/warn-unreachable.c261
-rw-r--r--test/Sema/wchar.c4
-rw-r--r--test/SemaCUDA/Inputs/cuda.h20
-rw-r--r--test/SemaCUDA/cuda.h19
-rw-r--r--test/SemaCUDA/function-target.cu2
-rw-r--r--test/SemaCUDA/kernel-call.cu2
-rw-r--r--test/SemaCUDA/launch_bounds.cu14
-rw-r--r--test/SemaCUDA/lit.local.cfg4
-rw-r--r--test/SemaCUDA/qualifiers.cu2
-rw-r--r--test/SemaCXX/MicrosoftCompatibility.cpp31
-rw-r--r--test/SemaCXX/MicrosoftExtensions.cpp68
-rw-r--r--test/SemaCXX/PR19955.cpp16
-rw-r--r--test/SemaCXX/PR20110.cpp15
-rw-r--r--test/SemaCXX/PR8012.cpp2
-rw-r--r--test/SemaCXX/__try.cpp12
-rw-r--r--test/SemaCXX/abstract.cpp20
-rw-r--r--test/SemaCXX/access.cpp22
-rw-r--r--test/SemaCXX/addr-of-overloaded-function-casting.cpp13
-rw-r--r--test/SemaCXX/addr-of-overloaded-function.cpp20
-rw-r--r--test/SemaCXX/aggregate-initialization.cpp2
-rw-r--r--test/SemaCXX/alias-template.cpp10
-rw-r--r--test/SemaCXX/alignof.cpp15
-rw-r--r--test/SemaCXX/anonymous-struct.cpp7
-rw-r--r--test/SemaCXX/anonymous-union-cxx11.cpp9
-rw-r--r--test/SemaCXX/ast-print.cpp46
-rw-r--r--test/SemaCXX/atomic-type.cpp85
-rw-r--r--test/SemaCXX/atomic-type.cxx58
-rw-r--r--test/SemaCXX/attr-common.cpp2
-rw-r--r--test/SemaCXX/attr-cxx0x.cpp5
-rw-r--r--test/SemaCXX/attr-deprecated.cpp48
-rw-r--r--test/SemaCXX/attr-flatten.cpp34
-rw-r--r--test/SemaCXX/attr-no-sanitize-address.cpp10
-rw-r--r--test/SemaCXX/attr-no-sanitize-memory.cpp10
-rw-r--r--test/SemaCXX/attr-no-sanitize-thread.cpp10
-rw-r--r--test/SemaCXX/attr-no-split-stack.cpp34
-rw-r--r--test/SemaCXX/attr-optnone.cpp47
-rw-r--r--test/SemaCXX/attr-selectany.cpp5
-rw-r--r--test/SemaCXX/attr-unavailable.cpp21
-rw-r--r--test/SemaCXX/attr-used.cpp4
-rw-r--r--test/SemaCXX/attr-weak.cpp10
-rw-r--r--test/SemaCXX/attr-weakref.cpp4
-rw-r--r--test/SemaCXX/bool-compare.cpp207
-rw-r--r--test/SemaCXX/c99-variable-length-array.cpp21
-rw-r--r--test/SemaCXX/calling-conv-compat.cpp21
-rw-r--r--test/SemaCXX/compare.cpp2
-rw-r--r--test/SemaCXX/conditional-expr.cpp27
-rw-r--r--test/SemaCXX/const-cast.cpp2
-rw-r--r--test/SemaCXX/constant-expression-cxx11.cpp21
-rw-r--r--test/SemaCXX/constant-expression.cpp17
-rw-r--r--test/SemaCXX/constexpr-value-init.cpp2
-rw-r--r--test/SemaCXX/constructor-initializer.cpp7
-rw-r--r--test/SemaCXX/constructor.cpp2
-rw-r--r--test/SemaCXX/conversion-function.cpp14
-rw-r--r--test/SemaCXX/crashes.cpp13
-rw-r--r--test/SemaCXX/cstyle-cast.cpp4
-rw-r--r--test/SemaCXX/cxx-altivec.cpp5
-rw-r--r--test/SemaCXX/cxx0x-compat.cpp3
-rw-r--r--test/SemaCXX/cxx0x-cursory-default-delete.cpp4
-rw-r--r--test/SemaCXX/cxx0x-delegating-ctors.cpp2
-rw-r--r--test/SemaCXX/cxx0x-deleted-default-ctor.cpp4
-rw-r--r--test/SemaCXX/cxx0x-initializer-constructor.cpp46
-rw-r--r--test/SemaCXX/cxx0x-initializer-scalars.cpp4
-rw-r--r--test/SemaCXX/cxx0x-initializer-stdinitializerlist-system-header.cpp23
-rw-r--r--test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp29
-rw-r--r--test/SemaCXX/cxx0x-type-convert-construct.cpp4
-rw-r--r--test/SemaCXX/cxx11-attr-print.cpp3
-rw-r--r--test/SemaCXX/cxx11-gnu-attrs.cpp2
-rw-r--r--test/SemaCXX/cxx11-inheriting-ctors.cpp8
-rw-r--r--test/SemaCXX/cxx11-unused.cpp33
-rw-r--r--test/SemaCXX/cxx11-user-defined-literals.cpp24
-rw-r--r--test/SemaCXX/cxx1y-deduced-return-type.cpp7
-rw-r--r--test/SemaCXX/cxx1y-generic-lambdas-capturing.cpp17
-rw-r--r--test/SemaCXX/cxx1y-generic-lambdas-variadics.cpp100
-rw-r--r--test/SemaCXX/cxx1y-generic-lambdas.cpp25
-rw-r--r--test/SemaCXX/cxx1y-init-captures.cpp2
-rw-r--r--test/SemaCXX/cxx1y-variable-templates_in_class.cpp32
-rw-r--r--test/SemaCXX/cxx1y-variable-templates_top_level.cpp44
-rw-r--r--test/SemaCXX/cxx98-compat.cpp49
-rw-r--r--test/SemaCXX/dcl_init_aggr.cpp4
-rw-r--r--test/SemaCXX/decl-expr-ambiguity.cpp2
-rw-r--r--test/SemaCXX/decl-microsoft-call-conv.cpp42
-rw-r--r--test/SemaCXX/declspec-thread.cpp42
-rw-r--r--test/SemaCXX/decltype.cpp31
-rw-r--r--test/SemaCXX/default1.cpp3
-rw-r--r--test/SemaCXX/deleted-function.cpp6
-rw-r--r--test/SemaCXX/deleted-operator.cpp5
-rw-r--r--test/SemaCXX/deprecated.cpp9
-rw-r--r--test/SemaCXX/destructor.cpp25
-rw-r--r--test/SemaCXX/dllexport.cpp1010
-rw-r--r--test/SemaCXX/dllimport.cpp1085
-rw-r--r--test/SemaCXX/elaborated-type-specifier.cpp9
-rw-r--r--test/SemaCXX/enable_if.cpp79
-rw-r--r--test/SemaCXX/enum-bitfield.cpp12
-rw-r--r--test/SemaCXX/enum-scoped.cpp13
-rw-r--r--test/SemaCXX/err_init_conversion_failed.cpp16
-rw-r--r--test/SemaCXX/explicit.cpp5
-rw-r--r--test/SemaCXX/expression-traits.cpp15
-rw-r--r--test/SemaCXX/expressions.cpp17
-rw-r--r--test/SemaCXX/flexible-array-test.cpp21
-rw-r--r--test/SemaCXX/for-range-dereference.cpp2
-rw-r--r--test/SemaCXX/for-range-examples.cpp34
-rw-r--r--test/SemaCXX/format-strings.cpp2
-rw-r--r--test/SemaCXX/friend.cpp8
-rw-r--r--test/SemaCXX/funcdname.cpp32
-rw-r--r--test/SemaCXX/functional-cast.cpp4
-rw-r--r--test/SemaCXX/goto.cpp2
-rw-r--r--test/SemaCXX/implicit-member-functions.cpp2
-rw-r--r--test/SemaCXX/implicit-virtual-member-functions.cpp8
-rw-r--r--test/SemaCXX/init-priority-attr.cpp3
-rw-r--r--test/SemaCXX/lambda-expressions.cpp65
-rw-r--r--test/SemaCXX/linkage.cpp19
-rw-r--r--test/SemaCXX/linkage2.cpp4
-rw-r--r--test/SemaCXX/member-expr.cpp4
-rw-r--r--test/SemaCXX/member-init.cpp10
-rw-r--r--test/SemaCXX/member-pointer-ms.cpp122
-rw-r--r--test/SemaCXX/member-pointer.cpp10
-rw-r--r--test/SemaCXX/microsoft-cxx0x.cpp2
-rw-r--r--test/SemaCXX/microsoft-dtor-lookup-cxx11.cpp13
-rw-r--r--test/SemaCXX/microsoft-dtor-lookup.cpp66
-rw-r--r--test/SemaCXX/microsoft-new-delete.cpp26
-rw-r--r--test/SemaCXX/microsoft-varargs-diagnostics.cpp42
-rw-r--r--test/SemaCXX/microsoft-varargs.cpp22
-rw-r--r--test/SemaCXX/missing-members.cpp9
-rw-r--r--test/SemaCXX/ms-friend-lookup.cpp104
-rw-r--r--test/SemaCXX/ms-interface.cpp2
-rw-r--r--test/SemaCXX/ms_integer_suffix.cpp18
-rw-r--r--test/SemaCXX/ms_struct.cpp26
-rw-r--r--test/SemaCXX/nested-name-spec.cpp121
-rw-r--r--test/SemaCXX/new-delete-cxx0x.cpp13
-rw-r--r--test/SemaCXX/new-delete.cpp9
-rw-r--r--test/SemaCXX/new-null.cpp63
-rw-r--r--test/SemaCXX/nonnull.cpp15
-rw-r--r--test/SemaCXX/ns_returns_retained_block_return.cpp17
-rw-r--r--test/SemaCXX/null_in_arithmetic_ops.cpp2
-rw-r--r--test/SemaCXX/nullptr_in_arithmetic_ops.cpp2
-rw-r--r--test/SemaCXX/old-style-cast.cpp11
-rw-r--r--test/SemaCXX/operator-arrow-depth.cpp4
-rw-r--r--test/SemaCXX/overload-0x.cpp84
-rw-r--r--test/SemaCXX/overload-call.cpp30
-rw-r--r--test/SemaCXX/overloaded-operator.cpp67
-rw-r--r--test/SemaCXX/pr13394-crash-on-invalid.cpp4
-rw-r--r--test/SemaCXX/pr18284-crash-on-invalid.cpp24
-rw-r--r--test/SemaCXX/pr9812.c21
-rw-r--r--test/SemaCXX/pr9812.cpp9
-rw-r--r--test/SemaCXX/pragma-init_seg.cpp21
-rw-r--r--test/SemaCXX/pragma-optimize.cpp113
-rw-r--r--test/SemaCXX/pragma-vtordisp.cpp40
-rw-r--r--test/SemaCXX/pragma-weak.cpp3
-rw-r--r--test/SemaCXX/primary-base.cpp2
-rw-r--r--test/SemaCXX/qualified-id-lookup.cpp2
-rw-r--r--test/SemaCXX/references.cpp12
-rw-r--r--test/SemaCXX/reinterpret-cast.cpp6
-rw-r--r--test/SemaCXX/return-noreturn.cpp30
-rw-r--r--test/SemaCXX/return-stack-addr.cpp23
-rw-r--r--test/SemaCXX/return.cpp10
-rw-r--r--test/SemaCXX/rval-references-examples.cpp2
-rw-r--r--test/SemaCXX/scope-check.cpp158
-rw-r--r--test/SemaCXX/sourceranges.cpp11
-rw-r--r--test/SemaCXX/static-assert.cpp3
-rw-r--r--test/SemaCXX/static-cast.cpp5
-rw-r--r--test/SemaCXX/switch-implicit-fallthrough-blocks.cpp19
-rw-r--r--test/SemaCXX/switch-implicit-fallthrough.cpp71
-rw-r--r--test/SemaCXX/template-implicit-vars.cpp14
-rw-r--r--test/SemaCXX/trailing-return-0x.cpp4
-rw-r--r--test/SemaCXX/type-definition-in-specifier.cpp45
-rw-r--r--test/SemaCXX/type-traits.cpp40
-rw-r--r--test/SemaCXX/typeid-ref.cpp4
-rw-r--r--test/SemaCXX/types_compatible_p.cpp10
-rw-r--r--test/SemaCXX/typo-correction-pt2.cpp117
-rw-r--r--test/SemaCXX/typo-correction.cpp15
-rw-r--r--test/SemaCXX/undefined-inline.cpp8
-rw-r--r--test/SemaCXX/undefined-internal.cpp46
-rw-r--r--test/SemaCXX/underlying_type.cpp14
-rw-r--r--test/SemaCXX/uninit-variables.cpp5
-rw-r--r--test/SemaCXX/uninitialized.cpp2
-rw-r--r--test/SemaCXX/unreachable-code.cpp20
-rw-r--r--test/SemaCXX/using-decl-1.cpp97
-rw-r--r--test/SemaCXX/vararg-class.cpp48
-rw-r--r--test/SemaCXX/vector-casts.cpp47
-rw-r--r--test/SemaCXX/vector.cpp10
-rw-r--r--test/SemaCXX/virtual-base-used.cpp49
-rw-r--r--test/SemaCXX/virtual-override-x86.cpp2
-rw-r--r--test/SemaCXX/virtual-override.cpp3
-rw-r--r--test/SemaCXX/vla.cpp14
-rw-r--r--test/SemaCXX/vtordisp-mode.cpp26
-rw-r--r--test/SemaCXX/warn-absolute-value-header.cpp53
-rw-r--r--test/SemaCXX/warn-absolute-value.cpp823
-rw-r--r--test/SemaCXX/warn-address.cpp20
-rw-r--r--test/SemaCXX/warn-bad-memaccess.cpp29
-rw-r--r--test/SemaCXX/warn-bool-conversion.cpp96
-rw-r--r--test/SemaCXX/warn-consumed-analysis.cpp176
-rw-r--r--test/SemaCXX/warn-consumed-parsing.cpp16
-rw-r--r--test/SemaCXX/warn-exit-time-destructors.cpp20
-rw-r--r--test/SemaCXX/warn-float-conversion.cpp38
-rw-r--r--test/SemaCXX/warn-func-as-bool.cpp40
-rw-r--r--test/SemaCXX/warn-global-constructors.cpp21
-rw-r--r--test/SemaCXX/warn-infinite-recursion.cpp152
-rw-r--r--test/SemaCXX/warn-memsize-comparison.cpp93
-rw-r--r--test/SemaCXX/warn-new-overaligned.cpp4
-rw-r--r--test/SemaCXX/warn-reinterpret-base-class.cpp18
-rw-r--r--test/SemaCXX/warn-self-assign.cpp3
-rw-r--r--test/SemaCXX/warn-shadow.cpp2
-rw-r--r--test/SemaCXX/warn-sign-conversion.cpp34
-rw-r--r--test/SemaCXX/warn-string-conversion.cpp8
-rw-r--r--test/SemaCXX/warn-sysheader-macro.cpp35
-rw-r--r--test/SemaCXX/warn-tautological-compare.cpp138
-rw-r--r--test/SemaCXX/warn-tautological-undefined-compare.cpp112
-rw-r--r--test/SemaCXX/warn-thread-safety-analysis.cpp676
-rw-r--r--test/SemaCXX/warn-thread-safety-parsing.cpp216
-rw-r--r--test/SemaCXX/warn-undefined-bool-conversion.cpp97
-rw-r--r--test/SemaCXX/warn-unreachable.cpp302
-rw-r--r--test/SemaCXX/warn-unused-attribute.cpp28
-rw-r--r--test/SemaCXX/warn-unused-comparison.cpp41
-rw-r--r--test/SemaCXX/warn-unused-filescoped.cpp15
-rw-r--r--test/SemaCXX/warn-unused-label-error.cpp26
-rw-r--r--test/SemaCXX/warn-unused-value.cpp2
-rw-r--r--test/SemaCXX/warn-unused-variables.cpp47
-rw-r--r--test/SemaCXX/warn-weak-vtables.cpp3
-rw-r--r--test/SemaCXX/windows-arm-valist.cpp17
-rw-r--r--test/SemaCXX/writable-strings-deprecated.cpp13
-rw-r--r--test/SemaObjC/arc-decls.m20
-rw-r--r--test/SemaObjC/arc-invalid.m28
-rw-r--r--test/SemaObjC/arc-jump-block.m2
-rw-r--r--test/SemaObjC/arc-objcbridge-related-attribute.m41
-rw-r--r--test/SemaObjC/arc-property-lifetime.m4
-rw-r--r--test/SemaObjC/arc-unavailable-for-weakref.m2
-rw-r--r--test/SemaObjC/arc-unavailable-system-function.m2
-rw-r--r--test/SemaObjC/arc.m18
-rw-r--r--test/SemaObjC/attr-availability.m6
-rw-r--r--test/SemaObjC/attr-deprecated.m93
-rw-r--r--test/SemaObjC/attr-designated-init.m412
-rw-r--r--test/SemaObjC/attr-ns-bridged.m15
-rw-r--r--test/SemaObjC/block-type-safety.m43
-rw-r--r--test/SemaObjC/builtin_objc_lib_functions.m14
-rw-r--r--test/SemaObjC/builtin_objc_nslog.m4
-rw-r--r--test/SemaObjC/category-1.m7
-rw-r--r--test/SemaObjC/check-objcbridge-related-attribute-lookup.m41
-rw-r--r--test/SemaObjC/class-def-test-1.m2
-rw-r--r--test/SemaObjC/class-extension-dup-methods.m13
-rw-r--r--test/SemaObjC/class-property-access.m43
-rw-r--r--test/SemaObjC/class-proto-1.m14
-rw-r--r--test/SemaObjC/class-unavail-warning.m33
-rw-r--r--test/SemaObjC/cocoa.m5
-rw-r--r--test/SemaObjC/compare-qualified-class.m2
-rw-r--r--test/SemaObjC/compare-qualified-id.m4
-rw-r--r--test/SemaObjC/comptypes-legal.m17
-rw-r--r--test/SemaObjC/conditional-expr.m4
-rw-r--r--test/SemaObjC/continuation-class-property.m12
-rw-r--r--test/SemaObjC/dealloc.m34
-rw-r--r--test/SemaObjC/default-synthesize-3.m38
-rw-r--r--test/SemaObjC/default-synthesize.m2
-rw-r--r--test/SemaObjC/deprecate_function_containers.m37
-rw-r--r--test/SemaObjC/encode-typeof-test.m26
-rw-r--r--test/SemaObjC/error-missing-getter.m3
-rw-r--r--test/SemaObjC/format-arg-attribute.m28
-rw-r--r--test/SemaObjC/format-strings-objc.m3
-rw-r--r--test/SemaObjC/forward-protocol-incomplete-impl-warn.m6
-rw-r--r--test/SemaObjC/ibaction.m4
-rw-r--r--test/SemaObjC/iboutlet.m16
-rw-r--r--test/SemaObjC/incomplete-implementation.m26
-rw-r--r--test/SemaObjC/ivar-lookup-resolution-builtin.m2
-rw-r--r--test/SemaObjC/method-attributes.m33
-rw-r--r--test/SemaObjC/method-sentinel-attr.m2
-rw-r--r--test/SemaObjC/method-undef-category-warn-1.m8
-rw-r--r--test/SemaObjC/method-undef-extension-warn-1.m4
-rw-r--r--test/SemaObjC/nonnull.m28
-rw-r--r--test/SemaObjC/ns_returns_retained_block_return.m22
-rw-r--r--test/SemaObjC/nsobject-attribute.m8
-rw-r--r--test/SemaObjC/objc-asm-attribute-neg-test.m42
-rw-r--r--test/SemaObjC/objc-container-subscripting-attr.m18
-rw-r--r--test/SemaObjC/objc-literal-nsnumber.m20
-rw-r--r--test/SemaObjC/objc-mixed-bridge-attribute.m51
-rw-r--r--test/SemaObjC/objcbridge-attribute-arc.m223
-rw-r--r--test/SemaObjC/objcbridge-attribute.m83
-rw-r--r--test/SemaObjC/objcbridge-related-attribute.m41
-rw-r--r--test/SemaObjC/objcbridgemutable-attribute.m31
-rw-r--r--test/SemaObjC/opaque-is-access-warn.m24
-rw-r--r--test/SemaObjC/opaque-is-access.m23
-rw-r--r--test/SemaObjC/overriding-property-in-class-extension.m3
-rw-r--r--test/SemaObjC/property-10.m2
-rw-r--r--test/SemaObjC/property-12.m8
-rw-r--r--test/SemaObjC/property-deprecated-warning.m37
-rw-r--r--test/SemaObjC/property-in-class-extension-1.m9
-rw-r--r--test/SemaObjC/property-inherited.m26
-rw-r--r--test/SemaObjC/property-noninherited-availability-attr.m15
-rw-r--r--test/SemaObjC/property-typecheck-1.m2
-rw-r--r--test/SemaObjC/protocol-attribute.m2
-rw-r--r--test/SemaObjC/protocols-suppress-conformance.m207
-rw-r--r--test/SemaObjC/selector-1.m44
-rw-r--r--test/SemaObjC/selector-3.m44
-rw-r--r--test/SemaObjC/selector-4.m28
-rw-r--r--test/SemaObjC/selector-overload.m1
-rw-r--r--test/SemaObjC/special-dep-unavail-warning.m34
-rw-r--r--test/SemaObjC/tentative-property-decl.m15
-rw-r--r--test/SemaObjC/undef-protocol-methods-1.m7
-rw-r--r--test/SemaObjC/unsued-backing-ivar-warning.m76
-rw-r--r--test/SemaObjC/unused-backing-ivar-warning.m203
-rw-r--r--test/SemaObjC/unused.m32
-rw-r--r--test/SemaObjC/warn-deprecated-implementations.m18
-rw-r--r--test/SemaObjC/warn-forward-class-attr-deprecated.m4
-rw-r--r--test/SemaObjC/warn-protocol-method-deprecated.m4
-rw-r--r--test/SemaObjC/warn-retain-cycle.m18
-rw-r--r--test/SemaObjC/warn-thread-safety-analysis.m19
-rw-r--r--test/SemaObjC/warn-unreachable.m69
-rw-r--r--test/SemaObjCXX/arc-system-header.mm2
-rw-r--r--test/SemaObjCXX/arc-templates.mm16
-rw-r--r--test/SemaObjCXX/contextual-convert-to-id.mm19
-rw-r--r--test/SemaObjCXX/crash.mm8
-rw-r--r--test/SemaObjCXX/exceptions-fragile.mm2
-rw-r--r--test/SemaObjCXX/instantiate-property-access.mm35
-rw-r--r--test/SemaObjCXX/lit.local.cfg4
-rw-r--r--test/SemaObjCXX/microsoft-abi-byval.mm7
-rw-r--r--test/SemaObjCXX/objcbridge-attribute-arc.mm210
-rw-r--r--test/SemaObjCXX/objcbridge-attribute.mm210
-rw-r--r--test/SemaObjCXX/objcbridge-related-attribute.mm27
-rw-r--r--test/SemaObjCXX/objcbridge-static-cast.mm135
-rw-r--r--test/SemaObjCXX/old-style-cast.mm11
-rw-r--r--test/SemaObjCXX/propert-dot-error.mm6
-rw-r--r--test/SemaObjCXX/property-invalid-type.mm23
-rw-r--r--test/SemaObjCXX/warn-objc-literal-conversion.mm74
-rw-r--r--test/SemaOpenCL/address-spaces.cl26
-rw-r--r--test/SemaOpenCL/array-parameters.cl6
-rw-r--r--test/SemaOpenCL/event_t.cl2
-rw-r--r--test/SemaOpenCL/extern.cl9
-rw-r--r--test/SemaOpenCL/func_ptr.cl16
-rw-r--r--test/SemaOpenCL/half.cl2
-rw-r--r--test/SemaOpenCL/invalid-constant.cl2
-rw-r--r--test/SemaOpenCL/invalid-kernel-attrs.cl21
-rw-r--r--test/SemaOpenCL/invalid-kernel.cl16
-rw-r--r--test/SemaOpenCL/lit.local.cfg4
-rw-r--r--test/SemaOpenCL/sizeof.cl5
-rw-r--r--test/SemaOpenCL/vector_conv_invalid.cl6
-rw-r--r--test/SemaTemplate/attributes.cpp2
-rw-r--r--test/SemaTemplate/class-template-decl.cpp7
-rw-r--r--test/SemaTemplate/class-template-spec.cpp60
-rw-r--r--test/SemaTemplate/constexpr-instantiate.cpp2
-rw-r--r--test/SemaTemplate/dependent-expr.cpp7
-rw-r--r--test/SemaTemplate/dependent-names.cpp19
-rw-r--r--test/SemaTemplate/dependent-type-identity.cpp24
-rw-r--r--test/SemaTemplate/explicit-instantiation.cpp2
-rw-r--r--test/SemaTemplate/explicit-specialization-member.cpp18
-rw-r--r--test/SemaTemplate/inject-templated-friend-post.cpp15
-rw-r--r--test/SemaTemplate/inject-templated-friend.cpp6
-rw-r--r--test/SemaTemplate/instantiate-complete.cpp10
-rw-r--r--test/SemaTemplate/instantiate-decl-init.cpp20
-rw-r--r--test/SemaTemplate/instantiate-default-assignment-operator.cpp2
-rw-r--r--test/SemaTemplate/instantiate-enum.cpp15
-rw-r--r--test/SemaTemplate/instantiate-exception-spec-cxx11.cpp5
-rw-r--r--test/SemaTemplate/instantiate-exception-spec.cpp6
-rw-r--r--test/SemaTemplate/instantiate-function-2.cpp25
-rw-r--r--test/SemaTemplate/instantiate-function-params.cpp6
-rw-r--r--test/SemaTemplate/instantiate-local-class.cpp15
-rw-r--r--test/SemaTemplate/instantiate-method.cpp2
-rw-r--r--test/SemaTemplate/instantiate-var-template.cpp36
-rw-r--r--test/SemaTemplate/instantiation-backtrace.cpp4
-rw-r--r--test/SemaTemplate/instantiation-depth-subst-2.cpp4
-rw-r--r--test/SemaTemplate/instantiation-depth-subst.cpp4
-rw-r--r--test/SemaTemplate/instantiation-order.cpp4
-rw-r--r--test/SemaTemplate/ms-class-specialization-duplicate.cpp9
-rw-r--r--test/SemaTemplate/ms-delayed-default-template-args.cpp96
-rw-r--r--test/SemaTemplate/ms-function-specialization-class-scope.cpp124
-rw-r--r--test/SemaTemplate/ms-if-exists.cpp10
-rw-r--r--test/SemaTemplate/ms-lookup-template-base-classes.cpp242
-rw-r--r--test/SemaTemplate/ms-sizeof-missing-typename.cpp61
-rw-r--r--test/SemaTemplate/operator-template.cpp5
-rw-r--r--test/SemaTemplate/pack-deduction.cpp39
-rw-r--r--test/SemaTemplate/resolve-single-template-id.cpp20
-rw-r--r--test/SemaTemplate/temp_arg_nontype.cpp2
-rw-r--r--test/SemaTemplate/temp_arg_nontype_cxx11.cpp15
-rw-r--r--test/SemaTemplate/typename-specifier.cpp102
-rw-r--r--test/SemaTemplate/virtual-member-functions.cpp64
-rw-r--r--test/Tooling/lit.local.cfg2
-rw-r--r--test/Tooling/multi-jobs.cpp5
-rw-r--r--test/Unit/lit.cfg28
-rw-r--r--test/Unit/lit.site.cfg.in1
-rw-r--r--test/VFS/Inputs/Foo.framework/Headers/Foo.h (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/fp64/usr/lib/crtn.o)0
-rw-r--r--test/VFS/Inputs/Foo.framework/Modules/module.modulemap3
-rw-r--r--test/VFS/Inputs/Foo.h (renamed from test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/el/fp64/nan2008/usr/lib/crt1.o)0
-rw-r--r--test/VFS/Inputs/Incomplete.h1
-rw-r--r--test/VFS/Inputs/IncompleteVFS.h1
-rw-r--r--test/VFS/Inputs/actual_header.h1
-rw-r--r--test/VFS/Inputs/actual_module.map8
-rw-r--r--test/VFS/Inputs/actual_module2.map5
-rw-r--r--test/VFS/Inputs/external-names.h4
-rw-r--r--test/VFS/Inputs/import_some_frame.h2
-rw-r--r--test/VFS/Inputs/include_real.h1
-rw-r--r--test/VFS/Inputs/incomplete-umbrella.modulemap5
-rw-r--r--test/VFS/Inputs/invalid-yaml.yaml4
-rw-r--r--test/VFS/Inputs/missing-key.yaml4
-rw-r--r--test/VFS/Inputs/public_header.h2
-rw-r--r--test/VFS/Inputs/public_header2.h1
-rw-r--r--test/VFS/Inputs/some_frame_module.map5
-rw-r--r--test/VFS/Inputs/unknown-key.yaml5
-rw-r--r--test/VFS/Inputs/unknown-value.yaml5
-rw-r--r--test/VFS/Inputs/use-external-names.yaml7
-rw-r--r--test/VFS/Inputs/vfsoverlay.yaml53
-rw-r--r--test/VFS/Inputs/vfsoverlay2.yaml12
-rw-r--r--test/VFS/external-names.c35
-rw-r--r--test/VFS/framework-import.m9
-rw-r--r--test/VFS/implicit-include.c7
-rw-r--r--test/VFS/include-mixed-real-and-virtual.c14
-rw-r--r--test/VFS/include-real-from-virtual.c12
-rw-r--r--test/VFS/include-virtual-from-real.c12
-rw-r--r--test/VFS/include.c9
-rw-r--r--test/VFS/incomplete-umbrella.m12
-rw-r--r--test/VFS/module-import.m27
-rw-r--r--test/VFS/parse-errors.c14
-rw-r--r--test/VFS/real-path-found-first.m74
-rw-r--r--test/VFS/relative-path.c11
-rw-r--r--test/VFS/umbrella-mismatch.m8
-rw-r--r--test/lit.cfg206
-rw-r--r--test/lit.site.cfg.in9
2481 files changed, 109329 insertions, 29170 deletions
diff --git a/test/ARCMT/GC-check-warn-nsalloc.m b/test/ARCMT/GC-check-warn-nsalloc.m
index 5ce36c40d659..44ccc95e3f7c 100644
--- a/test/ARCMT/GC-check-warn-nsalloc.m
+++ b/test/ARCMT/GC-check-warn-nsalloc.m
@@ -1,12 +1,11 @@
-// RUN: %clang_cc1 -arcmt-check -verify -no-ns-alloc-error -triple x86_64-apple-darwin10 -fobjc-gc-only %s
-// RUN: %clang_cc1 -arcmt-check -verify -no-ns-alloc-error -triple x86_64-apple-darwin10 -fobjc-gc-only -x objective-c++ %s
-// DISABLE: mingw32
+// RUN: %clang_cc1 -arcmt-check -no-ns-alloc-error -triple x86_64-apple-darwin10 -fobjc-gc-only %s 2>&1 | grep 'warning: \[rewriter\] call returns pointer to GC managed memory'
+// RUN: %clang_cc1 -arcmt-check -no-ns-alloc-error -triple x86_64-apple-darwin10 -fobjc-gc-only -x objective-c++ %s 2>&1 | grep 'warning: \[rewriter\] call returns pointer to GC managed memory'
+// TODO: Investigate VerifyDiagnosticConsumer failures on these tests when using -verify.
// rdar://10532541
-// XFAIL: *
typedef unsigned NSUInteger;
void *__strong NSAllocateCollectable(NSUInteger size, NSUInteger options);
void test1() {
- NSAllocateCollectable(100, 0); // expected-warning {{call returns pointer to GC managed memory; it will become unmanaged in ARC}}
+ NSAllocateCollectable(100, 0);
}
diff --git a/test/ARCMT/GC-check.m b/test/ARCMT/GC-check.m
index 3a1b67ce2183..9864354228be 100644
--- a/test/ARCMT/GC-check.m
+++ b/test/ARCMT/GC-check.m
@@ -1,6 +1,5 @@
// RUN: %clang_cc1 -arcmt-check -verify -triple x86_64-apple-darwin10 -fobjc-gc-only %s
// RUN: %clang_cc1 -arcmt-check -verify -triple x86_64-apple-darwin10 -fobjc-gc-only -x objective-c++ %s
-// DISABLE: mingw32
#define CF_AUTOMATED_REFCOUNT_UNAVAILABLE __attribute__((unavailable("not available in automatic reference counting mode")))
typedef unsigned NSUInteger;
diff --git a/test/ARCMT/GC-no-arc-runtime.m b/test/ARCMT/GC-no-arc-runtime.m
index f0699927eda5..376134e73f21 100644
--- a/test/ARCMT/GC-no-arc-runtime.m
+++ b/test/ARCMT/GC-no-arc-runtime.m
@@ -3,7 +3,6 @@
// RUN: diff %t %s.result
// RUN: arcmt-test --args -triple x86_64-apple-macosx10.6 -fsyntax-only -fobjc-gc-only -x objective-c++ %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
#include "Common.h"
#include "GC.h"
diff --git a/test/ARCMT/GC-no-arc-runtime.m.result b/test/ARCMT/GC-no-arc-runtime.m.result
index f55ca38070e9..c338bdb2ed47 100644
--- a/test/ARCMT/GC-no-arc-runtime.m.result
+++ b/test/ARCMT/GC-no-arc-runtime.m.result
@@ -3,7 +3,6 @@
// RUN: diff %t %s.result
// RUN: arcmt-test --args -triple x86_64-apple-macosx10.6 -fsyntax-only -fobjc-gc-only -x objective-c++ %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
#include "Common.h"
#include "GC.h"
diff --git a/test/ARCMT/GC-no-finalize-removal.m b/test/ARCMT/GC-no-finalize-removal.m
index 14e8602446c3..a8db819d90b8 100644
--- a/test/ARCMT/GC-no-finalize-removal.m
+++ b/test/ARCMT/GC-no-finalize-removal.m
@@ -3,7 +3,6 @@
// RUN: diff %t %s.result
// RUN: arcmt-test --args -triple x86_64-apple-macosx10.7 -fsyntax-only -fobjc-gc-only -no-finalize-removal -x objective-c++ %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
#include "Common.h"
#include "GC.h"
diff --git a/test/ARCMT/GC-no-finalize-removal.m.result b/test/ARCMT/GC-no-finalize-removal.m.result
index ea14873ec353..b563d196ee65 100644
--- a/test/ARCMT/GC-no-finalize-removal.m.result
+++ b/test/ARCMT/GC-no-finalize-removal.m.result
@@ -3,7 +3,6 @@
// RUN: diff %t %s.result
// RUN: arcmt-test --args -triple x86_64-apple-macosx10.7 -fsyntax-only -fobjc-gc-only -no-finalize-removal -x objective-c++ %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
#include "Common.h"
#include "GC.h"
diff --git a/test/ARCMT/GC.m b/test/ARCMT/GC.m
index eebbaf6854d9..2c9ea9ca3324 100644
--- a/test/ARCMT/GC.m
+++ b/test/ARCMT/GC.m
@@ -3,7 +3,6 @@
// RUN: diff %t %s.result
// RUN: arcmt-test --args -triple x86_64-apple-macosx10.7 -fsyntax-only -fobjc-gc-only -x objective-c++ %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
#include "Common.h"
#include "GC.h"
diff --git a/test/ARCMT/GC.m.result b/test/ARCMT/GC.m.result
index c2c523f77e99..595ff23a7259 100644
--- a/test/ARCMT/GC.m.result
+++ b/test/ARCMT/GC.m.result
@@ -3,7 +3,6 @@
// RUN: diff %t %s.result
// RUN: arcmt-test --args -triple x86_64-apple-macosx10.7 -fsyntax-only -fobjc-gc-only -x objective-c++ %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
#include "Common.h"
#include "GC.h"
diff --git a/test/ARCMT/Inputs/Module.framework/Frameworks/SubFramework.framework/Headers/SubFramework.h b/test/ARCMT/Inputs/Module.framework/Frameworks/SubFramework.framework/Headers/SubFramework.h
new file mode 100644
index 000000000000..f7f9fb66c9e9
--- /dev/null
+++ b/test/ARCMT/Inputs/Module.framework/Frameworks/SubFramework.framework/Headers/SubFramework.h
@@ -0,0 +1,5 @@
+#ifndef MODULE_SUBFRAMEWORK_H
+#define MODULE_SUBFRAMEWORK_H
+#__private_macro MODULE_SUBFRAMEWORK_H
+char *module_subframework;
+#endif
diff --git a/test/ARCMT/Inputs/Module.framework/Headers/Buried/Treasure.h b/test/ARCMT/Inputs/Module.framework/Headers/Buried/Treasure.h
new file mode 100644
index 000000000000..6e81adcb2b60
--- /dev/null
+++ b/test/ARCMT/Inputs/Module.framework/Headers/Buried/Treasure.h
@@ -0,0 +1 @@
+unsigned *Buried_Treasure;
diff --git a/test/ARCMT/Inputs/Module.framework/Headers/Module.h b/test/ARCMT/Inputs/Module.framework/Headers/Module.h
new file mode 100644
index 000000000000..3d2476b20431
--- /dev/null
+++ b/test/ARCMT/Inputs/Module.framework/Headers/Module.h
@@ -0,0 +1,28 @@
+// expected-warning 0-1 {{umbrella header}}
+
+// FIXME: The "umbrella header" warning should be moved to a separate test.
+// This "0-1" is only here because the warning is only emitted when the
+// module is (otherwise) successfully included.
+
+#ifndef MODULE_H
+#define MODULE_H
+const char *getModuleVersion(void);
+
+#ifdef FOO
+# error Module should have been built without -DFOO
+#endif
+
+@interface Module
++(const char *)version; // retrieve module version
++alloc;
+@end
+
+#define MODULE_H_MACRO 1
+#__private_macro MODULE_H_MACRO
+
+#include <Module/Sub.h>
+#include <Module/Buried/Treasure.h>
+
+__asm("foo");
+
+#endif // MODULE_H
diff --git a/test/ARCMT/Inputs/Module.framework/Headers/NotInModule.h b/test/ARCMT/Inputs/Module.framework/Headers/NotInModule.h
new file mode 100644
index 000000000000..6b15791eb2c7
--- /dev/null
+++ b/test/ARCMT/Inputs/Module.framework/Headers/NotInModule.h
@@ -0,0 +1 @@
+int not_in_module;
diff --git a/test/ARCMT/Inputs/Module.framework/Headers/Sub.h b/test/ARCMT/Inputs/Module.framework/Headers/Sub.h
new file mode 100644
index 000000000000..dea76e764617
--- /dev/null
+++ b/test/ARCMT/Inputs/Module.framework/Headers/Sub.h
@@ -0,0 +1,3 @@
+#include <Module/Sub2.h>
+int *Module_Sub;
+
diff --git a/test/ARCMT/Inputs/Module.framework/Headers/Sub2.h b/test/ARCMT/Inputs/Module.framework/Headers/Sub2.h
new file mode 100644
index 000000000000..beed4a862dca
--- /dev/null
+++ b/test/ARCMT/Inputs/Module.framework/Headers/Sub2.h
@@ -0,0 +1 @@
+int *Module_Sub2;
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/el/fp64/crtbegin.o b/test/ARCMT/Inputs/Module.framework/Module
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/el/fp64/crtbegin.o
+++ b/test/ARCMT/Inputs/Module.framework/Module
diff --git a/test/ARCMT/Inputs/Module.framework/PrivateHeaders/ModulePrivate.h b/test/ARCMT/Inputs/Module.framework/PrivateHeaders/ModulePrivate.h
new file mode 100644
index 000000000000..0782336df9de
--- /dev/null
+++ b/test/ARCMT/Inputs/Module.framework/PrivateHeaders/ModulePrivate.h
@@ -0,0 +1 @@
+int module_private;
diff --git a/test/ARCMT/Inputs/module.map b/test/ARCMT/Inputs/module.map
new file mode 100644
index 000000000000..061abbd24d57
--- /dev/null
+++ b/test/ARCMT/Inputs/module.map
@@ -0,0 +1,309 @@
+module c_library [extern_c] { module inner { header "c-header.h" } }
+module cxx_library { header "cxx-header.h" requires cplusplus }
+module c_library_bad [extern_c] { header "c-header-bad.h" }
+module diamond_top { header "diamond_top.h" }
+module diamond_left {
+ header "diamond_left.h"
+ export diamond_top
+}
+module diamond_right {
+ header "diamond_right.h"
+ export diamond_top
+}
+module diamond_bottom {
+ header "diamond_bottom.h"
+ export *
+}
+module irgen { header "irgen.h" }
+module cxx_irgen_top { header "cxx-irgen-top.h" }
+module cxx_irgen_left { header "cxx-irgen-left.h" }
+module cxx_irgen_right { header "cxx-irgen-right.h" }
+module lookup_left_objc { header "lookup_left.h" }
+module lookup_right_objc { header "lookup_right.h" }
+module lookup_left_cxx { header "lookup_left.hpp" }
+module lookup_right_cxx { header "lookup_right.hpp" }
+module module_private_left { header "module_private_left.h" }
+module module_private_right { header "module_private_right.h" }
+module macros_top {
+ header "macros_top.h"
+ explicit module b { header "macros_top_b.h" }
+ explicit module c { header "macros_top_c.h" }
+}
+module macros_left {
+ header "macros_left.h"
+ export *
+}
+module macros_right {
+ header "macros_right.h"
+ export *
+ explicit module undef {
+ header "macros_right_undef.h"
+ }
+}
+module macros { header "macros.h" }
+module macros_other { header "macros_other.h" }
+module category_top { header "category_top.h" }
+module category_left {
+ header "category_left.h"
+ export category_top
+
+ explicit module sub {
+ header "category_left_sub.h"
+ }
+}
+module category_right {
+ header "category_right.h"
+ export category_top
+
+ explicit module sub {
+ header "category_right_sub.h"
+ }
+}
+module category_bottom {
+ header "category_bottom.h"
+ export category_left
+ export category_right
+}
+module category_other { header "category_other.h" }
+module redeclarations_left { header "redeclarations_left.h" }
+module redeclarations_right { header "redeclarations_right.h" }
+module redecl_namespaces_left { header "redecl_namespaces_left.h" }
+module redecl_namespaces_right { header "redecl_namespaces_right.h" }
+module redecl_add_after_load_top { header "redecl-add-after-load-top.h" }
+module redecl_add_after_load { header "redecl-add-after-load.h" }
+module load_failure { header "load_failure.h" }
+
+module decldef {
+ explicit module Decl { header "decl.h" }
+ explicit module Decl2 { header "decl2.h" }
+ explicit module Def { header "def.h" }
+}
+
+module redecl_merge_top {
+ header "redecl-merge-top.h"
+ explicit module Explicit { header "redecl-merge-top-explicit.h" }
+ exclude header "nonexistent.h"
+}
+module redecl_merge_left {
+ header "redecl-merge-left.h"
+ export *
+}
+module redecl_merge_left_left {
+ header "redecl-merge-left-left.h"
+ export *
+}
+module redecl_merge_right {
+ header "redecl-merge-right.h"
+ export *
+}
+module redecl_merge_bottom {
+ explicit module prefix {
+ header "redecl-merge-bottom-prefix.h"
+ }
+
+ header "redecl-merge-bottom.h"
+ export *
+}
+module namespaces_top {
+ header "namespaces-top.h"
+ export *
+}
+module namespaces_left {
+ header "namespaces-left.h"
+ export *
+}
+module namespaces_right {
+ header "namespaces-right.h"
+ export *
+}
+module templates_top {
+ header "templates-top.h"
+ export *
+}
+module templates_left {
+ header "templates-left.h"
+ export *
+}
+module templates_right {
+ header "templates-right.h"
+ export *
+}
+module MethodPoolA {
+ header "MethodPoolA.h"
+
+ explicit module Sub2 {
+ header "MethodPoolASub2.h"
+ }
+
+ explicit module Sub {
+ header "MethodPoolASub.h"
+ }
+}
+module MethodPoolB {
+ header "MethodPoolB.h"
+
+ explicit module Sub2 {
+ header "MethodPoolBSub2.h"
+ }
+
+ explicit module Sub {
+ header "MethodPoolBSub.h"
+ }
+}
+module import_decl {
+ header "import-decl.h"
+}
+
+framework module * {
+ exclude NotAModule
+}
+
+module linkage_merge_left {
+ explicit module sub {
+ header "linkage-merge-sub.h"
+ }
+}
+
+module autolink {
+ header "autolink.h"
+ link "autolink"
+
+ explicit module sub {
+ header "autolink-sub.h"
+ link "autolink_sub"
+ }
+
+ explicit module sub2 {
+ header "autolink-sub2.h"
+ link framework "autolink_framework"
+ }
+
+ explicit module sub3 {
+ header "autolink-sub3.h"
+ link "autolink_from_pch"
+ }
+}
+
+module weird_objc {
+ header "weird_objc.h"
+}
+
+module ignored_macros {
+ header "ignored_macros.h"
+}
+
+module cxx_many_overloads {
+ header "cxx-many-overloads.h"
+}
+
+module cxx_inline_namespace {
+ header "cxx-inline-namespace.h"
+}
+
+module cxx_inline_namespace_b {
+ header "cxx-inline-namespace-b.h"
+}
+
+module cxx_linkage_cache {
+ header "cxx-linkage-cache.h"
+}
+
+module cxx_templates_common {
+ header "cxx-templates-common.h"
+}
+
+module cxx_templates_a {
+ header "cxx-templates-a.h"
+}
+
+module cxx_templates_b_impl {
+ header "cxx-templates-b-impl.h"
+}
+
+module cxx_templates_b {
+ header "cxx-templates-b.h"
+}
+
+module cxx_templates_c {
+ header "cxx-templates-c.h"
+}
+
+module cxx_decls {
+ module unimported {
+ header "cxx-decls-unimported.h"
+ }
+ module imported {
+ header "cxx-decls-imported.h"
+ }
+}
+
+module config {
+ header "config.h"
+ config_macros [exhaustive] WANT_FOO, WANT_BAR
+}
+
+module diag_pragma {
+ header "diag_pragma.h"
+}
+
+module dummy {
+ header "dummy.h"
+}
+
+module builtin {
+ header "builtin.h"
+ explicit module sub {
+ header "builtin_sub.h"
+ }
+}
+
+module linkage_merge {
+ explicit module foo {
+ header "linkage-merge-foo.h"
+ }
+ explicit module bar {
+ header "linkage-merge-bar.h"
+ }
+
+}
+
+module incomplete_mod {
+ header "incomplete_mod.h"
+}
+
+module warning {
+ header "warning.h"
+}
+
+module initializer_list {
+ header "initializer_list"
+}
+
+module using_decl {
+ module a { header "using-decl-a.h" export * }
+ module b { header "using-decl-b.h" export * }
+}
+
+module recursive_visibility_a1 {
+ module inner { header "recursive_visibility_a1_inner.h" }
+}
+module recursive_visibility_a2 {
+ module inner {
+ module more_inner {
+ header "recursive_visibility_a2_more_inner.h"
+ }
+ }
+}
+module recursive_visibility_b {
+ header "recursive_visibility_b.h"
+ export *
+}
+module recursive_visibility_c {
+ header "recursive_visibility_c.h"
+}
+module recursive1 {
+ header "recursive1.h"
+}
+module recursive2 {
+ header "recursive2.h"
+}
diff --git a/test/ARCMT/api.m b/test/ARCMT/api.m
index ba122c42bff3..b186ec724745 100644
--- a/test/ARCMT/api.m
+++ b/test/ARCMT/api.m
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c %s.result
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
#include "Common.h"
diff --git a/test/ARCMT/api.m.result b/test/ARCMT/api.m.result
index 7e04e7dc0c88..e3093751b626 100644
--- a/test/ARCMT/api.m.result
+++ b/test/ARCMT/api.m.result
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c %s.result
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
#include "Common.h"
diff --git a/test/ARCMT/assign-prop-with-arc-runtime.m b/test/ARCMT/assign-prop-with-arc-runtime.m
index c357eeb17177..a00538cd6197 100644
--- a/test/ARCMT/assign-prop-with-arc-runtime.m
+++ b/test/ARCMT/assign-prop-with-arc-runtime.m
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -fobjc-runtime-has-weak -x objective-c %s.result
// RUN: arcmt-test --args -triple x86_64-apple-macosx10.7 -fsyntax-only %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
#include "Common.h"
diff --git a/test/ARCMT/assign-prop-with-arc-runtime.m.result b/test/ARCMT/assign-prop-with-arc-runtime.m.result
index a255a36f2494..8bb684f79a33 100644
--- a/test/ARCMT/assign-prop-with-arc-runtime.m.result
+++ b/test/ARCMT/assign-prop-with-arc-runtime.m.result
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -fobjc-runtime-has-weak -x objective-c %s.result
// RUN: arcmt-test --args -triple x86_64-apple-macosx10.7 -fsyntax-only %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
#include "Common.h"
diff --git a/test/ARCMT/atautorelease-2.m b/test/ARCMT/atautorelease-2.m
index 5c2cd6b922fd..b9bc10655325 100644
--- a/test/ARCMT/atautorelease-2.m
+++ b/test/ARCMT/atautorelease-2.m
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c %s.result
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
@interface NSAutoreleasePool
- drain;
diff --git a/test/ARCMT/atautorelease-2.m.result b/test/ARCMT/atautorelease-2.m.result
index 06bf0d51e4bb..205473380b73 100644
--- a/test/ARCMT/atautorelease-2.m.result
+++ b/test/ARCMT/atautorelease-2.m.result
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c %s.result
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
@interface NSAutoreleasePool
- drain;
diff --git a/test/ARCMT/atautorelease-3.m b/test/ARCMT/atautorelease-3.m
index 0b6abdf83c46..87b80af9350e 100644
--- a/test/ARCMT/atautorelease-3.m
+++ b/test/ARCMT/atautorelease-3.m
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c %s.result
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
@interface NSAutoreleasePool
- drain;
diff --git a/test/ARCMT/atautorelease-3.m.result b/test/ARCMT/atautorelease-3.m.result
index 9103de4167ef..801376a7e82b 100644
--- a/test/ARCMT/atautorelease-3.m.result
+++ b/test/ARCMT/atautorelease-3.m.result
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c %s.result
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
@interface NSAutoreleasePool
- drain;
diff --git a/test/ARCMT/atautorelease-check.m b/test/ARCMT/atautorelease-check.m
index 8daf9d6bdeed..d74ef3b61d1f 100644
--- a/test/ARCMT/atautorelease-check.m
+++ b/test/ARCMT/atautorelease-check.m
@@ -1,5 +1,4 @@
// RUN: %clang_cc1 -arcmt-check -verify -triple x86_64-apple-darwin10 %s
-// DISABLE: mingw32
#if __has_feature(objc_arr)
#define NS_AUTOMATED_REFCOUNT_UNAVAILABLE __attribute__((unavailable("not available in automatic reference counting mode")))
diff --git a/test/ARCMT/atautorelease.m b/test/ARCMT/atautorelease.m
index 132553bdd331..a6aed146497b 100644
--- a/test/ARCMT/atautorelease.m
+++ b/test/ARCMT/atautorelease.m
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c %s.result
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
#include "Common.h"
diff --git a/test/ARCMT/atautorelease.m.result b/test/ARCMT/atautorelease.m.result
index 5191f4738eb8..e24339a3b9e3 100644
--- a/test/ARCMT/atautorelease.m.result
+++ b/test/ARCMT/atautorelease.m.result
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c %s.result
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
#include "Common.h"
diff --git a/test/ARCMT/autoreleases.m b/test/ARCMT/autoreleases.m
index 543bcf6632af..91413e51ca66 100644
--- a/test/ARCMT/autoreleases.m
+++ b/test/ARCMT/autoreleases.m
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c %s.result
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
#include "Common.h"
diff --git a/test/ARCMT/autoreleases.m.result b/test/ARCMT/autoreleases.m.result
index 9b71ff8b8945..32c7ad3c3971 100644
--- a/test/ARCMT/autoreleases.m.result
+++ b/test/ARCMT/autoreleases.m.result
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c %s.result
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
#include "Common.h"
diff --git a/test/ARCMT/check-with-pch.m b/test/ARCMT/check-with-pch.m
index 786700292ad0..1a94dda796b9 100644
--- a/test/ARCMT/check-with-pch.m
+++ b/test/ARCMT/check-with-pch.m
@@ -1,6 +1,5 @@
// RUN: %clang_cc1 -x objective-c -triple x86_64-apple-darwin10 %S/Common.h -emit-pch -o %t.pch
// RUN: %clang_cc1 -include-pch %t.pch -arcmt-check -verify -triple x86_64-apple-darwin10 -fblocks -Werror %s
-// DISABLE: mingw32
// rdar://9601437
@interface I9601437 {
diff --git a/test/ARCMT/checking-in-arc.m b/test/ARCMT/checking-in-arc.m
index 40d9b1684576..d41a162289b2 100644
--- a/test/ARCMT/checking-in-arc.m
+++ b/test/ARCMT/checking-in-arc.m
@@ -1,5 +1,4 @@
// RUN: %clang_cc1 -arcmt-check -fobjc-arc -fobjc-runtime=macosx-10.8.0 -triple x86_64-apple-darwin12 -fblocks -Werror %s
-// DISABLE: mingw32
#if __has_feature(objc_arc)
#define NS_AUTOMATED_REFCOUNT_UNAVAILABLE __attribute__((unavailable("not available in automatic reference counting mode")))
diff --git a/test/ARCMT/checking.m b/test/ARCMT/checking.m
index a550633171d1..7815103822a1 100644
--- a/test/ARCMT/checking.m
+++ b/test/ARCMT/checking.m
@@ -1,5 +1,4 @@
// RUN: %clang_cc1 -arcmt-check -verify -triple x86_64-apple-darwin10 -fblocks -Werror %s
-// DISABLE: mingw32
#if __has_feature(objc_arc)
#define NS_AUTOMATED_REFCOUNT_UNAVAILABLE __attribute__((unavailable("not available in automatic reference counting mode")))
@@ -45,9 +44,9 @@ struct UnsafeS {
};
@interface A : NSObject
-- (id)retain; // expected-note {{declaration has been explicitly marked unavailable here}}
-- (id)retainCount; // expected-note {{declaration has been explicitly marked unavailable here}}
-- (id)autorelease; // expected-note 2 {{declaration has been explicitly marked unavailable here}}
+- (id)retain; // expected-note {{'retain' has been explicitly marked unavailable here}}
+- (id)retainCount; // expected-note {{'retainCount' has been explicitly marked unavailable here}}
+- (id)autorelease; // expected-note 2 {{'autorelease' has been explicitly marked unavailable here}}
- (id)init;
- (oneway void)release;
- (void)dealloc;
diff --git a/test/ARCMT/cxx-checking.mm b/test/ARCMT/cxx-checking.mm
index 2f5d5d51655a..aa3bc466f672 100644
--- a/test/ARCMT/cxx-checking.mm
+++ b/test/ARCMT/cxx-checking.mm
@@ -1,5 +1,4 @@
// RUN: %clang_cc1 -arcmt-check -verify -triple x86_64-apple-darwin10 -fsyntax-only -fblocks %s
-// DISABLE: mingw32
// Classes that have an Objective-C object pointer.
struct HasObjectMember0 {
@@ -81,7 +80,7 @@ int check_non_pod_block1[__is_pod(int (^ __unsafe_unretained)(int))? 1 : -1];
struct FlexibleArrayMember0 {
int length;
- id array[]; // expected-error{{flexible array member 'array' of non-POD element type 'id __strong[]'}}
+ id array[]; // expected-error{{flexible array member 'array' of type 'id __strong[]' with non-trivial destruction}}
};
struct FlexibleArrayMember1 {
diff --git a/test/ARCMT/cxx-rewrite.mm b/test/ARCMT/cxx-rewrite.mm
index 92bb71807d00..4a9c50c92426 100644
--- a/test/ARCMT/cxx-rewrite.mm
+++ b/test/ARCMT/cxx-rewrite.mm
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c++ %s.result
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c++ %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
#include "Common.h"
diff --git a/test/ARCMT/cxx-rewrite.mm.result b/test/ARCMT/cxx-rewrite.mm.result
index 7c944d5f240a..a96d254bf463 100644
--- a/test/ARCMT/cxx-rewrite.mm.result
+++ b/test/ARCMT/cxx-rewrite.mm.result
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c++ %s.result
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c++ %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
#include "Common.h"
diff --git a/test/ARCMT/dealloc.m b/test/ARCMT/dealloc.m
index 34df1a49b693..d7a72af4f726 100644
--- a/test/ARCMT/dealloc.m
+++ b/test/ARCMT/dealloc.m
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c %s.result
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
@interface A
- (id)retain;
diff --git a/test/ARCMT/dealloc.m.result b/test/ARCMT/dealloc.m.result
index 3ff2885341c4..fbd9e445d275 100644
--- a/test/ARCMT/dealloc.m.result
+++ b/test/ARCMT/dealloc.m.result
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c %s.result
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
@interface A
- (id)retain;
diff --git a/test/ARCMT/designated-init-in-header/designated-init-in-header.m b/test/ARCMT/designated-init-in-header/designated-init-in-header.m
new file mode 100644
index 000000000000..8286583b3c89
--- /dev/null
+++ b/test/ARCMT/designated-init-in-header/designated-init-in-header.m
@@ -0,0 +1,3 @@
+// RUN: %clang_cc1 -objcmt-migrate-designated-init -objcmt-migrate-readwrite-property -objcmt-migrate-instancetype -x objective-c %S/file1.m.in -triple x86_64-apple-darwin11 -fobjc-arc -migrate -o %t1.remap
+// RUN: %clang_cc1 -objcmt-migrate-designated-init -objcmt-migrate-readwrite-property -objcmt-migrate-instancetype -x objective-c %S/file2.m.in -triple x86_64-apple-darwin11 -fobjc-arc -migrate -o %t2.remap
+// RUN: c-arcmt-test %t1.remap %t2.remap | arcmt-test -verify-transformed-files %S/header1.h.result %S/file2.m.in.result
diff --git a/test/ARCMT/designated-init-in-header/file1.m.in b/test/ARCMT/designated-init-in-header/file1.m.in
new file mode 100644
index 000000000000..0201b32abd32
--- /dev/null
+++ b/test/ARCMT/designated-init-in-header/file1.m.in
@@ -0,0 +1,2 @@
+#include "header1.h"
+
diff --git a/test/ARCMT/designated-init-in-header/file2.m.in b/test/ARCMT/designated-init-in-header/file2.m.in
new file mode 100644
index 000000000000..258159735a77
--- /dev/null
+++ b/test/ARCMT/designated-init-in-header/file2.m.in
@@ -0,0 +1,14 @@
+#include "header1.h"
+
+@implementation S1
+-(int)prop { return 0; }
+-(void)setProp:(int)p {}
++(id)s1 { return 0; }
+-(id)initWithFoo:(NSString*)foo
+{
+ self = [super init];
+ if (self) {
+ }
+ return self;
+}
+@end
diff --git a/test/ARCMT/designated-init-in-header/file2.m.in.result b/test/ARCMT/designated-init-in-header/file2.m.in.result
new file mode 100644
index 000000000000..7465ed576f5f
--- /dev/null
+++ b/test/ARCMT/designated-init-in-header/file2.m.in.result
@@ -0,0 +1,14 @@
+#include "header1.h"
+
+@implementation S1
+-(int)prop { return 0; }
+-(void)setProp:(int)p {}
++(instancetype)s1 { return 0; }
+-(instancetype)initWithFoo:(NSString*)foo
+{
+ self = [super init];
+ if (self) {
+ }
+ return self;
+}
+@end
diff --git a/test/ARCMT/designated-init-in-header/header1.h b/test/ARCMT/designated-init-in-header/header1.h
new file mode 100644
index 000000000000..c5668cc46086
--- /dev/null
+++ b/test/ARCMT/designated-init-in-header/header1.h
@@ -0,0 +1,14 @@
+#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
+
+@class NSString;
+
+@interface B1
+-(id)init;
+@end
+
+@interface S1 : B1
+-(int)prop;
+-(void)setProp:(int)p;
++(id)s1;
+-(id)initWithFoo:(NSString*)foo;
+@end
diff --git a/test/ARCMT/designated-init-in-header/header1.h.result b/test/ARCMT/designated-init-in-header/header1.h.result
new file mode 100644
index 000000000000..974175b1c3e6
--- /dev/null
+++ b/test/ARCMT/designated-init-in-header/header1.h.result
@@ -0,0 +1,13 @@
+#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
+
+@class NSString;
+
+@interface B1
+-(instancetype)init;
+@end
+
+@interface S1 : B1
+@property (nonatomic) int prop;
++(instancetype)s1;
+-(instancetype)initWithFoo:(NSString*)foo NS_DESIGNATED_INITIALIZER;
+@end
diff --git a/test/ARCMT/init.m b/test/ARCMT/init.m
index 9dbb1f82b828..b1f127e54fd1 100644
--- a/test/ARCMT/init.m
+++ b/test/ARCMT/init.m
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c %s.result
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
#define nil (void *)0
diff --git a/test/ARCMT/init.m.result b/test/ARCMT/init.m.result
index d7f730083aab..d550dedb1dc1 100644
--- a/test/ARCMT/init.m.result
+++ b/test/ARCMT/init.m.result
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c %s.result
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
#define nil (void *)0
diff --git a/test/ARCMT/migrate-on-pch-and-module.m b/test/ARCMT/migrate-on-pch-and-module.m
new file mode 100644
index 000000000000..c98ce467f6c7
--- /dev/null
+++ b/test/ARCMT/migrate-on-pch-and-module.m
@@ -0,0 +1,12 @@
+// RUN: rm -rf %t-mcp
+// RUN: %clang_cc1 -objcmt-migrate-subscripting -emit-pch -o %t.pch %s -isysroot %S/Inputs/System -triple x86_64-apple-darwin10 -F %S/Inputs -fmodules -fmodules-cache-path=%t-mcp -w
+// RUN: %clang_cc1 -objcmt-migrate-subscripting -include-pch %t.pch %s -migrate -o %t.remap -isysroot %S/Inputs/System -triple x86_64-apple-darwin10 -F %S/Inputs -fmodules -fmodules-cache-path=%t-mcp
+
+#ifndef HEADER
+#define HEADER
+
+@import Module;
+
+#else
+
+#endif
diff --git a/test/ARCMT/migrate-plist-output.m b/test/ARCMT/migrate-plist-output.m
index 377dce30cafc..9b47b91d5809 100644
--- a/test/ARCMT/migrate-plist-output.m
+++ b/test/ARCMT/migrate-plist-output.m
@@ -49,4 +49,3 @@ void test(id p) {
// CHECK: </dict>
// CHECK: </plist>
-// DISABLE: mingw32
diff --git a/test/ARCMT/migrate-space-in-path.m b/test/ARCMT/migrate-space-in-path.m
index 89dfe1475cfe..a797e6d1f482 100644
--- a/test/ARCMT/migrate-space-in-path.m
+++ b/test/ARCMT/migrate-space-in-path.m
@@ -3,4 +3,3 @@
// RUN: %clang_cc1 -arcmt-migrate -mt-migrate-directory %t.migrate %S/"with space"/test2.m.in -x objective-c
// RUN: c-arcmt-test -mt-migrate-directory %t.migrate | arcmt-test -verify-transformed-files %S/"with space"/test1.m.in.result %S/"with space"/test2.m.in.result %S/"with space"/test.h.result
// RUN: rm -rf %t.migrate
-// DISABLE: mingw32
diff --git a/test/ARCMT/migrate-with-pch.m b/test/ARCMT/migrate-with-pch.m
index 7dca8be48844..1aafbdaf9b1e 100644
--- a/test/ARCMT/migrate-with-pch.m
+++ b/test/ARCMT/migrate-with-pch.m
@@ -4,4 +4,3 @@
// RUN: %clang_cc1 -arcmt-migrate -mt-migrate-directory %t %S/Inputs/test2.m.in -x objective-c -include-pch %t.pch
// RUN: c-arcmt-test -mt-migrate-directory %t | arcmt-test -verify-transformed-files %S/Inputs/test1.m.in.result %S/Inputs/test2.m.in.result %S/Inputs/test.h.result
// RUN: rm -rf %t
-// DISABLE: mingw32
diff --git a/test/ARCMT/migrate.m b/test/ARCMT/migrate.m
index 6f41258e59d6..d92cef7eb7cc 100644
--- a/test/ARCMT/migrate.m
+++ b/test/ARCMT/migrate.m
@@ -3,4 +3,3 @@
// RUN: %clang_cc1 -arcmt-migrate -mt-migrate-directory %t %S/Inputs/test2.m.in -x objective-c
// RUN: c-arcmt-test -mt-migrate-directory %t | arcmt-test -verify-transformed-files %S/Inputs/test1.m.in.result %S/Inputs/test2.m.in.result %S/Inputs/test.h.result
// RUN: rm -rf %t
-// DISABLE: mingw32
diff --git a/test/ARCMT/no-canceling-bridge-to-bridge-cast.m b/test/ARCMT/no-canceling-bridge-to-bridge-cast.m
index 81841fbf1e89..2c47822001e5 100644
--- a/test/ARCMT/no-canceling-bridge-to-bridge-cast.m
+++ b/test/ARCMT/no-canceling-bridge-to-bridge-cast.m
@@ -1,5 +1,4 @@
// RUN: %clang_cc1 -arcmt-check -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c -verify %s
-// DISABLE: mingw32
// rdar://10387088
typedef const void * CFTypeRef;
CFTypeRef CFBridgingRetain(id X);
diff --git a/test/ARCMT/nonobjc-to-objc-cast-2.m b/test/ARCMT/nonobjc-to-objc-cast-2.m
index e554c7da2d45..2b421b0757ad 100644
--- a/test/ARCMT/nonobjc-to-objc-cast-2.m
+++ b/test/ARCMT/nonobjc-to-objc-cast-2.m
@@ -1,5 +1,4 @@
// RUN: %clang_cc1 -arcmt-check -verify -triple x86_64-apple-darwin10 %s
-// DISABLE: mingw32
#include "Common.h"
diff --git a/test/ARCMT/nonobjc-to-objc-cast.m b/test/ARCMT/nonobjc-to-objc-cast.m
index 55b6655fa404..b7d2a734b9c4 100644
--- a/test/ARCMT/nonobjc-to-objc-cast.m
+++ b/test/ARCMT/nonobjc-to-objc-cast.m
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c %s.result
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
#include "Common.h"
diff --git a/test/ARCMT/nonobjc-to-objc-cast.m.result b/test/ARCMT/nonobjc-to-objc-cast.m.result
index 4f508f6adfb6..ce827ba66aaf 100644
--- a/test/ARCMT/nonobjc-to-objc-cast.m.result
+++ b/test/ARCMT/nonobjc-to-objc-cast.m.result
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c %s.result
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
#include "Common.h"
diff --git a/test/ARCMT/objcmt-arc-cf-annotations.m b/test/ARCMT/objcmt-arc-cf-annotations.m
index 9772825b2934..c9a5b8215d10 100644
--- a/test/ARCMT/objcmt-arc-cf-annotations.m
+++ b/test/ARCMT/objcmt-arc-cf-annotations.m
@@ -360,7 +360,7 @@ CFAbsoluteTime f2() {
NSDate* global_x;
-// Test to see if we supresss an error when we store the pointer
+// Test to see if we suppress an error when we store the pointer
// to a global.
CFAbsoluteTime f3() {
@@ -528,38 +528,54 @@ void f15() {
CFRelease(*B); // no-warning
}
-// Test when we pass NULL to CFRetain/CFRelease/CFMakeCollectable.
+// Test when we pass NULL to CFRetain/CFRelease/CFMakeCollectable/CFAutorelease.
void f16(int x, CFTypeRef p) {
if (p)
return;
- if (x > 0) {
- CFRelease(p); // expected-warning{{Null pointer argument in call to CFRelease}}
- }
- else if (x < 0) {
- CFRetain(p); // expected-warning{{Null pointer argument in call to CFRetain}}
- }
- else {
- CFMakeCollectable(p); // expected-warning{{Null pointer argument in call to CFMakeCollectable}}
+ switch (x) {
+ case 0:
+ CFRelease(p);
+ break;
+ case 1:
+ CFRetain(p);
+ break;
+ case 2:
+ CFMakeCollectable(p);
+ break;
+ case 3:
+ CFAutorelease(p);
+ break;
+ default:
+ break;
}
}
-// Test that an object is non-null after being CFRetained/CFReleased.
+// Test that an object is non-null after CFRetain/CFRelease/CFMakeCollectable/CFAutorelease.
void f17(int x, CFTypeRef p) {
- if (x > 0) {
+ switch (x) {
+ case 0:
CFRelease(p);
if (!p)
CFRelease(0); // no-warning
- }
- else if (x < 0) {
+ break;
+ case 1:
CFRetain(p);
if (!p)
CFRetain(0); // no-warning
- }
- else {
+ break;
+ case 2:
CFMakeCollectable(p);
if (!p)
CFMakeCollectable(0); // no-warning
+ break;
+ case 3:
+ CFAutorelease(p);
+ if (!p)
+ CFAutorelease(0); // no-warning
+ break;
+ default:
+ break;
}
}
diff --git a/test/ARCMT/objcmt-arc-cf-annotations.m.result b/test/ARCMT/objcmt-arc-cf-annotations.m.result
index 7e0a9042f5e6..84bc43dcb5ca 100644
--- a/test/ARCMT/objcmt-arc-cf-annotations.m.result
+++ b/test/ARCMT/objcmt-arc-cf-annotations.m.result
@@ -390,7 +390,7 @@ CFAbsoluteTime f2() {
NSDate* global_x;
-// Test to see if we supresss an error when we store the pointer
+// Test to see if we suppress an error when we store the pointer
// to a global.
CFAbsoluteTime f3() {
@@ -570,38 +570,54 @@ void f15() {
CFRelease(*B); // no-warning
}
-// Test when we pass NULL to CFRetain/CFRelease/CFMakeCollectable.
+// Test when we pass NULL to CFRetain/CFRelease/CFMakeCollectable/CFAutorelease.
void f16(int x, CFTypeRef p) {
if (p)
return;
- if (x > 0) {
- CFRelease(p); // expected-warning{{Null pointer argument in call to CFRelease}}
- }
- else if (x < 0) {
- CFRetain(p); // expected-warning{{Null pointer argument in call to CFRetain}}
- }
- else {
- CFMakeCollectable(p); // expected-warning{{Null pointer argument in call to CFMakeCollectable}}
+ switch (x) {
+ case 0:
+ CFRelease(p);
+ break;
+ case 1:
+ CFRetain(p);
+ break;
+ case 2:
+ CFMakeCollectable(p);
+ break;
+ case 3:
+ CFAutorelease(p);
+ break;
+ default:
+ break;
}
}
-// Test that an object is non-null after being CFRetained/CFReleased.
+// Test that an object is non-null after CFRetain/CFRelease/CFMakeCollectable/CFAutorelease.
void f17(int x, CFTypeRef p) {
- if (x > 0) {
+ switch (x) {
+ case 0:
CFRelease(p);
if (!p)
CFRelease(0); // no-warning
- }
- else if (x < 0) {
+ break;
+ case 1:
CFRetain(p);
if (!p)
CFRetain(0); // no-warning
- }
- else {
+ break;
+ case 2:
CFMakeCollectable(p);
if (!p)
CFMakeCollectable(0); // no-warning
+ break;
+ case 3:
+ CFAutorelease(p);
+ if (!p)
+ CFAutorelease(0); // no-warning
+ break;
+ default:
+ break;
}
}
diff --git a/test/ARCMT/objcmt-atomic-property.m.result b/test/ARCMT/objcmt-atomic-property.m.result
index 1650cd23e3bd..3378ff1e487f 100644
--- a/test/ARCMT/objcmt-atomic-property.m.result
+++ b/test/ARCMT/objcmt-atomic-property.m.result
@@ -23,14 +23,14 @@ typedef char BOOL;
}
@property (weak) NSString *WeakProp;
-@property (retain) NSString *StrongProp;
+@property (strong) NSString *StrongProp;
-@property (retain) NSString *UnavailProp __attribute__((unavailable));
+@property (strong) NSString *UnavailProp __attribute__((unavailable));
- (void) setUnavailProp : (NSString *)Val;
-@property (retain) NSString *UnavailProp1 __attribute__((unavailable));
+@property (strong) NSString *UnavailProp1 __attribute__((unavailable));
-@property (retain) NSString *UnavailProp2;
+@property (strong) NSString *UnavailProp2;
- (void) setUnavailProp2 : (NSString *)Val __attribute__((unavailable));
@property (copy) NSDictionary *undoAction;
@@ -48,10 +48,10 @@ typedef char BOOL;
NSArray *_names3;
NSArray *_names4;
}
-@property (retain) NSArray *names2;
-@property (retain) NSArray *names3;
-@property (retain) NSArray *names4;
-@property (retain) NSArray *names1;
+@property (strong) NSArray *names2;
+@property (strong) NSArray *names3;
+@property (strong) NSArray *names4;
+@property (strong) NSArray *names1;
@end
// Properties that contain the name "delegate" or "dataSource",
@@ -64,9 +64,9 @@ typedef char BOOL;
@property (assign) id xxxdelegateYYY;
-@property (retain) id MYtarget;
+@property (strong) id MYtarget;
-@property (retain) id targetX;
+@property (strong) id targetX;
@property int value;
@@ -80,14 +80,14 @@ typedef char BOOL;
- (void) Nothing;
@property (readonly) int Length;
-@property (readonly, retain) id object;
+@property (readonly, strong) id object;
+ (double) D;
@property (readonly) void *JSObject WEBKIT_OBJC_METHOD_ANNOTATION(AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER);
@property (getter=isIgnoringInteractionEvents, readonly) BOOL ignoringInteractionEvents;
-@property (getter=getStringValue, retain) NSString *stringValue;
+@property (getter=getStringValue, strong) NSString *stringValue;
@property (getter=getCounterValue, readonly) BOOL counterValue;
-@property (getter=getns_dixtionary, readonly, retain) NSDictionary *ns_dixtionary;
+@property (getter=getns_dixtionary, readonly, copy) NSDictionary *ns_dixtionary;
- (BOOL)is3bar; // watch out
- (NSString *)get3foo; // watch out
@@ -108,9 +108,9 @@ typedef char BOOL;
@property (assign) id xxxdelegateYYY;
-@property (retain) id MYtarget;
+@property (strong) id MYtarget;
-@property (retain) id targetX;
+@property (strong) id targetX;
@property int value;
@@ -124,7 +124,7 @@ typedef char BOOL;
- (void) Nothing;
@property (readonly) int Length;
-@property (readonly, retain) id object;
+@property (readonly, strong) id object;
+ (double) D;
- (BOOL)is3bar; // watch out
@@ -161,26 +161,26 @@ DEPRECATED
@interface NSURL
// Do not infer a property.
-@property (retain) NSURL *appStoreReceiptURL NS_AVAILABLE;
+@property (strong) NSURL *appStoreReceiptURL NS_AVAILABLE;
- (void) setAppStoreReceiptURL : (NSURL *)object;
-@property (retain) NSURL *appStoreReceiptURLX NS_AVAILABLE;
+@property (strong) NSURL *appStoreReceiptURLX NS_AVAILABLE;
// Do not infer a property.
-@property (retain) NSURL *appStoreReceiptURLY ;
+@property (strong) NSURL *appStoreReceiptURLY ;
- (void) setAppStoreReceiptURLY : (NSURL *)object NS_AVAILABLE;
-@property (readonly, retain) id OkToInfer NS_AVAILABLE;
+@property (readonly, strong) id OkToInfer NS_AVAILABLE;
// Do not infer a property.
-@property (retain) NSURL *appStoreReceiptURLZ ;
+@property (strong) NSURL *appStoreReceiptURLZ ;
- (void) setAppStoreReceiptURLZ : (NSURL *)object NS_AVAILABLE;
// Do not infer a property.
- (id) t1 NORETURN NS_AVAILABLE;
- (void) setT1 : (id) arg NS_AVAILABLE;
-@property (retain) id method1 ALIGNED NS_AVAILABLE;
+@property (strong) id method1 ALIGNED NS_AVAILABLE;
- (NSURL *)init; // No Change
+ (id)alloc; // No Change
diff --git a/test/ARCMT/objcmt-deprecated-category.m b/test/ARCMT/objcmt-deprecated-category.m
deleted file mode 100644
index 5939e5a50ada..000000000000
--- a/test/ARCMT/objcmt-deprecated-category.m
+++ /dev/null
@@ -1,48 +0,0 @@
-// RUN: rm -rf %t
-// RUN: %clang_cc1 -objcmt-migrate-annotation -mt-migrate-directory %t %s -x objective-c -triple x86_64-apple-darwin11
-// RUN: c-arcmt-test -mt-migrate-directory %t | arcmt-test -verify-transformed-files %s.result
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s.result
-// rdar://15337661
-
-#define DEPRECATED __attribute__((deprecated))
-
-@interface NSArray
-- (int)one;
-@end
-
-@interface NSArray (NSDraggingSourceDeprecated)
-
-/* This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:range: instead.
-*/
-- (void)getObjects:(id __unsafe_unretained [])objects;
-- (void)dep_getObjects:(id __unsafe_unretained [])dep_objects DEPRECATED;
-
-@end
-
-@interface NSArray (NSDeprecated)
-
-/* This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:range: instead.
-*/
-- (void)dep_getObjects:(id __unsafe_unretained [])dep_objects DEPRECATED;
-- (void)getObjects:(id __unsafe_unretained [])objects;
-@property int P1;
-@property int P2 DEPRECATED;
-@end
-
-@interface NSArray (DraggingSourceDeprecated)
-
-/* This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:range: instead.
-*/
-- (void)getObjects:(id __unsafe_unretained [])objects;
-- (void)dep_getObjects:(id __unsafe_unretained [])dep_objects DEPRECATED;
-@property int P1;
-@property int P2 DEPRECATED;
-
-@end
-
-@interface NSArray (Deprecated)
-- (void)getObjects:(id __unsafe_unretained [])objects;
-- (void)dep_getObjects:(id __unsafe_unretained [])dep_objects DEPRECATED;
-@property int P1;
-@property int P2 DEPRECATED;
-@end
diff --git a/test/ARCMT/objcmt-deprecated-category.m.result b/test/ARCMT/objcmt-deprecated-category.m.result
deleted file mode 100644
index 3cb100044e46..000000000000
--- a/test/ARCMT/objcmt-deprecated-category.m.result
+++ /dev/null
@@ -1,48 +0,0 @@
-// RUN: rm -rf %t
-// RUN: %clang_cc1 -objcmt-migrate-annotation -mt-migrate-directory %t %s -x objective-c -triple x86_64-apple-darwin11
-// RUN: c-arcmt-test -mt-migrate-directory %t | arcmt-test -verify-transformed-files %s.result
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s.result
-// rdar://15337661
-
-#define DEPRECATED __attribute__((deprecated))
-
-@interface NSArray
-- (int)one;
-@end
-
-@interface NSArray (NSDraggingSourceDeprecated)
-
-/* This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:range: instead.
-*/
-- (void)getObjects:(id __unsafe_unretained [])objects DEPRECATED;
-- (void)dep_getObjects:(id __unsafe_unretained [])dep_objects DEPRECATED;
-
-@end
-
-@interface NSArray (NSDeprecated)
-
-/* This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:range: instead.
-*/
-- (void)dep_getObjects:(id __unsafe_unretained [])dep_objects DEPRECATED;
-- (void)getObjects:(id __unsafe_unretained [])objects DEPRECATED;
-@property int P1 DEPRECATED;
-@property int P2 DEPRECATED;
-@end
-
-@interface NSArray (DraggingSourceDeprecated)
-
-/* This method is unsafe because it could potentially cause buffer overruns. You should use -getObjects:range: instead.
-*/
-- (void)getObjects:(id __unsafe_unretained [])objects DEPRECATED;
-- (void)dep_getObjects:(id __unsafe_unretained [])dep_objects DEPRECATED;
-@property int P1 DEPRECATED;
-@property int P2 DEPRECATED;
-
-@end
-
-@interface NSArray (Deprecated)
-- (void)getObjects:(id __unsafe_unretained [])objects DEPRECATED;
-- (void)dep_getObjects:(id __unsafe_unretained [])dep_objects DEPRECATED;
-@property int P1 DEPRECATED;
-@property int P2 DEPRECATED;
-@end
diff --git a/test/ARCMT/objcmt-designated-initializer.m b/test/ARCMT/objcmt-designated-initializer.m
new file mode 100644
index 000000000000..279d4f35d8eb
--- /dev/null
+++ b/test/ARCMT/objcmt-designated-initializer.m
@@ -0,0 +1,44 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -objcmt-migrate-designated-init %s -triple x86_64-apple-darwin11 -fobjc-arc -migrate -o %t.remap
+// RUN: c-arcmt-test %t.remap | arcmt-test -verify-transformed-files %s.result
+// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -x objective-c -fobjc-arc %s.result
+
+#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
+
+@class NSString;
+
+@interface B1
+-(id)init;
+@end
+
+@interface S1 : B1
+-(id)initWithFoo:(NSString*)foo;
+@end
+
+@implementation S1
+-(id)initWithFoo:(NSString*)foo
+{
+ self = [super init];
+ if (self) {
+ }
+ return self;
+}
+@end
+
+@interface B2
+-(id)init NS_DESIGNATED_INITIALIZER;
+@end
+
+@interface S2 : B2
+-(id)init;
+@end
+
+@implementation S2
+-(id)init
+{
+ self = [super init];
+ if (self) {
+ }
+ return self;
+}
+@end
diff --git a/test/ARCMT/objcmt-designated-initializer.m.result b/test/ARCMT/objcmt-designated-initializer.m.result
new file mode 100644
index 000000000000..4c59b0cc5826
--- /dev/null
+++ b/test/ARCMT/objcmt-designated-initializer.m.result
@@ -0,0 +1,44 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -objcmt-migrate-designated-init %s -triple x86_64-apple-darwin11 -fobjc-arc -migrate -o %t.remap
+// RUN: c-arcmt-test %t.remap | arcmt-test -verify-transformed-files %s.result
+// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -x objective-c -fobjc-arc %s.result
+
+#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
+
+@class NSString;
+
+@interface B1
+-(id)init;
+@end
+
+@interface S1 : B1
+-(id)initWithFoo:(NSString*)foo NS_DESIGNATED_INITIALIZER;
+@end
+
+@implementation S1
+-(id)initWithFoo:(NSString*)foo
+{
+ self = [super init];
+ if (self) {
+ }
+ return self;
+}
+@end
+
+@interface B2
+-(id)init NS_DESIGNATED_INITIALIZER;
+@end
+
+@interface S2 : B2
+-(id)init;
+@end
+
+@implementation S2
+-(id)init
+{
+ self = [super init];
+ if (self) {
+ }
+ return self;
+}
+@end
diff --git a/test/ARCMT/objcmt-instancetype-2.m.result b/test/ARCMT/objcmt-instancetype-2.m.result
index 8837e971ad27..7a32894f5706 100644
--- a/test/ARCMT/objcmt-instancetype-2.m.result
+++ b/test/ARCMT/objcmt-instancetype-2.m.result
@@ -16,10 +16,10 @@ typedef char BOOL;
@class NSString, NSURL;
@interface NSString (NSStringDeprecated)
-+ (instancetype)stringWithContentsOfFile:(NSString *)path __attribute__((availability(macosx,introduced=10.0 ,message="" )));
-+ (instancetype)stringWithContentsOfURL:(NSURL *)url __attribute__((availability(macosx,introduced=10.0 ,message="" )));
-+ (instancetype)stringWithCString:(const char *)bytes length:(NSUInteger)length __attribute__((availability(macosx,introduced=10.0 ,message="" )));
-+ (instancetype)stringWithCString:(const char *)bytes __attribute__((availability(macosx,introduced=10.0 ,message="" )));
++ (id)stringWithContentsOfFile:(NSString *)path __attribute__((availability(macosx,introduced=10.0 ,message="" )));
++ (id)stringWithContentsOfURL:(NSURL *)url __attribute__((availability(macosx,introduced=10.0 ,message="" )));
++ (id)stringWithCString:(const char *)bytes length:(NSUInteger)length __attribute__((availability(macosx,introduced=10.0 ,message="" )));
++ (id)stringWithCString:(const char *)bytes __attribute__((availability(macosx,introduced=10.0 ,message="" )));
@end
diff --git a/test/ARCMT/objcmt-instancetype-unnecessary-diff.m b/test/ARCMT/objcmt-instancetype-unnecessary-diff.m
new file mode 100644
index 000000000000..e250bb0956c0
--- /dev/null
+++ b/test/ARCMT/objcmt-instancetype-unnecessary-diff.m
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -objcmt-migrate-instancetype %s -triple x86_64-apple-darwin11 -fobjc-arc -migrate -o %t.remap
+// RUN: FileCheck %s -input-file=%t.remap
+
+// Make sure we don't create an edit unnecessarily.
+// CHECK-NOT: instancetype
+
+@class NSString;
+@interface NSDictionary
++(instancetype) dictionaryWithURLEncodedString:(NSString *)urlEncodedString;
+@end
diff --git a/test/ARCMT/objcmt-ns-nonatomic-iosonly.m.result b/test/ARCMT/objcmt-ns-nonatomic-iosonly.m.result
index 804142ee3280..8e9e3a0c21ca 100644
--- a/test/ARCMT/objcmt-ns-nonatomic-iosonly.m.result
+++ b/test/ARCMT/objcmt-ns-nonatomic-iosonly.m.result
@@ -30,14 +30,14 @@ typedef char BOOL;
}
@property (NS_NONATOMIC_IOSONLY, weak) NSString *WeakProp;
-@property (NS_NONATOMIC_IOSONLY, retain) NSString *StrongProp;
+@property (NS_NONATOMIC_IOSONLY, strong) NSString *StrongProp;
-@property (NS_NONATOMIC_IOSONLY, retain) NSString *UnavailProp __attribute__((unavailable));
+@property (NS_NONATOMIC_IOSONLY, strong) NSString *UnavailProp __attribute__((unavailable));
- (void) setUnavailProp : (NSString *)Val;
-@property (NS_NONATOMIC_IOSONLY, retain) NSString *UnavailProp1 __attribute__((unavailable));
+@property (NS_NONATOMIC_IOSONLY, strong) NSString *UnavailProp1 __attribute__((unavailable));
-@property (NS_NONATOMIC_IOSONLY, retain) NSString *UnavailProp2;
+@property (NS_NONATOMIC_IOSONLY, strong) NSString *UnavailProp2;
- (void) setUnavailProp2 : (NSString *)Val __attribute__((unavailable));
@property (NS_NONATOMIC_IOSONLY, copy) NSDictionary *undoAction;
@@ -55,10 +55,10 @@ typedef char BOOL;
NSArray *_names3;
NSArray *_names4;
}
-@property (NS_NONATOMIC_IOSONLY, retain) NSArray *names2;
-@property (NS_NONATOMIC_IOSONLY, retain) NSArray *names3;
-@property (NS_NONATOMIC_IOSONLY, retain) NSArray *names4;
-@property (NS_NONATOMIC_IOSONLY, retain) NSArray *names1;
+@property (NS_NONATOMIC_IOSONLY, strong) NSArray *names2;
+@property (NS_NONATOMIC_IOSONLY, strong) NSArray *names3;
+@property (NS_NONATOMIC_IOSONLY, strong) NSArray *names4;
+@property (NS_NONATOMIC_IOSONLY, strong) NSArray *names1;
@end
// Properties that contain the name "delegate" or "dataSource",
@@ -71,9 +71,9 @@ typedef char BOOL;
@property (NS_NONATOMIC_IOSONLY, assign) id xxxdelegateYYY;
-@property (NS_NONATOMIC_IOSONLY, retain) id MYtarget;
+@property (NS_NONATOMIC_IOSONLY, strong) id MYtarget;
-@property (NS_NONATOMIC_IOSONLY, retain) id targetX;
+@property (NS_NONATOMIC_IOSONLY, strong) id targetX;
@property (NS_NONATOMIC_IOSONLY) int value;
@@ -87,14 +87,14 @@ typedef char BOOL;
- (void) Nothing;
@property (NS_NONATOMIC_IOSONLY, readonly) int Length;
-@property (NS_NONATOMIC_IOSONLY, readonly, retain) id object;
+@property (NS_NONATOMIC_IOSONLY, readonly, strong) id object;
+ (double) D;
@property (NS_NONATOMIC_IOSONLY, readonly) void *JSObject WEBKIT_OBJC_METHOD_ANNOTATION(AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER);
@property (NS_NONATOMIC_IOSONLY, getter=isIgnoringInteractionEvents, readonly) BOOL ignoringInteractionEvents;
-@property (NS_NONATOMIC_IOSONLY, getter=getStringValue, retain) NSString *stringValue;
+@property (NS_NONATOMIC_IOSONLY, getter=getStringValue, strong) NSString *stringValue;
@property (NS_NONATOMIC_IOSONLY, getter=getCounterValue, readonly) BOOL counterValue;
-@property (NS_NONATOMIC_IOSONLY, getter=getns_dixtionary, readonly, retain) NSDictionary *ns_dixtionary;
+@property (NS_NONATOMIC_IOSONLY, getter=getns_dixtionary, readonly, copy) NSDictionary *ns_dixtionary;
- (BOOL)is3bar; // watch out
- (NSString *)get3foo; // watch out
@@ -115,9 +115,9 @@ typedef char BOOL;
@property (NS_NONATOMIC_IOSONLY, assign) id xxxdelegateYYY;
-@property (NS_NONATOMIC_IOSONLY, retain) id MYtarget;
+@property (NS_NONATOMIC_IOSONLY, strong) id MYtarget;
-@property (NS_NONATOMIC_IOSONLY, retain) id targetX;
+@property (NS_NONATOMIC_IOSONLY, strong) id targetX;
@property (NS_NONATOMIC_IOSONLY) int value;
@@ -131,7 +131,7 @@ typedef char BOOL;
- (void) Nothing;
@property (NS_NONATOMIC_IOSONLY, readonly) int Length;
-@property (NS_NONATOMIC_IOSONLY, readonly, retain) id object;
+@property (NS_NONATOMIC_IOSONLY, readonly, strong) id object;
+ (double) D;
- (BOOL)is3bar; // watch out
@@ -168,26 +168,26 @@ DEPRECATED
@interface NSURL
// Do not infer a property.
-@property (NS_NONATOMIC_IOSONLY, retain) NSURL *appStoreReceiptURL NS_AVAILABLE;
+@property (NS_NONATOMIC_IOSONLY, strong) NSURL *appStoreReceiptURL NS_AVAILABLE;
- (void) setAppStoreReceiptURL : (NSURL *)object;
-@property (NS_NONATOMIC_IOSONLY, retain) NSURL *appStoreReceiptURLX NS_AVAILABLE;
+@property (NS_NONATOMIC_IOSONLY, strong) NSURL *appStoreReceiptURLX NS_AVAILABLE;
// Do not infer a property.
-@property (NS_NONATOMIC_IOSONLY, retain) NSURL *appStoreReceiptURLY ;
+@property (NS_NONATOMIC_IOSONLY, strong) NSURL *appStoreReceiptURLY ;
- (void) setAppStoreReceiptURLY : (NSURL *)object NS_AVAILABLE;
-@property (NS_NONATOMIC_IOSONLY, readonly, retain) id OkToInfer NS_AVAILABLE;
+@property (NS_NONATOMIC_IOSONLY, readonly, strong) id OkToInfer NS_AVAILABLE;
// Do not infer a property.
-@property (NS_NONATOMIC_IOSONLY, retain) NSURL *appStoreReceiptURLZ ;
+@property (NS_NONATOMIC_IOSONLY, strong) NSURL *appStoreReceiptURLZ ;
- (void) setAppStoreReceiptURLZ : (NSURL *)object NS_AVAILABLE;
// Do not infer a property.
- (id) t1 NORETURN NS_AVAILABLE;
- (void) setT1 : (id) arg NS_AVAILABLE;
-@property (NS_NONATOMIC_IOSONLY, retain) id method1 ALIGNED NS_AVAILABLE;
+@property (NS_NONATOMIC_IOSONLY, strong) id method1 ALIGNED NS_AVAILABLE;
- (NSURL *)init; // No Change
+ (id)alloc; // No Change
diff --git a/test/ARCMT/objcmt-property-availability.m.result b/test/ARCMT/objcmt-property-availability.m.result
index 681f9a99bf55..a5a45e37929c 100644
--- a/test/ARCMT/objcmt-property-availability.m.result
+++ b/test/ARCMT/objcmt-property-availability.m.result
@@ -19,20 +19,20 @@
#define UNAVAILABLE __attribute__((unavailable("not available in automatic reference counting mode")))
@interface MKMapItem
-@property (nonatomic, retain) MKMapItem *source NS_AVAILABLE(10_9, 6_0);
+@property (nonatomic, strong) MKMapItem *source NS_AVAILABLE(10_9, 6_0);
- (void)setSource:(MKMapItem *)source NS_AVAILABLE(10_9, 7_0);
-@property (nonatomic, retain) MKMapItem *dest NS_AVAILABLE(10_9, 6_0);
+@property (nonatomic, strong) MKMapItem *dest NS_AVAILABLE(10_9, 6_0);
-@property (nonatomic, retain) MKMapItem *final;
+@property (nonatomic, strong) MKMapItem *final;
-@property (nonatomic, retain) MKMapItem *total NS_AVAILABLE(10_9, 6_0);
+@property (nonatomic, strong) MKMapItem *total NS_AVAILABLE(10_9, 6_0);
- (void)setTotal:(MKMapItem *)source;
- (MKMapItem *)comp NS_AVAILABLE(10_9, 6_0);
- (void)setComp:(MKMapItem *)source UNAVAILABLE;
-@property (nonatomic, retain) MKMapItem *tally UNAVAILABLE NS_AVAILABLE(10_9, 6_0);
+@property (nonatomic, strong) MKMapItem *tally UNAVAILABLE NS_AVAILABLE(10_9, 6_0);
- (MKMapItem *)itally NS_AVAILABLE(10_9, 6_0);
- (void)setItally:(MKMapItem *)source UNAVAILABLE NS_AVAILABLE(10_9, 6_0);
diff --git a/test/ARCMT/objcmt-property.m b/test/ARCMT/objcmt-property.m
index 3b77aadb892b..61739efe0ab2 100644
--- a/test/ARCMT/objcmt-property.m
+++ b/test/ARCMT/objcmt-property.m
@@ -70,6 +70,9 @@ typedef char BOOL;
- (id) dataSource;
+// rdar://15509831
+- (id)delegate;
+
- (id)xxxdelegateYYY;
- (void)setXxxdelegateYYY:(id)delegate;
diff --git a/test/ARCMT/objcmt-property.m.result b/test/ARCMT/objcmt-property.m.result
index c6380c80523f..ec4ac85127ef 100644
--- a/test/ARCMT/objcmt-property.m.result
+++ b/test/ARCMT/objcmt-property.m.result
@@ -23,14 +23,14 @@ typedef char BOOL;
}
@property (nonatomic, weak) NSString *WeakProp;
-@property (nonatomic, retain) NSString *StrongProp;
+@property (nonatomic, strong) NSString *StrongProp;
-@property (nonatomic, retain) NSString *UnavailProp __attribute__((unavailable));
+@property (nonatomic, strong) NSString *UnavailProp __attribute__((unavailable));
- (void) setUnavailProp : (NSString *)Val;
-@property (nonatomic, retain) NSString *UnavailProp1 __attribute__((unavailable));
+@property (nonatomic, strong) NSString *UnavailProp1 __attribute__((unavailable));
-@property (nonatomic, retain) NSString *UnavailProp2;
+@property (nonatomic, strong) NSString *UnavailProp2;
- (void) setUnavailProp2 : (NSString *)Val __attribute__((unavailable));
@property (nonatomic, copy) NSDictionary *undoAction;
@@ -48,10 +48,10 @@ typedef char BOOL;
NSArray *_names3;
NSArray *_names4;
}
-@property (nonatomic, retain) NSArray *names2;
-@property (nonatomic, retain) NSArray *names3;
-@property (nonatomic, retain) NSArray *names4;
-@property (nonatomic, retain) NSArray *names1;
+@property (nonatomic, strong) NSArray *names2;
+@property (nonatomic, strong) NSArray *names3;
+@property (nonatomic, strong) NSArray *names4;
+@property (nonatomic, strong) NSArray *names1;
@end
// Properties that contain the name "delegate" or "dataSource",
@@ -61,12 +61,15 @@ typedef char BOOL;
@property (nonatomic, assign) id dataSource;
+// rdar://15509831
+@property (nonatomic, readonly, assign) id delegate;
+
@property (nonatomic, assign) id xxxdelegateYYY;
-@property (nonatomic, retain) id MYtarget;
+@property (nonatomic, strong) id MYtarget;
-@property (nonatomic, retain) id targetX;
+@property (nonatomic, strong) id targetX;
@property (nonatomic) int value;
@@ -80,14 +83,14 @@ typedef char BOOL;
- (void) Nothing;
@property (nonatomic, readonly) int Length;
-@property (nonatomic, readonly, retain) id object;
+@property (nonatomic, readonly, strong) id object;
+ (double) D;
@property (nonatomic, readonly) void *JSObject WEBKIT_OBJC_METHOD_ANNOTATION(AVAILABLE_WEBKIT_VERSION_3_0_AND_LATER);
@property (nonatomic, getter=isIgnoringInteractionEvents, readonly) BOOL ignoringInteractionEvents;
-@property (nonatomic, getter=getStringValue, retain) NSString *stringValue;
+@property (nonatomic, getter=getStringValue, strong) NSString *stringValue;
@property (nonatomic, getter=getCounterValue, readonly) BOOL counterValue;
-@property (nonatomic, getter=getns_dixtionary, readonly, retain) NSDictionary *ns_dixtionary;
+@property (nonatomic, getter=getns_dixtionary, readonly, copy) NSDictionary *ns_dixtionary;
- (BOOL)is3bar; // watch out
- (NSString *)get3foo; // watch out
@@ -108,9 +111,9 @@ typedef char BOOL;
@property (nonatomic, assign) id xxxdelegateYYY;
-@property (nonatomic, retain) id MYtarget;
+@property (nonatomic, strong) id MYtarget;
-@property (nonatomic, retain) id targetX;
+@property (nonatomic, strong) id targetX;
@property (nonatomic) int value;
@@ -124,7 +127,7 @@ typedef char BOOL;
- (void) Nothing;
@property (nonatomic, readonly) int Length;
-@property (nonatomic, readonly, retain) id object;
+@property (nonatomic, readonly, strong) id object;
+ (double) D;
- (BOOL)is3bar; // watch out
@@ -161,26 +164,26 @@ DEPRECATED
@interface NSURL
// Do not infer a property.
-@property (nonatomic, retain) NSURL *appStoreReceiptURL NS_AVAILABLE;
+@property (nonatomic, strong) NSURL *appStoreReceiptURL NS_AVAILABLE;
- (void) setAppStoreReceiptURL : (NSURL *)object;
-@property (nonatomic, retain) NSURL *appStoreReceiptURLX NS_AVAILABLE;
+@property (nonatomic, strong) NSURL *appStoreReceiptURLX NS_AVAILABLE;
// Do not infer a property.
-@property (nonatomic, retain) NSURL *appStoreReceiptURLY ;
+@property (nonatomic, strong) NSURL *appStoreReceiptURLY ;
- (void) setAppStoreReceiptURLY : (NSURL *)object NS_AVAILABLE;
-@property (nonatomic, readonly, retain) id OkToInfer NS_AVAILABLE;
+@property (nonatomic, readonly, strong) id OkToInfer NS_AVAILABLE;
// Do not infer a property.
-@property (nonatomic, retain) NSURL *appStoreReceiptURLZ ;
+@property (nonatomic, strong) NSURL *appStoreReceiptURLZ ;
- (void) setAppStoreReceiptURLZ : (NSURL *)object NS_AVAILABLE;
// Do not infer a property.
- (id) t1 NORETURN NS_AVAILABLE;
- (void) setT1 : (id) arg NS_AVAILABLE;
-@property (nonatomic, retain) id method1 ALIGNED NS_AVAILABLE;
+@property (nonatomic, strong) id method1 ALIGNED NS_AVAILABLE;
- (NSURL *)init; // No Change
+ (id)alloc; // No Change
diff --git a/test/ARCMT/objcmt-protocol-conformance.m b/test/ARCMT/objcmt-protocol-conformance.m
index 7bc7d938177f..f4c8f5112a62 100644
--- a/test/ARCMT/objcmt-protocol-conformance.m
+++ b/test/ARCMT/objcmt-protocol-conformance.m
@@ -112,3 +112,19 @@
@implementation Test7
@end
+// rdar://15515206
+@interface BTLEBrowser
+@end
+
+@protocol CBCentralManagerDelegate;
+
+@protocol CBCentralManagerDelegate
+- (id) Meth1: (double) arg;
+@end
+
+@interface BTLEBrowser() <CBCentralManagerDelegate>
+@end
+
+@implementation BTLEBrowser
+- (id) Meth15515206: (double) arg { return 0; }
+@end
diff --git a/test/ARCMT/objcmt-protocol-conformance.m.result b/test/ARCMT/objcmt-protocol-conformance.m.result
index dc0874c88f22..0322ab81d6af 100644
--- a/test/ARCMT/objcmt-protocol-conformance.m.result
+++ b/test/ARCMT/objcmt-protocol-conformance.m.result
@@ -112,3 +112,19 @@
@implementation Test7
@end
+// rdar://15515206
+@interface BTLEBrowser
+@end
+
+@protocol CBCentralManagerDelegate;
+
+@protocol CBCentralManagerDelegate
+- (id) Meth1: (double) arg;
+@end
+
+@interface BTLEBrowser() <CBCentralManagerDelegate>
+@end
+
+@implementation BTLEBrowser
+- (id) Meth15515206: (double) arg { return 0; }
+@end
diff --git a/test/ARCMT/protected-scope.m b/test/ARCMT/protected-scope.m
index 8aece44d4ffa..b522f54cdf7c 100644
--- a/test/ARCMT/protected-scope.m
+++ b/test/ARCMT/protected-scope.m
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c %s.result
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
#include "Common.h"
diff --git a/test/ARCMT/protected-scope.m.result b/test/ARCMT/protected-scope.m.result
index f385d8825de5..55070f273227 100644
--- a/test/ARCMT/protected-scope.m.result
+++ b/test/ARCMT/protected-scope.m.result
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -fobjc-arc -x objective-c %s.result
// RUN: arcmt-test --args -triple x86_64-apple-darwin10 -fsyntax-only -x objective-c %s > %t
// RUN: diff %t %s.result
-// DISABLE: mingw32
#include "Common.h"
diff --git a/test/ARCMT/whitelisted/header1.h b/test/ARCMT/whitelisted/header1.h
index a3014eb5b653..d94b9f7d9ebe 100644
--- a/test/ARCMT/whitelisted/header1.h
+++ b/test/ARCMT/whitelisted/header1.h
@@ -2,4 +2,5 @@
@interface I1 : NSObject
-(int)prop;
-(void)setProp:(int)p;
++(id)i1;
@end
diff --git a/test/ARCMT/whitelisted/header1.h.result b/test/ARCMT/whitelisted/header1.h.result
index 7808fc8a6a3f..65cbd2621f6b 100644
--- a/test/ARCMT/whitelisted/header1.h.result
+++ b/test/ARCMT/whitelisted/header1.h.result
@@ -1,4 +1,5 @@
@interface I1 : NSObject
@property (nonatomic) int prop;
++(instancetype)i1;
@end
diff --git a/test/ARCMT/whitelisted/objcmt-with-whitelist-impl.m b/test/ARCMT/whitelisted/objcmt-with-whitelist-impl.m
new file mode 100644
index 000000000000..d734eaa10bdf
--- /dev/null
+++ b/test/ARCMT/whitelisted/objcmt-with-whitelist-impl.m
@@ -0,0 +1,18 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -objcmt-migrate-readwrite-property -objcmt-migrate-instancetype -objcmt-white-list-dir-path=%S/Inputs %s -triple x86_64-apple-darwin11 -migrate -o %t.remap
+// RUN: c-arcmt-test %t.remap | arcmt-test -verify-transformed-files %S/header1.h.result %s.result
+
+@interface NSObject
++ (id)alloc;
+@end
+
+#include "header1.h"
+#include "header2.h"
+
+@interface I2(cat)
+-(id)initInCat;
+@end
+
+@implementation I1
++(id)i1 {}
+@end
diff --git a/test/ARCMT/whitelisted/objcmt-with-whitelist-impl.m.result b/test/ARCMT/whitelisted/objcmt-with-whitelist-impl.m.result
new file mode 100644
index 000000000000..b936b52b729b
--- /dev/null
+++ b/test/ARCMT/whitelisted/objcmt-with-whitelist-impl.m.result
@@ -0,0 +1,18 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -objcmt-migrate-readwrite-property -objcmt-migrate-instancetype -objcmt-white-list-dir-path=%S/Inputs %s -triple x86_64-apple-darwin11 -migrate -o %t.remap
+// RUN: c-arcmt-test %t.remap | arcmt-test -verify-transformed-files %S/header1.h.result %s.result
+
+@interface NSObject
++ (id)alloc;
+@end
+
+#include "header1.h"
+#include "header2.h"
+
+@interface I2(cat)
+-(id)initInCat;
+@end
+
+@implementation I1
++(instancetype)i1 {}
+@end
diff --git a/test/ARCMT/whitelisted/objcmt-with-whitelist.m b/test/ARCMT/whitelisted/objcmt-with-whitelist.m
index 1b44c9a6d9fe..bef82c8667d9 100644
--- a/test/ARCMT/whitelisted/objcmt-with-whitelist.m
+++ b/test/ARCMT/whitelisted/objcmt-with-whitelist.m
@@ -1,7 +1,7 @@
// RUN: rm -rf %t
-// RUN: %clang_cc1 -objcmt-migrate-readwrite-property %s -triple x86_64-apple-darwin11 -migrate -o %t.remap
+// RUN: %clang_cc1 -objcmt-migrate-readwrite-property -objcmt-migrate-instancetype %s -triple x86_64-apple-darwin11 -migrate -o %t.remap
// RUN: c-arcmt-test %t.remap | arcmt-test -verify-transformed-files %S/header1.h.result %S/header2.h.result
-// RUN: %clang_cc1 -objcmt-migrate-readwrite-property -objcmt-white-list-dir-path=%S/Inputs %s -triple x86_64-apple-darwin11 -migrate -o %t.remap
+// RUN: %clang_cc1 -objcmt-migrate-readwrite-property -objcmt-migrate-instancetype -objcmt-white-list-dir-path=%S/Inputs %s -triple x86_64-apple-darwin11 -migrate -o %t.remap
// RUN: c-arcmt-test %t.remap | arcmt-test -verify-transformed-files %S/header1.h.result
@interface NSObject
diff --git a/test/Analysis/Inputs/system-header-simulator-cxx.h b/test/Analysis/Inputs/system-header-simulator-cxx.h
index 9bb8ec48923d..35869214ed7e 100644
--- a/test/Analysis/Inputs/system-header-simulator-cxx.h
+++ b/test/Analysis/Inputs/system-header-simulator-cxx.h
@@ -144,7 +144,7 @@ namespace std {
public:
void pop_front() {
// Fake use-after-free.
- // No warning is expected as we are suppressing warning comming
+ // No warning is expected as we are suppressing warning coming
// out of std::list.
int z = 0;
z = 5/z;
@@ -155,24 +155,47 @@ namespace std {
// basic_string
template<class _CharT, class _Alloc = allocator<_CharT> >
class __attribute__ ((__type_visibility__("default"))) basic_string {
- _CharT localStorage[4];
+ bool isLong;
+ union {
+ _CharT localStorage[4];
+ _CharT *externalStorage;
+
+ void assignExternal(_CharT *newExternal) {
+ externalStorage = newExternal;
+ }
+ } storage;
typedef allocator_traits<_Alloc> __alloc_traits;
public:
+ basic_string();
+
void push_back(int c) {
// Fake error trigger.
- // No warning is expected as we are suppressing warning comming
+ // No warning is expected as we are suppressing warning coming
// out of std::basic_string.
int z = 0;
z = 5/z;
}
+ _CharT *getBuffer() {
+ return isLong ? storage.externalStorage : storage.localStorage;
+ }
+
basic_string &operator +=(int c) {
// Fake deallocate stack-based storage.
// No warning is expected as we are suppressing warnings within
- // allocators being used by std::basic_string.
- __alloc_traits::deallocate(&localStorage);
+ // std::basic_string.
+ __alloc_traits::deallocate(getBuffer());
+ }
+
+ basic_string &operator =(const basic_string &other) {
+ // Fake deallocate stack-based storage, then use the variable in the
+ // same union.
+ // No warning is expected as we are suppressing warnings within
+ // std::basic_string.
+ __alloc_traits::deallocate(getBuffer());
+ storage.assignExternal(new _CharT[4]);
}
};
}
diff --git a/test/Analysis/Inputs/system-header-simulator-objc.h b/test/Analysis/Inputs/system-header-simulator-objc.h
index 3e1d9555bbde..8a5d3b6403c8 100644
--- a/test/Analysis/Inputs/system-header-simulator-objc.h
+++ b/test/Analysis/Inputs/system-header-simulator-objc.h
@@ -66,8 +66,11 @@ typedef struct {
NSFastEnumerationState;
@protocol NSFastEnumeration - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id *)stackbuf count:(NSUInteger)len;
@end @class NSString, NSDictionary;
-@interface NSValue : NSObject <NSCopying, NSCoding> - (void)getValue:(void *)value;
-@end @interface NSNumber : NSValue - (char)charValue;
+@interface NSValue : NSObject <NSCopying, NSCoding>
++ (NSValue *)valueWithPointer:(const void *)p;
+- (void)getValue:(void *)value;
+@end
+@interface NSNumber : NSValue - (char)charValue;
- (id)initWithInt:(int)value;
@end @class NSString;
@interface NSArray : NSObject <NSCopying, NSMutableCopying, NSCoding, NSFastEnumeration> - (NSUInteger)count;
diff --git a/test/Analysis/NSContainers.m b/test/Analysis/NSContainers.m
index a9e76fbbcaba..4b3492645682 100644
--- a/test/Analysis/NSContainers.m
+++ b/test/Analysis/NSContainers.m
@@ -1,4 +1,7 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.NonNilReturnValue,osx.cocoa.NilArg,osx.cocoa.Loops -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.NonNilReturnValue,osx.cocoa.NilArg,osx.cocoa.Loops,debug.ExprInspection -verify -Wno-objc-root-class %s
+
+void clang_analyzer_eval(int);
+
typedef unsigned long NSUInteger;
typedef signed char BOOL;
typedef struct _NSZone NSZone;
@@ -276,3 +279,16 @@ void testCountAwareNSOrderedSet(NSOrderedSet *containers, int *validptr) {
}
}
+void testLiteralsNonNil() {
+ clang_analyzer_eval(!!@[]); // expected-warning{{TRUE}}
+ clang_analyzer_eval(!!@{}); // expected-warning{{TRUE}}
+}
+
+@interface NSMutableArray (MySafeAdd)
+- (void)addObject:(id)obj safe:(BOOL)safe;
+@end
+
+void testArrayCategory(NSMutableArray *arr) {
+ [arr addObject:0 safe:1]; // no-warning
+}
+
diff --git a/test/Analysis/NewDelete-checker-test.cpp b/test/Analysis/NewDelete-checker-test.cpp
index cc9725128bc8..855b05d66333 100644
--- a/test/Analysis/NewDelete-checker-test.cpp
+++ b/test/Analysis/NewDelete-checker-test.cpp
@@ -338,13 +338,13 @@ class DerefClass{
public:
int *x;
DerefClass() {}
- ~DerefClass() {*x = 1;} //expected-warning {{Use of memory after it is freed}}
+ ~DerefClass() {*x = 1;}
};
void testDoubleDeleteClassInstance() {
DerefClass *foo = new DerefClass();
delete foo;
- delete foo; // FIXME: We should ideally report warning here instead of inside the destructor.
+ delete foo; // expected-warning {{Attempt to delete released memory}}
}
class EmptyClass{
@@ -356,5 +356,5 @@ public:
void testDoubleDeleteEmptyClass() {
EmptyClass *foo = new EmptyClass();
delete foo;
- delete foo; //expected-warning {{Attempt to free released memory}}
+ delete foo; // expected-warning {{Attempt to delete released memory}}
}
diff --git a/test/Analysis/NewDelete-variadic.cpp b/test/Analysis/NewDelete-variadic.cpp
index 53dba463bbf9..62a7d17e1b2a 100644
--- a/test/Analysis/NewDelete-variadic.cpp
+++ b/test/Analysis/NewDelete-variadic.cpp
@@ -5,15 +5,19 @@ namespace std {
typedef __typeof__(sizeof(int)) size_t;
}
-void *operator new(std::size_t, ...);
-void *operator new[](std::size_t, ...);
+struct X {};
+
+void *operator new(std::size_t, X, ...);
+void *operator new[](std::size_t, X, ...);
void testGlobalCustomVariadicNew() {
- void *p1 = operator new(0); // no warn
+ X x;
+
+ void *p1 = operator new(0, x); // no warn
- void *p2 = operator new[](0); // no warn
+ void *p2 = operator new[](0, x); // no warn
- int *p3 = new int; // no warn
+ int *p3 = new (x) int; // no warn
- int *p4 = new int[0]; // no warn
+ int *p4 = new (x) int[0]; // no warn
}
diff --git a/test/Analysis/NewDeleteLeaks-PR18394.cpp b/test/Analysis/NewDeleteLeaks-PR18394.cpp
new file mode 100644
index 000000000000..dfd94561628f
--- /dev/null
+++ b/test/Analysis/NewDeleteLeaks-PR18394.cpp
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -analyzer-config graph-trim-interval=1 -analyzer-max-loop 1 -analyze -analyzer-checker=core,alpha.cplusplus.NewDeleteLeaks -verify %s
+// expected-no-diagnostics
+
+class A {
+public:
+ void f() {};
+ ~A() {
+ for (int i=0; i<3; i++)
+ f();
+ }
+};
+
+void error() {
+ A *a = new A();
+ delete a;
+}
diff --git a/test/Analysis/NoReturn.m b/test/Analysis/NoReturn.m
index c74d54eae528..9b7011e79318 100644
--- a/test/Analysis/NoReturn.m
+++ b/test/Analysis/NoReturn.m
@@ -1,4 +1,4 @@
-// RUN: %clang --analyze -Xclang -analyzer-checker=alpha.core -Xclang -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify %s
#include <stdarg.h>
diff --git a/test/Analysis/PR9741.cpp b/test/Analysis/PR9741.cpp
index 2807c44ab7bc..542bc2d958ee 100644
--- a/test/Analysis/PR9741.cpp
+++ b/test/Analysis/PR9741.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -cc1 -std=c++11 -Wuninitialized -verify %s
+// RUN: %clang_cc1 -std=c++11 -Wuninitialized -verify %s
// expected-no-diagnostics
void f() {
diff --git a/test/Analysis/analyzer-stats.c b/test/Analysis/analyzer-stats.c
index 63073b7e40b3..a0a50cbc9343 100644
--- a/test/Analysis/analyzer-stats.c
+++ b/test/Analysis/analyzer-stats.c
@@ -2,7 +2,7 @@
int foo();
-int test() { // expected-warning-re{{test -> Total CFGBlocks: [0-9]+ \| Unreachable CFGBlocks: 0 \| Exhausted Block: no \| Empty WorkList: yes}}
+int test() { // expected-warning-re{{test -> Total CFGBlocks: {{[0-9]+}} | Unreachable CFGBlocks: 0 | Exhausted Block: no | Empty WorkList: yes}}
int a = 1;
a = 34 / 12;
diff --git a/test/Analysis/auto-obj-dtors-cfg-output.cpp b/test/Analysis/auto-obj-dtors-cfg-output.cpp
index 0dbbfb592f71..0b4454fbd958 100644
--- a/test/Analysis/auto-obj-dtors-cfg-output.cpp
+++ b/test/Analysis/auto-obj-dtors-cfg-output.cpp
@@ -228,7 +228,7 @@ l1:
// CHECK-NEXT: 7: b
// CHECK-NEXT: 8: [B4.7] (ImplicitCastExpr, NoOp, const class A)
// CHECK-NEXT: 9: [B4.8].operator int
-// CHECK: 10: [B4.9]()
+// CHECK: 10: [B4.8]
// CHECK: 11: [B4.10] (ImplicitCastExpr, UserDefinedConversion, int)
// CHECK: 12: [B4.11] (ImplicitCastExpr, IntegralToBoolean, _Bool)
// CHECK-NEXT: T: if [B4.12]
@@ -307,7 +307,7 @@ void test_if_implicit_scope() {
// CHECK-NEXT: 7: b
// CHECK-NEXT: 8: [B8.7] (ImplicitCastExpr, NoOp, const class A)
// CHECK-NEXT: 9: [B8.8].operator int
-// CHECK: 10: [B8.9]()
+// CHECK: 10: [B8.8]
// CHECK: 11: [B8.10] (ImplicitCastExpr, UserDefinedConversion, int)
// CHECK: 12: [B8.11] (ImplicitCastExpr, IntegralToBoolean, _Bool)
// CHECK-NEXT: T: if [B8.12]
@@ -354,7 +354,7 @@ void test_if_jumps() {
// CHECK-NEXT: 5: b
// CHECK-NEXT: 6: [B4.5] (ImplicitCastExpr, NoOp, const class A)
// CHECK-NEXT: 7: [B4.6].operator int
-// CHECK-NEXT: 8: [B4.7]()
+// CHECK-NEXT: 8: [B4.6]
// CHECK-NEXT: 9: [B4.8] (ImplicitCastExpr, UserDefinedConversion, int)
// CHECK: 10: [B4.9] (ImplicitCastExpr, IntegralToBoolean, _Bool)
// CHECK-NEXT: T: while [B4.10]
@@ -440,7 +440,7 @@ void test_while_implicit_scope() {
// CHECK-NEXT: 5: b
// CHECK-NEXT: 6: [B10.5] (ImplicitCastExpr, NoOp, const class A)
// CHECK-NEXT: 7: [B10.6].operator int
-// CHECK-NEXT: 8: [B10.7]()
+// CHECK-NEXT: 8: [B10.6]
// CHECK-NEXT: 9: [B10.8] (ImplicitCastExpr, UserDefinedConversion, int)
// CHECK: 10: [B10.9] (ImplicitCastExpr, IntegralToBoolean, _Bool)
// CHECK-NEXT: T: while [B10.10]
@@ -586,7 +586,7 @@ void test_do_jumps() {
// CHECK-NEXT: 7: b
// CHECK-NEXT: 8: [B2.7] (ImplicitCastExpr, NoOp, const class A)
// CHECK-NEXT: 9: [B2.8].operator int
-// CHECK: 10: [B2.9]()
+// CHECK: 10: [B2.8]
// CHECK: 11: [B2.10] (ImplicitCastExpr, UserDefinedConversion, int)
// CHECK-NEXT: T: switch [B2.11]
// CHECK-NEXT: Preds (1): B4
@@ -624,7 +624,7 @@ void test_switch_implicit_scope() {
// CHECK-NEXT: 7: b
// CHECK-NEXT: 8: [B2.7] (ImplicitCastExpr, NoOp, const class A)
// CHECK-NEXT: 9: [B2.8].operator int
-// CHECK: 10: [B2.9]()
+// CHECK: 10: [B2.8]
// CHECK: 11: [B2.10] (ImplicitCastExpr, UserDefinedConversion, int)
// CHECK-NEXT: T: switch [B2.11]
// CHECK-NEXT: Preds (1): B9
@@ -710,7 +710,7 @@ void test_switch_jumps() {
// CHECK-NEXT: 5: b
// CHECK-NEXT: 6: [B4.5] (ImplicitCastExpr, NoOp, const class A)
// CHECK-NEXT: 7: [B4.6].operator int
-// CHECK-NEXT: 8: [B4.7]()
+// CHECK-NEXT: 8: [B4.6]
// CHECK-NEXT: 9: [B4.8] (ImplicitCastExpr, UserDefinedConversion, int)
// CHECK: 10: [B4.9] (ImplicitCastExpr, IntegralToBoolean, _Bool)
// CHECK-NEXT: T: for (...; [B4.10]; )
@@ -796,7 +796,7 @@ void test_for_implicit_scope() {
// CHECK-NEXT: 5: c
// CHECK-NEXT: 6: [B10.5] (ImplicitCastExpr, NoOp, const class A)
// CHECK-NEXT: 7: [B10.6].operator int
-// CHECK-NEXT: 8: [B10.7]()
+// CHECK-NEXT: 8: [B10.6]
// CHECK-NEXT: 9: [B10.8] (ImplicitCastExpr, UserDefinedConversion, int)
// CHECK: 10: [B10.9] (ImplicitCastExpr, IntegralToBoolean, _Bool)
// CHECK-NEXT: T: for (...; [B10.10]; )
diff --git a/test/Analysis/bitwise-ops.c b/test/Analysis/bitwise-ops.c
index bf282eca27d4..01daf4229625 100644
--- a/test/Analysis/bitwise-ops.c
+++ b/test/Analysis/bitwise-ops.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -triple x86_64-apple-darwin13 -Wno-shift-count-overflow -verify %s
void clang_analyzer_eval(int);
#define CHECK(expr) if (!(expr)) return; clang_analyzer_eval(expr)
@@ -11,4 +11,22 @@ void testPersistentConstraints(int x, int y) {
// False positives due to SValBuilder giving up on certain kinds of exprs.
CHECK(1 - x); // expected-warning{{UNKNOWN}}
CHECK(x & y); // expected-warning{{UNKNOWN}}
+}
+
+int testConstantShifts_PR18073(int which) {
+ // FIXME: We should have a checker that actually specifically checks bitwise
+ // shifts against the width of the LHS's /static/ type, rather than just
+ // having BasicValueFactory return "undefined" when dealing with two constant
+ // operands.
+ switch (which) {
+ case 1:
+ return 0ULL << 63; // no-warning
+ case 2:
+ return 0ULL << 64; // expected-warning{{The result of the '<<' expression is undefined}}
+ case 3:
+ return 0ULL << 65; // expected-warning{{The result of the '<<' expression is undefined}}
+
+ default:
+ return 0;
+ }
} \ No newline at end of file
diff --git a/test/Analysis/call-invalidation.cpp b/test/Analysis/call-invalidation.cpp
index 54281cc98aeb..7297d1ebec22 100644
--- a/test/Analysis/call-invalidation.cpp
+++ b/test/Analysis/call-invalidation.cpp
@@ -89,3 +89,32 @@ void testConstReferenceStruct() {
clang_analyzer_eval(x == 42); // expected-warning{{UNKNOWN}}
}
+
+void usePointerPure(int * const *) __attribute__((pure));
+void usePointerConst(int * const *) __attribute__((const));
+
+void testPureConst() {
+ extern int global;
+ int x;
+ int *p;
+
+ p = &x;
+ x = 42;
+ global = -5;
+ clang_analyzer_eval(x == 42); // expected-warning{{TRUE}}
+ clang_analyzer_eval(global == -5); // expected-warning{{TRUE}}
+
+ usePointerPure(&p);
+ clang_analyzer_eval(x == 42); // expected-warning{{TRUE}}
+ clang_analyzer_eval(global == -5); // expected-warning{{TRUE}}
+
+ usePointerConst(&p);
+ clang_analyzer_eval(x == 42); // expected-warning{{TRUE}}
+ clang_analyzer_eval(global == -5); // expected-warning{{TRUE}}
+
+ usePointer(&p);
+ clang_analyzer_eval(x == 42); // expected-warning{{UNKNOWN}}
+ clang_analyzer_eval(global == -5); // expected-warning{{UNKNOWN}}
+}
+
+
diff --git a/test/Analysis/casts.c b/test/Analysis/casts.c
index 3e2f8077ede0..42c05beb5945 100644
--- a/test/Analysis/casts.c
+++ b/test/Analysis/casts.c
@@ -110,7 +110,8 @@ void castsToBool() {
clang_analyzer_eval(symbolicPointer); // expected-warning{{TRUE}}
int localInt;
- clang_analyzer_eval(&localInt); // expected-warning{{TRUE}}
+ int* ptr = &localInt;
+ clang_analyzer_eval(ptr); // expected-warning{{TRUE}}
clang_analyzer_eval(&castsToBool); // expected-warning{{TRUE}}
clang_analyzer_eval("abc"); // expected-warning{{TRUE}}
diff --git a/test/Analysis/casts.cpp b/test/Analysis/casts.cpp
index 339539189ed7..53e1cd085acd 100644
--- a/test/Analysis/casts.cpp
+++ b/test/Analysis/casts.cpp
@@ -1,5 +1,4 @@
// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -verify %s
-// expected-no-diagnostics
bool PR14634(int x) {
double y = (double)x;
@@ -10,3 +9,15 @@ bool PR14634_implicit(int x) {
double y = (double)x;
return y;
}
+
+void intAsBoolAsSwitchCondition(int c) {
+ switch ((bool)c) { // expected-warning {{switch condition has boolean value}}
+ case 0:
+ break;
+ }
+
+ switch ((int)(bool)c) { // no-warning
+ case 0:
+ break;
+ }
+}
diff --git a/test/Analysis/cfg.cpp b/test/Analysis/cfg.cpp
index 660d1f264694..65060b168744 100644
--- a/test/Analysis/cfg.cpp
+++ b/test/Analysis/cfg.cpp
@@ -1,5 +1,7 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=debug.DumpCFG -triple x86_64-apple-darwin12 -std=c++11 %s 2>&1 | FileCheck %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=debug.DumpCFG -triple x86_64-apple-darwin12 -std=c++11 %s > %t 2>&1
+// RUN: FileCheck --input-file=%t %s
+// CHECK-LABEL: void checkWrap(int i)
// CHECK: ENTRY
// CHECK-NEXT: Succs (1): B1
// CHECK: [B1]
@@ -35,6 +37,7 @@ void checkWrap(int i) {
}
}
+// CHECK-LABEL: void checkDeclStmts()
// CHECK: ENTRY
// CHECK-NEXT: Succs (1): B1
// CHECK: [B1]
@@ -48,7 +51,7 @@ void checkWrap(int i) {
// CHECK-NEXT: CXXConstructExpr
// CHECK-NEXT: 9: struct standalone myStandalone;
// CHECK-NEXT: CXXConstructExpr
-// CHECK-NEXT: 11: struct <anonymous struct at {{.*}}> myAnon;
+// CHECK-NEXT: 11: struct (anonymous struct at {{.*}}) myAnon;
// CHECK-NEXT: CXXConstructExpr
// CHECK-NEXT: 13: struct named myNamed;
// CHECK-NEXT: Preds (1): B2
@@ -67,6 +70,7 @@ void checkDeclStmts() {
static_assert(1, "abc");
}
+// CHECK-LABEL: void F(EmptyE e)
// CHECK: ENTRY
// CHECK-NEXT: Succs (1): B1
// CHECK: [B1]
@@ -83,6 +87,7 @@ void F(EmptyE e) {
switch (e) {}
}
+// CHECK-LABEL: void testBuiltinSize()
// CHECK: ENTRY
// CHECK-NEXT: Succs (1): B1
// CHECK: [B1]
@@ -106,16 +111,18 @@ public:
~A() {}
};
+// CHECK-LABEL: void test_deletedtor()
// CHECK: [B2 (ENTRY)]
// CHECK-NEXT: Succs (1): B1
// CHECK: [B1]
-// CHECK-NEXT: 1: (CXXConstructExpr, class A)
-// CHECK-NEXT: 2: new A([B1.1])
-// CHECK-NEXT: 3: A *a = new A();
-// CHECK-NEXT: 4: a
-// CHECK-NEXT: 5: [B1.4] (ImplicitCastExpr, LValueToRValue, class A *)
-// CHECK-NEXT: 6: [B1.5]->~A() (Implicit destructor)
-// CHECK-NEXT: 7: delete [B1.5]
+// CHECK-NEXT: 1: CFGNewAllocator(A *)
+// CHECK-NEXT: 2: (CXXConstructExpr, class A)
+// CHECK-NEXT: 3: new A([B1.2])
+// CHECK-NEXT: 4: A *a = new A();
+// CHECK-NEXT: 5: a
+// CHECK-NEXT: 6: [B1.5] (ImplicitCastExpr, LValueToRValue, class A *)
+// CHECK-NEXT: 7: [B1.6]->~A() (Implicit destructor)
+// CHECK-NEXT: 8: delete [B1.6]
// CHECK-NEXT: Preds (1): B2
// CHECK-NEXT: Succs (1): B0
// CHECK: [B0 (EXIT)]
@@ -125,17 +132,19 @@ void test_deletedtor() {
delete a;
}
+// CHECK-LABEL: void test_deleteArraydtor()
// CHECK: [B2 (ENTRY)]
// CHECK-NEXT: Succs (1): B1
// CHECK: [B1]
// CHECK-NEXT: 1: 5
-// CHECK-NEXT: 2: (CXXConstructExpr, class A)
-// CHECK-NEXT: 3: new A {{\[\[}}B1.1]]
-// CHECK-NEXT: 4: A *a = new A [5];
-// CHECK-NEXT: 5: a
-// CHECK-NEXT: 6: [B1.5] (ImplicitCastExpr, LValueToRValue, class A *)
-// CHECK-NEXT: 7: [B1.6]->~A() (Implicit destructor)
-// CHECK-NEXT: 8: delete [] [B1.6]
+// CHECK-NEXT: 2: CFGNewAllocator(A *)
+// CHECK-NEXT: 3: (CXXConstructExpr, class A)
+// CHECK-NEXT: 4: new A {{\[\[}}B1.1]]
+// CHECK-NEXT: 5: A *a = new A [5];
+// CHECK-NEXT: 6: a
+// CHECK-NEXT: 7: [B1.6] (ImplicitCastExpr, LValueToRValue, class A *)
+// CHECK-NEXT: 8: [B1.7]->~A() (Implicit destructor)
+// CHECK-NEXT: 9: delete [] [B1.7]
// CHECK-NEXT: Preds (1): B2
// CHECK-NEXT: Succs (1): B0
// CHECK: [B0 (EXIT)]
@@ -157,7 +166,7 @@ namespace NoReturnSingleSuccessor {
~B() __attribute__((noreturn));
};
-// CHECK: ENTRY
+// CHECK-LABEL: int test1(int *x)
// CHECK: 1: 1
// CHECK-NEXT: 2: return
// CHECK-NEXT: ~B() (Implicit destructor)
@@ -169,7 +178,7 @@ namespace NoReturnSingleSuccessor {
return 1;
}
-// CHECK: ENTRY
+// CHECK-LABEL: int test2(int *x)
// CHECK: 1: 1
// CHECK-NEXT: 2: return
// CHECK-NEXT: destructor
@@ -181,3 +190,214 @@ namespace NoReturnSingleSuccessor {
return 1;
}
}
+
+// Test CFG support for "extending" an enum.
+// CHECK-LABEL: int test_enum_with_extension(enum MyEnum value)
+// CHECK: [B7 (ENTRY)]
+// CHECK-NEXT: Succs (1): B2
+// CHECK: [B1]
+// CHECK-NEXT: 1: x
+// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, LValueToRValue, int)
+// CHECK-NEXT: 3: return [B1.2];
+// CHECK-NEXT: Preds (5): B3 B4 B5 B6 B2(Unreachable)
+// CHECK-NEXT: Succs (1): B0
+// CHECK: [B2]
+// CHECK-NEXT: 1: 0
+// CHECK-NEXT: 2: int x = 0;
+// CHECK-NEXT: 3: value
+// CHECK-NEXT: 4: [B2.3] (ImplicitCastExpr, LValueToRValue, enum MyEnum)
+// CHECK-NEXT: 5: [B2.4] (ImplicitCastExpr, IntegralCast, int)
+// CHECK-NEXT: T: switch [B2.5]
+// CHECK-NEXT: Preds (1): B7
+// CHECK-NEXT: Succs (5): B3 B4 B5 B6 B1(Unreachable)
+// CHECK: [B3]
+// CHECK-NEXT: case D:
+// CHECK-NEXT: 1: 4
+// CHECK-NEXT: 2: x
+// CHECK-NEXT: 3: [B3.2] = [B3.1]
+// CHECK-NEXT: T: break;
+// CHECK-NEXT: Preds (1): B2
+// CHECK-NEXT: Succs (1): B1
+// CHECK: [B4]
+// CHECK-NEXT: case C:
+// CHECK-NEXT: 1: 3
+// CHECK-NEXT: 2: x
+// CHECK-NEXT: 3: [B4.2] = [B4.1]
+// CHECK-NEXT: T: break;
+// CHECK-NEXT: Preds (1): B2
+// CHECK-NEXT: Succs (1): B1
+// CHECK: [B5]
+// CHECK-NEXT: case B:
+// CHECK-NEXT: 1: 2
+// CHECK-NEXT: 2: x
+// CHECK-NEXT: 3: [B5.2] = [B5.1]
+// CHECK-NEXT: T: break;
+// CHECK-NEXT: Preds (1): B2
+// CHECK-NEXT: Succs (1): B1
+// CHECK: [B6]
+// CHECK-NEXT: case A:
+// CHECK-NEXT: 1: 1
+// CHECK-NEXT: 2: x
+// CHECK-NEXT: 3: [B6.2] = [B6.1]
+// CHECK-NEXT: T: break;
+// CHECK-NEXT: Preds (1): B2
+// CHECK-NEXT: Succs (1): B1
+// CHECK: [B0 (EXIT)]
+// CHECK-NEXT: Preds (1): B1
+enum MyEnum { A, B, C };
+static const enum MyEnum D = (enum MyEnum) 32;
+
+int test_enum_with_extension(enum MyEnum value) {
+ int x = 0;
+ switch (value) {
+ case A: x = 1; break;
+ case B: x = 2; break;
+ case C: x = 3; break;
+ case D: x = 4; break;
+ }
+ return x;
+}
+
+// CHECK-LABEL: int test_enum_with_extension_default(enum MyEnum value)
+// CHECK: [B7 (ENTRY)]
+// CHECK-NEXT: Succs (1): B2
+// CHECK: [B1]
+// CHECK-NEXT: 1: x
+// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, LValueToRValue, int)
+// CHECK-NEXT: 3: return [B1.2];
+// CHECK-NEXT: Preds (4): B3 B4 B5 B6
+// CHECK-NEXT: Succs (1): B0
+// CHECK: [B2]
+// CHECK-NEXT: 1: 0
+// CHECK-NEXT: 2: int x = 0;
+// CHECK-NEXT: 3: value
+// CHECK-NEXT: 4: [B2.3] (ImplicitCastExpr, LValueToRValue, enum MyEnum)
+// CHECK-NEXT: 5: [B2.4] (ImplicitCastExpr, IntegralCast, int)
+// CHECK-NEXT: T: switch [B2.5]
+// CHECK-NEXT: Preds (1): B7
+// CHECK-NEXT: Succs (4): B4 B5 B6 B3(Unreachable)
+// CHECK: [B3]
+// CHECK-NEXT: default:
+// CHECK-NEXT: 1: 4
+// CHECK-NEXT: 2: x
+// CHECK-NEXT: 3: [B3.2] = [B3.1]
+// CHECK-NEXT: T: break;
+// CHECK-NEXT: Preds (1): B2(Unreachable)
+// CHECK-NEXT: Succs (1): B1
+// CHECK: [B4]
+// CHECK-NEXT: case C:
+// CHECK-NEXT: 1: 3
+// CHECK-NEXT: 2: x
+// CHECK-NEXT: 3: [B4.2] = [B4.1]
+// CHECK-NEXT: T: break;
+// CHECK-NEXT: Preds (1): B2
+// CHECK-NEXT: Succs (1): B1
+// CHECK: [B5]
+// CHECK-NEXT: case B:
+// CHECK-NEXT: 1: 2
+// CHECK-NEXT: 2: x
+// CHECK-NEXT: 3: [B5.2] = [B5.1]
+// CHECK-NEXT: T: break;
+// CHECK-NEXT: Preds (1): B2
+// CHECK-NEXT: Succs (1): B1
+// CHECK: [B6]
+// CHECK-NEXT: case A:
+// CHECK-NEXT: 1: 1
+// CHECK-NEXT: 2: x
+// CHECK-NEXT: 3: [B6.2] = [B6.1]
+// CHECK-NEXT: T: break;
+// CHECK-NEXT: Preds (1): B2
+// CHECK-NEXT: Succs (1): B1
+// CHECK: [B0 (EXIT)]
+// CHECK-NEXT: Preds (1): B1
+int test_enum_with_extension_default(enum MyEnum value) {
+ int x = 0;
+ switch (value) {
+ case A: x = 1; break;
+ case B: x = 2; break;
+ case C: x = 3; break;
+ default: x = 4; break;
+ }
+ return x;
+}
+
+
+// CHECK-LABEL: void test_placement_new()
+// CHECK: [B2 (ENTRY)]
+// CHECK-NEXT: Succs (1): B1
+// CHECK: [B1]
+// CHECK-NEXT: 1: int buffer[16];
+// CHECK-NEXT: 2: buffer
+// CHECK-NEXT: 3: [B1.2] (ImplicitCastExpr, ArrayToPointerDecay, int *)
+// CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, BitCast, void *)
+// CHECK-NEXT: 5: CFGNewAllocator(MyClass *)
+// CHECK-NEXT: 6: (CXXConstructExpr, class MyClass)
+// CHECK-NEXT: 7: new ([B1.4]) MyClass([B1.6])
+// CHECK-NEXT: 8: MyClass *obj = new (buffer) MyClass();
+// CHECK-NEXT: Preds (1): B2
+// CHECK-NEXT: Succs (1): B0
+// CHECK: [B0 (EXIT)]
+// CHECK-NEXT: Preds (1): B1
+
+extern void* operator new (unsigned long sz, void* v);
+extern void* operator new[] (unsigned long sz, void* ptr);
+
+class MyClass {
+public:
+ MyClass() {}
+ ~MyClass() {}
+};
+
+void test_placement_new() {
+ int buffer[16];
+ MyClass* obj = new (buffer) MyClass();
+}
+
+// CHECK-LABEL: void test_placement_new_array()
+// CHECK: [B2 (ENTRY)]
+// CHECK-NEXT: Succs (1): B1
+// CHECK: [B1]
+// CHECK-NEXT: 1: int buffer[16];
+// CHECK-NEXT: 2: buffer
+// CHECK-NEXT: 3: [B1.2] (ImplicitCastExpr, ArrayToPointerDecay, int *)
+// CHECK-NEXT: 4: [B1.3] (ImplicitCastExpr, BitCast, void *)
+// CHECK-NEXT: 5: 5
+// CHECK-NEXT: 6: CFGNewAllocator(MyClass *)
+// CHECK-NEXT: 7: (CXXConstructExpr, class MyClass)
+// CHECK-NEXT: 8: new ([B1.4]) MyClass {{\[\[}}B1.5]]
+// CHECK-NEXT: 9: MyClass *obj = new (buffer) MyClass [5];
+// CHECK-NEXT: Preds (1): B2
+// CHECK-NEXT: Succs (1): B0
+// CHECK: [B0 (EXIT)]
+// CHECK-NEXT: Preds (1): B1
+
+void test_placement_new_array() {
+ int buffer[16];
+ MyClass* obj = new (buffer) MyClass[5];
+}
+
+
+// CHECK-LABEL: int *PR18472()
+// CHECK: [B2 (ENTRY)]
+// CHECK-NEXT: Succs (1): B1
+// CHECK: [B1]
+// CHECK-NEXT: 1: 0
+// CHECK-NEXT: 2: [B1.1] (ImplicitCastExpr, NullToPointer, PR18472_t)
+// CHECK-NEXT: 3: (PR18472_t)[B1.2] (CStyleCastExpr, NoOp, PR18472_t)
+// CHECK-NEXT: 4: CFGNewAllocator(int *)
+// CHECK-NEXT: 5: new (([B1.3])) int
+// CHECK-NEXT: 6: return [B1.5];
+// CHECK-NEXT: Preds (1): B2
+// CHECK-NEXT: Succs (1): B0
+// CHECK: [B0 (EXIT)]
+// CHECK-NEXT: Preds (1): B1
+
+extern "C" typedef int *PR18472_t;
+void *operator new (unsigned long, PR18472_t);
+template <class T> T *PR18472() {
+ return new (((PR18472_t) 0)) T;
+}
+void PR18472_helper() {
+ PR18472<int>();
+}
+
diff --git a/test/Analysis/checker-plugins.c b/test/Analysis/checker-plugins.c
new file mode 100644
index 000000000000..3882ba6661b4
--- /dev/null
+++ b/test/Analysis/checker-plugins.c
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -load %llvmshlibdir/SampleAnalyzerPlugin%pluginext -analyze -analyzer-checker='example.MainCallChecker' -verify %s
+// REQUIRES: plugins, examples
+
+// Test that the MainCallChecker example analyzer plugin loads and runs.
+
+int main();
+
+void caller() {
+ main(); // expected-warning {{call to main}}
+}
diff --git a/test/Analysis/ctor.mm b/test/Analysis/ctor.mm
index 77c87905e1f7..e7c0c6cac630 100644
--- a/test/Analysis/ctor.mm
+++ b/test/Analysis/ctor.mm
@@ -674,3 +674,33 @@ namespace InitializerList {
clang_analyzer_eval(list->usedInitializerList); // expected-warning{{UNKNOWN}}
}
}
+
+namespace PR19579 {
+ class C {};
+
+ void f() {
+ C();
+ int a;
+
+ extern void use(int);
+ use(a); // expected-warning{{uninitialized}}
+ }
+
+ void g() {
+ struct S {
+ C c;
+ int i;
+ };
+
+ // This order triggers the initialization of the inner "a" after the
+ // constructor for "C" is run, which used to confuse the analyzer
+ // (is "C()" the initialization of "a"?).
+ struct S s = {
+ C(),
+ ({
+ int a, b = 0;
+ 0;
+ })
+ };
+ }
+}
diff --git a/test/Analysis/dead-stores.c b/test/Analysis/dead-stores.c
index 067a0504f13d..da8e8bdb7034 100644
--- a/test/Analysis/dead-stores.c
+++ b/test/Analysis/dead-stores.c
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -Wunused-variable -analyze -analyzer-checker=core,deadcode.DeadStores,alpha.deadcode.IdempotentOperations -fblocks -verify -Wno-unreachable-code -analyzer-opt-analyze-nested-blocks %s
-// RUN: %clang_cc1 -Wunused-variable -analyze -analyzer-checker=core,deadcode.DeadStores,alpha.deadcode.IdempotentOperations -analyzer-store=region -analyzer-constraints=range -fblocks -verify -Wno-unreachable-code -analyzer-opt-analyze-nested-blocks %s
+// RUN: %clang_cc1 -Wunused-variable -analyze -analyzer-checker=core,deadcode.DeadStores -fblocks -verify -Wno-unreachable-code -analyzer-opt-analyze-nested-blocks %s
+// RUN: %clang_cc1 -Wunused-variable -analyze -analyzer-checker=core,deadcode.DeadStores -analyzer-store=region -analyzer-constraints=range -fblocks -verify -Wno-unreachable-code -analyzer-opt-analyze-nested-blocks %s
void f1() {
int k, y; // expected-warning{{unused variable 'k'}} expected-warning{{unused variable 'y'}}
@@ -11,7 +11,7 @@ void f2(void *b) {
char *c = (char*)b; // no-warning
char *d = b+1; // expected-warning {{never read}} expected-warning{{unused variable 'd'}}
printf("%s", c); // expected-warning{{implicitly declaring library function 'printf' with type 'int (const char *, ...)'}} \
- // expected-note{{please include the header <stdio.h> or explicitly provide a declaration for 'printf'}}
+ // expected-note{{include the header <stdio.h> or explicitly provide a declaration for 'printf'}}
}
int f();
@@ -152,7 +152,7 @@ void f15(unsigned x, unsigned y) {
// to see a real bug in this scenario.
int f16(int x) {
x = x * 2;
- x = sizeof(int [x = (x || x + 1) * 2]) // expected-warning{{The left operand to '+' is always 0}} expected-warning{{The left operand to '*' is always 1}}
+ x = sizeof(int [x = (x || x + 1) * 2])
? 5 : 8;
return x;
}
@@ -480,11 +480,11 @@ int f26_nestedblocks() {
// placed within the increment code of for loops.
void rdar8014335() {
for (int i = 0 ; i != 10 ; ({ break; })) {
- for ( ; ; ({ ++i; break; })) ;
+ for ( ; ; ({ ++i; break; })) ; // expected-warning {{'break' is bound to current loop, GCC binds it to the enclosing loop}}
// Note that the next value stored to 'i' is never executed
// because the next statement to be executed is the 'break'
// in the increment code of the first loop.
- i = i * 3; // expected-warning{{Value stored to 'i' is never read}} expected-warning{{The left operand to '*' is always 1}}
+ i = i * 3; // expected-warning{{Value stored to 'i' is never read}}
}
}
diff --git a/test/Analysis/dead-stores.m b/test/Analysis/dead-stores.m
index 5a807ed52c99..13b28dcf5374 100644
--- a/test/Analysis/dead-stores.m
+++ b/test/Analysis/dead-stores.m
@@ -109,3 +109,11 @@ Radar11059352_1 *_Path;
return wp;
}
@end
+
+id test_objc_precise_lifetime_foo();
+void test_objc_precise_lifetime() {
+ __attribute__((objc_precise_lifetime)) id dead = test_objc_precise_lifetime_foo(); // no-warning
+ dead = 0;
+ dead = test_objc_precise_lifetime_foo(); // no-warning
+ dead = 0;
+}
diff --git a/test/Analysis/default-analyze.m b/test/Analysis/default-analyze.m
index 82656b24a6e9..5fbaa2f98c65 100644
--- a/test/Analysis/default-analyze.m
+++ b/test/Analysis/default-analyze.m
@@ -11,7 +11,7 @@ id foo(int x) {
title = @"bar";
break;
default:
- title = "@baz";
+ title = @"baz";
break;
}
return title;
diff --git a/test/Analysis/diagnostics/undef-value-param.m b/test/Analysis/diagnostics/undef-value-param.m
index e977acb70fd9..b0ce56caa348 100644
--- a/test/Analysis/diagnostics/undef-value-param.m
+++ b/test/Analysis/diagnostics/undef-value-param.m
@@ -542,7 +542,7 @@ static void CreateRefUndef(SCDynamicStoreRef *storeRef, unsigned x) {
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>description</key><string>Null pointer argument in call to CFRelease</string>
// CHECK-NEXT: <key>category</key><string>API Misuse (Apple)</string>
-// CHECK-NEXT: <key>type</key><string>null passed to CFRetain/CFRelease/CFMakeCollectable</string>
+// CHECK-NEXT: <key>type</key><string>null passed to CF memory management function</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>Objective-C method</string>
// CHECK-NEXT: <key>issue_context</key><string>test</string>
// CHECK-NEXT: <key>issue_hash</key><string>5</string>
diff --git a/test/Analysis/dtor-cxx11.cpp b/test/Analysis/dtor-cxx11.cpp
new file mode 100644
index 000000000000..7d2e87e44e4b
--- /dev/null
+++ b/test/Analysis/dtor-cxx11.cpp
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -analyze -std=c++11 -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-config cfg-temporary-dtors=true -Wno-null-dereference -verify %s
+// expected-no-diagnostics
+
+#include "Inputs/system-header-simulator-cxx.h"
+
+namespace Cxx11BraceInit {
+ struct Foo {
+ ~Foo() {}
+ };
+
+ void testInitializerList() {
+ for (Foo foo : {Foo(), Foo()}) {}
+ }
+}
+
diff --git a/test/Analysis/dtor.cpp b/test/Analysis/dtor.cpp
index 11ce0d57ef4f..8d6e30a6c27c 100644
--- a/test/Analysis/dtor.cpp
+++ b/test/Analysis/dtor.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-config c++-inlining=destructors -Wno-null-dereference -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-config c++-inlining=destructors,cfg-temporary-dtors=true -Wno-null-dereference -verify %s
void clang_analyzer_eval(bool);
void clang_analyzer_checkInlined(bool);
@@ -374,6 +374,70 @@ namespace LifetimeExtension {
clang_analyzer_eval(SaveOnDestruct::lastOutput == 42); // expected-warning{{TRUE}}
}
+ struct NRCheck {
+ bool bool_;
+ NRCheck():bool_(true) {}
+ ~NRCheck() __attribute__((noreturn));
+ operator bool() const { return bool_; }
+ };
+
+ struct CheckAutoDestructor {
+ bool bool_;
+ CheckAutoDestructor():bool_(true) {}
+ operator bool() const { return bool_; }
+ };
+
+ struct CheckCustomDestructor {
+ bool bool_;
+ CheckCustomDestructor():bool_(true) {}
+ ~CheckCustomDestructor();
+ operator bool() const { return bool_; }
+ };
+
+ bool testUnnamedNR() {
+ if (NRCheck())
+ return true;
+ return false;
+ }
+
+ bool testNamedNR() {
+ if (NRCheck c = NRCheck())
+ return true;
+ return false;
+ }
+
+ bool testUnnamedAutoDestructor() {
+ if (CheckAutoDestructor())
+ return true;
+ return false;
+ }
+
+ bool testNamedAutoDestructor() {
+ if (CheckAutoDestructor c = CheckAutoDestructor())
+ return true;
+ return false;
+ }
+
+ bool testUnnamedCustomDestructor() {
+ if (CheckCustomDestructor())
+ return true;
+ return false;
+ }
+
+ // This case used to cause an unexpected "Undefined or garbage value returned
+ // to caller" warning
+ bool testNamedCustomDestructor() {
+ if (CheckCustomDestructor c = CheckCustomDestructor())
+ return true;
+ return false;
+ }
+
+ bool testMultipleTemporariesCustomDestructor() {
+ if (CheckCustomDestructor c = (CheckCustomDestructor(), CheckCustomDestructor()))
+ return true;
+ return false;
+ }
+
class VirtualDtorBase {
public:
int value;
@@ -416,6 +480,11 @@ namespace NoReturn {
f(&x);
*x = 47; // no warning
}
+
+ void g2(int *x) {
+ if (! x) NR();
+ *x = 47; // no warning
+ }
}
namespace PseudoDtor {
diff --git a/test/Analysis/dynamic-cast.cpp b/test/Analysis/dynamic-cast.cpp
index 6bb571de4776..b48ee5b8efad 100644
--- a/test/Analysis/dynamic-cast.cpp
+++ b/test/Analysis/dynamic-cast.cpp
@@ -169,7 +169,7 @@ int testCastToVoidStar() {
return *res; // no warning
}
-int testReferenceSuccesfulCast() {
+int testReferenceSuccessfulCast() {
B rb;
B &b = dynamic_cast<B&>(rb);
int *x = 0;
diff --git a/test/Analysis/exercise-ps.c b/test/Analysis/exercise-ps.c
index 675dd4ebf612..03b6874b68ee 100644
--- a/test/Analysis/exercise-ps.c
+++ b/test/Analysis/exercise-ps.c
@@ -19,5 +19,5 @@ static void f2(void *buf) {
F12_typedef* x;
x = f2_helper();
memcpy((&x[1]), (buf), 1); // expected-warning{{implicitly declaring library function 'memcpy' with type 'void *(void *, const void *}} \
- // expected-note{{please include the header <string.h> or explicitly provide a declaration for 'memcpy'}}
+ // expected-note{{include the header <string.h> or explicitly provide a declaration for 'memcpy'}}
}
diff --git a/test/Analysis/idempotent-operations-limited-loops.c b/test/Analysis/idempotent-operations-limited-loops.c
deleted file mode 100644
index c8c51cf87a58..000000000000
--- a/test/Analysis/idempotent-operations-limited-loops.c
+++ /dev/null
@@ -1,21 +0,0 @@
-// RUN: %clang_cc1 -analyze -analyzer-store=region -analyzer-constraints=range -fblocks -analyzer-opt-analyze-nested-blocks -analyzer-checker=core,alpha.deadcode.IdempotentOperations -analyzer-max-loop 3 -verify %s
-// RUN: %clang_cc1 -analyze -analyzer-store=region -analyzer-constraints=range -fblocks -analyzer-opt-analyze-nested-blocks -analyzer-checker=core,alpha.deadcode.IdempotentOperations -analyzer-max-loop 4 -verify %s
-// RUN: %clang_cc1 -analyze -analyzer-store=region -analyzer-constraints=range -fblocks -analyzer-opt-analyze-nested-blocks -analyzer-checker=core,alpha.deadcode.IdempotentOperations %s -verify
-
-void always_warning() { int *p = 0; *p = 0xDEADBEEF; } // expected-warning{{Dereference of null pointer (loaded from variable 'p')}}
-
-// This test case previously caused a bogus idempotent operation warning
-// due to us not properly culling warnings due to incomplete analysis of loops.
-int pr8403()
-{
- int i;
- for(i=0; i<10; i++)
- {
- int j;
- for(j=0; j+1<i; j++)
- {
- }
- }
- return 0;
-}
-
diff --git a/test/Analysis/idempotent-operations.c b/test/Analysis/idempotent-operations.c
deleted file mode 100644
index 04c9bc1893e8..000000000000
--- a/test/Analysis/idempotent-operations.c
+++ /dev/null
@@ -1,244 +0,0 @@
-// RUN: %clang_cc1 -Wno-int-to-pointer-cast -analyze -analyzer-store=region -analyzer-constraints=range -fblocks -analyzer-opt-analyze-nested-blocks -analyzer-checker=alpha.deadcode.IdempotentOperations -verify %s
-
-// Basic tests
-
-extern void test(int i);
-extern void test_f(float f);
-
-unsigned basic() {
- int x = 10, zero = 0, one = 1;
-
- // x op x
- x = x; // expected-warning {{Assigned value is always the same as the existing value}}
- test(x - x); // expected-warning {{Both operands to '-' always have the same value}}
- x -= x; // expected-warning {{Both operands to '-=' always have the same value}}
- x = 10; // no-warning
- test(x / x); // expected-warning {{Both operands to '/' always have the same value}}
- x /= x; // expected-warning {{Both operands to '/=' always have the same value}}
- x = 10; // no-warning
- test(x & x); // expected-warning {{Both operands to '&' always have the same value}}
- x &= x; // expected-warning {{Both operands to '&=' always have the same value}}
- test(x | x); // expected-warning {{Both operands to '|' always have the same value}}
- x |= x; // expected-warning {{Both operands to '|=' always have the same value}}
-
- // x op 1
- test(x * one); // expected-warning {{The right operand to '*' is always 1}}
- x *= one; // expected-warning {{The right operand to '*=' is always 1}}
- test(x / one); // expected-warning {{The right operand to '/' is always 1}}
- x /= one; // expected-warning {{The right operand to '/=' is always 1}}
-
- // 1 op x
- test(one * x); // expected-warning {{The left operand to '*' is always 1}}
-
- // x op 0
- test(x + zero); // expected-warning {{The right operand to '+' is always 0}}
- test(x - zero); // expected-warning {{The right operand to '-' is always 0}}
- test(x * zero); // expected-warning {{The right operand to '*' is always 0}}
- test(x & zero); // expected-warning {{The right operand to '&' is always 0}}
- test(x | zero); // expected-warning {{The right operand to '|' is always 0}}
- test(x ^ zero); // expected-warning {{The right operand to '^' is always 0}}
- test(x << zero); // expected-warning {{The right operand to '<<' is always 0}}
- test(x >> zero); // expected-warning {{The right operand to '>>' is always 0}}
-
- // 0 op x
- test(zero + x); // expected-warning {{The left operand to '+' is always 0}}
- test(zero - x); // expected-warning {{The left operand to '-' is always 0}}
- test(zero / x); // expected-warning {{The left operand to '/' is always 0}}
- test(zero * x); // expected-warning {{The left operand to '*' is always 0}}
- test(zero & x); // expected-warning {{The left operand to '&' is always 0}}
- test(zero | x); // expected-warning {{The left operand to '|' is always 0}}
- test(zero ^ x); // expected-warning {{The left operand to '^' is always 0}}
- test(zero << x); // expected-warning {{The left operand to '<<' is always 0}}
- test(zero >> x); // expected-warning {{The left operand to '>>' is always 0}}
-
- // Overwrite the values so these aren't marked as Pseudoconstants
- x = 1;
- zero = 2;
- one = 3;
-
- return x + zero + one;
-}
-
-void floats(float x) {
- test_f(x * 1.0); // no-warning
- test_f(x * 1.0F); // no-warning
-}
-
-// Ensure that we don't report false poitives in complex loops
-void bailout() {
- int unused = 0, result = 4;
- result = result; // expected-warning {{Assigned value is always the same as the existing value}}
-
- for (unsigned bg = 0; bg < 1024; bg ++) {
- result = bg * result; // no-warning
-
- for (int i = 0; i < 256; i++) {
- unused *= i; // no-warning
- }
- }
-}
-
-// Relaxed liveness - check that we don't kill liveness at assignments
-typedef unsigned uintptr_t;
-void kill_at_assign() {
- short array[2];
- uintptr_t x = (uintptr_t) array;
- short *p = (short *) x;
-
- // The following branch should be infeasible.
- if (!(p = &array[0])) { // expected-warning{{Assigned value is always the same as the existing value}}
- p = 0;
- *p = 1; // no-warning
- }
-}
-
-// False positive tests
-
-unsigned false1() {
- int a = 10;
- return a * (5 - 2 - 3); // no-warning
-}
-
-enum testenum { enum1 = 0, enum2 };
-unsigned false2() {
- int a = 1234;
- return enum1 + a; // no-warning
-}
-
-// Self assignments of unused variables are common false positives
-unsigned false3(int param, int param2) {
- param = param; // no-warning
-
- // if a self assigned variable is used later, then it should be reported still
- param2 = param2; // expected-warning{{Assigned value is always the same as the existing value}}
-
- unsigned nonparam = 5;
-
- nonparam = nonparam; // expected-warning{{Assigned value is always the same as the existing value}}
-
- return param2 + nonparam;
-}
-
-// Pseudo-constants (vars only read) and constants should not be reported
-unsigned false4() {
- // Trivial constant
- const int height = 1;
- int c = 42;
- test(height * c); // no-warning
-
- // Pseudo-constant (never changes after decl)
- int width = height;
-
- return width * 10; // no-warning
-}
-
-// Block pseudoconstants
-void false4a() {
- // Pseudo-constant
- __block int a = 1;
- int b = 10;
- __block int c = 0;
- b *= a; // no-warning
-
- ^{
- // Psuedoconstant block var
- test(b * c); // no-warning
-
- // Non-pseudoconstant block var
- int d = 0;
- test(b * d); // expected-warning{{The right operand to '*' is always 0}}
- d = 5;
- test(d);
- }();
-
- test(a + b);
-}
-
-// Static vars are common false positives
-int false5() {
- static int test = 0;
- int a = 56;
- a *= test; // no-warning
- test++;
- return a;
-}
-
-// Non-local storage vars are considered false positives
-int globalInt = 1;
-int false6() {
- int localInt = 23;
-
- localInt /= globalInt;
-
- return localInt;
-}
-
-// Check that assignments filter out false positives correctly
-int false7() {
- int zero = 0; // pseudo-constant
- int one = 1;
-
- int a = 55;
- a = a; // expected-warning{{Assigned value is always the same as the existing value}}
- a = enum1 * a; // no-warning
-
- int b = 123;
- b = b; // no-warning
-
- return a;
-}
-
-// Check truncations do not flag as self-assignments
-void false8() {
- int a = 10000000;
- a = (short)a; // no-warning
- test(a);
-}
-
-// This test case previously flagged a warning at 'b == c' because the
-// analyzer previously allowed 'UnknownVal' as the index for ElementRegions.
-typedef struct RDar8431728_F {
- int RDar8431728_A;
- unsigned char *RDar8431728_B;
- int RDar8431728_E[6];
-} RDar8431728_D;
-static inline int RDar8431728_C(RDar8431728_D * s, int n,
- unsigned char **RDar8431728_B_ptr) {
- int xy, wrap, pred, a, b, c;
-
- xy = s->RDar8431728_E[n];
- wrap = s->RDar8431728_A;
-
- a = s->RDar8431728_B[xy - 1];
- b = s->RDar8431728_B[xy - 1 - wrap];
- c = s->RDar8431728_B[xy - wrap];
-
- if (b == c) { // no-warning
- pred = a;
- } else {
- pred = c;
- }
-
- *RDar8431728_B_ptr = &s->RDar8431728_B[xy];
-
- return pred;
-}
-
-// <rdar://problem/8601243> - Don't warn on pointer arithmetic. This
-// is often idiomatic.
-unsigned rdar8601243_aux(unsigned n);
-void rdar8601243() {
- char arr[100];
- char *start = arr;
- start = start + rdar8601243_aux(sizeof(arr) - (arr - start)); // no-warning
- (void) start;
-}
-
-
-float testFloatCast(int i) {
- float f = i;
-
- // Don't crash when trying to create a "zero" float.
- return f - f;
-}
-
diff --git a/test/Analysis/idempotent-operations.cpp b/test/Analysis/idempotent-operations.cpp
deleted file mode 100644
index 966366568e23..000000000000
--- a/test/Analysis/idempotent-operations.cpp
+++ /dev/null
@@ -1,34 +0,0 @@
-// RUN: %clang_cc1 -analyze -analyzer-store=region -analyzer-constraints=range -fblocks -analyzer-opt-analyze-nested-blocks -analyzer-checker=alpha.deadcode.IdempotentOperations -verify %s
-
-// C++ specific false positives
-
-extern void test(int i);
-extern void test_ref(int &i);
-
-// Test references affecting pseudoconstants
-void false1() {
- int a = 0;
- int five = 5;
- int &b = a;
- test(five * a); // expected-warning {{The right operand to '*' is always 0}}
- b = 4;
-}
-
-// Test not flagging idempotent operations because we aborted the analysis
-// of a path because of an unsupported construct.
-struct RDar9219143_Foo {
- ~RDar9219143_Foo();
- operator bool() const;
-};
-
-RDar9219143_Foo foo();
-unsigned RDar9219143_bar();
-void RDar9219143_test() {
- unsigned i, e;
- for (i = 0, e = RDar9219143_bar(); i != e; ++i)
- if (foo())
- break;
- if (i == e) // no-warning
- return;
-}
-
diff --git a/test/Analysis/idempotent-operations.m b/test/Analysis/idempotent-operations.m
deleted file mode 100644
index 306376dd5757..000000000000
--- a/test/Analysis/idempotent-operations.m
+++ /dev/null
@@ -1,55 +0,0 @@
-// RUN: %clang_cc1 -analyze -analyzer-store=region -analyzer-constraints=range -fblocks -analyzer-opt-analyze-nested-blocks -analyzer-checker=alpha.deadcode.IdempotentOperations,osx.cocoa.RetainCount -verify %s
-// expected-no-diagnostics
-
-typedef signed char BOOL;
-typedef unsigned long NSUInteger;
-typedef struct _NSZone NSZone;
-@protocol NSObject - (BOOL)isEqual:(id)object;
-@end
-
-@interface NSObject {}
- @property int locked;
- @property(nonatomic, readonly) NSObject *media;
-@end
-
-// <rdar://problem/8725041> - Don't flag idempotent operation warnings when
-// a method may invalidate an instance variable.
-@interface Rdar8725041 : NSObject {
- id _attribute;
-}
- - (void) method2;
-@end
-
-@implementation Rdar8725041
-- (BOOL) method1 {
- BOOL needsUpdate = (BOOL)0;
- id oldAttribute = _attribute;
- [self method2];
- needsUpdate |= (_attribute != oldAttribute); // no-warning
- return needsUpdate;
-}
-
-- (void) method2
-{
- _attribute = ((void*)0);
-}
-@end
-
-// Test that the idempotent operations checker works in the prescence
-// of property expressions.
-void pr9116(NSObject *placeholder) {
- int x = placeholder.media.locked = placeholder ? 1 : 0;
-}
-
-// <rdar://problem/9130239>: Test that calling property setters doesn't
-// trigger an assertion failure when the object is nil.
-@interface RDar9130239
-@property (assign) id delegate;
-@end
-
-void test_RDar9130239(RDar9130239 *x) {
- if (x)
- return;
- x.delegate = x; // no-warning
-}
-
diff --git a/test/Analysis/identical-expressions.cpp b/test/Analysis/identical-expressions.cpp
index 50f341d39335..85e3322002dd 100644
--- a/test/Analysis/identical-expressions.cpp
+++ b/test/Analysis/identical-expressions.cpp
@@ -2,6 +2,21 @@
/* Only one expected warning per function allowed at the very end. */
+int func(void)
+{
+ return 0;
+}
+
+int func2(void)
+{
+ return 0;
+}
+
+int funcParam(int a)
+{
+ return 0;
+}
+
/* '!=' operator*/
/* '!=' with float */
@@ -295,6 +310,38 @@ int checkNotEqualNestedBinaryOpIntPointerCompare2(void) {
}
/* end '!=' int* */
+/* '!=' with function*/
+
+int checkNotEqualSameFunction() {
+ unsigned a = 0;
+ unsigned b = 1;
+ int res = (a+func() != a+func()); // no warning
+ return (0);
+}
+
+int checkNotEqualDifferentFunction() {
+ unsigned a = 0;
+ unsigned b = 1;
+ int res = (a+func() != a+func2()); // no warning
+ return (0);
+}
+
+int checkNotEqualSameFunctionSameParam() {
+ unsigned a = 0;
+ unsigned b = 1;
+ int res = (a+funcParam(a) != a+funcParam(a)); // no warning
+ return (0);
+}
+
+int checkNotEqualSameFunctionDifferentParam() {
+ unsigned a = 0;
+ unsigned b = 1;
+ int res = (a+funcParam(a) != a+funcParam(b)); // no warning
+ return (0);
+}
+
+/* end '!=' with function*/
+
/* end '!=' */
@@ -526,6 +573,37 @@ int checkEqualNestedBinaryOpIntCompare3(void) {
return (0);
}
+/* '==' with function*/
+
+int checkEqualSameFunction() {
+ unsigned a = 0;
+ unsigned b = 1;
+ int res = (a+func() == a+func()); // no warning
+ return (0);
+}
+
+int checkEqualDifferentFunction() {
+ unsigned a = 0;
+ unsigned b = 1;
+ int res = (a+func() == a+func2()); // no warning
+ return (0);
+}
+
+int checkEqualSameFunctionSameParam() {
+ unsigned a = 0;
+ unsigned b = 1;
+ int res = (a+funcParam(a) == a+funcParam(a)); // no warning
+ return (0);
+}
+
+int checkEqualSameFunctionDifferentParam() {
+ unsigned a = 0;
+ unsigned b = 1;
+ int res = (a+funcParam(a) == a+funcParam(b)); // no warning
+ return (0);
+}
+
+/* end '==' with function*/
/* end EQ int */
@@ -940,3 +1018,496 @@ int checkGreaterThanNestedBinaryOpIntCompare3(void) {
/* end GT with int */
/* end GT */
+
+
+/* Checking use of identical expressions in conditional operator*/
+
+unsigned test_unsigned(unsigned a) {
+ unsigned b = 1;
+ a = a > 5 ? b : b; // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
+ return a;
+}
+
+void test_signed() {
+ int a = 0;
+ a = a > 5 ? a : a; // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
+}
+
+void test_bool(bool a) {
+ a = a > 0 ? a : a; // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
+}
+
+void test_float() {
+ float a = 0;
+ float b = 0;
+ a = a > 5 ? a : a; // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
+}
+
+const char *test_string() {
+ float a = 0;
+ return a > 5 ? "abc" : "abc"; // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
+}
+
+void test_unsigned_expr() {
+ unsigned a = 0;
+ unsigned b = 0;
+ a = a > 5 ? a+b : a+b; // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
+}
+
+void test_signed_expr() {
+ int a = 0;
+ int b = 1;
+ a = a > 5 ? a+b : a+b; // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
+}
+
+void test_bool_expr(bool a) {
+ bool b = 0;
+ a = a > 0 ? a&&b : a&&b; // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
+}
+
+void test_unsigned_expr_negative() {
+ unsigned a = 0;
+ unsigned b = 0;
+ a = a > 5 ? a+b : b+a; // no warning
+}
+
+void test_signed_expr_negative() {
+ int a = 0;
+ int b = 1;
+ a = a > 5 ? b+a : a+b; // no warning
+}
+
+void test_bool_expr_negative(bool a) {
+ bool b = 0;
+ a = a > 0 ? a&&b : b&&a; // no warning
+}
+
+void test_float_expr_positive() {
+ float a = 0;
+ float b = 0;
+ a = a > 5 ? a+b : a+b; // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
+}
+
+void test_expr_positive_func() {
+ unsigned a = 0;
+ unsigned b = 1;
+ a = a > 5 ? a+func() : a+func(); // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
+}
+
+void test_expr_negative_func() {
+ unsigned a = 0;
+ unsigned b = 1;
+ a = a > 5 ? a+func() : a+func2(); // no warning
+}
+
+void test_expr_positive_funcParam() {
+ unsigned a = 0;
+ unsigned b = 1;
+ a = a > 5 ? a+funcParam(b) : a+funcParam(b); // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
+}
+
+void test_expr_negative_funcParam() {
+ unsigned a = 0;
+ unsigned b = 1;
+ a = a > 5 ? a+funcParam(a) : a+funcParam(b); // no warning
+}
+
+void test_expr_positive_inc() {
+ unsigned a = 0;
+ unsigned b = 1;
+ a = a > 5 ? a++ : a++; // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
+}
+
+void test_expr_negative_inc() {
+ unsigned a = 0;
+ unsigned b = 1;
+ a = a > 5 ? a++ : b++; // no warning
+}
+
+void test_expr_positive_assign() {
+ unsigned a = 0;
+ unsigned b = 1;
+ a = a > 5 ? a=1 : a=1; // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
+}
+
+void test_expr_negative_assign() {
+ unsigned a = 0;
+ unsigned b = 1;
+ a = a > 5 ? a=1 : a=2; // no warning
+}
+
+void test_signed_nested_expr() {
+ int a = 0;
+ int b = 1;
+ int c = 3;
+ a = a > 5 ? a+b+(c+a)*(a + b*(c+a)) : a+b+(c+a)*(a + b*(c+a)); // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
+}
+
+void test_signed_nested_expr_negative() {
+ int a = 0;
+ int b = 1;
+ int c = 3;
+ a = a > 5 ? a+b+(c+a)*(a + b*(c+a)) : a+b+(c+a)*(a + b*(a+c)); // no warning
+}
+
+void test_signed_nested_cond_expr_negative() {
+ int a = 0;
+ int b = 1;
+ int c = 3;
+ a = a > 5 ? (b > 5 ? 1 : 4) : (b > 5 ? 2 : 4); // no warning
+}
+
+void test_signed_nested_cond_expr() {
+ int a = 0;
+ int b = 1;
+ int c = 3;
+ a = a > 5 ? (b > 5 ? 1 : 4) : (b > 5 ? 4 : 4); // expected-warning {{identical expressions on both sides of ':' in conditional expression}}
+}
+
+void test_identical_branches1(bool b) {
+ int i = 0;
+ if (b) { // expected-warning {{true and false branches are identical}}
+ ++i;
+ } else {
+ ++i;
+ }
+}
+
+void test_identical_branches2(bool b) {
+ int i = 0;
+ if (b) { // expected-warning {{true and false branches are identical}}
+ ++i;
+ } else
+ ++i;
+}
+
+void test_identical_branches3(bool b) {
+ int i = 0;
+ if (b) { // no warning
+ ++i;
+ } else {
+ i++;
+ }
+}
+
+void test_identical_branches4(bool b) {
+ int i = 0;
+ if (b) { // expected-warning {{true and false branches are identical}}
+ } else {
+ }
+}
+
+void test_identical_branches_break(bool b) {
+ while (true) {
+ if (b) // expected-warning {{true and false branches are identical}}
+ break;
+ else
+ break;
+ }
+}
+
+void test_identical_branches_continue(bool b) {
+ while (true) {
+ if (b) // expected-warning {{true and false branches are identical}}
+ continue;
+ else
+ continue;
+ }
+}
+
+void test_identical_branches_func(bool b) {
+ if (b) // expected-warning {{true and false branches are identical}}
+ func();
+ else
+ func();
+}
+
+void test_identical_branches_func_arguments(bool b) {
+ if (b) // no-warning
+ funcParam(1);
+ else
+ funcParam(2);
+}
+
+void test_identical_branches_cast1(bool b) {
+ long v = -7;
+ if (b) // no-warning
+ v = (signed int) v;
+ else
+ v = (unsigned int) v;
+}
+
+void test_identical_branches_cast2(bool b) {
+ long v = -7;
+ if (b) // expected-warning {{true and false branches are identical}}
+ v = (signed int) v;
+ else
+ v = (signed int) v;
+}
+
+int test_identical_branches_return_int(bool b) {
+ int i = 0;
+ if (b) { // expected-warning {{true and false branches are identical}}
+ i++;
+ return i;
+ } else {
+ i++;
+ return i;
+ }
+}
+
+int test_identical_branches_return_func(bool b) {
+ if (b) { // expected-warning {{true and false branches are identical}}
+ return func();
+ } else {
+ return func();
+ }
+}
+
+void test_identical_branches_for(bool b) {
+ int i;
+ int j;
+ if (b) { // expected-warning {{true and false branches are identical}}
+ for (i = 0, j = 0; i < 10; i++)
+ j += 4;
+ } else {
+ for (i = 0, j = 0; i < 10; i++)
+ j += 4;
+ }
+}
+
+void test_identical_branches_while(bool b) {
+ int i = 10;
+ if (b) { // expected-warning {{true and false branches are identical}}
+ while (func())
+ i--;
+ } else {
+ while (func())
+ i--;
+ }
+}
+
+void test_identical_branches_while_2(bool b) {
+ int i = 10;
+ if (b) { // no-warning
+ while (func())
+ i--;
+ } else {
+ while (func())
+ i++;
+ }
+}
+
+void test_identical_branches_do_while(bool b) {
+ int i = 10;
+ if (b) { // expected-warning {{true and false branches are identical}}
+ do {
+ i--;
+ } while (func());
+ } else {
+ do {
+ i--;
+ } while (func());
+ }
+}
+
+void test_identical_branches_if(bool b, int i) {
+ if (b) { // expected-warning {{true and false branches are identical}}
+ if (i < 5)
+ i += 10;
+ } else {
+ if (i < 5)
+ i += 10;
+ }
+}
+
+void test_identical_bitwise1() {
+ int a = 5 | 5; // expected-warning {{identical expressions on both sides of bitwise operator}}
+}
+
+void test_identical_bitwise2() {
+ int a = 5;
+ int b = a | a; // expected-warning {{identical expressions on both sides of bitwise operator}}
+}
+
+void test_identical_bitwise3() {
+ int a = 5;
+ int b = (a | a); // expected-warning {{identical expressions on both sides of bitwise operator}}
+}
+
+void test_identical_bitwise4() {
+ int a = 4;
+ int b = a | 4; // no-warning
+}
+
+void test_identical_bitwise5() {
+ int a = 4;
+ int b = 4;
+ int c = a | b; // no-warning
+}
+
+void test_identical_bitwise6() {
+ int a = 5;
+ int b = a | 4 | a; // expected-warning {{identical expressions on both sides of bitwise operator}}
+}
+
+void test_identical_bitwise7() {
+ int a = 5;
+ int b = func() | func(); // no-warning
+}
+
+void test_identical_logical1(int a) {
+ if (a == 4 && a == 4) // expected-warning {{identical expressions on both sides of logical operator}}
+ ;
+}
+
+void test_identical_logical2(int a) {
+ if (a == 4 || a == 5 || a == 4) // expected-warning {{identical expressions on both sides of logical operator}}
+ ;
+}
+
+void test_identical_logical3(int a) {
+ if (a == 4 || a == 5 || a == 6) // no-warning
+ ;
+}
+
+void test_identical_logical4(int a) {
+ if (a == func() || a == func()) // no-warning
+ ;
+}
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wlogical-op-parentheses"
+void test_identical_logical5(int x, int y) {
+ if (x == 4 && y == 5 || x == 4 && y == 6) // no-warning
+ ;
+}
+
+void test_identical_logical6(int x, int y) {
+ if (x == 4 && y == 5 || x == 4 && y == 5) // expected-warning {{identical expressions on both sides of logical operator}}
+ ;
+}
+
+void test_identical_logical7(int x, int y) {
+ // FIXME: We should warn here
+ if (x == 4 && y == 5 || x == 4)
+ ;
+}
+
+void test_identical_logical8(int x, int y) {
+ // FIXME: We should warn here
+ if (x == 4 || y == 5 && x == 4)
+ ;
+}
+
+void test_identical_logical9(int x, int y) {
+ // FIXME: We should warn here
+ if (x == 4 || x == 4 && y == 5)
+ ;
+}
+#pragma clang diagnostic pop
+
+void test_warn_chained_if_stmts_1(int x) {
+ if (x == 1)
+ ;
+ else if (x == 1) // expected-warning {{expression is identical to previous condition}}
+ ;
+}
+
+void test_warn_chained_if_stmts_2(int x) {
+ if (x == 1)
+ ;
+ else if (x == 1) // expected-warning {{expression is identical to previous condition}}
+ ;
+ else if (x == 1) // expected-warning {{expression is identical to previous condition}}
+ ;
+}
+
+void test_warn_chained_if_stmts_3(int x) {
+ if (x == 1)
+ ;
+ else if (x == 2)
+ ;
+ else if (x == 1) // expected-warning {{expression is identical to previous condition}}
+ ;
+}
+
+void test_warn_chained_if_stmts_4(int x) {
+ if (x == 1)
+ ;
+ else if (func())
+ ;
+ else if (x == 1) // expected-warning {{expression is identical to previous condition}}
+ ;
+}
+
+void test_warn_chained_if_stmts_5(int x) {
+ if (x & 1)
+ ;
+ else if (x & 1) // expected-warning {{expression is identical to previous condition}}
+ ;
+}
+
+void test_warn_chained_if_stmts_6(int x) {
+ if (x == 1)
+ ;
+ else if (x == 2)
+ ;
+ else if (x == 2) // expected-warning {{expression is identical to previous condition}}
+ ;
+ else if (x == 3)
+ ;
+}
+
+void test_warn_chained_if_stmts_7(int x) {
+ if (x == 1)
+ ;
+ else if (x == 2)
+ ;
+ else if (x == 3)
+ ;
+ else if (x == 2) // expected-warning {{expression is identical to previous condition}}
+ ;
+ else if (x == 5)
+ ;
+}
+
+void test_warn_chained_if_stmts_8(int x) {
+ if (x == 1)
+ ;
+ else if (x == 2)
+ ;
+ else if (x == 3)
+ ;
+ else if (x == 2) // expected-warning {{expression is identical to previous condition}}
+ ;
+ else if (x == 5)
+ ;
+ else if (x == 3) // expected-warning {{expression is identical to previous condition}}
+ ;
+ else if (x == 7)
+ ;
+}
+
+void test_nowarn_chained_if_stmts_1(int x) {
+ if (func())
+ ;
+ else if (func()) // no-warning
+ ;
+}
+
+void test_nowarn_chained_if_stmts_2(int x) {
+ if (func())
+ ;
+ else if (x == 1)
+ ;
+ else if (func()) // no-warning
+ ;
+}
+
+void test_nowarn_chained_if_stmts_3(int x) {
+ if (x++)
+ ;
+ else if (x++) // no-warning
+ ;
+}
diff --git a/test/Analysis/inline.cpp b/test/Analysis/inline.cpp
index ca126ddf7f38..183df16e124d 100644
--- a/test/Analysis/inline.cpp
+++ b/test/Analysis/inline.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-config ipa=inlining -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,debug.ExprInspection -analyzer-config ipa=inlining -analyzer-config c++-allocator-inlining=true -verify %s
void clang_analyzer_eval(bool);
void clang_analyzer_checkInlined(bool);
@@ -9,6 +9,7 @@ extern "C" void *malloc(size_t);
// This is the standard placement new.
inline void* operator new(size_t, void* __p) throw()
{
+ clang_analyzer_checkInlined(true);// expected-warning{{TRUE}}
return __p;
}
diff --git a/test/Analysis/inlining/containers.cpp b/test/Analysis/inlining/containers.cpp
index 73b2957ad6de..c757da66bedb 100644
--- a/test/Analysis/inlining/containers.cpp
+++ b/test/Analysis/inlining/containers.cpp
@@ -103,7 +103,10 @@ public:
~MySet() { delete[] storage; }
bool isEmpty() {
- clang_analyzer_checkInlined(true); // expected-warning {{TRUE}}
+ clang_analyzer_checkInlined(true);
+ #if INLINE
+ // expected-warning@-2 {{TRUE}}
+ #endif
return size == 0;
}
@@ -114,23 +117,35 @@ public:
};
iterator begin() {
- clang_analyzer_checkInlined(true); // expected-warning {{TRUE}}
+ clang_analyzer_checkInlined(true);
+ #if INLINE
+ // expected-warning@-2 {{TRUE}}
+ #endif
return iterator(storage);
}
iterator end() {
- clang_analyzer_checkInlined(true); // expected-warning {{TRUE}}
+ clang_analyzer_checkInlined(true);
+ #if INLINE
+ // expected-warning@-2 {{TRUE}}
+ #endif
return iterator(storage+size);
}
typedef int *raw_iterator;
raw_iterator raw_begin() {
- clang_analyzer_checkInlined(true); // expected-warning {{TRUE}}
+ clang_analyzer_checkInlined(true);
+ #if INLINE
+ // expected-warning@-2 {{TRUE}}
+ #endif
return storage;
}
raw_iterator raw_end() {
- clang_analyzer_checkInlined(true); // expected-warning {{TRUE}}
+ clang_analyzer_checkInlined(true);
+ #if INLINE
+ // expected-warning@-2 {{TRUE}}
+ #endif
return storage + size;
}
};
@@ -145,7 +160,10 @@ public:
}
void useIterator(iterator i) {
- clang_analyzer_checkInlined(true); // expected-warning {{TRUE}}
+ clang_analyzer_checkInlined(true);
+ #if INLINE
+ // expected-warning@-2 {{TRUE}}
+ #endif
}
};
@@ -174,7 +192,10 @@ public:
typedef IterImpl wrapped_iterator;
wrapped_iterator begin() {
- clang_analyzer_checkInlined(true); // expected-warning {{TRUE}}
+ clang_analyzer_checkInlined(true);
+ #if INLINE
+ // expected-warning@-2 {{TRUE}}
+ #endif
return IterImpl(impl.begin());
}
};
@@ -193,7 +214,10 @@ public:
typedef MySet::iterator iterator;
iterator start() {
- clang_analyzer_checkInlined(true); // expected-warning {{TRUE}}
+ clang_analyzer_checkInlined(true);
+#if INLINE
+ // expected-warning@-2 {{TRUE}}
+#endif
return impl.begin();
}
};
@@ -212,7 +236,10 @@ public:
using iterator = MySet::iterator;
iterator start() {
- clang_analyzer_checkInlined(true); // expected-warning {{TRUE}}
+ clang_analyzer_checkInlined(true);
+ #if INLINE
+ // expected-warning@-2 {{TRUE}}
+ #endif
return impl.begin();
}
};
@@ -233,7 +260,10 @@ public:
};
iterator start() {
- clang_analyzer_checkInlined(true); // expected-warning {{TRUE}}
+ clang_analyzer_checkInlined(true);
+ #if INLINE
+ // expected-warning@-2 {{TRUE}}
+ #endif
return iterator{impl.begin().impl};
}
};
diff --git a/test/Analysis/inlining/dyn-dispatch-bifurcate.cpp b/test/Analysis/inlining/dyn-dispatch-bifurcate.cpp
index d219446fc963..e23d4e23a48f 100644
--- a/test/Analysis/inlining/dyn-dispatch-bifurcate.cpp
+++ b/test/Analysis/inlining/dyn-dispatch-bifurcate.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config ipa=dynamic-bifurcate -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -analyzer-config ipa=dynamic-bifurcate -verify -Wno-reinterpret-base-class %s
void clang_analyzer_eval(bool);
diff --git a/test/Analysis/inlining/path-notes.cpp b/test/Analysis/inlining/path-notes.cpp
index a354e14df9ed..1e230740cf05 100644
--- a/test/Analysis/inlining/path-notes.cpp
+++ b/test/Analysis/inlining/path-notes.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=text -analyzer-config c++-inlining=destructors -std=c++11 -verify %s
-// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config c++-inlining=destructors -std=c++11 -analyzer-config path-diagnostics-alternate=false %s -o %t.plist
+// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=text -analyzer-config c++-inlining=destructors -std=c++11 -verify -Wno-tautological-undefined-compare %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-output=plist-multi-file -analyzer-config c++-inlining=destructors -std=c++11 -analyzer-config path-diagnostics-alternate=false %s -o %t.plist -Wno-tautological-undefined-compare
// RUN: FileCheck --input-file=%t.plist %s
class Foo {
@@ -1506,7 +1506,7 @@ namespace PR17746 {
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>120</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
+// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -1535,7 +1535,7 @@ namespace PR17746 {
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>120</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
+// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -1787,7 +1787,7 @@ namespace PR17746 {
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>128</integer>
-// CHECK-NEXT: <key>col</key><integer>32</integer>
+// CHECK-NEXT: <key>col</key><integer>33</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -2452,12 +2452,12 @@ namespace PR17746 {
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>105</integer>
-// CHECK-NEXT: <key>col</key><integer>21</integer>
+// CHECK-NEXT: <key>col</key><integer>53</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>105</integer>
-// CHECK-NEXT: <key>col</key><integer>28</integer>
+// CHECK-NEXT: <key>col</key><integer>53</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -2469,7 +2469,7 @@ namespace PR17746 {
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>105</integer>
-// CHECK-NEXT: <key>col</key><integer>21</integer>
+// CHECK-NEXT: <key>col</key><integer>53</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
@@ -2477,12 +2477,12 @@ namespace PR17746 {
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>105</integer>
-// CHECK-NEXT: <key>col</key><integer>21</integer>
+// CHECK-NEXT: <key>col</key><integer>53</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>line</key><integer>105</integer>
-// CHECK-NEXT: <key>col</key><integer>28</integer>
+// CHECK-NEXT: <key>col</key><integer>53</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
diff --git a/test/Analysis/inlining/stl.cpp b/test/Analysis/inlining/stl.cpp
index c153174d27ad..711c30f1031d 100644
--- a/test/Analysis/inlining/stl.cpp
+++ b/test/Analysis/inlining/stl.cpp
@@ -42,3 +42,8 @@ void testBasicStringSuppression_append() {
std::basic_string<char32_t> v;
v += 'c'; // no-warning
}
+
+void testBasicStringSuppression_assign(std::basic_string<char32_t> &v,
+ const std::basic_string<char32_t> &v2) {
+ v = v2;
+}
diff --git a/test/Analysis/kmalloc-linux.c b/test/Analysis/kmalloc-linux.c
new file mode 100644
index 000000000000..87c1107a102e
--- /dev/null
+++ b/test/Analysis/kmalloc-linux.c
@@ -0,0 +1,58 @@
+// RUN: %clang -target x86_64-unknown-linux --analyze %s
+
+#include "Inputs/system-header-simulator.h"
+
+#define __GFP_ZERO 0x8000
+#define NULL ((void *)0)
+
+void *kmalloc(size_t, int);
+
+struct test {
+};
+
+void foo(struct test *);
+
+void test_zeroed() {
+ struct test **list, *t;
+ int i;
+
+ list = kmalloc(sizeof(*list) * 10, __GFP_ZERO);
+ if (list == NULL)
+ return;
+
+ for (i = 0; i < 10; i++) {
+ t = list[i];
+ foo(t);
+ }
+ free(list); // no-warning
+}
+
+void test_nonzero() {
+ struct test **list, *t;
+ int i;
+
+ list = kmalloc(sizeof(*list) * 10, 0);
+ if (list == NULL)
+ return;
+
+ for (i = 0; i < 10; i++) {
+ t = list[i]; // expected-warning{{undefined}}
+ foo(t);
+ }
+ free(list);
+}
+
+void test_indeterminate(int flags) {
+ struct test **list, *t;
+ int i;
+
+ list = kmalloc(sizeof(*list) * 10, flags);
+ if (list == NULL)
+ return;
+
+ for (i = 0; i < 10; i++) {
+ t = list[i]; // expected-warning{{undefined}}
+ foo(t);
+ }
+ free(list);
+}
diff --git a/test/Analysis/malloc-three-arg.c b/test/Analysis/malloc-three-arg.c
new file mode 100644
index 000000000000..01b08aeda51a
--- /dev/null
+++ b/test/Analysis/malloc-three-arg.c
@@ -0,0 +1,58 @@
+// RUN: %clang -target x86_64-unknown-freebsd --analyze %s
+
+#include "Inputs/system-header-simulator.h"
+
+#define M_ZERO 0x0100
+#define NULL ((void *)0)
+
+void *malloc(size_t, void *, int);
+
+struct test {
+};
+
+void foo(struct test *);
+
+void test_zeroed() {
+ struct test **list, *t;
+ int i;
+
+ list = malloc(sizeof(*list) * 10, NULL, M_ZERO);
+ if (list == NULL)
+ return;
+
+ for (i = 0; i < 10; i++) {
+ t = list[i];
+ foo(t);
+ }
+ free(list); // no-warning
+}
+
+void test_nonzero() {
+ struct test **list, *t;
+ int i;
+
+ list = malloc(sizeof(*list) * 10, NULL, 0);
+ if (list == NULL)
+ return;
+
+ for (i = 0; i < 10; i++) {
+ t = list[i]; // expected-warning{{undefined}}
+ foo(t);
+ }
+ free(list);
+}
+
+void test_indeterminate(int flags) {
+ struct test **list, *t;
+ int i;
+
+ list = malloc(sizeof(*list) * 10, NULL, flags);
+ if (list == NULL)
+ return;
+
+ for (i = 0; i < 10; i++) {
+ t = list[i]; // expected-warning{{undefined}}
+ foo(t);
+ }
+ free(list);
+}
diff --git a/test/Analysis/malloc.c b/test/Analysis/malloc.c
index 58d40a31a835..9c08bbcb1c0f 100644
--- a/test/Analysis/malloc.c
+++ b/test/Analysis/malloc.c
@@ -270,6 +270,222 @@ void PR7217() {
buf[1] = 'c'; // not crash
}
+void cast_emtpy_struct() {
+ struct st {
+ };
+
+ struct st *s = malloc(sizeof(struct st)); // no-warning
+ free(s);
+}
+
+void cast_struct_1() {
+ struct st {
+ int i[100];
+ char j[];
+ };
+
+ struct st *s = malloc(sizeof(struct st)); // no-warning
+ free(s);
+}
+
+void cast_struct_2() {
+ struct st {
+ int i[100];
+ char j[0];
+ };
+
+ struct st *s = malloc(sizeof(struct st)); // no-warning
+ free(s);
+}
+
+void cast_struct_3() {
+ struct st {
+ int i[100];
+ char j[1];
+ };
+
+ struct st *s = malloc(sizeof(struct st)); // no-warning
+ free(s);
+}
+
+void cast_struct_4() {
+ struct st {
+ int i[100];
+ char j[2];
+ };
+
+ struct st *s = malloc(sizeof(struct st)); // no-warning
+ free(s);
+}
+
+void cast_struct_5() {
+ struct st {
+ char i[200];
+ char j[1];
+ };
+
+ struct st *s = malloc(sizeof(struct st) - sizeof(char)); // no-warning
+ free(s);
+}
+
+void cast_struct_warn_1() {
+ struct st {
+ int i[100];
+ char j[2];
+ };
+
+ struct st *s = malloc(sizeof(struct st) + 2); // expected-warning{{Cast a region whose size is not a multiple of the destination type size}}
+ free(s);
+}
+
+void cast_struct_warn_2() {
+ struct st {
+ int i[100];
+ char j[2];
+ };
+
+ struct st *s = malloc(2); // expected-warning{{Cast a region whose size is not a multiple of the destination type size}}
+ free(s);
+}
+
+void cast_struct_flex_array_1() {
+ struct st {
+ int i[100];
+ char j[];
+ };
+
+ struct st *s = malloc(sizeof(struct st) + 3); // no-warning
+ free(s);
+}
+
+void cast_struct_flex_array_2() {
+ struct st {
+ int i[100];
+ char j[0];
+ };
+
+ struct st *s = malloc(sizeof(struct st) + 3); // no-warning
+ free(s);
+}
+
+void cast_struct_flex_array_3() {
+ struct st {
+ int i[100];
+ char j[1];
+ };
+
+ struct st *s = malloc(sizeof(struct st) + 3); // no-warning
+ free(s);
+}
+
+void cast_struct_flex_array_4() {
+ struct foo {
+ char f[32];
+ };
+ struct st {
+ char i[100];
+ struct foo data[];
+ };
+
+ struct st *s = malloc(sizeof(struct st) + 3 * sizeof(struct foo)); // no-warning
+ free(s);
+}
+
+void cast_struct_flex_array_5() {
+ struct foo {
+ char f[32];
+ };
+ struct st {
+ char i[100];
+ struct foo data[0];
+ };
+
+ struct st *s = malloc(sizeof(struct st) + 3 * sizeof(struct foo)); // no-warning
+ free(s);
+}
+
+void cast_struct_flex_array_6() {
+ struct foo {
+ char f[32];
+ };
+ struct st {
+ char i[100];
+ struct foo data[1];
+ };
+
+ struct st *s = malloc(sizeof(struct st) + 3 * sizeof(struct foo)); // no-warning
+ free(s);
+}
+
+void cast_struct_flex_array_warn_1() {
+ struct foo {
+ char f[32];
+ };
+ struct st {
+ char i[100];
+ struct foo data[];
+ };
+
+ struct st *s = malloc(3 * sizeof(struct st) + 3 * sizeof(struct foo)); // expected-warning{{Cast a region whose size is not a multiple of the destination type size}}
+ free(s);
+}
+
+void cast_struct_flex_array_warn_2() {
+ struct foo {
+ char f[32];
+ };
+ struct st {
+ char i[100];
+ struct foo data[0];
+ };
+
+ struct st *s = malloc(3 * sizeof(struct st) + 3 * sizeof(struct foo)); // expected-warning{{Cast a region whose size is not a multiple of the destination type size}}
+ free(s);
+}
+
+void cast_struct_flex_array_warn_3() {
+ struct foo {
+ char f[32];
+ };
+ struct st {
+ char i[100];
+ struct foo data[1];
+ };
+
+ struct st *s = malloc(3 * sizeof(struct st) + 3 * sizeof(struct foo)); // expected-warning{{Cast a region whose size is not a multiple of the destination type size}}
+ free(s);
+}
+
+void cast_struct_flex_array_warn_4() {
+ struct st {
+ int i[100];
+ int j[];
+ };
+
+ struct st *s = malloc(sizeof(struct st) + 3); // expected-warning{{Cast a region whose size is not a multiple of the destination type size}}
+ free(s);
+}
+
+void cast_struct_flex_array_warn_5() {
+ struct st {
+ int i[100];
+ int j[0];
+ };
+
+ struct st *s = malloc(sizeof(struct st) + 3); // expected-warning{{Cast a region whose size is not a multiple of the destination type size}}
+ free(s);
+}
+
+void cast_struct_flex_array_warn_6() {
+ struct st {
+ int i[100];
+ int j[1];
+ };
+
+ struct st *s = malloc(sizeof(struct st) + 3); // expected-warning{{Cast a region whose size is not a multiple of the destination type size}}
+ free(s);
+}
+
void mallocCastToVoid() {
void *p = malloc(2);
const void *cp = p; // not crash
diff --git a/test/Analysis/malloc.m b/test/Analysis/malloc.m
index ad16db52dff9..9201c2b75fe6 100644
--- a/test/Analysis/malloc.m
+++ b/test/Analysis/malloc.m
@@ -49,4 +49,9 @@ void _ArrayCreate() {
void testNSDataTruePositiveLeak() {
char *b = (char *)malloc(12);
NSData *d = [[NSData alloc] initWithBytes: b length: 12]; // expected-warning {{Potential leak of memory pointed to by 'b'}}
+}
+
+id wrapInNSValue() {
+ void *buffer = malloc(4);
+ return [NSValue valueWithPointer:buffer]; // no-warning
} \ No newline at end of file
diff --git a/test/Analysis/member-expr.cpp b/test/Analysis/member-expr.cpp
index cf437387d6a6..f8dd324e9857 100644
--- a/test/Analysis/member-expr.cpp
+++ b/test/Analysis/member-expr.cpp
@@ -1,5 +1,6 @@
// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection %s -verify
+void clang_analyzer_checkInlined(bool);
void clang_analyzer_eval(int);
namespace EnumsViaMemberExpr {
@@ -20,4 +21,21 @@ namespace EnumsViaMemberExpr {
void testEnumPtr(Foo *Baz) {
clang_analyzer_eval(Baz->Bar == Foo::Bar); // expected-warning{{TRUE}}
}
-} \ No newline at end of file
+}
+
+namespace PR19531 {
+ struct A {
+ A() : x(0) {}
+ bool h() const;
+ int x;
+ };
+
+ struct B {
+ void g(bool (A::*mp_f)() const) {
+ // This used to trigger an assertion because the 'this' pointer is a
+ // temporary.
+ (A().*mp_f)();
+ }
+ void f() { g(&A::h); }
+ };
+}
diff --git a/test/Analysis/method-arg-decay.m b/test/Analysis/method-arg-decay.m
index 0af9e3e883e3..a222346861a5 100644
--- a/test/Analysis/method-arg-decay.m
+++ b/test/Analysis/method-arg-decay.m
@@ -67,12 +67,12 @@ extern NSMutableArray *XCFindPossibleKeyModules(PBXModule *module, BOOL useExpos
@interface XCExtendedTabView : NSTabView <XCDockViewHeader> {
}
@end @class PBXProjectDocument, PBXFileReference, PBXModule, XCWindowTool;
-@interface XCPerspectiveModule : PBXProjectModule <PBXSelectionTarget> { // expected-note {{required for direct or indirect protocol 'PBXSelectionTarget'}}
+@interface XCPerspectiveModule : PBXProjectModule <PBXSelectionTarget> {
XCExtendedTabView *_perspectivesTabView;
}
- (PBXModule *) moduleForTab:(NSTabViewItem *)item;
@end
-@implementation XCPerspectiveModule // expected-warning {{method 'performAction:withSelection:' in protocol not implemented}}}
+@implementation XCPerspectiveModule // expected-warning {{method 'performAction:withSelection:' in protocol 'PBXSelectionTarget' not implemented}}}
+ (void) openForProjectDocument:(PBXProjectDocument *)projectDocument {
}
- (PBXModule *) type:(Class)type inPerspective:(id)perspectiveIdentifer matchingFunction:(BOOL (void *, void *))comparator usingData:(void *)data {
diff --git a/test/Analysis/misc-ps-region-store.cpp b/test/Analysis/misc-ps-region-store.cpp
index 6a873f01b3d3..af9f7cf838e0 100644
--- a/test/Analysis/misc-ps-region-store.cpp
+++ b/test/Analysis/misc-ps-region-store.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s -fexceptions -fcxx-exceptions
-// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s -fexceptions -fcxx-exceptions
+// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s -fexceptions -fcxx-exceptions -Wno-tautological-undefined-compare
+// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks %s -fexceptions -fcxx-exceptions -Wno-tautological-undefined-compare
void clang_analyzer_warnIfReached();
@@ -588,6 +588,7 @@ void rdar11401827() {
int x = int();
if (!x) {
clang_analyzer_warnIfReached(); // expected-warning{{REACHABLE}}
+ ; // Suppress warning that both branches are identical
}
else {
clang_analyzer_warnIfReached(); // no-warning
diff --git a/test/Analysis/misc-ps-region-store.m b/test/Analysis/misc-ps-region-store.m
index ba88deca5aeb..58166484b822 100644
--- a/test/Analysis/misc-ps-region-store.m
+++ b/test/Analysis/misc-ps-region-store.m
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,alpha.deadcode.IdempotentOperations,alpha.core.CastToStruct,alpha.security.ReturnPtrRange,alpha.security.ArrayBound -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks -Wno-objc-root-class %s
-// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -DTEST_64 -analyze -analyzer-checker=core,alpha.deadcode.IdempotentOperations,alpha.core.CastToStruct,alpha.security.ReturnPtrRange,alpha.security.ArrayBound -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks -Wno-objc-root-class %s
+// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-checker=core,alpha.core.CastToStruct,alpha.security.ReturnPtrRange,alpha.security.ArrayBound -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks -Wno-objc-root-class %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -DTEST_64 -analyze -analyzer-checker=core,alpha.core.CastToStruct,alpha.security.ReturnPtrRange,alpha.security.ArrayBound -analyzer-store=region -verify -fblocks -analyzer-opt-analyze-nested-blocks -Wno-objc-root-class %s
typedef long unsigned int size_t;
void *memcpy(void *, const void *, size_t);
@@ -253,7 +253,7 @@ void rdar_7249327(unsigned int A[2*32]) {
a = A;
b = B;
- n = *a++; // expected-warning{{Assigned value is always the same as the existing value}}
+ n = *a++;
if (n)
x += *b++; // no-warning
}
@@ -1115,7 +1115,7 @@ void pr8015_D_FIXME() {
int number = pr8015_A();
const char *numbers[] = { "zero" };
if (number == 0) {
- if (numbers[number] == numbers[0]) // expected-warning{{Both operands to '==' always have the same value}}
+ if (numbers[number] == numbers[0])
return;
// Unreachable.
int *p = 0;
@@ -1362,5 +1362,5 @@ int rdar11125868() {
int rdar11125868_positive() {
int integersStackArray[1];
int *integers = integersStackArray;
- return integers[0] == 0; // expected-warning {{he left operand of '==' is a}}
+ return integers[0] == 0; // expected-warning {{The left operand of '==' is a}}
}
diff --git a/test/Analysis/misc-ps.m b/test/Analysis/misc-ps.m
index b261b103fab9..6da9604467de 100644
--- a/test/Analysis/misc-ps.m
+++ b/test/Analysis/misc-ps.m
@@ -1,6 +1,6 @@
// NOTE: Use '-fobjc-gc' to test the analysis being run twice, and multiple reports are not issued.
-// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,alpha.deadcode.IdempotentOperations,alpha.core,osx.cocoa.AtSync -analyzer-store=region -analyzer-constraints=range -verify -fblocks -Wno-unreachable-code -Wno-null-dereference -Wno-objc-root-class %s
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,alpha.deadcode.IdempotentOperations,alpha.core,osx.cocoa.AtSync -analyzer-store=region -analyzer-constraints=range -verify -fblocks -Wno-unreachable-code -Wno-null-dereference -Wno-objc-root-class %s
+// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,alpha.core,osx.cocoa.AtSync -analyzer-store=region -analyzer-constraints=range -verify -fblocks -Wno-unreachable-code -Wno-null-dereference -Wno-objc-root-class %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -analyze -analyzer-checker=core,alpha.core,osx.cocoa.AtSync -analyzer-store=region -analyzer-constraints=range -verify -fblocks -Wno-unreachable-code -Wno-null-dereference -Wno-objc-root-class %s
#ifndef __clang_analyzer__
#error __clang_analyzer__ not defined
@@ -80,11 +80,11 @@ unsigned r6268365Aux();
void r6268365() {
unsigned x = 0;
- x &= r6268365Aux(); // expected-warning{{The left operand to '&=' is always 0}}
+ x &= r6268365Aux();
unsigned j = 0;
if (x == 0) ++j;
- if (x == 0) x = x / j; // expected-warning{{Assigned value is always the same as the existing value}} expected-warning{{The right operand to '/' is always 1}}
+ if (x == 0) x = x / j;
}
void divzeroassume(unsigned x, unsigned j) {
@@ -412,14 +412,14 @@ void test_trivial_symbolic_comparison(int *x) {
int test_trivial_symbolic_comparison_aux();
int a = test_trivial_symbolic_comparison_aux();
int b = a;
- if (a != b) { // expected-warning{{Both operands to '!=' always have the same value}}
+ if (a != b) {
int *p = 0;
*p = 0xDEADBEEF; // no-warning
}
a = a == 1;
b = b == 1;
- if (a != b) { // expected-warning{{Both operands to '!=' always have the same value}}
+ if (a != b) {
int *p = 0;
*p = 0xDEADBEEF; // no-warning
}
diff --git a/test/Analysis/new.cpp b/test/Analysis/new.cpp
index 105a973ccc92..e262aa727e2b 100644
--- a/test/Analysis/new.cpp
+++ b/test/Analysis/new.cpp
@@ -267,7 +267,7 @@ void testNullDtorDerived() {
clang_analyzer_eval(true); // no warn
}
-//Deleting a non class pointer should not crash/warn
+//Deleting a non-class pointer should not crash/warn
void test_var_delete() {
int *v = new int;
delete v; // no crash/warn
diff --git a/test/Analysis/no-outofbounds.c b/test/Analysis/no-outofbounds.c
index 84f86d79bd57..d4012794d5c7 100644
--- a/test/Analysis/no-outofbounds.c
+++ b/test/Analysis/no-outofbounds.c
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core,alpha.unix,alpha.security.ArrayBound -analyzer-store=region -verify %s
+// expected-no-diagnostics
//===----------------------------------------------------------------------===//
// This file tests cases where we should not flag out-of-bounds warnings.
@@ -24,8 +25,7 @@ void free(void *);
void field() {
struct vec { size_t len; int data[0]; };
- // FIXME: Not warn for this.
- struct vec *a = malloc(sizeof(struct vec) + 10); // expected-warning {{Cast a region whose size is not a multiple of the destination type size}}
+ struct vec *a = malloc(sizeof(struct vec) + 10*sizeof(int));
a->len = 10;
a->data[1] = 5; // no-warning
free(a);
diff --git a/test/Analysis/nonnull.m b/test/Analysis/nonnull.m
index c32a7f780ece..0cea80b536d8 100644
--- a/test/Analysis/nonnull.m
+++ b/test/Analysis/nonnull.m
@@ -1,7 +1,9 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core -w -verify %s
@interface MyObject
- (void)takePointer:(void *)ptr __attribute__((nonnull(1)));
+- (void)takePointerArg:(void *)__attribute__((nonnull)) ptr;
+
@end
void testNonNullMethod(int *p, MyObject *obj) {
@@ -21,3 +23,55 @@ void testSubclass(int *p, Subclass *obj) {
return;
[obj takePointer:p]; // expected-warning{{nonnull}}
}
+
+void testSubclassArg(int *p, Subclass *obj) {
+ if (p)
+ return;
+ [obj takePointerArg:p]; // expected-warning{{nonnull}}
+}
+
+
+union rdar16153464_const_cp_t {
+ const struct rdar16153464_cczp *zp;
+ const struct rdar16153464_cczp_prime *prime;
+} __attribute__((transparent_union));
+
+struct rdar16153464_header {
+ union rdar16153464_const_cp_t cp;
+ unsigned char pad[16 - sizeof(union rdar16153464_const_cp_t *)];
+} __attribute__((aligned(16)));
+
+
+struct rdar16153464_full_ctx {
+ struct rdar16153464_header hdr;
+} __attribute__((aligned(16)));
+
+
+struct rdar16153464_pub_ctx {
+ struct rdar16153464_header hdr;
+} __attribute__((aligned(16)));
+
+
+union rdar16153464_full_ctx_t {
+ struct rdar16153464_full_ctx *_full;
+ struct rdar16153464_header *hdr;
+ struct rdar16153464_body *body;
+ struct rdar16153464_public *pub;
+} __attribute__((transparent_union));
+
+union rdar16153464_pub_ctx_t {
+ struct rdar16153464_pub_ctx *_pub;
+ struct rdar16153464_full_ctx *_full;
+ struct rdar16153464_header *hdr;
+ struct rdar16153464_body *body;
+ struct rdar16153464_public *pub;
+ union rdar16153464_full_ctx_t innert;
+} __attribute__((transparent_union));
+
+int rdar16153464(union rdar16153464_full_ctx_t inner)
+{
+ extern void rdar16153464_check(union rdar16153464_pub_ctx_t outer) __attribute((nonnull(1)));
+ rdar16153464_check((union rdar16153464_pub_ctx_t){ .innert = inner }); // no-warning
+ rdar16153464_check(inner); // no-warning
+ rdar16153464_check(0); // expected-warning{{nonnull}}
+}
diff --git a/test/Analysis/null-deref-ps.c b/test/Analysis/null-deref-ps.c
index 4dc8fc4ec991..240e8edb13d2 100644
--- a/test/Analysis/null-deref-ps.c
+++ b/test/Analysis/null-deref-ps.c
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,deadcode,alpha.deadcode.IdempotentOperations,alpha.core -std=gnu99 -analyzer-store=region -analyzer-constraints=range -analyzer-purge=none -verify %s -Wno-error=return-type
-// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,deadcode,alpha.deadcode.IdempotentOperations,alpha.core -std=gnu99 -analyzer-store=region -analyzer-constraints=range -verify %s -Wno-error=return-type
+// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,deadcode,alpha.core -std=gnu99 -analyzer-store=region -analyzer-constraints=range -analyzer-purge=none -verify %s -Wno-error=return-type
+// RUN: %clang_cc1 -triple i386-apple-darwin10 -analyze -analyzer-checker=core,deadcode,alpha.core -std=gnu99 -analyzer-store=region -analyzer-constraints=range -verify %s -Wno-error=return-type
typedef unsigned uintptr_t;
@@ -64,7 +64,7 @@ int f4_b() {
short *p = x; // expected-warning{{incompatible integer to pointer conversion}}
// The following branch should be infeasible.
- if (!(p == &array[0])) { // expected-warning{{Both operands to '==' always have the same value}}
+ if (!(p == &array[0])) {
p = 0;
*p = 1; // no-warning
}
@@ -297,7 +297,7 @@ typedef void (*NoConstType)(int*);
int foo10595327(int b) {
void (*fp)(int *);
// We use path sensitivity to get the function declaration. Even when the
- // function pointer is cast to non pointer-to-const parameter type, we can
+ // function pointer is cast to non-pointer-to-const parameter type, we can
// find the right function declaration.
if (b > 5)
fp = (NoConstType)ttt2;
diff --git a/test/Analysis/objc-arc.m b/test/Analysis/objc-arc.m
index ba590d614e8d..92432b1ea802 100644
--- a/test/Analysis/objc-arc.m
+++ b/test/Analysis/objc-arc.m
@@ -138,7 +138,7 @@ NSString *CreateNSString();
void from_cf() {
id obj1 = (__bridge_transfer id)CFCreateSomething(); // expected-warning{{never read}}
id obj2 = (__bridge_transfer NSString*)CFCreateString();
- [obj2 self]; // Add a use, to show we can use the object after it has been transfered.
+ [obj2 self]; // Add a use, to show we can use the object after it has been transferred.
id obj3 = (__bridge id)CFGetSomething();
[obj3 self]; // Add a use, to show we can use the object after it has been bridged.
id obj4 = (__bridge NSString*)CFGetString(); // expected-warning{{never read}}
diff --git a/test/Analysis/objc-boxing.m b/test/Analysis/objc-boxing.m
index 98310b52f49d..c23192e17e5d 100644
--- a/test/Analysis/objc-boxing.m
+++ b/test/Analysis/objc-boxing.m
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc -analyzer-store=region -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,unix.Malloc,osx.cocoa.NonNilReturnValue,debug.ExprInspection -analyzer-store=region -verify %s
+
+void clang_analyzer_eval(int);
typedef signed char BOOL;
typedef long NSInteger;
@@ -41,4 +43,15 @@ id const_char_pointer(int *x) {
if (x)
return @(3);
return @(*x); // expected-warning {{Dereference of null pointer (loaded from variable 'x')}}
-} \ No newline at end of file
+}
+
+void checkNonNil() {
+ clang_analyzer_eval(!!@3); // expected-warning{{TRUE}}
+ clang_analyzer_eval(!!@(3+4)); // expected-warning{{TRUE}}
+ clang_analyzer_eval(!!@(57.0)); // expected-warning{{TRUE}}
+
+ const char *str = "abc";
+ clang_analyzer_eval(!!@(str)); // expected-warning{{TRUE}}
+ clang_analyzer_eval(!!@__objc_yes); // expected-warning{{TRUE}}
+}
+
diff --git a/test/Analysis/objc-for.m b/test/Analysis/objc-for.m
index 2f14b8ad1aae..d1e044a6513b 100644
--- a/test/Analysis/objc-for.m
+++ b/test/Analysis/objc-for.m
@@ -109,7 +109,7 @@ void collectionIsEmptyCollectionIsModified(NSMutableDictionary *D){
}
int collectionIsEmptyNSSet(NSSet *S){
- if ([S count] == 2) { // Count is non zero.
+ if ([S count] == 2) { // Count is non-zero.
int tapCounts[2];
int i = 0;
for (NSString *elem in S) {
diff --git a/test/Analysis/objc-properties.m b/test/Analysis/objc-properties.m
index 323f41af54ce..f6ed3e5ef043 100644
--- a/test/Analysis/objc-properties.m
+++ b/test/Analysis/objc-properties.m
@@ -23,8 +23,8 @@ typedef signed char BOOL;
@property (assign, nonatomic) MyClass* Y; // automatically synthesized, implemented
- @property (assign, nonatomic) MyClass* Z; // non synthesized ivar, implemented setter
- @property (readonly) id nonSynth; // non synthesized, explicitly implemented to return ivar with expected name
+ @property (assign, nonatomic) MyClass* Z; // non-synthesized ivar, implemented setter
+ @property (readonly) id nonSynth; // non-synthesized, explicitly implemented to return ivar with expected name
- (id) initWithPtr:(MyClass*) value;
- (id) myInitWithPtr:(MyClass*) value;
diff --git a/test/Analysis/objc-radar17039661.m b/test/Analysis/objc-radar17039661.m
new file mode 100644
index 000000000000..ec4f19d2da3b
--- /dev/null
+++ b/test/Analysis/objc-radar17039661.m
@@ -0,0 +1,60 @@
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -verify -fblocks %s
+
+@class NSString;
+typedef long NSInteger;
+typedef unsigned char BOOL;
+@interface NSObject {}
++(id)alloc;
+-(id)init;
+-(id)autorelease;
+-(id)copy;
+-(id)retain;
+@end
+@interface NSNumber : NSObject
++ (NSNumber *)numberWithInteger:(NSInteger)value __attribute__((availability(ios,introduced=2.0)));
+@end
+
+NSInteger *inoutIntegerValueGlobal;
+NSInteger *inoutIntegerValueGlobal2;
+NSString *traitNameGlobal;
+static BOOL cond;
+
+static inline void reallyPerformAction(void (^integerHandler)(NSInteger *inoutIntegerValue, NSString *traitName)) {
+ integerHandler(inoutIntegerValueGlobal, traitNameGlobal);
+ integerHandler(inoutIntegerValueGlobal2,traitNameGlobal);
+}
+
+static inline BOOL performAction(NSNumber *(^action)(NSNumber *traitValue)) {
+ __attribute__((__blocks__(byref))) BOOL didFindTrait = 0;
+ reallyPerformAction(^(NSInteger *inoutIntegerValue,NSString *traitName) {
+
+ if (cond) {
+
+ NSNumber *traitValue = @(*inoutIntegerValue);
+
+ NSNumber *newTraitValue = action(traitValue);
+
+ if (traitValue != newTraitValue) {
+ *inoutIntegerValue = newTraitValue ? *inoutIntegerValue : *inoutIntegerValue;
+ }
+ didFindTrait = 1;
+ }
+
+ });
+ return didFindTrait;
+}
+
+void runTest() {
+ __attribute__((__blocks__(byref))) NSNumber *builtinResult = ((NSNumber *)0);
+ BOOL wasBuiltinTrait = performAction(^(NSNumber *traitValue) {
+ builtinResult = [traitValue retain]; // expected-warning {{Potential leak of an object}}
+
+ return traitValue;
+ });
+ if (wasBuiltinTrait) {
+ [builtinResult autorelease];
+ return;
+ } else {
+ return;
+ }
+}
diff --git a/test/Analysis/objc-string.mm b/test/Analysis/objc-string.mm
index c67ab5e8919c..a32b740bba02 100644
--- a/test/Analysis/objc-string.mm
+++ b/test/Analysis/objc-string.mm
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,debug.ExprInspection -verify -Wno-objc-literal-conversion %s
void clang_analyzer_eval(bool);
@class NSString;
diff --git a/test/Analysis/objc/direct-ivar-assignment-in-annotated-functions.m b/test/Analysis/objc/direct-ivar-assignment-in-annotated-functions.m
index f1ecd548eb3e..4777aed99d91 100644
--- a/test/Analysis/objc/direct-ivar-assignment-in-annotated-functions.m
+++ b/test/Analysis/objc/direct-ivar-assignment-in-annotated-functions.m
@@ -32,8 +32,8 @@ typedef signed char BOOL;
@property (assign, nonatomic) MyClass* Y; // automatically synthesized, implemented
- @property (assign, nonatomic) MyClass* Z; // non synthesized ivar, implemented setter
- @property (readonly) id nonSynth; // non synthesized, explicitly implemented to return ivar with expected name
+ @property (assign, nonatomic) MyClass* Z; // non-synthesized ivar, implemented setter
+ @property (readonly) id nonSynth; // non-synthesized, explicitly implemented to return ivar with expected name
@property (assign) MyClass* NotA; // warnings should be suppressed, backing ivar is annotated
@property (assign) MyClass* NotX __attribute__((annotate("objc_allow_direct_instance_variable_assignment"))); // warnings should be suppressed
diff --git a/test/Analysis/properties.m b/test/Analysis/properties.m
index ddd0068d3698..f5b5d92d6adc 100644
--- a/test/Analysis/properties.m
+++ b/test/Analysis/properties.m
@@ -1,4 +1,7 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount -analyzer-store=region -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,debug.ExprInspection -analyzer-store=region -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,debug.ExprInspection -analyzer-store=region -verify -Wno-objc-root-class -fobjc-arc %s
+
+void clang_analyzer_eval(int);
typedef signed char BOOL;
typedef unsigned int NSUInteger;
@@ -14,6 +17,7 @@ typedef struct _NSZone NSZone;
-(id)autorelease;
-(id)copy;
-(id)retain;
+-(oneway void)release;
@end
@interface NSString : NSObject <NSCopying, NSMutableCopying, NSCoding>
- (NSUInteger)length;
@@ -36,6 +40,8 @@ typedef struct _NSZone NSZone;
@end
+#if !__has_feature(objc_arc)
+
@implementation Test1
@synthesize text;
@@ -114,6 +120,8 @@ NSNumber* numberFromMyNumberProperty(MyNumber* aMyNumber)
return [result autorelease]; // expected-warning {{Object autoreleased too many times}}
}
+#endif
+
// rdar://6611873
@@ -121,18 +129,23 @@ NSNumber* numberFromMyNumberProperty(MyNumber* aMyNumber)
NSString *_name;
}
@property (retain) NSString * name;
+@property (assign) id friend;
@end
@implementation Person
@synthesize name = _name;
@end
+#if !__has_feature(objc_arc)
void rdar6611873() {
Person *p = [[[Person alloc] init] autorelease];
p.name = [[NSString string] retain]; // expected-warning {{leak}}
p.name = [[NSString alloc] init]; // expected-warning {{leak}}
+
+ p.friend = [[Person alloc] init]; // expected-warning {{leak}}
}
+#endif
@interface SubPerson : Person
-(NSString *)foo;
@@ -144,6 +157,8 @@ void rdar6611873() {
}
@end
+
+#if !__has_feature(objc_arc)
// <rdar://problem/9241180> Static analyzer doesn't detect uninitialized variable issues for property accesses
@interface RDar9241180
@property (readwrite,assign) id x;
@@ -164,5 +179,168 @@ void rdar6611873() {
self.x = y; // expected-warning {{Argument for property setter is an uninitialized value}}
}
@end
+#endif
+
+
+//------
+// Property accessor synthesis
+//------
+
+extern void doSomethingWithPerson(Person *p);
+extern void doSomethingWithName(NSString *name);
+
+void testConsistencyRetain(Person *p) {
+ clang_analyzer_eval(p.name == p.name); // expected-warning{{TRUE}}
+
+ id origName = p.name;
+ clang_analyzer_eval(p.name == origName); // expected-warning{{TRUE}}
+ doSomethingWithPerson(p);
+ clang_analyzer_eval(p.name == origName); // expected-warning{{UNKNOWN}}
+}
+
+void testConsistencyAssign(Person *p) {
+ clang_analyzer_eval(p.friend == p.friend); // expected-warning{{TRUE}}
+
+ id origFriend = p.friend;
+ clang_analyzer_eval(p.friend == origFriend); // expected-warning{{TRUE}}
+ doSomethingWithPerson(p);
+ clang_analyzer_eval(p.friend == origFriend); // expected-warning{{UNKNOWN}}
+}
+
+#if !__has_feature(objc_arc)
+void testOverrelease(Person *p, int coin) {
+ switch (coin) {
+ case 0:
+ [p.name release]; // expected-warning{{not owned}}
+ break;
+ case 1:
+ [p.friend release]; // expected-warning{{not owned}}
+ break;
+ case 2: {
+ id friend = p.friend;
+ doSomethingWithPerson(p);
+ [friend release]; // expected-warning{{not owned}}
+ }
+ }
+}
+
+// <rdar://problem/16333368>
+@implementation Person (Rdar16333368)
+
+- (void)testDeliberateRelease:(Person *)other {
+ doSomethingWithName(self.name);
+ [_name release]; // no-warning
+ self->_name = 0;
+
+ doSomethingWithName(other->_name);
+ [other.name release]; // expected-warning{{not owned}}
+}
+
+- (void)deliberateReleaseFalseNegative {
+ // This is arguably a false negative because the result of p.friend shouldn't
+ // be released, even though we are manipulating the ivar in between the two
+ // actions.
+ id name = self.name;
+ _name = 0;
+ [name release];
+}
+
+- (void)testRetainAndRelease {
+ [self.name retain];
+ [self.name release];
+ [self.name release]; // expected-warning{{not owned}}
+}
+
+- (void)testRetainAndReleaseIVar {
+ [self.name retain];
+ [_name release];
+ [_name release]; // expected-warning{{not owned}}
+}
+
+@end
+#endif
+
+@interface IntWrapper
+@property int value;
+@end
+
+@implementation IntWrapper
+@synthesize value;
+@end
+void testConsistencyInt(IntWrapper *w) {
+ clang_analyzer_eval(w.value == w.value); // expected-warning{{TRUE}}
+
+ int origValue = w.value;
+ if (origValue != 42)
+ return;
+
+ clang_analyzer_eval(w.value == 42); // expected-warning{{TRUE}}
+}
+
+void testConsistencyInt2(IntWrapper *w) {
+ if (w.value != 42)
+ return;
+
+ clang_analyzer_eval(w.value == 42); // expected-warning{{TRUE}}
+}
+
+
+@interface IntWrapperAuto
+@property int value;
+@end
+
+@implementation IntWrapperAuto
+@end
+
+void testConsistencyIntAuto(IntWrapperAuto *w) {
+ clang_analyzer_eval(w.value == w.value); // expected-warning{{TRUE}}
+
+ int origValue = w.value;
+ if (origValue != 42)
+ return;
+
+ clang_analyzer_eval(w.value == 42); // expected-warning{{TRUE}}
+}
+
+void testConsistencyIntAuto2(IntWrapperAuto *w) {
+ if (w.value != 42)
+ return;
+
+ clang_analyzer_eval(w.value == 42); // expected-warning{{TRUE}}
+}
+
+
+typedef struct {
+ int value;
+} IntWrapperStruct;
+
+@interface StructWrapper
+@property IntWrapperStruct inner;
+@end
+
+@implementation StructWrapper
+@synthesize inner;
+@end
+
+void testConsistencyStruct(StructWrapper *w) {
+ clang_analyzer_eval(w.inner.value == w.inner.value); // expected-warning{{TRUE}}
+
+ int origValue = w.inner.value;
+ if (origValue != 42)
+ return;
+
+ clang_analyzer_eval(w.inner.value == 42); // expected-warning{{TRUE}}
+}
+
+
+@interface OpaqueIntWrapper
+@property int value;
+@end
+
+// For now, don't assume a property is implemented using an ivar unless we can
+// actually see that it is.
+void testOpaqueConsistency(OpaqueIntWrapper *w) {
+ clang_analyzer_eval(w.value == w.value); // expected-warning{{UNKNOWN}}
+}
diff --git a/test/Analysis/properties.mm b/test/Analysis/properties.mm
new file mode 100644
index 000000000000..e49d034f2651
--- /dev/null
+++ b/test/Analysis/properties.mm
@@ -0,0 +1,79 @@
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,debug.ExprInspection -analyzer-store=region -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,osx.cocoa.RetainCount,debug.ExprInspection -analyzer-store=region -verify -Wno-objc-root-class -fobjc-arc %s
+
+void clang_analyzer_eval(bool);
+void clang_analyzer_checkInlined(bool);
+
+@interface IntWrapper
+@property (readonly) int &value;
+@end
+
+@implementation IntWrapper
+@synthesize value;
+@end
+
+void testReferenceConsistency(IntWrapper *w) {
+ clang_analyzer_eval(w.value == w.value); // expected-warning{{TRUE}}
+ clang_analyzer_eval(&w.value == &w.value); // expected-warning{{TRUE}}
+
+ if (w.value != 42)
+ return;
+
+ clang_analyzer_eval(w.value == 42); // expected-warning{{TRUE}}
+}
+
+void testReferenceAssignment(IntWrapper *w) {
+ w.value = 42;
+ clang_analyzer_eval(w.value == 42); // expected-warning{{TRUE}}
+}
+
+
+struct IntWrapperStruct {
+ int value;
+};
+
+@interface StructWrapper
+@property IntWrapperStruct inner;
+@end
+
+@implementation StructWrapper
+@synthesize inner;
+@end
+
+void testConsistencyStruct(StructWrapper *w) {
+ clang_analyzer_eval(w.inner.value == w.inner.value); // expected-warning{{TRUE}}
+
+ int origValue = w.inner.value;
+ if (origValue != 42)
+ return;
+
+ clang_analyzer_eval(w.inner.value == 42); // expected-warning{{TRUE}}
+}
+
+
+class CustomCopy {
+public:
+ CustomCopy() : value(0) {}
+ CustomCopy(const CustomCopy &other) : value(other.value) {
+ clang_analyzer_checkInlined(true); // expected-warning{{TRUE}}
+ }
+ int value;
+};
+
+@interface CustomCopyWrapper
+@property CustomCopy inner;
+@end
+
+@implementation CustomCopyWrapper
+//@synthesize inner;
+@end
+
+void testConsistencyCustomCopy(CustomCopyWrapper *w) {
+ clang_analyzer_eval(w.inner.value == w.inner.value); // expected-warning{{TRUE}}
+
+ int origValue = w.inner.value;
+ if (origValue != 42)
+ return;
+
+ clang_analyzer_eval(w.inner.value == 42); // expected-warning{{TRUE}}
+}
diff --git a/test/Analysis/pthreadlock.c b/test/Analysis/pthreadlock.c
index b90477424511..2a59e0ffe98a 100644
--- a/test/Analysis/pthreadlock.c
+++ b/test/Analysis/pthreadlock.c
@@ -6,17 +6,31 @@ typedef struct {
void *foo;
} pthread_mutex_t;
+typedef struct {
+ void *foo;
+} pthread_mutexattr_t;
+
+typedef struct {
+ void *foo;
+} lck_grp_t;
+
typedef pthread_mutex_t lck_mtx_t;
extern int pthread_mutex_lock(pthread_mutex_t *);
extern int pthread_mutex_unlock(pthread_mutex_t *);
extern int pthread_mutex_trylock(pthread_mutex_t *);
+extern int pthread_mutex_destroy(pthread_mutex_t *);
+extern int pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *mutexattr);
extern int lck_mtx_lock(lck_mtx_t *);
extern int lck_mtx_unlock(lck_mtx_t *);
extern int lck_mtx_try_lock(lck_mtx_t *);
+extern void lck_mtx_destroy(lck_mtx_t *lck, lck_grp_t *grp);
pthread_mutex_t mtx1, mtx2;
lck_mtx_t lck1, lck2;
+lck_grp_t grp1;
+
+#define NULL 0
void
ok1(void)
@@ -69,6 +83,107 @@ ok7(void)
}
void
+ok8(void)
+{
+ pthread_mutex_lock(&mtx1); // no-warning
+ pthread_mutex_lock(&mtx2); // no-warning
+ pthread_mutex_unlock(&mtx2); // no-warning
+ pthread_mutex_unlock(&mtx1); // no-warning
+}
+
+void
+ok9(void)
+{
+ pthread_mutex_unlock(&mtx1); // no-warning
+ if (pthread_mutex_trylock(&mtx1) == 0) // no-warning
+ pthread_mutex_unlock(&mtx1); // no-warning
+}
+
+void
+ok10(void)
+{
+ if (pthread_mutex_trylock(&mtx1) != 0) // no-warning
+ pthread_mutex_lock(&mtx1); // no-warning
+ pthread_mutex_unlock(&mtx1); // no-warning
+}
+
+void
+ok11(void)
+{
+ pthread_mutex_destroy(&mtx1); // no-warning
+}
+
+void
+ok12(void)
+{
+ pthread_mutex_destroy(&mtx1); // no-warning
+ pthread_mutex_destroy(&mtx2); // no-warning
+}
+
+void
+ok13(void)
+{
+ pthread_mutex_unlock(&mtx1); // no-warning
+ pthread_mutex_destroy(&mtx1); // no-warning
+}
+
+void
+ok14(void)
+{
+ pthread_mutex_unlock(&mtx1); // no-warning
+ pthread_mutex_destroy(&mtx1); // no-warning
+ pthread_mutex_unlock(&mtx2); // no-warning
+ pthread_mutex_destroy(&mtx2); // no-warning
+}
+
+void
+ok15(void)
+{
+ pthread_mutex_lock(&mtx1); // no-warning
+ pthread_mutex_unlock(&mtx1); // no-warning
+ pthread_mutex_destroy(&mtx1); // no-warning
+}
+
+void
+ok16(void)
+{
+ pthread_mutex_init(&mtx1, NULL); // no-warning
+}
+
+void
+ok17(void)
+{
+ pthread_mutex_init(&mtx1, NULL); // no-warning
+ pthread_mutex_init(&mtx2, NULL); // no-warning
+}
+
+void
+ok18(void)
+{
+ pthread_mutex_destroy(&mtx1); // no-warning
+ pthread_mutex_init(&mtx1, NULL); // no-warning
+}
+
+void
+ok19(void)
+{
+ pthread_mutex_destroy(&mtx1); // no-warning
+ pthread_mutex_init(&mtx1, NULL); // no-warning
+ pthread_mutex_destroy(&mtx2); // no-warning
+ pthread_mutex_init(&mtx2, NULL); // no-warning
+}
+
+void
+ok20(void)
+{
+ pthread_mutex_unlock(&mtx1); // no-warning
+ pthread_mutex_destroy(&mtx1); // no-warning
+ pthread_mutex_init(&mtx1, NULL); // no-warning
+ pthread_mutex_destroy(&mtx1); // no-warning
+ pthread_mutex_init(&mtx1, NULL); // no-warning
+}
+
+void
bad1(void)
{
pthread_mutex_lock(&mtx1); // no-warning
@@ -135,3 +250,151 @@ bad8(void)
lck_mtx_lock(&lck2); // no-warning
lck_mtx_unlock(&lck1); // expected-warning{{This was not the most recently acquired lock}}
}
+
+void
+bad9(void)
+{
+ lck_mtx_unlock(&lck1); // no-warning
+ lck_mtx_unlock(&lck1); // expected-warning{{This lock has already been unlocked}}
+}
+
+void
+bad10(void)
+{
+ lck_mtx_lock(&lck1); // no-warning
+ lck_mtx_unlock(&lck1); // no-warning
+ lck_mtx_unlock(&lck1); // expected-warning{{This lock has already been unlocked}}
+}
+
+static void
+bad11_sub(pthread_mutex_t *lock)
+{
+ lck_mtx_unlock(lock); // expected-warning{{This lock has already been unlocked}}
+}
+
+void
+bad11(int i)
+{
+ lck_mtx_lock(&lck1); // no-warning
+ lck_mtx_unlock(&lck1); // no-warning
+ if (i < 5)
+ bad11_sub(&lck1);
+}
+
+void
+bad12(void)
+{
+ pthread_mutex_lock(&mtx1); // no-warning
+ pthread_mutex_unlock(&mtx1); // no-warning
+ pthread_mutex_lock(&mtx1); // no-warning
+ pthread_mutex_unlock(&mtx1); // no-warning
+ pthread_mutex_unlock(&mtx1); // expected-warning{{This lock has already been unlocked}}
+}
+
+void
+bad13(void)
+{
+ pthread_mutex_lock(&mtx1); // no-warning
+ pthread_mutex_unlock(&mtx1); // no-warning
+ pthread_mutex_lock(&mtx2); // no-warning
+ pthread_mutex_unlock(&mtx2); // no-warning
+ pthread_mutex_unlock(&mtx1); // expected-warning{{This lock has already been unlocked}}
+}
+
+void
+bad14(void)
+{
+ pthread_mutex_lock(&mtx1); // no-warning
+ pthread_mutex_lock(&mtx2); // no-warning
+ pthread_mutex_unlock(&mtx2); // no-warning
+ pthread_mutex_unlock(&mtx1); // no-warning
+ pthread_mutex_unlock(&mtx2); // expected-warning{{This lock has already been unlocked}}
+}
+
+void
+bad15(void)
+{
+ pthread_mutex_lock(&mtx1); // no-warning
+ pthread_mutex_lock(&mtx2); // no-warning
+ pthread_mutex_unlock(&mtx2); // no-warning
+ pthread_mutex_unlock(&mtx1); // no-warning
+ pthread_mutex_lock(&mtx1); // no-warning
+ pthread_mutex_unlock(&mtx2); // expected-warning{{This lock has already been unlocked}}
+}
+
+void
+bad16(void)
+{
+ pthread_mutex_destroy(&mtx1); // no-warning
+ pthread_mutex_lock(&mtx1); // expected-warning{{This lock has already been destroyed}}
+}
+
+void
+bad17(void)
+{
+ pthread_mutex_destroy(&mtx1); // no-warning
+ pthread_mutex_unlock(&mtx1); // expected-warning{{This lock has already been destroyed}}
+}
+
+void
+bad18(void)
+{
+ pthread_mutex_destroy(&mtx1); // no-warning
+ pthread_mutex_destroy(&mtx1); // expected-warning{{This lock has already been destroyed}}
+}
+
+void
+bad19(void)
+{
+ pthread_mutex_lock(&mtx1); // no-warning
+ pthread_mutex_destroy(&mtx1); // expected-warning{{This lock is still locked}}
+}
+
+void
+bad20(void)
+{
+ lck_mtx_destroy(&mtx1, &grp1); // no-warning
+ lck_mtx_lock(&mtx1); // expected-warning{{This lock has already been destroyed}}
+}
+
+void
+bad21(void)
+{
+ lck_mtx_destroy(&mtx1, &grp1); // no-warning
+ lck_mtx_unlock(&mtx1); // expected-warning{{This lock has already been destroyed}}
+}
+
+void
+bad22(void)
+{
+ lck_mtx_destroy(&mtx1, &grp1); // no-warning
+ lck_mtx_destroy(&mtx1, &grp1); // expected-warning{{This lock has already been destroyed}}
+}
+
+void
+bad23(void)
+{
+ lck_mtx_lock(&mtx1); // no-warning
+ lck_mtx_destroy(&mtx1, &grp1); // expected-warning{{This lock is still locked}}
+}
+
+void
+bad24(void)
+{
+ pthread_mutex_init(&mtx1, NULL); // no-warning
+ pthread_mutex_init(&mtx1, NULL); // expected-warning{{This lock has already been initialized}}
+}
+
+void
+bad25(void)
+{
+ pthread_mutex_lock(&mtx1); // no-warning
+ pthread_mutex_init(&mtx1, NULL); // expected-warning{{This lock is still being held}}
+}
+
+void
+bad26(void)
+{
+ pthread_mutex_unlock(&mtx1); // no-warning
+ pthread_mutex_init(&mtx1, NULL); // expected-warning{{This lock has already been initialized}}
+}
diff --git a/test/Analysis/ptr-arith.c b/test/Analysis/ptr-arith.c
index 4a15bc24b906..96dc8bacbce3 100644
--- a/test/Analysis/ptr-arith.c
+++ b/test/Analysis/ptr-arith.c
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.core.FixedAddr,alpha.core.PointerArithm,alpha.core.PointerSub,debug.ExprInspection -analyzer-store=region -verify -triple x86_64-apple-darwin9 %s
-// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.core.FixedAddr,alpha.core.PointerArithm,alpha.core.PointerSub,debug.ExprInspection -analyzer-store=region -verify -triple i686-apple-darwin9 %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.core.FixedAddr,alpha.core.PointerArithm,alpha.core.PointerSub,debug.ExprInspection -analyzer-store=region -verify -triple x86_64-apple-darwin9 -Wno-tautological-pointer-compare %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=alpha.core.FixedAddr,alpha.core.PointerArithm,alpha.core.PointerSub,debug.ExprInspection -analyzer-store=region -verify -triple i686-apple-darwin9 -Wno-tautological-pointer-compare %s
void clang_analyzer_eval(int);
diff --git a/test/Analysis/reference.cpp b/test/Analysis/reference.cpp
index bd5eaaa30909..cd0202ebcb35 100644
--- a/test/Analysis/reference.cpp
+++ b/test/Analysis/reference.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -analyzer-constraints=range -verify -Wno-null-dereference %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection -analyzer-store=region -analyzer-constraints=range -verify -Wno-null-dereference -Wno-tautological-undefined-compare %s
void clang_analyzer_eval(bool);
diff --git a/test/Analysis/region-1.m b/test/Analysis/region-1.m
index 9edb35b78b7c..6940c69dc1bc 100644
--- a/test/Analysis/region-1.m
+++ b/test/Analysis/region-1.m
@@ -25,7 +25,7 @@ typedef unsigned int NSUInteger;
CK_UNRESTRICTED= 0, CK_READ_ONLY, CK_ADD_ONLY, CK_REMOVE_ONLY };
@protocol EcoClass <EcoBehavioredClassifier> - (NSArray *) ownedAttributes;
@end @protocol EcoNamespace;
-@protocol EcoType;
+@protocol EcoType @end;
@protocol EcoClassifier <EcoNamespace,EcoType> - (NSArray *) features;
@end @protocol EcoComment;
@protocol EcoElement <NSObject> - (NSArray *) ownedElements;
diff --git a/test/Analysis/retain-release-cache-out.m b/test/Analysis/retain-release-cache-out.m
new file mode 100644
index 000000000000..54573a460638
--- /dev/null
+++ b/test/Analysis/retain-release-cache-out.m
@@ -0,0 +1,27 @@
+// RUN: %clang_cc1 -analyze %s -analyzer-checker=core,osx.cocoa.RetainCount -fblocks -verify
+
+// This test is checking behavior when a single checker runs only with the core
+// checkers, testing that the traversal order in the CFG does not affect the
+// reporting of an error.
+
+#import "Inputs/system-header-simulator-objc.h"
+
+void testDoubleRelease(BOOL z) {
+ id x = [[NSObject alloc] init];
+ if (z) {
+ [x release];
+ } else {
+ ;
+ }
+ [x release]; // expected-warning {{Reference-counted object is used after it is released}}
+}
+
+void testDoubleRelease2(BOOL z) {
+ id x = [[NSObject alloc] init];
+ if (z) {
+ ;
+ } else {
+ [x release];
+ }
+ [x release]; // expected-warning {{Reference-counted object is used after it is released}}
+}
diff --git a/test/Analysis/retain-release.m b/test/Analysis/retain-release.m
index aafd94e97bdc..6973f9bcd67d 100644
--- a/test/Analysis/retain-release.m
+++ b/test/Analysis/retain-release.m
@@ -194,8 +194,15 @@ typedef double NSTimeInterval;
@end
@interface NSMutableDictionary : NSDictionary - (void)removeObjectForKey:(id)aKey;
- (void)setObject:(id)anObject forKey:(id)aKey;
-@end @interface NSMutableDictionary (NSMutableDictionaryCreation) + (id)dictionaryWithCapacity:(NSUInteger)numItems;
-@end typedef double CGFloat;
+@end
+@interface NSMutableDictionary (NSMutableDictionaryCreation) + (id)dictionaryWithCapacity:(NSUInteger)numItems;
+@end
+
+@interface NSNull : NSObject
++ (NSNull*) null;
+@end
+
+typedef double CGFloat;
struct CGSize {
};
typedef struct CGSize CGSize;
@@ -210,7 +217,7 @@ typedef struct IONotificationPort * IONotificationPortRef;
typedef void (*IOServiceMatchingCallback)( void * refcon, io_iterator_t iterator );
io_service_t IOServiceGetMatchingService( mach_port_t masterPort, CFDictionaryRef matching );
kern_return_t IOServiceGetMatchingServices( mach_port_t masterPort, CFDictionaryRef matching, io_iterator_t * existing );
-kern_return_t IOServiceAddNotification( mach_port_t masterPort, const io_name_t notificationType, CFDictionaryRef matching, mach_port_t wakePort, uintptr_t reference, io_iterator_t * notification ) __attribute__((deprecated)); // expected-note {{'IOServiceAddNotification' declared here}}
+kern_return_t IOServiceAddNotification( mach_port_t masterPort, const io_name_t notificationType, CFDictionaryRef matching, mach_port_t wakePort, uintptr_t reference, io_iterator_t * notification ) __attribute__((deprecated)); // expected-note {{'IOServiceAddNotification' has been explicitly marked deprecated here}}
kern_return_t IOServiceAddMatchingNotification( IONotificationPortRef notifyPort, const io_name_t notificationType, CFDictionaryRef matching, IOServiceMatchingCallback callback, void * refCon, io_iterator_t * notification );
CFMutableDictionaryRef IOServiceMatching( const char * name );
CFMutableDictionaryRef IOServiceNameMatching( const char * name );
@@ -348,7 +355,7 @@ CFAbsoluteTime f2() {
NSDate* global_x;
-// Test to see if we supresss an error when we store the pointer
+// Test to see if we suppress an error when we store the pointer
// to a global.
CFAbsoluteTime f3() {
@@ -516,38 +523,54 @@ void f15() {
CFRelease(*B); // no-warning
}
-// Test when we pass NULL to CFRetain/CFRelease/CFMakeCollectable.
+// Test when we pass NULL to CFRetain/CFRelease/CFMakeCollectable/CFAutorelease.
void f16(int x, CFTypeRef p) {
if (p)
return;
- if (x > 0) {
+ switch (x) {
+ case 0:
CFRelease(p); // expected-warning{{Null pointer argument in call to CFRelease}}
- }
- else if (x < 0) {
+ break;
+ case 1:
CFRetain(p); // expected-warning{{Null pointer argument in call to CFRetain}}
- }
- else {
+ break;
+ case 2:
CFMakeCollectable(p); // expected-warning{{Null pointer argument in call to CFMakeCollectable}}
+ break;
+ case 3:
+ CFAutorelease(p); // expected-warning{{Null pointer argument in call to CFAutorelease}}
+ break;
+ default:
+ break;
}
}
-// Test that an object is non-null after being CFRetained/CFReleased.
+// Test that an object is non-null after CFRetain/CFRelease/CFMakeCollectable/CFAutorelease.
void f17(int x, CFTypeRef p) {
- if (x > 0) {
+ switch (x) {
+ case 0:
CFRelease(p);
if (!p)
CFRelease(0); // no-warning
- }
- else if (x < 0) {
+ break;
+ case 1:
CFRetain(p);
if (!p)
CFRetain(0); // no-warning
- }
- else {
+ break;
+ case 2:
CFMakeCollectable(p);
if (!p)
CFMakeCollectable(0); // no-warning
+ break;
+ case 3:
+ CFAutorelease(p);
+ if (!p)
+ CFAutorelease(0); // no-warning
+ break;
+ default:
+ break;
}
}
@@ -2121,6 +2144,15 @@ void foo() {
CFStringCreateWithCString(0, "hello world", kCFStringEncodingUTF8);
}
+//===----------------------------------------------------------------------===//
+// Handle NSNull
+//===----------------------------------------------------------------------===//
+
+__attribute__((ns_returns_retained))
+id returnNSNull() {
+ return [NSNull null]; // no-warning
+}
+
// CHECK: <key>diagnostics</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
@@ -2134,12 +2166,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>324</integer>
+// CHECK-NEXT: <key>line</key><integer>334</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>324</integer>
+// CHECK-NEXT: <key>line</key><integer>334</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2147,50 +2179,16 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>325</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>325</integer>
-// CHECK-NEXT: <key>col</key><integer>11</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>325</integer>
+// CHECK-NEXT: <key>line</key><integer>335</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>325</integer>
+// CHECK-NEXT: <key>line</key><integer>335</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>325</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>325</integer>
-// CHECK-NEXT: <key>col</key><integer>31</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -2198,7 +2196,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>325</integer>
+// CHECK-NEXT: <key>line</key><integer>335</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2206,12 +2204,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>325</integer>
+// CHECK-NEXT: <key>line</key><integer>335</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>325</integer>
+// CHECK-NEXT: <key>line</key><integer>335</integer>
// CHECK-NEXT: <key>col</key><integer>37</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2231,25 +2229,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>325</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>line</key><integer>335</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>325</integer>
-// CHECK-NEXT: <key>col</key><integer>31</integer>
+// CHECK-NEXT: <key>line</key><integer>335</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>326</integer>
+// CHECK-NEXT: <key>line</key><integer>336</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>326</integer>
+// CHECK-NEXT: <key>line</key><integer>336</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2261,7 +2259,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>326</integer>
+// CHECK-NEXT: <key>line</key><integer>336</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2269,24 +2267,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>326</integer>
+// CHECK-NEXT: <key>line</key><integer>336</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>326</integer>
+// CHECK-NEXT: <key>line</key><integer>336</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>326</integer>
+// CHECK-NEXT: <key>line</key><integer>336</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>326</integer>
+// CHECK-NEXT: <key>line</key><integer>336</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2306,12 +2304,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>326</integer>
+// CHECK-NEXT: <key>line</key><integer>336</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>326</integer>
+// CHECK-NEXT: <key>line</key><integer>336</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2319,12 +2317,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>327</integer>
+// CHECK-NEXT: <key>line</key><integer>337</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>327</integer>
+// CHECK-NEXT: <key>line</key><integer>337</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2336,7 +2334,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>327</integer>
+// CHECK-NEXT: <key>line</key><integer>337</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2344,24 +2342,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>327</integer>
+// CHECK-NEXT: <key>line</key><integer>337</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>327</integer>
+// CHECK-NEXT: <key>line</key><integer>337</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>327</integer>
+// CHECK-NEXT: <key>line</key><integer>337</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>327</integer>
+// CHECK-NEXT: <key>line</key><integer>337</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2381,12 +2379,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>327</integer>
+// CHECK-NEXT: <key>line</key><integer>337</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>327</integer>
+// CHECK-NEXT: <key>line</key><integer>337</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2394,12 +2392,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>329</integer>
+// CHECK-NEXT: <key>line</key><integer>339</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>329</integer>
+// CHECK-NEXT: <key>line</key><integer>339</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2411,7 +2409,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>329</integer>
+// CHECK-NEXT: <key>line</key><integer>339</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2419,24 +2417,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>329</integer>
+// CHECK-NEXT: <key>line</key><integer>339</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>329</integer>
+// CHECK-NEXT: <key>line</key><integer>339</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>329</integer>
+// CHECK-NEXT: <key>line</key><integer>339</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>329</integer>
+// CHECK-NEXT: <key>line</key><integer>339</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2456,12 +2454,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>329</integer>
+// CHECK-NEXT: <key>line</key><integer>339</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>329</integer>
+// CHECK-NEXT: <key>line</key><integer>339</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2469,12 +2467,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>330</integer>
+// CHECK-NEXT: <key>line</key><integer>340</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>330</integer>
+// CHECK-NEXT: <key>line</key><integer>340</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2490,12 +2488,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>330</integer>
+// CHECK-NEXT: <key>line</key><integer>340</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>330</integer>
+// CHECK-NEXT: <key>line</key><integer>340</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2503,12 +2501,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>330</integer>
+// CHECK-NEXT: <key>line</key><integer>340</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>330</integer>
+// CHECK-NEXT: <key>line</key><integer>340</integer>
// CHECK-NEXT: <key>col</key><integer>27</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2520,7 +2518,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>330</integer>
+// CHECK-NEXT: <key>line</key><integer>340</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2528,12 +2526,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>330</integer>
+// CHECK-NEXT: <key>line</key><integer>340</integer>
// CHECK-NEXT: <key>col</key><integer>29</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>330</integer>
+// CHECK-NEXT: <key>line</key><integer>340</integer>
// CHECK-NEXT: <key>col</key><integer>32</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2554,7 +2552,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>7</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>330</integer>
+// CHECK-NEXT: <key>line</key><integer>340</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2570,12 +2568,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>335</integer>
+// CHECK-NEXT: <key>line</key><integer>345</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>335</integer>
+// CHECK-NEXT: <key>line</key><integer>345</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2583,12 +2581,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>336</integer>
+// CHECK-NEXT: <key>line</key><integer>346</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>336</integer>
+// CHECK-NEXT: <key>line</key><integer>346</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2597,44 +2595,10 @@ void foo() {
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>336</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>336</integer>
-// CHECK-NEXT: <key>col</key><integer>11</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>336</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>336</integer>
-// CHECK-NEXT: <key>col</key><integer>31</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>336</integer>
+// CHECK-NEXT: <key>line</key><integer>346</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2642,12 +2606,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>336</integer>
+// CHECK-NEXT: <key>line</key><integer>346</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>336</integer>
+// CHECK-NEXT: <key>line</key><integer>346</integer>
// CHECK-NEXT: <key>col</key><integer>37</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2667,25 +2631,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>336</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>line</key><integer>346</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>336</integer>
-// CHECK-NEXT: <key>col</key><integer>31</integer>
+// CHECK-NEXT: <key>line</key><integer>346</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>337</integer>
+// CHECK-NEXT: <key>line</key><integer>347</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>337</integer>
+// CHECK-NEXT: <key>line</key><integer>347</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2697,7 +2661,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>337</integer>
+// CHECK-NEXT: <key>line</key><integer>347</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2705,24 +2669,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>337</integer>
+// CHECK-NEXT: <key>line</key><integer>347</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>337</integer>
+// CHECK-NEXT: <key>line</key><integer>347</integer>
// CHECK-NEXT: <key>col</key><integer>27</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>337</integer>
+// CHECK-NEXT: <key>line</key><integer>347</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>337</integer>
+// CHECK-NEXT: <key>line</key><integer>347</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2742,12 +2706,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>337</integer>
+// CHECK-NEXT: <key>line</key><integer>347</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>337</integer>
+// CHECK-NEXT: <key>line</key><integer>347</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2755,12 +2719,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>338</integer>
+// CHECK-NEXT: <key>line</key><integer>348</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>338</integer>
+// CHECK-NEXT: <key>line</key><integer>348</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2772,7 +2736,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>338</integer>
+// CHECK-NEXT: <key>line</key><integer>348</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2780,24 +2744,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>338</integer>
+// CHECK-NEXT: <key>line</key><integer>348</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>338</integer>
+// CHECK-NEXT: <key>line</key><integer>348</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>338</integer>
+// CHECK-NEXT: <key>line</key><integer>348</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>338</integer>
+// CHECK-NEXT: <key>line</key><integer>348</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2817,12 +2781,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>338</integer>
+// CHECK-NEXT: <key>line</key><integer>348</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>338</integer>
+// CHECK-NEXT: <key>line</key><integer>348</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2830,12 +2794,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>340</integer>
+// CHECK-NEXT: <key>line</key><integer>350</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>340</integer>
+// CHECK-NEXT: <key>line</key><integer>350</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2847,7 +2811,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>340</integer>
+// CHECK-NEXT: <key>line</key><integer>350</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2855,24 +2819,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>340</integer>
+// CHECK-NEXT: <key>line</key><integer>350</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>340</integer>
+// CHECK-NEXT: <key>line</key><integer>350</integer>
// CHECK-NEXT: <key>col</key><integer>28</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>340</integer>
+// CHECK-NEXT: <key>line</key><integer>350</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>340</integer>
+// CHECK-NEXT: <key>line</key><integer>350</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2892,12 +2856,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>340</integer>
+// CHECK-NEXT: <key>line</key><integer>350</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>340</integer>
+// CHECK-NEXT: <key>line</key><integer>350</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2905,12 +2869,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>341</integer>
+// CHECK-NEXT: <key>line</key><integer>351</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>341</integer>
+// CHECK-NEXT: <key>line</key><integer>351</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2926,12 +2890,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>341</integer>
+// CHECK-NEXT: <key>line</key><integer>351</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>341</integer>
+// CHECK-NEXT: <key>line</key><integer>351</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2939,12 +2903,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>341</integer>
+// CHECK-NEXT: <key>line</key><integer>351</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>341</integer>
+// CHECK-NEXT: <key>line</key><integer>351</integer>
// CHECK-NEXT: <key>col</key><integer>27</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2956,7 +2920,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>341</integer>
+// CHECK-NEXT: <key>line</key><integer>351</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2964,12 +2928,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>341</integer>
+// CHECK-NEXT: <key>line</key><integer>351</integer>
// CHECK-NEXT: <key>col</key><integer>29</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>341</integer>
+// CHECK-NEXT: <key>line</key><integer>351</integer>
// CHECK-NEXT: <key>col</key><integer>32</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -2990,7 +2954,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>7</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>341</integer>
+// CHECK-NEXT: <key>line</key><integer>351</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3006,12 +2970,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>371</integer>
+// CHECK-NEXT: <key>line</key><integer>381</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>371</integer>
+// CHECK-NEXT: <key>line</key><integer>381</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3019,50 +2983,16 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>372</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>372</integer>
-// CHECK-NEXT: <key>col</key><integer>11</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>372</integer>
+// CHECK-NEXT: <key>line</key><integer>382</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>372</integer>
+// CHECK-NEXT: <key>line</key><integer>382</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>372</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>372</integer>
-// CHECK-NEXT: <key>col</key><integer>31</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -3070,7 +3000,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>372</integer>
+// CHECK-NEXT: <key>line</key><integer>382</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3078,12 +3008,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>372</integer>
+// CHECK-NEXT: <key>line</key><integer>382</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>372</integer>
+// CHECK-NEXT: <key>line</key><integer>382</integer>
// CHECK-NEXT: <key>col</key><integer>37</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3103,25 +3033,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>372</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>line</key><integer>382</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>372</integer>
-// CHECK-NEXT: <key>col</key><integer>31</integer>
+// CHECK-NEXT: <key>line</key><integer>382</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>374</integer>
+// CHECK-NEXT: <key>line</key><integer>384</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>374</integer>
+// CHECK-NEXT: <key>line</key><integer>384</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3137,12 +3067,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>374</integer>
+// CHECK-NEXT: <key>line</key><integer>384</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>374</integer>
+// CHECK-NEXT: <key>line</key><integer>384</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3150,12 +3080,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>374</integer>
+// CHECK-NEXT: <key>line</key><integer>384</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>374</integer>
+// CHECK-NEXT: <key>line</key><integer>384</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3167,7 +3097,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>374</integer>
+// CHECK-NEXT: <key>line</key><integer>384</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3175,12 +3105,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>374</integer>
+// CHECK-NEXT: <key>line</key><integer>384</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>374</integer>
+// CHECK-NEXT: <key>line</key><integer>384</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3200,12 +3130,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>374</integer>
+// CHECK-NEXT: <key>line</key><integer>384</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>374</integer>
+// CHECK-NEXT: <key>line</key><integer>384</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3213,12 +3143,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>377</integer>
+// CHECK-NEXT: <key>line</key><integer>387</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>377</integer>
+// CHECK-NEXT: <key>line</key><integer>387</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3234,12 +3164,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>377</integer>
+// CHECK-NEXT: <key>line</key><integer>387</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>377</integer>
+// CHECK-NEXT: <key>line</key><integer>387</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3247,12 +3177,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>377</integer>
+// CHECK-NEXT: <key>line</key><integer>387</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>377</integer>
+// CHECK-NEXT: <key>line</key><integer>387</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3264,7 +3194,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>377</integer>
+// CHECK-NEXT: <key>line</key><integer>387</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3272,12 +3202,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>377</integer>
+// CHECK-NEXT: <key>line</key><integer>387</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>377</integer>
+// CHECK-NEXT: <key>line</key><integer>387</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3295,10 +3225,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>f5</string>
-// CHECK-NEXT: <key>issue_hash</key><string>7</string>
+// CHECK-NEXT: <key>issue_hash</key><string>2</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>377</integer>
+// CHECK-NEXT: <key>line</key><integer>387</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3307,44 +3237,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>383</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>383</integer>
-// CHECK-NEXT: <key>col</key><integer>11</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>383</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>383</integer>
-// CHECK-NEXT: <key>col</key><integer>31</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>383</integer>
+// CHECK-NEXT: <key>line</key><integer>393</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3352,12 +3248,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>383</integer>
+// CHECK-NEXT: <key>line</key><integer>393</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>383</integer>
+// CHECK-NEXT: <key>line</key><integer>393</integer>
// CHECK-NEXT: <key>col</key><integer>62</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3377,25 +3273,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>383</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>line</key><integer>393</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>383</integer>
-// CHECK-NEXT: <key>col</key><integer>31</integer>
+// CHECK-NEXT: <key>line</key><integer>393</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>384</integer>
+// CHECK-NEXT: <key>line</key><integer>394</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>384</integer>
+// CHECK-NEXT: <key>line</key><integer>394</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3407,7 +3303,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>384</integer>
+// CHECK-NEXT: <key>line</key><integer>394</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3415,24 +3311,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>384</integer>
+// CHECK-NEXT: <key>line</key><integer>394</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>384</integer>
+// CHECK-NEXT: <key>line</key><integer>394</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>384</integer>
+// CHECK-NEXT: <key>line</key><integer>394</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>384</integer>
+// CHECK-NEXT: <key>line</key><integer>394</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3452,12 +3348,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>384</integer>
+// CHECK-NEXT: <key>line</key><integer>394</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>384</integer>
+// CHECK-NEXT: <key>line</key><integer>394</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3465,12 +3361,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>385</integer>
+// CHECK-NEXT: <key>line</key><integer>395</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>385</integer>
+// CHECK-NEXT: <key>line</key><integer>395</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3482,7 +3378,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>385</integer>
+// CHECK-NEXT: <key>line</key><integer>395</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3490,24 +3386,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>385</integer>
+// CHECK-NEXT: <key>line</key><integer>395</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>385</integer>
+// CHECK-NEXT: <key>line</key><integer>395</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>385</integer>
+// CHECK-NEXT: <key>line</key><integer>395</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>385</integer>
+// CHECK-NEXT: <key>line</key><integer>395</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3527,12 +3423,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>385</integer>
+// CHECK-NEXT: <key>line</key><integer>395</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>385</integer>
+// CHECK-NEXT: <key>line</key><integer>395</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3540,12 +3436,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>386</integer>
+// CHECK-NEXT: <key>line</key><integer>396</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>386</integer>
+// CHECK-NEXT: <key>line</key><integer>396</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3557,7 +3453,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>386</integer>
+// CHECK-NEXT: <key>line</key><integer>396</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3573,10 +3469,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>f6</string>
-// CHECK-NEXT: <key>issue_hash</key><string>4</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>386</integer>
+// CHECK-NEXT: <key>line</key><integer>396</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3585,44 +3481,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>391</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>391</integer>
-// CHECK-NEXT: <key>col</key><integer>11</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>391</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>391</integer>
-// CHECK-NEXT: <key>col</key><integer>31</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>391</integer>
+// CHECK-NEXT: <key>line</key><integer>401</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3630,12 +3492,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>391</integer>
+// CHECK-NEXT: <key>line</key><integer>401</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>391</integer>
+// CHECK-NEXT: <key>line</key><integer>401</integer>
// CHECK-NEXT: <key>col</key><integer>62</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3655,25 +3517,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>391</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>line</key><integer>401</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>391</integer>
-// CHECK-NEXT: <key>col</key><integer>31</integer>
+// CHECK-NEXT: <key>line</key><integer>401</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>392</integer>
+// CHECK-NEXT: <key>line</key><integer>402</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>392</integer>
+// CHECK-NEXT: <key>line</key><integer>402</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3685,7 +3547,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>392</integer>
+// CHECK-NEXT: <key>line</key><integer>402</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3693,24 +3555,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>392</integer>
+// CHECK-NEXT: <key>line</key><integer>402</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>392</integer>
+// CHECK-NEXT: <key>line</key><integer>402</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>392</integer>
+// CHECK-NEXT: <key>line</key><integer>402</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>392</integer>
+// CHECK-NEXT: <key>line</key><integer>402</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3730,12 +3592,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>392</integer>
+// CHECK-NEXT: <key>line</key><integer>402</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>392</integer>
+// CHECK-NEXT: <key>line</key><integer>402</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3743,12 +3605,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>394</integer>
+// CHECK-NEXT: <key>line</key><integer>404</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>394</integer>
+// CHECK-NEXT: <key>line</key><integer>404</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3760,7 +3622,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>394</integer>
+// CHECK-NEXT: <key>line</key><integer>404</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3768,12 +3630,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>394</integer>
+// CHECK-NEXT: <key>line</key><integer>404</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>394</integer>
+// CHECK-NEXT: <key>line</key><integer>404</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3791,10 +3653,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>f7</string>
-// CHECK-NEXT: <key>issue_hash</key><string>4</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>394</integer>
+// CHECK-NEXT: <key>line</key><integer>404</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3810,12 +3672,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>391</integer>
+// CHECK-NEXT: <key>line</key><integer>401</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>391</integer>
+// CHECK-NEXT: <key>line</key><integer>401</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3823,50 +3685,16 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>393</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>393</integer>
-// CHECK-NEXT: <key>col</key><integer>6</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>393</integer>
+// CHECK-NEXT: <key>line</key><integer>403</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>393</integer>
+// CHECK-NEXT: <key>line</key><integer>403</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>393</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>393</integer>
-// CHECK-NEXT: <key>col</key><integer>21</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -3874,7 +3702,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>393</integer>
+// CHECK-NEXT: <key>line</key><integer>403</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3882,12 +3710,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>393</integer>
+// CHECK-NEXT: <key>line</key><integer>403</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>393</integer>
+// CHECK-NEXT: <key>line</key><integer>403</integer>
// CHECK-NEXT: <key>col</key><integer>52</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3907,25 +3735,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>393</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
+// CHECK-NEXT: <key>line</key><integer>403</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>393</integer>
-// CHECK-NEXT: <key>col</key><integer>21</integer>
+// CHECK-NEXT: <key>line</key><integer>403</integer>
+// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>394</integer>
+// CHECK-NEXT: <key>line</key><integer>404</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>394</integer>
+// CHECK-NEXT: <key>line</key><integer>404</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3937,7 +3765,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>394</integer>
+// CHECK-NEXT: <key>line</key><integer>404</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3945,24 +3773,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>394</integer>
+// CHECK-NEXT: <key>line</key><integer>404</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>394</integer>
+// CHECK-NEXT: <key>line</key><integer>404</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>394</integer>
+// CHECK-NEXT: <key>line</key><integer>404</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>394</integer>
+// CHECK-NEXT: <key>line</key><integer>404</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3978,7 +3806,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>394</integer>
+// CHECK-NEXT: <key>line</key><integer>404</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -3986,12 +3814,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>394</integer>
+// CHECK-NEXT: <key>line</key><integer>404</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>394</integer>
+// CHECK-NEXT: <key>line</key><integer>404</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4009,10 +3837,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak of returned object</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>f7</string>
-// CHECK-NEXT: <key>issue_hash</key><string>4</string>
+// CHECK-NEXT: <key>issue_hash</key><string>3</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>394</integer>
+// CHECK-NEXT: <key>line</key><integer>404</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4021,44 +3849,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>402</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>402</integer>
-// CHECK-NEXT: <key>col</key><integer>11</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>402</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>402</integer>
-// CHECK-NEXT: <key>col</key><integer>31</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>402</integer>
+// CHECK-NEXT: <key>line</key><integer>412</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4066,12 +3860,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>402</integer>
+// CHECK-NEXT: <key>line</key><integer>412</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>402</integer>
+// CHECK-NEXT: <key>line</key><integer>412</integer>
// CHECK-NEXT: <key>col</key><integer>33</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4091,25 +3885,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>402</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>line</key><integer>412</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>402</integer>
-// CHECK-NEXT: <key>col</key><integer>31</integer>
+// CHECK-NEXT: <key>line</key><integer>412</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>403</integer>
+// CHECK-NEXT: <key>line</key><integer>413</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>403</integer>
+// CHECK-NEXT: <key>line</key><integer>413</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4121,7 +3915,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>403</integer>
+// CHECK-NEXT: <key>line</key><integer>413</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4129,24 +3923,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>403</integer>
+// CHECK-NEXT: <key>line</key><integer>413</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>403</integer>
+// CHECK-NEXT: <key>line</key><integer>413</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>403</integer>
+// CHECK-NEXT: <key>line</key><integer>413</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>403</integer>
+// CHECK-NEXT: <key>line</key><integer>413</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4166,12 +3960,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>403</integer>
+// CHECK-NEXT: <key>line</key><integer>413</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>403</integer>
+// CHECK-NEXT: <key>line</key><integer>413</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4179,12 +3973,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>404</integer>
+// CHECK-NEXT: <key>line</key><integer>414</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>404</integer>
+// CHECK-NEXT: <key>line</key><integer>414</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4196,7 +3990,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>404</integer>
+// CHECK-NEXT: <key>line</key><integer>414</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4204,24 +3998,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>404</integer>
+// CHECK-NEXT: <key>line</key><integer>414</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>404</integer>
+// CHECK-NEXT: <key>line</key><integer>414</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>404</integer>
+// CHECK-NEXT: <key>line</key><integer>414</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>404</integer>
+// CHECK-NEXT: <key>line</key><integer>414</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4241,12 +4035,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>404</integer>
+// CHECK-NEXT: <key>line</key><integer>414</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>404</integer>
+// CHECK-NEXT: <key>line</key><integer>414</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4254,12 +4048,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>405</integer>
+// CHECK-NEXT: <key>line</key><integer>415</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>405</integer>
+// CHECK-NEXT: <key>line</key><integer>415</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4271,7 +4065,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>405</integer>
+// CHECK-NEXT: <key>line</key><integer>415</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4287,10 +4081,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>f8</string>
-// CHECK-NEXT: <key>issue_hash</key><string>4</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>405</integer>
+// CHECK-NEXT: <key>line</key><integer>415</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4306,12 +4100,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>408</integer>
+// CHECK-NEXT: <key>line</key><integer>418</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>408</integer>
+// CHECK-NEXT: <key>line</key><integer>418</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4319,12 +4113,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>409</integer>
+// CHECK-NEXT: <key>line</key><integer>419</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>409</integer>
+// CHECK-NEXT: <key>line</key><integer>419</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4336,7 +4130,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>409</integer>
+// CHECK-NEXT: <key>line</key><integer>419</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4344,12 +4138,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>409</integer>
+// CHECK-NEXT: <key>line</key><integer>419</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>409</integer>
+// CHECK-NEXT: <key>line</key><integer>419</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4357,9 +4151,9 @@ void foo() {
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
-// CHECK-NEXT: <string>Variable &apos;p&apos; initialized to a null pointer value</string>
+// CHECK-NEXT: <string>&apos;p&apos; initialized to a null pointer value</string>
// CHECK-NEXT: <key>message</key>
-// CHECK-NEXT: <string>Variable &apos;p&apos; initialized to a null pointer value</string>
+// CHECK-NEXT: <string>&apos;p&apos; initialized to a null pointer value</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
@@ -4369,12 +4163,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>409</integer>
+// CHECK-NEXT: <key>line</key><integer>419</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>409</integer>
+// CHECK-NEXT: <key>line</key><integer>419</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4382,12 +4176,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>411</integer>
+// CHECK-NEXT: <key>line</key><integer>421</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>411</integer>
+// CHECK-NEXT: <key>line</key><integer>421</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4403,12 +4197,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>411</integer>
+// CHECK-NEXT: <key>line</key><integer>421</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>411</integer>
+// CHECK-NEXT: <key>line</key><integer>421</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4416,12 +4210,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>411</integer>
+// CHECK-NEXT: <key>line</key><integer>421</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>411</integer>
+// CHECK-NEXT: <key>line</key><integer>421</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4433,7 +4227,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>411</integer>
+// CHECK-NEXT: <key>line</key><integer>421</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4441,12 +4235,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>411</integer>
+// CHECK-NEXT: <key>line</key><integer>421</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>411</integer>
+// CHECK-NEXT: <key>line</key><integer>421</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4466,12 +4260,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>411</integer>
+// CHECK-NEXT: <key>line</key><integer>421</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>411</integer>
+// CHECK-NEXT: <key>line</key><integer>421</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4479,16 +4273,50 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>411</integer>
+// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>col</key><integer>14</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>col</key><integer>14</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>421</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>411</integer>
+// CHECK-NEXT: <key>line</key><integer>421</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>col</key><integer>17</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>col</key><integer>17</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -4496,20 +4324,20 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>411</integer>
-// CHECK-NEXT: <key>col</key><integer>14</integer>
+// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>411</integer>
+// CHECK-NEXT: <key>line</key><integer>421</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>411</integer>
+// CHECK-NEXT: <key>line</key><integer>421</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4530,8 +4358,8 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>4</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>411</integer>
-// CHECK-NEXT: <key>col</key><integer>14</integer>
+// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
@@ -4539,44 +4367,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>420</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>420</integer>
-// CHECK-NEXT: <key>col</key><integer>11</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>420</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>420</integer>
-// CHECK-NEXT: <key>col</key><integer>42</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>420</integer>
+// CHECK-NEXT: <key>line</key><integer>430</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4584,12 +4378,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>420</integer>
+// CHECK-NEXT: <key>line</key><integer>430</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>420</integer>
+// CHECK-NEXT: <key>line</key><integer>430</integer>
// CHECK-NEXT: <key>col</key><integer>75</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4609,25 +4403,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>420</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>420</integer>
-// CHECK-NEXT: <key>col</key><integer>42</integer>
+// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4643,12 +4437,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4656,12 +4450,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4673,7 +4467,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4681,12 +4475,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4706,12 +4500,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4719,12 +4513,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4740,12 +4534,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4753,12 +4547,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4774,12 +4568,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4787,12 +4581,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4808,12 +4602,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4821,12 +4615,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4838,7 +4632,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4846,12 +4640,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4871,12 +4665,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4884,12 +4678,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4905,12 +4699,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4918,13 +4712,13 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
-// CHECK-NEXT: <key>col</key><integer>48</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
+// CHECK-NEXT: <key>col</key><integer>26</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
-// CHECK-NEXT: <key>col</key><integer>48</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
+// CHECK-NEXT: <key>col</key><integer>46</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -4935,21 +4729,21 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
-// CHECK-NEXT: <key>col</key><integer>48</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
+// CHECK-NEXT: <key>col</key><integer>26</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
-// CHECK-NEXT: <key>col</key><integer>48</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
+// CHECK-NEXT: <key>col</key><integer>26</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
-// CHECK-NEXT: <key>col</key><integer>48</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
+// CHECK-NEXT: <key>col</key><integer>46</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -4966,11 +4760,11 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>f10</string>
-// CHECK-NEXT: <key>issue_hash</key><string>7</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
-// CHECK-NEXT: <key>col</key><integer>48</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
+// CHECK-NEXT: <key>col</key><integer>26</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
@@ -4985,12 +4779,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>420</integer>
+// CHECK-NEXT: <key>line</key><integer>430</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>420</integer>
+// CHECK-NEXT: <key>line</key><integer>430</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -4998,12 +4792,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5019,12 +4813,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5032,12 +4826,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5049,7 +4843,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5057,12 +4851,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5082,12 +4876,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5095,12 +4889,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5116,12 +4910,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5129,12 +4923,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5150,12 +4944,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5163,12 +4957,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5180,7 +4974,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5188,12 +4982,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5213,12 +5007,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5226,50 +5020,16 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
-// CHECK-NEXT: <key>col</key><integer>17</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
-// CHECK-NEXT: <key>col</key><integer>46</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -5277,7 +5037,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>26</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5285,12 +5045,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>26</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>49</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5310,25 +5070,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
-// CHECK-NEXT: <key>col</key><integer>46</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
+// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5344,12 +5104,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5357,12 +5117,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5374,7 +5134,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5382,12 +5142,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5407,12 +5167,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5420,50 +5180,16 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
-// CHECK-NEXT: <key>col</key><integer>13</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
-// CHECK-NEXT: <key>col</key><integer>17</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
-// CHECK-NEXT: <key>col</key><integer>23</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -5471,21 +5197,21 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
+// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
+// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
-// CHECK-NEXT: <key>col</key><integer>23</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
+// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -5502,11 +5228,11 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>f10</string>
-// CHECK-NEXT: <key>issue_hash</key><string>8</string>
+// CHECK-NEXT: <key>issue_hash</key><string>7</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
+// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
@@ -5521,12 +5247,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>420</integer>
+// CHECK-NEXT: <key>line</key><integer>430</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>420</integer>
+// CHECK-NEXT: <key>line</key><integer>430</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5534,12 +5260,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5555,12 +5281,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5568,12 +5294,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5585,7 +5311,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5593,12 +5319,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5618,12 +5344,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5631,12 +5357,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5652,12 +5378,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5665,12 +5391,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5686,12 +5412,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5699,12 +5425,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5716,7 +5442,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5724,12 +5450,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5749,12 +5475,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5762,12 +5488,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5783,12 +5509,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5796,12 +5522,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5817,12 +5543,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5830,12 +5556,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5847,7 +5573,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5855,12 +5581,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5880,12 +5606,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5893,50 +5619,16 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>429</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>429</integer>
-// CHECK-NEXT: <key>col</key><integer>6</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>429</integer>
+// CHECK-NEXT: <key>line</key><integer>439</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>429</integer>
+// CHECK-NEXT: <key>line</key><integer>439</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>429</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>429</integer>
-// CHECK-NEXT: <key>col</key><integer>28</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -5944,7 +5636,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>429</integer>
+// CHECK-NEXT: <key>line</key><integer>439</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5952,12 +5644,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>429</integer>
+// CHECK-NEXT: <key>line</key><integer>439</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>429</integer>
+// CHECK-NEXT: <key>line</key><integer>439</integer>
// CHECK-NEXT: <key>col</key><integer>31</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -5977,25 +5669,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>429</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
+// CHECK-NEXT: <key>line</key><integer>439</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>429</integer>
-// CHECK-NEXT: <key>col</key><integer>28</integer>
+// CHECK-NEXT: <key>line</key><integer>439</integer>
+// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6011,12 +5703,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6024,12 +5716,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6041,7 +5733,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6049,12 +5741,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6074,12 +5766,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6087,50 +5779,16 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
-// CHECK-NEXT: <key>col</key><integer>13</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
-// CHECK-NEXT: <key>col</key><integer>17</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
-// CHECK-NEXT: <key>col</key><integer>23</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -6138,21 +5796,21 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
+// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
+// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
-// CHECK-NEXT: <key>col</key><integer>23</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
+// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -6169,11 +5827,11 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>f10</string>
-// CHECK-NEXT: <key>issue_hash</key><string>11</string>
+// CHECK-NEXT: <key>issue_hash</key><string>10</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
+// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
@@ -6188,12 +5846,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>420</integer>
+// CHECK-NEXT: <key>line</key><integer>430</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>420</integer>
+// CHECK-NEXT: <key>line</key><integer>430</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6201,12 +5859,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6222,12 +5880,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6235,12 +5893,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6252,7 +5910,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6260,12 +5918,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6285,12 +5943,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6298,50 +5956,16 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
-// CHECK-NEXT: <key>col</key><integer>6</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
-// CHECK-NEXT: <key>col</key><integer>32</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -6349,7 +5973,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6357,12 +5981,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>63</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6382,25 +6006,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
-// CHECK-NEXT: <key>col</key><integer>32</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
+// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6416,12 +6040,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6429,12 +6053,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6446,7 +6070,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6454,12 +6078,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6479,12 +6103,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6492,12 +6116,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6513,12 +6137,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6526,12 +6150,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6547,12 +6171,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6560,12 +6184,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6581,12 +6205,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6594,12 +6218,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6611,7 +6235,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6619,12 +6243,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6644,12 +6268,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6657,12 +6281,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>429</integer>
+// CHECK-NEXT: <key>line</key><integer>439</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>429</integer>
+// CHECK-NEXT: <key>line</key><integer>439</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6678,12 +6302,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>429</integer>
+// CHECK-NEXT: <key>line</key><integer>439</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>429</integer>
+// CHECK-NEXT: <key>line</key><integer>439</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6691,12 +6315,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6712,12 +6336,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6725,12 +6349,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6742,7 +6366,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6750,12 +6374,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6775,12 +6399,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6788,12 +6412,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>432</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>432</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6809,12 +6433,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>432</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>432</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6822,13 +6446,13 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>433</integer>
-// CHECK-NEXT: <key>col</key><integer>67</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
+// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>433</integer>
-// CHECK-NEXT: <key>col</key><integer>67</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
+// CHECK-NEXT: <key>col</key><integer>46</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -6839,21 +6463,21 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>433</integer>
-// CHECK-NEXT: <key>col</key><integer>67</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
+// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>433</integer>
-// CHECK-NEXT: <key>col</key><integer>67</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
+// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>433</integer>
-// CHECK-NEXT: <key>col</key><integer>67</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
+// CHECK-NEXT: <key>col</key><integer>46</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -6870,11 +6494,11 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>f10</string>
-// CHECK-NEXT: <key>issue_hash</key><string>14</string>
+// CHECK-NEXT: <key>issue_hash</key><string>4</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>433</integer>
-// CHECK-NEXT: <key>col</key><integer>67</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
+// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
@@ -6889,12 +6513,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>420</integer>
+// CHECK-NEXT: <key>line</key><integer>430</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>420</integer>
+// CHECK-NEXT: <key>line</key><integer>430</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6902,12 +6526,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6923,12 +6547,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6936,12 +6560,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6953,7 +6577,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6961,12 +6585,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6986,12 +6610,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -6999,12 +6623,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7020,12 +6644,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7033,12 +6657,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7054,12 +6678,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7067,12 +6691,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7084,7 +6708,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7092,12 +6716,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7117,12 +6741,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7130,12 +6754,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7151,12 +6775,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7164,12 +6788,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7185,12 +6809,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7198,12 +6822,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7215,7 +6839,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7223,12 +6847,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7248,12 +6872,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7261,12 +6885,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>429</integer>
+// CHECK-NEXT: <key>line</key><integer>439</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>429</integer>
+// CHECK-NEXT: <key>line</key><integer>439</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7282,12 +6906,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>429</integer>
+// CHECK-NEXT: <key>line</key><integer>439</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>429</integer>
+// CHECK-NEXT: <key>line</key><integer>439</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7295,12 +6919,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7316,12 +6940,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7329,12 +6953,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7346,7 +6970,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7354,12 +6978,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7379,12 +7003,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7392,12 +7016,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>432</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>432</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7413,12 +7037,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>432</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>432</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7426,12 +7050,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>432</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>432</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
// CHECK-NEXT: <key>col</key><integer>46</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7443,7 +7067,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>432</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7451,12 +7075,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>432</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>433</integer>
+// CHECK-NEXT: <key>line</key><integer>443</integer>
// CHECK-NEXT: <key>col</key><integer>68</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7476,12 +7100,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>432</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>432</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
// CHECK-NEXT: <key>col</key><integer>46</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7489,12 +7113,46 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7510,12 +7168,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7523,12 +7181,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7540,7 +7198,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7548,12 +7206,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7573,12 +7231,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7586,50 +7244,16 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
-// CHECK-NEXT: <key>col</key><integer>18</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
// CHECK-NEXT: <key>col</key><integer>18</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
-// CHECK-NEXT: <key>col</key><integer>25</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
-// CHECK-NEXT: <key>col</key><integer>28</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -7637,21 +7261,21 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
-// CHECK-NEXT: <key>col</key><integer>25</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
+// CHECK-NEXT: <key>col</key><integer>18</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
-// CHECK-NEXT: <key>col</key><integer>25</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
+// CHECK-NEXT: <key>col</key><integer>18</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
-// CHECK-NEXT: <key>col</key><integer>28</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
+// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -7668,11 +7292,11 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>f10</string>
-// CHECK-NEXT: <key>issue_hash</key><string>15</string>
+// CHECK-NEXT: <key>issue_hash</key><string>13</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
-// CHECK-NEXT: <key>col</key><integer>25</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
+// CHECK-NEXT: <key>col</key><integer>18</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
@@ -7687,12 +7311,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>420</integer>
+// CHECK-NEXT: <key>line</key><integer>430</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>420</integer>
+// CHECK-NEXT: <key>line</key><integer>430</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7700,12 +7324,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7721,12 +7345,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7734,12 +7358,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7751,7 +7375,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7759,12 +7383,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7784,12 +7408,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>421</integer>
+// CHECK-NEXT: <key>line</key><integer>431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7797,12 +7421,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7818,12 +7442,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>423</integer>
+// CHECK-NEXT: <key>line</key><integer>433</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7831,12 +7455,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7852,12 +7476,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7865,12 +7489,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7882,7 +7506,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7890,12 +7514,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7915,12 +7539,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>424</integer>
+// CHECK-NEXT: <key>line</key><integer>434</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7928,12 +7552,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7949,12 +7573,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>426</integer>
+// CHECK-NEXT: <key>line</key><integer>436</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7962,12 +7586,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7983,12 +7607,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -7996,12 +7620,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8013,7 +7637,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8021,12 +7645,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8046,12 +7670,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>427</integer>
+// CHECK-NEXT: <key>line</key><integer>437</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8059,12 +7683,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>429</integer>
+// CHECK-NEXT: <key>line</key><integer>439</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>429</integer>
+// CHECK-NEXT: <key>line</key><integer>439</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8080,12 +7704,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>429</integer>
+// CHECK-NEXT: <key>line</key><integer>439</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>429</integer>
+// CHECK-NEXT: <key>line</key><integer>439</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8093,12 +7717,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8114,12 +7738,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8127,12 +7751,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8144,7 +7768,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8152,12 +7776,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8177,12 +7801,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>430</integer>
+// CHECK-NEXT: <key>line</key><integer>440</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8190,12 +7814,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>432</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>432</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8211,12 +7835,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>432</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>432</integer>
+// CHECK-NEXT: <key>line</key><integer>442</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8224,12 +7848,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8245,12 +7869,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8258,12 +7882,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8275,7 +7899,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8283,12 +7907,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8308,12 +7932,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>434</integer>
+// CHECK-NEXT: <key>line</key><integer>444</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8321,50 +7945,16 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>436</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>436</integer>
-// CHECK-NEXT: <key>col</key><integer>14</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>436</integer>
+// CHECK-NEXT: <key>line</key><integer>446</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>436</integer>
+// CHECK-NEXT: <key>line</key><integer>446</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>436</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>436</integer>
-// CHECK-NEXT: <key>col</key><integer>40</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -8372,7 +7962,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>436</integer>
+// CHECK-NEXT: <key>line</key><integer>446</integer>
// CHECK-NEXT: <key>col</key><integer>26</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8380,12 +7970,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>436</integer>
+// CHECK-NEXT: <key>line</key><integer>446</integer>
// CHECK-NEXT: <key>col</key><integer>26</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>436</integer>
+// CHECK-NEXT: <key>line</key><integer>446</integer>
// CHECK-NEXT: <key>col</key><integer>61</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8405,25 +7995,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>436</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
+// CHECK-NEXT: <key>line</key><integer>446</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>436</integer>
-// CHECK-NEXT: <key>col</key><integer>40</integer>
+// CHECK-NEXT: <key>line</key><integer>446</integer>
+// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>437</integer>
+// CHECK-NEXT: <key>line</key><integer>447</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>437</integer>
+// CHECK-NEXT: <key>line</key><integer>447</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8439,12 +8029,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>437</integer>
+// CHECK-NEXT: <key>line</key><integer>447</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>437</integer>
+// CHECK-NEXT: <key>line</key><integer>447</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8452,12 +8042,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>437</integer>
+// CHECK-NEXT: <key>line</key><integer>447</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>437</integer>
+// CHECK-NEXT: <key>line</key><integer>447</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8469,7 +8059,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>437</integer>
+// CHECK-NEXT: <key>line</key><integer>447</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8477,12 +8067,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>437</integer>
+// CHECK-NEXT: <key>line</key><integer>447</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>437</integer>
+// CHECK-NEXT: <key>line</key><integer>447</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8502,12 +8092,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>437</integer>
+// CHECK-NEXT: <key>line</key><integer>447</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>437</integer>
+// CHECK-NEXT: <key>line</key><integer>447</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8515,50 +8105,16 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>437</integer>
-// CHECK-NEXT: <key>col</key><integer>16</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>437</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>437</integer>
+// CHECK-NEXT: <key>line</key><integer>447</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>437</integer>
+// CHECK-NEXT: <key>line</key><integer>447</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>437</integer>
-// CHECK-NEXT: <key>col</key><integer>23</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>437</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -8566,21 +8122,21 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>437</integer>
-// CHECK-NEXT: <key>col</key><integer>23</integer>
+// CHECK-NEXT: <key>line</key><integer>447</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>437</integer>
-// CHECK-NEXT: <key>col</key><integer>23</integer>
+// CHECK-NEXT: <key>line</key><integer>447</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>437</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
+// CHECK-NEXT: <key>line</key><integer>447</integer>
+// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -8597,11 +8153,11 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>f10</string>
-// CHECK-NEXT: <key>issue_hash</key><string>18</string>
+// CHECK-NEXT: <key>issue_hash</key><string>17</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>437</integer>
-// CHECK-NEXT: <key>col</key><integer>23</integer>
+// CHECK-NEXT: <key>line</key><integer>447</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
@@ -8616,12 +8172,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>443</integer>
+// CHECK-NEXT: <key>line</key><integer>453</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>443</integer>
+// CHECK-NEXT: <key>line</key><integer>453</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8629,50 +8185,16 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>456</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>456</integer>
-// CHECK-NEXT: <key>col</key><integer>4</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>456</integer>
+// CHECK-NEXT: <key>line</key><integer>466</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>456</integer>
+// CHECK-NEXT: <key>line</key><integer>466</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>456</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>456</integer>
-// CHECK-NEXT: <key>col</key><integer>43</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -8680,7 +8202,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>456</integer>
+// CHECK-NEXT: <key>line</key><integer>466</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8688,12 +8210,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>456</integer>
+// CHECK-NEXT: <key>line</key><integer>466</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>456</integer>
+// CHECK-NEXT: <key>line</key><integer>466</integer>
// CHECK-NEXT: <key>col</key><integer>49</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8713,25 +8235,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>456</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
+// CHECK-NEXT: <key>line</key><integer>466</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>456</integer>
-// CHECK-NEXT: <key>col</key><integer>43</integer>
+// CHECK-NEXT: <key>line</key><integer>466</integer>
+// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>462</integer>
+// CHECK-NEXT: <key>line</key><integer>472</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>462</integer>
+// CHECK-NEXT: <key>line</key><integer>472</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8743,7 +8265,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>462</integer>
+// CHECK-NEXT: <key>line</key><integer>472</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8751,12 +8273,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>462</integer>
+// CHECK-NEXT: <key>line</key><integer>472</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>462</integer>
+// CHECK-NEXT: <key>line</key><integer>472</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8777,7 +8299,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>21</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>462</integer>
+// CHECK-NEXT: <key>line</key><integer>472</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8786,44 +8308,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>470</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>470</integer>
-// CHECK-NEXT: <key>col</key><integer>11</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>470</integer>
-// CHECK-NEXT: <key>col</key><integer>17</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>470</integer>
-// CHECK-NEXT: <key>col</key><integer>27</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>470</integer>
+// CHECK-NEXT: <key>line</key><integer>480</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8831,12 +8319,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>470</integer>
+// CHECK-NEXT: <key>line</key><integer>480</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>470</integer>
+// CHECK-NEXT: <key>line</key><integer>480</integer>
// CHECK-NEXT: <key>col</key><integer>29</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8856,25 +8344,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>470</integer>
-// CHECK-NEXT: <key>col</key><integer>17</integer>
+// CHECK-NEXT: <key>line</key><integer>480</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>470</integer>
-// CHECK-NEXT: <key>col</key><integer>27</integer>
+// CHECK-NEXT: <key>line</key><integer>480</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>471</integer>
+// CHECK-NEXT: <key>line</key><integer>481</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>471</integer>
+// CHECK-NEXT: <key>line</key><integer>481</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8886,7 +8374,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>471</integer>
+// CHECK-NEXT: <key>line</key><integer>481</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8902,10 +8390,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>f12</string>
-// CHECK-NEXT: <key>issue_hash</key><string>2</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>471</integer>
+// CHECK-NEXT: <key>line</key><integer>481</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8914,44 +8402,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>479</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>479</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>479</integer>
-// CHECK-NEXT: <key>col</key><integer>25</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>479</integer>
-// CHECK-NEXT: <key>col</key><integer>44</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>479</integer>
+// CHECK-NEXT: <key>line</key><integer>489</integer>
// CHECK-NEXT: <key>col</key><integer>25</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8959,12 +8413,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>479</integer>
+// CHECK-NEXT: <key>line</key><integer>489</integer>
// CHECK-NEXT: <key>col</key><integer>25</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>479</integer>
+// CHECK-NEXT: <key>line</key><integer>489</integer>
// CHECK-NEXT: <key>col</key><integer>75</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -8984,25 +8438,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>479</integer>
-// CHECK-NEXT: <key>col</key><integer>25</integer>
+// CHECK-NEXT: <key>line</key><integer>489</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>479</integer>
-// CHECK-NEXT: <key>col</key><integer>44</integer>
+// CHECK-NEXT: <key>line</key><integer>489</integer>
+// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>480</integer>
+// CHECK-NEXT: <key>line</key><integer>490</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>480</integer>
+// CHECK-NEXT: <key>line</key><integer>490</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9014,7 +8468,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>480</integer>
+// CHECK-NEXT: <key>line</key><integer>490</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9022,24 +8476,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>480</integer>
+// CHECK-NEXT: <key>line</key><integer>490</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>480</integer>
+// CHECK-NEXT: <key>line</key><integer>490</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>480</integer>
+// CHECK-NEXT: <key>line</key><integer>490</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>480</integer>
+// CHECK-NEXT: <key>line</key><integer>490</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9059,12 +8513,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>480</integer>
+// CHECK-NEXT: <key>line</key><integer>490</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>480</integer>
+// CHECK-NEXT: <key>line</key><integer>490</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9072,12 +8526,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>481</integer>
+// CHECK-NEXT: <key>line</key><integer>491</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>481</integer>
+// CHECK-NEXT: <key>line</key><integer>491</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9089,7 +8543,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>481</integer>
+// CHECK-NEXT: <key>line</key><integer>491</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9097,24 +8551,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>481</integer>
+// CHECK-NEXT: <key>line</key><integer>491</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>481</integer>
+// CHECK-NEXT: <key>line</key><integer>491</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>481</integer>
+// CHECK-NEXT: <key>line</key><integer>491</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>481</integer>
+// CHECK-NEXT: <key>line</key><integer>491</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9134,12 +8588,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>481</integer>
+// CHECK-NEXT: <key>line</key><integer>491</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>481</integer>
+// CHECK-NEXT: <key>line</key><integer>491</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9147,12 +8601,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>482</integer>
+// CHECK-NEXT: <key>line</key><integer>492</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>482</integer>
+// CHECK-NEXT: <key>line</key><integer>492</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9164,7 +8618,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>482</integer>
+// CHECK-NEXT: <key>line</key><integer>492</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9183,7 +8637,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>4</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>482</integer>
+// CHECK-NEXT: <key>line</key><integer>492</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9192,44 +8646,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>485</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>485</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>485</integer>
-// CHECK-NEXT: <key>col</key><integer>25</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>485</integer>
-// CHECK-NEXT: <key>col</key><integer>44</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>485</integer>
+// CHECK-NEXT: <key>line</key><integer>495</integer>
// CHECK-NEXT: <key>col</key><integer>25</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9237,12 +8657,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>485</integer>
+// CHECK-NEXT: <key>line</key><integer>495</integer>
// CHECK-NEXT: <key>col</key><integer>25</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>485</integer>
+// CHECK-NEXT: <key>line</key><integer>495</integer>
// CHECK-NEXT: <key>col</key><integer>75</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9262,25 +8682,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>485</integer>
-// CHECK-NEXT: <key>col</key><integer>25</integer>
+// CHECK-NEXT: <key>line</key><integer>495</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>485</integer>
-// CHECK-NEXT: <key>col</key><integer>44</integer>
+// CHECK-NEXT: <key>line</key><integer>495</integer>
+// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>486</integer>
+// CHECK-NEXT: <key>line</key><integer>496</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>486</integer>
+// CHECK-NEXT: <key>line</key><integer>496</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9292,7 +8712,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>486</integer>
+// CHECK-NEXT: <key>line</key><integer>496</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9300,24 +8720,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>486</integer>
+// CHECK-NEXT: <key>line</key><integer>496</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>486</integer>
+// CHECK-NEXT: <key>line</key><integer>496</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>486</integer>
+// CHECK-NEXT: <key>line</key><integer>496</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>486</integer>
+// CHECK-NEXT: <key>line</key><integer>496</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9337,12 +8757,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>486</integer>
+// CHECK-NEXT: <key>line</key><integer>496</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>486</integer>
+// CHECK-NEXT: <key>line</key><integer>496</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9350,12 +8770,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>487</integer>
+// CHECK-NEXT: <key>line</key><integer>497</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>487</integer>
+// CHECK-NEXT: <key>line</key><integer>497</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9367,7 +8787,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>487</integer>
+// CHECK-NEXT: <key>line</key><integer>497</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9375,24 +8795,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>487</integer>
+// CHECK-NEXT: <key>line</key><integer>497</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>487</integer>
+// CHECK-NEXT: <key>line</key><integer>497</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>487</integer>
+// CHECK-NEXT: <key>line</key><integer>497</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>487</integer>
+// CHECK-NEXT: <key>line</key><integer>497</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9412,12 +8832,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>487</integer>
+// CHECK-NEXT: <key>line</key><integer>497</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>487</integer>
+// CHECK-NEXT: <key>line</key><integer>497</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9425,12 +8845,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>488</integer>
+// CHECK-NEXT: <key>line</key><integer>498</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>488</integer>
+// CHECK-NEXT: <key>line</key><integer>498</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9442,7 +8862,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>488</integer>
+// CHECK-NEXT: <key>line</key><integer>498</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9450,12 +8870,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>488</integer>
+// CHECK-NEXT: <key>line</key><integer>498</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>488</integer>
+// CHECK-NEXT: <key>line</key><integer>498</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9476,7 +8896,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>4</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>488</integer>
+// CHECK-NEXT: <key>line</key><integer>498</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9485,44 +8905,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>492</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>492</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>492</integer>
-// CHECK-NEXT: <key>col</key><integer>25</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>492</integer>
-// CHECK-NEXT: <key>col</key><integer>44</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>492</integer>
+// CHECK-NEXT: <key>line</key><integer>502</integer>
// CHECK-NEXT: <key>col</key><integer>25</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9530,12 +8916,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>492</integer>
+// CHECK-NEXT: <key>line</key><integer>502</integer>
// CHECK-NEXT: <key>col</key><integer>25</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>492</integer>
+// CHECK-NEXT: <key>line</key><integer>502</integer>
// CHECK-NEXT: <key>col</key><integer>75</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9555,25 +8941,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>492</integer>
-// CHECK-NEXT: <key>col</key><integer>25</integer>
+// CHECK-NEXT: <key>line</key><integer>502</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>492</integer>
-// CHECK-NEXT: <key>col</key><integer>44</integer>
+// CHECK-NEXT: <key>line</key><integer>502</integer>
+// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>493</integer>
+// CHECK-NEXT: <key>line</key><integer>503</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>493</integer>
+// CHECK-NEXT: <key>line</key><integer>503</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9585,7 +8971,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>493</integer>
+// CHECK-NEXT: <key>line</key><integer>503</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9593,24 +8979,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>493</integer>
+// CHECK-NEXT: <key>line</key><integer>503</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>493</integer>
+// CHECK-NEXT: <key>line</key><integer>503</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>493</integer>
+// CHECK-NEXT: <key>line</key><integer>503</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>493</integer>
+// CHECK-NEXT: <key>line</key><integer>503</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9630,12 +9016,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>493</integer>
+// CHECK-NEXT: <key>line</key><integer>503</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>493</integer>
+// CHECK-NEXT: <key>line</key><integer>503</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9643,12 +9029,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>494</integer>
+// CHECK-NEXT: <key>line</key><integer>504</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>494</integer>
+// CHECK-NEXT: <key>line</key><integer>504</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9660,7 +9046,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>494</integer>
+// CHECK-NEXT: <key>line</key><integer>504</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9668,24 +9054,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>494</integer>
+// CHECK-NEXT: <key>line</key><integer>504</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>494</integer>
+// CHECK-NEXT: <key>line</key><integer>504</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>494</integer>
+// CHECK-NEXT: <key>line</key><integer>504</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>494</integer>
+// CHECK-NEXT: <key>line</key><integer>504</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9705,12 +9091,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>494</integer>
+// CHECK-NEXT: <key>line</key><integer>504</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>494</integer>
+// CHECK-NEXT: <key>line</key><integer>504</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9718,12 +9104,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>495</integer>
+// CHECK-NEXT: <key>line</key><integer>505</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>495</integer>
+// CHECK-NEXT: <key>line</key><integer>505</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9739,12 +9125,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>495</integer>
+// CHECK-NEXT: <key>line</key><integer>505</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>495</integer>
+// CHECK-NEXT: <key>line</key><integer>505</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9752,12 +9138,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>495</integer>
+// CHECK-NEXT: <key>line</key><integer>505</integer>
// CHECK-NEXT: <key>col</key><integer>25</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>495</integer>
+// CHECK-NEXT: <key>line</key><integer>505</integer>
// CHECK-NEXT: <key>col</key><integer>44</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9769,7 +9155,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>495</integer>
+// CHECK-NEXT: <key>line</key><integer>505</integer>
// CHECK-NEXT: <key>col</key><integer>25</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9777,12 +9163,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>495</integer>
+// CHECK-NEXT: <key>line</key><integer>505</integer>
// CHECK-NEXT: <key>col</key><integer>25</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>495</integer>
+// CHECK-NEXT: <key>line</key><integer>505</integer>
// CHECK-NEXT: <key>col</key><integer>75</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9803,7 +9189,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>4</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>495</integer>
+// CHECK-NEXT: <key>line</key><integer>505</integer>
// CHECK-NEXT: <key>col</key><integer>25</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9815,7 +9201,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>503</integer>
+// CHECK-NEXT: <key>line</key><integer>513</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9823,12 +9209,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>503</integer>
+// CHECK-NEXT: <key>line</key><integer>513</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>503</integer>
+// CHECK-NEXT: <key>line</key><integer>513</integer>
// CHECK-NEXT: <key>col</key><integer>53</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9848,12 +9234,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>503</integer>
+// CHECK-NEXT: <key>line</key><integer>513</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>503</integer>
+// CHECK-NEXT: <key>line</key><integer>513</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9861,12 +9247,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>504</integer>
+// CHECK-NEXT: <key>line</key><integer>514</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>504</integer>
+// CHECK-NEXT: <key>line</key><integer>514</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9878,7 +9264,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>504</integer>
+// CHECK-NEXT: <key>line</key><integer>514</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9894,10 +9280,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>f14_leakimmediately</string>
-// CHECK-NEXT: <key>issue_hash</key><string>2</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>504</integer>
+// CHECK-NEXT: <key>line</key><integer>514</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9913,12 +9299,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9926,12 +9312,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9943,7 +9329,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9951,12 +9337,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9976,12 +9362,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -9989,12 +9375,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10010,12 +9396,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10023,12 +9409,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10040,7 +9426,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10048,12 +9434,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10073,12 +9459,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10086,12 +9472,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>522</integer>
+// CHECK-NEXT: <key>line</key><integer>532</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>522</integer>
+// CHECK-NEXT: <key>line</key><integer>532</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10103,7 +9489,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>522</integer>
+// CHECK-NEXT: <key>line</key><integer>532</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10111,12 +9497,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>522</integer>
+// CHECK-NEXT: <key>line</key><integer>532</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>522</integer>
+// CHECK-NEXT: <key>line</key><integer>532</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10131,13 +9517,13 @@ void foo() {
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>description</key><string>Null pointer argument in call to CFRelease</string>
// CHECK-NEXT: <key>category</key><string>API Misuse (Apple)</string>
-// CHECK-NEXT: <key>type</key><string>null passed to CFRetain/CFRelease/CFMakeCollectable</string>
+// CHECK-NEXT: <key>type</key><string>null passed to CF memory management function</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>f16</string>
// CHECK-NEXT: <key>issue_hash</key><string>5</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>522</integer>
+// CHECK-NEXT: <key>line</key><integer>532</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10153,12 +9539,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10166,12 +9552,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10183,7 +9569,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10191,12 +9577,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10216,12 +9602,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10229,12 +9615,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10250,12 +9636,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10263,12 +9649,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10280,7 +9666,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10288,12 +9674,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10313,12 +9699,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10326,12 +9712,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>524</integer>
+// CHECK-NEXT: <key>line</key><integer>534</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>524</integer>
+// CHECK-NEXT: <key>line</key><integer>534</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10347,12 +9733,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>524</integer>
+// CHECK-NEXT: <key>line</key><integer>534</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>524</integer>
+// CHECK-NEXT: <key>line</key><integer>534</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10360,12 +9746,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>524</integer>
+// CHECK-NEXT: <key>line</key><integer>534</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>524</integer>
+// CHECK-NEXT: <key>line</key><integer>534</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10377,7 +9763,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>524</integer>
+// CHECK-NEXT: <key>line</key><integer>534</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10385,12 +9771,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>524</integer>
+// CHECK-NEXT: <key>line</key><integer>534</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>524</integer>
+// CHECK-NEXT: <key>line</key><integer>534</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10410,12 +9796,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>524</integer>
+// CHECK-NEXT: <key>line</key><integer>534</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>524</integer>
+// CHECK-NEXT: <key>line</key><integer>534</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10423,12 +9809,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>525</integer>
+// CHECK-NEXT: <key>line</key><integer>535</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>525</integer>
+// CHECK-NEXT: <key>line</key><integer>535</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10440,7 +9826,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>525</integer>
+// CHECK-NEXT: <key>line</key><integer>535</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10448,12 +9834,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>525</integer>
+// CHECK-NEXT: <key>line</key><integer>535</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>525</integer>
+// CHECK-NEXT: <key>line</key><integer>535</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10468,13 +9854,13 @@ void foo() {
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>description</key><string>Null pointer argument in call to CFRetain</string>
// CHECK-NEXT: <key>category</key><string>API Misuse (Apple)</string>
-// CHECK-NEXT: <key>type</key><string>null passed to CFRetain/CFRelease/CFMakeCollectable</string>
+// CHECK-NEXT: <key>type</key><string>null passed to CF memory management function</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>f16</string>
// CHECK-NEXT: <key>issue_hash</key><string>8</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>525</integer>
+// CHECK-NEXT: <key>line</key><integer>535</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10490,12 +9876,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10503,12 +9889,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10520,7 +9906,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10528,12 +9914,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10553,12 +9939,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>518</integer>
+// CHECK-NEXT: <key>line</key><integer>528</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10566,12 +9952,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10587,12 +9973,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10600,12 +9986,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10617,7 +10003,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10625,12 +10011,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10650,12 +10036,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>521</integer>
+// CHECK-NEXT: <key>line</key><integer>531</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10663,12 +10049,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>524</integer>
+// CHECK-NEXT: <key>line</key><integer>534</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>524</integer>
+// CHECK-NEXT: <key>line</key><integer>534</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10684,12 +10070,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>524</integer>
+// CHECK-NEXT: <key>line</key><integer>534</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>524</integer>
+// CHECK-NEXT: <key>line</key><integer>534</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10697,12 +10083,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>524</integer>
+// CHECK-NEXT: <key>line</key><integer>534</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>524</integer>
+// CHECK-NEXT: <key>line</key><integer>534</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10714,7 +10100,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>524</integer>
+// CHECK-NEXT: <key>line</key><integer>534</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10722,12 +10108,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>524</integer>
+// CHECK-NEXT: <key>line</key><integer>534</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>524</integer>
+// CHECK-NEXT: <key>line</key><integer>534</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10747,12 +10133,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>524</integer>
+// CHECK-NEXT: <key>line</key><integer>534</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>524</integer>
+// CHECK-NEXT: <key>line</key><integer>534</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10760,12 +10146,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>528</integer>
+// CHECK-NEXT: <key>line</key><integer>538</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>528</integer>
+// CHECK-NEXT: <key>line</key><integer>538</integer>
// CHECK-NEXT: <key>col</key><integer>21</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10777,7 +10163,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>528</integer>
+// CHECK-NEXT: <key>line</key><integer>538</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10785,12 +10171,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>528</integer>
+// CHECK-NEXT: <key>line</key><integer>538</integer>
// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>528</integer>
+// CHECK-NEXT: <key>line</key><integer>538</integer>
// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10805,13 +10191,13 @@ void foo() {
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>description</key><string>Null pointer argument in call to CFMakeCollectable</string>
// CHECK-NEXT: <key>category</key><string>API Misuse (Apple)</string>
-// CHECK-NEXT: <key>type</key><string>null passed to CFRetain/CFRelease/CFMakeCollectable</string>
+// CHECK-NEXT: <key>type</key><string>null passed to CF memory management function</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>f16</string>
// CHECK-NEXT: <key>issue_hash</key><string>11</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>528</integer>
+// CHECK-NEXT: <key>line</key><integer>538</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10820,44 +10206,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>574</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>574</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>574</integer>
-// CHECK-NEXT: <key>col</key><integer>17</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>574</integer>
-// CHECK-NEXT: <key>col</key><integer>17</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>574</integer>
+// CHECK-NEXT: <key>line</key><integer>584</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10865,12 +10217,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>574</integer>
+// CHECK-NEXT: <key>line</key><integer>584</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>574</integer>
+// CHECK-NEXT: <key>line</key><integer>584</integer>
// CHECK-NEXT: <key>col</key><integer>55</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10890,25 +10242,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>574</integer>
-// CHECK-NEXT: <key>col</key><integer>17</integer>
+// CHECK-NEXT: <key>line</key><integer>584</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>574</integer>
-// CHECK-NEXT: <key>col</key><integer>17</integer>
+// CHECK-NEXT: <key>line</key><integer>584</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>575</integer>
+// CHECK-NEXT: <key>line</key><integer>585</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>575</integer>
+// CHECK-NEXT: <key>line</key><integer>585</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10920,7 +10272,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>575</integer>
+// CHECK-NEXT: <key>line</key><integer>585</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10928,24 +10280,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>575</integer>
+// CHECK-NEXT: <key>line</key><integer>585</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>575</integer>
+// CHECK-NEXT: <key>line</key><integer>585</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>575</integer>
+// CHECK-NEXT: <key>line</key><integer>585</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>575</integer>
+// CHECK-NEXT: <key>line</key><integer>585</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10961,7 +10313,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>575</integer>
+// CHECK-NEXT: <key>line</key><integer>585</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10969,12 +10321,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>575</integer>
+// CHECK-NEXT: <key>line</key><integer>585</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>575</integer>
+// CHECK-NEXT: <key>line</key><integer>585</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -10995,7 +10347,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>2</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>575</integer>
+// CHECK-NEXT: <key>line</key><integer>585</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11004,44 +10356,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>588</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>588</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>588</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>588</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>588</integer>
+// CHECK-NEXT: <key>line</key><integer>598</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11049,12 +10367,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>588</integer>
+// CHECK-NEXT: <key>line</key><integer>598</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>588</integer>
+// CHECK-NEXT: <key>line</key><integer>598</integer>
// CHECK-NEXT: <key>col</key><integer>63</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11074,25 +10392,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>588</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>line</key><integer>598</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>588</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>line</key><integer>598</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11108,12 +10426,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11121,12 +10439,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11138,7 +10456,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11146,12 +10464,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11171,12 +10489,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11184,12 +10502,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>596</integer>
+// CHECK-NEXT: <key>line</key><integer>606</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>596</integer>
+// CHECK-NEXT: <key>line</key><integer>606</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11201,7 +10519,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>596</integer>
+// CHECK-NEXT: <key>line</key><integer>606</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11209,12 +10527,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>596</integer>
+// CHECK-NEXT: <key>line</key><integer>606</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>596</integer>
+// CHECK-NEXT: <key>line</key><integer>606</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11232,10 +10550,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>rdar_6659160</string>
-// CHECK-NEXT: <key>issue_hash</key><string>13</string>
+// CHECK-NEXT: <key>issue_hash</key><string>5</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>596</integer>
+// CHECK-NEXT: <key>line</key><integer>606</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11251,12 +10569,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>588</integer>
+// CHECK-NEXT: <key>line</key><integer>598</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>588</integer>
+// CHECK-NEXT: <key>line</key><integer>598</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11264,12 +10582,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11285,12 +10603,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11298,12 +10616,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11315,7 +10633,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11323,12 +10641,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11348,12 +10666,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11361,12 +10679,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>598</integer>
+// CHECK-NEXT: <key>line</key><integer>608</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>598</integer>
+// CHECK-NEXT: <key>line</key><integer>608</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11378,7 +10696,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>598</integer>
+// CHECK-NEXT: <key>line</key><integer>608</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11386,12 +10704,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>598</integer>
+// CHECK-NEXT: <key>line</key><integer>608</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>598</integer>
+// CHECK-NEXT: <key>line</key><integer>608</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11399,9 +10717,9 @@ void foo() {
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
-// CHECK-NEXT: <string>Variable &apos;kindC&apos; initialized to a null pointer value</string>
+// CHECK-NEXT: <string>&apos;kindC&apos; initialized to a null pointer value</string>
// CHECK-NEXT: <key>message</key>
-// CHECK-NEXT: <string>Variable &apos;kindC&apos; initialized to a null pointer value</string>
+// CHECK-NEXT: <string>&apos;kindC&apos; initialized to a null pointer value</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
@@ -11411,12 +10729,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>598</integer>
+// CHECK-NEXT: <key>line</key><integer>608</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>598</integer>
+// CHECK-NEXT: <key>line</key><integer>608</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11424,12 +10742,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>606</integer>
+// CHECK-NEXT: <key>line</key><integer>616</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>606</integer>
+// CHECK-NEXT: <key>line</key><integer>616</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11445,12 +10763,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>606</integer>
+// CHECK-NEXT: <key>line</key><integer>616</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>606</integer>
+// CHECK-NEXT: <key>line</key><integer>616</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11458,12 +10776,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>606</integer>
+// CHECK-NEXT: <key>line</key><integer>616</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>606</integer>
+// CHECK-NEXT: <key>line</key><integer>616</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11475,7 +10793,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>606</integer>
+// CHECK-NEXT: <key>line</key><integer>616</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11483,12 +10801,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>606</integer>
+// CHECK-NEXT: <key>line</key><integer>616</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>606</integer>
+// CHECK-NEXT: <key>line</key><integer>616</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11508,12 +10826,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>606</integer>
+// CHECK-NEXT: <key>line</key><integer>616</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>606</integer>
+// CHECK-NEXT: <key>line</key><integer>616</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11521,12 +10839,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>608</integer>
+// CHECK-NEXT: <key>line</key><integer>618</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>608</integer>
+// CHECK-NEXT: <key>line</key><integer>618</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11542,12 +10860,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>608</integer>
+// CHECK-NEXT: <key>line</key><integer>618</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>608</integer>
+// CHECK-NEXT: <key>line</key><integer>618</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11555,12 +10873,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>609</integer>
+// CHECK-NEXT: <key>line</key><integer>619</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>609</integer>
+// CHECK-NEXT: <key>line</key><integer>619</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11576,12 +10894,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>609</integer>
+// CHECK-NEXT: <key>line</key><integer>619</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>609</integer>
+// CHECK-NEXT: <key>line</key><integer>619</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11589,12 +10907,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>610</integer>
+// CHECK-NEXT: <key>line</key><integer>620</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>610</integer>
+// CHECK-NEXT: <key>line</key><integer>620</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11610,12 +10928,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>610</integer>
+// CHECK-NEXT: <key>line</key><integer>620</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>610</integer>
+// CHECK-NEXT: <key>line</key><integer>620</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11623,12 +10941,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>610</integer>
+// CHECK-NEXT: <key>line</key><integer>620</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>610</integer>
+// CHECK-NEXT: <key>line</key><integer>620</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11640,7 +10958,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>610</integer>
+// CHECK-NEXT: <key>line</key><integer>620</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11648,12 +10966,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>610</integer>
+// CHECK-NEXT: <key>line</key><integer>620</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>610</integer>
+// CHECK-NEXT: <key>line</key><integer>620</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11674,7 +10992,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>27</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>610</integer>
+// CHECK-NEXT: <key>line</key><integer>620</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11690,12 +11008,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>588</integer>
+// CHECK-NEXT: <key>line</key><integer>598</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>588</integer>
+// CHECK-NEXT: <key>line</key><integer>598</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11703,12 +11021,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>594</integer>
+// CHECK-NEXT: <key>line</key><integer>604</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>594</integer>
+// CHECK-NEXT: <key>line</key><integer>604</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11717,44 +11035,10 @@ void foo() {
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>594</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>594</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>594</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>594</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>594</integer>
+// CHECK-NEXT: <key>line</key><integer>604</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11762,12 +11046,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>594</integer>
+// CHECK-NEXT: <key>line</key><integer>604</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>594</integer>
+// CHECK-NEXT: <key>line</key><integer>604</integer>
// CHECK-NEXT: <key>col</key><integer>57</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11787,25 +11071,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>594</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>line</key><integer>604</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>594</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>line</key><integer>604</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11821,12 +11105,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11834,12 +11118,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11851,7 +11135,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11859,12 +11143,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11884,12 +11168,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>595</integer>
+// CHECK-NEXT: <key>line</key><integer>605</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11897,12 +11181,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>598</integer>
+// CHECK-NEXT: <key>line</key><integer>608</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>598</integer>
+// CHECK-NEXT: <key>line</key><integer>608</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11918,12 +11202,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>598</integer>
+// CHECK-NEXT: <key>line</key><integer>608</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>598</integer>
+// CHECK-NEXT: <key>line</key><integer>608</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11931,12 +11215,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>606</integer>
+// CHECK-NEXT: <key>line</key><integer>616</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>606</integer>
+// CHECK-NEXT: <key>line</key><integer>616</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11952,12 +11236,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>606</integer>
+// CHECK-NEXT: <key>line</key><integer>616</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>606</integer>
+// CHECK-NEXT: <key>line</key><integer>616</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11965,12 +11249,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>606</integer>
+// CHECK-NEXT: <key>line</key><integer>616</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>606</integer>
+// CHECK-NEXT: <key>line</key><integer>616</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11982,7 +11266,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>606</integer>
+// CHECK-NEXT: <key>line</key><integer>616</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -11990,12 +11274,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>606</integer>
+// CHECK-NEXT: <key>line</key><integer>616</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>606</integer>
+// CHECK-NEXT: <key>line</key><integer>616</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12015,12 +11299,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>606</integer>
+// CHECK-NEXT: <key>line</key><integer>616</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>606</integer>
+// CHECK-NEXT: <key>line</key><integer>616</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12028,12 +11312,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>607</integer>
+// CHECK-NEXT: <key>line</key><integer>617</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>607</integer>
+// CHECK-NEXT: <key>line</key><integer>617</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12049,12 +11333,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>607</integer>
+// CHECK-NEXT: <key>line</key><integer>617</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>607</integer>
+// CHECK-NEXT: <key>line</key><integer>617</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12062,12 +11346,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>608</integer>
+// CHECK-NEXT: <key>line</key><integer>618</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>608</integer>
+// CHECK-NEXT: <key>line</key><integer>618</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12083,12 +11367,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>608</integer>
+// CHECK-NEXT: <key>line</key><integer>618</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>608</integer>
+// CHECK-NEXT: <key>line</key><integer>618</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12096,12 +11380,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>609</integer>
+// CHECK-NEXT: <key>line</key><integer>619</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>609</integer>
+// CHECK-NEXT: <key>line</key><integer>619</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12117,12 +11401,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>609</integer>
+// CHECK-NEXT: <key>line</key><integer>619</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>609</integer>
+// CHECK-NEXT: <key>line</key><integer>619</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12130,12 +11414,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>610</integer>
+// CHECK-NEXT: <key>line</key><integer>620</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>610</integer>
+// CHECK-NEXT: <key>line</key><integer>620</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12151,12 +11435,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>610</integer>
+// CHECK-NEXT: <key>line</key><integer>620</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>610</integer>
+// CHECK-NEXT: <key>line</key><integer>620</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12164,12 +11448,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>612</integer>
+// CHECK-NEXT: <key>line</key><integer>622</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>612</integer>
+// CHECK-NEXT: <key>line</key><integer>622</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12185,12 +11469,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>612</integer>
+// CHECK-NEXT: <key>line</key><integer>622</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>612</integer>
+// CHECK-NEXT: <key>line</key><integer>622</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12198,12 +11482,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>615</integer>
+// CHECK-NEXT: <key>line</key><integer>625</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>615</integer>
+// CHECK-NEXT: <key>line</key><integer>625</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12219,12 +11503,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>615</integer>
+// CHECK-NEXT: <key>line</key><integer>625</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>615</integer>
+// CHECK-NEXT: <key>line</key><integer>625</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12232,12 +11516,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>616</integer>
+// CHECK-NEXT: <key>line</key><integer>626</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>616</integer>
+// CHECK-NEXT: <key>line</key><integer>626</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12249,7 +11533,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>616</integer>
+// CHECK-NEXT: <key>line</key><integer>626</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12257,12 +11541,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>616</integer>
+// CHECK-NEXT: <key>line</key><integer>626</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>616</integer>
+// CHECK-NEXT: <key>line</key><integer>626</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12283,7 +11567,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>33</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>616</integer>
+// CHECK-NEXT: <key>line</key><integer>626</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12292,44 +11576,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>638</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>638</integer>
-// CHECK-NEXT: <key>col</key><integer>4</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>638</integer>
-// CHECK-NEXT: <key>col</key><integer>12</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>638</integer>
-// CHECK-NEXT: <key>col</key><integer>12</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>638</integer>
+// CHECK-NEXT: <key>line</key><integer>648</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12337,12 +11587,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>638</integer>
+// CHECK-NEXT: <key>line</key><integer>648</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>638</integer>
+// CHECK-NEXT: <key>line</key><integer>648</integer>
// CHECK-NEXT: <key>col</key><integer>34</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12362,25 +11612,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>638</integer>
-// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>line</key><integer>648</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>638</integer>
-// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>line</key><integer>648</integer>
+// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>639</integer>
+// CHECK-NEXT: <key>line</key><integer>649</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>639</integer>
+// CHECK-NEXT: <key>line</key><integer>649</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12392,7 +11642,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>639</integer>
+// CHECK-NEXT: <key>line</key><integer>649</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12400,24 +11650,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>639</integer>
+// CHECK-NEXT: <key>line</key><integer>649</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>639</integer>
+// CHECK-NEXT: <key>line</key><integer>649</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>639</integer>
+// CHECK-NEXT: <key>line</key><integer>649</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>639</integer>
+// CHECK-NEXT: <key>line</key><integer>649</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12437,12 +11687,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>639</integer>
+// CHECK-NEXT: <key>line</key><integer>649</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>639</integer>
+// CHECK-NEXT: <key>line</key><integer>649</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12450,12 +11700,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>640</integer>
+// CHECK-NEXT: <key>line</key><integer>650</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>640</integer>
+// CHECK-NEXT: <key>line</key><integer>650</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12467,7 +11717,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>640</integer>
+// CHECK-NEXT: <key>line</key><integer>650</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12475,12 +11725,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>640</integer>
+// CHECK-NEXT: <key>line</key><integer>650</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>640</integer>
+// CHECK-NEXT: <key>line</key><integer>650</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12501,7 +11751,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>3</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>640</integer>
+// CHECK-NEXT: <key>line</key><integer>650</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12517,12 +11767,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>646</integer>
+// CHECK-NEXT: <key>line</key><integer>656</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>646</integer>
+// CHECK-NEXT: <key>line</key><integer>656</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12530,12 +11780,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>647</integer>
+// CHECK-NEXT: <key>line</key><integer>657</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>647</integer>
+// CHECK-NEXT: <key>line</key><integer>657</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12544,44 +11794,10 @@ void foo() {
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>647</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>647</integer>
-// CHECK-NEXT: <key>col</key><integer>4</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>647</integer>
-// CHECK-NEXT: <key>col</key><integer>12</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>647</integer>
-// CHECK-NEXT: <key>col</key><integer>12</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>647</integer>
+// CHECK-NEXT: <key>line</key><integer>657</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12589,12 +11805,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>647</integer>
+// CHECK-NEXT: <key>line</key><integer>657</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>647</integer>
+// CHECK-NEXT: <key>line</key><integer>657</integer>
// CHECK-NEXT: <key>col</key><integer>34</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12614,25 +11830,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>647</integer>
-// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>line</key><integer>657</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>647</integer>
-// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>line</key><integer>657</integer>
+// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>648</integer>
+// CHECK-NEXT: <key>line</key><integer>658</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>648</integer>
+// CHECK-NEXT: <key>line</key><integer>658</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12644,7 +11860,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>648</integer>
+// CHECK-NEXT: <key>line</key><integer>658</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12652,24 +11868,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>648</integer>
+// CHECK-NEXT: <key>line</key><integer>658</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>648</integer>
+// CHECK-NEXT: <key>line</key><integer>658</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>648</integer>
+// CHECK-NEXT: <key>line</key><integer>658</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>648</integer>
+// CHECK-NEXT: <key>line</key><integer>658</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12689,12 +11905,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>648</integer>
+// CHECK-NEXT: <key>line</key><integer>658</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>648</integer>
+// CHECK-NEXT: <key>line</key><integer>658</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12702,12 +11918,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>649</integer>
+// CHECK-NEXT: <key>line</key><integer>659</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>649</integer>
+// CHECK-NEXT: <key>line</key><integer>659</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12719,7 +11935,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>649</integer>
+// CHECK-NEXT: <key>line</key><integer>659</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12727,12 +11943,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>649</integer>
+// CHECK-NEXT: <key>line</key><integer>659</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>649</integer>
+// CHECK-NEXT: <key>line</key><integer>659</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12753,7 +11969,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>4</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>649</integer>
+// CHECK-NEXT: <key>line</key><integer>659</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12769,12 +11985,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>701</integer>
+// CHECK-NEXT: <key>line</key><integer>711</integer>
// CHECK-NEXT: <key>col</key><integer>2</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>701</integer>
+// CHECK-NEXT: <key>line</key><integer>711</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12782,12 +11998,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>701</integer>
+// CHECK-NEXT: <key>line</key><integer>711</integer>
// CHECK-NEXT: <key>col</key><integer>31</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>701</integer>
+// CHECK-NEXT: <key>line</key><integer>711</integer>
// CHECK-NEXT: <key>col</key><integer>31</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12799,7 +12015,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>701</integer>
+// CHECK-NEXT: <key>line</key><integer>711</integer>
// CHECK-NEXT: <key>col</key><integer>31</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12807,12 +12023,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>701</integer>
+// CHECK-NEXT: <key>line</key><integer>711</integer>
// CHECK-NEXT: <key>col</key><integer>31</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>701</integer>
+// CHECK-NEXT: <key>line</key><integer>711</integer>
// CHECK-NEXT: <key>col</key><integer>76</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12825,44 +12041,10 @@ void foo() {
// CHECK-NEXT: <string>Method returns an Objective-C object with a +0 retain count</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>701</integer>
-// CHECK-NEXT: <key>col</key><integer>31</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>701</integer>
-// CHECK-NEXT: <key>col</key><integer>31</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>701</integer>
-// CHECK-NEXT: <key>col</key><integer>30</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>701</integer>
-// CHECK-NEXT: <key>col</key><integer>30</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>701</integer>
+// CHECK-NEXT: <key>line</key><integer>711</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12870,24 +12052,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>701</integer>
+// CHECK-NEXT: <key>line</key><integer>711</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>701</integer>
+// CHECK-NEXT: <key>line</key><integer>711</integer>
// CHECK-NEXT: <key>col</key><integer>84</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>701</integer>
+// CHECK-NEXT: <key>line</key><integer>711</integer>
// CHECK-NEXT: <key>col</key><integer>31</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>701</integer>
+// CHECK-NEXT: <key>line</key><integer>711</integer>
// CHECK-NEXT: <key>col</key><integer>76</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12907,12 +12089,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>701</integer>
+// CHECK-NEXT: <key>line</key><integer>711</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>701</integer>
+// CHECK-NEXT: <key>line</key><integer>711</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12920,12 +12102,80 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>706</integer>
+// CHECK-NEXT: <key>line</key><integer>711</integer>
+// CHECK-NEXT: <key>col</key><integer>2</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>711</integer>
+// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>711</integer>
+// CHECK-NEXT: <key>col</key><integer>2</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>711</integer>
+// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>715</integer>
+// CHECK-NEXT: <key>col</key><integer>2</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>715</integer>
+// CHECK-NEXT: <key>col</key><integer>6</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>715</integer>
+// CHECK-NEXT: <key>col</key><integer>2</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>715</integer>
+// CHECK-NEXT: <key>col</key><integer>6</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>716</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>706</integer>
+// CHECK-NEXT: <key>line</key><integer>716</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12937,7 +12187,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>706</integer>
+// CHECK-NEXT: <key>line</key><integer>716</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12953,10 +12203,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>Objective-C method</string>
// CHECK-NEXT: <key>issue_context</key><string>applicationDidFinishLaunching:</string>
-// CHECK-NEXT: <key>issue_hash</key><string>6</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>706</integer>
+// CHECK-NEXT: <key>line</key><integer>716</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12972,12 +12222,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>713</integer>
+// CHECK-NEXT: <key>line</key><integer>723</integer>
// CHECK-NEXT: <key>col</key><integer>2</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>713</integer>
+// CHECK-NEXT: <key>line</key><integer>723</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -12985,12 +12235,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>713</integer>
+// CHECK-NEXT: <key>line</key><integer>723</integer>
// CHECK-NEXT: <key>col</key><integer>31</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>713</integer>
+// CHECK-NEXT: <key>line</key><integer>723</integer>
// CHECK-NEXT: <key>col</key><integer>31</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13002,7 +12252,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>713</integer>
+// CHECK-NEXT: <key>line</key><integer>723</integer>
// CHECK-NEXT: <key>col</key><integer>31</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13010,12 +12260,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>713</integer>
+// CHECK-NEXT: <key>line</key><integer>723</integer>
// CHECK-NEXT: <key>col</key><integer>31</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>713</integer>
+// CHECK-NEXT: <key>line</key><integer>723</integer>
// CHECK-NEXT: <key>col</key><integer>76</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13028,44 +12278,10 @@ void foo() {
// CHECK-NEXT: <string>Method returns an Objective-C object with a +0 retain count</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>713</integer>
-// CHECK-NEXT: <key>col</key><integer>31</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>713</integer>
-// CHECK-NEXT: <key>col</key><integer>31</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>713</integer>
-// CHECK-NEXT: <key>col</key><integer>30</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>713</integer>
-// CHECK-NEXT: <key>col</key><integer>30</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>713</integer>
+// CHECK-NEXT: <key>line</key><integer>723</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13073,24 +12289,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>713</integer>
+// CHECK-NEXT: <key>line</key><integer>723</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>713</integer>
+// CHECK-NEXT: <key>line</key><integer>723</integer>
// CHECK-NEXT: <key>col</key><integer>84</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>713</integer>
+// CHECK-NEXT: <key>line</key><integer>723</integer>
// CHECK-NEXT: <key>col</key><integer>31</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>713</integer>
+// CHECK-NEXT: <key>line</key><integer>723</integer>
// CHECK-NEXT: <key>col</key><integer>76</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13110,12 +12326,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>713</integer>
+// CHECK-NEXT: <key>line</key><integer>723</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>713</integer>
+// CHECK-NEXT: <key>line</key><integer>723</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13123,12 +12339,46 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>714</integer>
+// CHECK-NEXT: <key>line</key><integer>723</integer>
+// CHECK-NEXT: <key>col</key><integer>2</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>723</integer>
+// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>723</integer>
+// CHECK-NEXT: <key>col</key><integer>2</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>723</integer>
+// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>724</integer>
// CHECK-NEXT: <key>col</key><integer>2</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>714</integer>
+// CHECK-NEXT: <key>line</key><integer>724</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13144,12 +12394,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>714</integer>
+// CHECK-NEXT: <key>line</key><integer>724</integer>
// CHECK-NEXT: <key>col</key><integer>2</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>714</integer>
+// CHECK-NEXT: <key>line</key><integer>724</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13157,12 +12407,46 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>716</integer>
+// CHECK-NEXT: <key>line</key><integer>724</integer>
+// CHECK-NEXT: <key>col</key><integer>6</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>724</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>724</integer>
+// CHECK-NEXT: <key>col</key><integer>6</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>724</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>726</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>716</integer>
+// CHECK-NEXT: <key>line</key><integer>726</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13174,7 +12458,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>716</integer>
+// CHECK-NEXT: <key>line</key><integer>726</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13190,10 +12474,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>Objective-C method</string>
// CHECK-NEXT: <key>issue_context</key><string>radar10102244</string>
-// CHECK-NEXT: <key>issue_hash</key><string>4</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>716</integer>
+// CHECK-NEXT: <key>line</key><integer>726</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13209,12 +12493,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>724</integer>
+// CHECK-NEXT: <key>line</key><integer>734</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>724</integer>
+// CHECK-NEXT: <key>line</key><integer>734</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13222,12 +12506,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>725</integer>
+// CHECK-NEXT: <key>line</key><integer>735</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>725</integer>
+// CHECK-NEXT: <key>line</key><integer>735</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13236,44 +12520,10 @@ void foo() {
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>725</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>725</integer>
-// CHECK-NEXT: <key>col</key><integer>9</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>725</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>725</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>725</integer>
+// CHECK-NEXT: <key>line</key><integer>735</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13281,12 +12531,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>725</integer>
+// CHECK-NEXT: <key>line</key><integer>735</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>725</integer>
+// CHECK-NEXT: <key>line</key><integer>735</integer>
// CHECK-NEXT: <key>col</key><integer>34</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13306,25 +12556,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>725</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>line</key><integer>735</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>725</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>line</key><integer>735</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>726</integer>
+// CHECK-NEXT: <key>line</key><integer>736</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>726</integer>
+// CHECK-NEXT: <key>line</key><integer>736</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13336,7 +12586,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>726</integer>
+// CHECK-NEXT: <key>line</key><integer>736</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13344,12 +12594,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>726</integer>
+// CHECK-NEXT: <key>line</key><integer>736</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>726</integer>
+// CHECK-NEXT: <key>line</key><integer>736</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13370,7 +12620,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>3</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>726</integer>
+// CHECK-NEXT: <key>line</key><integer>736</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13386,12 +12636,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>801</integer>
+// CHECK-NEXT: <key>line</key><integer>811</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>801</integer>
+// CHECK-NEXT: <key>line</key><integer>811</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13399,12 +12649,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>802</integer>
+// CHECK-NEXT: <key>line</key><integer>812</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>802</integer>
+// CHECK-NEXT: <key>line</key><integer>812</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13416,7 +12666,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>802</integer>
+// CHECK-NEXT: <key>line</key><integer>812</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13424,12 +12674,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>802</integer>
+// CHECK-NEXT: <key>line</key><integer>812</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>802</integer>
+// CHECK-NEXT: <key>line</key><integer>812</integer>
// CHECK-NEXT: <key>col</key><integer>36</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13449,12 +12699,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>802</integer>
+// CHECK-NEXT: <key>line</key><integer>812</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>802</integer>
+// CHECK-NEXT: <key>line</key><integer>812</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13462,12 +12712,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>803</integer>
+// CHECK-NEXT: <key>line</key><integer>813</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>803</integer>
+// CHECK-NEXT: <key>line</key><integer>813</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13479,7 +12729,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>803</integer>
+// CHECK-NEXT: <key>line</key><integer>813</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13487,12 +12737,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>803</integer>
+// CHECK-NEXT: <key>line</key><integer>813</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>803</integer>
+// CHECK-NEXT: <key>line</key><integer>813</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13510,10 +12760,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>Objective-C method</string>
// CHECK-NEXT: <key>issue_context</key><string>_initReturningNewClassBad</string>
-// CHECK-NEXT: <key>issue_hash</key><string>3</string>
+// CHECK-NEXT: <key>issue_hash</key><string>2</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>803</integer>
+// CHECK-NEXT: <key>line</key><integer>813</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13529,12 +12779,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>806</integer>
+// CHECK-NEXT: <key>line</key><integer>816</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>806</integer>
+// CHECK-NEXT: <key>line</key><integer>816</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13542,50 +12792,16 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>807</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>807</integer>
-// CHECK-NEXT: <key>col</key><integer>6</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>807</integer>
+// CHECK-NEXT: <key>line</key><integer>817</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>807</integer>
+// CHECK-NEXT: <key>line</key><integer>817</integer>
// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>807</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>807</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -13593,7 +12809,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>807</integer>
+// CHECK-NEXT: <key>line</key><integer>817</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13601,12 +12817,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>807</integer>
+// CHECK-NEXT: <key>line</key><integer>817</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>807</integer>
+// CHECK-NEXT: <key>line</key><integer>817</integer>
// CHECK-NEXT: <key>col</key><integer>43</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13626,63 +12842,29 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>807</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>807</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>808</integer>
+// CHECK-NEXT: <key>line</key><integer>817</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>808</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
+// CHECK-NEXT: <key>line</key><integer>817</integer>
+// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>808</integer>
+// CHECK-NEXT: <key>line</key><integer>818</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>808</integer>
+// CHECK-NEXT: <key>line</key><integer>818</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>808</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>808</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -13690,7 +12872,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>808</integer>
+// CHECK-NEXT: <key>line</key><integer>818</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13698,24 +12880,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>808</integer>
+// CHECK-NEXT: <key>line</key><integer>818</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>808</integer>
+// CHECK-NEXT: <key>line</key><integer>818</integer>
// CHECK-NEXT: <key>col</key><integer>27</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>808</integer>
+// CHECK-NEXT: <key>line</key><integer>818</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>808</integer>
+// CHECK-NEXT: <key>line</key><integer>818</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13728,44 +12910,10 @@ void foo() {
// CHECK-NEXT: <string>Object autoreleased</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>808</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>808</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>808</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>808</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>808</integer>
+// CHECK-NEXT: <key>line</key><integer>818</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13773,12 +12921,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>808</integer>
+// CHECK-NEXT: <key>line</key><integer>818</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>808</integer>
+// CHECK-NEXT: <key>line</key><integer>818</integer>
// CHECK-NEXT: <key>col</key><integer>27</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13799,7 +12947,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>3</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>808</integer>
+// CHECK-NEXT: <key>line</key><integer>818</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13808,44 +12956,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
-// CHECK-NEXT: <key>col</key><integer>30</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
-// CHECK-NEXT: <key>col</key><integer>35</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
-// CHECK-NEXT: <key>col</key><integer>37</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
-// CHECK-NEXT: <key>col</key><integer>37</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
+// CHECK-NEXT: <key>line</key><integer>856</integer>
// CHECK-NEXT: <key>col</key><integer>37</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13853,12 +12967,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
+// CHECK-NEXT: <key>line</key><integer>856</integer>
// CHECK-NEXT: <key>col</key><integer>37</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
+// CHECK-NEXT: <key>line</key><integer>856</integer>
// CHECK-NEXT: <key>col</key><integer>59</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13871,44 +12985,10 @@ void foo() {
// CHECK-NEXT: <string>Method returns an Objective-C object with a +1 retain count</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
-// CHECK-NEXT: <key>col</key><integer>37</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
-// CHECK-NEXT: <key>col</key><integer>37</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
-// CHECK-NEXT: <key>col</key><integer>30</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
-// CHECK-NEXT: <key>col</key><integer>35</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
+// CHECK-NEXT: <key>line</key><integer>856</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13916,24 +12996,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
+// CHECK-NEXT: <key>line</key><integer>856</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
+// CHECK-NEXT: <key>line</key><integer>856</integer>
// CHECK-NEXT: <key>col</key><integer>59</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
+// CHECK-NEXT: <key>line</key><integer>856</integer>
// CHECK-NEXT: <key>col</key><integer>37</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
+// CHECK-NEXT: <key>line</key><integer>856</integer>
// CHECK-NEXT: <key>col</key><integer>59</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13949,7 +13029,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
+// CHECK-NEXT: <key>line</key><integer>856</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13957,12 +13037,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
+// CHECK-NEXT: <key>line</key><integer>856</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
+// CHECK-NEXT: <key>line</key><integer>856</integer>
// CHECK-NEXT: <key>col</key><integer>59</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13983,7 +13063,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>0</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
+// CHECK-NEXT: <key>line</key><integer>856</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -13992,44 +13072,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
-// CHECK-NEXT: <key>col</key><integer>30</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
-// CHECK-NEXT: <key>col</key><integer>35</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
-// CHECK-NEXT: <key>col</key><integer>37</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
-// CHECK-NEXT: <key>col</key><integer>37</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
+// CHECK-NEXT: <key>line</key><integer>857</integer>
// CHECK-NEXT: <key>col</key><integer>37</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14037,12 +13083,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
+// CHECK-NEXT: <key>line</key><integer>857</integer>
// CHECK-NEXT: <key>col</key><integer>37</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
+// CHECK-NEXT: <key>line</key><integer>857</integer>
// CHECK-NEXT: <key>col</key><integer>59</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14055,44 +13101,10 @@ void foo() {
// CHECK-NEXT: <string>Method returns an Objective-C object with a +1 retain count</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
-// CHECK-NEXT: <key>col</key><integer>37</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
-// CHECK-NEXT: <key>col</key><integer>37</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
-// CHECK-NEXT: <key>col</key><integer>30</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
-// CHECK-NEXT: <key>col</key><integer>35</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
+// CHECK-NEXT: <key>line</key><integer>857</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14100,24 +13112,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
+// CHECK-NEXT: <key>line</key><integer>857</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
+// CHECK-NEXT: <key>line</key><integer>857</integer>
// CHECK-NEXT: <key>col</key><integer>59</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
+// CHECK-NEXT: <key>line</key><integer>857</integer>
// CHECK-NEXT: <key>col</key><integer>37</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
+// CHECK-NEXT: <key>line</key><integer>857</integer>
// CHECK-NEXT: <key>col</key><integer>59</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14133,7 +13145,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
+// CHECK-NEXT: <key>line</key><integer>857</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14141,12 +13153,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
+// CHECK-NEXT: <key>line</key><integer>857</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
+// CHECK-NEXT: <key>line</key><integer>857</integer>
// CHECK-NEXT: <key>col</key><integer>59</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14167,7 +13179,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>0</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
+// CHECK-NEXT: <key>line</key><integer>857</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14179,7 +13191,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>851</integer>
+// CHECK-NEXT: <key>line</key><integer>861</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14187,12 +13199,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>851</integer>
+// CHECK-NEXT: <key>line</key><integer>861</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>851</integer>
+// CHECK-NEXT: <key>line</key><integer>861</integer>
// CHECK-NEXT: <key>col</key><integer>18</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14208,7 +13220,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
+// CHECK-NEXT: <key>line</key><integer>856</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14226,12 +13238,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
+// CHECK-NEXT: <key>line</key><integer>856</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
+// CHECK-NEXT: <key>line</key><integer>856</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14239,50 +13251,16 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
-// CHECK-NEXT: <key>col</key><integer>30</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
-// CHECK-NEXT: <key>col</key><integer>35</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
+// CHECK-NEXT: <key>line</key><integer>856</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
+// CHECK-NEXT: <key>line</key><integer>856</integer>
// CHECK-NEXT: <key>col</key><integer>35</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
-// CHECK-NEXT: <key>col</key><integer>37</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
-// CHECK-NEXT: <key>col</key><integer>37</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -14290,7 +13268,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
+// CHECK-NEXT: <key>line</key><integer>856</integer>
// CHECK-NEXT: <key>col</key><integer>37</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14298,12 +13276,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
+// CHECK-NEXT: <key>line</key><integer>856</integer>
// CHECK-NEXT: <key>col</key><integer>37</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>846</integer>
+// CHECK-NEXT: <key>line</key><integer>856</integer>
// CHECK-NEXT: <key>col</key><integer>59</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14319,7 +13297,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>851</integer>
+// CHECK-NEXT: <key>line</key><integer>861</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14327,18 +13305,18 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>851</integer>
+// CHECK-NEXT: <key>line</key><integer>861</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>851</integer>
+// CHECK-NEXT: <key>line</key><integer>861</integer>
// CHECK-NEXT: <key>col</key><integer>18</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>depth</key><integer>1</integer>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Returning from &apos;NoCopyString&apos;</string>
// CHECK-NEXT: <key>message</key>
@@ -14352,12 +13330,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>851</integer>
+// CHECK-NEXT: <key>line</key><integer>861</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>851</integer>
+// CHECK-NEXT: <key>line</key><integer>861</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14365,12 +13343,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>852</integer>
+// CHECK-NEXT: <key>line</key><integer>862</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>852</integer>
+// CHECK-NEXT: <key>line</key><integer>862</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14382,7 +13360,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>852</integer>
+// CHECK-NEXT: <key>line</key><integer>862</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14390,12 +13368,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>852</integer>
+// CHECK-NEXT: <key>line</key><integer>862</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>852</integer>
+// CHECK-NEXT: <key>line</key><integer>862</integer>
// CHECK-NEXT: <key>col</key><integer>18</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14413,10 +13391,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>test_RDar6859457</string>
-// CHECK-NEXT: <key>issue_hash</key><string>2</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>852</integer>
+// CHECK-NEXT: <key>line</key><integer>862</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14432,12 +13410,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>851</integer>
+// CHECK-NEXT: <key>line</key><integer>861</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>851</integer>
+// CHECK-NEXT: <key>line</key><integer>861</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14445,12 +13423,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>852</integer>
+// CHECK-NEXT: <key>line</key><integer>862</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>852</integer>
+// CHECK-NEXT: <key>line</key><integer>862</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14462,7 +13440,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>852</integer>
+// CHECK-NEXT: <key>line</key><integer>862</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14470,12 +13448,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>852</integer>
+// CHECK-NEXT: <key>line</key><integer>862</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>852</integer>
+// CHECK-NEXT: <key>line</key><integer>862</integer>
// CHECK-NEXT: <key>col</key><integer>18</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14491,7 +13469,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
+// CHECK-NEXT: <key>line</key><integer>857</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14509,12 +13487,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
+// CHECK-NEXT: <key>line</key><integer>857</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
+// CHECK-NEXT: <key>line</key><integer>857</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14522,50 +13500,16 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
-// CHECK-NEXT: <key>col</key><integer>30</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
-// CHECK-NEXT: <key>col</key><integer>35</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
+// CHECK-NEXT: <key>line</key><integer>857</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
+// CHECK-NEXT: <key>line</key><integer>857</integer>
// CHECK-NEXT: <key>col</key><integer>35</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
-// CHECK-NEXT: <key>col</key><integer>37</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
-// CHECK-NEXT: <key>col</key><integer>37</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -14573,7 +13517,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
+// CHECK-NEXT: <key>line</key><integer>857</integer>
// CHECK-NEXT: <key>col</key><integer>37</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14581,12 +13525,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
+// CHECK-NEXT: <key>line</key><integer>857</integer>
// CHECK-NEXT: <key>col</key><integer>37</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>847</integer>
+// CHECK-NEXT: <key>line</key><integer>857</integer>
// CHECK-NEXT: <key>col</key><integer>59</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14602,7 +13546,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>852</integer>
+// CHECK-NEXT: <key>line</key><integer>862</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14610,18 +13554,18 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>852</integer>
+// CHECK-NEXT: <key>line</key><integer>862</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>852</integer>
+// CHECK-NEXT: <key>line</key><integer>862</integer>
// CHECK-NEXT: <key>col</key><integer>18</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>depth</key><integer>1</integer>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Returning from &apos;noCopyString&apos;</string>
// CHECK-NEXT: <key>message</key>
@@ -14635,12 +13579,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>852</integer>
+// CHECK-NEXT: <key>line</key><integer>862</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>852</integer>
+// CHECK-NEXT: <key>line</key><integer>862</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14648,12 +13592,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>853</integer>
+// CHECK-NEXT: <key>line</key><integer>863</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>853</integer>
+// CHECK-NEXT: <key>line</key><integer>863</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14665,7 +13609,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>853</integer>
+// CHECK-NEXT: <key>line</key><integer>863</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14673,12 +13617,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>853</integer>
+// CHECK-NEXT: <key>line</key><integer>863</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>853</integer>
+// CHECK-NEXT: <key>line</key><integer>863</integer>
// CHECK-NEXT: <key>col</key><integer>54</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14696,10 +13640,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>test_RDar6859457</string>
-// CHECK-NEXT: <key>issue_hash</key><string>3</string>
+// CHECK-NEXT: <key>issue_hash</key><string>2</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>853</integer>
+// CHECK-NEXT: <key>line</key><integer>863</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14708,44 +13652,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>886</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>886</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>886</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>886</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>886</integer>
+// CHECK-NEXT: <key>line</key><integer>896</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14753,12 +13663,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>886</integer>
+// CHECK-NEXT: <key>line</key><integer>896</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>886</integer>
+// CHECK-NEXT: <key>line</key><integer>896</integer>
// CHECK-NEXT: <key>col</key><integer>32</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14771,44 +13681,10 @@ void foo() {
// CHECK-NEXT: <string>Method returns an Objective-C object with a +1 retain count</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>886</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>886</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>886</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>886</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>886</integer>
+// CHECK-NEXT: <key>line</key><integer>896</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14816,24 +13692,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>886</integer>
+// CHECK-NEXT: <key>line</key><integer>896</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>886</integer>
+// CHECK-NEXT: <key>line</key><integer>896</integer>
// CHECK-NEXT: <key>col</key><integer>32</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>886</integer>
+// CHECK-NEXT: <key>line</key><integer>896</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>886</integer>
+// CHECK-NEXT: <key>line</key><integer>896</integer>
// CHECK-NEXT: <key>col</key><integer>32</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14849,7 +13725,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>886</integer>
+// CHECK-NEXT: <key>line</key><integer>896</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14857,12 +13733,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>886</integer>
+// CHECK-NEXT: <key>line</key><integer>896</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>886</integer>
+// CHECK-NEXT: <key>line</key><integer>896</integer>
// CHECK-NEXT: <key>col</key><integer>32</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14883,7 +13759,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>886</integer>
+// CHECK-NEXT: <key>line</key><integer>896</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14895,7 +13771,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>916</integer>
+// CHECK-NEXT: <key>line</key><integer>926</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14903,12 +13779,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>916</integer>
+// CHECK-NEXT: <key>line</key><integer>926</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>916</integer>
+// CHECK-NEXT: <key>line</key><integer>926</integer>
// CHECK-NEXT: <key>col</key><integer>38</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14928,12 +13804,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>916</integer>
+// CHECK-NEXT: <key>line</key><integer>926</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>916</integer>
+// CHECK-NEXT: <key>line</key><integer>926</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14941,12 +13817,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>917</integer>
+// CHECK-NEXT: <key>line</key><integer>927</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>917</integer>
+// CHECK-NEXT: <key>line</key><integer>927</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14958,7 +13834,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>917</integer>
+// CHECK-NEXT: <key>line</key><integer>927</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14966,12 +13842,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>917</integer>
+// CHECK-NEXT: <key>line</key><integer>927</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>917</integer>
+// CHECK-NEXT: <key>line</key><integer>927</integer>
// CHECK-NEXT: <key>col</key><integer>42</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -14989,10 +13865,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>rdar6902710</string>
-// CHECK-NEXT: <key>issue_hash</key><string>2</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>917</integer>
+// CHECK-NEXT: <key>line</key><integer>927</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15008,12 +13884,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>916</integer>
+// CHECK-NEXT: <key>line</key><integer>926</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>916</integer>
+// CHECK-NEXT: <key>line</key><integer>926</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15021,12 +13897,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>917</integer>
+// CHECK-NEXT: <key>line</key><integer>927</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>917</integer>
+// CHECK-NEXT: <key>line</key><integer>927</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15038,7 +13914,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>917</integer>
+// CHECK-NEXT: <key>line</key><integer>927</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15046,12 +13922,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>917</integer>
+// CHECK-NEXT: <key>line</key><integer>927</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>917</integer>
+// CHECK-NEXT: <key>line</key><integer>927</integer>
// CHECK-NEXT: <key>col</key><integer>42</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15071,12 +13947,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>917</integer>
+// CHECK-NEXT: <key>line</key><integer>927</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>917</integer>
+// CHECK-NEXT: <key>line</key><integer>927</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15084,16 +13960,50 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>918</integer>
+// CHECK-NEXT: <key>line</key><integer>928</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>928</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>928</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>918</integer>
+// CHECK-NEXT: <key>line</key><integer>928</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>928</integer>
+// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>928</integer>
+// CHECK-NEXT: <key>col</key><integer>24</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -15101,21 +14011,21 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>918</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>line</key><integer>928</integer>
+// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>918</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>line</key><integer>928</integer>
+// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>918</integer>
-// CHECK-NEXT: <key>col</key><integer>43</integer>
+// CHECK-NEXT: <key>line</key><integer>928</integer>
+// CHECK-NEXT: <key>col</key><integer>42</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -15132,11 +14042,11 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>rdar6902710</string>
-// CHECK-NEXT: <key>issue_hash</key><string>3</string>
+// CHECK-NEXT: <key>issue_hash</key><string>2</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>918</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>line</key><integer>928</integer>
+// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
@@ -15151,12 +14061,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>916</integer>
+// CHECK-NEXT: <key>line</key><integer>926</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>916</integer>
+// CHECK-NEXT: <key>line</key><integer>926</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15164,12 +14074,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>918</integer>
+// CHECK-NEXT: <key>line</key><integer>928</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>918</integer>
+// CHECK-NEXT: <key>line</key><integer>928</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15181,7 +14091,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>918</integer>
+// CHECK-NEXT: <key>line</key><integer>928</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15189,12 +14099,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>918</integer>
+// CHECK-NEXT: <key>line</key><integer>928</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>918</integer>
+// CHECK-NEXT: <key>line</key><integer>928</integer>
// CHECK-NEXT: <key>col</key><integer>43</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15214,12 +14124,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>918</integer>
+// CHECK-NEXT: <key>line</key><integer>928</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>918</integer>
+// CHECK-NEXT: <key>line</key><integer>928</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15227,16 +14137,50 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>919</integer>
+// CHECK-NEXT: <key>line</key><integer>929</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>929</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>929</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>919</integer>
+// CHECK-NEXT: <key>line</key><integer>929</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>929</integer>
+// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>929</integer>
+// CHECK-NEXT: <key>col</key><integer>24</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -15244,21 +14188,21 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>919</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>line</key><integer>929</integer>
+// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>919</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>line</key><integer>929</integer>
+// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>919</integer>
-// CHECK-NEXT: <key>col</key><integer>69</integer>
+// CHECK-NEXT: <key>line</key><integer>929</integer>
+// CHECK-NEXT: <key>col</key><integer>42</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -15275,11 +14219,11 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>rdar6902710</string>
-// CHECK-NEXT: <key>issue_hash</key><string>4</string>
+// CHECK-NEXT: <key>issue_hash</key><string>3</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>919</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>line</key><integer>929</integer>
+// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
@@ -15294,12 +14238,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>916</integer>
+// CHECK-NEXT: <key>line</key><integer>926</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>916</integer>
+// CHECK-NEXT: <key>line</key><integer>926</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15307,12 +14251,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>919</integer>
+// CHECK-NEXT: <key>line</key><integer>929</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>919</integer>
+// CHECK-NEXT: <key>line</key><integer>929</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15324,7 +14268,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>919</integer>
+// CHECK-NEXT: <key>line</key><integer>929</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15332,12 +14276,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>919</integer>
+// CHECK-NEXT: <key>line</key><integer>929</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>919</integer>
+// CHECK-NEXT: <key>line</key><integer>929</integer>
// CHECK-NEXT: <key>col</key><integer>69</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15357,12 +14301,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>919</integer>
+// CHECK-NEXT: <key>line</key><integer>929</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>919</integer>
+// CHECK-NEXT: <key>line</key><integer>929</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15370,12 +14314,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>920</integer>
+// CHECK-NEXT: <key>line</key><integer>930</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>920</integer>
+// CHECK-NEXT: <key>line</key><integer>930</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15387,7 +14331,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>920</integer>
+// CHECK-NEXT: <key>line</key><integer>930</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15403,10 +14347,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>rdar6902710</string>
-// CHECK-NEXT: <key>issue_hash</key><string>5</string>
+// CHECK-NEXT: <key>issue_hash</key><string>4</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>920</integer>
+// CHECK-NEXT: <key>line</key><integer>930</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15418,7 +14362,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>928</integer>
+// CHECK-NEXT: <key>line</key><integer>938</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15426,12 +14370,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>928</integer>
+// CHECK-NEXT: <key>line</key><integer>938</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>928</integer>
+// CHECK-NEXT: <key>line</key><integer>938</integer>
// CHECK-NEXT: <key>col</key><integer>45</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15451,12 +14395,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>928</integer>
+// CHECK-NEXT: <key>line</key><integer>938</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>928</integer>
+// CHECK-NEXT: <key>line</key><integer>938</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15464,12 +14408,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>929</integer>
+// CHECK-NEXT: <key>line</key><integer>939</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>929</integer>
+// CHECK-NEXT: <key>line</key><integer>939</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15481,7 +14425,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>929</integer>
+// CHECK-NEXT: <key>line</key><integer>939</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15497,10 +14441,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>rdar6945561</string>
-// CHECK-NEXT: <key>issue_hash</key><string>2</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>929</integer>
+// CHECK-NEXT: <key>line</key><integer>939</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15512,7 +14456,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>937</integer>
+// CHECK-NEXT: <key>line</key><integer>947</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15520,12 +14464,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>937</integer>
+// CHECK-NEXT: <key>line</key><integer>947</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>937</integer>
+// CHECK-NEXT: <key>line</key><integer>947</integer>
// CHECK-NEXT: <key>col</key><integer>49</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15545,12 +14489,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>937</integer>
+// CHECK-NEXT: <key>line</key><integer>947</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>937</integer>
+// CHECK-NEXT: <key>line</key><integer>947</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15558,12 +14502,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>938</integer>
+// CHECK-NEXT: <key>line</key><integer>948</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>938</integer>
+// CHECK-NEXT: <key>line</key><integer>948</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15575,7 +14519,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>938</integer>
+// CHECK-NEXT: <key>line</key><integer>948</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15591,10 +14535,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>IOBSDNameMatching_wrapper</string>
-// CHECK-NEXT: <key>issue_hash</key><string>2</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>938</integer>
+// CHECK-NEXT: <key>line</key><integer>948</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15606,7 +14550,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>941</integer>
+// CHECK-NEXT: <key>line</key><integer>951</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15614,12 +14558,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>941</integer>
+// CHECK-NEXT: <key>line</key><integer>951</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>941</integer>
+// CHECK-NEXT: <key>line</key><integer>951</integer>
// CHECK-NEXT: <key>col</key><integer>25</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15639,12 +14583,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>941</integer>
+// CHECK-NEXT: <key>line</key><integer>951</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>941</integer>
+// CHECK-NEXT: <key>line</key><integer>951</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15652,12 +14596,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>942</integer>
+// CHECK-NEXT: <key>line</key><integer>952</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>942</integer>
+// CHECK-NEXT: <key>line</key><integer>952</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15669,7 +14613,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>942</integer>
+// CHECK-NEXT: <key>line</key><integer>952</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15685,10 +14629,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>IOServiceMatching_wrapper</string>
-// CHECK-NEXT: <key>issue_hash</key><string>2</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>942</integer>
+// CHECK-NEXT: <key>line</key><integer>952</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15700,7 +14644,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>945</integer>
+// CHECK-NEXT: <key>line</key><integer>955</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15708,12 +14652,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>945</integer>
+// CHECK-NEXT: <key>line</key><integer>955</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>945</integer>
+// CHECK-NEXT: <key>line</key><integer>955</integer>
// CHECK-NEXT: <key>col</key><integer>29</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15733,12 +14677,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>945</integer>
+// CHECK-NEXT: <key>line</key><integer>955</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>945</integer>
+// CHECK-NEXT: <key>line</key><integer>955</integer>
// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15746,12 +14690,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>946</integer>
+// CHECK-NEXT: <key>line</key><integer>956</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>946</integer>
+// CHECK-NEXT: <key>line</key><integer>956</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15763,7 +14707,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>946</integer>
+// CHECK-NEXT: <key>line</key><integer>956</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15779,10 +14723,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>IOServiceNameMatching_wrapper</string>
-// CHECK-NEXT: <key>issue_hash</key><string>2</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>946</integer>
+// CHECK-NEXT: <key>line</key><integer>956</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15791,44 +14735,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>953</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>953</integer>
-// CHECK-NEXT: <key>col</key><integer>17</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>953</integer>
-// CHECK-NEXT: <key>col</key><integer>30</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>953</integer>
-// CHECK-NEXT: <key>col</key><integer>39</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>953</integer>
+// CHECK-NEXT: <key>line</key><integer>963</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15836,12 +14746,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>953</integer>
+// CHECK-NEXT: <key>line</key><integer>963</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>953</integer>
+// CHECK-NEXT: <key>line</key><integer>963</integer>
// CHECK-NEXT: <key>col</key><integer>41</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15861,25 +14771,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>953</integer>
-// CHECK-NEXT: <key>col</key><integer>30</integer>
+// CHECK-NEXT: <key>line</key><integer>963</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>953</integer>
-// CHECK-NEXT: <key>col</key><integer>39</integer>
+// CHECK-NEXT: <key>line</key><integer>963</integer>
+// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>954</integer>
+// CHECK-NEXT: <key>line</key><integer>964</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>954</integer>
+// CHECK-NEXT: <key>line</key><integer>964</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15891,7 +14801,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>954</integer>
+// CHECK-NEXT: <key>line</key><integer>964</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15899,24 +14809,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>954</integer>
+// CHECK-NEXT: <key>line</key><integer>964</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>954</integer>
+// CHECK-NEXT: <key>line</key><integer>964</integer>
// CHECK-NEXT: <key>col</key><integer>21</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>954</integer>
+// CHECK-NEXT: <key>line</key><integer>964</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>954</integer>
+// CHECK-NEXT: <key>line</key><integer>964</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15936,12 +14846,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>954</integer>
+// CHECK-NEXT: <key>line</key><integer>964</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>954</integer>
+// CHECK-NEXT: <key>line</key><integer>964</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15949,12 +14859,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>955</integer>
+// CHECK-NEXT: <key>line</key><integer>965</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>955</integer>
+// CHECK-NEXT: <key>line</key><integer>965</integer>
// CHECK-NEXT: <key>col</key><integer>26</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15966,7 +14876,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>955</integer>
+// CHECK-NEXT: <key>line</key><integer>965</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -15974,12 +14884,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>955</integer>
+// CHECK-NEXT: <key>line</key><integer>965</integer>
// CHECK-NEXT: <key>col</key><integer>58</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>955</integer>
+// CHECK-NEXT: <key>line</key><integer>965</integer>
// CHECK-NEXT: <key>col</key><integer>65</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16000,7 +14910,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>4</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>955</integer>
+// CHECK-NEXT: <key>line</key><integer>965</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16012,7 +14922,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>960</integer>
+// CHECK-NEXT: <key>line</key><integer>970</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16020,12 +14930,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>960</integer>
+// CHECK-NEXT: <key>line</key><integer>970</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>960</integer>
+// CHECK-NEXT: <key>line</key><integer>970</integer>
// CHECK-NEXT: <key>col</key><integer>36</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16045,12 +14955,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>960</integer>
+// CHECK-NEXT: <key>line</key><integer>970</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>960</integer>
+// CHECK-NEXT: <key>line</key><integer>970</integer>
// CHECK-NEXT: <key>col</key><integer>27</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16058,12 +14968,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>961</integer>
+// CHECK-NEXT: <key>line</key><integer>971</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>961</integer>
+// CHECK-NEXT: <key>line</key><integer>971</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16075,7 +14985,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>961</integer>
+// CHECK-NEXT: <key>line</key><integer>971</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16091,10 +15001,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>IORegistryEntryIDMatching_wrapper</string>
-// CHECK-NEXT: <key>issue_hash</key><string>2</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>961</integer>
+// CHECK-NEXT: <key>line</key><integer>971</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16106,7 +15016,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>965</integer>
+// CHECK-NEXT: <key>line</key><integer>975</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16114,12 +15024,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>965</integer>
+// CHECK-NEXT: <key>line</key><integer>975</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>965</integer>
+// CHECK-NEXT: <key>line</key><integer>975</integer>
// CHECK-NEXT: <key>col</key><integer>55</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16139,12 +15049,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>965</integer>
+// CHECK-NEXT: <key>line</key><integer>975</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>965</integer>
+// CHECK-NEXT: <key>line</key><integer>975</integer>
// CHECK-NEXT: <key>col</key><integer>28</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16152,12 +15062,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>966</integer>
+// CHECK-NEXT: <key>line</key><integer>976</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>966</integer>
+// CHECK-NEXT: <key>line</key><integer>976</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16169,7 +15079,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>966</integer>
+// CHECK-NEXT: <key>line</key><integer>976</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16185,10 +15095,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>IOOpenFirmwarePathMatching_wrapper</string>
-// CHECK-NEXT: <key>issue_hash</key><string>2</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>966</integer>
+// CHECK-NEXT: <key>line</key><integer>976</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16197,44 +15107,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>969</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>969</integer>
-// CHECK-NEXT: <key>col</key><integer>17</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>969</integer>
-// CHECK-NEXT: <key>col</key><integer>30</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>969</integer>
-// CHECK-NEXT: <key>col</key><integer>39</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>969</integer>
+// CHECK-NEXT: <key>line</key><integer>979</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16242,12 +15118,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>969</integer>
+// CHECK-NEXT: <key>line</key><integer>979</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>969</integer>
+// CHECK-NEXT: <key>line</key><integer>979</integer>
// CHECK-NEXT: <key>col</key><integer>41</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16267,25 +15143,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>969</integer>
-// CHECK-NEXT: <key>col</key><integer>30</integer>
+// CHECK-NEXT: <key>line</key><integer>979</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>969</integer>
-// CHECK-NEXT: <key>col</key><integer>39</integer>
+// CHECK-NEXT: <key>line</key><integer>979</integer>
+// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>970</integer>
+// CHECK-NEXT: <key>line</key><integer>980</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>970</integer>
+// CHECK-NEXT: <key>line</key><integer>980</integer>
// CHECK-NEXT: <key>col</key><integer>29</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16297,7 +15173,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>970</integer>
+// CHECK-NEXT: <key>line</key><integer>980</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16305,24 +15181,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>970</integer>
+// CHECK-NEXT: <key>line</key><integer>980</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>970</integer>
+// CHECK-NEXT: <key>line</key><integer>980</integer>
// CHECK-NEXT: <key>col</key><integer>51</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>970</integer>
+// CHECK-NEXT: <key>line</key><integer>980</integer>
// CHECK-NEXT: <key>col</key><integer>43</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>970</integer>
+// CHECK-NEXT: <key>line</key><integer>980</integer>
// CHECK-NEXT: <key>col</key><integer>50</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16342,12 +15218,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>970</integer>
+// CHECK-NEXT: <key>line</key><integer>980</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>970</integer>
+// CHECK-NEXT: <key>line</key><integer>980</integer>
// CHECK-NEXT: <key>col</key><integer>29</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16355,12 +15231,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>971</integer>
+// CHECK-NEXT: <key>line</key><integer>981</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>971</integer>
+// CHECK-NEXT: <key>line</key><integer>981</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16372,7 +15248,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>971</integer>
+// CHECK-NEXT: <key>line</key><integer>981</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16380,12 +15256,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>971</integer>
+// CHECK-NEXT: <key>line</key><integer>981</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>971</integer>
+// CHECK-NEXT: <key>line</key><integer>981</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16406,7 +15282,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>3</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>971</integer>
+// CHECK-NEXT: <key>line</key><integer>981</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16415,44 +15291,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>975</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>975</integer>
-// CHECK-NEXT: <key>col</key><integer>17</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>975</integer>
-// CHECK-NEXT: <key>col</key><integer>30</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>975</integer>
-// CHECK-NEXT: <key>col</key><integer>39</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>975</integer>
+// CHECK-NEXT: <key>line</key><integer>985</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16460,12 +15302,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>975</integer>
+// CHECK-NEXT: <key>line</key><integer>985</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>975</integer>
+// CHECK-NEXT: <key>line</key><integer>985</integer>
// CHECK-NEXT: <key>col</key><integer>41</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16485,25 +15327,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>975</integer>
-// CHECK-NEXT: <key>col</key><integer>30</integer>
+// CHECK-NEXT: <key>line</key><integer>985</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>975</integer>
-// CHECK-NEXT: <key>col</key><integer>39</integer>
+// CHECK-NEXT: <key>line</key><integer>985</integer>
+// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>976</integer>
+// CHECK-NEXT: <key>line</key><integer>986</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>976</integer>
+// CHECK-NEXT: <key>line</key><integer>986</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16515,7 +15357,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>976</integer>
+// CHECK-NEXT: <key>line</key><integer>986</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16523,24 +15365,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>976</integer>
+// CHECK-NEXT: <key>line</key><integer>986</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>976</integer>
+// CHECK-NEXT: <key>line</key><integer>986</integer>
// CHECK-NEXT: <key>col</key><integer>62</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>976</integer>
+// CHECK-NEXT: <key>line</key><integer>986</integer>
// CHECK-NEXT: <key>col</key><integer>44</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>976</integer>
+// CHECK-NEXT: <key>line</key><integer>986</integer>
// CHECK-NEXT: <key>col</key><integer>51</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16560,12 +15402,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>976</integer>
+// CHECK-NEXT: <key>line</key><integer>986</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>976</integer>
+// CHECK-NEXT: <key>line</key><integer>986</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16573,12 +15415,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>977</integer>
+// CHECK-NEXT: <key>line</key><integer>987</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>977</integer>
+// CHECK-NEXT: <key>line</key><integer>987</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16590,7 +15432,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>977</integer>
+// CHECK-NEXT: <key>line</key><integer>987</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16598,12 +15440,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>977</integer>
+// CHECK-NEXT: <key>line</key><integer>987</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>977</integer>
+// CHECK-NEXT: <key>line</key><integer>987</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16624,7 +15466,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>3</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>977</integer>
+// CHECK-NEXT: <key>line</key><integer>987</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16633,44 +15475,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>983</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>983</integer>
-// CHECK-NEXT: <key>col</key><integer>17</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>983</integer>
-// CHECK-NEXT: <key>col</key><integer>30</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>983</integer>
-// CHECK-NEXT: <key>col</key><integer>39</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>983</integer>
+// CHECK-NEXT: <key>line</key><integer>993</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16678,12 +15486,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>983</integer>
+// CHECK-NEXT: <key>line</key><integer>993</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>983</integer>
+// CHECK-NEXT: <key>line</key><integer>993</integer>
// CHECK-NEXT: <key>col</key><integer>41</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16703,25 +15511,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>983</integer>
-// CHECK-NEXT: <key>col</key><integer>30</integer>
+// CHECK-NEXT: <key>line</key><integer>993</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>983</integer>
-// CHECK-NEXT: <key>col</key><integer>39</integer>
+// CHECK-NEXT: <key>line</key><integer>993</integer>
+// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>984</integer>
+// CHECK-NEXT: <key>line</key><integer>994</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>984</integer>
+// CHECK-NEXT: <key>line</key><integer>994</integer>
// CHECK-NEXT: <key>col</key><integer>34</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16733,7 +15541,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>984</integer>
+// CHECK-NEXT: <key>line</key><integer>994</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16741,24 +15549,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>984</integer>
+// CHECK-NEXT: <key>line</key><integer>994</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>984</integer>
+// CHECK-NEXT: <key>line</key><integer>994</integer>
// CHECK-NEXT: <key>col</key><integer>106</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>984</integer>
+// CHECK-NEXT: <key>line</key><integer>994</integer>
// CHECK-NEXT: <key>col</key><integer>66</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>984</integer>
+// CHECK-NEXT: <key>line</key><integer>994</integer>
// CHECK-NEXT: <key>col</key><integer>73</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16778,12 +15586,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>984</integer>
+// CHECK-NEXT: <key>line</key><integer>994</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>984</integer>
+// CHECK-NEXT: <key>line</key><integer>994</integer>
// CHECK-NEXT: <key>col</key><integer>34</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16791,12 +15599,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>985</integer>
+// CHECK-NEXT: <key>line</key><integer>995</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>985</integer>
+// CHECK-NEXT: <key>line</key><integer>995</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16808,7 +15616,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>985</integer>
+// CHECK-NEXT: <key>line</key><integer>995</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16816,12 +15624,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>985</integer>
+// CHECK-NEXT: <key>line</key><integer>995</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>985</integer>
+// CHECK-NEXT: <key>line</key><integer>995</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16842,7 +15650,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>4</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>985</integer>
+// CHECK-NEXT: <key>line</key><integer>995</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16858,12 +15666,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1023</integer>
+// CHECK-NEXT: <key>line</key><integer>1033</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1023</integer>
+// CHECK-NEXT: <key>line</key><integer>1033</integer>
// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16871,50 +15679,16 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1026</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1026</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1026</integer>
+// CHECK-NEXT: <key>line</key><integer>1036</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1026</integer>
+// CHECK-NEXT: <key>line</key><integer>1036</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1026</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1026</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -16922,7 +15696,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1026</integer>
+// CHECK-NEXT: <key>line</key><integer>1036</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16930,12 +15704,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1026</integer>
+// CHECK-NEXT: <key>line</key><integer>1036</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1026</integer>
+// CHECK-NEXT: <key>line</key><integer>1036</integer>
// CHECK-NEXT: <key>col</key><integer>53</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -16955,59 +15729,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1026</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1026</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1027</integer>
-// CHECK-NEXT: <key>col</key><integer>46</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1027</integer>
-// CHECK-NEXT: <key>col</key><integer>56</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1027</integer>
-// CHECK-NEXT: <key>col</key><integer>46</integer>
+// CHECK-NEXT: <key>line</key><integer>1036</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1027</integer>
-// CHECK-NEXT: <key>col</key><integer>56</integer>
+// CHECK-NEXT: <key>line</key><integer>1036</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1028</integer>
+// CHECK-NEXT: <key>line</key><integer>1038</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1028</integer>
+// CHECK-NEXT: <key>line</key><integer>1038</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17019,7 +15759,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1028</integer>
+// CHECK-NEXT: <key>line</key><integer>1038</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17027,24 +15767,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1028</integer>
+// CHECK-NEXT: <key>line</key><integer>1038</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1028</integer>
+// CHECK-NEXT: <key>line</key><integer>1038</integer>
// CHECK-NEXT: <key>col</key><integer>18</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1028</integer>
+// CHECK-NEXT: <key>line</key><integer>1038</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1028</integer>
+// CHECK-NEXT: <key>line</key><integer>1038</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17064,12 +15804,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1028</integer>
+// CHECK-NEXT: <key>line</key><integer>1038</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1028</integer>
+// CHECK-NEXT: <key>line</key><integer>1038</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17077,12 +15817,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1029</integer>
+// CHECK-NEXT: <key>line</key><integer>1039</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1029</integer>
+// CHECK-NEXT: <key>line</key><integer>1039</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17094,7 +15834,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1029</integer>
+// CHECK-NEXT: <key>line</key><integer>1039</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17102,24 +15842,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1029</integer>
+// CHECK-NEXT: <key>line</key><integer>1039</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1029</integer>
+// CHECK-NEXT: <key>line</key><integer>1039</integer>
// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1029</integer>
+// CHECK-NEXT: <key>line</key><integer>1039</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1029</integer>
+// CHECK-NEXT: <key>line</key><integer>1039</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17139,12 +15879,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1029</integer>
+// CHECK-NEXT: <key>line</key><integer>1039</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1029</integer>
+// CHECK-NEXT: <key>line</key><integer>1039</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17152,12 +15892,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1030</integer>
+// CHECK-NEXT: <key>line</key><integer>1040</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1030</integer>
+// CHECK-NEXT: <key>line</key><integer>1040</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17169,7 +15909,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1030</integer>
+// CHECK-NEXT: <key>line</key><integer>1040</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17177,12 +15917,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1030</integer>
+// CHECK-NEXT: <key>line</key><integer>1040</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1030</integer>
+// CHECK-NEXT: <key>line</key><integer>1040</integer>
// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17200,10 +15940,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>rdar_7152619</string>
-// CHECK-NEXT: <key>issue_hash</key><string>8</string>
+// CHECK-NEXT: <key>issue_hash</key><string>4</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1030</integer>
+// CHECK-NEXT: <key>line</key><integer>1040</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17219,12 +15959,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1039</integer>
+// CHECK-NEXT: <key>line</key><integer>1049</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1039</integer>
+// CHECK-NEXT: <key>line</key><integer>1049</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17232,12 +15972,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1050</integer>
+// CHECK-NEXT: <key>line</key><integer>1060</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1050</integer>
+// CHECK-NEXT: <key>line</key><integer>1060</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17253,12 +15993,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1050</integer>
+// CHECK-NEXT: <key>line</key><integer>1060</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1050</integer>
+// CHECK-NEXT: <key>line</key><integer>1060</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17266,12 +16006,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1051</integer>
+// CHECK-NEXT: <key>line</key><integer>1061</integer>
// CHECK-NEXT: <key>col</key><integer>41</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1051</integer>
+// CHECK-NEXT: <key>line</key><integer>1061</integer>
// CHECK-NEXT: <key>col</key><integer>67</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17283,7 +16023,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1051</integer>
+// CHECK-NEXT: <key>line</key><integer>1061</integer>
// CHECK-NEXT: <key>col</key><integer>41</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17291,12 +16031,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1051</integer>
+// CHECK-NEXT: <key>line</key><integer>1061</integer>
// CHECK-NEXT: <key>col</key><integer>41</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1051</integer>
+// CHECK-NEXT: <key>line</key><integer>1061</integer>
// CHECK-NEXT: <key>col</key><integer>69</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17316,12 +16056,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1051</integer>
+// CHECK-NEXT: <key>line</key><integer>1061</integer>
// CHECK-NEXT: <key>col</key><integer>41</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1051</integer>
+// CHECK-NEXT: <key>line</key><integer>1061</integer>
// CHECK-NEXT: <key>col</key><integer>67</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17329,12 +16069,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1050</integer>
+// CHECK-NEXT: <key>line</key><integer>1060</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1050</integer>
+// CHECK-NEXT: <key>line</key><integer>1060</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17346,7 +16086,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1050</integer>
+// CHECK-NEXT: <key>line</key><integer>1060</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17354,12 +16094,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1050</integer>
+// CHECK-NEXT: <key>line</key><integer>1060</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1050</integer>
+// CHECK-NEXT: <key>line</key><integer>1060</integer>
// CHECK-NEXT: <key>col</key><integer>26</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17377,10 +16117,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>rdar_7184450</string>
-// CHECK-NEXT: <key>issue_hash</key><string>12</string>
+// CHECK-NEXT: <key>issue_hash</key><string>13</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1050</integer>
+// CHECK-NEXT: <key>line</key><integer>1060</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17396,12 +16136,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1061</integer>
+// CHECK-NEXT: <key>line</key><integer>1071</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1061</integer>
+// CHECK-NEXT: <key>line</key><integer>1071</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17409,12 +16149,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1072</integer>
+// CHECK-NEXT: <key>line</key><integer>1082</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1072</integer>
+// CHECK-NEXT: <key>line</key><integer>1082</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17430,12 +16170,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1072</integer>
+// CHECK-NEXT: <key>line</key><integer>1082</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1072</integer>
+// CHECK-NEXT: <key>line</key><integer>1082</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17443,12 +16183,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1073</integer>
+// CHECK-NEXT: <key>line</key><integer>1083</integer>
// CHECK-NEXT: <key>col</key><integer>40</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1073</integer>
+// CHECK-NEXT: <key>line</key><integer>1083</integer>
// CHECK-NEXT: <key>col</key><integer>66</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17460,7 +16200,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1073</integer>
+// CHECK-NEXT: <key>line</key><integer>1083</integer>
// CHECK-NEXT: <key>col</key><integer>40</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17468,12 +16208,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1073</integer>
+// CHECK-NEXT: <key>line</key><integer>1083</integer>
// CHECK-NEXT: <key>col</key><integer>40</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1073</integer>
+// CHECK-NEXT: <key>line</key><integer>1083</integer>
// CHECK-NEXT: <key>col</key><integer>68</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17493,12 +16233,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1073</integer>
+// CHECK-NEXT: <key>line</key><integer>1083</integer>
// CHECK-NEXT: <key>col</key><integer>40</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1073</integer>
+// CHECK-NEXT: <key>line</key><integer>1083</integer>
// CHECK-NEXT: <key>col</key><integer>66</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17506,12 +16246,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1072</integer>
+// CHECK-NEXT: <key>line</key><integer>1082</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1072</integer>
+// CHECK-NEXT: <key>line</key><integer>1082</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17523,7 +16263,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1072</integer>
+// CHECK-NEXT: <key>line</key><integer>1082</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17531,12 +16271,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1072</integer>
+// CHECK-NEXT: <key>line</key><integer>1082</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1072</integer>
+// CHECK-NEXT: <key>line</key><integer>1082</integer>
// CHECK-NEXT: <key>col</key><integer>26</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17554,10 +16294,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>rdar_7184450_pos</string>
-// CHECK-NEXT: <key>issue_hash</key><string>12</string>
+// CHECK-NEXT: <key>issue_hash</key><string>13</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1072</integer>
+// CHECK-NEXT: <key>line</key><integer>1082</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17573,12 +16313,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1061</integer>
+// CHECK-NEXT: <key>line</key><integer>1071</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1061</integer>
+// CHECK-NEXT: <key>line</key><integer>1071</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17586,12 +16326,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1072</integer>
+// CHECK-NEXT: <key>line</key><integer>1082</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1072</integer>
+// CHECK-NEXT: <key>line</key><integer>1082</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17607,12 +16347,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1072</integer>
+// CHECK-NEXT: <key>line</key><integer>1082</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1072</integer>
+// CHECK-NEXT: <key>line</key><integer>1082</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17620,12 +16360,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1073</integer>
+// CHECK-NEXT: <key>line</key><integer>1083</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1073</integer>
+// CHECK-NEXT: <key>line</key><integer>1083</integer>
// CHECK-NEXT: <key>col</key><integer>38</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17637,7 +16377,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1073</integer>
+// CHECK-NEXT: <key>line</key><integer>1083</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17645,12 +16385,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1073</integer>
+// CHECK-NEXT: <key>line</key><integer>1083</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1073</integer>
+// CHECK-NEXT: <key>line</key><integer>1083</integer>
// CHECK-NEXT: <key>col</key><integer>107</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17670,12 +16410,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1073</integer>
+// CHECK-NEXT: <key>line</key><integer>1083</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1073</integer>
+// CHECK-NEXT: <key>line</key><integer>1083</integer>
// CHECK-NEXT: <key>col</key><integer>38</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17683,12 +16423,46 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1077</integer>
+// CHECK-NEXT: <key>line</key><integer>1085</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1085</integer>
+// CHECK-NEXT: <key>col</key><integer>29</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1085</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1085</integer>
+// CHECK-NEXT: <key>col</key><integer>29</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1087</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1077</integer>
+// CHECK-NEXT: <key>line</key><integer>1087</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17700,7 +16474,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1077</integer>
+// CHECK-NEXT: <key>line</key><integer>1087</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17716,10 +16490,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>rdar_7184450_pos</string>
-// CHECK-NEXT: <key>issue_hash</key><string>17</string>
+// CHECK-NEXT: <key>issue_hash</key><string>13</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1077</integer>
+// CHECK-NEXT: <key>line</key><integer>1087</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17728,44 +16502,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1111</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1111</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1111</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1111</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1111</integer>
+// CHECK-NEXT: <key>line</key><integer>1121</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17773,12 +16513,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1111</integer>
+// CHECK-NEXT: <key>line</key><integer>1121</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1111</integer>
+// CHECK-NEXT: <key>line</key><integer>1121</integer>
// CHECK-NEXT: <key>col</key><integer>53</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17798,25 +16538,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1111</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
+// CHECK-NEXT: <key>line</key><integer>1121</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1111</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
+// CHECK-NEXT: <key>line</key><integer>1121</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1112</integer>
+// CHECK-NEXT: <key>line</key><integer>1122</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1112</integer>
+// CHECK-NEXT: <key>line</key><integer>1122</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17828,7 +16568,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1112</integer>
+// CHECK-NEXT: <key>line</key><integer>1122</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17844,10 +16584,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>rdar_7299394_positive</string>
-// CHECK-NEXT: <key>issue_hash</key><string>2</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1112</integer>
+// CHECK-NEXT: <key>line</key><integer>1122</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17863,12 +16603,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1244</integer>
+// CHECK-NEXT: <key>line</key><integer>1254</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1244</integer>
+// CHECK-NEXT: <key>line</key><integer>1254</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17876,12 +16616,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1246</integer>
+// CHECK-NEXT: <key>line</key><integer>1256</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1246</integer>
+// CHECK-NEXT: <key>line</key><integer>1256</integer>
// CHECK-NEXT: <key>col</key><integer>31</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17893,7 +16633,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1246</integer>
+// CHECK-NEXT: <key>line</key><integer>1256</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17901,12 +16641,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1246</integer>
+// CHECK-NEXT: <key>line</key><integer>1256</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1247</integer>
+// CHECK-NEXT: <key>line</key><integer>1257</integer>
// CHECK-NEXT: <key>col</key><integer>60</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17926,12 +16666,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1246</integer>
+// CHECK-NEXT: <key>line</key><integer>1256</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1246</integer>
+// CHECK-NEXT: <key>line</key><integer>1256</integer>
// CHECK-NEXT: <key>col</key><integer>31</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17939,12 +16679,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1248</integer>
+// CHECK-NEXT: <key>line</key><integer>1258</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1248</integer>
+// CHECK-NEXT: <key>line</key><integer>1258</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17956,7 +16696,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1248</integer>
+// CHECK-NEXT: <key>line</key><integer>1258</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17972,10 +16712,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>rdar_7358899</string>
-// CHECK-NEXT: <key>issue_hash</key><string>9</string>
+// CHECK-NEXT: <key>issue_hash</key><string>7</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1248</integer>
+// CHECK-NEXT: <key>line</key><integer>1258</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -17984,44 +16724,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1264</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1264</integer>
-// CHECK-NEXT: <key>col</key><integer>4</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1264</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1264</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1264</integer>
+// CHECK-NEXT: <key>line</key><integer>1274</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18029,12 +16735,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1264</integer>
+// CHECK-NEXT: <key>line</key><integer>1274</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1264</integer>
+// CHECK-NEXT: <key>line</key><integer>1274</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18054,25 +16760,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1264</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
+// CHECK-NEXT: <key>line</key><integer>1274</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1264</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
+// CHECK-NEXT: <key>line</key><integer>1274</integer>
+// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1265</integer>
+// CHECK-NEXT: <key>line</key><integer>1275</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1265</integer>
+// CHECK-NEXT: <key>line</key><integer>1275</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18084,7 +16790,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1265</integer>
+// CHECK-NEXT: <key>line</key><integer>1275</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18100,10 +16806,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>rdar7265711_a</string>
-// CHECK-NEXT: <key>issue_hash</key><string>2</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1265</integer>
+// CHECK-NEXT: <key>line</key><integer>1275</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18119,12 +16825,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1284</integer>
+// CHECK-NEXT: <key>line</key><integer>1294</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1284</integer>
+// CHECK-NEXT: <key>line</key><integer>1294</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18132,50 +16838,16 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1285</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1285</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1285</integer>
+// CHECK-NEXT: <key>line</key><integer>1295</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1285</integer>
+// CHECK-NEXT: <key>line</key><integer>1295</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1285</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1285</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -18183,7 +16855,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1285</integer>
+// CHECK-NEXT: <key>line</key><integer>1295</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18191,12 +16863,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1285</integer>
+// CHECK-NEXT: <key>line</key><integer>1295</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1285</integer>
+// CHECK-NEXT: <key>line</key><integer>1295</integer>
// CHECK-NEXT: <key>col</key><integer>53</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18216,25 +16888,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1285</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
+// CHECK-NEXT: <key>line</key><integer>1295</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1285</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
+// CHECK-NEXT: <key>line</key><integer>1295</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1286</integer>
+// CHECK-NEXT: <key>line</key><integer>1296</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1286</integer>
+// CHECK-NEXT: <key>line</key><integer>1296</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18246,7 +16918,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1286</integer>
+// CHECK-NEXT: <key>line</key><integer>1296</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18262,10 +16934,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>rdar7306898</string>
-// CHECK-NEXT: <key>issue_hash</key><string>5</string>
+// CHECK-NEXT: <key>issue_hash</key><string>4</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1286</integer>
+// CHECK-NEXT: <key>line</key><integer>1296</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18277,7 +16949,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1295</integer>
+// CHECK-NEXT: <key>line</key><integer>1305</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18285,12 +16957,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1295</integer>
+// CHECK-NEXT: <key>line</key><integer>1305</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1295</integer>
+// CHECK-NEXT: <key>line</key><integer>1305</integer>
// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18311,7 +16983,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1295</integer>
+// CHECK-NEXT: <key>line</key><integer>1305</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18327,12 +16999,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1295</integer>
+// CHECK-NEXT: <key>line</key><integer>1305</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1295</integer>
+// CHECK-NEXT: <key>line</key><integer>1305</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18340,12 +17012,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1296</integer>
+// CHECK-NEXT: <key>line</key><integer>1306</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1296</integer>
+// CHECK-NEXT: <key>line</key><integer>1306</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18357,7 +17029,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1296</integer>
+// CHECK-NEXT: <key>line</key><integer>1306</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18365,12 +17037,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1296</integer>
+// CHECK-NEXT: <key>line</key><integer>1306</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1296</integer>
+// CHECK-NEXT: <key>line</key><integer>1306</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18391,7 +17063,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>2</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1296</integer>
+// CHECK-NEXT: <key>line</key><integer>1306</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18407,12 +17079,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1295</integer>
+// CHECK-NEXT: <key>line</key><integer>1305</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1295</integer>
+// CHECK-NEXT: <key>line</key><integer>1305</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18420,12 +17092,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1297</integer>
+// CHECK-NEXT: <key>line</key><integer>1307</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1297</integer>
+// CHECK-NEXT: <key>line</key><integer>1307</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18437,7 +17109,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1297</integer>
+// CHECK-NEXT: <key>line</key><integer>1307</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18445,12 +17117,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1297</integer>
+// CHECK-NEXT: <key>line</key><integer>1307</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1297</integer>
+// CHECK-NEXT: <key>line</key><integer>1307</integer>
// CHECK-NEXT: <key>col</key><integer>27</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18471,7 +17143,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>3</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1297</integer>
+// CHECK-NEXT: <key>line</key><integer>1307</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18487,12 +17159,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1295</integer>
+// CHECK-NEXT: <key>line</key><integer>1305</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1295</integer>
+// CHECK-NEXT: <key>line</key><integer>1305</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18500,12 +17172,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1298</integer>
+// CHECK-NEXT: <key>line</key><integer>1308</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1298</integer>
+// CHECK-NEXT: <key>line</key><integer>1308</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18517,7 +17189,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1298</integer>
+// CHECK-NEXT: <key>line</key><integer>1308</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18525,12 +17197,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1298</integer>
+// CHECK-NEXT: <key>line</key><integer>1308</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1298</integer>
+// CHECK-NEXT: <key>line</key><integer>1308</integer>
// CHECK-NEXT: <key>col</key><integer>27</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18551,7 +17223,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>4</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1298</integer>
+// CHECK-NEXT: <key>line</key><integer>1308</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18560,44 +17232,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1325</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1325</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1325</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1325</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1325</integer>
+// CHECK-NEXT: <key>line</key><integer>1335</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18605,12 +17243,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1325</integer>
+// CHECK-NEXT: <key>line</key><integer>1335</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1325</integer>
+// CHECK-NEXT: <key>line</key><integer>1335</integer>
// CHECK-NEXT: <key>col</key><integer>42</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18630,25 +17268,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1325</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
+// CHECK-NEXT: <key>line</key><integer>1335</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1325</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
+// CHECK-NEXT: <key>line</key><integer>1335</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1326</integer>
+// CHECK-NEXT: <key>line</key><integer>1336</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1326</integer>
+// CHECK-NEXT: <key>line</key><integer>1336</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18660,7 +17298,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1326</integer>
+// CHECK-NEXT: <key>line</key><integer>1336</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18676,10 +17314,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>test_attr_1</string>
-// CHECK-NEXT: <key>issue_hash</key><string>2</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1326</integer>
+// CHECK-NEXT: <key>line</key><integer>1336</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18688,44 +17326,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1329</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1329</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1329</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1329</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1329</integer>
+// CHECK-NEXT: <key>line</key><integer>1339</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18733,12 +17337,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1329</integer>
+// CHECK-NEXT: <key>line</key><integer>1339</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1329</integer>
+// CHECK-NEXT: <key>line</key><integer>1339</integer>
// CHECK-NEXT: <key>col</key><integer>44</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18758,25 +17362,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1329</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
+// CHECK-NEXT: <key>line</key><integer>1339</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1329</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
+// CHECK-NEXT: <key>line</key><integer>1339</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1330</integer>
+// CHECK-NEXT: <key>line</key><integer>1340</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1330</integer>
+// CHECK-NEXT: <key>line</key><integer>1340</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18788,7 +17392,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1330</integer>
+// CHECK-NEXT: <key>line</key><integer>1340</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18804,10 +17408,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>test_attr_1b</string>
-// CHECK-NEXT: <key>issue_hash</key><string>2</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1330</integer>
+// CHECK-NEXT: <key>line</key><integer>1340</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18823,12 +17427,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1333</integer>
+// CHECK-NEXT: <key>line</key><integer>1343</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1333</integer>
+// CHECK-NEXT: <key>line</key><integer>1343</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18836,50 +17440,16 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1334</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1334</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1334</integer>
+// CHECK-NEXT: <key>line</key><integer>1344</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1334</integer>
+// CHECK-NEXT: <key>line</key><integer>1344</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1334</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1334</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -18887,7 +17457,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1334</integer>
+// CHECK-NEXT: <key>line</key><integer>1344</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18895,12 +17465,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1334</integer>
+// CHECK-NEXT: <key>line</key><integer>1344</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1334</integer>
+// CHECK-NEXT: <key>line</key><integer>1344</integer>
// CHECK-NEXT: <key>col</key><integer>38</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18920,25 +17490,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1334</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>line</key><integer>1344</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1334</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>line</key><integer>1344</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1335</integer>
+// CHECK-NEXT: <key>line</key><integer>1345</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1335</integer>
+// CHECK-NEXT: <key>line</key><integer>1345</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18954,12 +17524,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1335</integer>
+// CHECK-NEXT: <key>line</key><integer>1345</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1335</integer>
+// CHECK-NEXT: <key>line</key><integer>1345</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18967,12 +17537,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1335</integer>
+// CHECK-NEXT: <key>line</key><integer>1345</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1335</integer>
+// CHECK-NEXT: <key>line</key><integer>1345</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18984,7 +17554,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1335</integer>
+// CHECK-NEXT: <key>line</key><integer>1345</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -18992,12 +17562,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1335</integer>
+// CHECK-NEXT: <key>line</key><integer>1345</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1335</integer>
+// CHECK-NEXT: <key>line</key><integer>1345</integer>
// CHECK-NEXT: <key>col</key><integer>37</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19015,10 +17585,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>test_attr1c</string>
-// CHECK-NEXT: <key>issue_hash</key><string>3</string>
+// CHECK-NEXT: <key>issue_hash</key><string>2</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1335</integer>
+// CHECK-NEXT: <key>line</key><integer>1345</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19034,12 +17604,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1333</integer>
+// CHECK-NEXT: <key>line</key><integer>1343</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1333</integer>
+// CHECK-NEXT: <key>line</key><integer>1343</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19047,12 +17617,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1336</integer>
+// CHECK-NEXT: <key>line</key><integer>1346</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1336</integer>
+// CHECK-NEXT: <key>line</key><integer>1346</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19068,12 +17638,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1336</integer>
+// CHECK-NEXT: <key>line</key><integer>1346</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1336</integer>
+// CHECK-NEXT: <key>line</key><integer>1346</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19081,12 +17651,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1336</integer>
+// CHECK-NEXT: <key>line</key><integer>1346</integer>
// CHECK-NEXT: <key>col</key><integer>21</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1336</integer>
+// CHECK-NEXT: <key>line</key><integer>1346</integer>
// CHECK-NEXT: <key>col</key><integer>21</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19098,7 +17668,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1336</integer>
+// CHECK-NEXT: <key>line</key><integer>1346</integer>
// CHECK-NEXT: <key>col</key><integer>21</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19106,12 +17676,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1336</integer>
+// CHECK-NEXT: <key>line</key><integer>1346</integer>
// CHECK-NEXT: <key>col</key><integer>21</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1336</integer>
+// CHECK-NEXT: <key>line</key><integer>1346</integer>
// CHECK-NEXT: <key>col</key><integer>38</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19124,44 +17694,10 @@ void foo() {
// CHECK-NEXT: <string>Method returns an Objective-C object with a +0 retain count</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1336</integer>
-// CHECK-NEXT: <key>col</key><integer>21</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1336</integer>
-// CHECK-NEXT: <key>col</key><integer>21</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1336</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1336</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1336</integer>
+// CHECK-NEXT: <key>line</key><integer>1346</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19169,24 +17705,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1336</integer>
+// CHECK-NEXT: <key>line</key><integer>1346</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1336</integer>
+// CHECK-NEXT: <key>line</key><integer>1346</integer>
// CHECK-NEXT: <key>col</key><integer>46</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1336</integer>
+// CHECK-NEXT: <key>line</key><integer>1346</integer>
// CHECK-NEXT: <key>col</key><integer>21</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1336</integer>
+// CHECK-NEXT: <key>line</key><integer>1346</integer>
// CHECK-NEXT: <key>col</key><integer>38</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19206,12 +17742,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1336</integer>
+// CHECK-NEXT: <key>line</key><integer>1346</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1336</integer>
+// CHECK-NEXT: <key>line</key><integer>1346</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19219,12 +17755,46 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1337</integer>
+// CHECK-NEXT: <key>line</key><integer>1346</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1346</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1346</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1346</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1347</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1337</integer>
+// CHECK-NEXT: <key>line</key><integer>1347</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19236,7 +17806,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1337</integer>
+// CHECK-NEXT: <key>line</key><integer>1347</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19252,10 +17822,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>test_attr1c</string>
-// CHECK-NEXT: <key>issue_hash</key><string>5</string>
+// CHECK-NEXT: <key>issue_hash</key><string>4</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1337</integer>
+// CHECK-NEXT: <key>line</key><integer>1347</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19264,44 +17834,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1340</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1340</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1340</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1340</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1340</integer>
+// CHECK-NEXT: <key>line</key><integer>1350</integer>
// CHECK-NEXT: <key>col</key><integer>26</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19309,12 +17845,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1340</integer>
+// CHECK-NEXT: <key>line</key><integer>1350</integer>
// CHECK-NEXT: <key>col</key><integer>26</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1340</integer>
+// CHECK-NEXT: <key>line</key><integer>1350</integer>
// CHECK-NEXT: <key>col</key><integer>50</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19334,25 +17870,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1340</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
+// CHECK-NEXT: <key>line</key><integer>1350</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1340</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
+// CHECK-NEXT: <key>line</key><integer>1350</integer>
+// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1341</integer>
+// CHECK-NEXT: <key>line</key><integer>1351</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1341</integer>
+// CHECK-NEXT: <key>line</key><integer>1351</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19364,7 +17900,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1341</integer>
+// CHECK-NEXT: <key>line</key><integer>1351</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19380,10 +17916,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>testattr2_a</string>
-// CHECK-NEXT: <key>issue_hash</key><string>2</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1341</integer>
+// CHECK-NEXT: <key>line</key><integer>1351</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19392,44 +17928,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1344</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1344</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1344</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1344</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1344</integer>
+// CHECK-NEXT: <key>line</key><integer>1354</integer>
// CHECK-NEXT: <key>col</key><integer>26</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19437,12 +17939,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1344</integer>
+// CHECK-NEXT: <key>line</key><integer>1354</integer>
// CHECK-NEXT: <key>col</key><integer>26</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1344</integer>
+// CHECK-NEXT: <key>line</key><integer>1354</integer>
// CHECK-NEXT: <key>col</key><integer>63</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19462,25 +17964,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1344</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
+// CHECK-NEXT: <key>line</key><integer>1354</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1344</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
+// CHECK-NEXT: <key>line</key><integer>1354</integer>
+// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1345</integer>
+// CHECK-NEXT: <key>line</key><integer>1355</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1345</integer>
+// CHECK-NEXT: <key>line</key><integer>1355</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19492,7 +17994,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1345</integer>
+// CHECK-NEXT: <key>line</key><integer>1355</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19508,10 +18010,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>testattr2_b</string>
-// CHECK-NEXT: <key>issue_hash</key><string>2</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1345</integer>
+// CHECK-NEXT: <key>line</key><integer>1355</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19520,6 +18022,35 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1358</integer>
+// CHECK-NEXT: <key>col</key><integer>26</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1358</integer>
+// CHECK-NEXT: <key>col</key><integer>26</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1358</integer>
+// CHECK-NEXT: <key>col</key><integer>63</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Method returns an Objective-C object with a +1 retain count</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Method returns an Objective-C object with a +1 retain count</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
@@ -19527,12 +18058,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1348</integer>
+// CHECK-NEXT: <key>line</key><integer>1358</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1348</integer>
+// CHECK-NEXT: <key>line</key><integer>1358</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19540,13 +18071,13 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1348</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
+// CHECK-NEXT: <key>line</key><integer>1359</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1348</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
+// CHECK-NEXT: <key>line</key><integer>1359</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -19554,35 +18085,6 @@ void foo() {
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>event</string>
-// CHECK-NEXT: <key>location</key>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1348</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <key>ranges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1348</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1348</integer>
-// CHECK-NEXT: <key>col</key><integer>63</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>depth</key><integer>0</integer>
-// CHECK-NEXT: <key>extended_message</key>
-// CHECK-NEXT: <string>Method returns an Objective-C object with a +1 retain count</string>
-// CHECK-NEXT: <key>message</key>
-// CHECK-NEXT: <string>Method returns an Objective-C object with a +1 retain count</string>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
@@ -19590,25 +18092,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1348</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
+// CHECK-NEXT: <key>line</key><integer>1359</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1348</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
+// CHECK-NEXT: <key>line</key><integer>1359</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1350</integer>
+// CHECK-NEXT: <key>line</key><integer>1360</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1350</integer>
+// CHECK-NEXT: <key>line</key><integer>1360</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19620,7 +18122,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1350</integer>
+// CHECK-NEXT: <key>line</key><integer>1360</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19636,10 +18138,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>testattr2_b_11358224_self_assign_looses_the_leak</string>
-// CHECK-NEXT: <key>issue_hash</key><string>3</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1350</integer>
+// CHECK-NEXT: <key>line</key><integer>1360</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19648,44 +18150,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1380</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1380</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1380</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1380</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1380</integer>
+// CHECK-NEXT: <key>line</key><integer>1390</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19693,12 +18161,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1380</integer>
+// CHECK-NEXT: <key>line</key><integer>1390</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1380</integer>
+// CHECK-NEXT: <key>line</key><integer>1390</integer>
// CHECK-NEXT: <key>col</key><integer>25</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19711,44 +18179,10 @@ void foo() {
// CHECK-NEXT: <string>Method returns an Objective-C object with a +1 retain count</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1380</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1380</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1380</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1380</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1380</integer>
+// CHECK-NEXT: <key>line</key><integer>1390</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19756,24 +18190,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1380</integer>
+// CHECK-NEXT: <key>line</key><integer>1390</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1380</integer>
+// CHECK-NEXT: <key>line</key><integer>1390</integer>
// CHECK-NEXT: <key>col</key><integer>25</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1380</integer>
+// CHECK-NEXT: <key>line</key><integer>1390</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1380</integer>
+// CHECK-NEXT: <key>line</key><integer>1390</integer>
// CHECK-NEXT: <key>col</key><integer>25</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19789,7 +18223,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1380</integer>
+// CHECK-NEXT: <key>line</key><integer>1390</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19797,12 +18231,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1380</integer>
+// CHECK-NEXT: <key>line</key><integer>1390</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1380</integer>
+// CHECK-NEXT: <key>line</key><integer>1390</integer>
// CHECK-NEXT: <key>col</key><integer>25</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19823,7 +18257,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1380</integer>
+// CHECK-NEXT: <key>line</key><integer>1390</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19839,12 +18273,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19852,12 +18286,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
// CHECK-NEXT: <key>col</key><integer>26</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
// CHECK-NEXT: <key>col</key><integer>26</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19869,7 +18303,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
// CHECK-NEXT: <key>col</key><integer>26</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19877,12 +18311,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
// CHECK-NEXT: <key>col</key><integer>26</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
// CHECK-NEXT: <key>col</key><integer>53</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19898,7 +18332,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1404</integer>
+// CHECK-NEXT: <key>line</key><integer>1414</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19916,12 +18350,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1404</integer>
+// CHECK-NEXT: <key>line</key><integer>1414</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1404</integer>
+// CHECK-NEXT: <key>line</key><integer>1414</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19929,12 +18363,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1405</integer>
+// CHECK-NEXT: <key>line</key><integer>1415</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1405</integer>
+// CHECK-NEXT: <key>line</key><integer>1415</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19950,12 +18384,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1405</integer>
+// CHECK-NEXT: <key>line</key><integer>1415</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1405</integer>
+// CHECK-NEXT: <key>line</key><integer>1415</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19963,12 +18397,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1405</integer>
+// CHECK-NEXT: <key>line</key><integer>1415</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1405</integer>
+// CHECK-NEXT: <key>line</key><integer>1415</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19980,7 +18414,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1405</integer>
+// CHECK-NEXT: <key>line</key><integer>1415</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -19988,12 +18422,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1405</integer>
+// CHECK-NEXT: <key>line</key><integer>1415</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1405</integer>
+// CHECK-NEXT: <key>line</key><integer>1415</integer>
// CHECK-NEXT: <key>col</key><integer>32</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20009,7 +18443,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1394</integer>
+// CHECK-NEXT: <key>line</key><integer>1404</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20027,26 +18461,26 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1396</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>line</key><integer>1404</integer>
+// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1396</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
+// CHECK-NEXT: <key>line</key><integer>1404</integer>
+// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1396</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
+// CHECK-NEXT: <key>line</key><integer>1406</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1396</integer>
-// CHECK-NEXT: <key>col</key><integer>21</integer>
+// CHECK-NEXT: <key>line</key><integer>1406</integer>
+// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -20057,7 +18491,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1396</integer>
+// CHECK-NEXT: <key>line</key><integer>1406</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20065,12 +18499,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1396</integer>
+// CHECK-NEXT: <key>line</key><integer>1406</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1396</integer>
+// CHECK-NEXT: <key>line</key><integer>1406</integer>
// CHECK-NEXT: <key>col</key><integer>52</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20086,7 +18520,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1405</integer>
+// CHECK-NEXT: <key>line</key><integer>1415</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20094,53 +18528,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1405</integer>
+// CHECK-NEXT: <key>line</key><integer>1415</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1405</integer>
+// CHECK-NEXT: <key>line</key><integer>1415</integer>
// CHECK-NEXT: <key>col</key><integer>32</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>depth</key><integer>2</integer>
+// CHECK-NEXT: <key>depth</key><integer>1</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Returning from &apos;returnsRetainedCFDate&apos;</string>
// CHECK-NEXT: <key>message</key>
// CHECK-NEXT: <string>Returning from &apos;returnsRetainedCFDate&apos;</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>event</string>
-// CHECK-NEXT: <key>location</key>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <key>ranges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
-// CHECK-NEXT: <key>col</key><integer>53</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>depth</key><integer>1</integer>
-// CHECK-NEXT: <key>extended_message</key>
-// CHECK-NEXT: <string>Returning from &apos;returnsCFRetainedAsCF&apos;</string>
-// CHECK-NEXT: <key>message</key>
-// CHECK-NEXT: <string>Returning from &apos;returnsCFRetainedAsCF&apos;</string>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
@@ -20148,26 +18553,26 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>line</key><integer>1415</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
+// CHECK-NEXT: <key>line</key><integer>1415</integer>
+// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
+// CHECK-NEXT: <key>line</key><integer>1415</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
+// CHECK-NEXT: <key>line</key><integer>1415</integer>
+// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -20175,6 +18580,35 @@ void foo() {
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
+// CHECK-NEXT: <key>col</key><integer>26</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
+// CHECK-NEXT: <key>col</key><integer>26</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
+// CHECK-NEXT: <key>col</key><integer>53</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Returning from &apos;returnsCFRetainedAsCF&apos;</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Returning from &apos;returnsCFRetainedAsCF&apos;</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
@@ -20182,12 +18616,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
// CHECK-NEXT: <key>col</key><integer>26</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
// CHECK-NEXT: <key>col</key><integer>26</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20195,12 +18629,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
// CHECK-NEXT: <key>col</key><integer>21</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
// CHECK-NEXT: <key>col</key><integer>21</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20212,7 +18646,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
// CHECK-NEXT: <key>col</key><integer>21</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20220,24 +18654,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
// CHECK-NEXT: <key>col</key><integer>21</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
// CHECK-NEXT: <key>col</key><integer>66</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
// CHECK-NEXT: <key>col</key><integer>53</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20257,12 +18691,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
// CHECK-NEXT: <key>col</key><integer>21</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
// CHECK-NEXT: <key>col</key><integer>21</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20270,12 +18704,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20287,7 +18721,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20295,12 +18729,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
// CHECK-NEXT: <key>col</key><integer>66</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20321,7 +18755,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1413</integer>
+// CHECK-NEXT: <key>line</key><integer>1423</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20337,12 +18771,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
+// CHECK-NEXT: <key>line</key><integer>1427</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
+// CHECK-NEXT: <key>line</key><integer>1427</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20350,12 +18784,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
+// CHECK-NEXT: <key>line</key><integer>1427</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
+// CHECK-NEXT: <key>line</key><integer>1427</integer>
// CHECK-NEXT: <key>col</key><integer>40</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20367,7 +18801,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
+// CHECK-NEXT: <key>line</key><integer>1427</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20375,12 +18809,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
+// CHECK-NEXT: <key>line</key><integer>1427</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
+// CHECK-NEXT: <key>line</key><integer>1427</integer>
// CHECK-NEXT: <key>col</key><integer>42</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20396,7 +18830,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1394</integer>
+// CHECK-NEXT: <key>line</key><integer>1404</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20414,26 +18848,26 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1396</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>line</key><integer>1404</integer>
+// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1396</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
+// CHECK-NEXT: <key>line</key><integer>1404</integer>
+// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1396</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
+// CHECK-NEXT: <key>line</key><integer>1406</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1396</integer>
-// CHECK-NEXT: <key>col</key><integer>21</integer>
+// CHECK-NEXT: <key>line</key><integer>1406</integer>
+// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -20444,7 +18878,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1396</integer>
+// CHECK-NEXT: <key>line</key><integer>1406</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20452,12 +18886,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1396</integer>
+// CHECK-NEXT: <key>line</key><integer>1406</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1396</integer>
+// CHECK-NEXT: <key>line</key><integer>1406</integer>
// CHECK-NEXT: <key>col</key><integer>52</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20473,7 +18907,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
+// CHECK-NEXT: <key>line</key><integer>1427</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20481,18 +18915,18 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
+// CHECK-NEXT: <key>line</key><integer>1427</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
+// CHECK-NEXT: <key>line</key><integer>1427</integer>
// CHECK-NEXT: <key>col</key><integer>42</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>depth</key><integer>1</integer>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Returning from &apos;returnsRetainedCFDate&apos;</string>
// CHECK-NEXT: <key>message</key>
@@ -20506,46 +18940,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
-// CHECK-NEXT: <key>col</key><integer>20</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
-// CHECK-NEXT: <key>col</key><integer>40</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
+// CHECK-NEXT: <key>line</key><integer>1427</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
+// CHECK-NEXT: <key>line</key><integer>1427</integer>
// CHECK-NEXT: <key>col</key><integer>40</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20553,12 +18953,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
+// CHECK-NEXT: <key>line</key><integer>1427</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
+// CHECK-NEXT: <key>line</key><integer>1427</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20570,7 +18970,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
+// CHECK-NEXT: <key>line</key><integer>1427</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20578,24 +18978,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
+// CHECK-NEXT: <key>line</key><integer>1427</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
+// CHECK-NEXT: <key>line</key><integer>1427</integer>
// CHECK-NEXT: <key>col</key><integer>42</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
+// CHECK-NEXT: <key>line</key><integer>1427</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
+// CHECK-NEXT: <key>line</key><integer>1427</integer>
// CHECK-NEXT: <key>col</key><integer>42</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20611,7 +19011,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
+// CHECK-NEXT: <key>line</key><integer>1427</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20619,12 +19019,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
+// CHECK-NEXT: <key>line</key><integer>1427</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
+// CHECK-NEXT: <key>line</key><integer>1427</integer>
// CHECK-NEXT: <key>col</key><integer>42</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20645,7 +19045,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1417</integer>
+// CHECK-NEXT: <key>line</key><integer>1427</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20661,12 +19061,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
+// CHECK-NEXT: <key>line</key><integer>1431</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
+// CHECK-NEXT: <key>line</key><integer>1431</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20674,12 +19074,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
+// CHECK-NEXT: <key>line</key><integer>1431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
+// CHECK-NEXT: <key>line</key><integer>1431</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20691,7 +19091,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
+// CHECK-NEXT: <key>line</key><integer>1431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20699,12 +19099,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
+// CHECK-NEXT: <key>line</key><integer>1431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
+// CHECK-NEXT: <key>line</key><integer>1431</integer>
// CHECK-NEXT: <key>col</key><integer>32</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20720,7 +19120,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1394</integer>
+// CHECK-NEXT: <key>line</key><integer>1404</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20738,26 +19138,26 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1396</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>line</key><integer>1404</integer>
+// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1396</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
+// CHECK-NEXT: <key>line</key><integer>1404</integer>
+// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1396</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
+// CHECK-NEXT: <key>line</key><integer>1406</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1396</integer>
-// CHECK-NEXT: <key>col</key><integer>21</integer>
+// CHECK-NEXT: <key>line</key><integer>1406</integer>
+// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -20768,7 +19168,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1396</integer>
+// CHECK-NEXT: <key>line</key><integer>1406</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20776,12 +19176,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1396</integer>
+// CHECK-NEXT: <key>line</key><integer>1406</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1396</integer>
+// CHECK-NEXT: <key>line</key><integer>1406</integer>
// CHECK-NEXT: <key>col</key><integer>52</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20797,7 +19197,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
+// CHECK-NEXT: <key>line</key><integer>1431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20805,18 +19205,18 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
+// CHECK-NEXT: <key>line</key><integer>1431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
+// CHECK-NEXT: <key>line</key><integer>1431</integer>
// CHECK-NEXT: <key>col</key><integer>32</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>depth</key><integer>1</integer>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Returning from &apos;returnsRetainedCFDate&apos;</string>
// CHECK-NEXT: <key>message</key>
@@ -20830,46 +19230,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
-// CHECK-NEXT: <key>col</key><integer>30</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
+// CHECK-NEXT: <key>line</key><integer>1431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
+// CHECK-NEXT: <key>line</key><integer>1431</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20877,12 +19243,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
+// CHECK-NEXT: <key>line</key><integer>1431</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
+// CHECK-NEXT: <key>line</key><integer>1431</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20894,7 +19260,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
+// CHECK-NEXT: <key>line</key><integer>1431</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20902,24 +19268,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
+// CHECK-NEXT: <key>line</key><integer>1431</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
+// CHECK-NEXT: <key>line</key><integer>1431</integer>
// CHECK-NEXT: <key>col</key><integer>32</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
+// CHECK-NEXT: <key>line</key><integer>1431</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
+// CHECK-NEXT: <key>line</key><integer>1431</integer>
// CHECK-NEXT: <key>col</key><integer>32</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20935,7 +19301,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
+// CHECK-NEXT: <key>line</key><integer>1431</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20943,12 +19309,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
+// CHECK-NEXT: <key>line</key><integer>1431</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
+// CHECK-NEXT: <key>line</key><integer>1431</integer>
// CHECK-NEXT: <key>col</key><integer>32</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20969,7 +19335,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1421</integer>
+// CHECK-NEXT: <key>line</key><integer>1431</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20985,12 +19351,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1441</integer>
+// CHECK-NEXT: <key>line</key><integer>1451</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1441</integer>
+// CHECK-NEXT: <key>line</key><integer>1451</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -20998,50 +19364,16 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1442</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1442</integer>
-// CHECK-NEXT: <key>col</key><integer>13</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1442</integer>
+// CHECK-NEXT: <key>line</key><integer>1452</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1442</integer>
+// CHECK-NEXT: <key>line</key><integer>1452</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1442</integer>
-// CHECK-NEXT: <key>col</key><integer>23</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1442</integer>
-// CHECK-NEXT: <key>col</key><integer>36</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -21049,7 +19381,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1442</integer>
+// CHECK-NEXT: <key>line</key><integer>1452</integer>
// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21057,12 +19389,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1442</integer>
+// CHECK-NEXT: <key>line</key><integer>1452</integer>
// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1442</integer>
+// CHECK-NEXT: <key>line</key><integer>1452</integer>
// CHECK-NEXT: <key>col</key><integer>82</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21082,25 +19414,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1442</integer>
-// CHECK-NEXT: <key>col</key><integer>23</integer>
+// CHECK-NEXT: <key>line</key><integer>1452</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1442</integer>
-// CHECK-NEXT: <key>col</key><integer>36</integer>
+// CHECK-NEXT: <key>line</key><integer>1452</integer>
+// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1443</integer>
+// CHECK-NEXT: <key>line</key><integer>1453</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1443</integer>
+// CHECK-NEXT: <key>line</key><integer>1453</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21112,7 +19444,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1443</integer>
+// CHECK-NEXT: <key>line</key><integer>1453</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21128,10 +19460,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>test_panic_negative</string>
-// CHECK-NEXT: <key>issue_hash</key><string>3</string>
+// CHECK-NEXT: <key>issue_hash</key><string>2</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1443</integer>
+// CHECK-NEXT: <key>line</key><integer>1453</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21147,12 +19479,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1452</integer>
+// CHECK-NEXT: <key>line</key><integer>1462</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1452</integer>
+// CHECK-NEXT: <key>line</key><integer>1462</integer>
// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21160,12 +19492,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1453</integer>
+// CHECK-NEXT: <key>line</key><integer>1463</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1453</integer>
+// CHECK-NEXT: <key>line</key><integer>1463</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21174,44 +19506,10 @@ void foo() {
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1453</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1453</integer>
-// CHECK-NEXT: <key>col</key><integer>13</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1453</integer>
-// CHECK-NEXT: <key>col</key><integer>23</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1453</integer>
-// CHECK-NEXT: <key>col</key><integer>36</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1453</integer>
+// CHECK-NEXT: <key>line</key><integer>1463</integer>
// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21219,12 +19517,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1453</integer>
+// CHECK-NEXT: <key>line</key><integer>1463</integer>
// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1453</integer>
+// CHECK-NEXT: <key>line</key><integer>1463</integer>
// CHECK-NEXT: <key>col</key><integer>82</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21244,25 +19542,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1453</integer>
-// CHECK-NEXT: <key>col</key><integer>23</integer>
+// CHECK-NEXT: <key>line</key><integer>1463</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1453</integer>
-// CHECK-NEXT: <key>col</key><integer>36</integer>
+// CHECK-NEXT: <key>line</key><integer>1463</integer>
+// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1454</integer>
+// CHECK-NEXT: <key>line</key><integer>1464</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1454</integer>
+// CHECK-NEXT: <key>line</key><integer>1464</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21278,12 +19576,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1454</integer>
+// CHECK-NEXT: <key>line</key><integer>1464</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1454</integer>
+// CHECK-NEXT: <key>line</key><integer>1464</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21291,12 +19589,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1454</integer>
+// CHECK-NEXT: <key>line</key><integer>1464</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1454</integer>
+// CHECK-NEXT: <key>line</key><integer>1464</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21308,7 +19606,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1454</integer>
+// CHECK-NEXT: <key>line</key><integer>1464</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21316,12 +19614,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1454</integer>
+// CHECK-NEXT: <key>line</key><integer>1464</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1454</integer>
+// CHECK-NEXT: <key>line</key><integer>1464</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21341,12 +19639,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1454</integer>
+// CHECK-NEXT: <key>line</key><integer>1464</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1454</integer>
+// CHECK-NEXT: <key>line</key><integer>1464</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21354,12 +19652,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1456</integer>
+// CHECK-NEXT: <key>line</key><integer>1466</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1456</integer>
+// CHECK-NEXT: <key>line</key><integer>1466</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21371,7 +19669,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1456</integer>
+// CHECK-NEXT: <key>line</key><integer>1466</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21387,10 +19685,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>test_panic_neg_2</string>
-// CHECK-NEXT: <key>issue_hash</key><string>5</string>
+// CHECK-NEXT: <key>issue_hash</key><string>2</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1456</integer>
+// CHECK-NEXT: <key>line</key><integer>1466</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21399,44 +19697,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1476</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1476</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1476</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1476</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1476</integer>
+// CHECK-NEXT: <key>line</key><integer>1486</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21444,12 +19708,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1476</integer>
+// CHECK-NEXT: <key>line</key><integer>1486</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1476</integer>
+// CHECK-NEXT: <key>line</key><integer>1486</integer>
// CHECK-NEXT: <key>col</key><integer>53</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21469,25 +19733,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1476</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
+// CHECK-NEXT: <key>line</key><integer>1486</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1476</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
+// CHECK-NEXT: <key>line</key><integer>1486</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1477</integer>
+// CHECK-NEXT: <key>line</key><integer>1487</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1477</integer>
+// CHECK-NEXT: <key>line</key><integer>1487</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21499,7 +19763,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1477</integer>
+// CHECK-NEXT: <key>line</key><integer>1487</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21507,12 +19771,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1477</integer>
+// CHECK-NEXT: <key>line</key><integer>1487</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1477</integer>
+// CHECK-NEXT: <key>line</key><integer>1487</integer>
// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21530,10 +19794,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>test_blocks_1_pos</string>
-// CHECK-NEXT: <key>issue_hash</key><string>2</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1477</integer>
+// CHECK-NEXT: <key>line</key><integer>1487</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21542,44 +19806,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1497</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1497</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1497</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1497</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1497</integer>
+// CHECK-NEXT: <key>line</key><integer>1507</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21587,12 +19817,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1497</integer>
+// CHECK-NEXT: <key>line</key><integer>1507</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1497</integer>
+// CHECK-NEXT: <key>line</key><integer>1507</integer>
// CHECK-NEXT: <key>col</key><integer>53</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21612,25 +19842,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1497</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
+// CHECK-NEXT: <key>line</key><integer>1507</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1497</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
+// CHECK-NEXT: <key>line</key><integer>1507</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1498</integer>
+// CHECK-NEXT: <key>line</key><integer>1508</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1498</integer>
+// CHECK-NEXT: <key>line</key><integer>1508</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21642,7 +19872,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1498</integer>
+// CHECK-NEXT: <key>line</key><integer>1508</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21650,12 +19880,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1498</integer>
+// CHECK-NEXT: <key>line</key><integer>1508</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1498</integer>
+// CHECK-NEXT: <key>line</key><integer>1508</integer>
// CHECK-NEXT: <key>col</key><integer>39</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21671,7 +19901,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1498</integer>
+// CHECK-NEXT: <key>line</key><integer>1508</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21689,12 +19919,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1498</integer>
+// CHECK-NEXT: <key>line</key><integer>1508</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1498</integer>
+// CHECK-NEXT: <key>line</key><integer>1508</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21702,12 +19932,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1498</integer>
+// CHECK-NEXT: <key>line</key><integer>1508</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1498</integer>
+// CHECK-NEXT: <key>line</key><integer>1508</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21719,7 +19949,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1498</integer>
+// CHECK-NEXT: <key>line</key><integer>1508</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21727,24 +19957,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1498</integer>
+// CHECK-NEXT: <key>line</key><integer>1508</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1498</integer>
+// CHECK-NEXT: <key>line</key><integer>1508</integer>
// CHECK-NEXT: <key>col</key><integer>28</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1498</integer>
+// CHECK-NEXT: <key>line</key><integer>1508</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1498</integer>
+// CHECK-NEXT: <key>line</key><integer>1508</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21760,7 +19990,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1498</integer>
+// CHECK-NEXT: <key>line</key><integer>1508</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21768,18 +19998,18 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1498</integer>
+// CHECK-NEXT: <key>line</key><integer>1508</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1498</integer>
+// CHECK-NEXT: <key>line</key><integer>1508</integer>
// CHECK-NEXT: <key>col</key><integer>39</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>depth</key><integer>1</integer>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Returning to caller</string>
// CHECK-NEXT: <key>message</key>
@@ -21793,12 +20023,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1498</integer>
+// CHECK-NEXT: <key>line</key><integer>1508</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1498</integer>
+// CHECK-NEXT: <key>line</key><integer>1508</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21806,12 +20036,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1499</integer>
+// CHECK-NEXT: <key>line</key><integer>1509</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1499</integer>
+// CHECK-NEXT: <key>line</key><integer>1509</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21823,7 +20053,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1499</integer>
+// CHECK-NEXT: <key>line</key><integer>1509</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21839,10 +20069,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>test_blocks_1_indirect_retain_via_call</string>
-// CHECK-NEXT: <key>issue_hash</key><string>3</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1499</integer>
+// CHECK-NEXT: <key>line</key><integer>1509</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21858,12 +20088,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1549</integer>
+// CHECK-NEXT: <key>line</key><integer>1559</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1549</integer>
+// CHECK-NEXT: <key>line</key><integer>1559</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21871,12 +20101,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1552</integer>
+// CHECK-NEXT: <key>line</key><integer>1562</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1552</integer>
+// CHECK-NEXT: <key>line</key><integer>1562</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21885,6 +20115,35 @@ void foo() {
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1562</integer>
+// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1562</integer>
+// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1562</integer>
+// CHECK-NEXT: <key>col</key><integer>38</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Entering loop body</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Entering loop body</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
@@ -21892,12 +20151,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1552</integer>
+// CHECK-NEXT: <key>line</key><integer>1562</integer>
// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1552</integer>
+// CHECK-NEXT: <key>line</key><integer>1562</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21905,12 +20164,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1553</integer>
+// CHECK-NEXT: <key>line</key><integer>1563</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1553</integer>
+// CHECK-NEXT: <key>line</key><integer>1563</integer>
// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21926,12 +20185,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1553</integer>
+// CHECK-NEXT: <key>line</key><integer>1563</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1553</integer>
+// CHECK-NEXT: <key>line</key><integer>1563</integer>
// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21939,12 +20198,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1555</integer>
+// CHECK-NEXT: <key>line</key><integer>1565</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1555</integer>
+// CHECK-NEXT: <key>line</key><integer>1565</integer>
// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21953,44 +20212,10 @@ void foo() {
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1555</integer>
-// CHECK-NEXT: <key>col</key><integer>9</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1555</integer>
-// CHECK-NEXT: <key>col</key><integer>12</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1555</integer>
-// CHECK-NEXT: <key>col</key><integer>16</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1555</integer>
-// CHECK-NEXT: <key>col</key><integer>34</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1555</integer>
+// CHECK-NEXT: <key>line</key><integer>1565</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -21998,12 +20223,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1555</integer>
+// CHECK-NEXT: <key>line</key><integer>1565</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1555</integer>
+// CHECK-NEXT: <key>line</key><integer>1565</integer>
// CHECK-NEXT: <key>col</key><integer>49</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22023,25 +20248,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1555</integer>
-// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>line</key><integer>1565</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1555</integer>
-// CHECK-NEXT: <key>col</key><integer>34</integer>
+// CHECK-NEXT: <key>line</key><integer>1565</integer>
+// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1557</integer>
+// CHECK-NEXT: <key>line</key><integer>1567</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1557</integer>
+// CHECK-NEXT: <key>line</key><integer>1567</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22057,12 +20282,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1557</integer>
+// CHECK-NEXT: <key>line</key><integer>1567</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1557</integer>
+// CHECK-NEXT: <key>line</key><integer>1567</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22070,12 +20295,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1557</integer>
+// CHECK-NEXT: <key>line</key><integer>1567</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1557</integer>
+// CHECK-NEXT: <key>line</key><integer>1567</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22087,7 +20312,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1557</integer>
+// CHECK-NEXT: <key>line</key><integer>1567</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22095,12 +20320,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1557</integer>
+// CHECK-NEXT: <key>line</key><integer>1567</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1557</integer>
+// CHECK-NEXT: <key>line</key><integer>1567</integer>
// CHECK-NEXT: <key>col</key><integer>30</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22120,12 +20345,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1557</integer>
+// CHECK-NEXT: <key>line</key><integer>1567</integer>
// CHECK-NEXT: <key>col</key><integer>13</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1557</integer>
+// CHECK-NEXT: <key>line</key><integer>1567</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22133,13 +20358,13 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1560</integer>
-// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>line</key><integer>1570</integer>
+// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1560</integer>
-// CHECK-NEXT: <key>col</key><integer>21</integer>
+// CHECK-NEXT: <key>line</key><integer>1570</integer>
+// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -22150,25 +20375,10 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1560</integer>
-// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>line</key><integer>1570</integer>
+// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
-// CHECK-NEXT: <key>ranges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1560</integer>
-// CHECK-NEXT: <key>col</key><integer>9</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1560</integer>
-// CHECK-NEXT: <key>col</key><integer>91</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
// CHECK-NEXT: <string>Object leaked: object allocated and stored into &apos;info&apos; is not referenced later in this execution path and has a retain count of +1</string>
@@ -22181,11 +20391,11 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>rdar_8724287</string>
-// CHECK-NEXT: <key>issue_hash</key><string>12</string>
+// CHECK-NEXT: <key>issue_hash</key><string>7</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1560</integer>
-// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>line</key><integer>1570</integer>
+// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
@@ -22193,44 +20403,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1605</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1605</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1605</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1605</integer>
-// CHECK-NEXT: <key>col</key><integer>29</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1605</integer>
+// CHECK-NEXT: <key>line</key><integer>1615</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22238,12 +20414,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1605</integer>
+// CHECK-NEXT: <key>line</key><integer>1615</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1605</integer>
+// CHECK-NEXT: <key>line</key><integer>1615</integer>
// CHECK-NEXT: <key>col</key><integer>60</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22256,44 +20432,10 @@ void foo() {
// CHECK-NEXT: <string>Call to function &apos;CFArrayCreateMutable&apos; returns a Core Foundation object with a +1 retain count</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1605</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1605</integer>
-// CHECK-NEXT: <key>col</key><integer>29</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1605</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1605</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1605</integer>
+// CHECK-NEXT: <key>line</key><integer>1615</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22301,24 +20443,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1605</integer>
+// CHECK-NEXT: <key>line</key><integer>1615</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1605</integer>
+// CHECK-NEXT: <key>line</key><integer>1615</integer>
// CHECK-NEXT: <key>col</key><integer>60</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1605</integer>
+// CHECK-NEXT: <key>line</key><integer>1615</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1605</integer>
+// CHECK-NEXT: <key>line</key><integer>1615</integer>
// CHECK-NEXT: <key>col</key><integer>60</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22334,7 +20476,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1605</integer>
+// CHECK-NEXT: <key>line</key><integer>1615</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22342,12 +20484,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1605</integer>
+// CHECK-NEXT: <key>line</key><integer>1615</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1605</integer>
+// CHECK-NEXT: <key>line</key><integer>1615</integer>
// CHECK-NEXT: <key>col</key><integer>60</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22368,7 +20510,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1605</integer>
+// CHECK-NEXT: <key>line</key><integer>1615</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22377,44 +20519,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1613</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1613</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1613</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1613</integer>
-// CHECK-NEXT: <key>col</key><integer>29</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1613</integer>
+// CHECK-NEXT: <key>line</key><integer>1623</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22422,12 +20530,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1613</integer>
+// CHECK-NEXT: <key>line</key><integer>1623</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1613</integer>
+// CHECK-NEXT: <key>line</key><integer>1623</integer>
// CHECK-NEXT: <key>col</key><integer>60</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22440,44 +20548,10 @@ void foo() {
// CHECK-NEXT: <string>Call to function &apos;CFArrayCreateMutable&apos; returns a Core Foundation object with a +1 retain count</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1613</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1613</integer>
-// CHECK-NEXT: <key>col</key><integer>29</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1613</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1613</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1613</integer>
+// CHECK-NEXT: <key>line</key><integer>1623</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22485,24 +20559,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1613</integer>
+// CHECK-NEXT: <key>line</key><integer>1623</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1613</integer>
+// CHECK-NEXT: <key>line</key><integer>1623</integer>
// CHECK-NEXT: <key>col</key><integer>60</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1613</integer>
+// CHECK-NEXT: <key>line</key><integer>1623</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1613</integer>
+// CHECK-NEXT: <key>line</key><integer>1623</integer>
// CHECK-NEXT: <key>col</key><integer>60</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22518,7 +20592,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1613</integer>
+// CHECK-NEXT: <key>line</key><integer>1623</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22526,12 +20600,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1613</integer>
+// CHECK-NEXT: <key>line</key><integer>1623</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1613</integer>
+// CHECK-NEXT: <key>line</key><integer>1623</integer>
// CHECK-NEXT: <key>col</key><integer>60</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22552,7 +20626,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1613</integer>
+// CHECK-NEXT: <key>line</key><integer>1623</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22561,44 +20635,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1634</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1634</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1634</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1634</integer>
-// CHECK-NEXT: <key>col</key><integer>29</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1634</integer>
+// CHECK-NEXT: <key>line</key><integer>1644</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22606,12 +20646,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1634</integer>
+// CHECK-NEXT: <key>line</key><integer>1644</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1634</integer>
+// CHECK-NEXT: <key>line</key><integer>1644</integer>
// CHECK-NEXT: <key>col</key><integer>60</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22624,44 +20664,10 @@ void foo() {
// CHECK-NEXT: <string>Call to function &apos;CFArrayCreateMutable&apos; returns a Core Foundation object with a +1 retain count</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1634</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1634</integer>
-// CHECK-NEXT: <key>col</key><integer>29</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1634</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1634</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1634</integer>
+// CHECK-NEXT: <key>line</key><integer>1644</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22669,24 +20675,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1634</integer>
+// CHECK-NEXT: <key>line</key><integer>1644</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1634</integer>
+// CHECK-NEXT: <key>line</key><integer>1644</integer>
// CHECK-NEXT: <key>col</key><integer>60</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1634</integer>
+// CHECK-NEXT: <key>line</key><integer>1644</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1634</integer>
+// CHECK-NEXT: <key>line</key><integer>1644</integer>
// CHECK-NEXT: <key>col</key><integer>60</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22702,7 +20708,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1634</integer>
+// CHECK-NEXT: <key>line</key><integer>1644</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22710,12 +20716,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1634</integer>
+// CHECK-NEXT: <key>line</key><integer>1644</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1634</integer>
+// CHECK-NEXT: <key>line</key><integer>1644</integer>
// CHECK-NEXT: <key>col</key><integer>60</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22736,7 +20742,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1634</integer>
+// CHECK-NEXT: <key>line</key><integer>1644</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22745,44 +20751,10 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1646</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1646</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1646</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1646</integer>
-// CHECK-NEXT: <key>col</key><integer>29</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1646</integer>
+// CHECK-NEXT: <key>line</key><integer>1656</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22790,12 +20762,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1646</integer>
+// CHECK-NEXT: <key>line</key><integer>1656</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1646</integer>
+// CHECK-NEXT: <key>line</key><integer>1656</integer>
// CHECK-NEXT: <key>col</key><integer>60</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22808,44 +20780,10 @@ void foo() {
// CHECK-NEXT: <string>Call to function &apos;CFArrayCreateMutable&apos; returns a Core Foundation object with a +1 retain count</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1646</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1646</integer>
-// CHECK-NEXT: <key>col</key><integer>29</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1646</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1646</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1646</integer>
+// CHECK-NEXT: <key>line</key><integer>1656</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22853,24 +20791,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1646</integer>
+// CHECK-NEXT: <key>line</key><integer>1656</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1646</integer>
+// CHECK-NEXT: <key>line</key><integer>1656</integer>
// CHECK-NEXT: <key>col</key><integer>60</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1646</integer>
+// CHECK-NEXT: <key>line</key><integer>1656</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1646</integer>
+// CHECK-NEXT: <key>line</key><integer>1656</integer>
// CHECK-NEXT: <key>col</key><integer>60</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22886,7 +20824,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1646</integer>
+// CHECK-NEXT: <key>line</key><integer>1656</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22894,12 +20832,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1646</integer>
+// CHECK-NEXT: <key>line</key><integer>1656</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1646</integer>
+// CHECK-NEXT: <key>line</key><integer>1656</integer>
// CHECK-NEXT: <key>col</key><integer>60</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22920,7 +20858,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1646</integer>
+// CHECK-NEXT: <key>line</key><integer>1656</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22936,12 +20874,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1666</integer>
+// CHECK-NEXT: <key>line</key><integer>1676</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1666</integer>
+// CHECK-NEXT: <key>line</key><integer>1676</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -22949,50 +20887,16 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1667</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1667</integer>
-// CHECK-NEXT: <key>col</key><integer>11</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1667</integer>
+// CHECK-NEXT: <key>line</key><integer>1677</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1667</integer>
+// CHECK-NEXT: <key>line</key><integer>1677</integer>
// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1667</integer>
-// CHECK-NEXT: <key>col</key><integer>24</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1667</integer>
-// CHECK-NEXT: <key>col</key><integer>35</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -23000,7 +20904,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1667</integer>
+// CHECK-NEXT: <key>line</key><integer>1677</integer>
// CHECK-NEXT: <key>col</key><integer>24</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23008,12 +20912,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1667</integer>
+// CHECK-NEXT: <key>line</key><integer>1677</integer>
// CHECK-NEXT: <key>col</key><integer>24</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1667</integer>
+// CHECK-NEXT: <key>line</key><integer>1677</integer>
// CHECK-NEXT: <key>col</key><integer>41</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23033,25 +20937,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1667</integer>
-// CHECK-NEXT: <key>col</key><integer>24</integer>
+// CHECK-NEXT: <key>line</key><integer>1677</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1667</integer>
-// CHECK-NEXT: <key>col</key><integer>35</integer>
+// CHECK-NEXT: <key>line</key><integer>1677</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1668</integer>
+// CHECK-NEXT: <key>line</key><integer>1678</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1668</integer>
+// CHECK-NEXT: <key>line</key><integer>1678</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23063,7 +20967,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1668</integer>
+// CHECK-NEXT: <key>line</key><integer>1678</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23079,10 +20983,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>rdar6582778</string>
-// CHECK-NEXT: <key>issue_hash</key><string>3</string>
+// CHECK-NEXT: <key>issue_hash</key><string>2</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1668</integer>
+// CHECK-NEXT: <key>line</key><integer>1678</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23098,12 +21002,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1692</integer>
+// CHECK-NEXT: <key>line</key><integer>1702</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1692</integer>
+// CHECK-NEXT: <key>line</key><integer>1702</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23111,50 +21015,16 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1694</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1694</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1694</integer>
+// CHECK-NEXT: <key>line</key><integer>1704</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1694</integer>
+// CHECK-NEXT: <key>line</key><integer>1704</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1694</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1694</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -23162,7 +21032,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1694</integer>
+// CHECK-NEXT: <key>line</key><integer>1704</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23170,12 +21040,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1694</integer>
+// CHECK-NEXT: <key>line</key><integer>1704</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1694</integer>
+// CHECK-NEXT: <key>line</key><integer>1704</integer>
// CHECK-NEXT: <key>col</key><integer>64</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23195,25 +21065,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1694</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
+// CHECK-NEXT: <key>line</key><integer>1704</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1694</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
+// CHECK-NEXT: <key>line</key><integer>1704</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1695</integer>
+// CHECK-NEXT: <key>line</key><integer>1705</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1695</integer>
+// CHECK-NEXT: <key>line</key><integer>1705</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23225,7 +21095,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1695</integer>
+// CHECK-NEXT: <key>line</key><integer>1705</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23233,24 +21103,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1695</integer>
+// CHECK-NEXT: <key>line</key><integer>1705</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1695</integer>
+// CHECK-NEXT: <key>line</key><integer>1705</integer>
// CHECK-NEXT: <key>col</key><integer>18</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1695</integer>
+// CHECK-NEXT: <key>line</key><integer>1705</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1695</integer>
+// CHECK-NEXT: <key>line</key><integer>1705</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23270,12 +21140,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1695</integer>
+// CHECK-NEXT: <key>line</key><integer>1705</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1695</integer>
+// CHECK-NEXT: <key>line</key><integer>1705</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23283,12 +21153,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1697</integer>
+// CHECK-NEXT: <key>line</key><integer>1707</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1697</integer>
+// CHECK-NEXT: <key>line</key><integer>1707</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23304,12 +21174,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1697</integer>
+// CHECK-NEXT: <key>line</key><integer>1707</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1697</integer>
+// CHECK-NEXT: <key>line</key><integer>1707</integer>
// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23317,12 +21187,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1697</integer>
+// CHECK-NEXT: <key>line</key><integer>1707</integer>
// CHECK-NEXT: <key>col</key><integer>27</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1697</integer>
+// CHECK-NEXT: <key>line</key><integer>1707</integer>
// CHECK-NEXT: <key>col</key><integer>27</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23334,7 +21204,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1697</integer>
+// CHECK-NEXT: <key>line</key><integer>1707</integer>
// CHECK-NEXT: <key>col</key><integer>27</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23342,12 +21212,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1697</integer>
+// CHECK-NEXT: <key>line</key><integer>1707</integer>
// CHECK-NEXT: <key>col</key><integer>28</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1697</integer>
+// CHECK-NEXT: <key>line</key><integer>1707</integer>
// CHECK-NEXT: <key>col</key><integer>33</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23368,7 +21238,7 @@ void foo() {
// CHECK-NEXT: <key>issue_hash</key><string>6</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1697</integer>
+// CHECK-NEXT: <key>line</key><integer>1707</integer>
// CHECK-NEXT: <key>col</key><integer>27</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23384,46 +21254,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1816</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1816</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1817</integer>
-// CHECK-NEXT: <key>col</key><integer>9</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1817</integer>
-// CHECK-NEXT: <key>col</key><integer>16</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1817</integer>
+// CHECK-NEXT: <key>line</key><integer>1834</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1817</integer>
+// CHECK-NEXT: <key>line</key><integer>1834</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23431,50 +21267,16 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1818</integer>
-// CHECK-NEXT: <key>col</key><integer>9</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1818</integer>
-// CHECK-NEXT: <key>col</key><integer>15</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1818</integer>
+// CHECK-NEXT: <key>line</key><integer>1835</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1818</integer>
+// CHECK-NEXT: <key>line</key><integer>1835</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1818</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1818</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
@@ -23482,7 +21284,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1818</integer>
+// CHECK-NEXT: <key>line</key><integer>1835</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23490,12 +21292,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1818</integer>
+// CHECK-NEXT: <key>line</key><integer>1835</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1818</integer>
+// CHECK-NEXT: <key>line</key><integer>1835</integer>
// CHECK-NEXT: <key>col</key><integer>66</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23515,25 +21317,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1818</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
+// CHECK-NEXT: <key>line</key><integer>1835</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1818</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
+// CHECK-NEXT: <key>line</key><integer>1835</integer>
+// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1821</integer>
+// CHECK-NEXT: <key>line</key><integer>1838</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1821</integer>
+// CHECK-NEXT: <key>line</key><integer>1838</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23545,7 +21347,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1821</integer>
+// CHECK-NEXT: <key>line</key><integer>1838</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23553,12 +21355,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1821</integer>
+// CHECK-NEXT: <key>line</key><integer>1838</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1821</integer>
+// CHECK-NEXT: <key>line</key><integer>1838</integer>
// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23576,10 +21378,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>test_objc_arrays</string>
-// CHECK-NEXT: <key>issue_hash</key><string>6</string>
+// CHECK-NEXT: <key>issue_hash</key><string>3</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1821</integer>
+// CHECK-NEXT: <key>line</key><integer>1838</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23595,26 +21397,26 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1816</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>line</key><integer>1834</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1816</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>line</key><integer>1834</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1817</integer>
+// CHECK-NEXT: <key>line</key><integer>1838</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1817</integer>
-// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>line</key><integer>1838</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -23629,26 +21431,26 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1817</integer>
+// CHECK-NEXT: <key>line</key><integer>1838</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1817</integer>
-// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>line</key><integer>1838</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1827</integer>
+// CHECK-NEXT: <key>line</key><integer>1842</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1827</integer>
-// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>line</key><integer>1842</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -23663,26 +21465,26 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1827</integer>
+// CHECK-NEXT: <key>line</key><integer>1842</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1827</integer>
-// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>line</key><integer>1842</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1827</integer>
-// CHECK-NEXT: <key>col</key><integer>23</integer>
+// CHECK-NEXT: <key>line</key><integer>1844</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1827</integer>
-// CHECK-NEXT: <key>col</key><integer>23</integer>
+// CHECK-NEXT: <key>line</key><integer>1844</integer>
+// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -23693,7 +21495,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1827</integer>
+// CHECK-NEXT: <key>line</key><integer>1844</integer>
// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23701,12 +21503,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1827</integer>
+// CHECK-NEXT: <key>line</key><integer>1844</integer>
// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1827</integer>
+// CHECK-NEXT: <key>line</key><integer>1844</integer>
// CHECK-NEXT: <key>col</key><integer>56</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23726,25 +21528,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1827</integer>
-// CHECK-NEXT: <key>col</key><integer>23</integer>
+// CHECK-NEXT: <key>line</key><integer>1844</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1827</integer>
-// CHECK-NEXT: <key>col</key><integer>23</integer>
+// CHECK-NEXT: <key>line</key><integer>1844</integer>
+// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1830</integer>
+// CHECK-NEXT: <key>line</key><integer>1847</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1830</integer>
+// CHECK-NEXT: <key>line</key><integer>1847</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23756,7 +21558,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1830</integer>
+// CHECK-NEXT: <key>line</key><integer>1847</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23764,12 +21566,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1830</integer>
+// CHECK-NEXT: <key>line</key><integer>1847</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1830</integer>
+// CHECK-NEXT: <key>line</key><integer>1847</integer>
// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23787,10 +21589,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>test_objc_arrays</string>
-// CHECK-NEXT: <key>issue_hash</key><string>15</string>
+// CHECK-NEXT: <key>issue_hash</key><string>12</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1830</integer>
+// CHECK-NEXT: <key>line</key><integer>1847</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23806,25 +21608,59 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1816</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>line</key><integer>1834</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1816</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>line</key><integer>1834</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1838</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1838</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1838</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1838</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1817</integer>
+// CHECK-NEXT: <key>line</key><integer>1842</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1817</integer>
+// CHECK-NEXT: <key>line</key><integer>1842</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23840,12 +21676,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1817</integer>
+// CHECK-NEXT: <key>line</key><integer>1842</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1817</integer>
+// CHECK-NEXT: <key>line</key><integer>1842</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23853,12 +21689,80 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1835</integer>
+// CHECK-NEXT: <key>line</key><integer>1847</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1835</integer>
+// CHECK-NEXT: <key>line</key><integer>1847</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1847</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1847</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1851</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1851</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1851</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1851</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1852</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1852</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23874,12 +21778,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1835</integer>
+// CHECK-NEXT: <key>line</key><integer>1852</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1835</integer>
+// CHECK-NEXT: <key>line</key><integer>1852</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23887,12 +21791,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1835</integer>
+// CHECK-NEXT: <key>line</key><integer>1852</integer>
// CHECK-NEXT: <key>col</key><integer>24</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1835</integer>
+// CHECK-NEXT: <key>line</key><integer>1852</integer>
// CHECK-NEXT: <key>col</key><integer>24</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23904,7 +21808,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1835</integer>
+// CHECK-NEXT: <key>line</key><integer>1852</integer>
// CHECK-NEXT: <key>col</key><integer>24</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23912,12 +21816,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1835</integer>
+// CHECK-NEXT: <key>line</key><integer>1852</integer>
// CHECK-NEXT: <key>col</key><integer>24</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1835</integer>
+// CHECK-NEXT: <key>line</key><integer>1852</integer>
// CHECK-NEXT: <key>col</key><integer>27</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23930,44 +21834,10 @@ void foo() {
// CHECK-NEXT: <string>NSArray literal is an object with a +0 retain count</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1835</integer>
-// CHECK-NEXT: <key>col</key><integer>24</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1835</integer>
-// CHECK-NEXT: <key>col</key><integer>24</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1835</integer>
-// CHECK-NEXT: <key>col</key><integer>23</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1835</integer>
-// CHECK-NEXT: <key>col</key><integer>23</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1835</integer>
+// CHECK-NEXT: <key>line</key><integer>1852</integer>
// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -23975,24 +21845,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1835</integer>
+// CHECK-NEXT: <key>line</key><integer>1852</integer>
// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1835</integer>
+// CHECK-NEXT: <key>line</key><integer>1852</integer>
// CHECK-NEXT: <key>col</key><integer>35</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1835</integer>
+// CHECK-NEXT: <key>line</key><integer>1852</integer>
// CHECK-NEXT: <key>col</key><integer>24</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1835</integer>
+// CHECK-NEXT: <key>line</key><integer>1852</integer>
// CHECK-NEXT: <key>col</key><integer>27</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24012,12 +21882,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1835</integer>
+// CHECK-NEXT: <key>line</key><integer>1852</integer>
// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1835</integer>
+// CHECK-NEXT: <key>line</key><integer>1852</integer>
// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24025,12 +21895,46 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1838</integer>
+// CHECK-NEXT: <key>line</key><integer>1852</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1838</integer>
+// CHECK-NEXT: <key>line</key><integer>1852</integer>
+// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1852</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1852</integer>
+// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1855</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1855</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24042,7 +21946,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1838</integer>
+// CHECK-NEXT: <key>line</key><integer>1855</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24050,12 +21954,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1838</integer>
+// CHECK-NEXT: <key>line</key><integer>1855</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1838</integer>
+// CHECK-NEXT: <key>line</key><integer>1855</integer>
// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24073,10 +21977,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>test_objc_arrays</string>
-// CHECK-NEXT: <key>issue_hash</key><string>23</string>
+// CHECK-NEXT: <key>issue_hash</key><string>20</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1838</integer>
+// CHECK-NEXT: <key>line</key><integer>1855</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24092,25 +21996,59 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1816</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>line</key><integer>1834</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1816</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>line</key><integer>1834</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1838</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1838</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1838</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1838</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1817</integer>
+// CHECK-NEXT: <key>line</key><integer>1842</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1817</integer>
+// CHECK-NEXT: <key>line</key><integer>1842</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24126,12 +22064,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1817</integer>
+// CHECK-NEXT: <key>line</key><integer>1842</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1817</integer>
+// CHECK-NEXT: <key>line</key><integer>1842</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24139,13 +22077,13 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1843</integer>
+// CHECK-NEXT: <key>line</key><integer>1847</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1843</integer>
-// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>line</key><integer>1847</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -24160,26 +22098,128 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1843</integer>
+// CHECK-NEXT: <key>line</key><integer>1847</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1843</integer>
-// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>line</key><integer>1847</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1843</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
+// CHECK-NEXT: <key>line</key><integer>1851</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1843</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
+// CHECK-NEXT: <key>line</key><integer>1851</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1851</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1851</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1855</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1855</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1855</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1855</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1859</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1859</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1859</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1859</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1860</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1860</integer>
+// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -24190,7 +22230,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1843</integer>
+// CHECK-NEXT: <key>line</key><integer>1860</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24198,12 +22238,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1843</integer>
+// CHECK-NEXT: <key>line</key><integer>1860</integer>
// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1843</integer>
+// CHECK-NEXT: <key>line</key><integer>1860</integer>
// CHECK-NEXT: <key>col</key><integer>57</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24223,25 +22263,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1843</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
+// CHECK-NEXT: <key>line</key><integer>1860</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1843</integer>
-// CHECK-NEXT: <key>col</key><integer>22</integer>
+// CHECK-NEXT: <key>line</key><integer>1860</integer>
+// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1847</integer>
+// CHECK-NEXT: <key>line</key><integer>1864</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1847</integer>
+// CHECK-NEXT: <key>line</key><integer>1864</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24253,7 +22293,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1847</integer>
+// CHECK-NEXT: <key>line</key><integer>1864</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24261,12 +22301,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1847</integer>
+// CHECK-NEXT: <key>line</key><integer>1864</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1847</integer>
+// CHECK-NEXT: <key>line</key><integer>1864</integer>
// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24284,10 +22324,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>test_objc_arrays</string>
-// CHECK-NEXT: <key>issue_hash</key><string>32</string>
+// CHECK-NEXT: <key>issue_hash</key><string>28</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1847</integer>
+// CHECK-NEXT: <key>line</key><integer>1864</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24303,25 +22343,59 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1816</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>line</key><integer>1834</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1816</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>line</key><integer>1834</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1838</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1838</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1838</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1838</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1817</integer>
+// CHECK-NEXT: <key>line</key><integer>1842</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1817</integer>
+// CHECK-NEXT: <key>line</key><integer>1842</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24337,12 +22411,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1817</integer>
+// CHECK-NEXT: <key>line</key><integer>1842</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1817</integer>
+// CHECK-NEXT: <key>line</key><integer>1842</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24350,12 +22424,216 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1852</integer>
+// CHECK-NEXT: <key>line</key><integer>1847</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1852</integer>
+// CHECK-NEXT: <key>line</key><integer>1847</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1847</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1847</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1851</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1851</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1851</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1851</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1855</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1855</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1855</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1855</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1859</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1859</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1859</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1859</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1864</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1864</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1864</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1864</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1868</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1868</integer>
+// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1868</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1868</integer>
+// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1869</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1869</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24371,12 +22649,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1852</integer>
+// CHECK-NEXT: <key>line</key><integer>1869</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1852</integer>
+// CHECK-NEXT: <key>line</key><integer>1869</integer>
// CHECK-NEXT: <key>col</key><integer>20</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24384,12 +22662,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1852</integer>
+// CHECK-NEXT: <key>line</key><integer>1869</integer>
// CHECK-NEXT: <key>col</key><integer>28</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1852</integer>
+// CHECK-NEXT: <key>line</key><integer>1869</integer>
// CHECK-NEXT: <key>col</key><integer>28</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24401,7 +22679,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1852</integer>
+// CHECK-NEXT: <key>line</key><integer>1869</integer>
// CHECK-NEXT: <key>col</key><integer>28</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24409,12 +22687,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1852</integer>
+// CHECK-NEXT: <key>line</key><integer>1869</integer>
// CHECK-NEXT: <key>col</key><integer>28</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1852</integer>
+// CHECK-NEXT: <key>line</key><integer>1869</integer>
// CHECK-NEXT: <key>col</key><integer>35</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24427,44 +22705,10 @@ void foo() {
// CHECK-NEXT: <string>NSDictionary literal is an object with a +0 retain count</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>kind</key><string>control</string>
-// CHECK-NEXT: <key>edges</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>start</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1852</integer>
-// CHECK-NEXT: <key>col</key><integer>28</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1852</integer>
-// CHECK-NEXT: <key>col</key><integer>28</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>end</key>
-// CHECK-NEXT: <array>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1852</integer>
-// CHECK-NEXT: <key>col</key><integer>27</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1852</integer>
-// CHECK-NEXT: <key>col</key><integer>27</integer>
-// CHECK-NEXT: <key>file</key><integer>0</integer>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: </array>
-// CHECK-NEXT: </dict>
-// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1852</integer>
+// CHECK-NEXT: <key>line</key><integer>1869</integer>
// CHECK-NEXT: <key>col</key><integer>27</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24472,24 +22716,24 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1852</integer>
+// CHECK-NEXT: <key>line</key><integer>1869</integer>
// CHECK-NEXT: <key>col</key><integer>27</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1852</integer>
+// CHECK-NEXT: <key>line</key><integer>1869</integer>
// CHECK-NEXT: <key>col</key><integer>43</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1852</integer>
+// CHECK-NEXT: <key>line</key><integer>1869</integer>
// CHECK-NEXT: <key>col</key><integer>28</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1852</integer>
+// CHECK-NEXT: <key>line</key><integer>1869</integer>
// CHECK-NEXT: <key>col</key><integer>35</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24509,12 +22753,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1852</integer>
+// CHECK-NEXT: <key>line</key><integer>1869</integer>
// CHECK-NEXT: <key>col</key><integer>27</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1852</integer>
+// CHECK-NEXT: <key>line</key><integer>1869</integer>
// CHECK-NEXT: <key>col</key><integer>27</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24522,12 +22766,46 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1856</integer>
+// CHECK-NEXT: <key>line</key><integer>1869</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1869</integer>
+// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1869</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1869</integer>
+// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1873</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1856</integer>
+// CHECK-NEXT: <key>line</key><integer>1873</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24539,7 +22817,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1856</integer>
+// CHECK-NEXT: <key>line</key><integer>1873</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24547,12 +22825,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1856</integer>
+// CHECK-NEXT: <key>line</key><integer>1873</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1856</integer>
+// CHECK-NEXT: <key>line</key><integer>1873</integer>
// CHECK-NEXT: <key>col</key><integer>23</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24570,10 +22848,10 @@ void foo() {
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
// CHECK-NEXT: <key>issue_context</key><string>test_objc_arrays</string>
-// CHECK-NEXT: <key>issue_hash</key><string>41</string>
+// CHECK-NEXT: <key>issue_hash</key><string>37</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1856</integer>
+// CHECK-NEXT: <key>line</key><integer>1873</integer>
// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24589,12 +22867,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1861</integer>
+// CHECK-NEXT: <key>line</key><integer>1878</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1861</integer>
+// CHECK-NEXT: <key>line</key><integer>1878</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24602,12 +22880,12 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1861</integer>
+// CHECK-NEXT: <key>line</key><integer>1878</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1861</integer>
+// CHECK-NEXT: <key>line</key><integer>1878</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24619,7 +22897,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1861</integer>
+// CHECK-NEXT: <key>line</key><integer>1878</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24627,12 +22905,12 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1861</integer>
+// CHECK-NEXT: <key>line</key><integer>1878</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1861</integer>
+// CHECK-NEXT: <key>line</key><integer>1878</integer>
// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24645,6 +22923,47 @@ void foo() {
// CHECK-NEXT: <string>NSNumber literal is an object with a +0 retain count</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1878</integer>
+// CHECK-NEXT: <key>col</key><integer>14</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1878</integer>
+// CHECK-NEXT: <key>col</key><integer>14</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1878</integer>
+// CHECK-NEXT: <key>col</key><integer>24</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1878</integer>
+// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1878</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Reference count incremented. The object now has a +1 retain count</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Reference count incremented. The object now has a +1 retain count</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
@@ -24652,26 +22971,159 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1861</integer>
-// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>line</key><integer>1878</integer>
+// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1861</integer>
-// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>line</key><integer>1878</integer>
+// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1861</integer>
-// CHECK-NEXT: <key>col</key><integer>14</integer>
+// CHECK-NEXT: <key>line</key><integer>1878</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1861</integer>
-// CHECK-NEXT: <key>col</key><integer>14</integer>
+// CHECK-NEXT: <key>line</key><integer>1878</integer>
+// CHECK-NEXT: <key>col</key><integer>4</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1878</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1878</integer>
+// CHECK-NEXT: <key>col</key><integer>4</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1879</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1879</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1879</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1879</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1880</integer>
+// CHECK-NEXT: <key>col</key><integer>1</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1880</integer>
+// CHECK-NEXT: <key>col</key><integer>1</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1880</integer>
+// CHECK-NEXT: <key>col</key><integer>1</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Object leaked: object allocated and stored into &apos;value&apos; is not referenced later in this execution path and has a retain count of +1</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Object leaked: object allocated and stored into &apos;value&apos; is not referenced later in this execution path and has a retain count of +1</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>description</key><string>Potential leak of an object stored into &apos;value&apos;</string>
+// CHECK-NEXT: <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+// CHECK-NEXT: <key>type</key><string>Leak</string>
+// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
+// CHECK-NEXT: <key>issue_context</key><string>test_objc_integer_literals</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1880</integer>
+// CHECK-NEXT: <key>col</key><integer>1</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>path</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1883</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1883</integer>
+// CHECK-NEXT: <key>col</key><integer>4</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1883</integer>
+// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1883</integer>
+// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -24682,7 +23134,36 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1861</integer>
+// CHECK-NEXT: <key>line</key><integer>1883</integer>
+// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1883</integer>
+// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1883</integer>
+// CHECK-NEXT: <key>col</key><integer>18</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>NSNumber boxed expression produces an object with a +0 retain count</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>NSNumber boxed expression produces an object with a +0 retain count</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1883</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24690,25 +23171,25 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1861</integer>
+// CHECK-NEXT: <key>line</key><integer>1883</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1861</integer>
-// CHECK-NEXT: <key>col</key><integer>24</integer>
+// CHECK-NEXT: <key>line</key><integer>1883</integer>
+// CHECK-NEXT: <key>col</key><integer>26</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1861</integer>
+// CHECK-NEXT: <key>line</key><integer>1883</integer>
// CHECK-NEXT: <key>col</key><integer>15</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1861</integer>
-// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>line</key><integer>1883</integer>
+// CHECK-NEXT: <key>col</key><integer>18</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -24727,12 +23208,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1861</integer>
+// CHECK-NEXT: <key>line</key><integer>1883</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1861</integer>
+// CHECK-NEXT: <key>line</key><integer>1883</integer>
// CHECK-NEXT: <key>col</key><integer>14</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24740,12 +23221,332 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1863</integer>
+// CHECK-NEXT: <key>line</key><integer>1883</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1883</integer>
+// CHECK-NEXT: <key>col</key><integer>4</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1883</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1883</integer>
+// CHECK-NEXT: <key>col</key><integer>4</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1887</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1887</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1887</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1887</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1887</integer>
+// CHECK-NEXT: <key>col</key><integer>21</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Object leaked: object allocated and stored into &apos;value&apos; is not referenced later in this execution path and has a retain count of +1</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Object leaked: object allocated and stored into &apos;value&apos; is not referenced later in this execution path and has a retain count of +1</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>description</key><string>Potential leak of an object stored into &apos;value&apos;</string>
+// CHECK-NEXT: <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+// CHECK-NEXT: <key>type</key><string>Leak</string>
+// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
+// CHECK-NEXT: <key>issue_context</key><string>test_objc_boxed_expressions</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1887</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>path</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1883</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1883</integer>
+// CHECK-NEXT: <key>col</key><integer>4</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1886</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1886</integer>
+// CHECK-NEXT: <key>col</key><integer>7</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1886</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1886</integer>
+// CHECK-NEXT: <key>col</key><integer>7</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1886</integer>
+// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1886</integer>
+// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1886</integer>
+// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1886</integer>
+// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1886</integer>
+// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>NSString boxed expression produces an object with a +0 retain count</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>NSString boxed expression produces an object with a +0 retain count</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1886</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1886</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1886</integer>
+// CHECK-NEXT: <key>col</key><integer>23</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1886</integer>
+// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1886</integer>
+// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Reference count incremented. The object now has a +1 retain count</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Reference count incremented. The object now has a +1 retain count</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1886</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1886</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1886</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1886</integer>
+// CHECK-NEXT: <key>col</key><integer>7</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1886</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1886</integer>
+// CHECK-NEXT: <key>col</key><integer>7</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1887</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1887</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1887</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1887</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1888</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1863</integer>
+// CHECK-NEXT: <key>line</key><integer>1888</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24757,7 +23558,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1863</integer>
+// CHECK-NEXT: <key>line</key><integer>1888</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24772,11 +23573,11 @@ void foo() {
// CHECK-NEXT: <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
-// CHECK-NEXT: <key>issue_context</key><string>test_objc_integer_literals</string>
-// CHECK-NEXT: <key>issue_hash</key><string>3</string>
+// CHECK-NEXT: <key>issue_context</key><string>test_objc_boxed_expressions</string>
+// CHECK-NEXT: <key>issue_hash</key><string>4</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1863</integer>
+// CHECK-NEXT: <key>line</key><integer>1888</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -24792,26 +23593,60 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1866</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>line</key><integer>1894</integer>
+// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1866</integer>
-// CHECK-NEXT: <key>col</key><integer>4</integer>
+// CHECK-NEXT: <key>line</key><integer>1894</integer>
+// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1866</integer>
-// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>line</key><integer>1895</integer>
+// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1866</integer>
-// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>line</key><integer>1895</integer>
+// CHECK-NEXT: <key>col</key><integer>6</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1895</integer>
+// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1895</integer>
+// CHECK-NEXT: <key>col</key><integer>6</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1895</integer>
+// CHECK-NEXT: <key>col</key><integer>8</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1895</integer>
+// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -24822,30 +23657,30 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1866</integer>
-// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>line</key><integer>1895</integer>
+// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1866</integer>
-// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>line</key><integer>1895</integer>
+// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1866</integer>
-// CHECK-NEXT: <key>col</key><integer>18</integer>
+// CHECK-NEXT: <key>line</key><integer>1895</integer>
+// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
-// CHECK-NEXT: <string>NSNumber boxed expression produces an object with a +0 retain count</string>
+// CHECK-NEXT: <string>Assuming &apos;y&apos; is &lt;= 2</string>
// CHECK-NEXT: <key>message</key>
-// CHECK-NEXT: <string>NSNumber boxed expression produces an object with a +0 retain count</string>
+// CHECK-NEXT: <string>Assuming &apos;y&apos; is &lt;= 2</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
@@ -24855,26 +23690,26 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1866</integer>
-// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>line</key><integer>1895</integer>
+// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1866</integer>
-// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>line</key><integer>1895</integer>
+// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1866</integer>
-// CHECK-NEXT: <key>col</key><integer>14</integer>
+// CHECK-NEXT: <key>line</key><integer>1898</integer>
+// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1866</integer>
-// CHECK-NEXT: <key>col</key><integer>14</integer>
+// CHECK-NEXT: <key>line</key><integer>1898</integer>
+// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -24885,42 +23720,139 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1866</integer>
-// CHECK-NEXT: <key>col</key><integer>14</integer>
+// CHECK-NEXT: <key>line</key><integer>1898</integer>
+// CHECK-NEXT: <key>col</key><integer>21</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1866</integer>
-// CHECK-NEXT: <key>col</key><integer>14</integer>
+// CHECK-NEXT: <key>line</key><integer>1898</integer>
+// CHECK-NEXT: <key>col</key><integer>21</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1866</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
+// CHECK-NEXT: <key>line</key><integer>1898</integer>
+// CHECK-NEXT: <key>col</key><integer>43</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Method returns an Objective-C object with a +1 retain count</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Method returns an Objective-C object with a +1 retain count</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1898</integer>
+// CHECK-NEXT: <key>col</key><integer>7</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1898</integer>
+// CHECK-NEXT: <key>col</key><integer>17</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1899</integer>
+// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1899</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1899</integer>
+// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1899</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1900</integer>
+// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1900</integer>
+// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1900</integer>
+// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1900</integer>
+// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1900</integer>
+// CHECK-NEXT: <key>col</key><integer>25</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1866</integer>
-// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>line</key><integer>1900</integer>
+// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1866</integer>
-// CHECK-NEXT: <key>col</key><integer>18</integer>
+// CHECK-NEXT: <key>line</key><integer>1900</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
-// CHECK-NEXT: <string>Reference count incremented. The object now has a +1 retain count</string>
+// CHECK-NEXT: <string>Object released</string>
// CHECK-NEXT: <key>message</key>
-// CHECK-NEXT: <string>Reference count incremented. The object now has a +1 retain count</string>
+// CHECK-NEXT: <string>Object released</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
@@ -24930,26 +23862,26 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1866</integer>
-// CHECK-NEXT: <key>col</key><integer>14</integer>
+// CHECK-NEXT: <key>line</key><integer>1900</integer>
+// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1866</integer>
-// CHECK-NEXT: <key>col</key><integer>14</integer>
+// CHECK-NEXT: <key>line</key><integer>1900</integer>
+// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1870</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>line</key><integer>1901</integer>
+// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1870</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>line</key><integer>1901</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -24960,42 +23892,42 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1870</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>line</key><integer>1901</integer>
+// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1870</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>line</key><integer>1901</integer>
+// CHECK-NEXT: <key>col</key><integer>25</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1870</integer>
-// CHECK-NEXT: <key>col</key><integer>21</integer>
+// CHECK-NEXT: <key>line</key><integer>1901</integer>
+// CHECK-NEXT: <key>col</key><integer>35</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
-// CHECK-NEXT: <string>Object leaked: object allocated and stored into &apos;value&apos; is not referenced later in this execution path and has a retain count of +1</string>
+// CHECK-NEXT: <string>Reference-counted object is used after it is released</string>
// CHECK-NEXT: <key>message</key>
-// CHECK-NEXT: <string>Object leaked: object allocated and stored into &apos;value&apos; is not referenced later in this execution path and has a retain count of +1</string>
+// CHECK-NEXT: <string>Reference-counted object is used after it is released</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>description</key><string>Potential leak of an object stored into &apos;value&apos;</string>
+// CHECK-NEXT: <key>description</key><string>Reference-counted object is used after it is released</string>
// CHECK-NEXT: <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
-// CHECK-NEXT: <key>type</key><string>Leak</string>
+// CHECK-NEXT: <key>type</key><string>Use-after-release</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
-// CHECK-NEXT: <key>issue_context</key><string>test_objc_boxed_expressions</string>
-// CHECK-NEXT: <key>issue_hash</key><string>5</string>
+// CHECK-NEXT: <key>issue_context</key><string>rdar11400885</string>
+// CHECK-NEXT: <key>issue_hash</key><string>9</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1870</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>line</key><integer>1901</integer>
+// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
@@ -25010,12 +23942,12 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1866</integer>
+// CHECK-NEXT: <key>line</key><integer>1920</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1866</integer>
+// CHECK-NEXT: <key>line</key><integer>1920</integer>
// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -25023,13 +23955,13 @@ void foo() {
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1869</integer>
+// CHECK-NEXT: <key>line</key><integer>1928</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1869</integer>
-// CHECK-NEXT: <key>col</key><integer>7</integer>
+// CHECK-NEXT: <key>line</key><integer>1928</integer>
+// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -25037,6 +23969,35 @@ void foo() {
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1928</integer>
+// CHECK-NEXT: <key>col</key><integer>19</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1928</integer>
+// CHECK-NEXT: <key>col</key><integer>19</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1928</integer>
+// CHECK-NEXT: <key>col</key><integer>21</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>NSArray literal is an object with a +0 retain count</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>NSArray literal is an object with a +0 retain count</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
@@ -25044,26 +24005,26 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1869</integer>
+// CHECK-NEXT: <key>line</key><integer>1928</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1869</integer>
-// CHECK-NEXT: <key>col</key><integer>7</integer>
+// CHECK-NEXT: <key>line</key><integer>1928</integer>
+// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1869</integer>
-// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>line</key><integer>1929</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1869</integer>
-// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>line</key><integer>1929</integer>
+// CHECK-NEXT: <key>col</key><integer>24</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -25074,31 +24035,48 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1869</integer>
-// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>line</key><integer>1929</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1869</integer>
-// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>line</key><integer>1929</integer>
+// CHECK-NEXT: <key>col</key><integer>26</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1869</integer>
-// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>line</key><integer>1929</integer>
+// CHECK-NEXT: <key>col</key><integer>35</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
-// CHECK-NEXT: <string>NSString boxed expression produces an object with a +0 retain count</string>
+// CHECK-NEXT: <string>Incorrect decrement of the reference count of an object that is not owned at this point by the caller</string>
// CHECK-NEXT: <key>message</key>
-// CHECK-NEXT: <string>NSString boxed expression produces an object with a +0 retain count</string>
+// CHECK-NEXT: <string>Incorrect decrement of the reference count of an object that is not owned at this point by the caller</string>
// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>description</key><string>Incorrect decrement of the reference count of an object that is not owned at this point by the caller</string>
+// CHECK-NEXT: <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+// CHECK-NEXT: <key>type</key><string>Bad release</string>
+// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
+// CHECK-NEXT: <key>issue_context</key><string>testConsumeAndStopTracking</string>
+// CHECK-NEXT: <key>issue_hash</key><string>10</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1929</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>path</key>
+// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
@@ -25107,26 +24085,26 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1869</integer>
-// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>line</key><integer>1933</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1869</integer>
-// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>line</key><integer>1933</integer>
+// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1869</integer>
-// CHECK-NEXT: <key>col</key><integer>11</integer>
+// CHECK-NEXT: <key>line</key><integer>1941</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1869</integer>
-// CHECK-NEXT: <key>col</key><integer>11</integer>
+// CHECK-NEXT: <key>line</key><integer>1941</integer>
+// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -25137,42 +24115,139 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1869</integer>
-// CHECK-NEXT: <key>col</key><integer>11</integer>
+// CHECK-NEXT: <key>line</key><integer>1941</integer>
+// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1869</integer>
-// CHECK-NEXT: <key>col</key><integer>11</integer>
+// CHECK-NEXT: <key>line</key><integer>1941</integer>
+// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1869</integer>
-// CHECK-NEXT: <key>col</key><integer>23</integer>
+// CHECK-NEXT: <key>line</key><integer>1941</integer>
+// CHECK-NEXT: <key>col</key><integer>21</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>NSArray literal is an object with a +0 retain count</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>NSArray literal is an object with a +0 retain count</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1941</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1941</integer>
+// CHECK-NEXT: <key>col</key><integer>4</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1942</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1942</integer>
+// CHECK-NEXT: <key>col</key><integer>26</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1942</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1869</integer>
-// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>line</key><integer>1942</integer>
+// CHECK-NEXT: <key>col</key><integer>28</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1869</integer>
-// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>line</key><integer>1942</integer>
+// CHECK-NEXT: <key>col</key><integer>48</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
-// CHECK-NEXT: <string>Reference count incremented. The object now has a +1 retain count</string>
+// CHECK-NEXT: <string>Incorrect decrement of the reference count of an object that is not owned at this point by the caller</string>
// CHECK-NEXT: <key>message</key>
-// CHECK-NEXT: <string>Reference count incremented. The object now has a +1 retain count</string>
+// CHECK-NEXT: <string>Incorrect decrement of the reference count of an object that is not owned at this point by the caller</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>description</key><string>Incorrect decrement of the reference count of an object that is not owned at this point by the caller</string>
+// CHECK-NEXT: <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+// CHECK-NEXT: <key>type</key><string>Bad release</string>
+// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
+// CHECK-NEXT: <key>issue_context</key><string>testCFConsumeAndStopTracking</string>
+// CHECK-NEXT: <key>issue_hash</key><string>10</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1942</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>path</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1954</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1954</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1954</integer>
+// CHECK-NEXT: <key>col</key><integer>31</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Call to function &apos;CreateMyCFType&apos; returns a Core Foundation object with a +1 retain count</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Call to function &apos;CreateMyCFType&apos; returns a Core Foundation object with a +1 retain count</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
@@ -25182,25 +24257,25 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1869</integer>
-// CHECK-NEXT: <key>col</key><integer>11</integer>
+// CHECK-NEXT: <key>line</key><integer>1954</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1869</integer>
-// CHECK-NEXT: <key>col</key><integer>11</integer>
+// CHECK-NEXT: <key>line</key><integer>1954</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1871</integer>
+// CHECK-NEXT: <key>line</key><integer>1955</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1871</integer>
+// CHECK-NEXT: <key>line</key><integer>1955</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -25212,26 +24287,26 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1871</integer>
+// CHECK-NEXT: <key>line</key><integer>1955</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
-// CHECK-NEXT: <string>Object leaked: object allocated and stored into &apos;value&apos; is not referenced later in this execution path and has a retain count of +1</string>
+// CHECK-NEXT: <string>Object leaked: object allocated and stored into &apos;x&apos; is not referenced later in this execution path and has a retain count of +1</string>
// CHECK-NEXT: <key>message</key>
-// CHECK-NEXT: <string>Object leaked: object allocated and stored into &apos;value&apos; is not referenced later in this execution path and has a retain count of +1</string>
+// CHECK-NEXT: <string>Object leaked: object allocated and stored into &apos;x&apos; is not referenced later in this execution path and has a retain count of +1</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>description</key><string>Potential leak of an object stored into &apos;value&apos;</string>
+// CHECK-NEXT: <key>description</key><string>Potential leak of an object stored into &apos;x&apos;</string>
// CHECK-NEXT: <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
-// CHECK-NEXT: <key>issue_context</key><string>test_objc_boxed_expressions</string>
-// CHECK-NEXT: <key>issue_hash</key><string>6</string>
+// CHECK-NEXT: <key>issue_context</key><string>test_custom_cf</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1871</integer>
+// CHECK-NEXT: <key>line</key><integer>1955</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -25240,6 +24315,35 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1989</integer>
+// CHECK-NEXT: <key>col</key><integer>18</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1989</integer>
+// CHECK-NEXT: <key>col</key><integer>18</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1989</integer>
+// CHECK-NEXT: <key>col</key><integer>29</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Call to function &apos;makeCustom&apos; returns a Core Foundation object with a +1 retain count</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Call to function &apos;makeCustom&apos; returns a Core Foundation object with a +1 retain count</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
@@ -25247,26 +24351,166 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1876</integer>
+// CHECK-NEXT: <key>line</key><integer>1989</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1876</integer>
+// CHECK-NEXT: <key>line</key><integer>1989</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1990</integer>
+// CHECK-NEXT: <key>col</key><integer>1</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1990</integer>
+// CHECK-NEXT: <key>col</key><integer>1</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1990</integer>
+// CHECK-NEXT: <key>col</key><integer>1</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Object leaked: object allocated and stored into &apos;obj&apos; is not referenced later in this execution path and has a retain count of +1</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Object leaked: object allocated and stored into &apos;obj&apos; is not referenced later in this execution path and has a retain count of +1</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>description</key><string>Potential leak of an object stored into &apos;obj&apos;</string>
+// CHECK-NEXT: <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+// CHECK-NEXT: <key>type</key><string>Leak</string>
+// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
+// CHECK-NEXT: <key>issue_context</key><string>testCustomReturnsRetained</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1990</integer>
+// CHECK-NEXT: <key>col</key><integer>1</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>path</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1993</integer>
+// CHECK-NEXT: <key>col</key><integer>13</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1993</integer>
+// CHECK-NEXT: <key>col</key><integer>13</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1993</integer>
+// CHECK-NEXT: <key>col</key><integer>23</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Call to function &apos;getCustom&apos; returns a Core Foundation object with a +0 retain count</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Call to function &apos;getCustom&apos; returns a Core Foundation object with a +0 retain count</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1993</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1993</integer>
+// CHECK-NEXT: <key>col</key><integer>13</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1993</integer>
+// CHECK-NEXT: <key>col</key><integer>23</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Incorrect decrement of the reference count of an object that is not owned at this point by the caller</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Incorrect decrement of the reference count of an object that is not owned at this point by the caller</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>description</key><string>Incorrect decrement of the reference count of an object that is not owned at this point by the caller</string>
+// CHECK-NEXT: <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+// CHECK-NEXT: <key>type</key><string>Bad release</string>
+// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
+// CHECK-NEXT: <key>issue_context</key><string>testCustomReturnsNotRetained</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>1993</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>path</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2012</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2012</integer>
+// CHECK-NEXT: <key>col</key><integer>4</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1877</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>line</key><integer>2012</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1877</integer>
-// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>line</key><integer>2012</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -25274,6 +24518,78 @@ void foo() {
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2012</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2012</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2012</integer>
+// CHECK-NEXT: <key>col</key><integer>31</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Method returns an Objective-C object with a +1 retain count</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Method returns an Objective-C object with a +1 retain count</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2012</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2012</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2012</integer>
+// CHECK-NEXT: <key>col</key><integer>38</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Calling &apos;initX&apos;</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Calling &apos;initX&apos;</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2005</integer>
+// CHECK-NEXT: <key>col</key><integer>1</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>depth</key><integer>1</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Entered call from &apos;test12706177&apos;</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Entered call from &apos;test12706177&apos;</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
@@ -25281,26 +24597,26 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1877</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>line</key><integer>2005</integer>
+// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1877</integer>
-// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>line</key><integer>2005</integer>
+// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1878</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>line</key><integer>2006</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1878</integer>
-// CHECK-NEXT: <key>col</key><integer>6</integer>
+// CHECK-NEXT: <key>line</key><integer>2006</integer>
+// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -25315,26 +24631,26 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1878</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>line</key><integer>2006</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1878</integer>
-// CHECK-NEXT: <key>col</key><integer>6</integer>
+// CHECK-NEXT: <key>line</key><integer>2006</integer>
+// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1878</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
+// CHECK-NEXT: <key>line</key><integer>2006</integer>
+// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1878</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
+// CHECK-NEXT: <key>line</key><integer>2006</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -25345,30 +24661,30 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1878</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
+// CHECK-NEXT: <key>line</key><integer>2006</integer>
+// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1878</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
+// CHECK-NEXT: <key>line</key><integer>2006</integer>
+// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1878</integer>
-// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>line</key><integer>2006</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>depth</key><integer>1</integer>
// CHECK-NEXT: <key>extended_message</key>
-// CHECK-NEXT: <string>Assuming &apos;y&apos; is &lt;= 2</string>
+// CHECK-NEXT: <string>Assuming &apos;Cond&apos; is not equal to 0</string>
// CHECK-NEXT: <key>message</key>
-// CHECK-NEXT: <string>Assuming &apos;y&apos; is &lt;= 2</string>
+// CHECK-NEXT: <string>Assuming &apos;Cond&apos; is not equal to 0</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
@@ -25378,26 +24694,26 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1878</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
+// CHECK-NEXT: <key>line</key><integer>2006</integer>
+// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1878</integer>
-// CHECK-NEXT: <key>col</key><integer>8</integer>
+// CHECK-NEXT: <key>line</key><integer>2006</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1881</integer>
-// CHECK-NEXT: <key>col</key><integer>7</integer>
+// CHECK-NEXT: <key>line</key><integer>2007</integer>
+// CHECK-NEXT: <key>col</key><integer>5</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1881</integer>
-// CHECK-NEXT: <key>col</key><integer>17</integer>
+// CHECK-NEXT: <key>line</key><integer>2007</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -25405,6 +24721,35 @@ void foo() {
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2012</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2012</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2012</integer>
+// CHECK-NEXT: <key>col</key><integer>38</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Returning from &apos;initX&apos;</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Returning from &apos;initX&apos;</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
@@ -25412,26 +24757,26 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1881</integer>
-// CHECK-NEXT: <key>col</key><integer>7</integer>
+// CHECK-NEXT: <key>line</key><integer>2012</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1881</integer>
-// CHECK-NEXT: <key>col</key><integer>17</integer>
+// CHECK-NEXT: <key>line</key><integer>2012</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1881</integer>
-// CHECK-NEXT: <key>col</key><integer>21</integer>
+// CHECK-NEXT: <key>line</key><integer>2012</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1881</integer>
-// CHECK-NEXT: <key>col</key><integer>21</integer>
+// CHECK-NEXT: <key>line</key><integer>2012</integer>
+// CHECK-NEXT: <key>col</key><integer>4</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -25442,31 +24787,48 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1881</integer>
-// CHECK-NEXT: <key>col</key><integer>21</integer>
+// CHECK-NEXT: <key>line</key><integer>2012</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1881</integer>
-// CHECK-NEXT: <key>col</key><integer>21</integer>
+// CHECK-NEXT: <key>line</key><integer>2012</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1881</integer>
-// CHECK-NEXT: <key>col</key><integer>43</integer>
+// CHECK-NEXT: <key>line</key><integer>2012</integer>
+// CHECK-NEXT: <key>col</key><integer>6</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
-// CHECK-NEXT: <string>Method returns an Objective-C object with a +1 retain count</string>
+// CHECK-NEXT: <string>Object leaked: allocated object is not referenced later in this execution path and has a retain count of +1</string>
// CHECK-NEXT: <key>message</key>
-// CHECK-NEXT: <string>Method returns an Objective-C object with a +1 retain count</string>
+// CHECK-NEXT: <string>Object leaked: allocated object is not referenced later in this execution path and has a retain count of +1</string>
// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>description</key><string>Potential leak of an object</string>
+// CHECK-NEXT: <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+// CHECK-NEXT: <key>type</key><string>Leak</string>
+// CHECK-NEXT: <key>issue_context_kind</key><string>Objective-C method</string>
+// CHECK-NEXT: <key>issue_context</key><string>test12706177</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2012</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>path</key>
+// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
@@ -25475,26 +24837,26 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1881</integer>
-// CHECK-NEXT: <key>col</key><integer>21</integer>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1881</integer>
-// CHECK-NEXT: <key>col</key><integer>21</integer>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1882</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>24</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1882</integer>
-// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>37</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -25502,6 +24864,35 @@ void foo() {
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>24</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>24</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>39</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Call to function &apos;CFGetSomething&apos; returns a Core Foundation object with a +0 retain count</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Call to function &apos;CFGetSomething&apos; returns a Core Foundation object with a +0 retain count</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
@@ -25509,26 +24900,26 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1882</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>24</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1882</integer>
-// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>37</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1883</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1883</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -25539,42 +24930,42 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1883</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1883</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1883</integer>
-// CHECK-NEXT: <key>col</key><integer>25</integer>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>40</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1883</integer>
-// CHECK-NEXT: <key>col</key><integer>6</integer>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>24</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1883</integer>
-// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>39</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
-// CHECK-NEXT: <string>Object released</string>
+// CHECK-NEXT: <string>Object autoreleased</string>
// CHECK-NEXT: <key>message</key>
-// CHECK-NEXT: <string>Object released</string>
+// CHECK-NEXT: <string>Object autoreleased</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
@@ -25584,26 +24975,26 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1883</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1883</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1884</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1884</integer>
-// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -25614,42 +25005,83 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1884</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1884</integer>
-// CHECK-NEXT: <key>col</key><integer>25</integer>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1884</integer>
-// CHECK-NEXT: <key>col</key><integer>35</integer>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>40</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>40</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
-// CHECK-NEXT: <string>Reference-counted object is used after it is released</string>
+// CHECK-NEXT: <string>Object returned to caller with a +0 retain count</string>
// CHECK-NEXT: <key>message</key>
-// CHECK-NEXT: <string>Reference-counted object is used after it is released</string>
+// CHECK-NEXT: <string>Object returned to caller with a +0 retain count</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>40</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Object was autoreleased but has a +0 retain count</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Object was autoreleased but has a +0 retain count</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>description</key><string>Reference-counted object is used after it is released</string>
+// CHECK-NEXT: <key>description</key><string>Object autoreleased too many times</string>
// CHECK-NEXT: <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
-// CHECK-NEXT: <key>type</key><string>Use-after-release</string>
+// CHECK-NEXT: <key>type</key><string>Object autoreleased too many times</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
-// CHECK-NEXT: <key>issue_context</key><string>rdar11400885</string>
-// CHECK-NEXT: <key>issue_hash</key><string>9</string>
+// CHECK-NEXT: <key>issue_context</key><string>getIncorrectlyAutoreleasedCFType</string>
+// CHECK-NEXT: <key>issue_hash</key><string>2</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1884</integer>
-// CHECK-NEXT: <key>col</key><integer>5</integer>
+// CHECK-NEXT: <key>line</key><integer>2028</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
@@ -25664,26 +25096,26 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1903</integer>
+// CHECK-NEXT: <key>line</key><integer>2033</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1903</integer>
-// CHECK-NEXT: <key>col</key><integer>4</integer>
+// CHECK-NEXT: <key>line</key><integer>2033</integer>
+// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1911</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>line</key><integer>2033</integer>
+// CHECK-NEXT: <key>col</key><integer>24</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1911</integer>
-// CHECK-NEXT: <key>col</key><integer>4</integer>
+// CHECK-NEXT: <key>line</key><integer>2033</integer>
+// CHECK-NEXT: <key>col</key><integer>40</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -25691,6 +25123,35 @@ void foo() {
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2033</integer>
+// CHECK-NEXT: <key>col</key><integer>24</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2033</integer>
+// CHECK-NEXT: <key>col</key><integer>24</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2033</integer>
+// CHECK-NEXT: <key>col</key><integer>42</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Call to function &apos;CFCreateSomething&apos; returns a Core Foundation object with a +1 retain count</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Call to function &apos;CFCreateSomething&apos; returns a Core Foundation object with a +1 retain count</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
@@ -25698,26 +25159,26 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1911</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>line</key><integer>2033</integer>
+// CHECK-NEXT: <key>col</key><integer>24</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1911</integer>
-// CHECK-NEXT: <key>col</key><integer>4</integer>
+// CHECK-NEXT: <key>line</key><integer>2033</integer>
+// CHECK-NEXT: <key>col</key><integer>40</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1911</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
+// CHECK-NEXT: <key>line</key><integer>2033</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1911</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
+// CHECK-NEXT: <key>line</key><integer>2033</integer>
+// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -25728,30 +25189,42 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1911</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
+// CHECK-NEXT: <key>line</key><integer>2033</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1911</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
+// CHECK-NEXT: <key>line</key><integer>2033</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1911</integer>
-// CHECK-NEXT: <key>col</key><integer>21</integer>
+// CHECK-NEXT: <key>line</key><integer>2033</integer>
+// CHECK-NEXT: <key>col</key><integer>43</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2033</integer>
+// CHECK-NEXT: <key>col</key><integer>24</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2033</integer>
+// CHECK-NEXT: <key>col</key><integer>42</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
-// CHECK-NEXT: <string>NSArray literal is an object with a +0 retain count</string>
+// CHECK-NEXT: <string>Object autoreleased</string>
// CHECK-NEXT: <key>message</key>
-// CHECK-NEXT: <string>NSArray literal is an object with a +0 retain count</string>
+// CHECK-NEXT: <string>Object autoreleased</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
@@ -25761,26 +25234,26 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1911</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
+// CHECK-NEXT: <key>line</key><integer>2033</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1911</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
+// CHECK-NEXT: <key>line</key><integer>2033</integer>
+// CHECK-NEXT: <key>col</key><integer>22</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1912</integer>
+// CHECK-NEXT: <key>line</key><integer>2033</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1912</integer>
-// CHECK-NEXT: <key>col</key><integer>24</integer>
+// CHECK-NEXT: <key>line</key><integer>2033</integer>
+// CHECK-NEXT: <key>col</key><integer>8</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -25791,7 +25264,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1912</integer>
+// CHECK-NEXT: <key>line</key><integer>2033</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -25799,33 +25272,33 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1912</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
+// CHECK-NEXT: <key>line</key><integer>2033</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1912</integer>
-// CHECK-NEXT: <key>col</key><integer>35</integer>
+// CHECK-NEXT: <key>line</key><integer>2033</integer>
+// CHECK-NEXT: <key>col</key><integer>43</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
-// CHECK-NEXT: <string>Incorrect decrement of the reference count of an object that is not owned at this point by the caller</string>
+// CHECK-NEXT: <string>Object with a +0 retain count returned to caller where a +1 (owning) retain count is expected</string>
// CHECK-NEXT: <key>message</key>
-// CHECK-NEXT: <string>Incorrect decrement of the reference count of an object that is not owned at this point by the caller</string>
+// CHECK-NEXT: <string>Object with a +0 retain count returned to caller where a +1 (owning) retain count is expected</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>description</key><string>Incorrect decrement of the reference count of an object that is not owned at this point by the caller</string>
+// CHECK-NEXT: <key>description</key><string>Object with a +0 retain count returned to caller where a +1 (owning) retain count is expected</string>
// CHECK-NEXT: <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
-// CHECK-NEXT: <key>type</key><string>Bad release</string>
+// CHECK-NEXT: <key>type</key><string>Method should return an owned object</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
-// CHECK-NEXT: <key>issue_context</key><string>testConsumeAndStopTracking</string>
-// CHECK-NEXT: <key>issue_hash</key><string>10</string>
+// CHECK-NEXT: <key>issue_context</key><string>createIncorrectlyAutoreleasedCFType</string>
+// CHECK-NEXT: <key>issue_hash</key><string>2</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1912</integer>
+// CHECK-NEXT: <key>line</key><integer>2033</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -25834,6 +25307,35 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2048</integer>
+// CHECK-NEXT: <key>col</key><integer>19</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2048</integer>
+// CHECK-NEXT: <key>col</key><integer>19</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2048</integer>
+// CHECK-NEXT: <key>col</key><integer>37</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Call to function &apos;CFCreateSomething&apos; returns a Core Foundation object with a +1 retain count</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Call to function &apos;CFCreateSomething&apos; returns a Core Foundation object with a +1 retain count</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
@@ -25841,26 +25343,26 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1916</integer>
+// CHECK-NEXT: <key>line</key><integer>2048</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1916</integer>
-// CHECK-NEXT: <key>col</key><integer>4</integer>
+// CHECK-NEXT: <key>line</key><integer>2048</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1924</integer>
+// CHECK-NEXT: <key>line</key><integer>2049</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1924</integer>
-// CHECK-NEXT: <key>col</key><integer>4</integer>
+// CHECK-NEXT: <key>line</key><integer>2049</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -25868,6 +25370,47 @@ void foo() {
// CHECK-NEXT: </array>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2049</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2049</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2049</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2049</integer>
+// CHECK-NEXT: <key>col</key><integer>13</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2049</integer>
+// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Object released</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Object released</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
@@ -25875,26 +25418,26 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1924</integer>
+// CHECK-NEXT: <key>line</key><integer>2049</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1924</integer>
-// CHECK-NEXT: <key>col</key><integer>4</integer>
+// CHECK-NEXT: <key>line</key><integer>2049</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1924</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
+// CHECK-NEXT: <key>line</key><integer>2052</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1924</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
+// CHECK-NEXT: <key>line</key><integer>2052</integer>
+// CHECK-NEXT: <key>col</key><integer>7</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -25905,7 +25448,53 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1924</integer>
+// CHECK-NEXT: <key>line</key><integer>2052</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2052</integer>
+// CHECK-NEXT: <key>col</key><integer>9</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2052</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Reference-counted object is used after it is released</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Reference-counted object is used after it is released</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>description</key><string>Reference-counted object is used after it is released</string>
+// CHECK-NEXT: <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+// CHECK-NEXT: <key>type</key><string>Use-after-release</string>
+// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
+// CHECK-NEXT: <key>issue_context</key><string>useAfterRelease</string>
+// CHECK-NEXT: <key>issue_hash</key><string>7</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2052</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>path</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2057</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -25913,22 +25502,22 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1924</integer>
+// CHECK-NEXT: <key>line</key><integer>2057</integer>
// CHECK-NEXT: <key>col</key><integer>19</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1924</integer>
-// CHECK-NEXT: <key>col</key><integer>21</integer>
+// CHECK-NEXT: <key>line</key><integer>2057</integer>
+// CHECK-NEXT: <key>col</key><integer>37</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
-// CHECK-NEXT: <string>NSArray literal is an object with a +0 retain count</string>
+// CHECK-NEXT: <string>Call to function &apos;CFCreateSomething&apos; returns a Core Foundation object with a +1 retain count</string>
// CHECK-NEXT: <key>message</key>
-// CHECK-NEXT: <string>NSArray literal is an object with a +0 retain count</string>
+// CHECK-NEXT: <string>Call to function &apos;CFCreateSomething&apos; returns a Core Foundation object with a +1 retain count</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
@@ -25938,26 +25527,101 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1924</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
+// CHECK-NEXT: <key>line</key><integer>2057</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1924</integer>
-// CHECK-NEXT: <key>col</key><integer>19</integer>
+// CHECK-NEXT: <key>line</key><integer>2057</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1925</integer>
+// CHECK-NEXT: <key>line</key><integer>2058</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1925</integer>
-// CHECK-NEXT: <key>col</key><integer>26</integer>
+// CHECK-NEXT: <key>line</key><integer>2058</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2058</integer>
+// CHECK-NEXT: <key>col</key><integer>22</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2058</integer>
+// CHECK-NEXT: <key>col</key><integer>22</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2058</integer>
+// CHECK-NEXT: <key>col</key><integer>39</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2058</integer>
+// CHECK-NEXT: <key>col</key><integer>36</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2058</integer>
+// CHECK-NEXT: <key>col</key><integer>38</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Object autoreleased</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Object autoreleased</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2058</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2058</integer>
+// CHECK-NEXT: <key>col</key><integer>11</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2059</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2059</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -25968,7 +25632,7 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1925</integer>
+// CHECK-NEXT: <key>line</key><integer>2059</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -25976,34 +25640,94 @@ void foo() {
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1925</integer>
-// CHECK-NEXT: <key>col</key><integer>28</integer>
+// CHECK-NEXT: <key>line</key><integer>2059</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1925</integer>
-// CHECK-NEXT: <key>col</key><integer>48</integer>
+// CHECK-NEXT: <key>line</key><integer>2059</integer>
+// CHECK-NEXT: <key>col</key><integer>18</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2059</integer>
+// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2059</integer>
+// CHECK-NEXT: <key>col</key><integer>17</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
-// CHECK-NEXT: <string>Incorrect decrement of the reference count of an object that is not owned at this point by the caller</string>
+// CHECK-NEXT: <string>Reference count incremented. The object now has a +2 retain count</string>
// CHECK-NEXT: <key>message</key>
-// CHECK-NEXT: <string>Incorrect decrement of the reference count of an object that is not owned at this point by the caller</string>
+// CHECK-NEXT: <string>Reference count incremented. The object now has a +2 retain count</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2059</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2059</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2060</integer>
+// CHECK-NEXT: <key>col</key><integer>1</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2060</integer>
+// CHECK-NEXT: <key>col</key><integer>1</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2060</integer>
+// CHECK-NEXT: <key>col</key><integer>1</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Object leaked: object allocated and stored into &apos;obj&apos; is not referenced later in this execution path and has a retain count of +1</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Object leaked: object allocated and stored into &apos;obj&apos; is not referenced later in this execution path and has a retain count of +1</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>description</key><string>Incorrect decrement of the reference count of an object that is not owned at this point by the caller</string>
+// CHECK-NEXT: <key>description</key><string>Potential leak of an object stored into &apos;obj&apos;</string>
// CHECK-NEXT: <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
-// CHECK-NEXT: <key>type</key><string>Bad release</string>
+// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
-// CHECK-NEXT: <key>issue_context</key><string>testCFConsumeAndStopTracking</string>
-// CHECK-NEXT: <key>issue_hash</key><string>10</string>
+// CHECK-NEXT: <key>issue_context</key><string>testAutoreleaseReturnsInput</string>
+// CHECK-NEXT: <key>issue_hash</key><string>2</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1925</integer>
-// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>line</key><integer>2060</integer>
+// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
@@ -26011,6 +25735,35 @@ void foo() {
// CHECK-NEXT: <key>path</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2077</integer>
+// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2077</integer>
+// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2077</integer>
+// CHECK-NEXT: <key>col</key><integer>70</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Call to function &apos;CFArrayCreateMutable&apos; returns a Core Foundation object with a +1 retain count</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Call to function &apos;CFArrayCreateMutable&apos; returns a Core Foundation object with a +1 retain count</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
// CHECK-NEXT: <key>edges</key>
// CHECK-NEXT: <array>
@@ -26018,26 +25771,26 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1937</integer>
+// CHECK-NEXT: <key>line</key><integer>2077</integer>
// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1937</integer>
-// CHECK-NEXT: <key>col</key><integer>10</integer>
+// CHECK-NEXT: <key>line</key><integer>2077</integer>
+// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1937</integer>
-// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>line</key><integer>2078</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1937</integer>
-// CHECK-NEXT: <key>col</key><integer>29</integer>
+// CHECK-NEXT: <key>line</key><integer>2078</integer>
+// CHECK-NEXT: <key>col</key><integer>12</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
@@ -26048,30 +25801,42 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1937</integer>
-// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>line</key><integer>2078</integer>
+// CHECK-NEXT: <key>col</key><integer>34</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>ranges</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1937</integer>
-// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>line</key><integer>2078</integer>
+// CHECK-NEXT: <key>col</key><integer>34</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1937</integer>
-// CHECK-NEXT: <key>col</key><integer>31</integer>
+// CHECK-NEXT: <key>line</key><integer>2078</integer>
+// CHECK-NEXT: <key>col</key><integer>62</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2078</integer>
+// CHECK-NEXT: <key>col</key><integer>48</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2078</integer>
+// CHECK-NEXT: <key>col</key><integer>61</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
-// CHECK-NEXT: <string>Call to function &apos;CreateMyCFType&apos; returns a Core Foundation object with a +1 retain count</string>
+// CHECK-NEXT: <string>Object autoreleased</string>
// CHECK-NEXT: <key>message</key>
-// CHECK-NEXT: <string>Call to function &apos;CreateMyCFType&apos; returns a Core Foundation object with a +1 retain count</string>
+// CHECK-NEXT: <string>Object autoreleased</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
// CHECK-NEXT: <key>kind</key><string>control</string>
@@ -26081,25 +25846,100 @@ void foo() {
// CHECK-NEXT: <key>start</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1937</integer>
-// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>line</key><integer>2078</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1937</integer>
-// CHECK-NEXT: <key>col</key><integer>29</integer>
+// CHECK-NEXT: <key>line</key><integer>2078</integer>
+// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2079</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2079</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2079</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2079</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2079</integer>
+// CHECK-NEXT: <key>col</key><integer>17</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2079</integer>
+// CHECK-NEXT: <key>col</key><integer>12</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2079</integer>
+// CHECK-NEXT: <key>col</key><integer>16</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Reference count incremented. The object now has a +2 retain count</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Reference count incremented. The object now has a +2 retain count</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2079</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2079</integer>
+// CHECK-NEXT: <key>col</key><integer>10</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
// CHECK-NEXT: <key>end</key>
// CHECK-NEXT: <array>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1938</integer>
+// CHECK-NEXT: <key>line</key><integer>2080</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1938</integer>
+// CHECK-NEXT: <key>line</key><integer>2080</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
@@ -26111,28 +25951,233 @@ void foo() {
// CHECK-NEXT: <key>kind</key><string>event</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1938</integer>
+// CHECK-NEXT: <key>line</key><integer>2080</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: <key>depth</key><integer>0</integer>
// CHECK-NEXT: <key>extended_message</key>
-// CHECK-NEXT: <string>Object leaked: object allocated and stored into &apos;x&apos; is not referenced later in this execution path and has a retain count of +1</string>
+// CHECK-NEXT: <string>Object leaked: object allocated and stored into &apos;arr&apos; is not referenced later in this execution path and has a retain count of +1</string>
// CHECK-NEXT: <key>message</key>
-// CHECK-NEXT: <string>Object leaked: object allocated and stored into &apos;x&apos; is not referenced later in this execution path and has a retain count of +1</string>
+// CHECK-NEXT: <string>Object leaked: object allocated and stored into &apos;arr&apos; is not referenced later in this execution path and has a retain count of +1</string>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
-// CHECK-NEXT: <key>description</key><string>Potential leak of an object stored into &apos;x&apos;</string>
+// CHECK-NEXT: <key>description</key><string>Potential leak of an object stored into &apos;arr&apos;</string>
// CHECK-NEXT: <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
// CHECK-NEXT: <key>type</key><string>Leak</string>
// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
-// CHECK-NEXT: <key>issue_context</key><string>test_custom_cf</string>
-// CHECK-NEXT: <key>issue_hash</key><string>2</string>
+// CHECK-NEXT: <key>issue_context</key><string>autoreleaseReturningTypedObject</string>
+// CHECK-NEXT: <key>issue_hash</key><string>1</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2080</integer>
+// CHECK-NEXT: <key>col</key><integer>1</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>path</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2091</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2091</integer>
+// CHECK-NEXT: <key>col</key><integer>4</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2094</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2094</integer>
+// CHECK-NEXT: <key>col</key><integer>4</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2094</integer>
+// CHECK-NEXT: <key>col</key><integer>19</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2094</integer>
+// CHECK-NEXT: <key>col</key><integer>19</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2094</integer>
+// CHECK-NEXT: <key>col</key><integer>20</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>NSNumber literal is an object with a +0 retain count</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>NSNumber literal is an object with a +0 retain count</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2094</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2094</integer>
+// CHECK-NEXT: <key>col</key><integer>4</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2095</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2095</integer>
+// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2095</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>ranges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2095</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2095</integer>
+// CHECK-NEXT: <key>col</key><integer>27</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2095</integer>
+// CHECK-NEXT: <key>col</key><integer>17</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2095</integer>
+// CHECK-NEXT: <key>col</key><integer>26</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Object autoreleased</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Object autoreleased</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>control</string>
+// CHECK-NEXT: <key>edges</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>start</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2095</integer>
+// CHECK-NEXT: <key>col</key><integer>3</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2095</integer>
+// CHECK-NEXT: <key>col</key><integer>15</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>end</key>
+// CHECK-NEXT: <array>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2096</integer>
+// CHECK-NEXT: <key>col</key><integer>1</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2096</integer>
+// CHECK-NEXT: <key>col</key><integer>1</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>kind</key><string>event</string>
+// CHECK-NEXT: <key>location</key>
+// CHECK-NEXT: <dict>
+// CHECK-NEXT: <key>line</key><integer>2096</integer>
+// CHECK-NEXT: <key>col</key><integer>1</integer>
+// CHECK-NEXT: <key>file</key><integer>0</integer>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: <key>depth</key><integer>0</integer>
+// CHECK-NEXT: <key>extended_message</key>
+// CHECK-NEXT: <string>Object was autoreleased but has a +0 retain count</string>
+// CHECK-NEXT: <key>message</key>
+// CHECK-NEXT: <string>Object was autoreleased but has a +0 retain count</string>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </array>
+// CHECK-NEXT: <key>description</key><string>Object autoreleased too many times</string>
+// CHECK-NEXT: <key>category</key><string>Memory (Core Foundation/Objective-C)</string>
+// CHECK-NEXT: <key>type</key><string>Object autoreleased too many times</string>
+// CHECK-NEXT: <key>issue_context_kind</key><string>function</string>
+// CHECK-NEXT: <key>issue_context</key><string>autoreleaseObjC</string>
+// CHECK-NEXT: <key>issue_hash</key><string>6</string>
// CHECK-NEXT: <key>location</key>
// CHECK-NEXT: <dict>
-// CHECK-NEXT: <key>line</key><integer>1938</integer>
+// CHECK-NEXT: <key>line</key><integer>2096</integer>
// CHECK-NEXT: <key>col</key><integer>1</integer>
// CHECK-NEXT: <key>file</key><integer>0</integer>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </dict>
// CHECK-NEXT: </array>
+// CHECK-NEXT: </dict>
+// CHECK-NEXT: </plist>
diff --git a/test/Analysis/stack-addr-ps.cpp b/test/Analysis/stack-addr-ps.cpp
index a39f9c7dc726..a4ab2f3985c6 100644
--- a/test/Analysis/stack-addr-ps.cpp
+++ b/test/Analysis/stack-addr-ps.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -verify %s -Wno-undefined-bool-conversion
typedef __INTPTR_TYPE__ intptr_t;
diff --git a/test/Analysis/stackaddrleak.c b/test/Analysis/stackaddrleak.c
index 4f81f6623e51..21a15d75eca0 100644
--- a/test/Analysis/stackaddrleak.c
+++ b/test/Analysis/stackaddrleak.c
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify -std=c99 -Dbool=_Bool %s
-// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify -x c++ %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify -std=c99 -Dbool=_Bool -Wno-bool-conversion %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core -verify -x c++ -Wno-bool-conversion %s
typedef __INTPTR_TYPE__ intptr_t;
char const *p;
diff --git a/test/Analysis/superclass.m b/test/Analysis/superclass.m
index ba5ea40aceb7..d5d3c4764073 100644
--- a/test/Analysis/superclass.m
+++ b/test/Analysis/superclass.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fblocks -analyze -analyzer-checker=alpha.osx.cocoa.MissingSuperCall -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -fblocks -analyze -analyzer-checker=osx.cocoa.MissingSuperCall -verify -Wno-objc-root-class %s
// Define used Classes
@protocol NSObject
diff --git a/test/Analysis/temp-obj-dtors-cfg-output.cpp b/test/Analysis/temp-obj-dtors-cfg-output.cpp
index ff68a876e910..5fb33d36b855 100644
--- a/test/Analysis/temp-obj-dtors-cfg-output.cpp
+++ b/test/Analysis/temp-obj-dtors-cfg-output.cpp
@@ -1,7 +1,6 @@
// RUN: rm -f %t
// RUN: %clang_cc1 -analyze -analyzer-checker=debug.DumpCFG -analyzer-config cfg-temporary-dtors=true %s > %t 2>&1
// RUN: FileCheck --input-file=%t %s
-// XPASS: *
class A {
public:
@@ -52,6 +51,37 @@ void test_cond() {
int b;
}
+struct C {
+ C():b_(true) {}
+ ~C() {}
+
+ operator bool() { return b_; }
+ bool b_;
+};
+
+struct D {
+ D():b_(true) {}
+
+ operator bool() { return b_; }
+ bool b_;
+};
+
+int test_cond_unnamed_custom_destructor() {
+ if (C()) { return 1; } else { return 0; }
+}
+
+int test_cond_named_custom_destructor() {
+ if (C c = C()) { return 1; } else { return 0; }
+}
+
+int test_cond_unnamed_auto_destructor() {
+ if (D()) { return 1; } else { return 0; }
+}
+
+int test_cond_named_auto_destructor() {
+ if (D d = D()) { return 1; } else { return 0; }
+}
+
void test_cond_cref() {
const A& a = B() ? A() : A(B());
foo(B() ? A() : A(B()));
@@ -126,6 +156,38 @@ void test_noreturn2() {
int b;
}
+extern bool check(const NoReturn&);
+
+// PR16664 and PR18159
+int testConsistencyNestedSimple(bool value) {
+ if (value) {
+ if (!value || check(NoReturn())) {
+ return 1;
+ }
+ }
+ return 0;
+}
+
+// PR16664 and PR18159
+int testConsistencyNestedComplex(bool value) {
+ if (value) {
+ if (!value || !value || check(NoReturn())) {
+ return 1;
+ }
+ }
+ return 0;
+}
+
+// PR16664 and PR18159
+int testConsistencyNestedNormalReturn(bool value) {
+ if (value) {
+ if (!value || value || check(NoReturn())) {
+ return 1;
+ }
+ }
+ return 0;
+}
+
// CHECK: [B1 (ENTRY)]
// CHECK: Succs (1): B0
// CHECK: [B0 (EXIT)]
@@ -212,17 +274,17 @@ void test_noreturn2() {
// CHECK: 1: A() (CXXConstructExpr, class A)
// CHECK: 2: [B1.1] (BindTemporary)
// CHECK: 3: [B1.2].operator int
-// CHECK: 4: [B1.3]()
+// CHECK: 4: [B1.2]
// CHECK: 5: [B1.4] (ImplicitCastExpr, UserDefinedConversion, int)
// CHECK: 6: int([B1.5]) (CXXFunctionalCastExpr, NoOp, int)
// CHECK: 7: B() (CXXConstructExpr, class B)
// CHECK: 8: [B1.7] (BindTemporary)
// CHECK: 9: [B1.8].operator int
-// CHECK: 10: [B1.9]()
+// CHECK: 10: [B1.8]
// CHECK: 11: [B1.10] (ImplicitCastExpr, UserDefinedConversion, int)
// CHECK: 12: int([B1.11]) (CXXFunctionalCastExpr, NoOp, int)
// CHECK: 13: [B1.6] + [B1.12]
-// CHECK: 14: int a = int(A().operator int()) + int(B().operator int());
+// CHECK: 14: int a = int(A()) + int(B());
// CHECK: 15: ~B() (Temporary object destructor)
// CHECK: 16: ~A() (Temporary object destructor)
// CHECK: 17: foo
@@ -230,13 +292,13 @@ void test_noreturn2() {
// CHECK: 19: A() (CXXConstructExpr, class A)
// CHECK: 20: [B1.19] (BindTemporary)
// CHECK: 21: [B1.20].operator int
-// CHECK: 22: [B1.21]()
+// CHECK: 22: [B1.20]
// CHECK: 23: [B1.22] (ImplicitCastExpr, UserDefinedConversion, int)
// CHECK: 24: int([B1.23]) (CXXFunctionalCastExpr, NoOp, int)
// CHECK: 25: B() (CXXConstructExpr, class B)
// CHECK: 26: [B1.25] (BindTemporary)
// CHECK: 27: [B1.26].operator int
-// CHECK: 28: [B1.27]()
+// CHECK: 28: [B1.26]
// CHECK: 29: [B1.28] (ImplicitCastExpr, UserDefinedConversion, int)
// CHECK: 30: int([B1.29]) (CXXFunctionalCastExpr, NoOp, int)
// CHECK: 31: [B1.24] + [B1.30]
@@ -262,14 +324,14 @@ void test_noreturn2() {
// CHECK: [B3]
// CHECK: 1: [B5.8] && [B4.5]
// CHECK: 2: [B5.3]([B3.1])
-// CHECK: T: [B5.8] && ...
+// CHECK: T: (Temp Dtor) [B5.8] && ...
// CHECK: Preds (2): B4 B5
// CHECK: Succs (2): B2 B1
// CHECK: [B4]
// CHECK: 1: B() (CXXConstructExpr, class B)
// CHECK: 2: [B4.1] (BindTemporary)
-// CHECK: 3: [B4.2].operator _Bool
-// CHECK: 4: [B4.3]()
+// CHECK: 3: [B4.2].operator bool
+// CHECK: 4: [B4.2]
// CHECK: 5: [B4.4] (ImplicitCastExpr, UserDefinedConversion, _Bool)
// CHECK: Preds (1): B5
// CHECK: Succs (1): B3
@@ -279,8 +341,8 @@ void test_noreturn2() {
// CHECK: 3: [B5.2] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(_Bool))
// CHECK: 4: A() (CXXConstructExpr, class A)
// CHECK: 5: [B5.4] (BindTemporary)
-// CHECK: 6: [B5.5].operator _Bool
-// CHECK: 7: [B5.6]()
+// CHECK: 6: [B5.5].operator bool
+// CHECK: 7: [B5.5]
// CHECK: 8: [B5.7] (ImplicitCastExpr, UserDefinedConversion, _Bool)
// CHECK: T: [B5.8] && ...
// CHECK: Preds (2): B6 B7
@@ -291,23 +353,23 @@ void test_noreturn2() {
// CHECK: Succs (1): B5
// CHECK: [B7]
// CHECK: 1: [B9.5] && [B8.5]
-// CHECK: 2: bool a = A().operator _Bool() && B().operator _Bool();
-// CHECK: T: [B9.5] && ...
+// CHECK: 2: bool a = A() && B();
+// CHECK: T: (Temp Dtor) [B9.5] && ...
// CHECK: Preds (2): B8 B9
// CHECK: Succs (2): B6 B5
// CHECK: [B8]
// CHECK: 1: B() (CXXConstructExpr, class B)
// CHECK: 2: [B8.1] (BindTemporary)
-// CHECK: 3: [B8.2].operator _Bool
-// CHECK: 4: [B8.3]()
+// CHECK: 3: [B8.2].operator bool
+// CHECK: 4: [B8.2]
// CHECK: 5: [B8.4] (ImplicitCastExpr, UserDefinedConversion, _Bool)
// CHECK: Preds (1): B9
// CHECK: Succs (1): B7
// CHECK: [B9]
// CHECK: 1: A() (CXXConstructExpr, class A)
// CHECK: 2: [B9.1] (BindTemporary)
-// CHECK: 3: [B9.2].operator _Bool
-// CHECK: 4: [B9.3]()
+// CHECK: 3: [B9.2].operator bool
+// CHECK: 4: [B9.2]
// CHECK: 5: [B9.4] (ImplicitCastExpr, UserDefinedConversion, _Bool)
// CHECK: T: [B9.5] && ...
// CHECK: Preds (1): B10
@@ -328,14 +390,14 @@ void test_noreturn2() {
// CHECK: [B3]
// CHECK: 1: [B5.8] || [B4.5]
// CHECK: 2: [B5.3]([B3.1])
-// CHECK: T: [B5.8] || ...
+// CHECK: T: (Temp Dtor) [B5.8] || ...
// CHECK: Preds (2): B4 B5
// CHECK: Succs (2): B1 B2
// CHECK: [B4]
// CHECK: 1: B() (CXXConstructExpr, class B)
// CHECK: 2: [B4.1] (BindTemporary)
-// CHECK: 3: [B4.2].operator _Bool
-// CHECK: 4: [B4.3]()
+// CHECK: 3: [B4.2].operator bool
+// CHECK: 4: [B4.2]
// CHECK: 5: [B4.4] (ImplicitCastExpr, UserDefinedConversion, _Bool)
// CHECK: Preds (1): B5
// CHECK: Succs (1): B3
@@ -345,8 +407,8 @@ void test_noreturn2() {
// CHECK: 3: [B5.2] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(_Bool))
// CHECK: 4: A() (CXXConstructExpr, class A)
// CHECK: 5: [B5.4] (BindTemporary)
-// CHECK: 6: [B5.5].operator _Bool
-// CHECK: 7: [B5.6]()
+// CHECK: 6: [B5.5].operator bool
+// CHECK: 7: [B5.5]
// CHECK: 8: [B5.7] (ImplicitCastExpr, UserDefinedConversion, _Bool)
// CHECK: T: [B5.8] || ...
// CHECK: Preds (2): B6 B7
@@ -357,23 +419,23 @@ void test_noreturn2() {
// CHECK: Succs (1): B5
// CHECK: [B7]
// CHECK: 1: [B9.5] || [B8.5]
-// CHECK: 2: bool a = A().operator _Bool() || B().operator _Bool();
-// CHECK: T: [B9.5] || ...
+// CHECK: 2: bool a = A() || B();
+// CHECK: T: (Temp Dtor) [B9.5] || ...
// CHECK: Preds (2): B8 B9
// CHECK: Succs (2): B5 B6
// CHECK: [B8]
// CHECK: 1: B() (CXXConstructExpr, class B)
// CHECK: 2: [B8.1] (BindTemporary)
-// CHECK: 3: [B8.2].operator _Bool
-// CHECK: 4: [B8.3]()
+// CHECK: 3: [B8.2].operator bool
+// CHECK: 4: [B8.2]
// CHECK: 5: [B8.4] (ImplicitCastExpr, UserDefinedConversion, _Bool)
// CHECK: Preds (1): B9
// CHECK: Succs (1): B7
// CHECK: [B9]
// CHECK: 1: A() (CXXConstructExpr, class A)
// CHECK: 2: [B9.1] (BindTemporary)
-// CHECK: 3: [B9.2].operator _Bool
-// CHECK: 4: [B9.3]()
+// CHECK: 3: [B9.2].operator bool
+// CHECK: 4: [B9.2]
// CHECK: 5: [B9.4] (ImplicitCastExpr, UserDefinedConversion, _Bool)
// CHECK: T: [B9.5] || ...
// CHECK: Preds (1): B10
@@ -405,8 +467,8 @@ void test_noreturn2() {
// CHECK: 1: ~B() (Temporary object destructor)
// CHECK: 2: B() (CXXConstructExpr, class B)
// CHECK: 3: [B4.2] (BindTemporary)
-// CHECK: 4: [B4.3].operator _Bool
-// CHECK: 5: [B4.4]()
+// CHECK: 4: [B4.3].operator bool
+// CHECK: 5: [B4.3]
// CHECK: 6: [B4.5] (ImplicitCastExpr, UserDefinedConversion, _Bool)
// CHECK: 7: ~B() (Temporary object destructor)
// CHECK: T: if [B4.6]
@@ -429,8 +491,8 @@ void test_noreturn2() {
// CHECK: 2: [B7.1] (ImplicitCastExpr, NoOp, const class A)
// CHECK: 3: [B7.2]
// CHECK: 4: [B7.3] (CXXConstructExpr, class A)
-// CHECK: 5: A a = B().operator _Bool() ? A() : A(B().operator A());
-// CHECK: T: [B10.5] ? ... : ...
+// CHECK: 5: A a = B() ? A() : A(B());
+// CHECK: T: (Temp Dtor) [B10.5] ? ... : ...
// CHECK: Preds (2): B8 B9
// CHECK: Succs (2): B5 B6
// CHECK: [B8]
@@ -446,7 +508,7 @@ void test_noreturn2() {
// CHECK: 1: B() (CXXConstructExpr, class B)
// CHECK: 2: [B9.1] (BindTemporary)
// CHECK: 3: [B9.2].operator A
-// CHECK: 4: [B9.3]()
+// CHECK: 4: [B9.2]
// CHECK: 5: [B9.4] (ImplicitCastExpr, UserDefinedConversion, class A)
// CHECK: 6: [B9.5] (BindTemporary)
// CHECK: 7: [B9.6] (ImplicitCastExpr, NoOp, const class A)
@@ -463,14 +525,174 @@ void test_noreturn2() {
// CHECK: [B10]
// CHECK: 1: B() (CXXConstructExpr, class B)
// CHECK: 2: [B10.1] (BindTemporary)
-// CHECK: 3: [B10.2].operator _Bool
-// CHECK: 4: [B10.3]()
+// CHECK: 3: [B10.2].operator bool
+// CHECK: 4: [B10.2]
// CHECK: 5: [B10.4] (ImplicitCastExpr, UserDefinedConversion, _Bool)
// CHECK: T: [B10.5] ? ... : ...
// CHECK: Preds (1): B11
// CHECK: Succs (2): B8 B9
// CHECK: [B0 (EXIT)]
// CHECK: Preds (1): B1
+// CHECK: C() : b_(true)
+// CHECK: [B2 (ENTRY)]
+// CHECK: Succs (1): B1
+// CHECK: [B1]
+// CHECK: 1: true
+// CHECK: 2: b_([B1.1]) (Member initializer)
+// CHECK: Preds (1): B2
+// CHECK: Succs (1): B0
+// CHECK: [B0 (EXIT)]
+// CHECK: Preds (1): B1
+// CHECK: ~C()
+// CHECK: [B1 (ENTRY)]
+// CHECK: Succs (1): B0
+// CHECK: [B0 (EXIT)]
+// CHECK: Preds (1): B1
+// CHECK: operator bool()
+// CHECK: [B2 (ENTRY)]
+// CHECK: Succs (1): B1
+// CHECK: [B1]
+// CHECK: 1: this
+// CHECK: 2: [B1.1]->b_
+// CHECK: 3: [B1.2] (ImplicitCastExpr, LValueToRValue, _Bool)
+// CHECK: 4: return [B1.3];
+// CHECK: Preds (1): B2
+// CHECK: Succs (1): B0
+// CHECK: [B0 (EXIT)]
+// CHECK: Preds (1): B1
+// CHECK: D() : b_(true)
+// CHECK: [B2 (ENTRY)]
+// CHECK: Succs (1): B1
+// CHECK: [B1]
+// CHECK: 1: true
+// CHECK: 2: b_([B1.1]) (Member initializer)
+// CHECK: Preds (1): B2
+// CHECK: Succs (1): B0
+// CHECK: [B0 (EXIT)]
+// CHECK: Preds (1): B1
+// CHECK: operator bool()
+// CHECK: [B2 (ENTRY)]
+// CHECK: Succs (1): B1
+// CHECK: [B1]
+// CHECK: 1: this
+// CHECK: 2: [B1.1]->b_
+// CHECK: 3: [B1.2] (ImplicitCastExpr, LValueToRValue, _Bool)
+// CHECK: 4: return [B1.3];
+// CHECK: Preds (1): B2
+// CHECK: Succs (1): B0
+// CHECK: [B0 (EXIT)]
+// CHECK: Preds (1): B1
+// CHECK: int test_cond_unnamed_custom_destructor()
+// CHECK: [B4 (ENTRY)]
+// CHECK: Succs (1): B3
+// CHECK: [B1]
+// CHECK: 1: 0
+// CHECK: 2: return [B1.1];
+// CHECK: Preds (1): B3
+// CHECK: Succs (1): B0
+// CHECK: [B2]
+// CHECK: 1: 1
+// CHECK: 2: return [B2.1];
+// CHECK: Preds (1): B3
+// CHECK: Succs (1): B0
+// CHECK: [B3]
+// CHECK: 1: C() (CXXConstructExpr, struct C)
+// CHECK: 2: [B3.1] (BindTemporary)
+// CHECK: 3: [B3.2].operator bool
+// CHECK: 4: [B3.2]
+// CHECK: 5: [B3.4] (ImplicitCastExpr, UserDefinedConversion, _Bool)
+// CHECK: 6: ~C() (Temporary object destructor)
+// CHECK: T: if [B3.5]
+// CHECK: Preds (1): B4
+// CHECK: Succs (2): B2 B1
+// CHECK: [B0 (EXIT)]
+// CHECK: Preds (2): B1 B2
+// CHECK: int test_cond_named_custom_destructor()
+// CHECK: [B5 (ENTRY)]
+// CHECK: Succs (1): B4
+// CHECK: [B1]
+// CHECK: 1: [B4.6].~C() (Implicit destructor)
+// CHECK: Succs (1): B0
+// CHECK: [B2]
+// CHECK: 1: 0
+// CHECK: 2: return [B2.1];
+// CHECK: 3: [B4.6].~C() (Implicit destructor)
+// CHECK: Preds (1): B4
+// CHECK: Succs (1): B0
+// CHECK: [B3]
+// CHECK: 1: 1
+// CHECK: 2: return [B3.1];
+// CHECK: 3: [B4.6].~C() (Implicit destructor)
+// CHECK: Preds (1): B4
+// CHECK: Succs (1): B0
+// CHECK: [B4]
+// CHECK: 1: C() (CXXConstructExpr, struct C)
+// CHECK: 2: [B4.1] (BindTemporary)
+// CHECK: 3: [B4.2] (ImplicitCastExpr, NoOp, const struct C)
+// CHECK: 4: [B4.3]
+// CHECK: 5: [B4.4] (CXXConstructExpr, struct C)
+// CHECK: 6: C c = C();
+// CHECK: 7: ~C() (Temporary object destructor)
+// CHECK: 8: c
+// CHECK: 9: [B4.8].operator bool
+// CHECK: 10: [B4.8]
+// CHECK: 11: [B4.10] (ImplicitCastExpr, UserDefinedConversion, _Bool)
+// CHECK: T: if [B4.11]
+// CHECK: Preds (1): B5
+// CHECK: Succs (2): B3 B2
+// CHECK: [B0 (EXIT)]
+// CHECK: Preds (3): B1 B2 B3
+// CHECK: int test_cond_unnamed_auto_destructor()
+// CHECK: [B4 (ENTRY)]
+// CHECK: Succs (1): B3
+// CHECK: [B1]
+// CHECK: 1: 0
+// CHECK: 2: return [B1.1];
+// CHECK: Preds (1): B3
+// CHECK: Succs (1): B0
+// CHECK: [B2]
+// CHECK: 1: 1
+// CHECK: 2: return [B2.1];
+// CHECK: Preds (1): B3
+// CHECK: Succs (1): B0
+// CHECK: [B3]
+// CHECK: 1: D() (CXXConstructExpr, struct D)
+// CHECK: 2: [B3.1].operator bool
+// CHECK: 3: [B3.1]
+// CHECK: 4: [B3.3] (ImplicitCastExpr, UserDefinedConversion, _Bool)
+// CHECK: T: if [B3.4]
+// CHECK: Preds (1): B4
+// CHECK: Succs (2): B2 B1
+// CHECK: [B0 (EXIT)]
+// CHECK: Preds (2): B1 B2
+// CHECK: int test_cond_named_auto_destructor()
+// CHECK: [B4 (ENTRY)]
+// CHECK: Succs (1): B3
+// CHECK: [B1]
+// CHECK: 1: 0
+// CHECK: 2: return [B1.1];
+// CHECK: Preds (1): B3
+// CHECK: Succs (1): B0
+// CHECK: [B2]
+// CHECK: 1: 1
+// CHECK: 2: return [B2.1];
+// CHECK: Preds (1): B3
+// CHECK: Succs (1): B0
+// CHECK: [B3]
+// CHECK: 1: D() (CXXConstructExpr, struct D)
+// CHECK: 2: [B3.1] (ImplicitCastExpr, NoOp, const struct D)
+// CHECK: 3: [B3.2]
+// CHECK: 4: [B3.3] (CXXConstructExpr, struct D)
+// CHECK: 5: D d = D();
+// CHECK: 6: d
+// CHECK: 7: [B3.6].operator bool
+// CHECK: 8: [B3.6]
+// CHECK: 9: [B3.8] (ImplicitCastExpr, UserDefinedConversion, _Bool)
+// CHECK: T: if [B3.9]
+// CHECK: Preds (1): B4
+// CHECK: Succs (2): B2 B1
+// CHECK: [B0 (EXIT)]
+// CHECK: Preds (2): B1 B2
// CHECK: [B14 (ENTRY)]
// CHECK: Succs (1): B13
// CHECK: [B1]
@@ -496,7 +718,7 @@ void test_noreturn2() {
// CHECK: 2: [B4.1] (ImplicitCastExpr, NoOp, const class A)
// CHECK: 3: [B4.2]
// CHECK: 4: [B7.3]([B4.3])
-// CHECK: T: [B7.8] ? ... : ...
+// CHECK: T: (Temp Dtor) [B7.8] ? ... : ...
// CHECK: Preds (2): B5 B6
// CHECK: Succs (2): B2 B3
// CHECK: [B5]
@@ -512,7 +734,7 @@ void test_noreturn2() {
// CHECK: 1: B() (CXXConstructExpr, class B)
// CHECK: 2: [B6.1] (BindTemporary)
// CHECK: 3: [B6.2].operator A
-// CHECK: 4: [B6.3]()
+// CHECK: 4: [B6.2]
// CHECK: 5: [B6.4] (ImplicitCastExpr, UserDefinedConversion, class A)
// CHECK: 6: [B6.5] (BindTemporary)
// CHECK: 7: [B6.6] (ImplicitCastExpr, NoOp, const class A)
@@ -532,8 +754,8 @@ void test_noreturn2() {
// CHECK: 3: [B7.2] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(const class A &))
// CHECK: 4: B() (CXXConstructExpr, class B)
// CHECK: 5: [B7.4] (BindTemporary)
-// CHECK: 6: [B7.5].operator _Bool
-// CHECK: 7: [B7.6]()
+// CHECK: 6: [B7.5].operator bool
+// CHECK: 7: [B7.5]
// CHECK: 8: [B7.7] (ImplicitCastExpr, UserDefinedConversion, _Bool)
// CHECK: T: [B7.8] ? ... : ...
// CHECK: Preds (2): B8 B9
@@ -552,8 +774,8 @@ void test_noreturn2() {
// CHECK: 1: [B13.5] ? [B11.6] : [B12.15]
// CHECK: 2: [B10.1] (ImplicitCastExpr, NoOp, const class A)
// CHECK: 3: [B10.2]
-// CHECK: 4: const A &a = B().operator _Bool() ? A() : A(B().operator A());
-// CHECK: T: [B13.5] ? ... : ...
+// CHECK: 4: const A &a = B() ? A() : A(B());
+// CHECK: T: (Temp Dtor) [B13.5] ? ... : ...
// CHECK: Preds (2): B11 B12
// CHECK: Succs (2): B8 B9
// CHECK: [B11]
@@ -569,7 +791,7 @@ void test_noreturn2() {
// CHECK: 1: B() (CXXConstructExpr, class B)
// CHECK: 2: [B12.1] (BindTemporary)
// CHECK: 3: [B12.2].operator A
-// CHECK: 4: [B12.3]()
+// CHECK: 4: [B12.2]
// CHECK: 5: [B12.4] (ImplicitCastExpr, UserDefinedConversion, class A)
// CHECK: 6: [B12.5] (BindTemporary)
// CHECK: 7: [B12.6] (ImplicitCastExpr, NoOp, const class A)
@@ -586,8 +808,8 @@ void test_noreturn2() {
// CHECK: [B13]
// CHECK: 1: B() (CXXConstructExpr, class B)
// CHECK: 2: [B13.1] (BindTemporary)
-// CHECK: 3: [B13.2].operator _Bool
-// CHECK: 4: [B13.3]()
+// CHECK: 3: [B13.2].operator bool
+// CHECK: 4: [B13.2]
// CHECK: 5: [B13.4] (ImplicitCastExpr, UserDefinedConversion, _Bool)
// CHECK: T: [B13.5] ? ... : ...
// CHECK: Preds (1): B14
@@ -617,7 +839,7 @@ void test_noreturn2() {
// CHECK: 3: [B4.2]
// CHECK: 4: [B4.3] (CXXConstructExpr, class A)
// CHECK: 5: A a = A() ?: A();
-// CHECK: T: [B7.5] ? ... : ...
+// CHECK: T: (Temp Dtor) [B7.5] ? ... : ...
// CHECK: Preds (2): B5 B6
// CHECK: Succs (2): B2 B3
// CHECK: [B5]
@@ -639,8 +861,8 @@ void test_noreturn2() {
// CHECK: [B7]
// CHECK: 1: A() (CXXConstructExpr, class A)
// CHECK: 2: [B7.1] (BindTemporary)
-// CHECK: 3: [B7.2].operator _Bool
-// CHECK: 4: [B7.3]()
+// CHECK: 3: [B7.2].operator bool
+// CHECK: 4: [B7.2]
// CHECK: 5: [B7.4] (ImplicitCastExpr, UserDefinedConversion, _Bool)
// CHECK: T: [B7.5] ? ... : ...
// CHECK: Preds (1): B8
@@ -669,7 +891,7 @@ void test_noreturn2() {
// CHECK: 2: [B4.1] (ImplicitCastExpr, NoOp, const class A)
// CHECK: 3: [B4.2]
// CHECK: 4: [B7.3]([B4.3])
-// CHECK: T: [B7.8] ? ... : ...
+// CHECK: T: (Temp Dtor) [B7.8] ? ... : ...
// CHECK: Preds (2): B5 B6
// CHECK: Succs (2): B2 B3
// CHECK: [B5]
@@ -694,8 +916,8 @@ void test_noreturn2() {
// CHECK: 3: [B7.2] (ImplicitCastExpr, FunctionToPointerDecay, void (*)(const class A &))
// CHECK: 4: A() (CXXConstructExpr, class A)
// CHECK: 5: [B7.4] (BindTemporary)
-// CHECK: 6: [B7.5].operator _Bool
-// CHECK: 7: [B7.6]()
+// CHECK: 6: [B7.5].operator bool
+// CHECK: 7: [B7.5]
// CHECK: 8: [B7.7] (ImplicitCastExpr, UserDefinedConversion, _Bool)
// CHECK: T: [B7.8] ? ... : ...
// CHECK: Preds (2): B9 B8
@@ -709,7 +931,7 @@ void test_noreturn2() {
// CHECK: 2: [B9.1] (ImplicitCastExpr, NoOp, const class A)
// CHECK: 3: [B9.2]
// CHECK: 4: const A &a = A() ?: A();
-// CHECK: T: [B12.5] ? ... : ...
+// CHECK: T: (Temp Dtor) [B12.5] ? ... : ...
// CHECK: Preds (2): B10 B11
// CHECK: Succs (2): B7 B8
// CHECK: [B10]
@@ -731,8 +953,8 @@ void test_noreturn2() {
// CHECK: [B12]
// CHECK: 1: A() (CXXConstructExpr, class A)
// CHECK: 2: [B12.1] (BindTemporary)
-// CHECK: 3: [B12.2].operator _Bool
-// CHECK: 4: [B12.3]()
+// CHECK: 3: [B12.2].operator bool
+// CHECK: 4: [B12.2]
// CHECK: 5: [B12.4] (ImplicitCastExpr, UserDefinedConversion, _Bool)
// CHECK: T: [B12.5] ? ... : ...
// CHECK: Preds (1): B13
@@ -828,7 +1050,7 @@ void test_noreturn2() {
// CHECK: 2: A() (CXXConstructExpr, class A)
// CHECK: 3: [B1.2] (BindTemporary)
// CHECK: 4: [B1.3].operator int
-// CHECK: 5: [B1.4]()
+// CHECK: 5: [B1.3]
// CHECK: 6: [B1.5] (ImplicitCastExpr, UserDefinedConversion, int)
// CHECK: 7: a
// CHECK: 8: [B1.7] = [B1.6]
@@ -844,13 +1066,13 @@ void test_noreturn2() {
// CHECK: 1: A() (CXXConstructExpr, class A)
// CHECK: 2: [B1.1] (BindTemporary)
// CHECK: 3: [B1.2].operator int
-// CHECK: 4: [B1.3]()
+// CHECK: 4: [B1.2]
// CHECK: 5: [B1.4] (ImplicitCastExpr, UserDefinedConversion, int)
// CHECK: 6: int([B1.5]) (CXXFunctionalCastExpr, NoOp, int)
// CHECK: 7: B() (CXXConstructExpr, class B)
// CHECK: 8: [B1.7] (BindTemporary)
// CHECK: 9: [B1.8].operator int
-// CHECK: 10: [B1.9]()
+// CHECK: 10: [B1.8]
// CHECK: 11: [B1.10] (ImplicitCastExpr, UserDefinedConversion, int)
// CHECK: 12: int([B1.11]) (CXXFunctionalCastExpr, NoOp, int)
// CHECK: 13: [B1.6] + [B1.12]
@@ -863,13 +1085,12 @@ void test_noreturn2() {
// CHECK: Succs (1): B0
// CHECK: [B0 (EXIT)]
// CHECK: Preds (1): B1
-
// CHECK: [B3 (ENTRY)]
// CHECK: Succs (1): B2
// CHECK: [B1]
// CHECK: 1: int b;
// CHECK: Succs (1): B0
-// CHECK: [B2]
+// CHECK: [B2 (NORETURN)]
// CHECK: 1: int a;
// CHECK: 2: NoReturn() (CXXConstructExpr, class NoReturn)
// CHECK: 3: [B2.2] (BindTemporary)
@@ -880,13 +1101,12 @@ void test_noreturn2() {
// CHECK: Succs (1): B0
// CHECK: [B0 (EXIT)]
// CHECK: Preds (2): B1 B2
-
// CHECK: [B3 (ENTRY)]
// CHECK: Succs (1): B2
// CHECK: [B1]
// CHECK: 1: int b;
// CHECK: Succs (1): B0
-// CHECK: [B2]
+// CHECK: [B2 (NORETURN)]
// CHECK: 1: int a;
// CHECK: 2: NoReturn() (CXXConstructExpr, class NoReturn)
// CHECK: 3: [B2.2] (BindTemporary)
@@ -897,3 +1117,169 @@ void test_noreturn2() {
// CHECK: Succs (1): B0
// CHECK: [B0 (EXIT)]
// CHECK: Preds (2): B1 B2
+// CHECK: int testConsistencyNestedSimple(bool value)
+// CHECK: [B9 (ENTRY)]
+// CHECK: Succs (1): B8
+// CHECK: [B1]
+// CHECK: 1: 0
+// CHECK: 2: return [B1.1];
+// CHECK: Preds (2): B3 B8
+// CHECK: Succs (1): B0
+// CHECK: [B2]
+// CHECK: 1: 1
+// CHECK: 2: return [B2.1];
+// CHECK: Preds (1): B3
+// CHECK: Succs (1): B0
+// CHECK: [B3]
+// CHECK: T: if [B5.1]
+// CHECK: Preds (1): B5
+// CHECK: Succs (2): B2 B1
+// CHECK: [B4 (NORETURN)]
+// CHECK: 1: ~NoReturn() (Temporary object destructor)
+// CHECK: Preds (1): B5
+// CHECK: Succs (1): B0
+// CHECK: [B5]
+// CHECK: 1: [B7.3] || [B6.7]
+// CHECK: T: (Temp Dtor) [B7.3] || ...
+// CHECK: Preds (2): B6 B7
+// CHECK: Succs (2): B3 B4
+// CHECK: [B6]
+// CHECK: 1: check
+// CHECK: 2: [B6.1] (ImplicitCastExpr, FunctionToPointerDecay, _Bool (*)(const class NoReturn &))
+// CHECK: 3: NoReturn() (CXXConstructExpr, class NoReturn)
+// CHECK: 4: [B6.3] (BindTemporary)
+// CHECK: 5: [B6.4] (ImplicitCastExpr, NoOp, const class NoReturn)
+// CHECK: 6: [B6.5]
+// CHECK: 7: [B6.2]([B6.6])
+// CHECK: Preds (1): B7
+// CHECK: Succs (1): B5
+// CHECK: [B7]
+// CHECK: 1: value
+// CHECK: 2: [B7.1] (ImplicitCastExpr, LValueToRValue, _Bool)
+// CHECK: 3: ![B7.2]
+// CHECK: T: [B7.3] || ...
+// CHECK: Preds (1): B8
+// CHECK: Succs (2): B5 B6
+// CHECK: [B8]
+// CHECK: 1: value
+// CHECK: 2: [B8.1] (ImplicitCastExpr, LValueToRValue, _Bool)
+// CHECK: T: if [B8.2]
+// CHECK: Preds (1): B9
+// CHECK: Succs (2): B7 B1
+// CHECK: [B0 (EXIT)]
+// CHECK: Preds (3): B1 B2 B4
+// CHECK: int testConsistencyNestedComplex(bool value)
+// CHECK: [B10 (ENTRY)]
+// CHECK: Succs (1): B9
+// CHECK: [B1]
+// CHECK: 1: 0
+// CHECK: 2: return [B1.1];
+// CHECK: Preds (2): B3 B9
+// CHECK: Succs (1): B0
+// CHECK: [B2]
+// CHECK: 1: 1
+// CHECK: 2: return [B2.1];
+// CHECK: Preds (1): B3
+// CHECK: Succs (1): B0
+// CHECK: [B3]
+// CHECK: T: if [B5.1]
+// CHECK: Preds (1): B5
+// CHECK: Succs (2): B2 B1
+// CHECK: [B4 (NORETURN)]
+// CHECK: 1: ~NoReturn() (Temporary object destructor)
+// CHECK: Preds (1): B5
+// CHECK: Succs (1): B0
+// CHECK: [B5]
+// CHECK: 1: [B8.3] || [B7.3] || [B6.7]
+// CHECK: T: (Temp Dtor) [B8.3] || [B7.3] || ...
+// CHECK: Preds (3): B6 B7 B8
+// CHECK: Succs (2): B3 B4
+// CHECK: [B6]
+// CHECK: 1: check
+// CHECK: 2: [B6.1] (ImplicitCastExpr, FunctionToPointerDecay, _Bool (*)(const class NoReturn &))
+// CHECK: 3: NoReturn() (CXXConstructExpr, class NoReturn)
+// CHECK: 4: [B6.3] (BindTemporary)
+// CHECK: 5: [B6.4] (ImplicitCastExpr, NoOp, const class NoReturn)
+// CHECK: 6: [B6.5]
+// CHECK: 7: [B6.2]([B6.6])
+// CHECK: Preds (1): B7
+// CHECK: Succs (1): B5
+// CHECK: [B7]
+// CHECK: 1: value
+// CHECK: 2: [B7.1] (ImplicitCastExpr, LValueToRValue, _Bool)
+// CHECK: 3: ![B7.2]
+// CHECK: T: [B8.3] || [B7.3] || ...
+// CHECK: Preds (1): B8
+// CHECK: Succs (2): B5 B6
+// CHECK: [B8]
+// CHECK: 1: value
+// CHECK: 2: [B8.1] (ImplicitCastExpr, LValueToRValue, _Bool)
+// CHECK: 3: ![B8.2]
+// CHECK: T: [B8.3] || ...
+// CHECK: Preds (1): B9
+// CHECK: Succs (2): B5 B7
+// CHECK: [B9]
+// CHECK: 1: value
+// CHECK: 2: [B9.1] (ImplicitCastExpr, LValueToRValue, _Bool)
+// CHECK: T: if [B9.2]
+// CHECK: Preds (1): B10
+// CHECK: Succs (2): B8 B1
+// CHECK: [B0 (EXIT)]
+// CHECK: Preds (3): B1 B2 B4
+// CHECK: int testConsistencyNestedNormalReturn(bool value)
+// CHECK: [B10 (ENTRY)]
+// CHECK: Succs (1): B9
+// CHECK: [B1]
+// CHECK: 1: 0
+// CHECK: 2: return [B1.1];
+// CHECK: Preds (2): B3 B9
+// CHECK: Succs (1): B0
+// CHECK: [B2]
+// CHECK: 1: 1
+// CHECK: 2: return [B2.1];
+// CHECK: Preds (1): B3
+// CHECK: Succs (1): B0
+// CHECK: [B3]
+// CHECK: T: if [B5.1]
+// CHECK: Preds (1): B5
+// CHECK: Succs (2): B2 B1
+// CHECK: [B4 (NORETURN)]
+// CHECK: 1: ~NoReturn() (Temporary object destructor)
+// CHECK: Preds (1): B5
+// CHECK: Succs (1): B0
+// CHECK: [B5]
+// CHECK: 1: [B8.3] || [B7.2] || [B6.7]
+// CHECK: T: (Temp Dtor) [B8.3] || [B7.2] || ...
+// CHECK: Preds (3): B6 B7 B8
+// CHECK: Succs (2): B3 B4
+// CHECK: [B6]
+// CHECK: 1: check
+// CHECK: 2: [B6.1] (ImplicitCastExpr, FunctionToPointerDecay, _Bool (*)(const class NoReturn &))
+// CHECK: 3: NoReturn() (CXXConstructExpr, class NoReturn)
+// CHECK: 4: [B6.3] (BindTemporary)
+// CHECK: 5: [B6.4] (ImplicitCastExpr, NoOp, const class NoReturn)
+// CHECK: 6: [B6.5]
+// CHECK: 7: [B6.2]([B6.6])
+// CHECK: Preds (1): B7
+// CHECK: Succs (1): B5
+// CHECK: [B7]
+// CHECK: 1: value
+// CHECK: 2: [B7.1] (ImplicitCastExpr, LValueToRValue, _Bool)
+// CHECK: T: [B8.3] || [B7.2] || ...
+// CHECK: Preds (1): B8
+// CHECK: Succs (2): B5 B6
+// CHECK: [B8]
+// CHECK: 1: value
+// CHECK: 2: [B8.1] (ImplicitCastExpr, LValueToRValue, _Bool)
+// CHECK: 3: ![B8.2]
+// CHECK: T: [B8.3] || ...
+// CHECK: Preds (1): B9
+// CHECK: Succs (2): B5 B7
+// CHECK: [B9]
+// CHECK: 1: value
+// CHECK: 2: [B9.1] (ImplicitCastExpr, LValueToRValue, _Bool)
+// CHECK: T: if [B9.2]
+// CHECK: Preds (1): B10
+// CHECK: Succs (2): B8 B1
+// CHECK: [B0 (EXIT)]
+// CHECK: Preds (3): B1 B2 B4
diff --git a/test/Analysis/temporaries.cpp b/test/Analysis/temporaries.cpp
index 6b49fcbddd41..c57d984a1dc8 100644
--- a/test/Analysis/temporaries.cpp
+++ b/test/Analysis/temporaries.cpp
@@ -118,13 +118,11 @@ namespace destructors {
extern bool coin();
extern bool check(const Dtor &);
-#ifndef TEMPORARY_DTORS
- // FIXME: Don't crash here when tmp dtros are enabled.
- // PR16664 and PR18159
+ // Regression test: we used to assert here when tmp dtors are enabled.
+ // PR16664 and PR18159
if (coin() && (coin() || coin() || check(Dtor()))) {
Dtor();
}
-#endif
}
#ifdef TEMPORARY_DTORS
@@ -170,18 +168,16 @@ namespace destructors {
clang_analyzer_eval(true); // no warning, unreachable code
}
-
-/*
- // PR16664 and PR18159
- FIXME: Don't crash here.
+ // Regression test: we used to assert here.
+ // PR16664 and PR18159
void testConsistencyNested(int i) {
extern bool compute(bool);
-
+
if (i == 5 && (i == 4 || i == 5 || check(NoReturnDtor())))
- clang_analyzer_eval(true); // expected TRUE
-
+ clang_analyzer_eval(true); // expected-warning{{TRUE}}
+
if (i == 5 && (i == 4 || i == 5 || check(NoReturnDtor())))
- clang_analyzer_eval(true); // expected TRUE
+ clang_analyzer_eval(true); // expected-warning{{TRUE}}
if (i != 5)
return;
@@ -190,17 +186,54 @@ namespace destructors {
(i == 4 || compute(true) ||
compute(i == 5 && (i == 4 || check(NoReturnDtor()))))) ||
i != 4) {
- clang_analyzer_eval(true); // expected TRUE
+ clang_analyzer_eval(true); // expected-warning{{TRUE}}
}
if (compute(i == 5 &&
(i == 4 || i == 4 ||
compute(i == 5 && (i == 4 || check(NoReturnDtor()))))) ||
i != 4) {
- clang_analyzer_eval(true); // no warning, unreachable code
+ // FIXME: This shouldn't cause a warning.
+ clang_analyzer_eval(true); // expected-warning{{TRUE}}
}
- }*/
-
+ }
+
+ // PR16664 and PR18159
+ void testConsistencyNestedSimple(bool value) {
+ if (value) {
+ if (!value || check(NoReturnDtor())) {
+ clang_analyzer_eval(true); // no warning, unreachable code
+ }
+ }
+ }
+
+ // PR16664 and PR18159
+ void testConsistencyNestedComplex(bool value) {
+ if (value) {
+ if (!value || !value || check(NoReturnDtor())) {
+ // FIXME: This shouldn't cause a warning.
+ clang_analyzer_eval(true); // expected-warning{{TRUE}}
+ }
+ }
+ }
+
+ // PR16664 and PR18159
+ void testConsistencyNestedWarning(bool value) {
+ if (value) {
+ if (!value || value || check(NoReturnDtor())) {
+ clang_analyzer_eval(true); // expected-warning{{TRUE}}
+ }
+ }
+ }
+
+ void testBinaryOperatorShortcut(bool value) {
+ if (value) {
+ if (false && false && check(NoReturnDtor()) && true) {
+ clang_analyzer_eval(true);
+ }
+ }
+ }
+
#endif // TEMPORARY_DTORS
}
diff --git a/test/Analysis/test-after-div-zero.c b/test/Analysis/test-after-div-zero.c
new file mode 100644
index 000000000000..f34c4f7a3661
--- /dev/null
+++ b/test/Analysis/test-after-div-zero.c
@@ -0,0 +1,204 @@
+// RUN: %clang_cc1 -std=c99 -Dbool=_Bool -analyze -analyzer-checker=core,alpha.core.TestAfterDivZero -analyzer-output=text -verify %s
+// RUN: %clang_cc1 -x c++ -analyze -analyzer-checker=core,alpha.core.TestAfterDivZero -analyzer-output=text -verify %s
+
+int var;
+
+void err_eq(int x) {
+ var = 77 / x; // expected-note {{Division with compared value made here}}
+ if (x == 0) { } // expected-warning {{Value being compared against zero has already been used for division}}
+} // expected-note@-1 {{Value being compared against zero has already been used for division}}
+
+void err_eq2(int x) {
+ var = 77 / x; // expected-note {{Division with compared value made here}}
+ if (0 == x) { } // expected-warning {{Value being compared against zero has already been used for division}}
+} // expected-note@-1 {{Value being compared against zero has already been used for division}}
+
+void err_ne(int x) {
+ var = 77 / x; // expected-note {{Division with compared value made here}}
+ if (x != 0) { } // expected-warning {{Value being compared against zero has already been used for division}}
+} // expected-note@-1 {{Value being compared against zero has already been used for division}}
+
+void err_ge(int x) {
+ var = 77 / x; // expected-note {{Division with compared value made here}}
+ if (x >= 0) { } // expected-warning {{Value being compared against zero has already been used for division}}
+} // expected-note@-1 {{Value being compared against zero has already been used for division}}
+
+void err_le(int x) {
+ var = 77 / x; // expected-note {{Division with compared value made here}}
+ if (x <= 0) {} // expected-warning {{Value being compared against zero has already been used for division}}
+} // expected-note@-1 {{Value being compared against zero has already been used for division}}
+
+void err_yes(int x) {
+ var = 77 / x; // expected-note {{Division with compared value made here}}
+ if (x) {} // expected-warning {{Value being compared against zero has already been used for division}}
+} // expected-note@-1 {{Value being compared against zero has already been used for division}}
+void err_not(int x) {
+ var = 77 / x; // expected-note {{Division with compared value made here}}
+ if (!x) {} // expected-warning {{Value being compared against zero has already been used for division}}
+} // expected-note@-1 {{Value being compared against zero has already been used for division}}
+
+void err_pnot(int x) {
+ int *y = &x;
+ var = 77 / *y; // expected-note {{Division with compared value made here}}
+ if (!x) {} // expected-warning {{Value being compared against zero has already been used for division}}
+} // expected-note@-1 {{Value being compared against zero has already been used for division}}
+
+void err_pnot2(int x) {
+ int *y = &x;
+ var = 77 / x; // expected-note {{Division with compared value made here}}
+ if (!*y) {} // expected-warning {{Value being compared against zero has already been used for division}}
+} // expected-note@-1 {{Value being compared against zero has already been used for division}}
+
+void err_ppnot(int x) {
+ int *y = &x;
+ int **z = &y;
+ var = 77 / **z; // expected-note {{Division with compared value made here}}
+ if (!x) {} // expected-warning {{Value being compared against zero has already been used for division}}
+} // expected-note@-1 {{Value being compared against zero has already been used for division}}
+
+void err_orig_checker(int x) {
+ if (x != 0) // expected-note {{Assuming 'x' is equal to 0}} expected-note {{Taking false branch}}
+ return;
+ var = 77 / x; // expected-warning {{Division by zero}} expected-note {{Division by zero}}
+ if (!x) {} // no-warning
+}
+
+void ok_other(int x, int y) {
+ var = 77 / y;
+ if (x == 0) {
+ }
+}
+
+void ok_assign(int x) {
+ var = 77 / x;
+ x = var / 77; // <- assignment => don't warn
+ if (x == 0) {
+ }
+}
+
+void ok_assign2(int x) {
+ var = 77 / x;
+ x = var / 77; // <- assignment => don't warn
+ if (0 == x) {
+ }
+}
+
+void ok_dec(int x) {
+ var = 77 / x;
+ x--; // <- assignment => don't warn
+ if (x == 0) {
+ }
+}
+
+void ok_inc(int x) {
+ var = 77 / x;
+ x++; // <- assignment => don't warn
+ if (x == 0) {
+ }
+}
+
+void do_something_ptr(int *x);
+void ok_callfunc_ptr(int x) {
+ var = 77 / x;
+ do_something_ptr(&x); // <- pass address of x to function => don't warn
+ if (x == 0) {
+ }
+}
+
+void do_something(int x);
+void nok_callfunc(int x) {
+ var = 77 / x; // expected-note {{Division with compared value made here}}
+ do_something(x);
+ if (x == 0) {} // expected-warning {{Value being compared against zero has already been used for division}}
+} // expected-note@-1 {{Value being compared against zero has already been used for division}}
+
+void ok_if(int x) {
+ if (x > 3)
+ var = 77 / x;
+ if (x == 0) {
+ }
+}
+
+void ok_if2(int x) {
+ if (x < 3)
+ var = 77 / x;
+ if (x == 0) {
+ } // TODO warn here
+}
+
+void ok_pif(int x) {
+ int *y = &x;
+ if (x < 3)
+ var = 77 / *y;
+ if (x == 0) {
+ } // TODO warn here
+}
+
+int getValue(bool *isPositive);
+void use(int a);
+void foo() {
+ bool isPositive;
+ int x = getValue(&isPositive);
+ if (isPositive) {
+ use(5 / x);
+ }
+
+ if (x == 0) {
+ }
+}
+
+int getValue2();
+void foo2() {
+ int x = getValue2();
+ int y = x;
+
+ use(5 / x); // expected-note {{Division with compared value made here}}
+ if (y == 0) {} // expected-warning {{Value being compared against zero has already been used for division}}
+} // expected-note@-1 {{Value being compared against zero has already been used for division}}
+
+void ok_while(int x) {
+ int n = 100 / x;
+ while (x != 0) { // <- do not warn
+ x--;
+ }
+}
+
+void err_not2(int x, int y) {
+ int v;
+ var = 77 / x;
+
+ if (y)
+ v = 0;
+
+ if (!x) {
+ } // TODO warn here
+}
+
+inline void inline_func(int x) {
+ var = 77 / x; // expected-note {{Division with compared value made here}}
+ if (x == 0) {} // expected-warning {{Value being compared against zero has already been used for division}}
+} // expected-note@-1 {{Value being compared against zero has already been used for division}}
+
+void err_inline(int x) {
+ var = 77 / x;
+ inline_func(x); // expected-note {{Calling 'inline_func'}}
+ if (x == 0) {
+ }
+}
+
+inline void inline_func2(int x) {}
+
+void err_inline2(int x) {
+ var = 77 / x; // expected-note {{Division with compared value made here}}
+ inline_func2(x);
+ if (x == 0) {} // expected-warning {{Value being compared against zero has already been used for division}}
+} // expected-note@-1 {{Value being compared against zero has already been used for division}}
+
+inline void inline_func3(int x) {
+ var = 77 / x;
+}
+void ok_inline(int x) {
+ var = 77 / x; // expected-note {{Division with compared value made here}}
+ inline_func3(x);
+ if (x == 0) {} // expected-warning {{Value being compared against zero has already been used for division}}
+} // expected-note@-1 {{Value being compared against zero has already been used for division}}
diff --git a/test/Analysis/uninit-const.c b/test/Analysis/uninit-const.c
new file mode 100644
index 000000000000..9e42d23214de
--- /dev/null
+++ b/test/Analysis/uninit-const.c
@@ -0,0 +1,216 @@
+// RUN: %clang_cc1 -analyze -analyzer-checker=unix.Malloc,core,alpha.core.CallAndMessageUnInitRefArg -analyzer-output=text -verify %s
+
+// Passing uninitialized const data to function
+#include "Inputs/system-header-simulator.h"
+
+typedef __typeof(sizeof(int)) size_t;
+void *malloc(size_t);
+void *valloc(size_t);
+void free(void *);
+
+
+void doStuff3(const int y){}
+void doStuff2(int g){}
+void doStuff_pointerToConstInt(const int *u){};
+void doStuff_arrayOfConstInt(const int a[]){};
+
+void doStuff_constPointerToConstInt (int const * const u){};
+void doStuff_constPointerToConstPointerToConstInt(int const * const * const u){};
+void doStuff_pointerToConstPointerToConstInt(int const * const * u){};
+void doStuff_pointerToPointerToConstInt (int const **u){};
+void doStuff_constStaticSizedArray(const int a[static 10]) {}
+void doStuff_variadic(const int *u, ...){};
+
+void f_1(void) {
+ int t;
+ int* tp = &t; // expected-note {{'tp' initialized here}}
+ doStuff_pointerToConstInt(tp); // expected-warning {{Function call argument is a pointer to uninitialized value}}
+ // expected-note@-1 {{Function call argument is a pointer to uninitialized value}}
+}
+
+void f_1_1(void) {
+ int t;
+ int* tp1 = &t;
+ int* tp2 = tp1; // expected-note {{'tp2' initialized here}}
+ doStuff_pointerToConstInt(tp2); // expected-warning {{Function call argument is a pointer to uninitialized value}}
+ // expected-note@-1 {{Function call argument is a pointer to uninitialized value}}
+}
+
+
+int *f_2_sub(int *p) {
+ return p;
+}
+
+void f_2(void) {
+ int t;
+ int* p = f_2_sub(&t);
+ int* tp = p; // expected-note {{'tp' initialized here}}
+ doStuff_pointerToConstInt(tp); // expected-warning {{Function call argument is a pointer to uninitialized value}}
+ // expected-note@-1 {{Function call argument is a pointer to uninitialized value}}
+}
+
+int z;
+void f_3(void) {
+ doStuff_pointerToConstInt(&z); // no warning
+}
+
+void f_4(void) {
+ int x=5;
+ doStuff_pointerToConstInt(&x); // no warning
+}
+
+void f_5(void) {
+ int ta[5];
+ int* tp = ta; // expected-note {{'tp' initialized here}}
+ doStuff_pointerToConstInt(tp); // expected-warning {{Function call argument is a pointer to uninitialized value}}
+ // expected-note@-1 {{Function call argument is a pointer to uninitialized value}}
+}
+
+void f_5_1(void) {
+ int ta[5]; // expected-note {{'ta' initialized here}}
+ doStuff_pointerToConstInt(ta); // expected-warning {{Function call argument is a pointer to uninitialized value}}
+ // expected-note@-1 {{Function call argument is a pointer to uninitialized value}}
+}
+
+void f_6(void) {
+ int ta[5] = {1,2,3,4,5};
+ int* tp = ta;
+ doStuff_pointerToConstInt(tp); // no-warning
+}
+
+void f_6_1(void) {
+ int ta[5] = {1,2,3,4,5};
+ doStuff_pointerToConstInt(ta); // no-warning
+}
+
+void f_7(void) {
+ int z; // expected-note {{'z' declared without an initial value}}
+ int y=z; // expected-warning {{Assigned value is garbage or undefined}}
+ // expected-note@-1 {{Assigned value is garbage or undefined}}
+ doStuff3(y);
+}
+
+void f_8(void) {
+ int g; // expected-note {{'g' declared without an initial value}}
+ doStuff2(g); // expected-warning {{Function call argument is an uninitialized value}}
+ // expected-note@-1 {{Function call argument is an uninitialized value}}
+}
+
+void f_9(void) {
+ int a[6];
+ int const *ptau = a; // expected-note {{'ptau' initialized here}}
+ doStuff_arrayOfConstInt(ptau); // expected-warning {{Function call argument is a pointer to uninitialized value}}
+ // expected-note@-1 {{Function call argument is a pointer to uninitialized value}}
+}
+
+void f_10(void) {
+ int a[6]; // expected-note {{'a' initialized here}}
+ doStuff_arrayOfConstInt(a); // expected-warning {{Function call argument is a pointer to uninitialized value}}
+ // expected-note@-1 {{Function call argument is a pointer to uninitialized value}}
+}
+
+void f_11(void) {
+ int t[10]; //expected-note {{'t' initialized here}}
+ doStuff_constStaticSizedArray(t); // expected-warning {{Function call argument is a pointer to uninitialized value}}
+ // expected-note@-1 {{Function call argument is a pointer to uninitialized value}}
+}
+
+void f_12(void) {
+ int t[10] = {0,1,2,3,4,5,6,7,8,9};
+ doStuff_constStaticSizedArray(t); // no-warning
+
+}
+
+int f_malloc_1(void) {
+ int *ptr;
+
+ ptr = (int *)malloc(sizeof(int)); // expected-note {{Value assigned to 'ptr'}}
+
+ doStuff_pointerToConstInt(ptr); // expected-warning {{Function call argument is a pointer to uninitialized value}}
+ // expected-note@-1 {{Function call argument is a pointer to uninitialized value}}
+ free(ptr);
+ return 0;
+}
+
+int f_malloc_2(void) {
+ int *ptr;
+
+ ptr = (int *)malloc(sizeof(int));
+ *ptr = 25;
+
+ doStuff_pointerToConstInt(ptr); // no warning
+ free(ptr);
+ return 0;
+}
+
+// uninit pointer, uninit val
+void f_variadic_unp_unv(void) {
+ int t;
+ int v;
+ int* tp = &t; // expected-note {{'tp' initialized here}}
+ doStuff_variadic(tp,v); // expected-warning {{Function call argument is a pointer to uninitialized value}}
+ // expected-note@-1 {{Function call argument is a pointer to uninitialized value}}
+}
+// uninit pointer, init val
+void f_variadic_unp_inv(void) {
+ int t;
+ int v = 3;
+ int* tp = &t; // expected-note {{'tp' initialized here}}
+ doStuff_variadic(tp,v); // expected-warning {{Function call argument is a pointer to uninitialized value}}
+ // expected-note@-1 {{Function call argument is a pointer to uninitialized value}}
+}
+
+// init pointer, uninit val
+void f_variadic_inp_unv(void) {
+ int t=5;
+ int v; // expected-note {{'v' declared without an initial value}}
+ int* tp = &t;
+ doStuff_variadic(tp,v);// expected-warning {{Function call argument is an uninitialized value}}
+ // expected-note@-1 {{Function call argument is an uninitialized value}}
+}
+
+// init pointer, init val
+void f_variadic_inp_inv(void) {
+ int t=5;
+ int v = 3;
+ int* tp = &t;
+ doStuff_variadic(tp,v); // no-warning
+}
+
+// init pointer, init pointer
+void f_variadic_inp_inp(void) {
+ int t=5;
+ int u=3;
+ int *vp = &u ;
+ int *tp = &t;
+ doStuff_variadic(tp,vp); // no-warning
+}
+
+//uninit pointer, init pointer
+void f_variadic_unp_inp(void) {
+ int t;
+ int u=3;
+ int *vp = &u ;
+ int *tp = &t; // expected-note {{'tp' initialized here}}
+ doStuff_variadic(tp,vp); // expected-warning {{Function call argument is a pointer to uninitialized value}}
+ // expected-note@-1 {{Function call argument is a pointer to uninitialized value}}
+}
+
+//init pointer, uninit pointer
+void f_variadic_inp_unp(void) {
+ int t=5;
+ int u;
+ int *vp = &u ;
+ int *tp = &t;
+ doStuff_variadic(tp,vp); // no-warning
+}
+
+//uninit pointer, uninit pointer
+void f_variadic_unp_unp(void) {
+ int t;
+ int u;
+ int *vp = &u ;
+ int *tp = &t; // expected-note {{'tp' initialized here}}
+ doStuff_variadic(tp,vp); // expected-warning {{Function call argument is a pointer to uninitialized value}}
+ // expected-note@-1 {{Function call argument is a pointer to uninitialized value}}
+}
diff --git a/test/Analysis/uninit-const.cpp b/test/Analysis/uninit-const.cpp
new file mode 100644
index 000000000000..56bfa08e4176
--- /dev/null
+++ b/test/Analysis/uninit-const.cpp
@@ -0,0 +1,128 @@
+// RUN: %clang_cc1 -analyze -analyzer-checker=cplusplus.NewDelete,core,alpha.core.CallAndMessageUnInitRefArg -analyzer-output=text -verify %s
+// Passing uninitialized const data to unknown function
+
+#include "Inputs/system-header-simulator-cxx.h"
+
+void doStuff6(const int& c);
+void doStuff4(const int y);
+void doStuff3(int& g);
+void doStuff_uninit(const int *u);
+
+
+int f10(void) {
+ int *ptr;
+
+ ptr = new int; //
+ if(*ptr) {
+ doStuff4(*ptr);
+ }
+ delete ptr;
+ return 0;
+}
+
+int f9(void) {
+ int *ptr;
+
+ ptr = new int; //
+
+ doStuff_uninit(ptr); // no warning
+ delete ptr;
+ return 0;
+}
+
+int f8(void) {
+ int *ptr;
+
+ ptr = new int;
+ *ptr = 25;
+
+ doStuff_uninit(ptr); // no warning?
+ delete ptr;
+ return 0;
+}
+
+void f7(void) {
+ int m = 3;
+ doStuff6(m); // no warning
+}
+
+
+int& f6_1_sub(int &p) {
+ return p;
+}
+
+void f6_1(void) {
+ int t;
+ int p = f6_1_sub(t); //expected-warning {{Assigned value is garbage or undefined}}
+ //expected-note@-1 {{Calling 'f6_1_sub'}}
+ //expected-note@-2 {{Returning from 'f6_1_sub'}}
+ //expected-note@-3 {{Assigned value is garbage or undefined}}
+ int q = p;
+ doStuff6(q);
+}
+
+void f6_2(void) {
+ int t; //expected-note {{'t' declared without an initial value}}
+ int &p = t;
+ int &s = p;
+ int &q = s; //expected-note {{'q' initialized here}}
+ doStuff6(q); //expected-warning {{Function call argument is an uninitialized value}}
+ //expected-note@-1 {{Function call argument is an uninitialized value}}
+}
+
+void doStuff6_3(int& q_, int *ptr_) {}
+
+void f6_3(void) {
+ int *ptr; //expected-note {{'ptr' declared without an initial value}}
+ int t;
+ int &p = t;
+ int &s = p;
+ int &q = s;
+ doStuff6_3(q,ptr); //expected-warning {{Function call argument is an uninitialized value}}
+ //expected-note@-1 {{Function call argument is an uninitialized value}}
+
+}
+
+void f6(void) {
+ int k; // expected-note {{'k' declared without an initial value}}
+ doStuff6(k); // expected-warning {{Function call argument is an uninitialized value}}
+ // expected-note@-1 {{Function call argument is an uninitialized value}}
+
+}
+
+
+
+void f5(void) {
+ int t;
+ int* tp = &t; // expected-note {{'tp' initialized here}}
+ doStuff_uninit(tp); // expected-warning {{Function call argument is a pointer to uninitialized value}}
+ // expected-note@-1 {{Function call argument is a pointer to uninitialized value}}
+}
+
+
+void f4(void) {
+ int y; // expected-note {{'y' declared without an initial value}}
+ doStuff4(y); // expected-warning {{Function call argument is an uninitialized value}}
+ // expected-note@-1 {{Function call argument is an uninitialized value}}
+}
+
+void f3(void) {
+ int g;
+ doStuff3(g); // no warning
+}
+
+int z;
+void f2(void) {
+ doStuff_uninit(&z); // no warning
+}
+
+void f1(void) {
+ int x_=5;
+ doStuff_uninit(&x_); // no warning
+}
+
+void f_uninit(void) {
+ int x;
+ doStuff_uninit(&x); // expected-warning {{Function call argument is a pointer to uninitialized value}}
+ // expected-note@-1 {{Function call argument is a pointer to uninitialized value}}
+}
diff --git a/test/Analysis/uninit-vals-ps-region.m b/test/Analysis/uninit-vals-ps-region.m
index a4aa5a114aeb..87256b3b4b1b 100644
--- a/test/Analysis/uninit-vals-ps-region.m
+++ b/test/Analysis/uninit-vals-ps-region.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-store=region -analyzer-checker=core,alpha.deadcode.IdempotentOperations -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-store=region -analyzer-checker=core -verify %s
struct s {
int data;
@@ -42,7 +42,7 @@ void test_uninit_pos_3() {
void test_uninit_neg() {
struct TestUninit v1 = { 0, 0 };
struct TestUninit v2 = test_uninit_aux();
- test_unit_aux2(v2.x + v1.y); // expected-warning{{The right operand to '+' is always 0}}
+ test_unit_aux2(v2.x + v1.y);
}
extern void test_uninit_struct_arg_aux(struct TestUninit arg);
diff --git a/test/Analysis/weak-functions.c b/test/Analysis/weak-functions.c
index 96e3b44d03b8..a983f92f81aa 100644
--- a/test/Analysis/weak-functions.c
+++ b/test/Analysis/weak-functions.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection,unix.Malloc,unix.cstring,alpha.unix.cstring,unix.API,osx.API,osx.cocoa.RetainCount -Wno-null-dereference -analyzer-store=region -fblocks -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=core,alpha.core,debug.ExprInspection,unix.Malloc,unix.cstring,alpha.unix.cstring,unix.API,osx.API,osx.cocoa.RetainCount -Wno-null-dereference -Wno-tautological-compare -analyzer-store=region -fblocks -verify %s
#define NULL 0
void clang_analyzer_eval(int);
void myFunc();
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index a11b83a854cb..591a9272ae6d 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,11 +1,13 @@
# Test runner infrastructure for Clang. This configures the Clang test trees
# for use by Lit, and delegates to LLVM's lit test handlers.
-#
-# If this is a stand-alone Clang build, we fake up our own Lit support here
-# rather than relying on LLVM's.
-set(CLANG_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/..")
-set(CLANG_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/..")
+if (CMAKE_CFG_INTDIR STREQUAL ".")
+ set(LLVM_BUILD_MODE ".")
+else ()
+ set(LLVM_BUILD_MODE "%(build_mode)s")
+endif ()
+
+string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} CLANG_TOOLS_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
configure_lit_site_cfg(
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.in
@@ -17,81 +19,58 @@ configure_lit_site_cfg(
${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
)
-if( PATH_TO_LLVM_BUILD )
- set(CLANG_TEST_EXTRA_ARGS "--path=${CLANG_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}")
-endif()
-
option(CLANG_TEST_USE_VG "Run Clang tests under Valgrind" OFF)
if(CLANG_TEST_USE_VG)
set(CLANG_TEST_EXTRA_ARGS ${CLANG_TEST_EXTRA_ARGS} "--vg")
endif ()
-set(CLANG_TEST_DEPS
+list(APPEND CLANG_TEST_DEPS
clang clang-headers
- c-index-test diagtool arcmt-test c-arcmt-test
clang-check clang-format
- )
-set(CLANG_TEST_PARAMS
- clang_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
+ c-index-test diagtool
+ clang-tblgen
)
-if(CLANG_INCLUDE_TESTS)
- list(APPEND CLANG_TEST_DEPS ClangUnitTests)
- list(APPEND CLANG_TEST_PARAMS
- clang_unit_site_config=${CMAKE_CURRENT_BINARY_DIR}/Unit/lit.site.cfg
- )
-endif()
+if (CLANG_ENABLE_ARCMT)
+ list(APPEND CLANG_TEST_DEPS
+ arcmt-test
+ c-arcmt-test
+ )
+endif ()
-if( NOT CLANG_BUILT_STANDALONE )
+if (ENABLE_CLANG_EXAMPLES)
list(APPEND CLANG_TEST_DEPS
- llc opt FileCheck count not llvm-symbolizer
+ clang-interpreter
+ PrintFunctionNames
)
+endif ()
- add_lit_testsuite(check-clang "Running the Clang regression tests"
- ${CMAKE_CURRENT_BINARY_DIR}
- PARAMS ${CLANG_TEST_PARAMS}
- DEPENDS ${CLANG_TEST_DEPS}
- ARGS ${CLANG_TEST_EXTRA_ARGS}
+if (ENABLE_CLANG_STATIC_ANALYZER AND ENABLE_CLANG_EXAMPLES)
+ list(APPEND CLANG_TEST_DEPS
+ SampleAnalyzerPlugin
)
- set_target_properties(check-clang PROPERTIES FOLDER "Clang tests")
-
-else()
-
- include(FindPythonInterp)
- if(PYTHONINTERP_FOUND)
- if( LLVM_MAIN_SRC_DIR )
- set(LIT "${LLVM_MAIN_SRC_DIR}/utils/lit/lit.py")
- else()
- set(LIT "${PATH_TO_LLVM_BUILD}/bin/${CMAKE_CFG_INTDIR}/llvm-lit")
- # Installed LLVM does not contain ${CMAKE_CFG_INTDIR} in paths.
- if( NOT EXISTS ${LIT} )
- set(LIT "${PATH_TO_LLVM_BUILD}/bin/llvm-lit")
- endif()
- endif()
-
- set(LIT_ARGS "${CLANG_TEST_EXTRA_ARGS} ${LLVM_LIT_ARGS}")
- separate_arguments(LIT_ARGS)
-
- list(APPEND CLANG_TEST_PARAMS build_mode=${CMAKE_CFG_INTDIR})
-
- foreach(param ${CLANG_TEST_PARAMS})
- list(APPEND LIT_ARGS --param ${param})
- endforeach()
+endif ()
- add_custom_target(check-clang
- COMMAND ${PYTHON_EXECUTABLE}
- ${LIT}
- ${LIT_ARGS}
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CLANG_TEST_EXTRA_ARGS}
- COMMENT "Running Clang regression tests"
- DEPENDS ${CLANG_TEST_DEPS}
- )
- set_target_properties(check-clang PROPERTIES FOLDER "Clang tests")
- endif()
+set(CLANG_TEST_PARAMS
+ clang_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
+ )
+if( NOT CLANG_BUILT_STANDALONE )
+ list(APPEND CLANG_TEST_DEPS
+ llvm-config
+ llc opt FileCheck count not llvm-symbolizer llvm-profdata
+ )
endif()
+add_lit_testsuite(check-clang "Running the Clang regression tests"
+ ${CMAKE_CURRENT_BINARY_DIR}
+ #LIT ${LLVM_LIT}
+ PARAMS ${CLANG_TEST_PARAMS}
+ DEPENDS ${CLANG_TEST_DEPS}
+ ARGS ${CLANG_TEST_EXTRA_ARGS}
+ )
+set_target_properties(check-clang PROPERTIES FOLDER "Clang tests")
+
# Add a legacy target spelling: clang-test
add_custom_target(clang-test)
add_dependencies(clang-test check-clang)
diff --git a/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp b/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp
index 1f78a738f38b..b9e83988cfb8 100644
--- a/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp
+++ b/test/CXX/basic/basic.lookup/basic.lookup.qual/class.qual/p2.cpp
@@ -105,9 +105,10 @@ namespace InhCtor {
};
+ // FIXME: Consider reusing the same diagnostic between dependent and non-dependent contexts
typedef int I;
struct UsingInt {
- using I::I; // expected-error {{expected a class or namespace}}
+ using I::I; // expected-error {{'I' (aka 'int') is not a class, namespace, or scoped enumeration}}
};
template<typename T> struct UsingIntTemplate {
using T::T; // expected-error {{type 'int' cannot be used prior to '::' because it has no members}}
diff --git a/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp b/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp
index 30393961b3f3..7918e9f861e4 100644
--- a/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp
+++ b/test/CXX/basic/basic.lookup/basic.lookup.qual/namespace.qual/p2.cpp
@@ -63,3 +63,14 @@ void test3() {
Numbers2::f(f);
Numbers2::g(f); // expected-error {{no viable conversion from 'float' to 'Numbers::Number'}}
}
+
+namespace inline_ns {
+ int x; // expected-note 2{{found}}
+ inline namespace A { // expected-warning {{C++11}}
+ int x; // expected-note 2{{found}}
+ int y; // expected-note 2{{found}}
+ }
+ int y; // expected-note 2{{found}}
+ int k1 = x + y; // expected-error 2{{ambiguous}}
+ int k2 = inline_ns::x + inline_ns::y; // expected-error 2{{ambiguous}}
+}
diff --git a/test/CXX/basic/basic.lookup/basic.lookup.qual/p6-0x.cpp b/test/CXX/basic/basic.lookup/basic.lookup.qual/p6-0x.cpp
index c745c8451bc8..c3be712ddbca 100644
--- a/test/CXX/basic/basic.lookup/basic.lookup.qual/p6-0x.cpp
+++ b/test/CXX/basic/basic.lookup/basic.lookup.qual/p6-0x.cpp
@@ -1,26 +1,25 @@
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
-// XFAIL: *
-// Our C++0x doesn't currently have specialized destructor name handling,
-// since the specification is still in flux.
-struct C {
+// expected-no-diagnostics
+
+struct C {
typedef int I;
-};
+};
-typedef int I1, I2;
-extern int* p;
-extern int* q;
+typedef int I1, I2;
+extern int* p;
+extern int* q;
void f() {
- p->C::I::~I();
+ p->C::I::~I();
q->I1::~I2();
}
-struct A {
+struct A {
~A();
-};
+};
-typedef A AB;
+typedef A AB;
int main() {
- AB *p;
+ AB *p;
p->AB::~AB();
}
diff --git a/test/CXX/basic/basic.lookup/basic.lookup.qual/p6.cpp b/test/CXX/basic/basic.lookup/basic.lookup.qual/p6.cpp
index 0956de3c2a88..83c8dd8fc22d 100644
--- a/test/CXX/basic/basic.lookup/basic.lookup.qual/p6.cpp
+++ b/test/CXX/basic/basic.lookup/basic.lookup.qual/p6.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
+// expected-no-diagnostics
struct C {
typedef int I;
@@ -20,5 +21,5 @@ struct A {
typedef A AB;
int main() {
AB *p;
- p->AB::~AB(); // expected-error{{expected the class name after '~' to name a destructor}}
+ p->AB::~AB();
}
diff --git a/test/CXX/basic/basic.lookup/basic.lookup.unqual/p15.cpp b/test/CXX/basic/basic.lookup/basic.lookup.unqual/p15.cpp
index 253d15e90178..c59c4a550d7a 100644
--- a/test/CXX/basic/basic.lookup/basic.lookup.unqual/p15.cpp
+++ b/test/CXX/basic/basic.lookup/basic.lookup.unqual/p15.cpp
@@ -1,5 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
-// XFAIL: *
+// RUN: %clang_cc1 -fexceptions -fcxx-exceptions -fsyntax-only -verify %s
class C {
public:
@@ -10,8 +9,13 @@ C::C(int a, // expected-note {{previous definition}}
int b) // expected-note {{previous definition}}
try {
int c;
-
} catch (int a) { // expected-error {{redefinition of 'a'}}
int b; // expected-error {{redefinition of 'b'}}
++c; // expected-error {{use of undeclared identifier 'c'}}
}
+
+void f(int i) {
+ struct S {
+ void g() try {} catch (int i) {}; // OK
+ };
+}
diff --git a/test/CXX/basic/basic.scope/basic.scope.local/p2.cpp b/test/CXX/basic/basic.scope/basic.scope.local/p2.cpp
index 7c7b84d67823..1b4199155fae 100644
--- a/test/CXX/basic/basic.scope/basic.scope.local/p2.cpp
+++ b/test/CXX/basic/basic.scope/basic.scope.local/p2.cpp
@@ -9,8 +9,8 @@ void func2(int i) try { // expected-note{{previous definition is here}}
} catch (...) {
}
-void func3(int i) try { // FIXME: note {{previous definition is here}}
-} catch (int i) { // FIXME: error {{redefinition of 'i'}}
+void func3(int i) try { // expected-note {{previous definition is here}}
+} catch (int i) { // expected-error {{redefinition of 'i'}}
}
void func4(int i) try { // expected-note{{previous definition is here}}
@@ -58,3 +58,9 @@ void func10() {
int b; // FIXME: decide whether this is valid
}
}
+
+void func11(int a) {
+ try {
+ } catch (int a) { // OK
+ }
+}
diff --git a/test/CXX/basic/basic.start/basic.start.init/p3.cpp b/test/CXX/basic/basic.start/basic.start.init/p3.cpp
new file mode 100644
index 000000000000..506232ebacc4
--- /dev/null
+++ b/test/CXX/basic/basic.start/basic.start.init/p3.cpp
@@ -0,0 +1,24 @@
+// RUN: %clang_cc1 -verify %s -pedantic-errors
+// RUN: %clang_cc1 -verify %s -pedantic-errors -DINLINE
+// RUN: %clang_cc1 -verify %s -pedantic-errors -DSTATIC
+// RUN: %clang_cc1 -verify %s -pedantic-errors -std=c++11 -DCONSTEXPR
+// RUN: %clang_cc1 -verify %s -std=c++11 -DDELETED
+
+#if INLINE
+inline // expected-error {{'main' is not allowed to be declared inline}}
+#elif STATIC
+static // expected-error {{'main' is not allowed to be declared static}}
+#elif CONSTEXPR
+constexpr // expected-error {{'main' is not allowed to be declared constexpr}}
+#endif
+int main(int argc, char **argv)
+#if DELETED
+ = delete; // expected-error {{'main' is not allowed to be deleted}}
+#else
+{
+ int (*pmain)(int, char**) = &main; // expected-error {{ISO C++ does not allow 'main' to be used by a program}}
+
+ if (argc)
+ main(0, 0); // expected-error {{ISO C++ does not allow 'main' to be used by a program}}
+}
+#endif
diff --git a/test/CXX/basic/basic.start/basic.start.main/p2.cpp b/test/CXX/basic/basic.start/basic.start.main/p2.cpp
index 5c7d60c1df4c..42e87e5431f2 100644
--- a/test/CXX/basic/basic.start/basic.start.main/p2.cpp
+++ b/test/CXX/basic/basic.start/basic.start.main/p2.cpp
@@ -62,6 +62,8 @@ main( // expected-error {{first parameter of 'main' (argument count) must be of
) {
}
+const int main(); // expected-error {{'main' must return 'int'}}
+
#elif TEST7
// expected-no-diagnostics
diff --git a/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp b/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp
index 8a62ae84e2af..3b77a62ce7d6 100644
--- a/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp
+++ b/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.allocation/p1.cpp
@@ -9,7 +9,8 @@ namespace NS {
void *operator new(size_t);; // expected-error {{'operator new' cannot be declared inside a namespace}}
}
-static void *operator new(size_t); // expected-error {{'operator new' cannot be declared static in global scope}}
+static void *operator new(size_t); // expected-error {{static declaration of 'operator new' follows non-static declaration}} expected-note {{previous}}
+static void *operator new(size_t, int, int); // expected-error {{'operator new' cannot be declared static in global scope}}
struct B {
void operator new(size_t); // expected-error {{'operator new' must return type 'void *'}}
diff --git a/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp b/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp
index e00e9486f0bf..09dde8efde00 100644
--- a/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp
+++ b/test/CXX/basic/basic.stc/basic.stc.dynamic/basic.stc.dynamic.deallocation/p1.cpp
@@ -8,4 +8,5 @@ namespace NS {
void operator delete(void *); // expected-error {{'operator delete' cannot be declared inside a namespace}}
}
-static void operator delete(void *); // expected-error {{'operator delete' cannot be declared static in global scope}}
+static void operator delete(void *); // expected-error {{follows non-static declaration}} expected-note {{implicit}}
+static void operator delete(void *, int, int); // expected-error {{'operator delete' cannot be declared static in global scope}}
diff --git a/test/CXX/class.access/class.access.base/p1.cpp b/test/CXX/class.access/class.access.base/p1.cpp
index 43cc99eb8b49..88e2688406c7 100644
--- a/test/CXX/class.access/class.access.base/p1.cpp
+++ b/test/CXX/class.access/class.access.base/p1.cpp
@@ -153,3 +153,18 @@ namespace test2 {
t->Base::spriv++; // expected-error 2 {{private member}}
}
}
+
+namespace PR12788 {
+ class A {
+ protected:
+ struct {
+ int x;
+ };
+ };
+ class B : A {
+ void f() {
+ ++x;
+ A::x++;
+ }
+ };
+}
diff --git a/test/CXX/class.access/p4.cpp b/test/CXX/class.access/p4.cpp
index 0564a52b6d0d..435b09920df6 100644
--- a/test/CXX/class.access/p4.cpp
+++ b/test/CXX/class.access/p4.cpp
@@ -79,8 +79,8 @@ namespace test1 {
-ca;
// These are all surrogate calls
ca(pub);
- ca(prot); // expected-error {{'operator void (*)(class Protected &)' is a protected member}}
- ca(priv); // expected-error {{'operator void (*)(class Private &)' is a private member}}
+ ca(prot); // expected-error {{'operator void (*)(Protected &)' is a protected member}}
+ ca(priv); // expected-error {{'operator void (*)(Private &)' is a private member}}
}
}
diff --git a/test/CXX/class.access/p6.cpp b/test/CXX/class.access/p6.cpp
index 6a93658fc78d..f9b95f0851ef 100644
--- a/test/CXX/class.access/p6.cpp
+++ b/test/CXX/class.access/p6.cpp
@@ -177,7 +177,7 @@ namespace test8 {
};
void test(A &a) {
- if (a) return; // expected-error {{'operator void *(class test8::A::*)(void) const' is a private member of 'test8::A'}}
+ if (a) return; // expected-error-re {{'operator void *(test8::A::*)(){{( __attribute__\(\(thiscall\)\))?}} const' is a private member of 'test8::A'}}
}
}
diff --git a/test/CXX/class/class.static/class.static.data/p4.cpp b/test/CXX/class/class.static/class.static.data/p4.cpp
index 2b1eca741937..85d18c6b5fac 100644
--- a/test/CXX/class/class.static/class.static.data/p4.cpp
+++ b/test/CXX/class/class.static/class.static.data/p4.cpp
@@ -10,15 +10,14 @@ struct OutOfClassInitializerOnly {
int const OutOfClassInitializerOnly::i = 0;
struct InClassInitializerAndOutOfClassCopyInitializer {
- static const int i = 0; // expected-note{{previous definition is here}}
+ static const int i = 0; // expected-note{{previous initialization is here}}
};
-int const InClassInitializerAndOutOfClassCopyInitializer::i = 0; // expected-error{{redefinition of 'i'}}
+int const InClassInitializerAndOutOfClassCopyInitializer::i = 0; // expected-error{{static data member 'i' already has an initializer}}
struct InClassInitializerAndOutOfClassDirectInitializer {
- static const int i = 0; // expected-note{{previous definition is here}}
+ static const int i = 0; // expected-note{{previous initialization is here}}
};
-int const InClassInitializerAndOutOfClassDirectInitializer::i(0); // expected-error{{redefinition of 'i'}}
-
+int const InClassInitializerAndOutOfClassDirectInitializer::i(0); // expected-error{{static data member 'i' already has an initializer}}
int main() { }
diff --git a/test/CXX/class/class.union/p8.cpp b/test/CXX/class/class.union/p8.cpp
new file mode 100644
index 000000000000..cc54ba406619
--- /dev/null
+++ b/test/CXX/class/class.union/p8.cpp
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -std=c++11 -verify %s
+
+union U {
+ int x = 0; // expected-note {{previous initialization is here}}
+ union {};
+ union {
+ int z;
+ int y = 1; // expected-error {{initializing multiple members of union}}
+ };
+};
diff --git a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp
index c7966ce643f1..4ffb93a1ef74 100644
--- a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp
+++ b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p11.cpp
@@ -1,14 +1,16 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
-// C++03 [namespace.udecl]p11:
+// C++03 [namespace.udecl]p11: (per DR101)
// If a function declaration in namespace scope or block scope has
// the same name and the same parameter types as a function
-// introduced by a using-declaration, the program is
-// ill-formed. [Note: two using-declarations may introduce functions
-// with the same name and the same parameter types. If, for a call
-// to an unqualified function name, function overload resolution
-// selects the functions introduced by such using-declarations, the
-// function call is ill-formed.
+// introduced by a using-declaration, and the declarations do not declare the
+// same function, the program is ill-formed. [Note: two using-declarations may
+// introduce functions with the same name and the same parameter types. If,
+// for a call to an unqualified function name, function overload resolution
+// selects the functions introduced by such using-declarations, the function
+// call is ill-formed.]
+//
+// FIXME: DR565 introduces parallel wording here for function templates.
namespace test0 {
namespace ns { void foo(); } // expected-note {{target of using declaration}}
@@ -89,3 +91,19 @@ namespace test5 {
template class Test0<int>;
template class Test1<int>;
}
+
+namespace test6 {
+ namespace ns { void foo(); } // expected-note {{target of using declaration}}
+ using ns::foo; // expected-note {{using declaration}}
+ namespace ns {
+ using test6::foo;
+ void foo() {}
+ }
+ void foo(); // expected-error {{declaration conflicts with target of using declaration already in scope}}
+}
+
+namespace test7 {
+ void foo();
+ using test7::foo;
+ void foo() {}
+}
diff --git a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p5-cxx0x.cpp b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p5-cxx0x.cpp
index edaa975a5890..35ef3b57b0cc 100644
--- a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p5-cxx0x.cpp
+++ b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p5-cxx0x.cpp
@@ -7,6 +7,6 @@ struct A {
};
struct B : A {
- using A::f<double>; // expected-error{{using declaration can not refer to a template specialization}}
- using A::X<int>; // expected-error{{using declaration can not refer to a template specialization}}
+ using A::f<double>; // expected-error{{using declaration cannot refer to a template specialization}}
+ using A::X<int>; // expected-error{{using declaration cannot refer to a template specialization}}
};
diff --git a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p6-cxx0x.cpp b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p6-cxx0x.cpp
index c4b8849e58cf..c2fb95902454 100644
--- a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p6-cxx0x.cpp
+++ b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p6-cxx0x.cpp
@@ -5,4 +5,4 @@ namespace A {
namespace B { }
}
-using A::B; // expected-error{{using declaration can not refer to namespace}}
+using A::B; // expected-error{{using declaration cannot refer to namespace}}
diff --git a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p8-cxx0x.cpp b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p8-cxx0x.cpp
index 78b5a41648a7..4f89dcfb3f52 100644
--- a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p8-cxx0x.cpp
+++ b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p8-cxx0x.cpp
@@ -1,4 +1,7 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -std=c++98 -verify %s
+// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
+// RUN: not %clang_cc1 -fsyntax-only -std=c++98 -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck --check-prefix=CXX98 %s
+// RUN: not %clang_cc1 -fsyntax-only -std=c++11 -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck --check-prefix=CXX11 %s
// C++0x N2914.
struct X {
@@ -6,10 +9,101 @@ struct X {
static int a;
};
-using X::i; // expected-error{{using declaration can not refer to class member}}
-using X::s; // expected-error{{using declaration can not refer to class member}}
+using X::i; // expected-error{{using declaration cannot refer to class member}}
+using X::s; // expected-error{{using declaration cannot refer to class member}}
void f() {
- using X::i; // expected-error{{using declaration can not refer to class member}}
- using X::s; // expected-error{{using declaration can not refer to class member}}
+ using X::i; // expected-error{{using declaration cannot refer to class member}}
+ using X::s; // expected-error{{using declaration cannot refer to class member}}
+}
+
+struct S {
+ static int n;
+ struct Q {};
+ enum E {};
+ typedef Q T;
+ void f();
+ static void g();
+};
+
+using S::n; // expected-error{{class member}} expected-note {{use a reference instead}}
+#if __cplusplus < 201103L
+// CXX98-NOT: fix-it:"{{.*}}":{[[@LINE-2]]
+#else
+// CXX11: fix-it:"{{.*}}":{[[@LINE-4]]:1-[[@LINE-4]]:6}:"auto &n = "
+#endif
+
+using S::Q; // expected-error{{class member}}
+#if __cplusplus < 201103L
+// expected-note@-2 {{use a typedef declaration instead}}
+// CXX98: fix-it:"{{.*}}":{[[@LINE-3]]:1-[[@LINE-3]]:6}:"typedef"
+// CXX98: fix-it:"{{.*}}":{[[@LINE-4]]:11-[[@LINE-4]]:11}:" Q"
+#else
+// expected-note@-6 {{use an alias declaration instead}}
+// CXX11: fix-it:"{{.*}}":{[[@LINE-7]]:7-[[@LINE-7]]:7}:"Q = "
+#endif
+
+using S::E; // expected-error{{class member}}
+#if __cplusplus < 201103L
+// expected-note@-2 {{use a typedef declaration instead}}
+// CXX98: fix-it:"{{.*}}":{[[@LINE-3]]:1-[[@LINE-3]]:6}:"typedef"
+// CXX98: fix-it:"{{.*}}":{[[@LINE-4]]:11-[[@LINE-4]]:11}:" E"
+#else
+// expected-note@-6 {{use an alias declaration instead}}
+// CXX11: fix-it:"{{.*}}":{[[@LINE-7]]:7-[[@LINE-7]]:7}:"E = "
+#endif
+
+using S::T; // expected-error{{class member}}
+#if __cplusplus < 201103L
+// expected-note@-2 {{use a typedef declaration instead}}
+// CXX98: fix-it:"{{.*}}":{[[@LINE-3]]:1-[[@LINE-3]]:6}:"typedef"
+// CXX98: fix-it:"{{.*}}":{[[@LINE-4]]:11-[[@LINE-4]]:11}:" T"
+#else
+// expected-note@-6 {{use an alias declaration instead}}
+// CXX11: fix-it:"{{.*}}":{[[@LINE-7]]:7-[[@LINE-7]]:7}:"T = "
+#endif
+
+using S::f; // expected-error{{class member}}
+using S::g; // expected-error{{class member}}
+
+void h() {
+ using S::n; // expected-error{{class member}} expected-note {{use a reference instead}}
+#if __cplusplus < 201103L
+ // CXX98-NOT: fix-it:"{{.*}}":{[[@LINE-2]]
+#else
+ // CXX11: fix-it:"{{.*}}":{[[@LINE-4]]:3-[[@LINE-4]]:8}:"auto &n = "
+#endif
+
+ using S::Q; // expected-error{{class member}}
+#if __cplusplus < 201103L
+ // expected-note@-2 {{use a typedef declaration instead}}
+ // CXX98: fix-it:"{{.*}}":{[[@LINE-3]]:3-[[@LINE-3]]:8}:"typedef"
+ // CXX98: fix-it:"{{.*}}":{[[@LINE-4]]:13-[[@LINE-4]]:13}:" Q"
+#else
+ // expected-note@-6 {{use an alias declaration instead}}
+ // CXX11: fix-it:"{{.*}}":{[[@LINE-7]]:9-[[@LINE-7]]:9}:"Q = "
+#endif
+
+ using S::E; // expected-error{{class member}}
+#if __cplusplus < 201103L
+ // expected-note@-2 {{use a typedef declaration instead}}
+ // CXX98: fix-it:"{{.*}}":{[[@LINE-3]]:3-[[@LINE-3]]:8}:"typedef"
+ // CXX98: fix-it:"{{.*}}":{[[@LINE-4]]:13-[[@LINE-4]]:13}:" E"
+#else
+ // expected-note@-6 {{use an alias declaration instead}}
+ // CXX11: fix-it:"{{.*}}":{[[@LINE-7]]:9-[[@LINE-7]]:9}:"E = "
+#endif
+
+ using S::T; // expected-error{{class member}}
+#if __cplusplus < 201103L
+ // expected-note@-2 {{use a typedef declaration instead}}
+ // CXX98: fix-it:"{{.*}}":{[[@LINE-3]]:3-[[@LINE-3]]:8}:"typedef"
+ // CXX98: fix-it:"{{.*}}":{[[@LINE-4]]:13-[[@LINE-4]]:13}:" T"
+#else
+ // expected-note@-6 {{use an alias declaration instead}}
+ // CXX11: fix-it:"{{.*}}":{[[@LINE-7]]:9-[[@LINE-7]]:9}:"T = "
+#endif
+
+ using S::f; // expected-error{{class member}}
+ using S::g; // expected-error{{class member}}
}
diff --git a/test/CXX/dcl.dcl/dcl.attr/dcl.align/p5.cpp b/test/CXX/dcl.dcl/dcl.attr/dcl.align/p5.cpp
index 10be98d16ea0..3c250f9d25dd 100644
--- a/test/CXX/dcl.dcl/dcl.attr/dcl.align/p5.cpp
+++ b/test/CXX/dcl.dcl/dcl.attr/dcl.align/p5.cpp
@@ -9,6 +9,7 @@ alignas(1) alignas(4) int n6 alignas(2); // ok
alignas(1) int n7 alignas(2), // expected-error {{less than minimum alignment}}
n8 alignas(4); // ok
alignas(8) int n9 alignas(2); // ok, overaligned
+alignas(1) extern int n10; // expected-error {{less than minimum alignment}}
enum alignas(1) E1 {}; // expected-error {{requested alignment is less than minimum alignment of 4 for type 'E1'}}
enum alignas(1) E2 : char {}; // ok
diff --git a/test/CXX/dcl.dcl/dcl.attr/dcl.attr.deprecated/p1.cpp b/test/CXX/dcl.dcl/dcl.attr/dcl.attr.deprecated/p1.cpp
index 21119398b2f4..3bbbf9eed6e4 100644
--- a/test/CXX/dcl.dcl/dcl.attr/dcl.attr.deprecated/p1.cpp
+++ b/test/CXX/dcl.dcl/dcl.attr/dcl.attr.deprecated/p1.cpp
@@ -1,25 +1,25 @@
// RUN: %clang_cc1 -std=c++1y -verify %s
-class [[deprecated]] C {}; // expected-note {{declared here}}
+class [[deprecated]] C {}; // expected-note {{'C' has been explicitly marked deprecated here}}
C c; // expected-warning {{'C' is deprecated}}
-typedef int t [[deprecated]]; // expected-note {{declared here}}
+typedef int t [[deprecated]]; // expected-note {{'t' has been explicitly marked deprecated here}}
t x = 42; // expected-warning {{'t' is deprecated}}
-[[deprecated]] int old = 42; // expected-note {{declared here}}
+[[deprecated]] int old = 42; // expected-note {{'old' has been explicitly marked deprecated here}}
int use = old; // expected-warning {{'old' is deprecated}}
-struct S { [[deprecated]] int member = 42; } s; // expected-note {{declared here}}
+struct S { [[deprecated]] int member = 42; } s; // expected-note {{'member' has been explicitly marked deprecated here}}
int use2 = s.member; // expected-warning {{'member' is deprecated}}
-[[deprecated]] int f() { return 42; } // expected-note {{declared here}}
+[[deprecated]] int f() { return 42; } // expected-note {{'f' has been explicitly marked deprecated here}}
int use3 = f(); // expected-warning {{'f' is deprecated}}
-enum [[deprecated]] e { E }; // expected-note {{declared here}}
+enum [[deprecated]] e { E }; // expected-note {{'e' has been explicitly marked deprecated here}}
e my_enum; // expected-warning {{'e' is deprecated}}
template <typename T> class X {};
-template <> class [[deprecated]] X<int> {}; // expected-note {{declared here}}
+template <> class [[deprecated]] X<int> {}; // expected-note {{'X<int>' has been explicitly marked deprecated here}}
X<char> x1;
// FIXME: The diagnostic here could be much better by mentioning X<int>.
X<int> x2; // expected-warning {{'X' is deprecated}}
diff --git a/test/CXX/dcl.dcl/dcl.attr/dcl.attr.noreturn/p1.cpp b/test/CXX/dcl.dcl/dcl.attr/dcl.attr.noreturn/p1.cpp
index 0af241f55fe5..59cac367dbf2 100644
--- a/test/CXX/dcl.dcl/dcl.attr/dcl.attr.noreturn/p1.cpp
+++ b/test/CXX/dcl.dcl/dcl.attr/dcl.attr.noreturn/p1.cpp
@@ -13,7 +13,7 @@ void a2 [[noreturn]] () {
[[noreturn()]] void c(); // expected-error {{attribute 'noreturn' cannot have an argument list}}
void d() [[noreturn]]; // expected-error {{'noreturn' attribute cannot be applied to types}}
-int d2 [[noreturn]]; // expected-error {{'noreturn' attribute only applies to functions and methods}}
+int d2 [[noreturn]]; // expected-error {{'noreturn' attribute only applies to functions}}
[[noreturn]] int e() { b2(); } // ok
diff --git a/test/CXX/dcl.dcl/dcl.enum/p2.cpp b/test/CXX/dcl.dcl/dcl.enum/p2.cpp
new file mode 100644
index 000000000000..de826d057042
--- /dev/null
+++ b/test/CXX/dcl.dcl/dcl.enum/p2.cpp
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -std=c++11 -verify %s
+
+// expected-no-diagnostics
+enum class E : int const volatile { };
+using T = __underlying_type(E);
+using T = int;
diff --git a/test/CXX/dcl.dcl/dcl.link/p2.cpp b/test/CXX/dcl.dcl/dcl.link/p2.cpp
new file mode 100644
index 000000000000..d1c3bcb8fa03
--- /dev/null
+++ b/test/CXX/dcl.dcl/dcl.link/p2.cpp
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -std=c++11 -verify %s
+
+extern "C" {
+ extern R"(C++)" { }
+}
+
+#define plusplus "++"
+extern "C" plusplus {
+}
+
+extern u8"C" {} // expected-error {{string literal in language linkage specifier cannot have an encoding-prefix}}
+extern L"C" {} // expected-error {{string literal in language linkage specifier cannot have an encoding-prefix}}
+extern u"C++" {} // expected-error {{string literal in language linkage specifier cannot have an encoding-prefix}}
+extern U"C" {} // expected-error {{string literal in language linkage specifier cannot have an encoding-prefix}}
diff --git a/test/CXX/dcl.dcl/dcl.link/p7.cpp b/test/CXX/dcl.dcl/dcl.link/p7.cpp
index bd9ff3c3665c..7d80a22ca300 100644
--- a/test/CXX/dcl.dcl/dcl.link/p7.cpp
+++ b/test/CXX/dcl.dcl/dcl.link/p7.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
struct X { };
@@ -7,8 +7,6 @@ struct X { };
// CHECK: @x2 = external global %struct.X
// CHECK: @x3 = external global %struct.X
extern "C" {
-
-
X x1;
}
diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p1.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p1.cpp
index cf422972a280..08fefdc91fb5 100644
--- a/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p1.cpp
+++ b/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p1.cpp
@@ -27,7 +27,7 @@ void f2(constexpr int i) {} // expected-error {{function parameter cannot be con
struct s2 {
constexpr int mi1; // expected-error {{non-static data member cannot be constexpr; did you intend to make it const?}}
static constexpr int mi2; // expected-error {{requires an initializer}}
- mutable constexpr int mi3 = 3; // expected-error-re {{non-static data member cannot be constexpr$}} expected-error {{'mutable' and 'const' cannot be mixed}}
+ mutable constexpr int mi3 = 3; // expected-error-re {{non-static data member cannot be constexpr{{$}}}} expected-error {{'mutable' and 'const' cannot be mixed}}
};
// typedef
typedef constexpr int CI; // expected-error {{typedef cannot be constexpr}}
@@ -73,7 +73,7 @@ template <typename T> T gt(T t) { return t; }
struct S {
template<typename T> constexpr T f(); // expected-warning {{C++1y}}
template <typename T>
- T g() const; // expected-note {{candidate template ignored: could not match 'T () const' against 'char ()'}}
+ T g() const; // expected-note-re {{candidate template ignored: could not match 'T (){{( __attribute__\(\(thiscall\)\))?}} const' against 'char (){{( __attribute__\(\(thiscall\)\))?}}'}}
};
// explicit specialization can differ in constepxr
diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p2.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p2.cpp
index 001a086a008b..eeb5b6f9c2aa 100644
--- a/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p2.cpp
+++ b/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p2.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -emit-llvm -triple %itanium_abi_triple %s -o - | FileCheck %s
// constexpr functions and constexpr constructors are implicitly inline.
struct S {
diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p6.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p6.cpp
index bb7f7ac326e7..370f732fd92b 100644
--- a/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p6.cpp
+++ b/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p6.cpp
@@ -35,7 +35,7 @@ template<typename R> struct ConstexprMember {
constexpr R F() const { return 0; }
};
constexpr int d = ConstexprMember<int>().F(); // ok
-constexpr int e = ConstexprMember<NonLiteral>().F(); // expected-error {{constant expression}}
+constexpr int e = ConstexprMember<NonLiteral>().F(); // expected-error {{constant expression}} expected-note {{non-literal type 'const NonLiteral' cannot be used in a constant expression}}
template<typename ...P> struct ConstexprCtor {
constexpr ConstexprCtor(P...) {}
diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p4.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p4.cpp
index 07eec1edbe39..12237a39ab54 100644
--- a/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p4.cpp
+++ b/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p4.cpp
@@ -1,7 +1,6 @@
-// RUN: %clang_cc1 -verify %s
-// XFAIL: *
+// RUN: %clang_cc1 -fsyntax-only -verify %s
-void f0() {
+void f0() { // expected-note {{previous definition is here}}
}
-inline void f0(); // expected-error {{function definition cannot precede inline declaration}}
+inline void f0(); // expected-error {{inline declaration of 'f0' follows non-inline definition}}
diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp
index ee870d960161..5d1e6fb85ce9 100644
--- a/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp
+++ b/test/CXX/dcl.dcl/dcl.spec/dcl.fct.spec/p6.cpp
@@ -14,3 +14,7 @@ public:
explicit A::A() { } // expected-error {{'explicit' can only be specified inside the class definition}}
explicit A::operator bool() { return false; } // expected-warning {{explicit conversion functions are a C++11 extension}}\
// expected-error {{'explicit' can only be specified inside the class definition}}
+
+class B {
+ friend explicit A::A(); // expected-error {{'explicit' is invalid in friend declarations}}
+};
diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p10.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p10.cpp
index fd86276e8548..d7e7c52f3f70 100644
--- a/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p10.cpp
+++ b/test/CXX/dcl.dcl/dcl.spec/dcl.stc/p10.cpp
@@ -1,5 +1,4 @@
-// RUN: %clang_cc1 -verify %s
-// XFAIL: *
+// RUN: %clang_cc1 -fsyntax-only -verify %s
typedef const int T0;
typedef int& T1;
@@ -9,6 +8,6 @@ struct s0 {
mutable T0 f1; // expected-error{{'mutable' and 'const' cannot be mixed}}
mutable int &f2; // expected-error{{'mutable' cannot be applied to references}}
mutable T1 f3; // expected-error{{'mutable' cannot be applied to references}}
- mutable struct s1 {}; // expected-error{{'mutable' cannot be applied to non-data members}}
+ mutable struct s1 {}; // expected-error{{'mutable' can only be applied to member variables}}
mutable void im0(); // expected-error{{'mutable' cannot be applied to functions}}
};
diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p4.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p4.cpp
index 84f9f9b82983..46c874f605cb 100644
--- a/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p4.cpp
+++ b/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p4.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++1y
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11 -Wno-c++1y-extensions
// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++98 -Wno-c++11-extensions
template<typename T>
@@ -41,3 +42,25 @@ struct S {
};
const int S::b;
const auto S::c = 0;
+
+namespace std { template<typename T> struct initializer_list { initializer_list(); }; }
+
+// In an initializer of the form ( expression-list ), the expression-list
+// shall be a single assigment-expression.
+auto parens1(1);
+auto parens2(2, 3); // expected-error {{initializer for variable 'parens2' with type 'auto' contains multiple expressions}}
+#if __cplusplus >= 201103L
+auto parens3({4, 5, 6}); // expected-error {{cannot deduce type for variable 'parens3' with type 'auto' from parenthesized initializer list}}
+auto parens4 = [p4(1)] {};
+auto parens5 = [p5(2, 3)] {}; // expected-error {{initializer for lambda capture 'p5' contains multiple expressions}}
+auto parens6 = [p6({4, 5, 6})] {}; // expected-error {{cannot deduce type for lambda capture 'p6' from parenthesized initializer list}}
+#endif
+
+#if __cplusplus >= 201402L
+namespace std_example {
+ // The other half of this example is in p3.cpp
+ auto f() -> int;
+ auto g() { return 0.0; }
+ auto h();
+}
+#endif
diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.simple/p5-cxx0x.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.simple/p5-cxx0x.cpp
index 1ed93b137540..7f1b3b0f240e 100644
--- a/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.simple/p5-cxx0x.cpp
+++ b/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.type.simple/p5-cxx0x.cpp
@@ -30,29 +30,33 @@ struct DD {
typedef int n;
};
+PD pd();
+DD dd();
+
struct A {
- decltype(PD()) s; // ok
- decltype(PD())::n n; // ok
- decltype(DD()) *p = new decltype(DD()); // ok
+ decltype(pd()) s; // ok
+ decltype(pd())::n n; // ok
+ decltype(dd()) *p = new decltype(dd()); // ok
};
+A a();
// Two errors here: one for the decltype, one for the variable.
decltype(
- PD(), // expected-error {{private destructor}}
- PD()) pd1; // expected-error {{private destructor}}
-decltype(DD(), // expected-error {{deleted function}}
- DD()) dd1;
-decltype(A(),
- DD()) dd2; // expected-error {{deleted function}}
+ pd(), // expected-error {{private destructor}}
+ pd()) pd1; // expected-error {{private destructor}}
+decltype(dd(), // expected-error {{deleted function}}
+ dd()) dd1;
+decltype(a(),
+ dd()) dd2; // expected-error {{deleted function}}
decltype(
- PD(), // expected-error {{temporary of type 'PD' has private destructor}}
+ pd(), // expected-error {{temporary of type 'PD' has private destructor}}
0) pd2;
-decltype(((13, ((DD())))))::n dd_parens; // ok
-decltype(((((42)), PD())))::n pd_parens_comma; // ok
+decltype(((13, ((dd())))))::n dd_parens; // ok
+decltype(((((42)), pd())))::n pd_parens_comma; // ok
// Ensure parens aren't stripped from a decltype node.
-extern decltype(PD()) pd_ref; // ok
+extern decltype(pd()) pd_ref; // ok
decltype((pd_ref)) pd_ref3 = pd_ref; // ok, PD &
decltype(pd_ref) pd_ref2 = pd_ref; // expected-error {{private destructor}}
@@ -107,7 +111,7 @@ namespace RequireCompleteType {
namespace Overload {
DD operator+(PD &a, PD &b);
- decltype(PD()) *pd_ptr;
+ decltype(pd()) *pd_ptr;
decltype(*pd_ptr + *pd_ptr) *dd_ptr; // ok
decltype(0, *pd_ptr) pd_ref2 = pd_ref; // ok
diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp
index 02cc973018b8..39d6e706b6c1 100644
--- a/test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp
+++ b/test/CXX/dcl.dcl/dcl.spec/dcl.type/p3-0x.cpp
@@ -2,12 +2,12 @@
using X = struct { // ok
};
-template<typename T> using Y = struct { // expected-error {{can not be defined in a type alias template}}
+template<typename T> using Y = struct { // expected-error {{cannot be defined in a type alias template}}
};
class K {
virtual ~K();
- operator struct S {} (); // expected-error{{'K::S' can not be defined in a type specifier}}
+ operator struct S {} (); // expected-error{{'K::S' cannot be defined in a type specifier}}
};
struct A {};
@@ -18,26 +18,26 @@ void f() {
for (struct S { S(int) {} } s : arr) { // expected-error {{types may not be defined in a for range declaration}}
}
- new struct T {}; // expected-error {{'T' can not be defined in a type specifier}}
- new struct A {}; // expected-error {{'A' can not be defined in a type specifier}}
+ new struct T {}; // expected-error {{'T' cannot be defined in a type specifier}}
+ new struct A {}; // expected-error {{'A' cannot be defined in a type specifier}}
- try {} catch (struct U {}) {} // expected-error {{'U' can not be defined in a type specifier}}
+ try {} catch (struct U {}) {} // expected-error {{'U' cannot be defined in a type specifier}}
- (void)(struct V { V(int); })0; // expected-error {{'V' can not be defined in a type specifier}}
+ (void)(struct V { V(int); })0; // expected-error {{'V' cannot be defined in a type specifier}}
- (void)dynamic_cast<struct W {}*>((K*)0); // expected-error {{'W' can not be defined in a type specifier}}
- (void)static_cast<struct X {}*>(0); // expected-error {{'X' can not be defined in a type specifier}}
- (void)reinterpret_cast<struct Y {}*>(0); // expected-error {{'Y' can not be defined in a type specifier}}
- (void)const_cast<struct Z {}*>((const Z*)0); // expected-error {{'Z' can not be defined in a type specifier}}
+ (void)dynamic_cast<struct W {}*>((K*)0); // expected-error {{'W' cannot be defined in a type specifier}}
+ (void)static_cast<struct X {}*>(0); // expected-error {{'X' cannot be defined in a type specifier}}
+ (void)reinterpret_cast<struct Y {}*>(0); // expected-error {{'Y' cannot be defined in a type specifier}}
+ (void)const_cast<struct Z {}*>((const Z*)0); // expected-error {{'Z' cannot be defined in a type specifier}}
}
-void g() throw (struct Ex {}) { // expected-error {{'Ex' can not be defined in a type specifier}}
+void g() throw (struct Ex {}) { // expected-error {{'Ex' cannot be defined in a type specifier}}
}
-alignas(struct Aa {}) int x; // expected-error {{'Aa' can not be defined in a type specifier}}
+alignas(struct Aa {}) int x; // expected-error {{'Aa' cannot be defined in a type specifier}}
-int a = sizeof(struct So {}); // expected-error {{'So' can not be defined in a type specifier}}
-int b = alignof(struct Ao {}); // expected-error {{'Ao' can not be defined in a type specifier}}
+int a = sizeof(struct So {}); // expected-error {{'So' cannot be defined in a type specifier}}
+int b = alignof(struct Ao {}); // expected-error {{'Ao' cannot be defined in a type specifier}}
namespace std { struct type_info; }
-const std::type_info &ti = typeid(struct Ti {}); // expected-error {{'Ti' can not be defined in a type specifier}}
+const std::type_info &ti = typeid(struct Ti {}); // expected-error {{'Ti' cannot be defined in a type specifier}}
diff --git a/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp b/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp
index 89a28adcc65c..cc44f74a5547 100644
--- a/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp
+++ b/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp
@@ -154,5 +154,5 @@ namespace Access {
namespace VoidArg {
using V = void;
V f(int); // ok
- V g(V); // expected-error {{empty parameter list defined with a type alias of 'void' not allowed}}
+ V g(V); // ok (DR577)
}
diff --git a/test/CXX/dcl.decl/dcl.init/dcl.init.list/basic.cpp b/test/CXX/dcl.decl/dcl.init/dcl.init.list/basic.cpp
index b30e0ec7856b..b44b2c7d1566 100644
--- a/test/CXX/dcl.decl/dcl.init/dcl.init.list/basic.cpp
+++ b/test/CXX/dcl.decl/dcl.init/dcl.init.list/basic.cpp
@@ -8,9 +8,9 @@ namespace PR12453 {
template<typename T>
void f(int i) {
T x{i}; // expected-error{{non-constant-expression cannot be narrowed from type 'int' to 'float' in initializer list}} \
- // expected-note{{override this message by inserting an explicit cast}}
+ // expected-note{{insert an explicit cast to silence this issue}}
T y{i}; // expected-error{{non-constant-expression cannot be narrowed from type 'int' to 'float' in initializer list}} \
- // expected-note{{override this message by inserting an explicit cast}}
+ // expected-note{{insert an explicit cast to silence this issue}}
}
template void f<float>(int); // expected-note{{in instantiation of function template specialization 'PR12453::f<float>' requested here}}
diff --git a/test/CXX/dcl.decl/dcl.init/dcl.init.list/p3-0x.cpp b/test/CXX/dcl.decl/dcl.init/dcl.init.list/p3-0x.cpp
index 58d038366c81..971e0c11aff1 100644
--- a/test/CXX/dcl.decl/dcl.init/dcl.init.list/p3-0x.cpp
+++ b/test/CXX/dcl.decl/dcl.init/dcl.init.list/p3-0x.cpp
@@ -23,7 +23,7 @@ namespace std {
namespace bullet1 {
double ad[] = { 1, 2.0 };
- int ai[] = { 1, 2.0 }; // expected-error {{type 'double' cannot be narrowed to 'int' in initializer list}} expected-note {{override}}
+ int ai[] = { 1, 2.0 }; // expected-error {{type 'double' cannot be narrowed to 'int' in initializer list}} expected-note {{silence}}
struct S2 {
int m1;
@@ -31,7 +31,7 @@ namespace bullet1 {
};
S2 s21 = { 1, 2, 3.0 };
- S2 s22 { 1.0, 2, 3 }; // expected-error {{type 'double' cannot be narrowed to 'int' in initializer list}} expected-note {{override}}
+ S2 s22 { 1.0, 2, 3 }; // expected-error {{type 'double' cannot be narrowed to 'int' in initializer list}} expected-note {{silence}}
S2 s23 { };
}
@@ -62,13 +62,13 @@ namespace bullet4_example3 {
};
S s1 = { 1, 2, 3.0 };
- S s2 { 1.0, 2, 3 }; // expected-error {{type 'double' cannot be narrowed to 'int' in initializer list}} expected-note {{override}}
+ S s2 { 1.0, 2, 3 }; // expected-error {{type 'double' cannot be narrowed to 'int' in initializer list}} expected-note {{silence}}
S s3 {};
}
namespace bullet5 {
int x1 {2};
- int x2 {2.0}; // expected-error {{type 'double' cannot be narrowed to 'int' in initializer list}} expected-note {{override}}
+ int x2 {2.0}; // expected-error {{type 'double' cannot be narrowed to 'int' in initializer list}} expected-note {{silence}}
}
namespace bullet6 {
@@ -81,7 +81,7 @@ namespace bullet6 {
const S& r2 = { "Spinach" };
S& r3 = { 1, 2, 3 }; // expected-error {{non-const lvalue reference to type 'bullet6::S' cannot bind to an initializer list temporary}}
const int& i1 = { 1 };
- const int& i2 = { 1.1 }; // expected-error {{type 'double' cannot be narrowed to 'int' in initializer list}} expected-note {{override}} expected-warning {{implicit conversion}}
+ const int& i2 = { 1.1 }; // expected-error {{type 'double' cannot be narrowed to 'int' in initializer list}} expected-note {{silence}} expected-warning {{implicit conversion}}
const int (&iar)[2] = { 1, 2 };
}
@@ -92,20 +92,20 @@ namespace bullet7 {
namespace bullet8 {
struct A { int i; int j; };
A a1 { 1, 2 };
- A a2 { 1.2 }; // expected-error {{type 'double' cannot be narrowed to 'int' in initializer list}} expected-note {{override}} expected-warning {{implicit conversion}}
+ A a2 { 1.2 }; // expected-error {{type 'double' cannot be narrowed to 'int' in initializer list}} expected-note {{silence}} expected-warning {{implicit conversion}}
struct B {
B(std::initializer_list<int> i) {}
};
B b1 { 1, 2 };
- B b2 { 1, 2.0 }; // expected-error {{type 'double' cannot be narrowed to 'int' in initializer list}} expected-note {{override}}
+ B b2 { 1, 2.0 }; // expected-error {{type 'double' cannot be narrowed to 'int' in initializer list}} expected-note {{silence}}
struct C {
C(int i, double j) {}
};
C c1 = { 1, 2.2 };
// FIXME: Suppress the narrowing warning in the cases where we issue a narrowing error.
- C c2 = { 1.1, 2 }; // expected-error {{type 'double' cannot be narrowed to 'int' in initializer list}} expected-note {{override}} expected-warning {{implicit conversion}}
+ C c2 = { 1.1, 2 }; // expected-error {{type 'double' cannot be narrowed to 'int' in initializer list}} expected-note {{silence}} expected-warning {{implicit conversion}}
int j { 1 };
int k { };
diff --git a/test/CXX/dcl.decl/dcl.init/dcl.init.list/p7-0x-fixits.cpp b/test/CXX/dcl.decl/dcl.init/dcl.init.list/p7-0x-fixits.cpp
index 0bea4ede19ca..299611ba7359 100644
--- a/test/CXX/dcl.decl/dcl.init/dcl.init.list/p7-0x-fixits.cpp
+++ b/test/CXX/dcl.decl/dcl.init/dcl.init.list/p7-0x-fixits.cpp
@@ -26,7 +26,7 @@ void test_template() {
maybe_shrink_int((char)3);
// CHECK: warning:{{.*}} cannot be narrowed
// CHECK: note:{{.*}} in instantiation
- // CHECK: note:{{.*}} override
+ // CHECK: note:{{.*}} silence
// FIXME: This should be static_cast<T>.
// CHECK: fix-it:{{.*}}"static_cast<char>("
// CHECK: fix-it:{{.*}}")"
diff --git a/test/CXX/dcl.decl/dcl.init/dcl.init.list/p7-0x.cpp b/test/CXX/dcl.decl/dcl.init/dcl.init.list/p7-0x.cpp
index 9b1727fd04af..42dee92b3ca3 100644
--- a/test/CXX/dcl.decl/dcl.init/dcl.init.list/p7-0x.cpp
+++ b/test/CXX/dcl.decl/dcl.init/dcl.init.list/p7-0x.cpp
@@ -8,16 +8,16 @@ void std_example() {
const int y = 999;
const int z = 99;
char c1 = x; // OK, though it might narrow (in this case, it does narrow)
- char c2{x}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
- char c3{y}; // expected-error {{ cannot be narrowed }} expected-note {{override}} expected-warning {{changes value}}
+ char c2{x}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
+ char c3{y}; // expected-error {{ cannot be narrowed }} expected-note {{silence}} expected-warning {{changes value}}
char c4{z}; // OK: no narrowing needed
unsigned char uc1 = {5}; // OK: no narrowing needed
- unsigned char uc2 = {-1}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
- unsigned int ui1 = {-1}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
+ unsigned char uc2 = {-1}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
+ unsigned int ui1 = {-1}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
signed int si1 =
- { (unsigned int)-1 }; // expected-error {{ cannot be narrowed }} expected-note {{override}}
- int ii = {2.0}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
- float f1 { x }; // expected-error {{ cannot be narrowed }} expected-note {{override}}
+ { (unsigned int)-1 }; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
+ int ii = {2.0}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
+ float f1 { x }; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
float f2 { 7 }; // OK: 7 can be exactly represented as a float
int f(int);
int a[] =
@@ -44,19 +44,19 @@ template<typename T> Convert<T> ConvertVar();
// * from a floating-point type to an integer type, or
void float_to_int() {
- Agg<char> a1 = {1.0F}; // expected-error {{type 'float' cannot be narrowed to 'char'}} expected-note {{override}}
- Agg<char> a2 = {1.0}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
- Agg<char> a3 = {1.0L}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
+ Agg<char> a1 = {1.0F}; // expected-error {{type 'float' cannot be narrowed to 'char'}} expected-note {{silence}}
+ Agg<char> a2 = {1.0}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
+ Agg<char> a3 = {1.0L}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
float f = 1.0;
double d = 1.0;
long double ld = 1.0;
- Agg<char> a4 = {f}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
- Agg<char> a5 = {d}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
- Agg<char> a6 = {ld}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
+ Agg<char> a4 = {f}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
+ Agg<char> a5 = {d}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
+ Agg<char> a6 = {ld}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
- Agg<char> ce1 = { Convert<float>(1.0) }; // expected-error {{type 'float' cannot be narrowed to 'char'}} expected-note {{override}}
- Agg<char> ce2 = { ConvertVar<double>() }; // expected-error {{type 'double' cannot be narrowed to 'char'}} expected-note {{override}}
+ Agg<char> ce1 = { Convert<float>(1.0) }; // expected-error {{type 'float' cannot be narrowed to 'char'}} expected-note {{silence}}
+ Agg<char> ce2 = { ConvertVar<double>() }; // expected-error {{type 'double' cannot be narrowed to 'char'}} expected-note {{silence}}
}
// * from long double to double or float, or from double to float, except where
@@ -72,8 +72,8 @@ void shrink_float() {
// Variables.
Agg<float> f1 = {f}; // OK (no-op)
- Agg<float> f2 = {d}; // expected-error {{non-constant-expression cannot be narrowed from type 'double' to 'float'}} expected-note {{override}}
- Agg<float> f3 = {ld}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
+ Agg<float> f2 = {d}; // expected-error {{non-constant-expression cannot be narrowed from type 'double' to 'float'}} expected-note {{silence}}
+ Agg<float> f3 = {ld}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
// Exact constants.
Agg<float> f4 = {1.0}; // OK (double constant represented exactly)
Agg<float> f5 = {1.0L}; // OK (long double constant represented exactly)
@@ -81,8 +81,8 @@ void shrink_float() {
Agg<float> f6 = {0.1}; // OK (double constant in range but rounded)
Agg<float> f7 = {0.1L}; // OK (long double constant in range but rounded)
// Out of range constants.
- Agg<float> f8 = {1E50}; // expected-error {{constant expression evaluates to 1.000000e+50 which cannot be narrowed to type 'float'}} expected-note {{override}}
- Agg<float> f9 = {1E50L}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
+ Agg<float> f8 = {1E50}; // expected-error {{constant expression evaluates to 1.000000e+50 which cannot be narrowed to type 'float'}} expected-note {{silence}}
+ Agg<float> f9 = {1E50L}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
// More complex constant expression.
constexpr long double e40 = 1E40L, e30 = 1E30L, e39 = 1E39L;
Agg<float> f10 = {e40 - 5 * e39 + e30 - 5 * e39}; // OK
@@ -90,19 +90,19 @@ void shrink_float() {
// Variables.
Agg<double> d1 = {f}; // OK (widening)
Agg<double> d2 = {d}; // OK (no-op)
- Agg<double> d3 = {ld}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
+ Agg<double> d3 = {ld}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
// Exact constant.
Agg<double> d4 = {1.0L}; // OK (long double constant represented exactly)
// Inexact but in-range constant.
Agg<double> d5 = {0.1L}; // OK (long double constant in range but rounded)
// Out of range constant.
- Agg<double> d6 = {1E315L}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
+ Agg<double> d6 = {1E315L}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
// More complex constant expression.
constexpr long double e315 = 1E315L, e305 = 1E305L, e314 = 1E314L;
Agg<double> d7 = {e315 - 5 * e314 + e305 - 5 * e314}; // OK
- Agg<float> ce1 = { Convert<double>(1e300) }; // expected-error {{constant expression evaluates to 1.000000e+300 which cannot be narrowed to type 'float'}} expected-note {{override}}
- Agg<double> ce2 = { ConvertVar<long double>() }; // expected-error {{non-constant-expression cannot be narrowed from type 'long double' to 'double'}} expected-note {{override}}
+ Agg<float> ce1 = { Convert<double>(1e300) }; // expected-error {{constant expression evaluates to 1.000000e+300 which cannot be narrowed to type 'float'}} expected-note {{silence}}
+ Agg<double> ce2 = { ConvertVar<long double>() }; // expected-error {{non-constant-expression cannot be narrowed from type 'long double' to 'double'}} expected-note {{silence}}
}
// * from an integer type or unscoped enumeration type to a floating-point type,
@@ -114,16 +114,16 @@ void int_to_float() {
char c = 1;
// Variables. Yes, even though all char's will fit into any floating type.
- Agg<float> f1 = {c}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
- Agg<double> f2 = {c}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
- Agg<long double> f3 = {c}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
+ Agg<float> f1 = {c}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
+ Agg<double> f2 = {c}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
+ Agg<long double> f3 = {c}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
// Constants.
Agg<float> f4 = {12345678}; // OK (exactly fits in a float)
- Agg<float> f5 = {123456789}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
+ Agg<float> f5 = {123456789}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
- Agg<float> ce1 = { Convert<int>(123456789) }; // expected-error {{constant expression evaluates to 123456789 which cannot be narrowed to type 'float'}} expected-note {{override}}
- Agg<double> ce2 = { ConvertVar<long long>() }; // expected-error {{non-constant-expression cannot be narrowed from type 'long long' to 'double'}} expected-note {{override}}
+ Agg<float> ce1 = { Convert<int>(123456789) }; // expected-error {{constant expression evaluates to 123456789 which cannot be narrowed to type 'float'}} expected-note {{silence}}
+ Agg<double> ce2 = { ConvertVar<long long>() }; // expected-error {{non-constant-expression cannot be narrowed from type 'long long' to 'double'}} expected-note {{silence}}
}
// * from an integer type or unscoped enumeration type to an integer type that
@@ -135,52 +135,53 @@ void shrink_int() {
// Not a constant expression.
short s = 1;
unsigned short us = 1;
- Agg<char> c1 = {s}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
- Agg<unsigned short> s1 = {s}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
- Agg<short> s2 = {us}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
+ Agg<char> c1 = {s}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
+ Agg<unsigned short> s1 = {s}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
+ Agg<short> s2 = {us}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
// "that cannot represent all the values of the original type" means that the
// validity of the program depends on the relative sizes of integral types.
// This test compiles with -m64, so sizeof(int)<sizeof(long)==sizeof(long
// long).
long l1 = 1;
- Agg<int> i1 = {l1}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
+ Agg<int> i1 = {l1}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
long long ll = 1;
Agg<long> l2 = {ll}; // OK
// Constants.
Agg<char> c2 = {127}; // OK
- Agg<char> c3 = {300}; // expected-error {{ cannot be narrowed }} expected-note {{override}} expected-warning {{changes value}}
+ Agg<char> c3 = {300}; // expected-error {{ cannot be narrowed }} expected-note {{silence}} expected-warning {{changes value}}
Agg<int> i2 = {0x7FFFFFFFU}; // OK
- Agg<int> i3 = {0x80000000U}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
- Agg<unsigned int> i4 = {-0x80000000L}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
+ Agg<int> i3 = {0x80000000U}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
+ Agg<unsigned int> i4 = {-0x80000000L}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
// Bool is also an integer type, but conversions to it are a different AST
// node.
Agg<bool> b1 = {0}; // OK
Agg<bool> b2 = {1}; // OK
- Agg<bool> b3 = {-1}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
+ Agg<bool> b3 = {-1}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
// Conversions from pointers to booleans aren't narrowing conversions.
- Agg<bool> b = {&b1}; // OK
+ Agg<bool>* ptr = &b1;
+ Agg<bool> b = {ptr}; // OK
- Agg<short> ce1 = { Convert<int>(100000) }; // expected-error {{constant expression evaluates to 100000 which cannot be narrowed to type 'short'}} expected-note {{override}} expected-warning {{changes value from 100000 to -31072}}
- Agg<char> ce2 = { ConvertVar<short>() }; // expected-error {{non-constant-expression cannot be narrowed from type 'short' to 'char'}} expected-note {{override}}
+ Agg<short> ce1 = { Convert<int>(100000) }; // expected-error {{constant expression evaluates to 100000 which cannot be narrowed to type 'short'}} expected-note {{silence}} expected-warning {{changes value from 100000 to -31072}}
+ Agg<char> ce2 = { ConvertVar<short>() }; // expected-error {{non-constant-expression cannot be narrowed from type 'short' to 'char'}} expected-note {{silence}}
// Negative -> larger unsigned type.
- unsigned long long ll1 = { -1 }; // expected-error {{ -1 which cannot be narrowed}} expected-note {{override}}
+ unsigned long long ll1 = { -1 }; // expected-error {{ -1 which cannot be narrowed}} expected-note {{silence}}
unsigned long long ll2 = { 1 }; // OK
- unsigned long long ll3 = { s }; // expected-error {{cannot be narrowed from type 'short'}} expected-note {{override}}
+ unsigned long long ll3 = { s }; // expected-error {{cannot be narrowed from type 'short'}} expected-note {{silence}}
unsigned long long ll4 = { us }; // OK
- unsigned long long ll5 = { ll }; // expected-error {{cannot be narrowed from type 'long long'}} expected-note {{override}}
- Agg<unsigned long long> ll6 = { -1 }; // expected-error {{ -1 which cannot be narrowed}} expected-note {{override}}
+ unsigned long long ll5 = { ll }; // expected-error {{cannot be narrowed from type 'long long'}} expected-note {{silence}}
+ Agg<unsigned long long> ll6 = { -1 }; // expected-error {{ -1 which cannot be narrowed}} expected-note {{silence}}
Agg<unsigned long long> ll7 = { 18446744073709551615ULL }; // OK
- Agg<unsigned long long> ll8 = { __int128(18446744073709551615ULL) + 1 }; // expected-error {{ 18446744073709551616 which cannot be narrowed}} expected-note {{override}} expected-warning {{changes value}}
+ Agg<unsigned long long> ll8 = { __int128(18446744073709551615ULL) + 1 }; // expected-error {{ 18446744073709551616 which cannot be narrowed}} expected-note {{silence}} expected-warning {{changes value}}
signed char c = 'x';
- unsigned short usc1 = { c }; // expected-error {{non-constant-expression cannot be narrowed from type 'signed char'}} expected-note {{override}}
+ unsigned short usc1 = { c }; // expected-error {{non-constant-expression cannot be narrowed from type 'signed char'}} expected-note {{silence}}
unsigned short usc2 = { (signed char)'x' }; // OK
- unsigned short usc3 = { (signed char)-1 }; // expected-error {{ -1 which cannot be narrowed}} expected-note {{override}}
+ unsigned short usc3 = { (signed char)-1 }; // expected-error {{ -1 which cannot be narrowed}} expected-note {{silence}}
}
// Be sure that type- and value-dependent expressions in templates get the error
@@ -188,9 +189,9 @@ void shrink_int() {
template<int I, typename T>
void maybe_shrink_int(T t) {
- Agg<short> s1 = {t}; // expected-error {{ cannot be narrowed }} expected-note {{override}}
- Agg<short> s2 = {I}; // expected-error {{ cannot be narrowed }} expected-note {{override}} expected-warning {{changes value}}
- Agg<T> t2 = {700}; // expected-error {{ cannot be narrowed }} expected-note {{override}} expected-warning {{changes value}}
+ Agg<short> s1 = {t}; // expected-error {{ cannot be narrowed }} expected-note {{silence}}
+ Agg<short> s2 = {I}; // expected-error {{ cannot be narrowed }} expected-note {{silence}} expected-warning {{changes value}}
+ Agg<T> t2 = {700}; // expected-error {{ cannot be narrowed }} expected-note {{silence}} expected-warning {{changes value}}
}
void test_template() {
@@ -203,9 +204,9 @@ void test_template() {
void test_qualifiers(int i) {
const int j = i;
- struct {const unsigned char c;} c1 = {j}; // expected-error {{from type 'int' to 'unsigned char' in}} expected-note {{override}}
+ struct {const unsigned char c;} c1 = {j}; // expected-error {{from type 'int' to 'unsigned char' in}} expected-note {{silence}}
// Template arguments make it harder to avoid printing qualifiers:
- Agg<const unsigned char> c2 = {j}; // expected-error {{from type 'int' to 'const unsigned char' in}} expected-note {{override}}
+ Agg<const unsigned char> c2 = {j}; // expected-error {{from type 'int' to 'const unsigned char' in}} expected-note {{silence}}
}
// Test SFINAE checks.
diff --git a/test/CXX/dcl.decl/dcl.init/dcl.init.list/p7-cxx11-nowarn.cpp b/test/CXX/dcl.decl/dcl.init/dcl.init.list/p7-cxx11-nowarn.cpp
index 4bcf113d7142..d4d8198d4fc8 100644
--- a/test/CXX/dcl.decl/dcl.init/dcl.init.list/p7-cxx11-nowarn.cpp
+++ b/test/CXX/dcl.decl/dcl.init/dcl.init.list/p7-cxx11-nowarn.cpp
@@ -9,16 +9,16 @@ void std_example() {
const int y = 999;
const int z = 99;
char c1 = x; // OK, though it might narrow (in this case, it does narrow)
- char c2{x}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
- char c3{y}; // expected-warning {{ cannot be narrowed }} expected-note {{override}} expected-warning {{changes value}}
+ char c2{x}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
+ char c3{y}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}} expected-warning {{changes value}}
char c4{z}; // OK: no narrowing needed
unsigned char uc1 = {5}; // OK: no narrowing needed
- unsigned char uc2 = {-1}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
- unsigned int ui1 = {-1}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
+ unsigned char uc2 = {-1}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
+ unsigned int ui1 = {-1}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
signed int si1 =
- { (unsigned int)-1 }; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
- int ii = {2.0}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
- float f1 { x }; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
+ { (unsigned int)-1 }; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
+ int ii = {2.0}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
+ float f1 { x }; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
float f2 { 7 }; // OK: 7 can be exactly represented as a float
int f(int);
int a[] =
@@ -45,19 +45,19 @@ template<typename T> Convert<T> ConvertVar();
// * from a floating-point type to an integer type, or
void float_to_int() {
- Agg<char> a1 = {1.0F}; // expected-warning {{type 'float' cannot be narrowed to 'char'}} expected-note {{override}}
- Agg<char> a2 = {1.0}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
- Agg<char> a3 = {1.0L}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
+ Agg<char> a1 = {1.0F}; // expected-warning {{type 'float' cannot be narrowed to 'char'}} expected-note {{silence}}
+ Agg<char> a2 = {1.0}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
+ Agg<char> a3 = {1.0L}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
float f = 1.0;
double d = 1.0;
long double ld = 1.0;
- Agg<char> a4 = {f}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
- Agg<char> a5 = {d}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
- Agg<char> a6 = {ld}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
+ Agg<char> a4 = {f}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
+ Agg<char> a5 = {d}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
+ Agg<char> a6 = {ld}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
- Agg<char> ce1 = { Convert<float>(1.0) }; // expected-warning {{type 'float' cannot be narrowed to 'char'}} expected-note {{override}}
- Agg<char> ce2 = { ConvertVar<double>() }; // expected-warning {{type 'double' cannot be narrowed to 'char'}} expected-note {{override}}
+ Agg<char> ce1 = { Convert<float>(1.0) }; // expected-warning {{type 'float' cannot be narrowed to 'char'}} expected-note {{silence}}
+ Agg<char> ce2 = { ConvertVar<double>() }; // expected-warning {{type 'double' cannot be narrowed to 'char'}} expected-note {{silence}}
}
// * from long double to double or float, or from double to float, except where
@@ -73,8 +73,8 @@ void shrink_float() {
// Variables.
Agg<float> f1 = {f}; // OK (no-op)
- Agg<float> f2 = {d}; // expected-warning {{non-constant-expression cannot be narrowed from type 'double' to 'float'}} expected-note {{override}}
- Agg<float> f3 = {ld}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
+ Agg<float> f2 = {d}; // expected-warning {{non-constant-expression cannot be narrowed from type 'double' to 'float'}} expected-note {{silence}}
+ Agg<float> f3 = {ld}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
// Exact constants.
Agg<float> f4 = {1.0}; // OK (double constant represented exactly)
Agg<float> f5 = {1.0L}; // OK (long double constant represented exactly)
@@ -82,8 +82,8 @@ void shrink_float() {
Agg<float> f6 = {0.1}; // OK (double constant in range but rounded)
Agg<float> f7 = {0.1L}; // OK (long double constant in range but rounded)
// Out of range constants.
- Agg<float> f8 = {1E50}; // expected-warning {{constant expression evaluates to 1.000000e+50 which cannot be narrowed to type 'float'}} expected-note {{override}}
- Agg<float> f9 = {1E50L}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
+ Agg<float> f8 = {1E50}; // expected-warning {{constant expression evaluates to 1.000000e+50 which cannot be narrowed to type 'float'}} expected-note {{silence}}
+ Agg<float> f9 = {1E50L}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
// More complex constant expression.
constexpr long double e40 = 1E40L, e30 = 1E30L, e39 = 1E39L;
Agg<float> f10 = {e40 - 5 * e39 + e30 - 5 * e39}; // OK
@@ -91,19 +91,19 @@ void shrink_float() {
// Variables.
Agg<double> d1 = {f}; // OK (widening)
Agg<double> d2 = {d}; // OK (no-op)
- Agg<double> d3 = {ld}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
+ Agg<double> d3 = {ld}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
// Exact constant.
Agg<double> d4 = {1.0L}; // OK (long double constant represented exactly)
// Inexact but in-range constant.
Agg<double> d5 = {0.1L}; // OK (long double constant in range but rounded)
// Out of range constant.
- Agg<double> d6 = {1E315L}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
+ Agg<double> d6 = {1E315L}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
// More complex constant expression.
constexpr long double e315 = 1E315L, e305 = 1E305L, e314 = 1E314L;
Agg<double> d7 = {e315 - 5 * e314 + e305 - 5 * e314}; // OK
- Agg<float> ce1 = { Convert<double>(1e300) }; // expected-warning {{constant expression evaluates to 1.000000e+300 which cannot be narrowed to type 'float'}} expected-note {{override}}
- Agg<double> ce2 = { ConvertVar<long double>() }; // expected-warning {{non-constant-expression cannot be narrowed from type 'long double' to 'double'}} expected-note {{override}}
+ Agg<float> ce1 = { Convert<double>(1e300) }; // expected-warning {{constant expression evaluates to 1.000000e+300 which cannot be narrowed to type 'float'}} expected-note {{silence}}
+ Agg<double> ce2 = { ConvertVar<long double>() }; // expected-warning {{non-constant-expression cannot be narrowed from type 'long double' to 'double'}} expected-note {{silence}}
}
// * from an integer type or unscoped enumeration type to a floating-point type,
@@ -115,16 +115,16 @@ void int_to_float() {
char c = 1;
// Variables. Yes, even though all char's will fit into any floating type.
- Agg<float> f1 = {c}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
- Agg<double> f2 = {c}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
- Agg<long double> f3 = {c}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
+ Agg<float> f1 = {c}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
+ Agg<double> f2 = {c}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
+ Agg<long double> f3 = {c}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
// Constants.
Agg<float> f4 = {12345678}; // OK (exactly fits in a float)
- Agg<float> f5 = {123456789}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
+ Agg<float> f5 = {123456789}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
- Agg<float> ce1 = { Convert<int>(123456789) }; // expected-warning {{constant expression evaluates to 123456789 which cannot be narrowed to type 'float'}} expected-note {{override}}
- Agg<double> ce2 = { ConvertVar<long long>() }; // expected-warning {{non-constant-expression cannot be narrowed from type 'long long' to 'double'}} expected-note {{override}}
+ Agg<float> ce1 = { Convert<int>(123456789) }; // expected-warning {{constant expression evaluates to 123456789 which cannot be narrowed to type 'float'}} expected-note {{silence}}
+ Agg<double> ce2 = { ConvertVar<long long>() }; // expected-warning {{non-constant-expression cannot be narrowed from type 'long long' to 'double'}} expected-note {{silence}}
}
// * from an integer type or unscoped enumeration type to an integer type that
@@ -136,38 +136,39 @@ void shrink_int() {
// Not a constant expression.
short s = 1;
unsigned short us = 1;
- Agg<char> c1 = {s}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
- Agg<unsigned short> s1 = {s}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
- Agg<short> s2 = {us}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
+ Agg<char> c1 = {s}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
+ Agg<unsigned short> s1 = {s}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
+ Agg<short> s2 = {us}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
// "that cannot represent all the values of the original type" means that the
// validity of the program depends on the relative sizes of integral types.
// This test compiles with -m64, so sizeof(int)<sizeof(long)==sizeof(long
// long).
long l1 = 1;
- Agg<int> i1 = {l1}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
+ Agg<int> i1 = {l1}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
long long ll = 1;
Agg<long> l2 = {ll}; // OK
// Constants.
Agg<char> c2 = {127}; // OK
- Agg<char> c3 = {300}; // expected-warning {{ cannot be narrowed }} expected-note {{override}} expected-warning {{changes value}}
+ Agg<char> c3 = {300}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}} expected-warning {{changes value}}
Agg<int> i2 = {0x7FFFFFFFU}; // OK
- Agg<int> i3 = {0x80000000U}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
- Agg<unsigned int> i4 = {-0x80000000L}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
+ Agg<int> i3 = {0x80000000U}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
+ Agg<unsigned int> i4 = {-0x80000000L}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
// Bool is also an integer type, but conversions to it are a different AST
// node.
Agg<bool> b1 = {0}; // OK
Agg<bool> b2 = {1}; // OK
- Agg<bool> b3 = {-1}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
+ Agg<bool> b3 = {-1}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
// Conversions from pointers to booleans aren't narrowing conversions.
- Agg<bool> b = {&b1}; // OK
+ Agg<bool>* ptr = &b1;
+ Agg<bool> b = {ptr}; // OK
- Agg<short> ce1 = { Convert<int>(100000) }; // expected-warning {{constant expression evaluates to 100000 which cannot be narrowed to type 'short'}} expected-note {{override}} expected-warning {{changes value from 100000 to -31072}}
- Agg<char> ce2 = { ConvertVar<short>() }; // expected-warning {{non-constant-expression cannot be narrowed from type 'short' to 'char'}} expected-note {{override}}
+ Agg<short> ce1 = { Convert<int>(100000) }; // expected-warning {{constant expression evaluates to 100000 which cannot be narrowed to type 'short'}} expected-note {{silence}} expected-warning {{changes value from 100000 to -31072}}
+ Agg<char> ce2 = { ConvertVar<short>() }; // expected-warning {{non-constant-expression cannot be narrowed from type 'short' to 'char'}} expected-note {{silence}}
}
// Be sure that type- and value-dependent expressions in templates get the warning
@@ -175,9 +176,9 @@ void shrink_int() {
template<int I, typename T>
void maybe_shrink_int(T t) {
- Agg<short> s1 = {t}; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
- Agg<short> s2 = {I}; // expected-warning {{ cannot be narrowed }} expected-note {{override}} expected-warning {{changes value}}
- Agg<T> t2 = {700}; // expected-warning {{ cannot be narrowed }} expected-note {{override}} expected-warning {{changes value}}
+ Agg<short> s1 = {t}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}}
+ Agg<short> s2 = {I}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}} expected-warning {{changes value}}
+ Agg<T> t2 = {700}; // expected-warning {{ cannot be narrowed }} expected-note {{silence}} expected-warning {{changes value}}
}
void test_template() {
@@ -190,9 +191,9 @@ void test_template() {
void test_qualifiers(int i) {
const int j = i;
- struct {const unsigned char c;} c1 = {j}; // expected-warning {{from type 'int' to 'unsigned char' in}} expected-note {{override}}
+ struct {const unsigned char c;} c1 = {j}; // expected-warning {{from type 'int' to 'unsigned char' in}} expected-note {{silence}}
// Template arguments make it harder to avoid printing qualifiers:
- Agg<const unsigned char> c2 = {j}; // expected-warning {{from type 'int' to 'const unsigned char' in}} expected-note {{override}}
+ Agg<const unsigned char> c2 = {j}; // expected-warning {{from type 'int' to 'const unsigned char' in}} expected-note {{silence}}
}
// Make sure we still get the right SFINAE behavior.
diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p6-0x.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p6-0x.cpp
index 2ec1454100b6..cec747e1d605 100644
--- a/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p6-0x.cpp
+++ b/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p6-0x.cpp
@@ -22,13 +22,13 @@ typedef func_type_rvalue &func_type_rvalue_ref; // expected-error{{reference to
template<typename T = func_type_lvalue> struct wrap {
typedef T val;
- typedef T *ptr;
- typedef T &ref;
+ typedef T *ptr; // expected-error-re 2{{pointer to function type '{{.*}}' cannot have '{{&|&&}}' qualifier}}
+ typedef T &ref; // expected-error-re 2{{reference to function type '{{.*}}' cannot have '{{&|&&}}' qualifier}}
};
-using func_type_lvalue = wrap<>::val;
+using func_type_lvalue = wrap<>::val; // expected-note{{in instantiation of}}
using func_type_lvalue = wrap<func_type_lvalue>::val;
-using func_type_rvalue = wrap<func_type_rvalue>::val;
+using func_type_rvalue = wrap<func_type_rvalue>::val; // expected-note{{in instantiation of}}
using func_type_lvalue_ptr = wrap<>::ptr;
using func_type_lvalue_ptr = wrap<func_type_lvalue>::ptr;
@@ -51,3 +51,10 @@ void (X::*mpf2)() && = &X::f1;
void (f() &&); // expected-error{{non-member function cannot have '&&' qualifier}}
+
+// FIXME: These are ill-formed.
+template<typename T> struct pass {
+ void f(T);
+};
+pass<func_type_lvalue> pass0;
+pass<func_type_lvalue> pass1;
diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p6.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p6.cpp
index e2d94fbf3811..a035086c9a12 100644
--- a/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p6.cpp
+++ b/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p6.cpp
@@ -18,3 +18,16 @@ struct Y {
friend void X::f() const;
friend void ::f() const; // expected-error {{non-member function cannot have 'const' qualifier}}
};
+
+template<typename T> struct S {
+ typedef T F;
+ typedef T *P; // expected-error {{pointer to function type 'void () const' cannot have 'const' qualifier}}
+ typedef T &R; // expected-error {{reference to function type 'void () const' cannot have 'const' qualifier}}
+};
+S<F> s; // expected-note {{in instantiation of}}
+
+// FIXME: This is ill-formed.
+template<typename T> struct U {
+ void f(T);
+};
+U<F> u;
diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp
index ec1ccbf5de5f..0454412229fa 100644
--- a/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp
+++ b/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p8.cpp
@@ -1,8 +1,8 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
struct A { };
-A::A (enum { e1 }) {} // expected-error{{can not be defined in a parameter}}
-void A::f(enum { e2 }) {} // expected-error{{can not be defined in a parameter}}
+A::A (enum { e1 }) {} // expected-error{{cannot be defined in a parameter}}
+void A::f(enum { e2 }) {} // expected-error{{cannot be defined in a parameter}}
-enum { e3 } A::g() { } // expected-error{{can not be defined in the result type}} \
+enum { e3 } A::g() { } // expected-error{{cannot be defined in the result type}} \
// expected-error{{out-of-line definition}}
diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.mptr/p3.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.mptr/p3.cpp
index 7e35788d898b..e159ab729d5f 100644
--- a/test/CXX/dcl.decl/dcl.meaning/dcl.mptr/p3.cpp
+++ b/test/CXX/dcl.decl/dcl.meaning/dcl.mptr/p3.cpp
@@ -17,7 +17,7 @@ void f() {
A a(b);
int A::*ip = &A::s; // expected-error {{cannot initialize a variable of type 'int A::*' with an rvalue of type 'int *'}}
- a.*&A::s = 10; // expected-error{{right hand operand to .* has non pointer-to-member type 'int *'}}
+ a.*&A::s = 10; // expected-error{{right hand operand to .* has non-pointer-to-member type 'int *'}}
a.*&A::i = 10; // expected-error{{cannot form a pointer-to-member to member 'i' of reference type 'int &'}}
ft(a); // expected-note{{in instantiation of function template specialization 'ft<A>' requested here}}
diff --git a/test/CXX/dcl.decl/dcl.meaning/dcl.ref/p6-0x.cpp b/test/CXX/dcl.decl/dcl.meaning/dcl.ref/p6-0x.cpp
index cd623df71e81..0f76e1f3c79b 100644
--- a/test/CXX/dcl.decl/dcl.meaning/dcl.ref/p6-0x.cpp
+++ b/test/CXX/dcl.decl/dcl.meaning/dcl.ref/p6-0x.cpp
@@ -1,5 +1,4 @@
// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
-// expected-no-diagnostics
template<typename T, typename U>
struct is_same {
@@ -20,8 +19,8 @@ typedef int& LRI;
typedef int&& RRI;
typedef LRI& r1; CHECK_EQUAL_TYPES(r1, int&);
-typedef const LRI& r2; CHECK_EQUAL_TYPES(r2, int&);
-typedef const LRI&& r3; CHECK_EQUAL_TYPES(r3, int&);
+typedef const LRI& r2; CHECK_EQUAL_TYPES(r2, int&); // expected-warning {{'const' qualifier on reference type 'LRI' (aka 'int &') has no effect}}
+typedef const LRI&& r3; CHECK_EQUAL_TYPES(r3, int&); // expected-warning {{'const' qualifier on reference type 'LRI' (aka 'int &') has no effect}}
typedef RRI& r4; CHECK_EQUAL_TYPES(r4, int&);
typedef RRI&& r5; CHECK_EQUAL_TYPES(r5, int&&);
diff --git a/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp b/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp
index 99334b845aba..1d04d7d2a700 100644
--- a/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp
+++ b/test/CXX/dcl.decl/dcl.meaning/p1-0x.cpp
@@ -22,3 +22,83 @@ int decltype(tfoo<T>())::i; // expected-error{{nested name specifier 'decltype(t
template<typename T>
void decltype(tfoo<T>())::func() { // expected-error{{nested name specifier 'decltype(tfoo<T>())::' for declaration does not refer into a class, class template or class template partial specialization}}
}
+
+// An init-declarator named with a qualified-id can refer to an element of the
+// inline namespace set of the named namespace.
+namespace inline_namespaces {
+ namespace N {
+ inline namespace M {
+ void f(); // expected-note {{possible target}}
+ void g();
+ extern int m; // expected-note {{candidate}}
+ extern int n;
+ struct S; // expected-note {{candidate}}
+ struct T;
+ enum E : int; // expected-note {{candidate}}
+ enum F : int;
+ template<typename T> void ft(); // expected-note {{here}}
+ template<typename T> void gt(); // expected-note {{here}}
+ template<typename T> extern int mt; // expected-note {{here}} expected-warning {{extension}}
+ template<typename T> extern int nt; // expected-note {{here}} expected-warning {{extension}}
+ template<typename T> struct U; // expected-note {{here}}
+ template<typename T> struct V; // expected-note {{here}}
+ }
+
+ // When named by unqualified-id, we do *not* look in the inline namespace
+ // set.
+ void f() {} // expected-note {{possible target}}
+ int m; // expected-note {{candidate}}
+ struct S {}; // expected-note {{candidate}}
+ enum E : int {}; // expected-note {{candidate}}
+
+ static_assert(&f != &M::f, ""); // expected-error {{reference to overloaded function could not be resolved}}
+ static_assert(&m != &M::m, ""); // expected-error {{ambiguous}}
+ typedef S X; // expected-error {{ambiguous}}
+ typedef E Y; // expected-error {{ambiguous}}
+
+ // When named by (unqualified) template-id, we do look in the inline
+ // namespace set. See [namespace.def]p8, [temp.explicit]p3,
+ // [temp.expl.spec]p2.
+ //
+ // This is not explicitly specified for partial specializations, but
+ // that is just a language defect.
+ template<> void ft<int>() {}
+ template void ft<char>(); // expected-error {{undefined}}
+
+ template<typename T> int mt<T*>;
+ template<> int mt<int>;
+ template int mt<int*>;
+ template int mt<char>; // expected-error {{undefined}}
+
+ template<typename T> struct U<T*> {};
+ template<> struct U<int> {};
+ template struct U<int*>;
+ template struct U<char>; // expected-error {{undefined}}
+ }
+
+ // When named by qualified-id, we *do* look in the inline namespace set.
+ void N::g() {}
+ int N::n;
+ struct N::T {};
+ enum N::F : int {};
+
+ static_assert(&N::g == &N::M::g, "");
+ static_assert(&N::n == &N::M::n, "");
+ typedef N::T X;
+ typedef N::M::T X;
+ typedef N::F Y;
+ typedef N::M::F Y;
+
+ template<> void N::gt<int>() {}
+ template void N::gt<char>(); // expected-error {{undefined}}
+
+ template<typename T> int N::nt<T*>;
+ template<> int N::nt<int>;
+ template int N::nt<int*>;
+ template int N::nt<char>; // expected-error {{undefined}}
+
+ template<typename T> struct N::V<T*> {};
+ template<> struct N::V<int> {};
+ template struct N::V<int*>;
+ template struct N::V<char>; // expected-error {{undefined}}
+}
diff --git a/test/CXX/dcl.decl/dcl.meaning/p1.cpp b/test/CXX/dcl.decl/dcl.meaning/p1.cpp
index ec9a2611872c..5747380f2806 100644
--- a/test/CXX/dcl.decl/dcl.meaning/p1.cpp
+++ b/test/CXX/dcl.decl/dcl.meaning/p1.cpp
@@ -29,9 +29,17 @@ namespace NS {
template<typename T> void wibble(T);
}
namespace NS {
- void NS::foo() {} // expected-error{{extra qualification on member 'foo'}}
- int NS::bar; // expected-error{{extra qualification on member 'bar'}}
- struct NS::X { }; // expected-error{{extra qualification on member 'X'}}
- template<typename T> struct NS::Y; // expected-error{{extra qualification on member 'Y'}}
- template<typename T> void NS::wibble(T) { } // expected-error{{extra qualification on member 'wibble'}}
+ // Under DR482, these are all valid, except for forward-declaring a struct
+ // with a nested-name-specifier.
+ void NS::foo(); // expected-warning {{extra qualification}}
+ extern int NS::bar; // expected-warning {{extra qualification}}
+ struct NS::X; // expected-error {{forward declaration of struct cannot have a nested name specifier}} expected-warning {{extra qualification}}
+ template<typename T> struct NS::Y; // expected-error {{forward declaration of struct cannot have a nested name specifier}} expected-warning {{extra qualification}}
+ template<typename T> void NS::wibble(T); // expected-warning {{extra qualification}}
+
+ void NS::foo() {} // expected-warning{{extra qualification on member 'foo'}}
+ int NS::bar; // expected-warning{{extra qualification on member 'bar'}}
+ struct NS::X { }; // expected-warning{{extra qualification on member 'X'}}
+ template<typename T> struct NS::Y { }; // expected-warning{{extra qualification on member 'Y'}}
+ template<typename T> void NS::wibble(T) { } // expected-warning{{extra qualification on member 'wibble'}}
}
diff --git a/test/CXX/drs/dr0xx.cpp b/test/CXX/drs/dr0xx.cpp
index 265a52d9261a..29e1720b1bbf 100644
--- a/test/CXX/drs/dr0xx.cpp
+++ b/test/CXX/drs/dr0xx.cpp
@@ -4,7 +4,7 @@
namespace dr1 { // dr1: no
namespace X { extern "C" void dr1_f(int a = 1); }
- namespace Y { extern "C" void dr1_f(int a = 2); }
+ namespace Y { extern "C" void dr1_f(int a = 1); }
using X::dr1_f; using Y::dr1_f;
void g() {
dr1_f(0);
@@ -25,7 +25,23 @@ namespace dr1 { // dr1: no
}
void X::z(int = 1) {} // expected-note {{previous}}
namespace X {
- void z(int = 2); // expected-error {{redefinition of default argument}}
+ void z(int = 1); // expected-error {{redefinition of default argument}}
+ }
+
+ void i(int = 1);
+ void j() {
+ void i(int = 1);
+ using dr1::i;
+ i(0);
+ // FIXME: This should be rejected, due to the ambiguous default argument.
+ i();
+ }
+ void k() {
+ using dr1::i;
+ void i(int = 1);
+ i(0);
+ // FIXME: This should be rejected, due to the ambiguous default argument.
+ i();
}
}
@@ -141,6 +157,21 @@ namespace dr12 { // dr12: sup 239
}
}
+namespace dr13 { // dr13: no
+ extern "C" void f(int);
+ void g(char);
+
+ template<typename T> struct A {
+ A(void (*fp)(T));
+ };
+ template<typename T> int h(void (T));
+
+ A<int> a1(f); // FIXME: We should reject this.
+ A<char> a2(g);
+ int a3 = h(f); // FIXME: We should reject this.
+ int a4 = h(g);
+}
+
namespace dr14 { // dr14: yes
namespace X { extern "C" int dr14_f(); }
namespace Y { extern "C" int dr14_f(); }
@@ -194,10 +225,7 @@ namespace dr17 { // dr17: yes
};
}
-namespace dr18 { // dr18: yes
- typedef void Void;
- void f(Void); // expected-error {{empty parameter list defined with a typedef of 'void'}}
-}
+// dr18: sup 577
namespace dr19 { // dr19: yes
struct A {
@@ -464,23 +492,15 @@ namespace dr46 { // dr46: yes
template template struct A<int>::B<int>; // expected-error {{expected unqualified-id}}
}
-namespace dr47 { // dr47: no
+namespace dr47 { // dr47: sup 329
template<typename T> struct A {
- friend void f() { T t; }
+ friend void f() { T t; } // expected-error {{redefinition}} expected-note {{previous}}
};
A<int> a;
- A<float> b;
-#if __cplusplus < 201103L
- // expected-error@-5 {{redefinition}} expected-note@-5 {{previous}}
- // expected-note@-3 {{instantiation of}}
-#else
+ A<float> b; // expected-note {{instantiation of}}
+
void f();
- // FIXME: We should produce some kind of error here. C++11 [temp.friend]p4
- // says we instantiate 'f' when it's odr-used, but that doesn't imply that
- // this is valid; we still have multiple definitions of 'f' even if we never
- // instantiate any of them.
void g() { f(); }
-#endif
}
namespace dr48 { // dr48: yes
@@ -919,11 +939,10 @@ namespace dr87 { // dr87: no
namespace dr88 { // dr88: yes
template<typename T> struct S {
- static const int a = 1;
+ static const int a = 1; // expected-note {{previous}}
static const int b;
};
- // FIXME: This diagnostic is pretty bad.
- template<> const int S<int>::a = 4; // expected-error {{redefinition}} expected-note {{previous}}
+ template<> const int S<int>::a = 4; // expected-error {{already has an initializer}}
template<> const int S<int>::b = 4;
}
@@ -963,6 +982,22 @@ namespace dr91 { // dr91: yes
int k = f(U());
}
+namespace dr92 { // dr92: yes
+ void f() throw(int, float);
+ void (*p)() throw(int) = &f; // expected-error {{target exception specification is not superset of source}}
+ void (*q)() throw(int);
+ void (**pp)() throw() = &q; // expected-error {{exception specifications are not allowed}}
+
+ void g(void() throw());
+ void h() {
+ g(f); // expected-error {{is not superset}}
+ g(q); // expected-error {{is not superset}}
+ }
+
+ template<void() throw()> struct X {};
+ X<&f> xp; // ok
+}
+
// dr93: na
namespace dr94 { // dr94: yes
diff --git a/test/CXX/drs/dr10xx.cpp b/test/CXX/drs/dr10xx.cpp
new file mode 100644
index 000000000000..64c71b2b0f92
--- /dev/null
+++ b/test/CXX/drs/dr10xx.cpp
@@ -0,0 +1,33 @@
+// RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -std=c++1y %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+
+// expected-no-diagnostics
+
+namespace std {
+ __extension__ typedef __SIZE_TYPE__ size_t;
+
+ template<typename T> struct initializer_list {
+ const T *p; size_t n;
+ initializer_list(const T *p, size_t n);
+ };
+}
+
+namespace dr1070 { // dr1070: 3.5
+#if __cplusplus >= 201103L
+ struct A {
+ A(std::initializer_list<int>);
+ };
+ struct B {
+ int i;
+ A a;
+ };
+ B b = {1};
+ struct C {
+ std::initializer_list<int> a;
+ B b;
+ std::initializer_list<double> c;
+ };
+ C c = {};
+#endif
+}
diff --git a/test/CXX/drs/dr13xx.cpp b/test/CXX/drs/dr13xx.cpp
new file mode 100644
index 000000000000..5827291142dc
--- /dev/null
+++ b/test/CXX/drs/dr13xx.cpp
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -std=c++1y %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+
+namespace dr1346 { // dr1346: 3.5
+ auto a(1); // expected-error 0-1{{extension}}
+ auto b(1, 2); // expected-error {{multiple expressions}} expected-error 0-1{{extension}}
+#if __cplusplus >= 201103L
+ auto c({}); // expected-error {{parenthesized initializer list}} expected-error {{cannot deduce}}
+ auto d({1}); // expected-error {{parenthesized initializer list}} expected-error {{<initializer_list>}}
+ auto e({1, 2}); // expected-error {{parenthesized initializer list}} expected-error {{<initializer_list>}}
+#endif
+ template<typename...Ts> void f(Ts ...ts) { // expected-error 0-1{{extension}}
+ auto x(ts...); // expected-error {{empty}} expected-error 0-1{{extension}}
+ }
+ template void f(); // expected-note {{instantiation}}
+
+#if __cplusplus >= 201103L
+ void init_capture() {
+ [a(1)] {} (); // expected-error 0-1{{extension}}
+ [b(1, 2)] {} (); // expected-error {{multiple expressions}} expected-error 0-1{{extension}}
+#if __cplusplus >= 201103L
+ [c({})] {} (); // expected-error {{parenthesized initializer list}} expected-error {{cannot deduce}} expected-error 0-1{{extension}}
+ [d({1})] {} (); // expected-error {{parenthesized initializer list}} expected-error {{<initializer_list>}} expected-error 0-1{{extension}}
+ [e({1, 2})] {} (); // expected-error {{parenthesized initializer list}} expected-error {{<initializer_list>}} expected-error 0-1{{extension}}
+#endif
+ }
+#endif
+}
diff --git a/test/CXX/drs/dr14xx.cpp b/test/CXX/drs/dr14xx.cpp
new file mode 100644
index 000000000000..8de1b8d623a9
--- /dev/null
+++ b/test/CXX/drs/dr14xx.cpp
@@ -0,0 +1,196 @@
+// RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -std=c++1y %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+
+#if __cplusplus < 201103L
+// expected-no-diagnostics
+#endif
+
+namespace dr1460 { // dr1460: 3.5
+#if __cplusplus >= 201103L
+ namespace DRExample {
+ union A {
+ union {};
+ union {};
+ constexpr A() {}
+ };
+ constexpr A a = A();
+
+ union B {
+ union {};
+ union {};
+ constexpr B() = default;
+ };
+ constexpr B b = B();
+
+ union C {
+ union {};
+ union {};
+ };
+ constexpr C c = C();
+#if __cplusplus > 201103L
+ constexpr void f() { C c; }
+ static_assert((f(), true), "");
+#endif
+ }
+
+ union A {};
+ union B { int n; }; // expected-note +{{here}}
+ union C { int n = 0; };
+ struct D { union {}; };
+ struct E { union { int n; }; }; // expected-note +{{here}}
+ struct F { union { int n = 0; }; };
+
+ struct X {
+ friend constexpr A::A() noexcept;
+ friend constexpr B::B() noexcept; // expected-error {{follows non-constexpr declaration}}
+ friend constexpr C::C() noexcept;
+ friend constexpr D::D() noexcept;
+ friend constexpr E::E() noexcept; // expected-error {{follows non-constexpr declaration}}
+ friend constexpr F::F() noexcept;
+ };
+
+ // These are OK, because value-initialization doesn't actually invoke the
+ // constructor.
+ constexpr A a = A();
+ constexpr B b = B();
+ constexpr C c = C();
+ constexpr D d = D();
+ constexpr E e = E();
+ constexpr F f = F();
+
+ namespace Defaulted {
+ union A { constexpr A() = default; };
+ union B { int n; constexpr B() = default; }; // expected-error {{not constexpr}}
+ union C { int n = 0; constexpr C() = default; };
+ struct D { union {}; constexpr D() = default; };
+ struct E { union { int n; }; constexpr E() = default; }; // expected-error {{not constexpr}}
+ struct F { union { int n = 0; }; constexpr F() = default; };
+
+ struct G { union { int n = 0; }; union { int m; }; constexpr G() = default; }; // expected-error {{not constexpr}}
+ struct H {
+ union {
+ int n = 0;
+ };
+ union { // expected-note 2{{member not initialized}}
+ int m;
+ };
+ constexpr H() {} // expected-error {{must initialize all members}}
+ constexpr H(bool) : m(1) {}
+ constexpr H(char) : n(1) {} // expected-error {{must initialize all members}}
+ constexpr H(double) : m(1), n(1) {}
+ };
+ }
+
+#if __cplusplus > 201103L
+ template<typename T> constexpr bool check() {
+ T t; // expected-note-re 2{{non-constexpr constructor '{{[BE]}}'}}
+ return true;
+ }
+ static_assert(check<A>(), "");
+ static_assert(check<B>(), ""); // expected-error {{constant}} expected-note {{in call}}
+ static_assert(check<C>(), "");
+ static_assert(check<D>(), "");
+ static_assert(check<E>(), ""); // expected-error {{constant}} expected-note {{in call}}
+ static_assert(check<F>(), "");
+#endif
+
+ union G {
+ int a = 0; // expected-note {{previous initialization is here}}
+ int b = 0; // expected-error {{initializing multiple members of union}}
+ };
+ union H {
+ union {
+ int a = 0; // expected-note {{previous initialization is here}}
+ };
+ union {
+ int b = 0; // expected-error {{initializing multiple members of union}}
+ };
+ };
+ struct I {
+ union {
+ int a = 0; // expected-note {{previous initialization is here}}
+ int b = 0; // expected-error {{initializing multiple members of union}}
+ };
+ };
+ struct J {
+ union { int a = 0; };
+ union { int b = 0; };
+ };
+
+ namespace Overriding {
+ struct A {
+ int a = 1, b, c = 3;
+ constexpr A() : b(2) {}
+ };
+ static_assert(A().a == 1 && A().b == 2 && A().c == 3, "");
+
+ union B {
+ int a, b = 2, c;
+ constexpr B() : a(1) {}
+ constexpr B(char) : b(4) {}
+ constexpr B(int) : c(3) {}
+ constexpr B(const char*) {}
+ };
+ static_assert(B().a == 1, "");
+ static_assert(B().b == 2, ""); // expected-error {{constant}} expected-note {{read of}}
+ static_assert(B('x').a == 0, ""); // expected-error {{constant}} expected-note {{read of}}
+ static_assert(B('x').b == 4, "");
+ static_assert(B(123).b == 2, ""); // expected-error {{constant}} expected-note {{read of}}
+ static_assert(B(123).c == 3, "");
+ static_assert(B("").a == 1, ""); // expected-error {{constant}} expected-note {{read of}}
+ static_assert(B("").b == 2, "");
+ static_assert(B("").c == 3, ""); // expected-error {{constant}} expected-note {{read of}}
+
+ struct C {
+ union { int a, b = 2, c; };
+ union { int d, e = 5, f; };
+ constexpr C() : a(1) {}
+ constexpr C(char) : c(3) {}
+ constexpr C(int) : d(4) {}
+ constexpr C(float) : f(6) {}
+ constexpr C(const char*) {}
+ };
+
+ static_assert(C().a == 1, "");
+ static_assert(C().b == 2, ""); // expected-error {{constant}} expected-note {{read of}}
+ static_assert(C().d == 4, ""); // expected-error {{constant}} expected-note {{read of}}
+ static_assert(C().e == 5, "");
+
+ static_assert(C('x').b == 2, ""); // expected-error {{constant}} expected-note {{read of}}
+ static_assert(C('x').c == 3, "");
+ static_assert(C('x').d == 4, ""); // expected-error {{constant}} expected-note {{read of}}
+ static_assert(C('x').e == 5, "");
+
+ static_assert(C(1).b == 2, "");
+ static_assert(C(1).c == 3, ""); // expected-error {{constant}} expected-note {{read of}}
+ static_assert(C(1).d == 4, "");
+ static_assert(C(1).e == 5, ""); // expected-error {{constant}} expected-note {{read of}}
+
+ static_assert(C(1.f).b == 2, "");
+ static_assert(C(1.f).c == 3, ""); // expected-error {{constant}} expected-note {{read of}}
+ static_assert(C(1.f).e == 5, ""); // expected-error {{constant}} expected-note {{read of}}
+ static_assert(C(1.f).f == 6, "");
+
+ static_assert(C("").a == 1, ""); // expected-error {{constant}} expected-note {{read of}}
+ static_assert(C("").b == 2, "");
+ static_assert(C("").c == 3, ""); // expected-error {{constant}} expected-note {{read of}}
+ static_assert(C("").d == 4, ""); // expected-error {{constant}} expected-note {{read of}}
+ static_assert(C("").e == 5, "");
+ static_assert(C("").f == 6, ""); // expected-error {{constant}} expected-note {{read of}}
+
+ struct D;
+ extern const D d;
+ struct D {
+ int a;
+ union {
+ int b = const_cast<D&>(d).a = 1; // not evaluated
+ int c;
+ };
+ constexpr D() : a(0), c(0) {}
+ };
+ constexpr D d {};
+ static_assert(d.a == 0, "");
+ }
+#endif
+}
diff --git a/test/CXX/drs/dr15xx.cpp b/test/CXX/drs/dr15xx.cpp
new file mode 100644
index 000000000000..66618c1716d6
--- /dev/null
+++ b/test/CXX/drs/dr15xx.cpp
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -std=c++98 -triple x86_64-unknown-unknown %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -std=c++1y -triple x86_64-unknown-unknown %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+
+// expected-no-diagnostics
+
+namespace DR1550 { // dr1550: yes
+ int f(bool b, int n) {
+ return (b ? (throw 0) : n) + (b ? n : (throw 0));
+ }
+}
+
+namespace DR1560 { // dr1560: 3.5
+ void f(bool b, int n) {
+ (b ? throw 0 : n) = (b ? n : throw 0) = 0;
+ }
+ class X { X(const X&); };
+ const X &get();
+ const X &x = true ? get() : throw 0;
+}
diff --git a/test/CXX/drs/dr1xx.cpp b/test/CXX/drs/dr1xx.cpp
index 7045148034fb..6aff43c6a488 100644
--- a/test/CXX/drs/dr1xx.cpp
+++ b/test/CXX/drs/dr1xx.cpp
@@ -9,7 +9,7 @@ namespace dr100 { // dr100: yes
B<"bar"> b; // expected-error {{does not refer to any declaration}}
}
-namespace dr101 { // dr101: yes
+namespace dr101 { // dr101: 3.5
extern "C" void dr101_f();
typedef unsigned size_t;
namespace X {
@@ -18,6 +18,8 @@ namespace dr101 { // dr101: yes
}
using X::dr101_f;
using X::size_t;
+ extern "C" void dr101_f();
+ typedef unsigned size_t;
}
namespace dr102 { // dr102: yes
@@ -38,13 +40,13 @@ namespace dr102 { // dr102: yes
namespace dr106 { // dr106: sup 540
typedef int &r1;
typedef r1 &r1;
- typedef const r1 r1;
- typedef const r1 &r1;
+ typedef const r1 r1; // expected-warning {{has no effect}}
+ typedef const r1 &r1; // expected-warning {{has no effect}}
typedef const int &r2;
typedef r2 &r2;
- typedef const r2 r2;
- typedef const r2 &r2;
+ typedef const r2 r2; // expected-warning {{has no effect}}
+ typedef const r2 &r2; // expected-warning {{has no effect}}
}
namespace dr107 { // dr107: yes
@@ -64,7 +66,7 @@ namespace dr108 { // dr108: yes
namespace dr109 { // dr109: yes
struct A { template<typename T> void f(T); };
template<typename T> struct B : T {
- using T::template f; // expected-error {{using declaration can not refer to a template}}
+ using T::template f; // expected-error {{using declaration cannot refer to a template}}
void g() { this->f<int>(123); } // expected-error {{use 'template'}}
};
}
@@ -592,11 +594,12 @@ namespace dr155 { // dr155: dup 632
struct S { int n; } s = { { 1 } }; // expected-warning {{braces around scalar initializer}}
}
-namespace dr159 { // dr159: no
+// dr158 FIXME write codegen test
+
+namespace dr159 { // dr159: 3.5
namespace X { void f(); }
void f();
- // FIXME: This should be accepted.
- void dr159::f() {} // expected-error {{extra qualification}}
+ void dr159::f() {} // expected-warning {{extra qualification}}
void dr159::X::f() {}
}
@@ -719,9 +722,9 @@ namespace dr169 { // dr169: yes
};
struct D : A<int>, B {
using A<int>::n;
- using B::C<int>; // expected-error {{using declaration can not refer to a template specialization}}
- using B::f<int>; // expected-error {{using declaration can not refer to a template specialization}}
- using B::n<int>; // expected-error {{using declaration can not refer to a template specialization}}
+ using B::C<int>; // expected-error {{using declaration cannot refer to a template specialization}}
+ using B::f<int>; // expected-error {{using declaration cannot refer to a template specialization}}
+ using B::n<int>; // expected-error {{using declaration cannot refer to a template specialization}}
};
}
diff --git a/test/CXX/drs/dr2xx.cpp b/test/CXX/drs/dr2xx.cpp
index 2c32a9e503f9..bb9af9fd9337 100644
--- a/test/CXX/drs/dr2xx.cpp
+++ b/test/CXX/drs/dr2xx.cpp
@@ -3,7 +3,7 @@
// RUN: %clang_cc1 -std=c++1y %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
// PR13819 -- __SIZE_TYPE__ is incompatible.
-// REQUIRES: LP64
+typedef __SIZE_TYPE__ size_t; // expected-error 0-1 {{extension}}
#if __cplusplus < 201103L
#define fold(x) (__builtin_constant_p(x) ? (x) : (x))
@@ -216,8 +216,22 @@ namespace dr221 { // dr221: yes
}
}
-// dr222 is a mystery -- it lists no changes to the standard, and yet was
-// apparently both voted into the WP and acted upon by the editor.
+namespace dr222 { // dr222: dup 637
+ void f(int a, int b, int c, int *x) {
+#pragma clang diagnostic push
+#pragma clang diagnostic warning "-Wunsequenced"
+ void((a += b) += c);
+ void((a += b) + (a += c)); // expected-warning {{multiple unsequenced modifications to 'a'}}
+
+ x[a++] = a; // expected-warning {{unsequenced modification and access to 'a'}}
+
+ a = b = 0; // ok, read and write of 'b' are sequenced
+
+ a = (b = a++); // expected-warning {{multiple unsequenced modifications to 'a'}}
+ a = (b = ++a);
+#pragma clang diagnostic pop
+ }
+}
// dr223: na
@@ -363,6 +377,13 @@ namespace dr229 { // dr229: yes
template<> void f<int>() {}
}
+namespace dr230 { // dr230: yes
+ struct S {
+ S() { f(); } // expected-warning {{call to pure virtual member function}}
+ virtual void f() = 0; // expected-note {{declared here}}
+ };
+}
+
namespace dr231 { // dr231: yes
namespace outer {
namespace inner {
@@ -445,7 +466,7 @@ namespace dr243 { // dr243: yes
A a2 = b; // expected-error {{ambiguous}}
}
-namespace dr244 { // dr244: no
+namespace dr244 { // dr244: 3.5
struct B {}; struct D : B {}; // expected-note {{here}}
D D_object;
@@ -459,7 +480,7 @@ namespace dr244 { // dr244: no
B_ptr->~B_alias();
B_ptr->B_alias::~B();
// This is valid under DR244.
- B_ptr->B_alias::~B_alias(); // FIXME: expected-error {{expected the class name after '~' to name a destructor}}
+ B_ptr->B_alias::~B_alias();
B_ptr->dr244::~B(); // expected-error {{refers to a member in namespace}}
B_ptr->dr244::~B_alias(); // expected-error {{refers to a member in namespace}}
}
@@ -552,21 +573,21 @@ namespace dr252 { // dr252: yes
struct E {
void operator delete(void*, int);
- void operator delete(void*) = delete; // expected-error 0-1{{extension}} expected-note {{here}}
- virtual ~E();
+ void operator delete(void*) = delete; // expected-error 0-1{{extension}} expected-note 1-2 {{here}}
+ virtual ~E(); // expected-error 0-1 {{attempt to use a deleted function}}
};
- E::~E() {} // expected-error {{deleted}}
+ E::~E() {} // expected-error {{attempt to use a deleted function}}
struct F {
// If both functions are available, the first one is a placement delete.
- void operator delete(void*, __SIZE_TYPE__);
+ void operator delete(void*, size_t);
void operator delete(void*) = delete; // expected-error 0-1{{extension}} expected-note {{here}}
virtual ~F();
};
- F::~F() {} // expected-error {{deleted}}
+ F::~F() {} // expected-error {{attempt to use a deleted function}}
struct G {
- void operator delete(void*, __SIZE_TYPE__);
+ void operator delete(void*, size_t);
virtual ~G();
};
G::~G() {}
@@ -665,6 +686,8 @@ namespace dr259 { // dr259: yes c++11
#endif
}
+// FIXME: When dr260 is resolved, also add tests for DR507.
+
namespace dr261 { // dr261: no
#pragma clang diagnostic push
#pragma clang diagnostic warning "-Wused-but-marked-unused"
@@ -674,7 +697,7 @@ namespace dr261 { // dr261: no
// translation unit.
// We're also missing the -Wused-but-marked-unused diagnostic here.
struct A {
- inline void *operator new(__SIZE_TYPE__) __attribute__((unused));
+ inline void *operator new(size_t) __attribute__((unused));
inline void operator delete(void*) __attribute__((unused));
A() {}
};
@@ -724,3 +747,293 @@ namespace dr263 { // dr263: yes
// dr266: na
// dr269: na
// dr270: na
+
+namespace dr272 { // dr272: yes
+ struct X {
+ void f() {
+ this->~X();
+ X::~X();
+ ~X(); // expected-error {{unary expression}}
+ }
+ };
+}
+
+#include <stdarg.h>
+#include <stddef.h>
+namespace dr273 { // dr273: yes
+ struct A {
+ int n;
+ };
+ void operator&(A);
+ void f(A a, ...) {
+ offsetof(A, n);
+ va_list val;
+ va_start(val, a);
+ va_end(val);
+ }
+}
+
+// dr274: na
+
+namespace dr275 { // dr275: no
+ namespace N {
+ template <class T> void f(T) {} // expected-note 1-4{{here}}
+ template <class T> void g(T) {} // expected-note {{candidate}}
+ template <> void f(int);
+ template <> void f(char);
+ template <> void f(double);
+ template <> void g(char);
+ }
+
+ using namespace N;
+
+ namespace M {
+ template <> void N::f(char) {} // expected-error {{'M' does not enclose namespace 'N'}}
+ template <class T> void g(T) {}
+ template <> void g(char) {}
+ template void f(long);
+#if __cplusplus >= 201103L
+ // FIXME: this should be rejected in c++98 too
+ // expected-error@-3 {{must occur in namespace 'N'}}
+#endif
+ template void N::f(unsigned long);
+#if __cplusplus >= 201103L
+ // FIXME: this should be rejected in c++98 too
+ // expected-error@-3 {{not in a namespace enclosing 'N'}}
+#endif
+ template void h(long); // expected-error {{does not refer to a function template}}
+ template <> void f(double) {} // expected-error {{no function template matches}}
+ }
+
+ template <class T> void g(T) {} // expected-note {{candidate}}
+
+ template <> void N::f(char) {}
+ template <> void f(int) {} // expected-error {{no function template matches}}
+
+ template void f(short);
+#if __cplusplus >= 201103L
+ // FIXME: this should be rejected in c++98 too
+ // expected-error@-3 {{must occur in namespace 'N'}}
+#endif
+ template void N::f(unsigned short);
+
+ // FIXME: this should probably be valid. the wording from the issue
+ // doesn't clarify this, but it follows from the usual rules.
+ template void g(int); // expected-error {{ambiguous}}
+
+ // FIXME: likewise, this should also be valid.
+ template<typename T> void f(T) {} // expected-note {{candidate}}
+ template void f(short); // expected-error {{ambiguous}}
+}
+
+// dr276: na
+
+namespace dr277 { // dr277: yes
+ typedef int *intp;
+ int *p = intp();
+ int a[fold(intp() ? -1 : 1)];
+}
+
+namespace dr280 { // dr280: yes
+ typedef void f0();
+ typedef void f1(int);
+ typedef void f2(int, int);
+ typedef void f3(int, int, int);
+ struct A {
+ operator f1*(); // expected-note {{here}} expected-note {{candidate}}
+ operator f2*();
+ };
+ struct B {
+ operator f0*(); // expected-note {{candidate}}
+ private:
+ operator f3*(); // expected-note {{here}} expected-note {{candidate}}
+ };
+ struct C {
+ operator f0*(); // expected-note {{candidate}}
+ operator f1*(); // expected-note {{candidate}}
+ operator f2*(); // expected-note {{candidate}}
+ operator f3*(); // expected-note {{candidate}}
+ };
+ struct D : private A, B { // expected-note 2{{here}}
+ operator f2*(); // expected-note {{candidate}}
+ } d;
+ struct E : C, D {} e;
+ void g() {
+ d(); // ok, public
+ d(0); // expected-error {{private member of 'dr280::A'}} expected-error {{private base class 'dr280::A'}}
+ d(0, 0); // ok, suppressed by member in D
+ d(0, 0, 0); // expected-error {{private member of 'dr280::B'}}
+ e(); // expected-error {{ambiguous}}
+ e(0); // expected-error {{ambiguous}}
+ e(0, 0); // expected-error {{ambiguous}}
+ e(0, 0, 0); // expected-error {{ambiguous}}
+ }
+}
+
+namespace dr281 { // dr281: no
+ void a();
+ inline void b();
+
+ void d();
+ inline void e();
+
+ struct S {
+ friend inline void a(); // FIXME: ill-formed
+ friend inline void b();
+ friend inline void c(); // FIXME: ill-formed
+ friend inline void d() {}
+ friend inline void e() {}
+ friend inline void f() {}
+ };
+}
+
+namespace dr283 { // dr283: yes
+ template<typename T> // expected-note 2{{here}}
+ struct S {
+ friend class T; // expected-error {{shadows}}
+ class T; // expected-error {{shadows}}
+ };
+}
+
+namespace dr284 { // dr284: no
+ namespace A {
+ struct X;
+ enum Y {};
+ class Z {};
+ }
+ namespace B {
+ struct W;
+ using A::X;
+ using A::Y;
+ using A::Z;
+ }
+ struct B::V {}; // expected-error {{no struct named 'V'}}
+ struct B::W {};
+ struct B::X {}; // FIXME: ill-formed
+ enum B::Y e; // ok per dr417
+ class B::Z z; // ok per dr417
+
+ struct C {
+ struct X;
+ enum Y {};
+ class Z {};
+ };
+ struct D : C {
+ struct W;
+ using C::X;
+ using C::Y;
+ using C::Z;
+ };
+ struct D::V {}; // expected-error {{no struct named 'V'}}
+ struct D::W {};
+ struct D::X {}; // FIXME: ill-formed
+ enum D::Y e2; // ok per dr417
+ class D::Z z2; // ok per dr417
+}
+
+namespace dr285 { // dr285: yes
+ template<typename T> void f(T, int); // expected-note {{match}}
+ template<typename T> void f(int, T); // expected-note {{match}}
+ template<> void f<int>(int, int) {} // expected-error {{ambiguous}}
+}
+
+namespace dr286 { // dr286: yes
+ template<class T> struct A {
+ class C {
+ template<class T2> struct B {}; // expected-note {{here}}
+ };
+ };
+
+ template<class T>
+ template<class T2>
+ struct A<T>::C::B<T2*> { };
+
+ A<short>::C::B<int*> absip; // expected-error {{private}}
+}
+
+// dr288: na
+
+namespace dr289 { // dr289: yes
+ struct A; // expected-note {{forward}}
+ struct B : A {}; // expected-error {{incomplete}}
+
+ template<typename T> struct C { typename T::error error; }; // expected-error {{cannot be used prior to '::'}}
+ struct D : C<int> {}; // expected-note {{instantiation}}
+}
+
+// dr290: na
+// dr291: dup 391
+// dr292 FIXME: write a codegen test
+
+namespace dr294 { // dr294: no
+ void f() throw(int);
+ int main() {
+ // FIXME: we reject this for the wrong reason, because we don't implement
+ // dr87 yet.
+ (void)static_cast<void (*)() throw()>(f); // expected-error {{not superset}}
+ void (*p)() throw() = f; // expected-error {{not superset}}
+
+ (void)static_cast<void (*)() throw(int)>(f); // FIXME: ill-formed
+ }
+}
+
+namespace dr295 { // dr295: no
+ typedef int f();
+ // FIXME: This warning is incorrect.
+ const f g; // expected-warning {{unspecified behavior}}
+ const f &r = g; // expected-warning {{unspecified behavior}}
+ template<typename T> struct X {
+ const T &f;
+ };
+ X<f> x = {g}; // FIXME: expected-error {{drops qualifiers}}
+}
+
+namespace dr296 { // dr296: yes
+ struct A {
+ static operator int() { return 0; } // expected-error {{static}}
+ };
+}
+
+namespace dr298 { // dr298: yes
+ struct A {
+ typedef int type;
+ A();
+ ~A();
+ };
+ typedef A B; // expected-note {{here}}
+ typedef const A C; // expected-note {{here}}
+
+ A::type i1;
+ B::type i2;
+ C::type i3;
+
+ struct A a;
+ struct B b; // expected-error {{refers to a typedef}}
+ struct C c; // expected-error {{refers to a typedef}}
+
+ B::B() {} // expected-error {{requires a type specifier}}
+ B::A() {} // ok
+ C::~C() {} // expected-error {{destructor cannot be declared using a typedef 'C' (aka 'const dr298::A') of the class name}}
+
+ typedef struct D E; // expected-note {{here}}
+ struct E {}; // expected-error {{conflicts with typedef}}
+
+ struct F {
+ ~F();
+ };
+ typedef const F G;
+ G::~F() {} // ok
+}
+
+namespace dr299 { // dr299: yes c++11
+ struct S {
+ operator int();
+ };
+ struct T {
+ operator int(); // expected-note {{}}
+ operator unsigned short(); // expected-note {{}}
+ };
+ // FIXME: should this apply to c++98 mode?
+ int *p = new int[S()]; // expected-error 0-1{{extension}}
+ int *q = new int[T()]; // expected-error {{ambiguous}}
+}
diff --git a/test/CXX/drs/dr3xx.cpp b/test/CXX/drs/dr3xx.cpp
new file mode 100644
index 000000000000..53fc20e23fe6
--- /dev/null
+++ b/test/CXX/drs/dr3xx.cpp
@@ -0,0 +1,1285 @@
+// RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -std=c++1y %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+
+namespace dr300 { // dr300: yes
+ template<typename R, typename A> void f(R (&)(A)) {}
+ int g(int);
+ void h() { f(g); }
+}
+
+namespace dr301 { // dr301: yes
+ // see also dr38
+ struct S;
+ template<typename T> void operator+(T, T);
+ void operator-(S, S);
+
+ void f() {
+ bool a = (void(*)(S, S))operator+<S> <
+ (void(*)(S, S))operator+<S>;
+ bool b = (void(*)(S, S))operator- <
+ (void(*)(S, S))operator-;
+ bool c = (void(*)(S, S))operator+ <
+ (void(*)(S, S))operator-; // expected-error {{expected '>'}}
+ }
+
+ template<typename T> void f() {
+ typename T::template operator+<int> a; // expected-error {{typename specifier refers to a non-type template}} expected-error +{{}}
+ // FIXME: This shouldn't say (null).
+ class T::template operator+<int> b; // expected-error {{identifier followed by '<' indicates a class template specialization but (null) refers to a function template}}
+ enum T::template operator+<int> c; // expected-error {{expected identifier}} expected-error {{does not declare anything}}
+ enum T::template operator+<int>::E d; // expected-error {{qualified name refers into a specialization of function template 'T::template operator +'}} expected-error {{forward reference}}
+ enum T::template X<int>::E e;
+ T::template operator+<int>::foobar(); // expected-error {{qualified name refers into a specialization of function template 'T::template operator +'}}
+ T::template operator+<int>(0); // ok
+ }
+
+ template<typename T> class operator&<T*> {}; // expected-error +{{}}
+ template<typename T> class T::operator& {}; // expected-error +{{}}
+ template<typename T> class S::operator&<T*> {}; // expected-error +{{}}
+}
+
+namespace dr302 { // dr302: yes
+ struct A { A(); ~A(); };
+#if __cplusplus < 201103L
+ struct B { // expected-error {{implicit default constructor for 'dr302::B' must explicitly initialize the const member 'n'}}
+ const int n; // expected-note {{declared here}}
+ A a;
+ } b = B(); // expected-note {{first required here}}
+ // Trivial default constructor C::C() is not called here.
+ struct C {
+ const int n;
+ } c = C();
+#else
+ struct B {
+ const int n; // expected-note {{deleted because field 'n' of const-qualified type 'const int' would not be initialized}}
+ A a;
+ } b = B(); // expected-error {{call to implicitly-deleted default constructor}}
+ // C::C() is called here, because even though it's trivial, it's deleted.
+ struct C {
+ const int n; // expected-note {{deleted because field 'n' of const-qualified type 'const int' would not be initialized}}
+ } c = C(); // expected-error {{call to implicitly-deleted default constructor}}
+ struct D {
+ const int n = 0;
+ } d = D();
+#endif
+}
+
+// dr303: na
+
+namespace dr304 { // dr304: yes
+ typedef int &a;
+ int n = a(); // expected-error {{requires an initializer}}
+
+ struct S { int &b; };
+ int m = S().b;
+#if __cplusplus < 201103L
+ // expected-error@-3 {{requires an initializer}}
+ // expected-note@-3 {{in value-initialization}}
+#else
+ // expected-error@-5 {{deleted}}
+ // expected-note@-7 {{reference}}
+#endif
+}
+
+namespace dr305 { // dr305: no
+ struct A {
+ typedef A C;
+ };
+ void f(A *a) {
+ struct A {};
+ a->~A();
+ a->~C();
+ }
+ typedef A B;
+ void g(B *b) {
+ b->~B();
+ b->~C();
+ }
+ void h(B *b) {
+ struct B {}; // expected-note {{declared here}}
+ b->~B(); // expected-error {{does not match}}
+ }
+
+ template<typename T> struct X {};
+ void i(X<int>* x) {
+ struct X {};
+ x->~X<int>();
+ x->~X();
+ x->~X<char>(); // expected-error {{no member named}}
+ }
+
+ // FIXME: This appears to be valid (but allowing the nested types might be a
+ // defect).
+ template<typename> struct Nested {
+ template<typename> struct Nested {};
+ };
+ void testNested(Nested<int> n) { n.~Nested<int>(); } // expected-error {{no member named}}
+#if __cplusplus < 201103L
+ // expected-error@-2 {{ambiguous}}
+ // expected-note@-6 {{here}}
+ // expected-note@-6 {{here}}
+#endif
+
+#if __cplusplus >= 201103L
+ struct Y {
+ template<typename T> using T1 = Y;
+ };
+ template<typename T> using T2 = Y;
+ void j(Y *y) {
+ y->~T1<int>();
+ y->~T2<int>();
+ }
+ struct Z {
+ template<typename T> using T2 = T;
+ };
+ void k(Z *z) {
+ // FIXME: This diagnostic is terrible.
+ z->~T1<int>(); // expected-error {{'T1' following the 'template' keyword does not refer to a template}} expected-error +{{}}
+ z->~T2<int>(); // expected-error {{no member named '~int'}}
+ z->~T2<Z>();
+ }
+
+ // FIXME: This is valid.
+ namespace Q {
+ template<typename A> struct R {};
+ }
+ template<typename A> using R = Q::R<int>;
+ void qr(Q::R<int> x) { x.~R<char>(); } // expected-error {{no member named}}
+#endif
+}
+
+namespace dr306 { // dr306: no
+ // FIXME: dup 39
+ // FIXME: This should be accepted.
+ struct A { struct B {}; }; // expected-note 2{{member}}
+ struct C { typedef A::B B; }; // expected-note {{member}}
+ struct D : A, A::B, C {};
+ D::B b; // expected-error {{found in multiple base classes of different types}}
+}
+
+// dr307: na
+
+namespace dr308 { // dr308: yes
+ // This is mostly an ABI library issue.
+ struct A {};
+ struct B : A {};
+ struct C : A {};
+ struct D : B, C {};
+ void f() {
+ try {
+ throw D();
+ } catch (const A&) {
+ // unreachable
+ } catch (const B&) {
+ // get here instead
+ }
+ }
+}
+
+// dr309: dup 485
+
+namespace dr311 { // dr311: yes
+ namespace X { namespace Y {} }
+ namespace X::Y {} // expected-error {{must define each namespace separately}}
+ namespace X {
+ namespace X::Y {} // expected-error {{must define each namespace separately}}
+ }
+ // FIXME: The diagnostics here are not very good.
+ namespace ::dr311::X {} // expected-error 2+{{}} // expected-warning {{extra qual}}
+}
+
+// dr312: dup 616
+
+namespace dr313 { // dr313: dup 299 c++11
+ struct A { operator int() const; };
+ int *p = new int[A()];
+#if __cplusplus < 201103L
+ // FIXME: should this be available in c++98 mode? expected-error@-2 {{extension}}
+#endif
+}
+
+namespace dr314 { // dr314: dup 1710
+ template<typename T> struct A {
+ template<typename U> struct B {};
+ };
+ template<typename T> struct C : public A<T>::template B<T> {
+ C() : A<T>::template B<T>() {}
+ };
+}
+
+// dr315: na
+// dr316: sup 1004
+
+namespace dr317 { // dr317: 3.5
+ void f() {} // expected-note {{previous}}
+ inline void f(); // expected-error {{inline declaration of 'f' follows non-inline definition}}
+
+ int g();
+ int n = g();
+ inline int g() { return 0; }
+
+ int h();
+ int m = h();
+ int h() { return 0; } // expected-note {{previous}}
+ inline int h(); // expected-error {{inline declaration of 'h' follows non-inline definition}}
+}
+
+namespace dr318 { // dr318: sup 1310
+ struct A {};
+ struct A::A a;
+}
+
+namespace dr319 { // dr319: no
+ // FIXME: dup dr389
+ // FIXME: We don't have a diagnostic for a name with linkage
+ // having a type without linkage.
+ typedef struct {
+ int i;
+ } *ps;
+ extern "C" void f(ps);
+ void g(ps); // FIXME: ill-formed, type 'ps' has no linkage
+
+ static enum { e } a1;
+ enum { e2 } a2; // FIXME: ill-formed, enum type has no linkage
+
+ enum { n1 = 1u };
+ typedef int (*pa)[n1];
+ pa parr; // ok, type has linkage despite using 'n1'
+
+ template<typename> struct X {};
+
+ void f() {
+ struct A { int n; };
+ extern A a; // FIXME: ill-formed
+ X<A> xa;
+
+ typedef A B;
+ extern B b; // FIXME: ill-formed
+ X<B> xb;
+
+ const int n = 1;
+ typedef int (*C)[n];
+ extern C c; // ok
+ X<C> xc;
+ }
+#if __cplusplus < 201103L
+ // expected-error@-12 {{uses local type 'A'}}
+ // expected-error@-9 {{uses local type 'A'}}
+#endif
+}
+
+namespace dr320 { // dr320: yes
+#if __cplusplus >= 201103L
+ struct X {
+ constexpr X() {}
+ constexpr X(const X &x) : copies(x.copies + 1) {}
+ unsigned copies = 0;
+ };
+ constexpr X f(X x) { return x; }
+ constexpr unsigned g(X x) { return x.copies; }
+ static_assert(f(X()).copies == g(X()) + 1, "expected one extra copy for return value");
+#endif
+}
+
+namespace dr321 { // dr321: dup 557
+ namespace N {
+ template<int> struct A {
+ template<int> struct B;
+ };
+ template<> template<> struct A<0>::B<0>;
+ void f(A<0>::B<0>);
+ }
+ template<> template<> struct N::A<0>::B<0> {};
+
+ template<typename T> void g(T t) { f(t); }
+ template void g(N::A<0>::B<0>);
+
+ namespace N {
+ template<typename> struct I { friend bool operator==(const I&, const I&); };
+ }
+ N::I<int> i, j;
+ bool x = i == j;
+}
+
+namespace dr322 { // dr322: yes
+ struct A {
+ template<typename T> operator T&();
+ } a;
+ int &r = static_cast<int&>(a);
+ int &s = a;
+}
+
+// dr323: no
+
+namespace dr324 { // dr324: yes
+ struct S { int n : 1; } s; // expected-note 3{{bit-field is declared here}}
+ int &a = s.n; // expected-error {{non-const reference cannot bind to bit-field}}
+ int *b = &s.n; // expected-error {{address of bit-field}}
+ int &c = (s.n = 0); // expected-error {{non-const reference cannot bind to bit-field}}
+ int *d = &(s.n = 0); // expected-error {{address of bit-field}}
+ int &e = true ? s.n : s.n; // expected-error {{non-const reference cannot bind to bit-field}}
+ int *f = &(true ? s.n : s.n); // expected-error {{address of bit-field}}
+ int &g = (void(), s.n); // expected-error {{non-const reference cannot bind to bit-field}}
+ int *h = &(void(), s.n); // expected-error {{address of bit-field}}
+}
+
+namespace dr326 { // dr326: yes
+ struct S {};
+ int test[__is_trivially_constructible(S, const S&) ? 1 : -1];
+}
+
+namespace dr327 { // dr327: dup 538
+ struct A;
+ class A {};
+
+ class B;
+ struct B {};
+}
+
+namespace dr328 { // dr328: yes
+ struct A; // expected-note 3{{forward declaration}}
+ struct B { A a; }; // expected-error {{incomplete}}
+ template<typename> struct C { A a; }; // expected-error {{incomplete}}
+ A *p = new A[0]; // expected-error {{incomplete}}
+}
+
+namespace dr329 { // dr329: 3.5
+ struct B {};
+ template<typename T> struct A : B {
+ friend void f(A a) { g(a); }
+ friend void h(A a) { g(a); } // expected-error {{undeclared}}
+ friend void i(B b) {} // expected-error {{redefinition}} expected-note {{previous}}
+ };
+ A<int> a;
+ A<char> b; // expected-note {{instantiation}}
+
+ void test() {
+ h(a); // expected-note {{instantiation}}
+ }
+}
+
+namespace dr331 { // dr331: yes
+ struct A {
+ A(volatile A&); // expected-note {{candidate}}
+ } const a, b(a); // expected-error {{no matching constructor}}
+}
+
+namespace dr332 { // dr332: dup 557
+ void f(volatile void); // expected-error {{'void' as parameter must not have type qualifiers}}
+ void g(const void); // expected-error {{'void' as parameter must not have type qualifiers}}
+ void h(int n, volatile void); // expected-error {{'void' must be the first and only parameter}}
+}
+
+namespace dr333 { // dr333: yes
+ int n = 0;
+ int f(int(n));
+ int g((int(n)));
+ int h = f(g);
+}
+
+namespace dr334 { // dr334: yes
+ template<typename T> void f() {
+ T x;
+ f((x, 123));
+ }
+ struct S {
+ friend S operator,(S, int);
+ friend void f(S);
+ };
+ template void f<S>();
+}
+
+// dr335: no
+
+namespace dr336 { // dr336: yes
+ namespace Pre {
+ template<class T1> class A {
+ template<class T2> class B {
+ template<class T3> void mf1(T3);
+ void mf2();
+ };
+ };
+ template<> template<class X> class A<int>::B {};
+ template<> template<> template<class T> void A<int>::B<double>::mf1(T t) {} // expected-error {{does not match}}
+ template<class Y> template<> void A<Y>::B<double>::mf2() {} // expected-error {{does not refer into a class}}
+ }
+ namespace Post {
+ template<class T1> class A {
+ template<class T2> class B {
+ template<class T3> void mf1(T3);
+ void mf2();
+ };
+ };
+ template<> template<class X> class A<int>::B {
+ template<class T> void mf1(T);
+ };
+ template<> template<> template<class T> void A<int>::B<double>::mf1(T t) {}
+ // FIXME: This diagnostic isn't very good.
+ template<class Y> template<> void A<Y>::B<double>::mf2() {} // expected-error {{does not refer into a class}}
+ }
+}
+
+namespace dr337 { // dr337: yes
+ template<typename T> void f(T (*)[1]);
+ template<typename T> int &f(...);
+
+ struct A { virtual ~A() = 0; };
+ int &r = f<A>(0);
+
+ // FIXME: The language rules here are completely broken. We cannot determine
+ // whether an incomplete type is abstract. See DR1640, which will probably
+ // supersede this one and remove this rule.
+ struct B;
+ int &s = f<B>(0); // expected-error {{of type 'void'}}
+ struct B { virtual ~B() = 0; };
+}
+
+namespace dr339 { // dr339: yes
+ template <int I> struct A { static const int value = I; };
+
+ char xxx(int);
+ char (&xxx(float))[2];
+
+ template<class T> A<sizeof(xxx((T)0))> f(T) {} // expected-note {{candidate}}
+
+ void test() {
+ A<1> a = f(0);
+ A<2> b = f(0.0f);
+ A<3> c = f("foo"); // expected-error {{no matching function}}
+ }
+
+
+ char f(int);
+ int f(...);
+
+ template <class T> struct conv_int {
+ static const bool value = sizeof(f(T())) == 1;
+ };
+
+ template <class T> bool conv_int2(A<sizeof(f(T()))> p);
+
+ template<typename T> A<sizeof(f(T()))> make_A();
+
+ int a[conv_int<char>::value ? 1 : -1];
+ bool b = conv_int2<char>(A<1>());
+ A<1> c = make_A<char>();
+}
+
+namespace dr340 { // dr340: yes
+ struct A { A(int); };
+ struct B { B(A, A, int); };
+ int x, y;
+ B b(A(x), A(y), 3);
+}
+
+namespace dr341 { // dr341: sup 1708
+ namespace A {
+ int n;
+ extern "C" int &dr341_a = n; // expected-note {{previous}} expected-note {{declared with C language linkage here}}
+ }
+ namespace B {
+ extern "C" int &dr341_a = dr341_a; // expected-error {{redefinition}}
+ }
+ extern "C" void dr341_b(); // expected-note {{declared with C language linkage here}}
+}
+int dr341_a; // expected-error {{declaration of 'dr341_a' in global scope conflicts with declaration with C language linkage}}
+int dr341_b; // expected-error {{declaration of 'dr341_b' in global scope conflicts with declaration with C language linkage}}
+int dr341_c; // expected-note {{declared in global scope here}}
+int dr341_d; // expected-note {{declared in global scope here}}
+namespace dr341 {
+ extern "C" int dr341_c; // expected-error {{declaration of 'dr341_c' with C language linkage conflicts with declaration in global scope}}
+ extern "C" void dr341_d(); // expected-error {{declaration of 'dr341_d' with C language linkage conflicts with declaration in global scope}}
+
+ namespace A { extern "C" int dr341_e; } // expected-note {{previous}}
+ namespace B { extern "C" void dr341_e(); } // expected-error {{redefinition of 'dr341_e' as different kind of symbol}}
+}
+
+// dr342: na
+
+namespace dr343 { // dr343: no
+ // FIXME: dup 1710
+ template<typename T> struct A {
+ template<typename U> struct B {};
+ };
+ // FIXME: In these contexts, the 'template' keyword is optional.
+ template<typename T> struct C : public A<T>::B<T> { // expected-error {{use 'template'}}
+ C() : A<T>::B<T>() {} // expected-error {{use 'template'}}
+ };
+}
+
+namespace dr344 { // dr344: dup 1435
+ struct A { inline virtual ~A(); };
+ struct B { friend A::~A(); };
+}
+
+namespace dr345 { // dr345: yes
+ struct A {
+ struct X {};
+ int X; // expected-note {{here}}
+ };
+ struct B {
+ struct X {};
+ };
+ template <class T> void f(T t) { typename T::X x; } // expected-error {{refers to non-type member 'X'}}
+ void f(A a, B b) {
+ f(b);
+ f(a); // expected-note {{instantiation}}
+ }
+}
+
+// dr346: na
+
+namespace dr347 { // dr347: yes
+ struct base {
+ struct nested;
+ static int n;
+ static void f();
+ void g();
+ };
+
+ struct derived : base {};
+
+ struct derived::nested {}; // expected-error {{no struct named 'nested'}}
+ int derived::n; // expected-error {{no member named 'n'}}
+ void derived::f() {} // expected-error {{does not match any}}
+ void derived::g() {} // expected-error {{does not match any}}
+}
+
+// dr348: na
+
+namespace dr349 { // dr349: no
+ struct A {
+ template <class T> operator T ***() {
+ int ***p = 0;
+ return p; // expected-error {{cannot initialize return object of type 'const int ***' with an lvalue of type 'int ***'}}
+ }
+ };
+
+ // FIXME: This is valid.
+ A a;
+ const int *const *const *p1 = a; // expected-note {{in instantiation of}}
+
+ struct B {
+ template <class T> operator T ***() {
+ const int ***p = 0;
+ return p;
+ }
+ };
+
+ // FIXME: This is invalid.
+ B b;
+ const int *const *const *p2 = b;
+}
+
+// dr351: na
+
+namespace dr352 { // dr352: yes
+ namespace example1 {
+ namespace A {
+ enum E {};
+ template<typename R, typename A> void foo(E, R (*)(A)); // expected-note 2{{couldn't infer template argument 'R'}}
+ }
+
+ template<typename T> void arg(T);
+ template<typename T> int arg(T) = delete; // expected-note {{here}} expected-error 0-1{{extension}}
+
+ void f(A::E e) {
+ foo(e, &arg); // expected-error {{no matching function}}
+
+ using A::foo;
+ foo<int, int>(e, &arg); // expected-error {{deleted}}
+ }
+
+ int arg(int);
+
+ void g(A::E e) {
+ foo(e, &arg); // expected-error {{no matching function}}
+
+ using A::foo;
+ foo<int, int>(e, &arg); // ok, uses non-template
+ }
+ }
+
+ namespace contexts {
+ template<int I> void f1(int (&)[I]);
+ template<int I> void f2(int (&)[I+1]); // expected-note {{couldn't infer}}
+ template<int I> void f3(int (&)[I+1], int (&)[I]);
+ void f() {
+ int a[4];
+ int b[3];
+ f1(a);
+ f2(a); // expected-error {{no matching function}}
+ f3(a, b);
+ }
+
+ template<int I> struct S {};
+ template<int I> void g1(S<I>);
+ template<int I> void g2(S<I+1>); // expected-note {{couldn't infer}}
+ template<int I> void g3(S<I+1>, S<I>);
+ void g() {
+ S<4> a;
+ S<3> b;
+ g1(a);
+ g2(a); // expected-error {{no matching function}}
+ g3(a, b);
+ }
+
+ template<typename T> void h1(T = 0); // expected-note {{couldn't infer}}
+ template<typename T> void h2(T, T = 0);
+ void h() {
+ h1(); // expected-error {{no matching function}}
+ h1(0);
+ h1<int>();
+ h2(0);
+ }
+
+ template<typename T> int tmpl(T);
+ template<typename R, typename A> void i1(R (*)(A)); // expected-note 3{{couldn't infer}}
+ template<typename R, typename A> void i2(R, A, R (*)(A)); // expected-note {{not viable}}
+ void i() {
+ extern int single(int);
+ i1(single);
+ i2(0, 0, single);
+
+ extern int ambig(float), ambig(int);
+ i1(ambig); // expected-error {{no matching function}}
+ i2(0, 0, ambig);
+
+ extern void no_match(float), no_match(int);
+ i1(no_match); // expected-error {{no matching function}}
+ i2(0, 0, no_match); // expected-error {{no matching function}}
+
+ i1(tmpl); // expected-error {{no matching function}}
+ i2(0, 0, tmpl);
+ }
+ }
+
+ template<typename T> struct is_int;
+ template<> struct is_int<int> {};
+
+ namespace example2 {
+ template<typename T> int f(T (*p)(T)) { is_int<T>(); }
+ int g(int);
+ int g(char);
+ int i = f(g);
+ }
+
+ namespace example3 {
+ template<typename T> int f(T, T (*p)(T)) { is_int<T>(); }
+ int g(int);
+ char g(char);
+ int i = f(1, g);
+ }
+
+ namespace example4 {
+ template <class T> int f(T, T (*p)(T)) { is_int<T>(); }
+ char g(char);
+ template <class T> T g(T);
+ int i = f(1, g);
+ }
+
+ namespace example5 {
+ template<int I> class A {};
+ template<int I> void g(A<I+1>); // expected-note {{couldn't infer}}
+ template<int I> void f(A<I>, A<I+1>);
+ void h(A<1> a1, A<2> a2) {
+ g(a1); // expected-error {{no matching function}}
+ g<0>(a1);
+ f(a1, a2);
+ }
+ }
+}
+
+// dr353 needs an IRGen test.
+
+namespace dr354 { // dr354: yes c++11
+ // FIXME: Should we allow this in C++98 too?
+ struct S {};
+
+ template<int*> struct ptr {}; // expected-note +{{here}}
+ ptr<0> p0;
+ ptr<(int*)0> p1;
+ ptr<(float*)0> p2;
+ ptr<(int S::*)0> p3;
+#if __cplusplus < 201103L
+ // expected-error@-5 {{does not refer to any decl}}
+ // expected-error@-5 {{does not refer to any decl}}
+ // expected-error@-5 {{does not refer to any decl}}
+ // expected-error@-5 {{does not refer to any decl}}
+#else
+ // expected-error@-10 {{must be cast}}
+ // ok
+ // expected-error@-10 {{does not match}}
+ // expected-error@-10 {{does not match}}
+#endif
+
+ template<int*> int both();
+ template<int> int both();
+ int b0 = both<0>();
+ int b1 = both<(int*)0>();
+#if __cplusplus < 201103L
+ // expected-error@-2 {{no matching function}}
+ // expected-note@-6 {{candidate}}
+ // expected-note@-6 {{candidate}}
+#endif
+
+ template<int S::*> struct ptr_mem {}; // expected-note +{{here}}
+ ptr_mem<0> m0;
+ ptr_mem<(int S::*)0> m1;
+ ptr_mem<(float S::*)0> m2;
+ ptr_mem<(int *)0> m3;
+#if __cplusplus < 201103L
+ // expected-error@-5 {{cannot be converted}}
+ // expected-error@-5 {{is not a pointer to member constant}}
+ // expected-error@-5 {{cannot be converted}}
+ // expected-error@-5 {{cannot be converted}}
+#else
+ // expected-error@-10 {{must be cast}}
+ // ok
+ // expected-error@-10 {{does not match}}
+ // expected-error@-10 {{does not match}}
+#endif
+}
+
+struct dr355_S; // dr355: yes
+struct ::dr355_S {}; // expected-warning {{extra qualification}}
+namespace dr355 { struct ::dr355_S s; }
+
+// dr356: na
+
+namespace dr357 { // dr357: yes
+ template<typename T> struct A {
+ void f() const; // expected-note {{const qualified}}
+ };
+ template<typename T> void A<T>::f() {} // expected-error {{does not match}}
+
+ struct B {
+ template<typename T> void f();
+ };
+ template<typename T> void B::f() const {} // expected-error {{does not match}}
+}
+
+namespace dr358 { // dr358: yes
+ extern "C" void dr358_f();
+ namespace N {
+ int var;
+ extern "C" void dr358_f() { var = 10; }
+ }
+}
+
+namespace dr359 { // dr359: yes
+ // Note, the example in the DR is wrong; it doesn't contain an anonymous
+ // union.
+ struct E {
+ union {
+ struct {
+ int x;
+ } s;
+ } v;
+
+ union {
+ struct { // expected-error {{extension}}
+ int x;
+ } s;
+
+ struct S { // expected-error {{types cannot be declared in an anonymous union}}
+ int x;
+ } t;
+
+ union { // expected-error {{extension}}
+ int u;
+ };
+ };
+ };
+}
+
+// dr362: na
+// dr363: na
+
+namespace dr364 { // dr364: yes
+ struct S {
+ static void f(int);
+ void f(char);
+ };
+
+ void g() {
+ S::f('a'); // expected-error {{call to non-static}}
+ S::f(0);
+ }
+}
+
+#if "foo" // expected-error {{invalid token}} dr366: yes
+#endif
+
+namespace dr367 { // dr367: yes
+ // FIXME: These diagnostics are terrible. Don't diagnose an ill-formed global
+ // array as being a VLA!
+ int a[true ? throw 0 : 4]; // expected-error 2{{variable length array}}
+ int b[true ? 4 : throw 0];
+ int c[true ? *new int : 4]; // expected-error 2{{variable length array}}
+ int d[true ? 4 : *new int];
+#if __cplusplus < 201103L
+ // expected-error@-4 {{variable length array}} expected-error@-4 {{constant expression}}
+ // expected-error@-3 {{variable length array}} expected-error@-3 {{constant expression}}
+#endif
+}
+
+namespace dr368 { // dr368: yes
+ template<typename T, T> struct S {}; // expected-note {{here}}
+ template<typename T> int f(S<T, T()> *); // expected-error {{function type}}
+ //template<typename T> int g(S<T, (T())> *); // FIXME: crashes clang
+ template<typename T> int g(S<T, true ? T() : T()> *); // expected-note {{cannot have type 'dr368::X'}}
+ struct X {};
+ int n = g<X>(0); // expected-error {{no matching}}
+}
+
+// dr370: na
+
+namespace dr372 { // dr372: no
+ namespace example1 {
+ template<typename T> struct X {
+ protected:
+ typedef T Type; // expected-note 2{{protected}}
+ };
+ template<typename T> struct Y {};
+
+ // FIXME: These two are valid; deriving from T1<T> gives Z1 access to
+ // the protected member T1<T>::Type.
+ template<typename T,
+ template<typename> class T1,
+ template<typename> class T2> struct Z1 :
+ T1<T>,
+ T2<typename T1<T>::Type> {}; // expected-error {{protected}}
+
+ template<typename T,
+ template<typename> class T1,
+ template<typename> class T2> struct Z2 :
+ T2<typename T1<T>::Type>, // expected-error {{protected}}
+ T1<T> {};
+
+ Z1<int, X, Y> z1; // expected-note {{instantiation of}}
+ Z2<int, X, Y> z2; // expected-note {{instantiation of}}
+ }
+
+ namespace example2 {
+ struct X {
+ private:
+ typedef int Type; // expected-note {{private}}
+ };
+ template<typename T> struct A {
+ typename T::Type t; // expected-error {{private}}
+ };
+ A<X> ax; // expected-note {{instantiation of}}
+ }
+
+ namespace example3 {
+ struct A {
+ protected:
+ typedef int N; // expected-note 2{{protected}}
+ };
+
+ template<typename T> struct B {};
+ template<typename U> struct C : U, B<typename U::N> {}; // expected-error {{protected}}
+ template<typename U> struct D : B<typename U::N>, U {}; // expected-error {{protected}}
+
+ C<A> x; // expected-note {{instantiation of}}
+ D<A> y; // expected-note {{instantiation of}}
+ }
+
+ namespace example4 {
+ class A {
+ class B {};
+ friend class X;
+ };
+
+ struct X : A::B {
+ A::B mx;
+ class Y {
+ A::B my;
+ };
+ };
+ }
+}
+
+namespace dr373 { // dr373: no
+ // FIXME: This is valid.
+ namespace X { int dr373; } // expected-note 2{{here}}
+ struct dr373 { // expected-note {{here}}
+ void f() {
+ using namespace dr373::X; // expected-error {{no namespace named 'X' in 'dr373::dr373'}}
+ int k = dr373; // expected-error {{does not refer to a value}}
+
+ namespace Y = dr373::X; // expected-error {{no namespace named 'X' in 'dr373::dr373'}}
+ k = Y::dr373;
+ }
+ };
+}
+
+namespace dr374 { // dr374: yes c++11
+ namespace N {
+ template<typename T> void f();
+ template<typename T> struct A { void f(); };
+ }
+ template<> void N::f<char>() {}
+ template<> void N::A<char>::f() {}
+ template<> struct N::A<int> {};
+#if __cplusplus < 201103L
+ // expected-error@-4 {{extension}} expected-note@-7 {{here}}
+ // expected-error@-4 {{extension}} expected-note@-7 {{here}}
+ // expected-error@-4 {{extension}} expected-note@-8 {{here}}
+#endif
+}
+
+// dr375: dup 345
+// dr376: na
+
+namespace dr377 { // dr377: yes
+ enum E { // expected-error {{enumeration values exceed range of largest integer}}
+ a = -__LONG_LONG_MAX__ - 1, // expected-error 0-1{{extension}}
+ b = 2 * (unsigned long long)__LONG_LONG_MAX__ // expected-error 0-2{{extension}}
+ };
+}
+
+// dr378: dup 276
+// dr379: na
+
+namespace dr381 { // dr381: yes
+ struct A {
+ int a;
+ };
+ struct B : virtual A {};
+ struct C : B {};
+ struct D : B {};
+ struct E : public C, public D {};
+ struct F : public A {};
+ void f() {
+ E e;
+ e.B::a = 0; // expected-error {{ambiguous conversion}}
+ F f;
+ f.A::a = 1;
+ }
+}
+
+namespace dr382 { // dr382: yes c++11
+ // FIXME: Should we allow this in C++98 mode?
+ struct A { typedef int T; };
+ typename A::T t;
+ typename dr382::A a;
+#if __cplusplus < 201103L
+ // expected-error@-3 {{occurs outside of a template}}
+ // expected-error@-3 {{occurs outside of a template}}
+#endif
+ typename A b; // expected-error {{expected a qualified name}}
+}
+
+namespace dr383 { // dr383: yes
+ struct A { A &operator=(const A&); };
+ struct B { ~B(); };
+ union C { C &operator=(const C&); };
+ union D { ~D(); };
+ int check[(__is_pod(A) || __is_pod(B) || __is_pod(C) || __is_pod(D)) ? -1 : 1];
+}
+
+namespace dr384 { // dr384: yes
+ namespace N1 {
+ template<typename T> struct Base {};
+ template<typename T> struct X {
+ struct Y : public Base<T> {
+ Y operator+(int) const;
+ };
+ Y f(unsigned i) { return Y() + i; }
+ };
+ }
+
+ namespace N2 {
+ struct Z {};
+ template<typename T> int *operator+(T, unsigned);
+ }
+
+ int main() {
+ N1::X<N2::Z> v;
+ v.f(0);
+ }
+}
+
+namespace dr385 { // dr385: yes
+ struct A { protected: void f(); };
+ struct B : A { using A::f; };
+ struct C : A { void g(B b) { b.f(); } };
+ void h(B b) { b.f(); }
+
+ struct D { int n; }; // expected-note {{member}}
+ struct E : protected D {}; // expected-note 2{{protected}}
+ struct F : E { friend int i(E); };
+ int i(E e) { return e.n; } // expected-error {{protected base}} expected-error {{protected member}}
+}
+
+namespace dr387 { // dr387: yes
+ namespace old {
+ template<typename T> class number {
+ number(int); // expected-note 2{{here}}
+ friend number gcd(number &x, number &y) {}
+ };
+
+ void g() {
+ number<double> a(3), b(4); // expected-error 2{{private}}
+ a = gcd(a, b);
+ b = gcd(3, 4); // expected-error {{undeclared}}
+ }
+ }
+
+ namespace newer {
+ template <typename T> class number {
+ public:
+ number(int);
+ friend number gcd(number x, number y) { return 0; }
+ };
+
+ void g() {
+ number<double> a(3), b(4);
+ a = gcd(a, b);
+ b = gcd(3, 4); // expected-error {{undeclared}}
+ }
+ }
+}
+
+// FIXME: dr388 needs codegen test
+
+namespace dr389 { // dr389: no
+ struct S {
+ typedef struct {} A;
+ typedef enum {} B;
+ typedef struct {} const C; // expected-note 0-2{{here}}
+ typedef enum {} const D; // expected-note 0-1{{here}}
+ };
+ template<typename> struct T {};
+
+ struct WithLinkage1 {};
+ enum WithLinkage2 {};
+ typedef struct {} *WithLinkage3a, WithLinkage3b;
+ typedef enum {} WithLinkage4a, *WithLinkage4b;
+ typedef S::A WithLinkage5;
+ typedef const S::B WithLinkage6;
+ typedef int WithLinkage7;
+ typedef void (*WithLinkage8)(WithLinkage2 WithLinkage1::*, WithLinkage5 *);
+ typedef T<WithLinkage5> WithLinkage9;
+
+ typedef struct {} *WithoutLinkage1; // expected-note 0-1{{here}}
+ typedef enum {} const WithoutLinkage2; // expected-note 0-1{{here}}
+ // These two types don't have linkage even though they are externally visible
+ // and the ODR requires them to be merged across TUs.
+ typedef S::C WithoutLinkage3;
+ typedef S::D WithoutLinkage4;
+ typedef void (*WithoutLinkage5)(int (WithoutLinkage3::*)(char));
+
+#if __cplusplus >= 201103L
+ // This has linkage even though its template argument does not.
+ // FIXME: This is probably a defect.
+ typedef T<WithoutLinkage1> WithLinkage10;
+#else
+ typedef int WithLinkage10; // dummy
+
+ typedef T<WithLinkage1> GoodArg1;
+ typedef T<WithLinkage2> GoodArg2;
+ typedef T<WithLinkage3a> GoodArg3a;
+ typedef T<WithLinkage3b> GoodArg3b;
+ typedef T<WithLinkage4a> GoodArg4a;
+ typedef T<WithLinkage4b> GoodArg4b;
+ typedef T<WithLinkage5> GoodArg5;
+ typedef T<WithLinkage6> GoodArg6;
+ typedef T<WithLinkage7> GoodArg7;
+ typedef T<WithLinkage8> GoodArg8;
+ typedef T<WithLinkage9> GoodArg9;
+
+ typedef T<WithoutLinkage1> BadArg1; // expected-error{{template argument uses}}
+ typedef T<WithoutLinkage2> BadArg2; // expected-error{{template argument uses}}
+ typedef T<WithoutLinkage3> BadArg3; // expected-error{{template argument uses}}
+ typedef T<WithoutLinkage4> BadArg4; // expected-error{{template argument uses}}
+ typedef T<WithoutLinkage5> BadArg5; // expected-error{{template argument uses}}
+#endif
+
+ extern WithLinkage1 withLinkage1;
+ extern WithLinkage2 withLinkage2;
+ extern WithLinkage3a withLinkage3a;
+ extern WithLinkage3b withLinkage3b;
+ extern WithLinkage4a withLinkage4a;
+ extern WithLinkage4b withLinkage4b;
+ extern WithLinkage5 withLinkage5;
+ extern WithLinkage6 withLinkage6;
+ extern WithLinkage7 withLinkage7;
+ extern WithLinkage8 withLinkage8;
+ extern WithLinkage9 withLinkage9;
+ extern WithLinkage10 withLinkage10;
+
+ // FIXME: These are all ill-formed.
+ extern WithoutLinkage1 withoutLinkage1;
+ extern WithoutLinkage2 withoutLinkage2;
+ extern WithoutLinkage3 withoutLinkage3;
+ extern WithoutLinkage4 withoutLinkage4;
+ extern WithoutLinkage5 withoutLinkage5;
+
+ // OK, extern "C".
+ extern "C" {
+ extern WithoutLinkage1 dr389_withoutLinkage1;
+ extern WithoutLinkage2 dr389_withoutLinkage2;
+ extern WithoutLinkage3 dr389_withoutLinkage3;
+ extern WithoutLinkage4 dr389_withoutLinkage4;
+ extern WithoutLinkage5 dr389_withoutLinkage5;
+ }
+
+ // OK, defined.
+ WithoutLinkage1 withoutLinkageDef1;
+ WithoutLinkage2 withoutLinkageDef2 = WithoutLinkage2();
+ WithoutLinkage3 withoutLinkageDef3 = {};
+ WithoutLinkage4 withoutLinkageDef4 = WithoutLinkage4();
+ WithoutLinkage5 withoutLinkageDef5;
+
+ void use(const void *);
+ void use_all() {
+ use(&withLinkage1); use(&withLinkage2); use(&withLinkage3a); use(&withLinkage3b);
+ use(&withLinkage4a); use(&withLinkage4b); use(&withLinkage5); use(&withLinkage6);
+ use(&withLinkage7); use(&withLinkage8); use(&withLinkage9); use(&withLinkage10);
+
+ use(&withoutLinkage1); use(&withoutLinkage2); use(&withoutLinkage3);
+ use(&withoutLinkage4); use(&withoutLinkage5);
+
+ use(&dr389_withoutLinkage1); use(&dr389_withoutLinkage2);
+ use(&dr389_withoutLinkage3); use(&dr389_withoutLinkage4);
+ use(&dr389_withoutLinkage5);
+
+ use(&withoutLinkageDef1); use(&withoutLinkageDef2); use(&withoutLinkageDef3);
+ use(&withoutLinkageDef4); use(&withoutLinkageDef5);
+ }
+
+ void local() {
+ // FIXME: This is ill-formed.
+ extern WithoutLinkage1 withoutLinkageLocal;
+ }
+}
+
+namespace dr390 { // dr390: yes
+ template<typename T>
+ struct A {
+ A() { f(); } // expected-warning {{call to pure virt}}
+ virtual void f() = 0; // expected-note {{here}}
+ virtual ~A() = 0;
+ };
+ template<typename T> A<T>::~A() { T::error; } // expected-error {{cannot be used prior to}}
+ template<typename T> void A<T>::f() { T::error; } // ok, not odr-used
+ struct B : A<int> { // expected-note 2{{in instantiation of}}
+ void f() {}
+ } b;
+}
+
+namespace dr391 { // dr391: yes c++11
+ // FIXME: Should this apply to C++98 too?
+ class A { A(const A&); }; // expected-note 0-1{{here}}
+ A fa();
+ const A &a = fa();
+#if __cplusplus < 201103L
+ // expected-error@-2 {{C++98 requires an accessible copy constructor}}
+#endif
+
+ struct B { B(const B&) = delete; }; // expected-error 0-1{{extension}} expected-note 0-1{{here}}
+ B fb();
+ const B &b = fb();
+#if __cplusplus < 201103L
+ // expected-error@-2 {{deleted}}
+#endif
+
+ template<typename T>
+ struct C {
+ C(const C&) { T::error; }
+ };
+ C<int> fc();
+ const C<int> &c = fc();
+}
+
+// dr392 FIXME write codegen test
+// dr394: na
+
+namespace dr395 { // dr395: yes
+ struct S {
+ template <typename T, int N>(&operator T())[N]; // expected-error {{must use a typedef}}
+ template <typename T, int N> operator(T (&)[N])(); // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error +{{}}
+ template <typename T> operator T *() const { return 0; }
+ template <typename T, typename U> operator T U::*() const { return 0; }
+ template <typename T, typename U> operator T (U::*)()() const { return 0; } // expected-error +{{}}
+ };
+
+ struct null1_t {
+ template <class T, class U> struct ptr_mem_fun_t {
+ typedef T (U::*type)();
+ };
+
+ template <class T, class U>
+ operator typename ptr_mem_fun_t<T, U>::type() const { // expected-note {{couldn't infer}}
+ return 0;
+ }
+ } null1;
+ int (S::*p)() = null1; // expected-error {{no viable conversion}}
+
+ template <typename T> using id = T; // expected-error 0-1{{extension}}
+
+ struct T {
+ template <typename T, int N> operator id<T[N]> &();
+ template <typename T, typename U> operator id<T (U::*)()>() const;
+ };
+
+ struct null2_t {
+ template<class T, class U> using ptr_mem_fun_t = T (U::*)(); // expected-error 0-1{{extension}}
+ template<class T, class U> operator ptr_mem_fun_t<T, U>() const { return 0; };
+ } null2;
+ int (S::*q)() = null2;
+}
+
+namespace dr396 { // dr396: yes
+ void f() {
+ auto int a(); // expected-error {{storage class on function}}
+ int (i); // expected-note {{previous}}
+ auto int (i); // expected-error {{redefinition}}
+#if __cplusplus >= 201103L
+ // expected-error@-4 {{'auto' storage class}} expected-error@-2 {{'auto' storage class}}
+#endif
+ }
+}
+
+// dr397: sup 1823
+
+namespace dr398 { // dr398: yes
+ namespace example1 {
+ struct S {
+ static int const I = 42;
+ };
+ template <int N> struct X {};
+ template <typename T> void f(X<T::I> *) {}
+ template <typename T> void f(X<T::J> *) {}
+ void foo() { f<S>(0); }
+ }
+
+ namespace example2 {
+ template <int I> struct X {};
+ template <template <class T> class> struct Z {};
+ template <class T> void f(typename T::Y *) {} // expected-note 2{{substitution failure}}
+ template <class T> void g(X<T::N> *) {} // expected-note {{substitution failure}}
+ template <class T> void h(Z<T::template TT> *) {} // expected-note {{substitution failure}}
+ struct A {};
+ struct B {
+ int Y;
+ };
+ struct C {
+ typedef int N;
+ };
+ struct D {
+ typedef int TT;
+ };
+
+ void test() {
+ f<A>(0); // expected-error {{no matching function}}
+ f<B>(0); // expected-error {{no matching function}}
+ g<C>(0); // expected-error {{no matching function}}
+ h<D>(0); // expected-error {{no matching function}}
+ }
+ }
+}
diff --git a/test/CXX/drs/dr412.cpp b/test/CXX/drs/dr412.cpp
new file mode 100644
index 000000000000..cb33e206a632
--- /dev/null
+++ b/test/CXX/drs/dr412.cpp
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -DNOEXCEPT="throw()" -DBAD_ALLOC="throw(std::bad_alloc)"
+// RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -DNOEXCEPT=noexcept -DBAD_ALLOC=
+// RUN: %clang_cc1 -std=c++1y %s -verify -fexceptions -fcxx-exceptions -pedantic-errors -DNOEXCEPT=noexcept -DBAD_ALLOC=
+
+// dr412: yes
+// lwg404: yes
+// lwg2340: yes
+
+// FIXME: __SIZE_TYPE__ expands to 'long long' on some targets.
+__extension__ typedef __SIZE_TYPE__ size_t;
+namespace std { struct bad_alloc {}; }
+
+inline void* operator new(size_t) BAD_ALLOC; // expected-error {{cannot be declared 'inline'}}
+inline void* operator new[](size_t) BAD_ALLOC; // expected-error {{cannot be declared 'inline'}}
+inline void operator delete(void*) NOEXCEPT; // expected-error {{cannot be declared 'inline'}}
+inline void operator delete[](void*) NOEXCEPT; // expected-error {{cannot be declared 'inline'}}
+#if __cplusplus >= 201402L
+inline void operator delete(void*, size_t) NOEXCEPT; // expected-error {{cannot be declared 'inline'}}
+inline void operator delete[](void*, size_t) NOEXCEPT; // expected-error {{cannot be declared 'inline'}}
+#endif
diff --git a/test/CXX/drs/dr4xx.cpp b/test/CXX/drs/dr4xx.cpp
index 1d3b94064cdd..815dbfc0b401 100644
--- a/test/CXX/drs/dr4xx.cpp
+++ b/test/CXX/drs/dr4xx.cpp
@@ -1,6 +1,140 @@
-// RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
-// RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
-// expected-no-diagnostics
+// RUN: env ASAN_OPTIONS=detect_stack_use_after_return=0 %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: env ASAN_OPTIONS=detect_stack_use_after_return=0 %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: env ASAN_OPTIONS=detect_stack_use_after_return=0 %clang_cc1 -std=c++1y %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+
+// FIXME: __SIZE_TYPE__ expands to 'long long' on some targets.
+__extension__ typedef __SIZE_TYPE__ size_t;
+
+namespace std { struct type_info; }
+
+namespace dr400 { // dr400: yes
+ struct A { int a; struct a {}; }; // expected-note 2{{conflicting}} expected-note {{ambiguous}}
+ struct B { int a; struct a {}; }; // expected-note 2{{target}} expected-note {{ambiguous}}
+ struct C : A, B { using A::a; struct a b; };
+ struct D : A, B { using A::a; using B::a; struct a b; }; // expected-error 2{{conflicts}}
+ struct E : A, B { struct a b; }; // expected-error {{found in multiple base classes}}
+}
+
+namespace dr401 { // dr401: yes
+ template<class T, class U = typename T::type> class A : public T {}; // expected-error {{protected}} expected-error 2{{private}}
+
+ class B {
+ protected:
+ typedef int type; // expected-note {{protected}}
+ };
+
+ class C {
+ typedef int type; // expected-note {{private}}
+ friend class A<C>; // expected-note {{default argument}}
+ };
+
+ class D {
+ typedef int type; // expected-note {{private}}
+ friend class A<D, int>;
+ };
+
+ A<B> *b; // expected-note {{default argument}}
+ // FIXME: We're missing the "in instantiation of" note for the default
+ // argument here.
+ A<D> *d;
+
+ struct E {
+ template<class T, class U = typename T::type> class A : public T {};
+ };
+ class F {
+ typedef int type;
+ friend class E;
+ };
+ E::A<F> eaf; // ok, default argument is in befriended context
+
+ // FIXME: Why do we get different diagnostics in C++11 onwards here? We seem
+ // to not treat the default template argument as a SFINAE context in C++98.
+ template<class T, class U = typename T::type> void f(T) {}
+ void g(B b) { f(b); }
+#if __cplusplus < 201103L
+ // expected-error@-3 0-1{{extension}} expected-error@-3 {{protected}} expected-note@-3 {{instantiation}}
+ // expected-note@-3 {{substituting}}
+#else
+ // expected-error@-5 {{no matching}} expected-note@-6 {{protected}}
+#endif
+}
+
+namespace dr403 { // dr403: yes
+ namespace A {
+ struct S {};
+ int f(void*);
+ }
+ template<typename T> struct X {};
+ typedef struct X<A::S>::X XS;
+ XS *p;
+ int k = f(p); // ok, finds A::f, even though type XS is a typedef-name
+ // referring to an elaborated-type-specifier naming a
+ // injected-class-name, which is about as far from a
+ // template-id as we can make it.
+}
+
+// dr404: na
+// (NB: also sup 594)
+
+namespace dr406 { // dr406: yes
+ typedef struct {
+ static int n; // expected-error {{static data member 'n' not allowed in anonymous struct}}
+ } A;
+}
+
+namespace dr407 { // dr407: no
+ struct S;
+ typedef struct S S;
+ void f() {
+ struct S *p;
+ {
+ typedef struct S S; // expected-note {{here}}
+ struct S *p; // expected-error {{refers to a typedef}}
+ }
+ }
+ struct S {};
+
+ namespace UsingDir {
+ namespace A {
+ struct S {}; // expected-note {{found}}
+ }
+ namespace B {
+ typedef int S; // expected-note {{found}}
+ }
+ namespace C {
+ using namespace A;
+ using namespace B;
+ struct S s; // expected-error {{ambiguous}}
+ }
+ namespace D {
+ // FIXME: This is valid.
+ using A::S;
+ typedef struct S S; // expected-note {{here}}
+ struct S s; // expected-error {{refers to a typedef}}
+ }
+ namespace E {
+ // FIXME: The standard doesn't say whether this is valid.
+ typedef A::S S;
+ using A::S;
+ struct S s;
+ }
+ namespace F {
+ typedef A::S S; // expected-note {{here}}
+ }
+ // FIXME: The standard doesn't say what to do in these cases, but
+ // our behavior should not depend on the order of the using-directives.
+ namespace G {
+ using namespace A;
+ using namespace F;
+ struct S s;
+ }
+ namespace H {
+ using namespace F;
+ using namespace A;
+ struct S s; // expected-error {{refers to a typedef}}
+ }
+ }
+}
namespace dr408 { // dr408: 3.4
template<int N> void g() { int arr[N != 1 ? 1 : -1]; }
@@ -30,3 +164,1060 @@ namespace dr408 { // dr408: 3.4
template<> int R<int>::arr[2];
template void R<int>::f();
}
+
+namespace dr409 { // dr409: yes
+ template<typename T> struct A {
+ typedef int B;
+ B b1;
+ A::B b2;
+ A<T>::B b3;
+ A<T*>::B b4; // expected-error {{missing 'typename'}}
+ };
+}
+
+namespace dr410 { // dr410: no
+ template<class T> void f(T);
+ void g(int);
+ namespace M {
+ template<class T> void h(T);
+ template<class T> void i(T);
+ struct A {
+ friend void f<>(int);
+ friend void h<>(int);
+ friend void g(int);
+ template<class T> void i(T);
+ friend void i<>(int);
+ private:
+ static void z(); // expected-note {{private}}
+ };
+
+ template<> void h(int) { A::z(); }
+ // FIXME: This should be ill-formed. The member A::i<> is befriended,
+ // not this function.
+ template<> void i(int) { A::z(); }
+ }
+ template<> void f(int) { M::A::z(); }
+ void g(int) { M::A::z(); } // expected-error {{private}}
+}
+
+// dr412 is in its own file.
+
+namespace dr413 { // dr413: yes
+ struct S {
+ int a;
+ int : 17;
+ int b;
+ };
+ S s = { 1, 2, 3 }; // expected-error {{excess elements}}
+
+ struct E {};
+ struct T { // expected-note {{here}}
+ int a;
+ E e;
+ int b;
+ };
+ T t1 = { 1, {}, 2 };
+ T t2 = { 1, 2 }; // expected-error {{aggregate with no elements requires explicit braces}}
+}
+
+namespace dr414 { // dr414: dup 305
+ struct X {};
+ void f() {
+ X x;
+ struct X {};
+ x.~X();
+ }
+}
+
+namespace dr415 { // dr415: yes
+ template<typename T> void f(T, ...) { T::error; }
+ void f(int, int);
+ void g() { f(0, 0); } // ok
+}
+
+namespace dr416 { // dr416: yes
+ extern struct A a;
+ int &operator+(const A&, const A&);
+ int &k = a + a;
+ struct A { float &operator+(A&); };
+ float &f = a + a;
+}
+
+namespace dr417 { // dr417: no
+ struct A;
+ struct dr417::A {}; // expected-warning {{extra qualification}}
+ struct B { struct X; };
+ struct C : B {};
+ struct C::X {}; // expected-error {{no struct named 'X' in 'dr417::C'}}
+ struct B::X { struct Y; };
+ struct C::X::Y {}; // ok!
+ namespace N {
+ struct D;
+ struct E;
+ struct F;
+ struct H;
+ }
+ // FIXME: This is ill-formed.
+ using N::D;
+ struct dr417::D {}; // expected-warning {{extra qualification}}
+ using namespace N;
+ struct dr417::E {}; // expected-warning {{extra qualification}} expected-error {{no struct named 'E'}}
+ struct N::F {};
+ struct G;
+ using N::H;
+ namespace M {
+ struct dr417::G {}; // expected-error {{namespace 'M' does not enclose}}
+ struct dr417::H {}; // expected-error {{namespace 'M' does not enclose}}
+ }
+}
+
+namespace dr420 { // dr420: yes
+ template<typename T> struct ptr {
+ T *operator->() const;
+ T &operator*() const;
+ };
+ template<typename T, typename P> void test(P p) {
+ p->~T();
+ p->T::~T();
+ (*p).~T();
+ (*p).T::~T();
+ }
+ struct X {};
+ template void test<int>(int*);
+ template void test<int>(ptr<int>);
+ template void test<X>(X*);
+ template void test<X>(ptr<X>);
+
+ template<typename T>
+ void test2(T p) {
+ p->template Y<int>::~Y<int>();
+ p->~Y<int>();
+ // FIXME: This is ill-formed, but this diagnostic is terrible. We should
+ // reject this in the parser.
+ p->template ~Y<int>(); // expected-error 2{{no member named '~typename Y<int>'}}
+ }
+ template<typename T> struct Y {};
+ template void test2(Y<int>*); // expected-note {{instantiation}}
+ template void test2(ptr<Y<int> >); // expected-note {{instantiation}}
+
+ void test3(int *p, ptr<int> q) {
+ typedef int Int;
+ p->~Int();
+ q->~Int();
+ p->Int::~Int();
+ q->Int::~Int();
+ }
+
+#if __cplusplus >= 201103L
+ template<typename T> using id = T;
+ struct A { template<typename T> using id = T; };
+ void test4(int *p, ptr<int> q) {
+ p->~id<int>();
+ q->~id<int>();
+ p->id<int>::~id<int>();
+ q->id<int>::~id<int>();
+ p->template id<int>::~id<int>(); // expected-error {{expected unqualified-id}}
+ q->template id<int>::~id<int>(); // expected-error {{expected unqualified-id}}
+ p->A::template id<int>::~id<int>();
+ q->A::template id<int>::~id<int>();
+ }
+#endif
+}
+
+namespace dr421 { // dr421: yes
+ struct X { X(); int n; int &r; };
+ int *p = &X().n; // expected-error {{taking the address of a temporary}}
+ int *q = &X().r;
+}
+
+namespace dr422 { // dr422: yes
+ template<typename T, typename U> void f() {
+ typedef T type; // expected-note {{prev}}
+ typedef U type; // expected-error {{redef}}
+ }
+ template void f<int, int>();
+ template void f<int, char>(); // expected-note {{instantiation}}
+}
+
+namespace dr423 { // dr423: yes
+ template<typename T> struct X { operator T&(); };
+ void f(X<int> x) { x += 1; }
+}
+
+namespace dr424 { // dr424: yes
+ struct A {
+ typedef int N; // expected-note {{previous}}
+ typedef int N; // expected-error {{redefinition}}
+
+ struct X;
+ typedef X X; // expected-note {{previous}}
+ struct X {};
+
+ struct X *p;
+ struct A::X *q;
+ X *r;
+
+ typedef X X; // expected-error {{redefinition}}
+ };
+ struct B {
+ typedef int N;
+ };
+ struct C : B {
+ typedef int N; // expected-note {{previous}}
+ typedef int N; // expected-error {{redefinition}}
+ };
+}
+
+namespace dr425 { // dr425: yes
+ struct A { template<typename T> operator T() const; } a;
+ float f = 1.0f * a; // expected-error {{ambiguous}} expected-note 5+{{built-in candidate}}
+
+ template<typename T> struct is_float;
+ template<> struct is_float<float> { typedef void type; };
+
+ struct B {
+ template<typename T, typename U = typename is_float<T>::type> operator T() const; // expected-error 0-1{{extension}}
+ } b;
+ float g = 1.0f * b; // ok
+}
+
+namespace dr427 { // dr427: yes
+ struct B {};
+ struct D : public B {
+ D(B &) = delete; // expected-error 0-1{{extension}} expected-note {{deleted}}
+ };
+
+ extern D d1;
+ B &b = d1;
+ const D &d2 = static_cast<const D&>(b);
+ const D &d3 = (const D&)b;
+ const D &d4(b); // expected-error {{deleted}}
+}
+
+namespace dr428 { // dr428: yes
+ template<typename T> T make();
+ extern struct X x; // expected-note 5{{forward declaration}}
+ void f() {
+ throw void(); // expected-error {{cannot throw}}
+ throw make<void*>();
+ throw make<const volatile void*>();
+ throw x; // expected-error {{cannot throw}}
+ throw make<X&>(); // expected-error {{cannot throw}}
+ throw make<X*>(); // expected-error {{cannot throw}}
+ throw make<const volatile X&>(); // expected-error {{cannot throw}}
+ throw make<const volatile X*>(); // expected-error {{cannot throw}}
+ }
+}
+
+namespace dr429 { // dr429: yes c++11
+ // FIXME: This rule is obviously intended to apply to C++98 as well.
+ struct A {
+ static void *operator new(size_t, size_t);
+ static void operator delete(void*, size_t);
+ } *a = new (0) A;
+#if __cplusplus >= 201103L
+ // expected-error@-2 {{'new' expression with placement arguments refers to non-placement 'operator delete'}}
+ // expected-note@-4 {{here}}
+#endif
+ struct B {
+ static void *operator new(size_t, size_t);
+ static void operator delete(void*);
+ static void operator delete(void*, size_t);
+ } *b = new (0) B; // ok, second delete is not a non-placement deallocation function
+}
+
+namespace dr430 { // dr430: yes c++11
+ // resolved by n2239
+ // FIXME: This should apply in C++98 too.
+ void f(int n) {
+ int a[] = { n++, n++, n++ };
+#if __cplusplus < 201103L
+ // expected-warning@-2 {{multiple unsequenced modifications to 'n'}}
+#endif
+ }
+}
+
+namespace dr431 { // dr431: yes
+ struct A {
+ template<typename T> T *get();
+ template<typename T> struct B {
+ template<typename U> U *get();
+ };
+ };
+
+ template<typename T> void f(A a) {
+ a.get<A>()->get<T>();
+ a.get<T>()
+ ->get<T>(); // expected-error {{use 'template'}}
+ a.get<T>()->template get<T>();
+ a.A::get<T>();
+ A::B<int> *b = a.get<A::B<int> >();
+ b->get<int>();
+ b->A::B<int>::get<int>();
+ b->A::B<int>::get<T>();
+ b->A::B<T>::get<int>(); // expected-error {{use 'template'}}
+ b->A::B<T>::template get<int>();
+ b->A::B<T>::get<T>(); // expected-error {{use 'template'}}
+ b->A::B<T>::template get<T>();
+ A::B<T> *c = a.get<A::B<T> >();
+ c->get<int>(); // expected-error {{use 'template'}}
+ c->template get<int>();
+ }
+}
+
+namespace dr432 { // dr432: yes
+ template<typename T> struct A {};
+ template<typename T> struct B : A<B> {}; // expected-error {{requires template arguments}} expected-note {{declared}}
+ template<typename T> struct C : A<C<T> > {};
+#if __cplusplus >= 201103L
+ template<typename T> struct D : decltype(A<D>()) {}; // expected-error {{requires template arguments}} expected-note {{declared}}
+#endif
+}
+
+namespace dr433 { // dr433: yes
+ template<class T> struct S {
+ void f(union U*);
+ };
+ U *p;
+ template<class T> void S<T>::f(union U*) {}
+
+ S<int> s;
+}
+
+namespace dr434 { // dr434: yes
+ void f() {
+ const int ci = 0;
+ int *pi = 0;
+ const int *&rpci = pi; // expected-error {{cannot bind}}
+ rpci = &ci;
+ *pi = 1;
+ }
+}
+
+// dr435: na
+
+namespace dr436 { // dr436: yes
+ enum E { f }; // expected-note {{previous}}
+ void f(); // expected-error {{redefinition}}
+}
+
+namespace dr437 { // dr437: no
+ // This is superseded by 1308, which is in turn superseded by 1330,
+ // which restores this rule.
+ template<typename U> struct T : U {}; // expected-error {{incomplete}}
+ struct S { // expected-note {{not complete}}
+ void f() throw(S);
+ void g() throw(T<S>); // expected-note {{in instantiation of}}
+ struct U; // expected-note {{forward}}
+ void h() throw(U); // expected-error {{incomplete}}
+ struct U {};
+ };
+}
+
+// dr438 FIXME write a codegen test
+// dr439 FIXME write a codegen test
+// dr441 FIXME write a codegen test
+// dr442: sup 348
+// dr443: na
+
+namespace dr444 { // dr444: yes
+ struct D;
+ struct B { // expected-note {{candidate is the implicit copy}} expected-note 0-1 {{implicit move}}
+ D &operator=(D &) = delete; // expected-error 0-1{{extension}} expected-note {{deleted}}
+ };
+ struct D : B { // expected-note {{candidate is the implicit}} expected-note 0-1 {{implicit move}}
+ using B::operator=;
+ } extern d;
+ void f() {
+ d = d; // expected-error {{deleted}}
+ }
+}
+
+namespace dr445 { // dr445: yes
+ class A { void f(); }; // expected-note {{private}}
+ struct B {
+ friend void A::f(); // expected-error {{private}}
+ };
+}
+
+namespace dr446 { // dr446: yes
+ struct C;
+ struct A {
+ A();
+ A(const A&) = delete; // expected-error 0-1{{extension}} expected-note +{{deleted}}
+ A(const C&);
+ };
+ struct C : A {};
+ void f(A a, bool b, C c) {
+ void(b ? a : a);
+ b ? A() : a; // expected-error {{deleted}}
+ b ? a : A(); // expected-error {{deleted}}
+ b ? A() : A(); // expected-error {{deleted}}
+
+ void(b ? a : c);
+ b ? a : C(); // expected-error {{deleted}}
+ b ? c : A(); // expected-error {{deleted}}
+ b ? A() : C(); // expected-error {{deleted}}
+ }
+}
+
+namespace dr447 { // dr447: yes
+ struct A { int n; int a[4]; };
+ template<int> struct U {
+ typedef int type;
+ template<typename V> static void h();
+ };
+ template<typename T> U<sizeof(T)> g(T);
+ template<typename T, int N> void f(int n) {
+ // ok, not type dependent
+ g(__builtin_offsetof(A, n)).h<int>();
+ g(__builtin_offsetof(T, n)).h<int>();
+ // value dependent if first argument is a dependent type
+ U<__builtin_offsetof(A, n)>::type a;
+ U<__builtin_offsetof(T, n)>::type b; // expected-error +{{}} expected-warning 0+{{}}
+ // as an extension, we allow the member-designator to include array indices
+ g(__builtin_offsetof(A, a[0])).h<int>(); // expected-error {{extension}}
+ g(__builtin_offsetof(A, a[N])).h<int>(); // expected-error {{extension}}
+ U<__builtin_offsetof(A, a[0])>::type c; // expected-error {{extension}}
+ U<__builtin_offsetof(A, a[N])>::type d; // expected-error {{extension}} expected-error +{{}} expected-warning 0+{{}}
+ }
+}
+
+namespace dr448 { // dr448: yes
+ template<typename T = int> void f(int); // expected-error 0-1{{extension}} expected-note {{no known conversion}}
+ template<typename T> void g(T t) {
+ f<T>(t); // expected-error {{neither visible in the template definition nor found by argument-dependent lookup}}
+ dr448::f(t); // expected-error {{no matching function}}
+ }
+ template<typename T> void f(T); // expected-note {{should be declared prior to the call site}}
+ namespace HideFromADL { struct X {}; }
+ template void g(int); // ok
+ template void g(HideFromADL::X); // expected-note {{instantiation of}}
+}
+
+// dr449: na
+
+namespace dr450 { // dr450: yes
+ typedef int A[3];
+ void f1(const A &);
+ void f2(A &); // expected-note +{{not viable}}
+ struct S { A n; };
+ void g() {
+ f1(S().n);
+ f2(S().n); // expected-error {{no match}}}
+ }
+#if __cplusplus >= 201103L
+ void h() {
+ f1(A{});
+ f2(A{}); // expected-error {{no match}}
+ }
+#endif
+}
+
+namespace dr451 { // dr451: yes
+ const int a = 1 / 0; // expected-warning {{undefined}}
+ const int b = 1 / 0; // expected-warning {{undefined}}
+ int arr[b]; // expected-error +{{variable length arr}}
+}
+
+namespace dr452 { // dr452: yes
+ struct A {
+ int a, b, c;
+ A *p;
+ int f();
+ A() : a(f()), b(this->f() + a), c(this->a), p(this) {}
+ };
+}
+
+// dr454 FIXME write a codegen test
+
+namespace dr456 { // dr456: yes
+ // sup 903 c++11
+ const int null = 0;
+ void *p = null;
+#if __cplusplus >= 201103L
+ // expected-error@-2 {{cannot initialize}}
+#else
+ // expected-warning@-4 {{null}}
+#endif
+
+ const bool f = false;
+ void *q = f;
+#if __cplusplus >= 201103L
+ // expected-error@-2 {{cannot initialize}}
+#else
+ // expected-warning@-4 {{null}}
+#endif
+}
+
+namespace dr457 { // dr457: yes
+ const int a = 1;
+ const volatile int b = 1;
+ int ax[a];
+ int bx[b]; // expected-error +{{variable length array}}
+
+ enum E {
+ ea = a,
+ eb = b // expected-error {{not an integral constant}} expected-note {{read of volatile-qualified}}
+ };
+}
+
+namespace dr458 { // dr458: no
+ struct A {
+ int T;
+ int f();
+ template<typename> int g();
+ };
+
+ template<typename> struct B : A {
+ int f();
+ template<typename> int g();
+ template<typename> int h();
+ };
+
+ int A::f() {
+ return T;
+ }
+ template<typename T>
+ int A::g() {
+ return T; // FIXME: this is invalid, it finds the template parameter
+ }
+
+ template<typename T>
+ int B<T>::f() {
+ return T;
+ }
+ template<typename T> template<typename U>
+ int B<T>::g() {
+ return T;
+ }
+ template<typename U> template<typename T>
+ int B<U>::h() {
+ return T; // FIXME: this is invalid, it finds the template parameter
+ }
+}
+
+namespace dr460 { // dr460: yes
+ namespace X { namespace Q { int n; } }
+ namespace Y {
+ using X; // expected-error {{requires a qualified name}}
+ using dr460::X; // expected-error {{cannot refer to namespace}}
+ using X::Q; // expected-error {{cannot refer to namespace}}
+ }
+}
+
+// dr461: na
+// dr462 FIXME write a codegen test
+// dr463: na
+// dr464: na
+// dr465: na
+
+namespace dr466 { // dr466: no
+ typedef int I;
+ typedef const int CI;
+ typedef volatile int VI;
+ void f(int *a, CI *b, VI *c) {
+ a->~I();
+ a->~CI();
+ a->~VI();
+ a->I::~I();
+ a->CI::~CI();
+ a->VI::~VI();
+
+ a->CI::~VI(); // FIXME: This is invalid; CI and VI are not the same scalar type.
+
+ b->~I();
+ b->~CI();
+ b->~VI();
+ b->I::~I();
+ b->CI::~CI();
+ b->VI::~VI();
+
+ c->~I();
+ c->~CI();
+ c->~VI();
+ c->I::~I();
+ c->CI::~CI();
+ c->VI::~VI();
+ }
+}
+
+namespace dr467 { // dr467: yes
+ int stuff();
+
+ int f() {
+ static bool done;
+ if (done)
+ goto later;
+ static int k = stuff();
+ done = true;
+ later:
+ return k;
+ }
+ int g() {
+ goto later; // expected-error {{protected scope}}
+ int k = stuff(); // expected-note {{bypasses variable initialization}}
+ later:
+ return k;
+ }
+}
+
+namespace dr468 { // dr468: yes c++11
+ // FIXME: Should we allow this in C++98 too?
+ template<typename> struct A {
+ template<typename> struct B {
+ static int C;
+ };
+ };
+ int k = dr468::template A<int>::template B<char>::C;
+#if __cplusplus < 201103L
+ // expected-error@-2 2{{'template' keyword outside of a template}}
+#endif
+}
+
+namespace dr469 { // dr469: no
+ // FIXME: The core issue here didn't really answer the question. We don't
+ // deduce 'const T' from a function or reference type in a class template...
+ template<typename T> struct X; // expected-note 2{{here}}
+ template<typename T> struct X<const T> {};
+ X<int&> x; // expected-error {{undefined}}
+ X<int()> y; // expected-error {{undefined}}
+
+ // ... but we do in a function template. GCC and EDG fail deduction of 'f'
+ // and the second 'h'.
+ template<typename T> void f(const T *);
+ template<typename T> void g(T *, const T * = 0);
+ template<typename T> void h(T *) { T::error; }
+ template<typename T> void h(const T *);
+ void i() {
+ f(&i);
+ g(&i);
+ h(&i);
+ }
+}
+
+namespace dr470 { // dr470: yes
+ template<typename T> struct A {
+ struct B {};
+ };
+ template<typename T> struct C {
+ };
+
+ template struct A<int>; // expected-note {{previous}}
+ template struct A<int>::B; // expected-error {{duplicate explicit instantiation}}
+
+ // ok, instantiating C<char> doesn't instantiate base class members.
+ template struct A<char>;
+ template struct C<char>;
+}
+
+namespace dr471 { // dr471: yes
+ struct A { int n; };
+ struct B : private virtual A {};
+ struct C : protected virtual A {};
+ struct D : B, C { int f() { return n; } };
+ struct E : private virtual A {
+ using A::n;
+ };
+ struct F : E, B { int f() { return n; } };
+ struct G : virtual A {
+ private:
+ using A::n; // expected-note {{here}}
+ };
+ struct H : B, G { int f() { return n; } }; // expected-error {{private}}
+}
+
+namespace dr474 { // dr474: yes
+ namespace N {
+ struct S {
+ void f();
+ };
+ }
+ void N::S::f() {
+ void g(); // expected-note {{previous}}
+ }
+ int g();
+ namespace N {
+ int g(); // expected-error {{cannot be overloaded}}
+ }
+}
+
+// dr475 FIXME write a codegen test
+
+namespace dr477 { // dr477: 3.5
+ struct A {
+ explicit A();
+ virtual void f();
+ };
+ struct B {
+ friend explicit A::A(); // expected-error {{'explicit' is invalid in friend declarations}}
+ friend virtual void A::f(); // expected-error {{'virtual' is invalid in friend declarations}}
+ };
+ explicit A::A() {} // expected-error {{can only be specified inside the class definition}}
+ virtual void A::f() {} // expected-error {{can only be specified inside the class definition}}
+}
+
+namespace dr478 { // dr478: yes
+ struct A { virtual void f() = 0; }; // expected-note {{unimplemented}}
+ void f(A *a);
+ void f(A a[10]); // expected-error {{array of abstract class type}}
+}
+
+namespace dr479 { // dr479: yes
+ struct S {
+ S();
+ private:
+ S(const S&); // expected-note +{{here}}
+ ~S(); // expected-note +{{here}}
+ };
+ void f() {
+ throw S();
+ // expected-error@-1 {{temporary of type 'dr479::S' has private destructor}}
+ // expected-error@-2 {{calling a private constructor}}
+ // expected-error@-3 {{exception object of type 'dr479::S' has private destructor}}
+#if __cplusplus < 201103L
+ // expected-error@-5 {{C++98 requires an accessible copy constructor}}
+#endif
+ }
+ void g() {
+ S s; // expected-error {{private destructor}}}
+ throw s;
+ // expected-error@-1 {{calling a private constructor}}
+ // expected-error@-2 {{exception object of type 'dr479::S' has private destructor}}
+ }
+ void h() {
+ try {
+ f();
+ g();
+ } catch (S s) {
+ // expected-error@-1 {{calling a private constructor}}
+ // expected-error@-2 {{variable of type 'dr479::S' has private destructor}}
+ }
+ }
+}
+
+namespace dr480 { // dr480: yes
+ struct A { int n; };
+ struct B : A {};
+ struct C : virtual B {};
+ struct D : C {};
+
+ int A::*a = &A::n;
+ int D::*b = a; // expected-error {{virtual base}}
+
+ extern int D::*c;
+ int A::*d = static_cast<int A::*>(c); // expected-error {{virtual base}}
+
+ D *e;
+ A *f = e;
+ D *g = static_cast<D*>(f); // expected-error {{virtual base}}
+
+ extern D &i;
+ A &j = i;
+ D &k = static_cast<D&>(j); // expected-error {{virtual base}}
+}
+
+namespace dr481 { // dr481: yes
+ template<class T, T U> class A { T *x; };
+ T *x; // expected-error {{unknown type}}
+
+ template<class T *U> class B { T *x; };
+ T *y; // ok
+
+ struct C {
+ template<class T> void f(class D *p);
+ };
+ D *z; // ok
+
+ template<typename A = C, typename C = A> struct E {
+ void f() {
+ typedef ::dr481::C c; // expected-note {{previous}}
+ typedef C c; // expected-error {{different type}}
+ }
+ };
+ template struct E<>; // ok
+ template struct E<int>; // expected-note {{instantiation of}}
+
+ template<template<typename U_no_typo_correction> class A,
+ A<int> *B,
+ U_no_typo_correction *C> // expected-error {{unknown type}}
+ struct F {
+ U_no_typo_correction *x; // expected-error {{unknown type}}
+ };
+
+ template<template<class H *> class> struct G {
+ H *x;
+ };
+ H *q;
+
+ typedef int N;
+ template<N X, typename N, template<N Y> class T> struct I;
+ template<char*> struct J;
+ I<123, char*, J> *j;
+}
+
+namespace dr482 { // dr482: 3.5
+ extern int a;
+ void f();
+
+ int dr482::a = 0; // expected-warning {{extra qualification}}
+ void dr482::f() {} // expected-warning {{extra qualification}}
+
+ inline namespace X { // expected-error 0-1{{C++11 feature}}
+ extern int b;
+ void g();
+ struct S;
+ }
+ int dr482::b = 0; // expected-warning {{extra qualification}}
+ void dr482::g() {} // expected-warning {{extra qualification}}
+ struct dr482::S {}; // expected-warning {{extra qualification}}
+
+ void dr482::f(); // expected-warning {{extra qualification}}
+ void dr482::g(); // expected-warning {{extra qualification}}
+
+ // FIXME: The following are valid in DR482's wording, but these are bugs in
+ // the wording which we deliberately don't implement.
+ namespace N { typedef int type; }
+ typedef int N::type; // expected-error {{typedef declarator cannot be qualified}}
+ struct A {
+ struct B;
+ struct A::B {}; // expected-error {{extra qualification}}
+
+#if __cplusplus >= 201103L
+ enum class C;
+ enum class A::C {}; // expected-error {{extra qualification}}
+#endif
+ };
+}
+
+namespace dr483 { // dr483: yes
+ namespace climits {
+ int check1[__SCHAR_MAX__ >= 127 ? 1 : -1];
+ int check2[__SHRT_MAX__ >= 32767 ? 1 : -1];
+ int check3[__INT_MAX__ >= 32767 ? 1 : -1];
+ int check4[__LONG_MAX__ >= 2147483647 ? 1 : -1];
+ int check5[__LONG_LONG_MAX__ >= 9223372036854775807 ? 1 : -1];
+#if __cplusplus < 201103L
+ // expected-error@-2 {{extension}}
+#endif
+ }
+ namespace cstdint {
+ int check1[__PTRDIFF_WIDTH__ >= 16 ? 1 : -1];
+ int check2[__SIG_ATOMIC_WIDTH__ >= 8 ? 1 : -1];
+ int check3[__SIZE_WIDTH__ >= 16 ? 1 : -1];
+ int check4[__WCHAR_WIDTH__ >= 8 ? 1 : -1];
+ int check5[__WINT_WIDTH__ >= 16 ? 1 : -1];
+ }
+}
+
+namespace dr484 { // dr484: yes
+ struct A {
+ A();
+ void f();
+ };
+ typedef const A CA;
+ void CA::f() {
+ this->~CA();
+ this->CA::~A();
+ this->CA::A::~A();
+ }
+ CA::A() {}
+
+ struct B : CA {
+ B() : CA() {}
+ void f() { return CA::f(); }
+ };
+
+ struct C;
+ typedef C CT; // expected-note {{here}}
+ struct CT {}; // expected-error {{conflicts with typedef}}
+
+ namespace N {
+ struct D;
+ typedef D DT; // expected-note {{here}}
+ }
+ struct N::DT {}; // expected-error {{conflicts with typedef}}
+
+ typedef struct {
+ S(); // expected-error {{requires a type}}
+ } S;
+}
+
+namespace dr485 { // dr485: yes
+ namespace N {
+ struct S {};
+ int operator+(S, S);
+ template<typename T> int f(S);
+ }
+ template<typename T> int f();
+
+ N::S s;
+ int a = operator+(s, s);
+ int b = f<int>(s);
+}
+
+namespace dr486 { // dr486: yes
+ template<typename T> T f(T *); // expected-note 2{{substitution failure}}
+ int &f(...);
+
+ void g();
+ int n[10];
+
+ void h() {
+ int &a = f(&g);
+ int &b = f(&n);
+ f<void()>(&g); // expected-error {{no match}}
+ f<int[10]>(&n); // expected-error {{no match}}
+ }
+}
+
+namespace dr487 { // dr487: yes
+ enum E { e };
+ int operator+(int, E);
+ int i[4 + e]; // expected-error 2{{variable length array}}
+}
+
+namespace dr488 { // dr488: yes c++11
+ template <typename T> void f(T);
+ void f(int);
+ void g() {
+ // FIXME: It seems CWG thought this should be a SFINAE failure prior to
+ // allowing local types as template arguments. In C++98, we should either
+ // allow local types as template arguments or treat this as a SFINAE
+ // failure.
+ enum E { e };
+ f(e);
+#if __cplusplus < 201103L
+ // expected-error@-2 {{local type}}
+#endif
+ }
+}
+
+// dr489: na
+
+namespace dr490 { // dr490: yes
+ template<typename T> struct X {};
+
+ struct A {
+ typedef int T;
+ struct K {}; // expected-note {{declared}}
+
+ int f(T);
+ int g(T);
+ int h(X<T>);
+ int X<T>::*i(); // expected-note {{previous}}
+ int K::*j();
+
+ template<typename T> T k();
+
+ operator X<T>();
+ };
+
+ struct B {
+ typedef char T;
+ typedef int U;
+ friend int A::f(T);
+ friend int A::g(U);
+ friend int A::h(X<T>);
+
+ // FIXME: Per this DR, these two are valid! That is another defect
+ // (no number yet...) which will eventually supersede this one.
+ friend int X<T>::*A::i(); // expected-error {{return type}}
+ friend int K::*A::j(); // expected-error {{undeclared identifier 'K'; did you mean 'A::K'?}}
+
+ // ok, lookup finds B::T, not A::T, so return type matches
+ friend char A::k<T>();
+ friend int A::k<U>();
+
+ // A conversion-type-id in a conversion-function-id is always looked up in
+ // the class of the conversion function first.
+ friend A::operator X<T>();
+ };
+}
+
+namespace dr491 { // dr491: dup 413
+ struct A {} a, b[3] = { a, {} };
+ A c[2] = { a, {}, b[1] }; // expected-error {{excess elements}}
+}
+
+// dr492 FIXME write a codegen test
+
+namespace dr493 { // dr493: dup 976
+ struct X {
+ template <class T> operator const T &() const;
+ };
+ void f() {
+ if (X()) {
+ }
+ }
+}
+
+namespace dr494 { // dr494: dup 372
+ class A {
+ class B {};
+ friend class C;
+ };
+ class C : A::B {
+ A::B x;
+ class D : A::B {
+ A::B y;
+ };
+ };
+}
+
+namespace dr495 { // dr495: 3.5
+ template<typename T>
+ struct S {
+ operator int() { return T::error; }
+ template<typename U> operator U();
+ };
+ S<int> s;
+ long n = s;
+
+ template<typename T>
+ struct S2 {
+ template<typename U> operator U();
+ operator int() { return T::error; }
+ };
+ S2<int> s2;
+ long n2 = s2;
+}
+
+namespace dr496 { // dr496: no
+ struct A { int n; };
+ struct B { volatile int n; };
+ int check1[ __is_trivially_copyable(const int) ? 1 : -1];
+ int check2[!__is_trivially_copyable(volatile int) ? 1 : -1];
+ int check3[ __is_trivially_constructible(A, const A&) ? 1 : -1];
+ // FIXME: This is wrong.
+ int check4[ __is_trivially_constructible(B, const B&) ? 1 : -1];
+ int check5[ __is_trivially_assignable(A, const A&) ? 1 : -1];
+ // FIXME: This is wrong.
+ int check6[ __is_trivially_assignable(B, const B&) ? 1 : -1];
+}
+
+namespace dr497 { // dr497: yes
+ void before() {
+ struct S {
+ mutable int i;
+ };
+ const S cs; // expected-error {{default initialization}}
+ int S::*pm = &S::i;
+ cs.*pm = 88;
+ }
+
+ void after() {
+ struct S {
+ S() : i(0) {}
+ mutable int i;
+ };
+ const S cs;
+ int S::*pm = &S::i;
+ cs.*pm = 88; // expected-error {{not assignable}}
+ }
+}
+
+namespace dr499 { // dr499: yes
+ extern char str[];
+ void f() { throw str; }
+}
diff --git a/test/CXX/drs/dr5xx.cpp b/test/CXX/drs/dr5xx.cpp
new file mode 100644
index 000000000000..0c0d451c4b22
--- /dev/null
+++ b/test/CXX/drs/dr5xx.cpp
@@ -0,0 +1,212 @@
+// RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -std=c++1y %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+
+namespace dr500 { // dr500: dup 372
+ class D;
+ class A {
+ class B;
+ class C;
+ friend class D;
+ };
+ class A::B {};
+ class A::C : public A::B {};
+ class D : public A::B {};
+}
+
+namespace dr501 { // dr501: yes
+ struct A {
+ friend void f() {}
+ void g() {
+ void (*p)() = &f; // expected-error {{undeclared identifier}}
+ }
+ };
+}
+
+namespace dr502 { // dr502: yes
+ struct Q {};
+ template<typename T> struct A {
+ enum E { e = 1 };
+ void q1() { f(e); }
+ void q2() { Q arr[sizeof(E)]; f(arr); }
+ void q3() { Q arr[e]; f(arr); }
+ void sanity() { Q arr[1]; f(arr); } // expected-error {{undeclared identifier 'f'}}
+ };
+ int f(A<int>::E);
+ template<int N> int f(Q (&)[N]);
+ template struct A<int>;
+}
+
+namespace dr505 { // dr505: yes
+ const char *exts = "\e\(\{\[\%"; // expected-error 5{{use of non-standard escape}}
+ const char *unknown = "\Q"; // expected-error {{unknown escape sequence}}
+}
+
+namespace dr506 { // dr506: yes
+ struct NonPod { ~NonPod(); };
+ void f(...);
+ void g(NonPod np) { f(np); } // expected-error {{cannot pass}}
+}
+
+// FIXME: Add tests here once DR260 is resolved.
+// dr507: dup 260
+
+// dr508: na
+// dr509: na
+// dr510: na
+
+namespace dr512 { // dr512: yes
+ struct A {
+ A(int);
+ };
+ union U { A a; };
+#if __cplusplus < 201103L
+ // expected-error@-2 {{has a non-trivial constructor}}
+ // expected-note@-6 {{no default constructor}}
+ // expected-note@-6 {{suppressed by user-declared constructor}}
+#endif
+}
+
+// dr513: na
+
+namespace dr514 { // dr514: yes
+ namespace A { extern int x, y; }
+ int A::x = y;
+}
+
+namespace dr515 { // dr515: sup 1017
+ // FIXME: dr1017 reverses the wording of dr515, but the current draft has
+ // dr515's wording, with a different fix for dr1017.
+
+ struct X { int n; };
+ template<typename T> struct Y : T {
+ int f() { return X::n; }
+ };
+ int k = Y<X>().f();
+
+ struct A { int a; };
+ struct B { void f() { int k = sizeof(A::a); } };
+#if __cplusplus < 201103L
+ // expected-error@-2 {{invalid use of non-static data member}}
+#endif
+}
+
+// dr516: na
+
+namespace dr517 { // dr517: no
+ // This is NDR, but we should diagnose it anyway.
+ template<typename T> struct S {};
+ template<typename T> int v = 0; // expected-error 0-1{{extension}}
+
+ template struct S<int*>;
+ template int v<int*>;
+
+ S<char&> s;
+ int k = v<char&>;
+
+ // FIXME: These are both ill-formed.
+ template<typename T> struct S<T*> {};
+ template<typename T> int v<T*> = 0; // expected-error 0-1{{extension}}
+
+ // FIXME: These are both ill-formed.
+ template<typename T> struct S<T&> {};
+ template<typename T> int v<T&> = 0; // expected-error 0-1{{extension}}
+}
+
+namespace dr518 { // dr518: yes c++11
+ enum E { e, };
+#if __cplusplus < 201103L
+ // expected-error@-2 {{C++11 extension}}
+#endif
+}
+
+namespace dr519 { // dr519: yes
+// FIXME: Add a codegen test.
+#if __cplusplus >= 201103L
+#define fold(x) (__builtin_constant_p(x) ? (x) : (x))
+ int test[fold((int*)(void*)0) ? -1 : 1];
+#undef fold
+#endif
+}
+
+// dr520: na
+
+// dr521: no
+// FIXME: The wording here is broken. It's not reasonable to expect a
+// diagnostic here. Once the relevant DR gets a number, mark this as a dup.
+
+namespace dr522 { // dr522: yes
+ struct S {};
+ template<typename T> void b1(volatile T &);
+ template<typename T> void b2(volatile T * const *);
+ template<typename T> void b2(volatile T * const S::*);
+ template<typename T> void b2(volatile T * const S::* const *);
+ // FIXME: This diagnostic isn't very good. The problem is not substitution failure.
+ template<typename T> void b2a(volatile T *S::* const *); // expected-note {{substitution failure}}
+
+ template<typename T> struct Base {};
+ struct Derived : Base<int> {};
+ template<typename T> void b3(Base<T>);
+ template<typename T> void b3(Base<T> *);
+
+ void test(int n, const int cn, int **p, int *S::*pm) {
+ int *a[3], *S::*am[3];
+ const Derived cd = Derived();
+ Derived d[3];
+
+ b1(n);
+ b1(cn);
+ b2(p);
+ b2(pm);
+ b2(a);
+ b2(am);
+ b2a(am); // expected-error {{no matching function}}
+ b3(d);
+ b3(cd);
+ }
+}
+
+namespace dr524 { // dr524: yes
+ template<typename T> void f(T a, T b) { operator+(a, b); } // expected-error {{call}}
+
+ struct S {};
+ void operator+(S, S);
+ template void f(S, S);
+
+ namespace N { struct S {}; }
+ void operator+(N::S, N::S); // expected-note {{should be declared}}
+ template void f(N::S, N::S); // expected-note {{instantiation}}
+}
+
+namespace dr525 { // dr525: yes
+ namespace before {
+ // Note, the example was correct prior to the change; instantiation is
+ // required for cases like this:
+ template <class T> struct D { operator T*(); };
+ void g(D<double> ppp) {
+ delete ppp;
+ }
+ }
+ namespace after {
+ template <class T> struct D { typename T::error e; }; // expected-error {{prior to '::'}}
+ void g(D<double> *ppp) {
+ delete ppp; // expected-note {{instantiation of}}
+ }
+ }
+}
+
+// PR8130
+namespace dr532 { // dr532: 3.5
+ struct A { };
+
+ template<class T> struct B {
+ template<class R> int &operator*(R&);
+ };
+
+ template<class T, class R> float &operator*(T&, R&);
+ void test() {
+ A a;
+ B<A> b;
+ int &ir = b * a;
+ }
+}
diff --git a/test/CXX/drs/dr9xx.cpp b/test/CXX/drs/dr9xx.cpp
new file mode 100644
index 000000000000..40dc2821adc3
--- /dev/null
+++ b/test/CXX/drs/dr9xx.cpp
@@ -0,0 +1,45 @@
+// RUN: %clang_cc1 -std=c++98 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -std=c++11 %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+// RUN: %clang_cc1 -std=c++1y %s -verify -fexceptions -fcxx-exceptions -pedantic-errors
+
+#if __cplusplus < 201103L
+// expected-no-diagnostics
+#endif
+
+namespace std {
+ __extension__ typedef __SIZE_TYPE__ size_t;
+
+ template<typename T> struct initializer_list {
+ const T *p; size_t n;
+ initializer_list(const T *p, size_t n);
+ };
+}
+
+namespace dr990 { // dr990: 3.5
+#if __cplusplus >= 201103L
+ struct A { // expected-note 2{{candidate}}
+ A(std::initializer_list<int>); // expected-note {{candidate}}
+ };
+ struct B {
+ A a;
+ };
+ B b1 { };
+ B b2 { 1 }; // expected-error {{no viable conversion from 'int' to 'dr990::A'}}
+ B b3 { { 1 } };
+
+ struct C {
+ C();
+ C(int);
+ C(std::initializer_list<int>) = delete; // expected-note {{here}}
+ };
+ C c1[3] { 1 }; // ok
+ C c2[3] { 1, {2} }; // expected-error {{call to deleted}}
+
+ struct D {
+ D();
+ D(std::initializer_list<int>);
+ D(std::initializer_list<double>);
+ };
+ D d{};
+#endif
+}
diff --git a/test/CXX/except/except.spec/canonical.cpp b/test/CXX/except/except.spec/canonical.cpp
index b6d3e9c7aba1..d6dc25889205 100644
--- a/test/CXX/except/except.spec/canonical.cpp
+++ b/test/CXX/except/except.spec/canonical.cpp
@@ -9,7 +9,7 @@ namespace std
template <class _Tp> _Tp&& declval() noexcept;
template <class _Tp, class... _Args>
-struct __is_nothrow_constructible
+struct _is_nothrow_constructible
{
static const bool value = noexcept(_Tp(declval<_Args>()...));
};
@@ -22,7 +22,7 @@ public:
typedef _Allocator allocator_type;
basic_string()
- noexcept(__is_nothrow_constructible<allocator_type>::value);
+ noexcept(_is_nothrow_constructible<allocator_type>::value);
};
template <class, class, class _Compare>
@@ -30,7 +30,7 @@ struct __map_value_compare
{
public:
__map_value_compare()
- noexcept(__is_nothrow_constructible<_Compare>::value);
+ noexcept(_is_nothrow_constructible<_Compare>::value);
};
struct less
@@ -45,10 +45,10 @@ struct map
template<class T, class _Traits, class _Allocator>
-basic_string<T, _Traits, _Allocator>::basic_string() noexcept(__is_nothrow_constructible<allocator_type>::value) {}
+basic_string<T, _Traits, _Allocator>::basic_string() noexcept(_is_nothrow_constructible<allocator_type>::value) {}
template <class T, class Value, class _Compare>
__map_value_compare<T, Value, _Compare>::__map_value_compare()
- noexcept(__is_nothrow_constructible<_Compare>::value) {}
+ noexcept(_is_nothrow_constructible<_Compare>::value) {}
} // std
diff --git a/test/CXX/except/except.spec/p11.cpp b/test/CXX/except/except.spec/p11.cpp
index 1f6bf2131cd6..1d0a647fb4f4 100644
--- a/test/CXX/except/except.spec/p11.cpp
+++ b/test/CXX/except/except.spec/p11.cpp
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -std=c++11 -fexceptions -fcxx-exceptions -fsyntax-only -verify %s
// expected-no-diagnostics
-// This is the "let the user shoot himself in the foot" clause.
+// This is the "let the user shoot themselves in the foot" clause.
void f() noexcept {
throw 0; // no-error
}
diff --git a/test/CXX/except/except.spec/p14-ir.cpp b/test/CXX/except/except.spec/p14-ir.cpp
index 9b41f3d1bce9..e3b15e5bde9a 100644
--- a/test/CXX/except/except.spec/p14-ir.cpp
+++ b/test/CXX/except/except.spec/p14-ir.cpp
@@ -26,12 +26,12 @@ struct X4 {
struct X5 : X0, X4 { };
void test(X2 x2, X3 x3, X5 x5) {
- // CHECK: define linkonce_odr void @_ZN2X2C1ERKS_(%struct.X2* %this, %struct.X2*) unnamed_addr
+ // CHECK: define linkonce_odr void @_ZN2X2C1ERKS_(%struct.X2* %this, %struct.X2* dereferenceable({{[0-9]+}})) unnamed_addr
// CHECK: call void @_ZN2X2C2ERKS_({{.*}}) [[NUW:#[0-9]+]]
// CHECK-NEXT: ret void
// CHECK-NEXT: }
X2 x2a(x2);
- // CHECK: define linkonce_odr void @_ZN2X3C1ERKS_(%struct.X3* %this, %struct.X3*) unnamed_addr
+ // CHECK: define linkonce_odr void @_ZN2X3C1ERKS_(%struct.X3* %this, %struct.X3* dereferenceable({{[0-9]+}})) unnamed_addr
// CHECK: call void @_ZN2X3C2ERKS_({{.*}}) [[NUW]]
// CHECK-NEXT: ret void
// CHECK-NEXT: }
diff --git a/test/CXX/except/except.spec/p15.cpp b/test/CXX/except/except.spec/p15.cpp
index fcf12357f916..acf4426a8eb5 100644
--- a/test/CXX/except/except.spec/p15.cpp
+++ b/test/CXX/except/except.spec/p15.cpp
@@ -1,16 +1,20 @@
// RUN: %clang_cc1 -std=c++11 -fexceptions -fcxx-exceptions -fsyntax-only -verify %s
+// RUN: %clang_cc1 -DUSE -std=c++11 -fexceptions -fcxx-exceptions -fsyntax-only -verify %s
+
+// Maybe force the implicit declaration of 'operator delete' and 'operator
+// delete[]'. This should make no difference to anything!
+#ifdef USE
+void f(int *p) {
+ delete p;
+ delete [] p;
+}
+#endif
// Deallocation functions are implicitly noexcept.
// Thus, explicit specs aren't allowed to conflict.
-void f() {
- // Force implicit declaration of delete.
- delete new int;
- delete[] new int[1];
-}
-
-void operator delete(void*);
-void operator delete[](void*);
+void operator delete(void*); // expected-warning {{function previously declared with an explicit exception specification redeclared with an implicit exception specification}}
+void operator delete[](void*); // expected-warning {{function previously declared with an explicit exception specification redeclared with an implicit exception specification}}
static_assert(noexcept(operator delete(0)), "");
static_assert(noexcept(operator delete[](0)), "");
diff --git a/test/CXX/expr/expr.const/p2-0x.cpp b/test/CXX/expr/expr.const/p2-0x.cpp
index f0b53c7d3b5c..bcf45a0c05b4 100644
--- a/test/CXX/expr/expr.const/p2-0x.cpp
+++ b/test/CXX/expr/expr.const/p2-0x.cpp
@@ -138,7 +138,7 @@ namespace UndefinedBehavior {
case (int)(unsigned)(long long)4.4e9: // ok
case (int)(float)1e300: // expected-error {{constant expression}} expected-note {{value 1.0E+300 is outside the range of representable values of type 'float'}} expected-error {{duplicate case value '2147483647'}} expected-note {{previous case defined here}}
case (int)((float)1e37 / 1e30): // ok
- case (int)(__fp16)65536: // expected-error {{constant expression}} expected-note {{value 65536 is outside the range of representable values of type 'half'}} expected-error {{duplicate case value '2147483647'}}
+ case (int)(__fp16)65536: // expected-error {{constant expression}} expected-note {{value 65536 is outside the range of representable values of type '__fp16'}} expected-error {{duplicate case value '2147483647'}}
break;
}
}
@@ -202,7 +202,9 @@ namespace UndefinedBehavior {
static_assert((A*)nb == 0, "");
static_assert((B*)na == 0, "");
constexpr const int &nf = nb->n; // expected-error {{constant expression}} expected-note {{cannot access field of null pointer}}
- constexpr const int &np = (*(int(*)[4])nullptr)[2]; // expected-error {{constant expression}} expected-note {{cannot access array element of null pointer}}
+ constexpr const int *np1 = (int*)nullptr + 0; // ok
+ constexpr const int *np2 = &(*(int(*)[4])nullptr)[0]; // ok
+ constexpr const int *np3 = &(*(int(*)[4])nullptr)[2]; // expected-error {{constant expression}} expected-note {{cannot perform pointer arithmetic on null pointer}}
struct C {
constexpr int f() const { return 0; }
diff --git a/test/CXX/expr/expr.const/p3-0x.cpp b/test/CXX/expr/expr.const/p3-0x.cpp
index e3e32dfe0900..d9d84853ebae 100644
--- a/test/CXX/expr/expr.const/p3-0x.cpp
+++ b/test/CXX/expr/expr.const/p3-0x.cpp
@@ -97,7 +97,7 @@ template <bool B> int f() { return B; } // expected-note {{candidate template ig
template int f<&S::operator int>(); // expected-error {{does not refer to a function template}}
template int f<(bool)&S::operator int>();
-int n = Val<bool, &S::operator int>::value; // expected-error {{conversion from 'int (S::*)() const' to 'bool' is not allowed in a converted constant expression}}
+int n = Val<bool, &S::operator int>::value; // expected-error-re {{conversion from 'int (S::*)(){{( __attribute__\(\(thiscall\)\))?}} const' to 'bool' is not allowed in a converted constant expression}}
namespace NonConstLValue {
struct S {
diff --git a/test/CXX/expr/expr.mptr.oper/p5.cpp b/test/CXX/expr/expr.mptr.oper/p5.cpp
index 7380b5d4805d..c26b30d43da1 100644
--- a/test/CXX/expr/expr.mptr.oper/p5.cpp
+++ b/test/CXX/expr/expr.mptr.oper/p5.cpp
@@ -24,19 +24,19 @@ void test_object_cvquals(void (X0::*pm)(),
(p->*pmv)();
(p->*pmcv)();
- (pc->*pm)(); // expected-error{{call to pointer to member function of type 'void ()' drops 'const' qualifier}}
+ (pc->*pm)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}}' drops 'const' qualifier}}
(pc->*pmc)();
- (pc->*pmv)(); // expected-error{{call to pointer to member function of type 'void () volatile' drops 'const' qualifier}}
+ (pc->*pmv)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}} volatile' drops 'const' qualifier}}
(pc->*pmcv)();
- (pv->*pm)(); // expected-error{{call to pointer to member function of type 'void ()' drops 'volatile' qualifier}}
- (pv->*pmc)(); // expected-error{{call to pointer to member function of type 'void () const' drops 'volatile' qualifier}}
+ (pv->*pm)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}}' drops 'volatile' qualifier}}
+ (pv->*pmc)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}} const' drops 'volatile' qualifier}}
(pv->*pmv)();
(pv->*pmcv)();
- (pcv->*pm)(); // expected-error{{call to pointer to member function of type 'void ()' drops 'const volatile' qualifiers}}
- (pcv->*pmc)(); // expected-error{{call to pointer to member function of type 'void () const' drops 'volatile' qualifier}}
- (pcv->*pmv)(); // expected-error{{call to pointer to member function of type 'void () volatile' drops 'const' qualifier}}
+ (pcv->*pm)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}}' drops 'const volatile' qualifiers}}
+ (pcv->*pmc)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}} const' drops 'volatile' qualifier}}
+ (pcv->*pmv)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}} volatile' drops 'const' qualifier}}
(pcv->*pmcv)();
(o.*pm)();
@@ -44,18 +44,18 @@ void test_object_cvquals(void (X0::*pm)(),
(o.*pmv)();
(o.*pmcv)();
- (oc.*pm)(); // expected-error{{call to pointer to member function of type 'void ()' drops 'const' qualifier}}
+ (oc.*pm)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}}' drops 'const' qualifier}}
(oc.*pmc)();
- (oc.*pmv)(); // expected-error{{call to pointer to member function of type 'void () volatile' drops 'const' qualifier}}
+ (oc.*pmv)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}} volatile' drops 'const' qualifier}}
(oc.*pmcv)();
- (ov.*pm)(); // expected-error{{call to pointer to member function of type 'void ()' drops 'volatile' qualifier}}
- (ov.*pmc)(); // expected-error{{call to pointer to member function of type 'void () const' drops 'volatile' qualifier}}
+ (ov.*pm)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}}' drops 'volatile' qualifier}}
+ (ov.*pmc)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}} const' drops 'volatile' qualifier}}
(ov.*pmv)();
(ov.*pmcv)();
- (ocv.*pm)(); // expected-error{{call to pointer to member function of type 'void ()' drops 'const volatile' qualifiers}}
- (ocv.*pmc)(); // expected-error{{call to pointer to member function of type 'void () const' drops 'volatile' qualifier}}
- (ocv.*pmv)(); // expected-error{{call to pointer to member function of type 'void () volatile' drops 'const' qualifier}}
+ (ocv.*pm)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}}' drops 'const volatile' qualifiers}}
+ (ocv.*pmc)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}} const' drops 'volatile' qualifier}}
+ (ocv.*pmv)(); // expected-error-re{{call to pointer to member function of type 'void (){{( __attribute__\(\(thiscall\)\))?}} volatile' drops 'const' qualifier}}
(ocv.*pmcv)();
}
diff --git a/test/CXX/expr/expr.mptr.oper/p6-0x.cpp b/test/CXX/expr/expr.mptr.oper/p6-0x.cpp
index 917b2dab7c32..b1823e59fff2 100644
--- a/test/CXX/expr/expr.mptr.oper/p6-0x.cpp
+++ b/test/CXX/expr/expr.mptr.oper/p6-0x.cpp
@@ -22,13 +22,13 @@ void test(X *xp, int (X::*pmf)(int), int (X::*l_pmf)(int) &,
// Lvalue ref-qualifier.
(lvalue<X>().*l_pmf)(17);
- (xvalue<X>().*l_pmf)(17); // expected-error{{pointer-to-member function type 'int (X::*)(int) &' can only be called on an lvalue}}
- (prvalue<X>().*l_pmf)(17); // expected-error{{pointer-to-member function type 'int (X::*)(int) &' can only be called on an lvalue}}
+ (xvalue<X>().*l_pmf)(17); // expected-error-re{{pointer-to-member function type 'int (X::*)(int){{( __attribute__\(\(thiscall\)\))?}} &' can only be called on an lvalue}}
+ (prvalue<X>().*l_pmf)(17); // expected-error-re{{pointer-to-member function type 'int (X::*)(int){{( __attribute__\(\(thiscall\)\))?}} &' can only be called on an lvalue}}
(xp->*l_pmf)(17);
// Rvalue ref-qualifier.
- (lvalue<X>().*r_pmf)(17); // expected-error{{pointer-to-member function type 'int (X::*)(int) &&' can only be called on an rvalue}}
+ (lvalue<X>().*r_pmf)(17); // expected-error-re{{pointer-to-member function type 'int (X::*)(int){{( __attribute__\(\(thiscall\)\))?}} &&' can only be called on an rvalue}}
(xvalue<X>().*r_pmf)(17);
(prvalue<X>().*r_pmf)(17);
- (xp->*r_pmf)(17); // expected-error{{pointer-to-member function type 'int (X::*)(int) &&' can only be called on an rvalue}}
+ (xp->*r_pmf)(17); // expected-error-re{{pointer-to-member function type 'int (X::*)(int){{( __attribute__\(\(thiscall\)\))?}} &&' can only be called on an rvalue}}
}
diff --git a/test/CXX/expr/expr.prim/expr.prim.general/p4-0x.cpp b/test/CXX/expr/expr.prim/expr.prim.general/p4-0x.cpp
index 4e57b74f08a0..54b2ff52895a 100644
--- a/test/CXX/expr/expr.prim/expr.prim.general/p4-0x.cpp
+++ b/test/CXX/expr/expr.prim/expr.prim.general/p4-0x.cpp
@@ -6,6 +6,8 @@ struct S {
int arr[sizeof(this)]; // expected-error {{invalid use of 'this' outside of a non-static member function}}
int sz = sizeof(this); // ok
+
+ typedef auto f() -> decltype(this); // expected-error {{invalid use of 'this' outside of a non-static member function}}
};
namespace CaptureThis {
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm b/test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm
index 0db2bf5646ff..96e8fcd8d371 100644
--- a/test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm
+++ b/test/CXX/expr/expr.prim/expr.prim.lambda/blocks.mm
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 -fblocks %s -verify
+// RUN: %clang_cc1 -triple i686-pc-linux -std=c++11 -fblocks %s -verify
void block_capture_errors() {
__block int var; // expected-note 2{{'var' declared here}}
@@ -85,6 +85,24 @@ namespace overloading {
void call_with_lambda() {
int &ir = accept_lambda_conv([](int x) { return x + 1; });
}
+
+ template<typename T> using id = T;
+
+ auto a = [](){};
+ struct C : decltype(a) {
+ using decltype(a)::operator id<void(*)()>;
+ private:
+ using decltype(a)::operator id<void(^)()>;
+ } extern c;
+
+ struct D : decltype(a) {
+ using decltype(a)::operator id<void(^)()>;
+ private:
+ using decltype(a)::operator id<void(*)()>; // expected-note {{here}}
+ } extern d;
+
+ bool r1 = c;
+ bool r2 = d; // expected-error {{private}}
}
namespace PR13117 {
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/generic-lambda-unimplemented-1y.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/generic-lambda-unimplemented-1y.cpp
deleted file mode 100644
index 7f42c396ee22..000000000000
--- a/test/CXX/expr/expr.prim/expr.prim.lambda/generic-lambda-unimplemented-1y.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -std=c++1y %s -verify
-//expected-no-diagnostics
-namespace lambda_capturing {
-// FIXME: Once return type deduction is implemented for generic lambdas
-// this will need to be updated.
-void test() {
- int i = 10;
- {
- auto L = [=](auto a) -> int {
- return i + a;
- };
- L(3);
- }
- {
- auto L = [i](auto a) -> int {
- return i + a;
- };
- L(3);
- }
- {
- auto L = [i=i](auto a) -> int {
- return i + a;
- };
- L(3);
- }
-
-
-}
-
-}
-
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp
index 2ddcf18409e9..551c100ff7af 100644
--- a/test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp
+++ b/test/CXX/expr/expr.prim/expr.prim.lambda/p14.cpp
@@ -100,3 +100,12 @@ namespace rdar14468891 {
[x]() {}(); // expected-error{{by-copy capture of value of abstract type 'rdar14468891::X'}}
}
}
+
+namespace rdar15560464 {
+ struct X; // expected-note{{forward declaration of 'rdar15560464::X'}}
+ void foo(const X& param) {
+ auto x = ([=]() {
+ auto& y = param; // expected-error{{by-copy capture of variable 'param' with incomplete type 'const rdar15560464::X'}}
+ });
+ }
+}
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp
index 8a6e79273d55..35b77896c868 100644
--- a/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp
+++ b/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp
@@ -10,7 +10,7 @@ void test_special_member_functions(MoveOnly mo, int i) {
auto lambda1 = [i]() { }; // expected-note 2 {{lambda expression begins here}}
// Default constructor
- decltype(lambda1) lambda2; // expected-error{{call to implicitly-deleted default constructor of 'decltype(lambda1)' (aka '<lambda}}
+ decltype(lambda1) lambda2; // expected-error{{call to implicitly-deleted default constructor of 'decltype(lambda1)' (aka '(lambda}}
// Copy assignment operator
lambda1 = lambda1; // expected-error{{copy assignment operator is implicitly deleted}}
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/p2-generic-lambda-1y.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/p2-generic-lambda-1y.cpp
index d41c4507a850..03147a692dd5 100644
--- a/test/CXX/expr/expr.prim/expr.prim.lambda/p2-generic-lambda-1y.cpp
+++ b/test/CXX/expr/expr.prim/expr.prim.lambda/p2-generic-lambda-1y.cpp
@@ -1,25 +1,25 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++1y -DCXX1Y
-
-// prvalue
-void prvalue() {
- auto&& x = [](auto a)->void { };
- auto& y = [](auto *a)->void { }; // expected-error{{cannot bind to a temporary of type}}
-}
-
-namespace std {
- class type_info;
-}
-
-struct P {
- virtual ~P();
-};
-
-void unevaluated_operand(P &p, int i) { //expected-note{{declared here}}
- // FIXME: this should only emit one error.
- int i2 = sizeof([](auto a, auto b)->void{}(3, '4')); // expected-error{{lambda expression in an unevaluated operand}} \
- // expected-error{{invalid application of 'sizeof'}}
- const std::type_info &ti1 = typeid([](auto &a) -> P& { static P p; return p; }(i));
- const std::type_info &ti2 = typeid([](auto) -> int { return i; }(i)); // expected-error{{lambda expression in an unevaluated operand}}\
- // expected-error{{cannot be implicitly captured}}\
- // expected-note{{begins here}}
-}
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++1y -DCXX1Y
+
+// prvalue
+void prvalue() {
+ auto&& x = [](auto a)->void { };
+ auto& y = [](auto *a)->void { }; // expected-error{{cannot bind to a temporary of type}}
+}
+
+namespace std {
+ class type_info;
+}
+
+struct P {
+ virtual ~P();
+};
+
+void unevaluated_operand(P &p, int i) { //expected-note{{declared here}}
+ // FIXME: this should only emit one error.
+ int i2 = sizeof([](auto a, auto b)->void{}(3, '4')); // expected-error{{lambda expression in an unevaluated operand}} \
+ // expected-error{{invalid application of 'sizeof'}}
+ const std::type_info &ti1 = typeid([](auto &a) -> P& { static P p; return p; }(i));
+ const std::type_info &ti2 = typeid([](auto) -> int { return i; }(i)); // expected-error{{lambda expression in an unevaluated operand}}\
+ // expected-error{{cannot be implicitly captured}}\
+ // expected-note{{begins here}}
+}
diff --git a/test/CXX/expr/expr.prim/expr.prim.lambda/p5-generic-lambda-1y.cpp b/test/CXX/expr/expr.prim/expr.prim.lambda/p5-generic-lambda-1y.cpp
index c5d3bf6d1bcf..415c3d84560e 100644
--- a/test/CXX/expr/expr.prim/expr.prim.lambda/p5-generic-lambda-1y.cpp
+++ b/test/CXX/expr/expr.prim/expr.prim.lambda/p5-generic-lambda-1y.cpp
@@ -1,131 +1,131 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++1y -DCXX1Y
-
-namespace test_factorial {
-
-auto Fact = [](auto Self, unsigned n) -> unsigned {
- return !n ? 1 : Self(Self, n - 1) * n;
-};
-
-auto six = Fact(Fact, 3);
-
-}
-
-namespace overload_generic_lambda {
- template <class F1, class F2> struct overload : F1, F2 {
- using F1::operator();
- using F2::operator();
- overload(F1 f1, F2 f2) : F1(f1), F2(f2) { }
- };
-
- auto NumParams = [](auto Self, auto h, auto ... rest) -> unsigned {
- return 1 + Self(Self, rest...);
- };
- auto Base = [](auto Self, auto h) -> unsigned {
- return 1;
- };
- overload<decltype(Base), decltype(NumParams)> O(Base, NumParams);
- int num_params = O(O, 5, 3, "abc", 3.14, 'a');
-}
-
-
-namespace overload_generic_lambda_return_type_deduction {
- template <class F1, class F2> struct overload : F1, F2 {
- using F1::operator();
- using F2::operator();
- overload(F1 f1, F2 f2) : F1(f1), F2(f2) { }
- };
-
- auto NumParams = [](auto Self, auto h, auto ... rest) {
- return 1 + Self(Self, rest...);
- };
- auto Base = [](auto Self, auto h) {
- return 1;
- };
- overload<decltype(Base), decltype(NumParams)> O(Base, NumParams);
- int num_params = O(O, 5, 3, "abc", 3.14, 'a');
-}
-
-namespace test_standard_p5 {
-// FIXME: This test should eventually compile without an explicit trailing return type
-auto glambda = [](auto a, auto&& b) ->bool { return a < b; };
-bool b = glambda(3, 3.14); // OK
-
-}
-namespace test_deduction_failure {
- int test() {
- auto g = [](auto *a) { //expected-note{{candidate template ignored}}
- return a;
- };
- struct X { };
- X *x;
- g(x);
- g(3); //expected-error{{no matching function}}
- return 0;
- }
-
-}
-
-namespace test_instantiation_or_sfinae_failure {
-int test2() {
- {
- auto L = [](auto *a) {
- return (*a)(a); }; //expected-error{{called object type 'double' is not a function}}
- double d;
- L(&d); //expected-note{{in instantiation of}}
- auto M = [](auto b) { return b; };
- L(&M); // ok
- }
- {
- auto L = [](auto *a) ->decltype (a->foo()) { //expected-note2{{candidate template ignored:}}
- return (*a)(a); };
- double d;
- L(&d); //expected-error{{no matching function for call}}
- auto M = [](auto b) { return b; };
- L(&M); //expected-error{{no matching function for call}}
-
- }
- return 0;
-}
-
-
-}
-
-namespace test_misc {
-auto GL = [](auto a, decltype(a) b) //expected-note{{candidate function}}
- -> int { return a + b; };
-
-void test() {
- struct X { };
- GL(3, X{}); //expected-error{{no matching function}}
-}
-
-void test2() {
- auto l = [](auto *a) -> int {
- (*a)(a); return 0; }; //expected-error{{called object type 'double' is not a function}}
- l(&l);
- double d;
- l(&d); //expected-note{{in instantiation of}}
-}
-
-}
-
-namespace nested_lambdas {
- int test() {
- auto L = [](auto a) {
- return [=](auto b) {
- return a + b;
- };
- };
- }
- auto get_lambda() {
- return [](auto a) {
- return a;
- };
- };
-
- int test2() {
- auto L = get_lambda();
- L(3);
- }
-}
-
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++1y -DCXX1Y
+
+namespace test_factorial {
+
+auto Fact = [](auto Self, unsigned n) -> unsigned {
+ return !n ? 1 : Self(Self, n - 1) * n;
+};
+
+auto six = Fact(Fact, 3);
+
+}
+
+namespace overload_generic_lambda {
+ template <class F1, class F2> struct overload : F1, F2 {
+ using F1::operator();
+ using F2::operator();
+ overload(F1 f1, F2 f2) : F1(f1), F2(f2) { }
+ };
+
+ auto NumParams = [](auto Self, auto h, auto ... rest) -> unsigned {
+ return 1 + Self(Self, rest...);
+ };
+ auto Base = [](auto Self, auto h) -> unsigned {
+ return 1;
+ };
+ overload<decltype(Base), decltype(NumParams)> O(Base, NumParams);
+ int num_params = O(O, 5, 3, "abc", 3.14, 'a');
+}
+
+
+namespace overload_generic_lambda_return_type_deduction {
+ template <class F1, class F2> struct overload : F1, F2 {
+ using F1::operator();
+ using F2::operator();
+ overload(F1 f1, F2 f2) : F1(f1), F2(f2) { }
+ };
+
+ auto NumParams = [](auto Self, auto h, auto ... rest) {
+ return 1 + Self(Self, rest...);
+ };
+ auto Base = [](auto Self, auto h) {
+ return 1;
+ };
+ overload<decltype(Base), decltype(NumParams)> O(Base, NumParams);
+ int num_params = O(O, 5, 3, "abc", 3.14, 'a');
+}
+
+namespace test_standard_p5 {
+// FIXME: This test should eventually compile without an explicit trailing return type
+auto glambda = [](auto a, auto&& b) ->bool { return a < b; };
+bool b = glambda(3, 3.14); // OK
+
+}
+namespace test_deduction_failure {
+ int test() {
+ auto g = [](auto *a) { //expected-note{{candidate template ignored}}
+ return a;
+ };
+ struct X { };
+ X *x;
+ g(x);
+ g(3); //expected-error{{no matching function}}
+ return 0;
+ }
+
+}
+
+namespace test_instantiation_or_sfinae_failure {
+int test2() {
+ {
+ auto L = [](auto *a) {
+ return (*a)(a); }; //expected-error{{called object type 'double' is not a function}}
+ double d;
+ L(&d); //expected-note{{in instantiation of}}
+ auto M = [](auto b) { return b; };
+ L(&M); // ok
+ }
+ {
+ auto L = [](auto *a) ->decltype (a->foo()) { //expected-note2{{candidate template ignored:}}
+ return (*a)(a); };
+ double d;
+ L(&d); //expected-error{{no matching function for call}}
+ auto M = [](auto b) { return b; };
+ L(&M); //expected-error{{no matching function for call}}
+
+ }
+ return 0;
+}
+
+
+}
+
+namespace test_misc {
+auto GL = [](auto a, decltype(a) b) //expected-note{{candidate function}}
+ -> int { return a + b; };
+
+void test() {
+ struct X { };
+ GL(3, X{}); //expected-error{{no matching function}}
+}
+
+void test2() {
+ auto l = [](auto *a) -> int {
+ (*a)(a); return 0; }; //expected-error{{called object type 'double' is not a function}}
+ l(&l);
+ double d;
+ l(&d); //expected-note{{in instantiation of}}
+}
+
+}
+
+namespace nested_lambdas {
+ int test() {
+ auto L = [](auto a) {
+ return [=](auto b) {
+ return a + b;
+ };
+ };
+ }
+ auto get_lambda() {
+ return [](auto a) {
+ return a;
+ };
+ };
+
+ int test2() {
+ auto L = get_lambda();
+ L(3);
+ }
+}
+
diff --git a/test/CXX/expr/expr.unary/expr.new/p2-cxx0x.cpp b/test/CXX/expr/expr.unary/expr.new/p2-cxx0x.cpp
index 2e99b525b443..7305bd1f53e2 100644
--- a/test/CXX/expr/expr.unary/expr.new/p2-cxx0x.cpp
+++ b/test/CXX/expr/expr.unary/expr.new/p2-cxx0x.cpp
@@ -13,6 +13,8 @@ void f() {
new auto; // expected-error{{new expression for type 'auto' requires a constructor argument}}
new (const auto)(); // expected-error{{new expression for type 'const auto' requires a constructor argument}}
new (auto) (1,2,3); // expected-error{{new expression for type 'auto' contains multiple constructor arguments}}
+ new auto {1,2,3}; // expected-error{{new expression for type 'auto' cannot use list-initialization}}
+ new auto ({1,2,3}); // expected-error{{new expression for type 'auto' cannot use list-initialization}}
}
void p2example() {
diff --git a/test/CXX/expr/expr.unary/expr.unary.op/p4.cpp b/test/CXX/expr/expr.unary/expr.unary.op/p4.cpp
index cd55cc2441a2..9babf8728cc0 100644
--- a/test/CXX/expr/expr.unary/expr.unary.op/p4.cpp
+++ b/test/CXX/expr/expr.unary/expr.unary.op/p4.cpp
@@ -7,7 +7,7 @@ namespace test0 {
template<typename T> void g(T);
void test() {
- foo(&g<int>); // expected-error {{can't form member pointer of type 'void (test0::A::*)(int)' without '&' and class name}}
+ foo(&g<int>); // expected-error-re {{can't form member pointer of type 'void (test0::A::*)(int){{( __attribute__\(\(thiscall\)\))?}}' without '&' and class name}}
}
};
}
diff --git a/test/CXX/expr/expr.unary/expr.unary.op/p6.cpp b/test/CXX/expr/expr.unary/expr.unary.op/p6.cpp
index 2646264273eb..833a4014e868 100644
--- a/test/CXX/expr/expr.unary/expr.unary.op/p6.cpp
+++ b/test/CXX/expr/expr.unary/expr.unary.op/p6.cpp
@@ -15,7 +15,7 @@ bool b4 = !E;
bool b5 = !F;
// -- pointer,
-bool b6 = !&b4;
+bool b6 = !&b4; // expected-warning{{address of 'b4' will always evaluate to 'true'}}
void f();
bool b61 = !&f;
diff --git a/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3.cpp b/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3.cpp
index 35f8808fff88..d88d5beb4e99 100644
--- a/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3.cpp
+++ b/test/CXX/over/over.match/over.match.funcs/over.match.oper/p3.cpp
@@ -1,5 +1,27 @@
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
-// expected-no-diagnostics
+
+namespace bullet2 {
+
+// For non-member candidates, if no operand has a class type, only those
+// non-member functions that have a matching enumeration parameter are
+// candidates.
+
+struct B { template<typename T> B(T); };
+int operator~(B);
+template<typename T> int operator%(B, T);
+enum class E { e };
+
+template<typename T> int f(T t) { return ~t; } // expected-error {{invalid argument type}}
+template<typename T, typename U> int f(T t, U u) { return t % u; } // expected-error {{invalid operands to}}
+
+int b1 = ~E::e; // expected-error {{invalid argument type}}
+int b2 = f(E::e); // expected-note {{in instantiation of}}
+int b3 = f(0, E::e);
+int b4 = f(E::e, 0); // expected-note {{in instantiation of}}
+
+}
+
+namespace bullet3 {
// This is specifically testing the bullet:
// "do not have the same parameter-type-list as any non-template
@@ -26,4 +48,6 @@ extern bool test2;
extern decltype(a <= a) test2;
extern A test3;
-extern decltype(a <= b) test3; \ No newline at end of file
+extern decltype(a <= b) test3;
+
+}
diff --git a/test/CXX/special/class.copy/implicit-move-def.cpp b/test/CXX/special/class.copy/implicit-move-def.cpp
index 5696d1f57982..880268d55ac4 100644
--- a/test/CXX/special/class.copy/implicit-move-def.cpp
+++ b/test/CXX/special/class.copy/implicit-move-def.cpp
@@ -1,6 +1,6 @@
-// FIXME: %clang_cc1 -emit-llvm -o - -std=c++11 %s | FileCheck -check-prefix=CHECK %s
-// RUN: %clang_cc1 -emit-llvm -o - -std=c++11 %s | FileCheck -check-prefix=CHECK-ASSIGN %s
-// RUN: %clang_cc1 -emit-llvm -o - -std=c++11 %s | FileCheck -check-prefix=CHECK-CTOR %s
+// FIXME: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -o - -std=c++11 %s | FileCheck -check-prefix=CHECK %s
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -o - -std=c++11 %s | FileCheck -check-prefix=CHECK-ASSIGN %s
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -o - -std=c++11 %s | FileCheck -check-prefix=CHECK-CTOR %s
// construct
diff --git a/test/CXX/special/class.copy/implicit-move.cpp b/test/CXX/special/class.copy/implicit-move.cpp
index 23ecf2e7d95a..a10d139fe3cd 100644
--- a/test/CXX/special/class.copy/implicit-move.cpp
+++ b/test/CXX/special/class.copy/implicit-move.cpp
@@ -258,8 +258,8 @@ namespace DR1402 {
template<typename T>
struct F :
- E<T, 0>, // expected-note-re 2{{'[BD]' is a virtual base class of base class 'E<}}
- E<T, 1> {}; // expected-note-re 2{{'[BD]' is a virtual base class of base class 'E<}}
+ E<T, 0>, // expected-note-re 2{{'{{[BD]}}' is a virtual base class of base class 'E<}}
+ E<T, 1> {}; // expected-note-re 2{{'{{[BD]}}' is a virtual base class of base class 'E<}}
template<typename T>
struct G : E<T, 0, true>, E<T, 0> {};
@@ -272,11 +272,11 @@ namespace DR1402 {
template<typename T>
struct J :
- E<T, 0>, // expected-note-re 2{{'[BD]' is a virtual base class of base class 'E<}}
- virtual T {}; // expected-note-re 2{{virtual base class '[BD]' declared here}}
+ E<T, 0>, // expected-note-re 2{{'{{[BD]}}' is a virtual base class of base class 'E<}}
+ virtual T {}; // expected-note-re 2{{virtual base class '{{[BD]}}' declared here}}
template<typename T> void move(T t) { t = static_cast<T&&>(t); }
- // expected-warning-re@-1 4{{defaulted move assignment operator of .* will move assign virtual base class '[BD]' multiple times}}
+ // expected-warning-re@-1 4{{defaulted move assignment operator of {{.*}} will move assign virtual base class '{{[BD]}}' multiple times}}
template void move(F<A>);
template void move(F<B>); // expected-note {{in instantiation of}}
template void move(F<C>);
diff --git a/test/CXX/special/class.copy/p11.0x.copy.cpp b/test/CXX/special/class.copy/p11.0x.copy.cpp
index a334c50e9fda..1ca0143d0930 100644
--- a/test/CXX/special/class.copy/p11.0x.copy.cpp
+++ b/test/CXX/special/class.copy/p11.0x.copy.cpp
@@ -139,3 +139,22 @@ namespace PR13381 {
T &f();
T t = f(); // expected-error{{call to implicitly-deleted copy constructor}}
}
+
+namespace Mutable {
+ struct A {
+ A(const A &);
+ A(A &) = delete; // expected-note {{deleted here}}
+ };
+
+ struct B {
+ A a;
+ B(const B &);
+ };
+ B::B(const B &) = default;
+
+ struct C {
+ mutable A a; // expected-note {{deleted because field 'a' has a deleted copy constructor}}
+ C(const C &);
+ };
+ C::C(const C &) = default; // expected-error{{would delete}}
+}
diff --git a/test/CXX/special/class.copy/p11.0x.move.cpp b/test/CXX/special/class.copy/p11.0x.move.cpp
index 1dce27a83290..514817d2b71c 100644
--- a/test/CXX/special/class.copy/p11.0x.move.cpp
+++ b/test/CXX/special/class.copy/p11.0x.move.cpp
@@ -2,21 +2,21 @@
struct Trivial {};
struct NonTrivial {
- NonTrivial(NonTrivial&&);
+ NonTrivial(NonTrivial&&); // expected-note{{copy constructor is implicitly deleted}}
};
// A defaulted move constructor for a class X is defined as deleted if X has:
// -- a variant member with a non-trivial corresponding constructor
union DeletedNTVariant {
- NonTrivial NT;
+ NonTrivial NT; // expected-note{{deleted because variant field 'NT' has a non-trivial move constructor}}
DeletedNTVariant(DeletedNTVariant&&);
};
DeletedNTVariant::DeletedNTVariant(DeletedNTVariant&&) = default; // expected-error{{would delete}}
struct DeletedNTVariant2 {
union {
- NonTrivial NT;
+ NonTrivial NT; // expected-note{{deleted because variant field 'NT' has a non-trivial move constructor}}
};
DeletedNTVariant2(DeletedNTVariant2&&);
};
@@ -34,7 +34,7 @@ private:
};
struct HasNoAccess {
- NoAccess NA;
+ NoAccess NA; // expected-note{{deleted because field 'NA' has an inaccessible move constructor}}
HasNoAccess(HasNoAccess&&);
};
HasNoAccess::HasNoAccess(HasNoAccess&&) = default; // expected-error{{would delete}}
@@ -51,13 +51,16 @@ struct Ambiguity {
};
struct IsAmbiguous {
- Ambiguity A;
- IsAmbiguous(IsAmbiguous&&);
+ Ambiguity A; // expected-note{{deleted because field 'A' has multiple move constructors}}
+ IsAmbiguous(IsAmbiguous&&); // expected-note{{copy constructor is implicitly deleted because 'IsAmbiguous' has a user-declared move constructor}}
};
IsAmbiguous::IsAmbiguous(IsAmbiguous&&) = default; // expected-error{{would delete}}
struct Deleted {
- IsAmbiguous IA;
+ // FIXME: This diagnostic is slightly wrong: the constructor we select to move
+ // 'IA' is deleted, but we select the copy constructor (we ignore the move
+ // constructor, because it was defaulted and deleted).
+ IsAmbiguous IA; // expected-note{{deleted because field 'IA' has a deleted move constructor}}
Deleted(Deleted&&);
};
Deleted::Deleted(Deleted&&) = default; // expected-error{{would delete}}
@@ -70,12 +73,15 @@ struct ConstMember {
};
ConstMember::ConstMember(ConstMember&&) = default; // ok, calls copy ctor
struct ConstMoveOnlyMember {
- const NonTrivial cnt;
+ // FIXME: This diagnostic is slightly wrong: the constructor we select to move
+ // 'cnt' is deleted, but we select the copy constructor, because the object is
+ // const.
+ const NonTrivial cnt; // expected-note{{deleted because field 'cnt' has a deleted move constructor}}
ConstMoveOnlyMember(ConstMoveOnlyMember&&);
};
ConstMoveOnlyMember::ConstMoveOnlyMember(ConstMoveOnlyMember&&) = default; // expected-error{{would delete}}
struct VolatileMember {
- volatile Trivial vt;
+ volatile Trivial vt; // expected-note{{deleted because field 'vt' has no move constructor}}
VolatileMember(VolatileMember&&);
};
VolatileMember::VolatileMember(VolatileMember&&) = default; // expected-error{{would delete}}
@@ -83,17 +89,17 @@ VolatileMember::VolatileMember(VolatileMember&&) = default; // expected-error{{w
// -- a direct or virtual base class B that cannot be moved because overload
// resolution results in an ambiguity or a function that is deleted or
// inaccessible
-struct AmbiguousMoveBase : Ambiguity {
- AmbiguousMoveBase(AmbiguousMoveBase&&);
+struct AmbiguousMoveBase : Ambiguity { // expected-note{{deleted because base class 'Ambiguity' has multiple move constructors}}
+ AmbiguousMoveBase(AmbiguousMoveBase&&); // expected-note{{copy constructor is implicitly deleted}}
};
AmbiguousMoveBase::AmbiguousMoveBase(AmbiguousMoveBase&&) = default; // expected-error{{would delete}}
-struct DeletedMoveBase : AmbiguousMoveBase {
+struct DeletedMoveBase : AmbiguousMoveBase { // expected-note{{deleted because base class 'AmbiguousMoveBase' has a deleted move constructor}}
DeletedMoveBase(DeletedMoveBase&&);
};
DeletedMoveBase::DeletedMoveBase(DeletedMoveBase&&) = default; // expected-error{{would delete}}
-struct InaccessibleMoveBase : NoAccess {
+struct InaccessibleMoveBase : NoAccess { // expected-note{{deleted because base class 'NoAccess' has an inaccessible move constructor}}
InaccessibleMoveBase(InaccessibleMoveBase&&);
};
InaccessibleMoveBase::InaccessibleMoveBase(InaccessibleMoveBase&&) = default; // expected-error{{would delete}}
@@ -108,7 +114,7 @@ private:
};
struct HasNoAccessDtor {
- NoAccessDtor NAD;
+ NoAccessDtor NAD; // expected-note {{deleted because field 'NAD' has an inaccessible destructor}}
HasNoAccessDtor(HasNoAccessDtor&&);
};
HasNoAccessDtor::HasNoAccessDtor(HasNoAccessDtor&&) = default; // expected-error{{would delete}}
diff --git a/test/CXX/special/class.copy/p13-0x.cpp b/test/CXX/special/class.copy/p13-0x.cpp
index 5d436016a056..16c8a4029cba 100644
--- a/test/CXX/special/class.copy/p13-0x.cpp
+++ b/test/CXX/special/class.copy/p13-0x.cpp
@@ -114,3 +114,18 @@ namespace PR13052 {
friend constexpr S<W>::S(const S<W>&) noexcept;
};
}
+
+namespace Mutable {
+ struct A {
+ constexpr A(A &);
+ A(const A &);
+ };
+ struct B {
+ constexpr B(const B &) = default; // ok
+ mutable A a;
+ };
+ struct C {
+ constexpr C(const C &) = default; // expected-error {{not constexpr}}
+ A a;
+ };
+}
diff --git a/test/CXX/special/class.copy/p23-cxx11.cpp b/test/CXX/special/class.copy/p23-cxx11.cpp
index de071f050f01..ac21cc61a2c5 100644
--- a/test/CXX/special/class.copy/p23-cxx11.cpp
+++ b/test/CXX/special/class.copy/p23-cxx11.cpp
@@ -30,8 +30,8 @@ struct NonTrivialMoveAssign {
NonTrivialMoveAssign &operator=(NonTrivialMoveAssign &&);
};
struct AmbiguousCopyAssign {
- AmbiguousCopyAssign &operator=(const AmbiguousCopyAssign &);
- AmbiguousCopyAssign &operator=(volatile AmbiguousCopyAssign &);
+ AmbiguousCopyAssign &operator=(const AmbiguousCopyAssign &) volatile;
+ AmbiguousCopyAssign &operator=(const AmbiguousCopyAssign &) const;
};
struct AmbiguousMoveAssign {
AmbiguousMoveAssign &operator=(const AmbiguousMoveAssign &&);
@@ -174,3 +174,18 @@ namespace PR13381 {
t = T(); // expected-error{{object of type 'PR13381::T' cannot be assigned because its copy assignment operator is implicitly deleted}}
}
}
+
+namespace Mutable {
+ struct AmbiguousCopyAssign {
+ AmbiguousCopyAssign &operator=(const AmbiguousCopyAssign &);
+ AmbiguousCopyAssign &operator=(volatile AmbiguousCopyAssign &);
+ };
+ struct X {
+ AmbiguousCopyAssign a;
+ };
+ struct Y {
+ mutable AmbiguousCopyAssign a; // expected-note {{multiple copy assignment operators}}
+ };
+}
+template struct CopyAssign<Mutable::X>;
+template struct CopyAssign<Mutable::Y>; // expected-note {{here}}
diff --git a/test/CXX/special/class.copy/p33-0x.cpp b/test/CXX/special/class.copy/p33-0x.cpp
index b66e19ab4c4f..28cd4f33a8aa 100644
--- a/test/CXX/special/class.copy/p33-0x.cpp
+++ b/test/CXX/special/class.copy/p33-0x.cpp
@@ -27,7 +27,7 @@ namespace PR10142 {
struct X {
X();
X(X&&);
- X(const X&) = delete; // expected-note 2{{function has been explicitly marked deleted here}}
+ X(const X&) = delete; // expected-note 2{{'X' has been explicitly marked deleted here}}
};
void f(int i) {
diff --git a/test/CXX/special/class.dtor/p10-0x.cpp b/test/CXX/special/class.dtor/p10-0x.cpp
index e10afb52e2b4..029cbd6cebb5 100644
--- a/test/CXX/special/class.dtor/p10-0x.cpp
+++ b/test/CXX/special/class.dtor/p10-0x.cpp
@@ -7,7 +7,7 @@ template<typename T>
void b(const T *x, const A *y) {
x->~decltype(T())();
x->~decltype(*x)(); // expected-error{{the type of object expression ('const int') does not match the type being destroyed ('decltype(*x)' (aka 'const int &')) in pseudo-destructor expression}} \
- expected-error{{no member named '~const struct A &' in 'A'}}
+ expected-error{{no member named '~const A &' in 'A'}}
x->~decltype(int())(); // expected-error{{no member named '~int' in 'A'}}
y->~decltype(*y)(); // expected-error{{destructor type 'decltype(*y)' (aka 'const A &') in object destruction expression does not match the type 'const A' of the object being destroyed}}
diff --git a/test/CXX/special/class.dtor/p3-0x.cpp b/test/CXX/special/class.dtor/p3-0x.cpp
index dc76e0030820..2d7eba490bc8 100644
--- a/test/CXX/special/class.dtor/p3-0x.cpp
+++ b/test/CXX/special/class.dtor/p3-0x.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck %s
struct A {
~A();
diff --git a/test/CXX/special/class.dtor/p9.cpp b/test/CXX/special/class.dtor/p9.cpp
index 8b76a15078b7..a03fcdb24952 100644
--- a/test/CXX/special/class.dtor/p9.cpp
+++ b/test/CXX/special/class.dtor/p9.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -triple %itanium_abi_triple -verify %s
+// RUN: %clang_cc1 -fsyntax-only -triple %ms_abi_triple -DMSABI -verify %s
typedef typeof(sizeof(int)) size_t;
@@ -74,7 +75,13 @@ namespace test2 {
// PR7346
namespace test3 {
struct A {
+#ifdef MSABI
+ // expected-error@+2 {{no suitable member 'operator delete' in 'A'}}
+#endif
virtual ~A();
+#ifdef MSABI
+ // expected-note@+2 {{declared here}}
+#endif
static void operator delete(void*, const int &);
};
diff --git a/test/CXX/special/class.inhctor/elsewhere.cpp b/test/CXX/special/class.inhctor/elsewhere.cpp
index b986f6582495..c042834b2147 100644
--- a/test/CXX/special/class.inhctor/elsewhere.cpp
+++ b/test/CXX/special/class.inhctor/elsewhere.cpp
@@ -9,7 +9,7 @@ struct B1 {
B1(int);
};
-using B1::B1; // expected-error {{using declaration can not refer to class member}}
+using B1::B1; // expected-error {{using declaration cannot refer to class member}}
// C++11 [namespace.udecl]p10:
// A using-declaration is a declaration and can therefore be used repeatedly
@@ -27,7 +27,7 @@ struct I1 : B1 {
// shall name a direct base class of the class being defined.
struct D1 : I1 {
- using B1::B1; // expected-error {{'B1' is not a direct base of 'D1', can not inherit constructors}}
+ using B1::B1; // expected-error {{'B1' is not a direct base of 'D1', cannot inherit constructors}}
};
template<typename T> struct A {};
@@ -47,7 +47,7 @@ C<char> cc; // expected-note {{here}}
template<typename T> struct D : A<T> {};
template<typename T> struct E : D<T> {
- using A<bool>::A; // expected-error {{'A<bool>' is not a direct base of 'E<bool>', can not inherit}}
+ using A<bool>::A; // expected-error {{'A<bool>' is not a direct base of 'E<bool>', cannot inherit}}
};
E<bool> eb; // expected-note {{here}}
diff --git a/test/CXX/special/class.inhctor/p4.cpp b/test/CXX/special/class.inhctor/p4.cpp
index 356cdef687fb..ae1f7a57031f 100644
--- a/test/CXX/special/class.inhctor/p4.cpp
+++ b/test/CXX/special/class.inhctor/p4.cpp
@@ -43,8 +43,8 @@ FA fa2{X<2>{}}; // expected-error {{calling a private constructor}}
// It is deleted if the corresponding constructor [...] is deleted.
struct G {
- G(int) = delete; // expected-note {{function has been explicitly marked deleted here}}
- template<typename T> G(T*) = delete; // expected-note {{function has been explicitly marked deleted here}}
+ G(int) = delete; // expected-note {{'G' has been explicitly marked deleted here}}
+ template<typename T> G(T*) = delete; // expected-note {{'G<const char>' has been explicitly marked deleted here}}
};
struct H : G {
using G::G; // expected-note 2{{deleted constructor was inherited here}}
diff --git a/test/CXX/special/class.init/class.base.init/p8-0x.cpp b/test/CXX/special/class.init/class.base.init/p8-0x.cpp
index a108533beddb..45755caa8ecb 100644
--- a/test/CXX/special/class.init/class.base.init/p8-0x.cpp
+++ b/test/CXX/special/class.init/class.base.init/p8-0x.cpp
@@ -16,16 +16,13 @@ struct S {
} s(0);
union U {
- int a = 0; // desired-note 5 {{previous initialization is here}}
- char b = 'x';
+ int a = 0; // expected-note {{previous initialization}}
+ char b = 'x'; // expected-error {{initializing multiple members of union}}
- // FIXME: these should all be rejected
- U() {} // desired-error {{initializing multiple members of union}}
- U(int) : a(1) {} // desired-error {{initializing multiple members of union}}
- U(char) : b('y') {} // desired-error {{initializing multiple members of union}}
- // this expected note should be removed & the note should appear on the
- // declaration of 'a' when this set of cases is handled correctly.
- U(double) : a(1), // expected-note{{previous initialization is here}} desired-error {{initializing multiple members of union}}
+ U() {}
+ U(int) : a(1) {}
+ U(char) : b('y') {}
+ U(double) : a(1), // expected-note{{previous initialization is here}}
b('y') {} // expected-error{{initializing multiple members of union}}
};
diff --git a/test/CXX/special/class.temporary/p1.cpp b/test/CXX/special/class.temporary/p1.cpp
index 4f6ac0a0029e..75a56df1e9c3 100644
--- a/test/CXX/special/class.temporary/p1.cpp
+++ b/test/CXX/special/class.temporary/p1.cpp
@@ -6,7 +6,7 @@ namespace test0 {
int x;
int y;
- A(const A&) = delete; // expected-note {{function has been explicitly marked deleted here}}
+ A(const A&) = delete; // expected-note {{'A' has been explicitly marked deleted here}}
};
void foo(...);
diff --git a/test/CXX/temp/p3.cpp b/test/CXX/temp/p3.cpp
index 11f72de918cb..e9fd8a3090e8 100644
--- a/test/CXX/temp/p3.cpp
+++ b/test/CXX/temp/p3.cpp
@@ -8,7 +8,8 @@ template<typename T> int S<T>::a, S<T>::b; // expected-error {{can only declare
template<typename T> struct A { static A a; } A<T>::a; // expected-error {{expected ';' after struct}} \
expected-error {{use of undeclared identifier 'T'}} \
- expected-error{{extra qualification}}
+ expected-error {{no member named 'a'}} \
+ expected-warning {{extra qualification}}
template<typename T> struct B { } f(); // expected-error {{expected ';' after struct}} \
expected-error {{requires a type specifier}}
diff --git a/test/CXX/temp/temp.arg/temp.arg.nontype/p5.cpp b/test/CXX/temp/temp.arg/temp.arg.nontype/p5.cpp
index 9b9b532ff134..e87153b9efe2 100644
--- a/test/CXX/temp/temp.arg/temp.arg.nontype/p5.cpp
+++ b/test/CXX/temp/temp.arg/temp.arg.nontype/p5.cpp
@@ -184,7 +184,7 @@ namespace pointer_to_member_function {
template<int (Y::*)(int)> struct X0 {}; // expected-note{{template parameter is declared here}}
X0<&Y::f> x0a;
X0<&Y::g> x0b;
- X0<&Y::h> x0c; // expected-error{{non-type template argument of type 'float (pointer_to_member_function::Y::*)(float)' cannot be converted to a value of type 'int (pointer_to_member_function::Y::*)(int)'}}
+ X0<&Y::h> x0c; // expected-error-re{{non-type template argument of type 'float (pointer_to_member_function::Y::*)(float){{( __attribute__\(\(thiscall\)\))?}}' cannot be converted to a value of type 'int (pointer_to_member_function::Y::*)(int){{( __attribute__\(\(thiscall\)\))?}}'}}
}
// -- For a non-type template-parameter of type pointer to data member,
diff --git a/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp b/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp
index a49db5166a45..2651f9942091 100644
--- a/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp
+++ b/test/CXX/temp/temp.decls/temp.class.spec/p8-1y.cpp
@@ -21,10 +21,10 @@ template<template<typename> class...X> int v4<X...>;
template<typename Outer> struct X {
template<typename Inner> static int y;
- template<typename Inner> static int y<Outer>; // expected-warning {{can not be deduced}} expected-note {{'Inner'}}
+ template<typename Inner> static int y<Outer>; // expected-warning {{cannot be deduced}} expected-note {{'Inner'}}
template<typename Inner> static int y<Inner>; // expected-error {{does not specialize}}
};
-template<typename Outer> template<typename Inner> int X<Outer>::y<Outer>; // expected-warning {{can not be deduced}} expected-note {{'Inner'}}
+template<typename Outer> template<typename Inner> int X<Outer>::y<Outer>; // expected-warning {{cannot be deduced}} expected-note {{'Inner'}}
template<typename Outer> template<typename Inner> int X<Outer>::y<Inner>; // expected-error {{does not specialize}}
// FIXME: Merging this with the above class causes an assertion failure when
diff --git a/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p3-0x.cpp b/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p3-0x.cpp
deleted file mode 100644
index 60c60cb0b28d..000000000000
--- a/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p3-0x.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
-// expected-no-diagnostics
-
-// Core DR 532.
-namespace PR8130 {
- struct A { };
-
- template<class T> struct B {
- template<class R> int &operator*(R&);
- };
-
- template<class T, class R> float &operator*(T&, R&);
- void test() {
- A a;
- B<A> b;
- int &ir = b * a;
- }
-}
-
-namespace OperatorWithRefQualifier {
- struct A { };
- template<class T> struct B {
- template<class R> int &operator*(R&) &&;
- };
-
- template<class T, class R> float &operator*(T&&, R&);
- void test() {
- A a;
- B<A> b;
- float &ir = b * a;
- int &ir2 = B<A>() * a;
- }
-}
-
-namespace OrderWithStaticMember {
- struct A {
- template<class T> int g(T**, int=0) { return 0; }
- template<class T> static int g(T*) { return 1; }
- };
- void f() {
- A a;
- int **p;
- a.g(p);
- }
-}
-
-namespace PR17075 {
- template <typename T> struct V {};
- struct S { template<typename T> S &operator>>(T &t) = delete; };
- template<typename T> S &operator>>(S &s, V<T> &v);
- void f(S s, V<int> v) { s >> v; }
-}
diff --git a/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p3.cpp b/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p3.cpp
index 8212a125be60..db3952a388c2 100644
--- a/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p3.cpp
+++ b/test/CXX/temp/temp.decls/temp.fct/temp.func.order/p3.cpp
@@ -1,21 +1,7 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
// expected-no-diagnostics
-namespace DeduceVsMember {
- template<typename T>
- struct X {
- template<typename U>
- int &operator==(const U& other) const;
- };
-
- template<typename T, typename U>
- float &operator==(const T&, const X<U>&);
-
- void test(X<int> xi, X<float> xf) {
- float& ir = (xi == xf);
- }
-}
-
namespace OrderWithStaticMember {
struct A {
template<class T> int g(T**, int=0) { return 0; }
@@ -27,3 +13,27 @@ namespace OrderWithStaticMember {
a.g(p);
}
}
+
+#if __cplusplus >= 201103L
+namespace OperatorWithRefQualifier {
+ struct A { };
+ template<class T> struct B {
+ template<class R> int &operator*(R&) &&;
+ };
+
+ template<class T, class R> float &operator*(T&&, R&);
+ void test() {
+ A a;
+ B<A> b;
+ float &ir = b * a;
+ int &ir2 = B<A>() * a;
+ }
+}
+
+namespace PR17075 {
+ template <typename T> struct V {};
+ struct S { template<typename T> S &operator>>(T &t) = delete; };
+ template<typename T> S &operator>>(S &s, V<T> &v);
+ void f(S s, V<int> v) { s >> v; }
+}
+#endif
diff --git a/test/CXX/temp/temp.decls/temp.mem/p3.cpp b/test/CXX/temp/temp.decls/temp.mem/p3.cpp
index 0eb747be207d..7e13f2a58ba0 100644
--- a/test/CXX/temp/temp.decls/temp.mem/p3.cpp
+++ b/test/CXX/temp/temp.decls/temp.mem/p3.cpp
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
template <class T> struct AA {
- template <class C> virtual void g(C); // expected-error{{'virtual' can not be specified on member function templates}}
+ template <class C> virtual void g(C); // expected-error{{'virtual' cannot be specified on member function templates}}
virtual void f();
};
diff --git a/test/CXX/temp/temp.decls/temp.variadic/fixed-expansion.cpp b/test/CXX/temp/temp.decls/temp.variadic/fixed-expansion.cpp
index fb727543efa5..a466be0a61de 100644
--- a/test/CXX/temp/temp.decls/temp.variadic/fixed-expansion.cpp
+++ b/test/CXX/temp/temp.decls/temp.variadic/fixed-expansion.cpp
@@ -121,7 +121,16 @@ namespace PartialSpecialization {
namespace FixedAliasTemplate {
template<typename,typename,typename> struct S {};
- template<typename T, typename U> using U = S<T, int, U>;
- template<typename...Ts> U<Ts...> &f(U<Ts...>, Ts...);
- S<int, int, double> &s1 = f({}, 0, 0.0);
+ template<typename T, typename U> using U = S<T, int, U>; // expected-note 2{{template parameter is declared here}}
+ template<typename...Ts> U<Ts...> &f(U<Ts...>, Ts...); // expected-error 2{{pack expansion used as argument for non-pack parameter of alias template}}
+ S<int, int, double> &s1 = f({}, 0, 0.0); // expected-error {{no matching function}}
+}
+
+namespace PR18401 {
+ template<typename... Args> struct foo { };
+ template<typename T, typename... Args> using bar = foo<T, Args...>; // expected-note 2{{template parameter is declared here}} expected-note {{'bar' declared here}}
+ template<typename T, typename... Args> using baz = bar<Args..., T>; // expected-error {{pack expansion used as argument for non-pack parameter of alias template}}
+ // FIXME: We should still record the alias template, but mark it as invalid.
+ template<typename...T> void f(baz<T...>); // expected-error {{no template named 'baz'; did you mean 'bar'}} expected-error {{pack expansion used as argument for non-pack}}
+ void g() { f(foo<int, char, double>()); } // expected-error {{no matching function}}
}
diff --git a/test/CXX/temp/temp.decls/temp.variadic/p5.cpp b/test/CXX/temp/temp.decls/temp.variadic/p5.cpp
index 3681d7757e94..dae686566691 100644
--- a/test/CXX/temp/temp.decls/temp.variadic/p5.cpp
+++ b/test/CXX/temp/temp.decls/temp.variadic/p5.cpp
@@ -310,10 +310,10 @@ void test_unexpanded_exprs(Types ...values) {
t.~Types(); // expected-error{{expression contains unexpanded parameter pack 'Types'}}
t.Types::~T(); // expected-error{{expression contains unexpanded parameter pack 'Types'}}
- // UnaryTypeTraitExpr
+ // Unary TypeTraitExpr
__is_pod(Types); // expected-error{{expression contains unexpanded parameter pack 'Types'}}
- // BinaryTypeTraitExpr
+ // Binary TypeTraitExpr
__is_base_of(Types, T); // expected-error{{expression contains unexpanded parameter pack 'Types'}}
__is_base_of(T, Types); // expected-error{{expression contains unexpanded parameter pack 'Types'}}
diff --git a/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p9-0x.cpp b/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p9-0x.cpp
index d7989e305f02..782057d397b9 100644
--- a/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p9-0x.cpp
+++ b/test/CXX/temp/temp.fct.spec/temp.deduct/temp.deduct.type/p9-0x.cpp
@@ -32,7 +32,7 @@ namespace PackExpansionNotAtEnd {
template<typename ... Types, // expected-note{{non-deducible template parameter 'Types'}}
typename Tail> // expected-note{{non-deducible template parameter 'Tail'}}
- struct UselessPartialSpec<Types..., Tail>; // expected-warning{{class template partial specialization contains template parameters that can not be deduced; this partial specialization will never be used}}
+ struct UselessPartialSpec<Types..., Tail>; // expected-warning{{class template partial specialization contains template parameters that cannot be deduced; this partial specialization will never be used}}
}
namespace DeduceNonTypeTemplateArgsInArray {
diff --git a/test/CXX/temp/temp.param/p14.cpp b/test/CXX/temp/temp.param/p14.cpp
deleted file mode 100644
index a6c53c1e64a6..000000000000
--- a/test/CXX/temp/temp.param/p14.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
-// XFAIL: *
-
-// A template-parameter shall not be used in its own default argument.
-template<typename T = typename T::type> struct X; // expected-error{{default}}
diff --git a/test/CXX/temp/temp.res/temp.local/p3.cpp b/test/CXX/temp/temp.res/temp.local/p3.cpp
index 54da8856fe46..e29ced19bc4f 100644
--- a/test/CXX/temp/temp.res/temp.local/p3.cpp
+++ b/test/CXX/temp/temp.res/temp.local/p3.cpp
@@ -15,7 +15,7 @@ template <class T> struct Derived: Base<int>, Base<char> {
t->Base<T>::f();
t->Base::f(); // expected-error{{member 'Base' found in multiple base classes of different types}} \
// expected-error{{no member named 'f' in 'X0'}} \
- // expected-error{{expected a class or namespace}}
+ // expected-error{{'Base' is not a class, namespace, or scoped enumeration}}
}
};
diff --git a/test/CXX/temp/temp.spec/cxx1y-variable-template-no-body.cpp b/test/CXX/temp/temp.spec/cxx1y-variable-template-no-body.cpp
index 93f8ff1697bf..7eb5e3744d18 100644
--- a/test/CXX/temp/temp.spec/cxx1y-variable-template-no-body.cpp
+++ b/test/CXX/temp/temp.spec/cxx1y-variable-template-no-body.cpp
@@ -24,14 +24,14 @@ template int pi0 = 10; // expected-error {{variable cannot be defined in an expl
#endif
template<typename T>
-T pi1 = T(3.1415926535897932385);
+T pi1 = T(3.1415926535897932385); // expected-note 0-2 {{here}}
// Should recover as if specialization
template float pi1<float> = 1.0; // expected-error {{explicit template instantiation cannot have a definition; if this definition is meant to be an explicit specialization, add '<>' after the 'template' keyword}}
#ifndef FIXING
namespace expected_global {
- template<> double pi1<double> = 1.5; // expected-error {{no variable template matches specialization}}
+ template<> double pi1<double> = 1.5; // expected-error {{variable template specialization of 'pi1' must originally be declared in the global scope}}
template int pi1<int> = 10; // expected-error {{explicit template instantiation cannot have a definition; if this definition is meant to be an explicit specialization, add '<>' after the 'template' keyword}} \
- expected-error {{no variable template matches specialization}}
+ expected-error {{variable template specialization of 'pi1' must originally be declared in the global scope}}
}
#endif
diff --git a/test/CXX/temp/temp.spec/no-body.cpp b/test/CXX/temp/temp.spec/no-body.cpp
index a4d7914d9eb6..61d285b27ed2 100644
--- a/test/CXX/temp/temp.spec/no-body.cpp
+++ b/test/CXX/temp/temp.spec/no-body.cpp
@@ -37,7 +37,7 @@ namespace noargs_body {
namespace exp_spec {
#ifndef FIXING
template<> void f0<int>(int) { } // expected-error {{no function template matches function template specialization 'f0'}}
- template<> struct x0<int> { }; // expected-error {{class template specialization of 'x0' must originally be declared in the global scope}}
+ template<> struct x0<int> { }; // expected-error {{class template specialization of 'x0' must occur at global scope}}
#endif
}
@@ -51,7 +51,7 @@ namespace args_bad {
template void f1<int>(int) { } // expected-error {{explicit template instantiation cannot have a definition; if this definition is meant to be an explicit specialization, add '<>' after the 'template' keyword}} \
expected-error {{no function template matches function template specialization 'f1'}}
template struct x1<int> { }; // expected-error {{explicit template instantiation cannot have a definition; if this definition is meant to be an explicit specialization, add '<>' after the 'template' keyword}} \
- expected-error {{class template specialization of 'x1' must originally be declared in the global scope}}
+ expected-error {{class template specialization of 'x1' must occur at global scope}}
#endif
}
diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp
index 75b198e47d13..d0e24f547723 100644
--- a/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp
+++ b/test/CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s -Wno-c++1y-extensions
// This test creates cases where implicit instantiations of various entities
// would cause a diagnostic, but provides expliict specializations for those
@@ -10,6 +10,8 @@ struct NonDefaultConstructible {
NonDefaultConstructible(int);
};
+// FIXME: The "must originally be declared in namespace" diagnostics throughout
+// this file are wrong.
// C++ [temp.expl.spec]p1:
// An explicit specialization of any of the following:
@@ -79,7 +81,7 @@ template<> struct N0::X0<void> { };
N0::X0<void> test_X0;
namespace N1 {
- template<> struct N0::X0<const void> { }; // expected-error{{class template specialization of 'X0' must originally be declared in namespace 'N0'}}
+ template<> struct N0::X0<const void> { }; // expected-error{{class template specialization of 'X0' not in a namespace enclosing 'N0'}}
}
namespace N0 {
@@ -90,6 +92,44 @@ template<> struct N0::X0<volatile void> {
void f1(void *);
};
+// -- variable template [C++1y]
+namespace N0 {
+template<typename T> int v0; // expected-note +{{here}}
+template<> extern int v0<char[1]>;
+template<> extern int v0<char[2]>;
+template<> extern int v0<char[5]>;
+template<> extern int v0<char[6]>;
+}
+using N0::v0;
+
+template<typename T> int v1; // expected-note +{{here}}
+template<> extern int v1<char[3]>;
+template<> extern int v1<char[4]>;
+template<> extern int v1<char[7]>;
+template<> extern int v1<char[8]>;
+
+template<> int N0::v0<int[1]>;
+template<> int v0<int[2]>; // FIXME: ill-formed
+template<> int ::v1<int[3]>; // expected-warning {{extra qualification}}
+template<> int v1<int[4]>;
+
+template<> int N0::v0<char[1]>;
+template<> int v0<char[2]>; // FIXME: ill-formed
+template<> int ::v1<char[3]>; // expected-warning {{extra qualification}}
+template<> int v1<char[4]>;
+
+namespace N1 {
+template<> int N0::v0<int[5]>; // expected-error {{must originally be declared in namespace 'N0'}} expected-error {{does not enclose namespace}}
+template<> int v0<int[6]>; // expected-error {{must originally be declared in namespace 'N0'}}
+template<> int ::v1<int[7]>; // expected-error {{must originally be declared in the global scope}} expected-error {{cannot name the global scope}}
+template<> int v1<int[8]>; // expected-error {{must originally be declared in the global scope}}
+
+template<> int N0::v0<char[5]>; // expected-error {{does not enclose namespace 'N0'}}
+template<> int v0<char[6]>; // FIXME: ill-formed
+template<> int ::v1<char[7]>; // expected-error {{cannot name the global scope}}
+template<> int v1<char[8]>; // FIXME: ill-formed
+}
+
// -- member function of a class template
template<> void N0::X0<void*>::f1(void *) { }
diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp
index c972bf7c7d0a..4fbc45a7d7dd 100644
--- a/test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp
+++ b/test/CXX/temp/temp.spec/temp.expl.spec/p2.cpp
@@ -80,7 +80,7 @@ template<> struct N0::X0<void> { }; // expected-warning{{C++11 extension}}
N0::X0<void> test_X0;
namespace N1 {
- template<> struct N0::X0<const void> { }; // expected-error{{originally}}
+ template<> struct N0::X0<const void> { }; // expected-error{{not in a namespace enclosing 'N0'}}
}
namespace N0 {
diff --git a/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp b/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp
index d0df305941d9..24f68a094e54 100644
--- a/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp
+++ b/test/CXX/temp/temp.spec/temp.explicit/p1-emit.cpp
@@ -20,8 +20,8 @@ template int X<int>::member2;
// For implicit instantiation of
long& get(bool Cond1, bool Cond2) {
- // CHECK: @_ZN1XIlE7member1E = weak_odr global i64 0
- // CHECK: @_ZN1XIlE7member2E = weak_odr global i64 17
+ // CHECK: @_ZN1XIlE7member1E = linkonce_odr global i64 0
+ // CHECK: @_ZN1XIlE7member2E = linkonce_odr global i64 17
// CHECK: @_ZN1XIlE7member3E = external global i64
return Cond1? X<long>::member1
: Cond2? X<long>::member2
diff --git a/test/CodeCompletion/objc-message.mm b/test/CodeCompletion/objc-message.mm
new file mode 100644
index 000000000000..352a18e0da97
--- /dev/null
+++ b/test/CodeCompletion/objc-message.mm
@@ -0,0 +1,46 @@
+// Note: the run lines follow their respective tests, since line/column
+// matter in this test.
+
+@protocol FooTestProtocol
++ protocolClassMethod;
+- protocolInstanceMethod;
+@end
+@interface Foo <FooTestProtocol> {
+ void *isa;
+}
++ (int)classMethod1:a withKeyword:b;
++ (void)classMethod2;
++ new;
+- instanceMethod1;
+@end
+
+@interface Foo (FooTestCategory)
++ categoryClassMethod;
+- categoryInstanceMethod;
+@end
+
+template<typename T> struct RetainPtr {
+ template <typename U> struct RemovePointer { typedef U Type; };
+ template <typename U> struct RemovePointer<U*> { typedef U Type; };
+
+ typedef typename RemovePointer<T>::Type* PtrType;
+
+ explicit operator PtrType() const;
+};
+
+void func(const RetainPtr<Foo>& ptr)
+{
+ [ptr instanceMethod1];
+}
+
+void func(const RetainPtr<id <FooTestProtocol>>& ptr)
+{
+ [ptr instanceMethod1];
+}
+
+// RUN: %clang_cc1 -fsyntax-only -std=c++11 -code-completion-at=%s:33:7 %s -o - | FileCheck -check-prefix=CHECK-CC1 %s
+// CHECK-CC1: categoryInstanceMethod : [#id#]categoryInstanceMethod
+// CHECK-CC1: instanceMethod1 : [#id#]instanceMethod1
+// CHECK-CC1: protocolInstanceMethod : [#id#]protocolInstanceMethod
+// RUN: %clang_cc1 -fsyntax-only -std=c++11 -code-completion-at=%s:38:7 %s -o - | FileCheck -check-prefix=CHECK-CC2 %s
+// CHECK-CC2: protocolInstanceMethod : [#id#]protocolInstanceMethod
diff --git a/test/CodeGen/2007-06-18-SextAttrAggregate.c b/test/CodeGen/2007-06-18-SextAttrAggregate.c
index f54895143548..92171e2bd9b7 100644
--- a/test/CodeGen/2007-06-18-SextAttrAggregate.c
+++ b/test/CodeGen/2007-06-18-SextAttrAggregate.c
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 %s -o - -emit-llvm | FileCheck %s
-// XFAIL: aarch64
+// XFAIL: aarch64, arm64
// PR1513
diff --git a/test/CodeGen/2009-02-13-zerosize-union-field-ppc.c b/test/CodeGen/2009-02-13-zerosize-union-field-ppc.c
index 2bcc7c3933ff..eabf46386db0 100644
--- a/test/CodeGen/2009-02-13-zerosize-union-field-ppc.c
+++ b/test/CodeGen/2009-02-13-zerosize-union-field-ppc.c
@@ -1,4 +1,4 @@
-// REQUIRES: ppc32-registered-target
+// REQUIRES: powerpc-registered-target
// RUN: %clang_cc1 %s -triple powerpc-pc-linux -emit-llvm -o - | grep {i32 32} | count 3
// XFAIL: *
// Every printf has 'i32 0' for the GEP of the string; no point counting those.
diff --git a/test/CodeGen/2010-01-13-MemBarrier.c b/test/CodeGen/2010-01-13-MemBarrier.c
index c2b0acdab3cb..74d0cb054e73 100644
--- a/test/CodeGen/2010-01-13-MemBarrier.c
+++ b/test/CodeGen/2010-01-13-MemBarrier.c
@@ -1,5 +1,4 @@
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
-// XFAIL: sparc
// rdar://7536390
typedef unsigned __INT32_TYPE__ uint32_t;
diff --git a/test/CodeGen/2010-06-17-asmcrash.c b/test/CodeGen/2010-06-17-asmcrash.c
index 1b5efd3cfeb1..048e42966127 100644
--- a/test/CodeGen/2010-06-17-asmcrash.c
+++ b/test/CodeGen/2010-06-17-asmcrash.c
@@ -1,5 +1,6 @@
-// REQUIRES: x86-64-registered-target
-// RUN: %clang_cc1 -triple x86_64-unknown-unknown -O1 -S -o - %s | FileCheck %s
+// REQUIRES: x86-registered-target
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -O1 -no-integrated-as \
+// RUN: -S -o - %s | FileCheck %s
typedef long long int64_t;
typedef unsigned char uint8_t;
diff --git a/test/CodeGen/Atomics.c b/test/CodeGen/Atomics.c
index 5798dfff46b1..684f36d40440 100644
--- a/test/CodeGen/Atomics.c
+++ b/test/CodeGen/Atomics.c
@@ -160,23 +160,70 @@ void test_op_and_fetch (void)
void test_compare_and_swap (void)
{
- sc = __sync_val_compare_and_swap (&sc, uc, sc); // CHECK: cmpxchg i8
- uc = __sync_val_compare_and_swap (&uc, uc, sc); // CHECK: cmpxchg i8
- ss = __sync_val_compare_and_swap (&ss, uc, sc); // CHECK: cmpxchg i16
- us = __sync_val_compare_and_swap (&us, uc, sc); // CHECK: cmpxchg i16
- si = __sync_val_compare_and_swap (&si, uc, sc); // CHECK: cmpxchg i32
- ui = __sync_val_compare_and_swap (&ui, uc, sc); // CHECK: cmpxchg i32
- sll = __sync_val_compare_and_swap (&sll, uc, sc); // CHECK: cmpxchg i64
- ull = __sync_val_compare_and_swap (&ull, uc, sc); // CHECK: cmpxchg i64
-
- ui = __sync_bool_compare_and_swap (&sc, uc, sc); // CHECK: cmpxchg
- ui = __sync_bool_compare_and_swap (&uc, uc, sc); // CHECK: cmpxchg
- ui = __sync_bool_compare_and_swap (&ss, uc, sc); // CHECK: cmpxchg
- ui = __sync_bool_compare_and_swap (&us, uc, sc); // CHECK: cmpxchg
- ui = __sync_bool_compare_and_swap (&si, uc, sc); // CHECK: cmpxchg
- ui = __sync_bool_compare_and_swap (&ui, uc, sc); // CHECK: cmpxchg
- ui = __sync_bool_compare_and_swap (&sll, uc, sc); // CHECK: cmpxchg
- ui = __sync_bool_compare_and_swap (&ull, uc, sc); // CHECK: cmpxchg
+ sc = __sync_val_compare_and_swap (&sc, uc, sc);
+ // CHECK: [[PAIR:%[a-z0-9._]+]] = cmpxchg i8
+ // CHECK: extractvalue { i8, i1 } [[PAIR]], 0
+
+ uc = __sync_val_compare_and_swap (&uc, uc, sc);
+ // CHECK: [[PAIR:%[a-z0-9._]+]] = cmpxchg i8
+ // CHECK: extractvalue { i8, i1 } [[PAIR]], 0
+
+ ss = __sync_val_compare_and_swap (&ss, uc, sc);
+ // CHECK: [[PAIR:%[a-z0-9._]+]] = cmpxchg i16
+ // CHECK: extractvalue { i16, i1 } [[PAIR]], 0
+
+ us = __sync_val_compare_and_swap (&us, uc, sc);
+ // CHECK: [[PAIR:%[a-z0-9._]+]] = cmpxchg i16
+ // CHECK: extractvalue { i16, i1 } [[PAIR]], 0
+
+ si = __sync_val_compare_and_swap (&si, uc, sc);
+ // CHECK: [[PAIR:%[a-z0-9._]+]] = cmpxchg i32
+ // CHECK: extractvalue { i32, i1 } [[PAIR]], 0
+
+ ui = __sync_val_compare_and_swap (&ui, uc, sc);
+ // CHECK: [[PAIR:%[a-z0-9._]+]] = cmpxchg i32
+ // CHECK: extractvalue { i32, i1 } [[PAIR]], 0
+
+ sll = __sync_val_compare_and_swap (&sll, uc, sc);
+ // CHECK: [[PAIR:%[a-z0-9._]+]] = cmpxchg i64
+ // CHECK: extractvalue { i64, i1 } [[PAIR]], 0
+
+ ull = __sync_val_compare_and_swap (&ull, uc, sc);
+ // CHECK: [[PAIR:%[a-z0-9._]+]] = cmpxchg i64
+ // CHECK: extractvalue { i64, i1 } [[PAIR]], 0
+
+
+ ui = __sync_bool_compare_and_swap (&sc, uc, sc);
+ // CHECK: [[PAIR:%[a-z0-9._]+]] = cmpxchg i8
+ // CHECK: extractvalue { i8, i1 } [[PAIR]], 1
+
+ ui = __sync_bool_compare_and_swap (&uc, uc, sc);
+ // CHECK: [[PAIR:%[a-z0-9._]+]] = cmpxchg i8
+ // CHECK: extractvalue { i8, i1 } [[PAIR]], 1
+
+ ui = __sync_bool_compare_and_swap (&ss, uc, sc);
+ // CHECK: [[PAIR:%[a-z0-9._]+]] = cmpxchg i16
+ // CHECK: extractvalue { i16, i1 } [[PAIR]], 1
+
+ ui = __sync_bool_compare_and_swap (&us, uc, sc);
+ // CHECK: [[PAIR:%[a-z0-9._]+]] = cmpxchg i16
+ // CHECK: extractvalue { i16, i1 } [[PAIR]], 1
+
+ ui = __sync_bool_compare_and_swap (&si, uc, sc);
+ // CHECK: [[PAIR:%[a-z0-9._]+]] = cmpxchg i32
+ // CHECK: extractvalue { i32, i1 } [[PAIR]], 1
+
+ ui = __sync_bool_compare_and_swap (&ui, uc, sc);
+ // CHECK: [[PAIR:%[a-z0-9._]+]] = cmpxchg i32
+ // CHECK: extractvalue { i32, i1 } [[PAIR]], 1
+
+ ui = __sync_bool_compare_and_swap (&sll, uc, sc);
+ // CHECK: [[PAIR:%[a-z0-9._]+]] = cmpxchg i64
+ // CHECK: extractvalue { i64, i1 } [[PAIR]], 1
+
+ ui = __sync_bool_compare_and_swap (&ull, uc, sc);
+ // CHECK: [[PAIR:%[a-z0-9._]+]] = cmpxchg i64
+ // CHECK: extractvalue { i64, i1 } [[PAIR]], 1
}
void test_lock (void)
diff --git a/test/CodeGen/PR4611-bitfield-layout.c b/test/CodeGen/PR4611-bitfield-layout.c
index a383f341c437..4f9abea09d7e 100644
--- a/test/CodeGen/PR4611-bitfield-layout.c
+++ b/test/CodeGen/PR4611-bitfield-layout.c
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -o - | FileCheck %s
//
-// CHECK: struct.object_entry = type { [4 x i8] }
+// CHECK: struct.object_entry = type { i32 }
struct object_entry {
unsigned int type:3, pack_id:16, depth:13;
diff --git a/test/CodeGen/PR8880.c b/test/CodeGen/PR8880.c
new file mode 100644
index 000000000000..e03d2a42b610
--- /dev/null
+++ b/test/CodeGen/PR8880.c
@@ -0,0 +1,173 @@
+// RUN: %clang_cc1 -Wno-gcc-compat -emit-llvm -o - %s | FileCheck %s
+
+void pr8880_cg_1(int *iptr) {
+// CHECK-LABEL: define void @pr8880_cg_1(
+ int i, j;
+// CHECK: br label %[[OUTER_COND:[0-9A-Za-z$._]+]]
+ for (i = 2; i != 10 ; i++ )
+// CHECK: [[OUTER_COND]]
+// CHECK: label %[[OUTER_BODY:[0-9A-Za-z$._]+]], label %[[OUTER_END:[0-9A-Za-z$._]+]]
+// CHECK: [[OUTER_BODY]]
+// CHECK: br label %[[INNER_COND:[0-9A-Za-z$._]+]]
+ for (j = 3 ; j < 22; (void)({ ++j; break; j;})) {
+// CHECK: [[INNER_COND]]
+// CHECK: label %[[INNER_BODY:[0-9A-Za-z$._]+]], label %[[INNER_END:[0-9A-Za-z$._]+]]
+// CHECK: [[INNER_BODY]]
+ *iptr = 7;
+// CHECK: store i32 7,
+// CHECK: br label %[[INNER_INC:[0-9A-Za-z$._]+]]
+// CHECK: [[INNER_INC]]
+
+// break in 3rd expression of inner loop causes branch to end of inner loop
+
+// CHECK: br label %[[INNER_END:[0-9A-Za-z$._]+]]
+// CHECK: [[INNER_END]]
+ }
+// CHECK: br label %[[OUTER_INC:[0-9A-Za-z$._]+]]
+// CHECK: [[OUTER_INC]]
+// CHECK: br label %[[OUTER_COND]]
+// CHECK: [[OUTER_END]]
+// CHECK: ret
+}
+
+void pr8880_cg_2(int *iptr) {
+// CHECK-LABEL: define void @pr8880_cg_2(
+ int i, j;
+// CHECK: br label %[[OUTER_COND:[0-9A-Za-z$._]+]]
+ for (i = 2; i != 10 ; i++ )
+// CHECK: [[OUTER_COND]]
+// CHECK: label %[[OUTER_BODY:[0-9A-Za-z$._]+]], label %[[OUTER_END:[0-9A-Za-z$._]+]]
+// CHECK: [[OUTER_BODY]]
+// CHECK: br label %[[INNER_COND:[0-9A-Za-z$._]+]]
+ for (j = 3 ; j < 22; (void)({ ++j; continue; j;})) {
+// CHECK: [[INNER_COND]]
+// CHECK: label %[[INNER_BODY:[0-9A-Za-z$._]+]], label %[[INNER_END:[0-9A-Za-z$._]+]]
+// CHECK: [[INNER_BODY]]
+ *iptr = 7;
+// CHECK: store i32 7,
+// CHECK: br label %[[INNER_INC:[0-9A-Za-z$._]+]]
+// CHECK: [[INNER_INC]]
+
+// continue in 3rd expression of inner loop causes branch to inc of inner loop
+
+// CHECK: br label %[[INNER_INC]]
+// CHECK: [[INNER_END]]
+ }
+// CHECK: br label %[[OUTER_INC:[0-9A-Za-z$._]+]]
+// CHECK: [[OUTER_INC]]
+// CHECK: br label %[[OUTER_COND]]
+// CHECK: [[OUTER_END]]
+// CHECK: ret
+}
+
+void pr8880_cg_3(int *iptr) {
+// CHECK-LABEL: define void @pr8880_cg_3(
+ int i, j;
+// CHECK: br label %[[OUTER_COND:[0-9A-Za-z$._]+]]
+ for (i = 2 ; i != 10 ; i++ )
+// CHECK: [[OUTER_COND]]
+// CHECK: label %[[OUTER_BODY:[0-9A-Za-z$._]+]], label %[[OUTER_END:[0-9A-Za-z$._]+]]
+// CHECK: [[OUTER_BODY]]
+// CHECK: br label %[[INNER_COND:[0-9A-Za-z$._]+]]
+ for (j = 3 ; ({break; j;}); j++) {
+
+// break in 2nd expression of inner loop causes branch to end of inner loop
+
+// CHECK: [[INNER_COND]]
+// CHECK: br label %[[INNER_END:[0-9A-Za-z$._]+]]
+// CHECK: label %[[INNER_BODY:[0-9A-Za-z$._]+]], label %[[INNER_END:[0-9A-Za-z$._]+]]
+// CHECK: [[INNER_BODY]]
+ *iptr = 7;
+// CHECK: store i32 7,
+// CHECK: br label %[[INNER_INC:[0-9A-Za-z$._]+]]
+// CHECK: [[INNER_INC]]
+// CHECK: br label %[[INNER_COND]]
+ }
+// CHECK: [[INNER_END]]
+// CHECK: br label %[[OUTER_INC:[0-9A-Za-z$._]+]]
+// CHECK: [[OUTER_INC]]
+// CHECK: br label %[[OUTER_COND]]
+// CHECK: [[OUTER_END]]
+// CHECK: ret
+}
+
+void pr8880_cg_4(int *iptr) {
+// CHECK-LABEL: define void @pr8880_cg_4(
+ int i, j;
+// CHECK: br label %[[OUTER_COND:[0-9A-Za-z$._]+]]
+ for (i = 2 ; i != 10 ; i++ )
+// CHECK: [[OUTER_COND]]
+// CHECK: label %[[OUTER_BODY:[0-9A-Za-z$._]+]], label %[[OUTER_END:[0-9A-Za-z$._]+]]
+// CHECK: [[OUTER_BODY]]
+// CHECK: br label %[[INNER_COND:[0-9A-Za-z$._]+]]
+ for (j = 3 ; ({continue; j;}); j++) {
+
+// continue in 2nd expression of inner loop causes branch to inc of inner loop
+
+// CHECK: [[INNER_COND]]
+// CHECK: br label %[[INNER_INC:[0-9A-Za-z$._]+]]
+// CHECK: label %[[INNER_BODY:[0-9A-Za-z$._]+]], label %[[INNER_END:[0-9A-Za-z$._]+]]
+// CHECK: [[INNER_BODY]]
+ *iptr = 7;
+// CHECK: store i32 7,
+// CHECK: br label %[[INNER_INC]]
+// CHECK: [[INNER_INC]]
+// CHECK: br label %[[INNER_COND]]
+ }
+// CHECK: [[INNER_END]]
+// CHECK: br label %[[OUTER_INC:[0-9A-Za-z$._]+]]
+// CHECK: [[OUTER_INC]]
+// CHECK: br label %[[OUTER_COND]]
+// CHECK: [[OUTER_END]]
+// CHECK: ret
+}
+
+void pr8880_cg_5(int x, int *iptr) {
+// CHECK-LABEL: define void @pr8880_cg_5(
+ int y = 5;
+// CHECK: br label %[[OUTER_COND:[0-9A-Za-z$._]+]]
+// CHECK: [[OUTER_COND]]
+ while(--x) {
+// CHECK: label %[[OUTER_BODY:[0-9A-Za-z$._]+]], label %[[OUTER_END:[0-9A-Za-z$._]+]]
+// CHECK: [[OUTER_BODY]]
+// CHECK: br label %[[INNER_COND:[0-9A-Za-z$._]+]]
+ while(({ break; --y; })) {
+// CHECK: [[INNER_COND]]
+// CHECK: br label %[[INNER_END:[0-9A-Za-z$._]+]]
+// CHECK: label %[[INNER_BODY:[0-9A-Za-z$._]+]], label %[[INNER_END:[0-9A-Za-z$._]+]]
+// CHECK: [[INNER_BODY]]
+ *iptr = 7;
+// CHECK: store i32 7,
+ }
+// CHECK: br label %[[INNER_COND]]
+ }
+// CHECK: [[INNER_END]]
+// CHECK: br label %[[OUTER_COND]]
+// CHECK: [[OUTER_END]]
+// CHECK: ret void
+}
+
+void pr8880_cg_6(int x, int *iptr) {
+// CHECK-LABEL: define void @pr8880_cg_6(
+ int y = 5;
+// CHECK: br label %[[OUTER_COND:[0-9A-Za-z$._]+]]
+// CHECK: [[OUTER_COND]]
+ while(--x) {
+// CHECK: label %[[OUTER_BODY:[0-9A-Za-z$._]+]], label %[[OUTER_END:[0-9A-Za-z$._]+]]
+// CHECK: [[OUTER_BODY]]
+// CHECK: br label %[[INNER_BODY:[0-9A-Za-z$._]+]]
+// CHECK: [[INNER_BODY]]
+ do {
+// CHECK: store i32 7,
+ *iptr = 7;
+// CHECK: br label %[[INNER_COND:[0-9A-Za-z$._]+]]
+ } while(({ break; --y; }));
+// CHECK: [[INNER_COND]]
+// CHECK: br label %[[INNER_END:[0-9A-Za-z$._]+]]
+// CHECK: label %[[INNER_BODY:[0-9A-Za-z$._]+]], label %[[INNER_END]]
+ }
+// CHECK: [[INNER_END]]
+// CHECK: br label %[[OUTER_COND]]
+// CHECK: [[OUTER_END]]
+// CHECK: ret void
+}
diff --git a/test/CodeGen/a15.c b/test/CodeGen/a15.c
deleted file mode 100644
index e4986d885391..000000000000
--- a/test/CodeGen/a15.c
+++ /dev/null
@@ -1,5 +0,0 @@
-// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a15 -emit-llvm -S %s -o /dev/null
-
-int main() {
- return 0;
-}
diff --git a/test/CodeGen/a5.c b/test/CodeGen/a5.c
deleted file mode 100644
index b342d3578e14..000000000000
--- a/test/CodeGen/a5.c
+++ /dev/null
@@ -1,5 +0,0 @@
-// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a5 -emit-llvm -S %s -o /dev/null
-
-int main() {
- return 0;
-}
diff --git a/test/CodeGen/aarch64-arguments.c b/test/CodeGen/aarch64-arguments.c
deleted file mode 100644
index a70dfb1e3d4d..000000000000
--- a/test/CodeGen/aarch64-arguments.c
+++ /dev/null
@@ -1,194 +0,0 @@
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -emit-llvm -w -o - %s | FileCheck -check-prefix=PCS %s
-
-// Sign extension is performed by the callee on AArch64, which means
-// that we *shouldn't* tag arguments and returns with their extension.
-
-// PCS-LABEL: define i8 @f0(i16 %a)
-char f0(short a) {
- return a;
-}
-
-// PCS: define [1 x i64] @f1()
-struct s1 { char f0; };
-struct s1 f1(void) {}
-
-// PCS: define [1 x i64] @f2()
-struct s2 { short f0; };
-struct s2 f2(void) {}
-
-// PCS: define [1 x i64] @f3()
-struct s3 { int f0; };
-struct s3 f3(void) {}
-
-// PCS: define [1 x i64] @f4()
-struct s4 { struct s4_0 { int f0; } f0; };
-struct s4 f4(void) {}
-
-// PCS: define [1 x i64] @f5()
-struct s5 { struct { } f0; int f1; };
-struct s5 f5(void) {}
-
-// PCS: define [1 x i64] @f6()
-struct s6 { int f0[1]; };
-struct s6 f6(void) {}
-
-// PCS-LABEL: define void @f7()
-struct s7 { struct { int : 0; } f0; };
-struct s7 f7(void) {}
-
-// PCS-LABEL: define void @f8()
-struct s8 { struct { int : 0; } f0[1]; };
-struct s8 f8(void) {}
-
-// PCS: define [1 x i64] @f9()
-struct s9 { long f0; int : 0; };
-struct s9 f9(void) {}
-
-// PCS: define [1 x i64] @f10()
-struct s10 { long f0; int : 0; int : 0; };
-struct s10 f10(void) {}
-
-// PCS: define [1 x i64] @f11()
-struct s11 { int : 0; long f0; };
-struct s11 f11(void) {}
-
-// PCS: define [1 x i64] @f12()
-union u12 { char f0; short f1; int f2; long f3; };
-union u12 f12(void) {}
-
-// PCS-LABEL: define %struct.s13 @f13()
-struct s13 { float f0; };
-struct s13 f13(void) {}
-
-// PCS-LABEL: define %union.u14 @f14()
-union u14 { float f0; };
-union u14 f14(void) {}
-
-// PCS-LABEL: define void @f15()
-void f15(struct s7 a0) {}
-
-// PCS-LABEL: define void @f16()
-void f16(struct s8 a0) {}
-
-// PCS: define [1 x i64] @f17()
-struct s17 { short f0 : 13; char f1 : 4; };
-struct s17 f17(void) {}
-
-// PCS: define [1 x i64] @f18()
-struct s18 { short f0; char f1 : 4; };
-struct s18 f18(void) {}
-
-// PCS: define [1 x i64] @f19()
-struct s19 { long f0; struct s8 f1; };
-struct s19 f19(void) {}
-
-// PCS: define [1 x i64] @f20()
-struct s20 { struct s8 f1; long f0; };
-struct s20 f20(void) {}
-
-// PCS: define [1 x i64] @f21()
-struct s21 { struct {} f1; long f0 : 4; };
-struct s21 f21(void) {}
-
-// PCS: define { float, float } @f22()
-// PCS: define { double, double } @f23(
-_Complex float f22(void) {}
-_Complex double f23(void) {}
-
-// PCS: define [1 x i64] @f24()
-struct s24 { _Complex char f0; };
-struct s24 f24() {}
-
-// PCS: define [1 x i64] @f25()
-struct s25 { _Complex short f0; };
-struct s25 f25() {}
-
-// PCS: define [1 x i64] @f26()
-struct s26 { _Complex int f0; };
-struct s26 f26() {}
-
-// PCS: define [2 x i64] @f27()
-struct s27 { _Complex long f0; };
-struct s27 f27() {}
-
-// PCS-LABEL: define void @f28(i8 %a, i16 %b, i32 %c, i64 %d, float %e, double %f)
-void f28(char a, short b, int c, long d, float e, double f) {}
-
-// PCS: define void @f29([2 x i64] %a
-struct s29 { int arr[4]; };
-void f29(struct s29 a) {}
-
-// PCS-LABEL: define void @f30(%struct.s30* %a)
-struct s30 { int arr[4]; char c;};
-void f30(struct s30 a) {}
-
-// PCS: define void @f31([4 x double] %a
-struct s31 { double arr[4]; };
-void f31(struct s31 a) {}
-
-// PCS-LABEL: define void @f32(%struct.s32* %a)
-struct s32 { float arr[5]; };
-void f32(struct s32 a) {}
-
-// Not the only solution, but it *is* an HFA.
-// PCS: define void @f33([3 x float] %a.coerce0, float %a.coerce1)
-struct s33 { float arr[3]; float a; };
-void f33(struct s33 a) {}
-
-// PCS-LABEL: define void @f34(%struct.s34* noalias sret
-struct s34 { int a[4]; char b };
-struct s34 f34(void) {}
-
-// PCS-LABEL: define void @f35()
-struct s35 {};
-void f35(struct s35 a) {}
-
-// Check padding is added:
-// PCS: @f36(i32 %x0, i32 %x1, i32 %x2, i32 %x3, i32 %x4, i32 %x5, i32 %x6, [1 x i64], %struct.s36* byval align 8 %stacked)
-struct s36 { long a, b; };
-void f36(int x0, int x1, int x2, int x3, int x4, int x5, int x6, struct s36 stacked) {}
-
-// But only once:
-// PCS: @f37(i32 %x0, i32 %x1, i32 %x2, i32 %x3, i32 %x4, i32 %x5, i32 %x6, [1 x i64], %struct.s37* byval align 8 %stacked, %struct.s37* byval align 8 %stacked2)
-struct s37 { long a, b; };
-void f37(int x0, int x1, int x2, int x3, int x4, int x5, int x6, struct s37 stacked, struct s37 stacked2) {}
-
-// Check for HFA padding args. Also, they should not end up on the stack in a
-// way which will have holes in when lowered further by LLVM. In particular [3 x
-// float] would be unacceptable.
-
-// PCS: @f38(float %s0, double %d1, float %s2, float %s3, float %s4, float %s5, [2 x float], %struct.s38* byval align 4 %stacked)
-struct s38 { float a, b, c; };
-void f38(float s0, double d1, float s2, float s3, float s4, float s5, struct s38 stacked) {}
-
-// Check both VFP and integer arguments are padded (also that pointers and enums
-// get counted as integer types correctly).
-struct s39_int { long a, b; };
-struct s39_float { float a, b, c, d; };
-enum s39_enum { Val1, Val2 };
-// PCS: @f39(float %s0, i32 %x0, float %s1, i32* %x1, float %s2, i32 %x2, float %s3, float %s4, i32 %x3, [3 x float], %struct.s39_float* byval align 4 %stacked, i32 %x4, i32 %x5, i32 %x6, [1 x i64], %struct.s39_int* byval align 8 %stacked2)
-void f39(float s0, int x0, float s1, int *x1, float s2, enum s39_enum x2, float s3, float s4,
- int x3, struct s39_float stacked, int x4, int x5, int x6,
- struct s39_int stacked2) {}
-
-struct s40 { __int128 a; };
-// PCS: @f40(i32 %x0, [1 x i128] %x2_3.coerce, i32 %x4, i32 %x5, i32 %x6, [1 x i64], %struct.s40* byval align 16 %stacked)
-void f40(int x0, struct s40 x2_3, int x4, int x5, int x6, struct s40 stacked) {}
-
-// Checking: __int128 will get properly aligned type, with padding so big struct doesn't use x7.
-struct s41 { int arr[5]; };
-// PCS: @f41(i32 %x0, i32 %x1, i32 %x2, i32 %x3, i32 %x4, i32 %x5, i32 %x6, [1 x i64], i128* byval align 16, %struct.s41* %stacked2)
-int f41(int x0, int x1, int x2, int x3, int x4, int x5, int x6, __int128 stacked, struct s41 stacked2) {}
-
-// Checking: __int128 needing to be aligned in registers will consume correct
-// number. Previously padding was inserted before "stacked" because x6_7 was
-// "allocated" to x5 and x6 by clang.
-// PCS: @f42(i32 %x0, i32 %x1, i32 %x2, i32 %x3, i32 %x4, i128 %x6_7, i128* byval align 16)
-void f42(int x0, int x1, int x2, int x3, int x4, __int128 x6_7, __int128 stacked) {}
-
-// Checking: __fp16 is extended to double when calling variadic functions
-void variadic(int a, ...);
-void f43(__fp16 *in) {
- variadic(42, *in);
-// CHECK: call void @variadic(i32 42, double
-}
diff --git a/test/CodeGen/aarch64-inline-asm.c b/test/CodeGen/aarch64-inline-asm.c
index ca39c6e7ff2a..c7ce3758fefb 100644
--- a/test/CodeGen/aarch64-inline-asm.c
+++ b/test/CodeGen/aarch64-inline-asm.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -emit-llvm -o - %s | FileCheck %s
// The only part clang really deals with is the lvalue/rvalue
// distinction on constraints. It's sufficient to emit llvm and make
diff --git a/test/CodeGen/aarch64-neon-2velem.c b/test/CodeGen/aarch64-neon-2velem.c
index 03f7df715c53..fa910ff78251 100644
--- a/test/CodeGen/aarch64-neon-2velem.c
+++ b/test/CodeGen/aarch64-neon-2velem.c
@@ -1,1698 +1,2452 @@
// REQUIRES: aarch64-registered-target
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \
-// RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \
-// RUN: -S -O3 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -S -O3 -o - %s | FileCheck %s
// Test new aarch64 intrinsics and types
#include <arm_neon.h>
int16x4_t test_vmla_lane_s16(int16x4_t a, int16x4_t b, int16x4_t v) {
- // CHECK: test_vmla_lane_s16
+ // CHECK-LABEL: test_vmla_lane_s16
return vmla_lane_s16(a, b, v, 3);
// CHECK: mla {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[3]
}
int16x8_t test_vmlaq_lane_s16(int16x8_t a, int16x8_t b, int16x4_t v) {
- // CHECK: test_vmlaq_lane_s16
+ // CHECK-LABEL: test_vmlaq_lane_s16
return vmlaq_lane_s16(a, b, v, 3);
// CHECK: mla {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[3]
}
int32x2_t test_vmla_lane_s32(int32x2_t a, int32x2_t b, int32x2_t v) {
- // CHECK: test_vmla_lane_s32
+ // CHECK-LABEL: test_vmla_lane_s32
return vmla_lane_s32(a, b, v, 1);
// CHECK: mla {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
}
int32x4_t test_vmlaq_lane_s32(int32x4_t a, int32x4_t b, int32x2_t v) {
- // CHECK: test_vmlaq_lane_s32
+ // CHECK-LABEL: test_vmlaq_lane_s32
return vmlaq_lane_s32(a, b, v, 1);
// CHECK: mla {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
}
int16x4_t test_vmla_laneq_s16(int16x4_t a, int16x4_t b, int16x8_t v) {
- // CHECK: test_vmla_laneq_s16
+ // CHECK-LABEL: test_vmla_laneq_s16
return vmla_laneq_s16(a, b, v, 7);
// CHECK: mla {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[7]
}
int16x8_t test_vmlaq_laneq_s16(int16x8_t a, int16x8_t b, int16x8_t v) {
- // CHECK: test_vmlaq_laneq_s16
+ // CHECK-LABEL: test_vmlaq_laneq_s16
return vmlaq_laneq_s16(a, b, v, 7);
// CHECK: mla {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[7]
}
int32x2_t test_vmla_laneq_s32(int32x2_t a, int32x2_t b, int32x4_t v) {
- // CHECK: test_vmla_laneq_s32
+ // CHECK-LABEL: test_vmla_laneq_s32
return vmla_laneq_s32(a, b, v, 3);
// CHECK: mla {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
}
int32x4_t test_vmlaq_laneq_s32(int32x4_t a, int32x4_t b, int32x4_t v) {
- // CHECK: test_vmlaq_laneq_s32
+ // CHECK-LABEL: test_vmlaq_laneq_s32
return vmlaq_laneq_s32(a, b, v, 3);
// CHECK: mla {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
}
int16x4_t test_vmls_lane_s16(int16x4_t a, int16x4_t b, int16x4_t v) {
- // CHECK: test_vmls_lane_s16
+ // CHECK-LABEL: test_vmls_lane_s16
return vmls_lane_s16(a, b, v, 3);
// CHECK: mls {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[3]
}
int16x8_t test_vmlsq_lane_s16(int16x8_t a, int16x8_t b, int16x4_t v) {
- // CHECK: test_vmlsq_lane_s16
+ // CHECK-LABEL: test_vmlsq_lane_s16
return vmlsq_lane_s16(a, b, v, 3);
// CHECK: mls {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[3]
}
int32x2_t test_vmls_lane_s32(int32x2_t a, int32x2_t b, int32x2_t v) {
- // CHECK: test_vmls_lane_s32
+ // CHECK-LABEL: test_vmls_lane_s32
return vmls_lane_s32(a, b, v, 1);
// CHECK: mls {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
}
int32x4_t test_vmlsq_lane_s32(int32x4_t a, int32x4_t b, int32x2_t v) {
- // CHECK: test_vmlsq_lane_s32
+ // CHECK-LABEL: test_vmlsq_lane_s32
return vmlsq_lane_s32(a, b, v, 1);
// CHECK: mls {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
}
int16x4_t test_vmls_laneq_s16(int16x4_t a, int16x4_t b, int16x8_t v) {
- // CHECK: test_vmls_laneq_s16
+ // CHECK-LABEL: test_vmls_laneq_s16
return vmls_laneq_s16(a, b, v, 7);
// CHECK: mls {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[7]
}
int16x8_t test_vmlsq_laneq_s16(int16x8_t a, int16x8_t b, int16x8_t v) {
- // CHECK: test_vmlsq_laneq_s16
+ // CHECK-LABEL: test_vmlsq_laneq_s16
return vmlsq_laneq_s16(a, b, v, 7);
// CHECK: mls {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[7]
}
int32x2_t test_vmls_laneq_s32(int32x2_t a, int32x2_t b, int32x4_t v) {
- // CHECK: test_vmls_laneq_s32
+ // CHECK-LABEL: test_vmls_laneq_s32
return vmls_laneq_s32(a, b, v, 3);
// CHECK: mls {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
}
int32x4_t test_vmlsq_laneq_s32(int32x4_t a, int32x4_t b, int32x4_t v) {
- // CHECK: test_vmlsq_laneq_s32
+ // CHECK-LABEL: test_vmlsq_laneq_s32
return vmlsq_laneq_s32(a, b, v, 3);
// CHECK: mls {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
}
int16x4_t test_vmul_lane_s16(int16x4_t a, int16x4_t v) {
- // CHECK: test_vmul_lane_s16
+ // CHECK-LABEL: test_vmul_lane_s16
return vmul_lane_s16(a, v, 3);
// CHECK: mul {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[3]
}
int16x8_t test_vmulq_lane_s16(int16x8_t a, int16x4_t v) {
- // CHECK: test_vmulq_lane_s16
+ // CHECK-LABEL: test_vmulq_lane_s16
return vmulq_lane_s16(a, v, 3);
// CHECK: mul {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[3]
}
int32x2_t test_vmul_lane_s32(int32x2_t a, int32x2_t v) {
- // CHECK: test_vmul_lane_s32
+ // CHECK-LABEL: test_vmul_lane_s32
return vmul_lane_s32(a, v, 1);
// CHECK: mul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
}
int32x4_t test_vmulq_lane_s32(int32x4_t a, int32x2_t v) {
- // CHECK: test_vmulq_lane_s32
+ // CHECK-LABEL: test_vmulq_lane_s32
return vmulq_lane_s32(a, v, 1);
// CHECK: mul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
}
uint16x4_t test_vmul_lane_u16(uint16x4_t a, uint16x4_t v) {
- // CHECK: test_vmul_lane_u16
+ // CHECK-LABEL: test_vmul_lane_u16
return vmul_lane_u16(a, v, 3);
// CHECK: mul {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[3]
}
uint16x8_t test_vmulq_lane_u16(uint16x8_t a, uint16x4_t v) {
- // CHECK: test_vmulq_lane_u16
+ // CHECK-LABEL: test_vmulq_lane_u16
return vmulq_lane_u16(a, v, 3);
// CHECK: mul {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[3]
}
uint32x2_t test_vmul_lane_u32(uint32x2_t a, uint32x2_t v) {
- // CHECK: test_vmul_lane_u32
+ // CHECK-LABEL: test_vmul_lane_u32
return vmul_lane_u32(a, v, 1);
// CHECK: mul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
}
uint32x4_t test_vmulq_lane_u32(uint32x4_t a, uint32x2_t v) {
- // CHECK: test_vmulq_lane_u32
+ // CHECK-LABEL: test_vmulq_lane_u32
return vmulq_lane_u32(a, v, 1);
// CHECK: mul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
}
int16x4_t test_vmul_laneq_s16(int16x4_t a, int16x8_t v) {
- // CHECK: test_vmul_laneq_s16
+ // CHECK-LABEL: test_vmul_laneq_s16
return vmul_laneq_s16(a, v, 7);
// CHECK: mul {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[7]
}
int16x8_t test_vmulq_laneq_s16(int16x8_t a, int16x8_t v) {
- // CHECK: test_vmulq_laneq_s16
+ // CHECK-LABEL: test_vmulq_laneq_s16
return vmulq_laneq_s16(a, v, 7);
// CHECK: mul {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[7]
}
int32x2_t test_vmul_laneq_s32(int32x2_t a, int32x4_t v) {
- // CHECK: test_vmul_laneq_s32
+ // CHECK-LABEL: test_vmul_laneq_s32
return vmul_laneq_s32(a, v, 3);
// CHECK: mul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
}
int32x4_t test_vmulq_laneq_s32(int32x4_t a, int32x4_t v) {
- // CHECK: test_vmulq_laneq_s32
+ // CHECK-LABEL: test_vmulq_laneq_s32
return vmulq_laneq_s32(a, v, 3);
// CHECK: mul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
}
uint16x4_t test_vmul_laneq_u16(uint16x4_t a, uint16x8_t v) {
- // CHECK: test_vmul_laneq_u16
+ // CHECK-LABEL: test_vmul_laneq_u16
return vmul_laneq_u16(a, v, 7);
// CHECK: mul {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[7]
}
uint16x8_t test_vmulq_laneq_u16(uint16x8_t a, uint16x8_t v) {
- // CHECK: test_vmulq_laneq_u16
+ // CHECK-LABEL: test_vmulq_laneq_u16
return vmulq_laneq_u16(a, v, 7);
// CHECK: mul {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[7]
}
uint32x2_t test_vmul_laneq_u32(uint32x2_t a, uint32x4_t v) {
- // CHECK: test_vmul_laneq_u32
+ // CHECK-LABEL: test_vmul_laneq_u32
return vmul_laneq_u32(a, v, 3);
// CHECK: mul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
}
uint32x4_t test_vmulq_laneq_u32(uint32x4_t a, uint32x4_t v) {
- // CHECK: test_vmulq_laneq_u32
+ // CHECK-LABEL: test_vmulq_laneq_u32
return vmulq_laneq_u32(a, v, 3);
// CHECK: mul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
}
float32x2_t test_vfma_lane_f32(float32x2_t a, float32x2_t b, float32x2_t v) {
- // CHECK: test_vfma_lane_f32
+ // CHECK-LABEL: test_vfma_lane_f32
return vfma_lane_f32(a, b, v, 1);
// CHECK: fmla {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
}
float32x4_t test_vfmaq_lane_f32(float32x4_t a, float32x4_t b, float32x2_t v) {
- // CHECK: test_vfmaq_lane_f32
+ // CHECK-LABEL: test_vfmaq_lane_f32
return vfmaq_lane_f32(a, b, v, 1);
// CHECK: fmla {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
}
float32x2_t test_vfma_laneq_f32(float32x2_t a, float32x2_t b, float32x4_t v) {
- // CHECK: test_vfma_laneq_f32
+ // CHECK-LABEL: test_vfma_laneq_f32
return vfma_laneq_f32(a, b, v, 3);
// CHECK: fmla {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
}
float32x4_t test_vfmaq_laneq_f32(float32x4_t a, float32x4_t b, float32x4_t v) {
- // CHECK: test_vfmaq_laneq_f32
+ // CHECK-LABEL: test_vfmaq_laneq_f32
return vfmaq_laneq_f32(a, b, v, 3);
// CHECK: fmla {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
}
float32x2_t test_vfms_lane_f32(float32x2_t a, float32x2_t b, float32x2_t v) {
- // CHECK: test_vfms_lane_f32
+ // CHECK-LABEL: test_vfms_lane_f32
return vfms_lane_f32(a, b, v, 1);
// CHECK: fmls {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
}
float32x4_t test_vfmsq_lane_f32(float32x4_t a, float32x4_t b, float32x2_t v) {
- // CHECK: test_vfmsq_lane_f32
+ // CHECK-LABEL: test_vfmsq_lane_f32
return vfmsq_lane_f32(a, b, v, 1);
// CHECK: fmls {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
}
float32x2_t test_vfms_laneq_f32(float32x2_t a, float32x2_t b, float32x4_t v) {
- // CHECK: test_vfms_laneq_f32
+ // CHECK-LABEL: test_vfms_laneq_f32
return vfms_laneq_f32(a, b, v, 3);
// CHECK: fmls {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
}
float32x4_t test_vfmsq_laneq_f32(float32x4_t a, float32x4_t b, float32x4_t v) {
- // CHECK: test_vfmsq_laneq_f32
+ // CHECK-LABEL: test_vfmsq_laneq_f32
return vfmsq_laneq_f32(a, b, v, 3);
// CHECK: fmls {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
}
float64x2_t test_vfmaq_lane_f64(float64x2_t a, float64x2_t b, float64x1_t v) {
- // CHECK: test_vfmaq_lane_f64
+ // CHECK-LABEL: test_vfmaq_lane_f64
return vfmaq_lane_f64(a, b, v, 0);
// CHECK: fmla {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
}
float64x2_t test_vfmaq_laneq_f64(float64x2_t a, float64x2_t b, float64x2_t v) {
- // CHECK: test_vfmaq_laneq_f64
+ // CHECK-LABEL: test_vfmaq_laneq_f64
return vfmaq_laneq_f64(a, b, v, 1);
// CHECK: fmla {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.d[1]
}
float64x2_t test_vfmsq_lane_f64(float64x2_t a, float64x2_t b, float64x1_t v) {
- // CHECK: test_vfmsq_lane_f64
+ // CHECK-LABEL: test_vfmsq_lane_f64
return vfmsq_lane_f64(a, b, v, 0);
// CHECK: fmls {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
}
float64x2_t test_vfmsq_laneq_f64(float64x2_t a, float64x2_t b, float64x2_t v) {
- // CHECK: test_vfmsq_laneq_f64
+ // CHECK-LABEL: test_vfmsq_laneq_f64
return vfmsq_laneq_f64(a, b, v, 1);
// CHECK: fmls {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.d[1]
}
+float32_t test_vfmas_laneq_f32(float32_t a, float32_t b, float32x4_t v) {
+ // CHECK-LABEL: test_vfmas_laneq_f32
+ return vfmas_laneq_f32(a, b, v, 3);
+ // CHECK: fmla {{s[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[3]
+}
+
+float64_t test_vfmsd_lane_f64(float64_t a, float64_t b, float64x1_t v) {
+ // CHECK-LABEL: test_vfmsd_lane_f64
+ return vfmsd_lane_f64(a, b, v, 0);
+ // CHECK: {{fmls d[0-9]+, d[0-9]+, v[0-9]+\.d\[0\]|fmsub d[0-9]+, d[0-9]+, d[0-9]+}}
+}
+
+float32_t test_vfmss_laneq_f32(float32_t a, float32_t b, float32x4_t v) {
+ // CHECK-LABEL: test_vfmss_laneq_f32
+ return vfmss_laneq_f32(a, b, v, 3);
+ // CHECK: fmls {{s[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[3]
+}
+
+float64_t test_vfmsd_laneq_f64(float64_t a, float64_t b, float64x2_t v) {
+ // CHECK-LABEL: test_vfmsd_laneq_f64
+ return vfmsd_laneq_f64(a, b, v, 1);
+ // CHECK: fmls {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[1]
+}
+
int32x4_t test_vmlal_lane_s16(int32x4_t a, int16x4_t b, int16x4_t v) {
- // CHECK: test_vmlal_lane_s16
+ // CHECK-LABEL: test_vmlal_lane_s16
return vmlal_lane_s16(a, b, v, 3);
// CHECK: smlal {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[3]
}
int64x2_t test_vmlal_lane_s32(int64x2_t a, int32x2_t b, int32x2_t v) {
- // CHECK: test_vmlal_lane_s32
+ // CHECK-LABEL: test_vmlal_lane_s32
return vmlal_lane_s32(a, b, v, 1);
// CHECK: smlal {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
}
int32x4_t test_vmlal_laneq_s16(int32x4_t a, int16x4_t b, int16x8_t v) {
- // CHECK: test_vmlal_laneq_s16
+ // CHECK-LABEL: test_vmlal_laneq_s16
return vmlal_laneq_s16(a, b, v, 7);
// CHECK: smlal {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[7]
}
int64x2_t test_vmlal_laneq_s32(int64x2_t a, int32x2_t b, int32x4_t v) {
- // CHECK: test_vmlal_laneq_s32
+ // CHECK-LABEL: test_vmlal_laneq_s32
return vmlal_laneq_s32(a, b, v, 3);
// CHECK: smlal {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
}
int32x4_t test_vmlal_high_lane_s16(int32x4_t a, int16x8_t b, int16x4_t v) {
- // CHECK: test_vmlal_high_lane_s16
+ // CHECK-LABEL: test_vmlal_high_lane_s16
return vmlal_high_lane_s16(a, b, v, 3);
// CHECK: smlal2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[3]
}
int64x2_t test_vmlal_high_lane_s32(int64x2_t a, int32x4_t b, int32x2_t v) {
- // CHECK: test_vmlal_high_lane_s32
+ // CHECK-LABEL: test_vmlal_high_lane_s32
return vmlal_high_lane_s32(a, b, v, 1);
// CHECK: smlal2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
}
int32x4_t test_vmlal_high_laneq_s16(int32x4_t a, int16x8_t b, int16x8_t v) {
- // CHECK: test_vmlal_high_laneq_s16
+ // CHECK-LABEL: test_vmlal_high_laneq_s16
return vmlal_high_laneq_s16(a, b, v, 7);
// CHECK: smlal2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[7]
}
int64x2_t test_vmlal_high_laneq_s32(int64x2_t a, int32x4_t b, int32x4_t v) {
- // CHECK: test_vmlal_high_laneq_s32
+ // CHECK-LABEL: test_vmlal_high_laneq_s32
return vmlal_high_laneq_s32(a, b, v, 3);
// CHECK: smlal2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
}
int32x4_t test_vmlsl_lane_s16(int32x4_t a, int16x4_t b, int16x4_t v) {
- // CHECK: test_vmlsl_lane_s16
+ // CHECK-LABEL: test_vmlsl_lane_s16
return vmlsl_lane_s16(a, b, v, 3);
// CHECK: smlsl {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[3]
}
int64x2_t test_vmlsl_lane_s32(int64x2_t a, int32x2_t b, int32x2_t v) {
- // CHECK: test_vmlsl_lane_s32
+ // CHECK-LABEL: test_vmlsl_lane_s32
return vmlsl_lane_s32(a, b, v, 1);
// CHECK: smlsl {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
}
int32x4_t test_vmlsl_laneq_s16(int32x4_t a, int16x4_t b, int16x8_t v) {
- // CHECK: test_vmlsl_laneq_s16
+ // CHECK-LABEL: test_vmlsl_laneq_s16
return vmlsl_laneq_s16(a, b, v, 7);
// CHECK: smlsl {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[7]
}
int64x2_t test_vmlsl_laneq_s32(int64x2_t a, int32x2_t b, int32x4_t v) {
- // CHECK: test_vmlsl_laneq_s32
+ // CHECK-LABEL: test_vmlsl_laneq_s32
return vmlsl_laneq_s32(a, b, v, 3);
// CHECK: smlsl {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
}
int32x4_t test_vmlsl_high_lane_s16(int32x4_t a, int16x8_t b, int16x4_t v) {
- // CHECK: test_vmlsl_high_lane_s16
+ // CHECK-LABEL: test_vmlsl_high_lane_s16
return vmlsl_high_lane_s16(a, b, v, 3);
// CHECK: smlsl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[3]
}
int64x2_t test_vmlsl_high_lane_s32(int64x2_t a, int32x4_t b, int32x2_t v) {
- // CHECK: test_vmlsl_high_lane_s32
+ // CHECK-LABEL: test_vmlsl_high_lane_s32
return vmlsl_high_lane_s32(a, b, v, 1);
// CHECK: smlsl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
}
int32x4_t test_vmlsl_high_laneq_s16(int32x4_t a, int16x8_t b, int16x8_t v) {
- // CHECK: test_vmlsl_high_laneq_s16
+ // CHECK-LABEL: test_vmlsl_high_laneq_s16
return vmlsl_high_laneq_s16(a, b, v, 7);
// CHECK: smlsl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[7]
}
int64x2_t test_vmlsl_high_laneq_s32(int64x2_t a, int32x4_t b, int32x4_t v) {
- // CHECK: test_vmlsl_high_laneq_s32
+ // CHECK-LABEL: test_vmlsl_high_laneq_s32
return vmlsl_high_laneq_s32(a, b, v, 3);
// CHECK: smlsl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
}
int32x4_t test_vmlal_lane_u16(int32x4_t a, int16x4_t b, int16x4_t v) {
- // CHECK: test_vmlal_lane_u16
+ // CHECK-LABEL: test_vmlal_lane_u16
return vmlal_lane_u16(a, b, v, 3);
// CHECK: umlal {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[3]
}
int64x2_t test_vmlal_lane_u32(int64x2_t a, int32x2_t b, int32x2_t v) {
- // CHECK: test_vmlal_lane_u32
+ // CHECK-LABEL: test_vmlal_lane_u32
return vmlal_lane_u32(a, b, v, 1);
// CHECK: umlal {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
}
int32x4_t test_vmlal_laneq_u16(int32x4_t a, int16x4_t b, int16x8_t v) {
- // CHECK: test_vmlal_laneq_u16
+ // CHECK-LABEL: test_vmlal_laneq_u16
return vmlal_laneq_u16(a, b, v, 7);
// CHECK: umlal {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[7]
}
int64x2_t test_vmlal_laneq_u32(int64x2_t a, int32x2_t b, int32x4_t v) {
- // CHECK: test_vmlal_laneq_u32
+ // CHECK-LABEL: test_vmlal_laneq_u32
return vmlal_laneq_u32(a, b, v, 3);
// CHECK: umlal {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
}
int32x4_t test_vmlal_high_lane_u16(int32x4_t a, int16x8_t b, int16x4_t v) {
- // CHECK: test_vmlal_high_lane_u16
+ // CHECK-LABEL: test_vmlal_high_lane_u16
return vmlal_high_lane_u16(a, b, v, 3);
// CHECK: umlal2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[3]
}
int64x2_t test_vmlal_high_lane_u32(int64x2_t a, int32x4_t b, int32x2_t v) {
- // CHECK: test_vmlal_high_lane_u32
+ // CHECK-LABEL: test_vmlal_high_lane_u32
return vmlal_high_lane_u32(a, b, v, 1);
// CHECK: umlal2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
}
int32x4_t test_vmlal_high_laneq_u16(int32x4_t a, int16x8_t b, int16x8_t v) {
- // CHECK: test_vmlal_high_laneq_u16
+ // CHECK-LABEL: test_vmlal_high_laneq_u16
return vmlal_high_laneq_u16(a, b, v, 7);
// CHECK: umlal2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[7]
}
int64x2_t test_vmlal_high_laneq_u32(int64x2_t a, int32x4_t b, int32x4_t v) {
- // CHECK: test_vmlal_high_laneq_u32
+ // CHECK-LABEL: test_vmlal_high_laneq_u32
return vmlal_high_laneq_u32(a, b, v, 3);
// CHECK: umlal2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
}
int32x4_t test_vmlsl_lane_u16(int32x4_t a, int16x4_t b, int16x4_t v) {
- // CHECK: test_vmlsl_lane_u16
+ // CHECK-LABEL: test_vmlsl_lane_u16
return vmlsl_lane_u16(a, b, v, 3);
// CHECK: umlsl {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[3]
}
int64x2_t test_vmlsl_lane_u32(int64x2_t a, int32x2_t b, int32x2_t v) {
- // CHECK: test_vmlsl_lane_u32
+ // CHECK-LABEL: test_vmlsl_lane_u32
return vmlsl_lane_u32(a, b, v, 1);
// CHECK: umlsl {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
}
int32x4_t test_vmlsl_laneq_u16(int32x4_t a, int16x4_t b, int16x8_t v) {
- // CHECK: test_vmlsl_laneq_u16
+ // CHECK-LABEL: test_vmlsl_laneq_u16
return vmlsl_laneq_u16(a, b, v, 7);
// CHECK: umlsl {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[7]
}
int64x2_t test_vmlsl_laneq_u32(int64x2_t a, int32x2_t b, int32x4_t v) {
- // CHECK: test_vmlsl_laneq_u32
+ // CHECK-LABEL: test_vmlsl_laneq_u32
return vmlsl_laneq_u32(a, b, v, 3);
// CHECK: umlsl {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
}
int32x4_t test_vmlsl_high_lane_u16(int32x4_t a, int16x8_t b, int16x4_t v) {
- // CHECK: test_vmlsl_high_lane_u16
+ // CHECK-LABEL: test_vmlsl_high_lane_u16
return vmlsl_high_lane_u16(a, b, v, 3);
// CHECK: umlsl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[3]
}
int64x2_t test_vmlsl_high_lane_u32(int64x2_t a, int32x4_t b, int32x2_t v) {
- // CHECK: test_vmlsl_high_lane_u32
+ // CHECK-LABEL: test_vmlsl_high_lane_u32
return vmlsl_high_lane_u32(a, b, v, 1);
// CHECK: umlsl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
}
int32x4_t test_vmlsl_high_laneq_u16(int32x4_t a, int16x8_t b, int16x8_t v) {
- // CHECK: test_vmlsl_high_laneq_u16
+ // CHECK-LABEL: test_vmlsl_high_laneq_u16
return vmlsl_high_laneq_u16(a, b, v, 7);
// CHECK: umlsl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[7]
}
int64x2_t test_vmlsl_high_laneq_u32(int64x2_t a, int32x4_t b, int32x4_t v) {
- // CHECK: test_vmlsl_high_laneq_u32
+ // CHECK-LABEL: test_vmlsl_high_laneq_u32
return vmlsl_high_laneq_u32(a, b, v, 3);
// CHECK: umlsl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
}
int32x4_t test_vmull_lane_s16(int16x4_t a, int16x4_t v) {
- // CHECK: test_vmull_lane_s16
+ // CHECK-LABEL: test_vmull_lane_s16
return vmull_lane_s16(a, v, 3);
// CHECK: smull {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[3]
}
int64x2_t test_vmull_lane_s32(int32x2_t a, int32x2_t v) {
- // CHECK: test_vmull_lane_s32
+ // CHECK-LABEL: test_vmull_lane_s32
return vmull_lane_s32(a, v, 1);
// CHECK: smull {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
}
uint32x4_t test_vmull_lane_u16(uint16x4_t a, uint16x4_t v) {
- // CHECK: test_vmull_lane_u16
+ // CHECK-LABEL: test_vmull_lane_u16
return vmull_lane_u16(a, v, 3);
// CHECK: umull {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[3]
}
uint64x2_t test_vmull_lane_u32(uint32x2_t a, uint32x2_t v) {
- // CHECK: test_vmull_lane_u32
+ // CHECK-LABEL: test_vmull_lane_u32
return vmull_lane_u32(a, v, 1);
// CHECK: umull {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
}
int32x4_t test_vmull_high_lane_s16(int16x8_t a, int16x4_t v) {
- // CHECK: test_vmull_high_lane_s16
+ // CHECK-LABEL: test_vmull_high_lane_s16
return vmull_high_lane_s16(a, v, 3);
// CHECK: smull2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[3]
}
int64x2_t test_vmull_high_lane_s32(int32x4_t a, int32x2_t v) {
- // CHECK: test_vmull_high_lane_s32
+ // CHECK-LABEL: test_vmull_high_lane_s32
return vmull_high_lane_s32(a, v, 1);
// CHECK: smull2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
}
uint32x4_t test_vmull_high_lane_u16(uint16x8_t a, uint16x4_t v) {
- // CHECK: test_vmull_high_lane_u16
+ // CHECK-LABEL: test_vmull_high_lane_u16
return vmull_high_lane_u16(a, v, 3);
// CHECK: umull2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[3]
}
uint64x2_t test_vmull_high_lane_u32(uint32x4_t a, uint32x2_t v) {
- // CHECK: test_vmull_high_lane_u32
+ // CHECK-LABEL: test_vmull_high_lane_u32
return vmull_high_lane_u32(a, v, 1);
// CHECK: umull2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
}
int32x4_t test_vmull_laneq_s16(int16x4_t a, int16x8_t v) {
- // CHECK: test_vmull_laneq_s16
+ // CHECK-LABEL: test_vmull_laneq_s16
return vmull_laneq_s16(a, v, 7);
// CHECK: smull {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[7]
}
int64x2_t test_vmull_laneq_s32(int32x2_t a, int32x4_t v) {
- // CHECK: test_vmull_laneq_s32
+ // CHECK-LABEL: test_vmull_laneq_s32
return vmull_laneq_s32(a, v, 3);
// CHECK: smull {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
}
uint32x4_t test_vmull_laneq_u16(uint16x4_t a, uint16x8_t v) {
- // CHECK: test_vmull_laneq_u16
+ // CHECK-LABEL: test_vmull_laneq_u16
return vmull_laneq_u16(a, v, 7);
// CHECK: umull {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[7]
}
uint64x2_t test_vmull_laneq_u32(uint32x2_t a, uint32x4_t v) {
- // CHECK: test_vmull_laneq_u32
+ // CHECK-LABEL: test_vmull_laneq_u32
return vmull_laneq_u32(a, v, 3);
// CHECK: umull {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
}
int32x4_t test_vmull_high_laneq_s16(int16x8_t a, int16x8_t v) {
- // CHECK: test_vmull_high_laneq_s16
+ // CHECK-LABEL: test_vmull_high_laneq_s16
return vmull_high_laneq_s16(a, v, 7);
// CHECK: smull2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[7]
}
int64x2_t test_vmull_high_laneq_s32(int32x4_t a, int32x4_t v) {
- // CHECK: test_vmull_high_laneq_s32
+ // CHECK-LABEL: test_vmull_high_laneq_s32
return vmull_high_laneq_s32(a, v, 3);
// CHECK: smull2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
}
uint32x4_t test_vmull_high_laneq_u16(uint16x8_t a, uint16x8_t v) {
- // CHECK: test_vmull_high_laneq_u16
+ // CHECK-LABEL: test_vmull_high_laneq_u16
return vmull_high_laneq_u16(a, v, 7);
// CHECK: umull2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[7]
}
uint64x2_t test_vmull_high_laneq_u32(uint32x4_t a, uint32x4_t v) {
- // CHECK: test_vmull_high_laneq_u32
+ // CHECK-LABEL: test_vmull_high_laneq_u32
return vmull_high_laneq_u32(a, v, 3);
// CHECK: umull2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
}
int32x4_t test_vqdmlal_lane_s16(int32x4_t a, int16x4_t b, int16x4_t v) {
- // CHECK: test_vqdmlal_lane_s16
+ // CHECK-LABEL: test_vqdmlal_lane_s16
return vqdmlal_lane_s16(a, b, v, 3);
// CHECK: sqdmlal {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[3]
}
int64x2_t test_vqdmlal_lane_s32(int64x2_t a, int32x2_t b, int32x2_t v) {
- // CHECK: test_vqdmlal_lane_s32
+ // CHECK-LABEL: test_vqdmlal_lane_s32
return vqdmlal_lane_s32(a, b, v, 1);
// CHECK: sqdmlal {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
}
int32x4_t test_vqdmlal_high_lane_s16(int32x4_t a, int16x8_t b, int16x4_t v) {
- // CHECK: test_vqdmlal_high_lane_s16
+ // CHECK-LABEL: test_vqdmlal_high_lane_s16
return vqdmlal_high_lane_s16(a, b, v, 3);
// CHECK: sqdmlal2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[3]
}
int64x2_t test_vqdmlal_high_lane_s32(int64x2_t a, int32x4_t b, int32x2_t v) {
- // CHECK: test_vqdmlal_high_lane_s32
+ // CHECK-LABEL: test_vqdmlal_high_lane_s32
return vqdmlal_high_lane_s32(a, b, v, 1);
// CHECK: sqdmlal2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
}
int32x4_t test_vqdmlsl_lane_s16(int32x4_t a, int16x4_t b, int16x4_t v) {
- // CHECK: test_vqdmlsl_lane_s16
+ // CHECK-LABEL: test_vqdmlsl_lane_s16
return vqdmlsl_lane_s16(a, b, v, 3);
// CHECK: sqdmlsl {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[3]
}
int64x2_t test_vqdmlsl_lane_s32(int64x2_t a, int32x2_t b, int32x2_t v) {
- // CHECK: test_vqdmlsl_lane_s32
+ // CHECK-LABEL: test_vqdmlsl_lane_s32
return vqdmlsl_lane_s32(a, b, v, 1);
// CHECK: sqdmlsl {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
}
int32x4_t test_vqdmlsl_high_lane_s16(int32x4_t a, int16x8_t b, int16x4_t v) {
- // CHECK: test_vqdmlsl_high_lane_s16
+ // CHECK-LABEL: test_vqdmlsl_high_lane_s16
return vqdmlsl_high_lane_s16(a, b, v, 3);
// CHECK: sqdmlsl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[3]
}
int64x2_t test_vqdmlsl_high_lane_s32(int64x2_t a, int32x4_t b, int32x2_t v) {
- // CHECK: test_vqdmlsl_high_lane_s32
+ // CHECK-LABEL: test_vqdmlsl_high_lane_s32
return vqdmlsl_high_lane_s32(a, b, v, 1);
// CHECK: sqdmlsl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
}
int32x4_t test_vqdmull_lane_s16(int16x4_t a, int16x4_t v) {
- // CHECK: test_vqdmull_lane_s16
+ // CHECK-LABEL: test_vqdmull_lane_s16
return vqdmull_lane_s16(a, v, 3);
// CHECK: sqdmull {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[3]
}
int64x2_t test_vqdmull_lane_s32(int32x2_t a, int32x2_t v) {
- // CHECK: test_vqdmull_lane_s32
+ // CHECK-LABEL: test_vqdmull_lane_s32
return vqdmull_lane_s32(a, v, 1);
// CHECK: sqdmull {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
}
int32x4_t test_vqdmull_laneq_s16(int16x4_t a, int16x8_t v) {
- // CHECK: test_vqdmull_laneq_s16
+ // CHECK-LABEL: test_vqdmull_laneq_s16
return vqdmull_laneq_s16(a, v, 3);
// CHECK: sqdmull {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[3]
}
int64x2_t test_vqdmull_laneq_s32(int32x2_t a, int32x4_t v) {
- // CHECK: test_vqdmull_laneq_s32
+ // CHECK-LABEL: test_vqdmull_laneq_s32
return vqdmull_laneq_s32(a, v, 3);
// CHECK: sqdmull {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
}
int32x4_t test_vqdmull_high_lane_s16(int16x8_t a, int16x4_t v) {
- // CHECK: test_vqdmull_high_lane_s16
+ // CHECK-LABEL: test_vqdmull_high_lane_s16
return vqdmull_high_lane_s16(a, v, 3);
// CHECK: sqdmull2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[3]
}
int64x2_t test_vqdmull_high_lane_s32(int32x4_t a, int32x2_t v) {
- // CHECK: test_vqdmull_high_lane_s32
+ // CHECK-LABEL: test_vqdmull_high_lane_s32
return vqdmull_high_lane_s32(a, v, 1);
// CHECK: sqdmull2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
}
int32x4_t test_vqdmull_high_laneq_s16(int16x8_t a, int16x8_t v) {
- // CHECK: test_vqdmull_high_laneq_s16
+ // CHECK-LABEL: test_vqdmull_high_laneq_s16
return vqdmull_high_laneq_s16(a, v, 7);
// CHECK: sqdmull2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[7]
}
int64x2_t test_vqdmull_high_laneq_s32(int32x4_t a, int32x4_t v) {
- // CHECK: test_vqdmull_high_laneq_s32
+ // CHECK-LABEL: test_vqdmull_high_laneq_s32
return vqdmull_high_laneq_s32(a, v, 3);
// CHECK: sqdmull2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
}
int16x4_t test_vqdmulh_lane_s16(int16x4_t a, int16x4_t v) {
- // CHECK: test_vqdmulh_lane_s16
+ // CHECK-LABEL: test_vqdmulh_lane_s16
return vqdmulh_lane_s16(a, v, 3);
// CHECK: sqdmulh {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[3]
}
int16x8_t test_vqdmulhq_lane_s16(int16x8_t a, int16x4_t v) {
- // CHECK: test_vqdmulhq_lane_s16
+ // CHECK-LABEL: test_vqdmulhq_lane_s16
return vqdmulhq_lane_s16(a, v, 3);
// CHECK: sqdmulh {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[3]
}
int32x2_t test_vqdmulh_lane_s32(int32x2_t a, int32x2_t v) {
- // CHECK: test_vqdmulh_lane_s32
+ // CHECK-LABEL: test_vqdmulh_lane_s32
return vqdmulh_lane_s32(a, v, 1);
// CHECK: sqdmulh {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
}
int32x4_t test_vqdmulhq_lane_s32(int32x4_t a, int32x2_t v) {
- // CHECK: test_vqdmulhq_lane_s32
+ // CHECK-LABEL: test_vqdmulhq_lane_s32
return vqdmulhq_lane_s32(a, v, 1);
// CHECK: sqdmulh {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
}
int16x4_t test_vqrdmulh_lane_s16(int16x4_t a, int16x4_t v) {
- // CHECK: test_vqrdmulh_lane_s16
+ // CHECK-LABEL: test_vqrdmulh_lane_s16
return vqrdmulh_lane_s16(a, v, 3);
// CHECK: sqrdmulh {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[3]
}
int16x8_t test_vqrdmulhq_lane_s16(int16x8_t a, int16x4_t v) {
- // CHECK: test_vqrdmulhq_lane_s16
+ // CHECK-LABEL: test_vqrdmulhq_lane_s16
return vqrdmulhq_lane_s16(a, v, 3);
// CHECK: sqrdmulh {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[3]
}
int32x2_t test_vqrdmulh_lane_s32(int32x2_t a, int32x2_t v) {
- // CHECK: test_vqrdmulh_lane_s32
+ // CHECK-LABEL: test_vqrdmulh_lane_s32
return vqrdmulh_lane_s32(a, v, 1);
// CHECK: sqrdmulh {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
}
int32x4_t test_vqrdmulhq_lane_s32(int32x4_t a, int32x2_t v) {
- // CHECK: test_vqrdmulhq_lane_s32
+ // CHECK-LABEL: test_vqrdmulhq_lane_s32
return vqrdmulhq_lane_s32(a, v, 1);
// CHECK: sqrdmulh {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
}
float32x2_t test_vmul_lane_f32(float32x2_t a, float32x2_t v) {
- // CHECK: test_vmul_lane_f32
+ // CHECK-LABEL: test_vmul_lane_f32
return vmul_lane_f32(a, v, 1);
// CHECK: fmul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
}
float64x1_t test_vmul_lane_f64(float64x1_t a, float64x1_t v) {
- // CHECK: test_vmul_lane_f64
+ // CHECK-LABEL: test_vmul_lane_f64
return vmul_lane_f64(a, v, 0);
- // CHECK: fmul {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[0]
+ // CHECK: fmul {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+\.d\[0\]|d[0-9]+}}
}
float32x4_t test_vmulq_lane_f32(float32x4_t a, float32x2_t v) {
- // CHECK: test_vmulq_lane_f32
+ // CHECK-LABEL: test_vmulq_lane_f32
return vmulq_lane_f32(a, v, 1);
// CHECK: fmul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
}
float64x2_t test_vmulq_lane_f64(float64x2_t a, float64x1_t v) {
- // CHECK: test_vmulq_lane_f64
+ // CHECK-LABEL: test_vmulq_lane_f64
return vmulq_lane_f64(a, v, 0);
// CHECK: fmul {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
}
float32x2_t test_vmul_laneq_f32(float32x2_t a, float32x4_t v) {
- // CHECK: test_vmul_laneq_f32
+ // CHECK-LABEL: test_vmul_laneq_f32
return vmul_laneq_f32(a, v, 3);
// CHECK: fmul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
}
float64x1_t test_vmul_laneq_f64(float64x1_t a, float64x2_t v) {
- // CHECK: test_vmul_laneq_f64
+ // CHECK-LABEL: test_vmul_laneq_f64
return vmul_laneq_f64(a, v, 1);
// CHECK: fmul {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[1]
}
float32x4_t test_vmulq_laneq_f32(float32x4_t a, float32x4_t v) {
- // CHECK: test_vmulq_laneq_f32
+ // CHECK-LABEL: test_vmulq_laneq_f32
return vmulq_laneq_f32(a, v, 3);
// CHECK: fmul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
}
float64x2_t test_vmulq_laneq_f64(float64x2_t a, float64x2_t v) {
- // CHECK: test_vmulq_laneq_f64
+ // CHECK-LABEL: test_vmulq_laneq_f64
return vmulq_laneq_f64(a, v, 1);
// CHECK: fmul {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.d[1]
}
float32x2_t test_vmulx_lane_f32(float32x2_t a, float32x2_t v) {
- // CHECK: test_vmulx_lane_f32
+ // CHECK-LABEL: test_vmulx_lane_f32
return vmulx_lane_f32(a, v, 1);
// CHECK: fmulx {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
}
float32x4_t test_vmulxq_lane_f32(float32x4_t a, float32x2_t v) {
- // CHECK: test_vmulxq_lane_f32
+ // CHECK-LABEL: test_vmulxq_lane_f32
return vmulxq_lane_f32(a, v, 1);
// CHECK: fmulx {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
}
float64x2_t test_vmulxq_lane_f64(float64x2_t a, float64x1_t v) {
- // CHECK: test_vmulxq_lane_f64
+ // CHECK-LABEL: test_vmulxq_lane_f64
return vmulxq_lane_f64(a, v, 0);
// CHECK: fmulx {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
}
float32x2_t test_vmulx_laneq_f32(float32x2_t a, float32x4_t v) {
- // CHECK: test_vmulx_laneq_f32
+ // CHECK-LABEL: test_vmulx_laneq_f32
return vmulx_laneq_f32(a, v, 3);
// CHECK: fmulx {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
}
float32x4_t test_vmulxq_laneq_f32(float32x4_t a, float32x4_t v) {
- // CHECK: test_vmulxq_laneq_f32
+ // CHECK-LABEL: test_vmulxq_laneq_f32
return vmulxq_laneq_f32(a, v, 3);
// CHECK: fmulx {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
}
float64x2_t test_vmulxq_laneq_f64(float64x2_t a, float64x2_t v) {
- // CHECK: test_vmulxq_laneq_f64
+ // CHECK-LABEL: test_vmulxq_laneq_f64
return vmulxq_laneq_f64(a, v, 1);
// CHECK: fmulx {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.d[1]
}
int16x4_t test_vmla_lane_s16_0(int16x4_t a, int16x4_t b, int16x4_t v) {
- // CHECK: test_vmla_lane_s16_0
+ // CHECK-LABEL: test_vmla_lane_s16_0
return vmla_lane_s16(a, b, v, 0);
// CHECK: mla {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
int16x8_t test_vmlaq_lane_s16_0(int16x8_t a, int16x8_t b, int16x4_t v) {
- // CHECK: test_vmlaq_lane_s16_0
+ // CHECK-LABEL: test_vmlaq_lane_s16_0
return vmlaq_lane_s16(a, b, v, 0);
// CHECK: mla {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
int32x2_t test_vmla_lane_s32_0(int32x2_t a, int32x2_t b, int32x2_t v) {
- // CHECK: test_vmla_lane_s32_0
+ // CHECK-LABEL: test_vmla_lane_s32_0
return vmla_lane_s32(a, b, v, 0);
// CHECK: mla {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmlaq_lane_s32_0(int32x4_t a, int32x4_t b, int32x2_t v) {
- // CHECK: test_vmlaq_lane_s32_0
+ // CHECK-LABEL: test_vmlaq_lane_s32_0
return vmlaq_lane_s32(a, b, v, 0);
// CHECK: mla {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
int16x4_t test_vmla_laneq_s16_0(int16x4_t a, int16x4_t b, int16x8_t v) {
- // CHECK: test_vmla_laneq_s16_0
+ // CHECK-LABEL: test_vmla_laneq_s16_0
return vmla_laneq_s16(a, b, v, 0);
// CHECK: mla {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
int16x8_t test_vmlaq_laneq_s16_0(int16x8_t a, int16x8_t b, int16x8_t v) {
- // CHECK: test_vmlaq_laneq_s16_0
+ // CHECK-LABEL: test_vmlaq_laneq_s16_0
return vmlaq_laneq_s16(a, b, v, 0);
// CHECK: mla {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
int32x2_t test_vmla_laneq_s32_0(int32x2_t a, int32x2_t b, int32x4_t v) {
- // CHECK: test_vmla_laneq_s32_0
+ // CHECK-LABEL: test_vmla_laneq_s32_0
return vmla_laneq_s32(a, b, v, 0);
// CHECK: mla {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmlaq_laneq_s32_0(int32x4_t a, int32x4_t b, int32x4_t v) {
- // CHECK: test_vmlaq_laneq_s32_0
+ // CHECK-LABEL: test_vmlaq_laneq_s32_0
return vmlaq_laneq_s32(a, b, v, 0);
// CHECK: mla {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
int16x4_t test_vmls_lane_s16_0(int16x4_t a, int16x4_t b, int16x4_t v) {
- // CHECK: test_vmls_lane_s16_0
+ // CHECK-LABEL: test_vmls_lane_s16_0
return vmls_lane_s16(a, b, v, 0);
// CHECK: mls {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
int16x8_t test_vmlsq_lane_s16_0(int16x8_t a, int16x8_t b, int16x4_t v) {
- // CHECK: test_vmlsq_lane_s16_0
+ // CHECK-LABEL: test_vmlsq_lane_s16_0
return vmlsq_lane_s16(a, b, v, 0);
// CHECK: mls {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
int32x2_t test_vmls_lane_s32_0(int32x2_t a, int32x2_t b, int32x2_t v) {
- // CHECK: test_vmls_lane_s32_0
+ // CHECK-LABEL: test_vmls_lane_s32_0
return vmls_lane_s32(a, b, v, 0);
// CHECK: mls {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmlsq_lane_s32_0(int32x4_t a, int32x4_t b, int32x2_t v) {
- // CHECK: test_vmlsq_lane_s32_0
+ // CHECK-LABEL: test_vmlsq_lane_s32_0
return vmlsq_lane_s32(a, b, v, 0);
// CHECK: mls {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
int16x4_t test_vmls_laneq_s16_0(int16x4_t a, int16x4_t b, int16x8_t v) {
- // CHECK: test_vmls_laneq_s16_0
+ // CHECK-LABEL: test_vmls_laneq_s16_0
return vmls_laneq_s16(a, b, v, 0);
// CHECK: mls {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
int16x8_t test_vmlsq_laneq_s16_0(int16x8_t a, int16x8_t b, int16x8_t v) {
- // CHECK: test_vmlsq_laneq_s16_0
+ // CHECK-LABEL: test_vmlsq_laneq_s16_0
return vmlsq_laneq_s16(a, b, v, 0);
// CHECK: mls {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
int32x2_t test_vmls_laneq_s32_0(int32x2_t a, int32x2_t b, int32x4_t v) {
- // CHECK: test_vmls_laneq_s32_0
+ // CHECK-LABEL: test_vmls_laneq_s32_0
return vmls_laneq_s32(a, b, v, 0);
// CHECK: mls {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmlsq_laneq_s32_0(int32x4_t a, int32x4_t b, int32x4_t v) {
- // CHECK: test_vmlsq_laneq_s32_0
+ // CHECK-LABEL: test_vmlsq_laneq_s32_0
return vmlsq_laneq_s32(a, b, v, 0);
// CHECK: mls {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
int16x4_t test_vmul_lane_s16_0(int16x4_t a, int16x4_t v) {
- // CHECK: test_vmul_lane_s16_0
+ // CHECK-LABEL: test_vmul_lane_s16_0
return vmul_lane_s16(a, v, 0);
// CHECK: mul {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
int16x8_t test_vmulq_lane_s16_0(int16x8_t a, int16x4_t v) {
- // CHECK: test_vmulq_lane_s16_0
+ // CHECK-LABEL: test_vmulq_lane_s16_0
return vmulq_lane_s16(a, v, 0);
// CHECK: mul {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
int32x2_t test_vmul_lane_s32_0(int32x2_t a, int32x2_t v) {
- // CHECK: test_vmul_lane_s32_0
+ // CHECK-LABEL: test_vmul_lane_s32_0
return vmul_lane_s32(a, v, 0);
// CHECK: mul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmulq_lane_s32_0(int32x4_t a, int32x2_t v) {
- // CHECK: test_vmulq_lane_s32_0
+ // CHECK-LABEL: test_vmulq_lane_s32_0
return vmulq_lane_s32(a, v, 0);
// CHECK: mul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
uint16x4_t test_vmul_lane_u16_0(uint16x4_t a, uint16x4_t v) {
- // CHECK: test_vmul_lane_u16_0
+ // CHECK-LABEL: test_vmul_lane_u16_0
return vmul_lane_u16(a, v, 0);
// CHECK: mul {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
uint16x8_t test_vmulq_lane_u16_0(uint16x8_t a, uint16x4_t v) {
- // CHECK: test_vmulq_lane_u16_0
+ // CHECK-LABEL: test_vmulq_lane_u16_0
return vmulq_lane_u16(a, v, 0);
// CHECK: mul {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
uint32x2_t test_vmul_lane_u32_0(uint32x2_t a, uint32x2_t v) {
- // CHECK: test_vmul_lane_u32_0
+ // CHECK-LABEL: test_vmul_lane_u32_0
return vmul_lane_u32(a, v, 0);
// CHECK: mul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
uint32x4_t test_vmulq_lane_u32_0(uint32x4_t a, uint32x2_t v) {
- // CHECK: test_vmulq_lane_u32_0
+ // CHECK-LABEL: test_vmulq_lane_u32_0
return vmulq_lane_u32(a, v, 0);
// CHECK: mul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
int16x4_t test_vmul_laneq_s16_0(int16x4_t a, int16x8_t v) {
- // CHECK: test_vmul_laneq_s16_0
+ // CHECK-LABEL: test_vmul_laneq_s16_0
return vmul_laneq_s16(a, v, 0);
// CHECK: mul {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
int16x8_t test_vmulq_laneq_s16_0(int16x8_t a, int16x8_t v) {
- // CHECK: test_vmulq_laneq_s16_0
+ // CHECK-LABEL: test_vmulq_laneq_s16_0
return vmulq_laneq_s16(a, v, 0);
// CHECK: mul {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
int32x2_t test_vmul_laneq_s32_0(int32x2_t a, int32x4_t v) {
- // CHECK: test_vmul_laneq_s32_0
+ // CHECK-LABEL: test_vmul_laneq_s32_0
return vmul_laneq_s32(a, v, 0);
// CHECK: mul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmulq_laneq_s32_0(int32x4_t a, int32x4_t v) {
- // CHECK: test_vmulq_laneq_s32_0
+ // CHECK-LABEL: test_vmulq_laneq_s32_0
return vmulq_laneq_s32(a, v, 0);
// CHECK: mul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
uint16x4_t test_vmul_laneq_u16_0(uint16x4_t a, uint16x8_t v) {
- // CHECK: test_vmul_laneq_u16_0
+ // CHECK-LABEL: test_vmul_laneq_u16_0
return vmul_laneq_u16(a, v, 0);
// CHECK: mul {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
uint16x8_t test_vmulq_laneq_u16_0(uint16x8_t a, uint16x8_t v) {
- // CHECK: test_vmulq_laneq_u16_0
+ // CHECK-LABEL: test_vmulq_laneq_u16_0
return vmulq_laneq_u16(a, v, 0);
// CHECK: mul {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
uint32x2_t test_vmul_laneq_u32_0(uint32x2_t a, uint32x4_t v) {
- // CHECK: test_vmul_laneq_u32_0
+ // CHECK-LABEL: test_vmul_laneq_u32_0
return vmul_laneq_u32(a, v, 0);
// CHECK: mul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
uint32x4_t test_vmulq_laneq_u32_0(uint32x4_t a, uint32x4_t v) {
- // CHECK: test_vmulq_laneq_u32_0
+ // CHECK-LABEL: test_vmulq_laneq_u32_0
return vmulq_laneq_u32(a, v, 0);
// CHECK: mul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
float32x2_t test_vfma_lane_f32_0(float32x2_t a, float32x2_t b, float32x2_t v) {
- // CHECK: test_vfma_lane_f32_0
+ // CHECK-LABEL: test_vfma_lane_f32_0
return vfma_lane_f32(a, b, v, 0);
// CHECK: fmla {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
float32x4_t test_vfmaq_lane_f32_0(float32x4_t a, float32x4_t b, float32x2_t v) {
- // CHECK: test_vfmaq_lane_f32_0
+ // CHECK-LABEL: test_vfmaq_lane_f32_0
return vfmaq_lane_f32(a, b, v, 0);
// CHECK: fmla {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
float32x2_t test_vfma_laneq_f32_0(float32x2_t a, float32x2_t b, float32x4_t v) {
- // CHECK: test_vfma_laneq_f32_0
+ // CHECK-LABEL: test_vfma_laneq_f32_0
return vfma_laneq_f32(a, b, v, 0);
// CHECK: fmla {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
float32x4_t test_vfmaq_laneq_f32_0(float32x4_t a, float32x4_t b, float32x4_t v) {
- // CHECK: test_vfmaq_laneq_f32_0
+ // CHECK-LABEL: test_vfmaq_laneq_f32_0
return vfmaq_laneq_f32(a, b, v, 0);
// CHECK: fmla {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
float32x2_t test_vfms_lane_f32_0(float32x2_t a, float32x2_t b, float32x2_t v) {
- // CHECK: test_vfms_lane_f32_0
+ // CHECK-LABEL: test_vfms_lane_f32_0
return vfms_lane_f32(a, b, v, 0);
// CHECK: fmls {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
float32x4_t test_vfmsq_lane_f32_0(float32x4_t a, float32x4_t b, float32x2_t v) {
- // CHECK: test_vfmsq_lane_f32_0
+ // CHECK-LABEL: test_vfmsq_lane_f32_0
return vfmsq_lane_f32(a, b, v, 0);
// CHECK: fmls {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
float32x2_t test_vfms_laneq_f32_0(float32x2_t a, float32x2_t b, float32x4_t v) {
- // CHECK: test_vfms_laneq_f32_0
+ // CHECK-LABEL: test_vfms_laneq_f32_0
return vfms_laneq_f32(a, b, v, 0);
// CHECK: fmls {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
float32x4_t test_vfmsq_laneq_f32_0(float32x4_t a, float32x4_t b, float32x4_t v) {
- // CHECK: test_vfmsq_laneq_f32_0
+ // CHECK-LABEL: test_vfmsq_laneq_f32_0
return vfmsq_laneq_f32(a, b, v, 0);
// CHECK: fmls {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
float64x2_t test_vfmaq_laneq_f64_0(float64x2_t a, float64x2_t b, float64x2_t v) {
- // CHECK: test_vfmaq_laneq_f64_0
+ // CHECK-LABEL: test_vfmaq_laneq_f64_0
return vfmaq_laneq_f64(a, b, v, 0);
// CHECK: fmla {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
}
float64x2_t test_vfmsq_laneq_f64_0(float64x2_t a, float64x2_t b, float64x2_t v) {
- // CHECK: test_vfmsq_laneq_f64_0
+ // CHECK-LABEL: test_vfmsq_laneq_f64_0
return vfmsq_laneq_f64(a, b, v, 0);
// CHECK: fmls {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
}
int32x4_t test_vmlal_lane_s16_0(int32x4_t a, int16x4_t b, int16x4_t v) {
- // CHECK: test_vmlal_lane_s16_0
+ // CHECK-LABEL: test_vmlal_lane_s16_0
return vmlal_lane_s16(a, b, v, 0);
// CHECK: smlal {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vmlal_lane_s32_0(int64x2_t a, int32x2_t b, int32x2_t v) {
- // CHECK: test_vmlal_lane_s32_0
+ // CHECK-LABEL: test_vmlal_lane_s32_0
return vmlal_lane_s32(a, b, v, 0);
// CHECK: smlal {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmlal_laneq_s16_0(int32x4_t a, int16x4_t b, int16x8_t v) {
- // CHECK: test_vmlal_laneq_s16_0
+ // CHECK-LABEL: test_vmlal_laneq_s16_0
return vmlal_laneq_s16(a, b, v, 0);
// CHECK: smlal {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vmlal_laneq_s32_0(int64x2_t a, int32x2_t b, int32x4_t v) {
- // CHECK: test_vmlal_laneq_s32_0
+ // CHECK-LABEL: test_vmlal_laneq_s32_0
return vmlal_laneq_s32(a, b, v, 0);
// CHECK: smlal {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmlal_high_lane_s16_0(int32x4_t a, int16x8_t b, int16x4_t v) {
- // CHECK: test_vmlal_high_lane_s16_0
+ // CHECK-LABEL: test_vmlal_high_lane_s16_0
return vmlal_high_lane_s16(a, b, v, 0);
// CHECK: smlal2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vmlal_high_lane_s32_0(int64x2_t a, int32x4_t b, int32x2_t v) {
- // CHECK: test_vmlal_high_lane_s32_0
+ // CHECK-LABEL: test_vmlal_high_lane_s32_0
return vmlal_high_lane_s32(a, b, v, 0);
// CHECK: smlal2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmlal_high_laneq_s16_0(int32x4_t a, int16x8_t b, int16x8_t v) {
- // CHECK: test_vmlal_high_laneq_s16_0
+ // CHECK-LABEL: test_vmlal_high_laneq_s16_0
return vmlal_high_laneq_s16(a, b, v, 0);
// CHECK: smlal2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vmlal_high_laneq_s32_0(int64x2_t a, int32x4_t b, int32x4_t v) {
- // CHECK: test_vmlal_high_laneq_s32_0
+ // CHECK-LABEL: test_vmlal_high_laneq_s32_0
return vmlal_high_laneq_s32(a, b, v, 0);
// CHECK: smlal2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmlsl_lane_s16_0(int32x4_t a, int16x4_t b, int16x4_t v) {
- // CHECK: test_vmlsl_lane_s16_0
+ // CHECK-LABEL: test_vmlsl_lane_s16_0
return vmlsl_lane_s16(a, b, v, 0);
// CHECK: smlsl {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vmlsl_lane_s32_0(int64x2_t a, int32x2_t b, int32x2_t v) {
- // CHECK: test_vmlsl_lane_s32_0
+ // CHECK-LABEL: test_vmlsl_lane_s32_0
return vmlsl_lane_s32(a, b, v, 0);
// CHECK: smlsl {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmlsl_laneq_s16_0(int32x4_t a, int16x4_t b, int16x8_t v) {
- // CHECK: test_vmlsl_laneq_s16_0
+ // CHECK-LABEL: test_vmlsl_laneq_s16_0
return vmlsl_laneq_s16(a, b, v, 0);
// CHECK: smlsl {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vmlsl_laneq_s32_0(int64x2_t a, int32x2_t b, int32x4_t v) {
- // CHECK: test_vmlsl_laneq_s32_0
+ // CHECK-LABEL: test_vmlsl_laneq_s32_0
return vmlsl_laneq_s32(a, b, v, 0);
// CHECK: smlsl {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmlsl_high_lane_s16_0(int32x4_t a, int16x8_t b, int16x4_t v) {
- // CHECK: test_vmlsl_high_lane_s16_0
+ // CHECK-LABEL: test_vmlsl_high_lane_s16_0
return vmlsl_high_lane_s16(a, b, v, 0);
// CHECK: smlsl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vmlsl_high_lane_s32_0(int64x2_t a, int32x4_t b, int32x2_t v) {
- // CHECK: test_vmlsl_high_lane_s32_0
+ // CHECK-LABEL: test_vmlsl_high_lane_s32_0
return vmlsl_high_lane_s32(a, b, v, 0);
// CHECK: smlsl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmlsl_high_laneq_s16_0(int32x4_t a, int16x8_t b, int16x8_t v) {
- // CHECK: test_vmlsl_high_laneq_s16_0
+ // CHECK-LABEL: test_vmlsl_high_laneq_s16_0
return vmlsl_high_laneq_s16(a, b, v, 0);
// CHECK: smlsl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vmlsl_high_laneq_s32_0(int64x2_t a, int32x4_t b, int32x4_t v) {
- // CHECK: test_vmlsl_high_laneq_s32_0
+ // CHECK-LABEL: test_vmlsl_high_laneq_s32_0
return vmlsl_high_laneq_s32(a, b, v, 0);
// CHECK: smlsl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmlal_lane_u16_0(int32x4_t a, int16x4_t b, int16x4_t v) {
- // CHECK: test_vmlal_lane_u16_0
+ // CHECK-LABEL: test_vmlal_lane_u16_0
return vmlal_lane_u16(a, b, v, 0);
// CHECK: umlal {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vmlal_lane_u32_0(int64x2_t a, int32x2_t b, int32x2_t v) {
- // CHECK: test_vmlal_lane_u32_0
+ // CHECK-LABEL: test_vmlal_lane_u32_0
return vmlal_lane_u32(a, b, v, 0);
// CHECK: umlal {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmlal_laneq_u16_0(int32x4_t a, int16x4_t b, int16x8_t v) {
- // CHECK: test_vmlal_laneq_u16_0
+ // CHECK-LABEL: test_vmlal_laneq_u16_0
return vmlal_laneq_u16(a, b, v, 0);
// CHECK: umlal {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vmlal_laneq_u32_0(int64x2_t a, int32x2_t b, int32x4_t v) {
- // CHECK: test_vmlal_laneq_u32_0
+ // CHECK-LABEL: test_vmlal_laneq_u32_0
return vmlal_laneq_u32(a, b, v, 0);
// CHECK: umlal {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmlal_high_lane_u16_0(int32x4_t a, int16x8_t b, int16x4_t v) {
- // CHECK: test_vmlal_high_lane_u16_0
+ // CHECK-LABEL: test_vmlal_high_lane_u16_0
return vmlal_high_lane_u16(a, b, v, 0);
// CHECK: umlal2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vmlal_high_lane_u32_0(int64x2_t a, int32x4_t b, int32x2_t v) {
- // CHECK: test_vmlal_high_lane_u32_0
+ // CHECK-LABEL: test_vmlal_high_lane_u32_0
return vmlal_high_lane_u32(a, b, v, 0);
// CHECK: umlal2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmlal_high_laneq_u16_0(int32x4_t a, int16x8_t b, int16x8_t v) {
- // CHECK: test_vmlal_high_laneq_u16_0
+ // CHECK-LABEL: test_vmlal_high_laneq_u16_0
return vmlal_high_laneq_u16(a, b, v, 0);
// CHECK: umlal2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vmlal_high_laneq_u32_0(int64x2_t a, int32x4_t b, int32x4_t v) {
- // CHECK: test_vmlal_high_laneq_u32_0
+ // CHECK-LABEL: test_vmlal_high_laneq_u32_0
return vmlal_high_laneq_u32(a, b, v, 0);
// CHECK: umlal2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmlsl_lane_u16_0(int32x4_t a, int16x4_t b, int16x4_t v) {
- // CHECK: test_vmlsl_lane_u16_0
+ // CHECK-LABEL: test_vmlsl_lane_u16_0
return vmlsl_lane_u16(a, b, v, 0);
// CHECK: umlsl {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vmlsl_lane_u32_0(int64x2_t a, int32x2_t b, int32x2_t v) {
- // CHECK: test_vmlsl_lane_u32_0
+ // CHECK-LABEL: test_vmlsl_lane_u32_0
return vmlsl_lane_u32(a, b, v, 0);
// CHECK: umlsl {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmlsl_laneq_u16_0(int32x4_t a, int16x4_t b, int16x8_t v) {
- // CHECK: test_vmlsl_laneq_u16_0
+ // CHECK-LABEL: test_vmlsl_laneq_u16_0
return vmlsl_laneq_u16(a, b, v, 0);
// CHECK: umlsl {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vmlsl_laneq_u32_0(int64x2_t a, int32x2_t b, int32x4_t v) {
- // CHECK: test_vmlsl_laneq_u32_0
+ // CHECK-LABEL: test_vmlsl_laneq_u32_0
return vmlsl_laneq_u32(a, b, v, 0);
// CHECK: umlsl {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmlsl_high_lane_u16_0(int32x4_t a, int16x8_t b, int16x4_t v) {
- // CHECK: test_vmlsl_high_lane_u16_0
+ // CHECK-LABEL: test_vmlsl_high_lane_u16_0
return vmlsl_high_lane_u16(a, b, v, 0);
// CHECK: umlsl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vmlsl_high_lane_u32_0(int64x2_t a, int32x4_t b, int32x2_t v) {
- // CHECK: test_vmlsl_high_lane_u32_0
+ // CHECK-LABEL: test_vmlsl_high_lane_u32_0
return vmlsl_high_lane_u32(a, b, v, 0);
// CHECK: umlsl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmlsl_high_laneq_u16_0(int32x4_t a, int16x8_t b, int16x8_t v) {
- // CHECK: test_vmlsl_high_laneq_u16_0
+ // CHECK-LABEL: test_vmlsl_high_laneq_u16_0
return vmlsl_high_laneq_u16(a, b, v, 0);
// CHECK: umlsl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vmlsl_high_laneq_u32_0(int64x2_t a, int32x4_t b, int32x4_t v) {
- // CHECK: test_vmlsl_high_laneq_u32_0
+ // CHECK-LABEL: test_vmlsl_high_laneq_u32_0
return vmlsl_high_laneq_u32(a, b, v, 0);
// CHECK: umlsl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmull_lane_s16_0(int16x4_t a, int16x4_t v) {
- // CHECK: test_vmull_lane_s16_0
+ // CHECK-LABEL: test_vmull_lane_s16_0
return vmull_lane_s16(a, v, 0);
// CHECK: smull {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vmull_lane_s32_0(int32x2_t a, int32x2_t v) {
- // CHECK: test_vmull_lane_s32_0
+ // CHECK-LABEL: test_vmull_lane_s32_0
return vmull_lane_s32(a, v, 0);
// CHECK: smull {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
uint32x4_t test_vmull_lane_u16_0(uint16x4_t a, uint16x4_t v) {
- // CHECK: test_vmull_lane_u16_0
+ // CHECK-LABEL: test_vmull_lane_u16_0
return vmull_lane_u16(a, v, 0);
// CHECK: umull {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
uint64x2_t test_vmull_lane_u32_0(uint32x2_t a, uint32x2_t v) {
- // CHECK: test_vmull_lane_u32_0
+ // CHECK-LABEL: test_vmull_lane_u32_0
return vmull_lane_u32(a, v, 0);
// CHECK: umull {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmull_high_lane_s16_0(int16x8_t a, int16x4_t v) {
- // CHECK: test_vmull_high_lane_s16_0
+ // CHECK-LABEL: test_vmull_high_lane_s16_0
return vmull_high_lane_s16(a, v, 0);
// CHECK: smull2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vmull_high_lane_s32_0(int32x4_t a, int32x2_t v) {
- // CHECK: test_vmull_high_lane_s32_0
+ // CHECK-LABEL: test_vmull_high_lane_s32_0
return vmull_high_lane_s32(a, v, 0);
// CHECK: smull2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
uint32x4_t test_vmull_high_lane_u16_0(uint16x8_t a, uint16x4_t v) {
- // CHECK: test_vmull_high_lane_u16_0
+ // CHECK-LABEL: test_vmull_high_lane_u16_0
return vmull_high_lane_u16(a, v, 0);
// CHECK: umull2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
uint64x2_t test_vmull_high_lane_u32_0(uint32x4_t a, uint32x2_t v) {
- // CHECK: test_vmull_high_lane_u32_0
+ // CHECK-LABEL: test_vmull_high_lane_u32_0
return vmull_high_lane_u32(a, v, 0);
// CHECK: umull2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmull_laneq_s16_0(int16x4_t a, int16x8_t v) {
- // CHECK: test_vmull_laneq_s16_0
+ // CHECK-LABEL: test_vmull_laneq_s16_0
return vmull_laneq_s16(a, v, 0);
// CHECK: smull {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vmull_laneq_s32_0(int32x2_t a, int32x4_t v) {
- // CHECK: test_vmull_laneq_s32_0
+ // CHECK-LABEL: test_vmull_laneq_s32_0
return vmull_laneq_s32(a, v, 0);
// CHECK: smull {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
uint32x4_t test_vmull_laneq_u16_0(uint16x4_t a, uint16x8_t v) {
- // CHECK: test_vmull_laneq_u16_0
+ // CHECK-LABEL: test_vmull_laneq_u16_0
return vmull_laneq_u16(a, v, 0);
// CHECK: umull {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
uint64x2_t test_vmull_laneq_u32_0(uint32x2_t a, uint32x4_t v) {
- // CHECK: test_vmull_laneq_u32_0
+ // CHECK-LABEL: test_vmull_laneq_u32_0
return vmull_laneq_u32(a, v, 0);
// CHECK: umull {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vmull_high_laneq_s16_0(int16x8_t a, int16x8_t v) {
- // CHECK: test_vmull_high_laneq_s16_0
+ // CHECK-LABEL: test_vmull_high_laneq_s16_0
return vmull_high_laneq_s16(a, v, 0);
// CHECK: smull2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vmull_high_laneq_s32_0(int32x4_t a, int32x4_t v) {
- // CHECK: test_vmull_high_laneq_s32_0
+ // CHECK-LABEL: test_vmull_high_laneq_s32_0
return vmull_high_laneq_s32(a, v, 0);
// CHECK: smull2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
uint32x4_t test_vmull_high_laneq_u16_0(uint16x8_t a, uint16x8_t v) {
- // CHECK: test_vmull_high_laneq_u16_0
+ // CHECK-LABEL: test_vmull_high_laneq_u16_0
return vmull_high_laneq_u16(a, v, 0);
// CHECK: umull2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
uint64x2_t test_vmull_high_laneq_u32_0(uint32x4_t a, uint32x4_t v) {
- // CHECK: test_vmull_high_laneq_u32_0
+ // CHECK-LABEL: test_vmull_high_laneq_u32_0
return vmull_high_laneq_u32(a, v, 0);
// CHECK: umull2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vqdmlal_lane_s16_0(int32x4_t a, int16x4_t b, int16x4_t v) {
- // CHECK: test_vqdmlal_lane_s16_0
+ // CHECK-LABEL: test_vqdmlal_lane_s16_0
return vqdmlal_lane_s16(a, b, v, 0);
// CHECK: sqdmlal {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vqdmlal_lane_s32_0(int64x2_t a, int32x2_t b, int32x2_t v) {
- // CHECK: test_vqdmlal_lane_s32_0
+ // CHECK-LABEL: test_vqdmlal_lane_s32_0
return vqdmlal_lane_s32(a, b, v, 0);
// CHECK: sqdmlal {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vqdmlal_high_lane_s16_0(int32x4_t a, int16x8_t b, int16x4_t v) {
- // CHECK: test_vqdmlal_high_lane_s16_0
+ // CHECK-LABEL: test_vqdmlal_high_lane_s16_0
return vqdmlal_high_lane_s16(a, b, v, 0);
// CHECK: sqdmlal2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vqdmlal_high_lane_s32_0(int64x2_t a, int32x4_t b, int32x2_t v) {
- // CHECK: test_vqdmlal_high_lane_s32_0
+ // CHECK-LABEL: test_vqdmlal_high_lane_s32_0
return vqdmlal_high_lane_s32(a, b, v, 0);
// CHECK: sqdmlal2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vqdmlsl_lane_s16_0(int32x4_t a, int16x4_t b, int16x4_t v) {
- // CHECK: test_vqdmlsl_lane_s16_0
+ // CHECK-LABEL: test_vqdmlsl_lane_s16_0
return vqdmlsl_lane_s16(a, b, v, 0);
// CHECK: sqdmlsl {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vqdmlsl_lane_s32_0(int64x2_t a, int32x2_t b, int32x2_t v) {
- // CHECK: test_vqdmlsl_lane_s32_0
+ // CHECK-LABEL: test_vqdmlsl_lane_s32_0
return vqdmlsl_lane_s32(a, b, v, 0);
// CHECK: sqdmlsl {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vqdmlsl_high_lane_s16_0(int32x4_t a, int16x8_t b, int16x4_t v) {
- // CHECK: test_vqdmlsl_high_lane_s16_0
+ // CHECK-LABEL: test_vqdmlsl_high_lane_s16_0
return vqdmlsl_high_lane_s16(a, b, v, 0);
// CHECK: sqdmlsl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vqdmlsl_high_lane_s32_0(int64x2_t a, int32x4_t b, int32x2_t v) {
- // CHECK: test_vqdmlsl_high_lane_s32_0
+ // CHECK-LABEL: test_vqdmlsl_high_lane_s32_0
return vqdmlsl_high_lane_s32(a, b, v, 0);
// CHECK: sqdmlsl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vqdmull_lane_s16_0(int16x4_t a, int16x4_t v) {
- // CHECK: test_vqdmull_lane_s16_0
+ // CHECK-LABEL: test_vqdmull_lane_s16_0
return vqdmull_lane_s16(a, v, 0);
// CHECK: sqdmull {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vqdmull_lane_s32_0(int32x2_t a, int32x2_t v) {
- // CHECK: test_vqdmull_lane_s32_0
+ // CHECK-LABEL: test_vqdmull_lane_s32_0
return vqdmull_lane_s32(a, v, 0);
// CHECK: sqdmull {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vqdmull_laneq_s16_0(int16x4_t a, int16x8_t v) {
- // CHECK: test_vqdmull_laneq_s16_0
+ // CHECK-LABEL: test_vqdmull_laneq_s16_0
return vqdmull_laneq_s16(a, v, 0);
// CHECK: sqdmull {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vqdmull_laneq_s32_0(int32x2_t a, int32x4_t v) {
- // CHECK: test_vqdmull_laneq_s32_0
+ // CHECK-LABEL: test_vqdmull_laneq_s32_0
return vqdmull_laneq_s32(a, v, 0);
// CHECK: sqdmull {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vqdmull_high_lane_s16_0(int16x8_t a, int16x4_t v) {
- // CHECK: test_vqdmull_high_lane_s16_0
+ // CHECK-LABEL: test_vqdmull_high_lane_s16_0
return vqdmull_high_lane_s16(a, v, 0);
// CHECK: sqdmull2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vqdmull_high_lane_s32_0(int32x4_t a, int32x2_t v) {
- // CHECK: test_vqdmull_high_lane_s32_0
+ // CHECK-LABEL: test_vqdmull_high_lane_s32_0
return vqdmull_high_lane_s32(a, v, 0);
// CHECK: sqdmull2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vqdmull_high_laneq_s16_0(int16x8_t a, int16x8_t v) {
- // CHECK: test_vqdmull_high_laneq_s16_0
+ // CHECK-LABEL: test_vqdmull_high_laneq_s16_0
return vqdmull_high_laneq_s16(a, v, 0);
// CHECK: sqdmull2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
int64x2_t test_vqdmull_high_laneq_s32_0(int32x4_t a, int32x4_t v) {
- // CHECK: test_vqdmull_high_laneq_s32_0
+ // CHECK-LABEL: test_vqdmull_high_laneq_s32_0
return vqdmull_high_laneq_s32(a, v, 0);
// CHECK: sqdmull2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
int16x4_t test_vqdmulh_lane_s16_0(int16x4_t a, int16x4_t v) {
- // CHECK: test_vqdmulh_lane_s16_0
+ // CHECK-LABEL: test_vqdmulh_lane_s16_0
return vqdmulh_lane_s16(a, v, 0);
// CHECK: sqdmulh {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
int16x8_t test_vqdmulhq_lane_s16_0(int16x8_t a, int16x4_t v) {
- // CHECK: test_vqdmulhq_lane_s16_0
+ // CHECK-LABEL: test_vqdmulhq_lane_s16_0
return vqdmulhq_lane_s16(a, v, 0);
// CHECK: sqdmulh {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
int32x2_t test_vqdmulh_lane_s32_0(int32x2_t a, int32x2_t v) {
- // CHECK: test_vqdmulh_lane_s32_0
+ // CHECK-LABEL: test_vqdmulh_lane_s32_0
return vqdmulh_lane_s32(a, v, 0);
// CHECK: sqdmulh {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vqdmulhq_lane_s32_0(int32x4_t a, int32x2_t v) {
- // CHECK: test_vqdmulhq_lane_s32_0
+ // CHECK-LABEL: test_vqdmulhq_lane_s32_0
return vqdmulhq_lane_s32(a, v, 0);
// CHECK: sqdmulh {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
int16x4_t test_vqrdmulh_lane_s16_0(int16x4_t a, int16x4_t v) {
- // CHECK: test_vqrdmulh_lane_s16_0
+ // CHECK-LABEL: test_vqrdmulh_lane_s16_0
return vqrdmulh_lane_s16(a, v, 0);
// CHECK: sqrdmulh {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
}
int16x8_t test_vqrdmulhq_lane_s16_0(int16x8_t a, int16x4_t v) {
- // CHECK: test_vqrdmulhq_lane_s16_0
+ // CHECK-LABEL: test_vqrdmulhq_lane_s16_0
return vqrdmulhq_lane_s16(a, v, 0);
// CHECK: sqrdmulh {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
}
int32x2_t test_vqrdmulh_lane_s32_0(int32x2_t a, int32x2_t v) {
- // CHECK: test_vqrdmulh_lane_s32_0
+ // CHECK-LABEL: test_vqrdmulh_lane_s32_0
return vqrdmulh_lane_s32(a, v, 0);
// CHECK: sqrdmulh {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
int32x4_t test_vqrdmulhq_lane_s32_0(int32x4_t a, int32x2_t v) {
- // CHECK: test_vqrdmulhq_lane_s32_0
+ // CHECK-LABEL: test_vqrdmulhq_lane_s32_0
return vqrdmulhq_lane_s32(a, v, 0);
// CHECK: sqrdmulh {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
float32x2_t test_vmul_lane_f32_0(float32x2_t a, float32x2_t v) {
- // CHECK: test_vmul_lane_f32_0
+ // CHECK-LABEL: test_vmul_lane_f32_0
return vmul_lane_f32(a, v, 0);
// CHECK: fmul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
float32x4_t test_vmulq_lane_f32_0(float32x4_t a, float32x2_t v) {
- // CHECK: test_vmulq_lane_f32_0
+ // CHECK-LABEL: test_vmulq_lane_f32_0
return vmulq_lane_f32(a, v, 0);
// CHECK: fmul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
float32x2_t test_vmul_laneq_f32_0(float32x2_t a, float32x4_t v) {
- // CHECK: test_vmul_laneq_f32_0
+ // CHECK-LABEL: test_vmul_laneq_f32_0
return vmul_laneq_f32(a, v, 0);
// CHECK: fmul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
float64x1_t test_vmul_laneq_f64_0(float64x1_t a, float64x2_t v) {
- // CHECK: test_vmul_laneq_f64_0
+ // CHECK-LABEL: test_vmul_laneq_f64_0
return vmul_laneq_f64(a, v, 0);
// CHECK: fmul {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[0]
}
float32x4_t test_vmulq_laneq_f32_0(float32x4_t a, float32x4_t v) {
- // CHECK: test_vmulq_laneq_f32_0
+ // CHECK-LABEL: test_vmulq_laneq_f32_0
return vmulq_laneq_f32(a, v, 0);
// CHECK: fmul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
float64x2_t test_vmulq_laneq_f64_0(float64x2_t a, float64x2_t v) {
- // CHECK: test_vmulq_laneq_f64_0
+ // CHECK-LABEL: test_vmulq_laneq_f64_0
return vmulq_laneq_f64(a, v, 0);
// CHECK: fmul {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
}
float32x2_t test_vmulx_lane_f32_0(float32x2_t a, float32x2_t v) {
- // CHECK: test_vmulx_lane_f32_0
+ // CHECK-LABEL: test_vmulx_lane_f32_0
return vmulx_lane_f32(a, v, 0);
// CHECK: fmulx {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
float32x4_t test_vmulxq_lane_f32_0(float32x4_t a, float32x2_t v) {
- // CHECK: test_vmulxq_lane_f32_0
+ // CHECK-LABEL: test_vmulxq_lane_f32_0
return vmulxq_lane_f32(a, v, 0);
// CHECK: fmulx {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
float64x2_t test_vmulxq_lane_f64_0(float64x2_t a, float64x1_t v) {
- // CHECK: test_vmulxq_lane_f64_0
+ // CHECK-LABEL: test_vmulxq_lane_f64_0
return vmulxq_lane_f64(a, v, 0);
// CHECK: fmulx {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
}
float32x2_t test_vmulx_laneq_f32_0(float32x2_t a, float32x4_t v) {
- // CHECK: test_vmulx_laneq_f32_0
+ // CHECK-LABEL: test_vmulx_laneq_f32_0
return vmulx_laneq_f32(a, v, 0);
// CHECK: fmulx {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
float32x4_t test_vmulxq_laneq_f32_0(float32x4_t a, float32x4_t v) {
- // CHECK: test_vmulxq_laneq_f32_0
+ // CHECK-LABEL: test_vmulxq_laneq_f32_0
return vmulxq_laneq_f32(a, v, 0);
// CHECK: fmulx {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
float64x2_t test_vmulxq_laneq_f64_0(float64x2_t a, float64x2_t v) {
- // CHECK: test_vmulxq_laneq_f64_0
+ // CHECK-LABEL: test_vmulxq_laneq_f64_0
return vmulxq_laneq_f64(a, v, 0);
// CHECK: fmulx {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
}
int32x4_t test_vmull_high_n_s16(int16x8_t a, int16_t b) {
- // CHECK: test_vmull_high_n_s16
+ // CHECK-LABEL: test_vmull_high_n_s16
return vmull_high_n_s16(a, b);
- // CHECK: smull2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
+ // CHECK: smull2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+\.h\[0\]|v[0-9]+\.8h}}
}
int64x2_t test_vmull_high_n_s32(int32x4_t a, int32_t b) {
- // CHECK: test_vmull_high_n_s32
+ // CHECK-LABEL: test_vmull_high_n_s32
return vmull_high_n_s32(a, b);
- // CHECK: smull2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+ // CHECK: smull2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+\.s\[0\]|v[0-9]+\.4s}}
}
uint32x4_t test_vmull_high_n_u16(uint16x8_t a, uint16_t b) {
- // CHECK: test_vmull_high_n_u16
+ // CHECK-LABEL: test_vmull_high_n_u16
return vmull_high_n_u16(a, b);
- // CHECK: umull2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
+ // CHECK: umull2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+\.h\[0\]|v[0-9]+\.8h}}
}
uint64x2_t test_vmull_high_n_u32(uint32x4_t a, uint32_t b) {
- // CHECK: test_vmull_high_n_u32
+ // CHECK-LABEL: test_vmull_high_n_u32
return vmull_high_n_u32(a, b);
- // CHECK: umull2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+ // CHECK: umull2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+\.s\[0\]|v[0-9]+\.4s}}
}
int32x4_t test_vqdmull_high_n_s16(int16x8_t a, int16_t b) {
- // CHECK: test_vqdmull_high_n_s16
+ // CHECK-LABEL: test_vqdmull_high_n_s16
return vqdmull_high_n_s16(a, b);
- // CHECK: sqdmull2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
+ // CHECK: sqdmull2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+\.h\[0\]|v[0-9]+\.8h}}
}
int64x2_t test_vqdmull_high_n_s32(int32x4_t a, int32_t b) {
- // CHECK: test_vqdmull_high_n_s32
+ // CHECK-LABEL: test_vqdmull_high_n_s32
return vqdmull_high_n_s32(a, b);
- // CHECK: sqdmull2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+ // CHECK: sqdmull2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+\.s\[0\]|v[0-9]+\.4s}}
}
int32x4_t test_vmlal_high_n_s16(int32x4_t a, int16x8_t b, int16_t c) {
- // CHECK: test_vmlal_high_n_s16
+ // CHECK-LABEL: test_vmlal_high_n_s16
return vmlal_high_n_s16(a, b, c);
- // CHECK: smlal2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
+ // CHECK: smlal2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+\.h\[0\]|v[0-9]+\.8h}}
}
int64x2_t test_vmlal_high_n_s32(int64x2_t a, int32x4_t b, int32_t c) {
- // CHECK: test_vmlal_high_n_s32
+ // CHECK-LABEL: test_vmlal_high_n_s32
return vmlal_high_n_s32(a, b, c);
- // CHECK: smlal2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+ // CHECK: smlal2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+\.s\[0\]|v[0-9]+\.4s}}
}
uint32x4_t test_vmlal_high_n_u16(uint32x4_t a, uint16x8_t b, uint16_t c) {
- // CHECK: test_vmlal_high_n_u16
+ // CHECK-LABEL: test_vmlal_high_n_u16
return vmlal_high_n_u16(a, b, c);
- // CHECK: umlal2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
+ // CHECK: umlal2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+\.h\[0\]|v[0-9]+\.8h}}
}
uint64x2_t test_vmlal_high_n_u32(uint64x2_t a, uint32x4_t b, uint32_t c) {
- // CHECK: test_vmlal_high_n_u32
+ // CHECK-LABEL: test_vmlal_high_n_u32
return vmlal_high_n_u32(a, b, c);
- // CHECK: umlal2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+ // CHECK: umlal2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+\.s\[0\]|v[0-9]+\.4s}}
}
int32x4_t test_vqdmlal_high_n_s16(int32x4_t a, int16x8_t b, int16_t c) {
- // CHECK: test_vqdmlal_high_n_s16
+ // CHECK-LABEL: test_vqdmlal_high_n_s16
return vqdmlal_high_n_s16(a, b, c);
- // CHECK: sqdmlal2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
+ // CHECK: sqdmlal2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+\.h\[0\]|v[0-9]+\.8h}}
}
int64x2_t test_vqdmlal_high_n_s32(int64x2_t a, int32x4_t b, int32_t c) {
- // CHECK: test_vqdmlal_high_n_s32
+ // CHECK-LABEL: test_vqdmlal_high_n_s32
return vqdmlal_high_n_s32(a, b, c);
- // CHECK: sqdmlal2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+ // CHECK: sqdmlal2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+\.s\[0\]|v[0-9]+\.4s}}
}
int32x4_t test_vmlsl_high_n_s16(int32x4_t a, int16x8_t b, int16_t c) {
- // CHECK: test_vmlsl_high_n_s16
+ // CHECK-LABEL: test_vmlsl_high_n_s16
return vmlsl_high_n_s16(a, b, c);
- // CHECK: smlsl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
+ // CHECK: smlsl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+\.h\[0\]|v[0-9]+\.8h}}
}
int64x2_t test_vmlsl_high_n_s32(int64x2_t a, int32x4_t b, int32_t c) {
- // CHECK: test_vmlsl_high_n_s32
+ // CHECK-LABEL: test_vmlsl_high_n_s32
return vmlsl_high_n_s32(a, b, c);
- // CHECK: smlsl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+ // CHECK: smlsl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+\.s\[0\]|v[0-9]+\.4s}}
}
uint32x4_t test_vmlsl_high_n_u16(uint32x4_t a, uint16x8_t b, uint16_t c) {
- // CHECK: test_vmlsl_high_n_u16
+ // CHECK-LABEL: test_vmlsl_high_n_u16
return vmlsl_high_n_u16(a, b, c);
- // CHECK: umlsl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
+ // CHECK: umlsl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+\.h\[0\]|v[0-9]+\.8h}}
}
uint64x2_t test_vmlsl_high_n_u32(uint64x2_t a, uint32x4_t b, uint32_t c) {
- // CHECK: test_vmlsl_high_n_u32
+ // CHECK-LABEL: test_vmlsl_high_n_u32
return vmlsl_high_n_u32(a, b, c);
- // CHECK: umlsl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+ // CHECK: umlsl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+\.s\[0\]|v[0-9]+\.4s}}
}
int32x4_t test_vqdmlsl_high_n_s16(int32x4_t a, int16x8_t b, int16_t c) {
- // CHECK: test_vqdmlsl_high_n_s16
+ // CHECK-LABEL: test_vqdmlsl_high_n_s16
return vqdmlsl_high_n_s16(a, b, c);
- // CHECK: sqdmlsl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
+ // CHECK: sqdmlsl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+\.h\[0\]|v[0-9]+\.8h}}
}
int64x2_t test_vqdmlsl_high_n_s32(int64x2_t a, int32x4_t b, int32_t c) {
- // CHECK: test_vqdmlsl_high_n_s32
+ // CHECK-LABEL: test_vqdmlsl_high_n_s32
return vqdmlsl_high_n_s32(a, b, c);
- // CHECK: sqdmlsl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+ // CHECK: sqdmlsl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+\.s\[0\]|v[0-9]+\.4s}}
}
float32x2_t test_vmul_n_f32(float32x2_t a, float32_t b) {
- // CHECK: test_vmul_n_f32
+ // CHECK-LABEL: test_vmul_n_f32
return vmul_n_f32(a, b);
// CHECK: fmul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
float32x4_t test_vmulq_n_f32(float32x4_t a, float32_t b) {
- // CHECK: test_vmulq_n_f32
+ // CHECK-LABEL: test_vmulq_n_f32
return vmulq_n_f32(a, b);
// CHECK: fmul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
float64x2_t test_vmulq_n_f64(float64x2_t a, float64_t b) {
- // CHECK: test_vmulq_n_f64
+ // CHECK-LABEL: test_vmulq_n_f64
return vmulq_n_f64(a, b);
// CHECK: fmul {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
}
float32x2_t test_vfma_n_f32(float32x2_t a, float32x2_t b, float32_t n) {
- // CHECK: test_vfma_n_f32
+ // CHECK-LABEL: test_vfma_n_f32
return vfma_n_f32(a, b, n);
// CHECK: fmla {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
float32x4_t test_vfmaq_n_f32(float32x4_t a, float32x4_t b, float32_t n) {
- // CHECK: test_vfmaq_n_f32
+ // CHECK-LABEL: test_vfmaq_n_f32
return vfmaq_n_f32(a, b, n);
// CHECK: fmla {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
float32x2_t test_vfms_n_f32(float32x2_t a, float32x2_t b, float32_t n) {
- // CHECK: test_vfms_n_f32
+ // CHECK-LABEL: test_vfms_n_f32
return vfms_n_f32(a, b, n);
// CHECK: fmls {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
}
float32x4_t test_vfmsq_n_f32(float32x4_t a, float32x4_t b, float32_t n) {
- // CHECK: test_vfmsq_n_f32
+ // CHECK-LABEL: test_vfmsq_n_f32
return vfmsq_n_f32(a, b, n);
// CHECK: fmls {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
}
+
+int16x4_t test_vmul_n_s16(int16x4_t a, int16_t b) {
+ // CHECK-LABEL: test_vmul_n_s16
+ return vmul_n_s16(a, b);
+ // CHECK: dup {{v[0-9]+}}.4h, w0
+ // CHECK: mul {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
+}
+
+int16x8_t test_vmulq_n_s16(int16x8_t a, int16_t b) {
+ // CHECK-LABEL: test_vmulq_n_s16
+ return vmulq_n_s16(a, b);
+ // CHECK: dup {{v[0-9]+}}.8h, w0
+ // CHECK: mul {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
+}
+
+int32x2_t test_vmul_n_s32(int32x2_t a, int32_t b) {
+ // CHECK-LABEL: test_vmul_n_s32
+ return vmul_n_s32(a, b);
+ // CHECK: dup {{v[0-9]+}}.2s, w0
+ // CHECK: mul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+int32x4_t test_vmulq_n_s32(int32x4_t a, int32_t b) {
+ // CHECK-LABEL: test_vmulq_n_s32
+ return vmulq_n_s32(a, b);
+ // CHECK: dup {{v[0-9]+}}.4s, w0
+ // CHECK: mul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
+}
+
+uint16x4_t test_vmul_n_u16(uint16x4_t a, uint16_t b) {
+ // CHECK-LABEL: test_vmul_n_u16
+ return vmul_n_u16(a, b);
+ // CHECK: dup {{v[0-9]+}}.4h, w0
+ // CHECK: mul {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
+}
+
+uint16x8_t test_vmulq_n_u16(uint16x8_t a, uint16_t b) {
+ // CHECK-LABEL: test_vmulq_n_u16
+ return vmulq_n_u16(a, b);
+ // CHECK: dup {{v[0-9]+}}.8h, w0
+ // CHECK: mul {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
+}
+
+uint32x2_t test_vmul_n_u32(uint32x2_t a, uint32_t b) {
+ // CHECK-LABEL: test_vmul_n_u32
+ return vmul_n_u32(a, b);
+ // CHECK: dup {{v[0-9]+}}.2s, w0
+ // CHECK: mul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+uint32x4_t test_vmulq_n_u32(uint32x4_t a, uint32_t b) {
+ // CHECK-LABEL: test_vmulq_n_u32
+ return vmulq_n_u32(a, b);
+ // CHECK: dup {{v[0-9]+}}.4s, w0
+ // CHECK: mul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
+}
+
+int32x4_t test_vmull_n_s16(int16x4_t a, int16_t b) {
+ // CHECK-LABEL: test_vmull_n_s16
+ return vmull_n_s16(a, b);
+ // CHECK: dup {{v[0-9]+}}.4h, w0
+ // CHECK: smull {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
+}
+
+int64x2_t test_vmull_n_s32(int32x2_t a, int32_t b) {
+ // CHECK-LABEL: test_vmull_n_s32
+ return vmull_n_s32(a, b);
+ // CHECK: dup {{v[0-9]+}}.2s, w0
+ // CHECK: smull {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+uint32x4_t test_vmull_n_u16(uint16x4_t a, uint16_t b) {
+ // CHECK-LABEL: test_vmull_n_u16
+ return vmull_n_u16(a, b);
+ // CHECK: dup {{v[0-9]+}}.4h, w0
+ // CHECK: umull {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
+}
+
+uint64x2_t test_vmull_n_u32(uint32x2_t a, uint32_t b) {
+ // CHECK-LABEL: test_vmull_n_u32
+ return vmull_n_u32(a, b);
+ // CHECK: dup {{v[0-9]+}}.2s, w0
+ // CHECK: umull {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+int32x4_t test_vqdmull_n_s16(int16x4_t a, int16_t b) {
+ // CHECK-LABEL: test_vqdmull_n_s16
+ return vqdmull_n_s16(a, b);
+ // CHECK: dup {{v[0-9]+}}.4h, w0
+ // CHECK: sqdmull {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
+}
+
+int64x2_t test_vqdmull_n_s32(int32x2_t a, int32_t b) {
+ // CHECK-LABEL: test_vqdmull_n_s32
+ return vqdmull_n_s32(a, b);
+ // CHECK: dup {{v[0-9]+}}.2s, w0
+ // CHECK: sqdmull {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+int16x4_t test_vqdmulh_n_s16(int16x4_t a, int16_t b) {
+ // CHECK-LABEL: test_vqdmulh_n_s16
+ return vqdmulh_n_s16(a, b);
+ // CHECK: dup {{v[0-9]+}}.4h, w0
+ // CHECK: sqdmulh {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
+}
+
+int16x8_t test_vqdmulhq_n_s16(int16x8_t a, int16_t b) {
+ // CHECK-LABEL: test_vqdmulhq_n_s16
+ return vqdmulhq_n_s16(a, b);
+ // CHECK: dup {{v[0-9]+}}.8h, w0
+ // CHECK: sqdmulh {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
+}
+
+int32x2_t test_vqdmulh_n_s32(int32x2_t a, int32_t b) {
+ // CHECK-LABEL: test_vqdmulh_n_s32
+ return vqdmulh_n_s32(a, b);
+ // CHECK: dup {{v[0-9]+}}.2s, w0
+ // CHECK: sqdmulh {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+int32x4_t test_vqdmulhq_n_s32(int32x4_t a, int32_t b) {
+ // CHECK-LABEL: test_vqdmulhq_n_s32
+ return vqdmulhq_n_s32(a, b);
+ // CHECK: dup {{v[0-9]+}}.4s, w0
+ // CHECK: sqdmulh {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
+}
+
+int16x4_t test_vqrdmulh_n_s16(int16x4_t a, int16_t b) {
+ // CHECK-LABEL: test_vqrdmulh_n_s16
+ return vqrdmulh_n_s16(a, b);
+ // CHECK: dup {{v[0-9]+}}.4h, w0
+ // CHECK: sqrdmulh {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
+}
+
+int16x8_t test_vqrdmulhq_n_s16(int16x8_t a, int16_t b) {
+ // CHECK-LABEL: test_vqrdmulhq_n_s16
+ return vqrdmulhq_n_s16(a, b);
+ // CHECK: dup {{v[0-9]+}}.8h, w0
+ // CHECK: sqrdmulh {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
+}
+
+int32x2_t test_vqrdmulh_n_s32(int32x2_t a, int32_t b) {
+ // CHECK-LABEL: test_vqrdmulh_n_s32
+ return vqrdmulh_n_s32(a, b);
+ // CHECK: dup {{v[0-9]+}}.2s, w0
+ // CHECK: sqrdmulh {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+int32x4_t test_vqrdmulhq_n_s32(int32x4_t a, int32_t b) {
+ // CHECK-LABEL: test_vqrdmulhq_n_s32
+ return vqrdmulhq_n_s32(a, b);
+ // CHECK: dup {{v[0-9]+}}.4s, w0
+ // CHECK: sqrdmulh {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
+}
+
+int16x4_t test_vmla_n_s16(int16x4_t a, int16x4_t b, int16_t c) {
+ // CHECK-LABEL: test_vmla_n_s16
+ return vmla_n_s16(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.4h, w0
+ // CHECK: mla {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
+}
+
+int16x8_t test_vmlaq_n_s16(int16x8_t a, int16x8_t b, int16_t c) {
+ // CHECK-LABEL: test_vmlaq_n_s16
+ return vmlaq_n_s16(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.8h, w0
+ // CHECK: mla {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
+}
+
+int32x2_t test_vmla_n_s32(int32x2_t a, int32x2_t b, int32_t c) {
+ // CHECK-LABEL: test_vmla_n_s32
+ return vmla_n_s32(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.2s, w0
+ // CHECK: mla {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+int32x4_t test_vmlaq_n_s32(int32x4_t a, int32x4_t b, int32_t c) {
+ // CHECK-LABEL: test_vmlaq_n_s32
+ return vmlaq_n_s32(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.4s, w0
+ // CHECK: mla {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
+}
+
+uint16x4_t test_vmla_n_u16(uint16x4_t a, uint16x4_t b, uint16_t c) {
+ // CHECK-LABEL: test_vmla_n_u16
+ return vmla_n_u16(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.4h, w0
+ // CHECK: mla {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
+}
+
+uint16x8_t test_vmlaq_n_u16(uint16x8_t a, uint16x8_t b, uint16_t c) {
+ // CHECK-LABEL: test_vmlaq_n_u16
+ return vmlaq_n_u16(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.8h, w0
+ // CHECK: mla {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
+}
+
+uint32x2_t test_vmla_n_u32(uint32x2_t a, uint32x2_t b, uint32_t c) {
+ // CHECK-LABEL: test_vmla_n_u32
+ return vmla_n_u32(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.2s, w0
+ // CHECK: mla {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+uint32x4_t test_vmlaq_n_u32(uint32x4_t a, uint32x4_t b, uint32_t c) {
+ // CHECK-LABEL: test_vmlaq_n_u32
+ return vmlaq_n_u32(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.4s, w0
+ // CHECK: mla {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
+}
+
+int32x4_t test_vmlal_n_s16(int32x4_t a, int16x4_t b, int16_t c) {
+ // CHECK-LABEL: test_vmlal_n_s16
+ return vmlal_n_s16(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.4h, w0
+ // CHECK: smlal {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
+}
+
+int64x2_t test_vmlal_n_s32(int64x2_t a, int32x2_t b, int32_t c) {
+ // CHECK-LABEL: test_vmlal_n_s32
+ return vmlal_n_s32(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.2s, w0
+ // CHECK: smlal {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+uint32x4_t test_vmlal_n_u16(uint32x4_t a, uint16x4_t b, uint16_t c) {
+ // CHECK-LABEL: test_vmlal_n_u16
+ return vmlal_n_u16(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.4h, w0
+ // CHECK: umlal {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
+}
+
+uint64x2_t test_vmlal_n_u32(uint64x2_t a, uint32x2_t b, uint32_t c) {
+ // CHECK-LABEL: test_vmlal_n_u32
+ return vmlal_n_u32(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.2s, w0
+ // CHECK: umlal {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+int32x4_t test_vqdmlal_n_s16(int32x4_t a, int16x4_t b, int16_t c) {
+ // CHECK-LABEL: test_vqdmlal_n_s16
+ return vqdmlal_n_s16(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.4h, w0
+ // CHECK: sqdmlal {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
+}
+
+int64x2_t test_vqdmlal_n_s32(int64x2_t a, int32x2_t b, int32_t c) {
+ // CHECK-LABEL: test_vqdmlal_n_s32
+ return vqdmlal_n_s32(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.2s, w0
+ // CHECK: sqdmlal {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+int16x4_t test_vmls_n_s16(int16x4_t a, int16x4_t b, int16_t c) {
+ // CHECK-LABEL: test_vmls_n_s16
+ return vmls_n_s16(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.4h, w0
+ // CHECK: mls {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
+}
+
+int16x8_t test_vmlsq_n_s16(int16x8_t a, int16x8_t b, int16_t c) {
+ // CHECK-LABEL: test_vmlsq_n_s16
+ return vmlsq_n_s16(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.8h, w0
+ // CHECK: mls {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
+}
+
+int32x2_t test_vmls_n_s32(int32x2_t a, int32x2_t b, int32_t c) {
+ // CHECK-LABEL: test_vmls_n_s32
+ return vmls_n_s32(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.2s, w0
+ // CHECK: mls {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+int32x4_t test_vmlsq_n_s32(int32x4_t a, int32x4_t b, int32_t c) {
+ // CHECK-LABEL: test_vmlsq_n_s32
+ return vmlsq_n_s32(a, b, c);
+ // CHECK: mls {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
+}
+
+uint16x4_t test_vmls_n_u16(uint16x4_t a, uint16x4_t b, uint16_t c) {
+ // CHECK-LABEL: test_vmls_n_u16
+ return vmls_n_u16(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.4h, w0
+ // CHECK: mls {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
+}
+
+uint16x8_t test_vmlsq_n_u16(uint16x8_t a, uint16x8_t b, uint16_t c) {
+ // CHECK-LABEL: test_vmlsq_n_u16
+ return vmlsq_n_u16(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.8h, w0
+ // CHECK: mls {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
+}
+
+uint32x2_t test_vmls_n_u32(uint32x2_t a, uint32x2_t b, uint32_t c) {
+ // CHECK-LABEL: test_vmls_n_u32
+ return vmls_n_u32(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.2s, w0
+ // CHECK: mls {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+uint32x4_t test_vmlsq_n_u32(uint32x4_t a, uint32x4_t b, uint32_t c) {
+ // CHECK-LABEL: test_vmlsq_n_u32
+ return vmlsq_n_u32(a, b, c);
+ // CHECK: mls {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
+}
+
+int32x4_t test_vmlsl_n_s16(int32x4_t a, int16x4_t b, int16_t c) {
+ // CHECK-LABEL: test_vmlsl_n_s16
+ return vmlsl_n_s16(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.4h, w0
+ // CHECK: smlsl {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
+}
+
+int64x2_t test_vmlsl_n_s32(int64x2_t a, int32x2_t b, int32_t c) {
+ // CHECK-LABEL: test_vmlsl_n_s32
+ return vmlsl_n_s32(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.2s, w0
+ // CHECK: smlsl {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+uint32x4_t test_vmlsl_n_u16(uint32x4_t a, uint16x4_t b, uint16_t c) {
+ // CHECK-LABEL: test_vmlsl_n_u16
+ return vmlsl_n_u16(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.4h, w0
+ // CHECK: umlsl {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
+}
+
+uint64x2_t test_vmlsl_n_u32(uint64x2_t a, uint32x2_t b, uint32_t c) {
+ // CHECK-LABEL: test_vmlsl_n_u32
+ return vmlsl_n_u32(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.2s, w0
+ // CHECK: umlsl {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+int32x4_t test_vqdmlsl_n_s16(int32x4_t a, int16x4_t b, int16_t c) {
+ // CHECK-LABEL: test_vqdmlsl_n_s16
+ return vqdmlsl_n_s16(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.4h, w0
+ // CHECK: sqdmlsl {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
+}
+
+int64x2_t test_vqdmlsl_n_s32(int64x2_t a, int32x2_t b, int32_t c) {
+ // CHECK-LABEL: test_vqdmlsl_n_s32
+ return vqdmlsl_n_s32(a, b, c);
+ // CHECK: dup {{v[0-9]+}}.2s, w0
+ // CHECK: sqdmlsl {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+uint16x4_t test_vmla_lane_u16_0(uint16x4_t a, uint16x4_t b, uint16x4_t v) {
+ // CHECK-LABEL: test_vmla_lane_u16_0
+ return vmla_lane_u16(a, b, v, 0);
+ // CHECK: mla {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
+}
+
+uint16x8_t test_vmlaq_lane_u16_0(uint16x8_t a, uint16x8_t b, uint16x4_t v) {
+ // CHECK-LABEL: test_vmlaq_lane_u16_0
+ return vmlaq_lane_u16(a, b, v, 0);
+ // CHECK: mla {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
+}
+
+uint32x2_t test_vmla_lane_u32_0(uint32x2_t a, uint32x2_t b, uint32x2_t v) {
+ // CHECK-LABEL: test_vmla_lane_u32_0
+ return vmla_lane_u32(a, b, v, 0);
+ // CHECK: mla {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
+}
+
+uint32x4_t test_vmlaq_lane_u32_0(uint32x4_t a, uint32x4_t b, uint32x2_t v) {
+ // CHECK-LABEL: test_vmlaq_lane_u32_0
+ return vmlaq_lane_u32(a, b, v, 0);
+ // CHECK: mla {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+}
+
+uint16x4_t test_vmla_laneq_u16_0(uint16x4_t a, uint16x4_t b, uint16x8_t v) {
+ // CHECK-LABEL: test_vmla_laneq_u16_0
+ return vmla_laneq_u16(a, b, v, 0);
+ // CHECK: mla {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
+}
+
+uint16x8_t test_vmlaq_laneq_u16_0(uint16x8_t a, uint16x8_t b, uint16x8_t v) {
+ // CHECK-LABEL: test_vmlaq_laneq_u16_0
+ return vmlaq_laneq_u16(a, b, v, 0);
+ // CHECK: mla {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
+}
+
+uint32x2_t test_vmla_laneq_u32_0(uint32x2_t a, uint32x2_t b, uint32x4_t v) {
+ // CHECK-LABEL: test_vmla_laneq_u32_0
+ return vmla_laneq_u32(a, b, v, 0);
+ // CHECK: mla {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
+}
+
+uint32x4_t test_vmlaq_laneq_u32_0(uint32x4_t a, uint32x4_t b, uint32x4_t v) {
+ // CHECK-LABEL: test_vmlaq_laneq_u32_0
+ return vmlaq_laneq_u32(a, b, v, 0);
+ // CHECK: mla {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+}
+
+int32x4_t test_vqdmlal_laneq_s16_0(int32x4_t a, int16x4_t b, int16x8_t v) {
+ // CHECK-LABEL: test_vqdmlal_laneq_s16_0
+ return vqdmlal_laneq_s16(a, b, v, 0);
+ // CHECK: sqdmlal {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
+}
+
+int64x2_t test_vqdmlal_laneq_s32_0(int64x2_t a, int32x2_t b, int32x4_t v) {
+ // CHECK-LABEL: test_vqdmlal_laneq_s32_0
+ return vqdmlal_laneq_s32(a, b, v, 0);
+ // CHECK: sqdmlal {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
+}
+
+int32x4_t test_vqdmlal_high_laneq_s16_0(int32x4_t a, int16x8_t b, int16x8_t v) {
+ // CHECK-LABEL: test_vqdmlal_high_laneq_s16_0
+ return vqdmlal_high_laneq_s16(a, b, v, 0);
+ // CHECK: sqdmlal2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
+}
+
+int64x2_t test_vqdmlal_high_laneq_s32_0(int64x2_t a, int32x4_t b, int32x4_t v) {
+ // CHECK-LABEL: test_vqdmlal_high_laneq_s32_0
+ return vqdmlal_high_laneq_s32(a, b, v, 0);
+ // CHECK: sqdmlal2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+}
+
+uint16x4_t test_vmls_lane_u16_0(uint16x4_t a, uint16x4_t b, uint16x4_t v) {
+ // CHECK-LABEL: test_vmls_lane_u16_0
+ return vmls_lane_u16(a, b, v, 0);
+ // CHECK: mls {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
+}
+
+uint16x8_t test_vmlsq_lane_u16_0(uint16x8_t a, uint16x8_t b, uint16x4_t v) {
+ // CHECK-LABEL: test_vmlsq_lane_u16_0
+ return vmlsq_lane_u16(a, b, v, 0);
+ // CHECK: mls {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
+}
+
+uint32x2_t test_vmls_lane_u32_0(uint32x2_t a, uint32x2_t b, uint32x2_t v) {
+ // CHECK-LABEL: test_vmls_lane_u32_0
+ return vmls_lane_u32(a, b, v, 0);
+ // CHECK: mls {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
+}
+
+uint32x4_t test_vmlsq_lane_u32_0(uint32x4_t a, uint32x4_t b, uint32x2_t v) {
+ // CHECK-LABEL: test_vmlsq_lane_u32_0
+ return vmlsq_lane_u32(a, b, v, 0);
+ // CHECK: mls {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+}
+
+uint16x4_t test_vmls_laneq_u16_0(uint16x4_t a, uint16x4_t b, uint16x8_t v) {
+ // CHECK-LABEL: test_vmls_laneq_u16_0
+ return vmls_laneq_u16(a, b, v, 0);
+ // CHECK: mls {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
+}
+
+uint16x8_t test_vmlsq_laneq_u16_0(uint16x8_t a, uint16x8_t b, uint16x8_t v) {
+ // CHECK-LABEL: test_vmlsq_laneq_u16_0
+ return vmlsq_laneq_u16(a, b, v, 0);
+ // CHECK: mls {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
+}
+
+uint32x2_t test_vmls_laneq_u32_0(uint32x2_t a, uint32x2_t b, uint32x4_t v) {
+ // CHECK-LABEL: test_vmls_laneq_u32_0
+ return vmls_laneq_u32(a, b, v, 0);
+ // CHECK: mls {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
+}
+
+uint32x4_t test_vmlsq_laneq_u32_0(uint32x4_t a, uint32x4_t b, uint32x4_t v) {
+ // CHECK-LABEL: test_vmlsq_laneq_u32_0
+ return vmlsq_laneq_u32(a, b, v, 0);
+ // CHECK: mls {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+}
+
+int32x4_t test_vqdmlsl_laneq_s16_0(int32x4_t a, int16x4_t b, int16x8_t v) {
+ // CHECK-LABEL: test_vqdmlsl_laneq_s16_0
+ return vqdmlsl_laneq_s16(a, b, v, 0);
+ // CHECK: sqdmlsl {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
+}
+
+int64x2_t test_vqdmlsl_laneq_s32_0(int64x2_t a, int32x2_t b, int32x4_t v) {
+ // CHECK-LABEL: test_vqdmlsl_laneq_s32_0
+ return vqdmlsl_laneq_s32(a, b, v, 0);
+ // CHECK: sqdmlsl {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
+}
+
+int32x4_t test_vqdmlsl_high_laneq_s16_0(int32x4_t a, int16x8_t b, int16x8_t v) {
+ // CHECK-LABEL: test_vqdmlsl_high_laneq_s16_0
+ return vqdmlsl_high_laneq_s16(a, b, v, 0);
+ // CHECK: sqdmlsl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
+}
+
+int64x2_t test_vqdmlsl_high_laneq_s32_0(int64x2_t a, int32x4_t b, int32x4_t v) {
+ // CHECK-LABEL: test_vqdmlsl_high_laneq_s32_0
+ return vqdmlsl_high_laneq_s32(a, b, v, 0);
+ // CHECK: sqdmlsl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+}
+
+int16x4_t test_vqdmulh_laneq_s16_0(int16x4_t a, int16x8_t v) {
+ // CHECK-LABEL: test_vqdmulh_laneq_s16_0
+ return vqdmulh_laneq_s16(a, v, 0);
+ // CHECK: sqdmulh {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
+}
+
+int16x8_t test_vqdmulhq_laneq_s16_0(int16x8_t a, int16x8_t v) {
+ // CHECK-LABEL: test_vqdmulhq_laneq_s16_0
+ return vqdmulhq_laneq_s16(a, v, 0);
+ // CHECK: sqdmulh {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
+}
+
+int32x2_t test_vqdmulh_laneq_s32_0(int32x2_t a, int32x4_t v) {
+ // CHECK-LABEL: test_vqdmulh_laneq_s32_0
+ return vqdmulh_laneq_s32(a, v, 0);
+ // CHECK: sqdmulh {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
+}
+
+int32x4_t test_vqdmulhq_laneq_s32_0(int32x4_t a, int32x4_t v) {
+ // CHECK-LABEL: test_vqdmulhq_laneq_s32_0
+ return vqdmulhq_laneq_s32(a, v, 0);
+ // CHECK: sqdmulh {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+}
+
+int16x4_t test_vqrdmulh_laneq_s16_0(int16x4_t a, int16x8_t v) {
+ // CHECK-LABEL: test_vqrdmulh_laneq_s16_0
+ return vqrdmulh_laneq_s16(a, v, 0);
+ // CHECK: sqrdmulh {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[0]
+}
+
+int16x8_t test_vqrdmulhq_laneq_s16_0(int16x8_t a, int16x8_t v) {
+ // CHECK-LABEL: test_vqrdmulhq_laneq_s16_0
+ return vqrdmulhq_laneq_s16(a, v, 0);
+ // CHECK: sqrdmulh {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[0]
+}
+
+int32x2_t test_vqrdmulh_laneq_s32_0(int32x2_t a, int32x4_t v) {
+ // CHECK-LABEL: test_vqrdmulh_laneq_s32_0
+ return vqrdmulh_laneq_s32(a, v, 0);
+ // CHECK: sqrdmulh {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
+}
+
+int32x4_t test_vqrdmulhq_laneq_s32_0(int32x4_t a, int32x4_t v) {
+ // CHECK-LABEL: test_vqrdmulhq_laneq_s32_0
+ return vqrdmulhq_laneq_s32(a, v, 0);
+ // CHECK: sqrdmulh {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+}
+
+uint16x4_t test_vmla_lane_u16(uint16x4_t a, uint16x4_t b, uint16x4_t v) {
+ // CHECK-LABEL: test_vmla_lane_u16
+ return vmla_lane_u16(a, b, v, 3);
+ // CHECK: mla {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[3]
+}
+
+uint16x8_t test_vmlaq_lane_u16(uint16x8_t a, uint16x8_t b, uint16x4_t v) {
+ // CHECK-LABEL: test_vmlaq_lane_u16
+ return vmlaq_lane_u16(a, b, v, 3);
+ // CHECK: mla {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[3]
+}
+
+uint32x2_t test_vmla_lane_u32(uint32x2_t a, uint32x2_t b, uint32x2_t v) {
+ // CHECK-LABEL: test_vmla_lane_u32
+ return vmla_lane_u32(a, b, v, 1);
+ // CHECK: mla {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
+}
+
+uint32x4_t test_vmlaq_lane_u32(uint32x4_t a, uint32x4_t b, uint32x2_t v) {
+ // CHECK-LABEL: test_vmlaq_lane_u32
+ return vmlaq_lane_u32(a, b, v, 1);
+ // CHECK: mla {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
+}
+
+uint16x4_t test_vmla_laneq_u16(uint16x4_t a, uint16x4_t b, uint16x8_t v) {
+ // CHECK-LABEL: test_vmla_laneq_u16
+ return vmla_laneq_u16(a, b, v, 7);
+ // CHECK: mla {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[7]
+}
+
+uint16x8_t test_vmlaq_laneq_u16(uint16x8_t a, uint16x8_t b, uint16x8_t v) {
+ // CHECK-LABEL: test_vmlaq_laneq_u16
+ return vmlaq_laneq_u16(a, b, v, 7);
+ // CHECK: mla {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[7]
+}
+
+uint32x2_t test_vmla_laneq_u32(uint32x2_t a, uint32x2_t b, uint32x4_t v) {
+ // CHECK-LABEL: test_vmla_laneq_u32
+ return vmla_laneq_u32(a, b, v, 3);
+ // CHECK: mla {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
+}
+
+uint32x4_t test_vmlaq_laneq_u32(uint32x4_t a, uint32x4_t b, uint32x4_t v) {
+ // CHECK-LABEL: test_vmlaq_laneq_u32
+ return vmlaq_laneq_u32(a, b, v, 3);
+ // CHECK: mla {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
+}
+
+int32x4_t test_vqdmlal_laneq_s16(int32x4_t a, int16x4_t b, int16x8_t v) {
+ // CHECK-LABEL: test_vqdmlal_laneq_s16
+ return vqdmlal_laneq_s16(a, b, v, 7);
+ // CHECK: sqdmlal {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[7]
+}
+
+int64x2_t test_vqdmlal_laneq_s32(int64x2_t a, int32x2_t b, int32x4_t v) {
+ // CHECK-LABEL: test_vqdmlal_laneq_s32
+ return vqdmlal_laneq_s32(a, b, v, 3);
+ // CHECK: sqdmlal {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
+}
+
+int32x4_t test_vqdmlal_high_laneq_s16(int32x4_t a, int16x8_t b, int16x8_t v) {
+ // CHECK-LABEL: test_vqdmlal_high_laneq_s16
+ return vqdmlal_high_laneq_s16(a, b, v, 7);
+ // CHECK: sqdmlal2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[7]
+}
+
+int64x2_t test_vqdmlal_high_laneq_s32(int64x2_t a, int32x4_t b, int32x4_t v) {
+ // CHECK-LABEL: test_vqdmlal_high_laneq_s32
+ return vqdmlal_high_laneq_s32(a, b, v, 3);
+ // CHECK: sqdmlal2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
+}
+
+uint16x4_t test_vmls_lane_u16(uint16x4_t a, uint16x4_t b, uint16x4_t v) {
+ // CHECK-LABEL: test_vmls_lane_u16
+ return vmls_lane_u16(a, b, v, 3);
+ // CHECK: mls {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[3]
+}
+
+uint16x8_t test_vmlsq_lane_u16(uint16x8_t a, uint16x8_t b, uint16x4_t v) {
+ // CHECK-LABEL: test_vmlsq_lane_u16
+ return vmlsq_lane_u16(a, b, v, 3);
+ // CHECK: mls {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[3]
+}
+
+uint32x2_t test_vmls_lane_u32(uint32x2_t a, uint32x2_t b, uint32x2_t v) {
+ // CHECK-LABEL: test_vmls_lane_u32
+ return vmls_lane_u32(a, b, v, 1);
+ // CHECK: mls {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
+}
+
+uint32x4_t test_vmlsq_lane_u32(uint32x4_t a, uint32x4_t b, uint32x2_t v) {
+ // CHECK-LABEL: test_vmlsq_lane_u32
+ return vmlsq_lane_u32(a, b, v, 1);
+ // CHECK: mls {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
+}
+
+uint16x4_t test_vmls_laneq_u16(uint16x4_t a, uint16x4_t b, uint16x8_t v) {
+ // CHECK-LABEL: test_vmls_laneq_u16
+ return vmls_laneq_u16(a, b, v, 7);
+ // CHECK: mls {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[7]
+}
+
+uint16x8_t test_vmlsq_laneq_u16(uint16x8_t a, uint16x8_t b, uint16x8_t v) {
+ // CHECK-LABEL: test_vmlsq_laneq_u16
+ return vmlsq_laneq_u16(a, b, v, 7);
+ // CHECK: mls {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[7]
+}
+
+uint32x2_t test_vmls_laneq_u32(uint32x2_t a, uint32x2_t b, uint32x4_t v) {
+ // CHECK-LABEL: test_vmls_laneq_u32
+ return vmls_laneq_u32(a, b, v, 3);
+ // CHECK: mls {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
+}
+
+uint32x4_t test_vmlsq_laneq_u32(uint32x4_t a, uint32x4_t b, uint32x4_t v) {
+ // CHECK-LABEL: test_vmlsq_laneq_u32
+ return vmlsq_laneq_u32(a, b, v, 3);
+ // CHECK: mls {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
+}
+
+int32x4_t test_vqdmlsl_laneq_s16(int32x4_t a, int16x4_t b, int16x8_t v) {
+ // CHECK-LABEL: test_vqdmlsl_laneq_s16
+ return vqdmlsl_laneq_s16(a, b, v, 7);
+ // CHECK: sqdmlsl {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[7]
+}
+
+int64x2_t test_vqdmlsl_laneq_s32(int64x2_t a, int32x2_t b, int32x4_t v) {
+ // CHECK-LABEL: test_vqdmlsl_laneq_s32
+ return vqdmlsl_laneq_s32(a, b, v, 3);
+ // CHECK: sqdmlsl {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
+}
+
+int32x4_t test_vqdmlsl_high_laneq_s16(int32x4_t a, int16x8_t b, int16x8_t v) {
+ // CHECK-LABEL: test_vqdmlsl_high_laneq_s16
+ return vqdmlsl_high_laneq_s16(a, b, v, 7);
+ // CHECK: sqdmlsl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[7]
+}
+
+int64x2_t test_vqdmlsl_high_laneq_s32(int64x2_t a, int32x4_t b, int32x4_t v) {
+ // CHECK-LABEL: test_vqdmlsl_high_laneq_s32
+ return vqdmlsl_high_laneq_s32(a, b, v, 3);
+ // CHECK: sqdmlsl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
+}
+
+int16x4_t test_vqdmulh_laneq_s16(int16x4_t a, int16x8_t v) {
+ // CHECK-LABEL: test_vqdmulh_laneq_s16
+ return vqdmulh_laneq_s16(a, v, 7);
+ // CHECK: sqdmulh {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[7]
+}
+
+int16x8_t test_vqdmulhq_laneq_s16(int16x8_t a, int16x8_t v) {
+ // CHECK-LABEL: test_vqdmulhq_laneq_s16
+ return vqdmulhq_laneq_s16(a, v, 7);
+ // CHECK: sqdmulh {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[7]
+}
+
+int32x2_t test_vqdmulh_laneq_s32(int32x2_t a, int32x4_t v) {
+ // CHECK-LABEL: test_vqdmulh_laneq_s32
+ return vqdmulh_laneq_s32(a, v, 3);
+ // CHECK: sqdmulh {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
+}
+
+int32x4_t test_vqdmulhq_laneq_s32(int32x4_t a, int32x4_t v) {
+ // CHECK-LABEL: test_vqdmulhq_laneq_s32
+ return vqdmulhq_laneq_s32(a, v, 3);
+ // CHECK: sqdmulh {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
+}
+
+int16x4_t test_vqrdmulh_laneq_s16(int16x4_t a, int16x8_t v) {
+ // CHECK-LABEL: test_vqrdmulh_laneq_s16
+ return vqrdmulh_laneq_s16(a, v, 7);
+ // CHECK: sqrdmulh {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.h[7]
+}
+
+int16x8_t test_vqrdmulhq_laneq_s16(int16x8_t a, int16x8_t v) {
+ // CHECK-LABEL: test_vqrdmulhq_laneq_s16
+ return vqrdmulhq_laneq_s16(a, v, 7);
+ // CHECK: sqrdmulh {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.h[7]
+}
+
+int32x2_t test_vqrdmulh_laneq_s32(int32x2_t a, int32x4_t v) {
+ // CHECK-LABEL: test_vqrdmulh_laneq_s32
+ return vqrdmulh_laneq_s32(a, v, 3);
+ // CHECK: sqrdmulh {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
+}
+
+int32x4_t test_vqrdmulhq_laneq_s32(int32x4_t a, int32x4_t v) {
+ // CHECK-LABEL: test_vqrdmulhq_laneq_s32
+ return vqrdmulhq_laneq_s32(a, v, 3);
+ // CHECK: sqrdmulh {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
+}
+
diff --git a/test/CodeGen/aarch64-neon-3v.c b/test/CodeGen/aarch64-neon-3v.c
new file mode 100644
index 000000000000..ca3265214f93
--- /dev/null
+++ b/test/CodeGen/aarch64-neon-3v.c
@@ -0,0 +1,486 @@
+// REQUIRES: aarch64-registered-target
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -S -O3 -o - %s | FileCheck %s
+
+// Test new aarch64 intrinsics and types
+
+#include <arm_neon.h>
+
+int8x8_t test_vand_s8(int8x8_t a, int8x8_t b) {
+ // CHECK-LABEL: test_vand_s8
+ return vand_s8(a, b);
+ // CHECK: and {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+int8x16_t test_vandq_s8(int8x16_t a, int8x16_t b) {
+ // CHECK-LABEL: test_vandq_s8
+ return vandq_s8(a, b);
+ // CHECK: and {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+int16x4_t test_vand_s16(int16x4_t a, int16x4_t b) {
+ // CHECK-LABEL: test_vand_s16
+ return vand_s16(a, b);
+ // CHECK: and {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+int16x8_t test_vandq_s16(int16x8_t a, int16x8_t b) {
+ // CHECK-LABEL: test_vandq_s16
+ return vandq_s16(a, b);
+ // CHECK: and {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+int32x2_t test_vand_s32(int32x2_t a, int32x2_t b) {
+ // CHECK-LABEL: test_vand_s32
+ return vand_s32(a, b);
+ // CHECK: and {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+int32x4_t test_vandq_s32(int32x4_t a, int32x4_t b) {
+ // CHECK-LABEL: test_vandq_s32
+ return vandq_s32(a, b);
+ // CHECK: and {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+int64x1_t test_vand_s64(int64x1_t a, int64x1_t b) {
+ // CHECK-LABEL: test_vand_s64
+ return vand_s64(a, b);
+ // CHECK: and {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+int64x2_t test_vandq_s64(int64x2_t a, int64x2_t b) {
+ // CHECK-LABEL: test_vandq_s64
+ return vandq_s64(a, b);
+ // CHECK: and {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+uint8x8_t test_vand_u8(uint8x8_t a, uint8x8_t b) {
+ // CHECK-LABEL: test_vand_u8
+ return vand_u8(a, b);
+ // CHECK: and {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+uint8x16_t test_vandq_u8(uint8x16_t a, uint8x16_t b) {
+ // CHECK-LABEL: test_vandq_u8
+ return vandq_u8(a, b);
+ // CHECK: and {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+uint16x4_t test_vand_u16(uint16x4_t a, uint16x4_t b) {
+ // CHECK-LABEL: test_vand_u16
+ return vand_u16(a, b);
+ // CHECK: and {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+uint16x8_t test_vandq_u16(uint16x8_t a, uint16x8_t b) {
+ // CHECK-LABEL: test_vandq_u16
+ return vandq_u16(a, b);
+ // CHECK: and {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+uint32x2_t test_vand_u32(uint32x2_t a, uint32x2_t b) {
+ // CHECK-LABEL: test_vand_u32
+ return vand_u32(a, b);
+ // CHECK: and {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+uint32x4_t test_vandq_u32(uint32x4_t a, uint32x4_t b) {
+ // CHECK-LABEL: test_vandq_u32
+ return vandq_u32(a, b);
+ // CHECK: and {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+uint64x1_t test_vand_u64(uint64x1_t a, uint64x1_t b) {
+ // CHECK-LABEL: test_vand_u64
+ return vand_u64(a, b);
+ // CHECK: and {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+uint64x2_t test_vandq_u64(uint64x2_t a, uint64x2_t b) {
+ // CHECK-LABEL: test_vandq_u64
+ return vandq_u64(a, b);
+ // CHECK: and {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+int8x8_t test_vorr_s8(int8x8_t a, int8x8_t b) {
+ // CHECK-LABEL: test_vorr_s8
+ return vorr_s8(a, b);
+ // CHECK: orr {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+int8x16_t test_vorrq_s8(int8x16_t a, int8x16_t b) {
+ // CHECK-LABEL: test_vorrq_s8
+ return vorrq_s8(a, b);
+ // CHECK: orr {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+int16x4_t test_vorr_s16(int16x4_t a, int16x4_t b) {
+ // CHECK-LABEL: test_vorr_s16
+ return vorr_s16(a, b);
+ // CHECK: orr {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+int16x8_t test_vorrq_s16(int16x8_t a, int16x8_t b) {
+ // CHECK-LABEL: test_vorrq_s16
+ return vorrq_s16(a, b);
+ // CHECK: orr {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+int32x2_t test_vorr_s32(int32x2_t a, int32x2_t b) {
+ // CHECK-LABEL: test_vorr_s32
+ return vorr_s32(a, b);
+ // CHECK: orr {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+int32x4_t test_vorrq_s32(int32x4_t a, int32x4_t b) {
+ // CHECK-LABEL: test_vorrq_s32
+ return vorrq_s32(a, b);
+ // CHECK: orr {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+int64x1_t test_vorr_s64(int64x1_t a, int64x1_t b) {
+ // CHECK-LABEL: test_vorr_s64
+ return vorr_s64(a, b);
+ // CHECK: orr {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+int64x2_t test_vorrq_s64(int64x2_t a, int64x2_t b) {
+ // CHECK-LABEL: test_vorrq_s64
+ return vorrq_s64(a, b);
+ // CHECK: orr {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+uint8x8_t test_vorr_u8(uint8x8_t a, uint8x8_t b) {
+ // CHECK-LABEL: test_vorr_u8
+ return vorr_u8(a, b);
+ // CHECK: orr {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+uint8x16_t test_vorrq_u8(uint8x16_t a, uint8x16_t b) {
+ // CHECK-LABEL: test_vorrq_u8
+ return vorrq_u8(a, b);
+ // CHECK: orr {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+uint16x4_t test_vorr_u16(uint16x4_t a, uint16x4_t b) {
+ // CHECK-LABEL: test_vorr_u16
+ return vorr_u16(a, b);
+ // CHECK: orr {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+uint16x8_t test_vorrq_u16(uint16x8_t a, uint16x8_t b) {
+ // CHECK-LABEL: test_vorrq_u16
+ return vorrq_u16(a, b);
+ // CHECK: orr {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+uint32x2_t test_vorr_u32(uint32x2_t a, uint32x2_t b) {
+ // CHECK-LABEL: test_vorr_u32
+ return vorr_u32(a, b);
+ // CHECK: orr {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+uint32x4_t test_vorrq_u32(uint32x4_t a, uint32x4_t b) {
+ // CHECK-LABEL: test_vorrq_u32
+ return vorrq_u32(a, b);
+ // CHECK: orr {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+uint64x1_t test_vorr_u64(uint64x1_t a, uint64x1_t b) {
+ // CHECK-LABEL: test_vorr_u64
+ return vorr_u64(a, b);
+ // CHECK: orr {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+uint64x2_t test_vorrq_u64(uint64x2_t a, uint64x2_t b) {
+ // CHECK-LABEL: test_vorrq_u64
+ return vorrq_u64(a, b);
+ // CHECK: orr {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+int8x8_t test_veor_s8(int8x8_t a, int8x8_t b) {
+ // CHECK-LABEL: test_veor_s8
+ return veor_s8(a, b);
+ // CHECK: eor {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+int8x16_t test_veorq_s8(int8x16_t a, int8x16_t b) {
+ // CHECK-LABEL: test_veorq_s8
+ return veorq_s8(a, b);
+ // CHECK: eor {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+int16x4_t test_veor_s16(int16x4_t a, int16x4_t b) {
+ // CHECK-LABEL: test_veor_s16
+ return veor_s16(a, b);
+ // CHECK: eor {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+int16x8_t test_veorq_s16(int16x8_t a, int16x8_t b) {
+ // CHECK-LABEL: test_veorq_s16
+ return veorq_s16(a, b);
+ // CHECK: eor {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+int32x2_t test_veor_s32(int32x2_t a, int32x2_t b) {
+ // CHECK-LABEL: test_veor_s32
+ return veor_s32(a, b);
+ // CHECK: eor {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+int32x4_t test_veorq_s32(int32x4_t a, int32x4_t b) {
+ // CHECK-LABEL: test_veorq_s32
+ return veorq_s32(a, b);
+ // CHECK: eor {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+int64x1_t test_veor_s64(int64x1_t a, int64x1_t b) {
+ // CHECK-LABEL: test_veor_s64
+ return veor_s64(a, b);
+ // CHECK: eor {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+int64x2_t test_veorq_s64(int64x2_t a, int64x2_t b) {
+ // CHECK-LABEL: test_veorq_s64
+ return veorq_s64(a, b);
+ // CHECK: eor {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+uint8x8_t test_veor_u8(uint8x8_t a, uint8x8_t b) {
+ // CHECK-LABEL: test_veor_u8
+ return veor_u8(a, b);
+ // CHECK: eor {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+uint8x16_t test_veorq_u8(uint8x16_t a, uint8x16_t b) {
+ // CHECK-LABEL: test_veorq_u8
+ return veorq_u8(a, b);
+ // CHECK: eor {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+uint16x4_t test_veor_u16(uint16x4_t a, uint16x4_t b) {
+ // CHECK-LABEL: test_veor_u16
+ return veor_u16(a, b);
+ // CHECK: eor {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+uint16x8_t test_veorq_u16(uint16x8_t a, uint16x8_t b) {
+ // CHECK-LABEL: test_veorq_u16
+ return veorq_u16(a, b);
+ // CHECK: eor {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+uint32x2_t test_veor_u32(uint32x2_t a, uint32x2_t b) {
+ // CHECK-LABEL: test_veor_u32
+ return veor_u32(a, b);
+ // CHECK: eor {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+uint32x4_t test_veorq_u32(uint32x4_t a, uint32x4_t b) {
+ // CHECK-LABEL: test_veorq_u32
+ return veorq_u32(a, b);
+ // CHECK: eor {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+uint64x1_t test_veor_u64(uint64x1_t a, uint64x1_t b) {
+ // CHECK-LABEL: test_veor_u64
+ return veor_u64(a, b);
+ // CHECK: eor {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+uint64x2_t test_veorq_u64(uint64x2_t a, uint64x2_t b) {
+ // CHECK-LABEL: test_veorq_u64
+ return veorq_u64(a, b);
+ // CHECK: eor {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+int8x8_t test_vbic_s8(int8x8_t a, int8x8_t b) {
+ // CHECK-LABEL: test_vbic_s8
+ return vbic_s8(a, b);
+ // CHECK: bic {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+int8x16_t test_vbicq_s8(int8x16_t a, int8x16_t b) {
+ // CHECK-LABEL: test_vbicq_s8
+ return vbicq_s8(a, b);
+ // CHECK: bic {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+int16x4_t test_vbic_s16(int16x4_t a, int16x4_t b) {
+ // CHECK-LABEL: test_vbic_s16
+ return vbic_s16(a, b);
+ // CHECK: bic {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+int16x8_t test_vbicq_s16(int16x8_t a, int16x8_t b) {
+ // CHECK-LABEL: test_vbicq_s16
+ return vbicq_s16(a, b);
+ // CHECK: bic {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+int32x2_t test_vbic_s32(int32x2_t a, int32x2_t b) {
+ // CHECK-LABEL: test_vbic_s32
+ return vbic_s32(a, b);
+ // CHECK: bic {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+int32x4_t test_vbicq_s32(int32x4_t a, int32x4_t b) {
+ // CHECK-LABEL: test_vbicq_s32
+ return vbicq_s32(a, b);
+ // CHECK: bic {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+int64x1_t test_vbic_s64(int64x1_t a, int64x1_t b) {
+ // CHECK-LABEL: test_vbic_s64
+ return vbic_s64(a, b);
+ // CHECK: bic {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+int64x2_t test_vbicq_s64(int64x2_t a, int64x2_t b) {
+ // CHECK-LABEL: test_vbicq_s64
+ return vbicq_s64(a, b);
+ // CHECK: bic {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+uint8x8_t test_vbic_u8(uint8x8_t a, uint8x8_t b) {
+ // CHECK-LABEL: test_vbic_u8
+ return vbic_u8(a, b);
+ // CHECK: bic {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+uint8x16_t test_vbicq_u8(uint8x16_t a, uint8x16_t b) {
+ // CHECK-LABEL: test_vbicq_u8
+ return vbicq_u8(a, b);
+ // CHECK: bic {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+uint16x4_t test_vbic_u16(uint16x4_t a, uint16x4_t b) {
+ // CHECK-LABEL: test_vbic_u16
+ return vbic_u16(a, b);
+ // CHECK: bic {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+uint16x8_t test_vbicq_u16(uint16x8_t a, uint16x8_t b) {
+ // CHECK-LABEL: test_vbicq_u16
+ return vbicq_u16(a, b);
+ // CHECK: bic {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+uint32x2_t test_vbic_u32(uint32x2_t a, uint32x2_t b) {
+ // CHECK-LABEL: test_vbic_u32
+ return vbic_u32(a, b);
+ // CHECK: bic {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+uint32x4_t test_vbicq_u32(uint32x4_t a, uint32x4_t b) {
+ // CHECK-LABEL: test_vbicq_u32
+ return vbicq_u32(a, b);
+ // CHECK: bic {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+uint64x1_t test_vbic_u64(uint64x1_t a, uint64x1_t b) {
+ // CHECK-LABEL: test_vbic_u64
+ return vbic_u64(a, b);
+ // CHECK: bic {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+uint64x2_t test_vbicq_u64(uint64x2_t a, uint64x2_t b) {
+ // CHECK-LABEL: test_vbicq_u64
+ return vbicq_u64(a, b);
+ // CHECK: bic {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+int8x8_t test_vorn_s8(int8x8_t a, int8x8_t b) {
+ // CHECK-LABEL: test_vorn_s8
+ return vorn_s8(a, b);
+ // CHECK: orn {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+int8x16_t test_vornq_s8(int8x16_t a, int8x16_t b) {
+ // CHECK-LABEL: test_vornq_s8
+ return vornq_s8(a, b);
+ // CHECK: orn {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+int16x4_t test_vorn_s16(int16x4_t a, int16x4_t b) {
+ // CHECK-LABEL: test_vorn_s16
+ return vorn_s16(a, b);
+ // CHECK: orn {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+int16x8_t test_vornq_s16(int16x8_t a, int16x8_t b) {
+ // CHECK-LABEL: test_vornq_s16
+ return vornq_s16(a, b);
+ // CHECK: orn {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+int32x2_t test_vorn_s32(int32x2_t a, int32x2_t b) {
+ // CHECK-LABEL: test_vorn_s32
+ return vorn_s32(a, b);
+ // CHECK: orn {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+int32x4_t test_vornq_s32(int32x4_t a, int32x4_t b) {
+ // CHECK-LABEL: test_vornq_s32
+ return vornq_s32(a, b);
+ // CHECK: orn {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+int64x1_t test_vorn_s64(int64x1_t a, int64x1_t b) {
+ // CHECK-LABEL: test_vorn_s64
+ return vorn_s64(a, b);
+ // CHECK: orn {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+int64x2_t test_vornq_s64(int64x2_t a, int64x2_t b) {
+ // CHECK-LABEL: test_vornq_s64
+ return vornq_s64(a, b);
+ // CHECK: orn {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+uint8x8_t test_vorn_u8(uint8x8_t a, uint8x8_t b) {
+ // CHECK-LABEL: test_vorn_u8
+ return vorn_u8(a, b);
+ // CHECK: orn {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+uint8x16_t test_vornq_u8(uint8x16_t a, uint8x16_t b) {
+ // CHECK-LABEL: test_vornq_u8
+ return vornq_u8(a, b);
+ // CHECK: orn {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+uint16x4_t test_vorn_u16(uint16x4_t a, uint16x4_t b) {
+ // CHECK-LABEL: test_vorn_u16
+ return vorn_u16(a, b);
+ // CHECK: orn {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+uint16x8_t test_vornq_u16(uint16x8_t a, uint16x8_t b) {
+ // CHECK-LABEL: test_vornq_u16
+ return vornq_u16(a, b);
+ // CHECK: orn {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+uint32x2_t test_vorn_u32(uint32x2_t a, uint32x2_t b) {
+ // CHECK-LABEL: test_vorn_u32
+ return vorn_u32(a, b);
+ // CHECK: orn {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+uint32x4_t test_vornq_u32(uint32x4_t a, uint32x4_t b) {
+ // CHECK-LABEL: test_vornq_u32
+ return vornq_u32(a, b);
+ // CHECK: orn {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+uint64x1_t test_vorn_u64(uint64x1_t a, uint64x1_t b) {
+ // CHECK-LABEL: test_vorn_u64
+ return vorn_u64(a, b);
+ // CHECK: orn {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+uint64x2_t test_vornq_u64(uint64x2_t a, uint64x2_t b) {
+ // CHECK-LABEL: test_vornq_u64
+ return vornq_u64(a, b);
+ // CHECK: orn {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
diff --git a/test/CodeGen/aarch64-neon-across.c b/test/CodeGen/aarch64-neon-across.c
index 257b839e2248..00eb2e45b089 100644
--- a/test/CodeGen/aarch64-neon-across.c
+++ b/test/CodeGen/aarch64-neon-across.c
@@ -1,5 +1,5 @@
// REQUIRES: aarch64-registered-target
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
// RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s
// Test new aarch64 intrinsics and types
@@ -7,265 +7,265 @@
#include <arm_neon.h>
int16_t test_vaddlv_s8(int8x8_t a) {
- // CHECK: test_vaddlv_s8
+ // CHECK-LABEL: test_vaddlv_s8
return vaddlv_s8(a);
// CHECK: saddlv {{h[0-9]+}}, {{v[0-9]+}}.8b
}
int32_t test_vaddlv_s16(int16x4_t a) {
- // CHECK: test_vaddlv_s16
+ // CHECK-LABEL: test_vaddlv_s16
return vaddlv_s16(a);
// CHECK: saddlv {{s[0-9]+}}, {{v[0-9]+}}.4h
}
uint16_t test_vaddlv_u8(uint8x8_t a) {
- // CHECK: test_vaddlv_u8
+ // CHECK-LABEL: test_vaddlv_u8
return vaddlv_u8(a);
// CHECK: uaddlv {{h[0-9]+}}, {{v[0-9]+}}.8b
}
uint32_t test_vaddlv_u16(uint16x4_t a) {
- // CHECK: test_vaddlv_u16
+ // CHECK-LABEL: test_vaddlv_u16
return vaddlv_u16(a);
// CHECK: uaddlv {{s[0-9]+}}, {{v[0-9]+}}.4h
}
int16_t test_vaddlvq_s8(int8x16_t a) {
- // CHECK: test_vaddlvq_s8
+ // CHECK-LABEL: test_vaddlvq_s8
return vaddlvq_s8(a);
// CHECK: saddlv {{h[0-9]+}}, {{v[0-9]+}}.16b
}
int32_t test_vaddlvq_s16(int16x8_t a) {
- // CHECK: test_vaddlvq_s16
+ // CHECK-LABEL: test_vaddlvq_s16
return vaddlvq_s16(a);
// CHECK: saddlv {{s[0-9]+}}, {{v[0-9]+}}.8h
}
int64_t test_vaddlvq_s32(int32x4_t a) {
- // CHECK: test_vaddlvq_s32
+ // CHECK-LABEL: test_vaddlvq_s32
return vaddlvq_s32(a);
// CHECK: saddlv {{d[0-9]+}}, {{v[0-9]+}}.4s
}
uint16_t test_vaddlvq_u8(uint8x16_t a) {
- // CHECK: test_vaddlvq_u8
+ // CHECK-LABEL: test_vaddlvq_u8
return vaddlvq_u8(a);
// CHECK: uaddlv {{h[0-9]+}}, {{v[0-9]+}}.16b
}
uint32_t test_vaddlvq_u16(uint16x8_t a) {
- // CHECK: test_vaddlvq_u16
+ // CHECK-LABEL: test_vaddlvq_u16
return vaddlvq_u16(a);
// CHECK: uaddlv {{s[0-9]+}}, {{v[0-9]+}}.8h
}
uint64_t test_vaddlvq_u32(uint32x4_t a) {
- // CHECK: test_vaddlvq_u32
+ // CHECK-LABEL: test_vaddlvq_u32
return vaddlvq_u32(a);
// CHECK: uaddlv {{d[0-9]+}}, {{v[0-9]+}}.4s
}
int8_t test_vmaxv_s8(int8x8_t a) {
- // CHECK: test_vmaxv_s8
+ // CHECK-LABEL: test_vmaxv_s8
return vmaxv_s8(a);
// CHECK: smaxv {{b[0-9]+}}, {{v[0-9]+}}.8b
}
int16_t test_vmaxv_s16(int16x4_t a) {
- // CHECK: test_vmaxv_s16
+ // CHECK-LABEL: test_vmaxv_s16
return vmaxv_s16(a);
// CHECK: smaxv {{h[0-9]+}}, {{v[0-9]+}}.4h
}
uint8_t test_vmaxv_u8(uint8x8_t a) {
- // CHECK: test_vmaxv_u8
+ // CHECK-LABEL: test_vmaxv_u8
return vmaxv_u8(a);
// CHECK: umaxv {{b[0-9]+}}, {{v[0-9]+}}.8b
}
uint16_t test_vmaxv_u16(uint16x4_t a) {
- // CHECK: test_vmaxv_u16
+ // CHECK-LABEL: test_vmaxv_u16
return vmaxv_u16(a);
// CHECK: umaxv {{h[0-9]+}}, {{v[0-9]+}}.4h
}
int8_t test_vmaxvq_s8(int8x16_t a) {
- // CHECK: test_vmaxvq_s8
+ // CHECK-LABEL: test_vmaxvq_s8
return vmaxvq_s8(a);
// CHECK: smaxv {{b[0-9]+}}, {{v[0-9]+}}.16b
}
int16_t test_vmaxvq_s16(int16x8_t a) {
- // CHECK: test_vmaxvq_s16
+ // CHECK-LABEL: test_vmaxvq_s16
return vmaxvq_s16(a);
// CHECK: smaxv {{h[0-9]+}}, {{v[0-9]+}}.8h
}
int32_t test_vmaxvq_s32(int32x4_t a) {
- // CHECK: test_vmaxvq_s32
+ // CHECK-LABEL: test_vmaxvq_s32
return vmaxvq_s32(a);
// CHECK: smaxv {{s[0-9]+}}, {{v[0-9]+}}.4s
}
uint8_t test_vmaxvq_u8(uint8x16_t a) {
- // CHECK: test_vmaxvq_u8
+ // CHECK-LABEL: test_vmaxvq_u8
return vmaxvq_u8(a);
// CHECK: umaxv {{b[0-9]+}}, {{v[0-9]+}}.16b
}
uint16_t test_vmaxvq_u16(uint16x8_t a) {
- // CHECK: test_vmaxvq_u16
+ // CHECK-LABEL: test_vmaxvq_u16
return vmaxvq_u16(a);
// CHECK: umaxv {{h[0-9]+}}, {{v[0-9]+}}.8h
}
uint32_t test_vmaxvq_u32(uint32x4_t a) {
- // CHECK: test_vmaxvq_u32
+ // CHECK-LABEL: test_vmaxvq_u32
return vmaxvq_u32(a);
// CHECK: umaxv {{s[0-9]+}}, {{v[0-9]+}}.4s
}
int8_t test_vminv_s8(int8x8_t a) {
- // CHECK: test_vminv_s8
+ // CHECK-LABEL: test_vminv_s8
return vminv_s8(a);
// CHECK: sminv {{b[0-9]+}}, {{v[0-9]+}}.8b
}
int16_t test_vminv_s16(int16x4_t a) {
- // CHECK: test_vminv_s16
+ // CHECK-LABEL: test_vminv_s16
return vminv_s16(a);
// CHECK: sminv {{h[0-9]+}}, {{v[0-9]+}}.4h
}
uint8_t test_vminv_u8(uint8x8_t a) {
- // CHECK: test_vminv_u8
+ // CHECK-LABEL: test_vminv_u8
return vminv_u8(a);
// CHECK: uminv {{b[0-9]+}}, {{v[0-9]+}}.8b
}
uint16_t test_vminv_u16(uint16x4_t a) {
- // CHECK: test_vminv_u16
+ // CHECK-LABEL: test_vminv_u16
return vminv_u16(a);
// CHECK: uminv {{h[0-9]+}}, {{v[0-9]+}}.4h
}
int8_t test_vminvq_s8(int8x16_t a) {
- // CHECK: test_vminvq_s8
+ // CHECK-LABEL: test_vminvq_s8
return vminvq_s8(a);
// CHECK: sminv {{b[0-9]+}}, {{v[0-9]+}}.16b
}
int16_t test_vminvq_s16(int16x8_t a) {
- // CHECK: test_vminvq_s16
+ // CHECK-LABEL: test_vminvq_s16
return vminvq_s16(a);
// CHECK: sminv {{h[0-9]+}}, {{v[0-9]+}}.8h
}
int32_t test_vminvq_s32(int32x4_t a) {
- // CHECK: test_vminvq_s32
+ // CHECK-LABEL: test_vminvq_s32
return vminvq_s32(a);
// CHECK: sminv {{s[0-9]+}}, {{v[0-9]+}}.4s
}
uint8_t test_vminvq_u8(uint8x16_t a) {
- // CHECK: test_vminvq_u8
+ // CHECK-LABEL: test_vminvq_u8
return vminvq_u8(a);
// CHECK: uminv {{b[0-9]+}}, {{v[0-9]+}}.16b
}
uint16_t test_vminvq_u16(uint16x8_t a) {
- // CHECK: test_vminvq_u16
+ // CHECK-LABEL: test_vminvq_u16
return vminvq_u16(a);
// CHECK: uminv {{h[0-9]+}}, {{v[0-9]+}}.8h
}
uint32_t test_vminvq_u32(uint32x4_t a) {
- // CHECK: test_vminvq_u32
+ // CHECK-LABEL: test_vminvq_u32
return vminvq_u32(a);
// CHECK: uminv {{s[0-9]+}}, {{v[0-9]+}}.4s
}
int8_t test_vaddv_s8(int8x8_t a) {
- // CHECK: test_vaddv_s8
+ // CHECK-LABEL: test_vaddv_s8
return vaddv_s8(a);
// CHECK: addv {{b[0-9]+}}, {{v[0-9]+}}.8b
}
int16_t test_vaddv_s16(int16x4_t a) {
- // CHECK: test_vaddv_s16
+ // CHECK-LABEL: test_vaddv_s16
return vaddv_s16(a);
// CHECK: addv {{h[0-9]+}}, {{v[0-9]+}}.4h
}
uint8_t test_vaddv_u8(uint8x8_t a) {
- // CHECK: test_vaddv_u8
+ // CHECK-LABEL: test_vaddv_u8
return vaddv_u8(a);
// CHECK: addv {{b[0-9]+}}, {{v[0-9]+}}.8b
}
uint16_t test_vaddv_u16(uint16x4_t a) {
- // CHECK: test_vaddv_u16
+ // CHECK-LABEL: test_vaddv_u16
return vaddv_u16(a);
// CHECK: addv {{h[0-9]+}}, {{v[0-9]+}}.4h
}
int8_t test_vaddvq_s8(int8x16_t a) {
- // CHECK: test_vaddvq_s8
+ // CHECK-LABEL: test_vaddvq_s8
return vaddvq_s8(a);
// CHECK: addv {{b[0-9]+}}, {{v[0-9]+}}.16b
}
int16_t test_vaddvq_s16(int16x8_t a) {
- // CHECK: test_vaddvq_s16
+ // CHECK-LABEL: test_vaddvq_s16
return vaddvq_s16(a);
// CHECK: addv {{h[0-9]+}}, {{v[0-9]+}}.8h
}
int32_t test_vaddvq_s32(int32x4_t a) {
- // CHECK: test_vaddvq_s32
+ // CHECK-LABEL: test_vaddvq_s32
return vaddvq_s32(a);
// CHECK: addv {{s[0-9]+}}, {{v[0-9]+}}.4s
}
uint8_t test_vaddvq_u8(uint8x16_t a) {
- // CHECK: test_vaddvq_u8
+ // CHECK-LABEL: test_vaddvq_u8
return vaddvq_u8(a);
// CHECK: addv {{b[0-9]+}}, {{v[0-9]+}}.16b
}
uint16_t test_vaddvq_u16(uint16x8_t a) {
- // CHECK: test_vaddvq_u16
+ // CHECK-LABEL: test_vaddvq_u16
return vaddvq_u16(a);
// CHECK: addv {{h[0-9]+}}, {{v[0-9]+}}.8h
}
uint32_t test_vaddvq_u32(uint32x4_t a) {
- // CHECK: test_vaddvq_u32
+ // CHECK-LABEL: test_vaddvq_u32
return vaddvq_u32(a);
// CHECK: addv {{s[0-9]+}}, {{v[0-9]+}}.4s
}
float32_t test_vmaxvq_f32(float32x4_t a) {
- // CHECK: test_vmaxvq_f32
+ // CHECK-LABEL: test_vmaxvq_f32
return vmaxvq_f32(a);
// CHECK: fmaxv {{s[0-9]+}}, {{v[0-9]+}}.4s
}
float32_t test_vminvq_f32(float32x4_t a) {
- // CHECK: test_vminvq_f32
+ // CHECK-LABEL: test_vminvq_f32
return vminvq_f32(a);
// CHECK: fminv {{s[0-9]+}}, {{v[0-9]+}}.4s
}
float32_t test_vmaxnmvq_f32(float32x4_t a) {
- // CHECK: test_vmaxnmvq_f32
+ // CHECK-LABEL: test_vmaxnmvq_f32
return vmaxnmvq_f32(a);
// CHECK: fmaxnmv {{s[0-9]+}}, {{v[0-9]+}}.4s
}
float32_t test_vminnmvq_f32(float32x4_t a) {
- // CHECK: test_vminnmvq_f32
+ // CHECK-LABEL: test_vminnmvq_f32
return vminnmvq_f32(a);
// CHECK: fminnmv {{s[0-9]+}}, {{v[0-9]+}}.4s
}
diff --git a/test/CodeGen/aarch64-neon-copy.c b/test/CodeGen/aarch64-neon-copy.c
deleted file mode 100644
index eb91bf9b5a5c..000000000000
--- a/test/CodeGen/aarch64-neon-copy.c
+++ /dev/null
@@ -1,1319 +0,0 @@
-// REQUIRES: aarch64-registered-target
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \
-// RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s
-
-// Test new aarch64 intrinsics and types
-
-#include <arm_neon.h>
-
-uint8x8_t test_vset_lane_u8(uint8_t v1, uint8x8_t v2) {
- // CHECK: test_vset_lane_u8
- return vset_lane_u8(v1, v2, 6);
- // CHECK: ins {{v[0-9]+}}.b[6], {{w[0-9]+}}
-}
-
-uint16x4_t test_vset_lane_u16(uint16_t v1, uint16x4_t v2) {
- // CHECK: test_vset_lane_u16
- return vset_lane_u16(v1, v2, 2);
- // CHECK: ins {{v[0-9]+}}.h[2], {{w[0-9]+}}
-}
-
-uint32x2_t test_vset_lane_u32(uint32_t v1, uint32x2_t v2) {
- // CHECK: test_vset_lane_u32
- return vset_lane_u32(v1, v2, 1);
- // CHECK: ins {{v[0-9]+}}.s[1], {{w[0-9]+}}
-}
-uint64x1_t test_vset_lane_u64(uint64_t v1, uint64x1_t v2) {
- // CHECK: test_vset_lane_u64
- return vset_lane_u64(v1, v2, 0);
- // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
-}
-
-int8x8_t test_vset_lane_s8(int8_t v1, int8x8_t v2) {
- // CHECK: test_vset_lane_s8
- return vset_lane_s8(v1, v2, 6);
- // CHECK: ins {{v[0-9]+}}.b[6], {{w[0-9]+}}
-}
-
-int16x4_t test_vset_lane_s16(int16_t v1, int16x4_t v2) {
- // CHECK: test_vset_lane_s16
- return vset_lane_s16(v1, v2, 2);
- // CHECK: ins {{v[0-9]+}}.h[2], {{w[0-9]+}}
-}
-
-int32x2_t test_vset_lane_s32(int32_t v1, int32x2_t v2) {
- // CHECK: test_vset_lane_s32
- return vset_lane_s32(v1, v2, 1);
- // CHECK: ins {{v[0-9]+}}.s[1], {{w[0-9]+}}
-}
-
- int64x1_t test_vset_lane_s64(int64_t v1, int64x1_t v2) {
- // CHECK: test_vset_lane_s64
- return vset_lane_s64(v1, v2, 0);
- // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
-}
-
-uint8x16_t test_vsetq_lane_u8(uint8_t v1, uint8x16_t v2) {
- // CHECK: test_vsetq_lane_u8
- return vsetq_lane_u8(v1, v2, 6);
- // CHECK: ins {{v[0-9]+}}.b[6], {{w[0-9]+}}
-}
-
-uint16x8_t test_vsetq_lane_u16(uint16_t v1, uint16x8_t v2) {
- // CHECK: test_vsetq_lane_u16
- return vsetq_lane_u16(v1, v2, 2);
- // CHECK: ins {{v[0-9]+}}.h[2], {{w[0-9]+}}
-}
-
-uint32x4_t test_vsetq_lane_u32(uint32_t v1, uint32x4_t v2) {
- // CHECK: test_vsetq_lane_u32
- return vsetq_lane_u32(v1, v2, 1);
- // CHECK: ins {{v[0-9]+}}.s[1], {{w[0-9]+}}
-}
-
- uint64x2_t test_vsetq_lane_u64(uint64_t v1, uint64x2_t v2) {
- // CHECK: test_vsetq_lane_u64
- return vsetq_lane_u64(v1, v2, 1);
- // CHECK: ins {{v[0-9]+}}.d[1], {{x[0-9]+}}
-}
-
-int8x16_t test_vsetq_lane_s8(int8_t v1, int8x16_t v2) {
- // CHECK: test_vsetq_lane_s8
- return vsetq_lane_s8(v1, v2, 6);
- // CHECK: ins {{v[0-9]+}}.b[6], {{w[0-9]+}}
-}
-
-int16x8_t test_vsetq_lane_s16(int16_t v1, int16x8_t v2) {
- // CHECK: test_vsetq_lane_s16
- return vsetq_lane_s16(v1, v2, 2);
- // CHECK: ins {{v[0-9]+}}.h[2], {{w[0-9]+}}
-}
-
-int32x4_t test_vsetq_lane_s32(int32_t v1, int32x4_t v2) {
- // CHECK: test_vsetq_lane_s32
- return vsetq_lane_s32(v1, v2, 1);
- // CHECK: ins {{v[0-9]+}}.s[1], {{w[0-9]+}}
-}
-
-int64x2_t test_vsetq_lane_s64(int64_t v1, int64x2_t v2) {
- // CHECK: test_vsetq_lane_s64
- return vsetq_lane_s64(v1, v2, 0);
- // CHECK: ins {{v[0-9]+}}.d[0], {{x[0-9]+}}
-}
-
-poly8x8_t test_vset_lane_p8(poly8_t v1, poly8x8_t v2) {
- // CHECK: test_vset_lane_p8
- return vset_lane_p8(v1, v2, 6);
- // CHECK: ins {{v[0-9]+}}.b[6], {{w[0-9]+}}
-}
-
-poly16x4_t test_vset_lane_p16(poly16_t v1, poly16x4_t v2) {
- // CHECK: test_vset_lane_p16
- return vset_lane_p16(v1, v2, 2);
- // CHECK: ins {{v[0-9]+}}.h[2], {{w[0-9]+}}
-}
-
-poly8x16_t test_vsetq_lane_p8(poly8_t v1, poly8x16_t v2) {
- // CHECK: test_vsetq_lane_p8
- return vsetq_lane_p8(v1, v2, 6);
- // CHECK: ins {{v[0-9]+}}.b[6], {{w[0-9]+}}
-}
-
-poly16x8_t test_vsetq_lane_p16(poly16_t v1, poly16x8_t v2) {
- // CHECK: test_vsetq_lane_p16
- return vsetq_lane_p16(v1, v2, 2);
- // CHECK: ins {{v[0-9]+}}.h[2], {{w[0-9]+}}
-}
-
-float32x2_t test_vset_lane_f32(float32_t v1, float32x2_t v2) {
- // CHECK: test_vset_lane_f32
- return vset_lane_f32(v1, v2, 1);
- // CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
-}
-
-float32x4_t test_vsetq_lane_f32(float32_t v1, float32x4_t v2) {
- // CHECK: test_vsetq_lane_f32
- return vsetq_lane_f32(v1, v2, 1);
- // CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
-}
-
-float64x1_t test_vset_lane_f64(float64_t v1, float64x1_t v2) {
- // CHECK: test_vset_lane_f64
- return vset_lane_f64(v1, v2, 0);
- // CHECK: ret
-}
-
-float64x2_t test_vsetq_lane_f64(float64_t v1, float64x2_t v2) {
- // CHECK: test_vsetq_lane_f64
- return vsetq_lane_f64(v1, v2, 0);
- // CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[0]
-}
-
-uint8_t test_vget_lane_u8(uint8x8_t v1) {
- // CHECK: test_vget_lane_u8
- return vget_lane_u8(v1, 7);
- // CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.b[7]
-}
-
-uint16_t test_vget_lane_u16(uint16x4_t v1) {
- // CHECK: test_vget_lane_u16
- return vget_lane_u16(v1, 3);
- // CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.h[3]
-}
-
-uint32_t test_vget_lane_u32(uint32x2_t v1) {
- // CHECK: test_vget_lane_u32
- return vget_lane_u32(v1, 1);
- // CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.s[1]
-}
-
-uint64_t test_vget_lane_u64(uint64x1_t v1) {
- // CHECK: test_vget_lane_u64
- return vget_lane_u64(v1, 0);
- // CHECK: fmov {{x[0-9]+}}, {{d[0-9]+}}
-}
-
-uint8_t test_vgetq_lane_u8(uint8x16_t v1) {
- // CHECK: test_vgetq_lane_u8
- return vgetq_lane_u8(v1, 15);
- // CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.b[15]
-}
-
-uint16_t test_vgetq_lane_u16(uint16x8_t v1) {
- // CHECK: test_vgetq_lane_u16
- return vgetq_lane_u16(v1, 6);
- // CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.h[6]
-}
-
-uint32_t test_vgetq_lane_u32(uint32x4_t v1) {
- // CHECK: test_vgetq_lane_u32
- return vgetq_lane_u32(v1, 2);
- // CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.s[2]
-}
-
-uint64_t test_vgetq_lane_u64(uint64x2_t v1) {
- // CHECK: test_vgetq_lane_u64
- return vgetq_lane_u64(v1, 1);
- // CHECK: umov {{x[0-9]+}}, {{v[0-9]+}}.d[1]
-}
-
-poly8_t test_vget_lane_p8(poly8x8_t v1) {
- // CHECK: test_vget_lane_p8
- return vget_lane_p8(v1, 7);
- // CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.b[7]
-}
-
-poly16_t test_vget_lane_p16(poly16x4_t v1) {
- // CHECK: test_vget_lane_p16
- return vget_lane_p16(v1, 3);
- // CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.h[3]
-}
-
-poly8_t test_vgetq_lane_p8(poly8x16_t v1) {
- // CHECK: test_vgetq_lane_p8
- return vgetq_lane_p8(v1, 14);
- // CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.b[14]
-}
-
-poly16_t test_vgetq_lane_p16(poly16x8_t v1) {
- // CHECK: test_vgetq_lane_p16
- return vgetq_lane_p16(v1, 6);
- // CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.h[6]
-}
-
-int32_t test_vget_lane_s8(int8x8_t v1) {
- // CHECK: test_vget_lane_s8
- return vget_lane_s8(v1, 7)+1;
- // CHECK: smov {{w[0-9]+}}, {{v[0-9]+}}.b[7]
-}
-
-int32_t test_vget_lane_s16(int16x4_t v1) {
- // CHECK: test_vget_lane_s16
- return vget_lane_s16(v1, 3)+1;
- // CHECK: smov {{w[0-9]+}}, {{v[0-9]+}}.h[3]
-}
-
-int64_t test_vget_lane_s32(int32x2_t v1) {
- // CHECK: test_vget_lane_s32
- return vget_lane_s32(v1, 1);
- // CHECK: smov {{x[0-9]+}}, {{v[0-9]+}}.s[1]
-}
-
-int64_t test_vget_lane_s64(int64x1_t v1) {
- // CHECK: test_vget_lane_s64
- return vget_lane_s64(v1, 0);
- // CHECK: fmov {{x[0-9]+}}, {{d[0-9]+}}
-}
-
-int32_t test_vgetq_lane_s8(int8x16_t v1) {
- // CHECK: test_vgetq_lane_s8
- return vgetq_lane_s8(v1, 15)+1;
- // CHECK: smov {{w[0-9]+}}, {{v[0-9]+}}.b[15]
-}
-
-int32_t test_vgetq_lane_s16(int16x8_t v1) {
- // CHECK: test_vgetq_lane_s16
- return vgetq_lane_s16(v1, 6)+1;
- // CHECK: smov {{w[0-9]+}}, {{v[0-9]+}}.h[6]
-}
-
-int64_t test_vgetq_lane_s32(int32x4_t v1) {
- // CHECK: test_vgetq_lane_s32
- return vgetq_lane_s32(v1, 2);
- // CHECK: smov {{x[0-9]+}}, {{v[0-9]+}}.s[2]
-}
-
-int64_t test_vgetq_lane_s64(int64x2_t v1) {
- // CHECK: test_vgetq_lane_s64
- return vgetq_lane_s64(v1, 1);
- // CHECK: umov {{x[0-9]+}}, {{v[0-9]+}}.d[1]
-}
-
-int8x8_t test_vcopy_lane_s8(int8x8_t v1, int8x8_t v2) {
- // CHECK: test_vcopy_lane_s8
- return vcopy_lane_s8(v1, 5, v2, 3);
- // CHECK: ins {{v[0-9]+}}.b[5], {{v[0-9]+}}.b[3]
-}
-
-int16x4_t test_vcopy_lane_s16(int16x4_t v1, int16x4_t v2) {
- // CHECK: test_vcopy_lane_s16
- return vcopy_lane_s16(v1, 2, v2, 3);
- // CHECK: ins {{v[0-9]+}}.h[2], {{v[0-9]+}}.h[3]
-}
-
-poly8x8_t test_vcopy_lane_p8(poly8x8_t v1, poly8x8_t v2) {
- // CHECK: test_vcopy_lane_p8
- return vcopy_lane_p8(v1, 5, v2, 3);
- // CHECK: ins {{v[0-9]+}}.b[5], {{v[0-9]+}}.b[3]
-}
-
-poly16x4_t test_vcopy_lane_p16(poly16x4_t v1, poly16x4_t v2) {
- // CHECK: test_vcopy_lane_p16
- return vcopy_lane_p16(v1, 2, v2, 3);
- // CHECK: ins {{v[0-9]+}}.h[2], {{v[0-9]+}}.h[3]
-}
-
-int32x2_t test_vcopy_lane_s32(int32x2_t v1, int32x2_t v2) {
- // CHECK: test_vcopy_lane_s32
- return vcopy_lane_s32(v1, 0, v2, 1);
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
-}
-
-float32x2_t test_vcopy_lane_f32(float32x2_t v1, float32x2_t v2) {
- // CHECK: test_vcopy_lane_f32
- return vcopy_lane_f32(v1, 0, v2, 1);
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
-}
-
-uint8x8_t test_vcopy_lane_u8(uint8x8_t v1, uint8x8_t v2) {
- // CHECK: test_vcopy_lane_u8
- return vcopy_lane_u8(v1, 5, v2, 3);
- // CHECK: ins {{v[0-9]+}}.b[5], {{v[0-9]+}}.b[3]
-}
-
-uint16x4_t test_vcopy_lane_u16(uint16x4_t v1, uint16x4_t v2) {
- // CHECK: test_vcopy_lane_u16
- return vcopy_lane_u16(v1, 2, v2, 3);
- // CHECK: ins {{v[0-9]+}}.h[2], {{v[0-9]+}}.h[3]
-}
-
-uint32x2_t test_vcopy_lane_u32(uint32x2_t v1, uint32x2_t v2) {
- // CHECK: test_vcopy_lane_u32
- return vcopy_lane_u32(v1, 0, v2, 1);
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
-}
-
-int8x8_t test_vcopy_laneq_s8(int8x8_t v1, int8x16_t v2) {
- // CHECK: test_vcopy_laneq_s8
- return vcopy_laneq_s8(v1, 5, v2, 3);
- // CHECK: ins {{v[0-9]+}}.b[5], {{v[0-9]+}}.b[3]
-}
-
-int16x4_t test_vcopy_laneq_s16(int16x4_t v1, int16x8_t v2) {
- // CHECK: test_vcopy_laneq_s16
- return vcopy_laneq_s16(v1, 2, v2, 3);
- // CHECK: ins {{v[0-9]+}}.h[2], {{v[0-9]+}}.h[3]
-}
-
-poly8x8_t test_vcopy_laneq_p8(poly8x8_t v1, poly8x16_t v2) {
- // CHECK: test_vcopy_laneq_p8
- return vcopy_laneq_p8(v1, 5, v2, 3);
- // CHECK: ins {{v[0-9]+}}.b[5], {{v[0-9]+}}.b[3]
-}
-
-poly16x4_t test_vcopy_laneq_p16(poly16x4_t v1, poly16x8_t v2) {
- // CHECK: test_vcopy_laneq_p16
- return vcopy_laneq_p16(v1, 2, v2, 3);
- // CHECK: ins {{v[0-9]+}}.h[2], {{v[0-9]+}}.h[3]
-}
-
-int32x2_t test_vcopy_laneq_s32(int32x2_t v1, int32x4_t v2) {
- // CHECK: test_vcopy_laneq_s32
- return vcopy_laneq_s32(v1, 0, v2, 1);
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
-}
-
-float32x2_t test_vcopy_laneq_f32(float32x2_t v1, float32x4_t v2) {
- // CHECK: test_vcopy_laneq_f32
- return vcopy_laneq_f32(v1, 0, v2, 1);
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
-}
-
-uint8x8_t test_vcopy_laneq_u8(uint8x8_t v1, uint8x16_t v2) {
- // CHECK: test_vcopy_laneq_u8
- return vcopy_laneq_u8(v1, 5, v2, 3);
- // CHECK: ins {{v[0-9]+}}.b[5], {{v[0-9]+}}.b[3]
-}
-
-uint16x4_t test_vcopy_laneq_u16(uint16x4_t v1, uint16x8_t v2) {
- // CHECK: test_vcopy_laneq_u16
- return vcopy_laneq_u16(v1, 2, v2, 3);
- // CHECK: ins {{v[0-9]+}}.h[2], {{v[0-9]+}}.h[3]
-}
-
-uint32x2_t test_vcopy_laneq_u32(uint32x2_t v1, uint32x4_t v2) {
- // CHECK: test_vcopy_laneq_u32
- return vcopy_laneq_u32(v1, 0, v2, 1);
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
-}
-
-int8x16_t test_vcopyq_lane_s8(int8x16_t v1, int8x8_t v2) {
- // CHECK: test_vcopyq_lane_s8
- return vcopyq_lane_s8(v1, 5, v2, 3);
- // CHECK: ins {{v[0-9]+}}.b[5], {{v[0-9]+}}.b[3]
-}
-
-int16x8_t test_vcopyq_lane_s16(int16x8_t v1, int16x4_t v2) {
- // CHECK: test_vcopyq_lane_s16
- return vcopyq_lane_s16(v1, 2, v2, 3);
- // CHECK: ins {{v[0-9]+}}.h[2], {{v[0-9]+}}.h[3]
-}
-
-poly8x16_t test_vcopyq_lane_p8(poly8x16_t v1, poly8x8_t v2) {
- // CHECK: test_vcopyq_lane_p8
- return vcopyq_lane_p8(v1, 5, v2, 3);
- // CHECK: ins {{v[0-9]+}}.b[5], {{v[0-9]+}}.b[3]
-}
-
-poly16x8_t test_vcopyq_lane_p16(poly16x8_t v1, poly16x4_t v2) {
- // CHECK: test_vcopyq_lane_p16
- return vcopyq_lane_p16(v1, 2, v2, 3);
- // CHECK: ins {{v[0-9]+}}.h[2], {{v[0-9]+}}.h[3]
-}
-
-int32x4_t test_vcopyq_lane_s32(int32x4_t v1, int32x2_t v2) {
- // CHECK: test_vcopyq_lane_s32
- return vcopyq_lane_s32(v1, 0, v2, 1);
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
-}
-
-int64x2_t test_vcopyq_lane_s64(int64x2_t v1, int64x1_t v2) {
- // CHECK: test_vcopyq_lane_s64
- return vcopyq_lane_s64(v1, 1, v2, 0);
- // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
-}
-
-float32x4_t test_vcopyq_lane_f32(float32x4_t v1, float32x2_t v2) {
- // CHECK: test_vcopyq_lane_f32
- return vcopyq_lane_f32(v1, 0, v2, 1);
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
-}
-
-float64x2_t test_vcopyq_lane_f64(float64x2_t v1, float64x1_t v2) {
- // CHECK: test_vcopyq_lane_f64
- return vcopyq_lane_f64(v1, 1, v2, 0);
- // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
-}
-
-uint8x16_t test_vcopyq_lane_u8(uint8x16_t v1, uint8x8_t v2) {
- // CHECK: test_vcopyq_lane_u8
- return vcopyq_lane_u8(v1, 5, v2, 3);
- // CHECK: ins {{v[0-9]+}}.b[5], {{v[0-9]+}}.b[3]
-}
-
-uint16x8_t test_vcopyq_lane_u16(uint16x8_t v1, uint16x4_t v2) {
- // CHECK: test_vcopyq_lane_u16
- return vcopyq_lane_u16(v1, 2, v2, 3);
- // CHECK: ins {{v[0-9]+}}.h[2], {{v[0-9]+}}.h[3]
-}
-
-uint32x4_t test_vcopyq_lane_u32(uint32x4_t v1, uint32x2_t v2) {
- // CHECK: test_vcopyq_lane_u32
- return vcopyq_lane_u32(v1, 0, v2, 1);
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
-}
-
-uint64x2_t test_vcopyq_lane_u64(uint64x2_t v1, uint64x1_t v2) {
- // CHECK: test_vcopyq_lane_u64
- return vcopyq_lane_u64(v1, 1, v2, 0);
- // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
-}
-
-int8x16_t test_vcopyq_laneq_s8(int8x16_t v1, int8x16_t v2) {
- // CHECK: test_vcopyq_laneq_s8
- return vcopyq_laneq_s8(v1, 5, v2, 3);
- // CHECK: ins {{v[0-9]+}}.b[5], {{v[0-9]+}}.b[3]
-}
-
-int16x8_t test_vcopyq_laneq_s16(int16x8_t v1, int16x8_t v2) {
- // CHECK: test_vcopyq_laneq_s16
- return vcopyq_laneq_s16(v1, 2, v2, 3);
- // CHECK: ins {{v[0-9]+}}.h[2], {{v[0-9]+}}.h[3]
-}
-
-poly8x16_t test_vcopyq_laneq_p8(poly8x16_t v1, poly8x16_t v2) {
- // CHECK: test_vcopyq_laneq_p8
- return vcopyq_laneq_p8(v1, 5, v2, 3);
- // CHECK: ins {{v[0-9]+}}.b[5], {{v[0-9]+}}.b[3]
-}
-
-poly16x8_t test_vcopyq_laneq_p16(poly16x8_t v1, poly16x8_t v2) {
- // CHECK: test_vcopyq_laneq_p16
- return vcopyq_laneq_p16(v1, 2, v2, 3);
- // CHECK: ins {{v[0-9]+}}.h[2], {{v[0-9]+}}.h[3]
-}
-
-int32x4_t test_vcopyq_laneq_s32(int32x4_t v1, int32x4_t v2) {
- // CHECK: test_vcopyq_laneq_s32
- return vcopyq_laneq_s32(v1, 0, v2, 1);
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
-}
-
-float32x4_t test_vcopyq_laneq_f32(float32x4_t v1, float32x4_t v2) {
- // CHECK: test_vcopyq_laneq_f32
- return vcopyq_laneq_f32(v1, 0, v2, 1);
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
-}
-
-int64x2_t test_vcopyq_laneq_s64(int64x2_t v1, int64x2_t v2) {
- // CHECK: test_vcopyq_laneq_s64
- return vcopyq_laneq_s64(v1, 1, v2, 1);
- // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[1]
-}
-
-uint8x16_t test_vcopyq_laneq_u8(uint8x16_t v1, uint8x16_t v2) {
- // CHECK: test_vcopyq_laneq_u8
- return vcopyq_laneq_u8(v1, 5, v2, 3);
- // CHECK: ins {{v[0-9]+}}.b[5], {{v[0-9]+}}.b[3]
-}
-
-uint16x8_t test_vcopyq_laneq_u16(uint16x8_t v1, uint16x8_t v2) {
- // CHECK: test_vcopyq_laneq_u16
- return vcopyq_laneq_u16(v1, 2, v2, 3);
- // CHECK: ins {{v[0-9]+}}.h[2], {{v[0-9]+}}.h[3]
-}
-
-uint32x4_t test_vcopyq_laneq_u32(uint32x4_t v1, uint32x4_t v2) {
- // CHECK: test_vcopyq_laneq_u32
- return vcopyq_laneq_u32(v1, 0, v2, 1);
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
-}
-
-uint64x2_t test_vcopyq_laneq_u64(uint64x2_t v1, uint64x2_t v2) {
- // CHECK: test_vcopyq_laneq_u64
- return vcopyq_laneq_u64(v1, 0, v2, 1);
- // CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[1]
-}
-
-int8x8_t test_vcreate_s8(uint64_t v1) {
- // CHECK: test_vcreate_s8
- return vcreate_s8(v1);
- // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
-}
-
-int16x4_t test_vcreate_s16(uint64_t v1) {
- // CHECK: test_vcreate_s16
- return vcreate_s16(v1);
- // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
-}
-
-int32x2_t test_vcreate_s32(uint64_t v1) {
- // CHECK: test_vcreate_s32
- return vcreate_s32(v1);
- // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
-}
-
-int64x1_t test_vcreate_s64(uint64_t v1) {
- // CHECK: test_vcreate_s64
- return vcreate_s64(v1);
- // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
-}
-
-uint8x8_t test_vcreate_u8(uint64_t v1) {
- // CHECK: test_vcreate_u8
- return vcreate_u8(v1);
- // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
-}
-
-uint16x4_t test_vcreate_u16(uint64_t v1) {
- // CHECK: test_vcreate_u16
- return vcreate_u16(v1);
- // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
-}
-
-uint32x2_t test_vcreate_u32(uint64_t v1) {
- // CHECK: test_vcreate_u32
- return vcreate_u32(v1);
- // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
-}
-
-uint64x1_t test_vcreate_u64(uint64_t v1) {
- // CHECK: test_vcreate_u64
- return vcreate_u64(v1);
- // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
-}
-
-poly8x8_t test_vcreate_p8(uint64_t v1) {
- // CHECK: test_vcreate_p8
- return vcreate_p8(v1);
- // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
-}
-
-poly16x4_t test_vcreate_p16(uint64_t v1) {
- // CHECK: test_vcreate_p16
- return vcreate_p16(v1);
- // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
-}
-
-float16x4_t test_vcreate_f16(uint64_t v1) {
- // CHECK: test_vcreate_f16
- return vcreate_f16(v1);
- // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
-}
-
-float32x2_t test_vcreate_f32(uint64_t v1) {
- // CHECK: test_vcreate_f32
- return vcreate_f32(v1);
- // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
-}
-
-float64x1_t test_vcreate_f64(uint64_t v1) {
- // CHECK: test_vcreate_f64
- return vcreate_f64(v1);
- // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
-}
-
-uint8x8_t test_vdup_n_u8(uint8_t v1) {
- // CHECK: test_vdup_n_u8
- return vdup_n_u8(v1);
- // CHECK: dup {{v[0-9]+}}.8b, {{w[0-9]+}}
-}
-
-uint16x4_t test_vdup_n_u16(uint16_t v1) {
- // CHECK: test_vdup_n_u16
- return vdup_n_u16(v1);
- // CHECK: dup {{v[0-9]+}}.4h, {{w[0-9]+}}
-}
-
-uint32x2_t test_vdup_n_u32(uint32_t v1) {
- // CHECK: test_vdup_n_u32
- return vdup_n_u32(v1);
- // CHECK: dup {{v[0-9]+}}.2s, {{w[0-9]+}}
-}
-
-uint64x1_t test_vdup_n_u64(uint64_t v1) {
- // CHECK: test_vdup_n_u64
- return vdup_n_u64(v1);
- // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
-}
-
-uint8x16_t test_vdupq_n_u8(uint8_t v1) {
- // CHECK: test_vdupq_n_u8
- return vdupq_n_u8(v1);
- // CHECK: dup {{v[0-9]+}}.16b, {{w[0-9]+}}
-}
-
-uint16x8_t test_vdupq_n_u16(uint16_t v1) {
- // CHECK: test_vdupq_n_u16
- return vdupq_n_u16(v1);
- // CHECK: dup {{v[0-9]+}}.8h, {{w[0-9]+}}
-}
-
-uint32x4_t test_vdupq_n_u32(uint32_t v1) {
- // CHECK: test_vdupq_n_u32
- return vdupq_n_u32(v1);
- // CHECK: dup {{v[0-9]+}}.4s, {{w[0-9]+}}
-}
-
-uint64x2_t test_vdupq_n_u64(uint64_t v1) {
- // CHECK: test_vdupq_n_u64
- return vdupq_n_u64(v1);
- // CHECK: dup {{v[0-9]+}}.2d, {{x[0-9]+}}
-}
-
-int8x8_t test_vdup_n_s8(int8_t v1) {
- // CHECK: test_vdup_n_s8
- return vdup_n_s8(v1);
- // CHECK: dup {{v[0-9]+}}.8b, {{w[0-9]+}}
-}
-
-int16x4_t test_vdup_n_s16(int16_t v1) {
- // CHECK: test_vdup_n_s16
- return vdup_n_s16(v1);
- // CHECK: dup {{v[0-9]+}}.4h, {{w[0-9]+}}
-}
-
-int32x2_t test_vdup_n_s32(int32_t v1) {
- // CHECK: test_vdup_n_s32
- return vdup_n_s32(v1);
- // CHECK: dup {{v[0-9]+}}.2s, {{w[0-9]+}}
-}
-
-int64x1_t test_vdup_n_s64(int64_t v1) {
- // CHECK: test_vdup_n_s64
- return vdup_n_s64(v1);
- // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
-}
-
-int8x16_t test_vdupq_n_s8(int8_t v1) {
- // CHECK: test_vdupq_n_s8
- return vdupq_n_s8(v1);
- // CHECK: dup {{v[0-9]+}}.16b, {{w[0-9]+}}
-}
-
-int16x8_t test_vdupq_n_s16(int16_t v1) {
- // CHECK: test_vdupq_n_s16
- return vdupq_n_s16(v1);
- // CHECK: dup {{v[0-9]+}}.8h, {{w[0-9]+}}
-}
-
-int32x4_t test_vdupq_n_s32(int32_t v1) {
- // CHECK: test_vdupq_n_s32
- return vdupq_n_s32(v1);
- // CHECK: dup {{v[0-9]+}}.4s, {{w[0-9]+}}
-}
-
-int64x2_t test_vdupq_n_s64(int64_t v1) {
- // CHECK: test_vdupq_n_s64
- return vdupq_n_s64(v1);
- // CHECK: dup {{v[0-9]+}}.2d, {{x[0-9]+}}
-}
-
-poly8x8_t test_vdup_n_p8(poly8_t v1) {
- // CHECK: test_vdup_n_p8
- return vdup_n_p8(v1);
- // CHECK: dup {{v[0-9]+}}.8b, {{w[0-9]+}}
-}
-
-poly16x4_t test_vdup_n_p16(poly16_t v1) {
- // CHECK: test_vdup_n_p16
- return vdup_n_p16(v1);
- // CHECK: dup {{v[0-9]+}}.4h, {{w[0-9]+}}
-}
-
-poly8x16_t test_vdupq_n_p8(poly8_t v1) {
- // CHECK: test_vdupq_n_p8
- return vdupq_n_p8(v1);
- // CHECK: dup {{v[0-9]+}}.16b, {{w[0-9]+}}
-}
-
-poly16x8_t test_vdupq_n_p16(poly16_t v1) {
- // CHECK: test_vdupq_n_p16
- return vdupq_n_p16(v1);
- // CHECK: dup {{v[0-9]+}}.8h, {{w[0-9]+}}
-}
-
-float32x2_t test_vdup_n_f32(float32_t v1) {
- // CHECK: test_vdup_n_f32
- return vdup_n_f32(v1);
- // CHECK: dup {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
-}
-
-float64x1_t test_vdup_n_f64(float64_t v1) {
- // CHECK: test_vdup_n_f64
- return vdup_n_f64(v1);
- // CHECK: ret
-}
-
-float32x4_t test_vdupq_n_f32(float32_t v1) {
- // CHECK: test_vdupq_n_f32
- return vdupq_n_f32(v1);
- // CHECK: dup {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
-}
-
-float64x2_t test_vdupq_n_f64(float64_t v1) {
- // CHECK: test_vdupq_n_f64
- return vdupq_n_f64(v1);
- // CHECK: dup {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
-}
-
-int8x8_t test_vdup_lane_s8(int8x8_t v1) {
- // CHECK: test_vdup_lane_s8
- return vdup_lane_s8(v1, 5);
- // CHECK: dup {{v[0-9]+}}.8b, {{v[0-9]+}}.b[5]
-}
-
-int16x4_t test_vdup_lane_s16(int16x4_t v1) {
- // CHECK: test_vdup_lane_s16
- return vdup_lane_s16(v1, 2);
- // CHECK: dup {{v[0-9]+}}.4h, {{v[0-9]+}}.h[2]
-}
-
-int32x2_t test_vdup_lane_s32(int32x2_t v1) {
- // CHECK: test_vdup_lane_s32
- return vdup_lane_s32(v1, 1);
- // CHECK: dup {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
-}
-
-int64x1_t test_vdup_lane_s64(int64x1_t v1) {
- // CHECK: test_vdup_lane_s64
- return vdup_lane_s64(v1, 0);
- // CHECK: ret
-}
-
-int8x16_t test_vdupq_lane_s8(int8x8_t v1) {
- // CHECK: test_vdupq_lane_s8
- return vdupq_lane_s8(v1, 5);
- // CHECK: dup {{v[0-9]+}}.16b, {{v[0-9]+}}.b[5]
-}
-
-int16x8_t test_vdupq_lane_s16(int16x4_t v1) {
- // CHECK: test_vdupq_lane_s16
- return vdupq_lane_s16(v1, 2);
- // CHECK: dup {{v[0-9]+}}.8h, {{v[0-9]+}}.h[2]
-}
-
-int32x4_t test_vdupq_lane_s32(int32x2_t v1) {
- // CHECK: test_vdupq_lane_s32
- return vdupq_lane_s32(v1, 1);
- // CHECK: dup {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
-}
-
-int64x2_t test_vdupq_lane_s64(int64x1_t v1) {
- // CHECK: test_vdupq_lane_s64
- return vdupq_lane_s64(v1, 0);
- // CHECK: dup {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
-}
-
-uint8x8_t test_vdup_lane_u8(uint8x8_t v1) {
- // CHECK: test_vdup_lane_u8
- return vdup_lane_u8(v1, 5);
- // CHECK: dup {{v[0-9]+}}.8b, {{v[0-9]+}}.b[5]
-}
-
-uint16x4_t test_vdup_lane_u16(uint16x4_t v1) {
- // CHECK: test_vdup_lane_u16
- return vdup_lane_u16(v1, 2);
- // CHECK: dup {{v[0-9]+}}.4h, {{v[0-9]+}}.h[2]
-}
-
-uint32x2_t test_vdup_lane_u32(uint32x2_t v1) {
- // CHECK: test_vdup_lane_u32
- return vdup_lane_u32(v1, 1);
- // CHECK: dup {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
-}
-
-uint64x1_t test_vdup_lane_u64(uint64x1_t v1) {
- // CHECK: test_vdup_lane_u64
- return vdup_lane_u64(v1, 0);
- // CHECK: ret
-}
-
-uint8x16_t test_vdupq_lane_u8(uint8x8_t v1) {
- // CHECK: test_vdupq_lane_u8
- return vdupq_lane_u8(v1, 5);
- // CHECK: dup {{v[0-9]+}}.16b, {{v[0-9]+}}.b[5]
-}
-
-uint16x8_t test_vdupq_lane_u16(uint16x4_t v1) {
- // CHECK: test_vdupq_lane_u16
- return vdupq_lane_u16(v1, 2);
- // CHECK: dup {{v[0-9]+}}.8h, {{v[0-9]+}}.h[2]
-}
-
-uint32x4_t test_vdupq_lane_u32(uint32x2_t v1) {
- // CHECK: test_vdupq_lane_u32
- return vdupq_lane_u32(v1, 1);
- // CHECK: dup {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
-}
-
-uint64x2_t test_vdupq_lane_u64(uint64x1_t v1) {
- // CHECK: test_vdupq_lane_u64
- return vdupq_lane_u64(v1, 0);
- // CHECK: dup {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
-}
-
-int8x8_t test_vdup_laneq_s8(int8x16_t v1) {
- // CHECK: test_vdup_laneq_s8
- return vdup_laneq_s8(v1, 5);
- // CHECK: dup {{v[0-9]+}}.8b, {{v[0-9]+}}.b[5]
-}
-
-int16x4_t test_vdup_laneq_s16(int16x8_t v1) {
- // CHECK: test_vdup_laneq_s16
- return vdup_laneq_s16(v1, 2);
- // CHECK: dup {{v[0-9]+}}.4h, {{v[0-9]+}}.h[2]
-}
-
-int32x2_t test_vdup_laneq_s32(int32x4_t v1) {
- // CHECK: test_vdup_laneq_s32
- return vdup_laneq_s32(v1, 1);
- // CHECK: dup {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
-}
-
-int64x1_t test_vdup_laneq_s64(int64x2_t v1) {
- // CHECK: test_vdup_laneq_s64
- return vdup_laneq_s64(v1, 0);
- // CHECK: ret
-}
-
-int8x16_t test_vdupq_laneq_s8(int8x16_t v1) {
- // CHECK: test_vdupq_laneq_s8
- return vdupq_laneq_s8(v1, 5);
- // CHECK: dup {{v[0-9]+}}.16b, {{v[0-9]+}}.b[5]
-}
-
-int16x8_t test_vdupq_laneq_s16(int16x8_t v1) {
- // CHECK: test_vdupq_laneq_s16
- return vdupq_laneq_s16(v1, 2);
- // CHECK: dup {{v[0-9]+}}.8h, {{v[0-9]+}}.h[2]
-}
-
-int32x4_t test_vdupq_laneq_s32(int32x4_t v1) {
- // CHECK: test_vdupq_laneq_s32
- return vdupq_laneq_s32(v1, 1);
- // CHECK: dup {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
-}
-
-int64x2_t test_vdupq_laneq_s64(int64x2_t v1) {
- // CHECK: test_vdupq_laneq_s64
- return vdupq_laneq_s64(v1, 0);
- // CHECK: dup {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
-}
-
-uint8x8_t test_vdup_laneq_u8(uint8x16_t v1) {
- // CHECK: test_vdup_laneq_u8
- return vdup_laneq_u8(v1, 5);
- // CHECK: dup {{v[0-9]+}}.8b, {{v[0-9]+}}.b[5]
-}
-
-uint16x4_t test_vdup_laneq_u16(uint16x8_t v1) {
- // CHECK: test_vdup_laneq_u16
- return vdup_laneq_u16(v1, 2);
- // CHECK: dup {{v[0-9]+}}.4h, {{v[0-9]+}}.h[2]
-}
-
-uint32x2_t test_vdup_laneq_u32(uint32x4_t v1) {
- // CHECK: test_vdup_laneq_u32
- return vdup_laneq_u32(v1, 1);
- // CHECK: dup {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
-}
-
-uint64x1_t test_vdup_laneq_u64(uint64x2_t v1) {
- // CHECK: test_vdup_laneq_u64
- return vdup_laneq_u64(v1, 0);
- // CHECK: ret
-}
-
-uint8x16_t test_vdupq_laneq_u8(uint8x16_t v1) {
- // CHECK: test_vdupq_laneq_u8
- return vdupq_laneq_u8(v1, 5);
- // CHECK: dup {{v[0-9]+}}.16b, {{v[0-9]+}}.b[5]
-}
-
-uint16x8_t test_vdupq_laneq_u16(uint16x8_t v1) {
- // CHECK: test_vdupq_laneq_u16
- return vdupq_laneq_u16(v1, 2);
- // CHECK: dup {{v[0-9]+}}.8h, {{v[0-9]+}}.h[2]
-}
-
-uint32x4_t test_vdupq_laneq_u32(uint32x4_t v1) {
- // CHECK: test_vdupq_laneq_u32
- return vdupq_laneq_u32(v1, 1);
- // CHECK: dup {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
-}
-
-uint64x2_t test_vdupq_laneq_u64(uint64x2_t v1) {
- // CHECK: test_vdupq_laneq_u64
- return vdupq_laneq_u64(v1, 0);
- // CHECK: dup {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
-}
-
-poly8x8_t test_vdup_lane_p8(poly8x8_t v1) {
- // CHECK: test_vdup_lane_p8
- return vdup_lane_p8(v1, 5);
- // CHECK: dup {{v[0-9]+}}.8b, {{v[0-9]+}}.b[5]
-}
-
-poly16x4_t test_vdup_lane_p16(poly16x4_t v1) {
- // CHECK: test_vdup_lane_p16
- return vdup_lane_p16(v1, 2);
- // CHECK: dup {{v[0-9]+}}.4h, {{v[0-9]+}}.h[2]
-}
-
-poly8x16_t test_vdupq_lane_p8(poly8x8_t v1) {
- // CHECK: test_vdupq_lane_p8
- return vdupq_lane_p8(v1, 5);
- // CHECK: dup {{v[0-9]+}}.16b, {{v[0-9]+}}.b[5]
-}
-
-poly16x8_t test_vdupq_lane_p16(poly16x4_t v1) {
- // CHECK: test_vdupq_lane_p16
- return vdupq_lane_p16(v1, 2);
- // CHECK: dup {{v[0-9]+}}.8h, {{v[0-9]+}}.h[2]
-}
-
-poly8x8_t test_vdup_laneq_p8(poly8x16_t v1) {
- // CHECK: test_vdup_laneq_p8
- return vdup_laneq_p8(v1, 5);
- // CHECK: dup {{v[0-9]+}}.8b, {{v[0-9]+}}.b[5]
-}
-
-poly16x4_t test_vdup_laneq_p16(poly16x8_t v1) {
- // CHECK: test_vdup_laneq_p16
- return vdup_laneq_p16(v1, 2);
- // CHECK: dup {{v[0-9]+}}.4h, {{v[0-9]+}}.h[2]
-}
-
-poly8x16_t test_vdupq_laneq_p8(poly8x16_t v1) {
- // CHECK: test_vdupq_laneq_p8
- return vdupq_laneq_p8(v1, 5);
- // CHECK: dup {{v[0-9]+}}.16b, {{v[0-9]+}}.b[5]
-}
-
-poly16x8_t test_vdupq_laneq_p16(poly16x8_t v1) {
- // CHECK: test_vdupq_laneq_p16
- return vdupq_laneq_p16(v1, 2);
- // CHECK: dup {{v[0-9]+}}.8h, {{v[0-9]+}}.h[2]
-}
-
-float16x4_t test_vdup_lane_f16(float16x4_t v1) {
- // CHECK: test_vdup_lane_f16
- return vdup_lane_f16(v1, 2);
- // CHECK: dup {{v[0-9]+}}.4h, {{v[0-9]+}}.h[2]
-}
-
-float32x2_t test_vdup_lane_f32(float32x2_t v1) {
- // CHECK: test_vdup_lane_f32
- return vdup_lane_f32(v1, 1);
- // CHECK: dup {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
-}
-
-float64x1_t test_vdup_lane_f64(float64x1_t v1) {
- // CHECK: test_vdup_lane_f64
- return vdup_lane_f64(v1, 0);
- // CHECK: ret
-}
-
-float16x4_t test_vdup_laneq_f16(float16x8_t v1) {
- // CHECK: test_vdup_laneq_f16
- return vdup_laneq_f16(v1, 2);
- // CHECK: dup {{v[0-9]+}}.4h, {{v[0-9]+}}.h[2]
-}
-
-float32x2_t test_vdup_laneq_f32(float32x4_t v1) {
- // CHECK: test_vdup_laneq_f32
- return vdup_laneq_f32(v1, 1);
- // CHECK: dup {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
-}
-
-float64x1_t test_vdup_laneq_f64(float64x2_t v1) {
- // CHECK: test_vdup_laneq_f64
- return vdup_laneq_f64(v1, 0);
- // CHECK: ret
-}
-
-float16x8_t test_vdupq_lane_f16(float16x4_t v1) {
- // CHECK: test_vdupq_lane_f16
- return vdupq_lane_f16(v1, 2);
- // CHECK: dup {{v[0-9]+}}.8h, {{v[0-9]+}}.h[2]
-}
-
-float32x4_t test_vdupq_lane_f32(float32x2_t v1) {
- // CHECK: test_vdupq_lane_f32
- return vdupq_lane_f32(v1, 1);
- // CHECK: dup {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
-}
-
-float64x2_t test_vdupq_lane_f64(float64x1_t v1) {
- // CHECK: test_vdupq_lane_f64
- return vdupq_lane_f64(v1, 0);
- // CHECK: dup {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
-}
-
-float16x8_t test_vdupq_laneq_f16(float16x8_t v1) {
- // CHECK: test_vdupq_laneq_f16
- return vdupq_laneq_f16(v1, 2);
- // CHECK: dup {{v[0-9]+}}.8h, {{v[0-9]+}}.h[2]
-}
-
-float32x4_t test_vdupq_laneq_f32(float32x4_t v1) {
- // CHECK: test_vdupq_laneq_f32
- return vdupq_laneq_f32(v1, 1);
- // CHECK: dup {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
-}
-
-float64x2_t test_vdupq_laneq_f64(float64x2_t v1) {
- // CHECK: test_vdupq_laneq_f64
- return vdupq_laneq_f64(v1, 0);
- // CHECK: dup {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
-}
-
-int8x8_t test_vmov_n_s8(int8_t v1) {
- // CHECK: test_vmov_n_s8
- return vmov_n_s8(v1);
- // CHECK: dup {{v[0-9]+}}.8b, {{w[0-9]+}}
-}
-
-int16x4_t test_vmov_n_s16(int16_t v1) {
- // CHECK: test_vmov_n_s16
- return vmov_n_s16(v1);
- // CHECK: dup {{v[0-9]+}}.4h, {{w[0-9]+}}
-}
-
-int32x2_t test_vmov_n_s32(int32_t v1) {
- // CHECK: test_vmov_n_s32
- return vmov_n_s32(v1);
- // CHECK: dup {{v[0-9]+}}.2s, {{w[0-9]+}}
-}
-
-int64x1_t test_vmov_n_s64(int64_t v1) {
- // CHECK: test_vmov_n_s64
- return vmov_n_s64(v1);
- // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
-}
-
-int8x16_t test_vmovq_n_s8(int8_t v1) {
- // CHECK: test_vmovq_n_s8
- return vmovq_n_s8(v1);
- // CHECK: dup {{v[0-9]+}}.16b, {{w[0-9]+}}
-}
-
-int16x8_t test_vmovq_n_s16(int16_t v1) {
- // CHECK: test_vmovq_n_s16
- return vmovq_n_s16(v1);
- // CHECK: dup {{v[0-9]+}}.8h, {{w[0-9]+}}
-}
-
-int32x4_t test_vmovq_n_s32(int32_t v1) {
- // CHECK: test_vmovq_n_s32
- return vmovq_n_s32(v1);
- // CHECK: dup {{v[0-9]+}}.4s, {{w[0-9]+}}
-}
-
-int64x2_t test_vmovq_n_s64(int64_t v1) {
- // CHECK: test_vmovq_n_s64
- return vmovq_n_s64(v1);
- // CHECK: dup {{v[0-9]+}}.2d, {{x[0-9]+}}
-}
-
-uint8x8_t test_vmov_n_u8(uint8_t v1) {
- // CHECK: test_vmov_n_u8
- return vmov_n_u8(v1);
- // CHECK: dup {{v[0-9]+}}.8b, {{w[0-9]+}}
-}
-
-uint16x4_t test_vmov_n_u16(uint16_t v1) {
- // CHECK: test_vmov_n_u16
- return vmov_n_u16(v1);
- // CHECK: dup {{v[0-9]+}}.4h, {{w[0-9]+}}
-}
-
-uint32x2_t test_vmov_n_u32(uint32_t v1) {
- // CHECK: test_vmov_n_u32
- return vmov_n_u32(v1);
- // CHECK: dup {{v[0-9]+}}.2s, {{w[0-9]+}}
-}
-
-uint64x1_t test_vmov_n_u64(uint64_t v1) {
- // CHECK: test_vmov_n_u64
- return vmov_n_u64(v1);
- // CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
-}
-
-uint8x16_t test_vmovq_n_u8(uint8_t v1) {
- // CHECK: test_vmovq_n_u8
- return vmovq_n_u8(v1);
- // CHECK: dup {{v[0-9]+}}.16b, {{w[0-9]+}}
-}
-
-uint16x8_t test_vmovq_n_u16(uint16_t v1) {
- // CHECK: test_vmovq_n_u16
- return vmovq_n_u16(v1);
- // CHECK: dup {{v[0-9]+}}.8h, {{w[0-9]+}}
-}
-
-uint32x4_t test_vmovq_n_u32(uint32_t v1) {
- // CHECK: test_vmovq_n_u32
- return vmovq_n_u32(v1);
- // CHECK: dup {{v[0-9]+}}.4s, {{w[0-9]+}}
-}
-
-uint64x2_t test_vmovq_n_u64(uint64_t v1) {
- // CHECK: test_vmovq_n_u64
- return vmovq_n_u64(v1);
- // CHECK: dup {{v[0-9]+}}.2d, {{x[0-9]+}}
-}
-
-poly8x8_t test_vmov_n_p8(poly8_t v1) {
- // CHECK: test_vmov_n_p8
- return vmov_n_p8(v1);
- // CHECK: dup {{v[0-9]+}}.8b, {{w[0-9]+}}
-}
-
-poly16x4_t test_vmov_n_p16(poly16_t v1) {
- // CHECK: test_vmov_n_p16
- return vmov_n_p16(v1);
- // CHECK: dup {{v[0-9]+}}.4h, {{w[0-9]+}}
-}
-
-poly8x16_t test_vmovq_n_p8(poly8_t v1) {
- // CHECK: test_vmovq_n_p8
- return vmovq_n_p8(v1);
- // CHECK: dup {{v[0-9]+}}.16b, {{w[0-9]+}}
-}
-
-poly16x8_t test_vmovq_n_p16(poly16_t v1) {
- // CHECK: test_vmovq_n_p16
- return vmovq_n_p16(v1);
- // CHECK: dup {{v[0-9]+}}.8h, {{w[0-9]+}}
-}
-
-float32x2_t test_vmov_n_f32(float32_t v1) {
- // CHECK: test_vmov_n_f32
- return vmov_n_f32(v1);
- // CHECK: dup {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
-}
-
-float64x1_t test_vmov_n_f64(float64_t v1) {
- // CHECK: test_vmov_n_f64
- return vmov_n_f64(v1);
- // CHECK: ret
-}
-
-float32x4_t test_vmovq_n_f32(float32_t v1) {
- // CHECK: test_vmovq_n_f32
- return vmovq_n_f32(v1);
- // CHECK: dup {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
-}
-
-float64x2_t test_vmovq_n_f64(float64_t v1) {
- // CHECK: test_vmovq_n_f64
- return vmovq_n_f64(v1);
- // CHECK: dup {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
-}
-
-// CHECK: test_vcopy_lane_s64
-int64x1_t test_vcopy_lane_s64(int64x1_t a, int64x1_t c) {
- return vcopy_lane_s64(a, 0, c, 0);
-// CHECK: fmov {{d[0-9]+}}, {{d[0-9]+}}
-// CHECK-NOT: dup {{d[0-9]+}}, {{v[0-9]+}}.d[0]
-}
-
-// CHECK: test_vcopy_lane_u64
-uint64x1_t test_vcopy_lane_u64(uint64x1_t a, uint64x1_t c) {
- return vcopy_lane_u64(a, 0, c, 0);
-// CHECK: fmov {{d[0-9]+}}, {{d[0-9]+}}
-// CHECK-NOT: dup {{d[0-9]+}}, {{v[0-9]+}}.d[0]
-}
-
-// CHECK: test_vcopy_lane_f64
-float64x1_t test_vcopy_lane_f64(float64x1_t a, float64x1_t c) {
- return vcopy_lane_f64(a, 0, c, 0);
-// CHECK: fmov {{d[0-9]+}}, {{d[0-9]+}}
-// CHECK-NOT: dup {{d[0-9]+}}, {{v[0-9]+}}.d[0]
-}
-
-// CHECK: test_vcopy_laneq_s64
-int64x1_t test_vcopy_laneq_s64(int64x1_t a, int64x2_t c) {
- return vcopy_laneq_s64(a, 0, c, 1);
-// CHECK: dup {{d[0-9]+}}, {{v[0-9]+}}.d[1]
-}
-
-// CHECK: test_vcopy_laneq_u64
-uint64x1_t test_vcopy_laneq_u64(uint64x1_t a, uint64x2_t c) {
- return vcopy_laneq_u64(a, 0, c, 1);
-// CHECK: dup {{d[0-9]+}}, {{v[0-9]+}}.d[1]
-}
-
-// CHECK: test_vcopy_laneq_f64
-float64x1_t test_vcopy_laneq_f64(float64x1_t a, float64x2_t c) {
- return vcopy_laneq_f64(a, 0, c, 1);
-// CHECK: dup {{d[0-9]+}}, {{v[0-9]+}}.d[1]
-}
-
-// CHECK: test_vcopy_laneq_p64
-poly64x1_t test_vcopy_laneq_p64(poly64x1_t a, poly64x2_t c) {
- return vcopy_laneq_p64(a, 0, c, 1);
-// CHECK: dup {{d[0-9]+}}, {{v[0-9]+}}.d[1]
-}
-
-// CHECK: test_vcopyq_laneq_f64
-float64x2_t test_vcopyq_laneq_f64(float64x2_t a, float64x2_t c) {
-// CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[1]
- return vcopyq_laneq_f64(a, 1, c, 1);
-}
-
-// CHECK: test_vget_lane_f16
-int test_vget_lane_f16(float16x4_t v1) {
- float16_t a = vget_lane_f16(v1, 3);
- return (int)a;
-// CHECK: dup {{h[0-9]+}}, {{v[0-9]+}}.h[3]
-}
-
-// CHECK: test_vgetq_lane_f16
-int test_vgetq_lane_f16(float16x8_t v1) {
- float16_t a = vgetq_lane_f16(v1, 7);
- return (int)a;
-// CHECK: dup {{h[0-9]+}}, {{v[0-9]+}}.h[7]
-}
-
-// CHECK: test_vget_lane_f16_2
-float test_vget_lane_f16_2(float16x4_t v1) {
- float16_t a = vget_lane_f16(v1, 3);
- return (float)a;
-// CHECK: dup {{h[0-9]+}}, {{v[0-9]+}}.h[3]
-}
-
-// CHECK: test_vgetq_lane_f16_2
-float test_vgetq_lane_f16_2(float16x8_t v1) {
- float16_t a = vgetq_lane_f16(v1, 7);
- return (float)a;
-// CHECK: dup {{h[0-9]+}}, {{v[0-9]+}}.h[7]
-}
-
-// CHECK: test_vset_lane_f16
-float16x4_t test_vset_lane_f16(float16x4_t v1) {
- float16_t a;
- return vset_lane_f16(a, v1, 3);
-// CHECK: fmov {{s[0-9]+}}, wzr
-// CHECK-NEXT: ins {{v[0-9]+}}.h[3], {{v[0-9]+}}.h[0]
-}
-
-// CHECK: test_vsetq_lane_f16
-float16x8_t test_vsetq_lane_f16(float16x8_t v1) {
- float16_t a;
- return vsetq_lane_f16(a, v1, 7);
-// CHECK: fmov {{s[0-9]+}}, wzr
-// CHECK-NEXT: ins {{v[0-9]+}}.h[7], {{v[0-9]+}}.h[0]
-}
-
-// CHECK: test_vset_lane_f16_2
-float16x4_t test_vset_lane_f16_2(float16x4_t v1) {
- float16_t a = vget_lane_f16(v1, 0);
- return vset_lane_f16(a, v1, 3);
-// CHECK: ins {{v[0-9]+}}.h[3], {{v[0-9]+}}.h[0]
-}
-
-// CHECK: test_vsetq_lane_f16_2
-float16x8_t test_vsetq_lane_f16_2(float16x8_t v1) {
- float16_t a = vgetq_lane_f16(v1, 0);
- return vsetq_lane_f16(a, v1, 7);
-// CHECK: ins {{v[0-9]+}}.h[7], {{v[0-9]+}}.h[0]
-}
-
-
-// CHECK: test_vsetq_lane_f16_3
-float16x8_t test_vsetq_lane_f16_3(float16x8_t v1, float b, float c) {
- float16_t a = (float16_t)b;
- return vsetq_lane_f16(a, v1, 7);
-// CHECK: ins {{v[0-9]+}}.h[7], {{w[0-9]+}}
-}
-
-// CHECK: test_vsetq_lane_f16_4
-float16x8_t test_vsetq_lane_f16_4(float16x8_t v1, float b, float c) {
- float16_t a = (float16_t)b + 1.0;
- return vsetq_lane_f16(a, v1, 7);
-// CHECK: ins {{v[0-9]+}}.h[7], {{w[0-9]+}}
-}
-
diff --git a/test/CodeGen/aarch64-neon-crypto.c b/test/CodeGen/aarch64-neon-crypto.c
deleted file mode 100644
index 240f3794b965..000000000000
--- a/test/CodeGen/aarch64-neon-crypto.c
+++ /dev/null
@@ -1,94 +0,0 @@
-// REQUIRES: aarch64-registered-target
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \
-// RUN: -target-feature +crypto -S -O3 -o - %s | FileCheck %s
-// RUN: not %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \
-// RUN: -S -O3 -o - %s 2>&1 | FileCheck --check-prefix=CHECK-NO-CRYPTO %s
-
-// Test new aarch64 intrinsics and types
-
-#include <arm_neon.h>
-
-uint8x16_t test_vaeseq_u8(uint8x16_t data, uint8x16_t key) {
- // CHECK: test_vaeseq_u8
- // CHECK-NO-CRYPTO: warning: implicit declaration of function 'vaeseq_u8' is invalid in C99
- return vaeseq_u8(data, key);
- // CHECK: aese {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
-}
-
-uint8x16_t test_vaesdq_u8(uint8x16_t data, uint8x16_t key) {
- // CHECK: test_vaesdq_u8
- return vaesdq_u8(data, key);
- // CHECK: aesd {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
-}
-
-uint8x16_t test_vaesmcq_u8(uint8x16_t data) {
- // CHECK: test_vaesmcq_u8
- return vaesmcq_u8(data);
- // CHECK: aesmc {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
-}
-
-uint8x16_t test_vaesimcq_u8(uint8x16_t data) {
- // CHECK: test_vaesimcq_u8
- return vaesimcq_u8(data);
- // CHECK: aesimc {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
-}
-
-uint32_t test_vsha1h_u32(uint32_t hash_e) {
- // CHECK: test_vsha1h_u32
- return vsha1h_u32(hash_e);
- // CHECK: sha1h {{s[0-9]+}}, {{s[0-9]+}}
-}
-
-uint32x4_t test_vsha1su1q_u32(uint32x4_t tw0_3, uint32x4_t w12_15) {
- // CHECK: test_vsha1su1q_u32
- return vsha1su1q_u32(tw0_3, w12_15);
- // CHECK: sha1su1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
-}
-
-uint32x4_t test_vsha256su0q_u32(uint32x4_t w0_3, uint32x4_t w4_7) {
- // CHECK: test_vsha256su0q_u32
- return vsha256su0q_u32(w0_3, w4_7);
- // CHECK: sha256su0 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
-}
-
-uint32x4_t test_vsha1cq_u32(uint32x4_t hash_abcd, uint32_t hash_e, uint32x4_t wk) {
- // CHECK: test_vsha1cq_u32
- return vsha1cq_u32(hash_abcd, hash_e, wk);
- // CHECK: sha1c {{q[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.4s
-}
-
-uint32x4_t test_vsha1pq_u32(uint32x4_t hash_abcd, uint32_t hash_e, uint32x4_t wk) {
- // CHECK: test_vsha1pq_u32
- return vsha1pq_u32(hash_abcd, hash_e, wk);
- // CHECK: sha1p {{q[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.4s
-}
-
-uint32x4_t test_vsha1mq_u32(uint32x4_t hash_abcd, uint32_t hash_e, uint32x4_t wk) {
- // CHECK: test_vsha1mq_u32
- return vsha1mq_u32(hash_abcd, hash_e, wk);
- // CHECK: sha1m {{q[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.4s
-}
-
-uint32x4_t test_vsha1su0q_u32(uint32x4_t w0_3, uint32x4_t w4_7, uint32x4_t w8_11) {
- // CHECK: test_vsha1su0q_u32
- return vsha1su0q_u32(w0_3, w4_7, w8_11);
- // CHECK: sha1su0 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
-}
-
-uint32x4_t test_vsha256hq_u32(uint32x4_t hash_abcd, uint32x4_t hash_efgh, uint32x4_t wk) {
- // CHECK: test_vsha256hq_u32
- return vsha256hq_u32(hash_abcd, hash_efgh, wk);
- // CHECK: sha256h {{q[0-9]+}}, {{q[0-9]+}}, {{v[0-9]+}}.4s
-}
-
-uint32x4_t test_vsha256h2q_u32(uint32x4_t hash_efgh, uint32x4_t hash_abcd, uint32x4_t wk) {
- // CHECK: test_vsha256h2q_u32
- return vsha256h2q_u32(hash_efgh, hash_abcd, wk);
- // CHECK: sha256h2 {{q[0-9]+}}, {{q[0-9]+}}, {{v[0-9]+}}.4s
-}
-
-uint32x4_t test_vsha256su1q_u32(uint32x4_t tw0_3, uint32x4_t w8_11, uint32x4_t w12_15) {
- // CHECK: test_vsha256su1q_u32
- return vsha256su1q_u32(tw0_3, w8_11, w12_15);
- // CHECK: sha256su1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
-}
diff --git a/test/CodeGen/aarch64-neon-extract.c b/test/CodeGen/aarch64-neon-extract.c
index faf35afad6f7..cc654cc9bc3e 100644
--- a/test/CodeGen/aarch64-neon-extract.c
+++ b/test/CodeGen/aarch64-neon-extract.c
@@ -1,5 +1,5 @@
// REQUIRES: aarch64-registered-target
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
// RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s
// Test new aarch64 intrinsics and types
@@ -7,142 +7,142 @@
#include <arm_neon.h>
int8x8_t test_vext_s8(int8x8_t a, int8x8_t b) {
- // CHECK: test_vext_s8
+ // CHECK-LABEL: test_vext_s8
return vext_s8(a, b, 2);
- // CHECK: ext {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #0x2
+ // CHECK: ext {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #{{(0x)?2}}
}
int16x4_t test_vext_s16(int16x4_t a, int16x4_t b) {
- // CHECK: test_vext_s16
+ // CHECK-LABEL: test_vext_s16
return vext_s16(a, b, 3);
- // CHECK: ext {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #0x6
+ // CHECK: ext {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #{{(0x)?6}}
}
int32x2_t test_vext_s32(int32x2_t a, int32x2_t b) {
- // CHECK: test_vext_s32
+ // CHECK-LABEL: test_vext_s32
return vext_s32(a, b, 1);
- // CHECK: ext {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #0x4
+ // CHECK: ext {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #{{(0x)?4}}
}
int64x1_t test_vext_s64(int64x1_t a, int64x1_t b) {
- // CHECK: test_vext_s64
+ // CHECK-LABEL: test_vext_s64
return vext_s64(a, b, 0);
}
int8x16_t test_vextq_s8(int8x16_t a, int8x16_t b) {
- // CHECK: test_vextq_s8
+ // CHECK-LABEL: test_vextq_s8
return vextq_s8(a, b, 2);
- // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #0x2
+ // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #{{(0x)?2}}
}
int16x8_t test_vextq_s16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vextq_s16
+ // CHECK-LABEL: test_vextq_s16
return vextq_s16(a, b, 3);
- // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #0x6
+ // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #{{(0x)?6}}
}
int32x4_t test_vextq_s32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vextq_s32
+ // CHECK-LABEL: test_vextq_s32
return vextq_s32(a, b, 1);
- // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #0x4
+ // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #{{(0x)?4}}
}
int64x2_t test_vextq_s64(int64x2_t a, int64x2_t b) {
- // CHECK: test_vextq_s64
+ // CHECK-LABEL: test_vextq_s64
return vextq_s64(a, b, 1);
- // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #0x8
+ // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #{{(0x)?8}}
}
uint8x8_t test_vext_u8(uint8x8_t a, uint8x8_t b) {
- // CHECK: test_vext_u8
+ // CHECK-LABEL: test_vext_u8
return vext_u8(a, b, 2);
- // CHECK: ext {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #0x2
+ // CHECK: ext {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #{{(0x)?2}}
}
uint16x4_t test_vext_u16(uint16x4_t a, uint16x4_t b) {
- // CHECK: test_vext_u16
+ // CHECK-LABEL: test_vext_u16
return vext_u16(a, b, 3);
- // CHECK: ext {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #0x6
+ // CHECK: ext {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #{{(0x)?6}}
}
uint32x2_t test_vext_u32(uint32x2_t a, uint32x2_t b) {
- // CHECK: test_vext_u32
+ // CHECK-LABEL: test_vext_u32
return vext_u32(a, b, 1);
- // CHECK: ext {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #0x4
+ // CHECK: ext {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #{{(0x)?4}}
}
uint64x1_t test_vext_u64(uint64x1_t a, uint64x1_t b) {
- // CHECK: test_vext_u64
+ // CHECK-LABEL: test_vext_u64
return vext_u64(a, b, 0);
}
uint8x16_t test_vextq_u8(uint8x16_t a, uint8x16_t b) {
- // CHECK: test_vextq_u8
+ // CHECK-LABEL: test_vextq_u8
return vextq_u8(a, b, 2);
- // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #0x2
+ // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #{{(0x)?2}}
}
uint16x8_t test_vextq_u16(uint16x8_t a, uint16x8_t b) {
- // CHECK: test_vextq_u16
+ // CHECK-LABEL: test_vextq_u16
return vextq_u16(a, b, 3);
- // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #0x6
+ // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #{{(0x)?6}}
}
uint32x4_t test_vextq_u32(uint32x4_t a, uint32x4_t b) {
- // CHECK: test_vextq_u32
+ // CHECK-LABEL: test_vextq_u32
return vextq_u32(a, b, 1);
- // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #0x4
+ // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #{{(0x)?4}}
}
uint64x2_t test_vextq_u64(uint64x2_t a, uint64x2_t b) {
- // CHECK: test_vextq_u64
+ // CHECK-LABEL: test_vextq_u64
return vextq_u64(a, b, 1);
- // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #0x8
+ // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #{{(0x)?8}}
}
float32x2_t test_vext_f32(float32x2_t a, float32x2_t b) {
- // CHECK: test_vext_f32
+ // CHECK-LABEL: test_vext_f32
return vext_f32(a, b, 1);
- // CHECK: ext {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #0x4
+ // CHECK: ext {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #{{(0x)?4}}
}
float64x1_t test_vext_f64(float64x1_t a, float64x1_t b) {
- // CHECK: test_vext_f64
+ // CHECK-LABEL: test_vext_f64
return vext_f64(a, b, 0);
}
float32x4_t test_vextq_f32(float32x4_t a, float32x4_t b) {
- // CHECK: test_vextq_f32
+ // CHECK-LABEL: test_vextq_f32
return vextq_f32(a, b, 1);
- // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #0x4
+ // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #{{(0x)?4}}
}
float64x2_t test_vextq_f64(float64x2_t a, float64x2_t b) {
- // CHECK: test_vextq_f64
+ // CHECK-LABEL: test_vextq_f64
return vextq_f64(a, b, 1);
- // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #0x8
+ // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #{{(0x)?8}}
}
poly8x8_t test_vext_p8(poly8x8_t a, poly8x8_t b) {
- // CHECK: test_vext_p8
+ // CHECK-LABEL: test_vext_p8
return vext_p8(a, b, 2);
- // CHECK: ext {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #0x2
+ // CHECK: ext {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #{{(0x)?2}}
}
poly16x4_t test_vext_p16(poly16x4_t a, poly16x4_t b) {
- // CHECK: test_vext_p16
+ // CHECK-LABEL: test_vext_p16
return vext_p16(a, b, 3);
- // CHECK: ext {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #0x6
+ // CHECK: ext {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #{{(0x)?6}}
}
poly8x16_t test_vextq_p8(poly8x16_t a, poly8x16_t b) {
- // CHECK: test_vextq_p8
+ // CHECK-LABEL: test_vextq_p8
return vextq_p8(a, b, 2);
- // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #0x2
+ // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #{{(0x)?2}}
}
poly16x8_t test_vextq_p16(poly16x8_t a, poly16x8_t b) {
- // CHECK: test_vextq_p16
+ // CHECK-LABEL: test_vextq_p16
return vextq_p16(a, b, 3);
- // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #0x6
+ // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #{{(0x)?6}}
}
diff --git a/test/CodeGen/aarch64-neon-fcvt-intrinsics.c b/test/CodeGen/aarch64-neon-fcvt-intrinsics.c
index 98f1389be4ea..d1b9996b0b68 100644
--- a/test/CodeGen/aarch64-neon-fcvt-intrinsics.c
+++ b/test/CodeGen/aarch64-neon-fcvt-intrinsics.c
@@ -1,5 +1,5 @@
// REQUIRES: aarch64-registered-target
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
// RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s
// Test new aarch64 intrinsics and types
@@ -7,127 +7,127 @@
#include <arm_neon.h>
float32_t test_vcvtxd_f32_f64(float64_t a) {
-// CHECK: test_vcvtxd_f32_f64
+// CHECK-LABEL: test_vcvtxd_f32_f64
// CHECK: fcvtxn {{s[0-9]+}}, {{d[0-9]+}}
return (float32_t)vcvtxd_f32_f64(a);
}
int32_t test_vcvtas_s32_f32(float32_t a) {
-// CHECK: test_vcvtas_s32_f32
-// CHECK: fcvtas {{s[0-9]+}}, {{s[0-9]+}}
+// CHECK-LABEL: test_vcvtas_s32_f32
+// CHECK: fcvtas {{[ws][0-9]+}}, {{s[0-9]+}}
return (int32_t)vcvtas_s32_f32(a);
}
int64_t test_test_vcvtad_s64_f64(float64_t a) {
-// CHECK: test_test_vcvtad_s64_f64
-// CHECK: fcvtas {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_test_vcvtad_s64_f64
+// CHECK: fcvtas {{[dx][0-9]+}}, {{d[0-9]+}}
return (int64_t)vcvtad_s64_f64(a);
}
uint32_t test_vcvtas_u32_f32(float32_t a) {
-// CHECK: test_vcvtas_u32_f32
-// CHECK: fcvtau {{s[0-9]+}}, {{s[0-9]+}}
+// CHECK-LABEL: test_vcvtas_u32_f32
+// CHECK: fcvtau {{[ws][0-9]+}}, {{s[0-9]+}}
return (uint32_t)vcvtas_u32_f32(a);
}
uint64_t test_vcvtad_u64_f64(float64_t a) {
-// CHECK: test_vcvtad_u64_f64
-// CHECK: fcvtau {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcvtad_u64_f64
+// CHECK: fcvtau {{[xd][0-9]+}}, {{d[0-9]+}}
return (uint64_t)vcvtad_u64_f64(a);
}
int32_t test_vcvtms_s32_f32(float32_t a) {
-// CHECK: test_vcvtms_s32_f32
-// CHECK: fcvtms {{s[0-9]+}}, {{s[0-9]+}}
+// CHECK-LABEL: test_vcvtms_s32_f32
+// CHECK: fcvtms {{[sw][0-9]+}}, {{s[0-9]+}}
return (int32_t)vcvtms_s32_f32(a);
}
int64_t test_vcvtmd_s64_f64(float64_t a) {
-// CHECK: test_vcvtmd_s64_f64
-// CHECK: fcvtms {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcvtmd_s64_f64
+// CHECK: fcvtms {{[dx][0-9]+}}, {{d[0-9]+}}
return (int64_t)vcvtmd_s64_f64(a);
}
uint32_t test_vcvtms_u32_f32(float32_t a) {
-// CHECK: test_vcvtms_u32_f32
-// CHECK: fcvtmu {{s[0-9]+}}, {{s[0-9]+}}
+// CHECK-LABEL: test_vcvtms_u32_f32
+// CHECK: fcvtmu {{[ws][0-9]+}}, {{s[0-9]+}}
return (uint32_t)vcvtms_u32_f32(a);
}
uint64_t test_vcvtmd_u64_f64(float64_t a) {
-// CHECK: test_vcvtmd_u64_f64
-// CHECK: fcvtmu {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcvtmd_u64_f64
+// CHECK: fcvtmu {{[xd][0-9]+}}, {{d[0-9]+}}
return (uint64_t)vcvtmd_u64_f64(a);
}
int32_t test_vcvtns_s32_f32(float32_t a) {
-// CHECK: test_vcvtns_s32_f32
-// CHECK: fcvtns {{s[0-9]+}}, {{s[0-9]+}}
+// CHECK-LABEL: test_vcvtns_s32_f32
+// CHECK: fcvtns {{[sw][0-9]+}}, {{s[0-9]+}}
return (int32_t)vcvtns_s32_f32(a);
}
int64_t test_vcvtnd_s64_f64(float64_t a) {
-// CHECK: test_vcvtnd_s64_f64
-// CHECK: fcvtns {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcvtnd_s64_f64
+// CHECK: fcvtns {{[dx][0-9]+}}, {{d[0-9]+}}
return (int64_t)vcvtnd_s64_f64(a);
}
uint32_t test_vcvtns_u32_f32(float32_t a) {
-// CHECK: test_vcvtns_u32_f32
-// CHECK: fcvtnu {{s[0-9]+}}, {{s[0-9]+}}
+// CHECK-LABEL: test_vcvtns_u32_f32
+// CHECK: fcvtnu {{[sw][0-9]+}}, {{s[0-9]+}}
return (uint32_t)vcvtns_u32_f32(a);
}
uint64_t test_vcvtnd_u64_f64(float64_t a) {
-// CHECK: test_vcvtnd_u64_f64
-// CHECK: fcvtnu {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcvtnd_u64_f64
+// CHECK: fcvtnu {{[dx][0-9]+}}, {{d[0-9]+}}
return (uint64_t)vcvtnd_u64_f64(a);
}
int32_t test_vcvtps_s32_f32(float32_t a) {
-// CHECK: test_vcvtps_s32_f32
-// CHECK: fcvtps {{s[0-9]+}}, {{s[0-9]+}}
+// CHECK-LABEL: test_vcvtps_s32_f32
+// CHECK: fcvtps {{[sw][0-9]+}}, {{s[0-9]+}}
return (int32_t)vcvtps_s32_f32(a);
}
int64_t test_vcvtpd_s64_f64(float64_t a) {
-// CHECK: test_vcvtpd_s64_f64
-// CHECK: fcvtps {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcvtpd_s64_f64
+// CHECK: fcvtps {{[dx][0-9]+}}, {{d[0-9]+}}
return (int64_t)vcvtpd_s64_f64(a);
}
uint32_t test_vcvtps_u32_f32(float32_t a) {
-// CHECK: test_vcvtps_u32_f32
-// CHECK: fcvtpu {{s[0-9]+}}, {{s[0-9]+}}
+// CHECK-LABEL: test_vcvtps_u32_f32
+// CHECK: fcvtpu {{[sw][0-9]+}}, {{s[0-9]+}}
return (uint32_t)vcvtps_u32_f32(a);
}
uint64_t test_vcvtpd_u64_f64(float64_t a) {
-// CHECK: test_vcvtpd_u64_f64
-// CHECK: fcvtpu {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcvtpd_u64_f64
+// CHECK: fcvtpu {{[dx][0-9]+}}, {{d[0-9]+}}
return (uint64_t)vcvtpd_u64_f64(a);
}
int32_t test_vcvts_s32_f32(float32_t a) {
-// CHECK: test_vcvts_s32_f32
-// CHECK: fcvtzs {{s[0-9]+}}, {{s[0-9]+}}
+// CHECK-LABEL: test_vcvts_s32_f32
+// CHECK: fcvtzs {{[sw][0-9]+}}, {{s[0-9]+}}
return (int32_t)vcvts_s32_f32(a);
}
int64_t test_vcvtd_s64_f64(float64_t a) {
-// CHECK: test_vcvtd_s64_f64
-// CHECK: fcvtzs {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcvtd_s64_f64
+// CHECK: fcvtzs {{[dx][0-9]+}}, {{d[0-9]+}}
return (int64_t)vcvtd_s64_f64(a);
}
uint32_t test_vcvts_u32_f32(float32_t a) {
-// CHECK: test_vcvts_u32_f32
-// CHECK: fcvtzu {{s[0-9]+}}, {{s[0-9]+}}
+// CHECK-LABEL: test_vcvts_u32_f32
+// CHECK: fcvtzu {{[sw][0-9]+}}, {{s[0-9]+}}
return (uint32_t)vcvts_u32_f32(a);
}
uint64_t test_vcvtd_u64_f64(float64_t a) {
-// CHECK: test_vcvtd_u64_f64
-// CHECK: fcvtzu {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcvtd_u64_f64
+// CHECK: fcvtzu {{[dx][0-9]+}}, {{d[0-9]+}}
return (uint64_t)vcvtd_u64_f64(a);
}
diff --git a/test/CodeGen/aarch64-neon-fma.c b/test/CodeGen/aarch64-neon-fma.c
new file mode 100644
index 000000000000..ac808333365e
--- /dev/null
+++ b/test/CodeGen/aarch64-neon-fma.c
@@ -0,0 +1,199 @@
+// REQUIRES: aarch64-registered-target
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -S -O3 -o - %s | FileCheck %s
+
+// Test new aarch64 intrinsics and types
+
+#include <arm_neon.h>
+
+float32x2_t test_vmla_n_f32(float32x2_t a, float32x2_t b, float32_t c) {
+ // CHECK-LABEL: test_vmla_n_f32
+ return vmla_n_f32(a, b, c);
+ // CHECK: fmul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
+ // CHECK: fadd {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+ // CHECK-FMA: dup {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
+ // CHECK-FMA: fmla {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+float32x4_t test_vmlaq_n_f32(float32x4_t a, float32x4_t b, float32_t c) {
+ // CHECK-LABEL: test_vmlaq_n_f32
+ return vmlaq_n_f32(a, b, c);
+ // CHECK: fmul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+ // CHECK: fadd {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
+ // CHECK-FMA: dup {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+ // CHECK-FMA: fmla {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
+}
+
+float64x2_t test_vmlaq_n_f64(float64x2_t a, float64x2_t b, float64_t c) {
+ // CHECK-LABEL: test_vmlaq_n_f64
+ return vmlaq_n_f64(a, b, c);
+ // CHECK: fmul {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
+ // CHECK: fadd {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
+ // CHECK-FMA: dup {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
+ // CHECK-FMA: fmla {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
+}
+
+float32x4_t test_vmlsq_n_f32(float32x4_t a, float32x4_t b, float32_t c) {
+ // CHECK-LABEL: test_vmlsq_n_f32
+ return vmlsq_n_f32(a, b, c);
+ // CHECK: fmul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+ // CHECK: fsub {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
+ // CHECK-FMA: dup {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+ // CHECK-FMA: fmls {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
+}
+
+float32x2_t test_vmls_n_f32(float32x2_t a, float32x2_t b, float32_t c) {
+ // CHECK-LABEL: test_vmls_n_f32
+ return vmls_n_f32(a, b, c);
+ // CHECK: fmul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
+ // CHECK: fsub {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+ // CHECK-FMA: dup {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
+ // CHECK-FMA: fmls {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+float64x2_t test_vmlsq_n_f64(float64x2_t a, float64x2_t b, float64_t c) {
+ // CHECK-LABEL: test_vmlsq_n_f64
+ return vmlsq_n_f64(a, b, c);
+ // CHECK: fmul {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
+ // CHECK: fsub {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
+ // CHECK-FMA: dup {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
+ // CHECK-FMA: fmls {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
+}
+
+float32x2_t test_vmla_lane_f32_0(float32x2_t a, float32x2_t b, float32x2_t v) {
+ // CHECK-LABEL: test_vmla_lane_f32_0
+ return vmla_lane_f32(a, b, v, 0);
+ // CHECK: fmul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
+ // CHECK: fadd {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+ // CHECK-FMA: fmla {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
+}
+
+float32x4_t test_vmlaq_lane_f32_0(float32x4_t a, float32x4_t b, float32x2_t v) {
+ // CHECK-LABEL: test_vmlaq_lane_f32_0
+ return vmlaq_lane_f32(a, b, v, 0);
+ // CHECK: fmul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+ // CHECK: fadd {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
+ // CHECK-FMA: fmla {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+}
+
+float32x2_t test_vmla_laneq_f32_0(float32x2_t a, float32x2_t b, float32x4_t v) {
+ // CHECK-LABEL: test_vmla_laneq_f32_0
+ return vmla_laneq_f32(a, b, v, 0);
+ // CHECK: fmul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
+ // CHECK: fadd {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+ // CHECK-FMA: fmla {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
+}
+
+float32x4_t test_vmlaq_laneq_f32_0(float32x4_t a, float32x4_t b, float32x4_t v) {
+ // CHECK-LABEL: test_vmlaq_laneq_f32_0
+ return vmlaq_laneq_f32(a, b, v, 0);
+ // CHECK: fmul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+ // CHECK: fadd {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
+ // CHECK-FMA: fmla {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+}
+
+float32x2_t test_vmls_lane_f32_0(float32x2_t a, float32x2_t b, float32x2_t v) {
+ // CHECK-LABEL: test_vmls_lane_f32_0
+ return vmls_lane_f32(a, b, v, 0);
+ // CHECK: fmul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
+ // CHECK: fsub {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+ // CHECK-FMA: fmls {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
+}
+
+float32x4_t test_vmlsq_lane_f32_0(float32x4_t a, float32x4_t b, float32x2_t v) {
+ // CHECK-LABEL: test_vmlsq_lane_f32_0
+ return vmlsq_lane_f32(a, b, v, 0);
+ // CHECK: fmul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+ // CHECK: fsub {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
+ // CHECK-FMA: fmls {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+}
+
+float32x2_t test_vmls_laneq_f32_0(float32x2_t a, float32x2_t b, float32x4_t v) {
+ // CHECK-LABEL: test_vmls_laneq_f32_0
+ return vmls_laneq_f32(a, b, v, 0);
+ // CHECK: fmul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
+ // CHECK: fsub {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+ // CHECK-FMA: fmls {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[0]
+}
+
+float32x4_t test_vmlsq_laneq_f32_0(float32x4_t a, float32x4_t b, float32x4_t v) {
+ // CHECK-LABEL: test_vmlsq_laneq_f32_0
+ return vmlsq_laneq_f32(a, b, v, 0);
+ // CHECK: fmul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+ // CHECK: fsub {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
+ // CHECK-FMA: fmls {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[0]
+}
+
+float32x2_t test_vmla_lane_f32(float32x2_t a, float32x2_t b, float32x2_t v) {
+ // CHECK-LABEL: test_vmla_lane_f32
+ return vmla_lane_f32(a, b, v, 1);
+ // CHECK: fmul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
+ // CHECK: fadd {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+ // CHECK-FMA: fmla {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
+}
+
+float32x4_t test_vmlaq_lane_f32(float32x4_t a, float32x4_t b, float32x2_t v) {
+ // CHECK-LABEL: test_vmlaq_lane_f32
+ return vmlaq_lane_f32(a, b, v, 1);
+ // CHECK: fmul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
+ // CHECK: fadd {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
+ // CHECK-FMA: fmla {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
+}
+
+float32x2_t test_vmla_laneq_f32(float32x2_t a, float32x2_t b, float32x4_t v) {
+ // CHECK-LABEL: test_vmla_laneq_f32
+ return vmla_laneq_f32(a, b, v, 3);
+ // CHECK: fmul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
+ // CHECK: fadd {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+ // CHECK-FMA: fmla {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
+}
+
+float32x4_t test_vmlaq_laneq_f32(float32x4_t a, float32x4_t b, float32x4_t v) {
+ // CHECK-LABEL: test_vmlaq_laneq_f32
+ return vmlaq_laneq_f32(a, b, v, 3);
+ // CHECK: fmul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
+ // CHECK: fadd {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
+ // CHECK-FMA: fmla {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
+}
+
+float32x2_t test_vmls_lane_f32(float32x2_t a, float32x2_t b, float32x2_t v) {
+ // CHECK-LABEL: test_vmls_lane_f32
+ return vmls_lane_f32(a, b, v, 1);
+ // CHECK: fmul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
+ // CHECK: fsub {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+ // CHECK-FMA: fmls {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[1]
+}
+
+float32x4_t test_vmlsq_lane_f32(float32x4_t a, float32x4_t b, float32x2_t v) {
+ // CHECK-LABEL: test_vmlsq_lane_f32
+ return vmlsq_lane_f32(a, b, v, 1);
+ // CHECK: fmul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
+ // CHECK: fsub {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
+ // CHECK-FMA: fmls {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[1]
+}
+float32x2_t test_vmls_laneq_f32(float32x2_t a, float32x2_t b, float32x4_t v) {
+ // CHECK-LABEL: test_vmls_laneq_f32
+ return vmls_laneq_f32(a, b, v, 3);
+ // CHECK: fmul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
+ // CHECK: fsub {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+ // CHECK-FMA: fmls {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.s[3]
+}
+
+float32x4_t test_vmlsq_laneq_f32(float32x4_t a, float32x4_t b, float32x4_t v) {
+ // CHECK-LABEL: test_vmlsq_laneq_f32
+ return vmlsq_laneq_f32(a, b, v, 3);
+ // CHECK: fmul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
+ // CHECK: fsub {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
+ // CHECK-FMA: fmls {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.s[3]
+}
+
+float64x2_t test_vfmaq_n_f64(float64x2_t a, float64x2_t b, float64_t c) {
+ // CHECK-LABEL: test_vfmaq_n_f64:
+ return vfmaq_n_f64(a, b, c);
+ // CHECK: fmla {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+\.2d|v[0-9]+\.d\[0\]}}
+}
+
+float64x2_t test_vfmsq_n_f64(float64x2_t a, float64x2_t b, float64_t c) {
+ // CHECK-LABEL: test_vfmsq_n_f64:
+ return vfmsq_n_f64(a, b, c);
+ // CHECK: fmls {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+\.2d|v[0-9]+\.d\[0\]}}
+}
diff --git a/test/CodeGen/aarch64-neon-intrinsics.c b/test/CodeGen/aarch64-neon-intrinsics.c
index 6e9b7f10b362..b1207795900e 100644
--- a/test/CodeGen/aarch64-neon-intrinsics.c
+++ b/test/CodeGen/aarch64-neon-intrinsics.c
@@ -1,109 +1,109 @@
// REQUIRES: aarch64-registered-target
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \
-// RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
+// RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-ARM64
// Test new aarch64 intrinsics and types
#include <arm_neon.h>
int8x8_t test_vadd_s8(int8x8_t v1, int8x8_t v2) {
- // CHECK: test_vadd_s8
+ // CHECK-LABEL: test_vadd_s8
return vadd_s8(v1, v2);
// CHECK: add {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int16x4_t test_vadd_s16(int16x4_t v1, int16x4_t v2) {
- // CHECK: test_vadd_s16
+ // CHECK-LABEL: test_vadd_s16
return vadd_s16(v1, v2);
// CHECK: add {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2_t test_vadd_s32(int32x2_t v1, int32x2_t v2) {
- // CHECK: test_vadd_s32
+ // CHECK-LABEL: test_vadd_s32
return vadd_s32(v1, v2);
// CHECK: add {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int64x1_t test_vadd_s64(int64x1_t v1, int64x1_t v2) {
- // CHECK: test_vadd_s64
+ // CHECK-LABEL: test_vadd_s64
return vadd_s64(v1, v2);
// CHECK: add {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
float32x2_t test_vadd_f32(float32x2_t v1, float32x2_t v2) {
- // CHECK: test_vadd_f32
+ // CHECK-LABEL: test_vadd_f32
return vadd_f32(v1, v2);
// CHECK: fadd {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint8x8_t test_vadd_u8(uint8x8_t v1, uint8x8_t v2) {
- // CHECK: test_vadd_u8
+ // CHECK-LABEL: test_vadd_u8
return vadd_u8(v1, v2);
// CHECK: add {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vadd_u16(uint16x4_t v1, uint16x4_t v2) {
- // CHECK: test_vadd_u16
+ // CHECK-LABEL: test_vadd_u16
return vadd_u16(v1, v2);
// CHECK: add {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vadd_u32(uint32x2_t v1, uint32x2_t v2) {
- // CHECK: test_vadd_u32
+ // CHECK-LABEL: test_vadd_u32
return vadd_u32(v1, v2);
// CHECK: add {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint64x1_t test_vadd_u64(uint64x1_t v1, uint64x1_t v2) {
- // CHECK: test_vadd_u64
+ // CHECK-LABEL: test_vadd_u64
return vadd_u64(v1, v2);
// CHECK: add {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
int8x16_t test_vaddq_s8(int8x16_t v1, int8x16_t v2) {
- // CHECK: test_vaddq_s8
+ // CHECK-LABEL: test_vaddq_s8
return vaddq_s8(v1, v2);
// CHECK: add {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8_t test_vaddq_s16(int16x8_t v1, int16x8_t v2) {
- // CHECK: test_vaddq_s16
+ // CHECK-LABEL: test_vaddq_s16
return vaddq_s16(v1, v2);
// CHECK: add {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4_t test_vaddq_s32(int32x4_t v1,int32x4_t v2) {
- // CHECK: test_vaddq_s32
+ // CHECK-LABEL: test_vaddq_s32
return vaddq_s32(v1, v2);
// CHECK: add {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int64x2_t test_vaddq_s64(int64x2_t v1, int64x2_t v2) {
- // CHECK: test_vaddq_s64
+ // CHECK-LABEL: test_vaddq_s64
return vaddq_s64(v1, v2);
// CHECK: add {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
float32x4_t test_vaddq_f32(float32x4_t v1, float32x4_t v2) {
- // CHECK: test_vaddq_f32
+ // CHECK-LABEL: test_vaddq_f32
return vaddq_f32(v1, v2);
// CHECK: fadd {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vaddq_f64(float64x2_t v1, float64x2_t v2) {
- // CHECK: test_vaddq_f64
+ // CHECK-LABEL: test_vaddq_f64
return vaddq_f64(v1, v2);
// CHECK: fadd {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint8x16_t test_vaddq_u8(uint8x16_t v1, uint8x16_t v2) {
- // CHECK: test_vaddq_u8
+ // CHECK-LABEL: test_vaddq_u8
return vaddq_u8(v1, v2);
// CHECK: add {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vaddq_u16(uint16x8_t v1, uint16x8_t v2) {
- // CHECK: test_vaddq_u16
+ // CHECK-LABEL: test_vaddq_u16
return vaddq_u16(v1, v2);
// CHECK: add {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
@@ -115,107 +115,107 @@ uint32x4_t test_vaddq_u32(uint32x4_t v1, uint32x4_t v2) {
}
uint64x2_t test_vaddq_u64(uint64x2_t v1, uint64x2_t v2) {
- // CHECK: test_vaddq_u64
+ // CHECK-LABEL: test_vaddq_u64
return vaddq_u64(v1, v2);
// CHECK: add {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
int8x8_t test_vsub_s8(int8x8_t v1, int8x8_t v2) {
- // CHECK: test_vsub_s8
+ // CHECK-LABEL: test_vsub_s8
return vsub_s8(v1, v2);
// CHECK: sub {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int16x4_t test_vsub_s16(int16x4_t v1, int16x4_t v2) {
- // CHECK: test_vsub_s16
+ // CHECK-LABEL: test_vsub_s16
return vsub_s16(v1, v2);
// CHECK: sub {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2_t test_vsub_s32(int32x2_t v1, int32x2_t v2) {
- // CHECK: test_vsub_s32
+ // CHECK-LABEL: test_vsub_s32
return vsub_s32(v1, v2);
// CHECK: sub {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int64x1_t test_vsub_s64(int64x1_t v1, int64x1_t v2) {
- // CHECK: test_vsub_s64
+ // CHECK-LABEL: test_vsub_s64
return vsub_s64(v1, v2);
// CHECK: sub {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
float32x2_t test_vsub_f32(float32x2_t v1, float32x2_t v2) {
- // CHECK: test_vsub_f32
+ // CHECK-LABEL: test_vsub_f32
return vsub_f32(v1, v2);
// CHECK: fsub {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint8x8_t test_vsub_u8(uint8x8_t v1, uint8x8_t v2) {
- // CHECK: test_vsub_u8
+ // CHECK-LABEL: test_vsub_u8
return vsub_u8(v1, v2);
// CHECK: sub {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vsub_u16(uint16x4_t v1, uint16x4_t v2) {
- // CHECK: test_vsub_u16
+ // CHECK-LABEL: test_vsub_u16
return vsub_u16(v1, v2);
// CHECK: sub {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vsub_u32(uint32x2_t v1, uint32x2_t v2) {
- // CHECK: test_vsub_u32
+ // CHECK-LABEL: test_vsub_u32
return vsub_u32(v1, v2);
// CHECK: sub {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint64x1_t test_vsub_u64(uint64x1_t v1, uint64x1_t v2) {
- // CHECK: test_vsub_u64
+ // CHECK-LABEL: test_vsub_u64
return vsub_u64(v1, v2);
// CHECK: sub {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
int8x16_t test_vsubq_s8(int8x16_t v1, int8x16_t v2) {
- // CHECK: test_vsubq_s8
+ // CHECK-LABEL: test_vsubq_s8
return vsubq_s8(v1, v2);
// CHECK: sub {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8_t test_vsubq_s16(int16x8_t v1, int16x8_t v2) {
- // CHECK: test_vsubq_s16
+ // CHECK-LABEL: test_vsubq_s16
return vsubq_s16(v1, v2);
// CHECK: sub {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4_t test_vsubq_s32(int32x4_t v1,int32x4_t v2) {
- // CHECK: test_vsubq_s32
+ // CHECK-LABEL: test_vsubq_s32
return vsubq_s32(v1, v2);
// CHECK: sub {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int64x2_t test_vsubq_s64(int64x2_t v1, int64x2_t v2) {
- // CHECK: test_vsubq_s64
+ // CHECK-LABEL: test_vsubq_s64
return vsubq_s64(v1, v2);
// CHECK: sub {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
float32x4_t test_vsubq_f32(float32x4_t v1, float32x4_t v2) {
- // CHECK: test_vsubq_f32
+ // CHECK-LABEL: test_vsubq_f32
return vsubq_f32(v1, v2);
// CHECK: fsub {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vsubq_f64(float64x2_t v1, float64x2_t v2) {
- // CHECK: test_vsubq_f64
+ // CHECK-LABEL: test_vsubq_f64
return vsubq_f64(v1, v2);
// CHECK: fsub {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint8x16_t test_vsubq_u8(uint8x16_t v1, uint8x16_t v2) {
- // CHECK: test_vsubq_u8
+ // CHECK-LABEL: test_vsubq_u8
return vsubq_u8(v1, v2);
// CHECK: sub {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vsubq_u16(uint16x8_t v1, uint16x8_t v2) {
- // CHECK: test_vsubq_u16
+ // CHECK-LABEL: test_vsubq_u16
return vsubq_u16(v1, v2);
// CHECK: sub {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
@@ -227,98 +227,98 @@ uint32x4_t test_vsubq_u32(uint32x4_t v1, uint32x4_t v2) {
}
uint64x2_t test_vsubq_u64(uint64x2_t v1, uint64x2_t v2) {
- // CHECK: test_vsubq_u64
+ // CHECK-LABEL: test_vsubq_u64
return vsubq_u64(v1, v2);
// CHECK: sub {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
int8x8_t test_vmul_s8(int8x8_t v1, int8x8_t v2) {
- // CHECK: test_vmul_s8
+ // CHECK-LABEL: test_vmul_s8
return vmul_s8(v1, v2);
// CHECK: mul {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int16x4_t test_vmul_s16(int16x4_t v1, int16x4_t v2) {
- // CHECK: test_vmul_s16
+ // CHECK-LABEL: test_vmul_s16
return vmul_s16(v1, v2);
// CHECK: mul {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2_t test_vmul_s32(int32x2_t v1, int32x2_t v2) {
- // CHECK: test_vmul_s32
+ // CHECK-LABEL: test_vmul_s32
return vmul_s32(v1, v2);
// CHECK: mul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
float32x2_t test_vmul_f32(float32x2_t v1, float32x2_t v2) {
- // CHECK: test_vmul_f32
+ // CHECK-LABEL: test_vmul_f32
return vmul_f32(v1, v2);
// CHECK: fmul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint8x8_t test_vmul_u8(uint8x8_t v1, uint8x8_t v2) {
- // CHECK: test_vmul_u8
+ // CHECK-LABEL: test_vmul_u8
return vmul_u8(v1, v2);
// CHECK: mul {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vmul_u16(uint16x4_t v1, uint16x4_t v2) {
- // CHECK: test_vmul_u16
+ // CHECK-LABEL: test_vmul_u16
return vmul_u16(v1, v2);
// CHECK: mul {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vmul_u32(uint32x2_t v1, uint32x2_t v2) {
- // CHECK: test_vmul_u32
+ // CHECK-LABEL: test_vmul_u32
return vmul_u32(v1, v2);
// CHECK: mul {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int8x16_t test_vmulq_s8(int8x16_t v1, int8x16_t v2) {
- // CHECK: test_vmulq_s8
+ // CHECK-LABEL: test_vmulq_s8
return vmulq_s8(v1, v2);
// CHECK: mul {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8_t test_vmulq_s16(int16x8_t v1, int16x8_t v2) {
- // CHECK: test_vmulq_s16
+ // CHECK-LABEL: test_vmulq_s16
return vmulq_s16(v1, v2);
// CHECK: mul {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4_t test_vmulq_s32(int32x4_t v1, int32x4_t v2) {
- // CHECK: test_vmulq_s32
+ // CHECK-LABEL: test_vmulq_s32
return vmulq_s32(v1, v2);
// CHECK: mul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint8x16_t test_vmulq_u8(uint8x16_t v1, uint8x16_t v2) {
- // CHECK: test_vmulq_u8
+ // CHECK-LABEL: test_vmulq_u8
return vmulq_u8(v1, v2);
// CHECK: mul {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vmulq_u16(uint16x8_t v1, uint16x8_t v2) {
- // CHECK: test_vmulq_u16
+ // CHECK-LABEL: test_vmulq_u16
return vmulq_u16(v1, v2);
// CHECK: mul {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vmulq_u32(uint32x4_t v1, uint32x4_t v2) {
- // CHECK: test_vmulq_u32
+ // CHECK-LABEL: test_vmulq_u32
return vmulq_u32(v1, v2);
// CHECK: mul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float32x4_t test_vmulq_f32(float32x4_t v1, float32x4_t v2) {
- // CHECK: test_vmulq_f32
+ // CHECK-LABEL: test_vmulq_f32
return vmulq_f32(v1, v2);
// CHECK: fmul {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vmulq_f64(float64x2_t v1, float64x2_t v2) {
- // CHECK: test_vmulq_f64
+ // CHECK-LABEL: test_vmulq_f64
return vmulq_f64(v1, v2);
// CHECK: fmul {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
@@ -337,1037 +337,1048 @@ poly8x16_t test_vmulq_p8(poly8x16_t v1, poly8x16_t v2) {
int8x8_t test_vmla_s8(int8x8_t v1, int8x8_t v2, int8x8_t v3) {
- // CHECK: test_vmla_s8
+ // CHECK-LABEL: test_vmla_s8
return vmla_s8(v1, v2, v3);
// CHECK: mla {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int8x8_t test_vmla_s16(int16x4_t v1, int16x4_t v2, int16x4_t v3) {
- // CHECK: test_vmla_s16
+ // CHECK-LABEL: test_vmla_s16
return vmla_s16(v1, v2, v3);
// CHECK: mla {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2_t test_vmla_s32(int32x2_t v1, int32x2_t v2, int32x2_t v3) {
- // CHECK: test_vmla_s32
+ // CHECK-LABEL: test_vmla_s32
return vmla_s32(v1, v2, v3);
// CHECK: mla {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
float32x2_t test_vmla_f32(float32x2_t v1, float32x2_t v2, float32x2_t v3) {
- // CHECK: test_vmla_f32
+ // CHECK-LABEL: test_vmla_f32
return vmla_f32(v1, v2, v3);
// CHECK: fmla {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint8x8_t test_vmla_u8(uint8x8_t v1, uint8x8_t v2, uint8x8_t v3) {
- // CHECK: test_vmla_u8
+ // CHECK-LABEL: test_vmla_u8
return vmla_u8(v1, v2, v3);
// CHECK: mla {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vmla_u16(uint16x4_t v1, uint16x4_t v2, uint16x4_t v3) {
- // CHECK: test_vmla_u16
+ // CHECK-LABEL: test_vmla_u16
return vmla_u16(v1, v2, v3);
// CHECK: mla {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vmla_u32(uint32x2_t v1, uint32x2_t v2, uint32x2_t v3) {
- // CHECK: test_vmla_u32
+ // CHECK-LABEL: test_vmla_u32
return vmla_u32(v1, v2, v3);
// CHECK: mla {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int8x16_t test_vmlaq_s8(int8x16_t v1, int8x16_t v2, int8x16_t v3) {
- // CHECK: test_vmlaq_s8
+ // CHECK-LABEL: test_vmlaq_s8
return vmlaq_s8(v1, v2, v3);
// CHECK: mla {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8_t test_vmlaq_s16(int16x8_t v1, int16x8_t v2, int16x8_t v3) {
- // CHECK: test_vmlaq_s16
+ // CHECK-LABEL: test_vmlaq_s16
return vmlaq_s16(v1, v2, v3);
// CHECK: mla {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4_t test_vmlaq_s32(int32x4_t v1, int32x4_t v2, int32x4_t v3) {
- // CHECK: test_vmlaq_s32
+ // CHECK-LABEL: test_vmlaq_s32
return vmlaq_s32(v1, v2, v3);
// CHECK: mla {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float32x4_t test_vmlaq_f32(float32x4_t v1, float32x4_t v2, float32x4_t v3) {
- // CHECK: test_vmlaq_f32
+ // CHECK-LABEL: test_vmlaq_f32
return vmlaq_f32(v1, v2, v3);
// CHECK: fmla {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint8x16_t test_vmlaq_u8(uint8x16_t v1, uint8x16_t v2, uint8x16_t v3) {
- // CHECK: test_vmlaq_u8
+ // CHECK-LABEL: test_vmlaq_u8
return vmlaq_u8(v1, v2, v3);
// CHECK: mla {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vmlaq_u16(uint16x8_t v1, uint16x8_t v2, uint16x8_t v3) {
- // CHECK: test_vmlaq_u16
+ // CHECK-LABEL: test_vmlaq_u16
return vmlaq_u16(v1, v2, v3);
// CHECK: mla {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vmlaq_u32(uint32x4_t v1, uint32x4_t v2, uint32x4_t v3) {
- // CHECK: test_vmlaq_u32
+ // CHECK-LABEL: test_vmlaq_u32
return vmlaq_u32(v1, v2, v3);
// CHECK: mla {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vmlaq_f64(float64x2_t v1, float64x2_t v2, float64x2_t v3) {
- // CHECK: test_vmlaq_f64
+ // CHECK-LABEL: test_vmlaq_f64
return vmlaq_f64(v1, v2, v3);
// CHECK: fmla {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
int8x8_t test_vmls_s8(int8x8_t v1, int8x8_t v2, int8x8_t v3) {
- // CHECK: test_vmls_s8
+ // CHECK-LABEL: test_vmls_s8
return vmls_s8(v1, v2, v3);
// CHECK: mls {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int8x8_t test_vmls_s16(int16x4_t v1, int16x4_t v2, int16x4_t v3) {
- // CHECK: test_vmls_s16
+ // CHECK-LABEL: test_vmls_s16
return vmls_s16(v1, v2, v3);
// CHECK: mls {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2_t test_vmls_s32(int32x2_t v1, int32x2_t v2, int32x2_t v3) {
- // CHECK: test_vmls_s32
+ // CHECK-LABEL: test_vmls_s32
return vmls_s32(v1, v2, v3);
// CHECK: mls {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
float32x2_t test_vmls_f32(float32x2_t v1, float32x2_t v2, float32x2_t v3) {
- // CHECK: test_vmls_f32
+ // CHECK-LABEL: test_vmls_f32
return vmls_f32(v1, v2, v3);
// CHECK: fmls {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint8x8_t test_vmls_u8(uint8x8_t v1, uint8x8_t v2, uint8x8_t v3) {
- // CHECK: test_vmls_u8
+ // CHECK-LABEL: test_vmls_u8
return vmls_u8(v1, v2, v3);
// CHECK: mls {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vmls_u16(uint16x4_t v1, uint16x4_t v2, uint16x4_t v3) {
- // CHECK: test_vmls_u16
+ // CHECK-LABEL: test_vmls_u16
return vmls_u16(v1, v2, v3);
// CHECK: mls {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vmls_u32(uint32x2_t v1, uint32x2_t v2, uint32x2_t v3) {
- // CHECK: test_vmls_u32
+ // CHECK-LABEL: test_vmls_u32
return vmls_u32(v1, v2, v3);
// CHECK: mls {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int8x16_t test_vmlsq_s8(int8x16_t v1, int8x16_t v2, int8x16_t v3) {
- // CHECK: test_vmlsq_s8
+ // CHECK-LABEL: test_vmlsq_s8
return vmlsq_s8(v1, v2, v3);
// CHECK: mls {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8_t test_vmlsq_s16(int16x8_t v1, int16x8_t v2, int16x8_t v3) {
- // CHECK: test_vmlsq_s16
+ // CHECK-LABEL: test_vmlsq_s16
return vmlsq_s16(v1, v2, v3);
// CHECK: mls {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4_t test_vmlsq_s32(int32x4_t v1, int32x4_t v2, int32x4_t v3) {
- // CHECK: test_vmlsq_s32
+ // CHECK-LABEL: test_vmlsq_s32
return vmlsq_s32(v1, v2, v3);
// CHECK: mls {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float32x4_t test_vmlsq_f32(float32x4_t v1, float32x4_t v2, float32x4_t v3) {
- // CHECK: test_vmlsq_f32
+ // CHECK-LABEL: test_vmlsq_f32
return vmlsq_f32(v1, v2, v3);
// CHECK: fmls {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint8x16_t test_vmlsq_u8(uint8x16_t v1, uint8x16_t v2, uint8x16_t v3) {
- // CHECK: test_vmlsq_u8
+ // CHECK-LABEL: test_vmlsq_u8
return vmlsq_u8(v1, v2, v3);
// CHECK: mls {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vmlsq_u16(uint16x8_t v1, uint16x8_t v2, uint16x8_t v3) {
- // CHECK: test_vmlsq_u16
+ // CHECK-LABEL: test_vmlsq_u16
return vmlsq_u16(v1, v2, v3);
// CHECK: mls {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vmlsq_u32(uint32x4_t v1, uint32x4_t v2, uint32x4_t v3) {
- // CHECK: test_vmlsq_u32
+ // CHECK-LABEL: test_vmlsq_u32
return vmlsq_u32(v1, v2, v3);
// CHECK: mls {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vmlsq_f64(float64x2_t v1, float64x2_t v2, float64x2_t v3) {
- // CHECK: test_vmlsq_f64
+ // CHECK-LABEL: test_vmlsq_f64
return vmlsq_f64(v1, v2, v3);
// CHECK: fmls {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
float32x2_t test_vfma_f32(float32x2_t v1, float32x2_t v2, float32x2_t v3) {
- // CHECK: test_vfma_f32
+ // CHECK-LABEL: test_vfma_f32
return vfma_f32(v1, v2, v3);
// CHECK: fmla {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
float32x4_t test_vfmaq_f32(float32x4_t v1, float32x4_t v2, float32x4_t v3) {
- // CHECK: test_vfmaq_f32
+ // CHECK-LABEL: test_vfmaq_f32
return vfmaq_f32(v1, v2, v3);
// CHECK: fmla {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vfmaq_f64(float64x2_t v1, float64x2_t v2, float64x2_t v3) {
- // CHECK: test_vfmaq_f64
+ // CHECK-LABEL: test_vfmaq_f64
return vfmaq_f64(v1, v2, v3);
// CHECK: fmla {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
float32x2_t test_vfms_f32(float32x2_t v1, float32x2_t v2, float32x2_t v3) {
- // CHECK: test_vfms_f32
+ // CHECK-LABEL: test_vfms_f32
return vfms_f32(v1, v2, v3);
- // CHECK: fmls v0.2s, v1.2s, v2.2s
+ // CHECK: fmls v0.2s, {{v1.2s, v2.2s|v2.2s, v1.2s}}
}
float32x4_t test_vfmsq_f32(float32x4_t v1, float32x4_t v2, float32x4_t v3) {
- // CHECK: test_vfmsq_f32
+ // CHECK-LABEL: test_vfmsq_f32
return vfmsq_f32(v1, v2, v3);
- // CHECK: fmls v0.4s, v1.4s, v2.4s
+ // CHECK: fmls v0.4s, {{v1.4s, v2.4s|v2.4s, v1.4s}}
}
float64x2_t test_vfmsq_f64(float64x2_t v1, float64x2_t v2, float64x2_t v3) {
// CHECK: vfmsq_f64
return vfmsq_f64(v1, v2, v3);
- // CHECK: fmls v0.2d, v1.2d, v2.2d
+ // CHECK: fmls v0.2d, {{v1.2d, v2.2d|v2.2d, v1.2d}}
}
float64x2_t test_vdivq_f64(float64x2_t v1, float64x2_t v2) {
- // CHECK: test_vdivq_f64
+ // CHECK-LABEL: test_vdivq_f64
return vdivq_f64(v1, v2);
// CHECK: fdiv {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
float32x4_t test_vdivq_f32(float32x4_t v1, float32x4_t v2) {
- // CHECK: test_vdivq_f32
+ // CHECK-LABEL: test_vdivq_f32
return vdivq_f32(v1, v2);
// CHECK: fdiv {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float32x2_t test_vdiv_f32(float32x2_t v1, float32x2_t v2) {
- // CHECK: test_vdiv_f32
+ // CHECK-LABEL: test_vdiv_f32
return vdiv_f32(v1, v2);
// CHECK: fdiv {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int8x8_t test_vaba_s8(int8x8_t v1, int8x8_t v2, int8x8_t v3) {
- // CHECK: test_vaba_s8
+ // CHECK-LABEL: test_vaba_s8
return vaba_s8(v1, v2, v3);
// CHECK: saba {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int16x4_t test_vaba_s16(int16x4_t v1, int16x4_t v2, int16x4_t v3) {
- // CHECK: test_vaba_s16
+ // CHECK-LABEL: test_vaba_s16
return vaba_s16(v1, v2, v3);
// CHECK: saba {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2_t test_vaba_s32(int32x2_t v1, int32x2_t v2, int32x2_t v3) {
- // CHECK: test_vaba_s32
+ // CHECK-LABEL: test_vaba_s32
return vaba_s32(v1, v2, v3);
// CHECK: saba {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint8x8_t test_vaba_u8(uint8x8_t v1, uint8x8_t v2, uint8x8_t v3) {
- // CHECK: test_vaba_u8
+ // CHECK-LABEL: test_vaba_u8
return vaba_u8(v1, v2, v3);
// CHECK: uaba {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vaba_u16(uint16x4_t v1, uint16x4_t v2, uint16x4_t v3) {
- // CHECK: test_vaba_u16
+ // CHECK-LABEL: test_vaba_u16
return vaba_u16(v1, v2, v3);
// CHECK: uaba {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vaba_u32(uint32x2_t v1, uint32x2_t v2, uint32x2_t v3) {
- // CHECK: test_vaba_u32
+ // CHECK-LABEL: test_vaba_u32
return vaba_u32(v1, v2, v3);
// CHECK: uaba {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int8x16_t test_vabaq_s8(int8x16_t v1, int8x16_t v2, int8x16_t v3) {
- // CHECK: test_vabaq_s8
+ // CHECK-LABEL: test_vabaq_s8
return vabaq_s8(v1, v2, v3);
// CHECK: saba {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8_t test_vabaq_s16(int16x8_t v1, int16x8_t v2, int16x8_t v3) {
- // CHECK: test_vabaq_s16
+ // CHECK-LABEL: test_vabaq_s16
return vabaq_s16(v1, v2, v3);
// CHECK: saba {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4_t test_vabaq_s32(int32x4_t v1, int32x4_t v2, int32x4_t v3) {
- // CHECK: test_vabaq_s32
+ // CHECK-LABEL: test_vabaq_s32
return vabaq_s32(v1, v2, v3);
// CHECK: saba {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint8x16_t test_vabaq_u8(uint8x16_t v1, uint8x16_t v2, uint8x16_t v3) {
- // CHECK: test_vabaq_u8
+ // CHECK-LABEL: test_vabaq_u8
return vabaq_u8(v1, v2, v3);
// CHECK: uaba {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vabaq_u16(uint16x8_t v1, uint16x8_t v2, uint16x8_t v3) {
- // CHECK: test_vabaq_u16
+ // CHECK-LABEL: test_vabaq_u16
return vabaq_u16(v1, v2, v3);
// CHECK: uaba {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vabaq_u32(uint32x4_t v1, uint32x4_t v2, uint32x4_t v3) {
- // CHECK: test_vabaq_u32
+ // CHECK-LABEL: test_vabaq_u32
return vabaq_u32(v1, v2, v3);
// CHECK: uaba {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int8x8_t test_vabd_s8(int8x8_t v1, int8x8_t v2) {
- // CHECK: test_vabd_s8
+ // CHECK-LABEL: test_vabd_s8
return vabd_s8(v1, v2);
// CHECK: sabd {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int16x4_t test_vabd_s16(int16x4_t v1, int16x4_t v2) {
- // CHECK: test_vabd_s16
+ // CHECK-LABEL: test_vabd_s16
return vabd_s16(v1, v2);
// CHECK: sabd {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2_t test_vabd_s32(int32x2_t v1, int32x2_t v2) {
- // CHECK: test_vabd_s32
+ // CHECK-LABEL: test_vabd_s32
return vabd_s32(v1, v2);
// CHECK: sabd {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint8x8_t test_vabd_u8(uint8x8_t v1, uint8x8_t v2) {
- // CHECK: test_vabd_u8
+ // CHECK-LABEL: test_vabd_u8
return vabd_u8(v1, v2);
// CHECK: uabd {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vabd_u16(uint16x4_t v1, uint16x4_t v2) {
- // CHECK: test_vabd_u16
+ // CHECK-LABEL: test_vabd_u16
return vabd_u16(v1, v2);
// CHECK: uabd {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vabd_u32(uint32x2_t v1, uint32x2_t v2) {
- // CHECK: test_vabd_u32
+ // CHECK-LABEL: test_vabd_u32
return vabd_u32(v1, v2);
// CHECK: uabd {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
float32x2_t test_vabd_f32(float32x2_t v1, float32x2_t v2) {
- // CHECK: test_vabd_f32
+ // CHECK-LABEL: test_vabd_f32
return vabd_f32(v1, v2);
// CHECK: fabd {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int8x16_t test_vabdq_s8(int8x16_t v1, int8x16_t v2) {
- // CHECK: test_vabdq_s8
+ // CHECK-LABEL: test_vabdq_s8
return vabdq_s8(v1, v2);
// CHECK: sabd {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8_t test_vabdq_s16(int16x8_t v1, int16x8_t v2) {
- // CHECK: test_vabdq_s16
+ // CHECK-LABEL: test_vabdq_s16
return vabdq_s16(v1, v2);
// CHECK: sabd {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4_t test_vabdq_s32(int32x4_t v1, int32x4_t v2) {
- // CHECK: test_vabdq_s32
+ // CHECK-LABEL: test_vabdq_s32
return vabdq_s32(v1, v2);
// CHECK: sabd {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint8x16_t test_vabdq_u8(uint8x16_t v1, uint8x16_t v2) {
- // CHECK: test_vabdq_u8
+ // CHECK-LABEL: test_vabdq_u8
return vabdq_u8(v1, v2);
// CHECK: uabd {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vabdq_u16(uint16x8_t v1, uint16x8_t v2) {
- // CHECK: test_vabdq_u16
+ // CHECK-LABEL: test_vabdq_u16
return vabdq_u16(v1, v2);
// CHECK: uabd {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vabdq_u32(uint32x4_t v1, uint32x4_t v2) {
- // CHECK: test_vabdq_u32
+ // CHECK-LABEL: test_vabdq_u32
return vabdq_u32(v1, v2);
// CHECK: uabd {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float32x4_t test_vabdq_f32(float32x4_t v1, float32x4_t v2) {
- // CHECK: test_vabdq_f32
+ // CHECK-LABEL: test_vabdq_f32
return vabdq_f32(v1, v2);
// CHECK: fabd {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vabdq_f64(float64x2_t v1, float64x2_t v2) {
- // CHECK: test_vabdq_f64
+ // CHECK-LABEL: test_vabdq_f64
return vabdq_f64(v1, v2);
// CHECK: fabd {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
int8x8_t test_vbsl_s8(uint8x8_t v1, int8x8_t v2, int8x8_t v3) {
- // CHECK: test_vbsl_s8
+ // CHECK-LABEL: test_vbsl_s8
return vbsl_s8(v1, v2, v3);
// CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int8x8_t test_vbsl_s16(uint16x4_t v1, int16x4_t v2, int16x4_t v3) {
- // CHECK: test_vbsl_s16
+ // CHECK-LABEL: test_vbsl_s16
return vbsl_s16(v1, v2, v3);
// CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int32x2_t test_vbsl_s32(uint32x2_t v1, int32x2_t v2, int32x2_t v3) {
- // CHECK: test_vbsl_s32
+ // CHECK-LABEL: test_vbsl_s32
return vbsl_s32(v1, v2, v3);
// CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint64x1_t test_vbsl_s64(uint64x1_t v1, uint64x1_t v2, uint64x1_t v3) {
- // CHECK: test_vbsl_s64
+ // CHECK-LABEL: test_vbsl_s64
return vbsl_s64(v1, v2, v3);
// CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint8x8_t test_vbsl_u8(uint8x8_t v1, uint8x8_t v2, uint8x8_t v3) {
- // CHECK: test_vbsl_u8
+ // CHECK-LABEL: test_vbsl_u8
return vbsl_u8(v1, v2, v3);
// CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vbsl_u16(uint16x4_t v1, uint16x4_t v2, uint16x4_t v3) {
- // CHECK: test_vbsl_u16
+ // CHECK-LABEL: test_vbsl_u16
return vbsl_u16(v1, v2, v3);
// CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint32x2_t test_vbsl_u32(uint32x2_t v1, uint32x2_t v2, uint32x2_t v3) {
- // CHECK: test_vbsl_u32
+ // CHECK-LABEL: test_vbsl_u32
return vbsl_u32(v1, v2, v3);
// CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint64x1_t test_vbsl_u64(uint64x1_t v1, uint64x1_t v2, uint64x1_t v3) {
- // CHECK: test_vbsl_u64
+ // CHECK-LABEL: test_vbsl_u64
return vbsl_u64(v1, v2, v3);
// CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
float32x2_t test_vbsl_f32(float32x2_t v1, float32x2_t v2, float32x2_t v3) {
- // CHECK: test_vbsl_f32
+ // CHECK-LABEL: test_vbsl_f32
return vbsl_f32(v1, v2, v3);
// CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
float64x1_t test_vbsl_f64(uint64x1_t v1, float64x1_t v2, float64x1_t v3) {
- // CHECK: test_vbsl_f64
+ // CHECK-LABEL: test_vbsl_f64
return vbsl_f64(v1, v2, v3);
// CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
poly8x8_t test_vbsl_p8(uint8x8_t v1, poly8x8_t v2, poly8x8_t v3) {
- // CHECK: test_vbsl_p8
+ // CHECK-LABEL: test_vbsl_p8
return vbsl_p8(v1, v2, v3);
// CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
poly16x4_t test_vbsl_p16(uint16x4_t v1, poly16x4_t v2, poly16x4_t v3) {
- // CHECK: test_vbsl_p16
+ // CHECK-LABEL: test_vbsl_p16
return vbsl_p16(v1, v2, v3);
// CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int8x16_t test_vbslq_s8(uint8x16_t v1, int8x16_t v2, int8x16_t v3) {
- // CHECK: test_vbslq_s8
+ // CHECK-LABEL: test_vbslq_s8
return vbslq_s8(v1, v2, v3);
// CHECK: bsl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8_t test_vbslq_s16(uint16x8_t v1, int16x8_t v2, int16x8_t v3) {
- // CHECK: test_vbslq_s16
+ // CHECK-LABEL: test_vbslq_s16
return vbslq_s16(v1, v2, v3);
// CHECK: bsl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int32x4_t test_vbslq_s32(uint32x4_t v1, int32x4_t v2, int32x4_t v3) {
- // CHECK: test_vbslq_s32
+ // CHECK-LABEL: test_vbslq_s32
return vbslq_s32(v1, v2, v3);
// CHECK: bsl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int64x2_t test_vbslq_s64(uint64x2_t v1, int64x2_t v2, int64x2_t v3) {
- // CHECK: test_vbslq_s64
+ // CHECK-LABEL: test_vbslq_s64
return vbslq_s64(v1, v2, v3);
// CHECK: bsl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint8x16_t test_vbslq_u8(uint8x16_t v1, uint8x16_t v2, uint8x16_t v3) {
- // CHECK: test_vbslq_u8
+ // CHECK-LABEL: test_vbslq_u8
return vbslq_u8(v1, v2, v3);
// CHECK: bsl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vbslq_u16(uint16x8_t v1, uint16x8_t v2, uint16x8_t v3) {
- // CHECK: test_vbslq_u16
+ // CHECK-LABEL: test_vbslq_u16
return vbslq_u16(v1, v2, v3);
// CHECK: bsl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int32x4_t test_vbslq_u32(uint32x4_t v1, int32x4_t v2, int32x4_t v3) {
- // CHECK: test_vbslq_u32
+ // CHECK-LABEL: test_vbslq_u32
return vbslq_s32(v1, v2, v3);
// CHECK: bsl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint64x2_t test_vbslq_u64(uint64x2_t v1, uint64x2_t v2, uint64x2_t v3) {
- // CHECK: test_vbslq_u64
+ // CHECK-LABEL: test_vbslq_u64
return vbslq_u64(v1, v2, v3);
// CHECK: bsl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
float32x4_t test_vbslq_f32(uint32x4_t v1, float32x4_t v2, float32x4_t v3) {
- // CHECK: test_vbslq_f32
+ // CHECK-LABEL: test_vbslq_f32
return vbslq_f32(v1, v2, v3);
// CHECK: bsl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
poly8x16_t test_vbslq_p8(uint8x16_t v1, poly8x16_t v2, poly8x16_t v3) {
- // CHECK: test_vbslq_p8
+ // CHECK-LABEL: test_vbslq_p8
return vbslq_p8(v1, v2, v3);
// CHECK: bsl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
poly16x8_t test_vbslq_p16(uint16x8_t v1, poly16x8_t v2, poly16x8_t v3) {
- // CHECK: test_vbslq_p16
+ // CHECK-LABEL: test_vbslq_p16
return vbslq_p16(v1, v2, v3);
// CHECK: bsl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
float64x2_t test_vbslq_f64(uint64x2_t v1, float64x2_t v2, float64x2_t v3) {
- // CHECK: test_vbslq_f64
+ // CHECK-LABEL: test_vbslq_f64
return vbslq_f64(v1, v2, v3);
// CHECK: bsl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
float32x2_t test_vrecps_f32(float32x2_t v1, float32x2_t v2) {
- // CHECK: test_vrecps_f32
+ // CHECK-LABEL: test_vrecps_f32
return vrecps_f32(v1, v2);
// CHECK: frecps {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
float32x4_t test_vrecpsq_f32(float32x4_t v1, float32x4_t v2) {
- // CHECK: test_vrecpsq_f32
+ // CHECK-LABEL: test_vrecpsq_f32
return vrecpsq_f32(v1, v2);
// CHECK: frecps {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vrecpsq_f64(float64x2_t v1, float64x2_t v2) {
- // CHECK: test_vrecpsq_f64
+ // CHECK-LABEL: test_vrecpsq_f64
return vrecpsq_f64(v1, v2);
// CHECK: frecps {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
float32x2_t test_vrsqrts_f32(float32x2_t v1, float32x2_t v2) {
- // CHECK: test_vrsqrts_f32
+ // CHECK-LABEL: test_vrsqrts_f32
return vrsqrts_f32(v1, v2);
// CHECK: frsqrts {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
float32x4_t test_vrsqrtsq_f32(float32x4_t v1, float32x4_t v2) {
- // CHECK: test_vrsqrtsq_f32
+ // CHECK-LABEL: test_vrsqrtsq_f32
return vrsqrtsq_f32(v1, v2);
// CHECK: frsqrts {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vrsqrtsq_f64(float64x2_t v1, float64x2_t v2) {
- // CHECK: test_vrsqrtsq_f64
+ // CHECK-LABEL: test_vrsqrtsq_f64
return vrsqrtsq_f64(v1, v2);
// CHECK: frsqrts {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint32x2_t test_vcage_f32(float32x2_t v1, float32x2_t v2) {
- // CHECK: test_vcage_f32
+ // CHECK-LABEL: test_vcage_f32
return vcage_f32(v1, v2);
// CHECK: facge {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint64x1_t test_vcage_f64(float64x1_t a, float64x1_t b) {
- // CHECK: test_vcage_f64
+ // CHECK-LABEL: test_vcage_f64
return vcage_f64(a, b);
// CHECK: facge {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint32x4_t test_vcageq_f32(float32x4_t v1, float32x4_t v2) {
- // CHECK: test_vcageq_f32
+ // CHECK-LABEL: test_vcageq_f32
return vcageq_f32(v1, v2);
// CHECK: facge {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint64x2_t test_vcageq_f64(float64x2_t v1, float64x2_t v2) {
- // CHECK: test_vcageq_f64
+ // CHECK-LABEL: test_vcageq_f64
return vcageq_f64(v1, v2);
// CHECK: facge {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint32x2_t test_vcagt_f32(float32x2_t v1, float32x2_t v2) {
- // CHECK: test_vcagt_f32
+ // CHECK-LABEL: test_vcagt_f32
return vcagt_f32(v1, v2);
// CHECK: facgt {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint64x1_t test_vcagt_f64(float64x1_t a, float64x1_t b) {
- // CHECK: test_vcagt_f64
+ // CHECK-LABEL: test_vcagt_f64
return vcagt_f64(a, b);
// CHECK: facgt {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint32x4_t test_vcagtq_f32(float32x4_t v1, float32x4_t v2) {
- // CHECK: test_vcagtq_f32
+ // CHECK-LABEL: test_vcagtq_f32
return vcagtq_f32(v1, v2);
// CHECK: facgt {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint64x2_t test_vcagtq_f64(float64x2_t v1, float64x2_t v2) {
- // CHECK: test_vcagtq_f64
+ // CHECK-LABEL: test_vcagtq_f64
return vcagtq_f64(v1, v2);
// CHECK: facgt {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint32x2_t test_vcale_f32(float32x2_t v1, float32x2_t v2) {
- // CHECK: test_vcale_f32
+ // CHECK-LABEL: test_vcale_f32
return vcale_f32(v1, v2);
// Using registers other than v0, v1 are possible, but would be odd.
// CHECK: facge {{v[0-9]+}}.2s, v1.2s, v0.2s
}
uint64x1_t test_vcale_f64(float64x1_t a, float64x1_t b) {
- // CHECK: test_vcale_f64
+ // CHECK-LABEL: test_vcale_f64
return vcale_f64(a, b);
// CHECK: facge {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint32x4_t test_vcaleq_f32(float32x4_t v1, float32x4_t v2) {
- // CHECK: test_vcaleq_f32
+ // CHECK-LABEL: test_vcaleq_f32
return vcaleq_f32(v1, v2);
// Using registers other than v0, v1 are possible, but would be odd.
// CHECK: facge {{v[0-9]+}}.4s, v1.4s, v0.4s
}
uint64x2_t test_vcaleq_f64(float64x2_t v1, float64x2_t v2) {
- // CHECK: test_vcaleq_f64
+ // CHECK-LABEL: test_vcaleq_f64
return vcaleq_f64(v1, v2);
// Using registers other than v0, v1 are possible, but would be odd.
// CHECK: facge {{v[0-9]+}}.2d, v1.2d, v0.2d
}
uint32x2_t test_vcalt_f32(float32x2_t v1, float32x2_t v2) {
- // CHECK: test_vcalt_f32
+ // CHECK-LABEL: test_vcalt_f32
return vcalt_f32(v1, v2);
// Using registers other than v0, v1 are possible, but would be odd.
// CHECK: facgt {{v[0-9]+}}.2s, v1.2s, v0.2s
}
uint64x1_t test_vcalt_f64(float64x1_t a, float64x1_t b) {
- // CHECK: test_vcalt_f64
+ // CHECK-LABEL: test_vcalt_f64
return vcalt_f64(a, b);
// CHECK: facgt {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint32x4_t test_vcaltq_f32(float32x4_t v1, float32x4_t v2) {
- // CHECK: test_vcaltq_f32
+ // CHECK-LABEL: test_vcaltq_f32
return vcaltq_f32(v1, v2);
// Using registers other than v0, v1 are possible, but would be odd.
// CHECK: facgt {{v[0-9]+}}.4s, v1.4s, v0.4s
}
uint64x2_t test_vcaltq_f64(float64x2_t v1, float64x2_t v2) {
- // CHECK: test_vcaltq_f64
+ // CHECK-LABEL: test_vcaltq_f64
return vcaltq_f64(v1, v2);
// Using registers other than v0, v1 are possible, but would be odd.
// CHECK: facgt {{v[0-9]+}}.2d, v1.2d, v0.2d
}
uint8x8_t test_vtst_s8(int8x8_t v1, int8x8_t v2) {
- // CHECK: test_vtst_s8
+ // CHECK-LABEL: test_vtst_s8
return vtst_s8(v1, v2);
// CHECK: cmtst {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vtst_s16(int16x4_t v1, int16x4_t v2) {
- // CHECK: test_vtst_s16
+ // CHECK-LABEL: test_vtst_s16
return vtst_s16(v1, v2);
// CHECK: cmtst {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vtst_s32(int32x2_t v1, int32x2_t v2) {
- // CHECK: test_vtst_s32
+ // CHECK-LABEL: test_vtst_s32
return vtst_s32(v1, v2);
// CHECK: cmtst {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint8x8_t test_vtst_u8(uint8x8_t v1, uint8x8_t v2) {
- // CHECK: test_vtst_u8
+ // CHECK-LABEL: test_vtst_u8
return vtst_u8(v1, v2);
// CHECK: cmtst {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vtst_u16(uint16x4_t v1, uint16x4_t v2) {
- // CHECK: test_vtst_u16
+ // CHECK-LABEL: test_vtst_u16
return vtst_u16(v1, v2);
// CHECK: cmtst {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vtst_u32(uint32x2_t v1, uint32x2_t v2) {
- // CHECK: test_vtst_u32
+ // CHECK-LABEL: test_vtst_u32
return vtst_u32(v1, v2);
// CHECK: cmtst {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint8x16_t test_vtstq_s8(int8x16_t v1, int8x16_t v2) {
- // CHECK: test_vtstq_s8
+ // CHECK-LABEL: test_vtstq_s8
return vtstq_s8(v1, v2);
// CHECK: cmtst {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vtstq_s16(int16x8_t v1, int16x8_t v2) {
- // CHECK: test_vtstq_s16
+ // CHECK-LABEL: test_vtstq_s16
return vtstq_s16(v1, v2);
// CHECK: cmtst {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vtstq_s32(int32x4_t v1, int32x4_t v2) {
- // CHECK: test_vtstq_s32
+ // CHECK-LABEL: test_vtstq_s32
return vtstq_s32(v1, v2);
// CHECK: cmtst {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint8x16_t test_vtstq_u8(uint8x16_t v1, uint8x16_t v2) {
- // CHECK: test_vtstq_u8
+ // CHECK-LABEL: test_vtstq_u8
return vtstq_u8(v1, v2);
// CHECK: cmtst {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vtstq_u16(uint16x8_t v1, uint16x8_t v2) {
- // CHECK: test_vtstq_u16
+ // CHECK-LABEL: test_vtstq_u16
return vtstq_u16(v1, v2);
// CHECK: cmtst {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vtstq_u32(uint32x4_t v1, uint32x4_t v2) {
- // CHECK: test_vtstq_u32
+ // CHECK-LABEL: test_vtstq_u32
return vtstq_u32(v1, v2);
// CHECK: cmtst {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint64x2_t test_vtstq_s64(int64x2_t v1, int64x2_t v2) {
- // CHECK: test_vtstq_s64
+ // CHECK-LABEL: test_vtstq_s64
return vtstq_s64(v1, v2);
// CHECK: cmtst {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint64x2_t test_vtstq_u64(uint64x2_t v1, uint64x2_t v2) {
- // CHECK: test_vtstq_u64
+ // CHECK-LABEL: test_vtstq_u64
return vtstq_u64(v1, v2);
// CHECK: cmtst {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint8x8_t test_vtst_p8(poly8x8_t v1, poly8x8_t v2) {
- // CHECK: test_vtst_p8
+ // CHECK-LABEL: test_vtst_p8
return vtst_p8(v1, v2);
// CHECK: cmtst {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vtst_p16(poly16x4_t v1, poly16x4_t v2) {
- // CHECK: test_vtst_p16
+ // CHECK-LABEL: test_vtst_p16
return vtst_p16(v1, v2);
// CHECK: cmtst {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint8x16_t test_vtstq_p8(poly8x16_t v1, poly8x16_t v2) {
- // CHECK: test_vtstq_p8
+ // CHECK-LABEL: test_vtstq_p8
return vtstq_p8(v1, v2);
// CHECK: cmtst {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vtstq_p16(poly16x8_t v1, poly16x8_t v2) {
- // CHECK: test_vtstq_p16
+ // CHECK-LABEL: test_vtstq_p16
return vtstq_p16(v1, v2);
// CHECK: cmtst {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
+uint64x1_t test_vtst_s64(int64x1_t a, int64x1_t b) {
+ // CHECK-LABEL: test_vtst_s64
+ return vtst_s64(a, b);
+ // CHECK: cmtst {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+}
+
+uint64x1_t test_vtst_u64(uint64x1_t a, uint64x1_t b) {
+ // CHECK-LABEL: test_vtst_u64
+ return vtst_u64(a, b);
+ // CHECK: cmtst {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+}
uint8x8_t test_vceq_s8(int8x8_t v1, int8x8_t v2) {
- // CHECK: test_vceq_s8
+ // CHECK-LABEL: test_vceq_s8
return vceq_s8(v1, v2);
// CHECK: cmeq {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vceq_s16(int16x4_t v1, int16x4_t v2) {
- // CHECK: test_vceq_s16
+ // CHECK-LABEL: test_vceq_s16
return vceq_s16(v1, v2);
// CHECK: cmeq {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vceq_s32(int32x2_t v1, int32x2_t v2) {
- // CHECK: test_vceq_s32
+ // CHECK-LABEL: test_vceq_s32
return vceq_s32(v1, v2);
// CHECK: cmeq {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint64x1_t test_vceq_s64(int64x1_t a, int64x1_t b) {
- // CHECK: test_vceq_s64
+ // CHECK-LABEL: test_vceq_s64
return vceq_s64(a, b);
// CHECK: cmeq {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint64x1_t test_vceq_u64(uint64x1_t a, uint64x1_t b) {
- // CHECK: test_vceq_u64
+ // CHECK-LABEL: test_vceq_u64
return vceq_u64(a, b);
// CHECK: cmeq {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint32x2_t test_vceq_f32(float32x2_t v1, float32x2_t v2) {
- // CHECK: test_vceq_f32
+ // CHECK-LABEL: test_vceq_f32
return vceq_f32(v1, v2);
// CHECK: fcmeq {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint64x1_t test_vceq_f64(float64x1_t a, float64x1_t b) {
- // CHECK: test_vceq_f64
+ // CHECK-LABEL: test_vceq_f64
return vceq_f64(a, b);
// CHECK: fcmeq {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint8x8_t test_vceq_u8(uint8x8_t v1, uint8x8_t v2) {
- // CHECK: test_vceq_u8
+ // CHECK-LABEL: test_vceq_u8
return vceq_u8(v1, v2);
// CHECK: cmeq {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vceq_u16(uint16x4_t v1, uint16x4_t v2) {
- // CHECK: test_vceq_u16
+ // CHECK-LABEL: test_vceq_u16
return vceq_u16(v1, v2);
// CHECK: cmeq {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vceq_u32(uint32x2_t v1, uint32x2_t v2) {
- // CHECK: test_vceq_u32
+ // CHECK-LABEL: test_vceq_u32
return vceq_u32(v1, v2);
// CHECK: cmeq {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint8x8_t test_vceq_p8(poly8x8_t v1, poly8x8_t v2) {
- // CHECK: test_vceq_p8
+ // CHECK-LABEL: test_vceq_p8
return vceq_p8(v1, v2);
// CHECK: cmeq {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint8x16_t test_vceqq_s8(int8x16_t v1, int8x16_t v2) {
- // CHECK: test_vceqq_s8
+ // CHECK-LABEL: test_vceqq_s8
return vceqq_s8(v1, v2);
// CHECK: cmeq {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vceqq_s16(int16x8_t v1, int16x8_t v2) {
- // CHECK: test_vceqq_s16
+ // CHECK-LABEL: test_vceqq_s16
return vceqq_s16(v1, v2);
// CHECK: cmeq {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vceqq_s32(int32x4_t v1, int32x4_t v2) {
- // CHECK: test_vceqq_s32
+ // CHECK-LABEL: test_vceqq_s32
return vceqq_s32(v1, v2);
// CHECK: cmeq {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint32x4_t test_vceqq_f32(float32x4_t v1, float32x4_t v2) {
- // CHECK: test_vceqq_f32
+ // CHECK-LABEL: test_vceqq_f32
return vceqq_f32(v1, v2);
// CHECK: fcmeq {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint8x16_t test_vceqq_u8(uint8x16_t v1, uint8x16_t v2) {
- // CHECK: test_vceqq_u8
+ // CHECK-LABEL: test_vceqq_u8
return vceqq_u8(v1, v2);
// CHECK: cmeq {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vceqq_u16(uint16x8_t v1, uint16x8_t v2) {
- // CHECK: test_vceqq_u16
+ // CHECK-LABEL: test_vceqq_u16
return vceqq_u16(v1, v2);
// CHECK: cmeq {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vceqq_u32(uint32x4_t v1, uint32x4_t v2) {
- // CHECK: test_vceqq_u32
+ // CHECK-LABEL: test_vceqq_u32
return vceqq_u32(v1, v2);
// CHECK: cmeq {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint8x16_t test_vceqq_p8(poly8x16_t v1, poly8x16_t v2) {
- // CHECK: test_vceqq_p8
+ // CHECK-LABEL: test_vceqq_p8
return vceqq_p8(v1, v2);
// CHECK: cmeq {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint64x2_t test_vceqq_s64(int64x2_t v1, int64x2_t v2) {
- // CHECK: test_vceqq_s64
+ // CHECK-LABEL: test_vceqq_s64
return vceqq_s64(v1, v2);
// CHECK: cmeq {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint64x2_t test_vceqq_u64(uint64x2_t v1, uint64x2_t v2) {
- // CHECK: test_vceqq_u64
+ // CHECK-LABEL: test_vceqq_u64
return vceqq_u64(v1, v2);
// CHECK: cmeq {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint64x2_t test_vceqq_f64(float64x2_t v1, float64x2_t v2) {
- // CHECK: test_vceqq_f64
+ // CHECK-LABEL: test_vceqq_f64
return vceqq_f64(v1, v2);
// CHECK: fcmeq {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint8x8_t test_vcge_s8(int8x8_t v1, int8x8_t v2) {
-// CHECK: test_vcge_s8
+// CHECK-LABEL: test_vcge_s8
return vcge_s8(v1, v2);
// CHECK: cmge {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vcge_s16(int16x4_t v1, int16x4_t v2) {
-// CHECK: test_vcge_s16
+// CHECK-LABEL: test_vcge_s16
return vcge_s16(v1, v2);
// CHECK: cmge {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vcge_s32(int32x2_t v1, int32x2_t v2) {
-// CHECK: test_vcge_s32
+// CHECK-LABEL: test_vcge_s32
return vcge_s32(v1, v2);
// CHECK: cmge {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint64x1_t test_vcge_s64(int64x1_t a, int64x1_t b) {
- // CHECK: test_vcge_s64
+ // CHECK-LABEL: test_vcge_s64
return vcge_s64(a, b);
// CHECK: cmge {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint64x1_t test_vcge_u64(uint64x1_t a, uint64x1_t b) {
- // CHECK: test_vcge_u64
+ // CHECK-LABEL: test_vcge_u64
return vcge_u64(a, b);
// CHECK: cmhs {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint32x2_t test_vcge_f32(float32x2_t v1, float32x2_t v2) {
-// CHECK: test_vcge_f32
+// CHECK-LABEL: test_vcge_f32
return vcge_f32(v1, v2);
// CHECK: fcmge {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint64x1_t test_vcge_f64(float64x1_t a, float64x1_t b) {
- // CHECK: test_vcge_f64
+ // CHECK-LABEL: test_vcge_f64
return vcge_f64(a, b);
// CHECK: fcmge {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint8x8_t test_vcge_u8(uint8x8_t v1, uint8x8_t v2) {
-// CHECK: test_vcge_u8
+// CHECK-LABEL: test_vcge_u8
return vcge_u8(v1, v2);
// CHECK: cmhs {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vcge_u16(uint16x4_t v1, uint16x4_t v2) {
-// CHECK: test_vcge_u16
+// CHECK-LABEL: test_vcge_u16
return vcge_u16(v1, v2);
// CHECK: cmhs {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vcge_u32(uint32x2_t v1, uint32x2_t v2) {
-// CHECK: test_vcge_u32
+// CHECK-LABEL: test_vcge_u32
return vcge_u32(v1, v2);
// CHECK: cmhs {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint8x16_t test_vcgeq_s8(int8x16_t v1, int8x16_t v2) {
-// CHECK: test_vcgeq_s8
+// CHECK-LABEL: test_vcgeq_s8
return vcgeq_s8(v1, v2);
// CHECK: cmge {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vcgeq_s16(int16x8_t v1, int16x8_t v2) {
-// CHECK: test_vcgeq_s16
+// CHECK-LABEL: test_vcgeq_s16
return vcgeq_s16(v1, v2);
// CHECK: cmge {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vcgeq_s32(int32x4_t v1, int32x4_t v2) {
-// CHECK: test_vcgeq_s32
+// CHECK-LABEL: test_vcgeq_s32
return vcgeq_s32(v1, v2);
// CHECK: cmge {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint32x4_t test_vcgeq_f32(float32x4_t v1, float32x4_t v2) {
-// CHECK: test_vcgeq_f32
+// CHECK-LABEL: test_vcgeq_f32
return vcgeq_f32(v1, v2);
// CHECK: fcmge {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint8x16_t test_vcgeq_u8(uint8x16_t v1, uint8x16_t v2) {
-// CHECK: test_vcgeq_u8
+// CHECK-LABEL: test_vcgeq_u8
return vcgeq_u8(v1, v2);
// CHECK: cmhs {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vcgeq_u16(uint16x8_t v1, uint16x8_t v2) {
-// CHECK: test_vcgeq_u16
+// CHECK-LABEL: test_vcgeq_u16
return vcgeq_u16(v1, v2);
// CHECK: cmhs {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vcgeq_u32(uint32x4_t v1, uint32x4_t v2) {
-// CHECK: test_vcgeq_u32
+// CHECK-LABEL: test_vcgeq_u32
return vcgeq_u32(v1, v2);
// CHECK: cmhs {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint64x2_t test_vcgeq_s64(int64x2_t v1, int64x2_t v2) {
-// CHECK: test_vcgeq_s64
+// CHECK-LABEL: test_vcgeq_s64
return vcgeq_s64(v1, v2);
// CHECK: cmge {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint64x2_t test_vcgeq_u64(uint64x2_t v1, uint64x2_t v2) {
-// CHECK: test_vcgeq_u64
+// CHECK-LABEL: test_vcgeq_u64
return vcgeq_u64(v1, v2);
// CHECK: cmhs {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint64x2_t test_vcgeq_f64(float64x2_t v1, float64x2_t v2) {
-// CHECK: test_vcgeq_f64
+// CHECK-LABEL: test_vcgeq_f64
return vcgeq_f64(v1, v2);
// CHECK: fcmge {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
@@ -1376,242 +1387,242 @@ uint64x2_t test_vcgeq_f64(float64x2_t v1, float64x2_t v2) {
// LE condition predicate implemented as GE, so check reversed operands.
// Using registers other than v0, v1 are possible, but would be odd.
uint8x8_t test_vcle_s8(int8x8_t v1, int8x8_t v2) {
- // CHECK: test_vcle_s8
+ // CHECK-LABEL: test_vcle_s8
return vcle_s8(v1, v2);
// CHECK: cmge {{v[0-9]+}}.8b, v1.8b, v0.8b
}
uint16x4_t test_vcle_s16(int16x4_t v1, int16x4_t v2) {
- // CHECK: test_vcle_s16
+ // CHECK-LABEL: test_vcle_s16
return vcle_s16(v1, v2);
// CHECK: cmge {{v[0-9]+}}.4h, v1.4h, v0.4h
}
uint32x2_t test_vcle_s32(int32x2_t v1, int32x2_t v2) {
- // CHECK: test_vcle_s32
+ // CHECK-LABEL: test_vcle_s32
return vcle_s32(v1, v2);
// CHECK: cmge {{v[0-9]+}}.2s, v1.2s, v0.2s
}
uint64x1_t test_vcle_s64(int64x1_t a, int64x1_t b) {
- // CHECK: test_vcle_s64
+ // CHECK-LABEL: test_vcle_s64
return vcle_s64(a, b);
// CHECK: cmge {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint64x1_t test_vcle_u64(uint64x1_t a, uint64x1_t b) {
- // CHECK: test_vcle_u64
+ // CHECK-LABEL: test_vcle_u64
return vcle_u64(a, b);
// CHECK: cmhs {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint32x2_t test_vcle_f32(float32x2_t v1, float32x2_t v2) {
- // CHECK: test_vcle_f32
+ // CHECK-LABEL: test_vcle_f32
return vcle_f32(v1, v2);
// CHECK: fcmge {{v[0-9]+}}.2s, v1.2s, v0.2s
}
uint64x1_t test_vcle_f64(float64x1_t a, float64x1_t b) {
- // CHECK: test_vcle_f64
+ // CHECK-LABEL: test_vcle_f64
return vcle_f64(a, b);
// CHECK: fcmge {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint8x8_t test_vcle_u8(uint8x8_t v1, uint8x8_t v2) {
- // CHECK: test_vcle_u8
+ // CHECK-LABEL: test_vcle_u8
return vcle_u8(v1, v2);
// CHECK: cmhs {{v[0-9]+}}.8b, v1.8b, v0.8b
}
uint16x4_t test_vcle_u16(uint16x4_t v1, uint16x4_t v2) {
- // CHECK: test_vcle_u16
+ // CHECK-LABEL: test_vcle_u16
return vcle_u16(v1, v2);
// CHECK: cmhs {{v[0-9]+}}.4h, v1.4h, v0.4h
}
uint32x2_t test_vcle_u32(uint32x2_t v1, uint32x2_t v2) {
- // CHECK: test_vcle_u32
+ // CHECK-LABEL: test_vcle_u32
return vcle_u32(v1, v2);
// CHECK: cmhs {{v[0-9]+}}.2s, v1.2s, v0.2s
}
uint8x16_t test_vcleq_s8(int8x16_t v1, int8x16_t v2) {
- // CHECK: test_vcleq_s8
+ // CHECK-LABEL: test_vcleq_s8
return vcleq_s8(v1, v2);
// CHECK: cmge {{v[0-9]+}}.16b, v1.16b, v0.16b
}
uint16x8_t test_vcleq_s16(int16x8_t v1, int16x8_t v2) {
- // CHECK: test_vcleq_s16
+ // CHECK-LABEL: test_vcleq_s16
return vcleq_s16(v1, v2);
// CHECK: cmge {{v[0-9]+}}.8h, v1.8h, v0.8h
}
uint32x4_t test_vcleq_s32(int32x4_t v1, int32x4_t v2) {
- // CHECK: test_vcleq_s32
+ // CHECK-LABEL: test_vcleq_s32
return vcleq_s32(v1, v2);
// CHECK: cmge {{v[0-9]+}}.4s, v1.4s, v0.4s
}
uint32x4_t test_vcleq_f32(float32x4_t v1, float32x4_t v2) {
- // CHECK: test_vcleq_f32
+ // CHECK-LABEL: test_vcleq_f32
return vcleq_f32(v1, v2);
// CHECK: fcmge {{v[0-9]+}}.4s, v1.4s, v0.4s
}
uint8x16_t test_vcleq_u8(uint8x16_t v1, uint8x16_t v2) {
- // CHECK: test_vcleq_u8
+ // CHECK-LABEL: test_vcleq_u8
return vcleq_u8(v1, v2);
// CHECK: cmhs {{v[0-9]+}}.16b, v1.16b, v0.16b
}
uint16x8_t test_vcleq_u16(uint16x8_t v1, uint16x8_t v2) {
- // CHECK: test_vcleq_u16
+ // CHECK-LABEL: test_vcleq_u16
return vcleq_u16(v1, v2);
// CHECK: cmhs {{v[0-9]+}}.8h, v1.8h, v0.8h
}
uint32x4_t test_vcleq_u32(uint32x4_t v1, uint32x4_t v2) {
- // CHECK: test_vcleq_u32
+ // CHECK-LABEL: test_vcleq_u32
return vcleq_u32(v1, v2);
// CHECK: cmhs {{v[0-9]+}}.4s, v1.4s, v0.4s
}
uint64x2_t test_vcleq_s64(int64x2_t v1, int64x2_t v2) {
- // CHECK: test_vcleq_s64
+ // CHECK-LABEL: test_vcleq_s64
return vcleq_s64(v1, v2);
// CHECK: cmge {{v[0-9]+}}.2d, v1.2d, v0.2d
}
uint64x2_t test_vcleq_u64(uint64x2_t v1, uint64x2_t v2) {
- // CHECK: test_vcleq_u64
+ // CHECK-LABEL: test_vcleq_u64
return vcleq_u64(v1, v2);
// CHECK: cmhs {{v[0-9]+}}.2d, v1.2d, v0.2d
}
uint64x2_t test_vcleq_f64(float64x2_t v1, float64x2_t v2) {
- // CHECK: test_vcleq_f64
+ // CHECK-LABEL: test_vcleq_f64
return vcleq_f64(v1, v2);
// CHECK: fcmge {{v[0-9]+}}.2d, v1.2d, v0.2d
}
uint8x8_t test_vcgt_s8(int8x8_t v1, int8x8_t v2) {
- // CHECK: test_vcgt_s8
+ // CHECK-LABEL: test_vcgt_s8
return vcgt_s8(v1, v2);
// CHECK: cmgt {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vcgt_s16(int16x4_t v1, int16x4_t v2) {
- // CHECK: test_vcgt_s16
+ // CHECK-LABEL: test_vcgt_s16
return vcgt_s16(v1, v2);
// CHECK: cmgt {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vcgt_s32(int32x2_t v1, int32x2_t v2) {
- // CHECK: test_vcgt_s32
+ // CHECK-LABEL: test_vcgt_s32
return vcgt_s32(v1, v2);
// CHECK: cmgt {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint64x1_t test_vcgt_s64(int64x1_t a, int64x1_t b) {
- // CHECK: test_vcgt_s64
+ // CHECK-LABEL: test_vcgt_s64
return vcgt_s64(a, b);
// CHECK: cmgt {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint64x1_t test_vcgt_u64(uint64x1_t a, uint64x1_t b) {
- // CHECK: test_vcgt_u64
+ // CHECK-LABEL: test_vcgt_u64
return vcgt_u64(a, b);
// CHECK: cmhi {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint32x2_t test_vcgt_f32(float32x2_t v1, float32x2_t v2) {
- // CHECK: test_vcgt_f32
+ // CHECK-LABEL: test_vcgt_f32
return vcgt_f32(v1, v2);
// CHECK: fcmgt {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint64x1_t test_vcgt_f64(float64x1_t a, float64x1_t b) {
- // CHECK: test_vcgt_f64
+ // CHECK-LABEL: test_vcgt_f64
return vcgt_f64(a, b);
// CHECK: fcmgt {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint8x8_t test_vcgt_u8(uint8x8_t v1, uint8x8_t v2) {
- // CHECK: test_vcgt_u8
+ // CHECK-LABEL: test_vcgt_u8
return vcgt_u8(v1, v2);
// CHECK: cmhi {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vcgt_u16(uint16x4_t v1, uint16x4_t v2) {
- // CHECK: test_vcgt_u16
+ // CHECK-LABEL: test_vcgt_u16
return vcgt_u16(v1, v2);
// CHECK: cmhi {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vcgt_u32(uint32x2_t v1, uint32x2_t v2) {
- // CHECK: test_vcgt_u32
+ // CHECK-LABEL: test_vcgt_u32
return vcgt_u32(v1, v2);
// CHECK: cmhi {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint8x16_t test_vcgtq_s8(int8x16_t v1, int8x16_t v2) {
- // CHECK: test_vcgtq_s8
+ // CHECK-LABEL: test_vcgtq_s8
return vcgtq_s8(v1, v2);
// CHECK: cmgt {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vcgtq_s16(int16x8_t v1, int16x8_t v2) {
- // CHECK: test_vcgtq_s16
+ // CHECK-LABEL: test_vcgtq_s16
return vcgtq_s16(v1, v2);
// CHECK: cmgt {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vcgtq_s32(int32x4_t v1, int32x4_t v2) {
- // CHECK: test_vcgtq_s32
+ // CHECK-LABEL: test_vcgtq_s32
return vcgtq_s32(v1, v2);
// CHECK: cmgt {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint32x4_t test_vcgtq_f32(float32x4_t v1, float32x4_t v2) {
- // CHECK: test_vcgtq_f32
+ // CHECK-LABEL: test_vcgtq_f32
return vcgtq_f32(v1, v2);
// CHECK: fcmgt {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint8x16_t test_vcgtq_u8(uint8x16_t v1, uint8x16_t v2) {
- // CHECK: test_vcgtq_u8
+ // CHECK-LABEL: test_vcgtq_u8
return vcgtq_u8(v1, v2);
// CHECK: cmhi {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vcgtq_u16(uint16x8_t v1, uint16x8_t v2) {
- // CHECK: test_vcgtq_u16
+ // CHECK-LABEL: test_vcgtq_u16
return vcgtq_u16(v1, v2);
// CHECK: cmhi {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vcgtq_u32(uint32x4_t v1, uint32x4_t v2) {
- // CHECK: test_vcgtq_u32
+ // CHECK-LABEL: test_vcgtq_u32
return vcgtq_u32(v1, v2);
// CHECK: cmhi {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint64x2_t test_vcgtq_s64(int64x2_t v1, int64x2_t v2) {
- // CHECK: test_vcgtq_s64
+ // CHECK-LABEL: test_vcgtq_s64
return vcgtq_s64(v1, v2);
// CHECK: cmgt {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint64x2_t test_vcgtq_u64(uint64x2_t v1, uint64x2_t v2) {
- // CHECK: test_vcgtq_u64
+ // CHECK-LABEL: test_vcgtq_u64
return vcgtq_u64(v1, v2);
// CHECK: cmhi {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint64x2_t test_vcgtq_f64(float64x2_t v1, float64x2_t v2) {
- // CHECK: test_vcgtq_f64
+ // CHECK-LABEL: test_vcgtq_f64
return vcgtq_f64(v1, v2);
// CHECK: fcmgt {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
@@ -1622,381 +1633,381 @@ uint64x2_t test_vcgtq_f64(float64x2_t v1, float64x2_t v2) {
// Using registers other than v0, v1 are possible, but would be odd.
uint8x8_t test_vclt_s8(int8x8_t v1, int8x8_t v2) {
- // CHECK: test_vclt_s8
+ // CHECK-LABEL: test_vclt_s8
return vclt_s8(v1, v2);
// CHECK: cmgt {{v[0-9]+}}.8b, v1.8b, v0.8b
}
uint16x4_t test_vclt_s16(int16x4_t v1, int16x4_t v2) {
- // CHECK: test_vclt_s16
+ // CHECK-LABEL: test_vclt_s16
return vclt_s16(v1, v2);
// CHECK: cmgt {{v[0-9]+}}.4h, v1.4h, v0.4h
}
uint32x2_t test_vclt_s32(int32x2_t v1, int32x2_t v2) {
- // CHECK: test_vclt_s32
+ // CHECK-LABEL: test_vclt_s32
return vclt_s32(v1, v2);
// CHECK: cmgt {{v[0-9]+}}.2s, v1.2s, v0.2s
}
uint64x1_t test_vclt_s64(int64x1_t a, int64x1_t b) {
- // CHECK: test_vclt_s64
+ // CHECK-LABEL: test_vclt_s64
return vclt_s64(a, b);
// CHECK: cmgt {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint64x1_t test_vclt_u64(uint64x1_t a, uint64x1_t b) {
- // CHECK: test_vclt_u64
+ // CHECK-LABEL: test_vclt_u64
return vclt_u64(a, b);
// CHECK: cmhi {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint32x2_t test_vclt_f32(float32x2_t v1, float32x2_t v2) {
- // CHECK: test_vclt_f32
+ // CHECK-LABEL: test_vclt_f32
return vclt_f32(v1, v2);
// CHECK: fcmgt {{v[0-9]+}}.2s, v1.2s, v0.2s
}
uint64x1_t test_vclt_f64(float64x1_t a, float64x1_t b) {
- // CHECK: test_vclt_f64
+ // CHECK-LABEL: test_vclt_f64
return vclt_f64(a, b);
// CHECK: fcmgt {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint8x8_t test_vclt_u8(uint8x8_t v1, uint8x8_t v2) {
- // CHECK: test_vclt_u8
+ // CHECK-LABEL: test_vclt_u8
return vclt_u8(v1, v2);
// CHECK: cmhi {{v[0-9]+}}.8b, v1.8b, v0.8b
}
uint16x4_t test_vclt_u16(uint16x4_t v1, uint16x4_t v2) {
- // CHECK: test_vclt_u16
+ // CHECK-LABEL: test_vclt_u16
return vclt_u16(v1, v2);
// CHECK: cmhi {{v[0-9]+}}.4h, v1.4h, v0.4h
}
uint32x2_t test_vclt_u32(uint32x2_t v1, uint32x2_t v2) {
- // CHECK: test_vclt_u32
+ // CHECK-LABEL: test_vclt_u32
return vclt_u32(v1, v2);
// CHECK: cmhi {{v[0-9]+}}.2s, v1.2s, v0.2s
}
uint8x16_t test_vcltq_s8(int8x16_t v1, int8x16_t v2) {
- // CHECK: test_vcltq_s8
+ // CHECK-LABEL: test_vcltq_s8
return vcltq_s8(v1, v2);
// CHECK: cmgt {{v[0-9]+}}.16b, v1.16b, v0.16b
}
uint16x8_t test_vcltq_s16(int16x8_t v1, int16x8_t v2) {
- // CHECK: test_vcltq_s16
+ // CHECK-LABEL: test_vcltq_s16
return vcltq_s16(v1, v2);
// CHECK: cmgt {{v[0-9]+}}.8h, v1.8h, v0.8h
}
uint32x4_t test_vcltq_s32(int32x4_t v1, int32x4_t v2) {
- // CHECK: test_vcltq_s32
+ // CHECK-LABEL: test_vcltq_s32
return vcltq_s32(v1, v2);
// CHECK: cmgt {{v[0-9]+}}.4s, v1.4s, v0.4s
}
uint32x4_t test_vcltq_f32(float32x4_t v1, float32x4_t v2) {
- // CHECK: test_vcltq_f32
+ // CHECK-LABEL: test_vcltq_f32
return vcltq_f32(v1, v2);
// CHECK: fcmgt {{v[0-9]+}}.4s, v1.4s, v0.4s
}
uint8x16_t test_vcltq_u8(uint8x16_t v1, uint8x16_t v2) {
- // CHECK: test_vcltq_u8
+ // CHECK-LABEL: test_vcltq_u8
return vcltq_u8(v1, v2);
// CHECK: cmhi {{v[0-9]+}}.16b, v1.16b, v0.16b
}
uint16x8_t test_vcltq_u16(uint16x8_t v1, uint16x8_t v2) {
- // CHECK: test_vcltq_u16
+ // CHECK-LABEL: test_vcltq_u16
return vcltq_u16(v1, v2);
// CHECK: cmhi {{v[0-9]+}}.8h, v1.8h, v0.8h
}
uint32x4_t test_vcltq_u32(uint32x4_t v1, uint32x4_t v2) {
- // CHECK: test_vcltq_u32
+ // CHECK-LABEL: test_vcltq_u32
return vcltq_u32(v1, v2);
// CHECK: cmhi {{v[0-9]+}}.4s, v1.4s, v0.4s
}
uint64x2_t test_vcltq_s64(int64x2_t v1, int64x2_t v2) {
- // CHECK: test_vcltq_s64
+ // CHECK-LABEL: test_vcltq_s64
return vcltq_s64(v1, v2);
// CHECK: cmgt {{v[0-9]+}}.2d, v1.2d, v0.2d
}
uint64x2_t test_vcltq_u64(uint64x2_t v1, uint64x2_t v2) {
- // CHECK: test_vcltq_u64
+ // CHECK-LABEL: test_vcltq_u64
return vcltq_u64(v1, v2);
// CHECK: cmhi {{v[0-9]+}}.2d, v1.2d, v0.2d
}
uint64x2_t test_vcltq_f64(float64x2_t v1, float64x2_t v2) {
- // CHECK: test_vcltq_f64
+ // CHECK-LABEL: test_vcltq_f64
return vcltq_f64(v1, v2);
// CHECK: fcmgt {{v[0-9]+}}.2d, v1.2d, v0.2d
}
int8x8_t test_vhadd_s8(int8x8_t v1, int8x8_t v2) {
-// CHECK: test_vhadd_s8
+// CHECK-LABEL: test_vhadd_s8
return vhadd_s8(v1, v2);
// CHECK: shadd {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int16x4_t test_vhadd_s16(int16x4_t v1, int16x4_t v2) {
-// CHECK: test_vhadd_s16
+// CHECK-LABEL: test_vhadd_s16
return vhadd_s16(v1, v2);
// CHECK: shadd {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2_t test_vhadd_s32(int32x2_t v1, int32x2_t v2) {
-// CHECK: test_vhadd_s32
+// CHECK-LABEL: test_vhadd_s32
return vhadd_s32(v1, v2);
// CHECK: shadd {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint8x8_t test_vhadd_u8(uint8x8_t v1, uint8x8_t v2) {
-// CHECK: test_vhadd_u8
+// CHECK-LABEL: test_vhadd_u8
return vhadd_u8(v1, v2);
// CHECK: uhadd {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vhadd_u16(uint16x4_t v1, uint16x4_t v2) {
-// CHECK: test_vhadd_u16
+// CHECK-LABEL: test_vhadd_u16
return vhadd_u16(v1, v2);
// CHECK: uhadd {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vhadd_u32(uint32x2_t v1, uint32x2_t v2) {
-// CHECK: test_vhadd_u32
+// CHECK-LABEL: test_vhadd_u32
return vhadd_u32(v1, v2);
// CHECK: uhadd {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int8x16_t test_vhaddq_s8(int8x16_t v1, int8x16_t v2) {
-// CHECK: test_vhaddq_s8
+// CHECK-LABEL: test_vhaddq_s8
return vhaddq_s8(v1, v2);
// CHECK: shadd {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8_t test_vhaddq_s16(int16x8_t v1, int16x8_t v2) {
-// CHECK: test_vhaddq_s16
+// CHECK-LABEL: test_vhaddq_s16
return vhaddq_s16(v1, v2);
// CHECK: shadd {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4_t test_vhaddq_s32(int32x4_t v1, int32x4_t v2) {
-// CHECK: test_vhaddq_s32
+// CHECK-LABEL: test_vhaddq_s32
return vhaddq_s32(v1, v2);
// CHECK: shadd {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint8x16_t test_vhaddq_u8(uint8x16_t v1, uint8x16_t v2) {
-// CHECK: test_vhaddq_u8
+// CHECK-LABEL: test_vhaddq_u8
return vhaddq_u8(v1, v2);
// CHECK: uhadd {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vhaddq_u16(uint16x8_t v1, uint16x8_t v2) {
-// CHECK: test_vhaddq_u16
+// CHECK-LABEL: test_vhaddq_u16
return vhaddq_u16(v1, v2);
// CHECK: uhadd {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vhaddq_u32(uint32x4_t v1, uint32x4_t v2) {
-// CHECK: test_vhaddq_u32
+// CHECK-LABEL: test_vhaddq_u32
return vhaddq_u32(v1, v2);
// CHECK: uhadd {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int8x8_t test_vhsub_s8(int8x8_t v1, int8x8_t v2) {
-// CHECK: test_vhsub_s8
+// CHECK-LABEL: test_vhsub_s8
return vhsub_s8(v1, v2);
// CHECK: shsub {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int16x4_t test_vhsub_s16(int16x4_t v1, int16x4_t v2) {
-// CHECK: test_vhsub_s16
+// CHECK-LABEL: test_vhsub_s16
return vhsub_s16(v1, v2);
// CHECK: shsub {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2_t test_vhsub_s32(int32x2_t v1, int32x2_t v2) {
-// CHECK: test_vhsub_s32
+// CHECK-LABEL: test_vhsub_s32
return vhsub_s32(v1, v2);
// CHECK: shsub {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint8x8_t test_vhsub_u8(uint8x8_t v1, uint8x8_t v2) {
-// CHECK: test_vhsub_u8
+// CHECK-LABEL: test_vhsub_u8
return vhsub_u8(v1, v2);
// CHECK: uhsub {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vhsub_u16(uint16x4_t v1, uint16x4_t v2) {
-// CHECK: test_vhsub_u16
+// CHECK-LABEL: test_vhsub_u16
return vhsub_u16(v1, v2);
// CHECK: uhsub {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vhsub_u32(uint32x2_t v1, uint32x2_t v2) {
-// CHECK: test_vhsub_u32
+// CHECK-LABEL: test_vhsub_u32
return vhsub_u32(v1, v2);
// CHECK: uhsub {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int8x16_t test_vhsubq_s8(int8x16_t v1, int8x16_t v2) {
-// CHECK: test_vhsubq_s8
+// CHECK-LABEL: test_vhsubq_s8
return vhsubq_s8(v1, v2);
// CHECK: shsub {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8_t test_vhsubq_s16(int16x8_t v1, int16x8_t v2) {
-// CHECK: test_vhsubq_s16
+// CHECK-LABEL: test_vhsubq_s16
return vhsubq_s16(v1, v2);
// CHECK: shsub {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4_t test_vhsubq_s32(int32x4_t v1, int32x4_t v2) {
-// CHECK: test_vhsubq_s32
+// CHECK-LABEL: test_vhsubq_s32
return vhsubq_s32(v1, v2);
// CHECK: shsub {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint8x16_t test_vhsubq_u8(uint8x16_t v1, uint8x16_t v2) {
-// CHECK: test_vhsubq_u8
+// CHECK-LABEL: test_vhsubq_u8
return vhsubq_u8(v1, v2);
// CHECK: uhsub {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vhsubq_u16(uint16x8_t v1, uint16x8_t v2) {
-// CHECK: test_vhsubq_u16
+// CHECK-LABEL: test_vhsubq_u16
return vhsubq_u16(v1, v2);
// CHECK: uhsub {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vhsubq_u32(uint32x4_t v1, uint32x4_t v2) {
-// CHECK: test_vhsubq_u32
+// CHECK-LABEL: test_vhsubq_u32
return vhsubq_u32(v1, v2);
// CHECK: uhsub {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int8x8_t test_vrhadd_s8(int8x8_t v1, int8x8_t v2) {
-// CHECK: test_vrhadd_s8
+// CHECK-LABEL: test_vrhadd_s8
return vrhadd_s8(v1, v2);
// CHECK: srhadd {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int16x4_t test_vrhadd_s16(int16x4_t v1, int16x4_t v2) {
-// CHECK: test_vrhadd_s16
+// CHECK-LABEL: test_vrhadd_s16
return vrhadd_s16(v1, v2);
// CHECK: srhadd {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2_t test_vrhadd_s32(int32x2_t v1, int32x2_t v2) {
-// CHECK: test_vrhadd_s32
+// CHECK-LABEL: test_vrhadd_s32
return vrhadd_s32(v1, v2);
// CHECK: srhadd {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint8x8_t test_vrhadd_u8(uint8x8_t v1, uint8x8_t v2) {
-// CHECK: test_vrhadd_u8
+// CHECK-LABEL: test_vrhadd_u8
return vrhadd_u8(v1, v2);
// CHECK: urhadd {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vrhadd_u16(uint16x4_t v1, uint16x4_t v2) {
-// CHECK: test_vrhadd_u16
+// CHECK-LABEL: test_vrhadd_u16
return vrhadd_u16(v1, v2);
// CHECK: urhadd {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vrhadd_u32(uint32x2_t v1, uint32x2_t v2) {
-// CHECK: test_vrhadd_u32
+// CHECK-LABEL: test_vrhadd_u32
return vrhadd_u32(v1, v2);
// CHECK: urhadd {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int8x16_t test_vrhaddq_s8(int8x16_t v1, int8x16_t v2) {
-// CHECK: test_vrhaddq_s8
+// CHECK-LABEL: test_vrhaddq_s8
return vrhaddq_s8(v1, v2);
// CHECK: srhadd {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8_t test_vrhaddq_s16(int16x8_t v1, int16x8_t v2) {
-// CHECK: test_vrhaddq_s16
+// CHECK-LABEL: test_vrhaddq_s16
return vrhaddq_s16(v1, v2);
// CHECK: srhadd {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4_t test_vrhaddq_s32(int32x4_t v1, int32x4_t v2) {
-// CHECK: test_vrhaddq_s32
+// CHECK-LABEL: test_vrhaddq_s32
return vrhaddq_s32(v1, v2);
// CHECK: srhadd {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint8x16_t test_vrhaddq_u8(uint8x16_t v1, uint8x16_t v2) {
-// CHECK: test_vrhaddq_u8
+// CHECK-LABEL: test_vrhaddq_u8
return vrhaddq_u8(v1, v2);
// CHECK: urhadd {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vrhaddq_u16(uint16x8_t v1, uint16x8_t v2) {
-// CHECK: test_vrhaddq_u16
+// CHECK-LABEL: test_vrhaddq_u16
return vrhaddq_u16(v1, v2);
// CHECK: urhadd {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vrhaddq_u32(uint32x4_t v1, uint32x4_t v2) {
-// CHECK: test_vrhaddq_u32
+// CHECK-LABEL: test_vrhaddq_u32
return vrhaddq_u32(v1, v2);
// CHECK: urhadd {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int8x8_t test_vqadd_s8(int8x8_t a, int8x8_t b) {
-// CHECK: test_vqadd_s8
+// CHECK-LABEL: test_vqadd_s8
return vqadd_s8(a, b);
// CHECK: sqadd {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int16x4_t test_vqadd_s16(int16x4_t a, int16x4_t b) {
-// CHECK: test_vqadd_s16
+// CHECK-LABEL: test_vqadd_s16
return vqadd_s16(a, b);
// CHECK: sqadd {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2_t test_vqadd_s32(int32x2_t a, int32x2_t b) {
-// CHECK: test_vqadd_s32
+// CHECK-LABEL: test_vqadd_s32
return vqadd_s32(a, b);
// CHECK: sqadd {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int64x1_t test_vqadd_s64(int64x1_t a, int64x1_t b) {
-// CHECK: test_vqadd_s64
+// CHECK-LABEL: test_vqadd_s64
return vqadd_s64(a, b);
// CHECK: sqadd {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint8x8_t test_vqadd_u8(uint8x8_t a, uint8x8_t b) {
-// CHECK: test_vqadd_u8
+// CHECK-LABEL: test_vqadd_u8
return vqadd_u8(a, b);
// CHECK: uqadd {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vqadd_u16(uint16x4_t a, uint16x4_t b) {
-// CHECK: test_vqadd_u16
+// CHECK-LABEL: test_vqadd_u16
return vqadd_u16(a, b);
// CHECK: uqadd {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vqadd_u32(uint32x2_t a, uint32x2_t b) {
-// CHECK: test_vqadd_u32
+// CHECK-LABEL: test_vqadd_u32
return vqadd_u32(a, b);
// CHECK: uqadd {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
@@ -2008,3764 +2019,3793 @@ uint64x1_t test_vqadd_u64(uint64x1_t a, uint64x1_t b) {
}
int8x16_t test_vqaddq_s8(int8x16_t a, int8x16_t b) {
-// CHECK: test_vqaddq_s8
+// CHECK-LABEL: test_vqaddq_s8
return vqaddq_s8(a, b);
// CHECK: sqadd {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8_t test_vqaddq_s16(int16x8_t a, int16x8_t b) {
-// CHECK: test_vqaddq_s16
+// CHECK-LABEL: test_vqaddq_s16
return vqaddq_s16(a, b);
// CHECK: sqadd {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4_t test_vqaddq_s32(int32x4_t a, int32x4_t b) {
-// CHECK: test_vqaddq_s32
+// CHECK-LABEL: test_vqaddq_s32
return vqaddq_s32(a, b);
// CHECK: sqadd {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int64x2_t test_vqaddq_s64(int64x2_t a, int64x2_t b) {
-// CHECK: test_vqaddq_s64
+// CHECK-LABEL: test_vqaddq_s64
return vqaddq_s64(a, b);
// CHECK: sqadd {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint8x16_t test_vqaddq_u8(uint8x16_t a, uint8x16_t b) {
-// CHECK: test_vqaddq_u8
+// CHECK-LABEL: test_vqaddq_u8
return vqaddq_u8(a, b);
// CHECK: uqadd {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vqaddq_u16(uint16x8_t a, uint16x8_t b) {
-// CHECK: test_vqaddq_u16
+// CHECK-LABEL: test_vqaddq_u16
return vqaddq_u16(a, b);
// CHECK: uqadd {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vqaddq_u32(uint32x4_t a, uint32x4_t b) {
-// CHECK: test_vqaddq_u32
+// CHECK-LABEL: test_vqaddq_u32
return vqaddq_u32(a, b);
// CHECK: uqadd {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint64x2_t test_vqaddq_u64(uint64x2_t a, uint64x2_t b) {
-// CHECK: test_vqaddq_u64
+// CHECK-LABEL: test_vqaddq_u64
return vqaddq_u64(a, b);
// CHECK: uqadd {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
int8x8_t test_vqsub_s8(int8x8_t a, int8x8_t b) {
-// CHECK: test_vqsub_s8
+// CHECK-LABEL: test_vqsub_s8
return vqsub_s8(a, b);
// CHECK: sqsub {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int16x4_t test_vqsub_s16(int16x4_t a, int16x4_t b) {
-// CHECK: test_vqsub_s16
+// CHECK-LABEL: test_vqsub_s16
return vqsub_s16(a, b);
// CHECK: sqsub {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2_t test_vqsub_s32(int32x2_t a, int32x2_t b) {
-// CHECK: test_vqsub_s32
+// CHECK-LABEL: test_vqsub_s32
return vqsub_s32(a, b);
// CHECK: sqsub {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int64x1_t test_vqsub_s64(int64x1_t a, int64x1_t b) {
-// CHECK: test_vqsub_s64
+// CHECK-LABEL: test_vqsub_s64
return vqsub_s64(a, b);
// CHECK: sqsub {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint8x8_t test_vqsub_u8(uint8x8_t a, uint8x8_t b) {
-// CHECK: test_vqsub_u8
+// CHECK-LABEL: test_vqsub_u8
return vqsub_u8(a, b);
// CHECK: uqsub {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vqsub_u16(uint16x4_t a, uint16x4_t b) {
-// CHECK: test_vqsub_u16
+// CHECK-LABEL: test_vqsub_u16
return vqsub_u16(a, b);
// CHECK: uqsub {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vqsub_u32(uint32x2_t a, uint32x2_t b) {
-// CHECK: test_vqsub_u32
+// CHECK-LABEL: test_vqsub_u32
return vqsub_u32(a, b);
// CHECK: uqsub {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint64x1_t test_vqsub_u64(uint64x1_t a, uint64x1_t b) {
-// CHECK: test_vqsub_u64
+// CHECK-LABEL: test_vqsub_u64
return vqsub_u64(a, b);
// CHECK: uqsub {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
int8x16_t test_vqsubq_s8(int8x16_t a, int8x16_t b) {
-// CHECK: test_vqsubq_s8
+// CHECK-LABEL: test_vqsubq_s8
return vqsubq_s8(a, b);
// CHECK: sqsub {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8_t test_vqsubq_s16(int16x8_t a, int16x8_t b) {
-// CHECK: test_vqsubq_s16
+// CHECK-LABEL: test_vqsubq_s16
return vqsubq_s16(a, b);
// CHECK: sqsub {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4_t test_vqsubq_s32(int32x4_t a, int32x4_t b) {
-// CHECK: test_vqsubq_s32
+// CHECK-LABEL: test_vqsubq_s32
return vqsubq_s32(a, b);
// CHECK: sqsub {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int64x2_t test_vqsubq_s64(int64x2_t a, int64x2_t b) {
-// CHECK: test_vqsubq_s64
+// CHECK-LABEL: test_vqsubq_s64
return vqsubq_s64(a, b);
// CHECK: sqsub {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint8x16_t test_vqsubq_u8(uint8x16_t a, uint8x16_t b) {
-// CHECK: test_vqsubq_u8
+// CHECK-LABEL: test_vqsubq_u8
return vqsubq_u8(a, b);
// CHECK: uqsub {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vqsubq_u16(uint16x8_t a, uint16x8_t b) {
-// CHECK: test_vqsubq_u16
+// CHECK-LABEL: test_vqsubq_u16
return vqsubq_u16(a, b);
// CHECK: uqsub {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vqsubq_u32(uint32x4_t a, uint32x4_t b) {
-// CHECK: test_vqsubq_u32
+// CHECK-LABEL: test_vqsubq_u32
return vqsubq_u32(a, b);
// CHECK: uqsub {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint64x2_t test_vqsubq_u64(uint64x2_t a, uint64x2_t b) {
-// CHECK: test_vqsubq_u64
+// CHECK-LABEL: test_vqsubq_u64
return vqsubq_u64(a, b);
// CHECK: uqsub {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
int8x8_t test_vshl_s8(int8x8_t a, int8x8_t b) {
-// CHECK: test_vshl_s8
+// CHECK-LABEL: test_vshl_s8
return vshl_s8(a, b);
// CHECK: sshl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int16x4_t test_vshl_s16(int16x4_t a, int16x4_t b) {
-// CHECK: test_vshl_s16
+// CHECK-LABEL: test_vshl_s16
return vshl_s16(a, b);
// CHECK: sshl {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2_t test_vshl_s32(int32x2_t a, int32x2_t b) {
-// CHECK: test_vshl_s32
+// CHECK-LABEL: test_vshl_s32
return vshl_s32(a, b);
// CHECK: sshl {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int64x1_t test_vshl_s64(int64x1_t a, int64x1_t b) {
-// CHECK: test_vshl_s64
+// CHECK-LABEL: test_vshl_s64
return vshl_s64(a, b);
// CHECK: sshl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint8x8_t test_vshl_u8(uint8x8_t a, int8x8_t b) {
-// CHECK: test_vshl_u8
+// CHECK-LABEL: test_vshl_u8
return vshl_u8(a, b);
// CHECK: ushl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vshl_u16(uint16x4_t a, int16x4_t b) {
-// CHECK: test_vshl_u16
+// CHECK-LABEL: test_vshl_u16
return vshl_u16(a, b);
// CHECK: ushl {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vshl_u32(uint32x2_t a, int32x2_t b) {
-// CHECK: test_vshl_u32
+// CHECK-LABEL: test_vshl_u32
return vshl_u32(a, b);
// CHECK: ushl {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint64x1_t test_vshl_u64(uint64x1_t a, int64x1_t b) {
-// CHECK: test_vshl_u64
+// CHECK-LABEL: test_vshl_u64
return vshl_u64(a, b);
// CHECK: ushl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
int8x16_t test_vshlq_s8(int8x16_t a, int8x16_t b) {
-// CHECK: test_vshlq_s8
+// CHECK-LABEL: test_vshlq_s8
return vshlq_s8(a, b);
// CHECK: sshl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8_t test_vshlq_s16(int16x8_t a, int16x8_t b) {
-// CHECK: test_vshlq_s16
+// CHECK-LABEL: test_vshlq_s16
return vshlq_s16(a, b);
// CHECK: sshl {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4_t test_vshlq_s32(int32x4_t a, int32x4_t b) {
-// CHECK: test_vshlq_s32
+// CHECK-LABEL: test_vshlq_s32
return vshlq_s32(a, b);
// CHECK: sshl {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int64x2_t test_vshlq_s64(int64x2_t a, int64x2_t b) {
-// CHECK: test_vshlq_s64
+// CHECK-LABEL: test_vshlq_s64
return vshlq_s64(a, b);
// CHECK: sshl {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint8x16_t test_vshlq_u8(uint8x16_t a, int8x16_t b) {
-// CHECK: test_vshlq_u8
+// CHECK-LABEL: test_vshlq_u8
return vshlq_u8(a, b);
// CHECK: ushl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vshlq_u16(uint16x8_t a, int16x8_t b) {
-// CHECK: test_vshlq_u16
+// CHECK-LABEL: test_vshlq_u16
return vshlq_u16(a, b);
// CHECK: ushl {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vshlq_u32(uint32x4_t a, int32x4_t b) {
-// CHECK: test_vshlq_u32
+// CHECK-LABEL: test_vshlq_u32
return vshlq_u32(a, b);
// CHECK: ushl {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint64x2_t test_vshlq_u64(uint64x2_t a, int64x2_t b) {
-// CHECK: test_vshlq_u64
+// CHECK-LABEL: test_vshlq_u64
return vshlq_u64(a, b);
// CHECK: ushl {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
int8x8_t test_vqshl_s8(int8x8_t a, int8x8_t b) {
-// CHECK: test_vqshl_s8
+// CHECK-LABEL: test_vqshl_s8
return vqshl_s8(a, b);
// CHECK: sqshl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int16x4_t test_vqshl_s16(int16x4_t a, int16x4_t b) {
-// CHECK: test_vqshl_s16
+// CHECK-LABEL: test_vqshl_s16
return vqshl_s16(a, b);
// CHECK: sqshl {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2_t test_vqshl_s32(int32x2_t a, int32x2_t b) {
-// CHECK: test_vqshl_s32
+// CHECK-LABEL: test_vqshl_s32
return vqshl_s32(a, b);
// CHECK: sqshl {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int64x1_t test_vqshl_s64(int64x1_t a, int64x1_t b) {
-// CHECK: test_vqshl_s64
+// CHECK-LABEL: test_vqshl_s64
return vqshl_s64(a, b);
// CHECK: sqshl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint8x8_t test_vqshl_u8(uint8x8_t a, int8x8_t b) {
-// CHECK: test_vqshl_u8
+// CHECK-LABEL: test_vqshl_u8
return vqshl_u8(a, b);
// CHECK: uqshl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vqshl_u16(uint16x4_t a, int16x4_t b) {
-// CHECK: test_vqshl_u16
+// CHECK-LABEL: test_vqshl_u16
return vqshl_u16(a, b);
// CHECK: uqshl {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vqshl_u32(uint32x2_t a, int32x2_t b) {
-// CHECK: test_vqshl_u32
+// CHECK-LABEL: test_vqshl_u32
return vqshl_u32(a, b);
// CHECK: uqshl {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint64x1_t test_vqshl_u64(uint64x1_t a, int64x1_t b) {
-// CHECK: test_vqshl_u64
+// CHECK-LABEL: test_vqshl_u64
return vqshl_u64(a, b);
// CHECK: uqshl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
int8x16_t test_vqshlq_s8(int8x16_t a, int8x16_t b) {
-// CHECK: test_vqshlq_s8
+// CHECK-LABEL: test_vqshlq_s8
return vqshlq_s8(a, b);
// CHECK: sqshl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8_t test_vqshlq_s16(int16x8_t a, int16x8_t b) {
-// CHECK: test_vqshlq_s16
+// CHECK-LABEL: test_vqshlq_s16
return vqshlq_s16(a, b);
// CHECK: sqshl {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4_t test_vqshlq_s32(int32x4_t a, int32x4_t b) {
-// CHECK: test_vqshlq_s32
+// CHECK-LABEL: test_vqshlq_s32
return vqshlq_s32(a, b);
// CHECK: sqshl {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int64x2_t test_vqshlq_s64(int64x2_t a, int64x2_t b) {
-// CHECK: test_vqshlq_s64
+// CHECK-LABEL: test_vqshlq_s64
return vqshlq_s64(a, b);
// CHECK: sqshl {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint8x16_t test_vqshlq_u8(uint8x16_t a, int8x16_t b) {
-// CHECK: test_vqshlq_u8
+// CHECK-LABEL: test_vqshlq_u8
return vqshlq_u8(a, b);
// CHECK: uqshl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vqshlq_u16(uint16x8_t a, int16x8_t b) {
-// CHECK: test_vqshlq_u16
+// CHECK-LABEL: test_vqshlq_u16
return vqshlq_u16(a, b);
// CHECK: uqshl {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vqshlq_u32(uint32x4_t a, int32x4_t b) {
-// CHECK: test_vqshlq_u32
+// CHECK-LABEL: test_vqshlq_u32
return vqshlq_u32(a, b);
// CHECK: uqshl {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint64x2_t test_vqshlq_u64(uint64x2_t a, int64x2_t b) {
-// CHECK: test_vqshlq_u32
+// CHECK-LABEL: test_vqshlq_u64
return vqshlq_u64(a, b);
// CHECK: uqshl {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
int8x8_t test_vrshl_s8(int8x8_t a, int8x8_t b) {
-// CHECK: test_vrshl_s8
+// CHECK-LABEL: test_vrshl_s8
return vrshl_s8(a, b);
// CHECK: srshl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int16x4_t test_vrshl_s16(int16x4_t a, int16x4_t b) {
-// CHECK: test_vrshl_s16
+// CHECK-LABEL: test_vrshl_s16
return vrshl_s16(a, b);
// CHECK: srshl {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2_t test_vrshl_s32(int32x2_t a, int32x2_t b) {
-// CHECK: test_vrshl_s32
+// CHECK-LABEL: test_vrshl_s32
return vrshl_s32(a, b);
// CHECK: srshl {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int64x1_t test_vrshl_s64(int64x1_t a, int64x1_t b) {
-// CHECK: test_vrshl_s64
+// CHECK-LABEL: test_vrshl_s64
return vrshl_s64(a, b);
// CHECK: srshl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint8x8_t test_vrshl_u8(uint8x8_t a, int8x8_t b) {
-// CHECK: test_vrshl_u8
+// CHECK-LABEL: test_vrshl_u8
return vrshl_u8(a, b);
// CHECK: urshl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vrshl_u16(uint16x4_t a, int16x4_t b) {
-// CHECK: test_vrshl_u16
+// CHECK-LABEL: test_vrshl_u16
return vrshl_u16(a, b);
// CHECK: urshl {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vrshl_u32(uint32x2_t a, int32x2_t b) {
-// CHECK: test_vrshl_u32
+// CHECK-LABEL: test_vrshl_u32
return vrshl_u32(a, b);
// CHECK: urshl {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint64x1_t test_vrshl_u64(uint64x1_t a, int64x1_t b) {
-// CHECK: test_vrshl_u64
+// CHECK-LABEL: test_vrshl_u64
return vrshl_u64(a, b);
// CHECK: urshl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
int8x16_t test_vrshlq_s8(int8x16_t a, int8x16_t b) {
-// CHECK: test_vrshlq_s8
+// CHECK-LABEL: test_vrshlq_s8
return vrshlq_s8(a, b);
// CHECK: srshl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8_t test_vrshlq_s16(int16x8_t a, int16x8_t b) {
-// CHECK: test_vrshlq_s16
+// CHECK-LABEL: test_vrshlq_s16
return vrshlq_s16(a, b);
// CHECK: srshl {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4_t test_vrshlq_s32(int32x4_t a, int32x4_t b) {
-// CHECK: test_vrshlq_s32
+// CHECK-LABEL: test_vrshlq_s32
return vrshlq_s32(a, b);
// CHECK: srshl {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int64x2_t test_vrshlq_s64(int64x2_t a, int64x2_t b) {
-// CHECK: test_vrshlq_s64
+// CHECK-LABEL: test_vrshlq_s64
return vrshlq_s64(a, b);
// CHECK: srshl {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint8x16_t test_vrshlq_u8(uint8x16_t a, int8x16_t b) {
-// CHECK: test_vrshlq_u8
+// CHECK-LABEL: test_vrshlq_u8
return vrshlq_u8(a, b);
// CHECK: urshl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vrshlq_u16(uint16x8_t a, int16x8_t b) {
-// CHECK: test_vrshlq_u16
+// CHECK-LABEL: test_vrshlq_u16
return vrshlq_u16(a, b);
// CHECK: urshl {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vrshlq_u32(uint32x4_t a, int32x4_t b) {
-// CHECK: test_vrshlq_u32
+// CHECK-LABEL: test_vrshlq_u32
return vrshlq_u32(a, b);
// CHECK: urshl {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint64x2_t test_vrshlq_u64(uint64x2_t a, int64x2_t b) {
-// CHECK: test_vrshlq_u64
+// CHECK-LABEL: test_vrshlq_u64
return vrshlq_u64(a, b);
// CHECK: urshl {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
int8x8_t test_vqrshl_s8(int8x8_t a, int8x8_t b) {
-// CHECK: test_vqrshl_s8
+// CHECK-LABEL: test_vqrshl_s8
return vqrshl_s8(a, b);
// CHECK: sqrshl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int16x4_t test_vqrshl_s16(int16x4_t a, int16x4_t b) {
-// CHECK: test_vqrshl_s16
+// CHECK-LABEL: test_vqrshl_s16
return vqrshl_s16(a, b);
// CHECK: sqrshl {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2_t test_vqrshl_s32(int32x2_t a, int32x2_t b) {
-// CHECK: test_vqrshl_s32
+// CHECK-LABEL: test_vqrshl_s32
return vqrshl_s32(a, b);
// CHECK: sqrshl {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int64x1_t test_vqrshl_s64(int64x1_t a, int64x1_t b) {
-// CHECK: test_vqrshl_s64
+// CHECK-LABEL: test_vqrshl_s64
return vqrshl_s64(a, b);
// CHECK: sqrshl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint8x8_t test_vqrshl_u8(uint8x8_t a, int8x8_t b) {
-// CHECK: test_vqrshl_u8
+// CHECK-LABEL: test_vqrshl_u8
return vqrshl_u8(a, b);
// CHECK: uqrshl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vqrshl_u16(uint16x4_t a, int16x4_t b) {
-// CHECK: test_vqrshl_u16
+// CHECK-LABEL: test_vqrshl_u16
return vqrshl_u16(a, b);
// CHECK: uqrshl {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vqrshl_u32(uint32x2_t a, int32x2_t b) {
-// CHECK: test_vqrshl_u32
+// CHECK-LABEL: test_vqrshl_u32
return vqrshl_u32(a, b);
// CHECK: uqrshl {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint64x1_t test_vqrshl_u64(uint64x1_t a, int64x1_t b) {
-// CHECK: test_vqrshl_u64
+// CHECK-LABEL: test_vqrshl_u64
return vqrshl_u64(a, b);
// CHECK: uqrshl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
int8x16_t test_vqrshlq_s8(int8x16_t a, int8x16_t b) {
-// CHECK: test_vqrshlq_s8
+// CHECK-LABEL: test_vqrshlq_s8
return vqrshlq_s8(a, b);
// CHECK: sqrshl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8_t test_vqrshlq_s16(int16x8_t a, int16x8_t b) {
-// CHECK: test_vqrshlq_s16
+// CHECK-LABEL: test_vqrshlq_s16
return vqrshlq_s16(a, b);
// CHECK: sqrshl {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4_t test_vqrshlq_s32(int32x4_t a, int32x4_t b) {
-// CHECK: test_vqrshlq_s32
+// CHECK-LABEL: test_vqrshlq_s32
return vqrshlq_s32(a, b);
// CHECK: sqrshl {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int64x2_t test_vqrshlq_s64(int64x2_t a, int64x2_t b) {
-// CHECK: test_vqrshlq_s64
+// CHECK-LABEL: test_vqrshlq_s64
return vqrshlq_s64(a, b);
// CHECK: sqrshl {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
-// CHECK: test_vqrshlq_u8
+// CHECK-LABEL: test_vqrshlq_u8
uint8x16_t test_vqrshlq_u8(uint8x16_t a, int8x16_t b) {
return vqrshlq_u8(a, b);
// CHECK: uqrshl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vqrshlq_u16(uint16x8_t a, int16x8_t b) {
-// CHECK: test_vqrshlq_u16
+// CHECK-LABEL: test_vqrshlq_u16
return vqrshlq_u16(a, b);
// CHECK: uqrshl {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vqrshlq_u32(uint32x4_t a, int32x4_t b) {
-// CHECK: test_vqrshlq_u32
+// CHECK-LABEL: test_vqrshlq_u32
return vqrshlq_u32(a, b);
// CHECK: uqrshl {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint64x2_t test_vqrshlq_u64(uint64x2_t a, int64x2_t b) {
-// CHECK: test_vqrshlq_u64
+// CHECK-LABEL: test_vqrshlq_u64
return vqrshlq_u64(a, b);
// CHECK: uqrshl {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
+poly64x1_t test_vsli_n_p64(poly64x1_t a, poly64x1_t b) {
+// CHECK-LABEL: test_vsli_n_p64
+ return vsli_n_p64(a, b, 0);
+// CHECK: sli {{d[0-9]+}}, {{d[0-9]+}}, #0
+}
+
+poly64x2_t test_vsliq_n_p64(poly64x2_t a, poly64x2_t b) {
+// CHECK-LABEL: test_vsliq_n_p64
+ return vsliq_n_p64(a, b, 0);
+// CHECK: sli {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #0
+}
+
int8x8_t test_vmax_s8(int8x8_t a, int8x8_t b) {
-// CHECK: test_vmax_s8
+// CHECK-LABEL: test_vmax_s8
return vmax_s8(a, b);
// CHECK: smax {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int16x4_t test_vmax_s16(int16x4_t a, int16x4_t b) {
-// CHECK: test_vmax_s16
+// CHECK-LABEL: test_vmax_s16
return vmax_s16(a, b);
// CHECK: smax {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2_t test_vmax_s32(int32x2_t a, int32x2_t b) {
-// CHECK: test_vmax_s32
+// CHECK-LABEL: test_vmax_s32
return vmax_s32(a, b);
// CHECK: smax {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint8x8_t test_vmax_u8(uint8x8_t a, uint8x8_t b) {
-// CHECK: test_vmax_u8
+// CHECK-LABEL: test_vmax_u8
return vmax_u8(a, b);
// CHECK: umax {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vmax_u16(uint16x4_t a, uint16x4_t b) {
-// CHECK: test_vmax_u16
+// CHECK-LABEL: test_vmax_u16
return vmax_u16(a, b);
// CHECK: umax {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vmax_u32(uint32x2_t a, uint32x2_t b) {
-// CHECK: test_vmax_u32
+// CHECK-LABEL: test_vmax_u32
return vmax_u32(a, b);
// CHECK: umax {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
float32x2_t test_vmax_f32(float32x2_t a, float32x2_t b) {
-// CHECK: test_vmax_f32
+// CHECK-LABEL: test_vmax_f32
return vmax_f32(a, b);
// CHECK: fmax {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int8x16_t test_vmaxq_s8(int8x16_t a, int8x16_t b) {
-// CHECK: test_vmaxq_s8
+// CHECK-LABEL: test_vmaxq_s8
return vmaxq_s8(a, b);
// CHECK: smax {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8_t test_vmaxq_s16(int16x8_t a, int16x8_t b) {
-// CHECK: test_vmaxq_s16
+// CHECK-LABEL: test_vmaxq_s16
return vmaxq_s16(a, b);
// CHECK: smax {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4_t test_vmaxq_s32(int32x4_t a, int32x4_t b) {
-// CHECK: test_vmaxq_s32
+// CHECK-LABEL: test_vmaxq_s32
return vmaxq_s32(a, b);
// CHECK: smax {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint8x16_t test_vmaxq_u8(uint8x16_t a, uint8x16_t b) {
-// CHECK: test_vmaxq_u8
+// CHECK-LABEL: test_vmaxq_u8
return vmaxq_u8(a, b);
// CHECK: umax {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vmaxq_u16(uint16x8_t a, uint16x8_t b) {
-// CHECK: test_vmaxq_u16
+// CHECK-LABEL: test_vmaxq_u16
return vmaxq_u16(a, b);
// CHECK: umax {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vmaxq_u32(uint32x4_t a, uint32x4_t b) {
-// CHECK: test_vmaxq_u32
+// CHECK-LABEL: test_vmaxq_u32
return vmaxq_u32(a, b);
// CHECK: umax {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float32x4_t test_vmaxq_f32(float32x4_t a, float32x4_t b) {
-// CHECK: test_vmaxq_f32
+// CHECK-LABEL: test_vmaxq_f32
return vmaxq_f32(a, b);
// CHECK: fmax {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vmaxq_f64(float64x2_t a, float64x2_t b) {
-// CHECK: test_vmaxq_f64
+// CHECK-LABEL: test_vmaxq_f64
return vmaxq_f64(a, b);
// CHECK: fmax {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
int8x8_t test_vmin_s8(int8x8_t a, int8x8_t b) {
-// CHECK: test_vmin_s8
+// CHECK-LABEL: test_vmin_s8
return vmin_s8(a, b);
// CHECK: smin {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int16x4_t test_vmin_s16(int16x4_t a, int16x4_t b) {
-// CHECK: test_vmin_s16
+// CHECK-LABEL: test_vmin_s16
return vmin_s16(a, b);
// CHECK: smin {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2_t test_vmin_s32(int32x2_t a, int32x2_t b) {
-// CHECK: test_vmin_s32
+// CHECK-LABEL: test_vmin_s32
return vmin_s32(a, b);
// CHECK: smin {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint8x8_t test_vmin_u8(uint8x8_t a, uint8x8_t b) {
-// CHECK: test_vmin_u8
+// CHECK-LABEL: test_vmin_u8
return vmin_u8(a, b);
// CHECK: umin {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vmin_u16(uint16x4_t a, uint16x4_t b) {
-// CHECK: test_vmin_u16
+// CHECK-LABEL: test_vmin_u16
return vmin_u16(a, b);
// CHECK: umin {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vmin_u32(uint32x2_t a, uint32x2_t b) {
-// CHECK: test_vmin_u32
+// CHECK-LABEL: test_vmin_u32
return vmin_u32(a, b);
// CHECK: umin {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
float32x2_t test_vmin_f32(float32x2_t a, float32x2_t b) {
-// CHECK: test_vmin_f32
+// CHECK-LABEL: test_vmin_f32
return vmin_f32(a, b);
// CHECK: fmin {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int8x16_t test_vminq_s8(int8x16_t a, int8x16_t b) {
-// CHECK: test_vminq_s8
+// CHECK-LABEL: test_vminq_s8
return vminq_s8(a, b);
// CHECK: smin {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8_t test_vminq_s16(int16x8_t a, int16x8_t b) {
-// CHECK: test_vminq_s16
+// CHECK-LABEL: test_vminq_s16
return vminq_s16(a, b);
// CHECK: smin {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4_t test_vminq_s32(int32x4_t a, int32x4_t b) {
-// CHECK: test_vminq_s32
+// CHECK-LABEL: test_vminq_s32
return vminq_s32(a, b);
// CHECK: smin {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint8x16_t test_vminq_u8(uint8x16_t a, uint8x16_t b) {
-// CHECK: test_vminq_u8
+// CHECK-LABEL: test_vminq_u8
return vminq_u8(a, b);
// CHECK: umin {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vminq_u16(uint16x8_t a, uint16x8_t b) {
-// CHECK: test_vminq_u16
+// CHECK-LABEL: test_vminq_u16
return vminq_u16(a, b);
// CHECK: umin {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vminq_u32(uint32x4_t a, uint32x4_t b) {
-// CHECK: test_vminq_u32
+// CHECK-LABEL: test_vminq_u32
return vminq_u32(a, b);
// CHECK: umin {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float32x4_t test_vminq_f32(float32x4_t a, float32x4_t b) {
-// CHECK: test_vminq_f32
+// CHECK-LABEL: test_vminq_f32
return vminq_f32(a, b);
// CHECK: fmin {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vminq_f64(float64x2_t a, float64x2_t b) {
-// CHECK: test_vminq_f64
+// CHECK-LABEL: test_vminq_f64
return vminq_f64(a, b);
// CHECK: fmin {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
float32x2_t test_vmaxnm_f32(float32x2_t a, float32x2_t b) {
-// CHECK: test_vmaxnm_f32
+// CHECK-LABEL: test_vmaxnm_f32
return vmaxnm_f32(a, b);
// CHECK: fmaxnm {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
float32x4_t test_vmaxnmq_f32(float32x4_t a, float32x4_t b) {
-// CHECK: test_vmaxnmq_f32
+// CHECK-LABEL: test_vmaxnmq_f32
return vmaxnmq_f32(a, b);
// CHECK: fmaxnm {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vmaxnmq_f64(float64x2_t a, float64x2_t b) {
-// CHECK: test_vmaxnmq_f64
+// CHECK-LABEL: test_vmaxnmq_f64
return vmaxnmq_f64(a, b);
// CHECK: fmaxnm {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
float32x2_t test_vminnm_f32(float32x2_t a, float32x2_t b) {
-// CHECK: test_vminnm_f32
+// CHECK-LABEL: test_vminnm_f32
return vminnm_f32(a, b);
// CHECK: fminnm {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
float32x4_t test_vminnmq_f32(float32x4_t a, float32x4_t b) {
-// CHECK: test_vminnmq_f32
+// CHECK-LABEL: test_vminnmq_f32
return vminnmq_f32(a, b);
// CHECK: fminnm {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vminnmq_f64(float64x2_t a, float64x2_t b) {
-// CHECK: test_vminnmq_f64
+// CHECK-LABEL: test_vminnmq_f64
return vminnmq_f64(a, b);
// CHECK: fminnm {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
int8x8_t test_vpmax_s8(int8x8_t a, int8x8_t b) {
-// CHECK: test_vpmax_s8
+// CHECK-LABEL: test_vpmax_s8
return vpmax_s8(a, b);
// CHECK: smaxp {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int16x4_t test_vpmax_s16(int16x4_t a, int16x4_t b) {
-// CHECK: test_vpmax_s16
+// CHECK-LABEL: test_vpmax_s16
return vpmax_s16(a, b);
// CHECK: smaxp {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2_t test_vpmax_s32(int32x2_t a, int32x2_t b) {
-// CHECK: test_vpmax_s32
+// CHECK-LABEL: test_vpmax_s32
return vpmax_s32(a, b);
// CHECK: smaxp {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint8x8_t test_vpmax_u8(uint8x8_t a, uint8x8_t b) {
-// CHECK: test_vpmax_u8
+// CHECK-LABEL: test_vpmax_u8
return vpmax_u8(a, b);
// CHECK: umaxp {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vpmax_u16(uint16x4_t a, uint16x4_t b) {
-// CHECK: test_vpmax_u16
+// CHECK-LABEL: test_vpmax_u16
return vpmax_u16(a, b);
// CHECK: umaxp {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vpmax_u32(uint32x2_t a, uint32x2_t b) {
-// CHECK: test_vpmax_u32
+// CHECK-LABEL: test_vpmax_u32
return vpmax_u32(a, b);
// CHECK: umaxp {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
float32x2_t test_vpmax_f32(float32x2_t a, float32x2_t b) {
-// CHECK: test_vpmax_f32
+// CHECK-LABEL: test_vpmax_f32
return vpmax_f32(a, b);
// CHECK: fmaxp {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int8x16_t test_vpmaxq_s8(int8x16_t a, int8x16_t b) {
-// CHECK: test_vpmaxq_s8
+// CHECK-LABEL: test_vpmaxq_s8
return vpmaxq_s8(a, b);
// CHECK: smaxp {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8_t test_vpmaxq_s16(int16x8_t a, int16x8_t b) {
-// CHECK: test_vpmaxq_s16
+// CHECK-LABEL: test_vpmaxq_s16
return vpmaxq_s16(a, b);
// CHECK: smaxp {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4_t test_vpmaxq_s32(int32x4_t a, int32x4_t b) {
-// CHECK: test_vpmaxq_s32
+// CHECK-LABEL: test_vpmaxq_s32
return vpmaxq_s32(a, b);
// CHECK: smaxp {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint8x16_t test_vpmaxq_u8(uint8x16_t a, uint8x16_t b) {
-// CHECK: test_vpmaxq_u8
+// CHECK-LABEL: test_vpmaxq_u8
return vpmaxq_u8(a, b);
// CHECK: umaxp {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vpmaxq_u16(uint16x8_t a, uint16x8_t b) {
-// CHECK: test_vpmaxq_u16
+// CHECK-LABEL: test_vpmaxq_u16
return vpmaxq_u16(a, b);
// CHECK: umaxp {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vpmaxq_u32(uint32x4_t a, uint32x4_t b) {
-// CHECK: test_vpmaxq_u32
+// CHECK-LABEL: test_vpmaxq_u32
return vpmaxq_u32(a, b);
// CHECK: umaxp {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float32x4_t test_vpmaxq_f32(float32x4_t a, float32x4_t b) {
-// CHECK: test_vpmaxq_f32
+// CHECK-LABEL: test_vpmaxq_f32
return vpmaxq_f32(a, b);
// CHECK: fmaxp {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vpmaxq_f64(float64x2_t a, float64x2_t b) {
-// CHECK: test_vpmaxq_f64
+// CHECK-LABEL: test_vpmaxq_f64
return vpmaxq_f64(a, b);
// CHECK: fmaxp {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
int8x8_t test_vpmin_s8(int8x8_t a, int8x8_t b) {
-// CHECK: test_vpmin_s8
+// CHECK-LABEL: test_vpmin_s8
return vpmin_s8(a, b);
// CHECK: sminp {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int16x4_t test_vpmin_s16(int16x4_t a, int16x4_t b) {
-// CHECK: test_vpmin_s16
+// CHECK-LABEL: test_vpmin_s16
return vpmin_s16(a, b);
// CHECK: sminp {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2_t test_vpmin_s32(int32x2_t a, int32x2_t b) {
-// CHECK: test_vpmin_s32
+// CHECK-LABEL: test_vpmin_s32
return vpmin_s32(a, b);
// CHECK: sminp {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint8x8_t test_vpmin_u8(uint8x8_t a, uint8x8_t b) {
-// CHECK: test_vpmin_u8
+// CHECK-LABEL: test_vpmin_u8
return vpmin_u8(a, b);
// CHECK: uminp {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vpmin_u16(uint16x4_t a, uint16x4_t b) {
-// CHECK: test_vpmin_u16
+// CHECK-LABEL: test_vpmin_u16
return vpmin_u16(a, b);
// CHECK: uminp {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vpmin_u32(uint32x2_t a, uint32x2_t b) {
-// CHECK: test_vpmin_u32
+// CHECK-LABEL: test_vpmin_u32
return vpmin_u32(a, b);
// CHECK: uminp {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
float32x2_t test_vpmin_f32(float32x2_t a, float32x2_t b) {
-// CHECK: test_vpmin_f32
+// CHECK-LABEL: test_vpmin_f32
return vpmin_f32(a, b);
// CHECK: fminp {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int8x16_t test_vpminq_s8(int8x16_t a, int8x16_t b) {
-// CHECK: test_vpminq_s8
+// CHECK-LABEL: test_vpminq_s8
return vpminq_s8(a, b);
// CHECK: sminp {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8_t test_vpminq_s16(int16x8_t a, int16x8_t b) {
-// CHECK: test_vpminq_s16
+// CHECK-LABEL: test_vpminq_s16
return vpminq_s16(a, b);
// CHECK: sminp {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4_t test_vpminq_s32(int32x4_t a, int32x4_t b) {
-// CHECK: test_vpminq_s32
+// CHECK-LABEL: test_vpminq_s32
return vpminq_s32(a, b);
// CHECK: sminp {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint8x16_t test_vpminq_u8(uint8x16_t a, uint8x16_t b) {
-// CHECK: test_vpminq_u8
+// CHECK-LABEL: test_vpminq_u8
return vpminq_u8(a, b);
// CHECK: uminp {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vpminq_u16(uint16x8_t a, uint16x8_t b) {
-// CHECK: test_vpminq_u16
+// CHECK-LABEL: test_vpminq_u16
return vpminq_u16(a, b);
// CHECK: uminp {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vpminq_u32(uint32x4_t a, uint32x4_t b) {
-// CHECK: test_vpminq_u32
+// CHECK-LABEL: test_vpminq_u32
return vpminq_u32(a, b);
// CHECK: uminp {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float32x4_t test_vpminq_f32(float32x4_t a, float32x4_t b) {
-// CHECK: test_vpminq_f32
+// CHECK-LABEL: test_vpminq_f32
return vpminq_f32(a, b);
// CHECK: fminp {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vpminq_f64(float64x2_t a, float64x2_t b) {
-// CHECK: test_vpminq_f64
+// CHECK-LABEL: test_vpminq_f64
return vpminq_f64(a, b);
// CHECK: fminp {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
float32x2_t test_vpmaxnm_f32(float32x2_t a, float32x2_t b) {
-// CHECK: test_vpmaxnm_f32
+// CHECK-LABEL: test_vpmaxnm_f32
return vpmaxnm_f32(a, b);
// CHECK: fmaxnmp {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
float32x4_t test_vpmaxnmq_f32(float32x4_t a, float32x4_t b) {
-// CHECK: test_vpmaxnmq_f32
+// CHECK-LABEL: test_vpmaxnmq_f32
return vpmaxnmq_f32(a, b);
// CHECK: fmaxnmp {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vpmaxnmq_f64(float64x2_t a, float64x2_t b) {
-// CHECK: test_vpmaxnmq_f64
+// CHECK-LABEL: test_vpmaxnmq_f64
return vpmaxnmq_f64(a, b);
// CHECK: fmaxnmp {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
float32x2_t test_vpminnm_f32(float32x2_t a, float32x2_t b) {
-// CHECK: test_vpminnm_f32
+// CHECK-LABEL: test_vpminnm_f32
return vpminnm_f32(a, b);
// CHECK: fminnmp {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
float32x4_t test_vpminnmq_f32(float32x4_t a, float32x4_t b) {
-// CHECK: test_vpminnmq_f32
+// CHECK-LABEL: test_vpminnmq_f32
return vpminnmq_f32(a, b);
// CHECK: fminnmp {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vpminnmq_f64(float64x2_t a, float64x2_t b) {
-// CHECK: test_vpminnmq_f64
+// CHECK-LABEL: test_vpminnmq_f64
return vpminnmq_f64(a, b);
// CHECK: fminnmp {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
int8x8_t test_vpadd_s8(int8x8_t a, int8x8_t b) {
-// CHECK: test_vpadd_s8
+// CHECK-LABEL: test_vpadd_s8
return vpadd_s8(a, b);
// CHECK: addp {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int16x4_t test_vpadd_s16(int16x4_t a, int16x4_t b) {
-// CHECK: test_vpadd_s16
+// CHECK-LABEL: test_vpadd_s16
return vpadd_s16(a, b);
// CHECK: addp {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2_t test_vpadd_s32(int32x2_t a, int32x2_t b) {
-// CHECK: test_vpadd_s32
+// CHECK-LABEL: test_vpadd_s32
return vpadd_s32(a, b);
// CHECK: addp {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint8x8_t test_vpadd_u8(uint8x8_t a, uint8x8_t b) {
-// CHECK: test_vpadd_u8
+// CHECK-LABEL: test_vpadd_u8
return vpadd_u8(a, b);
// CHECK: addp {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4_t test_vpadd_u16(uint16x4_t a, uint16x4_t b) {
-// CHECK: test_vpadd_u16
+// CHECK-LABEL: test_vpadd_u16
return vpadd_u16(a, b);
// CHECK: addp {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2_t test_vpadd_u32(uint32x2_t a, uint32x2_t b) {
-// CHECK: test_vpadd_u32
+// CHECK-LABEL: test_vpadd_u32
return vpadd_u32(a, b);
// CHECK: addp {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
float32x2_t test_vpadd_f32(float32x2_t a, float32x2_t b) {
-// CHECK: test_vpadd_f32
+// CHECK-LABEL: test_vpadd_f32
return vpadd_f32(a, b);
// CHECK: faddp {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int8x16_t test_vpaddq_s8(int8x16_t a, int8x16_t b) {
-// CHECK: test_vpaddq_s8
+// CHECK-LABEL: test_vpaddq_s8
return vpaddq_s8(a, b);
// CHECK: addp {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8_t test_vpaddq_s16(int16x8_t a, int16x8_t b) {
-// CHECK: test_vpaddq_s16
+// CHECK-LABEL: test_vpaddq_s16
return vpaddq_s16(a, b);
// CHECK: addp {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4_t test_vpaddq_s32(int32x4_t a, int32x4_t b) {
-// CHECK: test_vpaddq_s32
+// CHECK-LABEL: test_vpaddq_s32
return vpaddq_s32(a, b);
// CHECK: addp {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint8x16_t test_vpaddq_u8(uint8x16_t a, uint8x16_t b) {
-// CHECK: test_vpaddq_u8
+// CHECK-LABEL: test_vpaddq_u8
return vpaddq_u8(a, b);
// CHECK: addp {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8_t test_vpaddq_u16(uint16x8_t a, uint16x8_t b) {
-// CHECK: test_vpaddq_u16
+// CHECK-LABEL: test_vpaddq_u16
return vpaddq_u16(a, b);
// CHECK: addp {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4_t test_vpaddq_u32(uint32x4_t a, uint32x4_t b) {
-// CHECK: test_vpaddq_u32
+// CHECK-LABEL: test_vpaddq_u32
return vpaddq_u32(a, b);
// CHECK: addp {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float32x4_t test_vpaddq_f32(float32x4_t a, float32x4_t b) {
-// CHECK: test_vpaddq_f32
+// CHECK-LABEL: test_vpaddq_f32
return vpaddq_f32(a, b);
// CHECK: faddp {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vpaddq_f64(float64x2_t a, float64x2_t b) {
-// CHECK: test_vpaddq_f64
+// CHECK-LABEL: test_vpaddq_f64
return vpaddq_f64(a, b);
// CHECK: faddp {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
int16x4_t test_vqdmulh_s16(int16x4_t a, int16x4_t b) {
-// CHECK: test_vqdmulh_s16
+// CHECK-LABEL: test_vqdmulh_s16
return vqdmulh_s16(a, b);
// CHECK: sqdmulh {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2_t test_vqdmulh_s32(int32x2_t a, int32x2_t b) {
-// CHECK: test_vqdmulh_s32
+// CHECK-LABEL: test_vqdmulh_s32
return vqdmulh_s32(a, b);
// CHECK: sqdmulh {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int16x8_t test_vqdmulhq_s16(int16x8_t a, int16x8_t b) {
-// CHECK: test_vqdmulhq_s16
+// CHECK-LABEL: test_vqdmulhq_s16
return vqdmulhq_s16(a, b);
// CHECK: sqdmulh {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4_t test_vqdmulhq_s32(int32x4_t a, int32x4_t b) {
-// CHECK: test_vqdmulhq_s32
+// CHECK-LABEL: test_vqdmulhq_s32
return vqdmulhq_s32(a, b);
// CHECK: sqdmulh {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int16x4_t test_vqrdmulh_s16(int16x4_t a, int16x4_t b) {
-// CHECK: test_vqrdmulh_s16
+// CHECK-LABEL: test_vqrdmulh_s16
return vqrdmulh_s16(a, b);
// CHECK: sqrdmulh {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2_t test_vqrdmulh_s32(int32x2_t a, int32x2_t b) {
-// CHECK: test_vqrdmulh_s32
+// CHECK-LABEL: test_vqrdmulh_s32
return vqrdmulh_s32(a, b);
// CHECK: sqrdmulh {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int16x8_t test_vqrdmulhq_s16(int16x8_t a, int16x8_t b) {
-// CHECK: test_vqrdmulhq_s16
+// CHECK-LABEL: test_vqrdmulhq_s16
return vqrdmulhq_s16(a, b);
// CHECK: sqrdmulh {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4_t test_vqrdmulhq_s32(int32x4_t a, int32x4_t b) {
-// CHECK: test_vqrdmulhq_s32
+// CHECK-LABEL: test_vqrdmulhq_s32
return vqrdmulhq_s32(a, b);
// CHECK: sqrdmulh {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
-
float32x2_t test_vmulx_f32(float32x2_t a, float32x2_t b) {
-// CHECK: test_vmulx_f32
+// CHECK-LABEL: test_vmulx_f32
return vmulx_f32(a, b);
// CHECK: fmulx {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
float32x4_t test_vmulxq_f32(float32x4_t a, float32x4_t b) {
-// CHECK: test_vmulxq_f32
+// CHECK-LABEL: test_vmulxq_f32
return vmulxq_f32(a, b);
// CHECK: fmulx {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vmulxq_f64(float64x2_t a, float64x2_t b) {
-// CHECK: test_vmulxq_f64
+// CHECK-LABEL: test_vmulxq_f64
return vmulxq_f64(a, b);
// CHECK: fmulx {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
int8x8_t test_vshl_n_s8(int8x8_t a) {
-// CHECK: test_vshl_n_s8
+// CHECK-LABEL: test_vshl_n_s8
return vshl_n_s8(a, 3);
// CHECK: shl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #3
}
int16x4_t test_vshl_n_s16(int16x4_t a) {
-// CHECK: test_vshl_n_s16
+// CHECK-LABEL: test_vshl_n_s16
return vshl_n_s16(a, 3);
// CHECK: shl {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #3
}
int32x2_t test_vshl_n_s32(int32x2_t a) {
-// CHECK: test_vshl_n_s32
+// CHECK-LABEL: test_vshl_n_s32
return vshl_n_s32(a, 3);
// CHECK: shl {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #3
}
int8x16_t test_vshlq_n_s8(int8x16_t a) {
-// CHECK: test_vshlq_n_s8
+// CHECK-LABEL: test_vshlq_n_s8
return vshlq_n_s8(a, 3);
// CHECK: shl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #3
}
int16x8_t test_vshlq_n_s16(int16x8_t a) {
-// CHECK: test_vshlq_n_s16
+// CHECK-LABEL: test_vshlq_n_s16
return vshlq_n_s16(a, 3);
// CHECK: shl {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #3
}
int32x4_t test_vshlq_n_s32(int32x4_t a) {
-// CHECK: test_vshlq_n_s32
+// CHECK-LABEL: test_vshlq_n_s32
return vshlq_n_s32(a, 3);
// CHECK: shl {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #3
}
int64x2_t test_vshlq_n_s64(int64x2_t a) {
-// CHECK: test_vshlq_n_s64
+// CHECK-LABEL: test_vshlq_n_s64
return vshlq_n_s64(a, 3);
// CHECK: shl {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #3
}
int8x8_t test_vshl_n_u8(int8x8_t a) {
-// CHECK: test_vshl_n_u8
+// CHECK-LABEL: test_vshl_n_u8
return vshl_n_u8(a, 3);
// CHECK: shl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #3
}
int16x4_t test_vshl_n_u16(int16x4_t a) {
-// CHECK: test_vshl_n_u16
+// CHECK-LABEL: test_vshl_n_u16
return vshl_n_u16(a, 3);
// CHECK: shl {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #3
}
int32x2_t test_vshl_n_u32(int32x2_t a) {
-// CHECK: test_vshl_n_u32
+// CHECK-LABEL: test_vshl_n_u32
return vshl_n_u32(a, 3);
// CHECK: shl {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #3
}
int8x16_t test_vshlq_n_u8(int8x16_t a) {
-// CHECK: test_vshlq_n_u8
+// CHECK-LABEL: test_vshlq_n_u8
return vshlq_n_u8(a, 3);
// CHECK: shl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #3
}
int16x8_t test_vshlq_n_u16(int16x8_t a) {
-// CHECK: test_vshlq_n_u16
+// CHECK-LABEL: test_vshlq_n_u16
return vshlq_n_u16(a, 3);
// CHECK: shl {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #3
}
int32x4_t test_vshlq_n_u32(int32x4_t a) {
-// CHECK: test_vshlq_n_u32
+// CHECK-LABEL: test_vshlq_n_u32
return vshlq_n_u32(a, 3);
// CHECK: shl {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #3
}
int64x2_t test_vshlq_n_u64(int64x2_t a) {
-// CHECK: test_vshlq_n_u64
+// CHECK-LABEL: test_vshlq_n_u64
return vshlq_n_u64(a, 3);
// CHECK: shl {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #3
}
int8x8_t test_vshr_n_s8(int8x8_t a) {
- // CHECK: test_vshr_n_s8
+ // CHECK-LABEL: test_vshr_n_s8
return vshr_n_s8(a, 3);
// CHECK: sshr {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #3
}
int16x4_t test_vshr_n_s16(int16x4_t a) {
- // CHECK: test_vshr_n_s16
+ // CHECK-LABEL: test_vshr_n_s16
return vshr_n_s16(a, 3);
// CHECK: sshr {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #3
}
int32x2_t test_vshr_n_s32(int32x2_t a) {
- // CHECK: test_vshr_n_s32
+ // CHECK-LABEL: test_vshr_n_s32
return vshr_n_s32(a, 3);
// CHECK: sshr {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #3
}
int8x16_t test_vshrq_n_s8(int8x16_t a) {
- // CHECK: test_vshrq_n_s8
+ // CHECK-LABEL: test_vshrq_n_s8
return vshrq_n_s8(a, 3);
// CHECK: sshr {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #3
}
int16x8_t test_vshrq_n_s16(int16x8_t a) {
- // CHECK: test_vshrq_n_s16
+ // CHECK-LABEL: test_vshrq_n_s16
return vshrq_n_s16(a, 3);
// CHECK: sshr {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #3
}
int32x4_t test_vshrq_n_s32(int32x4_t a) {
- // CHECK: test_vshrq_n_s32
+ // CHECK-LABEL: test_vshrq_n_s32
return vshrq_n_s32(a, 3);
// CHECK: sshr {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #3
}
int64x2_t test_vshrq_n_s64(int64x2_t a) {
- // CHECK: test_vshrq_n_s64
+ // CHECK-LABEL: test_vshrq_n_s64
return vshrq_n_s64(a, 3);
// CHECK: sshr {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #3
}
int8x8_t test_vshr_n_u8(int8x8_t a) {
- // CHECK: test_vshr_n_u8
+ // CHECK-LABEL: test_vshr_n_u8
return vshr_n_u8(a, 3);
// CHECK: ushr {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #3
}
int16x4_t test_vshr_n_u16(int16x4_t a) {
- // CHECK: test_vshr_n_u16
+ // CHECK-LABEL: test_vshr_n_u16
return vshr_n_u16(a, 3);
// CHECK: ushr {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #3
}
int32x2_t test_vshr_n_u32(int32x2_t a) {
- // CHECK: test_vshr_n_u32
+ // CHECK-LABEL: test_vshr_n_u32
return vshr_n_u32(a, 3);
// CHECK: ushr {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #3
}
int8x16_t test_vshrq_n_u8(int8x16_t a) {
- // CHECK: test_vshrq_n_u8
+ // CHECK-LABEL: test_vshrq_n_u8
return vshrq_n_u8(a, 3);
// CHECK: ushr {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #3
}
int16x8_t test_vshrq_n_u16(int16x8_t a) {
- // CHECK: test_vshrq_n_u16
+ // CHECK-LABEL: test_vshrq_n_u16
return vshrq_n_u16(a, 3);
// CHECK: ushr {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #3
}
int32x4_t test_vshrq_n_u32(int32x4_t a) {
- // CHECK: test_vshrq_n_u32
+ // CHECK-LABEL: test_vshrq_n_u32
return vshrq_n_u32(a, 3);
// CHECK: ushr {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #3
}
int64x2_t test_vshrq_n_u64(int64x2_t a) {
- // CHECK: test_vshrq_n_u64
+ // CHECK-LABEL: test_vshrq_n_u64
return vshrq_n_u64(a, 3);
// CHECK: ushr {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #3
}
int8x8_t test_vsra_n_s8(int8x8_t a, int8x8_t b) {
- // CHECK: test_vsra_n_s8
+ // CHECK-LABEL: test_vsra_n_s8
return vsra_n_s8(a, b, 3);
// CHECK: ssra {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #3
}
int16x4_t test_vsra_n_s16(int16x4_t a, int16x4_t b) {
- // CHECK: test_vsra_n_s16
+ // CHECK-LABEL: test_vsra_n_s16
return vsra_n_s16(a, b, 3);
// CHECK: ssra {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #3
}
int32x2_t test_vsra_n_s32(int32x2_t a, int32x2_t b) {
- // CHECK: test_vsra_n_s32
+ // CHECK-LABEL: test_vsra_n_s32
return vsra_n_s32(a, b, 3);
// CHECK: ssra {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #3
}
int8x16_t test_vsraq_n_s8(int8x16_t a, int8x16_t b) {
- // CHECK: test_vsraq_n_s8
+ // CHECK-LABEL: test_vsraq_n_s8
return vsraq_n_s8(a, b, 3);
// CHECK: ssra {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #3
}
int16x8_t test_vsraq_n_s16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vsraq_n_s16
+ // CHECK-LABEL: test_vsraq_n_s16
return vsraq_n_s16(a, b, 3);
// CHECK: ssra {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #3
}
int32x4_t test_vsraq_n_s32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vsraq_n_s32
+ // CHECK-LABEL: test_vsraq_n_s32
return vsraq_n_s32(a, b, 3);
// CHECK: ssra {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #3
}
int64x2_t test_vsraq_n_s64(int64x2_t a, int64x2_t b) {
- // CHECK: test_vsraq_n_s64
+ // CHECK-LABEL: test_vsraq_n_s64
return vsraq_n_s64(a, b, 3);
// CHECK: ssra {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #3
}
int8x8_t test_vsra_n_u8(int8x8_t a, int8x8_t b) {
- // CHECK: test_vsra_n_u8
+ // CHECK-LABEL: test_vsra_n_u8
return vsra_n_u8(a, b, 3);
// CHECK: usra {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #3
}
int16x4_t test_vsra_n_u16(int16x4_t a, int16x4_t b) {
- // CHECK: test_vsra_n_u16
+ // CHECK-LABEL: test_vsra_n_u16
return vsra_n_u16(a, b, 3);
// CHECK: usra {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #3
}
int32x2_t test_vsra_n_u32(int32x2_t a, int32x2_t b) {
- // CHECK: test_vsra_n_u32
+ // CHECK-LABEL: test_vsra_n_u32
return vsra_n_u32(a, b, 3);
// CHECK: usra {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #3
}
int8x16_t test_vsraq_n_u8(int8x16_t a, int8x16_t b) {
- // CHECK: test_vsraq_n_u8
+ // CHECK-LABEL: test_vsraq_n_u8
return vsraq_n_u8(a, b, 3);
// CHECK: usra {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #3
}
int16x8_t test_vsraq_n_u16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vsraq_n_u16
+ // CHECK-LABEL: test_vsraq_n_u16
return vsraq_n_u16(a, b, 3);
// CHECK: usra {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #3
}
int32x4_t test_vsraq_n_u32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vsraq_n_u32
+ // CHECK-LABEL: test_vsraq_n_u32
return vsraq_n_u32(a, b, 3);
// CHECK: usra {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #3
}
int64x2_t test_vsraq_n_u64(int64x2_t a, int64x2_t b) {
- // CHECK: test_vsraq_n_u64
+ // CHECK-LABEL: test_vsraq_n_u64
return vsraq_n_u64(a, b, 3);
// CHECK: usra {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #3
}
int8x8_t test_vrshr_n_s8(int8x8_t a) {
- // CHECK: test_vrshr_n_s8
+ // CHECK-LABEL: test_vrshr_n_s8
return vrshr_n_s8(a, 3);
// CHECK: srshr {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #3
}
int16x4_t test_vrshr_n_s16(int16x4_t a) {
- // CHECK: test_vrshr_n_s16
+ // CHECK-LABEL: test_vrshr_n_s16
return vrshr_n_s16(a, 3);
// CHECK: srshr {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #3
}
int32x2_t test_vrshr_n_s32(int32x2_t a) {
- // CHECK: test_vrshr_n_s32
+ // CHECK-LABEL: test_vrshr_n_s32
return vrshr_n_s32(a, 3);
// CHECK: srshr {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #3
}
int8x16_t test_vrshrq_n_s8(int8x16_t a) {
- // CHECK: test_vrshrq_n_s8
+ // CHECK-LABEL: test_vrshrq_n_s8
return vrshrq_n_s8(a, 3);
// CHECK: srshr {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #3
}
int16x8_t test_vrshrq_n_s16(int16x8_t a) {
- // CHECK: test_vrshrq_n_s16
+ // CHECK-LABEL: test_vrshrq_n_s16
return vrshrq_n_s16(a, 3);
// CHECK: srshr {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #3
}
int32x4_t test_vrshrq_n_s32(int32x4_t a) {
- // CHECK: test_vrshrq_n_s32
+ // CHECK-LABEL: test_vrshrq_n_s32
return vrshrq_n_s32(a, 3);
// CHECK: srshr {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #3
}
int64x2_t test_vrshrq_n_s64(int64x2_t a) {
- // CHECK: test_vrshrq_n_s64
+ // CHECK-LABEL: test_vrshrq_n_s64
return vrshrq_n_s64(a, 3);
// CHECK: srshr {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #3
}
int8x8_t test_vrshr_n_u8(int8x8_t a) {
- // CHECK: test_vrshr_n_u8
+ // CHECK-LABEL: test_vrshr_n_u8
return vrshr_n_u8(a, 3);
// CHECK: urshr {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #3
}
int16x4_t test_vrshr_n_u16(int16x4_t a) {
- // CHECK: test_vrshr_n_u16
+ // CHECK-LABEL: test_vrshr_n_u16
return vrshr_n_u16(a, 3);
// CHECK: urshr {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #3
}
int32x2_t test_vrshr_n_u32(int32x2_t a) {
- // CHECK: test_vrshr_n_u32
+ // CHECK-LABEL: test_vrshr_n_u32
return vrshr_n_u32(a, 3);
// CHECK: urshr {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #3
}
int8x16_t test_vrshrq_n_u8(int8x16_t a) {
- // CHECK: test_vrshrq_n_u8
+ // CHECK-LABEL: test_vrshrq_n_u8
return vrshrq_n_u8(a, 3);
// CHECK: urshr {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #3
}
int16x8_t test_vrshrq_n_u16(int16x8_t a) {
- // CHECK: test_vrshrq_n_u16
+ // CHECK-LABEL: test_vrshrq_n_u16
return vrshrq_n_u16(a, 3);
// CHECK: urshr {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #3
}
int32x4_t test_vrshrq_n_u32(int32x4_t a) {
- // CHECK: test_vrshrq_n_u32
+ // CHECK-LABEL: test_vrshrq_n_u32
return vrshrq_n_u32(a, 3);
// CHECK: urshr {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #3
}
int64x2_t test_vrshrq_n_u64(int64x2_t a) {
- // CHECK: test_vrshrq_n_u64
+ // CHECK-LABEL: test_vrshrq_n_u64
return vrshrq_n_u64(a, 3);
// CHECK: urshr {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #3
}
int8x8_t test_vrsra_n_s8(int8x8_t a, int8x8_t b) {
- // CHECK: test_vrsra_n_s8
+ // CHECK-LABEL: test_vrsra_n_s8
return vrsra_n_s8(a, b, 3);
// CHECK: srsra {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #3
}
int16x4_t test_vrsra_n_s16(int16x4_t a, int16x4_t b) {
- // CHECK: test_vrsra_n_s16
+ // CHECK-LABEL: test_vrsra_n_s16
return vrsra_n_s16(a, b, 3);
// CHECK: srsra {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #3
}
int32x2_t test_vrsra_n_s32(int32x2_t a, int32x2_t b) {
- // CHECK: test_vrsra_n_s32
+ // CHECK-LABEL: test_vrsra_n_s32
return vrsra_n_s32(a, b, 3);
// CHECK: srsra {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #3
}
int8x16_t test_vrsraq_n_s8(int8x16_t a, int8x16_t b) {
- // CHECK: test_vrsraq_n_s8
+ // CHECK-LABEL: test_vrsraq_n_s8
return vrsraq_n_s8(a, b, 3);
// CHECK: srsra {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #3
}
int16x8_t test_vrsraq_n_s16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vrsraq_n_s16
+ // CHECK-LABEL: test_vrsraq_n_s16
return vrsraq_n_s16(a, b, 3);
// CHECK: srsra {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #3
}
int32x4_t test_vrsraq_n_s32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vrsraq_n_s32
+ // CHECK-LABEL: test_vrsraq_n_s32
return vrsraq_n_s32(a, b, 3);
// CHECK: srsra {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #3
}
int64x2_t test_vrsraq_n_s64(int64x2_t a, int64x2_t b) {
- // CHECK: test_vrsraq_n_s64
+ // CHECK-LABEL: test_vrsraq_n_s64
return vrsraq_n_s64(a, b, 3);
// CHECK: srsra {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #3
}
int8x8_t test_vrsra_n_u8(int8x8_t a, int8x8_t b) {
- // CHECK: test_vrsra_n_u8
+ // CHECK-LABEL: test_vrsra_n_u8
return vrsra_n_u8(a, b, 3);
// CHECK: ursra {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #3
}
int16x4_t test_vrsra_n_u16(int16x4_t a, int16x4_t b) {
- // CHECK: test_vrsra_n_u16
+ // CHECK-LABEL: test_vrsra_n_u16
return vrsra_n_u16(a, b, 3);
// CHECK: ursra {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #3
}
int32x2_t test_vrsra_n_u32(int32x2_t a, int32x2_t b) {
- // CHECK: test_vrsra_n_u32
+ // CHECK-LABEL: test_vrsra_n_u32
return vrsra_n_u32(a, b, 3);
// CHECK: ursra {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #3
}
int8x16_t test_vrsraq_n_u8(int8x16_t a, int8x16_t b) {
- // CHECK: test_vrsraq_n_u8
+ // CHECK-LABEL: test_vrsraq_n_u8
return vrsraq_n_u8(a, b, 3);
// CHECK: ursra {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #3
}
int16x8_t test_vrsraq_n_u16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vrsraq_n_u16
+ // CHECK-LABEL: test_vrsraq_n_u16
return vrsraq_n_u16(a, b, 3);
// CHECK: ursra {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #3
}
int32x4_t test_vrsraq_n_u32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vrsraq_n_u32
+ // CHECK-LABEL: test_vrsraq_n_u32
return vrsraq_n_u32(a, b, 3);
// CHECK: ursra {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #3
}
int64x2_t test_vrsraq_n_u64(int64x2_t a, int64x2_t b) {
- // CHECK: test_vrsraq_n_u64
+ // CHECK-LABEL: test_vrsraq_n_u64
return vrsraq_n_u64(a, b, 3);
// CHECK: ursra {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #3
}
int8x8_t test_vsri_n_s8(int8x8_t a, int8x8_t b) {
- // CHECK: test_vsri_n_s8
+ // CHECK-LABEL: test_vsri_n_s8
return vsri_n_s8(a, b, 3);
// CHECK: sri {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #3
}
int16x4_t test_vsri_n_s16(int16x4_t a, int16x4_t b) {
- // CHECK: test_vsri_n_s16
+ // CHECK-LABEL: test_vsri_n_s16
return vsri_n_s16(a, b, 3);
// CHECK: sri {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #3
}
int32x2_t test_vsri_n_s32(int32x2_t a, int32x2_t b) {
- // CHECK: test_vsri_n_s32
+ // CHECK-LABEL: test_vsri_n_s32
return vsri_n_s32(a, b, 3);
// CHECK: sri {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #3
}
int8x16_t test_vsriq_n_s8(int8x16_t a, int8x16_t b) {
- // CHECK: test_vsriq_n_s8
+ // CHECK-LABEL: test_vsriq_n_s8
return vsriq_n_s8(a, b, 3);
// CHECK: sri {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #3
}
int16x8_t test_vsriq_n_s16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vsriq_n_s16
+ // CHECK-LABEL: test_vsriq_n_s16
return vsriq_n_s16(a, b, 3);
// CHECK: sri {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #3
}
int32x4_t test_vsriq_n_s32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vsriq_n_s32
+ // CHECK-LABEL: test_vsriq_n_s32
return vsriq_n_s32(a, b, 3);
// CHECK: sri {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #3
}
int64x2_t test_vsriq_n_s64(int64x2_t a, int64x2_t b) {
- // CHECK: test_vsriq_n_s64
+ // CHECK-LABEL: test_vsriq_n_s64
return vsriq_n_s64(a, b, 3);
// CHECK: sri {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #3
}
int8x8_t test_vsri_n_u8(int8x8_t a, int8x8_t b) {
- // CHECK: test_vsri_n_u8
+ // CHECK-LABEL: test_vsri_n_u8
return vsri_n_u8(a, b, 3);
// CHECK: sri {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #3
}
int16x4_t test_vsri_n_u16(int16x4_t a, int16x4_t b) {
- // CHECK: test_vsri_n_u16
+ // CHECK-LABEL: test_vsri_n_u16
return vsri_n_u16(a, b, 3);
// CHECK: sri {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #3
}
int32x2_t test_vsri_n_u32(int32x2_t a, int32x2_t b) {
- // CHECK: test_vsri_n_u32
+ // CHECK-LABEL: test_vsri_n_u32
return vsri_n_u32(a, b, 3);
// CHECK: sri {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #3
}
int8x16_t test_vsriq_n_u8(int8x16_t a, int8x16_t b) {
- // CHECK: test_vsriq_n_u8
+ // CHECK-LABEL: test_vsriq_n_u8
return vsriq_n_u8(a, b, 3);
// CHECK: sri {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #3
}
int16x8_t test_vsriq_n_u16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vsriq_n_u16
+ // CHECK-LABEL: test_vsriq_n_u16
return vsriq_n_u16(a, b, 3);
// CHECK: sri {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #3
}
int32x4_t test_vsriq_n_u32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vsriq_n_u32
+ // CHECK-LABEL: test_vsriq_n_u32
return vsriq_n_u32(a, b, 3);
// CHECK: sri {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #3
}
int64x2_t test_vsriq_n_u64(int64x2_t a, int64x2_t b) {
- // CHECK: test_vsriq_n_u64
+ // CHECK-LABEL: test_vsriq_n_u64
return vsriq_n_u64(a, b, 3);
// CHECK: sri {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #3
}
poly8x8_t test_vsri_n_p8(poly8x8_t a, poly8x8_t b) {
- // CHECK: test_vsri_n_p8
+ // CHECK-LABEL: test_vsri_n_p8
return vsri_n_p8(a, b, 3);
// CHECK: sri {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #3
}
poly16x4_t test_vsri_n_p16(poly16x4_t a, poly16x4_t b) {
- // CHECK: test_vsri_n_p16
+ // CHECK-LABEL: test_vsri_n_p16
return vsri_n_p16(a, b, 15);
// CHECK: sri {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #15
}
poly8x16_t test_vsriq_n_p8(poly8x16_t a, poly8x16_t b) {
- // CHECK: test_vsriq_n_p8
+ // CHECK-LABEL: test_vsriq_n_p8
return vsriq_n_p8(a, b, 3);
// CHECK: sri {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #3
}
poly16x8_t test_vsriq_n_p16(poly16x8_t a, poly16x8_t b) {
- // CHECK: test_vsriq_n_p16
+ // CHECK-LABEL: test_vsriq_n_p16
return vsriq_n_p16(a, b, 15);
// CHECK: sri {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #15
}
int8x8_t test_vsli_n_s8(int8x8_t a, int8x8_t b) {
- // CHECK: test_vsli_n_s8
+ // CHECK-LABEL: test_vsli_n_s8
return vsli_n_s8(a, b, 3);
// CHECK: sli {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #3
}
int16x4_t test_vsli_n_s16(int16x4_t a, int16x4_t b) {
- // CHECK: test_vsli_n_s16
+ // CHECK-LABEL: test_vsli_n_s16
return vsli_n_s16(a, b, 3);
// CHECK: sli {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #3
}
int32x2_t test_vsli_n_s32(int32x2_t a, int32x2_t b) {
- // CHECK: test_vsli_n_s32
+ // CHECK-LABEL: test_vsli_n_s32
return vsli_n_s32(a, b, 3);
// CHECK: sli {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #3
}
int8x16_t test_vsliq_n_s8(int8x16_t a, int8x16_t b) {
- // CHECK: test_vsliq_n_s8
+ // CHECK-LABEL: test_vsliq_n_s8
return vsliq_n_s8(a, b, 3);
// CHECK: sli {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #3
}
int16x8_t test_vsliq_n_s16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vsliq_n_s16
+ // CHECK-LABEL: test_vsliq_n_s16
return vsliq_n_s16(a, b, 3);
// CHECK: sli {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #3
}
int32x4_t test_vsliq_n_s32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vsliq_n_s32
+ // CHECK-LABEL: test_vsliq_n_s32
return vsliq_n_s32(a, b, 3);
// CHECK: sli {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #3
}
int64x2_t test_vsliq_n_s64(int64x2_t a, int64x2_t b) {
- // CHECK: test_vsliq_n_s64
+ // CHECK-LABEL: test_vsliq_n_s64
return vsliq_n_s64(a, b, 3);
// CHECK: sli {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #3
}
uint8x8_t test_vsli_n_u8(uint8x8_t a, uint8x8_t b) {
- // CHECK: test_vsli_n_u8
+ // CHECK-LABEL: test_vsli_n_u8
return vsli_n_u8(a, b, 3);
// CHECK: sli {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #3
}
uint16x4_t test_vsli_n_u16(uint16x4_t a, uint16x4_t b) {
- // CHECK: test_vsli_n_u16
+ // CHECK-LABEL: test_vsli_n_u16
return vsli_n_u16(a, b, 3);
// CHECK: sli {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #3
}
uint32x2_t test_vsli_n_u32(uint32x2_t a, uint32x2_t b) {
- // CHECK: test_vsli_n_u32
+ // CHECK-LABEL: test_vsli_n_u32
return vsli_n_u32(a, b, 3);
// CHECK: sli {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #3
}
uint8x16_t test_vsliq_n_u8(uint8x16_t a, uint8x16_t b) {
- // CHECK: test_vsliq_n_u8
+ // CHECK-LABEL: test_vsliq_n_u8
return vsliq_n_u8(a, b, 3);
// CHECK: sli {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #3
}
uint16x8_t test_vsliq_n_u16(uint16x8_t a, uint16x8_t b) {
- // CHECK: test_vsliq_n_u16
+ // CHECK-LABEL: test_vsliq_n_u16
return vsliq_n_u16(a, b, 3);
// CHECK: sli {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #3
}
uint32x4_t test_vsliq_n_u32(uint32x4_t a, uint32x4_t b) {
- // CHECK: test_vsliq_n_u32
+ // CHECK-LABEL: test_vsliq_n_u32
return vsliq_n_u32(a, b, 3);
// CHECK: sli {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #3
}
uint64x2_t test_vsliq_n_u64(uint64x2_t a, uint64x2_t b) {
- // CHECK: test_vsliq_n_u64
+ // CHECK-LABEL: test_vsliq_n_u64
return vsliq_n_u64(a, b, 3);
// CHECK: sli {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #3
}
poly8x8_t test_vsli_n_p8(poly8x8_t a, poly8x8_t b) {
- // CHECK: test_vsli_n_p8
+ // CHECK-LABEL: test_vsli_n_p8
return vsli_n_p8(a, b, 3);
// CHECK: sli {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #3
}
poly16x4_t test_vsli_n_p16(poly16x4_t a, poly16x4_t b) {
- // CHECK: test_vsli_n_p16
+ // CHECK-LABEL: test_vsli_n_p16
return vsli_n_p16(a, b, 15);
// CHECK: sli {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #15
}
poly8x16_t test_vsliq_n_p8(poly8x16_t a, poly8x16_t b) {
- // CHECK: test_vsliq_n_p8
+ // CHECK-LABEL: test_vsliq_n_p8
return vsliq_n_p8(a, b, 3);
// CHECK: sli {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #3
}
poly16x8_t test_vsliq_n_p16(poly16x8_t a, poly16x8_t b) {
- // CHECK: test_vsliq_n_p16
+ // CHECK-LABEL: test_vsliq_n_p16
return vsliq_n_p16(a, b, 15);
// CHECK: sli {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #15
}
int8x8_t test_vqshlu_n_s8(int8x8_t a) {
- // CHECK: test_vqshlu_n_s8
+ // CHECK-LABEL: test_vqshlu_n_s8
return vqshlu_n_s8(a, 3);
// CHECK: sqshlu {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #3
}
int16x4_t test_vqshlu_n_s16(int16x4_t a) {
- // CHECK: test_vqshlu_n_s16
+ // CHECK-LABEL: test_vqshlu_n_s16
return vqshlu_n_s16(a, 3);
// CHECK: sqshlu {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #3
}
int32x2_t test_vqshlu_n_s32(int32x2_t a) {
- // CHECK: test_vqshlu_n_s32
+ // CHECK-LABEL: test_vqshlu_n_s32
return vqshlu_n_s32(a, 3);
// CHECK: sqshlu {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #3
}
int8x16_t test_vqshluq_n_s8(int8x16_t a) {
- // CHECK: test_vqshluq_n_s8
+ // CHECK-LABEL: test_vqshluq_n_s8
return vqshluq_n_s8(a, 3);
// CHECK: sqshlu {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #3
}
int16x8_t test_vqshluq_n_s16(int16x8_t a) {
- // CHECK: test_vqshluq_n_s16
+ // CHECK-LABEL: test_vqshluq_n_s16
return vqshluq_n_s16(a, 3);
// CHECK: sqshlu {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #3
}
int32x4_t test_vqshluq_n_s32(int32x4_t a) {
- // CHECK: test_vqshluq_n_s32
+ // CHECK-LABEL: test_vqshluq_n_s32
return vqshluq_n_s32(a, 3);
// CHECK: sqshlu {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #3
}
int64x2_t test_vqshluq_n_s64(int64x2_t a) {
- // CHECK: test_vqshluq_n_s64
+ // CHECK-LABEL: test_vqshluq_n_s64
return vqshluq_n_s64(a, 3);
// CHECK: sqshlu {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #3
}
int8x8_t test_vshrn_n_s16(int16x8_t a) {
- // CHECK: test_vshrn_n_s16
+ // CHECK-LABEL: test_vshrn_n_s16
return vshrn_n_s16(a, 3);
// CHECK: shrn {{v[0-9]+}}.8b, {{v[0-9]+}}.8h, #3
}
int16x4_t test_vshrn_n_s32(int32x4_t a) {
- // CHECK: test_vshrn_n_s32
+ // CHECK-LABEL: test_vshrn_n_s32
return vshrn_n_s32(a, 9);
// CHECK: shrn {{v[0-9]+}}.4h, {{v[0-9]+}}.4s, #9
}
int32x2_t test_vshrn_n_s64(int64x2_t a) {
- // CHECK: test_vshrn_n_s64
+ // CHECK-LABEL: test_vshrn_n_s64
return vshrn_n_s64(a, 19);
// CHECK: shrn {{v[0-9]+}}.2s, {{v[0-9]+}}.2d, #19
}
uint8x8_t test_vshrn_n_u16(uint16x8_t a) {
- // CHECK: test_vshrn_n_u16
+ // CHECK-LABEL: test_vshrn_n_u16
return vshrn_n_u16(a, 3);
// CHECK: shrn {{v[0-9]+}}.8b, {{v[0-9]+}}.8h, #3
}
uint16x4_t test_vshrn_n_u32(uint32x4_t a) {
- // CHECK: test_vshrn_n_u32
+ // CHECK-LABEL: test_vshrn_n_u32
return vshrn_n_u32(a, 9);
// CHECK: shrn {{v[0-9]+}}.4h, {{v[0-9]+}}.4s, #9
}
uint32x2_t test_vshrn_n_u64(uint64x2_t a) {
- // CHECK: test_vshrn_n_u64
+ // CHECK-LABEL: test_vshrn_n_u64
return vshrn_n_u64(a, 19);
// CHECK: shrn {{v[0-9]+}}.2s, {{v[0-9]+}}.2d, #19
}
int8x16_t test_vshrn_high_n_s16(int8x8_t a, int16x8_t b) {
- // CHECK: test_vshrn_high_n_s16
+ // CHECK-LABEL: test_vshrn_high_n_s16
return vshrn_high_n_s16(a, b, 3);
// CHECK: shrn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.8h, #3
}
int16x8_t test_vshrn_high_n_s32(int16x4_t a, int32x4_t b) {
- // CHECK: test_vshrn_high_n_s32
+ // CHECK-LABEL: test_vshrn_high_n_s32
return vshrn_high_n_s32(a, b, 9);
// CHECK: shrn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.4s, #9
}
int32x4_t test_vshrn_high_n_s64(int32x2_t a, int64x2_t b) {
- // CHECK: test_vshrn_high_n_s64
+ // CHECK-LABEL: test_vshrn_high_n_s64
return vshrn_high_n_s64(a, b, 19);
// CHECK: shrn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.2d, #19
}
uint8x16_t test_vshrn_high_n_u16(uint8x8_t a, uint16x8_t b) {
- // CHECK: test_vshrn_high_n_u16
+ // CHECK-LABEL: test_vshrn_high_n_u16
return vshrn_high_n_u16(a, b, 3);
// CHECK: shrn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.8h, #3
}
uint16x8_t test_vshrn_high_n_u32(uint16x4_t a, uint32x4_t b) {
- // CHECK: test_vshrn_high_n_u32
+ // CHECK-LABEL: test_vshrn_high_n_u32
return vshrn_high_n_u32(a, b, 9);
// CHECK: shrn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.4s, #9
}
uint32x4_t test_vshrn_high_n_u64(uint32x2_t a, uint64x2_t b) {
- // CHECK: test_vshrn_high_n_u64
+ // CHECK-LABEL: test_vshrn_high_n_u64
return vshrn_high_n_u64(a, b, 19);
// CHECK: shrn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.2d, #19
}
int8x8_t test_vqshrun_n_s16(int16x8_t a) {
- // CHECK: test_vqshrun_n_s16
+ // CHECK-LABEL: test_vqshrun_n_s16
return vqshrun_n_s16(a, 3);
// CHECK: sqshrun {{v[0-9]+}}.8b, {{v[0-9]+}}.8h, #3
}
int16x4_t test_vqshrun_n_s32(int32x4_t a) {
- // CHECK: test_vqshrun_n_s32
+ // CHECK-LABEL: test_vqshrun_n_s32
return vqshrun_n_s32(a, 9);
// CHECK: sqshrun {{v[0-9]+}}.4h, {{v[0-9]+}}.4s, #9
}
int32x2_t test_vqshrun_n_s64(int64x2_t a) {
- // CHECK: test_vqshrun_n_s64
+ // CHECK-LABEL: test_vqshrun_n_s64
return vqshrun_n_s64(a, 19);
// CHECK: sqshrun {{v[0-9]+}}.2s, {{v[0-9]+}}.2d, #19
}
int8x16_t test_vqshrun_high_n_s16(int8x8_t a, int16x8_t b) {
- // CHECK: test_vqshrun_high_n_s16
+ // CHECK-LABEL: test_vqshrun_high_n_s16
return vqshrun_high_n_s16(a, b, 3);
// CHECK: sqshrun2 {{v[0-9]+}}.16b, {{v[0-9]+}}.8h, #3
}
int16x8_t test_vqshrun_high_n_s32(int16x4_t a, int32x4_t b) {
- // CHECK: test_vqshrun_high_n_s32
+ // CHECK-LABEL: test_vqshrun_high_n_s32
return vqshrun_high_n_s32(a, b, 9);
// CHECK: sqshrun2 {{v[0-9]+}}.8h, {{v[0-9]+}}.4s, #9
}
int32x4_t test_vqshrun_high_n_s64(int32x2_t a, int64x2_t b) {
- // CHECK: test_vqshrun_high_n_s64
+ // CHECK-LABEL: test_vqshrun_high_n_s64
return vqshrun_high_n_s64(a, b, 19);
// CHECK: sqshrun2 {{v[0-9]+}}.4s, {{v[0-9]+}}.2d, #19
}
int8x8_t test_vrshrn_n_s16(int16x8_t a) {
- // CHECK: test_vrshrn_n_s16
+ // CHECK-LABEL: test_vrshrn_n_s16
return vrshrn_n_s16(a, 3);
// CHECK: rshrn {{v[0-9]+}}.8b, {{v[0-9]+}}.8h, #3
}
int16x4_t test_vrshrn_n_s32(int32x4_t a) {
- // CHECK: test_vrshrn_n_s32
+ // CHECK-LABEL: test_vrshrn_n_s32
return vrshrn_n_s32(a, 9);
// CHECK: rshrn {{v[0-9]+}}.4h, {{v[0-9]+}}.4s, #9
}
int32x2_t test_vrshrn_n_s64(int64x2_t a) {
- // CHECK: test_vrshrn_n_s64
+ // CHECK-LABEL: test_vrshrn_n_s64
return vrshrn_n_s64(a, 19);
// CHECK: rshrn {{v[0-9]+}}.2s, {{v[0-9]+}}.2d, #19
}
uint8x8_t test_vrshrn_n_u16(uint16x8_t a) {
- // CHECK: test_vrshrn_n_u16
+ // CHECK-LABEL: test_vrshrn_n_u16
return vrshrn_n_u16(a, 3);
// CHECK: rshrn {{v[0-9]+}}.8b, {{v[0-9]+}}.8h, #3
}
uint16x4_t test_vrshrn_n_u32(uint32x4_t a) {
- // CHECK: test_vrshrn_n_u32
+ // CHECK-LABEL: test_vrshrn_n_u32
return vrshrn_n_u32(a, 9);
// CHECK: rshrn {{v[0-9]+}}.4h, {{v[0-9]+}}.4s, #9
}
uint32x2_t test_vrshrn_n_u64(uint64x2_t a) {
- // CHECK: test_vrshrn_n_u64
+ // CHECK-LABEL: test_vrshrn_n_u64
return vrshrn_n_u64(a, 19);
// CHECK: rshrn {{v[0-9]+}}.2s, {{v[0-9]+}}.2d, #19
}
int8x16_t test_vrshrn_high_n_s16(int8x8_t a, int16x8_t b) {
- // CHECK: test_vrshrn_high_n_s16
+ // CHECK-LABEL: test_vrshrn_high_n_s16
return vrshrn_high_n_s16(a, b, 3);
// CHECK: rshrn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.8h, #3
}
int16x8_t test_vrshrn_high_n_s32(int16x4_t a, int32x4_t b) {
- // CHECK: test_vrshrn_high_n_s32
+ // CHECK-LABEL: test_vrshrn_high_n_s32
return vrshrn_high_n_s32(a, b, 9);
// CHECK: rshrn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.4s, #9
}
int32x4_t test_vrshrn_high_n_s64(int32x2_t a, int64x2_t b) {
- // CHECK: test_vrshrn_high_n_s64
+ // CHECK-LABEL: test_vrshrn_high_n_s64
return vrshrn_high_n_s64(a, b, 19);
// CHECK: rshrn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.2d, #19
}
uint8x16_t test_vrshrn_high_n_u16(uint8x8_t a, uint16x8_t b) {
- // CHECK: test_vrshrn_high_n_u16
+ // CHECK-LABEL: test_vrshrn_high_n_u16
return vrshrn_high_n_u16(a, b, 3);
// CHECK: rshrn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.8h, #3
}
uint16x8_t test_vrshrn_high_n_u32(uint16x4_t a, uint32x4_t b) {
- // CHECK: test_vrshrn_high_n_u32
+ // CHECK-LABEL: test_vrshrn_high_n_u32
return vrshrn_high_n_u32(a, b, 9);
// CHECK: rshrn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.4s, #9
}
uint32x4_t test_vrshrn_high_n_u64(uint32x2_t a, uint64x2_t b) {
- // CHECK: test_vrshrn_high_n_u64
+ // CHECK-LABEL: test_vrshrn_high_n_u64
return vrshrn_high_n_u64(a, b, 19);
// CHECK: rshrn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.2d, #19
}
int8x8_t test_vqrshrun_n_s16(int16x8_t a) {
- // CHECK: test_vqrshrun_n_s16
+ // CHECK-LABEL: test_vqrshrun_n_s16
return vqrshrun_n_s16(a, 3);
// CHECK: sqrshrun {{v[0-9]+}}.8b, {{v[0-9]+}}.8h, #3
}
int16x4_t test_vqrshrun_n_s32(int32x4_t a) {
- // CHECK: test_vqrshrun_n_s32
+ // CHECK-LABEL: test_vqrshrun_n_s32
return vqrshrun_n_s32(a, 9);
// CHECK: sqrshrun {{v[0-9]+}}.4h, {{v[0-9]+}}.4s, #9
}
int32x2_t test_vqrshrun_n_s64(int64x2_t a) {
- // CHECK: test_vqrshrun_n_s64
+ // CHECK-LABEL: test_vqrshrun_n_s64
return vqrshrun_n_s64(a, 19);
// CHECK: sqrshrun {{v[0-9]+}}.2s, {{v[0-9]+}}.2d, #19
}
int8x16_t test_vqrshrun_high_n_s16(int8x8_t a, int16x8_t b) {
- // CHECK: test_vqrshrun_high_n_s16
+ // CHECK-LABEL: test_vqrshrun_high_n_s16
return vqrshrun_high_n_s16(a, b, 3);
// CHECK: sqrshrun2 {{v[0-9]+}}.16b, {{v[0-9]+}}.8h, #3
}
int16x8_t test_vqrshrun_high_n_s32(int16x4_t a, int32x4_t b) {
- // CHECK: test_vqrshrun_high_n_s32
+ // CHECK-LABEL: test_vqrshrun_high_n_s32
return vqrshrun_high_n_s32(a, b, 9);
// CHECK: sqrshrun2 {{v[0-9]+}}.8h, {{v[0-9]+}}.4s, #9
}
int32x4_t test_vqrshrun_high_n_s64(int32x2_t a, int64x2_t b) {
- // CHECK: test_vqrshrun_high_n_s64
+ // CHECK-LABEL: test_vqrshrun_high_n_s64
return vqrshrun_high_n_s64(a, b, 19);
// CHECK: sqrshrun2 {{v[0-9]+}}.4s, {{v[0-9]+}}.2d, #19
}
int8x8_t test_vqshrn_n_s16(int16x8_t a) {
- // CHECK: test_vqshrn_n_s16
+ // CHECK-LABEL: test_vqshrn_n_s16
return vqshrn_n_s16(a, 3);
// CHECK: sqshrn {{v[0-9]+}}.8b, {{v[0-9]+}}.8h, #3
}
int16x4_t test_vqshrn_n_s32(int32x4_t a) {
- // CHECK: test_vqshrn_n_s32
+ // CHECK-LABEL: test_vqshrn_n_s32
return vqshrn_n_s32(a, 9);
// CHECK: sqshrn {{v[0-9]+}}.4h, {{v[0-9]+}}.4s, #9
}
int32x2_t test_vqshrn_n_s64(int64x2_t a) {
- // CHECK: test_vqshrn_n_s64
+ // CHECK-LABEL: test_vqshrn_n_s64
return vqshrn_n_s64(a, 19);
// CHECK: sqshrn {{v[0-9]+}}.2s, {{v[0-9]+}}.2d, #19
}
uint8x8_t test_vqshrn_n_u16(uint16x8_t a) {
- // CHECK: test_vqshrn_n_u16
+ // CHECK-LABEL: test_vqshrn_n_u16
return vqshrn_n_u16(a, 3);
// CHECK: uqshrn {{v[0-9]+}}.8b, {{v[0-9]+}}.8h, #3
}
uint16x4_t test_vqshrn_n_u32(uint32x4_t a) {
- // CHECK: test_vqshrn_n_u32
+ // CHECK-LABEL: test_vqshrn_n_u32
return vqshrn_n_u32(a, 9);
// CHECK: uqshrn {{v[0-9]+}}.4h, {{v[0-9]+}}.4s, #9
}
uint32x2_t test_vqshrn_n_u64(uint64x2_t a) {
- // CHECK: test_vqshrn_n_u64
+ // CHECK-LABEL: test_vqshrn_n_u64
return vqshrn_n_u64(a, 19);
// CHECK: uqshrn {{v[0-9]+}}.2s, {{v[0-9]+}}.2d, #19
}
int8x16_t test_vqshrn_high_n_s16(int8x8_t a, int16x8_t b) {
- // CHECK: test_vqshrn_high_n_s16
+ // CHECK-LABEL: test_vqshrn_high_n_s16
return vqshrn_high_n_s16(a, b, 3);
// CHECK: sqshrn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.8h, #3
}
int16x8_t test_vqshrn_high_n_s32(int16x4_t a, int32x4_t b) {
- // CHECK: test_vqshrn_high_n_s32
+ // CHECK-LABEL: test_vqshrn_high_n_s32
return vqshrn_high_n_s32(a, b, 9);
// CHECK: sqshrn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.4s, #9
}
int32x4_t test_vqshrn_high_n_s64(int32x2_t a, int64x2_t b) {
- // CHECK: test_vqshrn_high_n_s64
+ // CHECK-LABEL: test_vqshrn_high_n_s64
return vqshrn_high_n_s64(a, b, 19);
// CHECK: sqshrn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.2d, #19
}
uint8x16_t test_vqshrn_high_n_u16(uint8x8_t a, uint16x8_t b) {
- // CHECK: test_vqshrn_high_n_u16
+ // CHECK-LABEL: test_vqshrn_high_n_u16
return vqshrn_high_n_u16(a, b, 3);
// CHECK: uqshrn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.8h, #3
}
uint16x8_t test_vqshrn_high_n_u32(uint16x4_t a, uint32x4_t b) {
- // CHECK: test_vqshrn_high_n_u32
+ // CHECK-LABEL: test_vqshrn_high_n_u32
return vqshrn_high_n_u32(a, b, 9);
// CHECK: uqshrn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.4s, #9
}
uint32x4_t test_vqshrn_high_n_u64(uint32x2_t a, uint64x2_t b) {
- // CHECK: test_vqshrn_high_n_u64
+ // CHECK-LABEL: test_vqshrn_high_n_u64
return vqshrn_high_n_u64(a, b, 19);
// CHECK: uqshrn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.2d, #19
}
int8x8_t test_vqrshrn_n_s16(int16x8_t a) {
- // CHECK: test_vqrshrn_n_s16
+ // CHECK-LABEL: test_vqrshrn_n_s16
return vqrshrn_n_s16(a, 3);
// CHECK: sqrshrn {{v[0-9]+}}.8b, {{v[0-9]+}}.8h, #3
}
int16x4_t test_vqrshrn_n_s32(int32x4_t a) {
- // CHECK: test_vqrshrn_n_s32
+ // CHECK-LABEL: test_vqrshrn_n_s32
return vqrshrn_n_s32(a, 9);
// CHECK: sqrshrn {{v[0-9]+}}.4h, {{v[0-9]+}}.4s, #9
}
int32x2_t test_vqrshrn_n_s64(int64x2_t a) {
- // CHECK: test_vqrshrn_n_s64
+ // CHECK-LABEL: test_vqrshrn_n_s64
return vqrshrn_n_s64(a, 19);
// CHECK: sqrshrn {{v[0-9]+}}.2s, {{v[0-9]+}}.2d, #19
}
uint8x8_t test_vqrshrn_n_u16(uint16x8_t a) {
- // CHECK: test_vqrshrn_n_u16
+ // CHECK-LABEL: test_vqrshrn_n_u16
return vqrshrn_n_u16(a, 3);
// CHECK: uqrshrn {{v[0-9]+}}.8b, {{v[0-9]+}}.8h, #3
}
uint16x4_t test_vqrshrn_n_u32(uint32x4_t a) {
- // CHECK: test_vqrshrn_n_u32
+ // CHECK-LABEL: test_vqrshrn_n_u32
return vqrshrn_n_u32(a, 9);
// CHECK: uqrshrn {{v[0-9]+}}.4h, {{v[0-9]+}}.4s, #9
}
uint32x2_t test_vqrshrn_n_u64(uint64x2_t a) {
- // CHECK: test_vqrshrn_n_u64
+ // CHECK-LABEL: test_vqrshrn_n_u64
return vqrshrn_n_u64(a, 19);
// CHECK: uqrshrn {{v[0-9]+}}.2s, {{v[0-9]+}}.2d, #19
}
int8x16_t test_vqrshrn_high_n_s16(int8x8_t a, int16x8_t b) {
- // CHECK: test_vqrshrn_high_n_s16
+ // CHECK-LABEL: test_vqrshrn_high_n_s16
return vqrshrn_high_n_s16(a, b, 3);
// CHECK: sqrshrn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.8h, #3
}
int16x8_t test_vqrshrn_high_n_s32(int16x4_t a, int32x4_t b) {
- // CHECK: test_vqrshrn_high_n_s32
+ // CHECK-LABEL: test_vqrshrn_high_n_s32
return vqrshrn_high_n_s32(a, b, 9);
// CHECK: sqrshrn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.4s, #9
}
int32x4_t test_vqrshrn_high_n_s64(int32x2_t a, int64x2_t b) {
- // CHECK: test_vqrshrn_high_n_s64
+ // CHECK-LABEL: test_vqrshrn_high_n_s64
return vqrshrn_high_n_s64(a, b, 19);
// CHECK: sqrshrn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.2d, #19
}
uint8x16_t test_vqrshrn_high_n_u16(uint8x8_t a, uint16x8_t b) {
- // CHECK: test_vqrshrn_high_n_u16
+ // CHECK-LABEL: test_vqrshrn_high_n_u16
return vqrshrn_high_n_u16(a, b, 3);
// CHECK: uqrshrn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.8h, #3
}
uint16x8_t test_vqrshrn_high_n_u32(uint16x4_t a, uint32x4_t b) {
- // CHECK: test_vqrshrn_high_n_u32
+ // CHECK-LABEL: test_vqrshrn_high_n_u32
return vqrshrn_high_n_u32(a, b, 9);
// CHECK: uqrshrn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.4s, #9
}
uint32x4_t test_vqrshrn_high_n_u64(uint32x2_t a, uint64x2_t b) {
- // CHECK: test_vqrshrn_high_n_u64
+ // CHECK-LABEL: test_vqrshrn_high_n_u64
return vqrshrn_high_n_u64(a, b, 19);
// CHECK: uqrshrn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.2d, #19
}
int16x8_t test_vshll_n_s8(int8x8_t a) {
-// CHECK: test_vshll_n_s8
+// CHECK-LABEL: test_vshll_n_s8
return vshll_n_s8(a, 3);
// CHECK: sshll {{v[0-9]+}}.8h, {{v[0-9]+}}.8b, #3
}
int32x4_t test_vshll_n_s16(int16x4_t a) {
-// CHECK: test_vshll_n_s16
+// CHECK-LABEL: test_vshll_n_s16
return vshll_n_s16(a, 9);
// CHECK: sshll {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, #9
}
int64x2_t test_vshll_n_s32(int32x2_t a) {
-// CHECK: test_vshll_n_s32
+// CHECK-LABEL: test_vshll_n_s32
return vshll_n_s32(a, 19);
// CHECK: sshll {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, #19
}
uint16x8_t test_vshll_n_u8(uint8x8_t a) {
-// CHECK: test_vshll_n_u8
+// CHECK-LABEL: test_vshll_n_u8
return vshll_n_u8(a, 3);
// CHECK: ushll {{v[0-9]+}}.8h, {{v[0-9]+}}.8b, #3
}
uint32x4_t test_vshll_n_u16(uint16x4_t a) {
-// CHECK: test_vshll_n_u16
+// CHECK-LABEL: test_vshll_n_u16
return vshll_n_u16(a, 9);
// CHECK: ushll {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, #9
}
uint64x2_t test_vshll_n_u32(uint32x2_t a) {
-// CHECK: test_vshll_n_u32
+// CHECK-LABEL: test_vshll_n_u32
return vshll_n_u32(a, 19);
// CHECK: ushll {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, #19
}
int16x8_t test_vshll_high_n_s8(int8x16_t a) {
-// CHECK: test_vshll_high_n_s8
+// CHECK-LABEL: test_vshll_high_n_s8
return vshll_high_n_s8(a, 3);
// CHECK: sshll2 {{v[0-9]+}}.8h, {{v[0-9]+}}.16b, #3
}
int32x4_t test_vshll_high_n_s16(int16x8_t a) {
-// CHECK: test_vshll_high_n_s16
+// CHECK-LABEL: test_vshll_high_n_s16
return vshll_high_n_s16(a, 9);
// CHECK: sshll2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, #9
}
int64x2_t test_vshll_high_n_s32(int32x4_t a) {
-// CHECK: test_vshll_high_n_s32
+// CHECK-LABEL: test_vshll_high_n_s32
return vshll_high_n_s32(a, 19);
// CHECK: sshll2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, #19
}
uint16x8_t test_vshll_high_n_u8(uint8x16_t a) {
-// CHECK: test_vshll_high_n_u8
+// CHECK-LABEL: test_vshll_high_n_u8
return vshll_high_n_u8(a, 3);
// CHECK: ushll2 {{v[0-9]+}}.8h, {{v[0-9]+}}.16b, #3
}
uint32x4_t test_vshll_high_n_u16(uint16x8_t a) {
-// CHECK: test_vshll_high_n_u16
+// CHECK-LABEL: test_vshll_high_n_u16
return vshll_high_n_u16(a, 9);
// CHECK: ushll2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, #9
}
uint64x2_t test_vshll_high_n_u32(uint32x4_t a) {
-// CHECK: test_vshll_high_n_u32
+// CHECK-LABEL: test_vshll_high_n_u32
return vshll_high_n_u32(a, 19);
// CHECK: ushll2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, #19
}
int16x8_t test_vmovl_s8(int8x8_t a) {
-// CHECK: test_vmovl_s8
+// CHECK-LABEL: test_vmovl_s8
return vmovl_s8(a);
// CHECK: sshll {{v[0-9]+}}.8h, {{v[0-9]+}}.8b, #0
}
int32x4_t test_vmovl_s16(int16x4_t a) {
-// CHECK: test_vmovl_s16
+// CHECK-LABEL: test_vmovl_s16
return vmovl_s16(a);
// CHECK: sshll {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, #0
}
int64x2_t test_vmovl_s32(int32x2_t a) {
-// CHECK: test_vmovl_s32
+// CHECK-LABEL: test_vmovl_s32
return vmovl_s32(a);
// CHECK: sshll {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, #0
}
uint16x8_t test_vmovl_u8(uint8x8_t a) {
-// CHECK: test_vmovl_u8
+// CHECK-LABEL: test_vmovl_u8
return vmovl_u8(a);
// CHECK: ushll {{v[0-9]+}}.8h, {{v[0-9]+}}.8b, #0
}
uint32x4_t test_vmovl_u16(uint16x4_t a) {
-// CHECK: test_vmovl_u16
+// CHECK-LABEL: test_vmovl_u16
return vmovl_u16(a);
// CHECK: ushll {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, #0
}
uint64x2_t test_vmovl_u32(uint32x2_t a) {
-// CHECK: test_vmovl_u32
+// CHECK-LABEL: test_vmovl_u32
return vmovl_u32(a);
// CHECK: ushll {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, #0
}
int16x8_t test_vmovl_high_s8(int8x16_t a) {
-// CHECK: test_vmovl_high_s8
+// CHECK-LABEL: test_vmovl_high_s8
return vmovl_high_s8(a);
// CHECK: sshll2 {{v[0-9]+}}.8h, {{v[0-9]+}}.16b, #0
}
int32x4_t test_vmovl_high_s16(int16x8_t a) {
-// CHECK: test_vmovl_high_s16
+// CHECK-LABEL: test_vmovl_high_s16
return vmovl_high_s16(a);
// CHECK: sshll2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, #0
}
int64x2_t test_vmovl_high_s32(int32x4_t a) {
-// CHECK: test_vmovl_high_s32
+// CHECK-LABEL: test_vmovl_high_s32
return vmovl_high_s32(a);
// CHECK: sshll2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, #0
}
uint16x8_t test_vmovl_high_u8(uint8x16_t a) {
-// CHECK: test_vmovl_high_u8
+// CHECK-LABEL: test_vmovl_high_u8
return vmovl_high_u8(a);
// CHECK: ushll2 {{v[0-9]+}}.8h, {{v[0-9]+}}.16b, #0
}
uint32x4_t test_vmovl_high_u16(uint16x8_t a) {
-// CHECK: test_vmovl_high_u16
+// CHECK-LABEL: test_vmovl_high_u16
return vmovl_high_u16(a);
// CHECK: ushll2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, #0
}
uint64x2_t test_vmovl_high_u32(uint32x4_t a) {
-// CHECK: test_vmovl_high_u32
+// CHECK-LABEL: test_vmovl_high_u32
return vmovl_high_u32(a);
// CHECK: ushll2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, #0
}
float32x2_t test_vcvt_n_f32_s32(int32x2_t a) {
- // CHECK: test_vcvt_n_f32_s32
+ // CHECK-LABEL: test_vcvt_n_f32_s32
return vcvt_n_f32_s32(a, 31);
// CHECK: scvtf {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #31
}
float32x4_t test_vcvtq_n_f32_s32(int32x4_t a) {
- // CHECK: test_vcvtq_n_f32_s32
+ // CHECK-LABEL: test_vcvtq_n_f32_s32
return vcvtq_n_f32_s32(a, 31);
// CHECK: scvtf {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #31
}
float64x2_t test_vcvtq_n_f64_s64(int64x2_t a) {
- // CHECK: test_vcvtq_n_f64_s64
+ // CHECK-LABEL: test_vcvtq_n_f64_s64
return vcvtq_n_f64_s64(a, 50);
// CHECK: scvtf {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #50
}
float32x2_t test_vcvt_n_f32_u32(uint32x2_t a) {
- // CHECK: test_vcvt_n_f32_u32
+ // CHECK-LABEL: test_vcvt_n_f32_u32
return vcvt_n_f32_u32(a, 31);
// CHECK: ucvtf {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #31
}
float32x4_t test_vcvtq_n_f32_u32(uint32x4_t a) {
- // CHECK: test_vcvtq_n_f32_u32
+ // CHECK-LABEL: test_vcvtq_n_f32_u32
return vcvtq_n_f32_u32(a, 31);
// CHECK: ucvtf {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #31
}
float64x2_t test_vcvtq_n_f64_u64(uint64x2_t a) {
- // CHECK: test_vcvtq_n_f64_u64
+ // CHECK-LABEL: test_vcvtq_n_f64_u64
return vcvtq_n_f64_u64(a, 50);
// CHECK: ucvtf {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #50
}
int32x2_t test_vcvt_n_s32_f32(float32x2_t a) {
- // CHECK: test_vcvt_n_s32_f32
+ // CHECK-LABEL: test_vcvt_n_s32_f32
return vcvt_n_s32_f32(a, 31);
// CHECK: fcvtzs {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #31
}
int32x4_t test_vcvtq_n_s32_f32(float32x4_t a) {
- // CHECK: test_vcvtq_n_s32_f32
+ // CHECK-LABEL: test_vcvtq_n_s32_f32
return vcvtq_n_s32_f32(a, 31);
// CHECK: fcvtzs {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #31
}
int64x2_t test_vcvtq_n_s64_f64(float64x2_t a) {
- // CHECK: test_vcvtq_n_s64_f64
+ // CHECK-LABEL: test_vcvtq_n_s64_f64
return vcvtq_n_s64_f64(a, 50);
// CHECK: fcvtzs {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #50
}
uint32x2_t test_vcvt_n_u32_f32(float32x2_t a) {
- // CHECK: test_vcvt_n_u32_f32
+ // CHECK-LABEL: test_vcvt_n_u32_f32
return vcvt_n_u32_f32(a, 31);
// CHECK: fcvtzu {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #31
}
uint32x4_t test_vcvtq_n_u32_f32(float32x4_t a) {
- // CHECK: test_vcvt_n_u32_f32
+ // CHECK-LABEL: test_vcvtq_n_u32_f32
return vcvtq_n_u32_f32(a, 31);
// CHECK: fcvtzu {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #31
}
uint64x2_t test_vcvtq_n_u64_f64(float64x2_t a) {
- // CHECK: test_vcvtq_n_u64_f64
+ // CHECK-LABEL: test_vcvtq_n_u64_f64
return vcvtq_n_u64_f64(a, 50);
// CHECK: fcvtzu {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #50
}
int16x8_t test_vaddl_s8(int8x8_t a, int8x8_t b) {
- // CHECK: test_vaddl_s8
+ // CHECK-LABEL: test_vaddl_s8
return vaddl_s8(a, b);
- // CHECK: saddl {{v[0-31]+}}.8h, {{v[0-31]+}}.8b, {{v[0-31]+}}.8b
+ // CHECK: saddl {{v[0-9]+}}.8h, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int32x4_t test_vaddl_s16(int16x4_t a, int16x4_t b) {
- // CHECK: test_vaddl_s16
+ // CHECK-LABEL: test_vaddl_s16
return vaddl_s16(a, b);
- // CHECK: saddl {{v[0-31]+}}.4s, {{v[0-31]+}}.4h, {{v[0-31]+}}.4h
+ // CHECK: saddl {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int64x2_t test_vaddl_s32(int32x2_t a, int32x2_t b) {
- // CHECK: test_vaddl_s32
+ // CHECK-LABEL: test_vaddl_s32
return vaddl_s32(a, b);
- // CHECK: saddl {{v[0-31]+}}.2d, {{v[0-31]+}}.2s, {{v[0-31]+}}.2s
+ // CHECK: saddl {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint16x8_t test_vaddl_u8(uint8x8_t a, uint8x8_t b) {
- // CHECK: test_vaddl_u8
+ // CHECK-LABEL: test_vaddl_u8
return vaddl_u8(a, b);
- // CHECK: uaddl {{v[0-31]+}}.8h, {{v[0-31]+}}.8b, {{v[0-31]+}}.8b
+ // CHECK: uaddl {{v[0-9]+}}.8h, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint32x4_t test_vaddl_u16(uint16x4_t a, uint16x4_t b) {
- // CHECK: test_vaddl_u16
+ // CHECK-LABEL: test_vaddl_u16
return vaddl_u16(a, b);
- // CHECK: uaddl {{v[0-31]+}}.4s, {{v[0-31]+}}.4h, {{v[0-31]+}}.4h
+ // CHECK: uaddl {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint64x2_t test_vaddl_u32(uint32x2_t a, uint32x2_t b) {
- // CHECK: test_vaddl_u32
+ // CHECK-LABEL: test_vaddl_u32
return vaddl_u32(a, b);
- // CHECK: uaddl {{v[0-31]+}}.2d, {{v[0-31]+}}.2s, {{v[0-31]+}}.2s
+ // CHECK: uaddl {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int16x8_t test_vaddl_high_s8(int8x16_t a, int8x16_t b) {
- // CHECK: test_vaddl_high_s8
+ // CHECK-LABEL: test_vaddl_high_s8
return vaddl_high_s8(a, b);
- // CHECK: saddl2 {{v[0-31]+}}.8h, {{v[0-31]+}}.16b, {{v[0-31]+}}.16b
+ // CHECK: saddl2 {{v[0-9]+}}.8h, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int32x4_t test_vaddl_high_s16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vaddl_high_s16
+ // CHECK-LABEL: test_vaddl_high_s16
return vaddl_high_s16(a, b);
- // CHECK: saddl2 {{v[0-31]+}}.4s, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: saddl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int64x2_t test_vaddl_high_s32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vaddl_high_s32
+ // CHECK-LABEL: test_vaddl_high_s32
return vaddl_high_s32(a, b);
- // CHECK: saddl2 {{v[0-31]+}}.2d, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: saddl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint16x8_t test_vaddl_high_u8(uint8x16_t a, uint8x16_t b) {
- // CHECK: test_vaddl_high_u8
+ // CHECK-LABEL: test_vaddl_high_u8
return vaddl_high_u8(a, b);
- // CHECK: uaddl2 {{v[0-31]+}}.8h, {{v[0-31]+}}.16b, {{v[0-31]+}}.16b
+ // CHECK: uaddl2 {{v[0-9]+}}.8h, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint32x4_t test_vaddl_high_u16(uint16x8_t a, uint16x8_t b) {
- // CHECK: test_vaddl_high_u16
+ // CHECK-LABEL: test_vaddl_high_u16
return vaddl_high_u16(a, b);
- // CHECK: uaddl2 {{v[0-31]+}}.4s, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: uaddl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint64x2_t test_vaddl_high_u32(uint32x4_t a, uint32x4_t b) {
- // CHECK: test_vaddl_high_u32
+ // CHECK-LABEL: test_vaddl_high_u32
return vaddl_high_u32(a, b);
- // CHECK: uaddl2 {{v[0-31]+}}.2d, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: uaddl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int16x8_t test_vaddw_s8(int16x8_t a, int8x8_t b) {
- // CHECK: test_vaddw_s8
+ // CHECK-LABEL: test_vaddw_s8
return vaddw_s8(a, b);
- // CHECK: saddw {{v[0-31]+}}.8h, {{v[0-31]+}}.8h, {{v[0-31]+}}.8b
+ // CHECK: saddw {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8b
}
int32x4_t test_vaddw_s16(int32x4_t a, int16x4_t b) {
- // CHECK: test_vaddw_s16
+ // CHECK-LABEL: test_vaddw_s16
return vaddw_s16(a, b);
- // CHECK: saddw {{v[0-31]+}}.4s, {{v[0-31]+}}.4s, {{v[0-31]+}}.4h
+ // CHECK: saddw {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4h
}
int64x2_t test_vaddw_s32(int64x2_t a, int32x2_t b) {
- // CHECK: test_vaddw_s32
+ // CHECK-LABEL: test_vaddw_s32
return vaddw_s32(a, b);
- // CHECK: saddw {{v[0-31]+}}.2d, {{v[0-31]+}}.2d, {{v[0-31]+}}.2s
+ // CHECK: saddw {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2s
}
uint16x8_t test_vaddw_u8(uint16x8_t a, uint8x8_t b) {
- // CHECK: test_vaddw_u8
+ // CHECK-LABEL: test_vaddw_u8
return vaddw_u8(a, b);
- // CHECK: uaddw {{v[0-31]+}}.8h, {{v[0-31]+}}.8h, {{v[0-31]+}}.8b
+ // CHECK: uaddw {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8b
}
uint32x4_t test_vaddw_u16(uint32x4_t a, uint16x4_t b) {
- // CHECK: test_vaddw_u16
+ // CHECK-LABEL: test_vaddw_u16
return vaddw_u16(a, b);
- // CHECK: uaddw {{v[0-31]+}}.4s, {{v[0-31]+}}.4s, {{v[0-31]+}}.4h
+ // CHECK: uaddw {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4h
}
uint64x2_t test_vaddw_u32(uint64x2_t a, uint32x2_t b) {
- // CHECK: test_vaddw_u32
+ // CHECK-LABEL: test_vaddw_u32
return vaddw_u32(a, b);
- // CHECK: uaddw {{v[0-31]+}}.2d, {{v[0-31]+}}.2d, {{v[0-31]+}}.2s
+ // CHECK: uaddw {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2s
}
int16x8_t test_vaddw_high_s8(int16x8_t a, int8x16_t b) {
- // CHECK: test_vaddw_high_s8
+ // CHECK-LABEL: test_vaddw_high_s8
return vaddw_high_s8(a, b);
- // CHECK: saddw2 {{v[0-31]+}}.8h, {{v[0-31]+}}.8h, {{v[0-31]+}}.16b
+ // CHECK: saddw2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.16b
}
int32x4_t test_vaddw_high_s16(int32x4_t a, int16x8_t b) {
- // CHECK: test_vaddw_high_s16
+ // CHECK-LABEL: test_vaddw_high_s16
return vaddw_high_s16(a, b);
- // CHECK: saddw2 {{v[0-31]+}}.4s, {{v[0-31]+}}.4s, {{v[0-31]+}}.8h
+ // CHECK: saddw2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.8h
}
int64x2_t test_vaddw_high_s32(int64x2_t a, int32x4_t b) {
- // CHECK: test_vaddw_high_s32
+ // CHECK-LABEL: test_vaddw_high_s32
return vaddw_high_s32(a, b);
- // CHECK: saddw2 {{v[0-31]+}}.2d, {{v[0-31]+}}.2d, {{v[0-31]+}}.4s
+ // CHECK: saddw2 {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.4s
}
uint16x8_t test_vaddw_high_u8(uint16x8_t a, uint8x16_t b) {
- // CHECK: test_vaddw_high_u8
+ // CHECK-LABEL: test_vaddw_high_u8
return vaddw_high_u8(a, b);
- // CHECK: uaddw2 {{v[0-31]+}}.8h, {{v[0-31]+}}.8h, {{v[0-31]+}}.16b
+ // CHECK: uaddw2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.16b
}
uint32x4_t test_vaddw_high_u16(uint32x4_t a, uint16x8_t b) {
- // CHECK: test_vaddw_high_u16
+ // CHECK-LABEL: test_vaddw_high_u16
return vaddw_high_u16(a, b);
- // CHECK: uaddw2 {{v[0-31]+}}.4s, {{v[0-31]+}}.4s, {{v[0-31]+}}.8h
+ // CHECK: uaddw2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.8h
}
uint64x2_t test_vaddw_high_u32(uint64x2_t a, uint32x4_t b) {
- // CHECK: test_vaddw_high_u32
+ // CHECK-LABEL: test_vaddw_high_u32
return vaddw_high_u32(a, b);
- // CHECK: uaddw2 {{v[0-31]+}}.2d, {{v[0-31]+}}.2d, {{v[0-31]+}}.4s
+ // CHECK: uaddw2 {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.4s
}
int16x8_t test_vsubl_s8(int8x8_t a, int8x8_t b) {
- // CHECK: test_vsubl_s8
+ // CHECK-LABEL: test_vsubl_s8
return vsubl_s8(a, b);
- // CHECK: ssubl {{v[0-31]+}}.8h, {{v[0-31]+}}.8b, {{v[0-31]+}}.8b
+ // CHECK: ssubl {{v[0-9]+}}.8h, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int32x4_t test_vsubl_s16(int16x4_t a, int16x4_t b) {
- // CHECK: test_vsubl_s16
+ // CHECK-LABEL: test_vsubl_s16
return vsubl_s16(a, b);
- // CHECK: ssubl {{v[0-31]+}}.4s, {{v[0-31]+}}.4h, {{v[0-31]+}}.4h
+ // CHECK: ssubl {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int64x2_t test_vsubl_s32(int32x2_t a, int32x2_t b) {
- // CHECK: test_vsubl_s32
+ // CHECK-LABEL: test_vsubl_s32
return vsubl_s32(a, b);
- // CHECK: ssubl {{v[0-31]+}}.2d, {{v[0-31]+}}.2s, {{v[0-31]+}}.2s
+ // CHECK: ssubl {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint16x8_t test_vsubl_u8(uint8x8_t a, uint8x8_t b) {
- // CHECK: test_vsubl_u8
+ // CHECK-LABEL: test_vsubl_u8
return vsubl_u8(a, b);
- // CHECK: usubl {{v[0-31]+}}.8h, {{v[0-31]+}}.8b, {{v[0-31]+}}.8b
+ // CHECK: usubl {{v[0-9]+}}.8h, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint32x4_t test_vsubl_u16(uint16x4_t a, uint16x4_t b) {
- // CHECK: test_vsubl_u16
+ // CHECK-LABEL: test_vsubl_u16
return vsubl_u16(a, b);
- // CHECK: usubl {{v[0-31]+}}.4s, {{v[0-31]+}}.4h, {{v[0-31]+}}.4h
+ // CHECK: usubl {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint64x2_t test_vsubl_u32(uint32x2_t a, uint32x2_t b) {
- // CHECK: test_vsubl_u32
+ // CHECK-LABEL: test_vsubl_u32
return vsubl_u32(a, b);
- // CHECK: usubl {{v[0-31]+}}.2d, {{v[0-31]+}}.2s, {{v[0-31]+}}.2s
+ // CHECK: usubl {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int16x8_t test_vsubl_high_s8(int8x16_t a, int8x16_t b) {
- // CHECK: test_vsubl_high_s8
+ // CHECK-LABEL: test_vsubl_high_s8
return vsubl_high_s8(a, b);
- // CHECK: ssubl2 {{v[0-31]+}}.8h, {{v[0-31]+}}.16b, {{v[0-31]+}}.16b
+ // CHECK: ssubl2 {{v[0-9]+}}.8h, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int32x4_t test_vsubl_high_s16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vsubl_high_s16
+ // CHECK-LABEL: test_vsubl_high_s16
return vsubl_high_s16(a, b);
- // CHECK: ssubl2 {{v[0-31]+}}.4s, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: ssubl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int64x2_t test_vsubl_high_s32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vsubl_high_s32
+ // CHECK-LABEL: test_vsubl_high_s32
return vsubl_high_s32(a, b);
- // CHECK: ssubl2 {{v[0-31]+}}.2d, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: ssubl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint16x8_t test_vsubl_high_u8(uint8x16_t a, uint8x16_t b) {
- // CHECK: test_vsubl_high_u8
+ // CHECK-LABEL: test_vsubl_high_u8
return vsubl_high_u8(a, b);
- // CHECK: usubl2 {{v[0-31]+}}.8h, {{v[0-31]+}}.16b, {{v[0-31]+}}.16b
+ // CHECK: usubl2 {{v[0-9]+}}.8h, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint32x4_t test_vsubl_high_u16(uint16x8_t a, uint16x8_t b) {
- // CHECK: test_vsubl_high_u16
+ // CHECK-LABEL: test_vsubl_high_u16
return vsubl_high_u16(a, b);
- // CHECK: usubl2 {{v[0-31]+}}.4s, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: usubl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint64x2_t test_vsubl_high_u32(uint32x4_t a, uint32x4_t b) {
- // CHECK: test_vsubl_high_u32
+ // CHECK-LABEL: test_vsubl_high_u32
return vsubl_high_u32(a, b);
- // CHECK: usubl2 {{v[0-31]+}}.2d, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: usubl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int16x8_t test_vsubw_s8(int16x8_t a, int8x8_t b) {
- // CHECK: test_vsubw_s8
+ // CHECK-LABEL: test_vsubw_s8
return vsubw_s8(a, b);
- // CHECK: ssubw {{v[0-31]+}}.8h, {{v[0-31]+}}.8h, {{v[0-31]+}}.8b
+ // CHECK: ssubw {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8b
}
int32x4_t test_vsubw_s16(int32x4_t a, int16x4_t b) {
- // CHECK: test_vsubw_s16
+ // CHECK-LABEL: test_vsubw_s16
return vsubw_s16(a, b);
- // CHECK: ssubw {{v[0-31]+}}.4s, {{v[0-31]+}}.4s, {{v[0-31]+}}.4h
+ // CHECK: ssubw {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4h
}
int64x2_t test_vsubw_s32(int64x2_t a, int32x2_t b) {
- // CHECK: test_vsubw_s32
+ // CHECK-LABEL: test_vsubw_s32
return vsubw_s32(a, b);
- // CHECK: ssubw {{v[0-31]+}}.2d, {{v[0-31]+}}.2d, {{v[0-31]+}}.2s
+ // CHECK: ssubw {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2s
}
uint16x8_t test_vsubw_u8(uint16x8_t a, uint8x8_t b) {
- // CHECK: test_vsubw_u8
+ // CHECK-LABEL: test_vsubw_u8
return vsubw_u8(a, b);
- // CHECK: usubw {{v[0-31]+}}.8h, {{v[0-31]+}}.8h, {{v[0-31]+}}.8b
+ // CHECK: usubw {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.8b
}
uint32x4_t test_vsubw_u16(uint32x4_t a, uint16x4_t b) {
- // CHECK: test_vsubw_u16
+ // CHECK-LABEL: test_vsubw_u16
return vsubw_u16(a, b);
- // CHECK: usubw {{v[0-31]+}}.4s, {{v[0-31]+}}.4s, {{v[0-31]+}}.4h
+ // CHECK: usubw {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.4h
}
uint64x2_t test_vsubw_u32(uint64x2_t a, uint32x2_t b) {
- // CHECK: test_vsubw_u32
+ // CHECK-LABEL: test_vsubw_u32
return vsubw_u32(a, b);
- // CHECK: usubw {{v[0-31]+}}.2d, {{v[0-31]+}}.2d, {{v[0-31]+}}.2s
+ // CHECK: usubw {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2s
}
int16x8_t test_vsubw_high_s8(int16x8_t a, int8x16_t b) {
- // CHECK: test_vsubw_high_s8
+ // CHECK-LABEL: test_vsubw_high_s8
return vsubw_high_s8(a, b);
- // CHECK: ssubw2 {{v[0-31]+}}.8h, {{v[0-31]+}}.8h, {{v[0-31]+}}.16b
+ // CHECK: ssubw2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.16b
}
int32x4_t test_vsubw_high_s16(int32x4_t a, int16x8_t b) {
- // CHECK: test_vsubw_high_s16
+ // CHECK-LABEL: test_vsubw_high_s16
return vsubw_high_s16(a, b);
- // CHECK: ssubw2 {{v[0-31]+}}.4s, {{v[0-31]+}}.4s, {{v[0-31]+}}.8h
+ // CHECK: ssubw2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.8h
}
int64x2_t test_vsubw_high_s32(int64x2_t a, int32x4_t b) {
- // CHECK: test_vsubw_high_s32
+ // CHECK-LABEL: test_vsubw_high_s32
return vsubw_high_s32(a, b);
- // CHECK: ssubw2 {{v[0-31]+}}.2d, {{v[0-31]+}}.2d, {{v[0-31]+}}.4s
+ // CHECK: ssubw2 {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.4s
}
uint16x8_t test_vsubw_high_u8(uint16x8_t a, uint8x16_t b) {
- // CHECK: test_vsubw_high_u8
+ // CHECK-LABEL: test_vsubw_high_u8
return vsubw_high_u8(a, b);
- // CHECK: usubw2 {{v[0-31]+}}.8h, {{v[0-31]+}}.8h, {{v[0-31]+}}.16b
+ // CHECK: usubw2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, {{v[0-9]+}}.16b
}
uint32x4_t test_vsubw_high_u16(uint32x4_t a, uint16x8_t b) {
- // CHECK: test_vsubw_high_u16
+ // CHECK-LABEL: test_vsubw_high_u16
return vsubw_high_u16(a, b);
- // CHECK: usubw2 {{v[0-31]+}}.4s, {{v[0-31]+}}.4s, {{v[0-31]+}}.8h
+ // CHECK: usubw2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, {{v[0-9]+}}.8h
}
uint64x2_t test_vsubw_high_u32(uint64x2_t a, uint32x4_t b) {
- // CHECK: test_vsubw_high_u32
+ // CHECK-LABEL: test_vsubw_high_u32
return vsubw_high_u32(a, b);
- // CHECK: usubw2 {{v[0-31]+}}.2d, {{v[0-31]+}}.2d, {{v[0-31]+}}.4s
+ // CHECK: usubw2 {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.4s
}
int8x8_t test_vaddhn_s16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vaddhn_s16
+ // CHECK-LABEL: test_vaddhn_s16
return vaddhn_s16(a, b);
- // CHECK: addhn {{v[0-31]+}}.8b, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: addhn {{v[0-9]+}}.8b, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int16x4_t test_vaddhn_s32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vaddhn_s32
+ // CHECK-LABEL: test_vaddhn_s32
return vaddhn_s32(a, b);
- // CHECK: addhn {{v[0-31]+}}.4h, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: addhn {{v[0-9]+}}.4h, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int32x2_t test_vaddhn_s64(int64x2_t a, int64x2_t b) {
- // CHECK: test_vaddhn_s64
+ // CHECK-LABEL: test_vaddhn_s64
return vaddhn_s64(a, b);
- // CHECK: addhn {{v[0-31]+}}.2s, {{v[0-31]+}}.2d, {{v[0-31]+}}.2d
+ // CHECK: addhn {{v[0-9]+}}.2s, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint8x8_t test_vaddhn_u16(uint16x8_t a, uint16x8_t b) {
- // CHECK: test_vaddhn_u16
+ // CHECK-LABEL: test_vaddhn_u16
return vaddhn_u16(a, b);
- // CHECK: addhn {{v[0-31]+}}.8b, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: addhn {{v[0-9]+}}.8b, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint16x4_t test_vaddhn_u32(uint32x4_t a, uint32x4_t b) {
- // CHECK: test_vaddhn_u32
+ // CHECK-LABEL: test_vaddhn_u32
return vaddhn_u32(a, b);
- // CHECK: addhn {{v[0-31]+}}.4h, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: addhn {{v[0-9]+}}.4h, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint32x2_t test_vaddhn_u64(uint64x2_t a, uint64x2_t b) {
- // CHECK: test_vaddhn_u64
+ // CHECK-LABEL: test_vaddhn_u64
return vaddhn_u64(a, b);
- // CHECK: addhn {{v[0-31]+}}.2s, {{v[0-31]+}}.2d, {{v[0-31]+}}.2d
+ // CHECK: addhn {{v[0-9]+}}.2s, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
int8x16_t test_vaddhn_high_s16(int8x8_t r, int16x8_t a, int16x8_t b) {
- // CHECK: test_vaddhn_high_s16
+ // CHECK-LABEL: test_vaddhn_high_s16
return vaddhn_high_s16(r, a, b);
- // CHECK: addhn2 {{v[0-31]+}}.16b, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: addhn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int16x8_t test_vaddhn_high_s32(int16x4_t r, int32x4_t a, int32x4_t b) {
- // CHECK: test_vaddhn_high_s32
+ // CHECK-LABEL: test_vaddhn_high_s32
return vaddhn_high_s32(r, a, b);
- // CHECK: addhn2 {{v[0-31]+}}.8h, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: addhn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int32x4_t test_vaddhn_high_s64(int32x2_t r, int64x2_t a, int64x2_t b) {
- // CHECK: test_vaddhn_high_s64
+ // CHECK-LABEL: test_vaddhn_high_s64
return vaddhn_high_s64(r, a, b);
- // CHECK: addhn2 {{v[0-31]+}}.4s, {{v[0-31]+}}.2d, {{v[0-31]+}}.2d
+ // CHECK: addhn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint8x16_t test_vaddhn_high_u16(uint8x8_t r, uint16x8_t a, uint16x8_t b) {
- // CHECK: test_vaddhn_high_u16
+ // CHECK-LABEL: test_vaddhn_high_u16
return vaddhn_high_u16(r, a, b);
- // CHECK: addhn2 {{v[0-31]+}}.16b, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: addhn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint16x8_t test_vaddhn_high_u32(uint16x4_t r, uint32x4_t a, uint32x4_t b) {
- // CHECK: test_vaddhn_high_u32
+ // CHECK-LABEL: test_vaddhn_high_u32
return vaddhn_high_u32(r, a, b);
- // CHECK: addhn2 {{v[0-31]+}}.8h, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: addhn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint32x4_t test_vaddhn_high_u64(uint32x2_t r, uint64x2_t a, uint64x2_t b) {
- // CHECK: test_vaddhn_high_u64
+ // CHECK-LABEL: test_vaddhn_high_u64
return vaddhn_high_u64(r, a, b);
- // CHECK: addhn2 {{v[0-31]+}}.4s, {{v[0-31]+}}.2d, {{v[0-31]+}}.2d
+ // CHECK: addhn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
int8x8_t test_vraddhn_s16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vraddhn_s16
+ // CHECK-LABEL: test_vraddhn_s16
return vraddhn_s16(a, b);
- // CHECK: raddhn {{v[0-31]+}}.8b, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: raddhn {{v[0-9]+}}.8b, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int16x4_t test_vraddhn_s32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vraddhn_s32
+ // CHECK-LABEL: test_vraddhn_s32
return vraddhn_s32(a, b);
- // CHECK: raddhn {{v[0-31]+}}.4h, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: raddhn {{v[0-9]+}}.4h, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int32x2_t test_vraddhn_s64(int64x2_t a, int64x2_t b) {
- // CHECK: test_vraddhn_s64
+ // CHECK-LABEL: test_vraddhn_s64
return vraddhn_s64(a, b);
- // CHECK: raddhn {{v[0-31]+}}.2s, {{v[0-31]+}}.2d, {{v[0-31]+}}.2d
+ // CHECK: raddhn {{v[0-9]+}}.2s, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint8x8_t test_vraddhn_u16(uint16x8_t a, uint16x8_t b) {
- // CHECK: test_vraddhn_u16
+ // CHECK-LABEL: test_vraddhn_u16
return vraddhn_u16(a, b);
- // CHECK: raddhn {{v[0-31]+}}.8b, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: raddhn {{v[0-9]+}}.8b, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint16x4_t test_vraddhn_u32(uint32x4_t a, uint32x4_t b) {
- // CHECK: test_vraddhn_u32
+ // CHECK-LABEL: test_vraddhn_u32
return vraddhn_u32(a, b);
- // CHECK: raddhn {{v[0-31]+}}.4h, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: raddhn {{v[0-9]+}}.4h, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint32x2_t test_vraddhn_u64(uint64x2_t a, uint64x2_t b) {
- // CHECK: test_vraddhn_u64
+ // CHECK-LABEL: test_vraddhn_u64
return vraddhn_u64(a, b);
- // CHECK: raddhn {{v[0-31]+}}.2s, {{v[0-31]+}}.2d, {{v[0-31]+}}.2d
+ // CHECK: raddhn {{v[0-9]+}}.2s, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
int8x16_t test_vraddhn_high_s16(int8x8_t r, int16x8_t a, int16x8_t b) {
- // CHECK: test_vraddhn_high_s16
+ // CHECK-LABEL: test_vraddhn_high_s16
return vraddhn_high_s16(r, a, b);
- // CHECK: raddhn2 {{v[0-31]+}}.16b, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: raddhn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int16x8_t test_vraddhn_high_s32(int16x4_t r, int32x4_t a, int32x4_t b) {
- // CHECK: test_vraddhn_high_s32
+ // CHECK-LABEL: test_vraddhn_high_s32
return vraddhn_high_s32(r, a, b);
- // CHECK: raddhn2 {{v[0-31]+}}.8h, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: raddhn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int32x4_t test_vraddhn_high_s64(int32x2_t r, int64x2_t a, int64x2_t b) {
- // CHECK: test_vraddhn_high_s64
+ // CHECK-LABEL: test_vraddhn_high_s64
return vraddhn_high_s64(r, a, b);
- // CHECK: raddhn2 {{v[0-31]+}}.4s, {{v[0-31]+}}.2d, {{v[0-31]+}}.2d
+ // CHECK: raddhn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint8x16_t test_vraddhn_high_u16(uint8x8_t r, uint16x8_t a, uint16x8_t b) {
- // CHECK: test_vraddhn_high_u16
+ // CHECK-LABEL: test_vraddhn_high_u16
return vraddhn_high_u16(r, a, b);
- // CHECK: raddhn2 {{v[0-31]+}}.16b, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: raddhn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint16x8_t test_vraddhn_high_u32(uint16x4_t r, uint32x4_t a, uint32x4_t b) {
- // CHECK: test_vraddhn_high_u32
+ // CHECK-LABEL: test_vraddhn_high_u32
return vraddhn_high_u32(r, a, b);
- // CHECK: raddhn2 {{v[0-31]+}}.8h, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: raddhn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint32x4_t test_vraddhn_high_u64(uint32x2_t r, uint64x2_t a, uint64x2_t b) {
- // CHECK: test_vraddhn_high_u64
+ // CHECK-LABEL: test_vraddhn_high_u64
return vraddhn_high_u64(r, a, b);
- // CHECK: raddhn2 {{v[0-31]+}}.4s, {{v[0-31]+}}.2d, {{v[0-31]+}}.2d
+ // CHECK: raddhn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
int8x8_t test_vsubhn_s16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vsubhn_s16
+ // CHECK-LABEL: test_vsubhn_s16
return vsubhn_s16(a, b);
- // CHECK: subhn {{v[0-31]+}}.8b, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: subhn {{v[0-9]+}}.8b, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int16x4_t test_vsubhn_s32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vsubhn_s32
+ // CHECK-LABEL: test_vsubhn_s32
return vsubhn_s32(a, b);
- // CHECK: subhn {{v[0-31]+}}.4h, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: subhn {{v[0-9]+}}.4h, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int32x2_t test_vsubhn_s64(int64x2_t a, int64x2_t b) {
- // CHECK: test_vsubhn_s64
+ // CHECK-LABEL: test_vsubhn_s64
return vsubhn_s64(a, b);
- // CHECK: subhn {{v[0-31]+}}.2s, {{v[0-31]+}}.2d, {{v[0-31]+}}.2d
+ // CHECK: subhn {{v[0-9]+}}.2s, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint8x8_t test_vsubhn_u16(uint16x8_t a, uint16x8_t b) {
- // CHECK: test_vsubhn_u16
+ // CHECK-LABEL: test_vsubhn_u16
return vsubhn_u16(a, b);
- // CHECK: subhn {{v[0-31]+}}.8b, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: subhn {{v[0-9]+}}.8b, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint16x4_t test_vsubhn_u32(uint32x4_t a, uint32x4_t b) {
- // CHECK: test_vsubhn_u32
+ // CHECK-LABEL: test_vsubhn_u32
return vsubhn_u32(a, b);
- // CHECK: subhn {{v[0-31]+}}.4h, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: subhn {{v[0-9]+}}.4h, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint32x2_t test_vsubhn_u64(uint64x2_t a, uint64x2_t b) {
- // CHECK: test_vsubhn_u64
+ // CHECK-LABEL: test_vsubhn_u64
return vsubhn_u64(a, b);
- // CHECK: subhn {{v[0-31]+}}.2s, {{v[0-31]+}}.2d, {{v[0-31]+}}.2d
+ // CHECK: subhn {{v[0-9]+}}.2s, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
int8x16_t test_vsubhn_high_s16(int8x8_t r, int16x8_t a, int16x8_t b) {
- // CHECK: test_vsubhn_high_s16
+ // CHECK-LABEL: test_vsubhn_high_s16
return vsubhn_high_s16(r, a, b);
- // CHECK: subhn2 {{v[0-31]+}}.16b, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: subhn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int16x8_t test_vsubhn_high_s32(int16x4_t r, int32x4_t a, int32x4_t b) {
- // CHECK: test_vsubhn_high_s32
+ // CHECK-LABEL: test_vsubhn_high_s32
return vsubhn_high_s32(r, a, b);
- // CHECK: subhn2 {{v[0-31]+}}.8h, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: subhn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int32x4_t test_vsubhn_high_s64(int32x2_t r, int64x2_t a, int64x2_t b) {
- // CHECK: test_vsubhn_high_s64
+ // CHECK-LABEL: test_vsubhn_high_s64
return vsubhn_high_s64(r, a, b);
- // CHECK: subhn2 {{v[0-31]+}}.4s, {{v[0-31]+}}.2d, {{v[0-31]+}}.2d
+ // CHECK: subhn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint8x16_t test_vsubhn_high_u16(uint8x8_t r, uint16x8_t a, uint16x8_t b) {
- // CHECK: test_vsubhn_high_u16
+ // CHECK-LABEL: test_vsubhn_high_u16
return vsubhn_high_u16(r, a, b);
- // CHECK: subhn2 {{v[0-31]+}}.16b, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: subhn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint16x8_t test_vsubhn_high_u32(uint16x4_t r, uint32x4_t a, uint32x4_t b) {
- // CHECK: test_vsubhn_high_u32
+ // CHECK-LABEL: test_vsubhn_high_u32
return vsubhn_high_u32(r, a, b);
- // CHECK: subhn2 {{v[0-31]+}}.8h, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: subhn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint32x4_t test_vsubhn_high_u64(uint32x2_t r, uint64x2_t a, uint64x2_t b) {
- // CHECK: test_vsubhn_high_u64
+ // CHECK-LABEL: test_vsubhn_high_u64
return vsubhn_high_u64(r, a, b);
- // CHECK: subhn2 {{v[0-31]+}}.4s, {{v[0-31]+}}.2d, {{v[0-31]+}}.2d
+ // CHECK: subhn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
int8x8_t test_vrsubhn_s16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vrsubhn_s16
+ // CHECK-LABEL: test_vrsubhn_s16
return vrsubhn_s16(a, b);
- // CHECK: rsubhn {{v[0-31]+}}.8b, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: rsubhn {{v[0-9]+}}.8b, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int16x4_t test_vrsubhn_s32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vrsubhn_s32
+ // CHECK-LABEL: test_vrsubhn_s32
return vrsubhn_s32(a, b);
- // CHECK: rsubhn {{v[0-31]+}}.4h, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: rsubhn {{v[0-9]+}}.4h, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int32x2_t test_vrsubhn_s64(int64x2_t a, int64x2_t b) {
- // CHECK: test_vrsubhn_s64
+ // CHECK-LABEL: test_vrsubhn_s64
return vrsubhn_s64(a, b);
- // CHECK: rsubhn {{v[0-31]+}}.2s, {{v[0-31]+}}.2d, {{v[0-31]+}}.2d
+ // CHECK: rsubhn {{v[0-9]+}}.2s, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint8x8_t test_vrsubhn_u16(uint16x8_t a, uint16x8_t b) {
- // CHECK: test_vrsubhn_u16
+ // CHECK-LABEL: test_vrsubhn_u16
return vrsubhn_u16(a, b);
- // CHECK: rsubhn {{v[0-31]+}}.8b, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: rsubhn {{v[0-9]+}}.8b, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint16x4_t test_vrsubhn_u32(uint32x4_t a, uint32x4_t b) {
- // CHECK: test_vrsubhn_u32
+ // CHECK-LABEL: test_vrsubhn_u32
return vrsubhn_u32(a, b);
- // CHECK: rsubhn {{v[0-31]+}}.4h, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: rsubhn {{v[0-9]+}}.4h, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint32x2_t test_vrsubhn_u64(uint64x2_t a, uint64x2_t b) {
- // CHECK: test_vrsubhn_u64
+ // CHECK-LABEL: test_vrsubhn_u64
return vrsubhn_u64(a, b);
- // CHECK: rsubhn {{v[0-31]+}}.2s, {{v[0-31]+}}.2d, {{v[0-31]+}}.2d
+ // CHECK: rsubhn {{v[0-9]+}}.2s, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
int8x16_t test_vrsubhn_high_s16(int8x8_t r, int16x8_t a, int16x8_t b) {
- // CHECK: test_vrsubhn_high_s16
+ // CHECK-LABEL: test_vrsubhn_high_s16
return vrsubhn_high_s16(r, a, b);
- // CHECK: rsubhn2 {{v[0-31]+}}.16b, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: rsubhn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int16x8_t test_vrsubhn_high_s32(int16x4_t r, int32x4_t a, int32x4_t b) {
- // CHECK: test_vrsubhn_high_s32
+ // CHECK-LABEL: test_vrsubhn_high_s32
return vrsubhn_high_s32(r, a, b);
- // CHECK: rsubhn2 {{v[0-31]+}}.8h, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: rsubhn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int32x4_t test_vrsubhn_high_s64(int32x2_t r, int64x2_t a, int64x2_t b) {
- // CHECK: test_vrsubhn_high_s64
+ // CHECK-LABEL: test_vrsubhn_high_s64
return vrsubhn_high_s64(r, a, b);
- // CHECK: rsubhn2 {{v[0-31]+}}.4s, {{v[0-31]+}}.2d, {{v[0-31]+}}.2d
+ // CHECK: rsubhn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint8x16_t test_vrsubhn_high_u16(uint8x8_t r, uint16x8_t a, uint16x8_t b) {
- // CHECK: test_vrsubhn_high_u16
+ // CHECK-LABEL: test_vrsubhn_high_u16
return vrsubhn_high_u16(r, a, b);
- // CHECK: rsubhn2 {{v[0-31]+}}.16b, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: rsubhn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint16x8_t test_vrsubhn_high_u32(uint16x4_t r, uint32x4_t a, uint32x4_t b) {
- // CHECK: test_vrsubhn_high_u32
+ // CHECK-LABEL: test_vrsubhn_high_u32
return vrsubhn_high_u32(r, a, b);
- // CHECK: rsubhn2 {{v[0-31]+}}.8h, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: rsubhn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint32x4_t test_vrsubhn_high_u64(uint32x2_t r, uint64x2_t a, uint64x2_t b) {
- // CHECK: test_vrsubhn_high_u64
+ // CHECK-LABEL: test_vrsubhn_high_u64
return vrsubhn_high_u64(r, a, b);
- // CHECK: rsubhn2 {{v[0-31]+}}.4s, {{v[0-31]+}}.2d, {{v[0-31]+}}.2d
+ // CHECK: rsubhn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
int16x8_t test_vabdl_s8(int8x8_t a, int8x8_t b) {
- // CHECK: test_vabdl_s8
+ // CHECK-LABEL: test_vabdl_s8
return vabdl_s8(a, b);
- // CHECK: sabdl {{v[0-31]+}}.8h, {{v[0-31]+}}.8b, {{v[0-31]+}}.8b
+ // CHECK: sabdl {{v[0-9]+}}.8h, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int32x4_t test_vabdl_s16(int16x4_t a, int16x4_t b) {
- // CHECK: test_vabdl_s16
+ // CHECK-LABEL: test_vabdl_s16
return vabdl_s16(a, b);
- // CHECK: sabdl {{v[0-31]+}}.4s, {{v[0-31]+}}.4h, {{v[0-31]+}}.4h
+ // CHECK: sabdl {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int64x2_t test_vabdl_s32(int32x2_t a, int32x2_t b) {
- // CHECK: test_vabdl_s32
+ // CHECK-LABEL: test_vabdl_s32
return vabdl_s32(a, b);
- // CHECK: sabdl {{v[0-31]+}}.2d, {{v[0-31]+}}.2s, {{v[0-31]+}}.2s
+ // CHECK: sabdl {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint16x8_t test_vabdl_u8(uint8x8_t a, uint8x8_t b) {
- // CHECK: test_vabdl_u8
+ // CHECK-LABEL: test_vabdl_u8
return vabdl_u8(a, b);
- // CHECK: uabdl {{v[0-31]+}}.8h, {{v[0-31]+}}.8b, {{v[0-31]+}}.8b
+ // CHECK: uabdl {{v[0-9]+}}.8h, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint32x4_t test_vabdl_u16(uint16x4_t a, uint16x4_t b) {
- // CHECK: test_vabdl_u16
+ // CHECK-LABEL: test_vabdl_u16
return vabdl_u16(a, b);
- // CHECK: uabdl {{v[0-31]+}}.4s, {{v[0-31]+}}.4h, {{v[0-31]+}}.4h
+ // CHECK: uabdl {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint64x2_t test_vabdl_u32(uint32x2_t a, uint32x2_t b) {
- // CHECK: test_vabdl_u32
+ // CHECK-LABEL: test_vabdl_u32
return vabdl_u32(a, b);
- // CHECK: uabdl {{v[0-31]+}}.2d, {{v[0-31]+}}.2s, {{v[0-31]+}}.2s
+ // CHECK: uabdl {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int16x8_t test_vabal_s8(int16x8_t a, int8x8_t b, int8x8_t c) {
- // CHECK: test_vabal_s8
+ // CHECK-LABEL: test_vabal_s8
return vabal_s8(a, b, c);
- // CHECK: sabal {{v[0-31]+}}.8h, {{v[0-31]+}}.8b, {{v[0-31]+}}.8b
+ // CHECK: sabal {{v[0-9]+}}.8h, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int32x4_t test_vabal_s16(int32x4_t a, int16x4_t b, int16x4_t c) {
- // CHECK: test_vabal_s16
+ // CHECK-LABEL: test_vabal_s16
return vabal_s16(a, b, c);
- // CHECK: sabal {{v[0-31]+}}.4s, {{v[0-31]+}}.4h, {{v[0-31]+}}.4h
+ // CHECK: sabal {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int64x2_t test_vabal_s32(int64x2_t a, int32x2_t b, int32x2_t c) {
- // CHECK: test_vabal_s32
+ // CHECK-LABEL: test_vabal_s32
return vabal_s32(a, b, c);
- // CHECK: sabal {{v[0-31]+}}.2d, {{v[0-31]+}}.2s, {{v[0-31]+}}.2s
+ // CHECK: sabal {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint16x8_t test_vabal_u8(uint16x8_t a, uint8x8_t b, uint8x8_t c) {
- // CHECK: test_vabal_u8
+ // CHECK-LABEL: test_vabal_u8
return vabal_u8(a, b, c);
- // CHECK: uabal {{v[0-31]+}}.8h, {{v[0-31]+}}.8b, {{v[0-31]+}}.8b
+ // CHECK: uabal {{v[0-9]+}}.8h, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint32x4_t test_vabal_u16(uint32x4_t a, uint16x4_t b, uint16x4_t c) {
- // CHECK: test_vabal_u16
+ // CHECK-LABEL: test_vabal_u16
return vabal_u16(a, b, c);
- // CHECK: uabal {{v[0-31]+}}.4s, {{v[0-31]+}}.4h, {{v[0-31]+}}.4h
+ // CHECK: uabal {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint64x2_t test_vabal_u32(uint64x2_t a, uint32x2_t b, uint32x2_t c) {
- // CHECK: test_vabal_u32
+ // CHECK-LABEL: test_vabal_u32
return vabal_u32(a, b, c);
- // CHECK: uabal {{v[0-31]+}}.2d, {{v[0-31]+}}.2s, {{v[0-31]+}}.2s
+ // CHECK: uabal {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int16x8_t test_vabdl_high_s8(int8x16_t a, int8x16_t b) {
- // CHECK: test_vabdl_high_s8
+ // CHECK-LABEL: test_vabdl_high_s8
return vabdl_high_s8(a, b);
- // CHECK: sabdl2 {{v[0-31]+}}.8h, {{v[0-31]+}}.16b, {{v[0-31]+}}.16b
+ // CHECK: sabdl2 {{v[0-9]+}}.8h, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int32x4_t test_vabdl_high_s16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vabdl_high_s16
+ // CHECK-LABEL: test_vabdl_high_s16
return vabdl_high_s16(a, b);
- // CHECK: sabdl2 {{v[0-31]+}}.4s, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: sabdl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int64x2_t test_vabdl_high_s32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vabdl_high_s32
+ // CHECK-LABEL: test_vabdl_high_s32
return vabdl_high_s32(a, b);
- // CHECK: sabdl2 {{v[0-31]+}}.2d, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: sabdl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint16x8_t test_vabdl_high_u8(uint8x16_t a, uint8x16_t b) {
- // CHECK: test_vabdl_high_u8
+ // CHECK-LABEL: test_vabdl_high_u8
return vabdl_high_u8(a, b);
- // CHECK: uabdl2 {{v[0-31]+}}.8h, {{v[0-31]+}}.16b, {{v[0-31]+}}.16b
+ // CHECK: uabdl2 {{v[0-9]+}}.8h, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint32x4_t test_vabdl_high_u16(uint16x8_t a, uint16x8_t b) {
- // CHECK: test_vabdl_high_u16
+ // CHECK-LABEL: test_vabdl_high_u16
return vabdl_high_u16(a, b);
- // CHECK: uabdl2 {{v[0-31]+}}.4s, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: uabdl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint64x2_t test_vabdl_high_u32(uint32x4_t a, uint32x4_t b) {
- // CHECK: test_vabdl_high_u32
+ // CHECK-LABEL: test_vabdl_high_u32
return vabdl_high_u32(a, b);
- // CHECK: uabdl2 {{v[0-31]+}}.2d, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: uabdl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int16x8_t test_vabal_high_s8(int16x8_t a, int8x16_t b, int8x16_t c) {
- // CHECK: test_vabal_high_s8
+ // CHECK-LABEL: test_vabal_high_s8
return vabal_high_s8(a, b, c);
- // CHECK: sabal2 {{v[0-31]+}}.8h, {{v[0-31]+}}.16b, {{v[0-31]+}}.16b
+ // CHECK: sabal2 {{v[0-9]+}}.8h, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int32x4_t test_vabal_high_s16(int32x4_t a, int16x8_t b, int16x8_t c) {
- // CHECK: test_vabal_high_s16
+ // CHECK-LABEL: test_vabal_high_s16
return vabal_high_s16(a, b, c);
- // CHECK: sabal2 {{v[0-31]+}}.4s, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: sabal2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int64x2_t test_vabal_high_s32(int64x2_t a, int32x4_t b, int32x4_t c) {
- // CHECK: test_vabal_high_s32
+ // CHECK-LABEL: test_vabal_high_s32
return vabal_high_s32(a, b, c);
- // CHECK: sabal2 {{v[0-31]+}}.2d, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: sabal2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint16x8_t test_vabal_high_u8(uint16x8_t a, uint8x16_t b, uint8x16_t c) {
- // CHECK: test_vabal_high_u8
+ // CHECK-LABEL: test_vabal_high_u8
return vabal_high_u8(a, b, c);
- // CHECK: uabal2 {{v[0-31]+}}.8h, {{v[0-31]+}}.16b, {{v[0-31]+}}.16b
+ // CHECK: uabal2 {{v[0-9]+}}.8h, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint32x4_t test_vabal_high_u16(uint32x4_t a, uint16x8_t b, uint16x8_t c) {
- // CHECK: test_vabal_high_u16
+ // CHECK-LABEL: test_vabal_high_u16
return vabal_high_u16(a, b, c);
- // CHECK: uabal2 {{v[0-31]+}}.4s, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: uabal2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint64x2_t test_vabal_high_u32(uint64x2_t a, uint32x4_t b, uint32x4_t c) {
- // CHECK: test_vabal_high_u32
+ // CHECK-LABEL: test_vabal_high_u32
return vabal_high_u32(a, b, c);
- // CHECK: uabal2 {{v[0-31]+}}.2d, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: uabal2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int16x8_t test_vmull_s8(int8x8_t a, int8x8_t b) {
- // CHECK: test_vmull_s8
+ // CHECK-LABEL: test_vmull_s8
return vmull_s8(a, b);
- // CHECK: smull {{v[0-31]+}}.8h, {{v[0-31]+}}.8b, {{v[0-31]+}}.8b
+ // CHECK: smull {{v[0-9]+}}.8h, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int32x4_t test_vmull_s16(int16x4_t a, int16x4_t b) {
- // CHECK: test_vmull_s16
+ // CHECK-LABEL: test_vmull_s16
return vmull_s16(a, b);
- // CHECK: smull {{v[0-31]+}}.4s, {{v[0-31]+}}.4h, {{v[0-31]+}}.4h
+ // CHECK: smull {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int64x2_t test_vmull_s32(int32x2_t a, int32x2_t b) {
- // CHECK: test_vmull_s32
+ // CHECK-LABEL: test_vmull_s32
return vmull_s32(a, b);
- // CHECK: smull {{v[0-31]+}}.2d, {{v[0-31]+}}.2s, {{v[0-31]+}}.2s
+ // CHECK: smull {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint16x8_t test_vmull_u8(uint8x8_t a, uint8x8_t b) {
- // CHECK: test_vmull_u8
+ // CHECK-LABEL: test_vmull_u8
return vmull_u8(a, b);
- // CHECK: umull {{v[0-31]+}}.8h, {{v[0-31]+}}.8b, {{v[0-31]+}}.8b
+ // CHECK: umull {{v[0-9]+}}.8h, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint32x4_t test_vmull_u16(uint16x4_t a, uint16x4_t b) {
- // CHECK: test_vmull_u16
+ // CHECK-LABEL: test_vmull_u16
return vmull_u16(a, b);
- // CHECK: umull {{v[0-31]+}}.4s, {{v[0-31]+}}.4h, {{v[0-31]+}}.4h
+ // CHECK: umull {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint64x2_t test_vmull_u32(uint32x2_t a, uint32x2_t b) {
- // CHECK: test_vmull_u32
+ // CHECK-LABEL: test_vmull_u32
return vmull_u32(a, b);
- // CHECK: umull {{v[0-31]+}}.2d, {{v[0-31]+}}.2s, {{v[0-31]+}}.2s
+ // CHECK: umull {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int16x8_t test_vmull_high_s8(int8x16_t a, int8x16_t b) {
- // CHECK: test_vmull_high_s8
+ // CHECK-LABEL: test_vmull_high_s8
return vmull_high_s8(a, b);
- // CHECK: smull2 {{v[0-31]+}}.8h, {{v[0-31]+}}.16b, {{v[0-31]+}}.16b
+ // CHECK: smull2 {{v[0-9]+}}.8h, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int32x4_t test_vmull_high_s16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vmull_high_s16
+ // CHECK-LABEL: test_vmull_high_s16
return vmull_high_s16(a, b);
- // CHECK: smull2 {{v[0-31]+}}.4s, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: smull2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int64x2_t test_vmull_high_s32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vmull_high_s32
+ // CHECK-LABEL: test_vmull_high_s32
return vmull_high_s32(a, b);
- // CHECK: smull2 {{v[0-31]+}}.2d, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: smull2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint16x8_t test_vmull_high_u8(uint8x16_t a, uint8x16_t b) {
- // CHECK: test_vmull_high_u8
+ // CHECK-LABEL: test_vmull_high_u8
return vmull_high_u8(a, b);
- // CHECK: umull2 {{v[0-31]+}}.8h, {{v[0-31]+}}.16b, {{v[0-31]+}}.16b
+ // CHECK: umull2 {{v[0-9]+}}.8h, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint32x4_t test_vmull_high_u16(uint16x8_t a, uint16x8_t b) {
- // CHECK: test_vmull_high_u16
+ // CHECK-LABEL: test_vmull_high_u16
return vmull_high_u16(a, b);
- // CHECK: umull2 {{v[0-31]+}}.4s, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: umull2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint64x2_t test_vmull_high_u32(uint32x4_t a, uint32x4_t b) {
- // CHECK: test_vmull_high_u32
+ // CHECK-LABEL: test_vmull_high_u32
return vmull_high_u32(a, b);
- // CHECK: umull2 {{v[0-31]+}}.2d, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: umull2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int16x8_t test_vmlal_s8(int16x8_t a, int8x8_t b, int8x8_t c) {
- // CHECK: test_vmlal_s8
+ // CHECK-LABEL: test_vmlal_s8
return vmlal_s8(a, b, c);
- // CHECK: smlal {{v[0-31]+}}.8h, {{v[0-31]+}}.8b, {{v[0-31]+}}.8b
+ // CHECK: smlal {{v[0-9]+}}.8h, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int32x4_t test_vmlal_s16(int32x4_t a, int16x4_t b, int16x4_t c) {
- // CHECK: test_vmlal_s16
+ // CHECK-LABEL: test_vmlal_s16
return vmlal_s16(a, b, c);
- // CHECK: smlal {{v[0-31]+}}.4s, {{v[0-31]+}}.4h, {{v[0-31]+}}.4h
+ // CHECK: smlal {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int64x2_t test_vmlal_s32(int64x2_t a, int32x2_t b, int32x2_t c) {
- // CHECK: test_vmlal_s32
+ // CHECK-LABEL: test_vmlal_s32
return vmlal_s32(a, b, c);
- // CHECK: smlal {{v[0-31]+}}.2d, {{v[0-31]+}}.2s, {{v[0-31]+}}.2s
+ // CHECK: smlal {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint16x8_t test_vmlal_u8(uint16x8_t a, uint8x8_t b, uint8x8_t c) {
- // CHECK: test_vmlal_u8
+ // CHECK-LABEL: test_vmlal_u8
return vmlal_u8(a, b, c);
- // CHECK: umlal {{v[0-31]+}}.8h, {{v[0-31]+}}.8b, {{v[0-31]+}}.8b
+ // CHECK: umlal {{v[0-9]+}}.8h, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint32x4_t test_vmlal_u16(uint32x4_t a, uint16x4_t b, uint16x4_t c) {
- // CHECK: test_vmlal_u16
+ // CHECK-LABEL: test_vmlal_u16
return vmlal_u16(a, b, c);
- // CHECK: umlal {{v[0-31]+}}.4s, {{v[0-31]+}}.4h, {{v[0-31]+}}.4h
+ // CHECK: umlal {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint64x2_t test_vmlal_u32(uint64x2_t a, uint32x2_t b, uint32x2_t c) {
- // CHECK: test_vmlal_u32
+ // CHECK-LABEL: test_vmlal_u32
return vmlal_u32(a, b, c);
- // CHECK: umlal {{v[0-31]+}}.2d, {{v[0-31]+}}.2s, {{v[0-31]+}}.2s
+ // CHECK: umlal {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int16x8_t test_vmlal_high_s8(int16x8_t a, int8x16_t b, int8x16_t c) {
- // CHECK: test_vmlal_high_s8
+ // CHECK-LABEL: test_vmlal_high_s8
return vmlal_high_s8(a, b, c);
- // CHECK: smlal2 {{v[0-31]+}}.8h, {{v[0-31]+}}.16b, {{v[0-31]+}}.16b
+ // CHECK: smlal2 {{v[0-9]+}}.8h, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int32x4_t test_vmlal_high_s16(int32x4_t a, int16x8_t b, int16x8_t c) {
- // CHECK: test_vmlal_high_s16
+ // CHECK-LABEL: test_vmlal_high_s16
return vmlal_high_s16(a, b, c);
- // CHECK: smlal2 {{v[0-31]+}}.4s, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: smlal2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int64x2_t test_vmlal_high_s32(int64x2_t a, int32x4_t b, int32x4_t c) {
- // CHECK: test_vmlal_high_s32
+ // CHECK-LABEL: test_vmlal_high_s32
return vmlal_high_s32(a, b, c);
- // CHECK: smlal2 {{v[0-31]+}}.2d, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: smlal2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint16x8_t test_vmlal_high_u8(uint16x8_t a, uint8x16_t b, uint8x16_t c) {
- // CHECK: test_vmlal_high_u8
+ // CHECK-LABEL: test_vmlal_high_u8
return vmlal_high_u8(a, b, c);
- // CHECK: umlal2 {{v[0-31]+}}.8h, {{v[0-31]+}}.16b, {{v[0-31]+}}.16b
+ // CHECK: umlal2 {{v[0-9]+}}.8h, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint32x4_t test_vmlal_high_u16(uint32x4_t a, uint16x8_t b, uint16x8_t c) {
- // CHECK: test_vmlal_high_u16
+ // CHECK-LABEL: test_vmlal_high_u16
return vmlal_high_u16(a, b, c);
- // CHECK: umlal2 {{v[0-31]+}}.4s, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: umlal2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint64x2_t test_vmlal_high_u32(uint64x2_t a, uint32x4_t b, uint32x4_t c) {
- // CHECK: test_vmlal_high_u32
+ // CHECK-LABEL: test_vmlal_high_u32
return vmlal_high_u32(a, b, c);
- // CHECK: umlal2 {{v[0-31]+}}.2d, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: umlal2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int16x8_t test_vmlsl_s8(int16x8_t a, int8x8_t b, int8x8_t c) {
- // CHECK: test_vmlsl_s8
+ // CHECK-LABEL: test_vmlsl_s8
return vmlsl_s8(a, b, c);
- // CHECK: smlsl {{v[0-31]+}}.8h, {{v[0-31]+}}.8b, {{v[0-31]+}}.8b
+ // CHECK: smlsl {{v[0-9]+}}.8h, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int32x4_t test_vmlsl_s16(int32x4_t a, int16x4_t b, int16x4_t c) {
- // CHECK: test_vmlsl_s16
+ // CHECK-LABEL: test_vmlsl_s16
return vmlsl_s16(a, b, c);
- // CHECK: smlsl {{v[0-31]+}}.4s, {{v[0-31]+}}.4h, {{v[0-31]+}}.4h
+ // CHECK: smlsl {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int64x2_t test_vmlsl_s32(int64x2_t a, int32x2_t b, int32x2_t c) {
- // CHECK: test_vmlsl_s32
+ // CHECK-LABEL: test_vmlsl_s32
return vmlsl_s32(a, b, c);
- // CHECK: smlsl {{v[0-31]+}}.2d, {{v[0-31]+}}.2s, {{v[0-31]+}}.2s
+ // CHECK: smlsl {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
uint16x8_t test_vmlsl_u8(uint16x8_t a, uint8x8_t b, uint8x8_t c) {
- // CHECK: test_vmlsl_u8
+ // CHECK-LABEL: test_vmlsl_u8
return vmlsl_u8(a, b, c);
- // CHECK: umlsl {{v[0-31]+}}.8h, {{v[0-31]+}}.8b, {{v[0-31]+}}.8b
+ // CHECK: umlsl {{v[0-9]+}}.8h, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint32x4_t test_vmlsl_u16(uint32x4_t a, uint16x4_t b, uint16x4_t c) {
- // CHECK: test_vmlsl_u16
+ // CHECK-LABEL: test_vmlsl_u16
return vmlsl_u16(a, b, c);
- // CHECK: umlsl {{v[0-31]+}}.4s, {{v[0-31]+}}.4h, {{v[0-31]+}}.4h
+ // CHECK: umlsl {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint64x2_t test_vmlsl_u32(uint64x2_t a, uint32x2_t b, uint32x2_t c) {
- // CHECK: test_vmlsl_u32
+ // CHECK-LABEL: test_vmlsl_u32
return vmlsl_u32(a, b, c);
- // CHECK: umlsl {{v[0-31]+}}.2d, {{v[0-31]+}}.2s, {{v[0-31]+}}.2s
+ // CHECK: umlsl {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int16x8_t test_vmlsl_high_s8(int16x8_t a, int8x16_t b, int8x16_t c) {
- // CHECK: test_vmlsl_high_s8
+ // CHECK-LABEL: test_vmlsl_high_s8
return vmlsl_high_s8(a, b, c);
- // CHECK: smlsl2 {{v[0-31]+}}.8h, {{v[0-31]+}}.16b, {{v[0-31]+}}.16b
+ // CHECK: smlsl2 {{v[0-9]+}}.8h, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int32x4_t test_vmlsl_high_s16(int32x4_t a, int16x8_t b, int16x8_t c) {
- // CHECK: test_vmlsl_high_s16
+ // CHECK-LABEL: test_vmlsl_high_s16
return vmlsl_high_s16(a, b, c);
- // CHECK: smlsl2 {{v[0-31]+}}.4s, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: smlsl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int64x2_t test_vmlsl_high_s32(int64x2_t a, int32x4_t b, int32x4_t c) {
- // CHECK: test_vmlsl_high_s32
+ // CHECK-LABEL: test_vmlsl_high_s32
return vmlsl_high_s32(a, b, c);
- // CHECK: smlsl2 {{v[0-31]+}}.2d, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: smlsl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint16x8_t test_vmlsl_high_u8(uint16x8_t a, uint8x16_t b, uint8x16_t c) {
- // CHECK: test_vmlsl_high_u8
+ // CHECK-LABEL: test_vmlsl_high_u8
return vmlsl_high_u8(a, b, c);
- // CHECK: umlsl2 {{v[0-31]+}}.8h, {{v[0-31]+}}.16b, {{v[0-31]+}}.16b
+ // CHECK: umlsl2 {{v[0-9]+}}.8h, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint32x4_t test_vmlsl_high_u16(uint32x4_t a, uint16x8_t b, uint16x8_t c) {
- // CHECK: test_vmlsl_high_u16
+ // CHECK-LABEL: test_vmlsl_high_u16
return vmlsl_high_u16(a, b, c);
- // CHECK: umlsl2 {{v[0-31]+}}.4s, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: umlsl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint64x2_t test_vmlsl_high_u32(uint64x2_t a, uint32x4_t b, uint32x4_t c) {
- // CHECK: test_vmlsl_high_u32
+ // CHECK-LABEL: test_vmlsl_high_u32
return vmlsl_high_u32(a, b, c);
- // CHECK: umlsl2 {{v[0-31]+}}.2d, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: umlsl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int32x4_t test_vqdmull_s16(int16x4_t a, int16x4_t b) {
- // CHECK: test_vqdmull_s16
+ // CHECK-LABEL: test_vqdmull_s16
return vqdmull_s16(a, b);
- // CHECK: sqdmull {{v[0-31]+}}.4s, {{v[0-31]+}}.4h, {{v[0-31]+}}.4h
+ // CHECK: sqdmull {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int64x2_t test_vqdmull_s32(int32x2_t a, int32x2_t b) {
- // CHECK: test_vqdmull_s32
+ // CHECK-LABEL: test_vqdmull_s32
return vqdmull_s32(a, b);
- // CHECK: sqdmull {{v[0-31]+}}.2d, {{v[0-31]+}}.2s, {{v[0-31]+}}.2s
+ // CHECK: sqdmull {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int32x4_t test_vqdmlal_s16(int32x4_t a, int16x4_t b, int16x4_t c) {
- // CHECK: test_vqdmlal_s16
+ // CHECK-LABEL: test_vqdmlal_s16
return vqdmlal_s16(a, b, c);
- // CHECK: sqdmlal {{v[0-31]+}}.4s, {{v[0-31]+}}.4h, {{v[0-31]+}}.4h
+ // CHECK: sqdmlal {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int64x2_t test_vqdmlal_s32(int64x2_t a, int32x2_t b, int32x2_t c) {
- // CHECK: test_vqdmlal_s32
+ // CHECK-LABEL: test_vqdmlal_s32
return vqdmlal_s32(a, b, c);
- // CHECK: sqdmlal {{v[0-31]+}}.2d, {{v[0-31]+}}.2s, {{v[0-31]+}}.2s
+ // CHECK: sqdmlal {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int32x4_t test_vqdmlsl_s16(int32x4_t a, int16x4_t b, int16x4_t c) {
- // CHECK: test_vqdmlsl_s16
+ // CHECK-LABEL: test_vqdmlsl_s16
return vqdmlsl_s16(a, b, c);
- // CHECK: sqdmlsl {{v[0-31]+}}.4s, {{v[0-31]+}}.4h, {{v[0-31]+}}.4h
+ // CHECK: sqdmlsl {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int64x2_t test_vqdmlsl_s32(int64x2_t a, int32x2_t b, int32x2_t c) {
- // CHECK: test_vqdmlsl_s32
+ // CHECK-LABEL: test_vqdmlsl_s32
return vqdmlsl_s32(a, b, c);
- // CHECK: sqdmlsl {{v[0-31]+}}.2d, {{v[0-31]+}}.2s, {{v[0-31]+}}.2s
+ // CHECK: sqdmlsl {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
}
int32x4_t test_vqdmull_high_s16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vqdmull_high_s16
+ // CHECK-LABEL: test_vqdmull_high_s16
return vqdmull_high_s16(a, b);
- // CHECK: sqdmull2 {{v[0-31]+}}.4s, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: sqdmull2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int64x2_t test_vqdmull_high_s32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vqdmull_high_s32
+ // CHECK-LABEL: test_vqdmull_high_s32
return vqdmull_high_s32(a, b);
- // CHECK: sqdmull2 {{v[0-31]+}}.2d, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: sqdmull2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int32x4_t test_vqdmlal_high_s16(int32x4_t a, int16x8_t b, int16x8_t c) {
- // CHECK: test_vqdmlal_high_s16
+ // CHECK-LABEL: test_vqdmlal_high_s16
return vqdmlal_high_s16(a, b, c);
- // CHECK: sqdmlal2 {{v[0-31]+}}.4s, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: sqdmlal2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int64x2_t test_vqdmlal_high_s32(int64x2_t a, int32x4_t b, int32x4_t c) {
- // CHECK: test_vqdmlal_high_s32
+ // CHECK-LABEL: test_vqdmlal_high_s32
return vqdmlal_high_s32(a, b, c);
- // CHECK: sqdmlal2 {{v[0-31]+}}.2d, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: sqdmlal2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int32x4_t test_vqdmlsl_high_s16(int32x4_t a, int16x8_t b, int16x8_t c) {
- // CHECK: test_vqdmlsl_high_s16
+ // CHECK-LABEL: test_vqdmlsl_high_s16
return vqdmlsl_high_s16(a, b, c);
- // CHECK: sqdmlsl2 {{v[0-31]+}}.4s, {{v[0-31]+}}.8h, {{v[0-31]+}}.8h
+ // CHECK: sqdmlsl2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int64x2_t test_vqdmlsl_high_s32(int64x2_t a, int32x4_t b, int32x4_t c) {
- // CHECK: test_vqdmlsl_high_s32
+ // CHECK-LABEL: test_vqdmlsl_high_s32
return vqdmlsl_high_s32(a, b, c);
- // CHECK: sqdmlsl2 {{v[0-31]+}}.2d, {{v[0-31]+}}.4s, {{v[0-31]+}}.4s
+ // CHECK: sqdmlsl2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
poly16x8_t test_vmull_p8(poly8x8_t a, poly8x8_t b) {
- // CHECK: test_vmull_p8
+ // CHECK-LABEL: test_vmull_p8
return vmull_p8(a, b);
- // CHECK: pmull {{v[0-31]+}}.8h, {{v[0-31]+}}.8b, {{v[0-31]+}}.8b
+ // CHECK: pmull {{v[0-9]+}}.8h, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
poly16x8_t test_vmull_high_p8(poly8x16_t a, poly8x16_t b) {
- // CHECK: test_vmull_high_p8
+ // CHECK-LABEL: test_vmull_high_p8
return vmull_high_p8(a, b);
- // CHECK: pmull2 {{v[0-31]+}}.8h, {{v[0-31]+}}.16b, {{v[0-31]+}}.16b
+ // CHECK: pmull2 {{v[0-9]+}}.8h, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int64_t test_vaddd_s64(int64_t a, int64_t b) {
-// CHECK: test_vaddd_s64
+// CHECK-LABEL: test_vaddd_s64
return vaddd_s64(a, b);
-// CHECK: add {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK: add {{[xd][0-9]+}}, {{[xd][0-9]+}}, {{[xd][0-9]+}}
}
uint64_t test_vaddd_u64(uint64_t a, uint64_t b) {
-// CHECK: test_vaddd_u64
+// CHECK-LABEL: test_vaddd_u64
return vaddd_u64(a, b);
-// CHECK: add {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK: add {{[xd][0-9]+}}, {{[xd][0-9]+}}, {{[xd][0-9]+}}
}
int64_t test_vsubd_s64(int64_t a, int64_t b) {
-// CHECK: test_vsubd_s64
+// CHECK-LABEL: test_vsubd_s64
return vsubd_s64(a, b);
-// CHECK: sub {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK: sub {{[xd][0-9]+}}, {{[xd][0-9]+}}, {{[xd][0-9]+}}
}
uint64_t test_vsubd_u64(uint64_t a, uint64_t b) {
-// CHECK: test_vsubd_u64
+// CHECK-LABEL: test_vsubd_u64
return vsubd_u64(a, b);
-// CHECK: sub {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK: sub {{[xd][0-9]+}}, {{[xd][0-9]+}}, {{[xd][0-9]+}}
}
int8_t test_vqaddb_s8(int8_t a, int8_t b) {
-// CHECK: test_vqaddb_s8
+// CHECK-LABEL: test_vqaddb_s8
return vqaddb_s8(a, b);
-// CHECK: sqadd {{b[0-9]+}}, {{b[0-9]+}}, {{b[0-9]+}}
+// CHECK: sqadd {{b[0-9]+|v[0-9]+.8b}}, {{b[0-9]+|v[0-9]+.8b}}, {{b[0-9]+|v[0-9]+.8b}}
}
int16_t test_vqaddh_s16(int16_t a, int16_t b) {
-// CHECK: test_vqaddh_s16
+// CHECK-LABEL: test_vqaddh_s16
return vqaddh_s16(a, b);
-// CHECK: sqadd {{h[0-9]+}}, {{h[0-9]+}}, {{h[0-9]+}}
+// CHECK: sqadd {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}
}
int32_t test_vqadds_s32(int32_t a, int32_t b) {
-// CHECK: test_vqadds_s32
+// CHECK-LABEL: test_vqadds_s32
return vqadds_s32(a, b);
// CHECK: sqadd {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
}
int64_t test_vqaddd_s64(int64_t a, int64_t b) {
-// CHECK: test_vqaddd_s64
+// CHECK-LABEL: test_vqaddd_s64
return vqaddd_s64(a, b);
// CHECK: sqadd {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint8_t test_vqaddb_u8(uint8_t a, uint8_t b) {
-// CHECK: test_vqaddb_u8
+// CHECK-LABEL: test_vqaddb_u8
return vqaddb_u8(a, b);
-// CHECK: uqadd {{b[0-9]+}}, {{b[0-9]+}}, {{b[0-9]+}}
+// CHECK: uqadd {{b[0-9]+|v[0-9]+.8b}}, {{b[0-9]+|v[0-9]+.8b}}, {{b[0-9]+|v[0-9]+.8b}}
}
uint16_t test_vqaddh_u16(uint16_t a, uint16_t b) {
-// CHECK: test_vqaddh_u16
+// CHECK-LABEL: test_vqaddh_u16
return vqaddh_u16(a, b);
-// CHECK: uqadd {{h[0-9]+}}, {{h[0-9]+}}, {{h[0-9]+}}
+// CHECK: uqadd {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}
}
uint32_t test_vqadds_u32(uint32_t a, uint32_t b) {
-// CHECK: test_vqadds_u32
+// CHECK-LABEL: test_vqadds_u32
return vqadds_u32(a, b);
// CHECK: uqadd {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
}
uint64_t test_vqaddd_u64(uint64_t a, uint64_t b) {
-// CHECK: test_vqaddd_u64
+// CHECK-LABEL: test_vqaddd_u64
return vqaddd_u64(a, b);
// CHECK: uqadd {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
int8_t test_vqsubb_s8(int8_t a, int8_t b) {
-// CHECK: test_vqsubb_s8
+// CHECK-LABEL: test_vqsubb_s8
return vqsubb_s8(a, b);
-// CHECK: sqsub {{b[0-9]+}}, {{b[0-9]+}}, {{b[0-9]+}}
+// CHECK: sqsub {{b[0-9]+|v[0-9]+.8b}}, {{b[0-9]+|v[0-9]+.8b}}, {{b[0-9]+|v[0-9]+.8b}}
}
int16_t test_vqsubh_s16(int16_t a, int16_t b) {
-// CHECK: test_vqsubh_s16
+// CHECK-LABEL: test_vqsubh_s16
return vqsubh_s16(a, b);
-// CHECK: sqsub {{h[0-9]+}}, {{h[0-9]+}}, {{h[0-9]+}}
+// CHECK: sqsub {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}
}
int32_t test_vqsubs_s32(int32_t a, int32_t b) {
- // CHECK: test_vqsubs_s32
+ // CHECK-LABEL: test_vqsubs_s32
return vqsubs_s32(a, b);
// CHECK: sqsub {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
}
int64_t test_vqsubd_s64(int64_t a, int64_t b) {
-// CHECK: test_vqsubd_s64
+// CHECK-LABEL: test_vqsubd_s64
return vqsubd_s64(a, b);
// CHECK: sqsub {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint8_t test_vqsubb_u8(uint8_t a, uint8_t b) {
-// CHECK: test_vqsubb_u8
+// CHECK-LABEL: test_vqsubb_u8
return vqsubb_u8(a, b);
-// CHECK: uqsub {{b[0-9]+}}, {{b[0-9]+}}, {{b[0-9]+}}
+// CHECK: uqsub {{b[0-9]+|v[0-9]+.8b}}, {{b[0-9]+|v[0-9]+.8b}}, {{b[0-9]+|v[0-9]+.8b}}
}
uint16_t test_vqsubh_u16(uint16_t a, uint16_t b) {
-// CHECK: test_vqsubh_u16
+// CHECK-LABEL: test_vqsubh_u16
return vqsubh_u16(a, b);
-// CHECK: uqsub {{h[0-9]+}}, {{h[0-9]+}}, {{h[0-9]+}}
+// CHECK: uqsub {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}
}
uint32_t test_vqsubs_u32(uint32_t a, uint32_t b) {
-// CHECK: test_vqsubs_u32
+// CHECK-LABEL: test_vqsubs_u32
return vqsubs_u32(a, b);
// CHECK: uqsub {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
}
uint64_t test_vqsubd_u64(uint64_t a, uint64_t b) {
-// CHECK: test_vqsubd_u64
+// CHECK-LABEL: test_vqsubd_u64
return vqsubd_u64(a, b);
// CHECK: uqsub {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
int64_t test_vshld_s64(int64_t a, int64_t b) {
-// CHECK: test_vshld_s64
+// CHECK-LABEL: test_vshld_s64
return vshld_s64(a, b);
// CHECK: sshl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint64_t test_vshld_u64(uint64_t a, uint64_t b) {
-// CHECK: test_vshld_u64
+// CHECK-LABEL: test_vshld_u64
return vshld_u64(a, b);
// CHECK: ushl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
-// CHECK: test_vqshlb_s8
+// CHECK-LABEL: test_vqshlb_s8
int8_t test_vqshlb_s8(int8_t a, int8_t b) {
return vqshlb_s8(a, b);
-// CHECK: sqshl {{b[0-9]+}}, {{b[0-9]+}}, {{b[0-9]+}}
+// CHECK: sqshl {{b[0-9]+|v[0-9]+.8b}}, {{b[0-9]+|v[0-9]+.8b}}, {{b[0-9]+|v[0-9]+.8b}}
}
-// CHECK: test_vqshlh_s16
+// CHECK-LABEL: test_vqshlh_s16
int16_t test_vqshlh_s16(int16_t a, int16_t b) {
return vqshlh_s16(a, b);
-// CHECK: sqshl {{h[0-9]+}}, {{h[0-9]+}}, {{h[0-9]+}}
+// CHECK: sqshl {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}
}
-// CHECK: test_vqshls_s32
+// CHECK-LABEL: test_vqshls_s32
int32_t test_vqshls_s32(int32_t a, int32_t b) {
return vqshls_s32(a, b);
// CHECK: sqshl {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
}
-// CHECK: test_vqshld_s64
+// CHECK-LABEL: test_vqshld_s64
int64_t test_vqshld_s64(int64_t a, int64_t b) {
return vqshld_s64(a, b);
// CHECK: sqshl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
-// CHECK: test_vqshlb_u8
+// CHECK-LABEL: test_vqshlb_u8
uint8_t test_vqshlb_u8(uint8_t a, uint8_t b) {
return vqshlb_u8(a, b);
-// CHECK: uqshl {{b[0-9]+}}, {{b[0-9]+}}, {{b[0-9]+}}
+// CHECK: uqshl {{b[0-9]+|v[0-9]+.8b}}, {{b[0-9]+|v[0-9]+.8b}}, {{b[0-9]+|v[0-9]+.8b}}
}
-// CHECK: test_vqshlh_u16
+// CHECK-LABEL: test_vqshlh_u16
uint16_t test_vqshlh_u16(uint16_t a, uint16_t b) {
return vqshlh_u16(a, b);
-// CHECK: uqshl {{h[0-9]+}}, {{h[0-9]+}}, {{h[0-9]+}}
+// CHECK: uqshl {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}
}
-// CHECK: test_vqshls_u32
+// CHECK-LABEL: test_vqshls_u32
uint32_t test_vqshls_u32(uint32_t a, uint32_t b) {
return vqshls_u32(a, b);
// CHECK: uqshl {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
}
-// CHECK: test_vqshld_u64
+// CHECK-LABEL: test_vqshld_u64
uint64_t test_vqshld_u64(uint64_t a, uint64_t b) {
return vqshld_u64(a, b);
// CHECK: uqshl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
-// CHECK: test_vrshld_s64
+// CHECK-LABEL: test_vrshld_s64
int64_t test_vrshld_s64(int64_t a, int64_t b) {
return vrshld_s64(a, b);
// CHECK: srshl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
-// CHECK: test_vrshld_u64
+// CHECK-LABEL: test_vrshld_u64
uint64_t test_vrshld_u64(uint64_t a, uint64_t b) {
return vrshld_u64(a, b);
// CHECK: urshl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
-// CHECK: test_vqrshlb_s8
+// CHECK-LABEL: test_vqrshlb_s8
int8_t test_vqrshlb_s8(int8_t a, int8_t b) {
return vqrshlb_s8(a, b);
-// CHECK: sqrshl {{b[0-9]+}}, {{b[0-9]+}}, {{b[0-9]+}}
+// CHECK: sqrshl {{b[0-9]+|v[0-9]+.8b}}, {{b[0-9]+|v[0-9]+.8b}}, {{b[0-9]+|v[0-9]+.8b}}
}
-// CHECK: test_vqrshlh_s16
+// CHECK-LABEL: test_vqrshlh_s16
int16_t test_vqrshlh_s16(int16_t a, int16_t b) {
return vqrshlh_s16(a, b);
-// CHECK: sqrshl {{h[0-9]+}}, {{h[0-9]+}}, {{h[0-9]+}}
+// CHECK: sqrshl {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}
}
-// CHECK: test_vqrshls_s32
+// CHECK-LABEL: test_vqrshls_s32
int32_t test_vqrshls_s32(int32_t a, int32_t b) {
return vqrshls_s32(a, b);
// CHECK: sqrshl {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
}
-// CHECK: test_vqrshld_s64
+// CHECK-LABEL: test_vqrshld_s64
int64_t test_vqrshld_s64(int64_t a, int64_t b) {
return vqrshld_s64(a, b);
// CHECK: sqrshl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
-// CHECK: test_vqrshlb_u8
+// CHECK-LABEL: test_vqrshlb_u8
uint8_t test_vqrshlb_u8(uint8_t a, uint8_t b) {
return vqrshlb_u8(a, b);
-// CHECK: uqrshl {{b[0-9]+}}, {{b[0-9]+}}, {{b[0-9]+}}
+// CHECK: uqrshl {{b[0-9]+|v[0-9]+.8b}}, {{b[0-9]+|v[0-9]+.8b}}, {{b[0-9]+|v[0-9]+.8b}}
}
-// CHECK: test_vqrshlh_u16
+// CHECK-LABEL: test_vqrshlh_u16
uint16_t test_vqrshlh_u16(uint16_t a, uint16_t b) {
return vqrshlh_u16(a, b);
-// CHECK: uqrshl {{h[0-9]+}}, {{h[0-9]+}}, {{h[0-9]+}}
+// CHECK: uqrshl {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}
}
-// CHECK: test_vqrshls_u32
+// CHECK-LABEL: test_vqrshls_u32
uint32_t test_vqrshls_u32(uint32_t a, uint32_t b) {
return vqrshls_u32(a, b);
// CHECK: uqrshl {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
}
-// CHECK: test_vqrshld_u64
+// CHECK-LABEL: test_vqrshld_u64
uint64_t test_vqrshld_u64(uint64_t a, uint64_t b) {
return vqrshld_u64(a, b);
// CHECK: uqrshl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
-// CHECK: test_vpaddd_s64
+// CHECK-LABEL: test_vpaddd_s64
int64_t test_vpaddd_s64(int64x2_t a) {
return vpaddd_s64(a);
// CHECK: addp {{d[0-9]+}}, {{v[0-9]+}}.2d
}
-// CHECK: test_vpadds_f32
+// CHECK-LABEL: test_vpadds_f32
float32_t test_vpadds_f32(float32x2_t a) {
return vpadds_f32(a);
// CHECK: faddp {{s[0-9]+}}, {{v[0-9]+}}.2s
}
-// CHECK: test_vpaddd_f64
+// CHECK-LABEL: test_vpaddd_f64
float64_t test_vpaddd_f64(float64x2_t a) {
return vpaddd_f64(a);
// CHECK: faddp {{d[0-9]+}}, {{v[0-9]+}}.2d
}
-// CHECK: test_vpmaxnms_f32
+// CHECK-LABEL: test_vpmaxnms_f32
float32_t test_vpmaxnms_f32(float32x2_t a) {
return vpmaxnms_f32(a);
// CHECK: fmaxnmp {{s[0-9]+}}, {{v[0-9]+}}.2s
}
-// CHECK: test_vpmaxnmqd_f64
+// CHECK-LABEL: test_vpmaxnmqd_f64
float64_t test_vpmaxnmqd_f64(float64x2_t a) {
return vpmaxnmqd_f64(a);
// CHECK: fmaxnmp {{d[0-9]+}}, {{v[0-9]+}}.2d
}
-// CHECK: test_vpmaxs_f32
+// CHECK-LABEL: test_vpmaxs_f32
float32_t test_vpmaxs_f32(float32x2_t a) {
return vpmaxs_f32(a);
// CHECK: fmaxp {{s[0-9]+}}, {{v[0-9]+}}.2s
}
-// CHECK: test_vpmaxqd_f64
+// CHECK-LABEL: test_vpmaxqd_f64
float64_t test_vpmaxqd_f64(float64x2_t a) {
return vpmaxqd_f64(a);
// CHECK: fmaxp {{d[0-9]+}}, {{v[0-9]+}}.2d
}
-// CHECK: test_vpminnms_f32
+// CHECK-LABEL: test_vpminnms_f32
float32_t test_vpminnms_f32(float32x2_t a) {
return vpminnms_f32(a);
// CHECK: fminnmp {{s[0-9]+}}, {{v[0-9]+}}.2s
}
-// CHECK: test_vpminnmqd_f64
+// CHECK-LABEL: test_vpminnmqd_f64
float64_t test_vpminnmqd_f64(float64x2_t a) {
return vpminnmqd_f64(a);
// CHECK: fminnmp {{d[0-9]+}}, {{v[0-9]+}}.2d
}
-// CHECK: test_vpmins_f32
+// CHECK-LABEL: test_vpmins_f32
float32_t test_vpmins_f32(float32x2_t a) {
return vpmins_f32(a);
// CHECK: fminp {{s[0-9]+}}, {{v[0-9]+}}.2s
}
-// CHECK: test_vpminqd_f64
+// CHECK-LABEL: test_vpminqd_f64
float64_t test_vpminqd_f64(float64x2_t a) {
return vpminqd_f64(a);
// CHECK: fminp {{d[0-9]+}}, {{v[0-9]+}}.2d
}
int16_t test_vqdmulhh_s16(int16_t a, int16_t b) {
-// CHECK: test_vqdmulhh_s16
+// CHECK-LABEL: test_vqdmulhh_s16
return vqdmulhh_s16(a, b);
-// CHECK: sqdmulh {{h[0-9]+}}, {{h[0-9]+}}, {{h[0-9]+}}
+// CHECK: sqdmulh {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}
}
int32_t test_vqdmulhs_s32(int32_t a, int32_t b) {
-// CHECK: test_vqdmulhs_s32
+// CHECK-LABEL: test_vqdmulhs_s32
return vqdmulhs_s32(a, b);
// CHECK: sqdmulh {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
}
int16_t test_vqrdmulhh_s16(int16_t a, int16_t b) {
-// CHECK: test_vqrdmulhh_s16
+// CHECK-LABEL: test_vqrdmulhh_s16
return vqrdmulhh_s16(a, b);
-// CHECK: sqrdmulh {{h[0-9]+}}, {{h[0-9]+}}, {{h[0-9]+}}
+// CHECK: sqrdmulh {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}
}
int32_t test_vqrdmulhs_s32(int32_t a, int32_t b) {
-// CHECK: test_vqrdmulhs_s32
+// CHECK-LABEL: test_vqrdmulhs_s32
return vqrdmulhs_s32(a, b);
// CHECK: sqrdmulh {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
}
float32_t test_vmulxs_f32(float32_t a, float32_t b) {
-// CHECK: test_vmulxs_f32
+// CHECK-LABEL: test_vmulxs_f32
return vmulxs_f32(a, b);
// CHECK: fmulx {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
}
float64_t test_vmulxd_f64(float64_t a, float64_t b) {
-// CHECK: test_vmulxd_f64
+// CHECK-LABEL: test_vmulxd_f64
return vmulxd_f64(a, b);
// CHECK: fmulx {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
+float64x1_t test_vmulx_f64(float64x1_t a, float64x1_t b) {
+// CHECK-LABEL: test_vmulx_f64
+ return vmulx_f64(a, b);
+// CHECK: fmulx {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+}
+
float32_t test_vrecpss_f32(float32_t a, float32_t b) {
-// CHECK: test_vrecpss_f32
+// CHECK-LABEL: test_vrecpss_f32
return vrecpss_f32(a, b);
// CHECK: frecps {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
}
float64_t test_vrecpsd_f64(float64_t a, float64_t b) {
-// CHECK: test_vrecpsd_f64
+// CHECK-LABEL: test_vrecpsd_f64
return vrecpsd_f64(a, b);
// CHECK: frecps {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
float32_t test_vrsqrtss_f32(float32_t a, float32_t b) {
-// CHECK: test_vrsqrtss_f32
+// CHECK-LABEL: test_vrsqrtss_f32
return vrsqrtss_f32(a, b);
// CHECK: frsqrts {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
}
float64_t test_vrsqrtsd_f64(float64_t a, float64_t b) {
-// CHECK: test_vrsqrtsd_f64
+// CHECK-LABEL: test_vrsqrtsd_f64
return vrsqrtsd_f64(a, b);
// CHECK: frsqrts {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
float32_t test_vcvts_f32_s32(int32_t a) {
-// CHECK: test_vcvts_f32_s32
-// CHECK: scvtf {{s[0-9]+}}, {{s[0-9]+}}
+// CHECK-LABEL: test_vcvts_f32_s32
+// CHECK: scvtf {{s[0-9]+}}, {{[ws][0-9]+}}
return vcvts_f32_s32(a);
}
float64_t test_vcvtd_f64_s64(int64_t a) {
-// CHECK: test_vcvtd_f64_s64
-// CHECK: scvtf {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcvtd_f64_s64
+// CHECK: scvtf {{d[0-9]+}}, {{[dx][0-9]+}}
return vcvtd_f64_s64(a);
}
float32_t test_vcvts_f32_u32(uint32_t a) {
-// CHECK: test_vcvts_f32_u32
-// CHECK: ucvtf {{s[0-9]+}}, {{s[0-9]+}}
+// CHECK-LABEL: test_vcvts_f32_u32
+// CHECK: ucvtf {{s[0-9]+}}, {{[ws][0-9]+}}
return vcvts_f32_u32(a);
}
float64_t test_vcvtd_f64_u64(uint64_t a) {
-// CHECK: test_vcvtd_f64_u64
-// CHECK: ucvtf {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcvtd_f64_u64
+// CHECK: ucvtf {{d[0-9]+}}, {{[xd][0-9]+}}
return vcvtd_f64_u64(a);
}
float32_t test_vrecpes_f32(float32_t a) {
-// CHECK: test_vrecpes_f32
+// CHECK-LABEL: test_vrecpes_f32
// CHECK: frecpe {{s[0-9]+}}, {{s[0-9]+}}
return vrecpes_f32(a);
}
float64_t test_vrecped_f64(float64_t a) {
-// CHECK: test_vrecped_f64
+// CHECK-LABEL: test_vrecped_f64
// CHECK: frecpe {{d[0-9]+}}, {{d[0-9]+}}
return vrecped_f64(a);
}
float32_t test_vrecpxs_f32(float32_t a) {
-// CHECK: test_vrecpxs_f32
+// CHECK-LABEL: test_vrecpxs_f32
// CHECK: frecpx {{s[0-9]+}}, {{s[0-9]+}}
return vrecpxs_f32(a);
}
float64_t test_vrecpxd_f64(float64_t a) {
-// CHECK: test_vrecpxd_f64
+// CHECK-LABEL: test_vrecpxd_f64
// CHECK: frecpx {{d[0-9]+}}, {{d[0-9]+}}
return vrecpxd_f64(a);
}
+uint32x2_t test_vrsqrte_u32(uint32x2_t a) {
+// CHECK-LABEL: test_vrsqrte_u32
+// CHECK: ursqrte {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+ return vrsqrte_u32(a);
+}
+
+uint32x4_t test_vrsqrteq_u32(uint32x4_t a) {
+// CHECK-LABEL: test_vrsqrteq_u32
+// CHECK: ursqrte {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
+ return vrsqrteq_u32(a);
+}
+
float32_t test_vrsqrtes_f32(float32_t a) {
// CHECK: vrsqrtes_f32
// CHECK: frsqrte {{s[0-9]+}}, {{s[0-9]+}}
@@ -5779,2954 +5819,2742 @@ float64_t test_vrsqrted_f64(float64_t a) {
}
uint8x16_t test_vld1q_u8(uint8_t const *a) {
- // CHECK: test_vld1q_u8
+ // CHECK-LABEL: test_vld1q_u8
return vld1q_u8(a);
- // CHECK: ld1 {v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.16b }|ldr q[0-9]+}}, [{{x[0-9]+|sp}}]
}
uint16x8_t test_vld1q_u16(uint16_t const *a) {
- // CHECK: test_vld1q_u16
+ // CHECK-LABEL: test_vld1q_u16
return vld1q_u16(a);
- // CHECK: ld1 {v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.8h }|ldr q[0-9]+}}, [{{x[0-9]+|sp}}]
}
uint32x4_t test_vld1q_u32(uint32_t const *a) {
- // CHECK: test_vld1q_u32
+ // CHECK-LABEL: test_vld1q_u32
return vld1q_u32(a);
- // CHECK: ld1 {v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.4s }|ldr q[0-9]+}}, [{{x[0-9]+|sp}}]
}
uint64x2_t test_vld1q_u64(uint64_t const *a) {
- // CHECK: test_vld1q_u64
+ // CHECK-LABEL: test_vld1q_u64
return vld1q_u64(a);
- // CHECK: ld1 {v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.2d }|ldr q[0-9]+}}, [{{x[0-9]+|sp}}]
}
int8x16_t test_vld1q_s8(int8_t const *a) {
- // CHECK: test_vld1q_s8
+ // CHECK-LABEL: test_vld1q_s8
return vld1q_s8(a);
- // CHECK: ld1 {v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.16b }|ldr q[0-9]+}}, [{{x[0-9]+|sp}}]
}
int16x8_t test_vld1q_s16(int16_t const *a) {
- // CHECK: test_vld1q_s16
+ // CHECK-LABEL: test_vld1q_s16
return vld1q_s16(a);
- // CHECK: ld1 {v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.8h }|ldr q[0-9]+}}, [{{x[0-9]+|sp}}]
}
int32x4_t test_vld1q_s32(int32_t const *a) {
- // CHECK: test_vld1q_s32
+ // CHECK-LABEL: test_vld1q_s32
return vld1q_s32(a);
- // CHECK: ld1 {v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.4s }|ldr q[0-9]+}}, [{{x[0-9]+|sp}}]
}
int64x2_t test_vld1q_s64(int64_t const *a) {
- // CHECK: test_vld1q_s64
+ // CHECK-LABEL: test_vld1q_s64
return vld1q_s64(a);
- // CHECK: ld1 {v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.2d }|ldr q[0-9]+}}, [{{x[0-9]+|sp}}]
}
float16x8_t test_vld1q_f16(float16_t const *a) {
- // CHECK: test_vld1q_f16
+ // CHECK-LABEL: test_vld1q_f16
return vld1q_f16(a);
- // CHECK: ld1 {v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.8h }|ldr q[0-9]+}}, [{{x[0-9]+|sp}}]
}
float32x4_t test_vld1q_f32(float32_t const *a) {
- // CHECK: test_vld1q_f32
+ // CHECK-LABEL: test_vld1q_f32
return vld1q_f32(a);
- // CHECK: ld1 {v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.4s }|ldr q[0-9]+}}, [{{x[0-9]+|sp}}]
}
float64x2_t test_vld1q_f64(float64_t const *a) {
- // CHECK: test_vld1q_f64
+ // CHECK-LABEL: test_vld1q_f64
return vld1q_f64(a);
- // CHECK: ld1 {v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.2d }|ldr q[0-9]+}}, [{{x[0-9]+|sp}}]
}
poly8x16_t test_vld1q_p8(poly8_t const *a) {
- // CHECK: test_vld1q_p8
+ // CHECK-LABEL: test_vld1q_p8
return vld1q_p8(a);
- // CHECK: ld1 {v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.16b }|ldr q[0-9]+}}, [{{x[0-9]+|sp}}]
}
poly16x8_t test_vld1q_p16(poly16_t const *a) {
- // CHECK: test_vld1q_p16
+ // CHECK-LABEL: test_vld1q_p16
return vld1q_p16(a);
- // CHECK: ld1 {v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.8h }|ldr q[0-9]+}}, [{{x[0-9]+|sp}}]
}
uint8x8_t test_vld1_u8(uint8_t const *a) {
- // CHECK: test_vld1_u8
+ // CHECK-LABEL: test_vld1_u8
return vld1_u8(a);
- // CHECK: ld1 {v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.8b }|ldr d[0-9]+}}, [{{x[0-9]+|sp}}]
}
uint16x4_t test_vld1_u16(uint16_t const *a) {
- // CHECK: test_vld1_u16
+ // CHECK-LABEL: test_vld1_u16
return vld1_u16(a);
- // CHECK: ld1 {v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.4h }|ldr d[0-9]+}}, [{{x[0-9]+|sp}}]
}
uint32x2_t test_vld1_u32(uint32_t const *a) {
- // CHECK: test_vld1_u32
+ // CHECK-LABEL: test_vld1_u32
return vld1_u32(a);
- // CHECK: ld1 {v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.2s }|ldr d[0-9]+}}, [{{x[0-9]+|sp}}]
}
uint64x1_t test_vld1_u64(uint64_t const *a) {
- // CHECK: test_vld1_u64
+ // CHECK-LABEL: test_vld1_u64
return vld1_u64(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.1d }|ldr d[0-9]+}}, [{{x[0-9]+|sp}}]
}
int8x8_t test_vld1_s8(int8_t const *a) {
- // CHECK: test_vld1_s8
+ // CHECK-LABEL: test_vld1_s8
return vld1_s8(a);
- // CHECK: ld1 {v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.8b }|ldr d[0-9]+}}, [{{x[0-9]+|sp}}]
}
int16x4_t test_vld1_s16(int16_t const *a) {
- // CHECK: test_vld1_s16
+ // CHECK-LABEL: test_vld1_s16
return vld1_s16(a);
- // CHECK: ld1 {v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.4h }|ldr d[0-9]+}}, [{{x[0-9]+|sp}}]
}
int32x2_t test_vld1_s32(int32_t const *a) {
- // CHECK: test_vld1_s32
+ // CHECK-LABEL: test_vld1_s32
return vld1_s32(a);
- // CHECK: ld1 {v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.2s }|ldr d[0-9]+}}, [{{x[0-9]+|sp}}]
}
int64x1_t test_vld1_s64(int64_t const *a) {
- // CHECK: test_vld1_s64
+ // CHECK-LABEL: test_vld1_s64
return vld1_s64(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.1d }|ldr d[0-9]+}}, [{{x[0-9]+|sp}}]
}
float16x4_t test_vld1_f16(float16_t const *a) {
- // CHECK: test_vld1_f16
+ // CHECK-LABEL: test_vld1_f16
return vld1_f16(a);
- // CHECK: ld1 {v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.4h }|ldr d[0-9]+}}, [{{x[0-9]+|sp}}]
}
float32x2_t test_vld1_f32(float32_t const *a) {
- // CHECK: test_vld1_f32
+ // CHECK-LABEL: test_vld1_f32
return vld1_f32(a);
- // CHECK: ld1 {v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.2s }|ldr d[0-9]+}}, [{{x[0-9]+|sp}}]
}
float64x1_t test_vld1_f64(float64_t const *a) {
- // CHECK: test_vld1_f64
+ // CHECK-LABEL: test_vld1_f64
return vld1_f64(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.1d }|ldr d[0-9]+}}, [{{x[0-9]+|sp}}]
}
poly8x8_t test_vld1_p8(poly8_t const *a) {
- // CHECK: test_vld1_p8
+ // CHECK-LABEL: test_vld1_p8
return vld1_p8(a);
- // CHECK: ld1 {v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.8b }|ldr d[0-9]+}}, [{{x[0-9]+|sp}}]
}
poly16x4_t test_vld1_p16(poly16_t const *a) {
- // CHECK: test_vld1_p16
+ // CHECK-LABEL: test_vld1_p16
return vld1_p16(a);
- // CHECK: ld1 {v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.4h }|ldr d[0-9]+}}, [{{x[0-9]+|sp}}]
}
uint8x16x2_t test_vld2q_u8(uint8_t const *a) {
- // CHECK: test_vld2q_u8
+ // CHECK-LABEL: test_vld2q_u8
return vld2q_u8(a);
- // CHECK: ld2 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
uint16x8x2_t test_vld2q_u16(uint16_t const *a) {
- // CHECK: test_vld2q_u16
+ // CHECK-LABEL: test_vld2q_u16
return vld2q_u16(a);
- // CHECK: ld2 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ ?v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
uint32x4x2_t test_vld2q_u32(uint32_t const *a) {
- // CHECK: test_vld2q_u32
+ // CHECK-LABEL: test_vld2q_u32
return vld2q_u32(a);
- // CHECK: ld2 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ ?v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
uint64x2x2_t test_vld2q_u64(uint64_t const *a) {
- // CHECK: test_vld2q_u64
+ // CHECK-LABEL: test_vld2q_u64
return vld2q_u64(a);
- // CHECK: ld2 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ ?v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
int8x16x2_t test_vld2q_s8(int8_t const *a) {
- // CHECK: test_vld2q_s8
+ // CHECK-LABEL: test_vld2q_s8
return vld2q_s8(a);
- // CHECK: ld2 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
int16x8x2_t test_vld2q_s16(int16_t const *a) {
- // CHECK: test_vld2q_s16
+ // CHECK-LABEL: test_vld2q_s16
return vld2q_s16(a);
- // CHECK: ld2 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ ?v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
int32x4x2_t test_vld2q_s32(int32_t const *a) {
- // CHECK: test_vld2q_s32
+ // CHECK-LABEL: test_vld2q_s32
return vld2q_s32(a);
- // CHECK: ld2 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ ?v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
int64x2x2_t test_vld2q_s64(int64_t const *a) {
- // CHECK: test_vld2q_s64
+ // CHECK-LABEL: test_vld2q_s64
return vld2q_s64(a);
- // CHECK: ld2 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ ?v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
float16x8x2_t test_vld2q_f16(float16_t const *a) {
- // CHECK: test_vld2q_f16
+ // CHECK-LABEL: test_vld2q_f16
return vld2q_f16(a);
- // CHECK: ld2 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ ?v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
float32x4x2_t test_vld2q_f32(float32_t const *a) {
- // CHECK: test_vld2q_f32
+ // CHECK-LABEL: test_vld2q_f32
return vld2q_f32(a);
- // CHECK: ld2 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ ?v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
float64x2x2_t test_vld2q_f64(float64_t const *a) {
- // CHECK: test_vld2q_f64
+ // CHECK-LABEL: test_vld2q_f64
return vld2q_f64(a);
- // CHECK: ld2 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ ?v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
poly8x16x2_t test_vld2q_p8(poly8_t const *a) {
- // CHECK: test_vld2q_p8
+ // CHECK-LABEL: test_vld2q_p8
return vld2q_p8(a);
- // CHECK: ld2 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
poly16x8x2_t test_vld2q_p16(poly16_t const *a) {
- // CHECK: test_vld2q_p16
+ // CHECK-LABEL: test_vld2q_p16
return vld2q_p16(a);
- // CHECK: ld2 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ ?v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
uint8x8x2_t test_vld2_u8(uint8_t const *a) {
- // CHECK: test_vld2_u8
+ // CHECK-LABEL: test_vld2_u8
return vld2_u8(a);
- // CHECK: ld2 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ ?v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
uint16x4x2_t test_vld2_u16(uint16_t const *a) {
- // CHECK: test_vld2_u16
+ // CHECK-LABEL: test_vld2_u16
return vld2_u16(a);
- // CHECK: ld2 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ ?v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
uint32x2x2_t test_vld2_u32(uint32_t const *a) {
- // CHECK: test_vld2_u32
+ // CHECK-LABEL: test_vld2_u32
return vld2_u32(a);
- // CHECK: ld2 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ ?v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
uint64x1x2_t test_vld2_u64(uint64_t const *a) {
- // CHECK: test_vld2_u64
+ // CHECK-LABEL: test_vld2_u64
return vld2_u64(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1|ld2}} {{{ ?v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
int8x8x2_t test_vld2_s8(int8_t const *a) {
- // CHECK: test_vld2_s8
+ // CHECK-LABEL: test_vld2_s8
return vld2_s8(a);
- // CHECK: ld2 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ ?v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
int16x4x2_t test_vld2_s16(int16_t const *a) {
- // CHECK: test_vld2_s16
+ // CHECK-LABEL: test_vld2_s16
return vld2_s16(a);
- // CHECK: ld2 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ ?v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
int32x2x2_t test_vld2_s32(int32_t const *a) {
- // CHECK: test_vld2_s32
+ // CHECK-LABEL: test_vld2_s32
return vld2_s32(a);
- // CHECK: ld2 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ ?v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
int64x1x2_t test_vld2_s64(int64_t const *a) {
- // CHECK: test_vld2_s64
+ // CHECK-LABEL: test_vld2_s64
return vld2_s64(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1|ld2}} {{{ ?v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
float16x4x2_t test_vld2_f16(float16_t const *a) {
- // CHECK: test_vld2_f16
+ // CHECK-LABEL: test_vld2_f16
return vld2_f16(a);
- // CHECK: ld2 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ ?v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
float32x2x2_t test_vld2_f32(float32_t const *a) {
- // CHECK: test_vld2_f32
+ // CHECK-LABEL: test_vld2_f32
return vld2_f32(a);
- // CHECK: ld2 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ ?v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
float64x1x2_t test_vld2_f64(float64_t const *a) {
- // CHECK: test_vld2_f64
+ // CHECK-LABEL: test_vld2_f64
return vld2_f64(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1|ld2}} {{{ ?v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
poly8x8x2_t test_vld2_p8(poly8_t const *a) {
- // CHECK: test_vld2_p8
+ // CHECK-LABEL: test_vld2_p8
return vld2_p8(a);
- // CHECK: ld2 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ ?v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
poly16x4x2_t test_vld2_p16(poly16_t const *a) {
- // CHECK: test_vld2_p16
+ // CHECK-LABEL: test_vld2_p16
return vld2_p16(a);
- // CHECK: ld2 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ ?v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
uint8x16x3_t test_vld3q_u8(uint8_t const *a) {
- // CHECK: test_vld3q_u8
+ // CHECK-LABEL: test_vld3q_u8
return vld3q_u8(a);
- // CHECK: ld3 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
uint16x8x3_t test_vld3q_u16(uint16_t const *a) {
- // CHECK: test_vld3q_u16
+ // CHECK-LABEL: test_vld3q_u16
return vld3q_u16(a);
- // CHECK: ld3 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
uint32x4x3_t test_vld3q_u32(uint32_t const *a) {
- // CHECK: test_vld3q_u32
+ // CHECK-LABEL: test_vld3q_u32
return vld3q_u32(a);
- // CHECK: ld3 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ ?v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
uint64x2x3_t test_vld3q_u64(uint64_t const *a) {
- // CHECK: test_vld3q_u64
+ // CHECK-LABEL: test_vld3q_u64
return vld3q_u64(a);
- // CHECK: ld3 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
int8x16x3_t test_vld3q_s8(int8_t const *a) {
- // CHECK: test_vld3q_s8
+ // CHECK-LABEL: test_vld3q_s8
return vld3q_s8(a);
- // CHECK: ld3 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
int16x8x3_t test_vld3q_s16(int16_t const *a) {
- // CHECK: test_vld3q_s16
+ // CHECK-LABEL: test_vld3q_s16
return vld3q_s16(a);
- // CHECK: ld3 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
int32x4x3_t test_vld3q_s32(int32_t const *a) {
- // CHECK: test_vld3q_s32
+ // CHECK-LABEL: test_vld3q_s32
return vld3q_s32(a);
- // CHECK: ld3 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ ?v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
int64x2x3_t test_vld3q_s64(int64_t const *a) {
- // CHECK: test_vld3q_s64
+ // CHECK-LABEL: test_vld3q_s64
return vld3q_s64(a);
- // CHECK: ld3 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
float16x8x3_t test_vld3q_f16(float16_t const *a) {
- // CHECK: test_vld3q_f16
+ // CHECK-LABEL: test_vld3q_f16
return vld3q_f16(a);
- // CHECK: ld3 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
float32x4x3_t test_vld3q_f32(float32_t const *a) {
- // CHECK: test_vld3q_f32
+ // CHECK-LABEL: test_vld3q_f32
return vld3q_f32(a);
- // CHECK: ld3 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ ?v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
float64x2x3_t test_vld3q_f64(float64_t const *a) {
- // CHECK: test_vld3q_f64
+ // CHECK-LABEL: test_vld3q_f64
return vld3q_f64(a);
- // CHECK: ld3 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
poly8x16x3_t test_vld3q_p8(poly8_t const *a) {
- // CHECK: test_vld3q_p8
+ // CHECK-LABEL: test_vld3q_p8
return vld3q_p8(a);
- // CHECK: ld3 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
poly16x8x3_t test_vld3q_p16(poly16_t const *a) {
- // CHECK: test_vld3q_p16
+ // CHECK-LABEL: test_vld3q_p16
return vld3q_p16(a);
- // CHECK: ld3 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
uint8x8x3_t test_vld3_u8(uint8_t const *a) {
- // CHECK: test_vld3_u8
+ // CHECK-LABEL: test_vld3_u8
return vld3_u8(a);
- // CHECK: ld3 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ ?v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
uint16x4x3_t test_vld3_u16(uint16_t const *a) {
- // CHECK: test_vld3_u16
+ // CHECK-LABEL: test_vld3_u16
return vld3_u16(a);
- // CHECK: ld3 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
uint32x2x3_t test_vld3_u32(uint32_t const *a) {
- // CHECK: test_vld3_u32
+ // CHECK-LABEL: test_vld3_u32
return vld3_u32(a);
- // CHECK: ld3 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ ?v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
uint64x1x3_t test_vld3_u64(uint64_t const *a) {
- // CHECK: test_vld3_u64
+ // CHECK-LABEL: test_vld3_u64
return vld3_u64(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1|ld3}} {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
int8x8x3_t test_vld3_s8(int8_t const *a) {
- // CHECK: test_vld3_s8
+ // CHECK-LABEL: test_vld3_s8
return vld3_s8(a);
- // CHECK: ld3 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ ?v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
int16x4x3_t test_vld3_s16(int16_t const *a) {
- // CHECK: test_vld3_s16
+ // CHECK-LABEL: test_vld3_s16
return vld3_s16(a);
- // CHECK: ld3 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
int32x2x3_t test_vld3_s32(int32_t const *a) {
- // CHECK: test_vld3_s32
+ // CHECK-LABEL: test_vld3_s32
return vld3_s32(a);
- // CHECK: ld3 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ ?v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
int64x1x3_t test_vld3_s64(int64_t const *a) {
- // CHECK: test_vld3_s64
+ // CHECK-LABEL: test_vld3_s64
return vld3_s64(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1|ld3}} {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
float16x4x3_t test_vld3_f16(float16_t const *a) {
- // CHECK: test_vld3_f16
+ // CHECK-LABEL: test_vld3_f16
return vld3_f16(a);
- // CHECK: ld3 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
float32x2x3_t test_vld3_f32(float32_t const *a) {
- // CHECK: test_vld3_f32
+ // CHECK-LABEL: test_vld3_f32
return vld3_f32(a);
- // CHECK: ld3 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ ?v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
float64x1x3_t test_vld3_f64(float64_t const *a) {
- // CHECK: test_vld3_f64
+ // CHECK-LABEL: test_vld3_f64
return vld3_f64(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1|ld3}} {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
poly8x8x3_t test_vld3_p8(poly8_t const *a) {
- // CHECK: test_vld3_p8
+ // CHECK-LABEL: test_vld3_p8
return vld3_p8(a);
- // CHECK: ld3 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ ?v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
poly16x4x3_t test_vld3_p16(poly16_t const *a) {
- // CHECK: test_vld3_p16
+ // CHECK-LABEL: test_vld3_p16
return vld3_p16(a);
- // CHECK: ld3 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
uint8x16x4_t test_vld4q_u8(uint8_t const *a) {
- // CHECK: test_vld4q_u8
+ // CHECK-LABEL: test_vld4q_u8
return vld4q_u8(a);
- // CHECK: ld4 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b,
- // v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
uint16x8x4_t test_vld4q_u16(uint16_t const *a) {
- // CHECK: test_vld4q_u16
+ // CHECK-LABEL: test_vld4q_u16
return vld4q_u16(a);
- // CHECK: ld4 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h,
- // v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
uint32x4x4_t test_vld4q_u32(uint32_t const *a) {
- // CHECK: test_vld4q_u32
+ // CHECK-LABEL: test_vld4q_u32
return vld4q_u32(a);
- // CHECK: ld4 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s,
- // v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ ?v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
uint64x2x4_t test_vld4q_u64(uint64_t const *a) {
- // CHECK: test_vld4q_u64
+ // CHECK-LABEL: test_vld4q_u64
return vld4q_u64(a);
- // CHECK: ld4 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d,
- // v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
int8x16x4_t test_vld4q_s8(int8_t const *a) {
- // CHECK: test_vld4q_s8
+ // CHECK-LABEL: test_vld4q_s8
return vld4q_s8(a);
- // CHECK: ld4 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b,
- // v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
int16x8x4_t test_vld4q_s16(int16_t const *a) {
- // CHECK: test_vld4q_s16
+ // CHECK-LABEL: test_vld4q_s16
return vld4q_s16(a);
- // CHECK: ld4 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h,
- // v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
int32x4x4_t test_vld4q_s32(int32_t const *a) {
- // CHECK: test_vld4q_s32
+ // CHECK-LABEL: test_vld4q_s32
return vld4q_s32(a);
- // CHECK: ld4 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s,
- // v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ ?v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
int64x2x4_t test_vld4q_s64(int64_t const *a) {
- // CHECK: test_vld4q_s64
+ // CHECK-LABEL: test_vld4q_s64
return vld4q_s64(a);
- // CHECK: ld4 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d,
- // v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
float16x8x4_t test_vld4q_f16(float16_t const *a) {
- // CHECK: test_vld4q_f16
+ // CHECK-LABEL: test_vld4q_f16
return vld4q_f16(a);
- // CHECK: ld4 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h,
- // v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
float32x4x4_t test_vld4q_f32(float32_t const *a) {
- // CHECK: test_vld4q_f32
+ // CHECK-LABEL: test_vld4q_f32
return vld4q_f32(a);
- // CHECK: ld4 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s,
- // v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ ?v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
float64x2x4_t test_vld4q_f64(float64_t const *a) {
- // CHECK: test_vld4q_f64
+ // CHECK-LABEL: test_vld4q_f64
return vld4q_f64(a);
- // CHECK: ld4 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d,
- // v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
poly8x16x4_t test_vld4q_p8(poly8_t const *a) {
- // CHECK: test_vld4q_p8
+ // CHECK-LABEL: test_vld4q_p8
return vld4q_p8(a);
- // CHECK: ld4 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b,
- // v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
poly16x8x4_t test_vld4q_p16(poly16_t const *a) {
- // CHECK: test_vld4q_p16
+ // CHECK-LABEL: test_vld4q_p16
return vld4q_p16(a);
- // CHECK: ld4 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h,
- // v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
uint8x8x4_t test_vld4_u8(uint8_t const *a) {
- // CHECK: test_vld4_u8
+ // CHECK-LABEL: test_vld4_u8
return vld4_u8(a);
- // CHECK: ld4 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b,
- // v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ ?v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
uint16x4x4_t test_vld4_u16(uint16_t const *a) {
- // CHECK: test_vld4_u16
+ // CHECK-LABEL: test_vld4_u16
return vld4_u16(a);
- // CHECK: ld4 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h,
- // v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
uint32x2x4_t test_vld4_u32(uint32_t const *a) {
- // CHECK: test_vld4_u32
+ // CHECK-LABEL: test_vld4_u32
return vld4_u32(a);
- // CHECK: ld4 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s,
- // v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ ?v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
uint64x1x4_t test_vld4_u64(uint64_t const *a) {
- // CHECK: test_vld4_u64
+ // CHECK-LABEL: test_vld4_u64
return vld4_u64(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d,
- // v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1|ld4}} {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
int8x8x4_t test_vld4_s8(int8_t const *a) {
- // CHECK: test_vld4_s8
+ // CHECK-LABEL: test_vld4_s8
return vld4_s8(a);
- // CHECK: ld4 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b,
- // v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ ?v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
int16x4x4_t test_vld4_s16(int16_t const *a) {
- // CHECK: test_vld4_s16
+ // CHECK-LABEL: test_vld4_s16
return vld4_s16(a);
- // CHECK: ld4 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h,
- // v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
int32x2x4_t test_vld4_s32(int32_t const *a) {
- // CHECK: test_vld4_s32
+ // CHECK-LABEL: test_vld4_s32
return vld4_s32(a);
- // CHECK: ld4 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s,
- // v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ ?v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
int64x1x4_t test_vld4_s64(int64_t const *a) {
- // CHECK: test_vld4_s64
+ // CHECK-LABEL: test_vld4_s64
return vld4_s64(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d,
- // v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1|ld4}} {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
float16x4x4_t test_vld4_f16(float16_t const *a) {
- // CHECK: test_vld4_f16
+ // CHECK-LABEL: test_vld4_f16
return vld4_f16(a);
- // CHECK: ld4 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h,
- // v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
float32x2x4_t test_vld4_f32(float32_t const *a) {
- // CHECK: test_vld4_f32
+ // CHECK-LABEL: test_vld4_f32
return vld4_f32(a);
- // CHECK: ld4 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s,
- // v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ ?v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
float64x1x4_t test_vld4_f64(float64_t const *a) {
- // CHECK: test_vld4_f64
+ // CHECK-LABEL: test_vld4_f64
return vld4_f64(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d,
- // v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1|ld4}} {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
poly8x8x4_t test_vld4_p8(poly8_t const *a) {
- // CHECK: test_vld4_p8
+ // CHECK-LABEL: test_vld4_p8
return vld4_p8(a);
- // CHECK: ld4 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b,
- // v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ ?v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
poly16x4x4_t test_vld4_p16(poly16_t const *a) {
- // CHECK: test_vld4_p16
+ // CHECK-LABEL: test_vld4_p16
return vld4_p16(a);
- // CHECK: ld4 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h,
- // v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_u8(uint8_t *a, uint8x16_t b) {
- // CHECK: test_vst1q_u8
+ // CHECK-LABEL: test_vst1q_u8
vst1q_u8(a, b);
- // CHECK: st1 {v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.16b }|str q[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_u16(uint16_t *a, uint16x8_t b) {
- // CHECK: test_vst1q_u16
+ // CHECK-LABEL: test_vst1q_u16
vst1q_u16(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.8h }|str q[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_u32(uint32_t *a, uint32x4_t b) {
- // CHECK: test_vst1q_u32
+ // CHECK-LABEL: test_vst1q_u32
vst1q_u32(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.4s }|str q[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_u64(uint64_t *a, uint64x2_t b) {
- // CHECK: test_vst1q_u64
+ // CHECK-LABEL: test_vst1q_u64
vst1q_u64(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.2d }|str q[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_s8(int8_t *a, int8x16_t b) {
- // CHECK: test_vst1q_s8
+ // CHECK-LABEL: test_vst1q_s8
vst1q_s8(a, b);
- // CHECK: st1 {v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.16b }|str q[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_s16(int16_t *a, int16x8_t b) {
- // CHECK: test_vst1q_s16
+ // CHECK-LABEL: test_vst1q_s16
vst1q_s16(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.8h }|str q[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_s32(int32_t *a, int32x4_t b) {
- // CHECK: test_vst1q_s32
+ // CHECK-LABEL: test_vst1q_s32
vst1q_s32(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.4s }|str q[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_s64(int64_t *a, int64x2_t b) {
- // CHECK: test_vst1q_s64
+ // CHECK-LABEL: test_vst1q_s64
vst1q_s64(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.2d }|str q[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_f16(float16_t *a, float16x8_t b) {
- // CHECK: test_vst1q_f16
+ // CHECK-LABEL: test_vst1q_f16
vst1q_f16(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.8h }|str q[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_f32(float32_t *a, float32x4_t b) {
- // CHECK: test_vst1q_f32
+ // CHECK-LABEL: test_vst1q_f32
vst1q_f32(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.4s }|str q[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_f64(float64_t *a, float64x2_t b) {
- // CHECK: test_vst1q_f64
+ // CHECK-LABEL: test_vst1q_f64
vst1q_f64(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.2d }|str q[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_p8(poly8_t *a, poly8x16_t b) {
- // CHECK: test_vst1q_p8
+ // CHECK-LABEL: test_vst1q_p8
vst1q_p8(a, b);
- // CHECK: st1 {v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.16b }|str q[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_p16(poly16_t *a, poly16x8_t b) {
- // CHECK: test_vst1q_p16
+ // CHECK-LABEL: test_vst1q_p16
vst1q_p16(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.8h }|str q[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1_u8(uint8_t *a, uint8x8_t b) {
- // CHECK: test_vst1_u8
+ // CHECK-LABEL: test_vst1_u8
vst1_u8(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.8b }|str d[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1_u16(uint16_t *a, uint16x4_t b) {
- // CHECK: test_vst1_u16
+ // CHECK-LABEL: test_vst1_u16
vst1_u16(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.4h }|str d[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1_u32(uint32_t *a, uint32x2_t b) {
- // CHECK: test_vst1_u32
+ // CHECK-LABEL: test_vst1_u32
vst1_u32(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.2s }|str d[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1_u64(uint64_t *a, uint64x1_t b) {
- // CHECK: test_vst1_u64
+ // CHECK-LABEL: test_vst1_u64
vst1_u64(a, b);
- // CHECK: st1 {v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.1d }|str d[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1_s8(int8_t *a, int8x8_t b) {
- // CHECK: test_vst1_s8
+ // CHECK-LABEL: test_vst1_s8
vst1_s8(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.8b }|str d[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1_s16(int16_t *a, int16x4_t b) {
- // CHECK: test_vst1_s16
+ // CHECK-LABEL: test_vst1_s16
vst1_s16(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.4h }|str d[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1_s32(int32_t *a, int32x2_t b) {
- // CHECK: test_vst1_s32
+ // CHECK-LABEL: test_vst1_s32
vst1_s32(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.2s }|str d[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1_s64(int64_t *a, int64x1_t b) {
- // CHECK: test_vst1_s64
+ // CHECK-LABEL: test_vst1_s64
vst1_s64(a, b);
- // CHECK: st1 {v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.1d }|str d[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1_f16(float16_t *a, float16x4_t b) {
- // CHECK: test_vst1_f16
+ // CHECK-LABEL: test_vst1_f16
vst1_f16(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.4h }|str d[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1_f32(float32_t *a, float32x2_t b) {
- // CHECK: test_vst1_f32
+ // CHECK-LABEL: test_vst1_f32
vst1_f32(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.2s }|str d[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1_f64(float64_t *a, float64x1_t b) {
- // CHECK: test_vst1_f64
+ // CHECK-LABEL: test_vst1_f64
vst1_f64(a, b);
- // CHECK: st1 {v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.1d }|str d[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1_p8(poly8_t *a, poly8x8_t b) {
- // CHECK: test_vst1_p8
+ // CHECK-LABEL: test_vst1_p8
vst1_p8(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.8b }|str d[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1_p16(poly16_t *a, poly16x4_t b) {
- // CHECK: test_vst1_p16
+ // CHECK-LABEL: test_vst1_p16
vst1_p16(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.4h }|str d[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst2q_u8(uint8_t *a, uint8x16x2_t b) {
- // CHECK: test_vst2q_u8
+ // CHECK-LABEL: test_vst2q_u8
vst2q_u8(a, b);
- // CHECK: st2 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2q_u16(uint16_t *a, uint16x8x2_t b) {
- // CHECK: test_vst2q_u16
+ // CHECK-LABEL: test_vst2q_u16
vst2q_u16(a, b);
- // CHECK: st2 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ ?v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2q_u32(uint32_t *a, uint32x4x2_t b) {
- // CHECK: test_vst2q_u32
+ // CHECK-LABEL: test_vst2q_u32
vst2q_u32(a, b);
- // CHECK: st2 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ ?v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2q_u64(uint64_t *a, uint64x2x2_t b) {
- // CHECK: test_vst2q_u64
+ // CHECK-LABEL: test_vst2q_u64
vst2q_u64(a, b);
- // CHECK: st2 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ ?v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2q_s8(int8_t *a, int8x16x2_t b) {
- // CHECK: test_vst2q_s8
+ // CHECK-LABEL: test_vst2q_s8
vst2q_s8(a, b);
- // CHECK: st2 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2q_s16(int16_t *a, int16x8x2_t b) {
- // CHECK: test_vst2q_s16
+ // CHECK-LABEL: test_vst2q_s16
vst2q_s16(a, b);
- // CHECK: st2 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ ?v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2q_s32(int32_t *a, int32x4x2_t b) {
- // CHECK: test_vst2q_s32
+ // CHECK-LABEL: test_vst2q_s32
vst2q_s32(a, b);
- // CHECK: st2 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ ?v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2q_s64(int64_t *a, int64x2x2_t b) {
- // CHECK: test_vst2q_s64
+ // CHECK-LABEL: test_vst2q_s64
vst2q_s64(a, b);
- // CHECK: st2 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ ?v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2q_f16(float16_t *a, float16x8x2_t b) {
- // CHECK: test_vst2q_f16
+ // CHECK-LABEL: test_vst2q_f16
vst2q_f16(a, b);
- // CHECK: st2 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ ?v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2q_f32(float32_t *a, float32x4x2_t b) {
- // CHECK: test_vst2q_f32
+ // CHECK-LABEL: test_vst2q_f32
vst2q_f32(a, b);
- // CHECK: st2 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ ?v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2q_f64(float64_t *a, float64x2x2_t b) {
- // CHECK: test_vst2q_f64
+ // CHECK-LABEL: test_vst2q_f64
vst2q_f64(a, b);
- // CHECK: st2 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ ?v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2q_p8(poly8_t *a, poly8x16x2_t b) {
- // CHECK: test_vst2q_p8
+ // CHECK-LABEL: test_vst2q_p8
vst2q_p8(a, b);
- // CHECK: st2 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2q_p16(poly16_t *a, poly16x8x2_t b) {
- // CHECK: test_vst2q_p16
+ // CHECK-LABEL: test_vst2q_p16
vst2q_p16(a, b);
- // CHECK: st2 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ ?v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2_u8(uint8_t *a, uint8x8x2_t b) {
- // CHECK: test_vst2_u8
+ // CHECK-LABEL: test_vst2_u8
vst2_u8(a, b);
- // CHECK: st2 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ ?v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2_u16(uint16_t *a, uint16x4x2_t b) {
- // CHECK: test_vst2_u16
+ // CHECK-LABEL: test_vst2_u16
vst2_u16(a, b);
- // CHECK: st2 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ ?v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2_u32(uint32_t *a, uint32x2x2_t b) {
- // CHECK: test_vst2_u32
+ // CHECK-LABEL: test_vst2_u32
vst2_u32(a, b);
- // CHECK: st2 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ ?v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2_u64(uint64_t *a, uint64x1x2_t b) {
- // CHECK: test_vst2_u64
+ // CHECK-LABEL: test_vst2_u64
vst2_u64(a, b);
- // CHECK: st1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1|st2}} {{{ ?v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2_s8(int8_t *a, int8x8x2_t b) {
- // CHECK: test_vst2_s8
+ // CHECK-LABEL: test_vst2_s8
vst2_s8(a, b);
- // CHECK: st2 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ ?v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2_s16(int16_t *a, int16x4x2_t b) {
- // CHECK: test_vst2_s16
+ // CHECK-LABEL: test_vst2_s16
vst2_s16(a, b);
- // CHECK: st2 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ ?v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2_s32(int32_t *a, int32x2x2_t b) {
- // CHECK: test_vst2_s32
+ // CHECK-LABEL: test_vst2_s32
vst2_s32(a, b);
- // CHECK: st2 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ ?v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2_s64(int64_t *a, int64x1x2_t b) {
- // CHECK: test_vst2_s64
+ // CHECK-LABEL: test_vst2_s64
vst2_s64(a, b);
- // CHECK: st1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1|st2}} {{{ ?v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2_f16(float16_t *a, float16x4x2_t b) {
- // CHECK: test_vst2_f16
+ // CHECK-LABEL: test_vst2_f16
vst2_f16(a, b);
- // CHECK: st2 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ ?v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2_f32(float32_t *a, float32x2x2_t b) {
- // CHECK: test_vst2_f32
+ // CHECK-LABEL: test_vst2_f32
vst2_f32(a, b);
- // CHECK: st2 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ ?v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2_f64(float64_t *a, float64x1x2_t b) {
- // CHECK: test_vst2_f64
+ // CHECK-LABEL: test_vst2_f64
vst2_f64(a, b);
- // CHECK: st1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1|st2}} {{{ ?v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2_p8(poly8_t *a, poly8x8x2_t b) {
- // CHECK: test_vst2_p8
+ // CHECK-LABEL: test_vst2_p8
vst2_p8(a, b);
- // CHECK: st2 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ ?v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst2_p16(poly16_t *a, poly16x4x2_t b) {
- // CHECK: test_vst2_p16
+ // CHECK-LABEL: test_vst2_p16
vst2_p16(a, b);
- // CHECK: st2 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ ?v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3q_u8(uint8_t *a, uint8x16x3_t b) {
- // CHECK: test_vst3q_u8
+ // CHECK-LABEL: test_vst3q_u8
vst3q_u8(a, b);
- // CHECK: st3 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3q_u16(uint16_t *a, uint16x8x3_t b) {
- // CHECK: test_vst3q_u16
+ // CHECK-LABEL: test_vst3q_u16
vst3q_u16(a, b);
- // CHECK: st3 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3q_u32(uint32_t *a, uint32x4x3_t b) {
- // CHECK: test_vst3q_u32
+ // CHECK-LABEL: test_vst3q_u32
vst3q_u32(a, b);
- // CHECK: st3 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ ?v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3q_u64(uint64_t *a, uint64x2x3_t b) {
- // CHECK: test_vst3q_u64
+ // CHECK-LABEL: test_vst3q_u64
vst3q_u64(a, b);
- // CHECK: st3 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3q_s8(int8_t *a, int8x16x3_t b) {
- // CHECK: test_vst3q_s8
+ // CHECK-LABEL: test_vst3q_s8
vst3q_s8(a, b);
- // CHECK: st3 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3q_s16(int16_t *a, int16x8x3_t b) {
- // CHECK: test_vst3q_s16
+ // CHECK-LABEL: test_vst3q_s16
vst3q_s16(a, b);
- // CHECK: st3 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3q_s32(int32_t *a, int32x4x3_t b) {
- // CHECK: test_vst3q_s32
+ // CHECK-LABEL: test_vst3q_s32
vst3q_s32(a, b);
- // CHECK: st3 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ ?v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3q_s64(int64_t *a, int64x2x3_t b) {
- // CHECK: test_vst3q_s64
+ // CHECK-LABEL: test_vst3q_s64
vst3q_s64(a, b);
- // CHECK: st3 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3q_f16(float16_t *a, float16x8x3_t b) {
- // CHECK: test_vst3q_f16
+ // CHECK-LABEL: test_vst3q_f16
vst3q_f16(a, b);
- // CHECK: st3 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3q_f32(float32_t *a, float32x4x3_t b) {
- // CHECK: test_vst3q_f32
+ // CHECK-LABEL: test_vst3q_f32
vst3q_f32(a, b);
- // CHECK: st3 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ ?v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3q_f64(float64_t *a, float64x2x3_t b) {
- // CHECK: test_vst3q_f64
+ // CHECK-LABEL: test_vst3q_f64
vst3q_f64(a, b);
- // CHECK: st3 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3q_p8(poly8_t *a, poly8x16x3_t b) {
- // CHECK: test_vst3q_p8
+ // CHECK-LABEL: test_vst3q_p8
vst3q_p8(a, b);
- // CHECK: st3 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3q_p16(poly16_t *a, poly16x8x3_t b) {
- // CHECK: test_vst3q_p16
+ // CHECK-LABEL: test_vst3q_p16
vst3q_p16(a, b);
- // CHECK: st3 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3_u8(uint8_t *a, uint8x8x3_t b) {
- // CHECK: test_vst3_u8
+ // CHECK-LABEL: test_vst3_u8
vst3_u8(a, b);
- // CHECK: st3 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ ?v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3_u16(uint16_t *a, uint16x4x3_t b) {
- // CHECK: test_vst3_u16
+ // CHECK-LABEL: test_vst3_u16
vst3_u16(a, b);
- // CHECK: st3 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3_u32(uint32_t *a, uint32x2x3_t b) {
- // CHECK: test_vst3_u32
+ // CHECK-LABEL: test_vst3_u32
vst3_u32(a, b);
- // CHECK: st3 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ ?v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3_u64(uint64_t *a, uint64x1x3_t b) {
- // CHECK: test_vst3_u64
+ // CHECK-LABEL: test_vst3_u64
vst3_u64(a, b);
- // CHECK: st1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: {{st1|st3}} {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3_s8(int8_t *a, int8x8x3_t b) {
- // CHECK: test_vst3_s8
+ // CHECK-LABEL: test_vst3_s8
vst3_s8(a, b);
- // CHECK: st3 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ ?v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3_s16(int16_t *a, int16x4x3_t b) {
- // CHECK: test_vst3_s16
+ // CHECK-LABEL: test_vst3_s16
vst3_s16(a, b);
- // CHECK: st3 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3_s32(int32_t *a, int32x2x3_t b) {
- // CHECK: test_vst3_s32
+ // CHECK-LABEL: test_vst3_s32
vst3_s32(a, b);
- // CHECK: st3 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ ?v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3_s64(int64_t *a, int64x1x3_t b) {
- // CHECK: test_vst3_s64
+ // CHECK-LABEL: test_vst3_s64
vst3_s64(a, b);
- // CHECK: st1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: {{st1|st3}} {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3_f16(float16_t *a, float16x4x3_t b) {
- // CHECK: test_vst3_f16
+ // CHECK-LABEL: test_vst3_f16
vst3_f16(a, b);
- // CHECK: st3 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3_f32(float32_t *a, float32x2x3_t b) {
- // CHECK: test_vst3_f32
+ // CHECK-LABEL: test_vst3_f32
vst3_f32(a, b);
- // CHECK: st3 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ ?v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3_f64(float64_t *a, float64x1x3_t b) {
- // CHECK: test_vst3_f64
+ // CHECK-LABEL: test_vst3_f64
vst3_f64(a, b);
- // CHECK: st1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: {{st1|st3}} {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3_p8(poly8_t *a, poly8x8x3_t b) {
- // CHECK: test_vst3_p8
+ // CHECK-LABEL: test_vst3_p8
vst3_p8(a, b);
- // CHECK: st3 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ ?v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst3_p16(poly16_t *a, poly16x4x3_t b) {
- // CHECK: test_vst3_p16
+ // CHECK-LABEL: test_vst3_p16
vst3_p16(a, b);
- // CHECK: st3 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4q_u8(uint8_t *a, uint8x16x4_t b) {
- // CHECK: test_vst4q_u8
+ // CHECK-LABEL: test_vst4q_u8
vst4q_u8(a, b);
- // CHECK: st4 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b,
- // v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4q_u16(uint16_t *a, uint16x8x4_t b) {
- // CHECK: test_vst4q_u16
+ // CHECK-LABEL: test_vst4q_u16
vst4q_u16(a, b);
- // CHECK: st4 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h,
- // v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4q_u32(uint32_t *a, uint32x4x4_t b) {
- // CHECK: test_vst4q_u32
+ // CHECK-LABEL: test_vst4q_u32
vst4q_u32(a, b);
- // CHECK: st4 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s,
- // v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ ?v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4q_u64(uint64_t *a, uint64x2x4_t b) {
- // CHECK: test_vst4q_u64
+ // CHECK-LABEL: test_vst4q_u64
vst4q_u64(a, b);
- // CHECK: st4 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d,
- // v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4q_s8(int8_t *a, int8x16x4_t b) {
- // CHECK: test_vst4q_s8
+ // CHECK-LABEL: test_vst4q_s8
vst4q_s8(a, b);
- // CHECK: st4 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b,
- // v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4q_s16(int16_t *a, int16x8x4_t b) {
- // CHECK: test_vst4q_s16
+ // CHECK-LABEL: test_vst4q_s16
vst4q_s16(a, b);
- // CHECK: st4 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h,
- // v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4q_s32(int32_t *a, int32x4x4_t b) {
- // CHECK: test_vst4q_s32
+ // CHECK-LABEL: test_vst4q_s32
vst4q_s32(a, b);
- // CHECK: st4 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s,
- // v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ ?v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4q_s64(int64_t *a, int64x2x4_t b) {
- // CHECK: test_vst4q_s64
+ // CHECK-LABEL: test_vst4q_s64
vst4q_s64(a, b);
- // CHECK: st4 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d,
- // v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4q_f16(float16_t *a, float16x8x4_t b) {
- // CHECK: test_vst4q_f16
+ // CHECK-LABEL: test_vst4q_f16
vst4q_f16(a, b);
- // CHECK: st4 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h,
- // v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4q_f32(float32_t *a, float32x4x4_t b) {
- // CHECK: test_vst4q_f32
+ // CHECK-LABEL: test_vst4q_f32
vst4q_f32(a, b);
- // CHECK: st4 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s,
- // v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ ?v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4q_f64(float64_t *a, float64x2x4_t b) {
- // CHECK: test_vst4q_f64
+ // CHECK-LABEL: test_vst4q_f64
vst4q_f64(a, b);
- // CHECK: st4 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d,
- // v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4q_p8(poly8_t *a, poly8x16x4_t b) {
- // CHECK: test_vst4q_p8
+ // CHECK-LABEL: test_vst4q_p8
vst4q_p8(a, b);
- // CHECK: st4 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b,
- // v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4q_p16(poly16_t *a, poly16x8x4_t b) {
- // CHECK: test_vst4q_p16
+ // CHECK-LABEL: test_vst4q_p16
vst4q_p16(a, b);
- // CHECK: st4 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h,
- // v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4_u8(uint8_t *a, uint8x8x4_t b) {
- // CHECK: test_vst4_u8
+ // CHECK-LABEL: test_vst4_u8
vst4_u8(a, b);
- // CHECK: st4 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b,
- // v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ ?v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4_u16(uint16_t *a, uint16x4x4_t b) {
- // CHECK: test_vst4_u16
+ // CHECK-LABEL: test_vst4_u16
vst4_u16(a, b);
- // CHECK: st4 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h,
- // v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4_u32(uint32_t *a, uint32x2x4_t b) {
- // CHECK: test_vst4_u32
+ // CHECK-LABEL: test_vst4_u32
vst4_u32(a, b);
- // CHECK: st4 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s,
- // v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ ?v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4_u64(uint64_t *a, uint64x1x4_t b) {
- // CHECK: test_vst4_u64
+ // CHECK-LABEL: test_vst4_u64
vst4_u64(a, b);
- // CHECK: st1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d,
- // v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1|st4}} {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4_s8(int8_t *a, int8x8x4_t b) {
- // CHECK: test_vst4_s8
+ // CHECK-LABEL: test_vst4_s8
vst4_s8(a, b);
- // CHECK: st4 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b,
- // v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+// CHECK: st4 {{{ ?v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4_s16(int16_t *a, int16x4x4_t b) {
- // CHECK: test_vst4_s16
+ // CHECK-LABEL: test_vst4_s16
vst4_s16(a, b);
- // CHECK: st4 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h,
- // v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4_s32(int32_t *a, int32x2x4_t b) {
- // CHECK: test_vst4_s32
+ // CHECK-LABEL: test_vst4_s32
vst4_s32(a, b);
- // CHECK: st4 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s,
- // v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ ?v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4_s64(int64_t *a, int64x1x4_t b) {
- // CHECK: test_vst4_s64
+ // CHECK-LABEL: test_vst4_s64
vst4_s64(a, b);
- // CHECK: st1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d,
- // v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1|st4}} {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4_f16(float16_t *a, float16x4x4_t b) {
- // CHECK: test_vst4_f16
+ // CHECK-LABEL: test_vst4_f16
vst4_f16(a, b);
- // CHECK: st4 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h,
- // v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4_f32(float32_t *a, float32x2x4_t b) {
- // CHECK: test_vst4_f32
+ // CHECK-LABEL: test_vst4_f32
vst4_f32(a, b);
- // CHECK: st4 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s,
- // v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ ?v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4_f64(float64_t *a, float64x1x4_t b) {
- // CHECK: test_vst4_f64
+ // CHECK-LABEL: test_vst4_f64
vst4_f64(a, b);
- // CHECK: st1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d,
- // v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{st1|st4}} {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4_p8(poly8_t *a, poly8x8x4_t b) {
- // CHECK: test_vst4_p8
+ // CHECK-LABEL: test_vst4_p8
vst4_p8(a, b);
- // CHECK: st4 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b,
- // v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ ?v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst4_p16(poly16_t *a, poly16x4x4_t b) {
- // CHECK: test_vst4_p16
+ // CHECK-LABEL: test_vst4_p16
vst4_p16(a, b);
- // CHECK: st4 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h,
- // v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
uint8x16x2_t test_vld1q_u8_x2(uint8_t const *a) {
// CHECK-LABEL: test_vld1q_u8_x2
return vld1q_u8_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
uint16x8x2_t test_vld1q_u16_x2(uint16_t const *a) {
// CHECK-LABEL: test_vld1q_u16_x2
return vld1q_u16_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
uint32x4x2_t test_vld1q_u32_x2(uint32_t const *a) {
// CHECK-LABEL: test_vld1q_u32_x2
return vld1q_u32_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
uint64x2x2_t test_vld1q_u64_x2(uint64_t const *a) {
// CHECK-LABEL: test_vld1q_u64_x2
return vld1q_u64_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
int8x16x2_t test_vld1q_s8_x2(int8_t const *a) {
// CHECK-LABEL: test_vld1q_s8_x2
return vld1q_s8_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
int16x8x2_t test_vld1q_s16_x2(int16_t const *a) {
// CHECK-LABEL: test_vld1q_s16_x2
return vld1q_s16_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
int32x4x2_t test_vld1q_s32_x2(int32_t const *a) {
// CHECK-LABEL: test_vld1q_s32_x2
return vld1q_s32_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
int64x2x2_t test_vld1q_s64_x2(int64_t const *a) {
// CHECK-LABEL: test_vld1q_s64_x2
return vld1q_s64_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
float16x8x2_t test_vld1q_f16_x2(float16_t const *a) {
// CHECK-LABEL: test_vld1q_f16_x2
return vld1q_f16_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
float32x4x2_t test_vld1q_f32_x2(float32_t const *a) {
// CHECK-LABEL: test_vld1q_f32_x2
return vld1q_f32_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
float64x2x2_t test_vld1q_f64_x2(float64_t const *a) {
// CHECK-LABEL: test_vld1q_f64_x2
return vld1q_f64_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
poly8x16x2_t test_vld1q_p8_x2(poly8_t const *a) {
// CHECK-LABEL: test_vld1q_p8_x2
return vld1q_p8_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
poly16x8x2_t test_vld1q_p16_x2(poly16_t const *a) {
// CHECK-LABEL: test_vld1q_p16_x2
return vld1q_p16_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
poly64x2x2_t test_vld1q_p64_x2(poly64_t const *a) {
// CHECK-LABEL: test_vld1q_p64_x2
return vld1q_p64_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
uint8x8x2_t test_vld1_u8_x2(uint8_t const *a) {
// CHECK-LABEL: test_vld1_u8_x2
return vld1_u8_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
uint16x4x2_t test_vld1_u16_x2(uint16_t const *a) {
// CHECK-LABEL: test_vld1_u16_x2
return vld1_u16_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
uint32x2x2_t test_vld1_u32_x2(uint32_t const *a) {
// CHECK-LABEL: test_vld1_u32_x2
return vld1_u32_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
uint64x1x2_t test_vld1_u64_x2(uint64_t const *a) {
// CHECK-LABEL: test_vld1_u64_x2
return vld1_u64_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
int8x8x2_t test_vld1_s8_x2(int8_t const *a) {
// CHECK-LABEL: test_vld1_s8_x2
return vld1_s8_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
int16x4x2_t test_vld1_s16_x2(int16_t const *a) {
// CHECK-LABEL: test_vld1_s16_x2
return vld1_s16_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
int32x2x2_t test_vld1_s32_x2(int32_t const *a) {
// CHECK-LABEL: test_vld1_s32_x2
return vld1_s32_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
int64x1x2_t test_vld1_s64_x2(int64_t const *a) {
// CHECK-LABEL: test_vld1_s64_x2
return vld1_s64_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
float16x4x2_t test_vld1_f16_x2(float16_t const *a) {
// CHECK-LABEL: test_vld1_f16_x2
return vld1_f16_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
float32x2x2_t test_vld1_f32_x2(float32_t const *a) {
// CHECK-LABEL: test_vld1_f32_x2
return vld1_f32_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
float64x1x2_t test_vld1_f64_x2(float64_t const *a) {
// CHECK-LABEL: test_vld1_f64_x2
return vld1_f64_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
poly8x8x2_t test_vld1_p8_x2(poly8_t const *a) {
// CHECK-LABEL: test_vld1_p8_x2
return vld1_p8_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
poly16x4x2_t test_vld1_p16_x2(poly16_t const *a) {
// CHECK-LABEL: test_vld1_p16_x2
return vld1_p16_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
poly64x1x2_t test_vld1_p64_x2(poly64_t const *a) {
// CHECK-LABEL: test_vld1_p64_x2
return vld1_p64_x2(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
uint8x16x3_t test_vld1q_u8_x3(uint8_t const *a) {
// CHECK-LABEL: test_vld1q_u8_x3
return vld1q_u8_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
uint16x8x3_t test_vld1q_u16_x3(uint16_t const *a) {
// CHECK-LABEL: test_vld1q_u16_x3
return vld1q_u16_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
uint32x4x3_t test_vld1q_u32_x3(uint32_t const *a) {
// CHECK-LABEL: test_vld1q_u32_x3
return vld1q_u32_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
uint64x2x3_t test_vld1q_u64_x3(uint64_t const *a) {
// CHECK-LABEL: test_vld1q_u64_x3
return vld1q_u64_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
int8x16x3_t test_vld1q_s8_x3(int8_t const *a) {
// CHECK-LABEL: test_vld1q_s8_x3
return vld1q_s8_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
int16x8x3_t test_vld1q_s16_x3(int16_t const *a) {
// CHECK-LABEL: test_vld1q_s16_x3
return vld1q_s16_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
int32x4x3_t test_vld1q_s32_x3(int32_t const *a) {
// CHECK-LABEL: test_vld1q_s32_x3
return vld1q_s32_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
int64x2x3_t test_vld1q_s64_x3(int64_t const *a) {
// CHECK-LABEL: test_vld1q_s64_x3
return vld1q_s64_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
float16x8x3_t test_vld1q_f16_x3(float16_t const *a) {
// CHECK-LABEL: test_vld1q_f16_x3
return vld1q_f16_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
float32x4x3_t test_vld1q_f32_x3(float32_t const *a) {
// CHECK-LABEL: test_vld1q_f32_x3
return vld1q_f32_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
float64x2x3_t test_vld1q_f64_x3(float64_t const *a) {
// CHECK-LABEL: test_vld1q_f64_x3
return vld1q_f64_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
poly8x16x3_t test_vld1q_p8_x3(poly8_t const *a) {
// CHECK-LABEL: test_vld1q_p8_x3
return vld1q_p8_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
poly16x8x3_t test_vld1q_p16_x3(poly16_t const *a) {
// CHECK-LABEL: test_vld1q_p16_x3
return vld1q_p16_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
poly64x2x3_t test_vld1q_p64_x3(poly64_t const *a) {
// CHECK-LABEL: test_vld1q_p64_x3
return vld1q_p64_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
uint8x8x3_t test_vld1_u8_x3(uint8_t const *a) {
// CHECK-LABEL: test_vld1_u8_x3
return vld1_u8_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
uint16x4x3_t test_vld1_u16_x3(uint16_t const *a) {
// CHECK-LABEL: test_vld1_u16_x3
return vld1_u16_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
uint32x2x3_t test_vld1_u32_x3(uint32_t const *a) {
// CHECK-LABEL: test_vld1_u32_x3
return vld1_u32_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
uint64x1x3_t test_vld1_u64_x3(uint64_t const *a) {
// CHECK-LABEL: test_vld1_u64_x3
return vld1_u64_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
int8x8x3_t test_vld1_s8_x3(int8_t const *a) {
// CHECK-LABEL: test_vld1_s8_x3
return vld1_s8_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
int16x4x3_t test_vld1_s16_x3(int16_t const *a) {
// CHECK-LABEL: test_vld1_s16_x3
return vld1_s16_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
int32x2x3_t test_vld1_s32_x3(int32_t const *a) {
// CHECK-LABEL: test_vld1_s32_x3
return vld1_s32_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
int64x1x3_t test_vld1_s64_x3(int64_t const *a) {
// CHECK-LABEL: test_vld1_s64_x3
return vld1_s64_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
float16x4x3_t test_vld1_f16_x3(float16_t const *a) {
// CHECK-LABEL: test_vld1_f16_x3
return vld1_f16_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
float32x2x3_t test_vld1_f32_x3(float32_t const *a) {
// CHECK-LABEL: test_vld1_f32_x3
return vld1_f32_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
float64x1x3_t test_vld1_f64_x3(float64_t const *a) {
// CHECK-LABEL: test_vld1_f64_x3
return vld1_f64_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
poly8x8x3_t test_vld1_p8_x3(poly8_t const *a) {
// CHECK-LABEL: test_vld1_p8_x3
return vld1_p8_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
poly16x4x3_t test_vld1_p16_x3(poly16_t const *a) {
// CHECK-LABEL: test_vld1_p16_x3
return vld1_p16_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
poly64x1x3_t test_vld1_p64_x3(poly64_t const *a) {
// CHECK-LABEL: test_vld1_p64_x3
return vld1_p64_x3(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
uint8x16x4_t test_vld1q_u8_x4(uint8_t const *a) {
// CHECK-LABEL: test_vld1q_u8_x4
return vld1q_u8_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b,
- // v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
uint16x8x4_t test_vld1q_u16_x4(uint16_t const *a) {
// CHECK-LABEL: test_vld1q_u16_x4
return vld1q_u16_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h,
- // v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
uint32x4x4_t test_vld1q_u32_x4(uint32_t const *a) {
// CHECK-LABEL: test_vld1q_u32_x4
return vld1q_u32_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s,
- // v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
uint64x2x4_t test_vld1q_u64_x4(uint64_t const *a) {
// CHECK-LABEL: test_vld1q_u64_x4
return vld1q_u64_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d,
- // v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
int8x16x4_t test_vld1q_s8_x4(int8_t const *a) {
// CHECK-LABEL: test_vld1q_s8_x4
return vld1q_s8_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b,
- // v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
int16x8x4_t test_vld1q_s16_x4(int16_t const *a) {
// CHECK-LABEL: test_vld1q_s16_x4
return vld1q_s16_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h,
- // v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
int32x4x4_t test_vld1q_s32_x4(int32_t const *a) {
// CHECK-LABEL: test_vld1q_s32_x4
return vld1q_s32_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s,
- // v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
int64x2x4_t test_vld1q_s64_x4(int64_t const *a) {
// CHECK-LABEL: test_vld1q_s64_x4
return vld1q_s64_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d,
- // v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
float16x8x4_t test_vld1q_f16_x4(float16_t const *a) {
// CHECK-LABEL: test_vld1q_f16_x4
return vld1q_f16_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h,
- // v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
float32x4x4_t test_vld1q_f32_x4(float32_t const *a) {
// CHECK-LABEL: test_vld1q_f32_x4
return vld1q_f32_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s,
- // v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
float64x2x4_t test_vld1q_f64_x4(float64_t const *a) {
// CHECK-LABEL: test_vld1q_f64_x4
return vld1q_f64_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d,
- // v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
poly8x16x4_t test_vld1q_p8_x4(poly8_t const *a) {
// CHECK-LABEL: test_vld1q_p8_x4
return vld1q_p8_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b,
- // v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
poly16x8x4_t test_vld1q_p16_x4(poly16_t const *a) {
// CHECK-LABEL: test_vld1q_p16_x4
return vld1q_p16_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h,
- // v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
poly64x2x4_t test_vld1q_p64_x4(poly64_t const *a) {
// CHECK-LABEL: test_vld1q_p64_x4
return vld1q_p64_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d,
- // v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
uint8x8x4_t test_vld1_u8_x4(uint8_t const *a) {
// CHECK-LABEL: test_vld1_u8_x4
return vld1_u8_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b,
- // v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
uint16x4x4_t test_vld1_u16_x4(uint16_t const *a) {
// CHECK-LABEL: test_vld1_u16_x4
return vld1_u16_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h,
- // v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
uint32x2x4_t test_vld1_u32_x4(uint32_t const *a) {
// CHECK-LABEL: test_vld1_u32_x4
return vld1_u32_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s,
- // v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
uint64x1x4_t test_vld1_u64_x4(uint64_t const *a) {
// CHECK-LABEL: test_vld1_u64_x4
return vld1_u64_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d,
- // v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
int8x8x4_t test_vld1_s8_x4(int8_t const *a) {
// CHECK-LABEL: test_vld1_s8_x4
return vld1_s8_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b,
- // v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
int16x4x4_t test_vld1_s16_x4(int16_t const *a) {
// CHECK-LABEL: test_vld1_s16_x4
return vld1_s16_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h,
- // v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
int32x2x4_t test_vld1_s32_x4(int32_t const *a) {
// CHECK-LABEL: test_vld1_s32_x4
return vld1_s32_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s,
- // v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
int64x1x4_t test_vld1_s64_x4(int64_t const *a) {
// CHECK-LABEL: test_vld1_s64_x4
return vld1_s64_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d,
- // v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
float16x4x4_t test_vld1_f16_x4(float16_t const *a) {
// CHECK-LABEL: test_vld1_f16_x4
return vld1_f16_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h,
- // v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
float32x2x4_t test_vld1_f32_x4(float32_t const *a) {
// CHECK-LABEL: test_vld1_f32_x4
return vld1_f32_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s,
- // v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
float64x1x4_t test_vld1_f64_x4(float64_t const *a) {
// CHECK-LABEL: test_vld1_f64_x4
return vld1_f64_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d,
- // v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
poly8x8x4_t test_vld1_p8_x4(poly8_t const *a) {
// CHECK-LABEL: test_vld1_p8_x4
return vld1_p8_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b,
- // v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
poly16x4x4_t test_vld1_p16_x4(poly16_t const *a) {
// CHECK-LABEL: test_vld1_p16_x4
return vld1_p16_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h,
- // v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
poly64x1x4_t test_vld1_p64_x4(poly64_t const *a) {
// CHECK-LABEL: test_vld1_p64_x4
return vld1_p64_x4(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d,
- // v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_u8_x2(uint8_t *a, uint8x16x2_t b) {
- // CHECK: test_vst1q_u8_x2
+ // CHECK-LABEL: test_vst1q_u8_x2
vst1q_u8_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_u16_x2(uint16_t *a, uint16x8x2_t b) {
- // CHECK: test_vst1q_u16_x2
+ // CHECK-LABEL: test_vst1q_u16_x2
vst1q_u16_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_u32_x2(uint32_t *a, uint32x4x2_t b) {
- // CHECK: test_vst1q_u32_x2
+ // CHECK-LABEL: test_vst1q_u32_x2
vst1q_u32_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_u64_x2(uint64_t *a, uint64x2x2_t b) {
- // CHECK: test_vst1q_u64_x2
+ // CHECK-LABEL: test_vst1q_u64_x2
vst1q_u64_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_s8_x2(int8_t *a, int8x16x2_t b) {
- // CHECK: test_vst1q_s8_x2
+ // CHECK-LABEL: test_vst1q_s8_x2
vst1q_s8_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_s16_x2(int16_t *a, int16x8x2_t b) {
- // CHECK: test_vst1q_s16_x2
+ // CHECK-LABEL: test_vst1q_s16_x2
vst1q_s16_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_s32_x2(int32_t *a, int32x4x2_t b) {
- // CHECK: test_vst1q_s32_x2
+ // CHECK-LABEL: test_vst1q_s32_x2
vst1q_s32_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_s64_x2(int64_t *a, int64x2x2_t b) {
- // CHECK: test_vst1q_s64_x2
+ // CHECK-LABEL: test_vst1q_s64_x2
vst1q_s64_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_f16_x2(float16_t *a, float16x8x2_t b) {
- // CHECK: test_vst1q_f16_x2
+ // CHECK-LABEL: test_vst1q_f16_x2
vst1q_f16_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_f32_x2(float32_t *a, float32x4x2_t b) {
- // CHECK: test_vst1q_f32_x2
+ // CHECK-LABEL: test_vst1q_f32_x2
vst1q_f32_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_f64_x2(float64_t *a, float64x2x2_t b) {
- // CHECK: test_vst1q_f64_x2
+ // CHECK-LABEL: test_vst1q_f64_x2
vst1q_f64_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_p8_x2(poly8_t *a, poly8x16x2_t b) {
- // CHECK: test_vst1q_p8_x2
+ // CHECK-LABEL: test_vst1q_p8_x2
vst1q_p8_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_p16_x2(poly16_t *a, poly16x8x2_t b) {
- // CHECK: test_vst1q_p16_x2
+ // CHECK-LABEL: test_vst1q_p16_x2
vst1q_p16_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_p64_x2(poly64_t *a, poly64x2x2_t b) {
- // CHECK: test_vst1q_p64_x2
+ // CHECK-LABEL: test_vst1q_p64_x2
vst1q_p64_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_u8_x2(uint8_t *a, uint8x8x2_t b) {
- // CHECK: test_vst1_u8_x2
+ // CHECK-LABEL: test_vst1_u8_x2
vst1_u8_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_u16_x2(uint16_t *a, uint16x4x2_t b) {
- // CHECK: test_vst1_u16_x2
+ // CHECK-LABEL: test_vst1_u16_x2
vst1_u16_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_u32_x2(uint32_t *a, uint32x2x2_t b) {
- // CHECK: test_vst1_u32_x2
+ // CHECK-LABEL: test_vst1_u32_x2
vst1_u32_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_u64_x2(uint64_t *a, uint64x1x2_t b) {
- // CHECK: test_vst1_u64_x2
+ // CHECK-LABEL: test_vst1_u64_x2
vst1_u64_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_s8_x2(int8_t *a, int8x8x2_t b) {
- // CHECK: test_vst1_s8_x2
+ // CHECK-LABEL: test_vst1_s8_x2
vst1_s8_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_s16_x2(int16_t *a, int16x4x2_t b) {
- // CHECK: test_vst1_s16_x2
+ // CHECK-LABEL: test_vst1_s16_x2
vst1_s16_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_s32_x2(int32_t *a, int32x2x2_t b) {
- // CHECK: test_vst1_s32_x2
+ // CHECK-LABEL: test_vst1_s32_x2
vst1_s32_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_s64_x2(int64_t *a, int64x1x2_t b) {
- // CHECK: test_vst1_s64_x2
+ // CHECK-LABEL: test_vst1_s64_x2
vst1_s64_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_f16_x2(float16_t *a, float16x4x2_t b) {
- // CHECK: test_vst1_f16_x2
+ // CHECK-LABEL: test_vst1_f16_x2
vst1_f16_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_f32_x2(float32_t *a, float32x2x2_t b) {
- // CHECK: test_vst1_f32_x2
+ // CHECK-LABEL: test_vst1_f32_x2
vst1_f32_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_f64_x2(float64_t *a, float64x1x2_t b) {
- // CHECK: test_vst1_f64_x2
+ // CHECK-LABEL: test_vst1_f64_x2
vst1_f64_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_p8_x2(poly8_t *a, poly8x8x2_t b) {
- // CHECK: test_vst1_p8_x2
+ // CHECK-LABEL: test_vst1_p8_x2
vst1_p8_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_p16_x2(poly16_t *a, poly16x4x2_t b) {
- // CHECK: test_vst1_p16_x2
+ // CHECK-LABEL: test_vst1_p16_x2
vst1_p16_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_p64_x2(poly64_t *a, poly64x1x2_t b) {
- // CHECK: test_vst1_p64_x2
+ // CHECK-LABEL: test_vst1_p64_x2
vst1_p64_x2(a, b);
- // CHECK: st1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_u8_x3(uint8_t *a, uint8x16x3_t b) {
- // CHECK: test_vst1q_u8_x3
+ // CHECK-LABEL: test_vst1q_u8_x3
vst1q_u8_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_u16_x3(uint16_t *a, uint16x8x3_t b) {
- // CHECK: test_vst1q_u16_x3
+ // CHECK-LABEL: test_vst1q_u16_x3
vst1q_u16_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_u32_x3(uint32_t *a, uint32x4x3_t b) {
- // CHECK: test_vst1q_u32_x3
+ // CHECK-LABEL: test_vst1q_u32_x3
vst1q_u32_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_u64_x3(uint64_t *a, uint64x2x3_t b) {
- // CHECK: test_vst1q_u64_x3
+ // CHECK-LABEL: test_vst1q_u64_x3
vst1q_u64_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_s8_x3(int8_t *a, int8x16x3_t b) {
- // CHECK: test_vst1q_s8_x3
+ // CHECK-LABEL: test_vst1q_s8_x3
vst1q_s8_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_s16_x3(int16_t *a, int16x8x3_t b) {
- // CHECK: test_vst1q_s16_x3
+ // CHECK-LABEL: test_vst1q_s16_x3
vst1q_s16_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_s32_x3(int32_t *a, int32x4x3_t b) {
- // CHECK: test_vst1q_s32_x3
+ // CHECK-LABEL: test_vst1q_s32_x3
vst1q_s32_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_s64_x3(int64_t *a, int64x2x3_t b) {
- // CHECK: test_vst1q_s64_x3
+ // CHECK-LABEL: test_vst1q_s64_x3
vst1q_s64_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_f16_x3(float16_t *a, float16x8x3_t b) {
- // CHECK: test_vst1q_f16_x3
+ // CHECK-LABEL: test_vst1q_f16_x3
vst1q_f16_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_f32_x3(float32_t *a, float32x4x3_t b) {
- // CHECK: test_vst1q_f32_x3
+ // CHECK-LABEL: test_vst1q_f32_x3
vst1q_f32_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_f64_x3(float64_t *a, float64x2x3_t b) {
- // CHECK: test_vst1q_f64_x3
+ // CHECK-LABEL: test_vst1q_f64_x3
vst1q_f64_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_p8_x3(poly8_t *a, poly8x16x3_t b) {
- // CHECK: test_vst1q_p8_x3
+ // CHECK-LABEL: test_vst1q_p8_x3
vst1q_p8_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_p16_x3(poly16_t *a, poly16x8x3_t b) {
- // CHECK: test_vst1q_p16_x3
+ // CHECK-LABEL: test_vst1q_p16_x3
vst1q_p16_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_p64_x3(poly64_t *a, poly64x2x3_t b) {
- // CHECK: test_vst1q_p64_x3
+ // CHECK-LABEL: test_vst1q_p64_x3
vst1q_p64_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_u8_x3(uint8_t *a, uint8x8x3_t b) {
- // CHECK: test_vst1_u8_x3
+ // CHECK-LABEL: test_vst1_u8_x3
vst1_u8_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_u16_x3(uint16_t *a, uint16x4x3_t b) {
- // CHECK: test_vst1_u16_x3
+ // CHECK-LABEL: test_vst1_u16_x3
vst1_u16_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_u32_x3(uint32_t *a, uint32x2x3_t b) {
- // CHECK: test_vst1_u32_x3
+ // CHECK-LABEL: test_vst1_u32_x3
vst1_u32_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_u64_x3(uint64_t *a, uint64x1x3_t b) {
- // CHECK: test_vst1_u64_x3
+ // CHECK-LABEL: test_vst1_u64_x3
vst1_u64_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_s8_x3(int8_t *a, int8x8x3_t b) {
- // CHECK: test_vst1_s8_x3
+ // CHECK-LABEL: test_vst1_s8_x3
vst1_s8_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_s16_x3(int16_t *a, int16x4x3_t b) {
- // CHECK: test_vst1_s16_x3
+ // CHECK-LABEL: test_vst1_s16_x3
vst1_s16_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_s32_x3(int32_t *a, int32x2x3_t b) {
- // CHECK: test_vst1_s32_x3
+ // CHECK-LABEL: test_vst1_s32_x3
vst1_s32_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_s64_x3(int64_t *a, int64x1x3_t b) {
- // CHECK: test_vst1_s64_x3
+ // CHECK-LABEL: test_vst1_s64_x3
vst1_s64_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_f16_x3(float16_t *a, float16x4x3_t b) {
- // CHECK: test_vst1_f16_x3
+ // CHECK-LABEL: test_vst1_f16_x3
vst1_f16_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_f32_x3(float32_t *a, float32x2x3_t b) {
- // CHECK: test_vst1_f32_x3
+ // CHECK-LABEL: test_vst1_f32_x3
vst1_f32_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_f64_x3(float64_t *a, float64x1x3_t b) {
- // CHECK: test_vst1_f64_x3
+ // CHECK-LABEL: test_vst1_f64_x3
vst1_f64_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_p8_x3(poly8_t *a, poly8x8x3_t b) {
- // CHECK: test_vst1_p8_x3
+ // CHECK-LABEL: test_vst1_p8_x3
vst1_p8_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_p16_x3(poly16_t *a, poly16x4x3_t b) {
- // CHECK: test_vst1_p16_x3
+ // CHECK-LABEL: test_vst1_p16_x3
vst1_p16_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_p64_x3(poly64_t *a, poly64x1x3_t b) {
- // CHECK: test_vst1_p64_x3
+ // CHECK-LABEL: test_vst1_p64_x3
vst1_p64_x3(a, b);
- // CHECK: st1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d},
- // [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_u8_x4(uint8_t *a, uint8x16x4_t b) {
- // CHECK: test_vst1q_u8_x4
+ // CHECK-LABEL: test_vst1q_u8_x4
vst1q_u8_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b,
- // v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_u16_x4(uint16_t *a, uint16x8x4_t b) {
- // CHECK: test_vst1q_u16_x4
+ // CHECK-LABEL: test_vst1q_u16_x4
vst1q_u16_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h,
- // v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_u32_x4(uint32_t *a, uint32x4x4_t b) {
- // CHECK: test_vst1q_u32_x4
+ // CHECK-LABEL: test_vst1q_u32_x4
vst1q_u32_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s,
- // v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_u64_x4(uint64_t *a, uint64x2x4_t b) {
- // CHECK: test_vst1q_u64_x4
+ // CHECK-LABEL: test_vst1q_u64_x4
vst1q_u64_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d,
- // v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_s8_x4(int8_t *a, int8x16x4_t b) {
- // CHECK: test_vst1q_s8_x4
+ // CHECK-LABEL: test_vst1q_s8_x4
vst1q_s8_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b,
- // v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_s16_x4(int16_t *a, int16x8x4_t b) {
- // CHECK: test_vst1q_s16_x4
+ // CHECK-LABEL: test_vst1q_s16_x4
vst1q_s16_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h,
- // v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_s32_x4(int32_t *a, int32x4x4_t b) {
- // CHECK: test_vst1q_s32_x4
+ // CHECK-LABEL: test_vst1q_s32_x4
vst1q_s32_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s,
- // v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_s64_x4(int64_t *a, int64x2x4_t b) {
- // CHECK: test_vst1q_s64_x4
+ // CHECK-LABEL: test_vst1q_s64_x4
vst1q_s64_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d,
- // v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_f16_x4(float16_t *a, float16x8x4_t b) {
- // CHECK: test_vst1q_f16_x4
+ // CHECK-LABEL: test_vst1q_f16_x4
vst1q_f16_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h,
- // v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_f32_x4(float32_t *a, float32x4x4_t b) {
- // CHECK: test_vst1q_f32_x4
+ // CHECK-LABEL: test_vst1q_f32_x4
vst1q_f32_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s,
- // v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_f64_x4(float64_t *a, float64x2x4_t b) {
- // CHECK: test_vst1q_f64_x4
+ // CHECK-LABEL: test_vst1q_f64_x4
vst1q_f64_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d,
- // v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_p8_x4(poly8_t *a, poly8x16x4_t b) {
- // CHECK: test_vst1q_p8_x4
+ // CHECK-LABEL: test_vst1q_p8_x4
vst1q_p8_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b,
- // v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_p16_x4(poly16_t *a, poly16x8x4_t b) {
- // CHECK: test_vst1q_p16_x4
+ // CHECK-LABEL: test_vst1q_p16_x4
vst1q_p16_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h,
- // v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_p64_x4(poly64_t *a, poly64x2x4_t b) {
- // CHECK: test_vst1q_p64_x4
+ // CHECK-LABEL: test_vst1q_p64_x4
vst1q_p64_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d,
- // v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_u8_x4(uint8_t *a, uint8x8x4_t b) {
- // CHECK: test_vst1_u8_x4
+ // CHECK-LABEL: test_vst1_u8_x4
vst1_u8_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b,
- // v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_u16_x4(uint16_t *a, uint16x4x4_t b) {
- // CHECK: test_vst1_u16_x4
+ // CHECK-LABEL: test_vst1_u16_x4
vst1_u16_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h,
- // v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_u32_x4(uint32_t *a, uint32x2x4_t b) {
- // CHECK: test_vst1_u32_x4
+ // CHECK-LABEL: test_vst1_u32_x4
vst1_u32_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s,
- // v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_u64_x4(uint64_t *a, uint64x1x4_t b) {
- // CHECK: test_vst1_u64_x4
+ // CHECK-LABEL: test_vst1_u64_x4
vst1_u64_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d,
- // v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_s8_x4(int8_t *a, int8x8x4_t b) {
- // CHECK: test_vst1_s8_x4
+ // CHECK-LABEL: test_vst1_s8_x4
vst1_s8_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b,
- // v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_s16_x4(int16_t *a, int16x4x4_t b) {
- // CHECK: test_vst1_s16_x4
+ // CHECK-LABEL: test_vst1_s16_x4
vst1_s16_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h,
- // v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_s32_x4(int32_t *a, int32x2x4_t b) {
- // CHECK: test_vst1_s32_x4
+ // CHECK-LABEL: test_vst1_s32_x4
vst1_s32_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s,
- // v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_s64_x4(int64_t *a, int64x1x4_t b) {
- // CHECK: test_vst1_s64_x4
+ // CHECK-LABEL: test_vst1_s64_x4
vst1_s64_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d,
- // v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_f16_x4(float16_t *a, float16x4x4_t b) {
- // CHECK: test_vst1_f16_x4
+ // CHECK-LABEL: test_vst1_f16_x4
vst1_f16_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h,
- // v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_f32_x4(float32_t *a, float32x2x4_t b) {
- // CHECK: test_vst1_f32_x4
+ // CHECK-LABEL: test_vst1_f32_x4
vst1_f32_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s,
- // v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_f64_x4(float64_t *a, float64x1x4_t b) {
- // CHECK: test_vst1_f64_x4
+ // CHECK-LABEL: test_vst1_f64_x4
vst1_f64_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d,
- // v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_p8_x4(poly8_t *a, poly8x8x4_t b) {
- // CHECK: test_vst1_p8_x4
+ // CHECK-LABEL: test_vst1_p8_x4
vst1_p8_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b,
- // v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_p16_x4(poly16_t *a, poly16x4x4_t b) {
- // CHECK: test_vst1_p16_x4
+ // CHECK-LABEL: test_vst1_p16_x4
vst1_p16_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h,
- // v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h ?}}}, [{{x[0-9]+|sp}}]
}
void test_vst1_p64_x4(poly64_t *a, poly64x1x4_t b) {
- // CHECK: test_vst1_p64_x4
+ // CHECK-LABEL: test_vst1_p64_x4
vst1_p64_x4(a, b);
- // CHECK: st1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d,
- // v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ ?v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d ?}}}, [{{x[0-9]+|sp}}]
}
int64_t test_vceqd_s64(int64_t a, int64_t b) {
-// CHECK: test_vceqd_s64
-// CHECK: cmeq {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vceqd_s64
+// CHECK: {{cmeq d[0-9]+, d[0-9]+, d[0-9]+|cmp x0, x1}}
return (int64_t)vceqd_s64(a, b);
}
uint64_t test_vceqd_u64(uint64_t a, uint64_t b) {
-// CHECK: test_vceqd_u64
-// CHECK: cmeq {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vceqd_u64
+// CHECK: {{cmeq d[0-9]+, d[0-9]+, d[0-9]+|cmp x0, x1}}
return (int64_t)vceqd_u64(a, b);
-}
+}
int64_t test_vceqzd_s64(int64_t a) {
-// CHECK: test_vceqzd_s64
-// CHECK: cmeq {{d[0-9]+}}, {{d[0-9]+}}, #0x0
+// CHECK-LABEL: test_vceqzd_s64
+// CHECK: {{cmeq d[0-9]+, d[0-9]+, #0x0|cmp x0, #0}}
return (int64_t)vceqzd_s64(a);
}
int64_t test_vceqzd_u64(int64_t a) {
-// CHECK: test_vceqzd_u64
-// CHECK: cmeq {{d[0-9]+}}, {{d[0-9]+}}, #0x0
+// CHECK-LABEL: test_vceqzd_u64
+// CHECK: {{cmeq d[0-9]+, d[0-9]+, #0x0|cmp x0, #0}}
return (int64_t)vceqzd_u64(a);
}
int64_t test_vcged_s64(int64_t a, int64_t b) {
-// CHECK: test_vcged_s64
-// CHECK: cmge {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcged_s64
+// CHECK: {{cmge d[0-9]+, d[0-9]+, d[0-9]+|cmp x0, x1}}
return (int64_t)vcged_s64(a, b);
}
uint64_t test_vcged_u64(uint64_t a, uint64_t b) {
-// CHECK: test_vcged_u64
-// CHECK: cmhs {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcged_u64
+// CHECK: {{cmhs d[0-9]+, d[0-9]+, d[0-9]+|cmp x0, x1}}
return (uint64_t)vcged_u64(a, b);
}
int64_t test_vcgezd_s64(int64_t a) {
-// CHECK: test_vcgezd_s64
-// CHECK: cmge {{d[0-9]+}}, {{d[0-9]+}}, #0x0
+// CHECK-LABEL: test_vcgezd_s64
+// CHECK: {{cmge d[0-9]+, d[0-9]+, #0x0|eor x0, x[0-9]+, x0, asr #63}}
return (int64_t)vcgezd_s64(a);
}
int64_t test_vcgtd_s64(int64_t a, int64_t b) {
-// CHECK: test_vcgtd_s64
-// CHECK: cmgt {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcgtd_s64
+// CHECK: {{cmgt d[0-9]+, d[0-9]+, d[0-9]+|cmp x0, x1}}
return (int64_t)vcgtd_s64(a, b);
}
uint64_t test_vcgtd_u64(uint64_t a, uint64_t b) {
-// CHECK: test_vcgtd_u64
-// CHECK: cmhi {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcgtd_u64
+// CHECK: {{cmhi d[0-9]+, d[0-9]+, d[0-9]+|cmp x0, x1}}
return (uint64_t)vcgtd_u64(a, b);
}
int64_t test_vcgtzd_s64(int64_t a) {
-// CHECK: test_vcgtzd_s64
-// CHECK: cmgt {{d[0-9]+}}, {{d[0-9]+}}, #0x0
+// CHECK-LABEL: test_vcgtzd_s64
+// CHECK: {{cmgt d[0-9]+, d[0-9]+, #0x0|cmp x0, #0}}
return (int64_t)vcgtzd_s64(a);
}
int64_t test_vcled_s64(int64_t a, int64_t b) {
-// CHECK: test_vcled_s64
-// CHECK: cmge {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcled_s64
+// CHECK: {{cmge d[0-9]+, d[0-9]+, d[0-9]+|cmp x0, x1}}
return (int64_t)vcled_s64(a, b);
}
uint64_t test_vcled_u64(uint64_t a, uint64_t b) {
-// CHECK: test_vcled_u64
-// CHECK: cmhs {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
- return (uint64_t)vcled_u64(a, 0);
+// CHECK-LABEL: test_vcled_u64
+// CHECK: {{cmhs d[0-9]+, d[0-9]+, d[0-9]+|cmp x0, x1}}
+ return (uint64_t)vcled_u64(a, b);
}
int64_t test_vclezd_s64(int64_t a) {
-// CHECK: test_vclezd_s64
-// CHECK: cmle {{d[0-9]+}}, {{d[0-9]+}}, #0x0
+// CHECK-LABEL: test_vclezd_s64
+// CHECK: {{cmle d[0-9]+, d[0-9]+, #0x0|cmp x0, #1}}
return (int64_t)vclezd_s64(a);
}
int64_t test_vcltd_s64(int64_t a, int64_t b) {
-// CHECK: test_vcltd_s64
-// CHECK: cmgt {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcltd_s64
+// CHECK: {{cmgt d[0-9]+, d[0-9]+, d[0-9]+|cmp x0, x1}}
return (int64_t)vcltd_s64(a, b);
}
uint64_t test_vcltd_u64(uint64_t a, uint64_t b) {
-// CHECK: test_vcltd_u64
-// CHECK: cmhi {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcltd_u64
+// CHECK: {{cmhi d[0-9]+, d[0-9]+, d[0-9]+|cmp x0, x1}}
return (uint64_t)vcltd_u64(a, b);
}
int64_t test_vcltzd_s64(int64_t a) {
-// CHECK: test_vcltzd_s64
-// CHECK: cmlt {{d[0-9]+}}, {{d[0-9]+}}, #0x0
+// CHECK-LABEL: test_vcltzd_s64
+// CHECK: {{cmlt d[0-9]+, d[0-9]+, #0x0|asr x0, x0, #63}}
return (int64_t)vcltzd_s64(a);
}
int64_t test_vtstd_s64(int64_t a, int64_t b) {
-// CHECK: test_vtstd_s64
-// CHECK: cmtst {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vtstd_s64
+// CHECK: {{cmtst d[0-9]+, d[0-9]+, d[0-9]+|tst x1, x0}}
return (int64_t)vtstd_s64(a, b);
}
uint64_t test_vtstd_u64(uint64_t a, uint64_t b) {
-// CHECK: test_vtstd_u64
-// CHECK: cmtst {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vtstd_u64
+// CHECK: {{cmtst d[0-9]+, d[0-9]+, d[0-9]+|tst x1, x0}}
return (uint64_t)vtstd_u64(a, b);
}
int64_t test_vabsd_s64(int64_t a) {
-// CHECK: test_vabsd_s64
+// CHECK-LABEL: test_vabsd_s64
// CHECK: abs {{d[0-9]+}}, {{d[0-9]+}}
return (int64_t)vabsd_s64(a);
}
int8_t test_vqabsb_s8(int8_t a) {
-// CHECK: test_vqabsb_s8
-// CHECK: sqabs {{b[0-9]+}}, {{b[0-9]+}}
+// CHECK-LABEL: test_vqabsb_s8
+// CHECK: sqabs {{b[0-9]+|v[0-9]+.8b}}, {{b[0-9]+|v[0-9]+.8b}}
return (int8_t)vqabsb_s8(a);
}
int16_t test_vqabsh_s16(int16_t a) {
-// CHECK: test_vqabsh_s16
-// CHECK: sqabs {{h[0-9]+}}, {{h[0-9]+}}
+// CHECK-LABEL: test_vqabsh_s16
+// CHECK: sqabs {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}
return (int16_t)vqabsh_s16(a);
}
int32_t test_vqabss_s32(int32_t a) {
-// CHECK: test_vqabss_s32
+// CHECK-LABEL: test_vqabss_s32
// CHECK: sqabs {{s[0-9]+}}, {{s[0-9]+}}
return (int32_t)vqabss_s32(a);
}
int64_t test_vqabsd_s64(int64_t a) {
-// CHECK: test_vqabsd_s64
+// CHECK-LABEL: test_vqabsd_s64
// CHECK: sqabs {{d[0-9]+}}, {{d[0-9]+}}
return (int64_t)vqabsd_s64(a);
}
int64_t test_vnegd_s64(int64_t a) {
-// CHECK: test_vnegd_s64
-// CHECK: neg {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vnegd_s64
+// CHECK: neg {{[xd][0-9]+}}, {{[xd][0-9]+}}
return (int64_t)vnegd_s64(a);
}
int8_t test_vqnegb_s8(int8_t a) {
-// CHECK: test_vqnegb_s8
-// CHECK: sqneg {{b[0-9]+}}, {{b[0-9]+}}
+// CHECK-LABEL: test_vqnegb_s8
+// CHECK: sqneg {{b[0-9]+|v[0-9]+.8b}}, {{b[0-9]+|v[0-9]+.8b}}
return (int8_t)vqnegb_s8(a);
}
int16_t test_vqnegh_s16(int16_t a) {
-// CHECK: test_vqnegh_s16
-// CHECK: sqneg {{h[0-9]+}}, {{h[0-9]+}}
+// CHECK-LABEL: test_vqnegh_s16
+// CHECK: sqneg {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}
return (int16_t)vqnegh_s16(a);
}
int32_t test_vqnegs_s32(int32_t a) {
-// CHECK: test_vqnegs_s32
+// CHECK-LABEL: test_vqnegs_s32
// CHECK: sqneg {{s[0-9]+}}, {{s[0-9]+}}
return (int32_t)vqnegs_s32(a);
}
int64_t test_vqnegd_s64(int64_t a) {
-// CHECK: test_vqnegd_s64
+// CHECK-LABEL: test_vqnegd_s64
// CHECK: sqneg {{d[0-9]+}}, {{d[0-9]+}}
return (int64_t)vqnegd_s64(a);
}
int8_t test_vuqaddb_s8(int8_t a, int8_t b) {
-// CHECK: test_vuqaddb_s8
-// CHECK: suqadd {{b[0-9]+}}, {{b[0-9]+}}
+// CHECK-LABEL: test_vuqaddb_s8
+// CHECK: suqadd {{b[0-9]+|v[0-9]+.8b}}, {{b[0-9]+|v[0-9]+.8b}}
return (int8_t)vuqaddb_s8(a, b);
}
int16_t test_vuqaddh_s16(int16_t a, int16_t b) {
-// CHECK: test_vuqaddh_s16
-// CHECK: suqadd {{h[0-9]+}}, {{h[0-9]+}}
+// CHECK-LABEL: test_vuqaddh_s16
+// CHECK: suqadd {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}
return (int16_t)vuqaddh_s16(a, b);
}
int32_t test_vuqadds_s32(int32_t a, int32_t b) {
-// CHECK: test_vuqadds_s32
+// CHECK-LABEL: test_vuqadds_s32
// CHECK: suqadd {{s[0-9]+}}, {{s[0-9]+}}
return (int32_t)vuqadds_s32(a, b);
}
int64_t test_vuqaddd_s64(int64_t a, int64_t b) {
-// CHECK: test_vuqaddd_s64
+// CHECK-LABEL: test_vuqaddd_s64
// CHECK: suqadd {{d[0-9]+}}, {{d[0-9]+}}
return (int64_t)vuqaddd_s64(a, b);
}
uint8_t test_vsqaddb_u8(uint8_t a, uint8_t b) {
-// CHECK: test_vsqaddb_u8
-// CHECK: usqadd {{b[0-9]+}}, {{b[0-9]+}}
+// CHECK-LABEL: test_vsqaddb_u8
+// CHECK: usqadd {{b[0-9]+|v[0-9]+.8b}}, {{b[0-9]+|v[0-9]+.8b}}
return (uint8_t)vsqaddb_u8(a, b);
}
uint16_t test_vsqaddh_u16(uint16_t a, uint16_t b) {
-// CHECK: test_vsqaddh_u16
-// CHECK: usqadd {{h[0-9]+}}, {{h[0-9]+}}
+// CHECK-LABEL: test_vsqaddh_u16
+// CHECK: usqadd {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}
return (uint16_t)vsqaddh_u16(a, b);
}
uint32_t test_vsqadds_u32(uint32_t a, uint32_t b) {
-// CHECK: test_vsqadds_u32
+// CHECK-LABEL: test_vsqadds_u32
// CHECK: usqadd {{s[0-9]+}}, {{s[0-9]+}}
return (uint32_t)vsqadds_u32(a, b);
}
uint64_t test_vsqaddd_u64(uint64_t a, uint64_t b) {
-// CHECK: test_vsqaddd_u64
+// CHECK-LABEL: test_vsqaddd_u64
// CHECK: usqadd {{d[0-9]+}}, {{d[0-9]+}}
return (uint64_t)vsqaddd_u64(a, b);
}
int32_t test_vqdmlalh_s16(int32_t a, int16_t b, int16_t c) {
-// CHECK: test_vqdmlalh_s16
-// CHECK: sqdmlal {{s[0-9]+}}, {{h[0-9]+}}, {{h[0-9]+}}
+
+// CHECK-ARM64-LABEL: test_vqdmlalh_s16
+// CHECK-ARM64: sqdmull v[[PROD:[0-9]+]].4s, {{v[0-9]+.4h}}, {{v[0-9]+.4h}}
+// CHECK-ARM64: sqadd {{s[0-9]+}}, {{s[0-9]+}}, s[[PROD]]
return (int32_t)vqdmlalh_s16(a, b, c);
}
int64_t test_vqdmlals_s32(int64_t a, int32_t b, int32_t c) {
-// CHECK: test_vqdmlals_s32
+// CHECK-LABEL: test_vqdmlals_s32
// CHECK: sqdmlal {{d[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
return (int64_t)vqdmlals_s32(a, b, c);
}
int32_t test_vqdmlslh_s16(int32_t a, int16_t b, int16_t c) {
-// CHECK: test_vqdmlslh_s16
-// CHECK: sqdmlsl {{s[0-9]+}}, {{h[0-9]+}}, {{h[0-9]+}}
+
+// CHECK-ARM64-LABEL: test_vqdmlslh_s16
+// CHECK-ARM64: sqdmull v[[PROD:[0-9]+]].4s, {{v[0-9]+.4h}}, {{v[0-9]+.4h}}
+// CHECK-ARM64: sqsub {{s[0-9]+}}, {{s[0-9]+}}, s[[PROD]]
return (int32_t)vqdmlslh_s16(a, b, c);
}
int64_t test_vqdmlsls_s32(int64_t a, int32_t b, int32_t c) {
-// CHECK: test_vqdmlsls_s32
+// CHECK-LABEL: test_vqdmlsls_s32
// CHECK: sqdmlsl {{d[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
return (int64_t)vqdmlsls_s32(a, b, c);
}
int32_t test_vqdmullh_s16(int16_t a, int16_t b) {
-// CHECK: test_vqdmullh_s16
-// CHECK: sqdmull {{s[0-9]+}}, {{h[0-9]+}}, {{h[0-9]+}}
+// CHECK-LABEL: test_vqdmullh_s16
+// CHECK: sqdmull {{s[0-9]+|v[0-9]+.4s}}, {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}
return (int32_t)vqdmullh_s16(a, b);
}
int64_t test_vqdmulls_s32(int32_t a, int32_t b) {
-// CHECK: test_vqdmulls_s32
+// CHECK-LABEL: test_vqdmulls_s32
// CHECK: sqdmull {{d[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
return (int64_t)vqdmulls_s32(a, b);
}
int8_t test_vqmovunh_s16(int16_t a) {
-// CHECK: test_vqmovunh_s16
-// CHECK: sqxtun {{b[0-9]+}}, {{h[0-9]+}}
+// CHECK-LABEL: test_vqmovunh_s16
+// CHECK: sqxtun {{b[0-9]+|v[0-9]+.8b}}, {{h[0-9]+|v[0-9]+.8h}}
return (int8_t)vqmovunh_s16(a);
}
int16_t test_vqmovuns_s32(int32_t a) {
-// CHECK: test_vqmovuns_s32
-// CHECK: sqxtun {{h[0-9]+}}, {{s[0-9]+}}
+// CHECK-LABEL: test_vqmovuns_s32
+// CHECK: sqxtun {{h[0-9]+|v[0-9]+.4h}}, {{s[0-9]+|v[0-9]+.4s}}
return (int16_t)vqmovuns_s32(a);
}
int32_t test_vqmovund_s64(int64_t a) {
-// CHECK: test_vqmovund_s64
+// CHECK-LABEL: test_vqmovund_s64
// CHECK: sqxtun {{s[0-9]+}}, {{d[0-9]+}}
return (int32_t)vqmovund_s64(a);
}
int8_t test_vqmovnh_s16(int16_t a) {
-// CHECK: test_vqmovnh_s16
-// CHECK: sqxtn {{b[0-9]+}}, {{h[0-9]+}}
+// CHECK-LABEL: test_vqmovnh_s16
+// CHECK: sqxtn {{b[0-9]+|v[0-9]+.8b}}, {{h[0-9]+|v[0-9]+.8h}}
return (int8_t)vqmovnh_s16(a);
}
int16_t test_vqmovns_s32(int32_t a) {
-// CHECK: test_vqmovns_s32
-// CHECK: sqxtn {{h[0-9]+}}, {{s[0-9]+}}
+// CHECK-LABEL: test_vqmovns_s32
+// CHECK: sqxtn {{h[0-9]+|v[0-9]+.4h}}, {{s[0-9]+|v[0-9]+.4s}}
return (int16_t)vqmovns_s32(a);
}
int32_t test_vqmovnd_s64(int64_t a) {
-// CHECK: test_vqmovnd_s64
+// CHECK-LABEL: test_vqmovnd_s64
// CHECK: sqxtn {{s[0-9]+}}, {{d[0-9]+}}
return (int32_t)vqmovnd_s64(a);
}
int8_t test_vqmovnh_u16(int16_t a) {
-// CHECK: test_vqmovnh_u16
-// CHECK: uqxtn {{b[0-9]+}}, {{h[0-9]+}}
+// CHECK-LABEL: test_vqmovnh_u16
+// CHECK: uqxtn {{b[0-9]+|v[0-9]+.8b}}, {{h[0-9]+|v[0-9]+.8h}}
return (int8_t)vqmovnh_u16(a);
}
int16_t test_vqmovns_u32(int32_t a) {
-// CHECK: test_vqmovns_u32
-// CHECK: uqxtn {{h[0-9]+}}, {{s[0-9]+}}
+// CHECK-LABEL: test_vqmovns_u32
+// CHECK: uqxtn {{h[0-9]+|v[0-9]+.4h}}, {{s[0-9]+|v[0-9]+.4s}}
return (int16_t)vqmovns_u32(a);
}
int32_t test_vqmovnd_u64(int64_t a) {
-// CHECK: test_vqmovnd_u64
+// CHECK-LABEL: test_vqmovnd_u64
// CHECK: uqxtn {{s[0-9]+}}, {{d[0-9]+}}
return (int32_t)vqmovnd_u64(a);
}
uint32_t test_vceqs_f32(float32_t a, float32_t b) {
-// CHECK: test_vceqs_f32
-// CHECK: fcmeq {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
+// CHECK-LABEL: test_vceqs_f32
+// CHECK: {{fcmeq s0, s0, s1|fcmp s0, s1}}
return (uint32_t)vceqs_f32(a, b);
}
uint64_t test_vceqd_f64(float64_t a, float64_t b) {
-// CHECK: test_vceqd_f64
-// CHECK: fcmeq {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vceqd_f64
+// CHECK: {{fcmeq d0, d0, d1|fcmp d0, d1}}
return (uint64_t)vceqd_f64(a, b);
}
uint32_t test_vceqzs_f32(float32_t a) {
-// CHECK: test_vceqzs_f32
-// CHECK: fcmeq {{s[0-9]+}}, {{s[0-9]+}}, #0.0
+// CHECK-LABEL: test_vceqzs_f32
+// CHECK: {{fcmeq s0, s0, #0.0|fcmp s0, #0.0}}
return (uint32_t)vceqzs_f32(a);
}
uint64_t test_vceqzd_f64(float64_t a) {
-// CHECK: test_vceqzd_f64
-// CHECK: fcmeq {{d[0-9]+}}, {{d[0-9]+}}, #0.0
+// CHECK-LABEL: test_vceqzd_f64
+// CHECK: {{fcmeq d0, d0, #0.0|fcmp d0, #0.0}}
return (uint64_t)vceqzd_f64(a);
}
uint32_t test_vcges_f32(float32_t a, float32_t b) {
-// CHECK: test_vcges_f32
-// CHECK: fcmge {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
+// CHECK-LABEL: test_vcges_f32
+// CHECK: {{fcmge s0, s0, s1|fcmp s0, s1}}
return (uint32_t)vcges_f32(a, b);
}
uint64_t test_vcged_f64(float64_t a, float64_t b) {
-// CHECK: test_vcged_f64
-// CHECK: fcmge {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcged_f64
+// CHECK: {{fcmge d0, d0, d1|fcmp d0, d1}}
return (uint64_t)vcged_f64(a, b);
}
uint32_t test_vcgezs_f32(float32_t a) {
-// CHECK: test_vcgezs_f32
-// CHECK: fcmge {{s[0-9]+}}, {{s[0-9]+}}, #0.0
+// CHECK-LABEL: test_vcgezs_f32
+// CHECK: {{fcmge s0, s0, #0.0|fcmp s0, #0.0}}
return (uint32_t)vcgezs_f32(a);
}
uint64_t test_vcgezd_f64(float64_t a) {
-// CHECK: test_vcgezd_f64
-// CHECK: fcmge {{d[0-9]+}}, {{d[0-9]+}}, #0.0
+// CHECK-LABEL: test_vcgezd_f64
+// CHECK: {{fcmge d0, d0, #0.0|fcmp d0, #0.0}}
return (uint64_t)vcgezd_f64(a);
}
uint32_t test_vcgts_f32(float32_t a, float32_t b) {
-// CHECK: test_vcgts_f32
-// CHECK: fcmgt {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
+// CHECK-LABEL: test_vcgts_f32
+// CHECK: {{fcmgt s0, s0, s1|fcmp s0, s1}}
return (uint32_t)vcgts_f32(a, b);
}
uint64_t test_vcgtd_f64(float64_t a, float64_t b) {
-// CHECK: test_vcgtd_f64
-// CHECK: fcmgt {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcgtd_f64
+// CHECK: {{fcmgt d0, d0, d1|fcmp d0, d1}}
return (uint64_t)vcgtd_f64(a, b);
}
uint32_t test_vcgtzs_f32(float32_t a) {
-// CHECK: test_vcgtzs_f32
-// CHECK: fcmgt {{s[0-9]+}}, {{s[0-9]+}}, #0.0
+// CHECK-LABEL: test_vcgtzs_f32
+// CHECK: {{fcmgt s0, s0, #0.0|fcmp s0, #0.0}}
return (uint32_t)vcgtzs_f32(a);
}
uint64_t test_vcgtzd_f64(float64_t a) {
-// CHECK: test_vcgtzd_f64
-// CHECK: fcmgt {{d[0-9]+}}, {{d[0-9]+}}, #0.0
+// CHECK-LABEL: test_vcgtzd_f64
+// CHECK: {{fcmgt d0, d0, #0.0|fcmp d0, #0.0}}
return (uint64_t)vcgtzd_f64(a);
}
uint32_t test_vcles_f32(float32_t a, float32_t b) {
-// CHECK: test_vcles_f32
-// CHECK: fcmge {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
+// CHECK-LABEL: test_vcles_f32
+// CHECK: {{fcmge s0, s1, s0|fcmp s0, s1}}
return (uint32_t)vcles_f32(a, b);
}
uint64_t test_vcled_f64(float64_t a, float64_t b) {
-// CHECK: test_vcled_f64
-// CHECK: fcmge {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcled_f64
+// CHECK: {{fcmge d0, d1, d0|fcmp d0, d1}}
return (uint64_t)vcled_f64(a, b);
}
uint32_t test_vclezs_f32(float32_t a) {
-// CHECK: test_vclezs_f32
-// CHECK: fcmle {{s[0-9]+}}, {{s[0-9]+}}, #0.0
+// CHECK-LABEL: test_vclezs_f32
+// CHECK: {{fcmle s0, s0, #0.0|fcmp s0, #0.0}}
return (uint32_t)vclezs_f32(a);
}
uint64_t test_vclezd_f64(float64_t a) {
-// CHECK: test_vclezd_f64
-// CHECK: fcmle {{d[0-9]+}}, {{d[0-9]+}}, #0.0
+// CHECK-LABEL: test_vclezd_f64
+// CHECK: {{fcmle d0, d0, #0.0|fcmp d0, #0.0}}
return (uint64_t)vclezd_f64(a);
}
uint32_t test_vclts_f32(float32_t a, float32_t b) {
-// CHECK: test_vclts_f32
-// CHECK: fcmgt {{s[0-9]+}}, s1, s0
+// CHECK-LABEL: test_vclts_f32
+// CHECK: {{fcmgt s0, s1, s0|fcmp s0, s1}}
return (uint32_t)vclts_f32(a, b);
}
uint64_t test_vcltd_f64(float64_t a, float64_t b) {
-// CHECK: test_vcltd_f64
-// CHECK: fcmgt {{d[0-9]+}}, d1, d0
+// CHECK-LABEL: test_vcltd_f64
+// CHECK: {{fcmgt d0, d1, d0|fcmp d0, d1}}
return (uint64_t)vcltd_f64(a, b);
}
uint32_t test_vcltzs_f32(float32_t a) {
-// CHECK: test_vcltzs_f32
-// CHECK: fcmlt {{s[0-9]+}}, {{s[0-9]+}}, #0.0
+// CHECK-LABEL: test_vcltzs_f32
+// CHECK: {{fcmlt s0, s0, #0.0|fcmp s0, #0.0}}
return (uint32_t)vcltzs_f32(a);
}
uint64_t test_vcltzd_f64(float64_t a) {
-// CHECK: test_vcltzd_f64
-// CHECK: fcmlt {{d[0-9]+}}, {{d[0-9]+}}, #0.0
+// CHECK-LABEL: test_vcltzd_f64
+// CHECK: {{fcmlt d0, d0, #0.0|fcmp d0, #0.0}}
return (uint64_t)vcltzd_f64(a);
}
uint32_t test_vcages_f32(float32_t a, float32_t b) {
-// CHECK: test_vcages_f32
-// CHECK: facge {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
+// CHECK-LABEL: test_vcages_f32
+// CHECK: facge s0, s0, s1
return (uint32_t)vcages_f32(a, b);
}
uint64_t test_vcaged_f64(float64_t a, float64_t b) {
-// CHECK: test_vcaged_f64
-// CHECK: facge {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcaged_f64
+// CHECK: facge d0, d0, d1
return (uint64_t)vcaged_f64(a, b);
}
uint32_t test_vcagts_f32(float32_t a, float32_t b) {
-// CHECK: test_vcagts_f32
-// CHECK: facgt {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
+// CHECK-LABEL: test_vcagts_f32
+// CHECK: facgt s0, s0, s1
return (uint32_t)vcagts_f32(a, b);
}
uint64_t test_vcagtd_f64(float64_t a, float64_t b) {
-// CHECK: test_vcagtd_f64
-// CHECK: facgt {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcagtd_f64
+// CHECK: facgt d0, d0, d1
return (uint64_t)vcagtd_f64(a, b);
}
uint32_t test_vcales_f32(float32_t a, float32_t b) {
-// CHECK: test_vcales_f32
-// CHECK: facge {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
+// CHECK-LABEL: test_vcales_f32
+// CHECK: facge s0, s1, s0
return (uint32_t)vcales_f32(a, b);
}
uint64_t test_vcaled_f64(float64_t a, float64_t b) {
-// CHECK: test_vcaled_f64
-// CHECK: facge {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcaled_f64
+// CHECK: facge d0, d1, d0
return (uint64_t)vcaled_f64(a, b);
}
uint32_t test_vcalts_f32(float32_t a, float32_t b) {
-// CHECK: test_vcalts_f32
-// CHECK: facgt {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
+// CHECK-LABEL: test_vcalts_f32
+// CHECK: facgt s0, s1, s0
return (uint32_t)vcalts_f32(a, b);
}
uint64_t test_vcaltd_f64(float64_t a, float64_t b) {
-// CHECK: test_vcaltd_f64
-// CHECK: facgt {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+// CHECK-LABEL: test_vcaltd_f64
+// CHECK: facgt d0, d1, d0
return (uint64_t)vcaltd_f64(a, b);
}
int64_t test_vshrd_n_s64(int64_t a) {
// CHECK-LABEL: test_vshrd_n_s64
-// CHECK: sshr {{d[0-9]+}}, {{d[0-9]+}}, #1
+// CHECK: {{sshr d[0-9]+, d[0-9]+, #1|asr x0, x0, #1}}
return (int64_t)vshrd_n_s64(a, 1);
}
@@ -8737,11 +8565,20 @@ int64x1_t test_vshr_n_s64(int64x1_t a) {
}
uint64_t test_vshrd_n_u64(uint64_t a) {
-// CHECK-LABEL: test_vshrd_n_u64
-// CHECK: ushr {{d[0-9]+}}, {{d[0-9]+}}, #64
+
+// CHECK-ARM64-LABEL: test_vshrd_n_u64
+// CHECK-ARM64: mov x0, xzr
return (uint64_t)vshrd_n_u64(a, 64);
}
+uint64_t test_vshrd_n_u64_2() {
+
+// CHECK-ARM64-LABEL: test_vshrd_n_u64_2
+// CHECK-ARM64: mov x0, xzr
+ uint64_t a = UINT64_C(0xf000000000000000);
+ return vshrd_n_u64(a, 64);
+}
+
uint64x1_t test_vshr_n_u64(uint64x1_t a) {
// CHECK-LABEL: test_vshr_n_u64
// CHECK: ushr {{d[0-9]+}}, {{d[0-9]+}}, #1
@@ -8755,7 +8592,7 @@ int64_t test_vrshrd_n_s64(int64_t a) {
}
int64x1_t test_vrshr_n_s64(int64x1_t a) {
-// CHECK: test_vrshr_n_s64
+// CHECK-LABEL: test_vrshr_n_s64
// CHECK: srshr d{{[0-9]+}}, d{{[0-9]+}}, #1
return vrshr_n_s64(a, 1);
}
@@ -8767,43 +8604,50 @@ uint64_t test_vrshrd_n_u64(uint64_t a) {
}
uint64x1_t test_vrshr_n_u64(uint64x1_t a) {
-// CHECK: test_vrshr_n_u64
+// CHECK-LABEL: test_vrshr_n_u64
// CHECK: urshr d{{[0-9]+}}, d{{[0-9]+}}, #1
return vrshr_n_u64(a, 1);
}
int64_t test_vsrad_n_s64(int64_t a, int64_t b) {
// CHECK-LABEL: test_vsrad_n_s64
-// CHECK: ssra {{d[0-9]+}}, {{d[0-9]+}}, #63
+// CHECK: {{ssra d[0-9]+, d[0-9]+, #63|add x0, x0, x1, asr #63}}
return (int64_t)vsrad_n_s64(a, b, 63);
}
int64x1_t test_vsra_n_s64(int64x1_t a, int64x1_t b) {
-// CHECK: test_vsra_n_s64
+// CHECK-LABEL: test_vsra_n_s64
// CHECK: ssra d{{[0-9]+}}, d{{[0-9]+}}, #1
return vsra_n_s64(a, b, 1);
}
uint64_t test_vsrad_n_u64(uint64_t a, uint64_t b) {
// CHECK-LABEL: test_vsrad_n_u64
-// CHECK: usra {{d[0-9]+}}, {{d[0-9]+}}, #63
+// CHECK: {{usra d[0-9]+, d[0-9]+, #63|add x0, x0, x1, lsr #63}}
return (uint64_t)vsrad_n_u64(a, b, 63);
}
+uint64_t test_vsrad_n_u64_2(uint64_t a, uint64_t b) {
+
+// CHECK-ARM64-LABEL: test_vsrad_n_u64_2
+// CHECK-ARM64-NOT: add
+ return (uint64_t)vsrad_n_u64(a, b, 64);
+}
+
uint64x1_t test_vsra_n_u64(uint64x1_t a, uint64x1_t b) {
-// CHECK: test_vsra_n_u64
+// CHECK-LABEL: test_vsra_n_u64
// CHECK: usra d{{[0-9]+}}, d{{[0-9]+}}, #1
return vsra_n_u64(a, b, 1);
}
int64_t test_vrsrad_n_s64(int64_t a, int64_t b) {
// CHECK-LABEL: test_vrsrad_n_s64
-// CHECK: srsra {{d[0-9]+}}, {{d[0-9]+}}, #63
+// CHECK: {{srsra d[0-9]+, d[0-9]+, #63}}
return (int64_t)vrsrad_n_s64(a, b, 63);
}
int64x1_t test_vrsra_n_s64(int64x1_t a, int64x1_t b) {
-// CHECK: test_vrsra_n_s64
+// CHECK-LABEL: test_vrsra_n_s64
// CHECK: srsra d{{[0-9]+}}, d{{[0-9]+}}, #1
return vrsra_n_s64(a, b, 1);
}
@@ -8815,43 +8659,43 @@ uint64_t test_vrsrad_n_u64(uint64_t a, uint64_t b) {
}
uint64x1_t test_vrsra_n_u64(uint64x1_t a, uint64x1_t b) {
-// CHECK: test_vrsra_n_u64
+// CHECK-LABEL: test_vrsra_n_u64
// CHECK: ursra d{{[0-9]+}}, d{{[0-9]+}}, #1
return vrsra_n_u64(a, b, 1);
}
int64_t test_vshld_n_s64(int64_t a) {
// CHECK-LABEL: test_vshld_n_s64
-// CHECK: shl {{d[0-9]+}}, {{d[0-9]+}}, #0
- return (int64_t)vshld_n_s64(a, 0);
+// CHECK: {{shl d[0-9]+, d[0-9]+, #1|lsl x0, x0, #1}}
+ return (int64_t)vshld_n_s64(a, 1);
}
int64x1_t test_vshl_n_s64(int64x1_t a) {
-// CHECK: test_vshl_n_s64
+// CHECK-LABEL: test_vshl_n_s64
// CHECK: shl d{{[0-9]+}}, d{{[0-9]+}}, #1
return vshl_n_s64(a, 1);
}
uint64_t test_vshld_n_u64(uint64_t a) {
// CHECK-LABEL: test_vshld_n_u64
-// CHECK: shl {{d[0-9]+}}, {{d[0-9]+}}, #63
+// CHECK: {{shl d[0-9]+, d[0-9]+, #63|lsl x0, x0, #63}}
return (uint64_t)vshld_n_u64(a, 63);
}
uint64x1_t test_vshl_n_u64(uint64x1_t a) {
-// CHECK: test_vshl_n_u64
+// CHECK-LABEL: test_vshl_n_u64
// CHECK: shl d{{[0-9]+}}, d{{[0-9]+}}, #1
return vshl_n_u64(a, 1);
}
int8_t test_vqshlb_n_s8(int8_t a) {
// CHECK-LABEL: test_vqshlb_n_s8
-// CHECK: sqshl {{b[0-9]+}}, {{b[0-9]+}}, #7
+// CHECK: sqshl {{b[0-9]+|v[0-9]+.8b}}, {{b[0-9]+|v[0-9]+.8b}}, #7
return (int8_t)vqshlb_n_s8(a, 7);
}
int16_t test_vqshlh_n_s16(int16_t a) {
// CHECK-LABEL: test_vqshlh_n_s16
-// CHECK: sqshl {{h[0-9]+}}, {{h[0-9]+}}, #15
+// CHECK: sqshl {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}, #15
return (int16_t)vqshlh_n_s16(a, 15);
}
@@ -8867,21 +8711,105 @@ int64_t test_vqshld_n_s64(int64_t a) {
return (int64_t)vqshld_n_s64(a, 63);
}
+int8x8_t test_vqshl_n_s8(int8x8_t a) {
+ // CHECK-LABEL: test_vqshl_n_s8
+ return vqshl_n_s8(a, 0);
+ // CHECK: sqshl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #0
+}
+
+int8x16_t test_vqshlq_n_s8(int8x16_t a) {
+ // CHECK-LABEL: test_vqshlq_n_s8
+ return vqshlq_n_s8(a, 0);
+ // CHECK: sqshl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #0
+}
+
+int16x4_t test_vqshl_n_s16(int16x4_t a) {
+ // CHECK-LABEL: test_vqshl_n_s16
+ return vqshl_n_s16(a, 0);
+ // CHECK: sqshl {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #0
+}
+
+int16x8_t test_vqshlq_n_s16(int16x8_t a) {
+ // CHECK-LABEL: test_vqshlq_n_s16
+ return vqshlq_n_s16(a, 0);
+ // CHECK: sqshl {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #0
+}
+
+int32x2_t test_vqshl_n_s32(int32x2_t a) {
+ // CHECK-LABEL: test_vqshl_n_s32
+ return vqshl_n_s32(a, 0);
+ // CHECK: sqshl {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #0
+}
+
+int32x4_t test_vqshlq_n_s32(int32x4_t a) {
+ // CHECK-LABEL: test_vqshlq_n_s32
+ return vqshlq_n_s32(a, 0);
+ // CHECK: sqshl {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #0
+}
+
+int64x2_t test_vqshlq_n_s64(int64x2_t a) {
+ // CHECK-LABEL: test_vqshlq_n_s64
+ return vqshlq_n_s64(a, 0);
+ // CHECK: sqshl {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #0
+}
+
+uint8x8_t test_vqshl_n_u8(uint8x8_t a) {
+ // CHECK-LABEL: test_vqshl_n_u8
+ return vqshl_n_u8(a, 0);
+ // CHECK: uqshl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #0
+}
+
+uint8x16_t test_vqshlq_n_u8(uint8x16_t a) {
+ // CHECK-LABEL: test_vqshlq_n_u8
+ return vqshlq_n_u8(a, 0);
+ // CHECK: uqshl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #0
+}
+
+uint16x4_t test_vqshl_n_u16(uint16x4_t a) {
+ // CHECK-LABEL: test_vqshl_n_u16
+ return vqshl_n_u16(a, 0);
+ // CHECK: uqshl {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #0
+}
+
+uint16x8_t test_vqshlq_n_u16(uint16x8_t a) {
+ // CHECK-LABEL: test_vqshlq_n_u16
+ return vqshlq_n_u16(a, 0);
+ // CHECK: uqshl {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #0
+}
+
+uint32x2_t test_vqshl_n_u32(uint32x2_t a) {
+ // CHECK-LABEL: test_vqshl_n_u32
+ return vqshl_n_u32(a, 0);
+ // CHECK: uqshl {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #0
+}
+
+uint32x4_t test_vqshlq_n_u32(uint32x4_t a) {
+ // CHECK-LABEL: test_vqshlq_n_u32
+ return vqshlq_n_u32(a, 0);
+ // CHECK: uqshl {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #0
+}
+
+uint64x2_t test_vqshlq_n_u64(uint64x2_t a) {
+ // CHECK-LABEL: test_vqshlq_n_u64
+ return vqshlq_n_u64(a, 0);
+ // CHECK: uqshl {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #0
+}
+
int64x1_t test_vqshl_n_s64(int64x1_t a) {
-// CHECK: test_vqshl_n_s64
+// CHECK-LABEL: test_vqshl_n_s64
// CHECK: sqshl d{{[0-9]+}}, d{{[0-9]+}}, #1
return vqshl_n_s64(a, 1);
}
uint8_t test_vqshlb_n_u8(uint8_t a) {
// CHECK-LABEL: test_vqshlb_n_u8
-// CHECK: uqshl {{b[0-9]+}}, {{b[0-9]+}}, #7
+// CHECK: uqshl {{b[0-9]+|v[0-9]+.8b}}, {{b[0-9]+|v[0-9]+.8b}}, #7
return (uint8_t)vqshlb_n_u8(a, 7);
}
uint16_t test_vqshlh_n_u16(uint16_t a) {
// CHECK-LABEL: test_vqshlh_n_u16
-// CHECK: uqshl {{h[0-9]+}}, {{h[0-9]+}}, #15
+// CHECK: uqshl {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}, #15
return (uint16_t)vqshlh_n_u16(a, 15);
}
@@ -8898,20 +8826,20 @@ uint64_t test_vqshld_n_u64(uint64_t a) {
}
uint64x1_t test_vqshl_n_u64(uint64x1_t a) {
-// CHECK: test_vqshl_n_u64
+// CHECK-LABEL: test_vqshl_n_u64
// CHECK: uqshl d{{[0-9]+}}, d{{[0-9]+}}, #1
return vqshl_n_u64(a, 1);
}
int8_t test_vqshlub_n_s8(int8_t a) {
// CHECK-LABEL: test_vqshlub_n_s8
-// CHECK: sqshlu {{b[0-9]+}}, {{b[0-9]+}}, #7
+// CHECK: sqshlu {{b[0-9]+|v[0-9]+.8b}}, {{b[0-9]+|v[0-9]+.8b}}, #7
return (int8_t)vqshlub_n_s8(a, 7);
}
int16_t test_vqshluh_n_s16(int16_t a) {
// CHECK-LABEL: test_vqshluh_n_s16
-// CHECK: sqshlu {{h[0-9]+}}, {{h[0-9]+}}, #15
+// CHECK: sqshlu {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}, #15
return (int16_t)vqshluh_n_s16(a, 15);
}
@@ -8928,7 +8856,7 @@ int64_t test_vqshlud_n_s64(int64_t a) {
}
uint64x1_t test_vqshlu_n_s64(int64x1_t a) {
-// CHECK: test_vqshlu_n_s64
+// CHECK-LABEL: test_vqshlu_n_s64
// CHECK: sqshlu d{{[0-9]+}}, d{{[0-9]+}}, #1
return vqshlu_n_s64(a, 1);
}
@@ -8940,7 +8868,7 @@ int64_t test_vsrid_n_s64(int64_t a, int64_t b) {
}
int64x1_t test_vsri_n_s64(int64x1_t a, int64x1_t b) {
-// CHECK: test_vsri_n_s64
+// CHECK-LABEL: test_vsri_n_s64
// CHECK: sri d{{[0-9]+}}, d{{[0-9]+}}, #1
return vsri_n_s64(a, b, 1);
}
@@ -8952,7 +8880,7 @@ uint64_t test_vsrid_n_u64(uint64_t a, uint64_t b) {
}
uint64x1_t test_vsri_n_u64(uint64x1_t a, uint64x1_t b) {
-// CHECK: test_vsri_n_u64
+// CHECK-LABEL: test_vsri_n_u64
// CHECK: sri d{{[0-9]+}}, d{{[0-9]+}}, #1
return vsri_n_u64(a, b, 1);
}
@@ -8964,7 +8892,7 @@ int64_t test_vslid_n_s64(int64_t a, int64_t b) {
}
int64x1_t test_vsli_n_s64(int64x1_t a, int64x1_t b) {
-// CHECK: test_vsli_n_s64
+// CHECK-LABEL: test_vsli_n_s64
// CHECK: sli d{{[0-9]+}}, d{{[0-9]+}}, #1
return vsli_n_s64(a, b, 1);
}
@@ -8976,20 +8904,20 @@ uint64_t test_vslid_n_u64(uint64_t a, uint64_t b) {
}
uint64x1_t test_vsli_n_u64(uint64x1_t a, uint64x1_t b) {
-// CHECK: test_vsli_n_u64
+// CHECK-LABEL: test_vsli_n_u64
// CHECK: sli d{{[0-9]+}}, d{{[0-9]+}}, #1
return vsli_n_u64(a, b, 1);
}
int8_t test_vqshrnh_n_s16(int16_t a) {
// CHECK-LABEL: test_vqshrnh_n_s16
-// CHECK: sqshrn {{b[0-9]+}}, {{h[0-9]+}}, #8
+// CHECK: sqshrn {{b[0-9]+|v[0-9]+.8b}}, {{h[0-9]+|v[0-9]+.8h}}, #8
return (int8_t)vqshrnh_n_s16(a, 8);
}
int16_t test_vqshrns_n_s32(int32_t a) {
// CHECK-LABEL: test_vqshrns_n_s32
-// CHECK: sqshrn {{h[0-9]+}}, {{s[0-9]+}}, #16
+// CHECK: sqshrn {{h[0-9]+|v[0-9]+.4h}}, {{s[0-9]+|v[0-9]+.4s}}, #16
return (int16_t)vqshrns_n_s32(a, 16);
}
@@ -9001,13 +8929,13 @@ int32_t test_vqshrnd_n_s64(int64_t a) {
uint8_t test_vqshrnh_n_u16(uint16_t a) {
// CHECK-LABEL: test_vqshrnh_n_u16
-// CHECK: uqshrn {{b[0-9]+}}, {{h[0-9]+}}, #8
+// CHECK: uqshrn {{b[0-9]+|v[0-9]+.8b}}, {{h[0-9]+|v[0-9]+.8h}}, #8
return (uint8_t)vqshrnh_n_u16(a, 8);
}
uint16_t test_vqshrns_n_u32(uint32_t a) {
// CHECK-LABEL: test_vqshrns_n_u32
-// CHECK: uqshrn {{h[0-9]+}}, {{s[0-9]+}}, #16
+// CHECK: uqshrn {{h[0-9]+|v[0-9]+.4h}}, {{s[0-9]+|v[0-9]+.4s}}, #16
return (uint16_t)vqshrns_n_u32(a, 16);
}
@@ -9019,13 +8947,13 @@ uint32_t test_vqshrnd_n_u64(uint64_t a) {
int8_t test_vqrshrnh_n_s16(int16_t a) {
// CHECK-LABEL: test_vqrshrnh_n_s16
-// CHECK: sqrshrn {{b[0-9]+}}, {{h[0-9]+}}, #8
+// CHECK: sqrshrn {{b[0-9]+|v[0-9]+.8b}}, {{h[0-9]+|v[0-9]+.8h}}, #8
return (int8_t)vqrshrnh_n_s16(a, 8);
}
int16_t test_vqrshrns_n_s32(int32_t a) {
// CHECK-LABEL: test_vqrshrns_n_s32
-// CHECK: sqrshrn {{h[0-9]+}}, {{s[0-9]+}}, #16
+// CHECK: sqrshrn {{h[0-9]+|v[0-9]+.4h}}, {{s[0-9]+|v[0-9]+.4s}}, #16
return (int16_t)vqrshrns_n_s32(a, 16);
}
@@ -9037,13 +8965,13 @@ int32_t test_vqrshrnd_n_s64(int64_t a) {
uint8_t test_vqrshrnh_n_u16(uint16_t a) {
// CHECK-LABEL: test_vqrshrnh_n_u16
-// CHECK: uqrshrn {{b[0-9]+}}, {{h[0-9]+}}, #8
+// CHECK: uqrshrn {{b[0-9]+|v[0-9]+.8b}}, {{h[0-9]+|v[0-9]+.8h}}, #8
return (uint8_t)vqrshrnh_n_u16(a, 8);
}
uint16_t test_vqrshrns_n_u32(uint32_t a) {
// CHECK-LABEL: test_vqrshrns_n_u32
-// CHECK: uqrshrn {{h[0-9]+}}, {{s[0-9]+}}, #16
+// CHECK: uqrshrn {{h[0-9]+|v[0-9]+.4h}}, {{s[0-9]+|v[0-9]+.4s}}, #16
return (uint16_t)vqrshrns_n_u32(a, 16);
}
@@ -9055,13 +8983,13 @@ uint32_t test_vqrshrnd_n_u64(uint64_t a) {
int8_t test_vqshrunh_n_s16(int16_t a) {
// CHECK-LABEL: test_vqshrunh_n_s16
-// CHECK: sqshrun {{b[0-9]+}}, {{h[0-9]+}}, #8
+// CHECK: sqshrun {{b[0-9]+|v[0-9]+.8b}}, {{h[0-9]+|v[0-9]+.8h}}, #8
return (int8_t)vqshrunh_n_s16(a, 8);
}
int16_t test_vqshruns_n_s32(int32_t a) {
// CHECK-LABEL: test_vqshruns_n_s32
-// CHECK: sqshrun {{h[0-9]+}}, {{s[0-9]+}}, #16
+// CHECK: sqshrun {{h[0-9]+|v[0-9]+.4h}}, {{s[0-9]+|v[0-9]+.4s}}, #16
return (int16_t)vqshruns_n_s32(a, 16);
}
@@ -9073,13 +9001,13 @@ int32_t test_vqshrund_n_s64(int64_t a) {
int8_t test_vqrshrunh_n_s16(int16_t a) {
// CHECK-LABEL: test_vqrshrunh_n_s16
-// CHECK: sqrshrun {{b[0-9]+}}, {{h[0-9]+}}, #8
+// CHECK: sqrshrun {{b[0-9]+|v[0-9]+.8b}}, {{h[0-9]+|v[0-9]+.8h}}, #8
return (int8_t)vqrshrunh_n_s16(a, 8);
}
int16_t test_vqrshruns_n_s32(int32_t a) {
// CHECK-LABEL: test_vqrshruns_n_s32
-// CHECK: sqrshrun {{h[0-9]+}}, {{s[0-9]+}}, #16
+// CHECK: sqrshrun {{h[0-9]+|v[0-9]+.4h}}, {{s[0-9]+|v[0-9]+.4s}}, #16
return (int16_t)vqrshruns_n_s32(a, 16);
}
@@ -9090,2232 +9018,2232 @@ int32_t test_vqrshrund_n_s64(int64_t a) {
}
float32_t test_vcvts_n_f32_s32(int32_t a) {
-// CHECK: test_vcvts_n_f32_s32
+// CHECK-LABEL: test_vcvts_n_f32_s32
// CHECK: scvtf {{s[0-9]+}}, {{s[0-9]+}}, #1
return vcvts_n_f32_s32(a, 1);
}
float64_t test_vcvtd_n_f64_s64(int64_t a) {
-// CHECK: test_vcvtd_n_f64_s64
+// CHECK-LABEL: test_vcvtd_n_f64_s64
// CHECK: scvtf {{d[0-9]+}}, {{d[0-9]+}}, #1
return vcvtd_n_f64_s64(a, 1);
}
float32_t test_vcvts_n_f32_u32(uint32_t a) {
-// CHECK: test_vcvts_n_f32_u32
+// CHECK-LABEL: test_vcvts_n_f32_u32
// CHECK: ucvtf {{s[0-9]+}}, {{s[0-9]+}}, #32
return vcvts_n_f32_u32(a, 32);
}
float64_t test_vcvtd_n_f64_u64(uint64_t a) {
-// CHECK: test_vcvtd_n_f64_u64
+// CHECK-LABEL: test_vcvtd_n_f64_u64
// CHECK: ucvtf {{d[0-9]+}}, {{d[0-9]+}}, #64
return vcvtd_n_f64_u64(a, 64);
}
int32_t test_vcvts_n_s32_f32(float32_t a) {
-// CHECK: test_vcvts_n_s32_f32
+// CHECK-LABEL: test_vcvts_n_s32_f32
// CHECK: fcvtzs {{s[0-9]+}}, {{s[0-9]+}}, #1
return (int32_t)vcvts_n_s32_f32(a, 1);
}
int64_t test_vcvtd_n_s64_f64(float64_t a) {
-// CHECK: test_vcvtd_n_s64_f64
+// CHECK-LABEL: test_vcvtd_n_s64_f64
// CHECK: fcvtzs {{d[0-9]+}}, {{d[0-9]+}}, #1
return (int64_t)vcvtd_n_s64_f64(a, 1);
}
uint32_t test_vcvts_n_u32_f32(float32_t a) {
-// CHECK: test_vcvts_n_u32_f32
+// CHECK-LABEL: test_vcvts_n_u32_f32
// CHECK: fcvtzu {{s[0-9]+}}, {{s[0-9]+}}, #32
return (uint32_t)vcvts_n_u32_f32(a, 32);
}
uint64_t test_vcvtd_n_u64_f64(float64_t a) {
-// CHECK: test_vcvtd_n_u64_f64
+// CHECK-LABEL: test_vcvtd_n_u64_f64
// CHECK: fcvtzu {{d[0-9]+}}, {{d[0-9]+}}, #64
return (uint64_t)vcvtd_n_u64_f64(a, 64);
}
-// CHECK-LABEL: test_vreinterpret_s8_s16
+// CHECK-LABEL: test_vreinterpret_s8_s16:
// CHECK-NEXT: ret
int8x8_t test_vreinterpret_s8_s16(int16x4_t a) {
return vreinterpret_s8_s16(a);
}
-// CHECK-LABEL: test_vreinterpret_s8_s32
+// CHECK-LABEL: test_vreinterpret_s8_s32:
// CHECK-NEXT: ret
int8x8_t test_vreinterpret_s8_s32(int32x2_t a) {
return vreinterpret_s8_s32(a);
}
-// CHECK-LABEL: test_vreinterpret_s8_s64
+// CHECK-LABEL: test_vreinterpret_s8_s64:
// CHECK-NEXT: ret
int8x8_t test_vreinterpret_s8_s64(int64x1_t a) {
return vreinterpret_s8_s64(a);
}
-// CHECK-LABEL: test_vreinterpret_s8_u8
+// CHECK-LABEL: test_vreinterpret_s8_u8:
// CHECK-NEXT: ret
int8x8_t test_vreinterpret_s8_u8(uint8x8_t a) {
return vreinterpret_s8_u8(a);
}
-// CHECK-LABEL: test_vreinterpret_s8_u16
+// CHECK-LABEL: test_vreinterpret_s8_u16:
// CHECK-NEXT: ret
int8x8_t test_vreinterpret_s8_u16(uint16x4_t a) {
return vreinterpret_s8_u16(a);
}
-// CHECK-LABEL: test_vreinterpret_s8_u32
+// CHECK-LABEL: test_vreinterpret_s8_u32:
// CHECK-NEXT: ret
int8x8_t test_vreinterpret_s8_u32(uint32x2_t a) {
return vreinterpret_s8_u32(a);
}
-// CHECK-LABEL: test_vreinterpret_s8_u64
+// CHECK-LABEL: test_vreinterpret_s8_u64:
// CHECK-NEXT: ret
int8x8_t test_vreinterpret_s8_u64(uint64x1_t a) {
return vreinterpret_s8_u64(a);
}
-// CHECK-LABEL: test_vreinterpret_s8_f16
+// CHECK-LABEL: test_vreinterpret_s8_f16:
// CHECK-NEXT: ret
int8x8_t test_vreinterpret_s8_f16(float16x4_t a) {
return vreinterpret_s8_f16(a);
}
-// CHECK-LABEL: test_vreinterpret_s8_f32
+// CHECK-LABEL: test_vreinterpret_s8_f32:
// CHECK-NEXT: ret
int8x8_t test_vreinterpret_s8_f32(float32x2_t a) {
return vreinterpret_s8_f32(a);
}
-// CHECK-LABEL: test_vreinterpret_s8_f64
+// CHECK-LABEL: test_vreinterpret_s8_f64:
// CHECK-NEXT: ret
int8x8_t test_vreinterpret_s8_f64(float64x1_t a) {
return vreinterpret_s8_f64(a);
}
-// CHECK-LABEL: test_vreinterpret_s8_p8
+// CHECK-LABEL: test_vreinterpret_s8_p8:
// CHECK-NEXT: ret
int8x8_t test_vreinterpret_s8_p8(poly8x8_t a) {
return vreinterpret_s8_p8(a);
}
-// CHECK-LABEL: test_vreinterpret_s8_p16
+// CHECK-LABEL: test_vreinterpret_s8_p16:
// CHECK-NEXT: ret
int8x8_t test_vreinterpret_s8_p16(poly16x4_t a) {
return vreinterpret_s8_p16(a);
}
-// CHECK-LABEL: test_vreinterpret_s8_p64
+// CHECK-LABEL: test_vreinterpret_s8_p64:
// CHECK-NEXT: ret
int8x8_t test_vreinterpret_s8_p64(poly64x1_t a) {
return vreinterpret_s8_p64(a);
}
-// CHECK-LABEL: test_vreinterpret_s16_s8
+// CHECK-LABEL: test_vreinterpret_s16_s8:
// CHECK-NEXT: ret
int16x4_t test_vreinterpret_s16_s8(int8x8_t a) {
return vreinterpret_s16_s8(a);
}
-// CHECK-LABEL: test_vreinterpret_s16_s32
+// CHECK-LABEL: test_vreinterpret_s16_s32:
// CHECK-NEXT: ret
int16x4_t test_vreinterpret_s16_s32(int32x2_t a) {
return vreinterpret_s16_s32(a);
}
-// CHECK-LABEL: test_vreinterpret_s16_s64
+// CHECK-LABEL: test_vreinterpret_s16_s64:
// CHECK-NEXT: ret
int16x4_t test_vreinterpret_s16_s64(int64x1_t a) {
return vreinterpret_s16_s64(a);
}
-// CHECK-LABEL: test_vreinterpret_s16_u8
+// CHECK-LABEL: test_vreinterpret_s16_u8:
// CHECK-NEXT: ret
int16x4_t test_vreinterpret_s16_u8(uint8x8_t a) {
return vreinterpret_s16_u8(a);
}
-// CHECK-LABEL: test_vreinterpret_s16_u16
+// CHECK-LABEL: test_vreinterpret_s16_u16:
// CHECK-NEXT: ret
int16x4_t test_vreinterpret_s16_u16(uint16x4_t a) {
return vreinterpret_s16_u16(a);
}
-// CHECK-LABEL: test_vreinterpret_s16_u32
+// CHECK-LABEL: test_vreinterpret_s16_u32:
// CHECK-NEXT: ret
int16x4_t test_vreinterpret_s16_u32(uint32x2_t a) {
return vreinterpret_s16_u32(a);
}
-// CHECK-LABEL: test_vreinterpret_s16_u64
+// CHECK-LABEL: test_vreinterpret_s16_u64:
// CHECK-NEXT: ret
int16x4_t test_vreinterpret_s16_u64(uint64x1_t a) {
return vreinterpret_s16_u64(a);
}
-// CHECK-LABEL: test_vreinterpret_s16_f16
+// CHECK-LABEL: test_vreinterpret_s16_f16:
// CHECK-NEXT: ret
int16x4_t test_vreinterpret_s16_f16(float16x4_t a) {
return vreinterpret_s16_f16(a);
}
-// CHECK-LABEL: test_vreinterpret_s16_f32
+// CHECK-LABEL: test_vreinterpret_s16_f32:
// CHECK-NEXT: ret
int16x4_t test_vreinterpret_s16_f32(float32x2_t a) {
return vreinterpret_s16_f32(a);
}
-// CHECK-LABEL: test_vreinterpret_s16_f64
+// CHECK-LABEL: test_vreinterpret_s16_f64:
// CHECK-NEXT: ret
int16x4_t test_vreinterpret_s16_f64(float64x1_t a) {
return vreinterpret_s16_f64(a);
}
-// CHECK-LABEL: test_vreinterpret_s16_p8
+// CHECK-LABEL: test_vreinterpret_s16_p8:
// CHECK-NEXT: ret
int16x4_t test_vreinterpret_s16_p8(poly8x8_t a) {
return vreinterpret_s16_p8(a);
}
-// CHECK-LABEL: test_vreinterpret_s16_p16
+// CHECK-LABEL: test_vreinterpret_s16_p16:
// CHECK-NEXT: ret
int16x4_t test_vreinterpret_s16_p16(poly16x4_t a) {
return vreinterpret_s16_p16(a);
}
-// CHECK-LABEL: test_vreinterpret_s16_p64
+// CHECK-LABEL: test_vreinterpret_s16_p64:
// CHECK-NEXT: ret
int16x4_t test_vreinterpret_s16_p64(poly64x1_t a) {
return vreinterpret_s16_p64(a);
}
-// CHECK-LABEL: test_vreinterpret_s32_s8
+// CHECK-LABEL: test_vreinterpret_s32_s8:
// CHECK-NEXT: ret
int32x2_t test_vreinterpret_s32_s8(int8x8_t a) {
return vreinterpret_s32_s8(a);
}
-// CHECK-LABEL: test_vreinterpret_s32_s16
+// CHECK-LABEL: test_vreinterpret_s32_s16:
// CHECK-NEXT: ret
int32x2_t test_vreinterpret_s32_s16(int16x4_t a) {
return vreinterpret_s32_s16(a);
}
-// CHECK-LABEL: test_vreinterpret_s32_s64
+// CHECK-LABEL: test_vreinterpret_s32_s64:
// CHECK-NEXT: ret
int32x2_t test_vreinterpret_s32_s64(int64x1_t a) {
return vreinterpret_s32_s64(a);
}
-// CHECK-LABEL: test_vreinterpret_s32_u8
+// CHECK-LABEL: test_vreinterpret_s32_u8:
// CHECK-NEXT: ret
int32x2_t test_vreinterpret_s32_u8(uint8x8_t a) {
return vreinterpret_s32_u8(a);
}
-// CHECK-LABEL: test_vreinterpret_s32_u16
+// CHECK-LABEL: test_vreinterpret_s32_u16:
// CHECK-NEXT: ret
int32x2_t test_vreinterpret_s32_u16(uint16x4_t a) {
return vreinterpret_s32_u16(a);
}
-// CHECK-LABEL: test_vreinterpret_s32_u32
+// CHECK-LABEL: test_vreinterpret_s32_u32:
// CHECK-NEXT: ret
int32x2_t test_vreinterpret_s32_u32(uint32x2_t a) {
return vreinterpret_s32_u32(a);
}
-// CHECK-LABEL: test_vreinterpret_s32_u64
+// CHECK-LABEL: test_vreinterpret_s32_u64:
// CHECK-NEXT: ret
int32x2_t test_vreinterpret_s32_u64(uint64x1_t a) {
return vreinterpret_s32_u64(a);
}
-// CHECK-LABEL: test_vreinterpret_s32_f16
+// CHECK-LABEL: test_vreinterpret_s32_f16:
// CHECK-NEXT: ret
int32x2_t test_vreinterpret_s32_f16(float16x4_t a) {
return vreinterpret_s32_f16(a);
}
-// CHECK-LABEL: test_vreinterpret_s32_f32
+// CHECK-LABEL: test_vreinterpret_s32_f32:
// CHECK-NEXT: ret
int32x2_t test_vreinterpret_s32_f32(float32x2_t a) {
return vreinterpret_s32_f32(a);
}
-// CHECK-LABEL: test_vreinterpret_s32_f64
+// CHECK-LABEL: test_vreinterpret_s32_f64:
// CHECK-NEXT: ret
int32x2_t test_vreinterpret_s32_f64(float64x1_t a) {
return vreinterpret_s32_f64(a);
}
-// CHECK-LABEL: test_vreinterpret_s32_p8
+// CHECK-LABEL: test_vreinterpret_s32_p8:
// CHECK-NEXT: ret
int32x2_t test_vreinterpret_s32_p8(poly8x8_t a) {
return vreinterpret_s32_p8(a);
}
-// CHECK-LABEL: test_vreinterpret_s32_p16
+// CHECK-LABEL: test_vreinterpret_s32_p16:
// CHECK-NEXT: ret
int32x2_t test_vreinterpret_s32_p16(poly16x4_t a) {
return vreinterpret_s32_p16(a);
}
-// CHECK-LABEL: test_vreinterpret_s32_p64
+// CHECK-LABEL: test_vreinterpret_s32_p64:
// CHECK-NEXT: ret
int32x2_t test_vreinterpret_s32_p64(poly64x1_t a) {
return vreinterpret_s32_p64(a);
}
-// CHECK-LABEL: test_vreinterpret_s64_s8
+// CHECK-LABEL: test_vreinterpret_s64_s8:
// CHECK-NEXT: ret
int64x1_t test_vreinterpret_s64_s8(int8x8_t a) {
return vreinterpret_s64_s8(a);
}
-// CHECK-LABEL: test_vreinterpret_s64_s16
+// CHECK-LABEL: test_vreinterpret_s64_s16:
// CHECK-NEXT: ret
int64x1_t test_vreinterpret_s64_s16(int16x4_t a) {
return vreinterpret_s64_s16(a);
}
-// CHECK-LABEL: test_vreinterpret_s64_s32
+// CHECK-LABEL: test_vreinterpret_s64_s32:
// CHECK-NEXT: ret
int64x1_t test_vreinterpret_s64_s32(int32x2_t a) {
return vreinterpret_s64_s32(a);
}
-// CHECK-LABEL: test_vreinterpret_s64_u8
+// CHECK-LABEL: test_vreinterpret_s64_u8:
// CHECK-NEXT: ret
int64x1_t test_vreinterpret_s64_u8(uint8x8_t a) {
return vreinterpret_s64_u8(a);
}
-// CHECK-LABEL: test_vreinterpret_s64_u16
+// CHECK-LABEL: test_vreinterpret_s64_u16:
// CHECK-NEXT: ret
int64x1_t test_vreinterpret_s64_u16(uint16x4_t a) {
return vreinterpret_s64_u16(a);
}
-// CHECK-LABEL: test_vreinterpret_s64_u32
+// CHECK-LABEL: test_vreinterpret_s64_u32:
// CHECK-NEXT: ret
int64x1_t test_vreinterpret_s64_u32(uint32x2_t a) {
return vreinterpret_s64_u32(a);
}
-// CHECK-LABEL: test_vreinterpret_s64_u64
+// CHECK-LABEL: test_vreinterpret_s64_u64:
// CHECK-NEXT: ret
int64x1_t test_vreinterpret_s64_u64(uint64x1_t a) {
return vreinterpret_s64_u64(a);
}
-// CHECK-LABEL: test_vreinterpret_s64_f16
+// CHECK-LABEL: test_vreinterpret_s64_f16:
// CHECK-NEXT: ret
int64x1_t test_vreinterpret_s64_f16(float16x4_t a) {
return vreinterpret_s64_f16(a);
}
-// CHECK-LABEL: test_vreinterpret_s64_f32
+// CHECK-LABEL: test_vreinterpret_s64_f32:
// CHECK-NEXT: ret
int64x1_t test_vreinterpret_s64_f32(float32x2_t a) {
return vreinterpret_s64_f32(a);
}
-// CHECK-LABEL: test_vreinterpret_s64_f64
+// CHECK-LABEL: test_vreinterpret_s64_f64:
// CHECK-NEXT: ret
int64x1_t test_vreinterpret_s64_f64(float64x1_t a) {
return vreinterpret_s64_f64(a);
}
-// CHECK-LABEL: test_vreinterpret_s64_p8
+// CHECK-LABEL: test_vreinterpret_s64_p8:
// CHECK-NEXT: ret
int64x1_t test_vreinterpret_s64_p8(poly8x8_t a) {
return vreinterpret_s64_p8(a);
}
-// CHECK-LABEL: test_vreinterpret_s64_p16
+// CHECK-LABEL: test_vreinterpret_s64_p16:
// CHECK-NEXT: ret
int64x1_t test_vreinterpret_s64_p16(poly16x4_t a) {
return vreinterpret_s64_p16(a);
}
-// CHECK-LABEL: test_vreinterpret_s64_p64
+// CHECK-LABEL: test_vreinterpret_s64_p64:
// CHECK-NEXT: ret
int64x1_t test_vreinterpret_s64_p64(poly64x1_t a) {
return vreinterpret_s64_p64(a);
}
-// CHECK-LABEL: test_vreinterpret_u8_s8
+// CHECK-LABEL: test_vreinterpret_u8_s8:
// CHECK-NEXT: ret
uint8x8_t test_vreinterpret_u8_s8(int8x8_t a) {
return vreinterpret_u8_s8(a);
}
-// CHECK-LABEL: test_vreinterpret_u8_s16
+// CHECK-LABEL: test_vreinterpret_u8_s16:
// CHECK-NEXT: ret
uint8x8_t test_vreinterpret_u8_s16(int16x4_t a) {
return vreinterpret_u8_s16(a);
}
-// CHECK-LABEL: test_vreinterpret_u8_s32
+// CHECK-LABEL: test_vreinterpret_u8_s32:
// CHECK-NEXT: ret
uint8x8_t test_vreinterpret_u8_s32(int32x2_t a) {
return vreinterpret_u8_s32(a);
}
-// CHECK-LABEL: test_vreinterpret_u8_s64
+// CHECK-LABEL: test_vreinterpret_u8_s64:
// CHECK-NEXT: ret
uint8x8_t test_vreinterpret_u8_s64(int64x1_t a) {
return vreinterpret_u8_s64(a);
}
-// CHECK-LABEL: test_vreinterpret_u8_u16
+// CHECK-LABEL: test_vreinterpret_u8_u16:
// CHECK-NEXT: ret
uint8x8_t test_vreinterpret_u8_u16(uint16x4_t a) {
return vreinterpret_u8_u16(a);
}
-// CHECK-LABEL: test_vreinterpret_u8_u32
+// CHECK-LABEL: test_vreinterpret_u8_u32:
// CHECK-NEXT: ret
uint8x8_t test_vreinterpret_u8_u32(uint32x2_t a) {
return vreinterpret_u8_u32(a);
}
-// CHECK-LABEL: test_vreinterpret_u8_u64
+// CHECK-LABEL: test_vreinterpret_u8_u64:
// CHECK-NEXT: ret
uint8x8_t test_vreinterpret_u8_u64(uint64x1_t a) {
return vreinterpret_u8_u64(a);
}
-// CHECK-LABEL: test_vreinterpret_u8_f16
+// CHECK-LABEL: test_vreinterpret_u8_f16:
// CHECK-NEXT: ret
uint8x8_t test_vreinterpret_u8_f16(float16x4_t a) {
return vreinterpret_u8_f16(a);
}
-// CHECK-LABEL: test_vreinterpret_u8_f32
+// CHECK-LABEL: test_vreinterpret_u8_f32:
// CHECK-NEXT: ret
uint8x8_t test_vreinterpret_u8_f32(float32x2_t a) {
return vreinterpret_u8_f32(a);
}
-// CHECK-LABEL: test_vreinterpret_u8_f64
+// CHECK-LABEL: test_vreinterpret_u8_f64:
// CHECK-NEXT: ret
uint8x8_t test_vreinterpret_u8_f64(float64x1_t a) {
return vreinterpret_u8_f64(a);
}
-// CHECK-LABEL: test_vreinterpret_u8_p8
+// CHECK-LABEL: test_vreinterpret_u8_p8:
// CHECK-NEXT: ret
uint8x8_t test_vreinterpret_u8_p8(poly8x8_t a) {
return vreinterpret_u8_p8(a);
}
-// CHECK-LABEL: test_vreinterpret_u8_p16
+// CHECK-LABEL: test_vreinterpret_u8_p16:
// CHECK-NEXT: ret
uint8x8_t test_vreinterpret_u8_p16(poly16x4_t a) {
return vreinterpret_u8_p16(a);
}
-// CHECK-LABEL: test_vreinterpret_u8_p64
+// CHECK-LABEL: test_vreinterpret_u8_p64:
// CHECK-NEXT: ret
uint8x8_t test_vreinterpret_u8_p64(poly64x1_t a) {
return vreinterpret_u8_p64(a);
}
-// CHECK-LABEL: test_vreinterpret_u16_s8
+// CHECK-LABEL: test_vreinterpret_u16_s8:
// CHECK-NEXT: ret
uint16x4_t test_vreinterpret_u16_s8(int8x8_t a) {
return vreinterpret_u16_s8(a);
}
-// CHECK-LABEL: test_vreinterpret_u16_s16
+// CHECK-LABEL: test_vreinterpret_u16_s16:
// CHECK-NEXT: ret
uint16x4_t test_vreinterpret_u16_s16(int16x4_t a) {
return vreinterpret_u16_s16(a);
}
-// CHECK-LABEL: test_vreinterpret_u16_s32
+// CHECK-LABEL: test_vreinterpret_u16_s32:
// CHECK-NEXT: ret
uint16x4_t test_vreinterpret_u16_s32(int32x2_t a) {
return vreinterpret_u16_s32(a);
}
-// CHECK-LABEL: test_vreinterpret_u16_s64
+// CHECK-LABEL: test_vreinterpret_u16_s64:
// CHECK-NEXT: ret
uint16x4_t test_vreinterpret_u16_s64(int64x1_t a) {
return vreinterpret_u16_s64(a);
}
-// CHECK-LABEL: test_vreinterpret_u16_u8
+// CHECK-LABEL: test_vreinterpret_u16_u8:
// CHECK-NEXT: ret
uint16x4_t test_vreinterpret_u16_u8(uint8x8_t a) {
return vreinterpret_u16_u8(a);
}
-// CHECK-LABEL: test_vreinterpret_u16_u32
+// CHECK-LABEL: test_vreinterpret_u16_u32:
// CHECK-NEXT: ret
uint16x4_t test_vreinterpret_u16_u32(uint32x2_t a) {
return vreinterpret_u16_u32(a);
}
-// CHECK-LABEL: test_vreinterpret_u16_u64
+// CHECK-LABEL: test_vreinterpret_u16_u64:
// CHECK-NEXT: ret
uint16x4_t test_vreinterpret_u16_u64(uint64x1_t a) {
return vreinterpret_u16_u64(a);
}
-// CHECK-LABEL: test_vreinterpret_u16_f16
+// CHECK-LABEL: test_vreinterpret_u16_f16:
// CHECK-NEXT: ret
uint16x4_t test_vreinterpret_u16_f16(float16x4_t a) {
return vreinterpret_u16_f16(a);
}
-// CHECK-LABEL: test_vreinterpret_u16_f32
+// CHECK-LABEL: test_vreinterpret_u16_f32:
// CHECK-NEXT: ret
uint16x4_t test_vreinterpret_u16_f32(float32x2_t a) {
return vreinterpret_u16_f32(a);
}
-// CHECK-LABEL: test_vreinterpret_u16_f64
+// CHECK-LABEL: test_vreinterpret_u16_f64:
// CHECK-NEXT: ret
uint16x4_t test_vreinterpret_u16_f64(float64x1_t a) {
return vreinterpret_u16_f64(a);
}
-// CHECK-LABEL: test_vreinterpret_u16_p8
+// CHECK-LABEL: test_vreinterpret_u16_p8:
// CHECK-NEXT: ret
uint16x4_t test_vreinterpret_u16_p8(poly8x8_t a) {
return vreinterpret_u16_p8(a);
}
-// CHECK-LABEL: test_vreinterpret_u16_p16
+// CHECK-LABEL: test_vreinterpret_u16_p16:
// CHECK-NEXT: ret
uint16x4_t test_vreinterpret_u16_p16(poly16x4_t a) {
return vreinterpret_u16_p16(a);
}
-// CHECK-LABEL: test_vreinterpret_u16_p64
+// CHECK-LABEL: test_vreinterpret_u16_p64:
// CHECK-NEXT: ret
uint16x4_t test_vreinterpret_u16_p64(poly64x1_t a) {
return vreinterpret_u16_p64(a);
}
-// CHECK-LABEL: test_vreinterpret_u32_s8
+// CHECK-LABEL: test_vreinterpret_u32_s8:
// CHECK-NEXT: ret
uint32x2_t test_vreinterpret_u32_s8(int8x8_t a) {
return vreinterpret_u32_s8(a);
}
-// CHECK-LABEL: test_vreinterpret_u32_s16
+// CHECK-LABEL: test_vreinterpret_u32_s16:
// CHECK-NEXT: ret
uint32x2_t test_vreinterpret_u32_s16(int16x4_t a) {
return vreinterpret_u32_s16(a);
}
-// CHECK-LABEL: test_vreinterpret_u32_s32
+// CHECK-LABEL: test_vreinterpret_u32_s32:
// CHECK-NEXT: ret
uint32x2_t test_vreinterpret_u32_s32(int32x2_t a) {
return vreinterpret_u32_s32(a);
}
-// CHECK-LABEL: test_vreinterpret_u32_s64
+// CHECK-LABEL: test_vreinterpret_u32_s64:
// CHECK-NEXT: ret
uint32x2_t test_vreinterpret_u32_s64(int64x1_t a) {
return vreinterpret_u32_s64(a);
}
-// CHECK-LABEL: test_vreinterpret_u32_u8
+// CHECK-LABEL: test_vreinterpret_u32_u8:
// CHECK-NEXT: ret
uint32x2_t test_vreinterpret_u32_u8(uint8x8_t a) {
return vreinterpret_u32_u8(a);
}
-// CHECK-LABEL: test_vreinterpret_u32_u16
+// CHECK-LABEL: test_vreinterpret_u32_u16:
// CHECK-NEXT: ret
uint32x2_t test_vreinterpret_u32_u16(uint16x4_t a) {
return vreinterpret_u32_u16(a);
}
-// CHECK-LABEL: test_vreinterpret_u32_u64
+// CHECK-LABEL: test_vreinterpret_u32_u64:
// CHECK-NEXT: ret
uint32x2_t test_vreinterpret_u32_u64(uint64x1_t a) {
return vreinterpret_u32_u64(a);
}
-// CHECK-LABEL: test_vreinterpret_u32_f16
+// CHECK-LABEL: test_vreinterpret_u32_f16:
// CHECK-NEXT: ret
uint32x2_t test_vreinterpret_u32_f16(float16x4_t a) {
return vreinterpret_u32_f16(a);
}
-// CHECK-LABEL: test_vreinterpret_u32_f32
+// CHECK-LABEL: test_vreinterpret_u32_f32:
// CHECK-NEXT: ret
uint32x2_t test_vreinterpret_u32_f32(float32x2_t a) {
return vreinterpret_u32_f32(a);
}
-// CHECK-LABEL: test_vreinterpret_u32_f64
+// CHECK-LABEL: test_vreinterpret_u32_f64:
// CHECK-NEXT: ret
uint32x2_t test_vreinterpret_u32_f64(float64x1_t a) {
return vreinterpret_u32_f64(a);
}
-// CHECK-LABEL: test_vreinterpret_u32_p8
+// CHECK-LABEL: test_vreinterpret_u32_p8:
// CHECK-NEXT: ret
uint32x2_t test_vreinterpret_u32_p8(poly8x8_t a) {
return vreinterpret_u32_p8(a);
}
-// CHECK-LABEL: test_vreinterpret_u32_p16
+// CHECK-LABEL: test_vreinterpret_u32_p16:
// CHECK-NEXT: ret
uint32x2_t test_vreinterpret_u32_p16(poly16x4_t a) {
return vreinterpret_u32_p16(a);
}
-// CHECK-LABEL: test_vreinterpret_u32_p64
+// CHECK-LABEL: test_vreinterpret_u32_p64:
// CHECK-NEXT: ret
uint32x2_t test_vreinterpret_u32_p64(poly64x1_t a) {
return vreinterpret_u32_p64(a);
}
-// CHECK-LABEL: test_vreinterpret_u64_s8
+// CHECK-LABEL: test_vreinterpret_u64_s8:
// CHECK-NEXT: ret
uint64x1_t test_vreinterpret_u64_s8(int8x8_t a) {
return vreinterpret_u64_s8(a);
}
-// CHECK-LABEL: test_vreinterpret_u64_s16
+// CHECK-LABEL: test_vreinterpret_u64_s16:
// CHECK-NEXT: ret
uint64x1_t test_vreinterpret_u64_s16(int16x4_t a) {
return vreinterpret_u64_s16(a);
}
-// CHECK-LABEL: test_vreinterpret_u64_s32
+// CHECK-LABEL: test_vreinterpret_u64_s32:
// CHECK-NEXT: ret
uint64x1_t test_vreinterpret_u64_s32(int32x2_t a) {
return vreinterpret_u64_s32(a);
}
-// CHECK-LABEL: test_vreinterpret_u64_s64
+// CHECK-LABEL: test_vreinterpret_u64_s64:
// CHECK-NEXT: ret
uint64x1_t test_vreinterpret_u64_s64(int64x1_t a) {
return vreinterpret_u64_s64(a);
}
-// CHECK-LABEL: test_vreinterpret_u64_u8
+// CHECK-LABEL: test_vreinterpret_u64_u8:
// CHECK-NEXT: ret
uint64x1_t test_vreinterpret_u64_u8(uint8x8_t a) {
return vreinterpret_u64_u8(a);
}
-// CHECK-LABEL: test_vreinterpret_u64_u16
+// CHECK-LABEL: test_vreinterpret_u64_u16:
// CHECK-NEXT: ret
uint64x1_t test_vreinterpret_u64_u16(uint16x4_t a) {
return vreinterpret_u64_u16(a);
}
-// CHECK-LABEL: test_vreinterpret_u64_u32
+// CHECK-LABEL: test_vreinterpret_u64_u32:
// CHECK-NEXT: ret
uint64x1_t test_vreinterpret_u64_u32(uint32x2_t a) {
return vreinterpret_u64_u32(a);
}
-// CHECK-LABEL: test_vreinterpret_u64_f16
+// CHECK-LABEL: test_vreinterpret_u64_f16:
// CHECK-NEXT: ret
uint64x1_t test_vreinterpret_u64_f16(float16x4_t a) {
return vreinterpret_u64_f16(a);
}
-// CHECK-LABEL: test_vreinterpret_u64_f32
+// CHECK-LABEL: test_vreinterpret_u64_f32:
// CHECK-NEXT: ret
uint64x1_t test_vreinterpret_u64_f32(float32x2_t a) {
return vreinterpret_u64_f32(a);
}
-// CHECK-LABEL: test_vreinterpret_u64_f64
+// CHECK-LABEL: test_vreinterpret_u64_f64:
// CHECK-NEXT: ret
uint64x1_t test_vreinterpret_u64_f64(float64x1_t a) {
return vreinterpret_u64_f64(a);
}
-// CHECK-LABEL: test_vreinterpret_u64_p8
+// CHECK-LABEL: test_vreinterpret_u64_p8:
// CHECK-NEXT: ret
uint64x1_t test_vreinterpret_u64_p8(poly8x8_t a) {
return vreinterpret_u64_p8(a);
}
-// CHECK-LABEL: test_vreinterpret_u64_p16
+// CHECK-LABEL: test_vreinterpret_u64_p16:
// CHECK-NEXT: ret
uint64x1_t test_vreinterpret_u64_p16(poly16x4_t a) {
return vreinterpret_u64_p16(a);
}
-// CHECK-LABEL: test_vreinterpret_u64_p64
+// CHECK-LABEL: test_vreinterpret_u64_p64:
// CHECK-NEXT: ret
uint64x1_t test_vreinterpret_u64_p64(poly64x1_t a) {
return vreinterpret_u64_p64(a);
}
-// CHECK-LABEL: test_vreinterpret_f16_s8
+// CHECK-LABEL: test_vreinterpret_f16_s8:
// CHECK-NEXT: ret
float16x4_t test_vreinterpret_f16_s8(int8x8_t a) {
return vreinterpret_f16_s8(a);
}
-// CHECK-LABEL: test_vreinterpret_f16_s16
+// CHECK-LABEL: test_vreinterpret_f16_s16:
// CHECK-NEXT: ret
float16x4_t test_vreinterpret_f16_s16(int16x4_t a) {
return vreinterpret_f16_s16(a);
}
-// CHECK-LABEL: test_vreinterpret_f16_s32
+// CHECK-LABEL: test_vreinterpret_f16_s32:
// CHECK-NEXT: ret
float16x4_t test_vreinterpret_f16_s32(int32x2_t a) {
return vreinterpret_f16_s32(a);
}
-// CHECK-LABEL: test_vreinterpret_f16_s64
+// CHECK-LABEL: test_vreinterpret_f16_s64:
// CHECK-NEXT: ret
float16x4_t test_vreinterpret_f16_s64(int64x1_t a) {
return vreinterpret_f16_s64(a);
}
-// CHECK-LABEL: test_vreinterpret_f16_u8
+// CHECK-LABEL: test_vreinterpret_f16_u8:
// CHECK-NEXT: ret
float16x4_t test_vreinterpret_f16_u8(uint8x8_t a) {
return vreinterpret_f16_u8(a);
}
-// CHECK-LABEL: test_vreinterpret_f16_u16
+// CHECK-LABEL: test_vreinterpret_f16_u16:
// CHECK-NEXT: ret
float16x4_t test_vreinterpret_f16_u16(uint16x4_t a) {
return vreinterpret_f16_u16(a);
}
-// CHECK-LABEL: test_vreinterpret_f16_u32
+// CHECK-LABEL: test_vreinterpret_f16_u32:
// CHECK-NEXT: ret
float16x4_t test_vreinterpret_f16_u32(uint32x2_t a) {
return vreinterpret_f16_u32(a);
}
-// CHECK-LABEL: test_vreinterpret_f16_u64
+// CHECK-LABEL: test_vreinterpret_f16_u64:
// CHECK-NEXT: ret
float16x4_t test_vreinterpret_f16_u64(uint64x1_t a) {
return vreinterpret_f16_u64(a);
}
-// CHECK-LABEL: test_vreinterpret_f16_f32
+// CHECK-LABEL: test_vreinterpret_f16_f32:
// CHECK-NEXT: ret
float16x4_t test_vreinterpret_f16_f32(float32x2_t a) {
return vreinterpret_f16_f32(a);
}
-// CHECK-LABEL: test_vreinterpret_f16_f64
+// CHECK-LABEL: test_vreinterpret_f16_f64:
// CHECK-NEXT: ret
float16x4_t test_vreinterpret_f16_f64(float64x1_t a) {
return vreinterpret_f16_f64(a);
}
-// CHECK-LABEL: test_vreinterpret_f16_p8
+// CHECK-LABEL: test_vreinterpret_f16_p8:
// CHECK-NEXT: ret
float16x4_t test_vreinterpret_f16_p8(poly8x8_t a) {
return vreinterpret_f16_p8(a);
}
-// CHECK-LABEL: test_vreinterpret_f16_p16
+// CHECK-LABEL: test_vreinterpret_f16_p16:
// CHECK-NEXT: ret
float16x4_t test_vreinterpret_f16_p16(poly16x4_t a) {
return vreinterpret_f16_p16(a);
}
-// CHECK-LABEL: test_vreinterpret_f16_p64
+// CHECK-LABEL: test_vreinterpret_f16_p64:
// CHECK-NEXT: ret
float16x4_t test_vreinterpret_f16_p64(poly64x1_t a) {
return vreinterpret_f16_p64(a);
}
-// CHECK-LABEL: test_vreinterpret_f32_s8
+// CHECK-LABEL: test_vreinterpret_f32_s8:
// CHECK-NEXT: ret
float32x2_t test_vreinterpret_f32_s8(int8x8_t a) {
return vreinterpret_f32_s8(a);
}
-// CHECK-LABEL: test_vreinterpret_f32_s16
+// CHECK-LABEL: test_vreinterpret_f32_s16:
// CHECK-NEXT: ret
float32x2_t test_vreinterpret_f32_s16(int16x4_t a) {
return vreinterpret_f32_s16(a);
}
-// CHECK-LABEL: test_vreinterpret_f32_s32
+// CHECK-LABEL: test_vreinterpret_f32_s32:
// CHECK-NEXT: ret
float32x2_t test_vreinterpret_f32_s32(int32x2_t a) {
return vreinterpret_f32_s32(a);
}
-// CHECK-LABEL: test_vreinterpret_f32_s64
+// CHECK-LABEL: test_vreinterpret_f32_s64:
// CHECK-NEXT: ret
float32x2_t test_vreinterpret_f32_s64(int64x1_t a) {
return vreinterpret_f32_s64(a);
}
-// CHECK-LABEL: test_vreinterpret_f32_u8
+// CHECK-LABEL: test_vreinterpret_f32_u8:
// CHECK-NEXT: ret
float32x2_t test_vreinterpret_f32_u8(uint8x8_t a) {
return vreinterpret_f32_u8(a);
}
-// CHECK-LABEL: test_vreinterpret_f32_u16
+// CHECK-LABEL: test_vreinterpret_f32_u16:
// CHECK-NEXT: ret
float32x2_t test_vreinterpret_f32_u16(uint16x4_t a) {
return vreinterpret_f32_u16(a);
}
-// CHECK-LABEL: test_vreinterpret_f32_u32
+// CHECK-LABEL: test_vreinterpret_f32_u32:
// CHECK-NEXT: ret
float32x2_t test_vreinterpret_f32_u32(uint32x2_t a) {
return vreinterpret_f32_u32(a);
}
-// CHECK-LABEL: test_vreinterpret_f32_u64
+// CHECK-LABEL: test_vreinterpret_f32_u64:
// CHECK-NEXT: ret
float32x2_t test_vreinterpret_f32_u64(uint64x1_t a) {
return vreinterpret_f32_u64(a);
}
-// CHECK-LABEL: test_vreinterpret_f32_f16
+// CHECK-LABEL: test_vreinterpret_f32_f16:
// CHECK-NEXT: ret
float32x2_t test_vreinterpret_f32_f16(float16x4_t a) {
return vreinterpret_f32_f16(a);
}
-// CHECK-LABEL: test_vreinterpret_f32_f64
+// CHECK-LABEL: test_vreinterpret_f32_f64:
// CHECK-NEXT: ret
float32x2_t test_vreinterpret_f32_f64(float64x1_t a) {
return vreinterpret_f32_f64(a);
}
-// CHECK-LABEL: test_vreinterpret_f32_p8
+// CHECK-LABEL: test_vreinterpret_f32_p8:
// CHECK-NEXT: ret
float32x2_t test_vreinterpret_f32_p8(poly8x8_t a) {
return vreinterpret_f32_p8(a);
}
-// CHECK-LABEL: test_vreinterpret_f32_p16
+// CHECK-LABEL: test_vreinterpret_f32_p16:
// CHECK-NEXT: ret
float32x2_t test_vreinterpret_f32_p16(poly16x4_t a) {
return vreinterpret_f32_p16(a);
}
-// CHECK-LABEL: test_vreinterpret_f32_p64
+// CHECK-LABEL: test_vreinterpret_f32_p64:
// CHECK-NEXT: ret
float32x2_t test_vreinterpret_f32_p64(poly64x1_t a) {
return vreinterpret_f32_p64(a);
}
-// CHECK-LABEL: test_vreinterpret_f64_s8
+// CHECK-LABEL: test_vreinterpret_f64_s8:
// CHECK-NEXT: ret
float64x1_t test_vreinterpret_f64_s8(int8x8_t a) {
return vreinterpret_f64_s8(a);
}
-// CHECK-LABEL: test_vreinterpret_f64_s16
+// CHECK-LABEL: test_vreinterpret_f64_s16:
// CHECK-NEXT: ret
float64x1_t test_vreinterpret_f64_s16(int16x4_t a) {
return vreinterpret_f64_s16(a);
}
-// CHECK-LABEL: test_vreinterpret_f64_s32
+// CHECK-LABEL: test_vreinterpret_f64_s32:
// CHECK-NEXT: ret
float64x1_t test_vreinterpret_f64_s32(int32x2_t a) {
return vreinterpret_f64_s32(a);
}
-// CHECK-LABEL: test_vreinterpret_f64_s64
+// CHECK-LABEL: test_vreinterpret_f64_s64:
// CHECK-NEXT: ret
float64x1_t test_vreinterpret_f64_s64(int64x1_t a) {
return vreinterpret_f64_s64(a);
}
-// CHECK-LABEL: test_vreinterpret_f64_u8
+// CHECK-LABEL: test_vreinterpret_f64_u8:
// CHECK-NEXT: ret
float64x1_t test_vreinterpret_f64_u8(uint8x8_t a) {
return vreinterpret_f64_u8(a);
}
-// CHECK-LABEL: test_vreinterpret_f64_u16
+// CHECK-LABEL: test_vreinterpret_f64_u16:
// CHECK-NEXT: ret
float64x1_t test_vreinterpret_f64_u16(uint16x4_t a) {
return vreinterpret_f64_u16(a);
}
-// CHECK-LABEL: test_vreinterpret_f64_u32
+// CHECK-LABEL: test_vreinterpret_f64_u32:
// CHECK-NEXT: ret
float64x1_t test_vreinterpret_f64_u32(uint32x2_t a) {
return vreinterpret_f64_u32(a);
}
-// CHECK-LABEL: test_vreinterpret_f64_u64
+// CHECK-LABEL: test_vreinterpret_f64_u64:
// CHECK-NEXT: ret
float64x1_t test_vreinterpret_f64_u64(uint64x1_t a) {
return vreinterpret_f64_u64(a);
}
-// CHECK-LABEL: test_vreinterpret_f64_f16
+// CHECK-LABEL: test_vreinterpret_f64_f16:
// CHECK-NEXT: ret
float64x1_t test_vreinterpret_f64_f16(float16x4_t a) {
return vreinterpret_f64_f16(a);
}
-// CHECK-LABEL: test_vreinterpret_f64_f32
+// CHECK-LABEL: test_vreinterpret_f64_f32:
// CHECK-NEXT: ret
float64x1_t test_vreinterpret_f64_f32(float32x2_t a) {
return vreinterpret_f64_f32(a);
}
-// CHECK-LABEL: test_vreinterpret_f64_p8
+// CHECK-LABEL: test_vreinterpret_f64_p8:
// CHECK-NEXT: ret
float64x1_t test_vreinterpret_f64_p8(poly8x8_t a) {
return vreinterpret_f64_p8(a);
}
-// CHECK-LABEL: test_vreinterpret_f64_p16
+// CHECK-LABEL: test_vreinterpret_f64_p16:
// CHECK-NEXT: ret
float64x1_t test_vreinterpret_f64_p16(poly16x4_t a) {
return vreinterpret_f64_p16(a);
}
-// CHECK-LABEL: test_vreinterpret_f64_p64
+// CHECK-LABEL: test_vreinterpret_f64_p64:
// CHECK-NEXT: ret
float64x1_t test_vreinterpret_f64_p64(poly64x1_t a) {
return vreinterpret_f64_p64(a);
}
-// CHECK-LABEL: test_vreinterpret_p8_s8
+// CHECK-LABEL: test_vreinterpret_p8_s8:
// CHECK-NEXT: ret
poly8x8_t test_vreinterpret_p8_s8(int8x8_t a) {
return vreinterpret_p8_s8(a);
}
-// CHECK-LABEL: test_vreinterpret_p8_s16
+// CHECK-LABEL: test_vreinterpret_p8_s16:
// CHECK-NEXT: ret
poly8x8_t test_vreinterpret_p8_s16(int16x4_t a) {
return vreinterpret_p8_s16(a);
}
-// CHECK-LABEL: test_vreinterpret_p8_s32
+// CHECK-LABEL: test_vreinterpret_p8_s32:
// CHECK-NEXT: ret
poly8x8_t test_vreinterpret_p8_s32(int32x2_t a) {
return vreinterpret_p8_s32(a);
}
-// CHECK-LABEL: test_vreinterpret_p8_s64
+// CHECK-LABEL: test_vreinterpret_p8_s64:
// CHECK-NEXT: ret
poly8x8_t test_vreinterpret_p8_s64(int64x1_t a) {
return vreinterpret_p8_s64(a);
}
-// CHECK-LABEL: test_vreinterpret_p8_u8
+// CHECK-LABEL: test_vreinterpret_p8_u8:
// CHECK-NEXT: ret
poly8x8_t test_vreinterpret_p8_u8(uint8x8_t a) {
return vreinterpret_p8_u8(a);
}
-// CHECK-LABEL: test_vreinterpret_p8_u16
+// CHECK-LABEL: test_vreinterpret_p8_u16:
// CHECK-NEXT: ret
poly8x8_t test_vreinterpret_p8_u16(uint16x4_t a) {
return vreinterpret_p8_u16(a);
}
-// CHECK-LABEL: test_vreinterpret_p8_u32
+// CHECK-LABEL: test_vreinterpret_p8_u32:
// CHECK-NEXT: ret
poly8x8_t test_vreinterpret_p8_u32(uint32x2_t a) {
return vreinterpret_p8_u32(a);
}
-// CHECK-LABEL: test_vreinterpret_p8_u64
+// CHECK-LABEL: test_vreinterpret_p8_u64:
// CHECK-NEXT: ret
poly8x8_t test_vreinterpret_p8_u64(uint64x1_t a) {
return vreinterpret_p8_u64(a);
}
-// CHECK-LABEL: test_vreinterpret_p8_f16
+// CHECK-LABEL: test_vreinterpret_p8_f16:
// CHECK-NEXT: ret
poly8x8_t test_vreinterpret_p8_f16(float16x4_t a) {
return vreinterpret_p8_f16(a);
}
-// CHECK-LABEL: test_vreinterpret_p8_f32
+// CHECK-LABEL: test_vreinterpret_p8_f32:
// CHECK-NEXT: ret
poly8x8_t test_vreinterpret_p8_f32(float32x2_t a) {
return vreinterpret_p8_f32(a);
}
-// CHECK-LABEL: test_vreinterpret_p8_f64
+// CHECK-LABEL: test_vreinterpret_p8_f64:
// CHECK-NEXT: ret
poly8x8_t test_vreinterpret_p8_f64(float64x1_t a) {
return vreinterpret_p8_f64(a);
}
-// CHECK-LABEL: test_vreinterpret_p8_p16
+// CHECK-LABEL: test_vreinterpret_p8_p16:
// CHECK-NEXT: ret
poly8x8_t test_vreinterpret_p8_p16(poly16x4_t a) {
return vreinterpret_p8_p16(a);
}
-// CHECK-LABEL: test_vreinterpret_p8_p64
+// CHECK-LABEL: test_vreinterpret_p8_p64:
// CHECK-NEXT: ret
poly8x8_t test_vreinterpret_p8_p64(poly64x1_t a) {
return vreinterpret_p8_p64(a);
}
-// CHECK-LABEL: test_vreinterpret_p16_s8
+// CHECK-LABEL: test_vreinterpret_p16_s8:
// CHECK-NEXT: ret
poly16x4_t test_vreinterpret_p16_s8(int8x8_t a) {
return vreinterpret_p16_s8(a);
}
-// CHECK-LABEL: test_vreinterpret_p16_s16
+// CHECK-LABEL: test_vreinterpret_p16_s16:
// CHECK-NEXT: ret
poly16x4_t test_vreinterpret_p16_s16(int16x4_t a) {
return vreinterpret_p16_s16(a);
}
-// CHECK-LABEL: test_vreinterpret_p16_s32
+// CHECK-LABEL: test_vreinterpret_p16_s32:
// CHECK-NEXT: ret
poly16x4_t test_vreinterpret_p16_s32(int32x2_t a) {
return vreinterpret_p16_s32(a);
}
-// CHECK-LABEL: test_vreinterpret_p16_s64
+// CHECK-LABEL: test_vreinterpret_p16_s64:
// CHECK-NEXT: ret
poly16x4_t test_vreinterpret_p16_s64(int64x1_t a) {
return vreinterpret_p16_s64(a);
}
-// CHECK-LABEL: test_vreinterpret_p16_u8
+// CHECK-LABEL: test_vreinterpret_p16_u8:
// CHECK-NEXT: ret
poly16x4_t test_vreinterpret_p16_u8(uint8x8_t a) {
return vreinterpret_p16_u8(a);
}
-// CHECK-LABEL: test_vreinterpret_p16_u16
+// CHECK-LABEL: test_vreinterpret_p16_u16:
// CHECK-NEXT: ret
poly16x4_t test_vreinterpret_p16_u16(uint16x4_t a) {
return vreinterpret_p16_u16(a);
}
-// CHECK-LABEL: test_vreinterpret_p16_u32
+// CHECK-LABEL: test_vreinterpret_p16_u32:
// CHECK-NEXT: ret
poly16x4_t test_vreinterpret_p16_u32(uint32x2_t a) {
return vreinterpret_p16_u32(a);
}
-// CHECK-LABEL: test_vreinterpret_p16_u64
+// CHECK-LABEL: test_vreinterpret_p16_u64:
// CHECK-NEXT: ret
poly16x4_t test_vreinterpret_p16_u64(uint64x1_t a) {
return vreinterpret_p16_u64(a);
}
-// CHECK-LABEL: test_vreinterpret_p16_f16
+// CHECK-LABEL: test_vreinterpret_p16_f16:
// CHECK-NEXT: ret
poly16x4_t test_vreinterpret_p16_f16(float16x4_t a) {
return vreinterpret_p16_f16(a);
}
-// CHECK-LABEL: test_vreinterpret_p16_f32
+// CHECK-LABEL: test_vreinterpret_p16_f32:
// CHECK-NEXT: ret
poly16x4_t test_vreinterpret_p16_f32(float32x2_t a) {
return vreinterpret_p16_f32(a);
}
-// CHECK-LABEL: test_vreinterpret_p16_f64
+// CHECK-LABEL: test_vreinterpret_p16_f64:
// CHECK-NEXT: ret
poly16x4_t test_vreinterpret_p16_f64(float64x1_t a) {
return vreinterpret_p16_f64(a);
}
-// CHECK-LABEL: test_vreinterpret_p16_p8
+// CHECK-LABEL: test_vreinterpret_p16_p8:
// CHECK-NEXT: ret
poly16x4_t test_vreinterpret_p16_p8(poly8x8_t a) {
return vreinterpret_p16_p8(a);
}
-// CHECK-LABEL: test_vreinterpret_p16_p64
+// CHECK-LABEL: test_vreinterpret_p16_p64:
// CHECK-NEXT: ret
poly16x4_t test_vreinterpret_p16_p64(poly64x1_t a) {
return vreinterpret_p16_p64(a);
}
-// CHECK-LABEL: test_vreinterpret_p64_s8
+// CHECK-LABEL: test_vreinterpret_p64_s8:
// CHECK-NEXT: ret
poly64x1_t test_vreinterpret_p64_s8(int8x8_t a) {
return vreinterpret_p64_s8(a);
}
-// CHECK-LABEL: test_vreinterpret_p64_s16
+// CHECK-LABEL: test_vreinterpret_p64_s16:
// CHECK-NEXT: ret
poly64x1_t test_vreinterpret_p64_s16(int16x4_t a) {
return vreinterpret_p64_s16(a);
}
-// CHECK-LABEL: test_vreinterpret_p64_s32
+// CHECK-LABEL: test_vreinterpret_p64_s32:
// CHECK-NEXT: ret
poly64x1_t test_vreinterpret_p64_s32(int32x2_t a) {
return vreinterpret_p64_s32(a);
}
-// CHECK-LABEL: test_vreinterpret_p64_s64
+// CHECK-LABEL: test_vreinterpret_p64_s64:
// CHECK-NEXT: ret
poly64x1_t test_vreinterpret_p64_s64(int64x1_t a) {
return vreinterpret_p64_s64(a);
}
-// CHECK-LABEL: test_vreinterpret_p64_u8
+// CHECK-LABEL: test_vreinterpret_p64_u8:
// CHECK-NEXT: ret
poly64x1_t test_vreinterpret_p64_u8(uint8x8_t a) {
return vreinterpret_p64_u8(a);
}
-// CHECK-LABEL: test_vreinterpret_p64_u16
+// CHECK-LABEL: test_vreinterpret_p64_u16:
// CHECK-NEXT: ret
poly64x1_t test_vreinterpret_p64_u16(uint16x4_t a) {
return vreinterpret_p64_u16(a);
}
-// CHECK-LABEL: test_vreinterpret_p64_u32
+// CHECK-LABEL: test_vreinterpret_p64_u32:
// CHECK-NEXT: ret
poly64x1_t test_vreinterpret_p64_u32(uint32x2_t a) {
return vreinterpret_p64_u32(a);
}
-// CHECK-LABEL: test_vreinterpret_p64_u64
+// CHECK-LABEL: test_vreinterpret_p64_u64:
// CHECK-NEXT: ret
poly64x1_t test_vreinterpret_p64_u64(uint64x1_t a) {
return vreinterpret_p64_u64(a);
}
-// CHECK-LABEL: test_vreinterpret_p64_f16
+// CHECK-LABEL: test_vreinterpret_p64_f16:
// CHECK-NEXT: ret
poly64x1_t test_vreinterpret_p64_f16(float16x4_t a) {
return vreinterpret_p64_f16(a);
}
-// CHECK-LABEL: test_vreinterpret_p64_f32
+// CHECK-LABEL: test_vreinterpret_p64_f32:
// CHECK-NEXT: ret
poly64x1_t test_vreinterpret_p64_f32(float32x2_t a) {
return vreinterpret_p64_f32(a);
}
-// CHECK-LABEL: test_vreinterpret_p64_f64
+// CHECK-LABEL: test_vreinterpret_p64_f64:
// CHECK-NEXT: ret
poly64x1_t test_vreinterpret_p64_f64(float64x1_t a) {
return vreinterpret_p64_f64(a);
}
-// CHECK-LABEL: test_vreinterpret_p64_p8
+// CHECK-LABEL: test_vreinterpret_p64_p8:
// CHECK-NEXT: ret
poly64x1_t test_vreinterpret_p64_p8(poly8x8_t a) {
return vreinterpret_p64_p8(a);
}
-// CHECK-LABEL: test_vreinterpret_p64_p16
+// CHECK-LABEL: test_vreinterpret_p64_p16:
// CHECK-NEXT: ret
poly64x1_t test_vreinterpret_p64_p16(poly16x4_t a) {
return vreinterpret_p64_p16(a);
}
-// CHECK-LABEL: test_vreinterpretq_s8_s16
+// CHECK-LABEL: test_vreinterpretq_s8_s16:
// CHECK-NEXT: ret
int8x16_t test_vreinterpretq_s8_s16(int16x8_t a) {
return vreinterpretq_s8_s16(a);
}
-// CHECK-LABEL: test_vreinterpretq_s8_s32
+// CHECK-LABEL: test_vreinterpretq_s8_s32:
// CHECK-NEXT: ret
int8x16_t test_vreinterpretq_s8_s32(int32x4_t a) {
return vreinterpretq_s8_s32(a);
}
-// CHECK-LABEL: test_vreinterpretq_s8_s64
+// CHECK-LABEL: test_vreinterpretq_s8_s64:
// CHECK-NEXT: ret
int8x16_t test_vreinterpretq_s8_s64(int64x2_t a) {
return vreinterpretq_s8_s64(a);
}
-// CHECK-LABEL: test_vreinterpretq_s8_u8
+// CHECK-LABEL: test_vreinterpretq_s8_u8:
// CHECK-NEXT: ret
int8x16_t test_vreinterpretq_s8_u8(uint8x16_t a) {
return vreinterpretq_s8_u8(a);
}
-// CHECK-LABEL: test_vreinterpretq_s8_u16
+// CHECK-LABEL: test_vreinterpretq_s8_u16:
// CHECK-NEXT: ret
int8x16_t test_vreinterpretq_s8_u16(uint16x8_t a) {
return vreinterpretq_s8_u16(a);
}
-// CHECK-LABEL: test_vreinterpretq_s8_u32
+// CHECK-LABEL: test_vreinterpretq_s8_u32:
// CHECK-NEXT: ret
int8x16_t test_vreinterpretq_s8_u32(uint32x4_t a) {
return vreinterpretq_s8_u32(a);
}
-// CHECK-LABEL: test_vreinterpretq_s8_u64
+// CHECK-LABEL: test_vreinterpretq_s8_u64:
// CHECK-NEXT: ret
int8x16_t test_vreinterpretq_s8_u64(uint64x2_t a) {
return vreinterpretq_s8_u64(a);
}
-// CHECK-LABEL: test_vreinterpretq_s8_f16
+// CHECK-LABEL: test_vreinterpretq_s8_f16:
// CHECK-NEXT: ret
int8x16_t test_vreinterpretq_s8_f16(float16x8_t a) {
return vreinterpretq_s8_f16(a);
}
-// CHECK-LABEL: test_vreinterpretq_s8_f32
+// CHECK-LABEL: test_vreinterpretq_s8_f32:
// CHECK-NEXT: ret
int8x16_t test_vreinterpretq_s8_f32(float32x4_t a) {
return vreinterpretq_s8_f32(a);
}
-// CHECK-LABEL: test_vreinterpretq_s8_f64
+// CHECK-LABEL: test_vreinterpretq_s8_f64:
// CHECK-NEXT: ret
int8x16_t test_vreinterpretq_s8_f64(float64x2_t a) {
return vreinterpretq_s8_f64(a);
}
-// CHECK-LABEL: test_vreinterpretq_s8_p8
+// CHECK-LABEL: test_vreinterpretq_s8_p8:
// CHECK-NEXT: ret
int8x16_t test_vreinterpretq_s8_p8(poly8x16_t a) {
return vreinterpretq_s8_p8(a);
}
-// CHECK-LABEL: test_vreinterpretq_s8_p16
+// CHECK-LABEL: test_vreinterpretq_s8_p16:
// CHECK-NEXT: ret
int8x16_t test_vreinterpretq_s8_p16(poly16x8_t a) {
return vreinterpretq_s8_p16(a);
}
-// CHECK-LABEL: test_vreinterpretq_s8_p64
+// CHECK-LABEL: test_vreinterpretq_s8_p64:
// CHECK-NEXT: ret
int8x16_t test_vreinterpretq_s8_p64(poly64x2_t a) {
return vreinterpretq_s8_p64(a);
}
-// CHECK-LABEL: test_vreinterpretq_s16_s8
+// CHECK-LABEL: test_vreinterpretq_s16_s8:
// CHECK-NEXT: ret
int16x8_t test_vreinterpretq_s16_s8(int8x16_t a) {
return vreinterpretq_s16_s8(a);
}
-// CHECK-LABEL: test_vreinterpretq_s16_s32
+// CHECK-LABEL: test_vreinterpretq_s16_s32:
// CHECK-NEXT: ret
int16x8_t test_vreinterpretq_s16_s32(int32x4_t a) {
return vreinterpretq_s16_s32(a);
}
-// CHECK-LABEL: test_vreinterpretq_s16_s64
+// CHECK-LABEL: test_vreinterpretq_s16_s64:
// CHECK-NEXT: ret
int16x8_t test_vreinterpretq_s16_s64(int64x2_t a) {
return vreinterpretq_s16_s64(a);
}
-// CHECK-LABEL: test_vreinterpretq_s16_u8
+// CHECK-LABEL: test_vreinterpretq_s16_u8:
// CHECK-NEXT: ret
int16x8_t test_vreinterpretq_s16_u8(uint8x16_t a) {
return vreinterpretq_s16_u8(a);
}
-// CHECK-LABEL: test_vreinterpretq_s16_u16
+// CHECK-LABEL: test_vreinterpretq_s16_u16:
// CHECK-NEXT: ret
int16x8_t test_vreinterpretq_s16_u16(uint16x8_t a) {
return vreinterpretq_s16_u16(a);
}
-// CHECK-LABEL: test_vreinterpretq_s16_u32
+// CHECK-LABEL: test_vreinterpretq_s16_u32:
// CHECK-NEXT: ret
int16x8_t test_vreinterpretq_s16_u32(uint32x4_t a) {
return vreinterpretq_s16_u32(a);
}
-// CHECK-LABEL: test_vreinterpretq_s16_u64
+// CHECK-LABEL: test_vreinterpretq_s16_u64:
// CHECK-NEXT: ret
int16x8_t test_vreinterpretq_s16_u64(uint64x2_t a) {
return vreinterpretq_s16_u64(a);
}
-// CHECK-LABEL: test_vreinterpretq_s16_f16
+// CHECK-LABEL: test_vreinterpretq_s16_f16:
// CHECK-NEXT: ret
int16x8_t test_vreinterpretq_s16_f16(float16x8_t a) {
return vreinterpretq_s16_f16(a);
}
-// CHECK-LABEL: test_vreinterpretq_s16_f32
+// CHECK-LABEL: test_vreinterpretq_s16_f32:
// CHECK-NEXT: ret
int16x8_t test_vreinterpretq_s16_f32(float32x4_t a) {
return vreinterpretq_s16_f32(a);
}
-// CHECK-LABEL: test_vreinterpretq_s16_f64
+// CHECK-LABEL: test_vreinterpretq_s16_f64:
// CHECK-NEXT: ret
int16x8_t test_vreinterpretq_s16_f64(float64x2_t a) {
return vreinterpretq_s16_f64(a);
}
-// CHECK-LABEL: test_vreinterpretq_s16_p8
+// CHECK-LABEL: test_vreinterpretq_s16_p8:
// CHECK-NEXT: ret
int16x8_t test_vreinterpretq_s16_p8(poly8x16_t a) {
return vreinterpretq_s16_p8(a);
}
-// CHECK-LABEL: test_vreinterpretq_s16_p16
+// CHECK-LABEL: test_vreinterpretq_s16_p16:
// CHECK-NEXT: ret
int16x8_t test_vreinterpretq_s16_p16(poly16x8_t a) {
return vreinterpretq_s16_p16(a);
}
-// CHECK-LABEL: test_vreinterpretq_s16_p64
+// CHECK-LABEL: test_vreinterpretq_s16_p64:
// CHECK-NEXT: ret
int16x8_t test_vreinterpretq_s16_p64(poly64x2_t a) {
return vreinterpretq_s16_p64(a);
}
-// CHECK-LABEL: test_vreinterpretq_s32_s8
+// CHECK-LABEL: test_vreinterpretq_s32_s8:
// CHECK-NEXT: ret
int32x4_t test_vreinterpretq_s32_s8(int8x16_t a) {
return vreinterpretq_s32_s8(a);
}
-// CHECK-LABEL: test_vreinterpretq_s32_s16
+// CHECK-LABEL: test_vreinterpretq_s32_s16:
// CHECK-NEXT: ret
int32x4_t test_vreinterpretq_s32_s16(int16x8_t a) {
return vreinterpretq_s32_s16(a);
}
-// CHECK-LABEL: test_vreinterpretq_s32_s64
+// CHECK-LABEL: test_vreinterpretq_s32_s64:
// CHECK-NEXT: ret
int32x4_t test_vreinterpretq_s32_s64(int64x2_t a) {
return vreinterpretq_s32_s64(a);
}
-// CHECK-LABEL: test_vreinterpretq_s32_u8
+// CHECK-LABEL: test_vreinterpretq_s32_u8:
// CHECK-NEXT: ret
int32x4_t test_vreinterpretq_s32_u8(uint8x16_t a) {
return vreinterpretq_s32_u8(a);
}
-// CHECK-LABEL: test_vreinterpretq_s32_u16
+// CHECK-LABEL: test_vreinterpretq_s32_u16:
// CHECK-NEXT: ret
int32x4_t test_vreinterpretq_s32_u16(uint16x8_t a) {
return vreinterpretq_s32_u16(a);
}
-// CHECK-LABEL: test_vreinterpretq_s32_u32
+// CHECK-LABEL: test_vreinterpretq_s32_u32:
// CHECK-NEXT: ret
int32x4_t test_vreinterpretq_s32_u32(uint32x4_t a) {
return vreinterpretq_s32_u32(a);
}
-// CHECK-LABEL: test_vreinterpretq_s32_u64
+// CHECK-LABEL: test_vreinterpretq_s32_u64:
// CHECK-NEXT: ret
int32x4_t test_vreinterpretq_s32_u64(uint64x2_t a) {
return vreinterpretq_s32_u64(a);
}
-// CHECK-LABEL: test_vreinterpretq_s32_f16
+// CHECK-LABEL: test_vreinterpretq_s32_f16:
// CHECK-NEXT: ret
int32x4_t test_vreinterpretq_s32_f16(float16x8_t a) {
return vreinterpretq_s32_f16(a);
}
-// CHECK-LABEL: test_vreinterpretq_s32_f32
+// CHECK-LABEL: test_vreinterpretq_s32_f32:
// CHECK-NEXT: ret
int32x4_t test_vreinterpretq_s32_f32(float32x4_t a) {
return vreinterpretq_s32_f32(a);
}
-// CHECK-LABEL: test_vreinterpretq_s32_f64
+// CHECK-LABEL: test_vreinterpretq_s32_f64:
// CHECK-NEXT: ret
int32x4_t test_vreinterpretq_s32_f64(float64x2_t a) {
return vreinterpretq_s32_f64(a);
}
-// CHECK-LABEL: test_vreinterpretq_s32_p8
+// CHECK-LABEL: test_vreinterpretq_s32_p8:
// CHECK-NEXT: ret
int32x4_t test_vreinterpretq_s32_p8(poly8x16_t a) {
return vreinterpretq_s32_p8(a);
}
-// CHECK-LABEL: test_vreinterpretq_s32_p16
+// CHECK-LABEL: test_vreinterpretq_s32_p16:
// CHECK-NEXT: ret
int32x4_t test_vreinterpretq_s32_p16(poly16x8_t a) {
return vreinterpretq_s32_p16(a);
}
-// CHECK-LABEL: test_vreinterpretq_s32_p64
+// CHECK-LABEL: test_vreinterpretq_s32_p64:
// CHECK-NEXT: ret
int32x4_t test_vreinterpretq_s32_p64(poly64x2_t a) {
return vreinterpretq_s32_p64(a);
}
-// CHECK-LABEL: test_vreinterpretq_s64_s8
+// CHECK-LABEL: test_vreinterpretq_s64_s8:
// CHECK-NEXT: ret
int64x2_t test_vreinterpretq_s64_s8(int8x16_t a) {
return vreinterpretq_s64_s8(a);
}
-// CHECK-LABEL: test_vreinterpretq_s64_s16
+// CHECK-LABEL: test_vreinterpretq_s64_s16:
// CHECK-NEXT: ret
int64x2_t test_vreinterpretq_s64_s16(int16x8_t a) {
return vreinterpretq_s64_s16(a);
}
-// CHECK-LABEL: test_vreinterpretq_s64_s32
+// CHECK-LABEL: test_vreinterpretq_s64_s32:
// CHECK-NEXT: ret
int64x2_t test_vreinterpretq_s64_s32(int32x4_t a) {
return vreinterpretq_s64_s32(a);
}
-// CHECK-LABEL: test_vreinterpretq_s64_u8
+// CHECK-LABEL: test_vreinterpretq_s64_u8:
// CHECK-NEXT: ret
int64x2_t test_vreinterpretq_s64_u8(uint8x16_t a) {
return vreinterpretq_s64_u8(a);
}
-// CHECK-LABEL: test_vreinterpretq_s64_u16
+// CHECK-LABEL: test_vreinterpretq_s64_u16:
// CHECK-NEXT: ret
int64x2_t test_vreinterpretq_s64_u16(uint16x8_t a) {
return vreinterpretq_s64_u16(a);
}
-// CHECK-LABEL: test_vreinterpretq_s64_u32
+// CHECK-LABEL: test_vreinterpretq_s64_u32:
// CHECK-NEXT: ret
int64x2_t test_vreinterpretq_s64_u32(uint32x4_t a) {
return vreinterpretq_s64_u32(a);
}
-// CHECK-LABEL: test_vreinterpretq_s64_u64
+// CHECK-LABEL: test_vreinterpretq_s64_u64:
// CHECK-NEXT: ret
int64x2_t test_vreinterpretq_s64_u64(uint64x2_t a) {
return vreinterpretq_s64_u64(a);
}
-// CHECK-LABEL: test_vreinterpretq_s64_f16
+// CHECK-LABEL: test_vreinterpretq_s64_f16:
// CHECK-NEXT: ret
int64x2_t test_vreinterpretq_s64_f16(float16x8_t a) {
return vreinterpretq_s64_f16(a);
}
-// CHECK-LABEL: test_vreinterpretq_s64_f32
+// CHECK-LABEL: test_vreinterpretq_s64_f32:
// CHECK-NEXT: ret
int64x2_t test_vreinterpretq_s64_f32(float32x4_t a) {
return vreinterpretq_s64_f32(a);
}
-// CHECK-LABEL: test_vreinterpretq_s64_f64
+// CHECK-LABEL: test_vreinterpretq_s64_f64:
// CHECK-NEXT: ret
int64x2_t test_vreinterpretq_s64_f64(float64x2_t a) {
return vreinterpretq_s64_f64(a);
}
-// CHECK-LABEL: test_vreinterpretq_s64_p8
+// CHECK-LABEL: test_vreinterpretq_s64_p8:
// CHECK-NEXT: ret
int64x2_t test_vreinterpretq_s64_p8(poly8x16_t a) {
return vreinterpretq_s64_p8(a);
}
-// CHECK-LABEL: test_vreinterpretq_s64_p16
+// CHECK-LABEL: test_vreinterpretq_s64_p16:
// CHECK-NEXT: ret
int64x2_t test_vreinterpretq_s64_p16(poly16x8_t a) {
return vreinterpretq_s64_p16(a);
}
-// CHECK-LABEL: test_vreinterpretq_s64_p64
+// CHECK-LABEL: test_vreinterpretq_s64_p64:
// CHECK-NEXT: ret
int64x2_t test_vreinterpretq_s64_p64(poly64x2_t a) {
return vreinterpretq_s64_p64(a);
}
-// CHECK-LABEL: test_vreinterpretq_u8_s8
+// CHECK-LABEL: test_vreinterpretq_u8_s8:
// CHECK-NEXT: ret
uint8x16_t test_vreinterpretq_u8_s8(int8x16_t a) {
return vreinterpretq_u8_s8(a);
}
-// CHECK-LABEL: test_vreinterpretq_u8_s16
+// CHECK-LABEL: test_vreinterpretq_u8_s16:
// CHECK-NEXT: ret
uint8x16_t test_vreinterpretq_u8_s16(int16x8_t a) {
return vreinterpretq_u8_s16(a);
}
-// CHECK-LABEL: test_vreinterpretq_u8_s32
+// CHECK-LABEL: test_vreinterpretq_u8_s32:
// CHECK-NEXT: ret
uint8x16_t test_vreinterpretq_u8_s32(int32x4_t a) {
return vreinterpretq_u8_s32(a);
}
-// CHECK-LABEL: test_vreinterpretq_u8_s64
+// CHECK-LABEL: test_vreinterpretq_u8_s64:
// CHECK-NEXT: ret
uint8x16_t test_vreinterpretq_u8_s64(int64x2_t a) {
return vreinterpretq_u8_s64(a);
}
-// CHECK-LABEL: test_vreinterpretq_u8_u16
+// CHECK-LABEL: test_vreinterpretq_u8_u16:
// CHECK-NEXT: ret
uint8x16_t test_vreinterpretq_u8_u16(uint16x8_t a) {
return vreinterpretq_u8_u16(a);
}
-// CHECK-LABEL: test_vreinterpretq_u8_u32
+// CHECK-LABEL: test_vreinterpretq_u8_u32:
// CHECK-NEXT: ret
uint8x16_t test_vreinterpretq_u8_u32(uint32x4_t a) {
return vreinterpretq_u8_u32(a);
}
-// CHECK-LABEL: test_vreinterpretq_u8_u64
+// CHECK-LABEL: test_vreinterpretq_u8_u64:
// CHECK-NEXT: ret
uint8x16_t test_vreinterpretq_u8_u64(uint64x2_t a) {
return vreinterpretq_u8_u64(a);
}
-// CHECK-LABEL: test_vreinterpretq_u8_f16
+// CHECK-LABEL: test_vreinterpretq_u8_f16:
// CHECK-NEXT: ret
uint8x16_t test_vreinterpretq_u8_f16(float16x8_t a) {
return vreinterpretq_u8_f16(a);
}
-// CHECK-LABEL: test_vreinterpretq_u8_f32
+// CHECK-LABEL: test_vreinterpretq_u8_f32:
// CHECK-NEXT: ret
uint8x16_t test_vreinterpretq_u8_f32(float32x4_t a) {
return vreinterpretq_u8_f32(a);
}
-// CHECK-LABEL: test_vreinterpretq_u8_f64
+// CHECK-LABEL: test_vreinterpretq_u8_f64:
// CHECK-NEXT: ret
uint8x16_t test_vreinterpretq_u8_f64(float64x2_t a) {
return vreinterpretq_u8_f64(a);
}
-// CHECK-LABEL: test_vreinterpretq_u8_p8
+// CHECK-LABEL: test_vreinterpretq_u8_p8:
// CHECK-NEXT: ret
uint8x16_t test_vreinterpretq_u8_p8(poly8x16_t a) {
return vreinterpretq_u8_p8(a);
}
-// CHECK-LABEL: test_vreinterpretq_u8_p16
+// CHECK-LABEL: test_vreinterpretq_u8_p16:
// CHECK-NEXT: ret
uint8x16_t test_vreinterpretq_u8_p16(poly16x8_t a) {
return vreinterpretq_u8_p16(a);
}
-// CHECK-LABEL: test_vreinterpretq_u8_p64
+// CHECK-LABEL: test_vreinterpretq_u8_p64:
// CHECK-NEXT: ret
uint8x16_t test_vreinterpretq_u8_p64(poly64x2_t a) {
return vreinterpretq_u8_p64(a);
}
-// CHECK-LABEL: test_vreinterpretq_u16_s8
+// CHECK-LABEL: test_vreinterpretq_u16_s8:
// CHECK-NEXT: ret
uint16x8_t test_vreinterpretq_u16_s8(int8x16_t a) {
return vreinterpretq_u16_s8(a);
}
-// CHECK-LABEL: test_vreinterpretq_u16_s16
+// CHECK-LABEL: test_vreinterpretq_u16_s16:
// CHECK-NEXT: ret
uint16x8_t test_vreinterpretq_u16_s16(int16x8_t a) {
return vreinterpretq_u16_s16(a);
}
-// CHECK-LABEL: test_vreinterpretq_u16_s32
+// CHECK-LABEL: test_vreinterpretq_u16_s32:
// CHECK-NEXT: ret
uint16x8_t test_vreinterpretq_u16_s32(int32x4_t a) {
return vreinterpretq_u16_s32(a);
}
-// CHECK-LABEL: test_vreinterpretq_u16_s64
+// CHECK-LABEL: test_vreinterpretq_u16_s64:
// CHECK-NEXT: ret
uint16x8_t test_vreinterpretq_u16_s64(int64x2_t a) {
return vreinterpretq_u16_s64(a);
}
-// CHECK-LABEL: test_vreinterpretq_u16_u8
+// CHECK-LABEL: test_vreinterpretq_u16_u8:
// CHECK-NEXT: ret
uint16x8_t test_vreinterpretq_u16_u8(uint8x16_t a) {
return vreinterpretq_u16_u8(a);
}
-// CHECK-LABEL: test_vreinterpretq_u16_u32
+// CHECK-LABEL: test_vreinterpretq_u16_u32:
// CHECK-NEXT: ret
uint16x8_t test_vreinterpretq_u16_u32(uint32x4_t a) {
return vreinterpretq_u16_u32(a);
}
-// CHECK-LABEL: test_vreinterpretq_u16_u64
+// CHECK-LABEL: test_vreinterpretq_u16_u64:
// CHECK-NEXT: ret
uint16x8_t test_vreinterpretq_u16_u64(uint64x2_t a) {
return vreinterpretq_u16_u64(a);
}
-// CHECK-LABEL: test_vreinterpretq_u16_f16
+// CHECK-LABEL: test_vreinterpretq_u16_f16:
// CHECK-NEXT: ret
uint16x8_t test_vreinterpretq_u16_f16(float16x8_t a) {
return vreinterpretq_u16_f16(a);
}
-// CHECK-LABEL: test_vreinterpretq_u16_f32
+// CHECK-LABEL: test_vreinterpretq_u16_f32:
// CHECK-NEXT: ret
uint16x8_t test_vreinterpretq_u16_f32(float32x4_t a) {
return vreinterpretq_u16_f32(a);
}
-// CHECK-LABEL: test_vreinterpretq_u16_f64
+// CHECK-LABEL: test_vreinterpretq_u16_f64:
// CHECK-NEXT: ret
uint16x8_t test_vreinterpretq_u16_f64(float64x2_t a) {
return vreinterpretq_u16_f64(a);
}
-// CHECK-LABEL: test_vreinterpretq_u16_p8
+// CHECK-LABEL: test_vreinterpretq_u16_p8:
// CHECK-NEXT: ret
uint16x8_t test_vreinterpretq_u16_p8(poly8x16_t a) {
return vreinterpretq_u16_p8(a);
}
-// CHECK-LABEL: test_vreinterpretq_u16_p16
+// CHECK-LABEL: test_vreinterpretq_u16_p16:
// CHECK-NEXT: ret
uint16x8_t test_vreinterpretq_u16_p16(poly16x8_t a) {
return vreinterpretq_u16_p16(a);
}
-// CHECK-LABEL: test_vreinterpretq_u16_p64
+// CHECK-LABEL: test_vreinterpretq_u16_p64:
// CHECK-NEXT: ret
uint16x8_t test_vreinterpretq_u16_p64(poly64x2_t a) {
return vreinterpretq_u16_p64(a);
}
-// CHECK-LABEL: test_vreinterpretq_u32_s8
+// CHECK-LABEL: test_vreinterpretq_u32_s8:
// CHECK-NEXT: ret
uint32x4_t test_vreinterpretq_u32_s8(int8x16_t a) {
return vreinterpretq_u32_s8(a);
}
-// CHECK-LABEL: test_vreinterpretq_u32_s16
+// CHECK-LABEL: test_vreinterpretq_u32_s16:
// CHECK-NEXT: ret
uint32x4_t test_vreinterpretq_u32_s16(int16x8_t a) {
return vreinterpretq_u32_s16(a);
}
-// CHECK-LABEL: test_vreinterpretq_u32_s32
+// CHECK-LABEL: test_vreinterpretq_u32_s32:
// CHECK-NEXT: ret
uint32x4_t test_vreinterpretq_u32_s32(int32x4_t a) {
return vreinterpretq_u32_s32(a);
}
-// CHECK-LABEL: test_vreinterpretq_u32_s64
+// CHECK-LABEL: test_vreinterpretq_u32_s64:
// CHECK-NEXT: ret
uint32x4_t test_vreinterpretq_u32_s64(int64x2_t a) {
return vreinterpretq_u32_s64(a);
}
-// CHECK-LABEL: test_vreinterpretq_u32_u8
+// CHECK-LABEL: test_vreinterpretq_u32_u8:
// CHECK-NEXT: ret
uint32x4_t test_vreinterpretq_u32_u8(uint8x16_t a) {
return vreinterpretq_u32_u8(a);
}
-// CHECK-LABEL: test_vreinterpretq_u32_u16
+// CHECK-LABEL: test_vreinterpretq_u32_u16:
// CHECK-NEXT: ret
uint32x4_t test_vreinterpretq_u32_u16(uint16x8_t a) {
return vreinterpretq_u32_u16(a);
}
-// CHECK-LABEL: test_vreinterpretq_u32_u64
+// CHECK-LABEL: test_vreinterpretq_u32_u64:
// CHECK-NEXT: ret
uint32x4_t test_vreinterpretq_u32_u64(uint64x2_t a) {
return vreinterpretq_u32_u64(a);
}
-// CHECK-LABEL: test_vreinterpretq_u32_f16
+// CHECK-LABEL: test_vreinterpretq_u32_f16:
// CHECK-NEXT: ret
uint32x4_t test_vreinterpretq_u32_f16(float16x8_t a) {
return vreinterpretq_u32_f16(a);
}
-// CHECK-LABEL: test_vreinterpretq_u32_f32
+// CHECK-LABEL: test_vreinterpretq_u32_f32:
// CHECK-NEXT: ret
uint32x4_t test_vreinterpretq_u32_f32(float32x4_t a) {
return vreinterpretq_u32_f32(a);
}
-// CHECK-LABEL: test_vreinterpretq_u32_f64
+// CHECK-LABEL: test_vreinterpretq_u32_f64:
// CHECK-NEXT: ret
uint32x4_t test_vreinterpretq_u32_f64(float64x2_t a) {
return vreinterpretq_u32_f64(a);
}
-// CHECK-LABEL: test_vreinterpretq_u32_p8
+// CHECK-LABEL: test_vreinterpretq_u32_p8:
// CHECK-NEXT: ret
uint32x4_t test_vreinterpretq_u32_p8(poly8x16_t a) {
return vreinterpretq_u32_p8(a);
}
-// CHECK-LABEL: test_vreinterpretq_u32_p16
+// CHECK-LABEL: test_vreinterpretq_u32_p16:
// CHECK-NEXT: ret
uint32x4_t test_vreinterpretq_u32_p16(poly16x8_t a) {
return vreinterpretq_u32_p16(a);
}
-// CHECK-LABEL: test_vreinterpretq_u32_p64
+// CHECK-LABEL: test_vreinterpretq_u32_p64:
// CHECK-NEXT: ret
uint32x4_t test_vreinterpretq_u32_p64(poly64x2_t a) {
return vreinterpretq_u32_p64(a);
}
-// CHECK-LABEL: test_vreinterpretq_u64_s8
+// CHECK-LABEL: test_vreinterpretq_u64_s8:
// CHECK-NEXT: ret
uint64x2_t test_vreinterpretq_u64_s8(int8x16_t a) {
return vreinterpretq_u64_s8(a);
}
-// CHECK-LABEL: test_vreinterpretq_u64_s16
+// CHECK-LABEL: test_vreinterpretq_u64_s16:
// CHECK-NEXT: ret
uint64x2_t test_vreinterpretq_u64_s16(int16x8_t a) {
return vreinterpretq_u64_s16(a);
}
-// CHECK-LABEL: test_vreinterpretq_u64_s32
+// CHECK-LABEL: test_vreinterpretq_u64_s32:
// CHECK-NEXT: ret
uint64x2_t test_vreinterpretq_u64_s32(int32x4_t a) {
return vreinterpretq_u64_s32(a);
}
-// CHECK-LABEL: test_vreinterpretq_u64_s64
+// CHECK-LABEL: test_vreinterpretq_u64_s64:
// CHECK-NEXT: ret
uint64x2_t test_vreinterpretq_u64_s64(int64x2_t a) {
return vreinterpretq_u64_s64(a);
}
-// CHECK-LABEL: test_vreinterpretq_u64_u8
+// CHECK-LABEL: test_vreinterpretq_u64_u8:
// CHECK-NEXT: ret
uint64x2_t test_vreinterpretq_u64_u8(uint8x16_t a) {
return vreinterpretq_u64_u8(a);
}
-// CHECK-LABEL: test_vreinterpretq_u64_u16
+// CHECK-LABEL: test_vreinterpretq_u64_u16:
// CHECK-NEXT: ret
uint64x2_t test_vreinterpretq_u64_u16(uint16x8_t a) {
return vreinterpretq_u64_u16(a);
}
-// CHECK-LABEL: test_vreinterpretq_u64_u32
+// CHECK-LABEL: test_vreinterpretq_u64_u32:
// CHECK-NEXT: ret
uint64x2_t test_vreinterpretq_u64_u32(uint32x4_t a) {
return vreinterpretq_u64_u32(a);
}
-// CHECK-LABEL: test_vreinterpretq_u64_f16
+// CHECK-LABEL: test_vreinterpretq_u64_f16:
// CHECK-NEXT: ret
uint64x2_t test_vreinterpretq_u64_f16(float16x8_t a) {
return vreinterpretq_u64_f16(a);
}
-// CHECK-LABEL: test_vreinterpretq_u64_f32
+// CHECK-LABEL: test_vreinterpretq_u64_f32:
// CHECK-NEXT: ret
uint64x2_t test_vreinterpretq_u64_f32(float32x4_t a) {
return vreinterpretq_u64_f32(a);
}
-// CHECK-LABEL: test_vreinterpretq_u64_f64
+// CHECK-LABEL: test_vreinterpretq_u64_f64:
// CHECK-NEXT: ret
uint64x2_t test_vreinterpretq_u64_f64(float64x2_t a) {
return vreinterpretq_u64_f64(a);
}
-// CHECK-LABEL: test_vreinterpretq_u64_p8
+// CHECK-LABEL: test_vreinterpretq_u64_p8:
// CHECK-NEXT: ret
uint64x2_t test_vreinterpretq_u64_p8(poly8x16_t a) {
return vreinterpretq_u64_p8(a);
}
-// CHECK-LABEL: test_vreinterpretq_u64_p16
+// CHECK-LABEL: test_vreinterpretq_u64_p16:
// CHECK-NEXT: ret
uint64x2_t test_vreinterpretq_u64_p16(poly16x8_t a) {
return vreinterpretq_u64_p16(a);
}
-// CHECK-LABEL: test_vreinterpretq_u64_p64
+// CHECK-LABEL: test_vreinterpretq_u64_p64:
// CHECK-NEXT: ret
uint64x2_t test_vreinterpretq_u64_p64(poly64x2_t a) {
return vreinterpretq_u64_p64(a);
}
-// CHECK-LABEL: test_vreinterpretq_f16_s8
+// CHECK-LABEL: test_vreinterpretq_f16_s8:
// CHECK-NEXT: ret
float16x8_t test_vreinterpretq_f16_s8(int8x16_t a) {
return vreinterpretq_f16_s8(a);
}
-// CHECK-LABEL: test_vreinterpretq_f16_s16
+// CHECK-LABEL: test_vreinterpretq_f16_s16:
// CHECK-NEXT: ret
float16x8_t test_vreinterpretq_f16_s16(int16x8_t a) {
return vreinterpretq_f16_s16(a);
}
-// CHECK-LABEL: test_vreinterpretq_f16_s32
+// CHECK-LABEL: test_vreinterpretq_f16_s32:
// CHECK-NEXT: ret
float16x8_t test_vreinterpretq_f16_s32(int32x4_t a) {
return vreinterpretq_f16_s32(a);
}
-// CHECK-LABEL: test_vreinterpretq_f16_s64
+// CHECK-LABEL: test_vreinterpretq_f16_s64:
// CHECK-NEXT: ret
float16x8_t test_vreinterpretq_f16_s64(int64x2_t a) {
return vreinterpretq_f16_s64(a);
}
-// CHECK-LABEL: test_vreinterpretq_f16_u8
+// CHECK-LABEL: test_vreinterpretq_f16_u8:
// CHECK-NEXT: ret
float16x8_t test_vreinterpretq_f16_u8(uint8x16_t a) {
return vreinterpretq_f16_u8(a);
}
-// CHECK-LABEL: test_vreinterpretq_f16_u16
+// CHECK-LABEL: test_vreinterpretq_f16_u16:
// CHECK-NEXT: ret
float16x8_t test_vreinterpretq_f16_u16(uint16x8_t a) {
return vreinterpretq_f16_u16(a);
}
-// CHECK-LABEL: test_vreinterpretq_f16_u32
+// CHECK-LABEL: test_vreinterpretq_f16_u32:
// CHECK-NEXT: ret
float16x8_t test_vreinterpretq_f16_u32(uint32x4_t a) {
return vreinterpretq_f16_u32(a);
}
-// CHECK-LABEL: test_vreinterpretq_f16_u64
+// CHECK-LABEL: test_vreinterpretq_f16_u64:
// CHECK-NEXT: ret
float16x8_t test_vreinterpretq_f16_u64(uint64x2_t a) {
return vreinterpretq_f16_u64(a);
}
-// CHECK-LABEL: test_vreinterpretq_f16_f32
+// CHECK-LABEL: test_vreinterpretq_f16_f32:
// CHECK-NEXT: ret
float16x8_t test_vreinterpretq_f16_f32(float32x4_t a) {
return vreinterpretq_f16_f32(a);
}
-// CHECK-LABEL: test_vreinterpretq_f16_f64
+// CHECK-LABEL: test_vreinterpretq_f16_f64:
// CHECK-NEXT: ret
float16x8_t test_vreinterpretq_f16_f64(float64x2_t a) {
return vreinterpretq_f16_f64(a);
}
-// CHECK-LABEL: test_vreinterpretq_f16_p8
+// CHECK-LABEL: test_vreinterpretq_f16_p8:
// CHECK-NEXT: ret
float16x8_t test_vreinterpretq_f16_p8(poly8x16_t a) {
return vreinterpretq_f16_p8(a);
}
-// CHECK-LABEL: test_vreinterpretq_f16_p16
+// CHECK-LABEL: test_vreinterpretq_f16_p16:
// CHECK-NEXT: ret
float16x8_t test_vreinterpretq_f16_p16(poly16x8_t a) {
return vreinterpretq_f16_p16(a);
}
-// CHECK-LABEL: test_vreinterpretq_f16_p64
+// CHECK-LABEL: test_vreinterpretq_f16_p64:
// CHECK-NEXT: ret
float16x8_t test_vreinterpretq_f16_p64(poly64x2_t a) {
return vreinterpretq_f16_p64(a);
}
-// CHECK-LABEL: test_vreinterpretq_f32_s8
+// CHECK-LABEL: test_vreinterpretq_f32_s8:
// CHECK-NEXT: ret
float32x4_t test_vreinterpretq_f32_s8(int8x16_t a) {
return vreinterpretq_f32_s8(a);
}
-// CHECK-LABEL: test_vreinterpretq_f32_s16
+// CHECK-LABEL: test_vreinterpretq_f32_s16:
// CHECK-NEXT: ret
float32x4_t test_vreinterpretq_f32_s16(int16x8_t a) {
return vreinterpretq_f32_s16(a);
}
-// CHECK-LABEL: test_vreinterpretq_f32_s32
+// CHECK-LABEL: test_vreinterpretq_f32_s32:
// CHECK-NEXT: ret
float32x4_t test_vreinterpretq_f32_s32(int32x4_t a) {
return vreinterpretq_f32_s32(a);
}
-// CHECK-LABEL: test_vreinterpretq_f32_s64
+// CHECK-LABEL: test_vreinterpretq_f32_s64:
// CHECK-NEXT: ret
float32x4_t test_vreinterpretq_f32_s64(int64x2_t a) {
return vreinterpretq_f32_s64(a);
}
-// CHECK-LABEL: test_vreinterpretq_f32_u8
+// CHECK-LABEL: test_vreinterpretq_f32_u8:
// CHECK-NEXT: ret
float32x4_t test_vreinterpretq_f32_u8(uint8x16_t a) {
return vreinterpretq_f32_u8(a);
}
-// CHECK-LABEL: test_vreinterpretq_f32_u16
+// CHECK-LABEL: test_vreinterpretq_f32_u16:
// CHECK-NEXT: ret
float32x4_t test_vreinterpretq_f32_u16(uint16x8_t a) {
return vreinterpretq_f32_u16(a);
}
-// CHECK-LABEL: test_vreinterpretq_f32_u32
+// CHECK-LABEL: test_vreinterpretq_f32_u32:
// CHECK-NEXT: ret
float32x4_t test_vreinterpretq_f32_u32(uint32x4_t a) {
return vreinterpretq_f32_u32(a);
}
-// CHECK-LABEL: test_vreinterpretq_f32_u64
+// CHECK-LABEL: test_vreinterpretq_f32_u64:
// CHECK-NEXT: ret
float32x4_t test_vreinterpretq_f32_u64(uint64x2_t a) {
return vreinterpretq_f32_u64(a);
}
-// CHECK-LABEL: test_vreinterpretq_f32_f16
+// CHECK-LABEL: test_vreinterpretq_f32_f16:
// CHECK-NEXT: ret
float32x4_t test_vreinterpretq_f32_f16(float16x8_t a) {
return vreinterpretq_f32_f16(a);
}
-// CHECK-LABEL: test_vreinterpretq_f32_f64
+// CHECK-LABEL: test_vreinterpretq_f32_f64:
// CHECK-NEXT: ret
float32x4_t test_vreinterpretq_f32_f64(float64x2_t a) {
return vreinterpretq_f32_f64(a);
}
-// CHECK-LABEL: test_vreinterpretq_f32_p8
+// CHECK-LABEL: test_vreinterpretq_f32_p8:
// CHECK-NEXT: ret
float32x4_t test_vreinterpretq_f32_p8(poly8x16_t a) {
return vreinterpretq_f32_p8(a);
}
-// CHECK-LABEL: test_vreinterpretq_f32_p16
+// CHECK-LABEL: test_vreinterpretq_f32_p16:
// CHECK-NEXT: ret
float32x4_t test_vreinterpretq_f32_p16(poly16x8_t a) {
return vreinterpretq_f32_p16(a);
}
-// CHECK-LABEL: test_vreinterpretq_f32_p64
+// CHECK-LABEL: test_vreinterpretq_f32_p64:
// CHECK-NEXT: ret
float32x4_t test_vreinterpretq_f32_p64(poly64x2_t a) {
return vreinterpretq_f32_p64(a);
}
-// CHECK-LABEL: test_vreinterpretq_f64_s8
+// CHECK-LABEL: test_vreinterpretq_f64_s8:
// CHECK-NEXT: ret
float64x2_t test_vreinterpretq_f64_s8(int8x16_t a) {
return vreinterpretq_f64_s8(a);
}
-// CHECK-LABEL: test_vreinterpretq_f64_s16
+// CHECK-LABEL: test_vreinterpretq_f64_s16:
// CHECK-NEXT: ret
float64x2_t test_vreinterpretq_f64_s16(int16x8_t a) {
return vreinterpretq_f64_s16(a);
}
-// CHECK-LABEL: test_vreinterpretq_f64_s32
+// CHECK-LABEL: test_vreinterpretq_f64_s32:
// CHECK-NEXT: ret
float64x2_t test_vreinterpretq_f64_s32(int32x4_t a) {
return vreinterpretq_f64_s32(a);
}
-// CHECK-LABEL: test_vreinterpretq_f64_s64
+// CHECK-LABEL: test_vreinterpretq_f64_s64:
// CHECK-NEXT: ret
float64x2_t test_vreinterpretq_f64_s64(int64x2_t a) {
return vreinterpretq_f64_s64(a);
}
-// CHECK-LABEL: test_vreinterpretq_f64_u8
+// CHECK-LABEL: test_vreinterpretq_f64_u8:
// CHECK-NEXT: ret
float64x2_t test_vreinterpretq_f64_u8(uint8x16_t a) {
return vreinterpretq_f64_u8(a);
}
-// CHECK-LABEL: test_vreinterpretq_f64_u16
+// CHECK-LABEL: test_vreinterpretq_f64_u16:
// CHECK-NEXT: ret
float64x2_t test_vreinterpretq_f64_u16(uint16x8_t a) {
return vreinterpretq_f64_u16(a);
}
-// CHECK-LABEL: test_vreinterpretq_f64_u32
+// CHECK-LABEL: test_vreinterpretq_f64_u32:
// CHECK-NEXT: ret
float64x2_t test_vreinterpretq_f64_u32(uint32x4_t a) {
return vreinterpretq_f64_u32(a);
}
-// CHECK-LABEL: test_vreinterpretq_f64_u64
+// CHECK-LABEL: test_vreinterpretq_f64_u64:
// CHECK-NEXT: ret
float64x2_t test_vreinterpretq_f64_u64(uint64x2_t a) {
return vreinterpretq_f64_u64(a);
}
-// CHECK-LABEL: test_vreinterpretq_f64_f16
+// CHECK-LABEL: test_vreinterpretq_f64_f16:
// CHECK-NEXT: ret
float64x2_t test_vreinterpretq_f64_f16(float16x8_t a) {
return vreinterpretq_f64_f16(a);
}
-// CHECK-LABEL: test_vreinterpretq_f64_f32
+// CHECK-LABEL: test_vreinterpretq_f64_f32:
// CHECK-NEXT: ret
float64x2_t test_vreinterpretq_f64_f32(float32x4_t a) {
return vreinterpretq_f64_f32(a);
}
-// CHECK-LABEL: test_vreinterpretq_f64_p8
+// CHECK-LABEL: test_vreinterpretq_f64_p8:
// CHECK-NEXT: ret
float64x2_t test_vreinterpretq_f64_p8(poly8x16_t a) {
return vreinterpretq_f64_p8(a);
}
-// CHECK-LABEL: test_vreinterpretq_f64_p16
+// CHECK-LABEL: test_vreinterpretq_f64_p16:
// CHECK-NEXT: ret
float64x2_t test_vreinterpretq_f64_p16(poly16x8_t a) {
return vreinterpretq_f64_p16(a);
}
-// CHECK-LABEL: test_vreinterpretq_f64_p64
+// CHECK-LABEL: test_vreinterpretq_f64_p64:
// CHECK-NEXT: ret
float64x2_t test_vreinterpretq_f64_p64(poly64x2_t a) {
return vreinterpretq_f64_p64(a);
}
-// CHECK-LABEL: test_vreinterpretq_p8_s8
+// CHECK-LABEL: test_vreinterpretq_p8_s8:
// CHECK-NEXT: ret
poly8x16_t test_vreinterpretq_p8_s8(int8x16_t a) {
return vreinterpretq_p8_s8(a);
}
-// CHECK-LABEL: test_vreinterpretq_p8_s16
+// CHECK-LABEL: test_vreinterpretq_p8_s16:
// CHECK-NEXT: ret
poly8x16_t test_vreinterpretq_p8_s16(int16x8_t a) {
return vreinterpretq_p8_s16(a);
}
-// CHECK-LABEL: test_vreinterpretq_p8_s32
+// CHECK-LABEL: test_vreinterpretq_p8_s32:
// CHECK-NEXT: ret
poly8x16_t test_vreinterpretq_p8_s32(int32x4_t a) {
return vreinterpretq_p8_s32(a);
}
-// CHECK-LABEL: test_vreinterpretq_p8_s64
+// CHECK-LABEL: test_vreinterpretq_p8_s64:
// CHECK-NEXT: ret
poly8x16_t test_vreinterpretq_p8_s64(int64x2_t a) {
return vreinterpretq_p8_s64(a);
}
-// CHECK-LABEL: test_vreinterpretq_p8_u8
+// CHECK-LABEL: test_vreinterpretq_p8_u8:
// CHECK-NEXT: ret
poly8x16_t test_vreinterpretq_p8_u8(uint8x16_t a) {
return vreinterpretq_p8_u8(a);
}
-// CHECK-LABEL: test_vreinterpretq_p8_u16
+// CHECK-LABEL: test_vreinterpretq_p8_u16:
// CHECK-NEXT: ret
poly8x16_t test_vreinterpretq_p8_u16(uint16x8_t a) {
return vreinterpretq_p8_u16(a);
}
-// CHECK-LABEL: test_vreinterpretq_p8_u32
+// CHECK-LABEL: test_vreinterpretq_p8_u32:
// CHECK-NEXT: ret
poly8x16_t test_vreinterpretq_p8_u32(uint32x4_t a) {
return vreinterpretq_p8_u32(a);
}
-// CHECK-LABEL: test_vreinterpretq_p8_u64
+// CHECK-LABEL: test_vreinterpretq_p8_u64:
// CHECK-NEXT: ret
poly8x16_t test_vreinterpretq_p8_u64(uint64x2_t a) {
return vreinterpretq_p8_u64(a);
}
-// CHECK-LABEL: test_vreinterpretq_p8_f16
+// CHECK-LABEL: test_vreinterpretq_p8_f16:
// CHECK-NEXT: ret
poly8x16_t test_vreinterpretq_p8_f16(float16x8_t a) {
return vreinterpretq_p8_f16(a);
}
-// CHECK-LABEL: test_vreinterpretq_p8_f32
+// CHECK-LABEL: test_vreinterpretq_p8_f32:
// CHECK-NEXT: ret
poly8x16_t test_vreinterpretq_p8_f32(float32x4_t a) {
return vreinterpretq_p8_f32(a);
}
-// CHECK-LABEL: test_vreinterpretq_p8_f64
+// CHECK-LABEL: test_vreinterpretq_p8_f64:
// CHECK-NEXT: ret
poly8x16_t test_vreinterpretq_p8_f64(float64x2_t a) {
return vreinterpretq_p8_f64(a);
}
-// CHECK-LABEL: test_vreinterpretq_p8_p16
+// CHECK-LABEL: test_vreinterpretq_p8_p16:
// CHECK-NEXT: ret
poly8x16_t test_vreinterpretq_p8_p16(poly16x8_t a) {
return vreinterpretq_p8_p16(a);
}
-// CHECK-LABEL: test_vreinterpretq_p8_p64
+// CHECK-LABEL: test_vreinterpretq_p8_p64:
// CHECK-NEXT: ret
poly8x16_t test_vreinterpretq_p8_p64(poly64x2_t a) {
return vreinterpretq_p8_p64(a);
}
-// CHECK-LABEL: test_vreinterpretq_p16_s8
+// CHECK-LABEL: test_vreinterpretq_p16_s8:
// CHECK-NEXT: ret
poly16x8_t test_vreinterpretq_p16_s8(int8x16_t a) {
return vreinterpretq_p16_s8(a);
}
-// CHECK-LABEL: test_vreinterpretq_p16_s16
+// CHECK-LABEL: test_vreinterpretq_p16_s16:
// CHECK-NEXT: ret
poly16x8_t test_vreinterpretq_p16_s16(int16x8_t a) {
return vreinterpretq_p16_s16(a);
}
-// CHECK-LABEL: test_vreinterpretq_p16_s32
+// CHECK-LABEL: test_vreinterpretq_p16_s32:
// CHECK-NEXT: ret
poly16x8_t test_vreinterpretq_p16_s32(int32x4_t a) {
return vreinterpretq_p16_s32(a);
}
-// CHECK-LABEL: test_vreinterpretq_p16_s64
+// CHECK-LABEL: test_vreinterpretq_p16_s64:
// CHECK-NEXT: ret
poly16x8_t test_vreinterpretq_p16_s64(int64x2_t a) {
return vreinterpretq_p16_s64(a);
}
-// CHECK-LABEL: test_vreinterpretq_p16_u8
+// CHECK-LABEL: test_vreinterpretq_p16_u8:
// CHECK-NEXT: ret
poly16x8_t test_vreinterpretq_p16_u8(uint8x16_t a) {
return vreinterpretq_p16_u8(a);
}
-// CHECK-LABEL: test_vreinterpretq_p16_u16
+// CHECK-LABEL: test_vreinterpretq_p16_u16:
// CHECK-NEXT: ret
poly16x8_t test_vreinterpretq_p16_u16(uint16x8_t a) {
return vreinterpretq_p16_u16(a);
}
-// CHECK-LABEL: test_vreinterpretq_p16_u32
+// CHECK-LABEL: test_vreinterpretq_p16_u32:
// CHECK-NEXT: ret
poly16x8_t test_vreinterpretq_p16_u32(uint32x4_t a) {
return vreinterpretq_p16_u32(a);
}
-// CHECK-LABEL: test_vreinterpretq_p16_u64
+// CHECK-LABEL: test_vreinterpretq_p16_u64:
// CHECK-NEXT: ret
poly16x8_t test_vreinterpretq_p16_u64(uint64x2_t a) {
return vreinterpretq_p16_u64(a);
}
-// CHECK-LABEL: test_vreinterpretq_p16_f16
+// CHECK-LABEL: test_vreinterpretq_p16_f16:
// CHECK-NEXT: ret
poly16x8_t test_vreinterpretq_p16_f16(float16x8_t a) {
return vreinterpretq_p16_f16(a);
}
-// CHECK-LABEL: test_vreinterpretq_p16_f32
+// CHECK-LABEL: test_vreinterpretq_p16_f32:
// CHECK-NEXT: ret
poly16x8_t test_vreinterpretq_p16_f32(float32x4_t a) {
return vreinterpretq_p16_f32(a);
}
-// CHECK-LABEL: test_vreinterpretq_p16_f64
+// CHECK-LABEL: test_vreinterpretq_p16_f64:
// CHECK-NEXT: ret
poly16x8_t test_vreinterpretq_p16_f64(float64x2_t a) {
return vreinterpretq_p16_f64(a);
}
-// CHECK-LABEL: test_vreinterpretq_p16_p8
+// CHECK-LABEL: test_vreinterpretq_p16_p8:
// CHECK-NEXT: ret
poly16x8_t test_vreinterpretq_p16_p8(poly8x16_t a) {
return vreinterpretq_p16_p8(a);
}
-// CHECK-LABEL: test_vreinterpretq_p16_p64
+// CHECK-LABEL: test_vreinterpretq_p16_p64:
// CHECK-NEXT: ret
poly16x8_t test_vreinterpretq_p16_p64(poly64x2_t a) {
return vreinterpretq_p16_p64(a);
}
-// CHECK-LABEL: test_vreinterpretq_p64_s8
+// CHECK-LABEL: test_vreinterpretq_p64_s8:
// CHECK-NEXT: ret
poly64x2_t test_vreinterpretq_p64_s8(int8x16_t a) {
return vreinterpretq_p64_s8(a);
}
-// CHECK-LABEL: test_vreinterpretq_p64_s16
+// CHECK-LABEL: test_vreinterpretq_p64_s16:
// CHECK-NEXT: ret
poly64x2_t test_vreinterpretq_p64_s16(int16x8_t a) {
return vreinterpretq_p64_s16(a);
}
-// CHECK-LABEL: test_vreinterpretq_p64_s32
+// CHECK-LABEL: test_vreinterpretq_p64_s32:
// CHECK-NEXT: ret
poly64x2_t test_vreinterpretq_p64_s32(int32x4_t a) {
return vreinterpretq_p64_s32(a);
}
-// CHECK-LABEL: test_vreinterpretq_p64_s64
+// CHECK-LABEL: test_vreinterpretq_p64_s64:
// CHECK-NEXT: ret
poly64x2_t test_vreinterpretq_p64_s64(int64x2_t a) {
return vreinterpretq_p64_s64(a);
}
-// CHECK-LABEL: test_vreinterpretq_p64_u8
+// CHECK-LABEL: test_vreinterpretq_p64_u8:
// CHECK-NEXT: ret
poly64x2_t test_vreinterpretq_p64_u8(uint8x16_t a) {
return vreinterpretq_p64_u8(a);
}
-// CHECK-LABEL: test_vreinterpretq_p64_u16
+// CHECK-LABEL: test_vreinterpretq_p64_u16:
// CHECK-NEXT: ret
poly64x2_t test_vreinterpretq_p64_u16(uint16x8_t a) {
return vreinterpretq_p64_u16(a);
}
-// CHECK-LABEL: test_vreinterpretq_p64_u32
+// CHECK-LABEL: test_vreinterpretq_p64_u32:
// CHECK-NEXT: ret
poly64x2_t test_vreinterpretq_p64_u32(uint32x4_t a) {
return vreinterpretq_p64_u32(a);
}
-// CHECK-LABEL: test_vreinterpretq_p64_u64
+// CHECK-LABEL: test_vreinterpretq_p64_u64:
// CHECK-NEXT: ret
poly64x2_t test_vreinterpretq_p64_u64(uint64x2_t a) {
return vreinterpretq_p64_u64(a);
}
-// CHECK-LABEL: test_vreinterpretq_p64_f16
+// CHECK-LABEL: test_vreinterpretq_p64_f16:
// CHECK-NEXT: ret
poly64x2_t test_vreinterpretq_p64_f16(float16x8_t a) {
return vreinterpretq_p64_f16(a);
}
-// CHECK-LABEL: test_vreinterpretq_p64_f32
+// CHECK-LABEL: test_vreinterpretq_p64_f32:
// CHECK-NEXT: ret
poly64x2_t test_vreinterpretq_p64_f32(float32x4_t a) {
return vreinterpretq_p64_f32(a);
}
-// CHECK-LABEL: test_vreinterpretq_p64_f64
+// CHECK-LABEL: test_vreinterpretq_p64_f64:
// CHECK-NEXT: ret
poly64x2_t test_vreinterpretq_p64_f64(float64x2_t a) {
return vreinterpretq_p64_f64(a);
}
-// CHECK-LABEL: test_vreinterpretq_p64_p8
+// CHECK-LABEL: test_vreinterpretq_p64_p8:
// CHECK-NEXT: ret
poly64x2_t test_vreinterpretq_p64_p8(poly8x16_t a) {
return vreinterpretq_p64_p8(a);
}
-// CHECK-LABEL: test_vreinterpretq_p64_p16
+// CHECK-LABEL: test_vreinterpretq_p64_p16:
// CHECK-NEXT: ret
poly64x2_t test_vreinterpretq_p64_p16(poly16x8_t a) {
return vreinterpretq_p64_p16(a);
@@ -11345,6 +11273,48 @@ uint64x1_t test_vsqadd_u64(uint64x1_t a, int64x1_t b) {
// CHECK: usqadd d{{[0-9]+}}, d{{[0-9]+}}
}
+uint8x8_t test_vsqadd_u8(uint8x8_t a, int8x8_t b) {
+ // CHECK-LABEL: test_vsqadd_u8
+ return vsqadd_u8(a, b);
+ // CHECK: usqadd {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
+}
+
+uint8x16_t test_vsqaddq_u8(uint8x16_t a, int8x16_t b) {
+ // CHECK-LABEL: test_vsqaddq_u8
+ return vsqaddq_u8(a, b);
+ // CHECK: usqadd {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
+}
+
+uint16x4_t test_vsqadd_u16(uint16x4_t a, int16x4_t b) {
+ // CHECK-LABEL: test_vsqadd_u16
+ return vsqadd_u16(a, b);
+ // CHECK: usqadd {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
+}
+
+uint16x8_t test_vsqaddq_u16(uint16x8_t a, int16x8_t b) {
+ // CHECK-LABEL: test_vsqaddq_u16
+ return vsqaddq_u16(a, b);
+ // CHECK: usqadd {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
+}
+
+uint32x2_t test_vsqadd_u32(uint32x2_t a, int32x2_t b) {
+ // CHECK-LABEL: test_vsqadd_u32
+ return vsqadd_u32(a, b);
+ // CHECK: usqadd {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+uint32x4_t test_vsqaddq_u32(uint32x4_t a, int32x4_t b) {
+ // CHECK-LABEL: test_vsqaddq_u32
+ return vsqaddq_u32(a, b);
+ // CHECK: usqadd {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
+}
+
+uint64x2_t test_vsqaddq_u64(uint64x2_t a, int64x2_t b) {
+ // CHECK-LABEL: test_vsqaddq_u64
+ return vsqaddq_u64(a, b);
+ // CHECK: usqadd {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
+}
+
int64x1_t test_vabs_s64(int64x1_t a) {
// CHECK-LABEL: test_vabs_s64
return vabs_s64(a);
@@ -11559,13 +11529,13 @@ float64x1_t test_vneg_f64(float64x1_t a) {
int64x1_t test_vcvt_s64_f64(float64x1_t a) {
// CHECK-LABEL: test_vcvt_s64_f64
return vcvt_s64_f64(a);
- // CHECK: fcvtzs d{{[0-9]+}}, d{{[0-9]+}}
+ // CHECK: fcvtzs {{[xd][0-9]+}}, d{{[0-9]+}}
}
uint64x1_t test_vcvt_u64_f64(float64x1_t a) {
// CHECK-LABEL: test_vcvt_u64_f64
return vcvt_u64_f64(a);
- // CHECK: fcvtzu d{{[0-9]+}}, d{{[0-9]+}}
+ // CHECK: fcvtzu {{[xd][0-9]+}}, d{{[0-9]+}}
}
int64x1_t test_vcvtn_s64_f64(float64x1_t a) {
@@ -11619,13 +11589,13 @@ uint64x1_t test_vcvta_u64_f64(float64x1_t a) {
float64x1_t test_vcvt_f64_s64(int64x1_t a) {
// CHECK-LABEL: test_vcvt_f64_s64
return vcvt_f64_s64(a);
- // CHECK: scvtf d{{[0-9]+}}, d{{[0-9]+}}
+ // CHECK: scvtf d{{[0-9]+}}, {{[xd][0-9]+}}
}
float64x1_t test_vcvt_f64_u64(uint64x1_t a) {
// CHECK-LABEL: test_vcvt_f64_u64
return vcvt_f64_u64(a);
- // CHECK: ucvtf d{{[0-9]+}}, d{{[0-9]+}}
+ // CHECK: ucvtf d{{[0-9]+}}, {{[xd][0-9]+}}
}
int64x1_t test_vcvt_n_s64_f64(float64x1_t a) {
@@ -11723,3 +11693,51 @@ float64x1_t test_vrsqrts_f64(float64x1_t a, float64x1_t b) {
return vrsqrts_f64(a, b);
// CHECK: frsqrts d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
}
+
+int32_t test_vminv_s32(int32x2_t a) {
+ // CHECK-LABEL: test_vminv_s32
+ return vminv_s32(a);
+ // CHECK: sminp {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+uint32_t test_vminv_u32(uint32x2_t a) {
+ // CHECK-LABEL: test_vminv_u32
+ return vminv_u32(a);
+ // CHECK: uminp {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+int32_t test_vmaxv_s32(int32x2_t a) {
+ // CHECK-LABEL: test_vmaxv_s32
+ return vmaxv_s32(a);
+ // CHECK: smaxp {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+uint32_t test_vmaxv_u32(uint32x2_t a) {
+ // CHECK-LABEL: test_vmaxv_u32
+ return vmaxv_u32(a);
+ // CHECK: umaxp {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+int32_t test_vaddv_s32(int32x2_t a) {
+ // CHECK-LABEL: test_vaddv_s32
+ return vaddv_s32(a);
+ // CHECK: addp {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+uint32_t test_vaddv_u32(uint32x2_t a) {
+ // CHECK-LABEL: test_vaddv_u32
+ return vaddv_u32(a);
+ // CHECK: addp {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, {{v[0-9]+}}.2s
+}
+
+int64_t test_vaddlv_s32(int32x2_t a) {
+ // CHECK-LABEL: test_vaddlv_s32
+ return vaddlv_s32(a);
+ // CHECK: saddlp {{v[0-9]+}}.1d, {{v[0-9]+}}.2s
+}
+
+uint64_t test_vaddlv_u32(uint32x2_t a) {
+ // CHECK-LABEL: test_vaddlv_u32
+ return vaddlv_u32(a);
+ // CHECK: uaddlp {{v[0-9]+}}.1d, {{v[0-9]+}}.2s
+}
diff --git a/test/CodeGen/aarch64-neon-ldst-one.c b/test/CodeGen/aarch64-neon-ldst-one.c
index f629260dc8ee..dc888c2cf72d 100644
--- a/test/CodeGen/aarch64-neon-ldst-one.c
+++ b/test/CodeGen/aarch64-neon-ldst-one.c
@@ -1,2047 +1,2049 @@
// REQUIRES: aarch64-registered-target
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
// RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s
#include <arm_neon.h>
-uint8x16_t test_vld1q_dup_u8(uint8_t const *a) {
+uint8x16_t test_vld1q_dup_u8(uint8_t *a) {
// CHECK-LABEL: test_vld1q_dup_u8
return vld1q_dup_u8(a);
- // CHECK: ld1r {v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1r {{{ *v[0-9]+.16b *}}}, [{{x[0-9]+|sp}}]
}
-uint16x8_t test_vld1q_dup_u16(uint16_t const *a) {
+uint16x8_t test_vld1q_dup_u16(uint16_t *a) {
// CHECK-LABEL: test_vld1q_dup_u16
return vld1q_dup_u16(a);
- // CHECK: ld1r {v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1r {{{ *v[0-9]+.8h *}}}, [{{x[0-9]+|sp}}]
}
-uint32x4_t test_vld1q_dup_u32(uint32_t const *a) {
+uint32x4_t test_vld1q_dup_u32(uint32_t *a) {
// CHECK-LABEL: test_vld1q_dup_u32
return vld1q_dup_u32(a);
- // CHECK: ld1r {v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1r {{{ *v[0-9]+.4s *}}}, [{{x[0-9]+|sp}}]
}
-uint64x2_t test_vld1q_dup_u64(uint64_t const *a) {
+uint64x2_t test_vld1q_dup_u64(uint64_t *a) {
// CHECK-LABEL: test_vld1q_dup_u64
return vld1q_dup_u64(a);
- // CHECK: ld1r {v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1r {{{ *v[0-9]+.2d *}}}, [{{x[0-9]+|sp}}]
}
-int8x16_t test_vld1q_dup_s8(int8_t const *a) {
+int8x16_t test_vld1q_dup_s8(int8_t *a) {
// CHECK-LABEL: test_vld1q_dup_s8
return vld1q_dup_s8(a);
- // CHECK: ld1r {v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1r {{{ *v[0-9]+.16b *}}}, [{{x[0-9]+|sp}}]
}
-int16x8_t test_vld1q_dup_s16(int16_t const *a) {
+int16x8_t test_vld1q_dup_s16(int16_t *a) {
// CHECK-LABEL: test_vld1q_dup_s16
return vld1q_dup_s16(a);
- // CHECK: ld1r {v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1r {{{ *v[0-9]+.8h *}}}, [{{x[0-9]+|sp}}]
}
-int32x4_t test_vld1q_dup_s32(int32_t const *a) {
+int32x4_t test_vld1q_dup_s32(int32_t *a) {
// CHECK-LABEL: test_vld1q_dup_s32
return vld1q_dup_s32(a);
- // CHECK: ld1r {v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1r {{{ *v[0-9]+.4s *}}}, [{{x[0-9]+|sp}}]
}
-int64x2_t test_vld1q_dup_s64(int64_t const *a) {
+int64x2_t test_vld1q_dup_s64(int64_t *a) {
// CHECK-LABEL: test_vld1q_dup_s64
return vld1q_dup_s64(a);
- // CHECK: ld1r {v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1r {{{ *v[0-9]+.2d *}}}, [{{x[0-9]+|sp}}]
}
-float16x8_t test_vld1q_dup_f16(float16_t const *a) {
+float16x8_t test_vld1q_dup_f16(float16_t *a) {
// CHECK-LABEL: test_vld1q_dup_f16
return vld1q_dup_f16(a);
- // CHECK: ld1r {v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1r {{{ *v[0-9]+.8h *}}}, [{{x[0-9]+|sp}}]
}
-float32x4_t test_vld1q_dup_f32(float32_t const *a) {
+float32x4_t test_vld1q_dup_f32(float32_t *a) {
// CHECK-LABEL: test_vld1q_dup_f32
return vld1q_dup_f32(a);
- // CHECK: ld1r {v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1r {{{ *v[0-9]+.4s *}}}, [{{x[0-9]+|sp}}]
}
-float64x2_t test_vld1q_dup_f64(float64_t const *a) {
+float64x2_t test_vld1q_dup_f64(float64_t *a) {
// CHECK-LABEL: test_vld1q_dup_f64
return vld1q_dup_f64(a);
- // CHECK: ld1r {v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1r {{{ *v[0-9]+.2d *}}}, [{{x[0-9]+|sp}}]
}
-poly8x16_t test_vld1q_dup_p8(poly8_t const *a) {
+poly8x16_t test_vld1q_dup_p8(poly8_t *a) {
// CHECK-LABEL: test_vld1q_dup_p8
return vld1q_dup_p8(a);
- // CHECK: ld1r {v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1r {{{ *v[0-9]+.16b *}}}, [{{x[0-9]+|sp}}]
}
-poly16x8_t test_vld1q_dup_p16(poly16_t const *a) {
+poly16x8_t test_vld1q_dup_p16(poly16_t *a) {
// CHECK-LABEL: test_vld1q_dup_p16
return vld1q_dup_p16(a);
- // CHECK: ld1r {v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1r {{{ *v[0-9]+.8h *}}}, [{{x[0-9]+|sp}}]
}
-poly64x2_t test_vld1q_dup_p64(poly64_t const *a) {
+poly64x2_t test_vld1q_dup_p64(poly64_t *a) {
// CHECK-LABEL: test_vld1q_dup_p64
return vld1q_dup_p64(a);
- // CHECK: ld1r {v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1r {{{ *v[0-9]+.2d *}}}, [{{x[0-9]+|sp}}]
}
-uint8x8_t test_vld1_dup_u8(uint8_t const *a) {
+uint8x8_t test_vld1_dup_u8(uint8_t *a) {
// CHECK-LABEL: test_vld1_dup_u8
return vld1_dup_u8(a);
- // CHECK: ld1r {v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1r {{{ *v[0-9]+.8b *}}}, [{{x[0-9]+|sp}}]
}
-uint16x4_t test_vld1_dup_u16(uint16_t const *a) {
+uint16x4_t test_vld1_dup_u16(uint16_t *a) {
// CHECK-LABEL: test_vld1_dup_u16
return vld1_dup_u16(a);
- // CHECK: ld1r {v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1r {{{ *v[0-9]+.4h *}}}, [{{x[0-9]+|sp}}]
}
-uint32x2_t test_vld1_dup_u32(uint32_t const *a) {
+uint32x2_t test_vld1_dup_u32(uint32_t *a) {
// CHECK-LABEL: test_vld1_dup_u32
return vld1_dup_u32(a);
- // CHECK: ld1r {v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1r {{{ *v[0-9]+.2s *}}}, [{{x[0-9]+|sp}}]
}
-uint64x1_t test_vld1_dup_u64(uint64_t const *a) {
+uint64x1_t test_vld1_dup_u64(uint64_t *a) {
// CHECK-LABEL: test_vld1_dup_u64
return vld1_dup_u64(a);
- // CHECK: ld1r {v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1r { v[0-9]+.1d }|ldr d[0-9]+}}, [{{x[0-9]+|sp}}]
}
-int8x8_t test_vld1_dup_s8(int8_t const *a) {
+int8x8_t test_vld1_dup_s8(int8_t *a) {
// CHECK-LABEL: test_vld1_dup_s8
return vld1_dup_s8(a);
- // CHECK: ld1r {v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1r {{{ *v[0-9]+.8b *}}}, [{{x[0-9]+|sp}}]
}
-int16x4_t test_vld1_dup_s16(int16_t const *a) {
+int16x4_t test_vld1_dup_s16(int16_t *a) {
// CHECK-LABEL: test_vld1_dup_s16
return vld1_dup_s16(a);
- // CHECK: ld1r {v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1r {{{ *v[0-9]+.4h *}}}, [{{x[0-9]+|sp}}]
}
-int32x2_t test_vld1_dup_s32(int32_t const *a) {
+int32x2_t test_vld1_dup_s32(int32_t *a) {
// CHECK-LABEL: test_vld1_dup_s32
return vld1_dup_s32(a);
- // CHECK: ld1r {v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1r {{{ *v[0-9]+.2s *}}}, [{{x[0-9]+|sp}}]
}
-int64x1_t test_vld1_dup_s64(int64_t const *a) {
+int64x1_t test_vld1_dup_s64(int64_t *a) {
// CHECK-LABEL: test_vld1_dup_s64
return vld1_dup_s64(a);
- // CHECK: ld1r {v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1r { v[0-9]+.1d }|ldr d[0-9]+}}, [{{x[0-9]+|sp}}]
}
-float16x4_t test_vld1_dup_f16(float16_t const *a) {
+float16x4_t test_vld1_dup_f16(float16_t *a) {
// CHECK-LABEL: test_vld1_dup_f16
return vld1_dup_f16(a);
- // CHECK: ld1r {v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1r {{{ *v[0-9]+.4h *}}}, [{{x[0-9]+|sp}}]
}
-float32x2_t test_vld1_dup_f32(float32_t const *a) {
+float32x2_t test_vld1_dup_f32(float32_t *a) {
// CHECK-LABEL: test_vld1_dup_f32
return vld1_dup_f32(a);
- // CHECK: ld1r {v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1r {{{ *v[0-9]+.2s *}}}, [{{x[0-9]+|sp}}]
}
-float64x1_t test_vld1_dup_f64(float64_t const *a) {
+float64x1_t test_vld1_dup_f64(float64_t *a) {
// CHECK-LABEL: test_vld1_dup_f64
return vld1_dup_f64(a);
- // CHECK: ld1r {v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1r { v[0-9]+.1d }|ldr d[0-9]+}}, [{{x[0-9]+|sp}}]
}
-poly8x8_t test_vld1_dup_p8(poly8_t const *a) {
+poly8x8_t test_vld1_dup_p8(poly8_t *a) {
// CHECK-LABEL: test_vld1_dup_p8
return vld1_dup_p8(a);
- // CHECK: ld1r {v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1r {{{ *v[0-9]+.8b *}}}, [{{x[0-9]+|sp}}]
}
-poly16x4_t test_vld1_dup_p16(poly16_t const *a) {
+poly16x4_t test_vld1_dup_p16(poly16_t *a) {
// CHECK-LABEL: test_vld1_dup_p16
return vld1_dup_p16(a);
- // CHECK: ld1r {v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1r {{{ *v[0-9]+.4h *}}}, [{{x[0-9]+|sp}}]
}
-poly64x1_t test_vld1_dup_p64(poly64_t const *a) {
+poly64x1_t test_vld1_dup_p64(poly64_t *a) {
// CHECK-LABEL: test_vld1_dup_p64
return vld1_dup_p64(a);
- // CHECK: ld1r {v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1r { v[0-9]+.1d }|ldr d[0-9]+}}, [{{x[0-9]+|sp}}]
}
-uint8x16x2_t test_vld2q_dup_u8(uint8_t const *a) {
+uint8x16x2_t test_vld2q_dup_u8(uint8_t *a) {
// CHECK-LABEL: test_vld2q_dup_u8
return vld2q_dup_u8(a);
- // CHECK: ld2r {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2r {{{ *v[0-9]+.16b, v[0-9]+.16b *}}}, [{{x[0-9]+|sp}}]
}
-uint16x8x2_t test_vld2q_dup_u16(uint16_t const *a) {
+uint16x8x2_t test_vld2q_dup_u16(uint16_t *a) {
// CHECK-LABEL: test_vld2q_dup_u16
return vld2q_dup_u16(a);
- // CHECK: ld2r {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2r {{{ *v[0-9]+.8h, v[0-9]+.8h *}}}, [{{x[0-9]+|sp}}]
}
-uint32x4x2_t test_vld2q_dup_u32(uint32_t const *a) {
+uint32x4x2_t test_vld2q_dup_u32(uint32_t *a) {
// CHECK-LABEL: test_vld2q_dup_u32
return vld2q_dup_u32(a);
- // CHECK: ld2r {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2r {{{ *v[0-9]+.4s, v[0-9]+.4s *}}}, [{{x[0-9]+|sp}}]
}
-uint64x2x2_t test_vld2q_dup_u64(uint64_t const *a) {
+uint64x2x2_t test_vld2q_dup_u64(uint64_t *a) {
// CHECK-LABEL: test_vld2q_dup_u64
return vld2q_dup_u64(a);
- // CHECK: ld2r {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2r {{{ *v[0-9]+.2d, v[0-9]+.2d *}}}, [{{x[0-9]+|sp}}]
}
-int8x16x2_t test_vld2q_dup_s8(int8_t const *a) {
+int8x16x2_t test_vld2q_dup_s8(int8_t *a) {
// CHECK-LABEL: test_vld2q_dup_s8
return vld2q_dup_s8(a);
- // CHECK: ld2r {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2r {{{ *v[0-9]+.16b, v[0-9]+.16b *}}}, [{{x[0-9]+|sp}}]
}
-int16x8x2_t test_vld2q_dup_s16(int16_t const *a) {
+int16x8x2_t test_vld2q_dup_s16(int16_t *a) {
// CHECK-LABEL: test_vld2q_dup_s16
return vld2q_dup_s16(a);
- // CHECK: ld2r {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2r {{{ *v[0-9]+.8h, v[0-9]+.8h *}}}, [{{x[0-9]+|sp}}]
}
-int32x4x2_t test_vld2q_dup_s32(int32_t const *a) {
+int32x4x2_t test_vld2q_dup_s32(int32_t *a) {
// CHECK-LABEL: test_vld2q_dup_s32
return vld2q_dup_s32(a);
- // CHECK: ld2r {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2r {{{ *v[0-9]+.4s, v[0-9]+.4s *}}}, [{{x[0-9]+|sp}}]
}
-int64x2x2_t test_vld2q_dup_s64(int64_t const *a) {
+int64x2x2_t test_vld2q_dup_s64(int64_t *a) {
// CHECK-LABEL: test_vld2q_dup_s64
return vld2q_dup_s64(a);
- // CHECK: ld2r {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2r {{{ *v[0-9]+.2d, v[0-9]+.2d *}}}, [{{x[0-9]+|sp}}]
}
-float16x8x2_t test_vld2q_dup_f16(float16_t const *a) {
+float16x8x2_t test_vld2q_dup_f16(float16_t *a) {
// CHECK-LABEL: test_vld2q_dup_f16
return vld2q_dup_f16(a);
- // CHECK: ld2r {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2r {{{ *v[0-9]+.8h, v[0-9]+.8h *}}}, [{{x[0-9]+|sp}}]
}
-float32x4x2_t test_vld2q_dup_f32(float32_t const *a) {
+float32x4x2_t test_vld2q_dup_f32(float32_t *a) {
// CHECK-LABEL: test_vld2q_dup_f32
return vld2q_dup_f32(a);
- // CHECK: ld2r {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2r {{{ *v[0-9]+.4s, v[0-9]+.4s *}}}, [{{x[0-9]+|sp}}]
}
-float64x2x2_t test_vld2q_dup_f64(float64_t const *a) {
+float64x2x2_t test_vld2q_dup_f64(float64_t *a) {
// CHECK-LABEL: test_vld2q_dup_f64
return vld2q_dup_f64(a);
- // CHECK: ld2r {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2r {{{ *v[0-9]+.2d, v[0-9]+.2d *}}}, [{{x[0-9]+|sp}}]
}
-poly8x16x2_t test_vld2q_dup_p8(poly8_t const *a) {
+poly8x16x2_t test_vld2q_dup_p8(poly8_t *a) {
// CHECK-LABEL: test_vld2q_dup_p8
return vld2q_dup_p8(a);
- // CHECK: ld2r {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2r {{{ *v[0-9]+.16b, v[0-9]+.16b *}}}, [{{x[0-9]+|sp}}]
}
-poly16x8x2_t test_vld2q_dup_p16(poly16_t const *a) {
+poly16x8x2_t test_vld2q_dup_p16(poly16_t *a) {
// CHECK-LABEL: test_vld2q_dup_p16
return vld2q_dup_p16(a);
- // CHECK: ld2r {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2r {{{ *v[0-9]+.8h, v[0-9]+.8h *}}}, [{{x[0-9]+|sp}}]
}
-poly64x2x2_t test_vld2q_dup_p64(poly64_t const *a) {
+poly64x2x2_t test_vld2q_dup_p64(poly64_t *a) {
// CHECK-LABEL: test_vld2q_dup_p64
return vld2q_dup_p64(a);
- // CHECK: ld2r {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2r {{{ *v[0-9]+.2d, v[0-9]+.2d *}}}, [{{x[0-9]+|sp}}]
}
-uint8x8x2_t test_vld2_dup_u8(uint8_t const *a) {
+uint8x8x2_t test_vld2_dup_u8(uint8_t *a) {
// CHECK-LABEL: test_vld2_dup_u8
return vld2_dup_u8(a);
- // CHECK: ld2r {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2r {{{ *v[0-9]+.8b, v[0-9]+.8b *}}}, [{{x[0-9]+|sp}}]
}
-uint16x4x2_t test_vld2_dup_u16(uint16_t const *a) {
+uint16x4x2_t test_vld2_dup_u16(uint16_t *a) {
// CHECK-LABEL: test_vld2_dup_u16
return vld2_dup_u16(a);
- // CHECK: ld2r {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2r {{{ *v[0-9]+.4h, v[0-9]+.4h *}}}, [{{x[0-9]+|sp}}]
}
-uint32x2x2_t test_vld2_dup_u32(uint32_t const *a) {
+uint32x2x2_t test_vld2_dup_u32(uint32_t *a) {
// CHECK-LABEL: test_vld2_dup_u32
return vld2_dup_u32(a);
- // CHECK: ld2r {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2r {{{ *v[0-9]+.2s, v[0-9]+.2s *}}}, [{{x[0-9]+|sp}}]
}
-uint64x1x2_t test_vld2_dup_u64(uint64_t const *a) {
+uint64x1x2_t test_vld2_dup_u64(uint64_t *a) {
// CHECK-LABEL: test_vld2_dup_u64
return vld2_dup_u64(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1|ld2r}} {{{ *v[0-9]+.1d, v[0-9]+.1d *}}}, [{{x[0-9]+|sp}}]
}
-int8x8x2_t test_vld2_dup_s8(int8_t const *a) {
+int8x8x2_t test_vld2_dup_s8(int8_t *a) {
// CHECK-LABEL: test_vld2_dup_s8
return vld2_dup_s8(a);
- // CHECK: ld2r {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2r {{{ *v[0-9]+.8b, v[0-9]+.8b *}}}, [{{x[0-9]+|sp}}]
}
-int16x4x2_t test_vld2_dup_s16(int16_t const *a) {
+int16x4x2_t test_vld2_dup_s16(int16_t *a) {
// CHECK-LABEL: test_vld2_dup_s16
return vld2_dup_s16(a);
- // CHECK: ld2r {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2r {{{ *v[0-9]+.4h, v[0-9]+.4h *}}}, [{{x[0-9]+|sp}}]
}
-int32x2x2_t test_vld2_dup_s32(int32_t const *a) {
+int32x2x2_t test_vld2_dup_s32(int32_t *a) {
// CHECK-LABEL: test_vld2_dup_s32
return vld2_dup_s32(a);
- // CHECK: ld2r {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2r {{{ *v[0-9]+.2s, v[0-9]+.2s *}}}, [{{x[0-9]+|sp}}]
}
-int64x1x2_t test_vld2_dup_s64(int64_t const *a) {
+int64x1x2_t test_vld2_dup_s64(int64_t *a) {
// CHECK-LABEL: test_vld2_dup_s64
return vld2_dup_s64(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1|ld2r}} {{{ *v[0-9]+.1d, v[0-9]+.1d *}}}, [{{x[0-9]+|sp}}]
}
-float16x4x2_t test_vld2_dup_f16(float16_t const *a) {
+float16x4x2_t test_vld2_dup_f16(float16_t *a) {
// CHECK-LABEL: test_vld2_dup_f16
return vld2_dup_f16(a);
- // CHECK: ld2r {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2r {{{ *v[0-9]+.4h, v[0-9]+.4h *}}}, [{{x[0-9]+|sp}}]
}
-float32x2x2_t test_vld2_dup_f32(float32_t const *a) {
+float32x2x2_t test_vld2_dup_f32(float32_t *a) {
// CHECK-LABEL: test_vld2_dup_f32
return vld2_dup_f32(a);
- // CHECK: ld2r {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2r {{{ *v[0-9]+.2s, v[0-9]+.2s *}}}, [{{x[0-9]+|sp}}]
}
-float64x1x2_t test_vld2_dup_f64(float64_t const *a) {
+float64x1x2_t test_vld2_dup_f64(float64_t *a) {
// CHECK-LABEL: test_vld2_dup_f64
return vld2_dup_f64(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1|ld2r}} {{{ *v[0-9]+.1d, v[0-9]+.1d *}}}, [{{x[0-9]+|sp}}]
}
-poly8x8x2_t test_vld2_dup_p8(poly8_t const *a) {
+poly8x8x2_t test_vld2_dup_p8(poly8_t *a) {
// CHECK-LABEL: test_vld2_dup_p8
return vld2_dup_p8(a);
- // CHECK: ld2r {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2r {{{ *v[0-9]+.8b, v[0-9]+.8b *}}}, [{{x[0-9]+|sp}}]
}
-poly16x4x2_t test_vld2_dup_p16(poly16_t const *a) {
+poly16x4x2_t test_vld2_dup_p16(poly16_t *a) {
// CHECK-LABEL: test_vld2_dup_p16
return vld2_dup_p16(a);
- // CHECK: ld2r {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2r {{{ *v[0-9]+.4h, v[0-9]+.4h *}}}, [{{x[0-9]+|sp}}]
}
-poly64x1x2_t test_vld2_dup_p64(poly64_t const *a) {
+poly64x1x2_t test_vld2_dup_p64(poly64_t *a) {
// CHECK-LABEL: test_vld2_dup_p64
return vld2_dup_p64(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1|ld2r}} {{{ *v[0-9]+.1d, v[0-9]+.1d *}}}, [{{x[0-9]+|sp}}]
}
-uint8x16x3_t test_vld3q_dup_u8(uint8_t const *a) {
+uint8x16x3_t test_vld3q_dup_u8(uint8_t *a) {
// CHECK-LABEL: test_vld3q_dup_u8
return vld3q_dup_u8(a);
- // CHECK: ld3r {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b},
+ // CHECK: ld3r {{{ *v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b *}}},
// [{{x[0-9]+|sp}}]
}
-uint16x8x3_t test_vld3q_dup_u16(uint16_t const *a) {
+uint16x8x3_t test_vld3q_dup_u16(uint16_t *a) {
// CHECK-LABEL: test_vld3q_dup_u16
return vld3q_dup_u16(a);
- // CHECK: ld3r {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h},
+ // CHECK: ld3r {{{ *v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h *}}},
// [{{x[0-9]+|sp}}]
}
-uint32x4x3_t test_vld3q_dup_u32(uint32_t const *a) {
+uint32x4x3_t test_vld3q_dup_u32(uint32_t *a) {
// CHECK-LABEL: test_vld3q_dup_u32
return vld3q_dup_u32(a);
- // CHECK: ld3r {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s},
+ // CHECK: ld3r {{{ *v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s *}}},
// [{{x[0-9]+|sp}}]
}
-uint64x2x3_t test_vld3q_dup_u64(uint64_t const *a) {
+uint64x2x3_t test_vld3q_dup_u64(uint64_t *a) {
// CHECK-LABEL: test_vld3q_dup_u64
return vld3q_dup_u64(a);
- // CHECK: ld3r {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d},
+ // CHECK: ld3r {{{ *v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d *}}},
// [{{x[0-9]+|sp}}]
}
-int8x16x3_t test_vld3q_dup_s8(int8_t const *a) {
+int8x16x3_t test_vld3q_dup_s8(int8_t *a) {
// CHECK-LABEL: test_vld3q_dup_s8
return vld3q_dup_s8(a);
- // CHECK: ld3r {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b},
+ // CHECK: ld3r {{{ *v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b *}}},
// [{{x[0-9]+|sp}}]
}
-int16x8x3_t test_vld3q_dup_s16(int16_t const *a) {
+int16x8x3_t test_vld3q_dup_s16(int16_t *a) {
// CHECK-LABEL: test_vld3q_dup_s16
return vld3q_dup_s16(a);
- // CHECK: ld3r {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h},
+ // CHECK: ld3r {{{ *v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h *}}},
// [{{x[0-9]+|sp}}]
}
-int32x4x3_t test_vld3q_dup_s32(int32_t const *a) {
+int32x4x3_t test_vld3q_dup_s32(int32_t *a) {
// CHECK-LABEL: test_vld3q_dup_s32
return vld3q_dup_s32(a);
- // CHECK: ld3r {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s},
+ // CHECK: ld3r {{{ *v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s *}}},
// [{{x[0-9]+|sp}}]
}
-int64x2x3_t test_vld3q_dup_s64(int64_t const *a) {
+int64x2x3_t test_vld3q_dup_s64(int64_t *a) {
// CHECK-LABEL: test_vld3q_dup_s64
return vld3q_dup_s64(a);
- // CHECK: ld3r {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d},
+ // CHECK: ld3r {{{ *v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d *}}},
// [{{x[0-9]+|sp}}]
}
-float16x8x3_t test_vld3q_dup_f16(float16_t const *a) {
+float16x8x3_t test_vld3q_dup_f16(float16_t *a) {
// CHECK-LABEL: test_vld3q_dup_f16
return vld3q_dup_f16(a);
- // CHECK: ld3r {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h},
+ // CHECK: ld3r {{{ *v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h *}}},
// [{{x[0-9]+|sp}}]
}
-float32x4x3_t test_vld3q_dup_f32(float32_t const *a) {
+float32x4x3_t test_vld3q_dup_f32(float32_t *a) {
// CHECK-LABEL: test_vld3q_dup_f32
return vld3q_dup_f32(a);
- // CHECK: ld3r {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s},
+ // CHECK: ld3r {{{ *v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s *}}},
// [{{x[0-9]+|sp}}]
}
-float64x2x3_t test_vld3q_dup_f64(float64_t const *a) {
+float64x2x3_t test_vld3q_dup_f64(float64_t *a) {
// CHECK-LABEL: test_vld3q_dup_f64
return vld3q_dup_f64(a);
- // CHECK: ld3r {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d},
+ // CHECK: ld3r {{{ *v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d *}}},
// [{{x[0-9]+|sp}}]
}
-poly8x16x3_t test_vld3q_dup_p8(poly8_t const *a) {
+poly8x16x3_t test_vld3q_dup_p8(poly8_t *a) {
// CHECK-LABEL: test_vld3q_dup_p8
return vld3q_dup_p8(a);
- // CHECK: ld3r {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b},
+ // CHECK: ld3r {{{ *v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b *}}},
// [{{x[0-9]+|sp}}]
}
-poly16x8x3_t test_vld3q_dup_p16(poly16_t const *a) {
+poly16x8x3_t test_vld3q_dup_p16(poly16_t *a) {
// CHECK-LABEL: test_vld3q_dup_p16
return vld3q_dup_p16(a);
- // CHECK: ld3r {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h},
+ // CHECK: ld3r {{{ *v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h *}}},
// [{{x[0-9]+|sp}}]
}
-poly64x2x3_t test_vld3q_dup_p64(poly64_t const *a) {
+poly64x2x3_t test_vld3q_dup_p64(poly64_t *a) {
// CHECK-LABEL: test_vld3q_dup_p64
return vld3q_dup_p64(a);
- // CHECK: ld3r {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d},
+ // CHECK: ld3r {{{ *v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d *}}},
// [{{x[0-9]+|sp}}]
}
-uint8x8x3_t test_vld3_dup_u8(uint8_t const *a) {
+uint8x8x3_t test_vld3_dup_u8(uint8_t *a) {
// CHECK-LABEL: test_vld3_dup_u8
return vld3_dup_u8(a);
- // CHECK: ld3r {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b},
+ // CHECK: ld3r {{{ *v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b *}}},
// [{{x[0-9]+|sp}}]
}
-uint16x4x3_t test_vld3_dup_u16(uint16_t const *a) {
+uint16x4x3_t test_vld3_dup_u16(uint16_t *a) {
// CHECK-LABEL: test_vld3_dup_u16
return vld3_dup_u16(a);
- // CHECK: ld3r {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h},
+ // CHECK: ld3r {{{ *v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h *}}},
// [{{x[0-9]+|sp}}]
}
-uint32x2x3_t test_vld3_dup_u32(uint32_t const *a) {
+uint32x2x3_t test_vld3_dup_u32(uint32_t *a) {
// CHECK-LABEL: test_vld3_dup_u32
return vld3_dup_u32(a);
- // CHECK: ld3r {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s},
+ // CHECK: ld3r {{{ *v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s *}}},
// [{{x[0-9]+|sp}}]
}
-uint64x1x3_t test_vld3_dup_u64(uint64_t const *a) {
+uint64x1x3_t test_vld3_dup_u64(uint64_t *a) {
// CHECK-LABEL: test_vld3_dup_u64
return vld3_dup_u64(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d},
+ // CHECK: {{ld1|ld3r}} {{{ *v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d *}}},
// [{{x[0-9]+|sp}}]
}
-int8x8x3_t test_vld3_dup_s8(int8_t const *a) {
+int8x8x3_t test_vld3_dup_s8(int8_t *a) {
// CHECK-LABEL: test_vld3_dup_s8
return vld3_dup_s8(a);
- // CHECK: ld3r {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b},
+ // CHECK: ld3r {{{ *v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b *}}},
// [{{x[0-9]+|sp}}]
}
-int16x4x3_t test_vld3_dup_s16(int16_t const *a) {
+int16x4x3_t test_vld3_dup_s16(int16_t *a) {
// CHECK-LABEL: test_vld3_dup_s16
return vld3_dup_s16(a);
- // CHECK: ld3r {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h},
+ // CHECK: ld3r {{{ *v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h *}}},
// [{{x[0-9]+|sp}}]
}
-int32x2x3_t test_vld3_dup_s32(int32_t const *a) {
+int32x2x3_t test_vld3_dup_s32(int32_t *a) {
// CHECK-LABEL: test_vld3_dup_s32
return vld3_dup_s32(a);
- // CHECK: ld3r {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s},
+ // CHECK: ld3r {{{ *v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s *}}},
// [{{x[0-9]+|sp}}]
}
-int64x1x3_t test_vld3_dup_s64(int64_t const *a) {
+int64x1x3_t test_vld3_dup_s64(int64_t *a) {
// CHECK-LABEL: test_vld3_dup_s64
return vld3_dup_s64(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d},
+ // CHECK: {{ld1|ld3r}} {{{ *v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d *}}},
// [{{x[0-9]+|sp}}]
}
-float16x4x3_t test_vld3_dup_f16(float16_t const *a) {
+float16x4x3_t test_vld3_dup_f16(float16_t *a) {
// CHECK-LABEL: test_vld3_dup_f16
return vld3_dup_f16(a);
- // CHECK: ld3r {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h},
+ // CHECK: ld3r {{{ *v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h *}}},
// [{{x[0-9]+|sp}}]
}
-float32x2x3_t test_vld3_dup_f32(float32_t const *a) {
+float32x2x3_t test_vld3_dup_f32(float32_t *a) {
// CHECK-LABEL: test_vld3_dup_f32
return vld3_dup_f32(a);
- // CHECK: ld3r {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s},
+ // CHECK: ld3r {{{ *v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s *}}},
// [{{x[0-9]+|sp}}]
}
-float64x1x3_t test_vld3_dup_f64(float64_t const *a) {
+float64x1x3_t test_vld3_dup_f64(float64_t *a) {
// CHECK-LABEL: test_vld3_dup_f64
return vld3_dup_f64(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d},
+ // CHECK: {{ld1|ld3r}} {{{ *v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d *}}},
// [{{x[0-9]+|sp}}]
}
-poly8x8x3_t test_vld3_dup_p8(poly8_t const *a) {
+poly8x8x3_t test_vld3_dup_p8(poly8_t *a) {
// CHECK-LABEL: test_vld3_dup_p8
return vld3_dup_p8(a);
- // CHECK: ld3r {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b},
+ // CHECK: ld3r {{{ *v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b *}}},
// [{{x[0-9]+|sp}}]
}
-poly16x4x3_t test_vld3_dup_p16(poly16_t const *a) {
+poly16x4x3_t test_vld3_dup_p16(poly16_t *a) {
// CHECK-LABEL: test_vld3_dup_p16
return vld3_dup_p16(a);
- // CHECK: ld3r {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h},
+ // CHECK: ld3r {{{ *v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h *}}},
// [{{x[0-9]+|sp}}]
}
-poly64x1x3_t test_vld3_dup_p64(poly64_t const *a) {
+poly64x1x3_t test_vld3_dup_p64(poly64_t *a) {
// CHECK-LABEL: test_vld3_dup_p64
return vld3_dup_p64(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d},
+ // CHECK: {{ld1|ld3r}} {{{ *v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d *}}},
// [{{x[0-9]+|sp}}]
}
-uint8x16x4_t test_vld4q_dup_u8(uint8_t const *a) {
+uint8x16x4_t test_vld4q_dup_u8(uint8_t *a) {
// CHECK-LABEL: test_vld4q_dup_u8
return vld4q_dup_u8(a);
- // CHECK: ld4r {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b,
- // v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4r {{{ *v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b *}}}, [{{x[0-9]+|sp}}]
}
-uint16x8x4_t test_vld4q_dup_u16(uint16_t const *a) {
+uint16x8x4_t test_vld4q_dup_u16(uint16_t *a) {
// CHECK-LABEL: test_vld4q_dup_u16
return vld4q_dup_u16(a);
- // CHECK: ld4r {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h,
- // v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4r {{{ *v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h *}}}, [{{x[0-9]+|sp}}]
}
-uint32x4x4_t test_vld4q_dup_u32(uint32_t const *a) {
+uint32x4x4_t test_vld4q_dup_u32(uint32_t *a) {
// CHECK-LABEL: test_vld4q_dup_u32
return vld4q_dup_u32(a);
- // CHECK: ld4r {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s,
- // v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4r {{{ *v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s *}}}, [{{x[0-9]+|sp}}]
}
-uint64x2x4_t test_vld4q_dup_u64(uint64_t const *a) {
+uint64x2x4_t test_vld4q_dup_u64(uint64_t *a) {
// CHECK-LABEL: test_vld4q_dup_u64
return vld4q_dup_u64(a);
- // CHECK: ld4r {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d,
- // v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4r {{{ *v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d *}}}, [{{x[0-9]+|sp}}]
}
-int8x16x4_t test_vld4q_dup_s8(int8_t const *a) {
+int8x16x4_t test_vld4q_dup_s8(int8_t *a) {
// CHECK-LABEL: test_vld4q_dup_s8
return vld4q_dup_s8(a);
- // CHECK: ld4r {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b,
- // v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4r {{{ *v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b *}}}, [{{x[0-9]+|sp}}]
}
-int16x8x4_t test_vld4q_dup_s16(int16_t const *a) {
+int16x8x4_t test_vld4q_dup_s16(int16_t *a) {
// CHECK-LABEL: test_vld4q_dup_s16
return vld4q_dup_s16(a);
- // CHECK: ld4r {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h,
- // v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4r {{{ *v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h *}}}, [{{x[0-9]+|sp}}]
}
-int32x4x4_t test_vld4q_dup_s32(int32_t const *a) {
+int32x4x4_t test_vld4q_dup_s32(int32_t *a) {
// CHECK-LABEL: test_vld4q_dup_s32
return vld4q_dup_s32(a);
- // CHECK: ld4r {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s,
- // v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4r {{{ *v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s *}}}, [{{x[0-9]+|sp}}]
}
-int64x2x4_t test_vld4q_dup_s64(int64_t const *a) {
+int64x2x4_t test_vld4q_dup_s64(int64_t *a) {
// CHECK-LABEL: test_vld4q_dup_s64
return vld4q_dup_s64(a);
- // CHECK: ld4r {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d,
- // v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4r {{{ *v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d *}}}, [{{x[0-9]+|sp}}]
}
-float16x8x4_t test_vld4q_dup_f16(float16_t const *a) {
+float16x8x4_t test_vld4q_dup_f16(float16_t *a) {
// CHECK-LABEL: test_vld4q_dup_f16
return vld4q_dup_f16(a);
- // CHECK: ld4r {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h,
- // v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4r {{{ *v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h *}}}, [{{x[0-9]+|sp}}]
}
-float32x4x4_t test_vld4q_dup_f32(float32_t const *a) {
+float32x4x4_t test_vld4q_dup_f32(float32_t *a) {
// CHECK-LABEL: test_vld4q_dup_f32
return vld4q_dup_f32(a);
- // CHECK: ld4r {v{{[0-9]+}}.4s, v{{[0-9]+}}.4s, v{{[0-9]+}}.4s,
- // v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4r {{{ *v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s, v[0-9]+.4s *}}}, [{{x[0-9]+|sp}}]
}
-float64x2x4_t test_vld4q_dup_f64(float64_t const *a) {
+float64x2x4_t test_vld4q_dup_f64(float64_t *a) {
// CHECK-LABEL: test_vld4q_dup_f64
return vld4q_dup_f64(a);
- // CHECK: ld4r {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d,
- // v{{[0-9]+}}.4s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4r {{{ *v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d *}}}, [{{x[0-9]+|sp}}]
}
-poly8x16x4_t test_vld4q_dup_p8(poly8_t const *a) {
+poly8x16x4_t test_vld4q_dup_p8(poly8_t *a) {
// CHECK-LABEL: test_vld4q_dup_p8
return vld4q_dup_p8(a);
- // CHECK: ld4r {v{{[0-9]+}}.16b, v{{[0-9]+}}.16b, v{{[0-9]+}}.16b,
- // v{{[0-9]+}}.16b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4r {{{ *v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b *}}}, [{{x[0-9]+|sp}}]
}
-poly16x8x4_t test_vld4q_dup_p16(poly16_t const *a) {
+poly16x8x4_t test_vld4q_dup_p16(poly16_t *a) {
// CHECK-LABEL: test_vld4q_dup_p16
return vld4q_dup_p16(a);
- // CHECK: ld4r {v{{[0-9]+}}.8h, v{{[0-9]+}}.8h, v{{[0-9]+}}.8h,
- // v{{[0-9]+}}.8h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4r {{{ *v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h, v[0-9]+.8h *}}}, [{{x[0-9]+|sp}}]
}
-poly64x2x4_t test_vld4q_dup_p64(poly64_t const *a) {
+poly64x2x4_t test_vld4q_dup_p64(poly64_t *a) {
// CHECK-LABEL: test_vld4q_dup_p64
return vld4q_dup_p64(a);
- // CHECK: ld4r {v{{[0-9]+}}.2d, v{{[0-9]+}}.2d, v{{[0-9]+}}.2d,
- // v{{[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4r {{{ *v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d *}}}, [{{x[0-9]+|sp}}]
}
-uint8x8x4_t test_vld4_dup_u8(uint8_t const *a) {
+uint8x8x4_t test_vld4_dup_u8(uint8_t *a) {
// CHECK-LABEL: test_vld4_dup_u8
return vld4_dup_u8(a);
- // CHECK: ld4r {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b,
- // v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4r {{{ *v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b *}}}, [{{x[0-9]+|sp}}]
}
-uint16x4x4_t test_vld4_dup_u16(uint16_t const *a) {
+uint16x4x4_t test_vld4_dup_u16(uint16_t *a) {
// CHECK-LABEL: test_vld4_dup_u16
return vld4_dup_u16(a);
- // CHECK: ld4r {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h,
- // v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4r {{{ *v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h *}}}, [{{x[0-9]+|sp}}]
}
-uint32x2x4_t test_vld4_dup_u32(uint32_t const *a) {
+uint32x2x4_t test_vld4_dup_u32(uint32_t *a) {
// CHECK-LABEL: test_vld4_dup_u32
return vld4_dup_u32(a);
- // CHECK: ld4r {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s,
- // v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4r {{{ *v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s *}}}, [{{x[0-9]+|sp}}]
}
-uint64x1x4_t test_vld4_dup_u64(uint64_t const *a) {
+uint64x1x4_t test_vld4_dup_u64(uint64_t *a) {
// CHECK-LABEL: test_vld4_dup_u64
return vld4_dup_u64(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d,
- // v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1|ld4r}} {{{ *v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d *}}}, [{{x[0-9]+|sp}}]
}
-int8x8x4_t test_vld4_dup_s8(int8_t const *a) {
+int8x8x4_t test_vld4_dup_s8(int8_t *a) {
// CHECK-LABEL: test_vld4_dup_s8
return vld4_dup_s8(a);
- // CHECK: ld4r {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b,
- // v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4r {{{ *v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b *}}}, [{{x[0-9]+|sp}}]
}
-int16x4x4_t test_vld4_dup_s16(int16_t const *a) {
+int16x4x4_t test_vld4_dup_s16(int16_t *a) {
// CHECK-LABEL: test_vld4_dup_s16
return vld4_dup_s16(a);
- // CHECK: ld4r {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h,
- // v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4r {{{ *v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h *}}}, [{{x[0-9]+|sp}}]
}
-int32x2x4_t test_vld4_dup_s32(int32_t const *a) {
+int32x2x4_t test_vld4_dup_s32(int32_t *a) {
// CHECK-LABEL: test_vld4_dup_s32
return vld4_dup_s32(a);
- // CHECK: ld4r {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s,
- // v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4r {{{ *v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s *}}}, [{{x[0-9]+|sp}}]
}
-int64x1x4_t test_vld4_dup_s64(int64_t const *a) {
+int64x1x4_t test_vld4_dup_s64(int64_t *a) {
// CHECK-LABEL: test_vld4_dup_s64
return vld4_dup_s64(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d,
- // v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1|ld4r}} {{{ *v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d *}}}, [{{x[0-9]+|sp}}]
}
-float16x4x4_t test_vld4_dup_f16(float16_t const *a) {
+float16x4x4_t test_vld4_dup_f16(float16_t *a) {
// CHECK-LABEL: test_vld4_dup_f16
return vld4_dup_f16(a);
- // CHECK: ld4r {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h,
- // v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4r {{{ *v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h *}}}, [{{x[0-9]+|sp}}]
}
-float32x2x4_t test_vld4_dup_f32(float32_t const *a) {
+float32x2x4_t test_vld4_dup_f32(float32_t *a) {
// CHECK-LABEL: test_vld4_dup_f32
return vld4_dup_f32(a);
- // CHECK: ld4r {v{{[0-9]+}}.2s, v{{[0-9]+}}.2s, v{{[0-9]+}}.2s,
- // v{{[0-9]+}}.2s}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4r {{{ *v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s, v[0-9]+.2s *}}}, [{{x[0-9]+|sp}}]
}
-float64x1x4_t test_vld4_dup_f64(float64_t const *a) {
+float64x1x4_t test_vld4_dup_f64(float64_t *a) {
// CHECK-LABEL: test_vld4_dup_f64
return vld4_dup_f64(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d,
- // v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1|ld4r}} {{{ *v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d *}}}, [{{x[0-9]+|sp}}]
}
-poly8x8x4_t test_vld4_dup_p8(poly8_t const *a) {
+poly8x8x4_t test_vld4_dup_p8(poly8_t *a) {
// CHECK-LABEL: test_vld4_dup_p8
return vld4_dup_p8(a);
- // CHECK: ld4r {v{{[0-9]+}}.8b, v{{[0-9]+}}.8b, v{{[0-9]+}}.8b,
- // v{{[0-9]+}}.8b}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4r {{{ *v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b, v[0-9]+.8b *}}}, [{{x[0-9]+|sp}}]
}
-poly16x4x4_t test_vld4_dup_p16(poly16_t const *a) {
+poly16x4x4_t test_vld4_dup_p16(poly16_t *a) {
// CHECK-LABEL: test_vld4_dup_p16
return vld4_dup_p16(a);
- // CHECK: ld4r {v{{[0-9]+}}.4h, v{{[0-9]+}}.4h, v{{[0-9]+}}.4h,
- // v{{[0-9]+}}.4h}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4r {{{ *v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h, v[0-9]+.4h *}}}, [{{x[0-9]+|sp}}]
}
-poly64x1x4_t test_vld4_dup_p64(poly64_t const *a) {
+poly64x1x4_t test_vld4_dup_p64(poly64_t *a) {
// CHECK-LABEL: test_vld4_dup_p64
return vld4_dup_p64(a);
- // CHECK: ld1 {v{{[0-9]+}}.1d, v{{[0-9]+}}.1d, v{{[0-9]+}}.1d,
- // v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1|ld4r}} {{{ *v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d *}}}, [{{x[0-9]+|sp}}]
}
-uint8x16_t test_vld1q_lane_u8(uint8_t const *a, uint8x16_t b) {
+uint8x16_t test_vld1q_lane_u8(uint8_t *a, uint8x16_t b) {
// CHECK-LABEL: test_vld1q_lane_u8
return vld1q_lane_u8(a, b, 15);
- // CHECK: ld1 {v{{[0-9]+}}.b}[15], [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.b *}}}[15], [{{x[0-9]+|sp}}]
}
-uint16x8_t test_vld1q_lane_u16(uint16_t const *a, uint16x8_t b) {
+uint16x8_t test_vld1q_lane_u16(uint16_t *a, uint16x8_t b) {
// CHECK-LABEL: test_vld1q_lane_u16
return vld1q_lane_u16(a, b, 7);
- // CHECK: ld1 {v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-uint32x4_t test_vld1q_lane_u32(uint32_t const *a, uint32x4_t b) {
+uint32x4_t test_vld1q_lane_u32(uint32_t *a, uint32x4_t b) {
// CHECK-LABEL: test_vld1q_lane_u32
return vld1q_lane_u32(a, b, 3);
- // CHECK: ld1 {v{{[0-9]+}}.s}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.s *}}}[3], [{{x[0-9]+|sp}}]
}
-uint64x2_t test_vld1q_lane_u64(uint64_t const *a, uint64x2_t b) {
+uint64x2_t test_vld1q_lane_u64(uint64_t *a, uint64x2_t b) {
// CHECK-LABEL: test_vld1q_lane_u64
return vld1q_lane_u64(a, b, 1);
- // CHECK: ld1 {v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-int8x16_t test_vld1q_lane_s8(int8_t const *a, int8x16_t b) {
+int8x16_t test_vld1q_lane_s8(int8_t *a, int8x16_t b) {
// CHECK-LABEL: test_vld1q_lane_s8
return vld1q_lane_s8(a, b, 15);
- // CHECK: ld1 {v{{[0-9]+}}.b}[15], [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.b *}}}[15], [{{x[0-9]+|sp}}]
}
-int16x8_t test_vld1q_lane_s16(int16_t const *a, int16x8_t b) {
+int16x8_t test_vld1q_lane_s16(int16_t *a, int16x8_t b) {
// CHECK-LABEL: test_vld1q_lane_s16
return vld1q_lane_s16(a, b, 7);
- // CHECK: ld1 {v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-int32x4_t test_vld1q_lane_s32(int32_t const *a, int32x4_t b) {
+int32x4_t test_vld1q_lane_s32(int32_t *a, int32x4_t b) {
// CHECK-LABEL: test_vld1q_lane_s32
return vld1q_lane_s32(a, b, 3);
- // CHECK: ld1 {v{{[0-9]+}}.s}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.s *}}}[3], [{{x[0-9]+|sp}}]
}
-int64x2_t test_vld1q_lane_s64(int64_t const *a, int64x2_t b) {
+int64x2_t test_vld1q_lane_s64(int64_t *a, int64x2_t b) {
// CHECK-LABEL: test_vld1q_lane_s64
return vld1q_lane_s64(a, b, 1);
- // CHECK: ld1 {v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-float16x8_t test_vld1q_lane_f16(float16_t const *a, float16x8_t b) {
+float16x8_t test_vld1q_lane_f16(float16_t *a, float16x8_t b) {
// CHECK-LABEL: test_vld1q_lane_f16
return vld1q_lane_f16(a, b, 7);
- // CHECK: ld1 {v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-float32x4_t test_vld1q_lane_f32(float32_t const *a, float32x4_t b) {
+float32x4_t test_vld1q_lane_f32(float32_t *a, float32x4_t b) {
// CHECK-LABEL: test_vld1q_lane_f32
return vld1q_lane_f32(a, b, 3);
- // CHECK: ld1 {v{{[0-9]+}}.s}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.s *}}}[3], [{{x[0-9]+|sp}}]
}
-float64x2_t test_vld1q_lane_f64(float64_t const *a, float64x2_t b) {
+float64x2_t test_vld1q_lane_f64(float64_t *a, float64x2_t b) {
// CHECK-LABEL: test_vld1q_lane_f64
return vld1q_lane_f64(a, b, 1);
- // CHECK: ld1 {v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-poly8x16_t test_vld1q_lane_p8(poly8_t const *a, poly8x16_t b) {
+poly8x16_t test_vld1q_lane_p8(poly8_t *a, poly8x16_t b) {
// CHECK-LABEL: test_vld1q_lane_p8
return vld1q_lane_p8(a, b, 15);
- // CHECK: ld1 {v{{[0-9]+}}.b}[15], [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.b *}}}[15], [{{x[0-9]+|sp}}]
}
-poly16x8_t test_vld1q_lane_p16(poly16_t const *a, poly16x8_t b) {
+poly16x8_t test_vld1q_lane_p16(poly16_t *a, poly16x8_t b) {
// CHECK-LABEL: test_vld1q_lane_p16
return vld1q_lane_p16(a, b, 7);
- // CHECK: ld1 {v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-poly64x2_t test_vld1q_lane_p64(poly64_t const *a, poly64x2_t b) {
+poly64x2_t test_vld1q_lane_p64(poly64_t *a, poly64x2_t b) {
// CHECK-LABEL: test_vld1q_lane_p64
return vld1q_lane_p64(a, b, 1);
- // CHECK: ld1 {v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-uint8x8_t test_vld1_lane_u8(uint8_t const *a, uint8x8_t b) {
+uint8x8_t test_vld1_lane_u8(uint8_t *a, uint8x8_t b) {
// CHECK-LABEL: test_vld1_lane_u8
return vld1_lane_u8(a, b, 7);
- // CHECK: ld1 {v{{[0-9]+}}.b}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.b *}}}[7], [{{x[0-9]+|sp}}]
}
-uint16x4_t test_vld1_lane_u16(uint16_t const *a, uint16x4_t b) {
+uint16x4_t test_vld1_lane_u16(uint16_t *a, uint16x4_t b) {
// CHECK-LABEL: test_vld1_lane_u16
return vld1_lane_u16(a, b, 3);
- // CHECK: ld1 {v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-uint32x2_t test_vld1_lane_u32(uint32_t const *a, uint32x2_t b) {
+uint32x2_t test_vld1_lane_u32(uint32_t *a, uint32x2_t b) {
// CHECK-LABEL: test_vld1_lane_u32
return vld1_lane_u32(a, b, 1);
- // CHECK: ld1 {v{{[0-9]+}}.s}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.s *}}}[1], [{{x[0-9]+|sp}}]
}
-uint64x1_t test_vld1_lane_u64(uint64_t const *a, uint64x1_t b) {
+uint64x1_t test_vld1_lane_u64(uint64_t *a, uint64x1_t b) {
// CHECK-LABEL: test_vld1_lane_u64
return vld1_lane_u64(a, b, 0);
- // CHECK: ld1r {v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1r { v[0-9]+.1d }|ldr d[0-9]+}}, [{{x[0-9]+|sp}}]
}
-int8x8_t test_vld1_lane_s8(int8_t const *a, int8x8_t b) {
+int8x8_t test_vld1_lane_s8(int8_t *a, int8x8_t b) {
// CHECK-LABEL: test_vld1_lane_s8
return vld1_lane_s8(a, b, 7);
- // CHECK: ld1 {v{{[0-9]+}}.b}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.b *}}}[7], [{{x[0-9]+|sp}}]
}
-int16x4_t test_vld1_lane_s16(int16_t const *a, int16x4_t b) {
+int16x4_t test_vld1_lane_s16(int16_t *a, int16x4_t b) {
// CHECK-LABEL: test_vld1_lane_s16
return vld1_lane_s16(a, b, 3);
- // CHECK: ld1 {v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-int32x2_t test_vld1_lane_s32(int32_t const *a, int32x2_t b) {
+int32x2_t test_vld1_lane_s32(int32_t *a, int32x2_t b) {
// CHECK-LABEL: test_vld1_lane_s32
return vld1_lane_s32(a, b, 1);
- // CHECK: ld1 {v{{[0-9]+}}.s}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.s *}}}[1], [{{x[0-9]+|sp}}]
}
-int64x1_t test_vld1_lane_s64(int64_t const *a, int64x1_t b) {
+int64x1_t test_vld1_lane_s64(int64_t *a, int64x1_t b) {
// CHECK-LABEL: test_vld1_lane_s64
return vld1_lane_s64(a, b, 0);
- // CHECK: ld1r {v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1r { v[0-9]+.1d }|ldr d[0-9]+}}, [{{x[0-9]+|sp}}]
}
-float16x4_t test_vld1_lane_f16(float16_t const *a, float16x4_t b) {
+float16x4_t test_vld1_lane_f16(float16_t *a, float16x4_t b) {
// CHECK-LABEL: test_vld1_lane_f16
return vld1_lane_f16(a, b, 3);
- // CHECK: ld1 {v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-float32x2_t test_vld1_lane_f32(float32_t const *a, float32x2_t b) {
+float32x2_t test_vld1_lane_f32(float32_t *a, float32x2_t b) {
// CHECK-LABEL: test_vld1_lane_f32
return vld1_lane_f32(a, b, 1);
- // CHECK: ld1 {v{{[0-9]+}}.s}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.s *}}}[1], [{{x[0-9]+|sp}}]
}
-float64x1_t test_vld1_lane_f64(float64_t const *a, float64x1_t b) {
+float64x1_t test_vld1_lane_f64(float64_t *a, float64x1_t b) {
// CHECK-LABEL: test_vld1_lane_f64
return vld1_lane_f64(a, b, 0);
- // CHECK: ld1r {v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1r { v[0-9]+.1d }|ldr d[0-9]+}}, [{{x[0-9]+|sp}}]
}
-poly8x8_t test_vld1_lane_p8(poly8_t const *a, poly8x8_t b) {
+poly8x8_t test_vld1_lane_p8(poly8_t *a, poly8x8_t b) {
// CHECK-LABEL: test_vld1_lane_p8
return vld1_lane_p8(a, b, 7);
- // CHECK: ld1 {v{{[0-9]+}}.b}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.b *}}}[7], [{{x[0-9]+|sp}}]
}
-poly16x4_t test_vld1_lane_p16(poly16_t const *a, poly16x4_t b) {
+poly16x4_t test_vld1_lane_p16(poly16_t *a, poly16x4_t b) {
// CHECK-LABEL: test_vld1_lane_p16
return vld1_lane_p16(a, b, 3);
- // CHECK: ld1 {v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-poly64x1_t test_vld1_lane_p64(poly64_t const *a, poly64x1_t b) {
+poly64x1_t test_vld1_lane_p64(poly64_t *a, poly64x1_t b) {
// CHECK-LABEL: test_vld1_lane_p64
return vld1_lane_p64(a, b, 0);
- // CHECK: ld1r {v{{[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1r { v[0-9]+.1d }|ldr d[0-9]+}}, [{{x[0-9]+|sp}}]
}
-uint16x8x2_t test_vld2q_lane_u16(uint16_t const *a, uint16x8x2_t b) {
+int8x16x2_t test_vld2q_lane_s8(int8_t const * ptr, int8x16x2_t src) {
+ // CHECK-LABEL: test_vld2q_lane_s8
+ return vld2q_lane_s8(ptr, src, 15);
+ // CHECK: ld2 {{{ *v[0-9]+.b, v[0-9]+.b *}}}[15], [x0]
+}
+
+uint8x16x2_t test_vld2q_lane_u8(uint8_t const * ptr, uint8x16x2_t src) {
+ // CHECK-LABEL: test_vld2q_lane_u8
+ return vld2q_lane_u8(ptr, src, 15);
+ // CHECK: ld2 {{{ *v[0-9]+.b, v[0-9]+.b *}}}[15], [x0]
+}
+
+poly8x16x2_t test_vld2q_lane_p8(poly8_t const * ptr, poly8x16x2_t src) {
+ // CHECK-LABEL: test_vld2q_lane_p8
+ return vld2q_lane_p8(ptr, src, 15);
+ // CHECK: ld2 {{{ *v[0-9]+.b, v[0-9]+.b *}}}[15], [x0]
+}
+
+int8x16x3_t test_vld3q_lane_s8(int8_t const * ptr, int8x16x3_t src) {
+ // CHECK-LABEL: test_vld3q_lane_s8
+ return vld3q_lane_s8(ptr, src, 15);
+ // CHECK: ld3 {{{ *v[0-9]+.b, v[0-9]+.b, v[0-9]+.b *}}}[15], [x0]
+}
+
+uint8x16x3_t test_vld3q_lane_u8(uint8_t const * ptr, uint8x16x3_t src) {
+ // CHECK-LABEL: test_vld3q_lane_u8
+ return vld3q_lane_u8(ptr, src, 15);
+ // CHECK: ld3 {{{ *v[0-9]+.b, v[0-9]+.b, v[0-9]+.b *}}}[15], [x0]
+}
+
+uint16x8x2_t test_vld2q_lane_u16(uint16_t *a, uint16x8x2_t b) {
// CHECK-LABEL: test_vld2q_lane_u16
return vld2q_lane_u16(a, b, 7);
- // CHECK: ld2 {v{{[0-9]+}}.h, v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.h, v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-uint32x4x2_t test_vld2q_lane_u32(uint32_t const *a, uint32x4x2_t b) {
+uint32x4x2_t test_vld2q_lane_u32(uint32_t *a, uint32x4x2_t b) {
// CHECK-LABEL: test_vld2q_lane_u32
return vld2q_lane_u32(a, b, 3);
- // CHECK: ld2 {v{{[0-9]+}}.s, v{{[0-9]+}}.s}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.s, v[0-9]+.s *}}}[3], [{{x[0-9]+|sp}}]
}
-uint64x2x2_t test_vld2q_lane_u64(uint64_t const *a, uint64x2x2_t b) {
+uint64x2x2_t test_vld2q_lane_u64(uint64_t *a, uint64x2x2_t b) {
// CHECK-LABEL: test_vld2q_lane_u64
return vld2q_lane_u64(a, b, 1);
- // CHECK: ld2 {v{{[0-9]+}}.d, v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.d, v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-int16x8x2_t test_vld2q_lane_s16(int16_t const *a, int16x8x2_t b) {
+int16x8x2_t test_vld2q_lane_s16(int16_t *a, int16x8x2_t b) {
// CHECK-LABEL: test_vld2q_lane_s16
return vld2q_lane_s16(a, b, 7);
- // CHECK: ld2 {v{{[0-9]+}}.h, v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.h, v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-int32x4x2_t test_vld2q_lane_s32(int32_t const *a, int32x4x2_t b) {
+int32x4x2_t test_vld2q_lane_s32(int32_t *a, int32x4x2_t b) {
// CHECK-LABEL: test_vld2q_lane_s32
return vld2q_lane_s32(a, b, 3);
- // CHECK: ld2 {v{{[0-9]+}}.s, v{{[0-9]+}}.s}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.s, v[0-9]+.s *}}}[3], [{{x[0-9]+|sp}}]
}
-int64x2x2_t test_vld2q_lane_s64(int64_t const *a, int64x2x2_t b) {
+int64x2x2_t test_vld2q_lane_s64(int64_t *a, int64x2x2_t b) {
// CHECK-LABEL: test_vld2q_lane_s64
return vld2q_lane_s64(a, b, 1);
- // CHECK: ld2 {v{{[0-9]+}}.d, v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.d, v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-float16x8x2_t test_vld2q_lane_f16(float16_t const *a, float16x8x2_t b) {
+float16x8x2_t test_vld2q_lane_f16(float16_t *a, float16x8x2_t b) {
// CHECK-LABEL: test_vld2q_lane_f16
return vld2q_lane_f16(a, b, 7);
- // CHECK: ld2 {v{{[0-9]+}}.h, v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.h, v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-float32x4x2_t test_vld2q_lane_f32(float32_t const *a, float32x4x2_t b) {
+float32x4x2_t test_vld2q_lane_f32(float32_t *a, float32x4x2_t b) {
// CHECK-LABEL: test_vld2q_lane_f32
return vld2q_lane_f32(a, b, 3);
- // CHECK: ld2 {v{{[0-9]+}}.s, v{{[0-9]+}}.s}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.s, v[0-9]+.s *}}}[3], [{{x[0-9]+|sp}}]
}
-float64x2x2_t test_vld2q_lane_f64(float64_t const *a, float64x2x2_t b) {
+float64x2x2_t test_vld2q_lane_f64(float64_t *a, float64x2x2_t b) {
// CHECK-LABEL: test_vld2q_lane_f64
return vld2q_lane_f64(a, b, 1);
- // CHECK: ld2 {v{{[0-9]+}}.d, v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.d, v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-poly16x8x2_t test_vld2q_lane_p16(poly16_t const *a, poly16x8x2_t b) {
+poly16x8x2_t test_vld2q_lane_p16(poly16_t *a, poly16x8x2_t b) {
// CHECK-LABEL: test_vld2q_lane_p16
return vld2q_lane_p16(a, b, 7);
- // CHECK: ld2 {v{{[0-9]+}}.h, v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.h, v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-poly64x2x2_t test_vld2q_lane_p64(poly64_t const *a, poly64x2x2_t b) {
+poly64x2x2_t test_vld2q_lane_p64(poly64_t *a, poly64x2x2_t b) {
// CHECK-LABEL: test_vld2q_lane_p64
return vld2q_lane_p64(a, b, 1);
- // CHECK: ld2 {v{{[0-9]+}}.d, v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.d, v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-uint8x8x2_t test_vld2_lane_u8(uint8_t const *a, uint8x8x2_t b) {
+uint8x8x2_t test_vld2_lane_u8(uint8_t *a, uint8x8x2_t b) {
// CHECK-LABEL: test_vld2_lane_u8
return vld2_lane_u8(a, b, 7);
- // CHECK: ld2 {v{{[0-9]+}}.b, v{{[0-9]+}}.b}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.b, v[0-9]+.b *}}}[7], [{{x[0-9]+|sp}}]
}
-uint16x4x2_t test_vld2_lane_u16(uint16_t const *a, uint16x4x2_t b) {
+uint16x4x2_t test_vld2_lane_u16(uint16_t *a, uint16x4x2_t b) {
// CHECK-LABEL: test_vld2_lane_u16
return vld2_lane_u16(a, b, 3);
- // CHECK: ld2 {v{{[0-9]+}}.h, v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.h, v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-uint32x2x2_t test_vld2_lane_u32(uint32_t const *a, uint32x2x2_t b) {
+uint32x2x2_t test_vld2_lane_u32(uint32_t *a, uint32x2x2_t b) {
// CHECK-LABEL: test_vld2_lane_u32
return vld2_lane_u32(a, b, 1);
- // CHECK: ld2 {v{{[0-9]+}}.s, v{{[0-9]+}}.s}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.s, v[0-9]+.s *}}}[1], [{{x[0-9]+|sp}}]
}
-uint64x1x2_t test_vld2_lane_u64(uint64_t const *a, uint64x1x2_t b) {
+uint64x1x2_t test_vld2_lane_u64(uint64_t *a, uint64x1x2_t b) {
// CHECK-LABEL: test_vld2_lane_u64
return vld2_lane_u64(a, b, 0);
- // CHECK: ld2 {v{{[0-9]+}}.d, v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.d, v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-int8x8x2_t test_vld2_lane_s8(int8_t const *a, int8x8x2_t b) {
+int8x8x2_t test_vld2_lane_s8(int8_t *a, int8x8x2_t b) {
// CHECK-LABEL: test_vld2_lane_s8
return vld2_lane_s8(a, b, 7);
- // CHECK: ld2 {v{{[0-9]+}}.b, v{{[0-9]+}}.b}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.b, v[0-9]+.b *}}}[7], [{{x[0-9]+|sp}}]
}
-int16x4x2_t test_vld2_lane_s16(int16_t const *a, int16x4x2_t b) {
+int16x4x2_t test_vld2_lane_s16(int16_t *a, int16x4x2_t b) {
// CHECK-LABEL: test_vld2_lane_s16
return vld2_lane_s16(a, b, 3);
- // CHECK: ld2 {v{{[0-9]+}}.h, v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.h, v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-int32x2x2_t test_vld2_lane_s32(int32_t const *a, int32x2x2_t b) {
+int32x2x2_t test_vld2_lane_s32(int32_t *a, int32x2x2_t b) {
// CHECK-LABEL: test_vld2_lane_s32
return vld2_lane_s32(a, b, 1);
- // CHECK: ld2 {v{{[0-9]+}}.s, v{{[0-9]+}}.s}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.s, v[0-9]+.s *}}}[1], [{{x[0-9]+|sp}}]
}
-int64x1x2_t test_vld2_lane_s64(int64_t const *a, int64x1x2_t b) {
+int64x1x2_t test_vld2_lane_s64(int64_t *a, int64x1x2_t b) {
// CHECK-LABEL: test_vld2_lane_s64
return vld2_lane_s64(a, b, 0);
- // CHECK: ld2 {v{{[0-9]+}}.d, v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.d, v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-float16x4x2_t test_vld2_lane_f16(float16_t const *a, float16x4x2_t b) {
+float16x4x2_t test_vld2_lane_f16(float16_t *a, float16x4x2_t b) {
// CHECK-LABEL: test_vld2_lane_f16
return vld2_lane_f16(a, b, 3);
- // CHECK: ld2 {v{{[0-9]+}}.h, v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.h, v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-float32x2x2_t test_vld2_lane_f32(float32_t const *a, float32x2x2_t b) {
+float32x2x2_t test_vld2_lane_f32(float32_t *a, float32x2x2_t b) {
// CHECK-LABEL: test_vld2_lane_f32
return vld2_lane_f32(a, b, 1);
- // CHECK: ld2 {v{{[0-9]+}}.s, v{{[0-9]+}}.s}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.s, v[0-9]+.s *}}}[1], [{{x[0-9]+|sp}}]
}
-float64x1x2_t test_vld2_lane_f64(float64_t const *a, float64x1x2_t b) {
+float64x1x2_t test_vld2_lane_f64(float64_t *a, float64x1x2_t b) {
// CHECK-LABEL: test_vld2_lane_f64
return vld2_lane_f64(a, b, 0);
- // CHECK: ld2 {v{{[0-9]+}}.d, v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.d, v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-poly8x8x2_t test_vld2_lane_p8(poly8_t const *a, poly8x8x2_t b) {
+poly8x8x2_t test_vld2_lane_p8(poly8_t *a, poly8x8x2_t b) {
// CHECK-LABEL: test_vld2_lane_p8
return vld2_lane_p8(a, b, 7);
- // CHECK: ld2 {v{{[0-9]+}}.b, v{{[0-9]+}}.b}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.b, v[0-9]+.b *}}}[7], [{{x[0-9]+|sp}}]
}
-poly16x4x2_t test_vld2_lane_p16(poly16_t const *a, poly16x4x2_t b) {
+poly16x4x2_t test_vld2_lane_p16(poly16_t *a, poly16x4x2_t b) {
// CHECK-LABEL: test_vld2_lane_p16
return vld2_lane_p16(a, b, 3);
- // CHECK: ld2 {v{{[0-9]+}}.h, v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.h, v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-poly64x1x2_t test_vld2_lane_p64(poly64_t const *a, poly64x1x2_t b) {
+poly64x1x2_t test_vld2_lane_p64(poly64_t *a, poly64x1x2_t b) {
// CHECK-LABEL: test_vld2_lane_p64
return vld2_lane_p64(a, b, 0);
- // CHECK: ld2 {v{{[0-9]+}}.d, v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.d, v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-uint16x8x3_t test_vld3q_lane_u16(uint16_t const *a, uint16x8x3_t b) {
+uint16x8x3_t test_vld3q_lane_u16(uint16_t *a, uint16x8x3_t b) {
// CHECK-LABEL: test_vld3q_lane_u16
return vld3q_lane_u16(a, b, 7);
- // CHECK: ld3 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-uint32x4x3_t test_vld3q_lane_u32(uint32_t const *a, uint32x4x3_t b) {
+uint32x4x3_t test_vld3q_lane_u32(uint32_t *a, uint32x4x3_t b) {
// CHECK-LABEL: test_vld3q_lane_u32
return vld3q_lane_u32(a, b, 3);
- // CHECK: ld3 {v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.s, v[0-9]+.s, v[0-9]+.s *}}}[3], [{{x[0-9]+|sp}}]
}
-uint64x2x3_t test_vld3q_lane_u64(uint64_t const *a, uint64x2x3_t b) {
+uint64x2x3_t test_vld3q_lane_u64(uint64_t *a, uint64x2x3_t b) {
// CHECK-LABEL: test_vld3q_lane_u64
return vld3q_lane_u64(a, b, 1);
- // CHECK: ld3 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-int16x8x3_t test_vld3q_lane_s16(int16_t const *a, int16x8x3_t b) {
+int16x8x3_t test_vld3q_lane_s16(int16_t *a, int16x8x3_t b) {
// CHECK-LABEL: test_vld3q_lane_s16
return vld3q_lane_s16(a, b, 7);
- // CHECK: ld3 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-int32x4x3_t test_vld3q_lane_s32(int32_t const *a, int32x4x3_t b) {
+int32x4x3_t test_vld3q_lane_s32(int32_t *a, int32x4x3_t b) {
// CHECK-LABEL: test_vld3q_lane_s32
return vld3q_lane_s32(a, b, 3);
- // CHECK: ld3 {v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.s, v[0-9]+.s, v[0-9]+.s *}}}[3], [{{x[0-9]+|sp}}]
}
-int64x2x3_t test_vld3q_lane_s64(int64_t const *a, int64x2x3_t b) {
+int64x2x3_t test_vld3q_lane_s64(int64_t *a, int64x2x3_t b) {
// CHECK-LABEL: test_vld3q_lane_s64
return vld3q_lane_s64(a, b, 1);
- // CHECK: ld3 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-float16x8x3_t test_vld3q_lane_f16(float16_t const *a, float16x8x3_t b) {
+float16x8x3_t test_vld3q_lane_f16(float16_t *a, float16x8x3_t b) {
// CHECK-LABEL: test_vld3q_lane_f16
return vld3q_lane_f16(a, b, 7);
- // CHECK: ld3 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-float32x4x3_t test_vld3q_lane_f32(float32_t const *a, float32x4x3_t b) {
+float32x4x3_t test_vld3q_lane_f32(float32_t *a, float32x4x3_t b) {
// CHECK-LABEL: test_vld3q_lane_f32
return vld3q_lane_f32(a, b, 3);
- // CHECK: ld3 {v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.s, v[0-9]+.s, v[0-9]+.s *}}}[3], [{{x[0-9]+|sp}}]
}
-float64x2x3_t test_vld3q_lane_f64(float64_t const *a, float64x2x3_t b) {
+float64x2x3_t test_vld3q_lane_f64(float64_t *a, float64x2x3_t b) {
// CHECK-LABEL: test_vld3q_lane_f64
return vld3q_lane_f64(a, b, 1);
- // CHECK: ld3 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-poly8x16x3_t test_vld3q_lane_p8(poly8_t const *a, poly8x16x3_t b) {
+poly8x16x3_t test_vld3q_lane_p8(poly8_t *a, poly8x16x3_t b) {
// CHECK-LABEL: test_vld3q_lane_p8
return vld3q_lane_p8(a, b, 15);
- // CHECK: ld3 {v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b}[15], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.b, v[0-9]+.b, v[0-9]+.b *}}}[15], [{{x[0-9]+|sp}}]
}
-poly16x8x3_t test_vld3q_lane_p16(poly16_t const *a, poly16x8x3_t b) {
+poly16x8x3_t test_vld3q_lane_p16(poly16_t *a, poly16x8x3_t b) {
// CHECK-LABEL: test_vld3q_lane_p16
return vld3q_lane_p16(a, b, 7);
- // CHECK: ld3 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-poly64x2x3_t test_vld3q_lane_p64(poly64_t const *a, poly64x2x3_t b) {
+poly64x2x3_t test_vld3q_lane_p64(poly64_t *a, poly64x2x3_t b) {
// CHECK-LABEL: test_vld3q_lane_p64
return vld3q_lane_p64(a, b, 1);
- // CHECK: ld3 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-uint8x8x3_t test_vld3_lane_u8(uint8_t const *a, uint8x8x3_t b) {
+uint8x8x3_t test_vld3_lane_u8(uint8_t *a, uint8x8x3_t b) {
// CHECK-LABEL: test_vld3_lane_u8
return vld3_lane_u8(a, b, 7);
- // CHECK: ld3 {v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.b, v[0-9]+.b, v[0-9]+.b *}}}[7], [{{x[0-9]+|sp}}]
}
-uint16x4x3_t test_vld3_lane_u16(uint16_t const *a, uint16x4x3_t b) {
+uint16x4x3_t test_vld3_lane_u16(uint16_t *a, uint16x4x3_t b) {
// CHECK-LABEL: test_vld3_lane_u16
return vld3_lane_u16(a, b, 3);
- // CHECK: ld3 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-uint32x2x3_t test_vld3_lane_u32(uint32_t const *a, uint32x2x3_t b) {
+uint32x2x3_t test_vld3_lane_u32(uint32_t *a, uint32x2x3_t b) {
// CHECK-LABEL: test_vld3_lane_u32
return vld3_lane_u32(a, b, 1);
- // CHECK: ld3 {v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.s, v[0-9]+.s, v[0-9]+.s *}}}[1], [{{x[0-9]+|sp}}]
}
-uint64x1x3_t test_vld3_lane_u64(uint64_t const *a, uint64x1x3_t b) {
+uint64x1x3_t test_vld3_lane_u64(uint64_t *a, uint64x1x3_t b) {
// CHECK-LABEL: test_vld3_lane_u64
return vld3_lane_u64(a, b, 0);
- // CHECK: ld3 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-int8x8x3_t test_vld3_lane_s8(int8_t const *a, int8x8x3_t b) {
+int8x8x3_t test_vld3_lane_s8(int8_t *a, int8x8x3_t b) {
// CHECK-LABEL: test_vld3_lane_s8
return vld3_lane_s8(a, b, 7);
- // CHECK: ld3 {v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.b, v[0-9]+.b, v[0-9]+.b *}}}[7], [{{x[0-9]+|sp}}]
}
-int16x4x3_t test_vld3_lane_s16(int16_t const *a, int16x4x3_t b) {
+int16x4x3_t test_vld3_lane_s16(int16_t *a, int16x4x3_t b) {
// CHECK-LABEL: test_vld3_lane_s16
return vld3_lane_s16(a, b, 3);
- // CHECK: ld3 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-int32x2x3_t test_vld3_lane_s32(int32_t const *a, int32x2x3_t b) {
+int32x2x3_t test_vld3_lane_s32(int32_t *a, int32x2x3_t b) {
// CHECK-LABEL: test_vld3_lane_s32
return vld3_lane_s32(a, b, 1);
- // CHECK: ld3 {v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.s, v[0-9]+.s, v[0-9]+.s *}}}[1], [{{x[0-9]+|sp}}]
}
-int64x1x3_t test_vld3_lane_s64(int64_t const *a, int64x1x3_t b) {
+int64x1x3_t test_vld3_lane_s64(int64_t *a, int64x1x3_t b) {
// CHECK-LABEL: test_vld3_lane_s64
return vld3_lane_s64(a, b, 0);
- // CHECK: ld3 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-float16x4x3_t test_vld3_lane_f16(float16_t const *a, float16x4x3_t b) {
+float16x4x3_t test_vld3_lane_f16(float16_t *a, float16x4x3_t b) {
// CHECK-LABEL: test_vld3_lane_f16
return vld3_lane_f16(a, b, 3);
- // CHECK: ld3 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-float32x2x3_t test_vld3_lane_f32(float32_t const *a, float32x2x3_t b) {
+float32x2x3_t test_vld3_lane_f32(float32_t *a, float32x2x3_t b) {
// CHECK-LABEL: test_vld3_lane_f32
return vld3_lane_f32(a, b, 1);
- // CHECK: ld3 {v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.s, v[0-9]+.s, v[0-9]+.s *}}}[1], [{{x[0-9]+|sp}}]
}
-float64x1x3_t test_vld3_lane_f64(float64_t const *a, float64x1x3_t b) {
+float64x1x3_t test_vld3_lane_f64(float64_t *a, float64x1x3_t b) {
// CHECK-LABEL: test_vld3_lane_f64
return vld3_lane_f64(a, b, 0);
- // CHECK: ld3 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-poly8x8x3_t test_vld3_lane_p8(poly8_t const *a, poly8x8x3_t b) {
+poly8x8x3_t test_vld3_lane_p8(poly8_t *a, poly8x8x3_t b) {
// CHECK-LABEL: test_vld3_lane_p8
return vld3_lane_p8(a, b, 7);
- // CHECK: ld3 {v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.b, v[0-9]+.b, v[0-9]+.b *}}}[7], [{{x[0-9]+|sp}}]
}
-poly16x4x3_t test_vld3_lane_p16(poly16_t const *a, poly16x4x3_t b) {
+poly16x4x3_t test_vld3_lane_p16(poly16_t *a, poly16x4x3_t b) {
// CHECK-LABEL: test_vld3_lane_p16
return vld3_lane_p16(a, b, 3);
- // CHECK: ld3 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-poly64x1x3_t test_vld3_lane_p64(poly64_t const *a, poly64x1x3_t b) {
+poly64x1x3_t test_vld3_lane_p64(poly64_t *a, poly64x1x3_t b) {
// CHECK-LABEL: test_vld3_lane_p64
return vld3_lane_p64(a, b, 0);
- // CHECK: ld3 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-uint8x16x4_t test_vld4q_lane_u8(uint8_t const *a, uint8x16x4_t b) {
+uint8x16x4_t test_vld4q_lane_u8(uint8_t *a, uint8x16x4_t b) {
// CHECK-LABEL: test_vld4q_lane_u8
return vld4q_lane_u8(a, b, 15);
- // CHECK: ld4 {v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b}[15], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.b, v[0-9]+.b, v[0-9]+.b, v[0-9]+.b *}}}[15], [{{x[0-9]+|sp}}]
}
-uint16x8x4_t test_vld4q_lane_u16(uint16_t const *a, uint16x8x4_t b) {
+uint16x8x4_t test_vld4q_lane_u16(uint16_t *a, uint16x8x4_t b) {
// CHECK-LABEL: test_vld4q_lane_u16
return vld4q_lane_u16(a, b, 7);
- // CHECK: ld4 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-uint32x4x4_t test_vld4q_lane_u32(uint32_t const *a, uint32x4x4_t b) {
+uint32x4x4_t test_vld4q_lane_u32(uint32_t *a, uint32x4x4_t b) {
// CHECK-LABEL: test_vld4q_lane_u32
return vld4q_lane_u32(a, b, 3);
- // CHECK: ld4 {v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.s, v[0-9]+.s, v[0-9]+.s, v[0-9]+.s *}}}[3], [{{x[0-9]+|sp}}]
}
-uint64x2x4_t test_vld4q_lane_u64(uint64_t const *a, uint64x2x4_t b) {
+uint64x2x4_t test_vld4q_lane_u64(uint64_t *a, uint64x2x4_t b) {
// CHECK-LABEL: test_vld4q_lane_u64
return vld4q_lane_u64(a, b, 1);
- // CHECK: ld4 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-int8x16x4_t test_vld4q_lane_s8(int8_t const *a, int8x16x4_t b) {
+int8x16x4_t test_vld4q_lane_s8(int8_t *a, int8x16x4_t b) {
// CHECK-LABEL: test_vld4q_lane_s8
return vld4q_lane_s8(a, b, 15);
- // CHECK: ld4 {v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b}[15], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.b, v[0-9]+.b, v[0-9]+.b, v[0-9]+.b *}}}[15], [{{x[0-9]+|sp}}]
}
-int16x8x4_t test_vld4q_lane_s16(int16_t const *a, int16x8x4_t b) {
+int16x8x4_t test_vld4q_lane_s16(int16_t *a, int16x8x4_t b) {
// CHECK-LABEL: test_vld4q_lane_s16
return vld4q_lane_s16(a, b, 7);
- // CHECK: ld4 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-int32x4x4_t test_vld4q_lane_s32(int32_t const *a, int32x4x4_t b) {
+int32x4x4_t test_vld4q_lane_s32(int32_t *a, int32x4x4_t b) {
// CHECK-LABEL: test_vld4q_lane_s32
return vld4q_lane_s32(a, b, 3);
- // CHECK: ld4 {v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.s, v[0-9]+.s, v[0-9]+.s, v[0-9]+.s *}}}[3], [{{x[0-9]+|sp}}]
}
-int64x2x4_t test_vld4q_lane_s64(int64_t const *a, int64x2x4_t b) {
+int64x2x4_t test_vld4q_lane_s64(int64_t *a, int64x2x4_t b) {
// CHECK-LABEL: test_vld4q_lane_s64
return vld4q_lane_s64(a, b, 1);
- // CHECK: ld4 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-float16x8x4_t test_vld4q_lane_f16(float16_t const *a, float16x8x4_t b) {
+float16x8x4_t test_vld4q_lane_f16(float16_t *a, float16x8x4_t b) {
// CHECK-LABEL: test_vld4q_lane_f16
return vld4q_lane_f16(a, b, 7);
- // CHECK: ld4 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-float32x4x4_t test_vld4q_lane_f32(float32_t const *a, float32x4x4_t b) {
+float32x4x4_t test_vld4q_lane_f32(float32_t *a, float32x4x4_t b) {
// CHECK-LABEL: test_vld4q_lane_f32
return vld4q_lane_f32(a, b, 3);
- // CHECK: ld4 {v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.s, v[0-9]+.s, v[0-9]+.s, v[0-9]+.s *}}}[3], [{{x[0-9]+|sp}}]
}
-float64x2x4_t test_vld4q_lane_f64(float64_t const *a, float64x2x4_t b) {
+float64x2x4_t test_vld4q_lane_f64(float64_t *a, float64x2x4_t b) {
// CHECK-LABEL: test_vld4q_lane_f64
return vld4q_lane_f64(a, b, 1);
- // CHECK: ld4 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-poly8x16x4_t test_vld4q_lane_p8(poly8_t const *a, poly8x16x4_t b) {
+poly8x16x4_t test_vld4q_lane_p8(poly8_t *a, poly8x16x4_t b) {
// CHECK-LABEL: test_vld4q_lane_p8
return vld4q_lane_p8(a, b, 15);
- // CHECK: ld4 {v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b}[15], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.b, v[0-9]+.b, v[0-9]+.b, v[0-9]+.b *}}}[15], [{{x[0-9]+|sp}}]
}
-poly16x8x4_t test_vld4q_lane_p16(poly16_t const *a, poly16x8x4_t b) {
+poly16x8x4_t test_vld4q_lane_p16(poly16_t *a, poly16x8x4_t b) {
// CHECK-LABEL: test_vld4q_lane_p16
return vld4q_lane_p16(a, b, 7);
- // CHECK: ld4 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-poly64x2x4_t test_vld4q_lane_p64(poly64_t const *a, poly64x2x4_t b) {
+poly64x2x4_t test_vld4q_lane_p64(poly64_t *a, poly64x2x4_t b) {
// CHECK-LABEL: test_vld4q_lane_p64
return vld4q_lane_p64(a, b, 1);
- // CHECK: ld4 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-uint8x8x4_t test_vld4_lane_u8(uint8_t const *a, uint8x8x4_t b) {
+uint8x8x4_t test_vld4_lane_u8(uint8_t *a, uint8x8x4_t b) {
// CHECK-LABEL: test_vld4_lane_u8
return vld4_lane_u8(a, b, 7);
- // CHECK: ld4 {v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.b, v[0-9]+.b, v[0-9]+.b, v[0-9]+.b *}}}[7], [{{x[0-9]+|sp}}]
}
-uint16x4x4_t test_vld4_lane_u16(uint16_t const *a, uint16x4x4_t b) {
+uint16x4x4_t test_vld4_lane_u16(uint16_t *a, uint16x4x4_t b) {
// CHECK-LABEL: test_vld4_lane_u16
return vld4_lane_u16(a, b, 3);
- // CHECK: ld4 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-uint32x2x4_t test_vld4_lane_u32(uint32_t const *a, uint32x2x4_t b) {
+uint32x2x4_t test_vld4_lane_u32(uint32_t *a, uint32x2x4_t b) {
// CHECK-LABEL: test_vld4_lane_u32
return vld4_lane_u32(a, b, 1);
- // CHECK: ld4 {v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.s, v[0-9]+.s, v[0-9]+.s, v[0-9]+.s *}}}[1], [{{x[0-9]+|sp}}]
}
-uint64x1x4_t test_vld4_lane_u64(uint64_t const *a, uint64x1x4_t b) {
+uint64x1x4_t test_vld4_lane_u64(uint64_t *a, uint64x1x4_t b) {
// CHECK-LABEL: test_vld4_lane_u64
return vld4_lane_u64(a, b, 0);
- // CHECK: ld4 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-int8x8x4_t test_vld4_lane_s8(int8_t const *a, int8x8x4_t b) {
+int8x8x4_t test_vld4_lane_s8(int8_t *a, int8x8x4_t b) {
// CHECK-LABEL: test_vld4_lane_s8
return vld4_lane_s8(a, b, 7);
- // CHECK: ld4 {v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.b, v[0-9]+.b, v[0-9]+.b, v[0-9]+.b *}}}[7], [{{x[0-9]+|sp}}]
}
-int16x4x4_t test_vld4_lane_s16(int16_t const *a, int16x4x4_t b) {
+int16x4x4_t test_vld4_lane_s16(int16_t *a, int16x4x4_t b) {
// CHECK-LABEL: test_vld4_lane_s16
return vld4_lane_s16(a, b, 3);
- // CHECK: ld4 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-int32x2x4_t test_vld4_lane_s32(int32_t const *a, int32x2x4_t b) {
+int32x2x4_t test_vld4_lane_s32(int32_t *a, int32x2x4_t b) {
// CHECK-LABEL: test_vld4_lane_s32
return vld4_lane_s32(a, b, 1);
- // CHECK: ld4 {v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.s, v[0-9]+.s, v[0-9]+.s, v[0-9]+.s *}}}[1], [{{x[0-9]+|sp}}]
}
-int64x1x4_t test_vld4_lane_s64(int64_t const *a, int64x1x4_t b) {
+int64x1x4_t test_vld4_lane_s64(int64_t *a, int64x1x4_t b) {
// CHECK-LABEL: test_vld4_lane_s64
return vld4_lane_s64(a, b, 0);
- // CHECK: ld4 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-float16x4x4_t test_vld4_lane_f16(float16_t const *a, float16x4x4_t b) {
+float16x4x4_t test_vld4_lane_f16(float16_t *a, float16x4x4_t b) {
// CHECK-LABEL: test_vld4_lane_f16
return vld4_lane_f16(a, b, 3);
- // CHECK: ld4 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-float32x2x4_t test_vld4_lane_f32(float32_t const *a, float32x2x4_t b) {
+float32x2x4_t test_vld4_lane_f32(float32_t *a, float32x2x4_t b) {
// CHECK-LABEL: test_vld4_lane_f32
return vld4_lane_f32(a, b, 1);
- // CHECK: ld4 {v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s}[1], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.s, v[0-9]+.s, v[0-9]+.s, v[0-9]+.s *}}}[1], [{{x[0-9]+|sp}}]
}
-float64x1x4_t test_vld4_lane_f64(float64_t const *a, float64x1x4_t b) {
+float64x1x4_t test_vld4_lane_f64(float64_t *a, float64x1x4_t b) {
// CHECK-LABEL: test_vld4_lane_f64
return vld4_lane_f64(a, b, 0);
- // CHECK: ld4 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-poly8x8x4_t test_vld4_lane_p8(poly8_t const *a, poly8x8x4_t b) {
+poly8x8x4_t test_vld4_lane_p8(poly8_t *a, poly8x8x4_t b) {
// CHECK-LABEL: test_vld4_lane_p8
return vld4_lane_p8(a, b, 7);
- // CHECK: ld4 {v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b}[7], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.b, v[0-9]+.b, v[0-9]+.b, v[0-9]+.b *}}}[7], [{{x[0-9]+|sp}}]
}
-poly16x4x4_t test_vld4_lane_p16(poly16_t const *a, poly16x4x4_t b) {
+poly16x4x4_t test_vld4_lane_p16(poly16_t *a, poly16x4x4_t b) {
// CHECK-LABEL: test_vld4_lane_p16
return vld4_lane_p16(a, b, 3);
- // CHECK: ld4 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-poly64x1x4_t test_vld4_lane_p64(poly64_t const *a, poly64x1x4_t b) {
+poly64x1x4_t test_vld4_lane_p64(poly64_t *a, poly64x1x4_t b) {
// CHECK-LABEL: test_vld4_lane_p64
return vld4_lane_p64(a, b, 0);
- // CHECK: ld4 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-void test_vst1q_lane_u8(uint8_t const *a, uint8x16_t b) {
+void test_vst1q_lane_u8(uint8_t *a, uint8x16_t b) {
// CHECK-LABEL: test_vst1q_lane_u8
vst1q_lane_u8(a, b, 15);
- // CHECK: st1 {v{{[0-9]+}}.b}[15], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.b *}}}[15], [{{x[0-9]+|sp}}]
}
-void test_vst1q_lane_u16(uint16_t const *a, uint16x8_t b) {
+void test_vst1q_lane_u16(uint16_t *a, uint16x8_t b) {
// CHECK-LABEL: test_vst1q_lane_u16
vst1q_lane_u16(a, b, 7);
- // CHECK: st1 {v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst1q_lane_u32(uint32_t const *a, uint32x4_t b) {
+void test_vst1q_lane_u32(uint32_t *a, uint32x4_t b) {
// CHECK-LABEL: test_vst1q_lane_u32
vst1q_lane_u32(a, b, 3);
- // CHECK: st1 {v{{[0-9]+}}.s}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.s *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst1q_lane_u64(uint64_t const *a, uint64x2_t b) {
+void test_vst1q_lane_u64(uint64_t *a, uint64x2_t b) {
// CHECK-LABEL: test_vst1q_lane_u64
vst1q_lane_u64(a, b, 1);
- // CHECK: st1 {v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst1q_lane_s8(int8_t const *a, int8x16_t b) {
+void test_vst1q_lane_s8(int8_t *a, int8x16_t b) {
// CHECK-LABEL: test_vst1q_lane_s8
vst1q_lane_s8(a, b, 15);
- // CHECK: st1 {v{{[0-9]+}}.b}[15], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.b *}}}[15], [{{x[0-9]+|sp}}]
}
-void test_vst1q_lane_s16(int16_t const *a, int16x8_t b) {
+void test_vst1q_lane_s16(int16_t *a, int16x8_t b) {
// CHECK-LABEL: test_vst1q_lane_s16
vst1q_lane_s16(a, b, 7);
- // CHECK: st1 {v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst1q_lane_s32(int32_t const *a, int32x4_t b) {
+void test_vst1q_lane_s32(int32_t *a, int32x4_t b) {
// CHECK-LABEL: test_vst1q_lane_s32
vst1q_lane_s32(a, b, 3);
- // CHECK: st1 {v{{[0-9]+}}.s}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.s *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst1q_lane_s64(int64_t const *a, int64x2_t b) {
+void test_vst1q_lane_s64(int64_t *a, int64x2_t b) {
// CHECK-LABEL: test_vst1q_lane_s64
vst1q_lane_s64(a, b, 1);
- // CHECK: st1 {v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst1q_lane_f16(float16_t const *a, float16x8_t b) {
+void test_vst1q_lane_f16(float16_t *a, float16x8_t b) {
// CHECK-LABEL: test_vst1q_lane_f16
vst1q_lane_f16(a, b, 7);
- // CHECK: st1 {v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst1q_lane_f32(float32_t const *a, float32x4_t b) {
+void test_vst1q_lane_f32(float32_t *a, float32x4_t b) {
// CHECK-LABEL: test_vst1q_lane_f32
vst1q_lane_f32(a, b, 3);
- // CHECK: st1 {v{{[0-9]+}}.s}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.s *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst1q_lane_f64(float64_t const *a, float64x2_t b) {
+void test_vst1q_lane_f64(float64_t *a, float64x2_t b) {
// CHECK-LABEL: test_vst1q_lane_f64
vst1q_lane_f64(a, b, 1);
- // CHECK: st1 {v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-poly8x16_t test_vst1q_lane_p8(poly8_t const *a, poly8x16_t b) {
+void test_vst1q_lane_p8(poly8_t *a, poly8x16_t b) {
// CHECK-LABEL: test_vst1q_lane_p8
vst1q_lane_p8(a, b, 15);
- // CHECK: st1 {v{{[0-9]+}}.b}[15], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.b *}}}[15], [{{x[0-9]+|sp}}]
}
-void test_vst1q_lane_p16(poly16_t const *a, poly16x8_t b) {
+void test_vst1q_lane_p16(poly16_t *a, poly16x8_t b) {
// CHECK-LABEL: test_vst1q_lane_p16
vst1q_lane_p16(a, b, 7);
- // CHECK: st1 {v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst1q_lane_p64(poly64_t const *a, poly64x2_t b) {
+void test_vst1q_lane_p64(poly64_t *a, poly64x2_t b) {
// CHECK-LABEL: test_vst1q_lane_p64
vst1q_lane_p64(a, b, 1);
- // CHECK: st1 {v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst1_lane_u8(uint8_t const *a, uint8x8_t b) {
+void test_vst1_lane_u8(uint8_t *a, uint8x8_t b) {
// CHECK-LABEL: test_vst1_lane_u8
vst1_lane_u8(a, b, 7);
- // CHECK: st1 {v{{[0-9]+}}.b}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.b *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst1_lane_u16(uint16_t const *a, uint16x4_t b) {
+void test_vst1_lane_u16(uint16_t *a, uint16x4_t b) {
// CHECK-LABEL: test_vst1_lane_u16
vst1_lane_u16(a, b, 3);
- // CHECK: st1 {v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst1_lane_u32(uint32_t const *a, uint32x2_t b) {
+void test_vst1_lane_u32(uint32_t *a, uint32x2_t b) {
// CHECK-LABEL: test_vst1_lane_u32
vst1_lane_u32(a, b, 1);
- // CHECK: st1 {v{{[0-9]+}}.s}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.s *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst1_lane_u64(uint64_t const *a, uint64x1_t b) {
+void test_vst1_lane_u64(uint64_t *a, uint64x1_t b) {
// CHECK-LABEL: test_vst1_lane_u64
vst1_lane_u64(a, b, 0);
- // CHECK: st1 {v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-void test_vst1_lane_s8(int8_t const *a, int8x8_t b) {
+void test_vst1_lane_s8(int8_t *a, int8x8_t b) {
// CHECK-LABEL: test_vst1_lane_s8
vst1_lane_s8(a, b, 7);
- // CHECK: st1 {v{{[0-9]+}}.b}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.b *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst1_lane_s16(int16_t const *a, int16x4_t b) {
+void test_vst1_lane_s16(int16_t *a, int16x4_t b) {
// CHECK-LABEL: test_vst1_lane_s16
vst1_lane_s16(a, b, 3);
- // CHECK: st1 {v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst1_lane_s32(int32_t const *a, int32x2_t b) {
+void test_vst1_lane_s32(int32_t *a, int32x2_t b) {
// CHECK-LABEL: test_vst1_lane_s32
vst1_lane_s32(a, b, 1);
- // CHECK: st1 {v{{[0-9]+}}.s}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.s *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst1_lane_s64(int64_t const *a, int64x1_t b) {
+void test_vst1_lane_s64(int64_t *a, int64x1_t b) {
// CHECK-LABEL: test_vst1_lane_s64
vst1_lane_s64(a, b, 0);
- // CHECK: st1 {v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-void test_vst1_lane_f16(float16_t const *a, float16x4_t b) {
+void test_vst1_lane_f16(float16_t *a, float16x4_t b) {
// CHECK-LABEL: test_vst1_lane_f16
vst1_lane_f16(a, b, 3);
- // CHECK: st1 {v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst1_lane_f32(float32_t const *a, float32x2_t b) {
+void test_vst1_lane_f32(float32_t *a, float32x2_t b) {
// CHECK-LABEL: test_vst1_lane_f32
vst1_lane_f32(a, b, 1);
- // CHECK: st1 {v{{[0-9]+}}.s}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.s *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst1_lane_f64(float64_t const *a, float64x1_t b) {
+void test_vst1_lane_f64(float64_t *a, float64x1_t b) {
// CHECK-LABEL: test_vst1_lane_f64
vst1_lane_f64(a, b, 0);
- // CHECK: st1 {v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: {{st1 { v[0-9]+.d }\[0]|str d[0-9]+}}, [{{x[0-9]+|sp}}]
}
-void test_vst1_lane_p8(poly8_t const *a, poly8x8_t b) {
+void test_vst1_lane_p8(poly8_t *a, poly8x8_t b) {
// CHECK-LABEL: test_vst1_lane_p8
vst1_lane_p8(a, b, 7);
- // CHECK: st1 {v{{[0-9]+}}.b}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.b *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst1_lane_p16(poly16_t const *a, poly16x4_t b) {
+void test_vst1_lane_p16(poly16_t *a, poly16x4_t b) {
// CHECK-LABEL: test_vst1_lane_p16
vst1_lane_p16(a, b, 3);
- // CHECK: st1 {v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst1_lane_p64(poly64_t const *a, poly64x1_t b) {
+void test_vst1_lane_p64(poly64_t *a, poly64x1_t b) {
// CHECK-LABEL: test_vst1_lane_p64
vst1_lane_p64(a, b, 0);
- // CHECK: st1 {v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-void test_vst2q_lane_u8(uint8_t const *a, uint8x16x2_t b) {
+void test_vst2q_lane_u8(uint8_t *a, uint8x16x2_t b) {
// CHECK-LABEL: test_vst2q_lane_u8
vst2q_lane_u8(a, b, 15);
- // CHECK: st2 {v{{[0-9]+}}.b, v{{[0-9]+}}.b}[15], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.b, v[0-9]+.b *}}}[15], [{{x[0-9]+|sp}}]
}
-void test_vst2q_lane_u16(uint16_t const *a, uint16x8x2_t b) {
+void test_vst2q_lane_u16(uint16_t *a, uint16x8x2_t b) {
// CHECK-LABEL: test_vst2q_lane_u16
vst2q_lane_u16(a, b, 7);
- // CHECK: st2 {v{{[0-9]+}}.h, v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.h, v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst2q_lane_u32(uint32_t const *a, uint32x4x2_t b) {
+void test_vst2q_lane_u32(uint32_t *a, uint32x4x2_t b) {
// CHECK-LABEL: test_vst2q_lane_u32
vst2q_lane_u32(a, b, 3);
- // CHECK: st2 {v{{[0-9]+}}.s, v{{[0-9]+}}.s}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.s, v[0-9]+.s *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst2q_lane_u64(uint64_t const *a, uint64x2x2_t b) {
+void test_vst2q_lane_u64(uint64_t *a, uint64x2x2_t b) {
// CHECK-LABEL: test_vst2q_lane_u64
vst2q_lane_u64(a, b, 1);
- // CHECK: st2 {v{{[0-9]+}}.d, v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.d, v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst2q_lane_s8(int8_t const *a, int8x16x2_t b) {
+void test_vst2q_lane_s8(int8_t *a, int8x16x2_t b) {
// CHECK-LABEL: test_vst2q_lane_s8
vst2q_lane_s8(a, b, 15);
- // CHECK: st2 {v{{[0-9]+}}.b, v{{[0-9]+}}.b}[15], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.b, v[0-9]+.b *}}}[15], [{{x[0-9]+|sp}}]
}
-void test_vst2q_lane_s16(int16_t const *a, int16x8x2_t b) {
+void test_vst2q_lane_s16(int16_t *a, int16x8x2_t b) {
// CHECK-LABEL: test_vst2q_lane_s16
vst2q_lane_s16(a, b, 7);
- // CHECK: st2 {v{{[0-9]+}}.h, v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.h, v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst2q_lane_s32(int32_t const *a, int32x4x2_t b) {
+void test_vst2q_lane_s32(int32_t *a, int32x4x2_t b) {
// CHECK-LABEL: test_vst2q_lane_s32
vst2q_lane_s32(a, b, 3);
- // CHECK: st2 {v{{[0-9]+}}.s, v{{[0-9]+}}.s}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.s, v[0-9]+.s *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst2q_lane_s64(int64_t const *a, int64x2x2_t b) {
+void test_vst2q_lane_s64(int64_t *a, int64x2x2_t b) {
// CHECK-LABEL: test_vst2q_lane_s64
vst2q_lane_s64(a, b, 1);
- // CHECK: st2 {v{{[0-9]+}}.d, v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.d, v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst2q_lane_f16(float16_t const *a, float16x8x2_t b) {
+void test_vst2q_lane_f16(float16_t *a, float16x8x2_t b) {
// CHECK-LABEL: test_vst2q_lane_f16
vst2q_lane_f16(a, b, 7);
- // CHECK: st2 {v{{[0-9]+}}.h, v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.h, v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst2q_lane_f32(float32_t const *a, float32x4x2_t b) {
+void test_vst2q_lane_f32(float32_t *a, float32x4x2_t b) {
// CHECK-LABEL: test_vst2q_lane_f32
vst2q_lane_f32(a, b, 3);
- // CHECK: st2 {v{{[0-9]+}}.s, v{{[0-9]+}}.s}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.s, v[0-9]+.s *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst2q_lane_f64(float64_t const *a, float64x2x2_t b) {
+void test_vst2q_lane_f64(float64_t *a, float64x2x2_t b) {
// CHECK-LABEL: test_vst2q_lane_f64
vst2q_lane_f64(a, b, 1);
- // CHECK: st2 {v{{[0-9]+}}.d, v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.d, v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst2q_lane_p8(poly8_t const *a, poly8x16x2_t b) {
+void test_vst2q_lane_p8(poly8_t *a, poly8x16x2_t b) {
// CHECK-LABEL: test_vst2q_lane_p8
vst2q_lane_p8(a, b, 15);
- // CHECK: st2 {v{{[0-9]+}}.b, v{{[0-9]+}}.b}[15], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.b, v[0-9]+.b *}}}[15], [{{x[0-9]+|sp}}]
}
-void test_vst2q_lane_p16(poly16_t const *a, poly16x8x2_t b) {
+void test_vst2q_lane_p16(poly16_t *a, poly16x8x2_t b) {
// CHECK-LABEL: test_vst2q_lane_p16
vst2q_lane_p16(a, b, 7);
- // CHECK: st2 {v{{[0-9]+}}.h, v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.h, v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst2q_lane_p64(poly64_t const *a, poly64x2x2_t b) {
+void test_vst2q_lane_p64(poly64_t *a, poly64x2x2_t b) {
// CHECK-LABEL: test_vst2q_lane_p64
vst2q_lane_p64(a, b, 1);
- // CHECK: st2 {v{{[0-9]+}}.d, v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.d, v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst2_lane_u8(uint8_t const *a, uint8x8x2_t b) {
+void test_vst2_lane_u8(uint8_t *a, uint8x8x2_t b) {
// CHECK-LABEL: test_vst2_lane_u8
vst2_lane_u8(a, b, 7);
- // CHECK: st2 {v{{[0-9]+}}.b, v{{[0-9]+}}.b}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.b, v[0-9]+.b *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst2_lane_u16(uint16_t const *a, uint16x4x2_t b) {
+void test_vst2_lane_u16(uint16_t *a, uint16x4x2_t b) {
// CHECK-LABEL: test_vst2_lane_u16
vst2_lane_u16(a, b, 3);
- // CHECK: st2 {v{{[0-9]+}}.h, v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.h, v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst2_lane_u32(uint32_t const *a, uint32x2x2_t b) {
+void test_vst2_lane_u32(uint32_t *a, uint32x2x2_t b) {
// CHECK-LABEL: test_vst2_lane_u32
vst2_lane_u32(a, b, 1);
- // CHECK: st2 {v{{[0-9]+}}.s, v{{[0-9]+}}.s}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.s, v[0-9]+.s *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst2_lane_u64(uint64_t const *a, uint64x1x2_t b) {
+void test_vst2_lane_u64(uint64_t *a, uint64x1x2_t b) {
// CHECK-LABEL: test_vst2_lane_u64
vst2_lane_u64(a, b, 0);
- // CHECK: st2 {v{{[0-9]+}}.d, v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.d, v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-void test_vst2_lane_s8(int8_t const *a, int8x8x2_t b) {
+void test_vst2_lane_s8(int8_t *a, int8x8x2_t b) {
// CHECK-LABEL: test_vst2_lane_s8
vst2_lane_s8(a, b, 7);
- // CHECK: st2 {v{{[0-9]+}}.b, v{{[0-9]+}}.b}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.b, v[0-9]+.b *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst2_lane_s16(int16_t const *a, int16x4x2_t b) {
+void test_vst2_lane_s16(int16_t *a, int16x4x2_t b) {
// CHECK-LABEL: test_vst2_lane_s16
vst2_lane_s16(a, b, 3);
- // CHECK: st2 {v{{[0-9]+}}.h, v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.h, v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst2_lane_s32(int32_t const *a, int32x2x2_t b) {
+void test_vst2_lane_s32(int32_t *a, int32x2x2_t b) {
// CHECK-LABEL: test_vst2_lane_s32
vst2_lane_s32(a, b, 1);
- // CHECK: st2 {v{{[0-9]+}}.s, v{{[0-9]+}}.s}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.s, v[0-9]+.s *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst2_lane_s64(int64_t const *a, int64x1x2_t b) {
+void test_vst2_lane_s64(int64_t *a, int64x1x2_t b) {
// CHECK-LABEL: test_vst2_lane_s64
vst2_lane_s64(a, b, 0);
- // CHECK: st2 {v{{[0-9]+}}.d, v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.d, v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-void test_vst2_lane_f16(float16_t const *a, float16x4x2_t b) {
+void test_vst2_lane_f16(float16_t *a, float16x4x2_t b) {
// CHECK-LABEL: test_vst2_lane_f16
vst2_lane_f16(a, b, 3);
- // CHECK: st2 {v{{[0-9]+}}.h, v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.h, v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst2_lane_f32(float32_t const *a, float32x2x2_t b) {
+void test_vst2_lane_f32(float32_t *a, float32x2x2_t b) {
// CHECK-LABEL: test_vst2_lane_f32
vst2_lane_f32(a, b, 1);
- // CHECK: st2 {v{{[0-9]+}}.s, v{{[0-9]+}}.s}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.s, v[0-9]+.s *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst2_lane_f64(float64_t const *a, float64x1x2_t b) {
+void test_vst2_lane_f64(float64_t *a, float64x1x2_t b) {
// CHECK-LABEL: test_vst2_lane_f64
vst2_lane_f64(a, b, 0);
- // CHECK: st2 {v{{[0-9]+}}.d, v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.d, v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-void test_vst2_lane_p8(poly8_t const *a, poly8x8x2_t b) {
+void test_vst2_lane_p8(poly8_t *a, poly8x8x2_t b) {
// CHECK-LABEL: test_vst2_lane_p8
vst2_lane_p8(a, b, 7);
- // CHECK: st2 {v{{[0-9]+}}.b, v{{[0-9]+}}.b}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.b, v[0-9]+.b *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst2_lane_p16(poly16_t const *a, poly16x4x2_t b) {
+void test_vst2_lane_p16(poly16_t *a, poly16x4x2_t b) {
// CHECK-LABEL: test_vst2_lane_p16
vst2_lane_p16(a, b, 3);
- // CHECK: st2 {v{{[0-9]+}}.h, v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.h, v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst2_lane_p64(poly64_t const *a, poly64x1x2_t b) {
+void test_vst2_lane_p64(poly64_t *a, poly64x1x2_t b) {
// CHECK-LABEL: test_vst2_lane_p64
vst2_lane_p64(a, b, 0);
- // CHECK: st2 {v{{[0-9]+}}.d, v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.d, v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-void test_vst3q_lane_u8(uint8_t const *a, uint8x16x3_t b) {
+void test_vst3q_lane_u8(uint8_t *a, uint8x16x3_t b) {
// CHECK-LABEL: test_vst3q_lane_u8
vst3q_lane_u8(a, b, 15);
- // CHECK: st3 {v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b}[15], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.b, v[0-9]+.b, v[0-9]+.b *}}}[15], [{{x[0-9]+|sp}}]
}
-void test_vst3q_lane_u16(uint16_t const *a, uint16x8x3_t b) {
+void test_vst3q_lane_u16(uint16_t *a, uint16x8x3_t b) {
// CHECK-LABEL: test_vst3q_lane_u16
vst3q_lane_u16(a, b, 7);
- // CHECK: st3 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst3q_lane_u32(uint32_t const *a, uint32x4x3_t b) {
+void test_vst3q_lane_u32(uint32_t *a, uint32x4x3_t b) {
// CHECK-LABEL: test_vst3q_lane_u32
vst3q_lane_u32(a, b, 3);
- // CHECK: st3 {v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.s, v[0-9]+.s, v[0-9]+.s *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst3q_lane_u64(uint64_t const *a, uint64x2x3_t b) {
+void test_vst3q_lane_u64(uint64_t *a, uint64x2x3_t b) {
// CHECK-LABEL: test_vst3q_lane_u64
vst3q_lane_u64(a, b, 1);
- // CHECK: st3 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst3q_lane_s8(int8_t const *a, int8x16x3_t b) {
+void test_vst3q_lane_s8(int8_t *a, int8x16x3_t b) {
// CHECK-LABEL: test_vst3q_lane_s8
vst3q_lane_s8(a, b, 15);
- // CHECK: st3 {v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b}[15], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.b, v[0-9]+.b, v[0-9]+.b *}}}[15], [{{x[0-9]+|sp}}]
}
-void test_vst3q_lane_s16(int16_t const *a, int16x8x3_t b) {
+void test_vst3q_lane_s16(int16_t *a, int16x8x3_t b) {
// CHECK-LABEL: test_vst3q_lane_s16
vst3q_lane_s16(a, b, 7);
- // CHECK: st3 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst3q_lane_s32(int32_t const *a, int32x4x3_t b) {
+void test_vst3q_lane_s32(int32_t *a, int32x4x3_t b) {
// CHECK-LABEL: test_vst3q_lane_s32
vst3q_lane_s32(a, b, 3);
- // CHECK: st3 {v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.s, v[0-9]+.s, v[0-9]+.s *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst3q_lane_s64(int64_t const *a, int64x2x3_t b) {
+void test_vst3q_lane_s64(int64_t *a, int64x2x3_t b) {
// CHECK-LABEL: test_vst3q_lane_s64
vst3q_lane_s64(a, b, 1);
- // CHECK: st3 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst3q_lane_f16(float16_t const *a, float16x8x3_t b) {
+void test_vst3q_lane_f16(float16_t *a, float16x8x3_t b) {
// CHECK-LABEL: test_vst3q_lane_f16
vst3q_lane_f16(a, b, 7);
- // CHECK: st3 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst3q_lane_f32(float32_t const *a, float32x4x3_t b) {
+void test_vst3q_lane_f32(float32_t *a, float32x4x3_t b) {
// CHECK-LABEL: test_vst3q_lane_f32
vst3q_lane_f32(a, b, 3);
- // CHECK: st3 {v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.s, v[0-9]+.s, v[0-9]+.s *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst3q_lane_f64(float64_t const *a, float64x2x3_t b) {
+void test_vst3q_lane_f64(float64_t *a, float64x2x3_t b) {
// CHECK-LABEL: test_vst3q_lane_f64
vst3q_lane_f64(a, b, 1);
- // CHECK: st3 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst3q_lane_p8(poly8_t const *a, poly8x16x3_t b) {
+void test_vst3q_lane_p8(poly8_t *a, poly8x16x3_t b) {
// CHECK-LABEL: test_vst3q_lane_p8
vst3q_lane_p8(a, b, 15);
- // CHECK: st3 {v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b}[15], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.b, v[0-9]+.b, v[0-9]+.b *}}}[15], [{{x[0-9]+|sp}}]
}
-void test_vst3q_lane_p16(poly16_t const *a, poly16x8x3_t b) {
+void test_vst3q_lane_p16(poly16_t *a, poly16x8x3_t b) {
// CHECK-LABEL: test_vst3q_lane_p16
vst3q_lane_p16(a, b, 7);
- // CHECK: st3 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst3q_lane_p64(poly64_t const *a, poly64x2x3_t b) {
+void test_vst3q_lane_p64(poly64_t *a, poly64x2x3_t b) {
// CHECK-LABEL: test_vst3q_lane_p64
vst3q_lane_p64(a, b, 1);
- // CHECK: st3 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst3_lane_u8(uint8_t const *a, uint8x8x3_t b) {
+void test_vst3_lane_u8(uint8_t *a, uint8x8x3_t b) {
// CHECK-LABEL: test_vst3_lane_u8
vst3_lane_u8(a, b, 7);
- // CHECK: st3 {v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.b, v[0-9]+.b, v[0-9]+.b *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst3_lane_u16(uint16_t const *a, uint16x4x3_t b) {
+void test_vst3_lane_u16(uint16_t *a, uint16x4x3_t b) {
// CHECK-LABEL: test_vst3_lane_u16
vst3_lane_u16(a, b, 3);
- // CHECK: st3 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst3_lane_u32(uint32_t const *a, uint32x2x3_t b) {
+void test_vst3_lane_u32(uint32_t *a, uint32x2x3_t b) {
// CHECK-LABEL: test_vst3_lane_u32
vst3_lane_u32(a, b, 1);
- // CHECK: st3 {v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.s, v[0-9]+.s, v[0-9]+.s *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst3_lane_u64(uint64_t const *a, uint64x1x3_t b) {
+void test_vst3_lane_u64(uint64_t *a, uint64x1x3_t b) {
// CHECK-LABEL: test_vst3_lane_u64
vst3_lane_u64(a, b, 0);
- // CHECK: st3 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-void test_vst3_lane_s8(int8_t const *a, int8x8x3_t b) {
+void test_vst3_lane_s8(int8_t *a, int8x8x3_t b) {
// CHECK-LABEL: test_vst3_lane_s8
vst3_lane_s8(a, b, 7);
- // CHECK: st3 {v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.b, v[0-9]+.b, v[0-9]+.b *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst3_lane_s16(int16_t const *a, int16x4x3_t b) {
+void test_vst3_lane_s16(int16_t *a, int16x4x3_t b) {
// CHECK-LABEL: test_vst3_lane_s16
vst3_lane_s16(a, b, 3);
- // CHECK: st3 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst3_lane_s32(int32_t const *a, int32x2x3_t b) {
+void test_vst3_lane_s32(int32_t *a, int32x2x3_t b) {
// CHECK-LABEL: test_vst3_lane_s32
vst3_lane_s32(a, b, 1);
- // CHECK: st3 {v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.s, v[0-9]+.s, v[0-9]+.s *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst3_lane_s64(int64_t const *a, int64x1x3_t b) {
+void test_vst3_lane_s64(int64_t *a, int64x1x3_t b) {
// CHECK-LABEL: test_vst3_lane_s64
vst3_lane_s64(a, b, 0);
- // CHECK: st3 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-void test_vst3_lane_f16(float16_t const *a, float16x4x3_t b) {
+void test_vst3_lane_f16(float16_t *a, float16x4x3_t b) {
// CHECK-LABEL: test_vst3_lane_f16
vst3_lane_f16(a, b, 3);
- // CHECK: st3 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst3_lane_f32(float32_t const *a, float32x2x3_t b) {
+void test_vst3_lane_f32(float32_t *a, float32x2x3_t b) {
// CHECK-LABEL: test_vst3_lane_f32
vst3_lane_f32(a, b, 1);
- // CHECK: st3 {v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.s, v[0-9]+.s, v[0-9]+.s *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst3_lane_f64(float64_t const *a, float64x1x3_t b) {
+void test_vst3_lane_f64(float64_t *a, float64x1x3_t b) {
// CHECK-LABEL: test_vst3_lane_f64
vst3_lane_f64(a, b, 0);
- // CHECK: st3 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-void test_vst3_lane_p8(poly8_t const *a, poly8x8x3_t b) {
+void test_vst3_lane_p8(poly8_t *a, poly8x8x3_t b) {
// CHECK-LABEL: test_vst3_lane_p8
vst3_lane_p8(a, b, 7);
- // CHECK: st3 {v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.b, v[0-9]+.b, v[0-9]+.b *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst3_lane_p16(poly16_t const *a, poly16x4x3_t b) {
+void test_vst3_lane_p16(poly16_t *a, poly16x4x3_t b) {
// CHECK-LABEL: test_vst3_lane_p16
vst3_lane_p16(a, b, 3);
- // CHECK: st3 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst3_lane_p64(poly64_t const *a, poly64x1x3_t b) {
+void test_vst3_lane_p64(poly64_t *a, poly64x1x3_t b) {
// CHECK-LABEL: test_vst3_lane_p64
vst3_lane_p64(a, b, 0);
- // CHECK: st3 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-void test_vst4q_lane_u8(uint16_t const *a, uint8x16x4_t b) {
+void test_vst4q_lane_u8(uint8_t *a, uint8x16x4_t b) {
// CHECK-LABEL: test_vst4q_lane_u8
vst4q_lane_u8(a, b, 15);
- // CHECK: st4 {v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b}[15], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.b, v[0-9]+.b, v[0-9]+.b, v[0-9]+.b *}}}[15], [{{x[0-9]+|sp}}]
}
-void test_vst4q_lane_u16(uint16_t const *a, uint16x8x4_t b) {
+void test_vst4q_lane_u16(uint16_t *a, uint16x8x4_t b) {
// CHECK-LABEL: test_vst4q_lane_u16
vst4q_lane_u16(a, b, 7);
- // CHECK: st4 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst4q_lane_u32(uint32_t const *a, uint32x4x4_t b) {
+void test_vst4q_lane_u32(uint32_t *a, uint32x4x4_t b) {
// CHECK-LABEL: test_vst4q_lane_u32
vst4q_lane_u32(a, b, 3);
- // CHECK: st4 {v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.s, v[0-9]+.s, v[0-9]+.s, v[0-9]+.s *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst4q_lane_u64(uint64_t const *a, uint64x2x4_t b) {
+void test_vst4q_lane_u64(uint64_t *a, uint64x2x4_t b) {
// CHECK-LABEL: test_vst4q_lane_u64
vst4q_lane_u64(a, b, 1);
- // CHECK: st4 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst4q_lane_s8(int16_t const *a, int8x16x4_t b) {
+void test_vst4q_lane_s8(int8_t *a, int8x16x4_t b) {
// CHECK-LABEL: test_vst4q_lane_s8
vst4q_lane_s8(a, b, 15);
- // CHECK: st4 {v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b}[15], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.b, v[0-9]+.b, v[0-9]+.b, v[0-9]+.b *}}}[15], [{{x[0-9]+|sp}}]
}
-void test_vst4q_lane_s16(int16_t const *a, int16x8x4_t b) {
+void test_vst4q_lane_s16(int16_t *a, int16x8x4_t b) {
// CHECK-LABEL: test_vst4q_lane_s16
vst4q_lane_s16(a, b, 7);
- // CHECK: st4 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst4q_lane_s32(int32_t const *a, int32x4x4_t b) {
+void test_vst4q_lane_s32(int32_t *a, int32x4x4_t b) {
// CHECK-LABEL: test_vst4q_lane_s32
vst4q_lane_s32(a, b, 3);
- // CHECK: st4 {v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.s, v[0-9]+.s, v[0-9]+.s, v[0-9]+.s *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst4q_lane_s64(int64_t const *a, int64x2x4_t b) {
+void test_vst4q_lane_s64(int64_t *a, int64x2x4_t b) {
// CHECK-LABEL: test_vst4q_lane_s64
vst4q_lane_s64(a, b, 1);
- // CHECK: st4 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst4q_lane_f16(float16_t const *a, float16x8x4_t b) {
+void test_vst4q_lane_f16(float16_t *a, float16x8x4_t b) {
// CHECK-LABEL: test_vst4q_lane_f16
vst4q_lane_f16(a, b, 7);
- // CHECK: st4 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst4q_lane_f32(float32_t const *a, float32x4x4_t b) {
+void test_vst4q_lane_f32(float32_t *a, float32x4x4_t b) {
// CHECK-LABEL: test_vst4q_lane_f32
vst4q_lane_f32(a, b, 3);
- // CHECK: st4 {v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.s, v[0-9]+.s, v[0-9]+.s, v[0-9]+.s *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst4q_lane_f64(float64_t const *a, float64x2x4_t b) {
+void test_vst4q_lane_f64(float64_t *a, float64x2x4_t b) {
// CHECK-LABEL: test_vst4q_lane_f64
vst4q_lane_f64(a, b, 1);
- // CHECK: st4 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst4q_lane_p8(poly16_t const *a, poly8x16x4_t b) {
+void test_vst4q_lane_p8(poly8_t *a, poly8x16x4_t b) {
// CHECK-LABEL: test_vst4q_lane_p8
vst4q_lane_p8(a, b, 15);
- // CHECK: st4 {v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b}[15], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.b, v[0-9]+.b, v[0-9]+.b, v[0-9]+.b *}}}[15], [{{x[0-9]+|sp}}]
}
-void test_vst4q_lane_p16(poly16_t const *a, poly16x8x4_t b) {
+void test_vst4q_lane_p16(poly16_t *a, poly16x8x4_t b) {
// CHECK-LABEL: test_vst4q_lane_p16
vst4q_lane_p16(a, b, 7);
- // CHECK: st4 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst4q_lane_p64(poly64_t const *a, poly64x2x4_t b) {
+void test_vst4q_lane_p64(poly64_t *a, poly64x2x4_t b) {
// CHECK-LABEL: test_vst4q_lane_p64
vst4q_lane_p64(a, b, 1);
- // CHECK: st4 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst4_lane_u8(uint8_t const *a, uint8x8x4_t b) {
+void test_vst4_lane_u8(uint8_t *a, uint8x8x4_t b) {
// CHECK-LABEL: test_vst4_lane_u8
vst4_lane_u8(a, b, 7);
- // CHECK: st4 {v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.b, v[0-9]+.b, v[0-9]+.b, v[0-9]+.b *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst4_lane_u16(uint16_t const *a, uint16x4x4_t b) {
+void test_vst4_lane_u16(uint16_t *a, uint16x4x4_t b) {
// CHECK-LABEL: test_vst4_lane_u16
vst4_lane_u16(a, b, 3);
- // CHECK: st4 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst4_lane_u32(uint32_t const *a, uint32x2x4_t b) {
+void test_vst4_lane_u32(uint32_t *a, uint32x2x4_t b) {
// CHECK-LABEL: test_vst4_lane_u32
vst4_lane_u32(a, b, 1);
- // CHECK: st4 {v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.s, v[0-9]+.s, v[0-9]+.s, v[0-9]+.s *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst4_lane_u64(uint64_t const *a, uint64x1x4_t b) {
+void test_vst4_lane_u64(uint64_t *a, uint64x1x4_t b) {
// CHECK-LABEL: test_vst4_lane_u64
vst4_lane_u64(a, b, 0);
- // CHECK: st4 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-void test_vst4_lane_s8(int8_t const *a, int8x8x4_t b) {
+void test_vst4_lane_s8(int8_t *a, int8x8x4_t b) {
// CHECK-LABEL: test_vst4_lane_s8
vst4_lane_s8(a, b, 7);
- // CHECK: st4 {v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.b, v[0-9]+.b, v[0-9]+.b, v[0-9]+.b *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst4_lane_s16(int16_t const *a, int16x4x4_t b) {
+void test_vst4_lane_s16(int16_t *a, int16x4x4_t b) {
// CHECK-LABEL: test_vst4_lane_s16
vst4_lane_s16(a, b, 3);
- // CHECK: st4 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst4_lane_s32(int32_t const *a, int32x2x4_t b) {
+void test_vst4_lane_s32(int32_t *a, int32x2x4_t b) {
// CHECK-LABEL: test_vst4_lane_s32
vst4_lane_s32(a, b, 1);
- // CHECK: st4 {v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.s, v[0-9]+.s, v[0-9]+.s, v[0-9]+.s *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst4_lane_s64(int64_t const *a, int64x1x4_t b) {
+void test_vst4_lane_s64(int64_t *a, int64x1x4_t b) {
// CHECK-LABEL: test_vst4_lane_s64
vst4_lane_s64(a, b, 0);
- // CHECK: st4 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-void test_vst4_lane_f16(float16_t const *a, float16x4x4_t b) {
+void test_vst4_lane_f16(float16_t *a, float16x4x4_t b) {
// CHECK-LABEL: test_vst4_lane_f16
vst4_lane_f16(a, b, 3);
- // CHECK: st4 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst4_lane_f32(float32_t const *a, float32x2x4_t b) {
+void test_vst4_lane_f32(float32_t *a, float32x2x4_t b) {
// CHECK-LABEL: test_vst4_lane_f32
vst4_lane_f32(a, b, 1);
- // CHECK: st4 {v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s, v{{[0-9]+}}.s}[1], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.s, v[0-9]+.s, v[0-9]+.s, v[0-9]+.s *}}}[1], [{{x[0-9]+|sp}}]
}
-void test_vst4_lane_f64(float64_t const *a, float64x1x4_t b) {
+void test_vst4_lane_f64(float64_t *a, float64x1x4_t b) {
// CHECK-LABEL: test_vst4_lane_f64
vst4_lane_f64(a, b, 0);
- // CHECK: st4 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
-void test_vst4_lane_p8(poly8_t const *a, poly8x8x4_t b) {
+void test_vst4_lane_p8(poly8_t *a, poly8x8x4_t b) {
// CHECK-LABEL: test_vst4_lane_p8
vst4_lane_p8(a, b, 7);
- // CHECK: st4 {v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b, v{{[0-9]+}}.b}[7], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.b, v[0-9]+.b, v[0-9]+.b, v[0-9]+.b *}}}[7], [{{x[0-9]+|sp}}]
}
-void test_vst4_lane_p16(poly16_t const *a, poly16x4x4_t b) {
+void test_vst4_lane_p16(poly16_t *a, poly16x4x4_t b) {
// CHECK-LABEL: test_vst4_lane_p16
vst4_lane_p16(a, b, 3);
- // CHECK: st4 {v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h, v{{[0-9]+}}.h}[3], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.h, v[0-9]+.h, v[0-9]+.h, v[0-9]+.h *}}}[3], [{{x[0-9]+|sp}}]
}
-void test_vst4_lane_p64(poly64_t const *a, poly64x1x4_t b) {
+void test_vst4_lane_p64(poly64_t *a, poly64x1x4_t b) {
// CHECK-LABEL: test_vst4_lane_p64
vst4_lane_p64(a, b, 0);
- // CHECK: st4 {v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d, v{{[0-9]+}}.d}[0], [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.d, v[0-9]+.d, v[0-9]+.d, v[0-9]+.d *}}}[0], [{{x[0-9]+|sp}}]
}
diff --git a/test/CodeGen/aarch64-neon-misc.c b/test/CodeGen/aarch64-neon-misc.c
index 08174d91f8be..a2511976a4fa 100644
--- a/test/CodeGen/aarch64-neon-misc.c
+++ b/test/CodeGen/aarch64-neon-misc.c
@@ -1,2005 +1,2041 @@
// REQUIRES: aarch64-registered-target
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
// RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s
// Test new aarch64 intrinsics and types
#include <arm_neon.h>
-// CHECK: test_vceqz_s8
-// CHECK: cmeq {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #0x0
+// CHECK-LABEL: test_vceqz_s8
+// CHECK: cmeq {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #{{0x0|0}}
uint8x8_t test_vceqz_s8(int8x8_t a) {
return vceqz_s8(a);
}
-// CHECK: test_vceqz_s16
-// CHECK: cmeq {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #0x0
+// CHECK-LABEL: test_vceqz_s16
+// CHECK: cmeq {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #{{0x0|0}}
uint16x4_t test_vceqz_s16(int16x4_t a) {
return vceqz_s16(a);
}
-// CHECK: test_vceqz_s32
-// CHECK: cmeq {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #0x0
+// CHECK-LABEL: test_vceqz_s32
+// CHECK: cmeq {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #{{0x0|0}}
uint32x2_t test_vceqz_s32(int32x2_t a) {
return vceqz_s32(a);
}
-// CHECK: test_vceqz_s64
-// CHECK: cmeq {{d[0-9]+}}, {{d[0-9]+}}, #0x0
+// CHECK-LABEL: test_vceqz_s64
+// CHECK: cmeq {{d[0-9]+}}, {{d[0-9]+}}, #{{0x0|0}}
uint64x1_t test_vceqz_s64(int64x1_t a) {
return vceqz_s64(a);
}
-// CHECK: test_vceqz_u64
-// CHECK: cmeq {{d[0-9]+}}, {{d[0-9]+}}, #0x0
+// CHECK-LABEL: test_vceqz_u64
+// CHECK: cmeq {{d[0-9]+}}, {{d[0-9]+}}, #{{0x0|0}}
uint64x1_t test_vceqz_u64(uint64x1_t a) {
return vceqz_u64(a);
}
-// CHECK: test_vceqz_p64
-// CHECK: cmeq {{d[0-9]+}}, {{d[0-9]+}}, #0x0
+// CHECK-LABEL: test_vceqz_p64
+// CHECK: cmeq {{d[0-9]+}}, {{d[0-9]+}}, #{{0x0|0}}
uint64x1_t test_vceqz_p64(poly64x1_t a) {
return vceqz_p64(a);
}
-// CHECK: test_vceqzq_s8
-// CHECK: cmeq {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #0x0
+// CHECK-LABEL: test_vceqzq_s8
+// CHECK: cmeq {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #{{0x0|0}}
uint8x16_t test_vceqzq_s8(int8x16_t a) {
return vceqzq_s8(a);
}
-// CHECK: test_vceqzq_s16
-// CHECK: cmeq {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #0x0
+// CHECK-LABEL: test_vceqzq_s16
+// CHECK: cmeq {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #{{0x0|0}}
uint16x8_t test_vceqzq_s16(int16x8_t a) {
return vceqzq_s16(a);
}
-// CHECK: test_vceqzq_s32
-// CHECK: cmeq {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #0x0
+// CHECK-LABEL: test_vceqzq_s32
+// CHECK: cmeq {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #{{0x0|0}}
uint32x4_t test_vceqzq_s32(int32x4_t a) {
return vceqzq_s32(a);
}
-// CHECK: test_vceqzq_s64
-// CHECK: cmeq {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #0x0
+// CHECK-LABEL: test_vceqzq_s64
+// CHECK: cmeq {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #{{0x0|0}}
uint64x2_t test_vceqzq_s64(int64x2_t a) {
return vceqzq_s64(a);
}
-// CHECK: test_vceqz_u8
-// CHECK: cmeq {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #0x0
+// CHECK-LABEL: test_vceqz_u8
+// CHECK: cmeq {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #{{0x0|0}}
uint8x8_t test_vceqz_u8(uint8x8_t a) {
return vceqz_u8(a);
}
-// CHECK: test_vceqz_u16
-// CHECK: cmeq {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #0x0
+// CHECK-LABEL: test_vceqz_u16
+// CHECK: cmeq {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #{{0x0|0}}
uint16x4_t test_vceqz_u16(uint16x4_t a) {
return vceqz_u16(a);
}
-// CHECK: test_vceqz_u32
-// CHECK: cmeq {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #0x0
+// CHECK-LABEL: test_vceqz_u32
+// CHECK: cmeq {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #{{0x0|0}}
uint32x2_t test_vceqz_u32(uint32x2_t a) {
return vceqz_u32(a);
}
-// CHECK: test_vceqzq_u8
-// CHECK: cmeq {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #0x0
+// CHECK-LABEL: test_vceqzq_u8
+// CHECK: cmeq {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #{{0x0|0}}
uint8x16_t test_vceqzq_u8(uint8x16_t a) {
return vceqzq_u8(a);
}
-// CHECK: test_vceqzq_u16
-// CHECK: cmeq {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #0x0
+// CHECK-LABEL: test_vceqzq_u16
+// CHECK: cmeq {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #{{0x0|0}}
uint16x8_t test_vceqzq_u16(uint16x8_t a) {
return vceqzq_u16(a);
}
-// CHECK: test_vceqzq_u32
-// CHECK: cmeq {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #0x0
+// CHECK-LABEL: test_vceqzq_u32
+// CHECK: cmeq {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #{{0x0|0}}
uint32x4_t test_vceqzq_u32(uint32x4_t a) {
return vceqzq_u32(a);
}
-// CHECK: test_vceqzq_u64
-// CHECK: cmeq {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #0x0
+// CHECK-LABEL: test_vceqzq_u64
+// CHECK: cmeq {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #{{0x0|0}}
uint64x2_t test_vceqzq_u64(uint64x2_t a) {
return vceqzq_u64(a);
}
-// CHECK: test_vceqz_f32
+// CHECK-LABEL: test_vceqz_f32
// CHECK: fcmeq {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #0
uint32x2_t test_vceqz_f32(float32x2_t a) {
return vceqz_f32(a);
}
-// CHECK: test_vceqz_f64
+// CHECK-LABEL: test_vceqz_f64
// CHECK: fcmeq {{d[0-9]+}}, {{d[0-9]+}}, #0
uint64x1_t test_vceqz_f64(float64x1_t a) {
return vceqz_f64(a);
}
-// CHECK: test_vceqzq_f32
+// CHECK-LABEL: test_vceqzq_f32
// CHECK: fcmeq {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #0
uint32x4_t test_vceqzq_f32(float32x4_t a) {
return vceqzq_f32(a);
}
-// CHECK: test_vceqz_p16
-// CHECK: cmeq {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #0x0
+// CHECK-LABEL: test_vceqz_p8
+// CHECK: cmeq {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #{{0x0|0}}
+uint8x8_t test_vceqz_p8(poly8x8_t a) {
+ return vceqz_p8(a);
+}
+
+// CHECK-LABEL: test_vceqzq_p8
+// CHECK: cmeq {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #{{0x0|0}}
+uint8x16_t test_vceqzq_p8(poly8x16_t a) {
+ return vceqzq_p8(a);
+}
+
+// CHECK-LABEL: test_vceqz_p16
+// CHECK: cmeq {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #{{0x0|0}}
uint16x4_t test_vceqz_p16(poly16x4_t a) {
return vceqz_p16(a);
}
-// CHECK: test_vceqzq_p16
-// CHECK: cmeq {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #0x0
+// CHECK-LABEL: test_vceqzq_p16
+// CHECK: cmeq {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #{{0x0|0}}
uint16x8_t test_vceqzq_p16(poly16x8_t a) {
return vceqzq_p16(a);
}
-// CHECK: test_vceqzq_f64
+// CHECK-LABEL: test_vceqzq_f64
// CHECK: fcmeq {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #0
uint64x2_t test_vceqzq_f64(float64x2_t a) {
return vceqzq_f64(a);
}
-// CHECK: test_vceqzq_p64
+// CHECK-LABEL: test_vceqzq_p64
// CHECK: cmeq {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #0
uint64x2_t test_vceqzq_p64(poly64x2_t a) {
return vceqzq_p64(a);
}
-// CHECK: test_vcgez_s8
-// CHECK: cmge {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #0x0
+// CHECK-LABEL: test_vcgez_s8
+// CHECK: cmge {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #{{0x0|0}}
uint8x8_t test_vcgez_s8(int8x8_t a) {
return vcgez_s8(a);
}
-// CHECK: test_vcgez_s16
-// CHECK: cmge {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #0x0
+// CHECK-LABEL: test_vcgez_s16
+// CHECK: cmge {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #{{0x0|0}}
uint16x4_t test_vcgez_s16(int16x4_t a) {
return vcgez_s16(a);
}
-// CHECK: test_vcgez_s32
-// CHECK: cmge {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #0x0
+// CHECK-LABEL: test_vcgez_s32
+// CHECK: cmge {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #{{0x0|0}}
uint32x2_t test_vcgez_s32(int32x2_t a) {
return vcgez_s32(a);
}
-// CHECK: test_vcgez_s64
-// CHECK: cmge {{d[0-9]+}}, {{d[0-9]+}}, #0x0
+// CHECK-LABEL: test_vcgez_s64
+// CHECK: cmge {{d[0-9]+}}, {{d[0-9]+}}, #{{0x0|0}}
uint64x1_t test_vcgez_s64(int64x1_t a) {
return vcgez_s64(a);
}
-// CHECK: test_vcgezq_s8
-// CHECK: cmge {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #0x0
+// CHECK-LABEL: test_vcgezq_s8
+// CHECK: cmge {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #{{0x0|0}}
uint8x16_t test_vcgezq_s8(int8x16_t a) {
return vcgezq_s8(a);
}
-// CHECK: test_vcgezq_s16
-// CHECK: cmge {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #0x0
+// CHECK-LABEL: test_vcgezq_s16
+// CHECK: cmge {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #{{0x0|0}}
uint16x8_t test_vcgezq_s16(int16x8_t a) {
return vcgezq_s16(a);
}
-// CHECK: test_vcgezq_s32
-// CHECK: cmge {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #0x0
+// CHECK-LABEL: test_vcgezq_s32
+// CHECK: cmge {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #{{0x0|0}}
uint32x4_t test_vcgezq_s32(int32x4_t a) {
return vcgezq_s32(a);
}
-// CHECK: test_vcgezq_s64
-// CHECK: cmge {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #0x0
+// CHECK-LABEL: test_vcgezq_s64
+// CHECK: cmge {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #{{0x0|0}}
uint64x2_t test_vcgezq_s64(int64x2_t a) {
return vcgezq_s64(a);
}
-// CHECK: test_vcgez_f32
+// CHECK-LABEL: test_vcgez_f32
// CHECK: fcmge {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #0
uint32x2_t test_vcgez_f32(float32x2_t a) {
return vcgez_f32(a);
}
-// CHECK: test_vcgezq_f32
+// CHECK-LABEL: test_vcgez_f64
+// CHECK: fcmge {{d[0-9]+}}, {{d[0-9]+}}, #0
+uint64x1_t test_vcgez_f64(float64x1_t a) {
+ return vcgez_f64(a);
+}
+
+// CHECK-LABEL: test_vcgezq_f32
// CHECK: fcmge {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #0
uint32x4_t test_vcgezq_f32(float32x4_t a) {
return vcgezq_f32(a);
}
-// CHECK: test_vcgezq_f64
+// CHECK-LABEL: test_vcgezq_f64
// CHECK: fcmge {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #0
uint64x2_t test_vcgezq_f64(float64x2_t a) {
return vcgezq_f64(a);
}
-// CHECK: test_vclez_s8
-// CHECK: cmle {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #0x0
+// CHECK-LABEL: test_vclez_s8
+// CHECK: cmle {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #{{0x0|0}}
uint8x8_t test_vclez_s8(int8x8_t a) {
return vclez_s8(a);
}
-// CHECK: test_vclez_s16
-// CHECK: cmle {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #0x0
+// CHECK-LABEL: test_vclez_s16
+// CHECK: cmle {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #{{0x0|0}}
uint16x4_t test_vclez_s16(int16x4_t a) {
return vclez_s16(a);
}
-// CHECK: test_vclez_s32
-// CHECK: cmle {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #0x0
+// CHECK-LABEL: test_vclez_s32
+// CHECK: cmle {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #{{0x0|0}}
uint32x2_t test_vclez_s32(int32x2_t a) {
return vclez_s32(a);
}
-// CHECK: test_vclez_s64
-// CHECK: cmle {{d[0-9]+}}, {{d[0-9]+}}, #0x0
+// CHECK-LABEL: test_vclez_s64
+// CHECK: cmle {{d[0-9]+}}, {{d[0-9]+}}, #{{0x0|0}}
uint64x1_t test_vclez_s64(int64x1_t a) {
return vclez_s64(a);
}
-// CHECK: test_vclezq_s8
-// CHECK: cmle {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #0x0
+// CHECK-LABEL: test_vclezq_s8
+// CHECK: cmle {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #{{0x0|0}}
uint8x16_t test_vclezq_s8(int8x16_t a) {
return vclezq_s8(a);
}
-// CHECK: test_vclezq_s16
-// CHECK: cmle {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #0x0
+// CHECK-LABEL: test_vclezq_s16
+// CHECK: cmle {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #{{0x0|0}}
uint16x8_t test_vclezq_s16(int16x8_t a) {
return vclezq_s16(a);
}
-// CHECK: test_vclezq_s32
-// CHECK: cmle {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #0x0
+// CHECK-LABEL: test_vclezq_s32
+// CHECK: cmle {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #{{0x0|0}}
uint32x4_t test_vclezq_s32(int32x4_t a) {
return vclezq_s32(a);
}
-// CHECK: test_vclezq_s64
-// CHECK: cmle {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #0x0
+// CHECK-LABEL: test_vclezq_s64
+// CHECK: cmle {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #{{0x0|0}}
uint64x2_t test_vclezq_s64(int64x2_t a) {
return vclezq_s64(a);
}
-// CHECK: test_vclez_f32
+// CHECK-LABEL: test_vclez_f32
// CHECK: fcmle {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #0
uint32x2_t test_vclez_f32(float32x2_t a) {
return vclez_f32(a);
}
-// CHECK: test_vclezq_f32
+// CHECK-LABEL: test_vclez_f64
+// CHECK: fcmle {{d[0-9]+}}, {{d[0-9]+}}, #0
+uint64x1_t test_vclez_f64(float64x1_t a) {
+ return vclez_f64(a);
+}
+
+// CHECK-LABEL: test_vclezq_f32
// CHECK: fcmle {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #0
uint32x4_t test_vclezq_f32(float32x4_t a) {
return vclezq_f32(a);
}
-// CHECK: test_vclezq_f64
+// CHECK-LABEL: test_vclezq_f64
// CHECK: fcmle {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #0
uint64x2_t test_vclezq_f64(float64x2_t a) {
return vclezq_f64(a);
}
-// CHECK: test_vcgtz_s8
-// CHECK: cmgt {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #0x0
+// CHECK-LABEL: test_vcgtz_s8
+// CHECK: cmgt {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #{{0x0|0}}
uint8x8_t test_vcgtz_s8(int8x8_t a) {
return vcgtz_s8(a);
}
-// CHECK: test_vcgtz_s16
-// CHECK: cmgt {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #0x0
+// CHECK-LABEL: test_vcgtz_s16
+// CHECK: cmgt {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #{{0x0|0}}
uint16x4_t test_vcgtz_s16(int16x4_t a) {
return vcgtz_s16(a);
}
-// CHECK: test_vcgtz_s32
-// CHECK: cmgt {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #0x0
+// CHECK-LABEL: test_vcgtz_s32
+// CHECK: cmgt {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #{{0x0|0}}
uint32x2_t test_vcgtz_s32(int32x2_t a) {
return vcgtz_s32(a);
}
-// CHECK: test_vcgtz_s64
-// CHECK: cmgt {{d[0-9]+}}, {{d[0-9]+}}, #0x0
+// CHECK-LABEL: test_vcgtz_s64
+// CHECK: cmgt {{d[0-9]+}}, {{d[0-9]+}}, #{{0x0|0}}
uint64x1_t test_vcgtz_s64(int64x1_t a) {
return vcgtz_s64(a);
}
-// CHECK: test_vcgtzq_s8
-// CHECK: cmgt {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #0x0
+// CHECK-LABEL: test_vcgtzq_s8
+// CHECK: cmgt {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #{{0x0|0}}
uint8x16_t test_vcgtzq_s8(int8x16_t a) {
return vcgtzq_s8(a);
}
-// CHECK: test_vcgtzq_s16
-// CHECK: cmgt {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #0x0
+// CHECK-LABEL: test_vcgtzq_s16
+// CHECK: cmgt {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #{{0x0|0}}
uint16x8_t test_vcgtzq_s16(int16x8_t a) {
return vcgtzq_s16(a);
}
-// CHECK: test_vcgtzq_s32
-// CHECK: cmgt {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #0x0
+// CHECK-LABEL: test_vcgtzq_s32
+// CHECK: cmgt {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #{{0x0|0}}
uint32x4_t test_vcgtzq_s32(int32x4_t a) {
return vcgtzq_s32(a);
}
-// CHECK: test_vcgtzq_s64
-// CHECK: cmgt {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #0x0
+// CHECK-LABEL: test_vcgtzq_s64
+// CHECK: cmgt {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #{{0x0|0}}
uint64x2_t test_vcgtzq_s64(int64x2_t a) {
return vcgtzq_s64(a);
}
-// CHECK: test_vcgtz_f32
+// CHECK-LABEL: test_vcgtz_f32
// CHECK: fcmgt {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #0
uint32x2_t test_vcgtz_f32(float32x2_t a) {
return vcgtz_f32(a);
}
-// CHECK: test_vcgtzq_f32
+// CHECK-LABEL: test_vcgtz_f64
+// CHECK: fcmgt {{d[0-9]+}}, {{d[0-9]+}}, #0
+uint64x1_t test_vcgtz_f64(float64x1_t a) {
+ return vcgtz_f64(a);
+}
+
+// CHECK-LABEL: test_vcgtzq_f32
// CHECK: fcmgt {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #0
uint32x4_t test_vcgtzq_f32(float32x4_t a) {
return vcgtzq_f32(a);
}
-// CHECK: test_vcgtzq_f64
+// CHECK-LABEL: test_vcgtzq_f64
// CHECK: fcmgt {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #0
uint64x2_t test_vcgtzq_f64(float64x2_t a) {
return vcgtzq_f64(a);
}
-// CHECK: test_vcltz_s8
-// CHECK: cmlt {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #0
+// CHECK-LABEL: test_vcltz_s8
+// CHECK: sshr {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, #7
uint8x8_t test_vcltz_s8(int8x8_t a) {
return vcltz_s8(a);
}
-// CHECK: test_vcltz_s16
-// CHECK: cmlt {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #0
+// CHECK-LABEL: test_vcltz_s16
+// CHECK: sshr {{v[0-9]+}}.4h, {{v[0-9]+}}.4h, #15
uint16x4_t test_vcltz_s16(int16x4_t a) {
return vcltz_s16(a);
}
-// CHECK: test_vcltz_s32
-// CHECK: cmlt {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #0
+// CHECK-LABEL: test_vcltz_s32
+// CHECK: sshr {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #31
uint32x2_t test_vcltz_s32(int32x2_t a) {
return vcltz_s32(a);
}
-// CHECK: test_vcltz_s64
-// CHECK: cmlt {{d[0-9]+}}, {{d[0-9]+}}, #0
+// CHECK-LABEL: test_vcltz_s64
+// CHECK: sshr {{d[0-9]+}}, {{d[0-9]+}}, #63
uint64x1_t test_vcltz_s64(int64x1_t a) {
return vcltz_s64(a);
}
-// CHECK: test_vcltzq_s8
-// CHECK: cmlt {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #0
+// CHECK-LABEL: test_vcltzq_s8
+// CHECK: sshr {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #7
uint8x16_t test_vcltzq_s8(int8x16_t a) {
return vcltzq_s8(a);
}
-// CHECK: test_vcltzq_s16
-// CHECK: cmlt {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #0
+// CHECK-LABEL: test_vcltzq_s16
+// CHECK: sshr {{v[0-9]+}}.8h, {{v[0-9]+}}.8h, #15
uint16x8_t test_vcltzq_s16(int16x8_t a) {
return vcltzq_s16(a);
}
-// CHECK: test_vcltzq_s32
-// CHECK: cmlt {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #0
+// CHECK-LABEL: test_vcltzq_s32
+// CHECK: sshr {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #31
uint32x4_t test_vcltzq_s32(int32x4_t a) {
return vcltzq_s32(a);
}
-// CHECK: test_vcltzq_s64
-// CHECK: cmlt {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #0
+// CHECK-LABEL: test_vcltzq_s64
+// CHECK: sshr {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #63
uint64x2_t test_vcltzq_s64(int64x2_t a) {
return vcltzq_s64(a);
}
-// CHECK: test_vcltz_f32
+// CHECK-LABEL: test_vcltz_f32
// CHECK: fcmlt {{v[0-9]+}}.2s, {{v[0-9]+}}.2s, #0
uint32x2_t test_vcltz_f32(float32x2_t a) {
return vcltz_f32(a);
}
+
+// CHECK-LABEL: test_vcltz_f64
+// CHECK: fcmlt {{d[0-9]+}}, {{d[0-9]+}}, #0
+uint64x1_t test_vcltz_f64(float64x1_t a) {
+ return vcltz_f64(a);
+}
-// CHECK: test_vcltzq_f32
+// CHECK-LABEL: test_vcltzq_f32
// CHECK: fcmlt {{v[0-9]+}}.4s, {{v[0-9]+}}.4s, #0
uint32x4_t test_vcltzq_f32(float32x4_t a) {
return vcltzq_f32(a);
}
-// CHECK: test_vcltzq_f64
+// CHECK-LABEL: test_vcltzq_f64
// CHECK: fcmlt {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #0
uint64x2_t test_vcltzq_f64(float64x2_t a) {
return vcltzq_f64(a);
}
-// CHECK: test_vrev16_s8
+// CHECK-LABEL: test_vrev16_s8
// CHECK: rev16 v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
int8x8_t test_vrev16_s8(int8x8_t a) {
return vrev16_s8(a);
}
-// CHECK: test_vrev16_u8
+// CHECK-LABEL: test_vrev16_u8
// CHECK: rev16 v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
uint8x8_t test_vrev16_u8(uint8x8_t a) {
return vrev16_u8(a);
}
-// CHECK: test_vrev16_p8
+// CHECK-LABEL: test_vrev16_p8
// CHECK: rev16 v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
poly8x8_t test_vrev16_p8(poly8x8_t a) {
return vrev16_p8(a);
}
-// CHECK: test_vrev16q_s8
+// CHECK-LABEL: test_vrev16q_s8
// CHECK: rev16 v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
int8x16_t test_vrev16q_s8(int8x16_t a) {
return vrev16q_s8(a);
}
-// CHECK: test_vrev16q_u8
+// CHECK-LABEL: test_vrev16q_u8
// CHECK: rev16 v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
uint8x16_t test_vrev16q_u8(uint8x16_t a) {
return vrev16q_u8(a);
}
-// CHECK: test_vrev16q_p8
+// CHECK-LABEL: test_vrev16q_p8
// CHECK: rev16 v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
poly8x16_t test_vrev16q_p8(poly8x16_t a) {
return vrev16q_p8(a);
}
-// CHECK: test_vrev32_s8
+// CHECK-LABEL: test_vrev32_s8
// CHECK: rev32 v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
int8x8_t test_vrev32_s8(int8x8_t a) {
return vrev32_s8(a);
}
-// CHECK: test_vrev32_s16
+// CHECK-LABEL: test_vrev32_s16
// CHECK: rev32 v{{[0-9]+}}.4h, v{{[0-9]+}}.4h
int16x4_t test_vrev32_s16(int16x4_t a) {
return vrev32_s16(a);
}
-// CHECK: test_vrev32_u8
+// CHECK-LABEL: test_vrev32_u8
// CHECK: rev32 v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
uint8x8_t test_vrev32_u8(uint8x8_t a) {
return vrev32_u8(a);
}
-// CHECK: test_vrev32_u16
+// CHECK-LABEL: test_vrev32_u16
// CHECK: rev32 v{{[0-9]+}}.4h, v{{[0-9]+}}.4h
uint16x4_t test_vrev32_u16(uint16x4_t a) {
return vrev32_u16(a);
}
-// CHECK: test_vrev32_p8
+// CHECK-LABEL: test_vrev32_p8
// CHECK: rev32 v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
poly8x8_t test_vrev32_p8(poly8x8_t a) {
return vrev32_p8(a);
}
-// CHECK: test_vrev32_p16
+// CHECK-LABEL: test_vrev32_p16
// CHECK: rev32 v{{[0-9]+}}.4h, v{{[0-9]+}}.4h
poly16x4_t test_vrev32_p16(poly16x4_t a) {
return vrev32_p16(a);
}
-// CHECK: test_vrev32q_s8
+// CHECK-LABEL: test_vrev32q_s8
// CHECK: rev32 v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
int8x16_t test_vrev32q_s8(int8x16_t a) {
return vrev32q_s8(a);
}
-// CHECK: test_vrev32q_s16
+// CHECK-LABEL: test_vrev32q_s16
// CHECK: rev32 v{{[0-9]+}}.8h, v{{[0-9]+}}.8h
int16x8_t test_vrev32q_s16(int16x8_t a) {
return vrev32q_s16(a);
}
-// CHECK: test_vrev32q_u8
+// CHECK-LABEL: test_vrev32q_u8
// CHECK: rev32 v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
uint8x16_t test_vrev32q_u8(uint8x16_t a) {
return vrev32q_u8(a);
}
-// CHECK: test_vrev32q_u16
+// CHECK-LABEL: test_vrev32q_u16
// CHECK: rev32 v{{[0-9]+}}.8h, v{{[0-9]+}}.8h
uint16x8_t test_vrev32q_u16(uint16x8_t a) {
return vrev32q_u16(a);
}
-// CHECK: test_vrev32q_p8
+// CHECK-LABEL: test_vrev32q_p8
// CHECK: rev32 v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
poly8x16_t test_vrev32q_p8(poly8x16_t a) {
return vrev32q_p8(a);
}
-// CHECK: test_vrev32q_p16
+// CHECK-LABEL: test_vrev32q_p16
// CHECK: rev32 v{{[0-9]+}}.8h, v{{[0-9]+}}.8h
poly16x8_t test_vrev32q_p16(poly16x8_t a) {
return vrev32q_p16(a);
}
-// CHECK: test_vrev64_s8
+// CHECK-LABEL: test_vrev64_s8
// CHECK: rev64 v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
int8x8_t test_vrev64_s8(int8x8_t a) {
return vrev64_s8(a);
}
-// CHECK: test_vrev64_s16
+// CHECK-LABEL: test_vrev64_s16
// CHECK: rev64 v{{[0-9]+}}.4h, v{{[0-9]+}}.4h
int16x4_t test_vrev64_s16(int16x4_t a) {
return vrev64_s16(a);
}
-// CHECK: test_vrev64_s32
+// CHECK-LABEL: test_vrev64_s32
// CHECK: rev64 v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
int32x2_t test_vrev64_s32(int32x2_t a) {
return vrev64_s32(a);
}
-// CHECK: test_vrev64_u8
+// CHECK-LABEL: test_vrev64_u8
// CHECK: rev64 v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
uint8x8_t test_vrev64_u8(uint8x8_t a) {
return vrev64_u8(a);
}
-// CHECK: test_vrev64_u16
+// CHECK-LABEL: test_vrev64_u16
// CHECK: rev64 v{{[0-9]+}}.4h, v{{[0-9]+}}.4h
uint16x4_t test_vrev64_u16(uint16x4_t a) {
return vrev64_u16(a);
}
-// CHECK: test_vrev64_u32
+// CHECK-LABEL: test_vrev64_u32
// CHECK: rev64 v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
uint32x2_t test_vrev64_u32(uint32x2_t a) {
return vrev64_u32(a);
}
-// CHECK: test_vrev64_p8
+// CHECK-LABEL: test_vrev64_p8
// CHECK: rev64 v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
poly8x8_t test_vrev64_p8(poly8x8_t a) {
return vrev64_p8(a);
}
-// CHECK: test_vrev64_p16
+// CHECK-LABEL: test_vrev64_p16
// CHECK: rev64 v{{[0-9]+}}.4h, v{{[0-9]+}}.4h
poly16x4_t test_vrev64_p16(poly16x4_t a) {
return vrev64_p16(a);
}
-// CHECK: test_vrev64_f32
+// CHECK-LABEL: test_vrev64_f32
// CHECK: rev64 v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
float32x2_t test_vrev64_f32(float32x2_t a) {
return vrev64_f32(a);
}
-// CHECK: test_vrev64q_s8
+// CHECK-LABEL: test_vrev64q_s8
// CHECK: rev64 v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
int8x16_t test_vrev64q_s8(int8x16_t a) {
return vrev64q_s8(a);
}
-// CHECK: test_vrev64q_s16
+// CHECK-LABEL: test_vrev64q_s16
// CHECK: rev64 v{{[0-9]+}}.8h, v{{[0-9]+}}.8h
int16x8_t test_vrev64q_s16(int16x8_t a) {
return vrev64q_s16(a);
}
-// CHECK: test_vrev64q_s32
+// CHECK-LABEL: test_vrev64q_s32
// CHECK: rev64 v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
int32x4_t test_vrev64q_s32(int32x4_t a) {
return vrev64q_s32(a);
}
-// CHECK: test_vrev64q_u8
+// CHECK-LABEL: test_vrev64q_u8
// CHECK: rev64 v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
uint8x16_t test_vrev64q_u8(uint8x16_t a) {
return vrev64q_u8(a);
}
-// CHECK: test_vrev64q_u16
+// CHECK-LABEL: test_vrev64q_u16
// CHECK: rev64 v{{[0-9]+}}.8h, v{{[0-9]+}}.8h
uint16x8_t test_vrev64q_u16(uint16x8_t a) {
return vrev64q_u16(a);
}
-// CHECK: test_vrev64q_u32
+// CHECK-LABEL: test_vrev64q_u32
// CHECK: rev64 v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
uint32x4_t test_vrev64q_u32(uint32x4_t a) {
return vrev64q_u32(a);
}
-// CHECK: test_vrev64q_p8
+// CHECK-LABEL: test_vrev64q_p8
// CHECK: rev64 v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
poly8x16_t test_vrev64q_p8(poly8x16_t a) {
return vrev64q_p8(a);
}
-// CHECK: test_vrev64q_p16
+// CHECK-LABEL: test_vrev64q_p16
// CHECK: rev64 v{{[0-9]+}}.8h, v{{[0-9]+}}.8h
poly16x8_t test_vrev64q_p16(poly16x8_t a) {
return vrev64q_p16(a);
}
-// CHECK: test_vrev64q_f32
+// CHECK-LABEL: test_vrev64q_f32
// CHECK: rev64 v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
float32x4_t test_vrev64q_f32(float32x4_t a) {
return vrev64q_f32(a);
}
int16x4_t test_vpaddl_s8(int8x8_t a) {
- // CHECK: test_vpaddl_s8
+ // CHECK-LABEL: test_vpaddl_s8
return vpaddl_s8(a);
// CHECK: saddlp v{{[0-9]+}}.4h, v{{[0-9]+}}.8b
}
int32x2_t test_vpaddl_s16(int16x4_t a) {
- // CHECK: test_vpaddl_s16
+ // CHECK-LABEL: test_vpaddl_s16
return vpaddl_s16(a);
// CHECK: saddlp v{{[0-9]+}}.2s, v{{[0-9]+}}.4h
}
int64x1_t test_vpaddl_s32(int32x2_t a) {
- // CHECK: test_vpaddl_s32
+ // CHECK-LABEL: test_vpaddl_s32
return vpaddl_s32(a);
// CHECK: saddlp v{{[0-9]+}}.1d, v{{[0-9]+}}.2s
}
uint16x4_t test_vpaddl_u8(uint8x8_t a) {
- // CHECK: test_vpaddl_u8
+ // CHECK-LABEL: test_vpaddl_u8
return vpaddl_u8(a);
// CHECK: uaddlp v{{[0-9]+}}.4h, v{{[0-9]+}}.8b
}
uint32x2_t test_vpaddl_u16(uint16x4_t a) {
- // CHECK: test_vpaddl_u16
+ // CHECK-LABEL: test_vpaddl_u16
return vpaddl_u16(a);
// CHECK: uaddlp v{{[0-9]+}}.2s, v{{[0-9]+}}.4h
}
uint64x1_t test_vpaddl_u32(uint32x2_t a) {
- // CHECK: test_vpaddl_u32
+ // CHECK-LABEL: test_vpaddl_u32
return vpaddl_u32(a);
// CHECK: uaddlp v{{[0-9]+}}.1d, v{{[0-9]+}}.2s
}
int16x8_t test_vpaddlq_s8(int8x16_t a) {
- // CHECK: test_vpaddlq_s8
+ // CHECK-LABEL: test_vpaddlq_s8
return vpaddlq_s8(a);
// CHECK: saddlp v{{[0-9]+}}.8h, v{{[0-9]+}}.16b
}
int32x4_t test_vpaddlq_s16(int16x8_t a) {
- // CHECK: test_vpaddlq_s16
+ // CHECK-LABEL: test_vpaddlq_s16
return vpaddlq_s16(a);
// CHECK: saddlp v{{[0-9]+}}.4s, v{{[0-9]+}}.8h
}
int64x2_t test_vpaddlq_s32(int32x4_t a) {
- // CHECK: test_vpaddlq_s32
+ // CHECK-LABEL: test_vpaddlq_s32
return vpaddlq_s32(a);
// CHECK: saddlp v{{[0-9]+}}.2d, v{{[0-9]+}}.4s
}
uint16x8_t test_vpaddlq_u8(uint8x16_t a) {
- // CHECK: test_vpaddlq_u8
+ // CHECK-LABEL: test_vpaddlq_u8
return vpaddlq_u8(a);
// CHECK: uaddlp v{{[0-9]+}}.8h, v{{[0-9]+}}.16b
}
uint32x4_t test_vpaddlq_u16(uint16x8_t a) {
- // CHECK: test_vpaddlq_u16
+ // CHECK-LABEL: test_vpaddlq_u16
return vpaddlq_u16(a);
// CHECK: uaddlp v{{[0-9]+}}.4s, v{{[0-9]+}}.8h
}
uint64x2_t test_vpaddlq_u32(uint32x4_t a) {
- // CHECK: test_vpaddlq_u32
+ // CHECK-LABEL: test_vpaddlq_u32
return vpaddlq_u32(a);
// CHECK: uaddlp v{{[0-9]+}}.2d, v{{[0-9]+}}.4s
}
int16x4_t test_vpadal_s8(int16x4_t a, int8x8_t b) {
- // CHECK: test_vpadal_s8
+ // CHECK-LABEL: test_vpadal_s8
return vpadal_s8(a, b);
// CHECK: sadalp v{{[0-9]+}}.4h, v{{[0-9]+}}.8b
}
int32x2_t test_vpadal_s16(int32x2_t a, int16x4_t b) {
- // CHECK: test_vpadal_s16
+ // CHECK-LABEL: test_vpadal_s16
return vpadal_s16(a, b);
// CHECK: sadalp v{{[0-9]+}}.2s, v{{[0-9]+}}.4h
}
int64x1_t test_vpadal_s32(int64x1_t a, int32x2_t b) {
- // CHECK: test_vpadal_s32
+ // CHECK-LABEL: test_vpadal_s32
return vpadal_s32(a, b);
// CHECK: sadalp v{{[0-9]+}}.1d, v{{[0-9]+}}.2s
}
uint16x4_t test_vpadal_u8(uint16x4_t a, uint8x8_t b) {
- // CHECK: test_vpadal_u8
+ // CHECK-LABEL: test_vpadal_u8
return vpadal_u8(a, b);
// CHECK: uadalp v{{[0-9]+}}.4h, v{{[0-9]+}}.8b
}
uint32x2_t test_vpadal_u16(uint32x2_t a, uint16x4_t b) {
- // CHECK: test_vpadal_u16
+ // CHECK-LABEL: test_vpadal_u16
return vpadal_u16(a, b);
// CHECK: uadalp v{{[0-9]+}}.2s, v{{[0-9]+}}.4h
}
uint64x1_t test_vpadal_u32(uint64x1_t a, uint32x2_t b) {
- // CHECK: test_vpadal_u32
+ // CHECK-LABEL: test_vpadal_u32
return vpadal_u32(a, b);
// CHECK: uadalp v{{[0-9]+}}.1d, v{{[0-9]+}}.2s
}
int16x8_t test_vpadalq_s8(int16x8_t a, int8x16_t b) {
- // CHECK: test_vpadalq_s8
+ // CHECK-LABEL: test_vpadalq_s8
return vpadalq_s8(a, b);
// CHECK: sadalp v{{[0-9]+}}.8h, v{{[0-9]+}}.16b
}
int32x4_t test_vpadalq_s16(int32x4_t a, int16x8_t b) {
- // CHECK: test_vpadalq_s16
+ // CHECK-LABEL: test_vpadalq_s16
return vpadalq_s16(a, b);
// CHECK: sadalp v{{[0-9]+}}.4s, v{{[0-9]+}}.8h
}
int64x2_t test_vpadalq_s32(int64x2_t a, int32x4_t b) {
- // CHECK: test_vpadalq_s32
+ // CHECK-LABEL: test_vpadalq_s32
return vpadalq_s32(a, b);
// CHECK: sadalp v{{[0-9]+}}.2d, v{{[0-9]+}}.4s
}
uint16x8_t test_vpadalq_u8(uint16x8_t a, uint8x16_t b) {
- // CHECK: test_vpadalq_u8
+ // CHECK-LABEL: test_vpadalq_u8
return vpadalq_u8(a, b);
// CHECK: uadalp v{{[0-9]+}}.8h, v{{[0-9]+}}.16b
}
uint32x4_t test_vpadalq_u16(uint32x4_t a, uint16x8_t b) {
- // CHECK: test_vpadalq_u16
+ // CHECK-LABEL: test_vpadalq_u16
return vpadalq_u16(a, b);
// CHECK: uadalp v{{[0-9]+}}.4s, v{{[0-9]+}}.8h
}
uint64x2_t test_vpadalq_u32(uint64x2_t a, uint32x4_t b) {
- // CHECK: test_vpadalq_u32
+ // CHECK-LABEL: test_vpadalq_u32
return vpadalq_u32(a, b);
// CHECK: uadalp v{{[0-9]+}}.2d, v{{[0-9]+}}.4s
}
int8x8_t test_vqabs_s8(int8x8_t a) {
- // CHECK: test_vqabs_s8
+ // CHECK-LABEL: test_vqabs_s8
return vqabs_s8(a);
// CHECK: sqabs v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
}
int8x16_t test_vqabsq_s8(int8x16_t a) {
- // CHECK: test_vqabsq_s8
+ // CHECK-LABEL: test_vqabsq_s8
return vqabsq_s8(a);
// CHECK: sqabs v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
}
int16x4_t test_vqabs_s16(int16x4_t a) {
- // CHECK: test_vqabs_s16
+ // CHECK-LABEL: test_vqabs_s16
return vqabs_s16(a);
// CHECK: sqabs v{{[0-9]+}}.4h, v{{[0-9]+}}.4h
}
int16x8_t test_vqabsq_s16(int16x8_t a) {
- // CHECK: test_vqabsq_s16
+ // CHECK-LABEL: test_vqabsq_s16
return vqabsq_s16(a);
// CHECK: sqabs v{{[0-9]+}}.8h, v{{[0-9]+}}.8h
}
int32x2_t test_vqabs_s32(int32x2_t a) {
- // CHECK: test_vqabs_s32
+ // CHECK-LABEL: test_vqabs_s32
return vqabs_s32(a);
// CHECK: sqabs v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
int32x4_t test_vqabsq_s32(int32x4_t a) {
- // CHECK: test_vqabsq_s32
+ // CHECK-LABEL: test_vqabsq_s32
return vqabsq_s32(a);
// CHECK: sqabs v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
int64x2_t test_vqabsq_s64(int64x2_t a) {
- // CHECK: test_vqabsq_s64
+ // CHECK-LABEL: test_vqabsq_s64
return vqabsq_s64(a);
// CHECK: sqabs v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
int8x8_t test_vqneg_s8(int8x8_t a) {
- // CHECK: test_vqneg_s8
+ // CHECK-LABEL: test_vqneg_s8
return vqneg_s8(a);
// CHECK: sqneg v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
}
int8x16_t test_vqnegq_s8(int8x16_t a) {
- // CHECK: test_vqnegq_s8
+ // CHECK-LABEL: test_vqnegq_s8
return vqnegq_s8(a);
// CHECK: sqneg v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
}
int16x4_t test_vqneg_s16(int16x4_t a) {
- // CHECK: test_vqneg_s16
+ // CHECK-LABEL: test_vqneg_s16
return vqneg_s16(a);
// CHECK: sqneg v{{[0-9]+}}.4h, v{{[0-9]+}}.4h
}
int16x8_t test_vqnegq_s16(int16x8_t a) {
- // CHECK: test_vqnegq_s16
+ // CHECK-LABEL: test_vqnegq_s16
return vqnegq_s16(a);
// CHECK: sqneg v{{[0-9]+}}.8h, v{{[0-9]+}}.8h
}
int32x2_t test_vqneg_s32(int32x2_t a) {
- // CHECK: test_vqneg_s32
+ // CHECK-LABEL: test_vqneg_s32
return vqneg_s32(a);
// CHECK: sqneg v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
int32x4_t test_vqnegq_s32(int32x4_t a) {
- // CHECK: test_vqnegq_s32
+ // CHECK-LABEL: test_vqnegq_s32
return vqnegq_s32(a);
// CHECK: sqneg v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
int64x2_t test_vqnegq_s64(int64x2_t a) {
- // CHECK: test_vqnegq_s64
+ // CHECK-LABEL: test_vqnegq_s64
return vqnegq_s64(a);
// CHECK: sqneg v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
int8x8_t test_vneg_s8(int8x8_t a) {
- // CHECK: test_vneg_s8
+ // CHECK-LABEL: test_vneg_s8
return vneg_s8(a);
// CHECK: neg v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
}
int8x16_t test_vnegq_s8(int8x16_t a) {
- // CHECK: test_vnegq_s8
+ // CHECK-LABEL: test_vnegq_s8
return vnegq_s8(a);
// CHECK: neg v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
}
int16x4_t test_vneg_s16(int16x4_t a) {
- // CHECK: test_vneg_s16
+ // CHECK-LABEL: test_vneg_s16
return vneg_s16(a);
// CHECK: neg v{{[0-9]+}}.4h, v{{[0-9]+}}.4h
}
int16x8_t test_vnegq_s16(int16x8_t a) {
- // CHECK: test_vnegq_s16
+ // CHECK-LABEL: test_vnegq_s16
return vnegq_s16(a);
// CHECK: neg v{{[0-9]+}}.8h, v{{[0-9]+}}.8h
}
int32x2_t test_vneg_s32(int32x2_t a) {
- // CHECK: test_vneg_s32
+ // CHECK-LABEL: test_vneg_s32
return vneg_s32(a);
// CHECK: neg v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
int32x4_t test_vnegq_s32(int32x4_t a) {
- // CHECK: test_vnegq_s32
+ // CHECK-LABEL: test_vnegq_s32
return vnegq_s32(a);
// CHECK: neg v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
int64x2_t test_vnegq_s64(int64x2_t a) {
- // CHECK: test_vnegq_s64
+ // CHECK-LABEL: test_vnegq_s64
return vnegq_s64(a);
// CHECK: neg v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
float32x2_t test_vneg_f32(float32x2_t a) {
- // CHECK: test_vneg_f32
+ // CHECK-LABEL: test_vneg_f32
return vneg_f32(a);
// CHECK: fneg v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
float32x4_t test_vnegq_f32(float32x4_t a) {
- // CHECK: test_vnegq_f32
+ // CHECK-LABEL: test_vnegq_f32
return vnegq_f32(a);
// CHECK: fneg v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
float64x2_t test_vnegq_f64(float64x2_t a) {
- // CHECK: test_vnegq_f64
+ // CHECK-LABEL: test_vnegq_f64
return vnegq_f64(a);
// CHECK: fneg v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
int8x8_t test_vabs_s8(int8x8_t a) {
- // CHECK: test_vabs_s8
+ // CHECK-LABEL: test_vabs_s8
return vabs_s8(a);
// CHECK: abs v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
}
int8x16_t test_vabsq_s8(int8x16_t a) {
- // CHECK: test_vabsq_s8
+ // CHECK-LABEL: test_vabsq_s8
return vabsq_s8(a);
// CHECK: abs v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
}
int16x4_t test_vabs_s16(int16x4_t a) {
- // CHECK: test_vabs_s16
+ // CHECK-LABEL: test_vabs_s16
return vabs_s16(a);
// CHECK: abs v{{[0-9]+}}.4h, v{{[0-9]+}}.4h
}
int16x8_t test_vabsq_s16(int16x8_t a) {
- // CHECK: test_vabsq_s16
+ // CHECK-LABEL: test_vabsq_s16
return vabsq_s16(a);
// CHECK: abs v{{[0-9]+}}.8h, v{{[0-9]+}}.8h
}
int32x2_t test_vabs_s32(int32x2_t a) {
- // CHECK: test_vabs_s32
+ // CHECK-LABEL: test_vabs_s32
return vabs_s32(a);
// CHECK: abs v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
int32x4_t test_vabsq_s32(int32x4_t a) {
- // CHECK: test_vabsq_s32
+ // CHECK-LABEL: test_vabsq_s32
return vabsq_s32(a);
// CHECK: abs v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
int64x2_t test_vabsq_s64(int64x2_t a) {
- // CHECK: test_vabsq_s64
+ // CHECK-LABEL: test_vabsq_s64
return vabsq_s64(a);
// CHECK: abs v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
float32x2_t test_vabs_f32(float32x2_t a) {
- // CHECK: test_vabs_f32
+ // CHECK-LABEL: test_vabs_f32
return vabs_f32(a);
// CHECK: fabs v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
float32x4_t test_vabsq_f32(float32x4_t a) {
- // CHECK: test_vabsq_f32
+ // CHECK-LABEL: test_vabsq_f32
return vabsq_f32(a);
// CHECK: fabs v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
float64x2_t test_vabsq_f64(float64x2_t a) {
- // CHECK: test_vabsq_f64
+ // CHECK-LABEL: test_vabsq_f64
return vabsq_f64(a);
// CHECK: fabs v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
int8x8_t test_vuqadd_s8(int8x8_t a, int8x8_t b) {
- // CHECK: test_vuqadd_s8
+ // CHECK-LABEL: test_vuqadd_s8
return vuqadd_s8(a, b);
// CHECK: suqadd v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
}
int8x16_t test_vuqaddq_s8(int8x16_t a, int8x16_t b) {
- // CHECK: test_vuqaddq_s8
+ // CHECK-LABEL: test_vuqaddq_s8
return vuqaddq_s8(a, b);
// CHECK: suqadd v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
}
int16x4_t test_vuqadd_s16(int16x4_t a, int16x4_t b) {
- // CHECK: test_vuqadd_s16
+ // CHECK-LABEL: test_vuqadd_s16
return vuqadd_s16(a, b);
// CHECK: suqadd v{{[0-9]+}}.4h, v{{[0-9]+}}.4h
}
int16x8_t test_vuqaddq_s16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vuqaddq_s16
+ // CHECK-LABEL: test_vuqaddq_s16
return vuqaddq_s16(a, b);
// CHECK: suqadd v{{[0-9]+}}.8h, v{{[0-9]+}}.8h
}
int32x2_t test_vuqadd_s32(int32x2_t a, int32x2_t b) {
- // CHECK: test_vuqadd_s32
+ // CHECK-LABEL: test_vuqadd_s32
return vuqadd_s32(a, b);
// CHECK: suqadd v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
int32x4_t test_vuqaddq_s32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vuqaddq_s32
+ // CHECK-LABEL: test_vuqaddq_s32
return vuqaddq_s32(a, b);
// CHECK: suqadd v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
int64x2_t test_vuqaddq_s64(int64x2_t a, int64x2_t b) {
- // CHECK: test_vuqaddq_s64
+ // CHECK-LABEL: test_vuqaddq_s64
return vuqaddq_s64(a, b);
// CHECK: suqadd v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
int8x8_t test_vcls_s8(int8x8_t a) {
- // CHECK: test_vcls_s8
+ // CHECK-LABEL: test_vcls_s8
return vcls_s8(a);
// CHECK: cls v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
}
int8x16_t test_vclsq_s8(int8x16_t a) {
- // CHECK: test_vclsq_s8
+ // CHECK-LABEL: test_vclsq_s8
return vclsq_s8(a);
// CHECK: cls v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
}
int16x4_t test_vcls_s16(int16x4_t a) {
- // CHECK: test_vcls_s16
+ // CHECK-LABEL: test_vcls_s16
return vcls_s16(a);
// CHECK: cls v{{[0-9]+}}.4h, v{{[0-9]+}}.4h
}
int16x8_t test_vclsq_s16(int16x8_t a) {
- // CHECK: test_vclsq_s16
+ // CHECK-LABEL: test_vclsq_s16
return vclsq_s16(a);
// CHECK: cls v{{[0-9]+}}.8h, v{{[0-9]+}}.8h
}
int32x2_t test_vcls_s32(int32x2_t a) {
- // CHECK: test_vcls_s32
+ // CHECK-LABEL: test_vcls_s32
return vcls_s32(a);
// CHECK: cls v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
int32x4_t test_vclsq_s32(int32x4_t a) {
- // CHECK: test_vclsq_s32
+ // CHECK-LABEL: test_vclsq_s32
return vclsq_s32(a);
// CHECK: cls v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
int8x8_t test_vclz_s8(int8x8_t a) {
- // CHECK: test_vclz_s8
+ // CHECK-LABEL: test_vclz_s8
return vclz_s8(a);
// CHECK: clz v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
}
int8x16_t test_vclzq_s8(int8x16_t a) {
- // CHECK: test_vclzq_s8
+ // CHECK-LABEL: test_vclzq_s8
return vclzq_s8(a);
// CHECK: clz v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
}
int16x4_t test_vclz_s16(int16x4_t a) {
- // CHECK: test_vclz_s16
+ // CHECK-LABEL: test_vclz_s16
return vclz_s16(a);
// CHECK: clz v{{[0-9]+}}.4h, v{{[0-9]+}}.4h
}
int16x8_t test_vclzq_s16(int16x8_t a) {
- // CHECK: test_vclzq_s16
+ // CHECK-LABEL: test_vclzq_s16
return vclzq_s16(a);
// CHECK: clz v{{[0-9]+}}.8h, v{{[0-9]+}}.8h
}
int32x2_t test_vclz_s32(int32x2_t a) {
- // CHECK: test_vclz_s32
+ // CHECK-LABEL: test_vclz_s32
return vclz_s32(a);
// CHECK: clz v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
int32x4_t test_vclzq_s32(int32x4_t a) {
- // CHECK: test_vclzq_s32
+ // CHECK-LABEL: test_vclzq_s32
return vclzq_s32(a);
// CHECK: clz v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
uint8x8_t test_vclz_u8(uint8x8_t a) {
- // CHECK: test_vclz_u8
+ // CHECK-LABEL: test_vclz_u8
return vclz_u8(a);
// CHECK: clz v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
}
uint8x16_t test_vclzq_u8(uint8x16_t a) {
- // CHECK: test_vclzq_u8
+ // CHECK-LABEL: test_vclzq_u8
return vclzq_u8(a);
// CHECK: clz v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
}
uint16x4_t test_vclz_u16(uint16x4_t a) {
- // CHECK: test_vclz_u16
+ // CHECK-LABEL: test_vclz_u16
return vclz_u16(a);
// CHECK: clz v{{[0-9]+}}.4h, v{{[0-9]+}}.4h
}
uint16x8_t test_vclzq_u16(uint16x8_t a) {
- // CHECK: test_vclzq_u16
+ // CHECK-LABEL: test_vclzq_u16
return vclzq_u16(a);
// CHECK: clz v{{[0-9]+}}.8h, v{{[0-9]+}}.8h
}
uint32x2_t test_vclz_u32(uint32x2_t a) {
- // CHECK: test_vclz_u32
+ // CHECK-LABEL: test_vclz_u32
return vclz_u32(a);
// CHECK: clz v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
uint32x4_t test_vclzq_u32(uint32x4_t a) {
- // CHECK: test_vclzq_u32
+ // CHECK-LABEL: test_vclzq_u32
return vclzq_u32(a);
// CHECK: clz v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
int8x8_t test_vcnt_s8(int8x8_t a) {
- // CHECK: test_vcnt_s8
+ // CHECK-LABEL: test_vcnt_s8
return vcnt_s8(a);
// CHECK: cnt v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
}
int8x16_t test_vcntq_s8(int8x16_t a) {
- // CHECK: test_vcntq_s8
+ // CHECK-LABEL: test_vcntq_s8
return vcntq_s8(a);
// CHECK: cnt v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
}
uint8x8_t test_vcnt_u8(uint8x8_t a) {
- // CHECK: test_vcnt_u8
+ // CHECK-LABEL: test_vcnt_u8
return vcnt_u8(a);
// CHECK: cnt v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
}
uint8x16_t test_vcntq_u8(uint8x16_t a) {
- // CHECK: test_vcntq_u8
+ // CHECK-LABEL: test_vcntq_u8
return vcntq_u8(a);
// CHECK: cnt v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
}
poly8x8_t test_vcnt_p8(poly8x8_t a) {
- // CHECK: test_vcnt_p8
+ // CHECK-LABEL: test_vcnt_p8
return vcnt_p8(a);
// CHECK: cnt v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
}
poly8x16_t test_vcntq_p8(poly8x16_t a) {
- // CHECK: test_vcntq_p8
+ // CHECK-LABEL: test_vcntq_p8
return vcntq_p8(a);
// CHECK: cnt v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
}
int8x8_t test_vmvn_s8(int8x8_t a) {
- // CHECK: test_vmvn_s8
+ // CHECK-LABEL: test_vmvn_s8
return vmvn_s8(a);
- // CHECK: not v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
+ // CHECK: {{mvn|not}} v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
}
int8x16_t test_vmvnq_s8(int8x16_t a) {
- // CHECK: test_vmvnq_s8
+ // CHECK-LABEL: test_vmvnq_s8
return vmvnq_s8(a);
- // CHECK: not v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
+ // CHECK: {{mvn|not}} v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
}
int16x4_t test_vmvn_s16(int16x4_t a) {
- // CHECK: test_vmvn_s16
+ // CHECK-LABEL: test_vmvn_s16
return vmvn_s16(a);
- // CHECK: not v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
+ // CHECK: {{mvn|not}} v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
}
int16x8_t test_vmvnq_s16(int16x8_t a) {
- // CHECK: test_vmvnq_s16
+ // CHECK-LABEL: test_vmvnq_s16
return vmvnq_s16(a);
- // CHECK: not v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
+ // CHECK: {{mvn|not}} v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
}
int32x2_t test_vmvn_s32(int32x2_t a) {
- // CHECK: test_vmvn_s32
+ // CHECK-LABEL: test_vmvn_s32
return vmvn_s32(a);
- // CHECK: not v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
+ // CHECK: {{mvn|not}} v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
}
int32x4_t test_vmvnq_s32(int32x4_t a) {
- // CHECK: test_vmvnq_s32
+ // CHECK-LABEL: test_vmvnq_s32
return vmvnq_s32(a);
- // CHECK: not v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
+ // CHECK: {{mvn|not}} v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
}
uint8x8_t test_vmvn_u8(uint8x8_t a) {
- // CHECK: test_vmvn_u8
+ // CHECK-LABEL: test_vmvn_u8
return vmvn_u8(a);
- // CHECK: not v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
+ // CHECK: {{mvn|not}} v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
}
uint8x16_t test_vmvnq_u8(uint8x16_t a) {
- // CHECK: test_vmvnq_u8
+ // CHECK-LABEL: test_vmvnq_u8
return vmvnq_u8(a);
- // CHECK: not v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
+ // CHECK: {{mvn|not}} v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
}
uint16x4_t test_vmvn_u16(uint16x4_t a) {
- // CHECK: test_vmvn_u16
+ // CHECK-LABEL: test_vmvn_u16
return vmvn_u16(a);
- // CHECK: not v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
+ // CHECK: {{mvn|not}} v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
}
uint16x8_t test_vmvnq_u16(uint16x8_t a) {
- // CHECK: test_vmvnq_u16
+ // CHECK-LABEL: test_vmvnq_u16
return vmvnq_u16(a);
- // CHECK: not v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
+ // CHECK: {{mvn|not}} v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
}
uint32x2_t test_vmvn_u32(uint32x2_t a) {
- // CHECK: test_vmvn_u32
+ // CHECK-LABEL: test_vmvn_u32
return vmvn_u32(a);
- // CHECK: not v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
+ // CHECK: {{mvn|not}} v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
}
uint32x4_t test_vmvnq_u32(uint32x4_t a) {
- // CHECK: test_vmvnq_u32
+ // CHECK-LABEL: test_vmvnq_u32
return vmvnq_u32(a);
- // CHECK: not v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
+ // CHECK: {{mvn|not}} v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
}
poly8x8_t test_vmvn_p8(poly8x8_t a) {
- // CHECK: test_vmvn_p8
+ // CHECK-LABEL: test_vmvn_p8
return vmvn_p8(a);
- // CHECK: not v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
+ // CHECK: {{mvn|not}} v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
}
poly8x16_t test_vmvnq_p8(poly8x16_t a) {
- // CHECK: test_vmvnq_p8
+ // CHECK-LABEL: test_vmvnq_p8
return vmvnq_p8(a);
- // CHECK: not v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
+ // CHECK: {{mvn|not}} v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
}
int8x8_t test_vrbit_s8(int8x8_t a) {
- // CHECK: test_vrbit_s8
+ // CHECK-LABEL: test_vrbit_s8
return vrbit_s8(a);
// CHECK: rbit v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
}
int8x16_t test_vrbitq_s8(int8x16_t a) {
- // CHECK: test_vrbitq_s8
+ // CHECK-LABEL: test_vrbitq_s8
return vrbitq_s8(a);
// CHECK: rbit v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
}
uint8x8_t test_vrbit_u8(uint8x8_t a) {
- // CHECK: test_vrbit_u8
+ // CHECK-LABEL: test_vrbit_u8
return vrbit_u8(a);
// CHECK: rbit v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
}
uint8x16_t test_vrbitq_u8(uint8x16_t a) {
- // CHECK: test_vrbitq_u8
+ // CHECK-LABEL: test_vrbitq_u8
return vrbitq_u8(a);
// CHECK: rbit v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
}
poly8x8_t test_vrbit_p8(poly8x8_t a) {
- // CHECK: test_vrbit_p8
+ // CHECK-LABEL: test_vrbit_p8
return vrbit_p8(a);
// CHECK: rbit v{{[0-9]+}}.8b, v{{[0-9]+}}.8b
}
poly8x16_t test_vrbitq_p8(poly8x16_t a) {
- // CHECK: test_vrbitq_p8
+ // CHECK-LABEL: test_vrbitq_p8
return vrbitq_p8(a);
// CHECK: rbit v{{[0-9]+}}.16b, v{{[0-9]+}}.16b
}
int8x8_t test_vmovn_s16(int16x8_t a) {
- // CHECK: test_vmovn_s16
+ // CHECK-LABEL: test_vmovn_s16
return vmovn_s16(a);
// CHECK: xtn v{{[0-9]+}}.8b, v{{[0-9]+}}.8h
}
int16x4_t test_vmovn_s32(int32x4_t a) {
- // CHECK: test_vmovn_s32
+ // CHECK-LABEL: test_vmovn_s32
return vmovn_s32(a);
// CHECK: xtn v{{[0-9]+}}.4h, v{{[0-9]+}}.4s
}
int32x2_t test_vmovn_s64(int64x2_t a) {
- // CHECK: test_vmovn_s64
+ // CHECK-LABEL: test_vmovn_s64
return vmovn_s64(a);
// CHECK: xtn v{{[0-9]+}}.2s, v{{[0-9]+}}.2d
}
uint8x8_t test_vmovn_u16(uint16x8_t a) {
- // CHECK: test_vmovn_u16
+ // CHECK-LABEL: test_vmovn_u16
return vmovn_u16(a);
// CHECK: xtn v{{[0-9]+}}.8b, v{{[0-9]+}}.8h
}
uint16x4_t test_vmovn_u32(uint32x4_t a) {
- // CHECK: test_vmovn_u32
+ // CHECK-LABEL: test_vmovn_u32
return vmovn_u32(a);
// CHECK: xtn v{{[0-9]+}}.4h, v{{[0-9]+}}.4s
}
uint32x2_t test_vmovn_u64(uint64x2_t a) {
- // CHECK: test_vmovn_u64
+ // CHECK-LABEL: test_vmovn_u64
return vmovn_u64(a);
// CHECK: xtn v{{[0-9]+}}.2s, v{{[0-9]+}}.2d
}
int8x16_t test_vmovn_high_s16(int8x8_t a, int16x8_t b) {
- // CHECK: test_vmovn_high_s16
+ // CHECK-LABEL: test_vmovn_high_s16
return vmovn_high_s16(a, b);
// CHECK: xtn2 v{{[0-9]+}}.16b, v{{[0-9]+}}.8h
}
int16x8_t test_vmovn_high_s32(int16x4_t a, int32x4_t b) {
- // CHECK: test_vmovn_high_s32
+ // CHECK-LABEL: test_vmovn_high_s32
return vmovn_high_s32(a, b);
// CHECK: xtn2 v{{[0-9]+}}.8h, v{{[0-9]+}}.4s
}
int32x4_t test_vmovn_high_s64(int32x2_t a, int64x2_t b) {
- // CHECK: test_vmovn_high_s64
+ // CHECK-LABEL: test_vmovn_high_s64
return vmovn_high_s64(a, b);
// CHECK: xtn2 v{{[0-9]+}}.4s, v{{[0-9]+}}.2d
}
int8x16_t test_vmovn_high_u16(int8x8_t a, int16x8_t b) {
- // CHECK: test_vmovn_high_u16
+ // CHECK-LABEL: test_vmovn_high_u16
return vmovn_high_u16(a, b);
// CHECK: xtn2 v{{[0-9]+}}.16b, v{{[0-9]+}}.8h
}
int16x8_t test_vmovn_high_u32(int16x4_t a, int32x4_t b) {
- // CHECK: test_vmovn_high_u32
+ // CHECK-LABEL: test_vmovn_high_u32
return vmovn_high_u32(a, b);
// CHECK: xtn2 v{{[0-9]+}}.8h, v{{[0-9]+}}.4s
}
int32x4_t test_vmovn_high_u64(int32x2_t a, int64x2_t b) {
- // CHECK: test_vmovn_high_u64
+ // CHECK-LABEL: test_vmovn_high_u64
return vmovn_high_u64(a, b);
// CHECK: xtn2 v{{[0-9]+}}.4s, v{{[0-9]+}}.2d
}
int8x8_t test_vqmovun_s16(int16x8_t a) {
- // CHECK: test_vqmovun_s16
+ // CHECK-LABEL: test_vqmovun_s16
return vqmovun_s16(a);
// CHECK: sqxtun v{{[0-9]+}}.8b, v{{[0-9]+}}.8h
}
int16x4_t test_vqmovun_s32(int32x4_t a) {
- // CHECK: test_vqmovun_s32
+ // CHECK-LABEL: test_vqmovun_s32
return vqmovun_s32(a);
// CHECK: sqxtun v{{[0-9]+}}.4h, v{{[0-9]+}}.4s
}
int32x2_t test_vqmovun_s64(int64x2_t a) {
- // CHECK: test_vqmovun_s64
+ // CHECK-LABEL: test_vqmovun_s64
return vqmovun_s64(a);
// CHECK: sqxtun v{{[0-9]+}}.2s, v{{[0-9]+}}.2d
}
int8x16_t test_vqmovun_high_s16(int8x8_t a, int16x8_t b) {
- // CHECK: test_vqmovun_high_s16
+ // CHECK-LABEL: test_vqmovun_high_s16
return vqmovun_high_s16(a, b);
// CHECK: sqxtun2 v{{[0-9]+}}.16b, v{{[0-9]+}}.8h
}
int16x8_t test_vqmovun_high_s32(int16x4_t a, int32x4_t b) {
- // CHECK: test_vqmovun_high_s32
+ // CHECK-LABEL: test_vqmovun_high_s32
return vqmovun_high_s32(a, b);
// CHECK: sqxtun2 v{{[0-9]+}}.8h, v{{[0-9]+}}.4s
}
int32x4_t test_vqmovun_high_s64(int32x2_t a, int64x2_t b) {
- // CHECK: test_vqmovun_high_s64
+ // CHECK-LABEL: test_vqmovun_high_s64
return vqmovun_high_s64(a, b);
// CHECK: sqxtun2 v{{[0-9]+}}.4s, v{{[0-9]+}}.2d
}
int8x8_t test_vqmovn_s16(int16x8_t a) {
- // CHECK: test_vqmovn_s16
+ // CHECK-LABEL: test_vqmovn_s16
return vqmovn_s16(a);
// CHECK: sqxtn v{{[0-9]+}}.8b, v{{[0-9]+}}.8h
}
int16x4_t test_vqmovn_s32(int32x4_t a) {
- // CHECK: test_vqmovn_s32
+ // CHECK-LABEL: test_vqmovn_s32
return vqmovn_s32(a);
// CHECK: sqxtn v{{[0-9]+}}.4h, v{{[0-9]+}}.4s
}
int32x2_t test_vqmovn_s64(int64x2_t a) {
- // CHECK: test_vqmovn_s64
+ // CHECK-LABEL: test_vqmovn_s64
return vqmovn_s64(a);
// CHECK: sqxtn v{{[0-9]+}}.2s, v{{[0-9]+}}.2d
}
int8x16_t test_vqmovn_high_s16(int8x8_t a, int16x8_t b) {
- // CHECK: test_vqmovn_high_s16
+ // CHECK-LABEL: test_vqmovn_high_s16
return vqmovn_high_s16(a, b);
// CHECK: sqxtn2 v{{[0-9]+}}.16b, v{{[0-9]+}}.8h
}
int16x8_t test_vqmovn_high_s32(int16x4_t a, int32x4_t b) {
- // CHECK: test_vqmovn_high_s32
+ // CHECK-LABEL: test_vqmovn_high_s32
return vqmovn_high_s32(a, b);
// CHECK: sqxtn2 v{{[0-9]+}}.8h, v{{[0-9]+}}.4s
}
int32x4_t test_vqmovn_high_s64(int32x2_t a, int64x2_t b) {
- // CHECK: test_vqmovn_high_s64
+ // CHECK-LABEL: test_vqmovn_high_s64
return vqmovn_high_s64(a, b);
// CHECK: sqxtn2 v{{[0-9]+}}.4s, v{{[0-9]+}}.2d
}
uint8x8_t test_vqmovn_u16(uint16x8_t a) {
- // CHECK: test_vqmovn_u16
+ // CHECK-LABEL: test_vqmovn_u16
return vqmovn_u16(a);
// CHECK: uqxtn v{{[0-9]+}}.8b, v{{[0-9]+}}.8h
}
uint16x4_t test_vqmovn_u32(uint32x4_t a) {
- // CHECK: test_vqmovn_u32
+ // CHECK-LABEL: test_vqmovn_u32
return vqmovn_u32(a);
// CHECK: uqxtn v{{[0-9]+}}.4h, v{{[0-9]+}}.4s
}
uint32x2_t test_vqmovn_u64(uint64x2_t a) {
- // CHECK: test_vqmovn_u64
+ // CHECK-LABEL: test_vqmovn_u64
return vqmovn_u64(a);
// CHECK: uqxtn v{{[0-9]+}}.2s, v{{[0-9]+}}.2d
}
uint8x16_t test_vqmovn_high_u16(uint8x8_t a, uint16x8_t b) {
- // CHECK: test_vqmovn_high_u16
+ // CHECK-LABEL: test_vqmovn_high_u16
return vqmovn_high_u16(a, b);
// CHECK: uqxtn2 v{{[0-9]+}}.16b, v{{[0-9]+}}.8h
}
uint16x8_t test_vqmovn_high_u32(uint16x4_t a, uint32x4_t b) {
- // CHECK: test_vqmovn_high_u32
+ // CHECK-LABEL: test_vqmovn_high_u32
return vqmovn_high_u32(a, b);
// CHECK: uqxtn2 v{{[0-9]+}}.8h, v{{[0-9]+}}.4s
}
uint32x4_t test_vqmovn_high_u64(uint32x2_t a, uint64x2_t b) {
- // CHECK: test_vqmovn_high_u64
+ // CHECK-LABEL: test_vqmovn_high_u64
return vqmovn_high_u64(a, b);
// CHECK: uqxtn2 v{{[0-9]+}}.4s, v{{[0-9]+}}.2d
}
int16x8_t test_vshll_n_s8(int8x8_t a) {
- // CHECK: test_vshll_n_s8
+ // CHECK-LABEL: test_vshll_n_s8
return vshll_n_s8(a, 8);
// CHECK: shll {{v[0-9]+}}.8h, {{v[0-9]+}}.8b, #8
}
int32x4_t test_vshll_n_s16(int16x4_t a) {
- // CHECK: test_vshll_n_s16
+ // CHECK-LABEL: test_vshll_n_s16
return vshll_n_s16(a, 16);
// CHECK: shll {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, #16
}
int64x2_t test_vshll_n_s32(int32x2_t a) {
- // CHECK: test_vshll_n_s32
+ // CHECK-LABEL: test_vshll_n_s32
return vshll_n_s32(a, 32);
// CHECK: shll {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, #32
}
uint16x8_t test_vshll_n_u8(uint8x8_t a) {
- // CHECK: test_vshll_n_u8
+ // CHECK-LABEL: test_vshll_n_u8
return vshll_n_u8(a, 8);
// CHECK: shll {{v[0-9]+}}.8h, {{v[0-9]+}}.8b, #8
}
uint32x4_t test_vshll_n_u16(uint16x4_t a) {
- // CHECK: test_vshll_n_u16
+ // CHECK-LABEL: test_vshll_n_u16
return vshll_n_u16(a, 16);
// CHECK: shll {{v[0-9]+}}.4s, {{v[0-9]+}}.4h, #16
}
uint64x2_t test_vshll_n_u32(uint32x2_t a) {
- // CHECK: test_vshll_n_u32
+ // CHECK-LABEL: test_vshll_n_u32
return vshll_n_u32(a, 32);
// CHECK: shll {{v[0-9]+}}.2d, {{v[0-9]+}}.2s, #32
}
int16x8_t test_vshll_high_n_s8(int8x16_t a) {
- // CHECK: test_vshll_high_n_s8
+ // CHECK-LABEL: test_vshll_high_n_s8
return vshll_high_n_s8(a, 8);
// CHECK: shll2 {{v[0-9]+}}.8h, {{v[0-9]+}}.16b, #8
}
int32x4_t test_vshll_high_n_s16(int16x8_t a) {
- // CHECK: test_vshll_high_n_s16
+ // CHECK-LABEL: test_vshll_high_n_s16
return vshll_high_n_s16(a, 16);
// CHECK: shll2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, #16
}
int64x2_t test_vshll_high_n_s32(int32x4_t a) {
- // CHECK: test_vshll_high_n_s32
+ // CHECK-LABEL: test_vshll_high_n_s32
return vshll_high_n_s32(a, 32);
// CHECK: shll2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, #32
}
uint16x8_t test_vshll_high_n_u8(uint8x16_t a) {
- // CHECK: test_vshll_high_n_u8
+ // CHECK-LABEL: test_vshll_high_n_u8
return vshll_high_n_u8(a, 8);
// CHECK: shll2 {{v[0-9]+}}.8h, {{v[0-9]+}}.16b, #8
}
uint32x4_t test_vshll_high_n_u16(uint16x8_t a) {
- // CHECK: test_vshll_high_n_u16
+ // CHECK-LABEL: test_vshll_high_n_u16
return vshll_high_n_u16(a, 16);
// CHECK: shll2 {{v[0-9]+}}.4s, {{v[0-9]+}}.8h, #16
}
uint64x2_t test_vshll_high_n_u32(uint32x4_t a) {
- // CHECK: test_vshll_high_n_u32
+ // CHECK-LABEL: test_vshll_high_n_u32
return vshll_high_n_u32(a, 32);
// CHECK: shll2 {{v[0-9]+}}.2d, {{v[0-9]+}}.4s, #32
}
float16x4_t test_vcvt_f16_f32(float32x4_t a) {
- //CHECK: test_vcvt_f16_f32
+ //CHECK-LABEL: test_vcvt_f16_f32
return vcvt_f16_f32(a);
// CHECK: fcvtn v{{[0-9]+}}.4h, v{{[0-9]+}}.4s
}
float16x8_t test_vcvt_high_f16_f32(float16x4_t a, float32x4_t b) {
- //CHECK: test_vcvt_high_f16_f32
+ //CHECK-LABEL: test_vcvt_high_f16_f32
return vcvt_high_f16_f32(a, b);
// CHECK: fcvtn2 v{{[0-9]+}}.8h, v{{[0-9]+}}.4s
}
float32x2_t test_vcvt_f32_f64(float64x2_t a) {
- //CHECK: test_vcvt_f32_f64
+ //CHECK-LABEL: test_vcvt_f32_f64
return vcvt_f32_f64(a);
// CHECK: fcvtn v{{[0-9]+}}.2s, v{{[0-9]+}}.2d
}
float32x4_t test_vcvt_high_f32_f64(float32x2_t a, float64x2_t b) {
- //CHECK: test_vcvt_high_f32_f64
+ //CHECK-LABEL: test_vcvt_high_f32_f64
return vcvt_high_f32_f64(a, b);
// CHECK: fcvtn2 v{{[0-9]+}}.4s, v{{[0-9]+}}.2d
}
float32x2_t test_vcvtx_f32_f64(float64x2_t a) {
- //CHECK: test_vcvtx_f32_f64
+ //CHECK-LABEL: test_vcvtx_f32_f64
return vcvtx_f32_f64(a);
// CHECK: fcvtxn v{{[0-9]+}}.2s, v{{[0-9]+}}.2d
}
float32x4_t test_vcvtx_high_f32_f64(float32x2_t a, float64x2_t b) {
- //CHECK: test_vcvtx_high_f32_f64
+ //CHECK-LABEL: test_vcvtx_high_f32_f64
return vcvtx_high_f32_f64(a, b);
// CHECK: fcvtxn2 v{{[0-9]+}}.4s, v{{[0-9]+}}.2d
}
float32x4_t test_vcvt_f32_f16(float16x4_t a) {
- //CHECK: test_vcvt_f32_f16
+ //CHECK-LABEL: test_vcvt_f32_f16
return vcvt_f32_f16(a);
// CHECK: fcvtl v{{[0-9]+}}.4s, v{{[0-9]+}}.4h
}
float32x4_t test_vcvt_high_f32_f16(float16x8_t a) {
- //CHECK: test_vcvt_high_f32_f16
+ //CHECK-LABEL: test_vcvt_high_f32_f16
return vcvt_high_f32_f16(a);
// CHECK: fcvtl2 v{{[0-9]+}}.4s, v{{[0-9]+}}.8h
}
float64x2_t test_vcvt_f64_f32(float32x2_t a) {
- //CHECK: test_vcvt_f64_f32
+ //CHECK-LABEL: test_vcvt_f64_f32
return vcvt_f64_f32(a);
// CHECK: fcvtl v{{[0-9]+}}.2d, v{{[0-9]+}}.2s
}
float64x2_t test_vcvt_high_f64_f32(float32x4_t a) {
- //CHECK: test_vcvt_high_f64_f32
+ //CHECK-LABEL: test_vcvt_high_f64_f32
return vcvt_high_f64_f32(a);
// CHECK: fcvtl2 v{{[0-9]+}}.2d, v{{[0-9]+}}.4s
}
float32x2_t test_vrndn_f32(float32x2_t a) {
- //CHECK: test_vrndn_f32
+ //CHECK-LABEL: test_vrndn_f32
return vrndn_f32(a);
// CHECK: frintn v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
float32x4_t test_vrndnq_f32(float32x4_t a) {
- //CHECK: test_vrndnq_f32
+ //CHECK-LABEL: test_vrndnq_f32
return vrndnq_f32(a);
// CHECK: frintn v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
float64x2_t test_vrndnq_f64(float64x2_t a) {
- //CHECK: test_vrndnq_f64
+ //CHECK-LABEL: test_vrndnq_f64
return vrndnq_f64(a);
// CHECK: frintn v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
float32x2_t test_vrnda_f32(float32x2_t a) {
- //CHECK: test_vrnda_f32
+ //CHECK-LABEL: test_vrnda_f32
return vrnda_f32(a);
// CHECK: frinta v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
float32x4_t test_vrndaq_f32(float32x4_t a) {
- //CHECK: test_vrndaq_f32
+ //CHECK-LABEL: test_vrndaq_f32
return vrndaq_f32(a);
// CHECK: frinta v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
float64x2_t test_vrndaq_f64(float64x2_t a) {
- //CHECK: test_vrndaq_f64
+ //CHECK-LABEL: test_vrndaq_f64
return vrndaq_f64(a);
// CHECK: frinta v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
float32x2_t test_vrndp_f32(float32x2_t a) {
- //CHECK: test_vrndp_f32
+ //CHECK-LABEL: test_vrndp_f32
return vrndp_f32(a);
// CHECK: frintp v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
float32x4_t test_vrndpq_f32(float32x4_t a) {
- //CHECK: test_vrndpq_f32
+ //CHECK-LABEL: test_vrndpq_f32
return vrndpq_f32(a);
// CHECK: frintp v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
float64x2_t test_vrndpq_f64(float64x2_t a) {
- //CHECK: test_vrndpq_f64
+ //CHECK-LABEL: test_vrndpq_f64
return vrndpq_f64(a);
// CHECK: frintp v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
float32x2_t test_vrndm_f32(float32x2_t a) {
- //CHECK: test_vrndm_f32
+ //CHECK-LABEL: test_vrndm_f32
return vrndm_f32(a);
// CHECK: frintm v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
float32x4_t test_vrndmq_f32(float32x4_t a) {
- //CHECK: test_vrndmq_f32
+ //CHECK-LABEL: test_vrndmq_f32
return vrndmq_f32(a);
// CHECK: frintm v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
float64x2_t test_vrndmq_f64(float64x2_t a) {
- //CHECK: test_vrndmq_f64
+ //CHECK-LABEL: test_vrndmq_f64
return vrndmq_f64(a);
// CHECK: frintm v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
float32x2_t test_vrndx_f32(float32x2_t a) {
- //CHECK: test_vrndx_f32
+ //CHECK-LABEL: test_vrndx_f32
return vrndx_f32(a);
// CHECK: frintx v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
float32x4_t test_vrndxq_f32(float32x4_t a) {
- //CHECK: test_vrndxq_f32
+ //CHECK-LABEL: test_vrndxq_f32
return vrndxq_f32(a);
// CHECK: frintx v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
float64x2_t test_vrndxq_f64(float64x2_t a) {
- //CHECK: test_vrndxq_f64
+ //CHECK-LABEL: test_vrndxq_f64
return vrndxq_f64(a);
// CHECK: frintx v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
float32x2_t test_vrnd_f32(float32x2_t a) {
- //CHECK: test_vrnd_f32
+ //CHECK-LABEL: test_vrnd_f32
return vrnd_f32(a);
// CHECK: frintz v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
float32x4_t test_vrndq_f32(float32x4_t a) {
- //CHECK: test_vrndq_f32
+ //CHECK-LABEL: test_vrndq_f32
return vrndq_f32(a);
// CHECK: frintz v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
float64x2_t test_vrndq_f64(float64x2_t a) {
- //CHECK: test_vrndq_f64
+ //CHECK-LABEL: test_vrndq_f64
return vrndq_f64(a);
// CHECK: frintz v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
float32x2_t test_vrndi_f32(float32x2_t a) {
- //CHECK: test_vrndi_f32
+ //CHECK-LABEL: test_vrndi_f32
return vrndi_f32(a);
// CHECK: frinti v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
float32x4_t test_vrndiq_f32(float32x4_t a) {
- //CHECK: test_vrndiq_f32
+ //CHECK-LABEL: test_vrndiq_f32
return vrndiq_f32(a);
// CHECK: frinti v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
float64x2_t test_vrndiq_f64(float64x2_t a) {
- //CHECK: test_vrndiq_f64
+ //CHECK-LABEL: test_vrndiq_f64
return vrndiq_f64(a);
// CHECK: frinti v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
int32x2_t test_vcvt_s32_f32(float32x2_t a) {
- //CHECK: test_vcvt_s32_f32
+ //CHECK-LABEL: test_vcvt_s32_f32
return vcvt_s32_f32(a);
// CHECK: fcvtzs v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
int32x4_t test_vcvtq_s32_f32(float32x4_t a) {
- //CHECK: test_vcvtq_s32_f32
+ //CHECK-LABEL: test_vcvtq_s32_f32
return vcvtq_s32_f32(a);
// CHECK: fcvtzs v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
int64x2_t test_vcvtq_s64_f64(float64x2_t a) {
- //CHECK: test_vcvtq_s64_f64
+ //CHECK-LABEL: test_vcvtq_s64_f64
return vcvtq_s64_f64(a);
// CHECK: fcvtzs v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
uint32x2_t test_vcvt_u32_f32(float32x2_t a) {
- //CHECK: test_vcvt_u32_f32
+ //CHECK-LABEL: test_vcvt_u32_f32
return vcvt_u32_f32(a);
// CHECK: fcvtzu v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
uint32x4_t test_vcvtq_u32_f32(float32x4_t a) {
- //CHECK: test_vcvtq_u32_f32
+ //CHECK-LABEL: test_vcvtq_u32_f32
return vcvtq_u32_f32(a);
// CHECK: fcvtzu v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
uint64x2_t test_vcvtq_u64_f64(float64x2_t a) {
- //CHECK: test_vcvtq_u64_f64
+ //CHECK-LABEL: test_vcvtq_u64_f64
return vcvtq_u64_f64(a);
// CHECK: fcvtzu v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
int32x2_t test_vcvtn_s32_f32(float32x2_t a) {
- //CHECK: test_vcvtn_s32_f32
+ //CHECK-LABEL: test_vcvtn_s32_f32
return vcvtn_s32_f32(a);
// CHECK: fcvtns v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
int32x4_t test_vcvtnq_s32_f32(float32x4_t a) {
- //CHECK: test_vcvtnq_s32_f32
+ //CHECK-LABEL: test_vcvtnq_s32_f32
return vcvtnq_s32_f32(a);
// CHECK: fcvtns v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
int64x2_t test_vcvtnq_s64_f64(float64x2_t a) {
- //CHECK: test_vcvtnq_s64_f64
+ //CHECK-LABEL: test_vcvtnq_s64_f64
return vcvtnq_s64_f64(a);
// CHECK: fcvtns v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
uint32x2_t test_vcvtn_u32_f32(float32x2_t a) {
- //CHECK: test_vcvtn_u32_f32
+ //CHECK-LABEL: test_vcvtn_u32_f32
return vcvtn_u32_f32(a);
// CHECK: fcvtnu v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
uint32x4_t test_vcvtnq_u32_f32(float32x4_t a) {
- //CHECK: test_vcvtnq_u32_f32
+ //CHECK-LABEL: test_vcvtnq_u32_f32
return vcvtnq_u32_f32(a);
// CHECK: fcvtnu v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
uint64x2_t test_vcvtnq_u64_f64(float64x2_t a) {
- //CHECK: test_vcvtnq_u64_f64
+ //CHECK-LABEL: test_vcvtnq_u64_f64
return vcvtnq_u64_f64(a);
// CHECK: fcvtnu v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
int32x2_t test_vcvtp_s32_f32(float32x2_t a) {
- //CHECK: test_vcvtp_s32_f32
+ //CHECK-LABEL: test_vcvtp_s32_f32
return vcvtp_s32_f32(a);
// CHECK: fcvtps v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
int32x4_t test_vcvtpq_s32_f32(float32x4_t a) {
- //CHECK: test_vcvtpq_s32_f32
+ //CHECK-LABEL: test_vcvtpq_s32_f32
return vcvtpq_s32_f32(a);
// CHECK: fcvtps v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
int64x2_t test_vcvtpq_s64_f64(float64x2_t a) {
- //CHECK: test_vcvtpq_s64_f64
+ //CHECK-LABEL: test_vcvtpq_s64_f64
return vcvtpq_s64_f64(a);
// CHECK: fcvtps v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
uint32x2_t test_vcvtp_u32_f32(float32x2_t a) {
- //CHECK: test_vcvtp_u32_f32
+ //CHECK-LABEL: test_vcvtp_u32_f32
return vcvtp_u32_f32(a);
// CHECK: fcvtpu v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
uint32x4_t test_vcvtpq_u32_f32(float32x4_t a) {
- //CHECK: test_vcvtpq_u32_f32
+ //CHECK-LABEL: test_vcvtpq_u32_f32
return vcvtpq_u32_f32(a);
// CHECK: fcvtpu v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
uint64x2_t test_vcvtpq_u64_f64(float64x2_t a) {
- //CHECK: test_vcvtpq_u64_f64
+ //CHECK-LABEL: test_vcvtpq_u64_f64
return vcvtpq_u64_f64(a);
// CHECK: fcvtpu v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
int32x2_t test_vcvtm_s32_f32(float32x2_t a) {
- //CHECK: test_vcvtm_s32_f32
+ //CHECK-LABEL: test_vcvtm_s32_f32
return vcvtm_s32_f32(a);
// CHECK: fcvtms v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
int32x4_t test_vcvtmq_s32_f32(float32x4_t a) {
- //CHECK: test_vcvtmq_s32_f32
+ //CHECK-LABEL: test_vcvtmq_s32_f32
return vcvtmq_s32_f32(a);
// CHECK: fcvtms v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
int64x2_t test_vcvtmq_s64_f64(float64x2_t a) {
- //CHECK: test_vcvtmq_s64_f64
+ //CHECK-LABEL: test_vcvtmq_s64_f64
return vcvtmq_s64_f64(a);
// CHECK: fcvtms v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
uint32x2_t test_vcvtm_u32_f32(float32x2_t a) {
- //CHECK: test_vcvtm_u32_f32
+ //CHECK-LABEL: test_vcvtm_u32_f32
return vcvtm_u32_f32(a);
// CHECK: fcvtmu v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
uint32x4_t test_vcvtmq_u32_f32(float32x4_t a) {
- //CHECK: test_vcvtmq_u32_f32
+ //CHECK-LABEL: test_vcvtmq_u32_f32
return vcvtmq_u32_f32(a);
// CHECK: fcvtmu v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
uint64x2_t test_vcvtmq_u64_f64(float64x2_t a) {
- //CHECK: test_vcvtmq_u64_f64
+ //CHECK-LABEL: test_vcvtmq_u64_f64
return vcvtmq_u64_f64(a);
// CHECK: fcvtmu v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
int32x2_t test_vcvta_s32_f32(float32x2_t a) {
- //CHECK: test_vcvta_s32_f32
+ //CHECK-LABEL: test_vcvta_s32_f32
return vcvta_s32_f32(a);
// CHECK: fcvtas v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
int32x4_t test_vcvtaq_s32_f32(float32x4_t a) {
- //CHECK: test_vcvtaq_s32_f32
+ //CHECK-LABEL: test_vcvtaq_s32_f32
return vcvtaq_s32_f32(a);
// CHECK: fcvtas v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
int64x2_t test_vcvtaq_s64_f64(float64x2_t a) {
- //CHECK: test_vcvtaq_s64_f64
+ //CHECK-LABEL: test_vcvtaq_s64_f64
return vcvtaq_s64_f64(a);
// CHECK: fcvtas v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
uint32x2_t test_vcvta_u32_f32(float32x2_t a) {
- //CHECK: test_vcvta_u32_f32
+ //CHECK-LABEL: test_vcvta_u32_f32
return vcvta_u32_f32(a);
// CHECK: fcvtau v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
uint32x4_t test_vcvtaq_u32_f32(float32x4_t a) {
- //CHECK: test_vcvtaq_u32_f32
+ //CHECK-LABEL: test_vcvtaq_u32_f32
return vcvtaq_u32_f32(a);
// CHECK: fcvtau v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
uint64x2_t test_vcvtaq_u64_f64(float64x2_t a) {
- //CHECK: test_vcvtaq_u64_f64
+ //CHECK-LABEL: test_vcvtaq_u64_f64
return vcvtaq_u64_f64(a);
// CHECK: fcvtau v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
float32x2_t test_vrsqrte_f32(float32x2_t a) {
- //CHECK: test_vrsqrte_f32
+ //CHECK-LABEL: test_vrsqrte_f32
return vrsqrte_f32(a);
// CHECK: frsqrte v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
float32x4_t test_vrsqrteq_f32(float32x4_t a) {
- //CHECK: test_vrsqrteq_f32
+ //CHECK-LABEL: test_vrsqrteq_f32
return vrsqrteq_f32(a);
// CHECK: frsqrte v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
float64x2_t test_vrsqrteq_f64(float64x2_t a) {
- //CHECK: test_vrsqrteq_f64
+ //CHECK-LABEL: test_vrsqrteq_f64
return vrsqrteq_f64(a);
// CHECK: frsqrte v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
float32x2_t test_vrecpe_f32(float32x2_t a) {
- //CHECK: test_vrecpe_f32
+ //CHECK-LABEL: test_vrecpe_f32
return vrecpe_f32(a);
// CHECK: frecpe v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
float32x4_t test_vrecpeq_f32(float32x4_t a) {
- //CHECK: test_vrecpeq_f32
+ //CHECK-LABEL: test_vrecpeq_f32
return vrecpeq_f32(a);
// CHECK: frecpe v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
float64x2_t test_vrecpeq_f64(float64x2_t a) {
- //CHECK: test_vrecpeq_f64
+ //CHECK-LABEL: test_vrecpeq_f64
return vrecpeq_f64(a);
// CHECK: frecpe v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
uint32x2_t test_vrecpe_u32(uint32x2_t a) {
- //CHECK: test_vrecpe_u32
+ //CHECK-LABEL: test_vrecpe_u32
return vrecpe_u32(a);
// CHECK: urecpe v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
uint32x4_t test_vrecpeq_u32(uint32x4_t a) {
- //CHECK: test_vrecpeq_u32
+ //CHECK-LABEL: test_vrecpeq_u32
return vrecpeq_u32(a);
// CHECK: urecpe v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
float32x2_t test_vsqrt_f32(float32x2_t a) {
- //CHECK: test_vsqrt_f32
+ //CHECK-LABEL: test_vsqrt_f32
return vsqrt_f32(a);
// CHECK: fsqrt v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
float32x4_t test_vsqrtq_f32(float32x4_t a) {
- //CHECK: test_vsqrtq_f32
+ //CHECK-LABEL: test_vsqrtq_f32
return vsqrtq_f32(a);
// CHECK: fsqrt v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
float64x2_t test_vsqrtq_f64(float64x2_t a) {
- //CHECK: test_vsqrtq_f64
+ //CHECK-LABEL: test_vsqrtq_f64
return vsqrtq_f64(a);
// CHECK: fsqrt v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
float32x2_t test_vcvt_f32_s32(int32x2_t a) {
- //CHECK: test_vcvt_f32_s32
+ //CHECK-LABEL: test_vcvt_f32_s32
return vcvt_f32_s32(a);
//CHECK: scvtf v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
float32x2_t test_vcvt_f32_u32(uint32x2_t a) {
- //CHECK: test_vcvt_f32_u32
+ //CHECK-LABEL: test_vcvt_f32_u32
return vcvt_f32_u32(a);
//CHECK: ucvtf v{{[0-9]+}}.2s, v{{[0-9]+}}.2s
}
float32x4_t test_vcvtq_f32_s32(int32x4_t a) {
- //CHECK: test_vcvtq_f32_s32
+ //CHECK-LABEL: test_vcvtq_f32_s32
return vcvtq_f32_s32(a);
//CHECK: scvtf v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
float32x4_t test_vcvtq_f32_u32(uint32x4_t a) {
- //CHECK: test_vcvtq_f32_u32
+ //CHECK-LABEL: test_vcvtq_f32_u32
return vcvtq_f32_u32(a);
//CHECK: ucvtf v{{[0-9]+}}.4s, v{{[0-9]+}}.4s
}
float64x2_t test_vcvtq_f64_s64(int64x2_t a) {
- //CHECK: test_vcvtq_f64_s64
+ //CHECK-LABEL: test_vcvtq_f64_s64
return vcvtq_f64_s64(a);
//CHECK: scvtf v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
float64x2_t test_vcvtq_f64_u64(uint64x2_t a) {
- //CHECK: test_vcvtq_f64_u64
+ //CHECK-LABEL: test_vcvtq_f64_u64
return vcvtq_f64_u64(a);
//CHECK: ucvtf v{{[0-9]+}}.2d, v{{[0-9]+}}.2d
}
diff --git a/test/CodeGen/aarch64-neon-perm.c b/test/CodeGen/aarch64-neon-perm.c
index 903570b9954a..07edc11a255a 100644
--- a/test/CodeGen/aarch64-neon-perm.c
+++ b/test/CodeGen/aarch64-neon-perm.c
@@ -1,1092 +1,1091 @@
// REQUIRES: aarch64-registered-target
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
// RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s
// Test new aarch64 intrinsics and types
-
#include <arm_neon.h>
int8x8_t test_vuzp1_s8(int8x8_t a, int8x8_t b) {
- // CHECK: test_vuzp1_s8
+ // CHECK-LABEL: test_vuzp1_s8
return vuzp1_s8(a, b);
// CHECK: uzp1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int8x16_t test_vuzp1q_s8(int8x16_t a, int8x16_t b) {
- // CHECK: test_vuzp1q_s8
+ // CHECK-LABEL: test_vuzp1q_s8
return vuzp1q_s8(a, b);
// CHECK: uzp1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x4_t test_vuzp1_s16(int16x4_t a, int16x4_t b) {
- // CHECK: test_vuzp1_s16
+ // CHECK-LABEL: test_vuzp1_s16
return vuzp1_s16(a, b);
// CHECK: uzp1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int16x8_t test_vuzp1q_s16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vuzp1q_s16
+ // CHECK-LABEL: test_vuzp1q_s16
return vuzp1q_s16(a, b);
// CHECK: uzp1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x2_t test_vuzp1_s32(int32x2_t a, int32x2_t b) {
- // CHECK: test_vuzp1_s32
+ // CHECK-LABEL: test_vuzp1_s32
return vuzp1_s32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
+ // CHECK: {{ins v[0-9]+.s\[1\], v[0-9]+.s\[0\]|zip1 v0.2s, v0.2s, v1.2s}}
}
int32x4_t test_vuzp1q_s32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vuzp1q_s32
+ // CHECK-LABEL: test_vuzp1q_s32
return vuzp1q_s32(a, b);
// CHECK: uzp1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int64x2_t test_vuzp1q_s64(int64x2_t a, int64x2_t b) {
- // CHECK: test_vuzp1q_s64
+ // CHECK-LABEL: test_vuzp1q_s64
return vuzp1q_s64(a, b);
- // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
+ // CHECK: {{ins v[0-9]+.d\[1\], v[0-9]+.d\[0\]|zip1 v0.2d, v0.2d, v1.2d}}
}
uint8x8_t test_vuzp1_u8(uint8x8_t a, uint8x8_t b) {
- // CHECK: test_vuzp1_u8
+ // CHECK-LABEL: test_vuzp1_u8
return vuzp1_u8(a, b);
// CHECK: uzp1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint8x16_t test_vuzp1q_u8(uint8x16_t a, uint8x16_t b) {
- // CHECK: test_vuzp1q_u8
+ // CHECK-LABEL: test_vuzp1q_u8
return vuzp1q_u8(a, b);
// CHECK: uzp1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x4_t test_vuzp1_u16(uint16x4_t a, uint16x4_t b) {
- // CHECK: test_vuzp1_u16
+ // CHECK-LABEL: test_vuzp1_u16
return vuzp1_u16(a, b);
// CHECK: uzp1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint16x8_t test_vuzp1q_u16(uint16x8_t a, uint16x8_t b) {
- // CHECK: test_vuzp1q_u16
+ // CHECK-LABEL: test_vuzp1q_u16
return vuzp1q_u16(a, b);
// CHECK: uzp1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x2_t test_vuzp1_u32(uint32x2_t a, uint32x2_t b) {
- // CHECK: test_vuzp1_u32
+ // CHECK-LABEL: test_vuzp1_u32
return vuzp1_u32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
+ // CHECK: {{ins v[0-9]+.s\[1\], v[0-9]+.s\[0\]|zip1 v0.2s, v0.2s, v1.2s}}
}
uint32x4_t test_vuzp1q_u32(uint32x4_t a, uint32x4_t b) {
- // CHECK: test_vuzp1q_u32
+ // CHECK-LABEL: test_vuzp1q_u32
return vuzp1q_u32(a, b);
// CHECK: uzp1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint64x2_t test_vuzp1q_u64(uint64x2_t a, uint64x2_t b) {
- // CHECK: test_vuzp1q_u64
+ // CHECK-LABEL: test_vuzp1q_u64
return vuzp1q_u64(a, b);
- // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
+ // CHECK: {{ins v[0-9]+.d\[1\], v[0-9]+.d\[0\]|zip1 v0.2d, v0.2d, v1.2d}}
}
float32x2_t test_vuzp1_f32(float32x2_t a, float32x2_t b) {
- // CHECK: test_vuzp1_f32
+ // CHECK-LABEL: test_vuzp1_f32
return vuzp1_f32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
+ // CHECK: {{ins v[0-9]+.s\[1\], v[0-9]+.s\[0\]|zip1 v0.2s, v0.2s, v1.2s}}
}
float32x4_t test_vuzp1q_f32(float32x4_t a, float32x4_t b) {
- // CHECK: test_vuzp1q_f32
+ // CHECK-LABEL: test_vuzp1q_f32
return vuzp1q_f32(a, b);
// CHECK: uzp1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vuzp1q_f64(float64x2_t a, float64x2_t b) {
- // CHECK: test_vuzp1q_f64
+ // CHECK-LABEL: test_vuzp1q_f64
return vuzp1q_f64(a, b);
- // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
+ // CHECK: {{ins v[0-9]+.d\[1\], v[0-9]+.d\[0\]|zip1 v0.2d, v0.2d, v1.2d}}
}
poly8x8_t test_vuzp1_p8(poly8x8_t a, poly8x8_t b) {
- // CHECK: test_vuzp1_p8
+ // CHECK-LABEL: test_vuzp1_p8
return vuzp1_p8(a, b);
// CHECK: uzp1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
poly8x16_t test_vuzp1q_p8(poly8x16_t a, poly8x16_t b) {
- // CHECK: test_vuzp1q_p8
+ // CHECK-LABEL: test_vuzp1q_p8
return vuzp1q_p8(a, b);
// CHECK: uzp1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
poly16x4_t test_vuzp1_p16(poly16x4_t a, poly16x4_t b) {
- // CHECK: test_vuzp1_p16
+ // CHECK-LABEL: test_vuzp1_p16
return vuzp1_p16(a, b);
// CHECK: uzp1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
poly16x8_t test_vuzp1q_p16(poly16x8_t a, poly16x8_t b) {
- // CHECK: test_vuzp1q_p16
+ // CHECK-LABEL: test_vuzp1q_p16
return vuzp1q_p16(a, b);
// CHECK: uzp1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int8x8_t test_vuzp2_s8(int8x8_t a, int8x8_t b) {
- // CHECK: test_vuzp2_s8
+ // CHECK-LABEL: test_vuzp2_s8
return vuzp2_s8(a, b);
// CHECK: uzp2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int8x16_t test_vuzp2q_s8(int8x16_t a, int8x16_t b) {
- // CHECK: test_vuzp2q_s8
+ // CHECK-LABEL: test_vuzp2q_s8
return vuzp2q_s8(a, b);
// CHECK: uzp2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x4_t test_vuzp2_s16(int16x4_t a, int16x4_t b) {
- // CHECK: test_vuzp2_s16
+ // CHECK-LABEL: test_vuzp2_s16
return vuzp2_s16(a, b);
// CHECK: uzp2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int16x8_t test_vuzp2q_s16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vuzp2q_s16
+ // CHECK-LABEL: test_vuzp2q_s16
return vuzp2q_s16(a, b);
// CHECK: uzp2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x2_t test_vuzp2_s32(int32x2_t a, int32x2_t b) {
- // CHECK: test_vuzp2_s32
+ // CHECK-LABEL: test_vuzp2_s32
return vuzp2_s32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
+ // CHECK: {{ins v[0-9]+.s\[0\], v[0-9]+.s\[1\]|zip2 v0.2s, v0.2s, v1.2s}}
}
int32x4_t test_vuzp2q_s32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vuzp2q_s32
+ // CHECK-LABEL: test_vuzp2q_s32
return vuzp2q_s32(a, b);
// CHECK: uzp2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int64x2_t test_vuzp2q_s64(int64x2_t a, int64x2_t b) {
- // CHECK: test_vuzp2q_s64
+ // CHECK-LABEL: test_vuzp2q_s64
return vuzp2q_s64(a, b);
- // CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[1]
+ // CHECK: {{ins v[0-9]+.d\[0\], v[0-9]+.d\[1\]|zip2 v0.2d, v0.2d, v1.2d}}
}
uint8x8_t test_vuzp2_u8(uint8x8_t a, uint8x8_t b) {
- // CHECK: test_vuzp2_u8
+ // CHECK-LABEL: test_vuzp2_u8
return vuzp2_u8(a, b);
// CHECK: uzp2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint8x16_t test_vuzp2q_u8(uint8x16_t a, uint8x16_t b) {
- // CHECK: test_vuzp2q_u8
+ // CHECK-LABEL: test_vuzp2q_u8
return vuzp2q_u8(a, b);
// CHECK: uzp2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x4_t test_vuzp2_u16(uint16x4_t a, uint16x4_t b) {
- // CHECK: test_vuzp2_u16
+ // CHECK-LABEL: test_vuzp2_u16
return vuzp2_u16(a, b);
// CHECK: uzp2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint16x8_t test_vuzp2q_u16(uint16x8_t a, uint16x8_t b) {
- // CHECK: test_vuzp2q_u16
+ // CHECK-LABEL: test_vuzp2q_u16
return vuzp2q_u16(a, b);
// CHECK: uzp2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x2_t test_vuzp2_u32(uint32x2_t a, uint32x2_t b) {
- // CHECK: test_vuzp2_u32
+ // CHECK-LABEL: test_vuzp2_u32
return vuzp2_u32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
+ // CHECK: {{ins v[0-9]+.s\[0\], v[0-9]+.s\[1\]|zip2 v0.2s, v0.2s, v1.2s}}
}
uint32x4_t test_vuzp2q_u32(uint32x4_t a, uint32x4_t b) {
- // CHECK: test_vuzp2q_u32
+ // CHECK-LABEL: test_vuzp2q_u32
return vuzp2q_u32(a, b);
// CHECK: uzp2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint64x2_t test_vuzp2q_u64(uint64x2_t a, uint64x2_t b) {
- // CHECK: test_vuzp2q_u64
+ // CHECK-LABEL: test_vuzp2q_u64
return vuzp2q_u64(a, b);
- // CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[1]
+ // CHECK: {{ins v[0-9]+.d\[0\], v[0-9]+.d\[1\]|zip2 v0.2d, v0.2d, v1.2d}}
}
float32x2_t test_vuzp2_f32(float32x2_t a, float32x2_t b) {
- // CHECK: test_vuzp2_f32
+ // CHECK-LABEL: test_vuzp2_f32
return vuzp2_f32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
+ // CHECK: {{ins v[0-9]+.s\[0\], v[0-9]+.s\[1\]|zip2 v0.2s, v0.2s, v1.2s}}
}
float32x4_t test_vuzp2q_f32(float32x4_t a, float32x4_t b) {
- // CHECK: test_vuzp2q_f32
+ // CHECK-LABEL: test_vuzp2q_f32
return vuzp2q_f32(a, b);
// CHECK: uzp2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vuzp2q_f64(float64x2_t a, float64x2_t b) {
- // CHECK: test_vuzp2q_f64
+ // CHECK-LABEL: test_vuzp2q_f64
return vuzp2q_f64(a, b);
- // CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[1]
+ // CHECK: {{ins v[0-9]+.d\[0\], v[0-9]+.d\[1\]|zip2 v0.2d, v0.2d, v1.2d}}
}
poly8x8_t test_vuzp2_p8(poly8x8_t a, poly8x8_t b) {
- // CHECK: test_vuzp2_p8
+ // CHECK-LABEL: test_vuzp2_p8
return vuzp2_p8(a, b);
// CHECK: uzp2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
poly8x16_t test_vuzp2q_p8(poly8x16_t a, poly8x16_t b) {
- // CHECK: test_vuzp2q_p8
+ // CHECK-LABEL: test_vuzp2q_p8
return vuzp2q_p8(a, b);
// CHECK: uzp2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
poly16x4_t test_vuzp2_p16(poly16x4_t a, poly16x4_t b) {
- // CHECK: test_vuzp2_p16
+ // CHECK-LABEL: test_vuzp2_p16
return vuzp2_p16(a, b);
// CHECK: uzp2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
poly16x8_t test_vuzp2q_p16(poly16x8_t a, poly16x8_t b) {
- // CHECK: test_vuzp2q_p16
+ // CHECK-LABEL: test_vuzp2q_p16
return vuzp2q_p16(a, b);
// CHECK: uzp2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int8x8_t test_vzip1_s8(int8x8_t a, int8x8_t b) {
- // CHECK: test_vzip1_s8
+ // CHECK-LABEL: test_vzip1_s8
return vzip1_s8(a, b);
// CHECK: zip1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int8x16_t test_vzip1q_s8(int8x16_t a, int8x16_t b) {
- // CHECK: test_vzip1q_s8
+ // CHECK-LABEL: test_vzip1q_s8
return vzip1q_s8(a, b);
// CHECK: zip1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x4_t test_vzip1_s16(int16x4_t a, int16x4_t b) {
- // CHECK: test_vzip1_s16
+ // CHECK-LABEL: test_vzip1_s16
return vzip1_s16(a, b);
// CHECK: zip1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int16x8_t test_vzip1q_s16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vzip1q_s16
+ // CHECK-LABEL: test_vzip1q_s16
return vzip1q_s16(a, b);
// CHECK: zip1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x2_t test_vzip1_s32(int32x2_t a, int32x2_t b) {
- // CHECK: test_vzip1_s32
+ // CHECK-LABEL: test_vzip1_s32
return vzip1_s32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
+ // CHECK: {{ins v[0-9]+.s\[1\], v[0-9]+.s\[0\]|zip1 v0.2s, v0.2s, v1.2s}}
}
int32x4_t test_vzip1q_s32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vzip1q_s32
+ // CHECK-LABEL: test_vzip1q_s32
return vzip1q_s32(a, b);
// CHECK: zip1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int64x2_t test_vzip1q_s64(int64x2_t a, int64x2_t b) {
- // CHECK: test_vzip1q_s64
+ // CHECK-LABEL: test_vzip1q_s64
return vzip1q_s64(a, b);
- // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
+ // CHECK: {{ins v[0-9]+.d\[1\], v[0-9]+.d\[0\]|zip1 v0.2d, v0.2d, v1.2d}}
}
uint8x8_t test_vzip1_u8(uint8x8_t a, uint8x8_t b) {
- // CHECK: test_vzip1_u8
+ // CHECK-LABEL: test_vzip1_u8
return vzip1_u8(a, b);
// CHECK: zip1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint8x16_t test_vzip1q_u8(uint8x16_t a, uint8x16_t b) {
- // CHECK: test_vzip1q_u8
+ // CHECK-LABEL: test_vzip1q_u8
return vzip1q_u8(a, b);
// CHECK: zip1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x4_t test_vzip1_u16(uint16x4_t a, uint16x4_t b) {
- // CHECK: test_vzip1_u16
+ // CHECK-LABEL: test_vzip1_u16
return vzip1_u16(a, b);
// CHECK: zip1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint16x8_t test_vzip1q_u16(uint16x8_t a, uint16x8_t b) {
- // CHECK: test_vzip1q_u16
+ // CHECK-LABEL: test_vzip1q_u16
return vzip1q_u16(a, b);
// CHECK: zip1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x2_t test_vzip1_u32(uint32x2_t a, uint32x2_t b) {
- // CHECK: test_vzip1_u32
+ // CHECK-LABEL: test_vzip1_u32
return vzip1_u32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
+ // CHECK: {{ins v[0-9]+.s\[1\], v[0-9]+.s\[0\]|zip1 v0.2s, v0.2s, v1.2s}}
}
uint32x4_t test_vzip1q_u32(uint32x4_t a, uint32x4_t b) {
- // CHECK: test_vzip1q_u32
+ // CHECK-LABEL: test_vzip1q_u32
return vzip1q_u32(a, b);
// CHECK: zip1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint64x2_t test_vzip1q_u64(uint64x2_t a, uint64x2_t b) {
- // CHECK: test_vzip1q_u64
+ // CHECK-LABEL: test_vzip1q_u64
return vzip1q_u64(a, b);
- // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
+ // CHECK: {{ins v[0-9]+.d\[1\], v[0-9]+.d\[0\]|zip1 v0.2d, v0.2d, v1.2d}}
}
float32x2_t test_vzip1_f32(float32x2_t a, float32x2_t b) {
- // CHECK: test_vzip1_f32
+ // CHECK-LABEL: test_vzip1_f32
return vzip1_f32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
+ // CHECK: {{ins v[0-9]+.s\[1\], v[0-9]+.s\[0\]|zip1 v0.2s, v0.2s, v1.2s}}
}
float32x4_t test_vzip1q_f32(float32x4_t a, float32x4_t b) {
- // CHECK: test_vzip1q_f32
+ // CHECK-LABEL: test_vzip1q_f32
return vzip1q_f32(a, b);
// CHECK: zip1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vzip1q_f64(float64x2_t a, float64x2_t b) {
- // CHECK: test_vzip1q_f64
+ // CHECK-LABEL: test_vzip1q_f64
return vzip1q_f64(a, b);
- // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
+ // CHECK: {{ins v[0-9]+.d\[1\], v[0-9]+.d\[0\]|zip1 v0.2d, v0.2d, v1.2d}}
}
poly8x8_t test_vzip1_p8(poly8x8_t a, poly8x8_t b) {
- // CHECK: test_vzip1_p8
+ // CHECK-LABEL: test_vzip1_p8
return vzip1_p8(a, b);
// CHECK: zip1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
poly8x16_t test_vzip1q_p8(poly8x16_t a, poly8x16_t b) {
- // CHECK: test_vzip1q_p8
+ // CHECK-LABEL: test_vzip1q_p8
return vzip1q_p8(a, b);
// CHECK: zip1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
poly16x4_t test_vzip1_p16(poly16x4_t a, poly16x4_t b) {
- // CHECK: test_vzip1_p16
+ // CHECK-LABEL: test_vzip1_p16
return vzip1_p16(a, b);
// CHECK: zip1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
poly16x8_t test_vzip1q_p16(poly16x8_t a, poly16x8_t b) {
- // CHECK: test_vzip1q_p16
+ // CHECK-LABEL: test_vzip1q_p16
return vzip1q_p16(a, b);
// CHECK: zip1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int8x8_t test_vzip2_s8(int8x8_t a, int8x8_t b) {
- // CHECK: test_vzip2_s8
+ // CHECK-LABEL: test_vzip2_s8
return vzip2_s8(a, b);
// CHECK: zip2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int8x16_t test_vzip2q_s8(int8x16_t a, int8x16_t b) {
- // CHECK: test_vzip2q_s8
+ // CHECK-LABEL: test_vzip2q_s8
return vzip2q_s8(a, b);
// CHECK: zip2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x4_t test_vzip2_s16(int16x4_t a, int16x4_t b) {
- // CHECK: test_vzip2_s16
+ // CHECK-LABEL: test_vzip2_s16
return vzip2_s16(a, b);
// CHECK: zip2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int16x8_t test_vzip2q_s16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vzip2q_s16
+ // CHECK-LABEL: test_vzip2q_s16
return vzip2q_s16(a, b);
// CHECK: zip2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x2_t test_vzip2_s32(int32x2_t a, int32x2_t b) {
- // CHECK: test_vzip2_s32
+ // CHECK-LABEL: test_vzip2_s32
return vzip2_s32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
+ // CHECK: {{ins v[0-9]+.s\[0\], v[0-9]+.s\[1\]|zip2 v0.2s, v0.2s, v1.2s}}
}
int32x4_t test_vzip2q_s32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vzip2q_s32
+ // CHECK-LABEL: test_vzip2q_s32
return vzip2q_s32(a, b);
// CHECK: zip2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int64x2_t test_vzip2q_s64(int64x2_t a, int64x2_t b) {
- // CHECK: test_vzip2q_s64
+ // CHECK-LABEL: test_vzip2q_s64
return vzip2q_s64(a, b);
- // CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[1]
+ // CHECK: {{ins v[0-9]+.d\[0\], v[0-9]+.d\[1\]|zip2 v0.2d, v0.2d, v1.2d}}
}
uint8x8_t test_vzip2_u8(uint8x8_t a, uint8x8_t b) {
- // CHECK: test_vzip2_u8
+ // CHECK-LABEL: test_vzip2_u8
return vzip2_u8(a, b);
// CHECK: zip2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint8x16_t test_vzip2q_u8(uint8x16_t a, uint8x16_t b) {
- // CHECK: test_vzip2q_u8
+ // CHECK-LABEL: test_vzip2q_u8
return vzip2q_u8(a, b);
// CHECK: zip2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x4_t test_vzip2_u16(uint16x4_t a, uint16x4_t b) {
- // CHECK: test_vzip2_u16
+ // CHECK-LABEL: test_vzip2_u16
return vzip2_u16(a, b);
// CHECK: zip2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint16x8_t test_vzip2q_u16(uint16x8_t a, uint16x8_t b) {
- // CHECK: test_vzip2q_u16
+ // CHECK-LABEL: test_vzip2q_u16
return vzip2q_u16(a, b);
// CHECK: zip2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x2_t test_vzip2_u32(uint32x2_t a, uint32x2_t b) {
- // CHECK: test_vzip2_u32
+ // CHECK-LABEL: test_vzip2_u32
return vzip2_u32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
+ // CHECK: {{ins v[0-9]+.s\[0\], v[0-9]+.s\[1\]|zip2 v0.2s, v0.2s, v1.2s}}
}
uint32x4_t test_vzip2q_u32(uint32x4_t a, uint32x4_t b) {
- // CHECK: test_vzip2q_u32
+ // CHECK-LABEL: test_vzip2q_u32
return vzip2q_u32(a, b);
// CHECK: zip2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint64x2_t test_vzip2q_u64(uint64x2_t a, uint64x2_t b) {
- // CHECK: test_vzip2q_u64
+ // CHECK-LABEL: test_vzip2q_u64
return vzip2q_u64(a, b);
- // CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[1]
+ // CHECK: {{ins v[0-9]+.d\[0\], v[0-9]+.d\[1\]|zip2 v0.2d, v0.2d, v1.2d}}
}
float32x2_t test_vzip2_f32(float32x2_t a, float32x2_t b) {
- // CHECK: test_vzip2_f32
+ // CHECK-LABEL: test_vzip2_f32
return vzip2_f32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
+ // CHECK: {{ins v[0-9]+.s\[0\], v[0-9]+.s\[1\]|zip2 v0.2s, v0.2s, v1.2s}}
}
float32x4_t test_vzip2q_f32(float32x4_t a, float32x4_t b) {
- // CHECK: test_vzip2q_f32
+ // CHECK-LABEL: test_vzip2q_f32
return vzip2q_f32(a, b);
// CHECK: zip2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vzip2q_f64(float64x2_t a, float64x2_t b) {
- // CHECK: test_vzip2q_f64
+ // CHECK-LABEL: test_vzip2q_f64
return vzip2q_f64(a, b);
- // CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[1]
+ // CHECK: {{ins v[0-9]+.d\[0\], v[0-9]+.d\[1\]|zip2 v0.2d, v0.2d, v1.2d}}
}
poly8x8_t test_vzip2_p8(poly8x8_t a, poly8x8_t b) {
- // CHECK: test_vzip2_p8
+ // CHECK-LABEL: test_vzip2_p8
return vzip2_p8(a, b);
// CHECK: zip2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
poly8x16_t test_vzip2q_p8(poly8x16_t a, poly8x16_t b) {
- // CHECK: test_vzip2q_p8
+ // CHECK-LABEL: test_vzip2q_p8
return vzip2q_p8(a, b);
// CHECK: zip2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
poly16x4_t test_vzip2_p16(poly16x4_t a, poly16x4_t b) {
- // CHECK: test_vzip2_p16
+ // CHECK-LABEL: test_vzip2_p16
return vzip2_p16(a, b);
// CHECK: zip2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
poly16x8_t test_vzip2q_p16(poly16x8_t a, poly16x8_t b) {
- // CHECK: test_vzip2q_p16
+ // CHECK-LABEL: test_vzip2q_p16
return vzip2q_p16(a, b);
// CHECK: zip2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int8x8_t test_vtrn1_s8(int8x8_t a, int8x8_t b) {
- // CHECK: test_vtrn1_s8
+ // CHECK-LABEL: test_vtrn1_s8
return vtrn1_s8(a, b);
// CHECK: trn1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int8x16_t test_vtrn1q_s8(int8x16_t a, int8x16_t b) {
- // CHECK: test_vtrn1q_s8
+ // CHECK-LABEL: test_vtrn1q_s8
return vtrn1q_s8(a, b);
// CHECK: trn1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x4_t test_vtrn1_s16(int16x4_t a, int16x4_t b) {
- // CHECK: test_vtrn1_s16
+ // CHECK-LABEL: test_vtrn1_s16
return vtrn1_s16(a, b);
// CHECK: trn1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int16x8_t test_vtrn1q_s16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vtrn1q_s16
+ // CHECK-LABEL: test_vtrn1q_s16
return vtrn1q_s16(a, b);
// CHECK: trn1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x2_t test_vtrn1_s32(int32x2_t a, int32x2_t b) {
- // CHECK: test_vtrn1_s32
+ // CHECK-LABEL: test_vtrn1_s32
return vtrn1_s32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
+ // CHECK: {{ins v[0-9]+.s\[1\], v[0-9]+.s\[0\]|zip1 v0.2s, v0.2s, v1.2s}}
}
int32x4_t test_vtrn1q_s32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vtrn1q_s32
+ // CHECK-LABEL: test_vtrn1q_s32
return vtrn1q_s32(a, b);
// CHECK: trn1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int64x2_t test_vtrn1q_s64(int64x2_t a, int64x2_t b) {
- // CHECK: test_vtrn1q_s64
+ // CHECK-LABEL: test_vtrn1q_s64
return vtrn1q_s64(a, b);
- // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
+ // CHECK: {{ins v[0-9]+.d\[1\], v[0-9]+.d\[0\]|zip1 v0.2d, v0.2d, v1.2d}}
}
uint8x8_t test_vtrn1_u8(uint8x8_t a, uint8x8_t b) {
- // CHECK: test_vtrn1_u8
+ // CHECK-LABEL: test_vtrn1_u8
return vtrn1_u8(a, b);
// CHECK: trn1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint8x16_t test_vtrn1q_u8(uint8x16_t a, uint8x16_t b) {
- // CHECK: test_vtrn1q_u8
+ // CHECK-LABEL: test_vtrn1q_u8
return vtrn1q_u8(a, b);
// CHECK: trn1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x4_t test_vtrn1_u16(uint16x4_t a, uint16x4_t b) {
- // CHECK: test_vtrn1_u16
+ // CHECK-LABEL: test_vtrn1_u16
return vtrn1_u16(a, b);
// CHECK: trn1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint16x8_t test_vtrn1q_u16(uint16x8_t a, uint16x8_t b) {
- // CHECK: test_vtrn1q_u16
+ // CHECK-LABEL: test_vtrn1q_u16
return vtrn1q_u16(a, b);
// CHECK: trn1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x2_t test_vtrn1_u32(uint32x2_t a, uint32x2_t b) {
- // CHECK: test_vtrn1_u32
+ // CHECK-LABEL: test_vtrn1_u32
return vtrn1_u32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
+ // CHECK: {{ins v[0-9]+.s\[1\], v[0-9]+.s\[0\]|zip1 v0.2s, v0.2s, v1.2s}}
}
uint32x4_t test_vtrn1q_u32(uint32x4_t a, uint32x4_t b) {
- // CHECK: test_vtrn1q_u32
+ // CHECK-LABEL: test_vtrn1q_u32
return vtrn1q_u32(a, b);
// CHECK: trn1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint64x2_t test_vtrn1q_u64(uint64x2_t a, uint64x2_t b) {
- // CHECK: test_vtrn1q_u64
+ // CHECK-LABEL: test_vtrn1q_u64
return vtrn1q_u64(a, b);
- // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
+ // CHECK: {{ins v[0-9]+.d\[1\], v[0-9]+.d\[0\]|zip1 v0.2d, v0.2d, v1.2d}}
}
float32x2_t test_vtrn1_f32(float32x2_t a, float32x2_t b) {
- // CHECK: test_vtrn1_f32
+ // CHECK-LABEL: test_vtrn1_f32
return vtrn1_f32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
+ // CHECK: {{ins v[0-9]+.s\[1\], v[0-9]+.s\[0\]|zip1 v0.2s, v0.2s, v1.2s}}
}
float32x4_t test_vtrn1q_f32(float32x4_t a, float32x4_t b) {
- // CHECK: test_vtrn1q_f32
+ // CHECK-LABEL: test_vtrn1q_f32
return vtrn1q_f32(a, b);
// CHECK: trn1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vtrn1q_f64(float64x2_t a, float64x2_t b) {
- // CHECK: test_vtrn1q_f64
+ // CHECK-LABEL: test_vtrn1q_f64
return vtrn1q_f64(a, b);
- // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
+ // CHECK: {{ins v[0-9]+.d\[1\], v[0-9]+.d\[0\]|zip1 v0.2d, v0.2d, v1.2d}}
}
poly8x8_t test_vtrn1_p8(poly8x8_t a, poly8x8_t b) {
- // CHECK: test_vtrn1_p8
+ // CHECK-LABEL: test_vtrn1_p8
return vtrn1_p8(a, b);
// CHECK: trn1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
poly8x16_t test_vtrn1q_p8(poly8x16_t a, poly8x16_t b) {
- // CHECK: test_vtrn1q_p8
+ // CHECK-LABEL: test_vtrn1q_p8
return vtrn1q_p8(a, b);
// CHECK: trn1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
poly16x4_t test_vtrn1_p16(poly16x4_t a, poly16x4_t b) {
- // CHECK: test_vtrn1_p16
+ // CHECK-LABEL: test_vtrn1_p16
return vtrn1_p16(a, b);
// CHECK: trn1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
poly16x8_t test_vtrn1q_p16(poly16x8_t a, poly16x8_t b) {
- // CHECK: test_vtrn1q_p16
+ // CHECK-LABEL: test_vtrn1q_p16
return vtrn1q_p16(a, b);
// CHECK: trn1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int8x8_t test_vtrn2_s8(int8x8_t a, int8x8_t b) {
- // CHECK: test_vtrn2_s8
+ // CHECK-LABEL: test_vtrn2_s8
return vtrn2_s8(a, b);
// CHECK: trn2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int8x16_t test_vtrn2q_s8(int8x16_t a, int8x16_t b) {
- // CHECK: test_vtrn2q_s8
+ // CHECK-LABEL: test_vtrn2q_s8
return vtrn2q_s8(a, b);
// CHECK: trn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x4_t test_vtrn2_s16(int16x4_t a, int16x4_t b) {
- // CHECK: test_vtrn2_s16
+ // CHECK-LABEL: test_vtrn2_s16
return vtrn2_s16(a, b);
// CHECK: trn2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int16x8_t test_vtrn2q_s16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vtrn2q_s16
+ // CHECK-LABEL: test_vtrn2q_s16
return vtrn2q_s16(a, b);
// CHECK: trn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x2_t test_vtrn2_s32(int32x2_t a, int32x2_t b) {
- // CHECK: test_vtrn2_s32
+ // CHECK-LABEL: test_vtrn2_s32
return vtrn2_s32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
+ // CHECK: {{ins v[0-9]+.s\[0\], v[0-9]+.s\[1\]|zip2 v0.2s, v0.2s, v1.2s}}
}
int32x4_t test_vtrn2q_s32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vtrn2q_s32
+ // CHECK-LABEL: test_vtrn2q_s32
return vtrn2q_s32(a, b);
// CHECK: trn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
int64x2_t test_vtrn2q_s64(int64x2_t a, int64x2_t b) {
- // CHECK: test_vtrn2q_s64
+ // CHECK-LABEL: test_vtrn2q_s64
return vtrn2q_s64(a, b);
- // CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[1]
+ // CHECK: {{ins v[0-9]+.d\[0\], v[0-9]+.d\[1\]|zip2 v0.2d, v0.2d, v1.2d}}
}
uint8x8_t test_vtrn2_u8(uint8x8_t a, uint8x8_t b) {
- // CHECK: test_vtrn2_u8
+ // CHECK-LABEL: test_vtrn2_u8
return vtrn2_u8(a, b);
// CHECK: trn2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint8x16_t test_vtrn2q_u8(uint8x16_t a, uint8x16_t b) {
- // CHECK: test_vtrn2q_u8
+ // CHECK-LABEL: test_vtrn2q_u8
return vtrn2q_u8(a, b);
// CHECK: trn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x4_t test_vtrn2_u16(uint16x4_t a, uint16x4_t b) {
- // CHECK: test_vtrn2_u16
+ // CHECK-LABEL: test_vtrn2_u16
return vtrn2_u16(a, b);
// CHECK: trn2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint16x8_t test_vtrn2q_u16(uint16x8_t a, uint16x8_t b) {
- // CHECK: test_vtrn2q_u16
+ // CHECK-LABEL: test_vtrn2q_u16
return vtrn2q_u16(a, b);
// CHECK: trn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x2_t test_vtrn2_u32(uint32x2_t a, uint32x2_t b) {
- // CHECK: test_vtrn2_u32
+ // CHECK-LABEL: test_vtrn2_u32
return vtrn2_u32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
+ // CHECK: {{ins v[0-9]+.s\[0\], v[0-9]+.s\[1\]|zip2 v0.2s, v0.2s, v1.2s}}
}
uint32x4_t test_vtrn2q_u32(uint32x4_t a, uint32x4_t b) {
- // CHECK: test_vtrn2q_u32
+ // CHECK-LABEL: test_vtrn2q_u32
return vtrn2q_u32(a, b);
// CHECK: trn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint64x2_t test_vtrn2q_u64(uint64x2_t a, uint64x2_t b) {
- // CHECK: test_vtrn2q_u64
+ // CHECK-LABEL: test_vtrn2q_u64
return vtrn2q_u64(a, b);
- // CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[1]
+ // CHECK: {{ins v[0-9]+.d\[0\], v[0-9]+.d\[1\]|zip2 v0.2d, v0.2d, v1.2d}}
}
float32x2_t test_vtrn2_f32(float32x2_t a, float32x2_t b) {
- // CHECK: test_vtrn2_f32
+ // CHECK-LABEL: test_vtrn2_f32
return vtrn2_f32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
+ // CHECK: {{ins v[0-9]+.s\[0\], v[0-9]+.s\[1\]|zip2 v0.2s, v0.2s, v1.2s}}
}
float32x4_t test_vtrn2q_f32(float32x4_t a, float32x4_t b) {
- // CHECK: test_vtrn2q_f32
+ // CHECK-LABEL: test_vtrn2q_f32
return vtrn2q_f32(a, b);
// CHECK: trn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float64x2_t test_vtrn2q_f64(float64x2_t a, float64x2_t b) {
- // CHECK: test_vtrn2q_f64
+ // CHECK-LABEL: test_vtrn2q_f64
return vtrn2q_f64(a, b);
- // CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[1]
+ // CHECK: {{ins v[0-9]+.d\[0\], v[0-9]+.d\[1\]|zip2 v0.2d, v0.2d, v1.2d}}
}
poly8x8_t test_vtrn2_p8(poly8x8_t a, poly8x8_t b) {
- // CHECK: test_vtrn2_p8
+ // CHECK-LABEL: test_vtrn2_p8
return vtrn2_p8(a, b);
// CHECK: trn2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
poly8x16_t test_vtrn2q_p8(poly8x16_t a, poly8x16_t b) {
- // CHECK: test_vtrn2q_p8
+ // CHECK-LABEL: test_vtrn2q_p8
return vtrn2q_p8(a, b);
// CHECK: trn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
poly16x4_t test_vtrn2_p16(poly16x4_t a, poly16x4_t b) {
- // CHECK: test_vtrn2_p16
+ // CHECK-LABEL: test_vtrn2_p16
return vtrn2_p16(a, b);
// CHECK: trn2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
poly16x8_t test_vtrn2q_p16(poly16x8_t a, poly16x8_t b) {
- // CHECK: test_vtrn2q_p16
+ // CHECK-LABEL: test_vtrn2q_p16
return vtrn2q_p16(a, b);
// CHECK: trn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int8x8x2_t test_vuzp_s8(int8x8_t a, int8x8_t b) {
- // CHECK: test_vuzp_s8
+ // CHECK-LABEL: test_vuzp_s8
return vuzp_s8(a, b);
// CHECK: uzp1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
// CHECK: uzp2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int16x4x2_t test_vuzp_s16(int16x4_t a, int16x4_t b) {
- // CHECK: test_vuzp_s16
+ // CHECK-LABEL: test_vuzp_s16
return vuzp_s16(a, b);
// CHECK: uzp1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
// CHECK: uzp2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2x2_t test_vuzp_s32(int32x2_t a, int32x2_t b) {
- // CHECK: test_vuzp_s32
+ // CHECK-LABEL: test_vuzp_s32
return vuzp_s32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
+ // CHECK: {{ins v[0-9]+.s\[1\], v[0-9]+.s\[0\]|zip1 v2.2s, v0.2s, v1.2s}}
+ // CHECK: {{ins v[0-9]+.s\[0\], v[0-9]+.s\[1\]|zip2 v1.2s, v0.2s, v1.2s}}
}
uint8x8x2_t test_vuzp_u8(uint8x8_t a, uint8x8_t b) {
- // CHECK: test_vuzp_u8
+ // CHECK-LABEL: test_vuzp_u8
return vuzp_u8(a, b);
// CHECK: uzp1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
// CHECK: uzp2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4x2_t test_vuzp_u16(uint16x4_t a, uint16x4_t b) {
- // CHECK: test_vuzp_u16
+ // CHECK-LABEL: test_vuzp_u16
return vuzp_u16(a, b);
// CHECK: uzp1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
// CHECK: uzp2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2x2_t test_vuzp_u32(uint32x2_t a, uint32x2_t b) {
- // CHECK: test_vuzp_u32
+ // CHECK-LABEL: test_vuzp_u32
return vuzp_u32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
+ // CHECK: {{ins v[0-9]+.s\[1\], v[0-9]+.s\[0\]|zip1 v2.2s, v0.2s, v1.2s}}
+ // CHECK: {{ins v[0-9]+.s\[0\], v[0-9]+.s\[1\]|zip2 v1.2s, v0.2s, v1.2s}}
}
float32x2x2_t test_vuzp_f32(float32x2_t a, float32x2_t b) {
- // CHECK: test_vuzp_f32
+ // CHECK-LABEL: test_vuzp_f32
return vuzp_f32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
+ // CHECK: {{ins v[0-9]+.s\[1\], v[0-9]+.s\[0\]|zip1 v2.2s, v0.2s, v1.2s}}
+ // CHECK: {{ins v[0-9]+.s\[0\], v[0-9]+.s\[1\]|zip2 v1.2s, v0.2s, v1.2s}}
}
poly8x8x2_t test_vuzp_p8(poly8x8_t a, poly8x8_t b) {
- // CHECK: test_vuzp_p8
+ // CHECK-LABEL: test_vuzp_p8
return vuzp_p8(a, b);
// CHECK: uzp1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
// CHECK: uzp2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
poly16x4x2_t test_vuzp_p16(poly16x4_t a, poly16x4_t b) {
- // CHECK: test_vuzp_p16
+ // CHECK-LABEL: test_vuzp_p16
return vuzp_p16(a, b);
// CHECK: uzp1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
// CHECK: uzp2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int8x16x2_t test_vuzpq_s8(int8x16_t a, int8x16_t b) {
- // CHECK: test_vuzpq_s8
+ // CHECK-LABEL: test_vuzpq_s8
return vuzpq_s8(a, b);
// CHECK: uzp1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
// CHECK: uzp2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8x2_t test_vuzpq_s16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vuzpq_s16
+ // CHECK-LABEL: test_vuzpq_s16
return vuzpq_s16(a, b);
// CHECK: uzp1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
// CHECK: uzp2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4x2_t test_vuzpq_s32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vuzpq_s32
+ // CHECK-LABEL: test_vuzpq_s32
return vuzpq_s32(a, b);
// CHECK: uzp1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
// CHECK: uzp2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint8x16x2_t test_vuzpq_u8(uint8x16_t a, uint8x16_t b) {
- // CHECK: test_vuzpq_u8
+ // CHECK-LABEL: test_vuzpq_u8
return vuzpq_u8(a, b);
// CHECK: uzp1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
// CHECK: uzp2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8x2_t test_vuzpq_u16(uint16x8_t a, uint16x8_t b) {
- // CHECK: test_vuzpq_u16
+ // CHECK-LABEL: test_vuzpq_u16
return vuzpq_u16(a, b);
// CHECK: uzp1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
// CHECK: uzp2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4x2_t test_vuzpq_u32(uint32x4_t a, uint32x4_t b) {
- // CHECK: test_vuzpq_u32
+ // CHECK-LABEL: test_vuzpq_u32
return vuzpq_u32(a, b);
// CHECK: uzp1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
// CHECK: uzp2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float32x4x2_t test_vuzpq_f32(float32x4_t a, float32x4_t b) {
- // CHECK: test_vuzpq_f32
+ // CHECK-LABEL: test_vuzpq_f32
return vuzpq_f32(a, b);
// CHECK: uzp1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
// CHECK: uzp2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
poly8x16x2_t test_vuzpq_p8(poly8x16_t a, poly8x16_t b) {
- // CHECK: test_vuzpq_p8
+ // CHECK-LABEL: test_vuzpq_p8
return vuzpq_p8(a, b);
// CHECK: uzp1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
// CHECK: uzp2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
poly16x8x2_t test_vuzpq_p16(poly16x8_t a, poly16x8_t b) {
- // CHECK: test_vuzpq_p16
+ // CHECK-LABEL: test_vuzpq_p16
return vuzpq_p16(a, b);
// CHECK: uzp1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
// CHECK: uzp2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int8x8x2_t test_vzip_s8(int8x8_t a, int8x8_t b) {
- // CHECK: test_vzip_s8
+ // CHECK-LABEL: test_vzip_s8
return vzip_s8(a, b);
// CHECK: zip1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
// CHECK: zip2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int16x4x2_t test_vzip_s16(int16x4_t a, int16x4_t b) {
- // CHECK: test_vzip_s16
+ // CHECK-LABEL: test_vzip_s16
return vzip_s16(a, b);
// CHECK: zip1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
// CHECK: zip2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2x2_t test_vzip_s32(int32x2_t a, int32x2_t b) {
- // CHECK: test_vzip_s32
+ // CHECK-LABEL: test_vzip_s32
return vzip_s32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
+ // CHECK: {{ins v[0-9]+.s\[1\], v[0-9]+.s\[0\]|zip1 v2.2s, v0.2s, v1.2s}}
+ // CHECK: {{ins v[0-9]+.s\[0\], v[0-9]+.s\[1\]|zip2 v1.2s, v0.2s, v1.2s}}
}
uint8x8x2_t test_vzip_u8(uint8x8_t a, uint8x8_t b) {
- // CHECK: test_vzip_u8
+ // CHECK-LABEL: test_vzip_u8
return vzip_u8(a, b);
// CHECK: zip1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
// CHECK: zip2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4x2_t test_vzip_u16(uint16x4_t a, uint16x4_t b) {
- // CHECK: test_vzip_u16
+ // CHECK-LABEL: test_vzip_u16
return vzip_u16(a, b);
// CHECK: zip1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
// CHECK: zip2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2x2_t test_vzip_u32(uint32x2_t a, uint32x2_t b) {
- // CHECK: test_vzip_u32
+ // CHECK-LABEL: test_vzip_u32
return vzip_u32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
+ // CHECK: {{ins v[0-9]+.s\[1\], v[0-9]+.s\[0\]|zip1 v2.2s, v0.2s, v1.2s}}
+ // CHECK: {{ins v[0-9]+.s\[0\], v[0-9]+.s\[1\]|zip2 v1.2s, v0.2s, v1.2s}}
}
float32x2x2_t test_vzip_f32(float32x2_t a, float32x2_t b) {
- // CHECK: test_vzip_f32
+ // CHECK-LABEL: test_vzip_f32
return vzip_f32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
+ // CHECK: {{ins v[0-9]+.s\[1\], v[0-9]+.s\[0\]|zip1 v2.2s, v0.2s, v1.2s}}
+ // CHECK: {{ins v[0-9]+.s\[0\], v[0-9]+.s\[1\]|zip2 v1.2s, v0.2s, v1.2s}}
}
poly8x8x2_t test_vzip_p8(poly8x8_t a, poly8x8_t b) {
- // CHECK: test_vzip_p8
+ // CHECK-LABEL: test_vzip_p8
return vzip_p8(a, b);
// CHECK: zip1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
// CHECK: zip2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
poly16x4x2_t test_vzip_p16(poly16x4_t a, poly16x4_t b) {
- // CHECK: test_vzip_p16
+ // CHECK-LABEL: test_vzip_p16
return vzip_p16(a, b);
// CHECK: zip1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
// CHECK: zip2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int8x16x2_t test_vzipq_s8(int8x16_t a, int8x16_t b) {
- // CHECK: test_vzipq_s8
+ // CHECK-LABEL: test_vzipq_s8
return vzipq_s8(a, b);
// CHECK: zip1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
// CHECK: zip2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8x2_t test_vzipq_s16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vzipq_s16
+ // CHECK-LABEL: test_vzipq_s16
return vzipq_s16(a, b);
// CHECK: zip1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
// CHECK: zip2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4x2_t test_vzipq_s32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vzipq_s32
+ // CHECK-LABEL: test_vzipq_s32
return vzipq_s32(a, b);
// CHECK: zip1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
// CHECK: zip2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint8x16x2_t test_vzipq_u8(uint8x16_t a, uint8x16_t b) {
- // CHECK: test_vzipq_u8
+ // CHECK-LABEL: test_vzipq_u8
return vzipq_u8(a, b);
// CHECK: zip1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
// CHECK: zip2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8x2_t test_vzipq_u16(uint16x8_t a, uint16x8_t b) {
- // CHECK: test_vzipq_u16
+ // CHECK-LABEL: test_vzipq_u16
return vzipq_u16(a, b);
// CHECK: zip1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
// CHECK: zip2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4x2_t test_vzipq_u32(uint32x4_t a, uint32x4_t b) {
- // CHECK: test_vzipq_u32
+ // CHECK-LABEL: test_vzipq_u32
return vzipq_u32(a, b);
// CHECK: zip1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
// CHECK: zip2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float32x4x2_t test_vzipq_f32(float32x4_t a, float32x4_t b) {
- // CHECK: test_vzipq_f32
+ // CHECK-LABEL: test_vzipq_f32
return vzipq_f32(a, b);
// CHECK: zip1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
// CHECK: zip2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
poly8x16x2_t test_vzipq_p8(poly8x16_t a, poly8x16_t b) {
- // CHECK: test_vzipq_p8
+ // CHECK-LABEL: test_vzipq_p8
return vzipq_p8(a, b);
// CHECK: zip1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
// CHECK: zip2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
poly16x8x2_t test_vzipq_p16(poly16x8_t a, poly16x8_t b) {
- // CHECK: test_vzipq_p16
+ // CHECK-LABEL: test_vzipq_p16
return vzipq_p16(a, b);
// CHECK: zip1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
// CHECK: zip2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int8x8x2_t test_vtrn_s8(int8x8_t a, int8x8_t b) {
- // CHECK: test_vtrn_s8
+ // CHECK-LABEL: test_vtrn_s8
return vtrn_s8(a, b);
// CHECK: trn1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
// CHECK: trn2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int16x4x2_t test_vtrn_s16(int16x4_t a, int16x4_t b) {
- // CHECK: test_vtrn_s16
+ // CHECK-LABEL: test_vtrn_s16
return vtrn_s16(a, b);
// CHECK: trn1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
// CHECK: trn2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int32x2x2_t test_vtrn_s32(int32x2_t a, int32x2_t b) {
- // CHECK: test_vtrn_s32
+ // CHECK-LABEL: test_vtrn_s32
return vtrn_s32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
+ // CHECK: {{ins v[0-9]+.s\[1\], v[0-9]+.s\[0\]|zip1 v2.2s, v0.2s, v1.2s}}
+ // CHECK: {{ins v[0-9]+.s\[0\], v[0-9]+.s\[1\]|zip2 v1.2s, v0.2s, v1.2s}}
}
uint8x8x2_t test_vtrn_u8(uint8x8_t a, uint8x8_t b) {
- // CHECK: test_vtrn_u8
+ // CHECK-LABEL: test_vtrn_u8
return vtrn_u8(a, b);
// CHECK: trn1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
// CHECK: trn2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint16x4x2_t test_vtrn_u16(uint16x4_t a, uint16x4_t b) {
- // CHECK: test_vtrn_u16
+ // CHECK-LABEL: test_vtrn_u16
return vtrn_u16(a, b);
// CHECK: trn1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
// CHECK: trn2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
uint32x2x2_t test_vtrn_u32(uint32x2_t a, uint32x2_t b) {
- // CHECK: test_vtrn_u32
+ // CHECK-LABEL: test_vtrn_u32
return vtrn_u32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
+ // CHECK: {{ins v[0-9]+.s\[1\], v[0-9]+.s\[0\]|zip1 v2.2s, v0.2s, v1.2s}}
+ // CHECK: {{ins v[0-9]+.s\[0\], v[0-9]+.s\[1\]|zip2 v1.2s, v0.2s, v1.2s}}
}
float32x2x2_t test_vtrn_f32(float32x2_t a, float32x2_t b) {
- // CHECK: test_vtrn_f32
+ // CHECK-LABEL: test_vtrn_f32
return vtrn_f32(a, b);
- // CHECK: ins {{v[0-9]+}}.s[1], {{v[0-9]+}}.s[0]
- // CHECK: ins {{v[0-9]+}}.s[0], {{v[0-9]+}}.s[1]
+ // CHECK: {{ins v[0-9]+.s\[1\], v[0-9]+.s\[0\]|zip1 v2.2s, v0.2s, v1.2s}}
+ // CHECK: {{ins v[0-9]+.s\[0\], v[0-9]+.s\[1\]|zip2 v1.2s, v0.2s, v1.2s}}
}
poly8x8x2_t test_vtrn_p8(poly8x8_t a, poly8x8_t b) {
- // CHECK: test_vtrn_p8
+ // CHECK-LABEL: test_vtrn_p8
return vtrn_p8(a, b);
// CHECK: trn1 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
// CHECK: trn2 {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
poly16x4x2_t test_vtrn_p16(poly16x4_t a, poly16x4_t b) {
- // CHECK: test_vtrn_p16
+ // CHECK-LABEL: test_vtrn_p16
return vtrn_p16(a, b);
// CHECK: trn1 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
// CHECK: trn2 {{v[0-9]+}}.4h, {{v[0-9]+}}.4h
}
int8x16x2_t test_vtrnq_s8(int8x16_t a, int8x16_t b) {
- // CHECK: test_vtrnq_s8
+ // CHECK-LABEL: test_vtrnq_s8
return vtrnq_s8(a, b);
// CHECK: trn1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
// CHECK: trn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
int16x8x2_t test_vtrnq_s16(int16x8_t a, int16x8_t b) {
- // CHECK: test_vtrnq_s16
+ // CHECK-LABEL: test_vtrnq_s16
return vtrnq_s16(a, b);
// CHECK: trn1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
// CHECK: trn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
int32x4x2_t test_vtrnq_s32(int32x4_t a, int32x4_t b) {
- // CHECK: test_vtrnq_s32
+ // CHECK-LABEL: test_vtrnq_s32
return vtrnq_s32(a, b);
// CHECK: trn1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
// CHECK: trn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
uint8x16x2_t test_vtrnq_u8(uint8x16_t a, uint8x16_t b) {
- // CHECK: test_vtrnq_u8
+ // CHECK-LABEL: test_vtrnq_u8
return vtrnq_u8(a, b);
// CHECK: trn1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
// CHECK: trn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
uint16x8x2_t test_vtrnq_u16(uint16x8_t a, uint16x8_t b) {
- // CHECK: test_vtrnq_u16
+ // CHECK-LABEL: test_vtrnq_u16
return vtrnq_u16(a, b);
// CHECK: trn1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
// CHECK: trn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
}
uint32x4x2_t test_vtrnq_u32(uint32x4_t a, uint32x4_t b) {
- // CHECK: test_vtrnq_u32
+ // CHECK-LABEL: test_vtrnq_u32
return vtrnq_u32(a, b);
// CHECK: trn1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
// CHECK: trn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
float32x4x2_t test_vtrnq_f32(float32x4_t a, float32x4_t b) {
- // CHECK: test_vtrnq_f32
+ // CHECK-LABEL: test_vtrnq_f32
return vtrnq_f32(a, b);
// CHECK: trn1 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
// CHECK: trn2 {{v[0-9]+}}.4s, {{v[0-9]+}}.4s
}
poly8x16x2_t test_vtrnq_p8(poly8x16_t a, poly8x16_t b) {
- // CHECK: test_vtrnq_p8
+ // CHECK-LABEL: test_vtrnq_p8
return vtrnq_p8(a, b);
// CHECK: trn1 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
// CHECK: trn2 {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
poly16x8x2_t test_vtrnq_p16(poly16x8_t a, poly16x8_t b) {
- // CHECK: test_vtrnq_p16
+ // CHECK-LABEL: test_vtrnq_p16
return vtrnq_p16(a, b);
// CHECK: trn1 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
// CHECK: trn2 {{v[0-9]+}}.8h, {{v[0-9]+}}.8h
diff --git a/test/CodeGen/aarch64-neon-scalar-copy.c b/test/CodeGen/aarch64-neon-scalar-copy.c
index 33e97c792fb1..a50a0b964441 100644
--- a/test/CodeGen/aarch64-neon-scalar-copy.c
+++ b/test/CodeGen/aarch64-neon-scalar-copy.c
@@ -1,11 +1,11 @@
// REQUIRES: aarch64-registered-target
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
// RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s
#include <arm_neon.h>
-// CHECK: test_vdups_lane_f32
+// CHECK-LABEL: test_vdups_lane_f32
float32_t test_vdups_lane_f32(float32x2_t a) {
return vdups_lane_f32(a, 1);
// CHECK: ret
@@ -13,7 +13,7 @@ float32_t test_vdups_lane_f32(float32x2_t a) {
}
-// CHECK: test_vdupd_lane_f64
+// CHECK-LABEL: test_vdupd_lane_f64
float64_t test_vdupd_lane_f64(float64x1_t a) {
return vdupd_lane_f64(a, 0);
// CHECK: ret
@@ -21,7 +21,7 @@ float64_t test_vdupd_lane_f64(float64x1_t a) {
}
-// CHECK: test_vdups_laneq_f32
+// CHECK-LABEL: test_vdups_laneq_f32
float32_t test_vdups_laneq_f32(float32x4_t a) {
return vdups_laneq_f32(a, 3);
// CHECK: ret
@@ -29,7 +29,7 @@ float32_t test_vdups_laneq_f32(float32x4_t a) {
}
-// CHECK: test_vdupd_laneq_f64
+// CHECK-LABEL: test_vdupd_laneq_f64
float64_t test_vdupd_laneq_f64(float64x2_t a) {
return vdupd_laneq_f64(a, 1);
// CHECK: ret
@@ -37,137 +37,137 @@ float64_t test_vdupd_laneq_f64(float64x2_t a) {
}
-// CHECK: test_vdupb_lane_s8
+// CHECK-LABEL: test_vdupb_lane_s8
int8_t test_vdupb_lane_s8(int8x8_t a) {
return vdupb_lane_s8(a, 7);
-// CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.b[7]
+// CHECK: {{umov|smov}} {{w[0-9]+}}, {{v[0-9]+}}.b[7]
}
-// CHECK: test_vduph_lane_s16
+// CHECK-LABEL: test_vduph_lane_s16
int16_t test_vduph_lane_s16(int16x4_t a) {
return vduph_lane_s16(a, 3);
-// CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.h[3]
+// CHECK: {{umov|smov}} {{w[0-9]+}}, {{v[0-9]+}}.h[3]
}
-// CHECK: test_vdups_lane_s32
+// CHECK-LABEL: test_vdups_lane_s32
int32_t test_vdups_lane_s32(int32x2_t a) {
return vdups_lane_s32(a, 1);
-// CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.s[1]
+// CHECK: {{mov|umov}} {{w[0-9]+}}, {{v[0-9]+}}.s[1]
}
-// CHECK: test_vdupd_lane_s64
+// CHECK-LABEL: test_vdupd_lane_s64
int64_t test_vdupd_lane_s64(int64x1_t a) {
return vdupd_lane_s64(a, 0);
// CHECK: fmov {{x[0-9]+}}, {{d[0-9]+}}
}
-// CHECK: test_vdupb_lane_u8
+// CHECK-LABEL: test_vdupb_lane_u8
uint8_t test_vdupb_lane_u8(uint8x8_t a) {
return vdupb_lane_u8(a, 7);
-// CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.b[7]
+// CHECK: {{mov|umov}} {{w[0-9]+}}, {{v[0-9]+}}.b[7]
}
-// CHECK: test_vduph_lane_u16
+// CHECK-LABEL: test_vduph_lane_u16
uint16_t test_vduph_lane_u16(uint16x4_t a) {
return vduph_lane_u16(a, 3);
-// CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.h[3]
+// CHECK: {{mov|umov}} {{w[0-9]+}}, {{v[0-9]+}}.h[3]
}
-// CHECK: test_vdups_lane_u32
+// CHECK-LABEL: test_vdups_lane_u32
uint32_t test_vdups_lane_u32(uint32x2_t a) {
return vdups_lane_u32(a, 1);
-// CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.s[1]
+// CHECK: {{mov|umov}} {{w[0-9]+}}, {{v[0-9]+}}.s[1]
}
-// CHECK: test_vdupd_lane_u64
+// CHECK-LABEL: test_vdupd_lane_u64
uint64_t test_vdupd_lane_u64(uint64x1_t a) {
return vdupd_lane_u64(a, 0);
// CHECK: fmov {{x[0-9]+}}, {{d[0-9]+}}
}
-// CHECK: test_vdupb_laneq_s8
+// CHECK-LABEL: test_vdupb_laneq_s8
int8_t test_vdupb_laneq_s8(int8x16_t a) {
return vdupb_laneq_s8(a, 15);
-// CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.b[15]
+// CHECK: {{umov|smov}} {{w[0-9]+}}, {{v[0-9]+}}.b[15]
}
-// CHECK: test_vduph_laneq_s16
+// CHECK-LABEL: test_vduph_laneq_s16
int16_t test_vduph_laneq_s16(int16x8_t a) {
return vduph_laneq_s16(a, 7);
-// CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.h[7]
+// CHECK: {{umov|smov}} {{w[0-9]+}}, {{v[0-9]+}}.h[7]
}
-// CHECK: test_vdups_laneq_s32
+// CHECK-LABEL: test_vdups_laneq_s32
int32_t test_vdups_laneq_s32(int32x4_t a) {
return vdups_laneq_s32(a, 3);
-// CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.s[3]
+// CHECK: {{mov|umov}} {{w[0-9]+}}, {{v[0-9]+}}.s[3]
}
-// CHECK: test_vdupd_laneq_s64
+// CHECK-LABEL: test_vdupd_laneq_s64
int64_t test_vdupd_laneq_s64(int64x2_t a) {
return vdupd_laneq_s64(a, 1);
-// CHECK: umov {{x[0-9]+}}, {{v[0-9]+}}.d[1]
+// CHECK: {{mov|umov}} {{x[0-9]+}}, {{v[0-9]+}}.d[1]
}
-// CHECK: test_vdupb_laneq_u8
+// CHECK-LABEL: test_vdupb_laneq_u8
uint8_t test_vdupb_laneq_u8(uint8x16_t a) {
return vdupb_laneq_u8(a, 15);
-// CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.b[15]
+// CHECK: {{mov|umov}} {{w[0-9]+}}, {{v[0-9]+}}.b[15]
}
-// CHECK: test_vduph_laneq_u16
+// CHECK-LABEL: test_vduph_laneq_u16
uint16_t test_vduph_laneq_u16(uint16x8_t a) {
return vduph_laneq_u16(a, 7);
-// CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.h[7]
+// CHECK: {{mov|umov}} {{w[0-9]+}}, {{v[0-9]+}}.h[7]
}
-// CHECK: test_vdups_laneq_u32
+// CHECK-LABEL: test_vdups_laneq_u32
uint32_t test_vdups_laneq_u32(uint32x4_t a) {
return vdups_laneq_u32(a, 3);
-// CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.s[3]
+// CHECK: {{mov|umov}} {{w[0-9]+}}, {{v[0-9]+}}.s[3]
}
-// CHECK: test_vdupd_laneq_u64
+// CHECK-LABEL: test_vdupd_laneq_u64
uint64_t test_vdupd_laneq_u64(uint64x2_t a) {
return vdupd_laneq_u64(a, 1);
-// CHECK: umov {{x[0-9]+}}, {{v[0-9]+}}.d[1]
+// CHECK: {{mov|umov}} {{x[0-9]+}}, {{v[0-9]+}}.d[1]
}
-// CHECK: test_vdupb_lane_p8
+// CHECK-LABEL: test_vdupb_lane_p8
poly8_t test_vdupb_lane_p8(poly8x8_t a) {
return vdupb_lane_p8(a, 7);
-// CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.b[7]
+// CHECK: {{mov|umov}} {{w[0-9]+}}, {{v[0-9]+}}.b[7]
}
-// CHECK: test_vduph_lane_p16
+// CHECK-LABEL: test_vduph_lane_p16
poly16_t test_vduph_lane_p16(poly16x4_t a) {
return vduph_lane_p16(a, 3);
-// CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.h[3]
+// CHECK: {{mov|umov}} {{w[0-9]+}}, {{v[0-9]+}}.h[3]
}
-// CHECK: test_vdupb_laneq_p8
+// CHECK-LABEL: test_vdupb_laneq_p8
poly8_t test_vdupb_laneq_p8(poly8x16_t a) {
return vdupb_laneq_p8(a, 15);
-// CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.b[15]
+// CHECK: {{mov|umov}} {{w[0-9]+}}, {{v[0-9]+}}.b[15]
}
-// CHECK: test_vduph_laneq_p16
+// CHECK-LABEL: test_vduph_laneq_p16
poly16_t test_vduph_laneq_p16(poly16x8_t a) {
return vduph_laneq_p16(a, 7);
-// CHECK: umov {{w[0-9]+}}, {{v[0-9]+}}.h[7]
+// CHECK: {{mov|umov}} {{w[0-9]+}}, {{v[0-9]+}}.h[7]
}
diff --git a/test/CodeGen/aarch64-neon-scalar-x-indexed-elem.c b/test/CodeGen/aarch64-neon-scalar-x-indexed-elem.c
index 4f0771ad276e..4c2f4d72d891 100644
--- a/test/CodeGen/aarch64-neon-scalar-x-indexed-elem.c
+++ b/test/CodeGen/aarch64-neon-scalar-x-indexed-elem.c
@@ -1,5 +1,5 @@
// REQUIRES: aarch64-registered-target
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -target-cpu cyclone \
// RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s
// Test new aarch64 intrinsics and types
@@ -8,248 +8,283 @@
float32_t test_vmuls_lane_f32(float32_t a, float32x2_t b) {
- // CHECK: test_vmuls_lane_f32
+ // CHECK-LABEL: test_vmuls_lane_f32
return vmuls_lane_f32(a, b, 1);
// CHECK: fmul {{s[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[1]
}
float64_t test_vmuld_lane_f64(float64_t a, float64x1_t b) {
- // CHECK: test_vmuld_lane_f64
+ // CHECK-LABEL: test_vmuld_lane_f64
return vmuld_lane_f64(a, b, 0);
- // CHECK: fmul {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[0]
+ // CHECK: fmul {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+.d\[0\]|d[0-9]+}}
}
float32_t test_vmuls_laneq_f32(float32_t a, float32x4_t b) {
- // CHECK: test_vmuls_laneq_f32
+ // CHECK-LABEL: test_vmuls_laneq_f32
return vmuls_laneq_f32(a, b, 3);
// CHECK: fmul {{s[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[3]
}
float64_t test_vmuld_laneq_f64(float64_t a, float64x2_t b) {
- // CHECK: test_vmuld_laneq_f64
+ // CHECK-LABEL: test_vmuld_laneq_f64
return vmuld_laneq_f64(a, b, 1);
// CHECK: fmul {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[1]
}
float64x1_t test_vmul_n_f64(float64x1_t a, float64_t b) {
- // CHECK: test_vmul_n_f64
+ // CHECK-LABEL: test_vmul_n_f64
return vmul_n_f64(a, b);
- // CHECK: fmul {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[0]
+ // CHECK: fmul {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+.d\[0\]|d[0-9]+}}
}
float32_t test_vmulxs_lane_f32(float32_t a, float32x2_t b) {
-// CHECK: test_vmulxs_lane_f32
+// CHECK-LABEL: test_vmulxs_lane_f32
return vmulxs_lane_f32(a, b, 1);
// CHECK: fmulx {{s[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[1]
}
float32_t test_vmulxs_laneq_f32(float32_t a, float32x4_t b) {
-// CHECK: test_vmulxs_laneq_f32
+// CHECK-LABEL: test_vmulxs_laneq_f32
return vmulxs_laneq_f32(a, b, 3);
// CHECK: fmulx {{s[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[3]
}
float64_t test_vmulxd_lane_f64(float64_t a, float64x1_t b) {
-// CHECK: test_vmulxd_lane_f64
+// CHECK-LABEL: test_vmulxd_lane_f64
return vmulxd_lane_f64(a, b, 0);
-// CHECK: fmulx {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[0]
+// CHECK: fmulx {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+.d\[0\]|d[0-9]+}}
}
float64_t test_vmulxd_laneq_f64(float64_t a, float64x2_t b) {
-// CHECK: test_vmulxd_laneq_f64
+// CHECK-LABEL: test_vmulxd_laneq_f64
return vmulxd_laneq_f64(a, b, 1);
// CHECK: fmulx {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[1]
}
-// CHECK: test_vmulx_lane_f64
+// CHECK-LABEL: test_vmulx_lane_f64
float64x1_t test_vmulx_lane_f64(float64x1_t a, float64x1_t b) {
return vmulx_lane_f64(a, b, 0);
- // CHECK: fmulx {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[0]
+ // CHECK: fmulx {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+.d\[0\]|d[0-9]+}}
}
-// CHECK: test_vmulx_laneq_f64_0
+// CHECK-LABEL: test_vmulx_laneq_f64_0
float64x1_t test_vmulx_laneq_f64_0(float64x1_t a, float64x2_t b) {
return vmulx_laneq_f64(a, b, 0);
// CHECK: fmulx {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[0]
}
-// CHECK: test_vmulx_laneq_f64_1
+// CHECK-LABEL: test_vmulx_laneq_f64_1
float64x1_t test_vmulx_laneq_f64_1(float64x1_t a, float64x2_t b) {
return vmulx_laneq_f64(a, b, 1);
// CHECK: fmulx {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[1]
}
-// CHECK: test_vfmas_lane_f32
+// CHECK-LABEL: test_vfmas_lane_f32
float32_t test_vfmas_lane_f32(float32_t a, float32_t b, float32x2_t c) {
return vfmas_lane_f32(a, b, c, 1);
// CHECK: fmla {{s[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[1]
}
-// CHECK: test_vfmad_lane_f64
+// CHECK-LABEL: test_vfmad_lane_f64
float64_t test_vfmad_lane_f64(float64_t a, float64_t b, float64x1_t c) {
return vfmad_lane_f64(a, b, c, 0);
- // CHECK: fmla {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[0]
+ // CHECK: {{fmla|fmadd}} {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+.d\[0\]|d[0-9]+}}
}
-// CHECK: test_vfmad_laneq_f64
+// CHECK-LABEL: test_vfmad_laneq_f64
float64_t test_vfmad_laneq_f64(float64_t a, float64_t b, float64x2_t c) {
return vfmad_laneq_f64(a, b, c, 1);
// CHECK: fmla {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[1]
}
-// CHECK: test_vfmss_lane_f32
+// CHECK-LABEL: test_vfmss_lane_f32
float32_t test_vfmss_lane_f32(float32_t a, float32_t b, float32x2_t c) {
return vfmss_lane_f32(a, b, c, 1);
// CHECK: fmls {{s[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[1]
}
-// CHECK: test_vfma_lane_f64
+// CHECK-LABEL: test_vfma_lane_f64
float64x1_t test_vfma_lane_f64(float64x1_t a, float64x1_t b, float64x1_t v) {
return vfma_lane_f64(a, b, v, 0);
- // CHECK: fmla {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[0]
+ // CHECK: {{fmla|fmadd}} {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+.d\[0\]|d[0-9]+}}
}
-// CHECK: test_vfms_lane_f64
+// CHECK-LABEL: test_vfms_lane_f64
float64x1_t test_vfms_lane_f64(float64x1_t a, float64x1_t b, float64x1_t v) {
return vfms_lane_f64(a, b, v, 0);
- // CHECK: fmls {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[0]
+ // CHECK: {{fmls|fmsub}} {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+.d\[0\]|d[0-9]+}}
}
-// CHECK: test_vfma_laneq_f64
+// CHECK-LABEL: test_vfma_laneq_f64
float64x1_t test_vfma_laneq_f64(float64x1_t a, float64x1_t b, float64x2_t v) {
return vfma_laneq_f64(a, b, v, 0);
// CHECK: fmla {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[0]
}
-// CHECK: test_vfms_laneq_f64
+// CHECK-LABEL: test_vfms_laneq_f64
float64x1_t test_vfms_laneq_f64(float64x1_t a, float64x1_t b, float64x2_t v) {
return vfms_laneq_f64(a, b, v, 0);
// CHECK: fmls {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[0]
}
-// CHECK: test_vqdmullh_lane_s16
+// CHECK-LABEL: test_vqdmullh_lane_s16
int32_t test_vqdmullh_lane_s16(int16_t a, int16x4_t b) {
return vqdmullh_lane_s16(a, b, 3);
- // CHECK: sqdmull {{s[0-9]+}}, {{h[0-9]+}}, {{v[0-9]+}}.h[3]
+ // CHECK: sqdmull {{s[0-9]+|v[0-9]+.4s}}, {{h[0-9]+|v[0-9].4h}}, {{v[0-9]+}}.h[3]
}
-// CHECK: test_vqdmulls_lane_s32
+// CHECK-LABEL: test_vqdmulls_lane_s32
int64_t test_vqdmulls_lane_s32(int32_t a, int32x2_t b) {
return vqdmulls_lane_s32(a, b, 1);
// CHECK: sqdmull {{d[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[1]
}
-// CHECK: test_vqdmullh_laneq_s16
+// CHECK-LABEL: test_vqdmullh_laneq_s16
int32_t test_vqdmullh_laneq_s16(int16_t a, int16x8_t b) {
return vqdmullh_laneq_s16(a, b, 7);
- // CHECK: sqdmull {{s[0-9]+}}, {{h[0-9]+}}, {{v[0-9]+}}.h[7]
+ // CHECK: sqdmull {{s[0-9]+|v[0-9]+.4s}}, {{h[0-9]+|v[0-9]+.4h}}, {{v[0-9]+}}.h[7]
}
-// CHECK: test_vqdmulls_laneq_s32
+// CHECK-LABEL: test_vqdmulls_laneq_s32
int64_t test_vqdmulls_laneq_s32(int32_t a, int32x4_t b) {
return vqdmulls_laneq_s32(a, b, 3);
// CHECK: sqdmull {{d[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[3]
}
-// CHECK: test_vqdmulhh_lane_s16
+// CHECK-LABEL: test_vqdmulhh_lane_s16
int16_t test_vqdmulhh_lane_s16(int16_t a, int16x4_t b) {
return vqdmulhh_lane_s16(a, b, 3);
-// CHECK: sqdmulh {{h[0-9]+}}, {{h[0-9]+}}, {{v[0-9]+}}.h[3]
+// CHECK: sqdmulh {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}, {{v[0-9]+}}.h[3]
}
-// CHECK: test_vqdmulhs_lane_s32
+// CHECK-LABEL: test_vqdmulhs_lane_s32
int32_t test_vqdmulhs_lane_s32(int32_t a, int32x2_t b) {
return vqdmulhs_lane_s32(a, b, 1);
// CHECK: sqdmulh {{s[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[1]
}
-// CHECK: test_vqdmulhh_laneq_s16
+// CHECK-LABEL: test_vqdmulhh_laneq_s16
int16_t test_vqdmulhh_laneq_s16(int16_t a, int16x8_t b) {
return vqdmulhh_laneq_s16(a, b, 7);
-// CHECK: sqdmulh {{h[0-9]+}}, {{h[0-9]+}}, {{v[0-9]+}}.h[7]
+// CHECK: sqdmulh {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}, {{v[0-9]+}}.h[7]
}
-// CHECK: test_vqdmulhs_laneq_s32
+// CHECK-LABEL: test_vqdmulhs_laneq_s32
int32_t test_vqdmulhs_laneq_s32(int32_t a, int32x4_t b) {
return vqdmulhs_laneq_s32(a, b, 3);
// CHECK: sqdmulh {{s[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[3]
}
-// CHECK: test_vqrdmulhh_lane_s16
+// CHECK-LABEL: test_vqrdmulhh_lane_s16
int16_t test_vqrdmulhh_lane_s16(int16_t a, int16x4_t b) {
return vqrdmulhh_lane_s16(a, b, 3);
-// CHECK: sqrdmulh {{h[0-9]+}}, {{h[0-9]+}}, {{v[0-9]+}}.h[3]
+// CHECK: sqrdmulh {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}, {{v[0-9]+}}.h[3]
}
-// CHECK: test_vqrdmulhs_lane_s32
+// CHECK-LABEL: test_vqrdmulhs_lane_s32
int32_t test_vqrdmulhs_lane_s32(int32_t a, int32x2_t b) {
return vqrdmulhs_lane_s32(a, b, 1);
// CHECK: sqrdmulh {{s[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[1]
}
-// CHECK: test_vqrdmulhh_laneq_s16
+// CHECK-LABEL: test_vqrdmulhh_laneq_s16
int16_t test_vqrdmulhh_laneq_s16(int16_t a, int16x8_t b) {
return vqrdmulhh_laneq_s16(a, b, 7);
-// CHECK: sqrdmulh {{h[0-9]+}}, {{h[0-9]+}}, {{v[0-9]+}}.h[7]
+// CHECK: sqrdmulh {{h[0-9]+|v[0-9]+.4h}}, {{h[0-9]+|v[0-9]+.4h}}, {{v[0-9]+}}.h[7]
}
-// CHECK: test_vqrdmulhs_laneq_s32
+// CHECK-LABEL: test_vqrdmulhs_laneq_s32
int32_t test_vqrdmulhs_laneq_s32(int32_t a, int32x4_t b) {
return vqrdmulhs_laneq_s32(a, b, 3);
// CHECK: sqrdmulh {{s[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[3]
}
-// CHECK: test_vqdmlalh_lane_s16
+// CHECK-LABEL: test_vqdmlalh_lane_s16
int32_t test_vqdmlalh_lane_s16(int32_t a, int16_t b, int16x4_t c) {
return vqdmlalh_lane_s16(a, b, c, 3);
-// CHECK: sqdmlal {{s[0-9]+}}, {{h[0-9]+}}, {{v[0-9]+}}.h[3]
+// CHECK: sqdmlal {{s[0-9]+|v[0-9]+.4s}}, {{h[0-9]+|v[0-9]+.4h}}, {{v[0-9]+}}.h[3]
}
-// CHECK: test_vqdmlals_lane_s32
+// CHECK-LABEL: test_vqdmlals_lane_s32
int64_t test_vqdmlals_lane_s32(int64_t a, int32_t b, int32x2_t c) {
return vqdmlals_lane_s32(a, b, c, 1);
// CHECK: sqdmlal {{d[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[1]
}
-// CHECK: test_vqdmlalh_laneq_s16
+// CHECK-LABEL: test_vqdmlalh_laneq_s16
int32_t test_vqdmlalh_laneq_s16(int32_t a, int16_t b, int16x8_t c) {
return vqdmlalh_laneq_s16(a, b, c, 7);
-// CHECK: sqdmlal {{s[0-9]+}}, {{h[0-9]+}}, {{v[0-9]+}}.h[7]
+// CHECK: sqdmlal {{s[0-9]+|v[0-9]+.4s}}, {{h[0-9]+|v[0-9]+.4h}}, {{v[0-9]+}}.h[7]
}
-// CHECK: test_vqdmlals_laneq_s32
+// CHECK-LABEL: test_vqdmlals_laneq_s32
int64_t test_vqdmlals_laneq_s32(int64_t a, int32_t b, int32x4_t c) {
return vqdmlals_laneq_s32(a, b, c, 3);
// CHECK: sqdmlal {{d[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[3]
}
-// CHECK: test_vqdmlslh_lane_s16
+// CHECK-LABEL: test_vqdmlslh_lane_s16
int32_t test_vqdmlslh_lane_s16(int32_t a, int16_t b, int16x4_t c) {
return vqdmlslh_lane_s16(a, b, c, 3);
-// CHECK: sqdmlsl {{s[0-9]+}}, {{h[0-9]+}}, {{v[0-9]+}}.h[3]
+// CHECK: sqdmlsl {{s[0-9]+|v[0-9]+.4s}}, {{h[0-9]+|v[0-9]+.4h}}, {{v[0-9]+}}.h[3]
}
-// CHECK: test_vqdmlsls_lane_s32
+// CHECK-LABEL: test_vqdmlsls_lane_s32
int64_t test_vqdmlsls_lane_s32(int64_t a, int32_t b, int32x2_t c) {
return vqdmlsls_lane_s32(a, b, c, 1);
// CHECK: sqdmlsl {{d[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[1]
}
-// CHECK: test_vqdmlslh_laneq_s16
+// CHECK-LABEL: test_vqdmlslh_laneq_s16
int32_t test_vqdmlslh_laneq_s16(int32_t a, int16_t b, int16x8_t c) {
return vqdmlslh_laneq_s16(a, b, c, 7);
-// CHECK: sqdmlsl {{s[0-9]+}}, {{h[0-9]+}}, {{v[0-9]+}}.h[7]
+// CHECK: sqdmlsl {{s[0-9]+|v[0-9]+.4s}}, {{h[0-9]+|v[0-9]+.4h}}, {{v[0-9]+}}.h[7]
}
-// CHECK: test_vqdmlsls_laneq_s32
+// CHECK-LABEL: test_vqdmlsls_laneq_s32
int64_t test_vqdmlsls_laneq_s32(int64_t a, int32_t b, int32x4_t c) {
return vqdmlsls_laneq_s32(a, b, c, 3);
// CHECK: sqdmlsl {{d[0-9]+}}, {{s[0-9]+}}, {{v[0-9]+}}.s[3]
}
+// CHECK-LABEL: test_vmulx_lane_f64_0:
+float64x1_t test_vmulx_lane_f64_0() {
+ float64x1_t arg1;
+ float64x1_t arg2;
+ float64x1_t result;
+ float64_t sarg1, sarg2, sres;
+ arg1 = vcreate_f64(UINT64_C(0x3fd6304bc43ab5c2));
+ arg2 = vcreate_f64(UINT64_C(0x3fee211e215aeef3));
+ result = vmulx_lane_f64(arg1, arg2, 0);
+// CHECK: adrp x[[ADDRLO:[0-9]+]]
+// CHECK: ldr d0, [x[[ADDRLO]],
+// CHECK: adrp x[[ADDRLO:[0-9]+]]
+// CHECK: ldr d1, [x[[ADDRLO]],
+// CHECK: fmulx d0, d1, d0
+ return result;
+}
+
+// CHECK-LABEL: test_vmulx_laneq_f64_2:
+float64x1_t test_vmulx_laneq_f64_2() {
+ float64x1_t arg1;
+ float64x1_t arg2;
+ float64x2_t arg3;
+ float64x1_t result;
+ float64_t sarg1, sarg2, sres;
+ arg1 = vcreate_f64(UINT64_C(0x3fd6304bc43ab5c2));
+ arg2 = vcreate_f64(UINT64_C(0x3fee211e215aeef3));
+ arg3 = vcombine_f64(arg1, arg2);
+ result = vmulx_laneq_f64(arg1, arg3, 1);
+// CHECK: adrp x[[ADDRLO:[0-9]+]]
+// CHECK: ldr d0, [x[[ADDRLO]],
+// CHECK: adrp x[[ADDRLO:[0-9]+]]
+// CHECK: ldr d1, [x[[ADDRLO]],
+// CHECK: fmulx d0, d1, d0
+ return result;
+}
diff --git a/test/CodeGen/aarch64-neon-shifts.c b/test/CodeGen/aarch64-neon-shifts.c
index 4777f18aae7f..02d8ca155649 100644
--- a/test/CodeGen/aarch64-neon-shifts.c
+++ b/test/CodeGen/aarch64-neon-shifts.c
@@ -1,5 +1,5 @@
// REQUIRES: aarch64-registered-target
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
// RUN: -ffp-contract=fast -S -emit-llvm -O1 -o - %s | FileCheck %s
#include <arm_neon.h>
diff --git a/test/CodeGen/aarch64-neon-tbl.c b/test/CodeGen/aarch64-neon-tbl.c
index db78a7aa7037..902fc4591087 100644
--- a/test/CodeGen/aarch64-neon-tbl.c
+++ b/test/CodeGen/aarch64-neon-tbl.c
@@ -1,5 +1,5 @@
// REQUIRES: aarch64-registered-target
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
// RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s
// Test new aarch64 intrinsics and types
@@ -7,457 +7,457 @@
#include <arm_neon.h>
int8x8_t test_vtbl1_s8(int8x8_t a, int8x8_t b) {
- // CHECK: test_vtbl1_s8
+ // CHECK-LABEL: test_vtbl1_s8
return vtbl1_s8(a, b);
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
int8x8_t test_vqtbl1_s8(int8x16_t a, int8x8_t b) {
- // CHECK: test_vqtbl1_s8
+ // CHECK-LABEL: test_vqtbl1_s8
return vqtbl1_s8(a, b);
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
int8x8_t test_vtbl2_s8(int8x8x2_t a, int8x8_t b) {
- // CHECK: test_vtbl2_s8
+ // CHECK-LABEL: test_vtbl2_s8
return vtbl2_s8(a, b);
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
int8x8_t test_vqtbl2_s8(int8x16x2_t a, int8x8_t b) {
- // CHECK: test_vqtbl2_s8
+ // CHECK-LABEL: test_vqtbl2_s8
return vqtbl2_s8(a, b);
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
int8x8_t test_vtbl3_s8(int8x8x3_t a, int8x8_t b) {
- // CHECK: test_vtbl3_s8
+ // CHECK-LABEL: test_vtbl3_s8
return vtbl3_s8(a, b);
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
int8x8_t test_vqtbl3_s8(int8x16x3_t a, int8x8_t b) {
- // CHECK: test_vqtbl3_s8
+ // CHECK-LABEL: test_vqtbl3_s8
return vqtbl3_s8(a, b);
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
int8x8_t test_vtbl4_s8(int8x8x4_t a, int8x8_t b) {
- // CHECK: test_vtbl4_s8
+ // CHECK-LABEL: test_vtbl4_s8
return vtbl4_s8(a, b);
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
int8x8_t test_vqtbl4_s8(int8x16x4_t a, int8x8_t b) {
- // CHECK: test_vqtbl4_s8
+ // CHECK-LABEL: test_vqtbl4_s8
return vqtbl4_s8(a, b);
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
int8x16_t test_vqtbl1q_s8(int8x16_t a, int8x16_t b) {
- // CHECK: test_vqtbl1q_s8
+ // CHECK-LABEL: test_vqtbl1q_s8
return vqtbl1q_s8(a, b);
- // CHECK: tbl {{v[0-9]+}}.16b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.16b
+ // CHECK: tbl {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
}
int8x16_t test_vqtbl2q_s8(int8x16x2_t a, int8x16_t b) {
- // CHECK: test_vqtbl2q_s8
+ // CHECK-LABEL: test_vqtbl2q_s8
return vqtbl2q_s8(a, b);
- // CHECK: tbl {{v[0-9]+}}.16b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.16b
+ // CHECK: tbl {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
}
int8x16_t test_vqtbl3q_s8(int8x16x3_t a, int8x16_t b) {
- // CHECK: test_vqtbl3q_s8
+ // CHECK-LABEL: test_vqtbl3q_s8
return vqtbl3q_s8(a, b);
- // CHECK: tbl {{v[0-9]+}}.16b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.16b
+ // CHECK: tbl {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
}
int8x16_t test_vqtbl4q_s8(int8x16x4_t a, int8x16_t b) {
- // CHECK: test_vqtbl4q_s8
+ // CHECK-LABEL: test_vqtbl4q_s8
return vqtbl4q_s8(a, b);
- // CHECK: tbl {{v[0-9]+}}.16b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.16b
+ // CHECK: tbl {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
}
int8x8_t test_vtbx1_s8(int8x8_t a, int8x8_t b, int8x8_t c) {
- // CHECK: test_vtbx1_s8
+ // CHECK-LABEL: test_vtbx1_s8
return vtbx1_s8(a, b, c);
- // CHECK: movi {{v[0-9]+}}.8b, #0
+ // CHECK: movi {{v[0-9]+.8b|d[0-9]+}}, #0
// CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
// CHECK: cmhs {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
// CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int8x8_t test_vtbx2_s8(int8x8_t a, int8x8x2_t b, int8x8_t c) {
- // CHECK: test_vtbx2_s8
+ // CHECK-LABEL: test_vtbx2_s8
return vtbx2_s8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
int8x8_t test_vtbx3_s8(int8x8_t a, int8x8x3_t b, int8x8_t c) {
- // CHECK: test_vtbx3_s8
+ // CHECK-LABEL: test_vtbx3_s8
return vtbx3_s8(a, b, c);
- // CHECK: movi {{v[0-9]+}}.8b, #0
+ // CHECK: movi {{v[0-9]+.8b|d[0-9]+}}, #0
// CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
// CHECK: cmhs {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
// CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
int8x8_t test_vtbx4_s8(int8x8_t a, int8x8x4_t b, int8x8_t c) {
- // CHECK: test_vtbx4_s8
+ // CHECK-LABEL: test_vtbx4_s8
return vtbx4_s8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
int8x8_t test_vqtbx1_s8(int8x8_t a, int8x16_t b, int8x8_t c) {
- // CHECK: test_vqtbx1_s8
+ // CHECK-LABEL: test_vqtbx1_s8
return vqtbx1_s8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
int8x8_t test_vqtbx2_s8(int8x8_t a, int8x16x2_t b, int8x8_t c) {
- // CHECK: test_vqtbx2_s8
+ // CHECK-LABEL: test_vqtbx2_s8
return vqtbx2_s8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
int8x8_t test_vqtbx3_s8(int8x8_t a, int8x16x3_t b, int8x8_t c) {
- // CHECK: test_vqtbx3_s8
+ // CHECK-LABEL: test_vqtbx3_s8
return vqtbx3_s8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
int8x8_t test_vqtbx4_s8(int8x8_t a, int8x16x4_t b, int8x8_t c) {
- // CHECK: test_vqtbx4_s8
+ // CHECK-LABEL: test_vqtbx4_s8
return vqtbx4_s8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
int8x16_t test_vqtbx1q_s8(int8x16_t a, int8x16_t b, int8x16_t c) {
- // CHECK: test_vqtbx1q_s8
+ // CHECK-LABEL: test_vqtbx1q_s8
return vqtbx1q_s8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.16b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.16b
+ // CHECK: tbx {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
}
int8x16_t test_vqtbx2q_s8(int8x16_t a, int8x16x2_t b, int8x16_t c) {
- // CHECK: test_vqtbx2q_s8
+ // CHECK-LABEL: test_vqtbx2q_s8
return vqtbx2q_s8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.16b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.16b
+ // CHECK: tbx {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
}
int8x16_t test_vqtbx3q_s8(int8x16_t a, int8x16x3_t b, int8x16_t c) {
- // CHECK: test_vqtbx3q_s8
+ // CHECK-LABEL: test_vqtbx3q_s8
return vqtbx3q_s8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.16b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.16b
+ // CHECK: tbx {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
}
int8x16_t test_vqtbx4q_s8(int8x16_t a, int8x16x4_t b, int8x16_t c) {
- // CHECK: test_vqtbx4q_s8
+ // CHECK-LABEL: test_vqtbx4q_s8
return vqtbx4q_s8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.16b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.16b
+ // CHECK: tbx {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
}
uint8x8_t test_vtbl1_u8(uint8x8_t a, uint8x8_t b) {
- // CHECK: test_vtbl1_u8
+ // CHECK-LABEL: test_vtbl1_u8
return vtbl1_u8(a, b);
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
uint8x8_t test_vqtbl1_u8(uint8x16_t a, uint8x8_t b) {
- // CHECK: test_vqtbl1_u8
+ // CHECK-LABEL: test_vqtbl1_u8
return vqtbl1_u8(a, b);
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
uint8x8_t test_vtbl2_u8(uint8x8x2_t a, uint8x8_t b) {
- // CHECK: test_vtbl2_u8
+ // CHECK-LABEL: test_vtbl2_u8
return vtbl2_u8(a, b);
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
uint8x8_t test_vqtbl2_u8(uint8x16x2_t a, uint8x8_t b) {
- // CHECK: test_vqtbl2_u8
+ // CHECK-LABEL: test_vqtbl2_u8
return vqtbl2_u8(a, b);
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
uint8x8_t test_vtbl3_u8(uint8x8x3_t a, uint8x8_t b) {
- // CHECK: test_vtbl3_u8
+ // CHECK-LABEL: test_vtbl3_u8
return vtbl3_u8(a, b);
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
uint8x8_t test_vqtbl3_u8(uint8x16x3_t a, uint8x8_t b) {
- // CHECK: test_vqtbl3_u8
+ // CHECK-LABEL: test_vqtbl3_u8
return vqtbl3_u8(a, b);
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
uint8x8_t test_vtbl4_u8(uint8x8x4_t a, uint8x8_t b) {
- // CHECK: test_vtbl4_u8
+ // CHECK-LABEL: test_vtbl4_u8
return vtbl4_u8(a, b);
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
uint8x8_t test_vqtbl4_u8(uint8x16x4_t a, uint8x8_t b) {
- // CHECK: test_vqtbl4_u8
+ // CHECK-LABEL: test_vqtbl4_u8
return vqtbl4_u8(a, b);
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
uint8x16_t test_vqtbl1q_u8(uint8x16_t a, uint8x16_t b) {
- // CHECK: test_vqtbl1q_u8
+ // CHECK-LABEL: test_vqtbl1q_u8
return vqtbl1q_u8(a, b);
- // CHECK: tbl {{v[0-9]+}}.16b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.16b
+ // CHECK: tbl {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
}
uint8x16_t test_vqtbl2q_u8(uint8x16x2_t a, uint8x16_t b) {
- // CHECK: test_vqtbl2q_u8
+ // CHECK-LABEL: test_vqtbl2q_u8
return vqtbl2q_u8(a, b);
- // CHECK: tbl {{v[0-9]+}}.16b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.16b
+ // CHECK: tbl {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
}
uint8x16_t test_vqtbl3q_u8(uint8x16x3_t a, uint8x16_t b) {
- // CHECK: test_vqtbl3q_u8
+ // CHECK-LABEL: test_vqtbl3q_u8
return vqtbl3q_u8(a, b);
- // CHECK: tbl {{v[0-9]+}}.16b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.16b
+ // CHECK: tbl {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
}
uint8x16_t test_vqtbl4q_u8(uint8x16x4_t a, uint8x16_t b) {
- // CHECK: test_vqtbl4q_u8
+ // CHECK-LABEL: test_vqtbl4q_u8
return vqtbl4q_u8(a, b);
- // CHECK: tbl {{v[0-9]+}}.16b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.16b
+ // CHECK: tbl {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
}
uint8x8_t test_vtbx1_u8(uint8x8_t a, uint8x8_t b, uint8x8_t c) {
- // CHECK: test_vtbx1_u8
+ // CHECK-LABEL: test_vtbx1_u8
return vtbx1_u8(a, b, c);
- // CHECK: movi {{v[0-9]+}}.8b, #0
+ // CHECK: movi {{v[0-9]+.8b|d[0-9]+}}, #0
// CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
// CHECK: cmhs {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
// CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint8x8_t test_vtbx2_u8(uint8x8_t a, uint8x8x2_t b, uint8x8_t c) {
- // CHECK: test_vtbx2_u8
+ // CHECK-LABEL: test_vtbx2_u8
return vtbx2_u8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
uint8x8_t test_vtbx3_u8(uint8x8_t a, uint8x8x3_t b, uint8x8_t c) {
- // CHECK: test_vtbx3_u8
+ // CHECK-LABEL: test_vtbx3_u8
return vtbx3_u8(a, b, c);
- // CHECK: movi {{v[0-9]+}}.8b, #0
+ // CHECK: movi {{v[0-9]+.8b|d[0-9]+}}, #0
// CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
// CHECK: cmhs {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
// CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
uint8x8_t test_vtbx4_u8(uint8x8_t a, uint8x8x4_t b, uint8x8_t c) {
- // CHECK: test_vtbx4_u8
+ // CHECK-LABEL: test_vtbx4_u8
return vtbx4_u8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
uint8x8_t test_vqtbx1_u8(uint8x8_t a, uint8x16_t b, uint8x8_t c) {
- // CHECK: test_vqtbx1_u8
+ // CHECK-LABEL: test_vqtbx1_u8
return vqtbx1_u8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
uint8x8_t test_vqtbx2_u8(uint8x8_t a, uint8x16x2_t b, uint8x8_t c) {
- // CHECK: test_vqtbx2_u8
+ // CHECK-LABEL: test_vqtbx2_u8
return vqtbx2_u8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
uint8x8_t test_vqtbx3_u8(uint8x8_t a, uint8x16x3_t b, uint8x8_t c) {
- // CHECK: test_vqtbx3_u8
+ // CHECK-LABEL: test_vqtbx3_u8
return vqtbx3_u8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
uint8x8_t test_vqtbx4_u8(uint8x8_t a, uint8x16x4_t b, uint8x8_t c) {
- // CHECK: test_vqtbx4_u8
+ // CHECK-LABEL: test_vqtbx4_u8
return vqtbx4_u8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
uint8x16_t test_vqtbx1q_u8(uint8x16_t a, uint8x16_t b, uint8x16_t c) {
- // CHECK: test_vqtbx1q_u8
+ // CHECK-LABEL: test_vqtbx1q_u8
return vqtbx1q_u8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.16b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.16b
+ // CHECK: tbx {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
}
uint8x16_t test_vqtbx2q_u8(uint8x16_t a, uint8x16x2_t b, uint8x16_t c) {
- // CHECK: test_vqtbx2q_u8
+ // CHECK-LABEL: test_vqtbx2q_u8
return vqtbx2q_u8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.16b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.16b
+ // CHECK: tbx {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
}
uint8x16_t test_vqtbx3q_u8(uint8x16_t a, uint8x16x3_t b, uint8x16_t c) {
- // CHECK: test_vqtbx3q_u8
+ // CHECK-LABEL: test_vqtbx3q_u8
return vqtbx3q_u8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.16b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.16b
+ // CHECK: tbx {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
}
uint8x16_t test_vqtbx4q_u8(uint8x16_t a, uint8x16x4_t b, uint8x16_t c) {
- // CHECK: test_vqtbx4q_u8
+ // CHECK-LABEL: test_vqtbx4q_u8
return vqtbx4q_u8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.16b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.16b
+ // CHECK: tbx {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
}
poly8x8_t test_vtbl1_p8(poly8x8_t a, uint8x8_t b) {
- // CHECK: test_vtbl1_p8
+ // CHECK-LABEL: test_vtbl1_p8
return vtbl1_p8(a, b);
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
poly8x8_t test_vqtbl1_p8(poly8x16_t a, uint8x8_t b) {
- // CHECK: test_vqtbl1_p8
+ // CHECK-LABEL: test_vqtbl1_p8
return vqtbl1_p8(a, b);
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
poly8x8_t test_vtbl2_p8(poly8x8x2_t a, uint8x8_t b) {
- // CHECK: test_vtbl2_p8
+ // CHECK-LABEL: test_vtbl2_p8
return vtbl2_p8(a, b);
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
poly8x8_t test_vqtbl2_p8(poly8x16x2_t a, uint8x8_t b) {
- // CHECK: test_vqtbl2_p8
+ // CHECK-LABEL: test_vqtbl2_p8
return vqtbl2_p8(a, b);
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
poly8x8_t test_vtbl3_p8(poly8x8x3_t a, uint8x8_t b) {
- // CHECK: test_vtbl3_p8
+ // CHECK-LABEL: test_vtbl3_p8
return vtbl3_p8(a, b);
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
poly8x8_t test_vqtbl3_p8(poly8x16x3_t a, uint8x8_t b) {
- // CHECK: test_vqtbl3_p8
+ // CHECK-LABEL: test_vqtbl3_p8
return vqtbl3_p8(a, b);
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
poly8x8_t test_vtbl4_p8(poly8x8x4_t a, uint8x8_t b) {
- // CHECK: test_vtbl4_p8
+ // CHECK-LABEL: test_vtbl4_p8
return vtbl4_p8(a, b);
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
poly8x8_t test_vqtbl4_p8(poly8x16x4_t a, uint8x8_t b) {
- // CHECK: test_vqtbl4_p8
+ // CHECK-LABEL: test_vqtbl4_p8
return vqtbl4_p8(a, b);
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
poly8x16_t test_vqtbl1q_p8(poly8x16_t a, uint8x16_t b) {
- // CHECK: test_vqtbl1q_p8
+ // CHECK-LABEL: test_vqtbl1q_p8
return vqtbl1q_p8(a, b);
- // CHECK: tbl {{v[0-9]+}}.16b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.16b
+ // CHECK: tbl {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
}
poly8x16_t test_vqtbl2q_p8(poly8x16x2_t a, uint8x16_t b) {
- // CHECK: test_vqtbl2q_p8
+ // CHECK-LABEL: test_vqtbl2q_p8
return vqtbl2q_p8(a, b);
- // CHECK: tbl {{v[0-9]+}}.16b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.16b
+ // CHECK: tbl {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
}
poly8x16_t test_vqtbl3q_p8(poly8x16x3_t a, uint8x16_t b) {
- // CHECK: test_vqtbl3q_p8
+ // CHECK-LABEL: test_vqtbl3q_p8
return vqtbl3q_p8(a, b);
- // CHECK: tbl {{v[0-9]+}}.16b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.16b
+ // CHECK: tbl {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
}
poly8x16_t test_vqtbl4q_p8(poly8x16x4_t a, uint8x16_t b) {
- // CHECK: test_vqtbl4q_p8
+ // CHECK-LABEL: test_vqtbl4q_p8
return vqtbl4q_p8(a, b);
- // CHECK: tbl {{v[0-9]+}}.16b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.16b
+ // CHECK: tbl {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
}
poly8x8_t test_vtbx1_p8(poly8x8_t a, poly8x8_t b, uint8x8_t c) {
- // CHECK: test_vtbx1_p8
+ // CHECK-LABEL: test_vtbx1_p8
return vtbx1_p8(a, b, c);
- // CHECK: movi {{v[0-9]+}}.8b, #0
+ // CHECK: movi {{v[0-9]+.8b|d[0-9]+}}, #0
// CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
// CHECK: cmhs {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
// CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
poly8x8_t test_vtbx2_p8(poly8x8_t a, poly8x8x2_t b, uint8x8_t c) {
- // CHECK: test_vtbx2_p8
+ // CHECK-LABEL: test_vtbx2_p8
return vtbx2_p8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
poly8x8_t test_vtbx3_p8(poly8x8_t a, poly8x8x3_t b, uint8x8_t c) {
- // CHECK: test_vtbx3_p8
+ // CHECK-LABEL: test_vtbx3_p8
return vtbx3_p8(a, b, c);
- // CHECK: movi {{v[0-9]+}}.8b, #0
+ // CHECK: movi {{v[0-9]+.8b|d[0-9]+}}, #0
// CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
- // CHECK: tbl {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbl {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
// CHECK: cmhs {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
// CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
poly8x8_t test_vtbx4_p8(poly8x8_t a, poly8x8x4_t b, uint8x8_t c) {
- // CHECK: test_vtbx4_p8
+ // CHECK-LABEL: test_vtbx4_p8
return vtbx4_p8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
poly8x8_t test_vqtbx1_p8(poly8x8_t a, uint8x16_t b, uint8x8_t c) {
- // CHECK: test_vqtbx1_p8
+ // CHECK-LABEL: test_vqtbx1_p8
return vqtbx1_p8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
poly8x8_t test_vqtbx2_p8(poly8x8_t a, poly8x16x2_t b, uint8x8_t c) {
- // CHECK: test_vqtbx2_p8
+ // CHECK-LABEL: test_vqtbx2_p8
return vqtbx2_p8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
poly8x8_t test_vqtbx3_p8(poly8x8_t a, poly8x16x3_t b, uint8x8_t c) {
- // CHECK: test_vqtbx3_p8
+ // CHECK-LABEL: test_vqtbx3_p8
return vqtbx3_p8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
poly8x8_t test_vqtbx4_p8(poly8x8_t a, poly8x16x4_t b, uint8x8_t c) {
- // CHECK: test_vqtbx4_p8
+ // CHECK-LABEL: test_vqtbx4_p8
return vqtbx4_p8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.8b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.8b
+ // CHECK: tbx {{v[0-9]+}}.8b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.8b
}
poly8x16_t test_vqtbx1q_p8(poly8x16_t a, uint8x16_t b, uint8x16_t c) {
- // CHECK: test_vqtbx1q_p8
+ // CHECK-LABEL: test_vqtbx1q_p8
return vqtbx1q_p8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.16b, {{{v[0-9]+}}.16b}, {{v[0-9]+}}.16b
+ // CHECK: tbx {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
}
poly8x16_t test_vqtbx2q_p8(poly8x16_t a, poly8x16x2_t b, uint8x16_t c) {
- // CHECK: test_vqtbx2q_p8
+ // CHECK-LABEL: test_vqtbx2q_p8
return vqtbx2q_p8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.16b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.16b
+ // CHECK: tbx {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
}
poly8x16_t test_vqtbx3q_p8(poly8x16_t a, poly8x16x3_t b, uint8x16_t c) {
- // CHECK: test_vqtbx3q_p8
+ // CHECK-LABEL: test_vqtbx3q_p8
return vqtbx3q_p8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.16b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.16b
+ // CHECK: tbx {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
}
poly8x16_t test_vqtbx4q_p8(poly8x16_t a, poly8x16x4_t b, uint8x16_t c) {
- // CHECK: test_vqtbx4q_p8
+ // CHECK-LABEL: test_vqtbx4q_p8
return vqtbx4q_p8(a, b, c);
- // CHECK: tbx {{v[0-9]+}}.16b, {{{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b}, {{v[0-9]+}}.16b
+ // CHECK: tbx {{v[0-9]+}}.16b, {{{ ?v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b, v[0-9]+.16b ?}}}, {{v[0-9]+}}.16b
}
diff --git a/test/CodeGen/aarch64-neon-vcombine.c b/test/CodeGen/aarch64-neon-vcombine.c
index 3e170c8c4c9f..a750b8e70e8f 100644
--- a/test/CodeGen/aarch64-neon-vcombine.c
+++ b/test/CodeGen/aarch64-neon-vcombine.c
@@ -1,6 +1,5 @@
// REQUIRES: aarch64-registered-target
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \
-// RUN: -S -O3 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -S -O3 -o - %s | FileCheck %s
// Test new aarch64 intrinsics and types
diff --git a/test/CodeGen/aarch64-neon-vget-hilo.c b/test/CodeGen/aarch64-neon-vget-hilo.c
index 012b0bbb964a..0959d097bdc7 100644
--- a/test/CodeGen/aarch64-neon-vget-hilo.c
+++ b/test/CodeGen/aarch64-neon-vget-hilo.c
@@ -1,176 +1,176 @@
// REQUIRES: aarch64-registered-target
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \
-// RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
+// RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s --check-prefix CHECK-COMMON --check-prefix CHECK-ARM64
// Test new aarch64 intrinsics and types
#include <arm_neon.h>
int8x8_t test_vget_high_s8(int8x16_t a) {
- // CHECK-LABEL: test_vget_high_s8:
+ // CHECK-COMMON-LABEL: test_vget_high_s8:
return vget_high_s8(a);
- // CHECK: dup d0, {{v[0-9]+}}.d[1]
+ // CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
}
int16x4_t test_vget_high_s16(int16x8_t a) {
- // CHECK-LABEL: test_vget_high_s16:
+ // CHECK-COMMON-LABEL: test_vget_high_s16:
return vget_high_s16(a);
- // CHECK: dup d0, {{v[0-9]+}}.d[1]
+ // CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
}
int32x2_t test_vget_high_s32(int32x4_t a) {
- // CHECK-LABEL: test_vget_high_s32:
+ // CHECK-COMMON-LABEL: test_vget_high_s32:
return vget_high_s32(a);
- // CHECK: dup d0, {{v[0-9]+}}.d[1]
+ // CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
}
int64x1_t test_vget_high_s64(int64x2_t a) {
- // CHECK-LABEL: test_vget_high_s64:
+ // CHECK-COMMON-LABEL: test_vget_high_s64:
return vget_high_s64(a);
- // CHECK: dup d0, {{v[0-9]+}}.d[1]
+ // CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
}
uint8x8_t test_vget_high_u8(uint8x16_t a) {
- // CHECK-LABEL: test_vget_high_u8:
+ // CHECK-COMMON-LABEL: test_vget_high_u8:
return vget_high_u8(a);
- // CHECK: dup d0, {{v[0-9]+}}.d[1]
+ // CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
}
uint16x4_t test_vget_high_u16(uint16x8_t a) {
- // CHECK-LABEL: test_vget_high_u16:
+ // CHECK-COMMON-LABEL: test_vget_high_u16:
return vget_high_u16(a);
- // CHECK: dup d0, {{v[0-9]+}}.d[1]
+ // CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
}
uint32x2_t test_vget_high_u32(uint32x4_t a) {
- // CHECK-LABEL: test_vget_high_u32:
+ // CHECK-COMMON-LABEL: test_vget_high_u32:
return vget_high_u32(a);
- // CHECK: dup d0, {{v[0-9]+}}.d[1]
+ // CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
}
uint64x1_t test_vget_high_u64(uint64x2_t a) {
- // CHECK-LABEL: test_vget_high_u64:
+ // CHECK-COMMON-LABEL: test_vget_high_u64:
return vget_high_u64(a);
- // CHECK: dup d0, {{v[0-9]+}}.d[1]
+ // CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
}
poly64x1_t test_vget_high_p64(poly64x2_t a) {
- // CHECK-LABEL: test_vget_high_p64:
+ // CHECK-COMMON-LABEL: test_vget_high_p64:
return vget_high_p64(a);
- // CHECK: dup d0, {{v[0-9]+}}.d[1]
+ // CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
}
float16x4_t test_vget_high_f16(float16x8_t a) {
- // CHECK-LABEL: test_vget_high_f16:
+ // CHECK-COMMON-LABEL: test_vget_high_f16:
return vget_high_f16(a);
- // CHECK: dup d0, {{v[0-9]+}}.d[1]
+ // CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
}
float32x2_t test_vget_high_f32(float32x4_t a) {
- // CHECK-LABEL: test_vget_high_f32:
+ // CHECK-COMMON-LABEL: test_vget_high_f32:
return vget_high_f32(a);
- // CHECK: dup d0, {{v[0-9]+}}.d[1]
+ // CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
}
poly8x8_t test_vget_high_p8(poly8x16_t a) {
- // CHECK-LABEL: test_vget_high_p8:
+ // CHECK-COMMON-LABEL: test_vget_high_p8:
return vget_high_p8(a);
- // CHECK: dup d0, {{v[0-9]+}}.d[1]
+ // CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
}
poly16x4_t test_vget_high_p16(poly16x8_t a) {
- // CHECK-LABEL: test_vget_high_p16
+ // CHECK-COMMON-LABEL: test_vget_high_p16
return vget_high_p16(a);
- // CHECK: dup d0, {{v[0-9]+}}.d[1]
+ // CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
}
float64x1_t test_vget_high_f64(float64x2_t a) {
- // CHECK-LABEL: test_vget_high_f64
+ // CHECK-COMMON-LABEL: test_vget_high_f64
return vget_high_f64(a);
- // CHECK: dup d0, {{v[0-9]+}}.d[1]
+ // CHECK-ARM64: ext v0.16b, v0.16b, v0.16b, #8
}
int8x8_t test_vget_low_s8(int8x16_t a) {
- // CHECK-LABEL: test_vget_low_s8:
+ // CHECK-COMMON-LABEL: test_vget_low_s8:
return vget_low_s8(a);
- // CHECK-NEXT: ret
+ // CHECK-COMMON-NEXT: ret
}
int16x4_t test_vget_low_s16(int16x8_t a) {
- // CHECK-LABEL: test_vget_low_s16:
+ // CHECK-COMMON-LABEL: test_vget_low_s16:
return vget_low_s16(a);
- // CHECK-NEXT: ret
+ // CHECK-COMMON-NEXT: ret
}
int32x2_t test_vget_low_s32(int32x4_t a) {
- // CHECK-LABEL: test_vget_low_s32:
+ // CHECK-COMMON-LABEL: test_vget_low_s32:
return vget_low_s32(a);
- // CHECK-NEXT: ret
+ // CHECK-COMMON-NEXT: ret
}
int64x1_t test_vget_low_s64(int64x2_t a) {
- // CHECK-LABEL: test_vget_low_s64:
+ // CHECK-COMMON-LABEL: test_vget_low_s64:
return vget_low_s64(a);
- // CHECK-NEXT: ret
+ // CHECK-COMMON-NEXT: ret
}
uint8x8_t test_vget_low_u8(uint8x16_t a) {
- // CHECK-LABEL: test_vget_low_u8:
+ // CHECK-COMMON-LABEL: test_vget_low_u8:
return vget_low_u8(a);
- // CHECK-NEXT: ret
+ // CHECK-COMMON-NEXT: ret
}
uint16x4_t test_vget_low_u16(uint16x8_t a) {
- // CHECK-LABEL: test_vget_low_u16:
+ // CHECK-COMMON-LABEL: test_vget_low_u16:
return vget_low_u16(a);
- // CHECK-NEXT: ret
+ // CHECK-COMMON-NEXT: ret
}
uint32x2_t test_vget_low_u32(uint32x4_t a) {
- // CHECK-LABEL: test_vget_low_u32:
+ // CHECK-COMMON-LABEL: test_vget_low_u32:
return vget_low_u32(a);
- // CHECK-NEXT: ret
+ // CHECK-COMMON-NEXT: ret
}
uint64x1_t test_vget_low_u64(uint64x2_t a) {
- // CHECK-LABEL: test_vget_low_u64:
+ // CHECK-COMMON-LABEL: test_vget_low_u64:
return vget_low_u64(a);
- // CHECK-NEXT: ret
+ // CHECK-COMMON-NEXT: ret
}
poly64x1_t test_vget_low_p64(poly64x2_t a) {
- // CHECK-LABEL: test_vget_low_p64:
+ // CHECK-COMMON-LABEL: test_vget_low_p64:
return vget_low_p64(a);
- // CHECK-NEXT: ret
+ // CHECK-COMMON-NEXT: ret
}
float16x4_t test_vget_low_f16(float16x8_t a) {
- // CHECK-LABEL: test_vget_low_f16:
+ // CHECK-COMMON-LABEL: test_vget_low_f16:
return vget_low_f16(a);
- // CHECK-NEXT: ret
+ // CHECK-COMMON-NEXT: ret
}
float32x2_t test_vget_low_f32(float32x4_t a) {
- // CHECK-LABEL: test_vget_low_f32:
+ // CHECK-COMMON-LABEL: test_vget_low_f32:
return vget_low_f32(a);
- // CHECK-NEXT: ret
+ // CHECK-COMMON-NEXT: ret
}
poly8x8_t test_vget_low_p8(poly8x16_t a) {
- // CHECK-LABEL: test_vget_low_p8:
+ // CHECK-COMMON-LABEL: test_vget_low_p8:
return vget_low_p8(a);
- // CHECK-NEXT: ret
+ // CHECK-COMMON-NEXT: ret
}
poly16x4_t test_vget_low_p16(poly16x8_t a) {
- // CHECK-LABEL: test_vget_low_p16:
+ // CHECK-COMMON-LABEL: test_vget_low_p16:
return vget_low_p16(a);
- // CHECK-NEXT: ret
+ // CHECK-COMMON-NEXT: ret
}
float64x1_t test_vget_low_f64(float64x2_t a) {
- // CHECK-LABEL: test_vget_low_f64:
+ // CHECK-COMMON-LABEL: test_vget_low_f64:
return vget_low_f64(a);
- // CHECK-NEXT: ret
+ // CHECK-COMMON-NEXT: ret
}
diff --git a/test/CodeGen/aarch64-poly128.c b/test/CodeGen/aarch64-poly128.c
new file mode 100644
index 000000000000..eebecf74a156
--- /dev/null
+++ b/test/CodeGen/aarch64-poly128.c
@@ -0,0 +1,205 @@
+// REQUIRES: aarch64-registered-target
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
+// RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s --check-prefix=CHECK \
+// RUN: --check-prefix=CHECK-ARM64
+
+// Test new aarch64 intrinsics with poly128
+// FIXME: Currently, poly128_t equals to uint128, which will be spilt into
+// two 64-bit GPR(eg X0, X1). Now moving data from X0, X1 to FPR128 will
+// introduce 2 store and 1 load instructions(store X0, X1 to memory and
+// then load back to Q0). If target has NEON, this is better replaced by
+// FMOV or INS.
+
+#include <arm_neon.h>
+
+void test_vstrq_p128(poly128_t * ptr, poly128_t val) {
+ // CHECK-LABEL: test_vstrq_p128
+ vstrq_p128(ptr, val);
+
+ // CHECK-ARM64: stp {{x[0-9]+}}, {{x[0-9]+}}, [x0]
+}
+
+poly128_t test_vldrq_p128(poly128_t * ptr) {
+ // CHECK-LABEL: test_vldrq_p128
+ return vldrq_p128(ptr);
+
+ // CHECK-ARM64: ldp {{x[0-9]+}}, {{x[0-9]+}}, [x0]
+}
+
+void test_ld_st_p128(poly128_t * ptr) {
+ // CHECK-LABEL: test_ld_st_p128
+ vstrq_p128(ptr+1, vldrq_p128(ptr));
+
+ // CHECK-ARM64: ldp [[PLO:x[0-9]+]], [[PHI:x[0-9]+]], [{{x[0-9]+}}]
+ // CHECK-ARM64-NEXT: stp [[PLO]], [[PHI]], [{{x[0-9]+}}, #16]
+}
+
+poly128_t test_vmull_p64(poly64_t a, poly64_t b) {
+ // CHECK-LABEL: test_vmull_p64
+ return vmull_p64(a, b);
+ // CHECK: pmull {{v[0-9]+}}.1q, {{v[0-9]+}}.1d, {{v[0-9]+}}.1d
+}
+
+poly128_t test_vmull_high_p64(poly64x2_t a, poly64x2_t b) {
+ // CHECK-LABEL: test_vmull_high_p64
+ return vmull_high_p64(a, b);
+ // CHECK: pmull2 {{v[0-9]+}}.1q, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
+}
+
+// CHECK-LABEL: test_vreinterpretq_p128_s8
+// CHECK: ret
+poly128_t test_vreinterpretq_p128_s8(int8x16_t a) {
+ return vreinterpretq_p128_s8(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_p128_s16
+// CHECK: ret
+poly128_t test_vreinterpretq_p128_s16(int16x8_t a) {
+ return vreinterpretq_p128_s16(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_p128_s32
+// CHECK: ret
+poly128_t test_vreinterpretq_p128_s32(int32x4_t a) {
+ return vreinterpretq_p128_s32(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_p128_s64
+// CHECK: ret
+poly128_t test_vreinterpretq_p128_s64(int64x2_t a) {
+ return vreinterpretq_p128_s64(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_p128_u8
+// CHECK: ret
+poly128_t test_vreinterpretq_p128_u8(uint8x16_t a) {
+ return vreinterpretq_p128_u8(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_p128_u16
+// CHECK: ret
+poly128_t test_vreinterpretq_p128_u16(uint16x8_t a) {
+ return vreinterpretq_p128_u16(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_p128_u32
+// CHECK: ret
+poly128_t test_vreinterpretq_p128_u32(uint32x4_t a) {
+ return vreinterpretq_p128_u32(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_p128_u64
+// CHECK: ret
+poly128_t test_vreinterpretq_p128_u64(uint64x2_t a) {
+ return vreinterpretq_p128_u64(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_p128_f32
+// CHECK: ret
+poly128_t test_vreinterpretq_p128_f32(float32x4_t a) {
+ return vreinterpretq_p128_f32(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_p128_f64
+// CHECK: ret
+poly128_t test_vreinterpretq_p128_f64(float64x2_t a) {
+ return vreinterpretq_p128_f64(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_p128_p8
+// CHECK: ret
+poly128_t test_vreinterpretq_p128_p8(poly8x16_t a) {
+ return vreinterpretq_p128_p8(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_p128_p16
+// CHECK: ret
+poly128_t test_vreinterpretq_p128_p16(poly16x8_t a) {
+ return vreinterpretq_p128_p16(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_p128_p64
+// CHECK: ret
+poly128_t test_vreinterpretq_p128_p64(poly64x2_t a) {
+ return vreinterpretq_p128_p64(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_s8_p128
+// CHECK: ret
+int8x16_t test_vreinterpretq_s8_p128(poly128_t a) {
+ return vreinterpretq_s8_p128(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_s16_p128
+// CHECK: ret
+int16x8_t test_vreinterpretq_s16_p128(poly128_t a) {
+ return vreinterpretq_s16_p128(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_s32_p128
+// CHECK: ret
+int32x4_t test_vreinterpretq_s32_p128(poly128_t a) {
+ return vreinterpretq_s32_p128(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_s64_p128
+// CHECK: ret
+int64x2_t test_vreinterpretq_s64_p128(poly128_t a) {
+ return vreinterpretq_s64_p128(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_u8_p128
+// CHECK: ret
+uint8x16_t test_vreinterpretq_u8_p128(poly128_t a) {
+ return vreinterpretq_u8_p128(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_u16_p128
+// CHECK: ret
+uint16x8_t test_vreinterpretq_u16_p128(poly128_t a) {
+ return vreinterpretq_u16_p128(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_u32_p128
+// CHECK: ret
+uint32x4_t test_vreinterpretq_u32_p128(poly128_t a) {
+ return vreinterpretq_u32_p128(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_u64_p128
+// CHECK: ret
+uint64x2_t test_vreinterpretq_u64_p128(poly128_t a) {
+ return vreinterpretq_u64_p128(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_f32_p128
+// CHECK: ret
+float32x4_t test_vreinterpretq_f32_p128(poly128_t a) {
+ return vreinterpretq_f32_p128(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_f64_p128
+// CHECK: ret
+float64x2_t test_vreinterpretq_f64_p128(poly128_t a) {
+ return vreinterpretq_f64_p128(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_p8_p128
+// CHECK: ret
+poly8x16_t test_vreinterpretq_p8_p128(poly128_t a) {
+ return vreinterpretq_p8_p128(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_p16_p128
+// CHECK: ret
+poly16x8_t test_vreinterpretq_p16_p128(poly128_t a) {
+ return vreinterpretq_p16_p128(a);
+}
+
+// CHECK-LABEL: test_vreinterpretq_p64_p128
+// CHECK: ret
+poly64x2_t test_vreinterpretq_p64_p128(poly128_t a) {
+ return vreinterpretq_p64_p128(a);
+}
+
+
diff --git a/test/CodeGen/aarch64-poly64.c b/test/CodeGen/aarch64-poly64.c
index 3e195019cd0a..290cc69bd43f 100644
--- a/test/CodeGen/aarch64-poly64.c
+++ b/test/CodeGen/aarch64-poly64.c
@@ -1,282 +1,283 @@
// REQUIRES: aarch64-registered-target
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \
-// RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
+// RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s --check-prefix=CHECK \
+// RUN: --check-prefix=CHECK-ARM64
// Test new aarch64 intrinsics with poly64
#include <arm_neon.h>
uint64x1_t test_vceq_p64(poly64x1_t a, poly64x1_t b) {
- // CHECK: test_vceq_p64
+ // CHECK-LABEL: test_vceq_p64
return vceq_p64(a, b);
// CHECK: cmeq {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint64x2_t test_vceqq_p64(poly64x2_t a, poly64x2_t b) {
- // CHECK: test_vceqq_p64
+ // CHECK-LABEL: test_vceqq_p64
return vceqq_p64(a, b);
// CHECK: cmeq {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
uint64x1_t test_vtst_p64(poly64x1_t a, poly64x1_t b) {
- // CHECK: test_vtst_p64
+ // CHECK-LABEL: test_vtst_p64
return vtst_p64(a, b);
// CHECK: cmtst {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
}
uint64x2_t test_vtstq_p64(poly64x2_t a, poly64x2_t b) {
- // CHECK: test_vtstq_p64
+ // CHECK-LABEL: test_vtstq_p64
return vtstq_p64(a, b);
// CHECK: cmtst {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
poly64x1_t test_vbsl_p64(poly64x1_t a, poly64x1_t b, poly64x1_t c) {
- // CHECK: test_vbsl_p64
+ // CHECK-LABEL: test_vbsl_p64
return vbsl_p64(a, b, c);
// CHECK: bsl {{v[0-9]+}}.8b, {{v[0-9]+}}.8b, {{v[0-9]+}}.8b
}
poly64x2_t test_vbslq_p64(poly64x2_t a, poly64x2_t b, poly64x2_t c) {
- // CHECK: test_vbslq_p64
+ // CHECK-LABEL: test_vbslq_p64
return vbslq_p64(a, b, c);
// CHECK: bsl {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b
}
poly64_t test_vget_lane_p64(poly64x1_t v) {
- // CHECK: test_vget_lane_p64
+ // CHECK-LABEL: test_vget_lane_p64
return vget_lane_p64(v, 0);
// CHECK: fmov {{x[0-9]+}}, {{d[0-9]+}}
}
poly64_t test_vgetq_lane_p64(poly64x2_t v) {
- // CHECK: test_vgetq_lane_p64
+ // CHECK-LABEL: test_vgetq_lane_p64
return vgetq_lane_p64(v, 1);
- // CHECK: umov {{x[0-9]+}}, {{v[0-9]+}}.d[1]
+ // CHECK: {{mov|umov}} {{x[0-9]+}}, {{v[0-9]+}}.d[1]
}
poly64x1_t test_vset_lane_p64(poly64_t a, poly64x1_t v) {
- // CHECK: test_vset_lane_p64
+ // CHECK-LABEL: test_vset_lane_p64
return vset_lane_p64(a, v, 0);
// CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
}
poly64x2_t test_vsetq_lane_p64(poly64_t a, poly64x2_t v) {
- // CHECK: test_vsetq_lane_p64
+ // CHECK-LABEL: test_vsetq_lane_p64
return vsetq_lane_p64(a, v, 1);
// CHECK: ins {{v[0-9]+}}.d[1], {{x[0-9]+}}
}
poly64x1_t test_vcopy_lane_p64(poly64x1_t a, poly64x1_t b) {
- // CHECK: test_vcopy_lane_p64
+ // CHECK-LABEL: test_vcopy_lane_p64
return vcopy_lane_p64(a, 0, b, 0);
- // CHECK: fmov {{d[0-9]+}}, {{d[0-9]+}}
+
+ // CHECK-ARM64: mov v0.16b, v1.16b
}
poly64x2_t test_vcopyq_lane_p64(poly64x2_t a, poly64x1_t b) {
- // CHECK: test_vcopyq_lane_p64
+ // CHECK-LABEL: test_vcopyq_lane_p64
return vcopyq_lane_p64(a, 1, b, 0);
// CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
}
poly64x2_t test_vcopyq_laneq_p64(poly64x2_t a, poly64x2_t b) {
- // CHECK: test_vcopyq_laneq_p64
+ // CHECK-LABEL: test_vcopyq_laneq_p64
return vcopyq_laneq_p64(a, 1, b, 1);
- // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[1]
}
poly64x1_t test_vcreate_p64(uint64_t a) {
- // CHECK: test_vcreate_p64
+ // CHECK-LABEL: test_vcreate_p64
return vcreate_p64(a);
// CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
}
poly64x1_t test_vdup_n_p64(poly64_t a) {
- // CHECK: test_vdup_n_p64
+ // CHECK-LABEL: test_vdup_n_p64
return vdup_n_p64(a);
// CHECK: fmov {{d[0-9]+}}, {{x[0-9]+}}
}
poly64x2_t test_vdupq_n_p64(poly64_t a) {
- // CHECK: test_vdup_n_p64
+ // CHECK-LABEL: test_vdupq_n_p64
return vdupq_n_p64(a);
// CHECK: dup {{v[0-9]+}}.2d, {{x[0-9]+}}
}
poly64x1_t test_vdup_lane_p64(poly64x1_t vec) {
- // CHECK: test_vdup_lane_p64
+ // CHECK-LABEL: test_vdup_lane_p64
return vdup_lane_p64(vec, 0);
// CHECK: ret
}
poly64x2_t test_vdupq_lane_p64(poly64x1_t vec) {
- // CHECK: test_vdupq_lane_p64
+ // CHECK-LABEL: test_vdupq_lane_p64
return vdupq_lane_p64(vec, 0);
// CHECK: dup {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0]
}
poly64x2_t test_vdupq_laneq_p64(poly64x2_t vec) {
- // CHECK: test_vdupq_laneq_p64
+ // CHECK-LABEL: test_vdupq_laneq_p64
return vdupq_laneq_p64(vec, 1);
// CHECK: dup {{v[0-9]+}}.2d, {{v[0-9]+}}.d[1]
}
poly64x2_t test_vcombine_p64(poly64x1_t low, poly64x1_t high) {
- // CHECK: test_vcombine_p64
+ // CHECK-LABEL: test_vcombine_p64
return vcombine_p64(low, high);
// CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
}
poly64x1_t test_vld1_p64(poly64_t const * ptr) {
- // CHECK: test_vld1_p64
+ // CHECK-LABEL: test_vld1_p64
return vld1_p64(ptr);
- // CHECK: ld1 {{{v[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK-ARM64: ldr {{d[0-9]+}}, [{{x[0-9]+|sp}}]
}
poly64x2_t test_vld1q_p64(poly64_t const * ptr) {
- // CHECK: test_vld1q_p64
+ // CHECK-LABEL: test_vld1q_p64
return vld1q_p64(ptr);
- // CHECK: ld1 {{{v[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK-ARM64: ldr {{q[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1_p64(poly64_t * ptr, poly64x1_t val) {
- // CHECK: test_vst1_p64
+ // CHECK-LABEL: test_vst1_p64
return vst1_p64(ptr, val);
- // CHECK: st1 {{{v[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK-ARM64: str {{d[0-9]+}}, [{{x[0-9]+|sp}}]
}
void test_vst1q_p64(poly64_t * ptr, poly64x2_t val) {
- // CHECK: test_vst1q_p64
+ // CHECK-LABEL: test_vst1q_p64
return vst1q_p64(ptr, val);
- // CHECK: st1 {{{v[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK-ARM64: str {{q[0-9]+}}, [{{x[0-9]+|sp}}]
}
poly64x1x2_t test_vld2_p64(poly64_t const * ptr) {
- // CHECK: test_vld2_p64
+ // CHECK-LABEL: test_vld2_p64
return vld2_p64(ptr);
- // CHECK: ld1 {{{v[0-9]+}}.1d, {{v[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.1d, v[0-9]+.1d *}}}, [{{x[0-9]+|sp}}]
}
poly64x2x2_t test_vld2q_p64(poly64_t const * ptr) {
- // CHECK: test_vld2q_p64
+ // CHECK-LABEL: test_vld2q_p64
return vld2q_p64(ptr);
- // CHECK: ld2 {{{v[0-9]+}}.2d, {{v[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld2 {{{ *v[0-9]+.2d, v[0-9]+.2d *}}}, [{{x[0-9]+|sp}}]
}
poly64x1x3_t test_vld3_p64(poly64_t const * ptr) {
- // CHECK: test_vld3_p64
+ // CHECK-LABEL: test_vld3_p64
return vld3_p64(ptr);
- // CHECK: ld1 {{{v[0-9]+}}.1d, {{v[0-9]+}}.1d, {{v[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d *}}}, [{{x[0-9]+|sp}}]
}
poly64x2x3_t test_vld3q_p64(poly64_t const * ptr) {
- // CHECK: test_vld3q_p64
+ // CHECK-LABEL: test_vld3q_p64
return vld3q_p64(ptr);
- // CHECK: ld3 {{{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld3 {{{ *v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d *}}}, [{{x[0-9]+|sp}}]
}
poly64x1x4_t test_vld4_p64(poly64_t const * ptr) {
- // CHECK: test_vld4_p64
+ // CHECK-LABEL: test_vld4_p64
return vld4_p64(ptr);
- // CHECK: ld1 {{{v[0-9]+}}.1d, {{v[0-9]+}}.1d, {{v[0-9]+}}.1d, {{v[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld1 {{{ *v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d *}}}, [{{x[0-9]+|sp}}]
}
poly64x2x4_t test_vld4q_p64(poly64_t const * ptr) {
- // CHECK: test_vld4q_p64
+ // CHECK-LABEL: test_vld4q_p64
return vld4q_p64(ptr);
- // CHECK: ld4 {{{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: ld4 {{{ *v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d *}}}, [{{x[0-9]+|sp}}]
}
void test_vst2_p64(poly64_t * ptr, poly64x1x2_t val) {
- // CHECK: test_vst2_p64
+ // CHECK-LABEL: test_vst2_p64
return vst2_p64(ptr, val);
- // CHECK: st1 {{{v[0-9]+}}.1d, {{v[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.1d, v[0-9]+.1d *}}}, [{{x[0-9]+|sp}}]
}
void test_vst2q_p64(poly64_t * ptr, poly64x2x2_t val) {
- // CHECK: test_vst2q_p64
+ // CHECK-LABEL: test_vst2q_p64
return vst2q_p64(ptr, val);
- // CHECK: st2 {{{v[0-9]+}}.2d, {{v[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: st2 {{{ *v[0-9]+.2d, v[0-9]+.2d *}}}, [{{x[0-9]+|sp}}]
}
void test_vst3_p64(poly64_t * ptr, poly64x1x3_t val) {
- // CHECK: test_vst3_p64
+ // CHECK-LABEL: test_vst3_p64
return vst3_p64(ptr, val);
- // CHECK: st1 {{{v[0-9]+}}.1d, {{v[0-9]+}}.1d, {{v[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d *}}}, [{{x[0-9]+|sp}}]
}
void test_vst3q_p64(poly64_t * ptr, poly64x2x3_t val) {
- // CHECK: test_vst3q_p64
+ // CHECK-LABEL: test_vst3q_p64
return vst3q_p64(ptr, val);
- // CHECK: st3 {{{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: st3 {{{ *v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d *}}}, [{{x[0-9]+|sp}}]
}
void test_vst4_p64(poly64_t * ptr, poly64x1x4_t val) {
- // CHECK: test_vst4_p64
+ // CHECK-LABEL: test_vst4_p64
return vst4_p64(ptr, val);
- // CHECK: st1 {{{v[0-9]+}}.1d, {{v[0-9]+}}.1d, {{v[0-9]+}}.1d, {{v[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: st1 {{{ *v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d, v[0-9]+.1d *}}}, [{{x[0-9]+|sp}}]
}
void test_vst4q_p64(poly64_t * ptr, poly64x2x4_t val) {
- // CHECK: test_vst4q_p64
+ // CHECK-LABEL: test_vst4q_p64
return vst4q_p64(ptr, val);
- // CHECK: st4 {{{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d}, [{{x[0-9]+|sp}}]
+ // CHECK: st4 {{{ *v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d, v[0-9]+.2d *}}}, [{{x[0-9]+|sp}}]
}
poly64x1_t test_vext_p64(poly64x1_t a, poly64x1_t b) {
- // CHECK: test_vext_p64
+ // CHECK-LABEL: test_vext_p64
return vext_u64(a, b, 0);
}
poly64x2_t test_vextq_p64(poly64x2_t a, poly64x2_t b) {
- // CHECK: test_vextq_p64
+ // CHECK-LABEL: test_vextq_p64
return vextq_p64(a, b, 1);
- // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, #0x8
+ // CHECK: ext {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{v[0-9]+}}.16b, {{#0x8|#8}}
}
poly64x2_t test_vzip1q_p64(poly64x2_t a, poly64x2_t b) {
- // CHECK: test_vzip1q_p64
+ // CHECK-LABEL: test_vzip1q_p64
return vzip1q_p64(a, b);
- // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
+ // CHECK-ARM64: zip1 {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
poly64x2_t test_vzip2q_p64(poly64x2_t a, poly64x2_t b) {
- // CHECK: test_vzip2q_p64
+ // CHECK-LABEL: test_vzip2q_p64
return vzip2q_u64(a, b);
- // CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[1]
+ // CHECK-ARM64: zip2 {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
poly64x2_t test_vuzp1q_p64(poly64x2_t a, poly64x2_t b) {
- // CHECK: test_vuzp1q_p64
+ // CHECK-LABEL: test_vuzp1q_p64
return vuzp1q_p64(a, b);
- // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
+ // CHECK-ARM64: zip1 {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
poly64x2_t test_vuzp2q_p64(poly64x2_t a, poly64x2_t b) {
- // CHECK: test_vuzp2q_p64
+ // CHECK-LABEL: test_vuzp2q_p64
return vuzp2q_u64(a, b);
- // CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[1]
+ // CHECK-ARM64: zip2 {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
poly64x2_t test_vtrn1q_p64(poly64x2_t a, poly64x2_t b) {
- // CHECK: test_vtrn1q_p64
+ // CHECK-LABEL: test_vtrn1q_p64
return vtrn1q_p64(a, b);
- // CHECK: ins {{v[0-9]+}}.d[1], {{v[0-9]+}}.d[0]
+ // CHECK-ARM64: zip1 {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
poly64x2_t test_vtrn2q_p64(poly64x2_t a, poly64x2_t b) {
- // CHECK: test_vtrn2q_p64
+ // CHECK-LABEL: test_vtrn2q_p64
return vtrn2q_u64(a, b);
- // CHECK: ins {{v[0-9]+}}.d[0], {{v[0-9]+}}.d[1]
+ // CHECK-ARM64: zip2 {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.2d
}
poly64x1_t test_vsri_n_p64(poly64x1_t a, poly64x1_t b) {
- // CHECK: test_vsri_n_p64
+ // CHECK-LABEL: test_vsri_n_p64
return vsri_n_p64(a, b, 33);
// CHECK: sri {{d[0-9]+}}, {{d[0-9]+}}, #33
}
poly64x2_t test_vsriq_n_p64(poly64x2_t a, poly64x2_t b) {
- // CHECK: test_vsriq_n_p64
+ // CHECK-LABEL: test_vsriq_n_p64
return vsriq_n_p64(a, b, 64);
// CHECK: sri {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, #64
}
diff --git a/test/CodeGen/aarch64-type-sizes.c b/test/CodeGen/aarch64-type-sizes.c
index 3b9c9fc42643..b331b6c3c32c 100644
--- a/test/CodeGen/aarch64-type-sizes.c
+++ b/test/CodeGen/aarch64-type-sizes.c
@@ -1,7 +1,9 @@
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -emit-llvm -w -o - %s | FileCheck %s
-
+// RUN: %clang_cc1 -triple arm64_be-none-linux-gnu -emit-llvm -w -o - %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-BE %s
// char by definition has size 1
+// CHECK-LE: target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
+// CHECK-BE: target datalayout = "E-m:e-i64:64-i128:128-n32:64-S128"
+
int check_short() {
return sizeof(short);
// CHECK: ret i32 2
diff --git a/test/CodeGen/aarch64-varargs.c b/test/CodeGen/aarch64-varargs.c
index 3d9cd866e872..f787afe37e51 100644
--- a/test/CodeGen/aarch64-varargs.c
+++ b/test/CodeGen/aarch64-varargs.c
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 -triple aarch64 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple arm64-linux-gnu -emit-llvm -o - %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-LE %s
+// RUN: %clang_cc1 -triple arm64_be-linux-gnu -emit-llvm -o - %s | FileCheck --check-prefix=CHECK --check-prefix=CHECK-BE %s
+
#include <stdarg.h>
// Obviously there's more than one way to implement va_arg. This test should at
@@ -22,6 +24,9 @@ int simple_int(void) {
// CHECK: [[VAARG_IN_REG]]
// CHECK: [[REG_TOP:%[a-z_0-9]+]] = load i8** getelementptr inbounds (%struct.__va_list* @the_list, i32 0, i32 1)
// CHECK: [[REG_ADDR:%[a-z_0-9]+]] = getelementptr i8* [[REG_TOP]], i32 [[GR_OFFS]]
+// CHECK-BE: [[REG_ADDR_VAL:%[0-9]+]] = ptrtoint i8* [[REG_ADDR]] to i64
+// CHECK-BE: [[REG_ADDR_VAL_ALIGNED:%[a-z_0-9]*]] = add i64 [[REG_ADDR_VAL]], 4
+// CHECK-BE: [[REG_ADDR:%[0-9]+]] = inttoptr i64 [[REG_ADDR_VAL_ALIGNED]] to i8*
// CHECK: [[FROMREG_ADDR:%[a-z_0-9]+]] = bitcast i8* [[REG_ADDR]] to i32*
// CHECK: br label %[[VAARG_END:[a-z._0-9]+]]
@@ -29,6 +34,9 @@ int simple_int(void) {
// CHECK: [[STACK:%[a-z_0-9]+]] = load i8** getelementptr inbounds (%struct.__va_list* @the_list, i32 0, i32 0)
// CHECK: [[NEW_STACK:%[a-z_0-9]+]] = getelementptr i8* [[STACK]], i32 8
// CHECK: store i8* [[NEW_STACK]], i8** getelementptr inbounds (%struct.__va_list* @the_list, i32 0, i32 0)
+// CHECK-BE: [[STACK_VAL:%[0-9]+]] = ptrtoint i8* [[STACK]] to i64
+// CHECK-BE: [[STACK_VAL_ALIGNED:%[a-z_0-9]*]] = add i64 [[STACK_VAL]], 4
+// CHECK-BE: [[STACK:%[0-9]+]] = inttoptr i64 [[STACK_VAL_ALIGNED]] to i8*
// CHECK: [[FROMSTACK_ADDR:%[a-z_0-9]+]] = bitcast i8* [[STACK]] to i32*
// CHECK: br label %[[VAARG_END]]
@@ -154,7 +162,7 @@ double simple_double(void) {
return va_arg(the_list, double);
// CHECK: [[VR_OFFS:%[a-z_0-9]+]] = load i32* getelementptr inbounds (%struct.__va_list* @the_list, i32 0, i32 4)
// CHECK: [[EARLY_ONSTACK:%[a-z_0-9]+]] = icmp sge i32 [[VR_OFFS]], 0
-// CHECK: br i1 [[EARLY_ONSTACK]], label %[[VAARG_ON_STACK]], label %[[VAARG_MAYBE_REG]]
+// CHECK: br i1 [[EARLY_ONSTACK]], label %[[VAARG_ON_STACK:[a-z_.0-9]+]], label %[[VAARG_MAYBE_REG]]
// CHECK: [[VAARG_MAYBE_REG]]
// CHECK: [[NEW_REG_OFFS:%[a-z_0-9]+]] = add i32 [[VR_OFFS]], 16
@@ -165,8 +173,11 @@ double simple_double(void) {
// CHECK: [[VAARG_IN_REG]]
// CHECK: [[REG_TOP:%[a-z_0-9]+]] = load i8** getelementptr inbounds (%struct.__va_list* @the_list, i32 0, i32 2)
// CHECK: [[REG_ADDR:%[a-z_0-9]+]] = getelementptr i8* [[REG_TOP]], i32 [[VR_OFFS]]
+// CHECK-BE: [[REG_ADDR_VAL:%[0-9]+]] = ptrtoint i8* [[REG_ADDR]] to i64
+// CHECK-BE: [[REG_ADDR_VAL_ALIGNED:%[a-z_0-9]*]] = add i64 [[REG_ADDR_VAL]], 8
+// CHECK-BE: [[REG_ADDR:%[0-9]+]] = inttoptr i64 [[REG_ADDR_VAL_ALIGNED]] to i8*
// CHECK: [[FROMREG_ADDR:%[a-z_0-9]+]] = bitcast i8* [[REG_ADDR]] to double*
-// CHECK: br label %[[VAARG_END]]
+// CHECK: br label %[[VAARG_END:[a-z._0-9]+]]
// CHECK: [[VAARG_ON_STACK]]
// CHECK: [[STACK:%[a-z_0-9]+]] = load i8** getelementptr inbounds (%struct.__va_list* @the_list, i32 0, i32 0)
@@ -201,12 +212,14 @@ struct hfa simple_hfa(void) {
// CHECK: [[VAARG_IN_REG]]
// CHECK: [[REG_TOP:%[a-z_0-9]+]] = load i8** getelementptr inbounds (%struct.__va_list* @the_list, i32 0, i32 2)
// CHECK: [[FIRST_REG:%[a-z_0-9]+]] = getelementptr i8* [[REG_TOP]], i32 [[VR_OFFS]]
-// CHECK: [[EL_ADDR:%[a-z_0-9]+]] = getelementptr i8* [[FIRST_REG]], i32 0
+// CHECK-LE: [[EL_ADDR:%[a-z_0-9]+]] = getelementptr i8* [[FIRST_REG]], i32 0
+// CHECK-BE: [[EL_ADDR:%[a-z_0-9]+]] = getelementptr i8* [[FIRST_REG]], i32 12
// CHECK: [[EL_TYPED:%[a-z_0-9]+]] = bitcast i8* [[EL_ADDR]] to float*
// CHECK: [[EL_TMPADDR:%[a-z_0-9]+]] = getelementptr inbounds [2 x float]* %[[TMP_HFA:[a-z_.0-9]+]], i32 0, i32 0
// CHECK: [[EL:%[a-z_0-9]+]] = load float* [[EL_TYPED]]
// CHECK: store float [[EL]], float* [[EL_TMPADDR]]
-// CHECK: [[EL_ADDR:%[a-z_0-9]+]] = getelementptr i8* [[FIRST_REG]], i32 16
+// CHECK-LE: [[EL_ADDR:%[a-z_0-9]+]] = getelementptr i8* [[FIRST_REG]], i32 16
+// CHECK-BE: [[EL_ADDR:%[a-z_0-9]+]] = getelementptr i8* [[FIRST_REG]], i32 28
// CHECK: [[EL_TYPED:%[a-z_0-9]+]] = bitcast i8* [[EL_ADDR]] to float*
// CHECK: [[EL_TMPADDR:%[a-z_0-9]+]] = getelementptr inbounds [2 x float]* %[[TMP_HFA]], i32 0, i32 1
// CHECK: [[EL:%[a-z_0-9]+]] = load float* [[EL_TYPED]]
diff --git a/test/CodeGen/alias.c b/test/CodeGen/alias.c
index efa94b340bbd..98449d36edf6 100644
--- a/test/CodeGen/alias.c
+++ b/test/CodeGen/alias.c
@@ -14,6 +14,9 @@ void f0(void) { }
extern void f1(void);
extern void f1(void) __attribute((alias("f0")));
// CHECKBASIC-DAG: @f1 = alias void ()* @f0
+// CHECKBASIC-DAG: @test8_foo = alias weak bitcast (void ()* @test8_bar to void (...)*)
+// CHECKBASIC-DAG: @test8_zed = alias bitcast (void ()* @test8_bar to void (...)*)
+// CHECKBASIC-DAG: @test9_zed = alias void ()* @test9_bar
// CHECKBASIC: define void @f0() [[NUW:#[0-9]+]] {
// Make sure that aliases cause referenced values to be emitted.
@@ -48,3 +51,11 @@ int outer_weak(int a) { return inner_weak_a(a); }
// CHECKBASIC: attributes [[NUW]] = { nounwind{{.*}} }
// CHECKCC: attributes [[NUW]] = { nounwind{{.*}} }
+
+void test8_bar() {}
+void test8_foo() __attribute__((weak, alias("test8_bar")));
+void test8_zed() __attribute__((alias("test8_foo")));
+
+void test9_bar(void) { }
+void test9_zed(void) __attribute__((section("test")));
+void test9_zed(void) __attribute__((alias("test9_bar")));
diff --git a/test/CodeGen/altivec.c b/test/CodeGen/altivec.c
index 6c924a7fe36f..29823031b56a 100644
--- a/test/CodeGen/altivec.c
+++ b/test/CodeGen/altivec.c
@@ -1,4 +1,3 @@
-// REQUIRES: ppc32-registered-target
// RUN: %clang_cc1 -faltivec -triple powerpc-unknown-unknown -emit-llvm %s -o - | FileCheck %s
// Check initialization
diff --git a/test/CodeGen/arm-aapcs-vfp.c b/test/CodeGen/arm-aapcs-vfp.c
index 0e102f35ed05..eea6ab2f154d 100644
--- a/test/CodeGen/arm-aapcs-vfp.c
+++ b/test/CodeGen/arm-aapcs-vfp.c
@@ -12,37 +12,53 @@
// RUN: -ffreestanding \
// RUN: -emit-llvm -w -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple arm64-apple-darwin9 -target-feature +neon \
+// RUN: -ffreestanding \
+// RUN: -emit-llvm -w -o - %s | FileCheck -check-prefix=CHECK64 %s
+
+#ifdef __arm64__
#include <arm_neon.h>
+#else
+#include <arm_neon.h>
+#endif
struct homogeneous_struct {
float f[2];
float f3;
float f4;
};
-// CHECK: define arm_aapcs_vfpcc %struct.homogeneous_struct @test_struct(float %{{.*}}, float %{{.*}}, float %{{.*}}, float %{{.*}})
+// CHECK: define arm_aapcs_vfpcc %struct.homogeneous_struct @test_struct(%struct.homogeneous_struct %{{.*}})
+// CHECK64: define %struct.homogeneous_struct @test_struct(float %{{.*}}, float %{{.*}}, float %{{.*}}, float %{{.*}})
extern struct homogeneous_struct struct_callee(struct homogeneous_struct);
struct homogeneous_struct test_struct(struct homogeneous_struct arg) {
return struct_callee(arg);
}
+// CHECK: define arm_aapcs_vfpcc void @test_struct_variadic(%struct.homogeneous_struct* {{.*}}, ...)
+struct homogeneous_struct test_struct_variadic(struct homogeneous_struct arg, ...) {
+ return struct_callee(arg);
+}
+
struct nested_array {
double d[4];
};
-// CHECK: define arm_aapcs_vfpcc void @test_array(double %{{.*}}, double %{{.*}}, double %{{.*}}, double %{{.*}})
+// CHECK: define arm_aapcs_vfpcc void @test_array(%struct.nested_array %{{.*}})
+// CHECK64: define void @test_array(double %{{.*}}, double %{{.*}}, double %{{.*}}, double %{{.*}})
extern void array_callee(struct nested_array);
void test_array(struct nested_array arg) {
array_callee(arg);
}
extern void complex_callee(__complex__ double);
-// CHECK: define arm_aapcs_vfpcc void @test_complex(double %{{.*}}, double %{{.*}})
+// CHECK: define arm_aapcs_vfpcc void @test_complex({ double, double } %{{.*}})
+// CHECK64: define void @test_complex(double %{{.*}}, double %{{.*}})
void test_complex(__complex__ double cd) {
complex_callee(cd);
}
// Long double is the same as double on AAPCS, it should be homogeneous.
extern void complex_long_callee(__complex__ long double);
-// CHECK: define arm_aapcs_vfpcc void @test_complex_long(double %{{.*}}, double %{{.*}})
+// CHECK: define arm_aapcs_vfpcc void @test_complex_long({ double, double } %{{.*}})
void test_complex_long(__complex__ long double cd) {
complex_callee(cd);
}
@@ -56,7 +72,10 @@ struct big_struct {
float f3;
float f4;
};
-// CHECK: define arm_aapcs_vfpcc void @test_big([5 x i32] %{{.*}})
+// CHECK: define arm_aapcs_vfpcc void @test_big({ [5 x i32] } %{{.*}})
+// CHECK64: define void @test_big(%struct.big_struct* %{{.*}})
+// CHECK64: call void @llvm.memcpy
+// CHECK64: call void @big_callee(%struct.big_struct*
extern void big_callee(struct big_struct);
void test_big(struct big_struct arg) {
big_callee(arg);
@@ -69,14 +88,16 @@ struct heterogeneous_struct {
float f1;
int i2;
};
-// CHECK: define arm_aapcs_vfpcc void @test_hetero([2 x i32] %{{.*}})
+// CHECK: define arm_aapcs_vfpcc void @test_hetero({ [2 x i32] } %{{.*}})
+// CHECK64: define void @test_hetero(i64 %{{.*}})
extern void hetero_callee(struct heterogeneous_struct);
void test_hetero(struct heterogeneous_struct arg) {
hetero_callee(arg);
}
// Neon multi-vector types are homogeneous aggregates.
-// CHECK: define arm_aapcs_vfpcc <16 x i8> @f0(<16 x i8> %{{.*}}, <16 x i8> %{{.*}}, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})
+// CHECK: define arm_aapcs_vfpcc <16 x i8> @f0(%struct.int8x16x4_t %{{.*}})
+// CHECK64: define <16 x i8> @f0(<16 x i8> %{{.*}}, <16 x i8> %{{.*}}, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})
int8x16_t f0(int8x16x4_t v4) {
return vaddq_s8(v4.val[0], v4.val[3]);
}
@@ -89,12 +110,43 @@ struct neon_struct {
int32x2_t v3;
int16x4_t v4;
};
-// CHECK: define arm_aapcs_vfpcc void @test_neon(<8 x i8> %{{.*}}, <8 x i8> %{{.*}}, <2 x i32> %{{.*}}, <4 x i16> %{{.*}})
+// CHECK: define arm_aapcs_vfpcc void @test_neon(%struct.neon_struct %{{.*}})
+// CHECK64: define void @test_neon(<8 x i8> %{{.*}}, <8 x i8> %{{.*}}, <2 x i32> %{{.*}}, <4 x i16> %{{.*}})
extern void neon_callee(struct neon_struct);
void test_neon(struct neon_struct arg) {
neon_callee(arg);
}
-// CHECK-LABEL: define arm_aapcs_vfpcc void @f33(%struct.s33* byval %s)
+// CHECK-LABEL: define arm_aapcs_vfpcc void @f33(%struct.s33* byval align 1 %s)
struct s33 { char buf[32*32]; };
void f33(struct s33 s) { }
+
+typedef struct { long long x; int y; } struct_long_long_int;
+// CHECK: define arm_aapcs_vfpcc void @test_vfp_stack_gpr_split_1(double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, i32 %j, i64 %k, i32 %l)
+void test_vfp_stack_gpr_split_1(double a, double b, double c, double d, double e, double f, double g, double h, double i, int j, long long k, int l) {}
+
+// CHECK: define arm_aapcs_vfpcc void @test_vfp_stack_gpr_split_2(double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, i32 %j, [3 x i32], { [2 x i64] } %k.coerce)
+void test_vfp_stack_gpr_split_2(double a, double b, double c, double d, double e, double f, double g, double h, double i, int j, struct_long_long_int k) {}
+
+// CHECK: define arm_aapcs_vfpcc void @test_vfp_stack_gpr_split_3(%struct.struct_long_long_int* noalias sret %agg.result, double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, [3 x i32], { [2 x i64] } %k.coerce)
+struct_long_long_int test_vfp_stack_gpr_split_3(double a, double b, double c, double d, double e, double f, double g, double h, double i, struct_long_long_int k) {}
+
+typedef struct { int a; int b:4; int c; } struct_int_bitfield_int;
+// CHECK: define arm_aapcs_vfpcc void @test_test_vfp_stack_gpr_split_bitfield(double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, i32 %j, i32 %k, [2 x i32], { [3 x i32] } %l.coerce)
+void test_test_vfp_stack_gpr_split_bitfield(double a, double b, double c, double d, double e, double f, double g, double h, double i, int j, int k, struct_int_bitfield_int l) {}
+
+// Note: this struct requires internal padding
+typedef struct { int x; long long y; } struct_int_long_long;
+// CHECK: define arm_aapcs_vfpcc void @test_vfp_stack_gpr_split_4(double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, i32 %j, [3 x i32], { [2 x i64] } %k.coerce)
+void test_vfp_stack_gpr_split_4(double a, double b, double c, double d, double e, double f, double g, double h, double i, int j, struct_int_long_long k) {}
+
+// This very large struct (passed byval) uses up the GPRs, so no padding is needed
+typedef struct { int x[17]; } struct_seventeen_ints;
+typedef struct { int x[4]; } struct_four_ints;
+// CHECK: define arm_aapcs_vfpcc void @test_vfp_stack_gpr_split_5(%struct.struct_seventeen_ints* byval align 4 %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, double %j, { [4 x i32] } %k.coerce)
+void test_vfp_stack_gpr_split_5(struct_seventeen_ints a, double b, double c, double d, double e, double f, double g, double h, double i, double j, struct_four_ints k) {}
+
+// Here, parameter k would need padding to prevent it from being split, but it
+// is passed ByVal (due to being > 64 bytes), so the backend handles this instead.
+void test_vfp_stack_gpr_split_6(double a, double b, double c, double d, double e, double f, double g, double h, double i, int j, struct_seventeen_ints k) {}
+// CHECK: define arm_aapcs_vfpcc void @test_vfp_stack_gpr_split_6(double %a, double %b, double %c, double %d, double %e, double %f, double %g, double %h, double %i, i32 %j, %struct.struct_seventeen_ints* byval align 4 %k)
diff --git a/test/CodeGen/arm-arguments.c b/test/CodeGen/arm-arguments.c
index b6bac9ac44af..2c5df91c58ac 100644
--- a/test/CodeGen/arm-arguments.c
+++ b/test/CodeGen/arm-arguments.c
@@ -176,8 +176,8 @@ void f32(struct s32 s) { }
// PR13350
struct s33 { char buf[32*32]; };
void f33(struct s33 s) { }
-// APCS-GNU-LABEL: define void @f33(%struct.s33* byval %s)
-// AAPCS-LABEL: define arm_aapcscc void @f33(%struct.s33* byval %s)
+// APCS-GNU-LABEL: define void @f33(%struct.s33* byval align 1 %s)
+// AAPCS-LABEL: define arm_aapcscc void @f33(%struct.s33* byval align 1 %s)
// PR14048
struct s34 { char c; };
@@ -209,14 +209,14 @@ float32x4_t f35(int i, s35_with_align s1, s35_with_align s2) {
*(float32x4_t *)&s2);
return v;
}
-// APCS-GNU-LABEL: define <4 x float> @f35(i32 %i, %struct.s35* byval, %struct.s35* byval)
+// APCS-GNU-LABEL: define <4 x float> @f35(i32 %i, %struct.s35* byval align 16, %struct.s35* byval align 16)
// APCS-GNU: %[[a:.*]] = alloca %struct.s35, align 16
// APCS-GNU: %[[b:.*]] = bitcast %struct.s35* %[[a]] to i8*
// APCS-GNU: %[[c:.*]] = bitcast %struct.s35* %0 to i8*
// APCS-GNU: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[b]], i8* %[[c]]
// APCS-GNU: %[[d:.*]] = bitcast %struct.s35* %[[a]] to <4 x float>*
// APCS-GNU: load <4 x float>* %[[d]], align 16
-// AAPCS-LABEL: define arm_aapcscc <4 x float> @f35(i32 %i, %struct.s35* byval, %struct.s35* byval)
+// AAPCS-LABEL: define arm_aapcscc <4 x float> @f35(i32 %i, %struct.s35* byval align 16, %struct.s35* byval align 16)
// AAPCS: %[[a:.*]] = alloca %struct.s35, align 16
// AAPCS: %[[b:.*]] = bitcast %struct.s35* %[[a]] to i8*
// AAPCS: %[[c:.*]] = bitcast %struct.s35* %0 to i8*
diff --git a/test/CodeGen/arm-asm-deprecated.c b/test/CodeGen/arm-asm-deprecated.c
new file mode 100644
index 000000000000..1d7399a58c55
--- /dev/null
+++ b/test/CodeGen/arm-asm-deprecated.c
@@ -0,0 +1,13 @@
+// REQUIRES: arm-registered-target
+// RUN: %clang_cc1 -triple armv8 -target-feature +neon %s -S -o /dev/null -verify -DWARN
+// RUN: %clang_cc1 -triple armv8 -target-feature +neon %s -S -o /dev/null -Werror -verify
+
+void set_endian() {
+ asm("setend be");
+// expected-note@1 {{instantiated into assembly here}}
+#ifdef WARN
+// expected-warning@-3 {{deprecated}}
+#else
+// expected-error@-5 {{deprecated}}
+#endif
+}
diff --git a/test/CodeGen/arm-atomics-m.c b/test/CodeGen/arm-atomics-m.c
new file mode 100644
index 000000000000..51e2d1d9ebf2
--- /dev/null
+++ b/test/CodeGen/arm-atomics-m.c
@@ -0,0 +1,35 @@
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=thumbv7m-none--eabi -target-cpu cortex-m3 | FileCheck %s
+
+int i;
+long long l;
+
+typedef enum memory_order {
+ memory_order_relaxed, memory_order_consume, memory_order_acquire,
+ memory_order_release, memory_order_acq_rel, memory_order_seq_cst
+} memory_order;
+
+void test_presence(void)
+{
+ // CHECK-LABEL: @test_presence
+ // CHECK: atomicrmw add i32* {{.*}} seq_cst
+ __atomic_fetch_add(&i, 1, memory_order_seq_cst);
+ // CHECK: atomicrmw sub i32* {{.*}} seq_cst
+ __atomic_fetch_sub(&i, 1, memory_order_seq_cst);
+ // CHECK: load atomic i32* {{.*}} seq_cst
+ int r;
+ __atomic_load(&i, &r, memory_order_seq_cst);
+ // CHECK: store atomic i32 {{.*}} seq_cst
+ r = 0;
+ __atomic_store(&i, &r, memory_order_seq_cst);
+
+ // CHECK: __atomic_fetch_add_8
+ __atomic_fetch_add(&l, 1, memory_order_seq_cst);
+ // CHECK: __atomic_fetch_sub_8
+ __atomic_fetch_sub(&l, 1, memory_order_seq_cst);
+ // CHECK: __atomic_load_8
+ long long rl;
+ __atomic_load(&l, &rl, memory_order_seq_cst);
+ // CHECK: __atomic_store_8
+ rl = 0;
+ __atomic_store(&l, &rl, memory_order_seq_cst);
+}
diff --git a/test/CodeGen/arm-atomics-m0.c b/test/CodeGen/arm-atomics-m0.c
new file mode 100644
index 000000000000..335a1d2711f8
--- /dev/null
+++ b/test/CodeGen/arm-atomics-m0.c
@@ -0,0 +1,35 @@
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=thumbv6m-none--eabi -target-cpu cortex-m0 | FileCheck %s
+
+int i;
+long long l;
+
+typedef enum memory_order {
+ memory_order_relaxed, memory_order_consume, memory_order_acquire,
+ memory_order_release, memory_order_acq_rel, memory_order_seq_cst
+} memory_order;
+
+void test_presence(void)
+{
+ // CHECK-LABEL: @test_presence
+ // CHECK: __atomic_fetch_add_4
+ __atomic_fetch_add(&i, 1, memory_order_seq_cst);
+ // CHECK: __atomic_fetch_sub_4
+ __atomic_fetch_sub(&i, 1, memory_order_seq_cst);
+ // CHECK: __atomic_load_4
+ int r;
+ __atomic_load(&i, &r, memory_order_seq_cst);
+ // CHECK: __atomic_store_4
+ r = 0;
+ __atomic_store(&i, &r, memory_order_seq_cst);
+
+ // CHECK: __atomic_fetch_add_8
+ __atomic_fetch_add(&l, 1, memory_order_seq_cst);
+ // CHECK: __atomic_fetch_sub_8
+ __atomic_fetch_sub(&l, 1, memory_order_seq_cst);
+ // CHECK: __atomic_load_8
+ long long rl;
+ __atomic_load(&l, &rl, memory_order_seq_cst);
+ // CHECK: __atomic_store_8
+ rl = 0;
+ __atomic_store(&l, &rl, memory_order_seq_cst);
+}
diff --git a/test/CodeGen/arm-atomics.c b/test/CodeGen/arm-atomics.c
new file mode 100644
index 000000000000..b54e277120db
--- /dev/null
+++ b/test/CodeGen/arm-atomics.c
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=thumbv7-none--eabi | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv6-none--eabi | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv7-unknown-openbsd | FileCheck %s
+
+int i;
+long long l;
+
+typedef enum memory_order {
+ memory_order_relaxed, memory_order_consume, memory_order_acquire,
+ memory_order_release, memory_order_acq_rel, memory_order_seq_cst
+} memory_order;
+
+void test_presence(void)
+{
+ // CHECK-LABEL: @test_presence
+ // CHECK: atomicrmw add i32* {{.*}} seq_cst
+ __atomic_fetch_add(&i, 1, memory_order_seq_cst);
+ // CHECK: atomicrmw sub i32* {{.*}} seq_cst
+ __atomic_fetch_sub(&i, 1, memory_order_seq_cst);
+ // CHECK: load atomic i32* {{.*}} seq_cst
+ int r;
+ __atomic_load(&i, &r, memory_order_seq_cst);
+ // CHECK: store atomic i32 {{.*}} seq_cst
+ r = 0;
+ __atomic_store(&i, &r, memory_order_seq_cst);
+
+ // CHECK: atomicrmw add i64* {{.*}} seq_cst
+ __atomic_fetch_add(&l, 1, memory_order_seq_cst);
+ // CHECK: atomicrmw sub i64* {{.*}} seq_cst
+ __atomic_fetch_sub(&l, 1, memory_order_seq_cst);
+ // CHECK: load atomic i64* {{.*}} seq_cst
+ long long rl;
+ __atomic_load(&l, &rl, memory_order_seq_cst);
+ // CHECK: store atomic i64 {{.*}} seq_cst
+ rl = 0;
+ __atomic_store(&l, &rl, memory_order_seq_cst);
+}
diff --git a/test/CodeGen/arm-be-result-return.c b/test/CodeGen/arm-be-result-return.c
new file mode 100644
index 000000000000..aadc4e18845d
--- /dev/null
+++ b/test/CodeGen/arm-be-result-return.c
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 -triple armebv7-arm-none-eabi -emit-llvm -w -o - %s | FileCheck %s
+
+// this tests for AAPCS section 5.4:
+// A Composite Type not larger than 4 bytes is returned in r0.
+// The format is as if the result had been stored in memory at a
+// word-aligned address and then loaded into r0 with an LDR instruction
+
+extern union Us { short s; } us;
+union Us callee_us() { return us; }
+// CHECK-LABEL: callee_us()
+// CHECK: zext i16
+// CHECK: shl
+// CHECK: ret i32
+
+void caller_us() {
+ us = callee_us();
+// CHECK-LABEL: caller_us()
+// CHECK: call i32
+// CHECK: lshr i32
+// CHECK: trunc i32
+}
+
+extern struct Ss { short s; } ss;
+struct Ss callee_ss() { return ss; }
+// CHECK-LABEL: callee_ss()
+// CHECK: zext i16
+// CHECK: shl
+// CHECK: ret i32
+
+void caller_ss() {
+ ss = callee_ss();
+// CHECK-LABEL: caller_ss()
+// CHECK: call i32
+// CHECK: lshr i32
+// CHECK: trunc i32
+}
+
diff --git a/test/CodeGen/arm-byval-align.c b/test/CodeGen/arm-byval-align.c
new file mode 100644
index 000000000000..aa22503fe4bb
--- /dev/null
+++ b/test/CodeGen/arm-byval-align.c
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -triple=armv7-none-eabi < %s -S -emit-llvm | FileCheck %s
+
+struct foo {
+ long long a;
+ char b;
+ int c:16;
+ int d[16];
+};
+
+// CHECK: %struct.foo* byval align 8 %z
+long long bar(int a, int b, int c, int d, int e,
+ struct foo z) {
+ return z.a;
+}
diff --git a/test/CodeGen/arm-cortex-cpus.c b/test/CodeGen/arm-cortex-cpus.c
new file mode 100644
index 000000000000..d8d9830e5e01
--- /dev/null
+++ b/test/CodeGen/arm-cortex-cpus.c
@@ -0,0 +1,11 @@
+// REQUIRES: arm-registered-target
+
+// Check that Cortex-M cores don't enable hwdiv-arm (and don't emit Tag_DIV_use)
+//
+// This target feature doesn't affect C predefines, nor the generated IR;
+// only the build attributes in generated assembly and object files are affected.
+
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-m3 -S %s -o - | FileCheck %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-m4 -S %s -o - | FileCheck %s
+// CHECK-NOT: .eabi_attribute 44
+
diff --git a/test/CodeGen/arm-homogenous.c b/test/CodeGen/arm-homogenous.c
index 5d21088eba8e..d1b489793f98 100644
--- a/test/CodeGen/arm-homogenous.c
+++ b/test/CodeGen/arm-homogenous.c
@@ -1,6 +1,11 @@
// REQUIRES: arm-registered-target
// RUN: %clang_cc1 -triple armv7---eabi -target-abi aapcs -mfloat-abi hard -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple arm64-apple-darwin9 -target-abi darwinpcs \
+// RUN: -ffreestanding -emit-llvm -w -o - %s | FileCheck -check-prefix=CHECK64 %s
+
+// RUN: %clang_cc1 -triple arm64-linux-gnu -ffreestanding -emit-llvm -w -o - %s \
+// RUN: | FileCheck --check-prefix=CHECK64-AAPCS %s
typedef long long int64_t;
typedef unsigned int uint32_t;
@@ -17,7 +22,7 @@ extern union_with_first_floats returns_union_with_first_floats(void);
void test_union_with_first_floats(void) {
takes_union_with_first_floats(g_u_f);
}
-// CHECK: declare arm_aapcs_vfpcc void @takes_union_with_first_floats([4 x i32])
+// CHECK: declare arm_aapcs_vfpcc void @takes_union_with_first_floats({ [4 x i32] })
void test_return_union_with_first_floats(void) {
g_u_f = returns_union_with_first_floats();
@@ -37,7 +42,7 @@ extern union_with_non_first_floats returns_union_with_non_first_floats(void);
void test_union_with_non_first_floats(void) {
takes_union_with_non_first_floats(g_u_nf_f);
}
-// CHECK: declare arm_aapcs_vfpcc void @takes_union_with_non_first_floats([4 x i32])
+// CHECK: declare arm_aapcs_vfpcc void @takes_union_with_non_first_floats({ [4 x i32] })
void test_return_union_with_non_first_floats(void) {
g_u_nf_f = returns_union_with_non_first_floats();
@@ -57,7 +62,7 @@ extern struct_with_union_with_first_floats returns_struct_with_union_with_first_
void test_struct_with_union_with_first_floats(void) {
takes_struct_with_union_with_first_floats(g_s_f);
}
-// CHECK: declare arm_aapcs_vfpcc void @takes_struct_with_union_with_first_floats([5 x i32])
+// CHECK: declare arm_aapcs_vfpcc void @takes_struct_with_union_with_first_floats({ [5 x i32] })
void test_return_struct_with_union_with_first_floats(void) {
g_s_f = returns_struct_with_union_with_first_floats();
@@ -77,7 +82,7 @@ extern struct_with_union_with_non_first_floats returns_struct_with_union_with_no
void test_struct_with_union_with_non_first_floats(void) {
takes_struct_with_union_with_non_first_floats(g_s_nf_f);
}
-// CHECK: declare arm_aapcs_vfpcc void @takes_struct_with_union_with_non_first_floats([5 x i32])
+// CHECK: declare arm_aapcs_vfpcc void @takes_struct_with_union_with_non_first_floats({ [5 x i32] })
void test_return_struct_with_union_with_non_first_floats(void) {
g_s_nf_f = returns_struct_with_union_with_non_first_floats();
@@ -103,9 +108,9 @@ extern struct_with_fundamental_elems returns_struct_with_fundamental_elems(void)
void test_struct_with_fundamental_elems(void) {
takes_struct_with_fundamental_elems(g_s);
-// CHECK: call arm_aapcs_vfpcc void @takes_struct_with_fundamental_elems(float {{.*}}, float {{.*}}, float{{.*}}, float {{.*}})
+// CHECK: call arm_aapcs_vfpcc void @takes_struct_with_fundamental_elems(%struct.struct_with_fundamental_elems {{.*}})
}
-// CHECK: declare arm_aapcs_vfpcc void @takes_struct_with_fundamental_elems(float, float, float, float)
+// CHECK: declare arm_aapcs_vfpcc void @takes_struct_with_fundamental_elems(%struct.struct_with_fundamental_elems)
void test_return_struct_with_fundamental_elems(void) {
g_s = returns_struct_with_fundamental_elems();
@@ -124,9 +129,9 @@ extern struct_with_array returns_struct_with_array(void);
void test_struct_with_array(void) {
takes_struct_with_array(g_s_a);
-// CHECK: call arm_aapcs_vfpcc void @takes_struct_with_array(float {{.*}}, float {{.*}}, float {{.*}}, float {{.*}})
+// CHECK: call arm_aapcs_vfpcc void @takes_struct_with_array(%struct.struct_with_array {{.*}})
}
-// CHECK: declare arm_aapcs_vfpcc void @takes_struct_with_array(float, float, float, float)
+// CHECK: declare arm_aapcs_vfpcc void @takes_struct_with_array(%struct.struct_with_array)
void test_return_struct_with_array(void) {
g_s_a = returns_struct_with_array();
@@ -146,9 +151,9 @@ extern union_with_struct_with_fundamental_elems returns_union_with_struct_with_f
void test_union_with_struct_with_fundamental_elems(void) {
takes_union_with_struct_with_fundamental_elems(g_u_s_fe);
-// CHECK: call arm_aapcs_vfpcc void @takes_union_with_struct_with_fundamental_elems(float {{.*}}, float {{.*}}, float {{.*}}, float {{.*}})
+// CHECK: call arm_aapcs_vfpcc void @takes_union_with_struct_with_fundamental_elems(%union.union_with_struct_with_fundamental_elems {{.*}})
}
-// CHECK: declare arm_aapcs_vfpcc void @takes_union_with_struct_with_fundamental_elems(float, float, float, float)
+// CHECK: declare arm_aapcs_vfpcc void @takes_union_with_struct_with_fundamental_elems(%union.union_with_struct_with_fundamental_elems)
void test_return_union_with_struct_with_fundamental_elems(void) {
g_u_s_fe = returns_union_with_struct_with_fundamental_elems();
@@ -169,14 +174,26 @@ struct_of_four_doubles g_s4d;
void test_struct_of_four_doubles(void) {
// CHECK: test_struct_of_four_doubles
-// CHECK: call arm_aapcs_vfpcc void @takes_struct_of_four_doubles(double {{.*}}, double {{.*}}, double {{.*}}, double {{.*}}, double {{.*}}, [6 x float] undef, double {{.*}}, double {{.*}}, double {{.*}}, double {{.*}}, double {{.*}})
+// CHECK: call arm_aapcs_vfpcc void @takes_struct_of_four_doubles(double {{.*}}, %struct.struct_of_four_doubles {{.*}}, %struct.struct_of_four_doubles {{.*}}, double {{.*}})
+// CHECK64: test_struct_of_four_doubles
+// CHECK64: call void @takes_struct_of_four_doubles(double {{.*}}, double {{.*}}, double {{.*}}, double {{.*}}, double {{.*}}, [3 x float] undef, double {{.*}}, double {{.*}}, double {{.*}}, double {{.*}}, double {{.*}})
+// CHECK64-AAPCS: test_struct_of_four_doubles
+// CHECK64-AAPCS: call void @takes_struct_of_four_doubles(double {{.*}}, double {{.*}}, double {{.*}}, double {{.*}}, double {{.*}}, [3 x float] undef, double {{.*}}, double {{.*}}, double {{.*}}, double {{.*}})
takes_struct_of_four_doubles(3.0, g_s4d, g_s4d, 4.0);
}
+extern void takes_struct_of_four_doubles_variadic(double a, struct_of_four_doubles b, struct_of_four_doubles c, double d, ...);
+
+void test_struct_of_four_doubles_variadic(void) {
+// CHECK: test_struct_of_four_doubles_variadic
+// CHECK: call arm_aapcs_vfpcc void (double, { [4 x i64] }, { [4 x i64] }, double, ...)* @takes_struct_of_four_doubles_variadic(double {{.*}}, { [4 x i64] } {{.*}}, { [4 x i64] } {{.*}}, double {{.*}})
+ takes_struct_of_four_doubles_variadic(3.0, g_s4d, g_s4d, 4.0);
+}
+
extern void takes_struct_with_backfill(float f1, double a, float f2, struct_of_four_doubles b, struct_of_four_doubles c, double d);
void test_struct_with_backfill(void) {
// CHECK: test_struct_with_backfill
-// CHECK: call arm_aapcs_vfpcc void @takes_struct_with_backfill(float {{.*}}, double {{.*}}, float {{.*}}, double {{.*}}, double {{.*}}, double {{.*}}, double {{.*}}, [4 x float] undef, double {{.*}}, double {{.*}}, double {{.*}}, double {{.*}}, double {{.*}})
+// CHECK: call arm_aapcs_vfpcc void @takes_struct_with_backfill(float {{.*}}, double {{.*}}, float {{.*}}, %struct.struct_of_four_doubles {{.*}}, %struct.struct_of_four_doubles {{.*}}, double {{.*}})
takes_struct_with_backfill(3.0, 3.1, 3.2, g_s4d, g_s4d, 4.0);
}
@@ -193,10 +210,25 @@ struct_of_vecs g_vec;
void test_struct_of_vecs(void) {
// CHECK: test_struct_of_vecs
-// CHECK: call arm_aapcs_vfpcc void @takes_struct_of_vecs(double {{.*}}, <8 x i8> {{.*}}, <4 x i16> {{.*}}, <8 x i8> {{.*}}, <4 x i16> {{.*}}, [6 x float] undef, <8 x i8> {{.*}}, <4 x i16> {{.*}}, <8 x i8> {{.*}}, <4 x i16> {{.*}}, double {{.*}})
+// CHECK: call arm_aapcs_vfpcc void @takes_struct_of_vecs(double {{.*}}, %struct.struct_of_vecs {{.*}}, %struct.struct_of_vecs {{.*}}, double {{.*}})
+// CHECK64: test_struct_of_vecs
+// CHECK64: call void @takes_struct_of_vecs(double {{.*}}, <8 x i8> {{.*}}, <4 x i16> {{.*}}, <8 x i8> {{.*}}, <4 x i16> {{.*}}, [3 x float] undef, <8 x i8> {{.*}}, <4 x i16> {{.*}}, <8 x i8> {{.*}}, <4 x i16> {{.*}}, double {{.*}})
+// CHECK64-AAPCS: test_struct_of_vecs
+// CHECK64-AAPCS: call void @takes_struct_of_vecs(double {{.*}}, <8 x i8> {{.*}}, <4 x i16> {{.*}}, <8 x i8> {{.*}}, <4 x i16> {{.*}}, [3 x float] undef, <8 x i8> {{.*}}, <4 x i16> {{.*}}, <8 x i8> {{.*}}, <4 x i16> {{.*}}, double {{.*}})
takes_struct_of_vecs(3.0, g_vec, g_vec, 4.0);
}
+typedef struct {
+ double a;
+ long double b;
+} struct_of_double_and_long_double;
+struct_of_double_and_long_double g_dld;
+
+struct_of_double_and_long_double test_struct_of_double_and_long_double(void) {
+ return g_dld;
+}
+// CHECK: define arm_aapcs_vfpcc %struct.struct_of_double_and_long_double @test_struct_of_double_and_long_double()
+
// FIXME: Tests necessary:
// - Vectors
// - C++ stuff
diff --git a/test/CodeGen/arm-metadata.c b/test/CodeGen/arm-metadata.c
new file mode 100644
index 000000000000..1cd9880f1b53
--- /dev/null
+++ b/test/CodeGen/arm-metadata.c
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -triple armv7a-linux-gnueabi -emit-llvm -o - %s | FileCheck -check-prefix=DEFAULT %s
+// RUN: %clang_cc1 -triple armv7a-linux-gnueabi -emit-llvm -o - %s -fshort-enums | FileCheck -check-prefix=SHORT-ENUM %s
+// RUN: %clang_cc1 -triple armv7a-linux-gnueabi -emit-llvm -o - %s -fshort-wchar | FileCheck -check-prefix=SHORT-WCHAR %s
+
+// DEFAULT: !{{[0-9]+}} = metadata !{i32 1, metadata !"wchar_size", i32 4}
+// DEFAULT: !{{[0-9]+}} = metadata !{i32 1, metadata !"min_enum_size", i32 4}
+
+// SHORT-WCHAR: !{{[0-9]+}} = metadata !{i32 1, metadata !"wchar_size", i32 2}
+// SHORT-WCHAR: !{{[0-9]+}} = metadata !{i32 1, metadata !"min_enum_size", i32 4}
+
+// SHORT_ENUM: !{{[0-9]+}} = metadata !{i32 1, metadata !"wchar_size", i32 4}
+// SHORT-ENUM: !{{[0-9]+}} = metadata !{i32 1, metadata !"min_enum_size", i32 1}
diff --git a/test/CodeGen/arm-microsoft-intrinsics.c b/test/CodeGen/arm-microsoft-intrinsics.c
new file mode 100644
index 000000000000..5f19e5e7c87c
--- /dev/null
+++ b/test/CodeGen/arm-microsoft-intrinsics.c
@@ -0,0 +1,63 @@
+// RUN: %clang_cc1 -triple thumbv7-windows -fms-compatibility -emit-llvm -o - %s \
+// RUN: | FileCheck %s -check-prefix CHECK-MSVC
+
+// RUN: not %clang_cc1 -triple armv7-eabi -Werror -S -o /dev/null %s 2>&1 \
+// RUN: | FileCheck %s -check-prefix CHECK-EABI
+
+void check__dmb(void) {
+ __dmb(0);
+}
+
+// CHECK-MSVC: @llvm.arm.dmb(i32 0)
+// CHECK-EABI: error: implicit declaration of function '__dmb'
+
+void check__dsb(void) {
+ __dsb(0);
+}
+
+// CHECK-MSVC: @llvm.arm.dsb(i32 0)
+// CHECK-EABI: error: implicit declaration of function '__dsb'
+
+void check__isb(void) {
+ __isb(0);
+}
+
+// CHECK-MSVC: @llvm.arm.isb(i32 0)
+// CHECK-EABI: error: implicit declaration of function '__isb'
+
+__INT64_TYPE__ check__ldrexd(void) {
+ __INT64_TYPE__ i64;
+ return __ldrexd(&i64);
+}
+
+// CHECK-MSVC: @llvm.arm.ldrexd(i8* {{.*}})
+// CHECK-EABI: error: implicit declaration of function '__ldrexd'
+
+unsigned int check_MoveFromCoprocessor(void) {
+ return _MoveFromCoprocessor(0, 0, 0, 0, 0);
+}
+
+// CHECK-MSVC: @llvm.arm.mrc(i32 0, i32 0, i32 0, i32 0, i32 0)
+// CHECK-EABI: error: implicit declaration of function '_MoveFromCoprocessor'
+
+unsigned int check_MoveFromCoprocessor2(void) {
+ return _MoveFromCoprocessor2(0, 0, 0, 0, 0);
+}
+
+// CHECK-MSVC: @llvm.arm.mrc2(i32 0, i32 0, i32 0, i32 0, i32 0)
+// CHECK-EABI: error: implicit declaration of function '_MoveFromCoprocessor2'
+
+void check_MoveToCoprocessor(void) {
+ _MoveToCoprocessor(0, 0, 0, 0, 0, 0);
+}
+
+// CHECK-MSVC: @llvm.arm.mcr(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
+// CHECK-EABI: error: implicit declaration of function '_MoveToCoprocessor'
+
+void check_MoveToCoprocessor2(void) {
+ _MoveToCoprocessor2(0, 0, 0, 0, 0, 0);
+}
+
+// CHECK-MSVC: @llvm.arm.mcr2(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
+// CHECK-EABI: error: implicit declaration of function '_MoveToCoprocessor2'
+
diff --git a/test/CodeGen/arm-neon-vcvtX.c b/test/CodeGen/arm-neon-vcvtX.c
new file mode 100644
index 000000000000..ff8ce7ea3e2a
--- /dev/null
+++ b/test/CodeGen/arm-neon-vcvtX.c
@@ -0,0 +1,99 @@
+// RUN: %clang_cc1 -triple thumbv8-linux-gnueabihf -target-cpu cortex-a57 -ffreestanding -O1 -emit-llvm %s -o - | FileCheck %s
+
+#include <arm_neon.h>
+
+int32x2_t test_vcvta_s32_f32(float32x2_t a) {
+ // CHECK-LABEL: test_vcvta_s32_f32
+ // CHECK-LABEL: call <2 x i32> @llvm.arm.neon.vcvtas.v2i32.v2f32(<2 x float> %a)
+ return vcvta_s32_f32(a);
+}
+
+uint32x2_t test_vcvta_u32_f32(float32x2_t a) {
+ // CHECK-LABEL: test_vcvta_u32_f32
+ // CHECK-LABEL: call <2 x i32> @llvm.arm.neon.vcvtau.v2i32.v2f32(<2 x float> %a)
+ return vcvta_u32_f32(a);
+}
+
+int32x4_t test_vcvtaq_s32_f32(float32x4_t a) {
+ // CHECK-LABEL: test_vcvtaq_s32_f32
+ // CHECK-LABEL: call <4 x i32> @llvm.arm.neon.vcvtas.v4i32.v4f32(<4 x float> %a)
+ return vcvtaq_s32_f32(a);
+}
+
+uint32x4_t test_vcvtaq_u32_f32(float32x4_t a) {
+ // CHECK-LABEL: test_vcvtaq_u32_f32
+ // CHECK-LABEL: call <4 x i32> @llvm.arm.neon.vcvtau.v4i32.v4f32(<4 x float> %a)
+ return vcvtaq_u32_f32(a);
+}
+
+int32x2_t test_vcvtn_s32_f32(float32x2_t a) {
+ // CHECK-LABEL: test_vcvtn_s32_f32
+ // CHECK-LABEL: call <2 x i32> @llvm.arm.neon.vcvtns.v2i32.v2f32(<2 x float> %a)
+ return vcvtn_s32_f32(a);
+}
+
+uint32x2_t test_vcvtn_u32_f32(float32x2_t a) {
+ // CHECK-LABEL: test_vcvtn_u32_f32
+ // CHECK-LABEL: call <2 x i32> @llvm.arm.neon.vcvtnu.v2i32.v2f32(<2 x float> %a)
+ return vcvtn_u32_f32(a);
+}
+
+int32x4_t test_vcvtnq_s32_f32(float32x4_t a) {
+ // CHECK-LABEL: test_vcvtnq_s32_f32
+ // CHECK-LABEL: call <4 x i32> @llvm.arm.neon.vcvtns.v4i32.v4f32(<4 x float> %a)
+ return vcvtnq_s32_f32(a);
+}
+
+uint32x4_t test_vcvtnq_u32_f32(float32x4_t a) {
+ // CHECK-LABEL: test_vcvtnq_u32_f32
+ // CHECK-LABEL: call <4 x i32> @llvm.arm.neon.vcvtnu.v4i32.v4f32(<4 x float> %a)
+ return vcvtnq_u32_f32(a);
+}
+
+int32x2_t test_vcvtp_s32_f32(float32x2_t a) {
+ // CHECK-LABEL: test_vcvtp_s32_f32
+ // CHECK-LABEL: call <2 x i32> @llvm.arm.neon.vcvtps.v2i32.v2f32(<2 x float> %a)
+ return vcvtp_s32_f32(a);
+}
+
+uint32x2_t test_vcvtp_u32_f32(float32x2_t a) {
+ // CHECK-LABEL: test_vcvtp_u32_f32
+ // CHECK-LABEL: call <2 x i32> @llvm.arm.neon.vcvtpu.v2i32.v2f32(<2 x float> %a)
+ return vcvtp_u32_f32(a);
+}
+
+int32x4_t test_vcvtpq_s32_f32(float32x4_t a) {
+ // CHECK-LABEL: test_vcvtpq_s32_f32
+ // CHECK-LABEL: call <4 x i32> @llvm.arm.neon.vcvtps.v4i32.v4f32(<4 x float> %a)
+ return vcvtpq_s32_f32(a);
+}
+
+uint32x4_t test_vcvtpq_u32_f32(float32x4_t a) {
+ // CHECK-LABEL: test_vcvtpq_u32_f32
+ // CHECK-LABEL: call <4 x i32> @llvm.arm.neon.vcvtpu.v4i32.v4f32(<4 x float> %a)
+ return vcvtpq_u32_f32(a);
+}
+
+int32x2_t test_vcvtm_s32_f32(float32x2_t a) {
+ // CHECK-LABEL: test_vcvtm_s32_f32
+ // CHECK-LABEL: call <2 x i32> @llvm.arm.neon.vcvtms.v2i32.v2f32(<2 x float> %a)
+ return vcvtm_s32_f32(a);
+}
+
+uint32x2_t test_vcvtm_u32_f32(float32x2_t a) {
+ // CHECK-LABEL: test_vcvtm_u32_f32
+ // CHECK-LABEL: call <2 x i32> @llvm.arm.neon.vcvtmu.v2i32.v2f32(<2 x float> %a)
+ return vcvtm_u32_f32(a);
+}
+
+int32x4_t test_vcvtmq_s32_f32(float32x4_t a) {
+ // CHECK-LABEL: test_vcvtmq_s32_f32
+ // CHECK-LABEL: call <4 x i32> @llvm.arm.neon.vcvtms.v4i32.v4f32(<4 x float> %a)
+ return vcvtmq_s32_f32(a);
+}
+
+uint32x4_t test_vcvtmq_u32_f32(float32x4_t a) {
+ // CHECK-LABEL: test_vcvtmq_u32_f32
+ // CHECK-LABEL: call <4 x i32> @llvm.arm.neon.vcvtmu.v4i32.v4f32(<4 x float> %a)
+ return vcvtmq_u32_f32(a);
+}
diff --git a/test/CodeGen/arm64-aapcs-arguments.c b/test/CodeGen/arm64-aapcs-arguments.c
new file mode 100644
index 000000000000..b430630b0711
--- /dev/null
+++ b/test/CodeGen/arm64-aapcs-arguments.c
@@ -0,0 +1,42 @@
+// RUN: %clang_cc1 -triple arm64-linux-gnu -target-feature +neon -target-abi aapcs -ffreestanding -emit-llvm -w -o - %s | FileCheck %s
+
+// AAPCS clause C.8 says: If the argument has an alignment of 16 then the NGRN
+// is rounded up to the next even number.
+
+// CHECK: void @test1(i32 %x0, i128 %x2_x3, i128 %x4_x5, i128 %x6_x7, i128 %sp.coerce)
+typedef union { __int128 a; } Small;
+void test1(int x0, __int128 x2_x3, __int128 x4_x5, __int128 x6_x7, Small sp) {
+}
+
+
+// CHECK: void @test2(i32 %x0, i128 %x2_x3.coerce, i32 %x4, i128 %x6_x7.coerce, i32 %sp, i128 %sp16.coerce)
+void test2(int x0, Small x2_x3, int x4, Small x6_x7, int sp, Small sp16) {
+}
+
+// We coerce HFAs into a contiguous [N x double] type if they're going on the
+// stack in order to avoid holes. Make sure we get all of them, and not just the
+// first:
+
+// CHECK: void @test3(float %s0_s3.0, float %s0_s3.1, float %s0_s3.2, float %s0_s3.3, float %s4, [3 x float], [2 x double] %sp.coerce, [2 x double] %sp16.coerce)
+typedef struct { float arr[4]; } HFA;
+void test3(HFA s0_s3, float s4, HFA sp, HFA sp16) {
+}
+
+
+// However, we shouldn't perform the [N x double] coercion on types which have
+// sufficient alignment to avoid holes on their own. We could coerce to [N x
+// fp128] or something, but leaving them as-is retains more information for
+// users to debug.
+
+// CHECK: void @test4(<16 x i8> %v0_v2.0, <16 x i8> %v0_v2.1, <16 x i8> %v0_v2.2, <16 x i8> %v3_v5.0, <16 x i8> %v3_v5.1, <16 x i8> %v3_v5.2, [2 x float], <16 x i8> %sp.0, <16 x i8> %sp.1, <16 x i8> %sp.2, double %sp48, <16 x i8> %sp64.0, <16 x i8> %sp64.1, <16 x i8> %sp64.2)
+typedef __attribute__((neon_vector_type(16))) signed char int8x16_t;
+typedef struct { int8x16_t arr[3]; } BigHFA;
+void test4(BigHFA v0_v2, BigHFA v3_v5, BigHFA sp, double sp48, BigHFA sp64) {
+}
+
+// It's the job of the argument *consumer* to perform the required sign & zero
+// extensions under AAPCS. There shouldn't be
+
+// CHECK: define i8 @test5(i8 %a, i16 %b)
+unsigned char test5(unsigned char a, signed short b) {
+}
diff --git a/test/CodeGen/arm64-abi-vector.c b/test/CodeGen/arm64-abi-vector.c
new file mode 100644
index 000000000000..502fb080d701
--- /dev/null
+++ b/test/CodeGen/arm64-abi-vector.c
@@ -0,0 +1,430 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-abi darwinpcs -emit-llvm -o - %s | FileCheck %s
+
+#include <stdarg.h>
+
+typedef __attribute__(( ext_vector_type(3) )) char __char3;
+typedef __attribute__(( ext_vector_type(4) )) char __char4;
+typedef __attribute__(( ext_vector_type(5) )) char __char5;
+typedef __attribute__(( ext_vector_type(9) )) char __char9;
+typedef __attribute__(( ext_vector_type(19) )) char __char19;
+typedef __attribute__(( ext_vector_type(3) )) short __short3;
+typedef __attribute__(( ext_vector_type(5) )) short __short5;
+typedef __attribute__(( ext_vector_type(3) )) int __int3;
+typedef __attribute__(( ext_vector_type(5) )) int __int5;
+typedef __attribute__(( ext_vector_type(3) )) double __double3;
+
+double varargs_vec_3c(int fixed, ...) {
+// CHECK: varargs_vec_3c
+// CHECK: alloca <3 x i8>, align 4
+// CHECK: [[AP_NEXT:%.*]] = getelementptr i8* [[AP_CUR:%.*]], i32 8
+// CHECK: bitcast i8* [[AP_CUR]] to <3 x i8>*
+ va_list ap;
+ double sum = fixed;
+ va_start(ap, fixed);
+ __char3 c3 = va_arg(ap, __char3);
+ sum = sum + c3.x + c3.y;
+ va_end(ap);
+ return sum;
+}
+
+double test_3c(__char3 *in) {
+// CHECK: test_3c
+// CHECK: call double (i32, ...)* @varargs_vec_3c(i32 3, i32 {{%.*}})
+ return varargs_vec_3c(3, *in);
+}
+
+double varargs_vec_4c(int fixed, ...) {
+// CHECK: varargs_vec_4c
+// CHECK: alloca <4 x i8>, align 4
+// CHECK: [[AP_NEXT:%.*]] = getelementptr i8* [[AP_CUR:%.*]], i32 8
+// CHECK: bitcast i8* [[AP_CUR]] to <4 x i8>*
+ va_list ap;
+ double sum = fixed;
+ va_start(ap, fixed);
+ __char4 c4 = va_arg(ap, __char4);
+ sum = sum + c4.x + c4.y;
+ va_end(ap);
+ return sum;
+}
+
+double test_4c(__char4 *in) {
+// CHECK: test_4c
+// CHECK: call double (i32, ...)* @varargs_vec_4c(i32 4, i32 {{%.*}})
+ return varargs_vec_4c(4, *in);
+}
+
+double varargs_vec_5c(int fixed, ...) {
+// CHECK: varargs_vec_5c
+// CHECK: alloca <5 x i8>, align 8
+// CHECK: [[AP_NEXT:%.*]] = getelementptr i8* [[AP_CUR:%.*]], i32 8
+// CHECK: bitcast i8* [[AP_CUR]] to <5 x i8>*
+ va_list ap;
+ double sum = fixed;
+ va_start(ap, fixed);
+ __char5 c5 = va_arg(ap, __char5);
+ sum = sum + c5.x + c5.y;
+ va_end(ap);
+ return sum;
+}
+
+double test_5c(__char5 *in) {
+// CHECK: test_5c
+// CHECK: call double (i32, ...)* @varargs_vec_5c(i32 5, <2 x i32> {{%.*}})
+ return varargs_vec_5c(5, *in);
+}
+
+double varargs_vec_9c(int fixed, ...) {
+// CHECK: varargs_vec_9c
+// CHECK: alloca <9 x i8>, align 16
+// CHECK: [[ALIGN:%.*]] = and i64 {{%.*}}, -16
+// CHECK: [[AP_ALIGN:%.*]] = inttoptr i64 [[ALIGN]] to i8*
+// CHECK: [[AP_NEXT:%.*]] = getelementptr i8* [[AP_ALIGN]], i32 16
+// CHECK: bitcast i8* [[AP_ALIGN]] to <9 x i8>*
+ va_list ap;
+ double sum = fixed;
+ va_start(ap, fixed);
+ __char9 c9 = va_arg(ap, __char9);
+ sum = sum + c9.x + c9.y;
+ va_end(ap);
+ return sum;
+}
+
+double test_9c(__char9 *in) {
+// CHECK: test_9c
+// CHECK: call double (i32, ...)* @varargs_vec_9c(i32 9, <4 x i32> {{%.*}})
+ return varargs_vec_9c(9, *in);
+}
+
+double varargs_vec_19c(int fixed, ...) {
+// CHECK: varargs_vec_19c
+// CHECK: [[AP_NEXT:%.*]] = getelementptr i8* [[AP_CUR:%.*]], i32 8
+// CHECK: [[VAR:%.*]] = bitcast i8* [[AP_CUR]] to i8**
+// CHECK: [[VAR2:%.*]] = load i8** [[VAR]]
+// CHECK: bitcast i8* [[VAR2]] to <19 x i8>*
+ va_list ap;
+ double sum = fixed;
+ va_start(ap, fixed);
+ __char19 c19 = va_arg(ap, __char19);
+ sum = sum + c19.x + c19.y;
+ va_end(ap);
+ return sum;
+}
+
+double test_19c(__char19 *in) {
+// CHECK: test_19c
+// CHECK: call double (i32, ...)* @varargs_vec_19c(i32 19, <19 x i8>* {{%.*}})
+ return varargs_vec_19c(19, *in);
+}
+
+double varargs_vec_3s(int fixed, ...) {
+// CHECK: varargs_vec_3s
+// CHECK: alloca <3 x i16>, align 8
+// CHECK: [[AP_NEXT:%.*]] = getelementptr i8* [[AP_CUR:%.*]], i32 8
+// CHECK: bitcast i8* [[AP_CUR]] to <3 x i16>*
+ va_list ap;
+ double sum = fixed;
+ va_start(ap, fixed);
+ __short3 c3 = va_arg(ap, __short3);
+ sum = sum + c3.x + c3.y;
+ va_end(ap);
+ return sum;
+}
+
+double test_3s(__short3 *in) {
+// CHECK: test_3s
+// CHECK: call double (i32, ...)* @varargs_vec_3s(i32 3, <2 x i32> {{%.*}})
+ return varargs_vec_3s(3, *in);
+}
+
+double varargs_vec_5s(int fixed, ...) {
+// CHECK: varargs_vec_5s
+// CHECK: alloca <5 x i16>, align 16
+// CHECK: [[ALIGN:%.*]] = and i64 {{%.*}}, -16
+// CHECK: [[AP_ALIGN:%.*]] = inttoptr i64 [[ALIGN]] to i8*
+// CHECK: [[AP_NEXT:%.*]] = getelementptr i8* [[AP_ALIGN]], i32 16
+// CHECK: bitcast i8* [[AP_ALIGN]] to <5 x i16>*
+ va_list ap;
+ double sum = fixed;
+ va_start(ap, fixed);
+ __short5 c5 = va_arg(ap, __short5);
+ sum = sum + c5.x + c5.y;
+ va_end(ap);
+ return sum;
+}
+
+double test_5s(__short5 *in) {
+// CHECK: test_5s
+// CHECK: call double (i32, ...)* @varargs_vec_5s(i32 5, <4 x i32> {{%.*}})
+ return varargs_vec_5s(5, *in);
+}
+
+double varargs_vec_3i(int fixed, ...) {
+// CHECK: varargs_vec_3i
+// CHECK: alloca <3 x i32>, align 16
+// CHECK: [[ALIGN:%.*]] = and i64 {{%.*}}, -16
+// CHECK: [[AP_ALIGN:%.*]] = inttoptr i64 [[ALIGN]] to i8*
+// CHECK: [[AP_NEXT:%.*]] = getelementptr i8* [[AP_ALIGN]], i32 16
+// CHECK: bitcast i8* [[AP_ALIGN]] to <3 x i32>*
+ va_list ap;
+ double sum = fixed;
+ va_start(ap, fixed);
+ __int3 c3 = va_arg(ap, __int3);
+ sum = sum + c3.x + c3.y;
+ va_end(ap);
+ return sum;
+}
+
+double test_3i(__int3 *in) {
+// CHECK: test_3i
+// CHECK: call double (i32, ...)* @varargs_vec_3i(i32 3, <4 x i32> {{%.*}})
+ return varargs_vec_3i(3, *in);
+}
+
+double varargs_vec_5i(int fixed, ...) {
+// CHECK: varargs_vec_5i
+// CHECK: alloca <5 x i32>, align 16
+// CHECK: [[AP_NEXT:%.*]] = getelementptr i8* [[AP_CUR:%.*]], i32 8
+// CHECK: [[VAR:%.*]] = bitcast i8* [[AP_CUR]] to i8**
+// CHECK: [[VAR2:%.*]] = load i8** [[VAR]]
+// CHECK: bitcast i8* [[VAR2]] to <5 x i32>*
+ va_list ap;
+ double sum = fixed;
+ va_start(ap, fixed);
+ __int5 c5 = va_arg(ap, __int5);
+ sum = sum + c5.x + c5.y;
+ va_end(ap);
+ return sum;
+}
+
+double test_5i(__int5 *in) {
+// CHECK: test_5i
+// CHECK: call double (i32, ...)* @varargs_vec_5i(i32 5, <5 x i32>* {{%.*}})
+ return varargs_vec_5i(5, *in);
+}
+
+double varargs_vec_3d(int fixed, ...) {
+// CHECK: varargs_vec_3d
+// CHECK: alloca <3 x double>, align 16
+// CHECK: [[AP_NEXT:%.*]] = getelementptr i8* [[AP_CUR:%.*]], i32 8
+// CHECK: [[VAR:%.*]] = bitcast i8* [[AP_CUR]] to i8**
+// CHECK: [[VAR2:%.*]] = load i8** [[VAR]]
+// CHECK: bitcast i8* [[VAR2]] to <3 x double>*
+ va_list ap;
+ double sum = fixed;
+ va_start(ap, fixed);
+ __double3 c3 = va_arg(ap, __double3);
+ sum = sum + c3.x + c3.y;
+ va_end(ap);
+ return sum;
+}
+
+double test_3d(__double3 *in) {
+// CHECK: test_3d
+// CHECK: call double (i32, ...)* @varargs_vec_3d(i32 3, <3 x double>* {{%.*}})
+ return varargs_vec_3d(3, *in);
+}
+
+double varargs_vec(int fixed, ...) {
+// CHECK: varargs_vec
+ va_list ap;
+ double sum = fixed;
+ va_start(ap, fixed);
+ __char3 c3 = va_arg(ap, __char3);
+// CHECK: [[AP_NEXT:%.*]] = getelementptr i8* [[AP_CUR:%.*]], i32 8
+// CHECK: bitcast i8* [[AP_CUR]] to <3 x i8>*
+ sum = sum + c3.x + c3.y;
+ __char5 c5 = va_arg(ap, __char5);
+// CHECK: [[AP_NEXT:%.*]] = getelementptr i8* [[AP_CUR:%.*]], i32 8
+// CHECK: bitcast i8* [[AP_CUR]] to <5 x i8>*
+ sum = sum + c5.x + c5.y;
+ __char9 c9 = va_arg(ap, __char9);
+// CHECK: [[ALIGN:%.*]] = and i64 {{%.*}}, -16
+// CHECK: [[AP_ALIGN:%.*]] = inttoptr i64 [[ALIGN]] to i8*
+// CHECK: [[AP_NEXT:%.*]] = getelementptr i8* [[AP_ALIGN]], i32 16
+// CHECK: bitcast i8* [[AP_ALIGN]] to <9 x i8>*
+ sum = sum + c9.x + c9.y;
+ __char19 c19 = va_arg(ap, __char19);
+// CHECK: [[AP_NEXT:%.*]] = getelementptr i8* [[AP_CUR:%.*]], i32 8
+// CHECK: [[VAR:%.*]] = bitcast i8* [[AP_CUR]] to i8**
+// CHECK: [[VAR2:%.*]] = load i8** [[VAR]]
+// CHECK: bitcast i8* [[VAR2]] to <19 x i8>*
+ sum = sum + c19.x + c19.y;
+ __short3 s3 = va_arg(ap, __short3);
+// CHECK: [[AP_NEXT:%.*]] = getelementptr i8* [[AP_CUR:%.*]], i32 8
+// CHECK: bitcast i8* [[AP_CUR]] to <3 x i16>*
+ sum = sum + s3.x + s3.y;
+ __short5 s5 = va_arg(ap, __short5);
+// CHECK: [[ALIGN:%.*]] = and i64 {{%.*}}, -16
+// CHECK: [[AP_ALIGN:%.*]] = inttoptr i64 [[ALIGN]] to i8*
+// CHECK: [[AP_NEXT:%.*]] = getelementptr i8* [[AP_ALIGN]], i32 16
+// CHECK: bitcast i8* [[AP_ALIGN]] to <5 x i16>*
+ sum = sum + s5.x + s5.y;
+ __int3 i3 = va_arg(ap, __int3);
+// CHECK: [[ALIGN:%.*]] = and i64 {{%.*}}, -16
+// CHECK: [[AP_ALIGN:%.*]] = inttoptr i64 [[ALIGN]] to i8*
+// CHECK: [[AP_NEXT:%.*]] = getelementptr i8* [[AP_ALIGN]], i32 16
+// CHECK: bitcast i8* [[AP_ALIGN]] to <3 x i32>*
+ sum = sum + i3.x + i3.y;
+ __int5 i5 = va_arg(ap, __int5);
+// CHECK: [[AP_NEXT:%.*]] = getelementptr i8* [[AP_CUR:%.*]], i32 8
+// CHECK: [[VAR:%.*]] = bitcast i8* [[AP_CUR]] to i8**
+// CHECK: [[VAR2:%.*]] = load i8** [[VAR]]
+// CHECK: bitcast i8* [[VAR2]] to <5 x i32>*
+ sum = sum + i5.x + i5.y;
+ __double3 d3 = va_arg(ap, __double3);
+// CHECK: [[AP_NEXT:%.*]] = getelementptr i8* [[AP_CUR:%.*]], i32 8
+// CHECK: [[VAR:%.*]] = bitcast i8* [[AP_CUR]] to i8**
+// CHECK: [[VAR2:%.*]] = load i8** [[VAR]]
+// CHECK: bitcast i8* [[VAR2]] to <3 x double>*
+ sum = sum + d3.x + d3.y;
+ va_end(ap);
+ return sum;
+}
+
+double test(__char3 *c3, __char5 *c5, __char9 *c9, __char19 *c19,
+ __short3 *s3, __short5 *s5, __int3 *i3, __int5 *i5,
+ __double3 *d3) {
+ double ret = varargs_vec(3, *c3, *c5, *c9, *c19, *s3, *s5, *i3, *i5, *d3);
+// CHECK: call double (i32, ...)* @varargs_vec(i32 3, i32 {{%.*}}, <2 x i32> {{%.*}}, <4 x i32> {{%.*}}, <19 x i8>* {{%.*}}, <2 x i32> {{%.*}}, <4 x i32> {{%.*}}, <4 x i32> {{%.*}}, <5 x i32>* {{%.*}}, <3 x double>* {{%.*}})
+ return ret;
+}
+
+__attribute__((noinline)) double args_vec_3c(int fixed, __char3 c3) {
+// CHECK: args_vec_3c
+// CHECK: [[C3:%.*]] = alloca <3 x i8>, align 4
+// CHECK: [[TMP:%.*]] = bitcast <3 x i8>* [[C3]] to i32*
+// CHECK: store i32 {{%.*}}, i32* [[TMP]]
+ double sum = fixed;
+ sum = sum + c3.x + c3.y;
+ return sum;
+}
+
+double fixed_3c(__char3 *in) {
+// CHECK: fixed_3c
+// CHECK: call double @args_vec_3c(i32 3, i32 {{%.*}})
+ return args_vec_3c(3, *in);
+}
+
+__attribute__((noinline)) double args_vec_5c(int fixed, __char5 c5) {
+// CHECK: args_vec_5c
+// CHECK: [[C5:%.*]] = alloca <5 x i8>, align 8
+// CHECK: [[TMP:%.*]] = bitcast <5 x i8>* [[C5]] to <2 x i32>*
+// CHECK: store <2 x i32> {{%.*}}, <2 x i32>* [[TMP]], align 1
+ double sum = fixed;
+ sum = sum + c5.x + c5.y;
+ return sum;
+}
+
+double fixed_5c(__char5 *in) {
+// CHECK: fixed_5c
+// CHECK: call double @args_vec_5c(i32 5, <2 x i32> {{%.*}})
+ return args_vec_5c(5, *in);
+}
+
+__attribute__((noinline)) double args_vec_9c(int fixed, __char9 c9) {
+// CHECK: args_vec_9c
+// CHECK: [[C9:%.*]] = alloca <9 x i8>, align 16
+// CHECK: [[TMP:%.*]] = bitcast <9 x i8>* [[C9]] to <4 x i32>*
+// CHECK: store <4 x i32> {{%.*}}, <4 x i32>* [[TMP]], align 1
+ double sum = fixed;
+ sum = sum + c9.x + c9.y;
+ return sum;
+}
+
+double fixed_9c(__char9 *in) {
+// CHECK: fixed_9c
+// CHECK: call double @args_vec_9c(i32 9, <4 x i32> {{%.*}})
+ return args_vec_9c(9, *in);
+}
+
+__attribute__((noinline)) double args_vec_19c(int fixed, __char19 c19) {
+// CHECK: args_vec_19c
+// CHECK: [[C19:%.*]] = load <19 x i8>* {{.*}}, align 16
+ double sum = fixed;
+ sum = sum + c19.x + c19.y;
+ return sum;
+}
+
+double fixed_19c(__char19 *in) {
+// CHECK: fixed_19c
+// CHECK: call double @args_vec_19c(i32 19, <19 x i8>* {{%.*}})
+ return args_vec_19c(19, *in);
+}
+
+__attribute__((noinline)) double args_vec_3s(int fixed, __short3 c3) {
+// CHECK: args_vec_3s
+// CHECK: [[C3:%.*]] = alloca <3 x i16>, align 8
+// CHECK: [[TMP:%.*]] = bitcast <3 x i16>* [[C3]] to <2 x i32>*
+// CHECK: store <2 x i32> {{%.*}}, <2 x i32>* [[TMP]], align 1
+ double sum = fixed;
+ sum = sum + c3.x + c3.y;
+ return sum;
+}
+
+double fixed_3s(__short3 *in) {
+// CHECK: fixed_3s
+// CHECK: call double @args_vec_3s(i32 3, <2 x i32> {{%.*}})
+ return args_vec_3s(3, *in);
+}
+
+__attribute__((noinline)) double args_vec_5s(int fixed, __short5 c5) {
+// CHECK: args_vec_5s
+// CHECK: [[C5:%.*]] = alloca <5 x i16>, align 16
+// CHECK: [[TMP:%.*]] = bitcast <5 x i16>* [[C5]] to <4 x i32>*
+// CHECK: store <4 x i32> {{%.*}}, <4 x i32>* [[TMP]], align 1
+ double sum = fixed;
+ sum = sum + c5.x + c5.y;
+ return sum;
+}
+
+double fixed_5s(__short5 *in) {
+// CHECK: fixed_5s
+// CHECK: call double @args_vec_5s(i32 5, <4 x i32> {{%.*}})
+ return args_vec_5s(5, *in);
+}
+
+__attribute__((noinline)) double args_vec_3i(int fixed, __int3 c3) {
+// CHECK: args_vec_3i
+// CHECK: [[C3:%.*]] = alloca <3 x i32>, align 16
+// CHECK: [[TMP:%.*]] = bitcast <3 x i32>* [[C3]] to <4 x i32>*
+// CHECK: store <4 x i32> {{%.*}}, <4 x i32>* [[TMP]], align 1
+ double sum = fixed;
+ sum = sum + c3.x + c3.y;
+ return sum;
+}
+
+double fixed_3i(__int3 *in) {
+// CHECK: fixed_3i
+// CHECK: call double @args_vec_3i(i32 3, <4 x i32> {{%.*}})
+ return args_vec_3i(3, *in);
+}
+
+__attribute__((noinline)) double args_vec_5i(int fixed, __int5 c5) {
+// CHECK: args_vec_5i
+// CHECK: [[C5:%.*]] = load <5 x i32>* {{%.*}}, align 16
+ double sum = fixed;
+ sum = sum + c5.x + c5.y;
+ return sum;
+}
+
+double fixed_5i(__int5 *in) {
+// CHECK: fixed_5i
+// CHECK: call double @args_vec_5i(i32 5, <5 x i32>* {{%.*}})
+ return args_vec_5i(5, *in);
+}
+
+__attribute__((noinline)) double args_vec_3d(int fixed, __double3 c3) {
+// CHECK: args_vec_3d
+// CHECK: [[CAST:%.*]] = bitcast <3 x double>* {{%.*}} to <4 x double>*
+// CHECK: [[LOAD:%.*]] = load <4 x double>* [[CAST]]
+// CHECK: shufflevector <4 x double> [[LOAD]], <4 x double> undef, <3 x i32> <i32 0, i32 1, i32 2>
+ double sum = fixed;
+ sum = sum + c3.x + c3.y;
+ return sum;
+}
+
+double fixed_3d(__double3 *in) {
+// CHECK: fixed_3d
+// CHECK: call double @args_vec_3d(i32 3, <3 x double>* {{%.*}})
+ return args_vec_3d(3, *in);
+}
diff --git a/test/CodeGen/arm64-arguments.c b/test/CodeGen/arm64-arguments.c
new file mode 100644
index 000000000000..b2de08dbe68c
--- /dev/null
+++ b/test/CodeGen/arm64-arguments.c
@@ -0,0 +1,719 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -target-abi darwinpcs -ffreestanding -emit-llvm -w -o - %s | FileCheck %s
+
+// CHECK: define signext i8 @f0()
+char f0(void) {
+ return 0;
+}
+
+// Struct as return type. Aggregates <= 16 bytes are passed directly and round
+// up to multiple of 8 bytes.
+// CHECK: define i64 @f1()
+struct s1 { char f0; };
+struct s1 f1(void) {}
+
+// CHECK: define i64 @f2()
+struct s2 { short f0; };
+struct s2 f2(void) {}
+
+// CHECK: define i64 @f3()
+struct s3 { int f0; };
+struct s3 f3(void) {}
+
+// CHECK: define i64 @f4()
+struct s4 { struct s4_0 { int f0; } f0; };
+struct s4 f4(void) {}
+
+// CHECK: define i64 @f5()
+struct s5 { struct { } f0; int f1; };
+struct s5 f5(void) {}
+
+// CHECK: define i64 @f6()
+struct s6 { int f0[1]; };
+struct s6 f6(void) {}
+
+// CHECK: define void @f7()
+struct s7 { struct { int : 0; } f0; };
+struct s7 f7(void) {}
+
+// CHECK: define void @f8()
+struct s8 { struct { int : 0; } f0[1]; };
+struct s8 f8(void) {}
+
+// CHECK: define i64 @f9()
+struct s9 { int f0; int : 0; };
+struct s9 f9(void) {}
+
+// CHECK: define i64 @f10()
+struct s10 { int f0; int : 0; int : 0; };
+struct s10 f10(void) {}
+
+// CHECK: define i64 @f11()
+struct s11 { int : 0; int f0; };
+struct s11 f11(void) {}
+
+// CHECK: define i64 @f12()
+union u12 { char f0; short f1; int f2; };
+union u12 f12(void) {}
+
+// Homogeneous Aggregate as return type will be passed directly.
+// CHECK: define %struct.s13 @f13()
+struct s13 { float f0; };
+struct s13 f13(void) {}
+// CHECK: define %union.u14 @f14()
+union u14 { float f0; };
+union u14 f14(void) {}
+
+// CHECK: define void @f15()
+void f15(struct s7 a0) {}
+
+// CHECK: define void @f16()
+void f16(struct s8 a0) {}
+
+// CHECK: define i64 @f17()
+struct s17 { short f0 : 13; char f1 : 4; };
+struct s17 f17(void) {}
+
+// CHECK: define i64 @f18()
+struct s18 { short f0; char f1 : 4; };
+struct s18 f18(void) {}
+
+// CHECK: define i64 @f19()
+struct s19 { int f0; struct s8 f1; };
+struct s19 f19(void) {}
+
+// CHECK: define i64 @f20()
+struct s20 { struct s8 f1; int f0; };
+struct s20 f20(void) {}
+
+// CHECK: define i64 @f21()
+struct s21 { struct {} f1; int f0 : 4; };
+struct s21 f21(void) {}
+
+// CHECK: define i64 @f22()
+// CHECK: define i64 @f23()
+// CHECK: define i64 @f24()
+// CHECK: define i128 @f25()
+// CHECK: define { float, float } @f26()
+// CHECK: define { double, double } @f27()
+_Complex char f22(void) {}
+_Complex short f23(void) {}
+_Complex int f24(void) {}
+_Complex long long f25(void) {}
+_Complex float f26(void) {}
+_Complex double f27(void) {}
+
+// CHECK: define i64 @f28()
+struct s28 { _Complex char f0; };
+struct s28 f28() {}
+
+// CHECK: define i64 @f29()
+struct s29 { _Complex short f0; };
+struct s29 f29() {}
+
+// CHECK: define i64 @f30()
+struct s30 { _Complex int f0; };
+struct s30 f30() {}
+
+struct s31 { char x; };
+void f31(struct s31 s) { }
+// CHECK: define void @f31(i64 %s.coerce)
+// CHECK: %s = alloca %struct.s31, align 8
+// CHECK: trunc i64 %s.coerce to i8
+// CHECK: store i8 %{{.*}},
+
+struct s32 { double x; };
+void f32(struct s32 s) { }
+// Expand Homogeneous Aggregate.
+// CHECK: @f32(double %{{.*}})
+
+// A composite type larger than 16 bytes should be passed indirectly.
+struct s33 { char buf[32*32]; };
+void f33(struct s33 s) { }
+// CHECK: define void @f33(%struct.s33* %s)
+
+struct s34 { char c; };
+void f34(struct s34 s);
+void g34(struct s34 *s) { f34(*s); }
+// CHECK: @g34(%struct.s34* %s)
+// CHECK: %[[a:.*]] = load i8* %{{.*}}
+// CHECK: zext i8 %[[a]] to i64
+// CHECK: call void @f34(i64 %{{.*}})
+
+/*
+ * Check that va_arg accesses stack according to ABI alignment
+ */
+long long t1(int i, ...) {
+ // CHECK: t1
+ __builtin_va_list ap;
+ __builtin_va_start(ap, i);
+ // CHECK-NOT: add i32 %{{.*}} 7
+ // CHECK-NOT: and i32 %{{.*}} -8
+ long long ll = __builtin_va_arg(ap, long long);
+ __builtin_va_end(ap);
+ return ll;
+}
+double t2(int i, ...) {
+ // CHECK: t2
+ __builtin_va_list ap;
+ __builtin_va_start(ap, i);
+ // CHECK-NOT: add i32 %{{.*}} 7
+ // CHECK-NOT: and i32 %{{.*}} -8
+ double ll = __builtin_va_arg(ap, double);
+ __builtin_va_end(ap);
+ return ll;
+}
+
+#include <arm_neon.h>
+
+// Homogeneous Vector Aggregate as return type and argument type.
+// CHECK: define %struct.int8x16x2_t @f0_0(<16 x i8> %{{.*}}, <16 x i8> %{{.*}})
+int8x16x2_t f0_0(int8x16_t a0, int8x16_t a1) {
+ return vzipq_s8(a0, a1);
+}
+
+// Test direct vector passing.
+typedef float T_float32x2 __attribute__ ((__vector_size__ (8)));
+typedef float T_float32x4 __attribute__ ((__vector_size__ (16)));
+typedef float T_float32x8 __attribute__ ((__vector_size__ (32)));
+typedef float T_float32x16 __attribute__ ((__vector_size__ (64)));
+
+// CHECK: define <2 x float> @f1_0(<2 x float> %{{.*}})
+T_float32x2 f1_0(T_float32x2 a0) { return a0; }
+// CHECK: define <4 x float> @f1_1(<4 x float> %{{.*}})
+T_float32x4 f1_1(T_float32x4 a0) { return a0; }
+// Vector with length bigger than 16-byte is illegal and is passed indirectly.
+// CHECK: define void @f1_2(<8 x float>* noalias sret %{{.*}}, <8 x float>*)
+T_float32x8 f1_2(T_float32x8 a0) { return a0; }
+// CHECK: define void @f1_3(<16 x float>* noalias sret %{{.*}}, <16 x float>*)
+T_float32x16 f1_3(T_float32x16 a0) { return a0; }
+
+// Testing alignment with aggregates: HFA, aggregates with size <= 16 bytes and
+// aggregates with size > 16 bytes.
+struct s35
+{
+ float v[4]; //Testing HFA.
+} __attribute__((aligned(16)));
+typedef struct s35 s35_with_align;
+
+typedef __attribute__((neon_vector_type(4))) float float32x4_t;
+float32x4_t f35(int i, s35_with_align s1, s35_with_align s2) {
+// CHECK: define <4 x float> @f35(i32 %i, float %s1.0, float %s1.1, float %s1.2, float %s1.3, float %s2.0, float %s2.1, float %s2.2, float %s2.3)
+// CHECK: %s1 = alloca %struct.s35, align 16
+// CHECK: %s2 = alloca %struct.s35, align 16
+// CHECK: %[[a:.*]] = bitcast %struct.s35* %s1 to <4 x float>*
+// CHECK: load <4 x float>* %[[a]], align 16
+// CHECK: %[[b:.*]] = bitcast %struct.s35* %s2 to <4 x float>*
+// CHECK: load <4 x float>* %[[b]], align 16
+ float32x4_t v = vaddq_f32(*(float32x4_t *)&s1,
+ *(float32x4_t *)&s2);
+ return v;
+}
+
+struct s36
+{
+ int v[4]; //Testing 16-byte aggregate.
+} __attribute__((aligned(16)));
+typedef struct s36 s36_with_align;
+
+typedef __attribute__((neon_vector_type(4))) int int32x4_t;
+int32x4_t f36(int i, s36_with_align s1, s36_with_align s2) {
+// CHECK: define <4 x i32> @f36(i32 %i, i128 %s1.coerce, i128 %s2.coerce)
+// CHECK: %s1 = alloca %struct.s36, align 16
+// CHECK: %s2 = alloca %struct.s36, align 16
+// CHECK: store i128 %s1.coerce, i128* %{{.*}}, align 1
+// CHECK: store i128 %s2.coerce, i128* %{{.*}}, align 1
+// CHECK: %[[a:.*]] = bitcast %struct.s36* %s1 to <4 x i32>*
+// CHECK: load <4 x i32>* %[[a]], align 16
+// CHECK: %[[b:.*]] = bitcast %struct.s36* %s2 to <4 x i32>*
+// CHECK: load <4 x i32>* %[[b]], align 16
+ int32x4_t v = vaddq_s32(*(int32x4_t *)&s1,
+ *(int32x4_t *)&s2);
+ return v;
+}
+
+struct s37
+{
+ int v[18]; //Testing large aggregate.
+} __attribute__((aligned(16)));
+typedef struct s37 s37_with_align;
+
+int32x4_t f37(int i, s37_with_align s1, s37_with_align s2) {
+// CHECK: define <4 x i32> @f37(i32 %i, %struct.s37* %s1, %struct.s37* %s2)
+// CHECK: %[[a:.*]] = bitcast %struct.s37* %s1 to <4 x i32>*
+// CHECK: load <4 x i32>* %[[a]], align 16
+// CHECK: %[[b:.*]] = bitcast %struct.s37* %s2 to <4 x i32>*
+// CHECK: load <4 x i32>* %[[b]], align 16
+ int32x4_t v = vaddq_s32(*(int32x4_t *)&s1,
+ *(int32x4_t *)&s2);
+ return v;
+}
+s37_with_align g37;
+int32x4_t caller37() {
+// CHECK: caller37
+// CHECK: %[[a:.*]] = alloca %struct.s37, align 16
+// CHECK: %[[b:.*]] = alloca %struct.s37, align 16
+// CHECK: call void @llvm.memcpy
+// CHECK: call void @llvm.memcpy
+// CHECK: call <4 x i32> @f37(i32 3, %struct.s37* %[[a]], %struct.s37* %[[b]])
+ return f37(3, g37, g37);
+}
+
+// rdar://problem/12648441
+// Test passing structs with size < 8, < 16 and > 16
+// with alignment of 16 and without
+
+// structs with size <= 8 bytes, without alignment attribute
+// passed as i64 regardless of the align attribute
+struct s38
+{
+ int i;
+ short s;
+};
+typedef struct s38 s38_no_align;
+// passing structs in registers
+__attribute__ ((noinline))
+int f38(int i, s38_no_align s1, s38_no_align s2) {
+// CHECK: define i32 @f38(i32 %i, i64 %s1.coerce, i64 %s2.coerce)
+// CHECK: %s1 = alloca %struct.s38, align 8
+// CHECK: %s2 = alloca %struct.s38, align 8
+// CHECK: store i64 %s1.coerce, i64* %{{.*}}, align 1
+// CHECK: store i64 %s2.coerce, i64* %{{.*}}, align 1
+// CHECK: getelementptr inbounds %struct.s38* %s1, i32 0, i32 0
+// CHECK: getelementptr inbounds %struct.s38* %s2, i32 0, i32 0
+// CHECK: getelementptr inbounds %struct.s38* %s1, i32 0, i32 1
+// CHECK: getelementptr inbounds %struct.s38* %s2, i32 0, i32 1
+ return s1.i + s2.i + i + s1.s + s2.s;
+}
+s38_no_align g38;
+s38_no_align g38_2;
+int caller38() {
+// CHECK: define i32 @caller38()
+// CHECK: %[[a:.*]] = load i64* bitcast (%struct.s38* @g38 to i64*), align 1
+// CHECK: %[[b:.*]] = load i64* bitcast (%struct.s38* @g38_2 to i64*), align 1
+// CHECK: call i32 @f38(i32 3, i64 %[[a]], i64 %[[b]])
+ return f38(3, g38, g38_2);
+}
+// passing structs on stack
+__attribute__ ((noinline))
+int f38_stack(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8,
+ int i9, s38_no_align s1, s38_no_align s2) {
+// CHECK: define i32 @f38_stack(i32 %i, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, i32 %i8, i32 %i9, i64 %s1.coerce, i64 %s2.coerce)
+// CHECK: %s1 = alloca %struct.s38, align 8
+// CHECK: %s2 = alloca %struct.s38, align 8
+// CHECK: store i64 %s1.coerce, i64* %{{.*}}, align 1
+// CHECK: store i64 %s2.coerce, i64* %{{.*}}, align 1
+// CHECK: getelementptr inbounds %struct.s38* %s1, i32 0, i32 0
+// CHECK: getelementptr inbounds %struct.s38* %s2, i32 0, i32 0
+// CHECK: getelementptr inbounds %struct.s38* %s1, i32 0, i32 1
+// CHECK: getelementptr inbounds %struct.s38* %s2, i32 0, i32 1
+ return s1.i + s2.i + i + i2 + i3 + i4 + i5 + i6 + i7 + i8 + i9 + s1.s + s2.s;
+}
+int caller38_stack() {
+// CHECK: define i32 @caller38_stack()
+// CHECK: %[[a:.*]] = load i64* bitcast (%struct.s38* @g38 to i64*), align 1
+// CHECK: %[[b:.*]] = load i64* bitcast (%struct.s38* @g38_2 to i64*), align 1
+// CHECK: call i32 @f38_stack(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i64 %[[a]], i64 %[[b]])
+ return f38_stack(1, 2, 3, 4, 5, 6, 7, 8, 9, g38, g38_2);
+}
+
+// structs with size <= 8 bytes, with alignment attribute
+struct s39
+{
+ int i;
+ short s;
+} __attribute__((aligned(16)));
+typedef struct s39 s39_with_align;
+// passing aligned structs in registers
+__attribute__ ((noinline))
+int f39(int i, s39_with_align s1, s39_with_align s2) {
+// CHECK: define i32 @f39(i32 %i, i128 %s1.coerce, i128 %s2.coerce)
+// CHECK: %s1 = alloca %struct.s39, align 16
+// CHECK: %s2 = alloca %struct.s39, align 16
+// CHECK: store i128 %s1.coerce, i128* %{{.*}}, align 1
+// CHECK: store i128 %s2.coerce, i128* %{{.*}}, align 1
+// CHECK: getelementptr inbounds %struct.s39* %s1, i32 0, i32 0
+// CHECK: getelementptr inbounds %struct.s39* %s2, i32 0, i32 0
+// CHECK: getelementptr inbounds %struct.s39* %s1, i32 0, i32 1
+// CHECK: getelementptr inbounds %struct.s39* %s2, i32 0, i32 1
+ return s1.i + s2.i + i + s1.s + s2.s;
+}
+s39_with_align g39;
+s39_with_align g39_2;
+int caller39() {
+// CHECK: define i32 @caller39()
+// CHECK: %[[a:.*]] = load i128* bitcast (%struct.s39* @g39 to i128*), align 1
+// CHECK: %[[b:.*]] = load i128* bitcast (%struct.s39* @g39_2 to i128*), align 1
+// CHECK: call i32 @f39(i32 3, i128 %[[a]], i128 %[[b]])
+ return f39(3, g39, g39_2);
+}
+// passing aligned structs on stack
+__attribute__ ((noinline))
+int f39_stack(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8,
+ int i9, s39_with_align s1, s39_with_align s2) {
+// CHECK: define i32 @f39_stack(i32 %i, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, i32 %i8, i32 %i9, i128 %s1.coerce, i128 %s2.coerce)
+// CHECK: %s1 = alloca %struct.s39, align 16
+// CHECK: %s2 = alloca %struct.s39, align 16
+// CHECK: store i128 %s1.coerce, i128* %{{.*}}, align 1
+// CHECK: store i128 %s2.coerce, i128* %{{.*}}, align 1
+// CHECK: getelementptr inbounds %struct.s39* %s1, i32 0, i32 0
+// CHECK: getelementptr inbounds %struct.s39* %s2, i32 0, i32 0
+// CHECK: getelementptr inbounds %struct.s39* %s1, i32 0, i32 1
+// CHECK: getelementptr inbounds %struct.s39* %s2, i32 0, i32 1
+ return s1.i + s2.i + i + i2 + i3 + i4 + i5 + i6 + i7 + i8 + i9 + s1.s + s2.s;
+}
+int caller39_stack() {
+// CHECK: define i32 @caller39_stack()
+// CHECK: %[[a:.*]] = load i128* bitcast (%struct.s39* @g39 to i128*), align 1
+// CHECK: %[[b:.*]] = load i128* bitcast (%struct.s39* @g39_2 to i128*), align 1
+// CHECK: call i32 @f39_stack(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i128 %[[a]], i128 %[[b]])
+ return f39_stack(1, 2, 3, 4, 5, 6, 7, 8, 9, g39, g39_2);
+}
+
+// structs with size <= 16 bytes, without alignment attribute
+struct s40
+{
+ int i;
+ short s;
+ int i2;
+ short s2;
+};
+typedef struct s40 s40_no_align;
+// passing structs in registers
+__attribute__ ((noinline))
+int f40(int i, s40_no_align s1, s40_no_align s2) {
+// CHECK: define i32 @f40(i32 %i, [2 x i64] %s1.coerce, [2 x i64] %s2.coerce)
+// CHECK: %s1 = alloca %struct.s40, align 8
+// CHECK: %s2 = alloca %struct.s40, align 8
+// CHECK: store [2 x i64] %s1.coerce, [2 x i64]* %{{.*}}, align 1
+// CHECK: store [2 x i64] %s2.coerce, [2 x i64]* %{{.*}}, align 1
+// CHECK: getelementptr inbounds %struct.s40* %s1, i32 0, i32 0
+// CHECK: getelementptr inbounds %struct.s40* %s2, i32 0, i32 0
+// CHECK: getelementptr inbounds %struct.s40* %s1, i32 0, i32 1
+// CHECK: getelementptr inbounds %struct.s40* %s2, i32 0, i32 1
+ return s1.i + s2.i + i + s1.s + s2.s;
+}
+s40_no_align g40;
+s40_no_align g40_2;
+int caller40() {
+// CHECK: define i32 @caller40()
+// CHECK: %[[a:.*]] = load [2 x i64]* bitcast (%struct.s40* @g40 to [2 x i64]*), align 1
+// CHECK: %[[b:.*]] = load [2 x i64]* bitcast (%struct.s40* @g40_2 to [2 x i64]*), align 1
+// CHECK: call i32 @f40(i32 3, [2 x i64] %[[a]], [2 x i64] %[[b]])
+ return f40(3, g40, g40_2);
+}
+// passing structs on stack
+__attribute__ ((noinline))
+int f40_stack(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8,
+ int i9, s40_no_align s1, s40_no_align s2) {
+// CHECK: define i32 @f40_stack(i32 %i, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, i32 %i8, i32 %i9, [2 x i64] %s1.coerce, [2 x i64] %s2.coerce)
+// CHECK: %s1 = alloca %struct.s40, align 8
+// CHECK: %s2 = alloca %struct.s40, align 8
+// CHECK: store [2 x i64] %s1.coerce, [2 x i64]* %{{.*}}, align 1
+// CHECK: store [2 x i64] %s2.coerce, [2 x i64]* %{{.*}}, align 1
+// CHECK: getelementptr inbounds %struct.s40* %s1, i32 0, i32 0
+// CHECK: getelementptr inbounds %struct.s40* %s2, i32 0, i32 0
+// CHECK: getelementptr inbounds %struct.s40* %s1, i32 0, i32 1
+// CHECK: getelementptr inbounds %struct.s40* %s2, i32 0, i32 1
+ return s1.i + s2.i + i + i2 + i3 + i4 + i5 + i6 + i7 + i8 + i9 + s1.s + s2.s;
+}
+int caller40_stack() {
+// CHECK: define i32 @caller40_stack()
+// CHECK: %[[a:.*]] = load [2 x i64]* bitcast (%struct.s40* @g40 to [2 x i64]*), align 1
+// CHECK: %[[b:.*]] = load [2 x i64]* bitcast (%struct.s40* @g40_2 to [2 x i64]*), align 1
+// CHECK: call i32 @f40_stack(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, [2 x i64] %[[a]], [2 x i64] %[[b]])
+ return f40_stack(1, 2, 3, 4, 5, 6, 7, 8, 9, g40, g40_2);
+}
+
+// structs with size <= 16 bytes, with alignment attribute
+struct s41
+{
+ int i;
+ short s;
+ int i2;
+ short s2;
+} __attribute__((aligned(16)));
+typedef struct s41 s41_with_align;
+// passing aligned structs in registers
+__attribute__ ((noinline))
+int f41(int i, s41_with_align s1, s41_with_align s2) {
+// CHECK: define i32 @f41(i32 %i, i128 %s1.coerce, i128 %s2.coerce)
+// CHECK: %s1 = alloca %struct.s41, align 16
+// CHECK: %s2 = alloca %struct.s41, align 16
+// CHECK: store i128 %s1.coerce, i128* %{{.*}}, align 1
+// CHECK: store i128 %s2.coerce, i128* %{{.*}}, align 1
+// CHECK: getelementptr inbounds %struct.s41* %s1, i32 0, i32 0
+// CHECK: getelementptr inbounds %struct.s41* %s2, i32 0, i32 0
+// CHECK: getelementptr inbounds %struct.s41* %s1, i32 0, i32 1
+// CHECK: getelementptr inbounds %struct.s41* %s2, i32 0, i32 1
+ return s1.i + s2.i + i + s1.s + s2.s;
+}
+s41_with_align g41;
+s41_with_align g41_2;
+int caller41() {
+// CHECK: define i32 @caller41()
+// CHECK: %[[a:.*]] = load i128* bitcast (%struct.s41* @g41 to i128*), align 1
+// CHECK: %[[b:.*]] = load i128* bitcast (%struct.s41* @g41_2 to i128*), align 1
+// CHECK: call i32 @f41(i32 3, i128 %[[a]], i128 %[[b]])
+ return f41(3, g41, g41_2);
+}
+// passing aligned structs on stack
+__attribute__ ((noinline))
+int f41_stack(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8,
+ int i9, s41_with_align s1, s41_with_align s2) {
+// CHECK: define i32 @f41_stack(i32 %i, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, i32 %i8, i32 %i9, i128 %s1.coerce, i128 %s2.coerce)
+// CHECK: %s1 = alloca %struct.s41, align 16
+// CHECK: %s2 = alloca %struct.s41, align 16
+// CHECK: store i128 %s1.coerce, i128* %{{.*}}, align 1
+// CHECK: store i128 %s2.coerce, i128* %{{.*}}, align 1
+// CHECK: getelementptr inbounds %struct.s41* %s1, i32 0, i32 0
+// CHECK: getelementptr inbounds %struct.s41* %s2, i32 0, i32 0
+// CHECK: getelementptr inbounds %struct.s41* %s1, i32 0, i32 1
+// CHECK: getelementptr inbounds %struct.s41* %s2, i32 0, i32 1
+ return s1.i + s2.i + i + i2 + i3 + i4 + i5 + i6 + i7 + i8 + i9 + s1.s + s2.s;
+}
+int caller41_stack() {
+// CHECK: define i32 @caller41_stack()
+// CHECK: %[[a:.*]] = load i128* bitcast (%struct.s41* @g41 to i128*), align 1
+// CHECK: %[[b:.*]] = load i128* bitcast (%struct.s41* @g41_2 to i128*), align 1
+// CHECK: call i32 @f41_stack(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i128 %[[a]], i128 %[[b]])
+ return f41_stack(1, 2, 3, 4, 5, 6, 7, 8, 9, g41, g41_2);
+}
+
+// structs with size > 16 bytes, without alignment attribute
+struct s42
+{
+ int i;
+ short s;
+ int i2;
+ short s2;
+ int i3;
+ short s3;
+};
+typedef struct s42 s42_no_align;
+// passing structs in registers
+__attribute__ ((noinline))
+int f42(int i, s42_no_align s1, s42_no_align s2) {
+// CHECK: define i32 @f42(i32 %i, %struct.s42* %s1, %struct.s42* %s2)
+// CHECK: getelementptr inbounds %struct.s42* %s1, i32 0, i32 0
+// CHECK: getelementptr inbounds %struct.s42* %s2, i32 0, i32 0
+// CHECK: getelementptr inbounds %struct.s42* %s1, i32 0, i32 1
+// CHECK: getelementptr inbounds %struct.s42* %s2, i32 0, i32 1
+ return s1.i + s2.i + i + s1.s + s2.s;
+}
+s42_no_align g42;
+s42_no_align g42_2;
+int caller42() {
+// CHECK: define i32 @caller42()
+// CHECK: %[[a:.*]] = alloca %struct.s42, align 4
+// CHECK: %[[b:.*]] = alloca %struct.s42, align 4
+// CHECK: %[[c:.*]] = bitcast %struct.s42* %[[a]] to i8*
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64
+// CHECK: %[[d:.*]] = bitcast %struct.s42* %[[b]] to i8*
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64
+// CHECK: call i32 @f42(i32 3, %struct.s42* %[[a]], %struct.s42* %[[b]])
+ return f42(3, g42, g42_2);
+}
+// passing structs on stack
+__attribute__ ((noinline))
+int f42_stack(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8,
+ int i9, s42_no_align s1, s42_no_align s2) {
+// CHECK: define i32 @f42_stack(i32 %i, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, i32 %i8, i32 %i9, %struct.s42* %s1, %struct.s42* %s2)
+// CHECK: getelementptr inbounds %struct.s42* %s1, i32 0, i32 0
+// CHECK: getelementptr inbounds %struct.s42* %s2, i32 0, i32 0
+// CHECK: getelementptr inbounds %struct.s42* %s1, i32 0, i32 1
+// CHECK: getelementptr inbounds %struct.s42* %s2, i32 0, i32 1
+ return s1.i + s2.i + i + i2 + i3 + i4 + i5 + i6 + i7 + i8 + i9 + s1.s + s2.s;
+}
+int caller42_stack() {
+// CHECK: define i32 @caller42_stack()
+// CHECK: %[[a:.*]] = alloca %struct.s42, align 4
+// CHECK: %[[b:.*]] = alloca %struct.s42, align 4
+// CHECK: %[[c:.*]] = bitcast %struct.s42* %[[a]] to i8*
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64
+// CHECK: %[[d:.*]] = bitcast %struct.s42* %[[b]] to i8*
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64
+// CHECK: call i32 @f42_stack(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, %struct.s42* %[[a]], %struct.s42* %[[b]])
+ return f42_stack(1, 2, 3, 4, 5, 6, 7, 8, 9, g42, g42_2);
+}
+
+// structs with size > 16 bytes, with alignment attribute
+struct s43
+{
+ int i;
+ short s;
+ int i2;
+ short s2;
+ int i3;
+ short s3;
+} __attribute__((aligned(16)));
+typedef struct s43 s43_with_align;
+// passing aligned structs in registers
+__attribute__ ((noinline))
+int f43(int i, s43_with_align s1, s43_with_align s2) {
+// CHECK: define i32 @f43(i32 %i, %struct.s43* %s1, %struct.s43* %s2)
+// CHECK: getelementptr inbounds %struct.s43* %s1, i32 0, i32 0
+// CHECK: getelementptr inbounds %struct.s43* %s2, i32 0, i32 0
+// CHECK: getelementptr inbounds %struct.s43* %s1, i32 0, i32 1
+// CHECK: getelementptr inbounds %struct.s43* %s2, i32 0, i32 1
+ return s1.i + s2.i + i + s1.s + s2.s;
+}
+s43_with_align g43;
+s43_with_align g43_2;
+int caller43() {
+// CHECK: define i32 @caller43()
+// CHECK: %[[a:.*]] = alloca %struct.s43, align 16
+// CHECK: %[[b:.*]] = alloca %struct.s43, align 16
+// CHECK: %[[c:.*]] = bitcast %struct.s43* %[[a]] to i8*
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64
+// CHECK: %[[d:.*]] = bitcast %struct.s43* %[[b]] to i8*
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64
+// CHECK: call i32 @f43(i32 3, %struct.s43* %[[a]], %struct.s43* %[[b]])
+ return f43(3, g43, g43_2);
+}
+// passing aligned structs on stack
+__attribute__ ((noinline))
+int f43_stack(int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8,
+ int i9, s43_with_align s1, s43_with_align s2) {
+// CHECK: define i32 @f43_stack(i32 %i, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, i32 %i8, i32 %i9, %struct.s43* %s1, %struct.s43* %s2)
+// CHECK: getelementptr inbounds %struct.s43* %s1, i32 0, i32 0
+// CHECK: getelementptr inbounds %struct.s43* %s2, i32 0, i32 0
+// CHECK: getelementptr inbounds %struct.s43* %s1, i32 0, i32 1
+// CHECK: getelementptr inbounds %struct.s43* %s2, i32 0, i32 1
+ return s1.i + s2.i + i + i2 + i3 + i4 + i5 + i6 + i7 + i8 + i9 + s1.s + s2.s;
+}
+int caller43_stack() {
+// CHECK: define i32 @caller43_stack()
+// CHECK: %[[a:.*]] = alloca %struct.s43, align 16
+// CHECK: %[[b:.*]] = alloca %struct.s43, align 16
+// CHECK: %[[c:.*]] = bitcast %struct.s43* %[[a]] to i8*
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64
+// CHECK: %[[d:.*]] = bitcast %struct.s43* %[[b]] to i8*
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64
+// CHECK: call i32 @f43_stack(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, %struct.s43* %[[a]], %struct.s43* %[[b]])
+ return f43_stack(1, 2, 3, 4, 5, 6, 7, 8, 9, g43, g43_2);
+}
+
+// rdar://13668927
+// We should not split argument s1 between registers and stack.
+__attribute__ ((noinline))
+int f40_split(int i, int i2, int i3, int i4, int i5, int i6, int i7,
+ s40_no_align s1, s40_no_align s2) {
+// CHECK: define i32 @f40_split(i32 %i, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, [1 x i32], [2 x i64] %s1.coerce, [2 x i64] %s2.coerce)
+ return s1.i + s2.i + i + i2 + i3 + i4 + i5 + i6 + i7 + s1.s + s2.s;
+}
+int caller40_split() {
+// CHECK: define i32 @caller40_split()
+// CHECK: call i32 @f40_split(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, [1 x i32] undef, [2 x i64] %{{.*}} [2 x i64] %{{.*}})
+ return f40_split(1, 2, 3, 4, 5, 6, 7, g40, g40_2);
+}
+
+__attribute__ ((noinline))
+int f41_split(int i, int i2, int i3, int i4, int i5, int i6, int i7,
+ s41_with_align s1, s41_with_align s2) {
+// CHECK: define i32 @f41_split(i32 %i, i32 %i2, i32 %i3, i32 %i4, i32 %i5, i32 %i6, i32 %i7, [1 x i32], i128 %s1.coerce, i128 %s2.coerce)
+ return s1.i + s2.i + i + i2 + i3 + i4 + i5 + i6 + i7 + s1.s + s2.s;
+}
+int caller41_split() {
+// CHECK: define i32 @caller41_split()
+// CHECK: call i32 @f41_split(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, [1 x i32] undef, i128 %{{.*}}, i128 %{{.*}})
+ return f41_split(1, 2, 3, 4, 5, 6, 7, g41, g41_2);
+}
+
+// Handle homogeneous aggregates properly in variadic functions.
+struct HFA {
+ float a, b, c, d;
+};
+
+float test_hfa(int n, ...) {
+// CHECK-LABEL: define float @test_hfa(i32 %n, ...)
+// CHECK: [[THELIST:%.*]] = alloca i8*
+// CHECK: [[CURLIST:%.*]] = load i8** [[THELIST]]
+
+ // HFA is not indirect, so occupies its full 16 bytes on the stack.
+// CHECK: [[NEXTLIST:%.*]] = getelementptr i8* [[CURLIST]], i32 16
+// CHECK: store i8* [[NEXTLIST]], i8** [[THELIST]]
+
+// CHECK: bitcast i8* [[CURLIST]] to %struct.HFA*
+ __builtin_va_list thelist;
+ __builtin_va_start(thelist, n);
+ struct HFA h = __builtin_va_arg(thelist, struct HFA);
+ return h.d;
+}
+
+float test_hfa_call(struct HFA *a) {
+// CHECK-LABEL: define float @test_hfa_call(%struct.HFA* %a)
+// CHECK: call float (i32, ...)* @test_hfa(i32 1, [2 x double] {{.*}})
+ test_hfa(1, *a);
+}
+
+struct TooBigHFA {
+ float a, b, c, d, e;
+};
+
+float test_toobig_hfa(int n, ...) {
+// CHECK-LABEL: define float @test_toobig_hfa(i32 %n, ...)
+// CHECK: [[THELIST:%.*]] = alloca i8*
+// CHECK: [[CURLIST:%.*]] = load i8** [[THELIST]]
+
+ // TooBigHFA is not actually an HFA, so gets passed indirectly. Only 8 bytes
+ // of stack consumed.
+// CHECK: [[NEXTLIST:%.*]] = getelementptr i8* [[CURLIST]], i32 8
+// CHECK: store i8* [[NEXTLIST]], i8** [[THELIST]]
+
+// CHECK: [[HFAPTRPTR:%.*]] = bitcast i8* [[CURLIST]] to i8**
+// CHECK: [[HFAPTR:%.*]] = load i8** [[HFAPTRPTR]]
+// CHECK: bitcast i8* [[HFAPTR]] to %struct.TooBigHFA*
+ __builtin_va_list thelist;
+ __builtin_va_start(thelist, n);
+ struct TooBigHFA h = __builtin_va_arg(thelist, struct TooBigHFA);
+ return h.d;
+}
+
+struct HVA {
+ int32x4_t a, b;
+};
+
+int32x4_t test_hva(int n, ...) {
+// CHECK-LABEL: define <4 x i32> @test_hva(i32 %n, ...)
+// CHECK: [[THELIST:%.*]] = alloca i8*
+// CHECK: [[CURLIST:%.*]] = load i8** [[THELIST]]
+
+ // HVA is not indirect, so occupies its full 16 bytes on the stack. but it
+ // must be properly aligned.
+// CHECK: [[ALIGN0:%.*]] = getelementptr i8* [[CURLIST]], i32 15
+// CHECK: [[ALIGN1:%.*]] = ptrtoint i8* [[ALIGN0]] to i64
+// CHECK: [[ALIGN2:%.*]] = and i64 [[ALIGN1]], -16
+// CHECK: [[ALIGNED_LIST:%.*]] = inttoptr i64 [[ALIGN2]] to i8*
+
+// CHECK: [[NEXTLIST:%.*]] = getelementptr i8* [[ALIGNED_LIST]], i32 32
+// CHECK: store i8* [[NEXTLIST]], i8** [[THELIST]]
+
+// CHECK: bitcast i8* [[ALIGNED_LIST]] to %struct.HVA*
+ __builtin_va_list thelist;
+ __builtin_va_start(thelist, n);
+ struct HVA h = __builtin_va_arg(thelist, struct HVA);
+ return h.b;
+}
+
+struct TooBigHVA {
+ int32x4_t a, b, c, d, e;
+};
+
+int32x4_t test_toobig_hva(int n, ...) {
+// CHECK-LABEL: define <4 x i32> @test_toobig_hva(i32 %n, ...)
+// CHECK: [[THELIST:%.*]] = alloca i8*
+// CHECK: [[CURLIST:%.*]] = load i8** [[THELIST]]
+
+ // TooBigHVA is not actually an HVA, so gets passed indirectly. Only 8 bytes
+ // of stack consumed.
+// CHECK: [[NEXTLIST:%.*]] = getelementptr i8* [[CURLIST]], i32 8
+// CHECK: store i8* [[NEXTLIST]], i8** [[THELIST]]
+
+// CHECK: [[HVAPTRPTR:%.*]] = bitcast i8* [[CURLIST]] to i8**
+// CHECK: [[HVAPTR:%.*]] = load i8** [[HVAPTRPTR]]
+// CHECK: bitcast i8* [[HVAPTR]] to %struct.TooBigHVA*
+ __builtin_va_list thelist;
+ __builtin_va_start(thelist, n);
+ struct TooBigHVA h = __builtin_va_arg(thelist, struct TooBigHVA);
+ return h.d;
+}
diff --git a/test/CodeGen/arm64-be-bitfield.c b/test/CodeGen/arm64-be-bitfield.c
new file mode 100644
index 000000000000..f563596bdda3
--- /dev/null
+++ b/test/CodeGen/arm64-be-bitfield.c
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -triple arm64_be-linux-gnu -ffreestanding -emit-llvm -O0 -o - %s | FileCheck %s
+
+struct bt3 { signed b2:10; signed b3:10; } b16;
+
+// The correct right-shift amount is 40 bits for big endian.
+signed callee_b0f(struct bt3 bp11) {
+// CHECK: = lshr i64 %{{.*}}, 40
+ return bp11.b2;
+}
diff --git a/test/CodeGen/arm64-be-hfa-vararg.c b/test/CodeGen/arm64-be-hfa-vararg.c
new file mode 100644
index 000000000000..c9d650794d6e
--- /dev/null
+++ b/test/CodeGen/arm64-be-hfa-vararg.c
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -triple arm64_be-linux-gnu -ffreestanding -emit-llvm -O0 -o - %s | FileCheck %s
+
+#include <stdarg.h>
+
+// A single member HFA must be aligned just like a non-HFA register argument.
+double callee(int a, ...) {
+// CHECK: = add i64 %{{.*}}, 8
+ va_list vl;
+ va_start(vl, a);
+ double result = va_arg(vl, struct { double a; }).a;
+ va_end(vl);
+ return result;
+}
diff --git a/test/CodeGen/arm64-crc32.c b/test/CodeGen/arm64-crc32.c
new file mode 100644
index 000000000000..37ced18d7621
--- /dev/null
+++ b/test/CodeGen/arm64-crc32.c
@@ -0,0 +1,55 @@
+// REQUIRES: aarch64-registered-target
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu \
+// RUN: -O3 -S -emit-llvm -o - %s | FileCheck %s
+
+int crc32b(int a, char b)
+{
+ return __builtin_arm_crc32b(a,b);
+// CHECK: [[T0:%[0-9]+]] = zext i8 %b to i32
+// CHECK: call i32 @llvm.aarch64.crc32b(i32 %a, i32 [[T0]])
+}
+
+int crc32cb(int a, char b)
+{
+ return __builtin_arm_crc32cb(a,b);
+// CHECK: [[T0:%[0-9]+]] = zext i8 %b to i32
+// CHECK: call i32 @llvm.aarch64.crc32cb(i32 %a, i32 [[T0]])
+}
+
+int crc32h(int a, short b)
+{
+ return __builtin_arm_crc32h(a,b);
+// CHECK: [[T0:%[0-9]+]] = zext i16 %b to i32
+// CHECK: call i32 @llvm.aarch64.crc32h(i32 %a, i32 [[T0]])
+}
+
+int crc32ch(int a, short b)
+{
+ return __builtin_arm_crc32ch(a,b);
+// CHECK: [[T0:%[0-9]+]] = zext i16 %b to i32
+// CHECK: call i32 @llvm.aarch64.crc32ch(i32 %a, i32 [[T0]])
+}
+
+int crc32w(int a, int b)
+{
+ return __builtin_arm_crc32w(a,b);
+// CHECK: call i32 @llvm.aarch64.crc32w(i32 %a, i32 %b)
+}
+
+int crc32cw(int a, int b)
+{
+ return __builtin_arm_crc32cw(a,b);
+// CHECK: call i32 @llvm.aarch64.crc32cw(i32 %a, i32 %b)
+}
+
+int crc32d(int a, long b)
+{
+ return __builtin_arm_crc32d(a,b);
+// CHECK: call i32 @llvm.aarch64.crc32x(i32 %a, i64 %b)
+}
+
+int crc32cd(int a, long b)
+{
+ return __builtin_arm_crc32cd(a,b);
+// CHECK: call i32 @llvm.aarch64.crc32cx(i32 %a, i64 %b)
+}
diff --git a/test/CodeGen/arm64-lanes.c b/test/CodeGen/arm64-lanes.c
new file mode 100644
index 000000000000..8ab2bd4c6690
--- /dev/null
+++ b/test/CodeGen/arm64-lanes.c
@@ -0,0 +1,74 @@
+// RUN: %clang_cc1 -O3 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -O3 -triple arm64_be-linux-gnu -target-feature +neon -ffreestanding -emit-llvm -o - %s | FileCheck %s --check-prefix CHECK-BE
+
+#include <arm_neon.h>
+
+// CHECK-LABEL: @test_vdupb_lane_s8
+int8_t test_vdupb_lane_s8(int8x8_t src) {
+ return vdupb_lane_s8(src, 2);
+ // CHECK: extractelement <8 x i8> %src, i32 2
+ // CHECK-BE: extractelement <8 x i8> %src, i32 5
+}
+
+// CHECK-LABEL: @test_vdupb_lane_u8
+uint8_t test_vdupb_lane_u8(uint8x8_t src) {
+ return vdupb_lane_u8(src, 2);
+ // CHECK: extractelement <8 x i8> %src, i32 2
+ // CHECK-BE: extractelement <8 x i8> %src, i32 5
+}
+
+// CHECK-LABEL: @test_vduph_lane_s16
+int16_t test_vduph_lane_s16(int16x4_t src) {
+ return vduph_lane_s16(src, 2);
+ // CHECK: extractelement <4 x i16> %src, i32 2
+ // CHECK-BE: extractelement <4 x i16> %src, i32 1
+}
+
+// CHECK-LABEL: @test_vduph_lane_u16
+uint16_t test_vduph_lane_u16(uint16x4_t src) {
+ return vduph_lane_u16(src, 2);
+ // CHECK: extractelement <4 x i16> %src, i32 2
+ // CHECK-BE: extractelement <4 x i16> %src, i32 1
+}
+
+// CHECK-LABEL: @test_vdups_lane_s32
+int32_t test_vdups_lane_s32(int32x2_t src) {
+ return vdups_lane_s32(src, 0);
+ // CHECK: extractelement <2 x i32> %src, i32 0
+ // CHECK-BE: extractelement <2 x i32> %src, i32 1
+}
+
+// CHECK-LABEL: @test_vdups_lane_u32
+uint32_t test_vdups_lane_u32(uint32x2_t src) {
+ return vdups_lane_u32(src, 0);
+ // CHECK: extractelement <2 x i32> %src, i32 0
+ // CHECK-BE: extractelement <2 x i32> %src, i32 1
+}
+
+// CHECK-LABEL: @test_vdups_lane_f32
+float32_t test_vdups_lane_f32(float32x2_t src) {
+ return vdups_lane_f32(src, 0);
+ // CHECK: extractelement <2 x float> %src, i32 0
+ // CHECK-BE: extractelement <2 x float> %src, i32 1
+}
+
+// CHECK-LABEL: @test_vdupd_lane_s64
+int64_t test_vdupd_lane_s64(int64x1_t src) {
+ return vdupd_lane_s64(src, 0);
+ // CHECK: extractelement <1 x i64> %src, i32 0
+ // CHECK-BE: extractelement <1 x i64> %src, i32 0
+}
+
+// CHECK-LABEL: @test_vdupd_lane_u64
+uint64_t test_vdupd_lane_u64(uint64x1_t src) {
+ return vdupd_lane_u64(src, 0);
+ // CHECK: extractelement <1 x i64> %src, i32 0
+ // CHECK-BE: extractelement <1 x i64> %src, i32 0
+}
+
+// CHECK-LABEL: @test_vdupd_lane_f64
+float64_t test_vdupd_lane_f64(float64x1_t src) {
+ return vdupd_lane_f64(src, 0);
+ // CHECK: extractelement <1 x double> %src, i32 0
+ // CHECK-BE: extractelement <1 x double> %src, i32 0
+}
diff --git a/test/CodeGen/arm64-scalar-test.c b/test/CodeGen/arm64-scalar-test.c
new file mode 100644
index 000000000000..e2328b18ed01
--- /dev/null
+++ b/test/CodeGen/arm64-scalar-test.c
@@ -0,0 +1,547 @@
+// REQUIRES: aarch64-registered-target
+// RUN: %clang_cc1 -triple arm64-apple-ios7.0 -target-feature +neon \
+// RUN: -S -O1 -o - -ffreestanding %s | FileCheck %s
+
+// We're explicitly using arm_neon.h here: some types probably don't match
+// the ACLE definitions, but we want to check current codegen.
+#include <arm_neon.h>
+
+float test_vrsqrtss_f32(float a, float b) {
+// CHECK: test_vrsqrtss_f32
+ return vrsqrtss_f32(a, b);
+// CHECK: frsqrts {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
+}
+
+double test_vrsqrtsd_f64(double a, double b) {
+// CHECK: test_vrsqrtsd_f64
+ return vrsqrtsd_f64(a, b);
+// CHECK: frsqrts {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+}
+
+int64x1_t test_vrshl_s64(int64x1_t a, int64x1_t b) {
+// CHECK: test_vrshl_s64
+ return vrshl_s64(a, b);
+// CHECK: srshl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+}
+
+uint64x1_t test_vrshl_u64(uint64x1_t a, int64x1_t b) {
+// CHECK: test_vrshl_u64
+ return vrshl_u64(a, b);
+// CHECK: urshl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vrshld_s64
+int64_t test_vrshld_s64(int64_t a, int64_t b) {
+ return vrshld_s64(a, b);
+// CHECK: srshl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vrshld_u64
+uint64_t test_vrshld_u64(uint64_t a, uint64_t b) {
+ return vrshld_u64(a, b);
+// CHECK: urshl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vqrshlb_s8
+int8_t test_vqrshlb_s8(int8_t a, int8_t b) {
+ return vqrshlb_s8(a, b);
+// CHECK: sqrshl.8b {{v[0-9]+}}, {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqrshlh_s16
+int16_t test_vqrshlh_s16(int16_t a, int16_t b) {
+ return vqrshlh_s16(a, b);
+// CHECK: sqrshl.4h {{v[0-9]+}}, {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqrshls_s32
+int32_t test_vqrshls_s32(int32_t a, int32_t b) {
+ return vqrshls_s32(a, b);
+// CHECK: sqrshl {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
+}
+
+// CHECK: test_vqrshld_s64
+int64_t test_vqrshld_s64(int64_t a, int64_t b) {
+ return vqrshld_s64(a, b);
+// CHECK: sqrshl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vqrshlb_u8
+uint8_t test_vqrshlb_u8(uint8_t a, uint8_t b) {
+ return vqrshlb_u8(a, b);
+// CHECK: uqrshl.8b {{v[0-9]+}}, {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqrshlh_u16
+uint16_t test_vqrshlh_u16(uint16_t a, uint16_t b) {
+ return vqrshlh_u16(a, b);
+// CHECK: uqrshl.4h {{v[0-9]+}}, {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqrshls_u32
+uint32_t test_vqrshls_u32(uint32_t a, uint32_t b) {
+ return vqrshls_u32(a, b);
+// CHECK: uqrshl {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
+}
+
+// CHECK: test_vqrshld_u64
+uint64_t test_vqrshld_u64(uint64_t a, uint64_t b) {
+ return vqrshld_u64(a, b);
+// CHECK: uqrshl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vqshlb_s8
+int8_t test_vqshlb_s8(int8_t a, int8_t b) {
+ return vqshlb_s8(a, b);
+// CHECK: sqshl.8b {{v[0-9]+}}, {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqshlh_s16
+int16_t test_vqshlh_s16(int16_t a, int16_t b) {
+ return vqshlh_s16(a, b);
+// CHECK: sqshl.4h {{v[0-9]+}}, {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqshls_s32
+int32_t test_vqshls_s32(int32_t a, int32_t b) {
+ return vqshls_s32(a, b);
+// CHECK: sqshl {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
+}
+
+// CHECK: test_vqshld_s64
+int64_t test_vqshld_s64(int64_t a, int64_t b) {
+ return vqshld_s64(a, b);
+// CHECK: sqshl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vqshld_s64_i
+int64_t test_vqshld_s64_i(int64_t a) {
+ return vqshld_s64(a, 36);
+// CHECK: sqshl {{d[0-9]+}}, {{d[0-9]+}}, #36
+}
+
+// CHECK: test_vqshlb_u8
+uint8_t test_vqshlb_u8(uint8_t a, uint8_t b) {
+ return vqshlb_u8(a, b);
+// CHECK: uqshl.8b {{v[0-9]+}}, {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqshlh_u16
+uint16_t test_vqshlh_u16(uint16_t a, uint16_t b) {
+ return vqshlh_u16(a, b);
+// CHECK: uqshl.4h {{v[0-9]+}}, {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqshls_u32
+uint32_t test_vqshls_u32(uint32_t a, uint32_t b) {
+ return vqshls_u32(a, b);
+// CHECK: uqshl {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
+}
+
+// CHECK: test_vqshld_u64
+uint64_t test_vqshld_u64(uint64_t a, uint64_t b) {
+ return vqshld_u64(a, b);
+// CHECK: uqshl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vqshld_u64_i
+uint64_t test_vqshld_u64_i(uint64_t a) {
+ return vqshld_u64(a, 36);
+// CHECK: uqshl {{d[0-9]+}}, {{d[0-9]+}}, #36
+}
+
+// CHECK: test_vshld_u64
+uint64_t test_vshld_u64(uint64_t a, uint64_t b) {
+ return vshld_u64(a, b);
+// CHECK: ushl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vshld_s64
+int64_t test_vshld_s64(int64_t a, int64_t b) {
+ return vshld_s64(a, b);
+// CHECK: sshl {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vqdmullh_s16
+int32_t test_vqdmullh_s16(int16_t a, int16_t b) {
+ return vqdmullh_s16(a, b);
+// CHECK: sqdmull.4s {{v[0-9]+}}, {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqdmulls_s32
+int64_t test_vqdmulls_s32(int32_t a, int32_t b) {
+ return vqdmulls_s32(a, b);
+// CHECK: sqdmull {{d[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
+}
+
+// CHECK: test_vqaddb_s8
+int8_t test_vqaddb_s8(int8_t a, int8_t b) {
+ return vqaddb_s8(a, b);
+// CHECK: sqadd.8b {{v[0-9]+}}, {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqaddh_s16
+int16_t test_vqaddh_s16(int16_t a, int16_t b) {
+ return vqaddh_s16(a, b);
+// CHECK: sqadd.4h {{v[0-9]+}}, {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqadds_s32
+int32_t test_vqadds_s32(int32_t a, int32_t b) {
+ return vqadds_s32(a, b);
+// CHECK: sqadd {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
+}
+
+// CHECK: test_vqaddd_s64
+int64_t test_vqaddd_s64(int64_t a, int64_t b) {
+ return vqaddd_s64(a, b);
+// CHECK: sqadd {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vqaddb_u8
+uint8_t test_vqaddb_u8(uint8_t a, uint8_t b) {
+ return vqaddb_u8(a, b);
+// CHECK: uqadd.8b {{v[0-9]+}}, {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqaddh_u16
+uint16_t test_vqaddh_u16(uint16_t a, uint16_t b) {
+ return vqaddh_u16(a, b);
+// CHECK: uqadd.4h {{v[0-9]+}}, {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqadds_u32
+uint32_t test_vqadds_u32(uint32_t a, uint32_t b) {
+ return vqadds_u32(a, b);
+// CHECK: uqadd {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
+}
+
+// CHECK: test_vqaddd_u64
+uint64_t test_vqaddd_u64(uint64_t a, uint64_t b) {
+ return vqaddd_u64(a, b);
+// CHECK: uqadd {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vqsubb_s8
+int8_t test_vqsubb_s8(int8_t a, int8_t b) {
+ return vqsubb_s8(a, b);
+// CHECK: sqsub.8b {{v[0-9]+}}, {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqsubh_s16
+int16_t test_vqsubh_s16(int16_t a, int16_t b) {
+ return vqsubh_s16(a, b);
+// CHECK: sqsub.4h {{v[0-9]+}}, {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqsubs_s32
+int32_t test_vqsubs_s32(int32_t a, int32_t b) {
+ return vqsubs_s32(a, b);
+// CHECK: sqsub {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
+}
+
+// CHECK: test_vqsubd_s64
+int64_t test_vqsubd_s64(int64_t a, int64_t b) {
+ return vqsubd_s64(a, b);
+// CHECK: sqsub {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vqsubb_u8
+uint8_t test_vqsubb_u8(uint8_t a, uint8_t b) {
+ return vqsubb_u8(a, b);
+// CHECK: uqsub.8b {{v[0-9]+}}, {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqsubh_u16
+uint16_t test_vqsubh_u16(uint16_t a, uint16_t b) {
+ return vqsubh_u16(a, b);
+// CHECK: uqsub.4h {{v[0-9]+}}, {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqsubs_u32
+uint32_t test_vqsubs_u32(uint32_t a, uint32_t b) {
+ return vqsubs_u32(a, b);
+// CHECK: uqsub {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
+}
+
+// CHECK: test_vqsubd_u64
+uint64_t test_vqsubd_u64(uint64_t a, uint64_t b) {
+ return vqsubd_u64(a, b);
+// CHECK: uqsub {{d[0-9]+}}, {{d[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vqmovnh_s16
+int8_t test_vqmovnh_s16(int16_t a) {
+ return vqmovnh_s16(a);
+// CHECK: sqxtn.8b {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqmovnh_u16
+uint8_t test_vqmovnh_u16(uint16_t a) {
+ return vqmovnh_u16(a);
+// CHECK: uqxtn.8b {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqmovns_s32
+int16_t test_vqmovns_s32(int32_t a) {
+ return vqmovns_s32(a);
+// CHECK: sqxtn.4h {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqmovns_u32
+uint16_t test_vqmovns_u32(uint32_t a) {
+ return vqmovns_u32(a);
+// CHECK: uqxtn.4h {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqmovnd_s64
+int32_t test_vqmovnd_s64(int64_t a) {
+ return vqmovnd_s64(a);
+// CHECK: sqxtn {{s[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vqmovnd_u64
+uint32_t test_vqmovnd_u64(uint64_t a) {
+ return vqmovnd_u64(a);
+// CHECK: uqxtn {{s[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vqmovunh_s16
+int8_t test_vqmovunh_s16(int16_t a) {
+ return vqmovunh_s16(a);
+// CHECK: sqxtun.8b {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqmovuns_s32
+int16_t test_vqmovuns_s32(int32_t a) {
+ return vqmovuns_s32(a);
+// CHECK: sqxtun.4h {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqmovund_s64
+int32_t test_vqmovund_s64(int64_t a) {
+ return vqmovund_s64(a);
+// CHECK: sqxtun {{s[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vqabsb_s8
+int8_t test_vqabsb_s8(int8_t a) {
+ return vqabsb_s8(a);
+// CHECK: sqabs.8b {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqabsh_s16
+int16_t test_vqabsh_s16(int16_t a) {
+ return vqabsh_s16(a);
+// CHECK: sqabs.4h {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqabss_s32
+int32_t test_vqabss_s32(int32_t a) {
+ return vqabss_s32(a);
+// CHECK: sqabs {{s[0-9]+}}, {{s[0-9]+}}
+}
+
+// CHECK: test_vqabsd_s64
+int64_t test_vqabsd_s64(int64_t a) {
+ return vqabsd_s64(a);
+// CHECK: sqabs {{d[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vqnegb_s8
+int8_t test_vqnegb_s8(int8_t a) {
+ return vqnegb_s8(a);
+// CHECK: sqneg.8b {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqnegh_s16
+int16_t test_vqnegh_s16(int16_t a) {
+ return vqnegh_s16(a);
+// CHECK: sqneg.4h {{v[0-9]+}}, {{v[0-9]+}}
+}
+
+// CHECK: test_vqnegs_s32
+int32_t test_vqnegs_s32(int32_t a) {
+ return vqnegs_s32(a);
+// CHECK: sqneg {{s[0-9]+}}, {{s[0-9]+}}
+}
+
+// CHECK: test_vqnegd_s64
+int64_t test_vqnegd_s64(int64_t a) {
+ return vqnegd_s64(a);
+// CHECK: sqneg {{d[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vcvts_n_f32_s32
+float32_t test_vcvts_n_f32_s32(int32_t a) {
+ return vcvts_n_f32_s32(a, 3);
+// CHECK: scvtf {{s[0-9]+}}, {{s[0-9]+}}, #3
+}
+
+// CHECK: test_vcvts_n_f32_u32
+float32_t test_vcvts_n_f32_u32(uint32_t a) {
+ return vcvts_n_f32_u32(a, 3);
+// CHECK: ucvtf {{s[0-9]+}}, {{s[0-9]+}}, #3
+}
+
+// CHECK: test_vcvtd_n_f64_s64
+float64_t test_vcvtd_n_f64_s64(int64_t a) {
+ return vcvtd_n_f64_s64(a, 3);
+// CHECK: scvtf {{d[0-9]+}}, {{d[0-9]+}}, #3
+}
+
+// CHECK: test_vcvtd_n_f64_u64
+float64_t test_vcvtd_n_f64_u64(uint64_t a) {
+ return vcvtd_n_f64_u64(a, 3);
+// CHECK: ucvtf {{d[0-9]+}}, {{d[0-9]+}}, #3
+}
+
+// CHECK: test_vcvts_n_s32_f32
+int32_t test_vcvts_n_s32_f32(float32_t a) {
+ return vcvts_n_s32_f32(a, 3);
+// CHECK: fcvtzs {{s[0-9]+}}, {{s[0-9]+}}, #3
+}
+
+// CHECK: test_vcvts_n_u32_f32
+uint32_t test_vcvts_n_u32_f32(float32_t a) {
+ return vcvts_n_u32_f32(a, 3);
+// CHECK: fcvtzu {{s[0-9]+}}, {{s[0-9]+}}, #3
+}
+
+// CHECK: test_vcvtd_n_s64_f64
+int64_t test_vcvtd_n_s64_f64(float64_t a) {
+ return vcvtd_n_s64_f64(a, 3);
+// CHECK: fcvtzs {{d[0-9]+}}, {{d[0-9]+}}, #3
+}
+
+// CHECK: test_vcvtd_n_u64_f64
+uint64_t test_vcvtd_n_u64_f64(float64_t a) {
+ return vcvtd_n_u64_f64(a, 3);
+// CHECK: fcvtzu {{d[0-9]+}}, {{d[0-9]+}}, #3
+}
+
+// CHECK: test_vcvtas_s32_f32
+int32_t test_vcvtas_s32_f32(float32_t a) {
+ return vcvtas_s32_f32(a);
+// CHECK: fcvtas {{w[0-9]+}}, {{s[0-9]+}}
+}
+
+// CHECK: test_vcvtas_u32_f32
+uint32_t test_vcvtas_u32_f32(float32_t a) {
+ return vcvtas_u32_f32(a);
+// CHECK: fcvtau {{w[0-9]+}}, {{s[0-9]+}}
+}
+
+// CHECK: test_vcvtad_s64_f64
+int64_t test_vcvtad_s64_f64(float64_t a) {
+ return vcvtad_s64_f64(a);
+// CHECK: fcvtas {{x[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vcvtad_u64_f64
+uint64_t test_vcvtad_u64_f64(float64_t a) {
+ return vcvtad_u64_f64(a);
+// CHECK: fcvtau {{x[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vcvtms_s32_f32
+int32_t test_vcvtms_s32_f32(float32_t a) {
+ return vcvtms_s32_f32(a);
+// CHECK: fcvtms {{w[0-9]+}}, {{s[0-9]+}}
+}
+
+// CHECK: test_vcvtms_u32_f32
+uint32_t test_vcvtms_u32_f32(float32_t a) {
+ return vcvtms_u32_f32(a);
+// CHECK: fcvtmu {{w[0-9]+}}, {{s[0-9]+}}
+}
+
+// CHECK: test_vcvtmd_s64_f64
+int64_t test_vcvtmd_s64_f64(float64_t a) {
+ return vcvtmd_s64_f64(a);
+// CHECK: fcvtms {{x[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vcvtmd_u64_f64
+uint64_t test_vcvtmd_u64_f64(float64_t a) {
+ return vcvtmd_u64_f64(a);
+// CHECK: fcvtmu {{x[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vcvtns_s32_f32
+int32_t test_vcvtns_s32_f32(float32_t a) {
+ return vcvtns_s32_f32(a);
+// CHECK: fcvtns {{w[0-9]+}}, {{s[0-9]+}}
+}
+
+// CHECK: test_vcvtns_u32_f32
+uint32_t test_vcvtns_u32_f32(float32_t a) {
+ return vcvtns_u32_f32(a);
+// CHECK: fcvtnu {{w[0-9]+}}, {{s[0-9]+}}
+}
+
+// CHECK: test_vcvtnd_s64_f64
+int64_t test_vcvtnd_s64_f64(float64_t a) {
+ return vcvtnd_s64_f64(a);
+// CHECK: fcvtns {{x[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vcvtnd_u64_f64
+uint64_t test_vcvtnd_u64_f64(float64_t a) {
+ return vcvtnd_u64_f64(a);
+// CHECK: fcvtnu {{x[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vcvtps_s32_f32
+int32_t test_vcvtps_s32_f32(float32_t a) {
+ return vcvtps_s32_f32(a);
+// CHECK: fcvtps {{w[0-9]+}}, {{s[0-9]+}}
+}
+
+// CHECK: test_vcvtps_u32_f32
+uint32_t test_vcvtps_u32_f32(float32_t a) {
+ return vcvtps_u32_f32(a);
+// CHECK: fcvtpu {{w[0-9]+}}, {{s[0-9]+}}
+}
+
+// CHECK: test_vcvtpd_s64_f64
+int64_t test_vcvtpd_s64_f64(float64_t a) {
+ return vcvtpd_s64_f64(a);
+// CHECK: fcvtps {{x[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vcvtpd_u64_f64
+uint64_t test_vcvtpd_u64_f64(float64_t a) {
+ return vcvtpd_u64_f64(a);
+// CHECK: fcvtpu {{x[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vcvtxd_f32_f64
+float32_t test_vcvtxd_f32_f64(float64_t a) {
+ return vcvtxd_f32_f64(a);
+// CHECK: fcvtxn {{s[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vabds_f32
+float32_t test_vabds_f32(float32_t a, float32_t b) {
+ return vabds_f32(a, b);
+ // CHECK: fabd {{s[0-9]+}}, {{s[0-9]+}}
+}
+
+// CHECK: test_vabdd_f64
+float64_t test_vabdd_f64(float64_t a, float64_t b) {
+ return vabdd_f64(a, b);
+ // CHECK: fabd {{d[0-9]+}}, {{d[0-9]+}}
+}
+
+// CHECK: test_vmulxs_f32
+float32_t test_vmulxs_f32(float32_t a, float32_t b) {
+ return vmulxs_f32(a, b);
+ // CHECK: fmulx {{s[0-9]+}}, {{s[0-9]+}}
+}
+
+// CHECK: test_vmulxd_f64
+float64_t test_vmulxd_f64(float64_t a, float64_t b) {
+ return vmulxd_f64(a, b);
+ // CHECK: fmulx {{d[0-9]+}}, {{d[0-9]+}}
+}
diff --git a/test/CodeGen/arm64-vrnd.c b/test/CodeGen/arm64-vrnd.c
new file mode 100644
index 000000000000..2c1bb8f46a10
--- /dev/null
+++ b/test/CodeGen/arm64-vrnd.c
@@ -0,0 +1,51 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -emit-llvm -o - %s | FileCheck %s
+
+#include <arm_neon.h>
+
+int32x2_t rnd1(float32x2_t a) { return vrnd_f32(a); }
+// CHECK: call <2 x float> @llvm.trunc.v2f32(<2 x float>
+int32x4_t rnd3(float32x4_t a) { return vrndq_f32(a); }
+// CHECK: call <4 x float> @llvm.trunc.v4f32(<4 x float>
+int64x2_t rnd5(float64x2_t a) { return vrndq_f64(a); }
+// CHECK: call <2 x double> @llvm.trunc.v2f64(<2 x double>
+
+
+int32x2_t rnd7(float32x2_t a) { return vrndn_f32(a); }
+// CHECK: call <2 x float> @llvm.aarch64.neon.frintn.v2f32(<2 x float>
+int32x4_t rnd8(float32x4_t a) { return vrndnq_f32(a); }
+// CHECK: call <4 x float> @llvm.aarch64.neon.frintn.v4f32(<4 x float>
+int64x2_t rnd9(float64x2_t a) { return vrndnq_f64(a); }
+// CHECK: call <2 x double> @llvm.aarch64.neon.frintn.v2f64(<2 x double>
+int64x2_t rnd10(float64x2_t a) { return vrndnq_f64(a); }
+// CHECK: call <2 x double> @llvm.aarch64.neon.frintn.v2f64(<2 x double>
+
+int32x2_t rnd11(float32x2_t a) { return vrndm_f32(a); }
+// CHECK: call <2 x float> @llvm.floor.v2f32(<2 x float>
+int32x4_t rnd12(float32x4_t a) { return vrndmq_f32(a); }
+// CHECK: call <4 x float> @llvm.floor.v4f32(<4 x float>
+int64x2_t rnd13(float64x2_t a) { return vrndmq_f64(a); }
+// CHECK: call <2 x double> @llvm.floor.v2f64(<2 x double>
+int64x2_t rnd14(float64x2_t a) { return vrndmq_f64(a); }
+// CHECK: call <2 x double> @llvm.floor.v2f64(<2 x double>
+
+int32x2_t rnd15(float32x2_t a) { return vrndp_f32(a); }
+// CHECK: call <2 x float> @llvm.ceil.v2f32(<2 x float>
+int32x4_t rnd16(float32x4_t a) { return vrndpq_f32(a); }
+// CHECK: call <4 x float> @llvm.ceil.v4f32(<4 x float>
+int64x2_t rnd18(float64x2_t a) { return vrndpq_f64(a); }
+// CHECK: call <2 x double> @llvm.ceil.v2f64(<2 x double>
+
+int32x2_t rnd19(float32x2_t a) { return vrnda_f32(a); }
+// CHECK: call <2 x float> @llvm.round.v2f32(<2 x float>
+int32x4_t rnd20(float32x4_t a) { return vrndaq_f32(a); }
+// CHECK: call <4 x float> @llvm.round.v4f32(<4 x float>
+int64x2_t rnd22(float64x2_t a) { return vrndaq_f64(a); }
+// CHECK: call <2 x double> @llvm.round.v2f64(<2 x double>
+
+int32x2_t rnd23(float32x2_t a) { return vrndx_f32(a); }
+// CHECK: call <2 x float> @llvm.rint.v2f32(<2 x float>
+int32x4_t rnd24(float32x4_t a) { return vrndxq_f32(a); }
+// CHECK: call <4 x float> @llvm.rint.v4f32(<4 x float>
+int64x2_t rnd25(float64x2_t a) { return vrndxq_f64(a); }
+// CHECK: call <2 x double> @llvm.rint.v2f64(<2 x double>
+
diff --git a/test/CodeGen/arm64-vrsqrt.c b/test/CodeGen/arm64-vrsqrt.c
new file mode 100644
index 000000000000..821c23cbf04b
--- /dev/null
+++ b/test/CodeGen/arm64-vrsqrt.c
@@ -0,0 +1,43 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios7.0 -target-feature +neon -ffreestanding -emit-llvm -O1 -o - %s | FileCheck %s
+
+#include <arm_neon.h>
+
+uint32x2_t test_vrsqrte_u32(uint32x2_t in) {
+ // CHECK-LABEL: @test_vrsqrte_u32
+ // CHECK: call <2 x i32> @llvm.aarch64.neon.ursqrte.v2i32(<2 x i32> %in)
+ return vrsqrte_u32(in);
+}
+
+float32x2_t test_vrsqrte_f32(float32x2_t in) {
+ // CHECK-LABEL: @test_vrsqrte_f32
+ // CHECK: call <2 x float> @llvm.aarch64.neon.frsqrte.v2f32(<2 x float> %in)
+ return vrsqrte_f32(in);
+}
+
+
+uint32x4_t test_vrsqrteq_u32(uint32x4_t in) {
+ // CHECK-LABEL: @test_vrsqrteq_u32
+ // CHECK: call <4 x i32> @llvm.aarch64.neon.ursqrte.v4i32(<4 x i32> %in)
+ return vrsqrteq_u32(in);
+}
+
+float32x4_t test_vrsqrteq_f32(float32x4_t in) {
+ // CHECK-LABEL: @test_vrsqrteq_f32
+ // CHECK: call <4 x float> @llvm.aarch64.neon.frsqrte.v4f32(<4 x float> %in)
+ return vrsqrteq_f32(in);
+}
+
+
+float32x2_t test_vrsqrts_f32(float32x2_t est, float32x2_t val) {
+ // CHECK-LABEL: @test_vrsqrts_f32
+ // CHECK: call <2 x float> @llvm.aarch64.neon.frsqrts.v2f32(<2 x float> %est, <2 x float> %val)
+ return vrsqrts_f32(est, val);
+}
+
+
+float32x4_t test_vrsqrtsq_f32(float32x4_t est, float32x4_t val) {
+ // CHECK-LABEL: @test_vrsqrtsq_f32
+ // CHECK: call <4 x float> @llvm.aarch64.neon.frsqrts.v4f32(<4 x float> %est, <4 x float> %val)
+ return vrsqrtsq_f32(est, val);
+}
+
diff --git a/test/CodeGen/arm64_crypto.c b/test/CodeGen/arm64_crypto.c
new file mode 100644
index 000000000000..e63009a3109c
--- /dev/null
+++ b/test/CodeGen/arm64_crypto.c
@@ -0,0 +1,93 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios7.0 -target-feature +neon -target-feature +crypto -ffreestanding -Os -S -o - %s | FileCheck %s
+// REQUIRES: aarch64-registered-target
+
+#include <arm_neon.h>
+
+uint8x16_t test_aese(uint8x16_t data, uint8x16_t key) {
+ // CHECK-LABEL: test_aese:
+ // CHECK: aese.16b v0, v1
+ return vaeseq_u8(data, key);
+}
+
+uint8x16_t test_aesd(uint8x16_t data, uint8x16_t key) {
+ // CHECK-LABEL: test_aesd:
+ // CHECK: aesd.16b v0, v1
+ return vaesdq_u8(data, key);
+}
+
+uint8x16_t test_aesmc(uint8x16_t data, uint8x16_t key) {
+ // CHECK-LABEL: test_aesmc:
+ // CHECK: aesmc.16b v0, v0
+ return vaesmcq_u8(data);
+}
+
+uint8x16_t test_aesimc(uint8x16_t data, uint8x16_t key) {
+ // CHECK-LABEL: test_aesimc:
+ // CHECK: aesimc.16b v0, v0
+ return vaesimcq_u8(data);
+}
+
+uint32x4_t test_sha1c(uint32x4_t hash_abcd, uint32_t hash_e, uint32x4_t wk) {
+ // CHECK-LABEL: test_sha1c:
+ // CHECK: fmov [[HASH_E:s[0-9]+]], w0
+ // CHECK: sha1c.4s q0, [[HASH_E]], v1
+ return vsha1cq_u32(hash_abcd, hash_e, wk);
+}
+
+uint32x4_t test_sha1p(uint32x4_t hash_abcd, uint32_t hash_e, uint32x4_t wk) {
+ // CHECK-LABEL: test_sha1p:
+ // CHECK: fmov [[HASH_E:s[0-9]+]], w0
+ // CHECK: sha1p.4s q0, [[HASH_E]], v1
+ return vsha1pq_u32(hash_abcd, hash_e, wk);
+}
+
+uint32x4_t test_sha1m(uint32x4_t hash_abcd, uint32_t hash_e, uint32x4_t wk) {
+ // CHECK-LABEL: test_sha1m:
+ // CHECK: fmov [[HASH_E:s[0-9]+]], w0
+ // CHECK: sha1m.4s q0, [[HASH_E]], v1
+ return vsha1mq_u32(hash_abcd, hash_e, wk);
+}
+
+uint32_t test_sha1h(uint32_t hash_e) {
+ // CHECK-LABEL: test_sha1h:
+ // CHECK: fmov [[HASH_E:s[0-9]+]], w0
+ // CHECK: sha1h [[RES:s[0-9]+]], [[HASH_E]]
+ // CHECK: fmov w0, [[RES]]
+ return vsha1h_u32(hash_e);
+}
+
+uint32x4_t test_sha1su0(uint32x4_t wk0_3, uint32x4_t wk4_7, uint32x4_t wk8_11) {
+ // CHECK-LABEL: test_sha1su0:
+ // CHECK: sha1su0.4s v0, v1, v2
+ return vsha1su0q_u32(wk0_3, wk4_7, wk8_11);
+}
+
+uint32x4_t test_sha1su1(uint32x4_t wk0_3, uint32x4_t wk12_15) {
+ // CHECK-LABEL: test_sha1su1:
+ // CHECK: sha1su1.4s v0, v1
+ return vsha1su1q_u32(wk0_3, wk12_15);
+}
+
+uint32x4_t test_sha256h(uint32x4_t hash_abcd, uint32x4_t hash_efgh, uint32x4_t wk) {
+ // CHECK-LABEL: test_sha256h:
+ // CHECK: sha256h.4s q0, q1, v2
+ return vsha256hq_u32(hash_abcd, hash_efgh, wk);
+}
+
+uint32x4_t test_sha256h2(uint32x4_t hash_efgh, uint32x4_t hash_abcd, uint32x4_t wk) {
+ // CHECK-LABEL: test_sha256h2:
+ // CHECK: sha256h2.4s q0, q1, v2
+ return vsha256h2q_u32(hash_efgh, hash_abcd, wk);
+}
+
+uint32x4_t test_sha256su0(uint32x4_t w0_3, uint32x4_t w4_7) {
+ // CHECK-LABEL: test_sha256su0:
+ // CHECK: sha256su0.4s v0, v1
+ return vsha256su0q_u32(w0_3, w4_7);
+}
+
+uint32x4_t test_sha256su1(uint32x4_t w0_3, uint32x4_t w8_11, uint32x4_t w12_15) {
+ // CHECK-LABEL: test_sha256su1:
+ // CHECK: sha256su1.4s v0, v1, v2
+ return vsha256su1q_u32(w0_3, w8_11, w12_15);
+}
diff --git a/test/CodeGen/arm64_neon_high_half.c b/test/CodeGen/arm64_neon_high_half.c
new file mode 100644
index 000000000000..577a09e3a225
--- /dev/null
+++ b/test/CodeGen/arm64_neon_high_half.c
@@ -0,0 +1,559 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios7.0 -target-feature +neon -ffreestanding -Os -S -o - %s | FileCheck %s
+// REQUIRES: aarch64-registered-target
+
+#include <arm_neon.h>
+
+int16x8_t test_vaddw_high_s8(int16x8_t lhs, int8x16_t rhs) {
+ // CHECK: saddw2.8h
+ return vaddw_high_s8(lhs, rhs);
+}
+
+int32x4_t test_vaddw_high_s16(int32x4_t lhs, int16x8_t rhs) {
+ // CHECK: saddw2.4s
+ return vaddw_high_s16(lhs, rhs);
+}
+
+int64x2_t test_vaddw_high_s32(int64x2_t lhs, int32x4_t rhs) {
+ // CHECK: saddw2.2d
+ return vaddw_high_s32(lhs, rhs);
+}
+
+uint16x8_t test_vaddw_high_u8(uint16x8_t lhs, uint8x16_t rhs) {
+ // CHECK: uaddw2.8h
+ return vaddw_high_u8(lhs, rhs);
+}
+
+uint32x4_t test_vaddw_high_u16(uint32x4_t lhs, uint16x8_t rhs) {
+ // CHECK: uaddw2.4s
+ return vaddw_high_u16(lhs, rhs);
+}
+
+uint64x2_t test_vaddw_high_u32(uint64x2_t lhs, uint32x4_t rhs) {
+ // CHECK: uaddw2.2d
+ return vaddw_high_u32(lhs, rhs);
+}
+
+int16x8_t test_vsubw_high_s8(int16x8_t lhs, int8x16_t rhs) {
+ // CHECK: ssubw2.8h
+ return vsubw_high_s8(lhs, rhs);
+}
+
+int32x4_t test_vsubw_high_s16(int32x4_t lhs, int16x8_t rhs) {
+ // CHECK: ssubw2.4s
+ return vsubw_high_s16(lhs, rhs);
+}
+
+int64x2_t test_vsubw_high_s32(int64x2_t lhs, int32x4_t rhs) {
+ // CHECK: ssubw2.2d
+ return vsubw_high_s32(lhs, rhs);
+}
+
+uint16x8_t test_vsubw_high_u8(uint16x8_t lhs, uint8x16_t rhs) {
+ // CHECK: usubw2.8h
+ return vsubw_high_u8(lhs, rhs);
+}
+
+uint32x4_t test_vsubw_high_u16(uint32x4_t lhs, uint16x8_t rhs) {
+ // CHECK: usubw2.4s
+ return vsubw_high_u16(lhs, rhs);
+}
+
+uint64x2_t test_vsubw_high_u32(uint64x2_t lhs, uint32x4_t rhs) {
+ // CHECK: usubw2.2d
+ return vsubw_high_u32(lhs, rhs);
+}
+
+int16x8_t test_vabdl_high_s8(int8x16_t lhs, int8x16_t rhs) {
+ // CHECK: sabdl2.8h
+ return vabdl_high_s8(lhs, rhs);
+}
+
+int32x4_t test_vabdl_high_s16(int16x8_t lhs, int16x8_t rhs) {
+ // CHECK: sabdl2.4s
+ return vabdl_high_s16(lhs, rhs);
+}
+
+int64x2_t test_vabdl_high_s32(int32x4_t lhs, int32x4_t rhs) {
+ // CHECK: sabdl2.2d
+ return vabdl_high_s32(lhs, rhs);
+}
+
+uint16x8_t test_vabdl_high_u8(uint8x16_t lhs, uint8x16_t rhs) {
+ // CHECK: uabdl2.8h
+ return vabdl_high_u8(lhs, rhs);
+}
+
+uint32x4_t test_vabdl_high_u16(uint16x8_t lhs, uint16x8_t rhs) {
+ // CHECK: uabdl2.4s
+ return vabdl_high_u16(lhs, rhs);
+}
+
+uint64x2_t test_vabdl_high_u32(uint32x4_t lhs, uint32x4_t rhs) {
+ // CHECK: uabdl2.2d
+ return vabdl_high_u32(lhs, rhs);
+}
+
+int16x8_t test_vabal_high_s8(int16x8_t accum, int8x16_t lhs, int8x16_t rhs) {
+ // CHECK: sabal2.8h
+ return vabal_high_s8(accum, lhs, rhs);
+}
+
+int32x4_t test_vabal_high_s16(int32x4_t accum, int16x8_t lhs, int16x8_t rhs) {
+ // CHECK: sabal2.4s
+ return vabal_high_s16(accum, lhs, rhs);
+}
+
+int64x2_t test_vabal_high_s32(int64x2_t accum, int32x4_t lhs, int32x4_t rhs) {
+ // CHECK: sabal2.2d
+ return vabal_high_s32(accum, lhs, rhs);
+}
+
+uint16x8_t test_vabal_high_u8(uint16x8_t accum, uint8x16_t lhs, uint8x16_t rhs) {
+ // CHECK: uabal2.8h
+ return vabal_high_u8(accum, lhs, rhs);
+}
+
+uint32x4_t test_vabal_high_u16(uint32x4_t accum, uint16x8_t lhs, uint16x8_t rhs) {
+ // CHECK: uabal2.4s
+ return vabal_high_u16(accum, lhs, rhs);
+}
+
+uint64x2_t test_vabal_high_u32(uint64x2_t accum, uint32x4_t lhs, uint32x4_t rhs) {
+ // CHECK: uabal2.2d
+ return vabal_high_u32(accum, lhs, rhs);
+}
+
+int32x4_t test_vqdmlal_high_s16(int32x4_t accum, int16x8_t lhs, int16x8_t rhs) {
+ // CHECK: sqdmlal2.4s
+ return vqdmlal_high_s16(accum, lhs, rhs);
+}
+
+int64x2_t test_vqdmlal_high_s32(int64x2_t accum, int32x4_t lhs, int32x4_t rhs) {
+ // CHECK: sqdmlal2.2d
+ return vqdmlal_high_s32(accum, lhs, rhs);
+}
+
+int32x4_t test_vqdmlsl_high_s16(int32x4_t accum, int16x8_t lhs, int16x8_t rhs) {
+ // CHECK: sqdmlsl2.4s
+ return vqdmlsl_high_s16(accum, lhs, rhs);
+}
+
+int64x2_t test_vqdmlsl_high_s32(int64x2_t accum, int32x4_t lhs, int32x4_t rhs) {
+ // CHECK: sqdmlsl2.2d
+ return vqdmlsl_high_s32(accum, lhs, rhs);
+}
+
+int32x4_t test_vqdmull_high_s16(int16x8_t lhs, int16x8_t rhs) {
+ // CHECK: sqdmull2.4s
+ return vqdmull_high_s16(lhs, rhs);
+}
+
+int64x2_t test_vqdmull_high_s32(int32x4_t lhs, int32x4_t rhs) {
+ // CHECK: sqdmull2.2d
+ return vqdmull_high_s32(lhs, rhs);
+}
+
+int16x8_t test_vshll_high_n_s8(int8x16_t in) {
+ // CHECK: sshll2.8h
+ return vshll_high_n_s8(in, 7);
+}
+
+int32x4_t test_vshll_high_n_s16(int16x8_t in) {
+ // CHECK: sshll2.4s
+ return vshll_high_n_s16(in, 15);
+}
+
+int64x2_t test_vshll_high_n_s32(int32x4_t in) {
+ // CHECK: sshll2.2d
+ return vshll_high_n_s32(in, 31);
+}
+
+int16x8_t test_vshll_high_n_u8(int8x16_t in) {
+ // CHECK: ushll2.8h
+ return vshll_high_n_u8(in, 7);
+}
+
+int32x4_t test_vshll_high_n_u16(int16x8_t in) {
+ // CHECK: ushll2.4s
+ return vshll_high_n_u16(in, 15);
+}
+
+int64x2_t test_vshll_high_n_u32(int32x4_t in) {
+ // CHECK: ushll2.2d
+ return vshll_high_n_u32(in, 31);
+}
+
+int16x8_t test_vshll_high_n_s8_max(int8x16_t in) {
+ // CHECK: shll2.8h
+ return vshll_high_n_s8(in, 8);
+}
+
+int32x4_t test_vshll_high_n_s16_max(int16x8_t in) {
+ // CHECK: shll2.4s
+ return vshll_high_n_s16(in, 16);
+}
+
+int64x2_t test_vshll_high_n_s32_max(int32x4_t in) {
+ // CHECK: shll2.2d
+ return vshll_high_n_s32(in, 32);
+}
+
+int16x8_t test_vshll_high_n_u8_max(int8x16_t in) {
+ // CHECK: shll2.8h
+ return vshll_high_n_u8(in, 8);
+}
+
+int32x4_t test_vshll_high_n_u16_max(int16x8_t in) {
+ // CHECK: shll2.4s
+ return vshll_high_n_u16(in, 16);
+}
+
+int64x2_t test_vshll_high_n_u32_max(int32x4_t in) {
+ // CHECK: shll2.2d
+ return vshll_high_n_u32(in, 32);
+}
+
+int16x8_t test_vsubl_high_s8(int8x16_t lhs, int8x16_t rhs) {
+ // CHECK: ssubl2.8h
+ return vsubl_high_s8(lhs, rhs);
+}
+
+int32x4_t test_vsubl_high_s16(int16x8_t lhs, int16x8_t rhs) {
+ // CHECK: ssubl2.4s
+ return vsubl_high_s16(lhs, rhs);
+}
+
+int64x2_t test_vsubl_high_s32(int32x4_t lhs, int32x4_t rhs) {
+ // CHECK: ssubl2.2d
+ return vsubl_high_s32(lhs, rhs);
+}
+
+uint16x8_t test_vsubl_high_u8(uint8x16_t lhs, uint8x16_t rhs) {
+ // CHECK: usubl2.8h
+ return vsubl_high_u8(lhs, rhs);
+}
+
+uint32x4_t test_vsubl_high_u16(uint16x8_t lhs, uint16x8_t rhs) {
+ // CHECK: usubl2.4s
+ return vsubl_high_u16(lhs, rhs);
+}
+
+uint64x2_t test_vsubl_high_u32(uint32x4_t lhs, uint32x4_t rhs) {
+ // CHECK: usubl2.2d
+ return vsubl_high_u32(lhs, rhs);
+}
+
+int8x16_t test_vrshrn_high_n_s16(int8x8_t lowpart, int16x8_t input) {
+ // CHECK: rshrn2.16b
+ return vrshrn_high_n_s16(lowpart, input, 2);
+}
+
+int16x8_t test_vrshrn_high_n_s32(int16x4_t lowpart, int32x4_t input) {
+ // CHECK: rshrn2.8h
+ return vrshrn_high_n_s32(lowpart, input, 2);
+}
+
+int32x4_t test_vrshrn_high_n_s64(int32x2_t lowpart, int64x2_t input) {
+ // CHECK: shrn2.4s
+ return vrshrn_high_n_s64(lowpart, input, 2);
+}
+
+uint8x16_t test_vrshrn_high_n_u16(uint8x8_t lowpart, uint16x8_t input) {
+ // CHECK: rshrn2.16b
+ return vrshrn_high_n_u16(lowpart, input, 2);
+}
+
+uint16x8_t test_vrshrn_high_n_u32(uint16x4_t lowpart, uint32x4_t input) {
+ // CHECK: rshrn2.8h
+ return vrshrn_high_n_u32(lowpart, input, 2);
+}
+
+uint32x4_t test_vrshrn_high_n_u64(uint32x2_t lowpart, uint64x2_t input) {
+ // CHECK: rshrn2.4s
+ return vrshrn_high_n_u64(lowpart, input, 2);
+}
+
+int8x16_t test_vshrn_high_n_s16(int8x8_t lowpart, int16x8_t input) {
+ // CHECK: shrn2.16b
+ return vshrn_high_n_s16(lowpart, input, 2);
+}
+
+int16x8_t test_vshrn_high_n_s32(int16x4_t lowpart, int32x4_t input) {
+ // CHECK: shrn2.8h
+ return vshrn_high_n_s32(lowpart, input, 2);
+}
+
+int32x4_t test_vshrn_high_n_s64(int32x2_t lowpart, int64x2_t input) {
+ // CHECK: shrn2.4s
+ return vshrn_high_n_s64(lowpart, input, 2);
+}
+
+uint8x16_t test_vshrn_high_n_u16(uint8x8_t lowpart, uint16x8_t input) {
+ // CHECK: shrn2.16b
+ return vshrn_high_n_u16(lowpart, input, 2);
+}
+
+uint16x8_t test_vshrn_high_n_u32(uint16x4_t lowpart, uint32x4_t input) {
+ // CHECK: shrn2.8h
+ return vshrn_high_n_u32(lowpart, input, 2);
+}
+
+uint32x4_t test_vshrn_high_n_u64(uint32x2_t lowpart, uint64x2_t input) {
+ // CHECK: shrn2.4s
+ return vshrn_high_n_u64(lowpart, input, 2);
+}
+
+uint8x16_t test_vqshrun_high_n_s16(uint8x8_t lowpart, int16x8_t input) {
+ // CHECK: sqshrun2.16b
+ return vqshrun_high_n_s16(lowpart, input, 2);
+}
+
+uint16x8_t test_vqshrun_high_n_s32(uint16x4_t lowpart, int32x4_t input) {
+ // CHECK: sqshrun2.8h
+ return vqshrun_high_n_s32(lowpart, input, 2);
+}
+
+uint32x4_t test_vqshrun_high_n_s64(uint32x2_t lowpart, int64x2_t input) {
+ // CHECK: sqshrun2.4s
+ return vqshrun_high_n_s64(lowpart, input, 2);
+}
+
+uint8x16_t test_vqrshrun_high_n_s16(uint8x8_t lowpart, int16x8_t input) {
+ // CHECK: sqrshrun2.16b
+ return vqrshrun_high_n_s16(lowpart, input, 2);
+}
+
+uint16x8_t test_vqrshrun_high_n_s32(uint16x4_t lowpart, int32x4_t input) {
+ // CHECK: sqrshrun2.8h
+ return vqrshrun_high_n_s32(lowpart, input, 2);
+}
+
+uint32x4_t test_vqrshrun_high_n_s64(uint32x2_t lowpart, int64x2_t input) {
+ // CHECK: sqrshrun2.4s
+ return vqrshrun_high_n_s64(lowpart, input, 2);
+}
+
+int8x16_t test_vqshrn_high_n_s16(int8x8_t lowpart, int16x8_t input) {
+ // CHECK: sqshrn2.16b
+ return vqshrn_high_n_s16(lowpart, input, 2);
+}
+
+int16x8_t test_vqshrn_high_n_s32(int16x4_t lowpart, int32x4_t input) {
+ // CHECK: sqshrn2.8h
+ return vqshrn_high_n_s32(lowpart, input, 2);
+}
+
+int32x4_t test_vqshrn_high_n_s64(int32x2_t lowpart, int64x2_t input) {
+ // CHECK: sqshrn2.4s
+ return vqshrn_high_n_s64(lowpart, input, 2);
+}
+
+uint8x16_t test_vqshrn_high_n_u16(uint8x8_t lowpart, uint16x8_t input) {
+ // CHECK: uqshrn2.16b
+ return vqshrn_high_n_u16(lowpart, input, 2);
+}
+
+uint16x8_t test_vqshrn_high_n_u32(uint16x4_t lowpart, uint32x4_t input) {
+ // CHECK: uqshrn2.8h
+ return vqshrn_high_n_u32(lowpart, input, 2);
+}
+
+uint32x4_t test_vqshrn_high_n_u64(uint32x2_t lowpart, uint64x2_t input) {
+ // CHECK: uqshrn2.4s
+ return vqshrn_high_n_u64(lowpart, input, 2);
+}
+
+int8x16_t test_vqrshrn_high_n_s16(int8x8_t lowpart, int16x8_t input) {
+ // CHECK: sqrshrn2.16b
+ return vqrshrn_high_n_s16(lowpart, input, 2);
+}
+
+int16x8_t test_vqrshrn_high_n_s32(int16x4_t lowpart, int32x4_t input) {
+ // CHECK: sqrshrn2.8h
+ return vqrshrn_high_n_s32(lowpart, input, 2);
+}
+
+int32x4_t test_vqrshrn_high_n_s64(int32x2_t lowpart, int64x2_t input) {
+ // CHECK: sqrshrn2.4s
+ return vqrshrn_high_n_s64(lowpart, input, 2);
+}
+
+uint8x16_t test_vqrshrn_high_n_u16(uint8x8_t lowpart, uint16x8_t input) {
+ // CHECK: uqrshrn2.16b
+ return vqrshrn_high_n_u16(lowpart, input, 2);
+}
+
+uint16x8_t test_vqrshrn_high_n_u32(uint16x4_t lowpart, uint32x4_t input) {
+ // CHECK: uqrshrn2.8h
+ return vqrshrn_high_n_u32(lowpart, input, 2);
+}
+
+uint32x4_t test_vqrshrn_high_n_u64(uint32x2_t lowpart, uint64x2_t input) {
+ // CHECK: uqrshrn2.4s
+ return vqrshrn_high_n_u64(lowpart, input, 2);
+}
+
+int8x16_t test_vaddhn_high_s16(int8x8_t lowpart, int16x8_t lhs, int16x8_t rhs) {
+ // CHECK: addhn2.16b v0, v1, v2
+ return vaddhn_high_s16(lowpart, lhs, rhs);
+}
+
+int16x8_t test_vaddhn_high_s32(int16x4_t lowpart, int32x4_t lhs, int32x4_t rhs) {
+ // CHECK: addhn2.8h v0, v1, v2
+ return vaddhn_high_s32(lowpart, lhs, rhs);
+}
+
+int32x4_t test_vaddhn_high_s64(int32x2_t lowpart, int64x2_t lhs, int64x2_t rhs) {
+ // CHECK: addhn2.4s v0, v1, v2
+ return vaddhn_high_s64(lowpart, lhs, rhs);
+}
+
+uint8x16_t test_vaddhn_high_u16(uint8x8_t lowpart, uint16x8_t lhs, uint16x8_t rhs) {
+ // CHECK: addhn2.16b v0, v1, v2
+ return vaddhn_high_s16(lowpart, lhs, rhs);
+}
+
+uint16x8_t test_vaddhn_high_u32(uint16x4_t lowpart, uint32x4_t lhs, uint32x4_t rhs) {
+ // CHECK: addhn2.8h v0, v1, v2
+ return vaddhn_high_s32(lowpart, lhs, rhs);
+}
+
+uint32x4_t test_vaddhn_high_u64(uint32x2_t lowpart, uint64x2_t lhs, uint64x2_t rhs) {
+ // CHECK: addhn2.4s v0, v1, v2
+ return vaddhn_high_s64(lowpart, lhs, rhs);
+}
+
+int8x16_t test_vraddhn_high_s16(int8x8_t lowpart, int16x8_t lhs, int16x8_t rhs) {
+ // CHECK: raddhn2.16b v0, v1, v2
+ return vraddhn_high_s16(lowpart, lhs, rhs);
+}
+
+int16x8_t test_vraddhn_high_s32(int16x4_t lowpart, int32x4_t lhs, int32x4_t rhs) {
+ // CHECK: raddhn2.8h v0, v1, v2
+ return vraddhn_high_s32(lowpart, lhs, rhs);
+}
+
+int32x4_t test_vraddhn_high_s64(int32x2_t lowpart, int64x2_t lhs, int64x2_t rhs) {
+ // CHECK: raddhn2.4s v0, v1, v2
+ return vraddhn_high_s64(lowpart, lhs, rhs);
+}
+
+uint8x16_t test_vraddhn_high_u16(uint8x8_t lowpart, uint16x8_t lhs, uint16x8_t rhs) {
+ // CHECK: raddhn2.16b v0, v1, v2
+ return vraddhn_high_s16(lowpart, lhs, rhs);
+}
+
+uint16x8_t test_vraddhn_high_u32(uint16x4_t lowpart, uint32x4_t lhs, uint32x4_t rhs) {
+ // CHECK: raddhn2.8h v0, v1, v2
+ return vraddhn_high_s32(lowpart, lhs, rhs);
+}
+
+uint32x4_t test_vraddhn_high_u64(uint32x2_t lowpart, uint64x2_t lhs, uint64x2_t rhs) {
+ // CHECK: raddhn2.4s v0, v1, v2
+ return vraddhn_high_s64(lowpart, lhs, rhs);
+}
+
+int8x16_t test_vmovn_high_s16(int8x8_t lowpart, int16x8_t wide) {
+ // CHECK: xtn2.16b v0, v1
+ return vmovn_high_s16(lowpart, wide);
+}
+
+int16x8_t test_vmovn_high_s32(int16x4_t lowpart, int32x4_t wide) {
+ // CHECK: xtn2.8h v0, v1
+ return vmovn_high_s32(lowpart, wide);
+}
+
+int32x4_t test_vmovn_high_s64(int32x2_t lowpart, int64x2_t wide) {
+ // CHECK: xtn2.4s v0, v1
+ return vmovn_high_s64(lowpart, wide);
+}
+
+uint8x16_t test_vmovn_high_u16(uint8x8_t lowpart, uint16x8_t wide) {
+ // CHECK: xtn2.16b v0, v1
+ return vmovn_high_u16(lowpart, wide);
+}
+
+uint16x8_t test_vmovn_high_u32(uint16x4_t lowpart, uint32x4_t wide) {
+ // CHECK: xtn2.8h v0, v1
+ return vmovn_high_u32(lowpart, wide);
+}
+
+uint32x4_t test_vmovn_high_u64(uint32x2_t lowpart, uint64x2_t wide) {
+ // CHECK: xtn2.4s v0, v1
+ return vmovn_high_u64(lowpart, wide);
+}
+
+int8x16_t test_vqmovn_high_s16(int8x8_t lowpart, int16x8_t wide) {
+ // CHECK: sqxtn2.16b v0, v1
+ return vqmovn_high_s16(lowpart, wide);
+}
+
+int16x8_t test_vqmovn_high_s32(int16x4_t lowpart, int32x4_t wide) {
+ // CHECK: sqxtn2.8h v0, v1
+ return vqmovn_high_s32(lowpart, wide);
+}
+
+int32x4_t test_vqmovn_high_s64(int32x2_t lowpart, int64x2_t wide) {
+ // CHECK: sqxtn2.4s v0, v1
+ return vqmovn_high_s64(lowpart, wide);
+}
+
+uint8x16_t test_vqmovn_high_u16(uint8x8_t lowpart, int16x8_t wide) {
+ // CHECK: uqxtn2.16b v0, v1
+ return vqmovn_high_u16(lowpart, wide);
+}
+
+uint16x8_t test_vqmovn_high_u32(uint16x4_t lowpart, int32x4_t wide) {
+ // CHECK: uqxtn2.8h v0, v1
+ return vqmovn_high_u32(lowpart, wide);
+}
+
+uint32x4_t test_vqmovn_high_u64(uint32x2_t lowpart, int64x2_t wide) {
+ // CHECK: uqxtn2.4s v0, v1
+ return vqmovn_high_u64(lowpart, wide);
+}
+
+uint8x16_t test_vqmovun_high_s16(uint8x8_t lowpart, int16x8_t wide) {
+ // CHECK: sqxtun2.16b v0, v1
+ return vqmovun_high_s16(lowpart, wide);
+}
+
+uint16x8_t test_vqmovun_high_s32(uint16x4_t lowpart, int32x4_t wide) {
+ // CHECK: sqxtun2.8h v0, v1
+ return vqmovun_high_s32(lowpart, wide);
+}
+
+uint32x4_t test_vqmovun_high_s64(uint32x2_t lowpart, int64x2_t wide) {
+ // CHECK: sqxtun2.4s v0, v1
+ return vqmovun_high_s64(lowpart, wide);
+}
+
+float32x4_t test_vcvtx_high_f32_f64(float32x2_t lowpart, float64x2_t wide) {
+ // CHECK: fcvtxn2 v0.4s, v1.2d
+ return vcvtx_high_f32_f64(lowpart, wide);
+}
+
+float64x2_t test_vcvt_f64_f32(float32x2_t x) {
+ // CHECK: fcvtl v0.2d, v0.2s
+ return vcvt_f64_f32(x);
+}
+
+float64x2_t test_vcvt_high_f64_f32(float32x4_t x) {
+ // CHECK: fcvtl2 v0.2d, v0.4s
+ return vcvt_high_f64_f32(x);
+}
+
+float32x2_t test_vcvt_f32_f64(float64x2_t v) {
+ // CHECK: fcvtn v0.2s, v0.2d
+ return vcvt_f32_f64(v);
+}
+
+float32x4_t test_vcvt_high_f32_f64(float32x2_t x, float64x2_t v) {
+ // CHECK: fcvtn2 v0.4s, v1.2d
+ return vcvt_high_f32_f64(x, v);
+}
+
+float32x2_t test_vcvtx_f32_f64(float64x2_t v) {
+ // CHECK: fcvtxn v0.2s, v0.2d
+ return vcvtx_f32_f64(v);
+}
diff --git a/test/CodeGen/arm64_vCMP.c b/test/CodeGen/arm64_vCMP.c
new file mode 100644
index 000000000000..a302128af9b8
--- /dev/null
+++ b/test/CodeGen/arm64_vCMP.c
@@ -0,0 +1,108 @@
+// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s
+
+// Test ARM64 SIMD fused multiply add intrinsics
+
+#include <arm_neon.h>
+
+int64x2_t test_vabsq_s64(int64x2_t a1) {
+ // CHECK: test_vabsq_s64
+ return vabsq_s64(a1);
+ // CHECK: llvm.aarch64.neon.abs.v2i64
+ // CHECK-NEXT: ret
+}
+
+int64_t test_vceqd_s64(int64_t a1, int64_t a2) {
+ // CHECK: test_vceqd_s64
+ return vceqd_s64(a1, a2);
+ // CHECK: [[BIT:%[0-9a-zA-Z.]+]] = icmp eq i64 %a1, %a2
+ // CHECK: sext i1 [[BIT]] to i64
+}
+
+int64_t test_vceqd_f64(float64_t a1, float64_t a2) {
+ // CHECK: test_vceqd_f64
+ return vceqd_f64(a1, a2);
+ // CHECK: [[BIT:%[0-9a-zA-Z.]+]] = fcmp oeq double %a1, %a2
+ // CHECK: sext i1 [[BIT]] to i64
+}
+
+uint64_t test_vcgtd_u64(uint64_t a1, uint64_t a2) {
+ // CHECK: test_vcgtd_u64
+ return vcgtd_u64(a1, a2);
+ // CHECK: [[BIT:%[0-9a-zA-Z.]+]] = icmp ugt i64 %a1, %a2
+ // CHECK: sext i1 [[BIT]] to i64
+}
+
+uint64_t test_vcled_u64(uint64_t a1, uint64_t a2) {
+ // CHECK: test_vcled_u64
+ return vcled_u64(a1, a2);
+ // CHECK: [[BIT:%[0-9a-zA-Z.]+]] = icmp ule i64 %a1, %a2
+ // CHECK: sext i1 [[BIT]] to i64
+}
+
+int64_t test_vceqzd_s64(int64_t a1) {
+ // CHECK: test_vceqzd_s64
+ return vceqzd_s64(a1);
+ // CHECK: [[BIT:%[0-9a-zA-Z.]+]] = icmp eq i64 %a1, 0
+ // CHECK: sext i1 [[BIT]] to i64
+}
+
+uint64x2_t test_vceqq_u64(uint64x2_t a1, uint64x2_t a2) {
+ // CHECK: test_vceqq_u64
+ return vceqq_u64(a1, a2);
+ // CHECK: icmp eq <2 x i64> %a1, %a2
+}
+
+uint64x2_t test_vcgeq_s64(int64x2_t a1, int64x2_t a2) {
+ // CHECK: test_vcgeq_s64
+ return vcgeq_s64(a1, a2);
+ // CHECK: icmp sge <2 x i64> %a1, %a2
+}
+
+uint64x2_t test_vcgeq_u64(uint64x2_t a1, uint64x2_t a2) {
+ // CHECK: test_vcgeq_u64
+ return vcgeq_u64(a1, a2);
+ // CHECK: icmp uge <2 x i64> %a1, %a2
+}
+
+uint64x2_t test_vcgtq_s64(int64x2_t a1, int64x2_t a2) {
+ // CHECK: test_vcgtq_s64
+ return vcgtq_s64(a1, a2);
+ // CHECK: icmp sgt <2 x i64> %a1, %a2
+}
+
+uint64x2_t test_vcgtq_u64(uint64x2_t a1, uint64x2_t a2) {
+ // CHECK: test_vcgtq_u64
+ return vcgtq_u64(a1, a2);
+ // CHECK: icmp ugt <2 x i64> %a1, %a2
+}
+
+uint64x2_t test_vcleq_s64(int64x2_t a1, int64x2_t a2) {
+ // CHECK: test_vcleq_s64
+ return vcleq_s64(a1, a2);
+ // CHECK: icmp sle <2 x i64> %a1, %a2
+}
+
+uint64x2_t test_vcleq_u64(uint64x2_t a1, uint64x2_t a2) {
+ // CHECK: test_vcleq_u64
+ return vcleq_u64(a1, a2);
+ // CHECK: icmp ule <2 x i64> %a1, %a2
+}
+
+uint64x2_t test_vcltq_s64(int64x2_t a1, int64x2_t a2) {
+ // CHECK: test_vcltq_s64
+ return vcltq_s64(a1, a2);
+ // CHECK: icmp slt <2 x i64> %a1, %a2
+}
+
+uint64x2_t test_vcltq_u64(uint64x2_t a1, uint64x2_t a2) {
+ // CHECK: test_vcltq_u64
+ return vcltq_u64(a1, a2);
+ // CHECK: icmp ult <2 x i64> %a1, %a2
+}
+
+int64x2_t test_vqabsq_s64(int64x2_t a1) {
+ // CHECK: test_vqabsq_s64
+ return vqabsq_s64(a1);
+ // CHECK: llvm.aarch64.neon.sqabs.v2i64(<2 x i64> %a1)
+ // CHECK-NEXT: ret
+}
diff --git a/test/CodeGen/arm64_vLdStNum_lane.c b/test/CodeGen/arm64_vLdStNum_lane.c
new file mode 100644
index 000000000000..85229d5a57f6
--- /dev/null
+++ b/test/CodeGen/arm64_vLdStNum_lane.c
@@ -0,0 +1,141 @@
+// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s
+// Test ARM64 SIMD load and stores of an N-element structure intrinsics
+
+#include <arm_neon.h>
+
+int64x2x2_t test_vld2q_lane_s64(const void * a1, int64x2x2_t a2) {
+ // CHECK: test_vld2q_lane_s64
+ return vld2q_lane_s64(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.ld2lane.v2i64.p0i8
+}
+
+uint64x2x2_t test_vld2q_lane_u64(const void * a1, uint64x2x2_t a2) {
+ // CHECK: test_vld2q_lane_u64
+ return vld2q_lane_u64(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.ld2lane.v2i64.p0i8
+}
+
+int64x1x2_t test_vld2_lane_s64(const void * a1, int64x1x2_t a2) {
+ // CHECK: test_vld2_lane_s64
+ return vld2_lane_s64(a1, a2, 0);
+ // CHECK: llvm.aarch64.neon.ld2lane.v1i64.p0i8
+}
+
+uint64x1x2_t test_vld2_lane_u64(const void * a1, uint64x1x2_t a2) {
+ // CHECK: test_vld2_lane_u64
+ return vld2_lane_u64(a1, a2, 0);
+ // CHECK: llvm.aarch64.neon.ld2lane.v1i64.p0i8
+}
+
+poly8x16x2_t test_vld2q_lane_p8(const void * a1, poly8x16x2_t a2) {
+ // CHECK: test_vld2q_lane_p8
+ return vld2q_lane_p8(a1, a2, 0);
+ // CHECK: extractvalue {{.*}} 0{{ *$}}
+ // CHECK: extractvalue {{.*}} 1{{ *$}}
+}
+
+uint8x16x2_t test_vld2q_lane_u8(const void * a1, uint8x16x2_t a2) {
+ // CHECK: test_vld2q_lane_u8
+ return vld2q_lane_u8(a1, a2, 0);
+ // CHECK: llvm.aarch64.neon.ld2lane.v16i8.p0i8
+}
+
+int64x2x3_t test_vld3q_lane_s64(const void * a1, int64x2x3_t a2) {
+ // CHECK: test_vld3q_lane_s64
+ return vld3q_lane_s64(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.ld3lane.v2i64.p0i8
+}
+
+uint64x2x3_t test_vld3q_lane_u64(const void * a1, uint64x2x3_t a2) {
+ // CHECK: test_vld3q_lane_u64
+ return vld3q_lane_u64(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.ld3lane.v2i64.p0i8
+}
+
+int64x1x3_t test_vld3_lane_s64(const void * a1, int64x1x3_t a2) {
+ // CHECK: test_vld3_lane_s64
+ return vld3_lane_s64(a1, a2, 0);
+ // CHECK: llvm.aarch64.neon.ld3lane.v1i64.p0i8
+}
+
+uint64x1x3_t test_vld3_lane_u64(const void * a1, uint64x1x3_t a2) {
+ // CHECK: test_vld3_lane_u64
+ return vld3_lane_u64(a1, a2, 0);
+ // CHECK: llvm.aarch64.neon.ld3lane.v1i64.p0i8
+}
+
+int8x8x3_t test_vld3_lane_s8(const void * a1, int8x8x3_t a2) {
+ // CHECK: test_vld3_lane_s8
+ return vld3_lane_s8(a1, a2, 0);
+ // CHECK: llvm.aarch64.neon.ld3lane.v8i8.p0i8
+}
+
+poly8x16x3_t test_vld3q_lane_p8(const void * a1, poly8x16x3_t a2) {
+ // CHECK: test_vld3q_lane_p8
+ return vld3q_lane_p8(a1, a2, 0);
+ // CHECK: llvm.aarch64.neon.ld3lane.v16i8.p0i8
+}
+
+uint8x16x3_t test_vld3q_lane_u8(const void * a1, uint8x16x3_t a2) {
+ // CHECK: test_vld3q_lane_u8
+ return vld3q_lane_u8(a1, a2, 0);
+ // CHECK: llvm.aarch64.neon.ld3lane.v16i8.p0i8
+}
+
+int64x2x4_t test_vld4q_lane_s64(const void * a1, int64x2x4_t a2) {
+ // CHECK: test_vld4q_lane_s64
+ return vld4q_lane_s64(a1, a2, 0);
+ // CHECK: llvm.aarch64.neon.ld4lane.v2i64.p0i8
+}
+
+uint64x2x4_t test_vld4q_lane_u64(const void * a1, uint64x2x4_t a2) {
+ // CHECK: test_vld4q_lane_u64
+ return vld4q_lane_u64(a1, a2, 0);
+ // CHECK: llvm.aarch64.neon.ld4lane.v2i64.p0i8
+}
+
+int64x1x4_t test_vld4_lane_s64(const void * a1, int64x1x4_t a2) {
+ // CHECK: test_vld4_lane_s64
+ return vld4_lane_s64(a1, a2, 0);
+ // CHECK: llvm.aarch64.neon.ld4lane.v1i64.p0i8
+}
+
+uint64x1x4_t test_vld4_lane_u64(const void * a1, uint64x1x4_t a2) {
+ // CHECK: test_vld4_lane_u64
+ return vld4_lane_u64(a1, a2, 0);
+ // CHECK: llvm.aarch64.neon.ld4lane.v1i64.p0i8
+}
+
+int8x8x4_t test_vld4_lane_s8(const void * a1, int8x8x4_t a2) {
+ // CHECK: test_vld4_lane_s8
+ return vld4_lane_s8(a1, a2, 0);
+ // CHECK: llvm.aarch64.neon.ld4lane.v8i8.p0i8
+}
+
+uint8x8x4_t test_vld4_lane_u8(const void * a1, uint8x8x4_t a2) {
+ // CHECK: test_vld4_lane_u8
+ return vld4_lane_u8(a1, a2, 0);
+ // CHECK: llvm.aarch64.neon.ld4lane.v8i8.p0i8
+}
+
+poly8x16x4_t test_vld4q_lane_p8(const void * a1, poly8x16x4_t a2) {
+ // CHECK: test_vld4q_lane_p8
+ return vld4q_lane_p8(a1, a2, 0);
+ // CHECK: llvm.aarch64.neon.ld4lane.v16i8.p0i8
+}
+
+int8x16x4_t test_vld4q_lane_s8(const void * a1, int8x16x4_t a2) {
+ // CHECK: test_vld4q_lane_s8
+ return vld4q_lane_s8(a1, a2, 0);
+ // CHECK: extractvalue {{.*}} 0{{ *$}}
+ // CHECK: extractvalue {{.*}} 1{{ *$}}
+ // CHECK: extractvalue {{.*}} 2{{ *$}}
+ // CHECK: extractvalue {{.*}} 3{{ *$}}
+}
+
+uint8x16x4_t test_vld4q_lane_u8(const void * a1, uint8x16x4_t a2) {
+ // CHECK: test_vld4q_lane_u8
+ return vld4q_lane_u8(a1, a2, 0);
+ // CHECK: llvm.aarch64.neon.ld4lane.v16i8.p0i8
+}
+
diff --git a/test/CodeGen/arm64_vMaxMin.c b/test/CodeGen/arm64_vMaxMin.c
new file mode 100644
index 000000000000..5f77b6c846a1
--- /dev/null
+++ b/test/CodeGen/arm64_vMaxMin.c
@@ -0,0 +1,207 @@
+// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s
+// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - %s | FileCheck -check-prefix=CHECK-CODEGEN %s
+// REQUIRES: aarch64-registered-target
+// Test ARM64 SIMD max/min intrinsics
+
+#include <arm_neon.h>
+
+// Test a represntative sample of 8 and 16, signed and unsigned, 64 and 128 bit reduction
+int8_t test_vmaxv_s8(int8x8_t a1) {
+ // CHECK: test_vmaxv_s8
+ return vmaxv_s8(a1);
+ // CHECK @llvm.aarch64.neon.smaxv.i32.v8i8
+}
+
+uint16_t test_vminvq_u16(uint16x8_t a1) {
+ // CHECK: test_vminvq_u16
+ return vminvq_u16(a1);
+ // CHECK llvm.aarch64.neon.uminv.i16.v8i16
+}
+
+// Test a represntative sample of 8 and 16, signed and unsigned, 64 and 128 bit pairwise
+uint8x8_t test_vmin_u8(uint8x8_t a1, uint8x8_t a2) {
+ // CHECK: test_vmin_u8
+ return vmin_u8(a1, a2);
+ // CHECK llvm.aarch64.neon.umin.v8i8
+}
+
+uint8x16_t test_vminq_u8(uint8x16_t a1, uint8x16_t a2) {
+ // CHECK: test_vminq_u8
+ return vminq_u8(a1, a2);
+ // CHECK llvm.aarch64.neon.umin.v16i8
+}
+
+int16x8_t test_vmaxq_s16(int16x8_t a1, int16x8_t a2) {
+ // CHECK: test_vmaxq_s16
+ return vmaxq_s16(a1, a2);
+ // CHECK llvm.aarch64.neon.smax.v8i16
+}
+
+// Test the more complicated cases of [suf]32 and f64
+float64x2_t test_vmaxq_f64(float64x2_t a1, float64x2_t a2) {
+ // CHECK: test_vmaxq_f64
+ return vmaxq_f64(a1, a2);
+ // CHECK llvm.aarch64.neon.fmax.v2f64
+}
+
+float32x4_t test_vmaxq_f32(float32x4_t a1, float32x4_t a2) {
+ // CHECK: test_vmaxq_f32
+ return vmaxq_f32(a1, a2);
+ // CHECK llvm.aarch64.neon.fmax.v4f32
+}
+
+float64x2_t test_vminq_f64(float64x2_t a1, float64x2_t a2) {
+ // CHECK: test_vminq_f64
+ return vminq_f64(a1, a2);
+ // CHECK llvm.aarch64.neon.fmin.v2f64
+}
+
+float32x2_t test_vmax_f32(float32x2_t a1, float32x2_t a2) {
+ // CHECK: test_vmax_f32
+ return vmax_f32(a1, a2);
+ // CHECK llvm.aarch64.neon.fmax.v2f32
+}
+
+int32x2_t test_vmax_s32(int32x2_t a1, int32x2_t a2) {
+ // CHECK: test_vmax_s32
+ return vmax_s32(a1, a2);
+ // CHECK llvm.aarch64.neon.smax.v2i32
+}
+
+uint32x2_t test_vmin_u32(uint32x2_t a1, uint32x2_t a2) {
+ // CHECK: test_vmin_u32
+ return vmin_u32(a1, a2);
+ // CHECK llvm.aarch64.neon.umin.v2i32
+}
+
+float32_t test_vmaxnmv_f32(float32x2_t a1) {
+ // CHECK: test_vmaxnmv_f32
+ return vmaxnmv_f32(a1);
+ // CHECK: llvm.aarch64.neon.fmaxnmv.f32.v2f32
+ // CHECK-NEXT: ret
+}
+
+// this doesn't translate into a valid instruction, regardless of what the
+// ARM doc says.
+#if 0
+float64_t test_vmaxnmvq_f64(float64x2_t a1) {
+ // CHECK@ test_vmaxnmvq_f64
+ return vmaxnmvq_f64(a1);
+ // CHECK@ llvm.aarch64.neon.saddlv.i64.v2i32
+ // CHECK-NEXT@ ret
+}
+#endif
+
+float32_t test_vmaxnmvq_f32(float32x4_t a1) {
+ // CHECK: test_vmaxnmvq_f32
+ return vmaxnmvq_f32(a1);
+ // CHECK: llvm.aarch64.neon.fmaxnmv.f32.v4f32
+ // CHECK-NEXT: ret
+}
+
+float32_t test_vmaxv_f32(float32x2_t a1) {
+ // CHECK: test_vmaxv_f32
+ return vmaxv_f32(a1);
+ // CHECK: llvm.aarch64.neon.fmaxv.f32.v2f32
+ // FIXME check that the 2nd and 3rd arguments are the same V register below
+ // CHECK-CODEGEN: fmaxp.2s
+ // CHECK-NEXT: ret
+}
+
+int32_t test_vmaxv_s32(int32x2_t a1) {
+ // CHECK: test_vmaxv_s32
+ return vmaxv_s32(a1);
+ // CHECK: llvm.aarch64.neon.smaxv.i32.v2i32
+ // FIXME check that the 2nd and 3rd arguments are the same V register below
+ // CHECK-CODEGEN: smaxp.2s
+ // CHECK-NEXT: ret
+}
+
+uint32_t test_vmaxv_u32(uint32x2_t a1) {
+ // CHECK: test_vmaxv_u32
+ return vmaxv_u32(a1);
+ // CHECK: llvm.aarch64.neon.umaxv.i32.v2i32
+ // FIXME check that the 2nd and 3rd arguments are the same V register below
+ // CHECK-CODEGEN: umaxp.2s
+ // CHECK-NEXT: ret
+}
+
+// FIXME punt on this for now; don't forget to fix CHECKs
+#if 0
+float64_t test_vmaxvq_f64(float64x2_t a1) {
+ // CHECK@ test_vmaxvq_f64
+ return vmaxvq_f64(a1);
+ // CHECK@ llvm.aarch64.neon.fmaxv.i64.v2f64
+ // CHECK-NEXT@ ret
+}
+#endif
+
+float32_t test_vmaxvq_f32(float32x4_t a1) {
+ // CHECK: test_vmaxvq_f32
+ return vmaxvq_f32(a1);
+ // CHECK: llvm.aarch64.neon.fmaxv.f32.v4f32
+ // CHECK-NEXT: ret
+}
+
+float32_t test_vminnmv_f32(float32x2_t a1) {
+ // CHECK: test_vminnmv_f32
+ return vminnmv_f32(a1);
+ // CHECK: llvm.aarch64.neon.fminnmv.f32.v2f32
+ // CHECK-NEXT: ret
+}
+
+float32_t test_vminvq_f32(float32x4_t a1) {
+ // CHECK: test_vminvq_f32
+ return vminvq_f32(a1);
+ // CHECK: llvm.aarch64.neon.fminv.f32.v4f32
+ // CHECK-NEXT: ret
+}
+
+// this doesn't translate into a valid instruction, regardless of what the ARM
+// doc says.
+#if 0
+float64_t test_vminnmvq_f64(float64x2_t a1) {
+ // CHECK@ test_vminnmvq_f64
+ return vminnmvq_f64(a1);
+ // CHECK@ llvm.aarch64.neon.saddlv.i64.v2i32
+ // CHECK-NEXT@ ret
+}
+#endif
+
+float32_t test_vminnmvq_f32(float32x4_t a1) {
+ // CHECK: test_vminnmvq_f32
+ return vminnmvq_f32(a1);
+ // CHECK: llvm.aarch64.neon.fminnmv.f32.v4f32
+ // CHECK-NEXT: ret
+}
+
+float32_t test_vminv_f32(float32x2_t a1) {
+ // CHECK: test_vminv_f32
+ return vminv_f32(a1);
+ // CHECK: llvm.aarch64.neon.fminv.f32.v2f32
+ // CHECK-NEXT: ret
+}
+
+int32_t test_vminv_s32(int32x2_t a1) {
+ // CHECK: test_vminv_s32
+ return vminv_s32(a1);
+ // CHECK: llvm.aarch64.neon.sminv.i32.v2i32
+ // CHECK-CODEGEN: sminp.2s
+ // CHECK-NEXT: ret
+}
+
+uint32_t test_vminv_u32(uint32x2_t a1) {
+ // CHECK: test_vminv_u32
+ return vminv_u32(a1);
+ // CHECK: llvm.aarch64.neon.fminv.f32.v2f32
+}
+
+// FIXME punt on this for now; don't forget to fix CHECKs
+#if 0
+float64_t test_vminvq_f64(float64x2_t a1) {
+ // CHECK@ test_vminvq_f64
+ return vminvq_f64(a1);
+ // CHECK@ llvm.aarch64.neon.saddlv.i64.v2i32
+ // CHECK-NEXT@ ret
+}
+#endif
diff --git a/test/CodeGen/arm64_vadd.c b/test/CodeGen/arm64_vadd.c
new file mode 100644
index 000000000000..7b2913f1a391
--- /dev/null
+++ b/test/CodeGen/arm64_vadd.c
@@ -0,0 +1,102 @@
+// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s
+// Test ARM64 SIMD add intrinsics
+
+#include <arm_neon.h>
+int64_t test_vaddlv_s32(int32x2_t a1) {
+ // CHECK: test_vaddlv_s32
+ return vaddlv_s32(a1);
+ // CHECK: llvm.aarch64.neon.saddlv.i64.v2i32
+ // CHECK-NEXT: ret
+}
+
+uint64_t test_vaddlv_u32(uint32x2_t a1) {
+ // CHECK: test_vaddlv_u32
+ return vaddlv_u32(a1);
+ // CHECK: llvm.aarch64.neon.uaddlv.i64.v2i32
+ // CHECK-NEXT: ret
+}
+
+int8_t test_vaddv_s8(int8x8_t a1) {
+ // CHECK: test_vaddv_s8
+ return vaddv_s8(a1);
+ // CHECK: llvm.aarch64.neon.saddv.i32.v8i8
+ // don't check for return here (there's a trunc?)
+}
+
+int16_t test_vaddv_s16(int16x4_t a1) {
+ // CHECK: test_vaddv_s16
+ return vaddv_s16(a1);
+ // CHECK: llvm.aarch64.neon.saddv.i32.v4i16
+ // don't check for return here (there's a trunc?)
+}
+
+int32_t test_vaddv_s32(int32x2_t a1) {
+ // CHECK: test_vaddv_s32
+ return vaddv_s32(a1);
+ // CHECK: llvm.aarch64.neon.saddv.i32.v2i32
+ // CHECK-NEXT: ret
+}
+
+uint8_t test_vaddv_u8(int8x8_t a1) {
+ // CHECK: test_vaddv_u8
+ return vaddv_u8(a1);
+ // CHECK: llvm.aarch64.neon.uaddv.i32.v8i8
+ // don't check for return here (there's a trunc?)
+}
+
+uint16_t test_vaddv_u16(int16x4_t a1) {
+ // CHECK: test_vaddv_u16
+ return vaddv_u16(a1);
+ // CHECK: llvm.aarch64.neon.uaddv.i32.v4i16
+ // don't check for return here (there's a trunc?)
+}
+
+uint32_t test_vaddv_u32(int32x2_t a1) {
+ // CHECK: test_vaddv_u32
+ return vaddv_u32(a1);
+ // CHECK: llvm.aarch64.neon.uaddv.i32.v2i32
+ // CHECK-NEXT: ret
+}
+
+int8_t test_vaddvq_s8(int8x16_t a1) {
+ // CHECK: test_vaddvq_s8
+ return vaddvq_s8(a1);
+ // CHECK: llvm.aarch64.neon.saddv.i32.v16i8
+ // don't check for return here (there's a trunc?)
+}
+
+int16_t test_vaddvq_s16(int16x8_t a1) {
+ // CHECK: test_vaddvq_s16
+ return vaddvq_s16(a1);
+ // CHECK: llvm.aarch64.neon.saddv.i32.v8i16
+ // don't check for return here (there's a trunc?)
+}
+
+int32_t test_vaddvq_s32(int32x4_t a1) {
+ // CHECK: test_vaddvq_s32
+ return vaddvq_s32(a1);
+ // CHECK: llvm.aarch64.neon.saddv.i32.v4i32
+ // CHECK-NEXT: ret
+}
+
+uint8_t test_vaddvq_u8(int8x16_t a1) {
+ // CHECK: test_vaddvq_u8
+ return vaddvq_u8(a1);
+ // CHECK: llvm.aarch64.neon.uaddv.i32.v16i8
+ // don't check for return here (there's a trunc?)
+}
+
+uint16_t test_vaddvq_u16(int16x8_t a1) {
+ // CHECK: test_vaddvq_u16
+ return vaddvq_u16(a1);
+ // CHECK: llvm.aarch64.neon.uaddv.i32.v8i16
+ // don't check for return here (there's a trunc?)
+}
+
+uint32_t test_vaddvq_u32(int32x4_t a1) {
+ // CHECK: test_vaddvq_u32
+ return vaddvq_u32(a1);
+ // CHECK: llvm.aarch64.neon.uaddv.i32.v4i32
+ // CHECK-NEXT: ret
+}
+
diff --git a/test/CodeGen/arm64_vca.c b/test/CodeGen/arm64_vca.c
new file mode 100644
index 000000000000..00cc283063b8
--- /dev/null
+++ b/test/CodeGen/arm64_vca.c
@@ -0,0 +1,59 @@
+// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s
+// Test ARM64 vector compare absolute intrinsics
+
+#include <arm_neon.h>
+
+uint32x2_t test_vcale_f32(float32x2_t a1, float32x2_t a2) {
+ // CHECK: test_vcale_f32
+ return vcale_f32(a1, a2);
+ // CHECK: llvm.aarch64.neon.facge.v2i32.v2f32
+ // no check for ret here, as there is a bitcast
+}
+
+uint32x4_t test_vcaleq_f32(float32x4_t a1, float32x4_t a2) {
+ // CHECK: test_vcaleq_f32
+ return vcaleq_f32(a1, a2);
+ // CHECK: llvm.aarch64.neon.facge.v4i32.v4f32{{.*a2,.*a1}}
+ // no check for ret here, as there is a bitcast
+}
+
+uint32x2_t test_vcalt_f32(float32x2_t a1, float32x2_t a2) {
+ // CHECK: test_vcalt_f32
+ return vcalt_f32(a1, a2);
+ // CHECK: llvm.aarch64.neon.facgt.v2i32.v2f32{{.*a2,.*a1}}
+ // no check for ret here, as there is a bitcast
+}
+
+uint32x4_t test_vcaltq_f32(float32x4_t a1, float32x4_t a2) {
+ // CHECK: test_vcaltq_f32
+ return vcaltq_f32(a1, a2);
+ // CHECK: llvm.aarch64.neon.facgt.v4i32.v4f32{{.*a2,.*a1}}
+}
+
+uint64x2_t test_vcagtq_f64(float64x2_t a1, float64x2_t a2) {
+ // CHECK: test_vcagtq_f64
+ return vcagtq_f64(a1, a2);
+ // CHECK: llvm.aarch64.neon.facgt.v2i64.v2f64{{.*a1,.*a2}}
+ // no check for ret here, as there is a bitcast
+}
+
+uint64x2_t test_vcaltq_f64(float64x2_t a1, float64x2_t a2) {
+ // CHECK: test_vcaltq_f64
+ return vcaltq_f64(a1, a2);
+ // CHECK: llvm.aarch64.neon.facgt.v2i64.v2f64{{.*a2,.*a1}}
+ // no check for ret here, as there is a bitcast
+}
+
+uint64x2_t test_vcageq_f64(float64x2_t a1, float64x2_t a2) {
+ // CHECK: test_vcageq_f64
+ return vcageq_f64(a1, a2);
+ // CHECK: llvm.aarch64.neon.facge.v2i64.v2f64{{.*a1,.*a2}}
+ // no check for ret here, as there is a bitcast
+}
+
+uint64x2_t test_vcaleq_f64(float64x2_t a1, float64x2_t a2) {
+ // CHECK: test_vcaleq_f64
+ return vcaleq_f64(a1, a2);
+ // CHECK: llvm.aarch64.neon.facge.v2i64.v2f64{{.*a2,.*a1}}
+ // no check for ret here, as there is a bitcast
+}
diff --git a/test/CodeGen/arm64_vcopy.c b/test/CodeGen/arm64_vcopy.c
new file mode 100644
index 000000000000..990d4f658cbc
--- /dev/null
+++ b/test/CodeGen/arm64_vcopy.c
@@ -0,0 +1,69 @@
+// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s
+
+// Test ARM64 SIMD copy vector element to vector element: vcopyq_lane*
+
+#include <arm_neon.h>
+
+int8x16_t test_vcopyq_laneq_s8(int8x16_t a1, int8x16_t a2) {
+ // CHECK-LABEL: test_vcopyq_laneq_s8
+ return vcopyq_laneq_s8(a1, (int64_t) 3, a2, (int64_t) 13);
+ // CHECK: shufflevector <16 x i8> %a1, <16 x i8> %a2, <16 x i32> <i32 0, i32 1, i32 2, i32 29, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
+}
+
+uint8x16_t test_vcopyq_laneq_u8(uint8x16_t a1, uint8x16_t a2) {
+ // CHECK-LABEL: test_vcopyq_laneq_u8
+ return vcopyq_laneq_u8(a1, (int64_t) 3, a2, (int64_t) 13);
+ // CHECK: shufflevector <16 x i8> %a1, <16 x i8> %a2, <16 x i32> <i32 0, i32 1, i32 2, i32 29, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
+
+}
+
+int16x8_t test_vcopyq_laneq_s16(int16x8_t a1, int16x8_t a2) {
+ // CHECK-LABEL: test_vcopyq_laneq_s16
+ return vcopyq_laneq_s16(a1, (int64_t) 3, a2, (int64_t) 7);
+ // CHECK: shufflevector <8 x i16> %a1, <8 x i16> %a2, <8 x i32> <i32 0, i32 1, i32 2, i32 15, i32 4, i32 5, i32 6, i32 7>
+
+}
+
+uint16x8_t test_vcopyq_laneq_u16(uint16x8_t a1, uint16x8_t a2) {
+ // CHECK-LABEL: test_vcopyq_laneq_u16
+ return vcopyq_laneq_u16(a1, (int64_t) 3, a2, (int64_t) 7);
+ // CHECK: shufflevector <8 x i16> %a1, <8 x i16> %a2, <8 x i32> <i32 0, i32 1, i32 2, i32 15, i32 4, i32 5, i32 6, i32 7>
+
+}
+
+int32x4_t test_vcopyq_laneq_s32(int32x4_t a1, int32x4_t a2) {
+ // CHECK-LABEL: test_vcopyq_laneq_s32
+ return vcopyq_laneq_s32(a1, (int64_t) 3, a2, (int64_t) 3);
+ // CHECK: shufflevector <4 x i32> %a1, <4 x i32> %a2, <4 x i32> <i32 0, i32 1, i32 2, i32 7>
+}
+
+uint32x4_t test_vcopyq_laneq_u32(uint32x4_t a1, uint32x4_t a2) {
+ // CHECK-LABEL: test_vcopyq_laneq_u32
+ return vcopyq_laneq_u32(a1, (int64_t) 3, a2, (int64_t) 3);
+ // CHECK: shufflevector <4 x i32> %a1, <4 x i32> %a2, <4 x i32> <i32 0, i32 1, i32 2, i32 7>
+}
+
+int64x2_t test_vcopyq_laneq_s64(int64x2_t a1, int64x2_t a2) {
+ // CHECK-LABEL: test_vcopyq_laneq_s64
+ return vcopyq_laneq_s64(a1, (int64_t) 0, a2, (int64_t) 1);
+ // CHECK: shufflevector <2 x i64> %a1, <2 x i64> %a2, <2 x i32> <i32 3, i32 1>
+}
+
+uint64x2_t test_vcopyq_laneq_u64(uint64x2_t a1, uint64x2_t a2) {
+ // CHECK-LABEL: test_vcopyq_laneq_u64
+ return vcopyq_laneq_u64(a1, (int64_t) 0, a2, (int64_t) 1);
+ // CHECK: shufflevector <2 x i64> %a1, <2 x i64> %a2, <2 x i32> <i32 3, i32 1>
+}
+
+float32x4_t test_vcopyq_laneq_f32(float32x4_t a1, float32x4_t a2) {
+ // CHECK-LABEL: test_vcopyq_laneq_f32
+ return vcopyq_laneq_f32(a1, 0, a2, 3);
+ // CHECK: shufflevector <4 x float> %a1, <4 x float> %a2, <4 x i32> <i32 7, i32 1, i32 2, i32 3>
+}
+
+float64x2_t test_vcopyq_laneq_f64(float64x2_t a1, float64x2_t a2) {
+ // CHECK-LABEL: test_vcopyq_laneq_f64
+ return vcopyq_laneq_f64(a1, 0, a2, 1);
+ // CHECK: shufflevector <2 x double> %a1, <2 x double> %a2, <2 x i32> <i32 3, i32 1>
+}
+
diff --git a/test/CodeGen/arm64_vcreate.c b/test/CodeGen/arm64_vcreate.c
new file mode 100644
index 000000000000..b9747525340a
--- /dev/null
+++ b/test/CodeGen/arm64_vcreate.c
@@ -0,0 +1,23 @@
+// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s
+// Test ARM64 SIMD vcreate intrinsics
+
+/*#include <arm_neon.h>*/
+#include <arm_neon.h>
+
+float32x2_t test_vcreate_f32(uint64_t a1) {
+ // CHECK: test_vcreate_f32
+ return vcreate_f32(a1);
+ // CHECK: bitcast {{.*}} to <2 x float>
+ // CHECK-NEXT: ret
+}
+
+// FIXME enable when scalar_to_vector in backend is fixed. Also, change
+// CHECK@ to CHECK<colon> and CHECK-NEXT@ to CHECK-NEXT<colon>
+/*
+float64x1_t test_vcreate_f64(uint64_t a1) {
+ // CHECK@ test_vcreate_f64
+ return vcreate_f64(a1);
+ // CHECK@ llvm.aarch64.neon.saddlv.i64.v2i32
+ // CHECK-NEXT@ ret
+}
+*/
diff --git a/test/CodeGen/arm64_vcvtfp.c b/test/CodeGen/arm64_vcvtfp.c
new file mode 100644
index 000000000000..e3dca8159931
--- /dev/null
+++ b/test/CodeGen/arm64_vcvtfp.c
@@ -0,0 +1,48 @@
+// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s
+
+#include <arm_neon.h>
+
+float64x2_t test_vcvt_f64_f32(float32x2_t x) {
+ // CHECK-LABEL: test_vcvt_f64_f32
+ return vcvt_f64_f32(x);
+ // CHECK: fpext <2 x float> {{%.*}} to <2 x double>
+ // CHECK-NEXT: ret
+}
+
+float64x2_t test_vcvt_high_f64_f32(float32x4_t x) {
+ // CHECK-LABEL: test_vcvt_high_f64_f32
+ return vcvt_high_f64_f32(x);
+ // CHECK: [[HIGH:%.*]] = shufflevector <4 x float> {{%.*}}, <4 x float> undef, <2 x i32> <i32 2, i32 3>
+ // CHECK-NEXT: fpext <2 x float> [[HIGH]] to <2 x double>
+ // CHECK-NEXT: ret
+}
+
+float32x2_t test_vcvt_f32_f64(float64x2_t v) {
+ // CHECK: test_vcvt_f32_f64
+ return vcvt_f32_f64(v);
+ // CHECK: fptrunc <2 x double> {{%.*}} to <2 x float>
+ // CHECK-NEXT: ret
+}
+
+float32x4_t test_vcvt_high_f32_f64(float32x2_t x, float64x2_t v) {
+ // CHECK: test_vcvt_high_f32_f64
+ return vcvt_high_f32_f64(x, v);
+ // CHECK: [[TRUNC:%.*]] = fptrunc <2 x double> {{.*}} to <2 x float>
+ // CHECK-NEXT: shufflevector <2 x float> {{.*}}, <2 x float> [[TRUNC]], <4 x i32> <i32 0, i32 1, i32 2, i32 3>
+ // CHECK-NEXT: ret
+}
+
+float32x2_t test_vcvtx_f32_f64(float64x2_t v) {
+ // CHECK: test_vcvtx_f32_f64
+ return vcvtx_f32_f64(v);
+ // CHECK: llvm.aarch64.neon.fcvtxn.v2f32.v2f64
+ // CHECK-NEXT: ret
+}
+
+float32x4_t test_vcvtx_high_f32_f64(float32x2_t x, float64x2_t v) {
+ // CHECK: test_vcvtx_high_f32_f64
+ return vcvtx_high_f32_f64(x, v);
+ // CHECK: llvm.aarch64.neon.fcvtxn.v2f32.v2f64
+ // CHECK: shufflevector
+ // CHECK: ret
+}
diff --git a/test/CodeGen/arm64_vdup.c b/test/CodeGen/arm64_vdup.c
new file mode 100644
index 000000000000..8419828b38d2
--- /dev/null
+++ b/test/CodeGen/arm64_vdup.c
@@ -0,0 +1,42 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s
+// Test ARM64 SIMD duplicate lane and n intrinsics
+
+#include <arm_neon.h>
+
+void test_vdup_lane_s64(int64x1_t a1) {
+ // CHECK-LABEL: test_vdup_lane_s64
+ vdup_lane_s64(a1, 0);
+ // CHECK: shufflevector
+}
+
+void test_vdup_lane_u64(uint64x1_t a1) {
+ // CHECK-LABEL: test_vdup_lane_u64
+ vdup_lane_u64(a1, 0);
+ // CHECK: shufflevector
+}
+
+// uncomment out the following code once scalar_to_vector in the backend
+// works (for 64 bit?). Change the "CHECK@" to "CHECK<colon>"
+/*
+float64x1_t test_vdup_n_f64(float64_t a1) {
+ // CHECK-LABEL@ test_vdup_n_f64
+ return vdup_n_f64(a1);
+ // match that an element is inserted into part 0
+ // CHECK@ insertelement {{.*, i32 0 *$}}
+}
+*/
+
+float16x8_t test_vdupq_n_f16(float16_t *a1) {
+ // CHECK-LABEL: test_vdupq_n_f16
+ return vdupq_n_f16(*a1);
+ // match that an element is inserted into parts 0-7. The backend better
+ // turn that into a single dup intruction
+ // CHECK: insertelement {{.*, i32 0 *$}}
+ // CHECK: insertelement {{.*, i32 1 *$}}
+ // CHECK: insertelement {{.*, i32 2 *$}}
+ // CHECK: insertelement {{.*, i32 3 *$}}
+ // CHECK: insertelement {{.*, i32 4 *$}}
+ // CHECK: insertelement {{.*, i32 5 *$}}
+ // CHECK: insertelement {{.*, i32 6 *$}}
+ // CHECK: insertelement {{.*, i32 7 *$}}
+}
diff --git a/test/CodeGen/arm64_vdupq_n_f64.c b/test/CodeGen/arm64_vdupq_n_f64.c
new file mode 100644
index 000000000000..ffba55cf8f56
--- /dev/null
+++ b/test/CodeGen/arm64_vdupq_n_f64.c
@@ -0,0 +1,88 @@
+// RUN: %clang_cc1 -O3 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - %s | FileCheck %s
+// RUN: %clang_cc1 -O3 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | \
+// RUN: FileCheck -check-prefix=CHECK-IR %s
+// REQUIRES: aarch64-registered-target
+
+/// Test vdupq_n_f64 and vmovq_nf64 ARM64 intrinsics
+// <rdar://problem/11778405> ARM64: vdupq_n_f64 and vdupq_lane_f64 intrinsics
+// missing
+
+
+#include <arm_neon.h>
+
+// vdupq_n_f64 -> dup.2d v0, v0[0]
+//
+float64x2_t test_vdupq_n_f64(float64_t w)
+{
+ return vdupq_n_f64(w);
+ // CHECK-LABEL: test_vdupq_n_f64:
+ // CHECK: dup.2d v0, v0[0]
+ // CHECK-NEXT: ret
+}
+
+// might as well test this while we're here
+// vdupq_n_f32 -> dup.4s v0, v0[0]
+float32x4_t test_vdupq_n_f32(float32_t w)
+{
+ return vdupq_n_f32(w);
+ // CHECK-LABEL: test_vdupq_n_f32:
+ // CHECK: dup.4s v0, v0[0]
+ // CHECK-NEXT: ret
+}
+
+// vdupq_lane_f64 -> dup.2d v0, v0[0]
+// this was in <rdar://problem/11778405>, but had already been implemented,
+// test anyway
+float64x2_t test_vdupq_lane_f64(float64x1_t V)
+{
+ return vdupq_lane_f64(V, 0);
+ // CHECK-LABEL: test_vdupq_lane_f64:
+ // CHECK: dup.2d v0, v0[0]
+ // CHECK-NEXT: ret
+}
+
+// vmovq_n_f64 -> dup Vd.2d,X0
+// this wasn't in <rdar://problem/11778405>, but it was between the vdups
+float64x2_t test_vmovq_n_f64(float64_t w)
+{
+ return vmovq_n_f64(w);
+ // CHECK-LABEL: test_vmovq_n_f64:
+ // CHECK: dup.2d v0, v0[0]
+ // CHECK-NEXT: ret
+}
+
+float16x4_t test_vmov_n_f16(float16_t *a1)
+{
+ // CHECK-IR-LABEL: test_vmov_n_f16
+ return vmov_n_f16(*a1);
+ // CHECK-IR: insertelement {{.*}} i32 0{{ *$}}
+ // CHECK-IR: insertelement {{.*}} i32 1{{ *$}}
+ // CHECK-IR: insertelement {{.*}} i32 2{{ *$}}
+ // CHECK-IR: insertelement {{.*}} i32 3{{ *$}}
+}
+
+// Disable until scalar problem in backend is fixed. Change CHECK-IR@ to
+// CHECK-IR<colon>
+/*
+float64x1_t test_vmov_n_f64(float64_t a1)
+{
+ // CHECK-IR@ test_vmov_n_f64
+ return vmov_n_f64(a1);
+ // CHECK-IR@ insertelement {{.*}} i32 0{{ *$}}
+}
+*/
+
+float16x8_t test_vmovq_n_f16(float16_t *a1)
+{
+ // CHECK-IR-LABEL: test_vmovq_n_f16
+ return vmovq_n_f16(*a1);
+ // CHECK-IR: insertelement {{.*}} i32 0{{ *$}}
+ // CHECK-IR: insertelement {{.*}} i32 1{{ *$}}
+ // CHECK-IR: insertelement {{.*}} i32 2{{ *$}}
+ // CHECK-IR: insertelement {{.*}} i32 3{{ *$}}
+ // CHECK-IR: insertelement {{.*}} i32 4{{ *$}}
+ // CHECK-IR: insertelement {{.*}} i32 5{{ *$}}
+ // CHECK-IR: insertelement {{.*}} i32 6{{ *$}}
+ // CHECK-IR: insertelement {{.*}} i32 7{{ *$}}
+}
+
diff --git a/test/CodeGen/arm64_vecCmpBr.c b/test/CodeGen/arm64_vecCmpBr.c
new file mode 100644
index 000000000000..3ae7433baed1
--- /dev/null
+++ b/test/CodeGen/arm64_vecCmpBr.c
@@ -0,0 +1,111 @@
+// RUN: %clang_cc1 -O3 -triple arm64-apple-ios7 -target-feature +neon -S -ffreestanding %s -o - -target-cpu cyclone | FileCheck %s
+// REQUIRES: aarch64-registered-target
+// test code generation for <rdar://problem/11487757>
+#include <arm_neon.h>
+
+unsigned bar();
+
+// Branch if any lane of V0 is zero; 64 bit => !min
+unsigned anyZero64(uint16x4_t a) {
+// CHECK: anyZero64:
+// CHECK: uminv.8b b[[REGNO1:[0-9]+]], v0
+// CHECK-NEXT: fmov w[[REGNO2:[0-9]+]], s[[REGNO1]]
+// CHECK-NEXT: cbz w[[REGNO2]], [[LABEL:[.A-Z_0-9]+]]
+// CHECK: [[LABEL]]:
+// CHECK-NEXT: b {{_bar|bar}}
+ if (!vminv_u8(a))
+ return bar();
+ return 0;
+}
+
+// Branch if any lane of V0 is zero; 128 bit => !min
+unsigned anyZero128(uint16x8_t a) {
+// CHECK: anyZero128:
+// CHECK: uminv.16b b[[REGNO1:[0-9]+]], v0
+// CHECK-NEXT: fmov w[[REGNO2:[0-9]+]], s[[REGNO1]]
+// CHECK-NEXT: cbz w[[REGNO2]], [[LABEL:[.A-Z_0-9]+]]
+// CHECK: [[LABEL]]:
+// CHECK-NEXT: b {{_bar|bar}}
+ if (!vminvq_u8(a))
+ return bar();
+ return 0;
+}
+
+// Branch if any lane of V0 is non-zero; 64 bit => max
+unsigned anyNonZero64(uint16x4_t a) {
+// CHECK: anyNonZero64:
+// CHECK: umaxv.8b b[[REGNO1:[0-9]+]], v0
+// CHECK-NEXT: fmov w[[REGNO2:[0-9]+]], s[[REGNO1]]
+// CHECK-NEXT: cbz w[[REGNO2]], [[LABEL:[.A-Z_0-9]+]]
+// CHECK: [[LABEL]]:
+// CHECK-NEXT: movz w0, #0
+ if (vmaxv_u8(a))
+ return bar();
+ return 0;
+}
+
+// Branch if any lane of V0 is non-zero; 128 bit => max
+unsigned anyNonZero128(uint16x8_t a) {
+// CHECK: anyNonZero128:
+// CHECK: umaxv.16b b[[REGNO1:[0-9]+]], v0
+// CHECK-NEXT: fmov w[[REGNO2:[0-9]+]], s[[REGNO1]]
+// CHECK-NEXT: cbz w[[REGNO2]], [[LABEL:[.A-Z_0-9]+]]
+// CHECK: [[LABEL]]:
+// CHECK-NEXT: movz w0, #0
+ if (vmaxvq_u8(a))
+ return bar();
+ return 0;
+}
+
+// Branch if all lanes of V0 are zero; 64 bit => !max
+unsigned allZero64(uint16x4_t a) {
+// CHECK: allZero64:
+// CHECK: umaxv.8b b[[REGNO1:[0-9]+]], v0
+// CHECK-NEXT: fmov w[[REGNO2:[0-9]+]], s[[REGNO1]]
+// CHECK-NEXT: cbz w[[REGNO2]], [[LABEL:[.A-Z_0-9]+]]
+// CHECK: [[LABEL]]:
+// CHECK-NEXT: b {{_bar|bar}}
+ if (!vmaxv_u8(a))
+ return bar();
+ return 0;
+}
+
+// Branch if all lanes of V0 are zero; 128 bit => !max
+unsigned allZero128(uint16x8_t a) {
+// CHECK: allZero128:
+// CHECK: umaxv.16b b[[REGNO1:[0-9]+]], v0
+// CHECK-NEXT: fmov w[[REGNO2:[0-9]+]], s[[REGNO1]]
+// CHECK-NEXT: cbz w[[REGNO2]], [[LABEL:[.A-Z_0-9]+]]
+// CHECK: [[LABEL]]:
+// CHECK-NEXT: b {{_bar|bar}}
+ if (!vmaxvq_u8(a))
+ return bar();
+ return 0;
+}
+
+// Branch if all lanes of V0 are non-zero; 64 bit => min
+unsigned allNonZero64(uint16x4_t a) {
+// CHECK: allNonZero64:
+// CHECK: uminv.8b b[[REGNO1:[0-9]+]], v0
+// CHECK-NEXT: fmov w[[REGNO2:[0-9]+]], s[[REGNO1]]
+// CHECK-NEXT: cbz w[[REGNO2]], [[LABEL:[.A-Z_0-9]+]]
+// CHECK: [[LABEL]]:
+// CHECK-NEXT: movz w0, #0
+ if (vminv_u8(a))
+ return bar();
+ return 0;
+}
+
+// Branch if all lanes of V0 are non-zero; 128 bit => min
+unsigned allNonZero128(uint16x8_t a) {
+// CHECK: allNonZero128:
+// CHECK: uminv.16b b[[REGNO1:[0-9]+]], v0
+// CHECK-NEXT: fmov w[[REGNO2:[0-9]+]], s[[REGNO1]]
+// CHECK-NEXT: cbz w[[REGNO2]], [[LABEL:[.A-Z_0-9]+]]
+// CHECK: [[LABEL]]:
+// CHECK-NEXT: movz w0, #0
+ if (vminvq_u8(a))
+ return bar();
+ return 0;
+}
+
diff --git a/test/CodeGen/arm64_vext.c b/test/CodeGen/arm64_vext.c
new file mode 100644
index 000000000000..6c3fe73399a1
--- /dev/null
+++ b/test/CodeGen/arm64_vext.c
@@ -0,0 +1,239 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s
+
+// Test ARM64 extract intrinsics
+// can use as back end test by adding a run line with
+// -check-prefix=CHECK-CODEGEN on the FileCheck
+
+#include <arm_neon.h>
+
+void test_vext_s8()
+{
+ // CHECK: test_vext_s8
+ int8x8_t xS8x8;
+ xS8x8 = vext_s8(xS8x8, xS8x8, 1);
+ // CHECK: shufflevector
+ // CHECK-CODEGEN: test_vext_s8:
+ // CHECK-CODEGEN: {{ext.8.*#1}}
+}
+
+void test_vext_u8()
+{
+ // CHECK: test_vext_u8
+ uint8x8_t xU8x8;
+ xU8x8 = vext_u8(xU8x8, xU8x8, 2);
+ // CHECK: shufflevector
+ // CHECK-CODEGEN: test_vext_u8:
+ // CHECK-CODEGEN: {{ext.8.*#2}}
+}
+
+void test_vext_p8()
+{
+ // CHECK: test_vext_p8
+ poly8x8_t xP8x8;
+ xP8x8 = vext_p8(xP8x8, xP8x8, 3);
+ // CHECK: shufflevector
+ // CHECK-CODEGEN: test_vext_p8:
+ // CHECK-CODEGEN: {{ext.8.*#3}}
+}
+
+void test_vext_s16()
+{
+ // CHECK: test_vext_s16
+ int16x4_t xS16x4;
+ xS16x4 = vext_s16(xS16x4, xS16x4, 1);
+ // CHECK: shufflevector
+ // CHECK-CODEGEN: test_vext_s16:
+ // CHECK-CODEGEN: {{ext.8.*#2}}
+}
+
+void test_vext_u16()
+{
+ // CHECK: test_vext_u16
+ uint16x4_t xU16x4;
+ xU16x4 = vext_u16(xU16x4, xU16x4, 2);
+ // CHECK: shufflevector
+ // CHECK-CODEGEN: test_vext_u16:
+ // CHECK-CODEGEN: {{ext.8.*#4}}
+}
+
+void test_vext_p16()
+{
+ // CHECK: test_vext_p16
+ poly16x4_t xP16x4;
+ xP16x4 = vext_p16(xP16x4, xP16x4, 3);
+ // CHECK: shufflevector
+ // CHECK-CODEGEN: test_vext_p16:
+ // CHECK-CODEGEN: {{ext.8.*#6}}
+}
+
+void test_vext_s32()
+{
+ // CHECK: test_vext_s32
+ int32x2_t xS32x2;
+ xS32x2 = vext_s32(xS32x2, xS32x2, 1);
+ // CHECK: shufflevector
+ // CHECK-CODEGEN: test_vext_s32:
+ // CHECK-CODEGEN: {{ext.8.*#4}}
+}
+
+void test_vext_u32()
+{
+ // CHECK: test_vext_u32
+ uint32x2_t xU32x2;
+ xU32x2 = vext_u32(xU32x2, xU32x2, 1);
+ // CHECK: shufflevector
+ // CHECK-CODEGEN: test_vext_u32:
+ // CHECK-CODEGEN: {{ext.8.*#4}}
+}
+
+void test_vext_f32()
+{
+ // CHECK: test_vext_f32
+ float32x2_t xF32x2;
+ xF32x2 = vext_f32(xF32x2, xF32x2, 1);
+ // CHECK: shufflevector
+ // CHECK-CODEGEN: test_vext_f32:
+ // CHECK-CODEGEN: {{ext.8.*#4}}
+}
+
+void test_vext_s64()
+{
+ // CHECK: test_vext_s64
+ int64x1_t xS64x1;
+ // FIXME don't use 1 as index or check for now, clang has a bug?
+ xS64x1 = vext_s64(xS64x1, xS64x1, /*1*/0);
+ // CHECK: shufflevector
+ // CHECK-CODEGEN: test_vext_s64:
+ // CHECK_FIXME: {{ext.8.*#0}}
+}
+
+void test_vext_u64()
+{
+ // CHECK: test_vext_u64
+ uint64x1_t xU64x1;
+ // FIXME don't use 1 as index or check for now, clang has a bug?
+ xU64x1 = vext_u64(xU64x1, xU64x1, /*1*/0);
+ // CHECK: shufflevector
+ // CHECK-CODEGEN: test_vext_u64:
+ // CHECK_FIXME: {{ext.8.*#0}}
+}
+
+void test_vextq_s8()
+{
+ // CHECK: test_vextq_s8
+ int8x16_t xS8x16;
+ xS8x16 = vextq_s8(xS8x16, xS8x16, 4);
+ // CHECK: shufflevector
+ // CHECK-CODEGEN: test_vextq_s8:
+ // CHECK-CODEGEN: {{ext.16.*#4}}
+}
+
+void test_vextq_u8()
+{
+ // CHECK: test_vextq_u8
+ uint8x16_t xU8x16;
+ xU8x16 = vextq_u8(xU8x16, xU8x16, 5);
+ // CHECK: shufflevector
+ // CHECK-CODEGEN: test_vextq_u8:
+ // CHECK-CODEGEN: {{ext.16.*#5}}
+}
+
+void test_vextq_p8()
+{
+ // CHECK: test_vextq_p8
+ poly8x16_t xP8x16;
+ xP8x16 = vextq_p8(xP8x16, xP8x16, 6);
+ // CHECK: shufflevector
+ // CHECK-CODEGEN: test_vextq_p8:
+ // CHECK-CODEGEN: {{ext.16.*#6}}
+}
+
+void test_vextq_s16()
+{
+ // CHECK: test_vextq_s16
+ int16x8_t xS16x8;
+ xS16x8 = vextq_s16(xS16x8, xS16x8, 7);
+ // CHECK: shufflevector
+ // CHECK-CODEGEN: test_vextq_s16:
+ // CHECK-CODEGEN: {{ext.16.*#14}}
+}
+
+void test_vextq_u16()
+{
+ // CHECK: test_vextq_u16
+ uint16x8_t xU16x8;
+ xU16x8 = vextq_u16(xU16x8, xU16x8, 4);
+ // CHECK: shufflevector
+ // CHECK-CODEGEN: test_vextq_u16:
+ // CHECK-CODEGEN: {{ext.16.*#8}}
+}
+
+void test_vextq_p16()
+{
+ // CHECK: test_vextq_p16
+ poly16x8_t xP16x8;
+ xP16x8 = vextq_p16(xP16x8, xP16x8, 5);
+ // CHECK: shufflevector
+ // CHECK-CODEGEN: test_vextq_p16:
+ // CHECK-CODEGEN: {{ext.16.*#10}}
+}
+
+void test_vextq_s32()
+{
+ // CHECK: test_vextq_s32
+ int32x4_t xS32x4;
+ xS32x4 = vextq_s32(xS32x4, xS32x4, 1);
+ // CHECK: shufflevector
+ // CHECK-CODEGEN: test_vextq_s32:
+ // CHECK-CODEGEN: {{ext.16.*#4}}
+}
+
+void test_vextq_u32()
+{
+ // CHECK: test_vextq_u32
+ uint32x4_t xU32x4;
+ xU32x4 = vextq_u32(xU32x4, xU32x4, 2);
+ // CHECK: shufflevector
+ // CHECK-CODEGEN: test_vextq_u32:
+ // CHECK-CODEGEN: {{ext.16.*#8}}
+}
+
+void test_vextq_f32()
+{
+ // CHECK: test_vextq_f32
+ float32x4_t xF32x4;
+ xF32x4 = vextq_f32(xF32x4, xF32x4, 3);
+ // CHECK: shufflevector
+ // CHECK-CODEGEN: test_vextq_f32:
+ // CHECK-CODEGEN: {{ext.16.*#12}}
+}
+
+void test_vextq_s64()
+{
+ // CHECK: test_vextq_s64
+ int64x2_t xS64x2;
+ xS64x2 = vextq_s64(xS64x2, xS64x2, 1);
+ // CHECK: shufflevector
+ // CHECK-CODEGEN: test_vextq_s64:
+ // CHECK-CODEGEN: {{ext.16.*#8}}
+}
+
+void test_vextq_u64()
+{
+ // CHECK: test_vextq_u64
+ uint64x2_t xU64x2;
+ xU64x2 = vextq_u64(xU64x2, xU64x2, 1);
+ // CHECK: shufflevector
+ // CHECK-CODEGEN: test_vextq_u64:
+ // CHECK-CODEGEN: {{ext.16.*#8}}
+}
+
+void test_vextq_f64()
+{
+ // CHECK: test_vextq_f64
+ float64x2_t xF64x2;
+ xF64x2 = vextq_f64(xF64x2, xF64x2, 1);
+ // CHECK: shufflevector
+ // CHECK-CODEGEN: test_vextq_u64:
+ // CHECK-CODEGEN: {{ext.16.*#8}}
+}
diff --git a/test/CodeGen/arm64_vfma.c b/test/CodeGen/arm64_vfma.c
new file mode 100644
index 000000000000..bfa568779638
--- /dev/null
+++ b/test/CodeGen/arm64_vfma.c
@@ -0,0 +1,136 @@
+// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s
+// Test ARM64 SIMD fused multiply add intrinsics
+
+#include <arm_neon.h>
+
+float32x2_t test_vfma_f32(float32x2_t a1, float32x2_t a2, float32x2_t a3) {
+ // CHECK: test_vfma_f32
+ return vfma_f32(a1, a2, a3);
+ // CHECK: llvm.fma.v2f32({{.*a2, .*a3, .*a1}})
+ // CHECK-NEXT: ret
+}
+
+float32x4_t test_vfmaq_f32(float32x4_t a1, float32x4_t a2, float32x4_t a3) {
+ // CHECK: test_vfmaq_f32
+ return vfmaq_f32(a1, a2, a3);
+ // CHECK: llvm.fma.v4f32({{.*a2, .*a3, .*a1}})
+ // CHECK-NEXT: ret
+}
+
+float64x2_t test_vfmaq_f64(float64x2_t a1, float64x2_t a2, float64x2_t a3) {
+ // CHECK: test_vfmaq_f64
+ return vfmaq_f64(a1, a2, a3);
+ // CHECK: llvm.fma.v2f64({{.*a2, .*a3, .*a1}})
+ // CHECK-NEXT: ret
+}
+
+float32x2_t test_vfma_lane_f32(float32x2_t a1, float32x2_t a2, float32x2_t a3) {
+ // CHECK: test_vfma_lane_f32
+ return vfma_lane_f32(a1, a2, a3, 1);
+ // NB: the test below is deliberately lose, so that we don't depend too much
+ // upon the exact IR used to select lane 1 (usually a shufflevector)
+ // CHECK: llvm.fma.v2f32(<2 x float> %a2, <2 x float> {{.*}}, <2 x float> %a1)
+ // CHECK-NEXT: ret
+}
+
+float32x4_t test_vfmaq_lane_f32(float32x4_t a1, float32x4_t a2, float32x2_t a3) {
+ // CHECK: test_vfmaq_lane_f32
+ return vfmaq_lane_f32(a1, a2, a3, 1);
+ // NB: the test below is deliberately lose, so that we don't depend too much
+ // upon the exact IR used to select lane 1 (usually a shufflevector)
+ // CHECK: llvm.fma.v4f32(<4 x float> %a2, <4 x float> {{.*}}, <4 x float> %a1)
+ // CHECK-NEXT: ret
+}
+
+float64x2_t test_vfmaq_lane_f64(float64x2_t a1, float64x2_t a2, float64x1_t a3) {
+ // CHECK: test_vfmaq_lane_f64
+ return vfmaq_lane_f64(a1, a2, a3, 0);
+ // NB: the test below is deliberately lose, so that we don't depend too much
+ // upon the exact IR used to select lane 1 (usually a shufflevector)
+ // CHECK: llvm.fma.v2f64(<2 x double> %a2, <2 x double> {{.*}}, <2 x double> %a1)
+ // CHECK-NEXT: ret
+}
+
+float32x2_t test_vfma_n_f32(float32x2_t a1, float32x2_t a2, float32_t a3) {
+ // CHECK: test_vfma_n_f32
+ return vfma_n_f32(a1, a2, a3);
+ // NB: the test below is deliberately lose, so that we don't depend too much
+ // upon the exact IR used to select lane 0 (usually two insertelements)
+ // CHECK: llvm.fma.v2f32
+ // CHECK-NEXT: ret
+}
+
+float32x4_t test_vfmaq_n_f32(float32x4_t a1, float32x4_t a2, float32_t a3) {
+ // CHECK: test_vfmaq_n_f32
+ return vfmaq_n_f32(a1, a2, a3);
+ // NB: the test below is deliberately lose, so that we don't depend too much
+ // upon the exact IR used to select lane 0 (usually four insertelements)
+ // CHECK: llvm.fma.v4f32
+ // CHECK-NEXT: ret
+}
+
+float64x2_t test_vfmaq_n_f64(float64x2_t a1, float64x2_t a2, float64_t a3) {
+ // CHECK: test_vfmaq_n_f64
+ return vfmaq_n_f64(a1, a2, a3);
+ // NB: the test below is deliberately lose, so that we don't depend too much
+ // upon the exact IR used to select lane 0 (usually two insertelements)
+ // CHECK: llvm.fma.v2f64
+ // CHECK-NEXT: ret
+}
+
+float32x2_t test_vfms_f32(float32x2_t a1, float32x2_t a2, float32x2_t a3) {
+ // CHECK: test_vfms_f32
+ return vfms_f32(a1, a2, a3);
+ // CHECK: [[NEG:%.*]] = fsub <2 x float> {{.*}}, %a2
+ // CHECK: llvm.fma.v2f32(<2 x float> %a3, <2 x float> [[NEG]], <2 x float> %a1)
+ // CHECK-NEXT: ret
+}
+
+float32x4_t test_vfmsq_f32(float32x4_t a1, float32x4_t a2, float32x4_t a3) {
+ // CHECK: test_vfmsq_f32
+ return vfmsq_f32(a1, a2, a3);
+ // CHECK: [[NEG:%.*]] = fsub <4 x float> {{.*}}, %a2
+ // CHECK: llvm.fma.v4f32(<4 x float> %a3, <4 x float> [[NEG]], <4 x float> %a1)
+ // CHECK-NEXT: ret
+}
+
+float64x2_t test_vfmsq_f64(float64x2_t a1, float64x2_t a2, float64x2_t a3) {
+ // CHECK: test_vfmsq_f64
+ return vfmsq_f64(a1, a2, a3);
+ // CHECK: [[NEG:%.*]] = fsub <2 x double> {{.*}}, %a2
+ // CHECK: llvm.fma.v2f64(<2 x double> %a3, <2 x double> [[NEG]], <2 x double> %a1)
+ // CHECK-NEXT: ret
+}
+
+float32x2_t test_vfms_lane_f32(float32x2_t a1, float32x2_t a2, float32x2_t a3) {
+ // CHECK: test_vfms_lane_f32
+ return vfms_lane_f32(a1, a2, a3, 1);
+ // NB: the test below is deliberately lose, so that we don't depend too much
+ // upon the exact IR used to select lane 1 (usually a shufflevector)
+ // CHECK: [[NEG:%.*]] = fsub <2 x float> {{.*}}, %a3
+ // CHECK: [[LANE:%.*]] = shufflevector <2 x float> [[NEG]]
+ // CHECK: llvm.fma.v2f32(<2 x float> {{.*}}, <2 x float> [[LANE]], <2 x float> %a1)
+ // CHECK-NEXT: ret
+}
+
+float32x4_t test_vfmsq_lane_f32(float32x4_t a1, float32x4_t a2, float32x2_t a3) {
+ // CHECK: test_vfmsq_lane_f32
+ return vfmsq_lane_f32(a1, a2, a3, 1);
+ // NB: the test below is deliberately lose, so that we don't depend too much
+ // upon the exact IR used to select lane 1 (usually a shufflevector)
+ // CHECK: [[NEG:%.*]] = fsub <2 x float> {{.*}}, %a3
+ // CHECK: [[LANE:%.*]] = shufflevector <2 x float> [[NEG]]
+ // CHECK: llvm.fma.v4f32(<4 x float> {{.*}}, <4 x float> [[LANE]], <4 x float> %a1)
+ // CHECK-NEXT: ret
+}
+
+float64x2_t test_vfmsq_lane_f64(float64x2_t a1, float64x2_t a2, float64x1_t a3) {
+ // CHECK: test_vfmsq_lane_f64
+ return vfmsq_lane_f64(a1, a2, a3, 0);
+ // NB: the test below is deliberately lose, so that we don't depend too much
+ // upon the exact IR used to select lane 1 (usually a shufflevector)
+ // CHECK: [[NEG:%.*]] = fsub <1 x double> {{.*}}, %a3
+ // CHECK: [[LANE:%.*]] = shufflevector <1 x double> [[NEG]]
+ // CHECK: llvm.fma.v2f64(<2 x double> {{.*}}, <2 x double> [[LANE]], <2 x double> %a1)
+ // CHECK-NEXT: ret
+}
diff --git a/test/CodeGen/arm64_vget.c b/test/CodeGen/arm64_vget.c
new file mode 100644
index 000000000000..62b68ef343c8
--- /dev/null
+++ b/test/CodeGen/arm64_vget.c
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s
+// Test ARM64 SIMD vget intrinsics
+
+#include <arm_neon.h>
+
+float64_t test_vget_lane_f64(float64x1_t a1) {
+ // CHECK: test_vget_lane_f64
+ // why isn't 1 allowed as second argument?
+ return vget_lane_f64(a1, 0);
+ // CHECK: extractelement {{.*}} i32 0
+ // CHECK-NEXT: ret
+}
+
diff --git a/test/CodeGen/arm64_vneg.c b/test/CodeGen/arm64_vneg.c
new file mode 100644
index 000000000000..d520ebd83af3
--- /dev/null
+++ b/test/CodeGen/arm64_vneg.c
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s
+// Test ARM64 SIMD negate and saturating negate intrinsics
+
+#include <arm_neon.h>
+
+int64x2_t test_vnegq_s64(int64x2_t a1) {
+ // CHECK: test_vnegq_s64
+ return vnegq_s64(a1);
+ // CHECK: sub <2 x i64> zeroinitializer, %a1
+ // CHECK-NEXT: ret
+}
+
+int64x2_t test_vqnegq_s64(int64x2_t a1) {
+ // CHECK: test_vqnegq_s64
+ return vqnegq_s64(a1);
+ // CHECK: llvm.aarch64.neon.sqneg.v2i64
+ // CHECK-NEXT: ret
+}
diff --git a/test/CodeGen/arm64_vqmov.c b/test/CodeGen/arm64_vqmov.c
new file mode 100644
index 000000000000..6480e669e5c7
--- /dev/null
+++ b/test/CodeGen/arm64_vqmov.c
@@ -0,0 +1,77 @@
+// RUN: %clang_cc1 -O3 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - %s | FileCheck %s
+// REQUIRES: aarch64-registered-target
+/// Test vqmov[u]n_high_<su>{16,32,64) ARM64 intrinsics
+
+#include <arm_neon.h>
+
+// vqmovn_high_s16 -> UQXTN2 Vd.16b,Vn.8h
+int8x16_t test_vqmovn_high_s16(int8x8_t Vdlow, int16x8_t Vn)
+{
+ return vqmovn_high_s16(Vdlow, Vn);
+ // CHECK: test_vqmovn_high_s16:
+ // CHECK: sqxtn2.16b {{v[0-9][0-9]*}}, {{v[0-9][0-9]*}}
+}
+
+// vqmovun_high_s16 -> UQXTN2 Vd.16b,Vn.8h
+uint8x16_t test_vqmovun_high_s16(uint8x8_t Vdlow, uint16x8_t Vn)
+{
+ return vqmovun_high_s16(Vdlow, Vn);
+ // CHECK: test_vqmovun_high_s16:
+ // CHECK: sqxtun2.16b {{v[0-9][0-9]*}}, {{v[0-9][0-9]*}}
+}
+
+// vqmovn_high_s32 -> SQXTN2 Vd.8h,Vn.4s
+int16x8_t test_vqmovn_high_s32(int16x4_t Vdlow, int32x4_t Vn)
+{
+ return vqmovn_high_s32(Vdlow, Vn);
+ // CHECK: test_vqmovn_high_s32:
+ // CHECK: sqxtn2.8h {{v[0-9][0-9]*}}, {{v[0-9][0-9]*}}
+}
+
+// vqmovn_high_u32 -> UQXTN2 Vd.8h,Vn.4s
+uint16x8_t test_vqmovn_high_u32(uint16x4_t Vdlow, uint32x4_t Vn)
+{
+ return vqmovn_high_u32(Vdlow, Vn);
+ // CHECK: test_vqmovn_high_u32:
+ // CHECK: uqxtn2.8h {{v[0-9][0-9]*}}, {{v[0-9][0-9]*}}
+}
+
+// vqmovn_high_s64 -> SQXTN2 Vd.4s,Vn.2d
+int32x4_t test_vqmovn_high_s64(int32x2_t Vdlow, int64x2_t Vn)
+{
+ return vqmovn_high_s64(Vdlow, Vn);
+ // CHECK: test_vqmovn_high_s64:
+ // CHECK: sqxtn2.4s {{v[0-9][0-9]*}}, {{v[0-9][0-9]*}}
+}
+
+// vqmovn_high_u64 -> UQXTN2 Vd.4s,Vn.2d
+uint32x4_t test_vqmovn_high_u64(uint32x2_t Vdlow, uint64x2_t Vn)
+{
+ return vqmovn_high_u64(Vdlow, Vn);
+ // CHECK: test_vqmovn_high_u64:
+ // CHECK: uqxtn2.4s {{v[0-9][0-9]*}}, {{v[0-9][0-9]*}}
+}
+
+// vqmovn_high_u16 -> UQXTN2 Vd.16b,Vn.8h
+uint8x16_t test_vqmovn_high_u16(uint8x8_t Vdlow, uint16x8_t Vn)
+{
+ return vqmovn_high_u16(Vdlow, Vn);
+ // CHECK: test_vqmovn_high_u16:
+ // CHECK: uqxtn2.16b {{v[0-9][0-9]*}}, {{v[0-9][0-9]*}}
+}
+
+// vqmovun_high_s32 -> SQXTUN2 Vd.8h,Vn.4s
+uint16x8_t test_vqmovun_high_s32(uint16x4_t Vdlow, uint32x4_t Vn)
+{
+ return vqmovun_high_s32(Vdlow, Vn);
+ // CHECK: test_vqmovun_high_s32:
+ // CHECK: sqxtun2.8h {{v[0-9][0-9]*}}, {{v[0-9][0-9]*}}
+}
+
+// vqmovun_high_s64 -> SQXTUN2 Vd.4s,Vn.2d
+uint32x4_t test_vqmovun_high_s64(uint32x2_t Vdlow, uint64x2_t Vn)
+{
+ return vqmovun_high_s64(Vdlow, Vn);
+ // CHECK: test_vqmovun_high_s64:
+ // CHECK: sqxtun2.4s {{v[0-9][0-9]*}}, {{v[0-9][0-9]*}}
+}
diff --git a/test/CodeGen/arm64_vrecps.c b/test/CodeGen/arm64_vrecps.c
new file mode 100644
index 000000000000..a3af13c37fca
--- /dev/null
+++ b/test/CodeGen/arm64_vrecps.c
@@ -0,0 +1,26 @@
+// RUN: %clang_cc1 -O3 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - %s | FileCheck %s
+// REQUIRES: aarch64-registered-target
+/// Test vrecpss_f32, vrecpsd_f64 ARM64 intrinsics
+
+
+#include <arm_neon.h>
+
+// vrecpss_f32 -> FRECPS Sd,Sa,Sb
+//
+float32_t test_vrecpss_f32(float32_t Vdlow, float32_t Vn)
+{
+ return vrecpss_f32(Vdlow, Vn);
+ // CHECK: test_vrecpss_f32:
+ // CHECK: frecps s0, s0, s1
+ // CHECK-NEXT: ret
+}
+
+// vrecpsd_f64 -> FRECPS Dd,Da,Db
+//
+float64_t test_vrecpsd_f64(float64_t Vdlow, float64_t Vn)
+{
+ return vrecpsd_f64(Vdlow, Vn);
+ // CHECK: test_vrecpsd_f64:
+ // CHECK: frecps d0, d0, d1
+ // CHECK-NEXT: ret
+}
diff --git a/test/CodeGen/arm64_vset_lane.c b/test/CodeGen/arm64_vset_lane.c
new file mode 100644
index 000000000000..6fbaaa7accbf
--- /dev/null
+++ b/test/CodeGen/arm64_vset_lane.c
@@ -0,0 +1,31 @@
+// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s
+// Test ARM64 SIMD set lane intrinsics INCOMPLETE
+
+#include <arm_neon.h>
+
+float16x4_t test_vset_lane_f16(float16_t *a1, float16x4_t a2) {
+ // CHECK-LABEL: test_vset_lane_f16
+ return vset_lane_f16(*a1, a2, 1);
+ // CHECK insertelement <4 x i16> %a2, i16 %a1, i32 1
+}
+
+float16x8_t test_vsetq_lane_f16(float16_t *a1, float16x8_t a2) {
+ // CHECK-LABEL: test_vsetq_lane_f16
+ return vsetq_lane_f16(*a1, a2, 4);
+ // CHECK insertelement <8 x i16> %a2, i16 %a1, i32 4
+}
+
+// problem with scalar_to_vector in backend. Punt for now
+#if 0
+float64x1_t test_vset_lane_f64(float64_t a1, float64x1_t a2) {
+ // CHECK-LABEL@ test_vset_lane_f64
+ return vset_lane_f64(a1, a2, 0);
+ // CHECK@ @llvm.aarch64.neon.smaxv.i32.v8i8
+}
+#endif
+
+float64x2_t test_vsetq_lane_f64(float64_t a1, float64x2_t a2) {
+ // CHECK-LABEL: test_vsetq_lane_f64
+ return vsetq_lane_f64(a1, a2, 0);
+ // CHECK insertelement <2 x double> %a2, double %a1, i32 0
+}
diff --git a/test/CodeGen/arm64_vshift.c b/test/CodeGen/arm64_vshift.c
new file mode 100644
index 000000000000..af028994f4a5
--- /dev/null
+++ b/test/CodeGen/arm64_vshift.c
@@ -0,0 +1,357 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios7.0 -target-feature +neon -ffreestanding -emit-llvm -o - -O1 %s | FileCheck %s
+#include <arm_neon.h>
+
+int8x8_t test_vqshl_n_s8(int8x8_t in) {
+ // CHECK-LABEL: @test_vqshl_n_s8
+ // CHECK: call <8 x i8> @llvm.aarch64.neon.sqshl.v8i8(<8 x i8> %in, <8 x i8> <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>)
+ return vqshl_n_s8(in, 1);
+}
+
+int16x4_t test_vqshl_n_s16(int16x4_t in) {
+ // CHECK-LABEL: @test_vqshl_n_s16
+ // CHECK: call <4 x i16> @llvm.aarch64.neon.sqshl.v4i16(<4 x i16> %in, <4 x i16> <i16 1, i16 1, i16 1, i16 1>)
+ return vqshl_n_s16(in, 1);
+}
+
+int32x2_t test_vqshl_n_s32(int32x2_t in) {
+ // CHECK-LABEL: @test_vqshl_n_s32
+ // CHECK: call <2 x i32> @llvm.aarch64.neon.sqshl.v2i32(<2 x i32> %in, <2 x i32> <i32 1, i32 1>)
+ return vqshl_n_s32(in, 1);
+}
+
+int64x1_t test_vqshl_n_s64(int64x1_t in) {
+ // CHECK-LABEL: @test_vqshl_n_s64
+ // CHECK: call <1 x i64> @llvm.aarch64.neon.sqshl.v1i64(<1 x i64> %in, <1 x i64> <i64 1>)
+ return vqshl_n_s64(in, 1);
+}
+
+
+int8x16_t test_vqshlq_n_s8(int8x16_t in) {
+ // CHECK-LABEL: @test_vqshlq_n_s8
+ // CHECK: call <16 x i8> @llvm.aarch64.neon.sqshl.v16i8(<16 x i8> %in, <16 x i8> <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>)
+ return vqshlq_n_s8(in, 1);
+}
+
+int16x8_t test_vqshlq_n_s16(int16x8_t in) {
+ // CHECK-LABEL: @test_vqshlq_n_s16
+ // CHECK: call <8 x i16> @llvm.aarch64.neon.sqshl.v8i16(<8 x i16> %in, <8 x i16> <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1>)
+ return vqshlq_n_s16(in, 1);
+}
+
+int32x4_t test_vqshlq_n_s32(int32x4_t in) {
+ // CHECK-LABEL: @test_vqshlq_n_s32
+ // CHECK: call <4 x i32> @llvm.aarch64.neon.sqshl.v4i32(<4 x i32> %in, <4 x i32> <i32 1, i32 1, i32 1, i32 1>)
+ return vqshlq_n_s32(in, 1);
+}
+
+int64x2_t test_vqshlq_n_s64(int64x2_t in) {
+ // CHECK-LABEL: @test_vqshlq_n_s64
+ // CHECK: call <2 x i64> @llvm.aarch64.neon.sqshl.v2i64(<2 x i64> %in, <2 x i64> <i64 1, i64 1>
+ return vqshlq_n_s64(in, 1);
+}
+
+uint8x8_t test_vqshl_n_u8(uint8x8_t in) {
+ // CHECK-LABEL: @test_vqshl_n_u8
+ // CHECK: call <8 x i8> @llvm.aarch64.neon.uqshl.v8i8(<8 x i8> %in, <8 x i8> <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>)
+ return vqshl_n_u8(in, 1);
+}
+
+uint16x4_t test_vqshl_n_u16(uint16x4_t in) {
+ // CHECK-LABEL: @test_vqshl_n_u16
+ // CHECK: call <4 x i16> @llvm.aarch64.neon.uqshl.v4i16(<4 x i16> %in, <4 x i16> <i16 1, i16 1, i16 1, i16 1>)
+ return vqshl_n_u16(in, 1);
+}
+
+uint32x2_t test_vqshl_n_u32(uint32x2_t in) {
+ // CHECK-LABEL: @test_vqshl_n_u32
+ // CHECK: call <2 x i32> @llvm.aarch64.neon.uqshl.v2i32(<2 x i32> %in, <2 x i32> <i32 1, i32 1>)
+ return vqshl_n_u32(in, 1);
+}
+
+uint64x1_t test_vqshl_n_u64(uint64x1_t in) {
+ // CHECK-LABEL: @test_vqshl_n_u64
+ // CHECK: call <1 x i64> @llvm.aarch64.neon.uqshl.v1i64(<1 x i64> %in, <1 x i64> <i64 1>)
+ return vqshl_n_u64(in, 1);
+}
+
+uint8x16_t test_vqshlq_n_u8(uint8x16_t in) {
+ // CHECK-LABEL: @test_vqshlq_n_u8
+ // CHECK: call <16 x i8> @llvm.aarch64.neon.uqshl.v16i8(<16 x i8> %in, <16 x i8> <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>)
+ return vqshlq_n_u8(in, 1);
+}
+
+uint16x8_t test_vqshlq_n_u16(uint16x8_t in) {
+ // CHECK-LABEL: @test_vqshlq_n_u16
+ // CHECK: call <8 x i16> @llvm.aarch64.neon.uqshl.v8i16(<8 x i16> %in, <8 x i16> <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1>)
+ return vqshlq_n_u16(in, 1);
+}
+
+uint32x4_t test_vqshlq_n_u32(uint32x4_t in) {
+ // CHECK-LABEL: @test_vqshlq_n_u32
+ // CHECK: call <4 x i32> @llvm.aarch64.neon.uqshl.v4i32(<4 x i32> %in, <4 x i32> <i32 1, i32 1, i32 1, i32 1>)
+ return vqshlq_n_u32(in, 1);
+}
+
+uint64x2_t test_vqshlq_n_u64(uint64x2_t in) {
+ // CHECK-LABEL: @test_vqshlq_n_u64
+ // CHECK: call <2 x i64> @llvm.aarch64.neon.uqshl.v2i64(<2 x i64> %in, <2 x i64> <i64 1, i64 1>
+ return vqshlq_n_u64(in, 1);
+}
+
+int8x8_t test_vrshr_n_s8(int8x8_t in) {
+ // CHECK-LABEL: @test_vrshr_n_s8
+ // CHECK: call <8 x i8> @llvm.aarch64.neon.srshl.v8i8(<8 x i8> %in, <8 x i8> <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>)
+ return vrshr_n_s8(in, 1);
+}
+
+int16x4_t test_vrshr_n_s16(int16x4_t in) {
+ // CHECK-LABEL: @test_vrshr_n_s16
+ // CHECK: call <4 x i16> @llvm.aarch64.neon.srshl.v4i16(<4 x i16> %in, <4 x i16> <i16 -1, i16 -1, i16 -1, i16 -1>)
+ return vrshr_n_s16(in, 1);
+}
+
+int32x2_t test_vrshr_n_s32(int32x2_t in) {
+ // CHECK-LABEL: @test_vrshr_n_s32
+ // CHECK: call <2 x i32> @llvm.aarch64.neon.srshl.v2i32(<2 x i32> %in, <2 x i32> <i32 -1, i32 -1>)
+ return vrshr_n_s32(in, 1);
+}
+
+int64x1_t test_vrshr_n_s64(int64x1_t in) {
+ // CHECK-LABEL: @test_vrshr_n_s64
+ // CHECK: call <1 x i64> @llvm.aarch64.neon.srshl.v1i64(<1 x i64> %in, <1 x i64> <i64 -1>)
+ return vrshr_n_s64(in, 1);
+}
+
+
+int8x16_t test_vrshrq_n_s8(int8x16_t in) {
+ // CHECK-LABEL: @test_vrshrq_n_s8
+ // CHECK: call <16 x i8> @llvm.aarch64.neon.srshl.v16i8(<16 x i8> %in, <16 x i8> <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>)
+ return vrshrq_n_s8(in, 1);
+}
+
+int16x8_t test_vrshrq_n_s16(int16x8_t in) {
+ // CHECK-LABEL: @test_vrshrq_n_s16
+ // CHECK: call <8 x i16> @llvm.aarch64.neon.srshl.v8i16(<8 x i16> %in, <8 x i16> <i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1>)
+ return vrshrq_n_s16(in, 1);
+}
+
+int32x4_t test_vrshrq_n_s32(int32x4_t in) {
+ // CHECK-LABEL: @test_vrshrq_n_s32
+ // CHECK: call <4 x i32> @llvm.aarch64.neon.srshl.v4i32(<4 x i32> %in, <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>)
+ return vrshrq_n_s32(in, 1);
+}
+
+int64x2_t test_vrshrq_n_s64(int64x2_t in) {
+ // CHECK-LABEL: @test_vrshrq_n_s64
+ // CHECK: call <2 x i64> @llvm.aarch64.neon.srshl.v2i64(<2 x i64> %in, <2 x i64> <i64 -1, i64 -1>
+ return vrshrq_n_s64(in, 1);
+}
+
+uint8x8_t test_vrshr_n_u8(uint8x8_t in) {
+ // CHECK-LABEL: @test_vrshr_n_u8
+ // CHECK: call <8 x i8> @llvm.aarch64.neon.urshl.v8i8(<8 x i8> %in, <8 x i8> <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>)
+ return vrshr_n_u8(in, 1);
+}
+
+uint16x4_t test_vrshr_n_u16(uint16x4_t in) {
+ // CHECK-LABEL: @test_vrshr_n_u16
+ // CHECK: call <4 x i16> @llvm.aarch64.neon.urshl.v4i16(<4 x i16> %in, <4 x i16> <i16 -1, i16 -1, i16 -1, i16 -1>)
+ return vrshr_n_u16(in, 1);
+}
+
+uint32x2_t test_vrshr_n_u32(uint32x2_t in) {
+ // CHECK-LABEL: @test_vrshr_n_u32
+ // CHECK: call <2 x i32> @llvm.aarch64.neon.urshl.v2i32(<2 x i32> %in, <2 x i32> <i32 -1, i32 -1>)
+ return vrshr_n_u32(in, 1);
+}
+
+uint64x1_t test_vrshr_n_u64(uint64x1_t in) {
+ // CHECK-LABEL: @test_vrshr_n_u64
+ // CHECK: call <1 x i64> @llvm.aarch64.neon.urshl.v1i64(<1 x i64> %in, <1 x i64> <i64 -1>)
+ return vrshr_n_u64(in, 1);
+}
+
+uint8x16_t test_vrshrq_n_u8(uint8x16_t in) {
+ // CHECK-LABEL: @test_vrshrq_n_u8
+ // CHECK: call <16 x i8> @llvm.aarch64.neon.urshl.v16i8(<16 x i8> %in, <16 x i8> <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>)
+ return vrshrq_n_u8(in, 1);
+}
+
+uint16x8_t test_vrshrq_n_u16(uint16x8_t in) {
+ // CHECK-LABEL: @test_vrshrq_n_u16
+ // CHECK: call <8 x i16> @llvm.aarch64.neon.urshl.v8i16(<8 x i16> %in, <8 x i16> <i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1>)
+ return vrshrq_n_u16(in, 1);
+}
+
+uint32x4_t test_vrshrq_n_u32(uint32x4_t in) {
+ // CHECK-LABEL: @test_vrshrq_n_u32
+ // CHECK: call <4 x i32> @llvm.aarch64.neon.urshl.v4i32(<4 x i32> %in, <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>)
+ return vrshrq_n_u32(in, 1);
+}
+
+uint64x2_t test_vrshrq_n_u64(uint64x2_t in) {
+ // CHECK-LABEL: @test_vrshrq_n_u64
+ // CHECK: call <2 x i64> @llvm.aarch64.neon.urshl.v2i64(<2 x i64> %in, <2 x i64> <i64 -1, i64 -1>
+ return vrshrq_n_u64(in, 1);
+}
+
+int8x8_t test_vqshlu_n_s8(int8x8_t in) {
+ // CHECK-LABEL: @test_vqshlu_n_s8
+ // CHECK: call <8 x i8> @llvm.aarch64.neon.sqshlu.v8i8(<8 x i8> %in, <8 x i8> <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>)
+ return vqshlu_n_s8(in, 1);
+}
+
+int16x4_t test_vqshlu_n_s16(int16x4_t in) {
+ // CHECK-LABEL: @test_vqshlu_n_s16
+ // CHECK: call <4 x i16> @llvm.aarch64.neon.sqshlu.v4i16(<4 x i16> %in, <4 x i16> <i16 1, i16 1, i16 1, i16 1>)
+ return vqshlu_n_s16(in, 1);
+}
+
+int32x2_t test_vqshlu_n_s32(int32x2_t in) {
+ // CHECK-LABEL: @test_vqshlu_n_s32
+ // CHECK: call <2 x i32> @llvm.aarch64.neon.sqshlu.v2i32(<2 x i32> %in, <2 x i32> <i32 1, i32 1>)
+ return vqshlu_n_s32(in, 1);
+}
+
+int64x1_t test_vqshlu_n_s64(int64x1_t in) {
+ // CHECK-LABEL: @test_vqshlu_n_s64
+ // CHECK: call <1 x i64> @llvm.aarch64.neon.sqshlu.v1i64(<1 x i64> %in, <1 x i64> <i64 1>)
+ return vqshlu_n_s64(in, 1);
+}
+
+
+int8x16_t test_vqshluq_n_s8(int8x16_t in) {
+ // CHECK-LABEL: @test_vqshluq_n_s8
+ // CHECK: call <16 x i8> @llvm.aarch64.neon.sqshlu.v16i8(<16 x i8> %in, <16 x i8> <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>)
+ return vqshluq_n_s8(in, 1);
+}
+
+int16x8_t test_vqshluq_n_s16(int16x8_t in) {
+ // CHECK-LABEL: @test_vqshluq_n_s16
+ // CHECK: call <8 x i16> @llvm.aarch64.neon.sqshlu.v8i16(<8 x i16> %in, <8 x i16> <i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1>)
+ return vqshluq_n_s16(in, 1);
+}
+
+int32x4_t test_vqshluq_n_s32(int32x4_t in) {
+ // CHECK-LABEL: @test_vqshluq_n_s32
+ // CHECK: call <4 x i32> @llvm.aarch64.neon.sqshlu.v4i32(<4 x i32> %in, <4 x i32> <i32 1, i32 1, i32 1, i32 1>)
+ return vqshluq_n_s32(in, 1);
+}
+
+int64x2_t test_vqshluq_n_s64(int64x2_t in) {
+ // CHECK-LABEL: @test_vqshluq_n_s64
+ // CHECK: call <2 x i64> @llvm.aarch64.neon.sqshlu.v2i64(<2 x i64> %in, <2 x i64> <i64 1, i64 1>
+ return vqshluq_n_s64(in, 1);
+}
+
+int8x8_t test_vrsra_n_s8(int8x8_t acc, int8x8_t in) {
+ // CHECK-LABEL: @test_vrsra_n_s8
+ // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <8 x i8> @llvm.aarch64.neon.srshl.v8i8(<8 x i8> %in, <8 x i8> <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>)
+ // CHECK: add <8 x i8> [[TMP]], %acc
+ return vrsra_n_s8(acc, in, 1);
+}
+
+int16x4_t test_vrsra_n_s16(int16x4_t acc, int16x4_t in) {
+ // CHECK-LABEL: @test_vrsra_n_s16
+ // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <4 x i16> @llvm.aarch64.neon.srshl.v4i16(<4 x i16> %in, <4 x i16> <i16 -1, i16 -1, i16 -1, i16 -1>)
+ // CHECK: add <4 x i16> [[TMP]], %acc
+ return vrsra_n_s16(acc, in, 1);
+}
+
+int32x2_t test_vrsra_n_s32(int32x2_t acc, int32x2_t in) {
+ // CHECK-LABEL: @test_vrsra_n_s32
+ // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <2 x i32> @llvm.aarch64.neon.srshl.v2i32(<2 x i32> %in, <2 x i32> <i32 -1, i32 -1>)
+ // CHECK: add <2 x i32> [[TMP]], %acc
+ return vrsra_n_s32(acc, in, 1);
+}
+
+int64x1_t test_vrsra_n_s64(int64x1_t acc, int64x1_t in) {
+ // CHECK-LABEL: @test_vrsra_n_s64
+ // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <1 x i64> @llvm.aarch64.neon.srshl.v1i64(<1 x i64> %in, <1 x i64> <i64 -1>)
+ // CHECK: add <1 x i64> [[TMP]], %acc
+ return vrsra_n_s64(acc, in, 1);
+}
+
+int8x16_t test_vrsraq_n_s8(int8x16_t acc, int8x16_t in) {
+ // CHECK-LABEL: @test_vrsraq_n_s8
+ // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <16 x i8> @llvm.aarch64.neon.srshl.v16i8(<16 x i8> %in, <16 x i8> <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>)
+ // CHECK: add <16 x i8> [[TMP]], %acc
+ return vrsraq_n_s8(acc, in, 1);
+}
+
+int16x8_t test_vrsraq_n_s16(int16x8_t acc, int16x8_t in) {
+ // CHECK-LABEL: @test_vrsraq_n_s16
+ // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <8 x i16> @llvm.aarch64.neon.srshl.v8i16(<8 x i16> %in, <8 x i16> <i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1>)
+ // CHECK: add <8 x i16> [[TMP]], %acc
+ return vrsraq_n_s16(acc, in, 1);
+}
+
+int32x4_t test_vrsraq_n_s32(int32x4_t acc, int32x4_t in) {
+ // CHECK-LABEL: @test_vrsraq_n_s32
+ // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <4 x i32> @llvm.aarch64.neon.srshl.v4i32(<4 x i32> %in, <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>)
+ // CHECK: add <4 x i32> [[TMP]], %acc
+ return vrsraq_n_s32(acc, in, 1);
+}
+
+int64x2_t test_vrsraq_n_s64(int64x2_t acc, int64x2_t in) {
+ // CHECK-LABEL: @test_vrsraq_n_s64
+ // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <2 x i64> @llvm.aarch64.neon.srshl.v2i64(<2 x i64> %in, <2 x i64> <i64 -1, i64 -1>)
+ // CHECK: add <2 x i64> [[TMP]], %acc
+ return vrsraq_n_s64(acc, in, 1);
+}
+
+uint8x8_t test_vrsra_n_u8(uint8x8_t acc, uint8x8_t in) {
+ // CHECK-LABEL: @test_vrsra_n_u8
+ // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <8 x i8> @llvm.aarch64.neon.urshl.v8i8(<8 x i8> %in, <8 x i8> <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>)
+ // CHECK: add <8 x i8> [[TMP]], %acc
+ return vrsra_n_u8(acc, in, 1);
+}
+
+uint16x4_t test_vrsra_n_u16(uint16x4_t acc, uint16x4_t in) {
+ // CHECK-LABEL: @test_vrsra_n_u16
+ // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <4 x i16> @llvm.aarch64.neon.urshl.v4i16(<4 x i16> %in, <4 x i16> <i16 -1, i16 -1, i16 -1, i16 -1>)
+ // CHECK: add <4 x i16> [[TMP]], %acc
+ return vrsra_n_u16(acc, in, 1);
+}
+
+uint32x2_t test_vrsra_n_u32(uint32x2_t acc, uint32x2_t in) {
+ // CHECK-LABEL: @test_vrsra_n_u32
+ // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <2 x i32> @llvm.aarch64.neon.urshl.v2i32(<2 x i32> %in, <2 x i32> <i32 -1, i32 -1>)
+ // CHECK: add <2 x i32> [[TMP]], %acc
+ return vrsra_n_u32(acc, in, 1);
+}
+
+uint64x1_t test_vrsra_n_u64(uint64x1_t acc, uint64x1_t in) {
+ // CHECK-LABEL: @test_vrsra_n_u64
+ // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <1 x i64> @llvm.aarch64.neon.urshl.v1i64(<1 x i64> %in, <1 x i64> <i64 -1>)
+ // CHECK: add <1 x i64> [[TMP]], %acc
+ return vrsra_n_u64(acc, in, 1);
+}
+
+uint8x16_t test_vrsraq_n_u8(uint8x16_t acc, uint8x16_t in) {
+ // CHECK-LABEL: @test_vrsraq_n_u8
+ // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <16 x i8> @llvm.aarch64.neon.urshl.v16i8(<16 x i8> %in, <16 x i8> <i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1, i8 -1>)
+ // CHECK: add <16 x i8> [[TMP]], %acc
+ return vrsraq_n_u8(acc, in, 1);
+}
+
+uint16x8_t test_vrsraq_n_u16(uint16x8_t acc, uint16x8_t in) {
+ // CHECK-LABEL: @test_vrsraq_n_u16
+ // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <8 x i16> @llvm.aarch64.neon.urshl.v8i16(<8 x i16> %in, <8 x i16> <i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1, i16 -1>)
+ // CHECK: add <8 x i16> [[TMP]], %acc
+ return vrsraq_n_u16(acc, in, 1);
+}
+
+uint32x4_t test_vrsraq_n_u32(uint32x4_t acc, uint32x4_t in) {
+ // CHECK-LABEL: @test_vrsraq_n_u32
+ // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <4 x i32> @llvm.aarch64.neon.urshl.v4i32(<4 x i32> %in, <4 x i32> <i32 -1, i32 -1, i32 -1, i32 -1>)
+ // CHECK: add <4 x i32> [[TMP]], %acc
+ return vrsraq_n_u32(acc, in, 1);
+}
+
+uint64x2_t test_vrsraq_n_u64(uint64x2_t acc, uint64x2_t in) {
+ // CHECK-LABEL: @test_vrsraq_n_u64
+ // CHECK: [[TMP:%[0-9a-zA-Z._]+]] = tail call <2 x i64> @llvm.aarch64.neon.urshl.v2i64(<2 x i64> %in, <2 x i64> <i64 -1, i64 -1>)
+ // CHECK: add <2 x i64> [[TMP]], %acc
+ return vrsraq_n_u64(acc, in, 1);
+}
diff --git a/test/CodeGen/arm64_vsli.c b/test/CodeGen/arm64_vsli.c
new file mode 100644
index 000000000000..b2a30abe382a
--- /dev/null
+++ b/test/CodeGen/arm64_vsli.c
@@ -0,0 +1,148 @@
+// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s
+// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - %s | \
+// RUN: FileCheck -check-prefix=CHECK_CODEGEN %s
+// REQUIRES: aarch64-registered-target
+// Test
+
+#include <arm_neon.h>
+
+int8x8_t test_vsli_n_s8(int8x8_t a1, int8x8_t a2) {
+ // CHECK: test_vsli_n_s8
+ return vsli_n_s8(a1, a2, 3);
+ // CHECK: llvm.aarch64.neon.vsli.v8i8
+ // CHECK_CODEGEN: sli.8b v0, v1, #3
+}
+
+int16x4_t test_vsli_n_s16(int16x4_t a1, int16x4_t a2) {
+ // CHECK: test_vsli_n_s16
+ return vsli_n_s16(a1, a2, 3);
+ // CHECK: llvm.aarch64.neon.vsli.v4i16
+ // CHECK_CODEGEN: sli.4h v0, v1, #3
+}
+
+int32x2_t test_vsli_n_s32(int32x2_t a1, int32x2_t a2) {
+ // CHECK: test_vsli_n_s32
+ return vsli_n_s32(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.vsli.v2i32
+ // CHECK_CODEGEN: sli.2s v0, v1, #1
+}
+
+int64x1_t test_vsli_n_s64(int64x1_t a1, int64x1_t a2) {
+ // CHECK: test_vsli_n_s64
+ return vsli_n_s64(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.vsli.v1i64
+ // CHECK_CODEGEN: sli d0, d1, #1
+}
+
+uint8x8_t test_vsli_n_u8(uint8x8_t a1, uint8x8_t a2) {
+ // CHECK: test_vsli_n_u8
+ return vsli_n_u8(a1, a2, 3);
+ // CHECK: llvm.aarch64.neon.vsli.v8i8
+ // CHECK_CODEGEN: sli.8b v0, v1, #3
+}
+
+uint16x4_t test_vsli_n_u16(uint16x4_t a1, uint16x4_t a2) {
+ // CHECK: test_vsli_n_u16
+ return vsli_n_u16(a1, a2, 3);
+ // CHECK: llvm.aarch64.neon.vsli.v4i16
+ // CHECK_CODEGEN: sli.4h v0, v1, #3
+}
+
+uint32x2_t test_vsli_n_u32(uint32x2_t a1, uint32x2_t a2) {
+ // CHECK: test_vsli_n_u32
+ return vsli_n_u32(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.vsli.v2i32
+ // CHECK_CODEGEN: sli.2s v0, v1, #1
+}
+
+uint64x1_t test_vsli_n_u64(uint64x1_t a1, uint64x1_t a2) {
+ // CHECK: test_vsli_n_u64
+ return vsli_n_u64(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.vsli.v1i64
+ // CHECK_CODEGEN: sli d0, d1, #1
+}
+
+poly8x8_t test_vsli_n_p8(poly8x8_t a1, poly8x8_t a2) {
+ // CHECK: test_vsli_n_p8
+ return vsli_n_p8(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.vsli.v8i8
+ // CHECK_CODEGEN: sli.8b v0, v1, #1
+}
+
+poly16x4_t test_vsli_n_p16(poly16x4_t a1, poly16x4_t a2) {
+ // CHECK: test_vsli_n_p16
+ return vsli_n_p16(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.vsli.v4i16
+ // CHECK_CODEGEN: sli.4h v0, v1, #1
+}
+
+int8x16_t test_vsliq_n_s8(int8x16_t a1, int8x16_t a2) {
+ // CHECK: test_vsliq_n_s8
+ return vsliq_n_s8(a1, a2, 3);
+ // CHECK: llvm.aarch64.neon.vsli.v16i8
+ // CHECK_CODEGEN: sli.16b v0, v1, #3
+}
+
+int16x8_t test_vsliq_n_s16(int16x8_t a1, int16x8_t a2) {
+ // CHECK: test_vsliq_n_s16
+ return vsliq_n_s16(a1, a2, 3);
+ // CHECK: llvm.aarch64.neon.vsli.v8i16
+ // CHECK_CODEGEN: sli.8h v0, v1, #3
+}
+
+int32x4_t test_vsliq_n_s32(int32x4_t a1, int32x4_t a2) {
+ // CHECK: test_vsliq_n_s32
+ return vsliq_n_s32(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.vsli.v4i32
+ // CHECK_CODEGEN: sli.4s v0, v1, #1
+}
+
+int64x2_t test_vsliq_n_s64(int64x2_t a1, int64x2_t a2) {
+ // CHECK: test_vsliq_n_s64
+ return vsliq_n_s64(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.vsli.v2i64
+ // CHECK_CODEGEN: sli.2d v0, v1, #1
+}
+
+uint8x16_t test_vsliq_n_u8(uint8x16_t a1, uint8x16_t a2) {
+ // CHECK: test_vsliq_n_u8
+ return vsliq_n_u8(a1, a2, 3);
+ // CHECK: llvm.aarch64.neon.vsli.v16i8
+ // CHECK_CODEGEN: sli.16b v0, v1, #3
+}
+
+uint16x8_t test_vsliq_n_u16(uint16x8_t a1, uint16x8_t a2) {
+ // CHECK: test_vsliq_n_u16
+ return vsliq_n_u16(a1, a2, 3);
+ // CHECK: llvm.aarch64.neon.vsli.v8i16
+ // CHECK_CODEGEN: sli.8h v0, v1, #3
+}
+
+uint32x4_t test_vsliq_n_u32(uint32x4_t a1, uint32x4_t a2) {
+ // CHECK: test_vsliq_n_u32
+ return vsliq_n_u32(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.vsli.v4i32
+ // CHECK_CODEGEN: sli.4s v0, v1, #1
+}
+
+uint64x2_t test_vsliq_n_u64(uint64x2_t a1, uint64x2_t a2) {
+ // CHECK: test_vsliq_n_u64
+ return vsliq_n_u64(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.vsli.v2i64
+ // CHECK_CODEGEN: sli.2d v0, v1, #1
+}
+
+poly8x16_t test_vsliq_n_p8(poly8x16_t a1, poly8x16_t a2) {
+ // CHECK: test_vsliq_n_p8
+ return vsliq_n_p8(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.vsli.v16i8
+ // CHECK_CODEGEN: sli.16b v0, v1, #1
+}
+
+poly16x8_t test_vsliq_n_p16(poly16x8_t a1, poly16x8_t a2) {
+ // CHECK: test_vsliq_n_p16
+ return vsliq_n_p16(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.vsli.v8i16
+ // CHECK_CODEGEN: sli.8h v0, v1, #1
+}
+
diff --git a/test/CodeGen/arm64_vsri.c b/test/CodeGen/arm64_vsri.c
new file mode 100644
index 000000000000..579431ddf020
--- /dev/null
+++ b/test/CodeGen/arm64_vsri.c
@@ -0,0 +1,149 @@
+// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s
+// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - %s | \
+// RUN: FileCheck -check-prefix=CHECK_CODEGEN %s
+// REQUIRES: aarch64-registered-target
+
+// Test ARM64 SIMD vector shift right and insert: vsri[q]_n_*
+
+#include <arm_neon.h>
+
+int8x8_t test_vsri_n_s8(int8x8_t a1, int8x8_t a2) {
+ // CHECK: test_vsri_n_s8
+ return vsri_n_s8(a1, a2, 3);
+ // CHECK: llvm.aarch64.neon.vsri.v8i8
+ // CHECK_CODEGEN: sri.8b v0, v1, #3
+}
+
+int16x4_t test_vsri_n_s16(int16x4_t a1, int16x4_t a2) {
+ // CHECK: test_vsri_n_s16
+ return vsri_n_s16(a1, a2, 3);
+ // CHECK: llvm.aarch64.neon.vsri.v4i16
+ // CHECK_CODEGEN: sri.4h v0, v1, #3
+}
+
+int32x2_t test_vsri_n_s32(int32x2_t a1, int32x2_t a2) {
+ // CHECK: test_vsri_n_s32
+ return vsri_n_s32(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.vsri.v2i32
+ // CHECK_CODEGEN: sri.2s v0, v1, #1
+}
+
+int64x1_t test_vsri_n_s64(int64x1_t a1, int64x1_t a2) {
+ // CHECK: test_vsri_n_s64
+ return vsri_n_s64(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.vsri.v1i64
+ // CHECK_CODEGEN: sri d0, d1, #1
+}
+
+uint8x8_t test_vsri_n_u8(uint8x8_t a1, uint8x8_t a2) {
+ // CHECK: test_vsri_n_u8
+ return vsri_n_u8(a1, a2, 3);
+ // CHECK: llvm.aarch64.neon.vsri.v8i8
+ // CHECK_CODEGEN: sri.8b v0, v1, #3
+}
+
+uint16x4_t test_vsri_n_u16(uint16x4_t a1, uint16x4_t a2) {
+ // CHECK: test_vsri_n_u16
+ return vsri_n_u16(a1, a2, 3);
+ // CHECK: llvm.aarch64.neon.vsri.v4i16
+ // CHECK_CODEGEN: sri.4h v0, v1, #3
+}
+
+uint32x2_t test_vsri_n_u32(uint32x2_t a1, uint32x2_t a2) {
+ // CHECK: test_vsri_n_u32
+ return vsri_n_u32(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.vsri.v2i32
+ // CHECK_CODEGEN: sri.2s v0, v1, #1
+}
+
+uint64x1_t test_vsri_n_u64(uint64x1_t a1, uint64x1_t a2) {
+ // CHECK: test_vsri_n_u64
+ return vsri_n_u64(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.vsri.v1i64
+ // CHECK_CODEGEN: sri d0, d1, #1
+}
+
+poly8x8_t test_vsri_n_p8(poly8x8_t a1, poly8x8_t a2) {
+ // CHECK: test_vsri_n_p8
+ return vsri_n_p8(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.vsri.v8i8
+ // CHECK_CODEGEN: sri.8b v0, v1, #1
+}
+
+poly16x4_t test_vsri_n_p16(poly16x4_t a1, poly16x4_t a2) {
+ // CHECK: test_vsri_n_p16
+ return vsri_n_p16(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.vsri.v4i16
+ // CHECK_CODEGEN: sri.4h v0, v1, #1
+}
+
+int8x16_t test_vsriq_n_s8(int8x16_t a1, int8x16_t a2) {
+ // CHECK: test_vsriq_n_s8
+ return vsriq_n_s8(a1, a2, 3);
+ // CHECK: llvm.aarch64.neon.vsri.v16i8
+ // CHECK_CODEGEN: sri.16b v0, v1, #3
+}
+
+int16x8_t test_vsriq_n_s16(int16x8_t a1, int16x8_t a2) {
+ // CHECK: test_vsriq_n_s16
+ return vsriq_n_s16(a1, a2, 3);
+ // CHECK: llvm.aarch64.neon.vsri.v8i16
+ // CHECK_CODEGEN: sri.8h v0, v1, #3
+}
+
+int32x4_t test_vsriq_n_s32(int32x4_t a1, int32x4_t a2) {
+ // CHECK: test_vsriq_n_s32
+ return vsriq_n_s32(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.vsri.v4i32
+ // CHECK_CODEGEN: sri.4s v0, v1, #1
+}
+
+int64x2_t test_vsriq_n_s64(int64x2_t a1, int64x2_t a2) {
+ // CHECK: test_vsriq_n_s64
+ return vsriq_n_s64(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.vsri.v2i64
+ // CHECK_CODEGEN: sri.2d v0, v1, #1
+}
+
+uint8x16_t test_vsriq_n_u8(uint8x16_t a1, uint8x16_t a2) {
+ // CHECK: test_vsriq_n_u8
+ return vsriq_n_u8(a1, a2, 3);
+ // CHECK: llvm.aarch64.neon.vsri.v16i8
+ // CHECK_CODEGEN: sri.16b v0, v1, #3
+}
+
+uint16x8_t test_vsriq_n_u16(uint16x8_t a1, uint16x8_t a2) {
+ // CHECK: test_vsriq_n_u16
+ return vsriq_n_u16(a1, a2, 3);
+ // CHECK: llvm.aarch64.neon.vsri.v8i16
+ // CHECK_CODEGEN: sri.8h v0, v1, #3
+}
+
+uint32x4_t test_vsriq_n_u32(uint32x4_t a1, uint32x4_t a2) {
+ // CHECK: test_vsriq_n_u32
+ return vsriq_n_u32(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.vsri.v4i32
+ // CHECK_CODEGEN: sri.4s v0, v1, #1
+}
+
+uint64x2_t test_vsriq_n_u64(uint64x2_t a1, uint64x2_t a2) {
+ // CHECK: test_vsriq_n_u64
+ return vsriq_n_u64(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.vsri.v2i64
+ // CHECK_CODEGEN: sri.2d v0, v1, #1
+}
+
+poly8x16_t test_vsriq_n_p8(poly8x16_t a1, poly8x16_t a2) {
+ // CHECK: test_vsriq_n_p8
+ return vsriq_n_p8(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.vsri.v16i8
+ // CHECK_CODEGEN: sri.16b v0, v1, #1
+}
+
+poly16x8_t test_vsriq_n_p16(poly16x8_t a1, poly16x8_t a2) {
+ // CHECK: test_vsriq_n_p16
+ return vsriq_n_p16(a1, a2, 1);
+ // CHECK: llvm.aarch64.neon.vsri.v8i16
+ // CHECK_CODEGEN: sri.8h v0, v1, #1
+}
+
diff --git a/test/CodeGen/arm64_vtst.c b/test/CodeGen/arm64_vtst.c
new file mode 100644
index 000000000000..f40c62c4a303
--- /dev/null
+++ b/test/CodeGen/arm64_vtst.c
@@ -0,0 +1,22 @@
+// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | FileCheck %s
+// Test ARM64 SIMD comparison test intrinsics
+
+#include <arm_neon.h>
+
+uint64x2_t test_vtstq_s64(int64x2_t a1, int64x2_t a2) {
+ // CHECK: test_vtstq_s64
+ return vtstq_s64(a1, a2);
+ // CHECK: [[COMMONBITS:%[A-Za-z0-9.]+]] = and <2 x i64> %a1, %a2
+ // CHECK: [[MASK:%[A-Za-z0-9.]+]] = icmp ne <2 x i64> [[COMMONBITS]], zeroinitializer
+ // CHECK: [[RES:%[A-Za-z0-9.]+]] = sext <2 x i1> [[MASK]] to <2 x i64>
+ // CHECK: ret <2 x i64> [[RES]]
+}
+
+uint64x2_t test_vtstq_u64(uint64x2_t a1, uint64x2_t a2) {
+ // CHECK: test_vtstq_u64
+ return vtstq_u64(a1, a2);
+ // CHECK: [[COMMONBITS:%[A-Za-z0-9.]+]] = and <2 x i64> %a1, %a2
+ // CHECK: [[MASK:%[A-Za-z0-9.]+]] = icmp ne <2 x i64> [[COMMONBITS]], zeroinitializer
+ // CHECK: [[RES:%[A-Za-z0-9.]+]] = sext <2 x i1> [[MASK]] to <2 x i64>
+ // CHECK: ret <2 x i64> [[RES]]
+}
diff --git a/test/CodeGen/arm_acle.c b/test/CodeGen/arm_acle.c
new file mode 100644
index 000000000000..8550c58b3677
--- /dev/null
+++ b/test/CodeGen/arm_acle.c
@@ -0,0 +1,209 @@
+// RUN: %clang_cc1 -ffreestanding -triple armv8-eabi -target-cpu cortex-a57 -O -S -emit-llvm -o - %s | FileCheck %s -check-prefix=ARM -check-prefix=AArch32
+// RUN: %clang_cc1 -ffreestanding -triple aarch64-eabi -target-cpu cortex-a57 -target-feature +neon -target-feature +crc -target-feature +crypto -O -S -emit-llvm -o - %s | FileCheck %s -check-prefix=ARM -check-prefix=AArch64
+
+#include <arm_acle.h>
+
+/* 8 SYNCHRONIZATION, BARRIER AND HINT INTRINSICS */
+/* 8.3 Memory Barriers */
+// ARM-LABEL: test_dmb
+// AArch32: call void @llvm.arm.dmb(i32 1)
+// AArch64: call void @llvm.aarch64.dmb(i32 1)
+void test_dmb(void) {
+ __dmb(1);
+}
+
+// ARM-LABEL: test_dsb
+// AArch32: call void @llvm.arm.dsb(i32 2)
+// AArch64: call void @llvm.aarch64.dsb(i32 2)
+void test_dsb(void) {
+ __dsb(2);
+}
+
+// ARM-LABEL: test_isb
+// AArch32: call void @llvm.arm.isb(i32 3)
+// AArch64: call void @llvm.aarch64.isb(i32 3)
+void test_isb(void) {
+ __isb(3);
+}
+
+/* 8.4 Hints */
+// ARM-LABEL: test_yield
+// AArch32: call void @llvm.arm.hint(i32 1)
+// AArch64: call void @llvm.aarch64.hint(i32 1)
+void test_yield(void) {
+ __yield();
+}
+
+// ARM-LABEL: test_wfe
+// AArch32: call void @llvm.arm.hint(i32 2)
+// AArch64: call void @llvm.aarch64.hint(i32 2)
+void test_wfe(void) {
+ __wfe();
+}
+
+// ARM-LABEL: test_wfi
+// AArch32: call void @llvm.arm.hint(i32 3)
+// AArch64: call void @llvm.aarch64.hint(i32 3)
+void test_wfi(void) {
+ __wfi();
+}
+
+// ARM-LABEL: test_sev
+// AArch32: call void @llvm.arm.hint(i32 4)
+// AArch64: call void @llvm.aarch64.hint(i32 4)
+void test_sev(void) {
+ __sev();
+}
+
+// ARM-LABEL: test_sevl
+// AArch32: call void @llvm.arm.hint(i32 5)
+// AArch64: call void @llvm.aarch64.hint(i32 5)
+void test_sevl(void) {
+ __sevl();
+}
+
+/* 8.7 NOP */
+// ARM-LABEL: test_nop
+// AArch32: call void @llvm.arm.hint(i32 0)
+// AArch64: call void @llvm.aarch64.hint(i32 0)
+void test_nop(void) {
+ __nop();
+}
+
+/* 9 DATA-PROCESSING INTRINSICS */
+/* 9.2 Miscellaneous data-processing intrinsics */
+// ARM-LABEL: test_rev
+// ARM: call i32 @llvm.bswap.i32(i32 %t)
+uint32_t test_rev(uint32_t t) {
+ return __rev(t);
+}
+
+// ARM-LABEL: test_revl
+// AArch32: call i32 @llvm.bswap.i32(i32 %t)
+// AArch64: call i64 @llvm.bswap.i64(i64 %t)
+long test_revl(long t) {
+ return __revl(t);
+}
+
+// ARM-LABEL: test_revll
+// ARM: call i64 @llvm.bswap.i64(i64 %t)
+uint64_t test_revll(uint64_t t) {
+ return __revll(t);
+}
+
+// ARM-LABEL: test_clz
+// ARM: call i32 @llvm.ctlz.i32(i32 %t, i1 false)
+uint32_t test_clz(uint32_t t) {
+ return __clz(t);
+}
+
+// ARM-LABEL: test_clzl
+// AArch32: call i32 @llvm.ctlz.i32(i32 %t, i1 false)
+// AArch64: call i64 @llvm.ctlz.i64(i64 %t, i1 false)
+long test_clzl(long t) {
+ return __clzl(t);
+}
+
+// ARM-LABEL: test_clzll
+// ARM: call i64 @llvm.ctlz.i64(i64 %t, i1 false)
+uint64_t test_clzll(uint64_t t) {
+ return __clzll(t);
+}
+
+/* 9.4 Saturating intrinsics */
+#ifdef __ARM_32BIT_STATE
+
+/* 9.4.1 Width-specified saturation intrinsics */
+// AArch32-LABEL: test_ssat
+// AArch32: call i32 @llvm.arm.ssat(i32 %t, i32 1)
+int32_t test_ssat(int32_t t) {
+ return __ssat(t, 1);
+}
+
+// AArch32-LABEL: test_usat
+// AArch32: call i32 @llvm.arm.usat(i32 %t, i32 2)
+int32_t test_usat(int32_t t) {
+ return __usat(t, 2);
+}
+
+/* 9.4.2 Saturating addition and subtraction intrinsics */
+// AArch32-LABEL: test_qadd
+// AArch32: call i32 @llvm.arm.qadd(i32 %a, i32 %b)
+int32_t test_qadd(int32_t a, int32_t b) {
+ return __qadd(a, b);
+}
+
+// AArch32-LABEL: test_qsub
+// AArch32: call i32 @llvm.arm.qsub(i32 %a, i32 %b)
+int32_t test_qsub(int32_t a, int32_t b) {
+ return __qsub(a, b);
+}
+
+extern int32_t f();
+// AArch32-LABEL: test_qdbl
+// AArch32: [[VAR:%[a-z0-9]+]] = {{.*}} call {{.*}} @f
+// AArch32-NOT: call {{.*}} @f
+// AArch32: call i32 @llvm.arm.qadd(i32 [[VAR]], i32 [[VAR]])
+int32_t test_qdbl() {
+ return __qdbl(f());
+}
+#endif
+
+/* 9.7 CRC32 intrinsics */
+// ARM-LABEL: test_crc32b
+// AArch32: call i32 @llvm.arm.crc32b
+// AArch64: call i32 @llvm.aarch64.crc32b
+uint32_t test_crc32b(uint32_t a, uint8_t b) {
+ return __crc32b(a, b);
+}
+
+// ARM-LABEL: test_crc32h
+// AArch32: call i32 @llvm.arm.crc32h
+// AArch64: call i32 @llvm.aarch64.crc32h
+uint32_t test_crc32h(uint32_t a, uint16_t b) {
+ return __crc32h(a, b);
+}
+
+// ARM-LABEL: test_crc32w
+// AArch32: call i32 @llvm.arm.crc32w
+// AArch64: call i32 @llvm.aarch64.crc32w
+uint32_t test_crc32w(uint32_t a, uint32_t b) {
+ return __crc32w(a, b);
+}
+
+// ARM-LABEL: test_crc32d
+// AArch32: call i32 @llvm.arm.crc32w
+// AArch32: call i32 @llvm.arm.crc32w
+// AArch64: call i32 @llvm.aarch64.crc32x
+uint32_t test_crc32d(uint32_t a, uint64_t b) {
+ return __crc32d(a, b);
+}
+
+// ARM-LABEL: test_crc32cb
+// AArch32: call i32 @llvm.arm.crc32cb
+// AArch64: call i32 @llvm.aarch64.crc32cb
+uint32_t test_crc32cb(uint32_t a, uint8_t b) {
+ return __crc32cb(a, b);
+}
+
+// ARM-LABEL: test_crc32ch
+// AArch32: call i32 @llvm.arm.crc32ch
+// AArch64: call i32 @llvm.aarch64.crc32ch
+uint32_t test_crc32ch(uint32_t a, uint16_t b) {
+ return __crc32ch(a, b);
+}
+
+// ARM-LABEL: test_crc32cw
+// AArch32: call i32 @llvm.arm.crc32cw
+// AArch64: call i32 @llvm.aarch64.crc32cw
+uint32_t test_crc32cw(uint32_t a, uint32_t b) {
+ return __crc32cw(a, b);
+}
+
+// ARM-LABEL: test_crc32cd
+// AArch32: call i32 @llvm.arm.crc32cw
+// AArch32: call i32 @llvm.arm.crc32cw
+// AArch64: call i32 @llvm.aarch64.crc32cx
+uint32_t test_crc32cd(uint32_t a, uint64_t b) {
+ return __crc32cd(a, b);
+}
diff --git a/test/CodeGen/arm_neon_intrinsics.c b/test/CodeGen/arm_neon_intrinsics.c
index 1d76e8a57546..a084d8b2c84c 100644
--- a/test/CodeGen/arm_neon_intrinsics.c
+++ b/test/CodeGen/arm_neon_intrinsics.c
@@ -1,11633 +1,11673 @@
// RUN: %clang_cc1 -triple thumbv7s-apple-darwin -target-abi apcs-gnu\
// RUN: -target-cpu swift -ffreestanding -Os -S -o - %s\
-// RUN: | FileCheck %s
+// RUN: | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-SWIFT
+// RUN: %clang_cc1 -triple armv8-linux-gnu \
+// RUN: -target-cpu cortex-a57 -mfloat-abi soft -ffreestanding -Os -S -o - %s\
+// RUN: | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-A57
// REQUIRES: long_tests
#include <arm_neon.h>
-// CHECK: test_vaba_s8
+// CHECK-LABEL: test_vaba_s8
// CHECK: vaba.s8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vaba_s8(int8x8_t a, int8x8_t b, int8x8_t c) {
return vaba_s8(a, b, c);
}
-// CHECK: test_vaba_s16
+// CHECK-LABEL: test_vaba_s16
// CHECK: vaba.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vaba_s16(int16x4_t a, int16x4_t b, int16x4_t c) {
return vaba_s16(a, b, c);
}
-// CHECK: test_vaba_s32
+// CHECK-LABEL: test_vaba_s32
// CHECK: vaba.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vaba_s32(int32x2_t a, int32x2_t b, int32x2_t c) {
return vaba_s32(a, b, c);
}
-// CHECK: test_vaba_u8
+// CHECK-LABEL: test_vaba_u8
// CHECK: vaba.u8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vaba_u8(uint8x8_t a, uint8x8_t b, uint8x8_t c) {
return vaba_u8(a, b, c);
}
-// CHECK: test_vaba_u16
+// CHECK-LABEL: test_vaba_u16
// CHECK: vaba.u16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vaba_u16(uint16x4_t a, uint16x4_t b, uint16x4_t c) {
return vaba_u16(a, b, c);
}
-// CHECK: test_vaba_u32
+// CHECK-LABEL: test_vaba_u32
// CHECK: vaba.u32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vaba_u32(uint32x2_t a, uint32x2_t b, uint32x2_t c) {
return vaba_u32(a, b, c);
}
-// CHECK: test_vabaq_s8
+// CHECK-LABEL: test_vabaq_s8
// CHECK: vaba.s8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vabaq_s8(int8x16_t a, int8x16_t b, int8x16_t c) {
return vabaq_s8(a, b, c);
}
-// CHECK: test_vabaq_s16
+// CHECK-LABEL: test_vabaq_s16
// CHECK: vaba.s16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vabaq_s16(int16x8_t a, int16x8_t b, int16x8_t c) {
return vabaq_s16(a, b, c);
}
-// CHECK: test_vabaq_s32
+// CHECK-LABEL: test_vabaq_s32
// CHECK: vaba.s32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vabaq_s32(int32x4_t a, int32x4_t b, int32x4_t c) {
return vabaq_s32(a, b, c);
}
-// CHECK: test_vabaq_u8
+// CHECK-LABEL: test_vabaq_u8
// CHECK: vaba.u8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vabaq_u8(uint8x16_t a, uint8x16_t b, uint8x16_t c) {
return vabaq_u8(a, b, c);
}
-// CHECK: test_vabaq_u16
+// CHECK-LABEL: test_vabaq_u16
// CHECK: vaba.u16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vabaq_u16(uint16x8_t a, uint16x8_t b, uint16x8_t c) {
return vabaq_u16(a, b, c);
}
-// CHECK: test_vabaq_u32
+// CHECK-LABEL: test_vabaq_u32
// CHECK: vaba.u32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vabaq_u32(uint32x4_t a, uint32x4_t b, uint32x4_t c) {
return vabaq_u32(a, b, c);
}
-// CHECK: test_vabal_s8
+// CHECK-LABEL: test_vabal_s8
// CHECK: vabal.s8 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x8_t test_vabal_s8(int16x8_t a, int8x8_t b, int8x8_t c) {
return vabal_s8(a, b, c);
}
-// CHECK: test_vabal_s16
+// CHECK-LABEL: test_vabal_s16
// CHECK: vabal.s16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x4_t test_vabal_s16(int32x4_t a, int16x4_t b, int16x4_t c) {
return vabal_s16(a, b, c);
}
-// CHECK: test_vabal_s32
+// CHECK-LABEL: test_vabal_s32
// CHECK: vabal.s32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x2_t test_vabal_s32(int64x2_t a, int32x2_t b, int32x2_t c) {
return vabal_s32(a, b, c);
}
-// CHECK: test_vabal_u8
+// CHECK-LABEL: test_vabal_u8
// CHECK: vabal.u8 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x8_t test_vabal_u8(uint16x8_t a, uint8x8_t b, uint8x8_t c) {
return vabal_u8(a, b, c);
}
-// CHECK: test_vabal_u16
+// CHECK-LABEL: test_vabal_u16
// CHECK: vabal.u16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x4_t test_vabal_u16(uint32x4_t a, uint16x4_t b, uint16x4_t c) {
return vabal_u16(a, b, c);
}
-// CHECK: test_vabal_u32
+// CHECK-LABEL: test_vabal_u32
// CHECK: vabal.u32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint64x2_t test_vabal_u32(uint64x2_t a, uint32x2_t b, uint32x2_t c) {
return vabal_u32(a, b, c);
}
-// CHECK: test_vabd_s8
+// CHECK-LABEL: test_vabd_s8
// CHECK: vabd.s8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vabd_s8(int8x8_t a, int8x8_t b) {
return vabd_s8(a, b);
}
-// CHECK: test_vabd_s16
+// CHECK-LABEL: test_vabd_s16
// CHECK: vabd.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vabd_s16(int16x4_t a, int16x4_t b) {
return vabd_s16(a, b);
}
-// CHECK: test_vabd_s32
+// CHECK-LABEL: test_vabd_s32
// CHECK: vabd.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vabd_s32(int32x2_t a, int32x2_t b) {
return vabd_s32(a, b);
}
-// CHECK: test_vabd_u8
+// CHECK-LABEL: test_vabd_u8
// CHECK: vabd.u8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vabd_u8(uint8x8_t a, uint8x8_t b) {
return vabd_u8(a, b);
}
-// CHECK: test_vabd_u16
+// CHECK-LABEL: test_vabd_u16
// CHECK: vabd.u16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vabd_u16(uint16x4_t a, uint16x4_t b) {
return vabd_u16(a, b);
}
-// CHECK: test_vabd_u32
+// CHECK-LABEL: test_vabd_u32
// CHECK: vabd.u32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vabd_u32(uint32x2_t a, uint32x2_t b) {
return vabd_u32(a, b);
}
-// CHECK: test_vabd_f32
+// CHECK-LABEL: test_vabd_f32
// CHECK: vabd.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vabd_f32(float32x2_t a, float32x2_t b) {
return vabd_f32(a, b);
}
-// CHECK: test_vabdq_s8
+// CHECK-LABEL: test_vabdq_s8
// CHECK: vabd.s8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vabdq_s8(int8x16_t a, int8x16_t b) {
return vabdq_s8(a, b);
}
-// CHECK: test_vabdq_s16
+// CHECK-LABEL: test_vabdq_s16
// CHECK: vabd.s16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vabdq_s16(int16x8_t a, int16x8_t b) {
return vabdq_s16(a, b);
}
-// CHECK: test_vabdq_s32
+// CHECK-LABEL: test_vabdq_s32
// CHECK: vabd.s32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vabdq_s32(int32x4_t a, int32x4_t b) {
return vabdq_s32(a, b);
}
-// CHECK: test_vabdq_u8
+// CHECK-LABEL: test_vabdq_u8
// CHECK: vabd.u8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vabdq_u8(uint8x16_t a, uint8x16_t b) {
return vabdq_u8(a, b);
}
-// CHECK: test_vabdq_u16
+// CHECK-LABEL: test_vabdq_u16
// CHECK: vabd.u16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vabdq_u16(uint16x8_t a, uint16x8_t b) {
return vabdq_u16(a, b);
}
-// CHECK: test_vabdq_u32
+// CHECK-LABEL: test_vabdq_u32
// CHECK: vabd.u32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vabdq_u32(uint32x4_t a, uint32x4_t b) {
return vabdq_u32(a, b);
}
-// CHECK: test_vabdq_f32
+// CHECK-LABEL: test_vabdq_f32
// CHECK: vabd.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
float32x4_t test_vabdq_f32(float32x4_t a, float32x4_t b) {
return vabdq_f32(a, b);
}
-// CHECK: test_vabdl_s8
+// CHECK-LABEL: test_vabdl_s8
// CHECK: vabdl.s8 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x8_t test_vabdl_s8(int8x8_t a, int8x8_t b) {
return vabdl_s8(a, b);
}
-// CHECK: test_vabdl_s16
+// CHECK-LABEL: test_vabdl_s16
// CHECK: vabdl.s16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x4_t test_vabdl_s16(int16x4_t a, int16x4_t b) {
return vabdl_s16(a, b);
}
-// CHECK: test_vabdl_s32
+// CHECK-LABEL: test_vabdl_s32
// CHECK: vabdl.s32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x2_t test_vabdl_s32(int32x2_t a, int32x2_t b) {
return vabdl_s32(a, b);
}
-// CHECK: test_vabdl_u8
+// CHECK-LABEL: test_vabdl_u8
// CHECK: vabdl.u8 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x8_t test_vabdl_u8(uint8x8_t a, uint8x8_t b) {
return vabdl_u8(a, b);
}
-// CHECK: test_vabdl_u16
+// CHECK-LABEL: test_vabdl_u16
// CHECK: vabdl.u16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x4_t test_vabdl_u16(uint16x4_t a, uint16x4_t b) {
return vabdl_u16(a, b);
}
-// CHECK: test_vabdl_u32
+// CHECK-LABEL: test_vabdl_u32
// CHECK: vabdl.u32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint64x2_t test_vabdl_u32(uint32x2_t a, uint32x2_t b) {
return vabdl_u32(a, b);
}
-// CHECK: test_vabs_s8
+// CHECK-LABEL: test_vabs_s8
// CHECK: vabs.s8 d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vabs_s8(int8x8_t a) {
return vabs_s8(a);
}
-// CHECK: test_vabs_s16
+// CHECK-LABEL: test_vabs_s16
// CHECK: vabs.s16 d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vabs_s16(int16x4_t a) {
return vabs_s16(a);
}
-// CHECK: test_vabs_s32
+// CHECK-LABEL: test_vabs_s32
// CHECK: vabs.s32 d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vabs_s32(int32x2_t a) {
return vabs_s32(a);
}
-// CHECK: test_vabs_f32
+// CHECK-LABEL: test_vabs_f32
// CHECK: vabs.f32 d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vabs_f32(float32x2_t a) {
return vabs_f32(a);
}
-// CHECK: test_vabsq_s8
+// CHECK-LABEL: test_vabsq_s8
// CHECK: vabs.s8 q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vabsq_s8(int8x16_t a) {
return vabsq_s8(a);
}
-// CHECK: test_vabsq_s16
+// CHECK-LABEL: test_vabsq_s16
// CHECK: vabs.s16 q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vabsq_s16(int16x8_t a) {
return vabsq_s16(a);
}
-// CHECK: test_vabsq_s32
+// CHECK-LABEL: test_vabsq_s32
// CHECK: vabs.s32 q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vabsq_s32(int32x4_t a) {
return vabsq_s32(a);
}
-// CHECK: test_vabsq_f32
+// CHECK-LABEL: test_vabsq_f32
// CHECK: vabs.f32 q{{[0-9]+}}, q{{[0-9]+}}
float32x4_t test_vabsq_f32(float32x4_t a) {
return vabsq_f32(a);
}
-// CHECK: test_vadd_s8
+// CHECK-LABEL: test_vadd_s8
// CHECK: vadd.i8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vadd_s8(int8x8_t a, int8x8_t b) {
return vadd_s8(a, b);
}
-// CHECK: test_vadd_s16
+// CHECK-LABEL: test_vadd_s16
// CHECK: vadd.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vadd_s16(int16x4_t a, int16x4_t b) {
return vadd_s16(a, b);
}
-// CHECK: test_vadd_s32
+// CHECK-LABEL: test_vadd_s32
// CHECK: vadd.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vadd_s32(int32x2_t a, int32x2_t b) {
return vadd_s32(a, b);
}
-// CHECK: test_vadd_s64
+// CHECK-LABEL: test_vadd_s64
// CHECK: vadd.i64 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x1_t test_vadd_s64(int64x1_t a, int64x1_t b) {
return vadd_s64(a, b);
}
-// CHECK: test_vadd_f32
+// CHECK-LABEL: test_vadd_f32
// CHECK: vadd.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vadd_f32(float32x2_t a, float32x2_t b) {
return vadd_f32(a, b);
}
-// CHECK: test_vadd_u8
+// CHECK-LABEL: test_vadd_u8
// CHECK: vadd.i8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vadd_u8(uint8x8_t a, uint8x8_t b) {
return vadd_u8(a, b);
}
-// CHECK: test_vadd_u16
+// CHECK-LABEL: test_vadd_u16
// CHECK: vadd.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vadd_u16(uint16x4_t a, uint16x4_t b) {
return vadd_u16(a, b);
}
-// CHECK: test_vadd_u32
+// CHECK-LABEL: test_vadd_u32
// CHECK: vadd.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vadd_u32(uint32x2_t a, uint32x2_t b) {
return vadd_u32(a, b);
}
-// CHECK: test_vadd_u64
+// CHECK-LABEL: test_vadd_u64
// CHECK: vadd.i64 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint64x1_t test_vadd_u64(uint64x1_t a, uint64x1_t b) {
return vadd_u64(a, b);
}
-// CHECK: test_vaddq_s8
+// CHECK-LABEL: test_vaddq_s8
// CHECK: vadd.i8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vaddq_s8(int8x16_t a, int8x16_t b) {
return vaddq_s8(a, b);
}
-// CHECK: test_vaddq_s16
+// CHECK-LABEL: test_vaddq_s16
// CHECK: vadd.i16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vaddq_s16(int16x8_t a, int16x8_t b) {
return vaddq_s16(a, b);
}
-// CHECK: test_vaddq_s32
+// CHECK-LABEL: test_vaddq_s32
// CHECK: vadd.i32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vaddq_s32(int32x4_t a, int32x4_t b) {
return vaddq_s32(a, b);
}
-// CHECK: test_vaddq_s64
+// CHECK-LABEL: test_vaddq_s64
// CHECK: vadd.i64 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int64x2_t test_vaddq_s64(int64x2_t a, int64x2_t b) {
return vaddq_s64(a, b);
}
-// CHECK: test_vaddq_f32
+// CHECK-LABEL: test_vaddq_f32
// CHECK: vadd.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
float32x4_t test_vaddq_f32(float32x4_t a, float32x4_t b) {
return vaddq_f32(a, b);
}
-// CHECK: test_vaddq_u8
+// CHECK-LABEL: test_vaddq_u8
// CHECK: vadd.i8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vaddq_u8(uint8x16_t a, uint8x16_t b) {
return vaddq_u8(a, b);
}
-// CHECK: test_vaddq_u16
+// CHECK-LABEL: test_vaddq_u16
// CHECK: vadd.i16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vaddq_u16(uint16x8_t a, uint16x8_t b) {
return vaddq_u16(a, b);
}
-// CHECK: test_vaddq_u32
+// CHECK-LABEL: test_vaddq_u32
// CHECK: vadd.i32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vaddq_u32(uint32x4_t a, uint32x4_t b) {
return vaddq_u32(a, b);
}
-// CHECK: test_vaddq_u64
+// CHECK-LABEL: test_vaddq_u64
// CHECK: vadd.i64 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint64x2_t test_vaddq_u64(uint64x2_t a, uint64x2_t b) {
return vaddq_u64(a, b);
}
-// CHECK: test_vaddhn_s16
+// CHECK-LABEL: test_vaddhn_s16
// CHECK: vaddhn.i16 d{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x8_t test_vaddhn_s16(int16x8_t a, int16x8_t b) {
return vaddhn_s16(a, b);
}
-// CHECK: test_vaddhn_s32
+// CHECK-LABEL: test_vaddhn_s32
// CHECK: vaddhn.i32 d{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x4_t test_vaddhn_s32(int32x4_t a, int32x4_t b) {
return vaddhn_s32(a, b);
}
-// CHECK: test_vaddhn_s64
+// CHECK-LABEL: test_vaddhn_s64
// CHECK: vaddhn.i64 d{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x2_t test_vaddhn_s64(int64x2_t a, int64x2_t b) {
return vaddhn_s64(a, b);
}
-// CHECK: test_vaddhn_u16
+// CHECK-LABEL: test_vaddhn_u16
// CHECK: vaddhn.i16 d{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x8_t test_vaddhn_u16(uint16x8_t a, uint16x8_t b) {
return vaddhn_u16(a, b);
}
-// CHECK: test_vaddhn_u32
+// CHECK-LABEL: test_vaddhn_u32
// CHECK: vaddhn.i32 d{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x4_t test_vaddhn_u32(uint32x4_t a, uint32x4_t b) {
return vaddhn_u32(a, b);
}
-// CHECK: test_vaddhn_u64
+// CHECK-LABEL: test_vaddhn_u64
// CHECK: vaddhn.i64 d{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x2_t test_vaddhn_u64(uint64x2_t a, uint64x2_t b) {
return vaddhn_u64(a, b);
}
-// CHECK: test_vaddl_s8
+// CHECK-LABEL: test_vaddl_s8
// CHECK: vaddl.s8 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x8_t test_vaddl_s8(int8x8_t a, int8x8_t b) {
return vaddl_s8(a, b);
}
-// CHECK: test_vaddl_s16
+// CHECK-LABEL: test_vaddl_s16
// CHECK: vaddl.s16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x4_t test_vaddl_s16(int16x4_t a, int16x4_t b) {
return vaddl_s16(a, b);
}
-// CHECK: test_vaddl_s32
+// CHECK-LABEL: test_vaddl_s32
// CHECK: vaddl.s32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x2_t test_vaddl_s32(int32x2_t a, int32x2_t b) {
return vaddl_s32(a, b);
}
-// CHECK: test_vaddl_u8
+// CHECK-LABEL: test_vaddl_u8
// CHECK: vaddl.u8 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x8_t test_vaddl_u8(uint8x8_t a, uint8x8_t b) {
return vaddl_u8(a, b);
}
-// CHECK: test_vaddl_u16
+// CHECK-LABEL: test_vaddl_u16
// CHECK: vaddl.u16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x4_t test_vaddl_u16(uint16x4_t a, uint16x4_t b) {
return vaddl_u16(a, b);
}
-// CHECK: test_vaddl_u32
+// CHECK-LABEL: test_vaddl_u32
// CHECK: vaddl.u32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint64x2_t test_vaddl_u32(uint32x2_t a, uint32x2_t b) {
return vaddl_u32(a, b);
}
-// CHECK: test_vaddw_s8
+// CHECK-LABEL: test_vaddw_s8
// CHECK: vaddw.s8 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}
int16x8_t test_vaddw_s8(int16x8_t a, int8x8_t b) {
return vaddw_s8(a, b);
}
-// CHECK: test_vaddw_s16
+// CHECK-LABEL: test_vaddw_s16
// CHECK: vaddw.s16 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}
int32x4_t test_vaddw_s16(int32x4_t a, int16x4_t b) {
return vaddw_s16(a, b);
}
-// CHECK: test_vaddw_s32
+// CHECK-LABEL: test_vaddw_s32
// CHECK: vaddw.s32 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}
int64x2_t test_vaddw_s32(int64x2_t a, int32x2_t b) {
return vaddw_s32(a, b);
}
-// CHECK: test_vaddw_u8
+// CHECK-LABEL: test_vaddw_u8
// CHECK: vaddw.u8 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}
uint16x8_t test_vaddw_u8(uint16x8_t a, uint8x8_t b) {
return vaddw_u8(a, b);
}
-// CHECK: test_vaddw_u16
+// CHECK-LABEL: test_vaddw_u16
// CHECK: vaddw.u16 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}
uint32x4_t test_vaddw_u16(uint32x4_t a, uint16x4_t b) {
return vaddw_u16(a, b);
}
-// CHECK: test_vaddw_u32
+// CHECK-LABEL: test_vaddw_u32
// CHECK: vaddw.u32 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}
uint64x2_t test_vaddw_u32(uint64x2_t a, uint32x2_t b) {
return vaddw_u32(a, b);
}
-// CHECK: test_vand_s8
+// CHECK-LABEL: test_vand_s8
// CHECK: vand d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vand_s8(int8x8_t a, int8x8_t b) {
return vand_s8(a, b);
}
-// CHECK: test_vand_s16
+// CHECK-LABEL: test_vand_s16
// CHECK: vand d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vand_s16(int16x4_t a, int16x4_t b) {
return vand_s16(a, b);
}
-// CHECK: test_vand_s32
+// CHECK-LABEL: test_vand_s32
// CHECK: vand d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vand_s32(int32x2_t a, int32x2_t b) {
return vand_s32(a, b);
}
-// CHECK: test_vand_s64
+// CHECK-LABEL: test_vand_s64
// CHECK: vand d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x1_t test_vand_s64(int64x1_t a, int64x1_t b) {
return vand_s64(a, b);
}
-// CHECK: test_vand_u8
+// CHECK-LABEL: test_vand_u8
// CHECK: vand d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vand_u8(uint8x8_t a, uint8x8_t b) {
return vand_u8(a, b);
}
-// CHECK: test_vand_u16
+// CHECK-LABEL: test_vand_u16
// CHECK: vand d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vand_u16(uint16x4_t a, uint16x4_t b) {
return vand_u16(a, b);
}
-// CHECK: test_vand_u32
+// CHECK-LABEL: test_vand_u32
// CHECK: vand d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vand_u32(uint32x2_t a, uint32x2_t b) {
return vand_u32(a, b);
}
-// CHECK: test_vand_u64
+// CHECK-LABEL: test_vand_u64
// CHECK: vand d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint64x1_t test_vand_u64(uint64x1_t a, uint64x1_t b) {
return vand_u64(a, b);
}
-// CHECK: test_vandq_s8
+// CHECK-LABEL: test_vandq_s8
// CHECK: vand q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vandq_s8(int8x16_t a, int8x16_t b) {
return vandq_s8(a, b);
}
-// CHECK: test_vandq_s16
+// CHECK-LABEL: test_vandq_s16
// CHECK: vand q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vandq_s16(int16x8_t a, int16x8_t b) {
return vandq_s16(a, b);
}
-// CHECK: test_vandq_s32
+// CHECK-LABEL: test_vandq_s32
// CHECK: vand q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vandq_s32(int32x4_t a, int32x4_t b) {
return vandq_s32(a, b);
}
-// CHECK: test_vandq_s64
+// CHECK-LABEL: test_vandq_s64
// CHECK: vand q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int64x2_t test_vandq_s64(int64x2_t a, int64x2_t b) {
return vandq_s64(a, b);
}
-// CHECK: test_vandq_u8
+// CHECK-LABEL: test_vandq_u8
// CHECK: vand q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vandq_u8(uint8x16_t a, uint8x16_t b) {
return vandq_u8(a, b);
}
-// CHECK: test_vandq_u16
+// CHECK-LABEL: test_vandq_u16
// CHECK: vand q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vandq_u16(uint16x8_t a, uint16x8_t b) {
return vandq_u16(a, b);
}
-// CHECK: test_vandq_u32
+// CHECK-LABEL: test_vandq_u32
// CHECK: vand q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vandq_u32(uint32x4_t a, uint32x4_t b) {
return vandq_u32(a, b);
}
-// CHECK: test_vandq_u64
+// CHECK-LABEL: test_vandq_u64
// CHECK: vand q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint64x2_t test_vandq_u64(uint64x2_t a, uint64x2_t b) {
return vandq_u64(a, b);
}
-// CHECK: test_vbic_s8
+// CHECK-LABEL: test_vbic_s8
// CHECK: vbic d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vbic_s8(int8x8_t a, int8x8_t b) {
return vbic_s8(a, b);
}
-// CHECK: test_vbic_s16
+// CHECK-LABEL: test_vbic_s16
// CHECK: vbic d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vbic_s16(int16x4_t a, int16x4_t b) {
return vbic_s16(a, b);
}
-// CHECK: test_vbic_s32
+// CHECK-LABEL: test_vbic_s32
// CHECK: vbic d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vbic_s32(int32x2_t a, int32x2_t b) {
return vbic_s32(a, b);
}
-// CHECK: test_vbic_s64
+// CHECK-LABEL: test_vbic_s64
// CHECK: vbic d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x1_t test_vbic_s64(int64x1_t a, int64x1_t b) {
return vbic_s64(a, b);
}
-// CHECK: test_vbic_u8
+// CHECK-LABEL: test_vbic_u8
// CHECK: vbic d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vbic_u8(uint8x8_t a, uint8x8_t b) {
return vbic_u8(a, b);
}
-// CHECK: test_vbic_u16
+// CHECK-LABEL: test_vbic_u16
// CHECK: vbic d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vbic_u16(uint16x4_t a, uint16x4_t b) {
return vbic_u16(a, b);
}
-// CHECK: test_vbic_u32
+// CHECK-LABEL: test_vbic_u32
// CHECK: vbic d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vbic_u32(uint32x2_t a, uint32x2_t b) {
return vbic_u32(a, b);
}
-// CHECK: test_vbic_u64
+// CHECK-LABEL: test_vbic_u64
// CHECK: vbic d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint64x1_t test_vbic_u64(uint64x1_t a, uint64x1_t b) {
return vbic_u64(a, b);
}
-// CHECK: test_vbicq_s8
+// CHECK-LABEL: test_vbicq_s8
// CHECK: vbic q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vbicq_s8(int8x16_t a, int8x16_t b) {
return vbicq_s8(a, b);
}
-// CHECK: test_vbicq_s16
+// CHECK-LABEL: test_vbicq_s16
// CHECK: vbic q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vbicq_s16(int16x8_t a, int16x8_t b) {
return vbicq_s16(a, b);
}
-// CHECK: test_vbicq_s32
+// CHECK-LABEL: test_vbicq_s32
// CHECK: vbic q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vbicq_s32(int32x4_t a, int32x4_t b) {
return vbicq_s32(a, b);
}
-// CHECK: test_vbicq_s64
+// CHECK-LABEL: test_vbicq_s64
// CHECK: vbic q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int64x2_t test_vbicq_s64(int64x2_t a, int64x2_t b) {
return vbicq_s64(a, b);
}
-// CHECK: test_vbicq_u8
+// CHECK-LABEL: test_vbicq_u8
// CHECK: vbic q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vbicq_u8(uint8x16_t a, uint8x16_t b) {
return vbicq_u8(a, b);
}
-// CHECK: test_vbicq_u16
+// CHECK-LABEL: test_vbicq_u16
// CHECK: vbic q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vbicq_u16(uint16x8_t a, uint16x8_t b) {
return vbicq_u16(a, b);
}
-// CHECK: test_vbicq_u32
+// CHECK-LABEL: test_vbicq_u32
// CHECK: vbic q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vbicq_u32(uint32x4_t a, uint32x4_t b) {
return vbicq_u32(a, b);
}
-// CHECK: test_vbicq_u64
+// CHECK-LABEL: test_vbicq_u64
// CHECK: vbic q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint64x2_t test_vbicq_u64(uint64x2_t a, uint64x2_t b) {
return vbicq_u64(a, b);
}
-// CHECK: test_vbsl_s8
+// CHECK-LABEL: test_vbsl_s8
// CHECK: vbsl d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vbsl_s8(uint8x8_t a, int8x8_t b, int8x8_t c) {
return vbsl_s8(a, b, c);
}
-// CHECK: test_vbsl_s16
+// CHECK-LABEL: test_vbsl_s16
// CHECK: vbsl d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vbsl_s16(uint16x4_t a, int16x4_t b, int16x4_t c) {
return vbsl_s16(a, b, c);
}
-// CHECK: test_vbsl_s32
+// CHECK-LABEL: test_vbsl_s32
// CHECK: vbsl d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vbsl_s32(uint32x2_t a, int32x2_t b, int32x2_t c) {
return vbsl_s32(a, b, c);
}
-// CHECK: test_vbsl_s64
+// CHECK-LABEL: test_vbsl_s64
// CHECK: vbsl d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x1_t test_vbsl_s64(uint64x1_t a, int64x1_t b, int64x1_t c) {
return vbsl_s64(a, b, c);
}
-// CHECK: test_vbsl_u8
+// CHECK-LABEL: test_vbsl_u8
// CHECK: vbsl d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vbsl_u8(uint8x8_t a, uint8x8_t b, uint8x8_t c) {
return vbsl_u8(a, b, c);
}
-// CHECK: test_vbsl_u16
+// CHECK-LABEL: test_vbsl_u16
// CHECK: vbsl d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vbsl_u16(uint16x4_t a, uint16x4_t b, uint16x4_t c) {
return vbsl_u16(a, b, c);
}
-// CHECK: test_vbsl_u32
+// CHECK-LABEL: test_vbsl_u32
// CHECK: vbsl d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vbsl_u32(uint32x2_t a, uint32x2_t b, uint32x2_t c) {
return vbsl_u32(a, b, c);
}
-// CHECK: test_vbsl_u64
+// CHECK-LABEL: test_vbsl_u64
// CHECK: vbsl d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint64x1_t test_vbsl_u64(uint64x1_t a, uint64x1_t b, uint64x1_t c) {
return vbsl_u64(a, b, c);
}
-// CHECK: test_vbsl_f32
+// CHECK-LABEL: test_vbsl_f32
// CHECK: vbsl d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vbsl_f32(uint32x2_t a, float32x2_t b, float32x2_t c) {
return vbsl_f32(a, b, c);
}
-// CHECK: test_vbsl_p8
+// CHECK-LABEL: test_vbsl_p8
// CHECK: vbsl d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
poly8x8_t test_vbsl_p8(uint8x8_t a, poly8x8_t b, poly8x8_t c) {
return vbsl_p8(a, b, c);
}
-// CHECK: test_vbsl_p16
+// CHECK-LABEL: test_vbsl_p16
// CHECK: vbsl d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
poly16x4_t test_vbsl_p16(uint16x4_t a, poly16x4_t b, poly16x4_t c) {
return vbsl_p16(a, b, c);
}
-// CHECK: test_vbslq_s8
+// CHECK-LABEL: test_vbslq_s8
// CHECK: vbsl q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vbslq_s8(uint8x16_t a, int8x16_t b, int8x16_t c) {
return vbslq_s8(a, b, c);
}
-// CHECK: test_vbslq_s16
+// CHECK-LABEL: test_vbslq_s16
// CHECK: vbsl q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vbslq_s16(uint16x8_t a, int16x8_t b, int16x8_t c) {
return vbslq_s16(a, b, c);
}
-// CHECK: test_vbslq_s32
+// CHECK-LABEL: test_vbslq_s32
// CHECK: vbsl q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vbslq_s32(uint32x4_t a, int32x4_t b, int32x4_t c) {
return vbslq_s32(a, b, c);
}
-// CHECK: test_vbslq_s64
+// CHECK-LABEL: test_vbslq_s64
// CHECK: vbsl q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int64x2_t test_vbslq_s64(uint64x2_t a, int64x2_t b, int64x2_t c) {
return vbslq_s64(a, b, c);
}
-// CHECK: test_vbslq_u8
+// CHECK-LABEL: test_vbslq_u8
// CHECK: vbsl q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vbslq_u8(uint8x16_t a, uint8x16_t b, uint8x16_t c) {
return vbslq_u8(a, b, c);
}
-// CHECK: test_vbslq_u16
+// CHECK-LABEL: test_vbslq_u16
// CHECK: vbsl q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vbslq_u16(uint16x8_t a, uint16x8_t b, uint16x8_t c) {
return vbslq_u16(a, b, c);
}
-// CHECK: test_vbslq_u32
+// CHECK-LABEL: test_vbslq_u32
// CHECK: vbsl q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vbslq_u32(uint32x4_t a, uint32x4_t b, uint32x4_t c) {
return vbslq_u32(a, b, c);
}
-// CHECK: test_vbslq_u64
+// CHECK-LABEL: test_vbslq_u64
// CHECK: vbsl q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint64x2_t test_vbslq_u64(uint64x2_t a, uint64x2_t b, uint64x2_t c) {
return vbslq_u64(a, b, c);
}
-// CHECK: test_vbslq_f32
+// CHECK-LABEL: test_vbslq_f32
// CHECK: vbsl q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
float32x4_t test_vbslq_f32(uint32x4_t a, float32x4_t b, float32x4_t c) {
return vbslq_f32(a, b, c);
}
-// CHECK: test_vbslq_p8
+// CHECK-LABEL: test_vbslq_p8
// CHECK: vbsl q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
poly8x16_t test_vbslq_p8(uint8x16_t a, poly8x16_t b, poly8x16_t c) {
return vbslq_p8(a, b, c);
}
-// CHECK: test_vbslq_p16
+// CHECK-LABEL: test_vbslq_p16
// CHECK: vbsl q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
poly16x8_t test_vbslq_p16(uint16x8_t a, poly16x8_t b, poly16x8_t c) {
return vbslq_p16(a, b, c);
}
-// CHECK: test_vcage_f32
+// CHECK-LABEL: test_vcage_f32
// CHECK: vacge.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vcage_f32(float32x2_t a, float32x2_t b) {
return vcage_f32(a, b);
}
-// CHECK: test_vcageq_f32
+// CHECK-LABEL: test_vcageq_f32
// CHECK: vacge.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vcageq_f32(float32x4_t a, float32x4_t b) {
return vcageq_f32(a, b);
}
-// CHECK: test_vcagt_f32
+// CHECK-LABEL: test_vcagt_f32
// CHECK: vacgt.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vcagt_f32(float32x2_t a, float32x2_t b) {
return vcagt_f32(a, b);
}
-// CHECK: test_vcagtq_f32
+// CHECK-LABEL: test_vcagtq_f32
// CHECK: vacgt.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vcagtq_f32(float32x4_t a, float32x4_t b) {
return vcagtq_f32(a, b);
}
-// CHECK: test_vcale_f32
+// CHECK-LABEL: test_vcale_f32
// CHECK: vacge.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vcale_f32(float32x2_t a, float32x2_t b) {
return vcale_f32(a, b);
}
-// CHECK: test_vcaleq_f32
+// CHECK-LABEL: test_vcaleq_f32
// CHECK: vacge.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vcaleq_f32(float32x4_t a, float32x4_t b) {
return vcaleq_f32(a, b);
}
-// CHECK: test_vcalt_f32
+// CHECK-LABEL: test_vcalt_f32
// CHECK: vacgt.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vcalt_f32(float32x2_t a, float32x2_t b) {
return vcalt_f32(a, b);
}
-// CHECK: test_vcaltq_f32
+// CHECK-LABEL: test_vcaltq_f32
// CHECK: vacgt.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vcaltq_f32(float32x4_t a, float32x4_t b) {
return vcaltq_f32(a, b);
}
-// CHECK: test_vceq_s8
+// CHECK-LABEL: test_vceq_s8
// CHECK: vceq.i8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vceq_s8(int8x8_t a, int8x8_t b) {
return vceq_s8(a, b);
}
-// CHECK: test_vceq_s16
+// CHECK-LABEL: test_vceq_s16
// CHECK: vceq.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vceq_s16(int16x4_t a, int16x4_t b) {
return vceq_s16(a, b);
}
-// CHECK: test_vceq_s32
+// CHECK-LABEL: test_vceq_s32
// CHECK: vceq.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vceq_s32(int32x2_t a, int32x2_t b) {
return vceq_s32(a, b);
}
-// CHECK: test_vceq_f32
+// CHECK-LABEL: test_vceq_f32
// CHECK: vceq.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vceq_f32(float32x2_t a, float32x2_t b) {
return vceq_f32(a, b);
}
-// CHECK: test_vceq_u8
+// CHECK-LABEL: test_vceq_u8
// CHECK: vceq.i8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vceq_u8(uint8x8_t a, uint8x8_t b) {
return vceq_u8(a, b);
}
-// CHECK: test_vceq_u16
+// CHECK-LABEL: test_vceq_u16
// CHECK: vceq.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vceq_u16(uint16x4_t a, uint16x4_t b) {
return vceq_u16(a, b);
}
-// CHECK: test_vceq_u32
+// CHECK-LABEL: test_vceq_u32
// CHECK: vceq.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vceq_u32(uint32x2_t a, uint32x2_t b) {
return vceq_u32(a, b);
}
-// CHECK: test_vceq_p8
+// CHECK-LABEL: test_vceq_p8
// CHECK: vceq.i8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vceq_p8(poly8x8_t a, poly8x8_t b) {
return vceq_p8(a, b);
}
-// CHECK: test_vceqq_s8
+// CHECK-LABEL: test_vceqq_s8
// CHECK: vceq.i8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vceqq_s8(int8x16_t a, int8x16_t b) {
return vceqq_s8(a, b);
}
-// CHECK: test_vceqq_s16
+// CHECK-LABEL: test_vceqq_s16
// CHECK: vceq.i16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vceqq_s16(int16x8_t a, int16x8_t b) {
return vceqq_s16(a, b);
}
-// CHECK: test_vceqq_s32
+// CHECK-LABEL: test_vceqq_s32
// CHECK: vceq.i32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vceqq_s32(int32x4_t a, int32x4_t b) {
return vceqq_s32(a, b);
}
-// CHECK: test_vceqq_f32
+// CHECK-LABEL: test_vceqq_f32
// CHECK: vceq.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vceqq_f32(float32x4_t a, float32x4_t b) {
return vceqq_f32(a, b);
}
-// CHECK: test_vceqq_u8
+// CHECK-LABEL: test_vceqq_u8
// CHECK: vceq.i8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vceqq_u8(uint8x16_t a, uint8x16_t b) {
return vceqq_u8(a, b);
}
-// CHECK: test_vceqq_u16
+// CHECK-LABEL: test_vceqq_u16
// CHECK: vceq.i16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vceqq_u16(uint16x8_t a, uint16x8_t b) {
return vceqq_u16(a, b);
}
-// CHECK: test_vceqq_u32
+// CHECK-LABEL: test_vceqq_u32
// CHECK: vceq.i32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vceqq_u32(uint32x4_t a, uint32x4_t b) {
return vceqq_u32(a, b);
}
-// CHECK: test_vceqq_p8
+// CHECK-LABEL: test_vceqq_p8
// CHECK: vceq.i8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vceqq_p8(poly8x16_t a, poly8x16_t b) {
return vceqq_p8(a, b);
}
-// CHECK: test_vcge_s8
+// CHECK-LABEL: test_vcge_s8
// CHECK: vcge.s8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vcge_s8(int8x8_t a, int8x8_t b) {
return vcge_s8(a, b);
}
-// CHECK: test_vcge_s16
+// CHECK-LABEL: test_vcge_s16
// CHECK: vcge.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vcge_s16(int16x4_t a, int16x4_t b) {
return vcge_s16(a, b);
}
-// CHECK: test_vcge_s32
+// CHECK-LABEL: test_vcge_s32
// CHECK: vcge.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vcge_s32(int32x2_t a, int32x2_t b) {
return vcge_s32(a, b);
}
-// CHECK: test_vcge_f32
+// CHECK-LABEL: test_vcge_f32
// CHECK: vcge.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vcge_f32(float32x2_t a, float32x2_t b) {
return vcge_f32(a, b);
}
-// CHECK: test_vcge_u8
+// CHECK-LABEL: test_vcge_u8
// CHECK: vcge.u8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vcge_u8(uint8x8_t a, uint8x8_t b) {
return vcge_u8(a, b);
}
-// CHECK: test_vcge_u16
+// CHECK-LABEL: test_vcge_u16
// CHECK: vcge.u16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vcge_u16(uint16x4_t a, uint16x4_t b) {
return vcge_u16(a, b);
}
-// CHECK: test_vcge_u32
+// CHECK-LABEL: test_vcge_u32
// CHECK: vcge.u32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vcge_u32(uint32x2_t a, uint32x2_t b) {
return vcge_u32(a, b);
}
-// CHECK: test_vcgeq_s8
+// CHECK-LABEL: test_vcgeq_s8
// CHECK: vcge.s8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vcgeq_s8(int8x16_t a, int8x16_t b) {
return vcgeq_s8(a, b);
}
-// CHECK: test_vcgeq_s16
+// CHECK-LABEL: test_vcgeq_s16
// CHECK: vcge.s16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vcgeq_s16(int16x8_t a, int16x8_t b) {
return vcgeq_s16(a, b);
}
-// CHECK: test_vcgeq_s32
+// CHECK-LABEL: test_vcgeq_s32
// CHECK: vcge.s32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vcgeq_s32(int32x4_t a, int32x4_t b) {
return vcgeq_s32(a, b);
}
-// CHECK: test_vcgeq_f32
+// CHECK-LABEL: test_vcgeq_f32
// CHECK: vcge.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vcgeq_f32(float32x4_t a, float32x4_t b) {
return vcgeq_f32(a, b);
}
-// CHECK: test_vcgeq_u8
+// CHECK-LABEL: test_vcgeq_u8
// CHECK: vcge.u8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vcgeq_u8(uint8x16_t a, uint8x16_t b) {
return vcgeq_u8(a, b);
}
-// CHECK: test_vcgeq_u16
+// CHECK-LABEL: test_vcgeq_u16
// CHECK: vcge.u16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vcgeq_u16(uint16x8_t a, uint16x8_t b) {
return vcgeq_u16(a, b);
}
-// CHECK: test_vcgeq_u32
+// CHECK-LABEL: test_vcgeq_u32
// CHECK: vcge.u32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vcgeq_u32(uint32x4_t a, uint32x4_t b) {
return vcgeq_u32(a, b);
}
-// CHECK: test_vcgt_s8
+// CHECK-LABEL: test_vcgt_s8
// CHECK: vcgt.s8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vcgt_s8(int8x8_t a, int8x8_t b) {
return vcgt_s8(a, b);
}
-// CHECK: test_vcgt_s16
+// CHECK-LABEL: test_vcgt_s16
// CHECK: vcgt.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vcgt_s16(int16x4_t a, int16x4_t b) {
return vcgt_s16(a, b);
}
-// CHECK: test_vcgt_s32
+// CHECK-LABEL: test_vcgt_s32
// CHECK: vcgt.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vcgt_s32(int32x2_t a, int32x2_t b) {
return vcgt_s32(a, b);
}
-// CHECK: test_vcgt_f32
+// CHECK-LABEL: test_vcgt_f32
// CHECK: vcgt.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vcgt_f32(float32x2_t a, float32x2_t b) {
return vcgt_f32(a, b);
}
-// CHECK: test_vcgt_u8
+// CHECK-LABEL: test_vcgt_u8
// CHECK: vcgt.u8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vcgt_u8(uint8x8_t a, uint8x8_t b) {
return vcgt_u8(a, b);
}
-// CHECK: test_vcgt_u16
+// CHECK-LABEL: test_vcgt_u16
// CHECK: vcgt.u16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vcgt_u16(uint16x4_t a, uint16x4_t b) {
return vcgt_u16(a, b);
}
-// CHECK: test_vcgt_u32
+// CHECK-LABEL: test_vcgt_u32
// CHECK: vcgt.u32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vcgt_u32(uint32x2_t a, uint32x2_t b) {
return vcgt_u32(a, b);
}
-// CHECK: test_vcgtq_s8
+// CHECK-LABEL: test_vcgtq_s8
// CHECK: vcgt.s8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vcgtq_s8(int8x16_t a, int8x16_t b) {
return vcgtq_s8(a, b);
}
-// CHECK: test_vcgtq_s16
+// CHECK-LABEL: test_vcgtq_s16
// CHECK: vcgt.s16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vcgtq_s16(int16x8_t a, int16x8_t b) {
return vcgtq_s16(a, b);
}
-// CHECK: test_vcgtq_s32
+// CHECK-LABEL: test_vcgtq_s32
// CHECK: vcgt.s32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vcgtq_s32(int32x4_t a, int32x4_t b) {
return vcgtq_s32(a, b);
}
-// CHECK: test_vcgtq_f32
+// CHECK-LABEL: test_vcgtq_f32
// CHECK: vcgt.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vcgtq_f32(float32x4_t a, float32x4_t b) {
return vcgtq_f32(a, b);
}
-// CHECK: test_vcgtq_u8
+// CHECK-LABEL: test_vcgtq_u8
// CHECK: vcgt.u8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vcgtq_u8(uint8x16_t a, uint8x16_t b) {
return vcgtq_u8(a, b);
}
-// CHECK: test_vcgtq_u16
+// CHECK-LABEL: test_vcgtq_u16
// CHECK: vcgt.u16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vcgtq_u16(uint16x8_t a, uint16x8_t b) {
return vcgtq_u16(a, b);
}
-// CHECK: test_vcgtq_u32
+// CHECK-LABEL: test_vcgtq_u32
// CHECK: vcgt.u32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vcgtq_u32(uint32x4_t a, uint32x4_t b) {
return vcgtq_u32(a, b);
}
-// CHECK: test_vcle_s8
+// CHECK-LABEL: test_vcle_s8
// CHECK: vcge.s8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vcle_s8(int8x8_t a, int8x8_t b) {
return vcle_s8(a, b);
}
-// CHECK: test_vcle_s16
+// CHECK-LABEL: test_vcle_s16
// CHECK: vcge.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vcle_s16(int16x4_t a, int16x4_t b) {
return vcle_s16(a, b);
}
-// CHECK: test_vcle_s32
+// CHECK-LABEL: test_vcle_s32
// CHECK: vcge.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vcle_s32(int32x2_t a, int32x2_t b) {
return vcle_s32(a, b);
}
-// CHECK: test_vcle_f32
+// CHECK-LABEL: test_vcle_f32
// CHECK: vcge.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vcle_f32(float32x2_t a, float32x2_t b) {
return vcle_f32(a, b);
}
-// CHECK: test_vcle_u8
+// CHECK-LABEL: test_vcle_u8
// CHECK: vcge.u8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vcle_u8(uint8x8_t a, uint8x8_t b) {
return vcle_u8(a, b);
}
-// CHECK: test_vcle_u16
+// CHECK-LABEL: test_vcle_u16
// CHECK: vcge.u16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vcle_u16(uint16x4_t a, uint16x4_t b) {
return vcle_u16(a, b);
}
-// CHECK: test_vcle_u32
+// CHECK-LABEL: test_vcle_u32
// CHECK: vcge.u32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vcle_u32(uint32x2_t a, uint32x2_t b) {
return vcle_u32(a, b);
}
-// CHECK: test_vcleq_s8
+// CHECK-LABEL: test_vcleq_s8
// CHECK: vcge.s8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vcleq_s8(int8x16_t a, int8x16_t b) {
return vcleq_s8(a, b);
}
-// CHECK: test_vcleq_s16
+// CHECK-LABEL: test_vcleq_s16
// CHECK: vcge.s16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vcleq_s16(int16x8_t a, int16x8_t b) {
return vcleq_s16(a, b);
}
-// CHECK: test_vcleq_s32
+// CHECK-LABEL: test_vcleq_s32
// CHECK: vcge.s32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vcleq_s32(int32x4_t a, int32x4_t b) {
return vcleq_s32(a, b);
}
-// CHECK: test_vcleq_f32
+// CHECK-LABEL: test_vcleq_f32
// CHECK: vcge.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vcleq_f32(float32x4_t a, float32x4_t b) {
return vcleq_f32(a, b);
}
-// CHECK: test_vcleq_u8
+// CHECK-LABEL: test_vcleq_u8
// CHECK: vcge.u8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vcleq_u8(uint8x16_t a, uint8x16_t b) {
return vcleq_u8(a, b);
}
-// CHECK: test_vcleq_u16
+// CHECK-LABEL: test_vcleq_u16
// CHECK: vcge.u16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vcleq_u16(uint16x8_t a, uint16x8_t b) {
return vcleq_u16(a, b);
}
-// CHECK: test_vcleq_u32
+// CHECK-LABEL: test_vcleq_u32
// CHECK: vcge.u32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vcleq_u32(uint32x4_t a, uint32x4_t b) {
return vcleq_u32(a, b);
}
-// CHECK: test_vcls_s8
+// CHECK-LABEL: test_vcls_s8
// CHECK: vcls.s8 d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vcls_s8(int8x8_t a) {
return vcls_s8(a);
}
-// CHECK: test_vcls_s16
+// CHECK-LABEL: test_vcls_s16
// CHECK: vcls.s16 d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vcls_s16(int16x4_t a) {
return vcls_s16(a);
}
-// CHECK: test_vcls_s32
+// CHECK-LABEL: test_vcls_s32
// CHECK: vcls.s32 d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vcls_s32(int32x2_t a) {
return vcls_s32(a);
}
-// CHECK: test_vclsq_s8
+// CHECK-LABEL: test_vclsq_s8
// CHECK: vcls.s8 q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vclsq_s8(int8x16_t a) {
return vclsq_s8(a);
}
-// CHECK: test_vclsq_s16
+// CHECK-LABEL: test_vclsq_s16
// CHECK: vcls.s16 q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vclsq_s16(int16x8_t a) {
return vclsq_s16(a);
}
-// CHECK: test_vclsq_s32
+// CHECK-LABEL: test_vclsq_s32
// CHECK: vcls.s32 q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vclsq_s32(int32x4_t a) {
return vclsq_s32(a);
}
-// CHECK: test_vclt_s8
+// CHECK-LABEL: test_vclt_s8
// CHECK: vcgt.s8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vclt_s8(int8x8_t a, int8x8_t b) {
return vclt_s8(a, b);
}
-// CHECK: test_vclt_s16
+// CHECK-LABEL: test_vclt_s16
// CHECK: vcgt.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vclt_s16(int16x4_t a, int16x4_t b) {
return vclt_s16(a, b);
}
-// CHECK: test_vclt_s32
+// CHECK-LABEL: test_vclt_s32
// CHECK: vcgt.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vclt_s32(int32x2_t a, int32x2_t b) {
return vclt_s32(a, b);
}
-// CHECK: test_vclt_f32
+// CHECK-LABEL: test_vclt_f32
// CHECK: vcgt.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vclt_f32(float32x2_t a, float32x2_t b) {
return vclt_f32(a, b);
}
-// CHECK: test_vclt_u8
+// CHECK-LABEL: test_vclt_u8
// CHECK: vcgt.u8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vclt_u8(uint8x8_t a, uint8x8_t b) {
return vclt_u8(a, b);
}
-// CHECK: test_vclt_u16
+// CHECK-LABEL: test_vclt_u16
// CHECK: vcgt.u16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vclt_u16(uint16x4_t a, uint16x4_t b) {
return vclt_u16(a, b);
}
-// CHECK: test_vclt_u32
+// CHECK-LABEL: test_vclt_u32
// CHECK: vcgt.u32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vclt_u32(uint32x2_t a, uint32x2_t b) {
return vclt_u32(a, b);
}
-// CHECK: test_vcltq_s8
+// CHECK-LABEL: test_vcltq_s8
// CHECK: vcgt.s8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vcltq_s8(int8x16_t a, int8x16_t b) {
return vcltq_s8(a, b);
}
-// CHECK: test_vcltq_s16
+// CHECK-LABEL: test_vcltq_s16
// CHECK: vcgt.s16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vcltq_s16(int16x8_t a, int16x8_t b) {
return vcltq_s16(a, b);
}
-// CHECK: test_vcltq_s32
+// CHECK-LABEL: test_vcltq_s32
// CHECK: vcgt.s32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vcltq_s32(int32x4_t a, int32x4_t b) {
return vcltq_s32(a, b);
}
-// CHECK: test_vcltq_f32
+// CHECK-LABEL: test_vcltq_f32
// CHECK: vcgt.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vcltq_f32(float32x4_t a, float32x4_t b) {
return vcltq_f32(a, b);
}
-// CHECK: test_vcltq_u8
+// CHECK-LABEL: test_vcltq_u8
// CHECK: vcgt.u8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vcltq_u8(uint8x16_t a, uint8x16_t b) {
return vcltq_u8(a, b);
}
-// CHECK: test_vcltq_u16
+// CHECK-LABEL: test_vcltq_u16
// CHECK: vcgt.u16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vcltq_u16(uint16x8_t a, uint16x8_t b) {
return vcltq_u16(a, b);
}
-// CHECK: test_vcltq_u32
+// CHECK-LABEL: test_vcltq_u32
// CHECK: vcgt.u32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vcltq_u32(uint32x4_t a, uint32x4_t b) {
return vcltq_u32(a, b);
}
-// CHECK: test_vclz_s8
+// CHECK-LABEL: test_vclz_s8
// CHECK: vclz.i8 d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vclz_s8(int8x8_t a) {
return vclz_s8(a);
}
-// CHECK: test_vclz_s16
+// CHECK-LABEL: test_vclz_s16
// CHECK: vclz.i16 d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vclz_s16(int16x4_t a) {
return vclz_s16(a);
}
-// CHECK: test_vclz_s32
+// CHECK-LABEL: test_vclz_s32
// CHECK: vclz.i32 d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vclz_s32(int32x2_t a) {
return vclz_s32(a);
}
-// CHECK: test_vclz_u8
+// CHECK-LABEL: test_vclz_u8
// CHECK: vclz.i8 d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vclz_u8(uint8x8_t a) {
return vclz_u8(a);
}
-// CHECK: test_vclz_u16
+// CHECK-LABEL: test_vclz_u16
// CHECK: vclz.i16 d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vclz_u16(uint16x4_t a) {
return vclz_u16(a);
}
-// CHECK: test_vclz_u32
+// CHECK-LABEL: test_vclz_u32
// CHECK: vclz.i32 d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vclz_u32(uint32x2_t a) {
return vclz_u32(a);
}
-// CHECK: test_vclzq_s8
+// CHECK-LABEL: test_vclzq_s8
// CHECK: vclz.i8 q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vclzq_s8(int8x16_t a) {
return vclzq_s8(a);
}
-// CHECK: test_vclzq_s16
+// CHECK-LABEL: test_vclzq_s16
// CHECK: vclz.i16 q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vclzq_s16(int16x8_t a) {
return vclzq_s16(a);
}
-// CHECK: test_vclzq_s32
+// CHECK-LABEL: test_vclzq_s32
// CHECK: vclz.i32 q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vclzq_s32(int32x4_t a) {
return vclzq_s32(a);
}
-// CHECK: test_vclzq_u8
+// CHECK-LABEL: test_vclzq_u8
// CHECK: vclz.i8 q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vclzq_u8(uint8x16_t a) {
return vclzq_u8(a);
}
-// CHECK: test_vclzq_u16
+// CHECK-LABEL: test_vclzq_u16
// CHECK: vclz.i16 q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vclzq_u16(uint16x8_t a) {
return vclzq_u16(a);
}
-// CHECK: test_vclzq_u32
+// CHECK-LABEL: test_vclzq_u32
// CHECK: vclz.i32 q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vclzq_u32(uint32x4_t a) {
return vclzq_u32(a);
}
-// CHECK: test_vcnt_u8
+// CHECK-LABEL: test_vcnt_u8
// CHECK: vcnt.8 d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vcnt_u8(uint8x8_t a) {
return vcnt_u8(a);
}
-// CHECK: test_vcnt_s8
+// CHECK-LABEL: test_vcnt_s8
// CHECK: vcnt.8 d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vcnt_s8(int8x8_t a) {
return vcnt_s8(a);
}
-// CHECK: test_vcnt_p8
+// CHECK-LABEL: test_vcnt_p8
// CHECK: vcnt.8 d{{[0-9]+}}, d{{[0-9]+}}
poly8x8_t test_vcnt_p8(poly8x8_t a) {
return vcnt_p8(a);
}
-// CHECK: test_vcntq_u8
+// CHECK-LABEL: test_vcntq_u8
// CHECK: vcnt.8 q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vcntq_u8(uint8x16_t a) {
return vcntq_u8(a);
}
-// CHECK: test_vcntq_s8
+// CHECK-LABEL: test_vcntq_s8
// CHECK: vcnt.8 q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vcntq_s8(int8x16_t a) {
return vcntq_s8(a);
}
-// CHECK: test_vcntq_p8
+// CHECK-LABEL: test_vcntq_p8
// CHECK: vcnt.8 q{{[0-9]+}}, q{{[0-9]+}}
poly8x16_t test_vcntq_p8(poly8x16_t a) {
return vcntq_p8(a);
}
-// CHECK: test_vcombine_s8
+// CHECK-LABEL: test_vcombine_s8
int8x16_t test_vcombine_s8(int8x8_t a, int8x8_t b) {
return vcombine_s8(a, b);
}
-// CHECK: test_vcombine_s16
+// CHECK-LABEL: test_vcombine_s16
int16x8_t test_vcombine_s16(int16x4_t a, int16x4_t b) {
return vcombine_s16(a, b);
}
-// CHECK: test_vcombine_s32
+// CHECK-LABEL: test_vcombine_s32
int32x4_t test_vcombine_s32(int32x2_t a, int32x2_t b) {
return vcombine_s32(a, b);
}
-// CHECK: test_vcombine_s64
+// CHECK-LABEL: test_vcombine_s64
int64x2_t test_vcombine_s64(int64x1_t a, int64x1_t b) {
return vcombine_s64(a, b);
}
-// CHECK: test_vcombine_f16
+// CHECK-LABEL: test_vcombine_f16
float16x8_t test_vcombine_f16(float16x4_t a, float16x4_t b) {
return vcombine_f16(a, b);
}
-// CHECK: test_vcombine_f32
+// CHECK-LABEL: test_vcombine_f32
float32x4_t test_vcombine_f32(float32x2_t a, float32x2_t b) {
return vcombine_f32(a, b);
}
-// CHECK: test_vcombine_u8
+// CHECK-LABEL: test_vcombine_u8
uint8x16_t test_vcombine_u8(uint8x8_t a, uint8x8_t b) {
return vcombine_u8(a, b);
}
-// CHECK: test_vcombine_u16
+// CHECK-LABEL: test_vcombine_u16
uint16x8_t test_vcombine_u16(uint16x4_t a, uint16x4_t b) {
return vcombine_u16(a, b);
}
-// CHECK: test_vcombine_u32
+// CHECK-LABEL: test_vcombine_u32
uint32x4_t test_vcombine_u32(uint32x2_t a, uint32x2_t b) {
return vcombine_u32(a, b);
}
-// CHECK: test_vcombine_u64
+// CHECK-LABEL: test_vcombine_u64
uint64x2_t test_vcombine_u64(uint64x1_t a, uint64x1_t b) {
return vcombine_u64(a, b);
}
-// CHECK: test_vcombine_p8
+// CHECK-LABEL: test_vcombine_p8
poly8x16_t test_vcombine_p8(poly8x8_t a, poly8x8_t b) {
return vcombine_p8(a, b);
}
-// CHECK: test_vcombine_p16
+// CHECK-LABEL: test_vcombine_p16
poly16x8_t test_vcombine_p16(poly16x4_t a, poly16x4_t b) {
return vcombine_p16(a, b);
}
-// CHECK: test_vcreate_s8
+// CHECK-LABEL: test_vcreate_s8
int8x8_t test_vcreate_s8(uint64_t a) {
return vcreate_s8(a);
}
-// CHECK: test_vcreate_s16
+// CHECK-LABEL: test_vcreate_s16
int16x4_t test_vcreate_s16(uint64_t a) {
return vcreate_s16(a);
}
-// CHECK: test_vcreate_s32
+// CHECK-LABEL: test_vcreate_s32
int32x2_t test_vcreate_s32(uint64_t a) {
return vcreate_s32(a);
}
-// CHECK: test_vcreate_f16
+// CHECK-LABEL: test_vcreate_f16
float16x4_t test_vcreate_f16(uint64_t a) {
return vcreate_f16(a);
}
-// CHECK: test_vcreate_f32
+// CHECK-LABEL: test_vcreate_f32
float32x2_t test_vcreate_f32(uint64_t a) {
return vcreate_f32(a);
}
-// CHECK: test_vcreate_u8
+// CHECK-LABEL: test_vcreate_u8
uint8x8_t test_vcreate_u8(uint64_t a) {
return vcreate_u8(a);
}
-// CHECK: test_vcreate_u16
+// CHECK-LABEL: test_vcreate_u16
uint16x4_t test_vcreate_u16(uint64_t a) {
return vcreate_u16(a);
}
-// CHECK: test_vcreate_u32
+// CHECK-LABEL: test_vcreate_u32
uint32x2_t test_vcreate_u32(uint64_t a) {
return vcreate_u32(a);
}
-// CHECK: test_vcreate_u64
+// CHECK-LABEL: test_vcreate_u64
uint64x1_t test_vcreate_u64(uint64_t a) {
return vcreate_u64(a);
}
-// CHECK: test_vcreate_p8
+// CHECK-LABEL: test_vcreate_p8
poly8x8_t test_vcreate_p8(uint64_t a) {
return vcreate_p8(a);
}
-// CHECK: test_vcreate_p16
+// CHECK-LABEL: test_vcreate_p16
poly16x4_t test_vcreate_p16(uint64_t a) {
return vcreate_p16(a);
}
-// CHECK: test_vcreate_s64
+// CHECK-LABEL: test_vcreate_s64
int64x1_t test_vcreate_s64(uint64_t a) {
return vcreate_s64(a);
}
-// CHECK: test_vcvt_f16_f32
+// CHECK-LABEL: test_vcvt_f16_f32
// CHECK: vcvt.f16.f32 d{{[0-9]+}}, q{{[0-9]+}}
float16x4_t test_vcvt_f16_f32(float32x4_t a) {
return vcvt_f16_f32(a);
}
-// CHECK: test_vcvt_f32_s32
+// CHECK-LABEL: test_vcvt_f32_s32
// CHECK: vcvt.f32.s32 d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vcvt_f32_s32(int32x2_t a) {
return vcvt_f32_s32(a);
}
-// CHECK: test_vcvt_f32_u32
+// CHECK-LABEL: test_vcvt_f32_u32
// CHECK: vcvt.f32.u32 d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vcvt_f32_u32(uint32x2_t a) {
return vcvt_f32_u32(a);
}
-// CHECK: test_vcvtq_f32_s32
+// CHECK-LABEL: test_vcvtq_f32_s32
// CHECK: vcvt.f32.s32 q{{[0-9]+}}, q{{[0-9]+}}
float32x4_t test_vcvtq_f32_s32(int32x4_t a) {
return vcvtq_f32_s32(a);
}
-// CHECK: test_vcvtq_f32_u32
+// CHECK-LABEL: test_vcvtq_f32_u32
// CHECK: vcvt.f32.u32 q{{[0-9]+}}, q{{[0-9]+}}
float32x4_t test_vcvtq_f32_u32(uint32x4_t a) {
return vcvtq_f32_u32(a);
}
-// CHECK: test_vcvt_f32_f16
+// CHECK-LABEL: test_vcvt_f32_f16
// CHECK: vcvt.f32.f16
float32x4_t test_vcvt_f32_f16(float16x4_t a) {
return vcvt_f32_f16(a);
}
-// CHECK: test_vcvt_n_f32_s32
+// CHECK-LABEL: test_vcvt_n_f32_s32
// CHECK: vcvt.f32.s32 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
float32x2_t test_vcvt_n_f32_s32(int32x2_t a) {
return vcvt_n_f32_s32(a, 1);
}
-// CHECK: test_vcvt_n_f32_u32
+// CHECK-LABEL: test_vcvt_n_f32_u32
// CHECK: vcvt.f32.u32 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
float32x2_t test_vcvt_n_f32_u32(uint32x2_t a) {
return vcvt_n_f32_u32(a, 1);
}
-// CHECK: test_vcvtq_n_f32_s32
+// CHECK-LABEL: test_vcvtq_n_f32_s32
// CHECK: vcvt.f32.s32 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
float32x4_t test_vcvtq_n_f32_s32(int32x4_t a) {
return vcvtq_n_f32_s32(a, 3);
}
-// CHECK: test_vcvtq_n_f32_u32
+// CHECK-LABEL: test_vcvtq_n_f32_u32
// CHECK: vcvt.f32.u32 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
float32x4_t test_vcvtq_n_f32_u32(uint32x4_t a) {
return vcvtq_n_f32_u32(a, 3);
}
-// CHECK: test_vcvt_n_s32_f32
+// CHECK-LABEL: test_vcvt_n_s32_f32
// CHECK: vcvt.s32.f32 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int32x2_t test_vcvt_n_s32_f32(float32x2_t a) {
return vcvt_n_s32_f32(a, 1);
}
-// CHECK: test_vcvtq_n_s32_f32
+// CHECK-LABEL: test_vcvtq_n_s32_f32
// CHECK: vcvt.s32.f32 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int32x4_t test_vcvtq_n_s32_f32(float32x4_t a) {
return vcvtq_n_s32_f32(a, 3);
}
-// CHECK: test_vcvt_n_u32_f32
+// CHECK-LABEL: test_vcvt_n_u32_f32
// CHECK: vcvt.u32.f32 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint32x2_t test_vcvt_n_u32_f32(float32x2_t a) {
return vcvt_n_u32_f32(a, 1);
}
-// CHECK: test_vcvtq_n_u32_f32
+// CHECK-LABEL: test_vcvtq_n_u32_f32
// CHECK: vcvt.u32.f32 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint32x4_t test_vcvtq_n_u32_f32(float32x4_t a) {
return vcvtq_n_u32_f32(a, 3);
}
-// CHECK: test_vcvt_s32_f32
+// CHECK-LABEL: test_vcvt_s32_f32
// CHECK: vcvt.s32.f32 d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vcvt_s32_f32(float32x2_t a) {
return vcvt_s32_f32(a);
}
-// CHECK: test_vcvtq_s32_f32
+// CHECK-LABEL: test_vcvtq_s32_f32
// CHECK: vcvt.s32.f32 q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vcvtq_s32_f32(float32x4_t a) {
return vcvtq_s32_f32(a);
}
-// CHECK: test_vcvt_u32_f32
+// CHECK-LABEL: test_vcvt_u32_f32
// CHECK: vcvt.u32.f32 d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vcvt_u32_f32(float32x2_t a) {
return vcvt_u32_f32(a);
}
-// CHECK: test_vcvtq_u32_f32
+// CHECK-LABEL: test_vcvtq_u32_f32
// CHECK: vcvt.u32.f32 q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vcvtq_u32_f32(float32x4_t a) {
return vcvtq_u32_f32(a);
}
-// CHECK: test_vdup_lane_u8
+// CHECK-LABEL: test_vdup_lane_u8
// CHECK: vdup.8 d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
uint8x8_t test_vdup_lane_u8(uint8x8_t a) {
return vdup_lane_u8(a, 7);
}
-// CHECK: test_vdup_lane_u16
+// CHECK-LABEL: test_vdup_lane_u16
// CHECK: vdup.16 d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
uint16x4_t test_vdup_lane_u16(uint16x4_t a) {
return vdup_lane_u16(a, 3);
}
-// CHECK: test_vdup_lane_u32
+// CHECK-LABEL: test_vdup_lane_u32
// CHECK: vdup.32 d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
uint32x2_t test_vdup_lane_u32(uint32x2_t a) {
return vdup_lane_u32(a, 1);
}
-// CHECK: test_vdup_lane_s8
+// CHECK-LABEL: test_vdup_lane_s8
// CHECK: vdup.8 d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int8x8_t test_vdup_lane_s8(int8x8_t a) {
return vdup_lane_s8(a, 7);
}
-// CHECK: test_vdup_lane_s16
+// CHECK-LABEL: test_vdup_lane_s16
// CHECK: vdup.16 d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int16x4_t test_vdup_lane_s16(int16x4_t a) {
return vdup_lane_s16(a, 3);
}
-// CHECK: test_vdup_lane_s32
+// CHECK-LABEL: test_vdup_lane_s32
// CHECK: vdup.32 d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int32x2_t test_vdup_lane_s32(int32x2_t a) {
return vdup_lane_s32(a, 1);
}
-// CHECK: test_vdup_lane_p8
+// CHECK-LABEL: test_vdup_lane_p8
// CHECK: vdup.8 d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
poly8x8_t test_vdup_lane_p8(poly8x8_t a) {
return vdup_lane_p8(a, 7);
}
-// CHECK: test_vdup_lane_p16
+// CHECK-LABEL: test_vdup_lane_p16
// CHECK: vdup.16 d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
poly16x4_t test_vdup_lane_p16(poly16x4_t a) {
return vdup_lane_p16(a, 3);
}
-// CHECK: test_vdup_lane_f32
+// CHECK-LABEL: test_vdup_lane_f32
// CHECK: vdup.32 d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
float32x2_t test_vdup_lane_f32(float32x2_t a) {
return vdup_lane_f32(a, 1);
}
-// CHECK: test_vdupq_lane_u8
+// CHECK-LABEL: test_vdupq_lane_u8
// CHECK: vdup.8 q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
uint8x16_t test_vdupq_lane_u8(uint8x8_t a) {
return vdupq_lane_u8(a, 7);
}
-// CHECK: test_vdupq_lane_u16
+// CHECK-LABEL: test_vdupq_lane_u16
// CHECK: vdup.16 q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
uint16x8_t test_vdupq_lane_u16(uint16x4_t a) {
return vdupq_lane_u16(a, 3);
}
-// CHECK: test_vdupq_lane_u32
+// CHECK-LABEL: test_vdupq_lane_u32
// CHECK: vdup.32 q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
uint32x4_t test_vdupq_lane_u32(uint32x2_t a) {
return vdupq_lane_u32(a, 1);
}
-// CHECK: test_vdupq_lane_s8
+// CHECK-LABEL: test_vdupq_lane_s8
// CHECK: vdup.8 q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int8x16_t test_vdupq_lane_s8(int8x8_t a) {
return vdupq_lane_s8(a, 7);
}
-// CHECK: test_vdupq_lane_s16
+// CHECK-LABEL: test_vdupq_lane_s16
// CHECK: vdup.16 q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int16x8_t test_vdupq_lane_s16(int16x4_t a) {
return vdupq_lane_s16(a, 3);
}
-// CHECK: test_vdupq_lane_s32
+// CHECK-LABEL: test_vdupq_lane_s32
// CHECK: vdup.32 q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int32x4_t test_vdupq_lane_s32(int32x2_t a) {
return vdupq_lane_s32(a, 1);
}
-// CHECK: test_vdupq_lane_p8
+// CHECK-LABEL: test_vdupq_lane_p8
// CHECK: vdup.8 q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
poly8x16_t test_vdupq_lane_p8(poly8x8_t a) {
return vdupq_lane_p8(a, 7);
}
-// CHECK: test_vdupq_lane_p16
+// CHECK-LABEL: test_vdupq_lane_p16
// CHECK: vdup.16 q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
poly16x8_t test_vdupq_lane_p16(poly16x4_t a) {
return vdupq_lane_p16(a, 3);
}
-// CHECK: test_vdupq_lane_f32
+// CHECK-LABEL: test_vdupq_lane_f32
// CHECK: vdup.32 q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
float32x4_t test_vdupq_lane_f32(float32x2_t a) {
return vdupq_lane_f32(a, 1);
}
-// CHECK: test_vdup_lane_s64
+// CHECK-LABEL: test_vdup_lane_s64
int64x1_t test_vdup_lane_s64(int64x1_t a) {
return vdup_lane_s64(a, 0);
}
-// CHECK: test_vdup_lane_u64
+// CHECK-LABEL: test_vdup_lane_u64
uint64x1_t test_vdup_lane_u64(uint64x1_t a) {
return vdup_lane_u64(a, 0);
}
-// CHECK: test_vdupq_lane_s64
+// CHECK-LABEL: test_vdupq_lane_s64
// CHECK: {{vmov|vdup}}
int64x2_t test_vdupq_lane_s64(int64x1_t a) {
return vdupq_lane_s64(a, 0);
}
-// CHECK: test_vdupq_lane_u64
+// CHECK-LABEL: test_vdupq_lane_u64
// CHECK: {{vmov|vdup}}
uint64x2_t test_vdupq_lane_u64(uint64x1_t a) {
return vdupq_lane_u64(a, 0);
}
-// CHECK: test_vdup_n_u8
+// CHECK-LABEL: test_vdup_n_u8
// CHECK: vmov
uint8x8_t test_vdup_n_u8(uint8_t a) {
return vdup_n_u8(a);
}
-// CHECK: test_vdup_n_u16
+// CHECK-LABEL: test_vdup_n_u16
// CHECK: vmov
uint16x4_t test_vdup_n_u16(uint16_t a) {
return vdup_n_u16(a);
}
-// CHECK: test_vdup_n_u32
+// CHECK-LABEL: test_vdup_n_u32
// CHECK: vmov
uint32x2_t test_vdup_n_u32(uint32_t a) {
return vdup_n_u32(a);
}
-// CHECK: test_vdup_n_s8
+// CHECK-LABEL: test_vdup_n_s8
// CHECK: vmov
int8x8_t test_vdup_n_s8(int8_t a) {
return vdup_n_s8(a);
}
-// CHECK: test_vdup_n_s16
+// CHECK-LABEL: test_vdup_n_s16
// CHECK: vmov
int16x4_t test_vdup_n_s16(int16_t a) {
return vdup_n_s16(a);
}
-// CHECK: test_vdup_n_s32
+// CHECK-LABEL: test_vdup_n_s32
// CHECK: vmov
int32x2_t test_vdup_n_s32(int32_t a) {
return vdup_n_s32(a);
}
-// CHECK: test_vdup_n_p8
+// CHECK-LABEL: test_vdup_n_p8
// CHECK: vmov
poly8x8_t test_vdup_n_p8(poly8_t a) {
return vdup_n_p8(a);
}
-// CHECK: test_vdup_n_p16
+// CHECK-LABEL: test_vdup_n_p16
// CHECK: vmov
poly16x4_t test_vdup_n_p16(poly16_t a) {
return vdup_n_p16(a);
}
-// CHECK: test_vdup_n_f32
+// CHECK-LABEL: test_vdup_n_f16
+// CHECK: vld1.16 {{{d[0-9]+\[\]}}}
+float16x4_t test_vdup_n_f16(float16_t *a) {
+ return vdup_n_f16(*a);
+}
+
+// CHECK-LABEL: test_vdup_n_f32
// CHECK: vmov
float32x2_t test_vdup_n_f32(float32_t a) {
return vdup_n_f32(a);
}
-// CHECK: test_vdupq_n_u8
+// CHECK-LABEL: test_vdupq_n_u8
// CHECK: vmov
uint8x16_t test_vdupq_n_u8(uint8_t a) {
return vdupq_n_u8(a);
}
-// CHECK: test_vdupq_n_u16
+// CHECK-LABEL: test_vdupq_n_u16
// CHECK: vmov
uint16x8_t test_vdupq_n_u16(uint16_t a) {
return vdupq_n_u16(a);
}
-// CHECK: test_vdupq_n_u32
+// CHECK-LABEL: test_vdupq_n_u32
// CHECK: vmov
uint32x4_t test_vdupq_n_u32(uint32_t a) {
return vdupq_n_u32(a);
}
-// CHECK: test_vdupq_n_s8
+// CHECK-LABEL: test_vdupq_n_s8
// CHECK: vmov
int8x16_t test_vdupq_n_s8(int8_t a) {
return vdupq_n_s8(a);
}
-// CHECK: test_vdupq_n_s16
+// CHECK-LABEL: test_vdupq_n_s16
// CHECK: vmov
int16x8_t test_vdupq_n_s16(int16_t a) {
return vdupq_n_s16(a);
}
-// CHECK: test_vdupq_n_s32
+// CHECK-LABEL: test_vdupq_n_s32
// CHECK: vmov
int32x4_t test_vdupq_n_s32(int32_t a) {
return vdupq_n_s32(a);
}
-// CHECK: test_vdupq_n_p8
+// CHECK-LABEL: test_vdupq_n_p8
// CHECK: vmov
poly8x16_t test_vdupq_n_p8(poly8_t a) {
return vdupq_n_p8(a);
}
-// CHECK: test_vdupq_n_p16
+// CHECK-LABEL: test_vdupq_n_p16
// CHECK: vmov
poly16x8_t test_vdupq_n_p16(poly16_t a) {
return vdupq_n_p16(a);
}
-// CHECK: test_vdupq_n_f32
+// CHECK-LABEL: test_vdupq_n_f16
+// CHECK: vld1.16 {{{d[0-9]+\[\], d[0-9]+\[\]}}}
+float16x8_t test_vdupq_n_f16(float16_t *a) {
+ return vdupq_n_f16(*a);
+}
+
+// CHECK-LABEL: test_vdupq_n_f32
// CHECK: vmov
float32x4_t test_vdupq_n_f32(float32_t a) {
return vdupq_n_f32(a);
}
-// CHECK: test_vdup_n_s64
+// CHECK-LABEL: test_vdup_n_s64
// CHECK: vmov
int64x1_t test_vdup_n_s64(int64_t a) {
return vdup_n_s64(a);
}
-// CHECK: test_vdup_n_u64
+// CHECK-LABEL: test_vdup_n_u64
// CHECK: vmov
uint64x1_t test_vdup_n_u64(uint64_t a) {
return vdup_n_u64(a);
}
-// CHECK: test_vdupq_n_s64
+// CHECK-LABEL: test_vdupq_n_s64
// CHECK: vmov
int64x2_t test_vdupq_n_s64(int64_t a) {
return vdupq_n_s64(a);
}
-// CHECK: test_vdupq_n_u64
+// CHECK-LABEL: test_vdupq_n_u64
// CHECK: vmov
uint64x2_t test_vdupq_n_u64(uint64_t a) {
return vdupq_n_u64(a);
}
-// CHECK: test_veor_s8
+// CHECK-LABEL: test_veor_s8
// CHECK: veor d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_veor_s8(int8x8_t a, int8x8_t b) {
return veor_s8(a, b);
}
-// CHECK: test_veor_s16
+// CHECK-LABEL: test_veor_s16
// CHECK: veor d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_veor_s16(int16x4_t a, int16x4_t b) {
return veor_s16(a, b);
}
-// CHECK: test_veor_s32
+// CHECK-LABEL: test_veor_s32
// CHECK: veor d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_veor_s32(int32x2_t a, int32x2_t b) {
return veor_s32(a, b);
}
-// CHECK: test_veor_s64
+// CHECK-LABEL: test_veor_s64
// CHECK: veor d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x1_t test_veor_s64(int64x1_t a, int64x1_t b) {
return veor_s64(a, b);
}
-// CHECK: test_veor_u8
+// CHECK-LABEL: test_veor_u8
// CHECK: veor d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_veor_u8(uint8x8_t a, uint8x8_t b) {
return veor_u8(a, b);
}
-// CHECK: test_veor_u16
+// CHECK-LABEL: test_veor_u16
// CHECK: veor d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_veor_u16(uint16x4_t a, uint16x4_t b) {
return veor_u16(a, b);
}
-// CHECK: test_veor_u32
+// CHECK-LABEL: test_veor_u32
// CHECK: veor d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_veor_u32(uint32x2_t a, uint32x2_t b) {
return veor_u32(a, b);
}
-// CHECK: test_veor_u64
+// CHECK-LABEL: test_veor_u64
// CHECK: veor d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint64x1_t test_veor_u64(uint64x1_t a, uint64x1_t b) {
return veor_u64(a, b);
}
-// CHECK: test_veorq_s8
+// CHECK-LABEL: test_veorq_s8
// CHECK: veor q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_veorq_s8(int8x16_t a, int8x16_t b) {
return veorq_s8(a, b);
}
-// CHECK: test_veorq_s16
+// CHECK-LABEL: test_veorq_s16
// CHECK: veor q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_veorq_s16(int16x8_t a, int16x8_t b) {
return veorq_s16(a, b);
}
-// CHECK: test_veorq_s32
+// CHECK-LABEL: test_veorq_s32
// CHECK: veor q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_veorq_s32(int32x4_t a, int32x4_t b) {
return veorq_s32(a, b);
}
-// CHECK: test_veorq_s64
+// CHECK-LABEL: test_veorq_s64
// CHECK: veor q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int64x2_t test_veorq_s64(int64x2_t a, int64x2_t b) {
return veorq_s64(a, b);
}
-// CHECK: test_veorq_u8
+// CHECK-LABEL: test_veorq_u8
// CHECK: veor q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_veorq_u8(uint8x16_t a, uint8x16_t b) {
return veorq_u8(a, b);
}
-// CHECK: test_veorq_u16
+// CHECK-LABEL: test_veorq_u16
// CHECK: veor q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_veorq_u16(uint16x8_t a, uint16x8_t b) {
return veorq_u16(a, b);
}
-// CHECK: test_veorq_u32
+// CHECK-LABEL: test_veorq_u32
// CHECK: veor q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_veorq_u32(uint32x4_t a, uint32x4_t b) {
return veorq_u32(a, b);
}
-// CHECK: test_veorq_u64
+// CHECK-LABEL: test_veorq_u64
// CHECK: veor q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint64x2_t test_veorq_u64(uint64x2_t a, uint64x2_t b) {
return veorq_u64(a, b);
}
-// CHECK: test_vext_s8
+// CHECK-LABEL: test_vext_s8
// CHECK: vext.8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int8x8_t test_vext_s8(int8x8_t a, int8x8_t b) {
return vext_s8(a, b, 7);
}
-// CHECK: test_vext_u8
+// CHECK-LABEL: test_vext_u8
// CHECK: vext.8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint8x8_t test_vext_u8(uint8x8_t a, uint8x8_t b) {
return vext_u8(a, b, 7);
}
-// CHECK: test_vext_p8
+// CHECK-LABEL: test_vext_p8
// CHECK: vext.8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
poly8x8_t test_vext_p8(poly8x8_t a, poly8x8_t b) {
return vext_p8(a, b, 7);
}
-// CHECK: test_vext_s16
+// CHECK-LABEL: test_vext_s16
// CHECK: vext.16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int16x4_t test_vext_s16(int16x4_t a, int16x4_t b) {
return vext_s16(a, b, 3);
}
-// CHECK: test_vext_u16
+// CHECK-LABEL: test_vext_u16
// CHECK: vext.16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint16x4_t test_vext_u16(uint16x4_t a, uint16x4_t b) {
return vext_u16(a, b, 3);
}
-// CHECK: test_vext_p16
+// CHECK-LABEL: test_vext_p16
// CHECK: vext.16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
poly16x4_t test_vext_p16(poly16x4_t a, poly16x4_t b) {
return vext_p16(a, b, 3);
}
-// CHECK: test_vext_s32
+// CHECK-LABEL: test_vext_s32
// CHECK: vext.32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int32x2_t test_vext_s32(int32x2_t a, int32x2_t b) {
return vext_s32(a, b, 1);
}
-// CHECK: test_vext_u32
+// CHECK-LABEL: test_vext_u32
// CHECK: vext.32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint32x2_t test_vext_u32(uint32x2_t a, uint32x2_t b) {
return vext_u32(a, b, 1);
}
-// CHECK: test_vext_s64
+// CHECK-LABEL: test_vext_s64
int64x1_t test_vext_s64(int64x1_t a, int64x1_t b) {
return vext_s64(a, b, 0);
}
-// CHECK: test_vext_u64
+// CHECK-LABEL: test_vext_u64
uint64x1_t test_vext_u64(uint64x1_t a, uint64x1_t b) {
return vext_u64(a, b, 0);
}
-// CHECK: test_vext_f32
+// CHECK-LABEL: test_vext_f32
// CHECK: vext.32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
float32x2_t test_vext_f32(float32x2_t a, float32x2_t b) {
return vext_f32(a, b, 1);
}
-// CHECK: test_vextq_s8
+// CHECK-LABEL: test_vextq_s8
// CHECK: vext.8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int8x16_t test_vextq_s8(int8x16_t a, int8x16_t b) {
return vextq_s8(a, b, 15);
}
-// CHECK: test_vextq_u8
+// CHECK-LABEL: test_vextq_u8
// CHECK: vext.8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint8x16_t test_vextq_u8(uint8x16_t a, uint8x16_t b) {
return vextq_u8(a, b, 15);
}
-// CHECK: test_vextq_p8
+// CHECK-LABEL: test_vextq_p8
// CHECK: vext.8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
poly8x16_t test_vextq_p8(poly8x16_t a, poly8x16_t b) {
return vextq_p8(a, b, 15);
}
-// CHECK: test_vextq_s16
+// CHECK-LABEL: test_vextq_s16
// CHECK: vext.16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int16x8_t test_vextq_s16(int16x8_t a, int16x8_t b) {
return vextq_s16(a, b, 7);
}
-// CHECK: test_vextq_u16
+// CHECK-LABEL: test_vextq_u16
// CHECK: vext.16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint16x8_t test_vextq_u16(uint16x8_t a, uint16x8_t b) {
return vextq_u16(a, b, 7);
}
-// CHECK: test_vextq_p16
+// CHECK-LABEL: test_vextq_p16
// CHECK: vext.16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
poly16x8_t test_vextq_p16(poly16x8_t a, poly16x8_t b) {
return vextq_p16(a, b, 7);
}
-// CHECK: test_vextq_s32
+// CHECK-LABEL: test_vextq_s32
// CHECK: vext.32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int32x4_t test_vextq_s32(int32x4_t a, int32x4_t b) {
return vextq_s32(a, b, 3);
}
-// CHECK: test_vextq_u32
+// CHECK-LABEL: test_vextq_u32
// CHECK: vext.32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint32x4_t test_vextq_u32(uint32x4_t a, uint32x4_t b) {
return vextq_u32(a, b, 3);
}
-// CHECK: test_vextq_s64
+// CHECK-LABEL: test_vextq_s64
// CHECK: {{vmov|vdup}}
int64x2_t test_vextq_s64(int64x2_t a, int64x2_t b) {
return vextq_s64(a, b, 1);
}
-// CHECK: test_vextq_u64
+// CHECK-LABEL: test_vextq_u64
// CHECK: {{vmov|vdup}}
uint64x2_t test_vextq_u64(uint64x2_t a, uint64x2_t b) {
return vextq_u64(a, b, 1);
}
-// CHECK: test_vextq_f32
+// CHECK-LABEL: test_vextq_f32
// CHECK: vext.32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
float32x4_t test_vextq_f32(float32x4_t a, float32x4_t b) {
return vextq_f32(a, b, 3);
}
-// CHECK: test_vfma_f32
+// CHECK-LABEL: test_vfma_f32
// CHECK: vfma.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vfma_f32(float32x2_t a, float32x2_t b, float32x2_t c) {
return vfma_f32(a, b, c);
}
-// CHECK: test_vfmaq_f32
+// CHECK-LABEL: test_vfmaq_f32
// CHECK: vfma.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
float32x4_t test_vfmaq_f32(float32x4_t a, float32x4_t b, float32x4_t c) {
return vfmaq_f32(a, b, c);
}
-// CHECK: test_vget_high_s8
+// CHECK-LABEL: test_vget_high_s8
int8x8_t test_vget_high_s8(int8x16_t a) {
return vget_high_s8(a);
}
-// CHECK: test_vget_high_s16
+// CHECK-LABEL: test_vget_high_s16
int16x4_t test_vget_high_s16(int16x8_t a) {
return vget_high_s16(a);
}
-// CHECK: test_vget_high_s32
+// CHECK-LABEL: test_vget_high_s32
int32x2_t test_vget_high_s32(int32x4_t a) {
return vget_high_s32(a);
}
-// CHECK: test_vget_high_s64
+// CHECK-LABEL: test_vget_high_s64
int64x1_t test_vget_high_s64(int64x2_t a) {
return vget_high_s64(a);
}
-// CHECK: test_vget_high_f16
+// CHECK-LABEL: test_vget_high_f16
float16x4_t test_vget_high_f16(float16x8_t a) {
return vget_high_f16(a);
}
-// CHECK: test_vget_high_f32
+// CHECK-LABEL: test_vget_high_f32
float32x2_t test_vget_high_f32(float32x4_t a) {
return vget_high_f32(a);
}
-// CHECK: test_vget_high_u8
+// CHECK-LABEL: test_vget_high_u8
uint8x8_t test_vget_high_u8(uint8x16_t a) {
return vget_high_u8(a);
}
-// CHECK: test_vget_high_u16
+// CHECK-LABEL: test_vget_high_u16
uint16x4_t test_vget_high_u16(uint16x8_t a) {
return vget_high_u16(a);
}
-// CHECK: test_vget_high_u32
+// CHECK-LABEL: test_vget_high_u32
uint32x2_t test_vget_high_u32(uint32x4_t a) {
return vget_high_u32(a);
}
-// CHECK: test_vget_high_u64
+// CHECK-LABEL: test_vget_high_u64
uint64x1_t test_vget_high_u64(uint64x2_t a) {
return vget_high_u64(a);
}
-// CHECK: test_vget_high_p8
+// CHECK-LABEL: test_vget_high_p8
poly8x8_t test_vget_high_p8(poly8x16_t a) {
return vget_high_p8(a);
}
-// CHECK: test_vget_high_p16
+// CHECK-LABEL: test_vget_high_p16
poly16x4_t test_vget_high_p16(poly16x8_t a) {
return vget_high_p16(a);
}
-// CHECK: test_vget_lane_u8
+// CHECK-LABEL: test_vget_lane_u8
// CHECK: vmov
uint8_t test_vget_lane_u8(uint8x8_t a) {
return vget_lane_u8(a, 7);
}
-// CHECK: test_vget_lane_u16
+// CHECK-LABEL: test_vget_lane_u16
// CHECK: vmov
uint16_t test_vget_lane_u16(uint16x4_t a) {
return vget_lane_u16(a, 3);
}
-// CHECK: test_vget_lane_u32
+// CHECK-LABEL: test_vget_lane_u32
// CHECK: vmov
uint32_t test_vget_lane_u32(uint32x2_t a) {
return vget_lane_u32(a, 1);
}
-// CHECK: test_vget_lane_s8
+// CHECK-LABEL: test_vget_lane_s8
// CHECK: vmov
int8_t test_vget_lane_s8(int8x8_t a) {
return vget_lane_s8(a, 7);
}
-// CHECK: test_vget_lane_s16
+// CHECK-LABEL: test_vget_lane_s16
// CHECK: vmov
int16_t test_vget_lane_s16(int16x4_t a) {
return vget_lane_s16(a, 3);
}
-// CHECK: test_vget_lane_s32
+// CHECK-LABEL: test_vget_lane_s32
// CHECK: vmov
int32_t test_vget_lane_s32(int32x2_t a) {
return vget_lane_s32(a, 1);
}
-// CHECK: test_vget_lane_p8
+// CHECK-LABEL: test_vget_lane_p8
// CHECK: vmov
poly8_t test_vget_lane_p8(poly8x8_t a) {
return vget_lane_p8(a, 7);
}
-// CHECK: test_vget_lane_p16
+// CHECK-LABEL: test_vget_lane_p16
// CHECK: vmov
poly16_t test_vget_lane_p16(poly16x4_t a) {
return vget_lane_p16(a, 3);
}
-// CHECK: test_vget_lane_f32
+// CHECK-LABEL: test_vget_lane_f32
// CHECK: vmov
float32_t test_vget_lane_f32(float32x2_t a) {
return vget_lane_f32(a, 1);
}
-// CHECK: test_vgetq_lane_u8
+// CHECK-LABEL: test_vgetq_lane_u8
// CHECK: vmov
uint8_t test_vgetq_lane_u8(uint8x16_t a) {
return vgetq_lane_u8(a, 15);
}
-// CHECK: test_vgetq_lane_u16
+// CHECK-LABEL: test_vgetq_lane_u16
// CHECK: vmov
uint16_t test_vgetq_lane_u16(uint16x8_t a) {
return vgetq_lane_u16(a, 7);
}
-// CHECK: test_vgetq_lane_u32
+// CHECK-LABEL: test_vgetq_lane_u32
// CHECK: vmov
uint32_t test_vgetq_lane_u32(uint32x4_t a) {
return vgetq_lane_u32(a, 3);
}
-// CHECK: test_vgetq_lane_s8
+// CHECK-LABEL: test_vgetq_lane_s8
// CHECK: vmov
int8_t test_vgetq_lane_s8(int8x16_t a) {
return vgetq_lane_s8(a, 15);
}
-// CHECK: test_vgetq_lane_s16
+// CHECK-LABEL: test_vgetq_lane_s16
// CHECK: vmov
int16_t test_vgetq_lane_s16(int16x8_t a) {
return vgetq_lane_s16(a, 7);
}
-// CHECK: test_vgetq_lane_s32
+// CHECK-LABEL: test_vgetq_lane_s32
// CHECK: vmov
int32_t test_vgetq_lane_s32(int32x4_t a) {
return vgetq_lane_s32(a, 3);
}
-// CHECK: test_vgetq_lane_p8
+// CHECK-LABEL: test_vgetq_lane_p8
// CHECK: vmov
poly8_t test_vgetq_lane_p8(poly8x16_t a) {
return vgetq_lane_p8(a, 15);
}
-// CHECK: test_vgetq_lane_p16
+// CHECK-LABEL: test_vgetq_lane_p16
// CHECK: vmov
poly16_t test_vgetq_lane_p16(poly16x8_t a) {
return vgetq_lane_p16(a, 7);
}
-// CHECK: test_vgetq_lane_f32
+// CHECK-LABEL: test_vgetq_lane_f32
// CHECK: vmov
float32_t test_vgetq_lane_f32(float32x4_t a) {
return vgetq_lane_f32(a, 3);
}
-// CHECK: test_vget_lane_s64
+// CHECK-LABEL: test_vget_lane_s64
// CHECK: vmov
int64_t test_vget_lane_s64(int64x1_t a) {
return vget_lane_s64(a, 0);
}
-// CHECK: test_vget_lane_u64
+// CHECK-LABEL: test_vget_lane_u64
// CHECK: vmov
uint64_t test_vget_lane_u64(uint64x1_t a) {
return vget_lane_u64(a, 0);
}
-// CHECK: test_vgetq_lane_s64
+// CHECK-LABEL: test_vgetq_lane_s64
// CHECK: vmov
int64_t test_vgetq_lane_s64(int64x2_t a) {
return vgetq_lane_s64(a, 1);
}
-// CHECK: test_vgetq_lane_u64
+// CHECK-LABEL: test_vgetq_lane_u64
// CHECK: vmov
uint64_t test_vgetq_lane_u64(uint64x2_t a) {
return vgetq_lane_u64(a, 1);
}
-// CHECK: test_vget_low_s8
+// CHECK-LABEL: test_vget_low_s8
int8x8_t test_vget_low_s8(int8x16_t a) {
return vget_low_s8(a);
}
-// CHECK: test_vget_low_s16
+// CHECK-LABEL: test_vget_low_s16
int16x4_t test_vget_low_s16(int16x8_t a) {
return vget_low_s16(a);
}
-// CHECK: test_vget_low_s32
+// CHECK-LABEL: test_vget_low_s32
int32x2_t test_vget_low_s32(int32x4_t a) {
return vget_low_s32(a);
}
-// CHECK: test_vget_low_s64
+// CHECK-LABEL: test_vget_low_s64
int64x1_t test_vget_low_s64(int64x2_t a) {
return vget_low_s64(a);
}
-// CHECK: test_vget_low_f16
+// CHECK-LABEL: test_vget_low_f16
float16x4_t test_vget_low_f16(float16x8_t a) {
return vget_low_f16(a);
}
-// CHECK: test_vget_low_f32
+// CHECK-LABEL: test_vget_low_f32
float32x2_t test_vget_low_f32(float32x4_t a) {
return vget_low_f32(a);
}
-// CHECK: test_vget_low_u8
+// CHECK-LABEL: test_vget_low_u8
uint8x8_t test_vget_low_u8(uint8x16_t a) {
return vget_low_u8(a);
}
-// CHECK: test_vget_low_u16
+// CHECK-LABEL: test_vget_low_u16
uint16x4_t test_vget_low_u16(uint16x8_t a) {
return vget_low_u16(a);
}
-// CHECK: test_vget_low_u32
+// CHECK-LABEL: test_vget_low_u32
uint32x2_t test_vget_low_u32(uint32x4_t a) {
return vget_low_u32(a);
}
-// CHECK: test_vget_low_u64
+// CHECK-LABEL: test_vget_low_u64
uint64x1_t test_vget_low_u64(uint64x2_t a) {
return vget_low_u64(a);
}
-// CHECK: test_vget_low_p8
+// CHECK-LABEL: test_vget_low_p8
poly8x8_t test_vget_low_p8(poly8x16_t a) {
return vget_low_p8(a);
}
-// CHECK: test_vget_low_p16
+// CHECK-LABEL: test_vget_low_p16
poly16x4_t test_vget_low_p16(poly16x8_t a) {
return vget_low_p16(a);
}
-// CHECK: test_vhadd_s8
+// CHECK-LABEL: test_vhadd_s8
// CHECK: vhadd.s8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vhadd_s8(int8x8_t a, int8x8_t b) {
return vhadd_s8(a, b);
}
-// CHECK: test_vhadd_s16
+// CHECK-LABEL: test_vhadd_s16
// CHECK: vhadd.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vhadd_s16(int16x4_t a, int16x4_t b) {
return vhadd_s16(a, b);
}
-// CHECK: test_vhadd_s32
+// CHECK-LABEL: test_vhadd_s32
// CHECK: vhadd.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vhadd_s32(int32x2_t a, int32x2_t b) {
return vhadd_s32(a, b);
}
-// CHECK: test_vhadd_u8
+// CHECK-LABEL: test_vhadd_u8
// CHECK: vhadd.u8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vhadd_u8(uint8x8_t a, uint8x8_t b) {
return vhadd_u8(a, b);
}
-// CHECK: test_vhadd_u16
+// CHECK-LABEL: test_vhadd_u16
// CHECK: vhadd.u16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vhadd_u16(uint16x4_t a, uint16x4_t b) {
return vhadd_u16(a, b);
}
-// CHECK: test_vhadd_u32
+// CHECK-LABEL: test_vhadd_u32
// CHECK: vhadd.u32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vhadd_u32(uint32x2_t a, uint32x2_t b) {
return vhadd_u32(a, b);
}
-// CHECK: test_vhaddq_s8
+// CHECK-LABEL: test_vhaddq_s8
// CHECK: vhadd.s8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vhaddq_s8(int8x16_t a, int8x16_t b) {
return vhaddq_s8(a, b);
}
-// CHECK: test_vhaddq_s16
+// CHECK-LABEL: test_vhaddq_s16
// CHECK: vhadd.s16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vhaddq_s16(int16x8_t a, int16x8_t b) {
return vhaddq_s16(a, b);
}
-// CHECK: test_vhaddq_s32
+// CHECK-LABEL: test_vhaddq_s32
// CHECK: vhadd.s32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vhaddq_s32(int32x4_t a, int32x4_t b) {
return vhaddq_s32(a, b);
}
-// CHECK: test_vhaddq_u8
+// CHECK-LABEL: test_vhaddq_u8
// CHECK: vhadd.u8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vhaddq_u8(uint8x16_t a, uint8x16_t b) {
return vhaddq_u8(a, b);
}
-// CHECK: test_vhaddq_u16
+// CHECK-LABEL: test_vhaddq_u16
// CHECK: vhadd.u16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vhaddq_u16(uint16x8_t a, uint16x8_t b) {
return vhaddq_u16(a, b);
}
-// CHECK: test_vhaddq_u32
+// CHECK-LABEL: test_vhaddq_u32
// CHECK: vhadd.u32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vhaddq_u32(uint32x4_t a, uint32x4_t b) {
return vhaddq_u32(a, b);
}
-// CHECK: test_vhsub_s8
+// CHECK-LABEL: test_vhsub_s8
// CHECK: vhsub.s8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vhsub_s8(int8x8_t a, int8x8_t b) {
return vhsub_s8(a, b);
}
-// CHECK: test_vhsub_s16
+// CHECK-LABEL: test_vhsub_s16
// CHECK: vhsub.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vhsub_s16(int16x4_t a, int16x4_t b) {
return vhsub_s16(a, b);
}
-// CHECK: test_vhsub_s32
+// CHECK-LABEL: test_vhsub_s32
// CHECK: vhsub.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vhsub_s32(int32x2_t a, int32x2_t b) {
return vhsub_s32(a, b);
}
-// CHECK: test_vhsub_u8
+// CHECK-LABEL: test_vhsub_u8
// CHECK: vhsub.u8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vhsub_u8(uint8x8_t a, uint8x8_t b) {
return vhsub_u8(a, b);
}
-// CHECK: test_vhsub_u16
+// CHECK-LABEL: test_vhsub_u16
// CHECK: vhsub.u16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vhsub_u16(uint16x4_t a, uint16x4_t b) {
return vhsub_u16(a, b);
}
-// CHECK: test_vhsub_u32
+// CHECK-LABEL: test_vhsub_u32
// CHECK: vhsub.u32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vhsub_u32(uint32x2_t a, uint32x2_t b) {
return vhsub_u32(a, b);
}
-// CHECK: test_vhsubq_s8
+// CHECK-LABEL: test_vhsubq_s8
// CHECK: vhsub.s8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vhsubq_s8(int8x16_t a, int8x16_t b) {
return vhsubq_s8(a, b);
}
-// CHECK: test_vhsubq_s16
+// CHECK-LABEL: test_vhsubq_s16
// CHECK: vhsub.s16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vhsubq_s16(int16x8_t a, int16x8_t b) {
return vhsubq_s16(a, b);
}
-// CHECK: test_vhsubq_s32
+// CHECK-LABEL: test_vhsubq_s32
// CHECK: vhsub.s32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vhsubq_s32(int32x4_t a, int32x4_t b) {
return vhsubq_s32(a, b);
}
-// CHECK: test_vhsubq_u8
+// CHECK-LABEL: test_vhsubq_u8
// CHECK: vhsub.u8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vhsubq_u8(uint8x16_t a, uint8x16_t b) {
return vhsubq_u8(a, b);
}
-// CHECK: test_vhsubq_u16
+// CHECK-LABEL: test_vhsubq_u16
// CHECK: vhsub.u16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vhsubq_u16(uint16x8_t a, uint16x8_t b) {
return vhsubq_u16(a, b);
}
-// CHECK: test_vhsubq_u32
+// CHECK-LABEL: test_vhsubq_u32
// CHECK: vhsub.u32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vhsubq_u32(uint32x4_t a, uint32x4_t b) {
return vhsubq_u32(a, b);
}
-// CHECK: test_vld1q_u8
+// CHECK-LABEL: test_vld1q_u8
// CHECK: vld1.8 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
uint8x16_t test_vld1q_u8(uint8_t const * a) {
return vld1q_u8(a);
}
-// CHECK: test_vld1q_u16
+// CHECK-LABEL: test_vld1q_u16
// CHECK: vld1.16 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
uint16x8_t test_vld1q_u16(uint16_t const * a) {
return vld1q_u16(a);
}
-// CHECK: test_vld1q_u32
+// CHECK-LABEL: test_vld1q_u32
// CHECK: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
uint32x4_t test_vld1q_u32(uint32_t const * a) {
return vld1q_u32(a);
}
-// CHECK: test_vld1q_u64
-// CHECK: vld1.64 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
+// CHECK-LABEL: test_vld1q_u64
+// CHECK: vld1.64 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}{{(:64)?}}]
uint64x2_t test_vld1q_u64(uint64_t const * a) {
return vld1q_u64(a);
}
-// CHECK: test_vld1q_s8
+// CHECK-LABEL: test_vld1q_s8
// CHECK: vld1.8 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
int8x16_t test_vld1q_s8(int8_t const * a) {
return vld1q_s8(a);
}
-// CHECK: test_vld1q_s16
+// CHECK-LABEL: test_vld1q_s16
// CHECK: vld1.16 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
int16x8_t test_vld1q_s16(int16_t const * a) {
return vld1q_s16(a);
}
-// CHECK: test_vld1q_s32
+// CHECK-LABEL: test_vld1q_s32
// CHECK: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
int32x4_t test_vld1q_s32(int32_t const * a) {
return vld1q_s32(a);
}
-// CHECK: test_vld1q_s64
-// CHECK: vld1.64 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
+// CHECK-LABEL: test_vld1q_s64
+// CHECK: vld1.64 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}{{(:64)?}}]
int64x2_t test_vld1q_s64(int64_t const * a) {
return vld1q_s64(a);
}
-// CHECK: test_vld1q_f16
+// CHECK-LABEL: test_vld1q_f16
// CHECK: vld1.16 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
float16x8_t test_vld1q_f16(float16_t const * a) {
return vld1q_f16(a);
}
-// CHECK: test_vld1q_f32
+// CHECK-LABEL: test_vld1q_f32
// CHECK: vld1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
float32x4_t test_vld1q_f32(float32_t const * a) {
return vld1q_f32(a);
}
-// CHECK: test_vld1q_p8
+// CHECK-LABEL: test_vld1q_p8
// CHECK: vld1.8 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
poly8x16_t test_vld1q_p8(poly8_t const * a) {
return vld1q_p8(a);
}
-// CHECK: test_vld1q_p16
+// CHECK-LABEL: test_vld1q_p16
// CHECK: vld1.16 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
poly16x8_t test_vld1q_p16(poly16_t const * a) {
return vld1q_p16(a);
}
-// CHECK: test_vld1_u8
+// CHECK-LABEL: test_vld1_u8
// CHECK: vld1.8 {d{{[0-9]+}}}, [r{{[0-9]+}}]
uint8x8_t test_vld1_u8(uint8_t const * a) {
return vld1_u8(a);
}
-// CHECK: test_vld1_u16
+// CHECK-LABEL: test_vld1_u16
// CHECK: vld1.16 {d{{[0-9]+}}}, [r{{[0-9]+}}]
uint16x4_t test_vld1_u16(uint16_t const * a) {
return vld1_u16(a);
}
-// CHECK: test_vld1_u32
+// CHECK-LABEL: test_vld1_u32
// CHECK: vld1.32 {d{{[0-9]+}}}, [r{{[0-9]+}}]
uint32x2_t test_vld1_u32(uint32_t const * a) {
return vld1_u32(a);
}
-// CHECK: test_vld1_u64
-// CHECK: vld1.64 {d{{[0-9]+}}}, [r{{[0-9]+}}]
+// CHECK-LABEL: test_vld1_u64
+// CHECK: vld1.64 {d{{[0-9]+}}}, [r{{[0-9]+}}{{(:64)?}}]
uint64x1_t test_vld1_u64(uint64_t const * a) {
return vld1_u64(a);
}
-// CHECK: test_vld1_s8
+// CHECK-LABEL: test_vld1_s8
// CHECK: vld1.8 {d{{[0-9]+}}}, [r{{[0-9]+}}]
int8x8_t test_vld1_s8(int8_t const * a) {
return vld1_s8(a);
}
-// CHECK: test_vld1_s16
+// CHECK-LABEL: test_vld1_s16
// CHECK: vld1.16 {d{{[0-9]+}}}, [r{{[0-9]+}}]
int16x4_t test_vld1_s16(int16_t const * a) {
return vld1_s16(a);
}
-// CHECK: test_vld1_s32
+// CHECK-LABEL: test_vld1_s32
// CHECK: vld1.32 {d{{[0-9]+}}}, [r{{[0-9]+}}]
int32x2_t test_vld1_s32(int32_t const * a) {
return vld1_s32(a);
}
-// CHECK: test_vld1_s64
-// CHECK: vld1.64 {d{{[0-9]+}}}, [r{{[0-9]+}}]
+// CHECK-LABEL: test_vld1_s64
+// CHECK: vld1.64 {d{{[0-9]+}}}, [r{{[0-9]+}}{{(:64)?}}]
int64x1_t test_vld1_s64(int64_t const * a) {
return vld1_s64(a);
}
-// CHECK: test_vld1_f16
+// CHECK-LABEL: test_vld1_f16
// CHECK: vld1.16 {d{{[0-9]+}}}, [r{{[0-9]+}}]
float16x4_t test_vld1_f16(float16_t const * a) {
return vld1_f16(a);
}
-// CHECK: test_vld1_f32
+// CHECK-LABEL: test_vld1_f32
// CHECK: vld1.32 {d{{[0-9]+}}}, [r{{[0-9]+}}]
float32x2_t test_vld1_f32(float32_t const * a) {
return vld1_f32(a);
}
-// CHECK: test_vld1_p8
+// CHECK-LABEL: test_vld1_p8
// CHECK: vld1.8 {d{{[0-9]+}}}, [r{{[0-9]+}}]
poly8x8_t test_vld1_p8(poly8_t const * a) {
return vld1_p8(a);
}
-// CHECK: test_vld1_p16
+// CHECK-LABEL: test_vld1_p16
// CHECK: vld1.16 {d{{[0-9]+}}}, [r{{[0-9]+}}]
poly16x4_t test_vld1_p16(poly16_t const * a) {
return vld1_p16(a);
}
-// CHECK: test_vld1q_dup_u8
+// CHECK-LABEL: test_vld1q_dup_u8
// CHECK: vld1.8 {d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
uint8x16_t test_vld1q_dup_u8(uint8_t const * a) {
return vld1q_dup_u8(a);
}
-// CHECK: test_vld1q_dup_u16
+// CHECK-LABEL: test_vld1q_dup_u16
// CHECK: vld1.16 {d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}:16]
uint16x8_t test_vld1q_dup_u16(uint16_t const * a) {
return vld1q_dup_u16(a);
}
-// CHECK: test_vld1q_dup_u32
+// CHECK-LABEL: test_vld1q_dup_u32
// CHECK: vld1.32 {d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}:32]
uint32x4_t test_vld1q_dup_u32(uint32_t const * a) {
return vld1q_dup_u32(a);
}
-// CHECK: test_vld1q_dup_u64
+// CHECK-LABEL: test_vld1q_dup_u64
// CHECK: {{ldr|vldr|vmov}}
uint64x2_t test_vld1q_dup_u64(uint64_t const * a) {
return vld1q_dup_u64(a);
}
-// CHECK: test_vld1q_dup_s8
+// CHECK-LABEL: test_vld1q_dup_s8
// CHECK: vld1.8 {d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
int8x16_t test_vld1q_dup_s8(int8_t const * a) {
return vld1q_dup_s8(a);
}
-// CHECK: test_vld1q_dup_s16
+// CHECK-LABEL: test_vld1q_dup_s16
// CHECK: vld1.16 {d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}:16]
int16x8_t test_vld1q_dup_s16(int16_t const * a) {
return vld1q_dup_s16(a);
}
-// CHECK: test_vld1q_dup_s32
+// CHECK-LABEL: test_vld1q_dup_s32
// CHECK: vld1.32 {d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}:32]
int32x4_t test_vld1q_dup_s32(int32_t const * a) {
return vld1q_dup_s32(a);
}
-// CHECK: test_vld1q_dup_s64
+// CHECK-LABEL: test_vld1q_dup_s64
// CHECK: {{ldr|vldr|vmov}}
int64x2_t test_vld1q_dup_s64(int64_t const * a) {
return vld1q_dup_s64(a);
}
-// CHECK: test_vld1q_dup_f16
+// CHECK-LABEL: test_vld1q_dup_f16
// CHECK: vld1.16 {d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}:16]
float16x8_t test_vld1q_dup_f16(float16_t const * a) {
return vld1q_dup_f16(a);
}
-// CHECK: test_vld1q_dup_f32
+// CHECK-LABEL: test_vld1q_dup_f32
// CHECK: vld1.32 {d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}:32]
float32x4_t test_vld1q_dup_f32(float32_t const * a) {
return vld1q_dup_f32(a);
}
-// CHECK: test_vld1q_dup_p8
+// CHECK-LABEL: test_vld1q_dup_p8
// CHECK: vld1.8 {d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
poly8x16_t test_vld1q_dup_p8(poly8_t const * a) {
return vld1q_dup_p8(a);
}
-// CHECK: test_vld1q_dup_p16
+// CHECK-LABEL: test_vld1q_dup_p16
// CHECK: vld1.16 {d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}:16]
poly16x8_t test_vld1q_dup_p16(poly16_t const * a) {
return vld1q_dup_p16(a);
}
-// CHECK: test_vld1_dup_u8
+// CHECK-LABEL: test_vld1_dup_u8
// CHECK: vld1.8 {d{{[0-9]+}}[]}, [r{{[0-9]+}}]
uint8x8_t test_vld1_dup_u8(uint8_t const * a) {
return vld1_dup_u8(a);
}
-// CHECK: test_vld1_dup_u16
+// CHECK-LABEL: test_vld1_dup_u16
// CHECK: vld1.16 {d{{[0-9]+}}[]}, [r{{[0-9]+}}:16]
uint16x4_t test_vld1_dup_u16(uint16_t const * a) {
return vld1_dup_u16(a);
}
-// CHECK: test_vld1_dup_u32
+// CHECK-LABEL: test_vld1_dup_u32
// CHECK: vld1.32 {d{{[0-9]+}}[]}, [r{{[0-9]+}}:32]
uint32x2_t test_vld1_dup_u32(uint32_t const * a) {
return vld1_dup_u32(a);
}
-// CHECK: test_vld1_dup_u64
+// CHECK-LABEL: test_vld1_dup_u64
// CHECK: {{ldr|vldr|vmov}}
uint64x1_t test_vld1_dup_u64(uint64_t const * a) {
return vld1_dup_u64(a);
}
-// CHECK: test_vld1_dup_s8
+// CHECK-LABEL: test_vld1_dup_s8
// CHECK: vld1.8 {d{{[0-9]+}}[]}, [r{{[0-9]+}}]
int8x8_t test_vld1_dup_s8(int8_t const * a) {
return vld1_dup_s8(a);
}
-// CHECK: test_vld1_dup_s16
+// CHECK-LABEL: test_vld1_dup_s16
// CHECK: vld1.16 {d{{[0-9]+}}[]}, [r{{[0-9]+}}:16]
int16x4_t test_vld1_dup_s16(int16_t const * a) {
return vld1_dup_s16(a);
}
-// CHECK: test_vld1_dup_s32
+// CHECK-LABEL: test_vld1_dup_s32
// CHECK: vld1.32 {d{{[0-9]+}}[]}, [r{{[0-9]+}}:32]
int32x2_t test_vld1_dup_s32(int32_t const * a) {
return vld1_dup_s32(a);
}
-// CHECK: test_vld1_dup_s64
+// CHECK-LABEL: test_vld1_dup_s64
// CHECK: {{ldr|vldr|vmov}}
int64x1_t test_vld1_dup_s64(int64_t const * a) {
return vld1_dup_s64(a);
}
-// CHECK: test_vld1_dup_f16
+// CHECK-LABEL: test_vld1_dup_f16
// CHECK: vld1.16 {d{{[0-9]+}}[]}, [r{{[0-9]+}}:16]
float16x4_t test_vld1_dup_f16(float16_t const * a) {
return vld1_dup_f16(a);
}
-// CHECK: test_vld1_dup_f32
+// CHECK-LABEL: test_vld1_dup_f32
// CHECK: vld1.32 {d{{[0-9]+}}[]}, [r{{[0-9]+}}:32]
float32x2_t test_vld1_dup_f32(float32_t const * a) {
return vld1_dup_f32(a);
}
-// CHECK: test_vld1_dup_p8
+// CHECK-LABEL: test_vld1_dup_p8
// CHECK: vld1.8 {d{{[0-9]+}}[]}, [r{{[0-9]+}}]
poly8x8_t test_vld1_dup_p8(poly8_t const * a) {
return vld1_dup_p8(a);
}
-// CHECK: test_vld1_dup_p16
+// CHECK-LABEL: test_vld1_dup_p16
// CHECK: vld1.16 {d{{[0-9]+}}[]}, [r{{[0-9]+}}:16]
poly16x4_t test_vld1_dup_p16(poly16_t const * a) {
return vld1_dup_p16(a);
}
-// CHECK: test_vld1q_lane_u8
+// CHECK-LABEL: test_vld1q_lane_u8
// CHECK: vld1.8 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
uint8x16_t test_vld1q_lane_u8(uint8_t const * a, uint8x16_t b) {
return vld1q_lane_u8(a, b, 15);
}
-// CHECK: test_vld1q_lane_u16
+// CHECK-LABEL: test_vld1q_lane_u16
// CHECK: vld1.16 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:16]
uint16x8_t test_vld1q_lane_u16(uint16_t const * a, uint16x8_t b) {
return vld1q_lane_u16(a, b, 7);
}
-// CHECK: test_vld1q_lane_u32
+// CHECK-LABEL: test_vld1q_lane_u32
// CHECK: vld1.32 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:32]
uint32x4_t test_vld1q_lane_u32(uint32_t const * a, uint32x4_t b) {
return vld1q_lane_u32(a, b, 3);
}
-// CHECK: test_vld1q_lane_u64
+// CHECK-LABEL: test_vld1q_lane_u64
// CHECK: {{ldr|vldr|vmov}}
uint64x2_t test_vld1q_lane_u64(uint64_t const * a, uint64x2_t b) {
return vld1q_lane_u64(a, b, 1);
}
-// CHECK: test_vld1q_lane_s8
+// CHECK-LABEL: test_vld1q_lane_s8
// CHECK: vld1.8 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
int8x16_t test_vld1q_lane_s8(int8_t const * a, int8x16_t b) {
return vld1q_lane_s8(a, b, 15);
}
-// CHECK: test_vld1q_lane_s16
+// CHECK-LABEL: test_vld1q_lane_s16
// CHECK: vld1.16 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:16]
int16x8_t test_vld1q_lane_s16(int16_t const * a, int16x8_t b) {
return vld1q_lane_s16(a, b, 7);
}
-// CHECK: test_vld1q_lane_s32
+// CHECK-LABEL: test_vld1q_lane_s32
// CHECK: vld1.32 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:32]
int32x4_t test_vld1q_lane_s32(int32_t const * a, int32x4_t b) {
return vld1q_lane_s32(a, b, 3);
}
-// CHECK: test_vld1q_lane_s64
+// CHECK-LABEL: test_vld1q_lane_s64
// CHECK: {{ldr|vldr|vmov}}
int64x2_t test_vld1q_lane_s64(int64_t const * a, int64x2_t b) {
return vld1q_lane_s64(a, b, 1);
}
-// CHECK: test_vld1q_lane_f16
+// CHECK-LABEL: test_vld1q_lane_f16
// CHECK: vld1.16 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:16]
float16x8_t test_vld1q_lane_f16(float16_t const * a, float16x8_t b) {
return vld1q_lane_f16(a, b, 7);
}
-// CHECK: test_vld1q_lane_f32
+// CHECK-LABEL: test_vld1q_lane_f32
// CHECK: vld1.32 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:32]
float32x4_t test_vld1q_lane_f32(float32_t const * a, float32x4_t b) {
return vld1q_lane_f32(a, b, 3);
}
-// CHECK: test_vld1q_lane_p8
+// CHECK-LABEL: test_vld1q_lane_p8
// CHECK: vld1.8 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
poly8x16_t test_vld1q_lane_p8(poly8_t const * a, poly8x16_t b) {
return vld1q_lane_p8(a, b, 15);
}
-// CHECK: test_vld1q_lane_p16
+// CHECK-LABEL: test_vld1q_lane_p16
// CHECK: vld1.16 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:16]
poly16x8_t test_vld1q_lane_p16(poly16_t const * a, poly16x8_t b) {
return vld1q_lane_p16(a, b, 7);
}
-// CHECK: test_vld1_lane_u8
+// CHECK-LABEL: test_vld1_lane_u8
// CHECK: vld1.8 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
uint8x8_t test_vld1_lane_u8(uint8_t const * a, uint8x8_t b) {
return vld1_lane_u8(a, b, 7);
}
-// CHECK: test_vld1_lane_u16
+// CHECK-LABEL: test_vld1_lane_u16
// CHECK: vld1.16 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:16]
uint16x4_t test_vld1_lane_u16(uint16_t const * a, uint16x4_t b) {
return vld1_lane_u16(a, b, 3);
}
-// CHECK: test_vld1_lane_u32
+// CHECK-LABEL: test_vld1_lane_u32
// CHECK: vld1.32 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:32]
uint32x2_t test_vld1_lane_u32(uint32_t const * a, uint32x2_t b) {
return vld1_lane_u32(a, b, 1);
}
-// CHECK: test_vld1_lane_u64
+// CHECK-LABEL: test_vld1_lane_u64
// CHECK: {{ldr|vldr|vmov}}
uint64x1_t test_vld1_lane_u64(uint64_t const * a, uint64x1_t b) {
return vld1_lane_u64(a, b, 0);
}
-// CHECK: test_vld1_lane_s8
+// CHECK-LABEL: test_vld1_lane_s8
// CHECK: vld1.8 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
int8x8_t test_vld1_lane_s8(int8_t const * a, int8x8_t b) {
return vld1_lane_s8(a, b, 7);
}
-// CHECK: test_vld1_lane_s16
+// CHECK-LABEL: test_vld1_lane_s16
// CHECK: vld1.16 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:16]
int16x4_t test_vld1_lane_s16(int16_t const * a, int16x4_t b) {
return vld1_lane_s16(a, b, 3);
}
-// CHECK: test_vld1_lane_s32
+// CHECK-LABEL: test_vld1_lane_s32
// CHECK: vld1.32 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:32]
int32x2_t test_vld1_lane_s32(int32_t const * a, int32x2_t b) {
return vld1_lane_s32(a, b, 1);
}
-// CHECK: test_vld1_lane_s64
+// CHECK-LABEL: test_vld1_lane_s64
// CHECK: {{ldr|vldr|vmov}}
int64x1_t test_vld1_lane_s64(int64_t const * a, int64x1_t b) {
return vld1_lane_s64(a, b, 0);
}
-// CHECK: test_vld1_lane_f16
+// CHECK-LABEL: test_vld1_lane_f16
// CHECK: vld1.16 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:16]
float16x4_t test_vld1_lane_f16(float16_t const * a, float16x4_t b) {
return vld1_lane_f16(a, b, 3);
}
-// CHECK: test_vld1_lane_f32
+// CHECK-LABEL: test_vld1_lane_f32
// CHECK: vld1.32 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:32]
float32x2_t test_vld1_lane_f32(float32_t const * a, float32x2_t b) {
return vld1_lane_f32(a, b, 1);
}
-// CHECK: test_vld1_lane_p8
+// CHECK-LABEL: test_vld1_lane_p8
// CHECK: vld1.8 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
poly8x8_t test_vld1_lane_p8(poly8_t const * a, poly8x8_t b) {
return vld1_lane_p8(a, b, 7);
}
-// CHECK: test_vld1_lane_p16
+// CHECK-LABEL: test_vld1_lane_p16
// CHECK: vld1.16 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:16]
poly16x4_t test_vld1_lane_p16(poly16_t const * a, poly16x4_t b) {
return vld1_lane_p16(a, b, 3);
}
-// CHECK: test_vld2q_u8
+// CHECK-LABEL: test_vld2q_u8
// CHECK: vld2.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
uint8x16x2_t test_vld2q_u8(uint8_t const * a) {
return vld2q_u8(a);
}
-// CHECK: test_vld2q_u16
+// CHECK-LABEL: test_vld2q_u16
// CHECK: vld2.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
uint16x8x2_t test_vld2q_u16(uint16_t const * a) {
return vld2q_u16(a);
}
-// CHECK: test_vld2q_u32
+// CHECK-LABEL: test_vld2q_u32
// CHECK: vld2.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
uint32x4x2_t test_vld2q_u32(uint32_t const * a) {
return vld2q_u32(a);
}
-// CHECK: test_vld2q_s8
+// CHECK-LABEL: test_vld2q_s8
// CHECK: vld2.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
int8x16x2_t test_vld2q_s8(int8_t const * a) {
return vld2q_s8(a);
}
-// CHECK: test_vld2q_s16
+// CHECK-LABEL: test_vld2q_s16
// CHECK: vld2.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
int16x8x2_t test_vld2q_s16(int16_t const * a) {
return vld2q_s16(a);
}
-// CHECK: test_vld2q_s32
+// CHECK-LABEL: test_vld2q_s32
// CHECK: vld2.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
int32x4x2_t test_vld2q_s32(int32_t const * a) {
return vld2q_s32(a);
}
-// CHECK: test_vld2q_f16
+// CHECK-LABEL: test_vld2q_f16
// CHECK: vld2.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
float16x8x2_t test_vld2q_f16(float16_t const * a) {
return vld2q_f16(a);
}
-// CHECK: test_vld2q_f32
+// CHECK-LABEL: test_vld2q_f32
// CHECK: vld2.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
float32x4x2_t test_vld2q_f32(float32_t const * a) {
return vld2q_f32(a);
}
-// CHECK: test_vld2q_p8
+// CHECK-LABEL: test_vld2q_p8
// CHECK: vld2.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
poly8x16x2_t test_vld2q_p8(poly8_t const * a) {
return vld2q_p8(a);
}
-// CHECK: test_vld2q_p16
+// CHECK-LABEL: test_vld2q_p16
// CHECK: vld2.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
poly16x8x2_t test_vld2q_p16(poly16_t const * a) {
return vld2q_p16(a);
}
-// CHECK: test_vld2_u8
+// CHECK-LABEL: test_vld2_u8
// CHECK: vld2.8 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
uint8x8x2_t test_vld2_u8(uint8_t const * a) {
return vld2_u8(a);
}
-// CHECK: test_vld2_u16
+// CHECK-LABEL: test_vld2_u16
// CHECK: vld2.16 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
uint16x4x2_t test_vld2_u16(uint16_t const * a) {
return vld2_u16(a);
}
-// CHECK: test_vld2_u32
+// CHECK-LABEL: test_vld2_u32
// CHECK: vld2.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
uint32x2x2_t test_vld2_u32(uint32_t const * a) {
return vld2_u32(a);
}
-// CHECK: test_vld2_u64
+// CHECK-LABEL: test_vld2_u64
// CHECK: vld1.64
uint64x1x2_t test_vld2_u64(uint64_t const * a) {
return vld2_u64(a);
}
-// CHECK: test_vld2_s8
+// CHECK-LABEL: test_vld2_s8
// CHECK: vld2.8 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
int8x8x2_t test_vld2_s8(int8_t const * a) {
return vld2_s8(a);
}
-// CHECK: test_vld2_s16
+// CHECK-LABEL: test_vld2_s16
// CHECK: vld2.16 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
int16x4x2_t test_vld2_s16(int16_t const * a) {
return vld2_s16(a);
}
-// CHECK: test_vld2_s32
+// CHECK-LABEL: test_vld2_s32
// CHECK: vld2.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
int32x2x2_t test_vld2_s32(int32_t const * a) {
return vld2_s32(a);
}
-// CHECK: test_vld2_s64
+// CHECK-LABEL: test_vld2_s64
// CHECK: vld1.64
int64x1x2_t test_vld2_s64(int64_t const * a) {
return vld2_s64(a);
}
-// CHECK: test_vld2_f16
+// CHECK-LABEL: test_vld2_f16
// CHECK: vld2.16 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
float16x4x2_t test_vld2_f16(float16_t const * a) {
return vld2_f16(a);
}
-// CHECK: test_vld2_f32
+// CHECK-LABEL: test_vld2_f32
// CHECK: vld2.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
float32x2x2_t test_vld2_f32(float32_t const * a) {
return vld2_f32(a);
}
-// CHECK: test_vld2_p8
+// CHECK-LABEL: test_vld2_p8
// CHECK: vld2.8 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
poly8x8x2_t test_vld2_p8(poly8_t const * a) {
return vld2_p8(a);
}
-// CHECK: test_vld2_p16
+// CHECK-LABEL: test_vld2_p16
// CHECK: vld2.16 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
poly16x4x2_t test_vld2_p16(poly16_t const * a) {
return vld2_p16(a);
}
-// CHECK: test_vld2_dup_u8
+// CHECK-LABEL: test_vld2_dup_u8
// CHECK: vld2.8 {d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
uint8x8x2_t test_vld2_dup_u8(uint8_t const * a) {
return vld2_dup_u8(a);
}
-// CHECK: test_vld2_dup_u16
+// CHECK-LABEL: test_vld2_dup_u16
// CHECK: vld2.16 {d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
uint16x4x2_t test_vld2_dup_u16(uint16_t const * a) {
return vld2_dup_u16(a);
}
-// CHECK: test_vld2_dup_u32
+// CHECK-LABEL: test_vld2_dup_u32
// CHECK: vld2.32 {d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
uint32x2x2_t test_vld2_dup_u32(uint32_t const * a) {
return vld2_dup_u32(a);
}
-// CHECK: test_vld2_dup_u64
+// CHECK-LABEL: test_vld2_dup_u64
// CHECK: vld1.64
uint64x1x2_t test_vld2_dup_u64(uint64_t const * a) {
return vld2_dup_u64(a);
}
-// CHECK: test_vld2_dup_s8
+// CHECK-LABEL: test_vld2_dup_s8
// CHECK: vld2.8 {d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
int8x8x2_t test_vld2_dup_s8(int8_t const * a) {
return vld2_dup_s8(a);
}
-// CHECK: test_vld2_dup_s16
+// CHECK-LABEL: test_vld2_dup_s16
// CHECK: vld2.16 {d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
int16x4x2_t test_vld2_dup_s16(int16_t const * a) {
return vld2_dup_s16(a);
}
-// CHECK: test_vld2_dup_s32
+// CHECK-LABEL: test_vld2_dup_s32
// CHECK: vld2.32 {d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
int32x2x2_t test_vld2_dup_s32(int32_t const * a) {
return vld2_dup_s32(a);
}
-// CHECK: test_vld2_dup_s64
+// CHECK-LABEL: test_vld2_dup_s64
// CHECK: vld1.64
int64x1x2_t test_vld2_dup_s64(int64_t const * a) {
return vld2_dup_s64(a);
}
-// CHECK: test_vld2_dup_f16
+// CHECK-LABEL: test_vld2_dup_f16
// CHECK: vld2.16 {d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
float16x4x2_t test_vld2_dup_f16(float16_t const * a) {
return vld2_dup_f16(a);
}
-// CHECK: test_vld2_dup_f32
+// CHECK-LABEL: test_vld2_dup_f32
// CHECK: vld2.32 {d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
float32x2x2_t test_vld2_dup_f32(float32_t const * a) {
return vld2_dup_f32(a);
}
-// CHECK: test_vld2_dup_p8
+// CHECK-LABEL: test_vld2_dup_p8
// CHECK: vld2.8 {d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
poly8x8x2_t test_vld2_dup_p8(poly8_t const * a) {
return vld2_dup_p8(a);
}
-// CHECK: test_vld2_dup_p16
+// CHECK-LABEL: test_vld2_dup_p16
// CHECK: vld2.16 {d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
poly16x4x2_t test_vld2_dup_p16(poly16_t const * a) {
return vld2_dup_p16(a);
}
-// CHECK: test_vld2q_lane_u16
+// CHECK-LABEL: test_vld2q_lane_u16
// CHECK: vld2.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
uint16x8x2_t test_vld2q_lane_u16(uint16_t const * a, uint16x8x2_t b) {
return vld2q_lane_u16(a, b, 7);
}
-// CHECK: test_vld2q_lane_u32
+// CHECK-LABEL: test_vld2q_lane_u32
// CHECK: vld2.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
uint32x4x2_t test_vld2q_lane_u32(uint32_t const * a, uint32x4x2_t b) {
return vld2q_lane_u32(a, b, 3);
}
-// CHECK: test_vld2q_lane_s16
+// CHECK-LABEL: test_vld2q_lane_s16
// CHECK: vld2.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
int16x8x2_t test_vld2q_lane_s16(int16_t const * a, int16x8x2_t b) {
return vld2q_lane_s16(a, b, 7);
}
-// CHECK: test_vld2q_lane_s32
+// CHECK-LABEL: test_vld2q_lane_s32
// CHECK: vld2.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
int32x4x2_t test_vld2q_lane_s32(int32_t const * a, int32x4x2_t b) {
return vld2q_lane_s32(a, b, 3);
}
-// CHECK: test_vld2q_lane_f16
+// CHECK-LABEL: test_vld2q_lane_f16
// CHECK: vld2.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
float16x8x2_t test_vld2q_lane_f16(float16_t const * a, float16x8x2_t b) {
return vld2q_lane_f16(a, b, 7);
}
-// CHECK: test_vld2q_lane_f32
+// CHECK-LABEL: test_vld2q_lane_f32
// CHECK: vld2.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
float32x4x2_t test_vld2q_lane_f32(float32_t const * a, float32x4x2_t b) {
return vld2q_lane_f32(a, b, 3);
}
-// CHECK: test_vld2q_lane_p16
+// CHECK-LABEL: test_vld2q_lane_p16
// CHECK: vld2.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
poly16x8x2_t test_vld2q_lane_p16(poly16_t const * a, poly16x8x2_t b) {
return vld2q_lane_p16(a, b, 7);
}
-// CHECK: test_vld2_lane_u8
+// CHECK-LABEL: test_vld2_lane_u8
// CHECK: vld2.8 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
uint8x8x2_t test_vld2_lane_u8(uint8_t const * a, uint8x8x2_t b) {
return vld2_lane_u8(a, b, 7);
}
-// CHECK: test_vld2_lane_u16
+// CHECK-LABEL: test_vld2_lane_u16
// CHECK: vld2.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
uint16x4x2_t test_vld2_lane_u16(uint16_t const * a, uint16x4x2_t b) {
return vld2_lane_u16(a, b, 3);
}
-// CHECK: test_vld2_lane_u32
+// CHECK-LABEL: test_vld2_lane_u32
// CHECK: vld2.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
uint32x2x2_t test_vld2_lane_u32(uint32_t const * a, uint32x2x2_t b) {
return vld2_lane_u32(a, b, 1);
}
-// CHECK: test_vld2_lane_s8
+// CHECK-LABEL: test_vld2_lane_s8
// CHECK: vld2.8 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
int8x8x2_t test_vld2_lane_s8(int8_t const * a, int8x8x2_t b) {
return vld2_lane_s8(a, b, 7);
}
-// CHECK: test_vld2_lane_s16
+// CHECK-LABEL: test_vld2_lane_s16
// CHECK: vld2.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
int16x4x2_t test_vld2_lane_s16(int16_t const * a, int16x4x2_t b) {
return vld2_lane_s16(a, b, 3);
}
-// CHECK: test_vld2_lane_s32
+// CHECK-LABEL: test_vld2_lane_s32
// CHECK: vld2.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
int32x2x2_t test_vld2_lane_s32(int32_t const * a, int32x2x2_t b) {
return vld2_lane_s32(a, b, 1);
}
-// CHECK: test_vld2_lane_f16
+// CHECK-LABEL: test_vld2_lane_f16
// CHECK: vld2.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
float16x4x2_t test_vld2_lane_f16(float16_t const * a, float16x4x2_t b) {
return vld2_lane_f16(a, b, 3);
}
-// CHECK: test_vld2_lane_f32
+// CHECK-LABEL: test_vld2_lane_f32
// CHECK: vld2.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
float32x2x2_t test_vld2_lane_f32(float32_t const * a, float32x2x2_t b) {
return vld2_lane_f32(a, b, 1);
}
-// CHECK: test_vld2_lane_p8
+// CHECK-LABEL: test_vld2_lane_p8
// CHECK: vld2.8 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
poly8x8x2_t test_vld2_lane_p8(poly8_t const * a, poly8x8x2_t b) {
return vld2_lane_p8(a, b, 7);
}
-// CHECK: test_vld2_lane_p16
+// CHECK-LABEL: test_vld2_lane_p16
// CHECK: vld2.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
poly16x4x2_t test_vld2_lane_p16(poly16_t const * a, poly16x4x2_t b) {
return vld2_lane_p16(a, b, 3);
}
-// CHECK: test_vld3q_u8
+// CHECK-LABEL: test_vld3q_u8
// CHECK: vld3.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
uint8x16x3_t test_vld3q_u8(uint8_t const * a) {
return vld3q_u8(a);
}
-// CHECK: test_vld3q_u16
+// CHECK-LABEL: test_vld3q_u16
// CHECK: vld3.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
uint16x8x3_t test_vld3q_u16(uint16_t const * a) {
return vld3q_u16(a);
}
-// CHECK: test_vld3q_u32
+// CHECK-LABEL: test_vld3q_u32
// CHECK: vld3.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
uint32x4x3_t test_vld3q_u32(uint32_t const * a) {
return vld3q_u32(a);
}
-// CHECK: test_vld3q_s8
+// CHECK-LABEL: test_vld3q_s8
// CHECK: vld3.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
int8x16x3_t test_vld3q_s8(int8_t const * a) {
return vld3q_s8(a);
}
-// CHECK: test_vld3q_s16
+// CHECK-LABEL: test_vld3q_s16
// CHECK: vld3.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
int16x8x3_t test_vld3q_s16(int16_t const * a) {
return vld3q_s16(a);
}
-// CHECK: test_vld3q_s32
+// CHECK-LABEL: test_vld3q_s32
// CHECK: vld3.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
int32x4x3_t test_vld3q_s32(int32_t const * a) {
return vld3q_s32(a);
}
-// CHECK: test_vld3q_f16
+// CHECK-LABEL: test_vld3q_f16
// CHECK: vld3.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
float16x8x3_t test_vld3q_f16(float16_t const * a) {
return vld3q_f16(a);
}
-// CHECK: test_vld3q_f32
+// CHECK-LABEL: test_vld3q_f32
// CHECK: vld3.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
float32x4x3_t test_vld3q_f32(float32_t const * a) {
return vld3q_f32(a);
}
-// CHECK: test_vld3q_p8
+// CHECK-LABEL: test_vld3q_p8
// CHECK: vld3.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
poly8x16x3_t test_vld3q_p8(poly8_t const * a) {
return vld3q_p8(a);
}
-// CHECK: test_vld3q_p16
+// CHECK-LABEL: test_vld3q_p16
// CHECK: vld3.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
poly16x8x3_t test_vld3q_p16(poly16_t const * a) {
return vld3q_p16(a);
}
-// CHECK: test_vld3_u8
+// CHECK-LABEL: test_vld3_u8
// CHECK: vld3.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
uint8x8x3_t test_vld3_u8(uint8_t const * a) {
return vld3_u8(a);
}
-// CHECK: test_vld3_u16
+// CHECK-LABEL: test_vld3_u16
// CHECK: vld3.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
uint16x4x3_t test_vld3_u16(uint16_t const * a) {
return vld3_u16(a);
}
-// CHECK: test_vld3_u32
+// CHECK-LABEL: test_vld3_u32
// CHECK: vld3.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
uint32x2x3_t test_vld3_u32(uint32_t const * a) {
return vld3_u32(a);
}
-// CHECK: test_vld3_u64
+// CHECK-LABEL: test_vld3_u64
// CHECK: vld1.64
uint64x1x3_t test_vld3_u64(uint64_t const * a) {
return vld3_u64(a);
}
-// CHECK: test_vld3_s8
+// CHECK-LABEL: test_vld3_s8
// CHECK: vld3.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
int8x8x3_t test_vld3_s8(int8_t const * a) {
return vld3_s8(a);
}
-// CHECK: test_vld3_s16
+// CHECK-LABEL: test_vld3_s16
// CHECK: vld3.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
int16x4x3_t test_vld3_s16(int16_t const * a) {
return vld3_s16(a);
}
-// CHECK: test_vld3_s32
+// CHECK-LABEL: test_vld3_s32
// CHECK: vld3.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
int32x2x3_t test_vld3_s32(int32_t const * a) {
return vld3_s32(a);
}
-// CHECK: test_vld3_s64
+// CHECK-LABEL: test_vld3_s64
// CHECK: vld1.64
int64x1x3_t test_vld3_s64(int64_t const * a) {
return vld3_s64(a);
}
-// CHECK: test_vld3_f16
+// CHECK-LABEL: test_vld3_f16
// CHECK: vld3.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
float16x4x3_t test_vld3_f16(float16_t const * a) {
return vld3_f16(a);
}
-// CHECK: test_vld3_f32
+// CHECK-LABEL: test_vld3_f32
// CHECK: vld3.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
float32x2x3_t test_vld3_f32(float32_t const * a) {
return vld3_f32(a);
}
-// CHECK: test_vld3_p8
+// CHECK-LABEL: test_vld3_p8
// CHECK: vld3.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
poly8x8x3_t test_vld3_p8(poly8_t const * a) {
return vld3_p8(a);
}
-// CHECK: test_vld3_p16
+// CHECK-LABEL: test_vld3_p16
// CHECK: vld3.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
poly16x4x3_t test_vld3_p16(poly16_t const * a) {
return vld3_p16(a);
}
-// CHECK: test_vld3_dup_u8
+// CHECK-LABEL: test_vld3_dup_u8
// CHECK: vld3.8 {d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
uint8x8x3_t test_vld3_dup_u8(uint8_t const * a) {
return vld3_dup_u8(a);
}
-// CHECK: test_vld3_dup_u16
+// CHECK-LABEL: test_vld3_dup_u16
// CHECK: vld3.16 {d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
uint16x4x3_t test_vld3_dup_u16(uint16_t const * a) {
return vld3_dup_u16(a);
}
-// CHECK: test_vld3_dup_u32
+// CHECK-LABEL: test_vld3_dup_u32
// CHECK: vld3.32 {d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
uint32x2x3_t test_vld3_dup_u32(uint32_t const * a) {
return vld3_dup_u32(a);
}
-// CHECK: test_vld3_dup_u64
+// CHECK-LABEL: test_vld3_dup_u64
// CHECK: vld1.64
uint64x1x3_t test_vld3_dup_u64(uint64_t const * a) {
return vld3_dup_u64(a);
}
-// CHECK: test_vld3_dup_s8
+// CHECK-LABEL: test_vld3_dup_s8
// CHECK: vld3.8 {d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
int8x8x3_t test_vld3_dup_s8(int8_t const * a) {
return vld3_dup_s8(a);
}
-// CHECK: test_vld3_dup_s16
+// CHECK-LABEL: test_vld3_dup_s16
// CHECK: vld3.16 {d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
int16x4x3_t test_vld3_dup_s16(int16_t const * a) {
return vld3_dup_s16(a);
}
-// CHECK: test_vld3_dup_s32
+// CHECK-LABEL: test_vld3_dup_s32
// CHECK: vld3.32 {d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
int32x2x3_t test_vld3_dup_s32(int32_t const * a) {
return vld3_dup_s32(a);
}
-// CHECK: test_vld3_dup_s64
+// CHECK-LABEL: test_vld3_dup_s64
// CHECK: vld1.64
int64x1x3_t test_vld3_dup_s64(int64_t const * a) {
return vld3_dup_s64(a);
}
-// CHECK: test_vld3_dup_f16
+// CHECK-LABEL: test_vld3_dup_f16
// CHECK: vld3.16 {d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
float16x4x3_t test_vld3_dup_f16(float16_t const * a) {
return vld3_dup_f16(a);
}
-// CHECK: test_vld3_dup_f32
+// CHECK-LABEL: test_vld3_dup_f32
// CHECK: vld3.32 {d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
float32x2x3_t test_vld3_dup_f32(float32_t const * a) {
return vld3_dup_f32(a);
}
-// CHECK: test_vld3_dup_p8
+// CHECK-LABEL: test_vld3_dup_p8
// CHECK: vld3.8 {d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
poly8x8x3_t test_vld3_dup_p8(poly8_t const * a) {
return vld3_dup_p8(a);
}
-// CHECK: test_vld3_dup_p16
+// CHECK-LABEL: test_vld3_dup_p16
// CHECK: vld3.16 {d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
poly16x4x3_t test_vld3_dup_p16(poly16_t const * a) {
return vld3_dup_p16(a);
}
-// CHECK: test_vld3q_lane_u16
+// CHECK-LABEL: test_vld3q_lane_u16
// CHECK: vld3.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
uint16x8x3_t test_vld3q_lane_u16(uint16_t const * a, uint16x8x3_t b) {
return vld3q_lane_u16(a, b, 7);
}
-// CHECK: test_vld3q_lane_u32
+// CHECK-LABEL: test_vld3q_lane_u32
// CHECK: vld3.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
uint32x4x3_t test_vld3q_lane_u32(uint32_t const * a, uint32x4x3_t b) {
return vld3q_lane_u32(a, b, 3);
}
-// CHECK: test_vld3q_lane_s16
+// CHECK-LABEL: test_vld3q_lane_s16
// CHECK: vld3.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
int16x8x3_t test_vld3q_lane_s16(int16_t const * a, int16x8x3_t b) {
return vld3q_lane_s16(a, b, 7);
}
-// CHECK: test_vld3q_lane_s32
+// CHECK-LABEL: test_vld3q_lane_s32
// CHECK: vld3.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
int32x4x3_t test_vld3q_lane_s32(int32_t const * a, int32x4x3_t b) {
return vld3q_lane_s32(a, b, 3);
}
-// CHECK: test_vld3q_lane_f16
+// CHECK-LABEL: test_vld3q_lane_f16
// CHECK: vld3.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
float16x8x3_t test_vld3q_lane_f16(float16_t const * a, float16x8x3_t b) {
return vld3q_lane_f16(a, b, 7);
}
-// CHECK: test_vld3q_lane_f32
+// CHECK-LABEL: test_vld3q_lane_f32
// CHECK: vld3.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
float32x4x3_t test_vld3q_lane_f32(float32_t const * a, float32x4x3_t b) {
return vld3q_lane_f32(a, b, 3);
}
-// CHECK: test_vld3q_lane_p16
+// CHECK-LABEL: test_vld3q_lane_p16
// CHECK: vld3.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
poly16x8x3_t test_vld3q_lane_p16(poly16_t const * a, poly16x8x3_t b) {
return vld3q_lane_p16(a, b, 7);
}
-// CHECK: test_vld3_lane_u8
+// CHECK-LABEL: test_vld3_lane_u8
// CHECK: vld3.8 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
uint8x8x3_t test_vld3_lane_u8(uint8_t const * a, uint8x8x3_t b) {
return vld3_lane_u8(a, b, 7);
}
-// CHECK: test_vld3_lane_u16
+// CHECK-LABEL: test_vld3_lane_u16
// CHECK: vld3.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
uint16x4x3_t test_vld3_lane_u16(uint16_t const * a, uint16x4x3_t b) {
return vld3_lane_u16(a, b, 3);
}
-// CHECK: test_vld3_lane_u32
+// CHECK-LABEL: test_vld3_lane_u32
// CHECK: vld3.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
uint32x2x3_t test_vld3_lane_u32(uint32_t const * a, uint32x2x3_t b) {
return vld3_lane_u32(a, b, 1);
}
-// CHECK: test_vld3_lane_s8
+// CHECK-LABEL: test_vld3_lane_s8
// CHECK: vld3.8 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
int8x8x3_t test_vld3_lane_s8(int8_t const * a, int8x8x3_t b) {
return vld3_lane_s8(a, b, 7);
}
-// CHECK: test_vld3_lane_s16
+// CHECK-LABEL: test_vld3_lane_s16
// CHECK: vld3.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
int16x4x3_t test_vld3_lane_s16(int16_t const * a, int16x4x3_t b) {
return vld3_lane_s16(a, b, 3);
}
-// CHECK: test_vld3_lane_s32
+// CHECK-LABEL: test_vld3_lane_s32
// CHECK: vld3.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
int32x2x3_t test_vld3_lane_s32(int32_t const * a, int32x2x3_t b) {
return vld3_lane_s32(a, b, 1);
}
-// CHECK: test_vld3_lane_f16
+// CHECK-LABEL: test_vld3_lane_f16
// CHECK: vld3.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
float16x4x3_t test_vld3_lane_f16(float16_t const * a, float16x4x3_t b) {
return vld3_lane_f16(a, b, 3);
}
-// CHECK: test_vld3_lane_f32
+// CHECK-LABEL: test_vld3_lane_f32
// CHECK: vld3.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
float32x2x3_t test_vld3_lane_f32(float32_t const * a, float32x2x3_t b) {
return vld3_lane_f32(a, b, 1);
}
-// CHECK: test_vld3_lane_p8
+// CHECK-LABEL: test_vld3_lane_p8
// CHECK: vld3.8 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
poly8x8x3_t test_vld3_lane_p8(poly8_t const * a, poly8x8x3_t b) {
return vld3_lane_p8(a, b, 7);
}
-// CHECK: test_vld3_lane_p16
+// CHECK-LABEL: test_vld3_lane_p16
// CHECK: vld3.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
poly16x4x3_t test_vld3_lane_p16(poly16_t const * a, poly16x4x3_t b) {
return vld3_lane_p16(a, b, 3);
}
-// CHECK: test_vld4q_u8
+// CHECK-LABEL: test_vld4q_u8
// CHECK: vld4.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
uint8x16x4_t test_vld4q_u8(uint8_t const * a) {
return vld4q_u8(a);
}
-// CHECK: test_vld4q_u16
+// CHECK-LABEL: test_vld4q_u16
// CHECK: vld4.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
uint16x8x4_t test_vld4q_u16(uint16_t const * a) {
return vld4q_u16(a);
}
-// CHECK: test_vld4q_u32
+// CHECK-LABEL: test_vld4q_u32
// CHECK: vld4.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
uint32x4x4_t test_vld4q_u32(uint32_t const * a) {
return vld4q_u32(a);
}
-// CHECK: test_vld4q_s8
+// CHECK-LABEL: test_vld4q_s8
// CHECK: vld4.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
int8x16x4_t test_vld4q_s8(int8_t const * a) {
return vld4q_s8(a);
}
-// CHECK: test_vld4q_s16
+// CHECK-LABEL: test_vld4q_s16
// CHECK: vld4.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
int16x8x4_t test_vld4q_s16(int16_t const * a) {
return vld4q_s16(a);
}
-// CHECK: test_vld4q_s32
+// CHECK-LABEL: test_vld4q_s32
// CHECK: vld4.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
int32x4x4_t test_vld4q_s32(int32_t const * a) {
return vld4q_s32(a);
}
-// CHECK: test_vld4q_f16
+// CHECK-LABEL: test_vld4q_f16
// CHECK: vld4.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
float16x8x4_t test_vld4q_f16(float16_t const * a) {
return vld4q_f16(a);
}
-// CHECK: test_vld4q_f32
+// CHECK-LABEL: test_vld4q_f32
// CHECK: vld4.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
float32x4x4_t test_vld4q_f32(float32_t const * a) {
return vld4q_f32(a);
}
-// CHECK: test_vld4q_p8
+// CHECK-LABEL: test_vld4q_p8
// CHECK: vld4.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
poly8x16x4_t test_vld4q_p8(poly8_t const * a) {
return vld4q_p8(a);
}
-// CHECK: test_vld4q_p16
+// CHECK-LABEL: test_vld4q_p16
// CHECK: vld4.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
poly16x8x4_t test_vld4q_p16(poly16_t const * a) {
return vld4q_p16(a);
}
-// CHECK: test_vld4_u8
+// CHECK-LABEL: test_vld4_u8
// CHECK: vld4.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
uint8x8x4_t test_vld4_u8(uint8_t const * a) {
return vld4_u8(a);
}
-// CHECK: test_vld4_u16
+// CHECK-LABEL: test_vld4_u16
// CHECK: vld4.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
uint16x4x4_t test_vld4_u16(uint16_t const * a) {
return vld4_u16(a);
}
-// CHECK: test_vld4_u32
+// CHECK-LABEL: test_vld4_u32
// CHECK: vld4.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
uint32x2x4_t test_vld4_u32(uint32_t const * a) {
return vld4_u32(a);
}
-// CHECK: test_vld4_u64
+// CHECK-LABEL: test_vld4_u64
// CHECK: vld1.64
uint64x1x4_t test_vld4_u64(uint64_t const * a) {
return vld4_u64(a);
}
-// CHECK: test_vld4_s8
+// CHECK-LABEL: test_vld4_s8
// CHECK: vld4.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
int8x8x4_t test_vld4_s8(int8_t const * a) {
return vld4_s8(a);
}
-// CHECK: test_vld4_s16
+// CHECK-LABEL: test_vld4_s16
// CHECK: vld4.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
int16x4x4_t test_vld4_s16(int16_t const * a) {
return vld4_s16(a);
}
-// CHECK: test_vld4_s32
+// CHECK-LABEL: test_vld4_s32
// CHECK: vld4.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
int32x2x4_t test_vld4_s32(int32_t const * a) {
return vld4_s32(a);
}
-// CHECK: test_vld4_s64
+// CHECK-LABEL: test_vld4_s64
// CHECK: vld1.64
int64x1x4_t test_vld4_s64(int64_t const * a) {
return vld4_s64(a);
}
-// CHECK: test_vld4_f16
+// CHECK-LABEL: test_vld4_f16
// CHECK: vld4.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
float16x4x4_t test_vld4_f16(float16_t const * a) {
return vld4_f16(a);
}
-// CHECK: test_vld4_f32
+// CHECK-LABEL: test_vld4_f32
// CHECK: vld4.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
float32x2x4_t test_vld4_f32(float32_t const * a) {
return vld4_f32(a);
}
-// CHECK: test_vld4_p8
+// CHECK-LABEL: test_vld4_p8
// CHECK: vld4.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
poly8x8x4_t test_vld4_p8(poly8_t const * a) {
return vld4_p8(a);
}
-// CHECK: test_vld4_p16
+// CHECK-LABEL: test_vld4_p16
// CHECK: vld4.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
poly16x4x4_t test_vld4_p16(poly16_t const * a) {
return vld4_p16(a);
}
-// CHECK: test_vld4_dup_u8
+// CHECK-LABEL: test_vld4_dup_u8
// CHECK: vld4.8 {d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
uint8x8x4_t test_vld4_dup_u8(uint8_t const * a) {
return vld4_dup_u8(a);
}
-// CHECK: test_vld4_dup_u16
+// CHECK-LABEL: test_vld4_dup_u16
// CHECK: vld4.16 {d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
uint16x4x4_t test_vld4_dup_u16(uint16_t const * a) {
return vld4_dup_u16(a);
}
-// CHECK: test_vld4_dup_u32
+// CHECK-LABEL: test_vld4_dup_u32
// CHECK: vld4.32 {d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
uint32x2x4_t test_vld4_dup_u32(uint32_t const * a) {
return vld4_dup_u32(a);
}
-// CHECK: test_vld4_dup_u64
+// CHECK-LABEL: test_vld4_dup_u64
// CHECK: vld1.64
uint64x1x4_t test_vld4_dup_u64(uint64_t const * a) {
return vld4_dup_u64(a);
}
-// CHECK: test_vld4_dup_s8
+// CHECK-LABEL: test_vld4_dup_s8
// CHECK: vld4.8 {d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
int8x8x4_t test_vld4_dup_s8(int8_t const * a) {
return vld4_dup_s8(a);
}
-// CHECK: test_vld4_dup_s16
+// CHECK-LABEL: test_vld4_dup_s16
// CHECK: vld4.16 {d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
int16x4x4_t test_vld4_dup_s16(int16_t const * a) {
return vld4_dup_s16(a);
}
-// CHECK: test_vld4_dup_s32
+// CHECK-LABEL: test_vld4_dup_s32
// CHECK: vld4.32 {d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
int32x2x4_t test_vld4_dup_s32(int32_t const * a) {
return vld4_dup_s32(a);
}
-// CHECK: test_vld4_dup_s64
+// CHECK-LABEL: test_vld4_dup_s64
// CHECK: vld1.64
int64x1x4_t test_vld4_dup_s64(int64_t const * a) {
return vld4_dup_s64(a);
}
-// CHECK: test_vld4_dup_f16
+// CHECK-LABEL: test_vld4_dup_f16
// CHECK: vld4.16 {d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
float16x4x4_t test_vld4_dup_f16(float16_t const * a) {
return vld4_dup_f16(a);
}
-// CHECK: test_vld4_dup_f32
+// CHECK-LABEL: test_vld4_dup_f32
// CHECK: vld4.32 {d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
float32x2x4_t test_vld4_dup_f32(float32_t const * a) {
return vld4_dup_f32(a);
}
-// CHECK: test_vld4_dup_p8
+// CHECK-LABEL: test_vld4_dup_p8
// CHECK: vld4.8 {d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
poly8x8x4_t test_vld4_dup_p8(poly8_t const * a) {
return vld4_dup_p8(a);
}
-// CHECK: test_vld4_dup_p16
+// CHECK-LABEL: test_vld4_dup_p16
// CHECK: vld4.16 {d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[], d{{[0-9]+}}[]}, [r{{[0-9]+}}]
poly16x4x4_t test_vld4_dup_p16(poly16_t const * a) {
return vld4_dup_p16(a);
}
-// CHECK: test_vld4q_lane_u16
+// CHECK-LABEL: test_vld4q_lane_u16
// CHECK: vld4.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
uint16x8x4_t test_vld4q_lane_u16(uint16_t const * a, uint16x8x4_t b) {
return vld4q_lane_u16(a, b, 7);
}
-// CHECK: test_vld4q_lane_u32
+// CHECK-LABEL: test_vld4q_lane_u32
// CHECK: vld4.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
uint32x4x4_t test_vld4q_lane_u32(uint32_t const * a, uint32x4x4_t b) {
return vld4q_lane_u32(a, b, 3);
}
-// CHECK: test_vld4q_lane_s16
+// CHECK-LABEL: test_vld4q_lane_s16
// CHECK: vld4.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
int16x8x4_t test_vld4q_lane_s16(int16_t const * a, int16x8x4_t b) {
return vld4q_lane_s16(a, b, 7);
}
-// CHECK: test_vld4q_lane_s32
+// CHECK-LABEL: test_vld4q_lane_s32
// CHECK: vld4.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
int32x4x4_t test_vld4q_lane_s32(int32_t const * a, int32x4x4_t b) {
return vld4q_lane_s32(a, b, 3);
}
-// CHECK: test_vld4q_lane_f16
+// CHECK-LABEL: test_vld4q_lane_f16
// CHECK: vld4.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
float16x8x4_t test_vld4q_lane_f16(float16_t const * a, float16x8x4_t b) {
return vld4q_lane_f16(a, b, 7);
}
-// CHECK: test_vld4q_lane_f32
+// CHECK-LABEL: test_vld4q_lane_f32
// CHECK: vld4.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
float32x4x4_t test_vld4q_lane_f32(float32_t const * a, float32x4x4_t b) {
return vld4q_lane_f32(a, b, 3);
}
-// CHECK: test_vld4q_lane_p16
+// CHECK-LABEL: test_vld4q_lane_p16
// CHECK: vld4.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
poly16x8x4_t test_vld4q_lane_p16(poly16_t const * a, poly16x8x4_t b) {
return vld4q_lane_p16(a, b, 7);
}
-// CHECK: test_vld4_lane_u8
+// CHECK-LABEL: test_vld4_lane_u8
// CHECK: vld4.8 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
uint8x8x4_t test_vld4_lane_u8(uint8_t const * a, uint8x8x4_t b) {
return vld4_lane_u8(a, b, 7);
}
-// CHECK: test_vld4_lane_u16
+// CHECK-LABEL: test_vld4_lane_u16
// CHECK: vld4.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
uint16x4x4_t test_vld4_lane_u16(uint16_t const * a, uint16x4x4_t b) {
return vld4_lane_u16(a, b, 3);
}
-// CHECK: test_vld4_lane_u32
+// CHECK-LABEL: test_vld4_lane_u32
// CHECK: vld4.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
uint32x2x4_t test_vld4_lane_u32(uint32_t const * a, uint32x2x4_t b) {
return vld4_lane_u32(a, b, 1);
}
-// CHECK: test_vld4_lane_s8
+// CHECK-LABEL: test_vld4_lane_s8
// CHECK: vld4.8 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
int8x8x4_t test_vld4_lane_s8(int8_t const * a, int8x8x4_t b) {
return vld4_lane_s8(a, b, 7);
}
-// CHECK: test_vld4_lane_s16
+// CHECK-LABEL: test_vld4_lane_s16
// CHECK: vld4.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
int16x4x4_t test_vld4_lane_s16(int16_t const * a, int16x4x4_t b) {
return vld4_lane_s16(a, b, 3);
}
-// CHECK: test_vld4_lane_s32
+// CHECK-LABEL: test_vld4_lane_s32
// CHECK: vld4.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
int32x2x4_t test_vld4_lane_s32(int32_t const * a, int32x2x4_t b) {
return vld4_lane_s32(a, b, 1);
}
-// CHECK: test_vld4_lane_f16
+// CHECK-LABEL: test_vld4_lane_f16
// CHECK: vld4.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
float16x4x4_t test_vld4_lane_f16(float16_t const * a, float16x4x4_t b) {
return vld4_lane_f16(a, b, 3);
}
-// CHECK: test_vld4_lane_f32
+// CHECK-LABEL: test_vld4_lane_f32
// CHECK: vld4.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
float32x2x4_t test_vld4_lane_f32(float32_t const * a, float32x2x4_t b) {
return vld4_lane_f32(a, b, 1);
}
-// CHECK: test_vld4_lane_p8
+// CHECK-LABEL: test_vld4_lane_p8
// CHECK: vld4.8 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
poly8x8x4_t test_vld4_lane_p8(poly8_t const * a, poly8x8x4_t b) {
return vld4_lane_p8(a, b, 7);
}
-// CHECK: test_vld4_lane_p16
+// CHECK-LABEL: test_vld4_lane_p16
// CHECK: vld4.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
poly16x4x4_t test_vld4_lane_p16(poly16_t const * a, poly16x4x4_t b) {
return vld4_lane_p16(a, b, 3);
}
-// CHECK: test_vmax_s8
+// CHECK-LABEL: test_vmax_s8
// CHECK: vmax.s8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vmax_s8(int8x8_t a, int8x8_t b) {
return vmax_s8(a, b);
}
-// CHECK: test_vmax_s16
+// CHECK-LABEL: test_vmax_s16
// CHECK: vmax.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vmax_s16(int16x4_t a, int16x4_t b) {
return vmax_s16(a, b);
}
-// CHECK: test_vmax_s32
+// CHECK-LABEL: test_vmax_s32
// CHECK: vmax.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vmax_s32(int32x2_t a, int32x2_t b) {
return vmax_s32(a, b);
}
-// CHECK: test_vmax_u8
+// CHECK-LABEL: test_vmax_u8
// CHECK: vmax.u8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vmax_u8(uint8x8_t a, uint8x8_t b) {
return vmax_u8(a, b);
}
-// CHECK: test_vmax_u16
+// CHECK-LABEL: test_vmax_u16
// CHECK: vmax.u16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vmax_u16(uint16x4_t a, uint16x4_t b) {
return vmax_u16(a, b);
}
-// CHECK: test_vmax_u32
+// CHECK-LABEL: test_vmax_u32
// CHECK: vmax.u32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vmax_u32(uint32x2_t a, uint32x2_t b) {
return vmax_u32(a, b);
}
-// CHECK: test_vmax_f32
+// CHECK-LABEL: test_vmax_f32
// CHECK: vmax.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vmax_f32(float32x2_t a, float32x2_t b) {
return vmax_f32(a, b);
}
-// CHECK: test_vmaxq_s8
+// CHECK-LABEL: test_vmaxq_s8
// CHECK: vmax.s8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vmaxq_s8(int8x16_t a, int8x16_t b) {
return vmaxq_s8(a, b);
}
-// CHECK: test_vmaxq_s16
+// CHECK-LABEL: test_vmaxq_s16
// CHECK: vmax.s16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vmaxq_s16(int16x8_t a, int16x8_t b) {
return vmaxq_s16(a, b);
}
-// CHECK: test_vmaxq_s32
+// CHECK-LABEL: test_vmaxq_s32
// CHECK: vmax.s32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vmaxq_s32(int32x4_t a, int32x4_t b) {
return vmaxq_s32(a, b);
}
-// CHECK: test_vmaxq_u8
+// CHECK-LABEL: test_vmaxq_u8
// CHECK: vmax.u8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vmaxq_u8(uint8x16_t a, uint8x16_t b) {
return vmaxq_u8(a, b);
}
-// CHECK: test_vmaxq_u16
+// CHECK-LABEL: test_vmaxq_u16
// CHECK: vmax.u16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vmaxq_u16(uint16x8_t a, uint16x8_t b) {
return vmaxq_u16(a, b);
}
-// CHECK: test_vmaxq_u32
+// CHECK-LABEL: test_vmaxq_u32
// CHECK: vmax.u32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vmaxq_u32(uint32x4_t a, uint32x4_t b) {
return vmaxq_u32(a, b);
}
-// CHECK: test_vmaxq_f32
+// CHECK-LABEL: test_vmaxq_f32
// CHECK: vmax.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
float32x4_t test_vmaxq_f32(float32x4_t a, float32x4_t b) {
return vmaxq_f32(a, b);
}
-// CHECK: test_vmin_s8
+// CHECK-LABEL: test_vmin_s8
// CHECK: vmin.s8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vmin_s8(int8x8_t a, int8x8_t b) {
return vmin_s8(a, b);
}
-// CHECK: test_vmin_s16
+// CHECK-LABEL: test_vmin_s16
// CHECK: vmin.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vmin_s16(int16x4_t a, int16x4_t b) {
return vmin_s16(a, b);
}
-// CHECK: test_vmin_s32
+// CHECK-LABEL: test_vmin_s32
// CHECK: vmin.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vmin_s32(int32x2_t a, int32x2_t b) {
return vmin_s32(a, b);
}
-// CHECK: test_vmin_u8
+// CHECK-LABEL: test_vmin_u8
// CHECK: vmin.u8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vmin_u8(uint8x8_t a, uint8x8_t b) {
return vmin_u8(a, b);
}
-// CHECK: test_vmin_u16
+// CHECK-LABEL: test_vmin_u16
// CHECK: vmin.u16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vmin_u16(uint16x4_t a, uint16x4_t b) {
return vmin_u16(a, b);
}
-// CHECK: test_vmin_u32
+// CHECK-LABEL: test_vmin_u32
// CHECK: vmin.u32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vmin_u32(uint32x2_t a, uint32x2_t b) {
return vmin_u32(a, b);
}
-// CHECK: test_vmin_f32
+// CHECK-LABEL: test_vmin_f32
// CHECK: vmin.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vmin_f32(float32x2_t a, float32x2_t b) {
return vmin_f32(a, b);
}
-// CHECK: test_vminq_s8
+// CHECK-LABEL: test_vminq_s8
// CHECK: vmin.s8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vminq_s8(int8x16_t a, int8x16_t b) {
return vminq_s8(a, b);
}
-// CHECK: test_vminq_s16
+// CHECK-LABEL: test_vminq_s16
// CHECK: vmin.s16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vminq_s16(int16x8_t a, int16x8_t b) {
return vminq_s16(a, b);
}
-// CHECK: test_vminq_s32
+// CHECK-LABEL: test_vminq_s32
// CHECK: vmin.s32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vminq_s32(int32x4_t a, int32x4_t b) {
return vminq_s32(a, b);
}
-// CHECK: test_vminq_u8
+// CHECK-LABEL: test_vminq_u8
// CHECK: vmin.u8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vminq_u8(uint8x16_t a, uint8x16_t b) {
return vminq_u8(a, b);
}
-// CHECK: test_vminq_u16
+// CHECK-LABEL: test_vminq_u16
// CHECK: vmin.u16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vminq_u16(uint16x8_t a, uint16x8_t b) {
return vminq_u16(a, b);
}
-// CHECK: test_vminq_u32
+// CHECK-LABEL: test_vminq_u32
// CHECK: vmin.u32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vminq_u32(uint32x4_t a, uint32x4_t b) {
return vminq_u32(a, b);
}
-// CHECK: test_vminq_f32
+// CHECK-LABEL: test_vminq_f32
// CHECK: vmin.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
float32x4_t test_vminq_f32(float32x4_t a, float32x4_t b) {
return vminq_f32(a, b);
}
-// CHECK: test_vmla_s8
+// CHECK-LABEL: test_vmla_s8
// CHECK: vmla.i8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vmla_s8(int8x8_t a, int8x8_t b, int8x8_t c) {
return vmla_s8(a, b, c);
}
-// CHECK: test_vmla_s16
+// CHECK-LABEL: test_vmla_s16
// CHECK: vmla.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vmla_s16(int16x4_t a, int16x4_t b, int16x4_t c) {
return vmla_s16(a, b, c);
}
-// CHECK: test_vmla_s32
+// CHECK-LABEL: test_vmla_s32
// CHECK: vmla.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vmla_s32(int32x2_t a, int32x2_t b, int32x2_t c) {
return vmla_s32(a, b, c);
}
-// CHECK: test_vmla_f32
-// CHECK: vmul.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
-// CHECK: vadd.f32
+// CHECK-LABEL: test_vmla_f32
+// CHECK-SWIFT: vmul.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
+// CHECK-SWIFT: vadd.f32
+// CHECK-A57: vmla.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vmla_f32(float32x2_t a, float32x2_t b, float32x2_t c) {
return vmla_f32(a, b, c);
}
-// CHECK: test_vmla_u8
+// CHECK-LABEL: test_vmla_u8
// CHECK: vmla.i8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vmla_u8(uint8x8_t a, uint8x8_t b, uint8x8_t c) {
return vmla_u8(a, b, c);
}
-// CHECK: test_vmla_u16
+// CHECK-LABEL: test_vmla_u16
// CHECK: vmla.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vmla_u16(uint16x4_t a, uint16x4_t b, uint16x4_t c) {
return vmla_u16(a, b, c);
}
-// CHECK: test_vmla_u32
+// CHECK-LABEL: test_vmla_u32
// CHECK: vmla.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vmla_u32(uint32x2_t a, uint32x2_t b, uint32x2_t c) {
return vmla_u32(a, b, c);
}
-// CHECK: test_vmlaq_s8
+// CHECK-LABEL: test_vmlaq_s8
// CHECK: vmla.i8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vmlaq_s8(int8x16_t a, int8x16_t b, int8x16_t c) {
return vmlaq_s8(a, b, c);
}
-// CHECK: test_vmlaq_s16
+// CHECK-LABEL: test_vmlaq_s16
// CHECK: vmla.i16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vmlaq_s16(int16x8_t a, int16x8_t b, int16x8_t c) {
return vmlaq_s16(a, b, c);
}
-// CHECK: test_vmlaq_s32
+// CHECK-LABEL: test_vmlaq_s32
// CHECK: vmla.i32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vmlaq_s32(int32x4_t a, int32x4_t b, int32x4_t c) {
return vmlaq_s32(a, b, c);
}
-// CHECK: test_vmlaq_f32
-// CHECK: vmul.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
-// CHECK: vadd.f32
+// CHECK-LABEL: test_vmlaq_f32
+// CHECK-SWIFT: vmul.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
+// CHECK-SWIFT: vadd.f32
+// CHECK-A57: vmla.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
float32x4_t test_vmlaq_f32(float32x4_t a, float32x4_t b, float32x4_t c) {
return vmlaq_f32(a, b, c);
}
-// CHECK: test_vmlaq_u8
+// CHECK-LABEL: test_vmlaq_u8
// CHECK: vmla.i8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vmlaq_u8(uint8x16_t a, uint8x16_t b, uint8x16_t c) {
return vmlaq_u8(a, b, c);
}
-// CHECK: test_vmlaq_u16
+// CHECK-LABEL: test_vmlaq_u16
// CHECK: vmla.i16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vmlaq_u16(uint16x8_t a, uint16x8_t b, uint16x8_t c) {
return vmlaq_u16(a, b, c);
}
-// CHECK: test_vmlaq_u32
+// CHECK-LABEL: test_vmlaq_u32
// CHECK: vmla.i32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vmlaq_u32(uint32x4_t a, uint32x4_t b, uint32x4_t c) {
return vmlaq_u32(a, b, c);
}
-// CHECK: test_vmlal_s8
+// CHECK-LABEL: test_vmlal_s8
// CHECK: vmlal.s8 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x8_t test_vmlal_s8(int16x8_t a, int8x8_t b, int8x8_t c) {
return vmlal_s8(a, b, c);
}
-// CHECK: test_vmlal_s16
+// CHECK-LABEL: test_vmlal_s16
// CHECK: vmlal.s16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x4_t test_vmlal_s16(int32x4_t a, int16x4_t b, int16x4_t c) {
return vmlal_s16(a, b, c);
}
-// CHECK: test_vmlal_s32
+// CHECK-LABEL: test_vmlal_s32
// CHECK: vmlal.s32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x2_t test_vmlal_s32(int64x2_t a, int32x2_t b, int32x2_t c) {
return vmlal_s32(a, b, c);
}
-// CHECK: test_vmlal_u8
+// CHECK-LABEL: test_vmlal_u8
// CHECK: vmlal.u8 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x8_t test_vmlal_u8(uint16x8_t a, uint8x8_t b, uint8x8_t c) {
return vmlal_u8(a, b, c);
}
-// CHECK: test_vmlal_u16
+// CHECK-LABEL: test_vmlal_u16
// CHECK: vmlal.u16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x4_t test_vmlal_u16(uint32x4_t a, uint16x4_t b, uint16x4_t c) {
return vmlal_u16(a, b, c);
}
-// CHECK: test_vmlal_u32
+// CHECK-LABEL: test_vmlal_u32
// CHECK: vmlal.u32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint64x2_t test_vmlal_u32(uint64x2_t a, uint32x2_t b, uint32x2_t c) {
return vmlal_u32(a, b, c);
}
-// CHECK: test_vmlal_lane_s16
+// CHECK-LABEL: test_vmlal_lane_s16
// CHECK: vmlal.s16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int32x4_t test_vmlal_lane_s16(int32x4_t a, int16x4_t b, int16x4_t c) {
return vmlal_lane_s16(a, b, c, 3);
}
-// CHECK: test_vmlal_lane_s32
+// CHECK-LABEL: test_vmlal_lane_s32
// CHECK: vmlal.s32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int64x2_t test_vmlal_lane_s32(int64x2_t a, int32x2_t b, int32x2_t c) {
return vmlal_lane_s32(a, b, c, 1);
}
-// CHECK: test_vmlal_lane_u16
+// CHECK-LABEL: test_vmlal_lane_u16
// CHECK: vmlal.u16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
uint32x4_t test_vmlal_lane_u16(uint32x4_t a, uint16x4_t b, uint16x4_t c) {
return vmlal_lane_u16(a, b, c, 3);
}
-// CHECK: test_vmlal_lane_u32
+// CHECK-LABEL: test_vmlal_lane_u32
// CHECK: vmlal.u32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
uint64x2_t test_vmlal_lane_u32(uint64x2_t a, uint32x2_t b, uint32x2_t c) {
return vmlal_lane_u32(a, b, c, 1);
}
-// CHECK: test_vmlal_n_s16
+// CHECK-LABEL: test_vmlal_n_s16
// CHECK: vmlal.s16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x4_t test_vmlal_n_s16(int32x4_t a, int16x4_t b, int16_t c) {
return vmlal_n_s16(a, b, c);
}
-// CHECK: test_vmlal_n_s32
+// CHECK-LABEL: test_vmlal_n_s32
// CHECK: vmlal.s32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x2_t test_vmlal_n_s32(int64x2_t a, int32x2_t b, int32_t c) {
return vmlal_n_s32(a, b, c);
}
-// CHECK: test_vmlal_n_u16
+// CHECK-LABEL: test_vmlal_n_u16
// CHECK: vmlal.u16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x4_t test_vmlal_n_u16(uint32x4_t a, uint16x4_t b, uint16_t c) {
return vmlal_n_u16(a, b, c);
}
-// CHECK: test_vmlal_n_u32
+// CHECK-LABEL: test_vmlal_n_u32
// CHECK: vmlal.u32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint64x2_t test_vmlal_n_u32(uint64x2_t a, uint32x2_t b, uint32_t c) {
return vmlal_n_u32(a, b, c);
}
-// CHECK: test_vmla_lane_s16
+// CHECK-LABEL: test_vmla_lane_s16
// CHECK: vmla.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int16x4_t test_vmla_lane_s16(int16x4_t a, int16x4_t b, int16x4_t c) {
return vmla_lane_s16(a, b, c, 3);
}
-// CHECK: test_vmla_lane_s32
+// CHECK-LABEL: test_vmla_lane_s32
// CHECK: vmla.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int32x2_t test_vmla_lane_s32(int32x2_t a, int32x2_t b, int32x2_t c) {
return vmla_lane_s32(a, b, c, 1);
}
-// CHECK: test_vmla_lane_u16
+// CHECK-LABEL: test_vmla_lane_u16
// CHECK: vmla.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
uint16x4_t test_vmla_lane_u16(uint16x4_t a, uint16x4_t b, uint16x4_t c) {
return vmla_lane_u16(a, b, c, 3);
}
-// CHECK: test_vmla_lane_u32
+// CHECK-LABEL: test_vmla_lane_u32
// CHECK: vmla.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
uint32x2_t test_vmla_lane_u32(uint32x2_t a, uint32x2_t b, uint32x2_t c) {
return vmla_lane_u32(a, b, c, 1);
}
-// CHECK: test_vmla_lane_f32
-// CHECK: vmul.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
-// CHECK: vadd.f32
+// CHECK-LABEL: test_vmla_lane_f32
+// CHECK-SWIFT: vmul.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
+// CHECK-SWIFT: vadd.f32
+// CHECK-A57: vmla.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
float32x2_t test_vmla_lane_f32(float32x2_t a, float32x2_t b, float32x2_t c) {
return vmla_lane_f32(a, b, c, 1);
}
-// CHECK: test_vmlaq_lane_s16
+// CHECK-LABEL: test_vmlaq_lane_s16
// CHECK: vmla.i16 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int16x8_t test_vmlaq_lane_s16(int16x8_t a, int16x8_t b, int16x4_t c) {
return vmlaq_lane_s16(a, b, c, 3);
}
-// CHECK: test_vmlaq_lane_s32
+// CHECK-LABEL: test_vmlaq_lane_s32
// CHECK: vmla.i32 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int32x4_t test_vmlaq_lane_s32(int32x4_t a, int32x4_t b, int32x2_t c) {
return vmlaq_lane_s32(a, b, c, 1);
}
-// CHECK: test_vmlaq_lane_u16
+// CHECK-LABEL: test_vmlaq_lane_u16
// CHECK: vmla.i16 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
uint16x8_t test_vmlaq_lane_u16(uint16x8_t a, uint16x8_t b, uint16x4_t c) {
return vmlaq_lane_u16(a, b, c, 3);
}
-// CHECK: test_vmlaq_lane_u32
+// CHECK-LABEL: test_vmlaq_lane_u32
// CHECK: vmla.i32 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
uint32x4_t test_vmlaq_lane_u32(uint32x4_t a, uint32x4_t b, uint32x2_t c) {
return vmlaq_lane_u32(a, b, c, 1);
}
-// CHECK: test_vmlaq_lane_f32
-// CHECK: vmul.f32 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
-// CHECK: vadd.f32
+// CHECK-LABEL: test_vmlaq_lane_f32
+// CHECK-SWIFT: vmul.f32 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
+// CHECK-SWIFT: vadd.f32
+// CHECK-A57: vmla.f32 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
float32x4_t test_vmlaq_lane_f32(float32x4_t a, float32x4_t b, float32x2_t c) {
return vmlaq_lane_f32(a, b, c, 1);
}
-// CHECK: test_vmla_n_s16
+// CHECK-LABEL: test_vmla_n_s16
// CHECK: vmla.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vmla_n_s16(int16x4_t a, int16x4_t b, int16_t c) {
return vmla_n_s16(a, b, c);
}
-// CHECK: test_vmla_n_s32
+// CHECK-LABEL: test_vmla_n_s32
// CHECK: vmla.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vmla_n_s32(int32x2_t a, int32x2_t b, int32_t c) {
return vmla_n_s32(a, b, c);
}
-// CHECK: test_vmla_n_u16
+// CHECK-LABEL: test_vmla_n_u16
// CHECK: vmla.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vmla_n_u16(uint16x4_t a, uint16x4_t b, uint16_t c) {
return vmla_n_u16(a, b, c);
}
-// CHECK: test_vmla_n_u32
+// CHECK-LABEL: test_vmla_n_u32
// CHECK: vmla.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vmla_n_u32(uint32x2_t a, uint32x2_t b, uint32_t c) {
return vmla_n_u32(a, b, c);
}
-// CHECK: test_vmla_n_f32
-// CHECK: vmul.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
-// CHECK: vadd.f32
+// CHECK-LABEL: test_vmla_n_f32
+// CHECK-SWIFT: vmul.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
+// CHECK-SWIFT: vadd.f32
+// CHECK-A57: vmla.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vmla_n_f32(float32x2_t a, float32x2_t b, float32_t c) {
return vmla_n_f32(a, b, c);
}
-// CHECK: test_vmlaq_n_s16
+// CHECK-LABEL: test_vmlaq_n_s16
// CHECK: vmla.i16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vmlaq_n_s16(int16x8_t a, int16x8_t b, int16_t c) {
return vmlaq_n_s16(a, b, c);
}
-// CHECK: test_vmlaq_n_s32
+// CHECK-LABEL: test_vmlaq_n_s32
// CHECK: vmla.i32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vmlaq_n_s32(int32x4_t a, int32x4_t b, int32_t c) {
return vmlaq_n_s32(a, b, c);
}
-// CHECK: test_vmlaq_n_u16
+// CHECK-LABEL: test_vmlaq_n_u16
// CHECK: vmla.i16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vmlaq_n_u16(uint16x8_t a, uint16x8_t b, uint16_t c) {
return vmlaq_n_u16(a, b, c);
}
-// CHECK: test_vmlaq_n_u32
+// CHECK-LABEL: test_vmlaq_n_u32
// CHECK: vmla.i32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vmlaq_n_u32(uint32x4_t a, uint32x4_t b, uint32_t c) {
return vmlaq_n_u32(a, b, c);
}
-// CHECK: test_vmlaq_n_f32
-// CHECK: vmul.f32 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[0]
-// CHECK: vadd.f32
+// CHECK-LABEL: test_vmlaq_n_f32
+// CHECK-SWIFT: vmul.f32 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[0]
+// CHECK-SWIFT: vadd.f32
+// CHECK-A57: vld1.32 {d{{[0-9]+}}[], d{{[0-9]+}}[]},
+// CHECK-A57: vmla.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
float32x4_t test_vmlaq_n_f32(float32x4_t a, float32x4_t b, float32_t c) {
return vmlaq_n_f32(a, b, c);
}
-// CHECK: test_vmls_s8
+// CHECK-LABEL: test_vmls_s8
// CHECK: vmls.i8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vmls_s8(int8x8_t a, int8x8_t b, int8x8_t c) {
return vmls_s8(a, b, c);
}
-// CHECK: test_vmls_s16
+// CHECK-LABEL: test_vmls_s16
// CHECK: vmls.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vmls_s16(int16x4_t a, int16x4_t b, int16x4_t c) {
return vmls_s16(a, b, c);
}
-// CHECK: test_vmls_s32
+// CHECK-LABEL: test_vmls_s32
// CHECK: vmls.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vmls_s32(int32x2_t a, int32x2_t b, int32x2_t c) {
return vmls_s32(a, b, c);
}
-// CHECK: test_vmls_f32
-// CHECK: vmul.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
-// CHECK: vsub.f32
+// CHECK-LABEL: test_vmls_f32
+// CHECK-SWIFT: vmul.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
+// CHECK-SWIFT: vsub.f32
+// CHECK-A57: vmls.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vmls_f32(float32x2_t a, float32x2_t b, float32x2_t c) {
return vmls_f32(a, b, c);
}
-// CHECK: test_vmls_u8
+// CHECK-LABEL: test_vmls_u8
// CHECK: vmls.i8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vmls_u8(uint8x8_t a, uint8x8_t b, uint8x8_t c) {
return vmls_u8(a, b, c);
}
-// CHECK: test_vmls_u16
+// CHECK-LABEL: test_vmls_u16
// CHECK: vmls.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vmls_u16(uint16x4_t a, uint16x4_t b, uint16x4_t c) {
return vmls_u16(a, b, c);
}
-// CHECK: test_vmls_u32
+// CHECK-LABEL: test_vmls_u32
// CHECK: vmls.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vmls_u32(uint32x2_t a, uint32x2_t b, uint32x2_t c) {
return vmls_u32(a, b, c);
}
-// CHECK: test_vmlsq_s8
+// CHECK-LABEL: test_vmlsq_s8
// CHECK: vmls.i8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vmlsq_s8(int8x16_t a, int8x16_t b, int8x16_t c) {
return vmlsq_s8(a, b, c);
}
-// CHECK: test_vmlsq_s16
+// CHECK-LABEL: test_vmlsq_s16
// CHECK: vmls.i16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vmlsq_s16(int16x8_t a, int16x8_t b, int16x8_t c) {
return vmlsq_s16(a, b, c);
}
-// CHECK: test_vmlsq_s32
+// CHECK-LABEL: test_vmlsq_s32
// CHECK: vmls.i32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vmlsq_s32(int32x4_t a, int32x4_t b, int32x4_t c) {
return vmlsq_s32(a, b, c);
}
-// CHECK: test_vmlsq_f32
-// CHECK: vmul.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
-// CHECK: vsub.f32
+// CHECK-LABEL: test_vmlsq_f32
+// CHECK-SWIFT: vmul.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
+// CHECK-SWIFT: vsub.f32
+// CHECK-A57: vmls.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
float32x4_t test_vmlsq_f32(float32x4_t a, float32x4_t b, float32x4_t c) {
return vmlsq_f32(a, b, c);
}
-// CHECK: test_vmlsq_u8
+// CHECK-LABEL: test_vmlsq_u8
// CHECK: vmls.i8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vmlsq_u8(uint8x16_t a, uint8x16_t b, uint8x16_t c) {
return vmlsq_u8(a, b, c);
}
-// CHECK: test_vmlsq_u16
+// CHECK-LABEL: test_vmlsq_u16
// CHECK: vmls.i16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vmlsq_u16(uint16x8_t a, uint16x8_t b, uint16x8_t c) {
return vmlsq_u16(a, b, c);
}
-// CHECK: test_vmlsq_u32
+// CHECK-LABEL: test_vmlsq_u32
// CHECK: vmls.i32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vmlsq_u32(uint32x4_t a, uint32x4_t b, uint32x4_t c) {
return vmlsq_u32(a, b, c);
}
-// CHECK: test_vmlsl_s8
+// CHECK-LABEL: test_vmlsl_s8
// CHECK: vmlsl.s8 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x8_t test_vmlsl_s8(int16x8_t a, int8x8_t b, int8x8_t c) {
return vmlsl_s8(a, b, c);
}
-// CHECK: test_vmlsl_s16
+// CHECK-LABEL: test_vmlsl_s16
// CHECK: vmlsl.s16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x4_t test_vmlsl_s16(int32x4_t a, int16x4_t b, int16x4_t c) {
return vmlsl_s16(a, b, c);
}
-// CHECK: test_vmlsl_s32
+// CHECK-LABEL: test_vmlsl_s32
// CHECK: vmlsl.s32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x2_t test_vmlsl_s32(int64x2_t a, int32x2_t b, int32x2_t c) {
return vmlsl_s32(a, b, c);
}
-// CHECK: test_vmlsl_u8
+// CHECK-LABEL: test_vmlsl_u8
// CHECK: vmlsl.u8 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x8_t test_vmlsl_u8(uint16x8_t a, uint8x8_t b, uint8x8_t c) {
return vmlsl_u8(a, b, c);
}
-// CHECK: test_vmlsl_u16
+// CHECK-LABEL: test_vmlsl_u16
// CHECK: vmlsl.u16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x4_t test_vmlsl_u16(uint32x4_t a, uint16x4_t b, uint16x4_t c) {
return vmlsl_u16(a, b, c);
}
-// CHECK: test_vmlsl_u32
+// CHECK-LABEL: test_vmlsl_u32
// CHECK: vmlsl.u32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint64x2_t test_vmlsl_u32(uint64x2_t a, uint32x2_t b, uint32x2_t c) {
return vmlsl_u32(a, b, c);
}
-// CHECK: test_vmlsl_lane_s16
+// CHECK-LABEL: test_vmlsl_lane_s16
// CHECK: vmlsl.s16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int32x4_t test_vmlsl_lane_s16(int32x4_t a, int16x4_t b, int16x4_t c) {
return vmlsl_lane_s16(a, b, c, 3);
}
-// CHECK: test_vmlsl_lane_s32
+// CHECK-LABEL: test_vmlsl_lane_s32
// CHECK: vmlsl.s32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int64x2_t test_vmlsl_lane_s32(int64x2_t a, int32x2_t b, int32x2_t c) {
return vmlsl_lane_s32(a, b, c, 1);
}
-// CHECK: test_vmlsl_lane_u16
+// CHECK-LABEL: test_vmlsl_lane_u16
// CHECK: vmlsl.u16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
uint32x4_t test_vmlsl_lane_u16(uint32x4_t a, uint16x4_t b, uint16x4_t c) {
return vmlsl_lane_u16(a, b, c, 3);
}
-// CHECK: test_vmlsl_lane_u32
+// CHECK-LABEL: test_vmlsl_lane_u32
// CHECK: vmlsl.u32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
uint64x2_t test_vmlsl_lane_u32(uint64x2_t a, uint32x2_t b, uint32x2_t c) {
return vmlsl_lane_u32(a, b, c, 1);
}
-// CHECK: test_vmlsl_n_s16
+// CHECK-LABEL: test_vmlsl_n_s16
// CHECK: vmlsl.s16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x4_t test_vmlsl_n_s16(int32x4_t a, int16x4_t b, int16_t c) {
return vmlsl_n_s16(a, b, c);
}
-// CHECK: test_vmlsl_n_s32
+// CHECK-LABEL: test_vmlsl_n_s32
// CHECK: vmlsl.s32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x2_t test_vmlsl_n_s32(int64x2_t a, int32x2_t b, int32_t c) {
return vmlsl_n_s32(a, b, c);
}
-// CHECK: test_vmlsl_n_u16
+// CHECK-LABEL: test_vmlsl_n_u16
// CHECK: vmlsl.u16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x4_t test_vmlsl_n_u16(uint32x4_t a, uint16x4_t b, uint16_t c) {
return vmlsl_n_u16(a, b, c);
}
-// CHECK: test_vmlsl_n_u32
+// CHECK-LABEL: test_vmlsl_n_u32
// CHECK: vmlsl.u32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint64x2_t test_vmlsl_n_u32(uint64x2_t a, uint32x2_t b, uint32_t c) {
return vmlsl_n_u32(a, b, c);
}
-// CHECK: test_vmls_lane_s16
+// CHECK-LABEL: test_vmls_lane_s16
// CHECK: vmls.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int16x4_t test_vmls_lane_s16(int16x4_t a, int16x4_t b, int16x4_t c) {
return vmls_lane_s16(a, b, c, 3);
}
-// CHECK: test_vmls_lane_s32
+// CHECK-LABEL: test_vmls_lane_s32
// CHECK: vmls.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int32x2_t test_vmls_lane_s32(int32x2_t a, int32x2_t b, int32x2_t c) {
return vmls_lane_s32(a, b, c, 1);
}
-// CHECK: test_vmls_lane_u16
+// CHECK-LABEL: test_vmls_lane_u16
// CHECK: vmls.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
uint16x4_t test_vmls_lane_u16(uint16x4_t a, uint16x4_t b, uint16x4_t c) {
return vmls_lane_u16(a, b, c, 3);
}
-// CHECK: test_vmls_lane_u32
+// CHECK-LABEL: test_vmls_lane_u32
// CHECK: vmls.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
uint32x2_t test_vmls_lane_u32(uint32x2_t a, uint32x2_t b, uint32x2_t c) {
return vmls_lane_u32(a, b, c, 1);
}
-// CHECK: test_vmls_lane_f32
-// CHECK: vmul.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
-// CHECK: vsub.f32
+// CHECK-LABEL: test_vmls_lane_f32
+// CHECK-SWIFT: vmul.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
+// CHECK-SWIFT: vsub.f32
+// CHECK-A57: vmls.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
float32x2_t test_vmls_lane_f32(float32x2_t a, float32x2_t b, float32x2_t c) {
return vmls_lane_f32(a, b, c, 1);
}
-// CHECK: test_vmlsq_lane_s16
+// CHECK-LABEL: test_vmlsq_lane_s16
// CHECK: vmls.i16 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int16x8_t test_vmlsq_lane_s16(int16x8_t a, int16x8_t b, int16x4_t c) {
return vmlsq_lane_s16(a, b, c, 3);
}
-// CHECK: test_vmlsq_lane_s32
+// CHECK-LABEL: test_vmlsq_lane_s32
// CHECK: vmls.i32 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int32x4_t test_vmlsq_lane_s32(int32x4_t a, int32x4_t b, int32x2_t c) {
return vmlsq_lane_s32(a, b, c, 1);
}
-// CHECK: test_vmlsq_lane_u16
+// CHECK-LABEL: test_vmlsq_lane_u16
// CHECK: vmls.i16 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
uint16x8_t test_vmlsq_lane_u16(uint16x8_t a, uint16x8_t b, uint16x4_t c) {
return vmlsq_lane_u16(a, b, c, 3);
}
-// CHECK: test_vmlsq_lane_u32
+// CHECK-LABEL: test_vmlsq_lane_u32
// CHECK: vmls.i32 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
uint32x4_t test_vmlsq_lane_u32(uint32x4_t a, uint32x4_t b, uint32x2_t c) {
return vmlsq_lane_u32(a, b, c, 1);
}
-// CHECK: test_vmlsq_lane_f32
-// CHECK: vmul.f32 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
-// CHECK: vsub.f32
+// CHECK-LABEL: test_vmlsq_lane_f32
+// CHECK-SWIFT: vmul.f32 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
+// CHECK-SWIFT: vsub.f32
+// CHECK-A57: vmls.f32 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
float32x4_t test_vmlsq_lane_f32(float32x4_t a, float32x4_t b, float32x2_t c) {
return vmlsq_lane_f32(a, b, c, 1);
}
-// CHECK: test_vmls_n_s16
+// CHECK-LABEL: test_vmls_n_s16
// CHECK: vmls.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vmls_n_s16(int16x4_t a, int16x4_t b, int16_t c) {
return vmls_n_s16(a, b, c);
}
-// CHECK: test_vmls_n_s32
+// CHECK-LABEL: test_vmls_n_s32
// CHECK: vmls.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vmls_n_s32(int32x2_t a, int32x2_t b, int32_t c) {
return vmls_n_s32(a, b, c);
}
-// CHECK: test_vmls_n_u16
+// CHECK-LABEL: test_vmls_n_u16
// CHECK: vmls.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vmls_n_u16(uint16x4_t a, uint16x4_t b, uint16_t c) {
return vmls_n_u16(a, b, c);
}
-// CHECK: test_vmls_n_u32
+// CHECK-LABEL: test_vmls_n_u32
// CHECK: vmls.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vmls_n_u32(uint32x2_t a, uint32x2_t b, uint32_t c) {
return vmls_n_u32(a, b, c);
}
-// CHECK: test_vmls_n_f32
-// CHECK: vmul.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
-// CHECK: vsub.f32
+// CHECK-LABEL: test_vmls_n_f32
+// CHECK-SWIFT: vmul.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
+// CHECK-SWIFT: vsub.f32
+// CHECK-A57: vmls.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vmls_n_f32(float32x2_t a, float32x2_t b, float32_t c) {
return vmls_n_f32(a, b, c);
}
-// CHECK: test_vmlsq_n_s16
+// CHECK-LABEL: test_vmlsq_n_s16
// CHECK: vmls.i16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vmlsq_n_s16(int16x8_t a, int16x8_t b, int16_t c) {
return vmlsq_n_s16(a, b, c);
}
-// CHECK: test_vmlsq_n_s32
+// CHECK-LABEL: test_vmlsq_n_s32
// CHECK: vmls.i32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vmlsq_n_s32(int32x4_t a, int32x4_t b, int32_t c) {
return vmlsq_n_s32(a, b, c);
}
-// CHECK: test_vmlsq_n_u16
+// CHECK-LABEL: test_vmlsq_n_u16
// CHECK: vmls.i16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vmlsq_n_u16(uint16x8_t a, uint16x8_t b, uint16_t c) {
return vmlsq_n_u16(a, b, c);
}
-// CHECK: test_vmlsq_n_u32
+// CHECK-LABEL: test_vmlsq_n_u32
// CHECK: vmls.i32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vmlsq_n_u32(uint32x4_t a, uint32x4_t b, uint32_t c) {
return vmlsq_n_u32(a, b, c);
}
-// CHECK: test_vmlsq_n_f32
-// CHECK: vmul.f32 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[0]
-// CHECK: vsub.f32
+// CHECK-LABEL: test_vmlsq_n_f32
+// CHECK-SWIFT: vmul.f32 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[0]
+// CHECK-SWIFT: vsub.f32
+// CHECK-A57: vmls.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
float32x4_t test_vmlsq_n_f32(float32x4_t a, float32x4_t b, float32_t c) {
return vmlsq_n_f32(a, b, c);
}
-// CHECK: test_vmovl_s8
+// CHECK-LABEL: test_vmovl_s8
// CHECK: vmovl.s8 q{{[0-9]+}}, d{{[0-9]+}}
int16x8_t test_vmovl_s8(int8x8_t a) {
return vmovl_s8(a);
}
-// CHECK: test_vmovl_s16
+// CHECK-LABEL: test_vmovl_s16
// CHECK: vmovl.s16 q{{[0-9]+}}, d{{[0-9]+}}
int32x4_t test_vmovl_s16(int16x4_t a) {
return vmovl_s16(a);
}
-// CHECK: test_vmovl_s32
+// CHECK-LABEL: test_vmovl_s32
// CHECK: vmovl.s32 q{{[0-9]+}}, d{{[0-9]+}}
int64x2_t test_vmovl_s32(int32x2_t a) {
return vmovl_s32(a);
}
-// CHECK: test_vmovl_u8
+// CHECK-LABEL: test_vmovl_u8
// CHECK: vmovl.u8 q{{[0-9]+}}, d{{[0-9]+}}
uint16x8_t test_vmovl_u8(uint8x8_t a) {
return vmovl_u8(a);
}
-// CHECK: test_vmovl_u16
+// CHECK-LABEL: test_vmovl_u16
// CHECK: vmovl.u16 q{{[0-9]+}}, d{{[0-9]+}}
uint32x4_t test_vmovl_u16(uint16x4_t a) {
return vmovl_u16(a);
}
-// CHECK: test_vmovl_u32
+// CHECK-LABEL: test_vmovl_u32
// CHECK: vmovl.u32 q{{[0-9]+}}, d{{[0-9]+}}
uint64x2_t test_vmovl_u32(uint32x2_t a) {
return vmovl_u32(a);
}
-// CHECK: test_vmovn_s16
+// CHECK-LABEL: test_vmovn_s16
// CHECK: vmovn.i16 d{{[0-9]+}}, q{{[0-9]+}}
int8x8_t test_vmovn_s16(int16x8_t a) {
return vmovn_s16(a);
}
-// CHECK: test_vmovn_s32
+// CHECK-LABEL: test_vmovn_s32
// CHECK: vmovn.i32 d{{[0-9]+}}, q{{[0-9]+}}
int16x4_t test_vmovn_s32(int32x4_t a) {
return vmovn_s32(a);
}
-// CHECK: test_vmovn_s64
+// CHECK-LABEL: test_vmovn_s64
// CHECK: vmovn.i64 d{{[0-9]+}}, q{{[0-9]+}}
int32x2_t test_vmovn_s64(int64x2_t a) {
return vmovn_s64(a);
}
-// CHECK: test_vmovn_u16
+// CHECK-LABEL: test_vmovn_u16
// CHECK: vmovn.i16 d{{[0-9]+}}, q{{[0-9]+}}
uint8x8_t test_vmovn_u16(uint16x8_t a) {
return vmovn_u16(a);
}
-// CHECK: test_vmovn_u32
+// CHECK-LABEL: test_vmovn_u32
// CHECK: vmovn.i32 d{{[0-9]+}}, q{{[0-9]+}}
uint16x4_t test_vmovn_u32(uint32x4_t a) {
return vmovn_u32(a);
}
-// CHECK: test_vmovn_u64
+// CHECK-LABEL: test_vmovn_u64
// CHECK: vmovn.i64 d{{[0-9]+}}, q{{[0-9]+}}
uint32x2_t test_vmovn_u64(uint64x2_t a) {
return vmovn_u64(a);
}
-// CHECK: test_vmov_n_u8
+// CHECK-LABEL: test_vmov_n_u8
// CHECK: vmov
uint8x8_t test_vmov_n_u8(uint8_t a) {
return vmov_n_u8(a);
}
-// CHECK: test_vmov_n_u16
+// CHECK-LABEL: test_vmov_n_u16
// CHECK: vmov
uint16x4_t test_vmov_n_u16(uint16_t a) {
return vmov_n_u16(a);
}
-// CHECK: test_vmov_n_u32
+// CHECK-LABEL: test_vmov_n_u32
// CHECK: vmov
uint32x2_t test_vmov_n_u32(uint32_t a) {
return vmov_n_u32(a);
}
-// CHECK: test_vmov_n_s8
+// CHECK-LABEL: test_vmov_n_s8
// CHECK: vmov
int8x8_t test_vmov_n_s8(int8_t a) {
return vmov_n_s8(a);
}
-// CHECK: test_vmov_n_s16
+// CHECK-LABEL: test_vmov_n_s16
// CHECK: vmov
int16x4_t test_vmov_n_s16(int16_t a) {
return vmov_n_s16(a);
}
-// CHECK: test_vmov_n_s32
+// CHECK-LABEL: test_vmov_n_s32
// CHECK: vmov
int32x2_t test_vmov_n_s32(int32_t a) {
return vmov_n_s32(a);
}
-// CHECK: test_vmov_n_p8
+// CHECK-LABEL: test_vmov_n_p8
// CHECK: vmov
poly8x8_t test_vmov_n_p8(poly8_t a) {
return vmov_n_p8(a);
}
-// CHECK: test_vmov_n_p16
+// CHECK-LABEL: test_vmov_n_p16
// CHECK: vmov
poly16x4_t test_vmov_n_p16(poly16_t a) {
return vmov_n_p16(a);
}
-// CHECK: test_vmov_n_f32
+// CHECK-LABEL: test_vmov_n_f16
+// CHECK: vld1.16 {{{d[0-9]+\[\]}}}
+float16x4_t test_vmov_n_f16(float16_t *a) {
+ return vmov_n_f16(*a);
+}
+
+// CHECK-LABEL: test_vmov_n_f32
// CHECK: vmov
float32x2_t test_vmov_n_f32(float32_t a) {
return vmov_n_f32(a);
}
-// CHECK: test_vmovq_n_u8
+// CHECK-LABEL: test_vmovq_n_u8
// CHECK: vmov
uint8x16_t test_vmovq_n_u8(uint8_t a) {
return vmovq_n_u8(a);
}
-// CHECK: test_vmovq_n_u16
+// CHECK-LABEL: test_vmovq_n_u16
// CHECK: vmov
uint16x8_t test_vmovq_n_u16(uint16_t a) {
return vmovq_n_u16(a);
}
-// CHECK: test_vmovq_n_u32
+// CHECK-LABEL: test_vmovq_n_u32
// CHECK: vmov
uint32x4_t test_vmovq_n_u32(uint32_t a) {
return vmovq_n_u32(a);
}
-// CHECK: test_vmovq_n_s8
+// CHECK-LABEL: test_vmovq_n_s8
// CHECK: vmov
int8x16_t test_vmovq_n_s8(int8_t a) {
return vmovq_n_s8(a);
}
-// CHECK: test_vmovq_n_s16
+// CHECK-LABEL: test_vmovq_n_s16
// CHECK: vmov
int16x8_t test_vmovq_n_s16(int16_t a) {
return vmovq_n_s16(a);
}
-// CHECK: test_vmovq_n_s32
+// CHECK-LABEL: test_vmovq_n_s32
// CHECK: vmov
int32x4_t test_vmovq_n_s32(int32_t a) {
return vmovq_n_s32(a);
}
-// CHECK: test_vmovq_n_p8
+// CHECK-LABEL: test_vmovq_n_p8
// CHECK: vmov
poly8x16_t test_vmovq_n_p8(poly8_t a) {
return vmovq_n_p8(a);
}
-// CHECK: test_vmovq_n_p16
+// CHECK-LABEL: test_vmovq_n_p16
// CHECK: vmov
poly16x8_t test_vmovq_n_p16(poly16_t a) {
return vmovq_n_p16(a);
}
-// CHECK: test_vmovq_n_f32
+// CHECK-LABEL: test_vmovq_n_f16
+// CHECK: vld1.16 {{{d[0-9]+\[\], d[0-9]+\[\]}}}
+float16x8_t test_vmovq_n_f16(float16_t *a) {
+ return vmovq_n_f16(*a);
+}
+
+// CHECK-LABEL: test_vmovq_n_f32
// CHECK: vmov
float32x4_t test_vmovq_n_f32(float32_t a) {
return vmovq_n_f32(a);
}
-// CHECK: test_vmov_n_s64
+// CHECK-LABEL: test_vmov_n_s64
// CHECK: vmov
int64x1_t test_vmov_n_s64(int64_t a) {
return vmov_n_s64(a);
}
-// CHECK: test_vmov_n_u64
+// CHECK-LABEL: test_vmov_n_u64
// CHECK: vmov
uint64x1_t test_vmov_n_u64(uint64_t a) {
return vmov_n_u64(a);
}
-// CHECK: test_vmovq_n_s64
+// CHECK-LABEL: test_vmovq_n_s64
// CHECK: vmov
int64x2_t test_vmovq_n_s64(int64_t a) {
return vmovq_n_s64(a);
}
-// CHECK: test_vmovq_n_u64
+// CHECK-LABEL: test_vmovq_n_u64
// CHECK: vmov
uint64x2_t test_vmovq_n_u64(uint64_t a) {
return vmovq_n_u64(a);
}
-// CHECK: test_vmul_s8
+// CHECK-LABEL: test_vmul_s8
// CHECK: vmul.i8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vmul_s8(int8x8_t a, int8x8_t b) {
return vmul_s8(a, b);
}
-// CHECK: test_vmul_s16
+// CHECK-LABEL: test_vmul_s16
// CHECK: vmul.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vmul_s16(int16x4_t a, int16x4_t b) {
return vmul_s16(a, b);
}
-// CHECK: test_vmul_s32
+// CHECK-LABEL: test_vmul_s32
// CHECK: vmul.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vmul_s32(int32x2_t a, int32x2_t b) {
return vmul_s32(a, b);
}
-// CHECK: test_vmul_f32
+// CHECK-LABEL: test_vmul_f32
// CHECK: vmul.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vmul_f32(float32x2_t a, float32x2_t b) {
return vmul_f32(a, b);
}
-// CHECK: test_vmul_u8
+// CHECK-LABEL: test_vmul_u8
// CHECK: vmul.i8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vmul_u8(uint8x8_t a, uint8x8_t b) {
return vmul_u8(a, b);
}
-// CHECK: test_vmul_u16
+// CHECK-LABEL: test_vmul_u16
// CHECK: vmul.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vmul_u16(uint16x4_t a, uint16x4_t b) {
return vmul_u16(a, b);
}
-// CHECK: test_vmul_u32
+// CHECK-LABEL: test_vmul_u32
// CHECK: vmul.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vmul_u32(uint32x2_t a, uint32x2_t b) {
return vmul_u32(a, b);
}
-// CHECK: test_vmulq_s8
+// CHECK-LABEL: test_vmulq_s8
// CHECK: vmul.i8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vmulq_s8(int8x16_t a, int8x16_t b) {
return vmulq_s8(a, b);
}
-// CHECK: test_vmulq_s16
+// CHECK-LABEL: test_vmulq_s16
// CHECK: vmul.i16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vmulq_s16(int16x8_t a, int16x8_t b) {
return vmulq_s16(a, b);
}
-// CHECK: test_vmulq_s32
+// CHECK-LABEL: test_vmulq_s32
// CHECK: vmul.i32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vmulq_s32(int32x4_t a, int32x4_t b) {
return vmulq_s32(a, b);
}
-// CHECK: test_vmulq_f32
+// CHECK-LABEL: test_vmulq_f32
// CHECK: vmul.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
float32x4_t test_vmulq_f32(float32x4_t a, float32x4_t b) {
return vmulq_f32(a, b);
}
-// CHECK: test_vmulq_u8
+// CHECK-LABEL: test_vmulq_u8
// CHECK: vmul.i8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vmulq_u8(uint8x16_t a, uint8x16_t b) {
return vmulq_u8(a, b);
}
-// CHECK: test_vmulq_u16
+// CHECK-LABEL: test_vmulq_u16
// CHECK: vmul.i16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vmulq_u16(uint16x8_t a, uint16x8_t b) {
return vmulq_u16(a, b);
}
-// CHECK: test_vmulq_u32
+// CHECK-LABEL: test_vmulq_u32
// CHECK: vmul.i32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vmulq_u32(uint32x4_t a, uint32x4_t b) {
return vmulq_u32(a, b);
}
-// CHECK: test_vmull_s8
+// CHECK-LABEL: test_vmull_s8
// CHECK: vmull.s8 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x8_t test_vmull_s8(int8x8_t a, int8x8_t b) {
return vmull_s8(a, b);
}
-// CHECK: test_vmull_s16
+// CHECK-LABEL: test_vmull_s16
// CHECK: vmull.s16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x4_t test_vmull_s16(int16x4_t a, int16x4_t b) {
return vmull_s16(a, b);
}
-// CHECK: test_vmull_s32
+// CHECK-LABEL: test_vmull_s32
// CHECK: vmull.s32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x2_t test_vmull_s32(int32x2_t a, int32x2_t b) {
return vmull_s32(a, b);
}
-// CHECK: test_vmull_u8
+// CHECK-LABEL: test_vmull_u8
// CHECK: vmull.u8 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x8_t test_vmull_u8(uint8x8_t a, uint8x8_t b) {
return vmull_u8(a, b);
}
-// CHECK: test_vmull_u16
+// CHECK-LABEL: test_vmull_u16
// CHECK: vmull.u16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x4_t test_vmull_u16(uint16x4_t a, uint16x4_t b) {
return vmull_u16(a, b);
}
-// CHECK: test_vmull_u32
+// CHECK-LABEL: test_vmull_u32
// CHECK: vmull.u32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint64x2_t test_vmull_u32(uint32x2_t a, uint32x2_t b) {
return vmull_u32(a, b);
}
-// CHECK: test_vmull_p8
+// CHECK-LABEL: test_vmull_p8
// CHECK: vmull.p8 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
poly16x8_t test_vmull_p8(poly8x8_t a, poly8x8_t b) {
return vmull_p8(a, b);
}
-// CHECK: test_vmull_lane_s16
+// CHECK-LABEL: test_vmull_lane_s16
// CHECK: vmull.s16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int32x4_t test_vmull_lane_s16(int16x4_t a, int16x4_t b) {
return vmull_lane_s16(a, b, 3);
}
-// CHECK: test_vmull_lane_s32
+// CHECK-LABEL: test_vmull_lane_s32
// CHECK: vmull.s32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int64x2_t test_vmull_lane_s32(int32x2_t a, int32x2_t b) {
return vmull_lane_s32(a, b, 1);
}
-// CHECK: test_vmull_lane_u16
+// CHECK-LABEL: test_vmull_lane_u16
// CHECK: vmull.u16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
uint32x4_t test_vmull_lane_u16(uint16x4_t a, uint16x4_t b) {
return vmull_lane_u16(a, b, 3);
}
-// CHECK: test_vmull_lane_u32
+// CHECK-LABEL: test_vmull_lane_u32
// CHECK: vmull.u32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
uint64x2_t test_vmull_lane_u32(uint32x2_t a, uint32x2_t b) {
return vmull_lane_u32(a, b, 1);
}
-// CHECK: test_vmull_n_s16
+// CHECK-LABEL: test_vmull_n_s16
// CHECK: vmull.s16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x4_t test_vmull_n_s16(int16x4_t a, int16_t b) {
return vmull_n_s16(a, b);
}
-// CHECK: test_vmull_n_s32
+// CHECK-LABEL: test_vmull_n_s32
// CHECK: vmull.s32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x2_t test_vmull_n_s32(int32x2_t a, int32_t b) {
return vmull_n_s32(a, b);
}
-// CHECK: test_vmull_n_u16
+// CHECK-LABEL: test_vmull_n_u16
// CHECK: vmull.u16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x4_t test_vmull_n_u16(uint16x4_t a, uint16_t b) {
return vmull_n_u16(a, b);
}
-// CHECK: test_vmull_n_u32
+// CHECK-LABEL: test_vmull_n_u32
// CHECK: vmull.u32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint64x2_t test_vmull_n_u32(uint32x2_t a, uint32_t b) {
return vmull_n_u32(a, b);
}
-// CHECK: test_vmul_p8
+// CHECK-LABEL: test_vmul_p8
// CHECK: vmul.p8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
poly8x8_t test_vmul_p8(poly8x8_t a, poly8x8_t b) {
return vmul_p8(a, b);
}
-// CHECK: test_vmulq_p8
+// CHECK-LABEL: test_vmulq_p8
// CHECK: vmul.p8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
poly8x16_t test_vmulq_p8(poly8x16_t a, poly8x16_t b) {
return vmulq_p8(a, b);
}
-// CHECK: test_vmul_lane_s16
+// CHECK-LABEL: test_vmul_lane_s16
// CHECK: vmul.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int16x4_t test_vmul_lane_s16(int16x4_t a, int16x4_t b) {
return vmul_lane_s16(a, b, 3);
}
-// CHECK: test_vmul_lane_s32
+// CHECK-LABEL: test_vmul_lane_s32
// CHECK: vmul.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int32x2_t test_vmul_lane_s32(int32x2_t a, int32x2_t b) {
return vmul_lane_s32(a, b, 1);
}
-// CHECK: test_vmul_lane_f32
+// CHECK-LABEL: test_vmul_lane_f32
// CHECK: vmul.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
float32x2_t test_vmul_lane_f32(float32x2_t a, float32x2_t b) {
return vmul_lane_f32(a, b, 1);
}
-// CHECK: test_vmul_lane_u16
+// CHECK-LABEL: test_vmul_lane_u16
// CHECK: vmul.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
uint16x4_t test_vmul_lane_u16(uint16x4_t a, uint16x4_t b) {
return vmul_lane_u16(a, b, 3);
}
-// CHECK: test_vmul_lane_u32
+// CHECK-LABEL: test_vmul_lane_u32
// CHECK: vmul.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
uint32x2_t test_vmul_lane_u32(uint32x2_t a, uint32x2_t b) {
return vmul_lane_u32(a, b, 1);
}
-// CHECK: test_vmulq_lane_s16
+// CHECK-LABEL: test_vmulq_lane_s16
// CHECK: vmul.i16 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int16x8_t test_vmulq_lane_s16(int16x8_t a, int16x4_t b) {
return vmulq_lane_s16(a, b, 3);
}
-// CHECK: test_vmulq_lane_s32
+// CHECK-LABEL: test_vmulq_lane_s32
// CHECK: vmul.i32 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int32x4_t test_vmulq_lane_s32(int32x4_t a, int32x2_t b) {
return vmulq_lane_s32(a, b, 1);
}
-// CHECK: test_vmulq_lane_f32
+// CHECK-LABEL: test_vmulq_lane_f32
// CHECK: vmul.f32 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
float32x4_t test_vmulq_lane_f32(float32x4_t a, float32x2_t b) {
return vmulq_lane_f32(a, b, 1);
}
-// CHECK: test_vmulq_lane_u16
+// CHECK-LABEL: test_vmulq_lane_u16
// CHECK: vmul.i16 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
uint16x8_t test_vmulq_lane_u16(uint16x8_t a, uint16x4_t b) {
return vmulq_lane_u16(a, b, 3);
}
-// CHECK: test_vmulq_lane_u32
+// CHECK-LABEL: test_vmulq_lane_u32
// CHECK: vmul.i32 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
uint32x4_t test_vmulq_lane_u32(uint32x4_t a, uint32x2_t b) {
return vmulq_lane_u32(a, b, 1);
}
-// CHECK: test_vmul_n_s16
+// CHECK-LABEL: test_vmul_n_s16
// CHECK: vmul.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vmul_n_s16(int16x4_t a, int16_t b) {
return vmul_n_s16(a, b);
}
-// CHECK: test_vmul_n_s32
+// CHECK-LABEL: test_vmul_n_s32
// CHECK: vmul.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vmul_n_s32(int32x2_t a, int32_t b) {
return vmul_n_s32(a, b);
}
-// CHECK: test_vmul_n_f32
+// CHECK-LABEL: test_vmul_n_f32
// CHECK: vmul.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vmul_n_f32(float32x2_t a, float32_t b) {
return vmul_n_f32(a, b);
}
-// CHECK: test_vmul_n_u16
+// CHECK-LABEL: test_vmul_n_u16
// CHECK: vmul.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vmul_n_u16(uint16x4_t a, uint16_t b) {
return vmul_n_u16(a, b);
}
-// CHECK: test_vmul_n_u32
+// CHECK-LABEL: test_vmul_n_u32
// CHECK: vmul.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vmul_n_u32(uint32x2_t a, uint32_t b) {
return vmul_n_u32(a, b);
}
-// CHECK: test_vmulq_n_s16
+// CHECK-LABEL: test_vmulq_n_s16
// CHECK: vmul.i16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vmulq_n_s16(int16x8_t a, int16_t b) {
return vmulq_n_s16(a, b);
}
-// CHECK: test_vmulq_n_s32
+// CHECK-LABEL: test_vmulq_n_s32
// CHECK: vmul.i32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vmulq_n_s32(int32x4_t a, int32_t b) {
return vmulq_n_s32(a, b);
}
-// CHECK: test_vmulq_n_f32
+// CHECK-LABEL: test_vmulq_n_f32
// CHECK: vmul.f32 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[0]
float32x4_t test_vmulq_n_f32(float32x4_t a, float32_t b) {
return vmulq_n_f32(a, b);
}
-// CHECK: test_vmulq_n_u16
+// CHECK-LABEL: test_vmulq_n_u16
// CHECK: vmul.i16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vmulq_n_u16(uint16x8_t a, uint16_t b) {
return vmulq_n_u16(a, b);
}
-// CHECK: test_vmulq_n_u32
+// CHECK-LABEL: test_vmulq_n_u32
// CHECK: vmul.i32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vmulq_n_u32(uint32x4_t a, uint32_t b) {
return vmulq_n_u32(a, b);
}
-// CHECK: test_vmvn_s8
+// CHECK-LABEL: test_vmvn_s8
// CHECK: vmvn d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vmvn_s8(int8x8_t a) {
return vmvn_s8(a);
}
-// CHECK: test_vmvn_s16
+// CHECK-LABEL: test_vmvn_s16
// CHECK: vmvn d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vmvn_s16(int16x4_t a) {
return vmvn_s16(a);
}
-// CHECK: test_vmvn_s32
+// CHECK-LABEL: test_vmvn_s32
// CHECK: vmvn d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vmvn_s32(int32x2_t a) {
return vmvn_s32(a);
}
-// CHECK: test_vmvn_u8
+// CHECK-LABEL: test_vmvn_u8
// CHECK: vmvn d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vmvn_u8(uint8x8_t a) {
return vmvn_u8(a);
}
-// CHECK: test_vmvn_u16
+// CHECK-LABEL: test_vmvn_u16
// CHECK: vmvn d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vmvn_u16(uint16x4_t a) {
return vmvn_u16(a);
}
-// CHECK: test_vmvn_u32
+// CHECK-LABEL: test_vmvn_u32
// CHECK: vmvn d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vmvn_u32(uint32x2_t a) {
return vmvn_u32(a);
}
-// CHECK: test_vmvn_p8
+// CHECK-LABEL: test_vmvn_p8
// CHECK: vmvn d{{[0-9]+}}, d{{[0-9]+}}
poly8x8_t test_vmvn_p8(poly8x8_t a) {
return vmvn_p8(a);
}
-// CHECK: test_vmvnq_s8
+// CHECK-LABEL: test_vmvnq_s8
// CHECK: vmvn q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vmvnq_s8(int8x16_t a) {
return vmvnq_s8(a);
}
-// CHECK: test_vmvnq_s16
+// CHECK-LABEL: test_vmvnq_s16
// CHECK: vmvn q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vmvnq_s16(int16x8_t a) {
return vmvnq_s16(a);
}
-// CHECK: test_vmvnq_s32
+// CHECK-LABEL: test_vmvnq_s32
// CHECK: vmvn q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vmvnq_s32(int32x4_t a) {
return vmvnq_s32(a);
}
-// CHECK: test_vmvnq_u8
+// CHECK-LABEL: test_vmvnq_u8
// CHECK: vmvn q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vmvnq_u8(uint8x16_t a) {
return vmvnq_u8(a);
}
-// CHECK: test_vmvnq_u16
+// CHECK-LABEL: test_vmvnq_u16
// CHECK: vmvn q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vmvnq_u16(uint16x8_t a) {
return vmvnq_u16(a);
}
-// CHECK: test_vmvnq_u32
+// CHECK-LABEL: test_vmvnq_u32
// CHECK: vmvn q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vmvnq_u32(uint32x4_t a) {
return vmvnq_u32(a);
}
-// CHECK: test_vmvnq_p8
+// CHECK-LABEL: test_vmvnq_p8
// CHECK: vmvn q{{[0-9]+}}, q{{[0-9]+}}
poly8x16_t test_vmvnq_p8(poly8x16_t a) {
return vmvnq_p8(a);
}
-// CHECK: test_vneg_s8
+// CHECK-LABEL: test_vneg_s8
// CHECK: vneg.s8 d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vneg_s8(int8x8_t a) {
return vneg_s8(a);
}
-// CHECK: test_vneg_s16
+// CHECK-LABEL: test_vneg_s16
// CHECK: vneg.s16 d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vneg_s16(int16x4_t a) {
return vneg_s16(a);
}
-// CHECK: test_vneg_s32
+// CHECK-LABEL: test_vneg_s32
// CHECK: vneg.s32 d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vneg_s32(int32x2_t a) {
return vneg_s32(a);
}
-// CHECK: test_vneg_f32
+// CHECK-LABEL: test_vneg_f32
// CHECK: vneg.f32 d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vneg_f32(float32x2_t a) {
return vneg_f32(a);
}
-// CHECK: test_vnegq_s8
+// CHECK-LABEL: test_vnegq_s8
// CHECK: vneg.s8 q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vnegq_s8(int8x16_t a) {
return vnegq_s8(a);
}
-// CHECK: test_vnegq_s16
+// CHECK-LABEL: test_vnegq_s16
// CHECK: vneg.s16 q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vnegq_s16(int16x8_t a) {
return vnegq_s16(a);
}
-// CHECK: test_vnegq_s32
+// CHECK-LABEL: test_vnegq_s32
// CHECK: vneg.s32 q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vnegq_s32(int32x4_t a) {
return vnegq_s32(a);
}
-// CHECK: test_vnegq_f32
+// CHECK-LABEL: test_vnegq_f32
// CHECK: vneg.f32 q{{[0-9]+}}, q{{[0-9]+}}
float32x4_t test_vnegq_f32(float32x4_t a) {
return vnegq_f32(a);
}
-// CHECK: test_vorn_s8
+// CHECK-LABEL: test_vorn_s8
// CHECK: vorn d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vorn_s8(int8x8_t a, int8x8_t b) {
return vorn_s8(a, b);
}
-// CHECK: test_vorn_s16
+// CHECK-LABEL: test_vorn_s16
// CHECK: vorn d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vorn_s16(int16x4_t a, int16x4_t b) {
return vorn_s16(a, b);
}
-// CHECK: test_vorn_s32
+// CHECK-LABEL: test_vorn_s32
// CHECK: vorn d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vorn_s32(int32x2_t a, int32x2_t b) {
return vorn_s32(a, b);
}
-// CHECK: test_vorn_s64
+// CHECK-LABEL: test_vorn_s64
// CHECK: vorn d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x1_t test_vorn_s64(int64x1_t a, int64x1_t b) {
return vorn_s64(a, b);
}
-// CHECK: test_vorn_u8
+// CHECK-LABEL: test_vorn_u8
// CHECK: vorn d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vorn_u8(uint8x8_t a, uint8x8_t b) {
return vorn_u8(a, b);
}
-// CHECK: test_vorn_u16
+// CHECK-LABEL: test_vorn_u16
// CHECK: vorn d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vorn_u16(uint16x4_t a, uint16x4_t b) {
return vorn_u16(a, b);
}
-// CHECK: test_vorn_u32
+// CHECK-LABEL: test_vorn_u32
// CHECK: vorn d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vorn_u32(uint32x2_t a, uint32x2_t b) {
return vorn_u32(a, b);
}
-// CHECK: test_vorn_u64
+// CHECK-LABEL: test_vorn_u64
// CHECK: vorn d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint64x1_t test_vorn_u64(uint64x1_t a, uint64x1_t b) {
return vorn_u64(a, b);
}
-// CHECK: test_vornq_s8
+// CHECK-LABEL: test_vornq_s8
// CHECK: vorn q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vornq_s8(int8x16_t a, int8x16_t b) {
return vornq_s8(a, b);
}
-// CHECK: test_vornq_s16
+// CHECK-LABEL: test_vornq_s16
// CHECK: vorn q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vornq_s16(int16x8_t a, int16x8_t b) {
return vornq_s16(a, b);
}
-// CHECK: test_vornq_s32
+// CHECK-LABEL: test_vornq_s32
// CHECK: vorn q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vornq_s32(int32x4_t a, int32x4_t b) {
return vornq_s32(a, b);
}
-// CHECK: test_vornq_s64
+// CHECK-LABEL: test_vornq_s64
// CHECK: vorn q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int64x2_t test_vornq_s64(int64x2_t a, int64x2_t b) {
return vornq_s64(a, b);
}
-// CHECK: test_vornq_u8
+// CHECK-LABEL: test_vornq_u8
// CHECK: vorn q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vornq_u8(uint8x16_t a, uint8x16_t b) {
return vornq_u8(a, b);
}
-// CHECK: test_vornq_u16
+// CHECK-LABEL: test_vornq_u16
// CHECK: vorn q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vornq_u16(uint16x8_t a, uint16x8_t b) {
return vornq_u16(a, b);
}
-// CHECK: test_vornq_u32
+// CHECK-LABEL: test_vornq_u32
// CHECK: vorn q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vornq_u32(uint32x4_t a, uint32x4_t b) {
return vornq_u32(a, b);
}
-// CHECK: test_vornq_u64
+// CHECK-LABEL: test_vornq_u64
// CHECK: vorn q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint64x2_t test_vornq_u64(uint64x2_t a, uint64x2_t b) {
return vornq_u64(a, b);
}
-// CHECK: test_vorr_s8
+// CHECK-LABEL: test_vorr_s8
// CHECK: vorr d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vorr_s8(int8x8_t a, int8x8_t b) {
return vorr_s8(a, b);
}
-// CHECK: test_vorr_s16
+// CHECK-LABEL: test_vorr_s16
// CHECK: vorr d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vorr_s16(int16x4_t a, int16x4_t b) {
return vorr_s16(a, b);
}
-// CHECK: test_vorr_s32
+// CHECK-LABEL: test_vorr_s32
// CHECK: vorr d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vorr_s32(int32x2_t a, int32x2_t b) {
return vorr_s32(a, b);
}
-// CHECK: test_vorr_s64
+// CHECK-LABEL: test_vorr_s64
// CHECK: vorr d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x1_t test_vorr_s64(int64x1_t a, int64x1_t b) {
return vorr_s64(a, b);
}
-// CHECK: test_vorr_u8
+// CHECK-LABEL: test_vorr_u8
// CHECK: vorr d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vorr_u8(uint8x8_t a, uint8x8_t b) {
return vorr_u8(a, b);
}
-// CHECK: test_vorr_u16
+// CHECK-LABEL: test_vorr_u16
// CHECK: vorr d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vorr_u16(uint16x4_t a, uint16x4_t b) {
return vorr_u16(a, b);
}
-// CHECK: test_vorr_u32
+// CHECK-LABEL: test_vorr_u32
// CHECK: vorr d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vorr_u32(uint32x2_t a, uint32x2_t b) {
return vorr_u32(a, b);
}
-// CHECK: test_vorr_u64
+// CHECK-LABEL: test_vorr_u64
// CHECK: vorr d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint64x1_t test_vorr_u64(uint64x1_t a, uint64x1_t b) {
return vorr_u64(a, b);
}
-// CHECK: test_vorrq_s8
+// CHECK-LABEL: test_vorrq_s8
// CHECK: vorr q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vorrq_s8(int8x16_t a, int8x16_t b) {
return vorrq_s8(a, b);
}
-// CHECK: test_vorrq_s16
+// CHECK-LABEL: test_vorrq_s16
// CHECK: vorr q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vorrq_s16(int16x8_t a, int16x8_t b) {
return vorrq_s16(a, b);
}
-// CHECK: test_vorrq_s32
+// CHECK-LABEL: test_vorrq_s32
// CHECK: vorr q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vorrq_s32(int32x4_t a, int32x4_t b) {
return vorrq_s32(a, b);
}
-// CHECK: test_vorrq_s64
+// CHECK-LABEL: test_vorrq_s64
// CHECK: vorr q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int64x2_t test_vorrq_s64(int64x2_t a, int64x2_t b) {
return vorrq_s64(a, b);
}
-// CHECK: test_vorrq_u8
+// CHECK-LABEL: test_vorrq_u8
// CHECK: vorr q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vorrq_u8(uint8x16_t a, uint8x16_t b) {
return vorrq_u8(a, b);
}
-// CHECK: test_vorrq_u16
+// CHECK-LABEL: test_vorrq_u16
// CHECK: vorr q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vorrq_u16(uint16x8_t a, uint16x8_t b) {
return vorrq_u16(a, b);
}
-// CHECK: test_vorrq_u32
+// CHECK-LABEL: test_vorrq_u32
// CHECK: vorr q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vorrq_u32(uint32x4_t a, uint32x4_t b) {
return vorrq_u32(a, b);
}
-// CHECK: test_vorrq_u64
+// CHECK-LABEL: test_vorrq_u64
// CHECK: vorr q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint64x2_t test_vorrq_u64(uint64x2_t a, uint64x2_t b) {
return vorrq_u64(a, b);
}
-// CHECK: test_vpadal_s8
+// CHECK-LABEL: test_vpadal_s8
// CHECK: vpadal.s8 d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vpadal_s8(int16x4_t a, int8x8_t b) {
return vpadal_s8(a, b);
}
-// CHECK: test_vpadal_s16
+// CHECK-LABEL: test_vpadal_s16
// CHECK: vpadal.s16 d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vpadal_s16(int32x2_t a, int16x4_t b) {
return vpadal_s16(a, b);
}
-// CHECK: test_vpadal_s32
+// CHECK-LABEL: test_vpadal_s32
// CHECK: vpadal.s32 d{{[0-9]+}}, d{{[0-9]+}}
int64x1_t test_vpadal_s32(int64x1_t a, int32x2_t b) {
return vpadal_s32(a, b);
}
-// CHECK: test_vpadal_u8
+// CHECK-LABEL: test_vpadal_u8
// CHECK: vpadal.u8 d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vpadal_u8(uint16x4_t a, uint8x8_t b) {
return vpadal_u8(a, b);
}
-// CHECK: test_vpadal_u16
+// CHECK-LABEL: test_vpadal_u16
// CHECK: vpadal.u16 d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vpadal_u16(uint32x2_t a, uint16x4_t b) {
return vpadal_u16(a, b);
}
-// CHECK: test_vpadal_u32
+// CHECK-LABEL: test_vpadal_u32
// CHECK: vpadal.u32 d{{[0-9]+}}, d{{[0-9]+}}
uint64x1_t test_vpadal_u32(uint64x1_t a, uint32x2_t b) {
return vpadal_u32(a, b);
}
-// CHECK: test_vpadalq_s8
+// CHECK-LABEL: test_vpadalq_s8
// CHECK: vpadal.s8 q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vpadalq_s8(int16x8_t a, int8x16_t b) {
return vpadalq_s8(a, b);
}
-// CHECK: test_vpadalq_s16
+// CHECK-LABEL: test_vpadalq_s16
// CHECK: vpadal.s16 q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vpadalq_s16(int32x4_t a, int16x8_t b) {
return vpadalq_s16(a, b);
}
-// CHECK: test_vpadalq_s32
+// CHECK-LABEL: test_vpadalq_s32
// CHECK: vpadal.s32 q{{[0-9]+}}, q{{[0-9]+}}
int64x2_t test_vpadalq_s32(int64x2_t a, int32x4_t b) {
return vpadalq_s32(a, b);
}
-// CHECK: test_vpadalq_u8
+// CHECK-LABEL: test_vpadalq_u8
// CHECK: vpadal.u8 q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vpadalq_u8(uint16x8_t a, uint8x16_t b) {
return vpadalq_u8(a, b);
}
-// CHECK: test_vpadalq_u16
+// CHECK-LABEL: test_vpadalq_u16
// CHECK: vpadal.u16 q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vpadalq_u16(uint32x4_t a, uint16x8_t b) {
return vpadalq_u16(a, b);
}
-// CHECK: test_vpadalq_u32
+// CHECK-LABEL: test_vpadalq_u32
// CHECK: vpadal.u32 q{{[0-9]+}}, q{{[0-9]+}}
uint64x2_t test_vpadalq_u32(uint64x2_t a, uint32x4_t b) {
return vpadalq_u32(a, b);
}
-// CHECK: test_vpadd_s8
+// CHECK-LABEL: test_vpadd_s8
// CHECK: vpadd.i8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vpadd_s8(int8x8_t a, int8x8_t b) {
return vpadd_s8(a, b);
}
-// CHECK: test_vpadd_s16
+// CHECK-LABEL: test_vpadd_s16
// CHECK: vpadd.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vpadd_s16(int16x4_t a, int16x4_t b) {
return vpadd_s16(a, b);
}
-// CHECK: test_vpadd_s32
+// CHECK-LABEL: test_vpadd_s32
// CHECK: vpadd.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vpadd_s32(int32x2_t a, int32x2_t b) {
return vpadd_s32(a, b);
}
-// CHECK: test_vpadd_u8
+// CHECK-LABEL: test_vpadd_u8
// CHECK: vpadd.i8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vpadd_u8(uint8x8_t a, uint8x8_t b) {
return vpadd_u8(a, b);
}
-// CHECK: test_vpadd_u16
+// CHECK-LABEL: test_vpadd_u16
// CHECK: vpadd.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vpadd_u16(uint16x4_t a, uint16x4_t b) {
return vpadd_u16(a, b);
}
-// CHECK: test_vpadd_u32
+// CHECK-LABEL: test_vpadd_u32
// CHECK: vpadd.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vpadd_u32(uint32x2_t a, uint32x2_t b) {
return vpadd_u32(a, b);
}
-// CHECK: test_vpadd_f32
+// CHECK-LABEL: test_vpadd_f32
// CHECK: vpadd.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vpadd_f32(float32x2_t a, float32x2_t b) {
return vpadd_f32(a, b);
}
-// CHECK: test_vpaddl_s8
+// CHECK-LABEL: test_vpaddl_s8
// CHECK: vpaddl.s8 d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vpaddl_s8(int8x8_t a) {
return vpaddl_s8(a);
}
-// CHECK: test_vpaddl_s16
+// CHECK-LABEL: test_vpaddl_s16
// CHECK: vpaddl.s16 d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vpaddl_s16(int16x4_t a) {
return vpaddl_s16(a);
}
-// CHECK: test_vpaddl_s32
+// CHECK-LABEL: test_vpaddl_s32
// CHECK: vpaddl.s32 d{{[0-9]+}}, d{{[0-9]+}}
int64x1_t test_vpaddl_s32(int32x2_t a) {
return vpaddl_s32(a);
}
-// CHECK: test_vpaddl_u8
+// CHECK-LABEL: test_vpaddl_u8
// CHECK: vpaddl.u8 d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vpaddl_u8(uint8x8_t a) {
return vpaddl_u8(a);
}
-// CHECK: test_vpaddl_u16
+// CHECK-LABEL: test_vpaddl_u16
// CHECK: vpaddl.u16 d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vpaddl_u16(uint16x4_t a) {
return vpaddl_u16(a);
}
-// CHECK: test_vpaddl_u32
+// CHECK-LABEL: test_vpaddl_u32
// CHECK: vpaddl.u32 d{{[0-9]+}}, d{{[0-9]+}}
uint64x1_t test_vpaddl_u32(uint32x2_t a) {
return vpaddl_u32(a);
}
-// CHECK: test_vpaddlq_s8
+// CHECK-LABEL: test_vpaddlq_s8
// CHECK: vpaddl.s8 q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vpaddlq_s8(int8x16_t a) {
return vpaddlq_s8(a);
}
-// CHECK: test_vpaddlq_s16
+// CHECK-LABEL: test_vpaddlq_s16
// CHECK: vpaddl.s16 q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vpaddlq_s16(int16x8_t a) {
return vpaddlq_s16(a);
}
-// CHECK: test_vpaddlq_s32
+// CHECK-LABEL: test_vpaddlq_s32
// CHECK: vpaddl.s32 q{{[0-9]+}}, q{{[0-9]+}}
int64x2_t test_vpaddlq_s32(int32x4_t a) {
return vpaddlq_s32(a);
}
-// CHECK: test_vpaddlq_u8
+// CHECK-LABEL: test_vpaddlq_u8
// CHECK: vpaddl.u8 q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vpaddlq_u8(uint8x16_t a) {
return vpaddlq_u8(a);
}
-// CHECK: test_vpaddlq_u16
+// CHECK-LABEL: test_vpaddlq_u16
// CHECK: vpaddl.u16 q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vpaddlq_u16(uint16x8_t a) {
return vpaddlq_u16(a);
}
-// CHECK: test_vpaddlq_u32
+// CHECK-LABEL: test_vpaddlq_u32
// CHECK: vpaddl.u32 q{{[0-9]+}}, q{{[0-9]+}}
uint64x2_t test_vpaddlq_u32(uint32x4_t a) {
return vpaddlq_u32(a);
}
-// CHECK: test_vpmax_s8
+// CHECK-LABEL: test_vpmax_s8
// CHECK: vpmax.s8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vpmax_s8(int8x8_t a, int8x8_t b) {
return vpmax_s8(a, b);
}
-// CHECK: test_vpmax_s16
+// CHECK-LABEL: test_vpmax_s16
// CHECK: vpmax.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vpmax_s16(int16x4_t a, int16x4_t b) {
return vpmax_s16(a, b);
}
-// CHECK: test_vpmax_s32
+// CHECK-LABEL: test_vpmax_s32
// CHECK: vpmax.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vpmax_s32(int32x2_t a, int32x2_t b) {
return vpmax_s32(a, b);
}
-// CHECK: test_vpmax_u8
+// CHECK-LABEL: test_vpmax_u8
// CHECK: vpmax.u8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vpmax_u8(uint8x8_t a, uint8x8_t b) {
return vpmax_u8(a, b);
}
-// CHECK: test_vpmax_u16
+// CHECK-LABEL: test_vpmax_u16
// CHECK: vpmax.u16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vpmax_u16(uint16x4_t a, uint16x4_t b) {
return vpmax_u16(a, b);
}
-// CHECK: test_vpmax_u32
+// CHECK-LABEL: test_vpmax_u32
// CHECK: vpmax.u32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vpmax_u32(uint32x2_t a, uint32x2_t b) {
return vpmax_u32(a, b);
}
-// CHECK: test_vpmax_f32
+// CHECK-LABEL: test_vpmax_f32
// CHECK: vpmax.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vpmax_f32(float32x2_t a, float32x2_t b) {
return vpmax_f32(a, b);
}
-// CHECK: test_vpmin_s8
+// CHECK-LABEL: test_vpmin_s8
// CHECK: vpmin.s8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vpmin_s8(int8x8_t a, int8x8_t b) {
return vpmin_s8(a, b);
}
-// CHECK: test_vpmin_s16
+// CHECK-LABEL: test_vpmin_s16
// CHECK: vpmin.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vpmin_s16(int16x4_t a, int16x4_t b) {
return vpmin_s16(a, b);
}
-// CHECK: test_vpmin_s32
+// CHECK-LABEL: test_vpmin_s32
// CHECK: vpmin.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vpmin_s32(int32x2_t a, int32x2_t b) {
return vpmin_s32(a, b);
}
-// CHECK: test_vpmin_u8
+// CHECK-LABEL: test_vpmin_u8
// CHECK: vpmin.u8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vpmin_u8(uint8x8_t a, uint8x8_t b) {
return vpmin_u8(a, b);
}
-// CHECK: test_vpmin_u16
+// CHECK-LABEL: test_vpmin_u16
// CHECK: vpmin.u16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vpmin_u16(uint16x4_t a, uint16x4_t b) {
return vpmin_u16(a, b);
}
-// CHECK: test_vpmin_u32
+// CHECK-LABEL: test_vpmin_u32
// CHECK: vpmin.u32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vpmin_u32(uint32x2_t a, uint32x2_t b) {
return vpmin_u32(a, b);
}
-// CHECK: test_vpmin_f32
+// CHECK-LABEL: test_vpmin_f32
// CHECK: vpmin.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vpmin_f32(float32x2_t a, float32x2_t b) {
return vpmin_f32(a, b);
}
-// CHECK: test_vqabs_s8
+// CHECK-LABEL: test_vqabs_s8
// CHECK: vqabs.s8 d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vqabs_s8(int8x8_t a) {
return vqabs_s8(a);
}
-// CHECK: test_vqabs_s16
+// CHECK-LABEL: test_vqabs_s16
// CHECK: vqabs.s16 d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vqabs_s16(int16x4_t a) {
return vqabs_s16(a);
}
-// CHECK: test_vqabs_s32
+// CHECK-LABEL: test_vqabs_s32
// CHECK: vqabs.s32 d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vqabs_s32(int32x2_t a) {
return vqabs_s32(a);
}
-// CHECK: test_vqabsq_s8
+// CHECK-LABEL: test_vqabsq_s8
// CHECK: vqabs.s8 q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vqabsq_s8(int8x16_t a) {
return vqabsq_s8(a);
}
-// CHECK: test_vqabsq_s16
+// CHECK-LABEL: test_vqabsq_s16
// CHECK: vqabs.s16 q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vqabsq_s16(int16x8_t a) {
return vqabsq_s16(a);
}
-// CHECK: test_vqabsq_s32
+// CHECK-LABEL: test_vqabsq_s32
// CHECK: vqabs.s32 q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vqabsq_s32(int32x4_t a) {
return vqabsq_s32(a);
}
-// CHECK: test_vqadd_s8
+// CHECK-LABEL: test_vqadd_s8
// CHECK: vqadd.s8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vqadd_s8(int8x8_t a, int8x8_t b) {
return vqadd_s8(a, b);
}
-// CHECK: test_vqadd_s16
+// CHECK-LABEL: test_vqadd_s16
// CHECK: vqadd.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vqadd_s16(int16x4_t a, int16x4_t b) {
return vqadd_s16(a, b);
}
-// CHECK: test_vqadd_s32
+// CHECK-LABEL: test_vqadd_s32
// CHECK: vqadd.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vqadd_s32(int32x2_t a, int32x2_t b) {
return vqadd_s32(a, b);
}
-// CHECK: test_vqadd_s64
+// CHECK-LABEL: test_vqadd_s64
// CHECK: vqadd.s64 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x1_t test_vqadd_s64(int64x1_t a, int64x1_t b) {
return vqadd_s64(a, b);
}
-// CHECK: test_vqadd_u8
+// CHECK-LABEL: test_vqadd_u8
// CHECK: vqadd.u8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vqadd_u8(uint8x8_t a, uint8x8_t b) {
return vqadd_u8(a, b);
}
-// CHECK: test_vqadd_u16
+// CHECK-LABEL: test_vqadd_u16
// CHECK: vqadd.u16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vqadd_u16(uint16x4_t a, uint16x4_t b) {
return vqadd_u16(a, b);
}
-// CHECK: test_vqadd_u32
+// CHECK-LABEL: test_vqadd_u32
// CHECK: vqadd.u32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vqadd_u32(uint32x2_t a, uint32x2_t b) {
return vqadd_u32(a, b);
}
-// CHECK: test_vqadd_u64
+// CHECK-LABEL: test_vqadd_u64
// CHECK: vqadd.u64 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint64x1_t test_vqadd_u64(uint64x1_t a, uint64x1_t b) {
return vqadd_u64(a, b);
}
-// CHECK: test_vqaddq_s8
+// CHECK-LABEL: test_vqaddq_s8
// CHECK: vqadd.s8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vqaddq_s8(int8x16_t a, int8x16_t b) {
return vqaddq_s8(a, b);
}
-// CHECK: test_vqaddq_s16
+// CHECK-LABEL: test_vqaddq_s16
// CHECK: vqadd.s16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vqaddq_s16(int16x8_t a, int16x8_t b) {
return vqaddq_s16(a, b);
}
-// CHECK: test_vqaddq_s32
+// CHECK-LABEL: test_vqaddq_s32
// CHECK: vqadd.s32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vqaddq_s32(int32x4_t a, int32x4_t b) {
return vqaddq_s32(a, b);
}
-// CHECK: test_vqaddq_s64
+// CHECK-LABEL: test_vqaddq_s64
// CHECK: vqadd.s64 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int64x2_t test_vqaddq_s64(int64x2_t a, int64x2_t b) {
return vqaddq_s64(a, b);
}
-// CHECK: test_vqaddq_u8
+// CHECK-LABEL: test_vqaddq_u8
// CHECK: vqadd.u8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vqaddq_u8(uint8x16_t a, uint8x16_t b) {
return vqaddq_u8(a, b);
}
-// CHECK: test_vqaddq_u16
+// CHECK-LABEL: test_vqaddq_u16
// CHECK: vqadd.u16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vqaddq_u16(uint16x8_t a, uint16x8_t b) {
return vqaddq_u16(a, b);
}
-// CHECK: test_vqaddq_u32
+// CHECK-LABEL: test_vqaddq_u32
// CHECK: vqadd.u32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vqaddq_u32(uint32x4_t a, uint32x4_t b) {
return vqaddq_u32(a, b);
}
-// CHECK: test_vqaddq_u64
+// CHECK-LABEL: test_vqaddq_u64
// CHECK: vqadd.u64 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint64x2_t test_vqaddq_u64(uint64x2_t a, uint64x2_t b) {
return vqaddq_u64(a, b);
}
-// CHECK: test_vqdmlal_s16
+// CHECK-LABEL: test_vqdmlal_s16
// CHECK: vqdmlal.s16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x4_t test_vqdmlal_s16(int32x4_t a, int16x4_t b, int16x4_t c) {
return vqdmlal_s16(a, b, c);
}
-// CHECK: test_vqdmlal_s32
+// CHECK-LABEL: test_vqdmlal_s32
// CHECK: vqdmlal.s32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x2_t test_vqdmlal_s32(int64x2_t a, int32x2_t b, int32x2_t c) {
return vqdmlal_s32(a, b, c);
}
-// CHECK: test_vqdmlal_lane_s16
+// CHECK-LABEL: test_vqdmlal_lane_s16
// CHECK: vqdmlal.s16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int32x4_t test_vqdmlal_lane_s16(int32x4_t a, int16x4_t b, int16x4_t c) {
return vqdmlal_lane_s16(a, b, c, 3);
}
-// CHECK: test_vqdmlal_lane_s32
+// CHECK-LABEL: test_vqdmlal_lane_s32
// CHECK: vqdmlal.s32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int64x2_t test_vqdmlal_lane_s32(int64x2_t a, int32x2_t b, int32x2_t c) {
return vqdmlal_lane_s32(a, b, c, 1);
}
-// CHECK: test_vqdmlal_n_s16
+// CHECK-LABEL: test_vqdmlal_n_s16
// CHECK: vqdmlal.s16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x4_t test_vqdmlal_n_s16(int32x4_t a, int16x4_t b, int16_t c) {
return vqdmlal_n_s16(a, b, c);
}
-// CHECK: test_vqdmlal_n_s32
+// CHECK-LABEL: test_vqdmlal_n_s32
// CHECK: vqdmlal.s32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x2_t test_vqdmlal_n_s32(int64x2_t a, int32x2_t b, int32_t c) {
return vqdmlal_n_s32(a, b, c);
}
-// CHECK: test_vqdmlsl_s16
+// CHECK-LABEL: test_vqdmlsl_s16
// CHECK: vqdmlsl.s16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x4_t test_vqdmlsl_s16(int32x4_t a, int16x4_t b, int16x4_t c) {
return vqdmlsl_s16(a, b, c);
}
-// CHECK: test_vqdmlsl_s32
+// CHECK-LABEL: test_vqdmlsl_s32
// CHECK: vqdmlsl.s32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x2_t test_vqdmlsl_s32(int64x2_t a, int32x2_t b, int32x2_t c) {
return vqdmlsl_s32(a, b, c);
}
-// CHECK: test_vqdmlsl_lane_s16
+// CHECK-LABEL: test_vqdmlsl_lane_s16
// CHECK: vqdmlsl.s16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int32x4_t test_vqdmlsl_lane_s16(int32x4_t a, int16x4_t b, int16x4_t c) {
return vqdmlsl_lane_s16(a, b, c, 3);
}
-// CHECK: test_vqdmlsl_lane_s32
+// CHECK-LABEL: test_vqdmlsl_lane_s32
// CHECK: vqdmlsl.s32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int64x2_t test_vqdmlsl_lane_s32(int64x2_t a, int32x2_t b, int32x2_t c) {
return vqdmlsl_lane_s32(a, b, c, 1);
}
-// CHECK: test_vqdmlsl_n_s16
+// CHECK-LABEL: test_vqdmlsl_n_s16
// CHECK: vqdmlsl.s16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x4_t test_vqdmlsl_n_s16(int32x4_t a, int16x4_t b, int16_t c) {
return vqdmlsl_n_s16(a, b, c);
}
-// CHECK: test_vqdmlsl_n_s32
+// CHECK-LABEL: test_vqdmlsl_n_s32
// CHECK: vqdmlsl.s32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x2_t test_vqdmlsl_n_s32(int64x2_t a, int32x2_t b, int32_t c) {
return vqdmlsl_n_s32(a, b, c);
}
-// CHECK: test_vqdmulh_s16
+// CHECK-LABEL: test_vqdmulh_s16
// CHECK: vqdmulh.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vqdmulh_s16(int16x4_t a, int16x4_t b) {
return vqdmulh_s16(a, b);
}
-// CHECK: test_vqdmulh_s32
+// CHECK-LABEL: test_vqdmulh_s32
// CHECK: vqdmulh.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vqdmulh_s32(int32x2_t a, int32x2_t b) {
return vqdmulh_s32(a, b);
}
-// CHECK: test_vqdmulhq_s16
+// CHECK-LABEL: test_vqdmulhq_s16
// CHECK: vqdmulh.s16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vqdmulhq_s16(int16x8_t a, int16x8_t b) {
return vqdmulhq_s16(a, b);
}
-// CHECK: test_vqdmulhq_s32
+// CHECK-LABEL: test_vqdmulhq_s32
// CHECK: vqdmulh.s32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vqdmulhq_s32(int32x4_t a, int32x4_t b) {
return vqdmulhq_s32(a, b);
}
-// CHECK: test_vqdmulh_lane_s16
+// CHECK-LABEL: test_vqdmulh_lane_s16
// CHECK: vqdmulh.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int16x4_t test_vqdmulh_lane_s16(int16x4_t a, int16x4_t b) {
return vqdmulh_lane_s16(a, b, 3);
}
-// CHECK: test_vqdmulh_lane_s32
+// CHECK-LABEL: test_vqdmulh_lane_s32
// CHECK: vqdmulh.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int32x2_t test_vqdmulh_lane_s32(int32x2_t a, int32x2_t b) {
return vqdmulh_lane_s32(a, b, 1);
}
-// CHECK: test_vqdmulhq_lane_s16
+// CHECK-LABEL: test_vqdmulhq_lane_s16
// CHECK: vqdmulh.s16 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int16x8_t test_vqdmulhq_lane_s16(int16x8_t a, int16x4_t b) {
return vqdmulhq_lane_s16(a, b, 3);
}
-// CHECK: test_vqdmulhq_lane_s32
+// CHECK-LABEL: test_vqdmulhq_lane_s32
// CHECK: vqdmulh.s32 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int32x4_t test_vqdmulhq_lane_s32(int32x4_t a, int32x2_t b) {
return vqdmulhq_lane_s32(a, b, 1);
}
-// CHECK: test_vqdmulh_n_s16
+// CHECK-LABEL: test_vqdmulh_n_s16
// CHECK: vqdmulh.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vqdmulh_n_s16(int16x4_t a, int16_t b) {
return vqdmulh_n_s16(a, b);
}
-// CHECK: test_vqdmulh_n_s32
+// CHECK-LABEL: test_vqdmulh_n_s32
// CHECK: vqdmulh.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vqdmulh_n_s32(int32x2_t a, int32_t b) {
return vqdmulh_n_s32(a, b);
}
-// CHECK: test_vqdmulhq_n_s16
+// CHECK-LABEL: test_vqdmulhq_n_s16
// CHECK: vqdmulh.s16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vqdmulhq_n_s16(int16x8_t a, int16_t b) {
return vqdmulhq_n_s16(a, b);
}
-// CHECK: test_vqdmulhq_n_s32
+// CHECK-LABEL: test_vqdmulhq_n_s32
// CHECK: vqdmulh.s32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vqdmulhq_n_s32(int32x4_t a, int32_t b) {
return vqdmulhq_n_s32(a, b);
}
-// CHECK: test_vqdmull_s16
+// CHECK-LABEL: test_vqdmull_s16
// CHECK: vqdmull.s16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x4_t test_vqdmull_s16(int16x4_t a, int16x4_t b) {
return vqdmull_s16(a, b);
}
-// CHECK: test_vqdmull_s32
+// CHECK-LABEL: test_vqdmull_s32
// CHECK: vqdmull.s32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x2_t test_vqdmull_s32(int32x2_t a, int32x2_t b) {
return vqdmull_s32(a, b);
}
-// CHECK: test_vqdmull_lane_s16
+// CHECK-LABEL: test_vqdmull_lane_s16
// CHECK: vqdmull.s16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int32x4_t test_vqdmull_lane_s16(int16x4_t a, int16x4_t b) {
return vqdmull_lane_s16(a, b, 3);
}
-// CHECK: test_vqdmull_lane_s32
+// CHECK-LABEL: test_vqdmull_lane_s32
// CHECK: vqdmull.s32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int64x2_t test_vqdmull_lane_s32(int32x2_t a, int32x2_t b) {
return vqdmull_lane_s32(a, b, 1);
}
-// CHECK: test_vqdmull_n_s16
+// CHECK-LABEL: test_vqdmull_n_s16
// CHECK: vqdmull.s16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x4_t test_vqdmull_n_s16(int16x4_t a, int16_t b) {
return vqdmull_n_s16(a, b);
}
-// CHECK: test_vqdmull_n_s32
+// CHECK-LABEL: test_vqdmull_n_s32
// CHECK: vqdmull.s32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x2_t test_vqdmull_n_s32(int32x2_t a, int32_t b) {
return vqdmull_n_s32(a, b);
}
-// CHECK: test_vqmovn_s16
+// CHECK-LABEL: test_vqmovn_s16
// CHECK: vqmovn.s16 d{{[0-9]+}}, q{{[0-9]+}}
int8x8_t test_vqmovn_s16(int16x8_t a) {
return vqmovn_s16(a);
}
-// CHECK: test_vqmovn_s32
+// CHECK-LABEL: test_vqmovn_s32
// CHECK: vqmovn.s32 d{{[0-9]+}}, q{{[0-9]+}}
int16x4_t test_vqmovn_s32(int32x4_t a) {
return vqmovn_s32(a);
}
-// CHECK: test_vqmovn_s64
+// CHECK-LABEL: test_vqmovn_s64
// CHECK: vqmovn.s64 d{{[0-9]+}}, q{{[0-9]+}}
int32x2_t test_vqmovn_s64(int64x2_t a) {
return vqmovn_s64(a);
}
-// CHECK: test_vqmovn_u16
+// CHECK-LABEL: test_vqmovn_u16
// CHECK: vqmovn.u16 d{{[0-9]+}}, q{{[0-9]+}}
uint8x8_t test_vqmovn_u16(uint16x8_t a) {
return vqmovn_u16(a);
}
-// CHECK: test_vqmovn_u32
+// CHECK-LABEL: test_vqmovn_u32
// CHECK: vqmovn.u32 d{{[0-9]+}}, q{{[0-9]+}}
uint16x4_t test_vqmovn_u32(uint32x4_t a) {
return vqmovn_u32(a);
}
-// CHECK: test_vqmovn_u64
+// CHECK-LABEL: test_vqmovn_u64
// CHECK: vqmovn.u64 d{{[0-9]+}}, q{{[0-9]+}}
uint32x2_t test_vqmovn_u64(uint64x2_t a) {
return vqmovn_u64(a);
}
-// CHECK: test_vqmovun_s16
+// CHECK-LABEL: test_vqmovun_s16
// CHECK: vqmovun.s16 d{{[0-9]+}}, q{{[0-9]+}}
uint8x8_t test_vqmovun_s16(int16x8_t a) {
return vqmovun_s16(a);
}
-// CHECK: test_vqmovun_s32
+// CHECK-LABEL: test_vqmovun_s32
// CHECK: vqmovun.s32 d{{[0-9]+}}, q{{[0-9]+}}
uint16x4_t test_vqmovun_s32(int32x4_t a) {
return vqmovun_s32(a);
}
-// CHECK: test_vqmovun_s64
+// CHECK-LABEL: test_vqmovun_s64
// CHECK: vqmovun.s64 d{{[0-9]+}}, q{{[0-9]+}}
uint32x2_t test_vqmovun_s64(int64x2_t a) {
return vqmovun_s64(a);
}
-// CHECK: test_vqneg_s8
+// CHECK-LABEL: test_vqneg_s8
// CHECK: vqneg.s8 d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vqneg_s8(int8x8_t a) {
return vqneg_s8(a);
}
-// CHECK: test_vqneg_s16
+// CHECK-LABEL: test_vqneg_s16
// CHECK: vqneg.s16 d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vqneg_s16(int16x4_t a) {
return vqneg_s16(a);
}
-// CHECK: test_vqneg_s32
+// CHECK-LABEL: test_vqneg_s32
// CHECK: vqneg.s32 d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vqneg_s32(int32x2_t a) {
return vqneg_s32(a);
}
-// CHECK: test_vqnegq_s8
+// CHECK-LABEL: test_vqnegq_s8
// CHECK: vqneg.s8 q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vqnegq_s8(int8x16_t a) {
return vqnegq_s8(a);
}
-// CHECK: test_vqnegq_s16
+// CHECK-LABEL: test_vqnegq_s16
// CHECK: vqneg.s16 q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vqnegq_s16(int16x8_t a) {
return vqnegq_s16(a);
}
-// CHECK: test_vqnegq_s32
+// CHECK-LABEL: test_vqnegq_s32
// CHECK: vqneg.s32 q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vqnegq_s32(int32x4_t a) {
return vqnegq_s32(a);
}
-// CHECK: test_vqrdmulh_s16
+// CHECK-LABEL: test_vqrdmulh_s16
// CHECK: vqrdmulh.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vqrdmulh_s16(int16x4_t a, int16x4_t b) {
return vqrdmulh_s16(a, b);
}
-// CHECK: test_vqrdmulh_s32
+// CHECK-LABEL: test_vqrdmulh_s32
// CHECK: vqrdmulh.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vqrdmulh_s32(int32x2_t a, int32x2_t b) {
return vqrdmulh_s32(a, b);
}
-// CHECK: test_vqrdmulhq_s16
+// CHECK-LABEL: test_vqrdmulhq_s16
// CHECK: vqrdmulh.s16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vqrdmulhq_s16(int16x8_t a, int16x8_t b) {
return vqrdmulhq_s16(a, b);
}
-// CHECK: test_vqrdmulhq_s32
+// CHECK-LABEL: test_vqrdmulhq_s32
// CHECK: vqrdmulh.s32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vqrdmulhq_s32(int32x4_t a, int32x4_t b) {
return vqrdmulhq_s32(a, b);
}
-// CHECK: test_vqrdmulh_lane_s16
+// CHECK-LABEL: test_vqrdmulh_lane_s16
// CHECK: vqrdmulh.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int16x4_t test_vqrdmulh_lane_s16(int16x4_t a, int16x4_t b) {
return vqrdmulh_lane_s16(a, b, 3);
}
-// CHECK: test_vqrdmulh_lane_s32
+// CHECK-LABEL: test_vqrdmulh_lane_s32
// CHECK: vqrdmulh.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int32x2_t test_vqrdmulh_lane_s32(int32x2_t a, int32x2_t b) {
return vqrdmulh_lane_s32(a, b, 1);
}
-// CHECK: test_vqrdmulhq_lane_s16
+// CHECK-LABEL: test_vqrdmulhq_lane_s16
// CHECK: vqrdmulh.s16 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int16x8_t test_vqrdmulhq_lane_s16(int16x8_t a, int16x4_t b) {
return vqrdmulhq_lane_s16(a, b, 3);
}
-// CHECK: test_vqrdmulhq_lane_s32
+// CHECK-LABEL: test_vqrdmulhq_lane_s32
// CHECK: vqrdmulh.s32 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}[{{[0-9]}}]
int32x4_t test_vqrdmulhq_lane_s32(int32x4_t a, int32x2_t b) {
return vqrdmulhq_lane_s32(a, b, 1);
}
-// CHECK: test_vqrdmulh_n_s16
+// CHECK-LABEL: test_vqrdmulh_n_s16
// CHECK: vqrdmulh.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vqrdmulh_n_s16(int16x4_t a, int16_t b) {
return vqrdmulh_n_s16(a, b);
}
-// CHECK: test_vqrdmulh_n_s32
+// CHECK-LABEL: test_vqrdmulh_n_s32
// CHECK: vqrdmulh.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vqrdmulh_n_s32(int32x2_t a, int32_t b) {
return vqrdmulh_n_s32(a, b);
}
-// CHECK: test_vqrdmulhq_n_s16
+// CHECK-LABEL: test_vqrdmulhq_n_s16
// CHECK: vqrdmulh.s16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vqrdmulhq_n_s16(int16x8_t a, int16_t b) {
return vqrdmulhq_n_s16(a, b);
}
-// CHECK: test_vqrdmulhq_n_s32
+// CHECK-LABEL: test_vqrdmulhq_n_s32
// CHECK: vqrdmulh.s32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vqrdmulhq_n_s32(int32x4_t a, int32_t b) {
return vqrdmulhq_n_s32(a, b);
}
-// CHECK: test_vqrshl_s8
+// CHECK-LABEL: test_vqrshl_s8
// CHECK: vqrshl.s8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vqrshl_s8(int8x8_t a, int8x8_t b) {
return vqrshl_s8(a, b);
}
-// CHECK: test_vqrshl_s16
+// CHECK-LABEL: test_vqrshl_s16
// CHECK: vqrshl.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vqrshl_s16(int16x4_t a, int16x4_t b) {
return vqrshl_s16(a, b);
}
-// CHECK: test_vqrshl_s32
+// CHECK-LABEL: test_vqrshl_s32
// CHECK: vqrshl.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vqrshl_s32(int32x2_t a, int32x2_t b) {
return vqrshl_s32(a, b);
}
-// CHECK: test_vqrshl_s64
+// CHECK-LABEL: test_vqrshl_s64
// CHECK: vqrshl.s64 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x1_t test_vqrshl_s64(int64x1_t a, int64x1_t b) {
return vqrshl_s64(a, b);
}
-// CHECK: test_vqrshl_u8
+// CHECK-LABEL: test_vqrshl_u8
// CHECK: vqrshl.u8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vqrshl_u8(uint8x8_t a, int8x8_t b) {
return vqrshl_u8(a, b);
}
-// CHECK: test_vqrshl_u16
+// CHECK-LABEL: test_vqrshl_u16
// CHECK: vqrshl.u16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vqrshl_u16(uint16x4_t a, int16x4_t b) {
return vqrshl_u16(a, b);
}
-// CHECK: test_vqrshl_u32
+// CHECK-LABEL: test_vqrshl_u32
// CHECK: vqrshl.u32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vqrshl_u32(uint32x2_t a, int32x2_t b) {
return vqrshl_u32(a, b);
}
-// CHECK: test_vqrshl_u64
+// CHECK-LABEL: test_vqrshl_u64
// CHECK: vqrshl.u64 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint64x1_t test_vqrshl_u64(uint64x1_t a, int64x1_t b) {
return vqrshl_u64(a, b);
}
-// CHECK: test_vqrshlq_s8
+// CHECK-LABEL: test_vqrshlq_s8
// CHECK: vqrshl.s8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vqrshlq_s8(int8x16_t a, int8x16_t b) {
return vqrshlq_s8(a, b);
}
-// CHECK: test_vqrshlq_s16
+// CHECK-LABEL: test_vqrshlq_s16
// CHECK: vqrshl.s16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vqrshlq_s16(int16x8_t a, int16x8_t b) {
return vqrshlq_s16(a, b);
}
-// CHECK: test_vqrshlq_s32
+// CHECK-LABEL: test_vqrshlq_s32
// CHECK: vqrshl.s32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vqrshlq_s32(int32x4_t a, int32x4_t b) {
return vqrshlq_s32(a, b);
}
-// CHECK: test_vqrshlq_s64
+// CHECK-LABEL: test_vqrshlq_s64
// CHECK: vqrshl.s64 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int64x2_t test_vqrshlq_s64(int64x2_t a, int64x2_t b) {
return vqrshlq_s64(a, b);
}
-// CHECK: test_vqrshlq_u8
+// CHECK-LABEL: test_vqrshlq_u8
// CHECK: vqrshl.u8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vqrshlq_u8(uint8x16_t a, int8x16_t b) {
return vqrshlq_u8(a, b);
}
-// CHECK: test_vqrshlq_u16
+// CHECK-LABEL: test_vqrshlq_u16
// CHECK: vqrshl.u16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vqrshlq_u16(uint16x8_t a, int16x8_t b) {
return vqrshlq_u16(a, b);
}
-// CHECK: test_vqrshlq_u32
+// CHECK-LABEL: test_vqrshlq_u32
// CHECK: vqrshl.u32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vqrshlq_u32(uint32x4_t a, int32x4_t b) {
return vqrshlq_u32(a, b);
}
-// CHECK: test_vqrshlq_u64
+// CHECK-LABEL: test_vqrshlq_u64
// CHECK: vqrshl.u64 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint64x2_t test_vqrshlq_u64(uint64x2_t a, int64x2_t b) {
return vqrshlq_u64(a, b);
}
-// CHECK: test_vqrshrn_n_s16
+// CHECK-LABEL: test_vqrshrn_n_s16
// CHECK: vqrshrn.s16 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int8x8_t test_vqrshrn_n_s16(int16x8_t a) {
return vqrshrn_n_s16(a, 1);
}
-// CHECK: test_vqrshrn_n_s32
+// CHECK-LABEL: test_vqrshrn_n_s32
// CHECK: vqrshrn.s32 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int16x4_t test_vqrshrn_n_s32(int32x4_t a) {
return vqrshrn_n_s32(a, 1);
}
-// CHECK: test_vqrshrn_n_s64
+// CHECK-LABEL: test_vqrshrn_n_s64
// CHECK: vqrshrn.s64 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int32x2_t test_vqrshrn_n_s64(int64x2_t a) {
return vqrshrn_n_s64(a, 1);
}
-// CHECK: test_vqrshrn_n_u16
+// CHECK-LABEL: test_vqrshrn_n_u16
// CHECK: vqrshrn.u16 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint8x8_t test_vqrshrn_n_u16(uint16x8_t a) {
return vqrshrn_n_u16(a, 1);
}
-// CHECK: test_vqrshrn_n_u32
+// CHECK-LABEL: test_vqrshrn_n_u32
// CHECK: vqrshrn.u32 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint16x4_t test_vqrshrn_n_u32(uint32x4_t a) {
return vqrshrn_n_u32(a, 1);
}
-// CHECK: test_vqrshrn_n_u64
+// CHECK-LABEL: test_vqrshrn_n_u64
// CHECK: vqrshrn.u64 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint32x2_t test_vqrshrn_n_u64(uint64x2_t a) {
return vqrshrn_n_u64(a, 1);
}
-// CHECK: test_vqrshrun_n_s16
+// CHECK-LABEL: test_vqrshrun_n_s16
// CHECK: vqrshrun.s16 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint8x8_t test_vqrshrun_n_s16(int16x8_t a) {
return vqrshrun_n_s16(a, 1);
}
-// CHECK: test_vqrshrun_n_s32
+// CHECK-LABEL: test_vqrshrun_n_s32
// CHECK: vqrshrun.s32 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint16x4_t test_vqrshrun_n_s32(int32x4_t a) {
return vqrshrun_n_s32(a, 1);
}
-// CHECK: test_vqrshrun_n_s64
+// CHECK-LABEL: test_vqrshrun_n_s64
// CHECK: vqrshrun.s64 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint32x2_t test_vqrshrun_n_s64(int64x2_t a) {
return vqrshrun_n_s64(a, 1);
}
-// CHECK: test_vqshl_s8
+// CHECK-LABEL: test_vqshl_s8
// CHECK: vqshl.s8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vqshl_s8(int8x8_t a, int8x8_t b) {
return vqshl_s8(a, b);
}
-// CHECK: test_vqshl_s16
+// CHECK-LABEL: test_vqshl_s16
// CHECK: vqshl.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vqshl_s16(int16x4_t a, int16x4_t b) {
return vqshl_s16(a, b);
}
-// CHECK: test_vqshl_s32
+// CHECK-LABEL: test_vqshl_s32
// CHECK: vqshl.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vqshl_s32(int32x2_t a, int32x2_t b) {
return vqshl_s32(a, b);
}
-// CHECK: test_vqshl_s64
+// CHECK-LABEL: test_vqshl_s64
// CHECK: vqshl.s64 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x1_t test_vqshl_s64(int64x1_t a, int64x1_t b) {
return vqshl_s64(a, b);
}
-// CHECK: test_vqshl_u8
+// CHECK-LABEL: test_vqshl_u8
// CHECK: vqshl.u8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vqshl_u8(uint8x8_t a, int8x8_t b) {
return vqshl_u8(a, b);
}
-// CHECK: test_vqshl_u16
+// CHECK-LABEL: test_vqshl_u16
// CHECK: vqshl.u16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vqshl_u16(uint16x4_t a, int16x4_t b) {
return vqshl_u16(a, b);
}
-// CHECK: test_vqshl_u32
+// CHECK-LABEL: test_vqshl_u32
// CHECK: vqshl.u32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vqshl_u32(uint32x2_t a, int32x2_t b) {
return vqshl_u32(a, b);
}
-// CHECK: test_vqshl_u64
+// CHECK-LABEL: test_vqshl_u64
// CHECK: vqshl.u64 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint64x1_t test_vqshl_u64(uint64x1_t a, int64x1_t b) {
return vqshl_u64(a, b);
}
-// CHECK: test_vqshlq_s8
+// CHECK-LABEL: test_vqshlq_s8
// CHECK: vqshl.s8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vqshlq_s8(int8x16_t a, int8x16_t b) {
return vqshlq_s8(a, b);
}
-// CHECK: test_vqshlq_s16
+// CHECK-LABEL: test_vqshlq_s16
// CHECK: vqshl.s16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vqshlq_s16(int16x8_t a, int16x8_t b) {
return vqshlq_s16(a, b);
}
-// CHECK: test_vqshlq_s32
+// CHECK-LABEL: test_vqshlq_s32
// CHECK: vqshl.s32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vqshlq_s32(int32x4_t a, int32x4_t b) {
return vqshlq_s32(a, b);
}
-// CHECK: test_vqshlq_s64
+// CHECK-LABEL: test_vqshlq_s64
// CHECK: vqshl.s64 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int64x2_t test_vqshlq_s64(int64x2_t a, int64x2_t b) {
return vqshlq_s64(a, b);
}
-// CHECK: test_vqshlq_u8
+// CHECK-LABEL: test_vqshlq_u8
// CHECK: vqshl.u8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vqshlq_u8(uint8x16_t a, int8x16_t b) {
return vqshlq_u8(a, b);
}
-// CHECK: test_vqshlq_u16
+// CHECK-LABEL: test_vqshlq_u16
// CHECK: vqshl.u16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vqshlq_u16(uint16x8_t a, int16x8_t b) {
return vqshlq_u16(a, b);
}
-// CHECK: test_vqshlq_u32
+// CHECK-LABEL: test_vqshlq_u32
// CHECK: vqshl.u32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vqshlq_u32(uint32x4_t a, int32x4_t b) {
return vqshlq_u32(a, b);
}
-// CHECK: test_vqshlq_u64
+// CHECK-LABEL: test_vqshlq_u64
// CHECK: vqshl.u64 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint64x2_t test_vqshlq_u64(uint64x2_t a, int64x2_t b) {
return vqshlq_u64(a, b);
}
-// CHECK: test_vqshlu_n_s8
+// CHECK-LABEL: test_vqshlu_n_s8
// CHECK: vqshlu.s8 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint8x8_t test_vqshlu_n_s8(int8x8_t a) {
return vqshlu_n_s8(a, 1);
}
-// CHECK: test_vqshlu_n_s16
+// CHECK-LABEL: test_vqshlu_n_s16
// CHECK: vqshlu.s16 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint16x4_t test_vqshlu_n_s16(int16x4_t a) {
return vqshlu_n_s16(a, 1);
}
-// CHECK: test_vqshlu_n_s32
+// CHECK-LABEL: test_vqshlu_n_s32
// CHECK: vqshlu.s32 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint32x2_t test_vqshlu_n_s32(int32x2_t a) {
return vqshlu_n_s32(a, 1);
}
-// CHECK: test_vqshlu_n_s64
+// CHECK-LABEL: test_vqshlu_n_s64
// CHECK: vqshlu.s64 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint64x1_t test_vqshlu_n_s64(int64x1_t a) {
return vqshlu_n_s64(a, 1);
}
-// CHECK: test_vqshluq_n_s8
+// CHECK-LABEL: test_vqshluq_n_s8
// CHECK: vqshlu.s8 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint8x16_t test_vqshluq_n_s8(int8x16_t a) {
return vqshluq_n_s8(a, 1);
}
-// CHECK: test_vqshluq_n_s16
+// CHECK-LABEL: test_vqshluq_n_s16
// CHECK: vqshlu.s16 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint16x8_t test_vqshluq_n_s16(int16x8_t a) {
return vqshluq_n_s16(a, 1);
}
-// CHECK: test_vqshluq_n_s32
+// CHECK-LABEL: test_vqshluq_n_s32
// CHECK: vqshlu.s32 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint32x4_t test_vqshluq_n_s32(int32x4_t a) {
return vqshluq_n_s32(a, 1);
}
-// CHECK: test_vqshluq_n_s64
+// CHECK-LABEL: test_vqshluq_n_s64
// CHECK: vqshlu.s64 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint64x2_t test_vqshluq_n_s64(int64x2_t a) {
return vqshluq_n_s64(a, 1);
}
-// CHECK: test_vqshl_n_s8
+// CHECK-LABEL: test_vqshl_n_s8
// CHECK: vqshl.s8 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int8x8_t test_vqshl_n_s8(int8x8_t a) {
return vqshl_n_s8(a, 1);
}
-// CHECK: test_vqshl_n_s16
+// CHECK-LABEL: test_vqshl_n_s16
// CHECK: vqshl.s16 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int16x4_t test_vqshl_n_s16(int16x4_t a) {
return vqshl_n_s16(a, 1);
}
-// CHECK: test_vqshl_n_s32
+// CHECK-LABEL: test_vqshl_n_s32
// CHECK: vqshl.s32 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int32x2_t test_vqshl_n_s32(int32x2_t a) {
return vqshl_n_s32(a, 1);
}
-// CHECK: test_vqshl_n_s64
+// CHECK-LABEL: test_vqshl_n_s64
// CHECK: vqshl.s64 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int64x1_t test_vqshl_n_s64(int64x1_t a) {
return vqshl_n_s64(a, 1);
}
-// CHECK: test_vqshl_n_u8
+// CHECK-LABEL: test_vqshl_n_u8
// CHECK: vqshl.u8 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint8x8_t test_vqshl_n_u8(uint8x8_t a) {
return vqshl_n_u8(a, 1);
}
-// CHECK: test_vqshl_n_u16
+// CHECK-LABEL: test_vqshl_n_u16
// CHECK: vqshl.u16 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint16x4_t test_vqshl_n_u16(uint16x4_t a) {
return vqshl_n_u16(a, 1);
}
-// CHECK: test_vqshl_n_u32
+// CHECK-LABEL: test_vqshl_n_u32
// CHECK: vqshl.u32 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint32x2_t test_vqshl_n_u32(uint32x2_t a) {
return vqshl_n_u32(a, 1);
}
-// CHECK: test_vqshl_n_u64
+// CHECK-LABEL: test_vqshl_n_u64
// CHECK: vqshl.u64 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint64x1_t test_vqshl_n_u64(uint64x1_t a) {
return vqshl_n_u64(a, 1);
}
-// CHECK: test_vqshlq_n_s8
+// CHECK-LABEL: test_vqshlq_n_s8
// CHECK: vqshl.s8 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int8x16_t test_vqshlq_n_s8(int8x16_t a) {
return vqshlq_n_s8(a, 1);
}
-// CHECK: test_vqshlq_n_s16
+// CHECK-LABEL: test_vqshlq_n_s16
// CHECK: vqshl.s16 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int16x8_t test_vqshlq_n_s16(int16x8_t a) {
return vqshlq_n_s16(a, 1);
}
-// CHECK: test_vqshlq_n_s32
+// CHECK-LABEL: test_vqshlq_n_s32
// CHECK: vqshl.s32 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int32x4_t test_vqshlq_n_s32(int32x4_t a) {
return vqshlq_n_s32(a, 1);
}
-// CHECK: test_vqshlq_n_s64
+// CHECK-LABEL: test_vqshlq_n_s64
// CHECK: vqshl.s64 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int64x2_t test_vqshlq_n_s64(int64x2_t a) {
return vqshlq_n_s64(a, 1);
}
-// CHECK: test_vqshlq_n_u8
+// CHECK-LABEL: test_vqshlq_n_u8
// CHECK: vqshl.u8 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint8x16_t test_vqshlq_n_u8(uint8x16_t a) {
return vqshlq_n_u8(a, 1);
}
-// CHECK: test_vqshlq_n_u16
+// CHECK-LABEL: test_vqshlq_n_u16
// CHECK: vqshl.u16 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint16x8_t test_vqshlq_n_u16(uint16x8_t a) {
return vqshlq_n_u16(a, 1);
}
-// CHECK: test_vqshlq_n_u32
+// CHECK-LABEL: test_vqshlq_n_u32
// CHECK: vqshl.u32 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint32x4_t test_vqshlq_n_u32(uint32x4_t a) {
return vqshlq_n_u32(a, 1);
}
-// CHECK: test_vqshlq_n_u64
+// CHECK-LABEL: test_vqshlq_n_u64
// CHECK: vqshl.u64 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint64x2_t test_vqshlq_n_u64(uint64x2_t a) {
return vqshlq_n_u64(a, 1);
}
-// CHECK: test_vqshrn_n_s16
+// CHECK-LABEL: test_vqshrn_n_s16
// CHECK: vqshrn.s16 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int8x8_t test_vqshrn_n_s16(int16x8_t a) {
return vqshrn_n_s16(a, 1);
}
-// CHECK: test_vqshrn_n_s32
+// CHECK-LABEL: test_vqshrn_n_s32
// CHECK: vqshrn.s32 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int16x4_t test_vqshrn_n_s32(int32x4_t a) {
return vqshrn_n_s32(a, 1);
}
-// CHECK: test_vqshrn_n_s64
+// CHECK-LABEL: test_vqshrn_n_s64
// CHECK: vqshrn.s64 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int32x2_t test_vqshrn_n_s64(int64x2_t a) {
return vqshrn_n_s64(a, 1);
}
-// CHECK: test_vqshrn_n_u16
+// CHECK-LABEL: test_vqshrn_n_u16
// CHECK: vqshrn.u16 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint8x8_t test_vqshrn_n_u16(uint16x8_t a) {
return vqshrn_n_u16(a, 1);
}
-// CHECK: test_vqshrn_n_u32
+// CHECK-LABEL: test_vqshrn_n_u32
// CHECK: vqshrn.u32 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint16x4_t test_vqshrn_n_u32(uint32x4_t a) {
return vqshrn_n_u32(a, 1);
}
-// CHECK: test_vqshrn_n_u64
+// CHECK-LABEL: test_vqshrn_n_u64
// CHECK: vqshrn.u64 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint32x2_t test_vqshrn_n_u64(uint64x2_t a) {
return vqshrn_n_u64(a, 1);
}
-// CHECK: test_vqshrun_n_s16
+// CHECK-LABEL: test_vqshrun_n_s16
// CHECK: vqshrun.s16 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint8x8_t test_vqshrun_n_s16(int16x8_t a) {
return vqshrun_n_s16(a, 1);
}
-// CHECK: test_vqshrun_n_s32
+// CHECK-LABEL: test_vqshrun_n_s32
// CHECK: vqshrun.s32 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint16x4_t test_vqshrun_n_s32(int32x4_t a) {
return vqshrun_n_s32(a, 1);
}
-// CHECK: test_vqshrun_n_s64
+// CHECK-LABEL: test_vqshrun_n_s64
// CHECK: vqshrun.s64 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint32x2_t test_vqshrun_n_s64(int64x2_t a) {
return vqshrun_n_s64(a, 1);
}
-// CHECK: test_vqsub_s8
+// CHECK-LABEL: test_vqsub_s8
// CHECK: vqsub.s8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vqsub_s8(int8x8_t a, int8x8_t b) {
return vqsub_s8(a, b);
}
-// CHECK: test_vqsub_s16
+// CHECK-LABEL: test_vqsub_s16
// CHECK: vqsub.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vqsub_s16(int16x4_t a, int16x4_t b) {
return vqsub_s16(a, b);
}
-// CHECK: test_vqsub_s32
+// CHECK-LABEL: test_vqsub_s32
// CHECK: vqsub.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vqsub_s32(int32x2_t a, int32x2_t b) {
return vqsub_s32(a, b);
}
-// CHECK: test_vqsub_s64
+// CHECK-LABEL: test_vqsub_s64
// CHECK: vqsub.s64 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x1_t test_vqsub_s64(int64x1_t a, int64x1_t b) {
return vqsub_s64(a, b);
}
-// CHECK: test_vqsub_u8
+// CHECK-LABEL: test_vqsub_u8
// CHECK: vqsub.u8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vqsub_u8(uint8x8_t a, uint8x8_t b) {
return vqsub_u8(a, b);
}
-// CHECK: test_vqsub_u16
+// CHECK-LABEL: test_vqsub_u16
// CHECK: vqsub.u16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vqsub_u16(uint16x4_t a, uint16x4_t b) {
return vqsub_u16(a, b);
}
-// CHECK: test_vqsub_u32
+// CHECK-LABEL: test_vqsub_u32
// CHECK: vqsub.u32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vqsub_u32(uint32x2_t a, uint32x2_t b) {
return vqsub_u32(a, b);
}
-// CHECK: test_vqsub_u64
+// CHECK-LABEL: test_vqsub_u64
// CHECK: vqsub.u64 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint64x1_t test_vqsub_u64(uint64x1_t a, uint64x1_t b) {
return vqsub_u64(a, b);
}
-// CHECK: test_vqsubq_s8
+// CHECK-LABEL: test_vqsubq_s8
// CHECK: vqsub.s8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vqsubq_s8(int8x16_t a, int8x16_t b) {
return vqsubq_s8(a, b);
}
-// CHECK: test_vqsubq_s16
+// CHECK-LABEL: test_vqsubq_s16
// CHECK: vqsub.s16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vqsubq_s16(int16x8_t a, int16x8_t b) {
return vqsubq_s16(a, b);
}
-// CHECK: test_vqsubq_s32
+// CHECK-LABEL: test_vqsubq_s32
// CHECK: vqsub.s32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vqsubq_s32(int32x4_t a, int32x4_t b) {
return vqsubq_s32(a, b);
}
-// CHECK: test_vqsubq_s64
+// CHECK-LABEL: test_vqsubq_s64
// CHECK: vqsub.s64 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int64x2_t test_vqsubq_s64(int64x2_t a, int64x2_t b) {
return vqsubq_s64(a, b);
}
-// CHECK: test_vqsubq_u8
+// CHECK-LABEL: test_vqsubq_u8
// CHECK: vqsub.u8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vqsubq_u8(uint8x16_t a, uint8x16_t b) {
return vqsubq_u8(a, b);
}
-// CHECK: test_vqsubq_u16
+// CHECK-LABEL: test_vqsubq_u16
// CHECK: vqsub.u16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vqsubq_u16(uint16x8_t a, uint16x8_t b) {
return vqsubq_u16(a, b);
}
-// CHECK: test_vqsubq_u32
+// CHECK-LABEL: test_vqsubq_u32
// CHECK: vqsub.u32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vqsubq_u32(uint32x4_t a, uint32x4_t b) {
return vqsubq_u32(a, b);
}
-// CHECK: test_vqsubq_u64
+// CHECK-LABEL: test_vqsubq_u64
// CHECK: vqsub.u64 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint64x2_t test_vqsubq_u64(uint64x2_t a, uint64x2_t b) {
return vqsubq_u64(a, b);
}
-// CHECK: test_vraddhn_s16
+// CHECK-LABEL: test_vraddhn_s16
// CHECK: vraddhn.i16 d{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x8_t test_vraddhn_s16(int16x8_t a, int16x8_t b) {
return vraddhn_s16(a, b);
}
-// CHECK: test_vraddhn_s32
+// CHECK-LABEL: test_vraddhn_s32
// CHECK: vraddhn.i32 d{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x4_t test_vraddhn_s32(int32x4_t a, int32x4_t b) {
return vraddhn_s32(a, b);
}
-// CHECK: test_vraddhn_s64
+// CHECK-LABEL: test_vraddhn_s64
// CHECK: vraddhn.i64 d{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x2_t test_vraddhn_s64(int64x2_t a, int64x2_t b) {
return vraddhn_s64(a, b);
}
-// CHECK: test_vraddhn_u16
+// CHECK-LABEL: test_vraddhn_u16
// CHECK: vraddhn.i16 d{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x8_t test_vraddhn_u16(uint16x8_t a, uint16x8_t b) {
return vraddhn_u16(a, b);
}
-// CHECK: test_vraddhn_u32
+// CHECK-LABEL: test_vraddhn_u32
// CHECK: vraddhn.i32 d{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x4_t test_vraddhn_u32(uint32x4_t a, uint32x4_t b) {
return vraddhn_u32(a, b);
}
-// CHECK: test_vraddhn_u64
+// CHECK-LABEL: test_vraddhn_u64
// CHECK: vraddhn.i64 d{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x2_t test_vraddhn_u64(uint64x2_t a, uint64x2_t b) {
return vraddhn_u64(a, b);
}
-// CHECK: test_vrecpe_f32
+// CHECK-LABEL: test_vrecpe_f32
// CHECK: vrecpe.f32 d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vrecpe_f32(float32x2_t a) {
return vrecpe_f32(a);
}
-// CHECK: test_vrecpe_u32
+// CHECK-LABEL: test_vrecpe_u32
// CHECK: vrecpe.u32 d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vrecpe_u32(uint32x2_t a) {
return vrecpe_u32(a);
}
-// CHECK: test_vrecpeq_f32
+// CHECK-LABEL: test_vrecpeq_f32
// CHECK: vrecpe.f32 q{{[0-9]+}}, q{{[0-9]+}}
float32x4_t test_vrecpeq_f32(float32x4_t a) {
return vrecpeq_f32(a);
}
-// CHECK: test_vrecpeq_u32
+// CHECK-LABEL: test_vrecpeq_u32
// CHECK: vrecpe.u32 q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vrecpeq_u32(uint32x4_t a) {
return vrecpeq_u32(a);
}
-// CHECK: test_vrecps_f32
+// CHECK-LABEL: test_vrecps_f32
// CHECK: vrecps.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vrecps_f32(float32x2_t a, float32x2_t b) {
return vrecps_f32(a, b);
}
-// CHECK: test_vrecpsq_f32
+// CHECK-LABEL: test_vrecpsq_f32
// CHECK: vrecps.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
float32x4_t test_vrecpsq_f32(float32x4_t a, float32x4_t b) {
return vrecpsq_f32(a, b);
}
-// CHECK: test_vreinterpret_s8_s16
+// CHECK-LABEL: test_vreinterpret_s8_s16
int8x8_t test_vreinterpret_s8_s16(int16x4_t a) {
return vreinterpret_s8_s16(a);
}
-// CHECK: test_vreinterpret_s8_s32
+// CHECK-LABEL: test_vreinterpret_s8_s32
int8x8_t test_vreinterpret_s8_s32(int32x2_t a) {
return vreinterpret_s8_s32(a);
}
-// CHECK: test_vreinterpret_s8_s64
+// CHECK-LABEL: test_vreinterpret_s8_s64
int8x8_t test_vreinterpret_s8_s64(int64x1_t a) {
return vreinterpret_s8_s64(a);
}
-// CHECK: test_vreinterpret_s8_u8
+// CHECK-LABEL: test_vreinterpret_s8_u8
int8x8_t test_vreinterpret_s8_u8(uint8x8_t a) {
return vreinterpret_s8_u8(a);
}
-// CHECK: test_vreinterpret_s8_u16
+// CHECK-LABEL: test_vreinterpret_s8_u16
int8x8_t test_vreinterpret_s8_u16(uint16x4_t a) {
return vreinterpret_s8_u16(a);
}
-// CHECK: test_vreinterpret_s8_u32
+// CHECK-LABEL: test_vreinterpret_s8_u32
int8x8_t test_vreinterpret_s8_u32(uint32x2_t a) {
return vreinterpret_s8_u32(a);
}
-// CHECK: test_vreinterpret_s8_u64
+// CHECK-LABEL: test_vreinterpret_s8_u64
int8x8_t test_vreinterpret_s8_u64(uint64x1_t a) {
return vreinterpret_s8_u64(a);
}
-// CHECK: test_vreinterpret_s8_f16
+// CHECK-LABEL: test_vreinterpret_s8_f16
int8x8_t test_vreinterpret_s8_f16(float16x4_t a) {
return vreinterpret_s8_f16(a);
}
-// CHECK: test_vreinterpret_s8_f32
+// CHECK-LABEL: test_vreinterpret_s8_f32
int8x8_t test_vreinterpret_s8_f32(float32x2_t a) {
return vreinterpret_s8_f32(a);
}
-// CHECK: test_vreinterpret_s8_p8
+// CHECK-LABEL: test_vreinterpret_s8_p8
int8x8_t test_vreinterpret_s8_p8(poly8x8_t a) {
return vreinterpret_s8_p8(a);
}
-// CHECK: test_vreinterpret_s8_p16
+// CHECK-LABEL: test_vreinterpret_s8_p16
int8x8_t test_vreinterpret_s8_p16(poly16x4_t a) {
return vreinterpret_s8_p16(a);
}
-// CHECK: test_vreinterpret_s16_s8
+// CHECK-LABEL: test_vreinterpret_s16_s8
int16x4_t test_vreinterpret_s16_s8(int8x8_t a) {
return vreinterpret_s16_s8(a);
}
-// CHECK: test_vreinterpret_s16_s32
+// CHECK-LABEL: test_vreinterpret_s16_s32
int16x4_t test_vreinterpret_s16_s32(int32x2_t a) {
return vreinterpret_s16_s32(a);
}
-// CHECK: test_vreinterpret_s16_s64
+// CHECK-LABEL: test_vreinterpret_s16_s64
int16x4_t test_vreinterpret_s16_s64(int64x1_t a) {
return vreinterpret_s16_s64(a);
}
-// CHECK: test_vreinterpret_s16_u8
+// CHECK-LABEL: test_vreinterpret_s16_u8
int16x4_t test_vreinterpret_s16_u8(uint8x8_t a) {
return vreinterpret_s16_u8(a);
}
-// CHECK: test_vreinterpret_s16_u16
+// CHECK-LABEL: test_vreinterpret_s16_u16
int16x4_t test_vreinterpret_s16_u16(uint16x4_t a) {
return vreinterpret_s16_u16(a);
}
-// CHECK: test_vreinterpret_s16_u32
+// CHECK-LABEL: test_vreinterpret_s16_u32
int16x4_t test_vreinterpret_s16_u32(uint32x2_t a) {
return vreinterpret_s16_u32(a);
}
-// CHECK: test_vreinterpret_s16_u64
+// CHECK-LABEL: test_vreinterpret_s16_u64
int16x4_t test_vreinterpret_s16_u64(uint64x1_t a) {
return vreinterpret_s16_u64(a);
}
-// CHECK: test_vreinterpret_s16_f16
+// CHECK-LABEL: test_vreinterpret_s16_f16
int16x4_t test_vreinterpret_s16_f16(float16x4_t a) {
return vreinterpret_s16_f16(a);
}
-// CHECK: test_vreinterpret_s16_f32
+// CHECK-LABEL: test_vreinterpret_s16_f32
int16x4_t test_vreinterpret_s16_f32(float32x2_t a) {
return vreinterpret_s16_f32(a);
}
-// CHECK: test_vreinterpret_s16_p8
+// CHECK-LABEL: test_vreinterpret_s16_p8
int16x4_t test_vreinterpret_s16_p8(poly8x8_t a) {
return vreinterpret_s16_p8(a);
}
-// CHECK: test_vreinterpret_s16_p16
+// CHECK-LABEL: test_vreinterpret_s16_p16
int16x4_t test_vreinterpret_s16_p16(poly16x4_t a) {
return vreinterpret_s16_p16(a);
}
-// CHECK: test_vreinterpret_s32_s8
+// CHECK-LABEL: test_vreinterpret_s32_s8
int32x2_t test_vreinterpret_s32_s8(int8x8_t a) {
return vreinterpret_s32_s8(a);
}
-// CHECK: test_vreinterpret_s32_s16
+// CHECK-LABEL: test_vreinterpret_s32_s16
int32x2_t test_vreinterpret_s32_s16(int16x4_t a) {
return vreinterpret_s32_s16(a);
}
-// CHECK: test_vreinterpret_s32_s64
+// CHECK-LABEL: test_vreinterpret_s32_s64
int32x2_t test_vreinterpret_s32_s64(int64x1_t a) {
return vreinterpret_s32_s64(a);
}
-// CHECK: test_vreinterpret_s32_u8
+// CHECK-LABEL: test_vreinterpret_s32_u8
int32x2_t test_vreinterpret_s32_u8(uint8x8_t a) {
return vreinterpret_s32_u8(a);
}
-// CHECK: test_vreinterpret_s32_u16
+// CHECK-LABEL: test_vreinterpret_s32_u16
int32x2_t test_vreinterpret_s32_u16(uint16x4_t a) {
return vreinterpret_s32_u16(a);
}
-// CHECK: test_vreinterpret_s32_u32
+// CHECK-LABEL: test_vreinterpret_s32_u32
int32x2_t test_vreinterpret_s32_u32(uint32x2_t a) {
return vreinterpret_s32_u32(a);
}
-// CHECK: test_vreinterpret_s32_u64
+// CHECK-LABEL: test_vreinterpret_s32_u64
int32x2_t test_vreinterpret_s32_u64(uint64x1_t a) {
return vreinterpret_s32_u64(a);
}
-// CHECK: test_vreinterpret_s32_f16
+// CHECK-LABEL: test_vreinterpret_s32_f16
int32x2_t test_vreinterpret_s32_f16(float16x4_t a) {
return vreinterpret_s32_f16(a);
}
-// CHECK: test_vreinterpret_s32_f32
+// CHECK-LABEL: test_vreinterpret_s32_f32
int32x2_t test_vreinterpret_s32_f32(float32x2_t a) {
return vreinterpret_s32_f32(a);
}
-// CHECK: test_vreinterpret_s32_p8
+// CHECK-LABEL: test_vreinterpret_s32_p8
int32x2_t test_vreinterpret_s32_p8(poly8x8_t a) {
return vreinterpret_s32_p8(a);
}
-// CHECK: test_vreinterpret_s32_p16
+// CHECK-LABEL: test_vreinterpret_s32_p16
int32x2_t test_vreinterpret_s32_p16(poly16x4_t a) {
return vreinterpret_s32_p16(a);
}
-// CHECK: test_vreinterpret_s64_s8
+// CHECK-LABEL: test_vreinterpret_s64_s8
int64x1_t test_vreinterpret_s64_s8(int8x8_t a) {
return vreinterpret_s64_s8(a);
}
-// CHECK: test_vreinterpret_s64_s16
+// CHECK-LABEL: test_vreinterpret_s64_s16
int64x1_t test_vreinterpret_s64_s16(int16x4_t a) {
return vreinterpret_s64_s16(a);
}
-// CHECK: test_vreinterpret_s64_s32
+// CHECK-LABEL: test_vreinterpret_s64_s32
int64x1_t test_vreinterpret_s64_s32(int32x2_t a) {
return vreinterpret_s64_s32(a);
}
-// CHECK: test_vreinterpret_s64_u8
+// CHECK-LABEL: test_vreinterpret_s64_u8
int64x1_t test_vreinterpret_s64_u8(uint8x8_t a) {
return vreinterpret_s64_u8(a);
}
-// CHECK: test_vreinterpret_s64_u16
+// CHECK-LABEL: test_vreinterpret_s64_u16
int64x1_t test_vreinterpret_s64_u16(uint16x4_t a) {
return vreinterpret_s64_u16(a);
}
-// CHECK: test_vreinterpret_s64_u32
+// CHECK-LABEL: test_vreinterpret_s64_u32
int64x1_t test_vreinterpret_s64_u32(uint32x2_t a) {
return vreinterpret_s64_u32(a);
}
-// CHECK: test_vreinterpret_s64_u64
+// CHECK-LABEL: test_vreinterpret_s64_u64
int64x1_t test_vreinterpret_s64_u64(uint64x1_t a) {
return vreinterpret_s64_u64(a);
}
-// CHECK: test_vreinterpret_s64_f16
+// CHECK-LABEL: test_vreinterpret_s64_f16
int64x1_t test_vreinterpret_s64_f16(float16x4_t a) {
return vreinterpret_s64_f16(a);
}
-// CHECK: test_vreinterpret_s64_f32
+// CHECK-LABEL: test_vreinterpret_s64_f32
int64x1_t test_vreinterpret_s64_f32(float32x2_t a) {
return vreinterpret_s64_f32(a);
}
-// CHECK: test_vreinterpret_s64_p8
+// CHECK-LABEL: test_vreinterpret_s64_p8
int64x1_t test_vreinterpret_s64_p8(poly8x8_t a) {
return vreinterpret_s64_p8(a);
}
-// CHECK: test_vreinterpret_s64_p16
+// CHECK-LABEL: test_vreinterpret_s64_p16
int64x1_t test_vreinterpret_s64_p16(poly16x4_t a) {
return vreinterpret_s64_p16(a);
}
-// CHECK: test_vreinterpret_u8_s8
+// CHECK-LABEL: test_vreinterpret_u8_s8
uint8x8_t test_vreinterpret_u8_s8(int8x8_t a) {
return vreinterpret_u8_s8(a);
}
-// CHECK: test_vreinterpret_u8_s16
+// CHECK-LABEL: test_vreinterpret_u8_s16
uint8x8_t test_vreinterpret_u8_s16(int16x4_t a) {
return vreinterpret_u8_s16(a);
}
-// CHECK: test_vreinterpret_u8_s32
+// CHECK-LABEL: test_vreinterpret_u8_s32
uint8x8_t test_vreinterpret_u8_s32(int32x2_t a) {
return vreinterpret_u8_s32(a);
}
-// CHECK: test_vreinterpret_u8_s64
+// CHECK-LABEL: test_vreinterpret_u8_s64
uint8x8_t test_vreinterpret_u8_s64(int64x1_t a) {
return vreinterpret_u8_s64(a);
}
-// CHECK: test_vreinterpret_u8_u16
+// CHECK-LABEL: test_vreinterpret_u8_u16
uint8x8_t test_vreinterpret_u8_u16(uint16x4_t a) {
return vreinterpret_u8_u16(a);
}
-// CHECK: test_vreinterpret_u8_u32
+// CHECK-LABEL: test_vreinterpret_u8_u32
uint8x8_t test_vreinterpret_u8_u32(uint32x2_t a) {
return vreinterpret_u8_u32(a);
}
-// CHECK: test_vreinterpret_u8_u64
+// CHECK-LABEL: test_vreinterpret_u8_u64
uint8x8_t test_vreinterpret_u8_u64(uint64x1_t a) {
return vreinterpret_u8_u64(a);
}
-// CHECK: test_vreinterpret_u8_f16
+// CHECK-LABEL: test_vreinterpret_u8_f16
uint8x8_t test_vreinterpret_u8_f16(float16x4_t a) {
return vreinterpret_u8_f16(a);
}
-// CHECK: test_vreinterpret_u8_f32
+// CHECK-LABEL: test_vreinterpret_u8_f32
uint8x8_t test_vreinterpret_u8_f32(float32x2_t a) {
return vreinterpret_u8_f32(a);
}
-// CHECK: test_vreinterpret_u8_p8
+// CHECK-LABEL: test_vreinterpret_u8_p8
uint8x8_t test_vreinterpret_u8_p8(poly8x8_t a) {
return vreinterpret_u8_p8(a);
}
-// CHECK: test_vreinterpret_u8_p16
+// CHECK-LABEL: test_vreinterpret_u8_p16
uint8x8_t test_vreinterpret_u8_p16(poly16x4_t a) {
return vreinterpret_u8_p16(a);
}
-// CHECK: test_vreinterpret_u16_s8
+// CHECK-LABEL: test_vreinterpret_u16_s8
uint16x4_t test_vreinterpret_u16_s8(int8x8_t a) {
return vreinterpret_u16_s8(a);
}
-// CHECK: test_vreinterpret_u16_s16
+// CHECK-LABEL: test_vreinterpret_u16_s16
uint16x4_t test_vreinterpret_u16_s16(int16x4_t a) {
return vreinterpret_u16_s16(a);
}
-// CHECK: test_vreinterpret_u16_s32
+// CHECK-LABEL: test_vreinterpret_u16_s32
uint16x4_t test_vreinterpret_u16_s32(int32x2_t a) {
return vreinterpret_u16_s32(a);
}
-// CHECK: test_vreinterpret_u16_s64
+// CHECK-LABEL: test_vreinterpret_u16_s64
uint16x4_t test_vreinterpret_u16_s64(int64x1_t a) {
return vreinterpret_u16_s64(a);
}
-// CHECK: test_vreinterpret_u16_u8
+// CHECK-LABEL: test_vreinterpret_u16_u8
uint16x4_t test_vreinterpret_u16_u8(uint8x8_t a) {
return vreinterpret_u16_u8(a);
}
-// CHECK: test_vreinterpret_u16_u32
+// CHECK-LABEL: test_vreinterpret_u16_u32
uint16x4_t test_vreinterpret_u16_u32(uint32x2_t a) {
return vreinterpret_u16_u32(a);
}
-// CHECK: test_vreinterpret_u16_u64
+// CHECK-LABEL: test_vreinterpret_u16_u64
uint16x4_t test_vreinterpret_u16_u64(uint64x1_t a) {
return vreinterpret_u16_u64(a);
}
-// CHECK: test_vreinterpret_u16_f16
+// CHECK-LABEL: test_vreinterpret_u16_f16
uint16x4_t test_vreinterpret_u16_f16(float16x4_t a) {
return vreinterpret_u16_f16(a);
}
-// CHECK: test_vreinterpret_u16_f32
+// CHECK-LABEL: test_vreinterpret_u16_f32
uint16x4_t test_vreinterpret_u16_f32(float32x2_t a) {
return vreinterpret_u16_f32(a);
}
-// CHECK: test_vreinterpret_u16_p8
+// CHECK-LABEL: test_vreinterpret_u16_p8
uint16x4_t test_vreinterpret_u16_p8(poly8x8_t a) {
return vreinterpret_u16_p8(a);
}
-// CHECK: test_vreinterpret_u16_p16
+// CHECK-LABEL: test_vreinterpret_u16_p16
uint16x4_t test_vreinterpret_u16_p16(poly16x4_t a) {
return vreinterpret_u16_p16(a);
}
-// CHECK: test_vreinterpret_u32_s8
+// CHECK-LABEL: test_vreinterpret_u32_s8
uint32x2_t test_vreinterpret_u32_s8(int8x8_t a) {
return vreinterpret_u32_s8(a);
}
-// CHECK: test_vreinterpret_u32_s16
+// CHECK-LABEL: test_vreinterpret_u32_s16
uint32x2_t test_vreinterpret_u32_s16(int16x4_t a) {
return vreinterpret_u32_s16(a);
}
-// CHECK: test_vreinterpret_u32_s32
+// CHECK-LABEL: test_vreinterpret_u32_s32
uint32x2_t test_vreinterpret_u32_s32(int32x2_t a) {
return vreinterpret_u32_s32(a);
}
-// CHECK: test_vreinterpret_u32_s64
+// CHECK-LABEL: test_vreinterpret_u32_s64
uint32x2_t test_vreinterpret_u32_s64(int64x1_t a) {
return vreinterpret_u32_s64(a);
}
-// CHECK: test_vreinterpret_u32_u8
+// CHECK-LABEL: test_vreinterpret_u32_u8
uint32x2_t test_vreinterpret_u32_u8(uint8x8_t a) {
return vreinterpret_u32_u8(a);
}
-// CHECK: test_vreinterpret_u32_u16
+// CHECK-LABEL: test_vreinterpret_u32_u16
uint32x2_t test_vreinterpret_u32_u16(uint16x4_t a) {
return vreinterpret_u32_u16(a);
}
-// CHECK: test_vreinterpret_u32_u64
+// CHECK-LABEL: test_vreinterpret_u32_u64
uint32x2_t test_vreinterpret_u32_u64(uint64x1_t a) {
return vreinterpret_u32_u64(a);
}
-// CHECK: test_vreinterpret_u32_f16
+// CHECK-LABEL: test_vreinterpret_u32_f16
uint32x2_t test_vreinterpret_u32_f16(float16x4_t a) {
return vreinterpret_u32_f16(a);
}
-// CHECK: test_vreinterpret_u32_f32
+// CHECK-LABEL: test_vreinterpret_u32_f32
uint32x2_t test_vreinterpret_u32_f32(float32x2_t a) {
return vreinterpret_u32_f32(a);
}
-// CHECK: test_vreinterpret_u32_p8
+// CHECK-LABEL: test_vreinterpret_u32_p8
uint32x2_t test_vreinterpret_u32_p8(poly8x8_t a) {
return vreinterpret_u32_p8(a);
}
-// CHECK: test_vreinterpret_u32_p16
+// CHECK-LABEL: test_vreinterpret_u32_p16
uint32x2_t test_vreinterpret_u32_p16(poly16x4_t a) {
return vreinterpret_u32_p16(a);
}
-// CHECK: test_vreinterpret_u64_s8
+// CHECK-LABEL: test_vreinterpret_u64_s8
uint64x1_t test_vreinterpret_u64_s8(int8x8_t a) {
return vreinterpret_u64_s8(a);
}
-// CHECK: test_vreinterpret_u64_s16
+// CHECK-LABEL: test_vreinterpret_u64_s16
uint64x1_t test_vreinterpret_u64_s16(int16x4_t a) {
return vreinterpret_u64_s16(a);
}
-// CHECK: test_vreinterpret_u64_s32
+// CHECK-LABEL: test_vreinterpret_u64_s32
uint64x1_t test_vreinterpret_u64_s32(int32x2_t a) {
return vreinterpret_u64_s32(a);
}
-// CHECK: test_vreinterpret_u64_s64
+// CHECK-LABEL: test_vreinterpret_u64_s64
uint64x1_t test_vreinterpret_u64_s64(int64x1_t a) {
return vreinterpret_u64_s64(a);
}
-// CHECK: test_vreinterpret_u64_u8
+// CHECK-LABEL: test_vreinterpret_u64_u8
uint64x1_t test_vreinterpret_u64_u8(uint8x8_t a) {
return vreinterpret_u64_u8(a);
}
-// CHECK: test_vreinterpret_u64_u16
+// CHECK-LABEL: test_vreinterpret_u64_u16
uint64x1_t test_vreinterpret_u64_u16(uint16x4_t a) {
return vreinterpret_u64_u16(a);
}
-// CHECK: test_vreinterpret_u64_u32
+// CHECK-LABEL: test_vreinterpret_u64_u32
uint64x1_t test_vreinterpret_u64_u32(uint32x2_t a) {
return vreinterpret_u64_u32(a);
}
-// CHECK: test_vreinterpret_u64_f16
+// CHECK-LABEL: test_vreinterpret_u64_f16
uint64x1_t test_vreinterpret_u64_f16(float16x4_t a) {
return vreinterpret_u64_f16(a);
}
-// CHECK: test_vreinterpret_u64_f32
+// CHECK-LABEL: test_vreinterpret_u64_f32
uint64x1_t test_vreinterpret_u64_f32(float32x2_t a) {
return vreinterpret_u64_f32(a);
}
-// CHECK: test_vreinterpret_u64_p8
+// CHECK-LABEL: test_vreinterpret_u64_p8
uint64x1_t test_vreinterpret_u64_p8(poly8x8_t a) {
return vreinterpret_u64_p8(a);
}
-// CHECK: test_vreinterpret_u64_p16
+// CHECK-LABEL: test_vreinterpret_u64_p16
uint64x1_t test_vreinterpret_u64_p16(poly16x4_t a) {
return vreinterpret_u64_p16(a);
}
-// CHECK: test_vreinterpret_f16_s8
+// CHECK-LABEL: test_vreinterpret_f16_s8
float16x4_t test_vreinterpret_f16_s8(int8x8_t a) {
return vreinterpret_f16_s8(a);
}
-// CHECK: test_vreinterpret_f16_s16
+// CHECK-LABEL: test_vreinterpret_f16_s16
float16x4_t test_vreinterpret_f16_s16(int16x4_t a) {
return vreinterpret_f16_s16(a);
}
-// CHECK: test_vreinterpret_f16_s32
+// CHECK-LABEL: test_vreinterpret_f16_s32
float16x4_t test_vreinterpret_f16_s32(int32x2_t a) {
return vreinterpret_f16_s32(a);
}
-// CHECK: test_vreinterpret_f16_s64
+// CHECK-LABEL: test_vreinterpret_f16_s64
float16x4_t test_vreinterpret_f16_s64(int64x1_t a) {
return vreinterpret_f16_s64(a);
}
-// CHECK: test_vreinterpret_f16_u8
+// CHECK-LABEL: test_vreinterpret_f16_u8
float16x4_t test_vreinterpret_f16_u8(uint8x8_t a) {
return vreinterpret_f16_u8(a);
}
-// CHECK: test_vreinterpret_f16_u16
+// CHECK-LABEL: test_vreinterpret_f16_u16
float16x4_t test_vreinterpret_f16_u16(uint16x4_t a) {
return vreinterpret_f16_u16(a);
}
-// CHECK: test_vreinterpret_f16_u32
+// CHECK-LABEL: test_vreinterpret_f16_u32
float16x4_t test_vreinterpret_f16_u32(uint32x2_t a) {
return vreinterpret_f16_u32(a);
}
-// CHECK: test_vreinterpret_f16_u64
+// CHECK-LABEL: test_vreinterpret_f16_u64
float16x4_t test_vreinterpret_f16_u64(uint64x1_t a) {
return vreinterpret_f16_u64(a);
}
-// CHECK: test_vreinterpret_f16_f32
+// CHECK-LABEL: test_vreinterpret_f16_f32
float16x4_t test_vreinterpret_f16_f32(float32x2_t a) {
return vreinterpret_f16_f32(a);
}
-// CHECK: test_vreinterpret_f16_p8
+// CHECK-LABEL: test_vreinterpret_f16_p8
float16x4_t test_vreinterpret_f16_p8(poly8x8_t a) {
return vreinterpret_f16_p8(a);
}
-// CHECK: test_vreinterpret_f16_p16
+// CHECK-LABEL: test_vreinterpret_f16_p16
float16x4_t test_vreinterpret_f16_p16(poly16x4_t a) {
return vreinterpret_f16_p16(a);
}
-// CHECK: test_vreinterpret_f32_s8
+// CHECK-LABEL: test_vreinterpret_f32_s8
float32x2_t test_vreinterpret_f32_s8(int8x8_t a) {
return vreinterpret_f32_s8(a);
}
-// CHECK: test_vreinterpret_f32_s16
+// CHECK-LABEL: test_vreinterpret_f32_s16
float32x2_t test_vreinterpret_f32_s16(int16x4_t a) {
return vreinterpret_f32_s16(a);
}
-// CHECK: test_vreinterpret_f32_s32
+// CHECK-LABEL: test_vreinterpret_f32_s32
float32x2_t test_vreinterpret_f32_s32(int32x2_t a) {
return vreinterpret_f32_s32(a);
}
-// CHECK: test_vreinterpret_f32_s64
+// CHECK-LABEL: test_vreinterpret_f32_s64
float32x2_t test_vreinterpret_f32_s64(int64x1_t a) {
return vreinterpret_f32_s64(a);
}
-// CHECK: test_vreinterpret_f32_u8
+// CHECK-LABEL: test_vreinterpret_f32_u8
float32x2_t test_vreinterpret_f32_u8(uint8x8_t a) {
return vreinterpret_f32_u8(a);
}
-// CHECK: test_vreinterpret_f32_u16
+// CHECK-LABEL: test_vreinterpret_f32_u16
float32x2_t test_vreinterpret_f32_u16(uint16x4_t a) {
return vreinterpret_f32_u16(a);
}
-// CHECK: test_vreinterpret_f32_u32
+// CHECK-LABEL: test_vreinterpret_f32_u32
float32x2_t test_vreinterpret_f32_u32(uint32x2_t a) {
return vreinterpret_f32_u32(a);
}
-// CHECK: test_vreinterpret_f32_u64
+// CHECK-LABEL: test_vreinterpret_f32_u64
float32x2_t test_vreinterpret_f32_u64(uint64x1_t a) {
return vreinterpret_f32_u64(a);
}
-// CHECK: test_vreinterpret_f32_f16
+// CHECK-LABEL: test_vreinterpret_f32_f16
float32x2_t test_vreinterpret_f32_f16(float16x4_t a) {
return vreinterpret_f32_f16(a);
}
-// CHECK: test_vreinterpret_f32_p8
+// CHECK-LABEL: test_vreinterpret_f32_p8
float32x2_t test_vreinterpret_f32_p8(poly8x8_t a) {
return vreinterpret_f32_p8(a);
}
-// CHECK: test_vreinterpret_f32_p16
+// CHECK-LABEL: test_vreinterpret_f32_p16
float32x2_t test_vreinterpret_f32_p16(poly16x4_t a) {
return vreinterpret_f32_p16(a);
}
-// CHECK: test_vreinterpret_p8_s8
+// CHECK-LABEL: test_vreinterpret_p8_s8
poly8x8_t test_vreinterpret_p8_s8(int8x8_t a) {
return vreinterpret_p8_s8(a);
}
-// CHECK: test_vreinterpret_p8_s16
+// CHECK-LABEL: test_vreinterpret_p8_s16
poly8x8_t test_vreinterpret_p8_s16(int16x4_t a) {
return vreinterpret_p8_s16(a);
}
-// CHECK: test_vreinterpret_p8_s32
+// CHECK-LABEL: test_vreinterpret_p8_s32
poly8x8_t test_vreinterpret_p8_s32(int32x2_t a) {
return vreinterpret_p8_s32(a);
}
-// CHECK: test_vreinterpret_p8_s64
+// CHECK-LABEL: test_vreinterpret_p8_s64
poly8x8_t test_vreinterpret_p8_s64(int64x1_t a) {
return vreinterpret_p8_s64(a);
}
-// CHECK: test_vreinterpret_p8_u8
+// CHECK-LABEL: test_vreinterpret_p8_u8
poly8x8_t test_vreinterpret_p8_u8(uint8x8_t a) {
return vreinterpret_p8_u8(a);
}
-// CHECK: test_vreinterpret_p8_u16
+// CHECK-LABEL: test_vreinterpret_p8_u16
poly8x8_t test_vreinterpret_p8_u16(uint16x4_t a) {
return vreinterpret_p8_u16(a);
}
-// CHECK: test_vreinterpret_p8_u32
+// CHECK-LABEL: test_vreinterpret_p8_u32
poly8x8_t test_vreinterpret_p8_u32(uint32x2_t a) {
return vreinterpret_p8_u32(a);
}
-// CHECK: test_vreinterpret_p8_u64
+// CHECK-LABEL: test_vreinterpret_p8_u64
poly8x8_t test_vreinterpret_p8_u64(uint64x1_t a) {
return vreinterpret_p8_u64(a);
}
-// CHECK: test_vreinterpret_p8_f16
+// CHECK-LABEL: test_vreinterpret_p8_f16
poly8x8_t test_vreinterpret_p8_f16(float16x4_t a) {
return vreinterpret_p8_f16(a);
}
-// CHECK: test_vreinterpret_p8_f32
+// CHECK-LABEL: test_vreinterpret_p8_f32
poly8x8_t test_vreinterpret_p8_f32(float32x2_t a) {
return vreinterpret_p8_f32(a);
}
-// CHECK: test_vreinterpret_p8_p16
+// CHECK-LABEL: test_vreinterpret_p8_p16
poly8x8_t test_vreinterpret_p8_p16(poly16x4_t a) {
return vreinterpret_p8_p16(a);
}
-// CHECK: test_vreinterpret_p16_s8
+// CHECK-LABEL: test_vreinterpret_p16_s8
poly16x4_t test_vreinterpret_p16_s8(int8x8_t a) {
return vreinterpret_p16_s8(a);
}
-// CHECK: test_vreinterpret_p16_s16
+// CHECK-LABEL: test_vreinterpret_p16_s16
poly16x4_t test_vreinterpret_p16_s16(int16x4_t a) {
return vreinterpret_p16_s16(a);
}
-// CHECK: test_vreinterpret_p16_s32
+// CHECK-LABEL: test_vreinterpret_p16_s32
poly16x4_t test_vreinterpret_p16_s32(int32x2_t a) {
return vreinterpret_p16_s32(a);
}
-// CHECK: test_vreinterpret_p16_s64
+// CHECK-LABEL: test_vreinterpret_p16_s64
poly16x4_t test_vreinterpret_p16_s64(int64x1_t a) {
return vreinterpret_p16_s64(a);
}
-// CHECK: test_vreinterpret_p16_u8
+// CHECK-LABEL: test_vreinterpret_p16_u8
poly16x4_t test_vreinterpret_p16_u8(uint8x8_t a) {
return vreinterpret_p16_u8(a);
}
-// CHECK: test_vreinterpret_p16_u16
+// CHECK-LABEL: test_vreinterpret_p16_u16
poly16x4_t test_vreinterpret_p16_u16(uint16x4_t a) {
return vreinterpret_p16_u16(a);
}
-// CHECK: test_vreinterpret_p16_u32
+// CHECK-LABEL: test_vreinterpret_p16_u32
poly16x4_t test_vreinterpret_p16_u32(uint32x2_t a) {
return vreinterpret_p16_u32(a);
}
-// CHECK: test_vreinterpret_p16_u64
+// CHECK-LABEL: test_vreinterpret_p16_u64
poly16x4_t test_vreinterpret_p16_u64(uint64x1_t a) {
return vreinterpret_p16_u64(a);
}
-// CHECK: test_vreinterpret_p16_f16
+// CHECK-LABEL: test_vreinterpret_p16_f16
poly16x4_t test_vreinterpret_p16_f16(float16x4_t a) {
return vreinterpret_p16_f16(a);
}
-// CHECK: test_vreinterpret_p16_f32
+// CHECK-LABEL: test_vreinterpret_p16_f32
poly16x4_t test_vreinterpret_p16_f32(float32x2_t a) {
return vreinterpret_p16_f32(a);
}
-// CHECK: test_vreinterpret_p16_p8
+// CHECK-LABEL: test_vreinterpret_p16_p8
poly16x4_t test_vreinterpret_p16_p8(poly8x8_t a) {
return vreinterpret_p16_p8(a);
}
-// CHECK: test_vreinterpretq_s8_s16
+// CHECK-LABEL: test_vreinterpretq_s8_s16
int8x16_t test_vreinterpretq_s8_s16(int16x8_t a) {
return vreinterpretq_s8_s16(a);
}
-// CHECK: test_vreinterpretq_s8_s32
+// CHECK-LABEL: test_vreinterpretq_s8_s32
int8x16_t test_vreinterpretq_s8_s32(int32x4_t a) {
return vreinterpretq_s8_s32(a);
}
-// CHECK: test_vreinterpretq_s8_s64
+// CHECK-LABEL: test_vreinterpretq_s8_s64
int8x16_t test_vreinterpretq_s8_s64(int64x2_t a) {
return vreinterpretq_s8_s64(a);
}
-// CHECK: test_vreinterpretq_s8_u8
+// CHECK-LABEL: test_vreinterpretq_s8_u8
int8x16_t test_vreinterpretq_s8_u8(uint8x16_t a) {
return vreinterpretq_s8_u8(a);
}
-// CHECK: test_vreinterpretq_s8_u16
+// CHECK-LABEL: test_vreinterpretq_s8_u16
int8x16_t test_vreinterpretq_s8_u16(uint16x8_t a) {
return vreinterpretq_s8_u16(a);
}
-// CHECK: test_vreinterpretq_s8_u32
+// CHECK-LABEL: test_vreinterpretq_s8_u32
int8x16_t test_vreinterpretq_s8_u32(uint32x4_t a) {
return vreinterpretq_s8_u32(a);
}
-// CHECK: test_vreinterpretq_s8_u64
+// CHECK-LABEL: test_vreinterpretq_s8_u64
int8x16_t test_vreinterpretq_s8_u64(uint64x2_t a) {
return vreinterpretq_s8_u64(a);
}
-// CHECK: test_vreinterpretq_s8_f16
+// CHECK-LABEL: test_vreinterpretq_s8_f16
int8x16_t test_vreinterpretq_s8_f16(float16x8_t a) {
return vreinterpretq_s8_f16(a);
}
-// CHECK: test_vreinterpretq_s8_f32
+// CHECK-LABEL: test_vreinterpretq_s8_f32
int8x16_t test_vreinterpretq_s8_f32(float32x4_t a) {
return vreinterpretq_s8_f32(a);
}
-// CHECK: test_vreinterpretq_s8_p8
+// CHECK-LABEL: test_vreinterpretq_s8_p8
int8x16_t test_vreinterpretq_s8_p8(poly8x16_t a) {
return vreinterpretq_s8_p8(a);
}
-// CHECK: test_vreinterpretq_s8_p16
+// CHECK-LABEL: test_vreinterpretq_s8_p16
int8x16_t test_vreinterpretq_s8_p16(poly16x8_t a) {
return vreinterpretq_s8_p16(a);
}
-// CHECK: test_vreinterpretq_s16_s8
+// CHECK-LABEL: test_vreinterpretq_s16_s8
int16x8_t test_vreinterpretq_s16_s8(int8x16_t a) {
return vreinterpretq_s16_s8(a);
}
-// CHECK: test_vreinterpretq_s16_s32
+// CHECK-LABEL: test_vreinterpretq_s16_s32
int16x8_t test_vreinterpretq_s16_s32(int32x4_t a) {
return vreinterpretq_s16_s32(a);
}
-// CHECK: test_vreinterpretq_s16_s64
+// CHECK-LABEL: test_vreinterpretq_s16_s64
int16x8_t test_vreinterpretq_s16_s64(int64x2_t a) {
return vreinterpretq_s16_s64(a);
}
-// CHECK: test_vreinterpretq_s16_u8
+// CHECK-LABEL: test_vreinterpretq_s16_u8
int16x8_t test_vreinterpretq_s16_u8(uint8x16_t a) {
return vreinterpretq_s16_u8(a);
}
-// CHECK: test_vreinterpretq_s16_u16
+// CHECK-LABEL: test_vreinterpretq_s16_u16
int16x8_t test_vreinterpretq_s16_u16(uint16x8_t a) {
return vreinterpretq_s16_u16(a);
}
-// CHECK: test_vreinterpretq_s16_u32
+// CHECK-LABEL: test_vreinterpretq_s16_u32
int16x8_t test_vreinterpretq_s16_u32(uint32x4_t a) {
return vreinterpretq_s16_u32(a);
}
-// CHECK: test_vreinterpretq_s16_u64
+// CHECK-LABEL: test_vreinterpretq_s16_u64
int16x8_t test_vreinterpretq_s16_u64(uint64x2_t a) {
return vreinterpretq_s16_u64(a);
}
-// CHECK: test_vreinterpretq_s16_f16
+// CHECK-LABEL: test_vreinterpretq_s16_f16
int16x8_t test_vreinterpretq_s16_f16(float16x8_t a) {
return vreinterpretq_s16_f16(a);
}
-// CHECK: test_vreinterpretq_s16_f32
+// CHECK-LABEL: test_vreinterpretq_s16_f32
int16x8_t test_vreinterpretq_s16_f32(float32x4_t a) {
return vreinterpretq_s16_f32(a);
}
-// CHECK: test_vreinterpretq_s16_p8
+// CHECK-LABEL: test_vreinterpretq_s16_p8
int16x8_t test_vreinterpretq_s16_p8(poly8x16_t a) {
return vreinterpretq_s16_p8(a);
}
-// CHECK: test_vreinterpretq_s16_p16
+// CHECK-LABEL: test_vreinterpretq_s16_p16
int16x8_t test_vreinterpretq_s16_p16(poly16x8_t a) {
return vreinterpretq_s16_p16(a);
}
-// CHECK: test_vreinterpretq_s32_s8
+// CHECK-LABEL: test_vreinterpretq_s32_s8
int32x4_t test_vreinterpretq_s32_s8(int8x16_t a) {
return vreinterpretq_s32_s8(a);
}
-// CHECK: test_vreinterpretq_s32_s16
+// CHECK-LABEL: test_vreinterpretq_s32_s16
int32x4_t test_vreinterpretq_s32_s16(int16x8_t a) {
return vreinterpretq_s32_s16(a);
}
-// CHECK: test_vreinterpretq_s32_s64
+// CHECK-LABEL: test_vreinterpretq_s32_s64
int32x4_t test_vreinterpretq_s32_s64(int64x2_t a) {
return vreinterpretq_s32_s64(a);
}
-// CHECK: test_vreinterpretq_s32_u8
+// CHECK-LABEL: test_vreinterpretq_s32_u8
int32x4_t test_vreinterpretq_s32_u8(uint8x16_t a) {
return vreinterpretq_s32_u8(a);
}
-// CHECK: test_vreinterpretq_s32_u16
+// CHECK-LABEL: test_vreinterpretq_s32_u16
int32x4_t test_vreinterpretq_s32_u16(uint16x8_t a) {
return vreinterpretq_s32_u16(a);
}
-// CHECK: test_vreinterpretq_s32_u32
+// CHECK-LABEL: test_vreinterpretq_s32_u32
int32x4_t test_vreinterpretq_s32_u32(uint32x4_t a) {
return vreinterpretq_s32_u32(a);
}
-// CHECK: test_vreinterpretq_s32_u64
+// CHECK-LABEL: test_vreinterpretq_s32_u64
int32x4_t test_vreinterpretq_s32_u64(uint64x2_t a) {
return vreinterpretq_s32_u64(a);
}
-// CHECK: test_vreinterpretq_s32_f16
+// CHECK-LABEL: test_vreinterpretq_s32_f16
int32x4_t test_vreinterpretq_s32_f16(float16x8_t a) {
return vreinterpretq_s32_f16(a);
}
-// CHECK: test_vreinterpretq_s32_f32
+// CHECK-LABEL: test_vreinterpretq_s32_f32
int32x4_t test_vreinterpretq_s32_f32(float32x4_t a) {
return vreinterpretq_s32_f32(a);
}
-// CHECK: test_vreinterpretq_s32_p8
+// CHECK-LABEL: test_vreinterpretq_s32_p8
int32x4_t test_vreinterpretq_s32_p8(poly8x16_t a) {
return vreinterpretq_s32_p8(a);
}
-// CHECK: test_vreinterpretq_s32_p16
+// CHECK-LABEL: test_vreinterpretq_s32_p16
int32x4_t test_vreinterpretq_s32_p16(poly16x8_t a) {
return vreinterpretq_s32_p16(a);
}
-// CHECK: test_vreinterpretq_s64_s8
+// CHECK-LABEL: test_vreinterpretq_s64_s8
int64x2_t test_vreinterpretq_s64_s8(int8x16_t a) {
return vreinterpretq_s64_s8(a);
}
-// CHECK: test_vreinterpretq_s64_s16
+// CHECK-LABEL: test_vreinterpretq_s64_s16
int64x2_t test_vreinterpretq_s64_s16(int16x8_t a) {
return vreinterpretq_s64_s16(a);
}
-// CHECK: test_vreinterpretq_s64_s32
+// CHECK-LABEL: test_vreinterpretq_s64_s32
int64x2_t test_vreinterpretq_s64_s32(int32x4_t a) {
return vreinterpretq_s64_s32(a);
}
-// CHECK: test_vreinterpretq_s64_u8
+// CHECK-LABEL: test_vreinterpretq_s64_u8
int64x2_t test_vreinterpretq_s64_u8(uint8x16_t a) {
return vreinterpretq_s64_u8(a);
}
-// CHECK: test_vreinterpretq_s64_u16
+// CHECK-LABEL: test_vreinterpretq_s64_u16
int64x2_t test_vreinterpretq_s64_u16(uint16x8_t a) {
return vreinterpretq_s64_u16(a);
}
-// CHECK: test_vreinterpretq_s64_u32
+// CHECK-LABEL: test_vreinterpretq_s64_u32
int64x2_t test_vreinterpretq_s64_u32(uint32x4_t a) {
return vreinterpretq_s64_u32(a);
}
-// CHECK: test_vreinterpretq_s64_u64
+// CHECK-LABEL: test_vreinterpretq_s64_u64
int64x2_t test_vreinterpretq_s64_u64(uint64x2_t a) {
return vreinterpretq_s64_u64(a);
}
-// CHECK: test_vreinterpretq_s64_f16
+// CHECK-LABEL: test_vreinterpretq_s64_f16
int64x2_t test_vreinterpretq_s64_f16(float16x8_t a) {
return vreinterpretq_s64_f16(a);
}
-// CHECK: test_vreinterpretq_s64_f32
+// CHECK-LABEL: test_vreinterpretq_s64_f32
int64x2_t test_vreinterpretq_s64_f32(float32x4_t a) {
return vreinterpretq_s64_f32(a);
}
-// CHECK: test_vreinterpretq_s64_p8
+// CHECK-LABEL: test_vreinterpretq_s64_p8
int64x2_t test_vreinterpretq_s64_p8(poly8x16_t a) {
return vreinterpretq_s64_p8(a);
}
-// CHECK: test_vreinterpretq_s64_p16
+// CHECK-LABEL: test_vreinterpretq_s64_p16
int64x2_t test_vreinterpretq_s64_p16(poly16x8_t a) {
return vreinterpretq_s64_p16(a);
}
-// CHECK: test_vreinterpretq_u8_s8
+// CHECK-LABEL: test_vreinterpretq_u8_s8
uint8x16_t test_vreinterpretq_u8_s8(int8x16_t a) {
return vreinterpretq_u8_s8(a);
}
-// CHECK: test_vreinterpretq_u8_s16
+// CHECK-LABEL: test_vreinterpretq_u8_s16
uint8x16_t test_vreinterpretq_u8_s16(int16x8_t a) {
return vreinterpretq_u8_s16(a);
}
-// CHECK: test_vreinterpretq_u8_s32
+// CHECK-LABEL: test_vreinterpretq_u8_s32
uint8x16_t test_vreinterpretq_u8_s32(int32x4_t a) {
return vreinterpretq_u8_s32(a);
}
-// CHECK: test_vreinterpretq_u8_s64
+// CHECK-LABEL: test_vreinterpretq_u8_s64
uint8x16_t test_vreinterpretq_u8_s64(int64x2_t a) {
return vreinterpretq_u8_s64(a);
}
-// CHECK: test_vreinterpretq_u8_u16
+// CHECK-LABEL: test_vreinterpretq_u8_u16
uint8x16_t test_vreinterpretq_u8_u16(uint16x8_t a) {
return vreinterpretq_u8_u16(a);
}
-// CHECK: test_vreinterpretq_u8_u32
+// CHECK-LABEL: test_vreinterpretq_u8_u32
uint8x16_t test_vreinterpretq_u8_u32(uint32x4_t a) {
return vreinterpretq_u8_u32(a);
}
-// CHECK: test_vreinterpretq_u8_u64
+// CHECK-LABEL: test_vreinterpretq_u8_u64
uint8x16_t test_vreinterpretq_u8_u64(uint64x2_t a) {
return vreinterpretq_u8_u64(a);
}
-// CHECK: test_vreinterpretq_u8_f16
+// CHECK-LABEL: test_vreinterpretq_u8_f16
uint8x16_t test_vreinterpretq_u8_f16(float16x8_t a) {
return vreinterpretq_u8_f16(a);
}
-// CHECK: test_vreinterpretq_u8_f32
+// CHECK-LABEL: test_vreinterpretq_u8_f32
uint8x16_t test_vreinterpretq_u8_f32(float32x4_t a) {
return vreinterpretq_u8_f32(a);
}
-// CHECK: test_vreinterpretq_u8_p8
+// CHECK-LABEL: test_vreinterpretq_u8_p8
uint8x16_t test_vreinterpretq_u8_p8(poly8x16_t a) {
return vreinterpretq_u8_p8(a);
}
-// CHECK: test_vreinterpretq_u8_p16
+// CHECK-LABEL: test_vreinterpretq_u8_p16
uint8x16_t test_vreinterpretq_u8_p16(poly16x8_t a) {
return vreinterpretq_u8_p16(a);
}
-// CHECK: test_vreinterpretq_u16_s8
+// CHECK-LABEL: test_vreinterpretq_u16_s8
uint16x8_t test_vreinterpretq_u16_s8(int8x16_t a) {
return vreinterpretq_u16_s8(a);
}
-// CHECK: test_vreinterpretq_u16_s16
+// CHECK-LABEL: test_vreinterpretq_u16_s16
uint16x8_t test_vreinterpretq_u16_s16(int16x8_t a) {
return vreinterpretq_u16_s16(a);
}
-// CHECK: test_vreinterpretq_u16_s32
+// CHECK-LABEL: test_vreinterpretq_u16_s32
uint16x8_t test_vreinterpretq_u16_s32(int32x4_t a) {
return vreinterpretq_u16_s32(a);
}
-// CHECK: test_vreinterpretq_u16_s64
+// CHECK-LABEL: test_vreinterpretq_u16_s64
uint16x8_t test_vreinterpretq_u16_s64(int64x2_t a) {
return vreinterpretq_u16_s64(a);
}
-// CHECK: test_vreinterpretq_u16_u8
+// CHECK-LABEL: test_vreinterpretq_u16_u8
uint16x8_t test_vreinterpretq_u16_u8(uint8x16_t a) {
return vreinterpretq_u16_u8(a);
}
-// CHECK: test_vreinterpretq_u16_u32
+// CHECK-LABEL: test_vreinterpretq_u16_u32
uint16x8_t test_vreinterpretq_u16_u32(uint32x4_t a) {
return vreinterpretq_u16_u32(a);
}
-// CHECK: test_vreinterpretq_u16_u64
+// CHECK-LABEL: test_vreinterpretq_u16_u64
uint16x8_t test_vreinterpretq_u16_u64(uint64x2_t a) {
return vreinterpretq_u16_u64(a);
}
-// CHECK: test_vreinterpretq_u16_f16
+// CHECK-LABEL: test_vreinterpretq_u16_f16
uint16x8_t test_vreinterpretq_u16_f16(float16x8_t a) {
return vreinterpretq_u16_f16(a);
}
-// CHECK: test_vreinterpretq_u16_f32
+// CHECK-LABEL: test_vreinterpretq_u16_f32
uint16x8_t test_vreinterpretq_u16_f32(float32x4_t a) {
return vreinterpretq_u16_f32(a);
}
-// CHECK: test_vreinterpretq_u16_p8
+// CHECK-LABEL: test_vreinterpretq_u16_p8
uint16x8_t test_vreinterpretq_u16_p8(poly8x16_t a) {
return vreinterpretq_u16_p8(a);
}
-// CHECK: test_vreinterpretq_u16_p16
+// CHECK-LABEL: test_vreinterpretq_u16_p16
uint16x8_t test_vreinterpretq_u16_p16(poly16x8_t a) {
return vreinterpretq_u16_p16(a);
}
-// CHECK: test_vreinterpretq_u32_s8
+// CHECK-LABEL: test_vreinterpretq_u32_s8
uint32x4_t test_vreinterpretq_u32_s8(int8x16_t a) {
return vreinterpretq_u32_s8(a);
}
-// CHECK: test_vreinterpretq_u32_s16
+// CHECK-LABEL: test_vreinterpretq_u32_s16
uint32x4_t test_vreinterpretq_u32_s16(int16x8_t a) {
return vreinterpretq_u32_s16(a);
}
-// CHECK: test_vreinterpretq_u32_s32
+// CHECK-LABEL: test_vreinterpretq_u32_s32
uint32x4_t test_vreinterpretq_u32_s32(int32x4_t a) {
return vreinterpretq_u32_s32(a);
}
-// CHECK: test_vreinterpretq_u32_s64
+// CHECK-LABEL: test_vreinterpretq_u32_s64
uint32x4_t test_vreinterpretq_u32_s64(int64x2_t a) {
return vreinterpretq_u32_s64(a);
}
-// CHECK: test_vreinterpretq_u32_u8
+// CHECK-LABEL: test_vreinterpretq_u32_u8
uint32x4_t test_vreinterpretq_u32_u8(uint8x16_t a) {
return vreinterpretq_u32_u8(a);
}
-// CHECK: test_vreinterpretq_u32_u16
+// CHECK-LABEL: test_vreinterpretq_u32_u16
uint32x4_t test_vreinterpretq_u32_u16(uint16x8_t a) {
return vreinterpretq_u32_u16(a);
}
-// CHECK: test_vreinterpretq_u32_u64
+// CHECK-LABEL: test_vreinterpretq_u32_u64
uint32x4_t test_vreinterpretq_u32_u64(uint64x2_t a) {
return vreinterpretq_u32_u64(a);
}
-// CHECK: test_vreinterpretq_u32_f16
+// CHECK-LABEL: test_vreinterpretq_u32_f16
uint32x4_t test_vreinterpretq_u32_f16(float16x8_t a) {
return vreinterpretq_u32_f16(a);
}
-// CHECK: test_vreinterpretq_u32_f32
+// CHECK-LABEL: test_vreinterpretq_u32_f32
uint32x4_t test_vreinterpretq_u32_f32(float32x4_t a) {
return vreinterpretq_u32_f32(a);
}
-// CHECK: test_vreinterpretq_u32_p8
+// CHECK-LABEL: test_vreinterpretq_u32_p8
uint32x4_t test_vreinterpretq_u32_p8(poly8x16_t a) {
return vreinterpretq_u32_p8(a);
}
-// CHECK: test_vreinterpretq_u32_p16
+// CHECK-LABEL: test_vreinterpretq_u32_p16
uint32x4_t test_vreinterpretq_u32_p16(poly16x8_t a) {
return vreinterpretq_u32_p16(a);
}
-// CHECK: test_vreinterpretq_u64_s8
+// CHECK-LABEL: test_vreinterpretq_u64_s8
uint64x2_t test_vreinterpretq_u64_s8(int8x16_t a) {
return vreinterpretq_u64_s8(a);
}
-// CHECK: test_vreinterpretq_u64_s16
+// CHECK-LABEL: test_vreinterpretq_u64_s16
uint64x2_t test_vreinterpretq_u64_s16(int16x8_t a) {
return vreinterpretq_u64_s16(a);
}
-// CHECK: test_vreinterpretq_u64_s32
+// CHECK-LABEL: test_vreinterpretq_u64_s32
uint64x2_t test_vreinterpretq_u64_s32(int32x4_t a) {
return vreinterpretq_u64_s32(a);
}
-// CHECK: test_vreinterpretq_u64_s64
+// CHECK-LABEL: test_vreinterpretq_u64_s64
uint64x2_t test_vreinterpretq_u64_s64(int64x2_t a) {
return vreinterpretq_u64_s64(a);
}
-// CHECK: test_vreinterpretq_u64_u8
+// CHECK-LABEL: test_vreinterpretq_u64_u8
uint64x2_t test_vreinterpretq_u64_u8(uint8x16_t a) {
return vreinterpretq_u64_u8(a);
}
-// CHECK: test_vreinterpretq_u64_u16
+// CHECK-LABEL: test_vreinterpretq_u64_u16
uint64x2_t test_vreinterpretq_u64_u16(uint16x8_t a) {
return vreinterpretq_u64_u16(a);
}
-// CHECK: test_vreinterpretq_u64_u32
+// CHECK-LABEL: test_vreinterpretq_u64_u32
uint64x2_t test_vreinterpretq_u64_u32(uint32x4_t a) {
return vreinterpretq_u64_u32(a);
}
-// CHECK: test_vreinterpretq_u64_f16
+// CHECK-LABEL: test_vreinterpretq_u64_f16
uint64x2_t test_vreinterpretq_u64_f16(float16x8_t a) {
return vreinterpretq_u64_f16(a);
}
-// CHECK: test_vreinterpretq_u64_f32
+// CHECK-LABEL: test_vreinterpretq_u64_f32
uint64x2_t test_vreinterpretq_u64_f32(float32x4_t a) {
return vreinterpretq_u64_f32(a);
}
-// CHECK: test_vreinterpretq_u64_p8
+// CHECK-LABEL: test_vreinterpretq_u64_p8
uint64x2_t test_vreinterpretq_u64_p8(poly8x16_t a) {
return vreinterpretq_u64_p8(a);
}
-// CHECK: test_vreinterpretq_u64_p16
+// CHECK-LABEL: test_vreinterpretq_u64_p16
uint64x2_t test_vreinterpretq_u64_p16(poly16x8_t a) {
return vreinterpretq_u64_p16(a);
}
-// CHECK: test_vreinterpretq_f16_s8
+// CHECK-LABEL: test_vreinterpretq_f16_s8
float16x8_t test_vreinterpretq_f16_s8(int8x16_t a) {
return vreinterpretq_f16_s8(a);
}
-// CHECK: test_vreinterpretq_f16_s16
+// CHECK-LABEL: test_vreinterpretq_f16_s16
float16x8_t test_vreinterpretq_f16_s16(int16x8_t a) {
return vreinterpretq_f16_s16(a);
}
-// CHECK: test_vreinterpretq_f16_s32
+// CHECK-LABEL: test_vreinterpretq_f16_s32
float16x8_t test_vreinterpretq_f16_s32(int32x4_t a) {
return vreinterpretq_f16_s32(a);
}
-// CHECK: test_vreinterpretq_f16_s64
+// CHECK-LABEL: test_vreinterpretq_f16_s64
float16x8_t test_vreinterpretq_f16_s64(int64x2_t a) {
return vreinterpretq_f16_s64(a);
}
-// CHECK: test_vreinterpretq_f16_u8
+// CHECK-LABEL: test_vreinterpretq_f16_u8
float16x8_t test_vreinterpretq_f16_u8(uint8x16_t a) {
return vreinterpretq_f16_u8(a);
}
-// CHECK: test_vreinterpretq_f16_u16
+// CHECK-LABEL: test_vreinterpretq_f16_u16
float16x8_t test_vreinterpretq_f16_u16(uint16x8_t a) {
return vreinterpretq_f16_u16(a);
}
-// CHECK: test_vreinterpretq_f16_u32
+// CHECK-LABEL: test_vreinterpretq_f16_u32
float16x8_t test_vreinterpretq_f16_u32(uint32x4_t a) {
return vreinterpretq_f16_u32(a);
}
-// CHECK: test_vreinterpretq_f16_u64
+// CHECK-LABEL: test_vreinterpretq_f16_u64
float16x8_t test_vreinterpretq_f16_u64(uint64x2_t a) {
return vreinterpretq_f16_u64(a);
}
-// CHECK: test_vreinterpretq_f16_f32
+// CHECK-LABEL: test_vreinterpretq_f16_f32
float16x8_t test_vreinterpretq_f16_f32(float32x4_t a) {
return vreinterpretq_f16_f32(a);
}
-// CHECK: test_vreinterpretq_f16_p8
+// CHECK-LABEL: test_vreinterpretq_f16_p8
float16x8_t test_vreinterpretq_f16_p8(poly8x16_t a) {
return vreinterpretq_f16_p8(a);
}
-// CHECK: test_vreinterpretq_f16_p16
+// CHECK-LABEL: test_vreinterpretq_f16_p16
float16x8_t test_vreinterpretq_f16_p16(poly16x8_t a) {
return vreinterpretq_f16_p16(a);
}
-// CHECK: test_vreinterpretq_f32_s8
+// CHECK-LABEL: test_vreinterpretq_f32_s8
float32x4_t test_vreinterpretq_f32_s8(int8x16_t a) {
return vreinterpretq_f32_s8(a);
}
-// CHECK: test_vreinterpretq_f32_s16
+// CHECK-LABEL: test_vreinterpretq_f32_s16
float32x4_t test_vreinterpretq_f32_s16(int16x8_t a) {
return vreinterpretq_f32_s16(a);
}
-// CHECK: test_vreinterpretq_f32_s32
+// CHECK-LABEL: test_vreinterpretq_f32_s32
float32x4_t test_vreinterpretq_f32_s32(int32x4_t a) {
return vreinterpretq_f32_s32(a);
}
-// CHECK: test_vreinterpretq_f32_s64
+// CHECK-LABEL: test_vreinterpretq_f32_s64
float32x4_t test_vreinterpretq_f32_s64(int64x2_t a) {
return vreinterpretq_f32_s64(a);
}
-// CHECK: test_vreinterpretq_f32_u8
+// CHECK-LABEL: test_vreinterpretq_f32_u8
float32x4_t test_vreinterpretq_f32_u8(uint8x16_t a) {
return vreinterpretq_f32_u8(a);
}
-// CHECK: test_vreinterpretq_f32_u16
+// CHECK-LABEL: test_vreinterpretq_f32_u16
float32x4_t test_vreinterpretq_f32_u16(uint16x8_t a) {
return vreinterpretq_f32_u16(a);
}
-// CHECK: test_vreinterpretq_f32_u32
+// CHECK-LABEL: test_vreinterpretq_f32_u32
float32x4_t test_vreinterpretq_f32_u32(uint32x4_t a) {
return vreinterpretq_f32_u32(a);
}
-// CHECK: test_vreinterpretq_f32_u64
+// CHECK-LABEL: test_vreinterpretq_f32_u64
float32x4_t test_vreinterpretq_f32_u64(uint64x2_t a) {
return vreinterpretq_f32_u64(a);
}
-// CHECK: test_vreinterpretq_f32_f16
+// CHECK-LABEL: test_vreinterpretq_f32_f16
float32x4_t test_vreinterpretq_f32_f16(float16x8_t a) {
return vreinterpretq_f32_f16(a);
}
-// CHECK: test_vreinterpretq_f32_p8
+// CHECK-LABEL: test_vreinterpretq_f32_p8
float32x4_t test_vreinterpretq_f32_p8(poly8x16_t a) {
return vreinterpretq_f32_p8(a);
}
-// CHECK: test_vreinterpretq_f32_p16
+// CHECK-LABEL: test_vreinterpretq_f32_p16
float32x4_t test_vreinterpretq_f32_p16(poly16x8_t a) {
return vreinterpretq_f32_p16(a);
}
-// CHECK: test_vreinterpretq_p8_s8
+// CHECK-LABEL: test_vreinterpretq_p8_s8
poly8x16_t test_vreinterpretq_p8_s8(int8x16_t a) {
return vreinterpretq_p8_s8(a);
}
-// CHECK: test_vreinterpretq_p8_s16
+// CHECK-LABEL: test_vreinterpretq_p8_s16
poly8x16_t test_vreinterpretq_p8_s16(int16x8_t a) {
return vreinterpretq_p8_s16(a);
}
-// CHECK: test_vreinterpretq_p8_s32
+// CHECK-LABEL: test_vreinterpretq_p8_s32
poly8x16_t test_vreinterpretq_p8_s32(int32x4_t a) {
return vreinterpretq_p8_s32(a);
}
-// CHECK: test_vreinterpretq_p8_s64
+// CHECK-LABEL: test_vreinterpretq_p8_s64
poly8x16_t test_vreinterpretq_p8_s64(int64x2_t a) {
return vreinterpretq_p8_s64(a);
}
-// CHECK: test_vreinterpretq_p8_u8
+// CHECK-LABEL: test_vreinterpretq_p8_u8
poly8x16_t test_vreinterpretq_p8_u8(uint8x16_t a) {
return vreinterpretq_p8_u8(a);
}
-// CHECK: test_vreinterpretq_p8_u16
+// CHECK-LABEL: test_vreinterpretq_p8_u16
poly8x16_t test_vreinterpretq_p8_u16(uint16x8_t a) {
return vreinterpretq_p8_u16(a);
}
-// CHECK: test_vreinterpretq_p8_u32
+// CHECK-LABEL: test_vreinterpretq_p8_u32
poly8x16_t test_vreinterpretq_p8_u32(uint32x4_t a) {
return vreinterpretq_p8_u32(a);
}
-// CHECK: test_vreinterpretq_p8_u64
+// CHECK-LABEL: test_vreinterpretq_p8_u64
poly8x16_t test_vreinterpretq_p8_u64(uint64x2_t a) {
return vreinterpretq_p8_u64(a);
}
-// CHECK: test_vreinterpretq_p8_f16
+// CHECK-LABEL: test_vreinterpretq_p8_f16
poly8x16_t test_vreinterpretq_p8_f16(float16x8_t a) {
return vreinterpretq_p8_f16(a);
}
-// CHECK: test_vreinterpretq_p8_f32
+// CHECK-LABEL: test_vreinterpretq_p8_f32
poly8x16_t test_vreinterpretq_p8_f32(float32x4_t a) {
return vreinterpretq_p8_f32(a);
}
-// CHECK: test_vreinterpretq_p8_p16
+// CHECK-LABEL: test_vreinterpretq_p8_p16
poly8x16_t test_vreinterpretq_p8_p16(poly16x8_t a) {
return vreinterpretq_p8_p16(a);
}
-// CHECK: test_vreinterpretq_p16_s8
+// CHECK-LABEL: test_vreinterpretq_p16_s8
poly16x8_t test_vreinterpretq_p16_s8(int8x16_t a) {
return vreinterpretq_p16_s8(a);
}
-// CHECK: test_vreinterpretq_p16_s16
+// CHECK-LABEL: test_vreinterpretq_p16_s16
poly16x8_t test_vreinterpretq_p16_s16(int16x8_t a) {
return vreinterpretq_p16_s16(a);
}
-// CHECK: test_vreinterpretq_p16_s32
+// CHECK-LABEL: test_vreinterpretq_p16_s32
poly16x8_t test_vreinterpretq_p16_s32(int32x4_t a) {
return vreinterpretq_p16_s32(a);
}
-// CHECK: test_vreinterpretq_p16_s64
+// CHECK-LABEL: test_vreinterpretq_p16_s64
poly16x8_t test_vreinterpretq_p16_s64(int64x2_t a) {
return vreinterpretq_p16_s64(a);
}
-// CHECK: test_vreinterpretq_p16_u8
+// CHECK-LABEL: test_vreinterpretq_p16_u8
poly16x8_t test_vreinterpretq_p16_u8(uint8x16_t a) {
return vreinterpretq_p16_u8(a);
}
-// CHECK: test_vreinterpretq_p16_u16
+// CHECK-LABEL: test_vreinterpretq_p16_u16
poly16x8_t test_vreinterpretq_p16_u16(uint16x8_t a) {
return vreinterpretq_p16_u16(a);
}
-// CHECK: test_vreinterpretq_p16_u32
+// CHECK-LABEL: test_vreinterpretq_p16_u32
poly16x8_t test_vreinterpretq_p16_u32(uint32x4_t a) {
return vreinterpretq_p16_u32(a);
}
-// CHECK: test_vreinterpretq_p16_u64
+// CHECK-LABEL: test_vreinterpretq_p16_u64
poly16x8_t test_vreinterpretq_p16_u64(uint64x2_t a) {
return vreinterpretq_p16_u64(a);
}
-// CHECK: test_vreinterpretq_p16_f16
+// CHECK-LABEL: test_vreinterpretq_p16_f16
poly16x8_t test_vreinterpretq_p16_f16(float16x8_t a) {
return vreinterpretq_p16_f16(a);
}
-// CHECK: test_vreinterpretq_p16_f32
+// CHECK-LABEL: test_vreinterpretq_p16_f32
poly16x8_t test_vreinterpretq_p16_f32(float32x4_t a) {
return vreinterpretq_p16_f32(a);
}
-// CHECK: test_vreinterpretq_p16_p8
+// CHECK-LABEL: test_vreinterpretq_p16_p8
poly16x8_t test_vreinterpretq_p16_p8(poly8x16_t a) {
return vreinterpretq_p16_p8(a);
}
-// CHECK: test_vrev16_s8
+// CHECK-LABEL: test_vrev16_s8
// CHECK: vrev16.8 d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vrev16_s8(int8x8_t a) {
return vrev16_s8(a);
}
-// CHECK: test_vrev16_u8
+// CHECK-LABEL: test_vrev16_u8
// CHECK: vrev16.8 d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vrev16_u8(uint8x8_t a) {
return vrev16_u8(a);
}
-// CHECK: test_vrev16_p8
+// CHECK-LABEL: test_vrev16_p8
// CHECK: vrev16.8 d{{[0-9]+}}, d{{[0-9]+}}
poly8x8_t test_vrev16_p8(poly8x8_t a) {
return vrev16_p8(a);
}
-// CHECK: test_vrev16q_s8
+// CHECK-LABEL: test_vrev16q_s8
// CHECK: vrev16.8 q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vrev16q_s8(int8x16_t a) {
return vrev16q_s8(a);
}
-// CHECK: test_vrev16q_u8
+// CHECK-LABEL: test_vrev16q_u8
// CHECK: vrev16.8 q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vrev16q_u8(uint8x16_t a) {
return vrev16q_u8(a);
}
-// CHECK: test_vrev16q_p8
+// CHECK-LABEL: test_vrev16q_p8
// CHECK: vrev16.8 q{{[0-9]+}}, q{{[0-9]+}}
poly8x16_t test_vrev16q_p8(poly8x16_t a) {
return vrev16q_p8(a);
}
-// CHECK: test_vrev32_s8
+// CHECK-LABEL: test_vrev32_s8
// CHECK: vrev32.8 d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vrev32_s8(int8x8_t a) {
return vrev32_s8(a);
}
-// CHECK: test_vrev32_s16
+// CHECK-LABEL: test_vrev32_s16
// CHECK: vrev32.16 d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vrev32_s16(int16x4_t a) {
return vrev32_s16(a);
}
-// CHECK: test_vrev32_u8
+// CHECK-LABEL: test_vrev32_u8
// CHECK: vrev32.8 d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vrev32_u8(uint8x8_t a) {
return vrev32_u8(a);
}
-// CHECK: test_vrev32_u16
+// CHECK-LABEL: test_vrev32_u16
// CHECK: vrev32.16 d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vrev32_u16(uint16x4_t a) {
return vrev32_u16(a);
}
-// CHECK: test_vrev32_p8
+// CHECK-LABEL: test_vrev32_p8
// CHECK: vrev32.8 d{{[0-9]+}}, d{{[0-9]+}}
poly8x8_t test_vrev32_p8(poly8x8_t a) {
return vrev32_p8(a);
}
-// CHECK: test_vrev32_p16
+// CHECK-LABEL: test_vrev32_p16
// CHECK: vrev32.16 d{{[0-9]+}}, d{{[0-9]+}}
poly16x4_t test_vrev32_p16(poly16x4_t a) {
return vrev32_p16(a);
}
-// CHECK: test_vrev32q_s8
+// CHECK-LABEL: test_vrev32q_s8
// CHECK: vrev32.8 q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vrev32q_s8(int8x16_t a) {
return vrev32q_s8(a);
}
-// CHECK: test_vrev32q_s16
+// CHECK-LABEL: test_vrev32q_s16
// CHECK: vrev32.16 q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vrev32q_s16(int16x8_t a) {
return vrev32q_s16(a);
}
-// CHECK: test_vrev32q_u8
+// CHECK-LABEL: test_vrev32q_u8
// CHECK: vrev32.8 q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vrev32q_u8(uint8x16_t a) {
return vrev32q_u8(a);
}
-// CHECK: test_vrev32q_u16
+// CHECK-LABEL: test_vrev32q_u16
// CHECK: vrev32.16 q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vrev32q_u16(uint16x8_t a) {
return vrev32q_u16(a);
}
-// CHECK: test_vrev32q_p8
+// CHECK-LABEL: test_vrev32q_p8
// CHECK: vrev32.8 q{{[0-9]+}}, q{{[0-9]+}}
poly8x16_t test_vrev32q_p8(poly8x16_t a) {
return vrev32q_p8(a);
}
-// CHECK: test_vrev32q_p16
+// CHECK-LABEL: test_vrev32q_p16
// CHECK: vrev32.16 q{{[0-9]+}}, q{{[0-9]+}}
poly16x8_t test_vrev32q_p16(poly16x8_t a) {
return vrev32q_p16(a);
}
-// CHECK: test_vrev64_s8
+// CHECK-LABEL: test_vrev64_s8
// CHECK: vrev64.8 d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vrev64_s8(int8x8_t a) {
return vrev64_s8(a);
}
-// CHECK: test_vrev64_s16
+// CHECK-LABEL: test_vrev64_s16
// CHECK: vrev64.16 d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vrev64_s16(int16x4_t a) {
return vrev64_s16(a);
}
-// CHECK: test_vrev64_s32
+// CHECK-LABEL: test_vrev64_s32
// CHECK: vrev64.32 d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vrev64_s32(int32x2_t a) {
return vrev64_s32(a);
}
-// CHECK: test_vrev64_u8
+// CHECK-LABEL: test_vrev64_u8
// CHECK: vrev64.8 d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vrev64_u8(uint8x8_t a) {
return vrev64_u8(a);
}
-// CHECK: test_vrev64_u16
+// CHECK-LABEL: test_vrev64_u16
// CHECK: vrev64.16 d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vrev64_u16(uint16x4_t a) {
return vrev64_u16(a);
}
-// CHECK: test_vrev64_u32
+// CHECK-LABEL: test_vrev64_u32
// CHECK: vrev64.32 d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vrev64_u32(uint32x2_t a) {
return vrev64_u32(a);
}
-// CHECK: test_vrev64_p8
+// CHECK-LABEL: test_vrev64_p8
// CHECK: vrev64.8 d{{[0-9]+}}, d{{[0-9]+}}
poly8x8_t test_vrev64_p8(poly8x8_t a) {
return vrev64_p8(a);
}
-// CHECK: test_vrev64_p16
+// CHECK-LABEL: test_vrev64_p16
// CHECK: vrev64.16 d{{[0-9]+}}, d{{[0-9]+}}
poly16x4_t test_vrev64_p16(poly16x4_t a) {
return vrev64_p16(a);
}
-// CHECK: test_vrev64_f32
+// CHECK-LABEL: test_vrev64_f32
// CHECK: vrev64.32 d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vrev64_f32(float32x2_t a) {
return vrev64_f32(a);
}
-// CHECK: test_vrev64q_s8
+// CHECK-LABEL: test_vrev64q_s8
// CHECK: vrev64.8 q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vrev64q_s8(int8x16_t a) {
return vrev64q_s8(a);
}
-// CHECK: test_vrev64q_s16
+// CHECK-LABEL: test_vrev64q_s16
// CHECK: vrev64.16 q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vrev64q_s16(int16x8_t a) {
return vrev64q_s16(a);
}
-// CHECK: test_vrev64q_s32
+// CHECK-LABEL: test_vrev64q_s32
// CHECK: vrev64.32 q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vrev64q_s32(int32x4_t a) {
return vrev64q_s32(a);
}
-// CHECK: test_vrev64q_u8
+// CHECK-LABEL: test_vrev64q_u8
// CHECK: vrev64.8 q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vrev64q_u8(uint8x16_t a) {
return vrev64q_u8(a);
}
-// CHECK: test_vrev64q_u16
+// CHECK-LABEL: test_vrev64q_u16
// CHECK: vrev64.16 q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vrev64q_u16(uint16x8_t a) {
return vrev64q_u16(a);
}
-// CHECK: test_vrev64q_u32
+// CHECK-LABEL: test_vrev64q_u32
// CHECK: vrev64.32 q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vrev64q_u32(uint32x4_t a) {
return vrev64q_u32(a);
}
-// CHECK: test_vrev64q_p8
+// CHECK-LABEL: test_vrev64q_p8
// CHECK: vrev64.8 q{{[0-9]+}}, q{{[0-9]+}}
poly8x16_t test_vrev64q_p8(poly8x16_t a) {
return vrev64q_p8(a);
}
-// CHECK: test_vrev64q_p16
+// CHECK-LABEL: test_vrev64q_p16
// CHECK: vrev64.16 q{{[0-9]+}}, q{{[0-9]+}}
poly16x8_t test_vrev64q_p16(poly16x8_t a) {
return vrev64q_p16(a);
}
-// CHECK: test_vrev64q_f32
+// CHECK-LABEL: test_vrev64q_f32
// CHECK: vrev64.32 q{{[0-9]+}}, q{{[0-9]+}}
float32x4_t test_vrev64q_f32(float32x4_t a) {
return vrev64q_f32(a);
}
-// CHECK: test_vrhadd_s8
+// CHECK-LABEL: test_vrhadd_s8
// CHECK: vrhadd.s8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vrhadd_s8(int8x8_t a, int8x8_t b) {
return vrhadd_s8(a, b);
}
-// CHECK: test_vrhadd_s16
+// CHECK-LABEL: test_vrhadd_s16
// CHECK: vrhadd.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vrhadd_s16(int16x4_t a, int16x4_t b) {
return vrhadd_s16(a, b);
}
-// CHECK: test_vrhadd_s32
+// CHECK-LABEL: test_vrhadd_s32
// CHECK: vrhadd.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vrhadd_s32(int32x2_t a, int32x2_t b) {
return vrhadd_s32(a, b);
}
-// CHECK: test_vrhadd_u8
+// CHECK-LABEL: test_vrhadd_u8
// CHECK: vrhadd.u8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vrhadd_u8(uint8x8_t a, uint8x8_t b) {
return vrhadd_u8(a, b);
}
-// CHECK: test_vrhadd_u16
+// CHECK-LABEL: test_vrhadd_u16
// CHECK: vrhadd.u16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vrhadd_u16(uint16x4_t a, uint16x4_t b) {
return vrhadd_u16(a, b);
}
-// CHECK: test_vrhadd_u32
+// CHECK-LABEL: test_vrhadd_u32
// CHECK: vrhadd.u32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vrhadd_u32(uint32x2_t a, uint32x2_t b) {
return vrhadd_u32(a, b);
}
-// CHECK: test_vrhaddq_s8
+// CHECK-LABEL: test_vrhaddq_s8
// CHECK: vrhadd.s8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vrhaddq_s8(int8x16_t a, int8x16_t b) {
return vrhaddq_s8(a, b);
}
-// CHECK: test_vrhaddq_s16
+// CHECK-LABEL: test_vrhaddq_s16
// CHECK: vrhadd.s16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vrhaddq_s16(int16x8_t a, int16x8_t b) {
return vrhaddq_s16(a, b);
}
-// CHECK: test_vrhaddq_s32
+// CHECK-LABEL: test_vrhaddq_s32
// CHECK: vrhadd.s32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vrhaddq_s32(int32x4_t a, int32x4_t b) {
return vrhaddq_s32(a, b);
}
-// CHECK: test_vrhaddq_u8
+// CHECK-LABEL: test_vrhaddq_u8
// CHECK: vrhadd.u8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vrhaddq_u8(uint8x16_t a, uint8x16_t b) {
return vrhaddq_u8(a, b);
}
-// CHECK: test_vrhaddq_u16
+// CHECK-LABEL: test_vrhaddq_u16
// CHECK: vrhadd.u16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vrhaddq_u16(uint16x8_t a, uint16x8_t b) {
return vrhaddq_u16(a, b);
}
-// CHECK: test_vrhaddq_u32
+// CHECK-LABEL: test_vrhaddq_u32
// CHECK: vrhadd.u32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vrhaddq_u32(uint32x4_t a, uint32x4_t b) {
return vrhaddq_u32(a, b);
}
-// CHECK: test_vrshl_s8
+// CHECK-LABEL: test_vrshl_s8
// CHECK: vrshl.s8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vrshl_s8(int8x8_t a, int8x8_t b) {
return vrshl_s8(a, b);
}
-// CHECK: test_vrshl_s16
+// CHECK-LABEL: test_vrshl_s16
// CHECK: vrshl.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vrshl_s16(int16x4_t a, int16x4_t b) {
return vrshl_s16(a, b);
}
-// CHECK: test_vrshl_s32
+// CHECK-LABEL: test_vrshl_s32
// CHECK: vrshl.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vrshl_s32(int32x2_t a, int32x2_t b) {
return vrshl_s32(a, b);
}
-// CHECK: test_vrshl_s64
+// CHECK-LABEL: test_vrshl_s64
// CHECK: vrshl.s64 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x1_t test_vrshl_s64(int64x1_t a, int64x1_t b) {
return vrshl_s64(a, b);
}
-// CHECK: test_vrshl_u8
+// CHECK-LABEL: test_vrshl_u8
// CHECK: vrshl.u8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vrshl_u8(uint8x8_t a, int8x8_t b) {
return vrshl_u8(a, b);
}
-// CHECK: test_vrshl_u16
+// CHECK-LABEL: test_vrshl_u16
// CHECK: vrshl.u16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vrshl_u16(uint16x4_t a, int16x4_t b) {
return vrshl_u16(a, b);
}
-// CHECK: test_vrshl_u32
+// CHECK-LABEL: test_vrshl_u32
// CHECK: vrshl.u32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vrshl_u32(uint32x2_t a, int32x2_t b) {
return vrshl_u32(a, b);
}
-// CHECK: test_vrshl_u64
+// CHECK-LABEL: test_vrshl_u64
// CHECK: vrshl.u64 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint64x1_t test_vrshl_u64(uint64x1_t a, int64x1_t b) {
return vrshl_u64(a, b);
}
-// CHECK: test_vrshlq_s8
+// CHECK-LABEL: test_vrshlq_s8
// CHECK: vrshl.s8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vrshlq_s8(int8x16_t a, int8x16_t b) {
return vrshlq_s8(a, b);
}
-// CHECK: test_vrshlq_s16
+// CHECK-LABEL: test_vrshlq_s16
// CHECK: vrshl.s16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vrshlq_s16(int16x8_t a, int16x8_t b) {
return vrshlq_s16(a, b);
}
-// CHECK: test_vrshlq_s32
+// CHECK-LABEL: test_vrshlq_s32
// CHECK: vrshl.s32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vrshlq_s32(int32x4_t a, int32x4_t b) {
return vrshlq_s32(a, b);
}
-// CHECK: test_vrshlq_s64
+// CHECK-LABEL: test_vrshlq_s64
// CHECK: vrshl.s64 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int64x2_t test_vrshlq_s64(int64x2_t a, int64x2_t b) {
return vrshlq_s64(a, b);
}
-// CHECK: test_vrshlq_u8
+// CHECK-LABEL: test_vrshlq_u8
// CHECK: vrshl.u8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vrshlq_u8(uint8x16_t a, int8x16_t b) {
return vrshlq_u8(a, b);
}
-// CHECK: test_vrshlq_u16
+// CHECK-LABEL: test_vrshlq_u16
// CHECK: vrshl.u16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vrshlq_u16(uint16x8_t a, int16x8_t b) {
return vrshlq_u16(a, b);
}
-// CHECK: test_vrshlq_u32
+// CHECK-LABEL: test_vrshlq_u32
// CHECK: vrshl.u32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vrshlq_u32(uint32x4_t a, int32x4_t b) {
return vrshlq_u32(a, b);
}
-// CHECK: test_vrshlq_u64
+// CHECK-LABEL: test_vrshlq_u64
// CHECK: vrshl.u64 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint64x2_t test_vrshlq_u64(uint64x2_t a, int64x2_t b) {
return vrshlq_u64(a, b);
}
-// CHECK: test_vrshrn_n_s16
+// CHECK-LABEL: test_vrshrn_n_s16
// CHECK: vrshrn.i16 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int8x8_t test_vrshrn_n_s16(int16x8_t a) {
return vrshrn_n_s16(a, 1);
}
-// CHECK: test_vrshrn_n_s32
+// CHECK-LABEL: test_vrshrn_n_s32
// CHECK: vrshrn.i32 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int16x4_t test_vrshrn_n_s32(int32x4_t a) {
return vrshrn_n_s32(a, 1);
}
-// CHECK: test_vrshrn_n_s64
+// CHECK-LABEL: test_vrshrn_n_s64
// CHECK: vrshrn.i64 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int32x2_t test_vrshrn_n_s64(int64x2_t a) {
return vrshrn_n_s64(a, 1);
}
-// CHECK: test_vrshrn_n_u16
+// CHECK-LABEL: test_vrshrn_n_u16
// CHECK: vrshrn.i16 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint8x8_t test_vrshrn_n_u16(uint16x8_t a) {
return vrshrn_n_u16(a, 1);
}
-// CHECK: test_vrshrn_n_u32
+// CHECK-LABEL: test_vrshrn_n_u32
// CHECK: vrshrn.i32 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint16x4_t test_vrshrn_n_u32(uint32x4_t a) {
return vrshrn_n_u32(a, 1);
}
-// CHECK: test_vrshrn_n_u64
+// CHECK-LABEL: test_vrshrn_n_u64
// CHECK: vrshrn.i64 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint32x2_t test_vrshrn_n_u64(uint64x2_t a) {
return vrshrn_n_u64(a, 1);
}
-// CHECK: test_vrshr_n_s8
+// CHECK-LABEL: test_vrshr_n_s8
// CHECK: vrshr.s8 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int8x8_t test_vrshr_n_s8(int8x8_t a) {
return vrshr_n_s8(a, 1);
}
-// CHECK: test_vrshr_n_s16
+// CHECK-LABEL: test_vrshr_n_s16
// CHECK: vrshr.s16 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int16x4_t test_vrshr_n_s16(int16x4_t a) {
return vrshr_n_s16(a, 1);
}
-// CHECK: test_vrshr_n_s32
+// CHECK-LABEL: test_vrshr_n_s32
// CHECK: vrshr.s32 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int32x2_t test_vrshr_n_s32(int32x2_t a) {
return vrshr_n_s32(a, 1);
}
-// CHECK: test_vrshr_n_s64
+// CHECK-LABEL: test_vrshr_n_s64
// CHECK: vrshr.s64 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int64x1_t test_vrshr_n_s64(int64x1_t a) {
return vrshr_n_s64(a, 1);
}
-// CHECK: test_vrshr_n_u8
+// CHECK-LABEL: test_vrshr_n_u8
// CHECK: vrshr.u8 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint8x8_t test_vrshr_n_u8(uint8x8_t a) {
return vrshr_n_u8(a, 1);
}
-// CHECK: test_vrshr_n_u16
+// CHECK-LABEL: test_vrshr_n_u16
// CHECK: vrshr.u16 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint16x4_t test_vrshr_n_u16(uint16x4_t a) {
return vrshr_n_u16(a, 1);
}
-// CHECK: test_vrshr_n_u32
+// CHECK-LABEL: test_vrshr_n_u32
// CHECK: vrshr.u32 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint32x2_t test_vrshr_n_u32(uint32x2_t a) {
return vrshr_n_u32(a, 1);
}
-// CHECK: test_vrshr_n_u64
+// CHECK-LABEL: test_vrshr_n_u64
// CHECK: vrshr.u64 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint64x1_t test_vrshr_n_u64(uint64x1_t a) {
return vrshr_n_u64(a, 1);
}
-// CHECK: test_vrshrq_n_s8
+// CHECK-LABEL: test_vrshrq_n_s8
// CHECK: vrshr.s8 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int8x16_t test_vrshrq_n_s8(int8x16_t a) {
return vrshrq_n_s8(a, 1);
}
-// CHECK: test_vrshrq_n_s16
+// CHECK-LABEL: test_vrshrq_n_s16
// CHECK: vrshr.s16 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int16x8_t test_vrshrq_n_s16(int16x8_t a) {
return vrshrq_n_s16(a, 1);
}
-// CHECK: test_vrshrq_n_s32
+// CHECK-LABEL: test_vrshrq_n_s32
// CHECK: vrshr.s32 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int32x4_t test_vrshrq_n_s32(int32x4_t a) {
return vrshrq_n_s32(a, 1);
}
-// CHECK: test_vrshrq_n_s64
+// CHECK-LABEL: test_vrshrq_n_s64
// CHECK: vrshr.s64 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int64x2_t test_vrshrq_n_s64(int64x2_t a) {
return vrshrq_n_s64(a, 1);
}
-// CHECK: test_vrshrq_n_u8
+// CHECK-LABEL: test_vrshrq_n_u8
// CHECK: vrshr.u8 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint8x16_t test_vrshrq_n_u8(uint8x16_t a) {
return vrshrq_n_u8(a, 1);
}
-// CHECK: test_vrshrq_n_u16
+// CHECK-LABEL: test_vrshrq_n_u16
// CHECK: vrshr.u16 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint16x8_t test_vrshrq_n_u16(uint16x8_t a) {
return vrshrq_n_u16(a, 1);
}
-// CHECK: test_vrshrq_n_u32
+// CHECK-LABEL: test_vrshrq_n_u32
// CHECK: vrshr.u32 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint32x4_t test_vrshrq_n_u32(uint32x4_t a) {
return vrshrq_n_u32(a, 1);
}
-// CHECK: test_vrshrq_n_u64
+// CHECK-LABEL: test_vrshrq_n_u64
// CHECK: vrshr.u64 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint64x2_t test_vrshrq_n_u64(uint64x2_t a) {
return vrshrq_n_u64(a, 1);
}
-// CHECK: test_vrsqrte_f32
+// CHECK-LABEL: test_vrsqrte_f32
// CHECK: vrsqrte.f32 d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vrsqrte_f32(float32x2_t a) {
return vrsqrte_f32(a);
}
-// CHECK: test_vrsqrte_u32
+// CHECK-LABEL: test_vrsqrte_u32
// CHECK: vrsqrte.u32 d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vrsqrte_u32(uint32x2_t a) {
return vrsqrte_u32(a);
}
-// CHECK: test_vrsqrteq_f32
+// CHECK-LABEL: test_vrsqrteq_f32
// CHECK: vrsqrte.f32 q{{[0-9]+}}, q{{[0-9]+}}
float32x4_t test_vrsqrteq_f32(float32x4_t a) {
return vrsqrteq_f32(a);
}
-// CHECK: test_vrsqrteq_u32
+// CHECK-LABEL: test_vrsqrteq_u32
// CHECK: vrsqrte.u32 q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vrsqrteq_u32(uint32x4_t a) {
return vrsqrteq_u32(a);
}
-// CHECK: test_vrsqrts_f32
+// CHECK-LABEL: test_vrsqrts_f32
// CHECK: vrsqrts.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vrsqrts_f32(float32x2_t a, float32x2_t b) {
return vrsqrts_f32(a, b);
}
-// CHECK: test_vrsqrtsq_f32
+// CHECK-LABEL: test_vrsqrtsq_f32
// CHECK: vrsqrts.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
float32x4_t test_vrsqrtsq_f32(float32x4_t a, float32x4_t b) {
return vrsqrtsq_f32(a, b);
}
-// CHECK: test_vrsra_n_s8
+// CHECK-LABEL: test_vrsra_n_s8
// CHECK: vrsra.s8 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int8x8_t test_vrsra_n_s8(int8x8_t a, int8x8_t b) {
return vrsra_n_s8(a, b, 1);
}
-// CHECK: test_vrsra_n_s16
+// CHECK-LABEL: test_vrsra_n_s16
// CHECK: vrsra.s16 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int16x4_t test_vrsra_n_s16(int16x4_t a, int16x4_t b) {
return vrsra_n_s16(a, b, 1);
}
-// CHECK: test_vrsra_n_s32
+// CHECK-LABEL: test_vrsra_n_s32
// CHECK: vrsra.s32 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int32x2_t test_vrsra_n_s32(int32x2_t a, int32x2_t b) {
return vrsra_n_s32(a, b, 1);
}
-// CHECK: test_vrsra_n_s64
+// CHECK-LABEL: test_vrsra_n_s64
// CHECK: vrsra.s64 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int64x1_t test_vrsra_n_s64(int64x1_t a, int64x1_t b) {
return vrsra_n_s64(a, b, 1);
}
-// CHECK: test_vrsra_n_u8
+// CHECK-LABEL: test_vrsra_n_u8
// CHECK: vrsra.u8 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint8x8_t test_vrsra_n_u8(uint8x8_t a, uint8x8_t b) {
return vrsra_n_u8(a, b, 1);
}
-// CHECK: test_vrsra_n_u16
+// CHECK-LABEL: test_vrsra_n_u16
// CHECK: vrsra.u16 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint16x4_t test_vrsra_n_u16(uint16x4_t a, uint16x4_t b) {
return vrsra_n_u16(a, b, 1);
}
-// CHECK: test_vrsra_n_u32
+// CHECK-LABEL: test_vrsra_n_u32
// CHECK: vrsra.u32 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint32x2_t test_vrsra_n_u32(uint32x2_t a, uint32x2_t b) {
return vrsra_n_u32(a, b, 1);
}
-// CHECK: test_vrsra_n_u64
+// CHECK-LABEL: test_vrsra_n_u64
// CHECK: vrsra.u64 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint64x1_t test_vrsra_n_u64(uint64x1_t a, uint64x1_t b) {
return vrsra_n_u64(a, b, 1);
}
-// CHECK: test_vrsraq_n_s8
+// CHECK-LABEL: test_vrsraq_n_s8
// CHECK: vrsra.s8 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int8x16_t test_vrsraq_n_s8(int8x16_t a, int8x16_t b) {
return vrsraq_n_s8(a, b, 1);
}
-// CHECK: test_vrsraq_n_s16
+// CHECK-LABEL: test_vrsraq_n_s16
// CHECK: vrsra.s16 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int16x8_t test_vrsraq_n_s16(int16x8_t a, int16x8_t b) {
return vrsraq_n_s16(a, b, 1);
}
-// CHECK: test_vrsraq_n_s32
+// CHECK-LABEL: test_vrsraq_n_s32
// CHECK: vrsra.s32 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int32x4_t test_vrsraq_n_s32(int32x4_t a, int32x4_t b) {
return vrsraq_n_s32(a, b, 1);
}
-// CHECK: test_vrsraq_n_s64
+// CHECK-LABEL: test_vrsraq_n_s64
// CHECK: vrsra.s64 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int64x2_t test_vrsraq_n_s64(int64x2_t a, int64x2_t b) {
return vrsraq_n_s64(a, b, 1);
}
-// CHECK: test_vrsraq_n_u8
+// CHECK-LABEL: test_vrsraq_n_u8
// CHECK: vrsra.u8 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint8x16_t test_vrsraq_n_u8(uint8x16_t a, uint8x16_t b) {
return vrsraq_n_u8(a, b, 1);
}
-// CHECK: test_vrsraq_n_u16
+// CHECK-LABEL: test_vrsraq_n_u16
// CHECK: vrsra.u16 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint16x8_t test_vrsraq_n_u16(uint16x8_t a, uint16x8_t b) {
return vrsraq_n_u16(a, b, 1);
}
-// CHECK: test_vrsraq_n_u32
+// CHECK-LABEL: test_vrsraq_n_u32
// CHECK: vrsra.u32 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint32x4_t test_vrsraq_n_u32(uint32x4_t a, uint32x4_t b) {
return vrsraq_n_u32(a, b, 1);
}
-// CHECK: test_vrsraq_n_u64
+// CHECK-LABEL: test_vrsraq_n_u64
// CHECK: vrsra.u64 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint64x2_t test_vrsraq_n_u64(uint64x2_t a, uint64x2_t b) {
return vrsraq_n_u64(a, b, 1);
}
-// CHECK: test_vrsubhn_s16
+// CHECK-LABEL: test_vrsubhn_s16
// CHECK: vrsubhn.i16 d{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x8_t test_vrsubhn_s16(int16x8_t a, int16x8_t b) {
return vrsubhn_s16(a, b);
}
-// CHECK: test_vrsubhn_s32
+// CHECK-LABEL: test_vrsubhn_s32
// CHECK: vrsubhn.i32 d{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x4_t test_vrsubhn_s32(int32x4_t a, int32x4_t b) {
return vrsubhn_s32(a, b);
}
-// CHECK: test_vrsubhn_s64
+// CHECK-LABEL: test_vrsubhn_s64
// CHECK: vrsubhn.i64 d{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x2_t test_vrsubhn_s64(int64x2_t a, int64x2_t b) {
return vrsubhn_s64(a, b);
}
-// CHECK: test_vrsubhn_u16
+// CHECK-LABEL: test_vrsubhn_u16
// CHECK: vrsubhn.i16 d{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x8_t test_vrsubhn_u16(uint16x8_t a, uint16x8_t b) {
return vrsubhn_u16(a, b);
}
-// CHECK: test_vrsubhn_u32
+// CHECK-LABEL: test_vrsubhn_u32
// CHECK: vrsubhn.i32 d{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x4_t test_vrsubhn_u32(uint32x4_t a, uint32x4_t b) {
return vrsubhn_u32(a, b);
}
-// CHECK: test_vrsubhn_u64
+// CHECK-LABEL: test_vrsubhn_u64
// CHECK: vrsubhn.i64 d{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x2_t test_vrsubhn_u64(uint64x2_t a, uint64x2_t b) {
return vrsubhn_u64(a, b);
}
-// CHECK: test_vset_lane_u8
+// CHECK-LABEL: test_vset_lane_u8
// CHECK: vmov
uint8x8_t test_vset_lane_u8(uint8_t a, uint8x8_t b) {
return vset_lane_u8(a, b, 7);
}
-// CHECK: test_vset_lane_u16
+// CHECK-LABEL: test_vset_lane_u16
// CHECK: vmov
uint16x4_t test_vset_lane_u16(uint16_t a, uint16x4_t b) {
return vset_lane_u16(a, b, 3);
}
-// CHECK: test_vset_lane_u32
+// CHECK-LABEL: test_vset_lane_u32
// CHECK: vmov
uint32x2_t test_vset_lane_u32(uint32_t a, uint32x2_t b) {
return vset_lane_u32(a, b, 1);
}
-// CHECK: test_vset_lane_s8
+// CHECK-LABEL: test_vset_lane_s8
// CHECK: vmov
int8x8_t test_vset_lane_s8(int8_t a, int8x8_t b) {
return vset_lane_s8(a, b, 7);
}
-// CHECK: test_vset_lane_s16
+// CHECK-LABEL: test_vset_lane_s16
// CHECK: vmov
int16x4_t test_vset_lane_s16(int16_t a, int16x4_t b) {
return vset_lane_s16(a, b, 3);
}
-// CHECK: test_vset_lane_s32
+// CHECK-LABEL: test_vset_lane_s32
// CHECK: vmov
int32x2_t test_vset_lane_s32(int32_t a, int32x2_t b) {
return vset_lane_s32(a, b, 1);
}
-// CHECK: test_vset_lane_p8
+// CHECK-LABEL: test_vset_lane_p8
// CHECK: vmov
poly8x8_t test_vset_lane_p8(poly8_t a, poly8x8_t b) {
return vset_lane_p8(a, b, 7);
}
-// CHECK: test_vset_lane_p16
+// CHECK-LABEL: test_vset_lane_p16
// CHECK: vmov
poly16x4_t test_vset_lane_p16(poly16_t a, poly16x4_t b) {
return vset_lane_p16(a, b, 3);
}
-// CHECK: test_vset_lane_f32
+// CHECK-LABEL: test_vset_lane_f32
// CHECK: vmov
float32x2_t test_vset_lane_f32(float32_t a, float32x2_t b) {
return vset_lane_f32(a, b, 1);
}
-// CHECK: test_vsetq_lane_u8
+// CHECK-LABEL: test_vsetq_lane_u8
// CHECK: vmov
uint8x16_t test_vsetq_lane_u8(uint8_t a, uint8x16_t b) {
return vsetq_lane_u8(a, b, 15);
}
-// CHECK: test_vsetq_lane_u16
+// CHECK-LABEL: test_vsetq_lane_u16
// CHECK: vmov
uint16x8_t test_vsetq_lane_u16(uint16_t a, uint16x8_t b) {
return vsetq_lane_u16(a, b, 7);
}
-// CHECK: test_vsetq_lane_u32
+// CHECK-LABEL: test_vsetq_lane_u32
// CHECK: vmov
uint32x4_t test_vsetq_lane_u32(uint32_t a, uint32x4_t b) {
return vsetq_lane_u32(a, b, 3);
}
-// CHECK: test_vsetq_lane_s8
+// CHECK-LABEL: test_vsetq_lane_s8
// CHECK: vmov
int8x16_t test_vsetq_lane_s8(int8_t a, int8x16_t b) {
return vsetq_lane_s8(a, b, 15);
}
-// CHECK: test_vsetq_lane_s16
+// CHECK-LABEL: test_vsetq_lane_s16
// CHECK: vmov
int16x8_t test_vsetq_lane_s16(int16_t a, int16x8_t b) {
return vsetq_lane_s16(a, b, 7);
}
-// CHECK: test_vsetq_lane_s32
+// CHECK-LABEL: test_vsetq_lane_s32
// CHECK: vmov
int32x4_t test_vsetq_lane_s32(int32_t a, int32x4_t b) {
return vsetq_lane_s32(a, b, 3);
}
-// CHECK: test_vsetq_lane_p8
+// CHECK-LABEL: test_vsetq_lane_p8
// CHECK: vmov
poly8x16_t test_vsetq_lane_p8(poly8_t a, poly8x16_t b) {
return vsetq_lane_p8(a, b, 15);
}
-// CHECK: test_vsetq_lane_p16
+// CHECK-LABEL: test_vsetq_lane_p16
// CHECK: vmov
poly16x8_t test_vsetq_lane_p16(poly16_t a, poly16x8_t b) {
return vsetq_lane_p16(a, b, 7);
}
-// CHECK: test_vsetq_lane_f32
+// CHECK-LABEL: test_vsetq_lane_f32
// CHECK: vmov
float32x4_t test_vsetq_lane_f32(float32_t a, float32x4_t b) {
return vsetq_lane_f32(a, b, 3);
}
-// CHECK: test_vset_lane_s64
+// CHECK-LABEL: test_vset_lane_s64
// CHECK: vmov
int64x1_t test_vset_lane_s64(int64_t a, int64x1_t b) {
return vset_lane_s64(a, b, 0);
}
-// CHECK: test_vset_lane_u64
+// CHECK-LABEL: test_vset_lane_u64
// CHECK: vmov
uint64x1_t test_vset_lane_u64(uint64_t a, uint64x1_t b) {
return vset_lane_u64(a, b, 0);
}
-// CHECK: test_vsetq_lane_s64
+// CHECK-LABEL: test_vsetq_lane_s64
// CHECK: vmov
int64x2_t test_vsetq_lane_s64(int64_t a, int64x2_t b) {
return vsetq_lane_s64(a, b, 1);
}
-// CHECK: test_vsetq_lane_u64
+// CHECK-LABEL: test_vsetq_lane_u64
// CHECK: vmov
uint64x2_t test_vsetq_lane_u64(uint64_t a, uint64x2_t b) {
return vsetq_lane_u64(a, b, 1);
}
-// CHECK: test_vshl_s8
+// CHECK-LABEL: test_vshl_s8
// CHECK: vshl.s8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vshl_s8(int8x8_t a, int8x8_t b) {
return vshl_s8(a, b);
}
-// CHECK: test_vshl_s16
+// CHECK-LABEL: test_vshl_s16
// CHECK: vshl.s16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vshl_s16(int16x4_t a, int16x4_t b) {
return vshl_s16(a, b);
}
-// CHECK: test_vshl_s32
+// CHECK-LABEL: test_vshl_s32
// CHECK: vshl.s32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vshl_s32(int32x2_t a, int32x2_t b) {
return vshl_s32(a, b);
}
-// CHECK: test_vshl_s64
+// CHECK-LABEL: test_vshl_s64
// CHECK: vshl.s64 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x1_t test_vshl_s64(int64x1_t a, int64x1_t b) {
return vshl_s64(a, b);
}
-// CHECK: test_vshl_u8
+// CHECK-LABEL: test_vshl_u8
// CHECK: vshl.u8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vshl_u8(uint8x8_t a, int8x8_t b) {
return vshl_u8(a, b);
}
-// CHECK: test_vshl_u16
+// CHECK-LABEL: test_vshl_u16
// CHECK: vshl.u16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vshl_u16(uint16x4_t a, int16x4_t b) {
return vshl_u16(a, b);
}
-// CHECK: test_vshl_u32
+// CHECK-LABEL: test_vshl_u32
// CHECK: vshl.u32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vshl_u32(uint32x2_t a, int32x2_t b) {
return vshl_u32(a, b);
}
-// CHECK: test_vshl_u64
+// CHECK-LABEL: test_vshl_u64
// CHECK: vshl.u64 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint64x1_t test_vshl_u64(uint64x1_t a, int64x1_t b) {
return vshl_u64(a, b);
}
-// CHECK: test_vshlq_s8
+// CHECK-LABEL: test_vshlq_s8
// CHECK: vshl.s8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vshlq_s8(int8x16_t a, int8x16_t b) {
return vshlq_s8(a, b);
}
-// CHECK: test_vshlq_s16
+// CHECK-LABEL: test_vshlq_s16
// CHECK: vshl.s16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vshlq_s16(int16x8_t a, int16x8_t b) {
return vshlq_s16(a, b);
}
-// CHECK: test_vshlq_s32
+// CHECK-LABEL: test_vshlq_s32
// CHECK: vshl.s32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vshlq_s32(int32x4_t a, int32x4_t b) {
return vshlq_s32(a, b);
}
-// CHECK: test_vshlq_s64
+// CHECK-LABEL: test_vshlq_s64
// CHECK: vshl.s64 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int64x2_t test_vshlq_s64(int64x2_t a, int64x2_t b) {
return vshlq_s64(a, b);
}
-// CHECK: test_vshlq_u8
+// CHECK-LABEL: test_vshlq_u8
// CHECK: vshl.u8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vshlq_u8(uint8x16_t a, int8x16_t b) {
return vshlq_u8(a, b);
}
-// CHECK: test_vshlq_u16
+// CHECK-LABEL: test_vshlq_u16
// CHECK: vshl.u16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vshlq_u16(uint16x8_t a, int16x8_t b) {
return vshlq_u16(a, b);
}
-// CHECK: test_vshlq_u32
+// CHECK-LABEL: test_vshlq_u32
// CHECK: vshl.u32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vshlq_u32(uint32x4_t a, int32x4_t b) {
return vshlq_u32(a, b);
}
-// CHECK: test_vshlq_u64
+// CHECK-LABEL: test_vshlq_u64
// CHECK: vshl.u64 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint64x2_t test_vshlq_u64(uint64x2_t a, int64x2_t b) {
return vshlq_u64(a, b);
}
-// CHECK: test_vshll_n_s8
+// CHECK-LABEL: test_vshll_n_s8
// CHECK: vshll.s8 q{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int16x8_t test_vshll_n_s8(int8x8_t a) {
return vshll_n_s8(a, 1);
}
-// CHECK: test_vshll_n_s16
+// CHECK-LABEL: test_vshll_n_s16
// CHECK: vshll.s16 q{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int32x4_t test_vshll_n_s16(int16x4_t a) {
return vshll_n_s16(a, 1);
}
-// CHECK: test_vshll_n_s32
+// CHECK-LABEL: test_vshll_n_s32
// CHECK: vshll.s32 q{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int64x2_t test_vshll_n_s32(int32x2_t a) {
return vshll_n_s32(a, 1);
}
-// CHECK: test_vshll_n_u8
+// CHECK-LABEL: test_vshll_n_u8
// CHECK: vshll.u8 q{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint16x8_t test_vshll_n_u8(uint8x8_t a) {
return vshll_n_u8(a, 1);
}
-// CHECK: test_vshll_n_u16
+// CHECK-LABEL: test_vshll_n_u16
// CHECK: vshll.u16 q{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint32x4_t test_vshll_n_u16(uint16x4_t a) {
return vshll_n_u16(a, 1);
}
-// CHECK: test_vshll_n_u32
+// CHECK-LABEL: test_vshll_n_u32
// CHECK: vshll.u32 q{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint64x2_t test_vshll_n_u32(uint32x2_t a) {
return vshll_n_u32(a, 1);
}
-// CHECK: test_vshl_n_s8
+// CHECK-LABEL: test_vshl_n_s8
// CHECK: vshl.i8 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int8x8_t test_vshl_n_s8(int8x8_t a) {
return vshl_n_s8(a, 1);
}
-// CHECK: test_vshl_n_s16
+// CHECK-LABEL: test_vshl_n_s16
// CHECK: vshl.i16 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int16x4_t test_vshl_n_s16(int16x4_t a) {
return vshl_n_s16(a, 1);
}
-// CHECK: test_vshl_n_s32
+// CHECK-LABEL: test_vshl_n_s32
// CHECK: vshl.i32 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int32x2_t test_vshl_n_s32(int32x2_t a) {
return vshl_n_s32(a, 1);
}
-// CHECK: test_vshl_n_s64
+// CHECK-LABEL: test_vshl_n_s64
// CHECK: vshl.i64 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int64x1_t test_vshl_n_s64(int64x1_t a) {
return vshl_n_s64(a, 1);
}
-// CHECK: test_vshl_n_u8
+// CHECK-LABEL: test_vshl_n_u8
// CHECK: vshl.i8 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint8x8_t test_vshl_n_u8(uint8x8_t a) {
return vshl_n_u8(a, 1);
}
-// CHECK: test_vshl_n_u16
+// CHECK-LABEL: test_vshl_n_u16
// CHECK: vshl.i16 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint16x4_t test_vshl_n_u16(uint16x4_t a) {
return vshl_n_u16(a, 1);
}
-// CHECK: test_vshl_n_u32
+// CHECK-LABEL: test_vshl_n_u32
// CHECK: vshl.i32 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint32x2_t test_vshl_n_u32(uint32x2_t a) {
return vshl_n_u32(a, 1);
}
-// CHECK: test_vshl_n_u64
+// CHECK-LABEL: test_vshl_n_u64
// CHECK: vshl.i64 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint64x1_t test_vshl_n_u64(uint64x1_t a) {
return vshl_n_u64(a, 1);
}
-// CHECK: test_vshlq_n_s8
+// CHECK-LABEL: test_vshlq_n_s8
// CHECK: vshl.i8 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int8x16_t test_vshlq_n_s8(int8x16_t a) {
return vshlq_n_s8(a, 1);
}
-// CHECK: test_vshlq_n_s16
+// CHECK-LABEL: test_vshlq_n_s16
// CHECK: vshl.i16 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int16x8_t test_vshlq_n_s16(int16x8_t a) {
return vshlq_n_s16(a, 1);
}
-// CHECK: test_vshlq_n_s32
+// CHECK-LABEL: test_vshlq_n_s32
// CHECK: vshl.i32 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int32x4_t test_vshlq_n_s32(int32x4_t a) {
return vshlq_n_s32(a, 1);
}
-// CHECK: test_vshlq_n_s64
+// CHECK-LABEL: test_vshlq_n_s64
// CHECK: vshl.i64 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int64x2_t test_vshlq_n_s64(int64x2_t a) {
return vshlq_n_s64(a, 1);
}
-// CHECK: test_vshlq_n_u8
+// CHECK-LABEL: test_vshlq_n_u8
// CHECK: vshl.i8 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint8x16_t test_vshlq_n_u8(uint8x16_t a) {
return vshlq_n_u8(a, 1);
}
-// CHECK: test_vshlq_n_u16
+// CHECK-LABEL: test_vshlq_n_u16
// CHECK: vshl.i16 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint16x8_t test_vshlq_n_u16(uint16x8_t a) {
return vshlq_n_u16(a, 1);
}
-// CHECK: test_vshlq_n_u32
+// CHECK-LABEL: test_vshlq_n_u32
// CHECK: vshl.i32 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint32x4_t test_vshlq_n_u32(uint32x4_t a) {
return vshlq_n_u32(a, 1);
}
-// CHECK: test_vshlq_n_u64
+// CHECK-LABEL: test_vshlq_n_u64
// CHECK: vshl.i64 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint64x2_t test_vshlq_n_u64(uint64x2_t a) {
return vshlq_n_u64(a, 1);
}
-// CHECK: test_vshrn_n_s16
+// CHECK-LABEL: test_vshrn_n_s16
// CHECK: vshrn.i16 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int8x8_t test_vshrn_n_s16(int16x8_t a) {
return vshrn_n_s16(a, 1);
}
-// CHECK: test_vshrn_n_s32
+// CHECK-LABEL: test_vshrn_n_s32
// CHECK: vshrn.i32 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int16x4_t test_vshrn_n_s32(int32x4_t a) {
return vshrn_n_s32(a, 1);
}
-// CHECK: test_vshrn_n_s64
+// CHECK-LABEL: test_vshrn_n_s64
// CHECK: vshrn.i64 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int32x2_t test_vshrn_n_s64(int64x2_t a) {
return vshrn_n_s64(a, 1);
}
-// CHECK: test_vshrn_n_u16
+// CHECK-LABEL: test_vshrn_n_u16
// CHECK: vshrn.i16 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint8x8_t test_vshrn_n_u16(uint16x8_t a) {
return vshrn_n_u16(a, 1);
}
-// CHECK: test_vshrn_n_u32
+// CHECK-LABEL: test_vshrn_n_u32
// CHECK: vshrn.i32 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint16x4_t test_vshrn_n_u32(uint32x4_t a) {
return vshrn_n_u32(a, 1);
}
-// CHECK: test_vshrn_n_u64
+// CHECK-LABEL: test_vshrn_n_u64
// CHECK: vshrn.i64 d{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint32x2_t test_vshrn_n_u64(uint64x2_t a) {
return vshrn_n_u64(a, 1);
}
-// CHECK: test_vshr_n_s8
+// CHECK-LABEL: test_vshr_n_s8
// CHECK: vshr.s8 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int8x8_t test_vshr_n_s8(int8x8_t a) {
return vshr_n_s8(a, 1);
}
-// CHECK: test_vshr_n_s16
+// CHECK-LABEL: test_vshr_n_s16
// CHECK: vshr.s16 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int16x4_t test_vshr_n_s16(int16x4_t a) {
return vshr_n_s16(a, 1);
}
-// CHECK: test_vshr_n_s32
+// CHECK-LABEL: test_vshr_n_s32
// CHECK: vshr.s32 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int32x2_t test_vshr_n_s32(int32x2_t a) {
return vshr_n_s32(a, 1);
}
-// CHECK: test_vshr_n_s64
+// CHECK-LABEL: test_vshr_n_s64
// CHECK: vshr.s64 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int64x1_t test_vshr_n_s64(int64x1_t a) {
return vshr_n_s64(a, 1);
}
-// CHECK: test_vshr_n_u8
+// CHECK-LABEL: test_vshr_n_u8
// CHECK: vshr.u8 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint8x8_t test_vshr_n_u8(uint8x8_t a) {
return vshr_n_u8(a, 1);
}
-// CHECK: test_vshr_n_u16
+// CHECK-LABEL: test_vshr_n_u16
// CHECK: vshr.u16 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint16x4_t test_vshr_n_u16(uint16x4_t a) {
return vshr_n_u16(a, 1);
}
-// CHECK: test_vshr_n_u32
+// CHECK-LABEL: test_vshr_n_u32
// CHECK: vshr.u32 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint32x2_t test_vshr_n_u32(uint32x2_t a) {
return vshr_n_u32(a, 1);
}
-// CHECK: test_vshr_n_u64
+// CHECK-LABEL: test_vshr_n_u64
// CHECK: vshr.u64 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint64x1_t test_vshr_n_u64(uint64x1_t a) {
return vshr_n_u64(a, 1);
}
-// CHECK: test_vshrq_n_s8
+// CHECK-LABEL: test_vshrq_n_s8
// CHECK: vshr.s8 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int8x16_t test_vshrq_n_s8(int8x16_t a) {
return vshrq_n_s8(a, 1);
}
-// CHECK: test_vshrq_n_s16
+// CHECK-LABEL: test_vshrq_n_s16
// CHECK: vshr.s16 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int16x8_t test_vshrq_n_s16(int16x8_t a) {
return vshrq_n_s16(a, 1);
}
-// CHECK: test_vshrq_n_s32
+// CHECK-LABEL: test_vshrq_n_s32
// CHECK: vshr.s32 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int32x4_t test_vshrq_n_s32(int32x4_t a) {
return vshrq_n_s32(a, 1);
}
-// CHECK: test_vshrq_n_s64
+// CHECK-LABEL: test_vshrq_n_s64
// CHECK: vshr.s64 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int64x2_t test_vshrq_n_s64(int64x2_t a) {
return vshrq_n_s64(a, 1);
}
-// CHECK: test_vshrq_n_u8
+// CHECK-LABEL: test_vshrq_n_u8
// CHECK: vshr.u8 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint8x16_t test_vshrq_n_u8(uint8x16_t a) {
return vshrq_n_u8(a, 1);
}
-// CHECK: test_vshrq_n_u16
+// CHECK-LABEL: test_vshrq_n_u16
// CHECK: vshr.u16 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint16x8_t test_vshrq_n_u16(uint16x8_t a) {
return vshrq_n_u16(a, 1);
}
-// CHECK: test_vshrq_n_u32
+// CHECK-LABEL: test_vshrq_n_u32
// CHECK: vshr.u32 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint32x4_t test_vshrq_n_u32(uint32x4_t a) {
return vshrq_n_u32(a, 1);
}
-// CHECK: test_vshrq_n_u64
+// CHECK-LABEL: test_vshrq_n_u64
// CHECK: vshr.u64 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint64x2_t test_vshrq_n_u64(uint64x2_t a) {
return vshrq_n_u64(a, 1);
}
-// CHECK: test_vsli_n_s8
+// CHECK-LABEL: test_vsli_n_s8
// CHECK: vsli.8 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int8x8_t test_vsli_n_s8(int8x8_t a, int8x8_t b) {
return vsli_n_s8(a, b, 1);
}
-// CHECK: test_vsli_n_s16
+// CHECK-LABEL: test_vsli_n_s16
// CHECK: vsli.16 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int16x4_t test_vsli_n_s16(int16x4_t a, int16x4_t b) {
return vsli_n_s16(a, b, 1);
}
-// CHECK: test_vsli_n_s32
+// CHECK-LABEL: test_vsli_n_s32
// CHECK: vsli.32 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int32x2_t test_vsli_n_s32(int32x2_t a, int32x2_t b) {
return vsli_n_s32(a, b, 1);
}
-// CHECK: test_vsli_n_s64
+// CHECK-LABEL: test_vsli_n_s64
// CHECK: vsli.64 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int64x1_t test_vsli_n_s64(int64x1_t a, int64x1_t b) {
return vsli_n_s64(a, b, 1);
}
-// CHECK: test_vsli_n_u8
+// CHECK-LABEL: test_vsli_n_u8
// CHECK: vsli.8 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint8x8_t test_vsli_n_u8(uint8x8_t a, uint8x8_t b) {
return vsli_n_u8(a, b, 1);
}
-// CHECK: test_vsli_n_u16
+// CHECK-LABEL: test_vsli_n_u16
// CHECK: vsli.16 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint16x4_t test_vsli_n_u16(uint16x4_t a, uint16x4_t b) {
return vsli_n_u16(a, b, 1);
}
-// CHECK: test_vsli_n_u32
+// CHECK-LABEL: test_vsli_n_u32
// CHECK: vsli.32 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint32x2_t test_vsli_n_u32(uint32x2_t a, uint32x2_t b) {
return vsli_n_u32(a, b, 1);
}
-// CHECK: test_vsli_n_u64
+// CHECK-LABEL: test_vsli_n_u64
// CHECK: vsli.64 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint64x1_t test_vsli_n_u64(uint64x1_t a, uint64x1_t b) {
return vsli_n_u64(a, b, 1);
}
-// CHECK: test_vsli_n_p8
+// CHECK-LABEL: test_vsli_n_p8
// CHECK: vsli.8 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
poly8x8_t test_vsli_n_p8(poly8x8_t a, poly8x8_t b) {
return vsli_n_p8(a, b, 1);
}
-// CHECK: test_vsli_n_p16
+// CHECK-LABEL: test_vsli_n_p16
// CHECK: vsli.16 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
poly16x4_t test_vsli_n_p16(poly16x4_t a, poly16x4_t b) {
return vsli_n_p16(a, b, 1);
}
-// CHECK: test_vsliq_n_s8
+// CHECK-LABEL: test_vsliq_n_s8
// CHECK: vsli.8 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int8x16_t test_vsliq_n_s8(int8x16_t a, int8x16_t b) {
return vsliq_n_s8(a, b, 1);
}
-// CHECK: test_vsliq_n_s16
+// CHECK-LABEL: test_vsliq_n_s16
// CHECK: vsli.16 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int16x8_t test_vsliq_n_s16(int16x8_t a, int16x8_t b) {
return vsliq_n_s16(a, b, 1);
}
-// CHECK: test_vsliq_n_s32
+// CHECK-LABEL: test_vsliq_n_s32
// CHECK: vsli.32 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int32x4_t test_vsliq_n_s32(int32x4_t a, int32x4_t b) {
return vsliq_n_s32(a, b, 1);
}
-// CHECK: test_vsliq_n_s64
+// CHECK-LABEL: test_vsliq_n_s64
// CHECK: vsli.64 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int64x2_t test_vsliq_n_s64(int64x2_t a, int64x2_t b) {
return vsliq_n_s64(a, b, 1);
}
-// CHECK: test_vsliq_n_u8
+// CHECK-LABEL: test_vsliq_n_u8
// CHECK: vsli.8 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint8x16_t test_vsliq_n_u8(uint8x16_t a, uint8x16_t b) {
return vsliq_n_u8(a, b, 1);
}
-// CHECK: test_vsliq_n_u16
+// CHECK-LABEL: test_vsliq_n_u16
// CHECK: vsli.16 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint16x8_t test_vsliq_n_u16(uint16x8_t a, uint16x8_t b) {
return vsliq_n_u16(a, b, 1);
}
-// CHECK: test_vsliq_n_u32
+// CHECK-LABEL: test_vsliq_n_u32
// CHECK: vsli.32 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint32x4_t test_vsliq_n_u32(uint32x4_t a, uint32x4_t b) {
return vsliq_n_u32(a, b, 1);
}
-// CHECK: test_vsliq_n_u64
+// CHECK-LABEL: test_vsliq_n_u64
// CHECK: vsli.64 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint64x2_t test_vsliq_n_u64(uint64x2_t a, uint64x2_t b) {
return vsliq_n_u64(a, b, 1);
}
-// CHECK: test_vsliq_n_p8
+// CHECK-LABEL: test_vsliq_n_p8
// CHECK: vsli.8 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
poly8x16_t test_vsliq_n_p8(poly8x16_t a, poly8x16_t b) {
return vsliq_n_p8(a, b, 1);
}
-// CHECK: test_vsliq_n_p16
+// CHECK-LABEL: test_vsliq_n_p16
// CHECK: vsli.16 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
poly16x8_t test_vsliq_n_p16(poly16x8_t a, poly16x8_t b) {
return vsliq_n_p16(a, b, 1);
}
-// CHECK: test_vsra_n_s8
+// CHECK-LABEL: test_vsra_n_s8
// CHECK: vsra.s8 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int8x8_t test_vsra_n_s8(int8x8_t a, int8x8_t b) {
return vsra_n_s8(a, b, 1);
}
-// CHECK: test_vsra_n_s16
+// CHECK-LABEL: test_vsra_n_s16
// CHECK: vsra.s16 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int16x4_t test_vsra_n_s16(int16x4_t a, int16x4_t b) {
return vsra_n_s16(a, b, 1);
}
-// CHECK: test_vsra_n_s32
+// CHECK-LABEL: test_vsra_n_s32
// CHECK: vsra.s32 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int32x2_t test_vsra_n_s32(int32x2_t a, int32x2_t b) {
return vsra_n_s32(a, b, 1);
}
-// CHECK: test_vsra_n_s64
+// CHECK-LABEL: test_vsra_n_s64
// CHECK: vsra.s64 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int64x1_t test_vsra_n_s64(int64x1_t a, int64x1_t b) {
return vsra_n_s64(a, b, 1);
}
-// CHECK: test_vsra_n_u8
+// CHECK-LABEL: test_vsra_n_u8
// CHECK: vsra.u8 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint8x8_t test_vsra_n_u8(uint8x8_t a, uint8x8_t b) {
return vsra_n_u8(a, b, 1);
}
-// CHECK: test_vsra_n_u16
+// CHECK-LABEL: test_vsra_n_u16
// CHECK: vsra.u16 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint16x4_t test_vsra_n_u16(uint16x4_t a, uint16x4_t b) {
return vsra_n_u16(a, b, 1);
}
-// CHECK: test_vsra_n_u32
+// CHECK-LABEL: test_vsra_n_u32
// CHECK: vsra.u32 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint32x2_t test_vsra_n_u32(uint32x2_t a, uint32x2_t b) {
return vsra_n_u32(a, b, 1);
}
-// CHECK: test_vsra_n_u64
+// CHECK-LABEL: test_vsra_n_u64
// CHECK: vsra.u64 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint64x1_t test_vsra_n_u64(uint64x1_t a, uint64x1_t b) {
return vsra_n_u64(a, b, 1);
}
-// CHECK: test_vsraq_n_s8
+// CHECK-LABEL: test_vsraq_n_s8
// CHECK: vsra.s8 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int8x16_t test_vsraq_n_s8(int8x16_t a, int8x16_t b) {
return vsraq_n_s8(a, b, 1);
}
-// CHECK: test_vsraq_n_s16
+// CHECK-LABEL: test_vsraq_n_s16
// CHECK: vsra.s16 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int16x8_t test_vsraq_n_s16(int16x8_t a, int16x8_t b) {
return vsraq_n_s16(a, b, 1);
}
-// CHECK: test_vsraq_n_s32
+// CHECK-LABEL: test_vsraq_n_s32
// CHECK: vsra.s32 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int32x4_t test_vsraq_n_s32(int32x4_t a, int32x4_t b) {
return vsraq_n_s32(a, b, 1);
}
-// CHECK: test_vsraq_n_s64
+// CHECK-LABEL: test_vsraq_n_s64
// CHECK: vsra.s64 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int64x2_t test_vsraq_n_s64(int64x2_t a, int64x2_t b) {
return vsraq_n_s64(a, b, 1);
}
-// CHECK: test_vsraq_n_u8
+// CHECK-LABEL: test_vsraq_n_u8
// CHECK: vsra.u8 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint8x16_t test_vsraq_n_u8(uint8x16_t a, uint8x16_t b) {
return vsraq_n_u8(a, b, 1);
}
-// CHECK: test_vsraq_n_u16
+// CHECK-LABEL: test_vsraq_n_u16
// CHECK: vsra.u16 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint16x8_t test_vsraq_n_u16(uint16x8_t a, uint16x8_t b) {
return vsraq_n_u16(a, b, 1);
}
-// CHECK: test_vsraq_n_u32
+// CHECK-LABEL: test_vsraq_n_u32
// CHECK: vsra.u32 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint32x4_t test_vsraq_n_u32(uint32x4_t a, uint32x4_t b) {
return vsraq_n_u32(a, b, 1);
}
-// CHECK: test_vsraq_n_u64
+// CHECK-LABEL: test_vsraq_n_u64
// CHECK: vsra.u64 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint64x2_t test_vsraq_n_u64(uint64x2_t a, uint64x2_t b) {
return vsraq_n_u64(a, b, 1);
}
-// CHECK: test_vsri_n_s8
+// CHECK-LABEL: test_vsri_n_s8
// CHECK: vsri.8 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int8x8_t test_vsri_n_s8(int8x8_t a, int8x8_t b) {
return vsri_n_s8(a, b, 1);
}
-// CHECK: test_vsri_n_s16
+// CHECK-LABEL: test_vsri_n_s16
// CHECK: vsri.16 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int16x4_t test_vsri_n_s16(int16x4_t a, int16x4_t b) {
return vsri_n_s16(a, b, 1);
}
-// CHECK: test_vsri_n_s32
+// CHECK-LABEL: test_vsri_n_s32
// CHECK: vsri.32 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int32x2_t test_vsri_n_s32(int32x2_t a, int32x2_t b) {
return vsri_n_s32(a, b, 1);
}
-// CHECK: test_vsri_n_s64
+// CHECK-LABEL: test_vsri_n_s64
// CHECK: vsri.64 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
int64x1_t test_vsri_n_s64(int64x1_t a, int64x1_t b) {
return vsri_n_s64(a, b, 1);
}
-// CHECK: test_vsri_n_u8
+// CHECK-LABEL: test_vsri_n_u8
// CHECK: vsri.8 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint8x8_t test_vsri_n_u8(uint8x8_t a, uint8x8_t b) {
return vsri_n_u8(a, b, 1);
}
-// CHECK: test_vsri_n_u16
+// CHECK-LABEL: test_vsri_n_u16
// CHECK: vsri.16 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint16x4_t test_vsri_n_u16(uint16x4_t a, uint16x4_t b) {
return vsri_n_u16(a, b, 1);
}
-// CHECK: test_vsri_n_u32
+// CHECK-LABEL: test_vsri_n_u32
// CHECK: vsri.32 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint32x2_t test_vsri_n_u32(uint32x2_t a, uint32x2_t b) {
return vsri_n_u32(a, b, 1);
}
-// CHECK: test_vsri_n_u64
+// CHECK-LABEL: test_vsri_n_u64
// CHECK: vsri.64 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
uint64x1_t test_vsri_n_u64(uint64x1_t a, uint64x1_t b) {
return vsri_n_u64(a, b, 1);
}
-// CHECK: test_vsri_n_p8
+// CHECK-LABEL: test_vsri_n_p8
// CHECK: vsri.8 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
poly8x8_t test_vsri_n_p8(poly8x8_t a, poly8x8_t b) {
return vsri_n_p8(a, b, 1);
}
-// CHECK: test_vsri_n_p16
+// CHECK-LABEL: test_vsri_n_p16
// CHECK: vsri.16 d{{[0-9]+}}, d{{[0-9]+}}, #{{[0-9]+}}
poly16x4_t test_vsri_n_p16(poly16x4_t a, poly16x4_t b) {
return vsri_n_p16(a, b, 1);
}
-// CHECK: test_vsriq_n_s8
+// CHECK-LABEL: test_vsriq_n_s8
// CHECK: vsri.8 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int8x16_t test_vsriq_n_s8(int8x16_t a, int8x16_t b) {
return vsriq_n_s8(a, b, 1);
}
-// CHECK: test_vsriq_n_s16
+// CHECK-LABEL: test_vsriq_n_s16
// CHECK: vsri.16 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int16x8_t test_vsriq_n_s16(int16x8_t a, int16x8_t b) {
return vsriq_n_s16(a, b, 1);
}
-// CHECK: test_vsriq_n_s32
+// CHECK-LABEL: test_vsriq_n_s32
// CHECK: vsri.32 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int32x4_t test_vsriq_n_s32(int32x4_t a, int32x4_t b) {
return vsriq_n_s32(a, b, 1);
}
-// CHECK: test_vsriq_n_s64
+// CHECK-LABEL: test_vsriq_n_s64
// CHECK: vsri.64 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
int64x2_t test_vsriq_n_s64(int64x2_t a, int64x2_t b) {
return vsriq_n_s64(a, b, 1);
}
-// CHECK: test_vsriq_n_u8
+// CHECK-LABEL: test_vsriq_n_u8
// CHECK: vsri.8 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint8x16_t test_vsriq_n_u8(uint8x16_t a, uint8x16_t b) {
return vsriq_n_u8(a, b, 1);
}
-// CHECK: test_vsriq_n_u16
+// CHECK-LABEL: test_vsriq_n_u16
// CHECK: vsri.16 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint16x8_t test_vsriq_n_u16(uint16x8_t a, uint16x8_t b) {
return vsriq_n_u16(a, b, 1);
}
-// CHECK: test_vsriq_n_u32
+// CHECK-LABEL: test_vsriq_n_u32
// CHECK: vsri.32 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint32x4_t test_vsriq_n_u32(uint32x4_t a, uint32x4_t b) {
return vsriq_n_u32(a, b, 1);
}
-// CHECK: test_vsriq_n_u64
+// CHECK-LABEL: test_vsriq_n_u64
// CHECK: vsri.64 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
uint64x2_t test_vsriq_n_u64(uint64x2_t a, uint64x2_t b) {
return vsriq_n_u64(a, b, 1);
}
-// CHECK: test_vsriq_n_p8
+// CHECK-LABEL: test_vsriq_n_p8
// CHECK: vsri.8 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
poly8x16_t test_vsriq_n_p8(poly8x16_t a, poly8x16_t b) {
return vsriq_n_p8(a, b, 1);
}
-// CHECK: test_vsriq_n_p16
+// CHECK-LABEL: test_vsriq_n_p16
// CHECK: vsri.16 q{{[0-9]+}}, q{{[0-9]+}}, #{{[0-9]+}}
poly16x8_t test_vsriq_n_p16(poly16x8_t a, poly16x8_t b) {
return vsriq_n_p16(a, b, 1);
}
-// CHECK: test_vst1q_u8
+// CHECK-LABEL: test_vst1q_u8
// CHECK: vst1.8 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst1q_u8(uint8_t * a, uint8x16_t b) {
vst1q_u8(a, b);
}
-// CHECK: test_vst1q_u16
+// CHECK-LABEL: test_vst1q_u16
// CHECK: vst1.16 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst1q_u16(uint16_t * a, uint16x8_t b) {
vst1q_u16(a, b);
}
-// CHECK: test_vst1q_u32
+// CHECK-LABEL: test_vst1q_u32
// CHECK: vst1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst1q_u32(uint32_t * a, uint32x4_t b) {
vst1q_u32(a, b);
}
-// CHECK: test_vst1q_u64
-// CHECK: vst1.64 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
+// CHECK-LABEL: test_vst1q_u64
+// CHECK: vst1.64 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}{{(:64)?}}]
void test_vst1q_u64(uint64_t * a, uint64x2_t b) {
vst1q_u64(a, b);
}
-// CHECK: test_vst1q_s8
+// CHECK-LABEL: test_vst1q_s8
// CHECK: vst1.8 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst1q_s8(int8_t * a, int8x16_t b) {
vst1q_s8(a, b);
}
-// CHECK: test_vst1q_s16
+// CHECK-LABEL: test_vst1q_s16
// CHECK: vst1.16 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst1q_s16(int16_t * a, int16x8_t b) {
vst1q_s16(a, b);
}
-// CHECK: test_vst1q_s32
+// CHECK-LABEL: test_vst1q_s32
// CHECK: vst1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst1q_s32(int32_t * a, int32x4_t b) {
vst1q_s32(a, b);
}
-// CHECK: test_vst1q_s64
-// CHECK: vst1.64 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
+// CHECK-LABEL: test_vst1q_s64
+// CHECK: vst1.64 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}{{(:64)?}}]
void test_vst1q_s64(int64_t * a, int64x2_t b) {
vst1q_s64(a, b);
}
-// CHECK: test_vst1q_f16
+// CHECK-LABEL: test_vst1q_f16
// CHECK: vst1.16 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst1q_f16(float16_t * a, float16x8_t b) {
vst1q_f16(a, b);
}
-// CHECK: test_vst1q_f32
+// CHECK-LABEL: test_vst1q_f32
// CHECK: vst1.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst1q_f32(float32_t * a, float32x4_t b) {
vst1q_f32(a, b);
}
-// CHECK: test_vst1q_p8
+// CHECK-LABEL: test_vst1q_p8
// CHECK: vst1.8 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst1q_p8(poly8_t * a, poly8x16_t b) {
vst1q_p8(a, b);
}
-// CHECK: test_vst1q_p16
+// CHECK-LABEL: test_vst1q_p16
// CHECK: vst1.16 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst1q_p16(poly16_t * a, poly16x8_t b) {
vst1q_p16(a, b);
}
-// CHECK: test_vst1_u8
+// CHECK-LABEL: test_vst1_u8
// CHECK: vst1.8 {d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst1_u8(uint8_t * a, uint8x8_t b) {
vst1_u8(a, b);
}
-// CHECK: test_vst1_u16
+// CHECK-LABEL: test_vst1_u16
// CHECK: vst1.16 {d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst1_u16(uint16_t * a, uint16x4_t b) {
vst1_u16(a, b);
}
-// CHECK: test_vst1_u32
+// CHECK-LABEL: test_vst1_u32
// CHECK: vst1.32 {d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst1_u32(uint32_t * a, uint32x2_t b) {
vst1_u32(a, b);
}
-// CHECK: test_vst1_u64
-// CHECK: vst1.64 {d{{[0-9]+}}}, [r{{[0-9]+}}]
+// CHECK-LABEL: test_vst1_u64
+// CHECK: vst1.64 {d{{[0-9]+}}}, [r{{[0-9]+}}{{(:64)?}}]
void test_vst1_u64(uint64_t * a, uint64x1_t b) {
vst1_u64(a, b);
}
-// CHECK: test_vst1_s8
+// CHECK-LABEL: test_vst1_s8
// CHECK: vst1.8 {d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst1_s8(int8_t * a, int8x8_t b) {
vst1_s8(a, b);
}
-// CHECK: test_vst1_s16
+// CHECK-LABEL: test_vst1_s16
// CHECK: vst1.16 {d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst1_s16(int16_t * a, int16x4_t b) {
vst1_s16(a, b);
}
-// CHECK: test_vst1_s32
+// CHECK-LABEL: test_vst1_s32
// CHECK: vst1.32 {d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst1_s32(int32_t * a, int32x2_t b) {
vst1_s32(a, b);
}
-// CHECK: test_vst1_s64
-// CHECK: vst1.64 {d{{[0-9]+}}}, [r{{[0-9]+}}]
+// CHECK-LABEL: test_vst1_s64
+// CHECK: vst1.64 {d{{[0-9]+}}}, [r{{[0-9]+}}{{(:64)?}}]
void test_vst1_s64(int64_t * a, int64x1_t b) {
vst1_s64(a, b);
}
-// CHECK: test_vst1_f16
+// CHECK-LABEL: test_vst1_f16
// CHECK: vst1.16 {d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst1_f16(float16_t * a, float16x4_t b) {
vst1_f16(a, b);
}
-// CHECK: test_vst1_f32
+// CHECK-LABEL: test_vst1_f32
// CHECK: vst1.32 {d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst1_f32(float32_t * a, float32x2_t b) {
vst1_f32(a, b);
}
-// CHECK: test_vst1_p8
+// CHECK-LABEL: test_vst1_p8
// CHECK: vst1.8 {d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst1_p8(poly8_t * a, poly8x8_t b) {
vst1_p8(a, b);
}
-// CHECK: test_vst1_p16
+// CHECK-LABEL: test_vst1_p16
// CHECK: vst1.16 {d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst1_p16(poly16_t * a, poly16x4_t b) {
vst1_p16(a, b);
}
-// CHECK: test_vst1q_lane_u8
+// CHECK-LABEL: test_vst1q_lane_u8
// CHECK: vst1.8 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst1q_lane_u8(uint8_t * a, uint8x16_t b) {
vst1q_lane_u8(a, b, 15);
}
-// CHECK: test_vst1q_lane_u16
+// CHECK-LABEL: test_vst1q_lane_u16
// CHECK: vst1.16 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:16]
void test_vst1q_lane_u16(uint16_t * a, uint16x8_t b) {
vst1q_lane_u16(a, b, 7);
}
-// CHECK: test_vst1q_lane_u32
+// CHECK-LABEL: test_vst1q_lane_u32
// CHECK: vst1.32 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:32]
void test_vst1q_lane_u32(uint32_t * a, uint32x4_t b) {
vst1q_lane_u32(a, b, 3);
}
-// CHECK: test_vst1q_lane_u64
+// CHECK-LABEL: test_vst1q_lane_u64
// CHECK: {{str|vstr|vmov}}
void test_vst1q_lane_u64(uint64_t * a, uint64x2_t b) {
vst1q_lane_u64(a, b, 1);
}
-// CHECK: test_vst1q_lane_s8
+// CHECK-LABEL: test_vst1q_lane_s8
// CHECK: vst1.8 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst1q_lane_s8(int8_t * a, int8x16_t b) {
vst1q_lane_s8(a, b, 15);
}
-// CHECK: test_vst1q_lane_s16
+// CHECK-LABEL: test_vst1q_lane_s16
// CHECK: vst1.16 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:16]
void test_vst1q_lane_s16(int16_t * a, int16x8_t b) {
vst1q_lane_s16(a, b, 7);
}
-// CHECK: test_vst1q_lane_s32
+// CHECK-LABEL: test_vst1q_lane_s32
// CHECK: vst1.32 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:32]
void test_vst1q_lane_s32(int32_t * a, int32x4_t b) {
vst1q_lane_s32(a, b, 3);
}
-// CHECK: test_vst1q_lane_s64
+// CHECK-LABEL: test_vst1q_lane_s64
// CHECK: {{str|vstr|vmov}}
void test_vst1q_lane_s64(int64_t * a, int64x2_t b) {
vst1q_lane_s64(a, b, 1);
}
-// CHECK: test_vst1q_lane_f16
+// CHECK-LABEL: test_vst1q_lane_f16
// CHECK: vst1.16 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:16]
void test_vst1q_lane_f16(float16_t * a, float16x8_t b) {
vst1q_lane_f16(a, b, 7);
}
-// CHECK: test_vst1q_lane_f32
+// CHECK-LABEL: test_vst1q_lane_f32
// CHECK: vst1.32 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:32]
void test_vst1q_lane_f32(float32_t * a, float32x4_t b) {
vst1q_lane_f32(a, b, 3);
}
-// CHECK: test_vst1q_lane_p8
+// CHECK-LABEL: test_vst1q_lane_p8
// CHECK: vst1.8 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst1q_lane_p8(poly8_t * a, poly8x16_t b) {
vst1q_lane_p8(a, b, 15);
}
-// CHECK: test_vst1q_lane_p16
+// CHECK-LABEL: test_vst1q_lane_p16
// CHECK: vst1.16 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:16]
void test_vst1q_lane_p16(poly16_t * a, poly16x8_t b) {
vst1q_lane_p16(a, b, 7);
}
-// CHECK: test_vst1_lane_u8
+// CHECK-LABEL: test_vst1_lane_u8
// CHECK: vst1.8 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst1_lane_u8(uint8_t * a, uint8x8_t b) {
vst1_lane_u8(a, b, 7);
}
-// CHECK: test_vst1_lane_u16
+// CHECK-LABEL: test_vst1_lane_u16
// CHECK: vst1.16 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:16]
void test_vst1_lane_u16(uint16_t * a, uint16x4_t b) {
vst1_lane_u16(a, b, 3);
}
-// CHECK: test_vst1_lane_u32
+// CHECK-LABEL: test_vst1_lane_u32
// CHECK: vst1.32 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:32]
void test_vst1_lane_u32(uint32_t * a, uint32x2_t b) {
vst1_lane_u32(a, b, 1);
}
-// CHECK: test_vst1_lane_u64
+// CHECK-LABEL: test_vst1_lane_u64
// CHECK: {{str|vstr|vmov}}
void test_vst1_lane_u64(uint64_t * a, uint64x1_t b) {
vst1_lane_u64(a, b, 0);
}
-// CHECK: test_vst1_lane_s8
+// CHECK-LABEL: test_vst1_lane_s8
// CHECK: vst1.8 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst1_lane_s8(int8_t * a, int8x8_t b) {
vst1_lane_s8(a, b, 7);
}
-// CHECK: test_vst1_lane_s16
+// CHECK-LABEL: test_vst1_lane_s16
// CHECK: vst1.16 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:16]
void test_vst1_lane_s16(int16_t * a, int16x4_t b) {
vst1_lane_s16(a, b, 3);
}
-// CHECK: test_vst1_lane_s32
+// CHECK-LABEL: test_vst1_lane_s32
// CHECK: vst1.32 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:32]
void test_vst1_lane_s32(int32_t * a, int32x2_t b) {
vst1_lane_s32(a, b, 1);
}
-// CHECK: test_vst1_lane_s64
+// CHECK-LABEL: test_vst1_lane_s64
// CHECK: {{str|vstr|vmov}}
void test_vst1_lane_s64(int64_t * a, int64x1_t b) {
vst1_lane_s64(a, b, 0);
}
-// CHECK: test_vst1_lane_f16
+// CHECK-LABEL: test_vst1_lane_f16
// CHECK: vst1.16 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:16]
void test_vst1_lane_f16(float16_t * a, float16x4_t b) {
vst1_lane_f16(a, b, 3);
}
-// CHECK: test_vst1_lane_f32
+// CHECK-LABEL: test_vst1_lane_f32
// CHECK: vst1.32 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:32]
void test_vst1_lane_f32(float32_t * a, float32x2_t b) {
vst1_lane_f32(a, b, 1);
}
-// CHECK: test_vst1_lane_p8
+// CHECK-LABEL: test_vst1_lane_p8
// CHECK: vst1.8 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst1_lane_p8(poly8_t * a, poly8x8_t b) {
vst1_lane_p8(a, b, 7);
}
-// CHECK: test_vst1_lane_p16
+// CHECK-LABEL: test_vst1_lane_p16
// CHECK: vst1.16 {d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}:16]
void test_vst1_lane_p16(poly16_t * a, poly16x4_t b) {
vst1_lane_p16(a, b, 3);
}
-// CHECK: test_vst2q_u8
+// CHECK-LABEL: test_vst2q_u8
// CHECK: vst2.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst2q_u8(uint8_t * a, uint8x16x2_t b) {
vst2q_u8(a, b);
}
-// CHECK: test_vst2q_u16
+// CHECK-LABEL: test_vst2q_u16
// CHECK: vst2.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst2q_u16(uint16_t * a, uint16x8x2_t b) {
vst2q_u16(a, b);
}
-// CHECK: test_vst2q_u32
+// CHECK-LABEL: test_vst2q_u32
// CHECK: vst2.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst2q_u32(uint32_t * a, uint32x4x2_t b) {
vst2q_u32(a, b);
}
-// CHECK: test_vst2q_s8
+// CHECK-LABEL: test_vst2q_s8
// CHECK: vst2.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst2q_s8(int8_t * a, int8x16x2_t b) {
vst2q_s8(a, b);
}
-// CHECK: test_vst2q_s16
+// CHECK-LABEL: test_vst2q_s16
// CHECK: vst2.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst2q_s16(int16_t * a, int16x8x2_t b) {
vst2q_s16(a, b);
}
-// CHECK: test_vst2q_s32
+// CHECK-LABEL: test_vst2q_s32
// CHECK: vst2.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst2q_s32(int32_t * a, int32x4x2_t b) {
vst2q_s32(a, b);
}
-// CHECK: test_vst2q_f16
+// CHECK-LABEL: test_vst2q_f16
// CHECK: vst2.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst2q_f16(float16_t * a, float16x8x2_t b) {
vst2q_f16(a, b);
}
-// CHECK: test_vst2q_f32
+// CHECK-LABEL: test_vst2q_f32
// CHECK: vst2.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst2q_f32(float32_t * a, float32x4x2_t b) {
vst2q_f32(a, b);
}
-// CHECK: test_vst2q_p8
+// CHECK-LABEL: test_vst2q_p8
// CHECK: vst2.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst2q_p8(poly8_t * a, poly8x16x2_t b) {
vst2q_p8(a, b);
}
-// CHECK: test_vst2q_p16
+// CHECK-LABEL: test_vst2q_p16
// CHECK: vst2.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst2q_p16(poly16_t * a, poly16x8x2_t b) {
vst2q_p16(a, b);
}
-// CHECK: test_vst2_u8
+// CHECK-LABEL: test_vst2_u8
// CHECK: vst2.8 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst2_u8(uint8_t * a, uint8x8x2_t b) {
vst2_u8(a, b);
}
-// CHECK: test_vst2_u16
+// CHECK-LABEL: test_vst2_u16
// CHECK: vst2.16 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst2_u16(uint16_t * a, uint16x4x2_t b) {
vst2_u16(a, b);
}
-// CHECK: test_vst2_u32
+// CHECK-LABEL: test_vst2_u32
// CHECK: vst2.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst2_u32(uint32_t * a, uint32x2x2_t b) {
vst2_u32(a, b);
}
-// CHECK: test_vst2_u64
+// CHECK-LABEL: test_vst2_u64
// CHECK: vst1.64
void test_vst2_u64(uint64_t * a, uint64x1x2_t b) {
vst2_u64(a, b);
}
-// CHECK: test_vst2_s8
+// CHECK-LABEL: test_vst2_s8
// CHECK: vst2.8 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst2_s8(int8_t * a, int8x8x2_t b) {
vst2_s8(a, b);
}
-// CHECK: test_vst2_s16
+// CHECK-LABEL: test_vst2_s16
// CHECK: vst2.16 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst2_s16(int16_t * a, int16x4x2_t b) {
vst2_s16(a, b);
}
-// CHECK: test_vst2_s32
+// CHECK-LABEL: test_vst2_s32
// CHECK: vst2.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst2_s32(int32_t * a, int32x2x2_t b) {
vst2_s32(a, b);
}
-// CHECK: test_vst2_s64
+// CHECK-LABEL: test_vst2_s64
// CHECK: vst1.64
void test_vst2_s64(int64_t * a, int64x1x2_t b) {
vst2_s64(a, b);
}
-// CHECK: test_vst2_f16
+// CHECK-LABEL: test_vst2_f16
// CHECK: vst2.16 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst2_f16(float16_t * a, float16x4x2_t b) {
vst2_f16(a, b);
}
-// CHECK: test_vst2_f32
+// CHECK-LABEL: test_vst2_f32
// CHECK: vst2.32 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst2_f32(float32_t * a, float32x2x2_t b) {
vst2_f32(a, b);
}
-// CHECK: test_vst2_p8
+// CHECK-LABEL: test_vst2_p8
// CHECK: vst2.8 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst2_p8(poly8_t * a, poly8x8x2_t b) {
vst2_p8(a, b);
}
-// CHECK: test_vst2_p16
+// CHECK-LABEL: test_vst2_p16
// CHECK: vst2.16 {d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst2_p16(poly16_t * a, poly16x4x2_t b) {
vst2_p16(a, b);
}
-// CHECK: test_vst2q_lane_u16
+// CHECK-LABEL: test_vst2q_lane_u16
// CHECK: vst2.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst2q_lane_u16(uint16_t * a, uint16x8x2_t b) {
vst2q_lane_u16(a, b, 7);
}
-// CHECK: test_vst2q_lane_u32
+// CHECK-LABEL: test_vst2q_lane_u32
// CHECK: vst2.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst2q_lane_u32(uint32_t * a, uint32x4x2_t b) {
vst2q_lane_u32(a, b, 3);
}
-// CHECK: test_vst2q_lane_s16
+// CHECK-LABEL: test_vst2q_lane_s16
// CHECK: vst2.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst2q_lane_s16(int16_t * a, int16x8x2_t b) {
vst2q_lane_s16(a, b, 7);
}
-// CHECK: test_vst2q_lane_s32
+// CHECK-LABEL: test_vst2q_lane_s32
// CHECK: vst2.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst2q_lane_s32(int32_t * a, int32x4x2_t b) {
vst2q_lane_s32(a, b, 3);
}
-// CHECK: test_vst2q_lane_f16
+// CHECK-LABEL: test_vst2q_lane_f16
// CHECK: vst2.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst2q_lane_f16(float16_t * a, float16x8x2_t b) {
vst2q_lane_f16(a, b, 7);
}
-// CHECK: test_vst2q_lane_f32
+// CHECK-LABEL: test_vst2q_lane_f32
// CHECK: vst2.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst2q_lane_f32(float32_t * a, float32x4x2_t b) {
vst2q_lane_f32(a, b, 3);
}
-// CHECK: test_vst2q_lane_p16
+// CHECK-LABEL: test_vst2q_lane_p16
// CHECK: vst2.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst2q_lane_p16(poly16_t * a, poly16x8x2_t b) {
vst2q_lane_p16(a, b, 7);
}
-// CHECK: test_vst2_lane_u8
+// CHECK-LABEL: test_vst2_lane_u8
// CHECK: vst2.8 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst2_lane_u8(uint8_t * a, uint8x8x2_t b) {
vst2_lane_u8(a, b, 7);
}
-// CHECK: test_vst2_lane_u16
+// CHECK-LABEL: test_vst2_lane_u16
// CHECK: vst2.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst2_lane_u16(uint16_t * a, uint16x4x2_t b) {
vst2_lane_u16(a, b, 3);
}
-// CHECK: test_vst2_lane_u32
+// CHECK-LABEL: test_vst2_lane_u32
// CHECK: vst2.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst2_lane_u32(uint32_t * a, uint32x2x2_t b) {
vst2_lane_u32(a, b, 1);
}
-// CHECK: test_vst2_lane_s8
+// CHECK-LABEL: test_vst2_lane_s8
// CHECK: vst2.8 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst2_lane_s8(int8_t * a, int8x8x2_t b) {
vst2_lane_s8(a, b, 7);
}
-// CHECK: test_vst2_lane_s16
+// CHECK-LABEL: test_vst2_lane_s16
// CHECK: vst2.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst2_lane_s16(int16_t * a, int16x4x2_t b) {
vst2_lane_s16(a, b, 3);
}
-// CHECK: test_vst2_lane_s32
+// CHECK-LABEL: test_vst2_lane_s32
// CHECK: vst2.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst2_lane_s32(int32_t * a, int32x2x2_t b) {
vst2_lane_s32(a, b, 1);
}
-// CHECK: test_vst2_lane_f16
+// CHECK-LABEL: test_vst2_lane_f16
// CHECK: vst2.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst2_lane_f16(float16_t * a, float16x4x2_t b) {
vst2_lane_f16(a, b, 3);
}
-// CHECK: test_vst2_lane_f32
+// CHECK-LABEL: test_vst2_lane_f32
// CHECK: vst2.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst2_lane_f32(float32_t * a, float32x2x2_t b) {
vst2_lane_f32(a, b, 1);
}
-// CHECK: test_vst2_lane_p8
+// CHECK-LABEL: test_vst2_lane_p8
// CHECK: vst2.8 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst2_lane_p8(poly8_t * a, poly8x8x2_t b) {
vst2_lane_p8(a, b, 7);
}
-// CHECK: test_vst2_lane_p16
+// CHECK-LABEL: test_vst2_lane_p16
// CHECK: vst2.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst2_lane_p16(poly16_t * a, poly16x4x2_t b) {
vst2_lane_p16(a, b, 3);
}
-// CHECK: test_vst3q_u8
+// CHECK-LABEL: test_vst3q_u8
// CHECK: vst3.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
void test_vst3q_u8(uint8_t * a, uint8x16x3_t b) {
vst3q_u8(a, b);
}
-// CHECK: test_vst3q_u16
+// CHECK-LABEL: test_vst3q_u16
// CHECK: vst3.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
void test_vst3q_u16(uint16_t * a, uint16x8x3_t b) {
vst3q_u16(a, b);
}
-// CHECK: test_vst3q_u32
+// CHECK-LABEL: test_vst3q_u32
// CHECK: vst3.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
void test_vst3q_u32(uint32_t * a, uint32x4x3_t b) {
vst3q_u32(a, b);
}
-// CHECK: test_vst3q_s8
+// CHECK-LABEL: test_vst3q_s8
// CHECK: vst3.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
void test_vst3q_s8(int8_t * a, int8x16x3_t b) {
vst3q_s8(a, b);
}
-// CHECK: test_vst3q_s16
+// CHECK-LABEL: test_vst3q_s16
// CHECK: vst3.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
void test_vst3q_s16(int16_t * a, int16x8x3_t b) {
vst3q_s16(a, b);
}
-// CHECK: test_vst3q_s32
+// CHECK-LABEL: test_vst3q_s32
// CHECK: vst3.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
void test_vst3q_s32(int32_t * a, int32x4x3_t b) {
vst3q_s32(a, b);
}
-// CHECK: test_vst3q_f16
+// CHECK-LABEL: test_vst3q_f16
// CHECK: vst3.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
void test_vst3q_f16(float16_t * a, float16x8x3_t b) {
vst3q_f16(a, b);
}
-// CHECK: test_vst3q_f32
+// CHECK-LABEL: test_vst3q_f32
// CHECK: vst3.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
void test_vst3q_f32(float32_t * a, float32x4x3_t b) {
vst3q_f32(a, b);
}
-// CHECK: test_vst3q_p8
+// CHECK-LABEL: test_vst3q_p8
// CHECK: vst3.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
void test_vst3q_p8(poly8_t * a, poly8x16x3_t b) {
vst3q_p8(a, b);
}
-// CHECK: test_vst3q_p16
+// CHECK-LABEL: test_vst3q_p16
// CHECK: vst3.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
void test_vst3q_p16(poly16_t * a, poly16x8x3_t b) {
vst3q_p16(a, b);
}
-// CHECK: test_vst3_u8
+// CHECK-LABEL: test_vst3_u8
// CHECK: vst3.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst3_u8(uint8_t * a, uint8x8x3_t b) {
vst3_u8(a, b);
}
-// CHECK: test_vst3_u16
+// CHECK-LABEL: test_vst3_u16
// CHECK: vst3.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst3_u16(uint16_t * a, uint16x4x3_t b) {
vst3_u16(a, b);
}
-// CHECK: test_vst3_u32
+// CHECK-LABEL: test_vst3_u32
// CHECK: vst3.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst3_u32(uint32_t * a, uint32x2x3_t b) {
vst3_u32(a, b);
}
-// CHECK: test_vst3_u64
+// CHECK-LABEL: test_vst3_u64
// CHECK: vst1.64
void test_vst3_u64(uint64_t * a, uint64x1x3_t b) {
vst3_u64(a, b);
}
-// CHECK: test_vst3_s8
+// CHECK-LABEL: test_vst3_s8
// CHECK: vst3.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst3_s8(int8_t * a, int8x8x3_t b) {
vst3_s8(a, b);
}
-// CHECK: test_vst3_s16
+// CHECK-LABEL: test_vst3_s16
// CHECK: vst3.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst3_s16(int16_t * a, int16x4x3_t b) {
vst3_s16(a, b);
}
-// CHECK: test_vst3_s32
+// CHECK-LABEL: test_vst3_s32
// CHECK: vst3.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst3_s32(int32_t * a, int32x2x3_t b) {
vst3_s32(a, b);
}
-// CHECK: test_vst3_s64
+// CHECK-LABEL: test_vst3_s64
// CHECK: vst1.64
void test_vst3_s64(int64_t * a, int64x1x3_t b) {
vst3_s64(a, b);
}
-// CHECK: test_vst3_f16
+// CHECK-LABEL: test_vst3_f16
// CHECK: vst3.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst3_f16(float16_t * a, float16x4x3_t b) {
vst3_f16(a, b);
}
-// CHECK: test_vst3_f32
+// CHECK-LABEL: test_vst3_f32
// CHECK: vst3.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst3_f32(float32_t * a, float32x2x3_t b) {
vst3_f32(a, b);
}
-// CHECK: test_vst3_p8
+// CHECK-LABEL: test_vst3_p8
// CHECK: vst3.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst3_p8(poly8_t * a, poly8x8x3_t b) {
vst3_p8(a, b);
}
-// CHECK: test_vst3_p16
+// CHECK-LABEL: test_vst3_p16
// CHECK: vst3.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst3_p16(poly16_t * a, poly16x4x3_t b) {
vst3_p16(a, b);
}
-// CHECK: test_vst3q_lane_u16
+// CHECK-LABEL: test_vst3q_lane_u16
// CHECK: vst3.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
void test_vst3q_lane_u16(uint16_t * a, uint16x8x3_t b) {
vst3q_lane_u16(a, b, 7);
}
-// CHECK: test_vst3q_lane_u32
+// CHECK-LABEL: test_vst3q_lane_u32
// CHECK: vst3.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
void test_vst3q_lane_u32(uint32_t * a, uint32x4x3_t b) {
vst3q_lane_u32(a, b, 3);
}
-// CHECK: test_vst3q_lane_s16
+// CHECK-LABEL: test_vst3q_lane_s16
// CHECK: vst3.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
void test_vst3q_lane_s16(int16_t * a, int16x8x3_t b) {
vst3q_lane_s16(a, b, 7);
}
-// CHECK: test_vst3q_lane_s32
+// CHECK-LABEL: test_vst3q_lane_s32
// CHECK: vst3.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
void test_vst3q_lane_s32(int32_t * a, int32x4x3_t b) {
vst3q_lane_s32(a, b, 3);
}
-// CHECK: test_vst3q_lane_f16
+// CHECK-LABEL: test_vst3q_lane_f16
// CHECK: vst3.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
void test_vst3q_lane_f16(float16_t * a, float16x8x3_t b) {
vst3q_lane_f16(a, b, 7);
}
-// CHECK: test_vst3q_lane_f32
+// CHECK-LABEL: test_vst3q_lane_f32
// CHECK: vst3.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
void test_vst3q_lane_f32(float32_t * a, float32x4x3_t b) {
vst3q_lane_f32(a, b, 3);
}
-// CHECK: test_vst3q_lane_p16
+// CHECK-LABEL: test_vst3q_lane_p16
// CHECK: vst3.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
void test_vst3q_lane_p16(poly16_t * a, poly16x8x3_t b) {
vst3q_lane_p16(a, b, 7);
}
-// CHECK: test_vst3_lane_u8
+// CHECK-LABEL: test_vst3_lane_u8
// CHECK: vst3.8 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst3_lane_u8(uint8_t * a, uint8x8x3_t b) {
vst3_lane_u8(a, b, 7);
}
-// CHECK: test_vst3_lane_u16
+// CHECK-LABEL: test_vst3_lane_u16
// CHECK: vst3.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst3_lane_u16(uint16_t * a, uint16x4x3_t b) {
vst3_lane_u16(a, b, 3);
}
-// CHECK: test_vst3_lane_u32
+// CHECK-LABEL: test_vst3_lane_u32
// CHECK: vst3.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst3_lane_u32(uint32_t * a, uint32x2x3_t b) {
vst3_lane_u32(a, b, 1);
}
-// CHECK: test_vst3_lane_s8
+// CHECK-LABEL: test_vst3_lane_s8
// CHECK: vst3.8 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst3_lane_s8(int8_t * a, int8x8x3_t b) {
vst3_lane_s8(a, b, 7);
}
-// CHECK: test_vst3_lane_s16
+// CHECK-LABEL: test_vst3_lane_s16
// CHECK: vst3.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst3_lane_s16(int16_t * a, int16x4x3_t b) {
vst3_lane_s16(a, b, 3);
}
-// CHECK: test_vst3_lane_s32
+// CHECK-LABEL: test_vst3_lane_s32
// CHECK: vst3.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst3_lane_s32(int32_t * a, int32x2x3_t b) {
vst3_lane_s32(a, b, 1);
}
-// CHECK: test_vst3_lane_f16
+// CHECK-LABEL: test_vst3_lane_f16
// CHECK: vst3.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst3_lane_f16(float16_t * a, float16x4x3_t b) {
vst3_lane_f16(a, b, 3);
}
-// CHECK: test_vst3_lane_f32
+// CHECK-LABEL: test_vst3_lane_f32
// CHECK: vst3.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst3_lane_f32(float32_t * a, float32x2x3_t b) {
vst3_lane_f32(a, b, 1);
}
-// CHECK: test_vst3_lane_p8
+// CHECK-LABEL: test_vst3_lane_p8
// CHECK: vst3.8 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst3_lane_p8(poly8_t * a, poly8x8x3_t b) {
vst3_lane_p8(a, b, 7);
}
-// CHECK: test_vst3_lane_p16
+// CHECK-LABEL: test_vst3_lane_p16
// CHECK: vst3.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst3_lane_p16(poly16_t * a, poly16x4x3_t b) {
vst3_lane_p16(a, b, 3);
}
-// CHECK: test_vst4q_u8
+// CHECK-LABEL: test_vst4q_u8
// CHECK: vst4.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
void test_vst4q_u8(uint8_t * a, uint8x16x4_t b) {
vst4q_u8(a, b);
}
-// CHECK: test_vst4q_u16
+// CHECK-LABEL: test_vst4q_u16
// CHECK: vst4.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
void test_vst4q_u16(uint16_t * a, uint16x8x4_t b) {
vst4q_u16(a, b);
}
-// CHECK: test_vst4q_u32
+// CHECK-LABEL: test_vst4q_u32
// CHECK: vst4.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
void test_vst4q_u32(uint32_t * a, uint32x4x4_t b) {
vst4q_u32(a, b);
}
-// CHECK: test_vst4q_s8
+// CHECK-LABEL: test_vst4q_s8
// CHECK: vst4.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
void test_vst4q_s8(int8_t * a, int8x16x4_t b) {
vst4q_s8(a, b);
}
-// CHECK: test_vst4q_s16
+// CHECK-LABEL: test_vst4q_s16
// CHECK: vst4.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
void test_vst4q_s16(int16_t * a, int16x8x4_t b) {
vst4q_s16(a, b);
}
-// CHECK: test_vst4q_s32
+// CHECK-LABEL: test_vst4q_s32
// CHECK: vst4.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
void test_vst4q_s32(int32_t * a, int32x4x4_t b) {
vst4q_s32(a, b);
}
-// CHECK: test_vst4q_f16
+// CHECK-LABEL: test_vst4q_f16
// CHECK: vst4.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
void test_vst4q_f16(float16_t * a, float16x8x4_t b) {
vst4q_f16(a, b);
}
-// CHECK: test_vst4q_f32
+// CHECK-LABEL: test_vst4q_f32
// CHECK: vst4.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
void test_vst4q_f32(float32_t * a, float32x4x4_t b) {
vst4q_f32(a, b);
}
-// CHECK: test_vst4q_p8
+// CHECK-LABEL: test_vst4q_p8
// CHECK: vst4.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
void test_vst4q_p8(poly8_t * a, poly8x16x4_t b) {
vst4q_p8(a, b);
}
-// CHECK: test_vst4q_p16
+// CHECK-LABEL: test_vst4q_p16
// CHECK: vst4.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}
void test_vst4q_p16(poly16_t * a, poly16x8x4_t b) {
vst4q_p16(a, b);
}
-// CHECK: test_vst4_u8
+// CHECK-LABEL: test_vst4_u8
// CHECK: vst4.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst4_u8(uint8_t * a, uint8x8x4_t b) {
vst4_u8(a, b);
}
-// CHECK: test_vst4_u16
+// CHECK-LABEL: test_vst4_u16
// CHECK: vst4.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst4_u16(uint16_t * a, uint16x4x4_t b) {
vst4_u16(a, b);
}
-// CHECK: test_vst4_u32
+// CHECK-LABEL: test_vst4_u32
// CHECK: vst4.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst4_u32(uint32_t * a, uint32x2x4_t b) {
vst4_u32(a, b);
}
-// CHECK: test_vst4_u64
+// CHECK-LABEL: test_vst4_u64
// CHECK: vst1.64
void test_vst4_u64(uint64_t * a, uint64x1x4_t b) {
vst4_u64(a, b);
}
-// CHECK: test_vst4_s8
+// CHECK-LABEL: test_vst4_s8
// CHECK: vst4.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst4_s8(int8_t * a, int8x8x4_t b) {
vst4_s8(a, b);
}
-// CHECK: test_vst4_s16
+// CHECK-LABEL: test_vst4_s16
// CHECK: vst4.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst4_s16(int16_t * a, int16x4x4_t b) {
vst4_s16(a, b);
}
-// CHECK: test_vst4_s32
+// CHECK-LABEL: test_vst4_s32
// CHECK: vst4.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst4_s32(int32_t * a, int32x2x4_t b) {
vst4_s32(a, b);
}
-// CHECK: test_vst4_s64
+// CHECK-LABEL: test_vst4_s64
// CHECK: vst1.64
void test_vst4_s64(int64_t * a, int64x1x4_t b) {
vst4_s64(a, b);
}
-// CHECK: test_vst4_f16
+// CHECK-LABEL: test_vst4_f16
// CHECK: vst4.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst4_f16(float16_t * a, float16x4x4_t b) {
vst4_f16(a, b);
}
-// CHECK: test_vst4_f32
+// CHECK-LABEL: test_vst4_f32
// CHECK: vst4.32 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst4_f32(float32_t * a, float32x2x4_t b) {
vst4_f32(a, b);
}
-// CHECK: test_vst4_p8
+// CHECK-LABEL: test_vst4_p8
// CHECK: vst4.8 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst4_p8(poly8_t * a, poly8x8x4_t b) {
vst4_p8(a, b);
}
-// CHECK: test_vst4_p16
+// CHECK-LABEL: test_vst4_p16
// CHECK: vst4.16 {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, [r{{[0-9]+}}]
void test_vst4_p16(poly16_t * a, poly16x4x4_t b) {
vst4_p16(a, b);
}
-// CHECK: test_vst4q_lane_u16
+// CHECK-LABEL: test_vst4q_lane_u16
// CHECK: vst4.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
void test_vst4q_lane_u16(uint16_t * a, uint16x8x4_t b) {
vst4q_lane_u16(a, b, 7);
}
-// CHECK: test_vst4q_lane_u32
+// CHECK-LABEL: test_vst4q_lane_u32
// CHECK: vst4.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
void test_vst4q_lane_u32(uint32_t * a, uint32x4x4_t b) {
vst4q_lane_u32(a, b, 3);
}
-// CHECK: test_vst4q_lane_s16
+// CHECK-LABEL: test_vst4q_lane_s16
// CHECK: vst4.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
void test_vst4q_lane_s16(int16_t * a, int16x8x4_t b) {
vst4q_lane_s16(a, b, 7);
}
-// CHECK: test_vst4q_lane_s32
+// CHECK-LABEL: test_vst4q_lane_s32
// CHECK: vst4.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
void test_vst4q_lane_s32(int32_t * a, int32x4x4_t b) {
vst4q_lane_s32(a, b, 3);
}
-// CHECK: test_vst4q_lane_f16
+// CHECK-LABEL: test_vst4q_lane_f16
// CHECK: vst4.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
void test_vst4q_lane_f16(float16_t * a, float16x8x4_t b) {
vst4q_lane_f16(a, b, 7);
}
-// CHECK: test_vst4q_lane_f32
+// CHECK-LABEL: test_vst4q_lane_f32
// CHECK: vst4.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
void test_vst4q_lane_f32(float32_t * a, float32x4x4_t b) {
vst4q_lane_f32(a, b, 3);
}
-// CHECK: test_vst4q_lane_p16
+// CHECK-LABEL: test_vst4q_lane_p16
// CHECK: vst4.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}
void test_vst4q_lane_p16(poly16_t * a, poly16x8x4_t b) {
vst4q_lane_p16(a, b, 7);
}
-// CHECK: test_vst4_lane_u8
+// CHECK-LABEL: test_vst4_lane_u8
// CHECK: vst4.8 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst4_lane_u8(uint8_t * a, uint8x8x4_t b) {
vst4_lane_u8(a, b, 7);
}
-// CHECK: test_vst4_lane_u16
+// CHECK-LABEL: test_vst4_lane_u16
// CHECK: vst4.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst4_lane_u16(uint16_t * a, uint16x4x4_t b) {
vst4_lane_u16(a, b, 3);
}
-// CHECK: test_vst4_lane_u32
+// CHECK-LABEL: test_vst4_lane_u32
// CHECK: vst4.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst4_lane_u32(uint32_t * a, uint32x2x4_t b) {
vst4_lane_u32(a, b, 1);
}
-// CHECK: test_vst4_lane_s8
+// CHECK-LABEL: test_vst4_lane_s8
// CHECK: vst4.8 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst4_lane_s8(int8_t * a, int8x8x4_t b) {
vst4_lane_s8(a, b, 7);
}
-// CHECK: test_vst4_lane_s16
+// CHECK-LABEL: test_vst4_lane_s16
// CHECK: vst4.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst4_lane_s16(int16_t * a, int16x4x4_t b) {
vst4_lane_s16(a, b, 3);
}
-// CHECK: test_vst4_lane_s32
+// CHECK-LABEL: test_vst4_lane_s32
// CHECK: vst4.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst4_lane_s32(int32_t * a, int32x2x4_t b) {
vst4_lane_s32(a, b, 1);
}
-// CHECK: test_vst4_lane_f16
+// CHECK-LABEL: test_vst4_lane_f16
// CHECK: vst4.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst4_lane_f16(float16_t * a, float16x4x4_t b) {
vst4_lane_f16(a, b, 3);
}
-// CHECK: test_vst4_lane_f32
+// CHECK-LABEL: test_vst4_lane_f32
// CHECK: vst4.32 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst4_lane_f32(float32_t * a, float32x2x4_t b) {
vst4_lane_f32(a, b, 1);
}
-// CHECK: test_vst4_lane_p8
+// CHECK-LABEL: test_vst4_lane_p8
// CHECK: vst4.8 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst4_lane_p8(poly8_t * a, poly8x8x4_t b) {
vst4_lane_p8(a, b, 7);
}
-// CHECK: test_vst4_lane_p16
+// CHECK-LABEL: test_vst4_lane_p16
// CHECK: vst4.16 {d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}], d{{[0-9]+}}[{{[0-9]+}}]}, [r{{[0-9]+}}]
void test_vst4_lane_p16(poly16_t * a, poly16x4x4_t b) {
vst4_lane_p16(a, b, 3);
}
-// CHECK: test_vsub_s8
+// CHECK-LABEL: test_vsub_s8
// CHECK: vsub.i8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int8x8_t test_vsub_s8(int8x8_t a, int8x8_t b) {
return vsub_s8(a, b);
}
-// CHECK: test_vsub_s16
+// CHECK-LABEL: test_vsub_s16
// CHECK: vsub.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x4_t test_vsub_s16(int16x4_t a, int16x4_t b) {
return vsub_s16(a, b);
}
-// CHECK: test_vsub_s32
+// CHECK-LABEL: test_vsub_s32
// CHECK: vsub.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x2_t test_vsub_s32(int32x2_t a, int32x2_t b) {
return vsub_s32(a, b);
}
-// CHECK: test_vsub_s64
+// CHECK-LABEL: test_vsub_s64
// CHECK: vsub.i64 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x1_t test_vsub_s64(int64x1_t a, int64x1_t b) {
return vsub_s64(a, b);
}
-// CHECK: test_vsub_f32
+// CHECK-LABEL: test_vsub_f32
// CHECK: vsub.f32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
float32x2_t test_vsub_f32(float32x2_t a, float32x2_t b) {
return vsub_f32(a, b);
}
-// CHECK: test_vsub_u8
+// CHECK-LABEL: test_vsub_u8
// CHECK: vsub.i8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vsub_u8(uint8x8_t a, uint8x8_t b) {
return vsub_u8(a, b);
}
-// CHECK: test_vsub_u16
+// CHECK-LABEL: test_vsub_u16
// CHECK: vsub.i16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vsub_u16(uint16x4_t a, uint16x4_t b) {
return vsub_u16(a, b);
}
-// CHECK: test_vsub_u32
+// CHECK-LABEL: test_vsub_u32
// CHECK: vsub.i32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vsub_u32(uint32x2_t a, uint32x2_t b) {
return vsub_u32(a, b);
}
-// CHECK: test_vsub_u64
+// CHECK-LABEL: test_vsub_u64
// CHECK: vsub.i64 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint64x1_t test_vsub_u64(uint64x1_t a, uint64x1_t b) {
return vsub_u64(a, b);
}
-// CHECK: test_vsubq_s8
+// CHECK-LABEL: test_vsubq_s8
// CHECK: vsub.i8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x16_t test_vsubq_s8(int8x16_t a, int8x16_t b) {
return vsubq_s8(a, b);
}
-// CHECK: test_vsubq_s16
+// CHECK-LABEL: test_vsubq_s16
// CHECK: vsub.i16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x8_t test_vsubq_s16(int16x8_t a, int16x8_t b) {
return vsubq_s16(a, b);
}
-// CHECK: test_vsubq_s32
+// CHECK-LABEL: test_vsubq_s32
// CHECK: vsub.i32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x4_t test_vsubq_s32(int32x4_t a, int32x4_t b) {
return vsubq_s32(a, b);
}
-// CHECK: test_vsubq_s64
+// CHECK-LABEL: test_vsubq_s64
// CHECK: vsub.i64 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int64x2_t test_vsubq_s64(int64x2_t a, int64x2_t b) {
return vsubq_s64(a, b);
}
-// CHECK: test_vsubq_f32
+// CHECK-LABEL: test_vsubq_f32
// CHECK: vsub.f32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
float32x4_t test_vsubq_f32(float32x4_t a, float32x4_t b) {
return vsubq_f32(a, b);
}
-// CHECK: test_vsubq_u8
+// CHECK-LABEL: test_vsubq_u8
// CHECK: vsub.i8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vsubq_u8(uint8x16_t a, uint8x16_t b) {
return vsubq_u8(a, b);
}
-// CHECK: test_vsubq_u16
+// CHECK-LABEL: test_vsubq_u16
// CHECK: vsub.i16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vsubq_u16(uint16x8_t a, uint16x8_t b) {
return vsubq_u16(a, b);
}
-// CHECK: test_vsubq_u32
+// CHECK-LABEL: test_vsubq_u32
// CHECK: vsub.i32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vsubq_u32(uint32x4_t a, uint32x4_t b) {
return vsubq_u32(a, b);
}
-// CHECK: test_vsubq_u64
+// CHECK-LABEL: test_vsubq_u64
// CHECK: vsub.i64 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint64x2_t test_vsubq_u64(uint64x2_t a, uint64x2_t b) {
return vsubq_u64(a, b);
}
-// CHECK: test_vsubhn_s16
+// CHECK-LABEL: test_vsubhn_s16
// CHECK: vsubhn.i16 d{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int8x8_t test_vsubhn_s16(int16x8_t a, int16x8_t b) {
return vsubhn_s16(a, b);
}
-// CHECK: test_vsubhn_s32
+// CHECK-LABEL: test_vsubhn_s32
// CHECK: vsubhn.i32 d{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int16x4_t test_vsubhn_s32(int32x4_t a, int32x4_t b) {
return vsubhn_s32(a, b);
}
-// CHECK: test_vsubhn_s64
+// CHECK-LABEL: test_vsubhn_s64
// CHECK: vsubhn.i64 d{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
int32x2_t test_vsubhn_s64(int64x2_t a, int64x2_t b) {
return vsubhn_s64(a, b);
}
-// CHECK: test_vsubhn_u16
+// CHECK-LABEL: test_vsubhn_u16
// CHECK: vsubhn.i16 d{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x8_t test_vsubhn_u16(uint16x8_t a, uint16x8_t b) {
return vsubhn_u16(a, b);
}
-// CHECK: test_vsubhn_u32
+// CHECK-LABEL: test_vsubhn_u32
// CHECK: vsubhn.i32 d{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x4_t test_vsubhn_u32(uint32x4_t a, uint32x4_t b) {
return vsubhn_u32(a, b);
}
-// CHECK: test_vsubhn_u64
+// CHECK-LABEL: test_vsubhn_u64
// CHECK: vsubhn.i64 d{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x2_t test_vsubhn_u64(uint64x2_t a, uint64x2_t b) {
return vsubhn_u64(a, b);
}
-// CHECK: test_vsubl_s8
+// CHECK-LABEL: test_vsubl_s8
// CHECK: vsubl.s8 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int16x8_t test_vsubl_s8(int8x8_t a, int8x8_t b) {
return vsubl_s8(a, b);
}
-// CHECK: test_vsubl_s16
+// CHECK-LABEL: test_vsubl_s16
// CHECK: vsubl.s16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int32x4_t test_vsubl_s16(int16x4_t a, int16x4_t b) {
return vsubl_s16(a, b);
}
-// CHECK: test_vsubl_s32
+// CHECK-LABEL: test_vsubl_s32
// CHECK: vsubl.s32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
int64x2_t test_vsubl_s32(int32x2_t a, int32x2_t b) {
return vsubl_s32(a, b);
}
-// CHECK: test_vsubl_u8
+// CHECK-LABEL: test_vsubl_u8
// CHECK: vsubl.u8 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x8_t test_vsubl_u8(uint8x8_t a, uint8x8_t b) {
return vsubl_u8(a, b);
}
-// CHECK: test_vsubl_u16
+// CHECK-LABEL: test_vsubl_u16
// CHECK: vsubl.u16 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x4_t test_vsubl_u16(uint16x4_t a, uint16x4_t b) {
return vsubl_u16(a, b);
}
-// CHECK: test_vsubl_u32
+// CHECK-LABEL: test_vsubl_u32
// CHECK: vsubl.u32 q{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint64x2_t test_vsubl_u32(uint32x2_t a, uint32x2_t b) {
return vsubl_u32(a, b);
}
-// CHECK: test_vsubw_s8
+// CHECK-LABEL: test_vsubw_s8
// CHECK: vsubw.s8 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}
int16x8_t test_vsubw_s8(int16x8_t a, int8x8_t b) {
return vsubw_s8(a, b);
}
-// CHECK: test_vsubw_s16
+// CHECK-LABEL: test_vsubw_s16
// CHECK: vsubw.s16 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}
int32x4_t test_vsubw_s16(int32x4_t a, int16x4_t b) {
return vsubw_s16(a, b);
}
-// CHECK: test_vsubw_s32
+// CHECK-LABEL: test_vsubw_s32
// CHECK: vsubw.s32 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}
int64x2_t test_vsubw_s32(int64x2_t a, int32x2_t b) {
return vsubw_s32(a, b);
}
-// CHECK: test_vsubw_u8
+// CHECK-LABEL: test_vsubw_u8
// CHECK: vsubw.u8 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}
uint16x8_t test_vsubw_u8(uint16x8_t a, uint8x8_t b) {
return vsubw_u8(a, b);
}
-// CHECK: test_vsubw_u16
+// CHECK-LABEL: test_vsubw_u16
// CHECK: vsubw.u16 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}
uint32x4_t test_vsubw_u16(uint32x4_t a, uint16x4_t b) {
return vsubw_u16(a, b);
}
-// CHECK: test_vsubw_u32
+// CHECK-LABEL: test_vsubw_u32
// CHECK: vsubw.u32 q{{[0-9]+}}, q{{[0-9]+}}, d{{[0-9]+}}
uint64x2_t test_vsubw_u32(uint64x2_t a, uint32x2_t b) {
return vsubw_u32(a, b);
}
-// CHECK: test_vtbl1_u8
+// CHECK-LABEL: test_vtbl1_u8
// CHECK: vtbl.8 d{{[0-9]+}}, {d{{[0-9]+}}}, d{{[0-9]+}}
uint8x8_t test_vtbl1_u8(uint8x8_t a, uint8x8_t b) {
return vtbl1_u8(a, b);
}
-// CHECK: test_vtbl1_s8
+// CHECK-LABEL: test_vtbl1_s8
// CHECK: vtbl.8 d{{[0-9]+}}, {d{{[0-9]+}}}, d{{[0-9]+}}
int8x8_t test_vtbl1_s8(int8x8_t a, int8x8_t b) {
return vtbl1_s8(a, b);
}
-// CHECK: test_vtbl1_p8
+// CHECK-LABEL: test_vtbl1_p8
// CHECK: vtbl.8 d{{[0-9]+}}, {d{{[0-9]+}}}, d{{[0-9]+}}
poly8x8_t test_vtbl1_p8(poly8x8_t a, uint8x8_t b) {
return vtbl1_p8(a, b);
}
-// CHECK: test_vtbl2_u8
+// CHECK-LABEL: test_vtbl2_u8
// CHECK: vtbl.8 d{{[0-9]+}}, {d{{[0-9]+}}, d{{[0-9]+}}}, d{{[0-9]+}}
uint8x8_t test_vtbl2_u8(uint8x8x2_t a, uint8x8_t b) {
return vtbl2_u8(a, b);
}
-// CHECK: test_vtbl2_s8
+// CHECK-LABEL: test_vtbl2_s8
// CHECK: vtbl.8 d{{[0-9]+}}, {d{{[0-9]+}}, d{{[0-9]+}}}, d{{[0-9]+}}
int8x8_t test_vtbl2_s8(int8x8x2_t a, int8x8_t b) {
return vtbl2_s8(a, b);
}
-// CHECK: test_vtbl2_p8
+// CHECK-LABEL: test_vtbl2_p8
// CHECK: vtbl.8 d{{[0-9]+}}, {d{{[0-9]+}}, d{{[0-9]+}}}, d{{[0-9]+}}
poly8x8_t test_vtbl2_p8(poly8x8x2_t a, uint8x8_t b) {
return vtbl2_p8(a, b);
}
-// CHECK: test_vtbl3_u8
+// CHECK-LABEL: test_vtbl3_u8
// CHECK: vtbl.8 d{{[0-9]+}}, {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, d{{[0-9]+}}
uint8x8_t test_vtbl3_u8(uint8x8x3_t a, uint8x8_t b) {
return vtbl3_u8(a, b);
}
-// CHECK: test_vtbl3_s8
+// CHECK-LABEL: test_vtbl3_s8
// CHECK: vtbl.8 d{{[0-9]+}}, {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, d{{[0-9]+}}
int8x8_t test_vtbl3_s8(int8x8x3_t a, int8x8_t b) {
return vtbl3_s8(a, b);
}
-// CHECK: test_vtbl3_p8
+// CHECK-LABEL: test_vtbl3_p8
// CHECK: vtbl.8 d{{[0-9]+}}, {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, d{{[0-9]+}}
poly8x8_t test_vtbl3_p8(poly8x8x3_t a, uint8x8_t b) {
return vtbl3_p8(a, b);
}
-// CHECK: test_vtbl4_u8
+// CHECK-LABEL: test_vtbl4_u8
// CHECK: vtbl.8 d{{[0-9]+}}, {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, d{{[0-9]+}}
uint8x8_t test_vtbl4_u8(uint8x8x4_t a, uint8x8_t b) {
return vtbl4_u8(a, b);
}
-// CHECK: test_vtbl4_s8
+// CHECK-LABEL: test_vtbl4_s8
// CHECK: vtbl.8 d{{[0-9]+}}, {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, d{{[0-9]+}}
int8x8_t test_vtbl4_s8(int8x8x4_t a, int8x8_t b) {
return vtbl4_s8(a, b);
}
-// CHECK: test_vtbl4_p8
+// CHECK-LABEL: test_vtbl4_p8
// CHECK: vtbl.8 d{{[0-9]+}}, {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, d{{[0-9]+}}
poly8x8_t test_vtbl4_p8(poly8x8x4_t a, uint8x8_t b) {
return vtbl4_p8(a, b);
}
-// CHECK: test_vtbx1_u8
+// CHECK-LABEL: test_vtbx1_u8
// CHECK: vtbx.8 d{{[0-9]+}}, {d{{[0-9]+}}}, d{{[0-9]+}}
uint8x8_t test_vtbx1_u8(uint8x8_t a, uint8x8_t b, uint8x8_t c) {
return vtbx1_u8(a, b, c);
}
-// CHECK: test_vtbx1_s8
+// CHECK-LABEL: test_vtbx1_s8
// CHECK: vtbx.8 d{{[0-9]+}}, {d{{[0-9]+}}}, d{{[0-9]+}}
int8x8_t test_vtbx1_s8(int8x8_t a, int8x8_t b, int8x8_t c) {
return vtbx1_s8(a, b, c);
}
-// CHECK: test_vtbx1_p8
+// CHECK-LABEL: test_vtbx1_p8
// CHECK: vtbx.8 d{{[0-9]+}}, {d{{[0-9]+}}}, d{{[0-9]+}}
poly8x8_t test_vtbx1_p8(poly8x8_t a, poly8x8_t b, uint8x8_t c) {
return vtbx1_p8(a, b, c);
}
-// CHECK: test_vtbx2_u8
+// CHECK-LABEL: test_vtbx2_u8
// CHECK: vtbx.8 d{{[0-9]+}}, {d{{[0-9]+}}, d{{[0-9]+}}}, d{{[0-9]+}}
uint8x8_t test_vtbx2_u8(uint8x8_t a, uint8x8x2_t b, uint8x8_t c) {
return vtbx2_u8(a, b, c);
}
-// CHECK: test_vtbx2_s8
+// CHECK-LABEL: test_vtbx2_s8
// CHECK: vtbx.8 d{{[0-9]+}}, {d{{[0-9]+}}, d{{[0-9]+}}}, d{{[0-9]+}}
int8x8_t test_vtbx2_s8(int8x8_t a, int8x8x2_t b, int8x8_t c) {
return vtbx2_s8(a, b, c);
}
-// CHECK: test_vtbx2_p8
+// CHECK-LABEL: test_vtbx2_p8
// CHECK: vtbx.8 d{{[0-9]+}}, {d{{[0-9]+}}, d{{[0-9]+}}}, d{{[0-9]+}}
poly8x8_t test_vtbx2_p8(poly8x8_t a, poly8x8x2_t b, uint8x8_t c) {
return vtbx2_p8(a, b, c);
}
-// CHECK: test_vtbx3_u8
+// CHECK-LABEL: test_vtbx3_u8
// CHECK: vtbx.8 d{{[0-9]+}}, {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, d{{[0-9]+}}
uint8x8_t test_vtbx3_u8(uint8x8_t a, uint8x8x3_t b, uint8x8_t c) {
return vtbx3_u8(a, b, c);
}
-// CHECK: test_vtbx3_s8
+// CHECK-LABEL: test_vtbx3_s8
// CHECK: vtbx.8 d{{[0-9]+}}, {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, d{{[0-9]+}}
int8x8_t test_vtbx3_s8(int8x8_t a, int8x8x3_t b, int8x8_t c) {
return vtbx3_s8(a, b, c);
}
-// CHECK: test_vtbx3_p8
+// CHECK-LABEL: test_vtbx3_p8
// CHECK: vtbx.8 d{{[0-9]+}}, {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, d{{[0-9]+}}
poly8x8_t test_vtbx3_p8(poly8x8_t a, poly8x8x3_t b, uint8x8_t c) {
return vtbx3_p8(a, b, c);
}
-// CHECK: test_vtbx4_u8
+// CHECK-LABEL: test_vtbx4_u8
// CHECK: vtbx.8 d{{[0-9]+}}, {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, d{{[0-9]+}}
uint8x8_t test_vtbx4_u8(uint8x8_t a, uint8x8x4_t b, uint8x8_t c) {
return vtbx4_u8(a, b, c);
}
-// CHECK: test_vtbx4_s8
+// CHECK-LABEL: test_vtbx4_s8
// CHECK: vtbx.8 d{{[0-9]+}}, {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, d{{[0-9]+}}
int8x8_t test_vtbx4_s8(int8x8_t a, int8x8x4_t b, int8x8_t c) {
return vtbx4_s8(a, b, c);
}
-// CHECK: test_vtbx4_p8
+// CHECK-LABEL: test_vtbx4_p8
// CHECK: vtbx.8 d{{[0-9]+}}, {d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}}, d{{[0-9]+}}
poly8x8_t test_vtbx4_p8(poly8x8_t a, poly8x8x4_t b, uint8x8_t c) {
return vtbx4_p8(a, b, c);
}
-// CHECK: test_vtrn_s8
+// CHECK-LABEL: test_vtrn_s8
// CHECK: vtrn.8 d{{[0-9]+}}, d{{[0-9]+}}
int8x8x2_t test_vtrn_s8(int8x8_t a, int8x8_t b) {
return vtrn_s8(a, b);
}
-// CHECK: test_vtrn_s16
+// CHECK-LABEL: test_vtrn_s16
// CHECK: vtrn.16 d{{[0-9]+}}, d{{[0-9]+}}
int16x4x2_t test_vtrn_s16(int16x4_t a, int16x4_t b) {
return vtrn_s16(a, b);
}
-// CHECK: test_vtrn_s32
+// CHECK-LABEL: test_vtrn_s32
// CHECK: vtrn.32 d{{[0-9]+}}, d{{[0-9]+}}
int32x2x2_t test_vtrn_s32(int32x2_t a, int32x2_t b) {
return vtrn_s32(a, b);
}
-// CHECK: test_vtrn_u8
+// CHECK-LABEL: test_vtrn_u8
// CHECK: vtrn.8 d{{[0-9]+}}, d{{[0-9]+}}
uint8x8x2_t test_vtrn_u8(uint8x8_t a, uint8x8_t b) {
return vtrn_u8(a, b);
}
-// CHECK: test_vtrn_u16
+// CHECK-LABEL: test_vtrn_u16
// CHECK: vtrn.16 d{{[0-9]+}}, d{{[0-9]+}}
uint16x4x2_t test_vtrn_u16(uint16x4_t a, uint16x4_t b) {
return vtrn_u16(a, b);
}
-// CHECK: test_vtrn_u32
+// CHECK-LABEL: test_vtrn_u32
// CHECK: vtrn.32 d{{[0-9]+}}, d{{[0-9]+}}
uint32x2x2_t test_vtrn_u32(uint32x2_t a, uint32x2_t b) {
return vtrn_u32(a, b);
}
-// CHECK: test_vtrn_f32
+// CHECK-LABEL: test_vtrn_f32
// CHECK: vtrn.32 d{{[0-9]+}}, d{{[0-9]+}}
float32x2x2_t test_vtrn_f32(float32x2_t a, float32x2_t b) {
return vtrn_f32(a, b);
}
-// CHECK: test_vtrn_p8
+// CHECK-LABEL: test_vtrn_p8
// CHECK: vtrn.8 d{{[0-9]+}}, d{{[0-9]+}}
poly8x8x2_t test_vtrn_p8(poly8x8_t a, poly8x8_t b) {
return vtrn_p8(a, b);
}
-// CHECK: test_vtrn_p16
+// CHECK-LABEL: test_vtrn_p16
// CHECK: vtrn.16 d{{[0-9]+}}, d{{[0-9]+}}
poly16x4x2_t test_vtrn_p16(poly16x4_t a, poly16x4_t b) {
return vtrn_p16(a, b);
}
-// CHECK: test_vtrnq_s8
+// CHECK-LABEL: test_vtrnq_s8
// CHECK: vtrn.8 q{{[0-9]+}}, q{{[0-9]+}}
int8x16x2_t test_vtrnq_s8(int8x16_t a, int8x16_t b) {
return vtrnq_s8(a, b);
}
-// CHECK: test_vtrnq_s16
+// CHECK-LABEL: test_vtrnq_s16
// CHECK: vtrn.16 q{{[0-9]+}}, q{{[0-9]+}}
int16x8x2_t test_vtrnq_s16(int16x8_t a, int16x8_t b) {
return vtrnq_s16(a, b);
}
-// CHECK: test_vtrnq_s32
+// CHECK-LABEL: test_vtrnq_s32
// CHECK: vtrn.32 q{{[0-9]+}}, q{{[0-9]+}}
int32x4x2_t test_vtrnq_s32(int32x4_t a, int32x4_t b) {
return vtrnq_s32(a, b);
}
-// CHECK: test_vtrnq_u8
+// CHECK-LABEL: test_vtrnq_u8
// CHECK: vtrn.8 q{{[0-9]+}}, q{{[0-9]+}}
uint8x16x2_t test_vtrnq_u8(uint8x16_t a, uint8x16_t b) {
return vtrnq_u8(a, b);
}
-// CHECK: test_vtrnq_u16
+// CHECK-LABEL: test_vtrnq_u16
// CHECK: vtrn.16 q{{[0-9]+}}, q{{[0-9]+}}
uint16x8x2_t test_vtrnq_u16(uint16x8_t a, uint16x8_t b) {
return vtrnq_u16(a, b);
}
-// CHECK: test_vtrnq_u32
+// CHECK-LABEL: test_vtrnq_u32
// CHECK: vtrn.32 q{{[0-9]+}}, q{{[0-9]+}}
uint32x4x2_t test_vtrnq_u32(uint32x4_t a, uint32x4_t b) {
return vtrnq_u32(a, b);
}
-// CHECK: test_vtrnq_f32
+// CHECK-LABEL: test_vtrnq_f32
// CHECK: vtrn.32 q{{[0-9]+}}, q{{[0-9]+}}
float32x4x2_t test_vtrnq_f32(float32x4_t a, float32x4_t b) {
return vtrnq_f32(a, b);
}
-// CHECK: test_vtrnq_p8
+// CHECK-LABEL: test_vtrnq_p8
// CHECK: vtrn.8 q{{[0-9]+}}, q{{[0-9]+}}
poly8x16x2_t test_vtrnq_p8(poly8x16_t a, poly8x16_t b) {
return vtrnq_p8(a, b);
}
-// CHECK: test_vtrnq_p16
+// CHECK-LABEL: test_vtrnq_p16
// CHECK: vtrn.16 q{{[0-9]+}}, q{{[0-9]+}}
poly16x8x2_t test_vtrnq_p16(poly16x8_t a, poly16x8_t b) {
return vtrnq_p16(a, b);
}
-// CHECK: test_vtst_s8
+// CHECK-LABEL: test_vtst_s8
// CHECK: vtst.8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vtst_s8(int8x8_t a, int8x8_t b) {
return vtst_s8(a, b);
}
-// CHECK: test_vtst_s16
+// CHECK-LABEL: test_vtst_s16
// CHECK: vtst.16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vtst_s16(int16x4_t a, int16x4_t b) {
return vtst_s16(a, b);
}
-// CHECK: test_vtst_s32
+// CHECK-LABEL: test_vtst_s32
// CHECK: vtst.32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vtst_s32(int32x2_t a, int32x2_t b) {
return vtst_s32(a, b);
}
-// CHECK: test_vtst_u8
+// CHECK-LABEL: test_vtst_u8
// CHECK: vtst.8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vtst_u8(uint8x8_t a, uint8x8_t b) {
return vtst_u8(a, b);
}
-// CHECK: test_vtst_u16
+// CHECK-LABEL: test_vtst_u16
// CHECK: vtst.16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vtst_u16(uint16x4_t a, uint16x4_t b) {
return vtst_u16(a, b);
}
-// CHECK: test_vtst_u32
+// CHECK-LABEL: test_vtst_u32
// CHECK: vtst.32 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint32x2_t test_vtst_u32(uint32x2_t a, uint32x2_t b) {
return vtst_u32(a, b);
}
-// CHECK: test_vtst_p8
+// CHECK-LABEL: test_vtst_p8
// CHECK: vtst.8 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint8x8_t test_vtst_p8(poly8x8_t a, poly8x8_t b) {
return vtst_p8(a, b);
}
-// CHECK: test_vtst_p16
+// CHECK-LABEL: test_vtst_p16
// CHECK: vtst.16 d{{[0-9]+}}, d{{[0-9]+}}, d{{[0-9]+}}
uint16x4_t test_vtst_p16(poly16x4_t a, poly16x4_t b) {
return vtst_p16(a, b);
}
-// CHECK: test_vtstq_s8
+// CHECK-LABEL: test_vtstq_s8
// CHECK: vtst.8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vtstq_s8(int8x16_t a, int8x16_t b) {
return vtstq_s8(a, b);
}
-// CHECK: test_vtstq_s16
+// CHECK-LABEL: test_vtstq_s16
// CHECK: vtst.16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vtstq_s16(int16x8_t a, int16x8_t b) {
return vtstq_s16(a, b);
}
-// CHECK: test_vtstq_s32
+// CHECK-LABEL: test_vtstq_s32
// CHECK: vtst.32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vtstq_s32(int32x4_t a, int32x4_t b) {
return vtstq_s32(a, b);
}
-// CHECK: test_vtstq_u8
+// CHECK-LABEL: test_vtstq_u8
// CHECK: vtst.8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vtstq_u8(uint8x16_t a, uint8x16_t b) {
return vtstq_u8(a, b);
}
-// CHECK: test_vtstq_u16
+// CHECK-LABEL: test_vtstq_u16
// CHECK: vtst.16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vtstq_u16(uint16x8_t a, uint16x8_t b) {
return vtstq_u16(a, b);
}
-// CHECK: test_vtstq_u32
+// CHECK-LABEL: test_vtstq_u32
// CHECK: vtst.32 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint32x4_t test_vtstq_u32(uint32x4_t a, uint32x4_t b) {
return vtstq_u32(a, b);
}
-// CHECK: test_vtstq_p8
+// CHECK-LABEL: test_vtstq_p8
// CHECK: vtst.8 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint8x16_t test_vtstq_p8(poly8x16_t a, poly8x16_t b) {
return vtstq_p8(a, b);
}
-// CHECK: test_vtstq_p16
+// CHECK-LABEL: test_vtstq_p16
// CHECK: vtst.16 q{{[0-9]+}}, q{{[0-9]+}}, q{{[0-9]+}}
uint16x8_t test_vtstq_p16(poly16x8_t a, poly16x8_t b) {
return vtstq_p16(a, b);
}
-// CHECK: test_vuzp_s8
+// CHECK-LABEL: test_vuzp_s8
// CHECK: vuzp.8 d{{[0-9]+}}, d{{[0-9]+}}
int8x8x2_t test_vuzp_s8(int8x8_t a, int8x8_t b) {
return vuzp_s8(a, b);
}
-// CHECK: test_vuzp_s16
+// CHECK-LABEL: test_vuzp_s16
// CHECK: vuzp.16 d{{[0-9]+}}, d{{[0-9]+}}
int16x4x2_t test_vuzp_s16(int16x4_t a, int16x4_t b) {
return vuzp_s16(a, b);
}
-// CHECK: test_vuzp_s32
+// CHECK-LABEL: test_vuzp_s32
// CHECK: {{vtrn|vuzp}}.32 d{{[0-9]+}}, d{{[0-9]+}}
int32x2x2_t test_vuzp_s32(int32x2_t a, int32x2_t b) {
return vuzp_s32(a, b);
}
-// CHECK: test_vuzp_u8
+// CHECK-LABEL: test_vuzp_u8
// CHECK: vuzp.8 d{{[0-9]+}}, d{{[0-9]+}}
uint8x8x2_t test_vuzp_u8(uint8x8_t a, uint8x8_t b) {
return vuzp_u8(a, b);
}
-// CHECK: test_vuzp_u16
+// CHECK-LABEL: test_vuzp_u16
// CHECK: vuzp.16 d{{[0-9]+}}, d{{[0-9]+}}
uint16x4x2_t test_vuzp_u16(uint16x4_t a, uint16x4_t b) {
return vuzp_u16(a, b);
}
-// CHECK: test_vuzp_u32
+// CHECK-LABEL: test_vuzp_u32
// CHECK: {{vtrn|vuzp}}.32 d{{[0-9]+}}, d{{[0-9]+}}
uint32x2x2_t test_vuzp_u32(uint32x2_t a, uint32x2_t b) {
return vuzp_u32(a, b);
}
-// CHECK: test_vuzp_f32
+// CHECK-LABEL: test_vuzp_f32
// CHECK: {{vtrn|vuzp}}.32 d{{[0-9]+}}, d{{[0-9]+}}
float32x2x2_t test_vuzp_f32(float32x2_t a, float32x2_t b) {
return vuzp_f32(a, b);
}
-// CHECK: test_vuzp_p8
+// CHECK-LABEL: test_vuzp_p8
// CHECK: vuzp.8 d{{[0-9]+}}, d{{[0-9]+}}
poly8x8x2_t test_vuzp_p8(poly8x8_t a, poly8x8_t b) {
return vuzp_p8(a, b);
}
-// CHECK: test_vuzp_p16
+// CHECK-LABEL: test_vuzp_p16
// CHECK: vuzp.16 d{{[0-9]+}}, d{{[0-9]+}}
poly16x4x2_t test_vuzp_p16(poly16x4_t a, poly16x4_t b) {
return vuzp_p16(a, b);
}
-// CHECK: test_vuzpq_s8
+// CHECK-LABEL: test_vuzpq_s8
// CHECK: vuzp.8 q{{[0-9]+}}, q{{[0-9]+}}
int8x16x2_t test_vuzpq_s8(int8x16_t a, int8x16_t b) {
return vuzpq_s8(a, b);
}
-// CHECK: test_vuzpq_s16
+// CHECK-LABEL: test_vuzpq_s16
// CHECK: vuzp.16 q{{[0-9]+}}, q{{[0-9]+}}
int16x8x2_t test_vuzpq_s16(int16x8_t a, int16x8_t b) {
return vuzpq_s16(a, b);
}
-// CHECK: test_vuzpq_s32
+// CHECK-LABEL: test_vuzpq_s32
// CHECK: {{vtrn|vuzp}}.32 q{{[0-9]+}}, q{{[0-9]+}}
int32x4x2_t test_vuzpq_s32(int32x4_t a, int32x4_t b) {
return vuzpq_s32(a, b);
}
-// CHECK: test_vuzpq_u8
+// CHECK-LABEL: test_vuzpq_u8
// CHECK: vuzp.8 q{{[0-9]+}}, q{{[0-9]+}}
uint8x16x2_t test_vuzpq_u8(uint8x16_t a, uint8x16_t b) {
return vuzpq_u8(a, b);
}
-// CHECK: test_vuzpq_u16
+// CHECK-LABEL: test_vuzpq_u16
// CHECK: vuzp.16 q{{[0-9]+}}, q{{[0-9]+}}
uint16x8x2_t test_vuzpq_u16(uint16x8_t a, uint16x8_t b) {
return vuzpq_u16(a, b);
}
-// CHECK: test_vuzpq_u32
+// CHECK-LABEL: test_vuzpq_u32
// CHECK: {{vtrn|vuzp}}.32 q{{[0-9]+}}, q{{[0-9]+}}
uint32x4x2_t test_vuzpq_u32(uint32x4_t a, uint32x4_t b) {
return vuzpq_u32(a, b);
}
-// CHECK: test_vuzpq_f32
+// CHECK-LABEL: test_vuzpq_f32
// CHECK: {{vtrn|vuzp}}.32 q{{[0-9]+}}, q{{[0-9]+}}
float32x4x2_t test_vuzpq_f32(float32x4_t a, float32x4_t b) {
return vuzpq_f32(a, b);
}
-// CHECK: test_vuzpq_p8
+// CHECK-LABEL: test_vuzpq_p8
// CHECK: vuzp.8 q{{[0-9]+}}, q{{[0-9]+}}
poly8x16x2_t test_vuzpq_p8(poly8x16_t a, poly8x16_t b) {
return vuzpq_p8(a, b);
}
-// CHECK: test_vuzpq_p16
+// CHECK-LABEL: test_vuzpq_p16
// CHECK: vuzp.16 q{{[0-9]+}}, q{{[0-9]+}}
poly16x8x2_t test_vuzpq_p16(poly16x8_t a, poly16x8_t b) {
return vuzpq_p16(a, b);
}
-// CHECK: test_vzip_s8
+// CHECK-LABEL: test_vzip_s8
// CHECK: vzip.8 d{{[0-9]+}}, d{{[0-9]+}}
int8x8x2_t test_vzip_s8(int8x8_t a, int8x8_t b) {
return vzip_s8(a, b);
}
-// CHECK: test_vzip_s16
+// CHECK-LABEL: test_vzip_s16
// CHECK: vzip.16 d{{[0-9]+}}, d{{[0-9]+}}
int16x4x2_t test_vzip_s16(int16x4_t a, int16x4_t b) {
return vzip_s16(a, b);
}
-// CHECK: test_vzip_s32
+// CHECK-LABEL: test_vzip_s32
// CHECK: {{vtrn|vzip}}.32 d{{[0-9]+}}, d{{[0-9]+}}
int32x2x2_t test_vzip_s32(int32x2_t a, int32x2_t b) {
return vzip_s32(a, b);
}
-// CHECK: test_vzip_u8
+// CHECK-LABEL: test_vzip_u8
// CHECK: vzip.8 d{{[0-9]+}}, d{{[0-9]+}}
uint8x8x2_t test_vzip_u8(uint8x8_t a, uint8x8_t b) {
return vzip_u8(a, b);
}
-// CHECK: test_vzip_u16
+// CHECK-LABEL: test_vzip_u16
// CHECK: vzip.16 d{{[0-9]+}}, d{{[0-9]+}}
uint16x4x2_t test_vzip_u16(uint16x4_t a, uint16x4_t b) {
return vzip_u16(a, b);
}
-// CHECK: test_vzip_u32
+// CHECK-LABEL: test_vzip_u32
// CHECK: {{vtrn|vzip}}.32 d{{[0-9]+}}, d{{[0-9]+}}
uint32x2x2_t test_vzip_u32(uint32x2_t a, uint32x2_t b) {
return vzip_u32(a, b);
}
-// CHECK: test_vzip_f32
+// CHECK-LABEL: test_vzip_f32
// CHECK: {{vtrn|vzip}}.32 d{{[0-9]+}}, d{{[0-9]+}}
float32x2x2_t test_vzip_f32(float32x2_t a, float32x2_t b) {
return vzip_f32(a, b);
}
-// CHECK: test_vzip_p8
+// CHECK-LABEL: test_vzip_p8
// CHECK: vzip.8 d{{[0-9]+}}, d{{[0-9]+}}
poly8x8x2_t test_vzip_p8(poly8x8_t a, poly8x8_t b) {
return vzip_p8(a, b);
}
-// CHECK: test_vzip_p16
+// CHECK-LABEL: test_vzip_p16
// CHECK: vzip.16 d{{[0-9]+}}, d{{[0-9]+}}
poly16x4x2_t test_vzip_p16(poly16x4_t a, poly16x4_t b) {
return vzip_p16(a, b);
}
-// CHECK: test_vzipq_s8
+// CHECK-LABEL: test_vzipq_s8
// CHECK: vzip.8 q{{[0-9]+}}, q{{[0-9]+}}
int8x16x2_t test_vzipq_s8(int8x16_t a, int8x16_t b) {
return vzipq_s8(a, b);
}
-// CHECK: test_vzipq_s16
+// CHECK-LABEL: test_vzipq_s16
// CHECK: vzip.16 q{{[0-9]+}}, q{{[0-9]+}}
int16x8x2_t test_vzipq_s16(int16x8_t a, int16x8_t b) {
return vzipq_s16(a, b);
}
-// CHECK: test_vzipq_s32
+// CHECK-LABEL: test_vzipq_s32
// CHECK: {{vtrn|vzip}}.32 q{{[0-9]+}}, q{{[0-9]+}}
int32x4x2_t test_vzipq_s32(int32x4_t a, int32x4_t b) {
return vzipq_s32(a, b);
}
-// CHECK: test_vzipq_u8
+// CHECK-LABEL: test_vzipq_u8
// CHECK: vzip.8 q{{[0-9]+}}, q{{[0-9]+}}
uint8x16x2_t test_vzipq_u8(uint8x16_t a, uint8x16_t b) {
return vzipq_u8(a, b);
}
-// CHECK: test_vzipq_u16
+// CHECK-LABEL: test_vzipq_u16
// CHECK: vzip.16 q{{[0-9]+}}, q{{[0-9]+}}
uint16x8x2_t test_vzipq_u16(uint16x8_t a, uint16x8_t b) {
return vzipq_u16(a, b);
}
-// CHECK: test_vzipq_u32
+// CHECK-LABEL: test_vzipq_u32
// CHECK: {{vtrn|vzip}}.32 q{{[0-9]+}}, q{{[0-9]+}}
uint32x4x2_t test_vzipq_u32(uint32x4_t a, uint32x4_t b) {
return vzipq_u32(a, b);
}
-// CHECK: test_vzipq_f32
+// CHECK-LABEL: test_vzipq_f32
// CHECK: {{vtrn|vzip}}.32 q{{[0-9]+}}, q{{[0-9]+}}
float32x4x2_t test_vzipq_f32(float32x4_t a, float32x4_t b) {
return vzipq_f32(a, b);
}
-// CHECK: test_vzipq_p8
+// CHECK-LABEL: test_vzipq_p8
// CHECK: vzip.8 q{{[0-9]+}}, q{{[0-9]+}}
poly8x16x2_t test_vzipq_p8(poly8x16_t a, poly8x16_t b) {
return vzipq_p8(a, b);
}
-// CHECK: test_vzipq_p16
+// CHECK-LABEL: test_vzipq_p16
// CHECK: vzip.16 q{{[0-9]+}}, q{{[0-9]+}}
poly16x8x2_t test_vzipq_p16(poly16x8_t a, poly16x8_t b) {
return vzipq_p16(a, b);
diff --git a/test/CodeGen/asan-globals.cpp b/test/CodeGen/asan-globals.cpp
new file mode 100644
index 000000000000..d9ecc6461542
--- /dev/null
+++ b/test/CodeGen/asan-globals.cpp
@@ -0,0 +1,36 @@
+// RUN: echo "global:*blacklisted_global*" > %t.blacklist
+// RUN: %clang_cc1 -fsanitize=address -fsanitize-blacklist=%t.blacklist -emit-llvm -o - %s | FileCheck %s
+// RUN: echo "src:%s" > %t.blacklist-src
+// RUN: %clang_cc1 -fsanitize=address -fsanitize-blacklist=%t.blacklist-src -emit-llvm -o - %s | FileCheck %s --check-prefix=BLACKLIST-SRC
+// REQUIRES: shell
+
+int global;
+// CHECK: [[GLOBAL_LOC:@.asan_loc_descr[0-9]*]] = private unnamed_addr constant {{.*}} i32 [[@LINE-1]], i32 5
+// CHECK: [[GLOBAL_NAME:@.str[0-9]+]] = private unnamed_addr constant {{.*}} c"global\00"
+int dyn_init_global = global;
+// CHECK: [[DYN_INIT_LOC:@.asan_loc_descr[0-9]*]] = {{.*}} i32 [[@LINE-1]], i32 5
+// CHECK: [[DYN_INIT_NAME:@.str[0-9]+]] = private unnamed_addr constant {{.*}} c"dyn_init_global\00"
+int blacklisted_global;
+
+void func() {
+ static int static_var = 0;
+ // CHECK: [[STATIC_LOC:@.asan_loc_descr[0-9]*]] = {{.*}} i32 [[@LINE-1]], i32 14
+ // CHECK: [[STATIC_NAME:@.str[0-9]+]] = private unnamed_addr constant {{.*}} c"static_var\00"
+ const char *literal = "Hello, world!";
+ // CHECK: [[LITERAL_LOC:@.asan_loc_descr[0-9]*]] = {{.*}} i32 [[@LINE-1]], i32 25
+ // CHECK: [[LITERAL_NAME:@.str[0-9]+]] = private unnamed_addr constant {{.*}} c"<string literal>\00"
+}
+
+// CHECK: !llvm.asan.globals = !{![[GLOBAL:[0-9]+]], ![[DYN_INIT_GLOBAL:[0-9]+]], ![[BLACKLISTED_GLOBAL:[0-9]+]], ![[STATIC_VAR:[0-9]+]], ![[LITERAL:[0-9]+]]}
+// CHECK: ![[GLOBAL]] = metadata !{{{.*}} [[GLOBAL_LOC]], {{.*}} [[GLOBAL_NAME]], i1 false, i1 false}
+// CHECK: ![[DYN_INIT_GLOBAL]] = metadata !{{{.*}} [[DYN_INIT_LOC]], {{.*}} [[DYN_INIT_NAME]], i1 true, i1 false}
+// CHECK: ![[BLACKLISTED_GLOBAL]] = metadata !{{{.*}}, null, null, i1 false, i1 true}
+// CHECK: ![[STATIC_VAR]] = metadata !{{{.*}} [[STATIC_LOC]], {{.*}} [[STATIC_NAME]], i1 false, i1 false}
+// CHECK: ![[LITERAL]] = metadata !{{{.*}} [[LITERAL_LOC]], {{.*}} [[LITERAL_NAME]], i1 false, i1 false}
+
+// BLACKLIST-SRC: !llvm.asan.globals = !{![[GLOBAL:[0-9]+]], ![[DYN_INIT_GLOBAL:[0-9]+]], ![[BLACKLISTED_GLOBAL:[0-9]+]], ![[STATIC_VAR:[0-9]+]], ![[LITERAL:[0-9]+]]}
+// BLACKLIST-SRC: ![[GLOBAL]] = metadata !{{{.*}} null, null, i1 false, i1 true}
+// BLACKLIST-SRC: ![[DYN_INIT_GLOBAL]] = metadata !{{{.*}} null, null, i1 true, i1 true}
+// BLACKLIST-SRC: ![[BLACKLISTED_GLOBAL]] = metadata !{{{.*}}, null, null, i1 false, i1 true}
+// BLACKLIST-SRC: ![[STATIC_VAR]] = metadata !{{{.*}} null, null, i1 false, i1 true}
+// BLACKLIST-SRC: ![[LITERAL]] = metadata !{{{.*}} null, null, i1 false, i1 true}
diff --git a/test/CodeGen/asm.c b/test/CodeGen/asm.c
index 670c24405d33..5dbc01b1211d 100644
--- a/test/CodeGen/asm.c
+++ b/test/CodeGen/asm.c
@@ -239,3 +239,12 @@ void t28(void)
// CHECK: call void asm sideeffect "/* $0 */", "i|r,~{dirflag},~{fpsr},~{flags}"(i32 1)
}
+static unsigned t29_var[1];
+
+void t29(void) {
+ asm volatile("movl %%eax, %0"
+ :
+ : "m"(t29_var));
+ // CHECK: @t29
+ // CHECK: call void asm sideeffect "movl %eax, $0", "*m,~{dirflag},~{fpsr},~{flags}"([1 x i32]* @t29_var)
+}
diff --git a/test/CodeGen/asm_arm64.c b/test/CodeGen/asm_arm64.c
new file mode 100644
index 000000000000..0eaa347a8517
--- /dev/null
+++ b/test/CodeGen/asm_arm64.c
@@ -0,0 +1,45 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios -emit-llvm -o - %s | FileCheck %s
+
+// rdar://9167275
+
+int t1()
+{
+ int x;
+ __asm__("mov %0, 7" : "=r" (x));
+ return x;
+}
+
+long t2()
+{
+ long x;
+ __asm__("mov %0, 7" : "=r" (x));
+ return x;
+}
+
+long t3()
+{
+ long x;
+ __asm__("mov %w0, 7" : "=r" (x));
+ return x;
+}
+
+// rdar://9281206
+
+void t4(long op) {
+ long x1;
+ asm ("mov x0, %1; svc #0;" : "=r"(x1) :"r"(op),"r"(x1) :"x0" );
+}
+
+// rdar://9394290
+
+float t5(float x) {
+ __asm__("fadd %0, %0, %0" : "+w" (x));
+ return x;
+}
+
+// rdar://9865712
+void t6 (void *f, int g) {
+ // CHECK: t6
+ // CHECK: call void asm "str $1, $0", "=*Q,r"
+ asm("str %1, %0" : "=Q"(f) : "r"(g));
+}
diff --git a/test/CodeGen/atomic-arm64.c b/test/CodeGen/atomic-arm64.c
new file mode 100644
index 000000000000..147b570e21c6
--- /dev/null
+++ b/test/CodeGen/atomic-arm64.c
@@ -0,0 +1,73 @@
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=arm64-apple-ios7 | FileCheck %s
+
+// Memory ordering values.
+enum {
+ memory_order_relaxed = 0,
+ memory_order_consume = 1,
+ memory_order_acquire = 2,
+ memory_order_release = 3,
+ memory_order_acq_rel = 4,
+ memory_order_seq_cst = 5
+};
+
+typedef struct { void *a, *b; } pointer_pair_t;
+typedef struct { void *a, *b, *c, *d; } pointer_quad_t;
+
+// rdar://13489679
+
+extern _Atomic(_Bool) a_bool;
+extern _Atomic(float) a_float;
+extern _Atomic(void*) a_pointer;
+extern _Atomic(pointer_pair_t) a_pointer_pair;
+extern _Atomic(pointer_quad_t) a_pointer_quad;
+
+// CHECK: define void @test0()
+// CHECK: [[TEMP:%.*]] = alloca i8, align 1
+// CHECK-NEXT: store i8 1, i8* [[TEMP]]
+// CHECK-NEXT: [[T0:%.*]] = load i8* [[TEMP]], align 1
+// CHECK-NEXT: store atomic i8 [[T0]], i8* @a_bool seq_cst, align 1
+void test0() {
+ __c11_atomic_store(&a_bool, 1, memory_order_seq_cst);
+}
+
+// CHECK: define void @test1()
+// CHECK: [[TEMP:%.*]] = alloca float, align 4
+// CHECK-NEXT: store float 3.000000e+00, float* [[TEMP]]
+// CHECK-NEXT: [[T0:%.*]] = bitcast float* [[TEMP]] to i32*
+// CHECK-NEXT: [[T1:%.*]] = load i32* [[T0]], align 4
+// CHECK-NEXT: store atomic i32 [[T1]], i32* bitcast (float* @a_float to i32*) seq_cst, align 4
+void test1() {
+ __c11_atomic_store(&a_float, 3, memory_order_seq_cst);
+}
+
+// CHECK: define void @test2()
+// CHECK: [[TEMP:%.*]] = alloca i8*, align 8
+// CHECK-NEXT: store i8* @a_bool, i8** [[TEMP]]
+// CHECK-NEXT: [[T0:%.*]] = bitcast i8** [[TEMP]] to i64*
+// CHECK-NEXT: [[T1:%.*]] = load i64* [[T0]], align 8
+// CHECK-NEXT: store atomic i64 [[T1]], i64* bitcast (i8** @a_pointer to i64*) seq_cst, align 8
+void test2() {
+ __c11_atomic_store(&a_pointer, &a_bool, memory_order_seq_cst);
+}
+
+// CHECK: define void @test3(
+// CHECK: [[PAIR:%.*]] = alloca [[PAIR_T:%.*]], align 8
+// CHECK-NEXT: [[TEMP:%.*]] = alloca [[PAIR_T]], align 8
+// CHECK: llvm.memcpy
+// CHECK-NEXT: [[T0:%.*]] = bitcast [[PAIR_T]]* [[TEMP]] to i128*
+// CHECK-NEXT: [[T1:%.*]] = load i128* [[T0]], align 16
+// CHECK-NEXT: store atomic i128 [[T1]], i128* bitcast ([[PAIR_T]]* @a_pointer_pair to i128*) seq_cst, align 16
+void test3(pointer_pair_t pair) {
+ __c11_atomic_store(&a_pointer_pair, pair, memory_order_seq_cst);
+}
+
+// CHECK: define void @test4([[QUAD_T:%.*]]*
+// CHECK: [[TEMP:%.*]] = alloca [[QUAD_T:%.*]], align 8
+// CHECK-NEXT: [[T0:%.*]] = bitcast [[QUAD_T]]* [[TEMP]] to i8*
+// CHECK-NEXT: [[T1:%.*]] = bitcast [[QUAD_T]]* {{%.*}} to i8*
+// CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* [[T0]], i8* [[T1]], i64 32, i32 8, i1 false)
+// CHECK-NEXT: [[T0:%.*]] = bitcast [[QUAD_T]]* [[TEMP]] to i8*
+// CHECK-NEXT: call void @__atomic_store(i64 32, i8* bitcast ([[QUAD_T]]* @a_pointer_quad to i8*), i8* [[T0]], i32 5)
+void test4(pointer_quad_t quad) {
+ __c11_atomic_store(&a_pointer_quad, quad, memory_order_seq_cst);
+}
diff --git a/test/CodeGen/atomic-ops-libcall.c b/test/CodeGen/atomic-ops-libcall.c
new file mode 100644
index 000000000000..2a2ff5e80fcf
--- /dev/null
+++ b/test/CodeGen/atomic-ops-libcall.c
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 < %s -triple armv5e-none-linux-gnueabi -emit-llvm -O1 | FileCheck %s
+
+enum memory_order {
+ memory_order_relaxed, memory_order_consume, memory_order_acquire,
+ memory_order_release, memory_order_acq_rel, memory_order_seq_cst
+};
+
+int *test_c11_atomic_fetch_add_int_ptr(_Atomic(int *) *p) {
+ // CHECK: test_c11_atomic_fetch_add_int_ptr
+ // CHECK: {{%[^ ]*}} = tail call i32* @__atomic_fetch_add_4(i8* {{%[0-9]+}}, i32 12, i32 5)
+ return __c11_atomic_fetch_add(p, 3, memory_order_seq_cst);
+}
+
+int *test_c11_atomic_fetch_sub_int_ptr(_Atomic(int *) *p) {
+ // CHECK: test_c11_atomic_fetch_sub_int_ptr
+ // CHECK: {{%[^ ]*}} = tail call i32* @__atomic_fetch_sub_4(i8* {{%[0-9]+}}, i32 20, i32 5)
+ return __c11_atomic_fetch_sub(p, 5, memory_order_seq_cst);
+}
+
+int test_c11_atomic_fetch_add_int(_Atomic(int) *p) {
+ // CHECK: test_c11_atomic_fetch_add_int
+ // CHECK: {{%[^ ]*}} = tail call i32 bitcast (i32* (i8*, i32, i32)* @__atomic_fetch_add_4 to i32 (i8*, i32, i32)*)(i8* {{%[0-9]+}}, i32 3, i32 5)
+ return __c11_atomic_fetch_add(p, 3, memory_order_seq_cst);
+}
+
+int test_c11_atomic_fetch_sub_int(_Atomic(int) *p) {
+ // CHECK: test_c11_atomic_fetch_sub_int
+ // CHECK: {{%[^ ]*}} = tail call i32 bitcast (i32* (i8*, i32, i32)* @__atomic_fetch_sub_4 to i32 (i8*, i32, i32)*)(i8* {{%[0-9]+}}, i32 5, i32 5)
+ return __c11_atomic_fetch_sub(p, 5, memory_order_seq_cst);
+}
+
+int *fp2a(int **p) {
+ // CHECK: @fp2a
+ // CHECK: {{%[^ ]*}} = tail call i32* @__atomic_fetch_sub_4(i8* {{%[0-9]+}}, i32 4, i32 0)
+ // Note, the GNU builtins do not multiply by sizeof(T)!
+ return __atomic_fetch_sub(p, 4, memory_order_relaxed);
+}
diff --git a/test/CodeGen/atomic-ops.c b/test/CodeGen/atomic-ops.c
index 830f21a569aa..9e6b4805e8cb 100644
--- a/test/CodeGen/atomic-ops.c
+++ b/test/CodeGen/atomic-ops.c
@@ -15,13 +15,13 @@ typedef enum memory_order {
} memory_order;
int fi1(_Atomic(int) *i) {
- // CHECK: @fi1
+ // CHECK-LABEL: @fi1
// CHECK: load atomic i32* {{.*}} seq_cst
return __c11_atomic_load(i, memory_order_seq_cst);
}
int fi1a(int *i) {
- // CHECK: @fi1a
+ // CHECK-LABEL: @fi1a
// CHECK: load atomic i32* {{.*}} seq_cst
int v;
__atomic_load(i, &v, memory_order_seq_cst);
@@ -29,60 +29,60 @@ int fi1a(int *i) {
}
int fi1b(int *i) {
- // CHECK: @fi1b
+ // CHECK-LABEL: @fi1b
// CHECK: load atomic i32* {{.*}} seq_cst
return __atomic_load_n(i, memory_order_seq_cst);
}
void fi2(_Atomic(int) *i) {
- // CHECK: @fi2
+ // CHECK-LABEL: @fi2
// CHECK: store atomic i32 {{.*}} seq_cst
__c11_atomic_store(i, 1, memory_order_seq_cst);
}
void fi2a(int *i) {
- // CHECK: @fi2a
+ // CHECK-LABEL: @fi2a
// CHECK: store atomic i32 {{.*}} seq_cst
int v = 1;
__atomic_store(i, &v, memory_order_seq_cst);
}
void fi2b(int *i) {
- // CHECK: @fi2b
+ // CHECK-LABEL: @fi2b
// CHECK: store atomic i32 {{.*}} seq_cst
__atomic_store_n(i, 1, memory_order_seq_cst);
}
int fi3(_Atomic(int) *i) {
- // CHECK: @fi3
+ // CHECK-LABEL: @fi3
// CHECK: atomicrmw and
// CHECK-NOT: and
return __c11_atomic_fetch_and(i, 1, memory_order_seq_cst);
}
int fi3a(int *i) {
- // CHECK: @fi3a
+ // CHECK-LABEL: @fi3a
// CHECK: atomicrmw xor
// CHECK-NOT: xor
return __atomic_fetch_xor(i, 1, memory_order_seq_cst);
}
int fi3b(int *i) {
- // CHECK: @fi3b
+ // CHECK-LABEL: @fi3b
// CHECK: atomicrmw add
// CHECK: add
return __atomic_add_fetch(i, 1, memory_order_seq_cst);
}
int fi3c(int *i) {
- // CHECK: @fi3c
+ // CHECK-LABEL: @fi3c
// CHECK: atomicrmw nand
// CHECK-NOT: and
return __atomic_fetch_nand(i, 1, memory_order_seq_cst);
}
int fi3d(int *i) {
- // CHECK: @fi3d
+ // CHECK-LABEL: @fi3d
// CHECK: atomicrmw nand
// CHECK: and
// CHECK: xor
@@ -90,35 +90,47 @@ int fi3d(int *i) {
}
_Bool fi4(_Atomic(int) *i) {
- // CHECK: @fi4
- // CHECK: cmpxchg i32*
+ // CHECK-LABEL: @fi4
+ // CHECK: [[PAIR:%[.0-9A-Z_a-z]+]] = cmpxchg i32* [[PTR:%[.0-9A-Z_a-z]+]], i32 [[EXPECTED:%[.0-9A-Z_a-z]+]], i32 [[DESIRED:%[.0-9A-Z_a-z]+]]
+ // CHECK: [[OLD:%[.0-9A-Z_a-z]+]] = extractvalue { i32, i1 } [[PAIR]], 0
+ // CHECK: [[CMP:%[.0-9A-Z_a-z]+]] = extractvalue { i32, i1 } [[PAIR]], 1
+ // CHECK: br i1 [[CMP]], label %[[STORE_EXPECTED:[.0-9A-Z_a-z]+]], label %[[CONTINUE:[.0-9A-Z_a-z]+]]
+ // CHECK: store i32 [[OLD]]
int cmp = 0;
return __c11_atomic_compare_exchange_strong(i, &cmp, 1, memory_order_acquire, memory_order_acquire);
}
_Bool fi4a(int *i) {
- // CHECK: @fi4
- // CHECK: cmpxchg i32*
+ // CHECK-LABEL: @fi4
+ // CHECK: [[PAIR:%[.0-9A-Z_a-z]+]] = cmpxchg i32* [[PTR:%[.0-9A-Z_a-z]+]], i32 [[EXPECTED:%[.0-9A-Z_a-z]+]], i32 [[DESIRED:%[.0-9A-Z_a-z]+]]
+ // CHECK: [[OLD:%[.0-9A-Z_a-z]+]] = extractvalue { i32, i1 } [[PAIR]], 0
+ // CHECK: [[CMP:%[.0-9A-Z_a-z]+]] = extractvalue { i32, i1 } [[PAIR]], 1
+ // CHECK: br i1 [[CMP]], label %[[STORE_EXPECTED:[.0-9A-Z_a-z]+]], label %[[CONTINUE:[.0-9A-Z_a-z]+]]
+ // CHECK: store i32 [[OLD]]
int cmp = 0;
int desired = 1;
return __atomic_compare_exchange(i, &cmp, &desired, 0, memory_order_acquire, memory_order_acquire);
}
_Bool fi4b(int *i) {
- // CHECK: @fi4
- // CHECK: cmpxchg i32*
+ // CHECK-LABEL: @fi4
+ // CHECK: [[PAIR:%[.0-9A-Z_a-z]+]] = cmpxchg weak i32* [[PTR:%[.0-9A-Z_a-z]+]], i32 [[EXPECTED:%[.0-9A-Z_a-z]+]], i32 [[DESIRED:%[.0-9A-Z_a-z]+]]
+ // CHECK: [[OLD:%[.0-9A-Z_a-z]+]] = extractvalue { i32, i1 } [[PAIR]], 0
+ // CHECK: [[CMP:%[.0-9A-Z_a-z]+]] = extractvalue { i32, i1 } [[PAIR]], 1
+ // CHECK: br i1 [[CMP]], label %[[STORE_EXPECTED:[.0-9A-Z_a-z]+]], label %[[CONTINUE:[.0-9A-Z_a-z]+]]
+ // CHECK: store i32 [[OLD]]
int cmp = 0;
return __atomic_compare_exchange_n(i, &cmp, 1, 1, memory_order_acquire, memory_order_acquire);
}
float ff1(_Atomic(float) *d) {
- // CHECK: @ff1
+ // CHECK-LABEL: @ff1
// CHECK: load atomic i32* {{.*}} monotonic
return __c11_atomic_load(d, memory_order_relaxed);
}
void ff2(_Atomic(float) *d) {
- // CHECK: @ff2
+ // CHECK-LABEL: @ff2
// CHECK: store atomic i32 {{.*}} release
__c11_atomic_store(d, 1, memory_order_release);
}
@@ -128,20 +140,20 @@ float ff3(_Atomic(float) *d) {
}
int* fp1(_Atomic(int*) *p) {
- // CHECK: @fp1
+ // CHECK-LABEL: @fp1
// CHECK: load atomic i32* {{.*}} seq_cst
return __c11_atomic_load(p, memory_order_seq_cst);
}
int* fp2(_Atomic(int*) *p) {
- // CHECK: @fp2
+ // CHECK-LABEL: @fp2
// CHECK: store i32 4
// CHECK: atomicrmw add {{.*}} monotonic
return __c11_atomic_fetch_add(p, 1, memory_order_relaxed);
}
int *fp2a(int **p) {
- // CHECK: @fp2a
+ // CHECK-LABEL: @fp2a
// CHECK: store i32 4
// CHECK: atomicrmw sub {{.*}} monotonic
// Note, the GNU builtins do not multiply by sizeof(T)!
@@ -149,20 +161,20 @@ int *fp2a(int **p) {
}
_Complex float fc(_Atomic(_Complex float) *c) {
- // CHECK: @fc
+ // CHECK-LABEL: @fc
// CHECK: atomicrmw xchg i64*
return __c11_atomic_exchange(c, 2, memory_order_seq_cst);
}
typedef struct X { int x; } X;
X fs(_Atomic(X) *c) {
- // CHECK: @fs
+ // CHECK-LABEL: @fs
// CHECK: atomicrmw xchg i32*
return __c11_atomic_exchange(c, (X){2}, memory_order_seq_cst);
}
X fsa(X *c, X *d) {
- // CHECK: @fsa
+ // CHECK-LABEL: @fsa
// CHECK: atomicrmw xchg i32*
X ret;
__atomic_exchange(c, d, &ret, memory_order_seq_cst);
@@ -170,7 +182,7 @@ X fsa(X *c, X *d) {
}
_Bool fsb(_Bool *c) {
- // CHECK: @fsb
+ // CHECK-LABEL: @fsb
// CHECK: atomicrmw xchg i8*
return __atomic_exchange_n(c, 1, memory_order_seq_cst);
}
@@ -196,7 +208,7 @@ struct Seventeen {
} seventeen;
int lock_free(struct Incomplete *incomplete) {
- // CHECK: @lock_free
+ // CHECK-LABEL: @lock_free
// CHECK: call i32 @__atomic_is_lock_free(i32 3, i8* null)
__c11_atomic_is_lock_free(3);
@@ -244,7 +256,7 @@ struct foo bigThing;
_Atomic(struct foo) bigAtomic;
void structAtomicStore() {
- // CHECK: @structAtomicStore
+ // CHECK-LABEL: @structAtomicStore
struct foo f = {0};
struct bar b = {0};
__atomic_store(&smallThing, &b, 5);
@@ -254,7 +266,7 @@ void structAtomicStore() {
// CHECK: call void @__atomic_store(i32 512, i8* {{.*}} @bigThing
}
void structAtomicLoad() {
- // CHECK: @structAtomicLoad
+ // CHECK-LABEL: @structAtomicLoad
struct bar b;
__atomic_load(&smallThing, &b, 5);
// CHECK: call void @__atomic_load(i32 3, i8* {{.*}} @smallThing
@@ -264,7 +276,7 @@ void structAtomicLoad() {
// CHECK: call void @__atomic_load(i32 512, i8* {{.*}} @bigThing
}
struct foo structAtomicExchange() {
- // CHECK: @structAtomicExchange
+ // CHECK-LABEL: @structAtomicExchange
struct foo f = {0};
struct foo old;
__atomic_exchange(&f, &bigThing, &old, 5);
@@ -274,7 +286,7 @@ struct foo structAtomicExchange() {
// CHECK: call void @__atomic_exchange(i32 512, i8* bitcast ({{.*}} @bigAtomic to i8*),
}
int structAtomicCmpExchange() {
- // CHECK: @structAtomicCmpExchange
+ // CHECK-LABEL: @structAtomicCmpExchange
_Bool x = __atomic_compare_exchange(&smallThing, &thing1, &thing2, 1, 5, 5);
// CHECK: call zeroext i1 @__atomic_compare_exchange(i32 3, {{.*}} @smallThing{{.*}} @thing1{{.*}} @thing2
@@ -289,7 +301,7 @@ int structAtomicCmpExchange() {
// types.
_Atomic(int) atomic_init_i = 42;
-// CHECK: @atomic_init_foo
+// CHECK-LABEL: @atomic_init_foo
void atomic_init_foo()
{
// CHECK-NOT: }
@@ -306,13 +318,133 @@ void atomic_init_foo()
// CHECK: }
}
-// CHECK: @invalid_atomic
-void invalid_atomic(_Atomic(int) *i) {
- __c11_atomic_store(i, 1, memory_order_consume);
- __c11_atomic_store(i, 1, memory_order_acquire);
- __c11_atomic_store(i, 1, memory_order_acq_rel);
- __c11_atomic_load(i, memory_order_release);
- __c11_atomic_load(i, memory_order_acq_rel);
+// CHECK-LABEL: @failureOrder
+void failureOrder(_Atomic(int) *ptr, int *ptr2) {
+ __c11_atomic_compare_exchange_strong(ptr, ptr2, 43, memory_order_acquire, memory_order_relaxed);
+ // CHECK: cmpxchg i32* {{%[0-9A-Za-z._]+}}, i32 {{%[0-9A-Za-z._]+}}, i32 {{%[0-9A-Za-z_.]+}} acquire monotonic
+
+ __c11_atomic_compare_exchange_weak(ptr, ptr2, 43, memory_order_seq_cst, memory_order_acquire);
+ // CHECK: cmpxchg weak i32* {{%[0-9A-Za-z._]+}}, i32 {{%[0-9A-Za-z._]+}}, i32 {{%[0-9A-Za-z_.]+}} seq_cst acquire
+
+ // Unknown ordering: conservatively pick strongest valid option (for now!).
+ __atomic_compare_exchange(ptr2, ptr2, ptr2, 0, memory_order_acq_rel, *ptr2);
+ // CHECK: cmpxchg i32* {{%[0-9A-Za-z._]+}}, i32 {{%[0-9A-Za-z._]+}}, i32 {{%[0-9A-Za-z_.]+}} acq_rel acquire
+
+ // Undefined behaviour: don't really care what that last ordering is so leave
+ // it out:
+ __atomic_compare_exchange_n(ptr2, ptr2, 43, 1, memory_order_seq_cst, 42);
+ // CHECK: cmpxchg weak i32* {{%[0-9A-Za-z._]+}}, i32 {{%[0-9A-Za-z._]+}}, i32 {{%[0-9A-Za-z_.]+}} seq_cst
+}
+
+// CHECK-LABEL: @generalFailureOrder
+void generalFailureOrder(_Atomic(int) *ptr, int *ptr2, int success, int fail) {
+ __c11_atomic_compare_exchange_strong(ptr, ptr2, 42, success, fail);
+ // CHECK: switch i32 {{.*}}, label %[[MONOTONIC:[0-9a-zA-Z._]+]] [
+ // CHECK-NEXT: i32 1, label %[[ACQUIRE:[0-9a-zA-Z._]+]]
+ // CHECK-NEXT: i32 2, label %[[ACQUIRE]]
+ // CHECK-NEXT: i32 3, label %[[RELEASE:[0-9a-zA-Z._]+]]
+ // CHECK-NEXT: i32 4, label %[[ACQREL:[0-9a-zA-Z._]+]]
+ // CHECK-NEXT: i32 5, label %[[SEQCST:[0-9a-zA-Z._]+]]
+
+ // CHECK: [[MONOTONIC]]
+ // CHECK: switch {{.*}}, label %[[MONOTONIC_MONOTONIC:[0-9a-zA-Z._]+]] [
+ // CHECK-NEXT: ]
+
+ // CHECK: [[ACQUIRE]]
+ // CHECK: switch {{.*}}, label %[[ACQUIRE_MONOTONIC:[0-9a-zA-Z._]+]] [
+ // CHECK-NEXT: i32 1, label %[[ACQUIRE_ACQUIRE:[0-9a-zA-Z._]+]]
+ // CHECK-NEXT: i32 2, label %[[ACQUIRE_ACQUIRE:[0-9a-zA-Z._]+]]
+ // CHECK-NEXT: ]
+
+ // CHECK: [[RELEASE]]
+ // CHECK: switch {{.*}}, label %[[RELEASE_MONOTONIC:[0-9a-zA-Z._]+]] [
+ // CHECK-NEXT: ]
+
+ // CHECK: [[ACQREL]]
+ // CHECK: switch {{.*}}, label %[[ACQREL_MONOTONIC:[0-9a-zA-Z._]+]] [
+ // CHECK-NEXT: i32 1, label %[[ACQREL_ACQUIRE:[0-9a-zA-Z._]+]]
+ // CHECK-NEXT: i32 2, label %[[ACQREL_ACQUIRE:[0-9a-zA-Z._]+]]
+ // CHECK-NEXT: ]
+
+ // CHECK: [[SEQCST]]
+ // CHECK: switch {{.*}}, label %[[SEQCST_MONOTONIC:[0-9a-zA-Z._]+]] [
+ // CHECK-NEXT: i32 1, label %[[SEQCST_ACQUIRE:[0-9a-zA-Z._]+]]
+ // CHECK-NEXT: i32 2, label %[[SEQCST_ACQUIRE:[0-9a-zA-Z._]+]]
+ // CHECK-NEXT: i32 5, label %[[SEQCST_SEQCST:[0-9a-zA-Z._]+]]
+ // CHECK-NEXT: ]
+
+ // CHECK: [[MONOTONIC_MONOTONIC]]
+ // CHECK: cmpxchg {{.*}} monotonic monotonic
+ // CHECK: br
+
+ // CHECK: [[ACQUIRE_MONOTONIC]]
+ // CHECK: cmpxchg {{.*}} acquire monotonic
+ // CHECK: br
+
+ // CHECK: [[ACQUIRE_ACQUIRE]]
+ // CHECK: cmpxchg {{.*}} acquire acquire
+ // CHECK: br
+
+ // CHECK: [[ACQREL_MONOTONIC]]
+ // CHECK: cmpxchg {{.*}} acq_rel monotonic
+ // CHECK: br
+
+ // CHECK: [[ACQREL_ACQUIRE]]
+ // CHECK: cmpxchg {{.*}} acq_rel acquire
+ // CHECK: br
+
+ // CHECK: [[SEQCST_MONOTONIC]]
+ // CHECK: cmpxchg {{.*}} seq_cst monotonic
+ // CHECK: br
+
+ // CHECK: [[SEQCST_ACQUIRE]]
+ // CHECK: cmpxchg {{.*}} seq_cst acquire
+ // CHECK: br
+
+ // CHECK: [[SEQCST_SEQCST]]
+ // CHECK: cmpxchg {{.*}} seq_cst seq_cst
+ // CHECK: br
+}
+
+void generalWeakness(int *ptr, int *ptr2, _Bool weak) {
+ __atomic_compare_exchange_n(ptr, ptr2, 42, weak, memory_order_seq_cst, memory_order_seq_cst);
+ // CHECK: switch i1 {{.*}}, label %[[WEAK:[0-9a-zA-Z._]+]] [
+ // CHECK-NEXT: i1 false, label %[[STRONG:[0-9a-zA-Z._]+]]
+
+ // CHECK: [[STRONG]]
+ // CHECK-NOT: br
+ // CHECK: cmpxchg {{.*}} seq_cst seq_cst
+ // CHECK: br
+
+ // CHECK: [[WEAK]]
+ // CHECK-NOT: br
+ // CHECK: cmpxchg weak {{.*}} seq_cst seq_cst
+ // CHECK: br
+}
+
+// Having checked the flow in the previous two cases, we'll trust clang to
+// combine them sanely.
+void EMIT_ALL_THE_THINGS(int *ptr, int *ptr2, int new, _Bool weak, int success, int fail) {
+ __atomic_compare_exchange(ptr, ptr2, &new, weak, success, fail);
+
+ // CHECK: = cmpxchg {{.*}} monotonic monotonic
+ // CHECK: = cmpxchg weak {{.*}} monotonic monotonic
+ // CHECK: = cmpxchg {{.*}} acquire monotonic
+ // CHECK: = cmpxchg {{.*}} acquire acquire
+ // CHECK: = cmpxchg weak {{.*}} acquire monotonic
+ // CHECK: = cmpxchg weak {{.*}} acquire acquire
+ // CHECK: = cmpxchg {{.*}} release monotonic
+ // CHECK: = cmpxchg weak {{.*}} release monotonic
+ // CHECK: = cmpxchg {{.*}} acq_rel monotonic
+ // CHECK: = cmpxchg {{.*}} acq_rel acquire
+ // CHECK: = cmpxchg weak {{.*}} acq_rel monotonic
+ // CHECK: = cmpxchg weak {{.*}} acq_rel acquire
+ // CHECK: = cmpxchg {{.*}} seq_cst monotonic
+ // CHECK: = cmpxchg {{.*}} seq_cst acquire
+ // CHECK: = cmpxchg {{.*}} seq_cst seq_cst
+ // CHECK: = cmpxchg weak {{.*}} seq_cst monotonic
+ // CHECK: = cmpxchg weak {{.*}} seq_cst acquire
+ // CHECK: = cmpxchg weak {{.*}} seq_cst seq_cst
}
#endif
diff --git a/test/CodeGen/atomic.c b/test/CodeGen/atomic.c
index ac3848f02f9e..43f5bc81ee98 100644
--- a/test/CodeGen/atomic.c
+++ b/test/CodeGen/atomic.c
@@ -35,10 +35,12 @@ int atomic(void) {
// CHECK: atomicrmw xchg i32* %val, i32 8 seq_cst
old = __sync_val_compare_and_swap(&val, 4, 1976);
- // CHECK: cmpxchg i32* %val, i32 4, i32 1976 seq_cst
-
+ // CHECK: [[PAIR:%[a-z0-9_.]+]] = cmpxchg i32* %val, i32 4, i32 1976 seq_cst
+ // CHECK: extractvalue { i32, i1 } [[PAIR]], 0
+
old = __sync_bool_compare_and_swap(&val, 4, 1976);
- // CHECK: cmpxchg i32* %val, i32 4, i32 1976 seq_cst
+ // CHECK: [[PAIR:%[a-z0-9_.]+]] = cmpxchg i32* %val, i32 4, i32 1976 seq_cst
+ // CHECK: extractvalue { i32, i1 } [[PAIR]], 1
old = __sync_fetch_and_and(&val, 0x9);
// CHECK: atomicrmw and i32* %val, i32 9 seq_cst
@@ -65,10 +67,13 @@ int atomic(void) {
// CHECK: atomicrmw xor i8* %valc, i8 5 seq_cst
__sync_val_compare_and_swap((void **)0, (void *)0, (void *)0);
- // CHECK: cmpxchg i32* null, i32 0, i32 0 seq_cst
+ // CHECK: [[PAIR:%[a-z0-9_.]+]] = cmpxchg i32* null, i32 0, i32 0 seq_cst
+ // CHECK: extractvalue { i32, i1 } [[PAIR]], 0
if ( __sync_val_compare_and_swap(&valb, 0, 1)) {
- // CHECK: cmpxchg i8* %valb, i8 0, i8 1 seq_cst
+ // CHECK: [[PAIR:%[a-z0-9_.]+]] = cmpxchg i8* %valb, i8 0, i8 1 seq_cst
+ // CHECK: [[VAL:%[a-z0-9_.]+]] = extractvalue { i8, i1 } [[PAIR]], 0
+ // CHECK: trunc i8 [[VAL]] to i1
old = 42;
}
diff --git a/test/CodeGen/attr-optnone.c b/test/CodeGen/attr-optnone.c
new file mode 100644
index 000000000000..e7069b10f21a
--- /dev/null
+++ b/test/CodeGen/attr-optnone.c
@@ -0,0 +1,25 @@
+// RUN: %clang_cc1 -emit-llvm < %s > %t
+// RUN: FileCheck %s --check-prefix=PRESENT < %t
+// RUN: FileCheck %s --check-prefix=ABSENT < %t
+
+__attribute__((always_inline))
+int test2() { return 0; }
+// PRESENT-DAG: @test2{{.*}}[[ATTR2:#[0-9]+]]
+
+__attribute__((optnone)) __attribute__((minsize))
+int test3() { return 0; }
+// PRESENT-DAG: @test3{{.*}}[[ATTR3:#[0-9]+]]
+
+__attribute__((optnone)) __attribute__((cold))
+int test4() { return test2(); }
+// PRESENT-DAG: @test4{{.*}}[[ATTR4:#[0-9]+]]
+// Also check that test2 is inlined into test4 (always_inline still works).
+// PRESENT-NOT: call i32 @test2
+
+// Check for both noinline and optnone on each optnone function.
+// PRESENT-DAG: attributes [[ATTR3]] = { {{.*}}noinline{{.*}}optnone{{.*}} }
+// PRESENT-DAG: attributes [[ATTR4]] = { {{.*}}noinline{{.*}}optnone{{.*}} }
+
+// Check that no 'optsize' or 'minsize' attributes appear.
+// ABSENT-NOT: optsize
+// ABSENT-NOT: minsize
diff --git a/test/CodeGen/avx-builtins.c b/test/CodeGen/avx-builtins.c
index c88946fe8567..5b5b6a56b4b6 100644
--- a/test/CodeGen/avx-builtins.c
+++ b/test/CodeGen/avx-builtins.c
@@ -111,3 +111,15 @@ int test_extract_epi8(__m256i __a) {
// CHECK: extractelement <32 x i8> %{{.*}}, i32 0
return _mm256_extract_epi8(__a, 32);
}
+
+__m256d test_256_blend_pd(__m256d __a, __m256d __b) {
+ // CHECK-LABEL: @test_256_blend_pd
+ // CHECK: shufflevector <4 x double> %{{.*}}, <4 x double> %{{.*}}, <4 x i32> <i32 4, i32 1, i32 6, i32 3>
+ return _mm256_blend_pd(__a, __b, 0x35);
+}
+
+__m256 test_256_blend_ps(__m256 __a, __m256 __b) {
+ // CHECK-LABEL: @test_256_blend_ps
+ // CHECK: shufflevector <8 x float> %{{.*}}, <8 x float> %{{.*}}, <8 x i32> <i32 8, i32 1, i32 10, i32 3, i32 12, i32 13, i32 6, i32 7>
+ return _mm256_blend_ps(__a, __b, 0x35);
+}
diff --git a/test/CodeGen/avx-shuffle-builtins.c b/test/CodeGen/avx-shuffle-builtins.c
index d071f825aa9e..76e2395fe8e3 100644
--- a/test/CodeGen/avx-shuffle-builtins.c
+++ b/test/CodeGen/avx-shuffle-builtins.c
@@ -63,3 +63,37 @@ __m256i test_mm256_permute2f128_si256(__m256i a, __m256i b) {
// CHECK: @llvm.x86.avx.vperm2f128.si.256
return _mm256_permute2f128_si256(a, b, 0x20);
}
+
+__m128
+test_mm_broadcast_ss(float const *__a) {
+ // CHECK-LABEL: @test_mm_broadcast_ss
+ // CHECK: insertelement <4 x float> {{.*}}, i32 0
+ // CHECK: insertelement <4 x float> {{.*}}, i32 1
+ // CHECK: insertelement <4 x float> {{.*}}, i32 2
+ // CHECK: insertelement <4 x float> {{.*}}, i32 3
+ return _mm_broadcast_ss(__a);
+}
+
+__m256d
+test_mm256_broadcast_sd(double const *__a) {
+ // CHECK-LABEL: @test_mm256_broadcast_sd
+ // CHECK: insertelement <4 x double> {{.*}}, i32 0
+ // CHECK: insertelement <4 x double> {{.*}}, i32 1
+ // CHECK: insertelement <4 x double> {{.*}}, i32 2
+ // CHECK: insertelement <4 x double> {{.*}}, i32 3
+ return _mm256_broadcast_sd(__a);
+}
+
+__m256
+test_mm256_broadcast_ss(float const *__a) {
+ // CHECK-LABEL: @test_mm256_broadcast_ss
+ // CHECK: insertelement <8 x float> {{.*}}, i32 0
+ // CHECK: insertelement <8 x float> {{.*}}, i32 1
+ // CHECK: insertelement <8 x float> {{.*}}, i32 2
+ // CHECK: insertelement <8 x float> {{.*}}, i32 3
+ // CHECK: insertelement <8 x float> {{.*}}, i32 4
+ // CHECK: insertelement <8 x float> {{.*}}, i32 5
+ // CHECK: insertelement <8 x float> {{.*}}, i32 6
+ // CHECK: insertelement <8 x float> {{.*}}, i32 7
+ return _mm256_broadcast_ss(__a);
+}
diff --git a/test/CodeGen/avx2-builtins.c b/test/CodeGen/avx2-builtins.c
index 5024d94e7185..10c3a1b726a1 100644
--- a/test/CodeGen/avx2-builtins.c
+++ b/test/CodeGen/avx2-builtins.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -O3 -triple=x86_64-apple-darwin -target-feature +avx2 -emit-llvm -o - -Werror | FileCheck %s
+// RUN: %clang_cc1 %s -O0 -triple=x86_64-apple-darwin -target-feature +avx2 -emit-llvm -o - -Werror | FileCheck %s
// Don't include mm_malloc.h, it's system specific.
#define __MM_MALLOC_H
@@ -176,8 +176,13 @@ __m256i test_mm256_blendv_epi8(__m256i a, __m256i b, __m256i m) {
return _mm256_blendv_epi8(a, b, m);
}
+// FIXME: We should also lower the __builtin_ia32_pblendw128 (and similar)
+// functions to this IR. In the future we could delete the corresponding
+// intrinsic in LLVM if it's not being used anymore.
__m256i test_mm256_blend_epi16(__m256i a, __m256i b) {
- // CHECK: @llvm.x86.avx2.pblendw(<16 x i16> %{{.*}}, <16 x i16> %{{.*}}, i32 2)
+ // CHECK-LABEL: test_mm256_blend_epi16
+ // CHECK-NOT: @llvm.x86.avx2.pblendw
+ // CHECK: shufflevector <16 x i16> %{{.*}}, <16 x i16> %{{.*}}, <16 x i32> <i32 0, i32 17, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 25, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
return _mm256_blend_epi16(a, b, 2);
}
@@ -427,17 +432,17 @@ __m256i test_mm256_shuffle_epi8(__m256i a, __m256i b) {
}
__m256i test_mm256_shuffle_epi32(__m256i a) {
- // CHECK: shufflevector <8 x i32> %{{.*}}, <8 x i32> undef, <8 x i32> <i32 3, i32 3, i32 0, i32 0, i32 7, i32 7, i32 4, i32 4>
+ // CHECK: shufflevector <8 x i32> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> <i32 3, i32 3, i32 0, i32 0, i32 7, i32 7, i32 4, i32 4>
return _mm256_shuffle_epi32(a, 15);
}
__m256i test_mm256_shufflehi_epi16(__m256i a) {
- // CHECK: shufflevector <16 x i16> %{{.*}}, <16 x i16> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 7, i32 6, i32 6, i32 5, i32 8, i32 9, i32 10, i32 11, i32 15, i32 14, i32 14, i32 13>
+ // CHECK: shufflevector <16 x i16> %{{.*}}, <16 x i16> %{{.*}}, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 7, i32 6, i32 6, i32 5, i32 8, i32 9, i32 10, i32 11, i32 15, i32 14, i32 14, i32 13>
return _mm256_shufflehi_epi16(a, 107);
}
__m256i test_mm256_shufflelo_epi16(__m256i a) {
- // CHECK: shufflevector <16 x i16> %{{.*}}, <16 x i16> undef, <16 x i32> <i32 3, i32 0, i32 1, i32 1, i32 4, i32 5, i32 6, i32 7, i32 11, i32 8, i32 9, i32 9, i32 12, i32 13, i32 14, i32 15>
+ // CHECK: shufflevector <16 x i16> %{{.*}}, <16 x i16> %{{.*}}, <16 x i32> <i32 3, i32 0, i32 1, i32 1, i32 4, i32 5, i32 6, i32 7, i32 11, i32 8, i32 9, i32 9, i32 12, i32 13, i32 14, i32 15>
return _mm256_shufflelo_epi16(a, 83);
}
@@ -612,13 +617,17 @@ __m256i test_mm256_broadcastsi128_si256(__m128i a) {
}
__m128i test_mm_blend_epi32(__m128i a, __m128i b) {
- // CHECK: @llvm.x86.avx2.pblendd.128
- return _mm_blend_epi32(a, b, 57);
+ // CHECK-LABEL: test_mm_blend_epi32
+ // CHECK-NOT: @llvm.x86.avx2.pblendd.128
+ // CHECK: shufflevector <4 x i32> %{{.*}}, <4 x i32> %{{.*}}, <4 x i32> <i32 4, i32 1, i32 6, i32 3>
+ return _mm_blend_epi32(a, b, 0x35);
}
__m256i test_mm256_blend_epi32(__m256i a, __m256i b) {
- // CHECK: @llvm.x86.avx2.pblendd.256
- return _mm256_blend_epi32(a, b, 57);
+ // CHECK-LABEL: test_mm256_blend_epi32
+ // CHECK-NOT: @llvm.x86.avx2.pblendd.256
+ // CHECK: shufflevector <8 x i32> %{{.*}}, <8 x i32> %{{.*}}, <8 x i32> <i32 8, i32 1, i32 10, i32 3, i32 12, i32 13, i32 6, i32 7>
+ return _mm256_blend_epi32(a, b, 0x35);
}
__m256i test_mm256_broadcastb_epi8(__m128i a) {
diff --git a/test/CodeGen/big-atomic-ops.c b/test/CodeGen/big-atomic-ops.c
index b09aededcdea..74096616ace6 100644
--- a/test/CodeGen/big-atomic-ops.c
+++ b/test/CodeGen/big-atomic-ops.c
@@ -106,7 +106,7 @@ _Bool fi4a(int *i) {
_Bool fi4b(int *i) {
// CHECK: @fi4
- // CHECK: cmpxchg i32*
+ // CHECK: cmpxchg weak i32*
int cmp = 0;
return __atomic_compare_exchange_n(i, &cmp, 1, 1, memory_order_acquire, memory_order_acquire);
}
@@ -311,13 +311,4 @@ void atomic_init_foo()
// CHECK: }
}
-// CHECK: @invalid_atomic
-void invalid_atomic(_Atomic(int) *i) {
- __c11_atomic_store(i, 1, memory_order_consume);
- __c11_atomic_store(i, 1, memory_order_acquire);
- __c11_atomic_store(i, 1, memory_order_acq_rel);
- __c11_atomic_load(i, memory_order_release);
- __c11_atomic_load(i, memory_order_acq_rel);
-}
-
#endif
diff --git a/test/CodeGen/bitfield-2.c b/test/CodeGen/bitfield-2.c
index 58b17f17f02a..c5154fcb19e2 100644
--- a/test/CodeGen/bitfield-2.c
+++ b/test/CodeGen/bitfield-2.c
@@ -11,7 +11,7 @@
// CHECK-RECORD: *** Dumping IRgen Record Layout
// CHECK-RECORD: Record: RecordDecl{{.*}}s0
// CHECK-RECORD: Layout: <CGRecordLayout
-// CHECK-RECORD: LLVMType:%struct.s0 = type <{ [3 x i8] }>
+// CHECK-RECORD: LLVMType:%struct.s0 = type { [3 x i8] }
// CHECK-RECORD: IsZeroInitializable:1
// CHECK-RECORD: BitFields:[
// CHECK-RECORD: <CGBitFieldInfo Offset:0 Size:24 IsSigned:1 StorageSize:24 StorageAlignment:1>
@@ -51,7 +51,7 @@ unsigned long long test_0() {
// CHECK-RECORD: *** Dumping IRgen Record Layout
// CHECK-RECORD: Record: RecordDecl{{.*}}s1
// CHECK-RECORD: Layout: <CGRecordLayout
-// CHECK-RECORD: LLVMType:%struct.s1 = type <{ [3 x i8] }>
+// CHECK-RECORD: LLVMType:%struct.s1 = type { [3 x i8] }
// CHECK-RECORD: IsZeroInitializable:1
// CHECK-RECORD: BitFields:[
// CHECK-RECORD: <CGBitFieldInfo Offset:0 Size:10 IsSigned:1 StorageSize:24 StorageAlignment:1>
@@ -99,7 +99,7 @@ unsigned long long test_1() {
// CHECK-RECORD: *** Dumping IRgen Record Layout
// CHECK-RECORD: Record: RecordDecl{{.*}}u2
// CHECK-RECORD: Layout: <CGRecordLayout
-// CHECK-RECORD: LLVMType:%union.u2 = type <{ i8 }>
+// CHECK-RECORD: LLVMType:%union.u2 = type { i8 }
// CHECK-RECORD: IsZeroInitializable:1
// CHECK-RECORD: BitFields:[
// CHECK-RECORD: <CGBitFieldInfo Offset:0 Size:3 IsSigned:0 StorageSize:8 StorageAlignment:1>
@@ -271,7 +271,7 @@ _Bool test_6() {
// CHECK-RECORD: *** Dumping IRgen Record Layout
// CHECK-RECORD: Record: RecordDecl{{.*}}s7
// CHECK-RECORD: Layout: <CGRecordLayout
-// CHECK-RECORD: LLVMType:%struct.s7 = type { i32, i32, i32, i8, [3 x i8], [4 x i8], [12 x i8] }
+// CHECK-RECORD: LLVMType:%struct.s7 = type { i32, i32, i32, i8, i32, [12 x i8] }
// CHECK-RECORD: IsZeroInitializable:1
// CHECK-RECORD: BitFields:[
// CHECK-RECORD: <CGBitFieldInfo Offset:0 Size:5 IsSigned:1 StorageSize:8 StorageAlignment:4>
diff --git a/test/CodeGen/blocks-opencl.cl b/test/CodeGen/blocks-opencl.cl
new file mode 100644
index 000000000000..ab80f5eb7a2c
--- /dev/null
+++ b/test/CodeGen/blocks-opencl.cl
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -O0 %s -ffake-address-space-map -emit-llvm -o - -fblocks -triple x86_64-unknown-unknown | FileCheck %s
+// This used to crash due to trying to generate a bitcase from a cstring
+// in the constant address space to i8* in AS0.
+
+void dummy(float (^op)(float))
+{
+}
+
+// CHECK: i8 addrspace(3)* getelementptr inbounds ([9 x i8] addrspace(3)* @.str, i32 0, i32 0)
+
+kernel void test_block()
+{
+ float (^X)(float) = ^(float x) { return x + 42.0f; };
+ dummy(X);
+}
+
diff --git a/test/CodeGen/blockstret.c b/test/CodeGen/blockstret.c
index d5dae6f3a614..edd1218b13e8 100644
--- a/test/CodeGen/blockstret.c
+++ b/test/CodeGen/blockstret.c
@@ -1,13 +1,20 @@
// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin9 %s -emit-llvm -o - | FileCheck %s -check-prefix=X64
// RUN: %clang_cc1 -fblocks -triple i686-apple-darwin9 %s -emit-llvm -o - | FileCheck %s -check-prefix=X32
+// RUN: %clang_cc1 -fblocks -triple arm64-apple-darwin %s -emit-llvm -o - | FileCheck %s -check-prefix=ARM64
// X64: internal constant {{.*}} { i8** @_NSConcreteGlobalBlock, i32 1879048192
-// X64: store i32 1610612736, i32* %want
+// X64: store i32 1610612736, i32* %want
// X32: @_NSConcreteGlobalBlock, i32 1879048192, i32 0,
// X32: store i32 1610612736, i32* %want
// rdar://7677537
+
+// ARM64: @_NSConcreteGlobalBlock, i32 1342177280, i32 0,
+// ARM64: store i32 1610612736, i32* %want
+
+// rdar://9757126
+
int printf(const char *, ...);
void *malloc(__SIZE_TYPE__ size);
diff --git a/test/CodeGen/bmi-builtins.c b/test/CodeGen/bmi-builtins.c
index 2e1ba12d9b3c..92332e3a1265 100644
--- a/test/CodeGen/bmi-builtins.c
+++ b/test/CodeGen/bmi-builtins.c
@@ -5,6 +5,14 @@
#include <x86intrin.h>
+// The double underscore intrinsics are for compatibility with
+// AMD's BMI interface. The single underscore intrinsics
+// are for compatibility with Intel's BMI interface.
+// Apart from the underscores, the interfaces are identical
+// except in one case: although the 'bextr' register-form
+// instruction is identical in hardware, the AMD and Intel
+// intrinsics are different!
+
unsigned short test__tzcnt_u16(unsigned short __X) {
// CHECK: @llvm.cttz.i16
return __tzcnt_u16(__X);
@@ -39,7 +47,7 @@ unsigned int test__blsr_u32(unsigned int __X) {
return __blsr_u32(__X);
}
-unsigned int test_tzcnt_u32(unsigned int __X) {
+unsigned int test__tzcnt_u32(unsigned int __X) {
// CHECK: @llvm.cttz.i32
return __tzcnt_u32(__X);
}
@@ -77,3 +85,80 @@ unsigned long long test__tzcnt_u64(unsigned long long __X) {
// CHECK: @llvm.cttz.i64
return __tzcnt_u64(__X);
}
+
+// Intel intrinsics
+
+unsigned short test_tzcnt_u16(unsigned short __X) {
+ // CHECK: @llvm.cttz.i16
+ return _tzcnt_u16(__X);
+}
+
+unsigned int test_andn_u32(unsigned int __X, unsigned int __Y) {
+ // CHECK: [[DEST:%.*]] = xor i32 %{{.*}}, -1
+ // CHECK-NEXT: %{{.*}} = and i32 %{{.*}}, [[DEST]]
+ return _andn_u32(__X, __Y);
+}
+
+unsigned int test_bextr_u32(unsigned int __X, unsigned int __Y,
+ unsigned int __Z) {
+ // CHECK: @llvm.x86.bmi.bextr.32
+ return _bextr_u32(__X, __Y, __Z);
+}
+
+unsigned int test_blsi_u32(unsigned int __X) {
+ // CHECK: [[DEST:%.*]] = sub i32 0, [[SRC:%.*]]
+ // CHECK-NEXT: %{{.*}} = and i32 [[SRC]], [[DEST]]
+ return _blsi_u32(__X);
+}
+
+unsigned int test_blsmsk_u32(unsigned int __X) {
+ // CHECK: [[DEST:%.*]] = add i32 [[SRC:%.*]], -1
+ // CHECK-NEXT: %{{.*}} = xor i32 [[DEST]], [[SRC]]
+ return _blsmsk_u32(__X);
+}
+
+unsigned int test_blsr_u32(unsigned int __X) {
+ // CHECK: [[DEST:%.*]] = add i32 [[SRC:%.*]], -1
+ // CHECK-NEXT: %{{.*}} = and i32 [[DEST]], [[SRC]]
+ return _blsr_u32(__X);
+}
+
+unsigned int test_tzcnt_u32(unsigned int __X) {
+ // CHECK: @llvm.cttz.i32
+ return _tzcnt_u32(__X);
+}
+
+unsigned long long test_andn_u64(unsigned long __X, unsigned long __Y) {
+ // CHECK: [[DEST:%.*]] = xor i64 %{{.*}}, -1
+ // CHECK-NEXT: %{{.*}} = and i64 %{{.*}}, [[DEST]]
+ return _andn_u64(__X, __Y);
+}
+
+unsigned long long test_bextr_u64(unsigned long __X, unsigned int __Y,
+ unsigned int __Z) {
+ // CHECK: @llvm.x86.bmi.bextr.64
+ return _bextr_u64(__X, __Y, __Z);
+}
+
+unsigned long long test_blsi_u64(unsigned long long __X) {
+ // CHECK: [[DEST:%.*]] = sub i64 0, [[SRC:%.*]]
+ // CHECK-NEXT: %{{.*}} = and i64 [[SRC]], [[DEST]]
+ return _blsi_u64(__X);
+}
+
+unsigned long long test_blsmsk_u64(unsigned long long __X) {
+ // CHECK: [[DEST:%.*]] = add i64 [[SRC:%.*]], -1
+ // CHECK-NEXT: %{{.*}} = xor i64 [[DEST]], [[SRC]]
+ return _blsmsk_u64(__X);
+}
+
+unsigned long long test_blsr_u64(unsigned long long __X) {
+ // CHECK: [[DEST:%.*]] = add i64 [[SRC:%.*]], -1
+ // CHECK-NEXT: %{{.*}} = and i64 [[DEST]], [[SRC]]
+ return _blsr_u64(__X);
+}
+
+unsigned long long test_tzcnt_u64(unsigned long long __X) {
+ // CHECK: @llvm.cttz.i64
+ return _tzcnt_u64(__X);
+}
diff --git a/test/CodeGen/bool-convert.c b/test/CodeGen/bool-convert.c
index 8bde837ed3ae..344fb6bb994a 100644
--- a/test/CodeGen/bool-convert.c
+++ b/test/CodeGen/bool-convert.c
@@ -1,10 +1,24 @@
-// RUN: %clang_cc1 -emit-llvm < %s | grep i1 | count 1
+// RUN: %clang_cc1 -triple i686-pc-linux -emit-llvm < %s | FileCheck %s
// All of these should uses the memory representation of _Bool
+
+// CHECK-LABEL: %struct.teststruct1 = type { i8, i8 }
+// CHECK-LABEL: @test1 = common global %struct.teststruct1
struct teststruct1 {_Bool a, b;} test1;
+
+// CHECK-LABEL: @test2 = common global i8* null
_Bool* test2;
+
+// CHECK-LABEL: @test3 = common global [10 x i8]
_Bool test3[10];
+
+// CHECK-LABEL: @test4 = common global [0 x i8]* null
_Bool (*test4)[];
+
+// CHECK-LABEL: define void @f(i32 %x)
void f(int x) {
+ // CHECK: alloca i8, align 1
_Bool test5;
+
+ // CHECK: alloca i8, i32 %{{.*}}, align 1
_Bool test6[x];
}
diff --git a/test/CodeGen/bool-init.c b/test/CodeGen/bool-init.c
index 1a8f127b868f..09b4a87e63dc 100644
--- a/test/CodeGen/bool-init.c
+++ b/test/CodeGen/bool-init.c
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -emit-llvm < %s | grep i1 | count 1
+// RUN: %clang_cc1 -triple x86_64-pc-linux -emit-llvm < %s | FileCheck %s
// Check that the type of this global isn't i1
+// CHECK: @test = global i8 1
_Bool test = &test;
diff --git a/test/CodeGen/bool_test.c b/test/CodeGen/bool_test.c
index a4aa669f16c3..c836b9830339 100644
--- a/test/CodeGen/bool_test.c
+++ b/test/CodeGen/bool_test.c
@@ -1,4 +1,4 @@
-// REQUIRES: ppc32-registered-target
+// REQUIRES: powerpc-registered-target
// RUN: %clang_cc1 -triple powerpc-apple-macosx10.4.0 -emit-llvm -o - %s -O2 -disable-llvm-optzns | FileCheck %s
int boolsize = sizeof(_Bool);
diff --git a/test/CodeGen/branch-on-bool.c b/test/CodeGen/branch-on-bool.c
index 78dae1b1fd78..98a3845fba28 100644
--- a/test/CodeGen/branch-on-bool.c
+++ b/test/CodeGen/branch-on-bool.c
@@ -12,11 +12,3 @@ void fold_if(int a, int b) {
else
bar();
}
-
-void fold_for(int a, int b) {
- // CHECK: define {{.*}} @fold_for(
- // CHECK-NOT: = phi
- // CHECK: }
- for (int i = 0; a && i < b; ++i) foo();
- for (int i = 0; a || i < b; ++i) bar();
-}
diff --git a/test/CodeGen/builtin-assume.c b/test/CodeGen/builtin-assume.c
new file mode 100644
index 000000000000..a381a4c1dfb0
--- /dev/null
+++ b/test/CodeGen/builtin-assume.c
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -triple i386-mingw32 -fms-extensions -emit-llvm -o - %s | FileCheck %s
+
+// CHECK-LABEL: @test1
+int test1(int *a) {
+ __assume(a != 0);
+ return a[0];
+}
+
diff --git a/test/CodeGen/builtin-ms-noop.cpp b/test/CodeGen/builtin-ms-noop.cpp
index 7c5068dd61b0..76c6c139d000 100644
--- a/test/CodeGen/builtin-ms-noop.cpp
+++ b/test/CodeGen/builtin-ms-noop.cpp
@@ -1,14 +1,30 @@
-// RUN: %clang_cc1 -fms-extensions -triple i686-pc-win32 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fms-extensions -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s
-class A {
- public:
+struct A {
~A() {}
};
-void f() {
-// CHECK: @_Z1fv
+extern "C" int f() {
+// CHECK: define i32 @f()
// CHECK-NOT: call void @_ZN1AD1Ev
-// CHECK: ret void
- __noop(A());
+// CHECK: ret i32 0
+ return __noop(A());
};
+extern "C" int g() {
+ return __noop;
+// CHECK: define i32 @g()
+// CHECK: ret i32 0
+}
+
+extern "C" int h() {
+ return (__noop);
+// CHECK: define i32 @h()
+// CHECK: ret i32 0
+}
+
+extern "C" int i() {
+ return __noop + 1;
+// CHECK: define i32 @i()
+// CHECK: ret i32 1
+}
diff --git a/test/CodeGen/builtins-aarch64.c b/test/CodeGen/builtins-aarch64.c
deleted file mode 100644
index 8a93cb41fa4d..000000000000
--- a/test/CodeGen/builtins-aarch64.c
+++ /dev/null
@@ -1,6 +0,0 @@
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -O3 -emit-llvm -o - %s | FileCheck %s
-
-void f0(char *a, char *b) {
- __clear_cache(a,b);
-// CHECK: call {{.*}} @__clear_cache
-}
diff --git a/test/CodeGen/builtins-arm-exclusive.c b/test/CodeGen/builtins-arm-exclusive.c
index 7eccb9e27bb5..2b10238c0f44 100644
--- a/test/CodeGen/builtins-arm-exclusive.c
+++ b/test/CodeGen/builtins-arm-exclusive.c
@@ -1,5 +1,6 @@
// REQUIRES: arm-registered-target
-// RUN: %clang_cc1 -Wall -Werror -triple thumbv7-linux-gnueabi -fno-signed-char -O3 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -Wall -Werror -triple thumbv8-linux-gnueabi -fno-signed-char -O3 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -Wall -Werror -triple arm64-apple-ios7.0 -O3 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-ARM64
// Make sure the canonical use works before going into smaller details:
int atomic_inc(int *addr) {
@@ -12,46 +13,80 @@ int atomic_inc(int *addr) {
return OldVal;
}
-// CHECK: @atomic_inc
+// CHECK-LABEL: @atomic_inc
// CHECK: [[OLDVAL:%.*]] = tail call i32 @llvm.arm.ldrex.p0i32(i32* %addr)
// CHECK: [[INC:%.*]] = add nsw i32 [[OLDVAL]], 1
// CHECK: [[FAILURE:%.*]] = tail call i32 @llvm.arm.strex.p0i32(i32 [[INC]], i32* %addr)
// CHECK: [[TST:%.*]] = icmp eq i32 [[FAILURE]], 0
// CHECK: br i1 [[TST]], label {{%[a-zA-Z0-9.]+}}, label {{%[a-zA-Z0-9.]+}}
+// CHECK-ARM64-LABEL: @atomic_inc
+// CHECK-ARM64: [[OLDVAL:%.*]] = tail call i64 @llvm.aarch64.ldxr.p0i32(i32* %addr)
+// CHECK-ARM64: [[INC:%.*]] = add i64 [[OLDVAL]], 1
+// CHECK-ARM64: [[TRUNC:%.*]] = and i64 [[INC]], 4294967295
+// CHECK-ARM64: [[FAILURE:%.*]] = tail call i32 @llvm.aarch64.stxr.p0i32(i64 [[TRUNC]], i32* %addr)
+// CHECK-ARM64: [[TST:%.*]] = icmp eq i32 [[FAILURE]], 0
+// CHECK-ARM64: br i1 [[TST]], label {{%[a-zA-Z0-9.]+}}, label {{%[a-zA-Z0-9.]+}}
+
struct Simple {
char a, b;
};
int test_ldrex(char *addr, long long *addr64, float *addrfloat) {
-// CHECK: @test_ldrex
+// CHECK-LABEL: @test_ldrex
+// CHECK-ARM64-LABEL: @test_ldrex
int sum = 0;
sum += __builtin_arm_ldrex(addr);
// CHECK: [[INTRES:%.*]] = tail call i32 @llvm.arm.ldrex.p0i8(i8* %addr)
// CHECK: and i32 [[INTRES]], 255
+// CHECK-ARM64: [[INTRES:%.*]] = tail call i64 @llvm.aarch64.ldxr.p0i8(i8* %addr)
+// CHECK-ARM64: [[TRUNCRES:%.*]] = trunc i64 [[INTRES]] to i32
+// CHECK-ARM64: [[SEXTTMP:%.*]] = shl i32 [[TRUNCRES]], 24
+// CHECK-ARM64: ashr exact i32 [[SEXTTMP]], 24
+
sum += __builtin_arm_ldrex((short *)addr);
// CHECK: [[ADDR16:%.*]] = bitcast i8* %addr to i16*
// CHECK: [[INTRES:%.*]] = tail call i32 @llvm.arm.ldrex.p0i16(i16* [[ADDR16]])
// CHECK: [[TMPSEXT:%.*]] = shl i32 [[INTRES]], 16
// CHECK: ashr exact i32 [[TMPSEXT]], 16
+// CHECK-ARM64: [[ADDR16:%.*]] = bitcast i8* %addr to i16*
+// CHECK-ARM64: [[INTRES:%.*]] = tail call i64 @llvm.aarch64.ldxr.p0i16(i16* [[ADDR16]])
+// CHECK-ARM64: [[TRUNCRES:%.*]] = trunc i64 [[INTRES]] to i32
+// CHECK-ARM64: [[TMPSEXT:%.*]] = shl i32 [[TRUNCRES]], 16
+// CHECK-ARM64: ashr exact i32 [[TMPSEXT]], 16
+
sum += __builtin_arm_ldrex((int *)addr);
// CHECK: [[ADDR32:%.*]] = bitcast i8* %addr to i32*
// CHECK: call i32 @llvm.arm.ldrex.p0i32(i32* [[ADDR32]])
+// CHECK-ARM64: [[ADDR32:%.*]] = bitcast i8* %addr to i32*
+// CHECK-ARM64: [[INTRES:%.*]] = tail call i64 @llvm.aarch64.ldxr.p0i32(i32* [[ADDR32]])
+// CHECK-ARM64: trunc i64 [[INTRES]] to i32
+
sum += __builtin_arm_ldrex((long long *)addr);
// CHECK: call { i32, i32 } @llvm.arm.ldrexd(i8* %addr)
+// CHECK-ARM64: [[ADDR64:%.*]] = bitcast i8* %addr to i64*
+// CHECK-ARM64: call i64 @llvm.aarch64.ldxr.p0i64(i64* [[ADDR64]])
+
sum += __builtin_arm_ldrex(addr64);
// CHECK: [[ADDR64_AS8:%.*]] = bitcast i64* %addr64 to i8*
// CHECK: call { i32, i32 } @llvm.arm.ldrexd(i8* [[ADDR64_AS8]])
+// CHECK-ARM64: call i64 @llvm.aarch64.ldxr.p0i64(i64* %addr64)
+
sum += __builtin_arm_ldrex(addrfloat);
// CHECK: [[INTADDR:%.*]] = bitcast float* %addrfloat to i32*
// CHECK: [[INTRES:%.*]] = tail call i32 @llvm.arm.ldrex.p0i32(i32* [[INTADDR]])
// CHECK: bitcast i32 [[INTRES]] to float
+// CHECK-ARM64: [[INTADDR:%.*]] = bitcast float* %addrfloat to i32*
+// CHECK-ARM64: [[INTRES:%.*]] = tail call i64 @llvm.aarch64.ldxr.p0i32(i32* [[INTADDR]])
+// CHECK-ARM64: [[TRUNCRES:%.*]] = trunc i64 [[INTRES]] to i32
+// CHECK-ARM64: bitcast i32 [[TRUNCRES]] to float
+
sum += __builtin_arm_ldrex((double *)addr);
// CHECK: [[STRUCTRES:%.*]] = tail call { i32, i32 } @llvm.arm.ldrexd(i8* %addr)
// CHECK: [[RESHI:%.*]] = extractvalue { i32, i32 } [[STRUCTRES]], 1
@@ -62,51 +97,271 @@ int test_ldrex(char *addr, long long *addr64, float *addrfloat) {
// CHECK: [[INTRES:%.*]] = or i64 [[RESHIHI]], [[RESLO64]]
// CHECK: bitcast i64 [[INTRES]] to double
+// CHECK-ARM64: [[INTRES:%.*]] = tail call i64 @llvm.aarch64.ldxr.p0i64(i64* [[ADDR64]])
+// CHECK-ARM64: bitcast i64 [[INTRES]] to double
+
sum += *__builtin_arm_ldrex((int **)addr);
// CHECK: [[INTRES:%.*]] = tail call i32 @llvm.arm.ldrex.p0i32(i32* [[ADDR32]])
// CHECK: inttoptr i32 [[INTRES]] to i32*
+// CHECK-ARM64: [[INTRES:%.*]] = tail call i64 @llvm.aarch64.ldxr.p0i64(i64* [[ADDR64]])
+// CHECK-ARM64: inttoptr i64 [[INTRES]] to i32*
+
sum += __builtin_arm_ldrex((struct Simple **)addr)->a;
// CHECK: [[INTRES:%.*]] = tail call i32 @llvm.arm.ldrex.p0i32(i32* [[ADDR32]])
// CHECK: inttoptr i32 [[INTRES]] to %struct.Simple*
+// CHECK-ARM64: [[INTRES:%.*]] = tail call i64 @llvm.aarch64.ldxr.p0i64(i64* [[ADDR64]])
+// CHECK-ARM64: inttoptr i64 [[INTRES]] to %struct.Simple*
+ return sum;
+}
+
+int test_ldaex(char *addr, long long *addr64, float *addrfloat) {
+// CHECK-LABEL: @test_ldaex
+// CHECK-ARM64-LABEL: @test_ldaex
+ int sum = 0;
+ sum += __builtin_arm_ldaex(addr);
+// CHECK: [[INTRES:%.*]] = tail call i32 @llvm.arm.ldaex.p0i8(i8* %addr)
+// CHECK: and i32 [[INTRES]], 255
+
+// CHECK-ARM64: [[INTRES:%.*]] = tail call i64 @llvm.aarch64.ldaxr.p0i8(i8* %addr)
+// CHECK-ARM64: [[TRUNCRES:%.*]] = trunc i64 [[INTRES]] to i32
+// CHECK-ARM64: [[SEXTTMP:%.*]] = shl i32 [[TRUNCRES]], 24
+// CHECK-ARM64: ashr exact i32 [[SEXTTMP]], 24
+
+ sum += __builtin_arm_ldaex((short *)addr);
+// CHECK: [[ADDR16:%.*]] = bitcast i8* %addr to i16*
+// CHECK: [[INTRES:%.*]] = tail call i32 @llvm.arm.ldaex.p0i16(i16* [[ADDR16]])
+// CHECK: [[TMPSEXT:%.*]] = shl i32 [[INTRES]], 16
+// CHECK: ashr exact i32 [[TMPSEXT]], 16
+
+// CHECK-ARM64: [[ADDR16:%.*]] = bitcast i8* %addr to i16*
+// CHECK-ARM64: [[INTRES:%.*]] = tail call i64 @llvm.aarch64.ldaxr.p0i16(i16* [[ADDR16]])
+// CHECK-ARM64: [[TRUNCRES:%.*]] = trunc i64 [[INTRES]] to i32
+// CHECK-ARM64: [[TMPSEXT:%.*]] = shl i32 [[TRUNCRES]], 16
+// CHECK-ARM64: ashr exact i32 [[TMPSEXT]], 16
+
+ sum += __builtin_arm_ldaex((int *)addr);
+// CHECK: [[ADDR32:%.*]] = bitcast i8* %addr to i32*
+// CHECK: call i32 @llvm.arm.ldaex.p0i32(i32* [[ADDR32]])
+
+// CHECK-ARM64: [[ADDR32:%.*]] = bitcast i8* %addr to i32*
+// CHECK-ARM64: [[INTRES:%.*]] = tail call i64 @llvm.aarch64.ldaxr.p0i32(i32* [[ADDR32]])
+// CHECK-ARM64: trunc i64 [[INTRES]] to i32
+
+ sum += __builtin_arm_ldaex((long long *)addr);
+// CHECK: call { i32, i32 } @llvm.arm.ldaexd(i8* %addr)
+
+// CHECK-ARM64: [[ADDR64:%.*]] = bitcast i8* %addr to i64*
+// CHECK-ARM64: call i64 @llvm.aarch64.ldaxr.p0i64(i64* [[ADDR64]])
+
+ sum += __builtin_arm_ldaex(addr64);
+// CHECK: [[ADDR64_AS8:%.*]] = bitcast i64* %addr64 to i8*
+// CHECK: call { i32, i32 } @llvm.arm.ldaexd(i8* [[ADDR64_AS8]])
+
+// CHECK-ARM64: call i64 @llvm.aarch64.ldaxr.p0i64(i64* %addr64)
+
+ sum += __builtin_arm_ldaex(addrfloat);
+// CHECK: [[INTADDR:%.*]] = bitcast float* %addrfloat to i32*
+// CHECK: [[INTRES:%.*]] = tail call i32 @llvm.arm.ldaex.p0i32(i32* [[INTADDR]])
+// CHECK: bitcast i32 [[INTRES]] to float
+
+// CHECK-ARM64: [[INTADDR:%.*]] = bitcast float* %addrfloat to i32*
+// CHECK-ARM64: [[INTRES:%.*]] = tail call i64 @llvm.aarch64.ldaxr.p0i32(i32* [[INTADDR]])
+// CHECK-ARM64: [[TRUNCRES:%.*]] = trunc i64 [[INTRES]] to i32
+// CHECK-ARM64: bitcast i32 [[TRUNCRES]] to float
+
+ sum += __builtin_arm_ldaex((double *)addr);
+// CHECK: [[STRUCTRES:%.*]] = tail call { i32, i32 } @llvm.arm.ldaexd(i8* %addr)
+// CHECK: [[RESHI:%.*]] = extractvalue { i32, i32 } [[STRUCTRES]], 1
+// CHECK: [[RESLO:%.*]] = extractvalue { i32, i32 } [[STRUCTRES]], 0
+// CHECK: [[RESHI64:%.*]] = zext i32 [[RESHI]] to i64
+// CHECK: [[RESLO64:%.*]] = zext i32 [[RESLO]] to i64
+// CHECK: [[RESHIHI:%.*]] = shl nuw i64 [[RESHI64]], 32
+// CHECK: [[INTRES:%.*]] = or i64 [[RESHIHI]], [[RESLO64]]
+// CHECK: bitcast i64 [[INTRES]] to double
+
+// CHECK-ARM64: [[INTRES:%.*]] = tail call i64 @llvm.aarch64.ldaxr.p0i64(i64* [[ADDR64]])
+// CHECK-ARM64: bitcast i64 [[INTRES]] to double
+
+ sum += *__builtin_arm_ldaex((int **)addr);
+// CHECK: [[INTRES:%.*]] = tail call i32 @llvm.arm.ldaex.p0i32(i32* [[ADDR32]])
+// CHECK: inttoptr i32 [[INTRES]] to i32*
+
+// CHECK-ARM64: [[INTRES:%.*]] = tail call i64 @llvm.aarch64.ldaxr.p0i64(i64* [[ADDR64]])
+// CHECK-ARM64: inttoptr i64 [[INTRES]] to i32*
+
+ sum += __builtin_arm_ldaex((struct Simple **)addr)->a;
+// CHECK: [[INTRES:%.*]] = tail call i32 @llvm.arm.ldaex.p0i32(i32* [[ADDR32]])
+// CHECK: inttoptr i32 [[INTRES]] to %struct.Simple*
+
+// CHECK-ARM64: [[INTRES:%.*]] = tail call i64 @llvm.aarch64.ldaxr.p0i64(i64* [[ADDR64]])
+// CHECK-ARM64: inttoptr i64 [[INTRES]] to %struct.Simple*
return sum;
}
int test_strex(char *addr) {
-// CHECK: @test_strex
+// CHECK-LABEL: @test_strex
+// CHECK-ARM64-LABEL: @test_strex
int res = 0;
struct Simple var = {0};
res |= __builtin_arm_strex(4, addr);
// CHECK: call i32 @llvm.arm.strex.p0i8(i32 4, i8* %addr)
+// CHECK-ARM64: call i32 @llvm.aarch64.stxr.p0i8(i64 4, i8* %addr)
+
res |= __builtin_arm_strex(42, (short *)addr);
// CHECK: [[ADDR16:%.*]] = bitcast i8* %addr to i16*
// CHECK: call i32 @llvm.arm.strex.p0i16(i32 42, i16* [[ADDR16]])
+// CHECK-ARM64: [[ADDR16:%.*]] = bitcast i8* %addr to i16*
+// CHECK-ARM64: call i32 @llvm.aarch64.stxr.p0i16(i64 42, i16* [[ADDR16]])
+
res |= __builtin_arm_strex(42, (int *)addr);
// CHECK: [[ADDR32:%.*]] = bitcast i8* %addr to i32*
// CHECK: call i32 @llvm.arm.strex.p0i32(i32 42, i32* [[ADDR32]])
+// CHECK-ARM64: [[ADDR32:%.*]] = bitcast i8* %addr to i32*
+// CHECK-ARM64: call i32 @llvm.aarch64.stxr.p0i32(i64 42, i32* [[ADDR32]])
+
res |= __builtin_arm_strex(42, (long long *)addr);
// CHECK: call i32 @llvm.arm.strexd(i32 42, i32 0, i8* %addr)
+// CHECK-ARM64: [[ADDR64:%.*]] = bitcast i8* %addr to i64*
+// CHECK-ARM64: call i32 @llvm.aarch64.stxr.p0i64(i64 42, i64* [[ADDR64]])
+
res |= __builtin_arm_strex(2.71828f, (float *)addr);
// CHECK: call i32 @llvm.arm.strex.p0i32(i32 1076754509, i32* [[ADDR32]])
+// CHECK-ARM64: call i32 @llvm.aarch64.stxr.p0i32(i64 1076754509, i32* [[ADDR32]])
+
res |= __builtin_arm_strex(3.14159, (double *)addr);
// CHECK: call i32 @llvm.arm.strexd(i32 -266631570, i32 1074340345, i8* %addr)
+// CHECK-ARM64: call i32 @llvm.aarch64.stxr.p0i64(i64 4614256650576692846, i64* [[ADDR64]])
+
res |= __builtin_arm_strex(&var, (struct Simple **)addr);
// CHECK: [[INTVAL:%.*]] = ptrtoint i16* %var to i32
// CHECK: call i32 @llvm.arm.strex.p0i32(i32 [[INTVAL]], i32* [[ADDR32]])
+// CHECK-ARM64: [[INTVAL:%.*]] = ptrtoint i16* %var to i64
+// CHECK-ARM64: call i32 @llvm.aarch64.stxr.p0i64(i64 [[INTVAL]], i64* [[ADDR64]])
+
+ return res;
+}
+
+int test_stlex(char *addr) {
+// CHECK-LABEL: @test_stlex
+// CHECK-ARM64-LABEL: @test_stlex
+ int res = 0;
+ struct Simple var = {0};
+ res |= __builtin_arm_stlex(4, addr);
+// CHECK: call i32 @llvm.arm.stlex.p0i8(i32 4, i8* %addr)
+
+// CHECK-ARM64: call i32 @llvm.aarch64.stlxr.p0i8(i64 4, i8* %addr)
+
+ res |= __builtin_arm_stlex(42, (short *)addr);
+// CHECK: [[ADDR16:%.*]] = bitcast i8* %addr to i16*
+// CHECK: call i32 @llvm.arm.stlex.p0i16(i32 42, i16* [[ADDR16]])
+
+// CHECK-ARM64: [[ADDR16:%.*]] = bitcast i8* %addr to i16*
+// CHECK-ARM64: call i32 @llvm.aarch64.stlxr.p0i16(i64 42, i16* [[ADDR16]])
+
+ res |= __builtin_arm_stlex(42, (int *)addr);
+// CHECK: [[ADDR32:%.*]] = bitcast i8* %addr to i32*
+// CHECK: call i32 @llvm.arm.stlex.p0i32(i32 42, i32* [[ADDR32]])
+
+// CHECK-ARM64: [[ADDR32:%.*]] = bitcast i8* %addr to i32*
+// CHECK-ARM64: call i32 @llvm.aarch64.stlxr.p0i32(i64 42, i32* [[ADDR32]])
+
+ res |= __builtin_arm_stlex(42, (long long *)addr);
+// CHECK: call i32 @llvm.arm.stlexd(i32 42, i32 0, i8* %addr)
+
+// CHECK-ARM64: [[ADDR64:%.*]] = bitcast i8* %addr to i64*
+// CHECK-ARM64: call i32 @llvm.aarch64.stlxr.p0i64(i64 42, i64* [[ADDR64]])
+
+ res |= __builtin_arm_stlex(2.71828f, (float *)addr);
+// CHECK: call i32 @llvm.arm.stlex.p0i32(i32 1076754509, i32* [[ADDR32]])
+
+// CHECK-ARM64: call i32 @llvm.aarch64.stlxr.p0i32(i64 1076754509, i32* [[ADDR32]])
+
+ res |= __builtin_arm_stlex(3.14159, (double *)addr);
+// CHECK: call i32 @llvm.arm.stlexd(i32 -266631570, i32 1074340345, i8* %addr)
+
+// CHECK-ARM64: call i32 @llvm.aarch64.stlxr.p0i64(i64 4614256650576692846, i64* [[ADDR64]])
+
+ res |= __builtin_arm_stlex(&var, (struct Simple **)addr);
+// CHECK: [[INTVAL:%.*]] = ptrtoint i16* %var to i32
+// CHECK: call i32 @llvm.arm.stlex.p0i32(i32 [[INTVAL]], i32* [[ADDR32]])
+
+// CHECK-ARM64: [[INTVAL:%.*]] = ptrtoint i16* %var to i64
+// CHECK-ARM64: call i32 @llvm.aarch64.stlxr.p0i64(i64 [[INTVAL]], i64* [[ADDR64]])
+
return res;
}
void test_clrex() {
-// CHECK: @test_clrex
+// CHECK-LABEL: @test_clrex
+// CHECK-ARM64-LABEL: @test_clrex
__builtin_arm_clrex();
// CHECK: call void @llvm.arm.clrex()
+// CHECK-ARM64: call void @llvm.aarch64.clrex()
+}
+
+#ifdef __aarch64__
+// 128-bit tests
+
+__int128 test_ldrex_128(__int128 *addr) {
+// CHECK-ARM64-LABEL: @test_ldrex_128
+
+ return __builtin_arm_ldrex(addr);
+// CHECK-ARM64: [[ADDR8:%.*]] = bitcast i128* %addr to i8*
+// CHECK-ARM64: [[STRUCTRES:%.*]] = tail call { i64, i64 } @llvm.aarch64.ldxp(i8* [[ADDR8]])
+// CHECK-ARM64: [[RESHI:%.*]] = extractvalue { i64, i64 } [[STRUCTRES]], 1
+// CHECK-ARM64: [[RESLO:%.*]] = extractvalue { i64, i64 } [[STRUCTRES]], 0
+// CHECK-ARM64: [[RESHI64:%.*]] = zext i64 [[RESHI]] to i128
+// CHECK-ARM64: [[RESLO64:%.*]] = zext i64 [[RESLO]] to i128
+// CHECK-ARM64: [[RESHIHI:%.*]] = shl nuw i128 [[RESHI64]], 64
+// CHECK-ARM64: [[INTRES:%.*]] = or i128 [[RESHIHI]], [[RESLO64]]
+// CHECK-ARM64: ret i128 [[INTRES]]
+}
+
+int test_strex_128(__int128 *addr, __int128 val) {
+// CHECK-ARM64-LABEL: @test_strex_128
+
+ return __builtin_arm_strex(val, addr);
+// CHECK-ARM64: [[VALLO:%.*]] = trunc i128 %val to i64
+// CHECK-ARM64: [[VALHI128:%.*]] = lshr i128 %val, 64
+// CHECK-ARM64: [[VALHI:%.*]] = trunc i128 [[VALHI128]] to i64
+// CHECK-ARM64: [[ADDR8:%.*]] = bitcast i128* %addr to i8*
+// CHECK-ARM64: [[RES:%.*]] = tail call i32 @llvm.aarch64.stxp(i64 [[VALLO]], i64 [[VALHI]], i8* [[ADDR8]])
}
+
+__int128 test_ldaex_128(__int128 *addr) {
+// CHECK-ARM64-LABEL: @test_ldaex_128
+
+ return __builtin_arm_ldaex(addr);
+// CHECK-ARM64: [[ADDR8:%.*]] = bitcast i128* %addr to i8*
+// CHECK-ARM64: [[STRUCTRES:%.*]] = tail call { i64, i64 } @llvm.aarch64.ldaxp(i8* [[ADDR8]])
+// CHECK-ARM64: [[RESHI:%.*]] = extractvalue { i64, i64 } [[STRUCTRES]], 1
+// CHECK-ARM64: [[RESLO:%.*]] = extractvalue { i64, i64 } [[STRUCTRES]], 0
+// CHECK-ARM64: [[RESHI64:%.*]] = zext i64 [[RESHI]] to i128
+// CHECK-ARM64: [[RESLO64:%.*]] = zext i64 [[RESLO]] to i128
+// CHECK-ARM64: [[RESHIHI:%.*]] = shl nuw i128 [[RESHI64]], 64
+// CHECK-ARM64: [[INTRES:%.*]] = or i128 [[RESHIHI]], [[RESLO64]]
+// CHECK-ARM64: ret i128 [[INTRES]]
+}
+
+int test_stlex_128(__int128 *addr, __int128 val) {
+// CHECK-ARM64-LABEL: @test_stlex_128
+
+ return __builtin_arm_stlex(val, addr);
+// CHECK-ARM64: [[VALLO:%.*]] = trunc i128 %val to i64
+// CHECK-ARM64: [[VALHI128:%.*]] = lshr i128 %val, 64
+// CHECK-ARM64: [[VALHI:%.*]] = trunc i128 [[VALHI128]] to i64
+// CHECK-ARM64: [[ADDR8:%.*]] = bitcast i128* %addr to i8*
+// CHECK-ARM64: [[RES:%.*]] = tail call i32 @llvm.aarch64.stlxp(i64 [[VALLO]], i64 [[VALHI]], i8* [[ADDR8]])
+}
+
+#endif
diff --git a/test/CodeGen/builtins-arm-microsoft.c b/test/CodeGen/builtins-arm-microsoft.c
new file mode 100644
index 000000000000..6f7b3ea86e75
--- /dev/null
+++ b/test/CodeGen/builtins-arm-microsoft.c
@@ -0,0 +1,41 @@
+// RUN: %clang_cc1 -triple thumbv7-windows -fms-compatibility -emit-llvm -o - %s \
+// RUN: | FileCheck %s -check-prefix CHECK-MSVC
+// RUN: %clang_cc1 -triple armv7-eabi -emit-llvm %s -o - \
+// RUN: | FileCheck %s -check-prefix CHECK-EABI
+// REQUIRES: arm-registered-target
+
+void test_yield_intrinsic() {
+ __yield();
+}
+
+// CHECK-MSVC: call void @llvm.arm.hint(i32 1)
+// CHECK-EABI-NOT: call void @llvm.arm.hint(i32 1)
+
+void wfe() {
+ __wfe();
+}
+
+// CHECK-MSVC: call {{.*}} @llvm.arm.hint(i32 2)
+// CHECK-EABI-NOT: call {{.*}} @llvm.arm.hint(i32 2)
+
+void wfi() {
+ __wfi();
+}
+
+// CHECK-MSVC: call {{.*}} @llvm.arm.hint(i32 3)
+// CHECK-EABI-NOT: call {{.*}} @llvm.arm.hint(i32 3)
+
+void sev() {
+ __sev();
+}
+
+// CHECK-MSVC: call {{.*}} @llvm.arm.hint(i32 4)
+// CHECK-EABI-NOT: call {{.*}} @llvm.arm.hint(i32 4)
+
+void sevl() {
+ __sevl();
+}
+
+// CHECK-MSVC: call {{.*}} @llvm.arm.hint(i32 5)
+// CHECK-EABI-NOT: call {{.*}} @llvm.arm.hint(i32 5)
+
diff --git a/test/CodeGen/builtins-arm.c b/test/CodeGen/builtins-arm.c
index 937e1d962594..a51df15ce56b 100644
--- a/test/CodeGen/builtins-arm.c
+++ b/test/CodeGen/builtins-arm.c
@@ -19,12 +19,50 @@ void test_eh_return_data_regno()
res = __builtin_eh_return_data_regno(1); // CHECK: store volatile i32 1
}
+void nop() {
+ __builtin_arm_nop();
+}
+
+// CHECK: call {{.*}} @llvm.arm.hint(i32 0)
+
+void yield() {
+ __builtin_arm_yield();
+}
+
+// CHECK: call {{.*}} @llvm.arm.hint(i32 1)
+
+void wfe() {
+ __builtin_arm_wfe();
+}
+
+// CHECK: call {{.*}} @llvm.arm.hint(i32 2)
+
+void wfi() {
+ __builtin_arm_wfi();
+}
+
+// CHECK: call {{.*}} @llvm.arm.hint(i32 3)
+
+void sev() {
+ __builtin_arm_sev();
+}
+
+// CHECK: call {{.*}} @llvm.arm.hint(i32 4)
+
void sevl() {
__builtin_arm_sevl();
}
-// CHECK: call {{.*}} @llvm.arm.sevl
+
+// CHECK: call {{.*}} @llvm.arm.hint(i32 5)
void test_barrier() {
__builtin_arm_dmb(1); //CHECK: call {{.*}} @llvm.arm.dmb(i32 1)
__builtin_arm_dsb(2); //CHECK: call {{.*}} @llvm.arm.dsb(i32 2)
+ __builtin_arm_isb(3); //CHECK: call {{.*}} @llvm.arm.isb(i32 3)
+}
+
+// CHECK: call {{.*}} @llvm.arm.rbit(i32 %a)
+
+unsigned rbit(unsigned a) {
+ return __builtin_arm_rbit(a);
}
diff --git a/test/CodeGen/builtins-arm64.c b/test/CodeGen/builtins-arm64.c
new file mode 100644
index 000000000000..cfa118122793
--- /dev/null
+++ b/test/CodeGen/builtins-arm64.c
@@ -0,0 +1,31 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios -O3 -emit-llvm -o - %s | FileCheck %s
+
+void f0(void *a, void *b) {
+ __clear_cache(a,b);
+// CHECK: call {{.*}} @__clear_cache
+}
+
+// CHECK: call {{.*}} @llvm.aarch64.rbit.i32(i32 %a)
+unsigned rbit(unsigned a) {
+ return __builtin_arm_rbit(a);
+}
+
+// CHECK: call {{.*}} @llvm.aarch64.rbit.i64(i64 %a)
+unsigned long long rbit64(unsigned long long a) {
+ return __builtin_arm_rbit64(a);
+}
+
+void hints() {
+ __builtin_arm_nop(); //CHECK: call {{.*}} @llvm.aarch64.hint(i32 0)
+ __builtin_arm_yield(); //CHECK: call {{.*}} @llvm.aarch64.hint(i32 1)
+ __builtin_arm_wfe(); //CHECK: call {{.*}} @llvm.aarch64.hint(i32 2)
+ __builtin_arm_wfi(); //CHECK: call {{.*}} @llvm.aarch64.hint(i32 3)
+ __builtin_arm_sev(); //CHECK: call {{.*}} @llvm.aarch64.hint(i32 4)
+ __builtin_arm_sevl(); //CHECK: call {{.*}} @llvm.aarch64.hint(i32 5)
+}
+
+void barriers() {
+ __builtin_arm_dmb(1); //CHECK: call {{.*}} @llvm.aarch64.dmb(i32 1)
+ __builtin_arm_dsb(2); //CHECK: call {{.*}} @llvm.aarch64.dsb(i32 2)
+ __builtin_arm_isb(3); //CHECK: call {{.*}} @llvm.aarch64.isb(i32 3)
+}
diff --git a/test/CodeGen/builtins-mips-msa.c b/test/CodeGen/builtins-mips-msa.c
index 69cb8e22a194..38aea04d9c36 100644
--- a/test/CodeGen/builtins-mips-msa.c
+++ b/test/CodeGen/builtins-mips-msa.c
@@ -701,15 +701,15 @@ void test(void) {
v8i16_r = __builtin_msa_shf_h(v8i16_a, 3); // CHECK: call <8 x i16> @llvm.mips.shf.h(
v4i32_r = __builtin_msa_shf_w(v4i32_a, 3); // CHECK: call <4 x i32> @llvm.mips.shf.w(
- v16i8_r = __builtin_msa_sld_b(v16i8_a, 10); // CHECK: call <16 x i8> @llvm.mips.sld.b(
- v8i16_r = __builtin_msa_sld_h(v8i16_a, 10); // CHECK: call <8 x i16> @llvm.mips.sld.h(
- v4i32_r = __builtin_msa_sld_w(v4i32_a, 10); // CHECK: call <4 x i32> @llvm.mips.sld.w(
- v2i64_r = __builtin_msa_sld_d(v2i64_a, 10); // CHECK: call <2 x i64> @llvm.mips.sld.d(
-
- v16i8_r = __builtin_msa_sldi_b(v16i8_a, 3); // CHECK: call <16 x i8> @llvm.mips.sldi.b(
- v8i16_r = __builtin_msa_sldi_h(v8i16_a, 3); // CHECK: call <8 x i16> @llvm.mips.sldi.h(
- v4i32_r = __builtin_msa_sldi_w(v4i32_a, 3); // CHECK: call <4 x i32> @llvm.mips.sldi.w(
- v2i64_r = __builtin_msa_sldi_d(v2i64_a, 3); // CHECK: call <2 x i64> @llvm.mips.sldi.d(
+ v16i8_r = __builtin_msa_sld_b(v16i8_r, v16i8_a, 10); // CHECK: call <16 x i8> @llvm.mips.sld.b(
+ v8i16_r = __builtin_msa_sld_h(v8i16_r, v8i16_a, 10); // CHECK: call <8 x i16> @llvm.mips.sld.h(
+ v4i32_r = __builtin_msa_sld_w(v4i32_r, v4i32_a, 10); // CHECK: call <4 x i32> @llvm.mips.sld.w(
+ v2i64_r = __builtin_msa_sld_d(v2i64_r, v2i64_a, 10); // CHECK: call <2 x i64> @llvm.mips.sld.d(
+
+ v16i8_r = __builtin_msa_sldi_b(v16i8_r, v16i8_a, 3); // CHECK: call <16 x i8> @llvm.mips.sldi.b(
+ v8i16_r = __builtin_msa_sldi_h(v8i16_r, v8i16_a, 3); // CHECK: call <8 x i16> @llvm.mips.sldi.h(
+ v4i32_r = __builtin_msa_sldi_w(v4i32_r, v4i32_a, 3); // CHECK: call <4 x i32> @llvm.mips.sldi.w(
+ v2i64_r = __builtin_msa_sldi_d(v2i64_r, v2i64_a, 3); // CHECK: call <2 x i64> @llvm.mips.sldi.d(
v16i8_r = __builtin_msa_sll_b(v16i8_a, v16i8_b); // CHECK: call <16 x i8> @llvm.mips.sll.b(
v8i16_r = __builtin_msa_sll_h(v8i16_a, v8i16_b); // CHECK: call <8 x i16> @llvm.mips.sll.h(
diff --git a/test/CodeGen/builtins-nvptx.c b/test/CodeGen/builtins-nvptx.c
index 7deee8ef48eb..cee9061292bd 100644
--- a/test/CodeGen/builtins-nvptx.c
+++ b/test/CodeGen/builtins-nvptx.c
@@ -1,5 +1,4 @@
// REQUIRES: nvptx-registered-target
-// REQUIRES: nvptx64-registered-target
// RUN: %clang_cc1 -triple nvptx-unknown-unknown -S -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -triple nvptx64-unknown-unknown -S -emit-llvm -o - %s | FileCheck %s
diff --git a/test/CodeGen/builtins-ppc-altivec.c b/test/CodeGen/builtins-ppc-altivec.c
index 47a198f2aeda..31491072a1d4 100644
--- a/test/CodeGen/builtins-ppc-altivec.c
+++ b/test/CodeGen/builtins-ppc-altivec.c
@@ -1,5 +1,7 @@
-// REQUIRES: ppc32-registered-target
+// REQUIRES: powerpc-registered-target
// RUN: %clang_cc1 -faltivec -triple powerpc-unknown-unknown -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -faltivec -triple powerpc64-unknown-unknown -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -faltivec -triple powerpc64le-unknown-unknown -emit-llvm %s -o - | FileCheck %s -check-prefix=CHECK-LE
vector bool char vbc = { 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 };
vector signed char vsc = { 1, -2, 3, -4, 5, -6, 7, -8, 9, -10, 11, -12, 13, -14, 15, -16 };
@@ -45,1267 +47,3737 @@ int res_f;
void test1() {
/* vec_abs */
- vsc = vec_abs(vsc); // CHECK: sub <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vmaxsb
+ vsc = vec_abs(vsc);
+// CHECK: sub <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vmaxsb
+// CHECK-LE: sub <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vmaxsb
+
+ vs = vec_abs(vs);
+// CHECK: sub <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vmaxsh
+// CHECK-LE: sub <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vmaxsh
+
+ vi = vec_abs(vi);
+// CHECK: sub <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vmaxsw
+// CHECK-LE: sub <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vmaxsw
+
+ vf = vec_abs(vf);
+// CHECK: and <4 x i32>
+// CHECK-LE: and <4 x i32>
- vs = vec_abs(vs); // CHECK: sub <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vmaxsh
+ /* vec_abs */
+ vsc = vec_abss(vsc);
+// CHECK: @llvm.ppc.altivec.vsubsbs
+// CHECK: @llvm.ppc.altivec.vmaxsb
+// CHECK-LE: @llvm.ppc.altivec.vsubsbs
+// CHECK-LE: @llvm.ppc.altivec.vmaxsb
+
+ vs = vec_abss(vs);
+// CHECK: @llvm.ppc.altivec.vsubshs
+// CHECK: @llvm.ppc.altivec.vmaxsh
+// CHECK-LE: @llvm.ppc.altivec.vsubshs
+// CHECK-LE: @llvm.ppc.altivec.vmaxsh
+
+ vi = vec_abss(vi);
+// CHECK: @llvm.ppc.altivec.vsubsws
+// CHECK: @llvm.ppc.altivec.vmaxsw
+// CHECK-LE: @llvm.ppc.altivec.vsubsws
+// CHECK-LE: @llvm.ppc.altivec.vmaxsw
- vi = vec_abs(vi); // CHECK: sub <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vmaxsw
+ /* vec_add */
+ res_vsc = vec_add(vsc, vsc);
+// CHECK: add <16 x i8>
+// CHECK-LE: add <16 x i8>
- vf = vec_abs(vf); // CHECK: and <4 x i32>
+ res_vsc = vec_add(vbc, vsc);
+// CHECK: add <16 x i8>
+// CHECK-LE: add <16 x i8>
- /* vec_abs */
- vsc = vec_abss(vsc); // CHECK: @llvm.ppc.altivec.vsubsbs
- // CHECK: @llvm.ppc.altivec.vmaxsb
+ res_vsc = vec_add(vsc, vbc);
+// CHECK: add <16 x i8>
+// CHECK-LE: add <16 x i8>
- vs = vec_abss(vs); // CHECK: @llvm.ppc.altivec.vsubshs
- // CHECK: @llvm.ppc.altivec.vmaxsh
+ res_vuc = vec_add(vuc, vuc);
+// CHECK: add <16 x i8>
+// CHECK-LE: add <16 x i8>
- vi = vec_abss(vi); // CHECK: @llvm.ppc.altivec.vsubsws
- // CHECK: @llvm.ppc.altivec.vmaxsw
+ res_vuc = vec_add(vbc, vuc);
+// CHECK: add <16 x i8>
+// CHECK-LE: add <16 x i8>
- /* vec_add */
- res_vsc = vec_add(vsc, vsc); // CHECK: add <16 x i8>
- res_vsc = vec_add(vbc, vsc); // CHECK: add <16 x i8>
- res_vsc = vec_add(vsc, vbc); // CHECK: add <16 x i8>
- res_vuc = vec_add(vuc, vuc); // CHECK: add <16 x i8>
- res_vuc = vec_add(vbc, vuc); // CHECK: add <16 x i8>
- res_vuc = vec_add(vuc, vbc); // CHECK: add <16 x i8>
- res_vs = vec_add(vs, vs); // CHECK: add <8 x i16>
- res_vs = vec_add(vbs, vs); // CHECK: add <8 x i16>
- res_vs = vec_add(vs, vbs); // CHECK: add <8 x i16>
- res_vus = vec_add(vus, vus); // CHECK: add <8 x i16>
- res_vus = vec_add(vbs, vus); // CHECK: add <8 x i16>
- res_vus = vec_add(vus, vbs); // CHECK: add <8 x i16>
- res_vi = vec_add(vi, vi); // CHECK: add <4 x i32>
- res_vi = vec_add(vbi, vi); // CHECK: add <4 x i32>
- res_vi = vec_add(vi, vbi); // CHECK: add <4 x i32>
- res_vui = vec_add(vui, vui); // CHECK: add <4 x i32>
- res_vui = vec_add(vbi, vui); // CHECK: add <4 x i32>
- res_vui = vec_add(vui, vbi); // CHECK: add <4 x i32>
- res_vf = vec_add(vf, vf); // CHECK: fadd <4 x float>
- res_vsc = vec_vaddubm(vsc, vsc); // CHECK: add <16 x i8>
- res_vsc = vec_vaddubm(vbc, vsc); // CHECK: add <16 x i8>
- res_vsc = vec_vaddubm(vsc, vbc); // CHECK: add <16 x i8>
- res_vuc = vec_vaddubm(vuc, vuc); // CHECK: add <16 x i8>
- res_vuc = vec_vaddubm(vbc, vuc); // CHECK: add <16 x i8>
- res_vuc = vec_vaddubm(vuc, vbc); // CHECK: add <16 x i8>
- res_vs = vec_vadduhm(vs, vs); // CHECK: add <8 x i16>
- res_vs = vec_vadduhm(vbs, vs); // CHECK: add <8 x i16>
- res_vs = vec_vadduhm(vs, vbs); // CHECK: add <8 x i16>
- res_vus = vec_vadduhm(vus, vus); // CHECK: add <8 x i16>
- res_vus = vec_vadduhm(vbs, vus); // CHECK: add <8 x i16>
- res_vus = vec_vadduhm(vus, vbs); // CHECK: add <8 x i16>
- res_vi = vec_vadduwm(vi, vi); // CHECK: add <4 x i32>
- res_vi = vec_vadduwm(vbi, vi); // CHECK: add <4 x i32>
- res_vi = vec_vadduwm(vi, vbi); // CHECK: add <4 x i32>
- res_vui = vec_vadduwm(vui, vui); // CHECK: add <4 x i32>
- res_vui = vec_vadduwm(vbi, vui); // CHECK: add <4 x i32>
- res_vui = vec_vadduwm(vui, vbi); // CHECK: add <4 x i32>
- res_vf = vec_vaddfp(vf, vf); // CHECK: fadd <4 x float>
+ res_vuc = vec_add(vuc, vbc);
+// CHECK: add <16 x i8>
+// CHECK-LE: add <16 x i8>
+
+ res_vs = vec_add(vs, vs);
+// CHECK: add <8 x i16>
+// CHECK-LE: add <8 x i16>
+
+ res_vs = vec_add(vbs, vs);
+// CHECK: add <8 x i16>
+// CHECK-LE: add <8 x i16>
+
+ res_vs = vec_add(vs, vbs);
+// CHECK: add <8 x i16>
+// CHECK-LE: add <8 x i16>
+
+ res_vus = vec_add(vus, vus);
+// CHECK: add <8 x i16>
+// CHECK-LE: add <8 x i16>
+
+ res_vus = vec_add(vbs, vus);
+// CHECK: add <8 x i16>
+// CHECK-LE: add <8 x i16>
+
+ res_vus = vec_add(vus, vbs);
+// CHECK: add <8 x i16>
+// CHECK-LE: add <8 x i16>
+
+ res_vi = vec_add(vi, vi);
+// CHECK: add <4 x i32>
+// CHECK-LE: add <4 x i32>
+
+ res_vi = vec_add(vbi, vi);
+// CHECK: add <4 x i32>
+// CHECK-LE: add <4 x i32>
+
+ res_vi = vec_add(vi, vbi);
+// CHECK: add <4 x i32>
+// CHECK-LE: add <4 x i32>
+
+ res_vui = vec_add(vui, vui);
+// CHECK: add <4 x i32>
+// CHECK-LE: add <4 x i32>
+
+ res_vui = vec_add(vbi, vui);
+// CHECK: add <4 x i32>
+// CHECK-LE: add <4 x i32>
+
+ res_vui = vec_add(vui, vbi);
+// CHECK: add <4 x i32>
+// CHECK-LE: add <4 x i32>
+
+ res_vf = vec_add(vf, vf);
+// CHECK: fadd <4 x float>
+// CHECK-LE: fadd <4 x float>
+
+ res_vsc = vec_vaddubm(vsc, vsc);
+// CHECK: add <16 x i8>
+// CHECK-LE: add <16 x i8>
+
+ res_vsc = vec_vaddubm(vbc, vsc);
+// CHECK: add <16 x i8>
+// CHECK-LE: add <16 x i8>
+
+ res_vsc = vec_vaddubm(vsc, vbc);
+// CHECK: add <16 x i8>
+// CHECK-LE: add <16 x i8>
+
+ res_vuc = vec_vaddubm(vuc, vuc);
+// CHECK: add <16 x i8>
+// CHECK-LE: add <16 x i8>
+
+ res_vuc = vec_vaddubm(vbc, vuc);
+// CHECK: add <16 x i8>
+// CHECK-LE: add <16 x i8>
+
+ res_vuc = vec_vaddubm(vuc, vbc);
+// CHECK: add <16 x i8>
+// CHECK-LE: add <16 x i8>
+
+ res_vs = vec_vadduhm(vs, vs);
+// CHECK: add <8 x i16>
+// CHECK-LE: add <8 x i16>
+
+ res_vs = vec_vadduhm(vbs, vs);
+// CHECK: add <8 x i16>
+// CHECK-LE: add <8 x i16>
+
+ res_vs = vec_vadduhm(vs, vbs);
+// CHECK: add <8 x i16>
+// CHECK-LE: add <8 x i16>
+
+ res_vus = vec_vadduhm(vus, vus);
+// CHECK: add <8 x i16>
+// CHECK-LE: add <8 x i16>
+
+ res_vus = vec_vadduhm(vbs, vus);
+// CHECK: add <8 x i16>
+// CHECK-LE: add <8 x i16>
+
+ res_vus = vec_vadduhm(vus, vbs);
+// CHECK: add <8 x i16>
+// CHECK-LE: add <8 x i16>
+
+ res_vi = vec_vadduwm(vi, vi);
+// CHECK: add <4 x i32>
+// CHECK-LE: add <4 x i32>
+
+ res_vi = vec_vadduwm(vbi, vi);
+// CHECK: add <4 x i32>
+// CHECK-LE: add <4 x i32>
+
+ res_vi = vec_vadduwm(vi, vbi);
+// CHECK: add <4 x i32>
+// CHECK-LE: add <4 x i32>
+
+ res_vui = vec_vadduwm(vui, vui);
+// CHECK: add <4 x i32>
+// CHECK-LE: add <4 x i32>
+
+ res_vui = vec_vadduwm(vbi, vui);
+// CHECK: add <4 x i32>
+// CHECK-LE: add <4 x i32>
+
+ res_vui = vec_vadduwm(vui, vbi);
+// CHECK: add <4 x i32>
+// CHECK-LE: add <4 x i32>
+
+ res_vf = vec_vaddfp(vf, vf);
+// CHECK: fadd <4 x float>
+// CHECK-LE: fadd <4 x float>
/* vec_addc */
- res_vui = vec_addc(vui, vui); // HECK: @llvm.ppc.altivec.vaddcuw
- res_vui = vec_vaddcuw(vui, vui); // HECK: @llvm.ppc.altivec.vaddcuw
+ res_vui = vec_addc(vui, vui);
+// CHECK: @llvm.ppc.altivec.vaddcuw
+// CHECK-LE: @llvm.ppc.altivec.vaddcuw
+
+ res_vui = vec_vaddcuw(vui, vui);
+// CHECK: @llvm.ppc.altivec.vaddcuw
+// CHECK-LE: @llvm.ppc.altivec.vaddcuw
/* vec_adds */
- res_vsc = vec_adds(vsc, vsc); // CHECK: @llvm.ppc.altivec.vaddsbs
- res_vsc = vec_adds(vbc, vsc); // CHECK: @llvm.ppc.altivec.vaddsbs
- res_vsc = vec_adds(vsc, vbc); // CHECK: @llvm.ppc.altivec.vaddsbs
- res_vuc = vec_adds(vuc, vuc); // CHECK: @llvm.ppc.altivec.vaddubs
- res_vuc = vec_adds(vbc, vuc); // CHECK: @llvm.ppc.altivec.vaddubs
- res_vuc = vec_adds(vuc, vbc); // CHECK: @llvm.ppc.altivec.vaddubs
- res_vs = vec_adds(vs, vs); // CHECK: @llvm.ppc.altivec.vaddshs
- res_vs = vec_adds(vbs, vs); // CHECK: @llvm.ppc.altivec.vaddshs
- res_vs = vec_adds(vs, vbs); // CHECK: @llvm.ppc.altivec.vaddshs
- res_vus = vec_adds(vus, vus); // CHECK: @llvm.ppc.altivec.vadduhs
- res_vus = vec_adds(vbs, vus); // CHECK: @llvm.ppc.altivec.vadduhs
- res_vus = vec_adds(vus, vbs); // CHECK: @llvm.ppc.altivec.vadduhs
- res_vi = vec_adds(vi, vi); // CHECK: @llvm.ppc.altivec.vaddsws
- res_vi = vec_adds(vbi, vi); // CHECK: @llvm.ppc.altivec.vaddsws
- res_vi = vec_adds(vi, vbi); // CHECK: @llvm.ppc.altivec.vaddsws
- res_vui = vec_adds(vui, vui); // CHECK: @llvm.ppc.altivec.vadduws
- res_vui = vec_adds(vbi, vui); // CHECK: @llvm.ppc.altivec.vadduws
- res_vui = vec_adds(vui, vbi); // CHECK: @llvm.ppc.altivec.vadduws
- res_vsc = vec_vaddsbs(vsc, vsc); // CHECK: @llvm.ppc.altivec.vaddsbs
- res_vsc = vec_vaddsbs(vbc, vsc); // CHECK: @llvm.ppc.altivec.vaddsbs
- res_vsc = vec_vaddsbs(vsc, vbc); // CHECK: @llvm.ppc.altivec.vaddsbs
- res_vuc = vec_vaddubs(vuc, vuc); // CHECK: @llvm.ppc.altivec.vaddubs
- res_vuc = vec_vaddubs(vbc, vuc); // CHECK: @llvm.ppc.altivec.vaddubs
- res_vuc = vec_vaddubs(vuc, vbc); // CHECK: @llvm.ppc.altivec.vaddubs
- res_vs = vec_vaddshs(vs, vs); // CHECK: @llvm.ppc.altivec.vaddshs
- res_vs = vec_vaddshs(vbs, vs); // CHECK: @llvm.ppc.altivec.vaddshs
- res_vs = vec_vaddshs(vs, vbs); // CHECK: @llvm.ppc.altivec.vaddshs
- res_vus = vec_vadduhs(vus, vus); // CHECK: @llvm.ppc.altivec.vadduhs
- res_vus = vec_vadduhs(vbs, vus); // CHECK: @llvm.ppc.altivec.vadduhs
- res_vus = vec_vadduhs(vus, vbs); // CHECK: @llvm.ppc.altivec.vadduhs
- res_vi = vec_vaddsws(vi, vi); // CHECK: @llvm.ppc.altivec.vaddsws
- res_vi = vec_vaddsws(vbi, vi); // CHECK: @llvm.ppc.altivec.vaddsws
- res_vi = vec_vaddsws(vi, vbi); // CHECK: @llvm.ppc.altivec.vaddsws
- res_vui = vec_vadduws(vui, vui); // CHECK: @llvm.ppc.altivec.vadduws
- res_vui = vec_vadduws(vbi, vui); // CHECK: @llvm.ppc.altivec.vadduws
- res_vui = vec_vadduws(vui, vbi); // CHECK: @llvm.ppc.altivec.vadduws
+ res_vsc = vec_adds(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vaddsbs
+// CHECK-LE: @llvm.ppc.altivec.vaddsbs
- /* vec_and */
- res_vsc = vec_and(vsc, vsc); // CHECK: and <16 x i8>
- res_vsc = vec_and(vbc, vsc); // CHECK: and <16 x i8>
- res_vsc = vec_and(vsc, vbc); // CHECK: and <16 x i8>
- res_vuc = vec_and(vuc, vuc); // CHECK: and <16 x i8>
- res_vuc = vec_and(vbc, vuc); // CHECK: and <16 x i8>
- res_vuc = vec_and(vuc, vbc); // CHECK: and <16 x i8>
- res_vbc = vec_and(vbc, vbc); // CHECK: and <16 x i8>
- res_vs = vec_and(vs, vs); // CHECK: and <8 x i16>
- res_vs = vec_and(vbs, vs); // CHECK: and <8 x i16>
- res_vs = vec_and(vs, vbs); // CHECK: and <8 x i16>
- res_vus = vec_and(vus, vus); // CHECK: and <8 x i16>
- res_vus = vec_and(vbs, vus); // CHECK: and <8 x i16>
- res_vus = vec_and(vus, vbs); // CHECK: and <8 x i16>
- res_vbs = vec_and(vbs, vbs); // CHECK: and <8 x i16>
- res_vi = vec_and(vi, vi); // CHECK: and <4 x i32>
- res_vi = vec_and(vbi, vi); // CHECK: and <4 x i32>
- res_vi = vec_and(vi, vbi); // CHECK: and <4 x i32>
- res_vui = vec_and(vui, vui); // CHECK: and <4 x i32>
- res_vui = vec_and(vbi, vui); // CHECK: and <4 x i32>
- res_vui = vec_and(vui, vbi); // CHECK: and <4 x i32>
- res_vbi = vec_and(vbi, vbi); // CHECK: and <4 x i32>
- res_vsc = vec_vand(vsc, vsc); // CHECK: and <16 x i8>
- res_vsc = vec_vand(vbc, vsc); // CHECK: and <16 x i8>
- res_vsc = vec_vand(vsc, vbc); // CHECK: and <16 x i8>
- res_vuc = vec_vand(vuc, vuc); // CHECK: and <16 x i8>
- res_vuc = vec_vand(vbc, vuc); // CHECK: and <16 x i8>
- res_vuc = vec_vand(vuc, vbc); // CHECK: and <16 x i8>
- res_vbc = vec_vand(vbc, vbc); // CHECK: and <16 x i8>
- res_vs = vec_vand(vs, vs); // CHECK: and <8 x i16>
- res_vs = vec_vand(vbs, vs); // CHECK: and <8 x i16>
- res_vs = vec_vand(vs, vbs); // CHECK: and <8 x i16>
- res_vus = vec_vand(vus, vus); // CHECK: and <8 x i16>
- res_vus = vec_vand(vbs, vus); // CHECK: and <8 x i16>
- res_vus = vec_vand(vus, vbs); // CHECK: and <8 x i16>
- res_vbs = vec_vand(vbs, vbs); // CHECK: and <8 x i16>
- res_vi = vec_vand(vi, vi); // CHECK: and <4 x i32>
- res_vi = vec_vand(vbi, vi); // CHECK: and <4 x i32>
- res_vi = vec_vand(vi, vbi); // CHECK: and <4 x i32>
- res_vui = vec_vand(vui, vui); // CHECK: and <4 x i32>
- res_vui = vec_vand(vbi, vui); // CHECK: and <4 x i32>
- res_vui = vec_vand(vui, vbi); // CHECK: and <4 x i32>
- res_vbi = vec_vand(vbi, vbi); // CHECK: and <4 x i32>
+ res_vsc = vec_adds(vbc, vsc);
+// CHECK: @llvm.ppc.altivec.vaddsbs
+// CHECK-LE: @llvm.ppc.altivec.vaddsbs
- /* vec_andc */
- res_vsc = vec_andc(vsc, vsc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
+ res_vsc = vec_adds(vsc, vbc);
+// CHECK: @llvm.ppc.altivec.vaddsbs
+// CHECK-LE: @llvm.ppc.altivec.vaddsbs
- res_vsc = vec_andc(vbc, vsc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
+ res_vuc = vec_adds(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vaddubs
+// CHECK-LE: @llvm.ppc.altivec.vaddubs
- res_vsc = vec_andc(vsc, vbc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
+ res_vuc = vec_adds(vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vaddubs
+// CHECK-LE: @llvm.ppc.altivec.vaddubs
- res_vuc = vec_andc(vuc, vuc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
+ res_vuc = vec_adds(vuc, vbc);
+// CHECK: @llvm.ppc.altivec.vaddubs
+// CHECK-LE: @llvm.ppc.altivec.vaddubs
- res_vuc = vec_andc(vbc, vuc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
+ res_vs = vec_adds(vs, vs);
+// CHECK: @llvm.ppc.altivec.vaddshs
+// CHECK-LE: @llvm.ppc.altivec.vaddshs
- res_vuc = vec_andc(vuc, vbc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
+ res_vs = vec_adds(vbs, vs);
+// CHECK: @llvm.ppc.altivec.vaddshs
+// CHECK-LE: @llvm.ppc.altivec.vaddshs
- res_vbc = vec_andc(vbc, vbc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
+ res_vs = vec_adds(vs, vbs);
+// CHECK: @llvm.ppc.altivec.vaddshs
+// CHECK-LE: @llvm.ppc.altivec.vaddshs
- res_vs = vec_andc(vs, vs); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
+ res_vus = vec_adds(vus, vus);
+// CHECK: @llvm.ppc.altivec.vadduhs
+// CHECK-LE: @llvm.ppc.altivec.vadduhs
- res_vs = vec_andc(vbs, vs); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
+ res_vus = vec_adds(vbs, vus);
+// CHECK: @llvm.ppc.altivec.vadduhs
+// CHECK-LE: @llvm.ppc.altivec.vadduhs
- res_vs = vec_andc(vs, vbs); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
+ res_vus = vec_adds(vus, vbs);
+// CHECK: @llvm.ppc.altivec.vadduhs
+// CHECK-LE: @llvm.ppc.altivec.vadduhs
- res_vus = vec_andc(vus, vus); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
+ res_vi = vec_adds(vi, vi);
+// CHECK: @llvm.ppc.altivec.vaddsws
+// CHECK-LE: @llvm.ppc.altivec.vaddsws
- res_vus = vec_andc(vbs, vus); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
+ res_vi = vec_adds(vbi, vi);
+// CHECK: @llvm.ppc.altivec.vaddsws
+// CHECK-LE: @llvm.ppc.altivec.vaddsws
- res_vus = vec_andc(vus, vbs); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
+ res_vi = vec_adds(vi, vbi);
+// CHECK: @llvm.ppc.altivec.vaddsws
+// CHECK-LE: @llvm.ppc.altivec.vaddsws
- res_vbs = vec_andc(vbs, vbs); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
+ res_vui = vec_adds(vui, vui);
+// CHECK: @llvm.ppc.altivec.vadduws
+// CHECK-LE: @llvm.ppc.altivec.vadduws
- res_vi = vec_andc(vi, vi); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
+ res_vui = vec_adds(vbi, vui);
+// CHECK: @llvm.ppc.altivec.vadduws
+// CHECK-LE: @llvm.ppc.altivec.vadduws
- res_vi = vec_andc(vbi, vi); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
+ res_vui = vec_adds(vui, vbi);
+// CHECK: @llvm.ppc.altivec.vadduws
+// CHECK-LE: @llvm.ppc.altivec.vadduws
- res_vi = vec_andc(vi, vbi); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
+ res_vsc = vec_vaddsbs(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vaddsbs
+// CHECK-LE: @llvm.ppc.altivec.vaddsbs
- res_vui = vec_andc(vui, vui); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
+ res_vsc = vec_vaddsbs(vbc, vsc);
+// CHECK: @llvm.ppc.altivec.vaddsbs
+// CHECK-LE: @llvm.ppc.altivec.vaddsbs
- res_vui = vec_andc(vbi, vui); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
+ res_vsc = vec_vaddsbs(vsc, vbc);
+// CHECK: @llvm.ppc.altivec.vaddsbs
+// CHECK-LE: @llvm.ppc.altivec.vaddsbs
- res_vui = vec_andc(vui, vbi); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
+ res_vuc = vec_vaddubs(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vaddubs
+// CHECK-LE: @llvm.ppc.altivec.vaddubs
- res_vf = vec_andc(vf, vf); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
+ res_vuc = vec_vaddubs(vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vaddubs
+// CHECK-LE: @llvm.ppc.altivec.vaddubs
- res_vf = vec_andc(vbi, vf); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
+ res_vuc = vec_vaddubs(vuc, vbc);
+// CHECK: @llvm.ppc.altivec.vaddubs
+// CHECK-LE: @llvm.ppc.altivec.vaddubs
- res_vf = vec_andc(vf, vbi); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
+ res_vs = vec_vaddshs(vs, vs);
+// CHECK: @llvm.ppc.altivec.vaddshs
+// CHECK-LE: @llvm.ppc.altivec.vaddshs
- res_vsc = vec_vandc(vsc, vsc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
+ res_vs = vec_vaddshs(vbs, vs);
+// CHECK: @llvm.ppc.altivec.vaddshs
+// CHECK-LE: @llvm.ppc.altivec.vaddshs
- res_vsc = vec_vandc(vbc, vsc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
+ res_vs = vec_vaddshs(vs, vbs);
+// CHECK: @llvm.ppc.altivec.vaddshs
+// CHECK-LE: @llvm.ppc.altivec.vaddshs
- res_vsc = vec_vandc(vsc, vbc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
+ res_vus = vec_vadduhs(vus, vus);
+// CHECK: @llvm.ppc.altivec.vadduhs
+// CHECK-LE: @llvm.ppc.altivec.vadduhs
- res_vuc = vec_vandc(vuc, vuc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
+ res_vus = vec_vadduhs(vbs, vus);
+// CHECK: @llvm.ppc.altivec.vadduhs
+// CHECK-LE: @llvm.ppc.altivec.vadduhs
- res_vuc = vec_vandc(vbc, vuc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
+ res_vus = vec_vadduhs(vus, vbs);
+// CHECK: @llvm.ppc.altivec.vadduhs
+// CHECK-LE: @llvm.ppc.altivec.vadduhs
- res_vuc = vec_vandc(vuc, vbc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
+ res_vi = vec_vaddsws(vi, vi);
+// CHECK: @llvm.ppc.altivec.vaddsws
+// CHECK-LE: @llvm.ppc.altivec.vaddsws
- res_vbc = vec_vandc(vbc, vbc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
+ res_vi = vec_vaddsws(vbi, vi);
+// CHECK: @llvm.ppc.altivec.vaddsws
+// CHECK-LE: @llvm.ppc.altivec.vaddsws
- res_vs = vec_vandc(vs, vs); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
+ res_vi = vec_vaddsws(vi, vbi);
+// CHECK: @llvm.ppc.altivec.vaddsws
+// CHECK-LE: @llvm.ppc.altivec.vaddsws
- res_vs = vec_vandc(vbs, vs); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
+ res_vui = vec_vadduws(vui, vui);
+// CHECK: @llvm.ppc.altivec.vadduws
+// CHECK-LE: @llvm.ppc.altivec.vadduws
- res_vs = vec_vandc(vs, vbs); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
+ res_vui = vec_vadduws(vbi, vui);
+// CHECK: @llvm.ppc.altivec.vadduws
+// CHECK-LE: @llvm.ppc.altivec.vadduws
- res_vus = vec_vandc(vus, vus); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
+ res_vui = vec_vadduws(vui, vbi);
+// CHECK: @llvm.ppc.altivec.vadduws
+// CHECK-LE: @llvm.ppc.altivec.vadduws
+
+ /* vec_and */
+ res_vsc = vec_and(vsc, vsc);
+// CHECK: and <16 x i8>
+// CHECK-LE: and <16 x i8>
- res_vus = vec_vandc(vbs, vus); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
+ res_vsc = vec_and(vbc, vsc);
+// CHECK: and <16 x i8>
+// CHECK-LE: and <16 x i8>
- res_vus = vec_vandc(vus, vbs); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
+ res_vsc = vec_and(vsc, vbc);
+// CHECK: and <16 x i8>
+// CHECK-LE: and <16 x i8>
- res_vbs = vec_vandc(vbs, vbs); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
+ res_vuc = vec_and(vuc, vuc);
+// CHECK: and <16 x i8>
+// CHECK-LE: and <16 x i8>
- res_vi = vec_vandc(vi, vi); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
+ res_vuc = vec_and(vbc, vuc);
+// CHECK: and <16 x i8>
+// CHECK-LE: and <16 x i8>
- res_vi = vec_vandc(vbi, vi); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
+ res_vuc = vec_and(vuc, vbc);
+// CHECK: and <16 x i8>
+// CHECK-LE: and <16 x i8>
- res_vi = vec_vandc(vi, vbi); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
+ res_vbc = vec_and(vbc, vbc);
+// CHECK: and <16 x i8>
+// CHECK-LE: and <16 x i8>
- res_vui = vec_vandc(vui, vui); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
+ res_vs = vec_and(vs, vs);
+// CHECK: and <8 x i16>
+// CHECK-LE: and <8 x i16>
- res_vui = vec_vandc(vbi, vui); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
+ res_vs = vec_and(vbs, vs);
+// CHECK: and <8 x i16>
+// CHECK-LE: and <8 x i16>
- res_vui = vec_vandc(vui, vbi); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
+ res_vs = vec_and(vs, vbs);
+// CHECK: and <8 x i16>
+// CHECK-LE: and <8 x i16>
- res_vf = vec_vandc(vf, vf); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
+ res_vus = vec_and(vus, vus);
+// CHECK: and <8 x i16>
+// CHECK-LE: and <8 x i16>
- res_vf = vec_vandc(vbi, vf); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
+ res_vus = vec_and(vbs, vus);
+// CHECK: and <8 x i16>
+// CHECK-LE: and <8 x i16>
- res_vf = vec_vandc(vf, vbi); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
+ res_vus = vec_and(vus, vbs);
+// CHECK: and <8 x i16>
+// CHECK-LE: and <8 x i16>
+
+ res_vbs = vec_and(vbs, vbs);
+// CHECK: and <8 x i16>
+// CHECK-LE: and <8 x i16>
+
+ res_vi = vec_and(vi, vi);
+// CHECK: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vi = vec_and(vbi, vi);
+// CHECK: and <4 x i32>
+// CHECK-le: and <4 x i32>
+
+ res_vi = vec_and(vi, vbi);
+// CHECK: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vui = vec_and(vui, vui);
+// CHECK: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vui = vec_and(vbi, vui);
+// CHECK: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vui = vec_and(vui, vbi);
+// CHECK: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vbi = vec_and(vbi, vbi);
+// CHECK: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vsc = vec_vand(vsc, vsc);
+// CHECK: and <16 x i8>
+// CHECK-LE: and <16 x i8>
+
+ res_vsc = vec_vand(vbc, vsc);
+// CHECK: and <16 x i8>
+// CHECK-LE: and <16 x i8>
+
+ res_vsc = vec_vand(vsc, vbc);
+// CHECK: and <16 x i8>
+// CHECK-LE: and <16 x i8>
+
+ res_vuc = vec_vand(vuc, vuc);
+// CHECK: and <16 x i8>
+// CHECK-LE: and <16 x i8>
+
+ res_vuc = vec_vand(vbc, vuc);
+// CHECK: and <16 x i8>
+// CHECK-LE: and <16 x i8>
+
+ res_vuc = vec_vand(vuc, vbc);
+// CHECK: and <16 x i8>
+// CHECK-LE: and <16 x i8>
+
+ res_vbc = vec_vand(vbc, vbc);
+// CHECK: and <16 x i8>
+// CHECK-LE: and <16 x i8>
+
+ res_vs = vec_vand(vs, vs);
+// CHECK: and <8 x i16>
+// CHECK-LE: and <8 x i16>
+
+ res_vs = vec_vand(vbs, vs);
+// CHECK: and <8 x i16>
+// CHECK-LE: and <8 x i16>
+
+ res_vs = vec_vand(vs, vbs);
+// CHECK: and <8 x i16>
+// CHECK-LE: and <8 x i16>
+
+ res_vus = vec_vand(vus, vus);
+// CHECK: and <8 x i16>
+// CHECK-LE: and <8 x i16>
+
+ res_vus = vec_vand(vbs, vus);
+// CHECK: and <8 x i16>
+// CHECK-LE: and <8 x i16>
+
+ res_vus = vec_vand(vus, vbs);
+// CHECK: and <8 x i16>
+// CHECK-LE: and <8 x i16>
+
+ res_vbs = vec_vand(vbs, vbs);
+// CHECK: and <8 x i16>
+// CHECK-LE: and <8 x i16>
+
+ res_vi = vec_vand(vi, vi);
+// CHECK: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vi = vec_vand(vbi, vi);
+// CHECK: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vi = vec_vand(vi, vbi);
+// CHECK: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vui = vec_vand(vui, vui);
+// CHECK: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vui = vec_vand(vbi, vui);
+// CHECK: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vui = vec_vand(vui, vbi);
+// CHECK: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vbi = vec_vand(vbi, vbi);
+// CHECK: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ /* vec_andc */
+ res_vsc = vec_andc(vsc, vsc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+
+ res_vsc = vec_andc(vbc, vsc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+
+ res_vsc = vec_andc(vsc, vbc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+
+ res_vuc = vec_andc(vuc, vuc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+
+ res_vuc = vec_andc(vbc, vuc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+
+ res_vuc = vec_andc(vuc, vbc);
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+
+ res_vbc = vec_andc(vbc, vbc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+
+ res_vs = vec_andc(vs, vs);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+
+ res_vs = vec_andc(vbs, vs);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+
+ res_vs = vec_andc(vs, vbs);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+
+ res_vus = vec_andc(vus, vus);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+
+ res_vus = vec_andc(vbs, vus);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+
+ res_vus = vec_andc(vus, vbs);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+
+ res_vbs = vec_andc(vbs, vbs);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+
+ res_vi = vec_andc(vi, vi);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vi = vec_andc(vbi, vi);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vi = vec_andc(vi, vbi);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vui = vec_andc(vui, vui);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vui = vec_andc(vbi, vui);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vui = vec_andc(vui, vbi);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vf = vec_andc(vf, vf);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vf = vec_andc(vbi, vf);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vf = vec_andc(vf, vbi);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vsc = vec_vandc(vsc, vsc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+
+ res_vsc = vec_vandc(vbc, vsc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+
+ res_vsc = vec_vandc(vsc, vbc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+
+ res_vuc = vec_vandc(vuc, vuc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+
+ res_vuc = vec_vandc(vbc, vuc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+
+ res_vuc = vec_vandc(vuc, vbc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+
+ res_vbc = vec_vandc(vbc, vbc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+
+ res_vs = vec_vandc(vs, vs);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+
+ res_vs = vec_vandc(vbs, vs);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+
+ res_vs = vec_vandc(vs, vbs);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+
+ res_vus = vec_vandc(vus, vus);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+
+ res_vus = vec_vandc(vbs, vus);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+
+ res_vus = vec_vandc(vus, vbs);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+
+ res_vbs = vec_vandc(vbs, vbs);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+
+ res_vi = vec_vandc(vi, vi);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vi = vec_vandc(vbi, vi);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vi = vec_vandc(vi, vbi);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vui = vec_vandc(vui, vui);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vui = vec_vandc(vbi, vui);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vui = vec_vandc(vui, vbi);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vf = vec_vandc(vf, vf);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vf = vec_vandc(vbi, vf);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+
+ res_vf = vec_vandc(vf, vbi);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
}
// CHECK-LABEL: define void @test2
void test2() {
/* vec_avg */
- res_vsc = vec_avg(vsc, vsc); // CHECK: @llvm.ppc.altivec.vavgsb
- res_vuc = vec_avg(vuc, vuc); // CHECK: @llvm.ppc.altivec.vavgub
- res_vs = vec_avg(vs, vs); // CHECK: @llvm.ppc.altivec.vavgsh
- res_vus = vec_avg(vus, vus); // CHECK: @llvm.ppc.altivec.vavguh
- res_vi = vec_avg(vi, vi); // CHECK: @llvm.ppc.altivec.vavgsw
- res_vui = vec_avg(vui, vui); // CHECK: @llvm.ppc.altivec.vavguw
- res_vsc = vec_vavgsb(vsc, vsc); // CHECK: @llvm.ppc.altivec.vavgsb
- res_vuc = vec_vavgub(vuc, vuc); // CHECK: @llvm.ppc.altivec.vavgub
- res_vs = vec_vavgsh(vs, vs); // CHECK: @llvm.ppc.altivec.vavgsh
- res_vus = vec_vavguh(vus, vus); // CHECK: @llvm.ppc.altivec.vavguh
- res_vi = vec_vavgsw(vi, vi); // CHECK: @llvm.ppc.altivec.vavgsw
- res_vui = vec_vavguw(vui, vui); // CHECK: @llvm.ppc.altivec.vavguw
+ res_vsc = vec_avg(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vavgsb
+// CHECK-LE: @llvm.ppc.altivec.vavgsb
+
+ res_vuc = vec_avg(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vavgub
+// CHECK-LE: @llvm.ppc.altivec.vavgub
+
+ res_vs = vec_avg(vs, vs);
+// CHECK: @llvm.ppc.altivec.vavgsh
+// CHECK-LE: @llvm.ppc.altivec.vavgsh
+
+ res_vus = vec_avg(vus, vus);
+// CHECK: @llvm.ppc.altivec.vavguh
+// CHECK-LE: @llvm.ppc.altivec.vavguh
+
+ res_vi = vec_avg(vi, vi);
+// CHECK: @llvm.ppc.altivec.vavgsw
+// CHECK-LE: @llvm.ppc.altivec.vavgsw
+
+ res_vui = vec_avg(vui, vui);
+// CHECK: @llvm.ppc.altivec.vavguw
+// CHECK-LE: @llvm.ppc.altivec.vavguw
+
+ res_vsc = vec_vavgsb(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vavgsb
+// CHECK-LE: @llvm.ppc.altivec.vavgsb
+
+ res_vuc = vec_vavgub(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vavgub
+// CHECK-LE: @llvm.ppc.altivec.vavgub
+
+ res_vs = vec_vavgsh(vs, vs);
+// CHECK: @llvm.ppc.altivec.vavgsh
+// CHECK-LE: @llvm.ppc.altivec.vavgsh
+
+ res_vus = vec_vavguh(vus, vus);
+// CHECK: @llvm.ppc.altivec.vavguh
+// CHECK-LE: @llvm.ppc.altivec.vavguh
+
+ res_vi = vec_vavgsw(vi, vi);
+// CHECK: @llvm.ppc.altivec.vavgsw
+// CHECK-LE: @llvm.ppc.altivec.vavgsw
+
+ res_vui = vec_vavguw(vui, vui);
+// CHECK: @llvm.ppc.altivec.vavguw
+// CHECK-LE: @llvm.ppc.altivec.vavguw
/* vec_ceil */
- res_vf = vec_ceil(vf); // CHECK: @llvm.ppc.altivec.vrfip
- res_vf = vec_vrfip(vf); // CHECK: @llvm.ppc.altivec.vrfip
+ res_vf = vec_ceil(vf);
+// CHECK: @llvm.ppc.altivec.vrfip
+// CHECK-LE: @llvm.ppc.altivec.vrfip
+
+ res_vf = vec_vrfip(vf);
+// CHECK: @llvm.ppc.altivec.vrfip
+// CHECK-LE: @llvm.ppc.altivec.vrfip
/* vec_cmpb */
- res_vi = vec_cmpb(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpbfp
- res_vi = vec_vcmpbfp(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpbfp
+ res_vi = vec_cmpb(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpbfp
+// CHECK-LE: @llvm.ppc.altivec.vcmpbfp
+
+ res_vi = vec_vcmpbfp(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpbfp
+// CHECK-LE: @llvm.ppc.altivec.vcmpbfp
/* vec_cmpeq */
- res_vbc = vec_cmpeq(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpequb
- res_vbc = vec_cmpeq(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpequb
- res_vbs = vec_cmpeq(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpequh
- res_vbs = vec_cmpeq(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpequh
- res_vbi = vec_cmpeq(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpequw
- res_vbi = vec_cmpeq(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpequw
- res_vbi = vec_cmpeq(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpeqfp
+ res_vbc = vec_cmpeq(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpequb
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb
+
+ res_vbc = vec_cmpeq(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpequb
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb
+
+ res_vbs = vec_cmpeq(vs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpequh
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh
+
+ res_vbs = vec_cmpeq(vus, vus);
+// CHECK: @llvm.ppc.altivec.vcmpequh
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh
+
+ res_vbi = vec_cmpeq(vi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpequw
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw
+
+ res_vbi = vec_cmpeq(vui, vui);
+// CHECK: @llvm.ppc.altivec.vcmpequw
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw
+
+ res_vbi = vec_cmpeq(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpeqfp
+// CHECK-LE: @llvm.ppc.altivec.vcmpeqfp
/* vec_cmpge */
- res_vbi = vec_cmpge(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp
- res_vbi = vec_vcmpgefp(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp
+ res_vbi = vec_cmpge(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpgefp
+// CHECK-LE: @llvm.ppc.altivec.vcmpgefp
+
+ res_vbi = vec_vcmpgefp(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpgefp
+// CHECK-LE: @llvm.ppc.altivec.vcmpgefp
}
// CHECK-LABEL: define void @test5
void test5() {
-
+
/* vec_cmpgt */
- res_vbc = vec_cmpgt(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtsb
- res_vbc = vec_cmpgt(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub
- res_vbs = vec_cmpgt(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtsh
- res_vbs = vec_cmpgt(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh
- res_vbi = vec_cmpgt(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtsw
- res_vbi = vec_cmpgt(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw
- res_vbi = vec_cmpgt(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgtfp
- res_vbc = vec_vcmpgtsb(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtsb
- res_vbc = vec_vcmpgtub(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub
- res_vbs = vec_vcmpgtsh(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtsh
- res_vbs = vec_vcmpgtuh(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh
- res_vbi = vec_vcmpgtsw(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtsw
- res_vbi = vec_vcmpgtuw(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw
- res_vbi = vec_vcmpgtfp(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgtfp
+ res_vbc = vec_cmpgt(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpgtsb
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb
+
+ res_vbc = vec_cmpgt(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub
+
+ res_vbs = vec_cmpgt(vs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpgtsh
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh
+
+ res_vbs = vec_cmpgt(vus, vus);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh
+
+ res_vbi = vec_cmpgt(vi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpgtsw
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw
+
+ res_vbi = vec_cmpgt(vui, vui);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw
+
+ res_vbi = vec_cmpgt(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpgtfp
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtfp
+
+ res_vbc = vec_vcmpgtsb(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpgtsb
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb
+
+ res_vbc = vec_vcmpgtub(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub
+
+ res_vbs = vec_vcmpgtsh(vs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpgtsh
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh
+
+ res_vbs = vec_vcmpgtuh(vus, vus);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh
+
+ res_vbi = vec_vcmpgtsw(vi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpgtsw
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw
+
+ res_vbi = vec_vcmpgtuw(vui, vui);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw
+
+ res_vbi = vec_vcmpgtfp(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpgtfp
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtfp
/* vec_cmple */
- res_vbi = vec_cmple(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp
+ res_vbi = vec_cmple(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpgefp
+// CHECK-LE: @llvm.ppc.altivec.vcmpgefp
}
// CHECK-LABEL: define void @test6
void test6() {
/* vec_cmplt */
- res_vbc = vec_cmplt(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtsb
- res_vbc = vec_cmplt(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub
- res_vbs = vec_cmplt(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtsh
- res_vbs = vec_cmplt(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh
- res_vbi = vec_cmplt(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtsw
- res_vbi = vec_cmplt(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw
- res_vbi = vec_cmplt(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgtfp
+ res_vbc = vec_cmplt(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpgtsb
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb
+
+ res_vbc = vec_cmplt(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub
+
+ res_vbs = vec_cmplt(vs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpgtsh
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh
+
+ res_vbs = vec_cmplt(vus, vus);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh
+
+ res_vbi = vec_cmplt(vi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpgtsw
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw
+
+ res_vbi = vec_cmplt(vui, vui);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw
+
+ res_vbi = vec_cmplt(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpgtfp
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtfp
/* vec_ctf */
- res_vf = vec_ctf(vi, param_i); // CHECK: @llvm.ppc.altivec.vcfsx
- res_vf = vec_ctf(vui, 0); // CHECK: @llvm.ppc.altivec.vcfux
- res_vf = vec_vcfsx(vi, 0); // CHECK: @llvm.ppc.altivec.vcfsx
- res_vf = vec_vcfux(vui, 0); // CHECK: @llvm.ppc.altivec.vcfux
+ res_vf = vec_ctf(vi, param_i);
+// CHECK: @llvm.ppc.altivec.vcfsx
+// CHECK-LE: @llvm.ppc.altivec.vcfsx
+
+ res_vf = vec_ctf(vui, 0);
+// CHECK: @llvm.ppc.altivec.vcfux
+// CHECK-LE: @llvm.ppc.altivec.vcfux
+
+ res_vf = vec_vcfsx(vi, 0);
+// CHECK: @llvm.ppc.altivec.vcfsx
+// CHECK-LE: @llvm.ppc.altivec.vcfsx
+
+ res_vf = vec_vcfux(vui, 0);
+// CHECK: @llvm.ppc.altivec.vcfux
+// CHECK-LE: @llvm.ppc.altivec.vcfux
/* vec_cts */
- res_vi = vec_cts(vf, 0); // CHECK: @llvm.ppc.altivec.vctsxs
- res_vi = vec_vctsxs(vf, 0); // CHECK: @llvm.ppc.altivec.vctsxs
+ res_vi = vec_cts(vf, 0);
+// CHECK: @llvm.ppc.altivec.vctsxs
+// CHECK-LE: @llvm.ppc.altivec.vctsxs
+
+ res_vi = vec_vctsxs(vf, 0);
+// CHECK: @llvm.ppc.altivec.vctsxs
+// CHECK-LE: @llvm.ppc.altivec.vctsxs
/* vec_ctu */
- res_vui = vec_ctu(vf, 0); // CHECK: @llvm.ppc.altivec.vctuxs
- res_vui = vec_vctuxs(vf, 0); // CHECK: @llvm.ppc.altivec.vctuxs
+ res_vui = vec_ctu(vf, 0);
+// CHECK: @llvm.ppc.altivec.vctuxs
+// CHECK-LE: @llvm.ppc.altivec.vctuxs
+
+ res_vui = vec_vctuxs(vf, 0);
+// CHECK: @llvm.ppc.altivec.vctuxs
+// CHECK-LE: @llvm.ppc.altivec.vctuxs
/* vec_dss */
- vec_dss(param_i); // CHECK: @llvm.ppc.altivec.dss
+ vec_dss(param_i);
+// CHECK: @llvm.ppc.altivec.dss
+// CHECK-LE: @llvm.ppc.altivec.dss
/* vec_dssall */
- vec_dssall(); // CHECK: @llvm.ppc.altivec.dssall
+ vec_dssall();
+// CHECK: @llvm.ppc.altivec.dssall
+// CHECK-LE: @llvm.ppc.altivec.dssall
/* vec_dst */
- vec_dst(&vsc, 0, 0); // CHECK: @llvm.ppc.altivec.dst
+ vec_dst(&vsc, 0, 0);
+// CHECK: @llvm.ppc.altivec.dst
+// CHECK-LE: @llvm.ppc.altivec.dst
/* vec_dstst */
- vec_dstst(&vs, 0, 0); // CHECK: @llvm.ppc.altivec.dstst
+ vec_dstst(&vs, 0, 0);
+// CHECK: @llvm.ppc.altivec.dstst
+// CHECK-LE: @llvm.ppc.altivec.dstst
/* vec_dststt */
- vec_dststt(&param_i, 0, 0); // CHECK: @llvm.ppc.altivec.dststt
+ vec_dststt(&param_i, 0, 0);
+// CHECK: @llvm.ppc.altivec.dststt
+// CHECK-LE: @llvm.ppc.altivec.dststt
/* vec_dstt */
- vec_dstt(&vf, 0, 0); // CHECK: @llvm.ppc.altivec.dstt
+ vec_dstt(&vf, 0, 0);
+// CHECK: @llvm.ppc.altivec.dstt
+// CHECK-LE: @llvm.ppc.altivec.dstt
/* vec_expte */
- res_vf = vec_expte(vf); // CHECK: @llvm.ppc.altivec.vexptefp
- res_vf = vec_vexptefp(vf); // CHECK: @llvm.ppc.altivec.vexptefp
+ res_vf = vec_expte(vf);
+// CHECK: @llvm.ppc.altivec.vexptefp
+// CHECK-LE: @llvm.ppc.altivec.vexptefp
+
+ res_vf = vec_vexptefp(vf);
+// CHECK: @llvm.ppc.altivec.vexptefp
+// CHECK-LE: @llvm.ppc.altivec.vexptefp
/* vec_floor */
- res_vf = vec_floor(vf); // CHECK: @llvm.ppc.altivec.vrfim
- res_vf = vec_vrfim(vf); // CHECK: @llvm.ppc.altivec.vrfim
+ res_vf = vec_floor(vf);
+// CHECK: @llvm.ppc.altivec.vrfim
+// CHECK-LE: @llvm.ppc.altivec.vrfim
+
+ res_vf = vec_vrfim(vf);
+// CHECK: @llvm.ppc.altivec.vrfim
+// CHECK-LE: @llvm.ppc.altivec.vrfim
/* vec_ld */
- res_vsc = vec_ld(0, &vsc); // CHECK: @llvm.ppc.altivec.lvx
- res_vsc = vec_ld(0, &param_sc); // CHECK: @llvm.ppc.altivec.lvx
- res_vuc = vec_ld(0, &vuc); // CHECK: @llvm.ppc.altivec.lvx
- res_vuc = vec_ld(0, &param_uc); // CHECK: @llvm.ppc.altivec.lvx
- res_vbc = vec_ld(0, &vbc); // CHECK: @llvm.ppc.altivec.lvx
- res_vs = vec_ld(0, &vs); // CHECK: @llvm.ppc.altivec.lvx
- res_vs = vec_ld(0, &param_s); // CHECK: @llvm.ppc.altivec.lvx
- res_vus = vec_ld(0, &vus); // CHECK: @llvm.ppc.altivec.lvx
- res_vus = vec_ld(0, &param_us); // CHECK: @llvm.ppc.altivec.lvx
- res_vbs = vec_ld(0, &vbs); // CHECK: @llvm.ppc.altivec.lvx
- res_vp = vec_ld(0, &vp); // CHECK: @llvm.ppc.altivec.lvx
- res_vi = vec_ld(0, &vi); // CHECK: @llvm.ppc.altivec.lvx
- res_vi = vec_ld(0, &param_i); // CHECK: @llvm.ppc.altivec.lvx
- res_vui = vec_ld(0, &vui); // CHECK: @llvm.ppc.altivec.lvx
- res_vui = vec_ld(0, &param_ui); // CHECK: @llvm.ppc.altivec.lvx
- res_vbi = vec_ld(0, &vbi); // CHECK: @llvm.ppc.altivec.lvx
- res_vf = vec_ld(0, &vf); // CHECK: @llvm.ppc.altivec.lvx
- res_vf = vec_ld(0, &param_f); // CHECK: @llvm.ppc.altivec.lvx
- res_vsc = vec_lvx(0, &vsc); // CHECK: @llvm.ppc.altivec.lvx
- res_vsc = vec_lvx(0, &param_sc); // CHECK: @llvm.ppc.altivec.lvx
- res_vuc = vec_lvx(0, &vuc); // CHECK: @llvm.ppc.altivec.lvx
- res_vuc = vec_lvx(0, &param_uc); // CHECK: @llvm.ppc.altivec.lvx
- res_vbc = vec_lvx(0, &vbc); // CHECK: @llvm.ppc.altivec.lvx
- res_vs = vec_lvx(0, &vs); // CHECK: @llvm.ppc.altivec.lvx
- res_vs = vec_lvx(0, &param_s); // CHECK: @llvm.ppc.altivec.lvx
- res_vus = vec_lvx(0, &vus); // CHECK: @llvm.ppc.altivec.lvx
- res_vus = vec_lvx(0, &param_us); // CHECK: @llvm.ppc.altivec.lvx
- res_vbs = vec_lvx(0, &vbs); // CHECK: @llvm.ppc.altivec.lvx
- res_vp = vec_lvx(0, &vp); // CHECK: @llvm.ppc.altivec.lvx
- res_vi = vec_lvx(0, &vi); // CHECK: @llvm.ppc.altivec.lvx
- res_vi = vec_lvx(0, &param_i); // CHECK: @llvm.ppc.altivec.lvx
- res_vui = vec_lvx(0, &vui); // CHECK: @llvm.ppc.altivec.lvx
- res_vui = vec_lvx(0, &param_ui); // CHECK: @llvm.ppc.altivec.lvx
- res_vbi = vec_lvx(0, &vbi); // CHECK: @llvm.ppc.altivec.lvx
- res_vf = vec_lvx(0, &vf); // CHECK: @llvm.ppc.altivec.lvx
- res_vf = vec_lvx(0, &param_f); // CHECK: @llvm.ppc.altivec.lvx
+ res_vsc = vec_ld(0, &vsc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vsc = vec_ld(0, &param_sc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vuc = vec_ld(0, &vuc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vuc = vec_ld(0, &param_uc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vbc = vec_ld(0, &vbc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vs = vec_ld(0, &vs);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vs = vec_ld(0, &param_s);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vus = vec_ld(0, &vus);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vus = vec_ld(0, &param_us);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vbs = vec_ld(0, &vbs);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vp = vec_ld(0, &vp);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vi = vec_ld(0, &vi);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vi = vec_ld(0, &param_i);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vui = vec_ld(0, &vui);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vui = vec_ld(0, &param_ui);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vbi = vec_ld(0, &vbi);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vf = vec_ld(0, &vf);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vf = vec_ld(0, &param_f);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vsc = vec_lvx(0, &vsc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vsc = vec_lvx(0, &param_sc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vuc = vec_lvx(0, &vuc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vuc = vec_lvx(0, &param_uc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vbc = vec_lvx(0, &vbc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vs = vec_lvx(0, &vs);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vs = vec_lvx(0, &param_s);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vus = vec_lvx(0, &vus);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vus = vec_lvx(0, &param_us);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vbs = vec_lvx(0, &vbs);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vp = vec_lvx(0, &vp);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vi = vec_lvx(0, &vi);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vi = vec_lvx(0, &param_i);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vui = vec_lvx(0, &vui);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vui = vec_lvx(0, &param_ui);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vbi = vec_lvx(0, &vbi);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vf = vec_lvx(0, &vf);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+
+ res_vf = vec_lvx(0, &param_f);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
/* vec_lde */
- res_vsc = vec_lde(0, &param_sc); // CHECK: @llvm.ppc.altivec.lvebx
- res_vuc = vec_lde(0, &param_uc); // CHECK: @llvm.ppc.altivec.lvebx
- res_vs = vec_lde(0, &param_s); // CHECK: @llvm.ppc.altivec.lvehx
- res_vus = vec_lde(0, &param_us); // CHECK: @llvm.ppc.altivec.lvehx
- res_vi = vec_lde(0, &param_i); // CHECK: @llvm.ppc.altivec.lvewx
- res_vui = vec_lde(0, &param_ui); // CHECK: @llvm.ppc.altivec.lvewx
- res_vf = vec_lde(0, &param_f); // CHECK: @llvm.ppc.altivec.lvewx
- res_vsc = vec_lvebx(0, &param_sc); // CHECK: @llvm.ppc.altivec.lvebx
- res_vuc = vec_lvebx(0, &param_uc); // CHECK: @llvm.ppc.altivec.lvebx
- res_vs = vec_lvehx(0, &param_s); // CHECK: @llvm.ppc.altivec.lvehx
- res_vus = vec_lvehx(0, &param_us); // CHECK: @llvm.ppc.altivec.lvehx
- res_vi = vec_lvewx(0, &param_i); // CHECK: @llvm.ppc.altivec.lvewx
- res_vui = vec_lvewx(0, &param_ui); // CHECK: @llvm.ppc.altivec.lvewx
- res_vf = vec_lvewx(0, &param_f); // CHECK: @llvm.ppc.altivec.lvewx
+ res_vsc = vec_lde(0, &param_sc);
+// CHECK: @llvm.ppc.altivec.lvebx
+// CHECK-LE: @llvm.ppc.altivec.lvebx
+
+ res_vuc = vec_lde(0, &param_uc);
+// CHECK: @llvm.ppc.altivec.lvebx
+// CHECK-LE: @llvm.ppc.altivec.lvebx
+
+ res_vs = vec_lde(0, &param_s);
+// CHECK: @llvm.ppc.altivec.lvehx
+// CHECK-LE: @llvm.ppc.altivec.lvehx
+
+ res_vus = vec_lde(0, &param_us);
+// CHECK: @llvm.ppc.altivec.lvehx
+// CHECK-LE: @llvm.ppc.altivec.lvehx
+
+ res_vi = vec_lde(0, &param_i);
+// CHECK: @llvm.ppc.altivec.lvewx
+// CHECK-LE: @llvm.ppc.altivec.lvewx
+
+ res_vui = vec_lde(0, &param_ui);
+// CHECK: @llvm.ppc.altivec.lvewx
+// CHECK-LE: @llvm.ppc.altivec.lvewx
+
+ res_vf = vec_lde(0, &param_f);
+// CHECK: @llvm.ppc.altivec.lvewx
+// CHECK-LE: @llvm.ppc.altivec.lvewx
+
+ res_vsc = vec_lvebx(0, &param_sc);
+// CHECK: @llvm.ppc.altivec.lvebx
+// CHECK-LE: @llvm.ppc.altivec.lvebx
+
+ res_vuc = vec_lvebx(0, &param_uc);
+// CHECK: @llvm.ppc.altivec.lvebx
+// CHECK-LE: @llvm.ppc.altivec.lvebx
+
+ res_vs = vec_lvehx(0, &param_s);
+// CHECK: @llvm.ppc.altivec.lvehx
+// CHECK-LE: @llvm.ppc.altivec.lvehx
+
+ res_vus = vec_lvehx(0, &param_us);
+// CHECK: @llvm.ppc.altivec.lvehx
+// CHECK-LE: @llvm.ppc.altivec.lvehx
+
+ res_vi = vec_lvewx(0, &param_i);
+// CHECK: @llvm.ppc.altivec.lvewx
+// CHECK-LE: @llvm.ppc.altivec.lvewx
+
+ res_vui = vec_lvewx(0, &param_ui);
+// CHECK: @llvm.ppc.altivec.lvewx
+// CHECK-LE: @llvm.ppc.altivec.lvewx
+
+ res_vf = vec_lvewx(0, &param_f);
+// CHECK: @llvm.ppc.altivec.lvewx
+// CHECK-LE: @llvm.ppc.altivec.lvewx
/* vec_ldl */
- res_vsc = vec_ldl(0, &vsc); // CHECK: @llvm.ppc.altivec.lvxl
- res_vsc = vec_ldl(0, &param_sc); // CHECK: @llvm.ppc.altivec.lvxl
- res_vuc = vec_ldl(0, &vuc); // CHECK: @llvm.ppc.altivec.lvxl
- res_vuc = vec_ldl(0, &param_uc); // CHECK: @llvm.ppc.altivec.lvxl
- res_vbc = vec_ldl(0, &vbc); // CHECK: @llvm.ppc.altivec.lvxl
- res_vs = vec_ldl(0, &vs); // CHECK: @llvm.ppc.altivec.lvxl
- res_vs = vec_ldl(0, &param_s); // CHECK: @llvm.ppc.altivec.lvxl
- res_vus = vec_ldl(0, &vus); // CHECK: @llvm.ppc.altivec.lvxl
- res_vus = vec_ldl(0, &param_us); // CHECK: @llvm.ppc.altivec.lvxl
- res_vbs = vec_ldl(0, &vbs); // CHECK: @llvm.ppc.altivec.lvxl
- res_vp = vec_ldl(0, &vp); // CHECK: @llvm.ppc.altivec.lvxl
- res_vi = vec_ldl(0, &vi); // CHECK: @llvm.ppc.altivec.lvxl
- res_vi = vec_ldl(0, &param_i); // CHECK: @llvm.ppc.altivec.lvxl
- res_vui = vec_ldl(0, &vui); // CHECK: @llvm.ppc.altivec.lvxl
- res_vui = vec_ldl(0, &param_ui); // CHECK: @llvm.ppc.altivec.lvxl
- res_vbi = vec_ldl(0, &vbi); // CHECK: @llvm.ppc.altivec.lvxl
- res_vf = vec_ldl(0, &vf); // CHECK: @llvm.ppc.altivec.lvxl
- res_vf = vec_ldl(0, &param_f); // CHECK: @llvm.ppc.altivec.lvxl
- res_vsc = vec_lvxl(0, &vsc); // CHECK: @llvm.ppc.altivec.lvxl
- res_vsc = vec_lvxl(0, &param_sc); // CHECK: @llvm.ppc.altivec.lvxl
- res_vuc = vec_lvxl(0, &vuc); // CHECK: @llvm.ppc.altivec.lvxl
- res_vbc = vec_lvxl(0, &vbc); // CHECK: @llvm.ppc.altivec.lvxl
- res_vuc = vec_lvxl(0, &param_uc); // CHECK: @llvm.ppc.altivec.lvxl
- res_vs = vec_lvxl(0, &vs); // CHECK: @llvm.ppc.altivec.lvxl
- res_vs = vec_lvxl(0, &param_s); // CHECK: @llvm.ppc.altivec.lvxl
- res_vus = vec_lvxl(0, &vus); // CHECK: @llvm.ppc.altivec.lvxl
- res_vus = vec_lvxl(0, &param_us); // CHECK: @llvm.ppc.altivec.lvxl
- res_vbs = vec_lvxl(0, &vbs); // CHECK: @llvm.ppc.altivec.lvxl
- res_vp = vec_lvxl(0, &vp); // CHECK: @llvm.ppc.altivec.lvxl
- res_vi = vec_lvxl(0, &vi); // CHECK: @llvm.ppc.altivec.lvxl
- res_vi = vec_lvxl(0, &param_i); // CHECK: @llvm.ppc.altivec.lvxl
- res_vui = vec_lvxl(0, &vui); // CHECK: @llvm.ppc.altivec.lvxl
- res_vui = vec_lvxl(0, &param_ui); // CHECK: @llvm.ppc.altivec.lvxl
- res_vbi = vec_lvxl(0, &vbi); // CHECK: @llvm.ppc.altivec.lvxl
- res_vf = vec_lvxl(0, &vf); // CHECK: @llvm.ppc.altivec.lvxl
- res_vf = vec_lvxl(0, &param_f); // CHECK: @llvm.ppc.altivec.lvxl
+ res_vsc = vec_ldl(0, &vsc);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vsc = vec_ldl(0, &param_sc);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vuc = vec_ldl(0, &vuc);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vuc = vec_ldl(0, &param_uc);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vbc = vec_ldl(0, &vbc);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vs = vec_ldl(0, &vs);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vs = vec_ldl(0, &param_s);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vus = vec_ldl(0, &vus);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vus = vec_ldl(0, &param_us);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vbs = vec_ldl(0, &vbs);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vp = vec_ldl(0, &vp);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vi = vec_ldl(0, &vi);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vi = vec_ldl(0, &param_i);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vui = vec_ldl(0, &vui);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vui = vec_ldl(0, &param_ui);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vbi = vec_ldl(0, &vbi);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vf = vec_ldl(0, &vf);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vf = vec_ldl(0, &param_f);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vsc = vec_lvxl(0, &vsc);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vsc = vec_lvxl(0, &param_sc);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vuc = vec_lvxl(0, &vuc);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vbc = vec_lvxl(0, &vbc);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vuc = vec_lvxl(0, &param_uc);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vs = vec_lvxl(0, &vs);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vs = vec_lvxl(0, &param_s);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vus = vec_lvxl(0, &vus);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vus = vec_lvxl(0, &param_us);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vbs = vec_lvxl(0, &vbs);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vp = vec_lvxl(0, &vp);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vi = vec_lvxl(0, &vi);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vi = vec_lvxl(0, &param_i);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vui = vec_lvxl(0, &vui);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vui = vec_lvxl(0, &param_ui);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vbi = vec_lvxl(0, &vbi);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vf = vec_lvxl(0, &vf);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+
+ res_vf = vec_lvxl(0, &param_f);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvxl
/* vec_loge */
- res_vf = vec_loge(vf); // CHECK: @llvm.ppc.altivec.vlogefp
- res_vf = vec_vlogefp(vf); // CHECK: @llvm.ppc.altivec.vlogefp
+ res_vf = vec_loge(vf);
+// CHECK: @llvm.ppc.altivec.vlogefp
+// CHECK-LE: @llvm.ppc.altivec.vlogefp
+
+ res_vf = vec_vlogefp(vf);
+// CHECK: @llvm.ppc.altivec.vlogefp
+// CHECK-LE: @llvm.ppc.altivec.vlogefp
/* vec_lvsl */
- res_vuc = vec_lvsl(0, &param_i); // CHECK: @llvm.ppc.altivec.lvsl
+ res_vuc = vec_lvsl(0, &param_i);
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
/* vec_lvsr */
- res_vuc = vec_lvsr(0, &param_i); // CHECK: @llvm.ppc.altivec.lvsr
+ res_vuc = vec_lvsr(0, &param_i);
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.lvsr
/* vec_madd */
- res_vf =vec_madd(vf, vf, vf); // CHECK: @llvm.ppc.altivec.vmaddfp
- res_vf = vec_vmaddfp(vf, vf, vf); // CHECK: @llvm.ppc.altivec.vmaddfp
+ res_vf =vec_madd(vf, vf, vf);
+// CHECK: @llvm.ppc.altivec.vmaddfp
+// CHECK-LE: @llvm.ppc.altivec.vmaddfp
+
+ res_vf = vec_vmaddfp(vf, vf, vf);
+// CHECK: @llvm.ppc.altivec.vmaddfp
+// CHECK-LE: @llvm.ppc.altivec.vmaddfp
/* vec_madds */
- res_vs = vec_madds(vs, vs, vs); // CHECK: @llvm.ppc.altivec.vmhaddshs
- res_vs = vec_vmhaddshs(vs, vs, vs); // CHECK: @llvm.ppc.altivec.vmhaddshs
+ res_vs = vec_madds(vs, vs, vs);
+// CHECK: @llvm.ppc.altivec.vmhaddshs
+// CHECK-LE: @llvm.ppc.altivec.vmhaddshs
+
+ res_vs = vec_vmhaddshs(vs, vs, vs);
+// CHECK: @llvm.ppc.altivec.vmhaddshs
+// CHECK-LE: @llvm.ppc.altivec.vmhaddshs
/* vec_max */
- res_vsc = vec_max(vsc, vsc); // CHECK: @llvm.ppc.altivec.vmaxsb
- res_vsc = vec_max(vbc, vsc); // CHECK: @llvm.ppc.altivec.vmaxsb
- res_vsc = vec_max(vsc, vbc); // CHECK: @llvm.ppc.altivec.vmaxsb
- res_vuc = vec_max(vuc, vuc); // CHECK: @llvm.ppc.altivec.vmaxub
- res_vuc = vec_max(vbc, vuc); // CHECK: @llvm.ppc.altivec.vmaxub
- res_vuc = vec_max(vuc, vbc); // CHECK: @llvm.ppc.altivec.vmaxub
- res_vs = vec_max(vs, vs); // CHECK: @llvm.ppc.altivec.vmaxsh
- res_vs = vec_max(vbs, vs); // CHECK: @llvm.ppc.altivec.vmaxsh
- res_vs = vec_max(vs, vbs); // CHECK: @llvm.ppc.altivec.vmaxsh
- res_vus = vec_max(vus, vus); // CHECK: @llvm.ppc.altivec.vmaxuh
- res_vus = vec_max(vbs, vus); // CHECK: @llvm.ppc.altivec.vmaxuh
- res_vus = vec_max(vus, vbs); // CHECK: @llvm.ppc.altivec.vmaxuh
- res_vi = vec_max(vi, vi); // CHECK: @llvm.ppc.altivec.vmaxsw
- res_vi = vec_max(vbi, vi); // CHECK: @llvm.ppc.altivec.vmaxsw
- res_vi = vec_max(vi, vbi); // CHECK: @llvm.ppc.altivec.vmaxsw
- res_vui = vec_max(vui, vui); // CHECK: @llvm.ppc.altivec.vmaxuw
- res_vui = vec_max(vbi, vui); // CHECK: @llvm.ppc.altivec.vmaxuw
- res_vui = vec_max(vui, vbi); // CHECK: @llvm.ppc.altivec.vmaxuw
- res_vf = vec_max(vf, vf); // CHECK: @llvm.ppc.altivec.vmaxfp
- res_vsc = vec_vmaxsb(vsc, vsc); // CHECK: @llvm.ppc.altivec.vmaxsb
- res_vsc = vec_vmaxsb(vbc, vsc); // CHECK: @llvm.ppc.altivec.vmaxsb
- res_vsc = vec_vmaxsb(vsc, vbc); // CHECK: @llvm.ppc.altivec.vmaxsb
- res_vuc = vec_vmaxub(vuc, vuc); // CHECK: @llvm.ppc.altivec.vmaxub
- res_vuc = vec_vmaxub(vbc, vuc); // CHECK: @llvm.ppc.altivec.vmaxub
- res_vuc = vec_vmaxub(vuc, vbc); // CHECK: @llvm.ppc.altivec.vmaxub
- res_vs = vec_vmaxsh(vs, vs); // CHECK: @llvm.ppc.altivec.vmaxsh
- res_vs = vec_vmaxsh(vbs, vs); // CHECK: @llvm.ppc.altivec.vmaxsh
- res_vs = vec_vmaxsh(vs, vbs); // CHECK: @llvm.ppc.altivec.vmaxsh
- res_vus = vec_vmaxuh(vus, vus); // CHECK: @llvm.ppc.altivec.vmaxuh
- res_vus = vec_vmaxuh(vbs, vus); // CHECK: @llvm.ppc.altivec.vmaxuh
- res_vus = vec_vmaxuh(vus, vbs); // CHECK: @llvm.ppc.altivec.vmaxuh
- res_vi = vec_vmaxsw(vi, vi); // CHECK: @llvm.ppc.altivec.vmaxsw
- res_vi = vec_vmaxsw(vbi, vi); // CHECK: @llvm.ppc.altivec.vmaxsw
- res_vi = vec_vmaxsw(vi, vbi); // CHECK: @llvm.ppc.altivec.vmaxsw
- res_vui = vec_vmaxuw(vui, vui); // CHECK: @llvm.ppc.altivec.vmaxuw
- res_vui = vec_vmaxuw(vbi, vui); // CHECK: @llvm.ppc.altivec.vmaxuw
- res_vui = vec_vmaxuw(vui, vbi); // CHECK: @llvm.ppc.altivec.vmaxuw
- res_vf = vec_vmaxfp(vf, vf); // CHECK: @llvm.ppc.altivec.vmaxfp
+ res_vsc = vec_max(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vmaxsb
+// CHECK-LE: @llvm.ppc.altivec.vmaxsb
+
+ res_vsc = vec_max(vbc, vsc);
+// CHECK: @llvm.ppc.altivec.vmaxsb
+// CHECK-LE: @llvm.ppc.altivec.vmaxsb
+
+ res_vsc = vec_max(vsc, vbc);
+// CHECK: @llvm.ppc.altivec.vmaxsb
+// CHECK-LE: @llvm.ppc.altivec.vmaxsb
+
+ res_vuc = vec_max(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vmaxub
+// CHECK-LE: @llvm.ppc.altivec.vmaxub
+
+ res_vuc = vec_max(vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vmaxub
+// CHECK-LE: @llvm.ppc.altivec.vmaxub
+
+ res_vuc = vec_max(vuc, vbc);
+// CHECK: @llvm.ppc.altivec.vmaxub
+// CHECK-LE: @llvm.ppc.altivec.vmaxub
+
+ res_vs = vec_max(vs, vs);
+// CHECK: @llvm.ppc.altivec.vmaxsh
+// CHECK-LE: @llvm.ppc.altivec.vmaxsh
+
+ res_vs = vec_max(vbs, vs);
+// CHECK: @llvm.ppc.altivec.vmaxsh
+// CHECK-LE: @llvm.ppc.altivec.vmaxsh
+
+ res_vs = vec_max(vs, vbs);
+// CHECK: @llvm.ppc.altivec.vmaxsh
+// CHECK-LE: @llvm.ppc.altivec.vmaxsh
+
+ res_vus = vec_max(vus, vus);
+// CHECK: @llvm.ppc.altivec.vmaxuh
+// CHECK-LE: @llvm.ppc.altivec.vmaxuh
+
+ res_vus = vec_max(vbs, vus);
+// CHECK: @llvm.ppc.altivec.vmaxuh
+// CHECK-LE: @llvm.ppc.altivec.vmaxuh
+
+ res_vus = vec_max(vus, vbs);
+// CHECK: @llvm.ppc.altivec.vmaxuh
+// CHECK-LE: @llvm.ppc.altivec.vmaxuh
+
+ res_vi = vec_max(vi, vi);
+// CHECK: @llvm.ppc.altivec.vmaxsw
+// CHECK-LE: @llvm.ppc.altivec.vmaxsw
+
+ res_vi = vec_max(vbi, vi);
+// CHECK: @llvm.ppc.altivec.vmaxsw
+// CHECK-LE: @llvm.ppc.altivec.vmaxsw
+
+ res_vi = vec_max(vi, vbi);
+// CHECK: @llvm.ppc.altivec.vmaxsw
+// CHECK-LE: @llvm.ppc.altivec.vmaxsw
+
+ res_vui = vec_max(vui, vui);
+// CHECK: @llvm.ppc.altivec.vmaxuw
+// CHECK-LE: @llvm.ppc.altivec.vmaxuw
+
+ res_vui = vec_max(vbi, vui);
+// CHECK: @llvm.ppc.altivec.vmaxuw
+// CHECK-LE: @llvm.ppc.altivec.vmaxuw
+
+ res_vui = vec_max(vui, vbi);
+// CHECK: @llvm.ppc.altivec.vmaxuw
+// CHECK-LE: @llvm.ppc.altivec.vmaxuw
+
+ res_vf = vec_max(vf, vf);
+// CHECK: @llvm.ppc.altivec.vmaxfp
+// CHECK-LE: @llvm.ppc.altivec.vmaxfp
+
+ res_vsc = vec_vmaxsb(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vmaxsb
+// CHECK-LE: @llvm.ppc.altivec.vmaxsb
+
+ res_vsc = vec_vmaxsb(vbc, vsc);
+// CHECK: @llvm.ppc.altivec.vmaxsb
+// CHECK-LE: @llvm.ppc.altivec.vmaxsb
+
+ res_vsc = vec_vmaxsb(vsc, vbc);
+// CHECK: @llvm.ppc.altivec.vmaxsb
+// CHECK-LE: @llvm.ppc.altivec.vmaxsb
+
+ res_vuc = vec_vmaxub(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vmaxub
+// CHECK-LE: @llvm.ppc.altivec.vmaxub
+
+ res_vuc = vec_vmaxub(vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vmaxub
+// CHECK-LE: @llvm.ppc.altivec.vmaxub
+
+ res_vuc = vec_vmaxub(vuc, vbc);
+// CHECK: @llvm.ppc.altivec.vmaxub
+// CHECK-LE: @llvm.ppc.altivec.vmaxub
+
+ res_vs = vec_vmaxsh(vs, vs);
+// CHECK: @llvm.ppc.altivec.vmaxsh
+// CHECK-LE: @llvm.ppc.altivec.vmaxsh
+
+ res_vs = vec_vmaxsh(vbs, vs);
+// CHECK: @llvm.ppc.altivec.vmaxsh
+// CHECK-LE: @llvm.ppc.altivec.vmaxsh
+
+ res_vs = vec_vmaxsh(vs, vbs);
+// CHECK: @llvm.ppc.altivec.vmaxsh
+// CHECK-LE: @llvm.ppc.altivec.vmaxsh
+
+ res_vus = vec_vmaxuh(vus, vus);
+// CHECK: @llvm.ppc.altivec.vmaxuh
+// CHECK-LE: @llvm.ppc.altivec.vmaxuh
+
+ res_vus = vec_vmaxuh(vbs, vus);
+// CHECK: @llvm.ppc.altivec.vmaxuh
+// CHECK-LE: @llvm.ppc.altivec.vmaxuh
+
+ res_vus = vec_vmaxuh(vus, vbs);
+// CHECK: @llvm.ppc.altivec.vmaxuh
+// CHECK-LE: @llvm.ppc.altivec.vmaxuh
+
+ res_vi = vec_vmaxsw(vi, vi);
+// CHECK: @llvm.ppc.altivec.vmaxsw
+// CHECK-LE: @llvm.ppc.altivec.vmaxsw
+
+ res_vi = vec_vmaxsw(vbi, vi);
+// CHECK: @llvm.ppc.altivec.vmaxsw
+// CHECK-LE: @llvm.ppc.altivec.vmaxsw
+
+ res_vi = vec_vmaxsw(vi, vbi);
+// CHECK: @llvm.ppc.altivec.vmaxsw
+// CHECK-LE: @llvm.ppc.altivec.vmaxsw
+
+ res_vui = vec_vmaxuw(vui, vui);
+// CHECK: @llvm.ppc.altivec.vmaxuw
+// CHECK-LE: @llvm.ppc.altivec.vmaxuw
+
+ res_vui = vec_vmaxuw(vbi, vui);
+// CHECK: @llvm.ppc.altivec.vmaxuw
+// CHECK-LE: @llvm.ppc.altivec.vmaxuw
+
+ res_vui = vec_vmaxuw(vui, vbi);
+// CHECK: @llvm.ppc.altivec.vmaxuw
+// CHECK-LE: @llvm.ppc.altivec.vmaxuw
+
+ res_vf = vec_vmaxfp(vf, vf);
+// CHECK: @llvm.ppc.altivec.vmaxfp
+// CHECK-LE: @llvm.ppc.altivec.vmaxfp
/* vec_mergeh */
- res_vsc = vec_mergeh(vsc, vsc); // CHECK: @llvm.ppc.altivec.vperm
- res_vuc = vec_mergeh(vuc, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vbc = vec_mergeh(vbc, vbc); // CHECK: @llvm.ppc.altivec.vperm
- res_vs = vec_mergeh(vs, vs); // CHECK: @llvm.ppc.altivec.vperm
- res_vp = vec_mergeh(vp, vp); // CHECK: @llvm.ppc.altivec.vperm
- res_vus = vec_mergeh(vus, vus); // CHECK: @llvm.ppc.altivec.vperm
- res_vbs = vec_mergeh(vbs, vbs); // CHECK: @llvm.ppc.altivec.vperm
- res_vi = vec_mergeh(vi, vi); // CHECK: @llvm.ppc.altivec.vperm
- res_vui = vec_mergeh(vui, vui); // CHECK: @llvm.ppc.altivec.vperm
- res_vbi = vec_mergeh(vbi, vbi); // CHECK: @llvm.ppc.altivec.vperm
- res_vf = vec_mergeh(vf, vf); // CHECK: @llvm.ppc.altivec.vperm
- res_vsc = vec_vmrghb(vsc, vsc); // CHECK: @llvm.ppc.altivec.vperm
- res_vuc = vec_vmrghb(vuc, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vbc = vec_vmrghb(vbc, vbc); // CHECK: @llvm.ppc.altivec.vperm
- res_vs = vec_vmrghh(vs, vs); // CHECK: @llvm.ppc.altivec.vperm
- res_vp = vec_vmrghh(vp, vp); // CHECK: @llvm.ppc.altivec.vperm
- res_vus = vec_vmrghh(vus, vus); // CHECK: @llvm.ppc.altivec.vperm
- res_vbs = vec_vmrghh(vbs, vbs); // CHECK: @llvm.ppc.altivec.vperm
- res_vi = vec_vmrghw(vi, vi); // CHECK: @llvm.ppc.altivec.vperm
- res_vui = vec_vmrghw(vui, vui); // CHECK: @llvm.ppc.altivec.vperm
- res_vbi = vec_vmrghw(vbi, vbi); // CHECK: @llvm.ppc.altivec.vperm
- res_vf = vec_vmrghw(vf, vf); // CHECK: @llvm.ppc.altivec.vperm
+ res_vsc = vec_mergeh(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vuc = vec_mergeh(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbc = vec_mergeh(vbc, vbc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vs = vec_mergeh(vs, vs);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vp = vec_mergeh(vp, vp);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vus = vec_mergeh(vus, vus);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbs = vec_mergeh(vbs, vbs);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vi = vec_mergeh(vi, vi);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vui = vec_mergeh(vui, vui);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbi = vec_mergeh(vbi, vbi);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vf = vec_mergeh(vf, vf);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vsc = vec_vmrghb(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vuc = vec_vmrghb(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbc = vec_vmrghb(vbc, vbc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vs = vec_vmrghh(vs, vs);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vp = vec_vmrghh(vp, vp);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vus = vec_vmrghh(vus, vus);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbs = vec_vmrghh(vbs, vbs);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vi = vec_vmrghw(vi, vi);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vui = vec_vmrghw(vui, vui);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbi = vec_vmrghw(vbi, vbi);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vf = vec_vmrghw(vf, vf);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
/* vec_mergel */
- res_vsc = vec_mergel(vsc, vsc); // CHECK: @llvm.ppc.altivec.vperm
- res_vuc = vec_mergel(vuc, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vbc = vec_mergel(vbc, vbc); // CHECK: @llvm.ppc.altivec.vperm
- res_vs = vec_mergel(vs, vs); // CHECK: @llvm.ppc.altivec.vperm
- res_vp = vec_mergeh(vp, vp); // CHECK: @llvm.ppc.altivec.vperm
- res_vus = vec_mergel(vus, vus); // CHECK: @llvm.ppc.altivec.vperm
- res_vbs = vec_mergel(vbs, vbs); // CHECK: @llvm.ppc.altivec.vperm
- res_vi = vec_mergel(vi, vi); // CHECK: @llvm.ppc.altivec.vperm
- res_vui = vec_mergel(vui, vui); // CHECK: @llvm.ppc.altivec.vperm
- res_vbi = vec_mergel(vbi, vbi); // CHECK: @llvm.ppc.altivec.vperm
- res_vf = vec_mergel(vf, vf); // CHECK: @llvm.ppc.altivec.vperm
- res_vsc = vec_vmrglb(vsc, vsc); // CHECK: @llvm.ppc.altivec.vperm
- res_vuc = vec_vmrglb(vuc, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vbc = vec_vmrglb(vbc, vbc); // CHECK: @llvm.ppc.altivec.vperm
- res_vs = vec_vmrglh(vs, vs); // CHECK: @llvm.ppc.altivec.vperm
- res_vp = vec_vmrglh(vp, vp); // CHECK: @llvm.ppc.altivec.vperm
- res_vus = vec_vmrglh(vus, vus); // CHECK: @llvm.ppc.altivec.vperm
- res_vbs = vec_vmrglh(vbs, vbs); // CHECK: @llvm.ppc.altivec.vperm
- res_vi = vec_vmrglw(vi, vi); // CHECK: @llvm.ppc.altivec.vperm
- res_vui = vec_vmrglw(vui, vui); // CHECK: @llvm.ppc.altivec.vperm
- res_vbi = vec_vmrglw(vbi, vbi); // CHECK: @llvm.ppc.altivec.vperm
- res_vf = vec_vmrglw(vf, vf); // CHECK: @llvm.ppc.altivec.vperm
+ res_vsc = vec_mergel(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vuc = vec_mergel(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbc = vec_mergel(vbc, vbc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vs = vec_mergel(vs, vs);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vp = vec_mergeh(vp, vp);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vus = vec_mergel(vus, vus);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbs = vec_mergel(vbs, vbs);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vi = vec_mergel(vi, vi);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vui = vec_mergel(vui, vui);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbi = vec_mergel(vbi, vbi);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vf = vec_mergel(vf, vf);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vsc = vec_vmrglb(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vuc = vec_vmrglb(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbc = vec_vmrglb(vbc, vbc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vs = vec_vmrglh(vs, vs);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vp = vec_vmrglh(vp, vp);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vus = vec_vmrglh(vus, vus);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbs = vec_vmrglh(vbs, vbs);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vi = vec_vmrglw(vi, vi);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vui = vec_vmrglw(vui, vui);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbi = vec_vmrglw(vbi, vbi);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vf = vec_vmrglw(vf, vf);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
/* vec_mfvscr */
- vus = vec_mfvscr(); // CHECK: @llvm.ppc.altivec.mfvscr
+ vus = vec_mfvscr();
+// CHECK: @llvm.ppc.altivec.mfvscr
+// CHECK-LE: @llvm.ppc.altivec.mfvscr
/* vec_min */
- res_vsc = vec_min(vsc, vsc); // CHECK: @llvm.ppc.altivec.vminsb
- res_vsc = vec_min(vbc, vsc); // CHECK: @llvm.ppc.altivec.vminsb
- res_vsc = vec_min(vsc, vbc); // CHECK: @llvm.ppc.altivec.vminsb
- res_vuc = vec_min(vuc, vuc); // CHECK: @llvm.ppc.altivec.vminub
- res_vuc = vec_min(vbc, vuc); // CHECK: @llvm.ppc.altivec.vminub
- res_vuc = vec_min(vuc, vbc); // CHECK: @llvm.ppc.altivec.vminub
- res_vs = vec_min(vs, vs); // CHECK: @llvm.ppc.altivec.vminsh
- res_vs = vec_min(vbs, vs); // CHECK: @llvm.ppc.altivec.vminsh
- res_vs = vec_min(vs, vbs); // CHECK: @llvm.ppc.altivec.vminsh
- res_vus = vec_min(vus, vus); // CHECK: @llvm.ppc.altivec.vminuh
- res_vus = vec_min(vbs, vus); // CHECK: @llvm.ppc.altivec.vminuh
- res_vus = vec_min(vus, vbs); // CHECK: @llvm.ppc.altivec.vminuh
- res_vi = vec_min(vi, vi); // CHECK: @llvm.ppc.altivec.vminsw
- res_vi = vec_min(vbi, vi); // CHECK: @llvm.ppc.altivec.vminsw
- res_vi = vec_min(vi, vbi); // CHECK: @llvm.ppc.altivec.vminsw
- res_vui = vec_min(vui, vui); // CHECK: @llvm.ppc.altivec.vminuw
- res_vui = vec_min(vbi, vui); // CHECK: @llvm.ppc.altivec.vminuw
- res_vui = vec_min(vui, vbi); // CHECK: @llvm.ppc.altivec.vminuw
- res_vf = vec_min(vf, vf); // CHECK: @llvm.ppc.altivec.vminfp
- res_vsc = vec_vminsb(vsc, vsc); // CHECK: @llvm.ppc.altivec.vminsb
- res_vsc = vec_vminsb(vbc, vsc); // CHECK: @llvm.ppc.altivec.vminsb
- res_vsc = vec_vminsb(vsc, vbc); // CHECK: @llvm.ppc.altivec.vminsb
- res_vuc = vec_vminub(vuc, vuc); // CHECK: @llvm.ppc.altivec.vminub
- res_vuc = vec_vminub(vbc, vuc); // CHECK: @llvm.ppc.altivec.vminub
- res_vuc = vec_vminub(vuc, vbc); // CHECK: @llvm.ppc.altivec.vminub
- res_vs = vec_vminsh(vs, vs); // CHECK: @llvm.ppc.altivec.vminsh
- res_vs = vec_vminsh(vbs, vs); // CHECK: @llvm.ppc.altivec.vminsh
- res_vs = vec_vminsh(vs, vbs); // CHECK: @llvm.ppc.altivec.vminsh
- res_vus = vec_vminuh(vus, vus); // CHECK: @llvm.ppc.altivec.vminuh
- res_vus = vec_vminuh(vbs, vus); // CHECK: @llvm.ppc.altivec.vminuh
- res_vus = vec_vminuh(vus, vbs); // CHECK: @llvm.ppc.altivec.vminuh
- res_vi = vec_vminsw(vi, vi); // CHECK: @llvm.ppc.altivec.vminsw
- res_vi = vec_vminsw(vbi, vi); // CHECK: @llvm.ppc.altivec.vminsw
- res_vi = vec_vminsw(vi, vbi); // CHECK: @llvm.ppc.altivec.vminsw
- res_vui = vec_vminuw(vui, vui); // CHECK: @llvm.ppc.altivec.vminuw
- res_vui = vec_vminuw(vbi, vui); // CHECK: @llvm.ppc.altivec.vminuw
- res_vui = vec_vminuw(vui, vbi); // CHECK: @llvm.ppc.altivec.vminuw
- res_vf = vec_vminfp(vf, vf); // CHECK: @llvm.ppc.altivec.vminfp
+ res_vsc = vec_min(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vminsb
+// CHECK-LE: @llvm.ppc.altivec.vminsb
- /* vec_mladd */
- res_vus = vec_mladd(vus, vus, vus); // CHECK: mul <8 x i16>
- // CHECK: add <8 x i16>
+ res_vsc = vec_min(vbc, vsc);
+// CHECK: @llvm.ppc.altivec.vminsb
+// CHECK-LE: @llvm.ppc.altivec.vminsb
+
+ res_vsc = vec_min(vsc, vbc);
+// CHECK: @llvm.ppc.altivec.vminsb
+// CHECK-LE: @llvm.ppc.altivec.vminsb
+
+ res_vuc = vec_min(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vminub
+// CHECK-LE: @llvm.ppc.altivec.vminub
+
+ res_vuc = vec_min(vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vminub
+// CHECK-LE: @llvm.ppc.altivec.vminub
+
+ res_vuc = vec_min(vuc, vbc);
+// CHECK: @llvm.ppc.altivec.vminub
+// CHECK-LE: @llvm.ppc.altivec.vminub
+
+ res_vs = vec_min(vs, vs);
+// CHECK: @llvm.ppc.altivec.vminsh
+// CHECK-LE: @llvm.ppc.altivec.vminsh
+
+ res_vs = vec_min(vbs, vs);
+// CHECK: @llvm.ppc.altivec.vminsh
+// CHECK-LE: @llvm.ppc.altivec.vminsh
+
+ res_vs = vec_min(vs, vbs);
+// CHECK: @llvm.ppc.altivec.vminsh
+// CHECK-LE: @llvm.ppc.altivec.vminsh
+
+ res_vus = vec_min(vus, vus);
+// CHECK: @llvm.ppc.altivec.vminuh
+// CHECK-LE: @llvm.ppc.altivec.vminuh
+
+ res_vus = vec_min(vbs, vus);
+// CHECK: @llvm.ppc.altivec.vminuh
+// CHECK-LE: @llvm.ppc.altivec.vminuh
+
+ res_vus = vec_min(vus, vbs);
+// CHECK: @llvm.ppc.altivec.vminuh
+// CHECK-LE: @llvm.ppc.altivec.vminuh
+
+ res_vi = vec_min(vi, vi);
+// CHECK: @llvm.ppc.altivec.vminsw
+// CHECK-LE: @llvm.ppc.altivec.vminsw
+
+ res_vi = vec_min(vbi, vi);
+// CHECK: @llvm.ppc.altivec.vminsw
+// CHECK-LE: @llvm.ppc.altivec.vminsw
+
+ res_vi = vec_min(vi, vbi);
+// CHECK: @llvm.ppc.altivec.vminsw
+// CHECK-LE: @llvm.ppc.altivec.vminsw
+
+ res_vui = vec_min(vui, vui);
+// CHECK: @llvm.ppc.altivec.vminuw
+// CHECK-LE: @llvm.ppc.altivec.vminuw
+
+ res_vui = vec_min(vbi, vui);
+// CHECK: @llvm.ppc.altivec.vminuw
+// CHECK-LE: @llvm.ppc.altivec.vminuw
+
+ res_vui = vec_min(vui, vbi);
+// CHECK: @llvm.ppc.altivec.vminuw
+// CHECK-LE: @llvm.ppc.altivec.vminuw
- res_vs = vec_mladd(vus, vs, vs); // CHECK: mul <8 x i16>
- // CHECK: add <8 x i16>
+ res_vf = vec_min(vf, vf);
+// CHECK: @llvm.ppc.altivec.vminfp
+// CHECK-LE: @llvm.ppc.altivec.vminfp
- res_vs = vec_mladd(vs, vus, vus); // CHECK: mul <8 x i16>
- // CHECK: add <8 x i16>
+ res_vsc = vec_vminsb(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vminsb
+// CHECK-LE: @llvm.ppc.altivec.vminsb
- res_vs = vec_mladd(vs, vs, vs); // CHECK: mul <8 x i16>
- // CHECK: add <8 x i16>
+ res_vsc = vec_vminsb(vbc, vsc);
+// CHECK: @llvm.ppc.altivec.vminsb
+// CHECK-LE: @llvm.ppc.altivec.vminsb
+
+ res_vsc = vec_vminsb(vsc, vbc);
+// CHECK: @llvm.ppc.altivec.vminsb
+// CHECK-LE: @llvm.ppc.altivec.vminsb
+
+ res_vuc = vec_vminub(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vminub
+// CHECK-LE: @llvm.ppc.altivec.vminub
+
+ res_vuc = vec_vminub(vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vminub
+// CHECK-LE: @llvm.ppc.altivec.vminub
+
+ res_vuc = vec_vminub(vuc, vbc);
+// CHECK: @llvm.ppc.altivec.vminub
+// CHECK-LE: @llvm.ppc.altivec.vminub
+
+ res_vs = vec_vminsh(vs, vs);
+// CHECK: @llvm.ppc.altivec.vminsh
+// CHECK-LE: @llvm.ppc.altivec.vminsh
+
+ res_vs = vec_vminsh(vbs, vs);
+// CHECK: @llvm.ppc.altivec.vminsh
+// CHECK-LE: @llvm.ppc.altivec.vminsh
+
+ res_vs = vec_vminsh(vs, vbs);
+// CHECK: @llvm.ppc.altivec.vminsh
+// CHECK-LE: @llvm.ppc.altivec.vminsh
+
+ res_vus = vec_vminuh(vus, vus);
+// CHECK: @llvm.ppc.altivec.vminuh
+// CHECK-LE: @llvm.ppc.altivec.vminuh
+
+ res_vus = vec_vminuh(vbs, vus);
+// CHECK: @llvm.ppc.altivec.vminuh
+// CHECK-LE: @llvm.ppc.altivec.vminuh
+
+ res_vus = vec_vminuh(vus, vbs);
+// CHECK: @llvm.ppc.altivec.vminuh
+// CHECK-LE: @llvm.ppc.altivec.vminuh
+
+ res_vi = vec_vminsw(vi, vi);
+// CHECK: @llvm.ppc.altivec.vminsw
+// CHECK-LE: @llvm.ppc.altivec.vminsw
+
+ res_vi = vec_vminsw(vbi, vi);
+// CHECK: @llvm.ppc.altivec.vminsw
+// CHECK-LE: @llvm.ppc.altivec.vminsw
+
+ res_vi = vec_vminsw(vi, vbi);
+// CHECK: @llvm.ppc.altivec.vminsw
+// CHECK-LE: @llvm.ppc.altivec.vminsw
+
+ res_vui = vec_vminuw(vui, vui);
+// CHECK: @llvm.ppc.altivec.vminuw
+// CHECK-LE: @llvm.ppc.altivec.vminuw
+
+ res_vui = vec_vminuw(vbi, vui);
+// CHECK: @llvm.ppc.altivec.vminuw
+// CHECK-LE: @llvm.ppc.altivec.vminuw
+
+ res_vui = vec_vminuw(vui, vbi);
+// CHECK: @llvm.ppc.altivec.vminuw
+// CHECK-LE: @llvm.ppc.altivec.vminuw
+
+ res_vf = vec_vminfp(vf, vf);
+// CHECK: @llvm.ppc.altivec.vminfp
+// CHECK-LE: @llvm.ppc.altivec.vminfp
+
+ /* vec_mladd */
+ res_vus = vec_mladd(vus, vus, vus);
+// CHECK: mul <8 x i16>
+// CHECK: add <8 x i16>
+// CHECK-LE: mul <8 x i16>
+// CHECK-LE: add <8 x i16>
+
+ res_vs = vec_mladd(vus, vs, vs);
+// CHECK: mul <8 x i16>
+// CHECK: add <8 x i16>
+// CHECK-LE: mul <8 x i16>
+// CHECK-LE: add <8 x i16>
+
+ res_vs = vec_mladd(vs, vus, vus);
+// CHECK: mul <8 x i16>
+// CHECK: add <8 x i16>
+// CHECK-LE: mul <8 x i16>
+// CHECK-LE: add <8 x i16>
+
+ res_vs = vec_mladd(vs, vs, vs);
+// CHECK: mul <8 x i16>
+// CHECK: add <8 x i16>
+// CHECK-LE: mul <8 x i16>
+// CHECK-LE: add <8 x i16>
/* vec_mradds */
- res_vs = vec_mradds(vs, vs, vs); // CHECK: @llvm.ppc.altivec.vmhraddshs
- res_vs = vec_vmhraddshs(vs, vs, vs); // CHECK: @llvm.ppc.altivec.vmhraddshs
-
+ res_vs = vec_mradds(vs, vs, vs);
+// CHECK: @llvm.ppc.altivec.vmhraddshs
+// CHECK-LE: @llvm.ppc.altivec.vmhraddshs
+
+ res_vs = vec_vmhraddshs(vs, vs, vs);
+// CHECK: @llvm.ppc.altivec.vmhraddshs
+// CHECK-LE: @llvm.ppc.altivec.vmhraddshs
+
/* vec_msum */
- res_vi = vec_msum(vsc, vuc, vi); // CHECK: @llvm.ppc.altivec.vmsummbm
- res_vui = vec_msum(vuc, vuc, vui); // CHECK: @llvm.ppc.altivec.vmsumubm
- res_vi = vec_msum(vs, vs, vi); // CHECK: @llvm.ppc.altivec.vmsumshm
- res_vui = vec_msum(vus, vus, vui); // CHECK: @llvm.ppc.altivec.vmsumuhm
- res_vi = vec_vmsummbm(vsc, vuc, vi); // CHECK: @llvm.ppc.altivec.vmsummbm
- res_vui = vec_vmsumubm(vuc, vuc, vui); // CHECK: @llvm.ppc.altivec.vmsumubm
- res_vi = vec_vmsumshm(vs, vs, vi); // CHECK: @llvm.ppc.altivec.vmsumshm
- res_vui = vec_vmsumuhm(vus, vus, vui); // CHECK: @llvm.ppc.altivec.vmsumuhm
+ res_vi = vec_msum(vsc, vuc, vi);
+// CHECK: @llvm.ppc.altivec.vmsummbm
+// CHECK-LE: @llvm.ppc.altivec.vmsummbm
+
+ res_vui = vec_msum(vuc, vuc, vui);
+// CHECK: @llvm.ppc.altivec.vmsumubm
+// CHECK-LE: @llvm.ppc.altivec.vmsumubm
+
+ res_vi = vec_msum(vs, vs, vi);
+// CHECK: @llvm.ppc.altivec.vmsumshm
+// CHECK-LE: @llvm.ppc.altivec.vmsumshm
+
+ res_vui = vec_msum(vus, vus, vui);
+// CHECK: @llvm.ppc.altivec.vmsumuhm
+// CHECK-LE: @llvm.ppc.altivec.vmsumuhm
+
+ res_vi = vec_vmsummbm(vsc, vuc, vi);
+// CHECK: @llvm.ppc.altivec.vmsummbm
+// CHECK-LE: @llvm.ppc.altivec.vmsummbm
+
+ res_vui = vec_vmsumubm(vuc, vuc, vui);
+// CHECK: @llvm.ppc.altivec.vmsumubm
+// CHECK-LE: @llvm.ppc.altivec.vmsumubm
+
+ res_vi = vec_vmsumshm(vs, vs, vi);
+// CHECK: @llvm.ppc.altivec.vmsumshm
+// CHECK-LE: @llvm.ppc.altivec.vmsumshm
+
+ res_vui = vec_vmsumuhm(vus, vus, vui);
+// CHECK: @llvm.ppc.altivec.vmsumuhm
+// CHECK-LE: @llvm.ppc.altivec.vmsumuhm
/* vec_msums */
- res_vi = vec_msums(vs, vs, vi); // CHECK: @llvm.ppc.altivec.vmsumshs
- res_vui = vec_msums(vus, vus, vui); // CHECK: @llvm.ppc.altivec.vmsumuhs
- res_vi = vec_vmsumshs(vs, vs, vi); // CHECK: @llvm.ppc.altivec.vmsumshs
- res_vui = vec_vmsumuhs(vus, vus, vui); // CHECK: @llvm.ppc.altivec.vmsumuhs
+ res_vi = vec_msums(vs, vs, vi);
+// CHECK: @llvm.ppc.altivec.vmsumshs
+// CHECK-LE: @llvm.ppc.altivec.vmsumshs
+
+ res_vui = vec_msums(vus, vus, vui);
+// CHECK: @llvm.ppc.altivec.vmsumuhs
+// CHECK-LE: @llvm.ppc.altivec.vmsumuhs
+
+ res_vi = vec_vmsumshs(vs, vs, vi);
+// CHECK: @llvm.ppc.altivec.vmsumshs
+// CHECK-LE: @llvm.ppc.altivec.vmsumshs
+
+ res_vui = vec_vmsumuhs(vus, vus, vui);
+// CHECK: @llvm.ppc.altivec.vmsumuhs
+// CHECK-LE: @llvm.ppc.altivec.vmsumuhs
/* vec_mtvscr */
- vec_mtvscr(vsc); // CHECK: @llvm.ppc.altivec.mtvscr
- vec_mtvscr(vuc); // CHECK: @llvm.ppc.altivec.mtvscr
- vec_mtvscr(vbc); // CHECK: @llvm.ppc.altivec.mtvscr
- vec_mtvscr(vs); // CHECK: @llvm.ppc.altivec.mtvscr
- vec_mtvscr(vus); // CHECK: @llvm.ppc.altivec.mtvscr
- vec_mtvscr(vbs); // CHECK: @llvm.ppc.altivec.mtvscr
- vec_mtvscr(vp); // CHECK: @llvm.ppc.altivec.mtvscr
- vec_mtvscr(vi); // CHECK: @llvm.ppc.altivec.mtvscr
- vec_mtvscr(vui); // CHECK: @llvm.ppc.altivec.mtvscr
- vec_mtvscr(vbi); // CHECK: @llvm.ppc.altivec.mtvscr
+ vec_mtvscr(vsc);
+// CHECK: @llvm.ppc.altivec.mtvscr
+// CHECK-LE: @llvm.ppc.altivec.mtvscr
+
+ vec_mtvscr(vuc);
+// CHECK: @llvm.ppc.altivec.mtvscr
+// CHECK-LE: @llvm.ppc.altivec.mtvscr
+
+ vec_mtvscr(vbc);
+// CHECK: @llvm.ppc.altivec.mtvscr
+// CHECK-LE: @llvm.ppc.altivec.mtvscr
+
+ vec_mtvscr(vs);
+// CHECK: @llvm.ppc.altivec.mtvscr
+// CHECK-LE: @llvm.ppc.altivec.mtvscr
+
+ vec_mtvscr(vus);
+// CHECK: @llvm.ppc.altivec.mtvscr
+// CHECK-LE: @llvm.ppc.altivec.mtvscr
+
+ vec_mtvscr(vbs);
+// CHECK: @llvm.ppc.altivec.mtvscr
+// CHECK-LE: @llvm.ppc.altivec.mtvscr
+
+ vec_mtvscr(vp);
+// CHECK: @llvm.ppc.altivec.mtvscr
+// CHECK-LE: @llvm.ppc.altivec.mtvscr
+
+ vec_mtvscr(vi);
+// CHECK: @llvm.ppc.altivec.mtvscr
+// CHECK-LE: @llvm.ppc.altivec.mtvscr
+
+ vec_mtvscr(vui);
+// CHECK: @llvm.ppc.altivec.mtvscr
+// CHECK-LE: @llvm.ppc.altivec.mtvscr
+
+ vec_mtvscr(vbi);
+// CHECK: @llvm.ppc.altivec.mtvscr
+// CHECK-LE: @llvm.ppc.altivec.mtvscr
/* vec_mule */
- res_vs = vec_mule(vsc, vsc); // CHECK: @llvm.ppc.altivec.vmulesb
- res_vus = vec_mule(vuc, vuc); // CHECK: @llvm.ppc.altivec.vmuleub
- res_vi = vec_mule(vs, vs); // CHECK: @llvm.ppc.altivec.vmulesh
- res_vui = vec_mule(vus, vus); // CHECK: @llvm.ppc.altivec.vmuleuh
- res_vs = vec_vmulesb(vsc, vsc); // CHECK: @llvm.ppc.altivec.vmulesb
- res_vus = vec_vmuleub(vuc, vuc); // CHECK: @llvm.ppc.altivec.vmuleub
- res_vi = vec_vmulesh(vs, vs); // CHECK: @llvm.ppc.altivec.vmulesh
- res_vui = vec_vmuleuh(vus, vus); // CHECK: @llvm.ppc.altivec.vmuleuh
+ res_vs = vec_mule(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vmulesb
+// CHECK-LE: @llvm.ppc.altivec.vmulosb
+
+ res_vus = vec_mule(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vmuleub
+// CHECK-LE: @llvm.ppc.altivec.vmuloub
+
+ res_vi = vec_mule(vs, vs);
+// CHECK: @llvm.ppc.altivec.vmulesh
+// CHECK-LE: @llvm.ppc.altivec.vmulosh
+
+ res_vui = vec_mule(vus, vus);
+// CHECK: @llvm.ppc.altivec.vmuleuh
+// CHECK-LE: @llvm.ppc.altivec.vmulouh
+
+ res_vs = vec_vmulesb(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vmulesb
+// CHECK-LE: @llvm.ppc.altivec.vmulosb
+
+ res_vus = vec_vmuleub(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vmuleub
+// CHECK-LE: @llvm.ppc.altivec.vmuloub
+
+ res_vi = vec_vmulesh(vs, vs);
+// CHECK: @llvm.ppc.altivec.vmulesh
+// CHECK-LE: @llvm.ppc.altivec.vmulosh
+
+ res_vui = vec_vmuleuh(vus, vus);
+// CHECK: @llvm.ppc.altivec.vmuleuh
+// CHECK-LE: @llvm.ppc.altivec.vmulouh
/* vec_mulo */
- res_vs = vec_mulo(vsc, vsc); // CHECK: @llvm.ppc.altivec.vmulosb
- res_vus = vec_mulo(vuc, vuc); // CHECK: @llvm.ppc.altivec.vmuloub
- res_vi = vec_mulo(vs, vs); // CHECK: @llvm.ppc.altivec.vmulosh
- res_vui = vec_mulo(vus, vus); // CHECK: @llvm.ppc.altivec.vmulouh
- res_vs = vec_vmulosb(vsc, vsc); // CHECK: @llvm.ppc.altivec.vmulosb
- res_vus = vec_vmuloub(vuc, vuc); // CHECK: @llvm.ppc.altivec.vmuloub
- res_vi = vec_vmulosh(vs, vs); // CHECK: @llvm.ppc.altivec.vmulosh
- res_vui = vec_vmulouh(vus, vus); // CHECK: @llvm.ppc.altivec.vmulouh
+ res_vs = vec_mulo(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vmulosb
+// CHECK-LE: @llvm.ppc.altivec.vmulesb
+
+ res_vus = vec_mulo(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vmuloub
+// CHECK-LE: @llvm.ppc.altivec.vmuleub
+
+ res_vi = vec_mulo(vs, vs);
+// CHECK: @llvm.ppc.altivec.vmulosh
+// CHECK-LE: @llvm.ppc.altivec.vmulesh
+
+ res_vui = vec_mulo(vus, vus);
+// CHECK: @llvm.ppc.altivec.vmulouh
+// CHECK-LE: @llvm.ppc.altivec.vmuleuh
+
+ res_vs = vec_vmulosb(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vmulosb
+// CHECK-LE: @llvm.ppc.altivec.vmulesb
+
+ res_vus = vec_vmuloub(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vmuloub
+// CHECK-LE: @llvm.ppc.altivec.vmuleub
+
+ res_vi = vec_vmulosh(vs, vs);
+// CHECK: @llvm.ppc.altivec.vmulosh
+// CHECK-LE: @llvm.ppc.altivec.vmulesh
+
+ res_vui = vec_vmulouh(vus, vus);
+// CHECK: @llvm.ppc.altivec.vmulouh
+// CHECK-LE: @llvm.ppc.altivec.vmuleuh
/* vec_nmsub */
- res_vf = vec_nmsub(vf, vf, vf); // CHECK: @llvm.ppc.altivec.vnmsubfp
- res_vf = vec_vnmsubfp(vf, vf, vf); // CHECK: @llvm.ppc.altivec.vnmsubfp
+ res_vf = vec_nmsub(vf, vf, vf);
+// CHECK: @llvm.ppc.altivec.vnmsubfp
+// CHECK-LE: @llvm.ppc.altivec.vnmsubfp
+
+ res_vf = vec_vnmsubfp(vf, vf, vf);
+// CHECK: @llvm.ppc.altivec.vnmsubfp
+// CHECK-LE: @llvm.ppc.altivec.vnmsubfp
/* vec_nor */
- res_vsc = vec_nor(vsc, vsc); // CHECK: or <16 x i8>
- // CHECK: xor <16 x i8>
+ res_vsc = vec_nor(vsc, vsc);
+// CHECK: or <16 x i8>
+// CHECK: xor <16 x i8>
+// CHECK-LE: or <16 x i8>
+// CHECK-LE: xor <16 x i8>
+
+ res_vuc = vec_nor(vuc, vuc);
+// CHECK: or <16 x i8>
+// CHECK: xor <16 x i8>
+// CHECK-LE: or <16 x i8>
+// CHECK-LE: xor <16 x i8>
+
+ res_vuc = vec_nor(vbc, vbc);
+// CHECK: or <16 x i8>
+// CHECK: xor <16 x i8>
+// CHECK-LE: or <16 x i8>
+// CHECK-LE: xor <16 x i8>
+
+ res_vs = vec_nor(vs, vs);
+// CHECK: or <8 x i16>
+// CHECK: xor <8 x i16>
+// CHECK-LE: or <8 x i16>
+// CHECK-LE: xor <8 x i16>
+
+ res_vus = vec_nor(vus, vus);
+// CHECK: or <8 x i16>
+// CHECK: xor <8 x i16>
+// CHECK-LE: or <8 x i16>
+// CHECK-LE: xor <8 x i16>
+
+ res_vus = vec_nor(vbs, vbs);
+// CHECK: or <8 x i16>
+// CHECK: xor <8 x i16>
+// CHECK-LE: or <8 x i16>
+// CHECK-LE: xor <8 x i16>
+
+ res_vi = vec_nor(vi, vi);
+// CHECK: or <4 x i32>
+// CHECK: xor <4 x i32>
+// CHECK-LE: or <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vui = vec_nor(vui, vui);
+// CHECK: or <4 x i32>
+// CHECK: xor <4 x i32>
+// CHECK-LE: or <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vui = vec_nor(vbi, vbi);
+// CHECK: or <4 x i32>
+// CHECK: xor <4 x i32>
+// CHECK-LE: or <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vf = vec_nor(vf, vf);
+// CHECK: or <4 x i32>
+// CHECK: xor <4 x i32>
+// CHECK-LE: or <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vsc = vec_vnor(vsc, vsc);
+// CHECK: or <16 x i8>
+// CHECK: xor <16 x i8>
+// CHECK-LE: or <16 x i8>
+// CHECK-LE: xor <16 x i8>
+
+ res_vuc = vec_vnor(vuc, vuc);
+// CHECK: or <16 x i8>
+// CHECK: xor <16 x i8>
+// CHECK-LE: or <16 x i8>
+// CHECK-LE: xor <16 x i8>
+
+ res_vuc = vec_vnor(vbc, vbc);
+// CHECK: or <16 x i8>
+// CHECK: xor <16 x i8>
+// CHECK-LE: or <16 x i8>
+// CHECK-LE: xor <16 x i8>
+
+ res_vs = vec_vnor(vs, vs);
+// CHECK: or <8 x i16>
+// CHECK: xor <8 x i16>
+// CHECK-LE: or <8 x i16>
+// CHECK-LE: xor <8 x i16>
+
+ res_vus = vec_vnor(vus, vus);
+// CHECK: or <8 x i16>
+// CHECK: xor <8 x i16>
+// CHECK-LE: or <8 x i16>
+// CHECK-LE: xor <8 x i16>
+
+ res_vus = vec_vnor(vbs, vbs);
+// CHECK: or <8 x i16>
+// CHECK: xor <8 x i16>
+// CHECK-LE: or <8 x i16>
+// CHECK-LE: xor <8 x i16>
+
+ res_vi = vec_vnor(vi, vi);
+// CHECK: or <4 x i32>
+// CHECK: xor <4 x i32>
+// CHECK-LE: or <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vui = vec_vnor(vui, vui);
+// CHECK: or <4 x i32>
+// CHECK: xor <4 x i32>
+// CHECK-LE: or <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vui = vec_vnor(vbi, vbi);
+// CHECK: or <4 x i32>
+// CHECK: xor <4 x i32>
+// CHECK-LE: or <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vf = vec_vnor(vf, vf);
+// CHECK: or <4 x i32>
+// CHECK: xor <4 x i32>
+// CHECK-LE: or <4 x i32>
+// CHECK-LE: xor <4 x i32>
- res_vuc = vec_nor(vuc, vuc); // CHECK: or <16 x i8>
- // CHECK: xor <16 x i8>
+ /* vec_or */
+ res_vsc = vec_or(vsc, vsc);
+// CHECK: or <16 x i8>
+// CHECK-LE: or <16 x i8>
- res_vuc = vec_nor(vbc, vbc); // CHECK: or <16 x i8>
- // CHECK: xor <16 x i8>
+ res_vsc = vec_or(vbc, vsc);
+// CHECK: or <16 x i8>
+// CHECK-LE: or <16 x i8>
- res_vs = vec_nor(vs, vs); // CHECK: or <8 x i16>
- // CHECK: xor <8 x i16>
+ res_vsc = vec_or(vsc, vbc);
+// CHECK: or <16 x i8>
+// CHECK-LE: or <16 x i8>
- res_vus = vec_nor(vus, vus); // CHECK: or <8 x i16>
- // CHECK: xor <8 x i16>
+ res_vuc = vec_or(vuc, vuc);
+// CHECK: or <16 x i8>
+// CHECK-LE: or <16 x i8>
- res_vus = vec_nor(vbs, vbs); // CHECK: or <8 x i16>
- // CHECK: xor <8 x i16>
+ res_vuc = vec_or(vbc, vuc);
+// CHECK: or <16 x i8>
+// CHECK-LE: or <16 x i8>
- res_vi = vec_nor(vi, vi); // CHECK: or <4 x i32>
- // CHECK: xor <4 x i32>
+ res_vuc = vec_or(vuc, vbc);
+// CHECK: or <16 x i8>
+// CHECK-LE: or <16 x i8>
- res_vui = vec_nor(vui, vui); // CHECK: or <4 x i32>
- // CHECK: xor <4 x i32>
+ res_vbc = vec_or(vbc, vbc);
+// CHECK: or <16 x i8>
+// CHECK-LE: or <16 x i8>
- res_vui = vec_nor(vbi, vbi); // CHECK: or <4 x i32>
- // CHECK: xor <4 x i32>
+ res_vs = vec_or(vs, vs);
+// CHECK: or <8 x i16>
+// CHECK-LE: or <8 x i16>
- res_vf = vec_nor(vf, vf); // CHECK: or <4 x i32>
- // CHECK: xor <4 x i32>
+ res_vs = vec_or(vbs, vs);
+// CHECK: or <8 x i16>
+// CHECK-LE: or <8 x i16>
- res_vsc = vec_vnor(vsc, vsc); // CHECK: or <16 x i8>
- // CHECK: xor <16 x i8>
+ res_vs = vec_or(vs, vbs);
+// CHECK: or <8 x i16>
+// CHECK-LE: or <8 x i16>
- res_vuc = vec_vnor(vuc, vuc); // CHECK: or <16 x i8>
- // CHECK: xor <16 x i8>
+ res_vus = vec_or(vus, vus);
+// CHECK: or <8 x i16>
+// CHECK-LE: or <8 x i16>
- res_vuc = vec_vnor(vbc, vbc); // CHECK: or <16 x i8>
- // CHECK: xor <16 x i8>
+ res_vus = vec_or(vbs, vus);
+// CHECK: or <8 x i16>
+// CHECK-LE: or <8 x i16>
- res_vs = vec_vnor(vs, vs); // CHECK: or <8 x i16>
- // CHECK: xor <8 x i16>
+ res_vus = vec_or(vus, vbs);
+// CHECK: or <8 x i16>
+// CHECK-LE: or <8 x i16>
- res_vus = vec_vnor(vus, vus); // CHECK: or <8 x i16>
- // CHECK: xor <8 x i16>
+ res_vbs = vec_or(vbs, vbs);
+// CHECK: or <8 x i16>
+// CHECK-LE: or <8 x i16>
- res_vus = vec_vnor(vbs, vbs); // CHECK: or <8 x i16>
- // CHECK: xor <8 x i16>
+ res_vi = vec_or(vi, vi);
+// CHECK: or <4 x i32>
+// CHECK-LE: or <4 x i32>
- res_vi = vec_vnor(vi, vi); // CHECK: or <4 x i32>
- // CHECK: xor <4 x i32>
+ res_vi = vec_or(vbi, vi);
+// CHECK: or <4 x i32>
+// CHECK-LE: or <4 x i32>
- res_vui = vec_vnor(vui, vui); // CHECK: or <4 x i32>
- // CHECK: xor <4 x i32>
+ res_vi = vec_or(vi, vbi);
+// CHECK: or <4 x i32>
+// CHECK-LE: or <4 x i32>
- res_vui = vec_vnor(vbi, vbi); // CHECK: or <4 x i32>
- // CHECK: xor <4 x i32>
+ res_vui = vec_or(vui, vui);
+// CHECK: or <4 x i32>
+// CHECK-LE: or <4 x i32>
- res_vf = vec_vnor(vf, vf); // CHECK: or <4 x i32>
- // CHECK: xor <4 x i32>
+ res_vui = vec_or(vbi, vui);
+// CHECK: or <4 x i32>
+// CHECK-LE: or <4 x i32>
- /* vec_or */
- res_vsc = vec_or(vsc, vsc); // CHECK: or <16 x i8>
- res_vsc = vec_or(vbc, vsc); // CHECK: or <16 x i8>
- res_vsc = vec_or(vsc, vbc); // CHECK: or <16 x i8>
- res_vuc = vec_or(vuc, vuc); // CHECK: or <16 x i8>
- res_vuc = vec_or(vbc, vuc); // CHECK: or <16 x i8>
- res_vuc = vec_or(vuc, vbc); // CHECK: or <16 x i8>
- res_vbc = vec_or(vbc, vbc); // CHECK: or <16 x i8>
- res_vs = vec_or(vs, vs); // CHECK: or <8 x i16>
- res_vs = vec_or(vbs, vs); // CHECK: or <8 x i16>
- res_vs = vec_or(vs, vbs); // CHECK: or <8 x i16>
- res_vus = vec_or(vus, vus); // CHECK: or <8 x i16>
- res_vus = vec_or(vbs, vus); // CHECK: or <8 x i16>
- res_vus = vec_or(vus, vbs); // CHECK: or <8 x i16>
- res_vbs = vec_or(vbs, vbs); // CHECK: or <8 x i16>
- res_vi = vec_or(vi, vi); // CHECK: or <4 x i32>
- res_vi = vec_or(vbi, vi); // CHECK: or <4 x i32>
- res_vi = vec_or(vi, vbi); // CHECK: or <4 x i32>
- res_vui = vec_or(vui, vui); // CHECK: or <4 x i32>
- res_vui = vec_or(vbi, vui); // CHECK: or <4 x i32>
- res_vui = vec_or(vui, vbi); // CHECK: or <4 x i32>
- res_vbi = vec_or(vbi, vbi); // CHECK: or <4 x i32>
- res_vf = vec_or(vf, vf); // CHECK: or <4 x i32>
- res_vf = vec_or(vbi, vf); // CHECK: or <4 x i32>
- res_vf = vec_or(vf, vbi); // CHECK: or <4 x i32>
- res_vsc = vec_vor(vsc, vsc); // CHECK: or <16 x i8>
- res_vsc = vec_vor(vbc, vsc); // CHECK: or <16 x i8>
- res_vsc = vec_vor(vsc, vbc); // CHECK: or <16 x i8>
- res_vuc = vec_vor(vuc, vuc); // CHECK: or <16 x i8>
- res_vuc = vec_vor(vbc, vuc); // CHECK: or <16 x i8>
- res_vuc = vec_vor(vuc, vbc); // CHECK: or <16 x i8>
- res_vbc = vec_vor(vbc, vbc); // CHECK: or <16 x i8>
- res_vs = vec_vor(vs, vs); // CHECK: or <8 x i16>
- res_vs = vec_vor(vbs, vs); // CHECK: or <8 x i16>
- res_vs = vec_vor(vs, vbs); // CHECK: or <8 x i16>
- res_vus = vec_vor(vus, vus); // CHECK: or <8 x i16>
- res_vus = vec_vor(vbs, vus); // CHECK: or <8 x i16>
- res_vus = vec_vor(vus, vbs); // CHECK: or <8 x i16>
- res_vbs = vec_vor(vbs, vbs); // CHECK: or <8 x i16>
- res_vi = vec_vor(vi, vi); // CHECK: or <4 x i32>
- res_vi = vec_vor(vbi, vi); // CHECK: or <4 x i32>
- res_vi = vec_vor(vi, vbi); // CHECK: or <4 x i32>
- res_vui = vec_vor(vui, vui); // CHECK: or <4 x i32>
- res_vui = vec_vor(vbi, vui); // CHECK: or <4 x i32>
- res_vui = vec_vor(vui, vbi); // CHECK: or <4 x i32>
- res_vbi = vec_vor(vbi, vbi); // CHECK: or <4 x i32>
- res_vf = vec_vor(vf, vf); // CHECK: or <4 x i32>
- res_vf = vec_vor(vbi, vf); // CHECK: or <4 x i32>
- res_vf = vec_vor(vf, vbi); // CHECK: or <4 x i32>
+ res_vui = vec_or(vui, vbi);
+// CHECK: or <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vbi = vec_or(vbi, vbi);
+// CHECK: or <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vf = vec_or(vf, vf);
+// CHECK: or <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vf = vec_or(vbi, vf);
+// CHECK: or <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vf = vec_or(vf, vbi);
+// CHECK: or <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vsc = vec_vor(vsc, vsc);
+// CHECK: or <16 x i8>
+// CHECK-LE: or <16 x i8>
+
+ res_vsc = vec_vor(vbc, vsc);
+// CHECK: or <16 x i8>
+// CHECK-LE: or <16 x i8>
+
+ res_vsc = vec_vor(vsc, vbc);
+// CHECK: or <16 x i8>
+// CHECK-LE: or <16 x i8>
+
+ res_vuc = vec_vor(vuc, vuc);
+// CHECK: or <16 x i8>
+// CHECK-LE: or <16 x i8>
+
+ res_vuc = vec_vor(vbc, vuc);
+// CHECK: or <16 x i8>
+// CHECK-LE: or <16 x i8>
+
+ res_vuc = vec_vor(vuc, vbc);
+// CHECK: or <16 x i8>
+// CHECK-LE: or <16 x i8>
+
+ res_vbc = vec_vor(vbc, vbc);
+// CHECK: or <16 x i8>
+// CHECK-LE: or <16 x i8>
+
+ res_vs = vec_vor(vs, vs);
+// CHECK: or <8 x i16>
+// CHECK-LE: or <8 x i16>
+
+ res_vs = vec_vor(vbs, vs);
+// CHECK: or <8 x i16>
+// CHECK-LE: or <8 x i16>
+
+ res_vs = vec_vor(vs, vbs);
+// CHECK: or <8 x i16>
+// CHECK-LE: or <8 x i16>
+
+ res_vus = vec_vor(vus, vus);
+// CHECK: or <8 x i16>
+// CHECK-LE: or <8 x i16>
+
+ res_vus = vec_vor(vbs, vus);
+// CHECK: or <8 x i16>
+// CHECK-LE: or <8 x i16>
+
+ res_vus = vec_vor(vus, vbs);
+// CHECK: or <8 x i16>
+// CHECK-LE: or <8 x i16>
+
+ res_vbs = vec_vor(vbs, vbs);
+// CHECK: or <8 x i16>
+// CHECK-LE: or <8 x i16>
+
+ res_vi = vec_vor(vi, vi);
+// CHECK: or <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vi = vec_vor(vbi, vi);
+// CHECK: or <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vi = vec_vor(vi, vbi);
+// CHECK: or <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vui = vec_vor(vui, vui);
+// CHECK: or <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vui = vec_vor(vbi, vui);
+// CHECK: or <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vui = vec_vor(vui, vbi);
+// CHECK: or <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vbi = vec_vor(vbi, vbi);
+// CHECK: or <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vf = vec_vor(vf, vf);
+// CHECK: or <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vf = vec_vor(vbi, vf);
+// CHECK: or <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vf = vec_vor(vf, vbi);
+// CHECK: or <4 x i32>
+// CHECK-LE: or <4 x i32>
/* vec_pack */
- res_vsc = vec_pack(vs, vs); // CHECK: @llvm.ppc.altivec.vperm
- res_vuc = vec_pack(vus, vus); // CHECK: @llvm.ppc.altivec.vperm
- res_vbc = vec_pack(vbs, vbs); // CHECK: @llvm.ppc.altivec.vperm
- res_vs = vec_pack(vi, vi); // CHECK: @llvm.ppc.altivec.vperm
- res_vus = vec_pack(vui, vui); // CHECK: @llvm.ppc.altivec.vperm
- res_vbs = vec_pack(vbi, vbi); // CHECK: @llvm.ppc.altivec.vperm
- res_vsc = vec_vpkuhum(vs, vs); // CHECK: @llvm.ppc.altivec.vperm
- res_vuc = vec_vpkuhum(vus, vus); // CHECK: @llvm.ppc.altivec.vperm
- res_vbc = vec_vpkuhum(vbs, vbs); // CHECK: @llvm.ppc.altivec.vperm
- res_vs = vec_vpkuwum(vi, vi); // CHECK: @llvm.ppc.altivec.vperm
- res_vus = vec_vpkuwum(vui, vui); // CHECK: @llvm.ppc.altivec.vperm
- res_vbs = vec_vpkuwum(vbi, vbi); // CHECK: @llvm.ppc.altivec.vperm
+ res_vsc = vec_pack(vs, vs);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vuc = vec_pack(vus, vus);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbc = vec_pack(vbs, vbs);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vs = vec_pack(vi, vi);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vus = vec_pack(vui, vui);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbs = vec_pack(vbi, vbi);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vsc = vec_vpkuhum(vs, vs);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vuc = vec_vpkuhum(vus, vus);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbc = vec_vpkuhum(vbs, vbs);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vs = vec_vpkuwum(vi, vi);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vus = vec_vpkuwum(vui, vui);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbs = vec_vpkuwum(vbi, vbi);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
/* vec_packpx */
- res_vp = vec_packpx(vui, vui); // CHECK: @llvm.ppc.altivec.vpkpx
- res_vp = vec_vpkpx(vui, vui); // CHECK: @llvm.ppc.altivec.vpkpx
+ res_vp = vec_packpx(vui, vui);
+// CHECK: @llvm.ppc.altivec.vpkpx
+// CHECK-LE: @llvm.ppc.altivec.vpkpx
+
+ res_vp = vec_vpkpx(vui, vui);
+// CHECK: @llvm.ppc.altivec.vpkpx
+// CHECK-LE: @llvm.ppc.altivec.vpkpx
/* vec_packs */
- res_vsc = vec_packs(vs, vs); // CHECK: @llvm.ppc.altivec.vpkshss
- res_vuc = vec_packs(vus, vus); // CHECK: @llvm.ppc.altivec.vpkuhus
- res_vs = vec_packs(vi, vi); // CHECK: @llvm.ppc.altivec.vpkswss
- res_vus = vec_packs(vui, vui); // CHECK: @llvm.ppc.altivec.vpkuwus
- res_vsc = vec_vpkshss(vs, vs); // CHECK: @llvm.ppc.altivec.vpkshss
- res_vuc = vec_vpkuhus(vus, vus); // CHECK: @llvm.ppc.altivec.vpkuhus
- res_vs = vec_vpkswss(vi, vi); // CHECK: @llvm.ppc.altivec.vpkswss
- res_vus = vec_vpkuwus(vui, vui); // CHECK: @llvm.ppc.altivec.vpkuwus
+ res_vsc = vec_packs(vs, vs);
+// CHECK: @llvm.ppc.altivec.vpkshss
+// CHECK-LE: @llvm.ppc.altivec.vpkshss
+
+ res_vuc = vec_packs(vus, vus);
+// CHECK: @llvm.ppc.altivec.vpkuhus
+// CHECK-LE: @llvm.ppc.altivec.vpkuhus
+
+ res_vs = vec_packs(vi, vi);
+// CHECK: @llvm.ppc.altivec.vpkswss
+// CHECK-LE: @llvm.ppc.altivec.vpkswss
+
+ res_vus = vec_packs(vui, vui);
+// CHECK: @llvm.ppc.altivec.vpkuwus
+// CHECK-LE: @llvm.ppc.altivec.vpkuwus
+
+ res_vsc = vec_vpkshss(vs, vs);
+// CHECK: @llvm.ppc.altivec.vpkshss
+// CHECK-LE: @llvm.ppc.altivec.vpkshss
+
+ res_vuc = vec_vpkuhus(vus, vus);
+// CHECK: @llvm.ppc.altivec.vpkuhus
+// CHECK-LE: @llvm.ppc.altivec.vpkuhus
+
+ res_vs = vec_vpkswss(vi, vi);
+// CHECK: @llvm.ppc.altivec.vpkswss
+// CHECK-LE: @llvm.ppc.altivec.vpkswss
+
+ res_vus = vec_vpkuwus(vui, vui);
+// CHECK: @llvm.ppc.altivec.vpkuwus
+// CHECK-LE: @llvm.ppc.altivec.vpkuwus
/* vec_packsu */
- res_vuc = vec_packsu(vs, vs); // CHECK: @llvm.ppc.altivec.vpkshus
- res_vuc = vec_packsu(vus, vus); // CHECK: @llvm.ppc.altivec.vpkuhus
- res_vus = vec_packsu(vi, vi); // CHECK: @llvm.ppc.altivec.vpkswus
- res_vus = vec_packsu(vui, vui); // CHECK: @llvm.ppc.altivec.vpkuwus
- res_vuc = vec_vpkshus(vs, vs); // CHECK: @llvm.ppc.altivec.vpkshus
- res_vuc = vec_vpkshus(vus, vus); // CHECK: @llvm.ppc.altivec.vpkuhus
- res_vus = vec_vpkswus(vi, vi); // CHECK: @llvm.ppc.altivec.vpkswus
- res_vus = vec_vpkswus(vui, vui); // CHECK: @llvm.ppc.altivec.vpkuwus
+ res_vuc = vec_packsu(vs, vs);
+// CHECK: @llvm.ppc.altivec.vpkshus
+// CHECK-LE: @llvm.ppc.altivec.vpkshus
+
+ res_vuc = vec_packsu(vus, vus);
+// CHECK: @llvm.ppc.altivec.vpkuhus
+// CHECK-LE: @llvm.ppc.altivec.vpkuhus
+
+ res_vus = vec_packsu(vi, vi);
+// CHECK: @llvm.ppc.altivec.vpkswus
+// CHECK-LE: @llvm.ppc.altivec.vpkswus
+
+ res_vus = vec_packsu(vui, vui);
+// CHECK: @llvm.ppc.altivec.vpkuwus
+// CHECK-LE: @llvm.ppc.altivec.vpkuwus
+
+ res_vuc = vec_vpkshus(vs, vs);
+// CHECK: @llvm.ppc.altivec.vpkshus
+// CHECK-LE: @llvm.ppc.altivec.vpkshus
+
+ res_vuc = vec_vpkshus(vus, vus);
+// CHECK: @llvm.ppc.altivec.vpkuhus
+// CHECK-LE: @llvm.ppc.altivec.vpkuhus
+
+ res_vus = vec_vpkswus(vi, vi);
+// CHECK: @llvm.ppc.altivec.vpkswus
+// CHECK-LE: @llvm.ppc.altivec.vpkswus
+
+ res_vus = vec_vpkswus(vui, vui);
+// CHECK: @llvm.ppc.altivec.vpkuwus
+// CHECK-LE: @llvm.ppc.altivec.vpkuwus
/* vec_perm */
- res_vsc = vec_perm(vsc, vsc, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vuc = vec_perm(vuc, vuc, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vbc = vec_perm(vbc, vbc, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vs = vec_perm(vs, vs, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vus = vec_perm(vus, vus, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vbs = vec_perm(vbs, vbs, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vp = vec_perm(vp, vp, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vi = vec_perm(vi, vi, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vui = vec_perm(vui, vui, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vbi = vec_perm(vbi, vbi, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vf = vec_perm(vf, vf, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vsc = vec_vperm(vsc, vsc, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vuc = vec_vperm(vuc, vuc, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vbc = vec_vperm(vbc, vbc, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vs = vec_vperm(vs, vs, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vus = vec_vperm(vus, vus, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vbs = vec_vperm(vbs, vbs, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vp = vec_vperm(vp, vp, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vi = vec_vperm(vi, vi, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vui = vec_vperm(vui, vui, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vbi = vec_vperm(vbi, vbi, vuc); // CHECK: @llvm.ppc.altivec.vperm
- res_vf = vec_vperm(vf, vf, vuc); // CHECK: @llvm.ppc.altivec.vperm
+ res_vsc = vec_perm(vsc, vsc, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vuc = vec_perm(vuc, vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbc = vec_perm(vbc, vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vs = vec_perm(vs, vs, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vus = vec_perm(vus, vus, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbs = vec_perm(vbs, vbs, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vp = vec_perm(vp, vp, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vi = vec_perm(vi, vi, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vui = vec_perm(vui, vui, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbi = vec_perm(vbi, vbi, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vf = vec_perm(vf, vf, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vsc = vec_vperm(vsc, vsc, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vuc = vec_vperm(vuc, vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbc = vec_vperm(vbc, vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vs = vec_vperm(vs, vs, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vus = vec_vperm(vus, vus, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbs = vec_vperm(vbs, vbs, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vp = vec_vperm(vp, vp, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vi = vec_vperm(vi, vi, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vui = vec_vperm(vui, vui, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbi = vec_vperm(vbi, vbi, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vf = vec_vperm(vf, vf, vuc);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
/* vec_re */
- res_vf = vec_re(vf); // CHECK: @llvm.ppc.altivec.vrefp
- res_vf = vec_vrefp(vf); // CHECK: @llvm.ppc.altivec.vrefp
+ res_vf = vec_re(vf);
+// CHECK: @llvm.ppc.altivec.vrefp
+// CHECK-LE: @llvm.ppc.altivec.vrefp
+
+ res_vf = vec_vrefp(vf);
+// CHECK: @llvm.ppc.altivec.vrefp
+// CHECK-LE: @llvm.ppc.altivec.vrefp
/* vec_rl */
- res_vsc = vec_rl(vsc, vuc); // CHECK: @llvm.ppc.altivec.vrlb
- res_vuc = vec_rl(vuc, vuc); // CHECK: @llvm.ppc.altivec.vrlb
- res_vs = vec_rl(vs, vus); // CHECK: @llvm.ppc.altivec.vrlh
- res_vus = vec_rl(vus, vus); // CHECK: @llvm.ppc.altivec.vrlh
- res_vi = vec_rl(vi, vui); // CHECK: @llvm.ppc.altivec.vrlw
- res_vui = vec_rl(vui, vui); // CHECK: @llvm.ppc.altivec.vrlw
- res_vsc = vec_vrlb(vsc, vuc); // CHECK: @llvm.ppc.altivec.vrlb
- res_vuc = vec_vrlb(vuc, vuc); // CHECK: @llvm.ppc.altivec.vrlb
- res_vs = vec_vrlh(vs, vus); // CHECK: @llvm.ppc.altivec.vrlh
- res_vus = vec_vrlh(vus, vus); // CHECK: @llvm.ppc.altivec.vrlh
- res_vi = vec_vrlw(vi, vui); // CHECK: @llvm.ppc.altivec.vrlw
- res_vui = vec_vrlw(vui, vui); // CHECK: @llvm.ppc.altivec.vrlw
+ res_vsc = vec_rl(vsc, vuc);
+// CHECK: @llvm.ppc.altivec.vrlb
+// CHECK-LE: @llvm.ppc.altivec.vrlb
+
+ res_vuc = vec_rl(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vrlb
+// CHECK-LE: @llvm.ppc.altivec.vrlb
+
+ res_vs = vec_rl(vs, vus);
+// CHECK: @llvm.ppc.altivec.vrlh
+// CHECK-LE: @llvm.ppc.altivec.vrlh
+
+ res_vus = vec_rl(vus, vus);
+// CHECK: @llvm.ppc.altivec.vrlh
+// CHECK-LE: @llvm.ppc.altivec.vrlh
+
+ res_vi = vec_rl(vi, vui);
+// CHECK: @llvm.ppc.altivec.vrlw
+// CHECK-LE: @llvm.ppc.altivec.vrlw
+
+ res_vui = vec_rl(vui, vui);
+// CHECK: @llvm.ppc.altivec.vrlw
+// CHECK-LE: @llvm.ppc.altivec.vrlw
+
+ res_vsc = vec_vrlb(vsc, vuc);
+// CHECK: @llvm.ppc.altivec.vrlb
+// CHECK-LE: @llvm.ppc.altivec.vrlb
+
+ res_vuc = vec_vrlb(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vrlb
+// CHECK-LE: @llvm.ppc.altivec.vrlb
+
+ res_vs = vec_vrlh(vs, vus);
+// CHECK: @llvm.ppc.altivec.vrlh
+// CHECK-LE: @llvm.ppc.altivec.vrlh
+
+ res_vus = vec_vrlh(vus, vus);
+// CHECK: @llvm.ppc.altivec.vrlh
+// CHECK-LE: @llvm.ppc.altivec.vrlh
+
+ res_vi = vec_vrlw(vi, vui);
+// CHECK: @llvm.ppc.altivec.vrlw
+// CHECK-LE: @llvm.ppc.altivec.vrlw
+
+ res_vui = vec_vrlw(vui, vui);
+// CHECK: @llvm.ppc.altivec.vrlw
+// CHECK-LE: @llvm.ppc.altivec.vrlw
/* vec_round */
- res_vf = vec_round(vf); // CHECK: @llvm.ppc.altivec.vrfin
- res_vf = vec_vrfin(vf); // CHECK: @llvm.ppc.altivec.vrfin
+ res_vf = vec_round(vf);
+// CHECK: @llvm.ppc.altivec.vrfin
+// CHECK-LE: @llvm.ppc.altivec.vrfin
+
+ res_vf = vec_vrfin(vf);
+// CHECK: @llvm.ppc.altivec.vrfin
+// CHECK-LE: @llvm.ppc.altivec.vrfin
/* vec_rsqrte */
- res_vf = vec_rsqrte(vf); // CHECK: @llvm.ppc.altivec.vrsqrtefp
- res_vf = vec_vrsqrtefp(vf); // CHECK: @llvm.ppc.altivec.vrsqrtefp
+ res_vf = vec_rsqrte(vf);
+// CHECK: @llvm.ppc.altivec.vrsqrtefp
+// CHECK-LE: @llvm.ppc.altivec.vrsqrtefp
+
+ res_vf = vec_vrsqrtefp(vf);
+// CHECK: @llvm.ppc.altivec.vrsqrtefp
+// CHECK-LE: @llvm.ppc.altivec.vrsqrtefp
/* vec_sel */
- res_vsc = vec_sel(vsc, vsc, vuc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
- // CHECK: and <16 x i8>
- // CHECK: or <16 x i8>
-
- res_vsc = vec_sel(vsc, vsc, vbc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
- // CHECK: and <16 x i8>
- // CHECK: or <16 x i8>
-
- res_vuc = vec_sel(vuc, vuc, vuc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
- // CHECK: and <16 x i8>
- // CHECK: or <16 x i8>
-
- res_vuc = vec_sel(vuc, vuc, vbc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
- // CHECK: and <16 x i8>
- // CHECK: or <16 x i8>
-
- res_vbc = vec_sel(vbc, vbc, vuc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
- // CHECK: and <16 x i8>
- // CHECK: or <16 x i8>
-
- res_vbc = vec_sel(vbc, vbc, vbc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
- // CHECK: and <16 x i8>
- // CHECK: or <16 x i8>
-
- res_vs = vec_sel(vs, vs, vus); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
- // CHECK: and <8 x i16>
- // CHECK: or <8 x i16>
-
- res_vs = vec_sel(vs, vs, vbs); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
- // CHECK: and <8 x i16>
- // CHECK: or <8 x i16>
-
- res_vus = vec_sel(vus, vus, vus); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
- // CHECK: and <8 x i16>
- // CHECK: or <8 x i16>
-
- res_vus = vec_sel(vus, vus, vbs); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
- // CHECK: and <8 x i16>
- // CHECK: or <8 x i16>
-
- res_vbs = vec_sel(vbs, vbs, vus); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
- // CHECK: and <8 x i16>
- // CHECK: or <8 x i16>
-
- res_vbs = vec_sel(vbs, vbs, vbs); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
- // CHECK: and <8 x i16>
- // CHECK: or <8 x i16>
-
- res_vi = vec_sel(vi, vi, vui); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: or <4 x i32>
-
- res_vi = vec_sel(vi, vi, vbi); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: or <4 x i32>
-
- res_vui = vec_sel(vui, vui, vui); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: or <4 x i32>
-
- res_vui = vec_sel(vui, vui, vbi); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: or <4 x i32>
-
- res_vbi = vec_sel(vbi, vbi, vui); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: or <4 x i32>
-
- res_vbi = vec_sel(vbi, vbi, vbi); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: or <4 x i32>
-
- res_vf = vec_sel(vf, vf, vui); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: or <4 x i32>
-
- res_vf = vec_sel(vf, vf, vbi); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: or <4 x i32>
-
- res_vsc = vec_vsel(vsc, vsc, vuc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
- // CHECK: and <16 x i8>
- // CHECK: or <16 x i8>
-
- res_vsc = vec_vsel(vsc, vsc, vbc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
- // CHECK: and <16 x i8>
- // CHECK: or <16 x i8>
-
- res_vuc = vec_vsel(vuc, vuc, vuc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
- // CHECK: and <16 x i8>
- // CHECK: or <16 x i8>
-
- res_vuc = vec_vsel(vuc, vuc, vbc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
- // CHECK: and <16 x i8>
- // CHECK: or <16 x i8>
-
- res_vbc = vec_vsel(vbc, vbc, vuc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
- // CHECK: and <16 x i8>
- // CHECK: or <16 x i8>
-
- res_vbc = vec_vsel(vbc, vbc, vbc); // CHECK: xor <16 x i8>
- // CHECK: and <16 x i8>
- // CHECK: and <16 x i8>
- // CHECK: or <16 x i8>
-
- res_vs = vec_vsel(vs, vs, vus); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
- // CHECK: and <8 x i16>
- // CHECK: or <8 x i16>
-
- res_vs = vec_vsel(vs, vs, vbs); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
- // CHECK: and <8 x i16>
- // CHECK: or <8 x i16>
-
- res_vus = vec_vsel(vus, vus, vus); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
- // CHECK: and <8 x i16>
- // CHECK: or <8 x i16>
-
- res_vus = vec_vsel(vus, vus, vbs); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
- // CHECK: and <8 x i16>
- // CHECK: or <8 x i16>
-
- res_vbs = vec_vsel(vbs, vbs, vus); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
- // CHECK: and <8 x i16>
- // CHECK: or <8 x i16>
-
- res_vbs = vec_vsel(vbs, vbs, vbs); // CHECK: xor <8 x i16>
- // CHECK: and <8 x i16>
- // CHECK: and <8 x i16>
- // CHECK: or <8 x i16>
-
- res_vi = vec_vsel(vi, vi, vui); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: or <4 x i32>
-
- res_vi = vec_vsel(vi, vi, vbi); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: or <4 x i32>
-
- res_vui = vec_vsel(vui, vui, vui); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: or <4 x i32>
-
- res_vui = vec_vsel(vui, vui, vbi); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: or <4 x i32>
-
- res_vbi = vec_vsel(vbi, vbi, vui); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: or <4 x i32>
-
- res_vbi = vec_vsel(vbi, vbi, vbi); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: or <4 x i32>
-
- res_vf = vec_vsel(vf, vf, vui); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: or <4 x i32>
-
- res_vf = vec_vsel(vf, vf, vbi); // CHECK: xor <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: and <4 x i32>
- // CHECK: or <4 x i32>
+ res_vsc = vec_sel(vsc, vsc, vuc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK: or <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+// CHECK-LE: and <16 x i8>
+// CHECK-LE: or <16 x i8>
+
+ res_vsc = vec_sel(vsc, vsc, vbc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK: or <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+// CHECK-LE: and <16 x i8>
+// CHECK-LE: or <16 x i8>
+
+ res_vuc = vec_sel(vuc, vuc, vuc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK: or <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+// CHECK-LE: and <16 x i8>
+// CHECK-LE: or <16 x i8>
+
+ res_vuc = vec_sel(vuc, vuc, vbc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK: or <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+// CHECK-LE: and <16 x i8>
+// CHECK-LE: or <16 x i8>
+
+ res_vbc = vec_sel(vbc, vbc, vuc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK: or <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+// CHECK-LE: and <16 x i8>
+// CHECK-LE: or <16 x i8>
+
+ res_vbc = vec_sel(vbc, vbc, vbc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK: or <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+// CHECK-LE: and <16 x i8>
+// CHECK-LE: or <16 x i8>
+
+ res_vs = vec_sel(vs, vs, vus);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK: or <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+// CHECK-LE: and <8 x i16>
+// CHECK-LE: or <8 x i16>
+
+ res_vs = vec_sel(vs, vs, vbs);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK: or <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+// CHECK-LE: and <8 x i16>
+// CHECK-LE: or <8 x i16>
+
+ res_vus = vec_sel(vus, vus, vus);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK: or <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+// CHECK-LE: and <8 x i16>
+// CHECK-LE: or <8 x i16>
+
+ res_vus = vec_sel(vus, vus, vbs);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK: or <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+// CHECK-LE: and <8 x i16>
+// CHECK-LE: or <8 x i16>
+
+ res_vbs = vec_sel(vbs, vbs, vus);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK: or <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+// CHECK-LE: and <8 x i16>
+// CHECK-LE: or <8 x i16>
+
+ res_vbs = vec_sel(vbs, vbs, vbs);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK: or <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+// CHECK-LE: and <8 x i16>
+// CHECK-LE: or <8 x i16>
+
+ res_vi = vec_sel(vi, vi, vui);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: or <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vi = vec_sel(vi, vi, vbi);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: or <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vui = vec_sel(vui, vui, vui);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: or <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vui = vec_sel(vui, vui, vbi);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: or <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vbi = vec_sel(vbi, vbi, vui);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: or <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vbi = vec_sel(vbi, vbi, vbi);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: or <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vf = vec_sel(vf, vf, vui);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: or <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vf = vec_sel(vf, vf, vbi);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: or <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vsc = vec_vsel(vsc, vsc, vuc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK: or <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+// CHECK-LE: and <16 x i8>
+// CHECK-LE: or <16 x i8>
+
+ res_vsc = vec_vsel(vsc, vsc, vbc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK: or <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+// CHECK-LE: and <16 x i8>
+// CHECK-LE: or <16 x i8>
+
+ res_vuc = vec_vsel(vuc, vuc, vuc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK: or <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+// CHECK-LE: and <16 x i8>
+// CHECK-LE: or <16 x i8>
+
+ res_vuc = vec_vsel(vuc, vuc, vbc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK: or <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+// CHECK-LE: and <16 x i8>
+// CHECK-LE: or <16 x i8>
+
+ res_vbc = vec_vsel(vbc, vbc, vuc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK: or <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+// CHECK-LE: and <16 x i8>
+// CHECK-LE: or <16 x i8>
+
+ res_vbc = vec_vsel(vbc, vbc, vbc);
+// CHECK: xor <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK: and <16 x i8>
+// CHECK: or <16 x i8>
+// CHECK-LE: xor <16 x i8>
+// CHECK-LE: and <16 x i8>
+// CHECK-LE: and <16 x i8>
+// CHECK-LE: or <16 x i8>
+
+ res_vs = vec_vsel(vs, vs, vus);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK: or <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+// CHECK-LE: and <8 x i16>
+// CHECK-LE: or <8 x i16>
+
+ res_vs = vec_vsel(vs, vs, vbs);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK: or <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+// CHECK-LE: and <8 x i16>
+// CHECK-LE: or <8 x i16>
+
+ res_vus = vec_vsel(vus, vus, vus);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK: or <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+// CHECK-LE: and <8 x i16>
+// CHECK-LE: or <8 x i16>
+
+ res_vus = vec_vsel(vus, vus, vbs);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK: or <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+// CHECK-LE: and <8 x i16>
+// CHECK-LE: or <8 x i16>
+
+ res_vbs = vec_vsel(vbs, vbs, vus);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK: or <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+// CHECK-LE: and <8 x i16>
+// CHECK-LE: or <8 x i16>
+
+ res_vbs = vec_vsel(vbs, vbs, vbs);
+// CHECK: xor <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK: and <8 x i16>
+// CHECK: or <8 x i16>
+// CHECK-LE: xor <8 x i16>
+// CHECK-LE: and <8 x i16>
+// CHECK-LE: and <8 x i16>
+// CHECK-LE: or <8 x i16>
+
+ res_vi = vec_vsel(vi, vi, vui);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: or <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vi = vec_vsel(vi, vi, vbi);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: or <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vui = vec_vsel(vui, vui, vui);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: or <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vui = vec_vsel(vui, vui, vbi);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: or <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vbi = vec_vsel(vbi, vbi, vui);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: or <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vbi = vec_vsel(vbi, vbi, vbi);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: or <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vf = vec_vsel(vf, vf, vui);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: or <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: or <4 x i32>
+
+ res_vf = vec_vsel(vf, vf, vbi);
+// CHECK: xor <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: and <4 x i32>
+// CHECK: or <4 x i32>
+// CHECK-LE: xor <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: and <4 x i32>
+// CHECK-LE: or <4 x i32>
/* vec_sl */
- res_vsc = vec_sl(vsc, vuc); // CHECK: shl <16 x i8>
- res_vuc = vec_sl(vuc, vuc); // CHECK: shl <16 x i8>
- res_vs = vec_sl(vs, vus); // CHECK: shl <8 x i16>
- res_vus = vec_sl(vus, vus); // CHECK: shl <8 x i16>
- res_vi = vec_sl(vi, vui); // CHECK: shl <4 x i32>
- res_vui = vec_sl(vui, vui); // CHECK: shl <4 x i32>
- res_vsc = vec_vslb(vsc, vuc); // CHECK: shl <16 x i8>
- res_vuc = vec_vslb(vuc, vuc); // CHECK: shl <16 x i8>
- res_vs = vec_vslh(vs, vus); // CHECK: shl <8 x i16>
- res_vus = vec_vslh(vus, vus); // CHECK: shl <8 x i16>
- res_vi = vec_vslw(vi, vui); // CHECK: shl <4 x i32>
- res_vui = vec_vslw(vui, vui); // CHECK: shl <4 x i32>
+ res_vsc = vec_sl(vsc, vuc);
+// CHECK: shl <16 x i8>
+// CHECK-LE: shl <16 x i8>
+
+ res_vuc = vec_sl(vuc, vuc);
+// CHECK: shl <16 x i8>
+// CHECK-LE: shl <16 x i8>
+
+ res_vs = vec_sl(vs, vus);
+// CHECK: shl <8 x i16>
+// CHECK-LE: shl <8 x i16>
+
+ res_vus = vec_sl(vus, vus);
+// CHECK: shl <8 x i16>
+// CHECK-LE: shl <8 x i16>
+
+ res_vi = vec_sl(vi, vui);
+// CHECK: shl <4 x i32>
+// CHECK-LE: shl <4 x i32>
+
+ res_vui = vec_sl(vui, vui);
+// CHECK: shl <4 x i32>
+// CHECK-LE: shl <4 x i32>
+
+ res_vsc = vec_vslb(vsc, vuc);
+// CHECK: shl <16 x i8>
+// CHECK-LE: shl <16 x i8>
+
+ res_vuc = vec_vslb(vuc, vuc);
+// CHECK: shl <16 x i8>
+// CHECK-LE: shl <16 x i8>
+
+ res_vs = vec_vslh(vs, vus);
+// CHECK: shl <8 x i16>
+// CHECK-LE: shl <8 x i16>
+
+ res_vus = vec_vslh(vus, vus);
+// CHECK: shl <8 x i16>
+// CHECK-LE: shl <8 x i16>
+
+ res_vi = vec_vslw(vi, vui);
+// CHECK: shl <4 x i32>
+// CHECK-LE: shl <4 x i32>
+
+ res_vui = vec_vslw(vui, vui);
+// CHECK: shl <4 x i32>
+// CHECK-LE: shl <4 x i32>
/* vec_sld */
- res_vsc = vec_sld(vsc, vsc, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vuc = vec_sld(vuc, vuc, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vs = vec_sld(vs, vs, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vus = vec_sld(vus, vus, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vp = vec_sld(vp, vp, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vi = vec_sld(vi, vi, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vui = vec_sld(vui, vui, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vf = vec_sld(vf, vf, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vsc = vec_vsldoi(vsc, vsc, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vuc = vec_vsldoi(vuc, vuc, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vs = vec_vsldoi(vs, vs, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vus = vec_vsldoi(vus, vus, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vp = vec_vsldoi(vp, vp, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vi = vec_vsldoi(vi, vi, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vui = vec_vsldoi(vui, vui, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vf = vec_vsldoi(vf, vf, 0); // CHECK: @llvm.ppc.altivec.vperm
+ res_vsc = vec_sld(vsc, vsc, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vuc = vec_sld(vuc, vuc, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vs = vec_sld(vs, vs, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vus = vec_sld(vus, vus, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vp = vec_sld(vp, vp, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vi = vec_sld(vi, vi, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vui = vec_sld(vui, vui, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vf = vec_sld(vf, vf, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vsc = vec_vsldoi(vsc, vsc, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vuc = vec_vsldoi(vuc, vuc, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vs = vec_vsldoi(vs, vs, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vus = vec_vsldoi(vus, vus, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vp = vec_vsldoi(vp, vp, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vi = vec_vsldoi(vi, vi, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vui = vec_vsldoi(vui, vui, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vf = vec_vsldoi(vf, vf, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
/* vec_sll */
- res_vsc = vec_sll(vsc, vuc); // CHECK: @llvm.ppc.altivec.vsl
- res_vsc = vec_sll(vsc, vus); // CHECK: @llvm.ppc.altivec.vsl
- res_vsc = vec_sll(vsc, vui); // CHECK: @llvm.ppc.altivec.vsl
- res_vuc = vec_sll(vuc, vuc); // CHECK: @llvm.ppc.altivec.vsl
- res_vuc = vec_sll(vuc, vus); // CHECK: @llvm.ppc.altivec.vsl
- res_vuc = vec_sll(vuc, vui); // CHECK: @llvm.ppc.altivec.vsl
- res_vbc = vec_sll(vbc, vuc); // CHECK: @llvm.ppc.altivec.vsl
- res_vbc = vec_sll(vbc, vus); // CHECK: @llvm.ppc.altivec.vsl
- res_vbc = vec_sll(vbc, vui); // CHECK: @llvm.ppc.altivec.vsl
- res_vs = vec_sll(vs, vuc); // CHECK: @llvm.ppc.altivec.vsl
- res_vs = vec_sll(vs, vus); // CHECK: @llvm.ppc.altivec.vsl
- res_vs = vec_sll(vs, vui); // CHECK: @llvm.ppc.altivec.vsl
- res_vus = vec_sll(vus, vuc); // CHECK: @llvm.ppc.altivec.vsl
- res_vus = vec_sll(vus, vus); // CHECK: @llvm.ppc.altivec.vsl
- res_vus = vec_sll(vus, vui); // CHECK: @llvm.ppc.altivec.vsl
- res_vbs = vec_sll(vbs, vuc); // CHECK: @llvm.ppc.altivec.vsl
- res_vbs = vec_sll(vbs, vus); // CHECK: @llvm.ppc.altivec.vsl
- res_vbs = vec_sll(vbs, vui); // CHECK: @llvm.ppc.altivec.vsl
- res_vp = vec_sll(vp, vuc); // CHECK: @llvm.ppc.altivec.vsl
- res_vp = vec_sll(vp, vus); // CHECK: @llvm.ppc.altivec.vsl
- res_vp = vec_sll(vp, vui); // CHECK: @llvm.ppc.altivec.vsl
- res_vi = vec_sll(vi, vuc); // CHECK: @llvm.ppc.altivec.vsl
- res_vi = vec_sll(vi, vus); // CHECK: @llvm.ppc.altivec.vsl
- res_vi = vec_sll(vi, vui); // CHECK: @llvm.ppc.altivec.vsl
- res_vui = vec_sll(vui, vuc); // CHECK: @llvm.ppc.altivec.vsl
- res_vui = vec_sll(vui, vus); // CHECK: @llvm.ppc.altivec.vsl
- res_vui = vec_sll(vui, vui); // CHECK: @llvm.ppc.altivec.vsl
- res_vbi = vec_sll(vbi, vuc); // CHECK: @llvm.ppc.altivec.vsl
- res_vbi = vec_sll(vbi, vus); // CHECK: @llvm.ppc.altivec.vsl
- res_vbi = vec_sll(vbi, vui); // CHECK: @llvm.ppc.altivec.vsl
- res_vsc = vec_vsl(vsc, vuc); // CHECK: @llvm.ppc.altivec.vsl
- res_vsc = vec_vsl(vsc, vus); // CHECK: @llvm.ppc.altivec.vsl
- res_vsc = vec_vsl(vsc, vui); // CHECK: @llvm.ppc.altivec.vsl
- res_vuc = vec_vsl(vuc, vuc); // CHECK: @llvm.ppc.altivec.vsl
- res_vuc = vec_vsl(vuc, vus); // CHECK: @llvm.ppc.altivec.vsl
- res_vuc = vec_vsl(vuc, vui); // CHECK: @llvm.ppc.altivec.vsl
- res_vbc = vec_vsl(vbc, vuc); // CHECK: @llvm.ppc.altivec.vsl
- res_vbc = vec_vsl(vbc, vus); // CHECK: @llvm.ppc.altivec.vsl
- res_vbc = vec_vsl(vbc, vui); // CHECK: @llvm.ppc.altivec.vsl
- res_vs = vec_vsl(vs, vuc); // CHECK: @llvm.ppc.altivec.vsl
- res_vs = vec_vsl(vs, vus); // CHECK: @llvm.ppc.altivec.vsl
- res_vs = vec_vsl(vs, vui); // CHECK: @llvm.ppc.altivec.vsl
- res_vus = vec_vsl(vus, vuc); // CHECK: @llvm.ppc.altivec.vsl
- res_vus = vec_vsl(vus, vus); // CHECK: @llvm.ppc.altivec.vsl
- res_vus = vec_vsl(vus, vui); // CHECK: @llvm.ppc.altivec.vsl
- res_vbs = vec_vsl(vbs, vuc); // CHECK: @llvm.ppc.altivec.vsl
- res_vbs = vec_vsl(vbs, vus); // CHECK: @llvm.ppc.altivec.vsl
- res_vbs = vec_vsl(vbs, vui); // CHECK: @llvm.ppc.altivec.vsl
- res_vp = vec_vsl(vp, vuc); // CHECK: @llvm.ppc.altivec.vsl
- res_vp = vec_vsl(vp, vus); // CHECK: @llvm.ppc.altivec.vsl
- res_vp = vec_vsl(vp, vui); // CHECK: @llvm.ppc.altivec.vsl
- res_vi = vec_vsl(vi, vuc); // CHECK: @llvm.ppc.altivec.vsl
- res_vi = vec_vsl(vi, vus); // CHECK: @llvm.ppc.altivec.vsl
- res_vi = vec_vsl(vi, vui); // CHECK: @llvm.ppc.altivec.vsl
- res_vui = vec_vsl(vui, vuc); // CHECK: @llvm.ppc.altivec.vsl
- res_vui = vec_vsl(vui, vus); // CHECK: @llvm.ppc.altivec.vsl
- res_vui = vec_vsl(vui, vui); // CHECK: @llvm.ppc.altivec.vsl
- res_vbi = vec_vsl(vbi, vuc); // CHECK: @llvm.ppc.altivec.vsl
- res_vbi = vec_vsl(vbi, vus); // CHECK: @llvm.ppc.altivec.vsl
- res_vbi = vec_vsl(vbi, vui); // CHECK: @llvm.ppc.altivec.vsl
+ res_vsc = vec_sll(vsc, vuc);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vsc = vec_sll(vsc, vus);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vsc = vec_sll(vsc, vui);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vuc = vec_sll(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vuc = vec_sll(vuc, vus);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vuc = vec_sll(vuc, vui);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vbc = vec_sll(vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vbc = vec_sll(vbc, vus);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vbc = vec_sll(vbc, vui);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vs = vec_sll(vs, vuc);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vs = vec_sll(vs, vus);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vs = vec_sll(vs, vui);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vus = vec_sll(vus, vuc);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vus = vec_sll(vus, vus);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vus = vec_sll(vus, vui);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vbs = vec_sll(vbs, vuc);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vbs = vec_sll(vbs, vus);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vbs = vec_sll(vbs, vui);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vp = vec_sll(vp, vuc);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vp = vec_sll(vp, vus);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vp = vec_sll(vp, vui);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vi = vec_sll(vi, vuc);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vi = vec_sll(vi, vus);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vi = vec_sll(vi, vui);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vui = vec_sll(vui, vuc);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vui = vec_sll(vui, vus);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vui = vec_sll(vui, vui);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vbi = vec_sll(vbi, vuc);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vbi = vec_sll(vbi, vus);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vbi = vec_sll(vbi, vui);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vsc = vec_vsl(vsc, vuc);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vsc = vec_vsl(vsc, vus);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vsc = vec_vsl(vsc, vui);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vuc = vec_vsl(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vuc = vec_vsl(vuc, vus);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vuc = vec_vsl(vuc, vui);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vbc = vec_vsl(vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vbc = vec_vsl(vbc, vus);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vbc = vec_vsl(vbc, vui);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vs = vec_vsl(vs, vuc);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vs = vec_vsl(vs, vus);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vs = vec_vsl(vs, vui);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vus = vec_vsl(vus, vuc);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vus = vec_vsl(vus, vus);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vus = vec_vsl(vus, vui);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vbs = vec_vsl(vbs, vuc);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vbs = vec_vsl(vbs, vus);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vbs = vec_vsl(vbs, vui);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vp = vec_vsl(vp, vuc);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vp = vec_vsl(vp, vus);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vp = vec_vsl(vp, vui);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vi = vec_vsl(vi, vuc);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vi = vec_vsl(vi, vus);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vi = vec_vsl(vi, vui);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vui = vec_vsl(vui, vuc);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vui = vec_vsl(vui, vus);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vui = vec_vsl(vui, vui);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vbi = vec_vsl(vbi, vuc);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vbi = vec_vsl(vbi, vus);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
+
+ res_vbi = vec_vsl(vbi, vui);
+// CHECK: @llvm.ppc.altivec.vsl
+// CHECK-LE: @llvm.ppc.altivec.vsl
/* vec_slo */
- res_vsc = vec_slo(vsc, vsc); // CHECK: @llvm.ppc.altivec.vslo
- res_vsc = vec_slo(vsc, vuc); // CHECK: @llvm.ppc.altivec.vslo
- res_vuc = vec_slo(vuc, vsc); // CHECK: @llvm.ppc.altivec.vslo
- res_vuc = vec_slo(vuc, vuc); // CHECK: @llvm.ppc.altivec.vslo
- res_vs = vec_slo(vs, vsc); // CHECK: @llvm.ppc.altivec.vslo
- res_vs = vec_slo(vs, vuc); // CHECK: @llvm.ppc.altivec.vslo
- res_vus = vec_slo(vus, vsc); // CHECK: @llvm.ppc.altivec.vslo
- res_vus = vec_slo(vus, vuc); // CHECK: @llvm.ppc.altivec.vslo
- res_vp = vec_slo(vp, vsc); // CHECK: @llvm.ppc.altivec.vslo
- res_vp = vec_slo(vp, vuc); // CHECK: @llvm.ppc.altivec.vslo
- res_vi = vec_slo(vi, vsc); // CHECK: @llvm.ppc.altivec.vslo
- res_vi = vec_slo(vi, vuc); // CHECK: @llvm.ppc.altivec.vslo
- res_vui = vec_slo(vui, vsc); // CHECK: @llvm.ppc.altivec.vslo
- res_vui = vec_slo(vui, vuc); // CHECK: @llvm.ppc.altivec.vslo
- res_vf = vec_slo(vf, vsc); // CHECK: @llvm.ppc.altivec.vslo
- res_vf = vec_slo(vf, vuc); // CHECK: @llvm.ppc.altivec.vslo
- res_vsc = vec_vslo(vsc, vsc); // CHECK: @llvm.ppc.altivec.vslo
- res_vsc = vec_vslo(vsc, vuc); // CHECK: @llvm.ppc.altivec.vslo
- res_vuc = vec_vslo(vuc, vsc); // CHECK: @llvm.ppc.altivec.vslo
- res_vuc = vec_vslo(vuc, vuc); // CHECK: @llvm.ppc.altivec.vslo
- res_vs = vec_vslo(vs, vsc); // CHECK: @llvm.ppc.altivec.vslo
- res_vs = vec_vslo(vs, vuc); // CHECK: @llvm.ppc.altivec.vslo
- res_vus = vec_vslo(vus, vsc); // CHECK: @llvm.ppc.altivec.vslo
- res_vus = vec_vslo(vus, vuc); // CHECK: @llvm.ppc.altivec.vslo
- res_vp = vec_vslo(vp, vsc); // CHECK: @llvm.ppc.altivec.vslo
- res_vp = vec_vslo(vp, vuc); // CHECK: @llvm.ppc.altivec.vslo
- res_vi = vec_vslo(vi, vsc); // CHECK: @llvm.ppc.altivec.vslo
- res_vi = vec_vslo(vi, vuc); // CHECK: @llvm.ppc.altivec.vslo
- res_vui = vec_vslo(vui, vsc); // CHECK: @llvm.ppc.altivec.vslo
- res_vui = vec_vslo(vui, vuc); // CHECK: @llvm.ppc.altivec.vslo
- res_vf = vec_vslo(vf, vsc); // CHECK: @llvm.ppc.altivec.vslo
- res_vf = vec_vslo(vf, vuc); // CHECK: @llvm.ppc.altivec.vslo
+ res_vsc = vec_slo(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vsc = vec_slo(vsc, vuc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vuc = vec_slo(vuc, vsc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vuc = vec_slo(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vs = vec_slo(vs, vsc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vs = vec_slo(vs, vuc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vus = vec_slo(vus, vsc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vus = vec_slo(vus, vuc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vp = vec_slo(vp, vsc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vp = vec_slo(vp, vuc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vi = vec_slo(vi, vsc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vi = vec_slo(vi, vuc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vui = vec_slo(vui, vsc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vui = vec_slo(vui, vuc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vf = vec_slo(vf, vsc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vf = vec_slo(vf, vuc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vsc = vec_vslo(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vsc = vec_vslo(vsc, vuc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vuc = vec_vslo(vuc, vsc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vuc = vec_vslo(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vs = vec_vslo(vs, vsc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vs = vec_vslo(vs, vuc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vus = vec_vslo(vus, vsc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vus = vec_vslo(vus, vuc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vp = vec_vslo(vp, vsc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vp = vec_vslo(vp, vuc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vi = vec_vslo(vi, vsc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vi = vec_vslo(vi, vuc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vui = vec_vslo(vui, vsc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vui = vec_vslo(vui, vuc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vf = vec_vslo(vf, vsc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
+
+ res_vf = vec_vslo(vf, vuc);
+// CHECK: @llvm.ppc.altivec.vslo
+// CHECK-LE: @llvm.ppc.altivec.vslo
/* vec_splat */
- res_vsc = vec_splat(vsc, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vuc = vec_splat(vuc, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vbc = vec_splat(vbc, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vs = vec_splat(vs, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vus = vec_splat(vus, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vbs = vec_splat(vbs, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vp = vec_splat(vp, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vi = vec_splat(vi, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vui = vec_splat(vui, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vbi = vec_splat(vbi, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vf = vec_splat(vf, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vsc = vec_vspltb(vsc, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vuc = vec_vspltb(vuc, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vbc = vec_vspltb(vbc, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vs = vec_vsplth(vs, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vus = vec_vsplth(vus, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vbs = vec_vsplth(vbs, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vp = vec_vsplth(vp, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vi = vec_vspltw(vi, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vui = vec_vspltw(vui, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vbi = vec_vspltw(vbi, 0); // CHECK: @llvm.ppc.altivec.vperm
- res_vf = vec_vspltw(vf, 0); // CHECK: @llvm.ppc.altivec.vperm
+ res_vsc = vec_splat(vsc, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vuc = vec_splat(vuc, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbc = vec_splat(vbc, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vs = vec_splat(vs, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vus = vec_splat(vus, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbs = vec_splat(vbs, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vp = vec_splat(vp, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vi = vec_splat(vi, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vui = vec_splat(vui, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbi = vec_splat(vbi, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vf = vec_splat(vf, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vsc = vec_vspltb(vsc, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vuc = vec_vspltb(vuc, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbc = vec_vspltb(vbc, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vs = vec_vsplth(vs, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vus = vec_vsplth(vus, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbs = vec_vsplth(vbs, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vp = vec_vsplth(vp, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vi = vec_vspltw(vi, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vui = vec_vspltw(vui, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbi = vec_vspltw(vbi, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vf = vec_vspltw(vf, 0);
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vperm
/* vec_splat_s8 */
res_vsc = vec_splat_s8(0x09); // TODO: add check
@@ -1329,1729 +3801,4715 @@ void test6() {
res_vui = vec_splat_u32(0x09); // TODO: add check
/* vec_sr */
- res_vsc = vec_sr(vsc, vuc); // CHECK: shr <16 x i8>
- res_vuc = vec_sr(vuc, vuc); // CHECK: shr <16 x i8>
- res_vs = vec_sr(vs, vus); // CHECK: shr <8 x i16>
- res_vus = vec_sr(vus, vus); // CHECK: shr <8 x i16>
- res_vi = vec_sr(vi, vui); // CHECK: shr <4 x i32>
- res_vui = vec_sr(vui, vui); // CHECK: shr <4 x i32>
- res_vsc = vec_vsrb(vsc, vuc); // CHECK: shr <16 x i8>
- res_vuc = vec_vsrb(vuc, vuc); // CHECK: shr <16 x i8>
- res_vs = vec_vsrh(vs, vus); // CHECK: shr <8 x i16>
- res_vus = vec_vsrh(vus, vus); // CHECK: shr <8 x i16>
- res_vi = vec_vsrw(vi, vui); // CHECK: shr <4 x i32>
- res_vui = vec_vsrw(vui, vui); // CHECK: shr <4 x i32>
+ res_vsc = vec_sr(vsc, vuc);
+// CHECK: shr <16 x i8>
+// CHECK-LE: shr <16 x i8>
+
+ res_vuc = vec_sr(vuc, vuc);
+// CHECK: shr <16 x i8>
+// CHECK-LE: shr <16 x i8>
+
+ res_vs = vec_sr(vs, vus);
+// CHECK: shr <8 x i16>
+// CHECK-LE: shr <8 x i16>
+
+ res_vus = vec_sr(vus, vus);
+// CHECK: shr <8 x i16>
+// CHECK-LE: shr <8 x i16>
+
+ res_vi = vec_sr(vi, vui);
+// CHECK: shr <4 x i32>
+// CHECK-LE: shr <4 x i32>
+
+ res_vui = vec_sr(vui, vui);
+// CHECK: shr <4 x i32>
+// CHECK-LE: shr <4 x i32>
+
+ res_vsc = vec_vsrb(vsc, vuc);
+// CHECK: shr <16 x i8>
+// CHECK-LE: shr <16 x i8>
+
+ res_vuc = vec_vsrb(vuc, vuc);
+// CHECK: shr <16 x i8>
+// CHECK-LE: shr <16 x i8>
+
+ res_vs = vec_vsrh(vs, vus);
+// CHECK: shr <8 x i16>
+// CHECK-LE: shr <8 x i16>
+
+ res_vus = vec_vsrh(vus, vus);
+// CHECK: shr <8 x i16>
+// CHECK-LE: shr <8 x i16>
+
+ res_vi = vec_vsrw(vi, vui);
+// CHECK: shr <4 x i32>
+// CHECK-LE: shr <4 x i32>
+
+ res_vui = vec_vsrw(vui, vui);
+// CHECK: shr <4 x i32>
+// CHECK-LE: shr <4 x i32>
/* vec_sra */
- res_vsc = vec_sra(vsc, vuc); // CHECK: @llvm.ppc.altivec.vsrab
- res_vuc = vec_sra(vuc, vuc); // CHECK: @llvm.ppc.altivec.vsrab
- res_vs = vec_sra(vs, vus); // CHECK: @llvm.ppc.altivec.vsrah
- res_vus = vec_sra(vus, vus); // CHECK: @llvm.ppc.altivec.vsrah
- res_vi = vec_sra(vi, vui); // CHECK: @llvm.ppc.altivec.vsraw
- res_vui = vec_sra(vui, vui); // CHECK: @llvm.ppc.altivec.vsraw
- res_vsc = vec_vsrab(vsc, vuc); // CHECK: @llvm.ppc.altivec.vsrab
- res_vuc = vec_vsrab(vuc, vuc); // CHECK: @llvm.ppc.altivec.vsrab
- res_vs = vec_vsrah(vs, vus); // CHECK: @llvm.ppc.altivec.vsrah
- res_vus = vec_vsrah(vus, vus); // CHECK: @llvm.ppc.altivec.vsrah
- res_vi = vec_vsraw(vi, vui); // CHECK: @llvm.ppc.altivec.vsraw
- res_vui = vec_vsraw(vui, vui); // CHECK: @llvm.ppc.altivec.vsraw
+ res_vsc = vec_sra(vsc, vuc);
+// CHECK: @llvm.ppc.altivec.vsrab
+// CHECK-LE: @llvm.ppc.altivec.vsrab
+
+ res_vuc = vec_sra(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vsrab
+// CHECK-LE: @llvm.ppc.altivec.vsrab
+
+ res_vs = vec_sra(vs, vus);
+// CHECK: @llvm.ppc.altivec.vsrah
+// CHECK-LE: @llvm.ppc.altivec.vsrah
+
+ res_vus = vec_sra(vus, vus);
+// CHECK: @llvm.ppc.altivec.vsrah
+// CHECK-LE: @llvm.ppc.altivec.vsrah
+
+ res_vi = vec_sra(vi, vui);
+// CHECK: @llvm.ppc.altivec.vsraw
+// CHECK-LE: @llvm.ppc.altivec.vsraw
+
+ res_vui = vec_sra(vui, vui);
+// CHECK: @llvm.ppc.altivec.vsraw
+// CHECK-LE: @llvm.ppc.altivec.vsraw
+
+ res_vsc = vec_vsrab(vsc, vuc);
+// CHECK: @llvm.ppc.altivec.vsrab
+// CHECK-LE: @llvm.ppc.altivec.vsrab
+
+ res_vuc = vec_vsrab(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vsrab
+// CHECK-LE: @llvm.ppc.altivec.vsrab
+
+ res_vs = vec_vsrah(vs, vus);
+// CHECK: @llvm.ppc.altivec.vsrah
+// CHECK-LE: @llvm.ppc.altivec.vsrah
+
+ res_vus = vec_vsrah(vus, vus);
+// CHECK: @llvm.ppc.altivec.vsrah
+// CHECK-LE: @llvm.ppc.altivec.vsrah
+
+ res_vi = vec_vsraw(vi, vui);
+// CHECK: @llvm.ppc.altivec.vsraw
+// CHECK-LE: @llvm.ppc.altivec.vsraw
+
+ res_vui = vec_vsraw(vui, vui);
+// CHECK: @llvm.ppc.altivec.vsraw
+// CHECK-LE: @llvm.ppc.altivec.vsraw
/* vec_srl */
- res_vsc = vec_srl(vsc, vuc); // CHECK: @llvm.ppc.altivec.vsr
- res_vsc = vec_srl(vsc, vus); // CHECK: @llvm.ppc.altivec.vsr
- res_vsc = vec_srl(vsc, vui); // CHECK: @llvm.ppc.altivec.vsr
- res_vuc = vec_srl(vuc, vuc); // CHECK: @llvm.ppc.altivec.vsr
- res_vuc = vec_srl(vuc, vus); // CHECK: @llvm.ppc.altivec.vsr
- res_vuc = vec_srl(vuc, vui); // CHECK: @llvm.ppc.altivec.vsr
- res_vbc = vec_srl(vbc, vuc); // CHECK: @llvm.ppc.altivec.vsr
- res_vbc = vec_srl(vbc, vus); // CHECK: @llvm.ppc.altivec.vsr
- res_vbc = vec_srl(vbc, vui); // CHECK: @llvm.ppc.altivec.vsr
- res_vs = vec_srl(vs, vuc); // CHECK: @llvm.ppc.altivec.vsr
- res_vs = vec_srl(vs, vus); // CHECK: @llvm.ppc.altivec.vsr
- res_vs = vec_srl(vs, vui); // CHECK: @llvm.ppc.altivec.vsr
- res_vus = vec_srl(vus, vuc); // CHECK: @llvm.ppc.altivec.vsr
- res_vus = vec_srl(vus, vus); // CHECK: @llvm.ppc.altivec.vsr
- res_vus = vec_srl(vus, vui); // CHECK: @llvm.ppc.altivec.vsr
- res_vbs = vec_srl(vbs, vuc); // CHECK: @llvm.ppc.altivec.vsr
- res_vbs = vec_srl(vbs, vus); // CHECK: @llvm.ppc.altivec.vsr
- res_vbs = vec_srl(vbs, vui); // CHECK: @llvm.ppc.altivec.vsr
- res_vp = vec_srl(vp, vuc); // CHECK: @llvm.ppc.altivec.vsr
- res_vp = vec_srl(vp, vus); // CHECK: @llvm.ppc.altivec.vsr
- res_vp = vec_srl(vp, vui); // CHECK: @llvm.ppc.altivec.vsr
- res_vi = vec_srl(vi, vuc); // CHECK: @llvm.ppc.altivec.vsr
- res_vi = vec_srl(vi, vus); // CHECK: @llvm.ppc.altivec.vsr
- res_vi = vec_srl(vi, vui); // CHECK: @llvm.ppc.altivec.vsr
- res_vui = vec_srl(vui, vuc); // CHECK: @llvm.ppc.altivec.vsr
- res_vui = vec_srl(vui, vus); // CHECK: @llvm.ppc.altivec.vsr
- res_vui = vec_srl(vui, vui); // CHECK: @llvm.ppc.altivec.vsr
- res_vbi = vec_srl(vbi, vuc); // CHECK: @llvm.ppc.altivec.vsr
- res_vbi = vec_srl(vbi, vus); // CHECK: @llvm.ppc.altivec.vsr
- res_vbi = vec_srl(vbi, vui); // CHECK: @llvm.ppc.altivec.vsr
- res_vsc = vec_vsr(vsc, vuc); // CHECK: @llvm.ppc.altivec.vsr
- res_vsc = vec_vsr(vsc, vus); // CHECK: @llvm.ppc.altivec.vsr
- res_vsc = vec_vsr(vsc, vui); // CHECK: @llvm.ppc.altivec.vsr
- res_vuc = vec_vsr(vuc, vuc); // CHECK: @llvm.ppc.altivec.vsr
- res_vuc = vec_vsr(vuc, vus); // CHECK: @llvm.ppc.altivec.vsr
- res_vuc = vec_vsr(vuc, vui); // CHECK: @llvm.ppc.altivec.vsr
- res_vbc = vec_vsr(vbc, vuc); // CHECK: @llvm.ppc.altivec.vsr
- res_vbc = vec_vsr(vbc, vus); // CHECK: @llvm.ppc.altivec.vsr
- res_vbc = vec_vsr(vbc, vui); // CHECK: @llvm.ppc.altivec.vsr
- res_vs = vec_vsr(vs, vuc); // CHECK: @llvm.ppc.altivec.vsr
- res_vs = vec_vsr(vs, vus); // CHECK: @llvm.ppc.altivec.vsr
- res_vs = vec_vsr(vs, vui); // CHECK: @llvm.ppc.altivec.vsr
- res_vus = vec_vsr(vus, vuc); // CHECK: @llvm.ppc.altivec.vsr
- res_vus = vec_vsr(vus, vus); // CHECK: @llvm.ppc.altivec.vsr
- res_vus = vec_vsr(vus, vui); // CHECK: @llvm.ppc.altivec.vsr
- res_vbs = vec_vsr(vbs, vuc); // CHECK: @llvm.ppc.altivec.vsr
- res_vbs = vec_vsr(vbs, vus); // CHECK: @llvm.ppc.altivec.vsr
- res_vbs = vec_vsr(vbs, vui); // CHECK: @llvm.ppc.altivec.vsr
- res_vp = vec_vsr(vp, vuc); // CHECK: @llvm.ppc.altivec.vsr
- res_vp = vec_vsr(vp, vus); // CHECK: @llvm.ppc.altivec.vsr
- res_vp = vec_vsr(vp, vui); // CHECK: @llvm.ppc.altivec.vsr
- res_vi = vec_vsr(vi, vuc); // CHECK: @llvm.ppc.altivec.vsr
- res_vi = vec_vsr(vi, vus); // CHECK: @llvm.ppc.altivec.vsr
- res_vi = vec_vsr(vi, vui); // CHECK: @llvm.ppc.altivec.vsr
- res_vui = vec_vsr(vui, vuc); // CHECK: @llvm.ppc.altivec.vsr
- res_vui = vec_vsr(vui, vus); // CHECK: @llvm.ppc.altivec.vsr
- res_vui = vec_vsr(vui, vui); // CHECK: @llvm.ppc.altivec.vsr
- res_vbi = vec_vsr(vbi, vuc); // CHECK: @llvm.ppc.altivec.vsr
- res_vbi = vec_vsr(vbi, vus); // CHECK: @llvm.ppc.altivec.vsr
- res_vbi = vec_vsr(vbi, vui); // CHECK: @llvm.ppc.altivec.vsr
+ res_vsc = vec_srl(vsc, vuc);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vsc = vec_srl(vsc, vus);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vsc = vec_srl(vsc, vui);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vuc = vec_srl(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vuc = vec_srl(vuc, vus);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vuc = vec_srl(vuc, vui);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vbc = vec_srl(vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vbc = vec_srl(vbc, vus);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vbc = vec_srl(vbc, vui);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vs = vec_srl(vs, vuc);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vs = vec_srl(vs, vus);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vs = vec_srl(vs, vui);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vus = vec_srl(vus, vuc);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vus = vec_srl(vus, vus);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vus = vec_srl(vus, vui);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vbs = vec_srl(vbs, vuc);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vbs = vec_srl(vbs, vus);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vbs = vec_srl(vbs, vui);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vp = vec_srl(vp, vuc);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vp = vec_srl(vp, vus);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vp = vec_srl(vp, vui);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vi = vec_srl(vi, vuc);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vi = vec_srl(vi, vus);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vi = vec_srl(vi, vui);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vui = vec_srl(vui, vuc);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vui = vec_srl(vui, vus);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vui = vec_srl(vui, vui);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vbi = vec_srl(vbi, vuc);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vbi = vec_srl(vbi, vus);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vbi = vec_srl(vbi, vui);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vsc = vec_vsr(vsc, vuc);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vsc = vec_vsr(vsc, vus);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vsc = vec_vsr(vsc, vui);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vuc = vec_vsr(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vuc = vec_vsr(vuc, vus);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vuc = vec_vsr(vuc, vui);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vbc = vec_vsr(vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vbc = vec_vsr(vbc, vus);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vbc = vec_vsr(vbc, vui);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vs = vec_vsr(vs, vuc);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vs = vec_vsr(vs, vus);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vs = vec_vsr(vs, vui);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vus = vec_vsr(vus, vuc);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vus = vec_vsr(vus, vus);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vus = vec_vsr(vus, vui);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vbs = vec_vsr(vbs, vuc);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vbs = vec_vsr(vbs, vus);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vbs = vec_vsr(vbs, vui);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vp = vec_vsr(vp, vuc);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vp = vec_vsr(vp, vus);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vp = vec_vsr(vp, vui);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vi = vec_vsr(vi, vuc);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vi = vec_vsr(vi, vus);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vi = vec_vsr(vi, vui);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vui = vec_vsr(vui, vuc);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vui = vec_vsr(vui, vus);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vui = vec_vsr(vui, vui);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vbi = vec_vsr(vbi, vuc);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vbi = vec_vsr(vbi, vus);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
+
+ res_vbi = vec_vsr(vbi, vui);
+// CHECK: @llvm.ppc.altivec.vsr
+// CHECK-LE: @llvm.ppc.altivec.vsr
/* vec_sro */
- res_vsc = vec_sro(vsc, vsc); // CHECK: @llvm.ppc.altivec.vsro
- res_vsc = vec_sro(vsc, vuc); // CHECK: @llvm.ppc.altivec.vsro
- res_vuc = vec_sro(vuc, vsc); // CHECK: @llvm.ppc.altivec.vsro
- res_vuc = vec_sro(vuc, vuc); // CHECK: @llvm.ppc.altivec.vsro
- res_vs = vec_sro(vs, vsc); // CHECK: @llvm.ppc.altivec.vsro
- res_vs = vec_sro(vs, vuc); // CHECK: @llvm.ppc.altivec.vsro
- res_vus = vec_sro(vus, vsc); // CHECK: @llvm.ppc.altivec.vsro
- res_vus = vec_sro(vus, vuc); // CHECK: @llvm.ppc.altivec.vsro
- res_vp = vec_sro(vp, vsc); // CHECK: @llvm.ppc.altivec.vsro
- res_vp = vec_sro(vp, vuc); // CHECK: @llvm.ppc.altivec.vsro
- res_vi = vec_sro(vi, vsc); // CHECK: @llvm.ppc.altivec.vsro
- res_vi = vec_sro(vi, vuc); // CHECK: @llvm.ppc.altivec.vsro
- res_vui = vec_sro(vui, vsc); // CHECK: @llvm.ppc.altivec.vsro
- res_vui = vec_sro(vui, vuc); // CHECK: @llvm.ppc.altivec.vsro
- res_vf = vec_sro(vf, vsc); // CHECK: @llvm.ppc.altivec.vsro
- res_vf = vec_sro(vf, vuc); // CHECK: @llvm.ppc.altivec.vsro
- res_vsc = vec_vsro(vsc, vsc); // CHECK: @llvm.ppc.altivec.vsro
- res_vsc = vec_vsro(vsc, vuc); // CHECK: @llvm.ppc.altivec.vsro
- res_vuc = vec_vsro(vuc, vsc); // CHECK: @llvm.ppc.altivec.vsro
- res_vuc = vec_vsro(vuc, vuc); // CHECK: @llvm.ppc.altivec.vsro
- res_vs = vec_vsro(vs, vsc); // CHECK: @llvm.ppc.altivec.vsro
- res_vs = vec_vsro(vs, vuc); // CHECK: @llvm.ppc.altivec.vsro
- res_vus = vec_vsro(vus, vsc); // CHECK: @llvm.ppc.altivec.vsro
- res_vus = vec_vsro(vus, vuc); // CHECK: @llvm.ppc.altivec.vsro
- res_vp = vec_vsro(vp, vsc); // CHECK: @llvm.ppc.altivec.vsro
- res_vp = vec_vsro(vp, vuc); // CHECK: @llvm.ppc.altivec.vsro
- res_vi = vec_vsro(vi, vsc); // CHECK: @llvm.ppc.altivec.vsro
- res_vi = vec_vsro(vi, vuc); // CHECK: @llvm.ppc.altivec.vsro
- res_vui = vec_vsro(vui, vsc); // CHECK: @llvm.ppc.altivec.vsro
- res_vui = vec_vsro(vui, vuc); // CHECK: @llvm.ppc.altivec.vsro
- res_vf = vec_vsro(vf, vsc); // CHECK: @llvm.ppc.altivec.vsro
- res_vf = vec_vsro(vf, vuc); // CHECK: @llvm.ppc.altivec.vsro
+ res_vsc = vec_sro(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vsc = vec_sro(vsc, vuc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vuc = vec_sro(vuc, vsc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vuc = vec_sro(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vs = vec_sro(vs, vsc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vs = vec_sro(vs, vuc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vus = vec_sro(vus, vsc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vus = vec_sro(vus, vuc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vp = vec_sro(vp, vsc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vp = vec_sro(vp, vuc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vi = vec_sro(vi, vsc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vi = vec_sro(vi, vuc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vui = vec_sro(vui, vsc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vui = vec_sro(vui, vuc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vf = vec_sro(vf, vsc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vf = vec_sro(vf, vuc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vsc = vec_vsro(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vsc = vec_vsro(vsc, vuc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vuc = vec_vsro(vuc, vsc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vuc = vec_vsro(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vs = vec_vsro(vs, vsc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vs = vec_vsro(vs, vuc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vus = vec_vsro(vus, vsc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vus = vec_vsro(vus, vuc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vp = vec_vsro(vp, vsc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vp = vec_vsro(vp, vuc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vi = vec_vsro(vi, vsc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vi = vec_vsro(vi, vuc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vui = vec_vsro(vui, vsc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vui = vec_vsro(vui, vuc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vf = vec_vsro(vf, vsc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
+
+ res_vf = vec_vsro(vf, vuc);
+// CHECK: @llvm.ppc.altivec.vsro
+// CHECK-LE: @llvm.ppc.altivec.vsro
/* vec_st */
- vec_st(vsc, 0, &vsc); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vsc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vuc, 0, &vuc); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vuc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vbc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vbc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vbc, 0, &vbc); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vs, 0, &vs); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vs, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vus, 0, &vus); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vus, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vbs, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vbs, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vbs, 0, &vbs); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vp, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vp, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vp, 0, &vp); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vi, 0, &vi); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vi, 0, &param_i); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vui, 0, &vui); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vui, 0, &param_ui); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vbi, 0, &param_i); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vbi, 0, &param_ui); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vbi, 0, &vbi); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vf, 0, &vf); // CHECK: @llvm.ppc.altivec.stvx
- vec_st(vf, 0, &param_f); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vsc, 0, &vsc); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vsc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vuc, 0, &vuc); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vuc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vbc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vbc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vbc, 0, &vbc); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vs, 0, &vs); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vs, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vus, 0, &vus); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vus, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vbs, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vbs, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vbs, 0, &vbs); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vp, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vp, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vp, 0, &vp); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vi, 0, &vi); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vi, 0, &param_i); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vui, 0, &vui); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vui, 0, &param_ui); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vbi, 0, &param_i); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vbi, 0, &param_ui); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vbi, 0, &vbi); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vf, 0, &vf); // CHECK: @llvm.ppc.altivec.stvx
- vec_stvx(vf, 0, &param_f); // CHECK: @llvm.ppc.altivec.stvx
+ vec_st(vsc, 0, &vsc);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vsc, 0, &param_sc);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vuc, 0, &vuc);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vuc, 0, &param_uc);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vbc, 0, &param_uc);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vbc, 0, &param_uc);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vbc, 0, &vbc);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vs, 0, &vs);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vs, 0, &param_s);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vus, 0, &vus);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vus, 0, &param_us);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vbs, 0, &param_s);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vbs, 0, &param_us);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vbs, 0, &vbs);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vp, 0, &param_s);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vp, 0, &param_us);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vp, 0, &vp);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vi, 0, &vi);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vi, 0, &param_i);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vui, 0, &vui);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vui, 0, &param_ui);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vbi, 0, &param_i);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vbi, 0, &param_ui);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vbi, 0, &vbi);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vf, 0, &vf);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_st(vf, 0, &param_f);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vsc, 0, &vsc);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vsc, 0, &param_sc);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vuc, 0, &vuc);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vuc, 0, &param_uc);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vbc, 0, &param_uc);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vbc, 0, &param_uc);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vbc, 0, &vbc);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vs, 0, &vs);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vs, 0, &param_s);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vus, 0, &vus);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vus, 0, &param_us);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vbs, 0, &param_s);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vbs, 0, &param_us);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vbs, 0, &vbs);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vp, 0, &param_s);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vp, 0, &param_us);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vp, 0, &vp);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vi, 0, &vi);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vi, 0, &param_i);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vui, 0, &vui);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vui, 0, &param_ui);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vbi, 0, &param_i);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vbi, 0, &param_ui);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vbi, 0, &vbi);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vf, 0, &vf);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvx(vf, 0, &param_f);
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.stvx
/* vec_ste */
- vec_ste(vsc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.stvebx
- vec_ste(vuc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvebx
- vec_ste(vbc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.stvebx
- vec_ste(vbc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvebx
- vec_ste(vs, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvehx
- vec_ste(vus, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvehx
- vec_ste(vbs, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvehx
- vec_ste(vbs, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvehx
- vec_ste(vp, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvehx
- vec_ste(vp, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvehx
- vec_ste(vi, 0, &param_i); // CHECK: @llvm.ppc.altivec.stvewx
- vec_ste(vui, 0, &param_ui); // CHECK: @llvm.ppc.altivec.stvewx
- vec_ste(vbi, 0, &param_i); // CHECK: @llvm.ppc.altivec.stvewx
- vec_ste(vbi, 0, &param_ui); // CHECK: @llvm.ppc.altivec.stvewx
- vec_ste(vf, 0, &param_f); // CHECK: @llvm.ppc.altivec.stvewx
- vec_stvebx(vsc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.stvebx
- vec_stvebx(vuc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvebx
- vec_stvebx(vbc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.stvebx
- vec_stvebx(vbc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvebx
- vec_stvehx(vs, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvehx
- vec_stvehx(vus, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvehx
- vec_stvehx(vbs, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvehx
- vec_stvehx(vbs, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvehx
- vec_stvehx(vp, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvehx
- vec_stvehx(vp, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvehx
- vec_stvewx(vi, 0, &param_i); // CHECK: @llvm.ppc.altivec.stvewx
- vec_stvewx(vui, 0, &param_ui); // CHECK: @llvm.ppc.altivec.stvewx
- vec_stvewx(vbi, 0, &param_i); // CHECK: @llvm.ppc.altivec.stvewx
- vec_stvewx(vbi, 0, &param_ui); // CHECK: @llvm.ppc.altivec.stvewx
- vec_stvewx(vf, 0, &param_f); // CHECK: @llvm.ppc.altivec.stvewx
+ vec_ste(vsc, 0, &param_sc);
+// CHECK: @llvm.ppc.altivec.stvebx
+// CHECK-LE: @llvm.ppc.altivec.stvebx
+
+ vec_ste(vuc, 0, &param_uc);
+// CHECK: @llvm.ppc.altivec.stvebx
+// CHECK-LE: @llvm.ppc.altivec.stvebx
+
+ vec_ste(vbc, 0, &param_sc);
+// CHECK: @llvm.ppc.altivec.stvebx
+// CHECK-LE: @llvm.ppc.altivec.stvebx
+
+ vec_ste(vbc, 0, &param_uc);
+// CHECK: @llvm.ppc.altivec.stvebx
+// CHECK-LE: @llvm.ppc.altivec.stvebx
+
+ vec_ste(vs, 0, &param_s);
+// CHECK: @llvm.ppc.altivec.stvehx
+// CHECK-LE: @llvm.ppc.altivec.stvehx
+
+ vec_ste(vus, 0, &param_us);
+// CHECK: @llvm.ppc.altivec.stvehx
+// CHECK-LE: @llvm.ppc.altivec.stvehx
+
+ vec_ste(vbs, 0, &param_s);
+// CHECK: @llvm.ppc.altivec.stvehx
+// CHECK-LE: @llvm.ppc.altivec.stvehx
+
+ vec_ste(vbs, 0, &param_us);
+// CHECK: @llvm.ppc.altivec.stvehx
+// CHECK-LE: @llvm.ppc.altivec.stvehx
+
+ vec_ste(vp, 0, &param_s);
+// CHECK: @llvm.ppc.altivec.stvehx
+// CHECK-LE: @llvm.ppc.altivec.stvehx
+
+ vec_ste(vp, 0, &param_us);
+// CHECK: @llvm.ppc.altivec.stvehx
+// CHECK-LE: @llvm.ppc.altivec.stvehx
+
+ vec_ste(vi, 0, &param_i);
+// CHECK: @llvm.ppc.altivec.stvewx
+// CHECK-LE: @llvm.ppc.altivec.stvewx
+
+ vec_ste(vui, 0, &param_ui);
+// CHECK: @llvm.ppc.altivec.stvewx
+// CHECK-LE: @llvm.ppc.altivec.stvewx
+
+ vec_ste(vbi, 0, &param_i);
+// CHECK: @llvm.ppc.altivec.stvewx
+// CHECK-LE: @llvm.ppc.altivec.stvewx
+
+ vec_ste(vbi, 0, &param_ui);
+// CHECK: @llvm.ppc.altivec.stvewx
+// CHECK-LE: @llvm.ppc.altivec.stvewx
+
+ vec_ste(vf, 0, &param_f);
+// CHECK: @llvm.ppc.altivec.stvewx
+// CHECK-LE: @llvm.ppc.altivec.stvewx
+
+ vec_stvebx(vsc, 0, &param_sc);
+// CHECK: @llvm.ppc.altivec.stvebx
+// CHECK-LE: @llvm.ppc.altivec.stvebx
+
+ vec_stvebx(vuc, 0, &param_uc);
+// CHECK: @llvm.ppc.altivec.stvebx
+// CHECK-LE: @llvm.ppc.altivec.stvebx
+
+ vec_stvebx(vbc, 0, &param_sc);
+// CHECK: @llvm.ppc.altivec.stvebx
+// CHECK-LE: @llvm.ppc.altivec.stvebx
+
+ vec_stvebx(vbc, 0, &param_uc);
+// CHECK: @llvm.ppc.altivec.stvebx
+// CHECK-LE: @llvm.ppc.altivec.stvebx
+
+ vec_stvehx(vs, 0, &param_s);
+// CHECK: @llvm.ppc.altivec.stvehx
+// CHECK-LE: @llvm.ppc.altivec.stvehx
+
+ vec_stvehx(vus, 0, &param_us);
+// CHECK: @llvm.ppc.altivec.stvehx
+// CHECK-LE: @llvm.ppc.altivec.stvehx
+
+ vec_stvehx(vbs, 0, &param_s);
+// CHECK: @llvm.ppc.altivec.stvehx
+// CHECK-LE: @llvm.ppc.altivec.stvehx
+
+ vec_stvehx(vbs, 0, &param_us);
+// CHECK: @llvm.ppc.altivec.stvehx
+// CHECK-LE: @llvm.ppc.altivec.stvehx
+
+ vec_stvehx(vp, 0, &param_s);
+// CHECK: @llvm.ppc.altivec.stvehx
+// CHECK-LE: @llvm.ppc.altivec.stvehx
+
+ vec_stvehx(vp, 0, &param_us);
+// CHECK: @llvm.ppc.altivec.stvehx
+// CHECK-LE: @llvm.ppc.altivec.stvehx
+
+ vec_stvewx(vi, 0, &param_i);
+// CHECK: @llvm.ppc.altivec.stvewx
+// CHECK-LE: @llvm.ppc.altivec.stvewx
+
+ vec_stvewx(vui, 0, &param_ui);
+// CHECK: @llvm.ppc.altivec.stvewx
+// CHECK-LE: @llvm.ppc.altivec.stvewx
+
+ vec_stvewx(vbi, 0, &param_i);
+// CHECK: @llvm.ppc.altivec.stvewx
+// CHECK-LE: @llvm.ppc.altivec.stvewx
+
+ vec_stvewx(vbi, 0, &param_ui);
+// CHECK: @llvm.ppc.altivec.stvewx
+// CHECK-LE: @llvm.ppc.altivec.stvewx
+
+ vec_stvewx(vf, 0, &param_f);
+// CHECK: @llvm.ppc.altivec.stvewx
+// CHECK-LE: @llvm.ppc.altivec.stvewx
/* vec_stl */
- vec_stl(vsc, 0, &vsc); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vsc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vuc, 0, &vuc); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vuc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vbc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vbc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vbc, 0, &vbc); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vs, 0, &vs); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vs, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vus, 0, &vus); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vus, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vbs, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vbs, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vbs, 0, &vbs); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vp, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vp, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vp, 0, &vp); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vi, 0, &vi); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vi, 0, &param_i); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vui, 0, &vui); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vui, 0, &param_ui); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vbi, 0, &param_i); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vbi, 0, &param_ui); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vbi, 0, &vbi); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vf, 0, &vf); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stl(vf, 0, &param_f); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vsc, 0, &vsc); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vsc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vuc, 0, &vuc); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vuc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vbc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vbc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vbc, 0, &vbc); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vs, 0, &vs); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vs, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vus, 0, &vus); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vus, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vbs, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vbs, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vbs, 0, &vbs); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vp, 0, &param_s); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vp, 0, &param_us); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vp, 0, &vp); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vi, 0, &vi); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vi, 0, &param_i); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vui, 0, &vui); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vui, 0, &param_ui); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vbi, 0, &param_i); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vbi, 0, &param_ui); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vbi, 0, &vbi); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vf, 0, &vf); // CHECK: @llvm.ppc.altivec.stvxl
- vec_stvxl(vf, 0, &param_f); // CHECK: @llvm.ppc.altivec.stvxl
+ vec_stl(vsc, 0, &vsc);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vsc, 0, &param_sc);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vuc, 0, &vuc);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vuc, 0, &param_uc);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vbc, 0, &param_sc);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vbc, 0, &param_uc);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vbc, 0, &vbc);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vs, 0, &vs);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vs, 0, &param_s);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vus, 0, &vus);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vus, 0, &param_us);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vbs, 0, &param_s);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vbs, 0, &param_us);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vbs, 0, &vbs);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vp, 0, &param_s);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vp, 0, &param_us);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vp, 0, &vp);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vi, 0, &vi);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vi, 0, &param_i);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vui, 0, &vui);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vui, 0, &param_ui);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vbi, 0, &param_i);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vbi, 0, &param_ui);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vbi, 0, &vbi);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vf, 0, &vf);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stl(vf, 0, &param_f);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vsc, 0, &vsc);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vsc, 0, &param_sc);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vuc, 0, &vuc);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vuc, 0, &param_uc);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vbc, 0, &param_sc);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vbc, 0, &param_uc);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vbc, 0, &vbc);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vs, 0, &vs);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vs, 0, &param_s);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vus, 0, &vus);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vus, 0, &param_us);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vbs, 0, &param_s);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vbs, 0, &param_us);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vbs, 0, &vbs);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vp, 0, &param_s);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vp, 0, &param_us);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vp, 0, &vp);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vi, 0, &vi);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vi, 0, &param_i);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vui, 0, &vui);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vui, 0, &param_ui);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vbi, 0, &param_i);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vbi, 0, &param_ui);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vbi, 0, &vbi);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vf, 0, &vf);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvxl(vf, 0, &param_f);
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.stvxl
/* vec_sub */
- res_vsc = vec_sub(vsc, vsc); // CHECK: sub <16 x i8>
- res_vsc = vec_sub(vbc, vsc); // CHECK: sub <16 x i8>
- res_vsc = vec_sub(vsc, vbc); // CHECK: sub <16 x i8>
- res_vuc = vec_sub(vuc, vuc); // CHECK: sub <16 x i8>
- res_vuc = vec_sub(vbc, vuc); // CHECK: sub <16 x i8>
- res_vuc = vec_sub(vuc, vbc); // CHECK: sub <16 x i8>
- res_vs = vec_sub(vs, vs); // CHECK: sub <8 x i16>
- res_vs = vec_sub(vbs, vs); // CHECK: sub <8 x i16>
- res_vs = vec_sub(vs, vbs); // CHECK: sub <8 x i16>
- res_vus = vec_sub(vus, vus); // CHECK: sub <8 x i16>
- res_vus = vec_sub(vbs, vus); // CHECK: sub <8 x i16>
- res_vus = vec_sub(vus, vbs); // CHECK: sub <8 x i16>
- res_vi = vec_sub(vi, vi); // CHECK: sub <4 x i32>
- res_vi = vec_sub(vbi, vi); // CHECK: sub <4 x i32>
- res_vi = vec_sub(vi, vbi); // CHECK: sub <4 x i32>
- res_vui = vec_sub(vui, vui); // CHECK: sub <4 x i32>
- res_vui = vec_sub(vbi, vui); // CHECK: sub <4 x i32>
- res_vui = vec_sub(vui, vbi); // CHECK: sub <4 x i32>
- res_vf = vec_sub(vf, vf); // CHECK: fsub <4 x float>
- res_vsc = vec_vsububm(vsc, vsc); // CHECK: sub <16 x i8>
- res_vsc = vec_vsububm(vbc, vsc); // CHECK: sub <16 x i8>
- res_vsc = vec_vsububm(vsc, vbc); // CHECK: sub <16 x i8>
- res_vuc = vec_vsububm(vuc, vuc); // CHECK: sub <16 x i8>
- res_vuc = vec_vsububm(vbc, vuc); // CHECK: sub <16 x i8>
- res_vuc = vec_vsububm(vuc, vbc); // CHECK: sub <16 x i8>
- res_vs = vec_vsubuhm(vs, vs); // CHECK: sub <8 x i16>
- res_vs = vec_vsubuhm(vbs, vus); // CHECK: sub <8 x i16>
- res_vs = vec_vsubuhm(vus, vbs); // CHECK: sub <8 x i16>
- res_vus = vec_vsubuhm(vus, vus); // CHECK: sub <8 x i16>
- res_vus = vec_vsubuhm(vbs, vus); // CHECK: sub <8 x i16>
- res_vus = vec_vsubuhm(vus, vbs); // CHECK: sub <8 x i16>
- res_vi = vec_vsubuwm(vi, vi); // CHECK: sub <4 x i32>
- res_vi = vec_vsubuwm(vbi, vi); // CHECK: sub <4 x i32>
- res_vi = vec_vsubuwm(vi, vbi); // CHECK: sub <4 x i32>
- res_vui = vec_vsubuwm(vui, vui); // CHECK: sub <4 x i32>
- res_vui = vec_vsubuwm(vbi, vui); // CHECK: sub <4 x i32>
- res_vui = vec_vsubuwm(vui, vbi); // CHECK: sub <4 x i32>
- res_vf = vec_vsubfp(vf, vf); // CHECK: fsub <4 x float>
+ res_vsc = vec_sub(vsc, vsc);
+// CHECK: sub <16 x i8>
+// CHECK-LE: sub <16 x i8>
+
+ res_vsc = vec_sub(vbc, vsc);
+// CHECK: sub <16 x i8>
+// CHECK-LE: sub <16 x i8>
+
+ res_vsc = vec_sub(vsc, vbc);
+// CHECK: sub <16 x i8>
+// CHECK-LE: sub <16 x i8>
+
+ res_vuc = vec_sub(vuc, vuc);
+// CHECK: sub <16 x i8>
+// CHECK-LE: sub <16 x i8>
+
+ res_vuc = vec_sub(vbc, vuc);
+// CHECK: sub <16 x i8>
+// CHECK-LE: sub <16 x i8>
+
+ res_vuc = vec_sub(vuc, vbc);
+// CHECK: sub <16 x i8>
+// CHECK-LE: sub <16 x i8>
+
+ res_vs = vec_sub(vs, vs);
+// CHECK: sub <8 x i16>
+// CHECK-LE: sub <8 x i16>
+
+ res_vs = vec_sub(vbs, vs);
+// CHECK: sub <8 x i16>
+// CHECK-LE: sub <8 x i16>
+
+ res_vs = vec_sub(vs, vbs);
+// CHECK: sub <8 x i16>
+// CHECK-LE: sub <8 x i16>
+
+ res_vus = vec_sub(vus, vus);
+// CHECK: sub <8 x i16>
+// CHECK-LE: sub <8 x i16>
+
+ res_vus = vec_sub(vbs, vus);
+// CHECK: sub <8 x i16>
+// CHECK-LE: sub <8 x i16>
+
+ res_vus = vec_sub(vus, vbs);
+// CHECK: sub <8 x i16>
+// CHECK-LE: sub <8 x i16>
+
+ res_vi = vec_sub(vi, vi);
+// CHECK: sub <4 x i32>
+// CHECK-LE: sub <4 x i32>
+
+ res_vi = vec_sub(vbi, vi);
+// CHECK: sub <4 x i32>
+// CHECK-LE: sub <4 x i32>
+
+ res_vi = vec_sub(vi, vbi);
+// CHECK: sub <4 x i32>
+// CHECK-LE: sub <4 x i32>
+
+ res_vui = vec_sub(vui, vui);
+// CHECK: sub <4 x i32>
+// CHECK-LE: sub <4 x i32>
+
+ res_vui = vec_sub(vbi, vui);
+// CHECK: sub <4 x i32>
+// CHECK-LE: sub <4 x i32>
+
+ res_vui = vec_sub(vui, vbi);
+// CHECK: sub <4 x i32>
+// CHECK-LE: sub <4 x i32>
+
+ res_vf = vec_sub(vf, vf);
+// CHECK: fsub <4 x float>
+// CHECK-LE: fsub <4 x float>
+
+ res_vsc = vec_vsububm(vsc, vsc);
+// CHECK: sub <16 x i8>
+// CHECK-LE: sub <16 x i8>
+
+ res_vsc = vec_vsububm(vbc, vsc);
+// CHECK: sub <16 x i8>
+// CHECK-LE: sub <16 x i8>
+
+ res_vsc = vec_vsububm(vsc, vbc);
+// CHECK: sub <16 x i8>
+// CHECK-LE: sub <16 x i8>
+
+ res_vuc = vec_vsububm(vuc, vuc);
+// CHECK: sub <16 x i8>
+// CHECK-LE: sub <16 x i8>
+
+ res_vuc = vec_vsububm(vbc, vuc);
+// CHECK: sub <16 x i8>
+// CHECK-LE: sub <16 x i8>
+
+ res_vuc = vec_vsububm(vuc, vbc);
+// CHECK: sub <16 x i8>
+// CHECK-LE: sub <16 x i8>
+
+ res_vs = vec_vsubuhm(vs, vs);
+// CHECK: sub <8 x i16>
+// CHECK-LE: sub <8 x i16>
+
+ res_vs = vec_vsubuhm(vbs, vus);
+// CHECK: sub <8 x i16>
+// CHECK-LE: sub <8 x i16>
+
+ res_vs = vec_vsubuhm(vus, vbs);
+// CHECK: sub <8 x i16>
+// CHECK-LE: sub <8 x i16>
+
+ res_vus = vec_vsubuhm(vus, vus);
+// CHECK: sub <8 x i16>
+// CHECK-LE: sub <8 x i16>
+
+ res_vus = vec_vsubuhm(vbs, vus);
+// CHECK: sub <8 x i16>
+// CHECK-LE: sub <8 x i16>
+
+ res_vus = vec_vsubuhm(vus, vbs);
+// CHECK: sub <8 x i16>
+// CHECK-LE: sub <8 x i16>
+
+ res_vi = vec_vsubuwm(vi, vi);
+// CHECK: sub <4 x i32>
+// CHECK-LE: sub <4 x i32>
+
+ res_vi = vec_vsubuwm(vbi, vi);
+// CHECK: sub <4 x i32>
+// CHECK-LE: sub <4 x i32>
+
+ res_vi = vec_vsubuwm(vi, vbi);
+// CHECK: sub <4 x i32>
+// CHECK-LE: sub <4 x i32>
+
+ res_vui = vec_vsubuwm(vui, vui);
+// CHECK: sub <4 x i32>
+// CHECK-LE: sub <4 x i32>
+
+ res_vui = vec_vsubuwm(vbi, vui);
+// CHECK: sub <4 x i32>
+// CHECK-LE: sub <4 x i32>
+
+ res_vui = vec_vsubuwm(vui, vbi);
+// CHECK: sub <4 x i32>
+// CHECK-LE: sub <4 x i32>
+
+ res_vf = vec_vsubfp(vf, vf);
+// CHECK: fsub <4 x float>
+// CHECK-LE: fsub <4 x float>
/* vec_subc */
- res_vui = vec_subc(vui, vui); // CHECK: @llvm.ppc.altivec.vsubcuw
- res_vui = vec_vsubcuw(vui, vui); // CHECK: @llvm.ppc.altivec.vsubcuw
+ res_vui = vec_subc(vui, vui);
+// CHECK: @llvm.ppc.altivec.vsubcuw
+// CHECK-LE: @llvm.ppc.altivec.vsubcuw
+
+ res_vui = vec_vsubcuw(vui, vui);
+// CHECK: @llvm.ppc.altivec.vsubcuw
+// CHECK-LE: @llvm.ppc.altivec.vsubcuw
/* vec_subs */
- res_vsc = vec_subs(vsc, vsc); // CHECK: @llvm.ppc.altivec.vsubsbs
- res_vsc = vec_subs(vbc, vsc); // CHECK: @llvm.ppc.altivec.vsubsbs
- res_vsc = vec_subs(vsc, vbc); // CHECK: @llvm.ppc.altivec.vsubsbs
- res_vuc = vec_subs(vuc, vuc); // CHECK: @llvm.ppc.altivec.vsububs
- res_vuc = vec_subs(vbc, vuc); // CHECK: @llvm.ppc.altivec.vsububs
- res_vuc = vec_subs(vuc, vbc); // CHECK: @llvm.ppc.altivec.vsububs
- res_vs = vec_subs(vs, vs); // CHECK: @llvm.ppc.altivec.vsubshs
- res_vs = vec_subs(vbs, vs); // CHECK: @llvm.ppc.altivec.vsubshs
- res_vs = vec_subs(vs, vbs); // CHECK: @llvm.ppc.altivec.vsubshs
- res_vus = vec_subs(vus, vus); // CHECK: @llvm.ppc.altivec.vsubuhs
- res_vus = vec_subs(vbs, vus); // CHECK: @llvm.ppc.altivec.vsubuhs
- res_vus = vec_subs(vus, vbs); // CHECK: @llvm.ppc.altivec.vsubuhs
- res_vi = vec_subs(vi, vi); // CHECK: @llvm.ppc.altivec.vsubsws
- res_vi = vec_subs(vbi, vi); // CHECK: @llvm.ppc.altivec.vsubsws
- res_vi = vec_subs(vi, vbi); // CHECK: @llvm.ppc.altivec.vsubsws
- res_vui = vec_subs(vui, vui); // CHECK: @llvm.ppc.altivec.vsubuws
- res_vui = vec_subs(vbi, vui); // CHECK: @llvm.ppc.altivec.vsubuws
- res_vui = vec_subs(vui, vbi); // CHECK: @llvm.ppc.altivec.vsubuws
- res_vsc = vec_vsubsbs(vsc, vsc); // CHECK: @llvm.ppc.altivec.vsubsbs
- res_vsc = vec_vsubsbs(vbc, vsc); // CHECK: @llvm.ppc.altivec.vsubsbs
- res_vsc = vec_vsubsbs(vsc, vbc); // CHECK: @llvm.ppc.altivec.vsubsbs
- res_vuc = vec_vsububs(vuc, vuc); // CHECK: @llvm.ppc.altivec.vsububs
- res_vuc = vec_vsububs(vbc, vuc); // CHECK: @llvm.ppc.altivec.vsububs
- res_vuc = vec_vsububs(vuc, vbc); // CHECK: @llvm.ppc.altivec.vsububs
- res_vs = vec_vsubshs(vs, vs); // CHECK: @llvm.ppc.altivec.vsubshs
- res_vs = vec_vsubshs(vbs, vs); // CHECK: @llvm.ppc.altivec.vsubshs
- res_vs = vec_vsubshs(vs, vbs); // CHECK: @llvm.ppc.altivec.vsubshs
- res_vus = vec_vsubuhs(vus, vus); // CHECK: @llvm.ppc.altivec.vsubuhs
- res_vus = vec_vsubuhs(vbs, vus); // CHECK: @llvm.ppc.altivec.vsubuhs
- res_vus = vec_vsubuhs(vus, vbs); // CHECK: @llvm.ppc.altivec.vsubuhs
- res_vi = vec_vsubsws(vi, vi); // CHECK: @llvm.ppc.altivec.vsubsws
- res_vi = vec_vsubsws(vbi, vi); // CHECK: @llvm.ppc.altivec.vsubsws
- res_vi = vec_vsubsws(vi, vbi); // CHECK: @llvm.ppc.altivec.vsubsws
- res_vui = vec_vsubuws(vui, vui); // CHECK: @llvm.ppc.altivec.vsubuws
- res_vui = vec_vsubuws(vbi, vui); // CHECK: @llvm.ppc.altivec.vsubuws
- res_vui = vec_vsubuws(vui, vbi); // CHECK: @llvm.ppc.altivec.vsubuws
+ res_vsc = vec_subs(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vsubsbs
+// CHECK-LE: @llvm.ppc.altivec.vsubsbs
+
+ res_vsc = vec_subs(vbc, vsc);
+// CHECK: @llvm.ppc.altivec.vsubsbs
+// CHECK-LE: @llvm.ppc.altivec.vsubsbs
+
+ res_vsc = vec_subs(vsc, vbc);
+// CHECK: @llvm.ppc.altivec.vsubsbs
+// CHECK-LE: @llvm.ppc.altivec.vsubsbs
+
+ res_vuc = vec_subs(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vsububs
+// CHECK-LE: @llvm.ppc.altivec.vsububs
+
+ res_vuc = vec_subs(vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vsububs
+// CHECK-LE: @llvm.ppc.altivec.vsububs
+
+ res_vuc = vec_subs(vuc, vbc);
+// CHECK: @llvm.ppc.altivec.vsububs
+// CHECK-LE: @llvm.ppc.altivec.vsububs
+
+ res_vs = vec_subs(vs, vs);
+// CHECK: @llvm.ppc.altivec.vsubshs
+// CHECK-LE: @llvm.ppc.altivec.vsubshs
+
+ res_vs = vec_subs(vbs, vs);
+// CHECK: @llvm.ppc.altivec.vsubshs
+// CHECK-LE: @llvm.ppc.altivec.vsubshs
+
+ res_vs = vec_subs(vs, vbs);
+// CHECK: @llvm.ppc.altivec.vsubshs
+// CHECK-LE: @llvm.ppc.altivec.vsubshs
+
+ res_vus = vec_subs(vus, vus);
+// CHECK: @llvm.ppc.altivec.vsubuhs
+// CHECK-LE: @llvm.ppc.altivec.vsubuhs
+
+ res_vus = vec_subs(vbs, vus);
+// CHECK: @llvm.ppc.altivec.vsubuhs
+// CHECK-LE: @llvm.ppc.altivec.vsubuhs
+
+ res_vus = vec_subs(vus, vbs);
+// CHECK: @llvm.ppc.altivec.vsubuhs
+// CHECK-LE: @llvm.ppc.altivec.vsubuhs
+
+ res_vi = vec_subs(vi, vi);
+// CHECK: @llvm.ppc.altivec.vsubsws
+// CHECK-LE: @llvm.ppc.altivec.vsubsws
+
+ res_vi = vec_subs(vbi, vi);
+// CHECK: @llvm.ppc.altivec.vsubsws
+// CHECK-LE: @llvm.ppc.altivec.vsubsws
+
+ res_vi = vec_subs(vi, vbi);
+// CHECK: @llvm.ppc.altivec.vsubsws
+// CHECK-LE: @llvm.ppc.altivec.vsubsws
+
+ res_vui = vec_subs(vui, vui);
+// CHECK: @llvm.ppc.altivec.vsubuws
+// CHECK-LE: @llvm.ppc.altivec.vsubuws
+
+ res_vui = vec_subs(vbi, vui);
+// CHECK: @llvm.ppc.altivec.vsubuws
+// CHECK-LE: @llvm.ppc.altivec.vsubuws
+
+ res_vui = vec_subs(vui, vbi);
+// CHECK: @llvm.ppc.altivec.vsubuws
+// CHECK-LE: @llvm.ppc.altivec.vsubuws
+
+ res_vsc = vec_vsubsbs(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vsubsbs
+// CHECK-LE: @llvm.ppc.altivec.vsubsbs
+
+ res_vsc = vec_vsubsbs(vbc, vsc);
+// CHECK: @llvm.ppc.altivec.vsubsbs
+// CHECK-LE: @llvm.ppc.altivec.vsubsbs
+
+ res_vsc = vec_vsubsbs(vsc, vbc);
+// CHECK: @llvm.ppc.altivec.vsubsbs
+// CHECK-LE: @llvm.ppc.altivec.vsubsbs
+
+ res_vuc = vec_vsububs(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vsububs
+// CHECK-LE: @llvm.ppc.altivec.vsububs
+
+ res_vuc = vec_vsububs(vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vsububs
+// CHECK-LE: @llvm.ppc.altivec.vsububs
+
+ res_vuc = vec_vsububs(vuc, vbc);
+// CHECK: @llvm.ppc.altivec.vsububs
+// CHECK-LE: @llvm.ppc.altivec.vsububs
+
+ res_vs = vec_vsubshs(vs, vs);
+// CHECK: @llvm.ppc.altivec.vsubshs
+// CHECK-LE: @llvm.ppc.altivec.vsubshs
+
+ res_vs = vec_vsubshs(vbs, vs);
+// CHECK: @llvm.ppc.altivec.vsubshs
+// CHECK-LE: @llvm.ppc.altivec.vsubshs
+
+ res_vs = vec_vsubshs(vs, vbs);
+// CHECK: @llvm.ppc.altivec.vsubshs
+// CHECK-LE: @llvm.ppc.altivec.vsubshs
+
+ res_vus = vec_vsubuhs(vus, vus);
+// CHECK: @llvm.ppc.altivec.vsubuhs
+// CHECK-LE: @llvm.ppc.altivec.vsubuhs
+
+ res_vus = vec_vsubuhs(vbs, vus);
+// CHECK: @llvm.ppc.altivec.vsubuhs
+// CHECK-LE: @llvm.ppc.altivec.vsubuhs
+
+ res_vus = vec_vsubuhs(vus, vbs);
+// CHECK: @llvm.ppc.altivec.vsubuhs
+// CHECK-LE: @llvm.ppc.altivec.vsubuhs
+
+ res_vi = vec_vsubsws(vi, vi);
+// CHECK: @llvm.ppc.altivec.vsubsws
+// CHECK-LE: @llvm.ppc.altivec.vsubsws
+
+ res_vi = vec_vsubsws(vbi, vi);
+// CHECK: @llvm.ppc.altivec.vsubsws
+// CHECK-LE: @llvm.ppc.altivec.vsubsws
+
+ res_vi = vec_vsubsws(vi, vbi);
+// CHECK: @llvm.ppc.altivec.vsubsws
+// CHECK-LE: @llvm.ppc.altivec.vsubsws
+
+ res_vui = vec_vsubuws(vui, vui);
+// CHECK: @llvm.ppc.altivec.vsubuws
+// CHECK-LE: @llvm.ppc.altivec.vsubuws
+
+ res_vui = vec_vsubuws(vbi, vui);
+// CHECK: @llvm.ppc.altivec.vsubuws
+// CHECK-LE: @llvm.ppc.altivec.vsubuws
+
+ res_vui = vec_vsubuws(vui, vbi);
+// CHECK: @llvm.ppc.altivec.vsubuws
+// CHECK-LE: @llvm.ppc.altivec.vsubuws
/* vec_sum4s */
- res_vi = vec_sum4s(vsc, vi); // CHECK: @llvm.ppc.altivec.vsum4sbs
- res_vui = vec_sum4s(vuc, vui); // CHECK: @llvm.ppc.altivec.vsum4ubs
- res_vi = vec_sum4s(vs, vi); // CHECK: @llvm.ppc.altivec.vsum4shs
- res_vi = vec_vsum4sbs(vsc, vi); // CHECK: @llvm.ppc.altivec.vsum4sbs
- res_vui = vec_vsum4ubs(vuc, vui); // CHECK: @llvm.ppc.altivec.vsum4ubs
- res_vi = vec_vsum4shs(vs, vi); // CHECK: @llvm.ppc.altivec.vsum4shs
+ res_vi = vec_sum4s(vsc, vi);
+// CHECK: @llvm.ppc.altivec.vsum4sbs
+// CHECK-LE: @llvm.ppc.altivec.vsum4sbs
+
+ res_vui = vec_sum4s(vuc, vui);
+// CHECK: @llvm.ppc.altivec.vsum4ubs
+// CHECK-LE: @llvm.ppc.altivec.vsum4ubs
+
+ res_vi = vec_sum4s(vs, vi);
+// CHECK: @llvm.ppc.altivec.vsum4shs
+// CHECK-LE: @llvm.ppc.altivec.vsum4shs
+
+ res_vi = vec_vsum4sbs(vsc, vi);
+// CHECK: @llvm.ppc.altivec.vsum4sbs
+// CHECK-LE: @llvm.ppc.altivec.vsum4sbs
+
+ res_vui = vec_vsum4ubs(vuc, vui);
+// CHECK: @llvm.ppc.altivec.vsum4ubs
+// CHECK-LE: @llvm.ppc.altivec.vsum4ubs
+
+ res_vi = vec_vsum4shs(vs, vi);
+// CHECK: @llvm.ppc.altivec.vsum4shs
+// CHECK-LE: @llvm.ppc.altivec.vsum4shs
/* vec_sum2s */
- res_vi = vec_sum2s(vi, vi); // CHECK: @llvm.ppc.altivec.vsum2sws
- res_vi = vec_vsum2sws(vi, vi); // CHECK: @llvm.ppc.altivec.vsum2sws
+ res_vi = vec_sum2s(vi, vi);
+// CHECK: @llvm.ppc.altivec.vsum2sws
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vsum2sws
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vi = vec_vsum2sws(vi, vi);
+// CHECK: @llvm.ppc.altivec.vsum2sws
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vsum2sws
+// CHECK-LE: @llvm.ppc.altivec.vperm
/* vec_sums */
- res_vi = vec_sums(vi, vi); // CHECK: @llvm.ppc.altivec.vsumsws
- res_vi = vec_vsumsws(vi, vi); // CHECK: @llvm.ppc.altivec.vsumsws
+ res_vi = vec_sums(vi, vi);
+// CHECK: @llvm.ppc.altivec.vsumsws
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vsumsws
+
+ res_vi = vec_vsumsws(vi, vi);
+// CHECK: @llvm.ppc.altivec.vsumsws
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.vsumsws
/* vec_trunc */
- res_vf = vec_trunc(vf); // CHECK: @llvm.ppc.altivec.vrfiz
- res_vf = vec_vrfiz(vf); // CHECK: @llvm.ppc.altivec.vrfiz
+ res_vf = vec_trunc(vf);
+// CHECK: @llvm.ppc.altivec.vrfiz
+// CHECK-LE: @llvm.ppc.altivec.vrfiz
+
+ res_vf = vec_vrfiz(vf);
+// CHECK: @llvm.ppc.altivec.vrfiz
+// CHECK-LE: @llvm.ppc.altivec.vrfiz
/* vec_unpackh */
- res_vs = vec_unpackh(vsc); // CHECK: @llvm.ppc.altivec.vupkhsb
- res_vbs = vec_unpackh(vbc); // CHECK: @llvm.ppc.altivec.vupkhsb
- res_vi = vec_unpackh(vs); // CHECK: @llvm.ppc.altivec.vupkhsh
- res_vbi = vec_unpackh(vbs); // CHECK: @llvm.ppc.altivec.vupkhsh
- res_vui = vec_unpackh(vp); // CHECK: @llvm.ppc.altivec.vupkhsh
- res_vs = vec_vupkhsb(vsc); // CHECK: @llvm.ppc.altivec.vupkhsb
- res_vbs = vec_vupkhsb(vbc); // CHECK: @llvm.ppc.altivec.vupkhsb
- res_vi = vec_vupkhsh(vs); // CHECK: @llvm.ppc.altivec.vupkhsh
- res_vbi = vec_vupkhsh(vbs); // CHECK: @llvm.ppc.altivec.vupkhsh
- res_vui = vec_vupkhsh(vp); // CHECK: @llvm.ppc.altivec.vupkhsh
+ res_vs = vec_unpackh(vsc);
+// CHECK: @llvm.ppc.altivec.vupkhsb
+// CHECK-LE: @llvm.ppc.altivec.vupklsb
+
+ res_vbs = vec_unpackh(vbc);
+// CHECK: @llvm.ppc.altivec.vupkhsb
+// CHECK-LE: @llvm.ppc.altivec.vupklsb
+
+ res_vi = vec_unpackh(vs);
+// CHECK: @llvm.ppc.altivec.vupkhsh
+// CHECK-LE: @llvm.ppc.altivec.vupklsh
+
+ res_vbi = vec_unpackh(vbs);
+// CHECK: @llvm.ppc.altivec.vupkhsh
+// CHECK-LE: @llvm.ppc.altivec.vupklsh
+
+ res_vui = vec_unpackh(vp);
+// CHECK: @llvm.ppc.altivec.vupkhpx
+// CHECK-LE: @llvm.ppc.altivec.vupklpx
+
+ res_vs = vec_vupkhsb(vsc);
+// CHECK: @llvm.ppc.altivec.vupkhsb
+// CHECK-LE: @llvm.ppc.altivec.vupklsb
+
+ res_vbs = vec_vupkhsb(vbc);
+// CHECK: @llvm.ppc.altivec.vupkhsb
+// CHECK-LE: @llvm.ppc.altivec.vupklsb
+
+ res_vi = vec_vupkhsh(vs);
+// CHECK: @llvm.ppc.altivec.vupkhsh
+// CHECK-LE: @llvm.ppc.altivec.vupklsh
+
+ res_vbi = vec_vupkhsh(vbs);
+// CHECK: @llvm.ppc.altivec.vupkhsh
+// CHECK-LE: @llvm.ppc.altivec.vupklsh
+
+ res_vui = vec_vupkhsh(vp);
+// CHECK: @llvm.ppc.altivec.vupkhpx
+// CHECK-LE: @llvm.ppc.altivec.vupklpx
/* vec_unpackl */
- res_vs = vec_unpackl(vsc); // CHECK: @llvm.ppc.altivec.vupklsb
- res_vbs = vec_unpackl(vbc); // CHECK: @llvm.ppc.altivec.vupklsb
- res_vi = vec_unpackl(vs); // CHECK: @llvm.ppc.altivec.vupklsh
- res_vbi = vec_unpackl(vbs); // CHECK: @llvm.ppc.altivec.vupklsh
- res_vui = vec_unpackl(vp); // CHECK: @llvm.ppc.altivec.vupklsh
- res_vs = vec_vupklsb(vsc); // CHECK: @llvm.ppc.altivec.vupklsb
- res_vbs = vec_vupklsb(vbc); // CHECK: @llvm.ppc.altivec.vupklsb
- res_vi = vec_vupklsh(vs); // CHECK: @llvm.ppc.altivec.vupklsh
- res_vbi = vec_vupklsh(vbs); // CHECK: @llvm.ppc.altivec.vupklsh
- res_vui = vec_vupklsh(vp); // CHECK: @llvm.ppc.altivec.vupklsh
+ res_vs = vec_unpackl(vsc);
+// CHECK: @llvm.ppc.altivec.vupklsb
+// CHECK-LE: @llvm.ppc.altivec.vupkhsb
+
+ res_vbs = vec_unpackl(vbc);
+// CHECK: @llvm.ppc.altivec.vupklsb
+// CHECK-LE: @llvm.ppc.altivec.vupkhsb
+
+ res_vi = vec_unpackl(vs);
+// CHECK: @llvm.ppc.altivec.vupklsh
+// CHECK-LE: @llvm.ppc.altivec.vupkhsh
+
+ res_vbi = vec_unpackl(vbs);
+// CHECK: @llvm.ppc.altivec.vupklsh
+// CHECK-LE: @llvm.ppc.altivec.vupkhsh
+
+ res_vui = vec_unpackl(vp);
+// CHECK: @llvm.ppc.altivec.vupklpx
+// CHECK-LE: @llvm.ppc.altivec.vupkhpx
+
+ res_vs = vec_vupklsb(vsc);
+// CHECK: @llvm.ppc.altivec.vupklsb
+// CHECK-LE: @llvm.ppc.altivec.vupkhsb
+
+ res_vbs = vec_vupklsb(vbc);
+// CHECK: @llvm.ppc.altivec.vupklsb
+// CHECK-LE: @llvm.ppc.altivec.vupkhsb
+
+ res_vi = vec_vupklsh(vs);
+// CHECK: @llvm.ppc.altivec.vupklsh
+// CHECK-LE: @llvm.ppc.altivec.vupkhsh
+
+ res_vbi = vec_vupklsh(vbs);
+// CHECK: @llvm.ppc.altivec.vupklsh
+// CHECK-LE: @llvm.ppc.altivec.vupkhsh
+
+ res_vui = vec_vupklsh(vp);
+// CHECK: @llvm.ppc.altivec.vupklpx
+// CHECK-LE: @llvm.ppc.altivec.vupkhpx
/* vec_xor */
- res_vsc = vec_xor(vsc, vsc); // CHECK: xor <16 x i8>
- res_vsc = vec_xor(vbc, vsc); // CHECK: xor <16 x i8>
- res_vsc = vec_xor(vsc, vbc); // CHECK: xor <16 x i8>
- res_vuc = vec_xor(vuc, vuc); // CHECK: xor <16 x i8>
- res_vuc = vec_xor(vbc, vuc); // CHECK: xor <16 x i8>
- res_vuc = vec_xor(vuc, vbc); // CHECK: xor <16 x i8>
- res_vbc = vec_xor(vbc, vbc); // CHECK: xor <16 x i8>
- res_vs = vec_xor(vs, vs); // CHECK: xor <8 x i16>
- res_vs = vec_xor(vbs, vs); // CHECK: xor <8 x i16>
- res_vs = vec_xor(vs, vbs); // CHECK: xor <8 x i16>
- res_vus = vec_xor(vus, vus); // CHECK: xor <8 x i16>
- res_vus = vec_xor(vbs, vus); // CHECK: xor <8 x i16>
- res_vus = vec_xor(vus, vbs); // CHECK: xor <8 x i16>
- res_vbs = vec_xor(vbs, vbs); // CHECK: xor <8 x i16>
- res_vi = vec_xor(vi, vi); // CHECK: xor <4 x i32>
- res_vi = vec_xor(vbi, vi); // CHECK: xor <4 x i32>
- res_vi = vec_xor(vi, vbi); // CHECK: xor <4 x i32>
- res_vui = vec_xor(vui, vui); // CHECK: xor <4 x i32>
- res_vui = vec_xor(vbi, vui); // CHECK: xor <4 x i32>
- res_vui = vec_xor(vui, vbi); // CHECK: xor <4 x i32>
- res_vbi = vec_xor(vbi, vbi); // CHECK: xor <4 x i32>
- res_vf = vec_xor(vf, vf); // CHECK: xor <4 x i32>
- res_vf = vec_xor(vbi, vf); // CHECK: xor <4 x i32>
- res_vf = vec_xor(vf, vbi); // CHECK: xor <4 x i32>
- res_vsc = vec_vxor(vsc, vsc); // CHECK: xor <16 x i8>
- res_vsc = vec_vxor(vbc, vsc); // CHECK: xor <16 x i8>
- res_vsc = vec_vxor(vsc, vbc); // CHECK: xor <16 x i8>
- res_vuc = vec_vxor(vuc, vuc); // CHECK: xor <16 x i8>
- res_vuc = vec_vxor(vbc, vuc); // CHECK: xor <16 x i8>
- res_vuc = vec_vxor(vuc, vbc); // CHECK: xor <16 x i8>
- res_vbc = vec_vxor(vbc, vbc); // CHECK: xor <16 x i8>
- res_vs = vec_vxor(vs, vs); // CHECK: xor <8 x i16>
- res_vs = vec_vxor(vbs, vs); // CHECK: xor <8 x i16>
- res_vs = vec_vxor(vs, vbs); // CHECK: xor <8 x i16>
- res_vus = vec_vxor(vus, vus); // CHECK: xor <8 x i16>
- res_vus = vec_vxor(vbs, vus); // CHECK: xor <8 x i16>
- res_vus = vec_vxor(vus, vbs); // CHECK: xor <8 x i16>
- res_vbs = vec_vxor(vbs, vbs); // CHECK: xor <8 x i16>
- res_vi = vec_vxor(vi, vi); // CHECK: xor <4 x i32>
- res_vi = vec_vxor(vbi, vi); // CHECK: xor <4 x i32>
- res_vi = vec_vxor(vi, vbi); // CHECK: xor <4 x i32>
- res_vui = vec_vxor(vui, vui); // CHECK: xor <4 x i32>
- res_vui = vec_vxor(vbi, vui); // CHECK: xor <4 x i32>
- res_vui = vec_vxor(vui, vbi); // CHECK: xor <4 x i32>
- res_vbi = vec_vxor(vbi, vbi); // CHECK: xor <4 x i32>
- res_vf = vec_vxor(vf, vf); // CHECK: xor <4 x i32>
- res_vf = vec_vxor(vbi, vf); // CHECK: xor <4 x i32>
- res_vf = vec_vxor(vf, vbi); // CHECK: xor <4 x i32>
+ res_vsc = vec_xor(vsc, vsc);
+// CHECK: xor <16 x i8>
+// CHECK-LE: xor <16 x i8>
+
+ res_vsc = vec_xor(vbc, vsc);
+// CHECK: xor <16 x i8>
+// CHECK-LE: xor <16 x i8>
+
+ res_vsc = vec_xor(vsc, vbc);
+// CHECK: xor <16 x i8>
+// CHECK-LE: xor <16 x i8>
+
+ res_vuc = vec_xor(vuc, vuc);
+// CHECK: xor <16 x i8>
+// CHECK-LE: xor <16 x i8>
+
+ res_vuc = vec_xor(vbc, vuc);
+// CHECK: xor <16 x i8>
+// CHECK-LE: xor <16 x i8>
+
+ res_vuc = vec_xor(vuc, vbc);
+// CHECK: xor <16 x i8>
+// CHECK-LE: xor <16 x i8>
+
+ res_vbc = vec_xor(vbc, vbc);
+// CHECK: xor <16 x i8>
+// CHECK-LE: xor <16 x i8>
+
+ res_vs = vec_xor(vs, vs);
+// CHECK: xor <8 x i16>
+// CHECK-LE: xor <8 x i16>
+
+ res_vs = vec_xor(vbs, vs);
+// CHECK: xor <8 x i16>
+// CHECK-LE: xor <8 x i16>
+
+ res_vs = vec_xor(vs, vbs);
+// CHECK: xor <8 x i16>
+// CHECK-LE: xor <8 x i16>
+
+ res_vus = vec_xor(vus, vus);
+// CHECK: xor <8 x i16>
+// CHECK-LE: xor <8 x i16>
+
+ res_vus = vec_xor(vbs, vus);
+// CHECK: xor <8 x i16>
+// CHECK-LE: xor <8 x i16>
+
+ res_vus = vec_xor(vus, vbs);
+// CHECK: xor <8 x i16>
+// CHECK-LE: xor <8 x i16>
+
+ res_vbs = vec_xor(vbs, vbs);
+// CHECK: xor <8 x i16>
+// CHECK-LE: xor <8 x i16>
+
+ res_vi = vec_xor(vi, vi);
+// CHECK: xor <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vi = vec_xor(vbi, vi);
+// CHECK: xor <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vi = vec_xor(vi, vbi);
+// CHECK: xor <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vui = vec_xor(vui, vui);
+// CHECK: xor <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vui = vec_xor(vbi, vui);
+// CHECK: xor <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vui = vec_xor(vui, vbi);
+// CHECK: xor <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vbi = vec_xor(vbi, vbi);
+// CHECK: xor <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vf = vec_xor(vf, vf);
+// CHECK: xor <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vf = vec_xor(vbi, vf);
+// CHECK: xor <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vf = vec_xor(vf, vbi);
+// CHECK: xor <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vsc = vec_vxor(vsc, vsc);
+// CHECK: xor <16 x i8>
+// CHECK-LE: xor <16 x i8>
+
+ res_vsc = vec_vxor(vbc, vsc);
+// CHECK: xor <16 x i8>
+// CHECK-LE: xor <16 x i8>
+
+ res_vsc = vec_vxor(vsc, vbc);
+// CHECK: xor <16 x i8>
+// CHECK-LE: xor <16 x i8>
+
+ res_vuc = vec_vxor(vuc, vuc);
+// CHECK: xor <16 x i8>
+// CHECK-LE: xor <16 x i8>
+
+ res_vuc = vec_vxor(vbc, vuc);
+// CHECK: xor <16 x i8>
+// CHECK-LE: xor <16 x i8>
+
+ res_vuc = vec_vxor(vuc, vbc);
+// CHECK: xor <16 x i8>
+// CHECK-LE: xor <16 x i8>
+
+ res_vbc = vec_vxor(vbc, vbc);
+// CHECK: xor <16 x i8>
+// CHECK-LE: xor <16 x i8>
+
+ res_vs = vec_vxor(vs, vs);
+// CHECK: xor <8 x i16>
+// CHECK-LE: xor <8 x i16>
+
+ res_vs = vec_vxor(vbs, vs);
+// CHECK: xor <8 x i16>
+// CHECK-LE: xor <8 x i16>
+
+ res_vs = vec_vxor(vs, vbs);
+// CHECK: xor <8 x i16>
+// CHECK-LE: xor <8 x i16>
+
+ res_vus = vec_vxor(vus, vus);
+// CHECK: xor <8 x i16>
+// CHECK-LE: xor <8 x i16>
+
+ res_vus = vec_vxor(vbs, vus);
+// CHECK: xor <8 x i16>
+// CHECK-LE: xor <8 x i16>
+
+ res_vus = vec_vxor(vus, vbs);
+// CHECK: xor <8 x i16>
+// CHECK-LE: xor <8 x i16>
+
+ res_vbs = vec_vxor(vbs, vbs);
+// CHECK: xor <8 x i16>
+// CHECK-LE: xor <8 x i16>
+
+ res_vi = vec_vxor(vi, vi);
+// CHECK: xor <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vi = vec_vxor(vbi, vi);
+// CHECK: xor <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vi = vec_vxor(vi, vbi);
+// CHECK: xor <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vui = vec_vxor(vui, vui);
+// CHECK: xor <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vui = vec_vxor(vbi, vui);
+// CHECK: xor <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vui = vec_vxor(vui, vbi);
+// CHECK: xor <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vbi = vec_vxor(vbi, vbi);
+// CHECK: xor <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vf = vec_vxor(vf, vf);
+// CHECK: xor <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vf = vec_vxor(vbi, vf);
+// CHECK: xor <4 x i32>
+// CHECK-LE: xor <4 x i32>
+
+ res_vf = vec_vxor(vf, vbi);
+// CHECK: xor <4 x i32>
+// CHECK-LE: xor <4 x i32>
/* ------------------------------ extensions -------------------------------------- */
/* vec_extract */
- res_sc = vec_extract(vsc, param_i); // CHECK: extractelement <16 x i8>
- res_uc = vec_extract(vuc, param_i); // CHECK: extractelement <16 x i8>
- res_s = vec_extract(vs, param_i); // CHECK: extractelement <8 x i16>
- res_us = vec_extract(vus, param_i); // CHECK: extractelement <8 x i16>
- res_i = vec_extract(vi, param_i); // CHECK: extractelement <4 x i32>
- res_ui = vec_extract(vui, param_i); // CHECK: extractelement <4 x i32>
- res_f = vec_extract(vf, param_i); // CHECK: extractelement <4 x float>
+ res_sc = vec_extract(vsc, param_i);
+// CHECK: extractelement <16 x i8>
+// CHECK-LE: extractelement <16 x i8>
+
+ res_uc = vec_extract(vuc, param_i);
+// CHECK: extractelement <16 x i8>
+// CHECK-LE: extractelement <16 x i8>
+
+ res_s = vec_extract(vs, param_i);
+// CHECK: extractelement <8 x i16>
+// CHECK-LE: extractelement <8 x i16>
+
+ res_us = vec_extract(vus, param_i);
+// CHECK: extractelement <8 x i16>
+// CHECK-LE: extractelement <8 x i16>
+
+ res_i = vec_extract(vi, param_i);
+// CHECK: extractelement <4 x i32>
+// CHECK-LE: extractelement <4 x i32>
+
+ res_ui = vec_extract(vui, param_i);
+// CHECK: extractelement <4 x i32>
+// CHECK-LE: extractelement <4 x i32>
+
+ res_f = vec_extract(vf, param_i);
+// CHECK: extractelement <4 x float>
+// CHECK-LE: extractelement <4 x float>
/* vec_insert */
- res_vsc = vec_insert(param_sc, vsc, param_i); // CHECK: insertelement <16 x i8>
- res_vuc = vec_insert(param_uc, vuc, param_i); // CHECK: insertelement <16 x i8>
- res_vs = vec_insert(param_s, vs, param_i); // CHECK: insertelement <8 x i16>
- res_vus = vec_insert(param_us, vus, param_i); // CHECK: insertelement <8 x i16>
- res_vi = vec_insert(param_i, vi, param_i); // CHECK: insertelement <4 x i32>
- res_vui = vec_insert(param_ui, vui, param_i); // CHECK: insertelement <4 x i32>
- res_vf = vec_insert(param_f, vf, param_i); // CHECK: insertelement <4 x float>
+ res_vsc = vec_insert(param_sc, vsc, param_i);
+// CHECK: insertelement <16 x i8>
+// CHECK-LE: insertelement <16 x i8>
+
+ res_vuc = vec_insert(param_uc, vuc, param_i);
+// CHECK: insertelement <16 x i8>
+// CHECK-LE: insertelement <16 x i8>
+
+ res_vs = vec_insert(param_s, vs, param_i);
+// CHECK: insertelement <8 x i16>
+// CHECK-LE: insertelement <8 x i16>
+
+ res_vus = vec_insert(param_us, vus, param_i);
+// CHECK: insertelement <8 x i16>
+// CHECK-LE: insertelement <8 x i16>
+
+ res_vi = vec_insert(param_i, vi, param_i);
+// CHECK: insertelement <4 x i32>
+// CHECK-LE: insertelement <4 x i32>
+
+ res_vui = vec_insert(param_ui, vui, param_i);
+// CHECK: insertelement <4 x i32>
+// CHECK-LE: insertelement <4 x i32>
+
+ res_vf = vec_insert(param_f, vf, param_i);
+// CHECK: insertelement <4 x float>
+// CHECK-LE: insertelement <4 x float>
/* vec_lvlx */
- res_vsc = vec_lvlx(0, &param_sc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vsc = vec_lvlx(0, &vsc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vuc = vec_lvlx(0, &param_uc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vuc = vec_lvlx(0, &vuc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vbc = vec_lvlx(0, &vbc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vs = vec_lvlx(0, &param_s); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vs = vec_lvlx(0, &vs); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vus = vec_lvlx(0, &param_us); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vus = vec_lvlx(0, &vus); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vbs = vec_lvlx(0, &vbs); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vp = vec_lvlx(0, &vp); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vi = vec_lvlx(0, &param_i); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vi = vec_lvlx(0, &vi); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vui = vec_lvlx(0, &param_ui); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vui = vec_lvlx(0, &vui); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vbi = vec_lvlx(0, &vbi); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vf = vec_lvlx(0, &vf); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x float> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
+ res_vsc = vec_lvlx(0, &param_sc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vsc = vec_lvlx(0, &vsc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vuc = vec_lvlx(0, &param_uc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vuc = vec_lvlx(0, &vuc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbc = vec_lvlx(0, &vbc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vs = vec_lvlx(0, &param_s);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vs = vec_lvlx(0, &vs);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vus = vec_lvlx(0, &param_us);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vus = vec_lvlx(0, &vus);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbs = vec_lvlx(0, &vbs);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vp = vec_lvlx(0, &vp);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vi = vec_lvlx(0, &param_i);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vi = vec_lvlx(0, &vi);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vui = vec_lvlx(0, &param_ui);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vui = vec_lvlx(0, &vui);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbi = vec_lvlx(0, &vbi);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vf = vec_lvlx(0, &vf);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x float> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x float> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
/* vec_lvlxl */
- res_vsc = vec_lvlxl(0, &param_sc); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vsc = vec_lvlxl(0, &vsc); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vuc = vec_lvlxl(0, &param_uc); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vuc = vec_lvlxl(0, &vuc); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vbc = vec_lvlxl(0, &vbc); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vs = vec_lvlxl(0, &param_s); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vs = vec_lvlxl(0, &vs); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vus = vec_lvlxl(0, &param_us); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vus = vec_lvlxl(0, &vus); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vbs = vec_lvlxl(0, &vbs); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vp = vec_lvlxl(0, &vp); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vi = vec_lvlxl(0, &param_i); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vi = vec_lvlxl(0, &vi); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vui = vec_lvlxl(0, &param_ui); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vui = vec_lvlxl(0, &vui); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vbi = vec_lvlxl(0, &vbi); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vf = vec_lvlxl(0, &vf); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x float> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
+ res_vsc = vec_lvlxl(0, &param_sc);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vsc = vec_lvlxl(0, &vsc);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vuc = vec_lvlxl(0, &param_uc);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vuc = vec_lvlxl(0, &vuc);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbc = vec_lvlxl(0, &vbc);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vs = vec_lvlxl(0, &param_s);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vs = vec_lvlxl(0, &vs);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vus = vec_lvlxl(0, &param_us);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vus = vec_lvlxl(0, &vus);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbs = vec_lvlxl(0, &vbs);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vp = vec_lvlxl(0, &vp);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vi = vec_lvlxl(0, &param_i);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vi = vec_lvlxl(0, &vi);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vui = vec_lvlxl(0, &param_ui);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vui = vec_lvlxl(0, &vui);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbi = vec_lvlxl(0, &vbi);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vf = vec_lvlxl(0, &vf);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x float> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x float> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
/* vec_lvrx */
- res_vsc = vec_lvrx(0, &param_sc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vsc = vec_lvrx(0, &vsc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vuc = vec_lvrx(0, &param_uc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vuc = vec_lvrx(0, &vuc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vbc = vec_lvrx(0, &vbc); // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vs = vec_lvrx(0, &param_s); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vs = vec_lvrx(0, &vs); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vus = vec_lvrx(0, &param_us); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vus = vec_lvrx(0, &vus); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vbs = vec_lvrx(0, &vbs); // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vp = vec_lvrx(0, &vp); // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vi = vec_lvrx(0, &param_i); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vi = vec_lvrx(0, &vi); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vui = vec_lvrx(0, &param_ui); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vui = vec_lvrx(0, &vui); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vbi = vec_lvrx(0, &vbi); // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vf = vec_lvrx(0, &vf); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x float> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
+ res_vsc = vec_lvrx(0, &param_sc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vsc = vec_lvrx(0, &vsc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vuc = vec_lvrx(0, &param_uc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vuc = vec_lvrx(0, &vuc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbc = vec_lvrx(0, &vbc);
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vs = vec_lvrx(0, &param_s);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vs = vec_lvrx(0, &vs);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vus = vec_lvrx(0, &param_us);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vus = vec_lvrx(0, &vus);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbs = vec_lvrx(0, &vbs);
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vp = vec_lvrx(0, &vp);
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vi = vec_lvrx(0, &param_i);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vi = vec_lvrx(0, &vi);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vui = vec_lvrx(0, &param_ui);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vui = vec_lvrx(0, &vui);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbi = vec_lvrx(0, &vbi);
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vf = vec_lvrx(0, &vf);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x float> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x float> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
/* vec_lvrxl */
- res_vsc = vec_lvrxl(0, &param_sc); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vsc = vec_lvrxl(0, &vsc); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vuc = vec_lvrxl(0, &param_uc); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vuc = vec_lvrxl(0, &vuc); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vbc = vec_lvrxl(0, &vbc); // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vs = vec_lvrxl(0, &param_s); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vs = vec_lvrxl(0, &vs); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vus = vec_lvrxl(0, &param_us); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vus = vec_lvrxl(0, &vus); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vbs = vec_lvrxl(0, &vbs); // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vp = vec_lvrxl(0, &vp); // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vi = vec_lvrxl(0, &param_i); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vi = vec_lvrxl(0, &vi); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vui = vec_lvrxl(0, &param_ui); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vui = vec_lvrxl(0, &vui); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vbi = vec_lvrxl(0, &vbi); // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
-
- res_vf = vec_lvrxl(0, &vf); // CHECK: @llvm.ppc.altivec.lvxl
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x float> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
+ res_vsc = vec_lvrxl(0, &param_sc);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vsc = vec_lvrxl(0, &vsc);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vuc = vec_lvrxl(0, &param_uc);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vuc = vec_lvrxl(0, &vuc);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbc = vec_lvrxl(0, &vbc);
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vs = vec_lvrxl(0, &param_s);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vs = vec_lvrxl(0, &vs);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vus = vec_lvrxl(0, &param_us);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vus = vec_lvrxl(0, &vus);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbs = vec_lvrxl(0, &vbs);
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vp = vec_lvrxl(0, &vp);
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vi = vec_lvrxl(0, &param_i);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vi = vec_lvrxl(0, &vi);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vui = vec_lvrxl(0, &param_ui);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vui = vec_lvrxl(0, &vui);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vbi = vec_lvrxl(0, &vbi);
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+
+ res_vf = vec_lvrxl(0, &vf);
+// CHECK: @llvm.ppc.altivec.lvxl
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x float> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvxl
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x float> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
/* vec_stvlx */
- vec_stvlx(vsc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvlx(vsc, 0, &vsc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvlx(vuc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvlx(vuc, 0, &vuc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvlx(vbc, 0, &vbc); // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvlx(vs, 0, &param_s); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvlx(vs, 0, &vs); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvlx(vus, 0, &param_us); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvlx(vus, 0, &vus); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvlx(vbs, 0, &vbs); // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvlx(vp, 0, &vp); // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvlx(vi, 0, &param_i); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvlx(vi, 0, &vi); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvlx(vui, 0, &param_ui); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvlx(vui, 0, &vui); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvlx(vbi, 0, &vbi); // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvlx(vf, 0, &vf); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x float> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
+ vec_stvlx(vsc, 0, &param_sc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvlx(vsc, 0, &vsc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvlx(vuc, 0, &param_uc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvlx(vuc, 0, &vuc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvlx(vbc, 0, &vbc);
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvlx(vs, 0, &param_s);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvlx(vs, 0, &vs);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvlx(vus, 0, &param_us);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvlx(vus, 0, &vus);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvlx(vbs, 0, &vbs);
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvlx(vp, 0, &vp);
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvlx(vi, 0, &param_i);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvlx(vi, 0, &vi);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvlx(vui, 0, &param_ui);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvlx(vui, 0, &vui);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvlx(vbi, 0, &vbi);
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvlx(vf, 0, &vf);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x float> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x float> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
/* vec_stvlxl */
- vec_stvlxl(vsc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvlxl(vsc, 0, &vsc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvlxl(vuc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvlxl(vuc, 0, &vuc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvlxl(vbc, 0, &vbc); // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvlxl(vs, 0, &param_s); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvlxl(vs, 0, &vs); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvlxl(vus, 0, &param_us); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvlxl(vus, 0, &vus); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvlxl(vbs, 0, &vbs); // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvlxl(vp, 0, &vp); // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvlxl(vi, 0, &param_i); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvlxl(vi, 0, &vi); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvlxl(vui, 0, &param_ui); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvlxl(vui, 0, &vui); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvlxl(vbi, 0, &vbi); // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvlxl(vf, 0, &vf); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x float> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
+ vec_stvlxl(vsc, 0, &param_sc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvlxl(vsc, 0, &vsc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvlxl(vuc, 0, &param_uc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvlxl(vuc, 0, &vuc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvlxl(vbc, 0, &vbc);
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvlxl(vs, 0, &param_s);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvlxl(vs, 0, &vs);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvlxl(vus, 0, &param_us);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvlxl(vus, 0, &vus);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvlxl(vbs, 0, &vbs);
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvlxl(vp, 0, &vp);
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvlxl(vi, 0, &param_i);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvlxl(vi, 0, &vi);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvlxl(vui, 0, &param_ui);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvlxl(vui, 0, &vui);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvlxl(vbi, 0, &vbi);
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvlxl(vf, 0, &vf);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x float> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x float> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
/* vec_stvrx */
- vec_stvrx(vsc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvrx(vsc, 0, &vsc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvrx(vuc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvrx(vuc, 0, &vuc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvrx(vbc, 0, &vbc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvrx(vs, 0, &param_s); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvrx(vs, 0, &vs); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvrx(vus, 0, &param_us); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvrx(vus, 0, &vus); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvrx(vbs, 0, &vbs); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvrx(vp, 0, &vp); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvrx(vi, 0, &param_i); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvrx(vi, 0, &vi); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvrx(vui, 0, &param_ui); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvrx(vui, 0, &vui); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvrx(vbi, 0, &vbi); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
-
- vec_stvrx(vf, 0, &vf); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x float> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvx
+ vec_stvrx(vsc, 0, &param_sc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvrx(vsc, 0, &vsc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvrx(vuc, 0, &param_uc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvrx(vuc, 0, &vuc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvrx(vbc, 0, &vbc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvrx(vs, 0, &param_s);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvrx(vs, 0, &vs);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvrx(vus, 0, &param_us);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvrx(vus, 0, &vus);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvrx(vbs, 0, &vbs);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvrx(vp, 0, &vp);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvrx(vi, 0, &param_i);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvrx(vi, 0, &vi);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvrx(vui, 0, &param_ui);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvrx(vui, 0, &vui);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvrx(vbi, 0, &vbi);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
+
+ vec_stvrx(vf, 0, &vf);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x float> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvx
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x float> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvx
/* vec_stvrxl */
- vec_stvrxl(vsc, 0, &param_sc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvrxl(vsc, 0, &vsc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvrxl(vuc, 0, &param_uc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvrxl(vuc, 0, &vuc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvrxl(vbc, 0, &vbc); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: store <16 x i8> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvrxl(vs, 0, &param_s); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvrxl(vs, 0, &vs); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvrxl(vus, 0, &param_us); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvrxl(vus, 0, &vus); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvrxl(vbs, 0, &vbs); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvrxl(vp, 0, &vp); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: store <8 x i16> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvrxl(vi, 0, &param_i); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvrxl(vi, 0, &vi); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvrxl(vui, 0, &param_ui); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvrxl(vui, 0, &vui); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvrxl(vbi, 0, &vbi); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: store <4 x i32> zeroinitializer
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
-
- vec_stvrxl(vf, 0, &vf); // CHECK: @llvm.ppc.altivec.lvx
- // CHECK: @llvm.ppc.altivec.lvsl
- // CHECK: store <4 x float> zeroinitializer
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.lvsr
- // CHECK: @llvm.ppc.altivec.vperm
- // CHECK: @llvm.ppc.altivec.stvxl
+ vec_stvrxl(vsc, 0, &param_sc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvrxl(vsc, 0, &vsc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvrxl(vuc, 0, &param_uc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvrxl(vuc, 0, &vuc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvrxl(vbc, 0, &vbc);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvrxl(vs, 0, &param_s);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvrxl(vs, 0, &vs);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvrxl(vus, 0, &param_us);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvrxl(vus, 0, &vus);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvrxl(vbs, 0, &vbs);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvrxl(vp, 0, &vp);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvrxl(vi, 0, &param_i);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvrxl(vi, 0, &vi);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvrxl(vui, 0, &param_ui);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvrxl(vui, 0, &vui);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvrxl(vbi, 0, &vbi);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
+
+ vec_stvrxl(vf, 0, &vf);
+// CHECK: @llvm.ppc.altivec.lvx
+// CHECK: @llvm.ppc.altivec.lvsl
+// CHECK: store <4 x float> zeroinitializer
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.lvsr
+// CHECK: @llvm.ppc.altivec.vperm
+// CHECK: @llvm.ppc.altivec.stvxl
+// CHECK-LE: @llvm.ppc.altivec.lvx
+// CHECK-LE: @llvm.ppc.altivec.lvsl
+// CHECK-LE: store <4 x float> zeroinitializer
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.lvsr
+// CHECK-LE: @llvm.ppc.altivec.vperm
+// CHECK-LE: @llvm.ppc.altivec.stvxl
/* vec_promote */
- res_vsc = vec_promote(param_sc, 0); // CHECK: store <16 x i8> zeroinitializer
- // CHECK: insertelement <16 x i8>
+ res_vsc = vec_promote(param_sc, 0);
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: insertelement <16 x i8>
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: insertelement <16 x i8>
+
+ res_vuc = vec_promote(param_uc, 0);
+// CHECK: store <16 x i8> zeroinitializer
+// CHECK: insertelement <16 x i8>
+// CHECK-LE: store <16 x i8> zeroinitializer
+// CHECK-LE: insertelement <16 x i8>
+
+ res_vs = vec_promote(param_s, 0);
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: insertelement <8 x i16>
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: insertelement <8 x i16>
+
+ res_vus = vec_promote(param_us, 0);
+// CHECK: store <8 x i16> zeroinitializer
+// CHECK: insertelement <8 x i16>
+// CHECK-LE: store <8 x i16> zeroinitializer
+// CHECK-LE: insertelement <8 x i16>
+
+ res_vi = vec_promote(param_i, 0);
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: insertelement <4 x i32>
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: insertelement <4 x i32>
+
+ res_vui = vec_promote(param_ui, 0);
+// CHECK: store <4 x i32> zeroinitializer
+// CHECK: insertelement <4 x i32>
+// CHECK-LE: store <4 x i32> zeroinitializer
+// CHECK-LE: insertelement <4 x i32>
+
+ res_vf = vec_promote(param_f, 0);
+// CHECK: store <4 x float> zeroinitializer
+// CHECK: insertelement <4 x float>
+// CHECK-LE: store <4 x float> zeroinitializer
+// CHECK-LE: insertelement <4 x float>
- res_vuc = vec_promote(param_uc, 0); // CHECK: store <16 x i8> zeroinitializer
- // CHECK: insertelement <16 x i8>
+ /* vec_splats */
+ res_vsc = vec_splats(param_sc);
+// CHECK: insertelement <16 x i8>
+// CHECK-LE: insertelement <16 x i8>
- res_vs = vec_promote(param_s, 0); // CHECK: store <8 x i16> zeroinitializer
- // CHECK: insertelement <8 x i16>
+ res_vuc = vec_splats(param_uc);
+// CHECK: insertelement <16 x i8>
+// CHECK-LE: insertelement <16 x i8>
- res_vus = vec_promote(param_us, 0); // CHECK: store <8 x i16> zeroinitializer
- // CHECK: insertelement <8 x i16>
+ res_vs = vec_splats(param_s);
+// CHECK: insertelement <8 x i16>
+// CHECK-LE: insertelement <8 x i16>
- res_vi = vec_promote(param_i, 0); // CHECK: store <4 x i32> zeroinitializer
- // CHECK: insertelement <4 x i32>
+ res_vus = vec_splats(param_us);
+// CHECK: insertelement <8 x i16>
+// CHECK-LE: insertelement <8 x i16>
- res_vui = vec_promote(param_ui, 0); // CHECK: store <4 x i32> zeroinitializer
- // CHECK: insertelement <4 x i32>
+ res_vi = vec_splats(param_i);
+// CHECK: insertelement <4 x i32>
+// CHECK-LE: insertelement <4 x i32>
- res_vf = vec_promote(param_f, 0); // CHECK: store <4 x float> zeroinitializer
- // CHECK: insertelement <4 x float>
+ res_vui = vec_splats(param_ui);
+// CHECK: insertelement <4 x i32>
+// CHECK-LE: insertelement <4 x i32>
- /* vec_splats */
- res_vsc = vec_splats(param_sc); // CHECK: insertelement <16 x i8>
+ res_vf = vec_splats(param_f);
+// CHECK: insertelement <4 x float>
+// CHECK-LE: insertelement <4 x float>
- res_vuc = vec_splats(param_uc); // CHECK: insertelement <16 x i8>
+ /* ------------------------------ predicates -------------------------------------- */
- res_vs = vec_splats(param_s); // CHECK: insertelement <8 x i16>
+ /* vec_all_eq */
+ res_i = vec_all_eq(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
- res_vus = vec_splats(param_us); // CHECK: insertelement <8 x i16>
+ res_i = vec_all_eq(vsc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
- res_vi = vec_splats(param_i); // CHECK: insertelement <4 x i32>
+ res_i = vec_all_eq(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
- res_vui = vec_splats(param_ui); // CHECK: insertelement <4 x i32>
+ res_i = vec_all_eq(vuc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
- res_vf = vec_splats(param_f); // CHECK: insertelement <4 x float>
+ res_i = vec_all_eq(vbc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
- /* ------------------------------ predicates -------------------------------------- */
+ res_i = vec_all_eq(vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
- /* vec_all_eq */
- res_i = vec_all_eq(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_all_eq(vsc, vbc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_all_eq(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_all_eq(vuc, vbc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_all_eq(vbc, vsc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_all_eq(vbc, vuc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_all_eq(vbc, vbc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_all_eq(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_all_eq(vs, vbs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_all_eq(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_all_eq(vus, vbs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_all_eq(vbs, vs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_all_eq(vbs, vus); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_all_eq(vbs, vbs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_all_eq(vp, vp); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_all_eq(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_all_eq(vi, vbi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_all_eq(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_all_eq(vui, vbi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_all_eq(vbi, vi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_all_eq(vbi, vui); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_all_eq(vbi, vbi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_all_eq(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpeqfp.p
+ res_i = vec_all_eq(vbc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
+
+ res_i = vec_all_eq(vs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_all_eq(vs, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_all_eq(vus, vus);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_all_eq(vus, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_all_eq(vbs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_all_eq(vbs, vus);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_all_eq(vbs, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_all_eq(vp, vp);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_all_eq(vi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_all_eq(vi, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_all_eq(vui, vui);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_all_eq(vui, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_all_eq(vbi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_all_eq(vbi, vui);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_all_eq(vbi, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_all_eq(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpeqfp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpeqfp.p
/* vec_all_ge */
- res_i = vec_all_ge(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
- res_i = vec_all_ge(vsc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
- res_i = vec_all_ge(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_all_ge(vuc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_all_ge(vbc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_all_ge(vbc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_all_ge(vbc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_all_ge(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
- res_i = vec_all_ge(vs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
- res_i = vec_all_ge(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_all_ge(vus, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_all_ge(vbs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_all_ge(vbs, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_all_ge(vbs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_all_ge(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
- res_i = vec_all_ge(vi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
- res_i = vec_all_ge(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_all_ge(vui, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_all_ge(vbi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_all_ge(vbi, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_all_ge(vbi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_all_ge(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp.p
+ res_i = vec_all_ge(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p
+
+ res_i = vec_all_ge(vsc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p
+
+ res_i = vec_all_ge(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_all_ge(vuc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_all_ge(vbc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_all_ge(vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_all_ge(vbc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_all_ge(vs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p
+
+ res_i = vec_all_ge(vs, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p
+
+ res_i = vec_all_ge(vus, vus);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_all_ge(vus, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_all_ge(vbs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_all_ge(vbs, vus);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_all_ge(vbs, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_all_ge(vi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p
+
+ res_i = vec_all_ge(vi, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p
+
+ res_i = vec_all_ge(vui, vui);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_all_ge(vui, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_all_ge(vbi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_all_ge(vbi, vui);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_all_ge(vbi, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_all_ge(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpgefp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgefp.p
/* vec_all_gt */
- res_i = vec_all_gt(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
- res_i = vec_all_gt(vsc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
- res_i = vec_all_gt(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_all_gt(vuc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_all_gt(vbc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_all_gt(vbc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_all_gt(vbc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_all_gt(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
- res_i = vec_all_gt(vs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
- res_i = vec_all_gt(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_all_gt(vus, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_all_gt(vbs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_all_gt(vbs, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_all_gt(vbs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_all_gt(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
- res_i = vec_all_gt(vi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
- res_i = vec_all_gt(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_all_gt(vui, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_all_gt(vbi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_all_gt(vbi, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_all_gt(vbi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_all_gt(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgtfp.p
+ res_i = vec_all_gt(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p
+
+ res_i = vec_all_gt(vsc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p
+
+ res_i = vec_all_gt(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_all_gt(vuc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_all_gt(vbc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_all_gt(vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_all_gt(vbc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_all_gt(vs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p
+
+ res_i = vec_all_gt(vs, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p
+
+ res_i = vec_all_gt(vus, vus);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_all_gt(vus, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_all_gt(vbs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_all_gt(vbs, vus);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_all_gt(vbs, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_all_gt(vi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p
+
+ res_i = vec_all_gt(vi, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p
+
+ res_i = vec_all_gt(vui, vui);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_all_gt(vui, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_all_gt(vbi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_all_gt(vbi, vui);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_all_gt(vbi, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_all_gt(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpgtfp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtfp.p
/* vec_all_in */
- res_i = vec_all_in(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpbfp.p
+ res_i = vec_all_in(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpbfp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpbfp.p
/* vec_all_le */
- res_i = vec_all_le(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
- res_i = vec_all_le(vsc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
- res_i = vec_all_le(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_all_le(vuc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_all_le(vbc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_all_le(vbc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_all_le(vbc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_all_le(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
- res_i = vec_all_le(vs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
- res_i = vec_all_le(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_all_le(vus, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_all_le(vbs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_all_le(vbs, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_all_le(vbs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_all_le(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
- res_i = vec_all_le(vi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
- res_i = vec_all_le(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_all_le(vui, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_all_le(vbi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_all_le(vbi, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_all_le(vbi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_all_le(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp.p
+ res_i = vec_all_le(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p
+
+ res_i = vec_all_le(vsc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p
+
+ res_i = vec_all_le(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_all_le(vuc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_all_le(vbc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_all_le(vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_all_le(vbc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_all_le(vs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p
+
+ res_i = vec_all_le(vs, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p
+
+ res_i = vec_all_le(vus, vus);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_all_le(vus, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_all_le(vbs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_all_le(vbs, vus);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_all_le(vbs, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_all_le(vi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p
+
+ res_i = vec_all_le(vi, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p
+
+ res_i = vec_all_le(vui, vui);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_all_le(vui, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_all_le(vbi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_all_le(vbi, vui);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_all_le(vbi, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_all_le(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpgefp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgefp.p
/* vec_all_lt */
- res_i = vec_all_lt(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
- res_i = vec_all_lt(vsc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
- res_i = vec_all_lt(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_all_lt(vuc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_all_lt(vbc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_all_lt(vbc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_all_lt(vbc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_all_lt(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
- res_i = vec_all_lt(vs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
- res_i = vec_all_lt(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_all_lt(vus, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_all_lt(vbs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_all_lt(vbs, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_all_lt(vbs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_all_lt(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
- res_i = vec_all_lt(vi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
- res_i = vec_all_lt(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_all_lt(vui, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_all_lt(vbi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_all_lt(vbi, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_all_lt(vbi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_all_lt(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgtfp.p
+ res_i = vec_all_lt(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p
+
+ res_i = vec_all_lt(vsc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p
+
+ res_i = vec_all_lt(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_all_lt(vuc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_all_lt(vbc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_all_lt(vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_all_lt(vbc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_all_lt(vs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p
+
+ res_i = vec_all_lt(vs, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p
+
+ res_i = vec_all_lt(vus, vus);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_all_lt(vus, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_all_lt(vbs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_all_lt(vbs, vus);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_all_lt(vbs, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_all_lt(vi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p
+
+ res_i = vec_all_lt(vi, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p
+
+ res_i = vec_all_lt(vui, vui);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_all_lt(vui, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_all_lt(vbi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_all_lt(vbi, vui);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_all_lt(vbi, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_all_lt(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpgtfp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtfp.p
/* vec_all_nan */
- res_i = vec_all_nan(vf); // CHECK: @llvm.ppc.altivec.vcmpeqfp.p
+ res_i = vec_all_nan(vf);
+// CHECK: @llvm.ppc.altivec.vcmpeqfp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpeqfp.p
/* vec_all_ne */
- res_i = vec_all_ne(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_all_ne(vsc, vbc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_all_ne(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_all_ne(vuc, vbc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_all_ne(vbc, vsc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_all_ne(vbc, vuc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_all_ne(vbc, vbc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_all_ne(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_all_ne(vs, vbs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_all_ne(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_all_ne(vus, vbs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_all_ne(vbs, vs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_all_ne(vbs, vus); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_all_ne(vbs, vbs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_all_ne(vp, vp); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_all_ne(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_all_ne(vi, vbi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_all_ne(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_all_ne(vui, vbi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_all_ne(vbi, vi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_all_ne(vbi, vui); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_all_ne(vbi, vbi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_all_ne(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpeqfp.p
+ res_i = vec_all_ne(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
+
+ res_i = vec_all_ne(vsc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
+
+ res_i = vec_all_ne(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
+
+ res_i = vec_all_ne(vuc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
+
+ res_i = vec_all_ne(vbc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
+
+ res_i = vec_all_ne(vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
+
+ res_i = vec_all_ne(vbc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
+
+ res_i = vec_all_ne(vs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_all_ne(vs, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_all_ne(vus, vus);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_all_ne(vus, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_all_ne(vbs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_all_ne(vbs, vus);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_all_ne(vbs, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_all_ne(vp, vp);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_all_ne(vi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_all_ne(vi, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_all_ne(vui, vui);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_all_ne(vui, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_all_ne(vbi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_all_ne(vbi, vui);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_all_ne(vbi, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_all_ne(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpeqfp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpeqfp.p
/* vec_all_nge */
- res_i = vec_all_nge(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp.p
+ res_i = vec_all_nge(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpgefp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgefp.p
/* vec_all_ngt */
- res_i = vec_all_ngt(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgtfp.p
+ res_i = vec_all_ngt(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpgtfp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtfp.p
/* vec_all_nle */
- res_i = vec_all_nle(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp.p
+ res_i = vec_all_nle(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpgefp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgefp.p
/* vec_all_nlt */
- res_i = vec_all_nlt(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgtfp.p
+ res_i = vec_all_nlt(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpgtfp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtfp.p
/* vec_all_numeric */
- res_i = vec_all_numeric(vf); // CHECK: @llvm.ppc.altivec.vcmpeqfp.p
+ res_i = vec_all_numeric(vf);
+// CHECK: @llvm.ppc.altivec.vcmpeqfp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpeqfp.p
/* vec_any_eq */
- res_i = vec_any_eq(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_any_eq(vsc, vbc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_any_eq(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_any_eq(vuc, vbc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_any_eq(vbc, vsc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_any_eq(vbc, vuc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_any_eq(vbc, vbc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_any_eq(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_any_eq(vs, vbs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_any_eq(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_any_eq(vus, vbs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_any_eq(vbs, vs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_any_eq(vbs, vus); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_any_eq(vbs, vbs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_any_eq(vp, vp); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_any_eq(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_any_eq(vi, vbi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_any_eq(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_any_eq(vui, vbi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_any_eq(vbi, vi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_any_eq(vbi, vui); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_any_eq(vbi, vbi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_any_eq(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpeqfp.p
+ res_i = vec_any_eq(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
+
+ res_i = vec_any_eq(vsc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
+
+ res_i = vec_any_eq(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
+
+ res_i = vec_any_eq(vuc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
+
+ res_i = vec_any_eq(vbc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
+
+ res_i = vec_any_eq(vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
+
+ res_i = vec_any_eq(vbc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
+
+ res_i = vec_any_eq(vs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_any_eq(vs, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_any_eq(vus, vus);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_any_eq(vus, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_any_eq(vbs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_any_eq(vbs, vus);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_any_eq(vbs, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_any_eq(vp, vp);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_any_eq(vi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_any_eq(vi, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_any_eq(vui, vui);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_any_eq(vui, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_any_eq(vbi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_any_eq(vbi, vui);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_any_eq(vbi, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_any_eq(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpeqfp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpeqfp.p
/* vec_any_ge */
- res_i = vec_any_ge(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
- res_i = vec_any_ge(vsc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
- res_i = vec_any_ge(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_any_ge(vuc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_any_ge(vbc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_any_ge(vbc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_any_ge(vbc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_any_ge(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
- res_i = vec_any_ge(vs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
- res_i = vec_any_ge(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_any_ge(vus, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_any_ge(vbs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_any_ge(vbs, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_any_ge(vbs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_any_ge(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
- res_i = vec_any_ge(vi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
- res_i = vec_any_ge(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_any_ge(vui, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_any_ge(vbi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_any_ge(vbi, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_any_ge(vbi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_any_ge(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp.p
+ res_i = vec_any_ge(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p
+
+ res_i = vec_any_ge(vsc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p
+
+ res_i = vec_any_ge(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_any_ge(vuc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_any_ge(vbc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_any_ge(vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_any_ge(vbc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_any_ge(vs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p
+
+ res_i = vec_any_ge(vs, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p
+
+ res_i = vec_any_ge(vus, vus);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_any_ge(vus, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_any_ge(vbs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_any_ge(vbs, vus);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_any_ge(vbs, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_any_ge(vi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p
+
+ res_i = vec_any_ge(vi, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p
+
+ res_i = vec_any_ge(vui, vui);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_any_ge(vui, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_any_ge(vbi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_any_ge(vbi, vui);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_any_ge(vbi, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_any_ge(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpgefp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgefp.p
/* vec_any_gt */
- res_i = vec_any_gt(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
- res_i = vec_any_gt(vsc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
- res_i = vec_any_gt(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_any_gt(vuc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_any_gt(vbc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_any_gt(vbc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_any_gt(vbc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_any_gt(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
- res_i = vec_any_gt(vs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
- res_i = vec_any_gt(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_any_gt(vus, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_any_gt(vbs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_any_gt(vbs, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_any_gt(vbs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_any_gt(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
- res_i = vec_any_gt(vi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
- res_i = vec_any_gt(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_any_gt(vui, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_any_gt(vbi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_any_gt(vbi, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_any_gt(vbi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_any_gt(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgtfp.p
+ res_i = vec_any_gt(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p
+
+ res_i = vec_any_gt(vsc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p
+
+ res_i = vec_any_gt(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_any_gt(vuc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_any_gt(vbc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_any_gt(vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_any_gt(vbc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_any_gt(vs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p
+
+ res_i = vec_any_gt(vs, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p
+
+ res_i = vec_any_gt(vus, vus);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_any_gt(vus, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_any_gt(vbs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_any_gt(vbs, vus);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_any_gt(vbs, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_any_gt(vi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p
+
+ res_i = vec_any_gt(vi, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p
+
+ res_i = vec_any_gt(vui, vui);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_any_gt(vui, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_any_gt(vbi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_any_gt(vbi, vui);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_any_gt(vbi, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_any_gt(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpgtfp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtfp.p
/* vec_any_le */
- res_i = vec_any_le(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
- res_i = vec_any_le(vsc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
- res_i = vec_any_le(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_any_le(vuc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_any_le(vbc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_any_le(vbc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_any_le(vbc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_any_le(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
- res_i = vec_any_le(vs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
- res_i = vec_any_le(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_any_le(vus, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_any_le(vbs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_any_le(vbs, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_any_le(vbs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_any_le(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
- res_i = vec_any_le(vi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
- res_i = vec_any_le(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_any_le(vui, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_any_le(vbi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_any_le(vbi, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_any_le(vbi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_any_le(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp.p
+ res_i = vec_any_le(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p
+
+ res_i = vec_any_le(vsc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p
+
+ res_i = vec_any_le(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_any_le(vuc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_any_le(vbc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_any_le(vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_any_le(vbc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_any_le(vs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p
+
+ res_i = vec_any_le(vs, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p
+
+ res_i = vec_any_le(vus, vus);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_any_le(vus, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_any_le(vbs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_any_le(vbs, vus);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_any_le(vbs, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_any_le(vi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p
+
+ res_i = vec_any_le(vi, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p
+
+ res_i = vec_any_le(vui, vui);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_any_le(vui, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_any_le(vbi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_any_le(vbi, vui);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_any_le(vbi, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_any_le(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpgefp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgefp.p
/* vec_any_lt */
- res_i = vec_any_lt(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
- res_i = vec_any_lt(vsc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p
- res_i = vec_any_lt(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_any_lt(vuc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_any_lt(vbc, vsc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_any_lt(vbc, vuc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_any_lt(vbc, vbc); // CHECK: @llvm.ppc.altivec.vcmpgtub.p
- res_i = vec_any_lt(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
- res_i = vec_any_lt(vs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p
- res_i = vec_any_lt(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_any_lt(vus, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_any_lt(vbs, vs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_any_lt(vbs, vus); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_any_lt(vbs, vbs); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p
- res_i = vec_any_lt(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
- res_i = vec_any_lt(vi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p
- res_i = vec_any_lt(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_any_lt(vui, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_any_lt(vbi, vi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_any_lt(vbi, vui); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_any_lt(vbi, vbi); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p
- res_i = vec_any_lt(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgtfp.p
+ res_i = vec_any_lt(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p
+
+ res_i = vec_any_lt(vsc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p
+
+ res_i = vec_any_lt(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_any_lt(vuc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_any_lt(vbc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_any_lt(vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_any_lt(vbc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p
+
+ res_i = vec_any_lt(vs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p
+
+ res_i = vec_any_lt(vs, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p
+
+ res_i = vec_any_lt(vus, vus);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_any_lt(vus, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_any_lt(vbs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_any_lt(vbs, vus);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_any_lt(vbs, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p
+
+ res_i = vec_any_lt(vi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p
+
+ res_i = vec_any_lt(vi, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p
+
+ res_i = vec_any_lt(vui, vui);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_any_lt(vui, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_any_lt(vbi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_any_lt(vbi, vui);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_any_lt(vbi, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p
+
+ res_i = vec_any_lt(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpgtfp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtfp.p
/* vec_any_nan */
- res_i = vec_any_nan(vf); // CHECK: @llvm.ppc.altivec.vcmpeqfp.p
+ res_i = vec_any_nan(vf);
+// CHECK: @llvm.ppc.altivec.vcmpeqfp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpeqfp.p
/* vec_any_ne */
- res_i = vec_any_ne(vsc, vsc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_any_ne(vsc, vbc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_any_ne(vuc, vuc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_any_ne(vuc, vbc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_any_ne(vbc, vsc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_any_ne(vbc, vuc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_any_ne(vbc, vbc); // CHECK: @llvm.ppc.altivec.vcmpequb.p
- res_i = vec_any_ne(vs, vs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_any_ne(vs, vbs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_any_ne(vus, vus); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_any_ne(vus, vbs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_any_ne(vbs, vs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_any_ne(vbs, vus); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_any_ne(vbs, vbs); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_any_ne(vp, vp); // CHECK: @llvm.ppc.altivec.vcmpequh.p
- res_i = vec_any_ne(vi, vi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_any_ne(vi, vbi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_any_ne(vui, vui); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_any_ne(vui, vbi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_any_ne(vbi, vi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_any_ne(vbi, vui); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_any_ne(vbi, vbi); // CHECK: @llvm.ppc.altivec.vcmpequw.p
- res_i = vec_any_ne(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpeqfp.p
+ res_i = vec_any_ne(vsc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
+
+ res_i = vec_any_ne(vsc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
+
+ res_i = vec_any_ne(vuc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
+
+ res_i = vec_any_ne(vuc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
+
+ res_i = vec_any_ne(vbc, vsc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
+
+ res_i = vec_any_ne(vbc, vuc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
+
+ res_i = vec_any_ne(vbc, vbc);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p
+
+ res_i = vec_any_ne(vs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_any_ne(vs, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_any_ne(vus, vus);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_any_ne(vus, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_any_ne(vbs, vs);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_any_ne(vbs, vus);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_any_ne(vbs, vbs);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_any_ne(vp, vp);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p
+
+ res_i = vec_any_ne(vi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_any_ne(vi, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_any_ne(vui, vui);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_any_ne(vui, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_any_ne(vbi, vi);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_any_ne(vbi, vui);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_any_ne(vbi, vbi);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p
+
+ res_i = vec_any_ne(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpeqfp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpeqfp.p
/* vec_any_nge */
- res_i = vec_any_nge(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp.p
+ res_i = vec_any_nge(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpgefp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgefp.p
/* vec_any_ngt */
- res_i = vec_any_ngt(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgtfp.p
+ res_i = vec_any_ngt(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpgtfp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtfp.p
/* vec_any_nle */
- res_i = vec_any_nle(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgefp.p
+ res_i = vec_any_nle(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpgefp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgefp.p
/* vec_any_nlt */
- res_i = vec_any_nlt(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpgtfp.p
+ res_i = vec_any_nlt(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpgtfp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtfp.p
/* vec_any_numeric */
- res_i = vec_any_numeric(vf); // CHECK: @llvm.ppc.altivec.vcmpeqfp.p
+ res_i = vec_any_numeric(vf);
+// CHECK: @llvm.ppc.altivec.vcmpeqfp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpeqfp.p
/* vec_any_out */
- res_i = vec_any_out(vf, vf); // CHECK: @llvm.ppc.altivec.vcmpbfp.p
+ res_i = vec_any_out(vf, vf);
+// CHECK: @llvm.ppc.altivec.vcmpbfp.p
+// CHECK-LE: @llvm.ppc.altivec.vcmpbfp.p
}
/* ------------------------------ Relational Operators ------------------------------ */
@@ -3059,58 +8517,183 @@ void test6() {
void test7() {
vector signed char vsc1 = (vector signed char)(-1);
vector signed char vsc2 = (vector signed char)(-2);
- res_i = (vsc1 == vsc2); // CHECK: @llvm.ppc.altivec.vcmpequb.p(i32 2
- res_i = (vsc1 != vsc2); // CHECK: @llvm.ppc.altivec.vcmpequb.p(i32 0
- res_i = (vsc1 < vsc2); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p(i32 2
- res_i = (vsc1 > vsc2); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p(i32 2
- res_i = (vsc1 <= vsc2); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p(i32 0
- res_i = (vsc1 >= vsc2); // CHECK: @llvm.ppc.altivec.vcmpgtsb.p(i32 0
+ res_i = (vsc1 == vsc2);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p(i32 2
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p(i32 2
+
+ res_i = (vsc1 != vsc2);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p(i32 0
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p(i32 0
+
+ res_i = (vsc1 < vsc2);
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p(i32 2
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p(i32 2
+
+ res_i = (vsc1 > vsc2);
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p(i32 2
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p(i32 2
+
+ res_i = (vsc1 <= vsc2);
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p(i32 0
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p(i32 0
+
+ res_i = (vsc1 >= vsc2);
+// CHECK: @llvm.ppc.altivec.vcmpgtsb.p(i32 0
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsb.p(i32 0
+
vector unsigned char vuc1 = (vector unsigned char)(1);
vector unsigned char vuc2 = (vector unsigned char)(2);
- res_i = (vuc1 == vuc2); // CHECK: @llvm.ppc.altivec.vcmpequb.p(i32 2
- res_i = (vuc1 != vuc2); // CHECK: @llvm.ppc.altivec.vcmpequb.p(i32 0
- res_i = (vuc1 < vuc2); // CHECK: @llvm.ppc.altivec.vcmpgtub.p(i32 2
- res_i = (vuc1 > vuc2); // CHECK: @llvm.ppc.altivec.vcmpgtub.p(i32 2
- res_i = (vuc1 <= vuc2); // CHECK: @llvm.ppc.altivec.vcmpgtub.p(i32 0
- res_i = (vuc1 >= vuc2); // CHECK: @llvm.ppc.altivec.vcmpgtub.p(i32 0
+ res_i = (vuc1 == vuc2);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p(i32 2
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p(i32 2
+
+ res_i = (vuc1 != vuc2);
+// CHECK: @llvm.ppc.altivec.vcmpequb.p(i32 0
+// CHECK-LE: @llvm.ppc.altivec.vcmpequb.p(i32 0
+
+ res_i = (vuc1 < vuc2);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p(i32 2
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p(i32 2
+
+ res_i = (vuc1 > vuc2);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p(i32 2
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p(i32 2
+
+ res_i = (vuc1 <= vuc2);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p(i32 0
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p(i32 0
+
+ res_i = (vuc1 >= vuc2);
+// CHECK: @llvm.ppc.altivec.vcmpgtub.p(i32 0
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtub.p(i32 0
+
vector short vs1 = (vector short)(-1);
vector short vs2 = (vector short)(-2);
- res_i = (vs1 == vs2); // CHECK: @llvm.ppc.altivec.vcmpequh.p(i32 2
- res_i = (vs1 != vs2); // CHECK: @llvm.ppc.altivec.vcmpequh.p(i32 0
- res_i = (vs1 < vs2); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p(i32 2
- res_i = (vs1 > vs2); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p(i32 2
- res_i = (vs1 <= vs2); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p(i32 0
- res_i = (vs1 >= vs2); // CHECK: @llvm.ppc.altivec.vcmpgtsh.p(i32 0
+ res_i = (vs1 == vs2);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p(i32 2
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p(i32 2
+
+ res_i = (vs1 != vs2);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p(i32 0
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p(i32 0
+
+ res_i = (vs1 < vs2);
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p(i32 2
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p(i32 2
+
+ res_i = (vs1 > vs2);
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p(i32 2
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p(i32 2
+
+ res_i = (vs1 <= vs2);
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p(i32 0
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p(i32 0
+
+ res_i = (vs1 >= vs2);
+// CHECK: @llvm.ppc.altivec.vcmpgtsh.p(i32 0
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsh.p(i32 0
+
vector unsigned short vus1 = (vector unsigned short)(1);
vector unsigned short vus2 = (vector unsigned short)(2);
- res_i = (vus1 == vus2); // CHECK: @llvm.ppc.altivec.vcmpequh.p(i32 2
- res_i = (vus1 != vus2); // CHECK: @llvm.ppc.altivec.vcmpequh.p(i32 0
- res_i = (vus1 < vus2); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p(i32 2
- res_i = (vus1 > vus2); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p(i32 2
- res_i = (vus1 <= vus2); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p(i32 0
- res_i = (vus1 >= vus2); // CHECK: @llvm.ppc.altivec.vcmpgtuh.p(i32 0
+ res_i = (vus1 == vus2);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p(i32 2
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p(i32 2
+
+ res_i = (vus1 != vus2);
+// CHECK: @llvm.ppc.altivec.vcmpequh.p(i32 0
+// CHECK-LE: @llvm.ppc.altivec.vcmpequh.p(i32 0
+
+ res_i = (vus1 < vus2);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p(i32 2
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p(i32 2
+
+ res_i = (vus1 > vus2);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p(i32 2
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p(i32 2
+
+ res_i = (vus1 <= vus2);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p(i32 0
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p(i32 0
+
+ res_i = (vus1 >= vus2);
+// CHECK: @llvm.ppc.altivec.vcmpgtuh.p(i32 0
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuh.p(i32 0
+
vector int vi1 = (vector int)(-1);
vector int vi2 = (vector int)(-2);
- res_i = (vi1 == vi2); // CHECK: @llvm.ppc.altivec.vcmpequw.p(i32 2
- res_i = (vi1 != vi2); // CHECK: @llvm.ppc.altivec.vcmpequw.p(i32 0
- res_i = (vi1 < vi2); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p(i32 2
- res_i = (vi1 > vi2); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p(i32 2
- res_i = (vi1 <= vi2); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p(i32 0
- res_i = (vi1 >= vi2); // CHECK: @llvm.ppc.altivec.vcmpgtsw.p(i32 0
+ res_i = (vi1 == vi2);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p(i32 2
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p(i32 2
+
+ res_i = (vi1 != vi2);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p(i32 0
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p(i32 0
+
+ res_i = (vi1 < vi2);
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p(i32 2
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p(i32 2
+
+ res_i = (vi1 > vi2);
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p(i32 2
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p(i32 2
+
+ res_i = (vi1 <= vi2);
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p(i32 0
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p(i32 0
+
+ res_i = (vi1 >= vi2);
+// CHECK: @llvm.ppc.altivec.vcmpgtsw.p(i32 0
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtsw.p(i32 0
+
vector unsigned int vui1 = (vector unsigned int)(1);
vector unsigned int vui2 = (vector unsigned int)(2);
- res_i = (vui1 == vui2); // CHECK: @llvm.ppc.altivec.vcmpequw.p(i32 2
- res_i = (vui1 != vui2); // CHECK: @llvm.ppc.altivec.vcmpequw.p(i32 0
- res_i = (vui1 < vui2); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p(i32 2
- res_i = (vui1 > vui2); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p(i32 2
- res_i = (vui1 <= vui2); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p(i32 0
- res_i = (vui1 >= vui2); // CHECK: @llvm.ppc.altivec.vcmpgtuw.p(i32 0
+ res_i = (vui1 == vui2);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p(i32 2
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p(i32 2
+
+ res_i = (vui1 != vui2);
+// CHECK: @llvm.ppc.altivec.vcmpequw.p(i32 0
+// CHECK-LE: @llvm.ppc.altivec.vcmpequw.p(i32 0
+
+ res_i = (vui1 < vui2);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p(i32 2
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p(i32 2
+
+ res_i = (vui1 > vui2);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p(i32 2
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p(i32 2
+
+ res_i = (vui1 <= vui2);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p(i32 0
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p(i32 0
+
+ res_i = (vui1 >= vui2);
+// CHECK: @llvm.ppc.altivec.vcmpgtuw.p(i32 0
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtuw.p(i32 0
+
vector float vf1 = (vector float)(1.0);
vector float vf2 = (vector float)(2.0);
- res_i = (vf1 == vf2); // CHECK: @llvm.ppc.altivec.vcmpeqfp.p(i32 2
- res_i = (vf1 != vf2); // CHECK: @llvm.ppc.altivec.vcmpeqfp.p(i32 0
- res_i = (vf1 < vf2); // CHECK: @llvm.ppc.altivec.vcmpgtfp.p(i32 2
- res_i = (vf1 > vf2); // CHECK: @llvm.ppc.altivec.vcmpgtfp.p(i32 2
- res_i = (vf1 <= vf2); // CHECK: @llvm.ppc.altivec.vcmpgefp.p(i32 2
- res_i = (vf1 >= vf2); // CHECK: @llvm.ppc.altivec.vcmpgefp.p(i32 2
+ res_i = (vf1 == vf2);
+// CHECK: @llvm.ppc.altivec.vcmpeqfp.p(i32 2
+// CHECK-LE: @llvm.ppc.altivec.vcmpeqfp.p(i32 2
+
+ res_i = (vf1 != vf2);
+// CHECK: @llvm.ppc.altivec.vcmpeqfp.p(i32 0
+// CHECK-LE: @llvm.ppc.altivec.vcmpeqfp.p(i32 0
+
+ res_i = (vf1 < vf2);
+// CHECK: @llvm.ppc.altivec.vcmpgtfp.p(i32 2
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtfp.p(i32 2
+
+ res_i = (vf1 > vf2);
+// CHECK: @llvm.ppc.altivec.vcmpgtfp.p(i32 2
+// CHECK-LE: @llvm.ppc.altivec.vcmpgtfp.p(i32 2
+
+ res_i = (vf1 <= vf2);
+// CHECK: @llvm.ppc.altivec.vcmpgefp.p(i32 2
+// CHECK-LE: @llvm.ppc.altivec.vcmpgefp.p(i32 2
+
+ res_i = (vf1 >= vf2);
+// CHECK: @llvm.ppc.altivec.vcmpgefp.p(i32 2
+// CHECK-LE: @llvm.ppc.altivec.vcmpgefp.p(i32 2
}
diff --git a/test/CodeGen/builtins-ppc.c b/test/CodeGen/builtins-ppc.c
index ee27a4c742f1..9ef5e3708f58 100644
--- a/test/CodeGen/builtins-ppc.c
+++ b/test/CodeGen/builtins-ppc.c
@@ -1,4 +1,4 @@
-// REQUIRES: ppc32-registered-target
+// REQUIRES: powerpc-registered-target
// RUN: %clang_cc1 -triple powerpc-unknown-unknown -emit-llvm %s -o - | FileCheck %s
void test_eh_return_data_regno()
diff --git a/test/CodeGen/builtins-x86.c b/test/CodeGen/builtins-x86.c
index 261bf2f5d8b3..0f038b87355c 100644
--- a/test/CodeGen/builtins-x86.c
+++ b/test/CodeGen/builtins-x86.c
@@ -263,6 +263,10 @@ void f0() {
tmp_V4f = __builtin_ia32_cvtpi2ps(tmp_V4f, tmp_V2i);
tmp_V2i = __builtin_ia32_cvtps2pi(tmp_V4f);
tmp_i = __builtin_ia32_cvtss2si(tmp_V4f);
+
+ tmp_i = __builtin_ia32_rdtsc();
+ tmp_i = __builtin_ia32_rdtscp(&tmp_Ui);
+ tmp_LLi = __builtin_ia32_rdpmc(tmp_i);
#ifdef USE_64
tmp_LLi = __builtin_ia32_cvtss2si64(tmp_V4f);
#endif
@@ -448,9 +452,6 @@ void f0() {
tmp_i = __builtin_ia32_movmskps256(tmp_V8f);
__builtin_ia32_vzeroall();
__builtin_ia32_vzeroupper();
- tmp_V4f = __builtin_ia32_vbroadcastss(tmp_fCp);
- tmp_V4d = __builtin_ia32_vbroadcastsd256(tmp_dCp);
- tmp_V8f = __builtin_ia32_vbroadcastss256(tmp_fCp);
tmp_V4d = __builtin_ia32_vbroadcastf128_pd256(tmp_V2dCp);
tmp_V8f = __builtin_ia32_vbroadcastf128_ps256(tmp_V4fCp);
__builtin_ia32_storeupd256(tmp_dp, tmp_V4d);
diff --git a/test/CodeGen/builtinshufflevector2.c b/test/CodeGen/builtinshufflevector2.c
index 04405b5cd159..8712c991fe18 100644
--- a/test/CodeGen/builtinshufflevector2.c
+++ b/test/CodeGen/builtinshufflevector2.c
@@ -6,23 +6,23 @@ typedef unsigned int uint4 __attribute__((ext_vector_type(4)));
// CHECK-LABEL: define void @clang_shufflevector_v_v(
void clang_shufflevector_v_v( float4* A, float4 x, uint4 mask ) {
// CHECK: [[MASK:%.*]] = and <4 x i32> {{%.*}}, <i32 3, i32 3, i32 3, i32 3>
-// CHECK: [[I:%.*]] = extractelement <4 x i32> [[MASK]], i32 0
-// CHECK: [[E:%.*]] = extractelement <4 x float> [[X:%.*]], i32 [[I]]
+// CHECK: [[I:%.*]] = extractelement <4 x i32> [[MASK]], i{{[0-9]+}} 0
+// CHECK: [[E:%.*]] = extractelement <4 x float> [[X:%.*]], i{{[0-9]+}} [[I]]
//
// Here is where ToT Clang code generation makes a mistake.
// It uses [[I]] as the insertion index instead of 0.
// Similarly on the remaining insertelement.
-// CHECK: [[V:%[a-zA-Z0-9._]+]] = insertelement <4 x float> undef, float [[E]], i32 0
+// CHECK: [[V:%[a-zA-Z0-9._]+]] = insertelement <4 x float> undef, float [[E]], i{{[0-9]+}} 0
-// CHECK: [[I:%.*]] = extractelement <4 x i32> [[MASK]], i32 1
-// CHECK: [[E:%.*]] = extractelement <4 x float> [[X]], i32 [[I]]
-// CHECK: [[V2:%.*]] = insertelement <4 x float> [[V]], float [[E]], i32 1
-// CHECK: [[I:%.*]] = extractelement <4 x i32> [[MASK]], i32 2
-// CHECK: [[E:%.*]] = extractelement <4 x float> [[X]], i32 [[I]]
-// CHECK: [[V3:%.*]] = insertelement <4 x float> [[V2]], float [[E]], i32 2
-// CHECK: [[I:%.*]] = extractelement <4 x i32> [[MASK]], i32 3
-// CHECK: [[E:%.*]] = extractelement <4 x float> [[X]], i32 [[I]]
-// CHECK: [[V4:%.*]] = insertelement <4 x float> [[V3]], float [[E]], i32 3
+// CHECK: [[I:%.*]] = extractelement <4 x i32> [[MASK]], i{{[0-9]+}} 1
+// CHECK: [[E:%.*]] = extractelement <4 x float> [[X]], i{{[0-9]+}} [[I]]
+// CHECK: [[V2:%.*]] = insertelement <4 x float> [[V]], float [[E]], i{{[0-9]+}} 1
+// CHECK: [[I:%.*]] = extractelement <4 x i32> [[MASK]], i{{[0-9]+}} 2
+// CHECK: [[E:%.*]] = extractelement <4 x float> [[X]], i{{[0-9]+}} [[I]]
+// CHECK: [[V3:%.*]] = insertelement <4 x float> [[V2]], float [[E]], i{{[0-9]+}} 2
+// CHECK: [[I:%.*]] = extractelement <4 x i32> [[MASK]], i{{[0-9]+}} 3
+// CHECK: [[E:%.*]] = extractelement <4 x float> [[X]], i{{[0-9]+}} [[I]]
+// CHECK: [[V4:%.*]] = insertelement <4 x float> [[V3]], float [[E]], i{{[0-9]+}} 3
// CHECK: store <4 x float> [[V4]], <4 x float>* {{%.*}},
*A = __builtin_shufflevector( x, mask );
}
diff --git a/test/CodeGen/c-strings.c b/test/CodeGen/c-strings.c
index ff86619117ad..d82bc2572e44 100644
--- a/test/CodeGen/c-strings.c
+++ b/test/CodeGen/c-strings.c
@@ -1,14 +1,18 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=ITANIUM
+// RUN: %clang_cc1 -triple %ms_abi_triple -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=MSABI
// Should be 3 hello strings, two global (of different sizes), the rest are
// shared.
// CHECK: @align = global i8 [[ALIGN:[0-9]+]]
-// CHECK: @.str = private unnamed_addr constant [6 x i8] c"hello\00"
-// CHECK: @f1.x = internal global i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0)
+// ITANIUM: @.str = private unnamed_addr constant [6 x i8] c"hello\00"
+// MSABI: @"\01??_C@_05CJBACGMB@hello?$AA@" = linkonce_odr unnamed_addr constant [6 x i8] c"hello\00", align 1
+// ITANIUM: @f1.x = internal global i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0)
+// MSABI: @f1.x = internal global i8* getelementptr inbounds ([6 x i8]* @"\01??_C@_05CJBACGMB@hello?$AA@", i32 0, i32 0)
// CHECK: @f2.x = internal global [6 x i8] c"hello\00", align [[ALIGN]]
// CHECK: @f3.x = internal global [8 x i8] c"hello\00\00\00", align [[ALIGN]]
-// CHECK: @f4.x = internal global %struct.s { i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0) }
+// ITANIUM: @f4.x = internal global %struct.s { i8* getelementptr inbounds ([6 x i8]* @.str, i32 0, i32 0) }
+// MSABI: @f4.x = internal global %struct.s { i8* getelementptr inbounds ([6 x i8]* @"\01??_C@_05CJBACGMB@hello?$AA@", i32 0, i32 0) }
// CHECK: @x = global [3 x i8] c"ola", align [[ALIGN]]
#if defined(__s390x__)
@@ -22,7 +26,8 @@ void bar(const char *);
// CHECK-LABEL: define void @f0()
void f0() {
bar("hello");
- // CHECK: call void @bar({{.*}} @.str
+ // ITANIUM: call void @bar({{.*}} @.str
+ // MSABI: call void @bar({{.*}} @"\01??_C@_05CJBACGMB@hello?$AA@"
}
// CHECK-LABEL: define void @f1()
diff --git a/test/CodeGen/c11atomics.c b/test/CodeGen/c11atomics.c
index 5c761b137498..f4c9522cbdb2 100644
--- a/test/CodeGen/c11atomics.c
+++ b/test/CodeGen/c11atomics.c
@@ -12,6 +12,9 @@
// they're sufficiently rare that it's not worth making sure that the semantics
// are correct.
+// CHECK: @testStructGlobal = global {{.*}} { i16 1, i16 2, i16 3, i16 4 }
+// CHECK: @testPromotedStructGlobal = global {{.*}} { %{{.*}} { i16 1, i16 2, i16 3 }, [2 x i8] zeroinitializer }
+
typedef int __attribute__((vector_size(16))) vector;
_Atomic(_Bool) b;
@@ -224,6 +227,7 @@ void testComplexFloat(_Atomic(_Complex float) *fp) {
}
typedef struct { short x, y, z, w; } S;
+_Atomic S testStructGlobal = (S){1, 2, 3, 4};
// CHECK: define arm_aapcscc void @testStruct([[S:.*]]*
void testStruct(_Atomic(S) *fp) {
// CHECK: [[FP:%.*]] = alloca [[S]]*, align 4
@@ -272,6 +276,7 @@ void testStruct(_Atomic(S) *fp) {
}
typedef struct { short x, y, z; } PS;
+_Atomic PS testPromotedStructGlobal = (PS){1, 2, 3};
// CHECK: define arm_aapcscc void @testPromotedStruct([[APS:.*]]*
void testPromotedStruct(_Atomic(PS) *fp) {
// CHECK: [[FP:%.*]] = alloca [[APS]]*, align 4
diff --git a/test/CodeGen/captured-statements-nested.c b/test/CodeGen/captured-statements-nested.c
index d8ec74692adf..2ff9ee9cc88c 100644
--- a/test/CodeGen/captured-statements-nested.c
+++ b/test/CodeGen/captured-statements-nested.c
@@ -8,11 +8,12 @@ struct A {
char c;
};
-void test_nest_captured_stmt(int param) {
+void test_nest_captured_stmt(int param, int size, int param_arr[size]) {
int w;
- // CHECK1: %struct.anon{{.*}} = type { i32*, i32* }
- // CHECK1: %struct.anon{{.*}} = type { i32*, i32*, i32**, i32* }
- // CHECK1: [[T:%struct.anon.*]] = type { i32*, i32*, %struct.A*, i32**, i32* }
+ int arr[param][size];
+ // CHECK1: %struct.anon{{.*}} = type { i32*, i32*, i{{.+}}*, i32**, i32* }
+ // CHECK1: %struct.anon{{.*}} = type { i32*, i32*, i32**, i32*, i{{.+}}*, i32**, i32* }
+ // CHECK1: [[T:%struct.anon.*]] = type { i32*, i32*, %struct.A*, i32**, i32*, i{{.+}}*, i32**, i32* }
#pragma clang __debug captured
{
int x;
@@ -26,13 +27,15 @@ void test_nest_captured_stmt(int param) {
*y = param;
z.b = 0.1f;
z.c = 'c';
+ param_arr[size - 1] = 2;
+ arr[10][z.a] = 12;
// CHECK1: define internal void @__captured_stmt{{.*}}([[T]]
//
// CHECK1: getelementptr inbounds [[T]]* {{.*}}, i32 0, i32 2
// CHECK1-NEXT: load %struct.A**
// CHECK1-NEXT: getelementptr inbounds %struct.A*
- // CHECK1-NEXT: store i32 1
+ // CHECK1-NEXT: store i{{.+}} 1
//
// CHECK1: getelementptr inbounds [[T]]* {{.*}}, i32 0, i32 1
// CHECK1-NEXT: load i32**
@@ -59,6 +62,27 @@ void test_nest_captured_stmt(int param) {
// CHECK1-NEXT: load %struct.A**
// CHECK1-NEXT: getelementptr inbounds %struct.A*
// CHECK1-NEXT: store i8 99
+ //
+ // CHECK1: [[SIZE_ADDR_REF:%.*]] = getelementptr inbounds [[T]]* {{.*}}, i{{.+}} 0, i{{.+}} 5
+ // CHECK1-DAG: [[SIZE_ADDR:%.*]] = load i{{.+}}** [[SIZE_ADDR_REF]]
+ // CHECK1-DAG: [[SIZE:%.*]] = load i{{.+}}* [[SIZE_ADDR]]
+ // CHECK1-DAG: [[PARAM_ARR_IDX:%.*]] = sub nsw i{{.+}} [[SIZE]], 1
+ // CHECK1-DAG: [[PARAM_ARR_ADDR_REF:%.*]] = getelementptr inbounds [[T]]* {{.*}}, i{{.+}} 0, i{{.+}} 6
+ // CHECK1-DAG: [[PARAM_ARR_ADDR:%.*]] = load i{{.+}}*** [[PARAM_ARR_ADDR_REF]]
+ // CHECK1-DAG: [[PARAM_ARR:%.*]] = load i{{.+}}** [[PARAM_ARR_ADDR]]
+ // CHECK1-DAG: [[PARAM_ARR_SIZE_MINUS_1_ADDR:%.*]] = getelementptr inbounds i{{.+}}* [[PARAM_ARR]], i{{.*}}
+ // CHECK1: store i{{.+}} 2, i{{.+}}* [[PARAM_ARR_SIZE_MINUS_1_ADDR]]
+ //
+ // CHECK1: [[Z_ADDR_REF:%.*]] = getelementptr inbounds [[T]]* {{.*}}, i{{.+}} 0, i{{.+}} 2
+ // CHECK1-DAG: [[Z_ADDR:%.*]] = load %struct.A** [[Z_ADDR_REF]]
+ // CHECK1-DAG: [[Z_A_ADDR:%.*]] = getelementptr inbounds %struct.A* [[Z_ADDR]], i{{.+}} 0, i{{.+}} 0
+ // CHECK1-DAG: [[ARR_IDX_2:%.*]] = load i{{.+}}* [[Z_A_ADDR]]
+ // CHECK1-DAG: [[ARR_ADDR_REF:%.*]] = getelementptr inbounds [[T]]* {{.*}}, i{{.+}} 0, i{{.+}} 7
+ // CHECK1-DAG: [[ARR_ADDR:%.*]] = load i{{.+}}** [[ARR_ADDR_REF]]
+ // CHECK1-DAG: [[ARR_IDX_1:%.*]] = mul {{.*}} 10
+ // CHECK1-DAG: [[ARR_10_ADDR:%.*]] = getelementptr inbounds i{{.+}}* [[ARR_ADDR]], i{{.*}} [[ARR_IDX_1]]
+ // CHECK1-DAG: [[ARR_10_Z_A_ADDR:%.*]] = getelementptr inbounds i{{.+}}* [[ARR_10_ADDR]], i{{.*}}
+ // CHECK1: store i{{.+}} 12, i{{.+}}* [[ARR_10_Z_A_ADDR]]
}
}
}
diff --git a/test/CodeGen/captured-statements.c b/test/CodeGen/captured-statements.c
index c87c1873506b..85d597aeb3c3 100644
--- a/test/CodeGen/captured-statements.c
+++ b/test/CodeGen/captured-statements.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o %t
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o %t
// RUN: FileCheck %s -input-file=%t -check-prefix=CHECK-GLOBALS
// RUN: FileCheck %s -input-file=%t -check-prefix=CHECK-1
// RUN: FileCheck %s -input-file=%t -check-prefix=CHECK-2
@@ -48,17 +48,31 @@ void test2(int x) {
// CHECK-2: %i = alloca i32
// Capture array
-void test3() {
+void test3(int size) {
int arr[] = {1, 2, 3, 4, 5};
+ int vla_arr[size];
#pragma clang __debug captured
{
- arr[2] = arr[1];
+ arr[2] = vla_arr[size - 1];
}
// CHECK-3: test3
// CHECK-3: alloca [5 x i32]
// CHECK-3: call void @__captured_stmt
}
+// Capture VLA array
+void test4(int size, int vla_arr[size]) {
+ #pragma clang __debug captured
+ {
+ vla_arr[0] = 1;
+ }
+ // CHECK-3: test4([[INT:i.+]] {{.*}}[[SIZE:%.+]], [[INT]]*
+ // CHECK-3: store [[INT]] {{.*}}[[SIZE]], [[INT]]* [[SIZE_ADDR:%.+]],
+ // CHECK-3: [[REF:%.+]] = getelementptr inbounds
+ // CHECK-3: store [[INT]]* [[SIZE_ADDR]], [[INT]]** [[REF]]
+ // CHECK-3: call void @__captured_stmt
+}
+
void dont_capture_global() {
static int s;
extern int e;
diff --git a/test/CodeGen/catch-undef-behavior.c b/test/CodeGen/catch-undef-behavior.c
index 9be261467d2f..00962e40f665 100644
--- a/test/CodeGen/catch-undef-behavior.c
+++ b/test/CodeGen/catch-undef-behavior.c
@@ -22,9 +22,9 @@
// CHECK-NULL: @[[LINE_100:.*]] = private unnamed_addr global {{.*}}, i32 100, i32 5 {{.*}}
// PR6805
-// CHECK: @foo
-// CHECK-NULL: @foo
-// CHECK-TRAP: @foo
+// CHECK-LABEL: @foo
+// CHECK-NULL-LABEL: @foo
+// CHECK-TRAP-LABEL: @foo
void foo() {
union { int i; } u;
// CHECK: %[[CHECK0:.*]] = icmp ne {{.*}}* %[[PTR:.*]], null
@@ -49,7 +49,7 @@ void foo() {
// CHECK-TRAP-NEXT: %[[CHECK2:.*]] = icmp eq i64 %[[MISALIGN]], 0
// CHECK: %[[OK:.*]] = and i1 %[[CHECK01]], %[[CHECK2]]
- // CHECK-NEXT: br i1 %[[OK]], {{.*}} !prof ![[WEIGHT_MD:.*]]
+ // CHECK-NEXT: br i1 %[[OK]], {{.*}} !prof ![[WEIGHT_MD:.*]], !nosanitize
// CHECK-TRAP: %[[OK:.*]] = and i1 %[[CHECK01]], %[[CHECK2]]
// CHECK-TRAP-NEXT: br i1 %[[OK]], {{.*}}
@@ -68,8 +68,8 @@ void foo() {
u.i=1;
}
-// CHECK: @bar
-// CHECK-TRAP: @bar
+// CHECK-LABEL: @bar
+// CHECK-TRAP-LABEL: @bar
int bar(int *a) {
// CHECK: %[[SIZE:.*]] = call i64 @llvm.objectsize.i64
// CHECK-NEXT: icmp uge i64 %[[SIZE]], 4
@@ -95,14 +95,14 @@ int bar(int *a) {
return *a;
}
-// CHECK: @addr_space
+// CHECK-LABEL: @addr_space
int addr_space(int __attribute__((address_space(256))) *a) {
// CHECK-NOT: __ubsan
return *a;
}
-// CHECK: @lsh_overflow
-// CHECK-TRAP: @lsh_overflow
+// CHECK-LABEL: @lsh_overflow
+// CHECK-TRAP-LABEL: @lsh_overflow
int lsh_overflow(int a, int b) {
// CHECK: %[[INBOUNDS:.*]] = icmp ule i32 %[[RHS:.*]], 31
// CHECK-NEXT: br i1 %[[INBOUNDS]], label %[[CHECKBB:.*]], label %[[CONTBB:.*]]
@@ -145,8 +145,8 @@ int lsh_overflow(int a, int b) {
return a << b;
}
-// CHECK: @rsh_inbounds
-// CHECK-TRAP: @rsh_inbounds
+// CHECK-LABEL: @rsh_inbounds
+// CHECK-TRAP-LABEL: @rsh_inbounds
int rsh_inbounds(int a, int b) {
// CHECK: %[[INBOUNDS:.*]] = icmp ule i32 %[[RHS:.*]], 31
// CHECK: br i1 %[[INBOUNDS]]
@@ -170,8 +170,8 @@ int rsh_inbounds(int a, int b) {
return a >> b;
}
-// CHECK: @load
-// CHECK-TRAP: @load
+// CHECK-LABEL: @load
+// CHECK-TRAP-LABEL: @load
int load(int *p) {
// CHECK: call void @__ubsan_handle_type_mismatch(i8* bitcast ({{.*}} @[[LINE_500]] to i8*), i64 %{{.*}})
@@ -181,8 +181,8 @@ int load(int *p) {
return *p;
}
-// CHECK: @store
-// CHECK-TRAP: @store
+// CHECK-LABEL: @store
+// CHECK-TRAP-LABEL: @store
void store(int *p, int q) {
// CHECK: call void @__ubsan_handle_type_mismatch(i8* bitcast ({{.*}} @[[LINE_600]] to i8*), i64 %{{.*}})
@@ -194,8 +194,8 @@ void store(int *p, int q) {
struct S { int k; };
-// CHECK: @member_access
-// CHECK-TRAP: @member_access
+// CHECK-LABEL: @member_access
+// CHECK-TRAP-LABEL: @member_access
int *member_access(struct S *p) {
// CHECK: call void @__ubsan_handle_type_mismatch(i8* bitcast ({{.*}} @[[LINE_700]] to i8*), i64 %{{.*}})
@@ -205,8 +205,8 @@ int *member_access(struct S *p) {
return &p->k;
}
-// CHECK: @signed_overflow
-// CHECK-TRAP: @signed_overflow
+// CHECK-LABEL: @signed_overflow
+// CHECK-TRAP-LABEL: @signed_overflow
int signed_overflow(int a, int b) {
// CHECK: %[[ARG1:.*]] = zext
// CHECK-NEXT: %[[ARG2:.*]] = zext
@@ -218,8 +218,8 @@ int signed_overflow(int a, int b) {
return a + b;
}
-// CHECK: @no_return
-// CHECK-TRAP: @no_return
+// CHECK-LABEL: @no_return
+// CHECK-TRAP-LABEL: @no_return
int no_return() {
// Reaching the end of a noreturn function is fine in C.
// FIXME: If the user explicitly requests -fsanitize=return, we should catch
@@ -233,7 +233,7 @@ int no_return() {
// CHECK-TRAP: ret i32
}
-// CHECK: @vla_bound
+// CHECK-LABEL: @vla_bound
void vla_bound(int n) {
// CHECK: icmp sgt i32 %[[PARAM:.*]], 0
//
@@ -243,14 +243,14 @@ void vla_bound(int n) {
int arr[n * 3];
}
-// CHECK: @int_float_no_overflow
+// CHECK-LABEL: @int_float_no_overflow
float int_float_no_overflow(__int128 n) {
// CHECK-NOT: call void @__ubsan_handle
return n;
}
-// CHECK: @int_float_overflow
-// CHECK-TRAP: @int_float_overflow
+// CHECK-LABEL: @int_float_overflow
+// CHECK-TRAP-LABEL: @int_float_overflow
float int_float_overflow(unsigned __int128 n) {
// This is 2**104. FLT_MAX is 2**128 - 2**104.
// CHECK: icmp ule i128 %{{.*}}, -20282409603651670423947251286016
@@ -264,8 +264,8 @@ float int_float_overflow(unsigned __int128 n) {
return n;
}
-// CHECK: @int_fp16_overflow
-// CHECK-TRAP: @int_fp16_overflow
+// CHECK-LABEL: @int_fp16_overflow
+// CHECK-TRAP-LABEL: @int_fp16_overflow
void int_fp16_overflow(int n, __fp16 *p) {
// CHECK: %[[GE:.*]] = icmp sge i32 %{{.*}}, -65504
// CHECK: %[[LE:.*]] = icmp sle i32 %{{.*}}, 65504
@@ -282,8 +282,8 @@ void int_fp16_overflow(int n, __fp16 *p) {
*p = n;
}
-// CHECK: @float_int_overflow
-// CHECK-TRAP: @float_int_overflow
+// CHECK-LABEL: @float_int_overflow
+// CHECK-TRAP-LABEL: @float_int_overflow
int float_int_overflow(float f) {
// CHECK: %[[GE:.*]] = fcmp ogt float %[[F:.*]], 0xC1E0000020000000
// CHECK: %[[LE:.*]] = fcmp olt float %[[F]], 0x41E0000000000000
@@ -303,15 +303,15 @@ int float_int_overflow(float f) {
return f;
}
-// CHECK: @long_double_int_overflow
-// CHECK-TRAP: @long_double_int_overflow
+// CHECK-LABEL: @long_double_int_overflow
+// CHECK-TRAP-LABEL: @long_double_int_overflow
int long_double_int_overflow(long double ld) {
// CHECK: alloca x86_fp80
// CHECK: %[[GE:.*]] = fcmp ogt x86_fp80 %[[F:.*]], 0xKC01E8000000100000000
// CHECK: %[[LE:.*]] = fcmp olt x86_fp80 %[[F]], 0xK401E8000000000000000
// CHECK: and i1 %[[GE]], %[[LE]]
- // CHECK: store x86_fp80 %[[F]], x86_fp80* %[[ALLOCA:.*]]
+ // CHECK: store x86_fp80 %[[F]], x86_fp80* %[[ALLOCA:.*]], !nosanitize
// CHECK: %[[ARG:.*]] = ptrtoint x86_fp80* %[[ALLOCA]] to i64
// CHECK: call void @__ubsan_handle_float_cast_overflow({{.*}}, i64 %[[ARG]]
@@ -325,8 +325,8 @@ int long_double_int_overflow(long double ld) {
return ld;
}
-// CHECK: @float_uint_overflow
-// CHECK-TRAP: @float_uint_overflow
+// CHECK-LABEL: @float_uint_overflow
+// CHECK-TRAP-LABEL: @float_uint_overflow
unsigned float_uint_overflow(float f) {
// CHECK: %[[GE:.*]] = fcmp ogt float %[[F:.*]], -1.{{0*}}e+00
// CHECK: %[[LE:.*]] = fcmp olt float %[[F]], 0x41F0000000000000
@@ -343,8 +343,8 @@ unsigned float_uint_overflow(float f) {
return f;
}
-// CHECK: @fp16_char_overflow
-// CHECK-TRAP: @fp16_char_overflow
+// CHECK-LABEL: @fp16_char_overflow
+// CHECK-TRAP-LABEL: @fp16_char_overflow
signed char fp16_char_overflow(__fp16 *p) {
// CHECK: %[[GE:.*]] = fcmp ogt float %[[F:.*]], -1.29{{0*}}e+02
// CHECK: %[[LE:.*]] = fcmp olt float %[[F]], 1.28{{0*}}e+02
@@ -361,8 +361,8 @@ signed char fp16_char_overflow(__fp16 *p) {
return *p;
}
-// CHECK: @float_float_overflow
-// CHECK-TRAP: @float_float_overflow
+// CHECK-LABEL: @float_float_overflow
+// CHECK-TRAP-LABEL: @float_float_overflow
float float_float_overflow(double f) {
// CHECK: %[[F:.*]] = call double @llvm.fabs.f64(
// CHECK: %[[GE:.*]] = fcmp ogt double %[[F]], 0x47EFFFFFE0000000
@@ -382,8 +382,8 @@ float float_float_overflow(double f) {
return f;
}
-// CHECK: @int_divide_overflow
-// CHECK-OVERFLOW: @int_divide_overflow
+// CHECK-LABEL: @int_divide_overflow
+// CHECK-OVERFLOW-LABEL: @int_divide_overflow
int int_divide_overflow(int a, int b) {
// CHECK: %[[ZERO:.*]] = icmp ne i32 %[[B:.*]], 0
// CHECK-OVERFLOW-NOT: icmp ne i32 %{{.*}}, 0
@@ -418,7 +418,7 @@ int int_divide_overflow(int a, int b) {
// CHECK-TRAP: }
}
-// CHECK: @sour_bool
+// CHECK-LABEL: @sour_bool
_Bool sour_bool(_Bool *p) {
// CHECK: %[[OK:.*]] = icmp ule i8 {{.*}}, 1
// CHECK: br i1 %[[OK]]
diff --git a/test/CodeGen/cfstring.c b/test/CodeGen/cfstring.c
index 9d98b56e6b84..fc86e42a6fca 100644
--- a/test/CodeGen/cfstring.c
+++ b/test/CodeGen/cfstring.c
@@ -5,9 +5,9 @@
//
// RUN: %clang_cc1 -fwritable-strings -emit-llvm %s -o - | FileCheck %s
//
-// CHECK: @.str = linker_private unnamed_addr constant [14 x i8] c"Hello, World!\00", align 1
-// CHECK: @.str1 = linker_private unnamed_addr constant [7 x i8] c"yo joe\00", align 1
-// CHECK: @.str3 = linker_private unnamed_addr constant [16 x i8] c"Goodbye, World!\00", align 1
+// CHECK: @.str = private unnamed_addr constant [14 x i8] c"Hello, World!\00", section "__TEXT,__cstring,cstring_literals", align 1
+// CHECK: @.str1 = private unnamed_addr constant [7 x i8] c"yo joe\00", section "__TEXT,__cstring,cstring_literals", align 1
+// CHECK: @.str3 = private unnamed_addr constant [16 x i8] c"Goodbye, World!\00", section "__TEXT,__cstring,cstring_literals", align 1
#define CFSTR __builtin___CFStringMakeConstantString
diff --git a/test/CodeGen/clear_cache.c b/test/CodeGen/clear_cache.c
new file mode 100644
index 000000000000..f859d7fdc9a0
--- /dev/null
+++ b/test/CodeGen/clear_cache.c
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+
+char buffer[32] = "This is a largely unused buffer";
+
+// __builtin___clear_cache always maps to @llvm.clear_cache, but what
+// each back-end produces is different, and this is tested in LLVM
+
+int main() {
+ __builtin___clear_cache(buffer, buffer+32);
+// CHECK: @llvm.clear_cache(i8* getelementptr {{.*}}, i8* getelementptr {{.*}} (i8* getelementptr {{.*}} 32))
+ return 0;
+}
diff --git a/test/CodeGen/complex-convert.c b/test/CodeGen/complex-convert.c
index e35be9c14917..6ecb884704c3 100644
--- a/test/CodeGen/complex-convert.c
+++ b/test/CodeGen/complex-convert.c
@@ -22,9 +22,14 @@ void foo(signed char sc, unsigned char uc, signed long long sll,
_Complex signed long long csll1;
_Complex unsigned long long cull1;
// CHECK-LABEL: define void @foo(
- // CHECK: alloca i[[CHSIZE:[0-9]+]], align [[CHALIGN:[0-9]+]]
- // CHECK-NEXT: alloca i[[CHSIZE]], align [[CHALIGN]]
- // CHECK-NEXT: alloca i[[LLSIZE:[0-9]+]], align [[LLALIGN:[0-9]+]]
+ // Match the prototype to pick up the size of sc and sll.
+ // CHECK: i[[CHSIZE:[0-9]+]]{{[^,]*}},
+ // CHECK: i[[CHSIZE]]{{[^,]*}},
+ // CHECK: i[[LLSIZE:[0-9]+]]
+
+ // Match against the allocas to pick up the alignments.
+ // CHECK: alloca i[[CHSIZE]], align [[CHALIGN:[0-9]+]]
+ // CHECK: alloca i[[LLSIZE]], align [[LLALIGN:[0-9]+]]
sc1 = csc;
// CHECK: %[[VAR1:[A-Za-z0-9.]+]] = getelementptr inbounds { i[[CHSIZE]], i[[CHSIZE]] }* %[[CSC:[A-Za-z0-9.]+]], i{{[0-9]+}} 0, i{{[0-9]+}} 0
diff --git a/test/CodeGen/cxx-default-arg.cpp b/test/CodeGen/cxx-default-arg.cpp
index 12e266640818..7688e7912867 100644
--- a/test/CodeGen/cxx-default-arg.cpp
+++ b/test/CodeGen/cxx-default-arg.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o %t
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o %t
// Note-LABEL: define CLANG_GENERATE_KNOWN_GOOD and compile to generate code
// that makes all of the defaulted arguments explicit. The resulting
diff --git a/test/CodeGen/darwin-string-literals.c b/test/CodeGen/darwin-string-literals.c
index c7d9ff916000..41e59cb14f5d 100644
--- a/test/CodeGen/darwin-string-literals.c
+++ b/test/CodeGen/darwin-string-literals.c
@@ -1,17 +1,17 @@
// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix CHECK-LSB %s
// CHECK-LSB: @.str = private unnamed_addr constant [8 x i8] c"string0\00"
-// CHECK-LSB: @.str1 = linker_private unnamed_addr constant [8 x i8] c"string1\00"
-// CHECK-LSB: @.str2 = internal unnamed_addr constant [18 x i16] [i16 104, i16 101, i16 108, i16 108, i16 111, i16 32, i16 8594, i16 32, i16 9731, i16 32, i16 8592, i16 32, i16 119, i16 111, i16 114, i16 108, i16 100, i16 0], align 2
-// CHECK-LSB: @.str4 = internal unnamed_addr constant [6 x i16] [i16 116, i16 101, i16 115, i16 116, i16 8482, i16 0], align 2
+// CHECK-LSB: @.str1 = private unnamed_addr constant [8 x i8] c"string1\00"
+// CHECK-LSB: @.str2 = private unnamed_addr constant [18 x i16] [i16 104, i16 101, i16 108, i16 108, i16 111, i16 32, i16 8594, i16 32, i16 9731, i16 32, i16 8592, i16 32, i16 119, i16 111, i16 114, i16 108, i16 100, i16 0], section "__TEXT,__ustring", align 2
+// CHECK-LSB: @.str4 = private unnamed_addr constant [6 x i16] [i16 116, i16 101, i16 115, i16 116, i16 8482, i16 0], section "__TEXT,__ustring", align 2
// RUN: %clang_cc1 -triple powerpc-apple-darwin9 -emit-llvm %s -o - | FileCheck -check-prefix CHECK-MSB %s
// CHECK-MSB: @.str = private unnamed_addr constant [8 x i8] c"string0\00"
-// CHECK-MSB: @.str1 = linker_private unnamed_addr constant [8 x i8] c"string1\00"
-// CHECK-MSB: @.str2 = internal unnamed_addr constant [18 x i16] [i16 104, i16 101, i16 108, i16 108, i16 111, i16 32, i16 8594, i16 32, i16 9731, i16 32, i16 8592, i16 32, i16 119, i16 111, i16 114, i16 108, i16 100, i16 0], align 2
-// CHECK-MSB: @.str4 = internal unnamed_addr constant [6 x i16] [i16 116, i16 101, i16 115, i16 116, i16 8482, i16 0], align 2
+// CHECK-MSB: @.str1 = private unnamed_addr constant [8 x i8] c"string1\00"
+// CHECK-MSB: @.str2 = private unnamed_addr constant [18 x i16] [i16 104, i16 101, i16 108, i16 108, i16 111, i16 32, i16 8594, i16 32, i16 9731, i16 32, i16 8592, i16 32, i16 119, i16 111, i16 114, i16 108, i16 100, i16 0], section "__TEXT,__ustring", align 2
+// CHECK-MSB: @.str4 = private unnamed_addr constant [6 x i16] [i16 116, i16 101, i16 115, i16 116, i16 8482, i16 0], section "__TEXT,__ustring", align 2
const char *g0 = "string0";
const void *g1 = __builtin___CFStringMakeConstantString("string1");
diff --git a/test/CodeGen/debug-dead-local-var.c b/test/CodeGen/debug-dead-local-var.c
deleted file mode 100644
index f9ca8f2f297d..000000000000
--- a/test/CodeGen/debug-dead-local-var.c
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %clang_cc1 -mllvm -asm-verbose -S -O2 -g %s -o - | FileCheck %s
-// Radar 8122864
-
-// Code is not generated for function foo, but preserve type information of
-// local variable xyz.
-static void foo() {
-// CHECK: DW_TAG_structure_type
- struct X { int a; int b; } xyz;
-}
-
-int bar() {
- foo();
- return 1;
-}
diff --git a/test/CodeGen/debug-info-block.c b/test/CodeGen/debug-info-block.c
index 403e4aaccb8c..35ee0dd6e76d 100644
--- a/test/CodeGen/debug-info-block.c
+++ b/test/CodeGen/debug-info-block.c
@@ -1,5 +1,4 @@
// RUN: %clang_cc1 -fblocks -g -emit-llvm -o - %s | FileCheck %s
-// APPLE LOCAL file 5939894 */
// Verify that the desired debugging type is generated for a structure
// member that is a pointer to a block.
diff --git a/test/CodeGen/debug-info-enum.c b/test/CodeGen/debug-info-enum.c
new file mode 100644
index 000000000000..acf3f524088b
--- /dev/null
+++ b/test/CodeGen/debug-info-enum.c
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
+
+// CHECK: metadata [[TEST3_ENUMS:![0-9]*]], {{[^,]*}}, null, null, null} ; [ DW_TAG_enumeration_type ] [e]
+// CHECK: [[TEST3_ENUMS]] = metadata !{metadata [[TEST3_E:![0-9]*]]}
+// CHECK: [[TEST3_E]] = {{.*}}, metadata !"E", i64 -1} ; [ DW_TAG_enumerator ] [E :: -1]
+
+enum e;
+void func(enum e *p) {
+}
+enum e { E = -1 };
diff --git a/test/CodeGen/debug-info-iv.c b/test/CodeGen/debug-info-iv.c
deleted file mode 100644
index aafd71d2ec2a..000000000000
--- a/test/CodeGen/debug-info-iv.c
+++ /dev/null
@@ -1,36 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin -Os -S -g -o - %s | FileCheck %s
-// REQUIRES: x86-registered-target
-
-int calculate(int);
-static void test_indvars(int *Array1, int Array2[100][200]) {
- unsigned i, j;
- Array1[1] = Array2[3][6] = 12345;
-
- for (i = 0; i < 100; i+=2)
- Array1[i] = i; /* Step by non unit amount */
-
- for (i = 3; i < 103; i++)
- Array1[i] = i+4; /* Step with an offset */
-
- for (i = 13; i < 100; i++)
- for (j = 0; j < 100; j+=3) /* 2d array access */
- Array2[i][j/3] = Array2[i][i];
-}
-
-
-int main() {
- int Array[100][200], i, j;
- double sum = 0.0;
-
- for (i=0; i < 100; i+=2)
- for (j=0; j < 200; j++)
- Array[i][j] = 0;
- test_indvars(Array[0], Array);
-
-//CHECK: .loc 2 31
- for (i=0; i < 100; i+=2)
- for (j=0; j < 200; j++)
- sum += Array[i][j];
-
- return calculate(sum);
-}
diff --git a/test/CodeGen/debug-info-scope-file.c b/test/CodeGen/debug-info-scope-file.c
new file mode 100644
index 000000000000..3479ade7a329
--- /dev/null
+++ b/test/CodeGen/debug-info-scope-file.c
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -g -emit-llvm < %s | FileCheck %s
+
+// Check that, just because we emitted a function from a different file doesn't
+// mean we insert a file-change inside the next function.
+
+// CHECK: ret void, !dbg [[F1_LINE:![0-9]*]]
+// CHECK: ret void, !dbg [[F2_LINE:![0-9]*]]
+// CHECK: [[F1:![0-9]*]] = {{.*}} ; [ DW_TAG_subprogram ] {{.*}} [def] [f1]
+// CHECK: [[F2:![0-9]*]] = {{.*}} ; [ DW_TAG_subprogram ] {{.*}} [def] [f2]
+// CHECK: [[F1_LINE]] = {{.*}}, metadata [[F1]], null}
+// CHECK: [[F2_LINE]] = {{.*}}, metadata [[F2]], null}
+
+void f1() {
+}
+
+# 2 "foo.c"
+
+void f2() {
+}
+
diff --git a/test/CodeGen/debug-info-typedef.c b/test/CodeGen/debug-info-typedef.c
new file mode 100644
index 000000000000..51ebcc4d8749
--- /dev/null
+++ b/test/CodeGen/debug-info-typedef.c
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -emit-llvm -g -I%p %s -o - | FileCheck %s
+// Test that the location of the typedef points to the header file.
+#line 1 "a.c"
+#line 2 "b.h"
+typedef int MyType;
+#line 2 "a.c"
+
+MyType a;
+
+// CHECK: metadata ![[HEADER:[0-9]+]], null, metadata !"MyType"{{.*}} ; [ DW_TAG_typedef ] [MyType] [line 2, size 0, align 0, offset 0] [from int]
+// CHECK: ![[HEADER]] = metadata !{metadata !"b.h",
diff --git a/test/CodeGen/debug-info-var-location.c b/test/CodeGen/debug-info-var-location.c
index 12edb0898274..41da7d382cb5 100644
--- a/test/CodeGen/debug-info-var-location.c
+++ b/test/CodeGen/debug-info-var-location.c
@@ -1,4 +1,5 @@
-// RUN: %clang -S -g -fverbose-asm %s -o - | FileCheck %s
+// FIXME: Check IR rather than asm, then triple is not needed.
+// RUN: %clang -Xclang -triple=%itanium_abi_triple -S -g -fverbose-asm %s -o - | FileCheck %s
// Radar 8461032
// CHECK: DW_AT_location
// CHECK-NEXT: byte 145
diff --git a/test/CodeGen/debug-info-version.c b/test/CodeGen/debug-info-version.c
index 3a74876de59b..325345f0b26e 100644
--- a/test/CodeGen/debug-info-version.c
+++ b/test/CodeGen/debug-info-version.c
@@ -4,5 +4,5 @@ int main (void) {
return 0;
}
-// CHECK: metadata !{i32 1, metadata !"Debug Info Version", i32 1}
+// CHECK: metadata !{i32 2, metadata !"Debug Info Version", i32 1}
// NO_DEBUG-NOT: metadata !"Debug Info Version"
diff --git a/test/CodeGen/dependent-lib.c b/test/CodeGen/dependent-lib.c
index df4aaf073060..20913d33f5be 100644
--- a/test/CodeGen/dependent-lib.c
+++ b/test/CodeGen/dependent-lib.c
@@ -2,13 +2,13 @@
// RUN: %clang_cc1 %s --dependent-lib=msvcrt -triple x86_64-pc-win32 -emit-llvm -o - | FileCheck %s
// RUN: %clang_cc1 %s --dependent-lib=msvcrt -triple i686-pc-linux -emit-llvm -o - | FileCheck -check-prefix LINUX %s
-// CHECK: !llvm.module.flags = !{!0}
-// CHECK: !0 = metadata !{i32 6, metadata !"Linker Options", metadata ![[link_opts:[0-9]+]]}
+// CHECK: !llvm.module.flags = !{{{.*}}}
+// CHECK: !{{[0-9]+}} = metadata !{i32 6, metadata !"Linker Options", metadata ![[link_opts:[0-9]+]]}
// CHECK: ![[link_opts]] = metadata !{metadata ![[msvcrt:[0-9]+]]}
// CHECK: ![[msvcrt]] = metadata !{metadata !"/DEFAULTLIB:msvcrt.lib"}
-// LINUX: !llvm.module.flags = !{!0}
-// LINUX: !0 = metadata !{i32 6, metadata !"Linker Options", metadata ![[link_opts:[0-9]+]]}
+// LINUX: !llvm.module.flags = !{{{.*}}}
+// LINUX: !{{[0-9]+}} = metadata !{i32 6, metadata !"Linker Options", metadata ![[link_opts:[0-9]+]]}
// LINUX: ![[link_opts]] = metadata !{metadata ![[msvcrt:[0-9]+]]}
// LINUX: ![[msvcrt]] = metadata !{metadata !"-lmsvcrt"}
diff --git a/test/CodeGen/disable-tail-calls.c b/test/CodeGen/disable-tail-calls.c
new file mode 100644
index 000000000000..b06610022659
--- /dev/null
+++ b/test/CodeGen/disable-tail-calls.c
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -emit-llvm -O1 -mdisable-tail-calls -o - < %s | FileCheck %s
+
+typedef struct List {
+ struct List *next;
+ int data;
+} List;
+
+// CHECK-LABEL: define %struct.List* @find
+List *find(List *head, int data) {
+ if (!head)
+ return 0;
+ if (head->data == data)
+ return head;
+ // CHECK: call %struct.List* @find
+ return find(head->next, data);
+}
diff --git a/test/CodeGen/dllexport.c b/test/CodeGen/dllexport.c
new file mode 100644
index 000000000000..43899949437e
--- /dev/null
+++ b/test/CodeGen/dllexport.c
@@ -0,0 +1,115 @@
+// RUN: %clang_cc1 -triple i686-windows-msvc -emit-llvm -std=c11 -O0 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-windows-msvc -emit-llvm -std=c11 -O0 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple i686-windows-gnu -emit-llvm -std=c11 -O0 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-windows-gnu -emit-llvm -std=c11 -O0 -o - %s | FileCheck %s
+
+
+
+//===----------------------------------------------------------------------===//
+// Globals
+//===----------------------------------------------------------------------===//
+
+// Declarations are not exported.
+// CHECK-NOT: @ExternGlobalDecl
+__declspec(dllexport) extern int ExternGlobalDecl;
+
+// dllexport implies a definition.
+// CHECK-DAG: @GlobalDef = common dllexport global i32 0, align 4
+__declspec(dllexport) int GlobalDef;
+
+// Export definition.
+// CHECK-DAG: @GlobalInit = dllexport global i32 1, align 4
+__declspec(dllexport) int GlobalInit = 1;
+
+// Declare, then export definition.
+// CHECK-DAG: @GlobalDeclInit = dllexport global i32 1, align 4
+__declspec(dllexport) extern int GlobalDeclInit;
+int GlobalDeclInit = 1;
+
+// Redeclarations
+// CHECK-DAG: @GlobalRedecl1 = common dllexport global i32 0, align 4
+__declspec(dllexport) extern int GlobalRedecl1;
+__declspec(dllexport) int GlobalRedecl1;
+
+// CHECK-DAG: @GlobalRedecl2 = common dllexport global i32 0, align 4
+__declspec(dllexport) extern int GlobalRedecl2;
+ int GlobalRedecl2;
+
+
+
+//===----------------------------------------------------------------------===//
+// Functions
+//===----------------------------------------------------------------------===//
+
+// Declarations are not exported.
+
+// Export function definition.
+// CHECK-DAG: define dllexport void @def()
+__declspec(dllexport) void def(void) {}
+
+// Export inline function.
+// CHECK-DAG: define weak_odr dllexport void @inlineFunc()
+// CHECK-DAG: define weak_odr dllexport void @externInlineFunc()
+__declspec(dllexport) inline void inlineFunc(void) {}
+__declspec(dllexport) inline void externInlineFunc(void) {}
+extern void externInlineFunc(void);
+
+// Redeclarations
+// CHECK-DAG: define dllexport void @redecl1()
+__declspec(dllexport) void redecl1(void);
+__declspec(dllexport) void redecl1(void) {}
+
+// CHECK-DAG: define dllexport void @redecl2()
+__declspec(dllexport) void redecl2(void);
+ void redecl2(void) {}
+
+
+
+//===----------------------------------------------------------------------===//
+// Precedence
+//===----------------------------------------------------------------------===//
+
+// dllexport takes precedence over the dllimport if both are specified.
+// CHECK-DAG: @PrecedenceGlobal1A = common dllexport global i32 0, align 4
+// CHECK-DAG: @PrecedenceGlobal1B = common dllexport global i32 0, align 4
+__attribute__((dllimport, dllexport)) int PrecedenceGlobal1A;
+__declspec(dllimport) __declspec(dllexport) int PrecedenceGlobal1B;
+
+// CHECK-DAG: @PrecedenceGlobal2A = common dllexport global i32 0, align 4
+// CHECK-DAG: @PrecedenceGlobal2B = common dllexport global i32 0, align 4
+__attribute__((dllexport, dllimport)) int PrecedenceGlobal2A;
+__declspec(dllexport) __declspec(dllimport) int PrecedenceGlobal2B;
+
+// CHECK-DAG: @PrecedenceGlobalRedecl1 = dllexport global i32 0, align 4
+__declspec(dllexport) extern int PrecedenceGlobalRedecl1;
+__declspec(dllimport) int PrecedenceGlobalRedecl1 = 0;
+
+// CHECK-DAG: @PrecedenceGlobalRedecl2 = common dllexport global i32 0, align 4
+__declspec(dllimport) extern int PrecedenceGlobalRedecl2;
+__declspec(dllexport) int PrecedenceGlobalRedecl2;
+
+// CHECK-DAG: @PrecedenceGlobalMixed1 = dllexport global i32 1, align 4
+__attribute__((dllexport)) extern int PrecedenceGlobalMixed1;
+__declspec(dllimport) int PrecedenceGlobalMixed1 = 1;
+
+// CHECK-DAG: @PrecedenceGlobalMixed2 = common dllexport global i32 0, align 4
+__attribute__((dllimport)) extern int PrecedenceGlobalMixed2;
+__declspec(dllexport) int PrecedenceGlobalMixed2;
+
+// CHECK-DAG: define dllexport void @precedence1A()
+// CHECK-DAG: define dllexport void @precedence1B()
+void __attribute__((dllimport, dllexport)) precedence1A(void) {}
+void __declspec(dllimport) __declspec(dllexport) precedence1B(void) {}
+
+// CHECK-DAG: define dllexport void @precedence2A()
+// CHECK-DAG: define dllexport void @precedence2B()
+void __attribute__((dllexport, dllimport)) precedence2A(void) {}
+void __declspec(dllexport) __declspec(dllimport) precedence2B(void) {}
+
+// CHECK-DAG: define dllexport void @precedenceRedecl1()
+void __declspec(dllimport) precedenceRedecl1(void);
+void __declspec(dllexport) precedenceRedecl1(void) {}
+
+// CHECK-DAG: define dllexport void @precedenceRedecl2()
+void __declspec(dllexport) precedenceRedecl2(void);
+void __declspec(dllimport) precedenceRedecl2(void) {}
diff --git a/test/CodeGen/dllimport-dllexport.c b/test/CodeGen/dllimport-dllexport.c
deleted file mode 100644
index e70ac03f04c7..000000000000
--- a/test/CodeGen/dllimport-dllexport.c
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %clang_cc1 -triple i386-mingw32 -emit-llvm < %s | FileCheck %s
-
-void __attribute__((dllimport)) foo1();
-void __attribute__((dllexport)) foo1(){}
-// CHECK-LABEL: define dllexport void @foo1
-void __attribute__((dllexport)) foo2();
-
-// PR6269
-__declspec(dllimport) void foo3();
-__declspec(dllexport) void foo3(){}
-// CHECK-LABEL: define dllexport void @foo3
-__declspec(dllexport) void foo4();
diff --git a/test/CodeGen/dllimport.c b/test/CodeGen/dllimport.c
new file mode 100644
index 000000000000..32ee81f85924
--- /dev/null
+++ b/test/CodeGen/dllimport.c
@@ -0,0 +1,93 @@
+// RUN: %clang_cc1 -triple i686-windows-msvc -emit-llvm -std=c11 -O0 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-windows-msvc -emit-llvm -std=c11 -O0 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple i686-windows-gnu -emit-llvm -std=c11 -O0 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-windows-gnu -emit-llvm -std=c11 -O0 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple i686-windows-msvc -emit-llvm -std=c11 -O1 -o - %s | FileCheck --check-prefix=O1 %s
+// RUN: %clang_cc1 -triple i686-windows-gnu -emit-llvm -std=c11 -O1 -o - %s | FileCheck --check-prefix=O1 %s
+
+#define JOIN2(x, y) x##y
+#define JOIN(x, y) JOIN2(x, y)
+#define USEVAR(var) int JOIN(use, __LINE__)() { return var; }
+#define USE(func) void JOIN(use, __LINE__)() { func(); }
+
+
+
+//===----------------------------------------------------------------------===//
+// Globals
+//===----------------------------------------------------------------------===//
+
+// Import declaration.
+// CHECK: @ExternGlobalDecl = external dllimport global i32
+__declspec(dllimport) extern int ExternGlobalDecl;
+USEVAR(ExternGlobalDecl)
+
+// dllimport implies a declaration.
+// CHECK: @GlobalDecl = external dllimport global i32
+__declspec(dllimport) int GlobalDecl;
+USEVAR(GlobalDecl)
+
+// Redeclarations
+// CHECK: @GlobalRedecl1 = external dllimport global i32
+__declspec(dllimport) extern int GlobalRedecl1;
+__declspec(dllimport) extern int GlobalRedecl1;
+USEVAR(GlobalRedecl1)
+
+// CHECK: @GlobalRedecl2 = external dllimport global i32
+__declspec(dllimport) int GlobalRedecl2;
+__declspec(dllimport) int GlobalRedecl2;
+USEVAR(GlobalRedecl2)
+
+// NB: MSVC issues a warning and makes GlobalRedecl3 dllexport. We follow GCC
+// and drop the dllimport with a warning.
+// CHECK: @GlobalRedecl3 = external global i32
+__declspec(dllimport) extern int GlobalRedecl3;
+ extern int GlobalRedecl3; // dllimport ignored
+USEVAR(GlobalRedecl3)
+
+
+
+//===----------------------------------------------------------------------===//
+// Functions
+//===----------------------------------------------------------------------===//
+
+// Import function declaration.
+// CHECK-DAG: declare dllimport void @decl()
+__declspec(dllimport) void decl(void);
+
+// Initialize use_decl with the address of the thunk.
+// CHECK-DAG: @use_decl = global void ()* @decl
+void (*use_decl)(void) = &decl;
+
+// Import inline function.
+// CHECK-DAG: declare dllimport void @inlineFunc()
+// O1-DAG: define available_externally dllimport void @inlineFunc()
+__declspec(dllimport) inline void inlineFunc(void) {}
+USE(inlineFunc)
+
+// inline attributes
+// CHECK-DAG: declare dllimport void @noinline()
+// O1-DAG: define available_externally dllimport void @noinline()
+// CHECK-NOT: @alwaysInline()
+// O1-NOT: @alwaysInline()
+__declspec(dllimport) __attribute__((noinline)) inline void noinline(void) {}
+__declspec(dllimport) __attribute__((always_inline)) inline void alwaysInline(void) {}
+USE(noinline)
+USE(alwaysInline)
+
+// Redeclarations
+// CHECK-DAG: declare dllimport void @redecl1()
+__declspec(dllimport) void redecl1(void);
+__declspec(dllimport) void redecl1(void);
+USE(redecl1)
+
+// NB: MSVC issues a warning and makes redecl2/redecl3 dllexport. We follow GCC
+// and drop the dllimport with a warning.
+// CHECK-DAG: declare void @redecl2()
+__declspec(dllimport) void redecl2(void);
+ void redecl2(void);
+USE(redecl2)
+
+// CHECK-DAG: define void @redecl3()
+__declspec(dllimport) void redecl3(void);
+ void redecl3(void) {} // dllimport ignored
+USE(redecl3)
diff --git a/test/CodeGen/dwarf-version.c b/test/CodeGen/dwarf-version.c
index 6c0f097a3b88..0c67b4f86eb5 100644
--- a/test/CodeGen/dwarf-version.c
+++ b/test/CodeGen/dwarf-version.c
@@ -1,14 +1,14 @@
-// RUN: %clang -target x86_64-linux-gnu -gdwarf-2 -S -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang -target x86_64-linux-gnu -gdwarf-2 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER2
// RUN: %clang -target x86_64-linux-gnu -gdwarf-3 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER3
// RUN: %clang -target x86_64-linux-gnu -gdwarf-4 -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4
-// RUN: %clang -target x86_64-linux-gnu -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=LINUX
-// RUN: %clang -target x86_64-apple-darwin -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=DARWIN
+// RUN: %clang -target x86_64-linux-gnu -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER4
+// RUN: %clang -target x86_64-apple-darwin -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER2
+// RUN: %clang -target powerpc-unknown-openbsd -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER2
+// RUN: %clang -target powerpc-unknown-freebsd -g -S -emit-llvm -o - %s | FileCheck %s --check-prefix=VER2
int main (void) {
return 0;
}
-// CHECK: metadata !{i32 2, metadata !"Dwarf Version", i32 2}
+// VER2: metadata !{i32 2, metadata !"Dwarf Version", i32 2}
// VER3: metadata !{i32 2, metadata !"Dwarf Version", i32 3}
// VER4: metadata !{i32 2, metadata !"Dwarf Version", i32 4}
-// LINUX: metadata !{i32 2, metadata !"Dwarf Version", i32 4}
-// DARWIN: metadata !{i32 2, metadata !"Dwarf Version", i32 2}
diff --git a/test/CodeGen/exceptions-seh.c b/test/CodeGen/exceptions-seh.c
index eadbe15cfff0..0a82e379b2cc 100644
--- a/test/CodeGen/exceptions-seh.c
+++ b/test/CodeGen/exceptions-seh.c
@@ -7,12 +7,13 @@ int SaveDiv(int numerator, int denominator, int *res) {
int myres = 0;
__try {
myres = numerator / denominator;
+ __leave;
} __except (1) {
return 0;
}
*res = myres;
return 1;
}
-// CHECK-NOT error
+// CHECK-NOT: error:
// CHECK: error: cannot compile this SEH __try yet
-// CHECK-NOT error
+// CHECK-NOT: error:
diff --git a/test/CodeGen/ffp-contract-option.c b/test/CodeGen/ffp-contract-option.c
index eb95f1e21775..61913b0aa333 100644
--- a/test/CodeGen/ffp-contract-option.c
+++ b/test/CodeGen/ffp-contract-option.c
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -O3 -ffp-contract=fast -triple=powerpc-apple-darwin10 -S -o - %s | FileCheck %s
-// REQUIRES: ppc32-registered-target
+// REQUIRES: powerpc-registered-target
float fma_test1(float a, float b, float c) {
// CHECK: fmadds
diff --git a/test/CodeGen/flatten.c b/test/CodeGen/flatten.c
new file mode 100644
index 000000000000..d766d543e01d
--- /dev/null
+++ b/test/CodeGen/flatten.c
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 -triple=x86_64-linux-gnu %s -emit-llvm -o - | FileCheck %s
+
+void f(void) {}
+
+__attribute__((noinline)) void ni(void) {}
+
+__attribute__((flatten))
+// CHECK: define void @g()
+void g(void) {
+ // CHECK-NOT: call {{.*}} @f
+ f();
+ // CHECK: call {{.*}} @ni
+ ni();
+}
+
+void h(void) {
+ // CHECK: call {{.*}} @f
+ f();
+}
diff --git a/test/CodeGen/fp-contract-pragma.cpp b/test/CodeGen/fp-contract-pragma.cpp
index afd8c43121e6..b4e24b9e6824 100644
--- a/test/CodeGen/fp-contract-pragma.cpp
+++ b/test/CodeGen/fp-contract-pragma.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -O3 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -O3 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
// Is FP_CONTRACT is honored in a simple case?
float fp_contract_1(float a, float b, float c) {
diff --git a/test/CodeGen/fp16-ops.c b/test/CodeGen/fp16-ops.c
index a848ed16bd8a..b269cf89fb0e 100644
--- a/test/CodeGen/fp16-ops.c
+++ b/test/CodeGen/fp16-ops.c
@@ -11,274 +11,274 @@ void foo(void) {
// Check unary ops
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK fptoi float
test = (h0);
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp une float
test = (!h1);
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fsub float
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h1 = -h1;
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h1 = +h1;
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fadd float
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h1++;
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fadd float
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
++h1;
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fadd float
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
--h1;
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fadd float
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h1--;
// Check binary ops with various operands
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fmul float
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h1 = h0 * h2;
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call i16 @llvm.convert.to.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fmul float
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h1 = h0 * (__fp16) -2.0;
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fmul float
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h1 = h0 * f2;
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fmul float
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h1 = f0 * h2;
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fdiv float
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h1 = (h0 / h2);
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fdiv float
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h1 = (h0 / (__fp16) -2.0);
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fdiv float
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h1 = (h0 / f2);
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fdiv float
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h1 = (f0 / h2);
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fadd float
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h1 = (h2 + h0);
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fadd float
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h1 = ((__fp16)-2.0 + h0);
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fadd float
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h1 = (h2 + f0);
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fadd float
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h1 = (f2 + h0);
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fsub float
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h1 = (h2 - h0);
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fsub float
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h1 = ((__fp16)-2.0 - h0);
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fsub float
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h1 = (h2 - f0);
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fsub float
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h1 = (f2 - h0);
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp olt
test = (h2 < h0);
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp olt
test = (h2 < (__fp16)42.0);
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp olt
test = (h2 < f0);
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp olt
test = (f2 < h0);
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp ogt
test = (h0 > h2);
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp ogt
test = ((__fp16)42.0 > h2);
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp ogt
test = (h0 > f2);
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp ogt
test = (f0 > h2);
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp ole
test = (h2 <= h0);
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp ole
test = (h2 <= (__fp16)42.0);
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp ole
test = (h2 <= f0);
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp ole
test = (f2 <= h0);
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp oge
test = (h0 >= h2);
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp oge
test = (h0 >= (__fp16)-2.0);
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp oge
test = (h0 >= f2);
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp oge
test = (f0 >= h2);
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp oeq
test = (h1 == h2);
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp oeq
test = (h1 == (__fp16)1.0);
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp oeq
test = (h1 == f1);
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp oeq
test = (f1 == h1);
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp une
test = (h1 != h2);
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp une
test = (h1 != (__fp16)1.0);
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp une
test = (h1 != f1);
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp une
test = (f1 != h1);
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fcmp une
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h1 = (h1 ? h2 : h0);
// Check assignments (inc. compound)
h0 = h1;
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h0 = (__fp16)-2.0;
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h0 = f0;
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fadd float
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h0 += h1;
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fadd
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h0 += (__fp16)1.0;
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fadd
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h0 += f2;
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fsub
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h0 -= h1;
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fsub
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h0 -= (__fp16)1.0;
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fsub
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h0 -= f2;
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fmul
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h0 *= h1;
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fmul
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h0 *= (__fp16)1.0;
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fmul
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h0 *= f2;
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fdiv
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h0 /= h1;
- // CHECK: call float @llvm.convert.from.fp16
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fdiv
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h0 /= (__fp16)1.0;
- // CHECK: call float @llvm.convert.from.fp16
+ // CHECK: call float @llvm.convert.from.fp16.f32(
// CHECK: fdiv
- // CHECK: call i16 @llvm.convert.to.fp16
+ // CHECK: call i16 @llvm.convert.to.fp16.f32(
h0 /= f2;
}
diff --git a/test/CodeGen/function-attributes.c b/test/CodeGen/function-attributes.c
index 47a056835571..177ad848f743 100644
--- a/test/CodeGen/function-attributes.c
+++ b/test/CodeGen/function-attributes.c
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -Os -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -Os -std=c99 -o - %s | FileCheck %s
// CHECK: define signext i8 @f0(i32 %x) [[NUW:#[0-9]+]]
// CHECK: define zeroext i8 @f1(i32 %x) [[NUW]]
// CHECK: define void @f2(i8 signext %x) [[NUW]]
@@ -117,6 +118,16 @@ void f19(void) {
setjmp(0);
}
+// CHECK-LABEL: define void @f20()
+// CHECK: {
+// CHECK: call i32 @_setjmp(i32* null)
+// CHECK: [[RT_CALL]]
+// CHECK: ret void
+int _setjmp(jmp_buf);
+void f20(void) {
+ _setjmp(0);
+}
+
// CHECK: attributes [[NUW]] = { nounwind optsize readnone{{.*}} }
// CHECK: attributes [[AI]] = { alwaysinline nounwind optsize readnone{{.*}} }
// CHECK: attributes [[ALIGN]] = { nounwind optsize readnone alignstack=16{{.*}} }
diff --git a/test/CodeGen/function-sections.c b/test/CodeGen/function-sections.c
new file mode 100644
index 000000000000..7994acf4dcac
--- /dev/null
+++ b/test/CodeGen/function-sections.c
@@ -0,0 +1,28 @@
+// REQUIRES: x86-registered-target
+
+// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -S -o - < %s | FileCheck %s --check-prefix=PLAIN
+// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -S -ffunction-sections -fno-function-sections -o - < %s | FileCheck %s --check-prefix=PLAIN
+
+// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -S -ffunction-sections -o - < %s | FileCheck %s --check-prefix=FUNC_SECT
+// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -S -fno-function-sections -ffunction-sections -o - < %s | FileCheck %s --check-prefix=FUNC_SECT
+
+// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -S -fdata-sections -o - < %s | FileCheck %s --check-prefix=DATA_SECT
+// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -S -fno-data-sections -fdata-sections -o - < %s | FileCheck %s --check-prefix=DATA_SECT
+
+const int hello = 123;
+void world() {}
+
+// PLAIN-NOT: section
+// PLAIN: world:
+// PLAIN: section .rodata,
+// PLAIN: hello:
+
+// FUNC_SECT: section .text.world,
+// FUNC_SECT: world:
+// FUNC_SECT: section .rodata,
+// FUNC_SECT: hello:
+
+// DATA_SECT-NOT: section
+// DATA_SECT: world:
+// DATA_SECT: .section .rodata.hello,
+// DATA_SECT: hello:
diff --git a/test/CodeGen/hidden-alias-to-internal-function.c b/test/CodeGen/hidden-alias-to-internal-function.c
new file mode 100644
index 000000000000..e93922825ce3
--- /dev/null
+++ b/test/CodeGen/hidden-alias-to-internal-function.c
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -o - -x c %s | FileCheck %s
+// Reproduce the crash in PR19760.
+static void foo(void) {}
+void bar(void) __attribute__((alias("foo")))
+__attribute__((visibility("hidden")));
+
+// CHECK: @bar = hidden alias void ()* @foo
+// CHECK: define internal void @foo()
diff --git a/test/CodeGen/indirect-goto.c b/test/CodeGen/indirect-goto.c
index 7a3d7176519a..a3b45e49af90 100644
--- a/test/CodeGen/indirect-goto.c
+++ b/test/CodeGen/indirect-goto.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i386-unknown-unknown -O3 -emit-llvm -o - %s | grep "ret i32 2520"
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -O3 -emit-llvm -o - %s | grep "ret i32 2520"
static int foo(unsigned i) {
void *addrs[] = { &&L1, &&L2, &&L3, &&L4, &&L5 };
diff --git a/test/CodeGen/init.c b/test/CodeGen/init.c
index 1b0beaea6079..b396c3be62fe 100644
--- a/test/CodeGen/init.c
+++ b/test/CodeGen/init.c
@@ -132,3 +132,11 @@ void test13(int x) {
// CHECK: @test13
// CHECK: and i16 {{.*}}, -1024
}
+
+// CHECK-LABEL: @PR20473
+void PR20473() {
+ // CHECK: memcpy{{.*}}([2 x i8]* @
+ bar((char[2]) {""});
+ // CHECK: memcpy{{.*}}([3 x i8]* @
+ bar((char[3]) {""});
+}
diff --git a/test/CodeGen/inline.c b/test/CodeGen/inline.c
index 70ab696b64ee..96c9a86baecb 100644
--- a/test/CodeGen/inline.c
+++ b/test/CodeGen/inline.c
@@ -53,12 +53,13 @@
// RUN: echo "MS C Mode tests:"
// RUN: %clang_cc1 %s -triple i386-unknown-unknown -O1 -disable-llvm-optzns -emit-llvm -o - -std=c99 -fms-compatibility | FileCheck %s --check-prefix=CHECK4
+// CHECK4-LABEL: define weak_odr i32 @ei()
// CHECK4-LABEL: define i32 @bar()
+// CHECK4-NOT: unreferenced1
+// CHECK4-LABEL: define weak_odr void @unreferenced2()
// CHECK4-LABEL: define void @gnu_inline()
// CHECK4-LABEL: define available_externally void @gnu_ei_inline()
// CHECK4-LABEL: define linkonce_odr i32 @foo()
-// CHECK4-NOT: unreferenced
-// CHECK4-LABEL: define linkonce_odr i32 @ei()
extern __inline int ei() { return 123; }
diff --git a/test/CodeGen/inline2.c b/test/CodeGen/inline2.c
index 670ae201f9ba..84cd4db02774 100644
--- a/test/CodeGen/inline2.c
+++ b/test/CodeGen/inline2.c
@@ -39,6 +39,9 @@ extern int f7(void) { return 0; }
// CHECK-GNU89-LABEL: define i32 @fA()
inline int fA(void) { return 0; }
+// CHECK-GNU89-LABEL: define i32 @fB()
+inline int fB() { return 0; }
+
// CHECK-GNU89-LABEL: define available_externally i32 @f4()
// CHECK-C99-LABEL: define i32 @f4()
int f4(void);
@@ -56,7 +59,11 @@ extern inline int f9(void) { return 0; }
// CHECK-C99-LABEL: define available_externally i32 @fA()
+// CHECK-C99-LABEL: define i32 @fB()
+
int test_all() {
return f0() + f1() + f2() + f3() + f4() + f5() + f6() + f7() + f8() + f9()
- + fA();
+ + fA() + fB();
}
+
+int fB(void);
diff --git a/test/CodeGen/le32-vaarg.c b/test/CodeGen/le32-vaarg.c
new file mode 100644
index 000000000000..51bbb0296846
--- /dev/null
+++ b/test/CodeGen/le32-vaarg.c
@@ -0,0 +1,28 @@
+// RUN: %clang_cc1 -triple le32-unknown-nacl -emit-llvm -o - %s | FileCheck %s
+#include <stdarg.h>
+
+int get_int(va_list *args) {
+ return va_arg(*args, int);
+}
+// CHECK: define i32 @get_int
+// CHECK: [[RESULT:%[a-z_0-9]+]] = va_arg {{.*}}, i32{{$}}
+// CHECK: ret i32 [[RESULT]]
+
+struct Foo {
+ int x;
+};
+
+struct Foo dest;
+
+void get_struct(va_list *args) {
+ dest = va_arg(*args, struct Foo);
+}
+// CHECK: define void @get_struct
+// CHECK: [[RESULT:%[a-z_0-9]+]] = va_arg {{.*}}, %struct.Foo{{$}}
+// CHECK: store %struct.Foo [[RESULT]], %struct.Foo* @dest
+
+void skip_struct(va_list *args) {
+ va_arg(*args, struct Foo);
+}
+// CHECK: define void @skip_struct
+// CHECK: va_arg {{.*}}, %struct.Foo{{$}}
diff --git a/test/CodeGen/libcall-declarations.c b/test/CodeGen/libcall-declarations.c
index 6442e29bd86e..345b74fe97db 100644
--- a/test/CodeGen/libcall-declarations.c
+++ b/test/CodeGen/libcall-declarations.c
@@ -244,6 +244,16 @@ long double _Complex ctanl(long double _Complex);
double _Complex ctanh(double _Complex);
float _Complex ctanhf(float _Complex);
long double _Complex ctanhl(long double _Complex);
+
+double __sinpi(double);
+float __sinpif(float);
+double __cospi(double);
+float __cospif(float);
+double __tanpi(double);
+float __tanpif(float);
+
+double __exp10(double);
+float __exp10f(float);
#ifdef __cplusplus
}
#endif
@@ -298,7 +308,8 @@ void *use[] = {
F(crealf), F(creall), F(csin), F(csinf), F(csinl),
F(csinh), F(csinhf), F(csinhl), F(csqrt), F(csqrtf),
F(csqrtl), F(ctan), F(ctanf), F(ctanl), F(ctanh),
- F(ctanhf), F(ctanhl)
+ F(ctanhf), F(ctanhl), F(__sinpi), F(__sinpif), F(__cospi),
+ F(__cospif), F(__tanpi), F(__tanpif), F(__exp10), F(__exp10f)
};
// CHECK-NOERRNO: declare double @atan2(double, double) [[NUW:#[0-9]+]]
@@ -510,6 +521,14 @@ void *use[] = {
// CHECK-NOERRNO: declare <2 x float> @ctanf(<2 x float>) [[NUW]]
// CHECK-NOERRNO: declare { double, double } @ctanh(double, double) [[NUW]]
// CHECK-NOERRNO: declare <2 x float> @ctanhf(<2 x float>) [[NUW]]
+// CHECK-NOERRNO: declare double @__sinpi(double) [[NUW]]
+// CHECK-NOERRNO: declare float @__sinpif(float) [[NUW]]
+// CHECK-NOERRNO: declare double @__cospi(double) [[NUW]]
+// CHECK-NOERRNO: declare float @__cospif(float) [[NUW]]
+// CHECK-NOERRNO: declare double @__tanpi(double) [[NUW]]
+// CHECK-NOERRNO: declare float @__tanpif(float) [[NUW]]
+// CHECK-NOERRNO: declare double @__exp10(double) [[NUW]]
+// CHECK-NOERRNO: declare float @__exp10f(float) [[NUW]]
// CHECK-ERRNO: declare i32 @abs(i32) [[NUW:#[0-9]+]]
// CHECK-ERRNO: declare i64 @labs(i64) [[NUW]]
diff --git a/test/CodeGen/libcalls.c b/test/CodeGen/libcalls.c
index 3112c8757343..8120b7525623 100644
--- a/test/CodeGen/libcalls.c
+++ b/test/CodeGen/libcalls.c
@@ -52,9 +52,9 @@ void test_pow(float a0, double a1, long double a2) {
// CHECK-YES: declare float @powf(float, float)
// CHECK-YES: declare double @pow(double, double)
// CHECK-YES: declare x86_fp80 @powl(x86_fp80, x86_fp80)
-// CHECK-NO: declare float @llvm.pow.f32(float, float) [[NUW_RO:#[0-9]+]]
-// CHECK-NO: declare double @llvm.pow.f64(double, double) [[NUW_RO]]
-// CHECK-NO: declare x86_fp80 @llvm.pow.f80(x86_fp80, x86_fp80) [[NUW_RO]]
+// CHECK-NO: declare float @llvm.pow.f32(float, float) [[NUW_RNI:#[0-9]+]]
+// CHECK-NO: declare double @llvm.pow.f64(double, double) [[NUW_RNI]]
+// CHECK-NO: declare x86_fp80 @llvm.pow.f80(x86_fp80, x86_fp80) [[NUW_RNI]]
// CHECK-YES-LABEL: define void @test_fma
// CHECK-NO-LABEL: define void @test_fma
@@ -81,8 +81,8 @@ void test_fma(float a0, double a1, long double a2) {
// Just checking to make sure these library functions are marked readnone
void test_builtins(double d, float f, long double ld) {
-// CHEC-NO: @test_builtins
-// CHEC-YES: @test_builtins
+// CHECK-NO: @test_builtins
+// CHECK-YES: @test_builtins
double atan_ = atan(d);
long double atanl_ = atanl(ld);
float atanf_ = atanf(f);
@@ -127,4 +127,4 @@ void test_builtins(double d, float f, long double ld) {
// CHECK-YES: attributes [[NUW_RN]] = { nounwind readnone }
// CHECK-NO: attributes [[NUW_RN]] = { nounwind readnone{{.*}} }
-// CHECK-NO: attributes [[NUW_RO]] = { nounwind readonly }
+// CHECK-NO: attributes [[NUW_RNI]] = { nounwind readnone }
diff --git a/test/CodeGen/lineno-dbginfo.c b/test/CodeGen/lineno-dbginfo.c
index 72fa337eaf83..1f9b7a569ece 100644
--- a/test/CodeGen/lineno-dbginfo.c
+++ b/test/CodeGen/lineno-dbginfo.c
@@ -1,5 +1,5 @@
// RUN: echo "#include <stddef.h>" > %t.h
-// RUN: %clang -S -g -include %t.h %s -emit-llvm -o %t.ll
+// RUN: %clang_cc1 -S -g -include %t.h %s -emit-llvm -o %t.ll
// RUN: grep "i32 5" %t.ll
// outer is at line number 5.
int outer = 42;
diff --git a/test/CodeGen/long-double-x86-nacl.c b/test/CodeGen/long-double-x86-nacl.c
deleted file mode 100644
index cec381a06b9b..000000000000
--- a/test/CodeGen/long-double-x86-nacl.c
+++ /dev/null
@@ -1,7 +0,0 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - -triple=i686-unknown-nacl | FileCheck %s
-
-long double x = 0;
-int checksize[sizeof(x) == 8 ? 1 : -1];
-
-// CHECK-LABEL: define void @s1(double %a)
-void s1(long double a) {}
diff --git a/test/CodeGen/malign-double-x86-nacl.c b/test/CodeGen/malign-double-x86-nacl.c
new file mode 100644
index 000000000000..d67315582bc3
--- /dev/null
+++ b/test/CodeGen/malign-double-x86-nacl.c
@@ -0,0 +1,43 @@
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=i686-unknown-nacl | FileCheck %s
+// Check that i686-nacl essentially has -malign-double, which aligns
+// double, long double, and long long to 64-bits.
+
+int checksize[sizeof(long double) == 8 ? 1 : -1];
+int checkalign[__alignof(long double) == 8 ? 1 : -1];
+
+// CHECK-LABEL: define void @s1(double %a)
+void s1(long double a) {}
+
+struct st_ld {
+ char c;
+ long double ld;
+};
+int checksize2[sizeof(struct st_ld) == 16 ? 1 : -1];
+int checkalign2[__alignof(struct st_ld) == 8 ? 1 : -1];
+
+int checksize3[sizeof(double) == 8 ? 1 : -1];
+int checkalign3[__alignof(double) == 8 ? 1 : -1];
+
+// CHECK-LABEL: define void @s2(double %a)
+void s2(double a) {}
+
+struct st_d {
+ char c;
+ double d;
+};
+int checksize4[sizeof(struct st_d) == 16 ? 1 : -1];
+int checkalign4[__alignof(struct st_d) == 8 ? 1 : -1];
+
+
+int checksize5[sizeof(long long) == 8 ? 1 : -1];
+int checkalign5[__alignof(long long) == 8 ? 1 : -1];
+
+// CHECK-LABEL: define void @s3(i64 %a)
+void s3(long long a) {}
+
+struct st_ll {
+ char c;
+ long long ll;
+};
+int checksize6[sizeof(struct st_ll) == 16 ? 1 : -1];
+int checkalign6[__alignof(struct st_ll) == 8 ? 1 : -1];
diff --git a/test/CodeGen/mangle-windows.c b/test/CodeGen/mangle-windows.c
index 670649216ddf..37d101828358 100644
--- a/test/CodeGen/mangle-windows.c
+++ b/test/CodeGen/mangle-windows.c
@@ -1,5 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - -cxx-abi microsoft \
-// RUN: -triple=i386-pc-win32 | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-mingw32 | FileCheck %s
void __stdcall f1(void) {}
diff --git a/test/CodeGen/mips-count-builtins.c b/test/CodeGen/mips-count-builtins.c
new file mode 100644
index 000000000000..7c9a2574809f
--- /dev/null
+++ b/test/CodeGen/mips-count-builtins.c
@@ -0,0 +1,32 @@
+// RUN: %clang_cc1 %s -triple mips-unknown-linux-gnu -emit-llvm -o - | FileCheck %s
+//
+// Test that the ctlz and cttz builtins are defined for zero.
+// Based on count-builtin.c
+
+int leading, trailing, pop;
+
+void test_i16(short P) {
+ leading = __builtin_clzs(P);
+ trailing = __builtin_ctzs(P);
+
+// CHECK: @test_i16
+// CHECK: call i16 @llvm.ctlz.i16(i16 {{.*}}, i1 false)
+// CHECK: call i16 @llvm.cttz.i16(i16 {{.*}}, i1 false)
+}
+
+void test_i32(int P) {
+ leading = __builtin_clz(P);
+ trailing = __builtin_ctz(P);
+
+// CHECK: @test_i32
+// CHECK: call i32 @llvm.ctlz.i32(i32 {{.*}}, i1 false)
+// CHECK: call i32 @llvm.cttz.i32(i32 {{.*}}, i1 false)
+}
+
+void test_i64(float P) {
+ leading = __builtin_clzll(P);
+ trailing = __builtin_ctzll(P);
+// CHECK: @test_i64
+// CHECK: call i64 @llvm.ctlz.i64(i64 {{.*}}, i1 false)
+// CHECK: call i64 @llvm.cttz.i64(i64 {{.*}}, i1 false)
+}
diff --git a/test/CodeGen/mips-target-data.c b/test/CodeGen/mips-target-data.c
deleted file mode 100644
index 6475ccb4d273..000000000000
--- a/test/CodeGen/mips-target-data.c
+++ /dev/null
@@ -1,16 +0,0 @@
-// RUN: %clang -target mipsel-linux-gnu -o - -emit-llvm -S %s |\
-// RUN: FileCheck %s -check-prefix=32EL
-// RUN: %clang -target mips-linux-gnu -o - -emit-llvm -S %s |\
-// RUN: FileCheck %s -check-prefix=32EB
-// RUN: %clang -target mips64el-linux-gnu -o - -emit-llvm -S %s |\
-// RUN: FileCheck %s -check-prefix=64EL
-// RUN: %clang -target mips64-linux-gnu -o - -emit-llvm -S %s |\
-// RUN: FileCheck %s -check-prefix=64EB
-// RUN: %clang -target mipsel-linux-gnu -o - -emit-llvm -S -mfp64 %s |\
-// RUN: FileCheck %s -check-prefix=32EL
-
-// 32EL: e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-n32-S64
-// 32EB: E-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-n32-S64
-// 64EL: e-p:64:64:64-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v64:64:64-n32:64-S128
-// 64EB: E-p:64:64:64-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v64:64:64-n32:64-S128
-
diff --git a/test/CodeGen/mips-type-sizes-int128.c b/test/CodeGen/mips-type-sizes-int128.c
new file mode 100644
index 000000000000..85ad73df9b20
--- /dev/null
+++ b/test/CodeGen/mips-type-sizes-int128.c
@@ -0,0 +1,13 @@
+// RUN: not %clang_cc1 -triple mips-none-linux-gnu -emit-llvm -w -o - %s 2> %t1
+// RUN: FileCheck --check-prefix=O32 %s < %t1
+
+// RUN: %clang_cc1 -triple mips64-none-linux-gnu -emit-llvm -w -target-abi n32 -o - %s | FileCheck --check-prefix=NEW %s
+// RUN: %clang_cc1 -triple mips64-none-linux-gnu -emit-llvm -w -o - %s | FileCheck --check-prefix=NEW %s
+
+// O32 does not support __int128 so it must be tested separately
+// N32/N64 behave the same way so their tests have been combined into NEW
+
+int check_int128() {
+ return sizeof(__int128); // O32: :[[@LINE]]:17: error: __int128 is not supported on this target
+// NEW: ret i32 16
+}
diff --git a/test/CodeGen/mips-type-sizes.c b/test/CodeGen/mips-type-sizes.c
new file mode 100644
index 000000000000..963b282c016b
--- /dev/null
+++ b/test/CodeGen/mips-type-sizes.c
@@ -0,0 +1,92 @@
+// RUN: %clang_cc1 -triple mips-none-linux-gnu -emit-llvm -w -o - %s | FileCheck --check-prefix=ALL --check-prefix=O32 %s
+// RUN: %clang_cc1 -triple mips64-none-linux-gnu -emit-llvm -w -target-abi n32 -o - %s | FileCheck --check-prefix=ALL --check-prefix=N32 %s
+// RUN: %clang_cc1 -triple mips64-none-linux-gnu -emit-llvm -w -o - %s | FileCheck --check-prefix=ALL --check-prefix=N64 %s
+
+int check_char() {
+ return sizeof(char);
+// ALL: ret i32 1
+}
+
+int check_short() {
+ return sizeof(short);
+// ALL: ret i32 2
+}
+
+int check_int() {
+ return sizeof(int);
+// ALL: ret i32 4
+}
+
+int check_long() {
+ return sizeof(long);
+// O32: ret i32 4
+// N32: ret i32 4
+// N64: ret i32 8
+}
+
+int check_longlong() {
+ return sizeof(long long);
+// ALL: ret i32 8
+}
+
+int check_fp16() {
+ return sizeof(__fp16);
+// ALL: ret i32 2
+}
+
+int check_float() {
+ return sizeof(float);
+// ALL: ret i32 4
+}
+
+int check_double() {
+ return sizeof(double);
+// ALL: ret i32 8
+}
+
+int check_longdouble() {
+ return sizeof(long double);
+// O32: ret i32 8
+// N32: ret i32 16
+// N64: ret i32 16
+}
+
+int check_floatComplex() {
+ return sizeof(float _Complex);
+// ALL: ret i32 8
+}
+
+int check_doubleComplex() {
+ return sizeof(double _Complex);
+// ALL: ret i32 16
+}
+
+int check_longdoubleComplex() {
+ return sizeof(long double _Complex);
+// O32: ret i32 16
+// N32: ret i32 32
+// N64: ret i32 32
+}
+
+int check_bool() {
+ return sizeof(_Bool);
+// ALL: ret i32 1
+}
+
+int check_wchar() {
+ return sizeof(__WCHAR_TYPE__);
+// ALL: ret i32 4
+}
+
+int check_wchar_is_unsigned() {
+ return (__WCHAR_TYPE__)-1 > (__WCHAR_TYPE__)0;
+// ALL: ret i32 0
+}
+
+int check_ptr() {
+ return sizeof(void *);
+// O32: ret i32 4
+// N32: ret i32 4
+// N64: ret i32 8
+}
+
diff --git a/test/CodeGen/mmx-builtins.c b/test/CodeGen/mmx-builtins.c
index b1426849c0e8..346676c6b01a 100644
--- a/test/CodeGen/mmx-builtins.c
+++ b/test/CodeGen/mmx-builtins.c
@@ -1,4 +1,4 @@
-// REQUIRES: x86-64-registered-target
+// REQUIRES: x86-registered-target
// RUN: %clang_cc1 %s -O3 -triple=x86_64-apple-darwin -target-feature +ssse3 -S -o - | FileCheck %s
// FIXME: Disable inclusion of mm_malloc.h, our current implementation is broken
diff --git a/test/CodeGen/mmx-inline-asm-error.c b/test/CodeGen/mmx-inline-asm-error.c
index a6393682ced1..876c664e3b57 100644
--- a/test/CodeGen/mmx-inline-asm-error.c
+++ b/test/CodeGen/mmx-inline-asm-error.c
@@ -4,9 +4,9 @@ typedef int vec256 __attribute__((ext_vector_type(8)));
vec256 foo(vec256 in) {
vec256 out;
- asm("something %0" : : "y"(in)); // expected-error {{invalid type 'vec256' in asm input for constraint 'y'}}
- asm("something %0" : "=y"(out)); // expected-error {{invalid type 'vec256' in asm input for constraint 'y'}}
- asm("something %0, %0" : "+y"(out)); // expected-error {{invalid type 'vec256' in asm input for constraint 'y'}}
+ asm("something %0" : : "y"(in)); // expected-error {{invalid type 'vec256' (vector of 8 'int' values) in asm input for constraint 'y'}}
+ asm("something %0" : "=y"(out)); // expected-error {{invalid type 'vec256' (vector of 8 'int' values) in asm input for constraint 'y'}}
+ asm("something %0, %0" : "+y"(out)); // expected-error {{invalid type 'vec256' (vector of 8 'int' values) in asm input for constraint 'y'}}
return out;
}
diff --git a/test/CodeGen/mozilla-ms-inline-asm.c b/test/CodeGen/mozilla-ms-inline-asm.c
new file mode 100644
index 000000000000..0f541d70fcdd
--- /dev/null
+++ b/test/CodeGen/mozilla-ms-inline-asm.c
@@ -0,0 +1,61 @@
+// REQUIRES: x86-registered-target
+// RUN: %clang_cc1 %s -triple i386-apple-darwin10 -fasm-blocks -emit-llvm -o - | opt -strip -S | FileCheck %s
+
+// Some test cases for MS inline asm support from Mozilla code base.
+
+void invoke(void* that, unsigned methodIndex,
+ unsigned paramCount, void* params)
+{
+// CHECK: @invoke
+// CHECK: %5 = alloca i8*, align 4
+// CHECK: %6 = alloca i32, align 4
+// CHECK: %7 = alloca i32, align 4
+// CHECK: %8 = alloca i8*, align 4
+// CHECK: store i8* %0, i8** %5, align 4
+// CHECK: store i32 %1, i32* %6, align 4
+// CHECK: store i32 %2, i32* %7, align 4
+// CHECK: store i8* %3, i8** %8, align 4
+// CHECK: call void asm sideeffect inteldialect
+// CHECK: mov edx,dword ptr $1
+// CHECK: test edx,edx
+// CHECK: jz noparams
+// CHECK: mov eax,edx
+// CHECK: shl eax,$$3
+// CHECK: sub esp,eax
+// CHECK: mov ecx,esp
+// CHECK: push dword ptr $0
+// CHECK: call invoke_copy_to_stack
+// CHECK: noparams:
+// CHECK: mov ecx,dword ptr $2
+// CHECK: push ecx
+// CHECK: mov edx,[ecx]
+// CHECK: mov eax,dword ptr $3
+// CHECK: call dword ptr[edx+eax*$$4]
+// CHECK: mov esp,ebp
+// CHECK: pop ebp
+// CHECK: ret
+// CHECK: "=*m,*m,*m,*m,~{eax},~{ebp},~{ecx},~{edx},~{flags},~{esp},~{dirflag},~{fpsr},~{flags}"
+// CHECK: (i8** %8, i32* %7, i8** %5, i32* %6)
+// CHECK: ret void
+ __asm {
+ mov edx,paramCount
+ test edx,edx
+ jz noparams
+ mov eax,edx
+ shl eax,3
+ sub esp,eax
+ mov ecx,esp
+ push params
+ call invoke_copy_to_stack
+noparams:
+ mov ecx,that
+ push ecx
+ mov edx,[ecx]
+ mov eax,methodIndex
+ call dword ptr[edx+eax*4]
+ mov esp,ebp
+ pop ebp
+ ret
+ }
+}
+
diff --git a/test/CodeGen/ms-inline-asm-64.c b/test/CodeGen/ms-inline-asm-64.c
index f667708c6591..d6f6e2ee0e0e 100644
--- a/test/CodeGen/ms-inline-asm-64.c
+++ b/test/CodeGen/ms-inline-asm-64.c
@@ -1,4 +1,4 @@
-// REQUIRES: x86-64-registered-target
+// REQUIRES: x86-registered-target
// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -fasm-blocks -emit-llvm -o - | FileCheck %s
void t1() {
@@ -37,7 +37,9 @@ int t4() {
foo.b = 2;
__asm {
lea ebx, foo
- mov eax, [ebx].foo.a
+ {
+ mov eax, [ebx].foo.a
+ }
mov [ebx].foo.b, ecx
}
return foo.b;
diff --git a/test/CodeGen/ms-inline-asm.c b/test/CodeGen/ms-inline-asm.c
index c4486f6f332f..2c6710694142 100644
--- a/test/CodeGen/ms-inline-asm.c
+++ b/test/CodeGen/ms-inline-asm.c
@@ -1,4 +1,4 @@
-// REQUIRES: x86-64-registered-target
+// REQUIRES: x86-registered-target
// RUN: %clang_cc1 %s -triple i386-apple-darwin10 -fasm-blocks -emit-llvm -o - | FileCheck %s
void t1() {
@@ -52,6 +52,11 @@ void t7() {
__asm {
int 0x2c ; } asm comments are fun! }{
}
+ __asm {
+ {
+ int 0x2c ; } asm comments are fun! }{
+ }
+ }
__asm {}
// CHECK: t7
// CHECK: call void asm sideeffect inteldialect "int $$0x2c", "~{dirflag},~{fpsr},~{flags}"()
@@ -73,11 +78,11 @@ int t8() {
void t9() {
__asm {
push ebx
- mov ebx, 0x07
- pop ebx
+ { mov ebx, 0x07 }
+ __asm { pop ebx }
}
// CHECK: t9
-// CHECK: call void asm sideeffect inteldialect "push ebx\0A\09mov ebx, $$0x07\0A\09pop ebx", "~{ebx},~{dirflag},~{fpsr},~{flags}"()
+// CHECK: call void asm sideeffect inteldialect "push ebx\0A\09mov ebx, $$0x07\0A\09pop ebx", "~{ebx},~{esp},~{dirflag},~{fpsr},~{flags}"()
}
unsigned t10(void) {
@@ -129,7 +134,7 @@ void t14() {
unsigned i = 1, j = 2;
__asm {
.if 1
- mov eax, i
+ { mov eax, i }
.else
mov ebx, j
.endif
@@ -211,7 +216,7 @@ void t21() {
__asm pop ebx
}
// CHECK: t21
-// CHECK: call void asm sideeffect inteldialect "push ebx\0A\09mov ebx, $$0x07\0A\09pop ebx", "~{ebx},~{dirflag},~{fpsr},~{flags}"()
+// CHECK: call void asm sideeffect inteldialect "push ebx\0A\09mov ebx, $$0x07\0A\09pop ebx", "~{ebx},~{esp},~{dirflag},~{fpsr},~{flags}"()
}
extern void t22_helper(int x);
@@ -227,7 +232,7 @@ void t22() {
__asm pop ebx
}
// CHECK: t22
-// CHECK: call void asm sideeffect inteldialect "push ebx\0A\09mov ebx, esp", "~{ebx},~{dirflag},~{fpsr},~{flags}"()
+// CHECK: call void asm sideeffect inteldialect "push ebx\0A\09mov ebx, esp", "~{ebx},~{esp},~{dirflag},~{fpsr},~{flags}"()
// CHECK: call void @t22_helper
// CHECK: call void asm sideeffect inteldialect "mov esp, ebx\0A\09pop ebx", "~{ebx},~{esp},~{dirflag},~{fpsr},~{flags}"()
}
@@ -268,13 +273,14 @@ void t26() {
__asm __emit 0a2h
__asm __EMIT 0a2h
__asm popad
+// FIXME: These all need to be merged into the same asm blob.
// CHECK: t26
-// CHECK: call void asm sideeffect inteldialect "pushad", "~{dirflag},~{fpsr},~{flags}"()
+// CHECK: call void asm sideeffect inteldialect "pushad", "~{esp},~{dirflag},~{fpsr},~{flags}"()
// CHECK: call void asm sideeffect inteldialect "mov eax, $$0", "~{eax},~{dirflag},~{fpsr},~{flags}"()
// CHECK: call void asm sideeffect inteldialect ".byte 0fh", "~{dirflag},~{fpsr},~{flags}"()
// CHECK: call void asm sideeffect inteldialect ".byte 0a2h", "~{dirflag},~{fpsr},~{flags}"()
// CHECK: call void asm sideeffect inteldialect ".byte 0a2h", "~{dirflag},~{fpsr},~{flags}"()
-// CHECK: call void asm sideeffect inteldialect "popad", "~{dirflag},~{fpsr},~{flags}"()
+// CHECK: call void asm sideeffect inteldialect "popad", "~{eax},~{ebp},~{ebx},~{ecx},~{edi},~{edx},~{esi},~{esp},~{dirflag},~{fpsr},~{flags}"()
}
void t27() {
@@ -323,8 +329,8 @@ void t31() {
__asm pushad
__asm popad
// CHECK: t31
-// CHECK: call void asm sideeffect inteldialect "pushad", "~{dirflag},~{fpsr},~{flags}"()
-// CHECK: call void asm sideeffect inteldialect "popad", "~{dirflag},~{fpsr},~{flags}"()
+// CHECK: call void asm sideeffect inteldialect "pushad", "~{esp},~{dirflag},~{fpsr},~{flags}"()
+// CHECK: call void asm sideeffect inteldialect "popad", "~{eax},~{ebp},~{ebx},~{ecx},~{edi},~{edx},~{esi},~{esp},~{dirflag},~{fpsr},~{flags}"()
}
void t32() {
@@ -408,6 +414,7 @@ void t37() {
__asm mov eax, 4 + 8 * -16
__asm mov eax, 4 + 16 / -8
__asm mov eax, (16 + 16) / -8
+ __asm mov eax, ~15
// CHECK: t37
// CHECK: call void asm sideeffect inteldialect "mov eax, $$12", "~{eax},~{dirflag},~{fpsr},~{flags}"()
// CHECK: call void asm sideeffect inteldialect "mov eax, $$132", "~{eax},~{dirflag},~{fpsr},~{flags}"()
@@ -416,6 +423,7 @@ void t37() {
// CHECK: call void asm sideeffect inteldialect "mov eax, $$4294967172", "~{eax},~{dirflag},~{fpsr},~{flags}"()
// CHECK: call void asm sideeffect inteldialect "mov eax, $$2", "~{eax},~{dirflag},~{fpsr},~{flags}"()
// CHECK: call void asm sideeffect inteldialect "mov eax, $$4294967292", "~{eax},~{dirflag},~{fpsr},~{flags}"()
+// CHECK: call void asm sideeffect inteldialect "mov eax, $$4294967280", "~{eax},~{dirflag},~{fpsr},~{flags}"()
}
void t38() {
@@ -438,3 +446,51 @@ void t38() {
// CHECK: call void asm sideeffect inteldialect "mov eax, dword ptr $$8$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}})
// CHECK: call void asm sideeffect inteldialect "mov eax, dword ptr $$0$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"([4 x i32]* %{{.*}})
}
+
+void cpuid() {
+ __asm cpuid
+// CHECK-LABEL: define void @cpuid
+// CHECK: call void asm sideeffect inteldialect "cpuid", "~{eax},~{ebx},~{ecx},~{edx},~{dirflag},~{fpsr},~{flags}"()
+}
+
+typedef struct {
+ int a;
+ int b;
+} A;
+
+void t39() {
+ __asm mov eax, [eax].A.b
+ __asm mov eax, [eax] A.b
+ __asm mov eax, fs:[0] A.b
+ // CHECK-LABEL: define void @t39
+ // CHECK: call void asm sideeffect inteldialect "mov eax, [eax].4", "~{eax},~{dirflag},~{fpsr},~{flags}"()
+ // CHECK: call void asm sideeffect inteldialect "mov eax, [eax] .4", "~{eax},~{dirflag},~{fpsr},~{flags}"()
+ // CHECK: call void asm sideeffect inteldialect "mov eax, fs:[$$0] .4", "~{eax},~{dirflag},~{fpsr},~{flags}"()
+}
+
+void t40(float a) {
+ int i;
+ __asm fld a
+ __asm fistp i
+ // CHECK-LABEL: define void @t40
+ // CHECK: call void asm sideeffect inteldialect "fld dword ptr $0", "*m,~{dirflag},~{fpsr},~{flags}"(float* {{.*}})
+ // CHECK: call void asm sideeffect inteldialect "fistp dword ptr $0", "=*m,~{dirflag},~{fpsr},~{flags}"(i32* {{.*}})
+}
+
+void t41(unsigned short a) {
+ __asm mov cs, a;
+ __asm mov ds, a;
+ __asm mov es, a;
+ __asm mov fs, a;
+ __asm mov gs, a;
+ __asm mov ss, a;
+ // CHECK-LABEL: define void @t41(i16 zeroext %a)
+ // CHECK: [[T41_A_ADDR:%.+]] = alloca i16
+ // CHECK: store i16 %a, i16* [[T41_A_ADDR]]
+ // CHECK: call void asm sideeffect inteldialect "mov cs, word ptr $0", "*m,~{dirflag},~{fpsr},~{flags}"(i16* [[T41_A_ADDR]])
+ // CHECK: call void asm sideeffect inteldialect "mov ds, word ptr $0", "*m,~{dirflag},~{fpsr},~{flags}"(i16* [[T41_A_ADDR]])
+ // CHECK: call void asm sideeffect inteldialect "mov es, word ptr $0", "*m,~{dirflag},~{fpsr},~{flags}"(i16* [[T41_A_ADDR]])
+ // CHECK: call void asm sideeffect inteldialect "mov fs, word ptr $0", "*m,~{dirflag},~{fpsr},~{flags}"(i16* [[T41_A_ADDR]])
+ // CHECK: call void asm sideeffect inteldialect "mov gs, word ptr $0", "*m,~{dirflag},~{fpsr},~{flags}"(i16* [[T41_A_ADDR]])
+ // CHECK: call void asm sideeffect inteldialect "mov ss, word ptr $0", "*m,~{dirflag},~{fpsr},~{flags}"(i16* [[T41_A_ADDR]])
+}
diff --git a/test/CodeGen/ms-inline-asm.cpp b/test/CodeGen/ms-inline-asm.cpp
index 64b8558b483a..83fe1075aff7 100644
--- a/test/CodeGen/ms-inline-asm.cpp
+++ b/test/CodeGen/ms-inline-asm.cpp
@@ -1,5 +1,5 @@
-// REQUIRES: x86-64-registered-target
-// RUN: %clang_cc1 -x c++ %s -triple i386-apple-darwin10 -fasm-blocks -emit-llvm -o - | FileCheck %s
+// REQUIRES: x86-registered-target
+// RUN: %clang_cc1 -x c++ %s -triple i386-apple-darwin10 -fasm-blocks -emit-llvm -o - -std=c++11 | FileCheck %s
// rdar://13645930
@@ -97,7 +97,7 @@ void test5() {
// CHECK: [[Y:%.*]] = alloca i32
int x, y;
__asm push y
- // CHECK: call void asm sideeffect inteldialect "push dword ptr $0", "=*m,~{dirflag},~{fpsr},~{flags}"(i32* [[Y]])
+ // CHECK: call void asm sideeffect inteldialect "push dword ptr $0", "=*m,~{esp},~{dirflag},~{fpsr},~{flags}"(i32* [[Y]])
__asm call T5<int>::create<float>
// CHECK: call void asm sideeffect inteldialect "call $0", "r,~{dirflag},~{fpsr},~{flags}"(i32 (float)* @_ZN2T5IiE6createIfEEiT_)
__asm mov x, eax
@@ -111,3 +111,33 @@ void test6() {
jmp a
}
}
+
+void t7_struct() {
+ struct A {
+ int a;
+ int b;
+ };
+ __asm mov eax, [eax].A.b
+ // CHECK-LABEL: define void @_Z9t7_structv
+ // CHECK: call void asm sideeffect inteldialect "mov eax, [eax].4", "~{eax},~{dirflag},~{fpsr},~{flags}"()
+}
+
+void t7_typedef() {
+ typedef struct {
+ int a;
+ int b;
+ } A;
+ __asm mov eax, [eax].A.b
+ // CHECK-LABEL: define void @_Z10t7_typedefv
+ // CHECK: call void asm sideeffect inteldialect "mov eax, [eax].4", "~{eax},~{dirflag},~{fpsr},~{flags}"()
+}
+
+void t7_using() {
+ using A = struct {
+ int a;
+ int b;
+ };
+ __asm mov eax, [eax].A.b
+ // CHECK-LABEL: define void @_Z8t7_usingv
+ // CHECK: call void asm sideeffect inteldialect "mov eax, [eax].4", "~{eax},~{dirflag},~{fpsr},~{flags}"()
+}
diff --git a/test/CodeGen/ms-intrinsics.c b/test/CodeGen/ms-intrinsics.c
new file mode 100644
index 000000000000..fb0f62c61c4b
--- /dev/null
+++ b/test/CodeGen/ms-intrinsics.c
@@ -0,0 +1,38 @@
+// RUN: %clang_cc1 -triple i686--windows -fms-compatibility -Oz -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple thumbv7--windows -fms-compatibility -Oz -emit-llvm %s -o - | FileCheck %s
+
+void *test_InterlockedExchangePointer(void * volatile *Target, void *Value) {
+ return _InterlockedExchangePointer(Target, Value);
+}
+
+// CHECK: define{{.*}}i8* @test_InterlockedExchangePointer(i8** %Target, i8* %Value){{.*}}{
+// CHECK: %[[TARGET:[0-9]+]] = bitcast i8** %Target to i32*
+// CHECK: %[[VALUE:[0-9]+]] = ptrtoint i8* %Value to i32
+// CHECK: %[[EXCHANGE:[0-9]+]] = atomicrmw xchg i32* %[[TARGET]], i32 %[[VALUE]] seq_cst
+// CHECK: %[[RESULT:[0-9]+]] = inttoptr i32 %[[EXCHANGE]] to i8*
+// CHECK: ret i8* %[[RESULT]]
+// CHECK: }
+
+void *test_InterlockedCompareExchangePointer(void * volatile *Destination,
+ void *Exchange, void *Comparand) {
+ return _InterlockedCompareExchangePointer(Destination, Exchange, Comparand);
+}
+
+// CHECK: define{{.*}}i8* @test_InterlockedCompareExchangePointer(i8** %Destination, i8* %Exchange, i8* %Comparand){{.*}}{
+// CHECK: %[[DEST:[0-9]+]] = bitcast i8** %Destination to i32*
+// CHECK: %[[EXCHANGE:[0-9]+]] = ptrtoint i8* %Exchange to i32
+// CHECK: %[[COMPARAND:[0-9]+]] = ptrtoint i8* %Comparand to i32
+// CHECK: %[[XCHG:[0-9]+]] = cmpxchg volatile i32* %[[DEST:[0-9]+]], i32 %[[COMPARAND:[0-9]+]], i32 %[[EXCHANGE:[0-9]+]] seq_cst seq_cst
+// CHECK: %[[EXTRACT:[0-9]+]] = extractvalue { i32, i1 } %[[XCHG]], 0
+// CHECK: %[[RESULT:[0-9]+]] = inttoptr i32 %[[EXTRACT]] to i8*
+// CHECK: ret i8* %[[RESULT:[0-9]+]]
+// CHECK: }
+
+long test_InterlockedExchange(long *Target, long Value) {
+ return _InterlockedExchange(Target, Value);
+}
+
+// CHECK: define{{.*}}i32 @test_InterlockedExchange(i32* %Target, i32 %Value){{.*}}{
+// CHECK: %[[EXCHANGE:[0-9]+]] = atomicrmw xchg i32* %Target, i32 %Value seq_cst
+// CHECK: ret i32 %[[EXCHANGE:[0-9]+]]
+// CHECK: }
diff --git a/test/CodeGen/ms_struct-bitfield.c b/test/CodeGen/ms_struct-bitfield.c
index a8f4c91a4937..08f2a5b60a54 100644
--- a/test/CodeGen/ms_struct-bitfield.c
+++ b/test/CodeGen/ms_struct-bitfield.c
@@ -1,6 +1,11 @@
-// RUN: %clang_cc1 -emit-llvm-only -triple x86_64-apple-darwin9 %s
+// RUN: %clang_cc1 -emit-llvm -o - -triple x86_64-apple-darwin9 %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -o - -triple thumbv7-apple-ios -target-abi apcs-gnu %s | FileCheck %s -check-prefix=CHECK-ARM
+
// rdar://8823265
+// Note that we're declaring global variables with these types,
+// triggering both Sema and IRGen struct layout.
+
#define ATTR __attribute__((__ms_struct__))
struct
@@ -9,6 +14,9 @@ struct
long : 0;
char bar;
} ATTR t1;
+int s1 = sizeof(t1);
+// CHECK: @s1 = global i32 2
+// CHECK-ARM: @s1 = global i32 2
struct
{
@@ -18,6 +26,9 @@ struct
int : 0;
char bar;
} ATTR t2;
+int s2 = sizeof(t2);
+// CHECK: @s2 = global i32 2
+// CHECK-ARM: @s2 = global i32 2
struct
{
@@ -29,12 +40,18 @@ struct
long : 0;
char : 0;
} ATTR t3;
+int s3 = sizeof(t3);
+// CHECK: @s3 = global i32 2
+// CHECK-ARM: @s3 = global i32 2
struct
{
long : 0;
char bar;
} ATTR t4;
+int s4 = sizeof(t4);
+// CHECK: @s4 = global i32 1
+// CHECK-ARM: @s4 = global i32 1
struct
{
@@ -43,6 +60,9 @@ struct
char : 0;
char bar;
} ATTR t5;
+int s5 = sizeof(t5);
+// CHECK: @s5 = global i32 1
+// CHECK-ARM: @s5 = global i32 1
struct
{
@@ -51,6 +71,9 @@ struct
char : 0;
char bar;
} ATTR t6;
+int s6 = sizeof(t6);
+// CHECK: @s6 = global i32 1
+// CHECK-ARM: @s6 = global i32 1
struct
{
@@ -69,6 +92,9 @@ struct
char bar6;
char bar7;
} ATTR t7;
+int s7 = sizeof(t7);
+// CHECK: @s7 = global i32 9
+// CHECK-ARM: @s7 = global i32 9
struct
{
@@ -76,6 +102,9 @@ struct
long : 0;
char : 0;
} ATTR t8;
+int s8 = sizeof(t8);
+// CHECK: @s8 = global i32 0
+// CHECK-ARM: @s8 = global i32 0
struct
{
@@ -106,6 +135,9 @@ struct
long : 0;
char :4;
} ATTR t9;
+int s9 = sizeof(t9);
+// CHECK: @s9 = global i32 28
+// CHECK-ARM: @s9 = global i32 28
struct
{
@@ -113,19 +145,35 @@ struct
long : 0;
char bar;
} ATTR t10;
+int s10 = sizeof(t10);
+// CHECK: @s10 = global i32 16
+// CHECK-ARM: @s10 = global i32 8
+
+// rdar://16041826 - ensure that ms_structs work correctly on a
+// !useBitFieldTypeAlignment() target
+struct {
+ unsigned int a : 31;
+ unsigned int b : 2;
+ unsigned int c;
+} ATTR t11;
+int s11 = sizeof(t11);
+// CHECK: @s11 = global i32 12
+// CHECK-ARM: @s11 = global i32 12
-static int arr1[(sizeof(t1) == 2) -1];
-static int arr2[(sizeof(t2) == 2) -1];
-static int arr3[(sizeof(t3) == 2) -1];
-static int arr4[(sizeof(t4) == 1) -1];
-static int arr5[(sizeof(t5) == 1) -1];
-static int arr6[(sizeof(t6) == 1) -1];
-static int arr7[(sizeof(t7) == 9) -1];
-static int arr8[(sizeof(t8) == 0) -1];
-static int arr9[(sizeof(t9) == 28) -1];
-static int arr10[(sizeof(t10) == 16) -1];
-
-int main() {
- return 0;
-}
+struct {
+ unsigned char a : 3;
+ unsigned char b : 4;
+ unsigned short c : 6;
+} ATTR t12;
+int s12 = sizeof(t12);
+// CHECK: @s12 = global i32 4
+// CHECK-ARM: @s12 = global i32 4
+struct {
+ unsigned char a : 3;
+ unsigned char b : 4;
+ __attribute__((packed)) unsigned short c : 6;
+} ATTR t13;
+int s13 = sizeof(t13);
+// CHECK: @s13 = global i32 4
+// CHECK-ARM: @s13 = global i32 4
diff --git a/test/CodeGen/ms_struct-pack.c b/test/CodeGen/ms_struct-pack.c
index da94f54c1fb2..6486f2975f1f 100644
--- a/test/CodeGen/ms_struct-pack.c
+++ b/test/CodeGen/ms_struct-pack.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm-only -triple i386-apple-darwin9 %s
+// RUN: %clang_cc1 -emit-llvm-only -triple i386-apple-darwin9 -fdump-record-layouts %s | FileCheck %s
// rdar://8823265
#pragma pack(1)
@@ -123,3 +123,22 @@ typedef struct _eight_ms eight_ms;
static int a8[(sizeof(eight_ms) == 48) - 1];
+// rdar://15926990
+#pragma pack(2)
+struct test0 {
+ unsigned long a : 8;
+ unsigned long b : 8;
+ unsigned long c : 8;
+ unsigned long d : 10;
+ unsigned long e : 1;
+} __attribute__((__ms_struct__));
+
+// CHECK: Type: struct test0
+// CHECK-NEXT: Record:
+// CHECK-NEXT: Layout:
+// CHECK-NEXT: Size:64
+// CHECK-NEXT: DataSize:64
+// CHECK-NEXT: Alignment:16
+// CHECK-NEXT: FieldOffsets: [0, 8, 16, 32, 42]>
+
+static int test0[(sizeof(struct test0) == 8) ? 1 : -1];
diff --git a/test/CodeGen/named_reg_global.c b/test/CodeGen/named_reg_global.c
new file mode 100644
index 000000000000..8117daef615c
--- /dev/null
+++ b/test/CodeGen/named_reg_global.c
@@ -0,0 +1,47 @@
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -S -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple arm64-linux-gnu -S -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple armv7-linux-gnu -S -emit-llvm %s -o - | FileCheck %s
+
+// CHECK-NOT: @sp = common global
+register unsigned long current_stack_pointer asm("sp");
+struct p4_Thread {
+ struct {
+ int len;
+ } word;
+};
+// Testing pointer types as well
+register struct p4_Thread *p4TH asm("sp");
+
+// CHECK: define{{.*}} i[[bits:[0-9]+]] @get_stack_pointer_addr()
+// CHECK: [[ret:%[0-9]+]] = call i[[bits]] @llvm.read_register.i[[bits]](metadata !0)
+// CHECK: ret i[[bits]] [[ret]]
+unsigned long get_stack_pointer_addr() {
+ return current_stack_pointer;
+}
+// CHECK: declare{{.*}} i[[bits]] @llvm.read_register.i[[bits]](metadata)
+
+// CHECK: define{{.*}} void @set_stack_pointer_addr(i[[bits]] %addr) #0 {
+// CHECK: [[sto:%[0-9]+]] = load i[[bits]]* %
+// CHECK: call void @llvm.write_register.i[[bits]](metadata !0, i[[bits]] [[sto]])
+// CHECK: ret void
+void set_stack_pointer_addr(unsigned long addr) {
+ current_stack_pointer = addr;
+}
+// CHECK: declare{{.*}} void @llvm.write_register.i[[bits]](metadata, i[[bits]])
+
+// CHECK: define {{.*}}@fn1
+int fn1() {
+ return (*p4TH).word.len;
+}
+// CHECK: %[[regr:[0-9]+]] = call i[[bits]] @llvm.read_register.i[[bits]](metadata !0)
+// CHECK: inttoptr i[[bits]] %[[regr]] to %struct.p4_Thread*
+
+// CHECK: define {{.*}}@fn2
+void fn2(struct p4_Thread *val) {
+ p4TH = val;
+}
+// CHECK: %[[regw:[0-9]+]] = ptrtoint %struct.p4_Thread* %{{.*}} to i[[bits]]
+// CHECK: call void @llvm.write_register.i[[bits]](metadata !0, i[[bits]] %[[regw]])
+
+// CHECK: !llvm.named.register.sp = !{!0}
+// CHECK: !0 = metadata !{metadata !"sp"}
diff --git a/test/CodeGen/neon-crypto.c b/test/CodeGen/neon-crypto.c
new file mode 100644
index 000000000000..ee807109d5dc
--- /dev/null
+++ b/test/CodeGen/neon-crypto.c
@@ -0,0 +1,96 @@
+// RUN: %clang_cc1 -triple arm-none-linux-gnueabi -target-feature +neon \
+// RUN: -target-feature +crypto -target-cpu cortex-a57 -emit-llvm -O1 -o - %s | FileCheck %s
+
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
+// RUN: -target-feature +crypto -emit-llvm -O1 -o - %s | FileCheck %s
+// RUN: not %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
+// RUN: -S -O3 -o - %s 2>&1 | FileCheck --check-prefix=CHECK-NO-CRYPTO %s
+
+// Test new aarch64 intrinsics and types
+
+#include <arm_neon.h>
+
+uint8x16_t test_vaeseq_u8(uint8x16_t data, uint8x16_t key) {
+ // CHECK-LABEL: @test_vaeseq_u8
+ // CHECK-NO-CRYPTO: warning: implicit declaration of function 'vaeseq_u8' is invalid in C99
+ return vaeseq_u8(data, key);
+ // CHECK: call <16 x i8> @llvm.{{arm.neon|aarch64.crypto}}.aese(<16 x i8> %data, <16 x i8> %key)
+}
+
+uint8x16_t test_vaesdq_u8(uint8x16_t data, uint8x16_t key) {
+ // CHECK-LABEL: @test_vaesdq_u8
+ return vaesdq_u8(data, key);
+ // CHECK: call <16 x i8> @llvm.{{arm.neon|aarch64.crypto}}.aesd(<16 x i8> %data, <16 x i8> %key)
+}
+
+uint8x16_t test_vaesmcq_u8(uint8x16_t data) {
+ // CHECK-LABEL: @test_vaesmcq_u8
+ return vaesmcq_u8(data);
+ // CHECK: call <16 x i8> @llvm.{{arm.neon|aarch64.crypto}}.aesmc(<16 x i8> %data)
+}
+
+uint8x16_t test_vaesimcq_u8(uint8x16_t data) {
+ // CHECK-LABEL: @test_vaesimcq_u8
+ return vaesimcq_u8(data);
+ // CHECK: call <16 x i8> @llvm.{{arm.neon|aarch64.crypto}}.aesimc(<16 x i8> %data)
+}
+
+uint32_t test_vsha1h_u32(uint32_t hash_e) {
+ // CHECK-LABEL: @test_vsha1h_u32
+ return vsha1h_u32(hash_e);
+ // CHECK: call i32 @llvm.{{arm.neon|aarch64.crypto}}.sha1h(i32 %hash_e)
+}
+
+uint32x4_t test_vsha1su1q_u32(uint32x4_t w0_3, uint32x4_t w12_15) {
+ // CHECK-LABEL: @test_vsha1su1q_u32
+ return vsha1su1q_u32(w0_3, w12_15);
+ // CHECK: call <4 x i32> @llvm.{{arm.neon|aarch64.crypto}}.sha1su1(<4 x i32> %w0_3, <4 x i32> %w12_15)
+}
+
+uint32x4_t test_vsha256su0q_u32(uint32x4_t w0_3, uint32x4_t w4_7) {
+ // CHECK-LABEL: @test_vsha256su0q_u32
+ return vsha256su0q_u32(w0_3, w4_7);
+ // CHECK: call <4 x i32> @llvm.{{arm.neon|aarch64.crypto}}.sha256su0(<4 x i32> %w0_3, <4 x i32> %w4_7)
+}
+
+uint32x4_t test_vsha1cq_u32(uint32x4_t hash_abcd, uint32_t hash_e, uint32x4_t wk) {
+ // CHECK-LABEL: @test_vsha1cq_u32
+ return vsha1cq_u32(hash_abcd, hash_e, wk);
+ // CHECK: call <4 x i32> @llvm.{{arm.neon|aarch64.crypto}}.sha1c(<4 x i32> %hash_abcd, i32 %hash_e, <4 x i32> %wk)
+}
+
+uint32x4_t test_vsha1pq_u32(uint32x4_t hash_abcd, uint32_t hash_e, uint32x4_t wk) {
+ // CHECK-LABEL: @test_vsha1pq_u32
+ return vsha1pq_u32(hash_abcd, hash_e, wk);
+ // CHECK: call <4 x i32> @llvm.{{arm.neon|aarch64.crypto}}.sha1p(<4 x i32> %hash_abcd, i32 %hash_e, <4 x i32> %wk)
+}
+
+uint32x4_t test_vsha1mq_u32(uint32x4_t hash_abcd, uint32_t hash_e, uint32x4_t wk) {
+ // CHECK-LABEL: @test_vsha1mq_u32
+ return vsha1mq_u32(hash_abcd, hash_e, wk);
+ // CHECK: call <4 x i32> @llvm.{{arm.neon|aarch64.crypto}}.sha1m(<4 x i32> %hash_abcd, i32 %hash_e, <4 x i32> %wk)
+}
+
+uint32x4_t test_vsha1su0q_u32(uint32x4_t w0_3, uint32x4_t w4_7, uint32x4_t w8_11) {
+ // CHECK-LABEL: @test_vsha1su0q_u32
+ return vsha1su0q_u32(w0_3, w4_7, w8_11);
+ // CHECK: call <4 x i32> @llvm.{{arm.neon|aarch64.crypto}}.sha1su0(<4 x i32> %w0_3, <4 x i32> %w4_7, <4 x i32> %w8_11)
+}
+
+uint32x4_t test_vsha256hq_u32(uint32x4_t hash_abcd, uint32x4_t hash_efgh, uint32x4_t wk) {
+ // CHECK-LABEL: @test_vsha256hq_u32
+ return vsha256hq_u32(hash_abcd, hash_efgh, wk);
+ // CHECK: call <4 x i32> @llvm.{{arm.neon|aarch64.crypto}}.sha256h(<4 x i32> %hash_abcd, <4 x i32> %hash_efgh, <4 x i32> %wk)
+}
+
+uint32x4_t test_vsha256h2q_u32(uint32x4_t hash_efgh, uint32x4_t hash_abcd, uint32x4_t wk) {
+ // CHECK-LABEL: @test_vsha256h2q_u32
+ return vsha256h2q_u32(hash_efgh, hash_abcd, wk);
+ // CHECK: call <4 x i32> @llvm.{{arm.neon|aarch64.crypto}}.sha256h2(<4 x i32> %hash_efgh, <4 x i32> %hash_abcd, <4 x i32> %wk)
+}
+
+uint32x4_t test_vsha256su1q_u32(uint32x4_t w0_3, uint32x4_t w8_11, uint32x4_t w12_15) {
+ // CHECK-LABEL: @test_vsha256su1q_u32
+ return vsha256su1q_u32(w0_3, w8_11, w12_15);
+ // CHECK: call <4 x i32> @llvm.{{arm.neon|aarch64.crypto}}.sha256su1(<4 x i32> %w0_3, <4 x i32> %w8_11, <4 x i32> %w12_15)
+}
diff --git a/test/CodeGen/noduplicate-cxx11-test.cpp b/test/CodeGen/noduplicate-cxx11-test.cpp
new file mode 100644
index 000000000000..01278632bffb
--- /dev/null
+++ b/test/CodeGen/noduplicate-cxx11-test.cpp
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -triple=i686-pc-unknown -std=c++11 %s -emit-llvm -o - | FileCheck %s
+
+// This was a problem in Sema, but only shows up as noinline missing
+// in CodeGen.
+
+// CHECK: define i32 @_Z15noduplicatedfuni(i32 %a) [[NI:#[0-9]+]]
+
+int noduplicatedfun [[clang::noduplicate]] (int a) {
+
+ return a+1;
+
+}
+
+int main() {
+
+ return noduplicatedfun(5);
+
+}
+
+// CHECK: attributes [[NI]] = { noduplicate nounwind{{.*}} }
diff --git a/test/CodeGen/noinline.c b/test/CodeGen/noinline.c
index e64a1a539f4b..bd5a9d8c35ff 100644
--- a/test/CodeGen/noinline.c
+++ b/test/CodeGen/noinline.c
@@ -5,10 +5,17 @@
inline int dont_inline_me(int a, int b) { return(a+b); }
+inline __attribute__ ((__always_inline__)) int inline_me(int a, int b) { return(a*b); }
+
volatile int *pa = (int*) 0x1000;
void foo() {
// NOINLINE: @foo
// NOINLINE: dont_inline_me
// NOINLINE-NOT: inlinehint
pa[0] = dont_inline_me(pa[1],pa[2]);
+// NOINLINE-NOT: inline_me
+ pa[3] = inline_me(pa[4],pa[5]);
}
+
+// NOINLINE: Function Attrs: noinline
+// NOINLINE: @dont_inline_me
diff --git a/test/CodeGen/nonnull.c b/test/CodeGen/nonnull.c
new file mode 100644
index 000000000000..4d6cc4568d8b
--- /dev/null
+++ b/test/CodeGen/nonnull.c
@@ -0,0 +1,23 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm < %s | FileCheck %s
+
+// CHECK: define void @foo(i32* nonnull %x)
+void foo(int * __attribute__((nonnull)) x) {
+ *x = 0;
+}
+
+// CHECK: define void @bar(i32* nonnull %x)
+void bar(int * x) __attribute__((nonnull(1))) {
+ *x = 0;
+}
+
+// CHECK: define void @bar2(i32* %x, i32* nonnull %y)
+void bar2(int * x, int * y) __attribute__((nonnull(2))) {
+ *x = 0;
+}
+
+static int a;
+// CHECK: define nonnull i32* @bar3()
+int * bar3() __attribute__((returns_nonnull)) {
+ return &a;
+}
+
diff --git a/test/CodeGen/overloadable.c b/test/CodeGen/overloadable.c
index 1ed72b19c4d4..8b40e4d73403 100644
--- a/test/CodeGen/overloadable.c
+++ b/test/CodeGen/overloadable.c
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | grep _Z1fPA10_1X
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s
+// CHECK: _Z1fPA10_1X
+
int __attribute__((overloadable)) f(int x) { return x; }
float __attribute__((overloadable)) f(float x) { return x; }
double __attribute__((overloadable)) f(double x) { return x; }
diff --git a/test/CodeGen/packed-nest-unpacked.c b/test/CodeGen/packed-nest-unpacked.c
index 393174196f4e..ea45660b7a3c 100644
--- a/test/CodeGen/packed-nest-unpacked.c
+++ b/test/CodeGen/packed-nest-unpacked.c
@@ -60,6 +60,6 @@ struct YBitfield gbitfield;
unsigned test7() {
// CHECK: @test7
- // CHECK: load i32* bitcast (%struct.XBitfield* getelementptr inbounds (%struct.YBitfield* @gbitfield, i32 0, i32 1) to i32*), align 4
+ // CHECK: load i32* getelementptr inbounds (%struct.YBitfield* @gbitfield, i32 0, i32 1, i32 0), align 4
return gbitfield.y.b2;
}
diff --git a/test/CodeGen/packed-union.c b/test/CodeGen/packed-union.c
index 31ce61440781..cb4999950df1 100644
--- a/test/CodeGen/packed-union.c
+++ b/test/CodeGen/packed-union.c
@@ -1,11 +1,11 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm %s -o %t
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck %s
typedef struct _attrs {
unsigned file_attributes;
unsigned char filename_length;
} __attribute__((__packed__)) attrs;
-// RUN: grep "union._attr_union = type <{ i32, i8 }>" %t
+// CHECK: %union._attr_union = type <{ i32, i8 }>
typedef union _attr_union {
attrs file_attrs;
unsigned owner_id;
diff --git a/test/CodeGen/powerpc_types.c b/test/CodeGen/powerpc_types.c
index b4de31818845..b7d0f5de4985 100644
--- a/test/CodeGen/powerpc_types.c
+++ b/test/CodeGen/powerpc_types.c
@@ -1,4 +1,3 @@
-// REQUIRES: ppc32-registered-target
// RUN: %clang_cc1 -triple powerpc-unknown-freebsd -emit-llvm -o - %s| FileCheck -check-prefix=SVR4-CHECK %s
#include <stdarg.h>
diff --git a/test/CodeGen/ppc64-align-long-double.c b/test/CodeGen/ppc64-align-long-double.c
index c4dcfa072367..6d07f7039da6 100644
--- a/test/CodeGen/ppc64-align-long-double.c
+++ b/test/CodeGen/ppc64-align-long-double.c
@@ -1,8 +1,6 @@
-// REQUIRES: ppc64-registered-target
+// REQUIRES: powerpc-registered-target
// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
-// CHECK: -f128:128:128-
-
struct S {
double a;
long double b;
diff --git a/test/CodeGen/ppc64-align-struct.c b/test/CodeGen/ppc64-align-struct.c
new file mode 100644
index 000000000000..a50c849b4568
--- /dev/null
+++ b/test/CodeGen/ppc64-align-struct.c
@@ -0,0 +1,154 @@
+// RUN: %clang_cc1 -faltivec -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
+
+#include <stdarg.h>
+
+struct test1 { int x; int y; };
+struct test2 { int x; int y; } __attribute__((aligned (16)));
+struct test3 { int x; int y; } __attribute__((aligned (32)));
+struct test4 { int x; int y; int z; };
+struct test5 { int x[17]; };
+struct test6 { int x[17]; } __attribute__((aligned (16)));
+struct test7 { int x[17]; } __attribute__((aligned (32)));
+
+// CHECK: define void @test1(i32 signext %x, i64 %y.coerce)
+void test1 (int x, struct test1 y)
+{
+}
+
+// CHECK: define void @test2(i32 signext %x, [1 x i128] %y.coerce)
+void test2 (int x, struct test2 y)
+{
+}
+
+// CHECK: define void @test3(i32 signext %x, [2 x i128] %y.coerce)
+void test3 (int x, struct test3 y)
+{
+}
+
+// CHECK: define void @test4(i32 signext %x, [2 x i64] %y.coerce)
+void test4 (int x, struct test4 y)
+{
+}
+
+// CHECK: define void @test5(i32 signext %x, %struct.test5* byval align 8 %y)
+void test5 (int x, struct test5 y)
+{
+}
+
+// CHECK: define void @test6(i32 signext %x, %struct.test6* byval align 16 %y)
+void test6 (int x, struct test6 y)
+{
+}
+
+// This case requires run-time realignment of the incoming struct
+// CHECK: define void @test7(i32 signext %x, %struct.test7* byval align 16)
+// CHECK: %y = alloca %struct.test7, align 32
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64
+void test7 (int x, struct test7 y)
+{
+}
+
+// CHECK: define void @test1va(%struct.test1* noalias sret %agg.result, i32 signext %x, ...)
+// CHECK: %[[CUR:[^ ]+]] = load i8** %ap
+// CHECK: %[[NEXT:[^ ]+]] = getelementptr i8* %[[CUR]], i64 8
+// CHECK: store i8* %[[NEXT]], i8** %ap
+// CHECK: bitcast i8* %[[CUR]] to %struct.test1*
+struct test1 test1va (int x, ...)
+{
+ struct test1 y;
+ va_list ap;
+ va_start(ap, x);
+ y = va_arg (ap, struct test1);
+ va_end(ap);
+ return y;
+}
+
+// CHECK: define void @test2va(%struct.test2* noalias sret %agg.result, i32 signext %x, ...)
+// CHECK: %[[CUR:[^ ]+]] = load i8** %ap
+// CHECK: %[[TMP0:[^ ]+]] = ptrtoint i8* %[[CUR]] to i64
+// CHECK: %[[TMP1:[^ ]+]] = add i64 %[[TMP0]], 15
+// CHECK: %[[TMP2:[^ ]+]] = and i64 %[[TMP1]], -16
+// CHECK: %[[ALIGN:[^ ]+]] = inttoptr i64 %[[TMP2]] to i8*
+// CHECK: %[[NEXT:[^ ]+]] = getelementptr i8* %[[ALIGN]], i64 16
+// CHECK: store i8* %[[NEXT]], i8** %ap
+// CHECK: bitcast i8* %[[ALIGN]] to %struct.test2*
+struct test2 test2va (int x, ...)
+{
+ struct test2 y;
+ va_list ap;
+ va_start(ap, x);
+ y = va_arg (ap, struct test2);
+ va_end(ap);
+ return y;
+}
+
+// CHECK: define void @test3va(%struct.test3* noalias sret %agg.result, i32 signext %x, ...)
+// CHECK: %[[CUR:[^ ]+]] = load i8** %ap
+// CHECK: %[[TMP0:[^ ]+]] = ptrtoint i8* %[[CUR]] to i64
+// CHECK: %[[TMP1:[^ ]+]] = add i64 %[[TMP0]], 15
+// CHECK: %[[TMP2:[^ ]+]] = and i64 %[[TMP1]], -16
+// CHECK: %[[ALIGN:[^ ]+]] = inttoptr i64 %[[TMP2]] to i8*
+// CHECK: %[[NEXT:[^ ]+]] = getelementptr i8* %[[ALIGN]], i64 32
+// CHECK: store i8* %[[NEXT]], i8** %ap
+// CHECK: bitcast i8* %[[ALIGN]] to %struct.test3*
+struct test3 test3va (int x, ...)
+{
+ struct test3 y;
+ va_list ap;
+ va_start(ap, x);
+ y = va_arg (ap, struct test3);
+ va_end(ap);
+ return y;
+}
+
+// CHECK: define void @test4va(%struct.test4* noalias sret %agg.result, i32 signext %x, ...)
+// CHECK: %[[CUR:[^ ]+]] = load i8** %ap
+// CHECK: %[[NEXT:[^ ]+]] = getelementptr i8* %[[CUR]], i64 16
+// CHECK: store i8* %[[NEXT]], i8** %ap
+// CHECK: bitcast i8* %[[CUR]] to %struct.test4*
+struct test4 test4va (int x, ...)
+{
+ struct test4 y;
+ va_list ap;
+ va_start(ap, x);
+ y = va_arg (ap, struct test4);
+ va_end(ap);
+ return y;
+}
+
+// CHECK: define void @testva_longdouble(%struct.test_longdouble* noalias sret %agg.result, i32 signext %x, ...)
+// CHECK: %[[CUR:[^ ]+]] = load i8** %ap
+// CHECK: %[[NEXT:[^ ]+]] = getelementptr i8* %[[CUR]], i64 16
+// CHECK: store i8* %[[NEXT]], i8** %ap
+// CHECK: bitcast i8* %[[CUR]] to %struct.test_longdouble*
+struct test_longdouble { long double x; };
+struct test_longdouble testva_longdouble (int x, ...)
+{
+ struct test_longdouble y;
+ va_list ap;
+ va_start(ap, x);
+ y = va_arg (ap, struct test_longdouble);
+ va_end(ap);
+ return y;
+}
+
+// CHECK: define void @testva_vector(%struct.test_vector* noalias sret %agg.result, i32 signext %x, ...)
+// CHECK: %[[CUR:[^ ]+]] = load i8** %ap
+// CHECK: %[[TMP0:[^ ]+]] = ptrtoint i8* %[[CUR]] to i64
+// CHECK: %[[TMP1:[^ ]+]] = add i64 %[[TMP0]], 15
+// CHECK: %[[TMP2:[^ ]+]] = and i64 %[[TMP1]], -16
+// CHECK: %[[ALIGN:[^ ]+]] = inttoptr i64 %[[TMP2]] to i8*
+// CHECK: %[[NEXT:[^ ]+]] = getelementptr i8* %[[ALIGN]], i64 16
+// CHECK: store i8* %[[NEXT]], i8** %ap
+// CHECK: bitcast i8* %[[ALIGN]] to %struct.test_vector*
+struct test_vector { vector int x; };
+struct test_vector testva_vector (int x, ...)
+{
+ struct test_vector y;
+ va_list ap;
+ va_start(ap, x);
+ y = va_arg (ap, struct test_vector);
+ va_end(ap);
+ return y;
+}
+
diff --git a/test/CodeGen/ppc64-complex-parms.c b/test/CodeGen/ppc64-complex-parms.c
index 92a6fa59b5f2..fe3025a711b1 100644
--- a/test/CodeGen/ppc64-complex-parms.c
+++ b/test/CodeGen/ppc64-complex-parms.c
@@ -1,4 +1,3 @@
-// REQUIRES: ppc64-registered-target
// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
float crealf(_Complex float);
diff --git a/test/CodeGen/ppc64-complex-return.c b/test/CodeGen/ppc64-complex-return.c
index b3fd5497701f..cdb0ed6e47a6 100644
--- a/test/CodeGen/ppc64-complex-return.c
+++ b/test/CodeGen/ppc64-complex-return.c
@@ -1,4 +1,4 @@
-// REQUIRES: ppc64-registered-target
+// REQUIRES: powerpc-registered-target
// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
float crealf(_Complex float);
diff --git a/test/CodeGen/ppc64-extend.c b/test/CodeGen/ppc64-extend.c
index d46b65104392..52e5f136dd95 100644
--- a/test/CodeGen/ppc64-extend.c
+++ b/test/CodeGen/ppc64-extend.c
@@ -1,4 +1,4 @@
-// REQUIRES: ppc64-registered-target
+// REQUIRES: powerpc-registered-target
// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
void f1(int x) { return; }
diff --git a/test/CodeGen/ppc64-inline-asm.c b/test/CodeGen/ppc64-inline-asm.c
new file mode 100644
index 000000000000..552fe280e000
--- /dev/null
+++ b/test/CodeGen/ppc64-inline-asm.c
@@ -0,0 +1,26 @@
+// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -O2 -emit-llvm -o - %s | FileCheck %s
+
+_Bool test_wc_i1(_Bool b1, _Bool b2) {
+ _Bool o;
+ asm("crand %0, %1, %2" : "=wc"(o) : "wc"(b1), "wc"(b2) : );
+ return o;
+// CHECK-LABEL: define zeroext i1 @test_wc_i1(i1 zeroext %b1, i1 zeroext %b2)
+// CHECK: call i8 asm "crand $0, $1, $2", "=^wc,^wc,^wc"(i1 %b1, i1 %b2)
+}
+
+int test_wc_i32(int b1, int b2) {
+ int o;
+ asm("crand %0, %1, %2" : "=wc"(o) : "wc"(b1), "wc"(b2) : );
+ return o;
+// CHECK-LABEL: signext i32 @test_wc_i32(i32 signext %b1, i32 signext %b2)
+// CHECK: call i32 asm "crand $0, $1, $2", "=^wc,^wc,^wc"(i32 %b1, i32 %b2)
+}
+
+unsigned char test_wc_i8(unsigned char b1, unsigned char b2) {
+ unsigned char o;
+ asm("crand %0, %1, %2" : "=wc"(o) : "wc"(b1), "wc"(b2) : );
+ return o;
+// CHECK-LABEL: zeroext i8 @test_wc_i8(i8 zeroext %b1, i8 zeroext %b2)
+// CHECK: call i8 asm "crand $0, $1, $2", "=^wc,^wc,^wc"(i8 %b1, i8 %b2)
+}
+
diff --git a/test/CodeGen/ppc64-struct-onefloat.c b/test/CodeGen/ppc64-struct-onefloat.c
index e26987f44a0e..11b16a4c5081 100644
--- a/test/CodeGen/ppc64-struct-onefloat.c
+++ b/test/CodeGen/ppc64-struct-onefloat.c
@@ -1,4 +1,4 @@
-// REQUIRES: ppc64-registered-target
+// REQUIRES: powerpc-registered-target
// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
typedef struct s1 { float f; } Sf;
diff --git a/test/CodeGen/ppc64-struct-onevect.c b/test/CodeGen/ppc64-struct-onevect.c
index a5a1232ffa89..34f4cc0753ac 100644
--- a/test/CodeGen/ppc64-struct-onevect.c
+++ b/test/CodeGen/ppc64-struct-onevect.c
@@ -1,4 +1,4 @@
-// REQUIRES: ppc64-registered-target
+// REQUIRES: powerpc-registered-target
// RUN: %clang_cc1 -O2 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
typedef float v4sf __attribute__ ((vector_size (16)));
diff --git a/test/CodeGen/ppc64-varargs-complex.c b/test/CodeGen/ppc64-varargs-complex.c
index b65a773c8325..8fc88395bc39 100644
--- a/test/CodeGen/ppc64-varargs-complex.c
+++ b/test/CodeGen/ppc64-varargs-complex.c
@@ -1,4 +1,4 @@
-// REQUIRES: ppc64-registered-target
+// REQUIRES: powerpc-registered-target
// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
#include <stdarg.h>
diff --git a/test/CodeGen/ppc64-varargs-struct.c b/test/CodeGen/ppc64-varargs-struct.c
index 61c33b052980..70b242c7f417 100644
--- a/test/CodeGen/ppc64-varargs-struct.c
+++ b/test/CodeGen/ppc64-varargs-struct.c
@@ -1,4 +1,4 @@
-// REQUIRES: ppc64-registered-target
+// REQUIRES: powerpc-registered-target
// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
#include <stdarg.h>
diff --git a/test/CodeGen/ppc64-vector.c b/test/CodeGen/ppc64-vector.c
new file mode 100644
index 000000000000..f0211f0ec197
--- /dev/null
+++ b/test/CodeGen/ppc64-vector.c
@@ -0,0 +1,52 @@
+// RUN: %clang_cc1 -faltivec -triple powerpc64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
+
+typedef short v2i16 __attribute__((vector_size (4)));
+typedef short v3i16 __attribute__((vector_size (6)));
+typedef short v4i16 __attribute__((vector_size (8)));
+typedef short v6i16 __attribute__((vector_size (12)));
+typedef short v8i16 __attribute__((vector_size (16)));
+typedef short v16i16 __attribute__((vector_size (32)));
+
+struct v16i16 { v16i16 x; };
+
+// CHECK: define i32 @test_v2i16(i32 %x.coerce)
+v2i16 test_v2i16(v2i16 x)
+{
+ return x;
+}
+
+// CHECK: define i64 @test_v3i16(i64 %x.coerce)
+v3i16 test_v3i16(v3i16 x)
+{
+ return x;
+}
+
+// CHECK: define i64 @test_v4i16(i64 %x.coerce)
+v4i16 test_v4i16(v4i16 x)
+{
+ return x;
+}
+
+// CHECK: define <6 x i16> @test_v6i16(<6 x i16> %x)
+v6i16 test_v6i16(v6i16 x)
+{
+ return x;
+}
+
+// CHECK: define <8 x i16> @test_v8i16(<8 x i16> %x)
+v8i16 test_v8i16(v8i16 x)
+{
+ return x;
+}
+
+// CHECK: define void @test_v16i16(<16 x i16>* noalias sret %agg.result, <16 x i16>*)
+v16i16 test_v16i16(v16i16 x)
+{
+ return x;
+}
+
+// CHECK: define void @test_struct_v16i16(%struct.v16i16* noalias sret %agg.result, [2 x i128] %x.coerce)
+struct v16i16 test_struct_v16i16(struct v16i16 x)
+{
+ return x;
+}
diff --git a/test/CodeGen/ppc64le-aggregates.c b/test/CodeGen/ppc64le-aggregates.c
new file mode 100644
index 000000000000..acf34a8a8012
--- /dev/null
+++ b/test/CodeGen/ppc64le-aggregates.c
@@ -0,0 +1,423 @@
+// REQUIRES: powerpc-registered-target
+// RUN: %clang_cc1 -faltivec -triple powerpc64le-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
+
+// Test homogeneous float aggregate passing and returning.
+
+struct f1 { float f[1]; };
+struct f2 { float f[2]; };
+struct f3 { float f[3]; };
+struct f4 { float f[4]; };
+struct f5 { float f[5]; };
+struct f6 { float f[6]; };
+struct f7 { float f[7]; };
+struct f8 { float f[8]; };
+struct f9 { float f[9]; };
+
+struct fab { float a; float b; };
+struct fabc { float a; float b; float c; };
+
+// CHECK: define [1 x float] @func_f1(float inreg %x.coerce)
+struct f1 func_f1(struct f1 x) { return x; }
+
+// CHECK: define [2 x float] @func_f2([2 x float] %x.coerce)
+struct f2 func_f2(struct f2 x) { return x; }
+
+// CHECK: define [3 x float] @func_f3([3 x float] %x.coerce)
+struct f3 func_f3(struct f3 x) { return x; }
+
+// CHECK: define [4 x float] @func_f4([4 x float] %x.coerce)
+struct f4 func_f4(struct f4 x) { return x; }
+
+// CHECK: define [5 x float] @func_f5([5 x float] %x.coerce)
+struct f5 func_f5(struct f5 x) { return x; }
+
+// CHECK: define [6 x float] @func_f6([6 x float] %x.coerce)
+struct f6 func_f6(struct f6 x) { return x; }
+
+// CHECK: define [7 x float] @func_f7([7 x float] %x.coerce)
+struct f7 func_f7(struct f7 x) { return x; }
+
+// CHECK: define [8 x float] @func_f8([8 x float] %x.coerce)
+struct f8 func_f8(struct f8 x) { return x; }
+
+// CHECK: define void @func_f9(%struct.f9* noalias sret %agg.result, [5 x i64] %x.coerce)
+struct f9 func_f9(struct f9 x) { return x; }
+
+// CHECK: define [2 x float] @func_fab([2 x float] %x.coerce)
+struct fab func_fab(struct fab x) { return x; }
+
+// CHECK: define [3 x float] @func_fabc([3 x float] %x.coerce)
+struct fabc func_fabc(struct fabc x) { return x; }
+
+// CHECK-LABEL: @call_f1
+// CHECK: %[[TMP:[^ ]+]] = load float* getelementptr inbounds (%struct.f1* @global_f1, i32 0, i32 0, i32 0), align 1
+// CHECK: call [1 x float] @func_f1(float inreg %[[TMP]])
+struct f1 global_f1;
+void call_f1(void) { global_f1 = func_f1(global_f1); }
+
+// CHECK-LABEL: @call_f2
+// CHECK: %[[TMP:[^ ]+]] = load [2 x float]* getelementptr inbounds (%struct.f2* @global_f2, i32 0, i32 0), align 1
+// CHECK: call [2 x float] @func_f2([2 x float] %[[TMP]])
+struct f2 global_f2;
+void call_f2(void) { global_f2 = func_f2(global_f2); }
+
+// CHECK-LABEL: @call_f3
+// CHECK: %[[TMP:[^ ]+]] = load [3 x float]* getelementptr inbounds (%struct.f3* @global_f3, i32 0, i32 0), align 1
+// CHECK: call [3 x float] @func_f3([3 x float] %[[TMP]])
+struct f3 global_f3;
+void call_f3(void) { global_f3 = func_f3(global_f3); }
+
+// CHECK-LABEL: @call_f4
+// CHECK: %[[TMP:[^ ]+]] = load [4 x float]* getelementptr inbounds (%struct.f4* @global_f4, i32 0, i32 0), align 1
+// CHECK: call [4 x float] @func_f4([4 x float] %[[TMP]])
+struct f4 global_f4;
+void call_f4(void) { global_f4 = func_f4(global_f4); }
+
+// CHECK-LABEL: @call_f5
+// CHECK: %[[TMP:[^ ]+]] = load [5 x float]* getelementptr inbounds (%struct.f5* @global_f5, i32 0, i32 0), align 1
+// CHECK: call [5 x float] @func_f5([5 x float] %[[TMP]])
+struct f5 global_f5;
+void call_f5(void) { global_f5 = func_f5(global_f5); }
+
+// CHECK-LABEL: @call_f6
+// CHECK: %[[TMP:[^ ]+]] = load [6 x float]* getelementptr inbounds (%struct.f6* @global_f6, i32 0, i32 0), align 1
+// CHECK: call [6 x float] @func_f6([6 x float] %[[TMP]])
+struct f6 global_f6;
+void call_f6(void) { global_f6 = func_f6(global_f6); }
+
+// CHECK-LABEL: @call_f7
+// CHECK: %[[TMP:[^ ]+]] = load [7 x float]* getelementptr inbounds (%struct.f7* @global_f7, i32 0, i32 0), align 1
+// CHECK: call [7 x float] @func_f7([7 x float] %[[TMP]])
+struct f7 global_f7;
+void call_f7(void) { global_f7 = func_f7(global_f7); }
+
+// CHECK-LABEL: @call_f8
+// CHECK: %[[TMP:[^ ]+]] = load [8 x float]* getelementptr inbounds (%struct.f8* @global_f8, i32 0, i32 0), align 1
+// CHECK: call [8 x float] @func_f8([8 x float] %[[TMP]])
+struct f8 global_f8;
+void call_f8(void) { global_f8 = func_f8(global_f8); }
+
+// CHECK-LABEL: @call_f9
+// CHECK: %[[TMP1:[^ ]+]] = alloca [5 x i64]
+// CHECK: %[[TMP2:[^ ]+]] = bitcast [5 x i64]* %[[TMP1]] to i8*
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* %[[TMP2]], i8* bitcast (%struct.f9* @global_f9 to i8*), i64 36, i32 1, i1 false)
+// CHECK: %[[TMP3:[^ ]+]] = load [5 x i64]* %[[TMP1]]
+// CHECK: call void @func_f9(%struct.f9* sret %{{[^ ]+}}, [5 x i64] %[[TMP3]])
+struct f9 global_f9;
+void call_f9(void) { global_f9 = func_f9(global_f9); }
+
+// CHECK-LABEL: @call_fab
+// CHECK: %[[TMP:[^ ]+]] = load [2 x float]* bitcast (%struct.fab* @global_fab to [2 x float]*)
+// CHECK: call [2 x float] @func_fab([2 x float] %[[TMP]])
+struct fab global_fab;
+void call_fab(void) { global_fab = func_fab(global_fab); }
+
+// CHECK-LABEL: @call_fabc
+// CHECK: %[[TMP:[^ ]+]] = load [3 x float]* bitcast (%struct.fabc* @global_fabc to [3 x float]*)
+// CHECK: call [3 x float] @func_fabc([3 x float] %[[TMP]])
+struct fabc global_fabc;
+void call_fabc(void) { global_fabc = func_fabc(global_fabc); }
+
+
+// Test homogeneous vector aggregate passing and returning.
+
+struct v1 { vector int v[1]; };
+struct v2 { vector int v[2]; };
+struct v3 { vector int v[3]; };
+struct v4 { vector int v[4]; };
+struct v5 { vector int v[5]; };
+struct v6 { vector int v[6]; };
+struct v7 { vector int v[7]; };
+struct v8 { vector int v[8]; };
+struct v9 { vector int v[9]; };
+
+struct vab { vector int a; vector int b; };
+struct vabc { vector int a; vector int b; vector int c; };
+
+// CHECK: define [1 x <4 x i32>] @func_v1(<4 x i32> inreg %x.coerce)
+struct v1 func_v1(struct v1 x) { return x; }
+
+// CHECK: define [2 x <4 x i32>] @func_v2([2 x <4 x i32>] %x.coerce)
+struct v2 func_v2(struct v2 x) { return x; }
+
+// CHECK: define [3 x <4 x i32>] @func_v3([3 x <4 x i32>] %x.coerce)
+struct v3 func_v3(struct v3 x) { return x; }
+
+// CHECK: define [4 x <4 x i32>] @func_v4([4 x <4 x i32>] %x.coerce)
+struct v4 func_v4(struct v4 x) { return x; }
+
+// CHECK: define [5 x <4 x i32>] @func_v5([5 x <4 x i32>] %x.coerce)
+struct v5 func_v5(struct v5 x) { return x; }
+
+// CHECK: define [6 x <4 x i32>] @func_v6([6 x <4 x i32>] %x.coerce)
+struct v6 func_v6(struct v6 x) { return x; }
+
+// CHECK: define [7 x <4 x i32>] @func_v7([7 x <4 x i32>] %x.coerce)
+struct v7 func_v7(struct v7 x) { return x; }
+
+// CHECK: define [8 x <4 x i32>] @func_v8([8 x <4 x i32>] %x.coerce)
+struct v8 func_v8(struct v8 x) { return x; }
+
+// CHECK: define void @func_v9(%struct.v9* noalias sret %agg.result, %struct.v9* byval align 16 %x)
+struct v9 func_v9(struct v9 x) { return x; }
+
+// CHECK: define [2 x <4 x i32>] @func_vab([2 x <4 x i32>] %x.coerce)
+struct vab func_vab(struct vab x) { return x; }
+
+// CHECK: define [3 x <4 x i32>] @func_vabc([3 x <4 x i32>] %x.coerce)
+struct vabc func_vabc(struct vabc x) { return x; }
+
+// CHECK-LABEL: @call_v1
+// CHECK: %[[TMP:[^ ]+]] = load <4 x i32>* getelementptr inbounds (%struct.v1* @global_v1, i32 0, i32 0, i32 0), align 1
+// CHECK: call [1 x <4 x i32>] @func_v1(<4 x i32> inreg %[[TMP]])
+struct v1 global_v1;
+void call_v1(void) { global_v1 = func_v1(global_v1); }
+
+// CHECK-LABEL: @call_v2
+// CHECK: %[[TMP:[^ ]+]] = load [2 x <4 x i32>]* getelementptr inbounds (%struct.v2* @global_v2, i32 0, i32 0), align 1
+// CHECK: call [2 x <4 x i32>] @func_v2([2 x <4 x i32>] %[[TMP]])
+struct v2 global_v2;
+void call_v2(void) { global_v2 = func_v2(global_v2); }
+
+// CHECK-LABEL: @call_v3
+// CHECK: %[[TMP:[^ ]+]] = load [3 x <4 x i32>]* getelementptr inbounds (%struct.v3* @global_v3, i32 0, i32 0), align 1
+// CHECK: call [3 x <4 x i32>] @func_v3([3 x <4 x i32>] %[[TMP]])
+struct v3 global_v3;
+void call_v3(void) { global_v3 = func_v3(global_v3); }
+
+// CHECK-LABEL: @call_v4
+// CHECK: %[[TMP:[^ ]+]] = load [4 x <4 x i32>]* getelementptr inbounds (%struct.v4* @global_v4, i32 0, i32 0), align 1
+// CHECK: call [4 x <4 x i32>] @func_v4([4 x <4 x i32>] %[[TMP]])
+struct v4 global_v4;
+void call_v4(void) { global_v4 = func_v4(global_v4); }
+
+// CHECK-LABEL: @call_v5
+// CHECK: %[[TMP:[^ ]+]] = load [5 x <4 x i32>]* getelementptr inbounds (%struct.v5* @global_v5, i32 0, i32 0), align 1
+// CHECK: call [5 x <4 x i32>] @func_v5([5 x <4 x i32>] %[[TMP]])
+struct v5 global_v5;
+void call_v5(void) { global_v5 = func_v5(global_v5); }
+
+// CHECK-LABEL: @call_v6
+// CHECK: %[[TMP:[^ ]+]] = load [6 x <4 x i32>]* getelementptr inbounds (%struct.v6* @global_v6, i32 0, i32 0), align 1
+// CHECK: call [6 x <4 x i32>] @func_v6([6 x <4 x i32>] %[[TMP]])
+struct v6 global_v6;
+void call_v6(void) { global_v6 = func_v6(global_v6); }
+
+// CHECK-LABEL: @call_v7
+// CHECK: %[[TMP:[^ ]+]] = load [7 x <4 x i32>]* getelementptr inbounds (%struct.v7* @global_v7, i32 0, i32 0), align 1
+// CHECK: call [7 x <4 x i32>] @func_v7([7 x <4 x i32>] %[[TMP]])
+struct v7 global_v7;
+void call_v7(void) { global_v7 = func_v7(global_v7); }
+
+// CHECK-LABEL: @call_v8
+// CHECK: %[[TMP:[^ ]+]] = load [8 x <4 x i32>]* getelementptr inbounds (%struct.v8* @global_v8, i32 0, i32 0), align 1
+// CHECK: call [8 x <4 x i32>] @func_v8([8 x <4 x i32>] %[[TMP]])
+struct v8 global_v8;
+void call_v8(void) { global_v8 = func_v8(global_v8); }
+
+// CHECK-LABEL: @call_v9
+// CHECK: call void @func_v9(%struct.v9* sret %{{[^ ]+}}, %struct.v9* byval align 16 @global_v9)
+struct v9 global_v9;
+void call_v9(void) { global_v9 = func_v9(global_v9); }
+
+// CHECK-LABEL: @call_vab
+// CHECK: %[[TMP:[^ ]+]] = load [2 x <4 x i32>]* bitcast (%struct.vab* @global_vab to [2 x <4 x i32>]*)
+// CHECK: call [2 x <4 x i32>] @func_vab([2 x <4 x i32>] %[[TMP]])
+struct vab global_vab;
+void call_vab(void) { global_vab = func_vab(global_vab); }
+
+// CHECK-LABEL: @call_vabc
+// CHECK: %[[TMP:[^ ]+]] = load [3 x <4 x i32>]* bitcast (%struct.vabc* @global_vabc to [3 x <4 x i32>]*)
+// CHECK: call [3 x <4 x i32>] @func_vabc([3 x <4 x i32>] %[[TMP]])
+struct vabc global_vabc;
+void call_vabc(void) { global_vabc = func_vabc(global_vabc); }
+
+
+// As clang extension, non-power-of-two vectors may also be part of
+// homogeneous aggregates.
+
+typedef float float3 __attribute__((vector_size (12)));
+
+struct v3f1 { float3 v[1]; };
+struct v3f2 { float3 v[2]; };
+struct v3f3 { float3 v[3]; };
+struct v3f4 { float3 v[4]; };
+struct v3f5 { float3 v[5]; };
+struct v3f6 { float3 v[6]; };
+struct v3f7 { float3 v[7]; };
+struct v3f8 { float3 v[8]; };
+struct v3f9 { float3 v[9]; };
+
+struct v3fab { float3 a; float3 b; };
+struct v3fabc { float3 a; float3 b; float3 c; };
+
+// CHECK: define [1 x <3 x float>] @func_v3f1(<3 x float> inreg %x.coerce)
+struct v3f1 func_v3f1(struct v3f1 x) { return x; }
+
+// CHECK: define [2 x <3 x float>] @func_v3f2([2 x <3 x float>] %x.coerce)
+struct v3f2 func_v3f2(struct v3f2 x) { return x; }
+
+// CHECK: define [3 x <3 x float>] @func_v3f3([3 x <3 x float>] %x.coerce)
+struct v3f3 func_v3f3(struct v3f3 x) { return x; }
+
+// CHECK: define [4 x <3 x float>] @func_v3f4([4 x <3 x float>] %x.coerce)
+struct v3f4 func_v3f4(struct v3f4 x) { return x; }
+
+// CHECK: define [5 x <3 x float>] @func_v3f5([5 x <3 x float>] %x.coerce)
+struct v3f5 func_v3f5(struct v3f5 x) { return x; }
+
+// CHECK: define [6 x <3 x float>] @func_v3f6([6 x <3 x float>] %x.coerce)
+struct v3f6 func_v3f6(struct v3f6 x) { return x; }
+
+// CHECK: define [7 x <3 x float>] @func_v3f7([7 x <3 x float>] %x.coerce)
+struct v3f7 func_v3f7(struct v3f7 x) { return x; }
+
+// CHECK: define [8 x <3 x float>] @func_v3f8([8 x <3 x float>] %x.coerce)
+struct v3f8 func_v3f8(struct v3f8 x) { return x; }
+
+// CHECK: define void @func_v3f9(%struct.v3f9* noalias sret %agg.result, %struct.v3f9* byval align 16 %x)
+struct v3f9 func_v3f9(struct v3f9 x) { return x; }
+
+// CHECK: define [2 x <3 x float>] @func_v3fab([2 x <3 x float>] %x.coerce)
+struct v3fab func_v3fab(struct v3fab x) { return x; }
+
+// CHECK: define [3 x <3 x float>] @func_v3fabc([3 x <3 x float>] %x.coerce)
+struct v3fabc func_v3fabc(struct v3fabc x) { return x; }
+
+// CHECK-LABEL: @call_v3f1
+// CHECK: %[[TMP:[^ ]+]] = load <3 x float>* getelementptr inbounds (%struct.v3f1* @global_v3f1, i32 0, i32 0, i32 0), align 1
+// CHECK: call [1 x <3 x float>] @func_v3f1(<3 x float> inreg %[[TMP]])
+struct v3f1 global_v3f1;
+void call_v3f1(void) { global_v3f1 = func_v3f1(global_v3f1); }
+
+// CHECK-LABEL: @call_v3f2
+// CHECK: %[[TMP:[^ ]+]] = load [2 x <3 x float>]* getelementptr inbounds (%struct.v3f2* @global_v3f2, i32 0, i32 0), align 1
+// CHECK: call [2 x <3 x float>] @func_v3f2([2 x <3 x float>] %[[TMP]])
+struct v3f2 global_v3f2;
+void call_v3f2(void) { global_v3f2 = func_v3f2(global_v3f2); }
+
+// CHECK-LABEL: @call_v3f3
+// CHECK: %[[TMP:[^ ]+]] = load [3 x <3 x float>]* getelementptr inbounds (%struct.v3f3* @global_v3f3, i32 0, i32 0), align 1
+// CHECK: call [3 x <3 x float>] @func_v3f3([3 x <3 x float>] %[[TMP]])
+struct v3f3 global_v3f3;
+void call_v3f3(void) { global_v3f3 = func_v3f3(global_v3f3); }
+
+// CHECK-LABEL: @call_v3f4
+// CHECK: %[[TMP:[^ ]+]] = load [4 x <3 x float>]* getelementptr inbounds (%struct.v3f4* @global_v3f4, i32 0, i32 0), align 1
+// CHECK: call [4 x <3 x float>] @func_v3f4([4 x <3 x float>] %[[TMP]])
+struct v3f4 global_v3f4;
+void call_v3f4(void) { global_v3f4 = func_v3f4(global_v3f4); }
+
+// CHECK-LABEL: @call_v3f5
+// CHECK: %[[TMP:[^ ]+]] = load [5 x <3 x float>]* getelementptr inbounds (%struct.v3f5* @global_v3f5, i32 0, i32 0), align 1
+// CHECK: call [5 x <3 x float>] @func_v3f5([5 x <3 x float>] %[[TMP]])
+struct v3f5 global_v3f5;
+void call_v3f5(void) { global_v3f5 = func_v3f5(global_v3f5); }
+
+// CHECK-LABEL: @call_v3f6
+// CHECK: %[[TMP:[^ ]+]] = load [6 x <3 x float>]* getelementptr inbounds (%struct.v3f6* @global_v3f6, i32 0, i32 0), align 1
+// CHECK: call [6 x <3 x float>] @func_v3f6([6 x <3 x float>] %[[TMP]])
+struct v3f6 global_v3f6;
+void call_v3f6(void) { global_v3f6 = func_v3f6(global_v3f6); }
+
+// CHECK-LABEL: @call_v3f7
+// CHECK: %[[TMP:[^ ]+]] = load [7 x <3 x float>]* getelementptr inbounds (%struct.v3f7* @global_v3f7, i32 0, i32 0), align 1
+// CHECK: call [7 x <3 x float>] @func_v3f7([7 x <3 x float>] %[[TMP]])
+struct v3f7 global_v3f7;
+void call_v3f7(void) { global_v3f7 = func_v3f7(global_v3f7); }
+
+// CHECK-LABEL: @call_v3f8
+// CHECK: %[[TMP:[^ ]+]] = load [8 x <3 x float>]* getelementptr inbounds (%struct.v3f8* @global_v3f8, i32 0, i32 0), align 1
+// CHECK: call [8 x <3 x float>] @func_v3f8([8 x <3 x float>] %[[TMP]])
+struct v3f8 global_v3f8;
+void call_v3f8(void) { global_v3f8 = func_v3f8(global_v3f8); }
+
+// CHECK-LABEL: @call_v3f9
+// CHECK: call void @func_v3f9(%struct.v3f9* sret %{{[^ ]+}}, %struct.v3f9* byval align 16 @global_v3f9)
+struct v3f9 global_v3f9;
+void call_v3f9(void) { global_v3f9 = func_v3f9(global_v3f9); }
+
+// CHECK-LABEL: @call_v3fab
+// CHECK: %[[TMP:[^ ]+]] = load [2 x <3 x float>]* bitcast (%struct.v3fab* @global_v3fab to [2 x <3 x float>]*)
+// CHECK: call [2 x <3 x float>] @func_v3fab([2 x <3 x float>] %[[TMP]])
+struct v3fab global_v3fab;
+void call_v3fab(void) { global_v3fab = func_v3fab(global_v3fab); }
+
+// CHECK-LABEL: @call_v3fabc
+// CHECK: %[[TMP:[^ ]+]] = load [3 x <3 x float>]* bitcast (%struct.v3fabc* @global_v3fabc to [3 x <3 x float>]*)
+// CHECK: call [3 x <3 x float>] @func_v3fabc([3 x <3 x float>] %[[TMP]])
+struct v3fabc global_v3fabc;
+void call_v3fabc(void) { global_v3fabc = func_v3fabc(global_v3fabc); }
+
+
+// Test returning small aggregates.
+
+struct s1 { char c[1]; };
+struct s2 { char c[2]; };
+struct s3 { char c[3]; };
+struct s4 { char c[4]; };
+struct s5 { char c[5]; };
+struct s6 { char c[6]; };
+struct s7 { char c[7]; };
+struct s8 { char c[8]; };
+struct s9 { char c[9]; };
+struct s16 { char c[16]; };
+struct s17 { char c[17]; };
+
+// CHECK: define i8 @ret_s1()
+struct s1 ret_s1() {
+ return (struct s1) { 17 };
+}
+
+// CHECK: define i16 @ret_s2()
+struct s2 ret_s2() {
+ return (struct s2) { 17, 18 };
+}
+
+// CHECK: define i24 @ret_s3()
+struct s3 ret_s3() {
+ return (struct s3) { 17, 18, 19 };
+}
+
+// CHECK: define i32 @ret_s4()
+struct s4 ret_s4() {
+ return (struct s4) { 17, 18, 19, 20 };
+}
+
+// CHECK: define i40 @ret_s5()
+struct s5 ret_s5() {
+ return (struct s5) { 17, 18, 19, 20, 21 };
+}
+
+// CHECK: define i48 @ret_s6()
+struct s6 ret_s6() {
+ return (struct s6) { 17, 18, 19, 20, 21, 22 };
+}
+
+// CHECK: define i56 @ret_s7()
+struct s7 ret_s7() {
+ return (struct s7) { 17, 18, 19, 20, 21, 22, 23 };
+}
+
+// CHECK: define i64 @ret_s8()
+struct s8 ret_s8() {
+ return (struct s8) { 17, 18, 19, 20, 21, 22, 23, 24 };
+}
+
+// CHECK: define { i64, i64 } @ret_s9()
+struct s9 ret_s9() {
+ return (struct s9) { 17, 18, 19, 20, 21, 22, 23, 24, 25 };
+}
+
+// CHECK: define { i64, i64 } @ret_s16()
+struct s16 ret_s16() {
+ return (struct s16) { 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32 };
+}
+
+// CHECK: define void @ret_s17(%struct.s17*
+struct s17 ret_s17() {
+ return (struct s17) { 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33 };
+}
+
diff --git a/test/CodeGen/ppc64le-varargs-complex.c b/test/CodeGen/ppc64le-varargs-complex.c
new file mode 100644
index 000000000000..b89f462c380a
--- /dev/null
+++ b/test/CodeGen/ppc64le-varargs-complex.c
@@ -0,0 +1,69 @@
+// REQUIRES: powerpc-registered-target
+// RUN: %clang_cc1 -triple powerpc64le-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
+
+#include <stdarg.h>
+
+void testva (int n, ...)
+{
+ va_list ap;
+
+ _Complex int i = va_arg(ap, _Complex int);
+ // CHECK: %[[VAR40:[A-Za-z0-9.]+]] = load i8** %[[VAR100:[A-Za-z0-9.]+]]
+ // CHECK-NEXT: %[[VAR41:[A-Za-z0-9.]+]] = getelementptr i8* %[[VAR40]], i64 16
+ // CHECK-NEXT: store i8* %[[VAR41]], i8** %[[VAR100]]
+ // CHECK-NEXT: %[[VAR1:[A-Za-z0-9.]+]] = ptrtoint i8* %[[VAR40]] to i64
+ // CHECK-NEXT: %[[VAR3:[A-Za-z0-9.]+]] = add i64 %[[VAR1]], 8
+ // CHECK-NEXT: %[[VAR4:[A-Za-z0-9.]+]] = inttoptr i64 %[[VAR1]] to i32*
+ // CHECK-NEXT: %[[VAR5:[A-Za-z0-9.]+]] = inttoptr i64 %[[VAR3]] to i32*
+ // CHECK-NEXT: %[[VAR6:[A-Za-z0-9.]+]] = load i32* %[[VAR4]]
+ // CHECK-NEXT: %[[VAR7:[A-Za-z0-9.]+]] = load i32* %[[VAR5]]
+ // CHECK-NEXT: %[[VAR8:[A-Za-z0-9.]+]] = getelementptr inbounds { i32, i32 }* %[[VAR0:[A-Za-z0-9.]+]], i32 0, i32 0
+ // CHECK-NEXT: %[[VAR9:[A-Za-z0-9.]+]] = getelementptr inbounds { i32, i32 }* %[[VAR0]], i32 0, i32 1
+ // CHECK-NEXT: store i32 %[[VAR6]], i32* %[[VAR8]]
+ // CHECK-NEXT: store i32 %[[VAR7]], i32* %[[VAR9]]
+
+ _Complex short s = va_arg(ap, _Complex short);
+ // CHECK: %[[VAR50:[A-Za-z0-9.]+]] = load i8** %[[VAR100:[A-Za-z0-9.]+]]
+ // CHECK-NEXT: %[[VAR51:[A-Za-z0-9.]+]] = getelementptr i8* %[[VAR50]], i64 16
+ // CHECK-NEXT: store i8* %[[VAR51]], i8** %[[VAR100]]
+ // CHECK: %[[VAR11:[A-Za-z0-9.]+]] = ptrtoint i8* %{{[A-Za-z0-9.]+}} to i64
+ // CHECK-NEXT: %[[VAR13:[A-Za-z0-9.]+]] = add i64 %[[VAR11]], 8
+ // CHECK-NEXT: %[[VAR14:[A-Za-z0-9.]+]] = inttoptr i64 %[[VAR11]] to i16*
+ // CHECK-NEXT: %[[VAR15:[A-Za-z0-9.]+]] = inttoptr i64 %[[VAR13]] to i16*
+ // CHECK-NEXT: %[[VAR16:[A-Za-z0-9.]+]] = load i16* %[[VAR14]]
+ // CHECK-NEXT: %[[VAR17:[A-Za-z0-9.]+]] = load i16* %[[VAR15]]
+ // CHECK-NEXT: %[[VAR18:[A-Za-z0-9.]+]] = getelementptr inbounds { i16, i16 }* %[[VAR10:[A-Za-z0-9.]+]], i32 0, i32 0
+ // CHECK-NEXT: %[[VAR19:[A-Za-z0-9.]+]] = getelementptr inbounds { i16, i16 }* %[[VAR10]], i32 0, i32 1
+ // CHECK-NEXT: store i16 %[[VAR16]], i16* %[[VAR18]]
+ // CHECK-NEXT: store i16 %[[VAR17]], i16* %[[VAR19]]
+
+ _Complex char c = va_arg(ap, _Complex char);
+ // CHECK: %[[VAR60:[A-Za-z0-9.]+]] = load i8** %[[VAR100:[A-Za-z0-9.]+]]
+ // CHECK-NEXT: %[[VAR61:[A-Za-z0-9.]+]] = getelementptr i8* %[[VAR60]], i64 16
+ // CHECK-NEXT: store i8* %[[VAR61]], i8** %[[VAR100]]
+ // CHECK: %[[VAR21:[A-Za-z0-9.]+]] = ptrtoint i8* %{{[A-Za-z0-9.]+}} to i64
+ // CHECK-NEXT: %[[VAR23:[A-Za-z0-9.]+]] = add i64 %[[VAR21]], 8
+ // CHECK-NEXT: %[[VAR24:[A-Za-z0-9.]+]] = inttoptr i64 %[[VAR21]] to i8*
+ // CHECK-NEXT: %[[VAR25:[A-Za-z0-9.]+]] = inttoptr i64 %[[VAR23]] to i8*
+ // CHECK-NEXT: %[[VAR26:[A-Za-z0-9.]+]] = load i8* %[[VAR24]]
+ // CHECK-NEXT: %[[VAR27:[A-Za-z0-9.]+]] = load i8* %[[VAR25]]
+ // CHECK-NEXT: %[[VAR28:[A-Za-z0-9.]+]] = getelementptr inbounds { i8, i8 }* %[[VAR20:[A-Za-z0-9.]+]], i32 0, i32 0
+ // CHECK-NEXT: %[[VAR29:[A-Za-z0-9.]+]] = getelementptr inbounds { i8, i8 }* %[[VAR20]], i32 0, i32 1
+ // CHECK-NEXT: store i8 %[[VAR26]], i8* %[[VAR28]]
+ // CHECK-NEXT: store i8 %[[VAR27]], i8* %[[VAR29]]
+
+ _Complex float f = va_arg(ap, _Complex float);
+ // CHECK: %[[VAR70:[A-Za-z0-9.]+]] = load i8** %[[VAR100:[A-Za-z0-9.]+]]
+ // CHECK-NEXT: %[[VAR71:[A-Za-z0-9.]+]] = getelementptr i8* %[[VAR70]], i64 16
+ // CHECK-NEXT: store i8* %[[VAR71]], i8** %[[VAR100]]
+ // CHECK: %[[VAR31:[A-Za-z0-9.]+]] = ptrtoint i8* %{{[A-Za-z0-9.]+}} to i64
+ // CHECK-NEXT: %[[VAR33:[A-Za-z0-9.]+]] = add i64 %[[VAR31]], 8
+ // CHECK-NEXT: %[[VAR34:[A-Za-z0-9.]+]] = inttoptr i64 %[[VAR31]] to float*
+ // CHECK-NEXT: %[[VAR35:[A-Za-z0-9.]+]] = inttoptr i64 %[[VAR33]] to float*
+ // CHECK-NEXT: %[[VAR36:[A-Za-z0-9.]+]] = load float* %[[VAR34]]
+ // CHECK-NEXT: %[[VAR37:[A-Za-z0-9.]+]] = load float* %[[VAR35]]
+ // CHECK-NEXT: %[[VAR38:[A-Za-z0-9.]+]] = getelementptr inbounds { float, float }* %[[VAR30:[A-Za-z0-9.]+]], i32 0, i32 0
+ // CHECK-NEXT: %[[VAR39:[A-Za-z0-9.]+]] = getelementptr inbounds { float, float }* %[[VAR30]], i32 0, i32 1
+ // CHECK-NEXT: store float %[[VAR36]], float* %[[VAR38]]
+ // CHECK-NEXT: store float %[[VAR37]], float* %[[VAR39]]
+}
diff --git a/test/CodeGen/pr18235.c b/test/CodeGen/pr18235.c
new file mode 100644
index 000000000000..d3f12ee56331
--- /dev/null
+++ b/test/CodeGen/pr18235.c
@@ -0,0 +1,3 @@
+// RUN: not %clang_cc1 -triple le32-unknown-nacl %s -S -o - 2>&1 | FileCheck %s
+
+// CHECK: error: unable to create target: 'No available targets are compatible with this triple, see -version for the available targets.'
diff --git a/test/CodeGen/pr19841.cpp b/test/CodeGen/pr19841.cpp
new file mode 100644
index 000000000000..8fef68384fc1
--- /dev/null
+++ b/test/CodeGen/pr19841.cpp
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+
+namespace Common {
+enum RenderMode {
+ kRenderEGA,
+ kRenderCGA
+};
+class C;
+class A {
+ A();
+ C *_vm;
+ unsigned char _highlightColorTableVGA[];
+ static const unsigned char b[];
+};
+// CHECK: [[Common_A_b:@[^ ]+]] = constant [1 x i8] zeroinitializer
+class B {
+public:
+ Common::RenderMode _configRenderMode;
+};
+class C : public B {};
+A::A() {
+ 0 == Common::kRenderCGA || _vm->_configRenderMode == Common::kRenderEGA
+ ? b
+ : _highlightColorTableVGA;
+// Make sure the PHI value is casted correctly to the PHI type
+// CHECK: %{{.*}} = phi [0 x i8]* [ bitcast ([1 x i8]* [[Common_A_b]] to [0 x i8]*), %{{.*}} ], [ %{{.*}}, %{{.*}} ]
+}
+const unsigned char A::b[] = { 0 };
+}
diff --git a/test/CodeGen/pragma-comment.c b/test/CodeGen/pragma-comment.c
index 30bf7b7d4e5b..73cc5483bcf6 100644
--- a/test/CodeGen/pragma-comment.c
+++ b/test/CodeGen/pragma-comment.c
@@ -9,8 +9,8 @@
#define BAR "2"
#pragma comment(linker," /bar=" BAR)
-// CHECK: !llvm.module.flags = !{!0}
-// CHECK: !0 = metadata !{i32 6, metadata !"Linker Options", metadata ![[link_opts:[0-9]+]]}
+// CHECK: !llvm.module.flags = !{{{.*}}}
+// CHECK: !{{[0-9]+}} = metadata !{i32 6, metadata !"Linker Options", metadata ![[link_opts:[0-9]+]]}
// CHECK: ![[link_opts]] = metadata !{metadata ![[msvcrt:[0-9]+]], metadata ![[kernel32:[0-9]+]], metadata ![[USER32:[0-9]+]], metadata ![[bar:[0-9]+]]}
// CHECK: ![[msvcrt]] = metadata !{metadata !"/DEFAULTLIB:msvcrt.lib"}
// CHECK: ![[kernel32]] = metadata !{metadata !"/DEFAULTLIB:kernel32.lib"}
diff --git a/test/CodeGen/pragma-detect_mismatch.c b/test/CodeGen/pragma-detect_mismatch.c
index 86cc6d8586f8..b223a61c9b03 100644
--- a/test/CodeGen/pragma-detect_mismatch.c
+++ b/test/CodeGen/pragma-detect_mismatch.c
@@ -5,8 +5,8 @@
#define BAR "2"
#pragma detect_mismatch("test2", BAR)
-// CHECK: !llvm.module.flags = !{!0}
-// CHECK: !0 = metadata !{i32 6, metadata !"Linker Options", metadata ![[link_opts:[0-9]+]]}
+// CHECK: !llvm.module.flags = !{{{.*}}}
+// CHECK: !{{[0-9]+}} = metadata !{i32 6, metadata !"Linker Options", metadata ![[link_opts:[0-9]+]]}
// CHECK: ![[link_opts]] = metadata !{metadata ![[test:[0-9]+]], metadata ![[test2:[0-9]+]]}
// CHECK: ![[test]] = metadata !{metadata !"/FAILIFMISMATCH:\22test=1\22"}
// CHECK: ![[test2]] = metadata !{metadata !"/FAILIFMISMATCH:\22test2=2\22"}
diff --git a/test/CodeGen/pragma-loop.cpp b/test/CodeGen/pragma-loop.cpp
new file mode 100644
index 000000000000..bdcd30426315
--- /dev/null
+++ b/test/CodeGen/pragma-loop.cpp
@@ -0,0 +1,129 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm -o - %s | FileCheck %s
+
+// Verify while loop is recognized after sequence of pragma clang loop directives.
+void while_test(int *List, int Length) {
+ // CHECK: define {{.*}} @_Z10while_test
+ int i = 0;
+
+#pragma clang loop vectorize(enable)
+#pragma clang loop interleave_count(4)
+#pragma clang loop vectorize_width(4)
+#pragma clang loop unroll(enable)
+ while (i < Length) {
+ // CHECK: br i1 {{.*}}, label {{.*}}, label {{.*}}, !llvm.loop ![[LOOP_1:.*]]
+ List[i] = i * 2;
+ i++;
+ }
+}
+
+// Verify do loop is recognized after multi-option pragma clang loop directive.
+void do_test(int *List, int Length) {
+ int i = 0;
+
+#pragma clang loop vectorize_width(8) interleave_count(4) unroll(disable)
+ do {
+ // CHECK: br i1 {{.*}}, label {{.*}}, label {{.*}}, !llvm.loop ![[LOOP_2:.*]]
+ List[i] = i * 2;
+ i++;
+ } while (i < Length);
+}
+
+// Verify for loop is recognized after sequence of pragma clang loop directives.
+void for_test(int *List, int Length) {
+#pragma clang loop interleave(enable)
+#pragma clang loop interleave_count(4)
+#pragma clang loop unroll_count(8)
+ for (int i = 0; i < Length; i++) {
+ // CHECK: br i1 {{.*}}, label {{.*}}, label {{.*}}, !llvm.loop ![[LOOP_3:.*]]
+ List[i] = i * 2;
+ }
+}
+
+// Verify c++11 for range loop is recognized after
+// sequence of pragma clang loop directives.
+void for_range_test() {
+ double List[100];
+
+#pragma clang loop vectorize_width(2) interleave_count(2)
+ for (int i : List) {
+ // CHECK: br i1 {{.*}}, label {{.*}}, label {{.*}}, !llvm.loop ![[LOOP_4:.*]]
+ List[i] = i;
+ }
+}
+
+// Verify disable pragma clang loop directive generates correct metadata
+void disable_test(int *List, int Length) {
+#pragma clang loop vectorize(disable) unroll(disable)
+ for (int i = 0; i < Length; i++) {
+ // CHECK: br i1 {{.*}}, label {{.*}}, label {{.*}}, !llvm.loop ![[LOOP_5:.*]]
+ List[i] = i * 2;
+ }
+}
+
+#define VECWIDTH 2
+#define INTCOUNT 2
+#define UNROLLCOUNT 8
+
+// Verify defines are correctly resolved in pragma clang loop directive
+void for_define_test(int *List, int Length, int Value) {
+#pragma clang loop vectorize_width(VECWIDTH) interleave_count(INTCOUNT)
+#pragma clang loop unroll_count(UNROLLCOUNT)
+ for (int i = 0; i < Length; i++) {
+ // CHECK: br i1 {{.*}}, label {{.*}}, label {{.*}}, !llvm.loop ![[LOOP_6:.*]]
+ List[i] = i * Value;
+ }
+}
+
+// Verify metadata is generated when template is used.
+template <typename A>
+void for_template_test(A *List, int Length, A Value) {
+
+#pragma clang loop vectorize_width(8) interleave_count(8) unroll_count(8)
+ for (int i = 0; i < Length; i++) {
+ // CHECK: br i1 {{.*}}, label {{.*}}, label {{.*}}, !llvm.loop ![[LOOP_7:.*]]
+ List[i] = i * Value;
+ }
+}
+
+// Verify define is resolved correctly when template is used.
+template <typename A>
+void for_template_define_test(A *List, int Length, A Value) {
+#pragma clang loop vectorize_width(VECWIDTH) interleave_count(INTCOUNT)
+#pragma clang loop unroll_count(UNROLLCOUNT)
+ for (int i = 0; i < Length; i++) {
+ // CHECK: br i1 {{.*}}, label {{.*}}, label {{.*}}, !llvm.loop ![[LOOP_8:.*]]
+ List[i] = i * Value;
+ }
+}
+
+#undef VECWIDTH
+#undef INTCOUNT
+#undef UNROLLCOUNT
+
+// Use templates defined above. Test verifies metadata is generated correctly.
+void template_test(double *List, int Length) {
+ double Value = 10;
+
+ for_template_test<double>(List, Length, Value);
+ for_template_define_test<double>(List, Length, Value);
+}
+
+// CHECK: ![[LOOP_1]] = metadata !{metadata ![[LOOP_1]], metadata ![[UNROLLENABLE_1:.*]], metadata ![[WIDTH_4:.*]], metadata ![[INTERLEAVE_4:.*]], metadata ![[INTENABLE_1:.*]]}
+// CHECK: ![[UNROLLENABLE_1]] = metadata !{metadata !"llvm.loop.unroll.enable", i1 true}
+// CHECK: ![[WIDTH_4]] = metadata !{metadata !"llvm.loop.vectorize.width", i32 4}
+// CHECK: ![[INTERLEAVE_4]] = metadata !{metadata !"llvm.loop.interleave.count", i32 4}
+// CHECK: ![[INTENABLE_1]] = metadata !{metadata !"llvm.loop.vectorize.enable", i1 true}
+// CHECK: ![[LOOP_2]] = metadata !{metadata ![[LOOP_2:.*]], metadata ![[UNROLLENABLE_0:.*]], metadata ![[INTERLEAVE_4:.*]], metadata ![[WIDTH_8:.*]]}
+// CHECK: ![[UNROLLENABLE_0]] = metadata !{metadata !"llvm.loop.unroll.enable", i1 false}
+// CHECK: ![[WIDTH_8]] = metadata !{metadata !"llvm.loop.vectorize.width", i32 8}
+// CHECK: ![[LOOP_3]] = metadata !{metadata ![[LOOP_3]], metadata ![[UNROLL_8:.*]], metadata ![[INTERLEAVE_4:.*]], metadata ![[ENABLE_1:.*]]}
+// CHECK: ![[UNROLL_8]] = metadata !{metadata !"llvm.loop.unroll.count", i32 8}
+// CHECK: ![[LOOP_4]] = metadata !{metadata ![[LOOP_4]], metadata ![[INTERLEAVE_2:.*]], metadata ![[WIDTH_2:.*]]}
+// CHECK: ![[INTERLEAVE_2]] = metadata !{metadata !"llvm.loop.interleave.count", i32 2}
+// CHECK: ![[WIDTH_2]] = metadata !{metadata !"llvm.loop.vectorize.width", i32 2}
+// CHECK: ![[LOOP_5]] = metadata !{metadata ![[LOOP_5]], metadata ![[UNROLLENABLE_0:.*]], metadata ![[WIDTH_1:.*]]}
+// CHECK: ![[WIDTH_1]] = metadata !{metadata !"llvm.loop.vectorize.width", i32 1}
+// CHECK: ![[LOOP_6]] = metadata !{metadata ![[LOOP_6]], metadata ![[UNROLL_8:.*]], metadata ![[INTERLEAVE_2:.*]], metadata ![[WIDTH_2:.*]]}
+// CHECK: ![[LOOP_7]] = metadata !{metadata ![[LOOP_7]], metadata ![[UNROLL_8:.*]], metadata ![[INTERLEAVE_8:.*]], metadata ![[WIDTH_8:.*]]}
+// CHECK: ![[INTERLEAVE_8]] = metadata !{metadata !"llvm.loop.interleave.count", i32 8}
+// CHECK: ![[LOOP_8]] = metadata !{metadata ![[LOOP_8]], metadata ![[UNROLL_8:.*]], metadata ![[INTERLEAVE_2:.*]], metadata ![[WIDTH_2:.*]]}
diff --git a/test/CodeGen/pragma-pack-1.c b/test/CodeGen/pragma-pack-1.c
index 2a71c8f79b34..773318c79f7c 100644
--- a/test/CodeGen/pragma-pack-1.c
+++ b/test/CodeGen/pragma-pack-1.c
@@ -53,12 +53,12 @@ struct S4
int e;
} s4;
-// CHECK: [[struct_ref:%[a-zA-Z0-9_.]+]] = type <{ [[struct_ref]]* }>
+// CHECK: [[struct_ref:%[a-zA-Z0-9_.]+]] = type { [[struct_ref]]* }
// CHECK: [[struct_S:%[a-zA-Z0-9_.]+]] = type { [3 x i8], [[struct_T:%[a-zA-Z0-9_.]+]], [[struct_T2:%[a-zA-Z0-9_.]+]] }
// CHECK: [[struct_T]] = type <{ i8, i32 }>
// CHECK: [[struct_T2]] = type { i8, i32 }
-// CHECK: %struct.S3 = type <{ [3 x i8], i8, %struct.T3, [2 x i8], %struct.T32 }>
+// CHECK: %struct.S3 = type { [3 x i8], i8, %struct.T3, %struct.T32 }
// CHECK: %struct.T3 = type <{ i8, i8, i32 }>
// CHECK: %struct.T32 = type { i8, i32 }
// CHECK: %struct.S4 = type { [3 x i8], %struct.T4, i32 }
diff --git a/test/CodeGen/pragma-pack-2.c b/test/CodeGen/pragma-pack-2.c
index 1ca3bdf32a28..8a77280029c6 100644
--- a/test/CodeGen/pragma-pack-2.c
+++ b/test/CodeGen/pragma-pack-2.c
@@ -4,7 +4,7 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin9 %s -emit-llvm -o - | FileCheck -check-prefix CHECK-X64 %s
// CHECK-X64: %struct.s0 = type <{ i64, i64, i32, [12 x i32] }>
-// CHECK-X64: %struct.s1 = type <{ [15 x i32], %struct.s0 }>
+// CHECK-X64: %struct.s1 = type { [15 x i32], %struct.s0 }
// rdar://problem/7095436
#pragma pack(4)
@@ -20,4 +20,3 @@ struct s1 {
int a[15];
struct s0 b;
} b;
-
diff --git a/test/CodeGen/pragma-unroll.cpp b/test/CodeGen/pragma-unroll.cpp
new file mode 100644
index 000000000000..b321e74a1154
--- /dev/null
+++ b/test/CodeGen/pragma-unroll.cpp
@@ -0,0 +1,99 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm -o - %s | FileCheck %s
+
+// Verify while loop is recognized after unroll pragma.
+void while_test(int *List, int Length) {
+ // CHECK: define {{.*}} @_Z10while_test
+ int i = 0;
+
+#pragma unroll
+ while (i < Length) {
+ // CHECK: br i1 {{.*}}, label {{.*}}, label {{.*}}, !llvm.loop ![[LOOP_1:.*]]
+ List[i] = i * 2;
+ i++;
+ }
+}
+
+// Verify do loop is recognized after multi-option pragma clang loop directive.
+void do_test(int *List, int Length) {
+ int i = 0;
+
+#pragma unroll 16
+ do {
+ // CHECK: br i1 {{.*}}, label {{.*}}, label {{.*}}, !llvm.loop ![[LOOP_2:.*]]
+ List[i] = i * 2;
+ i++;
+ } while (i < Length);
+}
+
+// Verify for loop is recognized after unroll pragma.
+void for_test(int *List, int Length) {
+#pragma unroll 8
+ for (int i = 0; i < Length; i++) {
+ // CHECK: br i1 {{.*}}, label {{.*}}, label {{.*}}, !llvm.loop ![[LOOP_3:.*]]
+ List[i] = i * 2;
+ }
+}
+
+// Verify c++11 for range loop is recognized after unroll pragma.
+void for_range_test() {
+ double List[100];
+
+#pragma unroll(4)
+ for (int i : List) {
+ // CHECK: br i1 {{.*}}, label {{.*}}, label {{.*}}, !llvm.loop ![[LOOP_4:.*]]
+ List[i] = i;
+ }
+}
+
+#define UNROLLCOUNT 8
+
+// Verify defines are correctly resolved in unroll pragmas.
+void for_define_test(int *List, int Length, int Value) {
+#pragma unroll(UNROLLCOUNT)
+ for (int i = 0; i < Length; i++) {
+ // CHECK: br i1 {{.*}}, label {{.*}}, label {{.*}}, !llvm.loop ![[LOOP_5:.*]]
+ List[i] = i * Value;
+ }
+}
+
+// Verify metadata is generated when template is used.
+template <typename A>
+void for_template_test(A *List, int Length, A Value) {
+#pragma unroll 8
+ for (int i = 0; i < Length; i++) {
+ // CHECK: br i1 {{.*}}, label {{.*}}, label {{.*}}, !llvm.loop ![[LOOP_6:.*]]
+ List[i] = i * Value;
+ }
+}
+
+// Verify define is resolved correctly when template is used.
+template <typename A>
+void for_template_define_test(A *List, int Length, A Value) {
+#pragma unroll(UNROLLCOUNT)
+ for (int i = 0; i < Length; i++) {
+ // CHECK: br i1 {{.*}}, label {{.*}}, label {{.*}}, !llvm.loop ![[LOOP_7:.*]]
+ List[i] = i * Value;
+ }
+}
+
+#undef UNROLLCOUNT
+
+// Use templates defined above. Test verifies metadata is generated correctly.
+void template_test(double *List, int Length) {
+ double Value = 10;
+
+ for_template_test<double>(List, Length, Value);
+ for_template_define_test<double>(List, Length, Value);
+}
+
+// CHECK: ![[LOOP_1]] = metadata !{metadata ![[LOOP_1]], metadata ![[UNROLLENABLE_1:.*]]}
+// CHECK: ![[UNROLLENABLE_1]] = metadata !{metadata !"llvm.loop.unroll.enable", i1 true}
+// CHECK: ![[LOOP_2]] = metadata !{metadata ![[LOOP_2:.*]], metadata ![[UNROLL_16:.*]]}
+// CHECK: ![[UNROLL_16]] = metadata !{metadata !"llvm.loop.unroll.count", i32 16}
+// CHECK: ![[LOOP_3]] = metadata !{metadata ![[LOOP_3]], metadata ![[UNROLL_8:.*]]}
+// CHECK: ![[UNROLL_8]] = metadata !{metadata !"llvm.loop.unroll.count", i32 8}
+// CHECK: ![[LOOP_4]] = metadata !{metadata ![[LOOP_4]], metadata ![[UNROLL_4:.*]]}
+// CHECK: ![[UNROLL_4]] = metadata !{metadata !"llvm.loop.unroll.count", i32 4}
+// CHECK: ![[LOOP_5]] = metadata !{metadata ![[LOOP_5]], metadata ![[UNROLL_8:.*]]}
+// CHECK: ![[LOOP_6]] = metadata !{metadata ![[LOOP_6]], metadata ![[UNROLL_8:.*]]}
+// CHECK: ![[LOOP_7]] = metadata !{metadata ![[LOOP_7]], metadata ![[UNROLL_8:.*]]}
diff --git a/test/CodeGen/predefined-expr.c b/test/CodeGen/predefined-expr.c
index 3471dcdaa2a4..6c94152b737e 100644
--- a/test/CodeGen/predefined-expr.c
+++ b/test/CodeGen/predefined-expr.c
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -fms-extensions %s -emit-llvm -o - | FileCheck %s
// CHECK: @__func__.plainFunction = private unnamed_addr constant [14 x i8] c"plainFunction\00"
// CHECK: @__PRETTY_FUNCTION__.plainFunction = private unnamed_addr constant [21 x i8] c"void plainFunction()\00"
diff --git a/test/CodeGen/r5.c b/test/CodeGen/r5.c
deleted file mode 100644
index 30a0c0d572ef..000000000000
--- a/test/CodeGen/r5.c
+++ /dev/null
@@ -1,5 +0,0 @@
-// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-r5 -emit-llvm -S %s -o /dev/null
-
-int main() {
- return 0;
-}
diff --git a/test/CodeGen/sanitize-init-order.cpp b/test/CodeGen/sanitize-init-order.cpp
index 3e94620193f6..8c662dbe0343 100644
--- a/test/CodeGen/sanitize-init-order.cpp
+++ b/test/CodeGen/sanitize-init-order.cpp
@@ -1,4 +1,11 @@
-// RUN: %clang_cc1 -fsanitize=address,init-order -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -fsanitize=address -emit-llvm -o - %s | FileCheck %s
+
+// Test blacklist functionality.
+// RUN: echo "global-init-src:%s" > %t-file.blacklist
+// RUN: echo "global-init-type:struct.PODWithCtorAndDtor" > %t-type.blacklist
+// RUN: %clang_cc1 -fsanitize=address -fsanitize-blacklist=%t-file.blacklist -emit-llvm -o - %s | FileCheck %s --check-prefix=BLACKLIST
+// RUN: %clang_cc1 -fsanitize=address -fsanitize-blacklist=%t-type.blacklist -emit-llvm -o - %s | FileCheck %s --check-prefix=BLACKLIST
+// REQUIRES: shell
struct PODStruct {
int x;
@@ -20,5 +27,12 @@ PODWithCtorAndDtor s3;
// Check that ASan init-order checking ignores structs with trivial default
// constructor.
-// CHECK: !llvm.asan.dynamically_initialized_globals = !{[[GLOB:![0-9]+]]}
-// CHECK: [[GLOB]] = metadata !{%struct.PODWithCtorAndDtor
+// CHECK: !llvm.asan.globals = !{![[GLOB_1:[0-9]+]], ![[GLOB_2:[0-9]+]], ![[GLOB_3:[0-9]]]}
+// CHECK: ![[GLOB_1]] = metadata !{%struct.PODStruct* {{.*}}, i1 false, i1 false}
+// CHECK: ![[GLOB_2]] = metadata !{%struct.PODWithDtor* {{.*}}, i1 false, i1 false}
+// CHECK: ![[GLOB_3]] = metadata !{%struct.PODWithCtorAndDtor* {{.*}}, i1 true, i1 false}
+
+// BLACKLIST: !llvm.asan.globals = !{![[GLOB_1:[0-9]+]], ![[GLOB_2:[0-9]+]], ![[GLOB_3:[0-9]]]}
+// BLACKLIST: ![[GLOB_1]] = metadata !{%struct.PODStruct* {{.*}}, i1 false, i1 false}
+// BLACKLIST: ![[GLOB_2]] = metadata !{%struct.PODWithDtor* {{.*}}, i1 false, i1 false}
+// BLACKLIST: ![[GLOB_3]] = metadata !{%struct.PODWithCtorAndDtor* {{.*}}, i1 false, i1 false}
diff --git a/test/CodeGen/sanitize-use-after-scope.c b/test/CodeGen/sanitize-use-after-scope.c
deleted file mode 100644
index 8f920385bc21..000000000000
--- a/test/CodeGen/sanitize-use-after-scope.c
+++ /dev/null
@@ -1,22 +0,0 @@
-// RUN: %clang_cc1 -S -emit-llvm -o - -fsanitize=address,use-after-scope %s \
-// RUN: | FileCheck %s -check-prefix=USE-AFTER-SCOPE
-// RUN: %clang_cc1 -S -emit-llvm -o - -fsanitize=address %s \
-// RUN: | FileCheck %s -check-prefix=ADDRESS-ONLY
-
-extern int bar(char *A, int n);
-
-// ADDRESS-ONLY-NOT: @llvm.lifetime.start
-int foo (int n) {
- if (n) {
- // USE-AFTER-SCOPE: @llvm.lifetime.start(i64 10, i8* {{.*}})
- char A[10];
- return bar(A, 1);
- // USE-AFTER-SCOPE: @llvm.lifetime.end(i64 10, i8* {{.*}})
- } else {
- // USE-AFTER-SCOPE: @llvm.lifetime.start(i64 20, i8* {{.*}})
- char A[20];
- return bar(A, 2);
- // USE-AFTER-SCOPE: @llvm.lifetime.end(i64 20, i8* {{.*}})
- }
-}
-
diff --git a/test/CodeGen/sections.c b/test/CodeGen/sections.c
index 7994acf4dcac..8d93fed480e1 100644
--- a/test/CodeGen/sections.c
+++ b/test/CodeGen/sections.c
@@ -1,28 +1,51 @@
-// REQUIRES: x86-registered-target
+// RUN: %clang_cc1 -emit-llvm -fms-extensions -xc++ -o - < %s | FileCheck %s
-// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -S -o - < %s | FileCheck %s --check-prefix=PLAIN
-// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -S -ffunction-sections -fno-function-sections -o - < %s | FileCheck %s --check-prefix=PLAIN
+#ifdef __cplusplus
+extern "C" {
+#endif
+#pragma const_seg(".my_const")
+#pragma bss_seg(".my_bss")
+int D = 1;
+#pragma data_seg(".data")
+int a = 1;
+#pragma data_seg(push, label, ".data2")
+extern const int b;
+const int b = 1;
+const char* s = "my string!";
+#pragma data_seg(push, ".my_seg")
+int c = 1;
+#pragma data_seg(pop, label)
+int d = 1;
+int e;
+#pragma bss_seg(".c")
+int f;
+void g(void){}
+#pragma code_seg(".my_code")
+void h(void){}
+#pragma bss_seg()
+int i;
+#pragma bss_seg(".bss1")
+#pragma bss_seg(push, test, ".bss2")
+#pragma bss_seg()
+#pragma bss_seg()
+int TEST1;
+#pragma bss_seg(pop)
+int TEST2;
+#ifdef __cplusplus
+}
+#endif
-// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -S -ffunction-sections -o - < %s | FileCheck %s --check-prefix=FUNC_SECT
-// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -S -fno-function-sections -ffunction-sections -o - < %s | FileCheck %s --check-prefix=FUNC_SECT
-
-// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -S -fdata-sections -o - < %s | FileCheck %s --check-prefix=DATA_SECT
-// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -S -fno-data-sections -fdata-sections -o - < %s | FileCheck %s --check-prefix=DATA_SECT
-
-const int hello = 123;
-void world() {}
-
-// PLAIN-NOT: section
-// PLAIN: world:
-// PLAIN: section .rodata,
-// PLAIN: hello:
-
-// FUNC_SECT: section .text.world,
-// FUNC_SECT: world:
-// FUNC_SECT: section .rodata,
-// FUNC_SECT: hello:
-
-// DATA_SECT-NOT: section
-// DATA_SECT: world:
-// DATA_SECT: .section .rodata.hello,
-// DATA_SECT: hello:
+//CHECK: @D = global i32 1
+//CHECK: @a = global i32 1, section ".data"
+//CHECK: @b = constant i32 1, section ".my_const"
+//CHECK: @[[MYSTR:.*]] = {{.*}} unnamed_addr constant [11 x i8] c"my string!\00"
+//CHECK: @s = global i8* getelementptr inbounds ([11 x i8]* @[[MYSTR]], i32 0, i32 0), section ".data2"
+//CHECK: @c = global i32 1, section ".my_seg"
+//CHECK: @d = global i32 1, section ".data"
+//CHECK: @e = global i32 0, section ".my_bss"
+//CHECK: @f = global i32 0, section ".c"
+//CHECK: @i = global i32 0
+//CHECK: @TEST1 = global i32 0
+//CHECK: @TEST2 = global i32 0, section ".bss1"
+//CHECK: define void @g()
+//CHECK: define void @h() {{.*}} section ".my_code"
diff --git a/test/CodeGen/sparc-target-data.c b/test/CodeGen/sparc-target-data.c
deleted file mode 100644
index bb32a2196af7..000000000000
--- a/test/CodeGen/sparc-target-data.c
+++ /dev/null
@@ -1,5 +0,0 @@
-// RUN: %clang -target sparc-sun-solaris -o - -emit-llvm -S %s | FileCheck %s -check-prefix=V8
-// RUN: %clang -target sparcv9-sun-solaris -o - -emit-llvm -S %s | FileCheck %s -check-prefix=V9
-
-// V8: E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-n32-S64
-// V9: E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-n32:64-S128
diff --git a/test/CodeGen/sparcv9-abi.c b/test/CodeGen/sparcv9-abi.c
index 4ba4be852fe8..d4fff81ab6ef 100644
--- a/test/CodeGen/sparcv9-abi.c
+++ b/test/CodeGen/sparcv9-abi.c
@@ -18,6 +18,9 @@ long long f_int_3(long long x) { return x; }
// CHECK-LABEL: define signext i8 @f_int_4(i8 signext %x)
char f_int_4(char x) { return x; }
+// CHECK-LABEL: define fp128 @f_ld(fp128 %x)
+long double f_ld(long double x) { return x; }
+
// Small structs are passed in registers.
struct small {
int *a, *b;
diff --git a/test/CodeGen/sparcv9-dwarf.c b/test/CodeGen/sparcv9-dwarf.c
new file mode 100644
index 000000000000..11ac28c31e3b
--- /dev/null
+++ b/test/CodeGen/sparcv9-dwarf.c
@@ -0,0 +1,99 @@
+// RUN: %clang_cc1 -triple sparcv9-unknown-unknown -emit-llvm %s -o - | FileCheck %s
+static unsigned char dwarf_reg_size_table[102+1];
+
+int test() {
+ __builtin_init_dwarf_reg_size_table(dwarf_reg_size_table);
+
+ return __builtin_dwarf_sp_column();
+}
+
+// CHECK-LABEL: define signext i32 @test()
+// CHECK: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 0)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 1)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 2)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 3)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 4)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 5)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 6)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 7)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 8)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 9)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 10)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 11)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 12)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 13)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 14)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 15)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 16)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 17)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 18)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 19)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 20)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 21)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 22)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 23)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 24)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 25)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 26)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 27)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 28)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 29)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 30)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 31)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 32)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 33)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 34)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 35)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 36)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 37)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 38)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 39)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 40)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 41)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 42)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 43)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 44)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 45)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 46)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 47)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 48)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 49)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 50)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 51)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 52)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 53)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 54)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 55)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 56)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 57)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 58)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 59)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 60)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 61)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 62)
+// CHECK-NEXT: store i8 4, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 63)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 64)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 65)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 66)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 67)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 68)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 69)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 70)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 71)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 72)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 73)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 74)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 75)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 76)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 77)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 78)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 79)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 80)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 81)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 82)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 83)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 84)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 85)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 86)
+// CHECK-NEXT: store i8 8, i8* getelementptr inbounds ([103 x i8]* @dwarf_reg_size_table, i32 0, i32 87)
+// CHECK-NEXT: ret i32 14
diff --git a/test/CodeGen/split-stacks.c b/test/CodeGen/split-stacks.c
new file mode 100644
index 000000000000..bf4cf0f026aa
--- /dev/null
+++ b/test/CodeGen/split-stacks.c
@@ -0,0 +1,26 @@
+// RUN: %clang -target x86_64-linux-gnu -fsplit-stack -S %s -emit-llvm -o - | FileCheck -check-prefix=CHECK-SEGSTK %s
+// RUN: %clang -target x86_64-linux-gnu -S %s -emit-llvm -o - | FileCheck -check-prefix=CHECK-NOSEGSTK %s
+
+int foo() {
+ return 0;
+}
+
+__attribute__((no_split_stack))
+int nosplit() {
+ return 0;
+}
+
+int main() {
+ return foo();
+}
+
+// CHECK-SEGSTK: define i32 @foo() [[SS:#[0-9]+]] {
+// CHECK-SEGSTK: define i32 @nosplit() [[NSS:#[0-9]+]] {
+// CHECK-SEGSTK: define i32 @main() [[SS]] {
+// CHECK-SEGSTK-NOT: [[NSS]] = { {{.*}} "split-stack" {{.*}} }
+// CHECK-SEGSTK: [[SS]] = { {{.*}} "split-stack" {{.*}} }
+// CHECK-SEGSTK-NOT: [[NSS]] = { {{.*}} "split-stack" {{.*}} }
+
+// CHECK-NOSEGSTK: define i32 @foo() #0 {
+// CHECK-NOSEGSTK: define i32 @main() #0 {
+// CHECK-NOSEGSTK-NOT: #0 = { {{.*}} "split-stack" {{.*}} }
diff --git a/test/CodeGen/sret.c b/test/CodeGen/sret.c
index 828bf9b42d61..5f0d07404a16 100644
--- a/test/CodeGen/sret.c
+++ b/test/CodeGen/sret.c
@@ -4,6 +4,8 @@ struct abc {
long a;
long b;
long c;
+ long d;
+ long e;
};
struct abc foo1(void);
diff --git a/test/CodeGen/sret2.c b/test/CodeGen/sret2.c
index 375746251163..d103d87610fd 100644
--- a/test/CodeGen/sret2.c
+++ b/test/CodeGen/sret2.c
@@ -4,6 +4,8 @@ struct abc {
long a;
long b;
long c;
+ long d;
+ long e;
};
struct abc foo2(){}
diff --git a/test/CodeGen/sse-builtins-dbg.c b/test/CodeGen/sse-builtins-dbg.c
new file mode 100644
index 000000000000..8190744ff01e
--- /dev/null
+++ b/test/CodeGen/sse-builtins-dbg.c
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -ffreestanding -triple x86_64-apple-macosx10.8.0 -target-feature +sse4.1 -g -emit-llvm %s -o - | FileCheck %s
+
+// Test that intrinsic calls inlined from _mm_* wrappers have debug metadata.
+
+#include <xmmintrin.h>
+
+__m128 test_rsqrt_ss(__m128 x) {
+ // CHECK: define {{.*}} @test_rsqrt_ss
+ // CHECK: call <4 x float> @llvm.x86.sse.rsqrt.ss({{.*}}, !dbg !{{.*}}
+ // CHECK: ret <4 x float>
+ return _mm_rsqrt_ss(x);
+}
diff --git a/test/CodeGen/sse-builtins.c b/test/CodeGen/sse-builtins.c
index 1f5cb8e9e107..238454bb92e9 100644
--- a/test/CodeGen/sse-builtins.c
+++ b/test/CodeGen/sse-builtins.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -ffreestanding -triple x86_64-apple-macosx10.8.0 -target-feature +sse4.1 -g -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -ffreestanding -triple x86_64-apple-macosx10.8.0 -target-feature +sse4.1 -emit-llvm %s -o - | FileCheck %s
#include <xmmintrin.h>
#include <emmintrin.h>
@@ -64,7 +64,7 @@ __m128 test_load1_ps(void* y) {
void test_store_ss(__m128 x, void* y) {
// CHECK-LABEL: define void @test_store_ss
- // CHECK: store {{.*}} float* {{.*}}, align 1,
+ // CHECK: store {{.*}} float* {{.*}}, align 1{{$}}
_mm_store_ss(y, x);
}
@@ -237,3 +237,21 @@ void test_insert_epi32(__m128i __a, int b) {
// CHECK: insertelement <4 x i32> %{{.*}}, i32 %{{.*}}, i32 0
_mm_insert_epi32(__a, b, 4);
}
+
+__m128d test_blend_pd(__m128d V1, __m128d V2) {
+ // CHECK-LABEL: @test_blend_pd
+ // CHECK: shufflevector <2 x double> %{{.*}}, <2 x double> %{{.*}}, <2 x i32> <i32 2, i32 1>
+ return _mm_blend_pd(V1, V2, 1);
+}
+
+__m128 test_blend_ps(__m128 V1, __m128 V2) {
+ // CHECK-LABEL: @test_blend_ps
+ // CHECK: shufflevector <4 x float> %{{.*}}, <4 x float> %{{.*}}, <4 x i32> <i32 4, i32 1, i32 6, i32 3>
+ return _mm_blend_ps(V1, V2, 5);
+}
+
+__m128i test_blend_epi16(__m128i V1, __m128i V2) {
+ // CHECK-LABEL: @test_blend_epi16
+ // CHECK: shufflevector <8 x i16> %{{.*}}, <8 x i16> %{{.*}}, <8 x i32> <i32 0, i32 9, i32 2, i32 11, i32 4, i32 13, i32 6, i32 7>
+ return _mm_blend_epi16(V1, V2, 42);
+}
diff --git a/test/CodeGen/stack-protector.c b/test/CodeGen/stack-protector.c
index e47e5b321b67..2fb9b2cf7e65 100644
--- a/test/CodeGen/stack-protector.c
+++ b/test/CodeGen/stack-protector.c
@@ -2,7 +2,9 @@
// NOSSP: define void @test1(i8* %msg) #0 {
// RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 1 | FileCheck -check-prefix=WITHSSP %s
// WITHSSP: define void @test1(i8* %msg) #0 {
-// RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 2 | FileCheck -check-prefix=SSPREQ %s
+// RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 2 | FileCheck -check-prefix=SSPSTRONG %s
+// SSPSTRONG: define void @test1(i8* %msg) #0 {
+// RUN: %clang_cc1 -emit-llvm -o - %s -stack-protector 3 | FileCheck -check-prefix=SSPREQ %s
// SSPREQ: define void @test1(i8* %msg) #0 {
typedef __SIZE_TYPE__ size_t;
@@ -21,4 +23,6 @@ void test1(const char *msg) {
// WITHSSP: attributes #{{.*}} = { nounwind ssp{{.*}} }
+// SSPSTRONG: attributes #{{.*}} = { nounwind sspstrong{{.*}} }
+
// SSPREQ: attributes #{{.*}} = { nounwind sspreq{{.*}} }
diff --git a/test/CodeGen/string-literal-short-wstring.c b/test/CodeGen/string-literal-short-wstring.c
index 88e4a1e4008a..89aa6f76ca43 100644
--- a/test/CodeGen/string-literal-short-wstring.c
+++ b/test/CodeGen/string-literal-short-wstring.c
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -x c++ -emit-llvm -fshort-wchar %s -o - | FileCheck %s
+// RUN: %clang_cc1 -x c++ -triple %itanium_abi_triple -emit-llvm -fshort-wchar %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=ITANIUM
+// RUN: %clang_cc1 -x c++ -triple %ms_abi_triple -emit-llvm -fshort-wchar %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=MSABI
// Runs in c++ mode so that wchar_t is available.
int main() {
@@ -6,11 +7,13 @@ int main() {
// CHECK: private unnamed_addr constant [10 x i8] c"\E1\84\A0\C8\A0\F4\82\80\B0\00", align 1
char b[10] = "\u1120\u0220\U00102030";
- // CHECK: private unnamed_addr constant [3 x i16] [i16 65, i16 66, i16 0]
+ // ITANIUM: private unnamed_addr constant [3 x i16] [i16 65, i16 66, i16 0]
+ // MSABI: linkonce_odr unnamed_addr constant [3 x i16] [i16 65, i16 66, i16 0]
const wchar_t *foo = L"AB";
// This should convert to utf16.
- // CHECK: private unnamed_addr constant [5 x i16] [i16 4384, i16 544, i16 -9272, i16 -9168, i16 0]
+ // ITANIUM: private unnamed_addr constant [5 x i16] [i16 4384, i16 544, i16 -9272, i16 -9168, i16 0]
+ // MSABI: linkonce_odr unnamed_addr constant [5 x i16] [i16 4384, i16 544, i16 -9272, i16 -9168, i16 0]
const wchar_t *bar = L"\u1120\u0220\U00102030";
diff --git a/test/CodeGen/struct-x86-darwin.c b/test/CodeGen/struct-x86-darwin.c
index afdcb8a39a06..5191441cabaf 100644
--- a/test/CodeGen/struct-x86-darwin.c
+++ b/test/CodeGen/struct-x86-darwin.c
@@ -1,13 +1,13 @@
-// RUN: %clang_cc1 < %s -emit-llvm > %t1 -triple=i686-apple-darwin9
-// RUN: grep "STest1 = type { i32, \[4 x i16\], double }" %t1
-// RUN: grep "STest2 = type { i16, i16, i32, i32 }" %t1
-// RUN: grep "STest3 = type { i8, i16, i32 }" %t1
-// RUN: grep "STestB1 = type { i8, i8 }" %t1
-// RUN: grep "STestB2 = type { i8, i8, i8 }" %t1
-// RUN: grep "STestB3 = type { i8, i8 }" %t1
-// RUN: grep "STestB4 = type { i8, i8, i8, i8 }" %t1
-// RUN: grep "STestB5 = type { i8, i8, \[2 x i8\], i8, i8 }" %t1
-// RUN: grep "STestB6 = type { i8, i8, \[2 x i8\] }" %t1
+// RUN: %clang_cc1 %s -emit-llvm -triple=i686-apple-darwin9 -o - | FileCheck %s
+// CHECK: STest1 = type { i32, [4 x i16], double }
+// CHECK: STest2 = type { i16, i16, i32, i32 }
+// CHECK: STest3 = type { i8, i16, i32 }
+// CHECK: STestB1 = type { i8, i8 }
+// CHECK: STestB2 = type { i8, i8, i8 }
+// CHECK: STestB3 = type { i8, i8 }
+// CHECK: STestB4 = type { i8, i8, i8, i8 }
+// CHECK: STestB5 = type { i8, i16, i8 }
+// CHECK: STestB6 = type { i8, i8, i16 }
// Test struct layout for x86-darwin target
struct STest1 {int x; short y[4]; double z; } st1;
diff --git a/test/CodeGen/target-data.c b/test/CodeGen/target-data.c
index 7b285de1c4f3..5153be9075ed 100644
--- a/test/CodeGen/target-data.c
+++ b/test/CodeGen/target-data.c
@@ -1,9 +1,167 @@
-// RUN: %clang_cc1 -triple i686-unknown-unknown -emit-llvm -o %t %s
-// RUN: grep 'target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S128"' %t
-// RUN: %clang_cc1 -triple i686-apple-darwin9 -emit-llvm -o %t %s
-// RUN: grep 'target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:128:128-n8:16:32-S128"' %t
-// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o %t %s
-// RUN: grep 'target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"' %t
+// RUN: %clang_cc1 -triple i686-unknown-unknown -emit-llvm -o - %s | \
+// RUN: FileCheck --check-prefix=I686-UNKNOWN %s
+// I686-UNKNOWN: target datalayout = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128"
+
+// RUN: %clang_cc1 -triple i686-apple-darwin9 -emit-llvm -o - %s | \
+// RUN: FileCheck --check-prefix=I686-DARWIN %s
+// I686-DARWIN: target datalayout = "e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128"
+
+// RUN: %clang_cc1 -triple i686-unknown-win32 -emit-llvm -o - %s | \
+// RUN: FileCheck --check-prefix=I686-WIN32 %s
+// I686-WIN32: target datalayout = "e-m:w-p:32:32-i64:64-f80:32-n8:16:32-S32"
+
+// RUN: %clang_cc1 -triple i686-unknown-cygwin -emit-llvm -o - %s | \
+// RUN: FileCheck --check-prefix=I686-CYGWIN %s
+// I686-CYGWIN: target datalayout = "e-m:w-p:32:32-i64:64-f80:32-n8:16:32-S32"
+
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | \
+// RUN: FileCheck --check-prefix=X86_64 %s
+// X86_64: target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+
+// RUN: %clang_cc1 -triple xcore-unknown-unknown -emit-llvm -o - %s | \
+// RUN: FileCheck --check-prefix=XCORE %s
+// XCORE: target datalayout = "e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i64:32-f64:32-a:0:32-n32"
+
+// RUN: %clang_cc1 -triple sparc-sun-solaris -emit-llvm -o - %s | \
+// RUN: FileCheck %s --check-prefix=SPARC-V8
+// SPARC-V8: target datalayout = "E-m:e-p:32:32-i64:64-f128:64-n32-S64"
+
+// RUN: %clang_cc1 -triple sparcv9-sun-solaris -emit-llvm -o - %s | \
+// RUN: FileCheck %s --check-prefix=SPARC-V9
+// SPARC-V9: target datalayout = "E-m:e-i64:64-n32:64-S128"
+
+// RUN: %clang_cc1 -triple mipsel-linux-gnu -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=MIPS-32EL
+// MIPS-32EL: target datalayout = "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"
+
+// RUN: %clang_cc1 -triple mips-linux-gnu -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=MIPS-32EB
+// MIPS-32EB: target datalayout = "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"
+
+// RUN: %clang_cc1 -triple mips64el-linux-gnu -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=MIPS-64EL
+// MIPS-64EL: target datalayout = "e-m:m-i8:8:32-i16:16:32-i64:64-n32:64-S128"
+
+// RUN: %clang_cc1 -triple mips64el-linux-gnu -o - -emit-llvm -target-abi n32 \
+// RUN: %s | FileCheck %s -check-prefix=MIPS-64EL-N32
+// MIPS-64EL-N32: target datalayout = "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32:64-S128"
+
+// RUN: %clang_cc1 -triple mips64-linux-gnu -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=MIPS-64EB
+// MIPS-64EB: target datalayout = "E-m:m-i8:8:32-i16:16:32-i64:64-n32:64-S128"
+
+// RUN: %clang_cc1 -triple mips64-linux-gnu -o - -emit-llvm %s -target-abi n32 \
+// RUN: | FileCheck %s -check-prefix=MIPS-64EB-N32
+// MIPS-64EB-N32: target datalayout = "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32:64-S128"
+
+// RUN: %clang_cc1 -triple powerpc64-lv2 -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=PS3
+// PS3: target datalayout = "E-m:e-p:32:32-i64:64-n32:64"
+
+// RUN: %clang_cc1 -triple i686-nacl -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=I686-NACL
+// I686-NACL: target datalayout = "e-m:e-p:32:32-i64:64-n8:16:32-S128"
+
+// RUN: %clang_cc1 -triple x86_64-nacl -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=X86_64-NACL
+// X86_64-NACL: target datalayout = "e-m:e-p:32:32-i64:64-n8:16:32:64-S128"
+
+// RUN: %clang_cc1 -triple arm-nacl-gnueabi -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=ARM-NACL
+// ARM-NACL: target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S128"
+
+// RUN: %clang_cc1 -triple mipsel-nacl -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=MIPS-NACL
+// MIPS-NACL: target datalayout = "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"
+
+// RUN: %clang_cc1 -triple le32-nacl -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=LE32-NACL
+// LE32-NACL: target datalayout = "e-p:32:32-i64:64"
+
+// RUN: %clang_cc1 -triple powerpc-unknown -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=PPC
+// PPC: target datalayout = "E-m:e-p:32:32-i64:64-n32"
+
+// RUN: %clang_cc1 -triple powerpc64-freebsd -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=PPC64-FREEBSD
+// PPC64-FREEBSD: target datalayout = "E-m:e-i64:64-n32:64"
+
+// RUN: %clang_cc1 -triple powerpc64-linux -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=PPC64-LINUX
+// PPC64-LINUX: target datalayout = "E-m:e-i64:64-n32:64"
+
+// RUN: %clang_cc1 -triple powerpc64le-linux -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=PPC64LE-LINUX
+// PPC64LE-LINUX: target datalayout = "e-m:e-i64:64-n32:64"
+
// RUN: %clang_cc1 -triple powerpc-darwin -o - -emit-llvm %s | \
// RUN: FileCheck %s -check-prefix=PPC32-DARWIN
-// PPC32-DARWIN: target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v128:128:128-n32"
+// PPC32-DARWIN: target datalayout = "E-m:o-p:32:32-f64:32:64-n32"
+
+// RUN: %clang_cc1 -triple powerpc64-darwin -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=PPC64-DARWIN
+// PPC64-DARWIN: target datalayout = "E-m:o-i64:64-n32:64"
+
+// RUN: %clang_cc1 -triple nvptx-unknown -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=NVPTX
+// NVPTX: target datalayout = "e-p:32:32-i64:64-v16:16-v32:32-n16:32:64"
+
+// RUN: %clang_cc1 -triple nvptx64-unknown -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=NVPTX64
+// NVPTX64: target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64"
+
+// RUN: %clang_cc1 -triple r600-unknown -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=R600
+// R600: target datalayout = "e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64"
+
+// RUN: %clang_cc1 -triple r600-unknown -target-cpu cayman -o - -emit-llvm %s \
+// RUN: | FileCheck %s -check-prefix=R600D
+// R600D: target datalayout = "e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64"
+
+// RUN: %clang_cc1 -triple r600-unknown -target-cpu hawaii -o - -emit-llvm %s \
+// RUN: | FileCheck %s -check-prefix=R600SI
+// R600SI: target datalayout = "e-p:32:32-p1:64:64-p2:64:64-p3:32:32-p4:64:64-p5:32:32-p24:64:64-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64"
+
+// RUN: %clang_cc1 -triple arm64-unknown -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=AARCH64
+// AARCH64: target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
+
+// RUN: %clang_cc1 -triple thumb-unknown-gnueabi -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=THUMB
+// THUMB: target datalayout = "e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-i64:64-v128:64:128-a:0:32-n32-S64"
+
+// RUN: %clang_cc1 -triple arm-unknown-gnueabi -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=ARM
+// ARM: target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-n32-S64"
+
+// RUN: %clang_cc1 -triple thumb-unknown -o - -emit-llvm -target-abi apcs-gnu \
+// RUN: %s | FileCheck %s -check-prefix=THUMB-GNU
+// THUMB-GNU: target datalayout = "e-m:e-p:32:32-i1:8:32-i8:8:32-i16:16:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
+
+// RUN: %clang_cc1 -triple arm-unknown -o - -emit-llvm -target-abi apcs-gnu \
+// RUN: %s | FileCheck %s -check-prefix=ARM-GNU
+// ARM-GNU: target datalayout = "e-m:e-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
+
+// RUN: %clang_cc1 -triple hexagon-unknown -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=HEXAGON
+// HEXAGON: target datalayout = "e-m:e-p:32:32-i1:32-i64:64-a:0-n32"
+
+// RUN: %clang_cc1 -triple s390x-unknown -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=SYSTEMZ
+// SYSTEMZ: target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-a:8:16-n32:64"
+
+// RUN: %clang_cc1 -triple msp430-unknown -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=MSP430
+// MSP430: target datalayout = "e-m:e-p:16:16-i32:16:32-n8:16"
+
+// RUN: %clang_cc1 -triple tce-unknown -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=TCE
+// TCE: target datalayout = "E-p:32:32-i8:8:32-i16:16:32-i64:32-f64:32-v64:32-v128:32-a:0:32-n32"
+
+// RUN: %clang_cc1 -triple spir-unknown -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=SPIR
+// SPIR: target datalayout = "e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
+
+// RUN: %clang_cc1 -triple spir64-unknown -o - -emit-llvm %s | \
+// RUN: FileCheck %s -check-prefix=SPIR64
+// SPIR64: target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
diff --git a/test/CodeGen/tbaa-for-vptr.cpp b/test/CodeGen/tbaa-for-vptr.cpp
index 7ba058bffe66..ded574ea9376 100644
--- a/test/CodeGen/tbaa-for-vptr.cpp
+++ b/test/CodeGen/tbaa-for-vptr.cpp
@@ -1,12 +1,12 @@
-// RUN: %clang_cc1 -emit-llvm -o - -fsanitize=thread %s | FileCheck %s
-// RUN: %clang_cc1 -emit-llvm -o - -O1 %s | FileCheck %s
-// RUN: %clang_cc1 -emit-llvm -o - -O1 -relaxed-aliasing -fsanitize=thread %s | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - -fsanitize=thread %s | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - -O1 %s | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - -O1 -relaxed-aliasing -fsanitize=thread %s | FileCheck %s
//
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s --check-prefix=NOTBAA
-// RUN: %clang_cc1 -emit-llvm -o - -O2 -relaxed-aliasing %s | FileCheck %s --check-prefix=NOTBAA
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s --check-prefix=NOTBAA
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - -O2 -relaxed-aliasing %s | FileCheck %s --check-prefix=NOTBAA
//
// Check that we generate TBAA for vtable pointer loads and stores.
-// When -fthread-sanitizer is used TBAA should be generated at all opt levels
+// When -fsanitize=thread is used TBAA should be generated at all opt levels
// even if -relaxed-aliasing is present.
struct A {
virtual int foo() const ;
@@ -17,12 +17,19 @@ void CreateA() {
new A;
}
-void CallFoo(A *a) {
+void CallFoo(A *a, int (A::*fp)() const) {
a->foo();
+ (a->*fp)();
}
+// CHECK-LABEL: @_Z7CallFoo
// CHECK: %{{.*}} = load {{.*}} !tbaa ![[NUM:[0-9]+]]
+// CHECK: br i1
+// CHECK: load {{.*}}, !tbaa ![[NUM]]
+//
+// CHECK-LABEL: @_ZN1AC2Ev
// CHECK: store {{.*}} !tbaa ![[NUM]]
+//
// CHECK: [[NUM]] = metadata !{metadata [[TYPE:!.*]], metadata [[TYPE]], i64 0}
// CHECK: [[TYPE]] = metadata !{metadata !"vtable pointer", metadata !{{.*}}
// NOTBAA-NOT: = metadata !{metadata !"Simple C/C++ TBAA"}
diff --git a/test/CodeGen/tbaa-ms-abi.cpp b/test/CodeGen/tbaa-ms-abi.cpp
index 67390b1a8a54..2a9e47e40810 100644
--- a/test/CodeGen/tbaa-ms-abi.cpp
+++ b/test/CodeGen/tbaa-ms-abi.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -cxx-abi microsoft -triple i686-pc-win32 -disable-llvm-optzns -emit-llvm -o - -O1 %s | FileCheck %s
+// RUN: %clang_cc1 -triple i686-pc-win32 -disable-llvm-optzns -emit-llvm -o - -O1 %s | FileCheck %s
//
// Test that TBAA works in the Microsoft C++ ABI. We used to error out while
// attempting to mangle RTTI.
@@ -16,7 +16,7 @@ StructB::StructB() {
// CHECK: store i32 42, i32* {{.*}}, !tbaa [[TAG_A_i32:!.*]]
}
-// CHECK: [[TYPE_CHAR:!.*]] = metadata !{metadata !"omnipotent char", metadata
-// CHECK: [[TYPE_INT:!.*]] = metadata !{metadata !"int", metadata [[TYPE_CHAR]], i64 0}
+// CHECK: [[TYPE_INT:!.*]] = metadata !{metadata !"int", metadata [[TYPE_CHAR:!.*]], i64 0}
+// CHECK: [[TYPE_CHAR]] = metadata !{metadata !"omnipotent char", metadata
// CHECK: [[TAG_A_i32]] = metadata !{metadata [[TYPE_A:!.*]], metadata [[TYPE_INT]], i64 0}
// CHECK: [[TYPE_A]] = metadata !{metadata !"?AUStructA@@", metadata [[TYPE_INT]], i64 0}
diff --git a/test/CodeGen/tbaa-struct.cpp b/test/CodeGen/tbaa-struct.cpp
index f8bd1245ceef..71d3ed11a173 100644
--- a/test/CodeGen/tbaa-struct.cpp
+++ b/test/CodeGen/tbaa-struct.cpp
@@ -12,8 +12,7 @@ void copy(struct A *a, struct A *b) {
*a = *b;
}
-// CHECK: target datalayout = "{{.*}}p:[[P:64|32]]
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i[[P]](i8* %{{.*}}, i8* %{{.*}}, i[[P]] 16, i32 4, i1 false), !tbaa.struct [[TS:!.*]]
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* %{{.*}}, i8* %{{.*}}, i64 16, i32 4, i1 false), !tbaa.struct [[TS:!.*]]
struct B {
char c1;
@@ -25,7 +24,7 @@ void copy2(struct B *a, struct B *b) {
*a = *b;
}
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i[[P]](i8* %{{.*}}, i8* %{{.*}}, i[[P]] 24, i32 4, i1 false), !tbaa.struct [[TS2:!.*]]
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* %{{.*}}, i8* %{{.*}}, i64 24, i32 4, i1 false), !tbaa.struct [[TS2:!.*]]
typedef _Complex int T2;
typedef _Complex char T5;
@@ -37,7 +36,7 @@ void copy3 (T1 *a, T1 *b) {
*a = *b;
}
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i[[P]](i8* %{{.*}}, i8* %{{.*}}, i[[P]] 12, i32 4, i1 false), !tbaa.struct [[TS3:!.*]]
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* %{{.*}}, i8* %{{.*}}, i64 12, i32 4, i1 false), !tbaa.struct [[TS3:!.*]]
// Make sure that zero-length bitfield works.
#define ATTR __attribute__ ((ms_struct))
@@ -50,7 +49,7 @@ struct five {
void copy4(struct five *a, struct five *b) {
*a = *b;
}
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i[[P]](i8* %{{.*}}, i8* %{{.*}}, i[[P]] 3, i32 1, i1 false), !tbaa.struct [[TS4:!.*]]
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* %{{.*}}, i8* %{{.*}}, i64 3, i32 1, i1 false), !tbaa.struct [[TS4:!.*]]
struct six {
char a;
@@ -61,7 +60,7 @@ struct six {
void copy5(struct six *a, struct six *b) {
*a = *b;
}
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i[[P]](i8* %{{.*}}, i8* %{{.*}}, i[[P]] 6, i32 1, i1 false), !tbaa.struct [[TS5:!.*]]
+// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* %{{.*}}, i8* %{{.*}}, i64 6, i32 1, i1 false), !tbaa.struct [[TS5:!.*]]
// CHECK: [[TS]] = metadata !{i64 0, i64 2, metadata !{{.*}}, i64 4, i64 4, metadata !{{.*}}, i64 8, i64 1, metadata !{{.*}}, i64 12, i64 4, metadata !{{.*}}}
// CHECK: [[CHAR:!.*]] = metadata !{metadata !"omnipotent char", metadata !{{.*}}}
diff --git a/test/CodeGen/ubsan-type-blacklist.cpp b/test/CodeGen/ubsan-type-blacklist.cpp
new file mode 100644
index 000000000000..7dc6fe159b51
--- /dev/null
+++ b/test/CodeGen/ubsan-type-blacklist.cpp
@@ -0,0 +1,25 @@
+// Verify ubsan vptr does not check down-casts on blacklisted types.
+// RUN: echo "type:_ZTI3Foo" > %t-type.blacklist
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsanitize=vptr -emit-llvm %s -o - | FileCheck %s --check-prefix=DEFAULT
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -fsanitize=vptr -fsanitize-blacklist=%t-type.blacklist -emit-llvm %s -o - | FileCheck %s --check-prefix=TYPE
+
+// REQUIRES: shell
+
+class Bar {
+public:
+ virtual ~Bar() {}
+};
+class Foo : public Bar {};
+
+Bar bar;
+
+// DEFAULT: @_Z7checkmev
+// TYPE: @_Z7checkmev
+void checkme() {
+// DEFAULT: call void @__ubsan_handle_dynamic_type_cache_miss({{.*}} (%class.Bar* @bar to
+// TYPE-NOT: @__ubsan_handle_dynamic_type_cache_miss
+ Foo* foo = static_cast<Foo*>(&bar); // down-casting
+// DEFAULT: ret void
+// TYPE: ret void
+ return;
+}
diff --git a/test/CodeGen/union.c b/test/CodeGen/union.c
index 5c89e2d72a7e..730218210213 100644
--- a/test/CodeGen/union.c
+++ b/test/CodeGen/union.c
@@ -44,3 +44,16 @@ typedef union T0 { unsigned int : 0; } T0;
T0 t0;
union { int large_bitfield: 31; char c } u2;
+
+struct dt_t_s {
+ union {
+ long long u : 56;
+ } __attribute__((packed));
+};
+struct {
+ struct {
+ struct {
+ struct dt_t_s t;
+ };
+ };
+} a;
diff --git a/test/CodeGen/utf16-cfstrings.c b/test/CodeGen/utf16-cfstrings.c
index d4f214b0d644..dbe9bdad3e7f 100644
--- a/test/CodeGen/utf16-cfstrings.c
+++ b/test/CodeGen/utf16-cfstrings.c
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm %s -o - | FileCheck %s
// <rdar://problem/10655949>
-// CHECK: @.str = internal unnamed_addr constant [9 x i16] [i16 252, i16 98, i16 101, i16 114, i16 104, i16 117, i16 110, i16 100, i16 0], align 2
+// CHECK: @.str = private unnamed_addr constant [9 x i16] [i16 252, i16 98, i16 101, i16 114, i16 104, i16 117, i16 110, i16 100, i16 0], section "__TEXT,__ustring", align 2
#define CFSTR __builtin___CFStringMakeConstantString
diff --git a/test/CodeGen/varargs.c b/test/CodeGen/varargs.c
index b6973d8337d8..3e2cce079381 100644
--- a/test/CodeGen/varargs.c
+++ b/test/CodeGen/varargs.c
@@ -1,5 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
-
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck %s
// PR6433 - Don't crash on va_arg(typedef).
typedef double gdouble;
@@ -15,3 +14,10 @@ void function_as_vararg() {
// CHECK-NOT: llvm.trap
vararg(0, focus_changed_cb);
}
+
+void vla(int n, ...)
+{
+ __builtin_va_list ap;
+ void *p;
+ p = __builtin_va_arg(ap, typeof (int (*)[++n])); // CHECK: add nsw i32 {{.*}}, 1
+}
diff --git a/test/CodeGen/variadic-gpfp-x86.c b/test/CodeGen/variadic-gpfp-x86.c
new file mode 100644
index 000000000000..735c4beea03a
--- /dev/null
+++ b/test/CodeGen/variadic-gpfp-x86.c
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o - | FileCheck %s
+
+struct Bar {
+ float f1;
+ float f2;
+ unsigned u;
+};
+
+struct Bar foo(__builtin_va_list ap) {
+ return __builtin_va_arg(ap, struct Bar);
+// CHECK: [[FPOP:%.*]] = getelementptr inbounds %struct.__va_list_tag* {{.*}}, i32 0, i32 1
+// CHECK: [[FPO:%.*]] = load i32* [[FPOP]]
+// CHECK: [[FPVEC:%.*]] = getelementptr i8* {{.*}}, i32 [[FPO]]
+// CHECK: bitcast i8* [[FPVEC]] to <2 x float>*
+}
diff --git a/test/CodeGen/vla.c b/test/CodeGen/vla.c
index 1757ef778794..e6cdd5d2a32a 100644
--- a/test/CodeGen/vla.c
+++ b/test/CodeGen/vla.c
@@ -195,3 +195,12 @@ void test7(int a[b(0)]) {
// CHECK-LABEL: define void @test7(
// CHECK: call i32 @b(i8* null)
}
+
+// Make sure we emit dereferenceable or nonnull when the static keyword is
+// provided.
+void test8(int a[static 3]) { }
+// CHECK: define void @test8(i32* dereferenceable(12) %a)
+
+void test9(int n, int a[static n]) { }
+// CHECK: define void @test9(i32 %n, i32* nonnull %a)
+
diff --git a/test/CodeGen/volatile-complex.c b/test/CodeGen/volatile-complex.c
index 71e5db6f5cf8..fd5e52b8d7e3 100644
--- a/test/CodeGen/volatile-complex.c
+++ b/test/CodeGen/volatile-complex.c
@@ -5,16 +5,14 @@
//
// This test assumes that floats are 32-bit aligned and doubles are
// 64-bit aligned, and uses x86-64 as a target that should have this
-// datalayout.
-
-// CHECK: target datalayout = "{{.*}}f32:32:32-f64:64:64{{.*}}"
+// property.
volatile _Complex float cf;
volatile _Complex double cd;
volatile _Complex float cf32 __attribute__((aligned(32)));
volatile _Complex double cd32 __attribute__((aligned(32)));
-// CHECK-LABEL-LABEL: define void @test_cf()
+// CHECK-LABEL: define void @test_cf()
void test_cf() {
// CHECK: load volatile float* getelementptr inbounds ({ float, float }* @cf, i32 0, i32 0), align 4
// CHECK-NEXT: load volatile float* getelementptr inbounds ({ float, float }* @cf, i32 0, i32 1), align 4
@@ -27,7 +25,7 @@ void test_cf() {
// CHECK-NEXT: ret void
}
-// CHECK-LABEL-LABEL: define void @test_cd()
+// CHECK-LABEL: define void @test_cd()
void test_cd() {
// CHECK: load volatile double* getelementptr inbounds ({ double, double }* @cd, i32 0, i32 0), align 8
// CHECK-NEXT: load volatile double* getelementptr inbounds ({ double, double }* @cd, i32 0, i32 1), align 8
@@ -40,7 +38,7 @@ void test_cd() {
// CHECK-NEXT: ret void
}
-// CHECK-LABEL-LABEL: define void @test_cf32()
+// CHECK-LABEL: define void @test_cf32()
void test_cf32() {
// CHECK: load volatile float* getelementptr inbounds ({ float, float }* @cf32, i32 0, i32 0), align 32
// CHECK-NEXT: load volatile float* getelementptr inbounds ({ float, float }* @cf32, i32 0, i32 1), align 4
@@ -53,7 +51,7 @@ void test_cf32() {
// CHECK-NEXT: ret void
}
-// CHECK-LABEL-LABEL: define void @test_cd32()
+// CHECK-LABEL: define void @test_cd32()
void test_cd32() {
// CHECK: load volatile double* getelementptr inbounds ({ double, double }* @cd32, i32 0, i32 0), align 32
// CHECK-NEXT: load volatile double* getelementptr inbounds ({ double, double }* @cd32, i32 0, i32 1), align 8
diff --git a/test/CodeGen/volatile.c b/test/CodeGen/volatile.c
index 0dcdc15c77a6..3e891aa32c77 100644
--- a/test/CodeGen/volatile.c
+++ b/test/CodeGen/volatile.c
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -emit-llvm < %s | FileCheck %s
+// RUN: %clang_cc1 -triple=%itanium_abi_triple -emit-llvm < %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-IT
+// RUN: %clang_cc1 -triple=%ms_abi_triple -emit-llvm < %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-MS
int S;
volatile int vS;
@@ -83,10 +84,12 @@ int main() {
// CHECK: load volatile i32* getelementptr {{.*}} @vF3
// CHECK: store i32 {{.*}}, i32* [[I]]
i=BF.x;
-// CHECK: load i8* getelementptr {{.*}} @BF
+// CHECK-IT: load i8* getelementptr {{.*}} @BF
+// CHECK-MS: load i32* getelementptr {{.*}} @BF
// CHECK: store i32 {{.*}}, i32* [[I]]
i=vBF.x;
-// CHECK: load volatile i8* getelementptr {{.*}} @vBF
+// CHECK-IT: load volatile i8* getelementptr {{.*}} @vBF
+// CHECK-MS: load volatile i32* getelementptr {{.*}} @vBF
// CHECK: store i32 {{.*}}, i32* [[I]]
i=V[3];
// CHECK: load <4 x i32>* @V
@@ -154,12 +157,16 @@ int main() {
// CHECK: store volatile i32 {{.*}}, i32* getelementptr {{.*}} @vF3
BF.x=i;
// CHECK: load i32* [[I]]
-// CHECK: load i8* getelementptr {{.*}} @BF
-// CHECK: store i8 {{.*}}, i8* getelementptr {{.*}} @BF
+// CHECK-IT: load i8* getelementptr {{.*}} @BF
+// CHECK-MS: load i32* getelementptr {{.*}} @BF
+// CHECK-IT: store i8 {{.*}}, i8* getelementptr {{.*}} @BF
+// CHECK-MS: store i32 {{.*}}, i32* getelementptr {{.*}} @BF
vBF.x=i;
// CHECK: load i32* [[I]]
-// CHECK: load volatile i8* getelementptr {{.*}} @vBF
-// CHECK: store volatile i8 {{.*}}, i8* getelementptr {{.*}} @vBF
+// CHECK-IT: load volatile i8* getelementptr {{.*}} @vBF
+// CHECK-MS: load volatile i32* getelementptr {{.*}} @vBF
+// CHECK-IT: store volatile i8 {{.*}}, i8* getelementptr {{.*}} @vBF
+// CHECK-MS: store volatile i32 {{.*}}, i32* getelementptr {{.*}} @vBF
V[3]=i;
// CHECK: load i32* [[I]]
// CHECK: load <4 x i32>* @V
diff --git a/test/CodeGen/wchar-const.c b/test/CodeGen/wchar-const.c
index 2e9af53a14de..34da249639ea 100644
--- a/test/CodeGen/wchar-const.c
+++ b/test/CodeGen/wchar-const.c
@@ -15,7 +15,7 @@ typedef __WCHAR_TYPE__ wchar_t;
// CHECK-DAR: private unnamed_addr constant [18 x i32] [i32 84,
-// CHECK-WIN: private unnamed_addr constant [18 x i16] [i16 84,
+// CHECK-WIN: linkonce_odr unnamed_addr constant [18 x i16] [i16 84,
extern void foo(const wchar_t* p);
int main (int argc, const char * argv[])
{
diff --git a/test/CodeGen/windows-itanium.c b/test/CodeGen/windows-itanium.c
new file mode 100644
index 000000000000..7f0e7b135d2b
--- /dev/null
+++ b/test/CodeGen/windows-itanium.c
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -triple i686-windows-itanium -emit-llvm %s -o - \
+// RUN: | FileCheck %s -check-prefix CHECK-C -check-prefix CHECK
+
+// RUN: %clang_cc1 -triple i686-windows-itanium -emit-llvm -x c++ %s -o - \
+// RUN: | FileCheck %s -check-prefix CHECK-CXX -check-prefix CHECK
+
+int function() {
+ return 32;
+}
+
+// CHECK-C: define i32 @function() {{.*}} {
+// CHECK-CXX: define i32 @_Z8functionv() {{.*}} {
+// CHECK: ret i32 32
+// CHECK: }
+
diff --git a/test/CodeGen/windows-on-arm-dllimport-dllexport.c b/test/CodeGen/windows-on-arm-dllimport-dllexport.c
new file mode 100644
index 000000000000..897d06a729d6
--- /dev/null
+++ b/test/CodeGen/windows-on-arm-dllimport-dllexport.c
@@ -0,0 +1,25 @@
+// RUN: %clang_cc1 -Werror -triple thumbv7-windows-itanium -mfloat-abi hard -emit-llvm %s -o - | FileCheck %s
+
+__declspec(dllexport) int export_int;
+
+__declspec(dllimport) int import_int;
+
+__declspec(dllexport) void export_declared_function();
+
+__declspec(dllexport) void export_implemented_function() {
+}
+
+__declspec(dllimport) void import_function(int);
+
+void call_imported_function() {
+ export_declared_function();
+ return import_function(import_int);
+}
+
+// CHECK: @import_int = external dllimport global i32
+// CHECK: @export_int = common dllexport global i32 0, align 4
+
+// CHECK: define dllexport arm_aapcs_vfpcc void @export_implemented_function()
+
+// CHECK: declare dllimport arm_aapcs_vfpcc void @import_function(i32)
+
diff --git a/test/CodeGen/x86-64-inline-asm.c b/test/CodeGen/x86-64-inline-asm.c
new file mode 100644
index 000000000000..bb46eda633b7
--- /dev/null
+++ b/test/CodeGen/x86-64-inline-asm.c
@@ -0,0 +1,17 @@
+// REQUIRES: x86-registered-target
+// RUN: %clang_cc1 -triple x86_64 %s -S -o /dev/null -DWARN -verify
+// RUN: %clang_cc1 -triple x86_64 %s -S -o /dev/null -Werror -verify
+void f() {
+ asm("movaps %xmm3, (%esi, 2)");
+// expected-note@1 {{instantiated into assembly here}}
+#ifdef WARN
+// expected-warning@-3 {{scale factor without index register is ignored}}
+#else
+// expected-error@-5 {{scale factor without index register is ignored}}
+#endif
+}
+
+static unsigned var[1] = {};
+void g(void) { asm volatile("movd %%xmm0, %0"
+ :
+ : "m"(var)); }
diff --git a/test/CodeGen/x86_64-atomic-128.c b/test/CodeGen/x86_64-atomic-128.c
new file mode 100644
index 000000000000..2069e455828d
--- /dev/null
+++ b/test/CodeGen/x86_64-atomic-128.c
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -target-cpu core2 %s -S -emit-llvm -o - | FileCheck %s
+
+// All atomics up to 16 bytes should be emitted inline on x86_64. The
+// backend can reform __sync_whatever calls if necessary (e.g. the CPU
+// doesn't have cmpxchg16b).
+
+__int128 test_sync_call(__int128 *addr, __int128 val) {
+ // CHECK-LABEL: @test_sync_call
+ // CHECK: atomicrmw add i128
+ return __sync_fetch_and_add(addr, val);
+}
+
+__int128 test_c11_call(_Atomic __int128 *addr, __int128 val) {
+ // CHECK-LABEL: @test_c11_call
+ // CHECK: atomicrmw sub
+ return __c11_atomic_fetch_sub(addr, val, 0);
+}
+
+__int128 test_atomic_call(__int128 *addr, __int128 val) {
+ // CHECK-LABEL: @test_atomic_call
+ // CHECK: atomicrmw or
+ return __atomic_fetch_or(addr, val, 0);
+}
+
+__int128 test_expression(_Atomic __int128 *addr) {
+ // CHECK-LABEL: @test_expression
+ // CHECK: atomicrmw and
+ *addr &= 1;
+}
diff --git a/test/CodeGen/xcore-abi.c b/test/CodeGen/xcore-abi.c
index 10881de7cec2..6dbc44b5595d 100644
--- a/test/CodeGen/xcore-abi.c
+++ b/test/CodeGen/xcore-abi.c
@@ -1,3 +1,4 @@
+// REQUIRES: xcore-registered-target
// RUN: %clang_cc1 -triple xcore -verify %s
_Static_assert(sizeof(long long) == 8, "sizeof long long is wrong");
_Static_assert(_Alignof(long long) == 4, "alignof long long is wrong");
@@ -7,11 +8,15 @@ _Static_assert(_Alignof(double) == 4, "alignof double is wrong");
// RUN: %clang_cc1 -triple xcore-unknown-unknown -fno-signed-char -fno-common -emit-llvm -o - %s | FileCheck %s
-// CHECK: target datalayout = "e-p:32:32:32-a0:0:32-n32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f16:16:32-f32:32:32-f64:32:32"
// CHECK: target triple = "xcore-unknown-unknown"
+// CHECK: @cgx = external constant i32, section ".cp.rodata"
+extern const int cgx;
+int fcgx() { return cgx;}
// CHECK: @g1 = global i32 0, align 4
int g1;
+// CHECK: @cg1 = constant i32 0, section ".cp.rodata", align 4
+const int cg1;
#include <stdarg.h>
struct x { int a[5]; };
@@ -66,7 +71,7 @@ void testva (int n, ...) {
// CHECK:[[V2:%[a-z0-9]+]] = bitcast i64* [[V]] to i8*
// CHECK: call void @f(i8* [[V2]])
- struct x v5 = va_arg (ap, struct x); // typical agregate type
+ struct x v5 = va_arg (ap, struct x); // typical aggregate type
f(&v5);
// CHECK: [[I:%[a-z0-9]+]] = load i8** [[AP]]
// CHECK: [[I2:%[a-z0-9]+]] = bitcast i8* [[I]] to %struct.x**
@@ -79,7 +84,7 @@ void testva (int n, ...) {
// CHECK: [[V2:%[a-z0-9]+]] = bitcast %struct.x* [[V]] to i8*
// CHECK: call void @f(i8* [[V2]])
- int* v6 = va_arg (ap, int[4]); // an unusual agregate type
+ int* v6 = va_arg (ap, int[4]); // an unusual aggregate type
f(v6);
// CHECK: [[I:%[a-z0-9]+]] = load i8** [[AP]]
// CHECK: [[I2:%[a-z0-9]+]] = bitcast i8* [[I]] to [4 x i32]**
@@ -113,10 +118,18 @@ void testbuiltin (void) {
// CHECK: call i32 @llvm.xcore.getps(i32 {{%[a-z0-9]+}})
// CHECK: call i32 @llvm.xcore.bitrev(i32 {{%[a-z0-9]+}})
// CHECK: call void @llvm.xcore.setps(i32 {{%[a-z0-9]+}}, i32 {{%[a-z0-9]+}})
- int i = __builtin_getid();
- unsigned int ui = __builtin_getps(i);
+ volatile int i = __builtin_getid();
+ volatile unsigned int ui = __builtin_getps(i);
ui = __builtin_bitrev(ui);
__builtin_setps(i,ui);
+
+ // CHECK: store volatile i32 0, i32* {{%[a-z0-9]+}}, align 4
+ // CHECK: store volatile i32 1, i32* {{%[a-z0-9]+}}, align 4
+ // CHECK: store volatile i32 -1, i32* {{%[a-z0-9]+}}, align 4
+ volatile int res;
+ res = __builtin_eh_return_data_regno(0);
+ res = __builtin_eh_return_data_regno(1);
+ res = __builtin_eh_return_data_regno(2);
}
// CHECK-LABEL: define zeroext i8 @testchar()
diff --git a/test/CodeGen/xcore-abi.cpp b/test/CodeGen/xcore-abi.cpp
new file mode 100644
index 000000000000..fbf31ff50aa1
--- /dev/null
+++ b/test/CodeGen/xcore-abi.cpp
@@ -0,0 +1,27 @@
+// REQUIRES: xcore-registered-target
+
+// RUN: %clang_cc1 -triple xcore-unknown-unknown -fno-signed-char -fno-common -emit-llvm -o - -x c++ %s | FileCheck %s
+
+// CHECK: target triple = "xcore-unknown-unknown"
+
+
+// C++ constants are not placed into the ".cp.rodata" section.
+// CHECK: @cgx = external constant i32
+extern const int cgx;
+int fcgx() { return cgx;}
+// CHECK: @g1 = global i32 0, align 4
+int g1;
+// CHECK: @cg1 = constant i32 0, align 4
+extern const int cg1 = 0;
+
+// Regression test for a bug in lib/CodeGen/CodeGenModule.cpp which called
+// getLanguageLinkage() via a null 'VarDecl*'. This was an XCore specific
+// conditional call to GV->setSection(".cp.rodata").
+class C {
+public:
+ ~C(){};
+};
+C c;
+
+// CHECK: "no-frame-pointer-elim"="false"
+// CHECK-NOT: "no-frame-pointer-elim-non-leaf"
diff --git a/test/CodeGen/xcore-stringtype.c b/test/CodeGen/xcore-stringtype.c
new file mode 100644
index 000000000000..25589d5b2b21
--- /dev/null
+++ b/test/CodeGen/xcore-stringtype.c
@@ -0,0 +1,179 @@
+// REQUIRES: xcore-registered-target
+// RUN: %clang_cc1 -triple xcore-unknown-unknown -fno-signed-char -fno-common -emit-llvm -o - %s | FileCheck %s
+
+// CHECK: target triple = "xcore-unknown-unknown"
+
+// In the tests below, some types are not supported by the ABI (_Complex,
+// variable length arrays) and will thus emit no meta data.
+// The 33 tests that do emit typestrings are gathered into '!xcore.typestrings'
+// Please see 'Tools Development Guide' section 2.16.2 for format details:
+// <https://www.xmos.com/download/public/Tools-Development-Guide%28X9114A%29.pdf>
+
+// CHECK: !xcore.typestrings = !{!1, !2, !3, !4, !5, !6, !7, !8, !9, !10, !11,
+// CHECK: !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22, !23, !24, !25,
+// CHECK: !26, !27, !28, !29, !30, !31, !32, !33, !34, !35, !36, !37, !38}
+
+
+// test BuiltinType
+// CHECK: !1 = metadata !{void (i1, i8, i8, i8, i16, i16, i16, i32, i32, i32,
+// CHECK: i32, i32, i32, i64, i64, i64, float, double, double)*
+// CHECK: @builtinType, metadata !"f{0}(b,uc,uc,sc,ss,us,ss,si,ui,si,sl,
+// CHECK: ul,sl,sll,ull,sll,ft,d,ld)"}
+void builtinType(_Bool B, char C, unsigned char UC, signed char SC, short S,
+ unsigned short US, signed short SS, int I, unsigned int UI,
+ signed int SI, long L, unsigned long UL, signed long SL,
+ long long LL, unsigned long long ULL, signed long long SLL,
+ float F, double D, long double LD) {}
+double _Complex Complex; // not supported
+
+
+// test FunctionType & Qualifiers
+// CHECK: !2 = metadata !{void ()* @gI, metadata !"f{0}()"}
+// CHECK: !3 = metadata !{void (...)* @eI, metadata !"f{0}()"}
+// CHECK: !4 = metadata !{void ()* @gV, metadata !"f{0}(0)"}
+// CHECK: !5 = metadata !{void ()* @eV, metadata !"f{0}(0)"}
+// CHECK: !6 = metadata !{void (i32, ...)* @gVA, metadata !"f{0}(si,va)"}
+// CHECK: !7 = metadata !{void (i32, ...)* @eVA, metadata !"f{0}(si,va)"}
+// CHECK: !8 = metadata !{i32* (i32*)* @gQ, metadata !"f{crv:p(cv:si)}(p(cv:si))"}
+// CHECK: !9 = metadata !{i32* (i32*)* @eQ, metadata !"f{crv:p(cv:si)}(p(cv:si))"}
+extern void eI();
+void gI() {eI();};
+extern void eV(void);
+void gV(void) {eV();}
+extern void eVA(int, ...);
+void gVA(int i, ...) {eVA(i);}
+extern const volatile int* volatile restrict const
+ eQ(const volatile int * volatile restrict const);
+const volatile int* volatile restrict const
+ gQ(const volatile int * volatile restrict const i) {return eQ(i);}
+
+
+// test PointerType
+// CHECK: !10 = metadata !{i32* (i32*, i32* (i32*)*)*
+// CHECK: @pointerType, metadata !"f{p(si)}(p(si),p(f{p(si)}(p(si))))"}
+// CHECK: !11 = metadata !{i32** @EP, metadata !"p(si)"}
+// CHECK: !12 = metadata !{i32** @GP, metadata !"p(si)"}
+extern int* EP;
+int* GP;
+int* pointerType(int *I, int * (*FP)(int *)) {
+ return I? EP : GP;
+}
+
+// test ArrayType
+// CHECK: !13 = metadata !{[2 x i32]* (i32*, i32*, [2 x i32]*, [2 x i32]*, i32*)*
+// CHECK: @arrayType, metadata !"f{p(a(2:si))}(p(si),p(cv:si),p(a(2:si)),
+// CHECK: p(a(2:si)),p(si))"}
+// CHECK: !14 = metadata !{[0 x i32]* @EA1, metadata !"a(*:cv:si)"}
+// CHECK: !15 = metadata !{[2 x i32]* @EA2, metadata !"a(2:si)"}
+// CHECK: !16 = metadata !{[0 x [2 x i32]]* @EA3, metadata !"a(*:a(2:si))"}
+// CHECK: !17 = metadata !{[3 x [2 x i32]]* @EA4, metadata !"a(3:a(2:si))"}
+// CHECK: !18 = metadata !{[2 x i32]* @GA1, metadata !"a(2:cv:si)"}
+// CHECK: !19 = metadata !{void ([2 x i32]*)* @arrayTypeVariable1,
+// CHECK: metadata !"f{0}(p(a(2:si)))"}
+// CHECK: !20 = metadata !{void (void ([2 x i32]*)*)* @arrayTypeVariable2,
+// CHECK: metadata !"f{0}(p(f{0}(p(a(2:si)))))"}
+// CHECK: !21 = metadata !{[3 x [2 x i32]]* @GA2, metadata !"a(3:a(2:si))"}
+extern int GA2[3][2];
+extern const volatile int EA1[];
+extern int EA2[2];
+extern int EA3[][2];
+extern int EA4[3][2];
+const volatile int GA1[2];
+extern void arrayTypeVariable1(int[*][2]);
+extern void arrayTypeVariable2( void(*fp)(int[*][2]) );
+extern void arrayTypeVariable3(int[3][*]); // not supported
+extern void arrayTypeVariable4( void(*fp)(int[3][*]) ); // not supported
+typedef int RetType[2];
+RetType* arrayType(int A1[], int const volatile A2[2], int A3[][2],
+ int A4[3][2], int A5[const volatile restrict static 2]) {
+ if (A1) EA2[0] = EA1[0];
+ if (A2) return &EA2;
+ if (A3) return EA3;
+ if (A4) return EA4;
+ if (A5) EA2[0] = GA1[0];
+ arrayTypeVariable1(EA4);
+ arrayTypeVariable2(arrayTypeVariable1);
+ arrayTypeVariable3(EA4);
+ arrayTypeVariable4(arrayTypeVariable3);
+ return GA2;
+}
+
+
+// test StructureType
+// CHECK: !22 = metadata !{void (%struct.S1*)* @structureType1, metadata
+// CHECK: !"f{0}(s(S1){m(ps2){p(s(S2){m(ps3){p(s(S3){m(s1){s(S1){}}})}})}})"}
+// CHECK: !23 = metadata !{void (%struct.S2*)* @structureType2, metadata
+// CHECK: !"f{0}(s(S2){m(ps3){p(s(S3){m(s1){s(S1){m(ps2){p(s(S2){})}}}})}})"}
+// CHECK: !24 = metadata !{void (%struct.S3*)* @structureType3, metadata
+// CHECK: !"f{0}(s(S3){m(s1){s(S1){m(ps2){p(s(S2){m(ps3){p(s(S3){})}})}}}})"}
+// CHECK: !25 = metadata !{void (%struct.S4*)* @structureType4, metadata
+// CHECK: !"f{0}(s(S4){m(s1){s(S1){m(ps2){p(s(S2){m(ps3){p(s(S3){m(s1){s(S1){}}})}})}}}})"}
+// CHECK: !26 = metadata !{%struct.anon* @StructAnon, metadata !"s(){m(A){si}}"}
+// CHECK: !27 = metadata !{i32 (%struct.SB*)* @structureTypeB, metadata
+// CHECK: !"f{si}(s(SB){m(){b(4:si)},m(){b(2:si)},m(N4){b(4:si)},
+// CHECK: m(N2){b(2:si)},m(){b(4:ui)},m(){b(4:si)},m(){b(4:c:si)},
+// CHECK: m(){b(4:c:si)},m(){b(4:cv:si)}})"}
+struct S2;
+struct S1{struct S2 *ps2;};
+struct S3;
+struct S2{struct S3 *ps3;};
+struct S3{struct S1 s1;};
+struct S4{struct S1 s1;};
+void structureType1(struct S1 s1){}
+void structureType2(struct S2 s2){}
+void structureType3(struct S3 s3){}
+void structureType4(struct S4 s4){}
+struct {int A;} StructAnon = {1};
+struct SB{int:4; int:2; int N4:4; int N2:2; unsigned int:4; signed int:4;
+ const int:4; int const :4; volatile const int:4;};
+int structureTypeB(struct SB sb){return StructAnon.A;}
+
+
+// test UnionType
+// CHECK: !28 = metadata !{void (%union.U1*)* @unionType1, metadata
+// CHECK: !"f{0}(u(U1){m(pu2){p(u(U2){m(pu3){p(u(U3){m(u1){u(U1){}}})}})}})"}
+// CHECK: !29 = metadata !{void (%union.U2*)* @unionType2, metadata
+// CHECK: !"f{0}(u(U2){m(pu3){p(u(U3){m(u1){u(U1){m(pu2){p(u(U2){})}}}})}})"}
+// CHECK: !30 = metadata !{void (%union.U3*)* @unionType3, metadata
+// CHECK: !"f{0}(u(U3){m(u1){u(U1){m(pu2){p(u(U2){m(pu3){p(u(U3){})}})}}}})"}
+// CHECK: !31 = metadata !{void (%union.U4*)* @unionType4, metadata
+// CHECK: !"f{0}(u(U4){m(u1){u(U1){m(pu2){p(u(U2){m(pu3){p(u(U3){m(u1){u(U1){}}})}})}}}})"}
+// CHECK: !32 = metadata !{%union.anon* @UnionAnon, metadata !"u(){m(A){si}}"}
+// CHECK: !33 = metadata !{i32 (%union.UB*)* @unionTypeB, metadata
+// CHECK: !"f{si}(u(UB){m(N2){b(2:si)},m(N4){b(4:si)},m(){b(2:si)},
+// CHECK: m(){b(4:c:si)},m(){b(4:c:si)},m(){b(4:cv:si)},m(){b(4:si)},
+// CHECK: m(){b(4:si)},m(){b(4:ui)}})"}
+union U2;
+union U1{union U2 *pu2;};
+union U3;
+union U2{union U3 *pu3;};
+union U3{union U1 u1;};
+union U4{union U1 u1;};
+void unionType1(union U1 u1) {}
+void unionType2(union U2 u2) {}
+void unionType3(union U3 u3) {}
+void unionType4(union U4 u4) {}
+union UB{int:4; int:2; int N4:4; int N2:2; unsigned int:4; signed int:4;
+ const int:4; int const :4; volatile const int:4;};
+union {int A;} UnionAnon = {1};
+int unionTypeB(union UB ub) {return UnionAnon.A;}
+
+
+// test EnumType
+// CHECK: !34 = metadata !{i32* @EnumAnon, metadata !"e(){m(EA){3}}"}
+// CHECK: !35 = metadata !{i32 (i32)* @enumType, metadata
+// CHECK: !"f{si}(e(E){m(A){7},m(B){6},m(C){5},m(D){0}})"}
+enum E {D, C=5, B, A};
+enum {EA=3} EnumAnon = EA;
+int enumType(enum E e) {return EnumAnon;}
+
+
+// CHECK: !36 = metadata !{i32 ()* @testReDecl, metadata !"f{si}()"}
+// CHECK: !37 = metadata !{[10 x i32]* @After, metadata !"a(10:si)"}
+// CHECK: !38 = metadata !{[10 x i32]* @Before, metadata !"a(10:si)"}
+extern int After[];
+extern int Before[10];
+int testReDecl() {return After[0] + Before[0];}
+int After[10];
+int Before[];
+
diff --git a/test/CodeGenCUDA/Inputs/cuda.h b/test/CodeGenCUDA/Inputs/cuda.h
new file mode 100644
index 000000000000..a9a4595a14a9
--- /dev/null
+++ b/test/CodeGenCUDA/Inputs/cuda.h
@@ -0,0 +1,20 @@
+/* Minimal declarations for CUDA support. Testing purposes only. */
+
+#include <stddef.h>
+
+#define __constant__ __attribute__((constant))
+#define __device__ __attribute__((device))
+#define __global__ __attribute__((global))
+#define __host__ __attribute__((host))
+#define __shared__ __attribute__((shared))
+#define __launch_bounds__(...) __attribute__((launch_bounds(__VA_ARGS__)))
+
+struct dim3 {
+ unsigned x, y, z;
+ __host__ __device__ dim3(unsigned x, unsigned y = 1, unsigned z = 1) : x(x), y(y), z(z) {}
+};
+
+typedef struct cudaStream *cudaStream_t;
+
+int cudaConfigureCall(dim3 gridSize, dim3 blockSize, size_t sharedSize = 0,
+ cudaStream_t stream = 0);
diff --git a/test/CodeGenCUDA/address-spaces.cu b/test/CodeGenCUDA/address-spaces.cu
index 04344526f40e..b80820683f3e 100644
--- a/test/CodeGenCUDA/address-spaces.cu
+++ b/test/CodeGenCUDA/address-spaces.cu
@@ -1,6 +1,9 @@
// RUN: %clang_cc1 -emit-llvm %s -o - -fcuda-is-device -triple nvptx-unknown-unknown | FileCheck %s
-#include "../SemaCUDA/cuda.h"
+// Verifies Clang emits correct address spaces and addrspacecast instructions
+// for CUDA code.
+
+#include "Inputs/cuda.h"
// CHECK: @i = addrspace(1) global
__device__ int i;
@@ -11,6 +14,18 @@ __constant__ int j;
// CHECK: @k = addrspace(3) global
__shared__ int k;
+struct MyStruct {
+ int data1;
+ int data2;
+};
+
+// CHECK: @_ZZ5func0vE1a = internal addrspace(3) global %struct.MyStruct zeroinitializer
+// CHECK: @_ZZ5func1vE1a = internal addrspace(3) global float 0.000000e+00
+// CHECK: @_ZZ5func2vE1a = internal addrspace(3) global [256 x float] zeroinitializer
+// CHECK: @_ZZ5func3vE1a = internal addrspace(3) global float 0.000000e+00
+// CHECK: @_ZZ5func4vE1a = internal addrspace(3) global float 0.000000e+00
+// CHECK: @b = addrspace(3) global float 0.000000e+00
+
__device__ void foo() {
// CHECK: load i32* addrspacecast (i32 addrspace(1)* @i to i32*)
i++;
@@ -22,15 +37,66 @@ __device__ void foo() {
k++;
static int li;
- // CHECK: load i32 addrspace(1)* @_ZZ3foovE2li
+ // CHECK: load i32* addrspacecast (i32 addrspace(1)* @_ZZ3foovE2li to i32*)
li++;
__constant__ int lj;
- // CHECK: load i32 addrspace(4)* @_ZZ3foovE2lj
+ // CHECK: load i32* addrspacecast (i32 addrspace(4)* @_ZZ3foovE2lj to i32*)
lj++;
__shared__ int lk;
- // CHECK: load i32 addrspace(3)* @_ZZ3foovE2lk
+ // CHECK: load i32* addrspacecast (i32 addrspace(3)* @_ZZ3foovE2lk to i32*)
lk++;
}
+__device__ void func0() {
+ __shared__ MyStruct a;
+ MyStruct *ap = &a; // composite type
+ ap->data1 = 1;
+ ap->data2 = 2;
+}
+// CHECK: define void @_Z5func0v()
+// CHECK: store %struct.MyStruct* addrspacecast (%struct.MyStruct addrspace(3)* @_ZZ5func0vE1a to %struct.MyStruct*), %struct.MyStruct** %ap
+
+__device__ void callee(float *ap) {
+ *ap = 1.0f;
+}
+
+__device__ void func1() {
+ __shared__ float a;
+ callee(&a); // implicit cast from parameters
+}
+// CHECK: define void @_Z5func1v()
+// CHECK: call void @_Z6calleePf(float* addrspacecast (float addrspace(3)* @_ZZ5func1vE1a to float*))
+
+__device__ void func2() {
+ __shared__ float a[256];
+ float *ap = &a[128]; // implicit cast from a decayed array
+ *ap = 1.0f;
+}
+// CHECK: define void @_Z5func2v()
+// CHECK: store float* getelementptr inbounds ([256 x float]* addrspacecast ([256 x float] addrspace(3)* @_ZZ5func2vE1a to [256 x float]*), i32 0, i32 128), float** %ap
+
+__device__ void func3() {
+ __shared__ float a;
+ float *ap = reinterpret_cast<float *>(&a); // explicit cast
+ *ap = 1.0f;
+}
+// CHECK: define void @_Z5func3v()
+// CHECK: store float* addrspacecast (float addrspace(3)* @_ZZ5func3vE1a to float*), float** %ap
+
+__device__ void func4() {
+ __shared__ float a;
+ float *ap = (float *)&a; // explicit c-style cast
+ *ap = 1.0f;
+}
+// CHECK: define void @_Z5func4v()
+// CHECK: store float* addrspacecast (float addrspace(3)* @_ZZ5func4vE1a to float*), float** %ap
+
+__shared__ float b;
+
+__device__ float *func5() {
+ return &b; // implicit cast from a return value
+}
+// CHECK: define float* @_Z5func5v()
+// CHECK: ret float* addrspacecast (float addrspace(3)* @b to float*)
diff --git a/test/CodeGenCUDA/device-stub.cu b/test/CodeGenCUDA/device-stub.cu
index af73ea993f45..ed94d108487c 100644
--- a/test/CodeGenCUDA/device-stub.cu
+++ b/test/CodeGenCUDA/device-stub.cu
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
-#include "../SemaCUDA/cuda.h"
+#include "Inputs/cuda.h"
// Test that we build the correct number of calls to cudaSetupArgument followed
// by a call to cudaLaunch.
diff --git a/test/CodeGenCUDA/filter-decl.cu b/test/CodeGenCUDA/filter-decl.cu
index b758632d12f7..faaeb69fe1c7 100644
--- a/test/CodeGenCUDA/filter-decl.cu
+++ b/test/CodeGenCUDA/filter-decl.cu
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-HOST %s
-// RUN: %clang_cc1 -emit-llvm %s -o - -fcuda-is-device | FileCheck -check-prefix=CHECK-DEVICE %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-HOST %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - -fcuda-is-device | FileCheck -check-prefix=CHECK-DEVICE %s
-#include "../SemaCUDA/cuda.h"
+#include "Inputs/cuda.h"
// CHECK-HOST-NOT: constantdata = global
// CHECK-DEVICE: constantdata = global
diff --git a/test/CodeGenCUDA/kernel-call.cu b/test/CodeGenCUDA/kernel-call.cu
index f134624eec19..9b849db908f8 100644
--- a/test/CodeGenCUDA/kernel-call.cu
+++ b/test/CodeGenCUDA/kernel-call.cu
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
-#include "../SemaCUDA/cuda.h"
+#include "Inputs/cuda.h"
__global__ void g1(int x) {}
diff --git a/test/CodeGenCUDA/launch-bounds.cu b/test/CodeGenCUDA/launch-bounds.cu
new file mode 100644
index 000000000000..ed4c2bfc8870
--- /dev/null
+++ b/test/CodeGenCUDA/launch-bounds.cu
@@ -0,0 +1,30 @@
+// RUN: %clang_cc1 %s -triple nvptx-unknown-unknown -fcuda-is-device -emit-llvm -o - | FileCheck %s
+
+#include "Inputs/cuda.h"
+
+#define MAX_THREADS_PER_BLOCK 256
+#define MIN_BLOCKS_PER_MP 2
+
+// Test both max threads per block and Min cta per sm.
+extern "C" {
+__global__ void
+__launch_bounds__( MAX_THREADS_PER_BLOCK, MIN_BLOCKS_PER_MP )
+Kernel1()
+{
+}
+}
+
+// CHECK: !{{[0-9]+}} = metadata !{void ()* @Kernel1, metadata !"maxntidx", i32 256}
+// CHECK: !{{[0-9]+}} = metadata !{void ()* @Kernel1, metadata !"minctasm", i32 2}
+
+// Test only max threads per block. Min cta per sm defaults to 0, and
+// CodeGen doesn't output a zero value for minctasm.
+extern "C" {
+__global__ void
+__launch_bounds__( MAX_THREADS_PER_BLOCK )
+Kernel2()
+{
+}
+}
+
+// CHECK: !{{[0-9]+}} = metadata !{void ()* @Kernel2, metadata !"maxntidx", i32 256}
diff --git a/test/CodeGenCUDA/ptx-kernels.cu b/test/CodeGenCUDA/ptx-kernels.cu
index 211692fcc7c0..11b92b587606 100644
--- a/test/CodeGenCUDA/ptx-kernels.cu
+++ b/test/CodeGenCUDA/ptx-kernels.cu
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 %s -triple nvptx-unknown-unknown -fcuda-is-device -emit-llvm -o - | FileCheck %s
-#include "../SemaCUDA/cuda.h"
+#include "Inputs/cuda.h"
// CHECK-LABEL: define void @device_function
extern "C"
diff --git a/test/CodeGenCXX/2003-11-27-MultipleInheritanceThunk.cpp b/test/CodeGenCXX/2003-11-27-MultipleInheritanceThunk.cpp
index 3e5339732767..a70f6e01280e 100644
--- a/test/CodeGenCXX/2003-11-27-MultipleInheritanceThunk.cpp
+++ b/test/CodeGenCXX/2003-11-27-MultipleInheritanceThunk.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -emit-llvm %s -o -
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o -
+// RUN: %clang_cc1 -triple %ms_abi_triple -fno-rtti -emit-llvm %s -o -
struct CallSite {
diff --git a/test/CodeGenCXX/2004-03-08-ReinterpretCastCopy.cpp b/test/CodeGenCXX/2004-03-08-ReinterpretCastCopy.cpp
index a6e2e30dd59b..a4411fc46832 100644
--- a/test/CodeGenCXX/2004-03-08-ReinterpretCastCopy.cpp
+++ b/test/CodeGenCXX/2004-03-08-ReinterpretCastCopy.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -emit-llvm %s -o -
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o -
+// RUN: %clang_cc1 -triple %ms_abi_triple -fno-rtti -emit-llvm %s -o -
struct A {
virtual void Method() = 0;
diff --git a/test/CodeGenCXX/2004-03-09-UnmangledBuiltinMethods.cpp b/test/CodeGenCXX/2004-03-09-UnmangledBuiltinMethods.cpp
index 5d8c8b004b79..03c4ed623fdf 100644
--- a/test/CodeGenCXX/2004-03-09-UnmangledBuiltinMethods.cpp
+++ b/test/CodeGenCXX/2004-03-09-UnmangledBuiltinMethods.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s
// CHECK: _ZN11AccessFlags6strlenEv
struct AccessFlags {
diff --git a/test/CodeGenCXX/2006-09-12-OpaqueStructCrash.cpp b/test/CodeGenCXX/2006-09-12-OpaqueStructCrash.cpp
index bd270dd60238..c5a2d5abc3ef 100644
--- a/test/CodeGenCXX/2006-09-12-OpaqueStructCrash.cpp
+++ b/test/CodeGenCXX/2006-09-12-OpaqueStructCrash.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s
+// RUN: %clang_cc1 -triple %ms_abi_triple -fno-rtti -emit-llvm -o - %s
struct A {
virtual ~A();
diff --git a/test/CodeGenCXX/2010-05-11-alwaysinlineinstantiation.cpp b/test/CodeGenCXX/2010-05-11-alwaysinlineinstantiation.cpp
index fe0740b7cb5c..bf00c0f36bfe 100644
--- a/test/CodeGenCXX/2010-05-11-alwaysinlineinstantiation.cpp
+++ b/test/CodeGenCXX/2010-05-11-alwaysinlineinstantiation.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple %s -o - | FileCheck %s
// CHECK-NOT: ZN12basic_stringIcEC1Ev
// CHECK: ZN12basic_stringIcED1Ev
diff --git a/test/CodeGenCXX/Inputs/debug-info-class-limited.cpp b/test/CodeGenCXX/Inputs/debug-info-class-limited.cpp
new file mode 100644
index 000000000000..31a026101bb6
--- /dev/null
+++ b/test/CodeGenCXX/Inputs/debug-info-class-limited.cpp
@@ -0,0 +1,49 @@
+
+// CHECK-DAG: [ DW_TAG_structure_type ] [PR16214] [line [[@LINE+1]], {{.*}} [def]
+struct PR16214 {
+ int i;
+};
+
+typedef PR16214 bar;
+
+bar *a;
+bar b;
+
+namespace PR14467 {
+// CHECK-DAG: [ DW_TAG_structure_type ] [foo] [line [[@LINE+1]], {{.*}} [def]
+struct foo {
+};
+
+foo *bar(foo *a) {
+ foo *b = new foo(*a);
+ return b;
+}
+}
+
+namespace test1 {
+// CHECK-DAG: [ DW_TAG_structure_type ] [foo] [line [[@LINE+1]], {{.*}} [def]
+struct foo {
+};
+
+extern int bar(foo *a);
+int baz(foo *a) {
+ return bar(a);
+}
+}
+
+namespace test2 {
+// FIXME: if we were a bit fancier, we could realize that the 'foo' type is only
+// required because of the 'bar' type which is not required at all (or might
+// only be required to be declared)
+// CHECK-DAG: [ DW_TAG_structure_type ] [foo] [line [[@LINE+1]], {{.*}} [def]
+struct foo {
+};
+
+struct bar {
+ foo f;
+};
+
+void func() {
+ foo *f;
+}
+}
diff --git a/test/CodeGenCXX/PR19955.cpp b/test/CodeGenCXX/PR19955.cpp
new file mode 100644
index 000000000000..9e101550b419
--- /dev/null
+++ b/test/CodeGenCXX/PR19955.cpp
@@ -0,0 +1,27 @@
+// RUN: %clang_cc1 -triple i686-windows-msvc -fno-rtti -emit-llvm -std=c++1y -O0 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-windows-msvc -fno-rtti -emit-llvm -std=c++1y -O0 -o - %s | FileCheck %s --check-prefix X64
+
+extern int __declspec(dllimport) var;
+extern void __declspec(dllimport) fun();
+
+extern int *varp;
+int *varp = &var;
+// CHECK-DAG: @"\01?varp@@3PAHA" = global i32* null
+// X64-DAG: @"\01?varp@@3PEAHEA" = global i32* null
+
+extern void (*funp)();
+void (*funp)() = &fun;
+// CHECK-DAG: @"\01?funp@@3P6AXXZA" = global void ()* null
+// X64-DAG: @"\01?funp@@3P6AXXZEA" = global void ()* null
+
+// CHECK-LABEL: @"\01??__Evarp@@YAXXZ"
+// CHECK-DAG: store i32* @"\01?var@@3HA", i32** @"\01?varp@@3PAHA"
+
+// X64-LABEL: @"\01??__Evarp@@YAXXZ"
+// X64-DAG: store i32* @"\01?var@@3HA", i32** @"\01?varp@@3PEAHEA"
+
+// CHECK-LABEL: @"\01??__Efunp@@YAXXZ"()
+// CHECK-DAG: store void ()* @"\01?fun@@YAXXZ", void ()** @"\01?funp@@3P6AXXZA"
+
+// X64-LABEL: @"\01??__Efunp@@YAXXZ"()
+// X64-DAG: store void ()* @"\01?fun@@YAXXZ", void ()** @"\01?funp@@3P6AXXZEA"
diff --git a/test/CodeGenCXX/PR20038.cpp b/test/CodeGenCXX/PR20038.cpp
new file mode 100644
index 000000000000..c24685d696b6
--- /dev/null
+++ b/test/CodeGenCXX/PR20038.cpp
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -triple %itanium_abi_triple -g -emit-llvm %s -o - | FileCheck %s
+
+struct C {
+ ~C();
+};
+extern bool b;
+// CHECK: call {{.*}}, !dbg [[DTOR_CALL1_LOC:![0-9]*]]
+// CHECK: call {{.*}}, !dbg [[DTOR_CALL2_LOC:![0-9]*]]
+// CHECK: [[FUN1:.*]] = {{.*}}; [ DW_TAG_subprogram ] {{.*}} [def] [fun1]
+// CHECK: [[FUN2:.*]] = {{.*}}; [ DW_TAG_subprogram ] {{.*}} [def] [fun2]
+// CHECK: [[DTOR_CALL1_LOC]] = metadata !{i32 [[@LINE+2]], i32 0, metadata [[FUN1_BLOCK:.*]], null}
+// CHECK: [[FUN1_BLOCK]] = metadata !{{{[^,]*}}, {{[^,]*}}, metadata [[FUN1]],
+void fun1() { b && (C(), 1); }
+// CHECK: [[DTOR_CALL2_LOC]] = metadata !{i32 [[@LINE+2]], i32 0, metadata [[FUN2_BLOCK1:.*]], null}
+// CHECK: [[FUN2_BLOCK1]] = metadata !{{{[^,]*}}, {{[^,]*}}, metadata [[FUN2]],
+bool fun2() { return (C(), b) && 0; }
diff --git a/test/CodeGenCXX/PR5050-constructor-conversion.cpp b/test/CodeGenCXX/PR5050-constructor-conversion.cpp
index a1b05ebc70b1..ce6cc0e846e2 100644
--- a/test/CodeGenCXX/PR5050-constructor-conversion.cpp
+++ b/test/CodeGenCXX/PR5050-constructor-conversion.cpp
@@ -1,8 +1,7 @@
-// REQUIRES: x86-registered-target,x86-64-registered-target
-// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -S %s -o %t-64.s
-// RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s
-// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -S %s -o %t-32.s
-// RUN: FileCheck -check-prefix CHECK-LP32 --input-file=%t-32.s %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | \
+// RUN: FileCheck %s
+// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -emit-llvm %s -o - | \
+// RUN: FileCheck %s
struct A { A(const A&, int i1 = 1); };
@@ -12,8 +11,4 @@ A f(const B &b) {
return b;
}
-// CHECK-LP64: callq __ZN1AC1ERKS_i
-
-// CHECK-LP32: calll L__ZN1AC1ERKS_i
-
-
+// CHECK: call void @_ZN1AC1ERKS_i
diff --git a/test/CodeGenCXX/PR5093-static-member-function.cpp b/test/CodeGenCXX/PR5093-static-member-function.cpp
index ceab8528e8bc..d61a87ac16dc 100644
--- a/test/CodeGenCXX/PR5093-static-member-function.cpp
+++ b/test/CodeGenCXX/PR5093-static-member-function.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
struct a {
static void f();
};
diff --git a/test/CodeGenCXX/PR5863-unreachable-block.cpp b/test/CodeGenCXX/PR5863-unreachable-block.cpp
index 3f32d7570435..50d17314cb49 100644
--- a/test/CodeGenCXX/PR5863-unreachable-block.cpp
+++ b/test/CodeGenCXX/PR5863-unreachable-block.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -emit-llvm-only %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -emit-llvm-only %s
// PR5863
class E { };
diff --git a/test/CodeGenCXX/aarch64-arguments.cpp b/test/CodeGenCXX/aarch64-arguments.cpp
index f56ad0bbdcf3..013051ccaea3 100644
--- a/test/CodeGenCXX/aarch64-arguments.cpp
+++ b/test/CodeGenCXX/aarch64-arguments.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple aarch64-none-linux -emit-llvm -w -o - %s | FileCheck -check-prefix=PCS %s
+// RUN: %clang_cc1 -triple arm64-none-linux -emit-llvm -w -o - %s | FileCheck -check-prefix=PCS %s
// PCS: define void @{{.*}}(i8 %a
struct s0 {};
diff --git a/test/CodeGenCXX/aarch64-cxxabi.cpp b/test/CodeGenCXX/aarch64-cxxabi.cpp
index 04d9493ae6b0..6c08ff2fc3ed 100644
--- a/test/CodeGenCXX/aarch64-cxxabi.cpp
+++ b/test/CodeGenCXX/aarch64-cxxabi.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -emit-llvm -w -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -emit-llvm -w -o - %s | FileCheck %s
// Check differences between the generic Itanium ABI, the AArch32 version and
// the AArch64 version.
@@ -40,8 +40,8 @@ public:
void guard_variables(int a) {
static Guarded mine(a);
-// CHECK: [[GUARDBIT:%[0-9]+]] = and i64 {{%[0-9]+}}, 1
-// CHECK: icmp eq i64 [[GUARDBIT]], 0
+// CHECK: [[GUARDBIT:%[0-9]+]] = and i8 {{%[0-9]+}}, 1
+// CHECK: icmp eq i8 [[GUARDBIT]], 0
// As guards are 64-bit, these helpers should take 64-bit pointers.
// CHECK: call i32 @__cxa_guard_acquire(i64*
diff --git a/test/CodeGenCXX/aarch64-mangle-neon-vectors.cpp b/test/CodeGenCXX/aarch64-mangle-neon-vectors.cpp
index 2514704f1d88..3b4a309327fe 100644
--- a/test/CodeGenCXX/aarch64-mangle-neon-vectors.cpp
+++ b/test/CodeGenCXX/aarch64-mangle-neon-vectors.cpp
@@ -1,12 +1,11 @@
-// REQUIRES: aarch64-registered-target
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon %s -emit-llvm -o - | FileCheck %s
typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef signed char int8_t;
typedef signed short int16_t;
-typedef signed long long int64_t;
-typedef unsigned long long uint64_t;
+typedef signed long int64_t;
+typedef unsigned long uint64_t;
typedef unsigned char poly8_t;
typedef unsigned short poly16_t;
typedef __fp16 float16_t;
diff --git a/test/CodeGenCXX/aarch64-neon.cpp b/test/CodeGenCXX/aarch64-neon.cpp
index 5d2a00bebe73..d6f6b0e894fb 100644
--- a/test/CodeGenCXX/aarch64-neon.cpp
+++ b/test/CodeGenCXX/aarch64-neon.cpp
@@ -1,13 +1,13 @@
// REQUIRES: aarch64-registered-target
-// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +neon \
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \
// RUN: -ffp-contract=fast -S -O3 -o - %s | FileCheck %s
-// Test whether arm_neon.h can be used in .cpp file.
+// Test whether arm_neon.h works as expected in C++.
#include "arm_neon.h"
poly64x1_t test_vld1_p64(poly64_t const * ptr) {
// CHECK: test_vld1_p64
return vld1_p64(ptr);
- // CHECK: ld1 {{{v[0-9]+}}.1d}, [{{x[0-9]+|sp}}]
+ // CHECK: {{ld1 { v[0-9]+.1d }|ldr d[0-9]+}}, [{{x[0-9]+|sp}}]
}
diff --git a/test/CodeGenCXX/abstract-class-ctors-dtors.cpp b/test/CodeGenCXX/abstract-class-ctors-dtors.cpp
index 793bbde05021..f36922413d83 100644
--- a/test/CodeGenCXX/abstract-class-ctors-dtors.cpp
+++ b/test/CodeGenCXX/abstract-class-ctors-dtors.cpp
@@ -7,10 +7,10 @@ struct A {
~A();
};
-// CHECK-NOT-LABEL: define void @_ZN1AC1Ev
+// CHECK-NOT: define void @_ZN1AC1Ev
// CHECK-LABEL: define void @_ZN1AC2Ev
-// CHECK-LABEL: define void @_ZN1AD1Ev
// CHECK-LABEL: define void @_ZN1AD2Ev
+// CHECK-LABEL: define void @_ZN1AD1Ev
A::A() { }
A::~A() { }
diff --git a/test/CodeGenCXX/address-of-fntemplate.cpp b/test/CodeGenCXX/address-of-fntemplate.cpp
index 71794520f0a0..4ff597acb304 100644
--- a/test/CodeGenCXX/address-of-fntemplate.cpp
+++ b/test/CodeGenCXX/address-of-fntemplate.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
template <typename T> void f(T) {}
template <typename T> void f() { }
diff --git a/test/CodeGenCXX/address-space-ref.cpp b/test/CodeGenCXX/address-space-ref.cpp
new file mode 100644
index 000000000000..de6bddca66a7
--- /dev/null
+++ b/test/CodeGenCXX/address-space-ref.cpp
@@ -0,0 +1,34 @@
+// RUN: %clang_cc1 %s -std=c++11 -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
+
+// For a reference to a complete type, output the dereferenceable attribute (in
+// any address space).
+
+typedef int a __attribute__((address_space(1)));
+
+a & foo(a &x, a & y) {
+ return x;
+}
+
+// CHECK: define dereferenceable(4) i32 addrspace(1)* @_Z3fooRU3AS1iS0_(i32 addrspace(1)* dereferenceable(4) %x, i32 addrspace(1)* dereferenceable(4) %y)
+
+// For a reference to an incomplete type in an alternate address space, output
+// neither dereferenceable nor nonnull.
+
+class bc;
+typedef bc b __attribute__((address_space(1)));
+
+b & bar(b &x, b & y) {
+ return x;
+}
+
+// CHECK: define %class.bc addrspace(1)* @_Z3barRU3AS12bcS1_(%class.bc addrspace(1)* %x, %class.bc addrspace(1)* %y)
+
+// For a reference to an incomplete type in addrspace(0), output nonnull.
+
+bc & bar2(bc &x, bc & y) {
+ return x;
+}
+
+// CHECK: define nonnull %class.bc* @_Z4bar2R2bcS0_(%class.bc* nonnull %x, %class.bc* nonnull %y)
+
+
diff --git a/test/CodeGenCXX/apple-kext.cpp b/test/CodeGenCXX/apple-kext.cpp
index 03506a8aacf5..0d7ccfb3be1a 100644
--- a/test/CodeGenCXX/apple-kext.cpp
+++ b/test/CodeGenCXX/apple-kext.cpp
@@ -1,8 +1,8 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fno-use-cxa-atexit -fapple-kext -emit-llvm -o - %s | FileCheck %s
// CHECK: @_ZN5test01aE = global [[A:%.*]] zeroinitializer
-// CHECK: @llvm.global_ctors = appending global {{.*}} { i32 65535, void ()* [[CTOR0:@.*]] }
-// CHECK: @llvm.global_dtors = appending global {{.*}} { i32 65535, void ()* [[DTOR0:@.*]] }
+// CHECK: @llvm.global_ctors = appending global {{.*}} { i32 65535, void ()* [[CTOR0:@.*]], i8* null }
+// CHECK: @llvm.global_dtors = appending global {{.*}} { i32 65535, void ()* [[DTOR0:@.*]], i8* null }
// rdar://11241230
namespace test0 {
diff --git a/test/CodeGenCXX/arm.cpp b/test/CodeGenCXX/arm.cpp
index 2fb9c49bb707..b6629f444e3f 100644
--- a/test/CodeGenCXX/arm.cpp
+++ b/test/CodeGenCXX/arm.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -triple=thumbv7-apple-ios3.0 -fno-use-cxa-atexit -target-abi apcs-gnu -emit-llvm -o - -fexceptions | FileCheck %s
+// RUN: %clang_cc1 %s -triple=thumbv7-apple-ios6.0 -fno-use-cxa-atexit -target-abi apcs-gnu -emit-llvm -o - -fexceptions | FileCheck %s
// CHECK: @_ZZN5test74testEvE1x = internal global i32 0, align 4
// CHECK: @_ZGVZN5test74testEvE1x = internal global i32 0
@@ -28,6 +28,7 @@ bar baz;
// CHECK: call [[BAR:%.*]]* @_ZN3barC1Ev(
// CHECK-NEXT: call i32 @atexit(void ()* @__dtor_baz)
+// CHECK-NOT: @_GLOBAL__D_a()
// CHECK-LABEL: define internal void @__dtor_baz()
// CHECK: call [[BAR]]* @_ZN3barD1Ev([[BAR]]* @baz)
@@ -292,9 +293,9 @@ namespace test7 {
// CHECK-LABEL: define void @_ZN5test74testEv()
void test() {
- // CHECK: [[T0:%.*]] = load i32* @_ZGVZN5test74testEvE1x
- // CHECK-NEXT: [[T1:%.*]] = and i32 [[T0]], 1
- // CHECK-NEXT: [[T2:%.*]] = icmp eq i32 [[T1]], 0
+ // CHECK: [[T0:%.*]] = load atomic i8* bitcast (i32* @_ZGVZN5test74testEvE1x to i8*) acquire, align 1
+ // CHECK-NEXT: [[T1:%.*]] = and i8 [[T0]], 1
+ // CHECK-NEXT: [[T2:%.*]] = icmp eq i8 [[T1]], 0
// CHECK-NEXT: br i1 [[T2]]
// -> fallthrough, end
// CHECK: [[T3:%.*]] = call i32 @__cxa_guard_acquire(i32* @_ZGVZN5test74testEvE1x)
@@ -327,9 +328,9 @@ namespace test8 {
// CHECK-LABEL: define void @_ZN5test84testEv()
void test() {
- // CHECK: [[T0:%.*]] = load i32* @_ZGVZN5test84testEvE1x
- // CHECK-NEXT: [[T1:%.*]] = and i32 [[T0]], 1
- // CHECK-NEXT: [[T2:%.*]] = icmp eq i32 [[T1]], 0
+ // CHECK: [[T0:%.*]] = load atomic i8* bitcast (i32* @_ZGVZN5test84testEvE1x to i8*) acquire, align 1
+ // CHECK-NEXT: [[T1:%.*]] = and i8 [[T0]], 1
+ // CHECK-NEXT: [[T2:%.*]] = icmp eq i8 [[T1]], 0
// CHECK-NEXT: br i1 [[T2]]
// -> fallthrough, end
// CHECK: [[T3:%.*]] = call i32 @__cxa_guard_acquire(i32* @_ZGVZN5test84testEvE1x)
@@ -416,6 +417,3 @@ namespace test9 {
// CHECK-LABEL: define linkonce_odr void @_ZTv0_n12_N5test21CD0Ev(
// CHECK: call void @_ZN5test21CD0Ev(
// CHECK: ret void
-
-// CH_ECK: @_GLOBAL__D_a()
-// CH_ECK: call %class.bar* @_ZN3barD1Ev(%class.bar* @baz)
diff --git a/test/CodeGenCXX/arm64-constructor-return.cpp b/test/CodeGenCXX/arm64-constructor-return.cpp
new file mode 100644
index 000000000000..0d5b3b38258c
--- /dev/null
+++ b/test/CodeGenCXX/arm64-constructor-return.cpp
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 %s -triple=arm64-apple-ios7.0.0 -emit-llvm -o - | FileCheck %s
+// rdar://12162905
+
+struct S {
+ S();
+ int iField;
+};
+
+S::S() {
+ iField = 1;
+};
+
+// CHECK: %struct.S* @_ZN1SC2Ev(%struct.S* returned %this)
+
+// CHECK: %struct.S* @_ZN1SC1Ev(%struct.S* returned %this)
+// CHECK: [[THISADDR:%[a-zA-z0-9.]+]] = alloca %struct.S*
+// CHECK: store %struct.S* %this, %struct.S** [[THISADDR]]
+// CHECK: [[THIS1:%.*]] = load %struct.S** [[THISADDR]]
+// CHECK: ret %struct.S* [[THIS1]]
diff --git a/test/CodeGenCXX/arm64-darwinpcs.cpp b/test/CodeGenCXX/arm64-darwinpcs.cpp
new file mode 100644
index 000000000000..0a0ec3af49cf
--- /dev/null
+++ b/test/CodeGenCXX/arm64-darwinpcs.cpp
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -triple arm64-linux-gnu -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple arm64-linux-gnu -emit-llvm -o - %s -target-abi darwinpcs | FileCheck %s --check-prefix=CHECK-DARWIN
+
+void test_extensions(bool a, char b, short c) {}
+// CHECK: define void @_Z15test_extensionsbcs(i1 %a, i8 %b, i16 %c)
+// CHECK-DARWIN: define void @_Z15test_extensionsbcs(i1 zeroext %a, i8 signext %b, i16 signext %c)
+
+struct Empty {};
+void test_empty(Empty e) {}
+// CHECK: define void @_Z10test_empty5Empty(i8
+// CHECK-DARWIN: define void @_Z10test_empty5Empty()
+
+struct HFA {
+ float a[3];
+};
diff --git a/test/CodeGenCXX/arm64-empty-struct.cpp b/test/CodeGenCXX/arm64-empty-struct.cpp
new file mode 100644
index 000000000000..6fa4e95295be
--- /dev/null
+++ b/test/CodeGenCXX/arm64-empty-struct.cpp
@@ -0,0 +1,27 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios -target-abi darwinpcs -emit-llvm -o - %s | FileCheck %s
+struct Empty {};
+
+Empty emptyvar;
+
+int take_args(int a, ...) {
+ __builtin_va_list l;
+ __builtin_va_start(l, a);
+// CHECK: call void @llvm.va_start
+
+ emptyvar = __builtin_va_arg(l, Empty);
+// CHECK: load i8**
+// CHECK-NOT: getelementptr
+// CHECK: [[EMPTY_PTR:%[a-zA-Z0-9._]+]] = bitcast i8* {{%[a-zA-Z0-9._]+}} to %struct.Empty*
+
+ // It's conceivable that EMPTY_PTR may not actually be a valid pointer
+ // (e.g. it's at the very bottom of the stack and the next page is
+ // invalid). This doesn't matter provided it's never loaded (there's no
+ // well-defined way to tell), but it becomes a problem if we do try to use it.
+// CHECK-NOT: load %struct.Empty* [[EMPTY_PTR]]
+
+ int i = __builtin_va_arg(l, int);
+// CHECK: va_arg i8** {{%[a-zA-Z0-9._]+}}, i32
+
+ __builtin_va_end(l);
+ return i;
+}
diff --git a/test/CodeGenCXX/arm64.cpp b/test/CodeGenCXX/arm64.cpp
new file mode 100644
index 000000000000..d0d4f4f70efc
--- /dev/null
+++ b/test/CodeGenCXX/arm64.cpp
@@ -0,0 +1,88 @@
+// RUN: %clang_cc1 %s -triple=arm64-apple-ios -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=arm64-apple-ios -emit-llvm -o - | FileCheck -check-prefix=CHECK-GLOBALS %s
+
+// __cxa_guard_acquire argument is 64-bit
+// rdar://11540122
+struct A {
+ A();
+};
+
+void f() {
+ // CHECK: call i32 @__cxa_guard_acquire(i64*
+ static A a;
+}
+
+// ARM64 uses the C++11 definition of POD.
+// rdar://12650514
+namespace test1 {
+ // This class is POD in C++11 and cannot have objects allocated in
+ // its tail-padding.
+ struct ABase {};
+ struct A : ABase {
+ int x;
+ char c;
+ };
+
+ struct B : A {
+ char d;
+ };
+
+ int test() {
+ return sizeof(B);
+ }
+ // CHECK: define i32 @_ZN5test14testEv()
+ // CHECK: ret i32 12
+}
+
+namespace std {
+ class type_info;
+}
+
+// ARM64 uses string comparisons for what would otherwise be
+// default-visibility weak RTTI. rdar://12650568
+namespace test2 {
+ struct A {
+ virtual void foo();
+ };
+ void A::foo() {}
+ // Tested below because these globals get kindof oddly rearranged.
+
+ struct __attribute__((visibility("hidden"))) B {};
+ const std::type_info &b0 = typeid(B);
+ // CHECK-GLOBALS: @_ZTSN5test21BE = linkonce_odr hidden constant
+ // CHECK-GLOBALS: @_ZTIN5test21BE = linkonce_odr hidden constant { {{.*}}, i8* getelementptr inbounds ([11 x i8]* @_ZTSN5test21BE, i32 0, i32 0) }
+
+ const std::type_info &b1 = typeid(B*);
+ // CHECK-GLOBALS: @_ZTSPN5test21BE = linkonce_odr hidden constant
+ // CHECK-GLOBALS: @_ZTIPN5test21BE = linkonce_odr hidden constant { {{.*}}, i8* getelementptr inbounds ([12 x i8]* @_ZTSPN5test21BE, i32 0, i32 0), i32 0, i8* bitcast
+
+ struct C {};
+ const std::type_info &c0 = typeid(C);
+ // CHECK-GLOBALS: @_ZTSN5test21CE = linkonce_odr hidden constant
+ // CHECK-GLOBALS: @_ZTIN5test21CE = linkonce_odr hidden constant { {{.*}}, i8* inttoptr (i64 add (i64 ptrtoint ([11 x i8]* @_ZTSN5test21CE to i64), i64 -9223372036854775808) to i8*) }
+
+ const std::type_info &c1 = typeid(C*);
+ // CHECK-GLOBALS: @_ZTSPN5test21CE = linkonce_odr hidden constant
+ // CHECK-GLOBALS: @_ZTIPN5test21CE = linkonce_odr hidden constant { {{.*}}, i8* inttoptr (i64 add (i64 ptrtoint ([12 x i8]* @_ZTSPN5test21CE to i64), i64 -9223372036854775808) to i8*), i32 0, i8* bitcast
+
+ // This class is explicitly-instantiated, but that instantiation
+ // doesn't guarantee to emit RTTI, so we can still demote the visibility.
+ template <class T> class D {};
+ template class D<int>;
+ const std::type_info &d0 = typeid(D<int>);
+ // CHECK-GLOBALS: @_ZTSN5test21DIiEE = linkonce_odr hidden constant
+ // CHECK-GLOBALS: @_ZTIN5test21DIiEE = linkonce_odr hidden constant { {{.*}}, i8* inttoptr (i64 add (i64 ptrtoint ([14 x i8]* @_ZTSN5test21DIiEE to i64), i64 -9223372036854775808) to i8*) }
+
+ // This class is explicitly-instantiated and *does* guarantee to
+ // emit RTTI, so we're stuck with having to use default visibility.
+ template <class T> class E {
+ virtual void foo() {}
+ };
+ template class E<int>;
+ // CHECK-GLOBALS: @_ZTSN5test21EIiEE = weak_odr constant [14 x i8]
+ // CHECK-GLOBALS: @_ZTIN5test21EIiEE = weak_odr constant { {{.*}}, i8* inttoptr (i64 add (i64 ptrtoint ([14 x i8]* @_ZTSN5test21EIiEE to i64), i64 -9223372036854775808) to i8*) }
+
+ // CHECK-GLOBALS: @_ZTSN5test21AE = constant [11 x i8]
+ // CHECK-GLOBALS: @_ZTIN5test21AE = constant { {{.*}}, i8* getelementptr inbounds ([11 x i8]* @_ZTSN5test21AE, i32 0, i32 0) }
+
+}
diff --git a/test/CodeGenCXX/array-construction.cpp b/test/CodeGenCXX/array-construction.cpp
index 645ad1d787df..53b81f2d85ba 100644
--- a/test/CodeGenCXX/array-construction.cpp
+++ b/test/CodeGenCXX/array-construction.cpp
@@ -1,8 +1,7 @@
-// REQUIRES: x86-registered-target,x86-64-registered-target
-// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -S %s -o %t-64.s
-// RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s
-// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -S %s -o %t-32.s
-// RUN: FileCheck -check-prefix CHECK-LP32 --input-file=%t-32.s %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | \
+// RUN: FileCheck %s
+// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -emit-llvm %s -o - | \
+// RUN: FileCheck %s
extern "C" int printf(...);
@@ -31,7 +30,4 @@ int main() {
h, i, j, array[h][i][j].i, array[h][i][j].f);
}
-// CHECK-LP64: callq __ZN4xptoC1Ev
-
-// CHECK-LP32: calll L__ZN4xptoC1Ev
-
+// CHECK: call void @_ZN4xptoC1Ev
diff --git a/test/CodeGenCXX/array-operator-delete-call.cpp b/test/CodeGenCXX/array-operator-delete-call.cpp
index 8d6f50fdfab1..890b142c10f8 100644
--- a/test/CodeGenCXX/array-operator-delete-call.cpp
+++ b/test/CodeGenCXX/array-operator-delete-call.cpp
@@ -1,8 +1,7 @@
-// REQUIRES: x86-registered-target,x86-64-registered-target
-// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -S %s -o %t-64.s
-// RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s
-// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -S %s -o %t-32.s
-// RUN: FileCheck -check-prefix CHECK-LP32 --input-file=%t-32.s %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | \
+// RUN: FileCheck %s
+// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -emit-llvm %s -o - | \
+// RUN: FileCheck %s
extern "C" int printf(...);
@@ -58,7 +57,5 @@ int main()
}
COST c2;
-// CHECK-LP64: callq __ZdaPv
-
-// CHECK-LP32: calll L__ZdaPv
+// CHECK: call void @_ZdaPv
diff --git a/test/CodeGenCXX/atomicinit.cpp b/test/CodeGenCXX/atomicinit.cpp
index ee2e9e4cf244..f453194468dd 100644
--- a/test/CodeGenCXX/atomicinit.cpp
+++ b/test/CodeGenCXX/atomicinit.cpp
@@ -1,4 +1,10 @@
-// RUN: %clang_cc1 %s -emit-llvm -O1 -o - -triple=i686-apple-darwin9 | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -O1 -o - -triple=i686-apple-darwin9 -std=c++11 | FileCheck %s
+
+// CHECK-DAG: @_ZN7PR180978constant1aE = global {{.*}} { i16 1, i8 6, i8 undef }, align 4
+// CHECK-DAG: @_ZN7PR180978constant1bE = global {{.*}} { i16 2, i8 6, i8 undef }, align 4
+// CHECK-DAG: @_ZN7PR180978constant1cE = global {{.*}} { i16 3, i8 6, i8 undef }, align 4
+// CHECK-DAG: @_ZN7PR180978constant1yE = global {{.*}} { {{.*}} { i16 4, i8 6, i8 undef }, i32 5 }, align 4
+
struct A {
_Atomic(int) i;
A(int j);
@@ -46,3 +52,51 @@ struct AtomicBoolMember {
// CHECK-NEXT: ret void
AtomicBoolMember::AtomicBoolMember(bool b) : ab(b) { }
+namespace PR18097 {
+ namespace dynamic {
+ struct X {
+ X(int);
+ short n;
+ char c;
+ };
+
+ // CHECK-LABEL: define {{.*}} @__cxx_global_var_init
+ // CHECK: call void @_ZN7PR180977dynamic1XC1Ei({{.*}}* @_ZN7PR180977dynamic1aE, i32 1)
+ _Atomic(X) a = X(1);
+
+ // CHECK-LABEL: define {{.*}} @__cxx_global_var_init
+ // CHECK: call void @_ZN7PR180977dynamic1XC1Ei({{.*}}* @_ZN7PR180977dynamic1bE, i32 2)
+ _Atomic(X) b(X(2));
+
+ // CHECK-LABEL: define {{.*}} @__cxx_global_var_init
+ // CHECK: call void @_ZN7PR180977dynamic1XC1Ei({{.*}}* @_ZN7PR180977dynamic1cE, i32 3)
+ _Atomic(X) c{X(3)};
+
+ struct Y {
+ _Atomic(X) a;
+ _Atomic(int) b;
+ };
+ // CHECK-LABEL: define {{.*}} @__cxx_global_var_init
+ // CHECK: call void @_ZN7PR180977dynamic1XC1Ei({{.*}}* getelementptr inbounds ({{.*}}* @_ZN7PR180977dynamic1yE, i32 0, i32 0), i32 4)
+ // CHECK: store i32 5, i32* getelementptr inbounds ({{.*}}* @_ZN7PR180977dynamic1yE, i32 0, i32 1)
+ Y y = { X(4), 5 };
+ }
+
+ // CHECKs at top of file.
+ namespace constant {
+ struct X {
+ constexpr X(int n) : n(n) {}
+ short n;
+ char c = 6;
+ };
+ _Atomic(X) a = X(1);
+ _Atomic(X) b(X(2));
+ _Atomic(X) c{X(3)};
+
+ struct Y {
+ _Atomic(X) a;
+ _Atomic(int) b;
+ };
+ Y y = { X(4), 5 };
+ }
+}
diff --git a/test/CodeGenCXX/attr-cleanup.cpp b/test/CodeGenCXX/attr-cleanup.cpp
index ff15b03de57c..18a7798481e9 100644
--- a/test/CodeGenCXX/attr-cleanup.cpp
+++ b/test/CodeGenCXX/attr-cleanup.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s
namespace N {
void free(void *i) {}
diff --git a/test/CodeGenCXX/attr-used.cpp b/test/CodeGenCXX/attr-used.cpp
index 2c82184081b9..861734667357 100644
--- a/test/CodeGenCXX/attr-used.cpp
+++ b/test/CodeGenCXX/attr-used.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s
// <rdar://problem/8684363>: clang++ not respecting __attribute__((used)) on destructors
struct X0 {
@@ -7,3 +7,21 @@ struct X0 {
// CHECK: define linkonce_odr {{.*}} @_ZN2X0D1Ev
__attribute__((used)) ~X0() {}
};
+
+// PR19743: not emitting __attribute__((used)) inline methods in nested classes.
+struct X1 {
+ struct Nested {
+ // CHECK: define linkonce_odr {{.*}} @_ZN2X16Nested1fEv
+ void __attribute__((used)) f() {}
+ };
+};
+
+struct X2 {
+ // We must delay emission of bar() until foo() has had its body parsed,
+ // otherwise foo() would not be emitted.
+ void __attribute__((used)) bar() { foo(); }
+ void foo() { }
+
+ // CHECK: define linkonce_odr {{.*}} @_ZN2X23barEv
+ // CHECK: define linkonce_odr {{.*}} @_ZN2X23fooEv
+};
diff --git a/test/CodeGenCXX/bitfield-layout.cpp b/test/CodeGenCXX/bitfield-layout.cpp
index 646300a7d1cb..46f41111a1de 100644
--- a/test/CodeGenCXX/bitfield-layout.cpp
+++ b/test/CodeGenCXX/bitfield-layout.cpp
@@ -12,7 +12,7 @@ union Test2 {
int : 6;
} t2;
-// CHECK-LP64: %union.Test3 = type { [2 x i8] }
+// CHECK-LP64: %union.Test3 = type { i16 }
union Test3 {
int : 9;
} t3;
diff --git a/test/CodeGenCXX/bitfield.cpp b/test/CodeGenCXX/bitfield.cpp
index 2c454b0c072c..fafeffe1ed23 100644
--- a/test/CodeGenCXX/bitfield.cpp
+++ b/test/CodeGenCXX/bitfield.cpp
@@ -298,7 +298,7 @@ namespace N4 {
#endif
unsigned read(Base* s) {
// FIXME: We should widen this load as long as the function isn't being
- // instrumented by thread-sanitizer.
+ // instrumented by ThreadSanitizer.
//
// CHECK-X86-64-LABEL: define i32 @_ZN2N44read
// CHECK-X86-64: %[[gep:.*]] = getelementptr inbounds {{.*}}* %{{.*}}, i32 0, i32 1
@@ -378,8 +378,8 @@ namespace N6 {
// Zero-length bitfields partition the memory locations of bitfields for the
// purposes of the memory model. That means stores must not span zero-length
// bitfields and loads may only span them when we are not instrumenting with
- // thread sanitizer.
- // FIXME: We currently don't widen loads even without thread sanitizer, even
+ // ThreadSanitizer.
+ // FIXME: We currently don't widen loads even without ThreadSanitizer, even
// though we could.
struct S {
unsigned b1 : 24;
@@ -426,3 +426,55 @@ namespace N6 {
s->b2 = x;
}
}
+
+namespace N7 {
+ // Similar to N4 except that this adds a virtual base to the picture. (PR18430)
+ // Do NOT widen loads and stores to bitfields into padding at the end of
+ // a class which might end up with members inside of it when inside a derived
+ // class.
+ struct B1 {
+ virtual void f();
+ unsigned b1 : 24;
+ };
+ struct B2 : virtual B1 {
+ virtual ~B2();
+ unsigned b : 24;
+ };
+ // Imagine some other translation unit introduces:
+#if 0
+ struct Derived : public B2 {
+ char c;
+ };
+#endif
+ unsigned read(B2* s) {
+ // FIXME: We should widen this load as long as the function isn't being
+ // instrumented by ThreadSanitizer.
+ //
+ // CHECK-X86-64-LABEL: define i32 @_ZN2N74read
+ // CHECK-X86-64: %[[gep:.*]] = getelementptr inbounds {{.*}}* %{{.*}}, i32 0, i32 1
+ // CHECK-X86-64: %[[ptr:.*]] = bitcast [3 x i8]* %[[gep]] to i24*
+ // CHECK-X86-64: %[[val:.*]] = load i24* %[[ptr]]
+ // CHECK-X86-64: %[[ext:.*]] = zext i24 %[[val]] to i32
+ // CHECK-X86-64: ret i32 %[[ext]]
+ // CHECK-PPC64-LABEL: define zeroext i32 @_ZN2N74read
+ // CHECK-PPC64: %[[gep:.*]] = getelementptr inbounds {{.*}}* %{{.*}}, i32 0, i32 1
+ // CHECK-PPC64: %[[ptr:.*]] = bitcast [3 x i8]* %[[gep]] to i24*
+ // CHECK-PPC64: %[[val:.*]] = load i24* %[[ptr]]
+ // CHECK-PPC64: %[[ext:.*]] = zext i24 %[[val]] to i32
+ // CHECK-PPC64: ret i32 %[[ext]]
+ return s->b;
+ }
+ void write(B2* s, unsigned x) {
+ // CHECK-X86-64-LABEL: define void @_ZN2N75write
+ // CHECK-X86-64: %[[gep:.*]] = getelementptr inbounds {{.*}}* %{{.*}}, i32 0, i32 1
+ // CHECK-X86-64: %[[ptr:.*]] = bitcast [3 x i8]* %[[gep]] to i24*
+ // CHECK-X86-64: %[[new:.*]] = trunc i32 %{{.*}} to i24
+ // CHECK-X86-64: store i24 %[[new]], i24* %[[ptr]]
+ // CHECK-PPC64-LABEL: define void @_ZN2N75write
+ // CHECK-PPC64: %[[gep:.*]] = getelementptr inbounds {{.*}}* %{{.*}}, i32 0, i32 1
+ // CHECK-PPC64: %[[ptr:.*]] = bitcast [3 x i8]* %[[gep]] to i24*
+ // CHECK-PPC64: %[[new:.*]] = trunc i32 %{{.*}} to i24
+ // CHECK-PPC64: store i24 %[[new]], i24* %[[ptr]]
+ s->b = x;
+ }
+}
diff --git a/test/CodeGenCXX/block-byref-cxx-objc.cpp b/test/CodeGenCXX/block-byref-cxx-objc.cpp
index 616fd67ccc38..5c35ad72a20d 100644
--- a/test/CodeGenCXX/block-byref-cxx-objc.cpp
+++ b/test/CodeGenCXX/block-byref-cxx-objc.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - -fblocks | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - -fblocks | FileCheck %s
// rdar://8594790
struct A {
diff --git a/test/CodeGenCXX/block-in-ctor-dtor.cpp b/test/CodeGenCXX/block-in-ctor-dtor.cpp
index bd37d4418d4f..0dc0ab00437f 100644
--- a/test/CodeGenCXX/block-in-ctor-dtor.cpp
+++ b/test/CodeGenCXX/block-in-ctor-dtor.cpp
@@ -40,9 +40,9 @@ X::~X() {
// CHECK-LABEL: define internal void @___ZN4ZoneC2Ev_block_invoke_
// CHECK-LABEL: define internal void @___ZN4ZoneD2Ev_block_invoke
// CHECK-LABEL: define internal void @___ZN4ZoneD2Ev_block_invoke_
-// CHECK-LABEL: define internal void @___ZN1XC1Ev_block_invoke
-// CHECK-LABEL: define internal void @___ZN1XC1Ev_block_invoke_
// CHECK-LABEL: define internal void @___ZN1XC2Ev_block_invoke
// CHECK-LABEL: define internal void @___ZN1XC2Ev_block_invoke_
+// CHECK-LABEL: define internal void @___ZN1XC1Ev_block_invoke
+// CHECK-LABEL: define internal void @___ZN1XC1Ev_block_invoke_
// CHECK-LABEL: define internal void @___ZN1XD2Ev_block_invoke
// CHECK-LABEL: define internal void @___ZN1XD2Ev_block_invoke_
diff --git a/test/CodeGenCXX/block.cpp b/test/CodeGenCXX/block.cpp
index 619d8b0c7ba4..aa356688dd63 100644
--- a/test/CodeGenCXX/block.cpp
+++ b/test/CodeGenCXX/block.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - -fblocks
+// RUN: %clang_cc1 %s -triple %itanium_abi_triple -emit-llvm -o - -fblocks
+// RUN: %clang_cc1 %s -triple %ms_abi_triple -fno-rtti -emit-llvm -o - -fblocks
// Just test that this doesn't crash the compiler...
void func(void*);
diff --git a/test/CodeGenCXX/blocks-cxx11.cpp b/test/CodeGenCXX/blocks-cxx11.cpp
index 9ff5826ec5f1..10d1c655d1f9 100644
--- a/test/CodeGenCXX/blocks-cxx11.cpp
+++ b/test/CodeGenCXX/blocks-cxx11.cpp
@@ -106,7 +106,7 @@ namespace test_block_in_lambda {
// CHECK: [[TO_DESTROY:%.*]] = getelementptr inbounds [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
// CHECK: [[T0:%.*]] = getelementptr inbounds [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
// CHECK-NEXT: [[T1:%.*]] = getelementptr inbounds [[LAMBDA_T]]* [[THIS]], i32 0, i32 0
- // CHECK-NEXT: call void @_ZN20test_block_in_lambda1AC1ERKS0_({{.*}}* [[T0]], {{.*}}* [[T1]])
+ // CHECK-NEXT: call void @_ZN20test_block_in_lambda1AC1ERKS0_({{.*}}* [[T0]], {{.*}}* dereferenceable({{[0-9]+}}) [[T1]])
// CHECK-NEXT: [[T0:%.*]] = bitcast [[BLOCK_T]]* [[BLOCK]] to void ()*
// CHECK-NEXT: call void @_ZN20test_block_in_lambda9takeBlockEU13block_pointerFvvE(void ()* [[T0]])
// CHECK-NEXT: call void @_ZN20test_block_in_lambda1AD1Ev({{.*}}* [[TO_DESTROY]])
diff --git a/test/CodeGenCXX/blocks.cpp b/test/CodeGenCXX/blocks.cpp
index 8a6fdacf8d1f..6b11083ad739 100644
--- a/test/CodeGenCXX/blocks.cpp
+++ b/test/CodeGenCXX/blocks.cpp
@@ -164,7 +164,7 @@ namespace test5 {
// CHECK-NOT: br
// CHECK: [[CAPTURE:%.*]] = getelementptr inbounds [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
- // CHECK-NEXT: call void @_ZN5test51AC1ERKS0_([[A]]* [[CAPTURE]], [[A]]* [[X]])
+ // CHECK-NEXT: call void @_ZN5test51AC1ERKS0_([[A]]* [[CAPTURE]], [[A]]* dereferenceable({{[0-9]+}}) [[X]])
// CHECK-NEXT: store i1 true, i1* [[CLEANUP_ACTIVE]]
// CHECK-NEXT: bitcast [[BLOCK_T]]* [[BLOCK]] to void ()*
// CHECK-NEXT: br label
diff --git a/test/CodeGenCXX/c-linkage.cpp b/test/CodeGenCXX/c-linkage.cpp
index 1607623c6fea..2f8729e4971a 100644
--- a/test/CodeGenCXX/c-linkage.cpp
+++ b/test/CodeGenCXX/c-linkage.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s
// pr6644
extern "C" {
@@ -10,7 +10,7 @@ extern "C" {
}
}
-// CHECK-LABEL: define void @_ZN1N1X1fEv
+// CHECK-LABEL: define {{.*}}void @_ZN1N1X1fEv
extern "C" {
static void test2_f() {
diff --git a/test/CodeGenCXX/call-arg-zero-temp.cpp b/test/CodeGenCXX/call-arg-zero-temp.cpp
index 14238f214515..beef2fd94a23 100644
--- a/test/CodeGenCXX/call-arg-zero-temp.cpp
+++ b/test/CodeGenCXX/call-arg-zero-temp.cpp
@@ -1,4 +1,4 @@
-// REQUIRES: x86-registered-target,x86-64-registered-target
+// REQUIRES: x86-registered-target
// RUN: %clang_cc1 -triple x86_64-apple-darwin -S %s -o %t-64.s
// RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s
// RUN: %clang_cc1 -triple i386-apple-darwin -S %s -o %t-32.s
diff --git a/test/CodeGenCXX/captured-statements.cpp b/test/CodeGenCXX/captured-statements.cpp
index 2843c2b69c95..fb35446c7e98 100644
--- a/test/CodeGenCXX/captured-statements.cpp
+++ b/test/CodeGenCXX/captured-statements.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o %t
+// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -emit-llvm %s -o %t
// RUN: FileCheck %s -input-file=%t -check-prefix=CHECK-1
// RUN: FileCheck %s -input-file=%t -check-prefix=CHECK-2
// RUN: FileCheck %s -input-file=%t -check-prefix=CHECK-3
diff --git a/test/CodeGenCXX/cast-conversion.cpp b/test/CodeGenCXX/cast-conversion.cpp
index 5565f6548437..ce8f82089e1a 100644
--- a/test/CodeGenCXX/cast-conversion.cpp
+++ b/test/CodeGenCXX/cast-conversion.cpp
@@ -1,8 +1,7 @@
-// REQUIRES: x86-registered-target,x86-64-registered-target
-// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -S %s -o %t-64.s
-// RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s
-// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -S %s -o %t-32.s
-// RUN: FileCheck -check-prefix CHECK-LP32 --input-file=%t-32.s %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | \
+// RUN: FileCheck %s
+// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -emit-llvm %s -o - | \
+// RUN: FileCheck %s
struct A {
A(int);
@@ -18,16 +17,9 @@ int main () {
static_cast<B>(10);
}
-// CHECK-LP64: callq __ZN1AC1Ei
-// CHECK-LP64: callq __ZN1BC1E1A
-// CHECK-LP64: callq __ZN1AC1Ei
-// CHECK-LP64: callq __ZN1BC1E1A
-// CHECK-LP64: callq __ZN1AC1Ei
-// CHECK-LP64: callq __ZN1BC1E1A
-
-// CHECK-LP32: calll L__ZN1AC1Ei
-// CHECK-LP32: calll L__ZN1BC1E1A
-// CHECK-LP32: calll L__ZN1AC1Ei
-// CHECK-LP32: calll L__ZN1BC1E1A
-// CHECK-LP32: calll L__ZN1AC1Ei
-// CHECK-LP32: calll L__ZN1BC1E1A
+// CHECK: call void @_ZN1AC1Ei
+// CHECK: call void @_ZN1BC1E1A
+// CHECK: call void @_ZN1AC1Ei
+// CHECK: call void @_ZN1BC1E1A
+// CHECK: call void @_ZN1AC1Ei
+// CHECK: call void @_ZN1BC1E1A
diff --git a/test/CodeGenCXX/catch-undef-behavior.cpp b/test/CodeGenCXX/catch-undef-behavior.cpp
index 338da57f0c7b..333855d0ba61 100644
--- a/test/CodeGenCXX/catch-undef-behavior.cpp
+++ b/test/CodeGenCXX/catch-undef-behavior.cpp
@@ -1,4 +1,6 @@
// RUN: %clang_cc1 -std=c++11 -fsanitize=signed-integer-overflow,integer-divide-by-zero,float-divide-by-zero,shift,unreachable,return,vla-bound,alignment,null,vptr,object-size,float-cast-overflow,bool,enum,array-bounds,function -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -fsanitize=vptr,address -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s --check-prefix=CHECK-ASAN
+// RUN: %clang_cc1 -std=c++11 -fsanitize=vptr -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s --check-prefix=DOWNCAST-NULL
struct S {
double d;
@@ -6,9 +8,15 @@ struct S {
virtual int f();
};
+// Check that type descriptor global is not modified by ASan.
+// CHECK-ASAN: [[TYPE_DESCR:@[0-9]+]] = private unnamed_addr constant { i16, i16, [4 x i8] } { i16 -1, i16 0, [4 x i8] c"'S'\00" }
+
+// Check that type mismatch handler is not modified by ASan.
+// CHECK-ASAN: private unnamed_addr global { { [{{.*}} x i8]*, i32, i32 }, { i16, i16, [4 x i8] }*, i8*, i8 } { {{.*}}, { i16, i16, [4 x i8] }* [[TYPE_DESCR]], {{.*}} }
+
struct T : S {};
-// CHECK: @_Z17reference_binding
+// CHECK-LABEL: @_Z17reference_binding
void reference_binding(int *p, S *q) {
// C++ core issue 453: If an lvalue to which a reference is directly bound
// designates neither an existing object or function of an appropriate type,
@@ -30,7 +38,8 @@ void reference_binding(int *p, S *q) {
S &r2 = *q;
}
-// CHECK: @_Z13member_access
+// CHECK-LABEL: @_Z13member_access
+// CHECK-ASAN-LABEL: @_Z13member_access
void member_access(S *p) {
// (1a) Check 'p' is appropriately sized and aligned for member access.
@@ -117,7 +126,7 @@ void member_access(S *p) {
k = p->f();
}
-// CHECK: @_Z12lsh_overflow
+// CHECK-LABEL: @_Z12lsh_overflow
int lsh_overflow(int a, int b) {
// CHECK: %[[INBOUNDS:.*]] = icmp ule i32 %[[RHS:.*]], 31
// CHECK-NEXT: br i1 %[[INBOUNDS]]
@@ -142,13 +151,13 @@ int lsh_overflow(int a, int b) {
return a << b;
}
-// CHECK: @_Z9no_return
+// CHECK-LABEL: @_Z9no_return
int no_return() {
// CHECK: call void @__ubsan_handle_missing_return(i8* bitcast ({{.*}}* @{{.*}} to i8*)) [[NR_NUW:#[0-9]+]]
// CHECK-NEXT: unreachable
}
-// CHECK: @_Z9sour_bool
+// CHECK-LABEL: @_Z9sour_bool
bool sour_bool(bool *p) {
// CHECK: %[[OK:.*]] = icmp ule i8 {{.*}}, 1
// CHECK: br i1 %[[OK]]
@@ -160,7 +169,7 @@ enum E1 { e1a = 0, e1b = 127 } e1;
enum E2 { e2a = -1, e2b = 64 } e2;
enum E3 { e3a = (1u << 31) - 1 } e3;
-// CHECK: @_Z14bad_enum_value
+// CHECK-LABEL: @_Z14bad_enum_value
int bad_enum_value() {
// CHECK: %[[E1:.*]] = icmp ule i32 {{.*}}, 127
// CHECK: br i1 %[[E1]]
@@ -181,11 +190,16 @@ int bad_enum_value() {
return a + b + c;
}
-// CHECK: @_Z20bad_downcast_pointer
+// CHECK-LABEL: @_Z20bad_downcast_pointer
+// DOWNCAST-NULL-LABEL: @_Z20bad_downcast_pointer
void bad_downcast_pointer(S *p) {
// CHECK: %[[NONNULL:.*]] = icmp ne {{.*}}, null
// CHECK: br i1 %[[NONNULL]],
+ // A null poiner access is guarded without -fsanitize=null.
+ // DOWNCAST-NULL: %[[NONNULL:.*]] = icmp ne {{.*}}, null
+ // DOWNCAST-NULL: br i1 %[[NONNULL]],
+
// CHECK: %[[SIZE:.*]] = call i64 @llvm.objectsize.i64.p0i8(
// CHECK: %[[E1:.*]] = icmp uge i64 %[[SIZE]], 24
// CHECK: %[[MISALIGN:.*]] = and i64 %{{.*}}, 7
@@ -203,7 +217,7 @@ void bad_downcast_pointer(S *p) {
(void) static_cast<T*>(p);
}
-// CHECK: @_Z22bad_downcast_reference
+// CHECK-LABEL: @_Z22bad_downcast_reference
void bad_downcast_reference(S &p) {
// CHECK: %[[E1:.*]] = icmp ne {{.*}}, null
// CHECK-NOT: br i1
@@ -225,7 +239,7 @@ void bad_downcast_reference(S &p) {
(void) static_cast<T&>(p);
}
-// CHECK: @_Z11array_index
+// CHECK-LABEL: @_Z11array_index
int array_index(const int (&a)[4], int n) {
// CHECK: %[[K1_OK:.*]] = icmp ult i64 %{{.*}}, 4
// CHECK: br i1 %[[K1_OK]]
@@ -250,7 +264,7 @@ int array_index(const int (&a)[4], int n) {
return k1 + *r1 + k2;
}
-// CHECK: @_Z17multi_array_index
+// CHECK-LABEL: @_Z17multi_array_index
int multi_array_index(int n, int m) {
int arr[4][6];
@@ -264,7 +278,7 @@ int multi_array_index(int n, int m) {
return arr[n][m];
}
-// CHECK: @_Z11array_arith
+// CHECK-LABEL: @_Z11array_arith
int array_arith(const int (&a)[4], int n) {
// CHECK: %[[K1_OK:.*]] = icmp ule i64 %{{.*}}, 4
// CHECK: br i1 %[[K1_OK]]
@@ -283,7 +297,7 @@ struct ArrayMembers {
int a1[5];
int a2[1];
};
-// CHECK: @_Z18struct_array_index
+// CHECK-LABEL: @_Z18struct_array_index
int struct_array_index(ArrayMembers *p, int n) {
// CHECK: %[[IDX_OK:.*]] = icmp ult i64 %{{.*}}, 5
// CHECK: br i1 %[[IDX_OK]]
@@ -291,21 +305,21 @@ int struct_array_index(ArrayMembers *p, int n) {
return p->a1[n];
}
-// CHECK: @_Z16flex_array_index
+// CHECK-LABEL: @_Z16flex_array_index
int flex_array_index(ArrayMembers *p, int n) {
// CHECK-NOT: call void @__ubsan_handle_out_of_bounds(
return p->a2[n];
}
extern int incomplete[];
-// CHECK: @_Z22incomplete_array_index
+// CHECK-LABEL: @_Z22incomplete_array_index
int incomplete_array_index(int n) {
// CHECK-NOT: call void @__ubsan_handle_out_of_bounds(
return incomplete[n];
}
typedef __attribute__((ext_vector_type(4))) int V4I;
-// CHECK: @_Z12vector_index
+// CHECK-LABEL: @_Z12vector_index
int vector_index(V4I v, int n) {
// CHECK: %[[IDX_OK:.*]] = icmp ult i64 %{{.*}}, 4
// CHECK: br i1 %[[IDX_OK]]
@@ -313,7 +327,7 @@ int vector_index(V4I v, int n) {
return v[n];
}
-// CHECK: @_Z12string_index
+// CHECK-LABEL: @_Z12string_index
char string_index(int n) {
// CHECK: %[[IDX_OK:.*]] = icmp ult i64 %{{.*}}, 6
// CHECK: br i1 %[[IDX_OK]]
@@ -357,7 +371,7 @@ void downcast_pointer(B *b) {
// CHECK-NEXT: br i1 [[AND]]
}
-// CHECK-LABEL: define void @_Z18downcast_referenceR1B(%class.B* %b)
+// CHECK-LABEL: define void @_Z18downcast_referenceR1B(%class.B* dereferenceable({{[0-9]+}}) %b)
void downcast_reference(B &b) {
(void) static_cast<C&>(b);
// Alignment check from EmitTypeCheck(TCK_DowncastReference, ...)
diff --git a/test/CodeGenCXX/class-layout.cpp b/test/CodeGenCXX/class-layout.cpp
index 21e1a2b40f04..d7d84a86abad 100644
--- a/test/CodeGenCXX/class-layout.cpp
+++ b/test/CodeGenCXX/class-layout.cpp
@@ -39,7 +39,7 @@ namespace Test5 {
char a;
};
- // CHECK: %"struct.Test5::B" = type { [9 x i8], i8, i8, [5 x i8] }
+ // CHECK: %"struct.Test5::B" = type { %"struct.Test5::A.base", i8, i8, [5 x i8] }
struct B : A {
char b : 1;
char c;
@@ -91,3 +91,12 @@ namespace Test7 {
B* b;
#pragma pack ()
}
+
+// Shouldn't crash.
+namespace Test8 {
+ struct A {};
+ struct D { int a; };
+ struct B : virtual D, A { };
+ struct C : B, A { void f() {} };
+ C c;
+}
diff --git a/test/CodeGenCXX/conditional-gnu-ext.cpp b/test/CodeGenCXX/conditional-gnu-ext.cpp
index 44ebf9808e4a..3a61a63cf449 100644
--- a/test/CodeGenCXX/conditional-gnu-ext.cpp
+++ b/test/CodeGenCXX/conditional-gnu-ext.cpp
@@ -83,7 +83,7 @@ namespace test3 {
// CHECK-NEXT: [[T0:%.*]] = load [[B]]** [[X]]
// CHECK-NEXT: [[BOOL:%.*]] = call zeroext i1 @_ZN5test31BcvbEv([[B]]* [[T0]])
// CHECK-NEXT: br i1 [[BOOL]]
- // CHECK: call void @_ZN5test31BC1ERKS0_([[B]]* [[RESULT:%.*]], [[B]]* [[T0]])
+ // CHECK: call void @_ZN5test31BC1ERKS0_([[B]]* [[RESULT:%.*]], [[B]]* dereferenceable({{[0-9]+}}) [[T0]])
// CHECK-NEXT: br label
// CHECK: call void @_ZN5test31BC1Ev([[B]]* [[RESULT]])
// CHECK-NEXT: br label
@@ -97,7 +97,7 @@ namespace test3 {
// CHECK-NEXT: call void @_ZN5test312test1_helperEv([[B]]* sret [[TEMP]])
// CHECK-NEXT: [[BOOL:%.*]] = call zeroext i1 @_ZN5test31BcvbEv([[B]]* [[TEMP]])
// CHECK-NEXT: br i1 [[BOOL]]
- // CHECK: call void @_ZN5test31BC1ERKS0_([[B]]* [[RESULT:%.*]], [[B]]* [[TEMP]])
+ // CHECK: call void @_ZN5test31BC1ERKS0_([[B]]* [[RESULT:%.*]], [[B]]* dereferenceable({{[0-9]+}}) [[TEMP]])
// CHECK-NEXT: br label
// CHECK: call void @_ZN5test31BC1Ev([[B]]* [[RESULT]])
// CHECK-NEXT: br label
diff --git a/test/CodeGenCXX/const-base-cast.cpp b/test/CodeGenCXX/const-base-cast.cpp
index 320c790c5e2d..dd980d5469bf 100644
--- a/test/CodeGenCXX/const-base-cast.cpp
+++ b/test/CodeGenCXX/const-base-cast.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s
// Check that the following construct, which is similar to one which occurs
// in Firefox, is folded correctly.
diff --git a/test/CodeGenCXX/const-global-linkage.cpp b/test/CodeGenCXX/const-global-linkage.cpp
index df78fdd0287c..e1e932197479 100644
--- a/test/CodeGenCXX/const-global-linkage.cpp
+++ b/test/CodeGenCXX/const-global-linkage.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
const int x = 10;
const int y = 20;
diff --git a/test/CodeGenCXX/const-init-cxx11.cpp b/test/CodeGenCXX/const-init-cxx11.cpp
index d21e91178e40..f671e0ad8802 100644
--- a/test/CodeGenCXX/const-init-cxx11.cpp
+++ b/test/CodeGenCXX/const-init-cxx11.cpp
@@ -382,17 +382,22 @@ namespace ArrayTemporary {
namespace UnemittedTemporaryDecl {
constexpr int &&ref = 0;
extern constexpr int &ref2 = ref;
- // CHECK: @_ZGRN22UnemittedTemporaryDecl3refE = private global i32 0
+ // CHECK: @_ZGRN22UnemittedTemporaryDecl3refE_ = private global i32 0
// FIXME: This declaration should not be emitted -- it isn't odr-used.
// CHECK: @_ZN22UnemittedTemporaryDecl3refE
- // CHECK: @_ZN22UnemittedTemporaryDecl4ref2E = constant i32* @_ZGRN22UnemittedTemporaryDecl3refE
+ // CHECK: @_ZN22UnemittedTemporaryDecl4ref2E = constant i32* @_ZGRN22UnemittedTemporaryDecl3refE_
}
// CHECK: @_ZZN12LocalVarInit3aggEvE1a = internal constant {{.*}} i32 101
// CHECK: @_ZZN12LocalVarInit4ctorEvE1a = internal constant {{.*}} i32 102
// CHECK: @_ZZN12LocalVarInit8mutable_EvE1a = private unnamed_addr constant {{.*}} i32 103
+// CHECK: @_ZGRN33ClassTemplateWithStaticDataMember1SIvE1aE_ = linkonce_odr constant i32 5
+// CHECK: @_ZN33ClassTemplateWithStaticDataMember3useE = constant i32* @_ZGRN33ClassTemplateWithStaticDataMember1SIvE1aE_
+// CHECK: @_ZGRN39ClassTemplateWithHiddenStaticDataMember1SIvE1aE_ = linkonce_odr hidden constant i32 5
+// CHECK: @_ZN39ClassTemplateWithHiddenStaticDataMember3useE = constant i32* @_ZGRN39ClassTemplateWithHiddenStaticDataMember1SIvE1aE_
+// CHECK: @_ZGRZN20InlineStaticConstRef3funEvE1i_ = linkonce_odr constant i32 10
// Constant initialization tests go before this point,
// dynamic initialization tests go after.
@@ -527,10 +532,10 @@ namespace InitFromConst {
// CHECK: call void @_ZN13InitFromConst7consumeIdEEvT_(double 4.300000e+00)
consume(d);
- // CHECK: call void @_ZN13InitFromConst7consumeIRKNS_1SEEEvT_(%"struct.InitFromConst::S"* @_ZN13InitFromConstL1sE)
+ // CHECK: call void @_ZN13InitFromConst7consumeIRKNS_1SEEEvT_(%"struct.InitFromConst::S"* dereferenceable({{[0-9]+}}) @_ZN13InitFromConstL1sE)
consume<const S&>(s);
- // CHECK: call void @_ZN13InitFromConst7consumeIRKNS_1SEEEvT_(%"struct.InitFromConst::S"* @_ZN13InitFromConstL1sE)
+ // CHECK: call void @_ZN13InitFromConst7consumeIRKNS_1SEEEvT_(%"struct.InitFromConst::S"* dereferenceable({{[0-9]+}}) @_ZN13InitFromConstL1sE)
consume<const S&>(r);
// CHECK: call void @_ZN13InitFromConst7consumeIPKNS_1SEEEvT_(%"struct.InitFromConst::S"* @_ZN13InitFromConstL1sE)
@@ -552,3 +557,32 @@ namespace Null {
// CHECK: call {{.*}} @_ZN4Null4nullEv(
int S::*q = null();
}
+
+namespace InlineStaticConstRef {
+ inline const int &fun() {
+ static const int &i = 10;
+ return i;
+ // CHECK: ret i32* @_ZGRZN20InlineStaticConstRef3funEvE1i_
+ }
+ const int &use = fun();
+}
+
+namespace ClassTemplateWithStaticDataMember {
+ template <typename T>
+ struct S {
+ static const int &a;
+ };
+ template <typename T>
+ const int &S<T>::a = 5;
+ const int &use = S<void>::a;
+}
+
+namespace ClassTemplateWithHiddenStaticDataMember {
+ template <typename T>
+ struct S {
+ __attribute__((visibility("hidden"))) static const int &a;
+ };
+ template <typename T>
+ const int &S<T>::a = 5;
+ const int &use = S<void>::a;
+}
diff --git a/test/CodeGenCXX/const-init-cxx1y.cpp b/test/CodeGenCXX/const-init-cxx1y.cpp
index 978c428e078a..9348b43f486f 100644
--- a/test/CodeGenCXX/const-init-cxx1y.cpp
+++ b/test/CodeGenCXX/const-init-cxx1y.cpp
@@ -1,4 +1,5 @@
-// RUN: not %clang_cc1 -verify -triple x86_64-apple-darwin -emit-llvm -o - %s -std=c++1y | FileCheck %s
+// RUN: %clang_cc1 -verify -triple x86_64-apple-darwin -emit-llvm -o - %s -std=c++1y | FileCheck %s
+// expected-no-diagnostics
struct A {
constexpr A() : n(1) {}
@@ -22,26 +23,64 @@ namespace ModifyStaticTemporary {
struct A { int &&temporary; int x; };
constexpr int f(int &r) { r *= 9; return r - 12; }
A a = { 6, f(a.temporary) };
- // CHECK: @_ZGRN21ModifyStaticTemporary1aE = private global i32 54
- // CHECK: @_ZN21ModifyStaticTemporary1aE = global {{.*}} i32* @_ZGRN21ModifyStaticTemporary1aE, i32 42
+ // CHECK: @_ZGRN21ModifyStaticTemporary1aE_ = private global i32 54
+ // CHECK: @_ZN21ModifyStaticTemporary1aE = global {{.*}} i32* @_ZGRN21ModifyStaticTemporary1aE_, i32 42
A b = { 7, ++b.temporary };
- // CHECK: @_ZGRN21ModifyStaticTemporary1bE = private global i32 8
- // CHECK: @_ZN21ModifyStaticTemporary1bE = global {{.*}} i32* @_ZGRN21ModifyStaticTemporary1bE, i32 8
+ // CHECK: @_ZGRN21ModifyStaticTemporary1bE_ = private global i32 8
+ // CHECK: @_ZN21ModifyStaticTemporary1bE = global {{.*}} i32* @_ZGRN21ModifyStaticTemporary1bE_, i32 8
// Can't emit all of 'c' as a constant here, so emit the initial value of
// 'c.temporary', not the value as modified by the partial evaluation within
// the initialization of 'c.x'.
A c = { 10, (++c.temporary, b.x) };
- // CHECK: @_ZGRN21ModifyStaticTemporary1cE = private global i32 10
+ // CHECK: @_ZGRN21ModifyStaticTemporary1cE_ = private global i32 10
// CHECK: @_ZN21ModifyStaticTemporary1cE = global {{.*}} zeroinitializer
}
+// CHECK: @_ZGRN28VariableTemplateWithConstRef1iIvEE_ = linkonce_odr constant i32 5, align 4
+// CHECK: @_ZN28VariableTemplateWithConstRef3useE = constant i32* @_ZGRN28VariableTemplateWithConstRef1iIvEE_
+namespace VariableTemplateWithConstRef {
+ template <typename T>
+ const int &i = 5;
+ const int &use = i<void>;
+}
+
+// CHECK: @_ZGRN34HiddenVariableTemplateWithConstRef1iIvEE_ = linkonce_odr hidden constant i32 5, align 4
+// CHECK: @_ZN34HiddenVariableTemplateWithConstRef3useE = constant i32* @_ZGRN34HiddenVariableTemplateWithConstRef1iIvEE_
+namespace HiddenVariableTemplateWithConstRef {
+ template <typename T>
+ __attribute__((visibility("hidden"))) const int &i = 5;
+ const int &use = i<void>;
+}
+
+// CHECK: @_ZGRN24VariableTemplateWithPack1sIJLi1ELi2ELi3ELi4EEEE1_ = linkonce_odr constant i32 1
+// CHECK: @_ZGRN24VariableTemplateWithPack1sIJLi1ELi2ELi3ELi4EEEE0_ = linkonce_odr global {{.*}} { i32* @_ZGRN24VariableTemplateWithPack1sIJLi1ELi2ELi3ELi4EEEE1_ }
+// CHECK: @_ZGRN24VariableTemplateWithPack1sIJLi1ELi2ELi3ELi4EEEE3_ = linkonce_odr constant i32 2
+// CHECK: @_ZGRN24VariableTemplateWithPack1sIJLi1ELi2ELi3ELi4EEEE2_ = linkonce_odr global {{.*}} { i32* @_ZGRN24VariableTemplateWithPack1sIJLi1ELi2ELi3ELi4EEEE3_ }
+// CHECK: @_ZGRN24VariableTemplateWithPack1sIJLi1ELi2ELi3ELi4EEEE5_ = linkonce_odr constant i32 3
+// CHECK: @_ZGRN24VariableTemplateWithPack1sIJLi1ELi2ELi3ELi4EEEE4_ = linkonce_odr global {{.*}} { i32* @_ZGRN24VariableTemplateWithPack1sIJLi1ELi2ELi3ELi4EEEE5_ }
+// CHECK: @_ZGRN24VariableTemplateWithPack1sIJLi1ELi2ELi3ELi4EEEE7_ = linkonce_odr constant i32 4
+// CHECK: @_ZGRN24VariableTemplateWithPack1sIJLi1ELi2ELi3ELi4EEEE6_ = linkonce_odr global {{.*}} { i32* @_ZGRN24VariableTemplateWithPack1sIJLi1ELi2ELi3ELi4EEEE7_ }
+// CHECK: @_ZGRN24VariableTemplateWithPack1sIJLi1ELi2ELi3ELi4EEEE_ = linkonce_odr global %"struct.VariableTemplateWithPack::S" { {{.*}}* @_ZGRN24VariableTemplateWithPack1sIJLi1ELi2ELi3ELi4EEEE0_, {{.*}}* @_ZGRN24VariableTemplateWithPack1sIJLi1ELi2ELi3ELi4EEEE2_, {{.*}}* @_ZGRN24VariableTemplateWithPack1sIJLi1ELi2ELi3ELi4EEEE4_, {{.*}}* @_ZGRN24VariableTemplateWithPack1sIJLi1ELi2ELi3ELi4EEEE6_ }
+// CHECK: @_ZN24VariableTemplateWithPack1pE = global {{.*}} @_ZGRN24VariableTemplateWithPack1sIJLi1ELi2ELi3ELi4EEEE_
+namespace VariableTemplateWithPack {
+ struct A {
+ const int &r;
+ };
+ struct S {
+ A &&a, &&b, &&c, &&d;
+ };
+ template <int... N>
+ S &&s = {A{N}...};
+ S *p = &s<1, 2, 3, 4>;
+}
+
// CHECK: __cxa_atexit({{.*}} @_ZN1BD1Ev {{.*}} @b
// CHECK: define
-// CHECK-NOT: @_ZGRN21ModifyStaticTemporary1cE
-// CHECK: store {{.*}} @_ZGRN21ModifyStaticTemporary1cE, {{.*}} @_ZN21ModifyStaticTemporary1cE
+// CHECK-NOT: @_ZGRN21ModifyStaticTemporary1cE_
+// CHECK: store {{.*}} @_ZGRN21ModifyStaticTemporary1cE_, {{.*}} @_ZN21ModifyStaticTemporary1cE
// CHECK: add
// CHECK: store
// CHECK: load {{.*}} @_ZN21ModifyStaticTemporary1bE
diff --git a/test/CodeGenCXX/constructor-attr.cpp b/test/CodeGenCXX/constructor-attr.cpp
index 4f6d635e95d1..468ce36688f7 100644
--- a/test/CodeGenCXX/constructor-attr.cpp
+++ b/test/CodeGenCXX/constructor-attr.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
// CHECK: @llvm.global_ctors
diff --git a/test/CodeGenCXX/constructor-conversion.cpp b/test/CodeGenCXX/constructor-conversion.cpp
index ebb414da960b..bace54fc596d 100644
--- a/test/CodeGenCXX/constructor-conversion.cpp
+++ b/test/CodeGenCXX/constructor-conversion.cpp
@@ -1,8 +1,7 @@
-// REQUIRES: x86-registered-target,x86-64-registered-target
-// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -S %s -o %t-64.s
-// RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s
-// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -S %s -o %t-32.s
-// RUN: FileCheck -check-prefix CHECK-LP32 --input-file=%t-32.s %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | \
+// RUN: FileCheck %s
+// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -emit-llvm %s -o - | \
+// RUN: FileCheck %s
extern "C" int printf(...);
@@ -46,10 +45,6 @@ int main() {
g(3); // g(X(3))
}
-// CHECK-LP64: callq __ZN1XC1Ei
-// CHECK-LP64: callq __ZN1XC1EPKci
-// CHECK-LP64: callq __ZN1XC1Ev
-
-// CHECK-LP32: calll L__ZN1XC1Ei
-// CHECK-LP32: calll L__ZN1XC1EPKci
-// CHECK-LP32: calll L__ZN1XC1Ev
+// CHECK: call void @_ZN1XC1Ei
+// CHECK: call void @_ZN1XC1EPKci
+// CHECK: call void @_ZN1XC1Ev
diff --git a/test/CodeGenCXX/constructor-default-arg.cpp b/test/CodeGenCXX/constructor-default-arg.cpp
index c2cf44ce810c..98a586494dd0 100644
--- a/test/CodeGenCXX/constructor-default-arg.cpp
+++ b/test/CodeGenCXX/constructor-default-arg.cpp
@@ -1,8 +1,7 @@
-// REQUIRES: x86-registered-target,x86-64-registered-target
-// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -S %s -o %t-64.s
-// RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s
-// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -S %s -o %t-32.s
-// RUN: FileCheck -check-prefix CHECK-LP32 --input-file=%t-32.s %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | \
+// RUN: FileCheck %s
+// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -emit-llvm %s -o - | \
+// RUN: FileCheck %s
extern "C" int printf(...);
@@ -31,10 +30,6 @@ int main() {
X d(a, 5, 6);
}
-// CHECK-LP64: callq __ZN1XC1ERKS_iii
-// CHECK-LP64: callq __ZN1XC1ERKS_iii
-// CHECK-LP64: callq __ZN1XC1ERKS_iii
-
-// CHECK-LP32: calll L__ZN1XC1ERKS_iii
-// CHECK-LP32: calll L__ZN1XC1ERKS_iii
-// CHECK-LP32: calll L__ZN1XC1ERKS_iii
+// CHECK: call void @_ZN1XC1ERKS_iii
+// CHECK: call void @_ZN1XC1ERKS_iii
+// CHECK: call void @_ZN1XC1ERKS_iii
diff --git a/test/CodeGenCXX/constructor-destructor-return-this.cpp b/test/CodeGenCXX/constructor-destructor-return-this.cpp
index ea2ea45a3273..ce6ddd29f644 100644
--- a/test/CodeGenCXX/constructor-destructor-return-this.cpp
+++ b/test/CodeGenCXX/constructor-destructor-return-this.cpp
@@ -1,6 +1,7 @@
//RUN: %clang_cc1 %s -emit-llvm -o - -triple=i686-unknown-linux | FileCheck --check-prefix=CHECKGEN %s
-//RUN: %clang_cc1 %s -emit-llvm -o - -triple=thumbv7-apple-ios3.0 -target-abi apcs-gnu | FileCheck --check-prefix=CHECKARM %s
-//RUN: %clang_cc1 %s -emit-llvm -o - -triple=i386-pc-win32 -cxx-abi microsoft -fno-rtti | FileCheck --check-prefix=CHECKMS %s
+//RUN: %clang_cc1 %s -emit-llvm -o - -triple=thumbv7-apple-ios6.0 -target-abi apcs-gnu | FileCheck --check-prefix=CHECKARM %s
+//RUN: %clang_cc1 %s -emit-llvm -o - -triple=thumbv7-apple-ios5.0 -target-abi apcs-gnu | FileCheck --check-prefix=CHECKIOS5 %s
+//RUN: %clang_cc1 %s -emit-llvm -o - -triple=i386-pc-win32 -fno-rtti | FileCheck --check-prefix=CHECKMS %s
// FIXME: these tests crash on the bots when run with -triple=x86_64-pc-win32
// Make sure we attach the 'returned' attribute to the 'this' parameter of
@@ -27,15 +28,20 @@ private:
B::B(int *i) : i_(i) { }
B::~B() { }
-// CHECKGEN-LABEL: define void @_ZN1BC1EPi(%class.B* %this, i32* %i)
// CHECKGEN-LABEL: define void @_ZN1BC2EPi(%class.B* %this, i32* %i)
-// CHECKGEN-LABEL: define void @_ZN1BD1Ev(%class.B* %this)
+// CHECKGEN-LABEL: define void @_ZN1BC1EPi(%class.B* %this, i32* %i)
// CHECKGEN-LABEL: define void @_ZN1BD2Ev(%class.B* %this)
+// CHECKGEN-LABEL: define void @_ZN1BD1Ev(%class.B* %this)
-// CHECKARM-LABEL: define %class.B* @_ZN1BC1EPi(%class.B* returned %this, i32* %i)
// CHECKARM-LABEL: define %class.B* @_ZN1BC2EPi(%class.B* returned %this, i32* %i)
-// CHECKARM-LABEL: define %class.B* @_ZN1BD1Ev(%class.B* returned %this)
+// CHECKARM-LABEL: define %class.B* @_ZN1BC1EPi(%class.B* returned %this, i32* %i)
// CHECKARM-LABEL: define %class.B* @_ZN1BD2Ev(%class.B* returned %this)
+// CHECKARM-LABEL: define %class.B* @_ZN1BD1Ev(%class.B* returned %this)
+
+// CHECKIOS5-LABEL: define %class.B* @_ZN1BC2EPi(%class.B* %this, i32* %i)
+// CHECKIOS5-LABEL: define %class.B* @_ZN1BC1EPi(%class.B* %this, i32* %i)
+// CHECKIOS5-LABEL: define %class.B* @_ZN1BD2Ev(%class.B* %this)
+// CHECKIOS5-LABEL: define %class.B* @_ZN1BD1Ev(%class.B* %this)
// CHECKMS-LABEL: define x86_thiscallcc %class.B* @"\01??0B@@QAE@PAH@Z"(%class.B* returned %this, i32* %i)
// CHECKMS-LABEL: define x86_thiscallcc void @"\01??1B@@QAE@XZ"(%class.B* %this)
@@ -51,17 +57,23 @@ private:
C::C(int *i, char *c) : B(i), c_(c) { }
C::~C() { }
-// CHECKGEN-LABEL: define void @_ZN1CC1EPiPc(%class.C* %this, i32* %i, i8* %c)
// CHECKGEN-LABEL: define void @_ZN1CC2EPiPc(%class.C* %this, i32* %i, i8* %c)
-// CHECKGEN-LABEL: define void @_ZN1CD0Ev(%class.C* %this)
-// CHECKGEN-LABEL: define void @_ZN1CD1Ev(%class.C* %this)
+// CHECKGEN-LABEL: define void @_ZN1CC1EPiPc(%class.C* %this, i32* %i, i8* %c)
// CHECKGEN-LABEL: define void @_ZN1CD2Ev(%class.C* %this)
+// CHECKGEN-LABEL: define void @_ZN1CD1Ev(%class.C* %this)
+// CHECKGEN-LABEL: define void @_ZN1CD0Ev(%class.C* %this)
-// CHECKARM-LABEL: define %class.C* @_ZN1CC1EPiPc(%class.C* returned %this, i32* %i, i8* %c)
// CHECKARM-LABEL: define %class.C* @_ZN1CC2EPiPc(%class.C* returned %this, i32* %i, i8* %c)
-// CHECKARM-LABEL: define void @_ZN1CD0Ev(%class.C* %this)
-// CHECKARM-LABEL: define %class.C* @_ZN1CD1Ev(%class.C* returned %this)
+// CHECKARM-LABEL: define %class.C* @_ZN1CC1EPiPc(%class.C* returned %this, i32* %i, i8* %c)
// CHECKARM-LABEL: define %class.C* @_ZN1CD2Ev(%class.C* returned %this)
+// CHECKARM-LABEL: define %class.C* @_ZN1CD1Ev(%class.C* returned %this)
+// CHECKARM-LABEL: define void @_ZN1CD0Ev(%class.C* %this)
+
+// CHECKIOS5-LABEL: define %class.C* @_ZN1CC2EPiPc(%class.C* %this, i32* %i, i8* %c)
+// CHECKIOS5-LABEL: define %class.C* @_ZN1CC1EPiPc(%class.C* %this, i32* %i, i8* %c)
+// CHECKIOS5-LABEL: define %class.C* @_ZN1CD2Ev(%class.C* %this)
+// CHECKIOS5-LABEL: define %class.C* @_ZN1CD1Ev(%class.C* %this)
+// CHECKIOS5-LABEL: define void @_ZN1CD0Ev(%class.C* %this)
// CHECKMS-LABEL: define x86_thiscallcc %class.C* @"\01??0C@@QAE@PAHPAD@Z"(%class.C* returned %this, i32* %i, i8* %c)
// CHECKMS-LABEL: define x86_thiscallcc void @"\01??1C@@UAE@XZ"(%class.C* %this)
@@ -75,15 +87,20 @@ public:
D::D() { }
D::~D() { }
-// CHECKGEN-LABEL: define void @_ZN1DC1Ev(%class.D* %this)
// CHECKGEN-LABEL: define void @_ZN1DC2Ev(%class.D* %this, i8** %vtt)
-// CHECKGEN-LABEL: define void @_ZN1DD1Ev(%class.D* %this)
+// CHECKGEN-LABEL: define void @_ZN1DC1Ev(%class.D* %this)
// CHECKGEN-LABEL: define void @_ZN1DD2Ev(%class.D* %this, i8** %vtt)
+// CHECKGEN-LABEL: define void @_ZN1DD1Ev(%class.D* %this)
-// CHECKARM-LABEL: define %class.D* @_ZN1DC1Ev(%class.D* returned %this)
// CHECKARM-LABEL: define %class.D* @_ZN1DC2Ev(%class.D* returned %this, i8** %vtt)
-// CHECKARM-LABEL: define %class.D* @_ZN1DD1Ev(%class.D* returned %this)
+// CHECKARM-LABEL: define %class.D* @_ZN1DC1Ev(%class.D* returned %this)
// CHECKARM-LABEL: define %class.D* @_ZN1DD2Ev(%class.D* returned %this, i8** %vtt)
+// CHECKARM-LABEL: define %class.D* @_ZN1DD1Ev(%class.D* returned %this)
+
+// CHECKIOS5-LABEL: define %class.D* @_ZN1DC2Ev(%class.D* %this, i8** %vtt)
+// CHECKIOS5-LABEL: define %class.D* @_ZN1DC1Ev(%class.D* %this)
+// CHECKIOS5-LABEL: define %class.D* @_ZN1DD2Ev(%class.D* %this, i8** %vtt)
+// CHECKIOS5-LABEL: define %class.D* @_ZN1DD1Ev(%class.D* %this)
// CHECKMS-LABEL: define x86_thiscallcc %class.D* @"\01??0D@@QAE@XZ"(%class.D* returned %this, i32 %is_most_derived)
// CHECKMS-LABEL: define x86_thiscallcc void @"\01??1D@@QAE@XZ"(%class.D* %this)
diff --git a/test/CodeGenCXX/constructor-direct-call.cpp b/test/CodeGenCXX/constructor-direct-call.cpp
index 75e6f216ca51..9567d0968dae 100644
--- a/test/CodeGenCXX/constructor-direct-call.cpp
+++ b/test/CodeGenCXX/constructor-direct-call.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i686-pc-win32 -fms-extensions -Wmicrosoft %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -triple i686-pc-mingw32 -fms-extensions -Wmicrosoft %s -emit-llvm -o - | FileCheck %s
class Test1 {
public:
@@ -22,10 +22,10 @@ public:
void f2() {
// CHECK: %var = alloca %class.Test2, align 4
- // CHECK-NEXT: call void @_ZN5Test2C1Ev(%class.Test2* %var)
+ // CHECK-NEXT: call x86_thiscallcc void @_ZN5Test2C1Ev(%class.Test2* %var)
Test2 var;
- // CHECK-NEXT: call void @_ZN5Test2C1Ev(%class.Test2* %var)
+ // CHECK-NEXT: call x86_thiscallcc void @_ZN5Test2C1Ev(%class.Test2* %var)
var.Test2::Test2();
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %{{.*}}, i8* %{{.*}}, i32 8, i32 4, i1 false)
@@ -45,16 +45,15 @@ public:
};
void f3() {
- // CHECK: call void @_ZN5Test3C1Ev(%class.Test3* %var)
+ // CHECK: call x86_thiscallcc void @_ZN5Test3C1Ev(%class.Test3* %var)
Test3 var;
- // CHECK-NEXT: call void @_ZN5Test3C1Ev(%class.Test3* %var2)
+ // CHECK-NEXT: call x86_thiscallcc void @_ZN5Test3C1Ev(%class.Test3* %var2)
Test3 var2;
- // CHECK-NEXT: call void @_ZN5Test3C1Ev(%class.Test3* %var)
+ // CHECK-NEXT: call x86_thiscallcc void @_ZN5Test3C1Ev(%class.Test3* %var)
var.Test3::Test3();
- // CHECK-NEXT: call void @_ZN5Test3C1ERKS_(%class.Test3* %var, %class.Test3* %var2)
+ // CHECK-NEXT: call x86_thiscallcc void @_ZN5Test3C1ERKS_(%class.Test3* %var, %class.Test3* dereferenceable({{[0-9]+}}) %var2)
var.Test3::Test3(var2);
}
-
diff --git a/test/CodeGenCXX/constructor-for-array-members.cpp b/test/CodeGenCXX/constructor-for-array-members.cpp
index 7842d9c725e5..8ea7eacd2b2b 100644
--- a/test/CodeGenCXX/constructor-for-array-members.cpp
+++ b/test/CodeGenCXX/constructor-for-array-members.cpp
@@ -1,8 +1,7 @@
-// REQUIRES: x86-registered-target,x86-64-registered-target
-// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -S %s -o %t-64.s
-// RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s
-// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -S %s -o %t-32.s
-// RUN: FileCheck -check-prefix CHECK-LP32 --input-file=%t-32.s %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | \
+// RUN: FileCheck %s
+// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -emit-llvm %s -o - | \
+// RUN: FileCheck %s
extern "C" int printf(...);
@@ -39,6 +38,4 @@ int main() {
m1.pr();
}
-// CHECK-LP64: callq __ZN1SC1Ev
-
-// CHECK-LP32: calll L__ZN1SC1Ev
+// CHECK: call void @_ZN1SC1Ev
diff --git a/test/CodeGenCXX/constructor-init-reference.cpp b/test/CodeGenCXX/constructor-init-reference.cpp
index 5e7515976518..61f426da51fd 100644
--- a/test/CodeGenCXX/constructor-init-reference.cpp
+++ b/test/CodeGenCXX/constructor-init-reference.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | grep "store i32\* @x, i32\*\*"
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
int x;
struct A {
@@ -6,4 +6,4 @@ struct A {
A() : y(x) {}
};
A z;
-
+// CHECK: store i32* @x, i32**
diff --git a/test/CodeGenCXX/constructor-init.cpp b/test/CodeGenCXX/constructor-init.cpp
index 477a439f337a..a8f483e53ab5 100644
--- a/test/CodeGenCXX/constructor-init.cpp
+++ b/test/CodeGenCXX/constructor-init.cpp
@@ -163,7 +163,7 @@ template<typename T> struct X;
// Make sure that the instantiated constructor initializes start and
// end properly.
-// CHECK-LABEL: define linkonce_odr void @_ZN1XIiEC2ERKS0_(%struct.X* %this, %struct.X* %other) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN1XIiEC2ERKS0_(%struct.X* %this, %struct.X* dereferenceable({{[0-9]+}}) %other) unnamed_addr
// CHECK: {{store.*null}}
// CHECK: {{store.*null}}
// CHECK: ret
diff --git a/test/CodeGenCXX/constructor-template.cpp b/test/CodeGenCXX/constructor-template.cpp
index 0d38d10c1382..675e3cfc0a41 100644
--- a/test/CodeGenCXX/constructor-template.cpp
+++ b/test/CodeGenCXX/constructor-template.cpp
@@ -1,4 +1,4 @@
-// REQUIRES: x86-registered-target,x86-64-registered-target
+// REQUIRES: x86-registered-target
// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -S %s -o %t-64.s
// RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s
// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -S %s -o %t-32.s
diff --git a/test/CodeGenCXX/constructors.cpp b/test/CodeGenCXX/constructors.cpp
index f730b9ef491a..b99c5a194157 100644
--- a/test/CodeGenCXX/constructors.cpp
+++ b/test/CodeGenCXX/constructors.cpp
@@ -21,20 +21,19 @@ struct A {
A::A(struct Undeclared &ref) : mem(0) {}
// Check that delegation works.
-// CHECK-LABEL: define void @_ZN1AC1ER10Undeclared(%struct.A* %this, %struct.Undeclared* %ref) unnamed_addr
-// CHECK: call void @_ZN1AC2ER10Undeclared(
-
-// CHECK-LABEL: define void @_ZN1AC2ER10Undeclared(%struct.A* %this, %struct.Undeclared* %ref) unnamed_addr
+// CHECK-LABEL: define void @_ZN1AC2ER10Undeclared(%struct.A* %this, %struct.Undeclared* nonnull %ref) unnamed_addr
// CHECK: call void @_ZN6MemberC1Ei(
-A::A(ValueClass v) : mem(v.y - v.x) {}
+// CHECK-LABEL: define void @_ZN1AC1ER10Undeclared(%struct.A* %this, %struct.Undeclared* nonnull %ref) unnamed_addr
+// CHECK: call void @_ZN1AC2ER10Undeclared(
-// CHECK-LABEL: define void @_ZN1AC1E10ValueClass(%struct.A* %this, i64 %v.coerce) unnamed_addr
-// CHECK: call void @_ZN1AC2E10ValueClass(
+A::A(ValueClass v) : mem(v.y - v.x) {}
// CHECK-LABEL: define void @_ZN1AC2E10ValueClass(%struct.A* %this, i64 %v.coerce) unnamed_addr
// CHECK: call void @_ZN6MemberC1Ei(
+// CHECK-LABEL: define void @_ZN1AC1E10ValueClass(%struct.A* %this, i64 %v.coerce) unnamed_addr
+// CHECK: call void @_ZN1AC2E10ValueClass(
/* Test that things work for inheritance. */
struct B : A {
@@ -44,13 +43,12 @@ struct B : A {
B::B(struct Undeclared &ref) : A(ref), mem(1) {}
-// CHECK-LABEL: define void @_ZN1BC1ER10Undeclared(%struct.B* %this, %struct.Undeclared* %ref) unnamed_addr
-// CHECK: call void @_ZN1BC2ER10Undeclared(
-
-// CHECK-LABEL: define void @_ZN1BC2ER10Undeclared(%struct.B* %this, %struct.Undeclared* %ref) unnamed_addr
+// CHECK-LABEL: define void @_ZN1BC2ER10Undeclared(%struct.B* %this, %struct.Undeclared* nonnull %ref) unnamed_addr
// CHECK: call void @_ZN1AC2ER10Undeclared(
// CHECK: call void @_ZN6MemberC1Ei(
+// CHECK-LABEL: define void @_ZN1BC1ER10Undeclared(%struct.B* %this, %struct.Undeclared* nonnull %ref) unnamed_addr
+// CHECK: call void @_ZN1BC2ER10Undeclared(
/* Test that the delegation optimization is disabled for classes with
@@ -64,15 +62,14 @@ struct C : virtual A {
};
C::C(int x) : A(ValueClass(x, x+1)), mem(x * x) {}
+// CHECK-LABEL: define void @_ZN1CC2Ei(%struct.C* %this, i8** %vtt, i32 %x) unnamed_addr
+// CHECK: call void @_ZN6MemberC1Ei(
+
// CHECK-LABEL: define void @_ZN1CC1Ei(%struct.C* %this, i32 %x) unnamed_addr
// CHECK: call void @_ZN10ValueClassC1Eii(
// CHECK: call void @_ZN1AC2E10ValueClass(
// CHECK: call void @_ZN6MemberC1Ei(
-// CHECK-LABEL: define void @_ZN1CC2Ei(%struct.C* %this, i8** %vtt, i32 %x) unnamed_addr
-// CHECK: call void @_ZN6MemberC1Ei(
-
-
/* Test that the delegation optimization is disabled for varargs
constructors. */
@@ -83,17 +80,16 @@ struct D : A {
D::D(int x, ...) : A(ValueClass(x, x+1)), mem(x*x) {}
-// CHECK-LABEL: define void @_ZN1DC1Eiz(%struct.D* %this, i32 %x, ...) unnamed_addr
+// CHECK-LABEL: define void @_ZN1DC2Eiz(%struct.D* %this, i32 %x, ...) unnamed_addr
// CHECK: call void @_ZN10ValueClassC1Eii(
// CHECK: call void @_ZN1AC2E10ValueClass(
// CHECK: call void @_ZN6MemberC1Ei(
-// CHECK-LABEL: define void @_ZN1DC2Eiz(%struct.D* %this, i32 %x, ...) unnamed_addr
+// CHECK-LABEL: define void @_ZN1DC1Eiz(%struct.D* %this, i32 %x, ...) unnamed_addr
// CHECK: call void @_ZN10ValueClassC1Eii(
// CHECK: call void @_ZN1AC2E10ValueClass(
// CHECK: call void @_ZN6MemberC1Ei(
-
// PR6622: this shouldn't crash
namespace test0 {
struct A {};
diff --git a/test/CodeGenCXX/convert-to-fptr.cpp b/test/CodeGenCXX/convert-to-fptr.cpp
index e497acf33dc4..c3be9627ba73 100644
--- a/test/CodeGenCXX/convert-to-fptr.cpp
+++ b/test/CodeGenCXX/convert-to-fptr.cpp
@@ -1,8 +1,7 @@
-// REQUIRES: x86-registered-target,x86-64-registered-target
-// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -S %s -o %t-64.s
-// RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s
-// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -S %s -o %t-32.s
-// RUN: FileCheck -check-prefix CHECK-LP32 --input-file=%t-32.s %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | \
+// RUN: FileCheck %s
+// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -emit-llvm %s -o - | \
+// RUN: FileCheck %s
extern "C" int printf(...);
@@ -39,9 +38,5 @@ int main()
return 0;
}
-// CHECK-LP64: callq __ZN1AcvPFiiEEv
-// CHECK-LP64: callq __ZN1BcvRFiiEEv
-
-// CHECK-LP32: calll L__ZN1AcvPFiiEEv
-// CHECK-LP32: calll L__ZN1BcvRFiiEEv
-
+// CHECK: call i32 (i32)* (%struct.A*)* @_ZN1AcvPFiiEEv
+// CHECK: call i32 (i32)* (%struct.B*)* @_ZN1BcvRFiiEEv
diff --git a/test/CodeGenCXX/copy-assign-synthesis-1.cpp b/test/CodeGenCXX/copy-assign-synthesis-1.cpp
index 2ffc7bcb7c8d..5813d9c92d80 100644
--- a/test/CodeGenCXX/copy-assign-synthesis-1.cpp
+++ b/test/CodeGenCXX/copy-assign-synthesis-1.cpp
@@ -1,4 +1,3 @@
-// REQUIRES: x86-registered-target,x86-64-registered-target
// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | \
// RUN: FileCheck %s
// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -emit-llvm %s -o - | \
@@ -93,5 +92,4 @@ int main() {
dstY.pr();
}
-// CHECK: define linkonce_odr %struct.X* @_ZN1XaSERKS_
-
+// CHECK: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.X* @_ZN1XaSERKS_
diff --git a/test/CodeGenCXX/copy-assign-synthesis-2.cpp b/test/CodeGenCXX/copy-assign-synthesis-2.cpp
index 18e92f98ebde..0bc7d3d6529f 100644
--- a/test/CodeGenCXX/copy-assign-synthesis-2.cpp
+++ b/test/CodeGenCXX/copy-assign-synthesis-2.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s
struct A {};
A& (A::*x)(const A&) = &A::operator=;
-// CHECK-LABEL: define linkonce_odr %struct.A* @_ZN1AaSERKS_
+// CHECK-LABEL: define linkonce_odr {{.*}}%struct.A* @_ZN1AaSERKS_
diff --git a/test/CodeGenCXX/copy-constructor-elim-2.cpp b/test/CodeGenCXX/copy-constructor-elim-2.cpp
index 727af1ba7cd3..c263b7ebf952 100644
--- a/test/CodeGenCXX/copy-constructor-elim-2.cpp
+++ b/test/CodeGenCXX/copy-constructor-elim-2.cpp
@@ -21,7 +21,7 @@ namespace no_elide_base {
Derived(const Other &O);
};
- // CHECK: define {{.*}} @_ZN13no_elide_base7DerivedC1ERKNS_5OtherE(%"struct.no_elide_base::Derived"* returned %this, %"struct.no_elide_base::Other"* %O) unnamed_addr
+ // CHECK: define {{.*}} @_ZN13no_elide_base7DerivedC1ERKNS_5OtherE(%"struct.no_elide_base::Derived"* returned %this, %"struct.no_elide_base::Other"* dereferenceable({{[0-9]+}}) %O) unnamed_addr
Derived::Derived(const Other &O)
// CHECK: call {{.*}} @_ZNK13no_elide_base5OthercvNS_4BaseEEv
// CHECK: call {{.*}} @_ZN13no_elide_base4BaseC2ERKS0_
@@ -74,4 +74,3 @@ namespace PR12139 {
return a.value;
}
}
-
diff --git a/test/CodeGenCXX/copy-constructor-elim.cpp b/test/CodeGenCXX/copy-constructor-elim.cpp
index ad3a87b9d5f8..8e9bee973771 100644
--- a/test/CodeGenCXX/copy-constructor-elim.cpp
+++ b/test/CodeGenCXX/copy-constructor-elim.cpp
@@ -1,6 +1,9 @@
-// RUN: %clang_cc1 -emit-llvm -o %t %s
-// RUN: not grep "_ZN1CC1ERK1C" %t
-// RUN: not grep "_ZN1SC1ERK1S" %t
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK
+// RUN: %clang_cc1 -triple %ms_abi_triple -emit-llvm -o - %s | FileCheck %s -check-prefix MS
+// CHECK-NOT: _ZN1CC1ERK1C
+// CHECK-NOT: _ZN1SC1ERK1S
+// MS-NOT: ?0C@@QAE@ABV0
+// MS-NOT: ?0S@@QAE@ABV0
extern "C" int printf(...);
diff --git a/test/CodeGenCXX/copy-constructor-synthesis-2.cpp b/test/CodeGenCXX/copy-constructor-synthesis-2.cpp
index 03c66339947d..4bb0fee25e51 100644
--- a/test/CodeGenCXX/copy-constructor-synthesis-2.cpp
+++ b/test/CodeGenCXX/copy-constructor-synthesis-2.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
struct A { virtual void a(); };
A x(A& y) { return y; }
-// CHECK: define linkonce_odr {{.*}} @_ZN1AC1ERKS_(%struct.A* {{.*}}%this, %struct.A*) unnamed_addr
+// CHECK: define linkonce_odr {{.*}} @_ZN1AC1ERKS_(%struct.A* {{.*}}%this, %struct.A* dereferenceable({{[0-9]+}})) unnamed_addr
// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTV1A, i64 0, i64 2)
diff --git a/test/CodeGenCXX/copy-constructor-synthesis.cpp b/test/CodeGenCXX/copy-constructor-synthesis.cpp
index c8b265ca2d12..47f8e131d62e 100644
--- a/test/CodeGenCXX/copy-constructor-synthesis.cpp
+++ b/test/CodeGenCXX/copy-constructor-synthesis.cpp
@@ -21,7 +21,7 @@ struct P {
};
-// CHECK-LABEL: define linkonce_odr void @_ZN1XC1ERKS_(%struct.X* %this, %struct.X*) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN1XC1ERKS_(%struct.X* %this, %struct.X* dereferenceable({{[0-9]+}})) unnamed_addr
struct X : M, N, P { // ...
X() : f1(1.0), d1(2.0), i1(3), name("HELLO"), bf1(0xff), bf2(0xabcd),
au_i1(1234), au1_4("MASKED") {}
@@ -136,15 +136,13 @@ void f(B b1) {
B b2 = b1;
}
-// CHECK: define linkonce_odr [[A:%.*]]* @_ZN12rdar138169401AaSERKS0_(
+// CHECK: define linkonce_odr dereferenceable({{[0-9]+}}) [[A:%.*]]* @_ZN12rdar138169401AaSERKS0_(
// CHECK: [[THIS:%.*]] = load [[A]]**
// CHECK-NEXT: [[T0:%.*]] = getelementptr inbounds [[A]]* [[THIS]], i32 0, i32 1
-// CHECK-NEXT: [[T1:%.*]] = bitcast [2 x i8]* [[T0]] to i16*
// CHECK-NEXT: [[OTHER:%.*]] = load [[A]]**
// CHECK-NEXT: [[T2:%.*]] = getelementptr inbounds [[A]]* [[OTHER]], i32 0, i32 1
-// CHECK-NEXT: [[T3:%.*]] = bitcast [2 x i8]* [[T2]] to i16*
-// CHECK-NEXT: [[T4:%.*]] = bitcast i16* [[T1]] to i8*
-// CHECK-NEXT: [[T5:%.*]] = bitcast i16* [[T3]] to i8*
+// CHECK-NEXT: [[T4:%.*]] = bitcast i16* [[T0]] to i8*
+// CHECK-NEXT: [[T5:%.*]] = bitcast i16* [[T2]] to i8*
// CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* [[T4]], i8* [[T5]], i64 8, i32 8, i1 false)
// CHECK-NEXT: ret [[A]]* [[THIS]]
@@ -153,16 +151,14 @@ void f(B b1) {
// CHECK-NEXT: [[T0:%.*]] = bitcast [[A]]* [[THIS]] to i8***
// CHECK-NEXT: store i8** getelementptr inbounds ([4 x i8*]* @_ZTVN12rdar138169401AE, i64 0, i64 2), i8*** [[T0]]
// CHECK-NEXT: [[T0:%.*]] = getelementptr inbounds [[A]]* [[THIS]], i32 0, i32 1
-// CHECK-NEXT: [[T1:%.*]] = bitcast [2 x i8]* [[T0]] to i16*
// CHECK-NEXT: [[OTHER:%.*]] = load [[A]]**
// CHECK-NEXT: [[T2:%.*]] = getelementptr inbounds [[A]]* [[OTHER]], i32 0, i32 1
-// CHECK-NEXT: [[T3:%.*]] = bitcast [2 x i8]* [[T2]] to i16*
-// CHECK-NEXT: [[T4:%.*]] = bitcast i16* [[T1]] to i8*
-// CHECK-NEXT: [[T5:%.*]] = bitcast i16* [[T3]] to i8*
+// CHECK-NEXT: [[T4:%.*]] = bitcast i16* [[T0]] to i8*
+// CHECK-NEXT: [[T5:%.*]] = bitcast i16* [[T2]] to i8*
// CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* [[T4]], i8* [[T5]], i64 8, i32 8, i1 false)
// CHECK-NEXT: ret void
-// CHECK-LABEL: define linkonce_odr void @_ZN6PR66281BC2ERKS0_(%"struct.PR6628::B"* %this, %"struct.PR6628::B"*) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN6PR66281BC2ERKS0_(%"struct.PR6628::B"* %this, %"struct.PR6628::B"* dereferenceable({{[0-9]+}})) unnamed_addr
// CHECK: call void @_ZN6PR66281TC1Ev
// CHECK: call void @_ZN6PR66281TC1Ev
// CHECK: call void @_ZN6PR66281AC2ERKS0_RKNS_1TES5_
diff --git a/test/CodeGenCXX/coverage.cpp b/test/CodeGenCXX/coverage.cpp
index 1f1611bd8fcd..88f74098efa8 100644
--- a/test/CodeGenCXX/coverage.cpp
+++ b/test/CodeGenCXX/coverage.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - -test-coverage -femit-coverage-notes | FileCheck %s
+// RUN: %clang_cc1 %s -triple %itanium_abi_triple -emit-llvm -o - -test-coverage -femit-coverage-notes | FileCheck %s
extern "C" void test_name1() {}
void test_name2() {}
diff --git a/test/CodeGenCXX/ctor-dtor-alias.cpp b/test/CodeGenCXX/ctor-dtor-alias.cpp
index d8d1fab7cef3..d869a2bfd5d9 100644
--- a/test/CodeGenCXX/ctor-dtor-alias.cpp
+++ b/test/CodeGenCXX/ctor-dtor-alias.cpp
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 %s -triple i686-linux -emit-llvm -o - -mconstructor-aliases -O1 -disable-llvm-optzns | FileCheck %s
// RUN: %clang_cc1 %s -triple i686-linux -emit-llvm -o - -mconstructor-aliases | FileCheck --check-prefix=NOOPT %s
-// RUN: %clang_cc1 -cc1 -triple x86_64--netbsd -emit-llvm \
+// RUN: %clang_cc1 -triple x86_64--netbsd -emit-llvm \
// RUN: -mconstructor-aliases -O2 %s -o - | FileCheck --check-prefix=CHECK-RAUW %s
namespace test1 {
@@ -61,7 +61,7 @@ namespace test4 {
// test that we don't do this optimization at -O0 so that the debugger can
// see both destructors.
// NOOPT-DAG: call i32 @__cxa_atexit{{.*}}@_ZN5test41BD2Ev
- // NOOOPT-DAG: define linkonce_odr void @_ZN5test41BD2Ev
+ // NOOPT-DAG: define linkonce_odr void @_ZN5test41BD2Ev
struct A {
virtual ~A() {}
};
diff --git a/test/CodeGenCXX/cxx0x-defaulted-templates.cpp b/test/CodeGenCXX/cxx0x-defaulted-templates.cpp
index f4d5ccc0e331..6f4c53331d4d 100644
--- a/test/CodeGenCXX/cxx0x-defaulted-templates.cpp
+++ b/test/CodeGenCXX/cxx0x-defaulted-templates.cpp
@@ -1,16 +1,16 @@
-// RUN: %clang_cc1 -std=c++11 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
template <typename T>
struct X {
X();
};
-// CHECK: define {{.*}} @_ZN1XIbEC1Ev
// CHECK: define {{.*}} @_ZN1XIbEC2Ev
+// CHECK: define {{.*}} @_ZN1XIbEC1Ev
template <> X<bool>::X() = default;
-// CHECK: define weak_odr {{.*}} @_ZN1XIiEC1Ev
// CHECK: define weak_odr {{.*}} @_ZN1XIiEC2Ev
+// CHECK: define weak_odr {{.*}} @_ZN1XIiEC1Ev
template <typename T> X<T>::X() = default;
template X<int>::X();
diff --git a/test/CodeGenCXX/cxx0x-delegating-ctors.cpp b/test/CodeGenCXX/cxx0x-delegating-ctors.cpp
index c48e61fd14e0..dcc055696e4d 100644
--- a/test/CodeGenCXX/cxx0x-delegating-ctors.cpp
+++ b/test/CodeGenCXX/cxx0x-delegating-ctors.cpp
@@ -26,28 +26,30 @@ delegator::delegator() {
delegator::delegator(bool)
{}
-// CHECK: define {{.*}} @_ZN9delegatorC1Ec
-// CHECK: {{.*}} @_ZN9delegatorC1Eb
-// CHECK: void @__cxa_throw
-// CHECK: void @__clang_call_terminate
-// CHECK: {{.*}} @_ZN9delegatorD1Ev
-// CHECK: define {{.*}} @_ZN9delegatorC2Ec
+// CHECK-LABEL: define {{.*}} @_ZN9delegatorC2Ec
// CHECK: {{.*}} @_ZN9delegatorC2Eb
// CHECK: void @__cxa_throw
// CHECK: void @__clang_call_terminate
// CHECK: {{.*}} @_ZN9delegatorD2Ev
+
+// CHECK-LABEL: define {{.*}} @_ZN9delegatorC1Ec
+// CHECK: {{.*}} @_ZN9delegatorC1Eb
+// CHECK: void @__cxa_throw
+// CHECK: void @__clang_call_terminate
+// CHECK: {{.*}} @_ZN9delegatorD1Ev
delegator::delegator(char)
: delegator(true) {
throw 0;
}
-// CHECK: define {{.*}} @_ZN9delegatorC1Ei
-// CHECK: {{.*}} @_ZN9delegatorC1Ev
+// CHECK-LABEL: define {{.*}} @_ZN9delegatorC2Ei
+// CHECK: {{.*}} @_ZN9delegatorC2Ev
// CHECK-NOT: void @_ZSt9terminatev
// CHECK: ret
// CHECK-NOT: void @_ZSt9terminatev
-// CHECK: define {{.*}} @_ZN9delegatorC2Ei
-// CHECK: {{.*}} @_ZN9delegatorC2Ev
+
+// CHECK-LABEL: define {{.*}} @_ZN9delegatorC1Ei
+// CHECK: {{.*}} @_ZN9delegatorC1Ev
// CHECK-NOT: void @_ZSt9terminatev
// CHECK: ret
// CHECK-NOT: void @_ZSt9terminatev
diff --git a/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist-pr12086.cpp b/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist-pr12086.cpp
index 091d7b70117c..91e913e8ea56 100644
--- a/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist-pr12086.cpp
+++ b/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist-pr12086.cpp
@@ -55,78 +55,78 @@ std::initializer_list<std::initializer_list<int>> nested = {
{1, a}, {3, b}, {5, c}
};
-// CHECK-STATIC-BL: @_ZGR6nested = private constant [2 x i32] [i32 1, i32 2], align 4
-// CHECK-STATIC-BL: @_ZGR6nested1 = private constant [2 x i32] [i32 3, i32 4], align 4
-// CHECK-STATIC-BL: @_ZGR6nested2 = private constant [2 x i32] [i32 5, i32 6], align 4
-// CHECK-STATIC-BL: @_ZGR6nested3 = private constant [3 x {{.*}}] [
-// CHECK-STATIC-BL: {{.*}} { i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested, i32 0, i32 0), i64 2 },
-// CHECK-STATIC-BL: {{.*}} { i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested1, i32 0, i32 0), i64 2 },
-// CHECK-STATIC-BL: {{.*}} { i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested2, i32 0, i32 0), i64 2 }
+// CHECK-STATIC-BL: @_ZGR6nested0_ = private constant [2 x i32] [i32 1, i32 2], align 4
+// CHECK-STATIC-BL: @_ZGR6nested1_ = private constant [2 x i32] [i32 3, i32 4], align 4
+// CHECK-STATIC-BL: @_ZGR6nested2_ = private constant [2 x i32] [i32 5, i32 6], align 4
+// CHECK-STATIC-BL: @_ZGR6nested_ = private constant [3 x {{.*}}] [
+// CHECK-STATIC-BL: {{.*}} { i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested0_, i32 0, i32 0), i64 2 },
+// CHECK-STATIC-BL: {{.*}} { i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested1_, i32 0, i32 0), i64 2 },
+// CHECK-STATIC-BL: {{.*}} { i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested2_, i32 0, i32 0), i64 2 }
// CHECK-STATIC-BL: ], align 8
-// CHECK-STATIC-BL: @nested = global {{.*}} { {{.*}} getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested3, i32 0, i32 0), i64 3 }, align 8
+// CHECK-STATIC-BL: @nested = global {{.*}} { {{.*}} getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested_, i32 0, i32 0), i64 3 }, align 8
// CHECK-DYNAMIC-BL: @nested = global
-// CHECK-DYNAMIC-BL: @_ZGR6nested = private global [3 x
-// CHECK-DYNAMIC-BL: @_ZGR6nested1 = private global [2 x i32] zeroinitializer
-// CHECK-DYNAMIC-BL: @_ZGR6nested2 = private global [2 x i32] zeroinitializer
-// CHECK-DYNAMIC-BL: @_ZGR6nested3 = private global [2 x i32] zeroinitializer
-// CHECK-DYNAMIC-BL: store i32 1, i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested1, i64 0, i64 0)
-// CHECK-DYNAMIC-BL: store i32 {{.*}}, i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested1, i64 0, i64 1)
-// CHECK-DYNAMIC-BL: store i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested1, i64 0, i64 0),
-// CHECK-DYMAMIC-BL: i32** getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested, i64 0, i64 0, i32 0), align 8
-// CHECK-DYNAMIC-BL: store i64 2, i64* getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested, i64 0, i64 0, i32 1), align 8
-// CHECK-DYNAMIC-BL: store i32 3, i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested2, i64 0, i64 0)
-// CHECK-DYNAMIC-BL: store i32 {{.*}}, i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested2, i64 0, i64 1)
-// CHECK-DYNAMIC-BL: store i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested2, i64 0, i64 0),
-// CHECK-DYNAMIC-BL: i32** getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested, i64 0, i64 1, i32 0), align 8
-// CHECK-DYNAMIC-BL: store i64 2, i64* getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested, i64 0, i64 1, i32 1), align 8
-// CHECK-DYNAMIC-BL: store i32 5, i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested3, i64 0, i64 0)
-// CHECK-DYNAMIC-BL: store i32 {{.*}}, i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested3, i64 0, i64 1)
-// CHECK-DYNAMIC-BL: store i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested3, i64 0, i64 0),
-// CHECK-DYNAMIC-BL: i32** getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested, i64 0, i64 2, i32 0), align 8
-// CHECK-DYNAMIC-BL: store i64 2, i64* getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested, i64 0, i64 2, i32 1), align 8
-// CHECK-DYNAMIC-BL: store {{.*}}* getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested, i64 0, i64 0),
+// CHECK-DYNAMIC-BL: @_ZGR6nested_ = private global [3 x
+// CHECK-DYNAMIC-BL: @_ZGR6nested0_ = private global [2 x i32] zeroinitializer
+// CHECK-DYNAMIC-BL: @_ZGR6nested1_ = private global [2 x i32] zeroinitializer
+// CHECK-DYNAMIC-BL: @_ZGR6nested2_ = private global [2 x i32] zeroinitializer
+// CHECK-DYNAMIC-BL: store i32 1, i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested0_, i64 0, i64 0)
+// CHECK-DYNAMIC-BL: store i32 {{.*}}, i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested0_, i64 0, i64 1)
+// CHECK-DYNAMIC-BL: store i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested0_, i64 0, i64 0),
+// CHECK-DYNAMIC-BL: i32** getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested_, i64 0, i64 0, i32 0), align 8
+// CHECK-DYNAMIC-BL: store i64 2, i64* getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested_, i64 0, i64 0, i32 1), align 8
+// CHECK-DYNAMIC-BL: store i32 3, i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested1_, i64 0, i64 0)
+// CHECK-DYNAMIC-BL: store i32 {{.*}}, i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested1_, i64 0, i64 1)
+// CHECK-DYNAMIC-BL: store i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested1_, i64 0, i64 0),
+// CHECK-DYNAMIC-BL: i32** getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested_, i64 0, i64 1, i32 0), align 8
+// CHECK-DYNAMIC-BL: store i64 2, i64* getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested_, i64 0, i64 1, i32 1), align 8
+// CHECK-DYNAMIC-BL: store i32 5, i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested2_, i64 0, i64 0)
+// CHECK-DYNAMIC-BL: store i32 {{.*}}, i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested2_, i64 0, i64 1)
+// CHECK-DYNAMIC-BL: store i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested2_, i64 0, i64 0),
+// CHECK-DYNAMIC-BL: i32** getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested_, i64 0, i64 2, i32 0), align 8
+// CHECK-DYNAMIC-BL: store i64 2, i64* getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested_, i64 0, i64 2, i32 1), align 8
+// CHECK-DYNAMIC-BL: store {{.*}}* getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested_, i64 0, i64 0),
// CHECK-DYNAMIC-BL: {{.*}}** getelementptr inbounds ({{.*}}* @nested, i32 0, i32 0), align 8
// CHECK-DYNAMIC-BL: store i64 3, i64* getelementptr inbounds ({{.*}}* @nested, i32 0, i32 1), align 8
-// CHECK-STATIC-BE: @_ZGR6nested = private constant [2 x i32] [i32 1, i32 2], align 4
-// CHECK-STATIC-BE: @_ZGR6nested1 = private constant [2 x i32] [i32 3, i32 4], align 4
-// CHECK-STATIC-BE: @_ZGR6nested2 = private constant [2 x i32] [i32 5, i32 6], align 4
-// CHECK-STATIC-BE: @_ZGR6nested3 = private constant [3 x {{.*}}] [
-// CHECK-STATIC-BE: {{.*}} { i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested, i32 0, i32 0),
-// CHECK-STATIC-BE: i32* bitcast (i8* getelementptr (i8* bitcast ([2 x i32]* @_ZGR6nested to i8*), i64 8) to i32*) }
-// CHECK-STATIC-BE: {{.*}} { i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested1, i32 0, i32 0),
-// CHECK-STATIC-BE: i32* bitcast (i8* getelementptr (i8* bitcast ([2 x i32]* @_ZGR6nested1 to i8*), i64 8) to i32*) }
-// CHECK-STATIC-BE: {{.*}} { i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested2, i32 0, i32 0),
-// CHECK-STATIC-BE: i32* bitcast (i8* getelementptr (i8* bitcast ([2 x i32]* @_ZGR6nested2 to i8*), i64 8) to i32*) }
+// CHECK-STATIC-BE: @_ZGR6nested0_ = private constant [2 x i32] [i32 1, i32 2], align 4
+// CHECK-STATIC-BE: @_ZGR6nested1_ = private constant [2 x i32] [i32 3, i32 4], align 4
+// CHECK-STATIC-BE: @_ZGR6nested2_ = private constant [2 x i32] [i32 5, i32 6], align 4
+// CHECK-STATIC-BE: @_ZGR6nested_ = private constant [3 x {{.*}}] [
+// CHECK-STATIC-BE: {{.*}} { i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested0_, i32 0, i32 0),
+// CHECK-STATIC-BE: i32* bitcast (i8* getelementptr (i8* bitcast ([2 x i32]* @_ZGR6nested0_ to i8*), i64 8) to i32*) }
+// CHECK-STATIC-BE: {{.*}} { i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested1_, i32 0, i32 0),
+// CHECK-STATIC-BE: i32* bitcast (i8* getelementptr (i8* bitcast ([2 x i32]* @_ZGR6nested1_ to i8*), i64 8) to i32*) }
+// CHECK-STATIC-BE: {{.*}} { i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested2_, i32 0, i32 0),
+// CHECK-STATIC-BE: i32* bitcast (i8* getelementptr (i8* bitcast ([2 x i32]* @_ZGR6nested2_ to i8*), i64 8) to i32*) }
// CHECK-STATIC-BE: ], align 8
-// CHECK-STATIC-BE: @nested = global {{.*}} { {{.*}} getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested3, i32 0, i32 0),
-// CHECK-STATIC-BE: {{.*}} bitcast ({{.*}}* getelementptr (i8* bitcast ([3 x {{.*}}]* @_ZGR6nested3 to i8*), i64 48) to {{.*}}*) }
+// CHECK-STATIC-BE: @nested = global {{.*}} { {{.*}} getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested_, i32 0, i32 0),
+// CHECK-STATIC-BE: {{.*}} bitcast ({{.*}}* getelementptr (i8* bitcast ([3 x {{.*}}]* @_ZGR6nested_ to i8*), i64 48) to {{.*}}*) }
// CHECK-DYNAMIC-BE: @nested = global
-// CHECK-DYNAMIC-BE: @_ZGR6nested = private global [3 x
-// CHECK-DYNAMIC-BE: @_ZGR6nested1 = private global [2 x i32] zeroinitializer
-// CHECK-DYNAMIC-BE: @_ZGR6nested2 = private global [2 x i32] zeroinitializer
-// CHECK-DYNAMIC-BE: @_ZGR6nested3 = private global [2 x i32] zeroinitializer
-// CHECK-DYNAMIC-BE: store i32 1, i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested1, i64 0, i64 0)
-// CHECK-DYNAMIC-BE: store i32 {{.*}}, i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested1, i64 0, i64 1)
-// CHECK-DYNAMIC-BE: store i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested1, i64 0, i64 0),
-// CHECK-DYMAMIC-BE: i32** getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested, i64 0, i64 0, i32 0), align 8
-// CHECK-DYNAMIC-BE: store i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested1, i64 1, i64 0),
-// CHECK-DYMAMIC-BE: i32** getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested, i64 0, i64 0, i32 1), align 8
-// CHECK-DYNAMIC-BE: store i32 3, i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested2, i64 0, i64 0)
-// CHECK-DYNAMIC-BE: store i32 {{.*}}, i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested2, i64 0, i64 1)
-// CHECK-DYNAMIC-BE: store i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested2, i64 0, i64 0),
-// CHECK-DYNAMIC-BE: i32** getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested, i64 0, i64 1, i32 0), align 8
-// CHECK-DYNAMIC-BE: store i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested2, i64 1, i64 0),
-// CHECK-DYNAMIC-BE: i32** getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested, i64 0, i64 1, i32 1), align 8
-// CHECK-DYNAMIC-BE: store i32 5, i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested3, i64 0, i64 0)
-// CHECK-DYNAMIC-BE: store i32 {{.*}}, i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested3, i64 0, i64 1)
-// CHECK-DYNAMIC-BE: store i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested3, i64 0, i64 0),
-// CHECK-DYNAMIC-BE: i32** getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested, i64 0, i64 2, i32 0), align 8
-// CHECK-DYNAMIC-BE: store i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested3, i64 1, i64 0),
-// CHECK-DYNAMIC-BE: i32** getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested, i64 0, i64 2, i32 1), align 8
-// CHECK-DYNAMIC-BE: store {{.*}}* getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested, i64 0, i64 0),
+// CHECK-DYNAMIC-BE: @_ZGR6nested_ = private global [3 x
+// CHECK-DYNAMIC-BE: @_ZGR6nested0_ = private global [2 x i32] zeroinitializer
+// CHECK-DYNAMIC-BE: @_ZGR6nested1_ = private global [2 x i32] zeroinitializer
+// CHECK-DYNAMIC-BE: @_ZGR6nested2_ = private global [2 x i32] zeroinitializer
+// CHECK-DYNAMIC-BE: store i32 1, i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested0_, i64 0, i64 0)
+// CHECK-DYNAMIC-BE: store i32 {{.*}}, i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested0_, i64 0, i64 1)
+// CHECK-DYNAMIC-BE: store i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested0_, i64 0, i64 0),
+// CHECK-DYNAMIC-BE: i32** getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested_, i64 0, i64 0, i32 0), align 8
+// CHECK-DYNAMIC-BE: store i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested0_, i64 1, i64 0),
+// CHECK-DYNAMIC-BE: i32** getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested_, i64 0, i64 0, i32 1), align 8
+// CHECK-DYNAMIC-BE: store i32 3, i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested1_, i64 0, i64 0)
+// CHECK-DYNAMIC-BE: store i32 {{.*}}, i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested1_, i64 0, i64 1)
+// CHECK-DYNAMIC-BE: store i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested1_, i64 0, i64 0),
+// CHECK-DYNAMIC-BE: i32** getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested_, i64 0, i64 1, i32 0), align 8
+// CHECK-DYNAMIC-BE: store i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested1_, i64 1, i64 0),
+// CHECK-DYNAMIC-BE: i32** getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested_, i64 0, i64 1, i32 1), align 8
+// CHECK-DYNAMIC-BE: store i32 5, i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested2_, i64 0, i64 0)
+// CHECK-DYNAMIC-BE: store i32 {{.*}}, i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested2_, i64 0, i64 1)
+// CHECK-DYNAMIC-BE: store i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested2_, i64 0, i64 0),
+// CHECK-DYNAMIC-BE: i32** getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested_, i64 0, i64 2, i32 0), align 8
+// CHECK-DYNAMIC-BE: store i32* getelementptr inbounds ([2 x i32]* @_ZGR6nested2_, i64 1, i64 0),
+// CHECK-DYNAMIC-BE: i32** getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested_, i64 0, i64 2, i32 1), align 8
+// CHECK-DYNAMIC-BE: store {{.*}}* getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested_, i64 0, i64 0),
// CHECK-DYNAMIC-BE: {{.*}}** getelementptr inbounds ({{.*}}* @nested, i32 0, i32 0), align 8
-// CHECK-DYNAMIC-BE: store {{.*}}* getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested, i64 1, i64 0),
+// CHECK-DYNAMIC-BE: store {{.*}}* getelementptr inbounds ([3 x {{.*}}]* @_ZGR6nested_, i64 1, i64 0),
// CHECK-DYNAMIC-BE: {{.*}}** getelementptr inbounds ({{.*}}* @nested, i32 0, i32 1), align 8
diff --git a/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist-startend.cpp b/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist-startend.cpp
index 8e0d161bc0f4..5a48346be758 100644
--- a/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist-startend.cpp
+++ b/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist-startend.cpp
@@ -32,8 +32,8 @@ namespace std {
};
}
-// CHECK: @_ZGR15globalInitList1 = private constant [3 x i32] [i32 1, i32 2, i32 3]
-// CHECK: @globalInitList1 = global {{[^ ]+}} { i32* getelementptr inbounds ([3 x i32]* @_ZGR15globalInitList1, {{[^)]*}}), i32*
+// CHECK: @_ZGR15globalInitList1_ = private constant [3 x i32] [i32 1, i32 2, i32 3]
+// CHECK: @globalInitList1 = global {{[^ ]+}} { i32* getelementptr inbounds ([3 x i32]* @_ZGR15globalInitList1_, {{[^)]*}}), i32*
std::initializer_list<int> globalInitList1 = {1, 2, 3};
void fn1(int i) {
diff --git a/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp b/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp
index 164cbce027ef..4d30344e3c8d 100644
--- a/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp
+++ b/test/CodeGenCXX/cxx0x-initializer-stdinitializerlist.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 -S -triple x86_64-none-linux-gnu -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-none-linux-gnu -emit-llvm -o - %s | FileCheck %s
namespace std {
typedef decltype(sizeof(int)) size_t;
@@ -47,8 +47,8 @@ struct wantslist1 {
~wantslist1();
};
-// CHECK: @_ZGR15globalInitList1 = private constant [3 x i32] [i32 1, i32 2, i32 3]
-// CHECK: @globalInitList1 = global %{{[^ ]+}} { i32* getelementptr inbounds ([3 x i32]* @_ZGR15globalInitList1, i32 0, i32 0), i{{32|64}} 3 }
+// CHECK: @_ZGR15globalInitList1_ = private constant [3 x i32] [i32 1, i32 2, i32 3]
+// CHECK: @globalInitList1 = global %{{[^ ]+}} { i32* getelementptr inbounds ([3 x i32]* @_ZGR15globalInitList1_, i32 0, i32 0), i{{32|64}} 3 }
std::initializer_list<int> globalInitList1 = {1, 2, 3};
namespace thread_local_global_array {
@@ -57,12 +57,12 @@ namespace thread_local_global_array {
// objects aren't really a problem).
//
// CHECK: @_ZN25thread_local_global_array1xE = thread_local global
- // CHECK: @_ZGRN25thread_local_global_array1xE = private thread_local constant [4 x i32] [i32 1, i32 2, i32 3, i32 4]
+ // CHECK: @_ZGRN25thread_local_global_array1xE_ = private thread_local constant [4 x i32] [i32 1, i32 2, i32 3, i32 4]
std::initializer_list<int> thread_local x = { 1, 2, 3, 4 };
}
// CHECK: @globalInitList2 = global %{{[^ ]+}} zeroinitializer
-// CHECK: @_ZGR15globalInitList2 = private global [2 x %[[WITHARG:[^ ]*]]] zeroinitializer
+// CHECK: @_ZGR15globalInitList2_ = private global [2 x %[[WITHARG:[^ ]*]]] zeroinitializer
// CHECK: @_ZN15partly_constant1kE = global i32 0, align 4
// CHECK: @_ZN15partly_constant2ilE = global {{.*}} null, align 8
@@ -77,16 +77,16 @@ namespace thread_local_global_array {
// thread_local initializer:
// CHECK-LABEL: define internal void
-// CHECK: store i32* getelementptr inbounds ([4 x i32]* @_ZGRN25thread_local_global_array1xE, i64 0, i64 0),
+// CHECK: store i32* getelementptr inbounds ([4 x i32]* @_ZGRN25thread_local_global_array1xE_, i64 0, i64 0),
// CHECK: i32** getelementptr inbounds ({{.*}}* @_ZN25thread_local_global_array1xE, i32 0, i32 0), align 8
// CHECK: store i64 4, i64* getelementptr inbounds ({{.*}}* @_ZN25thread_local_global_array1xE, i32 0, i32 1), align 8
// CHECK-LABEL: define internal void
-// CHECK: call void @_ZN8witharg1C1ERK10destroyme1(%[[WITHARG]]* getelementptr inbounds ([2 x %[[WITHARG]]]* @_ZGR15globalInitList2, i{{32|64}} 0, i{{32|64}} 0
-// CHECK: call void @_ZN8witharg1C1ERK10destroyme1(%[[WITHARG]]* getelementptr inbounds ([2 x %[[WITHARG]]]* @_ZGR15globalInitList2, i{{32|64}} 0, i{{32|64}} 1
+// CHECK: call void @_ZN8witharg1C1ERK10destroyme1(%[[WITHARG]]* getelementptr inbounds ([2 x %[[WITHARG]]]* @_ZGR15globalInitList2_, i{{32|64}} 0, i{{32|64}} 0
+// CHECK: call void @_ZN8witharg1C1ERK10destroyme1(%[[WITHARG]]* getelementptr inbounds ([2 x %[[WITHARG]]]* @_ZGR15globalInitList2_, i{{32|64}} 0, i{{32|64}} 1
// CHECK: __cxa_atexit
-// CHECK: store %[[WITHARG]]* getelementptr inbounds ([2 x %[[WITHARG]]]* @_ZGR15globalInitList2, i64 0, i64 0),
+// CHECK: store %[[WITHARG]]* getelementptr inbounds ([2 x %[[WITHARG]]]* @_ZGR15globalInitList2_, i64 0, i64 0),
// CHECK: %[[WITHARG]]** getelementptr inbounds (%{{.*}}* @globalInitList2, i32 0, i32 0), align 8
// CHECK: store i64 2, i64* getelementptr inbounds (%{{.*}}* @globalInitList2, i32 0, i32 1), align 8
// CHECK: call void @_ZN10destroyme1D1Ev
@@ -384,7 +384,7 @@ namespace partly_constant {
// CHECK-NOT: @[[PARTLY_CONSTANT_THIRD]],
// CHECK: store i32* getelementptr inbounds ({{.*}}* @[[PARTLY_CONSTANT_THIRD]], i64 0, i64 0),
// CHECK: i32** getelementptr inbounds ({{.*}}* @[[PARTLY_CONSTANT_INNER]], i64 0, i64 2, i32 0)
- // CHECK: store i64 4, i64* getelementptr inbounds ({{.*}}* @_ZGRN15partly_constant2ilE4, i64 0, i64 2, i32 1)
+ // CHECK: store i64 4, i64* getelementptr inbounds ({{.*}}* @_ZGRN15partly_constant2ilE4_, i64 0, i64 2, i32 1)
// CHECK-NOT: @[[PARTLY_CONSTANT_THIRD]],
//
// Outer init list.
@@ -431,3 +431,37 @@ namespace nested {
// CHECK: }
}
}
+
+namespace DR1070 {
+ struct A {
+ A(std::initializer_list<int>);
+ };
+ struct B {
+ int i;
+ A a;
+ };
+ B b = {1};
+ struct C {
+ std::initializer_list<int> a;
+ B b;
+ std::initializer_list<double> c;
+ };
+ C c = {};
+}
+
+namespace ArrayOfInitList {
+ struct S {
+ S(std::initializer_list<int>);
+ };
+ S x[1] = {};
+}
+
+namespace PR20445 {
+ struct vector { vector(std::initializer_list<int>); };
+ struct MyClass { explicit MyClass(const vector &v); };
+ template<int x> void f() { new MyClass({42, 43}); }
+ template void f<0>();
+ // CHECK-LABEL: define {{.*}} @_ZN7PR204451fILi0EEEvv(
+ // CHECK: call void @_ZN7PR204456vectorC1ESt16initializer_listIiE(
+ // CHECK: call void @_ZN7PR204457MyClassC1ERKNS_6vectorE(
+}
diff --git a/test/CodeGenCXX/cxx11-exception-spec.cpp b/test/CodeGenCXX/cxx11-exception-spec.cpp
index 96ea1d7f00ed..3b1516b92536 100644
--- a/test/CodeGenCXX/cxx11-exception-spec.cpp
+++ b/test/CodeGenCXX/cxx11-exception-spec.cpp
@@ -1,4 +1,5 @@
-// RUN: not %clang_cc1 -std=c++11 -emit-llvm %s -o - -verify -fexceptions -fcxx-exceptions -triple x86_64-linux-gnu | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -verify -fexceptions -fcxx-exceptions -triple x86_64-linux-gnu | FileCheck %s
+// expected-no-diagnostics
void h();
diff --git a/test/CodeGenCXX/cxx11-initializer-aggregate.cpp b/test/CodeGenCXX/cxx11-initializer-aggregate.cpp
index acc77825ae84..789970b58b53 100644
--- a/test/CodeGenCXX/cxx11-initializer-aggregate.cpp
+++ b/test/CodeGenCXX/cxx11-initializer-aggregate.cpp
@@ -20,6 +20,25 @@ int &fn2(int &v) {
// CHECK: %[[INITLIST2:.*]] = alloca %struct.B, align 8
// CHECK: %[[R:.*]] = getelementptr inbounds %struct.B* %[[INITLIST2:.*]], i32 0, i32 0
// CHECK: store i32* %{{.*}}, i32** %[[R]], align 8
- // CHECK: call i32* @_ZN1B1fEv(%struct.B* %[[INITLIST2:.*]])
+ // CHECK: call dereferenceable({{[0-9]+}}) i32* @_ZN1B1fEv(%struct.B* %[[INITLIST2:.*]])
return B{v}.f();
}
+
+// CHECK: define {{.*}}@__cxx_global_var_init(
+//
+// CHECK: call {{.*}}@_ZN14NonTrivialInit1AC1Ev(
+// CHECK: getelementptr inbounds {{.*}}, i64 1
+// CHECK: br i1
+//
+// CHECK: getelementptr inbounds {{.*}}, i64 1
+// CHECK: icmp eq {{.*}}, i64 30
+// CHECK: br i1
+//
+// CHECK: call i32 @__cxa_atexit(
+namespace NonTrivialInit {
+ struct A { A(); A(const A&) = delete; ~A(); };
+ struct B { A a[20]; };
+ // NB, this must be large enough to be worth memsetting for this test to be
+ // meaningful.
+ B b[30] = {};
+}
diff --git a/test/CodeGenCXX/cxx11-initializer-array-new.cpp b/test/CodeGenCXX/cxx11-initializer-array-new.cpp
index 23577bec661a..2393939b031d 100644
--- a/test/CodeGenCXX/cxx11-initializer-array-new.cpp
+++ b/test/CodeGenCXX/cxx11-initializer-array-new.cpp
@@ -28,7 +28,7 @@ void *p = new S[2][3]{ { 1, 2, 3 }, { 4, 5, 6 } };
//
// { 4, 5, 6 }
//
-// CHECK: %[[S_1:.*]] = getelementptr [3 x %[[S]]]* %[[S_0]], i32 1
+// CHECK: %[[S_1:.*]] = getelementptr inbounds [3 x %[[S]]]* %[[S_0]], i32 1
//
// CHECK: %[[S_1_0:.*]] = getelementptr inbounds [3 x %[[S]]]* %[[S_1]], i64 0, i64 0
// CHECK: call void @_ZN1SC1Ei(%[[S]]* %[[S_1_0]], i32 4)
@@ -56,7 +56,6 @@ void *q = new S[n][3]{ { 1, 2, 3 }, { 4, 5, 6 } };
// CHECK: store i64 %[[ELTS]], i64* %[[COOKIE]]
// CHECK: %[[START_AS_i8:.*]] = getelementptr inbounds i8* %[[ALLOC]], i64 8
// CHECK: %[[START_AS_S:.*]] = bitcast i8* %[[START_AS_i8]] to %[[S]]*
-// CHECK: %[[END_AS_S:.*]] = getelementptr inbounds %[[S]]* %[[START_AS_S]], i64 %[[ELTS]]
//
// Explicit initializers:
//
@@ -73,7 +72,7 @@ void *q = new S[n][3]{ { 1, 2, 3 }, { 4, 5, 6 } };
//
// { 4, 5, 6 }
//
-// CHECK: %[[S_1:.*]] = getelementptr [3 x %[[S]]]* %[[S_0]], i32 1
+// CHECK: %[[S_1:.*]] = getelementptr inbounds [3 x %[[S]]]* %[[S_0]], i32 1
//
// CHECK: %[[S_1_0:.*]] = getelementptr inbounds [3 x %[[S]]]* %[[S_1]], i64 0, i64 0
// CHECK: call void @_ZN1SC1Ei(%[[S]]* %[[S_1_0]], i32 4)
@@ -82,25 +81,80 @@ void *q = new S[n][3]{ { 1, 2, 3 }, { 4, 5, 6 } };
// CHECK: %[[S_1_2:.*]] = getelementptr inbounds %[[S]]* %[[S_1_1]], i64 1
// CHECK: call void @_ZN1SC1Ei(%[[S]]* %[[S_1_2]], i32 6)
//
-// CHECK: %[[S_2:.*]] = getelementptr [3 x %[[S]]]* %[[S_1]], i32 1
+// And the rest.
+//
+// CHECK: %[[S_2:.*]] = getelementptr inbounds [3 x %[[S]]]* %[[S_1]], i32 1
// CHECK: %[[S_2_AS_S:.*]] = bitcast [3 x %[[S]]]* %[[S_2]] to %[[S]]*
-// CHECK: icmp eq %[[S]]* %[[S_2_AS_S]], %[[END_AS_S]]
-// CHECK: br i1
//
-// S[n-2][3] initialization loop:
+// CHECK: %[[REST:.*]] = sub i64 %[[ELTS]], 6
+// CHECK: icmp eq i64 %[[REST]], 0
+// CHECK: br i1
//
-// CHECK: %[[END_INNER:.*]] = getelementptr inbounds %[[S]]* %{{.*}}, i64 3
+// CHECK: %[[END:.*]] = getelementptr inbounds %[[S]]* %[[S_2_AS_S]], i64 %[[REST]]
// CHECK: br label
//
-// S[3] initialization loop:
+// CHECK: %[[CUR:.*]] = phi %[[S]]* [ %[[S_2_AS_S]], {{.*}} ], [ %[[NEXT:.*]], {{.*}} ]
+// CHECK: call void @_ZN1SC1Ev(%[[S]]* %[[CUR]])
+// CHECK: %[[NEXT]] = getelementptr inbounds %[[S]]* %[[CUR]], i64 1
+// CHECK: icmp eq %[[S]]* %[[NEXT]], %[[END]]
+// CHECK: br i1
//
-// CHECK: call void @_ZN1SC1Ev(%[[S]]*
-// CHECK: %[[NEXT_INNER:.*]] = getelementptr inbounds %[[S]]* %{{.*}}, i64 1
-// CHECK: icmp eq %[[S]]* %[[NEXT_INNER]], %[[END_INNER]]
-// CHECK: br i1
+// CHECK: }
+
+struct T { int a; };
+void *r = new T[n][3]{ { 1, 2, 3 }, { 4, 5, 6 } };
+
+// CHECK-LABEL: define
//
-// CHECK: %[[NEXT_OUTER:.*]] = getelementptr %[[S]]* %{{.*}}, i32 1
-// CHECK: icmp eq %[[S]]* %[[NEXT_OUTER]], %[[END_AS_S]]
-// CHECK: br i1
+// CHECK: load i32* @n
+// CHECK: call {{.*}} @llvm.umul.with.overflow.i64(i64 %[[N:.*]], i64 12)
+// CHECK: %[[ELTS:.*]] = mul i64 %[[N]], 3
+//
+// No cookie.
+// CHECK-NOT: @llvm.uadd.with.overflow
+//
+// CHECK: %[[ALLOC:.*]] = call noalias i8* @_Znam(i64 %{{.*}})
+//
+// CHECK: %[[START_AS_T:.*]] = bitcast i8* %[[ALLOC]] to %[[T:.*]]*
+//
+// Explicit initializers:
+//
+// { 1, 2, 3 }
+//
+// CHECK: %[[T_0:.*]] = bitcast %[[T]]* %[[START_AS_T]] to [3 x %[[T]]]*
+//
+// CHECK: %[[T_0_0:.*]] = getelementptr inbounds [3 x %[[T]]]* %[[T_0]], i64 0, i64 0
+// CHECK: %[[T_0_0_0:.*]] = getelementptr inbounds %[[T]]* %[[T_0_0]], i32 0, i32 0
+// CHECK: store i32 1, i32* %[[T_0_0_0]]
+// CHECK: %[[T_0_1:.*]] = getelementptr inbounds %[[T]]* %[[T_0_0]], i64 1
+// CHECK: %[[T_0_1_0:.*]] = getelementptr inbounds %[[T]]* %[[T_0_1]], i32 0, i32 0
+// CHECK: store i32 2, i32* %[[T_0_1_0]]
+// CHECK: %[[T_0_2:.*]] = getelementptr inbounds %[[T]]* %[[T_0_1]], i64 1
+// CHECK: %[[T_0_2_0:.*]] = getelementptr inbounds %[[T]]* %[[T_0_2]], i32 0, i32 0
+// CHECK: store i32 3, i32* %[[T_0_2_0]]
+//
+// { 4, 5, 6 }
+//
+// CHECK: %[[T_1:.*]] = getelementptr inbounds [3 x %[[T]]]* %[[T_0]], i32 1
+//
+// CHECK: %[[T_1_0:.*]] = getelementptr inbounds [3 x %[[T]]]* %[[T_1]], i64 0, i64 0
+// CHECK: %[[T_1_0_0:.*]] = getelementptr inbounds %[[T]]* %[[T_1_0]], i32 0, i32 0
+// CHECK: store i32 4, i32* %[[T_1_0_0]]
+// CHECK: %[[T_1_1:.*]] = getelementptr inbounds %[[T]]* %[[T_1_0]], i64 1
+// CHECK: %[[T_1_1_0:.*]] = getelementptr inbounds %[[T]]* %[[T_1_1]], i32 0, i32 0
+// CHECK: store i32 5, i32* %[[T_1_1_0]]
+// CHECK: %[[T_1_2:.*]] = getelementptr inbounds %[[T]]* %[[T_1_1]], i64 1
+// CHECK: %[[T_1_2_0:.*]] = getelementptr inbounds %[[T]]* %[[T_1_2]], i32 0, i32 0
+// CHECK: store i32 6, i32* %[[T_1_2_0]]
+//
+// And the rest gets memset to 0.
+//
+// CHECK: %[[T_2:.*]] = getelementptr inbounds [3 x %[[T]]]* %[[T_1]], i32 1
+// CHECK: %[[T_2_AS_T:.*]] = bitcast [3 x %[[T]]]* %[[T_2]] to %[[T]]*
+//
+// CHECK: %[[SIZE:.*]] = sub i64 %{{.*}}, 24
+// CHECK: %[[REST:.*]] = bitcast %[[T]]* %[[T_2_AS_T]] to i8*
+// CHECK: call void @llvm.memset.p0i8.i64(i8* %[[REST]], i8 0, i64 %[[SIZE]], i32 4, i1 false)
//
// CHECK: }
+
diff --git a/test/CodeGenCXX/cxx11-noreturn.cpp b/test/CodeGenCXX/cxx11-noreturn.cpp
index 31c651d75efc..b876bb9661ba 100644
--- a/test/CodeGenCXX/cxx11-noreturn.cpp
+++ b/test/CodeGenCXX/cxx11-noreturn.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -std=c++11 %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -std=c++11 %s -o - | FileCheck %s
int g();
diff --git a/test/CodeGenCXX/cxx11-thread-local-reference.cpp b/test/CodeGenCXX/cxx11-thread-local-reference.cpp
index 7759d41b0f92..4143164d91ca 100644
--- a/test/CodeGenCXX/cxx11-thread-local-reference.cpp
+++ b/test/CodeGenCXX/cxx11-thread-local-reference.cpp
@@ -10,10 +10,10 @@ thread_local int &r = f();
int &g() { return r; }
// CHECK: define {{.*}} @[[R_INIT:.*]]()
-// CHECK: call i32* @_Z1fv()
+// CHECK: call dereferenceable({{[0-9]+}}) i32* @_Z1fv()
// CHECK: store i32* %{{.*}}, i32** @r, align 8
-// CHECK-LABEL: define i32* @_Z1gv()
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) i32* @_Z1gv()
// CHECK: call i32* @_ZTW1r()
// CHECK: ret i32* %{{.*}}
diff --git a/test/CodeGenCXX/cxx11-thread-local.cpp b/test/CodeGenCXX/cxx11-thread-local.cpp
index 509562dd8fc1..a3690b352989 100644
--- a/test/CodeGenCXX/cxx11-thread-local.cpp
+++ b/test/CodeGenCXX/cxx11-thread-local.cpp
@@ -21,7 +21,7 @@ template<typename T> thread_local int V<T>::m = g();
// CHECK: @e = global i32 0
int e = V<int>::m;
-// CHECK: @_ZN1VIiE1mE = weak_odr thread_local global i32 0
+// CHECK: @_ZN1VIiE1mE = linkonce_odr thread_local global i32 0
// CHECK: @_ZZ1fvE1n = internal thread_local global i32 0
@@ -35,9 +35,9 @@ int e = V<int>::m;
// CHECK: @_ZZ8tls_dtorvE1u = internal thread_local global
// CHECK: @_ZGVZ8tls_dtorvE1u = internal thread_local global i8 0
-// CHECK: @_ZGRZ8tls_dtorvE1u = private thread_local global
+// CHECK: @_ZGRZ8tls_dtorvE1u_ = internal thread_local global
-// CHECK: @_ZGVN1VIiE1mE = weak_odr thread_local global i64 0
+// CHECK: @_ZGVN1VIiE1mE = linkonce_odr thread_local global i64 0
// CHECK: @__tls_guard = internal thread_local global i8 0
@@ -46,7 +46,7 @@ int e = V<int>::m;
// CHECK: @_ZTH1a = alias void ()* @__tls_init
// CHECK: @_ZTHL1d = alias internal void ()* @__tls_init
// CHECK: @_ZTHN1U1mE = alias void ()* @__tls_init
-// CHECK: @_ZTHN1VIiE1mE = alias weak_odr void ()* @__tls_init
+// CHECK: @_ZTHN1VIiE1mE = alias linkonce_odr void ()* @__tls_init
// Individual variable initialization functions:
@@ -120,8 +120,8 @@ void tls_dtor() {
static thread_local T t;
// CHECK: load i8* @_ZGVZ8tls_dtorvE1u
- // CHECK: call void @_ZN1SC1Ev(%struct.S* @_ZGRZ8tls_dtorvE1u)
- // CHECK: call i32 @__cxa_thread_atexit({{.*}}@_ZN1SD1Ev {{.*}} @_ZGRZ8tls_dtorvE1u{{.*}} @__dso_handle
+ // CHECK: call void @_ZN1SC1Ev(%struct.S* @_ZGRZ8tls_dtorvE1u_)
+ // CHECK: call i32 @__cxa_thread_atexit({{.*}}@_ZN1SD1Ev {{.*}} @_ZGRZ8tls_dtorvE1u_{{.*}} @__dso_handle
// CHECK: store i8 1, i8* @_ZGVZ8tls_dtorvE1u
static thread_local const S &u = S();
}
@@ -135,6 +135,24 @@ int PR15991() {
return l();
}
+struct PR19254 {
+ static thread_local int n;
+ int f();
+};
+// CHECK: define {{.*}} @_ZN7PR192541fEv(
+int PR19254::f() {
+ // CHECK: call void @_ZTHN7PR192541nE(
+ return this->n;
+}
+
+namespace {
+thread_local int anon_i{1};
+}
+void set_anon_i() {
+ anon_i = 2;
+}
+// CHECK-LABEL: define internal i32* @_ZTWN12_GLOBAL__N_16anon_iE()
+
// CHECK: define {{.*}} @[[V_M_INIT:.*]]()
// CHECK: load i8* bitcast (i64* @_ZGVN1VIiE1mE to i8*)
// CHECK: %[[V_M_INITIALIZED:.*]] = icmp eq i8 %{{.*}}, 0
@@ -171,7 +189,7 @@ int PR15991() {
// CHECK: declare extern_weak void @_ZTH1b()
-// CHECK-LABEL: define internal hidden i32* @_ZTWL1d()
+// CHECK-LABEL: define internal i32* @_ZTWL1d()
// CHECK: call void @_ZTHL1d()
// CHECK: ret i32* @_ZL1d
diff --git a/test/CodeGenCXX/cxx11-unrestricted-union.cpp b/test/CodeGenCXX/cxx11-unrestricted-union.cpp
index 0397775b7e3c..2f22ad2f964a 100644
--- a/test/CodeGenCXX/cxx11-unrestricted-union.cpp
+++ b/test/CodeGenCXX/cxx11-unrestricted-union.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++11 -emit-llvm %s -o - | FileCheck %s
struct A {
A(); A(const A&); A(A&&); A &operator=(const A&); A &operator=(A&&); ~A();
diff --git a/test/CodeGenCXX/cxx1y-initializer-aggregate.cpp b/test/CodeGenCXX/cxx1y-initializer-aggregate.cpp
index ae49a047f624..8bdf8633d61e 100644
--- a/test/CodeGenCXX/cxx1y-initializer-aggregate.cpp
+++ b/test/CodeGenCXX/cxx1y-initializer-aggregate.cpp
@@ -46,7 +46,7 @@ B z { 1 };
// CHECK: store i8 %{{.*}}, i8* getelementptr inbounds ({{.*}} @a, i32 0, i32 2)
// CHECK: call i32 @_ZN1A1fEv({{.*}} @a)
// CHECK: store i32 %{{.*}}, i32* getelementptr inbounds ({{.*}}* @a, i32 0, i32 3)
-// CHECK: call void @{{.*}}C1Ev({{.*}} getelementptr inbounds (%struct.A* @a, i32 0, i32 4))
+// CHECK: store double 1.000000e+00, double* getelementptr inbounds ({{.*}} @a, i32 0, i32 4, i32 0)
// No dynamic initialization of 'b':
diff --git a/test/CodeGenCXX/cxx1y-variable-template.cpp b/test/CodeGenCXX/cxx1y-variable-template.cpp
index d1e70603e280..cd73817d8508 100644
--- a/test/CodeGenCXX/cxx1y-variable-template.cpp
+++ b/test/CodeGenCXX/cxx1y-variable-template.cpp
@@ -18,7 +18,7 @@ int init_arr();
template<typename T> template<typename U> template<typename V> int Outer<T>::Inner<U>::arr[sizeof(T) + sizeof(U) + sizeof(V)] = { init_arr() };
int *p = Outer<char[100]>::Inner<char[20]>::arr<char[3]>;
-// CHECK: @_ZN5OuterIA100_cE5InnerIA20_cE3arrIA3_cEE = weak_odr global [123 x i32] zeroinitializer
-// CHECK: @_ZGVN5OuterIA100_cE5InnerIA20_cE3arrIA3_cEE = weak_odr global
+// CHECK: @_ZN5OuterIA100_cE5InnerIA20_cE3arrIA3_cEE = linkonce_odr global [123 x i32] zeroinitializer
+// CHECK: @_ZGVN5OuterIA100_cE5InnerIA20_cE3arrIA3_cEE = linkonce_odr global
// CHECK: call {{.*}}@_Z8init_arrv
diff --git a/test/CodeGenCXX/debug-info-alias.cpp b/test/CodeGenCXX/debug-info-alias.cpp
new file mode 100644
index 000000000000..fb18ac5da006
--- /dev/null
+++ b/test/CodeGenCXX/debug-info-alias.cpp
@@ -0,0 +1,37 @@
+// RUN: %clang -g -std=c++11 -S -emit-llvm %s -o - | FileCheck %s
+
+template<typename T>
+struct foo {
+};
+namespace x {
+// splitting these over multiple lines to make sure the right token is used for
+// the location
+template<typename T>
+using
+# 42
+bar
+= foo<T*>;
+}
+
+// CHECK: metadata [[BINT:![0-9]*]], i32 0, i32 1, {{.*}} ; [ DW_TAG_variable ] [bi]
+// CHECK: [[BINT]] = {{.*}} ; [ DW_TAG_typedef ] [bar<int>] [line 42
+x::bar<int> bi;
+// CHECK: metadata [[BFLOAT:![0-9]*]], i32 0, i32 1, {{.*}} ; [ DW_TAG_variable ] [bf]
+// CHECK: [[BFLOAT]] = {{.*}} ; [ DW_TAG_typedef ] [bar<float>] [line 42
+x::bar<float> bf;
+
+using
+// CHECK: metadata [[NARF:![0-9]*]], i32 0, i32 1, {{.*}} ; [ DW_TAG_variable ] [n]
+# 142
+narf // CHECK: [[NARF]] = {{.*}} ; [ DW_TAG_typedef ] [narf] [line 142
+= int;
+narf n;
+
+template <typename T>
+using tv = void;
+// CHECK: null} ; [ DW_TAG_typedef ] [tv<int>] {{.*}} [from ]
+tv<int> *tvp;
+
+using v = void;
+// CHECK: null} ; [ DW_TAG_typedef ] [v] {{.*}} [from ]
+v *vp;
diff --git a/test/CodeGenCXX/debug-info-anon-union-vars.cpp b/test/CodeGenCXX/debug-info-anon-union-vars.cpp
new file mode 100644
index 000000000000..396b7e94a8ea
--- /dev/null
+++ b/test/CodeGenCXX/debug-info-anon-union-vars.cpp
@@ -0,0 +1,28 @@
+// RUN: %clang_cc1 -emit-llvm -gdwarf-4 -triple x86_64-linux-gnu %s -o - | FileCheck %s
+
+// Make sure that we emit a global variable for each of the members of the
+// anonymous union.
+
+static union {
+ int c;
+ int d;
+ union {
+ int a;
+ };
+ struct {
+ int b;
+ };
+};
+
+int test_it() {
+ c = 1;
+ d = 2;
+ a = 4;
+ return (c == 1);
+}
+
+// CHECK: [[FILE:.*]] = {{.*}}[ DW_TAG_file_type ] [{{.*}}debug-info-anon-union-vars.cpp]
+// CHECK: [[FILE]]{{.*}}[ DW_TAG_variable ] [c] [line 6] [local] [def]
+// CHECK: [[FILE]]{{.*}}[ DW_TAG_variable ] [d] [line 6] [local] [def]
+// CHECK: [[FILE]]{{.*}}[ DW_TAG_variable ] [a] [line 6] [local] [def]
+// CHECK: [[FILE]]{{.*}}[ DW_TAG_variable ] [b] [line 6] [local] [def]
diff --git a/test/CodeGenCXX/debug-info-byval.cpp b/test/CodeGenCXX/debug-info-byval.cpp
index e6317fc2de0e..5b0850b9643c 100644
--- a/test/CodeGenCXX/debug-info-byval.cpp
+++ b/test/CodeGenCXX/debug-info-byval.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang -g -S %s -o - | FileCheck %s
+// FIXME: Check IR rather than asm, then triple is not needed.
+// RUN: %clang -Xclang -triple=%itanium_abi_triple -g -S %s -o - | FileCheck %s
// Test to check presence of debug info for byval parameter.
// Radar 8350436.
class DAG {
diff --git a/test/CodeGenCXX/debug-info-char16.cpp b/test/CodeGenCXX/debug-info-char16.cpp
index 06a05b31dd1c..e6e2f1521bd7 100644
--- a/test/CodeGenCXX/debug-info-char16.cpp
+++ b/test/CodeGenCXX/debug-info-char16.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -std=c++11 -g %s -o -| FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -std=c++11 -g %s -o -| FileCheck %s
// 16 is DW_ATE_UTF (0x10) encoding attribute.
char16_t char_a = u'h';
diff --git a/test/CodeGenCXX/debug-info-class-limited-plugin.test b/test/CodeGenCXX/debug-info-class-limited-plugin.test
new file mode 100644
index 000000000000..61d258d9ffc4
--- /dev/null
+++ b/test/CodeGenCXX/debug-info-class-limited-plugin.test
@@ -0,0 +1,2 @@
+RUN: %clang_cc1 -emit-llvm -fno-standalone-debug -g -o - -load %llvmshlibdir/PrintFunctionNames%pluginext -add-plugin print-function-names %S/Inputs/debug-info-class-limited.cpp 2>&1 | FileCheck %S/Inputs/debug-info-class-limited.cpp
+REQUIRES: plugins, examples
diff --git a/test/CodeGenCXX/debug-info-class-limited.cpp b/test/CodeGenCXX/debug-info-class-limited.cpp
deleted file mode 100644
index a4b9f46ec653..000000000000
--- a/test/CodeGenCXX/debug-info-class-limited.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-// RUN: %clang -emit-llvm -g -S %s -o - | FileCheck %s
-
-namespace PR16214_1 {
-// CHECK-DAG: [ DW_TAG_structure_type ] [foo] [line [[@LINE+1]], {{.*}} [def]
-struct foo {
- int i;
-};
-
-typedef foo bar;
-
-bar *a;
-bar b;
-}
-
-namespace PR14467 {
-// CHECK-DAG: [ DW_TAG_structure_type ] [foo] [line [[@LINE+1]], {{.*}} [def]
-struct foo {
-};
-
-foo *bar(foo *a) {
- foo *b = new foo(*a);
- return b;
-}
-}
-
-namespace test1 {
-// CHECK-DAG: [ DW_TAG_structure_type ] [foo] [line [[@LINE+1]], {{.*}} [decl]
-struct foo {
-};
-
-extern int bar(foo *a);
-int baz(foo *a) {
- return bar(a);
-}
-}
-
-namespace test2 {
-// FIXME: if we were a bit fancier, we could realize that the 'foo' type is only
-// required because of the 'bar' type which is not required at all (or might
-// only be required to be declared)
-// CHECK-DAG: [ DW_TAG_structure_type ] [foo] [line [[@LINE+1]], {{.*}} [def]
-struct foo {
-};
-
-struct bar {
- foo f;
-};
-
-void func() {
- foo *f;
-}
-}
diff --git a/test/CodeGenCXX/debug-info-class-limited.test b/test/CodeGenCXX/debug-info-class-limited.test
new file mode 100644
index 000000000000..0b10728f3c97
--- /dev/null
+++ b/test/CodeGenCXX/debug-info-class-limited.test
@@ -0,0 +1 @@
+RUN: %clang_cc1 -emit-llvm -fno-standalone-debug -g %S/Inputs/debug-info-class-limited.cpp -o - | FileCheck %S/Inputs/debug-info-class-limited.cpp
diff --git a/test/CodeGenCXX/debug-info-class-nolimit.cpp b/test/CodeGenCXX/debug-info-class-nolimit.cpp
index ce72bd347cab..7a6ee4d441a9 100644
--- a/test/CodeGenCXX/debug-info-class-nolimit.cpp
+++ b/test/CodeGenCXX/debug-info-class-nolimit.cpp
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-unk-unk -fno-limit-debug-info -o - -emit-llvm -g %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unk-unk -fstandalone-debug -o - -emit-llvm -g %s | FileCheck %s
+// On Darwin, this should be the default:
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -o - -emit-llvm -g %s | FileCheck %s
namespace rdar14101097_1 { // see also PR16214
// Check that we emit debug info for the definition of a struct if the
diff --git a/test/CodeGenCXX/debug-info-class.cpp b/test/CodeGenCXX/debug-info-class.cpp
index e1402c96f043..34add0432c49 100644
--- a/test/CodeGenCXX/debug-info-class.cpp
+++ b/test/CodeGenCXX/debug-info-class.cpp
@@ -102,13 +102,9 @@ int main(int argc, char **argv) {
// CHECK: [[C_S]] = {{.*}} ; [ DW_TAG_member ] [s] {{.*}} [static] [from int]
// CHECK: [[C_DTOR]] = {{.*}} ; [ DW_TAG_subprogram ] {{.*}} [~C]
-// CHECK: metadata [[D_MEM:![0-9]*]], i32 0, null, null, metadata !"_ZTS1D"} ; [ DW_TAG_structure_type ] [D] {{.*}} [decl]
-// CHECK: [[D_MEM]] = metadata !{metadata [[D_FUNC:![0-9]*]]}
-// CHECK: [[D_FUNC]] = {{.*}} ; [ DW_TAG_subprogram ] {{.*}} [func]
+// CHECK: null, i32 0, null, null, metadata !"_ZTS1D"} ; [ DW_TAG_structure_type ] [D] {{.*}} [decl]
// CHECK: null, i32 0, null, null, metadata !"_ZTS1E"} ; [ DW_TAG_structure_type ] [E] {{.*}} [decl]
-// CHECK: [[F:![0-9]*]] = {{.*}} metadata [[F_MEM:![0-9]*]], i32 0, null, null, metadata !"_ZTS1F"} ; [ DW_TAG_structure_type ] [F] {{.*}} [decl]
-// CHECK: [[F_MEM]] = metadata !{metadata [[F_I:![0-9]*]]}
-// CHECK: [[F_I]] = {{.*}} ; [ DW_TAG_member ] [i]
+// CHECK: [[F:![0-9]*]] = {{.*}} null, i32 0, null, null, metadata !"_ZTS1F"} ; [ DW_TAG_structure_type ] [F] {{.*}} [decl]
// CHECK: null, i32 0, null, null, metadata !"_ZTS1G"} ; [ DW_TAG_structure_type ] [G] {{.*}} [decl]
// CHECK: metadata [[G_INNER_MEM:![0-9]*]], i32 0, null, null, metadata !"_ZTSN1G5innerE"} ; [ DW_TAG_structure_type ] [inner] [line 50, {{.*}} [def]
@@ -118,8 +114,13 @@ int main(int argc, char **argv) {
// CHECK: ; [ DW_TAG_structure_type ] [A]
// CHECK: HdrSize
// CHECK: ; [ DW_TAG_structure_type ] [I] {{.*}} [def]
+//
+// CHECK: metadata !"_ZTS1D", {{.*}}, metadata [[D_FUNC_DECL:![0-9]*]], metadata {{![0-9]*}}, i32 {{[0-9]*}}} ; [ DW_TAG_subprogram ] {{.*}} [def] [func]
+// CHECK: [[D_FUNC_DECL]] = {{.*}}, metadata !"_ZTS1D", {{.*}}, i32 0, null, i32 {{[0-9]*}}} ; [ DW_TAG_subprogram ] {{.*}} [func]
-// CHECK: [[F_I_DEF:![0-9]*]] = {{.*}}, metadata [[F_I]]} ; [ DW_TAG_variable ] [i]
+// CHECK: [[F_I_DEF:![0-9]*]] = {{.*}}, metadata [[F_I:![0-9]*]]} ; [ DW_TAG_variable ] [i]
+
+// CHECK: [[F_I]] = {{.*}}, metadata !"_ZTS1F", {{.*}} ; [ DW_TAG_member ] [i]
// CHECK: ![[EXCEPTLOC]] = metadata !{i32 84,
// CHECK: ![[RETLOC]] = metadata !{i32 83,
diff --git a/test/CodeGenCXX/debug-info-ctor2.cpp b/test/CodeGenCXX/debug-info-ctor2.cpp
index 19bd64b3cdad..3bc931e98448 100644
--- a/test/CodeGenCXX/debug-info-ctor2.cpp
+++ b/test/CodeGenCXX/debug-info-ctor2.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang -fverbose-asm -g -S %s -o - | grep AT_explicit
+// FIXME: Check IR rather than asm, then triple is not needed.
+// RUN: %clang -Xclang -triple=%itanium_abi_triple -fverbose-asm -g -S %s -o - | grep AT_explicit
class MyClass
diff --git a/test/CodeGenCXX/debug-info-dup-fwd-decl.cpp b/test/CodeGenCXX/debug-info-dup-fwd-decl.cpp
index 04fe7a03e168..1b9a055527d0 100644
--- a/test/CodeGenCXX/debug-info-dup-fwd-decl.cpp
+++ b/test/CodeGenCXX/debug-info-dup-fwd-decl.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin -fno-limit-debug-info %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin -fstandalone-debug %s -o - | FileCheck %s
class Test
{
diff --git a/test/CodeGenCXX/debug-info-enum-class.cpp b/test/CodeGenCXX/debug-info-enum-class.cpp
index 0f4b09afb5dd..f0b97ccd2c8e 100644
--- a/test/CodeGenCXX/debug-info-enum-class.cpp
+++ b/test/CodeGenCXX/debug-info-enum-class.cpp
@@ -12,7 +12,6 @@ D d;
// CHECK: ; [ DW_TAG_enumeration_type ] [A] [line 3, size 32, align 32, offset 0] [def] [from int]
// CHECK: ; [ DW_TAG_enumeration_type ] [B] [line 4, size 64, align 64, offset 0] [def] [from long unsigned int]
// CHECK: ; [ DW_TAG_enumeration_type ] [C] [line 5, size 32, align 32, offset 0] [def] [from ]
-// CHECK: ; [ DW_TAG_enumeration_type ] [D] [line 6, size 16, align 16, offset 0] [decl] [from ]
namespace PR14029 {
// Make sure this doesn't crash/assert.
@@ -27,3 +26,54 @@ namespace PR14029 {
};
Test<int> t;
}
+
+namespace test2 {
+// FIXME: this should just be a declaration under -fno-standalone-debug
+// CHECK: metadata !{i32 {{[^,]*}}, {{[^,]*}}, metadata [[TEST2:![0-9]*]], {{.*}}, metadata [[TEST_ENUMS:![0-9]*]], {{[^,]*}}, null, null, metadata !"_ZTSN5test21EE"} ; [ DW_TAG_enumeration_type ] [E]
+// CHECK: [[TEST2]] = {{.*}} ; [ DW_TAG_namespace ] [test2]
+// CHECK: [[TEST_ENUMS]] = metadata !{metadata [[TEST_E:![0-9]*]]}
+// CHECK: [[TEST_E]] = {{.*}}, metadata !"e", i64 0} ; [ DW_TAG_enumerator ] [e :: 0]
+enum E : int;
+void func(E *) {
+}
+enum E : int { e };
+}
+
+namespace test3 {
+// FIXME: this should just be a declaration under -fno-standalone-debug
+// CHECK: metadata !{i32 {{[^,]*}}, {{[^,]*}}, metadata [[TEST3:![0-9]*]], {{.*}}, metadata [[TEST_ENUMS]], {{[^,]*}}, null, null, metadata !"_ZTSN5test31EE"} ; [ DW_TAG_enumeration_type ] [E]
+// CHECK: [[TEST3]] = {{.*}} ; [ DW_TAG_namespace ] [test3]
+enum E : int { e };
+void func(E *) {
+}
+}
+
+namespace test4 {
+// CHECK: metadata !{i32 {{[^,]*}}, {{[^,]*}}, metadata [[TEST4:![0-9]*]], {{.*}}, metadata [[TEST_ENUMS]], {{[^,]*}}, null, null, metadata !"_ZTSN5test41EE"} ; [ DW_TAG_enumeration_type ] [E]
+// CHECK: [[TEST4]] = {{.*}} ; [ DW_TAG_namespace ] [test4]
+enum E : int;
+void f1(E *) {
+}
+enum E : int { e };
+void f2(E) {
+}
+}
+
+// CHECK: ; [ DW_TAG_enumeration_type ] [D] [line 6, size 16, align 16, offset 0] [decl] [from ]
+
+namespace test5 {
+// CHECK: metadata !{i32 {{[^,]*}}, {{[^,]*}}, metadata [[TEST5:![0-9]*]], {{.*}}, null, {{[^,]*}}, null, null, metadata !"_ZTSN5test51EE"} ; [ DW_TAG_enumeration_type ] [E]
+// CHECK: [[TEST5]] = {{.*}} ; [ DW_TAG_namespace ] [test5]
+enum E : int;
+void f1(E *) {
+}
+}
+
+namespace test6 {
+// Ensure typedef'd enums aren't manifest by debug info generation.
+// This could cause "typedef changes linkage of anonymous type, but linkage was
+// already computed" errors.
+// CHECK-NOT: test7
+typedef enum {
+} E;
+}
diff --git a/test/CodeGenCXX/debug-info-enum.cpp b/test/CodeGenCXX/debug-info-enum.cpp
index f0e2608db856..810c3ee7ae9b 100644
--- a/test/CodeGenCXX/debug-info-enum.cpp
+++ b/test/CodeGenCXX/debug-info-enum.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -g %s -o - | FileCheck %s
// CHECK: [[ENUMS:![0-9]*]], {{[^,]*}}, {{[^,]*}}, {{[^,]*}}, {{[^,]*}}, {{[^,]*}}} ; [ DW_TAG_compile_unit ]
// CHECK: [[ENUMS]] = metadata !{metadata [[E1:![0-9]*]], metadata [[E2:![0-9]*]], metadata [[E3:![0-9]*]]}
@@ -34,3 +34,12 @@ void func() {
e x;
}
}
+
+namespace test4 {
+// Don't try to build debug info for a dependent enum.
+// CHECK-NOT: test4
+template <typename T>
+struct S {
+ enum e { E = T::v };
+};
+}
diff --git a/test/CodeGenCXX/debug-info-function-context.cpp b/test/CodeGenCXX/debug-info-function-context.cpp
index 4ca1c8d1eced..e65d3289f8b1 100644
--- a/test/CodeGenCXX/debug-info-function-context.cpp
+++ b/test/CodeGenCXX/debug-info-function-context.cpp
@@ -29,8 +29,8 @@ int global_namespace_variable = 1;
// CHECK: metadata !"_ZTS1C", metadata !"static_member_function"{{.*}} [ DW_TAG_subprogram ] [line 13] [def] [static_member_function]
-// CHECK: metadata !22, metadata !"global_function"{{.*}} [ DW_TAG_subprogram ] [line 17] [def] [global_function]
-// CHECK: !22 = {{.*}} [ DW_TAG_file_type ]
+// CHECK: metadata [[FILE:![0-9]*]], metadata !"global_function"{{.*}} [ DW_TAG_subprogram ] [line 17] [def] [global_function]
+// CHECK: [[FILE]] = {{.*}} [ DW_TAG_file_type ]
-// CHECK: metadata !24, metadata !"global_namespace_function"{{.*}} [ DW_TAG_subprogram ] [line 20] [def] [global_namespace_function]
-// CHECK: !24 = {{.*}} [ DW_TAG_namespace ] [ns] [line 19]
+// CHECK: metadata [[NS:![0-9]*]], metadata !"global_namespace_function"{{.*}} [ DW_TAG_subprogram ] [line 20] [def] [global_namespace_function]
+// CHECK: [[NS]] = {{.*}} [ DW_TAG_namespace ] [ns] [line 19]
diff --git a/test/CodeGenCXX/debug-info-gline-tables-only.cpp b/test/CodeGenCXX/debug-info-gline-tables-only.cpp
index 7ecdeb2ec22e..b766c73cc22a 100644
--- a/test/CodeGenCXX/debug-info-gline-tables-only.cpp
+++ b/test/CodeGenCXX/debug-info-gline-tables-only.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -gline-tables-only -S -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -fno-rtti -gline-tables-only -S -emit-llvm -o - | FileCheck %s
// Checks that clang with "-gline-tables-only" doesn't emit debug info
// for variables and types.
diff --git a/test/CodeGenCXX/debug-info-global-ctor-dtor.cpp b/test/CodeGenCXX/debug-info-global-ctor-dtor.cpp
index afa77077a25d..28b1fab31bc7 100644
--- a/test/CodeGenCXX/debug-info-global-ctor-dtor.cpp
+++ b/test/CodeGenCXX/debug-info-global-ctor-dtor.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 %s -g -fno-use-cxa-atexit -S -emit-llvm -o - \
+// RUN: %clang_cc1 %s -g -triple %itanium_abi_triple -fno-use-cxa-atexit -S -emit-llvm -o - \
// RUN: | FileCheck %s --check-prefix=CHECK-NOKEXT
-// RUN: %clang_cc1 %s -g -fno-use-cxa-atexit -fapple-kext -S -emit-llvm -o - \
+// RUN: %clang_cc1 %s -g -triple %itanium_abi_triple -fno-use-cxa-atexit -fapple-kext -S -emit-llvm -o - \
// RUN: | FileCheck %s --check-prefix=CHECK-KEXT
class A {
diff --git a/test/CodeGenCXX/debug-info-global.cpp b/test/CodeGenCXX/debug-info-global.cpp
new file mode 100644
index 000000000000..8dc30c892316
--- /dev/null
+++ b/test/CodeGenCXX/debug-info-global.cpp
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -emit-llvm -g %s -o - | FileCheck %s
+
+// Multiple references to the same constant should result in only one entry in
+// the globals list.
+
+namespace ns {
+const int cnst = 42;
+}
+int f1() {
+ return ns::cnst + ns::cnst;
+}
+
+// CHECK: metadata [[GLOBALS:![0-9]*]], metadata {{![0-9]*}}, metadata !"{{.*}}", i32 {{[0-9]*}}} ; [ DW_TAG_compile_unit ]
+
+// CHECK: [[GLOBALS]] = metadata !{metadata [[CNST:![0-9]*]]}
+
+// CHECK: [[CNST]] = {{.*}}, metadata [[NS:![0-9]*]], metadata !"cnst", {{.*}}; [ DW_TAG_variable ] [cnst]
+// CHECK: [[NS]] = {{.*}}; [ DW_TAG_namespace ] [ns]
+
diff --git a/test/CodeGenCXX/debug-info-indirect-field-decl.cpp b/test/CodeGenCXX/debug-info-indirect-field-decl.cpp
new file mode 100644
index 000000000000..131cebae4875
--- /dev/null
+++ b/test/CodeGenCXX/debug-info-indirect-field-decl.cpp
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
+//
+// Test that indirect field decls are handled gracefully.
+// rdar://problem/16348575
+//
+template <class T, int T::*ptr> class Foo { };
+
+struct Bar {
+ int i1;
+ // CHECK: [ DW_TAG_member ] [line [[@LINE+1]], size 32, align 32, offset 32] [from _ZTSN3BarUt_E]
+ union {
+ // CHECK: [ DW_TAG_member ] [i2] [line [[@LINE+1]], size 32, align 32, offset 0] [from int]
+ int i2;
+ };
+};
+
+Foo<Bar, &Bar::i2> the_foo;
diff --git a/test/CodeGenCXX/debug-info-limited.cpp b/test/CodeGenCXX/debug-info-limited.cpp
index 54a2424fddd9..294d1f6b6d20 100644
--- a/test/CodeGenCXX/debug-info-limited.cpp
+++ b/test/CodeGenCXX/debug-info-limited.cpp
@@ -11,8 +11,7 @@ A *foo (A* x) {
return a;
}
-// Verify that we're not emitting a full definition of B in limit debug mode.
-// CHECK: ; [ DW_TAG_class_type ] [B] {{.*}} [decl]
+// CHECK: ; [ DW_TAG_class_type ] [B] {{.*}} [def]
class B {
public:
diff --git a/test/CodeGenCXX/debug-info-line-if.cpp b/test/CodeGenCXX/debug-info-line-if.cpp
new file mode 100644
index 000000000000..e14090f03f98
--- /dev/null
+++ b/test/CodeGenCXX/debug-info-line-if.cpp
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -g -std=c++11 -S -emit-llvm %s -o - | FileCheck %s
+// PR19864
+int main() {
+ int v[] = {13, 21, 8, 3, 34, 1, 5, 2};
+ int a = 0, b = 0;
+ for (int x : v)
+ if (x >= 3)
+ ++b; // CHECK: add nsw{{.*}}, 1
+ else if (x >= 0)
+ ++a; // CHECK: add nsw{{.*}}, 1
+ // The continuation block if the if statement should not share the
+ // location of the ++a statement. Having it point to the end of
+ // the condition is not ideal either, but it's less missleading.
+
+ // CHECK: br label
+ // CHECK: br label
+ // CHECK: br label {{.*}}, !dbg ![[DBG:.*]]
+ // CHECK: ![[DBG]] = metadata !{i32 [[@LINE-11]], i32 0, metadata !{{.*}}, null}
+
+}
diff --git a/test/CodeGenCXX/debug-info-member.cpp b/test/CodeGenCXX/debug-info-member.cpp
index 8c2e3ebded4b..7ba97b5b54e7 100644
--- a/test/CodeGenCXX/debug-info-member.cpp
+++ b/test/CodeGenCXX/debug-info-member.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang -fverbose-asm -g -S %s -o - | grep DW_ACCESS_public
+// FIXME: Check IR rather than asm, then triple is not needed.
+// RUN: %clang -Xclang -triple=%itanium_abi_triple -fverbose-asm -g -S %s -o - | grep DW_ACCESS_public
class A {
public:
int x;
diff --git a/test/CodeGenCXX/debug-info-method-spec.cpp b/test/CodeGenCXX/debug-info-method-spec.cpp
index 2068c5ce4fad..c00da004f456 100644
--- a/test/CodeGenCXX/debug-info-method-spec.cpp
+++ b/test/CodeGenCXX/debug-info-method-spec.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang -fverbose-asm -g -S %s -o - | grep DW_AT_specification
+// FIXME: Check IR rather than asm, then triple is not needed.
+// RUN: %clang -Xclang -triple=%itanium_abi_triple -fverbose-asm -g -S %s -o - | grep DW_AT_specification
// Radar 9254491
class A {
public:
diff --git a/test/CodeGenCXX/debug-info-method.cpp b/test/CodeGenCXX/debug-info-method.cpp
index 50b3f66354e0..49b8dc47855d 100644
--- a/test/CodeGenCXX/debug-info-method.cpp
+++ b/test/CodeGenCXX/debug-info-method.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -std=c++11 -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -std=c++11 -g %s -o - | FileCheck %s
// CHECK: metadata !"_ZTS1A"} ; [ DW_TAG_class_type ] [A]
// CHECK: metadata !"_ZN1A3fooEiS_3$_0", {{.*}} [protected]
// CHECK: ![[THISTYPE:[0-9]+]] = {{.*}} ; [ DW_TAG_pointer_type ] {{.*}} [artificial] [from _ZTS1A]
diff --git a/test/CodeGenCXX/debug-info-method2.cpp b/test/CodeGenCXX/debug-info-method2.cpp
index a927c49d307a..a365312b2584 100644
--- a/test/CodeGenCXX/debug-info-method2.cpp
+++ b/test/CodeGenCXX/debug-info-method2.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -flimit-debug-info -x c++ -g -S -emit-llvm < %s | FileCheck %s
+// RUN: %clang_cc1 -fno-standalone-debug -x c++ -g -S -emit-llvm < %s | FileCheck %s
// rdar://10336845
// Preserve type qualifiers in -flimit-debug-info mode.
diff --git a/test/CodeGenCXX/debug-info-namespace.cpp b/test/CodeGenCXX/debug-info-namespace.cpp
index a2d7ede1643e..a1284d2d2771 100644
--- a/test/CodeGenCXX/debug-info-namespace.cpp
+++ b/test/CodeGenCXX/debug-info-namespace.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang -g -S -emit-llvm %s -o - | FileCheck %s
-// RUN: %clang -g -gline-tables-only -S -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-GMLT %s
-// RUN: %clang -g -fno-limit-debug-info -S -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-NOLIMIT %s
+// RUN: %clang_cc1 -g -fno-standalone-debug -S -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -g -gline-tables-only -S -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-GMLT %s
+// RUN: %clang_cc1 -g -fstandalone-debug -S -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-NOLIMIT %s
namespace A {
#line 1 "foo.cpp"
@@ -36,42 +36,48 @@ int func(bool b) {
return i + X::B::i + Y::B::i;
}
+namespace A {
+using B::i;
+}
+
// This should work even if 'i' and 'func' were declarations & not definitions,
// but it doesn't yet.
-// CHECK: [[CU:![0-9]*]] = {{.*}}[[MODULES:![0-9]*]], metadata !""} ; [ DW_TAG_compile_unit ]
-// CHECK: [[FILE:![0-9]*]] {{.*}}debug-info-namespace.cpp"
+// CHECK: [[CU:![0-9]*]] = {{.*}}[[MODULES:![0-9]*]], metadata !"", i32 1} ; [ DW_TAG_compile_unit ]
// CHECK: [[FOO:![0-9]*]] {{.*}} ; [ DW_TAG_structure_type ] [foo] [line 5, size 0, align 0, offset 0] [decl] [from ]
// CHECK: [[FOOCPP:![0-9]*]] = metadata !{metadata !"foo.cpp", {{.*}}
// CHECK: [[NS:![0-9]*]] = {{.*}}, metadata [[FILE2:![0-9]*]], metadata [[CTXT:![0-9]*]], {{.*}} ; [ DW_TAG_namespace ] [B] [line 1]
-// CHECK: [[CTXT]] = {{.*}}, metadata [[FILE]], null, {{.*}} ; [ DW_TAG_namespace ] [A] [line 5]
+// CHECK: [[CTXT]] = {{.*}}, metadata [[FILE:![0-9]*]], null, {{.*}} ; [ DW_TAG_namespace ] [A] [line 5]
+// CHECK: [[FILE]] {{.*}}debug-info-namespace.cpp"
// CHECK: [[BAR:![0-9]*]] {{.*}} ; [ DW_TAG_structure_type ] [bar] [line 6, {{.*}}] [decl] [from ]
// CHECK: [[F1:![0-9]*]] {{.*}} ; [ DW_TAG_subprogram ] [line 4] [def] [f1]
// CHECK: [[FUNC:![0-9]*]] {{.*}} ; [ DW_TAG_subprogram ] {{.*}} [def] [func]
// CHECK: [[FILE2]]} ; [ DW_TAG_file_type ] [{{.*}}foo.cpp]
// CHECK: [[I:![0-9]*]] = {{.*}}, metadata [[NS]], metadata !"i", {{.*}} ; [ DW_TAG_variable ] [i]
-// CHECK: [[MODULES]] = metadata !{metadata [[M1:![0-9]*]], metadata [[M2:![0-9]*]], metadata [[M3:![0-9]*]], metadata [[M4:![0-9]*]], metadata [[M5:![0-9]*]], metadata [[M6:![0-9]*]], metadata [[M7:![0-9]*]], metadata [[M8:![0-9]*]], metadata [[M9:![0-9]*]], metadata [[M10:![0-9]*]], metadata [[M11:![0-9]*]], metadata [[M12:![0-9]*]]}
+// CHECK: [[MODULES]] = metadata !{metadata [[M1:![0-9]*]], metadata [[M2:![0-9]*]], metadata [[M3:![0-9]*]], metadata [[M4:![0-9]*]], metadata [[M5:![0-9]*]], metadata [[M6:![0-9]*]], metadata [[M7:![0-9]*]], metadata [[M8:![0-9]*]], metadata [[M9:![0-9]*]], metadata [[M10:![0-9]*]], metadata [[M11:![0-9]*]], metadata [[M12:![0-9]*]], metadata [[M13:![0-9]*]]}
// CHECK: [[M1]] = metadata !{i32 {{[0-9]*}}, metadata [[CTXT]], metadata [[NS]], i32 11} ; [ DW_TAG_imported_module ]
// CHECK: [[M2]] = metadata !{i32 {{[0-9]*}}, metadata [[CU]], metadata [[CTXT]], i32 {{[0-9]*}}} ; [ DW_TAG_imported_module ]
-// CHECK: [[M3]] = metadata !{i32 {{[0-9]*}}, metadata [[CU]], metadata [[CTXT]], i32 15, metadata !"E"} ; [ DW_TAG_imported_module ]
+// CHECK: [[M3]] = metadata !{i32 {{[0-9]*}}, metadata [[CU]], metadata [[CTXT]], i32 15, metadata !"E"} ; [ DW_TAG_imported_declaration ]
// CHECK: [[M4]] = metadata !{i32 {{[0-9]*}}, metadata [[LEX2:![0-9]*]], metadata [[NS]], i32 19} ; [ DW_TAG_imported_module ]
// CHECK: [[LEX2]] = metadata !{i32 {{[0-9]*}}, metadata [[FILE2]], metadata [[LEX1:![0-9]+]], i32 {{[0-9]*}}, i32 0, i32 {{.*}}} ; [ DW_TAG_lexical_block ]
// CHECK: [[LEX1]] = metadata !{i32 {{[0-9]*}}, metadata [[FILE2]], metadata [[FUNC]], i32 {{[0-9]*}}, i32 0, i32 {{.*}}} ; [ DW_TAG_lexical_block ]
// CHECK: [[M5]] = metadata !{i32 {{[0-9]*}}, metadata [[FUNC]], metadata [[CTXT]], i32 {{[0-9]*}}} ; [ DW_TAG_imported_module ]
-// CHECK: [[M6]] = metadata !{i32 {{[0-9]*}}, metadata [[FUNC]], metadata [[FOO:![0-9]*]], i32 23} ; [ DW_TAG_imported_declaration ]
-// CHECK: [[M7]] = metadata !{i32 {{[0-9]*}}, metadata [[FUNC]], metadata [[BAR:![0-9]*]], i32 {{[0-9]*}}} ; [ DW_TAG_imported_declaration ]
+// CHECK: [[M6]] = metadata !{i32 {{[0-9]*}}, metadata [[FUNC]], metadata [[FOO:!"_ZTSN1A1B3fooE"]], i32 23} ; [ DW_TAG_imported_declaration ]
+// CHECK: [[M7]] = metadata !{i32 {{[0-9]*}}, metadata [[FUNC]], metadata [[BAR:!"_ZTSN1A1B3barE"]], i32 {{[0-9]*}}} ; [ DW_TAG_imported_declaration ]
// CHECK: [[M8]] = metadata !{i32 {{[0-9]*}}, metadata [[FUNC]], metadata [[F1]], i32 {{[0-9]*}}} ; [ DW_TAG_imported_declaration ]
// CHECK: [[M9]] = metadata !{i32 {{[0-9]*}}, metadata [[FUNC]], metadata [[I]], i32 {{[0-9]*}}} ; [ DW_TAG_imported_declaration ]
// CHECK: [[M10]] = metadata !{i32 {{[0-9]*}}, metadata [[FUNC]], metadata [[BAZ:![0-9]*]], i32 {{[0-9]*}}} ; [ DW_TAG_imported_declaration ]
// CHECK: [[BAZ]] = metadata !{i32 {{[0-9]*}}, metadata [[FOOCPP]], metadata [[NS]], {{.*}}, metadata !"_ZTSN1A1B3barE"} ; [ DW_TAG_typedef ] [baz] {{.*}} [from _ZTSN1A1B3barE]
-// CHECK: [[M11]] = metadata !{i32 {{[0-9]*}}, metadata [[FUNC]], metadata [[CTXT]], i32 {{[0-9]*}}, metadata !"X"} ; [ DW_TAG_imported_module ]
-// CHECK: [[M12]] = metadata !{i32 {{[0-9]*}}, metadata [[FUNC]], metadata [[M11]], i32 {{[0-9]*}}, metadata !"Y"} ; [ DW_TAG_imported_module ]
+// CHECK: [[M11]] = metadata !{i32 {{[0-9]*}}, metadata [[FUNC]], metadata [[CTXT]], i32 {{[0-9]*}}, metadata !"X"} ; [ DW_TAG_imported_declaration ]
+// CHECK: [[M12]] = metadata !{i32 {{[0-9]*}}, metadata [[FUNC]], metadata [[M11]], i32 {{[0-9]*}}, metadata !"Y"} ; [ DW_TAG_imported_declaration ]
+// CHECK: [[M13]] = metadata !{i32 {{[0-9]*}}, metadata [[CTXT]], metadata [[I]], i32 {{[0-9]*}}} ; [ DW_TAG_imported_declaration ]
-// CHECK-GMLT: [[CU:![0-9]*]] = {{.*}}[[MODULES:![0-9]*]], metadata !""} ; [ DW_TAG_compile_unit ]
-// CHECK-GMLT: [[MODULES]] = metadata !{i32 0}
+// CHECK-GMLT: [[CU:![0-9]*]] = {{.*}}[[MODULES:![0-9]*]], metadata !"", i32 2} ; [ DW_TAG_compile_unit ]
+// CHECK-GMLT: [[MODULES]] = metadata !{}
// CHECK-NOLIMIT: ; [ DW_TAG_structure_type ] [bar] [line 6, {{.*}}] [def] [from ]
// FIXME: It is confused on win32 to generate file entry when dosish filename is given.
// REQUIRES: shell
// REQUIRES: shell-preserves-root
+// REQUIRES: dw2
diff --git a/test/CodeGenCXX/debug-info-pubtypes.cpp b/test/CodeGenCXX/debug-info-pubtypes.cpp
deleted file mode 100644
index 6393cddeef67..000000000000
--- a/test/CodeGenCXX/debug-info-pubtypes.cpp
+++ /dev/null
@@ -1,16 +0,0 @@
-// REQUIRES: x86-64-registered-target
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -g -fno-limit-debug-info -S -mllvm -generate-dwarf-pub-sections=Enable %s -o - | FileCheck %s
-
-// FIXME: This testcase shouldn't rely on assembly emission.
-//CHECK: Lpubtypes_begin[[SECNUM:[0-9]:]]
-//CHECK: .asciz "G"
-//CHECK-NEXT: .long 0
-//CHECK-NEXT: Lpubtypes_end[[SECNUM]]
-
-class G {
-public:
- void foo();
-};
-
-void G::foo() {
-}
diff --git a/test/CodeGenCXX/debug-info-qualifiers.cpp b/test/CodeGenCXX/debug-info-qualifiers.cpp
new file mode 100644
index 000000000000..c6b935f9039a
--- /dev/null
+++ b/test/CodeGenCXX/debug-info-qualifiers.cpp
@@ -0,0 +1,26 @@
+// RUN: %clang_cc1 -std=c++11 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
+// Test (r)value and CVR qualifiers on C++11 non-static member functions.
+class A {
+public:
+ // CHECK: i32 [[@LINE+2]], metadata ![[PLSR:[0-9]+]], {{.*}}[ DW_TAG_subprogram ] [line [[@LINE+2]]] [reference] [l]
+ // CHECK: ![[PLSR]] ={{.*}}[ DW_TAG_subroutine_type ]{{.*}}[reference]
+ void l() const &;
+ // CHECK: ![[ARGS:[0-9]+]] = metadata !{null, metadata ![[THIS:[0-9]+]]}
+ // CHECK: ![[THIS]] = {{.*}} metadata ![[CONST_A:.*]]} ; [ DW_TAG_pointer_type ]
+ // CHECK: ![[CONST_A]] = {{.*}} [ DW_TAG_const_type ]
+ // CHECK: i32 [[@LINE+2]], metadata ![[PRSR:[0-9]+]], {{.*}}[ DW_TAG_subprogram ] [line [[@LINE+2]]] [rvalue reference] [r]
+ // CHECK: ![[PRSR]] ={{.*}}metadata ![[ARGS]], i32 0, null, null, null}{{.*}}[ DW_TAG_subroutine_type ]{{.*}}[rvalue reference]
+ void r() const &&;
+};
+
+void g() {
+ A a;
+ // The type of pl is "void (A::*)() const &".
+ // CHECK: metadata ![[PL:[0-9]+]], i32 0, i32 0} ; [ DW_TAG_auto_variable ] [pl] [line [[@LINE+2]]]
+ // CHECK: metadata ![[PLSR]], metadata !"{{.*}}"} ; [ DW_TAG_ptr_to_member_type ]
+ auto pl = &A::l;
+
+ // CHECK: metadata ![[PR:[0-9]+]], i32 0, i32 0} ; [ DW_TAG_auto_variable ] [pr] [line [[@LINE+2]]]
+ // CHECK: metadata ![[PRSR]], metadata !"{{.*}}"} ; [ DW_TAG_ptr_to_member_type ]
+ auto pr = &A::r;
+}
diff --git a/test/CodeGenCXX/debug-info-same-line.cpp b/test/CodeGenCXX/debug-info-same-line.cpp
index 519e9eeb87a4..965a538f8472 100644
--- a/test/CodeGenCXX/debug-info-same-line.cpp
+++ b/test/CodeGenCXX/debug-info-same-line.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -g -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -g -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
// Make sure that clang outputs distinct debug info for a function
// that is inlined twice on the same line. Otherwise it would appear
@@ -6,118 +6,59 @@
#define INLINE inline __attribute__((always_inline))
-INLINE int
-product (int x, int y)
-{
- int result = x * y;
- return result;
-}
-
-INLINE int
-sum (int a, int b)
-{
- int result = a + b;
- return result;
-}
+int i;
-int
-strange_max (int m, int n)
-{
- if (m > n)
- return m;
- else if (n > m)
- return n;
- else
- return 0;
+INLINE void sum(int a, int b) {
+ i = a + b;
}
-int
-foo (int i, int j)
-{
- if (strange_max (i, j) == i)
- return product (i, j);
- else if (strange_max (i, j) == j)
- return sum (i, j);
- else
- return product (sum (i, i), sum (j, j));
+void noinline(int x, int y) {
+ i = x + y;
}
-int
-main(int argc, char const *argv[])
-{
-
- int array[3];
- int n;
+#define CALLS sum(9, 10), sum(11, 12)
- array[0] = foo (1238, 78392);
- array[1] = foo (379265, 23674);
- array[2] = foo (872934, 234);
-
- n = strange_max(array[0], strange_max(array[1], array[2]));
-
- return n & 0xf;
+inline void inlsum(int t, int u) {
+ i = t + u;
}
-// CHECK: define {{.*}} @_Z3fooii
-// i
-// CHECK: call void @llvm.dbg.declare
-// j
-// CHECK: call void @llvm.dbg.declare
-// x
-// CHECK: call void @llvm.dbg.declare
-// y
-// CHECK: call void @llvm.dbg.declare
-// result
-// CHECK: call void @llvm.dbg.declare
-
-// CHECK: call void @llvm.dbg.declare(metadata !{i32* %{{.*}}}, metadata ![[A_MD:[0-9]+]]), !dbg ![[A_DI:[0-9]+]]
-// CHECK: call void @llvm.dbg.declare(metadata !{i32* %{{.*}}}, metadata ![[B_MD:[0-9]+]]), !dbg ![[B_DI:[0-9]+]]
-// result
-// CHECK: call void @llvm.dbg.declare
-
-// We want to see a distinct !dbg node.
-// CHECK-NOT: call void @llvm.dbg.declare(metadata !{i32* %{{.*}}}, metadata ![[A_MD]]), !dbg ![[A_DI]]
-// CHECK: call void @llvm.dbg.declare(metadata !{i32* %{{.*}}}, metadata ![[A_MD]]), !dbg !{{.*}}
-// CHECK-NOT: call void @llvm.dbg.declare(metadata !{i32* %{{.*}}}, metadata ![[B_MD]]), !dbg ![[B_DI]]
-// CHECK: call void @llvm.dbg.declare(metadata !{i32* %{{.*}}}, metadata ![[B_MD]]), !dbg !{{.*}}
-// result
-// CHECK: call void @llvm.dbg.declare
-
-// We want to see a distinct !dbg node.
-// CHECK-NOT: call void @llvm.dbg.declare(metadata !{i32* %{{.*}}}, metadata ![[A_MD]]), !dbg ![[A_DI]]
-// CHECK: call void @llvm.dbg.declare(metadata !{i32* %{{.*}}}, metadata ![[A_MD]]), !dbg !{{.*}}
-// CHECK-NOT: call void @llvm.dbg.declare(metadata !{i32* %{{.*}}}, metadata ![[B_MD]]), !dbg ![[B_DI]]
-// CHECK: call void @llvm.dbg.declare(metadata !{i32* %{{.*}}}, metadata ![[B_MD]]), !dbg !{{.*}}
-// result
-// CHECK: call void @llvm.dbg.declare
-
-// Again: we want to see a distinct !dbg node.
-// CHECK: call void @llvm.dbg.declare(metadata !{i32* %{{.*}}}, metadata ![[X_MD:[0-9]+]]), !dbg ![[X_DI:[0-9]+]]
-// CHECK: call void @llvm.dbg.declare(metadata !{i32* %{{.*}}}, metadata ![[Y_MD:[0-9]+]]), !dbg ![[Y_DI:[0-9]+]]
-// result
-// CHECK: call void @llvm.dbg.declare
-
-
-// CHECK: define {{.*}} @main
-// CHECK: call {{.*}} @_Z3fooii
-// CHECK: call {{.*}} @_Z3fooii
-// CHECK: call {{.*}} @_Z3fooii
-// CHECK: store
-// CHECK: getelementptr
-// We want to see the same !dbg node for non-inlined functions.
-// Needed for GDB compatibility.
-// CHECK: load {{.*}} !dbg ![[DBG:.*]]
-// CHECK: load {{.*}} !dbg ![[DBG]]
-// CHECK: load {{.*}} !dbg ![[DBG]]
-// CHECK: call {{.*}} @_Z11strange_maxii(i32 {{.*}}, i32 {{.*}}), !dbg ![[DBG]]
-// CHECK: call {{.*}} @_Z11strange_maxii(i32 {{.*}}, i32 {{.*}}), !dbg ![[DBG]]
-
+int main() {
+ sum(1, 2), sum(3, 4);
+ noinline(5, 6), noinline(7, 8);
+ CALLS;
+ inlsum(13, 14), inlsum(15, 16);
+}
-// Verify that product() has its own inlined_at location at column 15.
-// CHECK-DAG: ![[A_MD]] = metadata{{.*}}[ DW_TAG_arg_variable ] [a]
-// CHECK-DAG: ![[B_MD]] = metadata{{.*}}[ DW_TAG_arg_variable ] [b]
-// CHECK-DAG: ![[X_MD]] = metadata{{.*}}[ DW_TAG_arg_variable ] [x]
-// CHECK-DAG: ![[Y_MD]] = metadata{{.*}}[ DW_TAG_arg_variable ] [y]
-// CHECK-DAG: ![[X_DI]] = metadata !{i32 {{[0-9]+}}, i32 {{[0-9]+}}, metadata !{{[0-9]+}}, metadata ![[PRODUCT:[0-9]+]]}
-// CHECK-DAG: [[PRODUCT]] = metadata !{i32 {{.*}}, i32 16, metadata !{{.*}}, null}
-// CHECK-DAG: ![[Y_DI]] = metadata !{i32 {{[0-9]+}}, i32 {{[0-9]+}}, metadata !{{[0-9]+}}, metadata ![[PRODUCT]]}
+// CHECK-LABEL: @main
+// CHECK: = add {{.*}} !dbg [[FIRST_INLINE:![0-9]*]]
+// CHECK: = add {{.*}} !dbg [[SECOND_INLINE:![0-9]*]]
+
+// Check that we don't give column information (and thus end up with distinct
+// line entries) for two non-inlined calls on the same line.
+// CHECK: call {{.*}}noinline{{.*}}({{i32[ ]?[a-z]*}} 5, {{i32[ ]?[a-z]*}} 6), !dbg [[NOINLINE:![0-9]*]]
+// CHECK: call {{.*}}noinline{{.*}}({{i32[ ]?[a-z]*}} 7, {{i32[ ]?[a-z]*}} 8), !dbg [[NOINLINE]]
+
+// FIXME: These should be separate locations but because the two calls have the
+// same line /and/ column, they get coalesced into a single inlined call by
+// accident. We need discriminators or some other changes to LLVM to cope with
+// this. (this is, unfortunately, an LLVM test disguised as a Clang test - since
+// inlining is forced to happen here). It's possible this could be fixed in
+// Clang, but I doubt it'll be the right place for the fix.
+// CHECK: = add {{.*}} !dbg [[FIRST_MACRO_INLINE:![0-9]*]]
+// CHECK: = add {{.*}} !dbg [[FIRST_MACRO_INLINE]]
+
+// Even if the functions are marked inline but do not get inlined, they
+// shouldn't use column information, and thus should be at the same debug
+// location.
+// CHECK: call {{.*}}inlsum{{.*}}({{i32[ ]?[a-z]*}} 13, {{i32[ ]?[a-z]*}} 14), !dbg [[INL_FIRST:![0-9]*]]
+// CHECK: call {{.*}}inlsum{{.*}}({{i32[ ]?[a-z]*}} 15, {{i32[ ]?[a-z]*}} 16), !dbg [[INL_SECOND:![0-9]*]]
+
+// [[FIRST_INLINE]] =
+// [[SECOND_INLINE]] =
+
+// FIXME: These should be the same location since the functions appear on the
+// same line and were not inlined - they needlessly have column information
+// intended to disambiguate inlined calls, which is going to confuse GDB as it
+// doesn't cope well with column information.
+// [[INL_FIRST]] =
+// [[INL_SECOND]] =
diff --git a/test/CodeGenCXX/debug-info-scope.cpp b/test/CodeGenCXX/debug-info-scope.cpp
index 557ee3178354..0447dc04d56b 100644
--- a/test/CodeGenCXX/debug-info-scope.cpp
+++ b/test/CodeGenCXX/debug-info-scope.cpp
@@ -17,12 +17,12 @@ char *return_char (int input)
int main2() {
// CHECK: [ DW_TAG_auto_variable ] [ptr] [line [[@LINE+2]]]
-// CHECK metadata !{i32 {{.*}}, metadata !{{.*}}, i32 [[@LINE+1]], {{.*}}} ; [ DW_TAG_lexical_block ]
+// CHECK: metadata !{i32 {{.*}}, metadata !{{.*}}, i32 [[@LINE+1]], {{.*}}} ; [ DW_TAG_lexical_block ]
if (char *ptr = return_char(1)) {
printf ("%s", ptr);
}
// CHECK: [ DW_TAG_auto_variable ] [ptr] [line [[@LINE+2]]]
-// CHECK metadata !{i32 {{.*}}, metadata !{{.*}}, i32 [[@LINE+1]], {{.*}}} ; [ DW_TAG_lexical_block ]
+// CHECK: metadata !{i32 {{.*}}, metadata !{{.*}}, i32 [[@LINE+1]], {{.*}}} ; [ DW_TAG_lexical_block ]
if (char *ptr = return_char(2)) {
printf ("%s", ptr);
}
diff --git a/test/CodeGenCXX/debug-info-template-explicit-specialization.cpp b/test/CodeGenCXX/debug-info-template-explicit-specialization.cpp
new file mode 100644
index 000000000000..506c0d535751
--- /dev/null
+++ b/test/CodeGenCXX/debug-info-template-explicit-specialization.cpp
@@ -0,0 +1,93 @@
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -g %s -o - -fno-standalone-debug | FileCheck %s
+
+// Run again with -gline-tables-only and verify we don't crash. We won't output
+// type info at all.
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -g %s -o - -gline-tables-only | FileCheck %s -check-prefix LINES-ONLY
+
+// LINES-ONLY-NOT: DW_TAG_structure_type
+
+template <typename T>
+struct a {
+};
+extern template class a<int>;
+// CHECK-NOT: ; [ DW_TAG_structure_type ] [a<int>]
+
+template <typename T>
+struct b {
+};
+extern template class b<int>;
+b<int> bi;
+// CHECK: ; [ DW_TAG_structure_type ] [b<int>] {{.*}} [def]
+
+template <typename T>
+struct c {
+ void f() {}
+};
+extern template class c<int>;
+c<int> ci;
+// CHECK: ; [ DW_TAG_structure_type ] [c<int>] {{.*}} [decl]
+
+template <typename T>
+struct d {
+ void f();
+};
+extern template class d<int>;
+d<int> di;
+// CHECK: ; [ DW_TAG_structure_type ] [d<int>] {{.*}} [def]
+
+template <typename T>
+struct e {
+ void f();
+};
+template <typename T>
+void e<T>::f() {
+}
+extern template class e<int>;
+e<int> ei;
+// There's no guarantee that the out of line definition will appear before the
+// explicit template instantiation definition, so conservatively emit the type
+// definition here.
+// CHECK: ; [ DW_TAG_structure_type ] [e<int>] {{.*}} [def]
+
+template <typename T>
+struct f {
+ void g();
+};
+extern template class f<int>;
+template <typename T>
+void f<T>::g() {
+}
+f<int> fi;
+// CHECK: ; [ DW_TAG_structure_type ] [f<int>] {{.*}} [def]
+
+template <typename T>
+struct g {
+ void f();
+};
+template <>
+void g<int>::f();
+extern template class g<int>;
+g<int> gi;
+// CHECK: ; [ DW_TAG_structure_type ] [g<int>] {{.*}} [def]
+
+template <typename T>
+struct h {
+};
+template class h<int>;
+// CHECK: ; [ DW_TAG_structure_type ] [h<int>] {{.*}} [def]
+
+template <typename T>
+struct i {
+ void f() {}
+};
+template<> void i<int>::f();
+extern template class i<int>;
+i<int> ii;
+// CHECK: ; [ DW_TAG_structure_type ] [i<int>] {{.*}} [def]
+
+template <typename T1, typename T2 = T1>
+struct j {
+};
+extern template class j<int>;
+j<int> jj;
+// CHECK: ; [ DW_TAG_structure_type ] [j<int, int>]
diff --git a/test/CodeGenCXX/debug-info-template-fwd.cpp b/test/CodeGenCXX/debug-info-template-fwd.cpp
new file mode 100644
index 000000000000..b2b70730efdf
--- /dev/null
+++ b/test/CodeGenCXX/debug-info-template-fwd.cpp
@@ -0,0 +1,27 @@
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin -g -emit-llvm -o - | FileCheck %s
+// This test is for a crash when emitting debug info for not-yet-completed
+// types.
+// Test that we don't actually emit a forward decl for the offending class:
+// CHECK: [ DW_TAG_structure_type ] [Derived<int>] {{.*}} [def]
+// rdar://problem/15931354
+template <class A> class Derived;
+
+template <class A> class Base {
+ static Derived<A> *create();
+};
+
+template <class A> struct Derived : Base<A> {
+};
+
+Base<int> *f;
+
+// During the instantiation of Derived<int>, Base<int> becomes required to be
+// complete - since the declaration has already been emitted (due to 'f',
+// above), we immediately try to build debug info for Base<int> which then
+// requires the (incomplete definition) of Derived<int> which is problematic.
+//
+// (if 'f' is not present, the point at which Base<int> becomes required to be
+// complete during the instantiation of Derived<int> is a no-op because
+// Base<int> was never emitted so we ignore it and carry on until we
+// wire up the base class of Derived<int> in the debug info later on)
+Derived<int> d;
diff --git a/test/CodeGenCXX/debug-info-template-limit.cpp b/test/CodeGenCXX/debug-info-template-limit.cpp
index c3e241ecc806..e1f23ada21ed 100644
--- a/test/CodeGenCXX/debug-info-template-limit.cpp
+++ b/test/CodeGenCXX/debug-info-template-limit.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang -flimit-debug-info -emit-llvm -g -S %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -fno-standalone-debug -triple %itanium_abi_triple -g %s -o - | FileCheck %s
// Check that this pointer type is TC<int>
// CHECK: ![[LINE:[0-9]+]] = {{.*}}"TC<int>", {{.*}} metadata !"_ZTS2TCIiE"} ; [ DW_TAG_class_type ]
diff --git a/test/CodeGenCXX/debug-info-template-member.cpp b/test/CodeGenCXX/debug-info-template-member.cpp
index 9ac1befc1019..c9a3d9b9177c 100644
--- a/test/CodeGenCXX/debug-info-template-member.cpp
+++ b/test/CodeGenCXX/debug-info-template-member.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -g -fno-standalone-debug -triple x86_64-apple-darwin %s -o - | FileCheck %s
struct MyClass {
template <int i> int add(int j) {
@@ -21,7 +21,7 @@ inline int add3(int x) {
// CHECK: [[FOO_FUNC]] = {{.*}}, metadata !"_ZN3foo4funcEN5outerIS_E5innerE", i32 {{[0-9]*}}, metadata [[FOO_FUNC_TYPE:![0-9]*]], {{.*}} ; [ DW_TAG_subprogram ] {{.*}} [func]
// CHECK: [[FOO_FUNC_TYPE]] = {{.*}}, metadata [[FOO_FUNC_PARAMS:![0-9]*]], i32 0, null, null, null} ; [ DW_TAG_subroutine_type ]
// CHECK: [[FOO_FUNC_PARAMS]] = metadata !{null, metadata !{{[0-9]*}}, metadata [[OUTER_FOO_INNER:![0-9]*]]}
-// CHECK: [[OUTER_FOO_INNER]] = {{.*}} ; [ DW_TAG_structure_type ] [inner]
+// CHECK: [[OUTER_FOO_INNER]] = {{.*}}, null, metadata !"[[OUTER_FOO_INNER_ID:.*]]"} ; [ DW_TAG_structure_type ] [inner]
// CHECK: metadata [[VIRT_MEM:![0-9]*]], i32 0, metadata !"_ZTS4virtI4elemE", metadata [[VIRT_TEMP_PARAM:![0-9]*]], metadata !"_ZTS4virtI4elemE"} ; [ DW_TAG_structure_type ] [virt<elem>] {{.*}} [def]
// CHECK: [[VIRT_TEMP_PARAM]] = metadata !{metadata [[VIRT_T:![0-9]*]]}
@@ -59,7 +59,7 @@ inline void func() {
outer<foo>::inner x;
-// CHECK: metadata [[OUTER_FOO_INNER]], i32 {{[0-9]*}}, i32 {{[0-9]*}}, %"struct.outer<foo>::inner"* @x, {{.*}} ; [ DW_TAG_variable ] [x]
+// CHECK: metadata !"[[OUTER_FOO_INNER_ID]]", i32 {{[0-9]*}}, i32 {{[0-9]*}}, %"struct.outer<foo>::inner"* @x, {{.*}} ; [ DW_TAG_variable ] [x]
template <typename T>
struct virt {
diff --git a/test/CodeGenCXX/debug-info-template-partial-specialization.cpp b/test/CodeGenCXX/debug-info-template-partial-specialization.cpp
new file mode 100644
index 000000000000..cce84af4023c
--- /dev/null
+++ b/test/CodeGenCXX/debug-info-template-partial-specialization.cpp
@@ -0,0 +1,31 @@
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -g %s -o - -fstandalone-debug | FileCheck %s
+namespace __pointer_type_imp
+{
+ template <class _Tp, class _Dp, bool > struct __pointer_type1 {};
+
+ // CHECK: metadata ![[PARAMS:[0-9]+]], metadata !"_ZTSN18__pointer_type_imp15__pointer_type1I1C14default_deleteIS1_ELb0EEE"} ; [ DW_TAG_structure_type ] [__pointer_type1<C, default_delete<C>, false>] [line [[@LINE+1]], size 8, align 8, offset 0] [def] [from ]
+ template <class _Tp, class _Dp> struct __pointer_type1<_Tp, _Dp, false>
+ {
+ typedef _Tp* type;
+ };
+}
+template <class _Tp, class _Dp>
+struct __pointer_type2
+{
+ // Test that the bool template type parameter is emitted.
+ //
+ // CHECK: ![[PARAMS]] = metadata !{metadata !{{.*}}, metadata !{{.*}}, metadata ![[FALSE:[0-9]+]]}
+ // CHECK: ![[FALSE]] = {{.*}} i8 0, {{.*}}} ; [ DW_TAG_template_value_parameter ]
+ typedef typename __pointer_type_imp::__pointer_type1<_Tp, _Dp, false>::type type;
+};
+template <class _Tp> struct default_delete {};
+template <class _Tp, class _Dp = default_delete<_Tp> > class unique_ptr
+{
+ typedef typename __pointer_type2<_Tp, _Dp>::type pointer;
+ unique_ptr(pointer __p, _Dp __d) {}
+};
+class C {
+ unique_ptr<C> Ptr;
+};
+void foo(C &c) {
+}
diff --git a/test/CodeGenCXX/debug-info-template.cpp b/test/CodeGenCXX/debug-info-template.cpp
index f58973bcceae..d071830eaf67 100644
--- a/test/CodeGenCXX/debug-info-template.cpp
+++ b/test/CodeGenCXX/debug-info-template.cpp
@@ -1,7 +1,7 @@
// RUN: %clang -S -emit-llvm -target x86_64-unknown_unknown -g %s -o - -std=c++11 | FileCheck %s
// CHECK: {{.*}}, i1 false, metadata !"", i32 0, metadata !{{[0-9]]*}}, metadata [[RETAIN:![0-9]*]], {{.*}} ; [ DW_TAG_compile_unit ]
-// CHECK: [[EMPTY:![0-9]*]] = metadata !{i32 0}
+// CHECK: [[EMPTY:![0-9]*]] = metadata !{}
// CHECK: [[RETAIN]] = metadata !{metadata !{{[0-9]]*}}, metadata [[FOO:![0-9]*]],
@@ -50,8 +50,8 @@
//
-// CHECK: [[TCNESTED:![0-9]*]] = metadata !{i32 {{[0-9]*}}, metadata !{{[0-9]*}}, metadata !"_ZTS2TCIjLj2EXadL_Z3glbEEXadL_ZN3foo1eEEEXadL_ZNS0_1fEvEEXadL_Z4funcvEE9tmpl_implJLi1ELi2ELi3EEE", {{.*}} ; [ DW_TAG_structure_type ] [nested]
-// CHECK: [[TCNT:![0-9]*]] = {{.*}}, metadata [[TCNARGS:![0-9]*]], metadata !"{{.*}}"} ; [ DW_TAG_structure_type ] [TC<int, -3, nullptr, nullptr, nullptr, nullptr, tmpl_impl>]
+// CHECK: metadata !{i32 {{[0-9]*}}, metadata !{{[0-9]*}}, metadata !"_ZTS2TCIjLj2EXadL_Z3glbEEXadL_ZN3foo1eEEEXadL_ZNS0_1fEvEEXadL_Z4funcvEE9tmpl_implJLi1ELi2ELi3EEE", {{.*}}, metadata !"[[TCNESTED:.*]]"} ; [ DW_TAG_structure_type ] [nested]
+// CHECK: metadata [[TCNARGS:![0-9]*]], metadata !"[[TCNT:.*]]"} ; [ DW_TAG_structure_type ] [TC<int, -3, nullptr, nullptr, nullptr, nullptr, tmpl_impl>]
// CHECK: [[TCNARGS]] = metadata !{metadata [[TCNARG1:![0-9]*]], metadata [[TCNARG2:![0-9]*]], metadata [[TCNARG3:![0-9]*]], metadata [[TCNARG4:![0-9]*]], metadata [[TCNARG5:![0-9]*]], metadata [[TCNARG6:![0-9]*]], metadata [[TCARG7:![0-9]*]], metadata [[TCNARG8:![0-9]*]]}
// CHECK: [[TCNARG1]] = {{.*}}metadata !"T", metadata [[INT]], {{.*}} ; [ DW_TAG_template_type_parameter ]
// CHECK: [[TCNARG2]] = {{.*}}metadata !"", metadata [[INT]], i32 -3, {{.*}} ; [ DW_TAG_template_value_parameter ]
@@ -77,9 +77,9 @@
// CHECK: [[PTOARG1]] = {{.*}}metadata !"", metadata [[CONST_PADDINGATEND_PTR:![0-9]*]], { i32, i8, [3 x i8] }* @PaddedObj, {{.*}} ; [ DW_TAG_template_value_parameter ]
// CHECK: [[CONST_PADDINGATEND_PTR]] = {{.*}} ; [ DW_TAG_pointer_type ] [line 0, size 64, align 64, offset 0] [from _ZTS12PaddingAtEnd]
-// CHECK: metadata [[TCNESTED]], i32 0, i32 1, %"struct.TC<unsigned int, 2, &glb, &foo::e, &foo::f, &func, tmpl_impl, 1, 2, 3>::nested"* @tci, null} ; [ DW_TAG_variable ] [tci]
+// CHECK: metadata !"[[TCNESTED]]", i32 0, i32 1, %"struct.TC<unsigned int, 2, &glb, &foo::e, &foo::f, &func, tmpl_impl, 1, 2, 3>::nested"* @tci, null} ; [ DW_TAG_variable ] [tci]
-// CHECK: metadata [[TCNT:![0-9]*]], i32 0, i32 1, %struct.TC* @tcn, null} ; [ DW_TAG_variable ] [tcn]
+// CHECK: metadata !"[[TCNT]]", i32 0, i32 1, %struct.TC* @tcn, null} ; [ DW_TAG_variable ] [tcn]
struct foo {
char pad[8]; // make the member pointer to 'e' a bit more interesting (nonzero)
int e;
diff --git a/test/CodeGenCXX/debug-info-thunk.cpp b/test/CodeGenCXX/debug-info-thunk.cpp
index 2a5089572534..1d6f1a77b49a 100644
--- a/test/CodeGenCXX/debug-info-thunk.cpp
+++ b/test/CodeGenCXX/debug-info-thunk.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -g -S -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple %itanium_abi_triple -g -S -emit-llvm -o - | FileCheck %s
struct A {
virtual void f();
diff --git a/test/CodeGenCXX/debug-info-use-after-free.cpp b/test/CodeGenCXX/debug-info-use-after-free.cpp
index 852e14895618..0f28a9063fb8 100644
--- a/test/CodeGenCXX/debug-info-use-after-free.cpp
+++ b/test/CodeGenCXX/debug-info-use-after-free.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -g -emit-llvm-only %s
+// RUN: %clang_cc1 -g -triple %itanium_abi_triple -emit-llvm-only %s
// Check that we don't crash.
// PR12305, PR12315
diff --git a/test/CodeGenCXX/debug-info-uuid.cpp b/test/CodeGenCXX/debug-info-uuid.cpp
index a57e2f0a84ae..6137400de07c 100644
--- a/test/CodeGenCXX/debug-info-uuid.cpp
+++ b/test/CodeGenCXX/debug-info-uuid.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -fms-extensions -triple=x86_64-pc-win32 -cxx-abi microsoft -g %s -o - -std=c++11 | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -fms-extensions -triple=x86_64-pc-win32 -g %s -o - -std=c++11 | FileCheck %s
// RUN: not %clang_cc1 -emit-llvm -fms-extensions -triple=x86_64-unknown-unknown -g %s -o - -std=c++11 2>&1 | FileCheck %s --check-prefix=CHECK-ITANIUM
// CHECK: metadata [[TGIARGS:![0-9]*]], null} ; [ DW_TAG_structure_type ] [tmpl_guid<&__uuidof(uuid)>]
diff --git a/test/CodeGenCXX/debug-info-varargs.cpp b/test/CodeGenCXX/debug-info-varargs.cpp
new file mode 100644
index 000000000000..cc92477dbb92
--- /dev/null
+++ b/test/CodeGenCXX/debug-info-varargs.cpp
@@ -0,0 +1,22 @@
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -g %s -o - | FileCheck %s
+
+struct A
+{
+ // CHECK-DAG: ", i32 [[@LINE+1]], metadata ![[ATY:[0-9]+]]{{.*}}[ DW_TAG_subprogram ]{{.*}}[a]
+ void a(int c, ...) {}
+ // CHECK: ![[ATY]] ={{.*}} metadata ![[AARGS:[0-9]+]], i32 0, null, null, null} ; [ DW_TAG_subroutine_type ]
+ // CHECK: ![[AARGS]] = {{.*}} metadata ![[UNSPEC:[0-9]+]]}
+ // CHECK: ![[UNSPEC]] = {{.*}} [ DW_TAG_unspecified_parameters ]
+};
+
+ // CHECK: ", i32 [[@LINE+1]], metadata ![[BTY:[0-9]+]]{{.*}}[ DW_TAG_subprogram ]{{.*}}[b]
+void b(int c, ...) {
+ // CHECK: ![[BTY]] ={{.*}} metadata ![[BARGS:[0-9]+]], i32 0, null, null, null} ; [ DW_TAG_subroutine_type ]
+ // CHECK: ![[BARGS]] = {{.*}} metadata ![[UNSPEC:[0-9]+]]}
+
+ A a;
+
+ // CHECK: metadata ![[PST:[0-9]+]], i32 0, i32 0} ; [ DW_TAG_auto_variable ] [fptr] [line [[@LINE+1]]]
+ void (*fptr)(int, ...) = b;
+ // CHECK: ![[PST]] ={{.*}} metadata ![[BTY]]} ; [ DW_TAG_pointer_type ]
+}
diff --git a/test/CodeGenCXX/debug-info-vtable-optzn.cpp b/test/CodeGenCXX/debug-info-vtable-optzn.cpp
new file mode 100644
index 000000000000..c693f794b26f
--- /dev/null
+++ b/test/CodeGenCXX/debug-info-vtable-optzn.cpp
@@ -0,0 +1,22 @@
+// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-darwin %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -g -triple amd64-unknown-freebsd %s -o - | FileCheck %s
+//
+// This tests that the "emit debug info for a C++ class only in the
+// module that has its vtable" optimization is disabled by default on
+// Darwin and FreeBSD.
+//
+// CHECK: [ DW_TAG_member ] [lost]
+class A
+{
+ virtual bool f() = 0;
+ int lost;
+};
+
+class B : public A
+{
+ B *g();
+};
+
+B *B::g() {
+ return this;
+}
diff --git a/test/CodeGenCXX/debug-info.cpp b/test/CodeGenCXX/debug-info.cpp
index 93a4fe3f466a..7c89dfc04ce1 100644
--- a/test/CodeGenCXX/debug-info.cpp
+++ b/test/CodeGenCXX/debug-info.cpp
@@ -51,11 +51,6 @@ namespace VirtualBase {
}
}
-void foo() {
- const wchar_t c = L'x';
- wchar_t d = c;
-}
-
namespace b5249287 {
template <typename T> class A {
struct B;
@@ -77,7 +72,7 @@ foo func(foo f) {
return f; // reference 'f' for now because otherwise we hit another bug
}
-// CHECK: [[FOO:![0-9]*]] = metadata !{i32 {{[0-9]*}}, metadata !{{[0-9]*}}, metadata [[PR14763:![0-9]*]], {{.*}} ; [ DW_TAG_structure_type ] [foo]
+// CHECK: metadata !{i32 {{[0-9]*}}, metadata !{{[0-9]*}}, metadata [[PR14763:![0-9]*]], {{.*}}, metadata !"[[FOO:.*]]"} ; [ DW_TAG_structure_type ] [foo]
// CHECK: [[PR14763]] = {{.*}} ; [ DW_TAG_namespace ] [pr14763]
// CHECK: [[INCTYPE:![0-9]*]] = {{.*}} ; [ DW_TAG_structure_type ] [incomplete]{{.*}} [decl]
// CHECK: metadata [[A_MEM:![0-9]*]], i32 0, null, null, metadata !"_ZTSN7pr162141aE"} ; [ DW_TAG_structure_type ] [a]
@@ -88,6 +83,13 @@ foo func(foo f) {
// CHECK: [[FUNC:![0-9]*]] = {{.*}} metadata !"_ZN7pr147634funcENS_3fooE", i32 {{[0-9]*}}, metadata [[FUNC_TYPE:![0-9]*]], {{.*}} ; [ DW_TAG_subprogram ] {{.*}} [def] [func]
}
+void foo() {
+ const wchar_t c = L'x';
+ wchar_t d = c;
+}
+
+// CHECK-NOT: ; [ DW_TAG_variable ] [c]
+
namespace pr9608 { // also pr9600
struct incomplete;
incomplete (*x)[3];
@@ -96,8 +98,10 @@ incomplete (*x)[3];
// CHECK: [[INCARRAY]] = {{.*}}metadata !"_ZTSN6pr960810incompleteE", metadata {{![0-9]*}}, i32 0, null, null, null} ; [ DW_TAG_array_type ] [line 0, size 0, align 0, offset 0] [from _ZTSN6pr960810incompleteE]
}
-// For some reason the argument for PR14763 ended up all the way down here
-// CHECK: = metadata !{i32 {{[0-9]*}}, metadata [[FUNC]], {{.*}}, metadata [[FOO]], i32 8192, i32 0} ; [ DW_TAG_arg_variable ] [f]
+// For some reason function arguments ended up down here
+// CHECK: = metadata !{i32 {{[0-9]*}}, metadata [[FUNC]], {{.*}}, metadata !"[[FOO]]", i32 8192, i32 0} ; [ DW_TAG_arg_variable ] [f]
+
+// CHECK: ; [ DW_TAG_auto_variable ] [c]
namespace pr16214 {
struct a {
diff --git a/test/CodeGenCXX/decl-ref-init.cpp b/test/CodeGenCXX/decl-ref-init.cpp
index 1a82ee2b485b..117d277c95e6 100644
--- a/test/CodeGenCXX/decl-ref-init.cpp
+++ b/test/CodeGenCXX/decl-ref-init.cpp
@@ -1,8 +1,7 @@
-// REQUIRES: x86-registered-target,x86-64-registered-target
-// RUN: %clang_cc1 -triple x86_64-apple-darwin -S %s -o %t-64.s
-// RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s
-// RUN: %clang_cc1 -triple i386-apple-darwin -S %s -o %t-32.s
-// RUN: FileCheck -check-prefix CHECK-LP32 --input-file=%t-32.s %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm %s -o - | \
+// RUN: FileCheck %s
+// RUN: %clang_cc1 -triple i386-apple-darwin -emit-llvm %s -o - | \
+// RUN: FileCheck %s
struct A {};
@@ -24,8 +23,5 @@ int main() {
const A& rca2 = d();
}
-// CHECK-LP64: callq __ZN1BcvR1AEv
-// CHECK-LP64: callq __ZN1BcvR1AEv
-
-// CHECK-LP32: calll L__ZN1BcvR1AEv
-// CHECK-LP32: calll L__ZN1BcvR1AEv
+// CHECK: call dereferenceable({{[0-9]+}}) %struct.A* @_ZN1BcvR1AEv
+// CHECK: call dereferenceable({{[0-9]+}}) %struct.A* @_ZN1BcvR1AEv
diff --git a/test/CodeGenCXX/default-arg-temps.cpp b/test/CodeGenCXX/default-arg-temps.cpp
index 43756006f209..6a7f43a51287 100644
--- a/test/CodeGenCXX/default-arg-temps.cpp
+++ b/test/CodeGenCXX/default-arg-temps.cpp
@@ -16,12 +16,12 @@ public:
// CHECK-LABEL: define void @_Z1gv()
void g() {
// CHECK: call void @_ZN1TC1Ev([[T:%.*]]* [[AGG1:%.*]])
- // CHECK-NEXT: call void @_Z1fRK1T([[T]]* [[AGG1]])
+ // CHECK-NEXT: call void @_Z1fRK1T([[T]]* dereferenceable({{[0-9]+}}) [[AGG1]])
// CHECK-NEXT: call void @_ZN1TD1Ev([[T]]* [[AGG1]])
f();
// CHECK-NEXT: call void @_ZN1TC1Ev([[T:%.*]]* [[AGG2:%.*]])
- // CHECK-NEXT: call void @_Z1fRK1T([[T]]* [[AGG2]])
+ // CHECK-NEXT: call void @_Z1fRK1T([[T]]* dereferenceable({{[0-9]+}}) [[AGG2]])
// CHECK-NEXT: call void @_ZN1TD1Ev([[T]]* [[AGG2]])
f();
diff --git a/test/CodeGenCXX/default-arguments.cpp b/test/CodeGenCXX/default-arguments.cpp
index 83cae3afd561..d364835850c3 100644
--- a/test/CodeGenCXX/default-arguments.cpp
+++ b/test/CodeGenCXX/default-arguments.cpp
@@ -42,15 +42,15 @@ struct C {
C();
};
-// CHECK-LABEL: define void @_ZN1CC1Ev(%struct.C* %this) unnamed_addr
-// CHECK: call void @_ZN1CC2Ev(
-
// CHECK-LABEL: define void @_ZN1CC2Ev(%struct.C* %this) unnamed_addr
// CHECK: call void @_ZN2A1C1Ev(
// CHECK: call void @_ZN2A2C1Ev(
// CHECK: call void @_ZN1BC1ERK2A1RK2A2(
// CHECK: call void @_ZN2A2D1Ev
// CHECK: call void @_ZN2A1D1Ev
+
+// CHECK-LABEL: define void @_ZN1CC1Ev(%struct.C* %this) unnamed_addr
+// CHECK: call void @_ZN1CC2Ev(
C::C() { }
// CHECK-LABEL: define void @_Z2f3v()
diff --git a/test/CodeGenCXX/default-constructor-default-argument.cpp b/test/CodeGenCXX/default-constructor-default-argument.cpp
index 374a967e3e2a..17ecc35645e9 100644
--- a/test/CodeGenCXX/default-constructor-default-argument.cpp
+++ b/test/CodeGenCXX/default-constructor-default-argument.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
// Check that call to constructor for struct A is generated correctly.
struct A { A(int x = 2); };
diff --git a/test/CodeGenCXX/default-constructor-for-members.cpp b/test/CodeGenCXX/default-constructor-for-members.cpp
index 6065b49ac158..5eb8cd1767bb 100644
--- a/test/CodeGenCXX/default-constructor-for-members.cpp
+++ b/test/CodeGenCXX/default-constructor-for-members.cpp
@@ -1,8 +1,7 @@
-// REQUIRES: x86-registered-target,x86-64-registered-target
-// RUN: %clang_cc1 -triple x86_64-apple-darwin -S %s -o %t-64.s
-// RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s
-// RUN: %clang_cc1 -triple i386-apple-darwin -S %s -o %t-32.s
-// RUN: FileCheck -check-prefix CHECK-LP32 --input-file=%t-32.s %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm %s -o - | \
+// RUN: FileCheck %s
+// RUN: %clang_cc1 -triple i386-apple-darwin -emit-llvm %s -o - | \
+// RUN: FileCheck %s
extern "C" int printf(...);
@@ -19,6 +18,4 @@ int main() {
M m1;
}
-// CHECK-LP64: callq __ZN1SC1Ev
-
-// CHECK-LP32: calll L__ZN1SC1Ev
+// CHECK: call void @_ZN1SC1Ev
diff --git a/test/CodeGenCXX/default-constructor-template-member.cpp b/test/CodeGenCXX/default-constructor-template-member.cpp
index 215696405a4f..93df81846037 100644
--- a/test/CodeGenCXX/default-constructor-template-member.cpp
+++ b/test/CodeGenCXX/default-constructor-template-member.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s
template <class T> struct A { A(); };
struct B { A<int> x; };
diff --git a/test/CodeGenCXX/default-destructor-nested.cpp b/test/CodeGenCXX/default-destructor-nested.cpp
index 565a7279c56e..77b06d639f4c 100644
--- a/test/CodeGenCXX/default-destructor-nested.cpp
+++ b/test/CodeGenCXX/default-destructor-nested.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm-only
+// RUN: %clang_cc1 %s -triple %itanium_abi_triple -emit-llvm-only
// PR6294
class A {
diff --git a/test/CodeGenCXX/deferred-global-init.cpp b/test/CodeGenCXX/deferred-global-init.cpp
index deb458f55c7d..f64f507ac919 100644
--- a/test/CodeGenCXX/deferred-global-init.cpp
+++ b/test/CodeGenCXX/deferred-global-init.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
// PR5967
extern void* foo;
@@ -11,6 +11,6 @@ void* bar() { return a; }
// CHECK: load i8** @foo
// CHECK: ret void
-// CHECK-LABEL: define internal void @_GLOBAL__I_a
+// CHECK-LABEL: define internal void @_GLOBAL__sub_I_deferred_global_init.cpp
// CHECK: call void @__cxx_global_var_init()
// CHECK: ret void
diff --git a/test/CodeGenCXX/delayed-template-parsing.cpp b/test/CodeGenCXX/delayed-template-parsing.cpp
index fa177d456255..c5f448641544 100644
--- a/test/CodeGenCXX/delayed-template-parsing.cpp
+++ b/test/CodeGenCXX/delayed-template-parsing.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -cxx-abi microsoft -fms-extensions -fdelayed-template-parsing -triple=i386-pc-win32 | FileCheck %s
-// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -cxx-abi microsoft -fms-extensions -fdelayed-template-parsing -triple=x86_64-pc-win32 | FileCheck -check-prefix X64 %s
+// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -fms-extensions -fdelayed-template-parsing -triple=i386-pc-win32 | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -fms-extensions -fdelayed-template-parsing -triple=x86_64-pc-win32 | FileCheck -check-prefix X64 %s
namespace ClassScopeSpecialization {
struct Type {
diff --git a/test/CodeGenCXX/delete-two-arg.cpp b/test/CodeGenCXX/delete-two-arg.cpp
index f8e6bff29580..be3cf1a900e6 100644
--- a/test/CodeGenCXX/delete-two-arg.cpp
+++ b/test/CodeGenCXX/delete-two-arg.cpp
@@ -1,4 +1,5 @@
-// RUN: not %clang_cc1 -triple i686-pc-linux-gnu %s -o - -emit-llvm -verify | FileCheck %s
+// RUN: %clang_cc1 -triple i686-pc-linux-gnu %s -o - -emit-llvm -verify | FileCheck %s
+// expected-no-diagnostics
typedef __typeof(sizeof(int)) size_t;
diff --git a/test/CodeGenCXX/dependent-type-member-pointer.cpp b/test/CodeGenCXX/dependent-type-member-pointer.cpp
index 99b8ecd555c7..595eca5aab2d 100644
--- a/test/CodeGenCXX/dependent-type-member-pointer.cpp
+++ b/test/CodeGenCXX/dependent-type-member-pointer.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -emit-llvm-only -verify %s
+// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -emit-llvm-only -verify %s
// expected-no-diagnostics
// PR7736
diff --git a/test/CodeGenCXX/derived-to-base-conv.cpp b/test/CodeGenCXX/derived-to-base-conv.cpp
index 675c50c42328..f4ef0e52772b 100644
--- a/test/CodeGenCXX/derived-to-base-conv.cpp
+++ b/test/CodeGenCXX/derived-to-base-conv.cpp
@@ -33,9 +33,9 @@ void test0(X x) {
test0_helper(x);
// CHECK-LABEL: define void @_Z5test01X(
// CHECK: [[TMP:%.*]] = alloca [[A:%.*]], align
- // CHECK-NEXT: [[T0:%.*]] = call [[B:%.*]]* @_ZN1XcvR1BEv(
+ // CHECK-NEXT: [[T0:%.*]] = call dereferenceable({{[0-9]+}}) [[B:%.*]]* @_ZN1XcvR1BEv(
// CHECK-NEXT: [[T1:%.*]] = bitcast [[B]]* [[T0]] to [[A]]*
- // CHECK-NEXT: call void @_ZN1AC1ERKS_([[A]]* [[TMP]], [[A]]* [[T1]])
+ // CHECK-NEXT: call void @_ZN1AC1ERKS_([[A]]* [[TMP]], [[A]]* dereferenceable({{[0-9]+}}) [[T1]])
// CHECK-NEXT: call void @_Z12test0_helper1A([[A]]* [[TMP]])
// CHECK-NEXT: call void @_ZN1AD1Ev([[A]]* [[TMP]])
// CHECK-NEXT: ret void
diff --git a/test/CodeGenCXX/derived-to-virtual-base-class-calls-final.cpp b/test/CodeGenCXX/derived-to-virtual-base-class-calls-final.cpp
index f2ecfc1d38cc..d85928370319 100644
--- a/test/CodeGenCXX/derived-to-virtual-base-class-calls-final.cpp
+++ b/test/CodeGenCXX/derived-to-virtual-base-class-calls-final.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
struct A { int i; };
struct B { char j; };
@@ -9,7 +9,7 @@ struct D final : virtual C {
virtual void f();
};
-// CHECK-LABEL: define %struct.B* @_Z1fR1D
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) %struct.B* @_Z1fR1D
B &f(D &d) {
// CHECK-NOT: load i8**
return d;
diff --git a/test/CodeGenCXX/destructor-exception-spec.cpp b/test/CodeGenCXX/destructor-exception-spec.cpp
index e111ba0ba8e5..50c17ef4aa10 100644
--- a/test/CodeGenCXX/destructor-exception-spec.cpp
+++ b/test/CodeGenCXX/destructor-exception-spec.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -emit-llvm-only %s -std=c++11
-// RUN: %clang_cc1 -emit-llvm-only -fno-use-cxa-atexit %s -std=c++11
-// RUN: %clang_cc1 -cxx-abi microsoft -fno-rtti -emit-llvm-only %s -std=c++11
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm-only %s -std=c++11
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm-only -fno-use-cxa-atexit %s -std=c++11
+// RUN: %clang_cc1 -triple %ms_abi_triple -fno-rtti -emit-llvm-only %s -std=c++11
// PR13479: don't crash with -fno-exceptions.
namespace {
diff --git a/test/CodeGenCXX/destructors.cpp b/test/CodeGenCXX/destructors.cpp
index 799cca28b4a4..5c430480bc28 100644
--- a/test/CodeGenCXX/destructors.cpp
+++ b/test/CodeGenCXX/destructors.cpp
@@ -6,6 +6,13 @@
// CHECK-DAG: @_ZN5test11OD2Ev = alias {{.*}} @_ZN5test11AD2Ev
// CHECK-DAG: @_ZN5test11SD2Ev = alias bitcast {{.*}} @_ZN5test11AD2Ev
+// WIN32-DAG: @_ZN5test01AD1Ev = alias {{.*}} @_ZN5test01AD2Ev
+// WIN32-DAG: @_ZN5test11MD2Ev = alias {{.*}} @_ZN5test11AD2Ev
+// WIN32-DAG: @_ZN5test11ND2Ev = alias {{.*}} @_ZN5test11AD2Ev
+// WIN32-DAG: @_ZN5test11OD2Ev = alias {{.*}} @_ZN5test11AD2Ev
+// WIN32-DAG: @_ZN5test11SD2Ev = alias bitcast {{.*}} @_ZN5test11AD2Ev
+
+
struct A {
int a;
@@ -102,19 +109,19 @@ namespace test0 {
B::~B() try { } catch (int i) {}
// It will suppress the delegation optimization here, though.
-// CHECK-LABEL: define void @_ZN5test01BD1Ev(%"struct.test0::B"* %this) unnamed_addr
+// CHECK-LABEL: define void @_ZN5test01BD2Ev(%"struct.test0::B"* %this, i8** %vtt) unnamed_addr
// CHECK: invoke void @_ZN5test06MemberD1Ev
// CHECK: unwind label [[MEM_UNWIND:%[a-zA-Z0-9.]+]]
// CHECK: invoke void @_ZN5test04BaseD2Ev
// CHECK: unwind label [[BASE_UNWIND:%[a-zA-Z0-9.]+]]
-// CHECK: invoke void @_ZN5test05VBaseD2Ev
-// CHECK: unwind label [[VBASE_UNWIND:%[a-zA-Z0-9.]+]]
-// CHECK-LABEL: define void @_ZN5test01BD2Ev(%"struct.test0::B"* %this, i8** %vtt) unnamed_addr
+// CHECK-LABEL: define void @_ZN5test01BD1Ev(%"struct.test0::B"* %this) unnamed_addr
// CHECK: invoke void @_ZN5test06MemberD1Ev
// CHECK: unwind label [[MEM_UNWIND:%[a-zA-Z0-9.]+]]
// CHECK: invoke void @_ZN5test04BaseD2Ev
// CHECK: unwind label [[BASE_UNWIND:%[a-zA-Z0-9.]+]]
+// CHECK: invoke void @_ZN5test05VBaseD2Ev
+// CHECK: unwind label [[VBASE_UNWIND:%[a-zA-Z0-9.]+]]
}
// Test base-class aliasing.
@@ -272,14 +279,6 @@ namespace test6 {
// FIXME: way too much EH cleanup code follows
C::~C() { opaque(); }
- // CHECK-LABEL: define void @_ZN5test61CD1Ev(%"struct.test6::C"* %this) unnamed_addr
- // CHECK: invoke void @_ZN5test61CD2Ev
- // CHECK: invoke void @_ZN5test61BILj3EED2Ev
- // CHECK: call void @_ZN5test61BILj2EED2Ev
- // CHECK: ret void
- // CHECK: invoke void @_ZN5test61BILj3EED2Ev
- // CHECK: invoke void @_ZN5test61BILj2EED2Ev
-
// CHECK-LABEL: define void @_ZN5test61CD2Ev(%"struct.test6::C"* %this, i8** %vtt) unnamed_addr
// CHECK: invoke void @_ZN5test66opaqueEv
// CHECK: invoke void @_ZN5test61AD1Ev
@@ -293,6 +292,14 @@ namespace test6 {
// CHECK: invoke void @_ZN5test61AD1Ev
// CHECK: invoke void @_ZN5test61BILj1EED2Ev
// CHECK: invoke void @_ZN5test61BILj0EED2Ev
+
+ // CHECK-LABEL: define void @_ZN5test61CD1Ev(%"struct.test6::C"* %this) unnamed_addr
+ // CHECK: invoke void @_ZN5test61CD2Ev
+ // CHECK: invoke void @_ZN5test61BILj3EED2Ev
+ // CHECK: call void @_ZN5test61BILj2EED2Ev
+ // CHECK: ret void
+ // CHECK: invoke void @_ZN5test61BILj3EED2Ev
+ // CHECK: invoke void @_ZN5test61BILj2EED2Ev
}
// PR 9197
@@ -374,7 +381,7 @@ namespace test10 {
// Checks from test3:
- // CHECK-LABEL: define internal void @_ZN5test312_GLOBAL__N_11DD0Ev(%"struct.test3::<anonymous namespace>::D"* %this) unnamed_addr
+ // CHECK-LABEL: define internal void @_ZN5test312_GLOBAL__N_11DD0Ev(%"struct.test3::(anonymous namespace)::D"* %this) unnamed_addr
// CHECK: invoke void {{.*}} @_ZN5test312_GLOBAL__N_11CD2Ev
// CHECK: call void @_ZdlPv({{.*}}) [[NUW:#[0-9]+]]
// CHECK: ret void
@@ -398,7 +405,7 @@ namespace test10 {
// CHECK: call void @_ZN5test312_GLOBAL__N_11CD2Ev(
// CHECK: ret void
- // CHECK-LABEL: define internal void @_ZN5test312_GLOBAL__N_11CD2Ev(%"struct.test3::<anonymous namespace>::C"* %this) unnamed_addr
+ // CHECK-LABEL: define internal void @_ZN5test312_GLOBAL__N_11CD2Ev(%"struct.test3::(anonymous namespace)::C"* %this) unnamed_addr
// CHECK: invoke void @_ZN5test31BD2Ev(
// CHECK: call void @_ZN5test31AD2Ev(
// CHECK: ret void
@@ -406,7 +413,7 @@ namespace test10 {
// CHECK: declare void @_ZN5test31BD2Ev(
// CHECK: declare void @_ZN5test31AD2Ev(
- // CHECK-LABEL: define internal void @_ZN5test312_GLOBAL__N_11CD0Ev(%"struct.test3::<anonymous namespace>::C"* %this) unnamed_addr
+ // CHECK-LABEL: define internal void @_ZN5test312_GLOBAL__N_11CD0Ev(%"struct.test3::(anonymous namespace)::C"* %this) unnamed_addr
// CHECK: invoke void @_ZN5test312_GLOBAL__N_11CD2Ev(
// CHECK: call void @_ZdlPv({{.*}}) [[NUW]]
// CHECK: ret void
diff --git a/test/CodeGenCXX/dllexport-members.cpp b/test/CodeGenCXX/dllexport-members.cpp
new file mode 100644
index 000000000000..d913c09ec7be
--- /dev/null
+++ b/test/CodeGenCXX/dllexport-members.cpp
@@ -0,0 +1,647 @@
+// RUN: %clang_cc1 -triple i686-windows-msvc -fms-compatibility -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=MSC --check-prefix=M32 %s
+// RUN: %clang_cc1 -triple x86_64-windows-msvc -fms-compatibility -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=MSC --check-prefix=M64 %s
+// RUN: %clang_cc1 -triple i686-windows-gnu -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU --check-prefix=G32 %s
+// RUN: %clang_cc1 -triple x86_64-windows-gnu -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU --check-prefix=G64 %s
+
+// Helper structs to make templates more expressive.
+struct ImplicitInst_Exported {};
+struct ExplicitDecl_Exported {};
+struct ExplicitInst_Exported {};
+struct ExplicitSpec_Exported {};
+struct ExplicitSpec_Def_Exported {};
+struct ExplicitSpec_InlineDef_Exported {};
+struct ExplicitSpec_NotExported {};
+
+extern "C" void* malloc(__SIZE_TYPE__ size);
+extern "C" void free(void* p);
+
+
+//===----------------------------------------------------------------------===//
+// Class members
+//===----------------------------------------------------------------------===//
+
+// Export individual members of a class.
+struct ExportMembers {
+ struct Nested;
+
+ // M32-DAG: define dllexport x86_thiscallcc void @"\01?normalDef@ExportMembers@@QAEXXZ"(%struct.ExportMembers* %this)
+ // M64-DAG: define dllexport void @"\01?normalDef@ExportMembers@@QEAAXXZ"(%struct.ExportMembers* %this)
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?normalInclass@ExportMembers@@QAEXXZ"(%struct.ExportMembers* %this)
+ // M64-DAG: define weak_odr dllexport void @"\01?normalInclass@ExportMembers@@QEAAXXZ"(%struct.ExportMembers* %this)
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?normalInlineDef@ExportMembers@@QAEXXZ"(%struct.ExportMembers* %this)
+ // M64-DAG: define weak_odr dllexport void @"\01?normalInlineDef@ExportMembers@@QEAAXXZ"(%struct.ExportMembers* %this)
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?normalInlineDecl@ExportMembers@@QAEXXZ"(%struct.ExportMembers* %this)
+ // M64-DAG: define weak_odr dllexport void @"\01?normalInlineDecl@ExportMembers@@QEAAXXZ"(%struct.ExportMembers* %this)
+ // G32-DAG: define dllexport x86_thiscallcc void @_ZN13ExportMembers9normalDefEv(%struct.ExportMembers* %this)
+ // G64-DAG: define dllexport void @_ZN13ExportMembers9normalDefEv(%struct.ExportMembers* %this)
+ // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN13ExportMembers13normalInclassEv(%struct.ExportMembers* %this)
+ // G64-DAG: define weak_odr dllexport void @_ZN13ExportMembers13normalInclassEv(%struct.ExportMembers* %this)
+ // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN13ExportMembers15normalInlineDefEv(%struct.ExportMembers* %this)
+ // G64-DAG: define weak_odr dllexport void @_ZN13ExportMembers15normalInlineDefEv(%struct.ExportMembers* %this)
+ // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN13ExportMembers16normalInlineDeclEv(%struct.ExportMembers* %this)
+ // G64-DAG: define weak_odr dllexport void @_ZN13ExportMembers16normalInlineDeclEv(%struct.ExportMembers* %this)
+ // M32-DAG: define linkonce_odr x86_thiscallcc void @"\01?referencedNonExportedInClass@ExportMembers@@QAEXXZ"
+ __declspec(dllexport) void normalDef();
+ __declspec(dllexport) void normalInclass() { referencedNonExportedInClass(); }
+ __declspec(dllexport) void normalInlineDef();
+ __declspec(dllexport) inline void normalInlineDecl();
+ void referencedNonExportedInClass() {}
+
+ // M32-DAG: define dllexport x86_thiscallcc void @"\01?virtualDef@ExportMembers@@UAEXXZ"(%struct.ExportMembers* %this)
+ // M64-DAG: define dllexport void @"\01?virtualDef@ExportMembers@@UEAAXXZ"(%struct.ExportMembers* %this)
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?virtualInclass@ExportMembers@@UAEXXZ"(%struct.ExportMembers* %this)
+ // M64-DAG: define weak_odr dllexport void @"\01?virtualInclass@ExportMembers@@UEAAXXZ"(%struct.ExportMembers* %this)
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?virtualInlineDef@ExportMembers@@UAEXXZ"(%struct.ExportMembers* %this)
+ // M64-DAG: define weak_odr dllexport void @"\01?virtualInlineDef@ExportMembers@@UEAAXXZ"(%struct.ExportMembers* %this)
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?virtualInlineDecl@ExportMembers@@UAEXXZ"(%struct.ExportMembers* %this)
+ // M64-DAG: define weak_odr dllexport void @"\01?virtualInlineDecl@ExportMembers@@UEAAXXZ"(%struct.ExportMembers* %this)
+ // G32-DAG: define dllexport x86_thiscallcc void @_ZN13ExportMembers10virtualDefEv(%struct.ExportMembers* %this)
+ // G64-DAG: define dllexport void @_ZN13ExportMembers10virtualDefEv(%struct.ExportMembers* %this)
+ // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN13ExportMembers14virtualInclassEv(%struct.ExportMembers* %this)
+ // G64-DAG: define weak_odr dllexport void @_ZN13ExportMembers14virtualInclassEv(%struct.ExportMembers* %this)
+ // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN13ExportMembers16virtualInlineDefEv(%struct.ExportMembers* %this)
+ // G64-DAG: define weak_odr dllexport void @_ZN13ExportMembers16virtualInlineDefEv(%struct.ExportMembers* %this)
+ // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN13ExportMembers17virtualInlineDeclEv(%struct.ExportMembers* %this)
+ // G64-DAG: define weak_odr dllexport void @_ZN13ExportMembers17virtualInlineDeclEv(%struct.ExportMembers* %this)
+ __declspec(dllexport) virtual void virtualDef();
+ __declspec(dllexport) virtual void virtualInclass() {}
+ __declspec(dllexport) virtual void virtualInlineDef();
+ __declspec(dllexport) virtual inline void virtualInlineDecl();
+
+ // MSC-DAG: define dllexport void @"\01?staticDef@ExportMembers@@SAXXZ"()
+ // MSC-DAG: define weak_odr dllexport void @"\01?staticInclass@ExportMembers@@SAXXZ"()
+ // MSC-DAG: define weak_odr dllexport void @"\01?staticInlineDef@ExportMembers@@SAXXZ"()
+ // MSC-DAG: define weak_odr dllexport void @"\01?staticInlineDecl@ExportMembers@@SAXXZ"()
+ // GNU-DAG: define dllexport void @_ZN13ExportMembers9staticDefEv()
+ // GNU-DAG: define weak_odr dllexport void @_ZN13ExportMembers13staticInclassEv()
+ // GNU-DAG: define weak_odr dllexport void @_ZN13ExportMembers15staticInlineDefEv()
+ // GNU-DAG: define weak_odr dllexport void @_ZN13ExportMembers16staticInlineDeclEv()
+ __declspec(dllexport) static void staticDef();
+ __declspec(dllexport) static void staticInclass() {}
+ __declspec(dllexport) static void staticInlineDef();
+ __declspec(dllexport) static inline void staticInlineDecl();
+
+ // M32-DAG: define dllexport x86_thiscallcc void @"\01?protectedDef@ExportMembers@@IAEXXZ"(%struct.ExportMembers* %this)
+ // M64-DAG: define dllexport void @"\01?protectedDef@ExportMembers@@IEAAXXZ"(%struct.ExportMembers* %this)
+ // G32-DAG: define dllexport x86_thiscallcc void @_ZN13ExportMembers12protectedDefEv(%struct.ExportMembers* %this)
+ // G64-DAG: define dllexport void @_ZN13ExportMembers12protectedDefEv(%struct.ExportMembers* %this)
+ // MSC-DAG: define dllexport void @"\01?protectedStaticDef@ExportMembers@@KAXXZ"()
+ // GNU-DAG: define dllexport void @_ZN13ExportMembers18protectedStaticDefEv()
+protected:
+ __declspec(dllexport) void protectedDef();
+ __declspec(dllexport) static void protectedStaticDef();
+
+ // M32-DAG: define dllexport x86_thiscallcc void @"\01?privateDef@ExportMembers@@AAEXXZ"(%struct.ExportMembers* %this)
+ // M64-DAG: define dllexport void @"\01?privateDef@ExportMembers@@AEAAXXZ"(%struct.ExportMembers* %this)
+ // G32-DAG: define dllexport x86_thiscallcc void @_ZN13ExportMembers10privateDefEv(%struct.ExportMembers* %this)
+ // G64-DAG: define dllexport void @_ZN13ExportMembers10privateDefEv(%struct.ExportMembers* %this)
+ // MSC-DAG: define dllexport void @"\01?privateStaticDef@ExportMembers@@CAXXZ"()
+ // GNU-DAG: define dllexport void @_ZN13ExportMembers16privateStaticDefEv()
+private:
+ __declspec(dllexport) void privateDef();
+ __declspec(dllexport) static void privateStaticDef();
+
+ // M32-DAG: define x86_thiscallcc void @"\01?ignored@ExportMembers@@QAEXXZ"(%struct.ExportMembers* %this)
+ // M64-DAG: define void @"\01?ignored@ExportMembers@@QEAAXXZ"(%struct.ExportMembers* %this)
+ // G32-DAG: define x86_thiscallcc void @_ZN13ExportMembers7ignoredEv(%struct.ExportMembers* %this)
+ // G64-DAG: define void @_ZN13ExportMembers7ignoredEv(%struct.ExportMembers* %this)
+public:
+ void ignored();
+
+ // MSC-DAG: @"\01?StaticField@ExportMembers@@2HA" = dllexport global i32 1, align 4
+ // MSC-DAG: @"\01?StaticConstField@ExportMembers@@2HB" = dllexport constant i32 1, align 4
+ // MSC-DAG: @"\01?StaticConstFieldEqualInit@ExportMembers@@2HB" = weak_odr dllexport constant i32 1, align 4
+ // MSC-DAG: @"\01?StaticConstFieldBraceInit@ExportMembers@@2HB" = weak_odr dllexport constant i32 1, align 4
+ // MSC-DAG: @"\01?ConstexprField@ExportMembers@@2HB" = weak_odr dllexport constant i32 1, align 4
+ // GNU-DAG: @_ZN13ExportMembers11StaticFieldE = dllexport global i32 1, align 4
+ // GNU-DAG: @_ZN13ExportMembers16StaticConstFieldE = dllexport constant i32 1, align 4
+ // GNU-DAG: @_ZN13ExportMembers25StaticConstFieldEqualInitE = dllexport constant i32 1, align 4
+ // GNU-DAG: @_ZN13ExportMembers25StaticConstFieldBraceInitE = dllexport constant i32 1, align 4
+ // GNU-DAG: @_ZN13ExportMembers14ConstexprFieldE = dllexport constant i32 1, align 4
+ __declspec(dllexport) static int StaticField;
+ __declspec(dllexport) static const int StaticConstField;
+ __declspec(dllexport) static const int StaticConstFieldEqualInit = 1;
+ __declspec(dllexport) static const int StaticConstFieldBraceInit{1};
+ __declspec(dllexport) constexpr static int ConstexprField = 1;
+};
+
+ void ExportMembers::normalDef() {}
+inline void ExportMembers::normalInlineDef() {}
+ void ExportMembers::normalInlineDecl() {}
+ void ExportMembers::virtualDef() {}
+inline void ExportMembers::virtualInlineDef() {}
+ void ExportMembers::virtualInlineDecl() {}
+ void ExportMembers::staticDef() {}
+inline void ExportMembers::staticInlineDef() {}
+ void ExportMembers::staticInlineDecl() {}
+ void ExportMembers::ignored() {}
+ void ExportMembers::protectedDef() {}
+ void ExportMembers::protectedStaticDef() {}
+ void ExportMembers::privateDef() {}
+ void ExportMembers::privateStaticDef() {}
+
+ int ExportMembers::StaticField = 1;
+const int ExportMembers::StaticConstField = 1;
+const int ExportMembers::StaticConstFieldEqualInit;
+const int ExportMembers::StaticConstFieldBraceInit;
+constexpr int ExportMembers::ConstexprField;
+
+
+// Export individual members of a nested class.
+struct ExportMembers::Nested {
+ // M32-DAG: define dllexport x86_thiscallcc void @"\01?normalDef@Nested@ExportMembers@@QAEXXZ"(%"struct.ExportMembers::Nested"* %this)
+ // M64-DAG: define dllexport void @"\01?normalDef@Nested@ExportMembers@@QEAAXXZ"(%"struct.ExportMembers::Nested"* %this)
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?normalInclass@Nested@ExportMembers@@QAEXXZ"(%"struct.ExportMembers::Nested"* %this)
+ // M64-DAG: define weak_odr dllexport void @"\01?normalInclass@Nested@ExportMembers@@QEAAXXZ"(%"struct.ExportMembers::Nested"* %this)
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?normalInlineDef@Nested@ExportMembers@@QAEXXZ"(%"struct.ExportMembers::Nested"* %this)
+ // M64-DAG: define weak_odr dllexport void @"\01?normalInlineDef@Nested@ExportMembers@@QEAAXXZ"(%"struct.ExportMembers::Nested"* %this)
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?normalInlineDecl@Nested@ExportMembers@@QAEXXZ"(%"struct.ExportMembers::Nested"* %this)
+ // M64-DAG: define weak_odr dllexport void @"\01?normalInlineDecl@Nested@ExportMembers@@QEAAXXZ"(%"struct.ExportMembers::Nested"* %this)
+ // G32-DAG: define dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested9normalDefEv(%"struct.ExportMembers::Nested"* %this)
+ // G64-DAG: define dllexport void @_ZN13ExportMembers6Nested9normalDefEv(%"struct.ExportMembers::Nested"* %this)
+ // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested13normalInclassEv(%"struct.ExportMembers::Nested"* %this)
+ // G64-DAG: define weak_odr dllexport void @_ZN13ExportMembers6Nested13normalInclassEv(%"struct.ExportMembers::Nested"* %this)
+ // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested15normalInlineDefEv(%"struct.ExportMembers::Nested"* %this)
+ // G64-DAG: define weak_odr dllexport void @_ZN13ExportMembers6Nested15normalInlineDefEv(%"struct.ExportMembers::Nested"* %this)
+ // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested16normalInlineDeclEv(%"struct.ExportMembers::Nested"* %this)
+ // G64-DAG: define weak_odr dllexport void @_ZN13ExportMembers6Nested16normalInlineDeclEv(%"struct.ExportMembers::Nested"* %this)
+ __declspec(dllexport) void normalDef();
+ __declspec(dllexport) void normalInclass() {}
+ __declspec(dllexport) void normalInlineDef();
+ __declspec(dllexport) inline void normalInlineDecl();
+
+ // M32-DAG: define dllexport x86_thiscallcc void @"\01?virtualDef@Nested@ExportMembers@@UAEXXZ"(%"struct.ExportMembers::Nested"* %this)
+ // M64-DAG: define dllexport void @"\01?virtualDef@Nested@ExportMembers@@UEAAXXZ"(%"struct.ExportMembers::Nested"* %this)
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?virtualInclass@Nested@ExportMembers@@UAEXXZ"(%"struct.ExportMembers::Nested"* %this)
+ // M64-DAG: define weak_odr dllexport void @"\01?virtualInclass@Nested@ExportMembers@@UEAAXXZ"(%"struct.ExportMembers::Nested"* %this)
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?virtualInlineDef@Nested@ExportMembers@@UAEXXZ"(%"struct.ExportMembers::Nested"* %this)
+ // M64-DAG: define weak_odr dllexport void @"\01?virtualInlineDef@Nested@ExportMembers@@UEAAXXZ"(%"struct.ExportMembers::Nested"* %this)
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?virtualInlineDecl@Nested@ExportMembers@@UAEXXZ"(%"struct.ExportMembers::Nested"* %this)
+ // M64-DAG: define weak_odr dllexport void @"\01?virtualInlineDecl@Nested@ExportMembers@@UEAAXXZ"(%"struct.ExportMembers::Nested"* %this)
+ // G32-DAG: define dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested10virtualDefEv(%"struct.ExportMembers::Nested"* %this)
+ // G64-DAG: define dllexport void @_ZN13ExportMembers6Nested10virtualDefEv(%"struct.ExportMembers::Nested"* %this)
+ // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested14virtualInclassEv(%"struct.ExportMembers::Nested"* %this)
+ // G64-DAG: define weak_odr dllexport void @_ZN13ExportMembers6Nested14virtualInclassEv(%"struct.ExportMembers::Nested"* %this)
+ // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested16virtualInlineDefEv(%"struct.ExportMembers::Nested"* %this)
+ // G64-DAG: define weak_odr dllexport void @_ZN13ExportMembers6Nested16virtualInlineDefEv(%"struct.ExportMembers::Nested"* %this)
+ // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested17virtualInlineDeclEv(%"struct.ExportMembers::Nested"* %this)
+ // G64-DAG: define weak_odr dllexport void @_ZN13ExportMembers6Nested17virtualInlineDeclEv(%"struct.ExportMembers::Nested"* %this)
+ __declspec(dllexport) virtual void virtualDef();
+ __declspec(dllexport) virtual void virtualInclass() {}
+ __declspec(dllexport) virtual void virtualInlineDef();
+ __declspec(dllexport) virtual inline void virtualInlineDecl();
+
+ // MSC-DAG: define dllexport void @"\01?staticDef@Nested@ExportMembers@@SAXXZ"()
+ // MSC-DAG: define weak_odr dllexport void @"\01?staticInclass@Nested@ExportMembers@@SAXXZ"()
+ // MSC-DAG: define weak_odr dllexport void @"\01?staticInlineDef@Nested@ExportMembers@@SAXXZ"()
+ // MSC-DAG: define weak_odr dllexport void @"\01?staticInlineDecl@Nested@ExportMembers@@SAXXZ"()
+ // GNU-DAG: define dllexport void @_ZN13ExportMembers6Nested9staticDefEv()
+ // GNU-DAG: define weak_odr dllexport void @_ZN13ExportMembers6Nested13staticInclassEv()
+ // GNU-DAG: define weak_odr dllexport void @_ZN13ExportMembers6Nested15staticInlineDefEv()
+ // GNU-DAG: define weak_odr dllexport void @_ZN13ExportMembers6Nested16staticInlineDeclEv()
+ __declspec(dllexport) static void staticDef();
+ __declspec(dllexport) static void staticInclass() {}
+ __declspec(dllexport) static void staticInlineDef();
+ __declspec(dllexport) static inline void staticInlineDecl();
+
+ // M32-DAG: define dllexport x86_thiscallcc void @"\01?protectedDef@Nested@ExportMembers@@IAEXXZ"(%"struct.ExportMembers::Nested"* %this)
+ // M64-DAG: define dllexport void @"\01?protectedDef@Nested@ExportMembers@@IEAAXXZ"(%"struct.ExportMembers::Nested"* %this)
+ // G32-DAG: define dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested12protectedDefEv(%"struct.ExportMembers::Nested"* %this)
+ // G64-DAG: define dllexport void @_ZN13ExportMembers6Nested12protectedDefEv(%"struct.ExportMembers::Nested"* %this)
+ // MSC-DAG: define dllexport void @"\01?protectedStaticDef@Nested@ExportMembers@@KAXXZ"()
+ // GNU-DAG: define dllexport void @_ZN13ExportMembers6Nested18protectedStaticDefEv()
+protected:
+ __declspec(dllexport) void protectedDef();
+ __declspec(dllexport) static void protectedStaticDef();
+
+ // M32-DAG: define dllexport x86_thiscallcc void @"\01?privateDef@Nested@ExportMembers@@AAEXXZ"(%"struct.ExportMembers::Nested"* %this)
+ // M64-DAG: define dllexport void @"\01?privateDef@Nested@ExportMembers@@AEAAXXZ"(%"struct.ExportMembers::Nested"* %this)
+ // G32-DAG: define dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested10privateDefEv(%"struct.ExportMembers::Nested"* %this)
+ // G64-DAG: define dllexport void @_ZN13ExportMembers6Nested10privateDefEv(%"struct.ExportMembers::Nested"* %this)
+ // MSC-DAG: define dllexport void @"\01?privateStaticDef@Nested@ExportMembers@@CAXXZ"()
+ // GNU-DAG: define dllexport void @_ZN13ExportMembers6Nested16privateStaticDefEv()
+private:
+ __declspec(dllexport) void privateDef();
+ __declspec(dllexport) static void privateStaticDef();
+
+ // M32-DAG: define x86_thiscallcc void @"\01?ignored@Nested@ExportMembers@@QAEXXZ"(%"struct.ExportMembers::Nested"* %this)
+ // M64-DAG: define void @"\01?ignored@Nested@ExportMembers@@QEAAXXZ"(%"struct.ExportMembers::Nested"* %this)
+ // G32-DAG: define x86_thiscallcc void @_ZN13ExportMembers6Nested7ignoredEv(%"struct.ExportMembers::Nested"* %this)
+ // G64-DAG: define void @_ZN13ExportMembers6Nested7ignoredEv(%"struct.ExportMembers::Nested"* %this)
+public:
+ void ignored();
+
+ // MSC-DAG: @"\01?StaticField@Nested@ExportMembers@@2HA" = dllexport global i32 1, align 4
+ // MSC-DAG: @"\01?StaticConstField@Nested@ExportMembers@@2HB" = dllexport constant i32 1, align 4
+ // MSC-DAG: @"\01?StaticConstFieldEqualInit@Nested@ExportMembers@@2HB" = weak_odr dllexport constant i32 1, align 4
+ // MSC-DAG: @"\01?StaticConstFieldBraceInit@Nested@ExportMembers@@2HB" = weak_odr dllexport constant i32 1, align 4
+ // MSC-DAG: @"\01?ConstexprField@Nested@ExportMembers@@2HB" = weak_odr dllexport constant i32 1, align 4
+ // GNU-DAG: @_ZN13ExportMembers6Nested11StaticFieldE = dllexport global i32 1, align 4
+ // GNU-DAG: @_ZN13ExportMembers6Nested16StaticConstFieldE = dllexport constant i32 1, align 4
+ // GNU-DAG: @_ZN13ExportMembers6Nested25StaticConstFieldEqualInitE = dllexport constant i32 1, align 4
+ // GNU-DAG: @_ZN13ExportMembers6Nested25StaticConstFieldBraceInitE = dllexport constant i32 1, align 4
+ // GNU-DAG: @_ZN13ExportMembers6Nested14ConstexprFieldE = dllexport constant i32 1, align 4
+ __declspec(dllexport) static int StaticField;
+ __declspec(dllexport) static const int StaticConstField;
+ __declspec(dllexport) static const int StaticConstFieldEqualInit = 1;
+ __declspec(dllexport) static const int StaticConstFieldBraceInit{1};
+ __declspec(dllexport) constexpr static int ConstexprField = 1;
+};
+
+ void ExportMembers::Nested::normalDef() {}
+inline void ExportMembers::Nested::normalInlineDef() {}
+ void ExportMembers::Nested::normalInlineDecl() {}
+ void ExportMembers::Nested::virtualDef() {}
+inline void ExportMembers::Nested::virtualInlineDef() {}
+ void ExportMembers::Nested::virtualInlineDecl() {}
+ void ExportMembers::Nested::staticDef() {}
+inline void ExportMembers::Nested::staticInlineDef() {}
+ void ExportMembers::Nested::staticInlineDecl() {}
+ void ExportMembers::Nested::ignored() {}
+ void ExportMembers::Nested::protectedDef() {}
+ void ExportMembers::Nested::protectedStaticDef() {}
+ void ExportMembers::Nested::privateDef() {}
+ void ExportMembers::Nested::privateStaticDef() {}
+
+ int ExportMembers::Nested::StaticField = 1;
+const int ExportMembers::Nested::StaticConstField = 1;
+const int ExportMembers::Nested::StaticConstFieldEqualInit;
+const int ExportMembers::Nested::StaticConstFieldBraceInit;
+constexpr int ExportMembers::Nested::ConstexprField;
+
+
+// Export special member functions.
+struct ExportSpecials {
+ // M32-DAG: define dllexport x86_thiscallcc %struct.ExportSpecials* @"\01??0ExportSpecials@@QAE@XZ"(%struct.ExportSpecials* returned %this)
+ // M64-DAG: define dllexport %struct.ExportSpecials* @"\01??0ExportSpecials@@QEAA@XZ"(%struct.ExportSpecials* returned %this)
+ // G32-DAG: define dllexport x86_thiscallcc void @_ZN14ExportSpecialsC1Ev(%struct.ExportSpecials* %this)
+ // G64-DAG: define dllexport void @_ZN14ExportSpecialsC1Ev(%struct.ExportSpecials* %this)
+ // G32-DAG: define dllexport x86_thiscallcc void @_ZN14ExportSpecialsC2Ev(%struct.ExportSpecials* %this)
+ // G64-DAG: define dllexport void @_ZN14ExportSpecialsC2Ev(%struct.ExportSpecials* %this)
+ __declspec(dllexport) ExportSpecials();
+
+ // M32-DAG: define dllexport x86_thiscallcc void @"\01??1ExportSpecials@@QAE@XZ"(%struct.ExportSpecials* %this)
+ // M64-DAG: define dllexport void @"\01??1ExportSpecials@@QEAA@XZ"(%struct.ExportSpecials* %this)
+ // G32-DAG: define dllexport x86_thiscallcc void @_ZN14ExportSpecialsD1Ev(%struct.ExportSpecials* %this)
+ // G64-DAG: define dllexport void @_ZN14ExportSpecialsD1Ev(%struct.ExportSpecials* %this)
+ // G32-DAG: define dllexport x86_thiscallcc void @_ZN14ExportSpecialsD2Ev(%struct.ExportSpecials* %this)
+ // G64-DAG: define dllexport void @_ZN14ExportSpecialsD2Ev(%struct.ExportSpecials* %this)
+ __declspec(dllexport) ~ExportSpecials();
+
+ // M32-DAG: define dllexport x86_thiscallcc %struct.ExportSpecials* @"\01??0ExportSpecials@@QAE@ABU0@@Z"(%struct.ExportSpecials* returned %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // M64-DAG: define dllexport %struct.ExportSpecials* @"\01??0ExportSpecials@@QEAA@AEBU0@@Z"(%struct.ExportSpecials* returned %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: define dllexport x86_thiscallcc void @_ZN14ExportSpecialsC1ERKS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: define dllexport void @_ZN14ExportSpecialsC1ERKS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: define dllexport x86_thiscallcc void @_ZN14ExportSpecialsC2ERKS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: define dllexport void @_ZN14ExportSpecialsC2ERKS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ __declspec(dllexport) ExportSpecials(const ExportSpecials&);
+
+ // M32-DAG: define dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @"\01??4ExportSpecials@@QAEAAU0@ABU0@@Z"(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // M64-DAG: define dllexport dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @"\01??4ExportSpecials@@QEAAAEAU0@AEBU0@@Z"(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: define dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @_ZN14ExportSpecialsaSERKS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: define dllexport dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @_ZN14ExportSpecialsaSERKS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ __declspec(dllexport) ExportSpecials& operator=(const ExportSpecials&);
+
+ // M32-DAG: define dllexport x86_thiscallcc %struct.ExportSpecials* @"\01??0ExportSpecials@@QAE@$$QAU0@@Z"(%struct.ExportSpecials* returned %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // M64-DAG: define dllexport %struct.ExportSpecials* @"\01??0ExportSpecials@@QEAA@$$QEAU0@@Z"(%struct.ExportSpecials* returned %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: define dllexport x86_thiscallcc void @_ZN14ExportSpecialsC1EOS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: define dllexport void @_ZN14ExportSpecialsC1EOS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: define dllexport x86_thiscallcc void @_ZN14ExportSpecialsC2EOS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: define dllexport void @_ZN14ExportSpecialsC2EOS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ __declspec(dllexport) ExportSpecials(ExportSpecials&&);
+
+ // M32-DAG: define dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @"\01??4ExportSpecials@@QAEAAU0@$$QAU0@@Z"(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // M64-DAG: define dllexport dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @"\01??4ExportSpecials@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: define dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @_ZN14ExportSpecialsaSEOS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: define dllexport dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @_ZN14ExportSpecialsaSEOS_(%struct.ExportSpecials* %this, %struct.ExportSpecials* dereferenceable({{[0-9]+}}))
+ __declspec(dllexport) ExportSpecials& operator=(ExportSpecials&&);
+};
+ExportSpecials::ExportSpecials() {}
+ExportSpecials::~ExportSpecials() {}
+ExportSpecials::ExportSpecials(const ExportSpecials&) {}
+ExportSpecials& ExportSpecials::operator=(const ExportSpecials&) { return *this; }
+ExportSpecials::ExportSpecials(ExportSpecials&&) {}
+ExportSpecials& ExportSpecials::operator=(ExportSpecials&&) { return *this; }
+
+
+// Export class with inline special member functions.
+struct ExportInlineSpecials {
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc %struct.ExportInlineSpecials* @"\01??0ExportInlineSpecials@@QAE@XZ"(%struct.ExportInlineSpecials* returned %this)
+ // M64-DAG: define weak_odr dllexport %struct.ExportInlineSpecials* @"\01??0ExportInlineSpecials@@QEAA@XZ"(
+ // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN20ExportInlineSpecialsC1Ev(
+ // G64-DAG: define weak_odr dllexport void @_ZN20ExportInlineSpecialsC1Ev(
+ __declspec(dllexport) ExportInlineSpecials() {}
+
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01??1ExportInlineSpecials@@QAE@XZ"(
+ // M64-DAG: define weak_odr dllexport void @"\01??1ExportInlineSpecials@@QEAA@XZ"(
+ // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN20ExportInlineSpecialsD1Ev(
+ // G64-DAG: define weak_odr dllexport void @_ZN20ExportInlineSpecialsD1Ev(
+ __declspec(dllexport) ~ExportInlineSpecials() {}
+
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc %struct.ExportInlineSpecials* @"\01??0ExportInlineSpecials@@QAE@ABU0@@Z"(
+ // M64-DAG: define weak_odr dllexport %struct.ExportInlineSpecials* @"\01??0ExportInlineSpecials@@QEAA@AEBU0@@Z"(
+ // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN20ExportInlineSpecialsC1ERKS_(
+ // G64-DAG: define weak_odr dllexport void @_ZN20ExportInlineSpecialsC1ERKS_(
+ __declspec(dllexport) inline ExportInlineSpecials(const ExportInlineSpecials&);
+
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @"\01??4ExportInlineSpecials@@QAEAAU0@ABU0@@Z"(
+ // M64-DAG: define weak_odr dllexport dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @"\01??4ExportInlineSpecials@@QEAAAEAU0@AEBU0@@Z"(
+ // G32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @_ZN20ExportInlineSpecialsaSERKS_(
+ // G64-DAG: define weak_odr dllexport dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @_ZN20ExportInlineSpecialsaSERKS_(
+ __declspec(dllexport) ExportInlineSpecials& operator=(const ExportInlineSpecials&);
+
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc %struct.ExportInlineSpecials* @"\01??0ExportInlineSpecials@@QAE@$$QAU0@@Z"(
+ // M64-DAG: define weak_odr dllexport %struct.ExportInlineSpecials* @"\01??0ExportInlineSpecials@@QEAA@$$QEAU0@@Z"(
+ // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN20ExportInlineSpecialsC1EOS_(
+ // G64-DAG: define weak_odr dllexport void @_ZN20ExportInlineSpecialsC1EOS_(
+ __declspec(dllexport) ExportInlineSpecials(ExportInlineSpecials&&) {}
+
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @"\01??4ExportInlineSpecials@@QAEAAU0@$$QAU0@@Z"(
+ // M64-DAG: define weak_odr dllexport dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @"\01??4ExportInlineSpecials@@QEAAAEAU0@$$QEAU0@@Z"(
+ // G32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @_ZN20ExportInlineSpecialsaSEOS_(
+ // G64-DAG: define weak_odr dllexport dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @_ZN20ExportInlineSpecialsaSEOS_(
+ __declspec(dllexport) ExportInlineSpecials& operator=(ExportInlineSpecials&&) { return *this; }
+};
+ExportInlineSpecials::ExportInlineSpecials(const ExportInlineSpecials&) {}
+inline ExportInlineSpecials& ExportInlineSpecials::operator=(const ExportInlineSpecials&) { return *this; }
+
+
+// Export defaulted member function definitions.
+struct ExportDefaultedDefs {
+ __declspec(dllexport) ExportDefaultedDefs();
+ __declspec(dllexport) ~ExportDefaultedDefs();
+ __declspec(dllexport) inline ExportDefaultedDefs(const ExportDefaultedDefs&);
+ __declspec(dllexport) ExportDefaultedDefs& operator=(const ExportDefaultedDefs&);
+ __declspec(dllexport) ExportDefaultedDefs(ExportDefaultedDefs&&);
+ __declspec(dllexport) ExportDefaultedDefs& operator=(ExportDefaultedDefs&&);
+};
+
+// M32-DAG: define dllexport x86_thiscallcc %struct.ExportDefaultedDefs* @"\01??0ExportDefaultedDefs@@QAE@XZ"(%struct.ExportDefaultedDefs* returned %this)
+// M64-DAG: define dllexport %struct.ExportDefaultedDefs* @"\01??0ExportDefaultedDefs@@QEAA@XZ"(%struct.ExportDefaultedDefs* returned %this)
+// G32-DAG: define dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC1Ev(%struct.ExportDefaultedDefs* %this)
+// G64-DAG: define dllexport void @_ZN19ExportDefaultedDefsC1Ev(%struct.ExportDefaultedDefs* %this)
+// G32-DAG: define dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC2Ev(%struct.ExportDefaultedDefs* %this)
+// G64-DAG: define dllexport void @_ZN19ExportDefaultedDefsC2Ev(%struct.ExportDefaultedDefs* %this)
+__declspec(dllexport) ExportDefaultedDefs::ExportDefaultedDefs() = default;
+
+// M32-DAG: define dllexport x86_thiscallcc void @"\01??1ExportDefaultedDefs@@QAE@XZ"(%struct.ExportDefaultedDefs* %this)
+// M64-DAG: define dllexport void @"\01??1ExportDefaultedDefs@@QEAA@XZ"(%struct.ExportDefaultedDefs* %this)
+// G32-DAG: define dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsD1Ev(%struct.ExportDefaultedDefs* %this)
+// G64-DAG: define dllexport void @_ZN19ExportDefaultedDefsD1Ev(%struct.ExportDefaultedDefs* %this)
+// G32-DAG: define dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsD2Ev(%struct.ExportDefaultedDefs* %this)
+// G64-DAG: define dllexport void @_ZN19ExportDefaultedDefsD2Ev(%struct.ExportDefaultedDefs* %this)
+ExportDefaultedDefs::~ExportDefaultedDefs() = default;
+
+// M32-DAG: define weak_odr dllexport x86_thiscallcc %struct.ExportDefaultedDefs* @"\01??0ExportDefaultedDefs@@QAE@ABU0@@Z"(%struct.ExportDefaultedDefs* returned %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// M64-DAG: define weak_odr dllexport %struct.ExportDefaultedDefs* @"\01??0ExportDefaultedDefs@@QEAA@AEBU0@@Z"(%struct.ExportDefaultedDefs* returned %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC1ERKS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G64-DAG: define weak_odr dllexport void @_ZN19ExportDefaultedDefsC1ERKS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC2ERKS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G64-DAG: define weak_odr dllexport void @_ZN19ExportDefaultedDefsC2ERKS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+__declspec(dllexport) ExportDefaultedDefs::ExportDefaultedDefs(const ExportDefaultedDefs&) = default;
+
+// M32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @"\01??4ExportDefaultedDefs@@QAEAAU0@ABU0@@Z"(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// M64-DAG: define weak_odr dllexport dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @"\01??4ExportDefaultedDefs@@QEAAAEAU0@AEBU0@@Z"(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @_ZN19ExportDefaultedDefsaSERKS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G64-DAG: define weak_odr dllexport dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @_ZN19ExportDefaultedDefsaSERKS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+inline ExportDefaultedDefs& ExportDefaultedDefs::operator=(const ExportDefaultedDefs&) = default;
+
+// M32-DAG: define dllexport x86_thiscallcc %struct.ExportDefaultedDefs* @"\01??0ExportDefaultedDefs@@QAE@$$QAU0@@Z"(%struct.ExportDefaultedDefs* returned %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// M64-DAG: define dllexport %struct.ExportDefaultedDefs* @"\01??0ExportDefaultedDefs@@QEAA@$$QEAU0@@Z"(%struct.ExportDefaultedDefs* returned %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G32-DAG: define dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC1EOS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G64-DAG: define dllexport void @_ZN19ExportDefaultedDefsC1EOS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G32-DAG: define dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC2EOS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G64-DAG: define dllexport void @_ZN19ExportDefaultedDefsC2EOS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+__declspec(dllexport) ExportDefaultedDefs::ExportDefaultedDefs(ExportDefaultedDefs&&) = default;
+
+// M32-DAG: define dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @"\01??4ExportDefaultedDefs@@QAEAAU0@$$QAU0@@Z"(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// M64-DAG: define dllexport dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @"\01??4ExportDefaultedDefs@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G32-DAG: define dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @_ZN19ExportDefaultedDefsaSEOS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G64-DAG: define dllexport dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @_ZN19ExportDefaultedDefsaSEOS_(%struct.ExportDefaultedDefs* %this, %struct.ExportDefaultedDefs* dereferenceable({{[0-9]+}}))
+ExportDefaultedDefs& ExportDefaultedDefs::operator=(ExportDefaultedDefs&&) = default;
+
+
+// Export allocation functions.
+struct ExportAlloc {
+ __declspec(dllexport) void* operator new(__SIZE_TYPE__);
+ __declspec(dllexport) void* operator new[](__SIZE_TYPE__);
+ __declspec(dllexport) void operator delete(void*);
+ __declspec(dllexport) void operator delete[](void*);
+};
+
+// M32-DAG: define dllexport i8* @"\01??2ExportAlloc@@SAPAXI@Z"(i32 %n)
+// M64-DAG: define dllexport i8* @"\01??2ExportAlloc@@SAPEAX_K@Z"(i64 %n)
+// G32-DAG: define dllexport i8* @_ZN11ExportAllocnwEj(i32 %n)
+// G64-DAG: define dllexport i8* @_ZN11ExportAllocnwEy(i64 %n)
+void* ExportAlloc::operator new(__SIZE_TYPE__ n) { return malloc(n); }
+
+// M32-DAG: define dllexport i8* @"\01??_UExportAlloc@@SAPAXI@Z"(i32 %n)
+// M64-DAG: define dllexport i8* @"\01??_UExportAlloc@@SAPEAX_K@Z"(i64 %n)
+// G32-DAG: define dllexport i8* @_ZN11ExportAllocnaEj(i32 %n)
+// G64-DAG: define dllexport i8* @_ZN11ExportAllocnaEy(i64 %n)
+void* ExportAlloc::operator new[](__SIZE_TYPE__ n) { return malloc(n); }
+
+// M32-DAG: define dllexport void @"\01??3ExportAlloc@@SAXPAX@Z"(i8* %p)
+// M64-DAG: define dllexport void @"\01??3ExportAlloc@@SAXPEAX@Z"(i8* %p)
+// G32-DAG: define dllexport void @_ZN11ExportAllocdlEPv(i8* %p)
+// G64-DAG: define dllexport void @_ZN11ExportAllocdlEPv(i8* %p)
+void ExportAlloc::operator delete(void* p) { free(p); }
+
+// M32-DAG: define dllexport void @"\01??_VExportAlloc@@SAXPAX@Z"(i8* %p)
+// M64-DAG: define dllexport void @"\01??_VExportAlloc@@SAXPEAX@Z"(i8* %p)
+// G32-DAG: define dllexport void @_ZN11ExportAllocdaEPv(i8* %p)
+// G64-DAG: define dllexport void @_ZN11ExportAllocdaEPv(i8* %p)
+void ExportAlloc::operator delete[](void* p) { free(p); }
+
+
+//===----------------------------------------------------------------------===//
+// Class member templates
+//===----------------------------------------------------------------------===//
+
+struct MemFunTmpl {
+ template<typename T> void normalDef() {}
+ template<typename T> __declspec(dllexport) void exportedNormal() {}
+ template<typename T> static void staticDef() {}
+ template<typename T> __declspec(dllexport) static void exportedStatic() {}
+};
+
+// Export implicit instantiation of an exported member function template.
+void useMemFunTmpl() {
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01??$exportedNormal@UImplicitInst_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* %this)
+ // M64-DAG: define weak_odr dllexport void @"\01??$exportedNormal@UImplicitInst_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* %this)
+ // G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI21ImplicitInst_ExportedEEvv(%struct.MemFunTmpl* %this)
+ // G64-DAG: define weak_odr dllexport void @_ZN10MemFunTmpl14exportedNormalI21ImplicitInst_ExportedEEvv(%struct.MemFunTmpl* %this)
+ MemFunTmpl().exportedNormal<ImplicitInst_Exported>();
+
+ // MSC-DAG: define weak_odr dllexport void @"\01??$exportedStatic@UImplicitInst_Exported@@@MemFunTmpl@@SAXXZ"()
+ // GNU-DAG: define weak_odr dllexport void @_ZN10MemFunTmpl14exportedStaticI21ImplicitInst_ExportedEEvv()
+ MemFunTmpl().exportedStatic<ImplicitInst_Exported>();
+}
+
+
+// Export explicit instantiation declaration of an exported member function
+// template.
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01??$exportedNormal@UExplicitDecl_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* %this)
+// M64-DAG: define weak_odr dllexport void @"\01??$exportedNormal@UExplicitDecl_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* %this)
+// G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI21ExplicitDecl_ExportedEEvv(%struct.MemFunTmpl* %this)
+// G64-DAG: define weak_odr dllexport void @_ZN10MemFunTmpl14exportedNormalI21ExplicitDecl_ExportedEEvv(%struct.MemFunTmpl* %this)
+extern template void MemFunTmpl::exportedNormal<ExplicitDecl_Exported>();
+ template void MemFunTmpl::exportedNormal<ExplicitDecl_Exported>();
+
+// MSC-DAG: define weak_odr dllexport void @"\01??$exportedStatic@UExplicitDecl_Exported@@@MemFunTmpl@@SAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_ZN10MemFunTmpl14exportedStaticI21ExplicitDecl_ExportedEEvv()
+extern template void MemFunTmpl::exportedStatic<ExplicitDecl_Exported>();
+ template void MemFunTmpl::exportedStatic<ExplicitDecl_Exported>();
+
+
+// Export explicit instantiation definition of an exported member function
+// template.
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01??$exportedNormal@UExplicitInst_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* %this)
+// M64-DAG: define weak_odr dllexport void @"\01??$exportedNormal@UExplicitInst_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* %this)
+// G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI21ExplicitInst_ExportedEEvv(%struct.MemFunTmpl* %this)
+// G64-DAG: define weak_odr dllexport void @_ZN10MemFunTmpl14exportedNormalI21ExplicitInst_ExportedEEvv(%struct.MemFunTmpl* %this)
+template void MemFunTmpl::exportedNormal<ExplicitInst_Exported>();
+
+// MSC-DAG: define weak_odr dllexport void @"\01??$exportedStatic@UExplicitInst_Exported@@@MemFunTmpl@@SAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_ZN10MemFunTmpl14exportedStaticI21ExplicitInst_ExportedEEvv()
+template void MemFunTmpl::exportedStatic<ExplicitInst_Exported>();
+
+
+// Export specialization of an exported member function template.
+// M32-DAG: define dllexport x86_thiscallcc void @"\01??$exportedNormal@UExplicitSpec_Def_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* %this)
+// M64-DAG: define dllexport void @"\01??$exportedNormal@UExplicitSpec_Def_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* %this)
+// G32-DAG: define dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI25ExplicitSpec_Def_ExportedEEvv(%struct.MemFunTmpl* %this)
+// G64-DAG: define dllexport void @_ZN10MemFunTmpl14exportedNormalI25ExplicitSpec_Def_ExportedEEvv(%struct.MemFunTmpl* %this)
+template<> __declspec(dllexport) void MemFunTmpl::exportedNormal<ExplicitSpec_Def_Exported>() {}
+
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01??$exportedNormal@UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* %this)
+// M64-DAG: define weak_odr dllexport void @"\01??$exportedNormal@UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* %this)
+// G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI31ExplicitSpec_InlineDef_ExportedEEvv(%struct.MemFunTmpl* %this)
+// G64-DAG: define weak_odr dllexport void @_ZN10MemFunTmpl14exportedNormalI31ExplicitSpec_InlineDef_ExportedEEvv(%struct.MemFunTmpl* %this)
+template<> __declspec(dllexport) inline void MemFunTmpl::exportedNormal<ExplicitSpec_InlineDef_Exported>() {}
+
+// MSC-DAG: define dllexport void @"\01??$exportedStatic@UExplicitSpec_Def_Exported@@@MemFunTmpl@@SAXXZ"()
+// GNU-DAG: define dllexport void @_ZN10MemFunTmpl14exportedStaticI25ExplicitSpec_Def_ExportedEEvv()
+template<> __declspec(dllexport) void MemFunTmpl::exportedStatic<ExplicitSpec_Def_Exported>() {}
+
+// MSC-DAG: define weak_odr dllexport void @"\01??$exportedStatic@UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@SAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_ZN10MemFunTmpl14exportedStaticI31ExplicitSpec_InlineDef_ExportedEEvv()
+template<> __declspec(dllexport) inline void MemFunTmpl::exportedStatic<ExplicitSpec_InlineDef_Exported>() {}
+
+
+// Not exporting specialization of an exported member function template without
+// explicit dllexport.
+// M32-DAG: define x86_thiscallcc void @"\01??$exportedNormal@UExplicitSpec_NotExported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* %this)
+// M64-DAG: define void @"\01??$exportedNormal@UExplicitSpec_NotExported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* %this)
+// G32-DAG: define x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI24ExplicitSpec_NotExportedEEvv(%struct.MemFunTmpl* %this)
+// G64-DAG: define void @_ZN10MemFunTmpl14exportedNormalI24ExplicitSpec_NotExportedEEvv(%struct.MemFunTmpl* %this)
+template<> void MemFunTmpl::exportedNormal<ExplicitSpec_NotExported>() {}
+
+// M32-DAG: define void @"\01??$exportedStatic@UExplicitSpec_NotExported@@@MemFunTmpl@@SAXXZ"()
+// GNU-DAG: define void @_ZN10MemFunTmpl14exportedStaticI24ExplicitSpec_NotExportedEEvv()
+template<> void MemFunTmpl::exportedStatic<ExplicitSpec_NotExported>() {}
+
+
+// Export explicit instantiation declaration of a non-exported member function
+// template.
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01??$normalDef@UExplicitDecl_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* %this)
+// M64-DAG: define weak_odr dllexport void @"\01??$normalDef@UExplicitDecl_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* %this)
+// G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI21ExplicitDecl_ExportedEEvv(%struct.MemFunTmpl* %this)
+// G64-DAG: define weak_odr dllexport void @_ZN10MemFunTmpl9normalDefI21ExplicitDecl_ExportedEEvv(%struct.MemFunTmpl* %this)
+extern template __declspec(dllexport) void MemFunTmpl::normalDef<ExplicitDecl_Exported>();
+ template __declspec(dllexport) void MemFunTmpl::normalDef<ExplicitDecl_Exported>();
+
+// M32-DAG: define weak_odr dllexport void @"\01??$staticDef@UExplicitDecl_Exported@@@MemFunTmpl@@SAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_ZN10MemFunTmpl9staticDefI21ExplicitDecl_ExportedEEvv()
+extern template __declspec(dllexport) void MemFunTmpl::staticDef<ExplicitDecl_Exported>();
+ template __declspec(dllexport) void MemFunTmpl::staticDef<ExplicitDecl_Exported>();
+
+
+// Export explicit instantiation definition of a non-exported member function
+// template.
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01??$normalDef@UExplicitInst_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* %this)
+// M64-DAG: define weak_odr dllexport void @"\01??$normalDef@UExplicitInst_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* %this)
+// G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI21ExplicitInst_ExportedEEvv(%struct.MemFunTmpl* %this)
+// G64-DAG: define weak_odr dllexport void @_ZN10MemFunTmpl9normalDefI21ExplicitInst_ExportedEEvv(%struct.MemFunTmpl* %this)
+template __declspec(dllexport) void MemFunTmpl::normalDef<ExplicitInst_Exported>();
+
+// MSC-DAG: define weak_odr dllexport void @"\01??$staticDef@UExplicitInst_Exported@@@MemFunTmpl@@SAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_ZN10MemFunTmpl9staticDefI21ExplicitInst_ExportedEEvv()
+template __declspec(dllexport) void MemFunTmpl::staticDef<ExplicitInst_Exported>();
+
+
+// Export specialization of a non-exported member function template.
+// M32-DAG: define dllexport x86_thiscallcc void @"\01??$normalDef@UExplicitSpec_Def_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* %this)
+// M64-DAG: define dllexport void @"\01??$normalDef@UExplicitSpec_Def_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* %this)
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01??$normalDef@UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* %this)
+// M64-DAG: define weak_odr dllexport void @"\01??$normalDef@UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* %this)
+// G32-DAG: define dllexport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI25ExplicitSpec_Def_ExportedEEvv(%struct.MemFunTmpl* %this)
+// G64-DAG: define dllexport void @_ZN10MemFunTmpl9normalDefI25ExplicitSpec_Def_ExportedEEvv(%struct.MemFunTmpl* %this)
+// G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI31ExplicitSpec_InlineDef_ExportedEEvv(%struct.MemFunTmpl* %this)
+// G64-DAG: define weak_odr dllexport void @_ZN10MemFunTmpl9normalDefI31ExplicitSpec_InlineDef_ExportedEEvv(%struct.MemFunTmpl* %this)
+template<> __declspec(dllexport) void MemFunTmpl::normalDef<ExplicitSpec_Def_Exported>() {}
+template<> __declspec(dllexport) inline void MemFunTmpl::normalDef<ExplicitSpec_InlineDef_Exported>() {}
+
+// MSC-DAG: define dllexport void @"\01??$staticDef@UExplicitSpec_Def_Exported@@@MemFunTmpl@@SAXXZ"()
+// MSC-DAG: define weak_odr dllexport void @"\01??$staticDef@UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@SAXXZ"()
+// GNU-DAG: define dllexport void @_ZN10MemFunTmpl9staticDefI25ExplicitSpec_Def_ExportedEEvv()
+// GNU-DAG: define weak_odr dllexport void @_ZN10MemFunTmpl9staticDefI31ExplicitSpec_InlineDef_ExportedEEvv()
+template<> __declspec(dllexport) void MemFunTmpl::staticDef<ExplicitSpec_Def_Exported>() {}
+template<> __declspec(dllexport) inline void MemFunTmpl::staticDef<ExplicitSpec_InlineDef_Exported>() {}
+
+
+
+struct MemVarTmpl {
+ template<typename T> static const int StaticVar = 1;
+ template<typename T> __declspec(dllexport) static const int ExportedStaticVar = 1;
+};
+template<typename T> const int MemVarTmpl::StaticVar;
+template<typename T> const int MemVarTmpl::ExportedStaticVar;
+
+// Export implicit instantiation of an exported member variable template.
+// MSC-DAG: @"\01??$ExportedStaticVar@UImplicitInst_Exported@@@MemVarTmpl@@2HB" = weak_odr dllexport constant i32 1, align 4
+// GNU-DAG: @_ZN10MemVarTmpl17ExportedStaticVarI21ImplicitInst_ExportedEE = weak_odr dllexport constant i32 1, align 4
+int useMemVarTmpl() { return MemVarTmpl::ExportedStaticVar<ImplicitInst_Exported>; }
+
+// Export explicit instantiation declaration of an exported member variable
+// template.
+// MSC-DAG: @"\01??$ExportedStaticVar@UExplicitDecl_Exported@@@MemVarTmpl@@2HB" = weak_odr dllexport constant i32 1, align 4
+// GNU-DAG: @_ZN10MemVarTmpl17ExportedStaticVarI21ExplicitDecl_ExportedEE = weak_odr dllexport constant i32 1, align 4
+extern template const int MemVarTmpl::ExportedStaticVar<ExplicitDecl_Exported>;
+ template const int MemVarTmpl::ExportedStaticVar<ExplicitDecl_Exported>;
+
+// Export explicit instantiation definition of an exported member variable
+// template.
+// MSC-DAG: @"\01??$ExportedStaticVar@UExplicitInst_Exported@@@MemVarTmpl@@2HB" = weak_odr dllexport constant i32 1, align 4
+// GNU-DAG: @_ZN10MemVarTmpl17ExportedStaticVarI21ExplicitInst_ExportedEE = weak_odr dllexport constant i32 1, align 4
+template const int MemVarTmpl::ExportedStaticVar<ExplicitInst_Exported>;
+
+// Export specialization of an exported member variable template.
+// MSC-DAG: @"\01??$ExportedStaticVar@UExplicitSpec_Def_Exported@@@MemVarTmpl@@2HB" = dllexport constant i32 1, align 4
+// GNU-DAG: @_ZN10MemVarTmpl17ExportedStaticVarI25ExplicitSpec_Def_ExportedEE = dllexport constant i32 1, align 4
+template<> __declspec(dllexport) const int MemVarTmpl::ExportedStaticVar<ExplicitSpec_Def_Exported> = 1;
+
+// Not exporting specialization of an exported member variable template without
+// explicit dllexport.
+// MSC-DAG: @"\01??$ExportedStaticVar@UExplicitSpec_NotExported@@@MemVarTmpl@@2HB" = constant i32 1, align 4
+// GNU-DAG: @_ZN10MemVarTmpl17ExportedStaticVarI24ExplicitSpec_NotExportedEE = constant i32 1, align 4
+template<> const int MemVarTmpl::ExportedStaticVar<ExplicitSpec_NotExported> = 1;
+
+
+// Export explicit instantiation declaration of a non-exported member variable
+// template.
+// MSC-DAG: @"\01??$StaticVar@UExplicitDecl_Exported@@@MemVarTmpl@@2HB" = weak_odr dllexport constant i32 1, align 4
+// GNU-DAG: @_ZN10MemVarTmpl9StaticVarI21ExplicitDecl_ExportedEE = weak_odr dllexport constant i32 1, align 4
+extern template __declspec(dllexport) const int MemVarTmpl::StaticVar<ExplicitDecl_Exported>;
+ template __declspec(dllexport) const int MemVarTmpl::StaticVar<ExplicitDecl_Exported>;
+
+// Export explicit instantiation definition of a non-exported member variable
+// template.
+// MSC-DAG: @"\01??$StaticVar@UExplicitInst_Exported@@@MemVarTmpl@@2HB" = weak_odr dllexport constant i32 1, align 4
+// GNU-DAG: @_ZN10MemVarTmpl9StaticVarI21ExplicitInst_ExportedEE = weak_odr dllexport constant i32 1, align 4
+template __declspec(dllexport) const int MemVarTmpl::StaticVar<ExplicitInst_Exported>;
+
+// Export specialization of a non-exported member variable template.
+// MSC-DAG: @"\01??$StaticVar@UExplicitSpec_Def_Exported@@@MemVarTmpl@@2HB" = dllexport constant i32 1, align 4
+// GNU-DAG: @_ZN10MemVarTmpl9StaticVarI25ExplicitSpec_Def_ExportedEE = dllexport constant i32 1, align 4
+template<> __declspec(dllexport) const int MemVarTmpl::StaticVar<ExplicitSpec_Def_Exported> = 1;
diff --git a/test/CodeGenCXX/dllexport.cpp b/test/CodeGenCXX/dllexport.cpp
new file mode 100644
index 000000000000..5097abf0c094
--- /dev/null
+++ b/test/CodeGenCXX/dllexport.cpp
@@ -0,0 +1,686 @@
+// RUN: %clang_cc1 -triple i686-windows-msvc -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=MSC --check-prefix=M32 %s
+// RUN: %clang_cc1 -triple x86_64-windows-msvc -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=MSC --check-prefix=M64 %s
+// RUN: %clang_cc1 -triple i686-windows-gnu -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU --check-prefix=G32 %s
+// RUN: %clang_cc1 -triple x86_64-windows-gnu -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU --check-prefix=G64 %s
+
+// RUN: %clang_cc1 -triple i686-pc-win32 -O1 -mconstructor-aliases -std=c++1y -emit-llvm -o - %s | FileCheck %s --check-prefix=MSC --check-prefix=M32
+
+// Helper structs to make templates more expressive.
+struct ImplicitInst_Exported {};
+struct ExplicitDecl_Exported {};
+struct ExplicitInst_Exported {};
+struct ExplicitSpec_Exported {};
+struct ExplicitSpec_Def_Exported {};
+struct ExplicitSpec_InlineDef_Exported {};
+struct ExplicitSpec_NotExported {};
+struct External { int v; };
+
+#define JOIN2(x, y) x##y
+#define JOIN(x, y) JOIN2(x, y)
+#define UNIQ(name) JOIN(name, __LINE__)
+#define USEVAR(var) int UNIQ(use)() { return var; }
+#define USE(func) void UNIQ(use)() { func(); }
+#define USEMEMFUNC(class, func) void (class::*UNIQ(use)())() { return &class::func; }
+#define INSTVAR(var) template int var;
+#define INST(func) template void func();
+
+// The vftable for struct W is comdat largest because we have RTTI.
+// M32-DAG: $"\01??_7W@@6B@" = comdat largest
+
+
+//===----------------------------------------------------------------------===//
+// Globals
+//===----------------------------------------------------------------------===//
+
+// Declarations are not exported.
+// MSC-NOT: @"\01?ExternGlobalDecl@@3HA"
+// GNU-NOT: @ExternGlobalDecl
+__declspec(dllexport) extern int ExternGlobalDecl;
+
+// dllexport implies a definition.
+// MSC-DAG: @"\01?GlobalDef@@3HA" = dllexport global i32 0, align 4
+// GNU-DAG: @GlobalDef = dllexport global i32 0, align 4
+__declspec(dllexport) int GlobalDef;
+
+// Export definition.
+// MSC-DAG: @"\01?GlobalInit1@@3HA" = dllexport global i32 1, align 4
+// GNU-DAG: @GlobalInit1 = dllexport global i32 1, align 4
+__declspec(dllexport) int GlobalInit1 = 1;
+
+// MSC-DAG: @"\01?GlobalInit2@@3HA" = dllexport global i32 1, align 4
+// GNU-DAG: @GlobalInit2 = dllexport global i32 1, align 4
+int __declspec(dllexport) GlobalInit2 = 1;
+
+// Declare, then export definition.
+// MSC-DAG: @"\01?GlobalDeclInit@@3HA" = dllexport global i32 1, align 4
+// GNU-DAG: @GlobalDeclInit = dllexport global i32 1, align 4
+__declspec(dllexport) extern int GlobalDeclInit;
+int GlobalDeclInit = 1;
+
+// Redeclarations
+// MSC-DAG: @"\01?GlobalRedecl1@@3HA" = dllexport global i32 0, align 4
+// GNU-DAG: @GlobalRedecl1 = dllexport global i32 0, align 4
+__declspec(dllexport) extern int GlobalRedecl1;
+__declspec(dllexport) int GlobalRedecl1;
+
+// MSC-DAG: @"\01?GlobalRedecl2@@3HA" = dllexport global i32 0, align 4
+// GNU-DAG: @GlobalRedecl2 = dllexport global i32 0, align 4
+__declspec(dllexport) extern int GlobalRedecl2;
+ int GlobalRedecl2;
+
+// MSC-DAG: @"\01?ExternalGlobal@ns@@3HA" = dllexport global i32 0, align 4
+// GNU-DAG: @_ZN2ns14ExternalGlobalE = dllexport global i32 0, align 4
+namespace ns { __declspec(dllexport) int ExternalGlobal; }
+
+// MSC-DAG: @"\01?ExternalAutoTypeGlobal@@3UExternal@@A" = dllexport global %struct.External zeroinitializer, align 4
+// GNU-DAG: @ExternalAutoTypeGlobal = dllexport global %struct.External zeroinitializer, align 4
+__declspec(dllexport) auto ExternalAutoTypeGlobal = External();
+
+int f();
+// MSC-DAG: @"\01?x@?0??nonInlineStaticLocalsFunc@@YAHXZ@4HA" = internal {{(unnamed_addr )*}}global i32 0
+// MSC-DAG: @"\01?$S1@?0??nonInlineStaticLocalsFunc@@YAHXZ@4IA" = internal {{(unnamed_addr )*}}global i32 0
+int __declspec(dllexport) nonInlineStaticLocalsFunc() {
+ static int x = f();
+ return x++;
+};
+
+// MSC-DAG: @"\01?x@?1??inlineStaticLocalsFunc@@YAHXZ@4HA" = weak_odr dllexport global i32 0
+// MSC-DAG: @"\01??_B?1??inlineStaticLocalsFunc@@YAHXZ@51" = weak_odr dllexport global i32 0
+// Note: MinGW doesn't seem to export the static local here.
+inline int __declspec(dllexport) inlineStaticLocalsFunc() {
+ static int x = f();
+ return x++;
+}
+
+
+
+//===----------------------------------------------------------------------===//
+// Variable templates
+//===----------------------------------------------------------------------===//
+
+// Declarations are not exported.
+
+// dllexport implies a definition.
+// MSC-NOT: @"\01??$VarTmplDef@UExplicitInst_Exported@@@@3HA"
+// GNU-NOT: @_Z10VarTmplDefI21ExplicitInst_ExportedE
+template<typename T> __declspec(dllexport) int VarTmplDef;
+INSTVAR(VarTmplDef<ExplicitInst_Exported>)
+
+// MSC-DAG: @"\01??$VarTmplImplicitDef@UImplicitInst_Exported@@@@3HA" = external dllexport global
+// GNU-DAG: @_Z18VarTmplImplicitDefI21ImplicitInst_ExportedE = external dllexport global
+template<typename T> __declspec(dllexport) int VarTmplImplicitDef;
+USEVAR(VarTmplImplicitDef<ImplicitInst_Exported>)
+
+// Export definition.
+// MSC-DAG: @"\01??$VarTmplInit1@UExplicitInst_Exported@@@@3HA" = weak_odr dllexport global i32 1, align 4
+// GNU-DAG: @_Z12VarTmplInit1I21ExplicitInst_ExportedE = weak_odr dllexport global i32 1, align 4
+template<typename T> __declspec(dllexport) int VarTmplInit1 = 1;
+INSTVAR(VarTmplInit1<ExplicitInst_Exported>)
+
+// MSC-DAG: @"\01??$VarTmplInit2@UExplicitInst_Exported@@@@3HA" = weak_odr dllexport global i32 1, align 4
+// GNU-DAG: @_Z12VarTmplInit2I21ExplicitInst_ExportedE = weak_odr dllexport global i32 1, align 4
+template<typename T> int __declspec(dllexport) VarTmplInit2 = 1;
+INSTVAR(VarTmplInit2<ExplicitInst_Exported>)
+
+// Declare, then export definition.
+// MSC-DAG: @"\01??$VarTmplDeclInit@UExplicitInst_Exported@@@@3HA" = weak_odr dllexport global i32 1, align 4
+// GNU-DAG: @_Z15VarTmplDeclInitI21ExplicitInst_ExportedE = weak_odr dllexport global i32 1, align 4
+template<typename T> __declspec(dllexport) extern int VarTmplDeclInit;
+template<typename T> int VarTmplDeclInit = 1;
+INSTVAR(VarTmplDeclInit<ExplicitInst_Exported>)
+
+// Redeclarations
+// MSC-DAG: @"\01??$VarTmplRedecl1@UExplicitInst_Exported@@@@3HA" = weak_odr dllexport global i32 1, align 4
+// GNU-DAG: @_Z14VarTmplRedecl1I21ExplicitInst_ExportedE = weak_odr dllexport global i32 1, align 4
+template<typename T> __declspec(dllexport) extern int VarTmplRedecl1;
+template<typename T> __declspec(dllexport) int VarTmplRedecl1 = 1;
+INSTVAR(VarTmplRedecl1<ExplicitInst_Exported>)
+
+// MSC-DAG: @"\01??$VarTmplRedecl2@UExplicitInst_Exported@@@@3HA" = weak_odr dllexport global i32 1, align 4
+// GNU-DAG: @_Z14VarTmplRedecl2I21ExplicitInst_ExportedE = weak_odr dllexport global i32 1, align 4
+template<typename T> __declspec(dllexport) extern int VarTmplRedecl2;
+template<typename T> int VarTmplRedecl2 = 1;
+INSTVAR(VarTmplRedecl2<ExplicitInst_Exported>)
+
+// MSC-DAG: @"\01??$ExternalVarTmpl@UExplicitInst_Exported@@@ns@@3HA" = weak_odr dllexport global i32 1, align 4
+// GNU-DAG: @_ZN2ns15ExternalVarTmplI21ExplicitInst_ExportedEE = weak_odr dllexport global i32 1, align 4
+namespace ns { template<typename T> __declspec(dllexport) int ExternalVarTmpl = 1; }
+INSTVAR(ns::ExternalVarTmpl<ExplicitInst_Exported>)
+
+// MSC-DAG: @"\01??$ExternalAutoTypeVarTmpl@UExplicitInst_Exported@@@@3UExternal@@A" = weak_odr dllexport global %struct.External zeroinitializer, align 4
+// GNU-DAG: @_Z23ExternalAutoTypeVarTmplI21ExplicitInst_ExportedE = weak_odr dllexport global %struct.External zeroinitializer, align 4
+template<typename T> __declspec(dllexport) auto ExternalAutoTypeVarTmpl = External();
+template External ExternalAutoTypeVarTmpl<ExplicitInst_Exported>;
+
+
+template<typename T> int VarTmpl = 1;
+template<typename T> __declspec(dllexport) int ExportedVarTmpl = 1;
+
+// Export implicit instantiation of an exported variable template.
+// MSC-DAG: @"\01??$ExportedVarTmpl@UImplicitInst_Exported@@@@3HA" = weak_odr dllexport global i32 1, align 4
+// GNU-DAG: @_Z15ExportedVarTmplI21ImplicitInst_ExportedE = weak_odr dllexport global i32 1, align 4
+USEVAR(ExportedVarTmpl<ImplicitInst_Exported>)
+
+// Export explicit instantiation declaration of an exported variable template.
+// MSC-DAG: @"\01??$ExportedVarTmpl@UImplicitInst_Exported@@@@3HA" = weak_odr dllexport global i32 1, align 4
+// GNU-DAG: @_Z15ExportedVarTmplI21ExplicitDecl_ExportedE = weak_odr dllexport global i32 1, align 4
+extern template int ExportedVarTmpl<ExplicitDecl_Exported>;
+ template int ExportedVarTmpl<ExplicitDecl_Exported>;
+
+// Export explicit instantiation definition of an exported variable template.
+// MSC-DAG: @"\01??$ExportedVarTmpl@UImplicitInst_Exported@@@@3HA" = weak_odr dllexport global i32 1, align 4
+// GNU-DAG: @_Z15ExportedVarTmplI21ExplicitInst_ExportedE = weak_odr dllexport global i32 1, align 4
+template __declspec(dllexport) int ExportedVarTmpl<ExplicitInst_Exported>;
+
+// Export specialization of an exported variable template.
+// MSC-DAG: @"\01??$ExportedVarTmpl@UExplicitSpec_Exported@@@@3HA" = dllexport global i32 0, align 4
+// GNU-DAG: @_Z15ExportedVarTmplI21ExplicitSpec_ExportedE = dllexport global i32 0, align 4
+template<> __declspec(dllexport) int ExportedVarTmpl<ExplicitSpec_Exported>;
+
+// MSC-DAG: @"\01??$ExportedVarTmpl@UExplicitSpec_Def_Exported@@@@3HA" = dllexport global i32 1, align 4
+// GNU-DAG: @_Z15ExportedVarTmplI25ExplicitSpec_Def_ExportedE = dllexport global i32 1, align 4
+template<> __declspec(dllexport) int ExportedVarTmpl<ExplicitSpec_Def_Exported> = 1;
+
+// Not exporting specialization of an exported variable template without
+// explicit dllexport.
+// MSC-DAG: @"\01??$ExportedVarTmpl@UExplicitSpec_NotExported@@@@3HA" = global i32 0, align 4
+// GNU-DAG: @_Z15ExportedVarTmplI24ExplicitSpec_NotExportedE = global i32 0, align 4
+template<> int ExportedVarTmpl<ExplicitSpec_NotExported>;
+
+
+// Export explicit instantiation declaration of a non-exported variable template.
+// MSC-DAG: @"\01??$VarTmpl@UExplicitDecl_Exported@@@@3HA" = weak_odr dllexport global i32 1, align 4
+// GNU-DAG: @_Z7VarTmplI21ExplicitDecl_ExportedE = weak_odr dllexport global i32 1, align 4
+extern template __declspec(dllexport) int VarTmpl<ExplicitDecl_Exported>;
+ template __declspec(dllexport) int VarTmpl<ExplicitDecl_Exported>;
+
+// Export explicit instantiation definition of a non-exported variable template.
+// MSC-DAG: @"\01??$VarTmpl@UExplicitInst_Exported@@@@3HA" = weak_odr dllexport global i32 1, align 4
+// GNU-DAG: @_Z7VarTmplI21ExplicitInst_ExportedE = weak_odr dllexport global i32 1, align 4
+template __declspec(dllexport) int VarTmpl<ExplicitInst_Exported>;
+
+// Export specialization of a non-exported variable template.
+// MSC-DAG: @"\01??$VarTmpl@UExplicitSpec_Exported@@@@3HA" = dllexport global i32 0, align 4
+// GNU-DAG: @_Z7VarTmplI21ExplicitSpec_ExportedE = dllexport global i32 0, align 4
+template<> __declspec(dllexport) int VarTmpl<ExplicitSpec_Exported>;
+
+// MSC-DAG: @"\01??$VarTmpl@UExplicitSpec_Def_Exported@@@@3HA" = dllexport global i32 1, align 4
+// GNU-DAG: @_Z7VarTmplI25ExplicitSpec_Def_ExportedE = dllexport global i32 1, align 4
+template<> __declspec(dllexport) int VarTmpl<ExplicitSpec_Def_Exported> = 1;
+
+
+
+//===----------------------------------------------------------------------===//
+// Functions
+//===----------------------------------------------------------------------===//
+
+// Declarations are not exported.
+
+// Export function definition.
+// MSC-DAG: define dllexport void @"\01?def@@YAXXZ"()
+// GNU-DAG: define dllexport void @_Z3defv()
+__declspec(dllexport) void def() {}
+
+// extern "C"
+// MSC-DAG: define dllexport void @externC()
+// GNU-DAG: define dllexport void @externC()
+extern "C" __declspec(dllexport) void externC() {}
+
+// Export inline function.
+// MSC-DAG: define weak_odr dllexport void @"\01?inlineFunc@@YAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_Z10inlineFuncv()
+__declspec(dllexport) inline void inlineFunc() {}
+
+// MSC-DAG: define weak_odr dllexport void @"\01?inlineDecl@@YAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_Z10inlineDeclv()
+__declspec(dllexport) inline void inlineDecl();
+ void inlineDecl() {}
+
+// MSC-DAG: define weak_odr dllexport void @"\01?inlineDef@@YAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_Z9inlineDefv()
+__declspec(dllexport) void inlineDef();
+ inline void inlineDef() {}
+
+// Redeclarations
+// MSC-DAG: define dllexport void @"\01?redecl1@@YAXXZ"()
+// GNU-DAG: define dllexport void @_Z7redecl1v()
+__declspec(dllexport) void redecl1();
+__declspec(dllexport) void redecl1() {}
+
+// MSC-DAG: define dllexport void @"\01?redecl2@@YAXXZ"()
+// GNU-DAG: define dllexport void @_Z7redecl2v()
+__declspec(dllexport) void redecl2();
+ void redecl2() {}
+
+// Friend functions
+// MSC-DAG: define dllexport void @"\01?friend1@@YAXXZ"()
+// GNU-DAG: define dllexport void @_Z7friend1v()
+// MSC-DAG: define dllexport void @"\01?friend2@@YAXXZ"()
+// GNU-DAG: define dllexport void @_Z7friend2v()
+struct FuncFriend {
+ friend __declspec(dllexport) void friend1();
+ friend __declspec(dllexport) void friend2();
+};
+__declspec(dllexport) void friend1() {}
+ void friend2() {}
+
+// Implicit declarations can be redeclared with dllexport.
+// MSC-DAG: define dllexport noalias i8* @"\01??2@{{YAPAXI|YAPEAX_K}}@Z"(
+// GNU-DAG: define dllexport noalias i8* @_Znw{{[yj]}}(
+void* alloc(__SIZE_TYPE__ n);
+__declspec(dllexport) void* operator new(__SIZE_TYPE__ n) { return alloc(n); }
+
+// MSC-DAG: define dllexport void @"\01?externalFunc@ns@@YAXXZ"()
+// GNU-DAG: define dllexport void @_ZN2ns12externalFuncEv()
+namespace ns { __declspec(dllexport) void externalFunc() {} }
+
+
+
+//===----------------------------------------------------------------------===//
+// Function templates
+//===----------------------------------------------------------------------===//
+
+// Export function template definition.
+// MSC-DAG: define weak_odr dllexport void @"\01??$funcTmplDef@UExplicitInst_Exported@@@@YAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_Z11funcTmplDefI21ExplicitInst_ExportedEvv()
+template<typename T> __declspec(dllexport) void funcTmplDef() {}
+INST(funcTmplDef<ExplicitInst_Exported>)
+
+// Export inline function template.
+// MSC-DAG: define weak_odr dllexport void @"\01??$inlineFuncTmpl1@UExplicitInst_Exported@@@@YAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_Z15inlineFuncTmpl1I21ExplicitInst_ExportedEvv()
+template<typename T> __declspec(dllexport) inline void inlineFuncTmpl1() {}
+INST(inlineFuncTmpl1<ExplicitInst_Exported>)
+
+// MSC-DAG: define weak_odr dllexport void @"\01??$inlineFuncTmpl2@UExplicitInst_Exported@@@@YAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_Z15inlineFuncTmpl2I21ExplicitInst_ExportedEvv()
+template<typename T> inline void __attribute__((dllexport)) inlineFuncTmpl2() {}
+INST(inlineFuncTmpl2<ExplicitInst_Exported>)
+
+// MSC-DAG: define weak_odr dllexport void @"\01??$inlineFuncTmplDecl@UExplicitInst_Exported@@@@YAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_Z18inlineFuncTmplDeclI21ExplicitInst_ExportedEvv()
+template<typename T> __declspec(dllexport) inline void inlineFuncTmplDecl();
+template<typename T> void inlineFuncTmplDecl() {}
+INST(inlineFuncTmplDecl<ExplicitInst_Exported>)
+
+// MSC-DAG: define weak_odr dllexport void @"\01??$inlineFuncTmplDef@UExplicitInst_Exported@@@@YAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_Z17inlineFuncTmplDefI21ExplicitInst_ExportedEvv()
+template<typename T> __declspec(dllexport) void inlineFuncTmplDef();
+template<typename T> inline void inlineFuncTmplDef() {}
+INST(inlineFuncTmplDef<ExplicitInst_Exported>)
+
+
+// Redeclarations
+// MSC-DAG: define weak_odr dllexport void @"\01??$funcTmplRedecl1@UExplicitInst_Exported@@@@YAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_Z15funcTmplRedecl1I21ExplicitInst_ExportedEvv()
+template<typename T> __declspec(dllexport) void funcTmplRedecl1();
+template<typename T> __declspec(dllexport) void funcTmplRedecl1() {}
+INST(funcTmplRedecl1<ExplicitInst_Exported>)
+
+// MSC-DAG: define weak_odr dllexport void @"\01??$funcTmplRedecl2@UExplicitInst_Exported@@@@YAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_Z15funcTmplRedecl2I21ExplicitInst_ExportedEvv()
+template<typename T> __declspec(dllexport) void funcTmplRedecl2();
+template<typename T> void funcTmplRedecl2() {}
+INST(funcTmplRedecl2<ExplicitInst_Exported>)
+
+// MSC-DAG: define weak_odr dllexport void @"\01??$funcTmplRedecl3@UExplicitInst_Exported@@@@YAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_Z15funcTmplRedecl3I21ExplicitInst_ExportedEvv()
+template<typename T> __declspec(dllexport) void funcTmplRedecl3();
+template<typename T> void funcTmplRedecl3() {}
+INST(funcTmplRedecl3<ExplicitInst_Exported>)
+
+
+// Function template friends
+// MSC-DAG: define weak_odr dllexport void @"\01??$funcTmplFriend1@UExplicitInst_Exported@@@@YAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_Z15funcTmplFriend1I21ExplicitInst_ExportedEvv()
+// MSC-DAG: define weak_odr dllexport void @"\01??$funcTmplFriend2@UExplicitInst_Exported@@@@YAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_Z15funcTmplFriend2I21ExplicitInst_ExportedEvv()
+struct FuncTmplFriend {
+ template<typename T> friend __declspec(dllexport) void funcTmplFriend1();
+ template<typename T> friend __declspec(dllexport) void funcTmplFriend2();
+};
+template<typename T> __declspec(dllexport) void funcTmplFriend1() {}
+template<typename T> void funcTmplFriend2() {}
+INST(funcTmplFriend1<ExplicitInst_Exported>)
+INST(funcTmplFriend2<ExplicitInst_Exported>)
+
+// MSC-DAG: define weak_odr dllexport void @"\01??$externalFuncTmpl@UExplicitInst_Exported@@@ns@@YAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_ZN2ns16externalFuncTmplI21ExplicitInst_ExportedEEvv()
+namespace ns { template<typename T> __declspec(dllexport) void externalFuncTmpl() {} }
+INST(ns::externalFuncTmpl<ExplicitInst_Exported>)
+
+
+template<typename T> void funcTmpl() {}
+template<typename T> __declspec(dllexport) void exportedFuncTmpl() {}
+
+// Export implicit instantiation of an exported function template.
+// MSC-DAG: define weak_odr dllexport void @"\01??$exportedFuncTmpl@UImplicitInst_Exported@@@@YAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_Z16exportedFuncTmplI21ImplicitInst_ExportedEvv()
+USE(exportedFuncTmpl<ImplicitInst_Exported>)
+
+// Export explicit instantiation declaration of an exported function template.
+// MSC-DAG: define weak_odr dllexport void @"\01??$exportedFuncTmpl@UExplicitDecl_Exported@@@@YAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_Z16exportedFuncTmplI21ExplicitDecl_ExportedEvv()
+extern template void exportedFuncTmpl<ExplicitDecl_Exported>();
+ template void exportedFuncTmpl<ExplicitDecl_Exported>();
+
+// Export explicit instantiation definition of an exported function template.
+// MSC-DAG: define weak_odr dllexport void @"\01??$exportedFuncTmpl@UExplicitInst_Exported@@@@YAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_Z16exportedFuncTmplI21ExplicitInst_ExportedEvv()
+template void exportedFuncTmpl<ExplicitInst_Exported>();
+
+// Export specialization of an exported function template.
+// MSC-DAG: define dllexport void @"\01??$exportedFuncTmpl@UExplicitSpec_Def_Exported@@@@YAXXZ"()
+// GNU-DAG: define dllexport void @_Z16exportedFuncTmplI25ExplicitSpec_Def_ExportedEvv()
+template<> __declspec(dllexport) void exportedFuncTmpl<ExplicitSpec_Def_Exported>() {}
+
+// MSC-DAG: define weak_odr dllexport void @"\01??$exportedFuncTmpl@UExplicitSpec_InlineDef_Exported@@@@YAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_Z16exportedFuncTmplI31ExplicitSpec_InlineDef_ExportedEvv()
+template<> __declspec(dllexport) inline void exportedFuncTmpl<ExplicitSpec_InlineDef_Exported>() {}
+
+// Not exporting specialization of an exported function template without
+// explicit dllexport.
+// MSC-DAG: define void @"\01??$exportedFuncTmpl@UExplicitSpec_NotExported@@@@YAXXZ"()
+// GNU-DAG: define void @_Z16exportedFuncTmplI24ExplicitSpec_NotExportedEvv()
+template<> void exportedFuncTmpl<ExplicitSpec_NotExported>() {}
+
+
+// Export explicit instantiation declaration of a non-exported function template.
+// MSC-DAG: define weak_odr dllexport void @"\01??$funcTmpl@UExplicitDecl_Exported@@@@YAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_Z8funcTmplI21ExplicitDecl_ExportedEvv()
+extern template __declspec(dllexport) void funcTmpl<ExplicitDecl_Exported>();
+ template __declspec(dllexport) void funcTmpl<ExplicitDecl_Exported>();
+
+// Export explicit instantiation definition of a non-exported function template.
+// MSC-DAG: define weak_odr dllexport void @"\01??$funcTmpl@UExplicitInst_Exported@@@@YAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_Z8funcTmplI21ExplicitInst_ExportedEvv()
+template __declspec(dllexport) void funcTmpl<ExplicitInst_Exported>();
+
+// Export specialization of a non-exported function template.
+// MSC-DAG: define dllexport void @"\01??$funcTmpl@UExplicitSpec_Def_Exported@@@@YAXXZ"()
+// GNU-DAG: define dllexport void @_Z8funcTmplI25ExplicitSpec_Def_ExportedEvv()
+template<> __declspec(dllexport) void funcTmpl<ExplicitSpec_Def_Exported>() {}
+
+// MSC-DAG: define weak_odr dllexport void @"\01??$funcTmpl@UExplicitSpec_InlineDef_Exported@@@@YAXXZ"()
+// GNU-DAG: define weak_odr dllexport void @_Z8funcTmplI31ExplicitSpec_InlineDef_ExportedEvv()
+template<> __declspec(dllexport) inline void funcTmpl<ExplicitSpec_InlineDef_Exported>() {}
+
+
+
+//===----------------------------------------------------------------------===//
+// Precedence
+//===----------------------------------------------------------------------===//
+
+// dllexport takes precedence over the dllimport if both are specified.
+// MSC-DAG: @"\01?PrecedenceGlobal1A@@3HA" = dllexport global i32 0, align 4
+// MSC-DAG: @"\01?PrecedenceGlobal1B@@3HA" = dllexport global i32 0, align 4
+// GNU-DAG: @PrecedenceGlobal1A = dllexport global i32 0, align 4
+// GNU-DAG: @PrecedenceGlobal1B = dllexport global i32 0, align 4
+__attribute__((dllimport, dllexport)) int PrecedenceGlobal1A; // dllimport ignored
+__declspec(dllimport) __declspec(dllexport) int PrecedenceGlobal1B; // dllimport ignored
+
+// MSC-DAG: @"\01?PrecedenceGlobal2A@@3HA" = dllexport global i32 0, align 4
+// MSC-DAG: @"\01?PrecedenceGlobal2B@@3HA" = dllexport global i32 0, align 4
+// GNU-DAG: @PrecedenceGlobal2A = dllexport global i32 0, align 4
+// GNU-DAG: @PrecedenceGlobal2B = dllexport global i32 0, align 4
+__attribute__((dllexport, dllimport)) int PrecedenceGlobal2A; // dllimport ignored
+__declspec(dllexport) __declspec(dllimport) int PrecedenceGlobal2B; // dllimport ignored
+
+// MSC-DAG: @"\01?PrecedenceGlobalRedecl1@@3HA" = dllexport global i32 0, align 4
+// GNU-DAG: @PrecedenceGlobalRedecl1 = dllexport global i32 0, align 4
+__declspec(dllexport) extern int PrecedenceGlobalRedecl1;
+__declspec(dllimport) int PrecedenceGlobalRedecl1 = 0;
+
+// MSC-DAG: @"\01?PrecedenceGlobalRedecl2@@3HA" = dllexport global i32 0, align 4
+// GNU-DAG: @PrecedenceGlobalRedecl2 = dllexport global i32 0, align 4
+__declspec(dllimport) extern int PrecedenceGlobalRedecl2;
+__declspec(dllexport) int PrecedenceGlobalRedecl2;
+
+// MSC-DAG: @"\01?PrecedenceGlobalMixed1@@3HA" = dllexport global i32 0, align 4
+// GNU-DAG: @PrecedenceGlobalMixed1 = dllexport global i32 0, align 4
+__attribute__((dllexport)) extern int PrecedenceGlobalMixed1;
+__declspec(dllimport) int PrecedenceGlobalMixed1 = 0;
+
+// MSC-DAG: @"\01?PrecedenceGlobalMixed2@@3HA" = dllexport global i32 0, align 4
+// GNU-DAG: @PrecedenceGlobalMixed2 = dllexport global i32 0, align 4
+__attribute__((dllimport)) extern int PrecedenceGlobalMixed2;
+__declspec(dllexport) int PrecedenceGlobalMixed2;
+
+// MSC-DAG: define dllexport void @"\01?precedence1A@@YAXXZ"
+// MSC-DAG: define dllexport void @"\01?precedence1B@@YAXXZ"
+// GNU-DAG: define dllexport void @_Z12precedence1Av()
+// GNU-DAG: define dllexport void @_Z12precedence1Bv()
+void __attribute__((dllimport, dllexport)) precedence1A() {}
+void __declspec(dllimport) __declspec(dllexport) precedence1B() {}
+
+// MSC-DAG: define dllexport void @"\01?precedence2A@@YAXXZ"
+// MSC-DAG: define dllexport void @"\01?precedence2B@@YAXXZ"
+// GNU-DAG: define dllexport void @_Z12precedence2Av()
+// GNU-DAG: define dllexport void @_Z12precedence2Bv()
+void __attribute__((dllexport, dllimport)) precedence2A() {}
+void __declspec(dllexport) __declspec(dllimport) precedence2B() {}
+
+// MSC-DAG: define dllexport void @"\01?precedenceRedecl1@@YAXXZ"
+// GNU-DAG: define dllexport void @_Z17precedenceRedecl1v()
+void __declspec(dllimport) precedenceRedecl1();
+void __declspec(dllexport) precedenceRedecl1() {}
+
+// MSC-DAG: define dllexport void @"\01?precedenceRedecl2@@YAXXZ"
+// GNU-DAG: define dllexport void @_Z17precedenceRedecl2v()
+void __declspec(dllexport) precedenceRedecl2();
+void __declspec(dllimport) precedenceRedecl2() {}
+
+
+
+//===----------------------------------------------------------------------===//
+// Classes
+//===----------------------------------------------------------------------===//
+
+struct S {
+ void __declspec(dllexport) a() {}
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?a@S@@QAEXXZ"
+
+ struct T {
+ void __declspec(dllexport) a() {}
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?a@T@S@@QAEXXZ"
+ };
+};
+
+
+struct __declspec(dllexport) T {
+ // Copy assignment operator:
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.T* @"\01??4T@@QAEAAU0@ABU0@@Z"
+
+ // Explicitly defaulted copy constructur:
+ T(const T&) = default;
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc %struct.T* @"\01??0T@@QAE@ABU0@@Z"
+
+ void a() {}
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?a@T@@QAEXXZ"
+
+ static int b;
+ // M32-DAG: @"\01?b@T@@2HA" = external dllexport global i32
+
+ static int c;
+ // M32-DAG: @"\01?c@T@@2HA" = dllexport global i32 0, align 4
+};
+
+USEVAR(T::b)
+int T::c;
+
+template <typename T> struct __declspec(dllexport) U { void foo() {} };
+// The U<int> specialization below must cause the following to be emitted:
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?foo@?$U@H@@QAEXXZ"
+// M32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.U* @"\01??4?$U@H@@QAEAAU0@ABU0@@Z"
+struct __declspec(dllexport) V : public U<int> { };
+
+
+struct __declspec(dllexport) W { virtual void foo() {} };
+// Default ctor:
+// M32-DAG: define weak_odr dllexport x86_thiscallcc %struct.W* @"\01??0W@@QAE@XZ"
+// Copy ctor:
+// M32-DAG: define weak_odr dllexport x86_thiscallcc %struct.W* @"\01??0W@@QAE@ABU0@@Z"
+// vftable:
+// M32-DAG: [[W_VTABLE:@.*]] = private unnamed_addr constant [2 x i8*] [i8* bitcast (%rtti.CompleteObjectLocator* @"\01??_R4W@@6B@" to i8*), i8* bitcast (void (%struct.W*)* @"\01?foo@W@@UAEXXZ" to i8*)], comdat $"\01??_7W@@6B@"
+// M32-DAG: @"\01??_7W@@6B@" = dllexport unnamed_addr alias getelementptr inbounds ([2 x i8*]* [[W_VTABLE]], i32 0, i32 1)
+// G32-DAG: @_ZTV1W = weak_odr dllexport unnamed_addr constant [3 x i8*] [i8* null, i8* bitcast ({ i8*, i8* }* @_ZTI1W to i8*), i8* bitcast (void (%struct.W*)* @_ZN1W3fooEv to i8*)]
+
+struct __declspec(dllexport) X : public virtual W {};
+// vbtable:
+// M32-DAG: @"\01??_8X@@7B@" = weak_odr dllexport unnamed_addr constant [2 x i32] [i32 0, i32 4]
+
+struct __declspec(dllexport) Y {
+ // Move assignment operator:
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.Y* @"\01??4Y@@QAEAAU0@$$QAU0@@Z"
+
+ int x;
+};
+
+struct __declspec(dllexport) Z { virtual ~Z() {} };
+// The scalar deleting dtor does not get exported:
+// M32-DAG: define linkonce_odr x86_thiscallcc void @"\01??_GZ@@UAEPAXI@Z"
+
+
+// The user-defined dtor does get exported:
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01??1Z@@UAE@XZ"
+
+namespace DontUseDtorAlias {
+ struct __declspec(dllexport) A { ~A(); };
+ struct __declspec(dllexport) B : A { ~B(); };
+ A::~A() { }
+ B::~B() { }
+ // Emit a real definition of B's constructor; don't alias it to A's.
+ // M32-DAG: define dllexport x86_thiscallcc void @"\01??1B@DontUseDtorAlias@@QAE@XZ"
+}
+
+struct __declspec(dllexport) DefaultedCtorsDtors {
+ DefaultedCtorsDtors() = default;
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc %struct.DefaultedCtorsDtors* @"\01??0DefaultedCtorsDtors@@QAE@XZ"
+ ~DefaultedCtorsDtors() = default;
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01??1DefaultedCtorsDtors@@QAE@XZ"
+};
+
+namespace ReferencedInlineMethodInNestedClass {
+ struct __declspec(dllexport) S {
+ void foo() {
+ t->bar();
+ }
+ struct T {
+ void bar() {}
+ };
+ T *t;
+ };
+ // M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?foo@S@ReferencedInlineMethodInNestedClass@@QAEXXZ"
+ // M32-DAG: define linkonce_odr x86_thiscallcc void @"\01?bar@T@S@ReferencedInlineMethodInNestedClass@@QAEXXZ"
+}
+
+// MS ignores DLL attributes on partial specializations.
+template <typename T> struct PartiallySpecializedClassTemplate {};
+template <typename T> struct __declspec(dllexport) PartiallySpecializedClassTemplate<T*> { void f() {} };
+USEMEMFUNC(PartiallySpecializedClassTemplate<void*>, f);
+// M32-DAG: define linkonce_odr x86_thiscallcc void @"\01?f@?$PartiallySpecializedClassTemplate@PAX@@QAEXXZ"
+// G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN33PartiallySpecializedClassTemplateIPvE1fEv
+
+template <typename T> struct ExplicitlySpecializedClassTemplate {};
+template <> struct __declspec(dllexport) ExplicitlySpecializedClassTemplate<void*> { void f() {} };
+USEMEMFUNC(ExplicitlySpecializedClassTemplate<void*>, f);
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?f@?$ExplicitlySpecializedClassTemplate@PAX@@QAEXXZ"
+// G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN34ExplicitlySpecializedClassTemplateIPvE1fEv
+
+//===----------------------------------------------------------------------===//
+// Classes with template base classes
+//===----------------------------------------------------------------------===//
+
+template <typename T> struct ClassTemplate { void func() {} };
+template <typename T> struct __declspec(dllexport) ExportedClassTemplate { void func() {} };
+template <typename T> struct __declspec(dllimport) ImportedClassTemplate { void func() {} };
+
+template <typename T> struct ExplicitlySpecializedTemplate { void func() {} };
+template <> struct ExplicitlySpecializedTemplate<int> { void func() {} };
+template <typename T> struct ExplicitlyExportSpecializedTemplate { void func() {} };
+template <> struct __declspec(dllexport) ExplicitlyExportSpecializedTemplate<int> { void func() {} };
+template <typename T> struct ExplicitlyImportSpecializedTemplate { void func() {} };
+template <> struct __declspec(dllimport) ExplicitlyImportSpecializedTemplate<int> { void func() {} };
+
+template <typename T> struct ExplicitlyInstantiatedTemplate { void func() {} };
+template struct ExplicitlyInstantiatedTemplate<int>;
+template <typename T> struct ExplicitlyExportInstantiatedTemplate { void func() {} };
+template struct __declspec(dllexport) ExplicitlyExportInstantiatedTemplate<int>;
+template <typename T> struct ExplicitlyImportInstantiatedTemplate { void func() {} };
+template struct __declspec(dllimport) ExplicitlyImportInstantiatedTemplate<int>;
+
+
+// MS: ClassTemplate<int> gets exported.
+struct __declspec(dllexport) DerivedFromTemplate : public ClassTemplate<int> {};
+USEMEMFUNC(ClassTemplate<int>, func)
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?func@?$ClassTemplate@H@@QAEXXZ"
+// G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ClassTemplateIiE4funcEv
+
+// ExportedTemplate is explicitly exported.
+struct __declspec(dllexport) DerivedFromExportedTemplate : public ExportedClassTemplate<int> {};
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?func@?$ExportedClassTemplate@H@@QAEXXZ"
+// G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN21ExportedClassTemplateIiE4funcEv
+
+// ImportedClassTemplate is explicitly imported.
+struct __declspec(dllexport) DerivedFromImportedTemplate : public ImportedClassTemplate<int> {};
+USEMEMFUNC(ImportedClassTemplate<int>, func)
+// M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"\01?func@?$ImportedClassTemplate@H@@QAEXXZ"
+// G32-DAG: declare dllimport x86_thiscallcc void @_ZN21ImportedClassTemplateIiE4funcEv
+
+// Base class already instantiated without dll attribute.
+struct DerivedFromTemplateD : public ClassTemplate<double> {};
+struct __declspec(dllexport) DerivedFromTemplateD2 : public ClassTemplate<double> {};
+USEMEMFUNC(ClassTemplate<double>, func)
+// M32-DAG: define linkonce_odr x86_thiscallcc void @"\01?func@?$ClassTemplate@N@@QAEXXZ"
+// G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ClassTemplateIdE4funcEv
+
+// MS: Base class already instantiated with different dll attribute.
+struct __declspec(dllimport) DerivedFromTemplateB : public ClassTemplate<bool> {};
+struct __declspec(dllexport) DerivedFromTemplateB2 : public ClassTemplate<bool> {};
+USEMEMFUNC(ClassTemplate<bool>, func)
+// M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"\01?func@?$ClassTemplate@_N@@QAEXXZ"
+// G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ClassTemplateIbE4funcEv
+
+// Base class already specialized without dll attribute.
+struct __declspec(dllexport) DerivedFromExplicitlySpecializedTemplate : public ExplicitlySpecializedTemplate<int> {};
+USEMEMFUNC(ExplicitlySpecializedTemplate<int>, func)
+// M32-DAG: define linkonce_odr x86_thiscallcc void @"\01?func@?$ExplicitlySpecializedTemplate@H@@QAEXXZ"
+// G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN29ExplicitlySpecializedTemplateIiE4funcEv
+
+// Base class alredy specialized with export attribute.
+struct __declspec(dllexport) DerivedFromExplicitlyExportSpecializedTemplate : public ExplicitlyExportSpecializedTemplate<int> {};
+USEMEMFUNC(ExplicitlyExportSpecializedTemplate<int>, func)
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?func@?$ExplicitlyExportSpecializedTemplate@H@@QAEXXZ"
+// G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN35ExplicitlyExportSpecializedTemplateIiE4funcEv
+
+// Base class already specialized with import attribute.
+struct __declspec(dllexport) DerivedFromExplicitlyImportSpecializedTemplate : public ExplicitlyImportSpecializedTemplate<int> {};
+USEMEMFUNC(ExplicitlyImportSpecializedTemplate<int>, func)
+// M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"\01?func@?$ExplicitlyImportSpecializedTemplate@H@@QAEXXZ"
+// G32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @_ZN35ExplicitlyImportSpecializedTemplateIiE4funcEv
+
+// Base class already instantiated without dll attribute.
+struct __declspec(dllexport) DerivedFromExplicitlyInstantiatedTemplate : public ExplicitlyInstantiatedTemplate<int> {};
+USEMEMFUNC(ExplicitlyInstantiatedTemplate<int>, func)
+// M32-DAG: define weak_odr x86_thiscallcc void @"\01?func@?$ExplicitlyInstantiatedTemplate@H@@QAEXXZ"
+// G32-DAG: define weak_odr x86_thiscallcc void @_ZN30ExplicitlyInstantiatedTemplateIiE4funcEv
+
+// Base class already instantiated with export attribute.
+struct __declspec(dllexport) DerivedFromExplicitlyExportInstantiatedTemplate : public ExplicitlyExportInstantiatedTemplate<int> {};
+USEMEMFUNC(ExplicitlyExportInstantiatedTemplate<int>, func)
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?func@?$ExplicitlyExportInstantiatedTemplate@H@@QAEXXZ"
+// G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN36ExplicitlyExportInstantiatedTemplateIiE4funcEv
+
+// Base class already instantiated with import attribute.
+struct __declspec(dllexport) DerivedFromExplicitlyImportInstantiatedTemplate : public ExplicitlyImportInstantiatedTemplate<int> {};
+USEMEMFUNC(ExplicitlyImportInstantiatedTemplate<int>, func)
+// M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"\01?func@?$ExplicitlyImportInstantiatedTemplate@H@@QAEXXZ"
+// G32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @_ZN36ExplicitlyImportInstantiatedTemplateIiE4funcEv
+
+// MS: A dll attribute propagates through multiple levels of instantiation.
+template <typename T> struct TopClass { void func() {} };
+template <typename T> struct MiddleClass : public TopClass<T> { };
+struct __declspec(dllexport) BottomClass : public MiddleClass<int> { };
+USEMEMFUNC(TopClass<int>, func)
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?func@?$TopClass@H@@QAEXXZ"
+// G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN8TopClassIiE4funcEv
diff --git a/test/CodeGenCXX/dllimport-members.cpp b/test/CodeGenCXX/dllimport-members.cpp
new file mode 100644
index 000000000000..6656b92b0022
--- /dev/null
+++ b/test/CodeGenCXX/dllimport-members.cpp
@@ -0,0 +1,875 @@
+// RUN: %clang_cc1 -triple i686-windows-msvc -fms-compatibility -emit-llvm -std=c++1y -O0 -o - %s -DMSABI | FileCheck --check-prefix=MSC --check-prefix=M32 %s
+// RUN: %clang_cc1 -triple x86_64-windows-msvc -fms-compatibility -emit-llvm -std=c++1y -O0 -o - %s -DMSABI | FileCheck --check-prefix=MSC --check-prefix=M64 %s
+// RUN: %clang_cc1 -triple i686-windows-gnu -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU --check-prefix=G32 %s
+// RUN: %clang_cc1 -triple x86_64-windows-gnu -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU --check-prefix=G64 %s
+// RUN: %clang_cc1 -triple i686-windows-msvc -fms-compatibility -emit-llvm -std=c++1y -O1 -o - %s -DMSABI | FileCheck --check-prefix=MO1 %s
+// RUN: %clang_cc1 -triple i686-windows-gnu -emit-llvm -std=c++1y -O1 -o - %s | FileCheck --check-prefix=GO1 %s
+
+// Helper structs to make templates more expressive.
+struct ImplicitInst_Imported {};
+struct ExplicitDecl_Imported {};
+struct ExplicitInst_Imported {};
+struct ExplicitSpec_Imported {};
+struct ExplicitSpec_Def_Imported {};
+struct ExplicitSpec_InlineDef_Imported {};
+struct ExplicitSpec_NotImported {};
+
+#define JOIN2(x, y) x##y
+#define JOIN(x, y) JOIN2(x, y)
+#define UNIQ(name) JOIN(name, __LINE__)
+#define USE(func) void UNIQ(use)() { func(); }
+#define USEMV(cls, var) int UNIQ(use)() { return ref(cls::var); }
+#define USEMF(cls, fun) template<> void useMemFun<__LINE__, cls>() { cls().fun(); }
+#define USESPECIALS(cls) void UNIQ(use)() { useSpecials<cls>(); }
+
+template<typename T>
+T ref(T const& v) { return v; }
+
+template<int Line, typename T>
+void useMemFun();
+
+template<typename T>
+void useSpecials() {
+ T v; // Default constructor
+
+ T c1(static_cast<const T&>(v)); // Copy constructor
+ T c2 = static_cast<const T&>(v); // Copy constructor
+ T c3;
+ c3 = static_cast<const T&>(v); // Copy assignment
+
+ T m1(static_cast<T&&>(v)); // Move constructor
+ T m2 = static_cast<T&&>(v); // Move constructor
+ T m3;
+ m3 = static_cast<T&&>(v); // Move assignment
+}
+
+// Used to force non-trivial special members.
+struct ForceNonTrivial {
+ ForceNonTrivial();
+ ~ForceNonTrivial();
+ ForceNonTrivial(const ForceNonTrivial&);
+ ForceNonTrivial& operator=(const ForceNonTrivial&);
+ ForceNonTrivial(ForceNonTrivial&&);
+ ForceNonTrivial& operator=(ForceNonTrivial&&);
+};
+
+
+
+//===----------------------------------------------------------------------===//
+// Class members
+//===----------------------------------------------------------------------===//
+
+// Import individual members of a class.
+struct ImportMembers {
+ struct Nested;
+
+ // M32-DAG: define x86_thiscallcc void @"\01?normalDef@ImportMembers@@QAEXXZ"(%struct.ImportMembers* %this)
+ // M64-DAG: define void @"\01?normalDef@ImportMembers@@QEAAXXZ"(%struct.ImportMembers* %this)
+ // M32-DAG: declare dllimport x86_thiscallcc void @"\01?normalDecl@ImportMembers@@QAEXXZ"(%struct.ImportMembers*)
+ // M64-DAG: declare dllimport void @"\01?normalDecl@ImportMembers@@QEAAXXZ"(%struct.ImportMembers*)
+ // M32-DAG: declare dllimport x86_thiscallcc void @"\01?normalInclass@ImportMembers@@QAEXXZ"(%struct.ImportMembers*)
+ // M64-DAG: declare dllimport void @"\01?normalInclass@ImportMembers@@QEAAXXZ"(%struct.ImportMembers*)
+ // M32-DAG: declare dllimport x86_thiscallcc void @"\01?normalInlineDef@ImportMembers@@QAEXXZ"(%struct.ImportMembers*)
+ // M64-DAG: declare dllimport void @"\01?normalInlineDef@ImportMembers@@QEAAXXZ"(%struct.ImportMembers*)
+ // M32-DAG: declare dllimport x86_thiscallcc void @"\01?normalInlineDecl@ImportMembers@@QAEXXZ"(%struct.ImportMembers*)
+ // M64-DAG: declare dllimport void @"\01?normalInlineDecl@ImportMembers@@QEAAXXZ"(%struct.ImportMembers*)
+ // G32-DAG: define x86_thiscallcc void @_ZN13ImportMembers9normalDefEv(%struct.ImportMembers* %this)
+ // G64-DAG: define void @_ZN13ImportMembers9normalDefEv(%struct.ImportMembers* %this)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers10normalDeclEv(%struct.ImportMembers*)
+ // G64-DAG: declare dllimport void @_ZN13ImportMembers10normalDeclEv(%struct.ImportMembers*)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers13normalInclassEv(%struct.ImportMembers*)
+ // G64-DAG: declare dllimport void @_ZN13ImportMembers13normalInclassEv(%struct.ImportMembers*)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers15normalInlineDefEv(%struct.ImportMembers*)
+ // G64-DAG: declare dllimport void @_ZN13ImportMembers15normalInlineDefEv(%struct.ImportMembers*)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers16normalInlineDeclEv(%struct.ImportMembers*)
+ // G64-DAG: declare dllimport void @_ZN13ImportMembers16normalInlineDeclEv(%struct.ImportMembers*)
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?normalInclass@ImportMembers@@QAEXXZ"(
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?normalInlineDef@ImportMembers@@QAEXXZ"(
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?normalInlineDecl@ImportMembers@@QAEXXZ"(
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN13ImportMembers13normalInclassEv(
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN13ImportMembers15normalInlineDefEv(
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN13ImportMembers16normalInlineDeclEv(
+ __declspec(dllimport) void normalDef(); // dllimport ignored
+ __declspec(dllimport) void normalDecl();
+ __declspec(dllimport) void normalInclass() {}
+ __declspec(dllimport) void normalInlineDef();
+ __declspec(dllimport) inline void normalInlineDecl();
+
+ // M32-DAG: define x86_thiscallcc void @"\01?virtualDef@ImportMembers@@UAEXXZ"(%struct.ImportMembers* %this)
+ // M64-DAG: define void @"\01?virtualDef@ImportMembers@@UEAAXXZ"(%struct.ImportMembers* %this)
+ // M32-DAG: declare dllimport x86_thiscallcc void @"\01?virtualDecl@ImportMembers@@UAEXXZ"(%struct.ImportMembers*)
+ // M64-DAG: declare dllimport void @"\01?virtualDecl@ImportMembers@@UEAAXXZ"(%struct.ImportMembers*)
+ // M32-DAG: declare dllimport x86_thiscallcc void @"\01?virtualInclass@ImportMembers@@UAEXXZ"(%struct.ImportMembers*)
+ // M64-DAG: declare dllimport void @"\01?virtualInclass@ImportMembers@@UEAAXXZ"(%struct.ImportMembers*)
+ // M32-DAG: declare dllimport x86_thiscallcc void @"\01?virtualInlineDef@ImportMembers@@UAEXXZ"(%struct.ImportMembers*)
+ // M64-DAG: declare dllimport void @"\01?virtualInlineDef@ImportMembers@@UEAAXXZ"(%struct.ImportMembers*)
+ // M32-DAG: declare dllimport x86_thiscallcc void @"\01?virtualInlineDecl@ImportMembers@@UAEXXZ"(%struct.ImportMembers*)
+ // M64-DAG: declare dllimport void @"\01?virtualInlineDecl@ImportMembers@@UEAAXXZ"(%struct.ImportMembers*)
+ // G32-DAG: define x86_thiscallcc void @_ZN13ImportMembers10virtualDefEv(%struct.ImportMembers* %this)
+ // G64-DAG: define void @_ZN13ImportMembers10virtualDefEv(%struct.ImportMembers* %this)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers11virtualDeclEv(%struct.ImportMembers*)
+ // G64-DAG: declare dllimport void @_ZN13ImportMembers11virtualDeclEv(%struct.ImportMembers*)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers14virtualInclassEv(%struct.ImportMembers*)
+ // G64-DAG: declare dllimport void @_ZN13ImportMembers14virtualInclassEv(%struct.ImportMembers*)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers16virtualInlineDefEv(%struct.ImportMembers*)
+ // G64-DAG: declare dllimport void @_ZN13ImportMembers16virtualInlineDefEv(%struct.ImportMembers*)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers17virtualInlineDeclEv(%struct.ImportMembers*)
+ // G64-DAG: declare dllimport void @_ZN13ImportMembers17virtualInlineDeclEv(%struct.ImportMembers*)
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?virtualInclass@ImportMembers@@UAEXXZ"(
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?virtualInlineDef@ImportMembers@@UAEXXZ"(
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?virtualInlineDecl@ImportMembers@@UAEXXZ"(
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN13ImportMembers14virtualInclassEv(
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN13ImportMembers16virtualInlineDefEv(
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN13ImportMembers17virtualInlineDeclEv(
+ __declspec(dllimport) virtual void virtualDef(); // dllimport ignored
+ __declspec(dllimport) virtual void virtualDecl();
+ __declspec(dllimport) virtual void virtualInclass() {}
+ __declspec(dllimport) virtual void virtualInlineDef();
+ __declspec(dllimport) virtual inline void virtualInlineDecl();
+
+ // MSC-DAG: define void @"\01?staticDef@ImportMembers@@SAXXZ"()
+ // MSC-DAG: declare dllimport void @"\01?staticDecl@ImportMembers@@SAXXZ"()
+ // MSC-DAG: declare dllimport void @"\01?staticInclass@ImportMembers@@SAXXZ"()
+ // MSC-DAG: declare dllimport void @"\01?staticInlineDef@ImportMembers@@SAXXZ"()
+ // MSC-DAG: declare dllimport void @"\01?staticInlineDecl@ImportMembers@@SAXXZ"()
+ // GNU-DAG: define void @_ZN13ImportMembers9staticDefEv()
+ // GNU-DAG: declare dllimport void @_ZN13ImportMembers10staticDeclEv()
+ // GNU-DAG: declare dllimport void @_ZN13ImportMembers13staticInclassEv()
+ // GNU-DAG: declare dllimport void @_ZN13ImportMembers15staticInlineDefEv()
+ // GNU-DAG: declare dllimport void @_ZN13ImportMembers16staticInlineDeclEv()
+ // MO1-DAG: define available_externally dllimport void @"\01?staticInclass@ImportMembers@@SAXXZ"()
+ // MO1-DAG: define available_externally dllimport void @"\01?staticInlineDef@ImportMembers@@SAXXZ"()
+ // MO1-DAG: define available_externally dllimport void @"\01?staticInlineDecl@ImportMembers@@SAXXZ"()
+ // GO1-DAG: define available_externally dllimport void @_ZN13ImportMembers13staticInclassEv()
+ // GO1-DAG: define available_externally dllimport void @_ZN13ImportMembers15staticInlineDefEv()
+ // GO1-DAG: define available_externally dllimport void @_ZN13ImportMembers16staticInlineDeclEv()
+ __declspec(dllimport) static void staticDef(); // dllimport ignored
+ __declspec(dllimport) static void staticDecl();
+ __declspec(dllimport) static void staticInclass() {}
+ __declspec(dllimport) static void staticInlineDef();
+ __declspec(dllimport) static inline void staticInlineDecl();
+
+ // M32-DAG: declare dllimport x86_thiscallcc void @"\01?protectedNormalDecl@ImportMembers@@IAEXXZ"(%struct.ImportMembers*)
+ // M64-DAG: declare dllimport void @"\01?protectedNormalDecl@ImportMembers@@IEAAXXZ"(%struct.ImportMembers*)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers19protectedNormalDeclEv(%struct.ImportMembers*)
+ // G64-DAG: declare dllimport void @_ZN13ImportMembers19protectedNormalDeclEv(%struct.ImportMembers*)
+ // MSC-DAG: declare dllimport void @"\01?protectedStaticDecl@ImportMembers@@KAXXZ"()
+ // GNU-DAG: declare dllimport void @_ZN13ImportMembers19protectedStaticDeclEv()
+protected:
+ __declspec(dllimport) void protectedNormalDecl();
+ __declspec(dllimport) static void protectedStaticDecl();
+
+ // M32-DAG: declare dllimport x86_thiscallcc void @"\01?privateNormalDecl@ImportMembers@@AAEXXZ"(%struct.ImportMembers*)
+ // M64-DAG: declare dllimport void @"\01?privateNormalDecl@ImportMembers@@AEAAXXZ"(%struct.ImportMembers*)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers17privateNormalDeclEv(%struct.ImportMembers*)
+ // G64-DAG: declare dllimport void @_ZN13ImportMembers17privateNormalDeclEv(%struct.ImportMembers*)
+ // MSC-DAG: declare dllimport void @"\01?privateStaticDecl@ImportMembers@@CAXXZ"()
+ // GNU-DAG: declare dllimport void @_ZN13ImportMembers17privateStaticDeclEv()
+private:
+ __declspec(dllimport) void privateNormalDecl();
+ __declspec(dllimport) static void privateStaticDecl();
+
+ // M32-DAG: declare x86_thiscallcc void @"\01?ignored@ImportMembers@@QAEXXZ"(%struct.ImportMembers*)
+ // M64-DAG: declare void @"\01?ignored@ImportMembers@@QEAAXXZ"(%struct.ImportMembers*)
+ // G32-DAG: declare x86_thiscallcc void @_ZN13ImportMembers7ignoredEv(%struct.ImportMembers*)
+ // G64-DAG: declare void @_ZN13ImportMembers7ignoredEv(%struct.ImportMembers*)
+public:
+ void ignored();
+
+ // MSC-DAG: @"\01?StaticField@ImportMembers@@2HA" = external dllimport global i32
+ // MSC-DAG: @"\01?StaticConstField@ImportMembers@@2HB" = external dllimport constant i32
+ // MSC-DAG: @"\01?StaticConstFieldEqualInit@ImportMembers@@2HB" = available_externally dllimport constant i32 1, align 4
+ // MSC-DAG: @"\01?StaticConstFieldBraceInit@ImportMembers@@2HB" = available_externally dllimport constant i32 1, align 4
+ // MSC-DAG: @"\01?ConstexprField@ImportMembers@@2HB" = available_externally dllimport constant i32 1, align 4
+ // GNU-DAG: @_ZN13ImportMembers11StaticFieldE = external dllimport global i32
+ // GNU-DAG: @_ZN13ImportMembers16StaticConstFieldE = external dllimport constant i32
+ // GNU-DAG: @_ZN13ImportMembers25StaticConstFieldEqualInitE = external dllimport constant i32
+ // GNU-DAG: @_ZN13ImportMembers25StaticConstFieldBraceInitE = external dllimport constant i32
+ // GNU-DAG: @_ZN13ImportMembers14ConstexprFieldE = external dllimport constant i32
+ __declspec(dllimport) static int StaticField;
+ __declspec(dllimport) static const int StaticConstField;
+ __declspec(dllimport) static const int StaticConstFieldEqualInit = 1;
+ __declspec(dllimport) static const int StaticConstFieldBraceInit{1};
+ __declspec(dllimport) constexpr static int ConstexprField = 1;
+
+ template<int Line, typename T> friend void useMemFun();
+};
+
+ void ImportMembers::normalDef() {} // dllimport ignored
+inline void ImportMembers::normalInlineDef() {}
+ void ImportMembers::normalInlineDecl() {}
+ void ImportMembers::virtualDef() {} // dllimport ignored
+inline void ImportMembers::virtualInlineDef() {}
+ void ImportMembers::virtualInlineDecl() {}
+ void ImportMembers::staticDef() {} // dllimport ignored
+inline void ImportMembers::staticInlineDef() {}
+ void ImportMembers::staticInlineDecl() {}
+
+USEMF(ImportMembers, normalDef)
+USEMF(ImportMembers, normalDecl)
+USEMF(ImportMembers, normalInclass)
+USEMF(ImportMembers, normalInlineDef)
+USEMF(ImportMembers, normalInlineDecl)
+USEMF(ImportMembers, virtualDef)
+USEMF(ImportMembers, virtualDecl)
+USEMF(ImportMembers, virtualInclass)
+USEMF(ImportMembers, virtualInlineDef)
+USEMF(ImportMembers, virtualInlineDecl)
+USEMF(ImportMembers, staticDef)
+USEMF(ImportMembers, staticDecl)
+USEMF(ImportMembers, staticInclass)
+USEMF(ImportMembers, staticInlineDef)
+USEMF(ImportMembers, staticInlineDecl)
+USEMF(ImportMembers, protectedNormalDecl)
+USEMF(ImportMembers, protectedStaticDecl)
+USEMF(ImportMembers, privateNormalDecl)
+USEMF(ImportMembers, privateStaticDecl)
+USEMF(ImportMembers, ignored)
+
+USEMV(ImportMembers, StaticField)
+USEMV(ImportMembers, StaticConstField)
+USEMV(ImportMembers, StaticConstFieldEqualInit)
+USEMV(ImportMembers, StaticConstFieldBraceInit)
+USEMV(ImportMembers, ConstexprField)
+
+
+// Import individual members of a nested class.
+struct ImportMembers::Nested {
+ // M32-DAG: define x86_thiscallcc void @"\01?normalDef@Nested@ImportMembers@@QAEXXZ"(%"struct.ImportMembers::Nested"* %this)
+ // M64-DAG: define void @"\01?normalDef@Nested@ImportMembers@@QEAAXXZ"(%"struct.ImportMembers::Nested"* %this)
+ // M32-DAG: declare dllimport x86_thiscallcc void @"\01?normalDecl@Nested@ImportMembers@@QAEXXZ"(%"struct.ImportMembers::Nested"*)
+ // M64-DAG: declare dllimport void @"\01?normalDecl@Nested@ImportMembers@@QEAAXXZ"(%"struct.ImportMembers::Nested"*)
+ // M32-DAG: declare dllimport x86_thiscallcc void @"\01?normalInclass@Nested@ImportMembers@@QAEXXZ"(%"struct.ImportMembers::Nested"*)
+ // M64-DAG: declare dllimport void @"\01?normalInclass@Nested@ImportMembers@@QEAAXXZ"(%"struct.ImportMembers::Nested"*)
+ // M32-DAG: declare dllimport x86_thiscallcc void @"\01?normalInlineDef@Nested@ImportMembers@@QAEXXZ"(%"struct.ImportMembers::Nested"*)
+ // M64-DAG: declare dllimport void @"\01?normalInlineDef@Nested@ImportMembers@@QEAAXXZ"(%"struct.ImportMembers::Nested"*)
+ // M32-DAG: declare dllimport x86_thiscallcc void @"\01?normalInlineDecl@Nested@ImportMembers@@QAEXXZ"(%"struct.ImportMembers::Nested"*)
+ // M64-DAG: declare dllimport void @"\01?normalInlineDecl@Nested@ImportMembers@@QEAAXXZ"(%"struct.ImportMembers::Nested"*)
+ // G32-DAG: define x86_thiscallcc void @_ZN13ImportMembers6Nested9normalDefEv(%"struct.ImportMembers::Nested"* %this)
+ // G64-DAG: define void @_ZN13ImportMembers6Nested9normalDefEv(%"struct.ImportMembers::Nested"* %this)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested10normalDeclEv(%"struct.ImportMembers::Nested"*)
+ // G64-DAG: declare dllimport void @_ZN13ImportMembers6Nested10normalDeclEv(%"struct.ImportMembers::Nested"*)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested13normalInclassEv(%"struct.ImportMembers::Nested"*)
+ // G64-DAG: declare dllimport void @_ZN13ImportMembers6Nested13normalInclassEv(%"struct.ImportMembers::Nested"*)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested15normalInlineDefEv(%"struct.ImportMembers::Nested"*)
+ // G64-DAG: declare dllimport void @_ZN13ImportMembers6Nested15normalInlineDefEv(%"struct.ImportMembers::Nested"*)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested16normalInlineDeclEv(%"struct.ImportMembers::Nested"*)
+ // G64-DAG: declare dllimport void @_ZN13ImportMembers6Nested16normalInlineDeclEv(%"struct.ImportMembers::Nested"*)
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?normalInclass@Nested@ImportMembers@@QAEXXZ"(
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?normalInlineDef@Nested@ImportMembers@@QAEXXZ"(
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?normalInlineDecl@Nested@ImportMembers@@QAEXXZ"(
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested13normalInclassEv(
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested15normalInlineDefEv(
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested16normalInlineDeclEv(
+ __declspec(dllimport) void normalDef(); // dllimport ignored
+ __declspec(dllimport) void normalDecl();
+ __declspec(dllimport) void normalInclass() {}
+ __declspec(dllimport) void normalInlineDef();
+ __declspec(dllimport) inline void normalInlineDecl();
+
+ // M32-DAG: define x86_thiscallcc void @"\01?virtualDef@Nested@ImportMembers@@UAEXXZ"(%"struct.ImportMembers::Nested"* %this)
+ // M64-DAG: define void @"\01?virtualDef@Nested@ImportMembers@@UEAAXXZ"(%"struct.ImportMembers::Nested"* %this)
+ // M32-DAG: declare dllimport x86_thiscallcc void @"\01?virtualDecl@Nested@ImportMembers@@UAEXXZ"(%"struct.ImportMembers::Nested"*)
+ // M64-DAG: declare dllimport void @"\01?virtualDecl@Nested@ImportMembers@@UEAAXXZ"(%"struct.ImportMembers::Nested"*)
+ // M32-DAG: declare dllimport x86_thiscallcc void @"\01?virtualInclass@Nested@ImportMembers@@UAEXXZ"(%"struct.ImportMembers::Nested"*)
+ // M64-DAG: declare dllimport void @"\01?virtualInclass@Nested@ImportMembers@@UEAAXXZ"(%"struct.ImportMembers::Nested"*)
+ // M32-DAG: declare dllimport x86_thiscallcc void @"\01?virtualInlineDef@Nested@ImportMembers@@UAEXXZ"(%"struct.ImportMembers::Nested"*)
+ // M64-DAG: declare dllimport void @"\01?virtualInlineDef@Nested@ImportMembers@@UEAAXXZ"(%"struct.ImportMembers::Nested"*)
+ // M32-DAG: declare dllimport x86_thiscallcc void @"\01?virtualInlineDecl@Nested@ImportMembers@@UAEXXZ"(%"struct.ImportMembers::Nested"*)
+ // M64-DAG: declare dllimport void @"\01?virtualInlineDecl@Nested@ImportMembers@@UEAAXXZ"(%"struct.ImportMembers::Nested"*)
+ // G32-DAG: define x86_thiscallcc void @_ZN13ImportMembers6Nested10virtualDefEv(%"struct.ImportMembers::Nested"* %this)
+ // G64-DAG: define void @_ZN13ImportMembers6Nested10virtualDefEv(%"struct.ImportMembers::Nested"* %this)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested11virtualDeclEv(%"struct.ImportMembers::Nested"*)
+ // G64-DAG: declare dllimport void @_ZN13ImportMembers6Nested11virtualDeclEv(%"struct.ImportMembers::Nested"*)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested14virtualInclassEv(%"struct.ImportMembers::Nested"*)
+ // G64-DAG: declare dllimport void @_ZN13ImportMembers6Nested14virtualInclassEv(%"struct.ImportMembers::Nested"*)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested16virtualInlineDefEv(%"struct.ImportMembers::Nested"*)
+ // G64-DAG: declare dllimport void @_ZN13ImportMembers6Nested16virtualInlineDefEv(%"struct.ImportMembers::Nested"*)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested17virtualInlineDeclEv(%"struct.ImportMembers::Nested"*)
+ // G64-DAG: declare dllimport void @_ZN13ImportMembers6Nested17virtualInlineDeclEv(%"struct.ImportMembers::Nested"*)
+
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?virtualInclass@Nested@ImportMembers@@UAEXXZ"(
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?virtualInlineDef@Nested@ImportMembers@@UAEXXZ"(
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?virtualInlineDecl@Nested@ImportMembers@@UAEXXZ"(
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested14virtualInclassEv(
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested16virtualInlineDefEv(
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested17virtualInlineDeclEv(
+ __declspec(dllimport) virtual void virtualDef(); // dllimport ignored
+ __declspec(dllimport) virtual void virtualDecl();
+ __declspec(dllimport) virtual void virtualInclass() {}
+ __declspec(dllimport) virtual void virtualInlineDef();
+ __declspec(dllimport) virtual inline void virtualInlineDecl();
+
+ // MSC-DAG: define void @"\01?staticDef@Nested@ImportMembers@@SAXXZ"()
+ // MSC-DAG: declare dllimport void @"\01?staticDecl@Nested@ImportMembers@@SAXXZ"()
+ // MSC-DAG: declare dllimport void @"\01?staticInclass@Nested@ImportMembers@@SAXXZ"()
+ // MSC-DAG: declare dllimport void @"\01?staticInlineDef@Nested@ImportMembers@@SAXXZ"()
+ // MSC-DAG: declare dllimport void @"\01?staticInlineDecl@Nested@ImportMembers@@SAXXZ"()
+ // GNU-DAG: define void @_ZN13ImportMembers6Nested9staticDefEv()
+ // GNU-DAG: declare dllimport void @_ZN13ImportMembers6Nested10staticDeclEv()
+ // GNU-DAG: declare dllimport void @_ZN13ImportMembers6Nested13staticInclassEv()
+ // GNU-DAG: declare dllimport void @_ZN13ImportMembers6Nested15staticInlineDefEv()
+ // GNU-DAG: declare dllimport void @_ZN13ImportMembers6Nested16staticInlineDeclEv()
+ // MO1-DAG: define available_externally dllimport void @"\01?staticInclass@Nested@ImportMembers@@SAXXZ"()
+ // MO1-DAG: define available_externally dllimport void @"\01?staticInlineDef@Nested@ImportMembers@@SAXXZ"()
+ // MO1-DAG: define available_externally dllimport void @"\01?staticInlineDecl@Nested@ImportMembers@@SAXXZ"()
+ // GO1-DAG: define available_externally dllimport void @_ZN13ImportMembers6Nested13staticInclassEv()
+ // GO1-DAG: define available_externally dllimport void @_ZN13ImportMembers6Nested15staticInlineDefEv()
+ // GO1-DAG: define available_externally dllimport void @_ZN13ImportMembers6Nested16staticInlineDeclEv()
+ __declspec(dllimport) static void staticDef(); // dllimport ignored
+ __declspec(dllimport) static void staticDecl();
+ __declspec(dllimport) static void staticInclass() {}
+ __declspec(dllimport) static void staticInlineDef();
+ __declspec(dllimport) static inline void staticInlineDecl();
+
+ // M32-DAG: declare dllimport x86_thiscallcc void @"\01?protectedNormalDecl@Nested@ImportMembers@@IAEXXZ"(%"struct.ImportMembers::Nested"*)
+ // M64-DAG: declare dllimport void @"\01?protectedNormalDecl@Nested@ImportMembers@@IEAAXXZ"(%"struct.ImportMembers::Nested"*)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested19protectedNormalDeclEv(%"struct.ImportMembers::Nested"*)
+ // G64-DAG: declare dllimport void @_ZN13ImportMembers6Nested19protectedNormalDeclEv(%"struct.ImportMembers::Nested"*)
+ // MSC-DAG: declare dllimport void @"\01?protectedStaticDecl@Nested@ImportMembers@@KAXXZ"()
+ // GNU-DAG: declare dllimport void @_ZN13ImportMembers6Nested19protectedStaticDeclEv()
+protected:
+ __declspec(dllimport) void protectedNormalDecl();
+ __declspec(dllimport) static void protectedStaticDecl();
+
+ // M32-DAG: declare dllimport x86_thiscallcc void @"\01?privateNormalDecl@Nested@ImportMembers@@AAEXXZ"(%"struct.ImportMembers::Nested"*)
+ // M64-DAG: declare dllimport void @"\01?privateNormalDecl@Nested@ImportMembers@@AEAAXXZ"(%"struct.ImportMembers::Nested"*)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested17privateNormalDeclEv(%"struct.ImportMembers::Nested"*)
+ // G64-DAG: declare dllimport void @_ZN13ImportMembers6Nested17privateNormalDeclEv(%"struct.ImportMembers::Nested"*)
+ // MSC-DAG: declare dllimport void @"\01?privateStaticDecl@Nested@ImportMembers@@CAXXZ"()
+ // GNU-DAG: declare dllimport void @_ZN13ImportMembers6Nested17privateStaticDeclEv()
+private:
+ __declspec(dllimport) void privateNormalDecl();
+ __declspec(dllimport) static void privateStaticDecl();
+
+ // M32-DAG: declare x86_thiscallcc void @"\01?ignored@Nested@ImportMembers@@QAEXXZ"(%"struct.ImportMembers::Nested"*)
+ // M64-DAG: declare void @"\01?ignored@Nested@ImportMembers@@QEAAXXZ"(%"struct.ImportMembers::Nested"*)
+ // G32-DAG: declare x86_thiscallcc void @_ZN13ImportMembers6Nested7ignoredEv(%"struct.ImportMembers::Nested"*)
+ // G64-DAG: declare void @_ZN13ImportMembers6Nested7ignoredEv(%"struct.ImportMembers::Nested"*)
+public:
+ void ignored();
+
+ // MSC-DAG: @"\01?StaticField@Nested@ImportMembers@@2HA" = external dllimport global i32
+ // MSC-DAG: @"\01?StaticConstField@Nested@ImportMembers@@2HB" = external dllimport constant i32
+ // MSC-DAG: @"\01?StaticConstFieldEqualInit@Nested@ImportMembers@@2HB" = available_externally dllimport constant i32 1, align 4
+ // MSC-DAG: @"\01?StaticConstFieldBraceInit@Nested@ImportMembers@@2HB" = available_externally dllimport constant i32 1, align 4
+ // MSC-DAG: @"\01?ConstexprField@Nested@ImportMembers@@2HB" = available_externally dllimport constant i32 1, align 4
+ // GNU-DAG: @_ZN13ImportMembers6Nested11StaticFieldE = external dllimport global i32
+ // GNU-DAG: @_ZN13ImportMembers6Nested16StaticConstFieldE = external dllimport constant i32
+ // GNU-DAG: @_ZN13ImportMembers6Nested25StaticConstFieldEqualInitE = external dllimport constant i32
+ // GNU-DAG: @_ZN13ImportMembers6Nested25StaticConstFieldBraceInitE = external dllimport constant i32
+ // GNU-DAG: @_ZN13ImportMembers6Nested14ConstexprFieldE = external dllimport constant i32
+ __declspec(dllimport) static int StaticField;
+ __declspec(dllimport) static const int StaticConstField;
+ __declspec(dllimport) static const int StaticConstFieldEqualInit = 1;
+ __declspec(dllimport) static const int StaticConstFieldBraceInit{1};
+ __declspec(dllimport) constexpr static int ConstexprField = 1;
+
+ template<int Line, typename T> friend void useMemFun();
+};
+
+ void ImportMembers::Nested::normalDef() {} // dllimport ignored
+inline void ImportMembers::Nested::normalInlineDef() {}
+ void ImportMembers::Nested::normalInlineDecl() {}
+ void ImportMembers::Nested::virtualDef() {} // dllimport ignored
+inline void ImportMembers::Nested::virtualInlineDef() {}
+ void ImportMembers::Nested::virtualInlineDecl() {}
+ void ImportMembers::Nested::staticDef() {} // dllimport ignored
+inline void ImportMembers::Nested::staticInlineDef() {}
+ void ImportMembers::Nested::staticInlineDecl() {}
+
+USEMF(ImportMembers::Nested, normalDef)
+USEMF(ImportMembers::Nested, normalDecl)
+USEMF(ImportMembers::Nested, normalInclass)
+USEMF(ImportMembers::Nested, normalInlineDef)
+USEMF(ImportMembers::Nested, normalInlineDecl)
+USEMF(ImportMembers::Nested, virtualDef)
+USEMF(ImportMembers::Nested, virtualDecl)
+USEMF(ImportMembers::Nested, virtualInclass)
+USEMF(ImportMembers::Nested, virtualInlineDef)
+USEMF(ImportMembers::Nested, virtualInlineDecl)
+USEMF(ImportMembers::Nested, staticDef)
+USEMF(ImportMembers::Nested, staticDecl)
+USEMF(ImportMembers::Nested, staticInclass)
+USEMF(ImportMembers::Nested, staticInlineDef)
+USEMF(ImportMembers::Nested, staticInlineDecl)
+USEMF(ImportMembers::Nested, protectedNormalDecl)
+USEMF(ImportMembers::Nested, protectedStaticDecl)
+USEMF(ImportMembers::Nested, privateNormalDecl)
+USEMF(ImportMembers::Nested, privateStaticDecl)
+USEMF(ImportMembers::Nested, ignored)
+
+USEMV(ImportMembers::Nested, StaticField)
+USEMV(ImportMembers::Nested, StaticConstField)
+USEMV(ImportMembers::Nested, StaticConstFieldEqualInit)
+USEMV(ImportMembers::Nested, StaticConstFieldBraceInit)
+USEMV(ImportMembers::Nested, ConstexprField)
+
+
+// Import special member functions.
+struct ImportSpecials {
+ // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportSpecials* @"\01??0ImportSpecials@@QAE@XZ"(%struct.ImportSpecials* returned)
+ // M64-DAG: declare dllimport %struct.ImportSpecials* @"\01??0ImportSpecials@@QEAA@XZ"(%struct.ImportSpecials* returned)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN14ImportSpecialsC1Ev(%struct.ImportSpecials*)
+ // G64-DAG: declare dllimport void @_ZN14ImportSpecialsC1Ev(%struct.ImportSpecials*)
+ __declspec(dllimport) ImportSpecials();
+
+ // M32-DAG: declare dllimport x86_thiscallcc void @"\01??1ImportSpecials@@QAE@XZ"(%struct.ImportSpecials*)
+ // M64-DAG: declare dllimport void @"\01??1ImportSpecials@@QEAA@XZ"(%struct.ImportSpecials*)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN14ImportSpecialsD1Ev(%struct.ImportSpecials*)
+ // G64-DAG: declare dllimport void @_ZN14ImportSpecialsD1Ev(%struct.ImportSpecials*)
+ __declspec(dllimport) ~ImportSpecials();
+
+ // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportSpecials* @"\01??0ImportSpecials@@QAE@ABU0@@Z"(%struct.ImportSpecials* returned, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ // M64-DAG: declare dllimport %struct.ImportSpecials* @"\01??0ImportSpecials@@QEAA@AEBU0@@Z"(%struct.ImportSpecials* returned, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN14ImportSpecialsC1ERKS_(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: declare dllimport void @_ZN14ImportSpecialsC1ERKS_(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ __declspec(dllimport) ImportSpecials(const ImportSpecials&);
+
+ // M32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @"\01??4ImportSpecials@@QAEAAU0@ABU0@@Z"(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ // M64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @"\01??4ImportSpecials@@QEAAAEAU0@AEBU0@@Z"(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @_ZN14ImportSpecialsaSERKS_(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @_ZN14ImportSpecialsaSERKS_(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ __declspec(dllimport) ImportSpecials& operator=(const ImportSpecials&);
+
+ // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportSpecials* @"\01??0ImportSpecials@@QAE@$$QAU0@@Z"(%struct.ImportSpecials* returned, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ // M64-DAG: declare dllimport %struct.ImportSpecials* @"\01??0ImportSpecials@@QEAA@$$QEAU0@@Z"(%struct.ImportSpecials* returned, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN14ImportSpecialsC1EOS_(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: declare dllimport void @_ZN14ImportSpecialsC1EOS_(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ __declspec(dllimport) ImportSpecials(ImportSpecials&&);
+
+ // M32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @"\01??4ImportSpecials@@QAEAAU0@$$QAU0@@Z"(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ // M64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @"\01??4ImportSpecials@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @_ZN14ImportSpecialsaSEOS_(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @_ZN14ImportSpecialsaSEOS_(%struct.ImportSpecials*, %struct.ImportSpecials* dereferenceable({{[0-9]+}}))
+ __declspec(dllimport) ImportSpecials& operator=(ImportSpecials&&);
+};
+USESPECIALS(ImportSpecials)
+
+
+// Export inline special member functions.
+struct ImportInlineSpecials {
+ // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QAE@XZ"(%struct.ImportInlineSpecials* returned)
+ // M64-DAG: declare dllimport %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QEAA@XZ"(%struct.ImportInlineSpecials* returned)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN20ImportInlineSpecialsC1Ev(%struct.ImportInlineSpecials*)
+ // G64-DAG: declare dllimport void @_ZN20ImportInlineSpecialsC1Ev(%struct.ImportInlineSpecials*)
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QAE@XZ"(
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN20ImportInlineSpecialsC1Ev(
+ __declspec(dllimport) ImportInlineSpecials() {}
+
+ // M32-DAG: declare dllimport x86_thiscallcc void @"\01??1ImportInlineSpecials@@QAE@XZ"(%struct.ImportInlineSpecials*)
+ // M64-DAG: declare dllimport void @"\01??1ImportInlineSpecials@@QEAA@XZ"(%struct.ImportInlineSpecials*)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN20ImportInlineSpecialsD1Ev(%struct.ImportInlineSpecials*)
+ // G64-DAG: declare dllimport void @_ZN20ImportInlineSpecialsD1Ev(%struct.ImportInlineSpecials*)
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01??1ImportInlineSpecials@@QAE@XZ"(
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN20ImportInlineSpecialsD1Ev(
+ __declspec(dllimport) ~ImportInlineSpecials() {}
+
+ // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QAE@ABU0@@Z"(%struct.ImportInlineSpecials* returned, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // M64-DAG: declare dllimport %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QEAA@AEBU0@@Z"(%struct.ImportInlineSpecials* returned, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN20ImportInlineSpecialsC1ERKS_(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: declare dllimport void @_ZN20ImportInlineSpecialsC1ERKS_(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QAE@ABU0@@Z"(
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN20ImportInlineSpecialsC1ERKS_(
+ __declspec(dllimport) inline ImportInlineSpecials(const ImportInlineSpecials&);
+
+ // M32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @"\01??4ImportInlineSpecials@@QAEAAU0@ABU0@@Z"(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // M64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @"\01??4ImportInlineSpecials@@QEAAAEAU0@AEBU0@@Z"(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSERKS_(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSERKS_(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @"\01??4ImportInlineSpecials@@QAEAAU0@ABU0@@Z"(
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSERKS_(
+ __declspec(dllimport) ImportInlineSpecials& operator=(const ImportInlineSpecials&);
+
+ // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QAE@$$QAU0@@Z"(%struct.ImportInlineSpecials* returned, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // M64-DAG: declare dllimport %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QEAA@$$QEAU0@@Z"(%struct.ImportInlineSpecials* returned, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN20ImportInlineSpecialsC1EOS_(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: declare dllimport void @_ZN20ImportInlineSpecialsC1EOS_(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc %struct.ImportInlineSpecials* @"\01??0ImportInlineSpecials@@QAE@$$QAU0@@Z"(
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN20ImportInlineSpecialsC1EOS_(
+ __declspec(dllimport) ImportInlineSpecials(ImportInlineSpecials&&) {}
+
+ // M32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @"\01??4ImportInlineSpecials@@QAEAAU0@$$QAU0@@Z"(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // M64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @"\01??4ImportInlineSpecials@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // G32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSEOS_(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // G64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSEOS_(%struct.ImportInlineSpecials*, %struct.ImportInlineSpecials* dereferenceable({{[0-9]+}}))
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @"\01??4ImportInlineSpecials@@QAEAAU0@$$QAU0@@Z"(
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSEOS_(
+ __declspec(dllimport) ImportInlineSpecials& operator=(ImportInlineSpecials&&) { return *this; }
+};
+ImportInlineSpecials::ImportInlineSpecials(const ImportInlineSpecials&) {}
+inline ImportInlineSpecials& ImportInlineSpecials::operator=(const ImportInlineSpecials&) { return *this; }
+USESPECIALS(ImportInlineSpecials)
+
+
+// Import defaulted member functions.
+struct ImportDefaulted {
+ // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QAE@XZ"(%struct.ImportDefaulted* returned)
+ // M64-DAG: declare dllimport %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QEAA@XZ"(%struct.ImportDefaulted* returned)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN15ImportDefaultedC1Ev(%struct.ImportDefaulted*)
+ // G64-DAG: declare dllimport void @_ZN15ImportDefaultedC1Ev(%struct.ImportDefaulted*)
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QAE@XZ"(%struct.ImportDefaulted* returned %this)
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN15ImportDefaultedC1Ev(%struct.ImportDefaulted* %this)
+ __declspec(dllimport) ImportDefaulted() = default;
+
+ // M32-DAG: declare dllimport x86_thiscallcc void @"\01??1ImportDefaulted@@QAE@XZ"(%struct.ImportDefaulted*)
+ // M64-DAG: declare dllimport void @"\01??1ImportDefaulted@@QEAA@XZ"(%struct.ImportDefaulted*)
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN15ImportDefaultedD1Ev(%struct.ImportDefaulted*)
+ // G64-DAG: declare dllimport void @_ZN15ImportDefaultedD1Ev(%struct.ImportDefaulted*)
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01??1ImportDefaulted@@QAE@XZ"(%struct.ImportDefaulted* %this)
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN15ImportDefaultedD1Ev(%struct.ImportDefaulted* %this)
+ __declspec(dllimport) ~ImportDefaulted() = default;
+
+ // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QAE@ABU0@@Z"(%struct.ImportDefaulted* returned, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // M64-DAG: declare dllimport %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QEAA@AEBU0@@Z"(%struct.ImportDefaulted* returned, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN15ImportDefaultedC1ERKS_(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // G64-DAG: declare dllimport void @_ZN15ImportDefaultedC1ERKS_(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QAE@ABU0@@Z"(%struct.ImportDefaulted* returned %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN15ImportDefaultedC1ERKS_(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ __declspec(dllimport) ImportDefaulted(const ImportDefaulted&) = default;
+
+ // M32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @"\01??4ImportDefaulted@@QAEAAU0@ABU0@@Z"(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // M64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @"\01??4ImportDefaulted@@QEAAAEAU0@AEBU0@@Z"(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // G32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @_ZN15ImportDefaultedaSERKS_(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // G64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @_ZN15ImportDefaultedaSERKS_(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @"\01??4ImportDefaulted@@QAEAAU0@ABU0@@Z"(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @_ZN15ImportDefaultedaSERKS_(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ __declspec(dllimport) ImportDefaulted& operator=(const ImportDefaulted&) = default;
+
+ // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QAE@$$QAU0@@Z"(%struct.ImportDefaulted* returned, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // M64-DAG: declare dllimport %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QEAA@$$QEAU0@@Z"(%struct.ImportDefaulted* returned, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // G32-DAG: declare dllimport x86_thiscallcc void @_ZN15ImportDefaultedC1EOS_(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // G64-DAG: declare dllimport void @_ZN15ImportDefaultedC1EOS_(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc %struct.ImportDefaulted* @"\01??0ImportDefaulted@@QAE@$$QAU0@@Z"(%struct.ImportDefaulted* returned %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc void @_ZN15ImportDefaultedC1EOS_(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ __declspec(dllimport) ImportDefaulted(ImportDefaulted&&) = default;
+
+ // M32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @"\01??4ImportDefaulted@@QAEAAU0@$$QAU0@@Z"(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // M64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @"\01??4ImportDefaulted@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // G32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @_ZN15ImportDefaultedaSEOS_(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // G64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @_ZN15ImportDefaultedaSEOS_(%struct.ImportDefaulted*, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @"\01??4ImportDefaulted@@QAEAAU0@$$QAU0@@Z"(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ // GO1-DAG: define available_externally dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @_ZN15ImportDefaultedaSEOS_(%struct.ImportDefaulted* %this, %struct.ImportDefaulted* dereferenceable({{[0-9]+}}))
+ __declspec(dllimport) ImportDefaulted& operator=(ImportDefaulted&&) = default;
+
+ ForceNonTrivial v; // ensure special members are non-trivial
+};
+USESPECIALS(ImportDefaulted)
+
+
+// Import defaulted member function definitions.
+struct ImportDefaultedDefs {
+ __declspec(dllimport) inline ImportDefaultedDefs();
+ __declspec(dllimport) inline ~ImportDefaultedDefs();
+
+ __declspec(dllimport) ImportDefaultedDefs(const ImportDefaultedDefs&);
+ __declspec(dllimport) ImportDefaultedDefs& operator=(const ImportDefaultedDefs&);
+
+ __declspec(dllimport) ImportDefaultedDefs(ImportDefaultedDefs&&);
+ __declspec(dllimport) ImportDefaultedDefs& operator=(ImportDefaultedDefs&&);
+};
+
+// M32-DAG: declare dllimport x86_thiscallcc %struct.ImportDefaultedDefs* @"\01??0ImportDefaultedDefs@@QAE@XZ"(%struct.ImportDefaultedDefs* returned)
+// M64-DAG: declare dllimport %struct.ImportDefaultedDefs* @"\01??0ImportDefaultedDefs@@QEAA@XZ"(%struct.ImportDefaultedDefs* returned)
+// G32-DAG: declare dllimport x86_thiscallcc void @_ZN19ImportDefaultedDefsC1Ev(%struct.ImportDefaultedDefs*)
+// G64-DAG: declare dllimport void @_ZN19ImportDefaultedDefsC1Ev(%struct.ImportDefaultedDefs*)
+__declspec(dllimport) ImportDefaultedDefs::ImportDefaultedDefs() = default;
+
+// M32-DAG: declare dllimport x86_thiscallcc void @"\01??1ImportDefaultedDefs@@QAE@XZ"(%struct.ImportDefaultedDefs*)
+// M64-DAG: declare dllimport void @"\01??1ImportDefaultedDefs@@QEAA@XZ"(%struct.ImportDefaultedDefs*)
+// G32-DAG: declare dllimport x86_thiscallcc void @_ZN19ImportDefaultedDefsD1Ev(%struct.ImportDefaultedDefs*)
+// G64-DAG: declare dllimport void @_ZN19ImportDefaultedDefsD1Ev(%struct.ImportDefaultedDefs*)
+__declspec(dllimport) ImportDefaultedDefs::~ImportDefaultedDefs() = default;
+
+// M32-DAG: declare dllimport x86_thiscallcc %struct.ImportDefaultedDefs* @"\01??0ImportDefaultedDefs@@QAE@ABU0@@Z"(%struct.ImportDefaultedDefs* returned, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// M64-DAG: declare dllimport %struct.ImportDefaultedDefs* @"\01??0ImportDefaultedDefs@@QEAA@AEBU0@@Z"(%struct.ImportDefaultedDefs* returned, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G32-DAG: declare dllimport x86_thiscallcc void @_ZN19ImportDefaultedDefsC1ERKS_(%struct.ImportDefaultedDefs*, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G64-DAG: declare dllimport void @_ZN19ImportDefaultedDefsC1ERKS_(%struct.ImportDefaultedDefs*, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+inline ImportDefaultedDefs::ImportDefaultedDefs(const ImportDefaultedDefs&) = default;
+
+// M32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @"\01??4ImportDefaultedDefs@@QAEAAU0@ABU0@@Z"(%struct.ImportDefaultedDefs*, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// M64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @"\01??4ImportDefaultedDefs@@QEAAAEAU0@AEBU0@@Z"(%struct.ImportDefaultedDefs*, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G32-DAG: declare dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @_ZN19ImportDefaultedDefsaSERKS_(%struct.ImportDefaultedDefs*, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G64-DAG: declare dllimport dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @_ZN19ImportDefaultedDefsaSERKS_(%struct.ImportDefaultedDefs*, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+inline ImportDefaultedDefs& ImportDefaultedDefs::operator=(const ImportDefaultedDefs&) = default;
+
+// M32-DAG: define x86_thiscallcc %struct.ImportDefaultedDefs* @"\01??0ImportDefaultedDefs@@QAE@$$QAU0@@Z"(%struct.ImportDefaultedDefs* returned %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// M64-DAG: define %struct.ImportDefaultedDefs* @"\01??0ImportDefaultedDefs@@QEAA@$$QEAU0@@Z"(%struct.ImportDefaultedDefs* returned %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G32-DAG: define x86_thiscallcc void @_ZN19ImportDefaultedDefsC1EOS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G64-DAG: define void @_ZN19ImportDefaultedDefsC1EOS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G32-DAG: define x86_thiscallcc void @_ZN19ImportDefaultedDefsC2EOS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G64-DAG: define void @_ZN19ImportDefaultedDefsC2EOS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+ImportDefaultedDefs::ImportDefaultedDefs(ImportDefaultedDefs&&) = default; // dllimport ignored
+
+// M32-DAG: define x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @"\01??4ImportDefaultedDefs@@QAEAAU0@$$QAU0@@Z"(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// M64-DAG: define dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @"\01??4ImportDefaultedDefs@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G32-DAG: define x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @_ZN19ImportDefaultedDefsaSEOS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+// G64-DAG: define dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @_ZN19ImportDefaultedDefsaSEOS_(%struct.ImportDefaultedDefs* %this, %struct.ImportDefaultedDefs* dereferenceable({{[0-9]+}}))
+ImportDefaultedDefs& ImportDefaultedDefs::operator=(ImportDefaultedDefs&&) = default; // dllimport ignored
+
+USESPECIALS(ImportDefaultedDefs)
+
+
+// Import allocation functions.
+struct ImportAlloc {
+ __declspec(dllimport) void* operator new(__SIZE_TYPE__);
+ __declspec(dllimport) void* operator new[](__SIZE_TYPE__);
+ __declspec(dllimport) void operator delete(void*);
+ __declspec(dllimport) void operator delete[](void*);
+};
+
+// M32-DAG: declare dllimport i8* @"\01??2ImportAlloc@@SAPAXI@Z"(i32)
+// M64-DAG: declare dllimport i8* @"\01??2ImportAlloc@@SAPEAX_K@Z"(i64)
+// G32-DAG: declare dllimport i8* @_ZN11ImportAllocnwEj(i32)
+// G64-DAG: declare dllimport i8* @_ZN11ImportAllocnwEy(i64)
+void UNIQ(use)() { new ImportAlloc(); }
+
+// M32-DAG: declare dllimport i8* @"\01??_UImportAlloc@@SAPAXI@Z"(i32)
+// M64-DAG: declare dllimport i8* @"\01??_UImportAlloc@@SAPEAX_K@Z"(i64)
+// G32-DAG: declare dllimport i8* @_ZN11ImportAllocnaEj(i32)
+// G64-DAG: declare dllimport i8* @_ZN11ImportAllocnaEy(i64)
+void UNIQ(use)() { new ImportAlloc[1]; }
+
+// M32-DAG: declare dllimport void @"\01??3ImportAlloc@@SAXPAX@Z"(i8*)
+// M64-DAG: declare dllimport void @"\01??3ImportAlloc@@SAXPEAX@Z"(i8*)
+// G32-DAG: declare dllimport void @_ZN11ImportAllocdlEPv(i8*)
+// G64-DAG: declare dllimport void @_ZN11ImportAllocdlEPv(i8*)
+void UNIQ(use)(ImportAlloc* ptr) { delete ptr; }
+
+// M32-DAG: declare dllimport void @"\01??_VImportAlloc@@SAXPAX@Z"(i8*)
+// M64-DAG: declare dllimport void @"\01??_VImportAlloc@@SAXPEAX@Z"(i8*)
+// G32-DAG: declare dllimport void @_ZN11ImportAllocdaEPv(i8*)
+// G64-DAG: declare dllimport void @_ZN11ImportAllocdaEPv(i8*)
+void UNIQ(use)(ImportAlloc* ptr) { delete[] ptr; }
+
+
+//===----------------------------------------------------------------------===//
+// Class member templates
+//===----------------------------------------------------------------------===//
+
+struct MemFunTmpl {
+ template<typename T> void normalDef() {}
+ template<typename T> __declspec(dllimport) void importedNormal() {}
+ template<typename T> static void staticDef() {}
+ template<typename T> __declspec(dllimport) static void importedStatic() {}
+};
+
+// Import implicit instantiation of an imported member function template.
+// M32-DAG: declare dllimport x86_thiscallcc void @"\01??$importedNormal@UImplicitInst_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl*)
+// M64-DAG: declare dllimport void @"\01??$importedNormal@UImplicitInst_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl*)
+// G32-DAG: declare dllimport x86_thiscallcc void @_ZN10MemFunTmpl14importedNormalI21ImplicitInst_ImportedEEvv(%struct.MemFunTmpl*)
+// G64-DAG: declare dllimport void @_ZN10MemFunTmpl14importedNormalI21ImplicitInst_ImportedEEvv(%struct.MemFunTmpl*)
+USEMF(MemFunTmpl, importedNormal<ImplicitInst_Imported>)
+
+// MSC-DAG: declare dllimport void @"\01??$importedStatic@UImplicitInst_Imported@@@MemFunTmpl@@SAXXZ"()
+// GNU-DAG: declare dllimport void @_ZN10MemFunTmpl14importedStaticI21ImplicitInst_ImportedEEvv()
+USE(MemFunTmpl::importedStatic<ImplicitInst_Imported>)
+
+
+// Import explicit instantiation declaration of an imported member function
+// template.
+// M32-DAG: declare dllimport x86_thiscallcc void @"\01??$importedNormal@UExplicitDecl_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl*)
+// M64-DAG: declare dllimport void @"\01??$importedNormal@UExplicitDecl_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl*)
+// G32-DAG: declare dllimport x86_thiscallcc void @_ZN10MemFunTmpl14importedNormalI21ExplicitDecl_ImportedEEvv(%struct.MemFunTmpl*)
+// G64-DAG: declare dllimport void @_ZN10MemFunTmpl14importedNormalI21ExplicitDecl_ImportedEEvv(%struct.MemFunTmpl*)
+extern template void MemFunTmpl::importedNormal<ExplicitDecl_Imported>();
+USEMF(MemFunTmpl, importedNormal<ExplicitDecl_Imported>)
+
+// MSC-DAG: declare dllimport void @"\01??$importedStatic@UExplicitDecl_Imported@@@MemFunTmpl@@SAXXZ"()
+// GNU-DAG: declare dllimport void @_ZN10MemFunTmpl14importedStaticI21ExplicitDecl_ImportedEEvv()
+extern template void MemFunTmpl::importedStatic<ExplicitDecl_Imported>();
+USE(MemFunTmpl::importedStatic<ExplicitDecl_Imported>)
+
+
+// Import explicit instantiation definition of an imported member function
+// template.
+// M32-DAG: declare dllimport x86_thiscallcc void @"\01??$importedNormal@UExplicitInst_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl*)
+// M64-DAG: declare dllimport void @"\01??$importedNormal@UExplicitInst_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl*)
+// G32-DAG: declare dllimport x86_thiscallcc void @_ZN10MemFunTmpl14importedNormalI21ExplicitInst_ImportedEEvv(%struct.MemFunTmpl*)
+// G64-DAG: declare dllimport void @_ZN10MemFunTmpl14importedNormalI21ExplicitInst_ImportedEEvv(%struct.MemFunTmpl*)
+template void MemFunTmpl::importedNormal<ExplicitInst_Imported>();
+USEMF(MemFunTmpl, importedNormal<ExplicitInst_Imported>)
+
+// MSC-DAG: declare dllimport void @"\01??$importedStatic@UExplicitInst_Imported@@@MemFunTmpl@@SAXXZ"()
+// GNU-DAG: declare dllimport void @_ZN10MemFunTmpl14importedStaticI21ExplicitInst_ImportedEEvv()
+template void MemFunTmpl::importedStatic<ExplicitInst_Imported>();
+USE(MemFunTmpl::importedStatic<ExplicitInst_Imported>)
+
+
+// Import specialization of an imported member function template.
+// M32-DAG: declare dllimport x86_thiscallcc void @"\01??$importedNormal@UExplicitSpec_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl*)
+// M64-DAG: declare dllimport void @"\01??$importedNormal@UExplicitSpec_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl*)
+// G32-DAG: declare dllimport x86_thiscallcc void @_ZN10MemFunTmpl14importedNormalI21ExplicitSpec_ImportedEEvv(%struct.MemFunTmpl*)
+// G64-DAG: declare dllimport void @_ZN10MemFunTmpl14importedNormalI21ExplicitSpec_ImportedEEvv(%struct.MemFunTmpl*)
+template<> __declspec(dllimport) void MemFunTmpl::importedNormal<ExplicitSpec_Imported>();
+USEMF(MemFunTmpl, importedNormal<ExplicitSpec_Imported>)
+
+// M32-DAG-FIXME: declare dllimport x86_thiscallcc void @"\01??$importedNormal@UExplicitSpec_Def_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl*)
+// M64-DAG-FIXME: declare dllimport void @"\01??$importedNormal@UExplicitSpec_Def_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl*)
+#ifdef MSABI
+//template<> __declspec(dllimport) void MemFunTmpl::importedNormal<ExplicitSpec_Def_Imported>() {}
+//USEMF(MemFunTmpl, importedNormal<ExplicitSpec_Def_Imported>)
+#endif
+
+// M32-DAG: declare dllimport x86_thiscallcc void @"\01??$importedNormal@UExplicitSpec_InlineDef_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl*)
+// M64-DAG: declare dllimport void @"\01??$importedNormal@UExplicitSpec_InlineDef_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl*)
+// G32-DAG: declare dllimport x86_thiscallcc void @_ZN10MemFunTmpl14importedNormalI31ExplicitSpec_InlineDef_ImportedEEvv(%struct.MemFunTmpl*)
+// G64-DAG: declare dllimport void @_ZN10MemFunTmpl14importedNormalI31ExplicitSpec_InlineDef_ImportedEEvv(%struct.MemFunTmpl*)
+template<> __declspec(dllimport) inline void MemFunTmpl::importedNormal<ExplicitSpec_InlineDef_Imported>() {}
+USEMF(MemFunTmpl, importedNormal<ExplicitSpec_InlineDef_Imported>)
+
+
+// MSC-DAG: declare dllimport void @"\01??$importedStatic@UExplicitSpec_Imported@@@MemFunTmpl@@SAXXZ"()
+// GNU-DAG: declare dllimport void @_ZN10MemFunTmpl14importedStaticI21ExplicitSpec_ImportedEEvv()
+template<> __declspec(dllimport) void MemFunTmpl::importedStatic<ExplicitSpec_Imported>();
+USE(MemFunTmpl::importedStatic<ExplicitSpec_Imported>)
+
+// MSC-DAG-FIXME: declare dllimport void @"\01??$importedStatic@UExplicitSpec_Def_Imported@@@MemFunTmpl@@SAXXZ"()
+#ifdef MSABI
+//template<> __declspec(dllimport) void MemFunTmpl::importedStatic<ExplicitSpec_Def_Imported>() {}
+//USE(MemFunTmpl::importedStatic<ExplicitSpec_Def_Imported>)
+#endif
+
+// MSC-DAG: declare dllimport void @"\01??$importedStatic@UExplicitSpec_InlineDef_Imported@@@MemFunTmpl@@SAXXZ"()
+// GNU-DAG: declare dllimport void @_ZN10MemFunTmpl14importedStaticI31ExplicitSpec_InlineDef_ImportedEEvv()
+template<> __declspec(dllimport) inline void MemFunTmpl::importedStatic<ExplicitSpec_InlineDef_Imported>() {}
+USE(MemFunTmpl::importedStatic<ExplicitSpec_InlineDef_Imported>)
+
+
+// Not importing specialization of an imported member function template without
+// explicit dllimport.
+// M32-DAG: define x86_thiscallcc void @"\01??$importedNormal@UExplicitSpec_NotImported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* %this)
+// M64-DAG: define void @"\01??$importedNormal@UExplicitSpec_NotImported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* %this)
+// G32-DAG: define x86_thiscallcc void @_ZN10MemFunTmpl14importedNormalI24ExplicitSpec_NotImportedEEvv(%struct.MemFunTmpl* %this)
+// G64-DAG: define void @_ZN10MemFunTmpl14importedNormalI24ExplicitSpec_NotImportedEEvv(%struct.MemFunTmpl* %this)
+template<> void MemFunTmpl::importedNormal<ExplicitSpec_NotImported>() {}
+USEMF(MemFunTmpl, importedNormal<ExplicitSpec_NotImported>)
+
+// MSC-DAG: define void @"\01??$importedStatic@UExplicitSpec_NotImported@@@MemFunTmpl@@SAXXZ"()
+// GNU-DAG: define void @_ZN10MemFunTmpl14importedStaticI24ExplicitSpec_NotImportedEEvv()
+template<> void MemFunTmpl::importedStatic<ExplicitSpec_NotImported>() {}
+USE(MemFunTmpl::importedStatic<ExplicitSpec_NotImported>)
+
+
+// Import explicit instantiation declaration of a non-imported member function
+// template.
+// M32-DAG: declare dllimport x86_thiscallcc void @"\01??$normalDef@UExplicitDecl_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl*)
+// M64-DAG: declare dllimport void @"\01??$normalDef@UExplicitDecl_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl*)
+// G32-DAG: declare dllimport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI21ExplicitDecl_ImportedEEvv(%struct.MemFunTmpl*)
+// G64-DAG: declare dllimport void @_ZN10MemFunTmpl9normalDefI21ExplicitDecl_ImportedEEvv(%struct.MemFunTmpl*)
+extern template __declspec(dllimport) void MemFunTmpl::normalDef<ExplicitDecl_Imported>();
+USEMF(MemFunTmpl, normalDef<ExplicitDecl_Imported>)
+
+// MSC-DAG: declare dllimport void @"\01??$staticDef@UExplicitDecl_Imported@@@MemFunTmpl@@SAXXZ"()
+// GNU-DAG: declare dllimport void @_ZN10MemFunTmpl9staticDefI21ExplicitDecl_ImportedEEvv()
+extern template __declspec(dllimport) void MemFunTmpl::staticDef<ExplicitDecl_Imported>();
+USE(MemFunTmpl::staticDef<ExplicitDecl_Imported>)
+
+
+// Import explicit instantiation definition of a non-imported member function
+// template.
+// M32-DAG: declare dllimport x86_thiscallcc void @"\01??$normalDef@UExplicitInst_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl*)
+// M64-DAG: declare dllimport void @"\01??$normalDef@UExplicitInst_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl*)
+// G32-DAG: declare dllimport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI21ExplicitInst_ImportedEEvv(%struct.MemFunTmpl*)
+// G64-DAG: declare dllimport void @_ZN10MemFunTmpl9normalDefI21ExplicitInst_ImportedEEvv(%struct.MemFunTmpl*)
+template __declspec(dllimport) void MemFunTmpl::normalDef<ExplicitInst_Imported>();
+USEMF(MemFunTmpl, normalDef<ExplicitInst_Imported>)
+
+// MSC-DAG: declare dllimport void @"\01??$staticDef@UExplicitInst_Imported@@@MemFunTmpl@@SAXXZ"()
+// GNU-DAG: declare dllimport void @_ZN10MemFunTmpl9staticDefI21ExplicitInst_ImportedEEvv()
+template __declspec(dllimport) void MemFunTmpl::staticDef<ExplicitInst_Imported>();
+USE(MemFunTmpl::staticDef<ExplicitInst_Imported>)
+
+
+// Import specialization of a non-imported member function template.
+// M32-DAG: declare dllimport x86_thiscallcc void @"\01??$normalDef@UExplicitSpec_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl*)
+// M64-DAG: declare dllimport void @"\01??$normalDef@UExplicitSpec_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl*)
+// G32-DAG: declare dllimport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI21ExplicitSpec_ImportedEEvv(%struct.MemFunTmpl*)
+// G64-DAG: declare dllimport void @_ZN10MemFunTmpl9normalDefI21ExplicitSpec_ImportedEEvv(%struct.MemFunTmpl*)
+template<> __declspec(dllimport) void MemFunTmpl::normalDef<ExplicitSpec_Imported>();
+USEMF(MemFunTmpl, normalDef<ExplicitSpec_Imported>)
+
+// M32-DAG-FIXME: declare dllimport x86_thiscallcc void @"\01??$normalDef@UExplicitSpec_Def_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl*)
+// M64-DAG-FIXME: declare dllimport void @"\01??$normalDef@UExplicitSpec_Def_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl*)
+#ifdef MSABI
+//template<> __declspec(dllimport) void MemFunTmpl::normalDef<ExplicitSpec_Def_Imported>() {}
+//USEMF(MemFunTmpl, normalDef<ExplicitSpec_Def_Imported>)
+#endif
+
+// M32-DAG: declare dllimport x86_thiscallcc void @"\01??$normalDef@UExplicitSpec_InlineDef_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl*)
+// M64-DAG: declare dllimport void @"\01??$normalDef@UExplicitSpec_InlineDef_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl*)
+// G32-DAG: declare dllimport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI31ExplicitSpec_InlineDef_ImportedEEvv(%struct.MemFunTmpl*)
+// G64-DAG: declare dllimport void @_ZN10MemFunTmpl9normalDefI31ExplicitSpec_InlineDef_ImportedEEvv(%struct.MemFunTmpl*)
+template<> __declspec(dllimport) inline void MemFunTmpl::normalDef<ExplicitSpec_InlineDef_Imported>() {}
+USEMF(MemFunTmpl, normalDef<ExplicitSpec_InlineDef_Imported>)
+
+
+// MSC-DAG: declare dllimport void @"\01??$staticDef@UExplicitSpec_Imported@@@MemFunTmpl@@SAXXZ"()
+// GNU-DAG: declare dllimport void @_ZN10MemFunTmpl9staticDefI21ExplicitSpec_ImportedEEvv()
+template<> __declspec(dllimport) void MemFunTmpl::staticDef<ExplicitSpec_Imported>();
+USE(MemFunTmpl::staticDef<ExplicitSpec_Imported>)
+
+// MSC-DAG-FIXME: declare dllimport void @"\01??$staticDef@UExplicitSpec_Def_Imported@@@MemFunTmpl@@SAXXZ"()
+#ifdef MSABI
+//template<> __declspec(dllimport) void MemFunTmpl::staticDef<ExplicitSpec_Def_Imported>() {}
+//USE(MemFunTmpl::staticDef<ExplicitSpec_Def_Imported>)
+#endif
+
+// MSC-DAG: declare dllimport void @"\01??$staticDef@UExplicitSpec_InlineDef_Imported@@@MemFunTmpl@@SAXXZ"()
+// GNU-DAG: declare dllimport void @_ZN10MemFunTmpl9staticDefI31ExplicitSpec_InlineDef_ImportedEEvv()
+template<> __declspec(dllimport) inline void MemFunTmpl::staticDef<ExplicitSpec_InlineDef_Imported>() {}
+USE(MemFunTmpl::staticDef<ExplicitSpec_InlineDef_Imported>)
+
+
+
+struct MemVarTmpl {
+ template<typename T> static const int StaticVar = 1;
+ template<typename T> __declspec(dllimport) static const int ImportedStaticVar = 1;
+};
+
+// Import implicit instantiation of an imported member variable template.
+// MSC-DAG: @"\01??$ImportedStaticVar@UImplicitInst_Imported@@@MemVarTmpl@@2HB" = available_externally dllimport constant i32 1, align 4
+// GNU-DAG: @_ZN10MemVarTmpl17ImportedStaticVarI21ImplicitInst_ImportedEE = external dllimport constant i32
+USEMV(MemVarTmpl, ImportedStaticVar<ImplicitInst_Imported>)
+
+// Import explicit instantiation declaration of an imported member variable
+// template.
+// MSC-DAG: @"\01??$ImportedStaticVar@UExplicitDecl_Imported@@@MemVarTmpl@@2HB" = external dllimport constant i32
+// GNU-DAG: @_ZN10MemVarTmpl17ImportedStaticVarI21ExplicitDecl_ImportedEE = external dllimport constant i32
+extern template const int MemVarTmpl::ImportedStaticVar<ExplicitDecl_Imported>;
+USEMV(MemVarTmpl, ImportedStaticVar<ExplicitDecl_Imported>)
+
+// An explicit instantiation definition of an imported member variable template
+// cannot be imported because the template must be defined which is illegal. The
+// in-class initializer does not count.
+
+// Import specialization of an imported member variable template.
+// MSC-DAG: @"\01??$ImportedStaticVar@UExplicitSpec_Imported@@@MemVarTmpl@@2HB" = external dllimport constant i32
+// GNU-DAG: @_ZN10MemVarTmpl17ImportedStaticVarI21ExplicitSpec_ImportedEE = external dllimport constant i32
+template<> __declspec(dllimport) const int MemVarTmpl::ImportedStaticVar<ExplicitSpec_Imported>;
+USEMV(MemVarTmpl, ImportedStaticVar<ExplicitSpec_Imported>)
+
+// Not importing specialization of a member variable template without explicit
+// dllimport.
+// MSC-DAG: @"\01??$ImportedStaticVar@UExplicitSpec_NotImported@@@MemVarTmpl@@2HB" = external constant i32
+// GNU-DAG: @_ZN10MemVarTmpl17ImportedStaticVarI24ExplicitSpec_NotImportedEE = external constant i32
+template<> const int MemVarTmpl::ImportedStaticVar<ExplicitSpec_NotImported>;
+USEMV(MemVarTmpl, ImportedStaticVar<ExplicitSpec_NotImported>)
+
+
+// Import explicit instantiation declaration of a non-imported member variable
+// template.
+// MSC-DAG: @"\01??$StaticVar@UExplicitDecl_Imported@@@MemVarTmpl@@2HB" = external dllimport constant i32
+// GNU-DAG: @_ZN10MemVarTmpl9StaticVarI21ExplicitDecl_ImportedEE = external dllimport constant i32
+extern template __declspec(dllimport) const int MemVarTmpl::StaticVar<ExplicitDecl_Imported>;
+USEMV(MemVarTmpl, StaticVar<ExplicitDecl_Imported>)
+
+// An explicit instantiation definition of a non-imported member variable template
+// cannot be imported because the template must be defined which is illegal. The
+// in-class initializer does not count.
+
+// Import specialization of a non-imported member variable template.
+// MSC-DAG: @"\01??$StaticVar@UExplicitSpec_Imported@@@MemVarTmpl@@2HB" = external dllimport constant i32
+// GNU-DAG: @_ZN10MemVarTmpl9StaticVarI21ExplicitSpec_ImportedEE = external dllimport constant i32
+template<> __declspec(dllimport) const int MemVarTmpl::StaticVar<ExplicitSpec_Imported>;
+USEMV(MemVarTmpl, StaticVar<ExplicitSpec_Imported>)
diff --git a/test/CodeGenCXX/dllimport-rtti.cpp b/test/CodeGenCXX/dllimport-rtti.cpp
new file mode 100644
index 000000000000..7ed7dadfe402
--- /dev/null
+++ b/test/CodeGenCXX/dllimport-rtti.cpp
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -triple i686-windows-msvc -emit-llvm -std=c++1y -O1 -disable-llvm-optzns -o - %s | FileCheck %s
+
+struct __declspec(dllimport) S {
+ virtual void f();
+} s;
+// CHECK-DAG: @"\01??_7S@@6B@" = available_externally dllimport
+// CHECK-DAG: @"\01??_R0?AUS@@@8" = linkonce_odr
+// CHECK-DAG: @"\01??_R1A@?0A@EA@S@@8" = linkonce_odr
+// CHECK-DAG: @"\01??_R2S@@8" = linkonce_odr
+// CHECK-DAG: @"\01??_R3S@@8" = linkonce_odr
+
+struct U : S {
+} u;
diff --git a/test/CodeGenCXX/dllimport.cpp b/test/CodeGenCXX/dllimport.cpp
new file mode 100644
index 000000000000..59f8f6361619
--- /dev/null
+++ b/test/CodeGenCXX/dllimport.cpp
@@ -0,0 +1,771 @@
+// RUN: %clang_cc1 -triple i686-windows-msvc -fno-rtti -emit-llvm -std=c++1y -O0 -o - %s -DMSABI | FileCheck --check-prefix=MSC --check-prefix=M32 %s
+// RUN: %clang_cc1 -triple x86_64-windows-msvc -fno-rtti -emit-llvm -std=c++1y -O0 -o - %s -DMSABI | FileCheck --check-prefix=MSC --check-prefix=M64 %s
+// RUN: %clang_cc1 -triple i686-windows-gnu -fno-rtti -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU --check-prefix=G32 %s
+// RUN: %clang_cc1 -triple x86_64-windows-gnu -fno-rtti -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU --check-prefix=G64 %s
+// RUN: %clang_cc1 -triple i686-windows-msvc -fno-rtti -emit-llvm -std=c++1y -O1 -o - %s -DMSABI | FileCheck --check-prefix=MO1 %s
+// RUN: %clang_cc1 -triple i686-windows-gnu -fno-rtti -emit-llvm -std=c++1y -O1 -o - %s | FileCheck --check-prefix=GO1 %s
+
+// CHECK-NOT doesn't play nice with CHECK-DAG, so use separate run lines.
+// RUN: %clang_cc1 -triple i686-windows-msvc -fno-rtti -emit-llvm -std=c++1y -O0 -o - %s -DMSABI | FileCheck --check-prefix=MSC2 %s
+// RUN: %clang_cc1 -triple i686-windows-gnu -fno-rtti -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU2 %s
+
+// Helper structs to make templates more expressive.
+struct ImplicitInst_Imported {};
+struct ImplicitInst_NotImported {};
+struct ExplicitDecl_Imported {};
+struct ExplicitInst_Imported {};
+struct ExplicitSpec_Imported {};
+struct ExplicitSpec_Def_Imported {};
+struct ExplicitSpec_InlineDef_Imported {};
+struct ExplicitSpec_NotImported {};
+
+#define JOIN2(x, y) x##y
+#define JOIN(x, y) JOIN2(x, y)
+#define UNIQ(name) JOIN(name, __LINE__)
+#define USEVARTYPE(type, var) type UNIQ(use)() { return var; }
+#define USEVAR(var) USEVARTYPE(int, var)
+#define USE(func) void UNIQ(use)() { func(); }
+#define USEMEMFUNC(class, func) void (class::*UNIQ(use)())() { return &class::func; }
+#define USECLASS(class) void UNIQ(USE)() { class x; }
+#define USECOPYASSIGN(class) class& (class::*UNIQ(use)())(class&) { return &class::operator=; }
+#define USEMOVEASSIGN(class) class& (class::*UNIQ(use)())(class&&) { return &class::operator=; }
+
+//===----------------------------------------------------------------------===//
+// Globals
+//===----------------------------------------------------------------------===//
+
+// Import declaration.
+// MSC-DAG: @"\01?ExternGlobalDecl@@3HA" = external dllimport global i32
+// GNU-DAG: @ExternGlobalDecl = external dllimport global i32
+__declspec(dllimport) extern int ExternGlobalDecl;
+USEVAR(ExternGlobalDecl)
+
+// dllimport implies a declaration.
+// MSC-DAG: @"\01?GlobalDecl@@3HA" = external dllimport global i32
+// GNU-DAG: @GlobalDecl = external dllimport global i32
+__declspec(dllimport) int GlobalDecl;
+USEVAR(GlobalDecl)
+
+// Redeclarations
+// MSC-DAG: @"\01?GlobalRedecl1@@3HA" = external dllimport global i32
+// GNU-DAG: @GlobalRedecl1 = external dllimport global i32
+__declspec(dllimport) extern int GlobalRedecl1;
+__declspec(dllimport) extern int GlobalRedecl1;
+USEVAR(GlobalRedecl1)
+
+// MSC-DAG: @"\01?GlobalRedecl2a@@3HA" = external dllimport global i32
+// GNU-DAG: @GlobalRedecl2a = external dllimport global i32
+__declspec(dllimport) int GlobalRedecl2a;
+__declspec(dllimport) int GlobalRedecl2a;
+USEVAR(GlobalRedecl2a)
+
+// M32-DAG: @"\01?GlobalRedecl2b@@3PAHA" = external dllimport global i32*
+// M64-DAG: @"\01?GlobalRedecl2b@@3PEAHEA" = external dllimport global i32*
+// GNU-DAG: @GlobalRedecl2b = external dllimport global i32*
+int *__attribute__((dllimport)) GlobalRedecl2b;
+int *__attribute__((dllimport)) GlobalRedecl2b;
+USEVARTYPE(int*, GlobalRedecl2b)
+
+// MSC-DAG: @"\01?GlobalRedecl2c@@3HA" = external dllimport global i32
+// GNU-DAG: @GlobalRedecl2c = external dllimport global i32
+int GlobalRedecl2c __attribute__((dllimport));
+int GlobalRedecl2c __attribute__((dllimport));
+USEVAR(GlobalRedecl2c)
+
+// NB: MSC issues a warning and makes GlobalRedecl3 dllexport. We follow GCC
+// and drop the dllimport with a warning.
+// MSC-DAG: @"\01?GlobalRedecl3@@3HA" = external global i32
+// GNU-DAG: @GlobalRedecl3 = external global i32
+__declspec(dllimport) extern int GlobalRedecl3;
+ extern int GlobalRedecl3; // dllimport ignored
+USEVAR(GlobalRedecl3)
+
+// MSC-DAG: @"\01?ExternalGlobal@ns@@3HA" = external dllimport global i32
+// GNU-DAG: @_ZN2ns14ExternalGlobalE = external dllimport global i32
+namespace ns { __declspec(dllimport) int ExternalGlobal; }
+USEVAR(ns::ExternalGlobal)
+
+int f();
+// MO1-DAG: @"\01?x@?1??inlineStaticLocalsFunc@@YAHXZ@4HA" = available_externally dllimport global i32 0
+// MO1-DAG: @"\01??_B?1??inlineStaticLocalsFunc@@YAHXZ@51" = available_externally dllimport global i32 0
+inline int __declspec(dllimport) inlineStaticLocalsFunc() {
+ static int x = f();
+ return x++;
+};
+USE(inlineStaticLocalsFunc);
+
+// The address of a dllimport global cannot be used in constant initialization.
+// M32-DAG: @"\01?arr@?0??initializationFunc@@YAPAHXZ@4QBQAHB" = internal global [1 x i32*] zeroinitializer
+// GNU-DAG: @_ZZ18initializationFuncvE3arr = internal global [1 x i32*] zeroinitializer
+int *initializationFunc() {
+ static int *const arr[] = {&ExternGlobalDecl};
+ return arr[0];
+}
+USE(initializationFunc);
+
+
+//===----------------------------------------------------------------------===//
+// Variable templates
+//===----------------------------------------------------------------------===//
+
+// Import declaration.
+// MSC-DAG: @"\01??$ExternVarTmplDecl@UImplicitInst_Imported@@@@3HA" = external dllimport global i32
+// GNU-DAG: @_Z17ExternVarTmplDeclI21ImplicitInst_ImportedE = external dllimport global i32
+template<typename T> __declspec(dllimport) extern int ExternVarTmplDecl;
+USEVAR(ExternVarTmplDecl<ImplicitInst_Imported>)
+
+// dllimport implies a declaration.
+// MSC-DAG: @"\01??$VarTmplDecl@UImplicitInst_Imported@@@@3HA" = external dllimport global i32
+// GNU-DAG: @_Z11VarTmplDeclI21ImplicitInst_ImportedE = external dllimport global i32
+template<typename T> __declspec(dllimport) int VarTmplDecl;
+USEVAR(VarTmplDecl<ImplicitInst_Imported>)
+
+// Redeclarations
+// MSC-DAG: @"\01??$VarTmplRedecl1@UImplicitInst_Imported@@@@3HA" = external dllimport global i32
+// GNU-DAG: @_Z14VarTmplRedecl1I21ImplicitInst_ImportedE = external dllimport global i32
+template<typename T> __declspec(dllimport) extern int VarTmplRedecl1;
+template<typename T> __declspec(dllimport) extern int VarTmplRedecl1;
+USEVAR(VarTmplRedecl1<ImplicitInst_Imported>)
+
+// MSC-DAG: @"\01??$VarTmplRedecl2@UImplicitInst_Imported@@@@3HA" = external dllimport global i32
+// GNU-DAG: @_Z14VarTmplRedecl2I21ImplicitInst_ImportedE = external dllimport global i32
+template<typename T> __declspec(dllimport) int VarTmplRedecl2;
+template<typename T> __declspec(dllimport) int VarTmplRedecl2;
+USEVAR(VarTmplRedecl2<ImplicitInst_Imported>)
+
+// MSC-DAG: @"\01??$VarTmplRedecl3@UImplicitInst_Imported@@@@3HA" = external global i32
+// GNU-DAG: @_Z14VarTmplRedecl3I21ImplicitInst_ImportedE = external global i32
+template<typename T> __declspec(dllimport) extern int VarTmplRedecl3;
+template<typename T> extern int VarTmplRedecl3; // dllimport ignored
+USEVAR(VarTmplRedecl3<ImplicitInst_Imported>)
+
+
+// MSC-DAG: @"\01??$ExternalVarTmpl@UImplicitInst_Imported@@@ns@@3HA" = external dllimport global i32
+// GNU-DAG: @_ZN2ns15ExternalVarTmplI21ImplicitInst_ImportedEE = external dllimport global i32
+namespace ns { template<typename T> __declspec(dllimport) int ExternalVarTmpl; }
+USEVAR(ns::ExternalVarTmpl<ImplicitInst_Imported>)
+
+
+template<typename T> int VarTmpl;
+template<typename T> __declspec(dllimport) int ImportedVarTmpl;
+
+// Import implicit instantiation of an imported variable template.
+// MSC-DAG: @"\01??$ImportedVarTmpl@UImplicitInst_Imported@@@@3HA" = external dllimport global i32
+// GNU-DAG: @_Z15ImportedVarTmplI21ImplicitInst_ImportedE = external dllimport global i32
+USEVAR(ImportedVarTmpl<ImplicitInst_Imported>)
+
+// Import explicit instantiation declaration of an imported variable template.
+// MSC-DAG: @"\01??$ImportedVarTmpl@UExplicitDecl_Imported@@@@3HA" = external dllimport global i32
+// GNU-DAG: @_Z15ImportedVarTmplI21ExplicitDecl_ImportedE = external dllimport global i32
+extern template int ImportedVarTmpl<ExplicitDecl_Imported>;
+USEVAR(ImportedVarTmpl<ExplicitDecl_Imported>)
+
+// An explicit instantiation definition of an imported variable template cannot
+// be imported because the template must be defined which is illegal.
+
+// Import specialization of an imported variable template.
+// MSC-DAG: @"\01??$ImportedVarTmpl@UExplicitSpec_Imported@@@@3HA" = external dllimport global i32
+// GNU-DAG: @_Z15ImportedVarTmplI21ExplicitSpec_ImportedE = external dllimport global i32
+template<> __declspec(dllimport) int ImportedVarTmpl<ExplicitSpec_Imported>;
+USEVAR(ImportedVarTmpl<ExplicitSpec_Imported>)
+
+// Not importing specialization of an imported variable template without
+// explicit dllimport.
+// MSC-DAG: @"\01??$ImportedVarTmpl@UExplicitSpec_NotImported@@@@3HA" = global i32 0, align 4
+// GNU-DAG: @_Z15ImportedVarTmplI24ExplicitSpec_NotImportedE = global i32 0, align 4
+template<> int ImportedVarTmpl<ExplicitSpec_NotImported>;
+USEVAR(ImportedVarTmpl<ExplicitSpec_NotImported>)
+
+// Import explicit instantiation declaration of a non-imported variable template.
+// MSC-DAG: @"\01??$VarTmpl@UExplicitDecl_Imported@@@@3HA" = external dllimport global i32
+// GNU-DAG: @_Z7VarTmplI21ExplicitDecl_ImportedE = external dllimport global i32
+extern template __declspec(dllimport) int VarTmpl<ExplicitDecl_Imported>;
+USEVAR(VarTmpl<ExplicitDecl_Imported>)
+
+// Import explicit instantiation definition of a non-imported variable template.
+// MSC-DAG: @"\01??$VarTmpl@UExplicitInst_Imported@@@@3HA" = external dllimport global i32
+// GNU-DAG: @_Z7VarTmplI21ExplicitInst_ImportedE = external dllimport global i32
+template __declspec(dllimport) int VarTmpl<ExplicitInst_Imported>;
+USEVAR(VarTmpl<ExplicitInst_Imported>)
+
+// Import specialization of a non-imported variable template.
+// MSC-DAG: @"\01??$VarTmpl@UExplicitSpec_Imported@@@@3HA" = external dllimport global i32
+// GNU-DAG: @_Z7VarTmplI21ExplicitSpec_ImportedE = external dllimport global i32
+template<> __declspec(dllimport) int VarTmpl<ExplicitSpec_Imported>;
+USEVAR(VarTmpl<ExplicitSpec_Imported>)
+
+
+
+//===----------------------------------------------------------------------===//
+// Functions
+//===----------------------------------------------------------------------===//
+
+// Import function declaration.
+// MSC-DAG: declare dllimport void @"\01?decl@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z4declv()
+__declspec(dllimport) void decl();
+USE(decl)
+
+// extern "C"
+// MSC-DAG: declare dllimport void @externC()
+// GNU-DAG: declare dllimport void @externC()
+extern "C" __declspec(dllimport) void externC();
+USE(externC)
+
+// Import inline function.
+// MSC-DAG: declare dllimport void @"\01?inlineFunc@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z10inlineFuncv()
+// MO1-DAG: define available_externally dllimport void @"\01?inlineFunc@@YAXXZ"()
+// GO1-DAG: define available_externally dllimport void @_Z10inlineFuncv()
+__declspec(dllimport) inline void inlineFunc() {}
+USE(inlineFunc)
+
+// MSC-DAG: declare dllimport void @"\01?inlineDecl@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z10inlineDeclv()
+// MO1-DAG: define available_externally dllimport void @"\01?inlineDecl@@YAXXZ"()
+// GO1-DAG: define available_externally dllimport void @_Z10inlineDeclv()
+__declspec(dllimport) inline void inlineDecl();
+ void inlineDecl() {}
+USE(inlineDecl)
+
+// MSC-DAG: declare dllimport void @"\01?inlineDef@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z9inlineDefv()
+// MO1-DAG: define available_externally dllimport void @"\01?inlineDef@@YAXXZ"()
+// GO1-DAG: define available_externally dllimport void @_Z9inlineDefv()
+__declspec(dllimport) void inlineDef();
+ inline void inlineDef() {}
+USE(inlineDef)
+
+// inline attributes
+// MSC-DAG: declare dllimport void @"\01?noinline@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z8noinlinev()
+__declspec(dllimport) __attribute__((noinline)) inline void noinline() {}
+USE(noinline)
+
+// MSC2-NOT: @"\01?alwaysInline@@YAXXZ"()
+// GNU2-NOT: @_Z12alwaysInlinev()
+__declspec(dllimport) __attribute__((always_inline)) inline void alwaysInline() {}
+USE(alwaysInline)
+
+// Redeclarations
+// MSC-DAG: declare dllimport void @"\01?redecl1@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z7redecl1v()
+__declspec(dllimport) void redecl1();
+__declspec(dllimport) void redecl1();
+USE(redecl1)
+
+// NB: MSC issues a warning and makes redecl2/redecl3 dllexport. We follow GCC
+// and drop the dllimport with a warning.
+// MSC-DAG: declare void @"\01?redecl2@@YAXXZ"()
+// GNU-DAG: declare void @_Z7redecl2v()
+__declspec(dllimport) void redecl2();
+ void redecl2();
+USE(redecl2)
+
+// MSC-DAG: define void @"\01?redecl3@@YAXXZ"()
+// GNU-DAG: define void @_Z7redecl3v()
+__declspec(dllimport) void redecl3();
+ void redecl3() {} // dllimport ignored
+USE(redecl3)
+
+
+// Friend functions
+// MSC-DAG: declare dllimport void @"\01?friend1@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z7friend1v()
+// MSC-DAG: declare void @"\01?friend2@@YAXXZ"()
+// GNU-DAG: declare void @_Z7friend2v()
+// MSC-DAG: define void @"\01?friend3@@YAXXZ"()
+// GNU-DAG: define void @_Z7friend3v()
+struct FuncFriend {
+ friend __declspec(dllimport) void friend1();
+ friend __declspec(dllimport) void friend2();
+ friend __declspec(dllimport) void friend3();
+};
+__declspec(dllimport) void friend1();
+ void friend2(); // dllimport ignored
+ void friend3() {} // dllimport ignored
+USE(friend1)
+USE(friend2)
+USE(friend3)
+
+// Implicit declarations can be redeclared with dllimport.
+// MSC-DAG: declare dllimport noalias i8* @"\01??2@{{YAPAXI|YAPEAX_K}}@Z"(
+// GNU-DAG: declare dllimport noalias i8* @_Znw{{[yj]}}(
+__declspec(dllimport) void* operator new(__SIZE_TYPE__ n);
+void UNIQ(use)() { ::operator new(42); }
+
+// MSC-DAG: declare dllimport void @"\01?externalFunc@ns@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_ZN2ns12externalFuncEv()
+namespace ns { __declspec(dllimport) void externalFunc(); }
+USE(ns::externalFunc)
+
+
+
+//===----------------------------------------------------------------------===//
+// Function templates
+//===----------------------------------------------------------------------===//
+
+// Import function template declaration.
+// MSC-DAG: declare dllimport void @"\01??$funcTmplDecl@UImplicitInst_Imported@@@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z12funcTmplDeclI21ImplicitInst_ImportedEvv()
+template<typename T> __declspec(dllimport) void funcTmplDecl();
+USE(funcTmplDecl<ImplicitInst_Imported>)
+
+// Function template definitions cannot be imported.
+
+// Import inline function template.
+// MSC-DAG: declare dllimport void @"\01??$inlineFuncTmpl1@UImplicitInst_Imported@@@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z15inlineFuncTmpl1I21ImplicitInst_ImportedEvv()
+// MO1-DAG: define available_externally dllimport void @"\01??$inlineFuncTmpl1@UImplicitInst_Imported@@@@YAXXZ"()
+// GO1-DAG: define available_externally dllimport void @_Z15inlineFuncTmpl1I21ImplicitInst_ImportedEvv()
+template<typename T> __declspec(dllimport) inline void inlineFuncTmpl1() {}
+USE(inlineFuncTmpl1<ImplicitInst_Imported>)
+
+// MSC-DAG: declare dllimport void @"\01??$inlineFuncTmpl2@UImplicitInst_Imported@@@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z15inlineFuncTmpl2I21ImplicitInst_ImportedEvv()
+// MO1-DAG: define available_externally dllimport void @"\01??$inlineFuncTmpl2@UImplicitInst_Imported@@@@YAXXZ"()
+// GO1-DAG: define available_externally dllimport void @_Z15inlineFuncTmpl2I21ImplicitInst_ImportedEvv()
+template<typename T> inline void __attribute__((dllimport)) inlineFuncTmpl2() {}
+USE(inlineFuncTmpl2<ImplicitInst_Imported>)
+
+// MSC-DAG: declare dllimport void @"\01??$inlineFuncTmplDecl@UImplicitInst_Imported@@@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z18inlineFuncTmplDeclI21ImplicitInst_ImportedEvv()
+// MO1-DAG: define available_externally dllimport void @"\01??$inlineFuncTmplDecl@UImplicitInst_Imported@@@@YAXXZ"()
+// GO1-DAG: define available_externally dllimport void @_Z18inlineFuncTmplDeclI21ImplicitInst_ImportedEvv()
+template<typename T> __declspec(dllimport) inline void inlineFuncTmplDecl();
+template<typename T> void inlineFuncTmplDecl() {}
+USE(inlineFuncTmplDecl<ImplicitInst_Imported>)
+
+// MSC-DAG: declare dllimport void @"\01??$inlineFuncTmplDef@UImplicitInst_Imported@@@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z17inlineFuncTmplDefI21ImplicitInst_ImportedEvv()
+// MO1-DAG: define available_externally dllimport void @"\01??$inlineFuncTmplDef@UImplicitInst_Imported@@@@YAXXZ"()
+// GO1-DAG: define available_externally dllimport void @_Z17inlineFuncTmplDefI21ImplicitInst_ImportedEvv()
+template<typename T> __declspec(dllimport) void inlineFuncTmplDef();
+template<typename T> inline void inlineFuncTmplDef() {}
+USE(inlineFuncTmplDef<ImplicitInst_Imported>)
+
+
+// Redeclarations
+// MSC-DAG: declare dllimport void @"\01??$funcTmplRedecl1@UImplicitInst_Imported@@@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z15funcTmplRedecl1I21ImplicitInst_ImportedEvv()
+template<typename T> __declspec(dllimport) void funcTmplRedecl1();
+template<typename T> __declspec(dllimport) void funcTmplRedecl1();
+USE(funcTmplRedecl1<ImplicitInst_Imported>)
+
+// MSC-DAG: declare void @"\01??$funcTmplRedecl2@UImplicitInst_NotImported@@@@YAXXZ"()
+// GNU-DAG: declare void @_Z15funcTmplRedecl2I24ImplicitInst_NotImportedEvv()
+template<typename T> __declspec(dllimport) void funcTmplRedecl2();
+template<typename T> void funcTmplRedecl2(); // dllimport ignored
+USE(funcTmplRedecl2<ImplicitInst_NotImported>)
+
+// MSC-DAG: define linkonce_odr void @"\01??$funcTmplRedecl3@UImplicitInst_NotImported@@@@YAXXZ"()
+// GNU-DAG: define linkonce_odr void @_Z15funcTmplRedecl3I24ImplicitInst_NotImportedEvv()
+template<typename T> __declspec(dllimport) void funcTmplRedecl3();
+template<typename T> void funcTmplRedecl3() {} // dllimport ignored
+USE(funcTmplRedecl3<ImplicitInst_NotImported>)
+
+
+// Function template friends
+// MSC-DAG: declare dllimport void @"\01??$funcTmplFriend1@UImplicitInst_Imported@@@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z15funcTmplFriend1I21ImplicitInst_ImportedEvv()
+// MSC-DAG: declare void @"\01??$funcTmplFriend2@UImplicitInst_NotImported@@@@YAXXZ"()
+// GNU-DAG: declare void @_Z15funcTmplFriend2I24ImplicitInst_NotImportedEvv()
+// MSC-DAG: define linkonce_odr void @"\01??$funcTmplFriend3@UImplicitInst_NotImported@@@@YAXXZ"()
+// GNU-DAG: define linkonce_odr void @_Z15funcTmplFriend3I24ImplicitInst_NotImportedEvv()
+// MSC-DAG: declare dllimport void @"\01??$funcTmplFriend4@UImplicitInst_Imported@@@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z15funcTmplFriend4I21ImplicitInst_ImportedEvv()
+struct FuncTmplFriend {
+ template<typename T> friend __declspec(dllimport) void funcTmplFriend1();
+ template<typename T> friend __declspec(dllimport) void funcTmplFriend2();
+ template<typename T> friend __declspec(dllimport) void funcTmplFriend3();
+ template<typename T> friend __declspec(dllimport) inline void funcTmplFriend4();
+};
+template<typename T> __declspec(dllimport) void funcTmplFriend1();
+template<typename T> void funcTmplFriend2(); // dllimport ignored
+template<typename T> void funcTmplFriend3() {} // dllimport ignored
+template<typename T> inline void funcTmplFriend4() {}
+USE(funcTmplFriend1<ImplicitInst_Imported>)
+USE(funcTmplFriend2<ImplicitInst_NotImported>)
+USE(funcTmplFriend3<ImplicitInst_NotImported>)
+USE(funcTmplFriend4<ImplicitInst_Imported>)
+
+// MSC-DAG: declare dllimport void @"\01??$externalFuncTmpl@UImplicitInst_Imported@@@ns@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_ZN2ns16externalFuncTmplI21ImplicitInst_ImportedEEvv()
+namespace ns { template<typename T> __declspec(dllimport) void externalFuncTmpl(); }
+USE(ns::externalFuncTmpl<ImplicitInst_Imported>)
+
+
+template<typename T> void funcTmpl() {}
+template<typename T> inline void inlineFuncTmpl() {}
+template<typename T> __declspec(dllimport) void importedFuncTmplDecl();
+template<typename T> __declspec(dllimport) inline void importedFuncTmpl() {}
+
+// Import implicit instantiation of an imported function template.
+// MSC-DAG: declare dllimport void @"\01??$importedFuncTmplDecl@UImplicitInst_Imported@@@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z20importedFuncTmplDeclI21ImplicitInst_ImportedEvv()
+USE(importedFuncTmplDecl<ImplicitInst_Imported>)
+
+// MSC-DAG: declare dllimport void @"\01??$importedFuncTmpl@UImplicitInst_Imported@@@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z16importedFuncTmplI21ImplicitInst_ImportedEvv()
+// MO1-DAG: define available_externally dllimport void @"\01??$importedFuncTmpl@UImplicitInst_Imported@@@@YAXXZ"()
+// GO1-DAG: define available_externally dllimport void @_Z16importedFuncTmplI21ImplicitInst_ImportedEvv()
+USE(importedFuncTmpl<ImplicitInst_Imported>)
+
+// Import explicit instantiation declaration of an imported function template.
+// MSC-DAG: declare dllimport void @"\01??$importedFuncTmpl@UExplicitDecl_Imported@@@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z16importedFuncTmplI21ExplicitDecl_ImportedEvv()
+// MO1-DAG: define available_externally dllimport void @"\01??$importedFuncTmpl@UExplicitDecl_Imported@@@@YAXXZ"()
+// GO1-DAG: define available_externally dllimport void @_Z16importedFuncTmplI21ExplicitDecl_ImportedEvv()
+extern template void importedFuncTmpl<ExplicitDecl_Imported>();
+USE(importedFuncTmpl<ExplicitDecl_Imported>)
+
+// Import explicit instantiation definition of an imported function template.
+// MSC-DAG: declare dllimport void @"\01??$importedFuncTmpl@UExplicitInst_Imported@@@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z16importedFuncTmplI21ExplicitInst_ImportedEvv()
+// MO1-DAG: define available_externally dllimport void @"\01??$importedFuncTmpl@UExplicitInst_Imported@@@@YAXXZ"()
+// GO1-DAG: define available_externally dllimport void @_Z16importedFuncTmplI21ExplicitInst_ImportedEvv()
+template void importedFuncTmpl<ExplicitInst_Imported>();
+USE(importedFuncTmpl<ExplicitInst_Imported>)
+
+
+// Import specialization of an imported function template.
+// MSC-DAG: declare dllimport void @"\01??$importedFuncTmplDecl@UExplicitSpec_Imported@@@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z20importedFuncTmplDeclI21ExplicitSpec_ImportedEvv()
+template<> __declspec(dllimport) void importedFuncTmplDecl<ExplicitSpec_Imported>();
+USE(importedFuncTmplDecl<ExplicitSpec_Imported>)
+
+// MSC-DAG-FIXME: declare dllimport void @"\01??$importedFuncTmplDecl@UExplicitSpec_Def_Imported@@@@YAXXZ"()
+// MO1-DAG-FIXME: define available_externally dllimport void @"\01??$importedFuncTmplDecl@UExplicitSpec_Def_Imported@@@@YAXXZ"()
+#ifdef MSABI
+//template<> __declspec(dllimport) void importedFuncTmplDecl<ExplicitSpec_Def_Imported>() {}
+//USE(importedFuncTmplDecl<ExplicitSpec_Def_Imported>)
+#endif
+
+// MSC-DAG: declare dllimport void @"\01??$importedFuncTmplDecl@UExplicitSpec_InlineDef_Imported@@@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z20importedFuncTmplDeclI31ExplicitSpec_InlineDef_ImportedEvv()
+// MO1-DAG: define available_externally dllimport void @"\01??$importedFuncTmplDecl@UExplicitSpec_InlineDef_Imported@@@@YAXXZ"()
+// GO1-DAG: define available_externally dllimport void @_Z20importedFuncTmplDeclI31ExplicitSpec_InlineDef_ImportedEvv()
+template<> __declspec(dllimport) inline void importedFuncTmplDecl<ExplicitSpec_InlineDef_Imported>() {}
+USE(importedFuncTmplDecl<ExplicitSpec_InlineDef_Imported>)
+
+
+// MSC-DAG: declare dllimport void @"\01??$importedFuncTmpl@UExplicitSpec_Imported@@@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z16importedFuncTmplI21ExplicitSpec_ImportedEvv()
+template<> __declspec(dllimport) void importedFuncTmpl<ExplicitSpec_Imported>();
+USE(importedFuncTmpl<ExplicitSpec_Imported>)
+
+// MSC-DAG-FIXME: declare dllimport void @"\01??$importedFuncTmpl@UExplicitSpec_Def_Imported@@@@YAXXZ"()
+// MO1-DAG-FIXME: define available_externally dllimport void @"\01??$importedFuncTmpl@UExplicitSpec_Def_Imported@@@@YAXXZ"()
+#ifdef MSABI
+//template<> __declspec(dllimport) void importedFuncTmpl<ExplicitSpec_Def_Imported>() {}
+//USE(importedFuncTmpl<ExplicitSpec_Def_Imported>)
+#endif
+
+// MSC-DAG: declare dllimport void @"\01??$importedFuncTmpl@UExplicitSpec_InlineDef_Imported@@@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z16importedFuncTmplI31ExplicitSpec_InlineDef_ImportedEvv()
+// MO1-DAG: define available_externally dllimport void @"\01??$importedFuncTmpl@UExplicitSpec_InlineDef_Imported@@@@YAXXZ"()
+// GO1-DAG: define available_externally dllimport void @_Z16importedFuncTmplI31ExplicitSpec_InlineDef_ImportedEvv()
+template<> __declspec(dllimport) inline void importedFuncTmpl<ExplicitSpec_InlineDef_Imported>() {}
+USE(importedFuncTmpl<ExplicitSpec_InlineDef_Imported>)
+
+
+// Not importing specialization of an imported function template without
+// explicit dllimport.
+// MSC-DAG: define void @"\01??$importedFuncTmpl@UExplicitSpec_NotImported@@@@YAXXZ"()
+// GNU-DAG: define void @_Z16importedFuncTmplI24ExplicitSpec_NotImportedEvv()
+template<> void importedFuncTmpl<ExplicitSpec_NotImported>() {}
+USE(importedFuncTmpl<ExplicitSpec_NotImported>)
+
+
+// Import explicit instantiation declaration of a non-imported function template.
+// MSC-DAG: declare dllimport void @"\01??$funcTmpl@UExplicitDecl_Imported@@@@YAXXZ"()
+// MSC-DAG: declare dllimport void @"\01??$inlineFuncTmpl@UExplicitDecl_Imported@@@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z8funcTmplI21ExplicitDecl_ImportedEvv()
+// GNU-DAG: declare dllimport void @_Z14inlineFuncTmplI21ExplicitDecl_ImportedEvv()
+// MO1-DAG: define available_externally dllimport void @"\01??$inlineFuncTmpl@UExplicitDecl_Imported@@@@YAXXZ"()
+// GO1-DAG: define available_externally dllimport void @_Z14inlineFuncTmplI21ExplicitDecl_ImportedEvv()
+extern template __declspec(dllimport) void funcTmpl<ExplicitDecl_Imported>();
+extern template __declspec(dllimport) void inlineFuncTmpl<ExplicitDecl_Imported>();
+USE(funcTmpl<ExplicitDecl_Imported>)
+USE(inlineFuncTmpl<ExplicitDecl_Imported>)
+
+
+// Import explicit instantiation definition of a non-imported function template.
+// MSC-DAG: declare dllimport void @"\01??$funcTmpl@UExplicitInst_Imported@@@@YAXXZ"()
+// MSC-DAG: declare dllimport void @"\01??$inlineFuncTmpl@UExplicitInst_Imported@@@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z8funcTmplI21ExplicitInst_ImportedEvv()
+// GNU-DAG: declare dllimport void @_Z14inlineFuncTmplI21ExplicitInst_ImportedEvv()
+// MO1-DAG: define available_externally dllimport void @"\01??$funcTmpl@UExplicitInst_Imported@@@@YAXXZ"()
+// MO1-DAG: define available_externally dllimport void @"\01??$inlineFuncTmpl@UExplicitInst_Imported@@@@YAXXZ"()
+// GO1-DAG: define available_externally dllimport void @_Z8funcTmplI21ExplicitInst_ImportedEvv()
+// GO1-DAG: define available_externally dllimport void @_Z14inlineFuncTmplI21ExplicitInst_ImportedEvv()
+template __declspec(dllimport) void funcTmpl<ExplicitInst_Imported>();
+template __declspec(dllimport) void inlineFuncTmpl<ExplicitInst_Imported>();
+USE(funcTmpl<ExplicitInst_Imported>)
+USE(inlineFuncTmpl<ExplicitInst_Imported>)
+
+
+// Import specialization of a non-imported function template.
+// MSC-DAG: declare dllimport void @"\01??$funcTmpl@UExplicitSpec_Imported@@@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z8funcTmplI21ExplicitSpec_ImportedEvv()
+template<> __declspec(dllimport) void funcTmpl<ExplicitSpec_Imported>();
+USE(funcTmpl<ExplicitSpec_Imported>)
+
+// MSC-DAG-FIXME: declare dllimport void @"\01??$funcTmpl@UExplicitSpec_Def_Imported@@@@YAXXZ"()
+// MO1-DAG-FIXME: define available_externally dllimport void @"\01??$funcTmpl@UExplicitSpec_Def_Imported@@@@YAXXZ"()
+#ifdef MSABI
+//template<> __declspec(dllimport) void funcTmpl<ExplicitSpec_Def_Imported>() {}
+//USE(funcTmpl<ExplicitSpec_Def_Imported>)
+#endif
+
+// MSC-DAG: declare dllimport void @"\01??$funcTmpl@UExplicitSpec_InlineDef_Imported@@@@YAXXZ"()
+// GNU-DAG: declare dllimport void @_Z8funcTmplI31ExplicitSpec_InlineDef_ImportedEvv()
+// MO1-DAG: define available_externally dllimport void @"\01??$funcTmpl@UExplicitSpec_InlineDef_Imported@@@@YAXXZ"()
+// GO1-DAG: define available_externally dllimport void @_Z8funcTmplI31ExplicitSpec_InlineDef_ImportedEvv()
+template<> __declspec(dllimport) inline void funcTmpl<ExplicitSpec_InlineDef_Imported>() {}
+USE(funcTmpl<ExplicitSpec_InlineDef_Imported>)
+
+
+
+//===----------------------------------------------------------------------===//
+// Classes
+//===----------------------------------------------------------------------===//
+
+struct __declspec(dllimport) T {
+ void a() {}
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?a@T@@QAEXXZ"
+
+ static int b;
+ // MO1-DAG: @"\01?b@T@@2HA" = external dllimport global i32
+
+ T& operator=(T&) = default;
+ // MO1-DAG: define available_externally dllimport x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.T* @"\01??4T@@QAEAAU0@AAU0@@Z"
+
+ T& operator=(T&&) = default;
+ // Note: Don't mark inline move operators dllimport because current MSVC versions don't export them.
+ // MO1-DAG: define linkonce_odr x86_thiscallcc dereferenceable({{[0-9]+}}) %struct.T* @"\01??4T@@QAEAAU0@$$QAU0@@Z"
+};
+USEMEMFUNC(T, a)
+USEVAR(T::b)
+USECOPYASSIGN(T)
+USEMOVEASSIGN(T)
+
+template <typename T> struct __declspec(dllimport) U { void foo() {} };
+// MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01?foo@?$U@H@@QAEXXZ"
+struct __declspec(dllimport) V : public U<int> { };
+USEMEMFUNC(V, foo)
+
+struct __declspec(dllimport) W { virtual void foo() {} };
+USECLASS(W)
+// vftable:
+// MO1-DAG: @"\01??_7W@@6B@" = available_externally dllimport unnamed_addr constant [1 x i8*] [i8* bitcast (void (%struct.W*)* @"\01?foo@W@@UAEXXZ" to i8*)]
+// GO1-DAG: @_ZTV1W = available_externally dllimport unnamed_addr constant [3 x i8*] [i8* null, i8* null, i8* bitcast (void (%struct.W*)* @_ZN1W3fooEv to i8*)]
+
+struct __declspec(dllimport) KeyFuncClass {
+ constexpr KeyFuncClass() {}
+ virtual void foo();
+};
+constexpr KeyFuncClass keyFuncClassVar;
+// G32-DAG: @_ZTV12KeyFuncClass = external dllimport unnamed_addr constant [3 x i8*]
+
+struct __declspec(dllimport) X : public virtual W {};
+USECLASS(X)
+// vbtable:
+// MO1-DAG: @"\01??_8X@@7B@" = available_externally dllimport unnamed_addr constant [2 x i32] [i32 0, i32 4]
+
+struct __declspec(dllimport) Y {
+ int x;
+};
+
+struct __declspec(dllimport) Z { virtual ~Z() {} };
+USECLASS(Z)
+// User-defined dtor:
+// MO1-DAG: define available_externally dllimport x86_thiscallcc void @"\01??1Z@@UAE@XZ"
+
+namespace DontUseDtorAlias {
+ struct __declspec(dllimport) A { ~A(); };
+ struct __declspec(dllimport) B : A { ~B(); };
+ inline A::~A() { }
+ inline B::~B() { }
+ // Emit a real definition of B's constructor; don't alias it to A's.
+ // MO1-DAG: available_externally dllimport x86_thiscallcc void @"\01??1B@DontUseDtorAlias@@QAE@XZ"
+ USECLASS(B)
+}
+
+namespace Vtordisp {
+ // Don't dllimport the vtordisp.
+ // MO1-DAG: define linkonce_odr x86_thiscallcc void @"\01?f@?$C@D@Vtordisp@@$4PPPPPPPM@A@AEXXZ"
+
+ class Base {
+ virtual void f() {}
+ };
+ template <typename T>
+ class __declspec(dllimport) C : virtual public Base {
+ public:
+ C() {}
+ virtual void f() {}
+ };
+ template class C<char>;
+}
+
+namespace ClassTemplateStaticDef {
+ // Regular template static field:
+ template <typename T> struct __declspec(dllimport) S {
+ static int x;
+ };
+ template <typename T> int S<T>::x;
+ // MSC-DAG: @"\01?x@?$S@H@ClassTemplateStaticDef@@2HA" = available_externally dllimport global i32 0
+ int f() { return S<int>::x; }
+
+ // Partial class template specialization static field:
+ template <typename A> struct T;
+ template <typename A> struct __declspec(dllimport) T<A*> {
+ static int x;
+ };
+ template <typename A> int T<A*>::x;
+ // GNU-DAG: @_ZN22ClassTemplateStaticDef1TIPvE1xE = available_externally dllimport global i32 0
+ int g() { return T<void*>::x; }
+}
+
+namespace PR19933 {
+// Don't dynamically initialize dllimport vars.
+// MSC2-NOT: @llvm.global_ctors
+// GNU2-NOT: @llvm.global_ctors
+
+ struct NonPOD { NonPOD(); };
+ template <typename T> struct A { static NonPOD x; };
+ template <typename T> NonPOD A<T>::x;
+ template struct __declspec(dllimport) A<int>;
+ // MSC-DAG: @"\01?x@?$A@H@PR19933@@2UNonPOD@2@A" = available_externally dllimport global %"struct.PR19933::NonPOD" zeroinitializer
+
+ int f();
+ template <typename T> struct B { static int x; };
+ template <typename T> int B<T>::x = f();
+ template struct __declspec(dllimport) B<int>;
+ // MSC-DAG: @"\01?x@?$B@H@PR19933@@2HA" = available_externally dllimport global i32 0
+
+ constexpr int g() { return 42; }
+ template <typename T> struct C { static int x; };
+ template <typename T> int C<T>::x = g();
+ template struct __declspec(dllimport) C<int>;
+ // MSC-DAG: @"\01?x@?$C@H@PR19933@@2HA" = available_externally dllimport global i32 42
+
+ template <int I> struct D { static int x, y; };
+ template <int I> int D<I>::x = I + 1;
+ template <int I> int D<I>::y = I + f();
+ template struct __declspec(dllimport) D<42>;
+ // MSC-DAG: @"\01?x@?$D@$0CK@@PR19933@@2HA" = available_externally dllimport global i32 43
+ // MSC-DAG: @"\01?y@?$D@$0CK@@PR19933@@2HA" = available_externally dllimport global i32 0
+}
+
+// MS ignores DLL attributes on partial specializations.
+template <typename T> struct PartiallySpecializedClassTemplate {};
+template <typename T> struct __declspec(dllimport) PartiallySpecializedClassTemplate<T*> { void f() {} };
+USEMEMFUNC(PartiallySpecializedClassTemplate<void*>, f);
+// M32-DAG: define linkonce_odr x86_thiscallcc void @"\01?f@?$PartiallySpecializedClassTemplate@PAX@@QAEXXZ"
+// G32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @_ZN33PartiallySpecializedClassTemplateIPvE1fEv
+
+template <typename T> struct ExplicitlySpecializedClassTemplate {};
+template <> struct __declspec(dllimport) ExplicitlySpecializedClassTemplate<void*> { void f() {} };
+USEMEMFUNC(ExplicitlySpecializedClassTemplate<void*>, f);
+// M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"\01?f@?$ExplicitlySpecializedClassTemplate@PAX@@QAEXXZ"
+// G32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @_ZN34ExplicitlySpecializedClassTemplateIPvE1fEv
+
+//===----------------------------------------------------------------------===//
+// Classes with template base classes
+//===----------------------------------------------------------------------===//
+
+template <typename T> struct ClassTemplate { void func() {} };
+template <typename T> struct __declspec(dllexport) ExportedClassTemplate { void func() {} };
+template <typename T> struct __declspec(dllimport) ImportedClassTemplate { void func() {} };
+
+template <typename T> struct ExplicitlySpecializedTemplate { void func() {} };
+template <> struct ExplicitlySpecializedTemplate<int> { void func() {} };
+template <typename T> struct ExplicitlyExportSpecializedTemplate { void func() {} };
+template <> struct __declspec(dllexport) ExplicitlyExportSpecializedTemplate<int> { void func() {} };
+template <typename T> struct ExplicitlyImportSpecializedTemplate { void func() {} };
+template <> struct __declspec(dllimport) ExplicitlyImportSpecializedTemplate<int> { void func() {} };
+
+template <typename T> struct ExplicitlyInstantiatedTemplate { void func() {} };
+template struct ExplicitlyInstantiatedTemplate<int>;
+template <typename T> struct ExplicitlyExportInstantiatedTemplate { void func() {} };
+template struct __declspec(dllexport) ExplicitlyExportInstantiatedTemplate<int>;
+template <typename T> struct ExplicitlyImportInstantiatedTemplate { void func() {} };
+template struct __declspec(dllimport) ExplicitlyImportInstantiatedTemplate<int>;
+
+
+// MS: ClassTemplate<int> gets imported.
+struct __declspec(dllimport) DerivedFromTemplate : public ClassTemplate<int> {};
+USEMEMFUNC(ClassTemplate<int>, func)
+// M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"\01?func@?$ClassTemplate@H@@QAEXXZ"
+// G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ClassTemplateIiE4funcEv
+
+// ImportedTemplate is explicitly imported.
+struct __declspec(dllimport) DerivedFromImportedTemplate : public ImportedClassTemplate<int> {};
+USEMEMFUNC(ImportedClassTemplate<int>, func)
+// M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"\01?func@?$ImportedClassTemplate@H@@QAEXXZ"
+// G32-DAG: declare dllimport x86_thiscallcc void @_ZN21ImportedClassTemplateIiE4funcEv
+
+// ExportedTemplate is explicitly exported.
+struct __declspec(dllimport) DerivedFromExportedTemplate : public ExportedClassTemplate<int> {};
+USEMEMFUNC(ExportedClassTemplate<int>, func)
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?func@?$ExportedClassTemplate@H@@QAEXXZ"
+// G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN21ExportedClassTemplateIiE4funcEv
+
+// Base class already instantiated without attribute.
+struct DerivedFromTemplateD : public ClassTemplate<double> {};
+struct __declspec(dllimport) DerivedFromTemplateD2 : public ClassTemplate<double> {};
+USEMEMFUNC(ClassTemplate<double>, func)
+// M32-DAG: define linkonce_odr x86_thiscallcc void @"\01?func@?$ClassTemplate@N@@QAEXXZ"
+// G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ClassTemplateIdE4funcEv
+
+// MS: Base class already instantiated with dfferent attribute.
+struct __declspec(dllexport) DerivedFromTemplateB : public ClassTemplate<bool> {};
+struct __declspec(dllimport) DerivedFromTemplateB2 : public ClassTemplate<bool> {};
+USEMEMFUNC(ClassTemplate<bool>, func)
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?func@?$ClassTemplate@_N@@QAEXXZ"
+// G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN13ClassTemplateIbE4funcEv
+
+// Base class already specialized without dll attribute.
+struct __declspec(dllimport) DerivedFromExplicitlySpecializedTemplate : public ExplicitlySpecializedTemplate<int> {};
+USEMEMFUNC(ExplicitlySpecializedTemplate<int>, func)
+// M32-DAG: define linkonce_odr x86_thiscallcc void @"\01?func@?$ExplicitlySpecializedTemplate@H@@QAEXXZ"
+// G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN29ExplicitlySpecializedTemplateIiE4funcEv
+
+// Base class alredy specialized with export attribute.
+struct __declspec(dllimport) DerivedFromExplicitlyExportSpecializedTemplate : public ExplicitlyExportSpecializedTemplate<int> {};
+USEMEMFUNC(ExplicitlyExportSpecializedTemplate<int>, func)
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?func@?$ExplicitlyExportSpecializedTemplate@H@@QAEXXZ"
+// G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN35ExplicitlyExportSpecializedTemplateIiE4funcEv
+
+// Base class already specialized with import attribute.
+struct __declspec(dllimport) DerivedFromExplicitlyImportSpecializedTemplate : public ExplicitlyImportSpecializedTemplate<int> {};
+USEMEMFUNC(ExplicitlyImportSpecializedTemplate<int>, func)
+// M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"\01?func@?$ExplicitlyImportSpecializedTemplate@H@@QAEXXZ"
+// G32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @_ZN35ExplicitlyImportSpecializedTemplateIiE4funcEv
+
+// Base class already instantiated without dll attribute.
+struct __declspec(dllimport) DerivedFromExplicitlyInstantiatedTemplate : public ExplicitlyInstantiatedTemplate<int> {};
+USEMEMFUNC(ExplicitlyInstantiatedTemplate<int>, func)
+// M32-DAG: define weak_odr x86_thiscallcc void @"\01?func@?$ExplicitlyInstantiatedTemplate@H@@QAEXXZ"
+// G32-DAG: define weak_odr x86_thiscallcc void @_ZN30ExplicitlyInstantiatedTemplateIiE4funcEv
+
+// Base class already instantiated with export attribute.
+struct __declspec(dllimport) DerivedFromExplicitlyExportInstantiatedTemplate : public ExplicitlyExportInstantiatedTemplate<int> {};
+USEMEMFUNC(ExplicitlyExportInstantiatedTemplate<int>, func)
+// M32-DAG: define weak_odr dllexport x86_thiscallcc void @"\01?func@?$ExplicitlyExportInstantiatedTemplate@H@@QAEXXZ"
+// G32-DAG: define weak_odr dllexport x86_thiscallcc void @_ZN36ExplicitlyExportInstantiatedTemplateIiE4funcEv
+
+// Base class already instantiated with import attribute.
+struct __declspec(dllimport) DerivedFromExplicitlyImportInstantiatedTemplate : public ExplicitlyImportInstantiatedTemplate<int> {};
+USEMEMFUNC(ExplicitlyImportInstantiatedTemplate<int>, func)
+// M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"\01?func@?$ExplicitlyImportInstantiatedTemplate@H@@QAEXXZ"
+// G32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @_ZN36ExplicitlyImportInstantiatedTemplateIiE4funcEv
+
+// MS: A dll attribute propagates through multiple levels of instantiation.
+template <typename T> struct TopClass { void func() {} };
+template <typename T> struct MiddleClass : public TopClass<T> { };
+struct __declspec(dllimport) BottomClass : public MiddleClass<int> { };
+USEMEMFUNC(TopClass<int>, func)
+// M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"\01?func@?$TopClass@H@@QAEXXZ"
+// G32-DAG: define linkonce_odr x86_thiscallcc void @_ZN8TopClassIiE4funcEv
diff --git a/test/CodeGenCXX/duplicate-mangled-name.cpp b/test/CodeGenCXX/duplicate-mangled-name.cpp
new file mode 100644
index 000000000000..65bfa22ac621
--- /dev/null
+++ b/test/CodeGenCXX/duplicate-mangled-name.cpp
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm-only %s -verify
+
+// rdar://15522601
+class MyClass {
+ static void meth();
+};
+void MyClass::meth() { }
+extern "C" {
+ void _ZN7MyClass4methEv() { } // expected-error {{definition with same mangled name as another definition}}
+}
diff --git a/test/CodeGenCXX/dynamic_cast-no-rtti.cpp b/test/CodeGenCXX/dynamic_cast-no-rtti.cpp
index 0e26de5bcf8b..cde03a3f4e09 100644
--- a/test/CodeGenCXX/dynamic_cast-no-rtti.cpp
+++ b/test/CodeGenCXX/dynamic_cast-no-rtti.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -verify -fno-rtti -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -verify -fno-rtti -triple %itanium_abi_triple -o - | FileCheck %s
// expected-no-diagnostics
struct A {
diff --git a/test/CodeGenCXX/eh.cpp b/test/CodeGenCXX/eh.cpp
index 2a61e61bb818..cb07697fb33f 100644
--- a/test/CodeGenCXX/eh.cpp
+++ b/test/CodeGenCXX/eh.cpp
@@ -34,7 +34,7 @@ void test2() {
// CHECK-NEXT: [[SELECTORVAR:%.*]] = alloca i32
// CHECK-NEXT: [[EXNOBJ:%.*]] = call i8* @__cxa_allocate_exception(i64 16)
// CHECK-NEXT: [[EXN:%.*]] = bitcast i8* [[EXNOBJ]] to [[DSTAR:%[^*]*\*]]
-// CHECK-NEXT: invoke void @_ZN7test2_DC1ERKS_([[DSTAR]] [[EXN]], [[DSTAR]] @d2)
+// CHECK-NEXT: invoke void @_ZN7test2_DC1ERKS_([[DSTAR]] [[EXN]], [[DSTAR]] dereferenceable({{[0-9]+}}) @d2)
// CHECK-NEXT: to label %[[CONT:.*]] unwind label %{{.*}}
// : [[CONT]]: (can't check this in Release-Asserts builds)
// CHECK: call void @__cxa_throw(i8* [[EXNOBJ]], i8* bitcast ({{.*}}* @_ZTI7test2_D to i8*), i8* null) [[NR]]
@@ -184,9 +184,6 @@ namespace test9 {
struct A { A(); };
- // CHECK-LABEL: define void @_ZN5test91AC1Ev(%"struct.test9::A"* %this) unnamed_addr
- // CHECK: call void @_ZN5test91AC2Ev
- // CHECK-NEXT: ret void
// CHECK-LABEL: define void @_ZN5test91AC2Ev(%"struct.test9::A"* %this) unnamed_addr
A::A() try {
@@ -199,6 +196,10 @@ namespace test9 {
// CHECK: call i8* @__cxa_begin_catch
// CHECK: invoke void @_ZN5test96opaqueEv()
// CHECK: invoke void @__cxa_rethrow()
+
+ // CHECK-LABEL: define void @_ZN5test91AC1Ev(%"struct.test9::A"* %this) unnamed_addr
+ // CHECK: call void @_ZN5test91AC2Ev
+ // CHECK-NEXT: ret void
opaque();
}
}
@@ -427,7 +428,7 @@ namespace test16 {
// CHECK-NEXT: [[T0:%.*]] = bitcast i8* [[EXN]] to [[B:%.*]]*
// CHECK-NEXT: invoke void @_ZN6test161AC1Ev([[A]]* [[TEMP]])
// CHECK: store i1 true, i1* [[TEMP_ACTIVE]]
- // CHECK-NEXT: invoke void @_ZN6test161BC1ERKNS_1AE([[B]]* [[T0]], [[A]]* [[TEMP]])
+ // CHECK-NEXT: invoke void @_ZN6test161BC1ERKNS_1AE([[B]]* [[T0]], [[A]]* dereferenceable({{[0-9]+}}) [[TEMP]])
// CHECK: store i1 false, i1* [[EXN_ACTIVE]]
// CHECK-NEXT: invoke void @__cxa_throw(i8* [[EXN]],
diff --git a/test/CodeGenCXX/elide-call-reference.cpp b/test/CodeGenCXX/elide-call-reference.cpp
index 55d30e24c102..0ce856f0c223 100644
--- a/test/CodeGenCXX/elide-call-reference.cpp
+++ b/test/CodeGenCXX/elide-call-reference.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
// PR5695
struct A { A(const A&); ~A(); };
diff --git a/test/CodeGenCXX/empty-nontrivially-copyable.cpp b/test/CodeGenCXX/empty-nontrivially-copyable.cpp
index 9ee3281505ec..a0977a7e690a 100644
--- a/test/CodeGenCXX/empty-nontrivially-copyable.cpp
+++ b/test/CodeGenCXX/empty-nontrivially-copyable.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -triple armv7-apple-ios -x c++ -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple arm64-apple-ios -x c++ -emit-llvm -o - %s | FileCheck %s
// According to the Itanium ABI (3.1.1), types with non-trivial copy
// constructors passed by value should be passed indirectly, with the caller
@@ -18,7 +19,7 @@ bool foo(Empty e) {
}
void caller(Empty &e) {
-// CHECK: @_Z6callerR5Empty(%struct.Empty* %e)
+// CHECK: @_Z6callerR5Empty(%struct.Empty* dereferenceable({{[0-9]+}}) %e)
// CHECK: call {{.*}} @_ZN5EmptyC1ERKS_(%struct.Empty* [[NEWTMP:%.*]], %struct.Empty*
// CHECK: call {{.*}} @_Z3foo5Empty(%struct.Empty* [[NEWTMP]])
foo(e);
diff --git a/test/CodeGenCXX/enable_if.cpp b/test/CodeGenCXX/enable_if.cpp
new file mode 100644
index 000000000000..00c55c774909
--- /dev/null
+++ b/test/CodeGenCXX/enable_if.cpp
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-linux-gnu| FileCheck %s
+// Test itanium mangling for attribute enable_if
+
+// CHECK: _Z5test1Ua9enable_ifIXeqfL0p_Li1EEEi
+void test1(int i) __attribute__((enable_if(i == 1, ""))) {}
+
+void ext();
+// CHECK: _Z5test2Ua9enable_ifIXneadL_Z3extvELi0EEEi
+void test2(int i) __attribute__((enable_if(&ext != 0, ""))) {}
+
+// CHECK: _Z5test3Ua9enable_ifIXeqfL0p_Li1EEXeqfL0p0_Li2EEEii
+void test3(int i, int j) __attribute__((enable_if(i == 1, ""), enable_if(j == 2, ""))) {}
+
+// CHECK: _ZN5test4IdE1fEUa9enable_ifIXeqfL0p_Li1EEXeqfL0p0_Li2EEEi
+template <typename T>
+class test4 {
+ virtual void f(int i, int j) __attribute__((enable_if(i == 1, ""))) __attribute__((enable_if(j == 2, "")));
+};
+
+template class test4<double>;
diff --git a/test/CodeGenCXX/exceptions-no-rtti.cpp b/test/CodeGenCXX/exceptions-no-rtti.cpp
index 902d6ac2973a..e1ef4f1ddad7 100644
--- a/test/CodeGenCXX/exceptions-no-rtti.cpp
+++ b/test/CodeGenCXX/exceptions-no-rtti.cpp
@@ -1,10 +1,10 @@
// RUN: %clang_cc1 -fno-rtti -fcxx-exceptions -fexceptions %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
-// CHECK: @_ZTIN5test11AE = linkonce_odr unnamed_addr constant
-// CHECK: @_ZTIN5test11BE = linkonce_odr unnamed_addr constant
-// CHECK: @_ZTIN5test11CE = linkonce_odr unnamed_addr constant
-// CHECK: @_ZTIN5test11DE = linkonce_odr unnamed_addr constant
-// CHECK: @_ZTIPN5test11DE = linkonce_odr unnamed_addr constant {{.*}} @_ZTIN5test11DE
+// CHECK: @_ZTIN5test11AE = linkonce_odr constant
+// CHECK: @_ZTIN5test11BE = linkonce_odr constant
+// CHECK: @_ZTIN5test11CE = linkonce_odr constant
+// CHECK: @_ZTIN5test11DE = linkonce_odr constant
+// CHECK: @_ZTIPN5test11DE = linkonce_odr constant {{.*}} @_ZTIN5test11DE
// PR6974: this shouldn't crash
namespace test0 {
diff --git a/test/CodeGenCXX/exceptions.cpp b/test/CodeGenCXX/exceptions.cpp
index d37e6109db4a..5016e9a794ae 100644
--- a/test/CodeGenCXX/exceptions.cpp
+++ b/test/CodeGenCXX/exceptions.cpp
@@ -279,7 +279,7 @@ namespace test5 {
// CHECK-NEXT: [[ADJ:%.*]] = call i8* @__cxa_get_exception_ptr(i8* [[EXN]])
// CHECK-NEXT: [[SRC:%.*]] = bitcast i8* [[ADJ]] to [[A_T]]*
// CHECK-NEXT: invoke void @_ZN5test51TC1Ev([[T_T]]* [[T]])
- // CHECK: invoke void @_ZN5test51AC1ERKS0_RKNS_1TE([[A_T]]* [[A]], [[A_T]]* [[SRC]], [[T_T]]* [[T]])
+ // CHECK: invoke void @_ZN5test51AC1ERKS0_RKNS_1TE([[A_T]]* [[A]], [[A_T]]* dereferenceable({{[0-9]+}}) [[SRC]], [[T_T]]* dereferenceable({{[0-9]+}}) [[T]])
// CHECK: invoke void @_ZN5test51TD1Ev([[T_T]]* [[T]])
// CHECK: call i8* @__cxa_begin_catch(i8* [[EXN]]) [[NUW]]
// CHECK-NEXT: invoke void @_ZN5test51AD1Ev([[A_T]]* [[A]])
diff --git a/test/CodeGenCXX/explicit-instantiation.cpp b/test/CodeGenCXX/explicit-instantiation.cpp
index 6a4fd822122f..5bd06784cfab 100644
--- a/test/CodeGenCXX/explicit-instantiation.cpp
+++ b/test/CodeGenCXX/explicit-instantiation.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -emit-llvm -triple i686-pc-linux-gnu -o - %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple i686-pc-linux-gnu -std=c++1y -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NO-OPT
+// RUN: %clang_cc1 -emit-llvm -triple i686-pc-linux-gnu -std=c++1y -O3 -disable-llvm-optzns -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-OPT
// This check logically is attached to 'template int S<int>::i;' below.
// CHECK: @_ZN1SIiE1iE = weak_odr global i32
@@ -16,6 +17,79 @@ Result plus<T, U, Result>::operator()(const T& t, const U& u) const {
// CHECK-LABEL: define weak_odr i32 @_ZNK4plusIillEclERKiRKl
template struct plus<int, long, long>;
+namespace EarlyInstantiation {
+ // Check that we emit definitions if we instantiate a function definition before
+ // it gets explicitly instantiatied.
+ template<typename T> struct S {
+ constexpr int constexpr_function() { return 0; }
+ auto deduced_return_type() { return 0; }
+ };
+
+ // From an implicit instantiation.
+ constexpr int a = S<char>().constexpr_function();
+ int b = S<char>().deduced_return_type();
+
+ // From an explicit instantiation declaration.
+ extern template struct S<int>;
+ constexpr int c = S<int>().constexpr_function();
+ int d = S<int>().deduced_return_type();
+
+ // CHECK: define weak_odr i32 @_ZN18EarlyInstantiation1SIcE18constexpr_functionEv(
+ // CHECK: define weak_odr i32 @_ZN18EarlyInstantiation1SIcE19deduced_return_typeEv(
+ // CHECK: define weak_odr i32 @_ZN18EarlyInstantiation1SIiE18constexpr_functionEv(
+ // CHECK: define weak_odr i32 @_ZN18EarlyInstantiation1SIiE19deduced_return_typeEv(
+ template struct S<char>;
+ template struct S<int>;
+
+ template<typename T> constexpr int constexpr_function() { return 0; }
+ template<typename T> auto deduced_return_type() { return 0; }
+
+ // From an implicit instantiation.
+ constexpr int e = constexpr_function<char>();
+ int f = deduced_return_type<char>();
+
+ // From an explicit instantiation declaration.
+ extern template int constexpr_function<int>();
+ extern template auto deduced_return_type<int>();
+ constexpr int g = constexpr_function<int>();
+ int h = deduced_return_type<int>();
+
+ // The FIXMEs below are for PR19551.
+ // CHECK: define weak_odr i32 @_ZN18EarlyInstantiation18constexpr_functionIcEEiv(
+ // FIXME: define weak_odr i32 @_ZN18EarlyInstantiation19deduced_return_typeIcEEiv(
+ // CHECK: define weak_odr i32 @_ZN18EarlyInstantiation18constexpr_functionIiEEiv(
+ // FIXME: define weak_odr i32 @_ZN18EarlyInstantiation19deduced_return_typeIiEEiv(
+ template int constexpr_function<char>();
+ // FIXME template auto deduced_return_type<char>();
+ template int constexpr_function<int>();
+ // FIXME template auto deduced_return_type<int>();
+}
+
+namespace LateInstantiation {
+ // Check that we downgrade the linkage to available_externally if we see an
+ // explicit instantiation declaration after the function template is
+ // instantiated.
+ template<typename T> struct S { constexpr int f() { return 0; } };
+ template<typename T> constexpr int f() { return 0; }
+
+ // Trigger eager instantiation of the function definitions.
+ int a, b = S<char>().f() + f<char>() + a;
+ int c, d = S<int>().f() + f<int>() + a;
+
+ // Don't allow some of those definitions to be emitted.
+ extern template struct S<int>;
+ extern template int f<int>();
+
+ // Check that we declare, define, or provide an available-externally
+ // definition as appropriate.
+ // CHECK: define linkonce_odr i32 @_ZN17LateInstantiation1SIcE1fEv(
+ // CHECK: define linkonce_odr i32 @_ZN17LateInstantiation1fIcEEiv(
+ // CHECK-NO-OPT: declare i32 @_ZN17LateInstantiation1SIiE1fEv(
+ // CHECK-NO-OPT: declare i32 @_ZN17LateInstantiation1fIiEEiv(
+ // CHECK-OPT: define available_externally i32 @_ZN17LateInstantiation1SIiE1fEv(
+ // CHECK-OPT: define available_externally i32 @_ZN17LateInstantiation1fIiEEiv(
+}
+
// Check that we emit definitions from explicit instantiations even when they
// occur prior to the definition itself.
template <typename T> struct S {
diff --git a/test/CodeGenCXX/extern-c.cpp b/test/CodeGenCXX/extern-c.cpp
index 5899b9348c5a..fefb216ea1c0 100644
--- a/test/CodeGenCXX/extern-c.cpp
+++ b/test/CodeGenCXX/extern-c.cpp
@@ -1,18 +1,21 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s
namespace foo {
-// CHECK-NOT: @a = global i32
+// CHECK-NOT: @a = global
extern "C" int a;
-// CHECK-NOT: @_ZN3foo1bE = global i32
+// CHECK-NOT: @_ZN3foo1bE = global
extern int b;
-// CHECK: @_ZN3foo1cE = global i32
+// CHECK: @_ZN3foo1cE = global
int c = 5;
// CHECK-NOT: @_ZN3foo1dE
extern "C" struct d;
+// CHECK-NOT: should_not_appear
+extern "C++" int should_not_appear;
+
}
namespace test1 {
@@ -63,3 +66,10 @@ extern "C" {
// CHECK-NOT: @unused
// CHECK-NOT: @duplicate_internal
}
+
+namespace PR19411 {
+ struct A { void f(); };
+ extern "C" void A::f() { void g(); g(); }
+ // CHECK-LABEL: @_ZN7PR194111A1fEv(
+ // CHECK: call void @g()
+}
diff --git a/test/CodeGenCXX/fastcall.cpp b/test/CodeGenCXX/fastcall.cpp
index 0326ce53bc4a..0820324558ee 100644
--- a/test/CodeGenCXX/fastcall.cpp
+++ b/test/CodeGenCXX/fastcall.cpp
@@ -3,7 +3,7 @@
void __attribute__((fastcall)) foo1(int &y);
void bar1(int &y) {
// CHECK-LABEL: define void @_Z4bar1Ri
- // CHECK: call x86_fastcallcc void @_Z4foo1Ri(i32* inreg %
+ // CHECK: call x86_fastcallcc void @_Z4foo1Ri(i32* inreg dereferenceable({{[0-9]+}}) %
foo1(y);
}
diff --git a/test/CodeGenCXX/field-access-debug-info.cpp b/test/CodeGenCXX/field-access-debug-info.cpp
index fd899ed71e1c..aed4ee5f3a77 100644
--- a/test/CodeGenCXX/field-access-debug-info.cpp
+++ b/test/CodeGenCXX/field-access-debug-info.cpp
@@ -1,8 +1,7 @@
-// RUN: %clang_cc1 -g -S -masm-verbose -o - %s | FileCheck %s
+// RUN: %clang -g -S -emit-llvm %s -o - | FileCheck %s
-// CHECK: abbrev_begin:
-// CHECK: DW_AT_accessibility
-// CHECK-NEXT: DW_FORM_data1
+// CHECK: [ DW_TAG_member ] [p] [{{[^]]*}}] [from int]
+// CHECK: [ DW_TAG_member ] [pr] [{{[^]]*}}] [private] [from int]
class A {
public:
diff --git a/test/CodeGenCXX/flatten.cpp b/test/CodeGenCXX/flatten.cpp
new file mode 100644
index 000000000000..9e0f67f78984
--- /dev/null
+++ b/test/CodeGenCXX/flatten.cpp
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -triple=x86_64-linux-gnu -std=c++11 %s -emit-llvm -o - | FileCheck %s
+
+void f(void) {}
+
+[[gnu::flatten]]
+// CHECK: define void @_Z1gv()
+void g(void) {
+ // CHECK-NOT: call {{.*}} @_Z1fv
+ f();
+}
diff --git a/test/CodeGenCXX/funcsig.cpp b/test/CodeGenCXX/funcsig.cpp
new file mode 100644
index 000000000000..684a796c1905
--- /dev/null
+++ b/test/CodeGenCXX/funcsig.cpp
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -std=c++11 -triple i686-pc-win32 %s -fms-extensions -fno-rtti -emit-llvm -o - | FileCheck %s
+
+// Similar to predefined-expr.cpp, but not as exhaustive, since it's basically
+// equivalent to __PRETTY_FUNCTION__.
+
+extern "C" int printf(const char *, ...);
+
+void freeFunc(int *, char) {
+ printf("__FUNCSIG__ %s\n\n", __FUNCSIG__);
+}
+// CHECK: private unnamed_addr constant [{{.*}} x i8] c"void __cdecl freeFunc(int *, char)\00"
+
+struct TopLevelClass {
+ void topLevelMethod(int *, char);
+};
+void TopLevelClass::topLevelMethod(int *, char) {
+ printf("__FUNCSIG__ %s\n\n", __FUNCSIG__);
+}
+// CHECK: private unnamed_addr constant [{{.*}} x i8] c"void __thiscall TopLevelClass::topLevelMethod(int *, char)\00"
+
+namespace NS {
+struct NamespacedClass {
+ void namespacedMethod(int *, char);
+};
+void NamespacedClass::namespacedMethod(int *, char) {
+ printf("__FUNCSIG__ %s\n\n", __FUNCSIG__);
+}
+// CHECK: private unnamed_addr constant [{{.*}} x i8] c"void __thiscall NS::NamespacedClass::namespacedMethod(int *, char)\00"
+}
diff --git a/test/CodeGenCXX/function-template-explicit-specialization.cpp b/test/CodeGenCXX/function-template-explicit-specialization.cpp
index 5d26dcd61cf0..8ff065569757 100644
--- a/test/CodeGenCXX/function-template-explicit-specialization.cpp
+++ b/test/CodeGenCXX/function-template-explicit-specialization.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple %s -o - | FileCheck %s
template<typename T> void a(T);
template<> void a(int) {}
diff --git a/test/CodeGenCXX/function-template-specialization.cpp b/test/CodeGenCXX/function-template-specialization.cpp
index 4a79fb1d6747..eb099df14d00 100644
--- a/test/CodeGenCXX/function-template-specialization.cpp
+++ b/test/CodeGenCXX/function-template-specialization.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple %s -o - | FileCheck %s
template<typename T, typename U>
T* next(T* ptr, const U& diff);
diff --git a/test/CodeGenCXX/global-array-destruction.cpp b/test/CodeGenCXX/global-array-destruction.cpp
index 6ebc13953f67..0397851e0d92 100644
--- a/test/CodeGenCXX/global-array-destruction.cpp
+++ b/test/CodeGenCXX/global-array-destruction.cpp
@@ -56,7 +56,7 @@ using U = T[2][3];
U &&u = U{ {{1.0, 2}, {3.0, 4}, {5.0, 6}}, {{7.0, 8}, {9.0, 10}, {11.0, 12}} };
// CHECK: call {{.*}} @__cxa_atexit
-// CHECK: getelementptr inbounds ({{.*}}* getelementptr inbounds ([2 x [3 x {{.*}}]]* @_ZGR1u, i32 0, i32 0, i32 0), i64 6)
+// CHECK: getelementptr inbounds ({{.*}}* getelementptr inbounds ([2 x [3 x {{.*}}]]* @_ZGR1u_, i32 0, i32 0, i32 0), i64 6)
// CHECK: call void @_ZN1TD1Ev
-// CHECK: icmp eq {{.*}} @_ZGR1u
+// CHECK: icmp eq {{.*}} @_ZGR1u_
// CHECK: br i1 {{.*}}
diff --git a/test/CodeGenCXX/global-init.cpp b/test/CodeGenCXX/global-init.cpp
index 69631c278905..9c5b03a92845 100644
--- a/test/CodeGenCXX/global-init.cpp
+++ b/test/CodeGenCXX/global-init.cpp
@@ -12,7 +12,7 @@ struct C { void *field; };
struct D { ~D(); };
-// CHECK: @__dso_handle = external unnamed_addr global i8
+// CHECK: @__dso_handle = external global i8
// CHECK: @c = global %struct.C zeroinitializer, align 8
// It's okay if we ever implement the IR-generation optimization to remove this.
@@ -195,11 +195,11 @@ namespace test7 {
// CHECK-NEXT: sub
// CHECK-NEXT: store i32 {{.*}}, i32* @_ZN5test1L1yE
-// CHECK: define internal void @_GLOBAL__I_a() section "__TEXT,__StaticInit,regular,pure_instructions" {
+// CHECK: define internal void @_GLOBAL__sub_I_global_init.cpp() section "__TEXT,__StaticInit,regular,pure_instructions" {
// CHECK: call void [[TEST1_Y_INIT]]
// CHECK: call void [[TEST1_Z_INIT]]
// rdar://problem/8090834: this should be nounwind
-// CHECK-NOEXC: define internal void @_GLOBAL__I_a() [[NUW:#[0-9]+]] section "__TEXT,__StaticInit,regular,pure_instructions" {
+// CHECK-NOEXC: define internal void @_GLOBAL__sub_I_global_init.cpp() [[NUW:#[0-9]+]] section "__TEXT,__StaticInit,regular,pure_instructions" {
// CHECK-NOEXC: attributes [[NUW]] = { nounwind }
diff --git a/test/CodeGenCXX/global-llvm-constant.cpp b/test/CodeGenCXX/global-llvm-constant.cpp
index 2bd43b99a5d9..55933eecfc3e 100644
--- a/test/CodeGenCXX/global-llvm-constant.cpp
+++ b/test/CodeGenCXX/global-llvm-constant.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s
struct A {
A() { x = 10; }
diff --git a/test/CodeGenCXX/globalinit-loc.cpp b/test/CodeGenCXX/globalinit-loc.cpp
new file mode 100644
index 000000000000..eb39aec94d48
--- /dev/null
+++ b/test/CodeGenCXX/globalinit-loc.cpp
@@ -0,0 +1,23 @@
+// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
+// rdar://problem/14985269.
+//
+// Verify that the global init helper function does not get associated
+// with any source location.
+//
+// CHECK: define internal void @_GLOBAL__sub_I_globalinit_loc.cpp
+// CHECK: !dbg ![[DBG:.*]]
+// CHECK: "_GLOBAL__sub_I_globalinit_loc.cpp", i32 0, {{.*}}, i32 0} ; [ DW_TAG_subprogram ] [line 0] [local] [def]
+// CHECK: ![[DBG]] = metadata !{i32 0, i32 0,
+# 99 "someheader.h"
+class A {
+public:
+ A();
+ int foo() { return 0; }
+};
+# 5 "main.cpp"
+A a;
+
+int f() {
+ return a.foo();
+}
+
diff --git a/test/CodeGenCXX/goto.cpp b/test/CodeGenCXX/goto.cpp
index 904f95fb22be..c1a0eeccf811 100644
--- a/test/CodeGenCXX/goto.cpp
+++ b/test/CodeGenCXX/goto.cpp
@@ -22,7 +22,7 @@ namespace test0 {
// CHECK: store i1 true, i1* [[CLEANUPACTIVE]]
// CHECK: [[NEWCAST:%.*]] = bitcast i8* [[NEW]] to [[V]]*
// CHECK-NEXT: invoke void @_ZN5test01AC1Ev([[A]]* [[TMP]])
- // CHECK: invoke void @_ZN5test01VC1ERKNS_1AE([[V]]* [[NEWCAST]], [[A]]* [[TMP]])
+ // CHECK: invoke void @_ZN5test01VC1ERKNS_1AE([[V]]* [[NEWCAST]], [[A]]* dereferenceable({{[0-9]+}}) [[TMP]])
// CHECK: store i1 false, i1* [[CLEANUPACTIVE]]
// CHECK-NEXT: invoke void @_ZN5test01AD1Ev([[A]]* [[TMP]])
A y;
diff --git a/test/CodeGenCXX/implicit-copy-assign-operator.cpp b/test/CodeGenCXX/implicit-copy-assign-operator.cpp
index 267402122f82..fded035822ab 100644
--- a/test/CodeGenCXX/implicit-copy-assign-operator.cpp
+++ b/test/CodeGenCXX/implicit-copy-assign-operator.cpp
@@ -40,7 +40,7 @@ void test_D(D d1, D d2) {
d1 = d2;
}
-// CHECK-LABEL: define linkonce_odr %struct.D* @_ZN1DaSERS_
+// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.D* @_ZN1DaSERS_
// CHECK: {{call.*_ZN1AaSERS_}}
// CHECK: {{call.*_ZN1BaSERS_}}
// CHECK: {{call.*_ZN1CaSERKS_}}
@@ -53,4 +53,3 @@ void test_D(D d1, D d2) {
// CHECK: call void @_ZN11CopyByValueC1ERKS_
// CHECK: {{call.*_ZN11CopyByValueaSES_}}
// CHECK: ret
-
diff --git a/test/CodeGenCXX/implicit-copy-constructor.cpp b/test/CodeGenCXX/implicit-copy-constructor.cpp
index bb04318e7307..d0224131c4da 100644
--- a/test/CodeGenCXX/implicit-copy-constructor.cpp
+++ b/test/CodeGenCXX/implicit-copy-constructor.cpp
@@ -40,7 +40,7 @@ void f(D d) {
D d2(d);
}
-// CHECK-LABEL: define linkonce_odr void @_ZN1DC1ERS_(%struct.D* %this, %struct.D*) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN1DC1ERS_(%struct.D* %this, %struct.D* dereferenceable({{[0-9]+}})) unnamed_addr
// CHECK: call void @_ZN1AC1Ev
// CHECK: call void @_ZN1CC2ERS_1A
// CHECK: call void @_ZN1AD1Ev
diff --git a/test/CodeGenCXX/implicit-instantiation-1.cpp b/test/CodeGenCXX/implicit-instantiation-1.cpp
index bf6a14150892..c3c49c3218b3 100644
--- a/test/CodeGenCXX/implicit-instantiation-1.cpp
+++ b/test/CodeGenCXX/implicit-instantiation-1.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o %t
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple %s -o %t
template<typename T>
struct X {
diff --git a/test/CodeGenCXX/inheriting-constructor.cpp b/test/CodeGenCXX/inheriting-constructor.cpp
index c99a20c730e4..9394137e6414 100644
--- a/test/CodeGenCXX/inheriting-constructor.cpp
+++ b/test/CodeGenCXX/inheriting-constructor.cpp
@@ -11,9 +11,9 @@ struct C { template<typename T> C(T); };
struct D : C { using C::C; };
D d(123);
-// CHECK-LABEL: define void @_ZN1BD0Ev
-// CHECK-LABEL: define void @_ZN1BD1Ev
// CHECK-LABEL: define void @_ZN1BD2Ev
+// CHECK-LABEL: define void @_ZN1BD1Ev
+// CHECK-LABEL: define void @_ZN1BD0Ev
// CHECK-LABEL: define linkonce_odr void @_ZN1BC1Ei(
// CHECK: call void @_ZN1BC2Ei(
diff --git a/test/CodeGenCXX/init-priority-attr.cpp b/test/CodeGenCXX/init-priority-attr.cpp
index ef9343ceade9..ff155d07ca2e 100644
--- a/test/CodeGenCXX/init-priority-attr.cpp
+++ b/test/CodeGenCXX/init-priority-attr.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
-// PR
+// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -O2 -emit-llvm -o - | FileCheck %s
+// PR11480
void foo(int);
@@ -27,18 +27,24 @@ public:
A C::a = A();
-// CHECK: @llvm.global_ctors = appending global [3 x { i32, void ()* }] [{ i32, void ()* } { i32 200, void ()* @_GLOBAL__I_000200 }, { i32, void ()* } { i32 300, void ()* @_GLOBAL__I_000300 }, { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I_a }]
+// CHECK: @llvm.global_ctors = appending global [3 x { i32, void ()*, i8* }]
+// CHECK: [{ i32, void ()*, i8* } { i32 200, void ()* @_GLOBAL__I_000200, i8* null },
+// CHECK: { i32, void ()*, i8* } { i32 300, void ()* @_GLOBAL__I_000300, i8* null },
+// CHECK: { i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_init_priority_attr.cpp, i8* null }]
// CHECK: _GLOBAL__I_000200()
-// CHECK_NEXT: _Z3fooi(i32 3)
+// CHECK: _Z3fooi(i32 3)
+// CHECK-NEXT: ret void
// CHECK: _GLOBAL__I_000300()
-// CHECK_NEXT: _Z3fooi(i32 2)
-// CHECK_NEXT: _Z3fooi(i32 1)
-
-// CHECK: _GLOBAL__I_a()
-// CHECK_NEXT: _Z3fooi(i32 1)
-// CHECK_NEXT: _Z3fooi(i32 4)
+// CHECK: _Z3fooi(i32 2)
+// CHECK-NEXT: _Z3fooi(i32 1)
+// CHECK-NEXT: ret void
+
+// CHECK: _GLOBAL__sub_I_init_priority_attr.cpp()
+// CHECK: _Z3fooi(i32 1)
+// CHECK-NEXT: _Z3fooi(i32 4)
+// CHECK-NEXT: ret void
C c;
A1 a1 __attribute__((init_priority (300)));
diff --git a/test/CodeGenCXX/inline-functions.cpp b/test/CodeGenCXX/inline-functions.cpp
index 9f8e536a3b0c..622cfa9536f3 100644
--- a/test/CodeGenCXX/inline-functions.cpp
+++ b/test/CodeGenCXX/inline-functions.cpp
@@ -1,11 +1,12 @@
-// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -std=c++11 -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s --check-prefix=CHECK --check-prefix=NORMAL
+// RUN: %clang_cc1 %s -std=c++11 -fms-compatibility -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s --check-prefix=CHECK --check-prefix=MSVCCOMPAT
// CHECK: ; ModuleID
struct A {
inline void f();
};
-// CHECK-NOT-LABEL: define void @_ZN1A1fEv
+// CHECK-NOT: define void @_ZN1A1fEv
void A::f() { }
template<typename> struct B { };
@@ -67,3 +68,56 @@ namespace test2 {
}
// CHECK-LABEL: define linkonce_odr void @_ZN5test21fERKNS_1AE
}
+
+// MSVCCOMPAT-LABEL: define weak_odr void @_Z17ExternAndInlineFnv
+// NORMAL-NOT: _Z17ExternAndInlineFnv
+extern inline void ExternAndInlineFn() {}
+
+// MSVCCOMPAT-LABEL: define weak_odr void @_Z18InlineThenExternFnv
+// NORMAL-NOT: _Z18InlineThenExternFnv
+inline void InlineThenExternFn() {}
+extern void InlineThenExternFn();
+
+// CHECK-LABEL: define void @_Z18ExternThenInlineFnv
+extern void ExternThenInlineFn() {}
+
+// MSVCCOMPAT-LABEL: define weak_odr void @_Z25ExternThenInlineThenDefFnv
+// NORMAL-NOT: _Z25ExternThenInlineThenDefFnv
+extern void ExternThenInlineThenDefFn();
+inline void ExternThenInlineThenDefFn();
+void ExternThenInlineThenDefFn() {}
+
+// MSVCCOMPAT-LABEL: define weak_odr void @_Z25InlineThenExternThenDefFnv
+// NORMAL-NOT: _Z25InlineThenExternThenDefFnv
+inline void InlineThenExternThenDefFn();
+extern void InlineThenExternThenDefFn();
+void InlineThenExternThenDefFn() {}
+
+// MSVCCOMPAT-LABEL: define weak_odr i32 @_Z20ExternAndConstexprFnv
+// NORMAL-NOT: _Z17ExternAndConstexprFnv
+extern constexpr int ExternAndConstexprFn() { return 0; }
+
+// CHECK-NOT: _Z11ConstexprFnv
+constexpr int ConstexprFn() { return 0; }
+
+template <typename T>
+extern inline void ExternInlineOnPrimaryTemplate(T);
+
+// CHECK-LABEL: define void @_Z29ExternInlineOnPrimaryTemplateIiEvT_
+template <>
+void ExternInlineOnPrimaryTemplate(int) {}
+
+template <typename T>
+extern inline void ExternInlineOnPrimaryTemplateAndSpecialization(T);
+
+// MSVCCOMPAT-LABEL: define weak_odr void @_Z46ExternInlineOnPrimaryTemplateAndSpecializationIiEvT_
+// NORMAL-NOT: _Z46ExternInlineOnPrimaryTemplateAndSpecializationIiEvT_
+template <>
+extern inline void ExternInlineOnPrimaryTemplateAndSpecialization(int) {}
+
+struct TypeWithInlineMethods {
+ // CHECK-NOT: _ZN21TypeWithInlineMethods9StaticFunEv
+ static void StaticFun() {}
+ // CHECK-NOT: _ZN21TypeWithInlineMethods12NonStaticFunEv
+ void NonStaticFun() { StaticFun(); }
+};
diff --git a/test/CodeGenCXX/instrument-functions.cpp b/test/CodeGenCXX/instrument-functions.cpp
index 253e09610893..587b6389c9a9 100644
--- a/test/CodeGenCXX/instrument-functions.cpp
+++ b/test/CodeGenCXX/instrument-functions.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -S -emit-llvm -o - %s -finstrument-functions | FileCheck %s
+// RUN: %clang_cc1 -S -emit-llvm -triple %itanium_abi_triple -o - %s -finstrument-functions | FileCheck %s
// CHECK: @_Z5test1i
int test1(int x) {
diff --git a/test/CodeGenCXX/int64_uint64.cpp b/test/CodeGenCXX/int64_uint64.cpp
new file mode 100644
index 000000000000..aad6ea0b741d
--- /dev/null
+++ b/test/CodeGenCXX/int64_uint64.cpp
@@ -0,0 +1,23 @@
+// RUN: %clang_cc1 -triple arm-linux-guneabi \
+// RUN: -target-cpu cortex-a8 \
+// RUN: -emit-llvm -w -O1 -o - %s | FileCheck --check-prefix=CHECK-ARM %s
+
+// RUN: %clang_cc1 -triple arm64-linux-gnueabi \
+// RUN: -target-feature +neon \
+// RUN: -emit-llvm -w -O1 -o - %s | FileCheck --check-prefix=CHECK-AARCH64 %s
+
+// Test if int64_t and uint64_t can be correctly mangled.
+
+#include "arm_neon.h"
+// CHECK-ARM: f1x(
+// CHECK-AARCH64: f1l(
+void f1(int64_t a) {}
+// CHECK-ARM: f2y(
+// CHECK-AARCH64: f2m(
+void f2(uint64_t a) {}
+// CHECK-ARM: f3Px(
+// CHECK-AARCH64: f3Pl(
+void f3(int64_t *ptr) {}
+// CHECK-ARM: f4Py(
+// CHECK-AARCH64: f4Pm(
+void f4(uint64_t *ptr) {}
diff --git a/test/CodeGenCXX/internal-linkage.cpp b/test/CodeGenCXX/internal-linkage.cpp
index 56cb81030922..77b16704dd17 100644
--- a/test/CodeGenCXX/internal-linkage.cpp
+++ b/test/CodeGenCXX/internal-linkage.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s
struct Global { Global(); };
template<typename T> struct X { X() {} };
diff --git a/test/CodeGenCXX/linetable-cleanup.cpp b/test/CodeGenCXX/linetable-cleanup.cpp
index 96b857225267..ce7f2c674ba5 100644
--- a/test/CodeGenCXX/linetable-cleanup.cpp
+++ b/test/CodeGenCXX/linetable-cleanup.cpp
@@ -46,12 +46,14 @@ void bar()
void baz()
{
if (!foo())
- // CHECK: {{.*}} = metadata !{i32 [[@LINE+1]], i32 0, metadata !{{.*}}, null}
+ // CHECK: ![[SCOPE1:.*]] = metadata !{{{.*}}, i32 [[@LINE-1]], {{.*}}} ; [ DW_TAG_lexical_block ]
+ // CHECK: {{.*}} = metadata !{i32 [[@LINE+1]], i32 0, metadata ![[SCOPE1]], null}
return;
if (foo()) {
// no cleanup
- // CHECK: {{.*}} = metadata !{i32 [[@LINE+1]], i32 0, metadata !{{.*}}, null}
+ // CHECK: {{.*}} = metadata !{i32 [[@LINE+2]], i32 0, metadata ![[SCOPE2:.*]], null}
+ // CHECK: ![[SCOPE2]] = metadata !{{{.*}}, i32 [[@LINE-3]], {{.*}}} ; [ DW_TAG_lexical_block ]
return;
}
// CHECK: ![[RETBAZ]] = metadata !{i32 [[@LINE+1]], i32 0, metadata !{{.*}}, null}
diff --git a/test/CodeGenCXX/linetable-eh.cpp b/test/CodeGenCXX/linetable-eh.cpp
new file mode 100644
index 000000000000..14a5067cf3ea
--- /dev/null
+++ b/test/CodeGenCXX/linetable-eh.cpp
@@ -0,0 +1,44 @@
+// RUN: %clang_cc1 -emit-llvm -g -triple x86_64-apple-macosx10.9.0 -munwind-tables -std=c++11 -fcxx-exceptions -fexceptions %s -o - | FileCheck %s
+
+// Test that emitting a landing pad does not affect the line table
+// entries for the code that triggered it.
+
+// CHECK: call void @llvm.dbg.declare
+// CHECK: call void @llvm.dbg.declare(metadata !{{{.*}}}, metadata ![[CURRENT_ADDR:.*]]), !dbg ![[DBG1:.*]]
+// CHECK: unwind label %{{.*}}, !dbg ![[DBG1]]
+// CHECK: store i64 %{{.*}}, i64* %current_address, align 8, !dbg ![[DBG4:.*]]
+// CHECK-NEXT: call void @llvm.dbg.declare(metadata !{{{.*}}}, metadata ![[FOUND_IT:.*]]), !dbg ![[DBG2:.*]]
+// CHECK: = landingpad
+// CHECK-NEXT: cleanup, !dbg ![[DBG3:.*]]
+// CHECK-DAG: ![[CURRENT_ADDR]] = {{.*}} [current_address]
+// CHECK-DAG: ![[FOUND_IT]] = {{.*}} [found_it]
+// CHECK-DAG: ![[DBG1]] = metadata !{i32 256,
+// CHECK-DAG: ![[DBG2]] = metadata !{i32 257,
+// CHECK-DAG: ![[DBG3]] = metadata !{i32 268,
+// CHECK-DAG: ![[DBG4]] = metadata !{i32 256,
+typedef unsigned long long uint64_t;
+template<class _Tp> class shared_ptr {
+public:
+ typedef _Tp element_type;
+ element_type* __ptr_;
+ ~shared_ptr();
+ element_type* operator->() const noexcept {return __ptr_;}
+};
+class Context {
+public:
+ uint64_t GetIt();
+};
+class Foo
+{
+ bool bar();
+ virtual shared_ptr<Context> GetContext () = 0;
+};
+# 253 "Foo.cpp" 3
+bool
+Foo::bar ()
+{
+ uint64_t current_address = GetContext()->GetIt();
+ bool found_it = false;
+# 267 "Foo.cpp" 3
+ return found_it;
+}
diff --git a/test/CodeGenCXX/linetable-fnbegin.cpp b/test/CodeGenCXX/linetable-fnbegin.cpp
new file mode 100644
index 000000000000..ce46306fed0d
--- /dev/null
+++ b/test/CodeGenCXX/linetable-fnbegin.cpp
@@ -0,0 +1,28 @@
+// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
+// Test that the line table info for Foo<T>::bar() is pointing to the
+// right header file.
+// CHECK: define{{.*}}bar
+// CHECK-NOT: define
+// CHECK: ret {{.*}}, !dbg [[DBG:.*]]
+// CHECK: [[HPP:.*]] = metadata !{metadata !"./template.hpp",
+// CHECK: [[SP:.*]] = metadata !{i32 786478, metadata [[HPP]],{{.*}}[ DW_TAG_subprogram ] [line 22] [def] [bar]
+// We shouldn't need a lexical block for this function.
+// CHECK: [[DBG]] = metadata !{i32 23, i32 0, metadata [[SP]], null}
+
+
+# 1 "./template.h" 1
+template <typename T>
+class Foo {
+public:
+ int bar();
+};
+# 21 "./template.hpp"
+template <typename T>
+int Foo<T>::bar() {
+ return 23;
+}
+int main (int argc, const char * argv[])
+{
+ Foo<int> f;
+ return f.bar();
+}
diff --git a/test/CodeGenCXX/linkage.cpp b/test/CodeGenCXX/linkage.cpp
index 19f1b20773c0..60e53c6444e2 100644
--- a/test/CodeGenCXX/linkage.cpp
+++ b/test/CodeGenCXX/linkage.cpp
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -std=c++11 -O1 -disable-llvm-optzns %s -o - | FileCheck %s
namespace test1 {
- // CHECK-DAG-LABEL: define linkonce_odr void @_ZN5test11fIZNS_1gEvE1SEEvT_(
+ // CHECK-DAG: define linkonce_odr void @_ZN5test11fIZNS_1gEvE1SEEvT_(
template <typename T> void f(T) {}
inline void *g() {
struct S {
@@ -12,7 +12,7 @@ namespace test1 {
}
namespace test2 {
- // CHECK-DAG-LABEL: define internal void @_ZN5test21fIZNS_L1gEvE1SEEvT_(
+ // CHECK-DAG: define internal void @_ZN5test21fIZNS_L1gEvE1SEEvT_(
template <typename T> void f(T) {}
static inline void *g() {
struct S {
@@ -23,7 +23,7 @@ namespace test2 {
}
namespace test3 {
- // CHECK-DAG-LABEL: define internal void @_ZN5test31fIZNS_1gEvE1SEEvT_(
+ // CHECK-DAG: define internal void @_ZN5test31fIZNS_1gEvE1SEEvT_(
template <typename T> void f(T) {}
void *g() {
struct S {
@@ -34,7 +34,7 @@ namespace test3 {
}
namespace test4 {
- // CHECK-DAG-LABEL: define linkonce_odr void @_ZN5test41fIZNS_1gILi1EEEPvvE1SEEvT_(
+ // CHECK-DAG: define linkonce_odr void @_ZN5test41fIZNS_1gILi1EEEPvvE1SEEvT_(
template <typename T> void f(T) {}
template <int N> inline void *g() {
struct S {
@@ -46,7 +46,7 @@ namespace test4 {
}
namespace test5 {
- // CHECK-DAG-LABEL: define linkonce_odr void @_ZN5test51fIZNS_1gILi1EEEPvvE1SEEvT_(
+ // CHECK-DAG: define linkonce_odr void @_ZN5test51fIZNS_1gILi1EEEPvvE1SEEvT_(
template <typename T> void f(T) {}
template <int N> inline void *g() {
struct S {
@@ -58,7 +58,7 @@ namespace test5 {
}
namespace test6 {
- // CHECK-DAG-LABEL: define linkonce_odr void @_ZN5test61fIZZNS_1gEvEN1S1hEvE1TEEvv(
+ // CHECK-DAG: define linkonce_odr void @_ZN5test61fIZZNS_1gEvEN1S1hEvE1TEEvv(
template <typename T> void f() {}
inline void *g() {
@@ -76,7 +76,7 @@ namespace test6 {
}
namespace test7 {
- // CHECK-DAG-LABEL: define internal void @_ZN5test71fIZZNS_1gEvEN1S1hEvE1TEEvv(
+ // CHECK-DAG: define internal void @_ZN5test71fIZZNS_1gEvEN1S1hEvE1TEEvv(
template <typename T> void f() {}
void *g() {
@@ -94,7 +94,7 @@ namespace test7 {
}
namespace test8 {
- // CHECK-DAG-LABEL: define linkonce_odr void @_ZN5test81fIZNS_1gEvE1SEEvT_(
+ // CHECK-DAG: define linkonce_odr void @_ZN5test81fIZNS_1gEvE1SEEvT_(
template <typename T> void f(T) {}
inline void *g() {
enum S {
@@ -105,7 +105,7 @@ namespace test8 {
}
namespace test9 {
- // CHECK-DAG-LABEL: define linkonce_odr void @_ZN5test91fIPZNS_1gEvE1SEEvT_(
+ // CHECK-DAG: define linkonce_odr void @_ZN5test91fIPZNS_1gEvE1SEEvT_(
template <typename T> void f(T) {}
inline void *g() {
struct S {
@@ -116,7 +116,7 @@ namespace test9 {
}
namespace test10 {
- // CHECK-DAG-LABEL: define linkonce_odr void @_ZN6test101fIPFZNS_1gEvE1SvEEEvT_(
+ // CHECK-DAG: define linkonce_odr void @_ZN6test101fIPFZNS_1gEvE1SvEEEvT_(
template <typename T> void f(T) {}
inline void *g() {
struct S {
@@ -128,7 +128,7 @@ namespace test10 {
}
namespace test11 {
- // CHECK-DAG-LABEL: define internal void @_ZN6test111fIPFZNS_1gEvE1SPNS_12_GLOBAL__N_11IEEEEvT_(
+ // CHECK-DAG: define internal void @_ZN6test111fIPFZNS_1gEvE1SPNS_12_GLOBAL__N_11IEEEEvT_(
namespace {
struct I {
};
@@ -145,7 +145,7 @@ namespace test11 {
}
namespace test12 {
- // CHECK-DAG-LABEL: define linkonce_odr void @_ZN6test123fooIZNS_3barIZNS_3zedEvE2S2EEPvvE2S1EEvv
+ // CHECK-DAG: define linkonce_odr void @_ZN6test123fooIZNS_3barIZNS_3zedEvE2S2EEPvvE2S1EEvv
template <typename T> void foo() {}
template <typename T> inline void *bar() {
enum S1 {
@@ -161,7 +161,7 @@ namespace test12 {
}
namespace test13 {
- // CHECK-DAG-LABEL: define linkonce_odr void @_ZZN6test133fooEvEN1S3barEv(
+ // CHECK-DAG: define linkonce_odr void @_ZZN6test133fooEvEN1S3barEv(
inline void *foo() {
struct S {
static void bar() {}
@@ -172,7 +172,7 @@ namespace test13 {
}
namespace test14 {
- // CHECK-DAG-LABEL: define linkonce_odr void @_ZN6test143fooIZNS_1fEvE1SE3barILPS1_0EEEvv(
+ // CHECK-DAG: define linkonce_odr void @_ZN6test143fooIZNS_1fEvE1SE3barILPS1_0EEEvv(
template <typename T> struct foo {
template <T *P> static void bar() {}
static void *g() { return (void *)bar<nullptr>; }
@@ -186,7 +186,7 @@ namespace test14 {
}
namespace test15 {
- // CHECK-DAG-LABEL: define linkonce_odr void @_ZN6test153zedIZNS_3fooIiEEPvvE3barEEvv(
+ // CHECK-DAG: define linkonce_odr void @_ZN6test153zedIZNS_3fooIiEEPvvE3barEEvv(
template <class T> void zed() {}
template <class T> void *foo() {
class bar {
@@ -197,7 +197,7 @@ namespace test15 {
}
namespace test16 {
- // CHECK-DAG-LABEL: define linkonce_odr void @_ZN6test163zedIZNS_3fooIiE3barEvE1SEEvv(
+ // CHECK-DAG: define linkonce_odr void @_ZN6test163zedIZNS_3fooIiE3barEvE1SEEvv(
template <class T> void zed() {}
template <class T> struct foo {
static void *bar();
@@ -212,7 +212,7 @@ namespace test16 {
namespace test17 {
// CHECK-DAG: @_ZZN6test173fooILi42EEEPivE3bar = linkonce_odr
- // CHECK-DAG-LABEL: define weak_odr i32* @_ZN6test173fooILi42EEEPiv(
+ // CHECK-DAG: define weak_odr i32* @_ZN6test173fooILi42EEEPiv(
template<int I>
int *foo() {
static int bar;
@@ -220,3 +220,11 @@ namespace test17 {
}
template int *foo<42>();
}
+
+// PR18408
+namespace test18 {
+ template<template<typename> class> struct A {};
+ struct B { template<typename> struct C; };
+ void f(A<B::C>) {}
+ // CHECK-DAG: define void @_ZN6test181fENS_1AINS_1B1CEEE(
+}
diff --git a/test/CodeGenCXX/mangle-abi-examples.cpp b/test/CodeGenCXX/mangle-abi-examples.cpp
index 7124078320b0..6fb82cf8da5f 100644
--- a/test/CodeGenCXX/mangle-abi-examples.cpp
+++ b/test/CodeGenCXX/mangle-abi-examples.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
// CHECK: @_ZTVZ3foovEN1C1DE =
// CHECK: @_ZTVZN1A3fooEiE1B =
diff --git a/test/CodeGenCXX/mangle-address-space.cpp b/test/CodeGenCXX/mangle-address-space.cpp
index 4a4a1f3f56e9..a0b3c1aff224 100644
--- a/test/CodeGenCXX/mangle-address-space.cpp
+++ b/test/CodeGenCXX/mangle-address-space.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s
// CHECK-LABEL: define void @_Z2f0Pc
void f0(char *p) { }
diff --git a/test/CodeGenCXX/mangle-alias-template.cpp b/test/CodeGenCXX/mangle-alias-template.cpp
index b6719c545233..1dbb3eb67ad7 100644
--- a/test/CodeGenCXX/mangle-alias-template.cpp
+++ b/test/CodeGenCXX/mangle-alias-template.cpp
@@ -11,10 +11,6 @@ template<typename T> void g(T);
template<template<typename> class F> void h(F<int>);
-template<typename,typename,typename> struct S {};
-template<typename T, typename U> using U = S<T, int, U>;
-template<typename...Ts> void h(U<Ts...>, Ts...);
-
// CHECK-LABEL: define void @_Z1zv(
void z() {
vector<int> VI;
@@ -42,7 +38,4 @@ void z() {
Vec<Vec<int>> VVI;
g(VVI);
// CHECK: call void @_Z1gI6vectorIS0_Ii5allocIiEES1_IS3_EEEvT_(
-
- // CHECK: call void @_Z1hIJidEEv1UIDpT_ES2_
- h({}, 0, 0.0);
}
diff --git a/test/CodeGenCXX/mangle-lambdas.cpp b/test/CodeGenCXX/mangle-lambdas.cpp
index 659b437a0ef3..e8d3f1983d25 100644
--- a/test/CodeGenCXX/mangle-lambdas.cpp
+++ b/test/CodeGenCXX/mangle-lambdas.cpp
@@ -192,7 +192,7 @@ namespace PR12123 {
};
void B::h() { f(); }
}
-// CHECK-LABEL: define linkonce_odr %"struct.PR12123::A"* @_ZZN7PR121231B1fERKSt9type_infoEd_NKUlvE_clEv
+// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %"struct.PR12123::A"* @_ZZN7PR121231B1fERKSt9type_infoEd_NKUlvE_clEv
namespace PR12808 {
template <typename> struct B {
diff --git a/test/CodeGenCXX/mangle-local-class-names.cpp b/test/CodeGenCXX/mangle-local-class-names.cpp
index 8b950fcd1776..848e4604c4f2 100644
--- a/test/CodeGenCXX/mangle-local-class-names.cpp
+++ b/test/CodeGenCXX/mangle-local-class-names.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
// CHECK: @_ZZ4FUNCvEN4SSSSC1ERKf
// CHECK: @_ZZ4FUNCvEN4SSSSC2E_0RKf
diff --git a/test/CodeGenCXX/mangle-local-class-vtables.cpp b/test/CodeGenCXX/mangle-local-class-vtables.cpp
index d9d3afe45933..078d735d8f05 100644
--- a/test/CodeGenCXX/mangle-local-class-vtables.cpp
+++ b/test/CodeGenCXX/mangle-local-class-vtables.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
// CHECK: @_ZTVZN1J1KEvE1C = {{.*}} @_ZTIZN1J1KEvE1C {{.*}} @_ZZN1J1KEvENK1C1FEv
// CHECK: @_ZTIZN1J1KEvE1C = {{.*}} @_ZTSZN1J1KEvE1C
diff --git a/test/CodeGenCXX/mangle-local-classes-nested.cpp b/test/CodeGenCXX/mangle-local-classes-nested.cpp
index fafa5d4e58e6..cee541f8156a 100644
--- a/test/CodeGenCXX/mangle-local-classes-nested.cpp
+++ b/test/CodeGenCXX/mangle-local-classes-nested.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
// CHECK: @_ZTVZZ1HvEN1S1IEvE1S =
diff --git a/test/CodeGenCXX/mangle-ms-abi-examples.cpp b/test/CodeGenCXX/mangle-ms-abi-examples.cpp
index d6726cab0d58..5dc9d2e71dab 100644
--- a/test/CodeGenCXX/mangle-ms-abi-examples.cpp
+++ b/test/CodeGenCXX/mangle-ms-abi-examples.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fms-extensions -fno-rtti -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-pc-win32 | FileCheck %s
+// RUN: %clang_cc1 -fms-extensions -fno-rtti -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
// CHECK: @"\01??_7D@C@?1??foo@@YAXXZ@6B@" =
// CHECK: @"\01??_7B@?1??foo@A@@QAEXH@Z@6B@" =
@@ -11,7 +11,7 @@ struct A {
B();
}
};
-void foo () {
+inline void foo () {
struct C {
struct D { virtual ~D() {} };
void bar () {
@@ -25,4 +25,6 @@ void foo () {
C::D();
C().bar();
}
-
+void call () {
+ foo();
+}
diff --git a/test/CodeGenCXX/mangle-ms-arg-qualifiers.cpp b/test/CodeGenCXX/mangle-ms-arg-qualifiers.cpp
index 50a238340e18..fae2e1ab2dfa 100644
--- a/test/CodeGenCXX/mangle-ms-arg-qualifiers.cpp
+++ b/test/CodeGenCXX/mangle-ms-arg-qualifiers.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-pc-win32 | FileCheck %s
-// RUN: %clang_cc1 -emit-llvm %s -o - -cxx-abi microsoft -triple=x86_64-pc-win32 | FileCheck -check-prefix=X64 %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-win32 | FileCheck -check-prefix=X64 %s
void foo(const unsigned int) {}
// CHECK: "\01?foo@@YAXI@Z"
@@ -37,6 +37,22 @@ void foo_sad(char * const volatile x) {}
// CHECK: "\01?foo_sad@@YAXSAD@Z"
// X64: "\01?foo_sad@@YAXSEAD@Z"
+void foo_piad(char * __restrict x) {}
+// CHECK: "\01?foo_piad@@YAXPIAD@Z"
+// X64: "\01?foo_piad@@YAXPEIAD@Z"
+
+void foo_qiad(char * const __restrict x) {}
+// CHECK: "\01?foo_qiad@@YAXQIAD@Z"
+// X64: "\01?foo_qiad@@YAXQEIAD@Z"
+
+void foo_riad(char * volatile __restrict x) {}
+// CHECK: "\01?foo_riad@@YAXRIAD@Z"
+// X64: "\01?foo_riad@@YAXREIAD@Z"
+
+void foo_siad(char * const volatile __restrict x) {}
+// CHECK: "\01?foo_siad@@YAXSIAD@Z"
+// X64: "\01?foo_siad@@YAXSEIAD@Z"
+
void foo_papad(char ** x) {}
// CHECK: "\01?foo_papad@@YAXPAPAD@Z"
// X64: "\01?foo_papad@@YAXPEAPEAD@Z"
@@ -238,3 +254,7 @@ void mangle_yes_backref2(fun_type *const[], ptr_to_fun_type const[]) {}
void mangle_yes_backref3(ptr_to_fun_type *const, void (**const)(void)) {}
// CHECK: "\01?mangle_yes_backref3@@YAXQAP6AXXZ0@Z"
// X64: "\01?mangle_yes_backref3@@YAXQEAP6AXXZ0@Z"
+
+void mangle_yes_backref4(int *const __restrict, int *const __restrict) {}
+// CHECK: "\01?mangle_yes_backref4@@YAXQIAH0@Z"
+// X64: "\01?mangle_yes_backref4@@YAXQEIAH0@Z"
diff --git a/test/CodeGenCXX/mangle-ms-back-references-pr13207.cpp b/test/CodeGenCXX/mangle-ms-back-references-pr13207.cpp
index e10cc8e32986..5d4b6722f507 100644
--- a/test/CodeGenCXX/mangle-ms-back-references-pr13207.cpp
+++ b/test/CodeGenCXX/mangle-ms-back-references-pr13207.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-pc-win32 | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
template<class X, class Y, class Z>
class A {};
diff --git a/test/CodeGenCXX/mangle-ms-back-references.cpp b/test/CodeGenCXX/mangle-ms-back-references.cpp
index 4f1732688833..25a058a30dbe 100644
--- a/test/CodeGenCXX/mangle-ms-back-references.cpp
+++ b/test/CodeGenCXX/mangle-ms-back-references.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fms-extensions -fblocks -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-pc-win32 | FileCheck %s
+// RUN: %clang_cc1 -fms-extensions -fblocks -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
void f1(const char* a, const char* b) {}
// CHECK: "\01?f1@@YAXPBD0@Z"
diff --git a/test/CodeGenCXX/mangle-ms-cxx11.cpp b/test/CodeGenCXX/mangle-ms-cxx11.cpp
index 6947a53c4d1e..373d2b7b957f 100644
--- a/test/CodeGenCXX/mangle-ms-cxx11.cpp
+++ b/test/CodeGenCXX/mangle-ms-cxx11.cpp
@@ -1,4 +1,7 @@
-// RUN: %clang_cc1 -std=c++11 -fms-extensions -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-pc-win32 | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -fms-extensions -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
+
+// CHECK: "\01?DeducedType@@3HA"
+auto DeducedType = 30;
// CHECK: "\01?LRef@@YAXAAH@Z"
void LRef(int& a) { }
@@ -9,3 +12,130 @@ int RRef(int&& a) { return a; }
// CHECK: "\01?Null@@YAX$$T@Z"
namespace std { typedef decltype(__nullptr) nullptr_t; }
void Null(std::nullptr_t) {}
+
+namespace EnumMangling {
+ extern enum Enum01 { } Enum;
+ extern enum Enum02 : bool { } BoolEnum;
+ extern enum Enum03 : char { } CharEnum;
+ extern enum Enum04 : signed char { } SCharEnum;
+ extern enum Enum05 : unsigned char { } UCharEnum;
+ extern enum Enum06 : short { } SShortEnum;
+ extern enum Enum07 : unsigned short { } UShortEnum;
+ extern enum Enum08 : int { } SIntEnum;
+ extern enum Enum09 : unsigned int { } UIntEnum;
+ extern enum Enum10 : long { } SLongEnum;
+ extern enum Enum11 : unsigned long { } ULongEnum;
+ extern enum Enum12 : long long { } SLongLongEnum;
+ extern enum Enum13 : unsigned long long { } ULongLongEnum;
+// CHECK-DAG: @"\01?Enum@EnumMangling@@3W4Enum01@1@A"
+// CHECK-DAG: @"\01?BoolEnum@EnumMangling@@3W4Enum02@1@A
+// CHECK-DAG: @"\01?CharEnum@EnumMangling@@3W4Enum03@1@A
+// CHECK-DAG: @"\01?SCharEnum@EnumMangling@@3W4Enum04@1@A
+// CHECK-DAG: @"\01?UCharEnum@EnumMangling@@3W4Enum05@1@A
+// CHECK-DAG: @"\01?SShortEnum@EnumMangling@@3W4Enum06@1@A"
+// CHECK-DAG: @"\01?UShortEnum@EnumMangling@@3W4Enum07@1@A"
+// CHECK-DAG: @"\01?SIntEnum@EnumMangling@@3W4Enum08@1@A"
+// CHECK-DAG: @"\01?UIntEnum@EnumMangling@@3W4Enum09@1@A"
+// CHECK-DAG: @"\01?SLongEnum@EnumMangling@@3W4Enum10@1@A"
+// CHECK-DAG: @"\01?ULongEnum@EnumMangling@@3W4Enum11@1@A"
+// CHECK-DAG: @"\01?SLongLongEnum@EnumMangling@@3W4Enum12@1@A"
+// CHECK-DAG: @"\01?ULongLongEnum@EnumMangling@@3W4Enum13@1@A"
+ decltype(Enum) *UseEnum() { return &Enum; }
+ decltype(BoolEnum) *UseBoolEnum() { return &BoolEnum; }
+ decltype(CharEnum) *UseCharEnum() { return &CharEnum; }
+ decltype(SCharEnum) *UseSCharEnum() { return &SCharEnum; }
+ decltype(UCharEnum) *UseUCharEnum() { return &UCharEnum; }
+ decltype(SShortEnum) *UseSShortEnum() { return &SShortEnum; }
+ decltype(UShortEnum) *UseUShortEnum() { return &UShortEnum; }
+ decltype(SIntEnum) *UseSIntEnum() { return &SIntEnum; }
+ decltype(UIntEnum) *UseUIntEnum() { return &UIntEnum; }
+ decltype(SLongEnum) *UseSLongEnum() { return &SLongEnum; }
+ decltype(ULongEnum) *UseULongEnum() { return &ULongEnum; }
+ decltype(SLongLongEnum) *UseSLongLongEnum() { return &SLongLongEnum; }
+ decltype(ULongLongEnum) *UseULongLongEnum() { return &ULongLongEnum; }
+ extern enum class EnumClass01 { } EnumClass;
+ extern enum class EnumClass02 : bool { } BoolEnumClass;
+ extern enum class EnumClass03 : char { } CharEnumClass;
+ extern enum class EnumClass04 : signed char { } SCharEnumClass;
+ extern enum class EnumClass05 : unsigned char { } UCharEnumClass;
+ extern enum class EnumClass06 : short { } SShortEnumClass;
+ extern enum class EnumClass07 : unsigned short { } UShortEnumClass;
+ extern enum class EnumClass08 : int { } SIntEnumClass;
+ extern enum class EnumClass09 : unsigned int { } UIntEnumClass;
+ extern enum class EnumClass10 : long { } SLongEnumClass;
+ extern enum class EnumClass11 : unsigned long { } ULongEnumClass;
+ extern enum class EnumClass12 : long long { } SLongLongEnumClass;
+ extern enum class EnumClass13 : unsigned long long { } ULongLongEnumClass;
+// CHECK-DAG: @"\01?EnumClass@EnumMangling@@3W4EnumClass01@1@A"
+// CHECK-DAG: @"\01?BoolEnumClass@EnumMangling@@3W4EnumClass02@1@A
+// CHECK-DAG: @"\01?CharEnumClass@EnumMangling@@3W4EnumClass03@1@A
+// CHECK-DAG: @"\01?SCharEnumClass@EnumMangling@@3W4EnumClass04@1@A
+// CHECK-DAG: @"\01?UCharEnumClass@EnumMangling@@3W4EnumClass05@1@A
+// CHECK-DAG: @"\01?SShortEnumClass@EnumMangling@@3W4EnumClass06@1@A"
+// CHECK-DAG: @"\01?UShortEnumClass@EnumMangling@@3W4EnumClass07@1@A"
+// CHECK-DAG: @"\01?SIntEnumClass@EnumMangling@@3W4EnumClass08@1@A"
+// CHECK-DAG: @"\01?UIntEnumClass@EnumMangling@@3W4EnumClass09@1@A"
+// CHECK-DAG: @"\01?SLongEnumClass@EnumMangling@@3W4EnumClass10@1@A"
+// CHECK-DAG: @"\01?ULongEnumClass@EnumMangling@@3W4EnumClass11@1@A"
+// CHECK-DAG: @"\01?SLongLongEnumClass@EnumMangling@@3W4EnumClass12@1@A"
+// CHECK-DAG: @"\01?ULongLongEnumClass@EnumMangling@@3W4EnumClass13@1@A"
+ decltype(EnumClass) *UseEnumClass() { return &EnumClass; }
+ decltype(BoolEnumClass) *UseBoolEnumClass() { return &BoolEnumClass; }
+ decltype(CharEnumClass) *UseCharEnumClass() { return &CharEnumClass; }
+ decltype(SCharEnumClass) *UseSCharEnumClass() { return &SCharEnumClass; }
+ decltype(UCharEnumClass) *UseUCharEnumClass() { return &UCharEnumClass; }
+ decltype(SShortEnumClass) *UseSShortEnumClass() { return &SShortEnumClass; }
+ decltype(UShortEnumClass) *UseUShortEnumClass() { return &UShortEnumClass; }
+ decltype(SIntEnumClass) *UseSIntEnumClass() { return &SIntEnumClass; }
+ decltype(UIntEnumClass) *UseUIntEnumClass() { return &UIntEnumClass; }
+ decltype(SLongEnumClass) *UseSLongEnumClass() { return &SLongEnumClass; }
+ decltype(ULongEnumClass) *UseULongEnumClass() { return &ULongEnumClass; }
+ decltype(SLongLongEnumClass) *UseSLongLongEnumClass() { return &SLongLongEnumClass; }
+ decltype(ULongLongEnumClass) *UseULongLongEnumClass() { return &ULongLongEnumClass; }
+}
+
+namespace PR18022 {
+
+struct { } a;
+decltype(a) fun(decltype(a) x, decltype(a)) { return x; }
+// CHECK-DAG: ?fun@PR18022@@YA?AU<unnamed-type-a>@1@U21@0@Z
+
+}
+
+inline int define_lambda() {
+ static auto lambda = [] { static int local; ++local; return local; };
+// First, we have the static local variable of type "<lambda_1>" inside of
+// "define_lambda".
+// CHECK-DAG: ?lambda@?1??define_lambda@@YAHXZ@4V<lambda_1>@@A
+// Next, we have the "operator()" for "<lambda_1>" which is inside of
+// "define_lambda".
+// CHECK-DAG: ??R<lambda_1>@?define_lambda@@YAHXZ@QBEHXZ
+// Finally, we have the local which is inside of "<lambda_1>" which is inside of
+// "define_lambda". Hooray.
+// CHECK-DAG: ?local@?2???R<lambda_1>@?define_lambda@@YAHXZ@QBEHXZ@4HA
+ return lambda();
+}
+
+int call_lambda() {
+ return define_lambda();
+}
+
+namespace PR19361 {
+struct A {
+ void foo() __restrict &;
+ void foo() __restrict &&;
+};
+void A::foo() __restrict & {}
+// CHECK-DAG: @"\01?foo@A@PR19361@@QIGAEXXZ"
+void A::foo() __restrict && {}
+// CHECK-DAG: @"\01?foo@A@PR19361@@QIHAEXXZ"
+}
+
+int operator"" _deg(long double) { return 0; }
+// CHECK-DAG: @"\01??__K_deg@@YAHO@Z"
+
+template <char...>
+void templ_fun_with_pack() {}
+
+template void templ_fun_with_pack<>();
+// CHECK-DAG: @"\01??$templ_fun_with_pack@$S@@YAXXZ"
diff --git a/test/CodeGenCXX/mangle-ms-cxx14.cpp b/test/CodeGenCXX/mangle-ms-cxx14.cpp
new file mode 100644
index 000000000000..03995611d252
--- /dev/null
+++ b/test/CodeGenCXX/mangle-ms-cxx14.cpp
@@ -0,0 +1,40 @@
+// RUN: %clang_cc1 -std=c++1y -fms-extensions -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
+
+template <typename> int x = 0;
+
+// CHECK: "\01??$x@X@@3HA"
+template <> int x<void>;
+// CHECK: "\01??$x@H@@3HA"
+template <> int x<int>;
+
+// CHECK: "\01?FunctionWithLocalType@@YA?A?<auto>@@XZ"
+auto FunctionWithLocalType() {
+ struct LocalType {};
+ return LocalType{};
+}
+
+// CHECK: "\01?ValueFromFunctionWithLocalType@@3ULocalType@?0??FunctionWithLocalType@@YA?A?<auto>@@XZ@A"
+auto ValueFromFunctionWithLocalType = FunctionWithLocalType();
+
+// CHECK: "\01??R<lambda_0>@@QBE?A?<auto>@@XZ"
+auto LambdaWithLocalType = [] {
+ struct LocalType {};
+ return LocalType{};
+};
+
+// CHECK: "\01?ValueFromLambdaWithLocalType@@3ULocalType@?0???R<lambda_0>@@QBE?A?<auto>@@XZ@A"
+auto ValueFromLambdaWithLocalType = LambdaWithLocalType();
+
+template <typename T>
+auto TemplateFuncionWithLocalLambda(T) {
+ auto LocalLambdaWithLocalType = []() {
+ struct LocalType {};
+ return LocalType{};
+ };
+ return LocalLambdaWithLocalType();
+}
+
+// CHECK: "\01?ValueFromTemplateFuncionWithLocalLambda@@3ULocalType@?2???R<lambda_1>@??$TemplateFuncionWithLocalLambda@H@@YA?A?<auto>@@H@Z@QBA?A?3@XZ@A"
+// CHECK: "\01??$TemplateFuncionWithLocalLambda@H@@YA?A?<auto>@@H@Z"
+// CHECK: "\01??R<lambda_1>@??$TemplateFuncionWithLocalLambda@H@@YA?A?<auto>@@H@Z@QBA?A?1@XZ"
+auto ValueFromTemplateFuncionWithLocalLambda = TemplateFuncionWithLocalLambda(0);
diff --git a/test/CodeGenCXX/mangle-ms-return-qualifiers.cpp b/test/CodeGenCXX/mangle-ms-return-qualifiers.cpp
index 87e04c645ece..37bbf099fab0 100644
--- a/test/CodeGenCXX/mangle-ms-return-qualifiers.cpp
+++ b/test/CodeGenCXX/mangle-ms-return-qualifiers.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-pc-win32 | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
void a1() {}
// CHECK: "\01?a1@@YAXXZ"
@@ -164,6 +164,12 @@ int S::* f8() { return 0; }
int S::* const f9() { return 0; }
// CHECK: "\01?f9@@YAQQS@@HXZ"
+int S::* __restrict f10() { return 0; }
+// CHECK: "\01?f10@@YAPIQS@@HXZ"
+
+int S::* const __restrict f11() { return 0; }
+// CHECK: "\01?f11@@YAQIQS@@HXZ"
+
typedef int (*function_pointer)(int);
function_pointer g1() { return 0; }
diff --git a/test/CodeGenCXX/mangle-ms-string-literals.cpp b/test/CodeGenCXX/mangle-ms-string-literals.cpp
new file mode 100644
index 000000000000..a77a04f71e0a
--- /dev/null
+++ b/test/CodeGenCXX/mangle-ms-string-literals.cpp
@@ -0,0 +1,721 @@
+// RUN: %clang_cc1 -x c++ -std=c++11 -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -emit-llvm %s -o - -triple=x86_64-pc-win32 | FileCheck %s
+
+const char *l255 = "\xff";
+const char *l254 = "\xfe";
+const char *l253 = "\xfd";
+const char *l252 = "\xfc";
+const char *l251 = "\xfb";
+const char *l250 = "\xfa";
+const char *l249 = "\xf9";
+const char *l248 = "\xf8";
+const char *l247 = "\xf7";
+const char *l246 = "\xf6";
+const char *l245 = "\xf5";
+const char *l244 = "\xf4";
+const char *l243 = "\xf3";
+const char *l242 = "\xf2";
+const char *l241 = "\xf1";
+const char *l240 = "\xf0";
+const char *l239 = "\xef";
+const char *l238 = "\xee";
+const char *l237 = "\xed";
+const char *l236 = "\xec";
+const char *l235 = "\xeb";
+const char *l234 = "\xea";
+const char *l233 = "\xe9";
+const char *l232 = "\xe8";
+const char *l231 = "\xe7";
+const char *l230 = "\xe6";
+const char *l229 = "\xe5";
+const char *l228 = "\xe4";
+const char *l227 = "\xe3";
+const char *l226 = "\xe2";
+const char *l225 = "\xe1";
+const char *l224 = "\xe0";
+const char *l223 = "\xdf";
+const char *l222 = "\xde";
+const char *l221 = "\xdd";
+const char *l220 = "\xdc";
+const char *l219 = "\xdb";
+const char *l218 = "\xda";
+const char *l217 = "\xd9";
+const char *l216 = "\xd8";
+const char *l215 = "\xd7";
+const char *l214 = "\xd6";
+const char *l213 = "\xd5";
+const char *l212 = "\xd4";
+const char *l211 = "\xd3";
+const char *l210 = "\xd2";
+const char *l209 = "\xd1";
+const char *l208 = "\xd0";
+const char *l207 = "\xcf";
+const char *l206 = "\xce";
+const char *l205 = "\xcd";
+const char *l204 = "\xcc";
+const char *l203 = "\xcb";
+const char *l202 = "\xca";
+const char *l201 = "\xc9";
+const char *l200 = "\xc8";
+const char *l199 = "\xc7";
+const char *l198 = "\xc6";
+const char *l197 = "\xc5";
+const char *l196 = "\xc4";
+const char *l195 = "\xc3";
+const char *l194 = "\xc2";
+const char *l193 = "\xc1";
+const char *l192 = "\xc0";
+const char *l191 = "\xbf";
+const char *l190 = "\xbe";
+const char *l189 = "\xbd";
+const char *l188 = "\xbc";
+const char *l187 = "\xbb";
+const char *l186 = "\xba";
+const char *l185 = "\xb9";
+const char *l184 = "\xb8";
+const char *l183 = "\xb7";
+const char *l182 = "\xb6";
+const char *l181 = "\xb5";
+const char *l180 = "\xb4";
+const char *l179 = "\xb3";
+const char *l178 = "\xb2";
+const char *l177 = "\xb1";
+const char *l176 = "\xb0";
+const char *l175 = "\xaf";
+const char *l174 = "\xae";
+const char *l173 = "\xad";
+const char *l172 = "\xac";
+const char *l171 = "\xab";
+const char *l170 = "\xaa";
+const char *l169 = "\xa9";
+const char *l168 = "\xa8";
+const char *l167 = "\xa7";
+const char *l166 = "\xa6";
+const char *l165 = "\xa5";
+const char *l164 = "\xa4";
+const char *l163 = "\xa3";
+const char *l162 = "\xa2";
+const char *l161 = "\xa1";
+const char *l160 = "\xa0";
+const char *l159 = "\x9f";
+const char *l158 = "\x9e";
+const char *l157 = "\x9d";
+const char *l156 = "\x9c";
+const char *l155 = "\x9b";
+const char *l154 = "\x9a";
+const char *l153 = "\x99";
+const char *l152 = "\x98";
+const char *l151 = "\x97";
+const char *l150 = "\x96";
+const char *l149 = "\x95";
+const char *l148 = "\x94";
+const char *l147 = "\x93";
+const char *l146 = "\x92";
+const char *l145 = "\x91";
+const char *l144 = "\x90";
+const char *l143 = "\x8f";
+const char *l142 = "\x8e";
+const char *l141 = "\x8d";
+const char *l140 = "\x8c";
+const char *l139 = "\x8b";
+const char *l138 = "\x8a";
+const char *l137 = "\x89";
+const char *l136 = "\x88";
+const char *l135 = "\x87";
+const char *l134 = "\x86";
+const char *l133 = "\x85";
+const char *l132 = "\x84";
+const char *l131 = "\x83";
+const char *l130 = "\x82";
+const char *l129 = "\x81";
+const char *l128 = "\x80";
+const char *l127 = "\x7f";
+const char *l126 = "\x7e";
+const char *l125 = "\x7d";
+const char *l124 = "\x7c";
+const char *l123 = "\x7b";
+const char *l122 = "\x7a";
+const char *l121 = "\x79";
+const char *l120 = "\x78";
+const char *l119 = "\x77";
+const char *l118 = "\x76";
+const char *l117 = "\x75";
+const char *l116 = "\x74";
+const char *l115 = "\x73";
+const char *l114 = "\x72";
+const char *l113 = "\x71";
+const char *l112 = "\x70";
+const char *l111 = "\x6f";
+const char *l110 = "\x6e";
+const char *l109 = "\x6d";
+const char *l108 = "\x6c";
+const char *l107 = "\x6b";
+const char *l106 = "\x6a";
+const char *l105 = "\x69";
+const char *l104 = "\x68";
+const char *l103 = "\x67";
+const char *l102 = "\x66";
+const char *l101 = "\x65";
+const char *l100 = "\x64";
+const char *l99 = "\x63";
+const char *l98 = "\x62";
+const char *l97 = "\x61";
+const char *l96 = "\x60";
+const char *l95 = "\x5f";
+const char *l94 = "\x5e";
+const char *l93 = "\x5d";
+const char *l92 = "\x5c";
+const char *l91 = "\x5b";
+const char *l90 = "\x5a";
+const char *l89 = "\x59";
+const char *l88 = "\x58";
+const char *l87 = "\x57";
+const char *l86 = "\x56";
+const char *l85 = "\x55";
+const char *l84 = "\x54";
+const char *l83 = "\x53";
+const char *l82 = "\x52";
+const char *l81 = "\x51";
+const char *l80 = "\x50";
+const char *l79 = "\x4f";
+const char *l78 = "\x4e";
+const char *l77 = "\x4d";
+const char *l76 = "\x4c";
+const char *l75 = "\x4b";
+const char *l74 = "\x4a";
+const char *l73 = "\x49";
+const char *l72 = "\x48";
+const char *l71 = "\x47";
+const char *l70 = "\x46";
+const char *l69 = "\x45";
+const char *l68 = "\x44";
+const char *l67 = "\x43";
+const char *l66 = "\x42";
+const char *l65 = "\x41";
+const char *l64 = "\x40";
+const char *l63 = "\x3f";
+const char *l62 = "\x3e";
+const char *l61 = "\x3d";
+const char *l60 = "\x3c";
+const char *l59 = "\x3b";
+const char *l58 = "\x3a";
+const char *l57 = "\x39";
+const char *l56 = "\x38";
+const char *l55 = "\x37";
+const char *l54 = "\x36";
+const char *l53 = "\x35";
+const char *l52 = "\x34";
+const char *l51 = "\x33";
+const char *l50 = "\x32";
+const char *l49 = "\x31";
+const char *l48 = "\x30";
+const char *l47 = "\x2f";
+const char *l46 = "\x2e";
+const char *l45 = "\x2d";
+const char *l44 = "\x2c";
+const char *l43 = "\x2b";
+const char *l42 = "\x2a";
+const char *l41 = "\x29";
+const char *l40 = "\x28";
+const char *l39 = "\x27";
+const char *l38 = "\x26";
+const char *l37 = "\x25";
+const char *l36 = "\x24";
+const char *l35 = "\x23";
+const char *l34 = "\x22";
+const char *l33 = "\x21";
+const char *l32 = "\x20";
+const char *l31 = "\x1f";
+const char *l30 = "\x1e";
+const char *l29 = "\x1d";
+const char *l28 = "\x1c";
+const char *l27 = "\x1b";
+const char *l26 = "\x1a";
+const char *l25 = "\x19";
+const char *l24 = "\x18";
+const char *l23 = "\x17";
+const char *l22 = "\x16";
+const char *l21 = "\x15";
+const char *l20 = "\x14";
+const char *l19 = "\x13";
+const char *l18 = "\x12";
+const char *l17 = "\x11";
+const char *l16 = "\x10";
+const char *l15 = "\xf";
+const char *l14 = "\xe";
+const char *l13 = "\xd";
+const char *l12 = "\xc";
+const char *l11 = "\xb";
+const char *l10 = "\xa";
+const char *l9 = "\x9";
+const char *l8 = "\x8";
+const char *l7 = "\x7";
+const char *l6 = "\x6";
+const char *l5 = "\x5";
+const char *l4 = "\x4";
+const char *l3 = "\x3";
+const char *l2 = "\x2";
+const char *l1 = "\x1";
+const char *l0 = "\x0";
+
+// CHECK: @"\01??_C@_01CNACBAHC@?$PP?$AA@"
+// CHECK: @"\01??_C@_01DEBJCBDD@?$PO?$AA@"
+// CHECK: @"\01??_C@_01BPDEHCPA@?$PN?$AA@"
+// CHECK: @"\01??_C@_01GCPEDLB@?$PM?$AA@"
+// CHECK: @"\01??_C@_01EJGONFHG@?$PL?$AA@"
+// CHECK: @"\01??_C@_01FAHFOEDH@?z?$AA@"
+// CHECK: @"\01??_C@_01HLFILHPE@?y?$AA@"
+// CHECK: @"\01??_C@_01GCEDIGLF@?x?$AA@"
+// CHECK: @"\01??_C@_01OFNLJKHK@?w?$AA@"
+// CHECK: @"\01??_C@_01PMMAKLDL@?v?$AA@"
+// CHECK: @"\01??_C@_01NHONPIPI@?u?$AA@"
+// CHECK: @"\01??_C@_01MOPGMJLJ@?t?$AA@"
+// CHECK: @"\01??_C@_01IBLHFPHO@?s?$AA@"
+// CHECK: @"\01??_C@_01JIKMGODP@?r?$AA@"
+// CHECK: @"\01??_C@_01LDIBDNPM@?q?$AA@"
+// CHECK: @"\01??_C@_01KKJKAMLN@?p?$AA@"
+// CHECK: @"\01??_C@_01GHMAACCD@?o?$AA@"
+// CHECK: @"\01??_C@_01HONLDDGC@?n?$AA@"
+// CHECK: @"\01??_C@_01FFPGGAKB@?m?$AA@"
+// CHECK: @"\01??_C@_01EMONFBOA@?l?$AA@"
+// CHECK: @"\01??_C@_01DKMMHCH@?k?$AA@"
+// CHECK: @"\01??_C@_01BKLHPGGG@?j?$AA@"
+// CHECK: @"\01??_C@_01DBJKKFKF@?i?$AA@"
+// CHECK: @"\01??_C@_01CIIBJEOE@?h?$AA@"
+// CHECK: @"\01??_C@_01KPBJIICL@?g?$AA@"
+// CHECK: @"\01??_C@_01LGACLJGK@?f?$AA@"
+// CHECK: @"\01??_C@_01JNCPOKKJ@?e?$AA@"
+// CHECK: @"\01??_C@_01IEDENLOI@?d?$AA@"
+// CHECK: @"\01??_C@_01MLHFENCP@?c?$AA@"
+// CHECK: @"\01??_C@_01NCGOHMGO@?b?$AA@"
+// CHECK: @"\01??_C@_01PJEDCPKN@?a?$AA@"
+// CHECK: @"\01??_C@_01OAFIBOOM@?$OA?$AA@"
+// CHECK: @"\01??_C@_01LIIGDENA@?$NP?$AA@"
+// CHECK: @"\01??_C@_01KBJNAFJB@?$NO?$AA@"
+// CHECK: @"\01??_C@_01IKLAFGFC@?$NN?$AA@"
+// CHECK: @"\01??_C@_01JDKLGHBD@?$NM?$AA@"
+// CHECK: @"\01??_C@_01NMOKPBNE@?$NL?$AA@"
+// CHECK: @"\01??_C@_01MFPBMAJF@?Z?$AA@"
+// CHECK: @"\01??_C@_01OONMJDFG@?Y?$AA@"
+// CHECK: @"\01??_C@_01PHMHKCBH@?X?$AA@"
+// CHECK: @"\01??_C@_01HAFPLONI@?W?$AA@"
+// CHECK: @"\01??_C@_01GJEEIPJJ@?V?$AA@"
+// CHECK: @"\01??_C@_01ECGJNMFK@?U?$AA@"
+// CHECK: @"\01??_C@_01FLHCONBL@?T?$AA@"
+// CHECK: @"\01??_C@_01BEDDHLNM@?S?$AA@"
+// CHECK: @"\01??_C@_01NCIEKJN@?R?$AA@"
+// CHECK: @"\01??_C@_01CGAFBJFO@?Q?$AA@"
+// CHECK: @"\01??_C@_01DPBOCIBP@?P?$AA@"
+// CHECK: @"\01??_C@_01PCEECGIB@?O?$AA@"
+// CHECK: @"\01??_C@_01OLFPBHMA@?N?$AA@"
+// CHECK: @"\01??_C@_01MAHCEEAD@?M?$AA@"
+// CHECK: @"\01??_C@_01NJGJHFEC@?L?$AA@"
+// CHECK: @"\01??_C@_01JGCIODIF@?K?$AA@"
+// CHECK: @"\01??_C@_01IPDDNCME@?J?$AA@"
+// CHECK: @"\01??_C@_01KEBOIBAH@?I?$AA@"
+// CHECK: @"\01??_C@_01LNAFLAEG@?H?$AA@"
+// CHECK: @"\01??_C@_01DKJNKMIJ@?G?$AA@"
+// CHECK: @"\01??_C@_01CDIGJNMI@?F?$AA@"
+// CHECK: @"\01??_C@_01IKLMOAL@?E?$AA@"
+// CHECK: @"\01??_C@_01BBLAPPEK@?D?$AA@"
+// CHECK: @"\01??_C@_01FOPBGJIN@?C?$AA@"
+// CHECK: @"\01??_C@_01EHOKFIMM@?B?$AA@"
+// CHECK: @"\01??_C@_01GMMHALAP@?A?$AA@"
+// CHECK: @"\01??_C@_01HFNMDKEO@?$MA?$AA@"
+// CHECK: @"\01??_C@_01NNHLFPHH@?$LP?$AA@"
+// CHECK: @"\01??_C@_01MEGAGODG@?$LO?$AA@"
+// CHECK: @"\01??_C@_01OPENDNPF@?$LN?$AA@"
+// CHECK: @"\01??_C@_01PGFGAMLE@?$LM?$AA@"
+// CHECK: @"\01??_C@_01LJBHJKHD@?$LL?$AA@"
+// CHECK: @"\01??_C@_01KAAMKLDC@?$LK?$AA@"
+// CHECK: @"\01??_C@_01ILCBPIPB@?$LJ?$AA@"
+// CHECK: @"\01??_C@_01JCDKMJLA@?$LI?$AA@"
+// CHECK: @"\01??_C@_01BFKCNFHP@?$LH?$AA@"
+// CHECK: @"\01??_C@_01MLJOEDO@?$LG?$AA@"
+// CHECK: @"\01??_C@_01CHJELHPN@?$LF?$AA@"
+// CHECK: @"\01??_C@_01DOIPIGLM@?$LE?$AA@"
+// CHECK: @"\01??_C@_01HBMOBAHL@?$LD?$AA@"
+// CHECK: @"\01??_C@_01GINFCBDK@?$LC?$AA@"
+// CHECK: @"\01??_C@_01EDPIHCPJ@?$LB?$AA@"
+// CHECK: @"\01??_C@_01FKODEDLI@?$LA?$AA@"
+// CHECK: @"\01??_C@_01JHLJENCG@?$KP?$AA@"
+// CHECK: @"\01??_C@_01IOKCHMGH@?$KO?$AA@"
+// CHECK: @"\01??_C@_01KFIPCPKE@?$KN?$AA@"
+// CHECK: @"\01??_C@_01LMJEBOOF@?$KM?$AA@"
+// CHECK: @"\01??_C@_01PDNFIICC@?$KL?$AA@"
+// CHECK: @"\01??_C@_01OKMOLJGD@?$KK?$AA@"
+// CHECK: @"\01??_C@_01MBODOKKA@?$KJ?$AA@"
+// CHECK: @"\01??_C@_01NIPINLOB@?$KI?$AA@"
+// CHECK: @"\01??_C@_01FPGAMHCO@?$KH?$AA@"
+// CHECK: @"\01??_C@_01EGHLPGGP@?$KG?$AA@"
+// CHECK: @"\01??_C@_01GNFGKFKM@?$KF?$AA@"
+// CHECK: @"\01??_C@_01HEENJEON@?$KE?$AA@"
+// CHECK: @"\01??_C@_01DLAMACCK@?$KD?$AA@"
+// CHECK: @"\01??_C@_01CCBHDDGL@?$KC?$AA@"
+// CHECK: @"\01??_C@_01JDKGAKI@?$KB?$AA@"
+// CHECK: @"\01??_C@_01BACBFBOJ@?$KA?$AA@"
+// CHECK: @"\01??_C@_01EIPPHLNF@?$JP?$AA@"
+// CHECK: @"\01??_C@_01FBOEEKJE@?$JO?$AA@"
+// CHECK: @"\01??_C@_01HKMJBJFH@?$JN?$AA@"
+// CHECK: @"\01??_C@_01GDNCCIBG@?$JM?$AA@"
+// CHECK: @"\01??_C@_01CMJDLONB@?$JL?$AA@"
+// CHECK: @"\01??_C@_01DFIIIPJA@?$JK?$AA@"
+// CHECK: @"\01??_C@_01BOKFNMFD@?$JJ?$AA@"
+// CHECK: @"\01??_C@_01HLOONBC@?$JI?$AA@"
+// CHECK: @"\01??_C@_01IACGPBNN@?$JH?$AA@"
+// CHECK: @"\01??_C@_01JJDNMAJM@?$JG?$AA@"
+// CHECK: @"\01??_C@_01LCBAJDFP@?$JF?$AA@"
+// CHECK: @"\01??_C@_01KLALKCBO@?$JE?$AA@"
+// CHECK: @"\01??_C@_01OEEKDENJ@?$JD?$AA@"
+// CHECK: @"\01??_C@_01PNFBAFJI@?$JC?$AA@"
+// CHECK: @"\01??_C@_01NGHMFGFL@?$JB?$AA@"
+// CHECK: @"\01??_C@_01MPGHGHBK@?$JA?$AA@"
+// CHECK: @"\01??_C@_01CDNGJIE@?$IP?$AA@"
+// CHECK: @"\01??_C@_01BLCGFIMF@?$IO?$AA@"
+// CHECK: @"\01??_C@_01DAALALAG@?$IN?$AA@"
+// CHECK: @"\01??_C@_01CJBADKEH@?$IM?$AA@"
+// CHECK: @"\01??_C@_01GGFBKMIA@?$IL?$AA@"
+// CHECK: @"\01??_C@_01HPEKJNMB@?$IK?$AA@"
+// CHECK: @"\01??_C@_01FEGHMOAC@?$IJ?$AA@"
+// CHECK: @"\01??_C@_01ENHMPPED@?$II?$AA@"
+// CHECK: @"\01??_C@_01MKOEODIM@?$IH?$AA@"
+// CHECK: @"\01??_C@_01NDPPNCMN@?$IG?$AA@"
+// CHECK: @"\01??_C@_01PINCIBAO@?$IF?$AA@"
+// CHECK: @"\01??_C@_01OBMJLAEP@?$IE?$AA@"
+// CHECK: @"\01??_C@_01KOIICGII@?$ID?$AA@"
+// CHECK: @"\01??_C@_01LHJDBHMJ@?$IC?$AA@"
+// CHECK: @"\01??_C@_01JMLOEEAK@?$IB?$AA@"
+// CHECK: @"\01??_C@_01IFKFHFEL@?$IA?$AA@"
+// CHECK: @"\01??_C@_01BGIBIIDJ@?$HP?$AA@"
+// CHECK: @"\01??_C@_01PJKLJHI@?$HO?$AA@"
+// CHECK: @"\01??_C@_01CELHOKLL@?$HN?$AA@"
+// CHECK: @"\01??_C@_01DNKMNLPK@?$HM?$AA@"
+// CHECK: @"\01??_C@_01HCONENDN@?$HL?$AA@"
+// CHECK: @"\01??_C@_01GLPGHMHM@z?$AA@"
+// CHECK: @"\01??_C@_01EANLCPLP@y?$AA@"
+// CHECK: @"\01??_C@_01FJMABOPO@x?$AA@"
+// CHECK: @"\01??_C@_01NOFIACDB@w?$AA@"
+// CHECK: @"\01??_C@_01MHEDDDHA@v?$AA@"
+// CHECK: @"\01??_C@_01OMGOGALD@u?$AA@"
+// CHECK: @"\01??_C@_01PFHFFBPC@t?$AA@"
+// CHECK: @"\01??_C@_01LKDEMHDF@s?$AA@"
+// CHECK: @"\01??_C@_01KDCPPGHE@r?$AA@"
+// CHECK: @"\01??_C@_01IIACKFLH@q?$AA@"
+// CHECK: @"\01??_C@_01JBBJJEPG@p?$AA@"
+// CHECK: @"\01??_C@_01FMEDJKGI@o?$AA@"
+// CHECK: @"\01??_C@_01EFFIKLCJ@n?$AA@"
+// CHECK: @"\01??_C@_01GOHFPIOK@m?$AA@"
+// CHECK: @"\01??_C@_01HHGOMJKL@l?$AA@"
+// CHECK: @"\01??_C@_01DICPFPGM@k?$AA@"
+// CHECK: @"\01??_C@_01CBDEGOCN@j?$AA@"
+// CHECK: @"\01??_C@_01KBJDNOO@i?$AA@"
+// CHECK: @"\01??_C@_01BDACAMKP@h?$AA@"
+// CHECK: @"\01??_C@_01JEJKBAGA@g?$AA@"
+// CHECK: @"\01??_C@_01INIBCBCB@f?$AA@"
+// CHECK: @"\01??_C@_01KGKMHCOC@e?$AA@"
+// CHECK: @"\01??_C@_01LPLHEDKD@d?$AA@"
+// CHECK: @"\01??_C@_01PAPGNFGE@c?$AA@"
+// CHECK: @"\01??_C@_01OJONOECF@b?$AA@"
+// CHECK: @"\01??_C@_01MCMALHOG@a?$AA@"
+// CHECK: @"\01??_C@_01NLNLIGKH@?$GA?$AA@"
+// CHECK: @"\01??_C@_01IDAFKMJL@_?$AA@"
+// CHECK: @"\01??_C@_01JKBOJNNK@?$FO?$AA@"
+// CHECK: @"\01??_C@_01LBDDMOBJ@?$FN?$AA@"
+// CHECK: @"\01??_C@_01KICIPPFI@?2?$AA@"
+// CHECK: @"\01??_C@_01OHGJGJJP@?$FL?$AA@"
+// CHECK: @"\01??_C@_01POHCFINO@Z?$AA@"
+// CHECK: @"\01??_C@_01NFFPALBN@Y?$AA@"
+// CHECK: @"\01??_C@_01MMEEDKFM@X?$AA@"
+// CHECK: @"\01??_C@_01ELNMCGJD@W?$AA@"
+// CHECK: @"\01??_C@_01FCMHBHNC@V?$AA@"
+// CHECK: @"\01??_C@_01HJOKEEBB@U?$AA@"
+// CHECK: @"\01??_C@_01GAPBHFFA@T?$AA@"
+// CHECK: @"\01??_C@_01CPLAODJH@S?$AA@"
+// CHECK: @"\01??_C@_01DGKLNCNG@R?$AA@"
+// CHECK: @"\01??_C@_01BNIGIBBF@Q?$AA@"
+// CHECK: @"\01??_C@_01EJNLAFE@P?$AA@"
+// CHECK: @"\01??_C@_01MJMHLOMK@O?$AA@"
+// CHECK: @"\01??_C@_01NANMIPIL@N?$AA@"
+// CHECK: @"\01??_C@_01PLPBNMEI@M?$AA@"
+// CHECK: @"\01??_C@_01OCOKONAJ@L?$AA@"
+// CHECK: @"\01??_C@_01KNKLHLMO@K?$AA@"
+// CHECK: @"\01??_C@_01LELAEKIP@J?$AA@"
+// CHECK: @"\01??_C@_01JPJNBJEM@I?$AA@"
+// CHECK: @"\01??_C@_01IGIGCIAN@H?$AA@"
+// CHECK: @"\01??_C@_01BBODEMC@G?$AA@"
+// CHECK: @"\01??_C@_01BIAFAFID@F?$AA@"
+// CHECK: @"\01??_C@_01DDCIFGEA@E?$AA@"
+// CHECK: @"\01??_C@_01CKDDGHAB@D?$AA@"
+// CHECK: @"\01??_C@_01GFHCPBMG@C?$AA@"
+// CHECK: @"\01??_C@_01HMGJMAIH@B?$AA@"
+// CHECK: @"\01??_C@_01FHEEJDEE@A?$AA@"
+// CHECK: @"\01??_C@_01EOFPKCAF@?$EA?$AA@"
+// CHECK: @"\01??_C@_01OGPIMHDM@?$DP?$AA@"
+// CHECK: @"\01??_C@_01PPODPGHN@?$DO?$AA@"
+// CHECK: @"\01??_C@_01NEMOKFLO@?$DN?$AA@"
+// CHECK: @"\01??_C@_01MNNFJEPP@?$DM?$AA@"
+// CHECK: @"\01??_C@_01ICJEACDI@?$DL?$AA@"
+// CHECK: @"\01??_C@_01JLIPDDHJ@?3?$AA@"
+// CHECK: @"\01??_C@_01LAKCGALK@9?$AA@"
+// CHECK: @"\01??_C@_01KJLJFBPL@8?$AA@"
+// CHECK: @"\01??_C@_01COCBENDE@7?$AA@"
+// CHECK: @"\01??_C@_01DHDKHMHF@6?$AA@"
+// CHECK: @"\01??_C@_01BMBHCPLG@5?$AA@"
+// CHECK: @"\01??_C@_01FAMBOPH@4?$AA@"
+// CHECK: @"\01??_C@_01EKENIIDA@3?$AA@"
+// CHECK: @"\01??_C@_01FDFGLJHB@2?$AA@"
+// CHECK: @"\01??_C@_01HIHLOKLC@1?$AA@"
+// CHECK: @"\01??_C@_01GBGANLPD@0?$AA@"
+// CHECK: @"\01??_C@_01KMDKNFGN@?1?$AA@"
+// CHECK: @"\01??_C@_01LFCBOECM@?4?$AA@"
+// CHECK: @"\01??_C@_01JOAMLHOP@?9?$AA@"
+// CHECK: @"\01??_C@_01IHBHIGKO@?0?$AA@"
+// CHECK: @"\01??_C@_01MIFGBAGJ@?$CL?$AA@"
+// CHECK: @"\01??_C@_01NBENCBCI@?$CK?$AA@"
+// CHECK: @"\01??_C@_01PKGAHCOL@?$CJ?$AA@"
+// CHECK: @"\01??_C@_01ODHLEDKK@?$CI?$AA@"
+// CHECK: @"\01??_C@_01GEODFPGF@?8?$AA@"
+// CHECK: @"\01??_C@_01HNPIGOCE@?$CG?$AA@"
+// CHECK: @"\01??_C@_01FGNFDNOH@?$CF?$AA@"
+// CHECK: @"\01??_C@_01EPMOAMKG@$?$AA@"
+// CHECK: @"\01??_C@_01IPJKGB@?$CD?$AA@"
+// CHECK: @"\01??_C@_01BJJEKLCA@?$CC?$AA@"
+// CHECK: @"\01??_C@_01DCLJPIOD@?$CB?$AA@"
+// CHECK: @"\01??_C@_01CLKCMJKC@?5?$AA@"
+// CHECK: @"\01??_C@_01HDHMODJO@?$BP?$AA@"
+// CHECK: @"\01??_C@_01GKGHNCNP@?$BO?$AA@"
+// CHECK: @"\01??_C@_01EBEKIBBM@?$BN?$AA@"
+// CHECK: @"\01??_C@_01FIFBLAFN@?$BM?$AA@"
+// CHECK: @"\01??_C@_01BHBACGJK@?$BL?$AA@"
+// CHECK: @"\01??_C@_01OALBHNL@?$BK?$AA@"
+// CHECK: @"\01??_C@_01CFCGEEBI@?$BJ?$AA@"
+// CHECK: @"\01??_C@_01DMDNHFFJ@?$BI?$AA@"
+// CHECK: @"\01??_C@_01LLKFGJJG@?$BH?$AA@"
+// CHECK: @"\01??_C@_01KCLOFINH@?$BG?$AA@"
+// CHECK: @"\01??_C@_01IJJDALBE@?$BF?$AA@"
+// CHECK: @"\01??_C@_01JAIIDKFF@?$BE?$AA@"
+// CHECK: @"\01??_C@_01NPMJKMJC@?$BD?$AA@"
+// CHECK: @"\01??_C@_01MGNCJNND@?$BC?$AA@"
+// CHECK: @"\01??_C@_01ONPPMOBA@?$BB?$AA@"
+// CHECK: @"\01??_C@_01PEOEPPFB@?$BA?$AA@"
+// CHECK: @"\01??_C@_01DJLOPBMP@?$AP?$AA@"
+// CHECK: @"\01??_C@_01CAKFMAIO@?$AO?$AA@"
+// CHECK: @"\01??_C@_01LIIJDEN@?$AN?$AA@"
+// CHECK: @"\01??_C@_01BCJDKCAM@?$AM?$AA@"
+// CHECK: @"\01??_C@_01FNNCDEML@?$AL?$AA@"
+// CHECK: @"\01??_C@_01EEMJAFIK@?6?$AA@"
+// CHECK: @"\01??_C@_01GPOEFGEJ@?7?$AA@"
+// CHECK: @"\01??_C@_01HGPPGHAI@?$AI?$AA@"
+// CHECK: @"\01??_C@_01PBGHHLMH@?$AH?$AA@"
+// CHECK: @"\01??_C@_01OIHMEKIG@?$AG?$AA@"
+// CHECK: @"\01??_C@_01MDFBBJEF@?$AF?$AA@"
+// CHECK: @"\01??_C@_01NKEKCIAE@?$AE?$AA@"
+// CHECK: @"\01??_C@_01JFALLOMD@?$AD?$AA@"
+// CHECK: @"\01??_C@_01IMBAIPIC@?$AC?$AA@"
+// CHECK: @"\01??_C@_01KHDNNMEB@?$AB?$AA@"
+// CHECK: @"\01??_C@_01LOCGONAA@?$AA?$AA@"
+
+const wchar_t *wl9 = L"\t";
+const wchar_t *wl10 = L"\n";
+const wchar_t *wl11 = L"\v";
+const wchar_t *wl32 = L" ";
+const wchar_t *wl33 = L"!";
+const wchar_t *wl34 = L"\"";
+const wchar_t *wl35 = L"#";
+const wchar_t *wl36 = L"$";
+const wchar_t *wl37 = L"%";
+const wchar_t *wl38 = L"&";
+const wchar_t *wl39 = L"'";
+const wchar_t *wl40 = L"(";
+const wchar_t *wl41 = L")";
+const wchar_t *wl42 = L"*";
+const wchar_t *wl43 = L"+";
+const wchar_t *wl44 = L",";
+const wchar_t *wl45 = L"-";
+const wchar_t *wl46 = L".";
+const wchar_t *wl47 = L"/";
+const wchar_t *wl48 = L"0";
+const wchar_t *wl49 = L"1";
+const wchar_t *wl50 = L"2";
+const wchar_t *wl51 = L"3";
+const wchar_t *wl52 = L"4";
+const wchar_t *wl53 = L"5";
+const wchar_t *wl54 = L"6";
+const wchar_t *wl55 = L"7";
+const wchar_t *wl56 = L"8";
+const wchar_t *wl57 = L"9";
+const wchar_t *wl58 = L":";
+const wchar_t *wl59 = L";";
+const wchar_t *wl60 = L"<";
+const wchar_t *wl61 = L"=";
+const wchar_t *wl62 = L">";
+const wchar_t *wl63 = L"?";
+const wchar_t *wl64 = L"@";
+const wchar_t *wl65 = L"A";
+const wchar_t *wl66 = L"B";
+const wchar_t *wl67 = L"C";
+const wchar_t *wl68 = L"D";
+const wchar_t *wl69 = L"E";
+const wchar_t *wl70 = L"F";
+const wchar_t *wl71 = L"G";
+const wchar_t *wl72 = L"H";
+const wchar_t *wl73 = L"I";
+const wchar_t *wl74 = L"J";
+const wchar_t *wl75 = L"K";
+const wchar_t *wl76 = L"L";
+const wchar_t *wl77 = L"M";
+const wchar_t *wl78 = L"N";
+const wchar_t *wl79 = L"O";
+const wchar_t *wl80 = L"P";
+const wchar_t *wl81 = L"Q";
+const wchar_t *wl82 = L"R";
+const wchar_t *wl83 = L"S";
+const wchar_t *wl84 = L"T";
+const wchar_t *wl85 = L"U";
+const wchar_t *wl86 = L"V";
+const wchar_t *wl87 = L"W";
+const wchar_t *wl88 = L"X";
+const wchar_t *wl89 = L"Y";
+const wchar_t *wl90 = L"Z";
+const wchar_t *wl91 = L"[";
+const wchar_t *wl92 = L"\\";
+const wchar_t *wl93 = L"]";
+const wchar_t *wl94 = L"^";
+const wchar_t *wl95 = L"_";
+const wchar_t *wl96 = L"`";
+const wchar_t *wl97 = L"a";
+const wchar_t *wl98 = L"b";
+const wchar_t *wl99 = L"c";
+const wchar_t *wl100 = L"d";
+const wchar_t *wl101 = L"e";
+const wchar_t *wl102 = L"f";
+const wchar_t *wl103 = L"g";
+const wchar_t *wl104 = L"h";
+const wchar_t *wl105 = L"i";
+const wchar_t *wl106 = L"j";
+const wchar_t *wl107 = L"k";
+const wchar_t *wl108 = L"l";
+const wchar_t *wl109 = L"m";
+const wchar_t *wl110 = L"n";
+const wchar_t *wl111 = L"o";
+const wchar_t *wl112 = L"p";
+const wchar_t *wl113 = L"q";
+const wchar_t *wl114 = L"r";
+const wchar_t *wl115 = L"s";
+const wchar_t *wl116 = L"t";
+const wchar_t *wl117 = L"u";
+const wchar_t *wl118 = L"v";
+const wchar_t *wl119 = L"w";
+const wchar_t *wl120 = L"x";
+const wchar_t *wl121 = L"y";
+const wchar_t *wl122 = L"z";
+const wchar_t *wl123 = L"{";
+const wchar_t *wl124 = L"|";
+const wchar_t *wl125 = L"}";
+const wchar_t *wl126 = L"~";
+
+// CHECK: @"\01??_C@_13KDLDGPGJ@?$AA?7?$AA?$AA@"
+// CHECK: @"\01??_C@_13LBAGMAIH@?$AA?6?$AA?$AA@"
+// CHECK: @"\01??_C@_13JLKKHOC@?$AA?$AL?$AA?$AA@"
+// CHECK: @"\01??_C@_13HOIJIPNN@?$AA?5?$AA?$AA@"
+// CHECK: @"\01??_C@_13MGDFOILI@?$AA?$CB?$AA?$AA@"
+// CHECK: @"\01??_C@_13NEIAEHFG@?$AA?$CC?$AA?$AA@"
+// CHECK: @"\01??_C@_13GMDMCADD@?$AA?$CD?$AA?$AA@"
+// CHECK: @"\01??_C@_13PBOLBIIK@?$AA$?$AA?$AA@"
+// CHECK: @"\01??_C@_13EJFHHPOP@?$AA?$CF?$AA?$AA@"
+// CHECK: @"\01??_C@_13FLOCNAAB@?$AA?$CG?$AA?$AA@"
+// CHECK: @"\01??_C@_13ODFOLHGE@?$AA?8?$AA?$AA@"
+// CHECK: @"\01??_C@_13LLDNKHDC@?$AA?$CI?$AA?$AA@"
+// CHECK: @"\01??_C@_13DIBMAFH@?$AA?$CJ?$AA?$AA@"
+// CHECK: @"\01??_C@_13BBDEGPLJ@?$AA?$CK?$AA?$AA@"
+// CHECK: @"\01??_C@_13KJIIAINM@?$AA?$CL?$AA?$AA@"
+// CHECK: @"\01??_C@_13DEFPDAGF@?$AA?0?$AA?$AA@"
+// CHECK: @"\01??_C@_13IMODFHAA@?$AA?9?$AA?$AA@"
+// CHECK: @"\01??_C@_13JOFGPIOO@?$AA?4?$AA?$AA@"
+// CHECK: @"\01??_C@_13CGOKJPIL@?$AA?1?$AA?$AA@"
+// CHECK: @"\01??_C@_13COJANIEC@?$AA0?$AA?$AA@"
+// CHECK: @"\01??_C@_13JGCMLPCH@?$AA1?$AA?$AA@"
+// CHECK: @"\01??_C@_13IEJJBAMJ@?$AA2?$AA?$AA@"
+// CHECK: @"\01??_C@_13DMCFHHKM@?$AA3?$AA?$AA@"
+// CHECK: @"\01??_C@_13KBPCEPBF@?$AA4?$AA?$AA@"
+// CHECK: @"\01??_C@_13BJEOCIHA@?$AA5?$AA?$AA@"
+// CHECK: @"\01??_C@_13LPLIHJO@?$AA6?$AA?$AA@"
+// CHECK: @"\01??_C@_13LDEHOAPL@?$AA7?$AA?$AA@"
+// CHECK: @"\01??_C@_13OLCEPAKN@?$AA8?$AA?$AA@"
+// CHECK: @"\01??_C@_13FDJIJHMI@?$AA9?$AA?$AA@"
+// CHECK: @"\01??_C@_13EBCNDICG@?$AA?3?$AA?$AA@"
+// CHECK: @"\01??_C@_13PJJBFPED@?$AA?$DL?$AA?$AA@"
+// CHECK: @"\01??_C@_13GEEGGHPK@?$AA?$DM?$AA?$AA@"
+// CHECK: @"\01??_C@_13NMPKAAJP@?$AA?$DN?$AA?$AA@"
+// CHECK: @"\01??_C@_13MOEPKPHB@?$AA?$DO?$AA?$AA@"
+// CHECK: @"\01??_C@_13HGPDMIBE@?$AA?$DP?$AA?$AA@"
+// CHECK: @"\01??_C@_13EFKPHINO@?$AA?$EA?$AA?$AA@"
+// CHECK: @"\01??_C@_13PNBDBPLL@?$AAA?$AA?$AA@"
+// CHECK: @"\01??_C@_13OPKGLAFF@?$AAB?$AA?$AA@"
+// CHECK: @"\01??_C@_13FHBKNHDA@?$AAC?$AA?$AA@"
+// CHECK: @"\01??_C@_13MKMNOPIJ@?$AAD?$AA?$AA@"
+// CHECK: @"\01??_C@_13HCHBIIOM@?$AAE?$AA?$AA@"
+// CHECK: @"\01??_C@_13GAMECHAC@?$AAF?$AA?$AA@"
+// CHECK: @"\01??_C@_13NIHIEAGH@?$AAG?$AA?$AA@"
+// CHECK: @"\01??_C@_13IABLFADB@?$AAH?$AA?$AA@"
+// CHECK: @"\01??_C@_13DIKHDHFE@?$AAI?$AA?$AA@"
+// CHECK: @"\01??_C@_13CKBCJILK@?$AAJ?$AA?$AA@"
+// CHECK: @"\01??_C@_13JCKOPPNP@?$AAK?$AA?$AA@"
+// CHECK: @"\01??_C@_13PHJMHGG@?$AAL?$AA?$AA@"
+// CHECK: @"\01??_C@_13LHMFKAAD@?$AAM?$AA?$AA@"
+// CHECK: @"\01??_C@_13KFHAAPON@?$AAN?$AA?$AA@"
+// CHECK: @"\01??_C@_13BNMMGIII@?$AAO?$AA?$AA@"
+// CHECK: @"\01??_C@_13BFLGCPEB@?$AAP?$AA?$AA@"
+// CHECK: @"\01??_C@_13KNAKEICE@?$AAQ?$AA?$AA@"
+// CHECK: @"\01??_C@_13LPLPOHMK@?$AAR?$AA?$AA@"
+// CHECK: @"\01??_C@_13HADIAKP@?$AAS?$AA?$AA@"
+// CHECK: @"\01??_C@_13JKNELIBG@?$AAT?$AA?$AA@"
+// CHECK: @"\01??_C@_13CCGINPHD@?$AAU?$AA?$AA@"
+// CHECK: @"\01??_C@_13DANNHAJN@?$AAV?$AA?$AA@"
+// CHECK: @"\01??_C@_13IIGBBHPI@?$AAW?$AA?$AA@"
+// CHECK: @"\01??_C@_13NAACAHKO@?$AAX?$AA?$AA@"
+// CHECK: @"\01??_C@_13GILOGAML@?$AAY?$AA?$AA@"
+// CHECK: @"\01??_C@_13HKALMPCF@?$AAZ?$AA?$AA@"
+// CHECK: @"\01??_C@_13MCLHKIEA@?$AA?$FL?$AA?$AA@"
+// CHECK: @"\01??_C@_13FPGAJAPJ@?$AA?2?$AA?$AA@"
+// CHECK: @"\01??_C@_13OHNMPHJM@?$AA?$FN?$AA?$AA@"
+// CHECK: @"\01??_C@_13PFGJFIHC@?$AA?$FO?$AA?$AA@"
+// CHECK: @"\01??_C@_13ENNFDPBH@?$AA_?$AA?$AA@"
+// CHECK: @"\01??_C@_13OFJNNHOA@?$AA?$GA?$AA?$AA@"
+// CHECK: @"\01??_C@_13FNCBLAIF@?$AAa?$AA?$AA@"
+// CHECK: @"\01??_C@_13EPJEBPGL@?$AAb?$AA?$AA@"
+// CHECK: @"\01??_C@_13PHCIHIAO@?$AAc?$AA?$AA@"
+// CHECK: @"\01??_C@_13GKPPEALH@?$AAd?$AA?$AA@"
+// CHECK: @"\01??_C@_13NCEDCHNC@?$AAe?$AA?$AA@"
+// CHECK: @"\01??_C@_13MAPGIIDM@?$AAf?$AA?$AA@"
+// CHECK: @"\01??_C@_13HIEKOPFJ@?$AAg?$AA?$AA@"
+// CHECK: @"\01??_C@_13CACJPPAP@?$AAh?$AA?$AA@"
+// CHECK: @"\01??_C@_13JIJFJIGK@?$AAi?$AA?$AA@"
+// CHECK: @"\01??_C@_13IKCADHIE@?$AAj?$AA?$AA@"
+// CHECK: @"\01??_C@_13DCJMFAOB@?$AAk?$AA?$AA@"
+// CHECK: @"\01??_C@_13KPELGIFI@?$AAl?$AA?$AA@"
+// CHECK: @"\01??_C@_13BHPHAPDN@?$AAm?$AA?$AA@"
+// CHECK: @"\01??_C@_13FECKAND@?$AAn?$AA?$AA@"
+// CHECK: @"\01??_C@_13LNPOMHLG@?$AAo?$AA?$AA@"
+// CHECK: @"\01??_C@_13LFIEIAHP@?$AAp?$AA?$AA@"
+// CHECK: @"\01??_C@_13NDIOHBK@?$AAq?$AA?$AA@"
+// CHECK: @"\01??_C@_13BPINEIPE@?$AAr?$AA?$AA@"
+// CHECK: @"\01??_C@_13KHDBCPJB@?$AAs?$AA?$AA@"
+// CHECK: @"\01??_C@_13DKOGBHCI@?$AAt?$AA?$AA@"
+// CHECK: @"\01??_C@_13ICFKHAEN@?$AAu?$AA?$AA@"
+// CHECK: @"\01??_C@_13JAOPNPKD@?$AAv?$AA?$AA@"
+// CHECK: @"\01??_C@_13CIFDLIMG@?$AAw?$AA?$AA@"
+// CHECK: @"\01??_C@_13HADAKIJA@?$AAx?$AA?$AA@"
+// CHECK: @"\01??_C@_13MIIMMPPF@?$AAy?$AA?$AA@"
+// CHECK: @"\01??_C@_13NKDJGABL@?$AAz?$AA?$AA@"
+// CHECK: @"\01??_C@_13GCIFAHHO@?$AA?$HL?$AA?$AA@"
+// CHECK: @"\01??_C@_13PPFCDPMH@?$AA?$HM?$AA?$AA@"
+// CHECK: @"\01??_C@_13EHOOFIKC@?$AA?$HN?$AA?$AA@"
+// CHECK: @"\01??_C@_13FFFLPHEM@?$AA?$HO?$AA?$AA@"
+
+const char *LongASCIIString = "012345678901234567890123456789ABCDEF";
+// CHECK: @"\01??_C@_0CF@LABBIIMO@012345678901234567890123456789AB@"
+const wchar_t *LongWideString = L"012345678901234567890123456789ABCDEF";
+// CHECK: @"\01??_C@_1EK@KFPEBLPK@?$AA0?$AA1?$AA2?$AA3?$AA4?$AA5?$AA6?$AA7?$AA8?$AA9?$AA0?$AA1?$AA2?$AA3?$AA4?$AA5?$AA6?$AA7?$AA8?$AA9?$AA0?$AA1?$AA2?$AA3?$AA4?$AA5?$AA6?$AA7?$AA8?$AA9?$AAA?$AAB@"
+const wchar_t *UnicodeLiteral = L"\ud7ff";
+// CHECK: @"\01??_C@_13IIHIAFKH@?W?$PP?$AA?$AA@"
diff --git a/test/CodeGenCXX/mangle-ms-template-callback.cpp b/test/CodeGenCXX/mangle-ms-template-callback.cpp
index 687814875132..1a8f82fc8256 100644
--- a/test/CodeGenCXX/mangle-ms-template-callback.cpp
+++ b/test/CodeGenCXX/mangle-ms-template-callback.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fblocks -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-pc-win32 | FileCheck %s
+// RUN: %clang_cc1 -fblocks -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
template<typename Signature>
class C;
@@ -70,3 +70,20 @@ void call_bar() {
// CHECK: "\01??$bar@P_EAHH@Z@@YAXP_EAHH@Z@Z"
// FYI blocks are not present in MSVS, so we're free to choose the spec.
}
+
+template <void (*Fn)()> void WrapFnPtr() { Fn(); }
+template <void (&Fn)()> void WrapFnRef() { Fn(); }
+struct Thing {
+ static void VoidStaticMethod();
+};
+void VoidFn();
+void CallWrapper() {
+ WrapFnPtr<VoidFn>();
+ WrapFnRef<VoidFn>();
+ WrapFnPtr<Thing::VoidStaticMethod>();
+ WrapFnRef<Thing::VoidStaticMethod>();
+}
+// CHECK: call {{.*}} @"\01??$WrapFnPtr@$1?VoidFn@@YAXXZ@@YAXXZ"
+// CHECK: call {{.*}} @"\01??$WrapFnRef@$1?VoidFn@@YAXXZ@@YAXXZ"
+// CHECK: call {{.*}} @"\01??$WrapFnPtr@$1?VoidStaticMethod@Thing@@SAXXZ@@YAXXZ"
+// CHECK: call {{.*}} @"\01??$WrapFnRef@$1?VoidStaticMethod@Thing@@SAXXZ@@YAXXZ"
diff --git a/test/CodeGenCXX/mangle-ms-templates-memptrs-2.cpp b/test/CodeGenCXX/mangle-ms-templates-memptrs-2.cpp
new file mode 100644
index 000000000000..e2cbe15dfa9f
--- /dev/null
+++ b/test/CodeGenCXX/mangle-ms-templates-memptrs-2.cpp
@@ -0,0 +1,45 @@
+// RUN: %clang_cc1 -Wno-microsoft -fms-extensions -fno-rtti -std=c++11 -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
+
+template <typename T, int (T::*)() = nullptr>
+struct J {};
+
+struct __single_inheritance M;
+J<M> m;
+// CHECK-DAG: @"\01?m@@3U?$J@UM@@$0A@@@A"
+
+struct __multiple_inheritance N;
+J<N> n;
+// CHECK-DAG: @"\01?n@@3U?$J@UN@@$HA@@@A"
+
+struct __virtual_inheritance O;
+J<O> o;
+// CHECK-DAG: @"\01?o@@3U?$J@UO@@$IA@A@@@A"
+
+struct P;
+J<P> p;
+// CHECK-DAG: @"\01?p@@3U?$J@UP@@$JA@A@?0@@A"
+
+#pragma pointers_to_members(full_generality, virtual_inheritance)
+
+struct S {
+ int a, b;
+ void f();
+ virtual void g();
+};
+
+struct GeneralBase {
+ virtual void h();
+};
+struct MostGeneral : S, virtual GeneralBase {
+ virtual void h();
+};
+template <void (MostGeneral::*MP)()>
+struct ClassTemplate {
+ ClassTemplate() {}
+};
+
+template struct ClassTemplate<&MostGeneral::h>;
+
+// Test that we mangle in the vbptr offset, which is 12 here.
+//
+// CHECK: define weak_odr x86_thiscallcc %struct.ClassTemplate* @"\01??0?$ClassTemplate@$J??_9MostGeneral@@$BA@AEA@M@3@@QAE@XZ"
diff --git a/test/CodeGenCXX/mangle-ms-templates-memptrs.cpp b/test/CodeGenCXX/mangle-ms-templates-memptrs.cpp
new file mode 100644
index 000000000000..803cac3748b1
--- /dev/null
+++ b/test/CodeGenCXX/mangle-ms-templates-memptrs.cpp
@@ -0,0 +1,143 @@
+// RUN: %clang_cc1 -Wno-microsoft -fno-rtti -std=c++11 -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
+
+struct U;
+static_assert(sizeof(void (U::*)()) == 2 * sizeof(void*) + 2 * sizeof(int), "");
+
+struct A { int a; };
+struct B { int b; };
+struct I { union { struct { int a, b; }; }; };
+
+struct S { int a, b; void f(); virtual void g(); };
+struct M : A, B { int a, b; void f(); virtual void g(); };
+struct V : virtual A { int a, b; void f(); virtual void g(); };
+struct U { int a, b; void f(); virtual void g(); };
+
+struct C { virtual void f(); };
+struct D { virtual void g(); };
+struct O : C, D { virtual void g(); }; // override of non-primary
+
+// Test data member pointers.
+template <typename T, int T::*F>
+int ReadField(T &o) {
+ return F ? o.*F : 0;
+}
+
+// Redeclare some of the classes so that the implicit attribute goes on the most
+// recent redeclaration rather than the definition.
+struct V;
+
+void ReadFields() {
+ A a;
+ I i;
+ S s;
+ M m;
+ V v;
+ U u;
+ ReadField<S, &S::a>(s);
+ ReadField<M, &M::a>(m);
+ ReadField<V, &V::a>(v);
+ ReadField<U, &U::a>(u);
+ ReadField<S, &S::b>(s);
+ ReadField<M, &M::b>(m);
+ ReadField<V, &V::b>(v);
+ ReadField<U, &U::b>(u);
+ ReadField<S, nullptr>(s);
+ ReadField<M, nullptr>(m);
+ ReadField<V, nullptr>(v);
+ ReadField<U, nullptr>(u);
+
+ // Non-polymorphic null data memptr vs first field memptr.
+ ReadField<A, &A::a>(a);
+ ReadField<A, nullptr>(a);
+
+ // Indirect fields injected from anonymous unions and structs
+ ReadField<I, &I::a>(i);
+ ReadField<I, &I::b>(i);
+}
+
+// CHECK-LABEL: define {{.*}}ReadFields
+// CHECK: call {{.*}} @"\01??$ReadField@US@@$03@@YAHAAUS@@@Z"
+// CHECK: call {{.*}} @"\01??$ReadField@UM@@$0M@@@YAHAAUM@@@Z"
+// CHECK: call {{.*}} @"\01??$ReadField@UV@@$F7A@@@YAHAAUV@@@Z"
+// CHECK: call {{.*}} @"\01??$ReadField@UU@@$G3A@A@@@YAHAAUU@@@Z"
+// CHECK: call {{.*}} @"\01??$ReadField@US@@$07@@YAHAAUS@@@Z"
+// CHECK: call {{.*}} @"\01??$ReadField@UM@@$0BA@@@YAHAAUM@@@Z"
+// CHECK: call {{.*}} @"\01??$ReadField@UV@@$FM@A@@@YAHAAUV@@@Z"
+// CHECK: call {{.*}} @"\01??$ReadField@UU@@$G7A@A@@@YAHAAUU@@@Z"
+
+// MSVC mangles null member pointers in function templates wrong, but it gets
+// them right in class templates.
+// CHECK: call {{.*}} @"\01??$ReadField@US@@$0A@@@YAHAAUS@@@Z"
+// CHECK: call {{.*}} @"\01??$ReadField@UM@@$0A@@@YAHAAUM@@@Z"
+// CHECK: call {{.*}} @"\01??$ReadField@UV@@$FA@?0@@YAHAAUV@@@Z"
+// CHECK: call {{.*}} @"\01??$ReadField@UU@@$GA@A@?0@@YAHAAUU@@@Z"
+
+// Non-polymorphic null data memptr vs first field memptr. MSVC mangles these
+// the same.
+// CHECK: call {{.*}} @"\01??$ReadField@UA@@$0A@@@YAHAAUA@@@Z"
+// CHECK: call {{.*}} @"\01??$ReadField@UA@@$0?0@@YAHAAUA@@@Z"
+
+// Indirect fields are handled as-if they were simply members of their enclosing
+// record.
+// CHECK: call {{.*}} @"\01??$ReadField@UI@@$0A@@@YAHAAUI@@@Z"
+// CHECK: call {{.*}} @"\01??$ReadField@UI@@$03@@YAHAAUI@@@Z"
+
+// Test member function pointers.
+template <typename T, void (T::*MFP)()>
+void CallMethod(T &o) {
+ (o.*MFP)();
+}
+
+void CallMethods() {
+ S s;
+ M m;
+ V v;
+ U u;
+ O o;
+
+ // Non-virtual methods.
+ CallMethod<S, &S::f>(s);
+ CallMethod<M, &M::f>(m);
+ CallMethod<V, &V::f>(v);
+ CallMethod<U, &U::f>(u);
+
+ // Virtual methods requiring thunk mangling.
+ CallMethod<S, &S::g>(s);
+ CallMethod<M, &M::g>(m);
+ CallMethod<V, &V::g>(v);
+ CallMethod<U, &U::g>(u);
+
+ // A member pointer for a non-primary vbase will have a non-zero this
+ // adjustment.
+ CallMethod<O, &O::g>(o);
+
+ // Null member pointers.
+ CallMethod<S, nullptr>(s);
+ CallMethod<M, nullptr>(m);
+ CallMethod<V, nullptr>(v);
+ CallMethod<U, nullptr>(u);
+}
+
+// CHECK-LABEL: define {{.*}}CallMethods
+// CHECK: call {{.*}} @"\01??$CallMethod@US@@$1?f@1@QAEXXZ@@YAXAAUS@@@Z"
+// CHECK: call {{.*}} @"\01??$CallMethod@UM@@$H?f@1@QAEXXZA@@@YAXAAUM@@@Z"
+// CHECK: call {{.*}} @"\01??$CallMethod@UV@@$I?f@1@QAEXXZA@A@@@YAXAAUV@@@Z"
+// CHECK: call {{.*}} @"\01??$CallMethod@UU@@$J?f@1@QAEXXZA@A@A@@@YAXAAUU@@@Z"
+
+// PR17034: MSVC reuses the same thunk for every virtual g method because they
+// are all at vftable offset zero. They then mangle the name of the first thunk
+// created into the name of the template instantiation, which is definitely a
+// bug. We don't follow them here. Instead of ?_91@ backref below, they would
+// get ?_9S@@ in every instantiation after the first.
+
+// CHECK: call {{.*}} @"\01??$CallMethod@US@@$1??_91@$BA@AE@@YAXAAUS@@@Z"
+// CHECK: call {{.*}} @"\01??$CallMethod@UM@@$H??_91@$BA@AEA@@@YAXAAUM@@@Z"
+// CHECK: call {{.*}} @"\01??$CallMethod@UV@@$I??_91@$BA@AEA@A@@@YAXAAUV@@@Z"
+// CHECK: call {{.*}} @"\01??$CallMethod@UU@@$J??_91@$BA@AEA@A@A@@@YAXAAUU@@@Z"
+
+// CHECK: call {{.*}} @"\01??$CallMethod@UO@@$H??_91@$BA@AE3@@YAXAAUO@@@Z"
+
+// CHECK: call {{.*}} @"\01??$CallMethod@US@@$0A@@@YAXAAUS@@@Z"
+// CHECK: call {{.*}} @"\01??$CallMethod@UM@@$0A@@@YAXAAUM@@@Z"
+// CHECK: call {{.*}} @"\01??$CallMethod@UV@@$0A@@@YAXAAUV@@@Z"
+// CHECK: call {{.*}} @"\01??$CallMethod@UU@@$0A@@@YAXAAUU@@@Z"
diff --git a/test/CodeGenCXX/mangle-ms-templates.cpp b/test/CodeGenCXX/mangle-ms-templates.cpp
index 514f5739ffd5..31fda2046c4b 100644
--- a/test/CodeGenCXX/mangle-ms-templates.cpp
+++ b/test/CodeGenCXX/mangle-ms-templates.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -cxx-abi microsoft -fms-extensions -fdelayed-template-parsing -triple=i386-pc-win32 | FileCheck %s
-// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -cxx-abi microsoft -fms-extensions -fdelayed-template-parsing -triple=x86_64-pc-win32 | FileCheck -check-prefix X64 %s
+// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -fms-extensions -fdelayed-template-parsing -triple=i386-pc-win32 | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -fms-extensions -fdelayed-template-parsing -triple=x86_64-pc-win32 | FileCheck -check-prefix X64 %s
template<typename T>
class Class {
@@ -262,3 +262,17 @@ void CallFunctionDefinedWithInjectedName() {
FunctionDefinedWithInjectedName(TypeWithFriendDefinition<int>());
}
// CHECK: @"\01?FunctionDefinedWithInjectedName@@YAXU?$TypeWithFriendDefinition@H@@@Z"
+
+// We need to be able to feed GUIDs through a couple rounds of template
+// substitution.
+template <const _GUID *G>
+struct UUIDType3 {
+ void foo() {}
+};
+template <const _GUID *G>
+struct UUIDType4 : UUIDType3<G> {
+ void bar() { UUIDType4::foo(); }
+};
+template struct UUIDType4<&__uuidof(uuid)>;
+// CHECK: "\01?bar@?$UUIDType4@$1?_GUID_12345678_1234_1234_1234_1234567890ab@@3U__s_GUID@@B@@QAEXXZ"
+// CHECK: "\01?foo@?$UUIDType3@$1?_GUID_12345678_1234_1234_1234_1234567890ab@@3U__s_GUID@@B@@QAEXXZ"
diff --git a/test/CodeGenCXX/mangle-ms-vector-types.cpp b/test/CodeGenCXX/mangle-ms-vector-types.cpp
index 64cb7250a41f..aca492918a1e 100644
--- a/test/CodeGenCXX/mangle-ms-vector-types.cpp
+++ b/test/CodeGenCXX/mangle-ms-vector-types.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fms-extensions -ffreestanding -target-feature +avx -emit-llvm %s -o - -cxx-abi microsoft -triple=i686-pc-win32 | FileCheck %s
+// RUN: %clang_cc1 -fms-extensions -ffreestanding -target-feature +avx -emit-llvm %s -o - -triple=i686-pc-win32 | FileCheck %s
#include <xmmintrin.h>
#include <emmintrin.h>
diff --git a/test/CodeGenCXX/mangle-ms.cpp b/test/CodeGenCXX/mangle-ms.cpp
index 68ec2b3baf68..3285c98546ec 100644
--- a/test/CodeGenCXX/mangle-ms.cpp
+++ b/test/CodeGenCXX/mangle-ms.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -fblocks -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-pc-win32 -std=c++11 | FileCheck %s
-// RUN: %clang_cc1 -fblocks -emit-llvm %s -o - -cxx-abi microsoft -triple=x86_64-pc-win32 -std=c++11| FileCheck -check-prefix X64 %s
+// RUN: %clang_cc1 -fblocks -emit-llvm %s -o - -triple=i386-pc-win32 -std=c++98 | FileCheck %s
+// RUN: %clang_cc1 -fblocks -emit-llvm %s -o - -triple=x86_64-pc-win32 -std=c++98| FileCheck -check-prefix X64 %s
int a;
// CHECK-DAG: @"\01?a@@3HA"
@@ -95,10 +95,18 @@ extern int * const h1 = &a;
// CHECK-DAG: @"\01?h1@@3QAHA"
extern const int * const h2 = &a;
// CHECK-DAG: @"\01?h2@@3QBHB"
+extern int * const __restrict h3 = &a;
+// CHECK-DAG: @"\01?h3@@3QIAHIA"
+// X64-DAG: @"\01?h3@@3QEIAHEIA"
int i[10][20];
// CHECK-DAG: @"\01?i@@3PAY0BE@HA"
+typedef int (*FunT)(int, int);
+FunT FunArr[10][20];
+// CHECK-DAG: @"\01?FunArr@@3PAY0BE@P6AHHH@ZA"
+// X64-DAG: @"\01?FunArr@@3PAY0BE@P6AHHH@ZA"
+
int (__stdcall *j)(signed char, unsigned char);
// CHECK-DAG: @"\01?j@@3P6GHCE@ZA"
@@ -357,10 +365,3 @@ void TypedefNewDelete::operator delete[](void *) { }
// CHECK-DAG: ??3TypedefNewDelete@@SAXPAX@Z
// CHECK-DAG: ??_VTypedefNewDelete@@SAXPAX@Z
-namespace PR18022 {
-
-struct { } a;
-decltype(a) fun(decltype(a) x, decltype(a)) { return x; }
-// CHECK-DAG: ?fun@PR18022@@YA?AU<unnamed-type-a>@1@U21@0@Z
-
-}
diff --git a/test/CodeGenCXX/mangle-neon-vectors.cpp b/test/CodeGenCXX/mangle-neon-vectors.cpp
index 249ec2e99b69..6faf6226efd2 100644
--- a/test/CodeGenCXX/mangle-neon-vectors.cpp
+++ b/test/CodeGenCXX/mangle-neon-vectors.cpp
@@ -1,10 +1,18 @@
-// RUN: %clang_cc1 -triple arm-none-linux-gnueabi -target-feature +neon %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -triple armv7-apple-ios -target-feature +neon %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -triple arm64-apple-ios -target-feature +neon %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -triple arm64-linux-gnu -target-feature +neon %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-AARCH64
typedef float float32_t;
+typedef double float64_t;
typedef __fp16 float16_t;
+#if defined(__aarch64__)
+typedef unsigned char poly8_t;
+typedef unsigned short poly16_t;
+#else
typedef signed char poly8_t;
typedef short poly16_t;
-typedef unsigned long long uint64_t;
+#endif
+typedef unsigned __INT64_TYPE__ uint64_t;
typedef __attribute__((neon_vector_type(2))) int int32x2_t;
typedef __attribute__((neon_vector_type(4))) int int32x4_t;
@@ -14,26 +22,53 @@ typedef __attribute__((neon_vector_type(2))) float32_t float32x2_t;
typedef __attribute__((neon_vector_type(4))) float32_t float32x4_t;
typedef __attribute__((neon_vector_type(4))) float16_t float16x4_t;
typedef __attribute__((neon_vector_type(8))) float16_t float16x8_t;
-typedef __attribute__((neon_polyvector_type(16))) poly8_t poly8x16_t;
-typedef __attribute__((neon_polyvector_type(8))) poly16_t poly16x8_t;
+#ifdef __aarch64__
+typedef __attribute__((neon_vector_type(2))) float64_t float64x2_t;
+#endif
+typedef __attribute__((neon_polyvector_type(16))) poly8_t poly8x16_t;
+typedef __attribute__((neon_polyvector_type(8))) poly16_t poly16x8_t;
// CHECK: 16__simd64_int32_t
+// CHECK-AARCH64: 11__Int32x2_t
void f1(int32x2_t v) { }
+
// CHECK: 17__simd128_int32_t
+// CHECK-AARCH64: 11__Int32x4_t
void f2(int32x4_t v) { }
+
// CHECK: 17__simd64_uint64_t
+// CHECK-AARCH64: 12__Uint64x1_t
void f3(uint64x1_t v) { }
+
// CHECK: 18__simd128_uint64_t
+// CHECK-AARCH64: 12__Uint64x2_t
void f4(uint64x2_t v) { }
+
// CHECK: 18__simd64_float32_t
+// CHECK-AARCH64: 13__Float32x2_t
void f5(float32x2_t v) { }
+
// CHECK: 19__simd128_float32_t
+// CHECK-AARCH64: 13__Float32x4_t
void f6(float32x4_t v) { }
+
// CHECK: 18__simd64_float16_t
+// CHECK-AARCH64: 13__Float16x4_t
void f7(float16x4_t v) {}
+
// CHECK: 19__simd128_float16_t
+// CHECK-AARCH64: 13__Float16x8_t
void f8(float16x8_t v) {}
+
// CHECK: 17__simd128_poly8_t
+// CHECK-AARCH64: 12__Poly8x16_t
void f9(poly8x16_t v) {}
+
// CHECK: 18__simd128_poly16_t
+// CHECK-AARCH64: 12__Poly16x8_t
void f10(poly16x8_t v) {}
+
+#ifdef __aarch64__
+// CHECK-AARCH64: 13__Float64x2_t
+void f11(float64x2_t v) { }
+#endif
diff --git a/test/CodeGenCXX/mangle-nullptr-arg.cpp b/test/CodeGenCXX/mangle-nullptr-arg.cpp
index b55ea6dd2dd4..66ed7e5cfe34 100644
--- a/test/CodeGenCXX/mangle-nullptr-arg.cpp
+++ b/test/CodeGenCXX/mangle-nullptr-arg.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
template<int *ip> struct IP {};
diff --git a/test/CodeGenCXX/mangle-std-externc.cpp b/test/CodeGenCXX/mangle-std-externc.cpp
index a478dee4a42c..f0c7d69eed46 100644
--- a/test/CodeGenCXX/mangle-std-externc.cpp
+++ b/test/CodeGenCXX/mangle-std-externc.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 %s -DNS=std -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-STD
-// RUN: %clang_cc1 %s -DNS=n -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-N
+// RUN: %clang_cc1 %s -DNS=std -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s --check-prefix=CHECK-STD
+// RUN: %clang_cc1 %s -DNS=n -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s --check-prefix=CHECK-N
// _ZNSt1DISt1CE1iE = std::D<std::C>::i
// CHECK-STD: @_ZNSt1DISt1CE1iE =
diff --git a/test/CodeGenCXX/mangle-subst-std.cpp b/test/CodeGenCXX/mangle-subst-std.cpp
index 6277c7af21c4..678956e11182 100644
--- a/test/CodeGenCXX/mangle-subst-std.cpp
+++ b/test/CodeGenCXX/mangle-subst-std.cpp
@@ -15,8 +15,8 @@
namespace std {
struct A { A(); };
- // CHECK-LABEL: define void @_ZNSt1AC1Ev(%"struct.std::A"* %this) unnamed_addr
// CHECK-LABEL: define void @_ZNSt1AC2Ev(%"struct.std::A"* %this) unnamed_addr
+ // CHECK-LABEL: define void @_ZNSt1AC1Ev(%"struct.std::A"* %this) unnamed_addr
A::A() { }
};
diff --git a/test/CodeGenCXX/mangle-template.cpp b/test/CodeGenCXX/mangle-template.cpp
index 3b7f3027f6c2..998096a57be4 100644
--- a/test/CodeGenCXX/mangle-template.cpp
+++ b/test/CodeGenCXX/mangle-template.cpp
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -verify -Wno-return-type -Wno-main -std=c++11 -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s
+// expected-no-diagnostics
+
namespace test1 {
int x;
template <int& D> class T { };
@@ -145,7 +147,7 @@ namespace test10 {
}
}
-// Report from Jason Merrill on cxx-abi-dev, 2012.01.04.
+// Report from cxx-abi-dev, 2012.01.04.
namespace test11 {
int cmp(char a, char b);
template <typename T, int (*cmp)(T, T)> struct A {};
@@ -156,7 +158,7 @@ namespace test11 {
namespace test12 {
// Make sure we can mangle non-type template args with internal linkage.
- static int f();
+ static int f() {}
const int n = 10;
template<typename T, T v> void test() {}
void use() {
@@ -182,3 +184,25 @@ namespace test13 {
template short returnShort<-32768>();
// CHECK: @_ZN6test1311returnShortILsn32768EEEsv()
}
+
+namespace test14 {
+ template <typename> inline int inl(bool b) {
+ if (b) {
+ static struct {
+ int field;
+ } a;
+ // CHECK: @_ZZN6test143inlIvEEibE1a
+
+ return a.field;
+ } else {
+ static struct {
+ int field;
+ } a;
+ // CHECK: @_ZZN6test143inlIvEEibE1a_0
+
+ return a.field;
+ }
+ }
+
+ int call(bool b) { return inl<void>(b); }
+}
diff --git a/test/CodeGenCXX/mangle-windows.cpp b/test/CodeGenCXX/mangle-windows.cpp
index c087616875c7..85644475ddf5 100644
--- a/test/CodeGenCXX/mangle-windows.cpp
+++ b/test/CodeGenCXX/mangle-windows.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - -cxx-abi microsoft \
-// RUN: -triple=i386-pc-win32 | FileCheck --check-prefix=WIN %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 | \
+// RUN: FileCheck --check-prefix=WIN %s
//
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-mingw32 | \
// RUN: FileCheck --check-prefix=ITANIUM %s
diff --git a/test/CodeGenCXX/mangle.cpp b/test/CodeGenCXX/mangle.cpp
index d836f36c1818..9bdac7f17289 100644
--- a/test/CodeGenCXX/mangle.cpp
+++ b/test/CodeGenCXX/mangle.cpp
@@ -216,9 +216,9 @@ struct S7 {
};
// PR5139
-// CHECK: @_ZN2S7C1Ev
// CHECK: @_ZN2S7C2Ev
// CHECK: @_ZN2S7Ut_C1Ev
+// CHECK: @_ZN2S7C1Ev
S7::S7() {}
// PR5063
@@ -280,13 +280,13 @@ struct Ops {
void *v;
};
-// CHECK-LABEL: define %struct.Ops* @_ZN3OpsplERKS_
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) %struct.Ops* @_ZN3OpsplERKS_
Ops& Ops::operator+(const Ops&) { return *this; }
-// CHECK-LABEL: define %struct.Ops* @_ZN3OpsmiERKS_
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) %struct.Ops* @_ZN3OpsmiERKS_
Ops& Ops::operator-(const Ops&) { return *this; }
-// CHECK-LABEL: define %struct.Ops* @_ZN3OpsanERKS_
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) %struct.Ops* @_ZN3OpsanERKS_
Ops& Ops::operator&(const Ops&) { return *this; }
-// CHECK-LABEL: define %struct.Ops* @_ZN3OpsmlERKS_
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) %struct.Ops* @_ZN3OpsmlERKS_
Ops& Ops::operator*(const Ops&) { return *this; }
// PR5861
@@ -899,7 +899,7 @@ namespace test39 {
}
namespace test40 {
- // CHECK: i32* @_ZZN6test401fEvE1a_0
+ // CHECK: i32* {{.*}} @_ZZN6test401fEvE1a_0
void h(int&);
inline void f() {
if (0) {
@@ -951,3 +951,43 @@ namespace test44 {
}
// CHECK-LABEL: define linkonce_odr void @_ZN6test443foo3barEv(%"struct.test44::foo"* %this)
}
+
+namespace test45 {
+ struct S {
+ enum e {};
+ };
+ template <typename T>
+ void f(enum T::e *) {}
+ template void f<S>(S::e *);
+ // CHECK-LABEL: define weak_odr void @_ZN6test451fINS_1SEEEvPTeNT_1eE(i32*)
+}
+
+namespace test46 {
+ struct S {
+ struct s {};
+ };
+ template <typename T>
+ void f(struct T::s *) {}
+ template void f<S>(S::s *);
+ // CHECK-LABEL: define weak_odr void @_ZN6test461fINS_1SEEEvPTsNT_1sE(%"struct.test46::S::s"*)
+}
+
+namespace test47 {
+ struct S {
+ class c {};
+ };
+ template <typename T>
+ void f(class T::c *) {}
+ template void f<S>(S::c *);
+ // CHECK-LABEL: define weak_odr void @_ZN6test471fINS_1SEEEvPTsNT_1cE(%"class.test47::S::c"*)
+}
+
+namespace test48 {
+ struct S {
+ union u {};
+ };
+ template <typename T>
+ void f(union T::u *) {}
+ template void f<S>(S::u *);
+ // CHECK-LABEL: define weak_odr void @_ZN6test481fINS_1SEEEvPTuNT_1uE(%"union.test48::S::u"*)
+}
diff --git a/test/CodeGenCXX/member-alignment.cpp b/test/CodeGenCXX/member-alignment.cpp
index 78026d4e0419..43ed5e28e884 100644
--- a/test/CodeGenCXX/member-alignment.cpp
+++ b/test/CodeGenCXX/member-alignment.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple %s -o - | FileCheck %s
// rdar://7268289
diff --git a/test/CodeGenCXX/member-function-pointer-calls.cpp b/test/CodeGenCXX/member-function-pointer-calls.cpp
index 99162ebd5863..67417ef04693 100644
--- a/test/CodeGenCXX/member-function-pointer-calls.cpp
+++ b/test/CodeGenCXX/member-function-pointer-calls.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -O3 -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64-windows-gnu -emit-llvm -o - | FileCheck %s -check-prefix MINGW64
struct A {
virtual int vf1() { return 1; }
virtual int vf2() { return 2; }
@@ -10,6 +11,8 @@ int f(A* a, int (A::*fp)()) {
// CHECK-LABEL: define i32 @_Z2g1v()
// CHECK: ret i32 1
+// MINGW64-LABEL: define i32 @_Z2g1v()
+// MINGW64: call i32 @_Z1fP1AMS_FivE(%struct.A* %{{.*}}, { i64, i64 }* %{{.*}})
int g1() {
A a;
return f(&a, &A::vf1);
@@ -17,6 +20,8 @@ int g1() {
// CHECK-LABEL: define i32 @_Z2g2v()
// CHECK: ret i32 2
+// MINGW64-LABEL: define i32 @_Z2g2v()
+// MINGW64: call i32 @_Z1fP1AMS_FivE(%struct.A* %{{.*}}, { i64, i64 }* %{{.*}})
int g2() {
A a;
return f(&a, &A::vf2);
diff --git a/test/CodeGenCXX/member-init-anon-union.cpp b/test/CodeGenCXX/member-init-anon-union.cpp
index bfe1667c8c6c..b488fa763d64 100644
--- a/test/CodeGenCXX/member-init-anon-union.cpp
+++ b/test/CodeGenCXX/member-init-anon-union.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -std=c++11 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -std=c++11 -triple x86_64-linux-gnu -emit-llvm -o - | FileCheck %s
// PR10531.
@@ -21,12 +21,42 @@ int g() {
int a;
int b = 81;
};
- // CHECK: define {{.*}}_Z1gv
+ // CHECK-LABEL: define {{.*}}_Z1gv
// CHECK-NOT: }
// CHECK: call {{.*}}@"[[CONSTRUCT_LOCAL:.*]]C1Ev"
return b;
}
+struct A {
+ A();
+};
+union B {
+ int k;
+ struct {
+ A x;
+ int y = 123;
+ };
+ B() {}
+ B(int n) : k(n) {}
+};
+
+B b1;
+B b2(0);
+
+
+// CHECK-LABEL: define {{.*}} @_ZN1BC2Ei(
+// CHECK-NOT: call void @_ZN1AC1Ev(
+// CHECK-NOT: store i32 123,
+// CHECK: store i32 %
+// CHECK-NOT: call void @_ZN1AC1Ev(
+// CHECK-NOT: store i32 123,
+// CHECK: }
+
+// CHECK-LABEL: define {{.*}} @_ZN1BC2Ev(
+// CHECK: call void @_ZN1AC1Ev(
+// CHECK: store i32 123,
+// CHECK: }
+
// CHECK: define {{.*}}@"[[CONSTRUCT_LOCAL]]C2Ev"
// CHECK-NOT: }
diff --git a/test/CodeGenCXX/member-templates.cpp b/test/CodeGenCXX/member-templates.cpp
index c72dd6e5f528..93d36ff4750a 100644
--- a/test/CodeGenCXX/member-templates.cpp
+++ b/test/CodeGenCXX/member-templates.cpp
@@ -15,8 +15,8 @@ struct B {
template<typename T> B::B(T) {}
-// CHECK-LABEL: define weak_odr void @_ZN1BC1IiEET_(%struct.B* %this, i32) unnamed_addr
// CHECK-LABEL: define weak_odr void @_ZN1BC2IiEET_(%struct.B* %this, i32) unnamed_addr
+// CHECK-LABEL: define weak_odr void @_ZN1BC1IiEET_(%struct.B* %this, i32) unnamed_addr
template B::B(int);
template<typename T>
diff --git a/test/CodeGenCXX/microsoft-abi-alignment-fail.cpp b/test/CodeGenCXX/microsoft-abi-alignment-fail.cpp
index 7407efed2f9d..c8477f4cbdd3 100644
--- a/test/CodeGenCXX/microsoft-abi-alignment-fail.cpp
+++ b/test/CodeGenCXX/microsoft-abi-alignment-fail.cpp
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -fno-rtti -emit-llvm -cxx-abi microsoft -triple=i686-pc-win32 -o - %s 2>/dev/null | FileCheck %s
-// RUN: %clang_cc1 -fno-rtti -emit-llvm -cxx-abi microsoft -triple=x86_64-pc-win32 -o - %s 2>/dev/null | FileCheck %s -check-prefix CHECK-X64
+// RUN: %clang_cc1 -fno-rtti -emit-llvm -triple=i686-pc-win32 -o - %s 2>/dev/null | FileCheck %s
+// RUN: %clang_cc1 -fno-rtti -emit-llvm -triple=x86_64-pc-win32 -o - %s 2>/dev/null | FileCheck %s -check-prefix CHECK-X64
struct B { char a; };
struct A : virtual B {} a;
// The <> indicate that the pointer is packed, which is required to support
// microsoft layout in 32 bit mode, but not 64 bit mode.
-// CHECK: %struct.A = type <{ i32*, %struct.B }>
-// CHECK-X64: %struct.A = type { i32*, %struct.B }
+// CHECK: %struct.A = type <{ i32*, %struct.B }>
+// CHECK-X64: %struct.A = type { i32*, %struct.B }
diff --git a/test/CodeGenCXX/microsoft-abi-arg-order.cpp b/test/CodeGenCXX/microsoft-abi-arg-order.cpp
new file mode 100644
index 000000000000..b47508b302d1
--- /dev/null
+++ b/test/CodeGenCXX/microsoft-abi-arg-order.cpp
@@ -0,0 +1,74 @@
+// RUN: %clang_cc1 -mconstructor-aliases -std=c++11 -fexceptions -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s -check-prefix=X86
+// RUN: %clang_cc1 -mconstructor-aliases -std=c++11 -fexceptions -emit-llvm %s -o - -triple=x86_64-pc-win32 | FileCheck %s -check-prefix=X64
+
+struct A {
+ A(int a);
+ A(const A &o);
+ ~A();
+ int a;
+};
+
+void foo(A a, A b, A c) {
+}
+
+// Order of destruction should be left to right.
+//
+// X86-LABEL: define void @"\01?foo@@YAXUA@@00@Z"
+// X86: ([[argmem_ty:<{ %struct.A, %struct.A, %struct.A }>]]* inalloca)
+// X86: %[[a:[^ ]*]] = getelementptr inbounds [[argmem_ty]]* %0, i32 0, i32 0
+// X86: %[[b:[^ ]*]] = getelementptr inbounds [[argmem_ty]]* %0, i32 0, i32 1
+// X86: %[[c:[^ ]*]] = getelementptr inbounds [[argmem_ty]]* %0, i32 0, i32 2
+// X86: call x86_thiscallcc void @"\01??1A@@QAE@XZ"(%struct.A* %[[a]])
+// X86: call x86_thiscallcc void @"\01??1A@@QAE@XZ"(%struct.A* %[[b]])
+// X86: call x86_thiscallcc void @"\01??1A@@QAE@XZ"(%struct.A* %[[c]])
+// X86: ret void
+
+// X64-LABEL: define void @"\01?foo@@YAXUA@@00@Z"
+// X64: (%struct.A* %[[a:[^,]*]], %struct.A* %[[b:[^,]*]], %struct.A* %[[c:[^)]*]])
+// X64: call void @"\01??1A@@QEAA@XZ"(%struct.A* %[[a]])
+// X64: call void @"\01??1A@@QEAA@XZ"(%struct.A* %[[b]])
+// X64: call void @"\01??1A@@QEAA@XZ"(%struct.A* %[[c]])
+// X64: ret void
+
+
+void call_foo() {
+ foo(A(1), A(2), A(3));
+}
+
+// Order of evaluation should be right to left, and we should clean up the right
+// things as we unwind.
+//
+// X86-LABEL: define void @"\01?call_foo@@YAXXZ"()
+// X86: call i8* @llvm.stacksave()
+// X86: %[[argmem:[^ ]*]] = alloca inalloca [[argmem_ty]]
+// X86: %[[arg3:[^ ]*]] = getelementptr inbounds [[argmem_ty]]* %[[argmem]], i32 0, i32 2
+// X86: invoke x86_thiscallcc %struct.A* @"\01??0A@@QAE@H@Z"(%struct.A* %[[arg3]], i32 3)
+// X86: %[[arg2:[^ ]*]] = getelementptr inbounds [[argmem_ty]]* %[[argmem]], i32 0, i32 1
+// X86: invoke x86_thiscallcc %struct.A* @"\01??0A@@QAE@H@Z"(%struct.A* %[[arg2]], i32 2)
+// X86: %[[arg1:[^ ]*]] = getelementptr inbounds [[argmem_ty]]* %[[argmem]], i32 0, i32 0
+// X86: invoke x86_thiscallcc %struct.A* @"\01??0A@@QAE@H@Z"(%struct.A* %[[arg1]], i32 1)
+// X86: invoke void @"\01?foo@@YAXUA@@00@Z"([[argmem_ty]]* inalloca %[[argmem]])
+// X86: call void @llvm.stackrestore
+// X86: ret void
+//
+// lpad2:
+// X86: call x86_thiscallcc void @"\01??1A@@QAE@XZ"(%struct.A* %[[arg2]])
+// X86: br label
+//
+// ehcleanup:
+// X86: call x86_thiscallcc void @"\01??1A@@QAE@XZ"(%struct.A* %[[arg3]])
+
+// X64-LABEL: define void @"\01?call_foo@@YAXXZ"()
+// X64: call %struct.A* @"\01??0A@@QEAA@H@Z"(%struct.A* %[[arg3:[^,]*]], i32 3)
+// X64: invoke %struct.A* @"\01??0A@@QEAA@H@Z"(%struct.A* %[[arg2:[^,]*]], i32 2)
+// X64: invoke %struct.A* @"\01??0A@@QEAA@H@Z"(%struct.A* %[[arg1:[^,]*]], i32 1)
+// X64: call void @"\01?foo@@YAXUA@@00@Z"
+// X64: (%struct.A* %[[arg1]], %struct.A* %[[arg2]], %struct.A* %[[arg3]])
+// X64: ret void
+//
+// lpad2:
+// X64: call void @"\01??1A@@QEAA@XZ"(%struct.A* %[[arg2]])
+// X64: br label
+//
+// ehcleanup:
+// X64: call void @"\01??1A@@QEAA@XZ"(%struct.A* %[[arg3]])
diff --git a/test/CodeGenCXX/microsoft-abi-array-cookies.cpp b/test/CodeGenCXX/microsoft-abi-array-cookies.cpp
index 1ba1f6a5f278..8da4fcf21382 100644
--- a/test/CodeGenCXX/microsoft-abi-array-cookies.cpp
+++ b/test/CodeGenCXX/microsoft-abi-array-cookies.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-pc-win32 | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
struct ClassWithoutDtor {
char x;
diff --git a/test/CodeGenCXX/microsoft-abi-byval-sret.cpp b/test/CodeGenCXX/microsoft-abi-byval-sret.cpp
new file mode 100644
index 000000000000..985b1ce62e92
--- /dev/null
+++ b/test/CodeGenCXX/microsoft-abi-byval-sret.cpp
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i686-pc-win32 -mconstructor-aliases -fno-rtti | FileCheck %s
+
+struct A {
+ A() : a(42) {}
+ A(const A &o) : a(o.a) {}
+ ~A() {}
+ int a;
+ A foo(A o);
+};
+
+A A::foo(A x) {
+ A y(*this);
+ y.a += x.a;
+ return y;
+}
+
+// CHECK-LABEL: define x86_thiscallcc %struct.A* @"\01?foo@A@@QAE?AU1@U1@@Z"
+// CHECK: (%struct.A* %this, <{ %struct.A*, %struct.A }>* inalloca)
+// CHECK: getelementptr inbounds <{ %struct.A*, %struct.A }>* %{{.*}}, i32 0, i32 0
+// CHECK: load %struct.A**
+// CHECK: ret %struct.A*
+
+int main() {
+ A x;
+ A y = x.foo(x);
+}
+
+// CHECK: call x86_thiscallcc %struct.A* @"\01?foo@A@@QAE?AU1@U1@@Z"
+// CHECK: (%struct.A* %{{[^,]*}}, <{ %struct.A*, %struct.A }>* inalloca %{{[^,]*}})
diff --git a/test/CodeGenCXX/microsoft-abi-byval-vararg.cpp b/test/CodeGenCXX/microsoft-abi-byval-vararg.cpp
new file mode 100644
index 000000000000..6a0a8601c0cc
--- /dev/null
+++ b/test/CodeGenCXX/microsoft-abi-byval-vararg.cpp
@@ -0,0 +1,52 @@
+// RUN: %clang_cc1 -Wno-non-pod-varargs -emit-llvm %s -o - -triple=i686-pc-win32 -mconstructor-aliases -fno-rtti | FileCheck %s
+
+#include <stdarg.h>
+
+struct A {
+ A(int a) : a(a) {}
+ A(const A &o) : a(o.a) {}
+ ~A() {}
+ int a;
+};
+
+int foo(A a, ...) {
+ va_list ap;
+ va_start(ap, a);
+ int sum = 0;
+ for (int i = 0; i < a.a; ++i)
+ sum += va_arg(ap, int);
+ va_end(ap);
+ return sum;
+}
+
+// CHECK-LABEL: define i32 @"\01?foo@@YAHUA@@ZZ"(<{ %struct.A }>* inalloca, ...)
+
+int main() {
+ return foo(A(3), 1, 2, 3);
+}
+// CHECK-LABEL: define i32 @main()
+// CHECK: %[[argmem:[^ ]*]] = alloca inalloca <{ %struct.A, i32, i32, i32 }>
+// CHECK: call i32 {{.*bitcast.*}}@"\01?foo@@YAHUA@@ZZ"{{.*}}(<{ %struct.A, i32, i32, i32 }>* inalloca %[[argmem]])
+
+void varargs_zero(...);
+void varargs_one(int, ...);
+void varargs_two(int, int, ...);
+void varargs_three(int, int, int, ...);
+void call_var_args() {
+ A x(3);
+ varargs_zero(x);
+ varargs_one(1, x);
+ varargs_two(1, 2, x);
+ varargs_three(1, 2, 3, x);
+}
+
+// CHECK-LABEL: define void @"\01?call_var_args@@YAXXZ"()
+// CHECK: call void {{.*bitcast.*varargs_zero.*}}(<{ %struct.A }>* inalloca %{{.*}})
+// CHECK: call void {{.*bitcast.*varargs_one.*}}(<{ i32, %struct.A }>* inalloca %{{.*}})
+// CHECK: call void {{.*bitcast.*varargs_two.*}}(<{ i32, i32, %struct.A }>* inalloca %{{.*}})
+// CHECK: call void {{.*bitcast.*varargs_three.*}}(<{ i32, i32, i32, %struct.A }>* inalloca %{{.*}})
+
+// CHECK-LABEL: declare void @"\01?varargs_zero@@YAXZZ"(...)
+// CHECK-LABEL: declare void @"\01?varargs_one@@YAXHZZ"(i32, ...)
+// CHECK-LABEL: declare void @"\01?varargs_two@@YAXHHZZ"(i32, i32, ...)
+// CHECK-LABEL: declare void @"\01?varargs_three@@YAXHHHZZ"(i32, i32, i32, ...)
diff --git a/test/CodeGenCXX/microsoft-abi-cdecl-method-sret.cpp b/test/CodeGenCXX/microsoft-abi-cdecl-method-sret.cpp
new file mode 100644
index 000000000000..da58c461dcc0
--- /dev/null
+++ b/test/CodeGenCXX/microsoft-abi-cdecl-method-sret.cpp
@@ -0,0 +1,44 @@
+// RUN: %clang_cc1 -triple i386-pc-win32 -emit-llvm %s -o - | FileCheck %s
+
+// PR15768
+
+// A trivial 12 byte struct is returned indirectly.
+struct S {
+ S();
+ int a, b, c;
+};
+
+struct C {
+ S variadic_sret(const char *f, ...);
+ S __cdecl cdecl_sret();
+ S __cdecl byval_and_sret(S a);
+ int c;
+};
+
+S C::variadic_sret(const char *f, ...) { return S(); }
+S C::cdecl_sret() { return S(); }
+S C::byval_and_sret(S a) { return S(); }
+
+// CHECK: define void @"\01?variadic_sret@C@@QAA?AUS@@PBDZZ"(%struct.C* %this, %struct.S* noalias sret %agg.result, i8* %f, ...)
+// CHECK: define void @"\01?cdecl_sret@C@@QAA?AUS@@XZ"(%struct.C* %this, %struct.S* noalias sret %agg.result)
+// CHECK: define void @"\01?byval_and_sret@C@@QAA?AUS@@U2@@Z"(%struct.C* %this, %struct.S* noalias sret %agg.result, %struct.S* byval align 4 %a)
+
+int main() {
+ C c;
+ c.variadic_sret("asdf");
+ c.cdecl_sret();
+ c.byval_and_sret(S());
+}
+// CHECK-LABEL: define i32 @main()
+// CHECK: call void {{.*}} @"\01?variadic_sret@C@@QAA?AUS@@PBDZZ"
+// CHECK: call void @"\01?cdecl_sret@C@@QAA?AUS@@XZ"
+// CHECK: call void @"\01?byval_and_sret@C@@QAA?AUS@@U2@@Z"
+
+// __fastcall has similar issues.
+struct A {
+ S __fastcall f(int x);
+};
+S A::f(int x) {
+ return S();
+}
+// CHECK-LABEL: define x86_fastcallcc void @"\01?f@A@@QAI?AUS@@H@Z"(%struct.A* inreg %this, %struct.S* inreg noalias sret %agg.result, i32 %x)
diff --git a/test/CodeGenCXX/microsoft-abi-constexpr-vs-inheritance.cpp b/test/CodeGenCXX/microsoft-abi-constexpr-vs-inheritance.cpp
index 92db9a789b3c..319f39c3ff48 100644
--- a/test/CodeGenCXX/microsoft-abi-constexpr-vs-inheritance.cpp
+++ b/test/CodeGenCXX/microsoft-abi-constexpr-vs-inheritance.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 -fno-rtti -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-pc-win32 | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -fno-rtti -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
struct A {
constexpr A(int x) : x(x) {}
diff --git a/test/CodeGenCXX/microsoft-abi-default-cc.cpp b/test/CodeGenCXX/microsoft-abi-default-cc.cpp
index d7fba9911e1b..e3ca39221e88 100644
--- a/test/CodeGenCXX/microsoft-abi-default-cc.cpp
+++ b/test/CodeGenCXX/microsoft-abi-default-cc.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck -check-prefix GCABI %s
-// RUN: %clang_cc1 -emit-llvm %s -o - -DMS_ABI -cxx-abi microsoft -triple=i386-pc-win32 | FileCheck -check-prefix MSABI %s
+// RUN: %clang_cc1 -triple i386-pc-linux -emit-llvm %s -o - | FileCheck -check-prefix GCABI %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -DMS_ABI -triple=i386-pc-win32 | FileCheck -check-prefix MSABI %s
#ifdef MS_ABI
# define METHOD_CC __thiscall
diff --git a/test/CodeGenCXX/microsoft-abi-dynamic-cast.cpp b/test/CodeGenCXX/microsoft-abi-dynamic-cast.cpp
new file mode 100644
index 000000000000..225407b7fa9c
--- /dev/null
+++ b/test/CodeGenCXX/microsoft-abi-dynamic-cast.cpp
@@ -0,0 +1,130 @@
+// RUN: %clang_cc1 -emit-llvm -O1 -o - -triple=i386-pc-win32 %s | FileCheck %s
+
+struct S { char a; };
+struct V { virtual void f(); };
+struct A : virtual V {};
+struct B : S, virtual V {};
+struct T {};
+
+T* test0() { return dynamic_cast<T*>((B*)0); }
+// CHECK-LABEL: define noalias %struct.T* @"\01?test0@@YAPAUT@@XZ"()
+// CHECK: ret %struct.T* null
+
+T* test1(V* x) { return &dynamic_cast<T&>(*x); }
+// CHECK-LABEL: define %struct.T* @"\01?test1@@YAPAUT@@PAUV@@@Z"(%struct.V* %x)
+// CHECK: [[CAST:%.*]] = bitcast %struct.V* %x to i8*
+// CHECK-NEXT: [[CALL:%.*]] = tail call i8* @__RTDynamicCast(i8* [[CAST]], i32 0, i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUV@@@8" to i8*), i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUT@@@8" to i8*), i32 1)
+// CHECK-NEXT: [[RET:%.*]] = bitcast i8* [[CALL]] to %struct.T*
+// CHECK-NEXT: ret %struct.T* [[RET]]
+
+T* test2(A* x) { return &dynamic_cast<T&>(*x); }
+// CHECK-LABEL: define %struct.T* @"\01?test2@@YAPAUT@@PAUA@@@Z"(%struct.A* %x)
+// CHECK: [[CAST:%.*]] = bitcast %struct.A* %x to i8*
+// CHECK-NEXT: [[BITCAST:%.*]] = bitcast %struct.A* %x to i8**
+// CHECK-NEXT: [[VBTBL:%.*]] = load i8** [[BITCAST]], align 4
+// CHECK-NEXT: [[VBOFFP:%.*]] = getelementptr inbounds i8* [[VBTBL]], i32 4
+// CHECK-NEXT: [[VBOFFPCAST:%.*]] = bitcast i8* [[VBOFFP]] to i32*
+// CHECK-NEXT: [[VBOFFS:%.*]] = load i32* [[VBOFFPCAST]], align 4
+// CHECK-NEXT: [[ADJ:%.*]] = getelementptr inbounds i8* [[CAST]], i32 [[VBOFFS]]
+// CHECK-NEXT: [[CALL:%.*]] = tail call i8* @__RTDynamicCast(i8* [[ADJ]], i32 [[VBOFFS]], i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUA@@@8" to i8*), i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUT@@@8" to i8*), i32 1)
+// CHECK-NEXT: [[RET:%.*]] = bitcast i8* [[CALL]] to %struct.T*
+// CHECK-NEXT: ret %struct.T* [[RET]]
+
+T* test3(B* x) { return &dynamic_cast<T&>(*x); }
+// CHECK-LABEL: define %struct.T* @"\01?test3@@YAPAUT@@PAUB@@@Z"(%struct.B* %x)
+// CHECK: [[VOIDP:%.*]] = getelementptr inbounds %struct.B* %x, i32 0, i32 0, i32 0
+// CHECK-NEXT: [[VBPTR:%.*]] = getelementptr inbounds i8* [[VOIDP]], i32 4
+// CHECK-NEXT: [[BITCAST:%.*]] = bitcast i8* [[VBPTR:%.*]] to i8**
+// CHECK-NEXT: [[VBTBL:%.*]] = load i8** [[BITCAST]], align 4
+// CHECK-NEXT: [[VBOFFP:%.*]] = getelementptr inbounds i8* [[VBTBL]], i32 4
+// CHECK-NEXT: [[VBOFFPCAST:%.*]] = bitcast i8* [[VBOFFP]] to i32*
+// CHECK-NEXT: [[VBOFFS:%.*]] = load i32* [[VBOFFPCAST]], align 4
+// CHECK-NEXT: [[DELTA:%.*]] = add nsw i32 [[VBOFFS]], 4
+// CHECK-NEXT: [[ADJ:%.*]] = getelementptr inbounds i8* [[VOIDP]], i32 [[DELTA]]
+// CHECK-NEXT: [[CALL:%.*]] = tail call i8* @__RTDynamicCast(i8* [[ADJ]], i32 [[DELTA]], i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUB@@@8" to i8*), i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUT@@@8" to i8*), i32 1)
+// CHECK-NEXT: [[RET:%.*]] = bitcast i8* [[CALL]] to %struct.T*
+// CHECK-NEXT: ret %struct.T* [[RET]]
+
+T* test4(V* x) { return dynamic_cast<T*>(x); }
+// CHECK-LABEL: define %struct.T* @"\01?test4@@YAPAUT@@PAUV@@@Z"(%struct.V* %x)
+// CHECK: [[CAST:%.*]] = bitcast %struct.V* %x to i8*
+// CHECK-NEXT: [[CALL:%.*]] = tail call i8* @__RTDynamicCast(i8* [[CAST]], i32 0, i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUV@@@8" to i8*), i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUT@@@8" to i8*), i32 0)
+// CHECK-NEXT: [[RET:%.*]] = bitcast i8* [[CALL]] to %struct.T*
+// CHECK-NEXT: ret %struct.T* [[RET]]
+
+T* test5(A* x) { return dynamic_cast<T*>(x); }
+// CHECK-LABEL: define %struct.T* @"\01?test5@@YAPAUT@@PAUA@@@Z"(%struct.A* %x)
+// CHECK: [[CHECK:%.*]] = icmp eq %struct.A* %x, null
+// CHECK-NEXT: br i1 [[CHECK]]
+// CHECK: [[VOIDP:%.*]] = bitcast %struct.A* %x to i8*
+// CHECK-NEXT: [[BITCAST:%.*]] = bitcast %struct.A* %x to i8**
+// CHECK-NEXT: [[VBTBL:%.*]] = load i8** [[BITCAST]], align 4
+// CHECK-NEXT: [[VBOFFP:%.*]] = getelementptr inbounds i8* [[VBTBL]], i32 4
+// CHECK-NEXT: [[VBOFFPCAST:%.*]] = bitcast i8* [[VBOFFP]] to i32*
+// CHECK-NEXT: [[VBOFFS:%.*]] = load i32* [[VBOFFPCAST:%.*]], align 4
+// CHECK-NEXT: [[ADJ:%.*]] = getelementptr inbounds i8* [[VOIDP]], i32 [[VBOFFS]]
+// CHECK-NEXT: [[CALL:%.*]] = tail call i8* @__RTDynamicCast(i8* [[ADJ]], i32 [[VBOFFS]], i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUA@@@8" to i8*), i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUT@@@8" to i8*), i32 0)
+// CHECK-NEXT: [[RES:%.*]] = bitcast i8* [[CALL]] to %struct.T*
+// CHECK-NEXT: br label
+// CHECK: [[RET:%.*]] = phi %struct.T*
+// CHECK-NEXT: ret %struct.T* [[RET]]
+
+T* test6(B* x) { return dynamic_cast<T*>(x); }
+// CHECK-LABEL: define %struct.T* @"\01?test6@@YAPAUT@@PAUB@@@Z"(%struct.B* %x)
+// CHECK: [[CHECK:%.*]] = icmp eq %struct.B* %x, null
+// CHECK-NEXT: br i1 [[CHECK]]
+// CHECK: [[CAST:%.*]] = getelementptr inbounds %struct.B* %x, i32 0, i32 0, i32 0
+// CHECK-NEXT: [[VBPTR:%.*]] = getelementptr inbounds i8* [[CAST]], i32 4
+// CHECK-NEXT: [[BITCAST:%.*]] = bitcast i8* [[VBPTR]] to i8**
+// CHECK-NEXT: [[VBTBL:%.*]] = load i8** [[BITCAST]], align 4
+// CHECK-NEXT: [[VBOFFP:%.*]] = getelementptr inbounds i8* [[VBTBL]], i32 4
+// CHECK-NEXT: [[VBOFFPCAST:%.*]] = bitcast i8* [[VBOFFP]] to i32*
+// CHECK-NEXT: [[VBOFFS:%.*]] = load i32* [[VBOFFPCAST:%.*]], align 4
+// CHECK-NEXT: [[DELTA:%.*]] = add nsw i32 [[VBOFFS]], 4
+// CHECK-NEXT: [[ADJ:%.*]] = getelementptr inbounds i8* [[CAST]], i32 [[DELTA]]
+// CHECK-NEXT: [[CALL:%.*]] = tail call i8* @__RTDynamicCast(i8* [[ADJ]], i32 [[DELTA]], i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUB@@@8" to i8*), i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUT@@@8" to i8*), i32 0)
+// CHECK-NEXT: [[RES:%.*]] = bitcast i8* [[CALL]] to %struct.T*
+// CHECK-NEXT: br label
+// CHECK: [[RET:%.*]] = phi %struct.T*
+// CHECK-NEXT: ret %struct.T* [[RET]]
+
+void* test7(V* x) { return dynamic_cast<void*>(x); }
+// CHECK-LABEL: define i8* @"\01?test7@@YAPAXPAUV@@@Z"(%struct.V* %x)
+// CHECK: [[CAST:%.*]] = bitcast %struct.V* %x to i8*
+// CHECK-NEXT: [[RET:%.*]] = tail call i8* @__RTCastToVoid(i8* [[CAST]])
+// CHECK-NEXT: ret i8* [[RET]]
+
+void* test8(A* x) { return dynamic_cast<void*>(x); }
+// CHECK-LABEL: define i8* @"\01?test8@@YAPAXPAUA@@@Z"(%struct.A* %x)
+// CHECK: [[CHECK:%.*]] = icmp eq %struct.A* %x, null
+// CHECK-NEXT: br i1 [[CHECK]]
+// CHECK: [[VOIDP:%.*]] = bitcast %struct.A* %x to i8*
+// CHECK-NEXT: [[BITCAST:%.*]] = bitcast %struct.A* %x to i8**
+// CHECK-NEXT: [[VBTBL:%.*]] = load i8** [[BITCAST]], align 4
+// CHECK-NEXT: [[VBOFFP:%.*]] = getelementptr inbounds i8* [[VBTBL]], i32 4
+// CHECK-NEXT: [[VBOFFPCAST:%.*]] = bitcast i8* [[VBOFFP]] to i32*
+// CHECK-NEXT: [[VBOFFS:%.*]] = load i32* [[VBOFFPCAST:%.*]], align 4
+// CHECK-NEXT: [[ADJ:%.*]] = getelementptr inbounds i8* [[VOIDP]], i32 [[VBOFFS]]
+// CHECK-NEXT: [[RES:%.*]] = tail call i8* @__RTCastToVoid(i8* [[ADJ]])
+// CHECK-NEXT: br label
+// CHECK: [[RET:%.*]] = phi i8*
+// CHECK-NEXT: ret i8* [[RET]]
+
+void* test9(B* x) { return dynamic_cast<void*>(x); }
+// CHECK-LABEL: define i8* @"\01?test9@@YAPAXPAUB@@@Z"(%struct.B* %x)
+// CHECK: [[CHECK:%.*]] = icmp eq %struct.B* %x, null
+// CHECK-NEXT: br i1 [[CHECK]]
+// CHECK: [[CAST:%.*]] = getelementptr inbounds %struct.B* %x, i32 0, i32 0, i32 0
+// CHECK-NEXT: [[VBPTR:%.*]] = getelementptr inbounds i8* [[CAST]], i32 4
+// CHECK-NEXT: [[BITCAST:%.*]] = bitcast i8* [[VBPTR]] to i8**
+// CHECK-NEXT: [[VBTBL:%.*]] = load i8** [[BITCAST]], align 4
+// CHECK-NEXT: [[VBOFFP:%.*]] = getelementptr inbounds i8* [[VBTBL]], i32 4
+// CHECK-NEXT: [[VBOFFPCAST:%.*]] = bitcast i8* [[VBOFFP]] to i32*
+// CHECK-NEXT: [[VBOFFS:%.*]] = load i32* [[VBOFFPCAST:%.*]], align 4
+// CHECK-NEXT: [[DELTA:%.*]] = add nsw i32 [[VBOFFS]], 4
+// CHECK-NEXT: [[ADJ:%.*]] = getelementptr inbounds i8* [[CAST]], i32 [[DELTA]]
+// CHECK-NEXT: [[CALL:%.*]] = tail call i8* @__RTCastToVoid(i8* [[ADJ]])
+// CHECK-NEXT: br label
+// CHECK: [[RET:%.*]] = phi i8*
+// CHECK-NEXT: ret i8* [[RET]]
+
diff --git a/test/CodeGenCXX/microsoft-abi-exceptions.cpp b/test/CodeGenCXX/microsoft-abi-exceptions.cpp
index 7757ea004359..60a3514c640a 100644
--- a/test/CodeGenCXX/microsoft-abi-exceptions.cpp
+++ b/test/CodeGenCXX/microsoft-abi-exceptions.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -mconstructor-aliases -cxx-abi microsoft -fexceptions -fno-rtti | FileCheck -check-prefix WIN32 %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -mconstructor-aliases -fexceptions -fno-rtti | FileCheck -check-prefix WIN32 %s
struct A {
A();
@@ -14,17 +14,21 @@ void HasEHCleanup() {
}
// With exceptions, we need to clean up at least one of these temporaries.
-// WIN32: define void @"\01?HasEHCleanup@@YAXXZ"() {{.*}} {
-// First one doesn't have any cleanups, no need for invoke.
-// WIN32: call void @"\01?getA@@YA?AUA@@XZ"(%struct.A* sret %{{.*}})
+// WIN32-LABEL: define void @"\01?HasEHCleanup@@YAXXZ"() {{.*}} {
+// WIN32: %[[base:.*]] = call i8* @llvm.stacksave()
+// If this call throws, we have to restore the stack.
+// WIN32: invoke void @"\01?getA@@YA?AUA@@XZ"(%struct.A* sret %{{.*}})
// If this call throws, we have to cleanup the first temporary.
// WIN32: invoke void @"\01?getA@@YA?AUA@@XZ"(%struct.A* sret %{{.*}})
-// If this call throws, we already popped our cleanups
-// WIN32: call i32 @"\01?TakesTwo@@YAHUA@@0@Z"
+// If this call throws, we have to cleanup the stacksave.
+// WIN32: invoke i32 @"\01?TakesTwo@@YAHUA@@0@Z"
+// WIN32: call void @llvm.stackrestore(i8* %[[base]])
// WIN32: ret void
//
// There should be one dtor call for unwinding from the second getA.
// WIN32: invoke x86_thiscallcc void @"\01??1A@@QAE@XZ"
+// WIN32-NOT: @"\01??1A@@QAE@XZ"
+// WIN32: call void @llvm.stackrestore
// WIN32: }
void TakeRef(const A &a);
@@ -32,20 +36,28 @@ int HasDeactivatedCleanups() {
return TakesTwo((TakeRef(A()), A()), (TakeRef(A()), A()));
}
-// WIN32: define i32 @"\01?HasDeactivatedCleanups@@YAHXZ"() {{.*}} {
+// WIN32-LABEL: define i32 @"\01?HasDeactivatedCleanups@@YAHXZ"() {{.*}} {
// WIN32: %[[isactive:.*]] = alloca i1
-// WIN32: call x86_thiscallcc %struct.A* @"\01??0A@@QAE@XZ"
+// WIN32: call i8* @llvm.stacksave()
+// WIN32: %[[argmem:.*]] = alloca inalloca [[argmem_ty:<{ %struct.A, %struct.A }>]]
+// WIN32: %[[arg1:.*]] = getelementptr inbounds [[argmem_ty]]* %[[argmem]], i32 0, i32 1
+// WIN32: invoke x86_thiscallcc %struct.A* @"\01??0A@@QAE@XZ"
// WIN32: invoke void @"\01?TakeRef@@YAXABUA@@@Z"
-// WIN32: invoke x86_thiscallcc %struct.A* @"\01??0A@@QAE@XZ"(%struct.A* %[[arg1:.*]])
+//
+// WIN32: invoke x86_thiscallcc %struct.A* @"\01??0A@@QAE@XZ"(%struct.A* %[[arg1]])
// WIN32: store i1 true, i1* %[[isactive]]
+//
+// WIN32: %[[arg0:.*]] = getelementptr inbounds [[argmem_ty]]* %[[argmem]], i32 0, i32 0
// WIN32: invoke x86_thiscallcc %struct.A* @"\01??0A@@QAE@XZ"
// WIN32: invoke void @"\01?TakeRef@@YAXABUA@@@Z"
// WIN32: invoke x86_thiscallcc %struct.A* @"\01??0A@@QAE@XZ"
// WIN32: store i1 false, i1* %[[isactive]]
-// WIN32: invoke i32 @"\01?TakesTwo@@YAHUA@@0@Z"
+//
+// WIN32: invoke i32 @"\01?TakesTwo@@YAHUA@@0@Z"([[argmem_ty]]* inalloca %[[argmem]])
+// WIN32: call void @llvm.stackrestore
// Destroy the two const ref temporaries.
// WIN32: invoke x86_thiscallcc void @"\01??1A@@QAE@XZ"
-// WIN32: call x86_thiscallcc void @"\01??1A@@QAE@XZ"
+// WIN32: invoke x86_thiscallcc void @"\01??1A@@QAE@XZ"
// WIN32: ret i32
//
// Conditionally destroy arg1.
@@ -60,20 +72,22 @@ int HasConditionalCleanup(bool cond) {
return (cond ? TakesTwo(A(), A()) : CouldThrow());
}
-// WIN32: define i32 @"\01?HasConditionalCleanup@@YAH_N@Z"(i1 zeroext %{{.*}}) {{.*}} {
+// WIN32-LABEL: define i32 @"\01?HasConditionalCleanup@@YAH_N@Z"(i1 zeroext %{{.*}}) {{.*}} {
// WIN32: store i1 false
// WIN32: br i1
-// No cleanups, so we call and then activate a cleanup if it succeeds.
-// WIN32: call x86_thiscallcc %struct.A* @"\01??0A@@QAE@XZ"(%struct.A* %[[arg1:.*]])
+// WIN32: call i8* @llvm.stacksave()
+// WIN32: invoke x86_thiscallcc %struct.A* @"\01??0A@@QAE@XZ"(%struct.A* %{{.*}})
// WIN32: store i1 true
-// Now we have a cleanup for the first aggregate, so we invoke.
// WIN32: invoke x86_thiscallcc %struct.A* @"\01??0A@@QAE@XZ"(%struct.A* %{{.*}})
-// Now we have no cleanups because TakeTwo will destruct both args.
-// WIN32: call i32 @"\01?TakesTwo@@YAHUA@@0@Z"
-// Still no cleanups, so call.
+// WIN32: invoke i32 @"\01?TakesTwo@@YAHUA@@0@Z"
+// WIN32: call void @llvm.stackrestore
+//
// WIN32: call i32 @"\01?CouldThrow@@YAHXZ"()
-// Somewhere in the landing pad for our single invoke, call the dtor.
-// WIN32: invoke x86_thiscallcc void @"\01??1A@@QAE@XZ"(%struct.A* %[[arg1]])
+//
+// Only one dtor in the invoke for arg1
+// WIN32: invoke x86_thiscallcc void @"\01??1A@@QAE@XZ"({{.*}})
+// WIN32-NOT: invoke x86_thiscallcc void @"\01??1A@@QAE@XZ"
+// WIN32: call void @llvm.stackrestore
// WIN32: }
// Now test both.
@@ -81,8 +95,7 @@ int HasConditionalDeactivatedCleanups(bool cond) {
return (cond ? TakesTwo((TakeRef(A()), A()), (TakeRef(A()), A())) : CouldThrow());
}
-// WIN32: define i32 @"\01?HasConditionalDeactivatedCleanups@@YAH_N@Z"{{.*}} {
-// WIN32: %[[arg1:.*]] = alloca %struct.A, align 4
+// WIN32-LABEL: define i32 @"\01?HasConditionalDeactivatedCleanups@@YAH_N@Z"{{.*}} {
// WIN32: alloca i1
// WIN32: %[[arg1_cond:.*]] = alloca i1
// Start all four cleanups as deactivated.
@@ -92,10 +105,10 @@ int HasConditionalDeactivatedCleanups(bool cond) {
// WIN32: store i1 false
// WIN32: br i1
// True condition.
-// WIN32: call x86_thiscallcc %struct.A* @"\01??0A@@QAE@XZ"
+// WIN32: invoke x86_thiscallcc %struct.A* @"\01??0A@@QAE@XZ"
// WIN32: store i1 true
// WIN32: invoke void @"\01?TakeRef@@YAXABUA@@@Z"
-// WIN32: invoke x86_thiscallcc %struct.A* @"\01??0A@@QAE@XZ"(%struct.A* %[[arg1]])
+// WIN32: invoke x86_thiscallcc %struct.A* @"\01??0A@@QAE@XZ"
// WIN32: store i1 true, i1* %[[arg1_cond]]
// WIN32: invoke x86_thiscallcc %struct.A* @"\01??0A@@QAE@XZ"
// WIN32: store i1 true
@@ -108,13 +121,13 @@ int HasConditionalDeactivatedCleanups(bool cond) {
// WIN32: invoke i32 @"\01?CouldThrow@@YAHXZ"()
// Two normal cleanups for TakeRef args.
// WIN32: invoke x86_thiscallcc void @"\01??1A@@QAE@XZ"
-// WIN32: call x86_thiscallcc void @"\01??1A@@QAE@XZ"
+// WIN32: invoke x86_thiscallcc void @"\01??1A@@QAE@XZ"
// WIN32: ret i32
//
// Somewhere in the landing pad soup, we conditionally destroy arg1.
// WIN32: %[[isactive:.*]] = load i1* %[[arg1_cond]]
// WIN32: br i1 %[[isactive]]
-// WIN32: invoke x86_thiscallcc void @"\01??1A@@QAE@XZ"(%struct.A* %[[arg1]])
+// WIN32: invoke x86_thiscallcc void @"\01??1A@@QAE@XZ"
// WIN32: }
namespace crash_on_partial_destroy {
diff --git a/test/CodeGenCXX/microsoft-abi-member-pointers.cpp b/test/CodeGenCXX/microsoft-abi-member-pointers.cpp
index c0dcd3cf8316..18e8c827eebe 100755
--- a/test/CodeGenCXX/microsoft-abi-member-pointers.cpp
+++ b/test/CodeGenCXX/microsoft-abi-member-pointers.cpp
@@ -1,7 +1,11 @@
-// RUN: %clang_cc1 -fno-rtti -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-pc-win32 | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -fno-rtti -emit-llvm %s -o - -triple=i386-pc-win32 -fms-extensions | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -fno-rtti -emit-llvm %s -o - -triple=x86_64-pc-win32 -fms-extensions | FileCheck %s -check-prefix=X64
+// RUN: %clang_cc1 -std=c++11 -fno-rtti -emit-llvm %s -o - -triple=i386-pc-win32 -DINCOMPLETE_VIRTUAL -fms-extensions -verify
+// RUN: %clang_cc1 -std=c++11 -fno-rtti -emit-llvm %s -o - -triple=i386-pc-win32 -DINCOMPLETE_VIRTUAL -DMEMFUN -fms-extensions -verify
// FIXME: Test x86_64 member pointers when codegen no longer asserts on records
// with virtual bases.
+#ifndef INCOMPLETE_VIRTUAL
struct B1 {
void foo();
int b;
@@ -56,20 +60,20 @@ int UnspecSingle::*us_d_memptr;
// CHECK: @"\01?p_d_memptr@@3PQPolymorphic@@HQ1@" = global i32 0, align 4
// CHECK: @"\01?m_d_memptr@@3PQMultiple@@HQ1@" = global i32 -1, align 4
// CHECK: @"\01?v_d_memptr@@3PQVirtual@@HQ1@" = global { i32, i32 }
-// CHECK: { i32 0, i32 -1 }, align 4
+// CHECK: { i32 0, i32 -1 }, align 8
// CHECK: @"\01?n_d_memptr@@3PQNonZeroVBPtr@@HQ1@" = global { i32, i32 }
-// CHECK: { i32 0, i32 -1 }, align 4
+// CHECK: { i32 0, i32 -1 }, align 8
// CHECK: @"\01?u_d_memptr@@3PQUnspecified@@HQ1@" = global { i32, i32, i32 }
-// CHECK: { i32 0, i32 0, i32 -1 }, align 4
+// CHECK: { i32 0, i32 0, i32 -1 }, align 8
// CHECK: @"\01?us_d_memptr@@3PQUnspecSingle@@HQ1@" = global { i32, i32, i32 }
-// CHECK: { i32 0, i32 0, i32 -1 }, align 4
+// CHECK: { i32 0, i32 0, i32 -1 }, align 8
void (Single ::*s_f_memptr)();
void (Multiple::*m_f_memptr)();
void (Virtual ::*v_f_memptr)();
// CHECK: @"\01?s_f_memptr@@3P8Single@@AEXXZQ1@" = global i8* null, align 4
-// CHECK: @"\01?m_f_memptr@@3P8Multiple@@AEXXZQ1@" = global { i8*, i32 } zeroinitializer, align 4
-// CHECK: @"\01?v_f_memptr@@3P8Virtual@@AEXXZQ1@" = global { i8*, i32, i32 } zeroinitializer, align 4
+// CHECK: @"\01?m_f_memptr@@3P8Multiple@@AEXXZQ1@" = global { i8*, i32 } zeroinitializer, align 8
+// CHECK: @"\01?v_f_memptr@@3P8Virtual@@AEXXZQ1@" = global { i8*, i32, i32 } zeroinitializer, align 8
// We can define Unspecified after locking in the inheritance model.
struct Unspecified : Multiple, Virtual {
@@ -91,13 +95,13 @@ void (UnspecSingle::*us_f_mp)() = &UnspecSingle::foo;
// CHECK: @"\01?s_f_mp@Const@@3P8Single@@AEXXZQ2@" =
// CHECK: global i8* bitcast ({{.*}} @"\01?foo@Single@@QAEXXZ" to i8*), align 4
// CHECK: @"\01?m_f_mp@Const@@3P8Multiple@@AEXXZQ2@" =
-// CHECK: global { i8*, i32 } { i8* bitcast ({{.*}} @"\01?foo@B2@@QAEXXZ" to i8*), i32 4 }, align 4
+// CHECK: global { i8*, i32 } { i8* bitcast ({{.*}} @"\01?foo@B2@@QAEXXZ" to i8*), i32 4 }, align 8
// CHECK: @"\01?v_f_mp@Const@@3P8Virtual@@AEXXZQ2@" =
-// CHECK: global { i8*, i32, i32 } { i8* bitcast ({{.*}} @"\01?foo@Virtual@@QAEXXZ" to i8*), i32 0, i32 0 }, align 4
+// CHECK: global { i8*, i32, i32 } { i8* bitcast ({{.*}} @"\01?foo@Virtual@@QAEXXZ" to i8*), i32 0, i32 0 }, align 8
// CHECK: @"\01?u_f_mp@Const@@3P8Unspecified@@AEXXZQ2@" =
-// CHECK: global { i8*, i32, i32, i32 } { i8* bitcast ({{.*}} @"\01?foo@Unspecified@@QAEXXZ" to i8*), i32 0, i32 12, i32 0 }, align 4
+// CHECK: global { i8*, i32, i32, i32 } { i8* bitcast ({{.*}} @"\01?foo@Unspecified@@QAEXXZ" to i8*), i32 0, i32 12, i32 0 }, align 8
// CHECK: @"\01?us_f_mp@Const@@3P8UnspecSingle@@AEXXZQ2@" =
-// CHECK: global { i8*, i32, i32, i32 } { i8* bitcast ({{.*}} @"\01?foo@UnspecSingle@@QAEXXZ" to i8*), i32 0, i32 0, i32 0 }, align 4
+// CHECK: global { i8*, i32, i32, i32 } { i8* bitcast ({{.*}} @"\01?foo@UnspecSingle@@QAEXXZ" to i8*), i32 0, i32 0, i32 0 }, align 8
}
namespace CastParam {
@@ -119,11 +123,11 @@ void (A::*ptr1)(void *) = (void (A::*)(void *)) &A::foo;
// Try a reinterpret_cast followed by a memptr conversion.
void (C::*ptr2)(void *) = (void (C::*)(void *)) (void (A::*)(void *)) &A::foo;
// CHECK: @"\01?ptr2@CastParam@@3P8C@1@AEXPAX@ZQ21@" =
-// CHECK: global { i8*, i32 } { i8* bitcast (void ({{.*}})* @"\01?foo@A@CastParam@@QAEXPAU12@@Z" to i8*), i32 4 }, align 4
+// CHECK: global { i8*, i32 } { i8* bitcast (void ({{.*}})* @"\01?foo@A@CastParam@@QAEXPAU12@@Z" to i8*), i32 4 }, align 8
void (C::*ptr3)(void *) = (void (C::*)(void *)) (void (A::*)(void *)) (void (A::*)(A *)) 0;
// CHECK: @"\01?ptr3@CastParam@@3P8C@1@AEXPAX@ZQ21@" =
-// CHECK: global { i8*, i32 } zeroinitializer, align 4
+// CHECK: global { i8*, i32 } zeroinitializer, align 8
struct D : C {
virtual void isPolymorphic();
@@ -156,23 +160,23 @@ void EmitNonVirtualMemberPointers() {
void (UnspecWithVBPtr::*u2_f_memptr)() = &UnspecWithVBPtr::foo;
// CHECK: define void @"\01?EmitNonVirtualMemberPointers@@YAXXZ"() {{.*}} {
// CHECK: alloca i8*, align 4
-// CHECK: alloca { i8*, i32 }, align 4
-// CHECK: alloca { i8*, i32, i32 }, align 4
-// CHECK: alloca { i8*, i32, i32, i32 }, align 4
+// CHECK: alloca { i8*, i32 }, align 8
+// CHECK: alloca { i8*, i32, i32 }, align 8
+// CHECK: alloca { i8*, i32, i32, i32 }, align 8
// CHECK: store i8* bitcast (void (%{{.*}}*)* @"\01?foo@Single@@QAEXXZ" to i8*), i8** %{{.*}}, align 4
// CHECK: store { i8*, i32 }
// CHECK: { i8* bitcast (void (%{{.*}}*)* @"\01?foo@Multiple@@QAEXXZ" to i8*), i32 0 },
-// CHECK: { i8*, i32 }* %{{.*}}, align 4
+// CHECK: { i8*, i32 }* %{{.*}}, align 8
// CHECK: store { i8*, i32, i32 }
// CHECK: { i8* bitcast (void (%{{.*}}*)* @"\01?foo@Virtual@@QAEXXZ" to i8*), i32 0, i32 0 },
-// CHECK: { i8*, i32, i32 }* %{{.*}}, align 4
+// CHECK: { i8*, i32, i32 }* %{{.*}}, align 8
// CHECK: store { i8*, i32, i32, i32 }
// CHECK: { i8* bitcast (void (%{{.*}}*)* @"\01?foo@Unspecified@@QAEXXZ" to i8*), i32 0, i32 12, i32 0 },
-// CHECK: { i8*, i32, i32, i32 }* %{{.*}}, align 4
+// CHECK: { i8*, i32, i32, i32 }* %{{.*}}, align 8
// CHECK: store { i8*, i32, i32, i32 }
// CHECK: { i8* bitcast (void (%{{.*}}*)* @"\01?foo@UnspecWithVBPtr@@QAEXXZ" to i8*),
// CHECK: i32 0, i32 4, i32 0 },
-// CHECK: { i8*, i32, i32, i32 }* %{{.*}}, align 4
+// CHECK: { i8*, i32, i32, i32 }* %{{.*}}, align 8
// CHECK: ret void
// CHECK: }
}
@@ -219,27 +223,31 @@ void polymorphicMemPtrs() {
bool nullTestDataUnspecified(int Unspecified::*mp) {
return mp;
// CHECK: define zeroext i1 @"\01?nullTestDataUnspecified@@YA_NPQUnspecified@@H@Z"{{.*}} {
-// CHECK: %{{.*}} = load { i32, i32, i32 }* %{{.*}}, align 4
-// CHECK: store { i32, i32, i32 } {{.*}} align 4
-// CHECK: %[[mp:.*]] = load { i32, i32, i32 }* %{{.*}}, align 4
+// CHECK: %{{.*}} = load { i32, i32, i32 }* %{{.*}}, align 8
+// CHECK: store { i32, i32, i32 } {{.*}} align 8
+// CHECK: %[[mp:.*]] = load { i32, i32, i32 }* %{{.*}}, align 8
// CHECK: %[[mp0:.*]] = extractvalue { i32, i32, i32 } %[[mp]], 0
// CHECK: %[[cmp0:.*]] = icmp ne i32 %[[mp0]], 0
// CHECK: %[[mp1:.*]] = extractvalue { i32, i32, i32 } %[[mp]], 1
// CHECK: %[[cmp1:.*]] = icmp ne i32 %[[mp1]], 0
-// CHECK: %[[and0:.*]] = and i1 %[[cmp0]], %[[cmp1]]
+// CHECK: %[[and0:.*]] = or i1 %[[cmp0]], %[[cmp1]]
// CHECK: %[[mp2:.*]] = extractvalue { i32, i32, i32 } %[[mp]], 2
// CHECK: %[[cmp2:.*]] = icmp ne i32 %[[mp2]], -1
-// CHECK: %[[and1:.*]] = and i1 %[[and0]], %[[cmp2]]
+// CHECK: %[[and1:.*]] = or i1 %[[and0]], %[[cmp2]]
// CHECK: ret i1 %[[and1]]
// CHECK: }
+
+// Pass this large type indirectly.
+// X64-LABEL: define zeroext i1 @"\01?nullTestDataUnspecified@@
+// X64: ({ i32, i32, i32 }*)
}
bool nullTestFunctionUnspecified(void (Unspecified::*mp)()) {
return mp;
// CHECK: define zeroext i1 @"\01?nullTestFunctionUnspecified@@YA_NP8Unspecified@@AEXXZ@Z"{{.*}} {
-// CHECK: %{{.*}} = load { i8*, i32, i32, i32 }* %{{.*}}, align 4
-// CHECK: store { i8*, i32, i32, i32 } {{.*}} align 4
-// CHECK: %[[mp:.*]] = load { i8*, i32, i32, i32 }* %{{.*}}, align 4
+// CHECK: %{{.*}} = load { i8*, i32, i32, i32 }* %{{.*}}, align 8
+// CHECK: store { i8*, i32, i32, i32 } {{.*}} align 8
+// CHECK: %[[mp:.*]] = load { i8*, i32, i32, i32 }* %{{.*}}, align 8
// CHECK: %[[mp0:.*]] = extractvalue { i8*, i32, i32, i32 } %[[mp]], 0
// CHECK: %[[cmp0:.*]] = icmp ne i8* %[[mp0]], null
// CHECK: ret i1 %[[cmp0]]
@@ -252,7 +260,7 @@ int loadDataMemberPointerVirtual(Virtual *o, int Virtual::*memptr) {
// data pointer.
// CHECK: define i32 @"\01?loadDataMemberPointerVirtual@@YAHPAUVirtual@@PQ1@H@Z"{{.*}} {
// CHECK: %[[o:.*]] = load %{{.*}}** %{{.*}}, align 4
-// CHECK: %[[memptr:.*]] = load { i32, i32 }* %{{.*}}, align 4
+// CHECK: %[[memptr:.*]] = load { i32, i32 }* %{{.*}}, align 8
// CHECK: %[[memptr0:.*]] = extractvalue { i32, i32 } %[[memptr:.*]], 0
// CHECK: %[[memptr1:.*]] = extractvalue { i32, i32 } %[[memptr:.*]], 1
// CHECK: %[[v6:.*]] = bitcast %{{.*}}* %[[o]] to i8*
@@ -268,6 +276,11 @@ int loadDataMemberPointerVirtual(Virtual *o, int Virtual::*memptr) {
// CHECK: %[[v12:.*]] = load i32* %[[v11]]
// CHECK: ret i32 %[[v12]]
// CHECK: }
+
+// A two-field data memptr on x64 gets coerced to i64 and is passed in a
+// register or memory.
+// X64-LABEL: define i32 @"\01?loadDataMemberPointerVirtual@@YAHPEAUVirtual@@PEQ1@H@Z"
+// X64: (%struct.Virtual* %o, i64 %memptr.coerce)
}
int loadDataMemberPointerUnspecified(Unspecified *o, int Unspecified::*memptr) {
@@ -276,7 +289,7 @@ int loadDataMemberPointerUnspecified(Unspecified *o, int Unspecified::*memptr) {
// data pointer.
// CHECK: define i32 @"\01?loadDataMemberPointerUnspecified@@YAHPAUUnspecified@@PQ1@H@Z"{{.*}} {
// CHECK: %[[o:.*]] = load %{{.*}}** %{{.*}}, align 4
-// CHECK: %[[memptr:.*]] = load { i32, i32, i32 }* %{{.*}}, align 4
+// CHECK: %[[memptr:.*]] = load { i32, i32, i32 }* %{{.*}}, align 8
// CHECK: %[[memptr0:.*]] = extractvalue { i32, i32, i32 } %[[memptr:.*]], 0
// CHECK: %[[memptr1:.*]] = extractvalue { i32, i32, i32 } %[[memptr:.*]], 1
// CHECK: %[[memptr2:.*]] = extractvalue { i32, i32, i32 } %[[memptr:.*]], 2
@@ -309,6 +322,11 @@ void callMemberPointerSingle(Single *o, void (Single::*memptr)()) {
// CHECK: call x86_thiscallcc void %{{.*}}(%{{.*}} %{{.*}})
// CHECK: ret void
// CHECK: }
+
+// X64-LABEL: define void @"\01?callMemberPointerSingle@@
+// X64: (%struct.Single* %o, i8* %memptr)
+// X64: bitcast i8* %{{[^ ]*}} to void (%struct.Single*)*
+// X64: ret void
}
void callMemberPointerMultiple(Multiple *o, void (Multiple::*memptr)()) {
@@ -355,6 +373,9 @@ bool compareSingleFunctionMemptr(void (Single::*l)(), void (Single::*r)()) {
// CHECK-NOT: icmp
// CHECK: ret i1 %[[r]]
// CHECK: }
+
+// X64-LABEL: define zeroext i1 @"\01?compareSingleFunctionMemptr@@
+// X64: (i8* %{{[^,]*}}, i8* %{{[^)]*}})
}
bool compareNeqSingleFunctionMemptr(void (Single::*l)(), void (Single::*r)()) {
@@ -390,6 +411,9 @@ bool unspecFuncMemptrEq(void (Unspecified::*l)(), void (Unspecified::*r)()) {
// CHECK: %{{.*}} = and i1 %[[bits_or_null]], %[[cmp0]]
// CHECK: ret i1 %{{.*}}
// CHECK: }
+
+// X64-LABEL: define zeroext i1 @"\01?unspecFuncMemptrEq@@
+// X64: ({ i8*, i32, i32, i32 }*, { i8*, i32, i32, i32 }*)
}
bool unspecFuncMemptrNeq(void (Unspecified::*l)(), void (Unspecified::*r)()) {
@@ -432,6 +456,9 @@ bool unspecDataMemptrEq(int Unspecified::*l, int Unspecified::*r) {
// CHECK: and i1
// CHECK: ret i1
// CHECK: }
+
+// X64-LABEL: define zeroext i1 @"\01?unspecDataMemptrEq@@
+// X64: ({ i32, i32, i32 }*, { i32, i32, i32 }*)
}
void (Multiple::*convertB2FuncToMultiple(void (B2::*mp)()))() {
@@ -462,7 +489,7 @@ void (B2::*convertMultipleFuncToB2(void (Multiple::*mp)()))() {
//
// CHECK: define i32 @"\01?convertMultipleFuncToB2@@YAP8B2@@AEXXZP8Multiple@@AEXXZ@Z"{{.*}} {
// CHECK: store
-// CHECK: %[[src:.*]] = load { i8*, i32 }* %{{.*}}, align 4
+// CHECK: %[[src:.*]] = load { i8*, i32 }* %{{.*}}, align 8
// CHECK: extractvalue { i8*, i32 } %[[src]], 0
// CHECK: icmp ne i8* %{{.*}}, null
// CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}
@@ -487,7 +514,7 @@ void (D::*convertCToD(void (C::*mp)()))() {
return mp;
// CHECK: define void @"\01?convertCToD@Test1@@YAP8D@1@AEXXZP8C@1@AEXXZ@Z"{{.*}} {
// CHECK: store
-// CHECK: load { i8*, i32, i32 }* %{{.*}}, align 4
+// CHECK: load { i8*, i32, i32 }* %{{.*}}, align 8
// CHECK: extractvalue { i8*, i32, i32 } %{{.*}}, 0
// CHECK: icmp ne i8* %{{.*}}, null
// CHECK: br i1 %{{.*}}, label %{{.*}}, label %{{.*}}
@@ -537,3 +564,92 @@ int A::*reinterpret(int C::*mp) {
}
}
+
+namespace Test3 {
+// Make sure we cast 'this' to i8* before using GEP.
+
+struct A {
+ int a;
+ int b;
+};
+
+int *load_data(A *a, int A::*mp) {
+ return &(a->*mp);
+// CHECK-LABEL: define i32* @"\01?load_data@Test3@@YAPAHPAUA@1@PQ21@H@Z"{{.*}} {
+// CHECK: %[[a:.*]] = load %"struct.Test3::A"** %{{.*}}, align 4
+// CHECK: %[[mp:.*]] = load i32* %{{.*}}, align 4
+// CHECK: %[[a_i8:.*]] = bitcast %"struct.Test3::A"* %[[a]] to i8*
+// CHECK: getelementptr inbounds i8* %[[a_i8]], i32 %[[mp]]
+// CHECK: }
+}
+
+}
+
+namespace Test4 {
+
+struct A { virtual void f(); };
+struct B { virtual void g(); };
+struct C : A, B { virtual void g(); };
+
+void (C::*getmp())() {
+ return &C::g;
+}
+// CHECK-LABEL: define i64 @"\01?getmp@Test4@@YAP8C@1@AEXXZXZ"()
+// CHECK: store { i8*, i32 } { i8* bitcast (void (i8*)* @"\01??_9C@Test4@@$BA@AE" to i8*), i32 4 }, { i8*, i32 }* %{{.*}}
+//
+
+// CHECK-LABEL: define linkonce_odr x86_thiscallcc void @"\01??_9C@Test4@@$BA@AE"(i8*)
+// CHECK-NOT: getelementptr
+// CHECK: load void (i8*)*** %{{.*}}
+// CHECK: getelementptr inbounds void (i8*)** %{{.*}}, i64 0
+// CHECK-NOT: getelementptr
+// CHECK: call x86_thiscallcc void %
+
+}
+
+namespace pr20007 {
+struct A {
+ void f();
+ void f(int);
+};
+struct B : public A {};
+void test() { void (B::*a)() = &B::f; }
+// CHECK-LABEL: define void @"\01?test@pr20007@@YAXXZ"
+// CHECK: store i8* bitcast (void (%"struct.pr20007::A"*)* @"\01?f@A@pr20007@@QAEXXZ" to i8*)
+}
+
+namespace pr20007_kw {
+struct A {
+ void f();
+ void f(int);
+};
+struct __single_inheritance B;
+struct B : public A {};
+void test() { void (B::*a)() = &B::f; }
+// CHECK-LABEL: define void @"\01?test@pr20007_kw@@YAXXZ"
+// CHECK: store i8* bitcast (void (%"struct.pr20007_kw::A"*)* @"\01?f@A@pr20007_kw@@QAEXXZ" to i8*)
+}
+
+namespace pr19987 {
+template <typename T>
+struct S {
+ int T::*x;
+};
+
+struct U : S<U> {};
+
+static_assert(sizeof(S<U>::x) == 12, "");
+}
+
+#else
+struct __virtual_inheritance A;
+#ifdef MEMFUN
+int foo(A *a, int (A::*mp)()) {
+ return (a->*mp)(); // expected-error{{requires a complete class type}}
+}
+#else
+int foo(A *a, int A::*mp) {
+ return a->*mp; // expected-error{{requires a complete class type}}
+}
+#endif
+#endif
diff --git a/test/CodeGenCXX/microsoft-abi-methods.cpp b/test/CodeGenCXX/microsoft-abi-methods.cpp
index c996ba5b8473..579e549ab46c 100644
--- a/test/CodeGenCXX/microsoft-abi-methods.cpp
+++ b/test/CodeGenCXX/microsoft-abi-methods.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-pc-win32 | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
class C {
public:
diff --git a/test/CodeGenCXX/microsoft-abi-multiple-nonvirtual-inheritance.cpp b/test/CodeGenCXX/microsoft-abi-multiple-nonvirtual-inheritance.cpp
index 802f0ca24175..b1c1482eff6f 100644
--- a/test/CodeGenCXX/microsoft-abi-multiple-nonvirtual-inheritance.cpp
+++ b/test/CodeGenCXX/microsoft-abi-multiple-nonvirtual-inheritance.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fno-rtti -emit-llvm %s -o - -mconstructor-aliases -cxx-abi microsoft -triple=i386-pc-win32 | FileCheck %s
+// RUN: %clang_cc1 -fno-rtti -emit-llvm %s -o - -mconstructor-aliases -triple=i386-pc-win32 | FileCheck %s
struct Left {
virtual void left();
diff --git a/test/CodeGenCXX/microsoft-abi-non-virtual-base-ordering.cpp b/test/CodeGenCXX/microsoft-abi-non-virtual-base-ordering.cpp
new file mode 100755
index 000000000000..0c82ac328649
--- /dev/null
+++ b/test/CodeGenCXX/microsoft-abi-non-virtual-base-ordering.cpp
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -fno-rtti -emit-llvm -triple=i686-pc-win32 -o - %s 2>/dev/null | FileCheck %s
+// RUN: %clang_cc1 -fno-rtti -emit-llvm -triple=x86_64-pc-win32 -o - %s 2>/dev/null | FileCheck %s
+
+struct C0 { int a; };
+struct C1 { int a; virtual void C1M() {} };
+struct C2 { int a; virtual void C2M() {} };
+struct C3 : C0, C1, C2 {} a;
+
+// Check to see that both C1 and C2 get laid out before C0 does.
+// CHECK: %struct.C3 = type { %struct.C1, %struct.C2, %struct.C0 }
diff --git a/test/CodeGenCXX/microsoft-abi-nontrivial-covariant-thunk.cpp b/test/CodeGenCXX/microsoft-abi-nontrivial-covariant-thunk.cpp
new file mode 100644
index 000000000000..d305dd83271f
--- /dev/null
+++ b/test/CodeGenCXX/microsoft-abi-nontrivial-covariant-thunk.cpp
@@ -0,0 +1,24 @@
+// RUN: %clang_cc1 %s -fno-rtti -emit-llvm-only -o - -triple=i386-pc-win32 -verify
+
+// A is not trivially copyable and must be passed indirectly or with inalloca.
+struct A {
+ A();
+ A(const A &o);
+ virtual ~A();
+ int a;
+};
+
+struct B {
+ B();
+ int b;
+ virtual B *clone(A);
+};
+
+// Converting from C* to B* requires a this adjustment.
+struct C : A, B {
+ C();
+ int c;
+ virtual C *clone(A); // expected-error {{cannot compile this non-trivial argument copy for thunk yet}}
+};
+B::B() {} // force emission
+C::C() {} // force emission
diff --git a/test/CodeGenCXX/microsoft-abi-rtti.cpp b/test/CodeGenCXX/microsoft-abi-rtti.cpp
new file mode 100644
index 000000000000..062f597b3783
--- /dev/null
+++ b/test/CodeGenCXX/microsoft-abi-rtti.cpp
@@ -0,0 +1,267 @@
+// RUN: %clang_cc1 -emit-llvm -o - -triple=i386-pc-win32 2>/dev/null %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -o - -triple=x86_64-pc-win32 2>/dev/null %s | FileCheck --check-prefix=X64 %s
+
+struct N {};
+struct M : private N {};
+struct X { virtual void f() {} };
+class Z { virtual void f() {} };
+class V : public X { virtual void f() {} };
+class W : M, virtual V { public: virtual void f() {} };
+class Y : Z, W, virtual V { public: virtual void g() {} } y;
+
+struct A {};
+struct B : A {};
+struct C : B { virtual void f() {} } c;
+
+struct X1 { virtual void f() {} };
+struct V1 : X1 {};
+struct W1 : virtual V1 {};
+struct Y1 : W1, virtual V1 {} y1;
+
+struct A1 { virtual void f() {} };
+struct B1 : virtual A1 { virtual void f() {} B1() {} } b1;
+
+struct Z2 { virtual void f() {} };
+struct Y2 { virtual void f() {} };
+struct A2 : Z2, Y2 {};
+struct B2 : virtual A2 { B2() {} virtual void f() {} } b2;
+
+// CHECK: @"\01??_R4B2@@6BZ2@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 8, i32 4, i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUB2@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"\01??_R3B2@@8" }
+// CHECK: @"\01??_R0?AUB2@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"\01??_7type_info@@6B@", i8* null, [9 x i8] c".?AUB2@@\00" }
+// CHECK: @"\01??_R3B2@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 3, i32 4, %rtti.BaseClassDescriptor** getelementptr inbounds ([5 x %rtti.BaseClassDescriptor*]* @"\01??_R2B2@@8", i32 0, i32 0) }
+// CHECK: @"\01??_R2B2@@8" = linkonce_odr constant [5 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@B2@@8", %rtti.BaseClassDescriptor* @"\01??_R1A@A@3FA@A2@@8", %rtti.BaseClassDescriptor* @"\01??_R1A@A@3EA@Z2@@8", %rtti.BaseClassDescriptor* @"\01??_R13A@3EA@Y2@@8", %rtti.BaseClassDescriptor* null]
+// CHECK: @"\01??_R1A@?0A@EA@B2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUB2@@@8" to i8*), i32 3, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3B2@@8" }
+// CHECK: @"\01??_R1A@A@3FA@A2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUA2@@@8" to i8*), i32 2, i32 0, i32 0, i32 4, i32 80, %rtti.ClassHierarchyDescriptor* @"\01??_R3A2@@8" }
+// CHECK: @"\01??_R0?AUA2@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"\01??_7type_info@@6B@", i8* null, [9 x i8] c".?AUA2@@\00" }
+// CHECK: @"\01??_R3A2@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 1, i32 3, %rtti.BaseClassDescriptor** getelementptr inbounds ([4 x %rtti.BaseClassDescriptor*]* @"\01??_R2A2@@8", i32 0, i32 0) }
+// CHECK: @"\01??_R2A2@@8" = linkonce_odr constant [4 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@A2@@8", %rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@Z2@@8", %rtti.BaseClassDescriptor* @"\01??_R13?0A@EA@Y2@@8", %rtti.BaseClassDescriptor* null]
+// CHECK: @"\01??_R1A@?0A@EA@A2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUA2@@@8" to i8*), i32 2, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3A2@@8" }
+// CHECK: @"\01??_R1A@?0A@EA@Z2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUZ2@@@8" to i8*), i32 0, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3Z2@@8" }
+// CHECK: @"\01??_R0?AUZ2@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"\01??_7type_info@@6B@", i8* null, [9 x i8] c".?AUZ2@@\00" }
+// CHECK: @"\01??_R3Z2@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, %rtti.BaseClassDescriptor** getelementptr inbounds ([2 x %rtti.BaseClassDescriptor*]* @"\01??_R2Z2@@8", i32 0, i32 0) }
+// CHECK: @"\01??_R2Z2@@8" = linkonce_odr constant [2 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@Z2@@8", %rtti.BaseClassDescriptor* null]
+// CHECK: @"\01??_R13?0A@EA@Y2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUY2@@@8" to i8*), i32 0, i32 4, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3Y2@@8" }
+// CHECK: @"\01??_R0?AUY2@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"\01??_7type_info@@6B@", i8* null, [9 x i8] c".?AUY2@@\00" }
+// CHECK: @"\01??_R3Y2@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, %rtti.BaseClassDescriptor** getelementptr inbounds ([2 x %rtti.BaseClassDescriptor*]* @"\01??_R2Y2@@8", i32 0, i32 0) }
+// CHECK: @"\01??_R2Y2@@8" = linkonce_odr constant [2 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@Y2@@8", %rtti.BaseClassDescriptor* null]
+// CHECK: @"\01??_R1A@?0A@EA@Y2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUY2@@@8" to i8*), i32 0, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3Y2@@8" }
+// CHECK: @"\01??_R1A@A@3EA@Z2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUZ2@@@8" to i8*), i32 0, i32 0, i32 0, i32 4, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3Z2@@8" }
+// CHECK: @"\01??_R13A@3EA@Y2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUY2@@@8" to i8*), i32 0, i32 4, i32 0, i32 4, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3Y2@@8" }
+// CHECK: @"\01??_R4B2@@6BY2@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 12, i32 8, i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUB2@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"\01??_R3B2@@8" }
+// CHECK: @"\01??_R4A2@@6BZ2@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUA2@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"\01??_R3A2@@8" }
+// CHECK: @"\01??_R4A2@@6BY2@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 4, i32 0, i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUA2@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"\01??_R3A2@@8" }
+// CHECK: @"\01??_R4Y2@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUY2@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"\01??_R3Y2@@8" }
+// CHECK: @"\01??_R4Z2@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUZ2@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"\01??_R3Z2@@8" }
+// CHECK: @"\01??_R4B1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 8, i32 4, i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUB1@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"\01??_R3B1@@8" }
+// CHECK: @"\01??_R0?AUB1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"\01??_7type_info@@6B@", i8* null, [9 x i8] c".?AUB1@@\00" }
+// CHECK: @"\01??_R3B1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, %rtti.BaseClassDescriptor** getelementptr inbounds ([3 x %rtti.BaseClassDescriptor*]* @"\01??_R2B1@@8", i32 0, i32 0) }
+// CHECK: @"\01??_R2B1@@8" = linkonce_odr constant [3 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@B1@@8", %rtti.BaseClassDescriptor* @"\01??_R1A@A@3FA@A1@@8", %rtti.BaseClassDescriptor* null]
+// CHECK: @"\01??_R1A@?0A@EA@B1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUB1@@@8" to i8*), i32 1, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3B1@@8" }
+// CHECK: @"\01??_R1A@A@3FA@A1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUA1@@@8" to i8*), i32 0, i32 0, i32 0, i32 4, i32 80, %rtti.ClassHierarchyDescriptor* @"\01??_R3A1@@8" }
+// CHECK: @"\01??_R0?AUA1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"\01??_7type_info@@6B@", i8* null, [9 x i8] c".?AUA1@@\00" }
+// CHECK: @"\01??_R3A1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, %rtti.BaseClassDescriptor** getelementptr inbounds ([2 x %rtti.BaseClassDescriptor*]* @"\01??_R2A1@@8", i32 0, i32 0) }
+// CHECK: @"\01??_R2A1@@8" = linkonce_odr constant [2 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@A1@@8", %rtti.BaseClassDescriptor* null]
+// CHECK: @"\01??_R1A@?0A@EA@A1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUA1@@@8" to i8*), i32 0, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3A1@@8" }
+// CHECK: @"\01??_R4A1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUA1@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"\01??_R3A1@@8" }
+// CHECK: @"\01??_R4Y1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 4, i32 0, i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUY1@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"\01??_R3Y1@@8" }
+// CHECK: @"\01??_R0?AUY1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"\01??_7type_info@@6B@", i8* null, [9 x i8] c".?AUY1@@\00" }
+// CHECK: @"\01??_R3Y1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 3, i32 6, %rtti.BaseClassDescriptor** getelementptr inbounds ([7 x %rtti.BaseClassDescriptor*]* @"\01??_R2Y1@@8", i32 0, i32 0) }
+// CHECK: @"\01??_R2Y1@@8" = linkonce_odr constant [7 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@Y1@@8", %rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@W1@@8", %rtti.BaseClassDescriptor* @"\01??_R1A@A@3FA@V1@@8", %rtti.BaseClassDescriptor* @"\01??_R1A@A@3EA@X1@@8", %rtti.BaseClassDescriptor* @"\01??_R1A@A@3FA@V1@@8", %rtti.BaseClassDescriptor* @"\01??_R1A@A@3EA@X1@@8", %rtti.BaseClassDescriptor* null]
+// CHECK: @"\01??_R1A@?0A@EA@Y1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUY1@@@8" to i8*), i32 5, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3Y1@@8" }
+// CHECK: @"\01??_R1A@?0A@EA@W1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUW1@@@8" to i8*), i32 2, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3W1@@8" }
+// CHECK: @"\01??_R0?AUW1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"\01??_7type_info@@6B@", i8* null, [9 x i8] c".?AUW1@@\00" }
+// CHECK: @"\01??_R3W1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 3, %rtti.BaseClassDescriptor** getelementptr inbounds ([4 x %rtti.BaseClassDescriptor*]* @"\01??_R2W1@@8", i32 0, i32 0) }
+// CHECK: @"\01??_R2W1@@8" = linkonce_odr constant [4 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@W1@@8", %rtti.BaseClassDescriptor* @"\01??_R1A@A@3FA@V1@@8", %rtti.BaseClassDescriptor* @"\01??_R1A@A@3EA@X1@@8", %rtti.BaseClassDescriptor* null]
+// CHECK: @"\01??_R1A@A@3FA@V1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUV1@@@8" to i8*), i32 1, i32 0, i32 0, i32 4, i32 80, %rtti.ClassHierarchyDescriptor* @"\01??_R3V1@@8" }
+// CHECK: @"\01??_R0?AUV1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"\01??_7type_info@@6B@", i8* null, [9 x i8] c".?AUV1@@\00" }
+// CHECK: @"\01??_R3V1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, %rtti.BaseClassDescriptor** getelementptr inbounds ([3 x %rtti.BaseClassDescriptor*]* @"\01??_R2V1@@8", i32 0, i32 0) }
+// CHECK: @"\01??_R2V1@@8" = linkonce_odr constant [3 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@V1@@8", %rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@X1@@8", %rtti.BaseClassDescriptor* null]
+// CHECK: @"\01??_R1A@?0A@EA@V1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUV1@@@8" to i8*), i32 1, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3V1@@8" }
+// CHECK: @"\01??_R1A@?0A@EA@X1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUX1@@@8" to i8*), i32 0, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3X1@@8" }
+// CHECK: @"\01??_R0?AUX1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"\01??_7type_info@@6B@", i8* null, [9 x i8] c".?AUX1@@\00" }
+// CHECK: @"\01??_R3X1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, %rtti.BaseClassDescriptor** getelementptr inbounds ([2 x %rtti.BaseClassDescriptor*]* @"\01??_R2X1@@8", i32 0, i32 0) }
+// CHECK: @"\01??_R2X1@@8" = linkonce_odr constant [2 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@X1@@8", %rtti.BaseClassDescriptor* null]
+// CHECK: @"\01??_R1A@A@3EA@X1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUX1@@@8" to i8*), i32 0, i32 0, i32 0, i32 4, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3X1@@8" }
+// CHECK: @"\01??_R4W1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 4, i32 0, i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUW1@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"\01??_R3W1@@8" }
+// CHECK: @"\01??_R4V1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUV1@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"\01??_R3V1@@8" }
+// CHECK: @"\01??_R4X1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, i8* bitcast (%rtti.TypeDescriptor8* @"\01??_R0?AUX1@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"\01??_R3X1@@8" }
+// CHECK: @"\01??_R4C@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUC@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"\01??_R3C@@8" }
+// CHECK: @"\01??_R0?AUC@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"\01??_7type_info@@6B@", i8* null, [8 x i8] c".?AUC@@\00" }
+// CHECK: @"\01??_R3C@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 3, %rtti.BaseClassDescriptor** getelementptr inbounds ([4 x %rtti.BaseClassDescriptor*]* @"\01??_R2C@@8", i32 0, i32 0) }
+// CHECK: @"\01??_R2C@@8" = linkonce_odr constant [4 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@C@@8", %rtti.BaseClassDescriptor* @"\01??_R13?0A@EA@B@@8", %rtti.BaseClassDescriptor* @"\01??_R13?0A@EA@A@@8", %rtti.BaseClassDescriptor* null]
+// CHECK: @"\01??_R1A@?0A@EA@C@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUC@@@8" to i8*), i32 2, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3C@@8" }
+// CHECK: @"\01??_R13?0A@EA@B@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUB@@@8" to i8*), i32 1, i32 4, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3B@@8" }
+// CHECK: @"\01??_R0?AUB@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"\01??_7type_info@@6B@", i8* null, [8 x i8] c".?AUB@@\00" }
+// CHECK: @"\01??_R3B@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, %rtti.BaseClassDescriptor** getelementptr inbounds ([3 x %rtti.BaseClassDescriptor*]* @"\01??_R2B@@8", i32 0, i32 0) }
+// CHECK: @"\01??_R2B@@8" = linkonce_odr constant [3 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@B@@8", %rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@A@@8", %rtti.BaseClassDescriptor* null]
+// CHECK: @"\01??_R1A@?0A@EA@B@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUB@@@8" to i8*), i32 1, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3B@@8" }
+// CHECK: @"\01??_R1A@?0A@EA@A@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUA@@@8" to i8*), i32 0, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3A@@8" }
+// CHECK: @"\01??_R0?AUA@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"\01??_7type_info@@6B@", i8* null, [8 x i8] c".?AUA@@\00" }
+// CHECK: @"\01??_R3A@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, %rtti.BaseClassDescriptor** getelementptr inbounds ([2 x %rtti.BaseClassDescriptor*]* @"\01??_R2A@@8", i32 0, i32 0) }
+// CHECK: @"\01??_R2A@@8" = linkonce_odr constant [2 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@A@@8", %rtti.BaseClassDescriptor* null]
+// CHECK: @"\01??_R13?0A@EA@A@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUA@@@8" to i8*), i32 0, i32 4, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3A@@8" }
+// CHECK: @"\01??_R4Y@@6BZ@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AVY@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"\01??_R3Y@@8" }
+// CHECK: @"\01??_R0?AVY@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"\01??_7type_info@@6B@", i8* null, [8 x i8] c".?AVY@@\00" }
+// CHECK: @"\01??_R3Y@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 3, i32 9, %rtti.BaseClassDescriptor** getelementptr inbounds ([10 x %rtti.BaseClassDescriptor*]* @"\01??_R2Y@@8", i32 0, i32 0) }
+// CHECK: @"\01??_R2Y@@8" = linkonce_odr constant [10 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@Y@@8", %rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EN@Z@@8", %rtti.BaseClassDescriptor* @"\01??_R13?0A@EN@W@@8", %rtti.BaseClassDescriptor* @"\01??_R17?0A@EN@M@@8", %rtti.BaseClassDescriptor* @"\01??_R17?0A@EN@N@@8", %rtti.BaseClassDescriptor* @"\01??_R1A@33FN@V@@8", %rtti.BaseClassDescriptor* @"\01??_R1A@33EJ@X@@8", %rtti.BaseClassDescriptor* @"\01??_R1A@33FN@V@@8", %rtti.BaseClassDescriptor* @"\01??_R1A@33EJ@X@@8", %rtti.BaseClassDescriptor* null]
+// CHECK: @"\01??_R1A@?0A@EA@Y@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AVY@@@8" to i8*), i32 8, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3Y@@8" }
+// CHECK: @"\01??_R1A@?0A@EN@Z@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AVZ@@@8" to i8*), i32 0, i32 0, i32 -1, i32 0, i32 77, %rtti.ClassHierarchyDescriptor* @"\01??_R3Z@@8" }
+// CHECK: @"\01??_R0?AVZ@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"\01??_7type_info@@6B@", i8* null, [8 x i8] c".?AVZ@@\00" }
+// CHECK: @"\01??_R3Z@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, %rtti.BaseClassDescriptor** getelementptr inbounds ([2 x %rtti.BaseClassDescriptor*]* @"\01??_R2Z@@8", i32 0, i32 0) }
+// CHECK: @"\01??_R2Z@@8" = linkonce_odr constant [2 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@Z@@8", %rtti.BaseClassDescriptor* null]
+// CHECK: @"\01??_R1A@?0A@EA@Z@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AVZ@@@8" to i8*), i32 0, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3Z@@8" }
+// CHECK: @"\01??_R13?0A@EN@W@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AVW@@@8" to i8*), i32 4, i32 4, i32 -1, i32 0, i32 77, %rtti.ClassHierarchyDescriptor* @"\01??_R3W@@8" }
+// CHECK: @"\01??_R0?AVW@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"\01??_7type_info@@6B@", i8* null, [8 x i8] c".?AVW@@\00" }
+// CHECK: @"\01??_R3W@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 3, i32 5, %rtti.BaseClassDescriptor** getelementptr inbounds ([6 x %rtti.BaseClassDescriptor*]* @"\01??_R2W@@8", i32 0, i32 0) }
+// CHECK: @"\01??_R2W@@8" = linkonce_odr constant [6 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@W@@8", %rtti.BaseClassDescriptor* @"\01??_R13?0A@EN@M@@8", %rtti.BaseClassDescriptor* @"\01??_R13?0A@EN@N@@8", %rtti.BaseClassDescriptor* @"\01??_R1A@A@3FN@V@@8", %rtti.BaseClassDescriptor* @"\01??_R1A@A@3EJ@X@@8", %rtti.BaseClassDescriptor* null]
+// CHECK: @"\01??_R1A@?0A@EA@W@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AVW@@@8" to i8*), i32 4, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3W@@8" }
+// CHECK: @"\01??_R13?0A@EN@M@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUM@@@8" to i8*), i32 1, i32 4, i32 -1, i32 0, i32 77, %rtti.ClassHierarchyDescriptor* @"\01??_R3M@@8" }
+// CHECK: @"\01??_R0?AUM@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"\01??_7type_info@@6B@", i8* null, [8 x i8] c".?AUM@@\00" }
+// CHECK: @"\01??_R3M@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, %rtti.BaseClassDescriptor** getelementptr inbounds ([3 x %rtti.BaseClassDescriptor*]* @"\01??_R2M@@8", i32 0, i32 0) }
+// CHECK: @"\01??_R2M@@8" = linkonce_odr constant [3 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@M@@8", %rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EN@N@@8", %rtti.BaseClassDescriptor* null]
+// CHECK: @"\01??_R1A@?0A@EA@M@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUM@@@8" to i8*), i32 1, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3M@@8" }
+// CHECK: @"\01??_R1A@?0A@EN@N@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUN@@@8" to i8*), i32 0, i32 0, i32 -1, i32 0, i32 77, %rtti.ClassHierarchyDescriptor* @"\01??_R3N@@8" }
+// CHECK: @"\01??_R0?AUN@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"\01??_7type_info@@6B@", i8* null, [8 x i8] c".?AUN@@\00" }
+// CHECK: @"\01??_R3N@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, %rtti.BaseClassDescriptor** getelementptr inbounds ([2 x %rtti.BaseClassDescriptor*]* @"\01??_R2N@@8", i32 0, i32 0) }
+// CHECK: @"\01??_R2N@@8" = linkonce_odr constant [2 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@N@@8", %rtti.BaseClassDescriptor* null]
+// CHECK: @"\01??_R1A@?0A@EA@N@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUN@@@8" to i8*), i32 0, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3N@@8" }
+// CHECK: @"\01??_R13?0A@EN@N@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUN@@@8" to i8*), i32 0, i32 4, i32 -1, i32 0, i32 77, %rtti.ClassHierarchyDescriptor* @"\01??_R3N@@8" }
+// CHECK: @"\01??_R1A@A@3FN@V@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AVV@@@8" to i8*), i32 1, i32 0, i32 0, i32 4, i32 93, %rtti.ClassHierarchyDescriptor* @"\01??_R3V@@8" }
+// CHECK: @"\01??_R0?AVV@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"\01??_7type_info@@6B@", i8* null, [8 x i8] c".?AVV@@\00" }
+// CHECK: @"\01??_R3V@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, %rtti.BaseClassDescriptor** getelementptr inbounds ([3 x %rtti.BaseClassDescriptor*]* @"\01??_R2V@@8", i32 0, i32 0) }
+// CHECK: @"\01??_R2V@@8" = linkonce_odr constant [3 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@V@@8", %rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@X@@8", %rtti.BaseClassDescriptor* null]
+// CHECK: @"\01??_R1A@?0A@EA@V@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AVV@@@8" to i8*), i32 1, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3V@@8" }
+// CHECK: @"\01??_R1A@?0A@EA@X@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUX@@@8" to i8*), i32 0, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"\01??_R3X@@8" }
+// CHECK: @"\01??_R0?AUX@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"\01??_7type_info@@6B@", i8* null, [8 x i8] c".?AUX@@\00" }
+// CHECK: @"\01??_R3X@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, %rtti.BaseClassDescriptor** getelementptr inbounds ([2 x %rtti.BaseClassDescriptor*]* @"\01??_R2X@@8", i32 0, i32 0) }
+// CHECK: @"\01??_R2X@@8" = linkonce_odr constant [2 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@X@@8", %rtti.BaseClassDescriptor* null]
+// CHECK: @"\01??_R1A@A@3EJ@X@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUX@@@8" to i8*), i32 0, i32 0, i32 0, i32 4, i32 73, %rtti.ClassHierarchyDescriptor* @"\01??_R3X@@8" }
+// CHECK: @"\01??_R17?0A@EN@M@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUM@@@8" to i8*), i32 1, i32 8, i32 -1, i32 0, i32 77, %rtti.ClassHierarchyDescriptor* @"\01??_R3M@@8" }
+// CHECK: @"\01??_R17?0A@EN@N@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUN@@@8" to i8*), i32 0, i32 8, i32 -1, i32 0, i32 77, %rtti.ClassHierarchyDescriptor* @"\01??_R3N@@8" }
+// CHECK: @"\01??_R1A@33FN@V@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AVV@@@8" to i8*), i32 1, i32 0, i32 4, i32 4, i32 93, %rtti.ClassHierarchyDescriptor* @"\01??_R3V@@8" }
+// CHECK: @"\01??_R1A@33EJ@X@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUX@@@8" to i8*), i32 0, i32 0, i32 4, i32 4, i32 73, %rtti.ClassHierarchyDescriptor* @"\01??_R3X@@8" }
+// CHECK: @"\01??_R4Y@@6BW@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 8, i32 0, i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AVY@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"\01??_R3Y@@8" }
+// CHECK: @"\01??_R4W@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 4, i32 0, i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AVW@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"\01??_R3W@@8" }
+// CHECK: @"\01??_R4Z@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AVZ@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"\01??_R3Z@@8" }
+// CHECK: @"\01??_R4V@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AVV@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"\01??_R3V@@8" }
+// CHECK: @"\01??_R4X@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, i8* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUX@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"\01??_R3X@@8" }
+
+// X64: @"\01??_R4B2@@6BZ2@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 16, i32 4, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUB2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3B2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"\01??_R4B2@@6BZ2@@@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R0?AUB2@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"\01??_7type_info@@6B@", i8* null, [9 x i8] c".?AUB2@@\00" }
+// X64: @"\01??_R3B2@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 3, i32 4, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([5 x i32]* @"\01??_R2B2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R2B2@@8" = linkonce_odr constant [5 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@B2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@A@3FA@A2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@A@3EA@Z2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R17A@3EA@Y2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0]
+// X64: @"\01??_R1A@?0A@EA@B2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUB2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 3, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3B2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R1A@A@3FA@A2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUA2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 2, i32 0, i32 0, i32 4, i32 80, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3A2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R0?AUA2@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"\01??_7type_info@@6B@", i8* null, [9 x i8] c".?AUA2@@\00" }
+// X64: @"\01??_R3A2@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 1, i32 3, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([4 x i32]* @"\01??_R2A2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R2A2@@8" = linkonce_odr constant [4 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@A2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@Z2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R17?0A@EA@Y2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0]
+// X64: @"\01??_R1A@?0A@EA@A2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUA2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 2, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3A2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R1A@?0A@EA@Z2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUZ2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3Z2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R0?AUZ2@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"\01??_7type_info@@6B@", i8* null, [9 x i8] c".?AUZ2@@\00" }
+// X64: @"\01??_R3Z2@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([2 x i32]* @"\01??_R2Z2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R2Z2@@8" = linkonce_odr constant [2 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@Z2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0]
+// X64: @"\01??_R17?0A@EA@Y2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUY2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 8, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3Y2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R0?AUY2@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"\01??_7type_info@@6B@", i8* null, [9 x i8] c".?AUY2@@\00" }
+// X64: @"\01??_R3Y2@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([2 x i32]* @"\01??_R2Y2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R2Y2@@8" = linkonce_odr constant [2 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@Y2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0]
+// X64: @"\01??_R1A@?0A@EA@Y2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUY2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3Y2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R1A@A@3EA@Z2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUZ2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 0, i32 4, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3Z2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R17A@3EA@Y2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUY2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 8, i32 0, i32 4, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3Y2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R4B2@@6BY2@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 24, i32 12, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUB2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3B2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"\01??_R4B2@@6BY2@@@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R4A2@@6BZ2@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUA2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3A2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"\01??_R4A2@@6BZ2@@@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R4A2@@6BY2@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 8, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUA2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3A2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"\01??_R4A2@@6BY2@@@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R4Y2@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUY2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3Y2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"\01??_R4Y2@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R4Z2@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUZ2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3Z2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"\01??_R4Z2@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R4B1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 16, i32 4, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUB1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3B1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"\01??_R4B1@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R0?AUB1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"\01??_7type_info@@6B@", i8* null, [9 x i8] c".?AUB1@@\00" }
+// X64: @"\01??_R3B1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([3 x i32]* @"\01??_R2B1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R2B1@@8" = linkonce_odr constant [3 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@B1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@A@3FA@A1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0]
+// X64: @"\01??_R1A@?0A@EA@B1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUB1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 1, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3B1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R1A@A@3FA@A1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUA1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 0, i32 4, i32 80, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3A1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R0?AUA1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"\01??_7type_info@@6B@", i8* null, [9 x i8] c".?AUA1@@\00" }
+// X64: @"\01??_R3A1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([2 x i32]* @"\01??_R2A1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R2A1@@8" = linkonce_odr constant [2 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@A1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0]
+// X64: @"\01??_R1A@?0A@EA@A1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUA1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3A1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R4A1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUA1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3A1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"\01??_R4A1@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R4Y1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 8, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUY1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3Y1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"\01??_R4Y1@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R0?AUY1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"\01??_7type_info@@6B@", i8* null, [9 x i8] c".?AUY1@@\00" }
+// X64: @"\01??_R3Y1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 3, i32 6, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([7 x i32]* @"\01??_R2Y1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R2Y1@@8" = linkonce_odr constant [7 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@Y1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@W1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@A@3FA@V1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@A@3EA@X1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@A@3FA@V1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@A@3EA@X1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0]
+// X64: @"\01??_R1A@?0A@EA@Y1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUY1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 5, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3Y1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R1A@?0A@EA@W1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUW1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 2, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3W1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R0?AUW1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"\01??_7type_info@@6B@", i8* null, [9 x i8] c".?AUW1@@\00" }
+// X64: @"\01??_R3W1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 3, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([4 x i32]* @"\01??_R2W1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R2W1@@8" = linkonce_odr constant [4 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@W1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@A@3FA@V1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@A@3EA@X1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0]
+// X64: @"\01??_R1A@A@3FA@V1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUV1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 1, i32 0, i32 0, i32 4, i32 80, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3V1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R0?AUV1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"\01??_7type_info@@6B@", i8* null, [9 x i8] c".?AUV1@@\00" }
+// X64: @"\01??_R3V1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([3 x i32]* @"\01??_R2V1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R2V1@@8" = linkonce_odr constant [3 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@V1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@X1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0]
+// X64: @"\01??_R1A@?0A@EA@V1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUV1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 1, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3V1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R1A@?0A@EA@X1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUX1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3X1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R0?AUX1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"\01??_7type_info@@6B@", i8* null, [9 x i8] c".?AUX1@@\00" }
+// X64: @"\01??_R3X1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([2 x i32]* @"\01??_R2X1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R2X1@@8" = linkonce_odr constant [2 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@X1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0]
+// X64: @"\01??_R1A@A@3EA@X1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUX1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 0, i32 4, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3X1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R4W1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 8, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUW1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3W1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"\01??_R4W1@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R4V1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUV1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3V1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"\01??_R4V1@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R4X1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"\01??_R0?AUX1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3X1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"\01??_R4X1@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R4C@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AUC@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3C@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"\01??_R4C@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R0?AUC@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"\01??_7type_info@@6B@", i8* null, [8 x i8] c".?AUC@@\00" }
+// X64: @"\01??_R3C@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 3, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([4 x i32]* @"\01??_R2C@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R2C@@8" = linkonce_odr constant [4 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@C@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R17?0A@EA@B@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R17?0A@EA@A@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0]
+// X64: @"\01??_R1A@?0A@EA@C@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AUC@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 2, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3C@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R17?0A@EA@B@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AUB@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 1, i32 8, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3B@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R0?AUB@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"\01??_7type_info@@6B@", i8* null, [8 x i8] c".?AUB@@\00" }
+// X64: @"\01??_R3B@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([3 x i32]* @"\01??_R2B@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R2B@@8" = linkonce_odr constant [3 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@B@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@A@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0]
+// X64: @"\01??_R1A@?0A@EA@B@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AUB@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 1, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3B@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R1A@?0A@EA@A@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AUA@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3A@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R0?AUA@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"\01??_7type_info@@6B@", i8* null, [8 x i8] c".?AUA@@\00" }
+// X64: @"\01??_R3A@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([2 x i32]* @"\01??_R2A@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R2A@@8" = linkonce_odr constant [2 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@A@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0]
+// X64: @"\01??_R17?0A@EA@A@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AUA@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 8, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3A@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R4Y@@6BZ@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AVY@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3Y@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"\01??_R4Y@@6BZ@@@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R0?AVY@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"\01??_7type_info@@6B@", i8* null, [8 x i8] c".?AVY@@\00" }
+// X64: @"\01??_R3Y@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 3, i32 9, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([10 x i32]* @"\01??_R2Y@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R2Y@@8" = linkonce_odr constant [10 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@Y@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EN@Z@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R17?0A@EN@W@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1BA@?0A@EN@M@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1BA@?0A@EN@N@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@73FN@V@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@73EJ@X@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@73FN@V@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@73EJ@X@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0]
+// X64: @"\01??_R1A@?0A@EA@Y@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AVY@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 8, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3Y@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R1A@?0A@EN@Z@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AVZ@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 77, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3Z@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R0?AVZ@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"\01??_7type_info@@6B@", i8* null, [8 x i8] c".?AVZ@@\00" }
+// X64: @"\01??_R3Z@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([2 x i32]* @"\01??_R2Z@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R2Z@@8" = linkonce_odr constant [2 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@Z@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0]
+// X64: @"\01??_R1A@?0A@EA@Z@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AVZ@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3Z@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R17?0A@EN@W@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AVW@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 4, i32 8, i32 -1, i32 0, i32 77, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3W@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R0?AVW@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"\01??_7type_info@@6B@", i8* null, [8 x i8] c".?AVW@@\00" }
+// X64: @"\01??_R3W@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 3, i32 5, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([6 x i32]* @"\01??_R2W@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R2W@@8" = linkonce_odr constant [6 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@W@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R17?0A@EN@M@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R17?0A@EN@N@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@A@3FN@V@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@A@3EJ@X@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0]
+// X64: @"\01??_R1A@?0A@EA@W@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AVW@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 4, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3W@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R17?0A@EN@M@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AUM@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 1, i32 8, i32 -1, i32 0, i32 77, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3M@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R0?AUM@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"\01??_7type_info@@6B@", i8* null, [8 x i8] c".?AUM@@\00" }
+// X64: @"\01??_R3M@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([3 x i32]* @"\01??_R2M@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R2M@@8" = linkonce_odr constant [3 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@M@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EN@N@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0]
+// X64: @"\01??_R1A@?0A@EA@M@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AUM@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 1, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3M@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R1A@?0A@EN@N@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AUN@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 77, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3N@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R0?AUN@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"\01??_7type_info@@6B@", i8* null, [8 x i8] c".?AUN@@\00" }
+// X64: @"\01??_R3N@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([2 x i32]* @"\01??_R2N@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R2N@@8" = linkonce_odr constant [2 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@N@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0]
+// X64: @"\01??_R1A@?0A@EA@N@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AUN@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3N@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R17?0A@EN@N@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AUN@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 8, i32 -1, i32 0, i32 77, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3N@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R1A@A@3FN@V@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AVV@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 1, i32 0, i32 0, i32 4, i32 93, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3V@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R0?AVV@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"\01??_7type_info@@6B@", i8* null, [8 x i8] c".?AVV@@\00" }
+// X64: @"\01??_R3V@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([3 x i32]* @"\01??_R2V@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R2V@@8" = linkonce_odr constant [3 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@V@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@X@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0]
+// X64: @"\01??_R1A@?0A@EA@V@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AVV@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 1, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3V@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R1A@?0A@EA@X@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AUX@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3X@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R0?AUX@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"\01??_7type_info@@6B@", i8* null, [8 x i8] c".?AUX@@\00" }
+// X64: @"\01??_R3X@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([2 x i32]* @"\01??_R2X@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R2X@@8" = linkonce_odr constant [2 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"\01??_R1A@?0A@EA@X@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0]
+// X64: @"\01??_R1A@A@3EJ@X@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AUX@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 0, i32 4, i32 73, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3X@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R1BA@?0A@EN@M@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AUM@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 1, i32 16, i32 -1, i32 0, i32 77, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3M@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R1BA@?0A@EN@N@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AUN@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 16, i32 -1, i32 0, i32 77, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3N@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R1A@73FN@V@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AVV@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 1, i32 0, i32 8, i32 4, i32 93, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3V@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R1A@73EJ@X@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AUX@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 8, i32 4, i32 73, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3X@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R4Y@@6BW@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 16, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AVY@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3Y@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"\01??_R4Y@@6BW@@@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R4W@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 8, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AVW@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3W@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"\01??_R4W@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R4Z@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AVZ@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3Z@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"\01??_R4Z@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R4V@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AVV@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3V@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"\01??_R4V@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
+// X64: @"\01??_R4X@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"\01??_R0?AUX@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"\01??_R3X@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"\01??_R4X@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }
diff --git a/test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp b/test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp
index d0750e6ebe91..96c23c66b896 100644
--- a/test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp
+++ b/test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-linux | FileCheck -check-prefix LINUX %s
-// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -mconstructor-aliases -cxx-abi microsoft -fno-rtti | FileCheck -check-prefix WIN32 %s
-// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-win32 -mconstructor-aliases -cxx-abi microsoft -fno-rtti | FileCheck -check-prefix WIN64 %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -mconstructor-aliases -fno-rtti | FileCheck -check-prefix WIN32 %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-win32 -mconstructor-aliases -fno-rtti | FileCheck -check-prefix WIN64 %s
struct Empty {};
@@ -47,6 +47,20 @@ struct Big {
int a, b, c, d, e, f;
};
+struct BigWithDtor {
+ BigWithDtor();
+ ~BigWithDtor();
+ int a, b, c, d, e, f;
+};
+
+// WIN32: declare void @"{{.*take_bools_and_chars.*}}"
+// WIN32: (<{ i8, [3 x i8], i8, [3 x i8], %struct.SmallWithDtor,
+// WIN32: i8, [3 x i8], i8, [3 x i8], i32, i8, [3 x i8] }>* inalloca)
+void take_bools_and_chars(char a, char b, SmallWithDtor c, char d, bool e, int f, bool g);
+void call_bools_and_chars() {
+ take_bools_and_chars('A', 'B', SmallWithDtor(), 'D', true, 13, false);
+}
+
// Returning structs that fit into a register.
Small small_return() { return Small(); }
// LINUX-LABEL: define void @_Z12small_returnv(%struct.Small* noalias sret %agg.result)
@@ -103,18 +117,46 @@ void small_arg_with_ctor(SmallWithCtor s) {}
// Test that dtors are invoked in the callee.
void small_arg_with_dtor(SmallWithDtor s) {}
-// WIN32: define void @"\01?small_arg_with_dtor@@YAXUSmallWithDtor@@@Z"(%struct.SmallWithDtor* byval align 4 %s) {{.*}} {
-// WIN32: call x86_thiscallcc void @"\01??1SmallWithDtor@@QAE@XZ"(%struct.SmallWithDtor* %s)
+// WIN32: define void @"\01?small_arg_with_dtor@@YAXUSmallWithDtor@@@Z"(<{ %struct.SmallWithDtor }>* inalloca) {{.*}} {
+// WIN32: call x86_thiscallcc void @"\01??1SmallWithDtor@@QAE@XZ"
// WIN32: }
-// WIN64: define void @"\01?small_arg_with_dtor@@YAXUSmallWithDtor@@@Z"(%struct.SmallWithDtor* byval %s) {{.*}} {
-// WIN64: call void @"\01??1SmallWithDtor@@QEAA@XZ"(%struct.SmallWithDtor* %s)
+// WIN64: define void @"\01?small_arg_with_dtor@@YAXUSmallWithDtor@@@Z"(i32 %s.coerce) {{.*}} {
+// WIN64: call void @"\01??1SmallWithDtor@@QEAA@XZ"
// WIN64: }
+void call_small_arg_with_dtor() {
+ small_arg_with_dtor(SmallWithDtor());
+}
+// The temporary is copied, so it's destroyed in the caller as well as the
+// callee.
+// WIN64-LABEL: define void @"\01?call_small_arg_with_dtor@@YAXXZ"()
+// WIN64: call %struct.SmallWithDtor* @"\01??0SmallWithDtor@@QEAA@XZ"
+// WIN64: call void @"\01?small_arg_with_dtor@@YAXUSmallWithDtor@@@Z"(i32 %{{.*}})
+// WIN64: call void @"\01??1SmallWithDtor@@QEAA@XZ"
+// WIN64: ret void
+
// Test that references aren't destroyed in the callee.
void ref_small_arg_with_dtor(const SmallWithDtor &s) { }
-// WIN32: define void @"\01?ref_small_arg_with_dtor@@YAXABUSmallWithDtor@@@Z"(%struct.SmallWithDtor* %s) {{.*}} {
+// WIN32: define void @"\01?ref_small_arg_with_dtor@@YAXABUSmallWithDtor@@@Z"(%struct.SmallWithDtor* dereferenceable({{[0-9]+}}) %s) {{.*}} {
// WIN32-NOT: call x86_thiscallcc void @"\01??1SmallWithDtor@@QAE@XZ"
// WIN32: }
+// WIN64-LABEL: define void @"\01?ref_small_arg_with_dtor@@YAXAEBUSmallWithDtor@@@Z"(%struct.SmallWithDtor* dereferenceable({{[0-9]+}}) %s)
+
+void big_arg_with_dtor(BigWithDtor s) {}
+// WIN64-LABEL: define void @"\01?big_arg_with_dtor@@YAXUBigWithDtor@@@Z"(%struct.BigWithDtor* %s)
+// WIN64: call void @"\01??1BigWithDtor@@QEAA@XZ"
+// WIN64: }
+
+void call_big_arg_with_dtor() {
+ big_arg_with_dtor(BigWithDtor());
+}
+// We can elide the copy of the temporary in the caller, because this object is
+// larger than 8 bytes and is passed indirectly.
+// WIN64-LABEL: define void @"\01?call_big_arg_with_dtor@@YAXXZ"()
+// WIN64: call %struct.BigWithDtor* @"\01??0BigWithDtor@@QEAA@XZ"
+// WIN64: call void @"\01?big_arg_with_dtor@@YAXUBigWithDtor@@@Z"(%struct.BigWithDtor* %{{.*}})
+// WIN64-NOT: call void @"\01??1BigWithDtor@@QEAA@XZ"
+// WIN64: ret void
// Test that temporaries passed by reference are destroyed in the caller.
void temporary_ref_with_dtor() {
@@ -141,60 +183,65 @@ void eh_cleanup_arg_with_dtor() {
void small_arg_with_vftable(SmallWithVftable s) {}
// LINUX-LABEL: define void @_Z22small_arg_with_vftable16SmallWithVftable(%struct.SmallWithVftable* %s)
-// WIN32: define void @"\01?small_arg_with_vftable@@YAXUSmallWithVftable@@@Z"(%struct.SmallWithVftable* byval align 4 %s)
-// WIN64: define void @"\01?small_arg_with_vftable@@YAXUSmallWithVftable@@@Z"(%struct.SmallWithVftable* byval %s)
+// WIN32: define void @"\01?small_arg_with_vftable@@YAXUSmallWithVftable@@@Z"(<{ %struct.SmallWithVftable }>* inalloca)
+// WIN64: define void @"\01?small_arg_with_vftable@@YAXUSmallWithVftable@@@Z"(%struct.SmallWithVftable* %s)
void medium_arg_with_copy_ctor(MediumWithCopyCtor s) {}
// LINUX-LABEL: define void @_Z25medium_arg_with_copy_ctor18MediumWithCopyCtor(%struct.MediumWithCopyCtor* %s)
-// WIN32: define void @"\01?medium_arg_with_copy_ctor@@YAXUMediumWithCopyCtor@@@Z"(%struct.MediumWithCopyCtor* byval align 4 %s)
-// WIN64: define void @"\01?medium_arg_with_copy_ctor@@YAXUMediumWithCopyCtor@@@Z"(%struct.MediumWithCopyCtor* byval %s)
+// WIN32: define void @"\01?medium_arg_with_copy_ctor@@YAXUMediumWithCopyCtor@@@Z"(<{ %struct.MediumWithCopyCtor }>* inalloca)
+// WIN64: define void @"\01?medium_arg_with_copy_ctor@@YAXUMediumWithCopyCtor@@@Z"(%struct.MediumWithCopyCtor* %s)
void big_arg(Big s) {}
// LINUX-LABEL: define void @_Z7big_arg3Big(%struct.Big* byval align 4 %s)
// WIN32: define void @"\01?big_arg@@YAXUBig@@@Z"(%struct.Big* byval align 4 %s)
// WIN64: define void @"\01?big_arg@@YAXUBig@@@Z"(%struct.Big* %s)
-// FIXME: Add WIN64 tests. Currently, even the method manglings are wrong (sic!).
class Class {
public:
Small thiscall_method_small() { return Small(); }
// LINUX: define {{.*}} void @_ZN5Class21thiscall_method_smallEv(%struct.Small* noalias sret %agg.result, %class.Class* %this)
- // WIN32: define {{.*}} x86_thiscallcc void @"\01?thiscall_method_small@Class@@QAE?AUSmall@@XZ"(%struct.Small* noalias sret %agg.result, %class.Class* %this)
+ // WIN32: define {{.*}} x86_thiscallcc void @"\01?thiscall_method_small@Class@@QAE?AUSmall@@XZ"(%class.Class* %this, %struct.Small* noalias sret %agg.result)
+ // WIN64: define linkonce_odr void @"\01?thiscall_method_small@Class@@QEAA?AUSmall@@XZ"(%class.Class* %this, %struct.Small* noalias sret %agg.result)
SmallWithCtor thiscall_method_small_with_ctor() { return SmallWithCtor(); }
// LINUX: define {{.*}} void @_ZN5Class31thiscall_method_small_with_ctorEv(%struct.SmallWithCtor* noalias sret %agg.result, %class.Class* %this)
- // WIN32: define {{.*}} x86_thiscallcc void @"\01?thiscall_method_small_with_ctor@Class@@QAE?AUSmallWithCtor@@XZ"(%struct.SmallWithCtor* noalias sret %agg.result, %class.Class* %this)
+ // WIN32: define {{.*}} x86_thiscallcc void @"\01?thiscall_method_small_with_ctor@Class@@QAE?AUSmallWithCtor@@XZ"(%class.Class* %this, %struct.SmallWithCtor* noalias sret %agg.result)
+ // WIN64: define linkonce_odr void @"\01?thiscall_method_small_with_ctor@Class@@QEAA?AUSmallWithCtor@@XZ"(%class.Class* %this, %struct.SmallWithCtor* noalias sret %agg.result)
Small __cdecl cdecl_method_small() { return Small(); }
// LINUX: define {{.*}} void @_ZN5Class18cdecl_method_smallEv(%struct.Small* noalias sret %agg.result, %class.Class* %this)
- // FIXME: Interesting, cdecl returns structures differently for instance
- // methods and global functions. This is not supported by Clang yet...
- // FIXME: Replace WIN32-NOT with WIN32 when this is fixed.
- // WIN32-NOT: define {{.*}} void @"\01?cdecl_method_small@Class@@QAA?AUSmall@@XZ"(%struct.Small* noalias sret %agg.result, %class.Class* %this)
+ // WIN32: define {{.*}} void @"\01?cdecl_method_small@Class@@QAA?AUSmall@@XZ"(%class.Class* %this, %struct.Small* noalias sret %agg.result)
+ // WIN64: define linkonce_odr void @"\01?cdecl_method_small@Class@@QEAA?AUSmall@@XZ"(%class.Class* %this, %struct.Small* noalias sret %agg.result)
Big __cdecl cdecl_method_big() { return Big(); }
// LINUX: define {{.*}} void @_ZN5Class16cdecl_method_bigEv(%struct.Big* noalias sret %agg.result, %class.Class* %this)
- // WIN32: define {{.*}} void @"\01?cdecl_method_big@Class@@QAA?AUBig@@XZ"(%struct.Big* noalias sret %agg.result, %class.Class* %this)
+ // WIN32: define {{.*}} void @"\01?cdecl_method_big@Class@@QAA?AUBig@@XZ"(%class.Class* %this, %struct.Big* noalias sret %agg.result)
+ // WIN64: define linkonce_odr void @"\01?cdecl_method_big@Class@@QEAA?AUBig@@XZ"(%class.Class* %this, %struct.Big* noalias sret %agg.result)
void thiscall_method_arg(Empty s) {}
// LINUX: define {{.*}} void @_ZN5Class19thiscall_method_argE5Empty(%class.Class* %this)
// WIN32: define {{.*}} void @"\01?thiscall_method_arg@Class@@QAEXUEmpty@@@Z"(%class.Class* %this, %struct.Empty* byval align 4 %s)
+ // WIN64: define linkonce_odr void @"\01?thiscall_method_arg@Class@@QEAAXUEmpty@@@Z"(%class.Class* %this, i8 %s.coerce)
void thiscall_method_arg(EmptyWithCtor s) {}
// LINUX: define {{.*}} void @_ZN5Class19thiscall_method_argE13EmptyWithCtor(%class.Class* %this)
// WIN32: define {{.*}} void @"\01?thiscall_method_arg@Class@@QAEXUEmptyWithCtor@@@Z"(%class.Class* %this, %struct.EmptyWithCtor* byval align 4 %s)
+ // WIN64: define linkonce_odr void @"\01?thiscall_method_arg@Class@@QEAAXUEmptyWithCtor@@@Z"(%class.Class* %this, i8 %s.coerce)
void thiscall_method_arg(Small s) {}
// LINUX: define {{.*}} void @_ZN5Class19thiscall_method_argE5Small(%class.Class* %this, %struct.Small* byval align 4 %s)
// WIN32: define {{.*}} void @"\01?thiscall_method_arg@Class@@QAEXUSmall@@@Z"(%class.Class* %this, %struct.Small* byval align 4 %s)
+ // WIN64: define linkonce_odr void @"\01?thiscall_method_arg@Class@@QEAAXUSmall@@@Z"(%class.Class* %this, i32 %s.coerce)
void thiscall_method_arg(SmallWithCtor s) {}
// LINUX: define {{.*}} void @_ZN5Class19thiscall_method_argE13SmallWithCtor(%class.Class* %this, %struct.SmallWithCtor* byval align 4 %s)
// WIN32: define {{.*}} void @"\01?thiscall_method_arg@Class@@QAEXUSmallWithCtor@@@Z"(%class.Class* %this, %struct.SmallWithCtor* byval align 4 %s)
+ // WIN64: define linkonce_odr void @"\01?thiscall_method_arg@Class@@QEAAXUSmallWithCtor@@@Z"(%class.Class* %this, i32 %s.coerce)
void thiscall_method_arg(Big s) {}
// LINUX: define {{.*}} void @_ZN5Class19thiscall_method_argE3Big(%class.Class* %this, %struct.Big* byval align 4 %s)
// WIN32: define {{.*}} void @"\01?thiscall_method_arg@Class@@QAEXUBig@@@Z"(%class.Class* %this, %struct.Big* byval align 4 %s)
+ // WIN64: define linkonce_odr void @"\01?thiscall_method_arg@Class@@QEAAXUBig@@@Z"(%class.Class* %this, %struct.Big* %s)
};
void use_class() {
@@ -218,8 +265,8 @@ struct X {
};
void g(X) {
}
-// WIN32: define void @"\01?g@@YAXUX@@@Z"(%struct.X* byval align 4) {{.*}} {
-// WIN32: call x86_thiscallcc void @"\01??1X@@QAE@XZ"(%struct.X* %0)
+// WIN32: define void @"\01?g@@YAXUX@@@Z"(<{ %struct.X, [3 x i8] }>* inalloca) {{.*}} {
+// WIN32: call x86_thiscallcc void @"\01??1X@@QAE@XZ"(%struct.X* {{.*}})
// WIN32: }
void f() {
g(X());
@@ -227,3 +274,72 @@ void f() {
// WIN32: define void @"\01?f@@YAXXZ"() {{.*}} {
// WIN32-NOT: call {{.*}} @"\01??1X@@QAE@XZ"
// WIN32: }
+
+
+namespace test2 {
+// We used to crash on this due to the mixture of POD byval and non-trivial
+// byval.
+
+struct NonTrivial {
+ NonTrivial();
+ NonTrivial(const NonTrivial &o);
+ ~NonTrivial();
+ int a;
+};
+struct POD { int b; };
+
+int foo(NonTrivial a, POD b);
+void bar() {
+ POD b;
+ b.b = 13;
+ int c = foo(NonTrivial(), b);
+}
+// WIN32-LABEL: define void @"\01?bar@test2@@YAXXZ"() {{.*}} {
+// WIN32: %[[argmem:[^ ]*]] = alloca inalloca [[argmem_ty:<{ %"struct.test2::NonTrivial", %"struct.test2::POD" }>]]
+// WIN32: getelementptr inbounds [[argmem_ty]]* %[[argmem]], i32 0, i32 1
+// WIN32: call void @llvm.memcpy
+// WIN32: getelementptr inbounds [[argmem_ty]]* %[[argmem]], i32 0, i32 0
+// WIN32: call x86_thiscallcc %"struct.test2::NonTrivial"* @"\01??0NonTrivial@test2@@QAE@XZ"
+// WIN32: call i32 @"\01?foo@test2@@YAHUNonTrivial@1@UPOD@1@@Z"([[argmem_ty]]* inalloca %argmem)
+// WIN32: ret void
+// WIN32: }
+
+}
+
+namespace test3 {
+
+// Check that we padded the inalloca struct to a multiple of 4.
+struct NonTrivial {
+ NonTrivial();
+ NonTrivial(const NonTrivial &o);
+ ~NonTrivial();
+ int a;
+};
+void foo(NonTrivial a, bool b) { }
+// WIN32-LABEL: define void @"\01?foo@test3@@YAXUNonTrivial@1@_N@Z"(<{ %"struct.test3::NonTrivial", i8, [3 x i8] }>* inalloca)
+
+}
+
+// We would crash here because the later definition of ForwardDeclare1 results
+// in a different IR type for the value we want to store. However, the alloca's
+// type will use the argument type selected by fn1.
+struct ForwardDeclare1;
+
+typedef void (*FnPtr1)(ForwardDeclare1);
+void fn1(FnPtr1 a, SmallWithDtor b) { }
+
+struct ForwardDeclare1 {};
+
+void fn2(FnPtr1 a, SmallWithDtor b) { fn1(a, b); };
+// WIN32-LABEL: define void @"\01?fn2@@YAXP6AXUForwardDeclare1@@@ZUSmallWithDtor@@@Z"
+// WIN32: %[[a:[^ ]*]] = getelementptr inbounds [[argmem_ty:<{ {}\*, %struct.SmallWithDtor }>]]* %{{.*}}, i32 0, i32 0
+// WIN32: %[[a1:[^ ]*]] = bitcast {}** %[[a]] to void [[dst_ty:\(%struct.ForwardDeclare1\*\)\*]]*
+// WIN32: %[[argmem:[^ ]*]] = alloca inalloca [[argmem_ty]]
+// WIN32: %[[gep1:[^ ]*]] = getelementptr inbounds [[argmem_ty]]* %[[argmem]], i32 0, i32 1
+// WIN32: %[[bc1:[^ ]*]] = bitcast %struct.SmallWithDtor* %[[gep1]] to i8*
+// WIN32: call void @llvm.memcpy.p0i8.p0i8.i32(i8* %[[bc1]], i8* {{.*}}, i32 4, i32 4, i1 false)
+// WIN32: %[[a2:[^ ]*]] = load void [[dst_ty]]* %[[a1]], align 4
+// WIN32: %[[gep2:[^ ]*]] = getelementptr inbounds [[argmem_ty]]* %[[argmem]], i32 0, i32 0
+// WIN32: %[[addr:[^ ]*]] = bitcast {}** %[[gep2]] to void [[dst_ty]]*
+// WIN32: store void [[dst_ty]] %[[a2]], void [[dst_ty]]* %[[addr]], align 4
+// WIN32: call void @"\01?fn1@@YAXP6AXUForwardDeclare1@@@ZUSmallWithDtor@@@Z"([[argmem_ty]]* inalloca %[[argmem]])
diff --git a/test/CodeGenCXX/microsoft-abi-static-initializers.cpp b/test/CodeGenCXX/microsoft-abi-static-initializers.cpp
index c0b972212357..5f74c54c1c45 100644
--- a/test/CodeGenCXX/microsoft-abi-static-initializers.cpp
+++ b/test/CodeGenCXX/microsoft-abi-static-initializers.cpp
@@ -1,8 +1,9 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - -mconstructor-aliases -cxx-abi microsoft -triple=i386-pc-win32 | FileCheck %s
+// RUN: %clang_cc1 -fms-extensions -emit-llvm %s -o - -mconstructor-aliases -triple=i386-pc-win32 | FileCheck %s
-// CHECK: @llvm.global_ctors = appending global [2 x { i32, void ()* }]
-// CHECK: [{ i32, void ()* } { i32 65535, void ()* @"\01??__Efoo@?$B@H@@YAXXZ" },
-// CHECK: { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I_a }]
+// CHECK: @llvm.global_ctors = appending global [2 x { i32, void ()*, i8* }]
+// CHECK: [{ i32, void ()*, i8* } { i32 65535, void ()* @"\01??__Efoo@?$B@H@@2VA@@A@YAXXZ",
+// CHECK: i8* bitcast (%class.A* @"\01?foo@?$B@H@@2VA@@A" to i8*) },
+// CHECK: { i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_microsoft_abi_static_initializers.cpp, i8* null }]
struct S {
S();
@@ -11,21 +12,34 @@ struct S {
S s;
-// CHECK: define internal void @"\01??__Es@@YAXXZ"() [[NUW:#[0-9]+]]
-// CHECK: %{{[.0-9A-Z_a-z]+}} = call x86_thiscallcc %struct.S* @"\01??0S@@QAE@XZ"
+// CHECK: define internal void @"\01??__Es@@YAXXZ"()
+// CHECK: call x86_thiscallcc %struct.S* @"\01??0S@@QAE@XZ"
// CHECK: call i32 @atexit(void ()* @"\01??__Fs@@YAXXZ")
// CHECK: ret void
-// CHECK: define internal void @"\01??__Fs@@YAXXZ"() [[NUW]] {
+// CHECK: define internal void @"\01??__Fs@@YAXXZ"()
// CHECK: call x86_thiscallcc void @"\01??1S@@QAE@XZ"
// CHECK: ret void
+// These globals should use distinct guard variables, and not different bits of
+// the same global.
+__declspec(selectany) S selectany1;
+__declspec(selectany) S selectany2;
+// CHECK: define linkonce_odr void @"\01??__Eselectany1@@YAXXZ"()
+// CHECK-NOT: @"\01??_Bselectany1
+// CHECK: call x86_thiscallcc %struct.S* @"\01??0S@@QAE@XZ"
+// CHECK: ret void
+// CHECK: define linkonce_odr void @"\01??__Eselectany2@@YAXXZ"()
+// CHECK-NOT: @"\01??_Bselectany2
+// CHECK: call x86_thiscallcc %struct.S* @"\01??0S@@QAE@XZ"
+// CHECK: ret void
+
void StaticLocal() {
static S TheS;
}
// CHECK-LABEL: define void @"\01?StaticLocal@@YAXXZ"()
-// CHECK: load i32* @"\01?$S1@?1??StaticLocal@@YAXXZ@4IA"
-// CHECK: store i32 {{.*}}, i32* @"\01?$S1@?1??StaticLocal@@YAXXZ@4IA"
+// CHECK: load i32* @"\01?$S1@?0??StaticLocal@@YAXXZ@4IA"
+// CHECK: store i32 {{.*}}, i32* @"\01?$S1@?0??StaticLocal@@YAXXZ@4IA"
// CHECK: ret
void MultipleStatics() {
@@ -66,7 +80,7 @@ void MultipleStatics() {
static S S35;
}
// CHECK-LABEL: define void @"\01?MultipleStatics@@YAXXZ"()
-// CHECK: load i32* @"\01?$S1@?1??MultipleStatics@@YAXXZ@4IA"
+// CHECK: load i32* @"\01?$S1@?0??MultipleStatics@@YAXXZ@4IA"
// CHECK: and i32 {{.*}}, 1
// CHECK: and i32 {{.*}}, 2
// CHECK: and i32 {{.*}}, 4
@@ -74,7 +88,7 @@ void MultipleStatics() {
// CHECK: and i32 {{.*}}, 16
// ...
// CHECK: and i32 {{.*}}, -2147483648
-// CHECK: load i32* @"\01?$S1@?1??MultipleStatics@@YAXXZ@4IA1"
+// CHECK: load i32* @"\01?$S1@?0??MultipleStatics@@YAXXZ@4IA1"
// CHECK: and i32 {{.*}}, 1
// CHECK: and i32 {{.*}}, 2
// CHECK: and i32 {{.*}}, 4
@@ -85,6 +99,7 @@ class A {
public:
A() {}
~A() {}
+ int a;
};
template<typename T>
@@ -104,7 +119,7 @@ inline S &UnreachableStatic() {
return s;
}
-// CHECK-LABEL: define linkonce_odr %struct.S* @"\01?UnreachableStatic@@YAAAUS@@XZ"()
+// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.S* @"\01?UnreachableStatic@@YAAAUS@@XZ"()
// CHECK: and i32 {{.*}}, 2
// CHECK: or i32 {{.*}}, 2
// CHECK: ret
@@ -114,7 +129,7 @@ inline S &getS() {
return TheS;
}
-// CHECK-LABEL: define linkonce_odr %struct.S* @"\01?getS@@YAAAUS@@XZ"
+// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.S* @"\01?getS@@YAAAUS@@XZ"
// CHECK: load i32* @"\01??_B?1??getS@@YAAAUS@@XZ@51"
// CHECK: and i32 {{.*}}, 1
// CHECK: icmp ne i32 {{.*}}, 0
@@ -128,27 +143,95 @@ inline S &getS() {
// init.end:
// CHECK: ret %struct.S* @"\01?TheS@?1??getS@@YAAAUS@@XZ@4U2@A"
+inline int enum_in_function() {
+ // CHECK-LABEL: define linkonce_odr i32 @"\01?enum_in_function@@YAHXZ"()
+ static enum e { foo, bar, baz } x;
+ // CHECK: @"\01?x@?1??enum_in_function@@YAHXZ@4W4e@?1??1@YAHXZ@A"
+ static int y;
+ // CHECK: @"\01?y@?1??enum_in_function@@YAHXZ@4HA"
+ return x + y;
+};
+
+struct T {
+ enum e { foo, bar, baz };
+ int enum_in_struct() {
+ // CHECK-LABEL: define linkonce_odr x86_thiscallcc i32 @"\01?enum_in_struct@T@@QAEHXZ"
+ static int x;
+ // CHECK: @"\01?x@?1??enum_in_struct@T@@QAEHXZ@4HA"
+ return x++;
+ }
+};
+
+inline int switch_test(int x) {
+ // CHECK-LABEL: define linkonce_odr i32 @"\01?switch_test@@YAHH@Z"(i32 %x)
+ switch (x) {
+ static int a;
+ // CHECK: @"\01?a@?3??switch_test@@YAHH@Z@4HA"
+ case 0:
+ a++;
+ return 1;
+ case 1:
+ static int b;
+ // CHECK: @"\01?b@?3??switch_test@@YAHH@Z@4HA"
+ return b++;
+ case 2: {
+ static int c;
+ // CHECK: @"\01?c@?4??switch_test@@YAHH@Z@4HA"
+ return b + c++;
+ }
+ };
+}
+
+int f();
+inline void switch_test2() {
+ // CHECK-LABEL: define linkonce_odr void @"\01?switch_test2@@YAXXZ"()
+ // CHECK: @"\01?x@?2??switch_test2@@YAXXZ@4HA"
+ switch (1) default: static int x = f();
+}
+
+namespace DynamicDLLImportInitVSMangling {
+ // Failing to pop the ExprEvalContexts when instantiating a dllimport var with
+ // dynamic initializer would cause subsequent static local numberings to be
+ // incorrect.
+ struct NonPOD { NonPOD(); };
+ template <typename T> struct A { static NonPOD x; };
+ template <typename T> NonPOD A<T>::x;
+ template struct __declspec(dllimport) A<int>;
+
+ inline int switch_test3() {
+ // CHECK-LABEL: define linkonce_odr i32 @"\01?switch_test3@DynamicDLLImportInitVSMangling@@YAHXZ"
+ static int local;
+ // CHECK: @"\01?local@?1??switch_test3@DynamicDLLImportInitVSMangling@@YAHXZ@4HA"
+ return local++;
+ }
+}
+
void force_usage() {
UnreachableStatic();
getS();
(void)B<int>::foo; // (void) - force usage
+ enum_in_function();
+ (void)&T::enum_in_struct;
+ switch_test(1);
+ switch_test2();
+ DynamicDLLImportInitVSMangling::switch_test3();
}
-// CHECK: define internal void @"\01??__Efoo@?$B@H@@YAXXZ"() [[NUW]]
-// CHECK: %{{[.0-9A-Z_a-z]+}} = call x86_thiscallcc %class.A* @"\01??0A@@QAE@XZ"
-// CHECK: call i32 @atexit(void ()* @"\01??__Ffoo@?$B@H@@YAXXZ")
+// CHECK: define linkonce_odr void @"\01??__Efoo@?$B@H@@2VA@@A@YAXXZ"()
+// CHECK-NOT: and
+// CHECK-NOT: ?_Bfoo@
+// CHECK: call x86_thiscallcc %class.A* @"\01??0A@@QAE@XZ"
+// CHECK: call i32 @atexit(void ()* @"\01??__Ffoo@?$B@H@@2VA@@A@YAXXZ")
// CHECK: ret void
// CHECK: define linkonce_odr x86_thiscallcc %class.A* @"\01??0A@@QAE@XZ"
// CHECK: define linkonce_odr x86_thiscallcc void @"\01??1A@@QAE@XZ"
-// CHECK: define internal void @"\01??__Ffoo@?$B@H@@YAXXZ"
+// CHECK: define internal void @"\01??__Ffoo@?$B@H@@2VA@@A@YAXXZ"
// CHECK: call x86_thiscallcc void @"\01??1A@@QAE@XZ"{{.*}}foo
// CHECK: ret void
-// CHECK: define internal void @_GLOBAL__I_a() [[NUW]] {
+// CHECK: define internal void @_GLOBAL__sub_I_microsoft_abi_static_initializers.cpp()
// CHECK: call void @"\01??__Es@@YAXXZ"()
// CHECK: ret void
-
-// CHECK: attributes [[NUW]] = { nounwind }
diff --git a/test/CodeGenCXX/microsoft-abi-structors-alias.cpp b/test/CodeGenCXX/microsoft-abi-structors-alias.cpp
index d54520fab72c..f977556aa565 100644
--- a/test/CodeGenCXX/microsoft-abi-structors-alias.cpp
+++ b/test/CodeGenCXX/microsoft-abi-structors-alias.cpp
@@ -1,9 +1,26 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-pc-win32 -fno-rtti -mconstructor-aliases | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -fno-rtti -mconstructor-aliases -O1 -disable-llvm-optzns | FileCheck %s
namespace test1 {
template <typename T> class A {
~A() {}
};
template class A<char>;
-// CHECK: define weak_odr x86_thiscallcc void @"\01??1?$A@D@test1@@AAE@XZ"
+// CHECK-DAG: define weak_odr x86_thiscallcc void @"\01??1?$A@D@test1@@AAE@XZ"
+}
+
+namespace test2 {
+struct A {
+ virtual ~A();
+};
+struct B : A {
+ B();
+ virtual ~B();
+};
+
+A::~A() {}
+B::~B() {}
+void foo() {
+ B b;
+}
+// CHECK-DAG: @"\01??1B@test2@@UAE@XZ" = alias bitcast (void (%"struct.test2::A"*)* @"\01??1A@test2@@UAE@XZ" to void (%"struct.test2::B"*)*)
}
diff --git a/test/CodeGenCXX/microsoft-abi-structors.cpp b/test/CodeGenCXX/microsoft-abi-structors.cpp
index c2f1395f47df..7d3992b9940b 100644
--- a/test/CodeGenCXX/microsoft-abi-structors.cpp
+++ b/test/CodeGenCXX/microsoft-abi-structors.cpp
@@ -1,10 +1,12 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - -mconstructor-aliases -cxx-abi microsoft -triple=i386-pc-win32 -fno-rtti > %t
+// RUN: %clang_cc1 -emit-llvm -fno-rtti %s -std=c++11 -o - -mconstructor-aliases -triple=i386-pc-win32 -fno-rtti > %t
// RUN: FileCheck %s < %t
// vftables are emitted very late, so do another pass to try to keep the checks
// in source order.
// RUN: FileCheck --check-prefix DTORS %s < %t
+// RUN: FileCheck --check-prefix DTORS2 %s < %t
+// RUN: FileCheck --check-prefix DTORS3 %s < %t
//
-// RUN: %clang_cc1 -emit-llvm %s -o - -mconstructor-aliases -cxx-abi microsoft -triple=x86_64-pc-win32 -fno-rtti | FileCheck --check-prefix DTORS-X64 %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -mconstructor-aliases -triple=x86_64-pc-win32 -fno-rtti | FileCheck --check-prefix DTORS-X64 %s
namespace basic {
@@ -121,6 +123,79 @@ void use_D() { D c; }
} // end namespace basic
+namespace dtor_in_second_nvbase {
+
+struct A {
+ virtual void f(); // A needs vftable to be primary.
+};
+struct B {
+ virtual ~B();
+};
+struct C : A, B {
+ virtual ~C();
+};
+
+C::~C() {
+// CHECK-LABEL: define x86_thiscallcc void @"\01??1C@dtor_in_second_nvbase@@UAE@XZ"
+// CHECK: (%"struct.dtor_in_second_nvbase::C"* %this)
+// No this adjustment!
+// CHECK-NOT: getelementptr
+// CHECK: load %"struct.dtor_in_second_nvbase::C"** %{{.*}}
+// Now we this-adjust before calling ~B.
+// CHECK: bitcast %"struct.dtor_in_second_nvbase::C"* %{{.*}} to i8*
+// CHECK: getelementptr inbounds i8* %{{.*}}, i64 4
+// CHECK: bitcast i8* %{{.*}} to %"struct.dtor_in_second_nvbase::B"*
+// CHECK: call x86_thiscallcc void @"\01??1B@dtor_in_second_nvbase@@UAE@XZ"
+// CHECK: (%"struct.dtor_in_second_nvbase::B"* %{{.*}})
+// CHECK: ret void
+}
+
+void foo() {
+ C c;
+}
+// DTORS2-LABEL: define linkonce_odr x86_thiscallcc void @"\01??_EC@dtor_in_second_nvbase@@W3AEPAXI@Z"
+// DTORS2: (%"struct.dtor_in_second_nvbase::C"* %this, i32 %should_call_delete)
+// Do an adjustment from B* to C*.
+// DTORS2: getelementptr i8* %{{.*}}, i32 -4
+// DTORS2: bitcast i8* %{{.*}} to %"struct.dtor_in_second_nvbase::C"*
+// DTORS2: call x86_thiscallcc void @"\01??_GC@dtor_in_second_nvbase@@UAEPAXI@Z"
+// DTORS2: ret void
+
+}
+
+namespace test2 {
+// Just like dtor_in_second_nvbase, except put that in a vbase of a diamond.
+
+// C's dtor is in the non-primary base.
+struct A { virtual void f(); };
+struct B { virtual ~B(); };
+struct C : A, B { virtual ~C(); int c; };
+
+// Diamond hierarchy, with C as the shared vbase.
+struct D : virtual C { int d; };
+struct E : virtual C { int e; };
+struct F : D, E { ~F(); int f; };
+
+F::~F() {
+// CHECK-LABEL: define x86_thiscallcc void @"\01??1F@test2@@UAE@XZ"(%"struct.test2::F"*)
+// Do an adjustment from C vbase subobject to F as though F was the
+// complete type.
+// CHECK: getelementptr inbounds i8* %{{.*}}, i32 -20
+// CHECK: bitcast i8* %{{.*}} to %"struct.test2::F"*
+// CHECK: store %"struct.test2::F"*
+}
+
+void foo() {
+ F f;
+}
+// DTORS3-LABEL: define linkonce_odr x86_thiscallcc void @"\01??_DF@test2@@UAE@XZ"
+// Do an adjustment from C* to F*.
+// DTORS3: getelementptr i8* %{{.*}}, i32 20
+// DTORS3: bitcast i8* %{{.*}} to %"struct.test2::F"*
+// DTORS3: call x86_thiscallcc void @"\01??1F@test2@@UAE@XZ"
+// DTORS3: ret void
+
+}
namespace constructors {
@@ -299,3 +374,69 @@ void call_nv_deleting_dtor(D *d) {
}
}
+
+namespace test1 {
+struct A { };
+struct B : virtual A {
+ B(int *a);
+ B(const char *a, ...);
+ __cdecl B(short *a);
+};
+B::B(int *a) {}
+B::B(const char *a, ...) {}
+B::B(short *a) {}
+// CHECK: define x86_thiscallcc %"struct.test1::B"* @"\01??0B@test1@@QAE@PAH@Z"
+// CHECK: (%"struct.test1::B"* returned %this, i32* %a, i32 %is_most_derived)
+// CHECK: define %"struct.test1::B"* @"\01??0B@test1@@QAA@PBDZZ"
+// CHECK: (%"struct.test1::B"* returned %this, i32 %is_most_derived, i8* %a, ...)
+
+// FIXME: This should be x86_thiscallcc. MSVC ignores explicit CCs on structors.
+// CHECK: define %"struct.test1::B"* @"\01??0B@test1@@QAA@PAF@Z"
+// CHECK: (%"struct.test1::B"* returned %this, i16* %a, i32 %is_most_derived)
+
+void construct_b() {
+ int a;
+ B b1(&a);
+ B b2("%d %d", 1, 2);
+}
+// CHECK-LABEL: define void @"\01?construct_b@test1@@YAXXZ"()
+// CHECK: call x86_thiscallcc %"struct.test1::B"* @"\01??0B@test1@@QAE@PAH@Z"
+// CHECK: (%"struct.test1::B"* {{.*}}, i32* {{.*}}, i32 1)
+// CHECK: call %"struct.test1::B"* (%"struct.test1::B"*, i32, i8*, ...)* @"\01??0B@test1@@QAA@PBDZZ"
+// CHECK: (%"struct.test1::B"* {{.*}}, i32 1, i8* {{.*}}, i32 1, i32 2)
+}
+
+namespace implicit_copy_vtable {
+// This was a crash that only reproduced in ABIs without key functions.
+struct ImplicitCopy {
+ // implicit copy ctor
+ virtual ~ImplicitCopy();
+};
+void CreateCopy(ImplicitCopy *a) {
+ new ImplicitCopy(*a);
+}
+// CHECK: store {{.*}} @"\01??_7ImplicitCopy@implicit_copy_vtable@@6B@"
+
+struct MoveOnly {
+ MoveOnly(MoveOnly &&o) = default;
+ virtual ~MoveOnly();
+};
+MoveOnly &&f();
+void g() { new MoveOnly(f()); }
+// CHECK: store {{.*}} @"\01??_7MoveOnly@implicit_copy_vtable@@6B@"
+}
+
+// Dtor thunks for classes in anonymous namespaces should be internal, not
+// linkonce_odr.
+namespace {
+struct A {
+ virtual ~A() { }
+};
+}
+void *getA() {
+ return (void*)new A();
+}
+// CHECK: define internal x86_thiscallcc void @"\01??_GA@?A@@UAEPAXI@Z"
+// CHECK: (%"struct.(anonymous namespace)::A"* %this, i32 %should_call_delete)
+// CHECK: define internal x86_thiscallcc void @"\01??1A@?A@@UAE@XZ"
+// CHECK: (%"struct.(anonymous namespace)::A"* %this)
diff --git a/test/CodeGenCXX/microsoft-abi-thunks.cpp b/test/CodeGenCXX/microsoft-abi-thunks.cpp
index f1bc385fdff2..c755b300067d 100644
--- a/test/CodeGenCXX/microsoft-abi-thunks.cpp
+++ b/test/CodeGenCXX/microsoft-abi-thunks.cpp
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -fno-rtti -emit-llvm %s -o - -cxx-abi microsoft -triple=i386-pc-win32 >%t 2>&1
+// RUN: %clang_cc1 -fno-rtti -emit-llvm %s -o - -triple=i386-pc-win32 >%t 2>&1
// RUN: FileCheck --check-prefix=MANGLING %s < %t
// RUN: FileCheck --check-prefix=XMANGLING %s < %t
// RUN: FileCheck --check-prefix=CODEGEN %s < %t
-// RUN: %clang_cc1 -fno-rtti -emit-llvm %s -o - -cxx-abi microsoft -triple=x86_64-pc-win32 2>&1 | FileCheck --check-prefix=MANGLING-X64 %s
+// RUN: %clang_cc1 -fno-rtti -emit-llvm %s -o - -triple=x86_64-pc-win32 2>&1 | FileCheck --check-prefix=MANGLING-X64 %s
void foo(void *);
@@ -61,13 +61,13 @@ struct C : A, B {
C::C() {} // Emits vftable and forces thunk generation.
-// CODEGEN-LABEL: define weak x86_thiscallcc void @"\01??_EC@@W3AEPAXI@Z"(%struct.C* %this, i32 %should_call_delete)
+// CODEGEN-LABEL: define linkonce_odr x86_thiscallcc void @"\01??_EC@@W3AEPAXI@Z"(%struct.C* %this, i32 %should_call_delete)
// CODEGEN: getelementptr i8* {{.*}}, i32 -4
// FIXME: should actually call _EC, not _GC.
// CODEGEN: call x86_thiscallcc void @"\01??_GC@@UAEPAXI@Z"
// CODEGEN: ret
-// CODEGEN-LABEL: define weak x86_thiscallcc void @"\01?public_f@C@@W3AEXXZ"(%struct.C*
+// CODEGEN-LABEL: define linkonce_odr x86_thiscallcc void @"\01?public_f@C@@W3AEXXZ"(%struct.C*
// CODEGEN: getelementptr i8* {{.*}}, i32 -4
// CODEGEN: call x86_thiscallcc void @"\01?public_f@C@@UAEXXZ"(%struct.C*
// CODEGEN: ret
@@ -91,7 +91,7 @@ struct E : D {
E::E() {} // Emits vftable and forces thunk generation.
-// CODEGEN-LABEL: define weak x86_thiscallcc %struct.C* @"\01?goo@E@@QAEPAUB@@XZ"
+// CODEGEN-LABEL: define weak_odr x86_thiscallcc %struct.C* @"\01?goo@E@@QAEPAUB@@XZ"
// CODEGEN: call x86_thiscallcc %struct.C* @"\01?goo@E@@UAEPAUC@@XZ"
// CODEGEN: getelementptr inbounds i8* {{.*}}, i32 4
// CODEGEN: ret
@@ -124,7 +124,7 @@ struct I : D {
I::I() {} // Emits vftable and forces thunk generation.
-// CODEGEN-LABEL: define weak x86_thiscallcc %struct.{{[BF]}}* @"\01?goo@I@@QAEPAUB@@XZ"
+// CODEGEN-LABEL: define weak_odr x86_thiscallcc %struct.{{[BF]}}* @"\01?goo@I@@QAEPAUB@@XZ"
// CODEGEN: %[[ORIG_RET:.*]] = call x86_thiscallcc %struct.F* @"\01?goo@I@@UAEPAUF@@XZ"
// CODEGEN: %[[ORIG_RET_i8:.*]] = bitcast %struct.F* %[[ORIG_RET]] to i8*
// CODEGEN: %[[VBPTR_i8:.*]] = getelementptr inbounds i8* %[[ORIG_RET_i8]], i32 4
@@ -152,3 +152,14 @@ struct C : A, B {
};
C c;
}
+
+namespace {
+struct E : D {
+ E();
+ virtual C* goo();
+};
+E::E() {}
+E e;
+// Class with internal linkage has internal linkage thunks.
+// CODEGEN: define internal x86_thiscallcc %struct.C* @"\01?goo@E@?A@@QAEPAUB@@XZ"
+}
diff --git a/test/CodeGenCXX/microsoft-abi-try-throw.cpp b/test/CodeGenCXX/microsoft-abi-try-throw.cpp
new file mode 100644
index 000000000000..95c2cbd817b3
--- /dev/null
+++ b/test/CodeGenCXX/microsoft-abi-try-throw.cpp
@@ -0,0 +1,23 @@
+// RUN: %clang_cc1 -emit-llvm-only %s -triple=i386-pc-win32 -mconstructor-aliases -fcxx-exceptions -fexceptions -fno-rtti -verify -DTRY
+// RUN: %clang_cc1 -emit-llvm-only %s -triple=i386-pc-win32 -mconstructor-aliases -fcxx-exceptions -fexceptions -fno-rtti -verify -DTHROW
+
+void external();
+
+inline void not_emitted() {
+ throw int(13); // no error
+}
+
+int main() {
+ int rv = 0;
+#ifdef TRY
+ try { // expected-error {{cannot compile this try statement yet}}
+ external();
+ } catch (int) {
+ rv = 1;
+ }
+#endif
+#ifdef THROW
+ throw int(42); // expected-error {{cannot compile this throw expression yet}}
+#endif
+ return rv;
+}
diff --git a/test/CodeGenCXX/microsoft-abi-typeid.cpp b/test/CodeGenCXX/microsoft-abi-typeid.cpp
new file mode 100644
index 000000000000..4ee004d51d21
--- /dev/null
+++ b/test/CodeGenCXX/microsoft-abi-typeid.cpp
@@ -0,0 +1,52 @@
+// RUN: %clang_cc1 -emit-llvm -O1 -o - -triple=i386-pc-win32 %s | FileCheck %s
+
+struct type_info;
+namespace std { using ::type_info; }
+
+struct V { virtual void f(); };
+struct A : virtual V { A(); };
+
+extern A a;
+extern V v;
+extern int b;
+A* fn();
+
+const std::type_info* test0_typeid() { return &typeid(int); }
+// CHECK-LABEL: define %struct.type_info* @"\01?test0_typeid@@YAPBUtype_info@@XZ"()
+// CHECK: ret %struct.type_info* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to %struct.type_info*)
+
+const std::type_info* test1_typeid() { return &typeid(A); }
+// CHECK-LABEL: define %struct.type_info* @"\01?test1_typeid@@YAPBUtype_info@@XZ"()
+// CHECK: ret %struct.type_info* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUA@@@8" to %struct.type_info*)
+
+const std::type_info* test2_typeid() { return &typeid(&a); }
+// CHECK-LABEL: define %struct.type_info* @"\01?test2_typeid@@YAPBUtype_info@@XZ"()
+// CHECK: ret %struct.type_info* bitcast (%rtti.TypeDescriptor7* @"\01??_R0PAUA@@@8" to %struct.type_info*)
+
+const std::type_info* test3_typeid() { return &typeid(*fn()); }
+// CHECK-LABEL: define %struct.type_info* @"\01?test3_typeid@@YAPBUtype_info@@XZ"()
+// CHECK: [[CALL:%.*]] = tail call %struct.A* @"\01?fn@@YAPAUA@@XZ"()
+// CHECK-NEXT: [[CMP:%.*]] = icmp eq %struct.A* [[CALL]], null
+// CHECK-NEXT: br i1 [[CMP]]
+// CHECK: tail call i8* @__RTtypeid(i8* null)
+// CHECK-NEXT: unreachable
+// CHECK: [[THIS:%.*]] = bitcast %struct.A* [[CALL]] to i8*
+// CHECK-NEXT: [[VBTBLP:%.*]] = bitcast %struct.A* [[CALL]] to i8**
+// CHECK-NEXT: [[VBTBL:%.*]] = load i8** [[VBTBLP]], align 4
+// CHECK-NEXT: [[VBSLOT:%.*]] = getelementptr inbounds i8* [[VBTBL]], i32 4
+// CHECK-NEXT: [[VBITCST:%.*]] = bitcast i8* [[VBSLOT]] to i32*
+// CHECK-NEXT: [[VBASE_OFFS:%.*]] = load i32* [[VBITCST]], align 4
+// CHECK-NEXT: [[ADJ:%.*]] = getelementptr inbounds i8* [[THIS]], i32 [[VBASE_OFFS]]
+// CHECK-NEXT: [[RT:%.*]] = tail call i8* @__RTtypeid(i8* [[ADJ]])
+// CHECK-NEXT: [[RET:%.*]] = bitcast i8* [[RT]] to %struct.type_info*
+// CHECK-NEXT: ret %struct.type_info* [[RET]]
+
+const std::type_info* test4_typeid() { return &typeid(b); }
+// CHECK: define %struct.type_info* @"\01?test4_typeid@@YAPBUtype_info@@XZ"()
+// CHECK: ret %struct.type_info* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to %struct.type_info*)
+
+const std::type_info* test5_typeid() { return &typeid(v); }
+// CHECK: define %struct.type_info* @"\01?test5_typeid@@YAPBUtype_info@@XZ"()
+// CHECK: [[RT:%.*]] = tail call i8* @__RTtypeid(i8* bitcast (%struct.V* @"\01?v@@3UV@@A" to i8*))
+// CHECK-NEXT: [[RET:%.*]] = bitcast i8* [[RT]] to %struct.type_info*
+// CHECK-NEXT: ret %struct.type_info* [[RET]]
diff --git a/test/CodeGenCXX/microsoft-abi-vbtables.cpp b/test/CodeGenCXX/microsoft-abi-vbtables.cpp
index 6de556b1d814..8b86d6bd3c8e 100644
--- a/test/CodeGenCXX/microsoft-abi-vbtables.cpp
+++ b/test/CodeGenCXX/microsoft-abi-vbtables.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -fno-rtti -cxx-abi microsoft -triple=i386-pc-win32 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -fno-rtti -triple=i386-pc-win32 -emit-llvm -o - | FileCheck %s
// See microsoft-abi-structors.cpp for constructor codegen tests.
@@ -477,3 +477,54 @@ F f;
// CHECK-DAG: @"\01??_8F@Test26@@7BD@1@@" = linkonce_odr unnamed_addr constant [4 x i32] [i32 0, i32 16, i32 12, i32 20]
// CHECK-DAG: @"\01??_8F@Test26@@7BE@1@@" = linkonce_odr unnamed_addr constant [2 x i32] [i32 -4, i32 28]
}
+
+namespace Test27 {
+// PR17748
+struct A {};
+struct B : virtual A {};
+struct C : virtual B {};
+struct D : C, B {};
+struct E : D {};
+struct F : C, E {};
+struct G : F, D, C, B {};
+G x;
+
+// CHECK-DAG: @"\01??_8G@Test27@@7BB@1@@" =
+// CHECK-DAG: @"\01??_8G@Test27@@7BB@1@F@1@@" =
+// CHECK-DAG: @"\01??_8G@Test27@@7BC@1@@" =
+// CHECK-DAG: @"\01??_8G@Test27@@7BC@1@D@1@@" =
+// CHECK-DAG: @"\01??_8G@Test27@@7BC@1@E@1@@" =
+// CHECK-DAG: @"\01??_8G@Test27@@7BC@1@F@1@@" =
+// CHECK-DAG: @"\01??_8G@Test27@@7BD@1@@" =
+// CHECK-DAG: @"\01??_8G@Test27@@7BF@1@@" =
+}
+
+namespace Test28 {
+// PR17748
+struct A {};
+struct B : virtual A {};
+struct C : virtual B {};
+struct D : C, B {};
+struct E : C, D {};
+struct F : virtual E, virtual D, virtual C {};
+F x;
+
+// CHECK-DAG: @"\01??_8F@Test28@@7B01@@" =
+// CHECK-DAG: @"\01??_8F@Test28@@7BB@1@@" =
+// CHECK-DAG: @"\01??_8F@Test28@@7BC@1@@" =
+// CHECK-DAG: @"\01??_8F@Test28@@7BC@1@D@1@@" =
+// CHECK-DAG: @"\01??_8F@Test28@@7BC@1@D@1@E@1@@" =
+// CHECK-DAG: @"\01??_8F@Test28@@7BC@1@E@1@@" =
+// CHECK-DAG: @"\01??_8F@Test28@@7BD@1@@" =
+// CHECK-DAG: @"\01??_8F@Test28@@7BE@1@@" =
+}
+
+namespace Test29 {
+struct A {};
+struct B : virtual A {};
+struct C : virtual B {};
+struct D : C {};
+D d;
+
+// CHECK-DAG: @"\01??_8D@Test29@@7BB@1@@" = linkonce_odr unnamed_addr constant [2 x i32] zeroinitializer
+}
diff --git a/test/CodeGenCXX/microsoft-abi-vftables.cpp b/test/CodeGenCXX/microsoft-abi-vftables.cpp
new file mode 100644
index 000000000000..825aba010f12
--- /dev/null
+++ b/test/CodeGenCXX/microsoft-abi-vftables.cpp
@@ -0,0 +1,42 @@
+// RUN: %clang_cc1 %s -fno-rtti -triple=i386-pc-win32 -emit-llvm -o - -O1 -disable-llvm-optzns | FileCheck %s -check-prefix=NO-RTTI
+// RUN: %clang_cc1 %s -triple=i386-pc-win32 -emit-llvm -o - -O1 -disable-llvm-optzns | FileCheck %s -check-prefix=RTTI
+
+// RTTI-DAG: $"\01??_7S@@6B@" = comdat largest
+// RTTI-DAG: $"\01??_7V@@6B@" = comdat largest
+// RTTI-DAG: $"\01??_7W@?A@@6B@" = comdat largest
+
+struct S {
+ virtual ~S();
+} s;
+
+// RTTI-DAG: [[VTABLE_S:@.*]] = private unnamed_addr constant [2 x i8*] [i8* bitcast ({{.*}} @"\01??_R4S@@6B@" to i8*), i8* bitcast ({{.*}} @"\01??_GS@@UAEPAXI@Z" to i8*)], comdat $"\01??_7S@@6B@"
+// RTTI-DAG: @"\01??_7S@@6B@" = unnamed_addr alias getelementptr inbounds ([2 x i8*]* [[VTABLE_S]], i32 0, i32 1)
+
+// NO-RTTI-DAG: @"\01??_7S@@6B@" = linkonce_odr unnamed_addr constant [1 x i8*] [i8* bitcast ({{.*}} @"\01??_GS@@UAEPAXI@Z" to i8*)]
+
+struct __declspec(dllimport) U {
+ virtual ~U();
+} u;
+
+// RTTI-DAG: @"\01??_7U@@6B@" = available_externally dllimport unnamed_addr constant [1 x i8*] [i8* bitcast ({{.*}} @"\01??_GU@@UAEPAXI@Z" to i8*)]
+
+// NO-RTTI-DAG: @"\01??_7U@@6B@" = available_externally dllimport unnamed_addr constant [1 x i8*] [i8* bitcast ({{.*}} @"\01??_GU@@UAEPAXI@Z" to i8*)]
+
+struct __declspec(dllexport) V {
+ virtual ~V();
+} v;
+
+// RTTI-DAG: [[VTABLE_V:@.*]] = private unnamed_addr constant [2 x i8*] [i8* bitcast ({{.*}} @"\01??_R4V@@6B@" to i8*), i8* bitcast ({{.*}} @"\01??_GV@@UAEPAXI@Z" to i8*)], comdat $"\01??_7V@@6B@"
+// RTTI-DAG: @"\01??_7V@@6B@" = dllexport unnamed_addr alias getelementptr inbounds ([2 x i8*]* [[VTABLE_V]], i32 0, i32 1)
+
+// NO-RTTI-DAG: @"\01??_7V@@6B@" = weak_odr dllexport unnamed_addr constant [1 x i8*] [i8* bitcast ({{.*}} @"\01??_GV@@UAEPAXI@Z" to i8*)]
+
+namespace {
+struct W {
+ virtual ~W();
+} w;
+}
+// RTTI-DAG: [[VTABLE_W:@.*]] = private unnamed_addr constant [2 x i8*] [i8* bitcast ({{.*}} @"\01??_R4W@?A@@6B@" to i8*), i8* bitcast ({{.*}} @"\01??_GW@?A@@UAEPAXI@Z" to i8*)], comdat $"\01??_7W@?A@@6B@"
+// RTTI-DAG: @"\01??_7W@?A@@6B@" = unnamed_addr alias internal getelementptr inbounds ([2 x i8*]* @1, i32 0, i32 1)
+
+// NO-RTTI-DAG: @"\01??_7W@?A@@6B@" = internal unnamed_addr constant [1 x i8*] [i8* bitcast ({{.*}} @"\01??_GW@?A@@UAEPAXI@Z" to i8*)]
diff --git a/test/CodeGenCXX/microsoft-abi-virtual-inheritance-vtordisps.cpp b/test/CodeGenCXX/microsoft-abi-virtual-inheritance-vtordisps.cpp
index 8e23ade658c4..a6fcdea749ab 100644
--- a/test/CodeGenCXX/microsoft-abi-virtual-inheritance-vtordisps.cpp
+++ b/test/CodeGenCXX/microsoft-abi-virtual-inheritance-vtordisps.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 %s -fno-rtti -cxx-abi microsoft -triple=i386-pc-win32 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -fno-rtti -triple=i386-pc-win32 -emit-llvm -o - | FileCheck %s
// For now, just make sure x86_64 doesn't crash.
-// RUN: %clang_cc1 %s -fno-rtti -cxx-abi microsoft -triple=x86_64-pc-win32 -emit-llvm -o %t
+// RUN: %clang_cc1 %s -fno-rtti -triple=x86_64-pc-win32 -emit-llvm -o %t
struct A {
virtual void f();
@@ -23,7 +23,7 @@ struct D : virtual C {
D::D() {} // Forces vftable emission.
-// CHECK-LABEL: define weak x86_thiscallcc void @"\01?f@D@@$4PPPPPPPM@A@AEXXZ"
+// CHECK-LABEL: define linkonce_odr x86_thiscallcc void @"\01?f@D@@$4PPPPPPPM@A@AEXXZ"
// CHECK: %[[ECX:.*]] = load %struct.D** %{{.*}}
// CHECK: %[[ECX_i8:.*]] = bitcast %struct.D* %[[ECX]] to i8*
// CHECK: %[[VTORDISP_PTR_i8:.*]] = getelementptr i8* %[[ECX_i8]], i32 -4
@@ -34,7 +34,7 @@ D::D() {} // Forces vftable emission.
// CHECK: call x86_thiscallcc void @"\01?f@D@@UAEXXZ"(i8* %[[ADJUSTED_i8]])
// CHECK: ret void
-// CHECK-LABEL: define weak x86_thiscallcc void @"\01?f@D@@$4PPPPPPPI@3AEXXZ"
+// CHECK-LABEL: define linkonce_odr x86_thiscallcc void @"\01?f@D@@$4PPPPPPPI@3AEXXZ"
// CHECK: %[[ECX:.*]] = load %struct.D** %{{.*}}
// CHECK: %[[ECX_i8:.*]] = bitcast %struct.D* %[[ECX]] to i8*
// CHECK: %[[VTORDISP_PTR_i8:.*]] = getelementptr i8* %[[ECX_i8]], i32 -8
@@ -63,7 +63,7 @@ struct G : virtual F, virtual E {
G::G() {} // Forces vftable emission.
-// CHECK-LABEL: define weak x86_thiscallcc void @"\01?f@E@@$R4BA@M@PPPPPPPM@7AEXXZ"(i8*)
+// CHECK-LABEL: define linkonce_odr x86_thiscallcc void @"\01?f@E@@$R4BA@M@PPPPPPPM@7AEXXZ"(i8*)
// CHECK: %[[ECX:.*]] = load %struct.E** %{{.*}}
// CHECK: %[[ECX_i8:.*]] = bitcast %struct.E* %[[ECX]] to i8*
// CHECK: %[[VTORDISP_PTR_i8:.*]] = getelementptr i8* %[[ECX_i8]], i32 -4
diff --git a/test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp b/test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp
index 7c223ca0a772..2f0fffee696f 100644
--- a/test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp
+++ b/test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 %s -fno-rtti -cxx-abi microsoft -triple=i386-pc-win32 -emit-llvm -o %t
+// RUN: %clang_cc1 %s -fno-rtti -triple=i386-pc-win32 -emit-llvm -o %t
// RUN: FileCheck %s < %t
// RUN: FileCheck --check-prefix=CHECK2 %s < %t
// For now, just make sure x86_64 doesn't crash.
-// RUN: %clang_cc1 %s -fno-rtti -cxx-abi microsoft -triple=x86_64-pc-win32 -emit-llvm -o %t
+// RUN: %clang_cc1 %s -fno-rtti -triple=x86_64-pc-win32 -emit-llvm -o %t
struct VBase {
virtual ~VBase();
@@ -312,3 +312,151 @@ D::~D() {
}
}
+
+namespace test2 {
+struct A { A(); };
+struct B : virtual A { B() {} };
+struct C : B, A { C() {} };
+
+// PR18435: Order mattered here. We were generating code for the delegating
+// call to B() from C().
+void callC() { C x; }
+
+// CHECK-LABEL: define linkonce_odr x86_thiscallcc %"struct.test2::C"* @"\01??0C@test2@@QAE@XZ"
+// CHECK: (%"struct.test2::C"* returned %this, i32 %is_most_derived)
+// CHECK: br i1
+// Virtual bases
+// CHECK: call x86_thiscallcc %"struct.test2::A"* @"\01??0A@test2@@QAE@XZ"(%"struct.test2::A"* %{{.*}})
+// CHECK: br label
+// Non-virtual bases
+// CHECK: call x86_thiscallcc %"struct.test2::B"* @"\01??0B@test2@@QAE@XZ"(%"struct.test2::B"* %{{.*}}, i32 0)
+// CHECK: call x86_thiscallcc %"struct.test2::A"* @"\01??0A@test2@@QAE@XZ"(%"struct.test2::A"* %{{.*}})
+// CHECK: ret
+
+// CHECK2-LABEL: define linkonce_odr x86_thiscallcc %"struct.test2::B"* @"\01??0B@test2@@QAE@XZ"
+// CHECK2: (%"struct.test2::B"* returned %this, i32 %is_most_derived)
+// CHECK2: call x86_thiscallcc %"struct.test2::A"* @"\01??0A@test2@@QAE@XZ"(%"struct.test2::A"* %{{.*}})
+// CHECK2: ret
+
+}
+
+namespace test3 {
+// PR19104: A non-virtual call of a virtual method doesn't use vftable thunks,
+// so requires only static adjustment which is different to the one used
+// for virtual calls.
+struct A {
+ virtual void foo();
+};
+
+struct B : virtual A {
+ virtual void bar();
+};
+
+struct C : virtual A {
+ virtual void foo();
+};
+
+struct D : B, C {
+ virtual void bar();
+ int field; // Laid out between C and A subobjects in D.
+};
+
+void D::bar() {
+ // CHECK-LABEL: define x86_thiscallcc void @"\01?bar@D@test3@@UAEXXZ"(%"struct.test3::D"* %this)
+
+ C::foo();
+ // Shouldn't need any vbtable lookups. All we have to do is adjust to C*,
+ // then compensate for the adjustment performed in the C::foo() prologue.
+ // CHECK-NOT: load i8**
+ // CHECK: %[[OBJ_i8:.*]] = bitcast %"struct.test3::D"* %{{.*}} to i8*
+ // CHECK: %[[C_i8:.*]] = getelementptr inbounds i8* %[[OBJ_i8]], i32 8
+ // CHECK: %[[C:.*]] = bitcast i8* %[[C_i8]] to %"struct.test3::C"*
+ // CHECK: %[[C_i8:.*]] = bitcast %"struct.test3::C"* %[[C]] to i8*
+ // CHECK: %[[ARG:.*]] = getelementptr i8* %[[C_i8]], i32 4
+ // CHECK: call x86_thiscallcc void @"\01?foo@C@test3@@UAEXXZ"(i8* %[[ARG]])
+ // CHECK: ret
+}
+}
+
+namespace test4{
+// PR19172: We used to merge method vftable locations wrong.
+
+struct A {
+ virtual ~A() {}
+};
+
+struct B {
+ virtual ~B() {}
+};
+
+struct C : virtual A, B {
+ virtual ~C();
+};
+
+void foo(void*);
+
+C::~C() {
+ // CHECK-LABEL: define x86_thiscallcc void @"\01??1C@test4@@UAE@XZ"(%"struct.test4::C"* %this)
+
+ // In this case "this" points to the most derived class, so no GEPs needed.
+ // CHECK-NOT: getelementptr
+ // CHECK-NOT: bitcast
+ // CHECK: %[[VFPTR_i8:.*]] = bitcast %"struct.test4::C"* %{{.*}} to [1 x i8*]**
+ // CHECK: store [1 x i8*]* @"\01??_7C@test4@@6BB@1@@", [1 x i8*]** %[[VFPTR_i8]]
+
+ foo(this);
+ // CHECK: ret
+}
+
+void destroy(C *obj) {
+ // CHECK-LABEL: define void @"\01?destroy@test4@@YAXPAUC@1@@Z"(%"struct.test4::C"* %obj)
+
+ delete obj;
+ // CHECK: %[[VPTR:.*]] = bitcast %"struct.test4::C"* %[[OBJ:.*]] to void (%"struct.test4::C"*, i32)***
+ // CHECK: %[[VFTABLE:.*]] = load void (%"struct.test4::C"*, i32)*** %[[VPTR]]
+ // CHECK: %[[VFTENTRY:.*]] = getelementptr inbounds void (%"struct.test4::C"*, i32)** %[[VFTABLE]], i64 0
+ // CHECK: %[[VFUN:.*]] = load void (%"struct.test4::C"*, i32)** %[[VFTENTRY]]
+ // CHECK: call x86_thiscallcc void %[[VFUN]](%"struct.test4::C"* %[[OBJ]], i32 1)
+ // CHECK: ret
+}
+
+struct D {
+ virtual void d();
+};
+
+// The first non-virtual base doesn't have a vdtor,
+// but "this adjustment" is not needed.
+struct E : D, B, virtual A {
+ virtual ~E();
+};
+
+E::~E() {
+ // CHECK-LABEL: define x86_thiscallcc void @"\01??1E@test4@@UAE@XZ"(%"struct.test4::E"* %this)
+
+ // In this case "this" points to the most derived class, so no GEPs needed.
+ // CHECK-NOT: getelementptr
+ // CHECK-NOT: bitcast
+ // CHECK: %[[VFPTR_i8:.*]] = bitcast %"struct.test4::E"* %{{.*}} to [1 x i8*]**
+ // CHECK: store [1 x i8*]* @"\01??_7E@test4@@6BD@1@@", [1 x i8*]** %[[VFPTR_i8]]
+ foo(this);
+}
+
+void destroy(E *obj) {
+ // CHECK-LABEL: define void @"\01?destroy@test4@@YAXPAUE@1@@Z"(%"struct.test4::E"* %obj)
+
+ // CHECK-NOT: getelementptr
+ // CHECK: %[[OBJ_i8:.*]] = bitcast %"struct.test4::E"* %[[OBJ:.*]] to i8*
+ // CHECK: %[[B_i8:.*]] = getelementptr inbounds i8* %[[OBJ_i8]], i32 4
+ // CHECK: %[[VPTR:.*]] = bitcast i8* %[[B_i8]] to void (%"struct.test4::E"*, i32)***
+ // CHECK: %[[VFTABLE:.*]] = load void (%"struct.test4::E"*, i32)*** %[[VPTR]]
+ // CHECK: %[[VFTENTRY:.*]] = getelementptr inbounds void (%"struct.test4::E"*, i32)** %[[VFTABLE]], i64 0
+ // CHECK: %[[VFUN:.*]] = load void (%"struct.test4::E"*, i32)** %[[VFTENTRY]]
+ // CHECK: %[[OBJ_i8:.*]] = bitcast %"struct.test4::E"* %[[OBJ]] to i8*
+ // CHECK: %[[B_i8:.*]] = getelementptr inbounds i8* %[[OBJ_i8]], i32 4
+ // FIXME: in fact, the call should take i8* and the bitcast is redundant.
+ // CHECK: %[[B_as_E:.*]] = bitcast i8* %[[B_i8]] to %"struct.test4::E"*
+ // CHECK: call x86_thiscallcc void %[[VFUN]](%"struct.test4::E"* %[[B_as_E]], i32 1)
+ delete obj;
+}
+
+}
diff --git a/test/CodeGenCXX/microsoft-abi-virtual-member-pointers.cpp b/test/CodeGenCXX/microsoft-abi-virtual-member-pointers.cpp
index 51a04c89dcb7..974953c01444 100644
--- a/test/CodeGenCXX/microsoft-abi-virtual-member-pointers.cpp
+++ b/test/CodeGenCXX/microsoft-abi-virtual-member-pointers.cpp
@@ -1,14 +1,23 @@
-// RUN: %clang_cc1 -fno-rtti -emit-llvm -cxx-abi microsoft -triple=i386-pc-win32 %s -o - | FileCheck %s --check-prefix=CHECK32
-// RUN: %clang_cc1 -fno-rtti -emit-llvm -cxx-abi microsoft -triple=x86_64-pc-win32 %s -o - | FileCheck %s --check-prefix=CHECK64
+// RUN: %clang_cc1 -fno-rtti -emit-llvm -triple=i386-pc-win32 %s -o - | FileCheck %s --check-prefix=CHECK32
+// RUN: %clang_cc1 -fno-rtti -emit-llvm -triple=x86_64-pc-win32 %s -o - | FileCheck %s --check-prefix=CHECK64
struct S {
int x, y, z;
};
+// U is not trivially copyable, and requires inalloca to pass by value.
+struct U {
+ int u;
+ U();
+ ~U();
+ U(const U &);
+};
+
struct C {
virtual void foo();
virtual int bar(int, double);
virtual S baz(int);
+ virtual S qux(U);
};
namespace {
@@ -31,18 +40,22 @@ void f() {
void (D::*ptr4)();
ptr4 = &D::foo;
+ S (C::*ptr5)(U);
+ ptr5 = &C::qux;
+
+
// CHECK32-LABEL: define void @"\01?f@@YAXXZ"()
// CHECK32: store i8* bitcast (void (%struct.C*)* @"\01??_9C@@$BA@AE" to i8*), i8** %ptr
// CHECK32: store i8* bitcast (i32 (%struct.C*, i32, double)* @"\01??_9C@@$B3AE" to i8*), i8** %ptr2
-// CHECK32: store i8* bitcast (void (%struct.S*, %struct.C*, i32)* @"\01??_9C@@$B7AE" to i8*), i8** %ptr3
-// CHECK32: store i8* bitcast (void (%"struct.<anonymous namespace>::D"*)* @"\01??_9D@?A@@$BA@AE" to i8*), i8** %ptr4
+// CHECK32: store i8* bitcast (void (%struct.C*, %struct.S*, i32)* @"\01??_9C@@$B7AE" to i8*), i8** %ptr3
+// CHECK32: store i8* bitcast (void (%"struct.(anonymous namespace)::D"*)* @"\01??_9D@?A@@$BA@AE" to i8*), i8** %ptr4
// CHECK32: }
//
// CHECK64-LABEL: define void @"\01?f@@YAXXZ"()
// CHECK64: store i8* bitcast (void (%struct.C*)* @"\01??_9C@@$BA@AA" to i8*), i8** %ptr
// CHECK64: store i8* bitcast (i32 (%struct.C*, i32, double)* @"\01??_9C@@$B7AA" to i8*), i8** %ptr2
-// CHECK64: store i8* bitcast (void (%struct.S*, %struct.C*, i32)* @"\01??_9C@@$BBA@AA" to i8*), i8** %ptr3
-// CHECK64: store i8* bitcast (void (%"struct.<anonymous namespace>::D"*)* @"\01??_9D@?A@@$BA@AA" to i8*), i8** %ptr
+// CHECK64: store i8* bitcast (void (%struct.C*, %struct.S*, i32)* @"\01??_9C@@$BBA@AA" to i8*), i8** %ptr3
+// CHECK64: store i8* bitcast (void (%"struct.(anonymous namespace)::D"*)* @"\01??_9D@?A@@$BA@AA" to i8*), i8** %ptr
// CHECK64: }
}
@@ -51,14 +64,14 @@ void f() {
// CHECK32-LABEL: define linkonce_odr x86_thiscallcc void @"\01??_9C@@$BA@AE"(%struct.C* %this) unnamed_addr
// CHECK32: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*)** %{{.*}}, i64 0
// CHECK32: [[CALLEE:%.*]] = load void (%struct.C*)** [[VPTR]]
-// CHECK32: call x86_thiscallcc void [[CALLEE]](%struct.C* %{{.*}})
+// CHECK32: musttail call x86_thiscallcc void [[CALLEE]](%struct.C* %{{.*}})
// CHECK32: ret void
// CHECK32: }
//
// CHECK64-LABEL: define linkonce_odr void @"\01??_9C@@$BA@AA"(%struct.C* %this) unnamed_addr
// CHECK64: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*)** %{{.*}}, i64 0
// CHECK64: [[CALLEE:%.*]] = load void (%struct.C*)** [[VPTR]]
-// CHECK64: call void [[CALLEE]](%struct.C* %{{.*}})
+// CHECK64: musttail call void [[CALLEE]](%struct.C* %{{.*}})
// CHECK64: ret void
// CHECK64: }
@@ -66,43 +79,58 @@ void f() {
// CHECK32-LABEL: define linkonce_odr x86_thiscallcc i32 @"\01??_9C@@$B3AE"(%struct.C* %this, i32, double) unnamed_addr
// CHECK32: [[VPTR:%.*]] = getelementptr inbounds i32 (%struct.C*, i32, double)** %{{.*}}, i64 1
// CHECK32: [[CALLEE:%.*]] = load i32 (%struct.C*, i32, double)** [[VPTR]]
-// CHECK32: [[CALL:%.*]] = call x86_thiscallcc i32 [[CALLEE]](%struct.C* %{{.*}}, i32 %{{.*}}, double %{{.*}})
+// CHECK32: [[CALL:%.*]] = musttail call x86_thiscallcc i32 [[CALLEE]](%struct.C* %{{.*}}, i32 %{{.*}}, double %{{.*}})
// CHECK32: ret i32 [[CALL]]
// CHECK32: }
//
// CHECK64-LABEL: define linkonce_odr i32 @"\01??_9C@@$B7AA"(%struct.C* %this, i32, double) unnamed_addr
// CHECK64: [[VPTR:%.*]] = getelementptr inbounds i32 (%struct.C*, i32, double)** %{{.*}}, i64 1
// CHECK64: [[CALLEE:%.*]] = load i32 (%struct.C*, i32, double)** [[VPTR]]
-// CHECK64: [[CALL:%.*]] = call i32 [[CALLEE]](%struct.C* %{{.*}}, i32 %{{.*}}, double %{{.*}})
+// CHECK64: [[CALL:%.*]] = musttail call i32 [[CALLEE]](%struct.C* %{{.*}}, i32 %{{.*}}, double %{{.*}})
// CHECK64: ret i32 [[CALL]]
// CHECK64: }
// Thunk for calling the 3rd virtual function in C, taking an int parameter, returning a struct.
-// CHECK32-LABEL: define linkonce_odr x86_thiscallcc void @"\01??_9C@@$B7AE"(%struct.S* noalias sret %agg.result, %struct.C* %this, i32) unnamed_addr
-// CHECK32: [[VPTR:%.*]] = getelementptr inbounds void (%struct.S*, %struct.C*, i32)** %{{.*}}, i64 2
-// CHECK32: [[CALLEE:%.*]] = load void (%struct.S*, %struct.C*, i32)** [[VPTR]]
-// CHECK32: call x86_thiscallcc void [[CALLEE]](%struct.S* sret %agg.result, %struct.C* %{{.*}}, i32 %{{.*}})
+// CHECK32-LABEL: define linkonce_odr x86_thiscallcc void @"\01??_9C@@$B7AE"(%struct.C* %this, %struct.S* noalias sret %agg.result, i32) unnamed_addr
+// CHECK32: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, %struct.S*, i32)** %{{.*}}, i64 2
+// CHECK32: [[CALLEE:%.*]] = load void (%struct.C*, %struct.S*, i32)** [[VPTR]]
+// CHECK32: musttail call x86_thiscallcc void [[CALLEE]](%struct.C* %{{.*}}, %struct.S* sret %agg.result, i32 %{{.*}})
// CHECK32: ret void
// CHECK32: }
//
-// CHECK64-LABEL: define linkonce_odr void @"\01??_9C@@$BBA@AA"(%struct.S* noalias sret %agg.result, %struct.C* %this, i32) unnamed_addr
-// CHECK64: [[VPTR:%.*]] = getelementptr inbounds void (%struct.S*, %struct.C*, i32)** %{{.*}}, i64 2
-// CHECK64: [[CALLEE:%.*]] = load void (%struct.S*, %struct.C*, i32)** [[VPTR]]
-// CHECK64: call void [[CALLEE]](%struct.S* sret %agg.result, %struct.C* %{{.*}}, i32 %{{.*}})
+// CHECK64-LABEL: define linkonce_odr void @"\01??_9C@@$BBA@AA"(%struct.C* %this, %struct.S* noalias sret %agg.result, i32) unnamed_addr
+// CHECK64: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, %struct.S*, i32)** %{{.*}}, i64 2
+// CHECK64: [[CALLEE:%.*]] = load void (%struct.C*, %struct.S*, i32)** [[VPTR]]
+// CHECK64: musttail call void [[CALLEE]](%struct.C* %{{.*}}, %struct.S* sret %agg.result, i32 %{{.*}})
// CHECK64: ret void
// CHECK64: }
// Thunk for calling the virtual function in internal class D.
-// CHECK32-LABEL: define internal x86_thiscallcc void @"\01??_9D@?A@@$BA@AE"(%"struct.<anonymous namespace>::D"* %this) unnamed_addr
-// CHECK32: [[VPTR:%.*]] = getelementptr inbounds void (%"struct.<anonymous namespace>::D"*)** %{{.*}}, i64 0
-// CHECK32: [[CALLEE:%.*]] = load void (%"struct.<anonymous namespace>::D"*)** [[VPTR]]
-// CHECK32: call x86_thiscallcc void [[CALLEE]](%"struct.<anonymous namespace>::D"* %{{.*}})
+// CHECK32-LABEL: define internal x86_thiscallcc void @"\01??_9D@?A@@$BA@AE"(%"struct.(anonymous namespace)::D"* %this) unnamed_addr
+// CHECK32: [[VPTR:%.*]] = getelementptr inbounds void (%"struct.(anonymous namespace)::D"*)** %{{.*}}, i64 0
+// CHECK32: [[CALLEE:%.*]] = load void (%"struct.(anonymous namespace)::D"*)** [[VPTR]]
+// CHECK32: musttail call x86_thiscallcc void [[CALLEE]](%"struct.(anonymous namespace)::D"* %{{.*}})
// CHECK32: ret void
// CHECK32: }
//
-// CHECK64-LABEL: define internal void @"\01??_9D@?A@@$BA@AA"(%"struct.<anonymous namespace>::D"* %this) unnamed_addr
-// CHECK64: [[VPTR:%.*]] = getelementptr inbounds void (%"struct.<anonymous namespace>::D"*)** %{{.*}}, i64 0
-// CHECK64: [[CALLEE:%.*]] = load void (%"struct.<anonymous namespace>::D"*)** [[VPTR]]
-// CHECK64: call void [[CALLEE]](%"struct.<anonymous namespace>::D"* %{{.*}})
+// CHECK64-LABEL: define internal void @"\01??_9D@?A@@$BA@AA"(%"struct.(anonymous namespace)::D"* %this) unnamed_addr
+// CHECK64: [[VPTR:%.*]] = getelementptr inbounds void (%"struct.(anonymous namespace)::D"*)** %{{.*}}, i64 0
+// CHECK64: [[CALLEE:%.*]] = load void (%"struct.(anonymous namespace)::D"*)** [[VPTR]]
+// CHECK64: musttail call void [[CALLEE]](%"struct.(anonymous namespace)::D"* %{{.*}})
+// CHECK64: ret void
+// CHECK64: }
+
+// Thunk for calling the fourth virtual function in C, taking a struct parameter and returning a struct.
+// CHECK32-LABEL: define linkonce_odr x86_thiscallcc %struct.S* @"\01??_9C@@$BM@AE"(%struct.C* %this, <{ %struct.S*, %struct.U }>* inalloca) unnamed_addr
+// CHECK32: [[VPTR:%.*]] = getelementptr inbounds %struct.S* (%struct.C*, <{ %struct.S*, %struct.U }>*)** %{{.*}}, i64 3
+// CHECK32: [[CALLEE:%.*]] = load %struct.S* (%struct.C*, <{ %struct.S*, %struct.U }>*)** [[VPTR]]
+// CHECK32: [[CALL:%.*]] = musttail call x86_thiscallcc %struct.S* [[CALLEE]](%struct.C* %this, <{ %struct.S*, %struct.U }>* inalloca %{{.*}})
+// CHECK32: ret %struct.S* [[CALL]]
+// CHECK32: }
+//
+// CHECK64-LABEL: define linkonce_odr void @"\01??_9C@@$BBI@AA"(%struct.C* %this, %struct.S* noalias sret %agg.result, %struct.U*) unnamed_addr
+// CHECK64: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, %struct.S*, %struct.U*)** %{{.*}}, i64 3
+// CHECK64: [[CALLEE:%.*]] = load void (%struct.C*, %struct.S*, %struct.U*)** [[VPTR]]
+// CHECK64: musttail call void [[CALLEE]](%struct.C* %this, %struct.S* sret %agg.result, %struct.U* %{{.*}})
// CHECK64: ret void
// CHECK64: }
diff --git a/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-no-thunks.cpp b/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-no-thunks.cpp
new file mode 100644
index 000000000000..86314cff324e
--- /dev/null
+++ b/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-no-thunks.cpp
@@ -0,0 +1,302 @@
+// RUN: %clang_cc1 %s -fno-rtti -triple=i386-pc-win32 -emit-llvm -o %t.ll -fdump-vtable-layouts >%t
+// RUN: FileCheck %s < %t
+// RUN: FileCheck --check-prefix=MANGLING %s < %t.ll
+
+namespace test1 {
+struct A {
+ virtual void f();
+};
+
+struct B {
+ virtual void g();
+ // Add an extra virtual method so it's easier to check for the absence of thunks.
+ virtual void h();
+};
+
+struct X : A, B {
+ // CHECK-LABEL: VFTable for 'test1::A' in 'test1::X' (1 entry)
+ // CHECK-NEXT: 0 | void test1::X::f()
+
+ // CHECK-LABEL: VFTable for 'test1::B' in 'test1::X' (2 entries)
+ // CHECK-NEXT: 0 | void test1::B::g()
+ // CHECK-NEXT: 1 | void test1::B::h()
+
+ // CHECK-LABEL: VFTable indices for 'test1::X' (1 entry)
+ // CHECK-NEXT: 0 | void test1::X::f()
+
+ // MANGLING-DAG: @"\01??_7X@test1@@6BA@1@@"
+ // MANGLING-DAG: @"\01??_7X@test1@@6BB@1@@"
+
+ // Overrides only the left child's method (A::f), needs no thunks.
+ virtual void f();
+} x;
+
+void build_vftable(X *obj) { obj->f(); }
+}
+
+namespace test2 {
+struct A {
+ virtual void f();
+};
+
+struct B {
+ virtual void g();
+ virtual void h();
+};
+
+struct X : A, B {
+ // CHECK-LABEL: VFTable for 'test2::A' in 'test2::X' (1 entry)
+ // CHECK-NEXT: 0 | void test2::A::f()
+
+ // CHECK-LABEL: VFTable for 'test2::B' in 'test2::X' (2 entries)
+ // CHECK-NEXT: 0 | void test2::X::g()
+ // CHECK-NEXT: 1 | void test2::B::h()
+
+ // CHECK-LABEL: VFTable indices for 'test2::X' (1 entry).
+ // CHECK-NEXT: via vfptr at offset 4
+ // CHECK-NEXT: 0 | void test2::X::g()
+
+ // Overrides only the right child's method (B::g), needs this adjustment but
+ // not thunks.
+ virtual void g();
+};
+
+void build_vftable(X *obj) { obj->g(); }
+}
+
+namespace test3 {
+struct A {
+ virtual void f();
+};
+
+struct B {
+ virtual void g();
+ virtual void h();
+};
+
+struct X : A, B {
+ // CHECK-LABEL: VFTable for 'test3::A' in 'test3::X' (2 entries)
+ // CHECK-NEXT: 0 | void test3::A::f()
+ // CHECK-NEXT: 1 | void test3::X::i()
+
+ // CHECK-LABEL: VFTable for 'test3::B' in 'test3::X' (2 entries)
+ // CHECK-NEXT: 0 | void test3::B::g()
+ // CHECK-NEXT: 1 | void test3::B::h()
+
+ // CHECK-LABEL: VFTable indices for 'test3::X' (1 entry).
+ // CHECK-NEXT: 1 | void test3::X::i()
+
+ // Only adds a new method.
+ virtual void i();
+};
+
+void build_vftable(X *obj) { obj->i(); }
+}
+
+namespace test4 {
+struct A {
+ virtual void f();
+};
+
+struct Empty { }; // Doesn't have a vftable!
+
+// Only the right base has a vftable, so it's laid out before the left one!
+struct X : Empty, A {
+ // CHECK-LABEL: VFTable for 'test4::A' in 'test4::X' (1 entry)
+ // CHECK-NEXT: 0 | void test4::X::f()
+
+ // CHECK-LABEL: VFTable indices for 'test4::X' (1 entry).
+ // CHECK-NEXT: 0 | void test4::X::f()
+
+ // MANGLING-DAG: @"\01??_7X@test4@@6B@"
+
+ virtual void f();
+} x;
+
+void build_vftable(X *obj) { obj->f(); }
+}
+
+namespace test5 {
+struct A {
+ virtual void f();
+};
+
+struct B {
+ virtual void g();
+ virtual void h();
+};
+
+struct C : A, B {
+ virtual void f();
+};
+
+struct X : C {
+ // CHECK-LABEL: VFTable for 'test5::A' in 'test5::C' in 'test5::X' (1 entry).
+ // CHECK-NEXT: 0 | void test5::X::f()
+
+ // CHECK-LABEL: VFTable for 'test5::B' in 'test5::C' in 'test5::X' (2 entries).
+ // CHECK-NEXT: 0 | void test5::B::g()
+ // CHECK-NEXT: 1 | void test5::B::h()
+
+ // CHECK-LABEL: VFTable indices for 'test5::X' (1 entry).
+ // CHECK-NEXT: 0 | void test5::X::f()
+
+ // MANGLING-DAG: @"\01??_7X@test5@@6BA@1@@"
+ // MANGLING-DAG: @"\01??_7X@test5@@6BB@1@@"
+
+ // Overrides both C::f and A::f.
+ virtual void f();
+} x;
+
+void build_vftable(X *obj) { obj->f(); }
+}
+
+namespace test6 {
+struct A {
+ virtual void f();
+};
+
+struct B {
+ virtual void g();
+ virtual void h();
+};
+
+struct C : A, B {
+ virtual void g();
+};
+
+struct X : C {
+ // CHECK-LABEL: VFTable for 'test6::A' in 'test6::C' in 'test6::X' (1 entry).
+ // CHECK-NEXT: 0 | void test6::A::f()
+
+ // CHECK-LABEL: VFTable for 'test6::B' in 'test6::C' in 'test6::X' (2 entries).
+ // CHECK-NEXT: 0 | void test6::X::g()
+ // CHECK-NEXT: 1 | void test6::B::h()
+
+ // CHECK-LABEL: VFTable indices for 'test6::X' (1 entry).
+ // CHECK-NEXT: via vfptr at offset 4
+ // CHECK-NEXT: 0 | void test6::X::g()
+
+ // Overrides both C::g and B::g.
+ virtual void g();
+};
+
+void build_vftable(X *obj) { obj->g(); }
+}
+
+namespace test7 {
+struct A {
+ virtual void f();
+};
+
+struct B {
+ virtual void g();
+ virtual void h();
+};
+
+struct C : A, B {
+ // Only adds a new method.
+ virtual void i();
+};
+
+struct X : C {
+ // CHECK-LABEL: VFTable for 'test7::A' in 'test7::C' in 'test7::X' (2 entries).
+ // CHECK-NEXT: 0 | void test7::A::f()
+ // CHECK-NEXT: 1 | void test7::C::i()
+
+ // CHECK-LABEL: VFTable for 'test7::B' in 'test7::C' in 'test7::X' (2 entries).
+ // CHECK-NEXT: 0 | void test7::X::g()
+ // CHECK-NEXT: 1 | void test7::B::h()
+
+ // CHECK-LABEL: VFTable indices for 'test7::X' (1 entry).
+ // CHECK-NEXT: via vfptr at offset 4
+ // CHECK-NEXT: 0 | void test7::X::g()
+
+ // Overrides grandparent's B::g.
+ virtual void g();
+};
+
+void build_vftable(X *obj) { obj->g(); }
+}
+
+namespace test8 {
+struct A {
+ virtual void f();
+};
+
+struct B : A {
+ virtual void g();
+};
+
+// There are two 'A' subobjects in this class.
+struct X : A, B {
+ // CHECK-LABEL: VFTable for 'test8::A' in 'test8::X' (2 entries).
+ // CHECK-NEXT: 0 | void test8::A::f()
+ // CHECK-NEXT: 1 | void test8::X::h()
+
+ // CHECK-LABEL: VFTable for 'test8::A' in 'test8::B' in 'test8::X' (2 entries).
+ // CHECK-NEXT: 0 | void test8::A::f()
+ // CHECK-NEXT: 1 | void test8::B::g()
+
+ // CHECK-LABEL: VFTable indices for 'test8::X' (1 entry).
+ // CHECK-NEXT: 1 | void test8::X::h()
+
+ // MANGLING-DAG: @"\01??_7X@test8@@6BA@1@@"
+ // MANGLING-DAG: @"\01??_7X@test8@@6BB@1@@"
+
+ virtual void h();
+} x;
+
+void build_vftable(X *obj) { obj->h(); }
+}
+
+namespace test9 {
+struct A {
+ virtual void f();
+};
+
+struct B {
+ virtual void g();
+ virtual void h();
+};
+
+struct C : A, B {
+ // Overrides only the left child's method (A::f).
+ virtual void f();
+};
+
+struct D : A, B {
+ // Overrides only the right child's method (B::g).
+ virtual void g();
+};
+
+// 2-level structure with repeating subobject types, but no thunks needed.
+struct X : C, D {
+ // CHECK-LABEL: VFTable for 'test9::A' in 'test9::C' in 'test9::X' (2 entries)
+ // CHECK-NEXT: 0 | void test9::C::f()
+ // CHECK-NEXT: 1 | void test9::X::z()
+
+ // CHECK-LABEL: VFTable for 'test9::B' in 'test9::C' in 'test9::X' (2 entries)
+ // CHECK-NEXT: 0 | void test9::B::g()
+ // CHECK-NEXT: 1 | void test9::B::h()
+
+ // CHECK-LABEL: VFTable for 'test9::A' in 'test9::D' in 'test9::X' (1 entry)
+ // CHECK-NEXT: 0 | void test9::A::f()
+
+ // CHECK-LABEL: VFTable for 'test9::B' in 'test9::D' in 'test9::X' (2 entries)
+ // CHECK-NEXT: 0 | void test9::D::g()
+ // CHECK-NEXT: 1 | void test9::B::h()
+
+ // CHECK-LABEL: VFTable indices for 'test9::X' (1 entry).
+ // CHECK-NEXT: 1 | void test9::X::z()
+
+ // MANGLING-DAG: @"\01??_7X@test9@@6BA@1@C@1@@"
+ // MANGLING-DAG: @"\01??_7X@test9@@6BA@1@D@1@@"
+ // MANGLING-DAG: @"\01??_7X@test9@@6BB@1@C@1@@"
+ // MANGLING-DAG: @"\01??_7X@test9@@6BB@1@D@1@@"
+
+ virtual void z();
+} x;
+
+void build_vftable(test9::X *obj) { obj->z(); }
+}
diff --git a/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-pure-virtual.cpp b/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-pure-virtual.cpp
new file mode 100644
index 000000000000..76182a2e331e
--- /dev/null
+++ b/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-pure-virtual.cpp
@@ -0,0 +1,35 @@
+// RUN: %clang_cc1 %s -fno-rtti -triple=i386-pc-win32 -emit-llvm -o %t.ll -fdump-vtable-layouts >%t
+// RUN: FileCheck %s < %t
+// RUN: FileCheck --check-prefix=MANGLING %s < %t.ll
+
+struct A {
+ virtual void f();
+};
+
+struct B {
+ virtual void g() = 0;
+ virtual void h();
+};
+
+struct C : A, B {
+ // CHECK-LABEL: VFTable for 'A' in 'C' (1 entry)
+ // CHECK-NEXT: 0 | void A::f()
+
+ // CHECK-LABEL: VFTable for 'B' in 'C' (2 entries)
+ // CHECK-NEXT: 0 | void C::g()
+ // CHECK-NEXT: 1 | void B::h()
+
+ // CHECK-LABEL: VFTable indices for 'C' (1 entry).
+ // CHECK-NEXT: via vfptr at offset 4
+ // CHECK-NEXT: 0 | void C::g()
+
+ // MANGLING-DAG: @"\01??_7C@@6BA@@@"
+ // MANGLING-DAG: @"\01??_7C@@6BB@@@"
+
+ // Overrides only the right child's method (B::g),
+ // needs this adjustment but not thunks.
+ virtual void g();
+};
+
+C c;
+void build_vftable(C *obj) { obj->g(); }
diff --git a/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-return-adjustment.cpp b/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-return-adjustment.cpp
new file mode 100644
index 000000000000..2d0bf6362296
--- /dev/null
+++ b/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-return-adjustment.cpp
@@ -0,0 +1,297 @@
+// RUN: %clang_cc1 %s -fno-rtti -triple=i386-pc-win32 -emit-llvm -o %t.ll -fdump-vtable-layouts >%t
+// RUN: FileCheck %s < %t
+// RUN: FileCheck --check-prefix=MANGLING %s < %t.ll
+
+namespace test1 {
+struct A {
+ virtual void g();
+ // Add an extra virtual method so it's easier to check for the absence of thunks.
+ virtual void h();
+};
+
+struct B {
+ virtual void g();
+};
+
+// Overrides a method of two bases at the same time, thus needing thunks.
+struct C : A, B {
+ virtual void g();
+};
+
+struct D {
+ virtual B* foo();
+ virtual void z();
+};
+
+struct X : D {
+ // CHECK-LABEL: VFTable for 'test1::D' in 'test1::X' (3 entries).
+ // CHECK-NEXT: 0 | test1::C *test1::X::foo()
+ // CHECK-NEXT: [return adjustment (to type 'struct test1::B *'): 4 non-virtual]
+ // CHECK-NEXT: 1 | void test1::D::z()
+ // CHECK-NEXT: 2 | test1::C *test1::X::foo()
+
+ // CHECK-LABEL: Thunks for 'test1::C *test1::X::foo()' (1 entry).
+ // CHECK-NEXT: 0 | [return adjustment (to type 'struct test1::B *'): 4 non-virtual]
+
+ // CHECK-LABEL: VFTable indices for 'test1::X' (1 entry).
+ // CHECK-NEXT: 2 | test1::C *test1::X::foo()
+
+ // MANGLING-DAG: @"\01??_7X@test1@@6B@"
+
+ virtual C* foo();
+} x;
+
+void build_vftable(X *obj) { obj->foo(); }
+}
+
+namespace test2 {
+struct A {
+ virtual void g();
+ virtual void h();
+};
+
+struct B {
+ virtual void g();
+};
+
+struct C : A, B {
+ virtual void g();
+};
+
+struct D {
+ virtual B* foo();
+ virtual void z();
+};
+
+struct E : D {
+ virtual C* foo();
+};
+
+struct F : C { };
+
+struct X : E {
+ virtual F* foo();
+ // CHECK-LABEL: VFTable for 'test2::D' in 'test2::E' in 'test2::X' (4 entries).
+ // CHECK-NEXT: 0 | test2::F *test2::X::foo()
+ // CHECK-NEXT: [return adjustment (to type 'struct test2::B *'): 4 non-virtual]
+ // CHECK-NEXT: 1 | void test2::D::z()
+ // CHECK-NEXT: 2 | test2::F *test2::X::foo()
+ // CHECK-NEXT: [return adjustment (to type 'struct test2::C *'): 0 non-virtual]
+ // CHECK-NEXT: 3 | test2::F *test2::X::foo()
+
+ // CHECK-LABEL: Thunks for 'test2::F *test2::X::foo()' (2 entries).
+ // CHECK-NEXT: 0 | [return adjustment (to type 'struct test2::C *'): 0 non-virtual]
+ // CHECK-NEXT: 1 | [return adjustment (to type 'struct test2::B *'): 4 non-virtual]
+
+ // CHECK-LABEL: VFTable indices for 'test2::X' (1 entry).
+ // CHECK-NEXT: 3 | test2::F *test2::X::foo()
+};
+
+void build_vftable(X *obj) { obj->foo(); }
+}
+
+namespace test3 {
+struct A {
+ virtual void g();
+ virtual void h();
+};
+
+struct B {
+ virtual void g();
+};
+
+struct C : A, B {
+ virtual void g();
+};
+
+struct D {
+ virtual B* foo();
+ virtual void z();
+};
+
+struct E : D {
+ virtual C* foo();
+};
+
+struct F : A, C { };
+
+struct X : E {
+ // CHECK-LABEL: VFTable for 'test3::D' in 'test3::E' in 'test3::X' (4 entries).
+ // CHECK-NEXT: 0 | test3::F *test3::X::foo()
+ // CHECK-NEXT: [return adjustment (to type 'struct test3::B *'): 8 non-virtual]
+ // CHECK-NEXT: 1 | void test3::D::z()
+ // CHECK-NEXT: 2 | test3::F *test3::X::foo()
+ // CHECK-NEXT: [return adjustment (to type 'struct test3::C *'): 4 non-virtual]
+ // CHECK-NEXT: 3 | test3::F *test3::X::foo()
+
+ // CHECK-LABEL: Thunks for 'test3::F *test3::X::foo()' (2 entries).
+ // CHECK-NEXT: 0 | [return adjustment (to type 'struct test3::C *'): 4 non-virtual]
+ // CHECK-NEXT: 1 | [return adjustment (to type 'struct test3::B *'): 8 non-virtual]
+
+ // CHECK-LABEL: VFTable indices for 'test3::X' (1 entry).
+ // CHECK-NEXT: 3 | test3::F *test3::X::foo()
+
+ virtual F* foo();
+};
+
+void build_vftable(X *obj) { obj->foo(); }
+}
+
+namespace test4 {
+struct A {
+ virtual void g();
+ virtual void h();
+};
+
+struct B {
+ virtual void g();
+};
+
+struct C : A, B {
+ virtual void g();
+};
+
+struct D {
+ virtual B* foo();
+ virtual void z();
+};
+
+struct E : D {
+ virtual C* foo();
+};
+
+struct F : A, C { };
+
+struct X : D, E {
+ // CHECK-LABEL: VFTable for 'test4::D' in 'test4::X' (3 entries).
+ // CHECK-NEXT: 0 | test4::F *test4::X::foo()
+ // CHECK-NEXT: [return adjustment (to type 'struct test4::B *'): 8 non-virtual]
+ // CHECK-NEXT: 1 | void test4::D::z()
+ // CHECK-NEXT: 2 | test4::F *test4::X::foo()
+
+ // CHECK-LABEL: Thunks for 'test4::F *test4::X::foo()' (1 entry).
+ // CHECK-NEXT: 0 | [return adjustment (to type 'struct test4::B *'): 8 non-virtual]
+
+ // CHECK-LABEL: VFTable for 'test4::D' in 'test4::E' in 'test4::X' (4 entries).
+ // CHECK-NEXT: 0 | test4::F *test4::X::foo()
+ // CHECK-NEXT: [return adjustment (to type 'struct test4::B *'): 8 non-virtual]
+ // CHECK-NEXT: [this adjustment: -4 non-virtual]
+ // CHECK-NEXT: 1 | void test4::D::z()
+ // CHECK-NEXT: 2 | test4::F *test4::X::foo()
+ // CHECK-NEXT: [return adjustment (to type 'struct test4::C *'): 4 non-virtual]
+ // CHECK-NEXT: [this adjustment: -4 non-virtual]
+ // CHECK-NEXT: 3 | test4::F *test4::X::foo()
+ // CHECK-NEXT: [return adjustment (to type 'struct test4::F *'): 0 non-virtual]
+ // CHECK-NEXT: [this adjustment: -4 non-virtual]
+
+ // CHECK-LABEL: Thunks for 'test4::F *test4::X::foo()' (3 entries).
+ // CHECK-NEXT: 0 | [return adjustment (to type 'struct test4::F *'): 0 non-virtual]
+ // CHECK-NEXT: [this adjustment: -4 non-virtual]
+ // CHECK-NEXT: 1 | [return adjustment (to type 'struct test4::C *'): 4 non-virtual]
+ // CHECK-NEXT: [this adjustment: -4 non-virtual]
+ // CHECK-NEXT: 2 | [return adjustment (to type 'struct test4::B *'): 8 non-virtual]
+ // CHECK-NEXT: [this adjustment: -4 non-virtual]
+
+ // CHECK-LABEL: VFTable indices for 'test4::X' (1 entry).
+ // CHECK-NEXT: 2 | test4::F *test4::X::foo()
+
+ virtual F* foo();
+};
+
+void build_vftable(X *obj) { obj->foo(); }
+}
+
+namespace test5 {
+struct A {
+ virtual void g();
+ virtual void h();
+};
+
+struct B {
+ virtual void g();
+};
+
+struct C : A, B {
+ virtual void g();
+};
+
+struct D {
+ virtual B* foo();
+ virtual void z();
+};
+
+struct X : A, D {
+ // CHECK-LABEL: VFTable for 'test5::A' in 'test5::X' (2 entries).
+ // CHECK-NEXT: 0 | void test5::A::g()
+ // CHECK-NEXT: 1 | void test5::A::h()
+
+ // CHECK-LABEL: VFTable for 'test5::D' in 'test5::X' (3 entries).
+ // CHECK-NEXT: 0 | test5::C *test5::X::foo()
+ // CHECK-NEXT: [return adjustment (to type 'struct test5::B *'): 4 non-virtual]
+ // CHECK-NEXT: 1 | void test5::D::z()
+ // CHECK-NEXT: 2 | test5::C *test5::X::foo()
+
+ // CHECK-LABEL: Thunks for 'test5::C *test5::X::foo()' (1 entry).
+ // CHECK-NEXT: 0 | [return adjustment (to type 'struct test5::B *'): 4 non-virtual]
+
+ // CHECK-LABEL: VFTable indices for 'test5::X' (1 entry).
+ // CHECK-NEXT: via vfptr at offset 4
+ // CHECK-NEXT: 2 | test5::C *test5::X::foo()
+
+ virtual C* foo();
+};
+
+void build_vftable(X *obj) { obj->foo(); }
+}
+
+namespace test6 {
+struct A {
+ virtual void g();
+ virtual void h();
+};
+
+struct B {
+ virtual void g();
+};
+
+struct C : A, B {
+ virtual void g();
+};
+
+struct D {
+ virtual B* foo();
+ virtual void z();
+};
+
+struct E : A, D {
+ virtual C* foo();
+};
+
+struct F : A, C { };
+
+struct X : E {
+ // CHECK-LABEL: VFTable for 'test6::A' in 'test6::E' in 'test6::X' (2 entries).
+ // CHECK-NEXT: 0 | void test6::A::g()
+ // CHECK-NEXT: 1 | void test6::A::h()
+
+ // CHECK-LABEL: VFTable for 'test6::D' in 'test6::E' in 'test6::X' (4 entries).
+ // CHECK-NEXT: 0 | test6::F *test6::X::foo()
+ // CHECK-NEXT: [return adjustment (to type 'struct test6::B *'): 8 non-virtual]
+ // CHECK-NEXT: 1 | void test6::D::z()
+ // CHECK-NEXT: 2 | test6::F *test6::X::foo()
+ // CHECK-NEXT: [return adjustment (to type 'struct test6::C *'): 4 non-virtual]
+ // CHECK-NEXT: 3 | test6::F *test6::X::foo()
+
+ // CHECK-LABEL: Thunks for 'test6::F *test6::X::foo()' (2 entries).
+ // CHECK-NEXT: 0 | [return adjustment (to type 'struct test6::C *'): 4 non-virtual]
+ // CHECK-NEXT: 1 | [return adjustment (to type 'struct test6::B *'): 8 non-virtual]
+
+ // CHECK-LABEL: VFTable indices for 'test6::X' (1 entry).
+ // CHECK-NEXT: -- accessible via vfptr at offset 4 --
+ // CHECK-NEXT: 3 | test6::F *test6::X::foo()
+
+ virtual F* foo();
+};
+
+void build_vftable(X *obj) { obj->foo(); }
+}
diff --git a/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-this-adjustment.cpp b/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-this-adjustment.cpp
new file mode 100644
index 000000000000..957980aa95ec
--- /dev/null
+++ b/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-this-adjustment.cpp
@@ -0,0 +1,140 @@
+// RUN: %clang_cc1 %s -fno-rtti -triple=i386-pc-win32 -emit-llvm -o %t.ll -fdump-vtable-layouts >%t
+// RUN: FileCheck %s < %t
+// RUN: FileCheck --check-prefix=MANGLING %s < %t.ll
+
+namespace test1 {
+struct A {
+ virtual void g();
+ // Add an extra virtual method so it's easier to check for the absence of thunks.
+ virtual void h();
+};
+
+struct B {
+ virtual void g(); // Collides with A::g if both are bases of some class.
+};
+
+// Overrides methods of two bases at the same time, thus needing thunks.
+struct X : A, B {
+ // CHECK-LABEL: VFTable for 'test1::A' in 'test1::X' (2 entries).
+ // CHECK-NEXT: 0 | void test1::X::g()
+ // CHECK-NEXT: 1 | void test1::A::h()
+
+ // CHECK-LABEL: VFTable for 'test1::B' in 'test1::X' (1 entry).
+ // CHECK-NEXT: 0 | void test1::X::g()
+ // CHECK-NEXT: [this adjustment: -4 non-virtual]
+
+ // CHECK-LABEL: Thunks for 'void test1::X::g()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: -4 non-virtual]
+
+ // CHECK-LABEL: VFTable indices for 'test1::X' (1 entry).
+ // CHECK-NEXT: 0 | void test1::X::g()
+
+ // MANGLING-DAG: @"\01??_7X@test1@@6BA@1@@"
+ // MANGLING-DAG: @"\01??_7X@test1@@6BB@1@@"
+
+ virtual void g();
+} x;
+
+void build_vftable(X *obj) { obj->g(); }
+}
+
+namespace test2 {
+struct A {
+ virtual void f();
+};
+
+struct B {
+ virtual void g();
+ virtual void h();
+};
+
+struct C {
+ virtual void g();
+};
+
+struct X : A, B, C {
+ // CHECK-LABEL: VFTable for 'test2::A' in 'test2::X' (1 entry).
+ // CHECK-NEXT: 0 | void test2::A::f()
+
+ // CHECK-LABEL: VFTable for 'test2::B' in 'test2::X' (2 entries).
+ // CHECK-NEXT: 0 | void test2::X::g()
+ // CHECK-NEXT: 1 | void test2::B::h()
+
+ // CHECK-LABEL: VFTable for 'test2::C' in 'test2::X' (1 entry).
+ // CHECK-NEXT: 0 | void test2::X::g()
+ // CHECK-NEXT: [this adjustment: -4 non-virtual]
+
+ // CHECK-LABEL: Thunks for 'void test2::X::g()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: -4 non-virtual]
+
+ // CHECK-LABEL: VFTable indices for 'test2::X' (1 entry).
+ // CHECK-NEXT: via vfptr at offset 4
+ // CHECK-NEXT: 0 | void test2::X::g()
+
+ // MANGLING-DAG: @"\01??_7X@test2@@6BA@1@@"
+ // MANGLING-DAG: @"\01??_7X@test2@@6BB@1@@"
+ // MANGLING-DAG: @"\01??_7X@test2@@6BC@1@@"
+
+ virtual void g();
+} x;
+
+void build_vftable(X *obj) { obj->g(); }
+}
+
+namespace test3 {
+struct A {
+ virtual void f();
+};
+
+struct B {
+ virtual void g();
+ virtual void h();
+};
+
+struct C: A, B {
+ // Overrides only the left child's method (A::f), needs no thunks.
+ virtual void f();
+};
+
+struct D: A, B {
+ // Overrides only the right child's method (B::g),
+ // needs this adjustment but not thunks.
+ virtual void g();
+};
+
+// Overrides methods of two bases at the same time, thus needing thunks.
+struct X: C, D {
+ // CHECK-LABEL: VFTable for 'test3::A' in 'test3::C' in 'test3::X' (1 entry).
+ // CHECK-NEXT: 0 | void test3::X::f()
+
+ // CHECK-LABEL: VFTable for 'test3::B' in 'test3::C' in 'test3::X' (2 entries).
+ // CHECK-NEXT: 0 | void test3::X::g()
+ // CHECK-NEXT: 1 | void test3::B::h()
+
+ // CHECK-LABEL: VFTable for 'test3::A' in 'test3::D' in 'test3::X' (1 entry).
+ // CHECK-NEXT: 0 | void test3::X::f()
+ // CHECK-NEXT: [this adjustment: -8 non-virtual]
+
+ // CHECK-LABEL: Thunks for 'void test3::X::f()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: -8 non-virtual]
+
+ // CHECK-LABEL: VFTable for 'test3::B' in 'test3::D' in 'test3::X' (2 entries).
+ // CHECK-NEXT: 0 | void test3::X::g()
+ // CHECK-NEXT: [this adjustment: -8 non-virtual]
+ // CHECK-NEXT: 1 | void test3::B::h()
+
+ // CHECK-LABEL: Thunks for 'void test3::X::g()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: -8 non-virtual]
+
+ // CHECK-LABEL: VFTable indices for 'test3::X' (2 entries).
+ // CHECK-NEXT: via vfptr at offset 0
+ // CHECK-NEXT: 0 | void test3::X::f()
+ // CHECK-NEXT: via vfptr at offset 4
+ // CHECK-NEXT: 0 | void test3::X::g()
+
+ virtual void f();
+ virtual void g();
+} x;
+
+void build_vftable(X *obj) { obj->g(); }
+}
diff --git a/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-vdtors.cpp b/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-vdtors.cpp
new file mode 100644
index 000000000000..a407766f8ed9
--- /dev/null
+++ b/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-vdtors.cpp
@@ -0,0 +1,94 @@
+// RUN: %clang_cc1 %s -fno-rtti -triple=i386-pc-win32 -emit-llvm -o %t.ll -fdump-vtable-layouts >%t
+// RUN: FileCheck %s < %t
+
+struct A {
+ virtual ~A();
+ virtual void z1();
+};
+
+struct B {
+ virtual ~B();
+};
+
+struct C : A, B {
+ // CHECK-LABEL: VFTable for 'A' in 'C' (2 entries).
+ // CHECK-NEXT: 0 | C::~C() [scalar deleting]
+ // CHECK-NEXT: 1 | void A::z1()
+
+ // CHECK-LABEL: VFTable for 'B' in 'C' (1 entry).
+ // CHECK-NEXT: 0 | C::~C() [scalar deleting]
+ // CHECK-NEXT: [this adjustment: -4 non-virtual]
+
+ // CHECK-LABEL: Thunks for 'C::~C()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: -4 non-virtual]
+
+ // CHECK-LABEL: VFTable indices for 'C' (1 entry).
+ // CHECK-NEXT: 0 | C::~C() [scalar deleting]
+ virtual ~C();
+};
+
+void build_vftable(C *obj) { delete obj; }
+
+struct D {
+ // No virtual destructor here!
+ virtual void z4();
+};
+
+struct E : D, B {
+ // Implicit virtual dtor here!
+
+ // CHECK-LABEL: VFTable for 'D' in 'E' (1 entry).
+ // CHECK-NEXT: 0 | void D::z4()
+
+ // CHECK-LABEL: VFTable for 'B' in 'E' (1 entry).
+ // CHECK-NEXT: 0 | E::~E() [scalar deleting]
+ // CHECK-NEXT: [this adjustment: -4 non-virtual]
+
+ // CHECK-LABEL: Thunks for 'E::~E()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: -4 non-virtual]
+
+ // CHECK-LABEL: VFTable indices for 'E' (1 entry).
+ // CHECK-NEXT: -- accessible via vfptr at offset 4 --
+ // CHECK-NEXT: 0 | E::~E() [scalar deleting]
+};
+
+void build_vftable(E *obj) { delete obj; }
+
+struct F : D, B {
+ // Implicit virtual dtor here!
+
+ // CHECK-LABEL: VFTable for 'D' in 'F' (1 entry).
+ // CHECK-NEXT: 0 | void D::z4()
+
+ // CHECK-LABEL: VFTable for 'B' in 'F' (1 entry).
+ // CHECK-NEXT: 0 | F::~F() [scalar deleting]
+ // CHECK-NEXT: [this adjustment: -4 non-virtual]
+
+ // CHECK-LABEL: Thunks for 'F::~F()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: -4 non-virtual]
+
+ // CHECK-LABEL: VFTable indices for 'F' (1 entry).
+ // CHECK-NEXT: -- accessible via vfptr at offset 4 --
+ // CHECK-NEXT: 0 | F::~F() [scalar deleting]
+};
+
+void build_vftable(F *obj) { delete obj; }
+
+struct G : F {
+ // CHECK-LABEL: VFTable for 'D' in 'F' in 'G' (1 entry).
+ // CHECK-NEXT: 0 | void D::z4()
+
+ // CHECK-LABEL: VFTable for 'B' in 'F' in 'G' (1 entry).
+ // CHECK-NEXT: 0 | G::~G() [scalar deleting]
+ // CHECK-NEXT: [this adjustment: -4 non-virtual]
+
+ // CHECK-LABEL: Thunks for 'G::~G()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: -4 non-virtual]
+
+ // CHECK-LABEL: VFTable indices for 'G' (1 entry).
+ // CHECK-NEXT: -- accessible via vfptr at offset 4 --
+ // CHECK-NEXT: 0 | G::~G() [scalar deleting]
+ virtual ~G();
+};
+
+void build_vftable(G *obj) { delete obj; }
diff --git a/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance.cpp b/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance.cpp
deleted file mode 100644
index d93dee11cdee..000000000000
--- a/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance.cpp
+++ /dev/null
@@ -1,579 +0,0 @@
-// RUN: %clang_cc1 %s -fno-rtti -cxx-abi microsoft -triple=i386-pc-win32 -emit-llvm -o %t.ll -fdump-vtable-layouts >%t
-
-// RUN: FileCheck --check-prefix=NO-THUNKS-Test1 %s < %t
-// RUN: FileCheck --check-prefix=NO-THUNKS-Test2 %s < %t
-// RUN: FileCheck --check-prefix=NO-THUNKS-Test3 %s < %t
-// RUN: FileCheck --check-prefix=NO-THUNKS-Test4 %s < %t
-// RUN: FileCheck --check-prefix=NO-THUNKS-Test5 %s < %t
-// RUN: FileCheck --check-prefix=NO-THUNKS-Test6 %s < %t
-// RUN: FileCheck --check-prefix=NO-THUNKS-Test7 %s < %t
-// RUN: FileCheck --check-prefix=NO-THUNKS-Test8 %s < %t
-// RUN: FileCheck --check-prefix=NO-THUNKS-Test9 %s < %t
-// RUN: FileCheck --check-prefix=PURE-VIRTUAL-Test1 %s < %t
-// RUN: FileCheck --check-prefix=THIS-THUNKS-Test1 %s < %t
-// RUN: FileCheck --check-prefix=THIS-THUNKS-Test2 %s < %t
-// RUN: FileCheck --check-prefix=THIS-THUNKS-Test3 %s < %t
-// RUN: FileCheck --check-prefix=VDTOR-THUNKS-Test3 %s < %t
-// RUN: FileCheck --check-prefix=VDTOR-THUNKS-Test5 %s < %t
-// RUN: FileCheck --check-prefix=VDTOR-THUNKS-Test6 %s < %t
-// RUN: FileCheck --check-prefix=VDTOR-THUNKS-Test7 %s < %t
-// RUN: FileCheck --check-prefix=RET-THUNKS-Test1 %s < %t
-// RUN: FileCheck --check-prefix=RET-THUNKS-Test2 %s < %t
-// RUN: FileCheck --check-prefix=RET-THUNKS-Test3 %s < %t
-// RUN: FileCheck --check-prefix=RET-THUNKS-Test4 %s < %t
-// RUN: FileCheck --check-prefix=RET-THUNKS-Test5 %s < %t
-// RUN: FileCheck --check-prefix=RET-THUNKS-Test6 %s < %t
-
-// RUN: FileCheck --check-prefix=MANGLING %s < %t.ll
-
-struct Empty {
- // Doesn't have a vftable!
-};
-
-struct A {
- virtual void f();
-};
-
-struct B {
- virtual void g();
- // Add an extra virtual method so it's easier to check for the absence of thunks.
- virtual void h();
-};
-
-struct C {
- virtual void g(); // Might "collide" with B::g if both are bases of some class.
-};
-
-
-namespace no_thunks {
-
-struct Test1: A, B {
- // NO-THUNKS-Test1: VFTable for 'A' in 'no_thunks::Test1' (1 entries)
- // NO-THUNKS-Test1-NEXT: 0 | void no_thunks::Test1::f()
-
- // NO-THUNKS-Test1: VFTable for 'B' in 'no_thunks::Test1' (2 entries)
- // NO-THUNKS-Test1-NEXT: 0 | void B::g()
- // NO-THUNKS-Test1-NEXT: 1 | void B::h()
-
- // NO-THUNKS-Test1: VFTable indices for 'no_thunks::Test1' (1 entries)
- // NO-THUNKS-Test1-NEXT: 0 | void no_thunks::Test1::f()
-
- // MANGLING-DAG: @"\01??_7Test1@no_thunks@@6BA@@@"
- // MANGLING-DAG: @"\01??_7Test1@no_thunks@@6BB@@@"
-
- // Overrides only the left child's method (A::f), needs no thunks.
- virtual void f();
-};
-
-Test1 t1;
-
-struct Test2: A, B {
- // NO-THUNKS-Test2: VFTable for 'A' in 'no_thunks::Test2' (1 entries)
- // NO-THUNKS-Test2-NEXT: 0 | void A::f()
-
- // NO-THUNKS-Test2: VFTable for 'B' in 'no_thunks::Test2' (2 entries)
- // NO-THUNKS-Test2-NEXT: 0 | void no_thunks::Test2::g()
- // NO-THUNKS-Test2-NEXT: 1 | void B::h()
-
- // NO-THUNKS-Test2: VFTable indices for 'no_thunks::Test2' (1 entries).
- // NO-THUNKS-Test2-NEXT: via vfptr at offset 4
- // NO-THUNKS-Test2-NEXT: 0 | void no_thunks::Test2::g()
-
- // Overrides only the right child's method (B::g), needs this adjustment but
- // not thunks.
- virtual void g();
-};
-
-Test2 t2;
-
-struct Test3: A, B {
- // NO-THUNKS-Test3: VFTable for 'A' in 'no_thunks::Test3' (2 entries)
- // NO-THUNKS-Test3-NEXT: 0 | void A::f()
- // NO-THUNKS-Test3-NEXT: 1 | void no_thunks::Test3::i()
-
- // NO-THUNKS-Test3: VFTable for 'B' in 'no_thunks::Test3' (2 entries)
- // NO-THUNKS-Test3-NEXT: 0 | void B::g()
- // NO-THUNKS-Test3-NEXT: 1 | void B::h()
-
- // NO-THUNKS-Test3: VFTable indices for 'no_thunks::Test3' (1 entries).
- // NO-THUNKS-Test3-NEXT: 1 | void no_thunks::Test3::i()
-
- // Only adds a new method.
- virtual void i();
-};
-
-Test3 t3;
-
-// Only the right base has a vftable, so it's laid out before the left one!
-struct Test4 : Empty, A {
- // NO-THUNKS-Test4: VFTable for 'A' in 'no_thunks::Test4' (1 entries)
- // NO-THUNKS-Test4-NEXT: 0 | void no_thunks::Test4::f()
-
- // NO-THUNKS-Test4: VFTable indices for 'no_thunks::Test4' (1 entries).
- // NO-THUNKS-Test4-NEXT: 0 | void no_thunks::Test4::f()
-
- // MANGLING-DAG: @"\01??_7Test4@no_thunks@@6B@"
-
- virtual void f();
-};
-
-Test4 t4;
-
-// 2-level structure with repeating subobject types, but no thunks needed.
-struct Test5: Test1, Test2 {
- // NO-THUNKS-Test5: VFTable for 'A' in 'no_thunks::Test1' in 'no_thunks::Test5' (2 entries)
- // NO-THUNKS-Test5-NEXT: 0 | void no_thunks::Test1::f()
- // NO-THUNKS-Test5-NEXT: 1 | void no_thunks::Test5::z()
-
- // NO-THUNKS-Test5: VFTable for 'B' in 'no_thunks::Test1' in 'no_thunks::Test5' (2 entries)
- // NO-THUNKS-Test5-NEXT: 0 | void B::g()
- // NO-THUNKS-Test5-NEXT: 1 | void B::h()
-
- // NO-THUNKS-Test5: VFTable for 'A' in 'no_thunks::Test2' in 'no_thunks::Test5' (1 entries)
- // NO-THUNKS-Test5-NEXT: 0 | void A::f()
-
- // NO-THUNKS-Test5: VFTable for 'B' in 'no_thunks::Test2' in 'no_thunks::Test5' (2 entries)
- // NO-THUNKS-Test5-NEXT: 0 | void no_thunks::Test2::g()
- // NO-THUNKS-Test5-NEXT: 1 | void B::h()
-
- // NO-THUNKS-Test5: VFTable indices for 'no_thunks::Test5' (1 entries).
- // NO-THUNKS-Test5-NEXT: 1 | void no_thunks::Test5::z()
-
- // MANGLING-DAG: @"\01??_7Test5@no_thunks@@6BA@@Test1@1@@"
- // MANGLING-DAG: @"\01??_7Test5@no_thunks@@6BA@@Test2@1@@"
- // MANGLING-DAG: @"\01??_7Test5@no_thunks@@6BB@@Test1@1@@"
- // MANGLING-DAG: @"\01??_7Test5@no_thunks@@6BB@@Test2@1@@"
-
- virtual void z();
-};
-
-Test5 t5;
-
-struct Test6: Test1 {
- // NO-THUNKS-Test6: VFTable for 'A' in 'no_thunks::Test1' in 'no_thunks::Test6' (1 entries).
- // NO-THUNKS-Test6-NEXT: 0 | void no_thunks::Test6::f()
-
- // NO-THUNKS-Test6: VFTable for 'B' in 'no_thunks::Test1' in 'no_thunks::Test6' (2 entries).
- // NO-THUNKS-Test6-NEXT: 0 | void B::g()
- // NO-THUNKS-Test6-NEXT: 1 | void B::h()
-
- // NO-THUNKS-Test6: VFTable indices for 'no_thunks::Test6' (1 entries).
- // NO-THUNKS-Test6-NEXT: 0 | void no_thunks::Test6::f()
-
- // MANGLING-DAG: @"\01??_7Test6@no_thunks@@6BA@@@"
- // MANGLING-DAG: @"\01??_7Test6@no_thunks@@6BB@@@"
-
- // Overrides both no_thunks::Test1::f and A::f.
- virtual void f();
-};
-
-Test6 t6;
-
-struct Test7: Test2 {
- // NO-THUNKS-Test7: VFTable for 'A' in 'no_thunks::Test2' in 'no_thunks::Test7' (1 entries).
- // NO-THUNKS-Test7-NEXT: 0 | void A::f()
-
- // NO-THUNKS-Test7: VFTable for 'B' in 'no_thunks::Test2' in 'no_thunks::Test7' (2 entries).
- // NO-THUNKS-Test7-NEXT: 0 | void no_thunks::Test7::g()
- // NO-THUNKS-Test7-NEXT: 1 | void B::h()
-
- // NO-THUNKS-Test7: VFTable indices for 'no_thunks::Test7' (1 entries).
- // NO-THUNKS-Test7-NEXT: via vfptr at offset 4
- // NO-THUNKS-Test7-NEXT: 0 | void no_thunks::Test7::g()
-
- // Overrides both no_thunks::Test2::g and B::g.
- virtual void g();
-};
-
-Test7 t7;
-
-struct Test8: Test3 {
- // NO-THUNKS-Test8: VFTable for 'A' in 'no_thunks::Test3' in 'no_thunks::Test8' (2 entries).
- // NO-THUNKS-Test8-NEXT: 0 | void A::f()
- // NO-THUNKS-Test8-NEXT: 1 | void no_thunks::Test3::i()
-
- // NO-THUNKS-Test8: VFTable for 'B' in 'no_thunks::Test3' in 'no_thunks::Test8' (2 entries).
- // NO-THUNKS-Test8-NEXT: 0 | void no_thunks::Test8::g()
- // NO-THUNKS-Test8-NEXT: 1 | void B::h()
-
- // NO-THUNKS-Test8: VFTable indices for 'no_thunks::Test8' (1 entries).
- // NO-THUNKS-Test8-NEXT: via vfptr at offset 4
- // NO-THUNKS-Test8-NEXT: 0 | void no_thunks::Test8::g()
-
- // Overrides grandparent's B::g.
- virtual void g();
-};
-
-Test8 t8;
-
-struct D : A {
- virtual void g();
-};
-
-// Repeating subobject.
-struct Test9: A, D {
- // NO-THUNKS-Test9: VFTable for 'A' in 'no_thunks::Test9' (2 entries).
- // NO-THUNKS-Test9-NEXT: 0 | void A::f()
- // NO-THUNKS-Test9-NEXT: 1 | void no_thunks::Test9::h()
-
- // NO-THUNKS-Test9: VFTable for 'A' in 'no_thunks::D' in 'no_thunks::Test9' (2 entries).
- // NO-THUNKS-Test9-NEXT: 0 | void A::f()
- // NO-THUNKS-Test9-NEXT: 1 | void no_thunks::D::g()
-
- // NO-THUNKS-Test9: VFTable indices for 'no_thunks::Test9' (1 entries).
- // NO-THUNKS-Test9-NEXT: 1 | void no_thunks::Test9::h()
-
- // MANGLING-DAG: @"\01??_7Test9@no_thunks@@6BA@@@"
- // MANGLING-DAG: @"\01??_7Test9@no_thunks@@6BD@1@@"
-
- virtual void h();
-};
-
-Test9 t9;
-}
-
-namespace pure_virtual {
-struct D {
- virtual void g() = 0;
- virtual void h();
-};
-
-
-struct Test1: A, D {
- // PURE-VIRTUAL-Test1: VFTable for 'A' in 'pure_virtual::Test1' (1 entries)
- // PURE-VIRTUAL-Test1-NEXT: 0 | void A::f()
-
- // PURE-VIRTUAL-Test1: VFTable for 'pure_virtual::D' in 'pure_virtual::Test1' (2 entries)
- // PURE-VIRTUAL-Test1-NEXT: 0 | void pure_virtual::Test1::g()
- // PURE-VIRTUAL-Test1-NEXT: 1 | void pure_virtual::D::h()
-
- // PURE-VIRTUAL-Test1: VFTable indices for 'pure_virtual::Test1' (1 entries).
- // PURE-VIRTUAL-Test1-NEXT: via vfptr at offset 4
- // PURE-VIRTUAL-Test1-NEXT: 0 | void pure_virtual::Test1::g()
-
- // MANGLING-DAG: @"\01??_7Test1@pure_virtual@@6BA@@@"
- // MANGLING-DAG: @"\01??_7Test1@pure_virtual@@6BD@1@@"
-
- // Overrides only the right child's method (pure_virtual::D::g), needs this adjustment but
- // not thunks.
- virtual void g();
-};
-
-Test1 t1;
-}
-
-namespace this_adjustment {
-
-// Overrides methods of two bases at the same time, thus needing thunks.
-struct Test1 : B, C {
- // THIS-THUNKS-Test1: VFTable for 'B' in 'this_adjustment::Test1' (2 entries).
- // THIS-THUNKS-Test1-NEXT: 0 | void this_adjustment::Test1::g()
- // THIS-THUNKS-Test1-NEXT: 1 | void B::h()
-
- // THIS-THUNKS-Test1: VFTable for 'C' in 'this_adjustment::Test1' (1 entries).
- // THIS-THUNKS-Test1-NEXT: 0 | void this_adjustment::Test1::g()
- // THIS-THUNKS-Test1-NEXT: [this adjustment: -4 non-virtual]
-
- // THIS-THUNKS-Test1: Thunks for 'void this_adjustment::Test1::g()' (1 entry).
- // THIS-THUNKS-Test1-NEXT: 0 | [this adjustment: -4 non-virtual]
-
- // THIS-THUNKS-Test1: VFTable indices for 'this_adjustment::Test1' (1 entries).
- // THIS-THUNKS-Test1-NEXT: 0 | void this_adjustment::Test1::g()
-
- // MANGLING-DAG: @"\01??_7Test1@this_adjustment@@6BB@@@"
- // MANGLING-DAG: @"\01??_7Test1@this_adjustment@@6BC@@@"
-
- virtual void g();
-};
-
-Test1 t1;
-
-struct Test2 : A, B, C {
- // THIS-THUNKS-Test2: VFTable for 'A' in 'this_adjustment::Test2' (1 entries).
- // THIS-THUNKS-Test2-NEXT: 0 | void A::f()
-
- // THIS-THUNKS-Test2: VFTable for 'B' in 'this_adjustment::Test2' (2 entries).
- // THIS-THUNKS-Test2-NEXT: 0 | void this_adjustment::Test2::g()
- // THIS-THUNKS-Test2-NEXT: 1 | void B::h()
-
- // THIS-THUNKS-Test2: VFTable for 'C' in 'this_adjustment::Test2' (1 entries).
- // THIS-THUNKS-Test2-NEXT: 0 | void this_adjustment::Test2::g()
- // THIS-THUNKS-Test2-NEXT: [this adjustment: -4 non-virtual]
-
- // THIS-THUNKS-Test2: Thunks for 'void this_adjustment::Test2::g()' (1 entry).
- // THIS-THUNKS-Test2-NEXT: 0 | [this adjustment: -4 non-virtual]
-
- // THIS-THUNKS-Test2: VFTable indices for 'this_adjustment::Test2' (1 entries).
- // THIS-THUNKS-Test2-NEXT: via vfptr at offset 4
- // THIS-THUNKS-Test2-NEXT: 0 | void this_adjustment::Test2::g()
-
- // MANGLING-DAG: @"\01??_7Test2@this_adjustment@@6BA@@@"
- // MANGLING-DAG: @"\01??_7Test2@this_adjustment@@6BB@@@"
- // MANGLING-DAG: @"\01??_7Test2@this_adjustment@@6BC@@@"
-
- virtual void g();
-};
-
-Test2 t2;
-
-// Overrides methods of two bases at the same time, thus needing thunks.
-struct Test3: no_thunks::Test1, no_thunks::Test2 {
- // THIS-THUNKS-Test3: VFTable for 'A' in 'no_thunks::Test1' in 'this_adjustment::Test3' (1 entries).
- // THIS-THUNKS-Test3-NEXT: 0 | void this_adjustment::Test3::f()
-
- // THIS-THUNKS-Test3: VFTable for 'B' in 'no_thunks::Test1' in 'this_adjustment::Test3' (2 entries).
- // THIS-THUNKS-Test3-NEXT: 0 | void this_adjustment::Test3::g()
- // THIS-THUNKS-Test3-NEXT: 1 | void B::h()
-
- // THIS-THUNKS-Test3: VFTable for 'A' in 'no_thunks::Test2' in 'this_adjustment::Test3' (1 entries).
- // THIS-THUNKS-Test3-NEXT: 0 | void this_adjustment::Test3::f()
- // THIS-THUNKS-Test3-NEXT: [this adjustment: -8 non-virtual]
-
- // THIS-THUNKS-Test3: Thunks for 'void this_adjustment::Test3::f()' (1 entry).
- // THIS-THUNKS-Test3-NEXT: 0 | [this adjustment: -8 non-virtual]
-
- // THIS-THUNKS-Test3: VFTable for 'B' in 'no_thunks::Test2' in 'this_adjustment::Test3' (2 entries).
- // THIS-THUNKS-Test3-NEXT: 0 | void this_adjustment::Test3::g()
- // THIS-THUNKS-Test3-NEXT: [this adjustment: -8 non-virtual]
- // THIS-THUNKS-Test3-NEXT: 1 | void B::h()
-
- // THIS-THUNKS-Test3: Thunks for 'void this_adjustment::Test3::g()' (1 entry).
- // THIS-THUNKS-Test3-NEXT: 0 | [this adjustment: -8 non-virtual]
-
- // THIS-THUNKS-Test3: VFTable indices for 'this_adjustment::Test3' (2 entries).
- // THIS-THUNKS-Test3-NEXT: via vfptr at offset 0
- // THIS-THUNKS-Test3-NEXT: 0 | void this_adjustment::Test3::f()
- // THIS-THUNKS-Test3-NEXT: via vfptr at offset 4
- // THIS-THUNKS-Test3-NEXT: 0 | void this_adjustment::Test3::g()
-
- virtual void f();
- virtual void g();
-};
-
-Test3 t3;
-}
-
-namespace vdtor {
-struct Test1 {
- virtual ~Test1();
- virtual void z1();
-};
-
-struct Test2 {
- virtual ~Test2();
-};
-
-struct Test3 : Test1, Test2 {
- // VDTOR-THUNKS-Test3: VFTable for 'vdtor::Test1' in 'vdtor::Test3' (2 entries).
- // VDTOR-THUNKS-Test3-NEXT: 0 | vdtor::Test3::~Test3() [scalar deleting]
- // VDTOR-THUNKS-Test3-NEXT: 1 | void vdtor::Test1::z1()
-
- // VDTOR-THUNKS-Test3: VFTable for 'vdtor::Test2' in 'vdtor::Test3' (1 entries).
- // VDTOR-THUNKS-Test3-NEXT: 0 | vdtor::Test3::~Test3() [scalar deleting]
- // VDTOR-THUNKS-Test3-NEXT: [this adjustment: -4 non-virtual]
-
- // VDTOR-THUNKS-Test3: Thunks for 'vdtor::Test3::~Test3()' (1 entry).
- // VDTOR-THUNKS-Test3-NEXT: 0 | [this adjustment: -4 non-virtual]
-
- // VDTOR-THUNKS-Test3: VFTable indices for 'vdtor::Test3' (1 entries).
- // VDTOR-THUNKS-Test3-NEXT: 0 | vdtor::Test3::~Test3() [scalar deleting]
- virtual ~Test3();
-};
-
-Test3 t3;
-
-struct Test4 {
- // No virtual destructor here!
- virtual void z4();
-};
-
-struct Test5 : Test4, Test2 {
- // Implicit virtual dtor here!
-
- // VDTOR-THUNKS-Test5: VFTable for 'vdtor::Test4' in 'vdtor::Test5' (1 entries).
- // VDTOR-THUNKS-Test5-NEXT: 0 | void vdtor::Test4::z4()
-
- // VDTOR-THUNKS-Test5: VFTable for 'vdtor::Test2' in 'vdtor::Test5' (1 entries).
- // VDTOR-THUNKS-Test5-NEXT: 0 | vdtor::Test5::~Test5() [scalar deleting]
- // VDTOR-THUNKS-Test5-NEXT: [this adjustment: -4 non-virtual]
-
- // VDTOR-THUNKS-Test5: Thunks for 'vdtor::Test5::~Test5()' (1 entry).
- // VDTOR-THUNKS-Test5-NEXT: 0 | [this adjustment: -4 non-virtual]
-
- // VDTOR-THUNKS-Test5: VFTable indices for 'vdtor::Test5' (1 entries).
- // VDTOR-THUNKS-Test5-NEXT: -- accessible via vfptr at offset 4 --
- // VDTOR-THUNKS-Test5-NEXT: 0 | vdtor::Test5::~Test5() [scalar deleting]
-};
-
-Test5 t5;
-
-struct Test6 : Test4, Test2 {
- // Implicit virtual dtor here!
-
- // VDTOR-THUNKS-Test6: VFTable for 'vdtor::Test4' in 'vdtor::Test6' (1 entries).
- // VDTOR-THUNKS-Test6-NEXT: 0 | void vdtor::Test4::z4()
-
- // VDTOR-THUNKS-Test6: VFTable for 'vdtor::Test2' in 'vdtor::Test6' (1 entries).
- // VDTOR-THUNKS-Test6-NEXT: 0 | vdtor::Test6::~Test6() [scalar deleting]
- // VDTOR-THUNKS-Test6-NEXT: [this adjustment: -4 non-virtual]
-
- // VDTOR-THUNKS-Test6: Thunks for 'vdtor::Test6::~Test6()' (1 entry).
- // VDTOR-THUNKS-Test6-NEXT: 0 | [this adjustment: -4 non-virtual]
-
- // VDTOR-THUNKS-Test6: VFTable indices for 'vdtor::Test6' (1 entries).
- // VDTOR-THUNKS-Test6-NEXT: -- accessible via vfptr at offset 4 --
- // VDTOR-THUNKS-Test6-NEXT: 0 | vdtor::Test6::~Test6() [scalar deleting]
-};
-
-Test6 t6;
-
-struct Test7 : Test5 {
- // VDTOR-THUNKS-Test7: VFTable for 'vdtor::Test4' in 'vdtor::Test5' in 'vdtor::Test7' (1 entries).
- // VDTOR-THUNKS-Test7-NEXT: 0 | void vdtor::Test4::z4()
-
- // VDTOR-THUNKS-Test7: VFTable for 'vdtor::Test2' in 'vdtor::Test5' in 'vdtor::Test7' (1 entries).
- // VDTOR-THUNKS-Test7-NEXT: 0 | vdtor::Test7::~Test7() [scalar deleting]
- // VDTOR-THUNKS-Test7-NEXT: [this adjustment: -4 non-virtual]
-
- // VDTOR-THUNKS-Test7: Thunks for 'vdtor::Test7::~Test7()' (1 entry).
- // VDTOR-THUNKS-Test7-NEXT: 0 | [this adjustment: -4 non-virtual]
-
- // VDTOR-THUNKS-Test7: VFTable indices for 'vdtor::Test7' (1 entries).
- // VDTOR-THUNKS-Test7-NEXT: -- accessible via vfptr at offset 4 --
- // VDTOR-THUNKS-Test7-NEXT: 0 | vdtor::Test7::~Test7() [scalar deleting]
- virtual ~Test7();
-};
-
-Test7 t7;
-
-}
-
-namespace return_adjustment {
-
-struct Ret1 {
- virtual C* foo();
- virtual void z();
-};
-
-struct Test1 : Ret1 {
- // RET-THUNKS-Test1: VFTable for 'return_adjustment::Ret1' in 'return_adjustment::Test1' (3 entries).
- // RET-THUNKS-Test1-NEXT: 0 | this_adjustment::Test1 *return_adjustment::Test1::foo()
- // RET-THUNKS-Test1-NEXT: [return adjustment: 4 non-virtual]
- // RET-THUNKS-Test1-NEXT: 1 | void return_adjustment::Ret1::z()
- // RET-THUNKS-Test1-NEXT: 2 | this_adjustment::Test1 *return_adjustment::Test1::foo()
-
- // RET-THUNKS-Test1: VFTable indices for 'return_adjustment::Test1' (1 entries).
- // RET-THUNKS-Test1-NEXT: 2 | this_adjustment::Test1 *return_adjustment::Test1::foo()
-
- // MANGLING-DAG: @"\01??_7Test1@return_adjustment@@6B@"
-
- virtual this_adjustment::Test1* foo();
-};
-
-Test1 t1;
-
-struct Ret2 : B, this_adjustment::Test1 { };
-
-struct Test2 : Test1 {
- // RET-THUNKS-Test2: VFTable for 'return_adjustment::Ret1' in 'return_adjustment::Test1' in 'return_adjustment::Test2' (4 entries).
- // RET-THUNKS-Test2-NEXT: 0 | return_adjustment::Ret2 *return_adjustment::Test2::foo()
- // RET-THUNKS-Test2-NEXT: [return adjustment: 8 non-virtual]
- // RET-THUNKS-Test2-NEXT: 1 | void return_adjustment::Ret1::z()
- // RET-THUNKS-Test2-NEXT: 2 | return_adjustment::Ret2 *return_adjustment::Test2::foo()
- // RET-THUNKS-Test2-NEXT: [return adjustment: 4 non-virtual]
- // RET-THUNKS-Test2-NEXT: 3 | return_adjustment::Ret2 *return_adjustment::Test2::foo()
-
- // RET-THUNKS-Test2: VFTable indices for 'return_adjustment::Test2' (1 entries).
- // RET-THUNKS-Test2-NEXT: 3 | return_adjustment::Ret2 *return_adjustment::Test2::foo()
-
- virtual Ret2* foo();
-};
-
-Test2 t2;
-
-struct Test3: B, Ret1 {
- // RET-THUNKS-Test3: VFTable for 'B' in 'return_adjustment::Test3' (2 entries).
- // RET-THUNKS-Test3-NEXT: 0 | void B::g()
- // RET-THUNKS-Test3-NEXT: 1 | void B::h()
-
- // RET-THUNKS-Test3: VFTable for 'return_adjustment::Ret1' in 'return_adjustment::Test3' (3 entries).
- // RET-THUNKS-Test3-NEXT: 0 | this_adjustment::Test1 *return_adjustment::Test3::foo()
- // RET-THUNKS-Test3-NEXT: [return adjustment: 4 non-virtual]
- // RET-THUNKS-Test3-NEXT: 1 | void return_adjustment::Ret1::z()
- // RET-THUNKS-Test3-NEXT: 2 | this_adjustment::Test1 *return_adjustment::Test3::foo()
-
- // RET-THUNKS-Test3: VFTable indices for 'return_adjustment::Test3' (1 entries).
- // RET-THUNKS-Test3-NEXT: via vfptr at offset 4
- // RET-THUNKS-Test3-NEXT: 2 | this_adjustment::Test1 *return_adjustment::Test3::foo()
-
- virtual this_adjustment::Test1* foo();
-};
-
-Test3 t3;
-
-struct Test4 : Test3 {
- // RET-THUNKS-Test4: VFTable for 'B' in 'return_adjustment::Test3' in 'return_adjustment::Test4' (2 entries).
- // RET-THUNKS-Test4-NEXT: 0 | void B::g()
- // RET-THUNKS-Test4-NEXT: 1 | void B::h()
-
- // RET-THUNKS-Test4: VFTable for 'return_adjustment::Ret1' in 'return_adjustment::Test3' in 'return_adjustment::Test4' (4 entries).
- // RET-THUNKS-Test4-NEXT: 0 | return_adjustment::Ret2 *return_adjustment::Test4::foo()
- // RET-THUNKS-Test4-NEXT: [return adjustment: 8 non-virtual]
- // RET-THUNKS-Test4-NEXT: 1 | void return_adjustment::Ret1::z()
- // RET-THUNKS-Test4-NEXT: 2 | return_adjustment::Ret2 *return_adjustment::Test4::foo()
- // RET-THUNKS-Test4-NEXT: [return adjustment: 4 non-virtual]
- // RET-THUNKS-Test4-NEXT: 3 | return_adjustment::Ret2 *return_adjustment::Test4::foo()
-
- // RET-THUNKS-Test4: VFTable indices for 'return_adjustment::Test4' (1 entries).
- // RET-THUNKS-Test4-NEXT: -- accessible via vfptr at offset 4 --
- // RET-THUNKS-Test4-NEXT: 3 | return_adjustment::Ret2 *return_adjustment::Test4::foo()
-
- virtual Ret2* foo();
-};
-
-Test4 t4;
-
-struct Test5 : Ret1, Test1 {
- // RET-THUNKS-Test5: VFTable for 'return_adjustment::Ret1' in 'return_adjustment::Test5' (3 entries).
- // RET-THUNKS-Test5-NEXT: 0 | return_adjustment::Ret2 *return_adjustment::Test5::foo()
- // RET-THUNKS-Test5-NEXT: [return adjustment: 8 non-virtual]
- // RET-THUNKS-Test5-NEXT: 1 | void return_adjustment::Ret1::z()
- // RET-THUNKS-Test5-NEXT: 2 | return_adjustment::Ret2 *return_adjustment::Test5::foo()
-
- // RET-THUNKS-Test5: VFTable for 'return_adjustment::Ret1' in 'return_adjustment::Test1' in 'return_adjustment::Test5' (4 entries).
- // RET-THUNKS-Test5-NEXT: 0 | return_adjustment::Ret2 *return_adjustment::Test5::foo()
- // RET-THUNKS-Test5-NEXT: [return adjustment: 8 non-virtual]
- // RET-THUNKS-Test5-NEXT: [this adjustment: -4 non-virtual]
- // RET-THUNKS-Test5-NEXT: 1 | void return_adjustment::Ret1::z()
- // RET-THUNKS-Test5-NEXT: 2 | return_adjustment::Ret2 *return_adjustment::Test5::foo()
- // RET-THUNKS-Test5-NEXT: [return adjustment: 4 non-virtual]
- // RET-THUNKS-Test5-NEXT: [this adjustment: -4 non-virtual]
- // RET-THUNKS-Test5-NEXT: 3 | return_adjustment::Ret2 *return_adjustment::Test5::foo()
- // RET-THUNKS-Test5-NEXT: [this adjustment: -4 non-virtual]
-
- // RET-THUNKS-Test5: VFTable indices for 'return_adjustment::Test5' (1 entries).
- // RET-THUNKS-Test5-NEXT: 2 | return_adjustment::Ret2 *return_adjustment::Test5::foo()
-
- virtual Ret2* foo();
-};
-
-Test5 t5;
-
-struct Ret3 : this_adjustment::Test1 { };
-
-struct Test6 : Test1 {
- virtual Ret3* foo();
- // RET-THUNKS-Test6: VFTable for 'return_adjustment::Ret1' in 'return_adjustment::Test1' in 'return_adjustment::Test6' (4 entries).
- // RET-THUNKS-Test6-NEXT: 0 | return_adjustment::Ret3 *return_adjustment::Test6::foo()
- // RET-THUNKS-Test6-NEXT: [return adjustment: 4 non-virtual]
- // RET-THUNKS-Test6-NEXT: 1 | void return_adjustment::Ret1::z()
- // RET-THUNKS-Test6-NEXT: 2 | return_adjustment::Ret3 *return_adjustment::Test6::foo()
- // RET-THUNKS-Test6-NEXT: 3 | return_adjustment::Ret3 *return_adjustment::Test6::foo()
-
- // RET-THUNKS-Test6: VFTable indices for 'return_adjustment::Test6' (1 entries).
- // RET-THUNKS-Test6-NEXT: 3 | return_adjustment::Ret3 *return_adjustment::Test6::foo()
-};
-
-Test6 t6;
-
-}
diff --git a/test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp b/test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp
new file mode 100644
index 000000000000..a4a21106c685
--- /dev/null
+++ b/test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp
@@ -0,0 +1,106 @@
+// RUN: %clang_cc1 -fno-rtti %s -emit-llvm -o %t -triple=i386-pc-win32 -fdump-vtable-layouts 2>&1 | FileCheck --check-prefix=VFTABLES %s
+// RUN: FileCheck --check-prefix=GLOBALS %s < %t
+// RUN: FileCheck --check-prefix=CODEGEN %s < %t
+
+namespace test1 {
+
+// Some covariant types.
+struct A { int a; };
+struct B { int b; };
+struct C : A, B { int c; };
+struct D : C { int d; };
+struct E : D { int e; };
+
+// One base class and two overrides, all with covariant return types.
+struct H { virtual B *foo(); };
+struct I : H { virtual C *foo(); };
+struct J : I { virtual D *foo(); J(); };
+struct K : J { virtual E *foo(); K(); };
+
+J::J() {}
+
+// VFTABLES-LABEL: VFTable for 'test1::H' in 'test1::I' in 'test1::J' (3 entries).
+// VFTABLES-NEXT: 0 | test1::D *test1::J::foo()
+// VFTABLES-NEXT: [return adjustment (to type 'struct test1::B *'): 4 non-virtual]
+// VFTABLES-NEXT: 1 | test1::D *test1::J::foo()
+// VFTABLES-NEXT: [return adjustment (to type 'struct test1::C *'): 0 non-virtual]
+// VFTABLES-NEXT: 2 | test1::D *test1::J::foo()
+
+// GLOBALS-LABEL: @"\01??_7J@test1@@6B@" = linkonce_odr unnamed_addr constant [3 x i8*]
+// GLOBALS: @"\01?foo@J@test1@@QAEPAUB@2@XZ"
+// GLOBALS: @"\01?foo@J@test1@@QAEPAUC@2@XZ"
+// GLOBALS: @"\01?foo@J@test1@@UAEPAUD@2@XZ"
+
+K::K() {}
+
+// VFTABLES-LABEL: VFTable for 'test1::H' in 'test1::I' in 'test1::J' in 'test1::K' (4 entries).
+// VFTABLES-NEXT: 0 | test1::E *test1::K::foo()
+// VFTABLES-NEXT: [return adjustment (to type 'struct test1::B *'): 4 non-virtual]
+// VFTABLES-NEXT: 1 | test1::E *test1::K::foo()
+// VFTABLES-NEXT: [return adjustment (to type 'struct test1::C *'): 0 non-virtual]
+// VFTABLES-NEXT: 2 | test1::E *test1::K::foo()
+// VFTABLES-NEXT: [return adjustment (to type 'struct test1::D *'): 0 non-virtual]
+// VFTABLES-NEXT: 3 | test1::E *test1::K::foo()
+
+// Only B to C requires adjustment, but we get 3 thunks in K's vftable, two of
+// which are trivial.
+// GLOBALS-LABEL: @"\01??_7K@test1@@6B@" = linkonce_odr unnamed_addr constant [4 x i8*]
+// GLOBALS: @"\01?foo@K@test1@@QAEPAUB@2@XZ"
+// GLOBALS: @"\01?foo@K@test1@@QAEPAUC@2@XZ"
+// GLOBALS: @"\01?foo@K@test1@@QAEPAUD@2@XZ"
+// GLOBALS: @"\01?foo@K@test1@@UAEPAUE@2@XZ"
+
+// This thunk has a return adjustment.
+// CODEGEN-LABEL: define {{.*}} @"\01?foo@K@test1@@QAEPAUB@2@XZ"
+// CODEGEN: call {{.*}} @"\01?foo@K@test1@@UAEPAUE@2@XZ"
+// CODEGEN: icmp {{.*}}, null
+// CODEGEN: getelementptr
+// CODEGEN: ret
+
+// These two don't.
+// CODEGEN-LABEL: define {{.*}} @"\01?foo@K@test1@@QAEPAUC@2@XZ"
+// CODEGEN: call {{.*}} @"\01?foo@K@test1@@UAEPAUE@2@XZ"
+// CODEGEN-NEXT: ret
+
+// CODEGEN-LABEL: define {{.*}} @"\01?foo@K@test1@@QAEPAUD@2@XZ"
+// CODEGEN: call {{.*}} @"\01?foo@K@test1@@UAEPAUE@2@XZ"
+// CODEGEN-NEXT: ret
+
+}
+
+namespace test2 {
+
+// Covariant types. D* is not trivially convertible to C*.
+struct A { int a; };
+struct B { int b; };
+struct C : B { int c; };
+struct D : A, C { int d; };
+struct E : D { int e; };
+
+// J's foo will require an adjusting thunk, and K will require a trivial thunk.
+struct H { virtual B *foo(); };
+struct I : H { virtual C *foo(); };
+struct J : I { virtual D *foo(); J(); };
+struct K : J { virtual E *foo(); K(); };
+
+J::J() {}
+
+// VFTABLES-LABEL: VFTable for 'test2::H' in 'test2::I' in 'test2::J' (2 entries).
+// VFTABLES-NEXT: 0 | test2::D *test2::J::foo()
+// VFTABLES-NEXT: [return adjustment (to type 'struct test2::B *'): 4 non-virtual]
+// VFTABLES-NEXT: 1 | test2::D *test2::J::foo()
+
+// GLOBALS-LABEL: @"\01??_7J@test2@@6B@" = linkonce_odr unnamed_addr constant [2 x i8*]
+
+K::K() {}
+
+// VFTABLES-LABEL: VFTable for 'test2::H' in 'test2::I' in 'test2::J' in 'test2::K' (3 entries).
+// VFTABLES-NEXT: 0 | test2::E *test2::K::foo()
+// VFTABLES-NEXT: [return adjustment (to type 'struct test2::B *'): 4 non-virtual]
+// VFTABLES-NEXT: 1 | test2::E *test2::K::foo()
+// VFTABLES-NEXT: [return adjustment (to type 'struct test2::D *'): 0 non-virtual]
+// VFTABLES-NEXT: 2 | test2::E *test2::K::foo()
+
+// GLOBALS-LABEL: @"\01??_7K@test2@@6B@" = linkonce_odr unnamed_addr constant [3 x i8*]
+
+}
diff --git a/test/CodeGenCXX/microsoft-abi-vtables-single-inheritance.cpp b/test/CodeGenCXX/microsoft-abi-vtables-single-inheritance.cpp
index 6fe12b0ef07b..d453f5c55aed 100644
--- a/test/CodeGenCXX/microsoft-abi-vtables-single-inheritance.cpp
+++ b/test/CodeGenCXX/microsoft-abi-vtables-single-inheritance.cpp
@@ -1,29 +1,17 @@
-// RUN: %clang_cc1 %s -fno-rtti -cxx-abi microsoft -triple=i386-pc-win32 -emit-llvm -fdump-vtable-layouts -o %t.ll > %t
+// RUN: %clang_cc1 %s -fno-rtti -triple=i386-pc-win32 -emit-llvm -fdump-vtable-layouts -o %t.ll > %t
// RUN: FileCheck --check-prefix=EMITS-VFTABLE %s < %t.ll
// RUN: FileCheck --check-prefix=NO-VFTABLE %s < %t.ll
-// RUN: FileCheck --check-prefix=CHECK-A %s < %t
-// RUN: FileCheck --check-prefix=CHECK-B %s < %t
-// RUN: FileCheck --check-prefix=CHECK-C %s < %t
-// RUN: FileCheck --check-prefix=CHECK-D %s < %t
-// RUN: FileCheck --check-prefix=CHECK-E %s < %t
-// RUN: FileCheck --check-prefix=CHECK-F %s < %t
-// RUN: FileCheck --check-prefix=CHECK-G %s < %t
-// RUN: FileCheck --check-prefix=CHECK-I %s < %t
-// RUN: FileCheck --check-prefix=CHECK-J %s < %t
-// RUN: FileCheck --check-prefix=CHECK-K %s < %t
-// RUN: FileCheck --check-prefix=CHECK-L %s < %t
-// RUN: FileCheck --check-prefix=CHECK-M %s < %t
-// RUN: FileCheck --check-prefix=CHECK-N %s < %t
+// RUN: FileCheck %s < %t
struct A {
- // CHECK-A: VFTable for 'A' (3 entries)
- // CHECK-A-NEXT: 0 | void A::f()
- // CHECK-A-NEXT: 1 | void A::g()
- // CHECK-A-NEXT: 2 | void A::h()
- // CHECK-A: VFTable indices for 'A' (3 entries)
- // CHECK-A-NEXT: 0 | void A::f()
- // CHECK-A-NEXT: 1 | void A::g()
- // CHECK-A-NEXT: 2 | void A::h()
+ // CHECK-LABEL: VFTable for 'A' (3 entries)
+ // CHECK-NEXT: 0 | void A::f()
+ // CHECK-NEXT: 1 | void A::g()
+ // CHECK-NEXT: 2 | void A::h()
+ // CHECK-LABEL: VFTable indices for 'A' (3 entries)
+ // CHECK-NEXT: 0 | void A::f()
+ // CHECK-NEXT: 1 | void A::g()
+ // CHECK-NEXT: 2 | void A::h()
virtual void f();
virtual void g();
@@ -32,18 +20,19 @@ struct A {
};
A a;
// EMITS-VFTABLE-DAG: @"\01??_7A@@6B@" = linkonce_odr unnamed_addr constant [3 x i8*]
+void use(A *obj) { obj->f(); }
struct B : A {
- // CHECK-B: VFTable for 'A' in 'B' (5 entries)
- // CHECK-B-NEXT: 0 | void B::f()
- // CHECK-B-NEXT: 1 | void A::g()
- // CHECK-B-NEXT: 2 | void A::h()
- // CHECK-B-NEXT: 3 | void B::i()
- // CHECK-B-NEXT: 4 | void B::j()
- // CHECK-B: VFTable indices for 'B' (3 entries)
- // CHECK-B-NEXT: 0 | void B::f()
- // CHECK-B-NEXT: 3 | void B::i()
- // CHECK-B-NEXT: 4 | void B::j()
+ // CHECK-LABEL: VFTable for 'A' in 'B' (5 entries)
+ // CHECK-NEXT: 0 | void B::f()
+ // CHECK-NEXT: 1 | void A::g()
+ // CHECK-NEXT: 2 | void A::h()
+ // CHECK-NEXT: 3 | void B::i()
+ // CHECK-NEXT: 4 | void B::j()
+ // CHECK-LABEL: VFTable indices for 'B' (3 entries)
+ // CHECK-NEXT: 0 | void B::f()
+ // CHECK-NEXT: 3 | void B::i()
+ // CHECK-NEXT: 4 | void B::j()
virtual void f(); // overrides A::f()
virtual void i();
@@ -51,45 +40,48 @@ struct B : A {
};
B b;
// EMITS-VFTABLE-DAG: @"\01??_7B@@6B@" = linkonce_odr unnamed_addr constant [5 x i8*]
+void use(B *obj) { obj->f(); }
struct C {
- // CHECK-C: VFTable for 'C' (2 entries)
- // CHECK-C-NEXT: 0 | C::~C() [scalar deleting]
- // CHECK-C-NEXT: 1 | void C::f()
- // CHECK-C: VFTable indices for 'C' (2 entries).
- // CHECK-C-NEXT: 0 | C::~C() [scalar deleting]
- // CHECK-C-NEXT: 1 | void C::f()
+ // CHECK-LABEL: VFTable for 'C' (2 entries)
+ // CHECK-NEXT: 0 | C::~C() [scalar deleting]
+ // CHECK-NEXT: 1 | void C::f()
+ // CHECK-LABEL: VFTable indices for 'C' (2 entries).
+ // CHECK-NEXT: 0 | C::~C() [scalar deleting]
+ // CHECK-NEXT: 1 | void C::f()
virtual ~C();
virtual void f();
};
void C::f() {}
// NO-VFTABLE-NOT: @"\01??_7C@@6B@"
+void use(C *obj) { obj->f(); }
struct D {
- // CHECK-D: VFTable for 'D' (2 entries)
- // CHECK-D-NEXT: 0 | void D::f()
- // CHECK-D-NEXT: 1 | D::~D() [scalar deleting]
- // CHECK-D: VFTable indices for 'D' (2 entries)
- // CHECK-D-NEXT: 0 | void D::f()
- // CHECK-D-NEXT: 1 | D::~D() [scalar deleting]
+ // CHECK-LABEL: VFTable for 'D' (2 entries)
+ // CHECK-NEXT: 0 | void D::f()
+ // CHECK-NEXT: 1 | D::~D() [scalar deleting]
+ // CHECK-LABEL: VFTable indices for 'D' (2 entries)
+ // CHECK-NEXT: 0 | void D::f()
+ // CHECK-NEXT: 1 | D::~D() [scalar deleting]
virtual void f();
virtual ~D();
};
D d;
// EMITS-VFTABLE-DAG: @"\01??_7D@@6B@" = linkonce_odr unnamed_addr constant [2 x i8*]
+void use(D *obj) { obj->f(); }
struct E : A {
- // CHECK-E: VFTable for 'A' in 'E' (5 entries)
- // CHECK-E-NEXT: 0 | void A::f()
- // CHECK-E-NEXT: 1 | void A::g()
- // CHECK-E-NEXT: 2 | void A::h()
- // CHECK-E-NEXT: 3 | E::~E() [scalar deleting]
- // CHECK-E-NEXT: 4 | void E::i()
- // CHECK-E: VFTable indices for 'E' (2 entries).
- // CHECK-E-NEXT: 3 | E::~E() [scalar deleting]
- // CHECK-E-NEXT: 4 | void E::i()
+ // CHECK-LABEL: VFTable for 'A' in 'E' (5 entries)
+ // CHECK-NEXT: 0 | void A::f()
+ // CHECK-NEXT: 1 | void A::g()
+ // CHECK-NEXT: 2 | void A::h()
+ // CHECK-NEXT: 3 | E::~E() [scalar deleting]
+ // CHECK-NEXT: 4 | void E::i()
+ // CHECK-LABEL: VFTable indices for 'E' (2 entries).
+ // CHECK-NEXT: 3 | E::~E() [scalar deleting]
+ // CHECK-NEXT: 4 | void E::i()
// ~E would be the key method, but it isn't used, and MS ABI has no key
// methods.
@@ -98,36 +90,38 @@ struct E : A {
};
void E::i() {}
// NO-VFTABLE-NOT: @"\01??_7E@@6B@"
+void use(E *obj) { obj->i(); }
struct F : A {
- // CHECK-F: VFTable for 'A' in 'F' (5 entries)
- // CHECK-F-NEXT: 0 | void A::f()
- // CHECK-F-NEXT: 1 | void A::g()
- // CHECK-F-NEXT: 2 | void A::h()
- // CHECK-F-NEXT: 3 | void F::i()
- // CHECK-F-NEXT: 4 | F::~F() [scalar deleting]
- // CHECK-F: VFTable indices for 'F' (2 entries).
- // CHECK-F-NEXT: 3 | void F::i()
- // CHECK-F-NEXT: 4 | F::~F() [scalar deleting]
+ // CHECK-LABEL: VFTable for 'A' in 'F' (5 entries)
+ // CHECK-NEXT: 0 | void A::f()
+ // CHECK-NEXT: 1 | void A::g()
+ // CHECK-NEXT: 2 | void A::h()
+ // CHECK-NEXT: 3 | void F::i()
+ // CHECK-NEXT: 4 | F::~F() [scalar deleting]
+ // CHECK-LABEL: VFTable indices for 'F' (2 entries).
+ // CHECK-NEXT: 3 | void F::i()
+ // CHECK-NEXT: 4 | F::~F() [scalar deleting]
virtual void i();
virtual ~F();
};
F f;
// EMITS-VFTABLE-DAG: @"\01??_7F@@6B@" = linkonce_odr unnamed_addr constant [5 x i8*]
+void use(F *obj) { obj->i(); }
struct G : E {
- // CHECK-G: VFTable for 'A' in 'E' in 'G' (6 entries)
- // CHECK-G-NEXT: 0 | void G::f()
- // CHECK-G-NEXT: 1 | void A::g()
- // CHECK-G-NEXT: 2 | void A::h()
- // CHECK-G-NEXT: 3 | G::~G() [scalar deleting]
- // CHECK-G-NEXT: 4 | void E::i()
- // CHECK-G-NEXT: 5 | void G::j()
- // CHECK-G: VFTable indices for 'G' (3 entries).
- // CHECK-G-NEXT: 0 | void G::f()
- // CHECK-G-NEXT: 3 | G::~G() [scalar deleting]
- // CHECK-G-NEXT: 5 | void G::j()
+ // CHECK-LABEL: VFTable for 'A' in 'E' in 'G' (6 entries)
+ // CHECK-NEXT: 0 | void G::f()
+ // CHECK-NEXT: 1 | void A::g()
+ // CHECK-NEXT: 2 | void A::h()
+ // CHECK-NEXT: 3 | G::~G() [scalar deleting]
+ // CHECK-NEXT: 4 | void E::i()
+ // CHECK-NEXT: 5 | void G::j()
+ // CHECK-LABEL: VFTable indices for 'G' (3 entries).
+ // CHECK-NEXT: 0 | void G::f()
+ // CHECK-NEXT: 3 | G::~G() [scalar deleting]
+ // CHECK-NEXT: 5 | void G::j()
virtual void f(); // overrides A::f()
virtual ~G();
@@ -135,6 +129,7 @@ struct G : E {
};
void G::j() {}
// NO-VFTABLE-NOT: @"\01??_7G@@6B@"
+void use(G *obj) { obj->j(); }
// Test that the usual Itanium-style key method does not emit a vtable.
struct H {
@@ -146,23 +141,24 @@ void H::f() {}
struct Empty { };
struct I : Empty {
- // CHECK-I: VFTable for 'I' (2 entries)
- // CHECK-I-NEXT: 0 | void I::f()
- // CHECK-I-NEXT: 1 | void I::g()
+ // CHECK-LABEL: VFTable for 'I' (2 entries)
+ // CHECK-NEXT: 0 | void I::f()
+ // CHECK-NEXT: 1 | void I::g()
virtual void f();
virtual void g();
};
I i;
+void use(I *obj) { obj->f(); }
struct J {
- // CHECK-J: VFTable for 'J' (6 entries)
- // CHECK-J-NEXT: 0 | void J::foo(long)
- // CHECK-J-NEXT: 1 | void J::foo(int)
- // CHECK-J-NEXT: 2 | void J::foo(short)
- // CHECK-J-NEXT: 3 | void J::bar(long)
- // CHECK-J-NEXT: 4 | void J::bar(int)
- // CHECK-J-NEXT: 5 | void J::bar(short)
+ // CHECK-LABEL: VFTable for 'J' (6 entries)
+ // CHECK-NEXT: 0 | void J::foo(long)
+ // CHECK-NEXT: 1 | void J::foo(int)
+ // CHECK-NEXT: 2 | void J::foo(short)
+ // CHECK-NEXT: 3 | void J::bar(long)
+ // CHECK-NEXT: 4 | void J::bar(int)
+ // CHECK-NEXT: 5 | void J::bar(short)
virtual void foo(short);
virtual void bar(short);
virtual void foo(int);
@@ -172,36 +168,38 @@ struct J {
};
J j;
+void use(J *obj) { obj->foo(42); }
struct K : J {
- // CHECK-K: VFTable for 'J' in 'K' (9 entries)
- // CHECK-K-NEXT: 0 | void J::foo(long)
- // CHECK-K-NEXT: 1 | void J::foo(int)
- // CHECK-K-NEXT: 2 | void J::foo(short)
- // CHECK-K-NEXT: 3 | void J::bar(long)
- // CHECK-K-NEXT: 4 | void J::bar(int)
- // CHECK-K-NEXT: 5 | void J::bar(short)
- // CHECK-K-NEXT: 6 | void K::bar(double)
- // CHECK-K-NEXT: 7 | void K::bar(float)
- // CHECK-K-NEXT: 8 | void K::foo(float)
+ // CHECK-LABEL: VFTable for 'J' in 'K' (9 entries)
+ // CHECK-NEXT: 0 | void J::foo(long)
+ // CHECK-NEXT: 1 | void J::foo(int)
+ // CHECK-NEXT: 2 | void J::foo(short)
+ // CHECK-NEXT: 3 | void J::bar(long)
+ // CHECK-NEXT: 4 | void J::bar(int)
+ // CHECK-NEXT: 5 | void J::bar(short)
+ // CHECK-NEXT: 6 | void K::bar(double)
+ // CHECK-NEXT: 7 | void K::bar(float)
+ // CHECK-NEXT: 8 | void K::foo(float)
virtual void bar(float);
virtual void foo(float);
virtual void bar(double);
};
K k;
+void use(K *obj) { obj->foo(42.0f); }
struct L : J {
- // CHECK-L: VFTable for 'J' in 'L' (9 entries)
- // CHECK-L-NEXT: 0 | void J::foo(long)
- // CHECK-L-NEXT: 1 | void L::foo(int)
- // CHECK-L-NEXT: 2 | void J::foo(short)
- // CHECK-L-NEXT: 3 | void J::bar(long)
- // CHECK-L-NEXT: 4 | void J::bar(int)
- // CHECK-L-NEXT: 5 | void J::bar(short)
- // CHECK-L-NEXT: 6 | void L::foo(float)
- // CHECK-L-NEXT: 7 | void L::bar(double)
- // CHECK-L-NEXT: 8 | void L::bar(float)
+ // CHECK-LABEL: VFTable for 'J' in 'L' (9 entries)
+ // CHECK-NEXT: 0 | void J::foo(long)
+ // CHECK-NEXT: 1 | void L::foo(int)
+ // CHECK-NEXT: 2 | void J::foo(short)
+ // CHECK-NEXT: 3 | void J::bar(long)
+ // CHECK-NEXT: 4 | void J::bar(int)
+ // CHECK-NEXT: 5 | void J::bar(short)
+ // CHECK-NEXT: 6 | void L::foo(float)
+ // CHECK-NEXT: 7 | void L::bar(double)
+ // CHECK-NEXT: 8 | void L::bar(float)
// This case is interesting. Since the J::foo(int) override is the first method in
// the class, foo(float) precedes the bar(double) and bar(float) in the vftable.
@@ -212,20 +210,21 @@ struct L : J {
};
L l;
+void use(L *obj) { obj->foo(42.0f); }
struct M : J {
- // CHECK-M: VFTable for 'J' in 'M' (11 entries)
- // CHECK-M-NEXT: 0 | void J::foo(long)
- // CHECK-M-NEXT: 1 | void M::foo(int)
- // CHECK-M-NEXT: 2 | void J::foo(short)
- // CHECK-M-NEXT: 3 | void J::bar(long)
- // CHECK-M-NEXT: 4 | void J::bar(int)
- // CHECK-M-NEXT: 5 | void J::bar(short)
- // CHECK-M-NEXT: 6 | void M::foo(float)
- // CHECK-M-NEXT: 7 | void M::spam(long)
- // CHECK-M-NEXT: 8 | void M::spam(int)
- // CHECK-M-NEXT: 9 | void M::bar(double)
- // CHECK-M-NEXT: 10 | void M::bar(float)
+ // CHECK-LABEL: VFTable for 'J' in 'M' (11 entries)
+ // CHECK-NEXT: 0 | void J::foo(long)
+ // CHECK-NEXT: 1 | void M::foo(int)
+ // CHECK-NEXT: 2 | void J::foo(short)
+ // CHECK-NEXT: 3 | void J::bar(long)
+ // CHECK-NEXT: 4 | void J::bar(int)
+ // CHECK-NEXT: 5 | void J::bar(short)
+ // CHECK-NEXT: 6 | void M::foo(float)
+ // CHECK-NEXT: 7 | void M::spam(long)
+ // CHECK-NEXT: 8 | void M::spam(int)
+ // CHECK-NEXT: 9 | void M::bar(double)
+ // CHECK-NEXT: 10 | void M::bar(float)
virtual void foo(int);
virtual void spam(int);
@@ -236,13 +235,14 @@ struct M : J {
};
M m;
+void use(M *obj) { obj->foo(42.0f); }
struct N {
- // CHECK-N: VFTable for 'N' (4 entries)
- // CHECK-N-NEXT: 0 | void N::operator+(int)
- // CHECK-N-NEXT: 1 | void N::operator+(short)
- // CHECK-N-NEXT: 2 | void N::operator*(int)
- // CHECK-N-NEXT: 3 | void N::operator*(short)
+ // CHECK-LABEL: VFTable for 'N' (4 entries)
+ // CHECK-NEXT: 0 | void N::operator+(int)
+ // CHECK-NEXT: 1 | void N::operator+(short)
+ // CHECK-NEXT: 2 | void N::operator*(int)
+ // CHECK-NEXT: 3 | void N::operator*(short)
virtual void operator+(short);
virtual void operator*(short);
virtual void operator+(int);
@@ -250,3 +250,42 @@ struct N {
};
N n;
+void use(N *obj) { obj->operator+(42); }
+
+struct O { virtual A *f(); };
+struct P : O { virtual B *f(); };
+P p;
+void use(O *obj) { obj->f(); }
+void use(P *obj) { obj->f(); }
+// CHECK-LABEL: VFTable for 'O' (1 entry)
+// CHECK-NEXT: 0 | A *O::f()
+
+// CHECK-LABEL: VFTable for 'O' in 'P' (1 entry)
+// CHECK-NEXT: 0 | B *P::f()
+
+struct Q {
+ // CHECK-LABEL: VFTable for 'Q' (2 entries)
+ // CHECK-NEXT: 0 | void Q::foo(int)
+ // CHECK-NEXT: 1 | void Q::bar(int)
+ void foo(short);
+ void bar(short);
+ virtual void bar(int);
+ virtual void foo(int);
+};
+
+Q q;
+void use(Q *obj) { obj->foo(42); }
+
+// Inherited non-virtual overloads don't participate in the ordering.
+struct R : Q {
+ // CHECK-LABEL: VFTable for 'Q' in 'R' (4 entries)
+ // CHECK-NEXT: 0 | void Q::foo(int)
+ // CHECK-NEXT: 1 | void Q::bar(int)
+ // CHECK-NEXT: 2 | void R::bar(long)
+ // CHECK-NEXT: 3 | void R::foo(long)
+ virtual void bar(long);
+ virtual void foo(long);
+};
+
+R r;
+void use(R *obj) { obj->foo(42l); }
diff --git a/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance-vtordisps.cpp b/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance-vtordisps.cpp
index 3fef0e409349..f63808a89873 100644
--- a/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance-vtordisps.cpp
+++ b/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance-vtordisps.cpp
@@ -1,19 +1,9 @@
-// RUN: %clang_cc1 -fno-rtti -emit-llvm -fdump-vtable-layouts %s -o %t.ll -cxx-abi microsoft -triple=i386-pc-win32 >%t
-// RUN: FileCheck --check-prefix=VTABLE-SIMPLE-A %s < %t
-// RUN: FileCheck --check-prefix=VTABLE-SIMPLE-B %s < %t
-// RUN: FileCheck --check-prefix=VTABLE-SIMPLE-C %s < %t
-// RUN: FileCheck --check-prefix=VTABLE-EXTENDED-A %s < %t
-// RUN: FileCheck --check-prefix=VTABLE-EXTENDED-B %s < %t
-// RUN: FileCheck --check-prefix=VTABLE-EXTENDED-C %s < %t
-// RUN: FileCheck --check-prefix=VTABLE-EXTENDED-E %s < %t
-// RUN: FileCheck --check-prefix=VTABLE-EXTENDED-F %s < %t
-// RUN: FileCheck --check-prefix=VTABLE-EXTENDED-G %s < %t
-// RUN: FileCheck --check-prefix=VTABLE-EXTENDED-H %s < %t
-// RUN: FileCheck --check-prefix=VTABLE-PR17738-A %s < %t
+// RUN: %clang_cc1 -fno-rtti -emit-llvm -fdump-vtable-layouts %s -o %t.ll -triple=i386-pc-win32 > %t
+// RUN: FileCheck %s < %t
// RUN: FileCheck --check-prefix=MANGLING %s < %t.ll
// For now, just make sure x86_64 doesn't crash.
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -fdump-vtable-layouts %s -cxx-abi microsoft -triple=x86_64-pc-win32 >/dev/null
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -fdump-vtable-layouts %s -triple=x86_64-pc-win32 > /dev/null
struct V1 {
virtual void f();
@@ -64,11 +54,17 @@ namespace simple {
// jmp Method@Class
struct A : virtual V1 {
- // VTABLE-SIMPLE-A: VFTable for 'V1' in 'simple::A' (2 entries).
- // VTABLE-SIMPLE-A-NEXT: 0 | void simple::A::f()
- // VTABLE-SIMPLE-A-NEXT: [this adjustment: vtordisp at -4, 0 non-virtual]
- // VTABLE-SIMPLE-A-NEXT: 1 | simple::A::~A() [scalar deleting]
- // VTABLE-SIMPLE-A-NEXT: [this adjustment: vtordisp at -4, 0 non-virtual]
+ // CHECK-LABEL: VFTable for 'V1' in 'simple::A' (2 entries).
+ // CHECK-NEXT: 0 | void simple::A::f()
+ // CHECK-NEXT: [this adjustment: vtordisp at -4, 0 non-virtual]
+ // CHECK-NEXT: 1 | simple::A::~A() [scalar deleting]
+ // CHECK-NEXT: [this adjustment: vtordisp at -4, 0 non-virtual]
+
+ // CHECK-LABEL: Thunks for 'simple::A::~A()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: vtordisp at -4, 0 non-virtual]
+
+ // CHECK-LABEL: Thunks for 'void simple::A::f()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: vtordisp at -4, 0 non-virtual]
virtual void f();
// MANGLING-DAG: @"\01?f@A@simple@@$4PPPPPPPM@A@AEXXZ"
@@ -78,18 +74,28 @@ struct A : virtual V1 {
};
A a;
+void use(A *obj) { obj->f(); }
struct B : virtual V3 {
- // VTABLE-SIMPLE-B: VFTable for 'Z' in 'V3' in 'simple::B' (2 entries).
- // VTABLE-SIMPLE-B-NEXT: 0 | void Z::g()
- // VTABLE-SIMPLE-B-NEXT: 1 | simple::B::~B() [scalar deleting]
- // VTABLE-SIMPLE-B-NEXT: [this adjustment: vtordisp at -4, 0 non-virtual]
+ // CHECK-LABEL: VFTable for 'Z' in 'V3' in 'simple::B' (2 entries).
+ // CHECK-NEXT: 0 | void Z::g()
+ // CHECK-NEXT: 1 | simple::B::~B() [scalar deleting]
+ // CHECK-NEXT: [this adjustment: vtordisp at -4, 0 non-virtual]
+
+ // CHECK-LABEL: Thunks for 'simple::B::~B()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: vtordisp at -4, 0 non-virtual]
+
+ // CHECK-LABEL: VFTable for 'V2' in 'V3' in 'simple::B' (2 entries).
+ // CHECK-NEXT: 0 | void simple::B::f()
+ // CHECK-NEXT: [this adjustment: vtordisp at -12, 0 non-virtual]
+ // CHECK-NEXT: 1 | simple::B::~B() [scalar deleting]
+ // CHECK-NEXT: [this adjustment: vtordisp at -12, -8 non-virtual]
- // VTABLE-SIMPLE-B: VFTable for 'V2' in 'V3' in 'simple::B' (2 entries).
- // VTABLE-SIMPLE-B-NEXT: 0 | void simple::B::f()
- // VTABLE-SIMPLE-B-NEXT: [this adjustment: vtordisp at -12, 0 non-virtual]
- // VTABLE-SIMPLE-B-NEXT: 1 | simple::B::~B() [scalar deleting]
- // VTABLE-SIMPLE-B-NEXT: [this adjustment: vtordisp at -12, -8 non-virtual]
+ // CHECK-LABEL: Thunks for 'simple::B::~B()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: vtordisp at -12, -8 non-virtual]
+
+ // CHECK-LABEL: Thunks for 'void simple::B::f()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: vtordisp at -12, 0 non-virtual]
// FIXME: The vtordisp thunk should only get emitted for a constructor
// if "this" leaves scope.
@@ -104,24 +110,40 @@ struct B : virtual V3 {
};
B b;
+void use(B *obj) { obj->f(); }
struct C : virtual V4 {
- // VTABLE-SIMPLE-C: VFTable for 'Z' in 'V4' in 'simple::C' (2 entries).
- // VTABLE-SIMPLE-C-NEXT: 0 | void Z::g()
- // VTABLE-SIMPLE-C-NEXT: 1 | simple::C::~C() [scalar deleting]
- // VTABLE-SIMPLE-C-NEXT: [this adjustment: vtordisp at -4, 0 non-virtual]
-
- // VTABLE-SIMPLE-C: VFTable for 'V1' in 'V4' in 'simple::C' (2 entries).
- // VTABLE-SIMPLE-C-NEXT: 0 | void simple::C::f()
- // VTABLE-SIMPLE-C-NEXT: [this adjustment: vtordisp at -12, 0 non-virtual]
- // VTABLE-SIMPLE-C-NEXT: 1 | simple::C::~C() [scalar deleting]
- // VTABLE-SIMPLE-C-NEXT: [this adjustment: vtordisp at -12, -8 non-virtual]
-
- // VTABLE-SIMPLE-C: VFTable for 'V2' in 'V4' in 'simple::C' (2 entries).
- // VTABLE-SIMPLE-C-NEXT: 0 | void simple::C::f()
- // VTABLE-SIMPLE-C-NEXT: [this adjustment: vtordisp at -16, -4 non-virtual]
- // VTABLE-SIMPLE-C-NEXT: 1 | simple::C::~C() [scalar deleting]
- // VTABLE-SIMPLE-C-NEXT: [this adjustment: vtordisp at -16, -12 non-virtual]
+ // CHECK-LABEL: VFTable for 'Z' in 'V4' in 'simple::C' (2 entries).
+ // CHECK-NEXT: 0 | void Z::g()
+ // CHECK-NEXT: 1 | simple::C::~C() [scalar deleting]
+ // CHECK-NEXT: [this adjustment: vtordisp at -4, 0 non-virtual]
+
+ // CHECK-LABEL: Thunks for 'simple::C::~C()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: vtordisp at -4, 0 non-virtual]
+
+ // CHECK-LABEL: VFTable for 'V1' in 'V4' in 'simple::C' (2 entries).
+ // CHECK-NEXT: 0 | void simple::C::f()
+ // CHECK-NEXT: [this adjustment: vtordisp at -12, 0 non-virtual]
+ // CHECK-NEXT: 1 | simple::C::~C() [scalar deleting]
+ // CHECK-NEXT: [this adjustment: vtordisp at -12, -8 non-virtual]
+
+ // CHECK-LABEL: Thunks for 'simple::C::~C()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: vtordisp at -12, -8 non-virtual]
+
+ // CHECK-LABEL: Thunks for 'void simple::C::f()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: vtordisp at -12, 0 non-virtual]
+
+ // CHECK-LABEL: VFTable for 'V2' in 'V4' in 'simple::C' (2 entries).
+ // CHECK-NEXT: 0 | void simple::C::f()
+ // CHECK-NEXT: [this adjustment: vtordisp at -16, -4 non-virtual]
+ // CHECK-NEXT: 1 | simple::C::~C() [scalar deleting]
+ // CHECK-NEXT: [this adjustment: vtordisp at -16, -12 non-virtual]
+
+ // CHECK-LABEL: Thunks for 'simple::C::~C()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: vtordisp at -16, -12 non-virtual]
+
+ // CHECK-LABEL: Thunks for 'void simple::C::f()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: vtordisp at -16, -4 non-virtual]
int x;
virtual void f();
@@ -134,6 +156,68 @@ struct C : virtual V4 {
};
C c;
+void use(C *obj) { obj->f(); }
+
+class D : B {
+ // CHECK-LABEL: VFTable for 'V2' in 'V3' in 'simple::B' in 'simple::D' (2 entries).
+ // CHECK-NEXT: 0 | void simple::B::f()
+ // CHECK-NEXT: [this adjustment: vtordisp at -12, -4 non-virtual]
+ // CHECK-NEXT: 1 | simple::D::~D() [scalar deleting]
+ // CHECK-NEXT: [this adjustment: vtordisp at -12, -8 non-virtual]
+ D();
+ int z;
+
+ // MANGLING-DAG: @"\01?f@B@simple@@$4PPPPPPPE@3AEXXZ"
+};
+
+D::D() {}
+
+struct E : V3 {
+ virtual void f();
+};
+
+struct F : virtual E {
+ // CHECK-LABEL: VFTable for 'Z' in 'V3' in 'simple::E' in 'simple::F' (2 entries).
+ // CHECK-NEXT: 0 | void simple::F::g()
+ // CHECK-NEXT: [this adjustment: vtordisp at -4, 0 non-virtual]
+ // CHECK-NEXT: 1 | simple::F::~F() [scalar deleting]
+ // CHECK-NEXT: [this adjustment: vtordisp at -4, 0 non-virtual]
+
+ // CHECK-LABEL: VFTable for 'V2' in 'V3' in 'simple::E' in 'simple::F' (2 entries).
+ // CHECK-NEXT: 0 | void simple::E::f()
+ // CHECK-NEXT: 1 | simple::F::~F() [scalar deleting]
+ // CHECK-NEXT: [this adjustment: vtordisp at -12, -8 non-virtual]
+
+ F();
+ virtual void g(); // Force a vtordisp.
+ int f;
+
+ // MANGLING-DAG: @"\01?g@F@simple@@$4PPPPPPPM@A@AEXXZ"{{.*}}??_EF@simple@@$4PPPPPPPM@A@AEPAXI@Z
+ // MANGLING-DAG: ?f@E@simple@@UAEXXZ{{.*}}??_EF@simple@@$4PPPPPPPE@7AEPAXI@Z
+};
+
+F::F() {}
+
+struct G : F {
+ // CHECK-LABEL: VFTable for 'Z' in 'V3' in 'simple::E' in 'simple::F' in 'simple::G' (2 entries).
+ // CHECK-NEXT: 0 | void simple::F::g()
+ // CHECK-NEXT: [this adjustment: vtordisp at -4, -4 non-virtual]
+ // CHECK-NEXT: 1 | simple::G::~G() [scalar deleting]
+ // CHECK-NEXT: [this adjustment: vtordisp at -4, 0 non-virtual]
+
+ // CHECK-LABEL: VFTable for 'V2' in 'V3' in 'simple::E' in 'simple::F' in 'simple::G' (2 entries).
+ // CHECK-NEXT: 0 | void simple::E::f()
+ // CHECK-NEXT: 1 | simple::G::~G() [scalar deleting]
+ // CHECK-NEXT: [this adjustment: vtordisp at -12, -8 non-virtual]
+
+ G();
+ int g;
+
+ // MANGLING-DAG: @"\01?g@F@simple@@$4PPPPPPPM@3AEXXZ"{{.*}}@"\01??_EG@simple@@$4PPPPPPPM@A@AEPAXI@Z"
+ // MANGLING-DAG: @"\01?f@E@simple@@UAEXXZ"{{.*}}@"\01??_EG@simple@@$4PPPPPPPE@7AEPAXI@Z"
+};
+
+G::G() {}
}
namespace extended {
@@ -152,12 +236,16 @@ namespace extended {
// jmp Method@Class
struct A : virtual simple::A {
- // VTABLE-EXTENDED-A: VFTable for 'V1' in 'simple::A' in 'extended::A' (2 entries).
- // VTABLE-EXTENDED-A-NEXT: 0 | void simple::A::f()
- // VTABLE-EXTENDED-A-NEXT: [this adjustment: vtordisp at -4, vbptr at 8 to the left,
- // VTABLE-EXTENDED-A-NEXT: vboffset at 8 in the vbtable, 8 non-virtual]
- // VTABLE-EXTENDED-A-NEXT: 1 | extended::A::~A() [scalar deleting]
- // VTABLE-EXTENDED-A-NEXT: [this adjustment: vtordisp at -4, 0 non-virtual]
+ // CHECK-LABEL: VFTable for 'V1' in 'simple::A' in 'extended::A' (2 entries).
+ // CHECK-NEXT: 0 | void simple::A::f()
+ // CHECK-NEXT: [this adjustment: vtordisp at -4, vbptr at 8 to the left,
+ // CHECK-NEXT: vboffset at 8 in the vbtable, 8 non-virtual]
+ // CHECK-NEXT: 1 | extended::A::~A() [scalar deleting]
+ // CHECK-NEXT: [this adjustment: vtordisp at -4, 0 non-virtual]
+
+ // CHECK-LABEL: Thunks for 'void simple::A::f()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: vtordisp at -4, vbptr at 8 to the left,
+ // CHECK-NEXT: vboffset at 8 in the vbtable, 8 non-virtual]
// `vtordispex{8,8,4294967292,8}'
// MANGLING-DAG: @"\01?f@A@simple@@$R477PPPPPPPM@7AEXXZ"
@@ -168,28 +256,38 @@ struct A : virtual simple::A {
};
A a;
+void use(A *obj) { delete obj; }
struct B : virtual simple::A {
// This class has an implicit dtor. Vdtors don't require vtordispex thunks
// as the most derived class always has an implicit dtor,
// which is a final overrider.
- // VTABLE-EXTENDED-B: VFTable for 'V1' in 'simple::A' in 'extended::B' (2 entries).
+ // CHECK-LABEL: VFTable for 'V1' in 'simple::A' in 'extended::B' (2 entries).
// ...
- // VTABLE-EXTENDED-B: 1 | extended::B::~B() [scalar deleting]
- // VTABLE-EXTENDED-B-NEXT: [this adjustment: vtordisp at -4, 0 non-virtual]
+ // CHECK: 1 | extended::B::~B() [scalar deleting]
+ // CHECK-NEXT: [this adjustment: vtordisp at -4, 0 non-virtual]
+
+ // CHECK-LABEL: Thunks for 'void simple::A::f()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: vtordisp at -4, vbptr at 8 to the left,
+ // CHECK-NEXT: vboffset at 8 in the vbtable, 8 non-virtual]
// vtordisp{4294967292,0}
// MANGLING-DAG: @"\01??_EB@extended@@$4PPPPPPPM@A@AEPAXI@Z"
};
B b;
+void use(B *obj) { delete obj; }
struct C : virtual simple::A {
- // VTABLE-EXTENDED-C: VFTable for 'V1' in 'simple::A' in 'extended::C' (2 entries).
- // VTABLE-EXTENDED-C-NEXT: 0 | void simple::A::f()
- // VTABLE-EXTENDED-C-NEXT: [this adjustment: vtordisp at -4, vbptr at 12 to the left,
- // VTABLE-EXTENDED-C-NEXT: vboffset at 8 in the vbtable, 8 non-virtual]
+ // CHECK-LABEL: VFTable for 'V1' in 'simple::A' in 'extended::C' (2 entries).
+ // CHECK-NEXT: 0 | void simple::A::f()
+ // CHECK-NEXT: [this adjustment: vtordisp at -4, vbptr at 12 to the left,
+ // CHECK-NEXT: vboffset at 8 in the vbtable, 8 non-virtual]
+
+ // CHECK-LABEL: Thunks for 'void simple::A::f()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: vtordisp at -4, vbptr at 12 to the left,
+ // CHECK-NEXT: vboffset at 8 in the vbtable, 8 non-virtual]
// `vtordispex{12,8,4294967292,8}'
// MANGLING-DAG: @"\01?f@A@simple@@$R4M@7PPPPPPPM@7AEXXZ"
@@ -199,6 +297,7 @@ struct C : virtual simple::A {
};
C c;
+void use(C *obj) { delete obj; }
struct D : virtual V2 {
virtual void f();
@@ -207,10 +306,14 @@ struct D : virtual V2 {
};
struct E : virtual D {
- // VTABLE-EXTENDED-E: VFTable for 'V2' in 'extended::D' in 'extended::E' (2 entries).
- // VTABLE-EXTENDED-E-NEXT: 0 | void extended::D::f()
- // VTABLE-EXTENDED-E-NEXT: [this adjustment: vtordisp at -4, vbptr at 8 to the left,
- // VTABLE-EXTENDED-E-NEXT: vboffset at 8 in the vbtable, 12 non-virtual]
+ // CHECK-LABEL: VFTable for 'V2' in 'extended::D' in 'extended::E' (2 entries).
+ // CHECK-NEXT: 0 | void extended::D::f()
+ // CHECK-NEXT: [this adjustment: vtordisp at -4, vbptr at 8 to the left,
+ // CHECK-NEXT: vboffset at 8 in the vbtable, 12 non-virtual]
+
+ // CHECK-LABEL: Thunks for 'void extended::D::f()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: vtordisp at -4, vbptr at 8 to the left,
+ // CHECK-NEXT: vboffset at 8 in the vbtable, 12 non-virtual]
// `vtordispex{8,8,4294967292,12}'
// MANGLING-DAG: @"\01?f@D@extended@@$R477PPPPPPPM@M@AEXXZ"
@@ -220,12 +323,17 @@ struct E : virtual D {
};
E e;
+void use(E *obj) { delete obj; }
struct F : virtual Z, virtual D {
- // VTABLE-EXTENDED-F: VFTable for 'V2' in 'extended::D' in 'extended::F' (2 entries).
- // VTABLE-EXTENDED-F-NEXT: 0 | void extended::D::f()
- // VTABLE-EXTENDED-F-NEXT: [this adjustment: vtordisp at -4, vbptr at 20 to the left,
- // VTABLE-EXTENDED-F-NEXT: vboffset at 12 in the vbtable, 12 non-virtual]
+ // CHECK-LABEL: VFTable for 'V2' in 'extended::D' in 'extended::F' (2 entries).
+ // CHECK-NEXT: 0 | void extended::D::f()
+ // CHECK-NEXT: [this adjustment: vtordisp at -4, vbptr at 20 to the left,
+ // CHECK-NEXT: vboffset at 12 in the vbtable, 12 non-virtual]
+
+ // CHECK-LABEL: Thunks for 'void extended::D::f()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: vtordisp at -4, vbptr at 20 to the left,
+ // CHECK-NEXT: vboffset at 12 in the vbtable, 12 non-virtual]
// `vtordispex{20,12,4294967292,12}'
// MANGLING-DAG: @"\01?f@D@extended@@$R4BE@M@PPPPPPPM@M@AEXXZ"
@@ -235,17 +343,22 @@ struct F : virtual Z, virtual D {
};
F f;
+void use(F *obj) { delete obj; }
struct G : virtual simple::A {
- // VTABLE-EXTENDED-G: VFTable for 'extended::G' (1 entries).
- // VTABLE-EXTENDED-G-NEXT: 0 | void extended::G::g()
+ // CHECK-LABEL: VFTable for 'extended::G' (1 entry).
+ // CHECK-NEXT: 0 | void extended::G::g()
+
+ // CHECK-LABEL: VFTable for 'V1' in 'simple::A' in 'extended::G' (2 entries).
+ // CHECK-NEXT: 0 | void simple::A::f()
+ // CHECK-NEXT: [this adjustment: vtordisp at -4, vbptr at 8 to the left,
+ // CHECK-NEXT: vboffset at 8 in the vbtable, 8 non-virtual]
+ // CHECK-NEXT: 1 | extended::G::~G() [scalar deleting]
+ // CHECK-NEXT: [this adjustment: vtordisp at -4, 0 non-virtual]
- // VTABLE-EXTENDED-G: VFTable for 'V1' in 'simple::A' in 'extended::G' (2 entries).
- // VTABLE-EXTENDED-G-NEXT: 0 | void simple::A::f()
- // VTABLE-EXTENDED-G-NEXT: [this adjustment: vtordisp at -4, vbptr at 8 to the left,
- // VTABLE-EXTENDED-G-NEXT: vboffset at 8 in the vbtable, 8 non-virtual]
- // VTABLE-EXTENDED-G-NEXT: 1 | extended::G::~G() [scalar deleting]
- // VTABLE-EXTENDED-G-NEXT: [this adjustment: vtordisp at -4, 0 non-virtual]
+ // CHECK-LABEL: Thunks for 'void simple::A::f()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: vtordisp at -4, vbptr at 8 to the left,
+ // CHECK-NEXT: vboffset at 8 in the vbtable, 8 non-virtual]
// Emits a G's own vfptr, thus moving the vbptr in the layout.
virtual void g();
@@ -256,22 +369,28 @@ struct G : virtual simple::A {
};
G g;
+void use(G *obj) { obj->g(); }
struct H : Z, A {
- // VTABLE-EXTENDED-H: VFTable for 'Z' in 'extended::H' (2 entries).
- // VTABLE-EXTENDED-H-NEXT: 0 | void Z::g()
- // VTABLE-EXTENDED-H-NEXT: 1 | extended::H::~H() [scalar deleting]
+ // CHECK-LABEL: VFTable for 'Z' in 'extended::H' (2 entries).
+ // CHECK-NEXT: 0 | void Z::g()
+ // CHECK-NEXT: 1 | extended::H::~H() [scalar deleting]
+
+ // CHECK-LABEL: VFTable for 'V1' in 'simple::A' in 'extended::A' in 'extended::H' (2 entries).
+ // CHECK-NEXT: 0 | void simple::A::f()
+ // CHECK-NEXT: [this adjustment: vtordisp at -4, vbptr at 8 to the left,
+ // CHECK-NEXT: vboffset at 8 in the vbtable, 8 non-virtual]
- // VTABLE-EXTENDED-H: VFTable for 'V1' in 'simple::A' in 'extended::A' in 'extended::H' (2 entries).
- // VTABLE-EXTENDED-H-NEXT: 0 | void simple::A::f()
- // VTABLE-EXTENDED-H-NEXT: [this adjustment: vtordisp at -4, vbptr at 8 to the left,
- // VTABLE-EXTENDED-H-NEXT: vboffset at 8 in the vbtable, 8 non-virtual]
+ // CHECK-LABEL: Thunks for 'void simple::A::f()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: vtordisp at -4, vbptr at 8 to the left,
+ // CHECK-NEXT: vboffset at 8 in the vbtable, 8 non-virtual]
// MANGLING-DAG: @"\01?f@A@simple@@$R477PPPPPPPM@7AEXXZ"
// MANGLING-DAG: @"\01??_EH@extended@@$4PPPPPPPM@BA@AEPAXI@Z"
};
H h;
+void use(H *obj) { delete obj; }
}
namespace pr17738 {
@@ -279,10 +398,14 @@ namespace pr17738 {
// Just do the right thing.
struct A : virtual simple::B {
- // VTABLE-PR17738-A: VFTable for 'V2' in 'V3' in 'simple::B' in 'pr17738::A' (2 entries).
- // VTABLE-PR17738-A-NEXT: 0 | void simple::B::f()
- // VTABLE-PR17738-A-NEXT: [this adjustment: vtordisp at -12, vbptr at 20 to the left,
- // VTABLE-PR17738-A-NEXT: vboffset at 8 in the vbtable, 16 non-virtual]
+ // CHECK-LABEL: VFTable for 'V2' in 'V3' in 'simple::B' in 'pr17738::A' (2 entries).
+ // CHECK-NEXT: 0 | void simple::B::f()
+ // CHECK-NEXT: [this adjustment: vtordisp at -12, vbptr at 20 to the left,
+ // CHECK-NEXT: vboffset at 8 in the vbtable, 16 non-virtual]
+
+ // CHECK-LABEL: Thunks for 'void simple::B::f()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: vtordisp at -12, vbptr at 20 to the left,
+ // CHECK-NEXT: vboffset at 8 in the vbtable, 16 non-virtual]
// MANGLING-DAG: @"\01?f@B@simple@@$R4BE@7PPPPPPPE@BA@AEXXZ"
int a;
@@ -290,6 +413,41 @@ struct A : virtual simple::B {
};
A a;
+void use(A *obj) { delete obj; }
+}
+
+namespace pr19408 {
+// In this test, the vptr used to vcall D::f() is located in the A vbase.
+// The offset of A in different in C and D, so the D vtordisp thunk should
+// adjust "this" so C::f gets the right value.
+struct A {
+ A();
+ virtual void f();
+ int a;
+};
+
+struct B : virtual A {
+ B();
+ int b;
+};
+
+struct C : B {
+ C();
+ virtual void f();
+ int c;
+};
+
+struct D : C {
+ // CHECK-LABEL: VFTable for 'pr19408::A' in 'pr19408::B' in 'pr19408::C' in 'pr19408::D' (1 entry).
+ // CHECK-NEXT: 0 | void pr19408::C::f()
+ // CHECK-NEXT: [this adjustment: vtordisp at -4, -4 non-virtual]
+
+ // MANGLING-DAG: @"\01?f@C@pr19408@@$4PPPPPPPM@3AEXXZ"
+ D();
+ int d;
+};
+
+D::D() {}
}
namespace access {
@@ -322,3 +480,90 @@ struct C : virtual B {
C c;
}
+
+namespace pr19505 {
+struct A {
+ virtual void f();
+ virtual void z();
+};
+
+struct B : A {
+ virtual void f();
+};
+
+struct C : A, B {
+ virtual void g();
+};
+
+struct X : B, virtual C {
+ X() {}
+ virtual void g();
+
+ // CHECK-LABEL: VFTable for 'pr19505::A' in 'pr19505::B' in 'pr19505::C' in 'pr19505::X' (2 entries).
+ // CHECK-NEXT: 0 | void pr19505::B::f()
+ // CHECK-NEXT: 1 | void pr19505::A::z()
+
+ // MANGLING-DAG: @"\01??_7X@pr19505@@6BB@1@@" = {{.*}}@"\01?f@B@pr19505@@UAEXXZ"
+} x;
+
+void build_vftable(X *obj) { obj->g(); }
+}
+
+namespace pr19506 {
+struct A {
+ virtual void f();
+ virtual void g();
+};
+
+struct B : A {
+ virtual void f();
+};
+
+struct C : B {};
+
+struct X : C, virtual B {
+ virtual void g();
+ X() {}
+
+ // CHECK-LABEL: VFTable for 'pr19506::A' in 'pr19506::B' in 'pr19506::X' (2 entries).
+ // CHECK-NEXT: 0 | void pr19506::B::f()
+ // CHECK-NEXT: 1 | void pr19506::X::g()
+ // CHECK-NEXT: [this adjustment: vtordisp at -4, -12 non-virtual]
+
+ // MANGLING-DAG: @"\01??_7X@pr19506@@6BB@1@@" = {{.*}}@"\01?f@B@pr19506@@UAEXXZ"
+} x;
+
+void build_vftable(X *obj) { obj->g(); }
+}
+
+namespace pr19519 {
+// VS2013 CL miscompiles this, just make sure we don't regress.
+
+struct A {
+ virtual void f();
+ virtual void g();
+};
+
+struct B : virtual A {
+ virtual void f();
+ B();
+};
+
+struct C : virtual A {
+ virtual void g();
+};
+
+struct X : B, C {
+ X();
+
+ // CHECK-LABEL: VFTable for 'pr19519::A' in 'pr19519::B' in 'pr19519::X' (2 entries).
+ // CHECK-NEXT: 0 | void pr19519::B::f()
+ // CHECK-NEXT: [this adjustment: vtordisp at -4, -4 non-virtual]
+ // CHECK-NEXT: 1 | void pr19519::C::g()
+ // CHECK-NEXT: [this adjustment: vtordisp at -4, -4 non-virtual]
+
+ // MANGLING-DAG: @"\01??_7X@pr19519@@6B@" = {{.*}}@"\01?g@C@pr19519@@$4PPPPPPPM@3AEXXZ"
+};
+
+X::X() {}
+}
diff --git a/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp b/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp
index b58a0b14cdcd..4ce4e9c2e17e 100644
--- a/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp
+++ b/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp
@@ -1,29 +1,5 @@
-// RUN: %clang_cc1 -fno-rtti -emit-llvm -o %t.ll -fdump-vtable-layouts %s -cxx-abi microsoft -triple=i386-pc-win32 >%t
-
-// RUN: FileCheck --check-prefix=VTABLE-C %s < %t
-// RUN: FileCheck --check-prefix=VTABLE-D %s < %t
-// RUN: FileCheck --check-prefix=TEST1 %s < %t
-// RUN: FileCheck --check-prefix=TEST2 %s < %t
-// RUN: FileCheck --check-prefix=TEST3 %s < %t
-// RUN: FileCheck --check-prefix=TEST4 %s < %t
-// RUN: FileCheck --check-prefix=TEST5 %s < %t
-// RUN: FileCheck --check-prefix=TEST6 %s < %t
-// RUN: FileCheck --check-prefix=TEST7 %s < %t
-// RUN: FileCheck --check-prefix=TEST8-X %s < %t
-// RUN: FileCheck --check-prefix=TEST8-Z %s < %t
-// RUN: FileCheck --check-prefix=TEST9-Y %s < %t
-// RUN: FileCheck --check-prefix=TEST9-Z %s < %t
-// RUN: FileCheck --check-prefix=TEST9-W %s < %t
-// RUN: FileCheck --check-prefix=TEST9-T %s < %t
-// RUN: FileCheck --check-prefix=TEST10 %s < %t
-// RUN: FileCheck --check-prefix=VDTORS-Y %s < %t
-// RUN: FileCheck --check-prefix=VDTORS-U %s < %t
-// RUN: FileCheck --check-prefix=VDTORS-V %s < %t
-// RUN: FileCheck --check-prefix=VDTORS-P %s < %t
-// RUN: FileCheck --check-prefix=RET-W %s < %t
-// RUN: FileCheck --check-prefix=RET-T %s < %t
-// RUN: FileCheck --check-prefix=RET-V %s < %t
-
+// RUN: %clang_cc1 -fno-rtti -emit-llvm -o %t.ll -fdump-vtable-layouts %s -triple=i386-pc-win32 >%t
+// RUN: FileCheck %s < %t
// RUN: FileCheck --check-prefix=MANGLING %s < %t.ll
struct Empty { };
@@ -38,34 +14,35 @@ struct B {
};
struct C: virtual A {
- // VTABLE-C: VFTable for 'A' in 'C' (2 entries)
- // VTABLE-C-NEXT: 0 | void C::f()
- // VTABLE-C-NEXT: 1 | void A::z()
+ // CHECK-LABEL: VFTable for 'A' in 'C' (2 entries)
+ // CHECK-NEXT: 0 | void C::f()
+ // CHECK-NEXT: 1 | void A::z()
- // VTABLE-C: VFTable indices for 'C' (1 entries)
- // VTABLE-C-NEXT: vbtable index 1, vfptr at offset 0
- // VTABLE-C-NEXT: 0 | void C::f()
+ // CHECK-LABEL: VFTable indices for 'C' (1 entry)
+ // CHECK-NEXT: vbtable index 1, vfptr at offset 0
+ // CHECK-NEXT: 0 | void C::f()
// MANGLING-DAG: @"\01??_7C@@6B@"
- virtual void f();
+ virtual void f() {}
};
C c;
+void use(C *obj) { obj->f(); }
struct D: virtual A {
- // VTABLE-D: VFTable for 'D' (1 entries).
- // VTABLE-D-NEXT: 0 | void D::h()
+ // CHECK-LABEL: VFTable for 'D' (1 entry).
+ // CHECK-NEXT: 0 | void D::h()
- // VTABLE-D: VFTable for 'A' in 'D' (2 entries).
- // VTABLE-D-NEXT: 0 | void D::f()
- // VTABLE-D-NEXT: 1 | void A::z()
+ // CHECK-LABEL: VFTable for 'A' in 'D' (2 entries).
+ // CHECK-NEXT: 0 | void D::f()
+ // CHECK-NEXT: 1 | void A::z()
- // VTABLE-D: VFTable indices for 'D' (2 entries).
- // VTABLE-D-NEXT: via vfptr at offset 0
- // VTABLE-D-NEXT: 0 | void D::h()
- // VTABLE-D-NEXT: via vbtable index 1, vfptr at offset 0
- // VTABLE-D-NEXT: 0 | void D::f()
+ // CHECK-LABEL: VFTable indices for 'D' (2 entries).
+ // CHECK-NEXT: via vfptr at offset 0
+ // CHECK-NEXT: 0 | void D::h()
+ // CHECK-NEXT: via vbtable index 1, vfptr at offset 0
+ // CHECK-NEXT: 0 | void D::f()
// MANGLING-DAG: @"\01??_7D@@6B0@@"
// MANGLING-DAG: @"\01??_7D@@6BA@@@"
@@ -74,8 +51,8 @@ struct D: virtual A {
virtual void h();
};
-void D::h() {}
D d;
+void use(D *obj) { obj->h(); }
namespace Test1 {
@@ -86,33 +63,34 @@ struct Y : X, A { };
// MANGLING-DAG: @"\01??_7Y@Test1@@6B@"
struct Z : virtual Y {
- // TEST1: VFTable for 'A' in 'Test1::Y' in 'Test1::Z' (2 entries).
- // TEST1-NEXT: 0 | void A::f()
- // TEST1-NEXT: 1 | void A::z()
+ Z();
+ // CHECK-LABEL: VFTable for 'A' in 'Test1::Y' in 'Test1::Z' (2 entries).
+ // CHECK-NEXT: 0 | void A::f()
+ // CHECK-NEXT: 1 | void A::z()
- // TEST1-NOT: VFTable indices for 'Test1::Z'
+ // CHECK-NOT: VFTable indices for 'Test1::Z'
// MANGLING-DAG: @"\01??_7Z@Test1@@6B@"
};
-Z z;
+Z::Z() {}
}
namespace Test2 {
struct X: virtual A, virtual B {
- // TEST2: VFTable for 'Test2::X' (1 entries).
- // TEST2-NEXT: 0 | void Test2::X::h()
+ // CHECK-LABEL: VFTable for 'Test2::X' (1 entry).
+ // CHECK-NEXT: 0 | void Test2::X::h()
- // TEST2: VFTable for 'A' in 'Test2::X' (2 entries).
- // TEST2-NEXT: 0 | void A::f()
- // TEST2-NEXT: 1 | void A::z()
+ // CHECK-LABEL: VFTable for 'A' in 'Test2::X' (2 entries).
+ // CHECK-NEXT: 0 | void A::f()
+ // CHECK-NEXT: 1 | void A::z()
- // TEST2: VFTable for 'B' in 'Test2::X' (1 entries).
- // TEST2-NEXT: 0 | void B::g()
+ // CHECK-LABEL: VFTable for 'B' in 'Test2::X' (1 entry).
+ // CHECK-NEXT: 0 | void B::g()
- // TEST2: VFTable indices for 'Test2::X' (1 entries).
- // TEST2-NEXT: 0 | void Test2::X::h()
+ // CHECK-LABEL: VFTable indices for 'Test2::X' (1 entry).
+ // CHECK-NEXT: 0 | void Test2::X::h()
// MANGLING-DAG: @"\01??_7X@Test2@@6B01@@"
// MANGLING-DAG: @"\01??_7X@Test2@@6BA@@@"
@@ -122,6 +100,7 @@ struct X: virtual A, virtual B {
};
X x;
+void use(X *obj) { obj->h(); }
}
namespace Test3 {
@@ -131,40 +110,45 @@ struct X : virtual A {
};
struct Y: virtual X {
- // TEST3: VFTable for 'A' in 'Test3::X' in 'Test3::Y' (2 entries).
- // TEST3-NEXT: 0 | void A::f()
- // TEST3-NEXT: 1 | void A::z()
+ Y();
+ // CHECK-LABEL: VFTable for 'A' in 'Test3::X' in 'Test3::Y' (2 entries).
+ // CHECK-NEXT: 0 | void A::f()
+ // CHECK-NEXT: 1 | void A::z()
- // TEST3-NOT: VFTable indices for 'Test3::Y'
+ // CHECK-NOT: VFTable indices for 'Test3::Y'
// MANGLING-DAG: @"\01??_7Y@Test3@@6B@"
};
-Y y;
+Y::Y() {}
}
namespace Test4 {
struct X: virtual C {
+ X();
// This one's interesting. C::f expects (A*) to be passed as 'this' and does
// ECX-=4 to cast to (C*). In X, C and A vbases are reordered, so the thunk
// should pass a pointer to the end of X in order
// for ECX-=4 to point at the C part.
- // TEST4: VFTable for 'A' in 'C' in 'Test4::X' (2 entries).
- // TEST4-NEXT: 0 | void C::f()
- // TEST4-NEXT: [this adjustment: 8 non-virtual]
- // TEST4-NEXT: 1 | void A::z()
+ // CHECK-LABEL: VFTable for 'A' in 'C' in 'Test4::X' (2 entries).
+ // CHECK-NEXT: 0 | void C::f()
+ // CHECK-NEXT: [this adjustment: 8 non-virtual]
+ // CHECK-NEXT: 1 | void A::z()
+
+ // CHECK-LABEL: Thunks for 'void C::f()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: 8 non-virtual]
- // TEST4-NOT: VFTable indices for 'Test4::X'
+ // CHECK-NOT: VFTable indices for 'Test4::X'
// MANGLING-DAG: @"\01??_7X@Test4@@6B@"
// Also check the mangling of the thunk.
- // MANGLING-DAG: define weak x86_thiscallcc void @"\01?f@C@@WPPPPPPPI@AEXXZ"
+ // MANGLING-DAG: define linkonce_odr x86_thiscallcc void @"\01?f@C@@WPPPPPPPI@AEXXZ"
};
-X x;
+X::X() {}
}
namespace Test5 {
@@ -176,16 +160,16 @@ struct X : A {
};
struct Y : virtual X {
- // TEST5: VFTable for 'Test5::Y' (1 entries).
- // TEST5-NEXT: 0 | void Test5::Y::h()
+ // CHECK-LABEL: VFTable for 'Test5::Y' (1 entry).
+ // CHECK-NEXT: 0 | void Test5::Y::h()
- // TEST5: VFTable for 'A' in 'Test5::X' in 'Test5::Y' (3 entries).
- // TEST5-NEXT: 0 | void A::f()
- // TEST5-NEXT: 1 | void A::z()
- // TEST5-NEXT: 2 | void Test5::X::g()
+ // CHECK-LABEL: VFTable for 'A' in 'Test5::X' in 'Test5::Y' (3 entries).
+ // CHECK-NEXT: 0 | void A::f()
+ // CHECK-NEXT: 1 | void A::z()
+ // CHECK-NEXT: 2 | void Test5::X::g()
- // TEST5: VFTable indices for 'Test5::Y' (1 entries).
- // TEST5-NEXT: 0 | void Test5::Y::h()
+ // CHECK-LABEL: VFTable indices for 'Test5::Y' (1 entry).
+ // CHECK-NEXT: 0 | void Test5::Y::h()
// MANGLING-DAG: @"\01??_7Y@Test5@@6B01@@"
// MANGLING-DAG: @"\01??_7Y@Test5@@6BX@1@@"
@@ -194,21 +178,23 @@ struct Y : virtual X {
};
Y y;
+void use(Y *obj) { obj->h(); }
}
namespace Test6 {
struct X : A, virtual Empty {
- // TEST6: VFTable for 'A' in 'Test6::X' (2 entries).
- // TEST6-NEXT: 0 | void A::f()
- // TEST6-NEXT: 1 | void A::z()
+ X();
+ // CHECK-LABEL: VFTable for 'A' in 'Test6::X' (2 entries).
+ // CHECK-NEXT: 0 | void A::f()
+ // CHECK-NEXT: 1 | void A::z()
- // TEST6-NOT: VFTable indices for 'Test6::X'
+ // CHECK-NOT: VFTable indices for 'Test6::X'
// MANGLING-DAG: @"\01??_7X@Test6@@6B@"
};
-X x;
+X::X() {}
}
namespace Test7 {
@@ -218,36 +204,37 @@ struct X : C {
};
struct Y : virtual X {
- // TEST7: VFTable for 'A' in 'C' in 'Test7::X' in 'Test7::Y' (2 entries).
- // TEST7-NEXT: 0 | void C::f()
- // TEST7-NEXT: [this adjustment: 8 non-virtual]
- // TEST7-NEXT: 1 | void A::z()
+ Y();
+ // CHECK-LABEL: VFTable for 'A' in 'C' in 'Test7::X' in 'Test7::Y' (2 entries).
+ // CHECK-NEXT: 0 | void C::f()
+ // CHECK-NEXT: [this adjustment: 8 non-virtual]
+ // CHECK-NEXT: 1 | void A::z()
- // TEST7: Thunks for 'void C::f()' (1 entry).
- // TEST7-NEXT: 0 | [this adjustment: 8 non-virtual]
+ // CHECK-LABEL: Thunks for 'void C::f()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: 8 non-virtual]
- // TEST7-NOT: VFTable indices for 'Test7::Y'
+ // CHECK-NOT: VFTable indices for 'Test7::Y'
// MANGLING-DAG: @"\01??_7Y@Test7@@6B@"
};
-Y y;
+Y::Y() {}
}
namespace Test8 {
// This is a typical diamond inheritance with a shared 'A' vbase.
struct X : D, C {
- // TEST8-X: VFTable for 'D' in 'Test8::X' (1 entries).
- // TEST8-X-NEXT: 0 | void D::h()
+ // CHECK-LABEL: VFTable for 'D' in 'Test8::X' (1 entry).
+ // CHECK-NEXT: 0 | void D::h()
- // TEST8-X: VFTable for 'A' in 'D' in 'Test8::X' (2 entries).
- // TEST8-X-NEXT: 0 | void Test8::X::f()
- // TEST8-X-NEXT: 1 | void A::z()
+ // CHECK-LABEL: VFTable for 'A' in 'D' in 'Test8::X' (2 entries).
+ // CHECK-NEXT: 0 | void Test8::X::f()
+ // CHECK-NEXT: 1 | void A::z()
- // TEST8-X: VFTable indices for 'Test8::X' (1 entries).
- // TEST8-X-NEXT: via vbtable index 1, vfptr at offset 0
- // TEST8-X-NEXT: 0 | void Test8::X::f()
+ // CHECK-LABEL: VFTable indices for 'Test8::X' (1 entry).
+ // CHECK-NEXT: via vbtable index 1, vfptr at offset 0
+ // CHECK-NEXT: 0 | void Test8::X::f()
// MANGLING-DAG: @"\01??_7X@Test8@@6BA@@@"
// MANGLING-DAG: @"\01??_7X@Test8@@6BD@@@"
@@ -256,21 +243,45 @@ struct X : D, C {
};
X x;
+void use(X *obj) { obj->f(); }
// Another diamond inheritance which led to AST crashes.
struct Y : virtual A {};
-class Z : Y, C {
- // TEST8-Z: VFTable for 'A' in 'Test8::Y' in 'Test8::Z' (2 entries).
- // TEST8-Z-NEXT: 0 | void Test8::Z::f()
- // TEST8-Z-NEXT: 1 | void A::z()
+struct Z : Y, C {
+ // CHECK-LABEL: VFTable for 'A' in 'Test8::Y' in 'Test8::Z' (2 entries).
+ // CHECK-NEXT: 0 | void Test8::Z::f()
+ // CHECK-NEXT: 1 | void A::z()
- // TEST8-Z: VFTable indices for 'Test8::Z' (1 entries).
- // TEST8-Z-NEXT: via vbtable index 1, vfptr at offset 0
- // TEST8-Z-NEXT: 0 | void Test8::Z::f()
+ // CHECK-LABEL: VFTable indices for 'Test8::Z' (1 entry).
+ // CHECK-NEXT: via vbtable index 1, vfptr at offset 0
+ // CHECK-NEXT: 0 | void Test8::Z::f()
virtual void f();
};
Z z;
+void use(Z *obj) { obj->f(); }
+
+// Another diamond inheritance which we miscompiled (PR18967).
+struct W : virtual A {
+ virtual void bar();
+};
+
+struct T : W, C {
+ // CHECK-LABEL: VFTable for 'Test8::W' in 'Test8::T' (1 entry)
+ // CHECK-NEXT: 0 | void Test8::T::bar()
+
+ // CHECK-LABEL: VFTable for 'A' in 'Test8::W' in 'Test8::T' (2 entries)
+ // CHECK-NEXT: 0 | void C::f()
+ // CHECK-NEXT: [this adjustment: -4 non-virtual]
+ // CHECK-NEXT: 1 | void A::z()
+
+ // CHECK-LABEL: Thunks for 'void C::f()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: -4 non-virtual]
+ virtual void bar();
+ int field;
+};
+T t;
+void use(T *obj) { obj->bar(); }
}
namespace Test9 {
@@ -278,15 +289,15 @@ namespace Test9 {
struct X : A { };
struct Y : virtual X {
- // TEST9-Y: VFTable for 'Test9::Y' (1 entries).
- // TEST9-Y-NEXT: 0 | void Test9::Y::h()
+ // CHECK-LABEL: VFTable for 'Test9::Y' (1 entry).
+ // CHECK-NEXT: 0 | void Test9::Y::h()
- // TEST9-Y: VFTable for 'A' in 'Test9::X' in 'Test9::Y' (2 entries).
- // TEST9-Y-NEXT: 0 | void A::f()
- // TEST9-Y-NEXT: 1 | void A::z()
+ // CHECK-LABEL: VFTable for 'A' in 'Test9::X' in 'Test9::Y' (2 entries).
+ // CHECK-NEXT: 0 | void A::f()
+ // CHECK-NEXT: 1 | void A::z()
- // TEST9-Y: VFTable indices for 'Test9::Y' (1 entries).
- // TEST9-Y-NEXT: 0 | void Test9::Y::h()
+ // CHECK-LABEL: VFTable indices for 'Test9::Y' (1 entry).
+ // CHECK-NEXT: 0 | void Test9::Y::h()
// MANGLING-DAG: @"\01??_7Y@Test9@@6B01@@"
// MANGLING-DAG: @"\01??_7Y@Test9@@6BX@1@@"
@@ -295,115 +306,110 @@ struct Y : virtual X {
};
Y y;
+void use(Y *obj) { obj->h(); }
struct Z : Y, virtual B {
- // TEST9-Z: VFTable for 'Test9::Y' in 'Test9::Z' (1 entries).
- // TEST9-Z-NEXT: 0 | void Test9::Y::h()
+ Z();
+ // CHECK-LABEL: VFTable for 'Test9::Y' in 'Test9::Z' (1 entry).
+ // CHECK-NEXT: 0 | void Test9::Y::h()
- // TEST9-Z: VFTable for 'A' in 'Test9::X' in 'Test9::Y' in 'Test9::Z' (2 entries).
- // TEST9-Z-NEXT: 0 | void A::f()
- // TEST9-Z-NEXT: 1 | void A::z()
+ // CHECK-LABEL: VFTable for 'A' in 'Test9::X' in 'Test9::Y' in 'Test9::Z' (2 entries).
+ // CHECK-NEXT: 0 | void A::f()
+ // CHECK-NEXT: 1 | void A::z()
- // TEST9-Z: VFTable for 'B' in 'Test9::Z' (1 entries).
- // TEST9-Z-NEXT: 0 | void B::g()
+ // CHECK-LABEL: VFTable for 'B' in 'Test9::Z' (1 entry).
+ // CHECK-NEXT: 0 | void B::g()
- // TEST9-Z-NOT: VFTable indices for 'Test9::Z'
+ // CHECK-NOT: VFTable indices for 'Test9::Z'
// MANGLING-DAG: @"\01??_7Z@Test9@@6BX@1@@"
// MANGLING-DAG: @"\01??_7Z@Test9@@6BY@1@@"
- // FIXME this one is wrong:
- // INCORRECT MANGLING-DAG: @"\01??_7Z@Test9@@6BB@@@"
- // MANGLING-DAG-SHOULD-BE: @"\01??_7Z@Test9@@6B@"
+ // MANGLING-DAG: @"\01??_7Z@Test9@@6B@"
};
-Z z;
+Z::Z() {}
struct W : Z, D, virtual A, virtual B {
- // TEST9-W: VFTable for 'Test9::Y' in 'Test9::Z' in 'Test9::W' (1 entries).
- // TEST9-W-NEXT: 0 | void Test9::Y::h()
+ W();
+ // CHECK-LABEL: VFTable for 'Test9::Y' in 'Test9::Z' in 'Test9::W' (1 entry).
+ // CHECK-NEXT: 0 | void Test9::Y::h()
- // TEST9-W: VFTable for 'A' in 'Test9::X' in 'Test9::Y' in 'Test9::Z' in 'Test9::W' (2 entries).
- // TEST9-W-NEXT: 0 | void A::f()
- // TEST9-W-NEXT: 1 | void A::z()
+ // CHECK-LABEL: VFTable for 'A' in 'Test9::X' in 'Test9::Y' in 'Test9::Z' in 'Test9::W' (2 entries).
+ // CHECK-NEXT: 0 | void A::f()
+ // CHECK-NEXT: 1 | void A::z()
- // TEST9-W: VFTable for 'B' in 'Test9::Z' in 'Test9::W' (1 entries).
- // TEST9-W-NEXT: 0 | void B::g()
+ // CHECK-LABEL: VFTable for 'B' in 'Test9::Z' in 'Test9::W' (1 entry).
+ // CHECK-NEXT: 0 | void B::g()
- // TEST9-W: VFTable for 'D' in 'Test9::W' (1 entries).
- // TEST9-W-NEXT: 0 | void D::h()
+ // CHECK-LABEL: VFTable for 'D' in 'Test9::W' (1 entry).
+ // CHECK-NEXT: 0 | void D::h()
- // TEST9-W: VFTable for 'A' in 'D' in 'Test9::W' (2 entries).
- // TEST9-W-NEXT: 0 | void D::f()
- // TEST9-W-NEXT: [this adjustment: -8 non-virtual]
- // TEST9-W-NEXT: 1 | void A::z()
+ // CHECK-LABEL: VFTable for 'A' in 'D' in 'Test9::W' (2 entries).
+ // CHECK-NEXT: 0 | void D::f()
+ // CHECK-NEXT: [this adjustment: -8 non-virtual]
+ // CHECK-NEXT: 1 | void A::z()
- // TEST9-W: Thunks for 'void D::f()' (1 entry).
- // TEST9-W-NEXT: 0 | [this adjustment: -8 non-virtual]
+ // CHECK-LABEL: Thunks for 'void D::f()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: -8 non-virtual]
- // TEST9-W-NOT: VFTable indices for 'Test9::W'
+ // CHECK-NOT: VFTable indices for 'Test9::W'
// MANGLING-DAG: @"\01??_7W@Test9@@6BA@@@"
// MANGLING-DAG: @"\01??_7W@Test9@@6BD@@@"
// MANGLING-DAG: @"\01??_7W@Test9@@6BX@1@@"
- // FIXME: these two are wrong:
- // INCORRECT MANGLING-DAG: @"\01??_7W@Test9@@6BB@@@"
- // MANGLING-DAG-SHOULD-BE: @"\01??_7W@Test9@@6B@"
- // INCORRECT MANGLING-DAG: @"\01??_7W@Test9@@6BY@1@Z@1@@"
- // MANGLING-DAG-SHOULD-BE: @"\01??_7W@Test9@@6BY@1@@"
+ // MANGLING-DAG: @"\01??_7W@Test9@@6B@"
+ // MANGLING-DAG: @"\01??_7W@Test9@@6BY@1@@"
};
-W w;
+W::W() {}
struct T : Z, D, virtual A, virtual B {
- // TEST9-T: VFTable for 'Test9::Y' in 'Test9::Z' in 'Test9::T' (1 entries).
- // TEST9-T-NEXT: 0 | void Test9::T::h()
+ // CHECK-LABEL: VFTable for 'Test9::Y' in 'Test9::Z' in 'Test9::T' (1 entry).
+ // CHECK-NEXT: 0 | void Test9::T::h()
- // TEST9-T: VFTable for 'A' in 'Test9::X' in 'Test9::Y' in 'Test9::Z' in 'Test9::T' (2 entries).
- // TEST9-T-NEXT: 0 | void Test9::T::f()
- // TEST9-T-NEXT: 1 | void Test9::T::z()
+ // CHECK-LABEL: VFTable for 'A' in 'Test9::X' in 'Test9::Y' in 'Test9::Z' in 'Test9::T' (2 entries).
+ // CHECK-NEXT: 0 | void Test9::T::f()
+ // CHECK-NEXT: 1 | void Test9::T::z()
- // TEST9-T: VFTable for 'B' in 'Test9::Z' in 'Test9::T' (1 entries).
- // TEST9-T-NEXT: 0 | void Test9::T::g()
+ // CHECK-LABEL: VFTable for 'B' in 'Test9::Z' in 'Test9::T' (1 entry).
+ // CHECK-NEXT: 0 | void Test9::T::g()
- // TEST9-T: VFTable for 'D' in 'Test9::T' (1 entries).
- // TEST9-T-NEXT: 0 | void Test9::T::h()
- // TEST9-T-NEXT: [this adjustment: -8 non-virtual]
+ // CHECK-LABEL: VFTable for 'D' in 'Test9::T' (1 entry).
+ // CHECK-NEXT: 0 | void Test9::T::h()
+ // CHECK-NEXT: [this adjustment: -8 non-virtual]
- // TEST9-T: Thunks for 'void Test9::T::h()' (1 entry).
- // TEST9-T-NEXT: 0 | [this adjustment: -8 non-virtual]
+ // CHECK-LABEL: Thunks for 'void Test9::T::h()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: -8 non-virtual]
- // TEST9-T: VFTable for 'A' in 'D' in 'Test9::T' (2 entries).
- // TEST9-T-NEXT: 0 | void Test9::T::f()
- // TEST9-T-NEXT: [this adjustment: -8 non-virtual]
- // TEST9-T-NEXT: 1 | void Test9::T::z()
- // TEST9-T-NEXT: [this adjustment: -8 non-virtual]
+ // CHECK-LABEL: VFTable for 'A' in 'D' in 'Test9::T' (2 entries).
+ // CHECK-NEXT: 0 | void Test9::T::f()
+ // CHECK-NEXT: [this adjustment: -8 non-virtual]
+ // CHECK-NEXT: 1 | void Test9::T::z()
+ // CHECK-NEXT: [this adjustment: -8 non-virtual]
- // TEST9-T: Thunks for 'void Test9::T::f()' (1 entry).
- // TEST9-T-NEXT: 0 | [this adjustment: -8 non-virtual]
+ // CHECK-LABEL: Thunks for 'void Test9::T::f()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: -8 non-virtual]
- // TEST9-T: Thunks for 'void Test9::T::z()' (1 entry).
- // TEST9-T-NEXT: 0 | [this adjustment: -8 non-virtual]
+ // CHECK-LABEL: Thunks for 'void Test9::T::z()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: -8 non-virtual]
- // TEST9-T: VFTable indices for 'Test9::T' (4 entries).
- // TEST9-T-NEXT: via vfptr at offset 0
- // TEST9-T-NEXT: 0 | void Test9::T::h()
- // TEST9-T-NEXT: via vbtable index 1, vfptr at offset 0
- // TEST9-T-NEXT: 0 | void Test9::T::f()
- // TEST9-T-NEXT: 1 | void Test9::T::z()
- // TEST9-T-NEXT: via vbtable index 2, vfptr at offset 0
- // TEST9-T-NEXT: 0 | void Test9::T::g()
+ // CHECK-LABEL: VFTable indices for 'Test9::T' (4 entries).
+ // CHECK-NEXT: via vfptr at offset 0
+ // CHECK-NEXT: 0 | void Test9::T::h()
+ // CHECK-NEXT: via vbtable index 1, vfptr at offset 0
+ // CHECK-NEXT: 0 | void Test9::T::f()
+ // CHECK-NEXT: 1 | void Test9::T::z()
+ // CHECK-NEXT: via vbtable index 2, vfptr at offset 0
+ // CHECK-NEXT: 0 | void Test9::T::g()
// MANGLING-DAG: @"\01??_7T@Test9@@6BA@@@"
// MANGLING-DAG: @"\01??_7T@Test9@@6BD@@@"
// MANGLING-DAG: @"\01??_7T@Test9@@6BX@1@@"
- // FIXME: these two are wrong:
- // INCORRECT MANGLING-DAG: @"\01??_7T@Test9@@6BB@@@"
- // MANGLING-DAG-SHOULD-BE: @"\01??_7T@Test9@@6B@"
- // INCORRECT MANGLING-DAG: @"\01??_7T@Test9@@6BY@1@Z@1@@"
- // MANGLING-DAG-SHOULD-BE: @"\01??_7T@Test9@@6BY@1@@"
+ // MANGLING-DAG: @"\01??_7T@Test9@@6B@"
+ // MANGLING-DAG: @"\01??_7T@Test9@@6BY@1@@"
virtual void f();
virtual void g();
@@ -412,22 +418,70 @@ struct T : Z, D, virtual A, virtual B {
};
T t;
+void use(T *obj) { obj->f(); }
}
namespace Test10 {
struct X : virtual C, virtual A {
- // TEST10: VFTable for 'A' in 'C' in 'Test10::X' (2 entries).
- // TEST10-NEXT: 0 | void Test10::X::f()
- // TEST10-NEXT: 1 | void A::z()
+ // CHECK-LABEL: VFTable for 'A' in 'C' in 'Test10::X' (2 entries).
+ // CHECK-NEXT: 0 | void Test10::X::f()
+ // CHECK-NEXT: 1 | void A::z()
- // TEST10: VFTable indices for 'Test10::X' (1 entries).
- // TEST10-NEXT: via vbtable index 1, vfptr at offset 0
- // TEST10-NEXT: 0 | void Test10::X::f()
+ // CHECK-LABEL: VFTable indices for 'Test10::X' (1 entry).
+ // CHECK-NEXT: via vbtable index 1, vfptr at offset 0
+ // CHECK-NEXT: 0 | void Test10::X::f()
virtual void f();
};
void X::f() {}
X x;
+void use(X *obj) { obj->f(); }
+}
+
+namespace Test11 {
+struct X : virtual A {};
+struct Y { virtual void g(); };
+
+struct Z : virtual X, Y {
+ // MANGLING-DAG: @"\01??_7Z@Test11@@6BY@1@@"
+ // MANGLING-DAG: @"\01??_7Z@Test11@@6BX@1@@"
+};
+
+Z z;
+
+struct W : virtual X, A {};
+
+// Used to crash, PR17748.
+W w;
+}
+
+namespace Test12 {
+struct X : B, A { };
+
+struct Y : X {
+ virtual void f(); // Overrides A::f.
+};
+
+struct Z : virtual Y {
+ // CHECK-LABEL: VFTable for 'A' in 'Test12::X' in 'Test12::Y' in 'Test12::Z' (2 entries).
+ // CHECK-NEXT: 0 | void Test12::Y::f()
+ // CHECK-NEXT: 1 | void A::z()
+
+ int z;
+ // MANGLING-DAG: @"\01??_7Z@Test12@@6BA@@@" = {{.*}}@"\01?f@Y@Test12@@UAEXXZ"
+};
+
+struct W : Z {
+ // CHECK-LABEL: VFTable for 'A' in 'Test12::X' in 'Test12::Y' in 'Test12::Z' in 'Test12::W' (2 entries).
+ // CHECK-NEXT: 0 | void Test12::Y::f()
+ // CHECK-NEXT: 1 | void A::z()
+ W();
+
+ int w;
+ // MANGLING-DAG: @"\01??_7W@Test12@@6BA@@@" = {{.*}}@"\01?f@Y@Test12@@UAEXXZ"
+};
+
+W::W() {}
}
namespace vdtors {
@@ -437,15 +491,16 @@ struct X {
};
struct Y : virtual X {
- // VDTORS-Y: VFTable for 'vdtors::X' in 'vdtors::Y' (2 entries).
- // VDTORS-Y-NEXT: 0 | vdtors::Y::~Y() [scalar deleting]
- // VDTORS-Y-NEXT: 1 | void vdtors::X::zzz()
+ // CHECK-LABEL: VFTable for 'vdtors::X' in 'vdtors::Y' (2 entries).
+ // CHECK-NEXT: 0 | vdtors::Y::~Y() [scalar deleting]
+ // CHECK-NEXT: 1 | void vdtors::X::zzz()
- // VDTORS-Y-NOT: Thunks for 'vdtors::Y::~Y()'
+ // CHECK-NOT: Thunks for 'vdtors::Y::~Y()'
virtual ~Y();
};
Y y;
+void use(Y *obj) { delete obj; }
struct Z {
virtual void z();
@@ -456,59 +511,86 @@ struct W : Z, X {
};
struct U : virtual W {
- // VDTORS-U: VFTable for 'vdtors::Z' in 'vdtors::W' in 'vdtors::U' (1 entries).
- // VDTORS-U-NEXT: 0 | void vdtors::Z::z()
+ // CHECK-LABEL: VFTable for 'vdtors::Z' in 'vdtors::W' in 'vdtors::U' (1 entry).
+ // CHECK-NEXT: 0 | void vdtors::Z::z()
- // VDTORS-U: VFTable for 'vdtors::X' in 'vdtors::W' in 'vdtors::U' (2 entries).
- // VDTORS-U-NEXT: 0 | vdtors::U::~U() [scalar deleting]
- // VDTORS-U-NEXT: [this adjustment: -4 non-virtual]
- // VDTORS-U-NEXT: 1 | void vdtors::X::zzz()
+ // CHECK-LABEL: VFTable for 'vdtors::X' in 'vdtors::W' in 'vdtors::U' (2 entries).
+ // CHECK-NEXT: 0 | vdtors::U::~U() [scalar deleting]
+ // CHECK-NEXT: [this adjustment: -4 non-virtual]
+ // CHECK-NEXT: 1 | void vdtors::X::zzz()
- // VDTORS-U: Thunks for 'vdtors::W::~W()' (1 entry).
- // VDTORS-U-NEXT: 0 | [this adjustment: -4 non-virtual]
+ // CHECK-LABEL: Thunks for 'vdtors::U::~U()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: -4 non-virtual]
- // VDTORS-U: VFTable indices for 'vdtors::U' (1 entries).
- // VDTORS-U-NEXT: -- accessible via vbtable index 1, vfptr at offset 4 --
- // VDTORS-U-NEXT: 0 | vdtors::U::~U() [scalar deleting]
+ // CHECK-LABEL: VFTable indices for 'vdtors::U' (1 entry).
+ // CHECK-NEXT: -- accessible via vbtable index 1, vfptr at offset 4 --
+ // CHECK-NEXT: 0 | vdtors::U::~U() [scalar deleting]
virtual ~U();
};
U u;
+void use(U *obj) { delete obj; }
struct V : virtual W {
- // VDTORS-V: VFTable for 'vdtors::Z' in 'vdtors::W' in 'vdtors::V' (1 entries).
- // VDTORS-V-NEXT: 0 | void vdtors::Z::z()
+ // CHECK-LABEL: VFTable for 'vdtors::Z' in 'vdtors::W' in 'vdtors::V' (1 entry).
+ // CHECK-NEXT: 0 | void vdtors::Z::z()
- // VDTORS-V: VFTable for 'vdtors::X' in 'vdtors::W' in 'vdtors::V' (2 entries).
- // VDTORS-V-NEXT: 0 | vdtors::V::~V() [scalar deleting]
- // VDTORS-V-NEXT: [this adjustment: -4 non-virtual]
- // VDTORS-V-NEXT: 1 | void vdtors::X::zzz()
+ // CHECK-LABEL: VFTable for 'vdtors::X' in 'vdtors::W' in 'vdtors::V' (2 entries).
+ // CHECK-NEXT: 0 | vdtors::V::~V() [scalar deleting]
+ // CHECK-NEXT: [this adjustment: -4 non-virtual]
+ // CHECK-NEXT: 1 | void vdtors::X::zzz()
- // VDTORS-V: Thunks for 'vdtors::W::~W()' (1 entry).
- // VDTORS-V-NEXT: 0 | [this adjustment: -4 non-virtual]
+ // CHECK-LABEL: Thunks for 'vdtors::V::~V()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: -4 non-virtual]
- // VDTORS-V: VFTable indices for 'vdtors::V' (1 entries).
- // VDTORS-V-NEXT: -- accessible via vbtable index 1, vfptr at offset 4 --
- // VDTORS-V-NEXT: 0 | vdtors::V::~V() [scalar deleting]
+ // CHECK-LABEL: VFTable indices for 'vdtors::V' (1 entry).
+ // CHECK-NEXT: -- accessible via vbtable index 1, vfptr at offset 4 --
+ // CHECK-NEXT: 0 | vdtors::V::~V() [scalar deleting]
};
V v;
+void use(V *obj) { delete obj; }
struct T : virtual X {
virtual ~T();
};
struct P : T, Y {
- // VDTORS-P: VFTable for 'vdtors::X' in 'vdtors::T' in 'vdtors::P' (2 entries).
- // VDTORS-P-NEXT: 0 | vdtors::P::~P() [scalar deleting]
- // VDTORS-P-NEXT: 1 | void vdtors::X::zzz()
+ // CHECK-LABEL: VFTable for 'vdtors::X' in 'vdtors::T' in 'vdtors::P' (2 entries).
+ // CHECK-NEXT: 0 | vdtors::P::~P() [scalar deleting]
+ // CHECK-NEXT: 1 | void vdtors::X::zzz()
- // VDTORS-P-NOT: Thunks for 'vdtors::P::~P()'
+ // CHECK-NOT: Thunks for 'vdtors::P::~P()'
virtual ~P();
};
P p;
+void use(P *obj) { delete obj; }
+
+struct Q {
+ virtual ~Q();
+};
+
+// PR19172: Yet another diamond we miscompiled.
+struct R : virtual Q, X {
+ // CHECK-LABEL: VFTable for 'vdtors::Q' in 'vdtors::R' (1 entry).
+ // CHECK-NEXT: 0 | vdtors::R::~R() [scalar deleting]
+ // CHECK-NEXT: [this adjustment: -8 non-virtual]
+ // CHECK-LABEL: Thunks for 'vdtors::R::~R()' (1 entry).
+ // CHECK-NEXT: 0 | [this adjustment: -8 non-virtual]
+
+ // CHECK-LABEL: VFTable for 'vdtors::X' in 'vdtors::R' (2 entries).
+ // CHECK-NEXT: 0 | vdtors::R::~R() [scalar deleting]
+ // CHECK-NEXT: 1 | void vdtors::X::zzz()
+
+ // CHECK-LABEL: VFTable indices for 'vdtors::R' (1 entry).
+ // CHECK-NEXT: 0 | vdtors::R::~R() [scalar deleting]
+ virtual ~R();
+};
+
+R r;
+void use(R *obj) { delete obj; }
}
namespace return_adjustment {
@@ -526,50 +608,159 @@ struct Z {
};
struct W : Z {
- // RET-W: VFTable for 'return_adjustment::Z' in 'return_adjustment::W' (2 entries).
- // RET-W-NEXT: 0 | return_adjustment::X *return_adjustment::W::foo()
- // RET-W-NEXT: [return adjustment: vbase #1, 0 non-virtual]
- // RET-W-NEXT: 1 | return_adjustment::X *return_adjustment::W::foo()
+ // CHECK-LABEL: VFTable for 'return_adjustment::Z' in 'return_adjustment::W' (2 entries).
+ // CHECK-NEXT: 0 | return_adjustment::X *return_adjustment::W::foo()
+ // CHECK-NEXT: [return adjustment (to type 'struct A *'): vbase #1, 0 non-virtual]
+ // CHECK-NEXT: 1 | return_adjustment::X *return_adjustment::W::foo()
+
+ // CHECK-LABEL: Thunks for 'return_adjustment::X *return_adjustment::W::foo()' (1 entry).
+ // CHECK-NEXT: 0 | [return adjustment (to type 'struct A *'): vbase #1, 0 non-virtual]
- // RET-W: VFTable indices for 'return_adjustment::W' (1 entries).
- // RET-W-NEXT: 1 | return_adjustment::X *return_adjustment::W::foo()
+ // CHECK-LABEL: VFTable indices for 'return_adjustment::W' (1 entry).
+ // CHECK-NEXT: 1 | return_adjustment::X *return_adjustment::W::foo()
virtual X* foo();
};
-W y;
+W w;
+void use(W *obj) { obj->foo(); }
struct T : W {
- // RET-T: VFTable for 'return_adjustment::Z' in 'return_adjustment::W' in 'return_adjustment::T' (3 entries).
- // RET-T-NEXT: 0 | return_adjustment::Y *return_adjustment::T::foo()
- // RET-T-NEXT: [return adjustment: vbase #1, 0 non-virtual]
- // RET-T-NEXT: 1 | return_adjustment::Y *return_adjustment::T::foo()
- // RET-T-NEXT: [return adjustment: vbase #2, 0 non-virtual]
- // RET-T-NEXT: 2 | return_adjustment::Y *return_adjustment::T::foo()
+ // CHECK-LABEL: VFTable for 'return_adjustment::Z' in 'return_adjustment::W' in 'return_adjustment::T' (3 entries).
+ // CHECK-NEXT: 0 | return_adjustment::Y *return_adjustment::T::foo()
+ // CHECK-NEXT: [return adjustment (to type 'struct A *'): vbase #1, 0 non-virtual]
+ // CHECK-NEXT: 1 | return_adjustment::Y *return_adjustment::T::foo()
+ // CHECK-NEXT: [return adjustment (to type 'struct return_adjustment::X *'): vbase #2, 0 non-virtual]
+ // CHECK-NEXT: 2 | return_adjustment::Y *return_adjustment::T::foo()
+
+ // CHECK-LABEL: Thunks for 'return_adjustment::Y *return_adjustment::T::foo()' (2 entries).
+ // CHECK-NEXT: 0 | [return adjustment (to type 'struct A *'): vbase #1, 0 non-virtual]
+ // CHECK-NEXT: 1 | [return adjustment (to type 'struct return_adjustment::X *'): vbase #2, 0 non-virtual]
- // RET-T: VFTable indices for 'return_adjustment::T' (1 entries).
- // RET-T-NEXT: 2 | return_adjustment::Y *return_adjustment::T::foo()
+ // CHECK-LABEL: VFTable indices for 'return_adjustment::T' (1 entry).
+ // CHECK-NEXT: 2 | return_adjustment::Y *return_adjustment::T::foo()
virtual Y* foo();
};
T t;
+void use(T *obj) { obj->foo(); }
struct U : virtual A {
virtual void g(); // adds a vfptr
};
struct V : Z {
- // RET-V: VFTable for 'return_adjustment::Z' in 'return_adjustment::V' (2 entries).
- // RET-V-NEXT: 0 | return_adjustment::U *return_adjustment::V::foo()
- // RET-V-NEXT: [return adjustment: vbptr at offset 4, vbase #1, 0 non-virtual]
- // RET-V-NEXT: 1 | return_adjustment::U *return_adjustment::V::foo()
+ // CHECK-LABEL: VFTable for 'return_adjustment::Z' in 'return_adjustment::V' (2 entries).
+ // CHECK-NEXT: 0 | return_adjustment::U *return_adjustment::V::foo()
+ // CHECK-NEXT: [return adjustment (to type 'struct A *'): vbptr at offset 4, vbase #1, 0 non-virtual]
+ // CHECK-NEXT: 1 | return_adjustment::U *return_adjustment::V::foo()
+
+ // CHECK-LABEL: Thunks for 'return_adjustment::U *return_adjustment::V::foo()' (1 entry).
+ // CHECK-NEXT: 0 | [return adjustment (to type 'struct A *'): vbptr at offset 4, vbase #1, 0 non-virtual]
- // RET-V: VFTable indices for 'return_adjustment::V' (1 entries).
- // RET-V-NEXT: 1 | return_adjustment::U *return_adjustment::V::foo()
+ // CHECK-LABEL: VFTable indices for 'return_adjustment::V' (1 entry).
+ // CHECK-NEXT: 1 | return_adjustment::U *return_adjustment::V::foo()
virtual U* foo();
};
V v;
+void use(V *obj) { obj->foo(); }
+}
+
+namespace pr17748 {
+struct A {
+ virtual void f() {}
+};
+
+struct B : virtual A {
+ B() {}
+};
+
+struct C : virtual B, A {
+ C() {}
+};
+C c;
+
+// MANGLING-DAG: @"\01??_7A@pr17748@@6B@"
+// MANGLING-DAG: @"\01??_7B@pr17748@@6B@"
+// MANGLING-DAG: @"\01??_7C@pr17748@@6BA@1@@"
+// MANGLING-DAG: @"\01??_7C@pr17748@@6BB@1@@"
+}
+
+namespace pr19066 {
+struct X : virtual B {};
+
+struct Y : virtual X, B {
+ Y();
+ // CHECK-LABEL: VFTable for 'B' in 'pr19066::X' in 'pr19066::Y' (1 entry).
+ // CHECK-NEXT: 0 | void B::g()
+
+ // CHECK-LABEL: VFTable for 'B' in 'pr19066::Y' (1 entry).
+ // CHECK-NEXT: 0 | void B::g()
+};
+
+Y::Y() {}
+}
+
+namespace pr19240 {
+struct A {
+ virtual void c();
+};
+
+struct B : virtual A {
+ virtual void c();
+};
+
+struct C { };
+
+struct D : virtual A, virtual C, B {};
+
+D obj;
+
+// Each MDC only has one vftable.
+
+// MANGLING-DAG: @"\01??_7D@pr19240@@6B@"
+// MANGLING-DAG: @"\01??_7A@pr19240@@6B@"
+// MANGLING-DAG: @"\01??_7B@pr19240@@6B@"
+
+}
+
+namespace pr19408 {
+// This test is a non-vtordisp version of the reproducer for PR19408.
+struct X : virtual A {
+ int x;
+};
+
+struct Y : X {
+ virtual void f();
+ int y;
+};
+
+struct Z : Y {
+ // CHECK-LABEL: VFTable for 'A' in 'pr19408::X' in 'pr19408::Y' in 'pr19408::Z' (2 entries).
+ // CHECK-NEXT: 0 | void pr19408::Y::f()
+ // CHECK-NEXT: [this adjustment: -4 non-virtual]
+ // CHECK-NEXT: 1 | void A::z()
+
+ Z();
+ int z;
+ // MANGLING-DAG: @"\01??_7Z@pr19408@@6B@" = {{.*}}@"\01?f@Y@pr19408@@W3AEXXZ"
+};
+
+Z::Z() {}
+
+struct W : B, Y {
+ // CHECK-LABEL: VFTable for 'A' in 'pr19408::X' in 'pr19408::Y' in 'pr19408::W' (2 entries).
+ // CHECK-NEXT: 0 | void pr19408::Y::f()
+ // CHECK-NEXT: [this adjustment: -4 non-virtual]
+ // CHECK-NEXT: 1 | void A::z()
+
+ W();
+ int w;
+ // MANGLING-DAG: @"\01??_7W@pr19408@@6BY@1@@" = {{.*}}@"\01?f@Y@pr19408@@W3AEXXZ"
+};
+
+W::W() {}
}
diff --git a/test/CodeGenCXX/microsoft-compatibility.cpp b/test/CodeGenCXX/microsoft-compatibility.cpp
new file mode 100644
index 000000000000..297184a1df2a
--- /dev/null
+++ b/test/CodeGenCXX/microsoft-compatibility.cpp
@@ -0,0 +1,21 @@
+// RUN: %clang_cc1 %s -triple i686-pc-win32 -std=c++11 -fms-compatibility -emit-llvm -o - | FileCheck %s
+
+template<class T>
+void destroy(T *p) {
+ p->~T();
+}
+
+extern "C" void f() {
+ int a;
+ destroy((void*)&a);
+}
+
+// CHECK-LABEL: define void @f()
+// CHECK: call void @"\01??$destroy@X@@YAXPAX@Z"
+// CHECK: ret void
+
+// CHECK-LABEL: define linkonce_odr void @"\01??$destroy@X@@YAXPAX@Z"(i8* %p)
+// The pseudo-dtor expr should not generate calls to anything.
+// CHECK-NOT: call
+// CHECK-NOT: invoke
+// CHECK: ret void
diff --git a/test/CodeGenCXX/microsoft-interface.cpp b/test/CodeGenCXX/microsoft-interface.cpp
index 419075a86303..c030d1d0b3b5 100644
--- a/test/CodeGenCXX/microsoft-interface.cpp
+++ b/test/CodeGenCXX/microsoft-interface.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 -fms-extensions -Wno-microsoft -triple=i386-pc-win32 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -fms-extensions -Wno-microsoft -triple=i386-pc-windows-gnu -emit-llvm %s -o - | FileCheck %s
__interface I {
int test() {
@@ -20,24 +20,21 @@ int fn() {
// CHECK: @_ZTV1S = linkonce_odr unnamed_addr constant [3 x i8*] [i8* null, i8* bitcast ({ i8*, i8*, i8* }* @_ZTI1S to i8*), i8* bitcast (i32 (%struct.S*)* @_ZN1S4testEv to i8*)]
// CHECK-LABEL: define i32 @_Z2fnv()
-// CHECK: call void @_ZN1SC1Ev(%struct.S* %s)
-// CHECK: %{{[.0-9A-Z_a-z]+}} = call i32 @_ZN1S4testEv(%struct.S* %s)
+// CHECK: call x86_thiscallcc void @_ZN1SC1Ev(%struct.S* %s)
+// CHECK: %{{[.0-9A-Z_a-z]+}} = call x86_thiscallcc i32 @_ZN1S4testEv(%struct.S* %s)
-// CHECK-LABEL: define linkonce_odr void @_ZN1SC1Ev(%struct.S* %this)
-// CHECK: call void @_ZN1SC2Ev(%struct.S* %{{[.0-9A-Z_a-z]+}})
+// CHECK-LABEL: define linkonce_odr x86_thiscallcc void @_ZN1SC1Ev(%struct.S* %this)
+// CHECK: call x86_thiscallcc void @_ZN1SC2Ev(%struct.S* %{{[.0-9A-Z_a-z]+}})
-// CHECK-LABEL: define linkonce_odr i32 @_ZN1S4testEv(%struct.S* %this)
-// CHECK: %{{[.0-9A-Z_a-z]+}} = call i32 @_ZN1I4testEv(%__interface.I* %{{[.0-9A-Z_a-z]+}})
+// CHECK-LABEL: define linkonce_odr x86_thiscallcc i32 @_ZN1S4testEv(%struct.S* %this)
+// CHECK: %{{[.0-9A-Z_a-z]+}} = call x86_thiscallcc i32 @_ZN1I4testEv(%__interface.I* %{{[.0-9A-Z_a-z]+}})
-// CHECK-LABEL: define linkonce_odr i32 @_ZN1I4testEv(%__interface.I* %this)
+// CHECK-LABEL: define linkonce_odr x86_thiscallcc i32 @_ZN1I4testEv(%__interface.I* %this)
// CHECK: ret i32 1
-// CHECK-LABEL: define linkonce_odr void @_ZN1SC2Ev(%struct.S* %this)
-// CHECK: call void @_ZN1IC2Ev(%__interface.I* %{{[.0-9A-Z_a-z]+}})
+// CHECK-LABEL: define linkonce_odr x86_thiscallcc void @_ZN1SC2Ev(%struct.S* %this)
+// CHECK: call x86_thiscallcc void @_ZN1IC2Ev(%__interface.I* %{{[.0-9A-Z_a-z]+}})
// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTV1S, i64 0, i64 2), i8*** %{{[.0-9A-Z_a-z]+}}
-// CHECK-LABEL: define linkonce_odr void @_ZN1IC2Ev(%__interface.I* %this)
+// CHECK-LABEL: define linkonce_odr x86_thiscallcc void @_ZN1IC2Ev(%__interface.I* %this)
// CHECK: store i8** getelementptr inbounds ([3 x i8*]* @_ZTV1I, i64 0, i64 2), i8*** %{{[.0-9A-Z_a-z]+}}
-
-// CHECK-NOT-LABEL: define linkonce_odr %__interface.I* @_ZN1IaSERKS_(%__interface.I* %this, %__interface.I*)
-// CHECK-NOT-LABEL: define linkonce_odr %__interface.I* @_ZN1IaSEOS_(%__interface.I* %this, %__interface.I*)
diff --git a/test/CodeGenCXX/microsoft-new.cpp b/test/CodeGenCXX/microsoft-new.cpp
index 48e93d4aa0f8..7857e478ef82 100644
--- a/test/CodeGenCXX/microsoft-new.cpp
+++ b/test/CodeGenCXX/microsoft-new.cpp
@@ -1,39 +1,39 @@
-// RUN: %clang_cc1 -triple i686-pc-win32 -fms-compatibility %s -emit-llvm -o - | FileCheck %s
-
-#include <stddef.h>
-
-struct arbitrary_t {} arbitrary;
-void *operator new(size_t size, arbitrary_t);
-
-struct arbitrary2_t {} arbitrary2;
-void *operator new[](size_t size, arbitrary2_t);
-
-namespace PR13164 {
- void f() {
- // MSVC will fall back on the non-array operator new.
- void *a;
- int *p = new(arbitrary) int[4];
- // CHECK: call i8* @_Znwj11arbitrary_t(i32 16, %struct.arbitrary_t*
- }
-
- struct S {
- void *operator new[](size_t size, arbitrary_t);
- };
-
- void g() {
- S *s = new(arbitrary) S[2];
- // CHECK: call i8* @_ZN7PR131641SnaEj11arbitrary_t(i32 2, %struct.arbitrary_t*
- S *s1 = new(arbitrary) S;
- // CHECK: call i8* @_Znwj11arbitrary_t(i32 1, %struct.arbitrary_t*
- }
-
- struct T {
- void *operator new(size_t size, arbitrary2_t);
- };
-
- void h() {
- // This should still call the global operator new[].
- T *t = new(arbitrary2) T[2];
- // CHECK: call i8* @_Znaj12arbitrary2_t(i32 2, %struct.arbitrary2_t*
- }
-}
+// RUN: %clang_cc1 -triple i686-pc-win32 -fms-compatibility %s -emit-llvm -o - | FileCheck %s
+
+#include <stddef.h>
+
+struct arbitrary_t {} arbitrary;
+void *operator new(size_t size, arbitrary_t);
+
+struct arbitrary2_t {} arbitrary2;
+void *operator new[](size_t size, arbitrary2_t);
+
+namespace PR13164 {
+ void f() {
+ // MSVC will fall back on the non-array operator new.
+ void *a;
+ int *p = new(arbitrary) int[4];
+ // CHECK: call i8* @"\01??2@YAPAXIUarbitrary_t@@@Z"(i32 16, %struct.arbitrary_t*
+ }
+
+ struct S {
+ void *operator new[](size_t size, arbitrary_t);
+ };
+
+ void g() {
+ S *s = new(arbitrary) S[2];
+ // CHECK: call i8* @"\01??_US@PR13164@@SAPAXIUarbitrary_t@@@Z"(i32 2, %struct.arbitrary_t*
+ S *s1 = new(arbitrary) S;
+ // CHECK: call i8* @"\01??2@YAPAXIUarbitrary_t@@@Z"(i32 1, %struct.arbitrary_t*
+ }
+
+ struct T {
+ void *operator new(size_t size, arbitrary2_t);
+ };
+
+ void h() {
+ // This should still call the global operator new[].
+ T *t = new(arbitrary2) T[2];
+ // CHECK: call i8* @"\01??_U@YAPAXIUarbitrary2_t@@@Z"(i32 2, %struct.arbitrary2_t*
+ }
+}
diff --git a/test/CodeGenCXX/microsoft-no-rtti-data.cpp b/test/CodeGenCXX/microsoft-no-rtti-data.cpp
new file mode 100644
index 000000000000..d4002c28b1a2
--- /dev/null
+++ b/test/CodeGenCXX/microsoft-no-rtti-data.cpp
@@ -0,0 +1,21 @@
+// RUN: %clang_cc1 %s -fno-rtti-data -triple=i386-pc-win32 -o - -emit-llvm | FileCheck %s
+
+// vftable shouldn't have RTTI data in it.
+// CHECK: @"\01??_7S@@6B@" = linkonce_odr unnamed_addr constant [1 x i8*] [i8* bitcast ({{.*}} @"\01??_GS@@UAEPAXI@Z" to i8*)]
+
+struct type_info;
+namespace std { using ::type_info; }
+
+struct S {
+ virtual ~S();
+} s;
+
+struct U : S {
+ virtual ~U();
+};
+
+extern S *getS();
+
+const std::type_info &ti = typeid(*getS());
+const U &u = dynamic_cast<U &>(*getS());
+// CHECK: call i8* @__RTDynamicCast(i8* %{{.+}}, i32 0, i8* bitcast ({{.*}} @"\01??_R0?AUS@@@8" to i8*), i8* bitcast ({{.*}} @"\01??_R0?AUU@@@8" to i8*), i32 1)
diff --git a/test/CodeGenCXX/microsoft-templ-uuidof.cpp b/test/CodeGenCXX/microsoft-templ-uuidof.cpp
new file mode 100644
index 000000000000..0ee390863837
--- /dev/null
+++ b/test/CodeGenCXX/microsoft-templ-uuidof.cpp
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 -emit-llvm %s -o - -DDEFINE_GUID -triple=i386-pc-win32 -fms-extensions | FileCheck %s --check-prefix=CHECK
+
+struct _GUID;
+
+template <typename>
+struct X {
+};
+
+struct __declspec(uuid("{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}")) A {};
+
+struct B {};
+
+template <>
+struct __declspec(uuid("{BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBBB}")) X<B> {};
+
+struct __declspec(uuid("{CCCCCCCC-CCCC-CCCC-CCCC-CCCCCCCCCCCC}")) C {};
+
+const _GUID &xa = __uuidof(X<A>);
+// CHECK-DAG: @"\01?xa@@3ABU_GUID@@B" = {{.*}} @_GUID_aaaaaaaa_aaaa_aaaa_aaaa_aaaaaaaaaaaa
+
+const _GUID &xb = __uuidof(X<B>);
+// CHECK-DAG: @"\01?xb@@3ABU_GUID@@B" = {{.*}} @_GUID_bbbbbbbb_bbbb_bbbb_bbbb_bbbbbbbbbbbb
+const _GUID &xc = __uuidof(X<C>);
+// CHECK-DAG: @"\01?xc@@3ABU_GUID@@B" = {{.*}} @_GUID_cccccccc_cccc_cccc_cccc_cccccccccccc
+
+template <>
+struct __declspec(uuid("{DDDDDDDD-DDDD-DDDD-DDDD-DDDDDDDDDDDD}")) X<C> {};
+
+template <typename>
+struct __declspec(uuid("{EEEEEEEE-EEEE-EEEE-EEEE-EEEEEEEEEEEE}")) Y {
+};
+
+const _GUID &xd = __uuidof(X<C>);
+// CHECK-DAG: @"\01?xd@@3ABU_GUID@@B" = {{.*}} @_GUID_dddddddd_dddd_dddd_dddd_dddddddddddd
+
+const _GUID &yd = __uuidof(Y<X<C> >);
+// CHECK-DAG: @"\01?yd@@3ABU_GUID@@B" = {{.*}} @_GUID_dddddddd_dddd_dddd_dddd_dddddddddddd
diff --git a/test/CodeGenCXX/microsoft-uuidof.cpp b/test/CodeGenCXX/microsoft-uuidof.cpp
index ab3d9b64c6f8..d57ca8380e39 100644
--- a/test/CodeGenCXX/microsoft-uuidof.cpp
+++ b/test/CodeGenCXX/microsoft-uuidof.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - -DDEFINE_GUID -triple=i386-pc-win32 -fms-extensions | FileCheck %s --check-prefix=CHECK-DEFINE-GUID
-// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -fms-extensions | FileCheck %s
-// RUN: %clang_cc1 -emit-llvm %s -o - -DDEFINE_GUID -DWRONG_GUID -triple=i386-pc-win32 -fms-extensions | FileCheck %s --check-prefix=CHECK-DEFINE-WRONG-GUID
+// RUN: %clang_cc1 -emit-llvm %s -o - -DDEFINE_GUID -triple=i386-pc-linux -fms-extensions | FileCheck %s --check-prefix=CHECK-DEFINE-GUID
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-linux -fms-extensions | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -DDEFINE_GUID -DWRONG_GUID -triple=i386-pc-linux -fms-extensions | FileCheck %s --check-prefix=CHECK-DEFINE-WRONG-GUID
#ifdef DEFINE_GUID
struct _GUID {
diff --git a/test/CodeGenCXX/mingw-new-abi.cpp b/test/CodeGenCXX/mingw-new-abi.cpp
new file mode 100644
index 000000000000..2b05253b0985
--- /dev/null
+++ b/test/CodeGenCXX/mingw-new-abi.cpp
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -emit-llvm -triple i386-pc-mingw32 %s -o - | FileCheck --check-prefix=MINGW %s
+// RUN: %clang_cc1 -emit-llvm -triple i386-pc-cygwin %s -o - | FileCheck --check-prefix=CYGWIN %s
+
+namespace test1 {
+ struct foo {
+ // MINGW: declare x86_thiscallcc void @_ZN5test13foo1fEv
+ // CYGWIN: declare void @_ZN5test13foo1fEv
+ void f();
+ };
+ void g(foo *x) {
+ x->f();
+ }
+}
diff --git a/test/CodeGenCXX/mips-size_t-ptrdiff_t.cpp b/test/CodeGenCXX/mips-size_t-ptrdiff_t.cpp
new file mode 100644
index 000000000000..92e704a0a309
--- /dev/null
+++ b/test/CodeGenCXX/mips-size_t-ptrdiff_t.cpp
@@ -0,0 +1,49 @@
+// RUN: %clang_cc1 -x c++ -emit-llvm -triple=mips-unknown-linux-gnu < %s | FileCheck --check-prefix=O32 %s
+// RUN: %clang_cc1 -x c++ -emit-llvm -triple=mips64-unknown-linux-gnu -target-abi n32 < %s | FileCheck --check-prefix=N32 %s
+// RUN: %clang_cc1 -x c++ -emit-llvm -triple=mips64-unknown-linux-gnu -target-abi n64 < %s | FileCheck --check-prefix=N64 %s
+
+// Test that the size_t is correct for the ABI. It's not sufficient to be the
+// correct size, it must be the same type for correct name mangling.
+
+long *alloc_long() {
+ long *rv = new long; // size_t is implicit in the new operator
+ return rv;
+}
+// O32-LABEL: define i32* @_Z10alloc_longv()
+// O32: call noalias i8* @_Znwj(i32 4)
+
+// N32-LABEL: define i32* @_Z10alloc_longv()
+// N32: call noalias i8* @_Znwj(i32 4)
+
+// N64-LABEL: define i64* @_Z10alloc_longv()
+// N64: call noalias i8* @_Znwm(i64 8)
+
+long *alloc_long_array() {
+ long *rv = new long[2];
+ return rv;
+}
+
+// O32-LABEL: define i32* @_Z16alloc_long_arrayv()
+// O32: call noalias i8* @_Znaj(i32 8)
+
+// N32-LABEL: define i32* @_Z16alloc_long_arrayv()
+// N32: call noalias i8* @_Znaj(i32 8)
+
+// N64-LABEL: define i64* @_Z16alloc_long_arrayv()
+// N64: call noalias i8* @_Znam(i64 16)
+
+#include <stddef.h>
+
+void size_t_arg(size_t a) {
+}
+
+// O32-LABEL: _Z10size_t_argj
+// N32-LABEL: _Z10size_t_argj
+// N64-LABEL: _Z10size_t_argm
+
+void ptrdiff_t_arg(ptrdiff_t a) {
+}
+
+// O32-LABEL: _Z13ptrdiff_t_argi
+// N32-LABEL: _Z13ptrdiff_t_argi
+// N64-LABEL: _Z13ptrdiff_t_argl
diff --git a/test/CodeGenCXX/ms-integer-static-data-members-exported.cpp b/test/CodeGenCXX/ms-integer-static-data-members-exported.cpp
new file mode 100644
index 000000000000..3f868f36ff66
--- /dev/null
+++ b/test/CodeGenCXX/ms-integer-static-data-members-exported.cpp
@@ -0,0 +1,22 @@
+// RUN: %clang_cc1 -emit-llvm -triple=i386-pc-win32 -fms-compatibility %s -o - | FileCheck %s
+
+enum Enum { zero, one, two };
+
+struct __declspec(dllexport) S {
+ // In MS compatibility mode, this counts as a definition.
+ // Since it is exported, it must be emitted even if it's unreferenced.
+ static const short x = 42;
+
+ // This works for enums too.
+ static const Enum y = two;
+
+ struct NonExported {
+ // dllexport is not inherited by this nested class.
+ // Since z is not referenced, it should not be emitted.
+ static const int z = 42;
+ };
+};
+
+// CHECK: @"\01?x@S@@2FB" = weak_odr dllexport constant i16 42, align 2
+// CHECK: @"\01?y@S@@2W4Enum@@B" = weak_odr dllexport constant i32 2, align 4
+// CHECK-NOT: NonExported
diff --git a/test/CodeGenCXX/ms-integer-static-data-members.cpp b/test/CodeGenCXX/ms-integer-static-data-members.cpp
index 00beaa62f190..b02b679d71a1 100644
--- a/test/CodeGenCXX/ms-integer-static-data-members.cpp
+++ b/test/CodeGenCXX/ms-integer-static-data-members.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -emit-llvm -cxx-abi microsoft -triple=i386-pc-win32 %s -o - | FileCheck %s
-// RUN: %clang_cc1 -DINLINE_INIT -emit-llvm -cxx-abi microsoft -triple=i386-pc-win32 %s -o - | FileCheck %s --check-prefix=CHECK-INLINE
-// RUN: %clang_cc1 -DREAL_DEFINITION -emit-llvm -cxx-abi microsoft -triple=i386-pc-win32 %s -o - | FileCheck %s --check-prefix=CHECK-OUTOFLINE
-// RUN: %clang_cc1 -DINLINE_INIT -DREAL_DEFINITION -emit-llvm -cxx-abi microsoft -triple=i386-pc-win32 %s -o - | FileCheck %s --check-prefix=CHECK-INLINE
+// RUN: %clang_cc1 -emit-llvm -triple=i386-pc-win32 -fms-compatibility %s -o - | FileCheck %s
+// RUN: %clang_cc1 -DINLINE_INIT -emit-llvm -triple=i386-pc-win32 -fms-compatibility %s -o - | FileCheck %s --check-prefix=CHECK-INLINE
+// RUN: %clang_cc1 -DREAL_DEFINITION -emit-llvm -triple=i386-pc-win32 -fms-compatibility %s -o - | FileCheck %s --check-prefix=CHECK-OUTOFLINE
+// RUN: %clang_cc1 -DINLINE_INIT -DREAL_DEFINITION -emit-llvm -triple=i386-pc-win32 -fms-compatibility %s -o - | FileCheck %s --check-prefix=CHECK-INLINE
struct S {
// For MS ABI, we emit a linkonce_odr definition here, even though it's really just a declaration.
diff --git a/test/CodeGenCXX/ms_wide_predefined_expr.cpp b/test/CodeGenCXX/ms_wide_predefined_expr.cpp
index 5f0bcdee8c05..3949d39ad52f 100644
--- a/test/CodeGenCXX/ms_wide_predefined_expr.cpp
+++ b/test/CodeGenCXX/ms_wide_predefined_expr.cpp
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 %s -fms-extensions -triple i686-pc-win32 -emit-llvm -o - | FileCheck %s
-// CHECK: @L__FUNCTION__._Z4funcv = private constant [5 x i16] [i16 102, i16 117, i16 110, i16 99, i16 0], align 2
+// CHECK: @"\01??_C@_19DPFBEKIN@?$AAf?$AAu?$AAn?$AAc?$AA?$AA@" = linkonce_odr unnamed_addr constant [5 x i16] [i16 102, i16 117, i16 110, i16 99, i16 0], align 2
void wprint(const wchar_t*);
diff --git a/test/CodeGenCXX/new-array-init.cpp b/test/CodeGenCXX/new-array-init.cpp
index 0e925c0a67eb..65123ea7feef 100644
--- a/test/CodeGenCXX/new-array-init.cpp
+++ b/test/CodeGenCXX/new-array-init.cpp
@@ -6,8 +6,8 @@ void fn(int n) {
// CHECK: store i32 1
// CHECK: store i32 2
// CHECK: store i32 3
- // CHECK: icmp eq i32*
- // CHECK-NEXT: br i1
+ // CHECK: sub {{.*}}, 12
+ // CHECK: call void @llvm.memset
new int[n] { 1, 2, 3 };
}
@@ -31,3 +31,18 @@ void const_sufficient() {
new int[4] { 1, 2, 3 };
// CHECK: ret void
}
+
+// CHECK-LABEL: define void @_Z22check_array_value_initv
+void check_array_value_init() {
+ struct S;
+ new (int S::*[3][4][5]) ();
+
+ // CHECK: call noalias i8* @_Zna{{.}}(i{{32 240|64 480}})
+ // CHECK: getelementptr inbounds i{{32|64}}* {{.*}}, i{{32|64}} 60
+
+ // CHECK: phi
+ // CHECK: store i{{32|64}} -1,
+ // CHECK: getelementptr inbounds i{{32|64}}* {{.*}}, i{{32|64}} 1
+ // CHECK: icmp eq
+ // CHECK: br i1
+}
diff --git a/test/CodeGenCXX/new.cpp b/test/CodeGenCXX/new.cpp
index 91da77a0838a..862161b19385 100644
--- a/test/CodeGenCXX/new.cpp
+++ b/test/CodeGenCXX/new.cpp
@@ -2,6 +2,9 @@
typedef __typeof__(sizeof(0)) size_t;
+// Declare an 'operator new' template to tickle a bug in __builtin_operator_new.
+template<typename T> void *operator new(size_t, int (*)(T));
+
// Ensure that this declaration doesn't cause operator new to lose its
// 'noalias' attribute.
void *operator new[](size_t);
@@ -33,7 +36,6 @@ void *operator new[](size_t, const std::nothrow_t &) throw();
void operator delete(void *, const std::nothrow_t &) throw();
void operator delete[](void *, const std::nothrow_t &) throw();
-
void t2(int* a) {
int* b = new (a) int;
}
@@ -285,7 +287,7 @@ void *operator new(size_t, MyPlacementType);
namespace N3664 {
struct S { S() throw(int); };
- // CHECK-LABEL-LABEL: define void @_ZN5N36641fEv
+ // CHECK-LABEL: define void @_ZN5N36641fEv
void f() {
// CHECK: call noalias i8* @_Znwm(i64 4) [[ATTR_BUILTIN_NEW:#[^ ]*]]
int *p = new int;
@@ -307,7 +309,7 @@ namespace N3664 {
// FIXME: Can we mark this noalias?
// CHECK: declare i8* @_ZnamRKSt9nothrow_t(i64, {{.*}}) [[ATTR_NOBUILTIN_NOUNWIND]]
- // CHECK-LABEL-LABEL: define void @_ZN5N36641gEv
+ // CHECK-LABEL: define void @_ZN5N36641gEv
void g() {
// It's OK for there to be attributes here, so long as we don't have a
// 'builtin' attribute.
@@ -326,6 +328,15 @@ namespace N3664 {
}
}
+namespace builtins {
+ // CHECK-LABEL: define void @_ZN8builtins1fEv
+ void f() {
+ // CHECK: call noalias i8* @_Znwm(i64 4) [[ATTR_BUILTIN_NEW]]
+ // CHECK: call void @_ZdlPv({{.*}}) [[ATTR_BUILTIN_DELETE]]
+ __builtin_operator_delete(__builtin_operator_new(4));
+ }
+}
+
// CHECK-DAG: attributes [[ATTR_NOBUILTIN]] = {{[{].*}} nobuiltin {{.*[}]}}
// CHECK-DAG: attributes [[ATTR_NOBUILTIN_NOUNWIND]] = {{[{].*}} nobuiltin nounwind {{.*[}]}}
diff --git a/test/CodeGenCXX/no-elide-constructors.cpp b/test/CodeGenCXX/no-elide-constructors.cpp
new file mode 100644
index 000000000000..ecb350f43ec9
--- /dev/null
+++ b/test/CodeGenCXX/no-elide-constructors.cpp
@@ -0,0 +1,35 @@
+// RUN: %clang_cc1 -std=c++98 -triple i386-unknown-unknown -fno-elide-constructors -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CXX98
+// RUN: %clang_cc1 -std=c++11 -triple i386-unknown-unknown -fno-elide-constructors -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CXX11
+// RUN: %clang_cc1 -std=c++98 -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CXX98-ELIDE
+// RUN: %clang_cc1 -std=c++11 -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-CXX11-ELIDE
+
+// Reduced from PR12208
+class X {
+public:
+ X();
+ X(const X&);
+#if __cplusplus >= 201103L
+ X(X&&);
+#endif
+ ~X();
+};
+
+// CHECK-LABEL: define void @_Z4Testv(
+X Test()
+{
+ X x;
+
+ // Check that the copy constructor for X is called with result variable as
+ // sret argument.
+ // CHECK-CXX98: call void @_ZN1XC1ERKS_(
+ // CHECK-CXX11: call void @_ZN1XC1EOS_(
+ // CHECK-CXX98-ELIDE-NOT: call void @_ZN1XC1ERKS_(
+ // CHECK-CXX11-ELIDE-NOT: call void @_ZN1XC1EOS_(
+
+ // Make sure that the destructor for X is called.
+ // FIXME: This call is present even in the -ELIDE runs, but is guarded by a
+ // branch that is never taken in those cases. We could generate better IR
+ // here.
+ // CHECK: call void @_ZN1XD1Ev(
+ return x;
+}
diff --git a/test/CodeGenCXX/noinline-template.cpp b/test/CodeGenCXX/noinline-template.cpp
index 51a84f74a650..3dd4366f73e3 100644
--- a/test/CodeGenCXX/noinline-template.cpp
+++ b/test/CodeGenCXX/noinline-template.cpp
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
// This was a problem in Sema, but only shows up as noinline missing
// in CodeGen.
-// CHECK: define linkonce_odr void @_ZN6VectorIiE13growStorageByEv(%struct.Vector* %this) [[NI:#[0-9]+]]
+// CHECK: define linkonce_odr {{.*}}void @_ZN6VectorIiE13growStorageByEv(%struct.Vector* %this) [[NI:#[0-9]+]]
template <class Ty> struct Vector {
void growStorageBy();
diff --git a/test/CodeGenCXX/nrvo.cpp b/test/CodeGenCXX/nrvo.cpp
index b83dd727e0bb..aad287dc3206 100644
--- a/test/CodeGenCXX/nrvo.cpp
+++ b/test/CodeGenCXX/nrvo.cpp
@@ -9,6 +9,14 @@ public:
~X();
};
+template<typename T> struct Y {
+ Y();
+ static Y f() {
+ Y y;
+ return y;
+ }
+};
+
// CHECK-LABEL: define void @_Z5test0v
// CHECK-EH-LABEL: define void @_Z5test0v
X test0() {
@@ -108,12 +116,17 @@ X test2(bool B) {
}
+// CHECK-LABEL: define void @_Z5test3b
X test3(bool B) {
- // FIXME: We don't manage to apply NRVO here, although we could.
- {
+ // CHECK: tail call {{.*}} @_ZN1XC1Ev
+ // CHECK-NOT: call {{.*}} @_ZN1XC1ERKS_
+ // CHECK: call {{.*}} @_ZN1XC1Ev
+ // CHECK: call {{.*}} @_ZN1XC1ERKS_
+ if (B) {
X y;
return y;
}
+ // FIXME: we should NRVO this variable too.
X x;
return x;
}
@@ -156,9 +169,40 @@ X test6() {
return a;
// CHECK: [[A:%.*]] = alloca [[X:%.*]], align 8
// CHECK-NEXT: call {{.*}} @_ZN1XC1Ev([[X]]* [[A]])
- // CHECK-NEXT: call {{.*}} @_ZN1XC1ERKS_([[X]]* {{%.*}}, [[X]]* [[A]])
+ // CHECK-NEXT: call {{.*}} @_ZN1XC1ERKS_([[X]]* {{%.*}}, [[X]]* dereferenceable({{[0-9]+}}) [[A]])
// CHECK-NEXT: call {{.*}} @_ZN1XD1Ev([[X]]* [[A]])
// CHECK-NEXT: ret void
}
+// CHECK-LABEL: define void @_Z5test7b
+X test7(bool b) {
+ // CHECK: tail call {{.*}} @_ZN1XC1Ev
+ // CHECK-NEXT: ret
+ if (b) {
+ X x;
+ return x;
+ }
+ return X();
+}
+
+// CHECK-LABEL: define void @_Z5test8b
+X test8(bool b) {
+ // CHECK: tail call {{.*}} @_ZN1XC1Ev
+ // CHECK-NEXT: ret
+ if (b) {
+ X x;
+ return x;
+ } else {
+ X y;
+ return y;
+ }
+}
+
+Y<int> test9() {
+ Y<int>::f();
+}
+
+// CHECK-LABEL: define linkonce_odr void @_ZN1YIiE1fEv
+// CHECK: tail call {{.*}} @_ZN1YIiEC1Ev
+
// CHECK-EH: attributes [[NR_NUW]] = { noreturn nounwind }
diff --git a/test/CodeGenCXX/pod-member-memcpys.cpp b/test/CodeGenCXX/pod-member-memcpys.cpp
index 5c79568c2ace..31d774c5345e 100644
--- a/test/CodeGenCXX/pod-member-memcpys.cpp
+++ b/test/CodeGenCXX/pod-member-memcpys.cpp
@@ -108,59 +108,59 @@ CALL_AO(InnerClassMember)
CALL_AO(PackedMembers)
// Basic copy-assignment:
-// CHECK-LABEL: define linkonce_odr %struct.Basic* @_ZN5BasicaSERKS_(%struct.Basic* %this, %struct.Basic*)
+// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.Basic* @_ZN5BasicaSERKS_(%struct.Basic* %this, %struct.Basic* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
-// CHECK: call %struct.NonPOD* @_ZN6NonPODaSERKS_
+// CHECK: call dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret %struct.Basic*
// PODMember copy-assignment:
-// CHECK-LABEL: define linkonce_odr %struct.PODMember* @_ZN9PODMemberaSERKS_(%struct.PODMember* %this, %struct.PODMember*)
+// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.PODMember* @_ZN9PODMemberaSERKS_(%struct.PODMember* %this, %struct.PODMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}})
-// CHECK: call %struct.NonPOD* @_ZN6NonPODaSERKS_
+// CHECK: call dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret %struct.PODMember*
// PODLikeMember copy-assignment:
-// CHECK-LABEL: define linkonce_odr %struct.PODLikeMember* @_ZN13PODLikeMemberaSERKS_(%struct.PODLikeMember* %this, %struct.PODLikeMember*)
+// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.PODLikeMember* @_ZN13PODLikeMemberaSERKS_(%struct.PODLikeMember* %this, %struct.PODLikeMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}})
-// CHECK: call %struct.NonPOD* @_ZN6NonPODaSERKS_
+// CHECK: call dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret %struct.PODLikeMember*
// ArrayMember copy-assignment:
-// CHECK-LABEL: define linkonce_odr %struct.ArrayMember* @_ZN11ArrayMemberaSERKS_(%struct.ArrayMember* %this, %struct.ArrayMember*)
+// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.ArrayMember* @_ZN11ArrayMemberaSERKS_(%struct.ArrayMember* %this, %struct.ArrayMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 64, i32 4{{.*}})
-// CHECK: call %struct.NonPOD* @_ZN6NonPODaSERKS_
+// CHECK: call dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 64, i32 4{{.*}})
// CHECK: ret %struct.ArrayMember*
// VolatileMember copy-assignment:
-// CHECK-LABEL: define linkonce_odr %struct.VolatileMember* @_ZN14VolatileMemberaSERKS_(%struct.VolatileMember* %this, %struct.VolatileMember*)
+// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.VolatileMember* @_ZN14VolatileMemberaSERKS_(%struct.VolatileMember* %this, %struct.VolatileMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: load volatile i32* {{.*}}, align 4
// CHECK: store volatile i32 {{.*}}, align 4
-// CHECK: call %struct.NonPOD* @_ZN6NonPODaSERKS_
+// CHECK: call dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret %struct.VolatileMember*
// BitfieldMember copy-assignment:
-// CHECK-LABEL: define linkonce_odr %struct.BitfieldMember* @_ZN14BitfieldMemberaSERKS_(%struct.BitfieldMember* %this, %struct.BitfieldMember*)
+// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.BitfieldMember* @_ZN14BitfieldMemberaSERKS_(%struct.BitfieldMember* %this, %struct.BitfieldMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
-// CHECK: call %struct.NonPOD* @_ZN6NonPODaSERKS_
+// CHECK: call dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 3, i32 1{{.*}})
// CHECK: ret %struct.BitfieldMember*
// InnerClass copy-assignment:
-// CHECK-LABEL: define linkonce_odr %struct.InnerClassMember* @_ZN16InnerClassMemberaSERKS_(%struct.InnerClassMember* %this, %struct.InnerClassMember*)
+// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.InnerClassMember* @_ZN16InnerClassMemberaSERKS_(%struct.InnerClassMember* %this, %struct.InnerClassMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}})
-// CHECK: call %struct.NonPOD* @_ZN6NonPODaSERKS_
+// CHECK: call dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret %struct.InnerClassMember*
// PackedMembers copy-assignment:
-// CHECK-LABEL: define linkonce_odr %struct.PackedMembers* @_ZN13PackedMembersaSERKS_(%struct.PackedMembers* %this, %struct.PackedMembers*)
-// CHECK: call %struct.NonPOD* @_ZN6NonPODaSERKS_
+// CHECK-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.PackedMembers* @_ZN13PackedMembersaSERKS_(%struct.PackedMembers* %this, %struct.PackedMembers* dereferenceable({{[0-9]+}}))
+// CHECK: call dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 1{{.*}})
// CHECK: ret %struct.PackedMembers*
@@ -184,21 +184,21 @@ CALL_CC(PODMember)
CALL_CC(Basic)
// Basic copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN5BasicC2ERKS_(%struct.Basic* %this, %struct.Basic*)
+// CHECK-LABEL: define linkonce_odr void @_ZN5BasicC2ERKS_(%struct.Basic* %this, %struct.Basic* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: call void @_ZN6NonPODC1ERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret void
// PODMember copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN9PODMemberC2ERKS_(%struct.PODMember* %this, %struct.PODMember*)
+// CHECK-LABEL: define linkonce_odr void @_ZN9PODMemberC2ERKS_(%struct.PODMember* %this, %struct.PODMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}})
// CHECK: call void @_ZN6NonPODC1ERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret void
// PODLikeMember copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN13PODLikeMemberC2ERKS_(%struct.PODLikeMember* %this, %struct.PODLikeMember*)
+// CHECK-LABEL: define linkonce_odr void @_ZN13PODLikeMemberC2ERKS_(%struct.PODLikeMember* %this, %struct.PODLikeMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}})
// CHECK: invoke void @_ZN6NonPODC1ERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
@@ -207,14 +207,14 @@ CALL_CC(Basic)
// CHECK: invoke void @_ZN7PODLikeD1Ev
// ArrayMember copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN11ArrayMemberC2ERKS_(%struct.ArrayMember* %this, %struct.ArrayMember*)
+// CHECK-LABEL: define linkonce_odr void @_ZN11ArrayMemberC2ERKS_(%struct.ArrayMember* %this, %struct.ArrayMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 64, i32 4{{.*}})
// CHECK: call void @_ZN6NonPODC1ERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 64, i32 4{{.*}})
// CHECK: ret void
// VolatileMember copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN14VolatileMemberC2ERKS_(%struct.VolatileMember* %this, %struct.VolatileMember*)
+// CHECK-LABEL: define linkonce_odr void @_ZN14VolatileMemberC2ERKS_(%struct.VolatileMember* %this, %struct.VolatileMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: load volatile i32* {{.*}}, align 4
// CHECK: store volatile i32 {{.*}}, align 4
@@ -223,34 +223,34 @@ CALL_CC(Basic)
// CHECK: ret void
// BitfieldMember copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN14BitfieldMemberC2ERKS_(%struct.BitfieldMember* %this, %struct.BitfieldMember*)
+// CHECK-LABEL: define linkonce_odr void @_ZN14BitfieldMemberC2ERKS_(%struct.BitfieldMember* %this, %struct.BitfieldMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: call void @_ZN6NonPODC1ERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 3, i32 1{{.*}})
// CHECK: ret void
// InnerClass copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN16InnerClassMemberC2ERKS_(%struct.InnerClassMember* %this, %struct.InnerClassMember*)
+// CHECK-LABEL: define linkonce_odr void @_ZN16InnerClassMemberC2ERKS_(%struct.InnerClassMember* %this, %struct.InnerClassMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 32, i32 4{{.*}})
// CHECK: call void @_ZN6NonPODC1ERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4{{.*}})
// CHECK: ret void
// ReferenceMember copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN15ReferenceMemberC2ERKS_(%struct.ReferenceMember* %this, %struct.ReferenceMember*)
+// CHECK-LABEL: define linkonce_odr void @_ZN15ReferenceMemberC2ERKS_(%struct.ReferenceMember* %this, %struct.ReferenceMember* dereferenceable({{[0-9]+}}))
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 8{{.*}})
// CHECK: call void @_ZN6NonPODC1ERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 8{{.*}})
// CHECK: ret void
// BitfieldMember2 copy-constructor:
-// CHECK-2-LABEL: define linkonce_odr void @_ZN15BitfieldMember2C2ERKS_(%struct.BitfieldMember2* %this, %struct.BitfieldMember2*)
+// CHECK-2-LABEL: define linkonce_odr void @_ZN15BitfieldMember2C2ERKS_(%struct.BitfieldMember2* %this, %struct.BitfieldMember2* dereferenceable({{[0-9]+}}))
// CHECK-2: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 4, i1 false)
// CHECK-2: call void @_ZN6NonPODC1ERKS_
// CHECK-2: ret void
// PackedMembers copy-assignment:
-// CHECK-LABEL: define linkonce_odr void @_ZN13PackedMembersC2ERKS_(%struct.PackedMembers* %this, %struct.PackedMembers*)
+// CHECK-LABEL: define linkonce_odr void @_ZN13PackedMembersC2ERKS_(%struct.PackedMembers* %this, %struct.PackedMembers* dereferenceable({{[0-9]+}}))
// CHECK: call void @_ZN6NonPODC1ERKS_
// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}}i64 16, i32 1{{.*}})
// CHECK: ret void
diff --git a/test/CodeGenCXX/pointers-to-data-members.cpp b/test/CodeGenCXX/pointers-to-data-members.cpp
index f0199c851dcd..745cf18fce21 100644
--- a/test/CodeGenCXX/pointers-to-data-members.cpp
+++ b/test/CodeGenCXX/pointers-to-data-members.cpp
@@ -202,7 +202,7 @@ namespace BoolPtrToMember {
bool member;
};
- // CHECK-LABEL: define i8* @_ZN15BoolPtrToMember1fERNS_1XEMS0_b
+ // CHECK-LABEL: define dereferenceable({{[0-9]+}}) i8* @_ZN15BoolPtrToMember1fERNS_1XEMS0_b
bool &f(X &x, bool X::*member) {
// CHECK: {{bitcast.* to i8\*}}
// CHECK-NEXT: getelementptr inbounds i8*
diff --git a/test/CodeGenCXX/poly-unsigned.cpp b/test/CodeGenCXX/poly-unsigned.cpp
new file mode 100644
index 000000000000..e2ab430a969e
--- /dev/null
+++ b/test/CodeGenCXX/poly-unsigned.cpp
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios -target-feature +neon -ffreestanding -S -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-UNSIGNED-POLY %s
+// RUN: %clang_cc1 -triple arm64-linux-gnu -target-feature +neon -ffreestanding -S -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-UNSIGNED-POLY %s
+// RUN: %clang_cc1 -triple armv7-apple-ios -ffreestanding -target-cpu cortex-a8 -S -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-SIGNED-POLY %s
+
+#include <arm_neon.h>
+
+// Polynomial types really should be universally unsigned, otherwise casting
+// (say) poly8_t "x^7" to poly16_t would change it to "x^15 + x^14 + ... +
+// x^7". Unfortunately 32-bit ARM ended up in a slightly delicate ABI situation
+// so for now it got that wrong.
+
+poly16_t test_poly8(poly8_t pIn) {
+// CHECK-UNSIGNED-POLY: @_Z10test_poly8h
+// CHECK-UNSIGNED-POLY: zext i8 {{.*}} to i16
+
+// CHECK-SIGNED-POLY: @_Z10test_poly8a
+// CHECK-SIGNED-POLY: sext i8 {{.*}} to i16
+
+ return pIn;
+}
diff --git a/test/CodeGenCXX/pr11797.cpp b/test/CodeGenCXX/pr11797.cpp
index 1098372ce389..2a31090e4218 100644
--- a/test/CodeGenCXX/pr11797.cpp
+++ b/test/CodeGenCXX/pr11797.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -fvisibility hidden -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -fvisibility hidden -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
namespace std __attribute__ ((__visibility__ ("default"))) {}
#pragma GCC visibility push(default)
diff --git a/test/CodeGenCXX/pr12104.cpp b/test/CodeGenCXX/pr12104.cpp
index a62f04b66834..560ffbe5b35c 100644
--- a/test/CodeGenCXX/pr12104.cpp
+++ b/test/CodeGenCXX/pr12104.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -include %S/pr12104.h %s -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -x c++ -emit-pch -o %t %S/pr12104.h
-// RUN: %clang_cc1 -include-pch %t %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -include %S/pr12104.h %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -x c++ -triple %itanium_abi_triple -emit-pch -o %t %S/pr12104.h
+// RUN: %clang_cc1 -include-pch %t %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
template struct Patch<1>;
diff --git a/test/CodeGenCXX/pr13396.cpp b/test/CodeGenCXX/pr13396.cpp
index 3d582c51006b..e41dd39fcc6e 100644
--- a/test/CodeGenCXX/pr13396.cpp
+++ b/test/CodeGenCXX/pr13396.cpp
@@ -7,13 +7,13 @@ struct foo {
};
foo::foo() {
- // CHECK-LABEL: define void @_ZN3fooC1Ev(%struct.foo* inreg %this)
// CHECK-LABEL: define void @_ZN3fooC2Ev(%struct.foo* inreg %this)
+ // CHECK-LABEL: define void @_ZN3fooC1Ev(%struct.foo* inreg %this)
}
foo::~foo() {
- // CHECK-LABEL: define void @_ZN3fooD1Ev(%struct.foo* inreg %this)
// CHECK-LABEL: define void @_ZN3fooD2Ev(%struct.foo* inreg %this)
+ // CHECK-LABEL: define void @_ZN3fooD1Ev(%struct.foo* inreg %this)
}
void dummy() {
diff --git a/test/CodeGenCXX/pr18661.cpp b/test/CodeGenCXX/pr18661.cpp
new file mode 100644
index 000000000000..235867831e28
--- /dev/null
+++ b/test/CodeGenCXX/pr18661.cpp
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 %s -triple %itanium_abi_triple -fcxx-exceptions -fms-extensions -emit-llvm -o - | FileCheck %s
+
+extern "C" {
+ void f();
+
+ // In MS mode we don't validate the exception specification.
+ void f() throw() {
+ }
+}
+
+// PR18661: Clang would fail to emit function definition with mismatching
+// exception specification, even though it was just treated as a warning.
+
+// CHECK: define void @f()
diff --git a/test/CodeGenCXX/pr18962.cpp b/test/CodeGenCXX/pr18962.cpp
new file mode 100644
index 000000000000..ab537b4928e3
--- /dev/null
+++ b/test/CodeGenCXX/pr18962.cpp
@@ -0,0 +1,32 @@
+// RUN: %clang_cc1 -triple i686-linux-gnu %s -emit-llvm -o - | FileCheck %s
+
+class A {
+ // append has to have the same prototype as fn1 to tickle the bug.
+ void (*append)(A *);
+};
+
+class B {};
+class D;
+
+// C has to be non-C++98 POD with available tail padding, making the LLVM base
+// type differ from the complete LLVM type.
+class C {
+ // This member creates a circular LLVM type reference to %class.D.
+ D *m_group;
+ B changeListeners;
+};
+class D : C {};
+
+void fn1(A *p1) {
+}
+
+void
+fn2(C *) {
+}
+
+// We end up using an opaque type for 'append' to avoid circular references.
+// CHECK: %class.A = type { {}* }
+// CHECK: %class.C = type { %class.D*, %class.B }
+// CHECK: %class.D = type { %class.C.base, [3 x i8] }
+// CHECK: %class.C.base = type <{ %class.D*, %class.B }>
+// CHECK: %class.B = type { i8 }
diff --git a/test/CodeGenCXX/pr9965.cpp b/test/CodeGenCXX/pr9965.cpp
index c2d54e19215d..46fd60914b0e 100644
--- a/test/CodeGenCXX/pr9965.cpp
+++ b/test/CodeGenCXX/pr9965.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
struct A { A(); };
template<typename T>
struct X : A // default constructor is not trivial
diff --git a/test/CodeGenCXX/pragma-init_seg.cpp b/test/CodeGenCXX/pragma-init_seg.cpp
new file mode 100644
index 000000000000..3f9ff217e6b6
--- /dev/null
+++ b/test/CodeGenCXX/pragma-init_seg.cpp
@@ -0,0 +1,72 @@
+// RUN: %clang_cc1 %s -triple=i686-pc-win32 -fms-extensions -emit-llvm -o - | FileCheck %s
+
+int f();
+
+// CHECK: $"\01?x@selectany_init@@3HA" = comdat any
+// CHECK: $"\01?x@?$A@H@explicit_template_instantiation@@2HB" = comdat any
+// CHECK: $"\01?x@?$A@H@implicit_template_instantiation@@2HB" = comdat any
+
+namespace simple_init {
+#pragma init_seg(compiler)
+int x = f();
+// CHECK: @"\01?x@simple_init@@3HA" = global i32 0, align 4
+// CHECK: @__cxx_init_fn_ptr = private constant void ()* @"\01??__Ex@simple_init@@YAXXZ", section ".CRT$XCC"
+
+#pragma init_seg(lib)
+int y = f();
+// CHECK: @"\01?y@simple_init@@3HA" = global i32 0, align 4
+// CHECK: @__cxx_init_fn_ptr1 = private constant void ()* @"\01??__Ey@simple_init@@YAXXZ", section ".CRT$XCL"
+
+#pragma init_seg(user)
+int z = f();
+// CHECK: @"\01?z@simple_init@@3HA" = global i32 0, align 4
+// No function pointer! This one goes on @llvm.global_ctors.
+}
+
+#pragma init_seg(".asdf")
+
+namespace internal_init {
+namespace {
+int x = f();
+// CHECK: @"\01?x@?A@internal_init@@3HA" = internal global i32 0, align 4
+// CHECK: @__cxx_init_fn_ptr2 = private constant void ()* @"\01??__Ex@?A@internal_init@@YAXXZ", section ".asdf"
+}
+}
+
+namespace selectany_init {
+int __declspec(selectany) x = f();
+// CHECK: @"\01?x@selectany_init@@3HA" = weak_odr global i32 0, comdat $"\01?x@selectany_init@@3HA", align 4
+// CHECK: @__cxx_init_fn_ptr3 = private constant void ()* @"\01??__Ex@selectany_init@@YAXXZ", section ".asdf", comdat $"\01?x@selectany_init@@3HA"
+}
+
+namespace explicit_template_instantiation {
+template <typename T> struct A { static const int x; };
+template <typename T> const int A<T>::x = f();
+template struct A<int>;
+// CHECK: @"\01?x@?$A@H@explicit_template_instantiation@@2HB" = weak_odr global i32 0, comdat $"\01?x@?$A@H@explicit_template_instantiation@@2HB", align 4
+// CHECK: @__cxx_init_fn_ptr4 = private constant void ()* @"\01??__Ex@?$A@H@explicit_template_instantiation@@2HB@YAXXZ", section ".asdf", comdat $"\01?x@?$A@H@explicit_template_instantiation@@2HB"
+}
+
+namespace implicit_template_instantiation {
+template <typename T> struct A { static const int x; };
+template <typename T> const int A<T>::x = f();
+int g() { return A<int>::x; }
+// CHECK: @"\01?x@?$A@H@implicit_template_instantiation@@2HB" = linkonce_odr global i32 0, comdat $"\01?x@?$A@H@implicit_template_instantiation@@2HB", align 4
+// CHECK: @__cxx_init_fn_ptr5 = private constant void ()* @"\01??__Ex@?$A@H@implicit_template_instantiation@@2HB@YAXXZ", section ".asdf", comdat $"\01?x@?$A@H@implicit_template_instantiation@@2HB"
+}
+
+// ... and here's where we emitted user level ctors.
+// CHECK: @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }]
+// CHECK: [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_pragma_init_seg.cpp, i8* null }]
+
+// We have to mark everything used so we can survive globalopt, even through
+// LTO. There's no way LLVM could really understand if data in the .asdf
+// section is really used or dead.
+//
+// CHECK: @llvm.used = appending global [6 x i8*]
+// CHECK: [i8* bitcast (void ()** @__cxx_init_fn_ptr to i8*),
+// CHECK: i8* bitcast (void ()** @__cxx_init_fn_ptr1 to i8*),
+// CHECK: i8* bitcast (void ()** @__cxx_init_fn_ptr2 to i8*),
+// CHECK: i8* bitcast (void ()** @__cxx_init_fn_ptr3 to i8*),
+// CHECK: i8* bitcast (void ()** @__cxx_init_fn_ptr4 to i8*),
+// CHECK: i8* bitcast (void ()** @__cxx_init_fn_ptr5 to i8*)], section "llvm.metadata"
diff --git a/test/CodeGenCXX/pragma-pack-3.cpp b/test/CodeGenCXX/pragma-pack-3.cpp
new file mode 100644
index 000000000000..49509a5b2a8e
--- /dev/null
+++ b/test/CodeGenCXX/pragma-pack-3.cpp
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 %s -triple=i686-apple-darwin10 -emit-llvm -o - | FileCheck %s
+
+struct Base {
+ char a;
+};
+
+struct Derived_1 : virtual Base
+{
+ char b;
+};
+
+#pragma pack(1)
+struct Derived_2 : Derived_1 {
+ // CHECK: %struct.Derived_2 = type { %struct.Derived_1.base, %struct.Base }
+ // CHECK: %struct.Derived_1.base = type <{ i32 (...)**, i8 }>
+};
+
+Derived_2 x;
diff --git a/test/CodeGenCXX/pragma-weak.cpp b/test/CodeGenCXX/pragma-weak.cpp
index c03307914040..e2d464818edb 100644
--- a/test/CodeGenCXX/pragma-weak.cpp
+++ b/test/CodeGenCXX/pragma-weak.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s
#pragma weak zex
int zex;
@@ -10,7 +10,7 @@ int zex;
#pragma weak foo
struct S { void foo(); };
void S::foo() {}
-// CHECK-LABEL: define void @_ZN1S3fooEv(
+// CHECK-LABEL: define {{.*}}void @_ZN1S3fooEv(
#pragma weak zed
namespace bar { void zed() {} }
diff --git a/test/CodeGenCXX/predefined-expr.cpp b/test/CodeGenCXX/predefined-expr.cpp
index 9062ee095c3a..f901467c4f4b 100644
--- a/test/CodeGenCXX/predefined-expr.cpp
+++ b/test/CodeGenCXX/predefined-expr.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
// CHECK: private unnamed_addr constant [15 x i8] c"externFunction\00"
// CHECK: private unnamed_addr constant [26 x i8] c"void NS::externFunction()\00"
@@ -10,7 +10,7 @@
// CHECK: private unnamed_addr constant [122 x i8] c"static void ClassWithTemplateTemplateParam<char, NS::ClassTemplate>::staticMember() [T = char, Param = NS::ClassTemplate]\00"
// CHECK: private unnamed_addr constant [106 x i8] c"void OuterClass<int *>::MiddleClass::InnerClass<float>::memberFunction(T, U) const [T = int *, U = float]\00"
// CHECK: private unnamed_addr constant [51 x i8] c"void functionTemplateWithCapturedStmt(T) [T = int]\00"
-// CHECK: private unnamed_addr constant [76 x i8] c"auto functionTemplateWithLambda(int)::<anonymous class>::operator()() const\00"
+// CHECK: private unnamed_addr constant [76 x i8] c"auto functionTemplateWithLambda(int)::(anonymous class)::operator()() const\00"
// CHECK: private unnamed_addr constant [65 x i8] c"void functionTemplateWithUnnamedTemplateParameter(T) [T = float]\00"
// CHECK: private unnamed_addr constant [60 x i8] c"void functionTemplateExplicitSpecialization(T) [T = double]\00"
@@ -28,13 +28,13 @@
// CHECK: private unnamed_addr constant [46 x i8] c"void NS::Base::functionTemplate1(T) [T = int]\00"
// CHECK: private unnamed_addr constant [23 x i8] c"anonymousUnionFunction\00"
-// CHECK: private unnamed_addr constant [83 x i8] c"void NS::ContainerForAnonymousRecords::<anonymous union>::anonymousUnionFunction()\00"
+// CHECK: private unnamed_addr constant [83 x i8] c"void NS::ContainerForAnonymousRecords::(anonymous union)::anonymousUnionFunction()\00"
// CHECK: private unnamed_addr constant [24 x i8] c"anonymousStructFunction\00"
-// CHECK: private unnamed_addr constant [85 x i8] c"void NS::ContainerForAnonymousRecords::<anonymous struct>::anonymousStructFunction()\00"
+// CHECK: private unnamed_addr constant [85 x i8] c"void NS::ContainerForAnonymousRecords::(anonymous struct)::anonymousStructFunction()\00"
// CHECK: private unnamed_addr constant [23 x i8] c"anonymousClassFunction\00"
-// CHECK: private unnamed_addr constant [83 x i8] c"void NS::ContainerForAnonymousRecords::<anonymous class>::anonymousClassFunction()\00"
+// CHECK: private unnamed_addr constant [83 x i8] c"void NS::ContainerForAnonymousRecords::(anonymous class)::anonymousClassFunction()\00"
// CHECK: private unnamed_addr constant [12 x i8] c"~Destructor\00"
// CHECK: private unnamed_addr constant [30 x i8] c"NS::Destructor::~Destructor()\00"
@@ -93,7 +93,7 @@
// CHECK: private unnamed_addr constant [59 x i8] c"void ClassInTopLevelNamespace::topLevelNamespaceFunction()\00"
// CHECK: private unnamed_addr constant [27 x i8] c"anonymousNamespaceFunction\00"
-// CHECK: private unnamed_addr constant [84 x i8] c"void <anonymous namespace>::ClassInAnonymousNamespace::anonymousNamespaceFunction()\00"
+// CHECK: private unnamed_addr constant [84 x i8] c"void (anonymous namespace)::ClassInAnonymousNamespace::anonymousNamespaceFunction()\00"
// CHECK: private unnamed_addr constant [19 x i8] c"localClassFunction\00"
// CHECK: private unnamed_addr constant [59 x i8] c"void NS::localClass(int)::LocalClass::localClassFunction()\00"
diff --git a/test/CodeGenCXX/ptr-to-member-function.cpp b/test/CodeGenCXX/ptr-to-member-function.cpp
index 914a90a4be1a..e02b2096be99 100644
--- a/test/CodeGenCXX/ptr-to-member-function.cpp
+++ b/test/CodeGenCXX/ptr-to-member-function.cpp
@@ -1,8 +1,7 @@
-// REQUIRES: x86-registered-target,x86-64-registered-target
-// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -S %s -o %t-64.s
-// RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s
-// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -S %s -o %t-32.s
-// RUN: FileCheck -check-prefix CHECK-LP32 --input-file=%t-32.s %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | \
+// RUN: FileCheck -check-prefix CHECK-LP64 %s
+// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -emit-llvm %s -o - | \
+// RUN: FileCheck -check-prefix CHECK-LP32 %s
// 13.3.3.2 Ranking implicit conversion sequences
extern "C" int printf(...);
@@ -64,8 +63,8 @@ int main()
B1 c = B1(2);
}
-// CHECK-LP64: callq __ZN1XcvM1BFvvEEv
-// CHECK-LP64: callq __Z1gM1CFvvE
+// CHECK-LP64: call { i64, i64 } @_ZN1XcvM1BFvvEEv
+// CHECK-LP64: call void @_Z1gM1CFvvE
-// CHECK-LP32: calll L__ZN1XcvM1BFvvEEv
-// CHECK-LP32: calll __Z1gM1CFvvE
+// CHECK-LP32: call i64 @_ZN1XcvM1BFvvEEv
+// CHECK-LP32: call void @_Z1gM1CFvvE
diff --git a/test/CodeGenCXX/reference-cast.cpp b/test/CodeGenCXX/reference-cast.cpp
index 60ea393af96c..c4be5b78c2e4 100644
--- a/test/CodeGenCXX/reference-cast.cpp
+++ b/test/CodeGenCXX/reference-cast.cpp
@@ -3,7 +3,7 @@
// PR6024
extern int i;
-// CHECK: define i32* @_Z16lvalue_noop_castv() [[NUW:#[0-9]+]]
+// CHECK: define dereferenceable({{[0-9]+}}) i32* @_Z16lvalue_noop_castv() [[NUW:#[0-9]+]]
const int &lvalue_noop_cast() {
if (i == 0)
// CHECK: store i32 17, i32*
@@ -15,7 +15,7 @@ const int &lvalue_noop_cast() {
return 17;
}
-// CHECK-LABEL: define i16* @_Z20lvalue_integral_castv()
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) i16* @_Z20lvalue_integral_castv()
const short &lvalue_integral_cast() {
if (i == 0)
// CHECK: store i16 17, i16*
@@ -27,7 +27,7 @@ const short &lvalue_integral_cast() {
return 17;
}
-// CHECK-LABEL: define i16* @_Z29lvalue_floating_integral_castv()
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) i16* @_Z29lvalue_floating_integral_castv()
const short &lvalue_floating_integral_cast() {
if (i == 0)
// CHECK: store i16 17, i16*
@@ -39,7 +39,7 @@ const short &lvalue_floating_integral_cast() {
return 17.5;
}
-// CHECK-LABEL: define float* @_Z29lvalue_integral_floating_castv()
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) float* @_Z29lvalue_integral_floating_castv()
const float &lvalue_integral_floating_cast() {
if (i == 0)
// CHECK: store float 1.700000e+{{0*}}1, float*
@@ -51,7 +51,7 @@ const float &lvalue_integral_floating_cast() {
return 17;
}
-// CHECK-LABEL: define float* @_Z20lvalue_floating_castv()
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) float* @_Z20lvalue_floating_castv()
const float &lvalue_floating_cast() {
if (i == 0)
// CHECK: store float 1.700000e+{{0*}}1, float*
@@ -65,7 +65,7 @@ const float &lvalue_floating_cast() {
int get_int();
-// CHECK-LABEL: define i8* @_Z24lvalue_integer_bool_castv()
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) i8* @_Z24lvalue_integer_bool_castv()
const bool &lvalue_integer_bool_cast() {
if (i == 0)
// CHECK: call i32 @_Z7get_intv()
@@ -82,7 +82,7 @@ const bool &lvalue_integer_bool_cast() {
float get_float();
-// CHECK-LABEL: define i8* @_Z25lvalue_floating_bool_castv()
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) i8* @_Z25lvalue_floating_bool_castv()
const bool &lvalue_floating_bool_cast() {
if (i == 0)
// CHECK: call float @_Z9get_floatv()
@@ -107,7 +107,7 @@ typedef int (X::*pmf)(int);
pm get_pointer_to_member_data();
pmf get_pointer_to_member_function();
-// CHECK-LABEL: define i8* @_Z26lvalue_ptrmem_to_bool_castv()
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) i8* @_Z26lvalue_ptrmem_to_bool_castv()
const bool &lvalue_ptrmem_to_bool_cast() {
if (i == 0)
// CHECK: call i64 @_Z26get_pointer_to_member_datav()
@@ -125,7 +125,7 @@ const bool &lvalue_ptrmem_to_bool_cast() {
return get_pointer_to_member_data();
}
-// CHECK-LABEL: define i8* @_Z27lvalue_ptrmem_to_bool_cast2v
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) i8* @_Z27lvalue_ptrmem_to_bool_cast2v
const bool &lvalue_ptrmem_to_bool_cast2() {
if (i == 0)
// CHECK: {{call.*_Z30get_pointer_to_member_functionv}}
diff --git a/test/CodeGenCXX/reference-field.cpp b/test/CodeGenCXX/reference-field.cpp
index 031202925952..54e914d0f3fc 100644
--- a/test/CodeGenCXX/reference-field.cpp
+++ b/test/CodeGenCXX/reference-field.cpp
@@ -1,6 +1,8 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s -O2 | grep "@_Z1bv"
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -o - %s -O2 | FileCheck %s
// Make sure the call to b() doesn't get optimized out.
extern struct x {char& x,y;}y;
int b();
int a() { if (!&y.x) b(); }
+
+// CHECK: @_Z1bv
diff --git a/test/CodeGenCXX/reference-init.cpp b/test/CodeGenCXX/reference-init.cpp
index d47b1f37489c..3a3eaeee78f6 100644
--- a/test/CodeGenCXX/reference-init.cpp
+++ b/test/CodeGenCXX/reference-init.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm-only -verify %s
+// RUN: %clang_cc1 -emit-llvm-only -triple %itanium_abi_triple -verify %s
// expected-no-diagnostics
struct XPTParamDescriptor {};
diff --git a/test/CodeGenCXX/references.cpp b/test/CodeGenCXX/references.cpp
index ec7a3d5daa8f..454c306a13a7 100644
--- a/test/CodeGenCXX/references.cpp
+++ b/test/CodeGenCXX/references.cpp
@@ -241,7 +241,7 @@ struct A {
};
// CHECK-LABEL: define internal void @__cxx_global_var_init
-// CHECK: call void @_ZN2N31AC1Ei(%"struct.N3::A"* @_ZGRN2N35sA123E, i32 123)
+// CHECK: call void @_ZN2N31AC1Ei(%"struct.N3::A"* @_ZGRN2N35sA123E_, i32 123)
// CHECK: call i32 @__cxa_atexit
// CHECK: ret void
const A &sA123 = A(123);
@@ -256,7 +256,7 @@ struct A {
void f() {
// CHECK-LABEL: define void @_ZN2N41fEv
- // CHECK: call void @_ZN2N41AC1Ev(%"struct.N4::A"* @_ZGRZN2N41fEvE2ar)
+ // CHECK: call void @_ZN2N41AC1Ev(%"struct.N4::A"* @_ZGRZN2N41fEvE2ar_)
// CHECK: call i32 @__cxa_atexit
// CHECK: ret void
static const A& ar = A();
diff --git a/test/CodeGenCXX/return.cpp b/test/CodeGenCXX/return.cpp
index 1975055fdb74..5c1cfdaeed75 100644
--- a/test/CodeGenCXX/return.cpp
+++ b/test/CodeGenCXX/return.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang_cc1 -emit-llvm -O -o - %s | FileCheck %s --check-prefix=CHECK-OPT
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -O -o - %s | FileCheck %s --check-prefix=CHECK-OPT
// CHECK: @_Z9no_return
// CHECK-OPT: @_Z9no_return
diff --git a/test/CodeGenCXX/rtti-fundamental.cpp b/test/CodeGenCXX/rtti-fundamental.cpp
index 2495e969bff8..e70c3aa36597 100644
--- a/test/CodeGenCXX/rtti-fundamental.cpp
+++ b/test/CodeGenCXX/rtti-fundamental.cpp
@@ -15,102 +15,107 @@ namespace __cxxabiv1 {
}
// void
-// CHECK: @_ZTIv = unnamed_addr constant
-// CHECK: @_ZTIPv = unnamed_addr constant
-// CHECK: @_ZTIPKv = unnamed_addr constant
+// CHECK: @_ZTIv = constant
+// CHECK: @_ZTIPv = constant
+// CHECK: @_ZTIPKv = constant
// std::nullptr_t
-// CHECK: @_ZTIDn = unnamed_addr constant
-// CHECK: @_ZTIPDn = unnamed_addr constant
-// CHECK: @_ZTIPKDn = unnamed_addr constant
+// CHECK: @_ZTIDn = constant
+// CHECK: @_ZTIPDn = constant
+// CHECK: @_ZTIPKDn = constant
// bool
-// CHECK: @_ZTIb = unnamed_addr constant
-// CHECK: @_ZTIPb = unnamed_addr constant
-// CHECK: @_ZTIPKb = unnamed_addr constant
+// CHECK: @_ZTIb = constant
+// CHECK: @_ZTIPb = constant
+// CHECK: @_ZTIPKb = constant
// wchar_t
-// CHECK: @_ZTIw = unnamed_addr constant
-// CHECK: @_ZTIPw = unnamed_addr constant
-// CHECK: @_ZTIPKw = unnamed_addr constant
+// CHECK: @_ZTIw = constant
+// CHECK: @_ZTIPw = constant
+// CHECK: @_ZTIPKw = constant
// char
-// CHECK: @_ZTIc = unnamed_addr constant
-// CHECK: @_ZTIPc = unnamed_addr constant
-// CHECK: @_ZTIPKc = unnamed_addr constant
+// CHECK: @_ZTIc = constant
+// CHECK: @_ZTIPc = constant
+// CHECK: @_ZTIPKc = constant
// unsigned char
-// CHECK: @_ZTIh = unnamed_addr constant
-// CHECK: @_ZTIPh = unnamed_addr constant
-// CHECK: @_ZTIPKh = unnamed_addr constant
+// CHECK: @_ZTIh = constant
+// CHECK: @_ZTIPh = constant
+// CHECK: @_ZTIPKh = constant
// signed char
-// CHECK: @_ZTIa = unnamed_addr constant
-// CHECK: @_ZTIPa = unnamed_addr constant
-// CHECK: @_ZTIPKa = unnamed_addr constant
+// CHECK: @_ZTIa = constant
+// CHECK: @_ZTIPa = constant
+// CHECK: @_ZTIPKa = constant
// short
-// CHECK: @_ZTIs = unnamed_addr constant
-// CHECK: @_ZTIPs = unnamed_addr constant
-// CHECK: @_ZTIPKs = unnamed_addr constant
+// CHECK: @_ZTIs = constant
+// CHECK: @_ZTIPs = constant
+// CHECK: @_ZTIPKs = constant
// unsigned short
-// CHECK: @_ZTIt = unnamed_addr constant
-// CHECK: @_ZTIPt = unnamed_addr constant
-// CHECK: @_ZTIPKt = unnamed_addr constant
+// CHECK: @_ZTIt = constant
+// CHECK: @_ZTIPt = constant
+// CHECK: @_ZTIPKt = constant
// int
-// CHECK: @_ZTIi = unnamed_addr constant
-// CHECK: @_ZTIPi = unnamed_addr constant
-// CHECK: @_ZTIPKi = unnamed_addr constant
+// CHECK: @_ZTIi = constant
+// CHECK: @_ZTIPi = constant
+// CHECK: @_ZTIPKi = constant
// unsigned int
-// CHECK: @_ZTIj = unnamed_addr constant
-// CHECK: @_ZTIPj = unnamed_addr constant
-// CHECK: @_ZTIPKj = unnamed_addr constant
+// CHECK: @_ZTIj = constant
+// CHECK: @_ZTIPj = constant
+// CHECK: @_ZTIPKj = constant
// long
-// CHECK: @_ZTIl = unnamed_addr constant
-// CHECK: @_ZTIPl = unnamed_addr constant
-// CHECK: @_ZTIPKl = unnamed_addr constant
+// CHECK: @_ZTIl = constant
+// CHECK: @_ZTIPl = constant
+// CHECK: @_ZTIPKl = constant
// unsigned long
-// CHECK: @_ZTIm = unnamed_addr constant
-// CHECK: @_ZTIPm = unnamed_addr constant
-// CHECK: @_ZTIPKm = unnamed_addr constant
+// CHECK: @_ZTIm = constant
+// CHECK: @_ZTIPm = constant
+// CHECK: @_ZTIPKm = constant
// long long
-// CHECK: @_ZTIx = unnamed_addr constant
-// CHECK: @_ZTIPx = unnamed_addr constant
-// CHECK: @_ZTIPKx = unnamed_addr constant
+// CHECK: @_ZTIx = constant
+// CHECK: @_ZTIPx = constant
+// CHECK: @_ZTIPKx = constant
// unsigned long long
-// CHECK: @_ZTIy = unnamed_addr constant
-// CHECK: @_ZTIPy = unnamed_addr constant
-// CHECK: @_ZTIPKy = unnamed_addr constant
+// CHECK: @_ZTIy = constant
+// CHECK: @_ZTIPy = constant
+// CHECK: @_ZTIPKy = constant
+
+// half
+// CHECK: @_ZTIDh = constant
+// CHECK: @_ZTIPDh = constant
+// CHECK: @_ZTIPKDh = constant
// float
-// CHECK: @_ZTIf = unnamed_addr constant
-// CHECK: @_ZTIPf = unnamed_addr constant
-// CHECK: @_ZTIPKf = unnamed_addr constant
+// CHECK: @_ZTIf = constant
+// CHECK: @_ZTIPf = constant
+// CHECK: @_ZTIPKf = constant
// double
-// CHECK: @_ZTId = unnamed_addr constant
-// CHECK: @_ZTIPd = unnamed_addr constant
-// CHECK: @_ZTIPKd = unnamed_addr constant
+// CHECK: @_ZTId = constant
+// CHECK: @_ZTIPd = constant
+// CHECK: @_ZTIPKd = constant
// long double
-// CHECK: @_ZTIe = unnamed_addr constant
-// CHECK: @_ZTIPe = unnamed_addr constant
-// CHECK: @_ZTIPKe = unnamed_addr constant
+// CHECK: @_ZTIe = constant
+// CHECK: @_ZTIPe = constant
+// CHECK: @_ZTIPKe = constant
// char16_t
-// CHECK: @_ZTIDs = unnamed_addr constant
-// CHECK: @_ZTIPDs = unnamed_addr constant
-// CHECK: @_ZTIPKDs = unnamed_addr constant
+// CHECK: @_ZTIDs = constant
+// CHECK: @_ZTIPDs = constant
+// CHECK: @_ZTIPKDs = constant
// char32_t
-// CHECK: @_ZTIDi = unnamed_addr constant
-// CHECK: @_ZTIPDi = unnamed_addr constant
-// CHECK: @_ZTIPKDi = unnamed_addr constant
+// CHECK: @_ZTIDi = constant
+// CHECK: @_ZTIPDi = constant
+// CHECK: @_ZTIPKDi = constant
diff --git a/test/CodeGenCXX/rtti-linkage.cpp b/test/CodeGenCXX/rtti-linkage.cpp
index 42fe43523404..3b06d426e5a9 100644
--- a/test/CodeGenCXX/rtti-linkage.cpp
+++ b/test/CodeGenCXX/rtti-linkage.cpp
@@ -1,56 +1,75 @@
-// RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -fhidden-weak-vtables -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -fvisibility hidden -fhidden-weak-vtables -emit-llvm -o - | FileCheck -check-prefix=CHECK-WITH-HIDDEN %s
+// RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s -check-prefix=CHECK -check-prefix=CHECK-BOTH
+// RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -fvisibility hidden -emit-llvm -o - | FileCheck -check-prefix=CHECK-WITH-HIDDEN -check-prefix=CHECK-BOTH %s
#include <typeinfo>
+// CHECK-BOTH: _ZTSP1C = internal constant
+// CHECK-BOTH: _ZTS1C = internal constant
+// CHECK-BOTH: _ZTI1C = internal constant
+// CHECK-BOTH: _ZTIP1C = internal constant
+// CHECK-BOTH: _ZTSPP1C = internal constant
+// CHECK-BOTH: _ZTIPP1C = internal constant
+// CHECK-BOTH: _ZTSM1Ci = internal constant
+// CHECK-BOTH: _ZTIM1Ci = internal constant
+// CHECK-BOTH: _ZTSPM1Ci = internal constant
+// CHECK-BOTH: _ZTIPM1Ci = internal constant
+// CHECK-BOTH: _ZTSM1CS_ = internal constant
+// CHECK-BOTH: _ZTIM1CS_ = internal constant
+// CHECK-BOTH: _ZTSM1CPS_ = internal constant
+// CHECK-BOTH: _ZTIM1CPS_ = internal constant
+// CHECK-BOTH: _ZTSM1A1C = internal constant
+// CHECK: _ZTS1A = linkonce_odr constant
+// CHECK-WITH-HIDDEN: _ZTS1A = linkonce_odr hidden constant
+// CHECK: _ZTI1A = linkonce_odr constant
+// CHECK-WITH-HIDDEN: _ZTI1A = linkonce_odr hidden constant
+// CHECK-BOTH: _ZTIM1A1C = internal constant
+// CHECK-BOTH: _ZTSM1AP1C = internal constant
+// CHECK-BOTH: _ZTIM1AP1C = internal constant
+
// CHECK-WITH-HIDDEN: _ZTSFN12_GLOBAL__N_11DEvE = internal constant
// CHECK-WITH-HIDDEN: @_ZTSPK2T4 = linkonce_odr hidden constant
// CHECK-WITH-HIDDEN: @_ZTS2T4 = linkonce_odr hidden constant
-// CHECK-WITH-HIDDEN: @_ZTI2T4 = linkonce_odr hidden unnamed_addr constant
-// CHECK-WITH-HIDDEN: @_ZTIPK2T4 = linkonce_odr hidden unnamed_addr constant
-
-// CHECK: _ZTSP1C = internal constant
-// CHECK: _ZTS1C = internal constant
-// CHECK: _ZTI1C = internal unnamed_addr constant
-// CHECK: _ZTIP1C = internal unnamed_addr constant
-// CHECK: _ZTSPP1C = internal constant
-// CHECK: _ZTIPP1C = internal unnamed_addr constant
-// CHECK: _ZTSM1Ci = internal constant
-// CHECK: _ZTIM1Ci = internal unnamed_addr constant
-// CHECK: _ZTSPM1Ci = internal constant
-// CHECK: _ZTIPM1Ci = internal unnamed_addr constant
-// CHECK: _ZTSM1CS_ = internal constant
-// CHECK: _ZTIM1CS_ = internal unnamed_addr constant
-// CHECK: _ZTSM1CPS_ = internal constant
-// CHECK: _ZTIM1CPS_ = internal unnamed_addr constant
-// CHECK: _ZTSM1A1C = internal constant
-// CHECK: _ZTS1A = linkonce_odr constant
-// CHECK: _ZTI1A = linkonce_odr hidden unnamed_addr constant
-// CHECK: _ZTIM1A1C = internal unnamed_addr constant
-// CHECK: _ZTSM1AP1C = internal constant
-// CHECK: _ZTIM1AP1C = internal unnamed_addr constant
+// CHECK-WITH-HIDDEN: @_ZTI2T4 = linkonce_odr hidden constant
+// CHECK-WITH-HIDDEN: @_ZTIPK2T4 = linkonce_odr hidden constant
+// CHECK-WITH-HIDDEN: @_ZTSZ2t5vE1A = internal constant
+// CHECK-WITH-HIDDEN: @_ZTIZ2t5vE1A = internal constant
+// CHECK-WITH-HIDDEN: @_ZTSPZ2t7vE1A = linkonce_odr hidden constant
+// CHECK-WITH-HIDDEN: @_ZTSZ2t7vE1A = linkonce_odr hidden constant
+// CHECK-WITH-HIDDEN: @_ZTIZ2t7vE1A = linkonce_odr hidden constant
+// CHECK-WITH-HIDDEN: @_ZTIPZ2t7vE1A = linkonce_odr hidden constant
+// CHECK-WITH-HIDDEN: @_ZTSZ2t6vE1A = linkonce_odr hidden constant
+// CHECK-WITH-HIDDEN: @_ZTIZ2t6vE1A = linkonce_odr hidden constant
+
// CHECK: _ZTSN12_GLOBAL__N_11DE = internal constant
-// CHECK: _ZTIN12_GLOBAL__N_11DE = internal unnamed_addr constant
+// CHECK: _ZTIN12_GLOBAL__N_11DE = internal constant
// CHECK: _ZTSPN12_GLOBAL__N_11DE = internal constant
-// CHECK: _ZTIPN12_GLOBAL__N_11DE = internal unnamed_addr constant
+// CHECK: _ZTIPN12_GLOBAL__N_11DE = internal constant
// CHECK: _ZTSFN12_GLOBAL__N_11DEvE = internal constant
-// CHECK: _ZTIFN12_GLOBAL__N_11DEvE = internal unnamed_addr constant
+// CHECK: _ZTIFN12_GLOBAL__N_11DEvE = internal constant
// CHECK: _ZTSFvN12_GLOBAL__N_11DEE = internal constant
-// CHECK: _ZTIFvN12_GLOBAL__N_11DEE = internal unnamed_addr constant
+// CHECK: _ZTIFvN12_GLOBAL__N_11DEE = internal constant
// CHECK: _ZTSPFvvE = linkonce_odr constant
// CHECK: _ZTSFvvE = linkonce_odr constant
-// CHECK: _ZTIFvvE = linkonce_odr hidden unnamed_addr constant
-// CHECK: _ZTIPFvvE = linkonce_odr hidden unnamed_addr constant
+// CHECK: _ZTIFvvE = linkonce_odr constant
+// CHECK: _ZTIPFvvE = linkonce_odr constant
// CHECK: _ZTSN12_GLOBAL__N_11EE = internal constant
-// CHECK: _ZTIN12_GLOBAL__N_11EE = internal unnamed_addr constant
+// CHECK: _ZTIN12_GLOBAL__N_11EE = internal constant
// CHECK: _ZTSA10_i = linkonce_odr constant
-// CHECK: _ZTIA10_i = linkonce_odr hidden unnamed_addr constant
-// CHECK: _ZTI1TILj0EE = linkonce_odr unnamed_addr constant
-// CHECK: _ZTI1TILj1EE = weak_odr unnamed_addr constant
+// CHECK: _ZTIA10_i = linkonce_odr constant
+// CHECK: _ZTI1TILj0EE = linkonce_odr constant
+// CHECK: _ZTI1TILj1EE = weak_odr constant
// CHECK: _ZTI1TILj2EE = external constant
+// CHECK: _ZTSZ2t5vE1A = internal constant
+// CHECK: _ZTIZ2t5vE1A = internal constant
// CHECK: _ZTS1B = constant
-// CHECK: _ZTI1B = unnamed_addr constant
+// CHECK: _ZTI1B = constant
// CHECK: _ZTS1F = linkonce_odr constant
+// CHECK: _ZTSPZ2t7vE1A = linkonce_odr constant
+// CHECK: _ZTSZ2t7vE1A = linkonce_odr constant
+// CHECK: _ZTIZ2t7vE1A = linkonce_odr constant
+// CHECK: _ZTIPZ2t7vE1A = linkonce_odr constant
+// CHECK: _ZTSZ2t6vE1A = linkonce_odr constant
+// CHECK: _ZTIZ2t6vE1A = linkonce_odr constant
// CHECK: _ZTIN12_GLOBAL__N_11DE to
@@ -138,3 +157,25 @@ struct T4 {};
void t4(const T4 *ptr) {
const void *value = &typeid(ptr);
}
+
+// rdar://16265084
+void t5() {
+ struct A {};
+ const void *value = &typeid(A);
+}
+
+inline void t6() {
+ struct A {};
+ const void *value = &typeid(A);
+}
+void t6_helper() {
+ t6();
+}
+
+inline void t7() {
+ struct A {};
+ const void *value = &typeid(A*);
+}
+void t7_helper() {
+ t7();
+}
diff --git a/test/CodeGenCXX/rtti-visibility.cpp b/test/CodeGenCXX/rtti-visibility.cpp
index 40cee061942a..5945be5c73a2 100644
--- a/test/CodeGenCXX/rtti-visibility.cpp
+++ b/test/CodeGenCXX/rtti-visibility.cpp
@@ -1,17 +1,15 @@
// RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -emit-llvm -o %t
-// RUN: %clang_cc1 %s -I%S -triple=x86_64-apple-darwin10 -fhidden-weak-vtables -emit-llvm -o %t.hidden
// RUN: FileCheck --check-prefix=CHECK-TEST1 %s < %t
// RUN: FileCheck --check-prefix=CHECK-TEST2 %s < %t
-// RUN: FileCheck --check-prefix=CHECK-TEST2-HIDDEN %s < %t.hidden
#include <typeinfo>
namespace Test1 {
// A is explicitly marked hidden, so all RTTI data should also be marked hidden.
// CHECK-TEST1: @_ZTSN5Test11AE = linkonce_odr hidden constant
- // CHECK-TEST1: @_ZTIN5Test11AE = linkonce_odr hidden unnamed_addr constant
+ // CHECK-TEST1: @_ZTIN5Test11AE = linkonce_odr hidden constant
// CHECK-TEST1: @_ZTSPN5Test11AE = linkonce_odr hidden constant
- // CHECK-TEST1: @_ZTIPN5Test11AE = linkonce_odr hidden unnamed_addr constant
+ // CHECK-TEST1: @_ZTIPN5Test11AE = linkonce_odr hidden constant
struct __attribute__((visibility("hidden"))) A { };
void f() {
@@ -23,12 +21,8 @@ namespace Test1 {
namespace Test2 {
// A is weak, so its linkage should be linkoce_odr, but not marked hidden.
// CHECK-TEST2: @_ZTSN5Test21AE = linkonce_odr constant
- // CHECK-TEST2: @_ZTIN5Test21AE = linkonce_odr unnamed_addr constant
+ // CHECK-TEST2: @_ZTIN5Test21AE = linkonce_odr constant
struct A { };
-
- // With -fhidden-weak-vtables, the typeinfo for A is marked hidden, but not its name.
- // CHECK-TEST2-HIDDEN: _ZTSN5Test21AE = linkonce_odr constant
- // CHECK-TEST2-HIDDEN: @_ZTIN5Test21AE = linkonce_odr hidden unnamed_addr constant
void f() {
(void)typeid(A);
}
diff --git a/test/CodeGenCXX/runtimecc.cpp b/test/CodeGenCXX/runtimecc.cpp
index 646c61e0fd8f..20448838f919 100644
--- a/test/CodeGenCXX/runtimecc.cpp
+++ b/test/CodeGenCXX/runtimecc.cpp
@@ -45,7 +45,7 @@ namespace test1 {
// CHECK: declare arm_aapcscc void @__cxa_throw(i8*, i8*, i8*)
-// CHECK-LABEL: define internal arm_aapcscc void @_GLOBAL__I_a()
+// CHECK-LABEL: define internal arm_aapcscc void @_GLOBAL__sub_I_runtimecc.cpp()
// CHECK: call arm_aapcscc void @__cxx_global_var_init()
diff --git a/test/CodeGenCXX/rvalue-references.cpp b/test/CodeGenCXX/rvalue-references.cpp
index 2e0fa829ec90..66705bfc6b3c 100644
--- a/test/CodeGenCXX/rvalue-references.cpp
+++ b/test/CodeGenCXX/rvalue-references.cpp
@@ -7,8 +7,8 @@ struct B : Spacer, A { };
B &getB();
-// CHECK-LABEL: define %struct.A* @_Z4getAv()
-// CHECK: call %struct.B* @_Z4getBv()
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) %struct.A* @_Z4getAv()
+// CHECK: call dereferenceable({{[0-9]+}}) %struct.B* @_Z4getBv()
// CHECK-NEXT: bitcast %struct.B*
// CHECK-NEXT: getelementptr inbounds i8*
// CHECK-NEXT: bitcast i8* {{.*}} to %struct.A*
@@ -19,17 +19,17 @@ int &getIntLValue();
int &&getIntXValue();
int getIntPRValue();
-// CHECK-LABEL: define i32* @_Z2f0v()
-// CHECK: call i32* @_Z12getIntLValuev()
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) i32* @_Z2f0v()
+// CHECK: call dereferenceable({{[0-9]+}}) i32* @_Z12getIntLValuev()
// CHECK-NEXT: ret i32*
int &&f0() { return static_cast<int&&>(getIntLValue()); }
-// CHECK-LABEL: define i32* @_Z2f1v()
-// CHECK: call i32* @_Z12getIntXValuev()
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) i32* @_Z2f1v()
+// CHECK: call dereferenceable({{[0-9]+}}) i32* @_Z12getIntXValuev()
// CHECK-NEXT: ret i32*
int &&f1() { return static_cast<int&&>(getIntXValue()); }
-// CHECK-LABEL: define i32* @_Z2f2v
+// CHECK-LABEL: define dereferenceable({{[0-9]+}}) i32* @_Z2f2v
// CHECK: call i32 @_Z13getIntPRValuev()
// CHECK-NEXT: store i32 {{.*}}, i32*
// CHECK-NEXT: ret i32*
@@ -95,7 +95,7 @@ namespace test1 {
};
// CHECK-LABEL: define void @_ZN5test11BC2Ei(
- // CHECK: [[T0:%.*]] = call i32* @_ZN5test14moveERi(
+ // CHECK: [[T0:%.*]] = call dereferenceable({{[0-9]+}}) i32* @_ZN5test14moveERi(
// CHECK-NEXT: [[T1:%.*]] = load i32* [[T0]]
// CHECK-NEXT: call void @_ZN5test11AC1Ei({{.*}}, i32 [[T1]])
// CHECK-NEXT: ret void
diff --git a/test/CodeGenCXX/scoped-enums.cpp b/test/CodeGenCXX/scoped-enums.cpp
index 159172d1662e..218013a4c58b 100644
--- a/test/CodeGenCXX/scoped-enums.cpp
+++ b/test/CodeGenCXX/scoped-enums.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++11 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
// PR9923
enum class Color { red, blue, green };
diff --git a/test/CodeGenCXX/sparcv9-abi.cpp b/test/CodeGenCXX/sparcv9-abi.cpp
new file mode 100644
index 000000000000..128d648cebd5
--- /dev/null
+++ b/test/CodeGenCXX/sparcv9-abi.cpp
@@ -0,0 +1,26 @@
+// RUN: %clang_cc1 -triple sparcv9-unknown-unknown -emit-llvm %s -o - | FileCheck %s
+
+struct pod {
+ int a, b;
+};
+
+void f0();
+void f1(struct pod);
+
+struct notpod {
+ int a, b;
+ ~notpod() { f0(); }
+};
+
+void f2(struct notpod);
+
+// CHECK-LABEL: caller
+// CHECK: call void @_Z2f13pod(i64
+// CHECK: call void @_Z2f26notpod(%struct.notpod*
+void caller()
+{
+ pod p1;
+ notpod p2;
+ f1(p1);
+ f2(p2);
+}
diff --git a/test/CodeGenCXX/specialized-static-data-mem-init.cpp b/test/CodeGenCXX/specialized-static-data-mem-init.cpp
index c2a2ddb11254..68799624f26e 100644
--- a/test/CodeGenCXX/specialized-static-data-mem-init.cpp
+++ b/test/CodeGenCXX/specialized-static-data-mem-init.cpp
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
// rdar: // 8562966
// pr8409
-// CHECK: @_ZN1CIiE11needs_guardE = weak_odr global
-// CHECK: @_ZGVN1CIiE11needs_guardE = weak_odr global
+// CHECK: @_ZN1CIiE11needs_guardE = linkonce_odr global
+// CHECK: @_ZGVN1CIiE11needs_guardE = linkonce_odr global
struct K
{
diff --git a/test/CodeGenCXX/split-stacks.cpp b/test/CodeGenCXX/split-stacks.cpp
new file mode 100644
index 000000000000..3e120344d6b6
--- /dev/null
+++ b/test/CodeGenCXX/split-stacks.cpp
@@ -0,0 +1,33 @@
+// RUN: %clang -target x86_64-linux-gnu -fsplit-stack -S -std=c++11 %s -emit-llvm -o - | FileCheck -check-prefix=CHECK-SEGSTK %s
+// RUN: %clang -target x86_64-linux-gnu -S -std=c++11 %s -emit-llvm -o - | FileCheck -check-prefix=CHECK-NOSEGSTK %s
+
+int foo() {
+ return 0;
+}
+
+template <typename T>
+[[gnu::no_split_stack]]
+int tnosplit() {
+ return 0;
+}
+
+[[gnu::no_split_stack]]
+int nosplit() {
+ return tnosplit<int>();
+}
+
+// CHECK-SEGSTK: define i32 @_Z3foov() [[SS:#[0-9]+]] {
+// CHECK-SEGSTK: define i32 @_Z7nosplitv() [[NSS1:#[0-9]+]] {
+// CHECK-SEGSTK: define linkonce_odr i32 @_Z8tnosplitIiEiv() [[NSS2:#[0-9]+]] {
+// CHECK-SEGSTK-NOT: [[NSS1]] = { {{.*}} "split-stack" {{.*}} }
+// CHECK-SEGSTK-NOT: [[NSS2]] = { {{.*}} "split-stack" {{.*}} }
+// CHECK-SEGSTK: [[SS]] = { {{.*}} "split-stack" {{.*}} }
+// CHECK-SEGSTK-NOT: [[NSS1]] = { {{.*}} "split-stack" {{.*}} }
+// CHECK-SEGSTK-NOT: [[NSS2]] = { {{.*}} "split-stack" {{.*}} }
+
+// CHECK-NOSEGSTK: define i32 @_Z3foov() [[NSS0:#[0-9]+]] {
+// CHECK-NOSEGSTK: define i32 @_Z7nosplitv() [[NSS1:#[0-9]+]] {
+// CHECK-NOSEGSTK: define linkonce_odr i32 @_Z8tnosplitIiEiv() [[NSS2:#[0-9]+]] {
+// CHECK-NOSEGSTK-NOT: [[NSS1]] = { {{.*}} "split-stack" {{.*}} }
+// CHECK-NOSEGSTK-NOT: [[NSS2]] = { {{.*}} "split-stack" {{.*}} }
+// CHECK-NOSEGSTK-NOT: [[NSS3]] = { {{.*}} "split-stack" {{.*}} }
diff --git a/test/CodeGenCXX/static-init-3.cpp b/test/CodeGenCXX/static-init-3.cpp
index dc28d5a32a63..083e00144c18 100644
--- a/test/CodeGenCXX/static-init-3.cpp
+++ b/test/CodeGenCXX/static-init-3.cpp
@@ -16,8 +16,8 @@ struct X1
}
};
-// CHECK: @_ZN2X1I2X2I1BEE8instanceE = weak_odr global %struct.X2* null, align 8
-// CHECJ: @_ZN2X1I2X2I1AEE8instanceE = weak_odr global %struct.X2* null, align 8
+// CHECK: @_ZN2X1I2X2I1BEE8instanceE = linkonce_odr global %struct.X2* null, align 8
+// CHECJ: @_ZN2X1I2X2I1AEE8instanceE = linkonce_odr global %struct.X2* null, align 8
template<class T> T & X1<T>::instance = X1<T>::get();
class A { };
diff --git a/test/CodeGenCXX/static-init.cpp b/test/CodeGenCXX/static-init.cpp
index f522775c109e..d23ead47f385 100644
--- a/test/CodeGenCXX/static-init.cpp
+++ b/test/CodeGenCXX/static-init.cpp
@@ -103,14 +103,14 @@ namespace test2 {
B::B() {
static int x = foo();
}
- // CHECK-LABEL: define void @_ZN5test21BC1Ev
+ // CHECK-LABEL: define void @_ZN5test21BC2Ev
// CHECK: load atomic i8* bitcast (i64* @_ZGVZN5test21BC1EvE1x to i8*) acquire,
// CHECK: call i32 @__cxa_guard_acquire(i64* @_ZGVZN5test21BC1EvE1x)
// CHECK: [[T0:%.*]] = call i32 @_ZN5test23fooEv()
// CHECK: store i32 [[T0]], i32* @_ZZN5test21BC1EvE1x,
// CHECK: call void @__cxa_guard_release(i64* @_ZGVZN5test21BC1EvE1x)
- // CHECK-LABEL: define void @_ZN5test21BC2Ev
+ // CHECK-LABEL: define void @_ZN5test21BC1Ev
// CHECK: load atomic i8* bitcast (i64* @_ZGVZN5test21BC1EvE1x to i8*) acquire,
// CHECK: call i32 @__cxa_guard_acquire(i64* @_ZGVZN5test21BC1EvE1x)
// CHECK: [[T0:%.*]] = call i32 @_ZN5test23fooEv()
@@ -122,15 +122,15 @@ namespace test2 {
B::~B() {
static int y = foo();
}
- // CHECK-LABEL: define void @_ZN5test21BD1Ev(
- // CHECK: call void @_ZN5test21BD2Ev(
-
// CHECK-LABEL: define void @_ZN5test21BD2Ev(
// CHECK: load atomic i8* bitcast (i64* @_ZGVZN5test21BD1EvE1y to i8*) acquire,
// CHECK: call i32 @__cxa_guard_acquire(i64* @_ZGVZN5test21BD1EvE1y)
// CHECK: [[T0:%.*]] = call i32 @_ZN5test23fooEv()
// CHECK: store i32 [[T0]], i32* @_ZZN5test21BD1EvE1y,
// CHECK: call void @__cxa_guard_release(i64* @_ZGVZN5test21BD1EvE1y)
+
+ // CHECK-LABEL: define void @_ZN5test21BD1Ev(
+ // CHECK: call void @_ZN5test21BD2Ev(
}
// This shouldn't error out.
@@ -149,6 +149,6 @@ namespace test3 {
union U { char x; int i; };
static U u = { 'a' };
}
- // CHECK-LABEL: define void @_ZN5test31BC1Ev(
// CHECK-LABEL: define void @_ZN5test31BC2Ev(
+ // CHECK-LABEL: define void @_ZN5test31BC1Ev(
}
diff --git a/test/CodeGenCXX/static-member-variable-explicit-specialization.cpp b/test/CodeGenCXX/static-member-variable-explicit-specialization.cpp
index 50772bf647d1..98c09b84797d 100644
--- a/test/CodeGenCXX/static-member-variable-explicit-specialization.cpp
+++ b/test/CodeGenCXX/static-member-variable-explicit-specialization.cpp
@@ -12,21 +12,21 @@ template<> int A<char>::a;
// CHECK: @_ZN1AIbE1aE = global i32 10
template<> int A<bool>::a = 10;
-// CHECK: @llvm.global_ctors = appending global [7 x { i32, void ()* }]
-// CHECK: [{ i32, void ()* } { i32 65535, void ()* @[[unordered1:[^ ]*]] },
-// CHECK: { i32, void ()* } { i32 65535, void ()* @[[unordered2:[^ ]*]] },
-// CHECK: { i32, void ()* } { i32 65535, void ()* @[[unordered3:[^ ]*]] },
-// CHECK: { i32, void ()* } { i32 65535, void ()* @[[unordered4:[^ ]*]] },
-// CHECK: { i32, void ()* } { i32 65535, void ()* @[[unordered5:[^ ]*]] },
-// CHECK: { i32, void ()* } { i32 65535, void ()* @[[unordered6:[^ ]*]] },
-// CHECK: { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I_a }]
+// CHECK: @llvm.global_ctors = appending global [7 x { i32, void ()*, i8* }]
+// CHECK: [{ i32, void ()*, i8* } { i32 65535, void ()* @[[unordered1:[^,]*]], i8* bitcast (i32* @_ZN1AIsE1aE to i8*) },
+// CHECK: { i32, void ()*, i8* } { i32 65535, void ()* @[[unordered2:[^,]*]], i8* bitcast (i16* @_Z1xIsE to i8*) },
+// CHECK: { i32, void ()*, i8* } { i32 65535, void ()* @[[unordered3:[^,]*]], i8* bitcast (i32* @_ZN2ns1aIiE1iE to i8*) },
+// CHECK: { i32, void ()*, i8* } { i32 65535, void ()* @[[unordered4:[^,]*]], i8* bitcast (i32* @_ZN2ns1b1iIiEE to i8*) },
+// CHECK: { i32, void ()*, i8* } { i32 65535, void ()* @[[unordered5:[^,]*]], i8* bitcast (i32* @_ZN1AIvE1aE to i8*) },
+// CHECK: { i32, void ()*, i8* } { i32 65535, void ()* @[[unordered6:[^,]*]], i8* @_Z1xIcE },
+// CHECK: { i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_static_member_variable_explicit_specialization.cpp, i8* null }]
template int A<short>::a; // Unordered
int b = foo();
int c = foo();
int d = A<void>::a; // Unordered
-// An explicit specialization is ordered, and goes in __GLOBAL_I_a.
+// An explicit specialization is ordered, and goes in __GLOBAL_sub_I_static_member_variable_explicit_specialization.cpp.
template<> struct A<int> { static int a; };
int A<int>::a = foo();
@@ -82,7 +82,7 @@ template int b::i<int>;
// CHECK: store {{.*}} @_Z1xIcE
// CHECK: ret
-// CHECK: define internal void @_GLOBAL__I_a()
+// CHECK: define internal void @_GLOBAL__sub_I_static_member_variable_explicit_specialization.cpp()
// We call unique stubs for every ordered dynamic initializer in the TU.
// CHECK: call
// CHECK: call
diff --git a/test/CodeGenCXX/stmtexpr.cpp b/test/CodeGenCXX/stmtexpr.cpp
index 5d4d6bcce458..7bf19bbfb46d 100644
--- a/test/CodeGenCXX/stmtexpr.cpp
+++ b/test/CodeGenCXX/stmtexpr.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -Wno-unused-value -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -Wno-unused-value -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
// rdar: //8540501
extern "C" int printf(...);
extern "C" void abort();
diff --git a/test/CodeGenCXX/template-dependent-bind-temporary.cpp b/test/CodeGenCXX/template-dependent-bind-temporary.cpp
index ca980c3ff685..47d8279a4774 100644
--- a/test/CodeGenCXX/template-dependent-bind-temporary.cpp
+++ b/test/CodeGenCXX/template-dependent-bind-temporary.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
// rdar: //8620524
// PR7851
struct string {
diff --git a/test/CodeGenCXX/template-inner-struct-visibility-hidden.cpp b/test/CodeGenCXX/template-inner-struct-visibility-hidden.cpp
index de86f10f6c30..137792b26a43 100644
--- a/test/CodeGenCXX/template-inner-struct-visibility-hidden.cpp
+++ b/test/CodeGenCXX/template-inner-struct-visibility-hidden.cpp
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 -fvisibility hidden -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -fvisibility hidden -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
// Verify that symbols are hidden.
// CHECK: @_ZN1CIiE5Inner6Inner26StaticE = weak_odr hidden global
-// CHECK-LABEL: define weak_odr hidden void @_ZN1CIiE5Inner1fEv
-// CHECK-LABEL: define weak_odr hidden void @_ZN1CIiE5Inner6Inner21gEv
+// CHECK-LABEL: define weak_odr hidden {{.*}}void @_ZN1CIiE5Inner1fEv
+// CHECK-LABEL: define weak_odr hidden {{.*}}void @_ZN1CIiE5Inner6Inner21gEv
template<typename T>
struct C {
diff --git a/test/CodeGenCXX/template-instantiation.cpp b/test/CodeGenCXX/template-instantiation.cpp
index 80283a1edd04..90b8099f0a26 100644
--- a/test/CodeGenCXX/template-instantiation.cpp
+++ b/test/CodeGenCXX/template-instantiation.cpp
@@ -5,10 +5,14 @@
//
// CHECK-NOT: @_ZTVN5test118stdio_sync_filebufIwEE = constant
// CHECK-NOT: _ZTVN5test315basic_fstreamXXIcEE
-// CHECK: @_ZTVN5test018stdio_sync_filebufIwEE = unnamed_addr constant
+// CHECK-NOT: @_ZTVN5test018stdio_sync_filebufIA1_iEE
+// CHECK-NOT: @_ZTVN5test018stdio_sync_filebufIA2_iEE
+// CHECK: @_ZTVN5test018stdio_sync_filebufIA3_iEE = weak_odr unnamed_addr constant
-// CHECK: @_ZN7PR100011SIiE3arrE = weak_odr global [3 x i32]
-// CHECK-NOT: @_ZN7PR100011SIiE3arr2E = weak_odr global [3 x i32]A
+// CHECK: @_ZN7PR100011SIiE3arrE = linkonce_odr global [3 x i32]
+// CHECK-NOT: @_ZN7PR100011SIiE3arr2E = linkonce_odr global [3 x i32]A
+
+// CHECK: @_ZTVN5test018stdio_sync_filebufIA4_iEE = linkonce_odr unnamed_addr constant
// CHECK-NOT: _ZTVN5test31SIiEE
// CHECK-NOT: _ZTSN5test31SIiEE
@@ -39,11 +43,21 @@ namespace test0 {
virtual void xsgetn();
};
- // This specialization should cause the vtable to be emitted, even with
- // the following extern template declaration.
- template<> void stdio_sync_filebuf<wchar_t>::xsgetn() {
+ // This specialization is not a key function, so doesn't cause the vtable to
+ // be instantiated unless we're instantiating a class definition anyway.
+ template<> void stdio_sync_filebuf<int[1]>::xsgetn() {
+ }
+ template<> void stdio_sync_filebuf<int[2]>::xsgetn() {
+ }
+ template<> void stdio_sync_filebuf<int[3]>::xsgetn() {
}
- extern template class stdio_sync_filebuf<wchar_t>;
+ template<> void stdio_sync_filebuf<int[4]>::xsgetn() {
+ }
+ extern template class stdio_sync_filebuf<int[2]>;
+
+ // These two both cause vtables to be emitted.
+ template class stdio_sync_filebuf<int[3]>;
+ stdio_sync_filebuf<int[4]> implicit_instantiation;
}
namespace test1 {
diff --git a/test/CodeGenCXX/temporaries.cpp b/test/CodeGenCXX/temporaries.cpp
index e8a7a1f25596..7f5c7af03865 100644
--- a/test/CodeGenCXX/temporaries.cpp
+++ b/test/CodeGenCXX/temporaries.cpp
@@ -3,8 +3,8 @@
namespace PR16263 {
const unsigned int n = 1234;
extern const int &r = (const int&)n;
- // CHECK: @_ZGRN7PR162631rE = private constant i32 1234,
- // CHECK: @_ZN7PR162631rE = constant i32* @_ZGRN7PR162631rE,
+ // CHECK: @_ZGRN7PR162631rE_ = private constant i32 1234,
+ // CHECK: @_ZN7PR162631rE = constant i32* @_ZGRN7PR162631rE_,
extern const int &s = reinterpret_cast<const int&>(n);
// CHECK: @_ZN7PR16263L1nE = internal constant i32 1234, align 4
@@ -14,17 +14,32 @@ namespace PR16263 {
struct B { int n; };
struct C : A, B {};
extern const A &&a = (A&&)(A&&)(C&&)(C{});
- // CHECK: @_ZGRN7PR162631aE = private global {{.*}} zeroinitializer,
- // CHECK: @_ZN7PR162631aE = constant {{.*}} bitcast ({{.*}}* @_ZGRN7PR162631aE to
+ // CHECK: @_ZGRN7PR162631aE_ = private global {{.*}} zeroinitializer,
+ // CHECK: @_ZN7PR162631aE = constant {{.*}} bitcast ({{.*}}* @_ZGRN7PR162631aE_ to
extern const int &&t = ((B&&)C{}).n;
- // CHECK: @_ZGRN7PR162631tE = private global {{.*}} zeroinitializer,
- // CHECK: @_ZN7PR162631tE = constant i32* {{.*}}* @_ZGRN7PR162631tE {{.*}} 4
+ // CHECK: @_ZGRN7PR162631tE_ = private global {{.*}} zeroinitializer,
+ // CHECK: @_ZN7PR162631tE = constant i32* {{.*}}* @_ZGRN7PR162631tE_ {{.*}} 4
struct D { double d; C c; };
extern const int &&u = (123, static_cast<B&&>(0, ((D&&)D{}).*&D::c).n);
- // CHECK: @_ZGRN7PR162631uE = private global {{.*}} zeroinitializer
- // CHECK: @_ZN7PR162631uE = constant i32* {{.*}} @_ZGRN7PR162631uE {{.*}} 12
+ // CHECK: @_ZGRN7PR162631uE_ = private global {{.*}} zeroinitializer
+ // CHECK: @_ZN7PR162631uE = constant i32* {{.*}} @_ZGRN7PR162631uE_ {{.*}} 12
+}
+
+namespace PR20227 {
+ struct A { ~A(); };
+ struct B { virtual ~B(); };
+ struct C : B {};
+
+ A &&a = dynamic_cast<A&&>(A{});
+ // CHECK: @_ZGRN7PR202271aE_ = private global
+
+ B &&b = dynamic_cast<C&&>(dynamic_cast<B&&>(C{}));
+ // CHECK: @_ZGRN7PR202271bE_ = private global
+
+ B &&c = static_cast<C&&>(static_cast<B&&>(C{}));
+ // CHECK: @_ZGRN7PR202271cE_ = private global
}
struct A {
@@ -310,7 +325,7 @@ int& f(int);
void g() {
// CHECK: call void @_ZN3T121AC1Ev
// CHECK-NEXT: call i32 @_ZN3T121A1fEv(
- // CHECK-NEXT: call i32* @_ZN3T121fEi(
+ // CHECK-NEXT: call dereferenceable({{[0-9]+}}) i32* @_ZN3T121fEi(
// CHECK-NEXT: call void @_ZN3T121AD1Ev(
int& i = f(A().f());
}
@@ -325,7 +340,7 @@ namespace PR6648 {
struct D;
D& zed(B);
void foobar() {
- // CHECK: call %"struct.PR6648::D"* @_ZN6PR66483zedENS_1BE
+ // CHECK: call nonnull %"struct.PR6648::D"* @_ZN6PR66483zedENS_1BE
zed(foo);
}
}
@@ -412,10 +427,10 @@ namespace Elision {
// CHECK-NEXT: [[J:%.*]] = alloca [[A]], align 8
// CHECK: call void @_ZN7Elision1AC1Ev([[A]]* [[I]])
- // CHECK: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[I]], [[A]]* [[X:%.*]])
+ // CHECK: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[I]], [[A]]* dereferenceable({{[0-9]+}}) [[X:%.*]])
A i = (c ? A() : x);
- // CHECK: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[J]], [[A]]* [[X]])
+ // CHECK: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[J]], [[A]]* dereferenceable({{[0-9]+}}) [[X]])
// CHECK: call void @_ZN7Elision1AC1Ev([[A]]* [[J]])
A j = (c ? x : A());
@@ -435,10 +450,10 @@ namespace Elision {
A test3(int v, A x) {
if (v < 5)
// CHECK: call void @_ZN7Elision1AC1Ev([[A]]* [[RET:%.*]])
- // CHECK: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[RET]], [[A]]* [[X:%.*]])
+ // CHECK: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[RET]], [[A]]* dereferenceable({{[0-9]+}}) [[X:%.*]])
return (v < 0 ? A() : x);
else
- // CHECK: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[RET]], [[A]]* [[X]])
+ // CHECK: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[RET]], [[A]]* dereferenceable({{[0-9]+}}) [[X]])
// CHECK: call void @_ZN7Elision1AC1Ev([[A]]* [[RET]])
return (v > 10 ? x : A());
@@ -456,7 +471,7 @@ namespace Elision {
// CHECK-NEXT: [[XS0:%.*]] = getelementptr inbounds [2 x [[A]]]* [[XS]], i64 0, i64 0
// CHECK-NEXT: call void @_ZN7Elision1AC1Ev([[A]]* [[XS0]])
// CHECK-NEXT: [[XS1:%.*]] = getelementptr inbounds [[A]]* [[XS0]], i64 1
- // CHECK-NEXT: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[XS1]], [[A]]* [[X]])
+ // CHECK-NEXT: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[XS1]], [[A]]* dereferenceable({{[0-9]+}}) [[X]])
A xs[] = { A(), x };
// CHECK-NEXT: [[BEGIN:%.*]] = getelementptr inbounds [2 x [[A]]]* [[XS]], i32 0, i32 0
@@ -483,7 +498,7 @@ namespace Elision {
// CHECK: call void @_ZN7Elision1BC1Ev([[B]]* [[BT0]])
// CHECK-NEXT: [[AM:%.*]] = getelementptr inbounds [[B]]* [[BT0]], i32 0, i32 0
- // CHECK-NEXT: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[AT0]], [[A]]* [[AM]])
+ // CHECK-NEXT: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[AT0]], [[A]]* dereferenceable({{[0-9]+}}) [[AM]])
// CHECK-NEXT: call void @_ZN7Elision5takeAENS_1AE([[A]]* [[AT0]])
// CHECK-NEXT: call void @_ZN7Elision1AD1Ev([[A]]* [[AT0]])
// CHECK-NEXT: call void @_ZN7Elision1BD1Ev([[B]]* [[BT0]])
@@ -491,13 +506,13 @@ namespace Elision {
// CHECK-NEXT: call void @_ZN7Elision1BC1Ev([[B]]* [[BT1]])
// CHECK-NEXT: [[AM:%.*]] = getelementptr inbounds [[B]]* [[BT1]], i32 0, i32 0
- // CHECK-NEXT: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[X]], [[A]]* [[AM]])
+ // CHECK-NEXT: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[X]], [[A]]* dereferenceable({{[0-9]+}}) [[AM]])
// CHECK-NEXT: call void @_ZN7Elision1BD1Ev([[B]]* [[BT1]])
A x = B().a;
// CHECK-NEXT: call void @_ZN7Elision1BC1Ev([[B]]* [[BT2]])
// CHECK-NEXT: [[AM:%.*]] = getelementptr inbounds [[B]]* [[BT2]], i32 0, i32 0
- // CHECK-NEXT: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[RET:%.*]], [[A]]* [[AM]])
+ // CHECK-NEXT: call void @_ZN7Elision1AC1ERKS0_([[A]]* [[RET:%.*]], [[A]]* dereferenceable({{[0-9]+}}) [[AM]])
// CHECK-NEXT: call void @_ZN7Elision1BD1Ev([[B]]* [[BT2]])
return B().a;
@@ -596,23 +611,23 @@ namespace BindToSubobject {
void f(), g();
- // CHECK: call void @_ZN15BindToSubobject1AC1Ev({{.*}} @_ZGRN15BindToSubobject1aE)
- // CHECK: call i32 @__cxa_atexit({{.*}} bitcast ({{.*}} @_ZN15BindToSubobject1AD1Ev to void (i8*)*), i8* bitcast ({{.*}} @_ZGRN15BindToSubobject1aE to i8*), i8* @__dso_handle)
- // CHECK: store i32* getelementptr inbounds ({{.*}} @_ZGRN15BindToSubobject1aE, i32 0, i32 0), i32** @_ZN15BindToSubobject1aE, align 8
+ // CHECK: call void @_ZN15BindToSubobject1AC1Ev({{.*}} @_ZGRN15BindToSubobject1aE_)
+ // CHECK: call i32 @__cxa_atexit({{.*}} bitcast ({{.*}} @_ZN15BindToSubobject1AD1Ev to void (i8*)*), i8* bitcast ({{.*}} @_ZGRN15BindToSubobject1aE_ to i8*), i8* @__dso_handle)
+ // CHECK: store i32* getelementptr inbounds ({{.*}} @_ZGRN15BindToSubobject1aE_, i32 0, i32 0), i32** @_ZN15BindToSubobject1aE, align 8
int &&a = A().a;
// CHECK: call void @_ZN15BindToSubobject1fEv()
- // CHECK: call void @_ZN15BindToSubobject1AC1Ev({{.*}} @_ZGRN15BindToSubobject1bE)
- // CHECK: call i32 @__cxa_atexit({{.*}} bitcast ({{.*}} @_ZN15BindToSubobject1AD1Ev to void (i8*)*), i8* bitcast ({{.*}} @_ZGRN15BindToSubobject1bE to i8*), i8* @__dso_handle)
- // CHECK: store i32* getelementptr inbounds ({{.*}} @_ZGRN15BindToSubobject1bE, i32 0, i32 0), i32** @_ZN15BindToSubobject1bE, align 8
+ // CHECK: call void @_ZN15BindToSubobject1AC1Ev({{.*}} @_ZGRN15BindToSubobject1bE_)
+ // CHECK: call i32 @__cxa_atexit({{.*}} bitcast ({{.*}} @_ZN15BindToSubobject1AD1Ev to void (i8*)*), i8* bitcast ({{.*}} @_ZGRN15BindToSubobject1bE_ to i8*), i8* @__dso_handle)
+ // CHECK: store i32* getelementptr inbounds ({{.*}} @_ZGRN15BindToSubobject1bE_, i32 0, i32 0), i32** @_ZN15BindToSubobject1bE, align 8
int &&b = (f(), A().a);
int A::*h();
// CHECK: call void @_ZN15BindToSubobject1fEv()
// CHECK: call void @_ZN15BindToSubobject1gEv()
- // CHECK: call void @_ZN15BindToSubobject1AC1Ev({{.*}} @_ZGRN15BindToSubobject1cE)
- // CHECK: call i32 @__cxa_atexit({{.*}} bitcast ({{.*}} @_ZN15BindToSubobject1AD1Ev to void (i8*)*), i8* bitcast ({{.*}} @_ZGRN15BindToSubobject1cE to i8*), i8* @__dso_handle)
+ // CHECK: call void @_ZN15BindToSubobject1AC1Ev({{.*}} @_ZGRN15BindToSubobject1cE_)
+ // CHECK: call i32 @__cxa_atexit({{.*}} bitcast ({{.*}} @_ZN15BindToSubobject1AD1Ev to void (i8*)*), i8* bitcast ({{.*}} @_ZGRN15BindToSubobject1cE_ to i8*), i8* @__dso_handle)
// CHECK: call {{.*}} @_ZN15BindToSubobject1hE
// CHECK: getelementptr
// CHECK: store i32* {{.*}}, i32** @_ZN15BindToSubobject1cE, align 8
@@ -623,8 +638,8 @@ namespace BindToSubobject {
A a;
};
- // CHECK: call void @_ZN15BindToSubobject1BC1Ev({{.*}} @_ZGRN15BindToSubobject1dE)
- // CHECK: call i32 @__cxa_atexit({{.*}} bitcast ({{.*}} @_ZN15BindToSubobject1BD1Ev to void (i8*)*), i8* bitcast ({{.*}} @_ZGRN15BindToSubobject1dE to i8*), i8* @__dso_handle)
+ // CHECK: call void @_ZN15BindToSubobject1BC1Ev({{.*}} @_ZGRN15BindToSubobject1dE_)
+ // CHECK: call i32 @__cxa_atexit({{.*}} bitcast ({{.*}} @_ZN15BindToSubobject1BD1Ev to void (i8*)*), i8* bitcast ({{.*}} @_ZGRN15BindToSubobject1dE_ to i8*), i8* @__dso_handle)
// CHECK: call {{.*}} @_ZN15BindToSubobject1hE
// CHECK: getelementptr {{.*}} getelementptr
// CHECK: store i32* {{.*}}, i32** @_ZN15BindToSubobject1dE, align 8
@@ -637,9 +652,9 @@ namespace Bitfield {
// Do not lifetime extend the S() temporary here.
// CHECK: alloca
// CHECK: call {{.*}}memset
- // CHECK: store i32 {{.*}}, i32* @_ZGRN8Bitfield1rE
+ // CHECK: store i32 {{.*}}, i32* @_ZGRN8Bitfield1rE_
// CHECK: call void @_ZN8Bitfield1SD1
- // CHECK: store i32* @_ZGRN8Bitfield1rE, i32** @_ZN8Bitfield1rE, align 8
+ // CHECK: store i32* @_ZGRN8Bitfield1rE_, i32** @_ZN8Bitfield1rE, align 8
int &&r = S().a;
}
@@ -652,14 +667,14 @@ namespace Vector {
};
// CHECK: alloca
// CHECK: extractelement
- // CHECK: store i32 {{.*}}, i32* @_ZGRN6Vector1rE
- // CHECK: store i32* @_ZGRN6Vector1rE, i32** @_ZN6Vector1rE,
+ // CHECK: store i32 {{.*}}, i32* @_ZGRN6Vector1rE_
+ // CHECK: store i32* @_ZGRN6Vector1rE_, i32** @_ZN6Vector1rE,
int &&r = S().v[1];
// CHECK: alloca
// CHECK: extractelement
- // CHECK: store i32 {{.*}}, i32* @_ZGRN6Vector1sE
- // CHECK: store i32* @_ZGRN6Vector1sE, i32** @_ZN6Vector1sE,
+ // CHECK: store i32 {{.*}}, i32* @_ZGRN6Vector1sE_
+ // CHECK: store i32* @_ZGRN6Vector1sE_, i32** @_ZN6Vector1sE,
int &&s = S().w[1];
// FIXME PR16204: The following code leads to an assertion in Sema.
//int &&s = S().w.y;
@@ -761,8 +776,8 @@ namespace PR14130 {
struct S { S(int); };
struct U { S &&s; };
U v { { 0 } };
- // CHECK: call void @_ZN7PR141301SC1Ei({{.*}} @_ZGRN7PR141301vE, i32 0)
- // CHECK: store {{.*}} @_ZGRN7PR141301vE, {{.*}} @_ZN7PR141301vE
+ // CHECK: call void @_ZN7PR141301SC1Ei({{.*}} @_ZGRN7PR141301vE_, i32 0)
+ // CHECK: store {{.*}} @_ZGRN7PR141301vE_, {{.*}} @_ZN7PR141301vE
}
namespace Ctor {
diff --git a/test/CodeGenCXX/throw-expression-dtor.cpp b/test/CodeGenCXX/throw-expression-dtor.cpp
index cb4a6c69bddd..b883b856be3c 100644
--- a/test/CodeGenCXX/throw-expression-dtor.cpp
+++ b/test/CodeGenCXX/throw-expression-dtor.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm-only -verify -fcxx-exceptions -fexceptions
+// RUN: %clang_cc1 %s -emit-llvm-only -verify -triple %itanium_abi_triple -fcxx-exceptions -fexceptions
// expected-no-diagnostics
// PR7281
diff --git a/test/CodeGenCXX/throw-expressions.cpp b/test/CodeGenCXX/throw-expressions.cpp
index d9bf8fdd59ea..4dd5322fba51 100644
--- a/test/CodeGenCXX/throw-expressions.cpp
+++ b/test/CodeGenCXX/throw-expressions.cpp
@@ -67,3 +67,48 @@ int test6(bool x, bool y, int z) {
//
// end:
// CHECK: ret i32
+
+namespace DR1560 {
+ struct A {
+ ~A();
+ };
+ extern bool b;
+ A get();
+ // CHECK-LABEL: @_ZN6DR15601bE
+ const A &r = b ? get() : throw 0;
+ // CHECK-NOT: call {{.*}}@_ZN6DR15601AD1Ev
+ // CHECK: call {{.*}} @__cxa_atexit({{.*}} @_ZN6DR15601AD1Ev {{.*}} @_ZGRN6DR15601rE
+ // CHECK-NOT: call {{.*}}@_ZN6DR15601AD1Ev
+}
+
+// CHECK-LABEL: define void @_Z5test7b(
+void test7(bool cond) {
+ // CHECK: br i1
+ //
+ // x.true:
+ // CHECK: call void @__cxa_throw(
+ // CHECK-NEXT: unreachable
+ //
+ // x.false:
+ // CHECK: br label
+ //
+ // end:
+ // CHECK: ret void
+ cond ? throw test7 : val;
+}
+
+// CHECK-LABEL: define dereferenceable(4) i32* @_Z5test8b(
+int &test8(bool cond) {
+ // CHECK: br i1
+ //
+ // x.true:
+ // CHECK: br label
+ //
+ // x.false:
+ // CHECK: call void @__cxa_throw(
+ // CHECK-NEXT: unreachable
+ //
+ // end:
+ // CHECK: ret i32* @val
+ return cond ? val : ((throw "foo"));
+}
diff --git a/test/CodeGenCXX/thunk-use-after-free.cpp b/test/CodeGenCXX/thunk-use-after-free.cpp
index d70e9025683d..14f2356ea456 100644
--- a/test/CodeGenCXX/thunk-use-after-free.cpp
+++ b/test/CodeGenCXX/thunk-use-after-free.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm-only -O1 %s
+// RUN: %clang_cc1 -emit-llvm-only -triple %itanium_abi_triple -O1 %s
// This used to crash under asan and valgrind.
// PR12284
diff --git a/test/CodeGenCXX/thunks.cpp b/test/CodeGenCXX/thunks.cpp
index defb70681d93..89e4db394821 100644
--- a/test/CodeGenCXX/thunks.cpp
+++ b/test/CodeGenCXX/thunks.cpp
@@ -1,6 +1,5 @@
// RUN: %clang_cc1 %s -triple=x86_64-pc-linux-gnu -munwind-tables -emit-llvm -o - | FileCheck %s
// RUN: %clang_cc1 %s -triple=x86_64-pc-linux-gnu -munwind-tables -emit-llvm -o - -O1 -disable-llvm-optzns | FileCheck %s
-// RUN: %clang_cc1 %s -triple=x86_64-pc-linux-gnu -munwind-tables -fhidden-weak-vtables -emit-llvm -o - | FileCheck -check-prefix=CHECK-HIDDEN %s
namespace Test1 {
@@ -251,9 +250,7 @@ namespace Test10 {
struct B { virtual void foo(); };
struct C : A, B { void foo() {} };
- // CHECK-HIDDEN-LABEL: define linkonce_odr void @_ZN6Test101C3fooEv
- // CHECK-HIDDEN-LABEL: define linkonce_odr hidden void @_ZThn8_N6Test101C3fooEv
-
+ // Test later.
void test() {
C c;
}
@@ -366,6 +363,10 @@ namespace Test15 {
/**** The following has to go at the end of the file ****/
+// This is from Test10:
+// CHECK-LABEL: define linkonce_odr void @_ZN6Test101C3fooEv
+// CHECK-LABEL: define linkonce_odr void @_ZThn8_N6Test101C3fooEv
+
// This is from Test5:
// CHECK-LABEL: define linkonce_odr void @_ZTv0_n24_N5Test51B1fEv
// CHECK-LABEL: define internal void @_ZThn8_N6Test4B12_GLOBAL__N_11C1fEv(
diff --git a/test/CodeGenCXX/tls-init-funcs.cpp b/test/CodeGenCXX/tls-init-funcs.cpp
index 17299dcb7b6c..d47329cdc29f 100644
--- a/test/CodeGenCXX/tls-init-funcs.cpp
+++ b/test/CodeGenCXX/tls-init-funcs.cpp
@@ -1,10 +1,34 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macosx10.8 -std=c++11 -S -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.8 -std=c++1y -S -emit-llvm %s -o - | FileCheck %s
// CHECK: @a = internal thread_local global
+// CHECK: @_Z2vtIiE = internal thread_local global i32 5
+// CHECK: @_ZZ3inlvE3loc = linkonce_odr thread_local global i32 0
// CHECK: @_tlv_atexit({{.*}}@_ZN1AD1Ev
+// CHECK: call i32* @_ZTW3ext()
+// CHECK: declare i32* @_ZTW3ext()
+// CHECK: define weak i32* @_ZTW2vtIiE()
+// CHECK: define weak i32* @_ZTW2vtIvE()
+// CHECK: define {{.*}} @_ZTW1a
struct A {
~A();
};
thread_local A a;
+
+extern thread_local int ext;
+int &get_ext() { return ext; }
+
+template <typename T>
+thread_local int vt = 5;
+
+int get_vt() { return vt<int>; }
+
+inline int &inl() {
+ thread_local int loc;
+ return loc;
+}
+int &use_inl() { return inl(); }
+
+template int vt<void>;
+int &get_vt_void() { return vt<void>; }
diff --git a/test/CodeGenCXX/trivial-constructor-init.cpp b/test/CodeGenCXX/trivial-constructor-init.cpp
index 65ed45e259c5..9130e4e5d959 100644
--- a/test/CodeGenCXX/trivial-constructor-init.cpp
+++ b/test/CodeGenCXX/trivial-constructor-init.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - -std=c++11 | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -std=c++11 -triple %itanium_abi_triple | FileCheck %s
extern "C" int printf(...);
diff --git a/test/CodeGenCXX/type-traits.cpp b/test/CodeGenCXX/type-traits.cpp
new file mode 100644
index 000000000000..93cc6b56f1d2
--- /dev/null
+++ b/test/CodeGenCXX/type-traits.cpp
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -emit-llvm-only -verify %s
+// expected-no-diagnostics
+
+bool a() { return __is_pod(int); }
+
+bool b() { return __is_trivially_constructible(int, int, int); }
diff --git a/test/CodeGenCXX/type_visibility.cpp b/test/CodeGenCXX/type_visibility.cpp
index 11e5091fd279..a7b7198a23fa 100644
--- a/test/CodeGenCXX/type_visibility.cpp
+++ b/test/CodeGenCXX/type_visibility.cpp
@@ -29,11 +29,11 @@ namespace temp0 {
// FUNS-LABEL: define weak_odr void @_ZN5temp01BINS_1AEE3fooEv(
// VARS: @_ZTVN5temp01BINS_1AEEE = weak_odr unnamed_addr constant
// VARS: @_ZTSN5temp01BINS_1AEEE = weak_odr constant
- // VARS: @_ZTIN5temp01BINS_1AEEE = weak_odr unnamed_addr constant
+ // VARS: @_ZTIN5temp01BINS_1AEEE = weak_odr constant
// FUNS-HIDDEN-LABEL: define weak_odr hidden void @_ZN5temp01BINS_1AEE3fooEv(
// VARS-HIDDEN: @_ZTVN5temp01BINS_1AEEE = weak_odr hidden unnamed_addr constant
// VARS-HIDDEN: @_ZTSN5temp01BINS_1AEEE = weak_odr hidden constant
- // VARS-HIDDEN: @_ZTIN5temp01BINS_1AEEE = weak_odr hidden unnamed_addr constant
+ // VARS-HIDDEN: @_ZTIN5temp01BINS_1AEEE = weak_odr hidden constant
}
namespace temp1 {
@@ -46,11 +46,11 @@ namespace temp1 {
// FUNS-LABEL: define weak_odr void @_ZN5temp11BINS_1AEE3fooEv(
// VARS: @_ZTVN5temp11BINS_1AEEE = weak_odr unnamed_addr constant
// VARS: @_ZTSN5temp11BINS_1AEEE = weak_odr constant
- // VARS: @_ZTIN5temp11BINS_1AEEE = weak_odr unnamed_addr constant
+ // VARS: @_ZTIN5temp11BINS_1AEEE = weak_odr constant
// FUNS-HIDDEN-LABEL: define weak_odr hidden void @_ZN5temp11BINS_1AEE3fooEv(
// VARS-HIDDEN: @_ZTVN5temp11BINS_1AEEE = weak_odr unnamed_addr constant
// VARS-HIDDEN: @_ZTSN5temp11BINS_1AEEE = weak_odr constant
- // VARS-HIDDEN: @_ZTIN5temp11BINS_1AEEE = weak_odr unnamed_addr constant
+ // VARS-HIDDEN: @_ZTIN5temp11BINS_1AEEE = weak_odr constant
}
namespace temp2 {
@@ -63,11 +63,11 @@ namespace temp2 {
// FUNS-LABEL: define weak_odr void @_ZN5temp21BINS_1AEE3fooEv(
// VARS: @_ZTVN5temp21BINS_1AEEE = weak_odr unnamed_addr constant
// VARS: @_ZTSN5temp21BINS_1AEEE = weak_odr constant
- // VARS: @_ZTIN5temp21BINS_1AEEE = weak_odr unnamed_addr constant
+ // VARS: @_ZTIN5temp21BINS_1AEEE = weak_odr constant
// FUNS-HIDDEN-LABEL: define weak_odr hidden void @_ZN5temp21BINS_1AEE3fooEv(
// VARS-HIDDEN: @_ZTVN5temp21BINS_1AEEE = weak_odr hidden unnamed_addr constant
// VARS-HIDDEN: @_ZTSN5temp21BINS_1AEEE = weak_odr hidden constant
- // VARS-HIDDEN: @_ZTIN5temp21BINS_1AEEE = weak_odr hidden unnamed_addr constant
+ // VARS-HIDDEN: @_ZTIN5temp21BINS_1AEEE = weak_odr hidden constant
}
namespace temp3 {
@@ -80,11 +80,11 @@ namespace temp3 {
// FUNS-LABEL: define weak_odr hidden void @_ZN5temp31BINS_1AEE3fooEv(
// VARS: @_ZTVN5temp31BINS_1AEEE = weak_odr hidden unnamed_addr constant
// VARS: @_ZTSN5temp31BINS_1AEEE = weak_odr hidden constant
- // VARS: @_ZTIN5temp31BINS_1AEEE = weak_odr hidden unnamed_addr constant
+ // VARS: @_ZTIN5temp31BINS_1AEEE = weak_odr hidden constant
// FUNS-HIDDEN-LABEL: define weak_odr hidden void @_ZN5temp31BINS_1AEE3fooEv(
// VARS-HIDDEN: @_ZTVN5temp31BINS_1AEEE = weak_odr hidden unnamed_addr constant
// VARS-HIDDEN: @_ZTSN5temp31BINS_1AEEE = weak_odr hidden constant
- // VARS-HIDDEN: @_ZTIN5temp31BINS_1AEEE = weak_odr hidden unnamed_addr constant
+ // VARS-HIDDEN: @_ZTIN5temp31BINS_1AEEE = weak_odr hidden constant
}
namespace temp4 {
@@ -97,11 +97,11 @@ namespace temp4 {
// FUNS-LABEL: define weak_odr void @_ZN5temp41BINS_1AEE3fooEv(
// VARS: @_ZTVN5temp41BINS_1AEEE = weak_odr hidden unnamed_addr constant
// VARS: @_ZTSN5temp41BINS_1AEEE = weak_odr hidden constant
- // VARS: @_ZTIN5temp41BINS_1AEEE = weak_odr hidden unnamed_addr constant
+ // VARS: @_ZTIN5temp41BINS_1AEEE = weak_odr hidden constant
// FUNS-HIDDEN-LABEL: define weak_odr hidden void @_ZN5temp41BINS_1AEE3fooEv(
// VARS-HIDDEN: @_ZTVN5temp41BINS_1AEEE = weak_odr hidden unnamed_addr constant
// VARS-HIDDEN: @_ZTSN5temp41BINS_1AEEE = weak_odr hidden constant
- // VARS-HIDDEN: @_ZTIN5temp41BINS_1AEEE = weak_odr hidden unnamed_addr constant
+ // VARS-HIDDEN: @_ZTIN5temp41BINS_1AEEE = weak_odr hidden constant
}
namespace type0 {
@@ -113,11 +113,11 @@ namespace type0 {
// FUNS-LABEL: define void @_ZN5type01A3fooEv(
// VARS: @_ZTVN5type01AE = unnamed_addr constant
// VARS: @_ZTSN5type01AE = constant
- // VARS: @_ZTIN5type01AE = unnamed_addr constant
+ // VARS: @_ZTIN5type01AE = constant
// FUNS-HIDDEN-LABEL: define hidden void @_ZN5type01A3fooEv(
// VARS-HIDDEN: @_ZTVN5type01AE = unnamed_addr constant
// VARS-HIDDEN: @_ZTSN5type01AE = constant
- // VARS-HIDDEN: @_ZTIN5type01AE = unnamed_addr constant
+ // VARS-HIDDEN: @_ZTIN5type01AE = constant
}
namespace type1 {
@@ -129,11 +129,11 @@ namespace type1 {
// FUNS-LABEL: define hidden void @_ZN5type11A3fooEv(
// VARS: @_ZTVN5type11AE = unnamed_addr constant
// VARS: @_ZTSN5type11AE = constant
- // VARS: @_ZTIN5type11AE = unnamed_addr constant
+ // VARS: @_ZTIN5type11AE = constant
// FUNS-HIDDEN-LABEL: define hidden void @_ZN5type11A3fooEv(
// VARS-HIDDEN: @_ZTVN5type11AE = unnamed_addr constant
// VARS-HIDDEN: @_ZTSN5type11AE = constant
- // VARS-HIDDEN: @_ZTIN5type11AE = unnamed_addr constant
+ // VARS-HIDDEN: @_ZTIN5type11AE = constant
}
namespace type2 {
@@ -145,11 +145,11 @@ namespace type2 {
// FUNS-LABEL: define void @_ZN5type21A3fooEv(
// VARS: @_ZTVN5type21AE = hidden unnamed_addr constant
// VARS: @_ZTSN5type21AE = hidden constant
- // VARS: @_ZTIN5type21AE = hidden unnamed_addr constant
+ // VARS: @_ZTIN5type21AE = hidden constant
// FUNS-HIDDEN-LABEL: define hidden void @_ZN5type21A3fooEv(
// VARS-HIDDEN: @_ZTVN5type21AE = hidden unnamed_addr constant
// VARS-HIDDEN: @_ZTSN5type21AE = hidden constant
- // VARS-HIDDEN: @_ZTIN5type21AE = hidden unnamed_addr constant
+ // VARS-HIDDEN: @_ZTIN5type21AE = hidden constant
}
namespace type3 {
@@ -161,10 +161,10 @@ namespace type3 {
// FUNS-LABEL: define void @_ZN5type31A3fooEv(
// VARS: @_ZTVN5type31AE = hidden unnamed_addr constant
// VARS: @_ZTSN5type31AE = hidden constant
- // VARS: @_ZTIN5type31AE = hidden unnamed_addr constant
+ // VARS: @_ZTIN5type31AE = hidden constant
// FUNS-HIDDEN-LABEL: define void @_ZN5type31A3fooEv(
// VARS-HIDDEN: @_ZTVN5type31AE = hidden unnamed_addr constant
// VARS-HIDDEN: @_ZTSN5type31AE = hidden constant
- // VARS-HIDDEN: @_ZTIN5type31AE = hidden unnamed_addr constant
+ // VARS-HIDDEN: @_ZTIN5type31AE = hidden constant
}
diff --git a/test/CodeGenCXX/typeid-should-throw.cpp b/test/CodeGenCXX/typeid-should-throw.cpp
new file mode 100644
index 000000000000..1d8fc85896af
--- /dev/null
+++ b/test/CodeGenCXX/typeid-should-throw.cpp
@@ -0,0 +1,82 @@
+// RUN: %clang_cc1 %s -triple %itanium_abi_triple -Wno-unused-value -emit-llvm -o - -std=c++11 | FileCheck %s
+namespace std {
+struct type_info;
+}
+
+struct A {
+ virtual ~A();
+ operator bool();
+};
+struct B : A {};
+
+void f1(A *x) { typeid(false, *x); }
+// CHECK-LABEL: define void @_Z2f1P1A
+// CHECK: icmp eq {{.*}}, null
+// CHECK-NEXT: br i1
+
+void f2(bool b, A *x, A *y) { typeid(b ? *x : *y); }
+// CHECK-LABEL: define void @_Z2f2bP1AS0_
+// CHECK: icmp eq {{.*}}, null
+// CHECK-NEXT: br i1
+
+void f3(bool b, A *x, A &y) { typeid(b ? *x : y); }
+// CHECK-LABEL: define void @_Z2f3bP1ARS_
+// CHECK: icmp eq {{.*}}, null
+// CHECK-NEXT: br i1
+
+void f4(bool b, A &x, A *y) { typeid(b ? x : *y); }
+// CHECK-LABEL: define void @_Z2f4bR1APS_
+// CHECK: icmp eq {{.*}}, null
+// CHECK-NEXT: br i1
+
+void f5(volatile A *x) { typeid(*x); }
+// CHECK-LABEL: define void @_Z2f5PV1A
+// CHECK: icmp eq {{.*}}, null
+// CHECK-NEXT: br i1
+
+void f6(A *x) { typeid((B &)*(B *)x); }
+// CHECK-LABEL: define void @_Z2f6P1A
+// CHECK: icmp eq {{.*}}, null
+// CHECK-NEXT: br i1
+
+void f7(A *x) { typeid((*x)); }
+// CHECK-LABEL: define void @_Z2f7P1A
+// CHECK: icmp eq {{.*}}, null
+// CHECK-NEXT: br i1
+
+void f8(A *x) { typeid(x[0]); }
+// CHECK-LABEL: define void @_Z2f8P1A
+// CHECK: icmp eq {{.*}}, null
+// CHECK-NEXT: br i1
+
+void f9(A *x) { typeid(0[x]); }
+// CHECK-LABEL: define void @_Z2f9P1A
+// CHECK: icmp eq {{.*}}, null
+// CHECK-NEXT: br i1
+
+void f10(A *x, A *y) { typeid(*y ?: *x); }
+// CHECK-LABEL: define void @_Z3f10P1AS0_
+// CHECK: icmp eq {{.*}}, null
+// CHECK-NEXT: br i1
+
+void f11(A *x, A &y) { typeid(*x ?: y); }
+// CHECK-LABEL: define void @_Z3f11P1ARS_
+// CHECK: icmp eq {{.*}}, null
+// CHECK-NEXT: br i1
+
+void f12(A &x, A *y) { typeid(x ?: *y); }
+// CHECK-LABEL: define void @_Z3f12R1APS_
+// CHECK: icmp eq {{.*}}, null
+// CHECK-NEXT: br i1
+
+void f13(A &x, A &y) { typeid(x ?: y); }
+// CHECK-LABEL: define void @_Z3f13R1AS0_
+// CHECK-NOT: icmp eq {{.*}}, null
+
+void f14(A *x) { typeid((const A &)(A)*x); }
+// CHECK-LABEL: define void @_Z3f14P1A
+// CHECK-NOT: icmp eq {{.*}}, null
+
+void f15(A *x) { typeid((A &&)*(A *)nullptr); }
+// CHECK-LABEL: define void @_Z3f15P1A
+// CHECK-NOT: icmp eq {{.*}}, null
diff --git a/test/CodeGenCXX/unary-type-trait.cpp b/test/CodeGenCXX/unary-type-trait.cpp
deleted file mode 100644
index 3c6f9c03aa41..000000000000
--- a/test/CodeGenCXX/unary-type-trait.cpp
+++ /dev/null
@@ -1,4 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm-only -verify %s
-// expected-no-diagnostics
-
-bool a() { return __is_pod(int); }
diff --git a/test/CodeGenCXX/uncopyable-args.cpp b/test/CodeGenCXX/uncopyable-args.cpp
new file mode 100644
index 000000000000..77996f656e01
--- /dev/null
+++ b/test/CodeGenCXX/uncopyable-args.cpp
@@ -0,0 +1,206 @@
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-windows-msvc -emit-llvm -o - %s | FileCheck %s -check-prefix=WIN64
+
+namespace trivial {
+// Trivial structs should be passed directly.
+struct A {
+ void *p;
+};
+void foo(A);
+void bar() {
+ foo({});
+}
+// CHECK-LABEL: define void @_ZN7trivial3barEv()
+// CHECK: alloca %"struct.trivial::A"
+// CHECK: load i8**
+// CHECK: call void @_ZN7trivial3fooENS_1AE(i8* %{{.*}})
+// CHECK-LABEL: declare void @_ZN7trivial3fooENS_1AE(i8*)
+
+// WIN64-LABEL: declare void @"\01?foo@trivial@@YAXUA@1@@Z"(i64)
+}
+
+namespace default_ctor {
+struct A {
+ A();
+ void *p;
+};
+void foo(A);
+void bar() {
+ // Core issue 1590. We can pass this type in registers, even though C++
+ // normally doesn't permit copies when using braced initialization.
+ foo({});
+}
+// CHECK-LABEL: define void @_ZN12default_ctor3barEv()
+// CHECK: alloca %"struct.default_ctor::A"
+// CHECK: call void @_Z{{.*}}C1Ev(
+// CHECK: load i8**
+// CHECK: call void @_ZN12default_ctor3fooENS_1AE(i8* %{{.*}})
+// CHECK-LABEL: declare void @_ZN12default_ctor3fooENS_1AE(i8*)
+
+// WIN64-LABEL: declare void @"\01?foo@default_ctor@@YAXUA@1@@Z"(i64)
+}
+
+namespace move_ctor {
+// The presence of a move constructor implicitly deletes the trivial copy ctor
+// and means that we have to pass this struct by address.
+struct A {
+ A();
+ A(A &&o);
+ void *p;
+};
+void foo(A);
+void bar() {
+ foo({});
+}
+// FIXME: The copy ctor is implicitly deleted.
+// CHECK-DISABLED-LABEL: define void @_ZN9move_ctor3barEv()
+// CHECK-DISABLED: call void @_Z{{.*}}C1Ev(
+// CHECK-DISABLED-NOT: call
+// CHECK-DISABLED: call void @_ZN9move_ctor3fooENS_1AE(%"struct.move_ctor::A"* %{{.*}})
+// CHECK-DISABLED-LABEL: declare void @_ZN9move_ctor3fooENS_1AE(%"struct.move_ctor::A"*)
+
+// WIN64-LABEL: declare void @"\01?foo@move_ctor@@YAXUA@1@@Z"(%"struct.move_ctor::A"*)
+}
+
+namespace all_deleted {
+struct A {
+ A();
+ A(const A &o) = delete;
+ A(A &&o) = delete;
+ void *p;
+};
+void foo(A);
+void bar() {
+ foo({});
+}
+// FIXME: The copy ctor is deleted.
+// CHECK-DISABLED-LABEL: define void @_ZN11all_deleted3barEv()
+// CHECK-DISABLED: call void @_Z{{.*}}C1Ev(
+// CHECK-DISABLED-NOT call
+// CHECK-DISABLED: call void @_ZN11all_deleted3fooENS_1AE(%"struct.all_deleted::A"* %{{.*}})
+// CHECK-DISABLED-LABEL: declare void @_ZN11all_deleted3fooENS_1AE(%"struct.all_deleted::A"*)
+
+// WIN64-LABEL: declare void @"\01?foo@all_deleted@@YAXUA@1@@Z"(%"struct.all_deleted::A"*)
+}
+
+namespace implicitly_deleted {
+struct A {
+ A();
+ A &operator=(A &&o);
+ void *p;
+};
+void foo(A);
+void bar() {
+ foo({});
+}
+// FIXME: The copy and move ctors are implicitly deleted.
+// CHECK-DISABLED-LABEL: define void @_ZN18implicitly_deleted3barEv()
+// CHECK-DISABLED: call void @_Z{{.*}}C1Ev(
+// CHECK-DISABLED-NOT call
+// CHECK-DISABLED: call void @_ZN18implicitly_deleted3fooENS_1AE(%"struct.implicitly_deleted::A"* %{{.*}})
+// CHECK-DISABLED-LABEL: declare void @_ZN18implicitly_deleted3fooENS_1AE(%"struct.implicitly_deleted::A"*)
+
+// WIN64-LABEL: declare void @"\01?foo@implicitly_deleted@@YAXUA@1@@Z"(%"struct.implicitly_deleted::A"*)
+}
+
+namespace one_deleted {
+struct A {
+ A();
+ A(A &&o) = delete;
+ void *p;
+};
+void foo(A);
+void bar() {
+ foo({});
+}
+// FIXME: The copy constructor is implicitly deleted.
+// CHECK-DISABLED-LABEL: define void @_ZN11one_deleted3barEv()
+// CHECK-DISABLED: call void @_Z{{.*}}C1Ev(
+// CHECK-DISABLED-NOT call
+// CHECK-DISABLED: call void @_ZN11one_deleted3fooENS_1AE(%"struct.one_deleted::A"* %{{.*}})
+// CHECK-DISABLED-LABEL: declare void @_ZN11one_deleted3fooENS_1AE(%"struct.one_deleted::A"*)
+
+// WIN64-LABEL: declare void @"\01?foo@one_deleted@@YAXUA@1@@Z"(%"struct.one_deleted::A"*)
+}
+
+namespace copy_defaulted {
+struct A {
+ A();
+ A(const A &o) = default;
+ A(A &&o) = delete;
+ void *p;
+};
+void foo(A);
+void bar() {
+ foo({});
+}
+// CHECK-LABEL: define void @_ZN14copy_defaulted3barEv()
+// CHECK: call void @_Z{{.*}}C1Ev(
+// CHECK: load i8**
+// CHECK: call void @_ZN14copy_defaulted3fooENS_1AE(i8* %{{.*}})
+// CHECK-LABEL: declare void @_ZN14copy_defaulted3fooENS_1AE(i8*)
+
+// WIN64-LABEL: declare void @"\01?foo@copy_defaulted@@YAXUA@1@@Z"(i64)
+}
+
+namespace move_defaulted {
+struct A {
+ A();
+ A(const A &o) = delete;
+ A(A &&o) = default;
+ void *p;
+};
+void foo(A);
+void bar() {
+ foo({});
+}
+// CHECK-LABEL: define void @_ZN14move_defaulted3barEv()
+// CHECK: call void @_Z{{.*}}C1Ev(
+// CHECK: load i8**
+// CHECK: call void @_ZN14move_defaulted3fooENS_1AE(i8* %{{.*}})
+// CHECK-LABEL: declare void @_ZN14move_defaulted3fooENS_1AE(i8*)
+
+// WIN64-LABEL: declare void @"\01?foo@move_defaulted@@YAXUA@1@@Z"(%"struct.move_defaulted::A"*)
+}
+
+namespace trivial_defaulted {
+struct A {
+ A();
+ A(const A &o) = default;
+ void *p;
+};
+void foo(A);
+void bar() {
+ foo({});
+}
+// CHECK-LABEL: define void @_ZN17trivial_defaulted3barEv()
+// CHECK: call void @_Z{{.*}}C1Ev(
+// CHECK: load i8**
+// CHECK: call void @_ZN17trivial_defaulted3fooENS_1AE(i8* %{{.*}})
+// CHECK-LABEL: declare void @_ZN17trivial_defaulted3fooENS_1AE(i8*)
+
+// WIN64-LABEL: declare void @"\01?foo@trivial_defaulted@@YAXUA@1@@Z"(i64)
+}
+
+namespace two_copy_ctors {
+struct A {
+ A();
+ A(const A &) = default;
+ A(const A &, int = 0);
+ void *p;
+};
+struct B : A {};
+
+void foo(B);
+void bar() {
+ foo({});
+}
+// FIXME: This class has a non-trivial copy ctor and a trivial copy ctor. It's
+// not clear whether we should pass by address or in registers.
+// CHECK-DISABLED-LABEL: define void @_ZN14two_copy_ctors3barEv()
+// CHECK-DISABLED: call void @_Z{{.*}}C1Ev(
+// CHECK-DISABLED: call void @_ZN14two_copy_ctors3fooENS_1BE(%"struct.two_copy_ctors::B"* %{{.*}})
+// CHECK-DISABLED-LABEL: declare void @_ZN14two_copy_ctors3fooENS_1BE(%"struct.two_copy_ctors::B"*)
+
+// WIN64-LABEL: declare void @"\01?foo@two_copy_ctors@@YAXUB@1@@Z"(%"struct.two_copy_ctors::B"*)
+}
diff --git a/test/CodeGenCXX/value-init.cpp b/test/CodeGenCXX/value-init.cpp
index fad459b481bf..423d9736b4a8 100644
--- a/test/CodeGenCXX/value-init.cpp
+++ b/test/CodeGenCXX/value-init.cpp
@@ -262,6 +262,59 @@ namespace PR11124 {
void r170806_a(bool b = bool());
void r170806_b() { r170806_a(); }
+namespace PR20256 {
+ struct data { int i; };
+
+ template<typename T = int>
+ data g() {
+ data d; // not value-init
+ return d;
+ }
+ template data g();
+ // CHECK-LABEL: define {{.*}} @_ZN7PR202561gIiEENS_4dataEv(
+ // CHECK-NOT: store
+ // CHECK-NOT: memset
+ // CHECK: }
+
+ template<typename ...T>
+ data h(T ...t) {
+ data d(t...); // value-init
+ return d;
+ }
+ template data h();
+ // CHECK-LABEL: define {{.*}} @_ZN7PR202561hIJEEENS_4dataEDpT_(
+ // CHECK: call void @llvm.memset
+ // CHECK: }
+
+
+ template<typename T = int>
+ data j() {
+ data d = {}; // value-init
+ return d;
+ }
+ template data j();
+ // CHECK-LABEL: define {{.*}} @_ZN7PR202561jIiEENS_4dataEv(
+ // CHECK: call void @llvm.memset
+ // CHECK: }
+
+ data f() {
+ data d; // not value-init
+ return d;
+ }
+ // CHECK-LABEL: define {{.*}} @_ZN7PR202561fEv(
+ // CHECK-NOT: store
+ // CHECK-NOT: memset
+ // CHECK: }
+
+ data i() {
+ data d = {}; // value-init
+ return d;
+ }
+ // CHECK-LABEL: define {{.*}} @_ZN7PR202561iEv(
+ // CHECK: call void @llvm.memset
+ // CHECK: }
+}
+
// CHECK-LABEL: define linkonce_odr void @_ZN8zeroinit2X3IiEC2Ev(%"struct.zeroinit::X3"* %this) unnamed_addr
// CHECK: call void @llvm.memset.p0i8.i64
// CHECK-NEXT: call void @_ZN8zeroinit2X2IiEC2Ev
diff --git a/test/CodeGenCXX/vararg-non-pod.cpp b/test/CodeGenCXX/vararg-non-pod.cpp
index 9497179ddf05..613b28c736f0 100644
--- a/test/CodeGenCXX/vararg-non-pod.cpp
+++ b/test/CodeGenCXX/vararg-non-pod.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -Wno-error=non-pod-varargs -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -Wno-error=non-pod-varargs -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
struct X {
X();
diff --git a/test/CodeGenCXX/virt-dtor-gen.cpp b/test/CodeGenCXX/virt-dtor-gen.cpp
index 78a0b8193d74..ba836896c2cd 100644
--- a/test/CodeGenCXX/virt-dtor-gen.cpp
+++ b/test/CodeGenCXX/virt-dtor-gen.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -o - -emit-llvm %s | FileCheck %s
+// RUN: %clang_cc1 -o - -triple %itanium_abi_triple -emit-llvm %s | FileCheck %s
// PR5483
// Make sure we generate all three forms of the destructor when it is virtual.
@@ -7,4 +7,4 @@ class Foo {
};
Foo::~Foo() {}
-// CHECK-LABEL: define void @_ZN3FooD0Ev(%class.Foo* %this) unnamed_addr
+// CHECK-LABEL: define {{.*}}void @_ZN3FooD0Ev(%class.Foo* %this) unnamed_addr
diff --git a/test/CodeGenCXX/virt-dtor-key.cpp b/test/CodeGenCXX/virt-dtor-key.cpp
index a8fa371d3fa8..40c5a537cc53 100644
--- a/test/CodeGenCXX/virt-dtor-key.cpp
+++ b/test/CodeGenCXX/virt-dtor-key.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
-// CHECK: @_ZTI3foo = unnamed_addr constant
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s
+// CHECK: @_ZTI3foo = constant
class foo {
foo();
virtual ~foo();
diff --git a/test/CodeGenCXX/virt-template-vtable.cpp b/test/CodeGenCXX/virt-template-vtable.cpp
index a6067d62c61d..a71db48a79a0 100644
--- a/test/CodeGenCXX/virt-template-vtable.cpp
+++ b/test/CodeGenCXX/virt-template-vtable.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
template<class T> class A {
public:
diff --git a/test/CodeGenCXX/virtual-base-cast.cpp b/test/CodeGenCXX/virtual-base-cast.cpp
index 40e68f672232..6a4894b63b70 100644
--- a/test/CodeGenCXX/virtual-base-cast.cpp
+++ b/test/CodeGenCXX/virtual-base-cast.cpp
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -emit-llvm %s -o - -triple i686-pc-linux-gnu | FileCheck %s
-// RUN: %clang_cc1 -cxx-abi microsoft -emit-llvm %s -o - -triple i686-pc-win32 | FileCheck -check-prefix MSVC %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple i686-pc-win32 | FileCheck -check-prefix MSVC %s
struct A { int a; virtual int aa(); };
struct B { int b; virtual int bb(); };
diff --git a/test/CodeGenCXX/virtual-base-ctor.cpp b/test/CodeGenCXX/virtual-base-ctor.cpp
index 2d81ebd3a407..8c28965c5c2f 100644
--- a/test/CodeGenCXX/virtual-base-ctor.cpp
+++ b/test/CodeGenCXX/virtual-base-ctor.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - -O2 | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - -O2 | FileCheck %s
struct B;
extern B x;
diff --git a/test/CodeGenCXX/virtual-base-destructor-call.cpp b/test/CodeGenCXX/virtual-base-destructor-call.cpp
index 5014eaf2643b..3d790715822e 100644
--- a/test/CodeGenCXX/virtual-base-destructor-call.cpp
+++ b/test/CodeGenCXX/virtual-base-destructor-call.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
struct basic_ios{~basic_ios(); };
diff --git a/test/CodeGenCXX/virtual-bases.cpp b/test/CodeGenCXX/virtual-bases.cpp
index 2878e95b52cd..e9c568c31b48 100644
--- a/test/CodeGenCXX/virtual-bases.cpp
+++ b/test/CodeGenCXX/virtual-bases.cpp
@@ -12,16 +12,16 @@ struct B : virtual A {
B();
};
-// CHECK-LABEL: define void @_ZN1BC1Ev(%struct.B* %this) unnamed_addr
// CHECK-LABEL: define void @_ZN1BC2Ev(%struct.B* %this, i8** %vtt) unnamed_addr
+// CHECK-LABEL: define void @_ZN1BC1Ev(%struct.B* %this) unnamed_addr
B::B() { }
struct C : virtual A {
C(bool);
};
-// CHECK-LABEL: define void @_ZN1CC1Eb(%struct.C* %this, i1 zeroext) unnamed_addr
// CHECK-LABEL: define void @_ZN1CC2Eb(%struct.C* %this, i8** %vtt, i1 zeroext) unnamed_addr
+// CHECK-LABEL: define void @_ZN1CC1Eb(%struct.C* %this, i1 zeroext) unnamed_addr
C::C(bool) { }
// PR6251
diff --git a/test/CodeGenCXX/virtual-destructor-calls.cpp b/test/CodeGenCXX/virtual-destructor-calls.cpp
index ae3704f36928..3e7fa8293af8 100644
--- a/test/CodeGenCXX/virtual-destructor-calls.cpp
+++ b/test/CodeGenCXX/virtual-destructor-calls.cpp
@@ -20,16 +20,16 @@ struct B : A {
// CHECK: @_ZN1CD1Ev = alias {{.*}} @_ZN1CD2Ev
// CHECK: @_ZN1CD2Ev = alias bitcast {{.*}} @_ZN1BD2Ev
-// Deleting dtor: defers to the complete dtor.
-// CHECK-LABEL: define void @_ZN1BD0Ev(%struct.B* %this) unnamed_addr
-// CHECK: call void @_ZN1BD1Ev
-// CHECK: call void @_ZdlPv
-
// Base dtor: actually calls A's base dtor.
// CHECK-LABEL: define void @_ZN1BD2Ev(%struct.B* %this) unnamed_addr
// CHECK: call void @_ZN6MemberD1Ev
// CHECK: call void @_ZN1AD2Ev
+// Deleting dtor: defers to the complete dtor.
+// CHECK-LABEL: define void @_ZN1BD0Ev(%struct.B* %this) unnamed_addr
+// CHECK: call void @_ZN1BD1Ev
+// CHECK: call void @_ZdlPv
+
B::~B() { }
struct C : B {
diff --git a/test/CodeGenCXX/virtual-destructor-synthesis.cpp b/test/CodeGenCXX/virtual-destructor-synthesis.cpp
index 90f66a817db1..80d1b1e4ec75 100644
--- a/test/CodeGenCXX/virtual-destructor-synthesis.cpp
+++ b/test/CodeGenCXX/virtual-destructor-synthesis.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
struct box {
virtual ~box();
diff --git a/test/CodeGenCXX/virtual-function-calls.cpp b/test/CodeGenCXX/virtual-function-calls.cpp
index e1b380fe7369..0a6fc6b3f284 100644
--- a/test/CodeGenCXX/virtual-function-calls.cpp
+++ b/test/CodeGenCXX/virtual-function-calls.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -std=c++11 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple %itanium_abi_triple -std=c++11 -emit-llvm -o - | FileCheck %s
// PR5021
namespace PR5021 {
@@ -8,7 +8,7 @@ struct A {
};
void f(A *a) {
- // CHECK: call void %
+ // CHECK: call {{.*}}void %
a->f('c');
}
@@ -45,7 +45,7 @@ namespace VirtualNoreturn {
// CHECK: @_ZN15VirtualNoreturn1f
void f(A *p) {
p->f();
- // CHECK: call void %{{[^#]*$}}
+ // CHECK: call {{.*}}void %{{[^#]*$}}
// CHECK-NOT: unreachable
}
}
diff --git a/test/CodeGenCXX/virtual-implicit-copy-assignment.cpp b/test/CodeGenCXX/virtual-implicit-copy-assignment.cpp
index 70bc6fceb361..031046597e8b 100644
--- a/test/CodeGenCXX/virtual-implicit-copy-assignment.cpp
+++ b/test/CodeGenCXX/virtual-implicit-copy-assignment.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
struct D;
struct B {
diff --git a/test/CodeGenCXX/virtual-implicit-move-assignment.cpp b/test/CodeGenCXX/virtual-implicit-move-assignment.cpp
index d8ac1ed4c489..7c28fb11215c 100644
--- a/test/CodeGenCXX/virtual-implicit-move-assignment.cpp
+++ b/test/CodeGenCXX/virtual-implicit-move-assignment.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -std=c++11 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -std=c++11 -o - %s | FileCheck %s
struct D;
struct B {
diff --git a/test/CodeGenCXX/virtual-inherited-destructor.cpp b/test/CodeGenCXX/virtual-inherited-destructor.cpp
index 509d40ae2fef..3ca7b6df8c3d 100644
--- a/test/CodeGenCXX/virtual-inherited-destructor.cpp
+++ b/test/CodeGenCXX/virtual-inherited-destructor.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm-only
+// RUN: %clang_cc1 %s -triple %itanium_abi_triple -emit-llvm-only
struct A { virtual ~A(); };
struct B : A {
diff --git a/test/CodeGenCXX/virtual-pseudo-destructor-call.cpp b/test/CodeGenCXX/virtual-pseudo-destructor-call.cpp
index 0d3574e46d33..b14a34d8b587 100644
--- a/test/CodeGenCXX/virtual-pseudo-destructor-call.cpp
+++ b/test/CodeGenCXX/virtual-pseudo-destructor-call.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
struct A {
virtual ~A();
diff --git a/test/CodeGenCXX/visibility-hidden-extern-templates.cpp b/test/CodeGenCXX/visibility-hidden-extern-templates.cpp
index 549e674740ff..95e8e089cc12 100644
--- a/test/CodeGenCXX/visibility-hidden-extern-templates.cpp
+++ b/test/CodeGenCXX/visibility-hidden-extern-templates.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -O1 -emit-llvm -o - -fvisibility hidden %s | FileCheck %s
+// RUN: %clang_cc1 -O1 -triple %itanium_abi_triple -emit-llvm -o - -fvisibility hidden %s | FileCheck %s
template<typename T>
struct X {
@@ -14,13 +14,13 @@ extern template struct X<char>;
// <rdar://problem/8109763>
void test_X(X<int> xi, X<char> xc) {
- // CHECK-LABEL: define weak_odr hidden void @_ZN1XIiE1fEv
+ // CHECK-LABEL: define weak_odr hidden {{.*}}void @_ZN1XIiE1fEv
xi.f();
- // CHECK-LABEL: define weak_odr hidden void @_ZN1XIiE1gEv
+ // CHECK-LABEL: define weak_odr hidden {{.*}}void @_ZN1XIiE1gEv
xi.g();
- // CHECK: declare void @_ZN1XIcE1fEv
+ // CHECK: declare {{.*}}void @_ZN1XIcE1fEv
xc.f();
- // CHECK-LABEL: define available_externally void @_ZN1XIcE1gEv
+ // CHECK-LABEL: define available_externally {{.*}}void @_ZN1XIcE1gEv
xc.g();
}
diff --git a/test/CodeGenCXX/visibility-ms-compat.cpp b/test/CodeGenCXX/visibility-ms-compat.cpp
index 25446cdf06f9..963b2a4e6d69 100644
--- a/test/CodeGenCXX/visibility-ms-compat.cpp
+++ b/test/CodeGenCXX/visibility-ms-compat.cpp
@@ -27,7 +27,7 @@ namespace test0 {
const std::type_info &ti = typeid(A);
// CHECK-GLOBAL: @_ZTSN5test01AE = linkonce_odr constant
- // CHECK-GLOBAL: @_ZTIN5test01AE = linkonce_odr unnamed_addr constant
+ // CHECK-GLOBAL: @_ZTIN5test01AE = linkonce_odr constant
// CHECK-GLOBAL: @_ZN5test02tiE = hidden constant
}
@@ -43,7 +43,7 @@ namespace test1 {
const std::type_info &ti = typeid(A);
// CHECK-GLOBAL: @_ZTSN5test11AE = linkonce_odr hidden constant
- // CHECK-GLOBAL: @_ZTIN5test11AE = linkonce_odr hidden unnamed_addr constant
+ // CHECK-GLOBAL: @_ZTIN5test11AE = linkonce_odr hidden constant
// CHECK-GLOBAL: @_ZN5test12tiE = hidden constant
}
@@ -59,7 +59,7 @@ namespace test2 {
const std::type_info &ti = typeid(A);
// CHECK-GLOBAL: @_ZTSN5test21AE = linkonce_odr constant
- // CHECK-GLOBAL: @_ZTIN5test21AE = linkonce_odr unnamed_addr constant
+ // CHECK-GLOBAL: @_ZTIN5test21AE = linkonce_odr constant
// CHECK-GLOBAL: @_ZN5test22tiE = hidden constant
}
@@ -76,7 +76,7 @@ namespace test3 {
const std::type_info &ti = typeid(B<A>);
// CHECK-GLOBAL: @_ZTSN5test31BINS_1AEEE = linkonce_odr constant
- // CHECK-GLOBAL: @_ZTIN5test31BINS_1AEEE = linkonce_odr unnamed_addr constant
+ // CHECK-GLOBAL: @_ZTIN5test31BINS_1AEEE = linkonce_odr constant
}
namespace test4 {
@@ -92,7 +92,7 @@ namespace test4 {
const std::type_info &ti = typeid(B<A>);
// CHECK-GLOBAL: @_ZTSN5test41BINS_1AEEE = linkonce_odr constant
- // CHECK-GLOBAL: @_ZTIN5test41BINS_1AEEE = linkonce_odr unnamed_addr constant
+ // CHECK-GLOBAL: @_ZTIN5test41BINS_1AEEE = linkonce_odr constant
}
namespace test5 {
@@ -108,5 +108,5 @@ namespace test5 {
const std::type_info &ti = typeid(B<A>);
// CHECK-GLOBAL: @_ZTSN5test51BINS_1AEEE = linkonce_odr hidden constant
- // CHECK-GLOBAL: @_ZTIN5test51BINS_1AEEE = linkonce_odr hidden unnamed_addr constant
+ // CHECK-GLOBAL: @_ZTIN5test51BINS_1AEEE = linkonce_odr hidden constant
}
diff --git a/test/CodeGenCXX/vla.cpp b/test/CodeGenCXX/vla.cpp
index b22f21c3faf3..a6616d374fed 100644
--- a/test/CodeGenCXX/vla.cpp
+++ b/test/CodeGenCXX/vla.cpp
@@ -9,7 +9,7 @@ template<typename T> int S<T>::n = 5;
int f() {
// Make sure that the reference here is enough to trigger the instantiation of
// the static data member.
- // CHECK: @_ZN1SIiE1nE = weak_odr global i32 5
+ // CHECK: @_ZN1SIiE1nE = linkonce_odr global i32 5
int a[S<int>::n];
return sizeof a;
}
diff --git a/test/CodeGenCXX/volatile-1.cpp b/test/CodeGenCXX/volatile-1.cpp
index 71ff1ed7d689..20389364b524 100644
--- a/test/CodeGenCXX/volatile-1.cpp
+++ b/test/CodeGenCXX/volatile-1.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -Wno-unused-value -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -Wno-unused-value -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s
// CHECK: @i = global [[INT:i[0-9]+]] 0
volatile int i, j, k;
@@ -248,11 +248,11 @@ void test() {
// gcc.
// Not a use. gcc forgets to do the assignment.
- // CHECK-NEXT: call
+ // CHECK-NEXT: call {{.*}}void
((a=a),a);
// Not a use. gcc gets this wrong, it doesn't emit the copy!
- // CHECK-NEXT: call
+ // CHECK-NEXT: call {{.*}}void
(void)(a=a);
// Not a use. gcc got this wrong in 4.2 and omitted the side effects
diff --git a/test/CodeGenCXX/volatile.cpp b/test/CodeGenCXX/volatile.cpp
index 38c8829347c2..f6ae0c525ab2 100644
--- a/test/CodeGenCXX/volatile.cpp
+++ b/test/CodeGenCXX/volatile.cpp
@@ -15,7 +15,7 @@ namespace test0 {
void test(A t) {
// CHECK: [[ARR:%.*]] = load [[A:%.*]]** @_ZN5test05arrayE, align 8
// CHECK-NEXT: [[IDX:%.*]] = getelementptr inbounds [[A]]* [[ARR]], i64 0
- // CHECK-NEXT: [[TMP:%.*]] = call [[A]]* @_ZNV5test01AaSERVKS0_([[A]]* [[IDX]], [[A]]* [[T:%.*]])
+ // CHECK-NEXT: [[TMP:%.*]] = call dereferenceable({{[0-9]+}}) [[A]]* @_ZNV5test01AaSERVKS0_([[A]]* [[IDX]], [[A]]* dereferenceable({{[0-9]+}}) [[T:%.*]])
// CHECK-NEXT: ret void
array[0] = t;
}
diff --git a/test/CodeGenCXX/vtable-available-externally.cpp b/test/CodeGenCXX/vtable-available-externally.cpp
index 282bd2a172ad..e07d48463f4f 100644
--- a/test/CodeGenCXX/vtable-available-externally.cpp
+++ b/test/CodeGenCXX/vtable-available-externally.cpp
@@ -35,7 +35,7 @@ void g() {
// updated correctly.
// CHECK-TEST2: @_ZTSN5Test21AE = constant
-// CHECK-TEST2: @_ZTIN5Test21AE = unnamed_addr constant
+// CHECK-TEST2: @_ZTIN5Test21AE = constant
// CHECK-TEST2: @_ZTVN5Test21AE = unnamed_addr constant
namespace Test2 {
struct A {
diff --git a/test/CodeGenCXX/vtable-cast-crash.cpp b/test/CodeGenCXX/vtable-cast-crash.cpp
index cc419fd4f522..58f9e0bf8f76 100644
--- a/test/CodeGenCXX/vtable-cast-crash.cpp
+++ b/test/CodeGenCXX/vtable-cast-crash.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm-only %s
+// RUN: %clang_cc1 -emit-llvm-only -triple %itanium_abi_triple %s
struct A
{
A();
diff --git a/test/CodeGenCXX/vtable-key-function-arm.cpp b/test/CodeGenCXX/vtable-key-function-arm.cpp
index 08efe8a141ea..6f1265b6277d 100644
--- a/test/CodeGenCXX/vtable-key-function-arm.cpp
+++ b/test/CodeGenCXX/vtable-key-function-arm.cpp
@@ -4,7 +4,7 @@
// The 'a' variants ask for the v-table first.
// The 'b' variants ask for the v-table second.
// The 'c' variants ask for the v-table third.
-// We do a separate CHECK-LATE pass because the RTTI defintion gets
+// We do a separate CHECK-LATE pass because the RTTI definition gets
// changed after the fact, which causes reordering of the globals.
// These are not separated into namespaces because the way that Sema
@@ -91,7 +91,7 @@ struct Test2a {
Test2a::Test2a() { use(typeid(Test2a)); }
// CHECK: @_ZTV6Test2a = unnamed_addr constant
// CHECK-LATE: @_ZTS6Test2a = constant
-// CHECK-LATE: @_ZTI6Test2a = unnamed_addr constant
+// CHECK-LATE: @_ZTI6Test2a = constant
// 'bar' becomes the key function when 'foo' is defined inline.
void Test2a::bar() {}
@@ -112,7 +112,7 @@ void Test2b::bar() {}
Test2b::Test2b() { use(typeid(Test2b)); }
// CHECK: @_ZTV6Test2b = unnamed_addr constant
// CHECK-LATE: @_ZTS6Test2b = constant
-// CHECK-LATE: @_ZTI6Test2b = unnamed_addr constant
+// CHECK-LATE: @_ZTI6Test2b = constant
inline void Test2b::foo() {}
@@ -132,7 +132,7 @@ inline void Test2c::foo() {}
Test2c::Test2c() { use(typeid(Test2c)); }
// CHECK: @_ZTV6Test2c = unnamed_addr constant
// CHECK: @_ZTS6Test2c = constant
-// CHECK: @_ZTI6Test2c = unnamed_addr constant
+// CHECK: @_ZTI6Test2c = constant
/*** Test3a ******************************************************************/
@@ -146,7 +146,7 @@ struct Test3a {
Test3a::Test3a() { use(typeid(Test3a)); }
// CHECK: @_ZTV6Test3a = linkonce_odr unnamed_addr constant
// CHECK-LATE: @_ZTS6Test3a = linkonce_odr constant
-// CHECK-LATE: @_ZTI6Test3a = linkonce_odr unnamed_addr constant
+// CHECK-LATE: @_ZTI6Test3a = linkonce_odr constant
// There ceases to be a key function after these declarations.
inline void Test3a::bar() {}
@@ -167,7 +167,7 @@ inline void Test3b::bar() {}
Test3b::Test3b() { use(typeid(Test3b)); }
// CHECK: @_ZTV6Test3b = linkonce_odr unnamed_addr constant
// CHECK-LATE: @_ZTS6Test3b = linkonce_odr constant
-// CHECK-LATE: @_ZTI6Test3b = linkonce_odr unnamed_addr constant
+// CHECK-LATE: @_ZTI6Test3b = linkonce_odr constant
inline void Test3b::foo() {}
@@ -187,7 +187,7 @@ inline void Test3c::foo() {}
Test3c::Test3c() { use(typeid(Test3c)); }
// CHECK: @_ZTV6Test3c = linkonce_odr unnamed_addr constant
// CHECK: @_ZTS6Test3c = linkonce_odr constant
-// CHECK: @_ZTI6Test3c = linkonce_odr unnamed_addr constant
+// CHECK: @_ZTI6Test3c = linkonce_odr constant
/*** Test4a ******************************************************************/
@@ -201,7 +201,7 @@ template <class T> struct Test4a {
template <> Test4a<int>::Test4a() { use(typeid(Test4a)); }
// CHECK: @_ZTV6Test4aIiE = linkonce_odr unnamed_addr constant
// CHECK: @_ZTS6Test4aIiE = linkonce_odr constant
-// CHECK: @_ZTI6Test4aIiE = linkonce_odr unnamed_addr constant
+// CHECK: @_ZTI6Test4aIiE = linkonce_odr constant
// There ceases to be a key function after these declarations.
template <> inline void Test4a<int>::bar() {}
@@ -222,7 +222,7 @@ template <> inline void Test4b<int>::bar() {}
template <> Test4b<int>::Test4b() { use(typeid(Test4b)); }
// CHECK: @_ZTV6Test4bIiE = linkonce_odr unnamed_addr constant
// CHECK: @_ZTS6Test4bIiE = linkonce_odr constant
-// CHECK: @_ZTI6Test4bIiE = linkonce_odr unnamed_addr constant
+// CHECK: @_ZTI6Test4bIiE = linkonce_odr constant
template <> inline void Test4b<int>::foo() {}
@@ -242,7 +242,7 @@ template <> inline void Test4c<int>::foo() {}
template <> Test4c<int>::Test4c() { use(typeid(Test4c)); }
// CHECK: @_ZTV6Test4cIiE = linkonce_odr unnamed_addr constant
// CHECK: @_ZTS6Test4cIiE = linkonce_odr constant
-// CHECK: @_ZTI6Test4cIiE = linkonce_odr unnamed_addr constant
+// CHECK: @_ZTI6Test4cIiE = linkonce_odr constant
/*** Test5a ******************************************************************/
@@ -259,7 +259,7 @@ template <> inline void Test5a<int>::foo();
template <> Test5a<int>::Test5a() { use(typeid(Test5a)); }
// CHECK: @_ZTV6Test5aIiE = linkonce_odr unnamed_addr constant
// CHECK: @_ZTS6Test5aIiE = linkonce_odr constant
-// CHECK: @_ZTI6Test5aIiE = linkonce_odr unnamed_addr constant
+// CHECK: @_ZTI6Test5aIiE = linkonce_odr constant
// There ceases to be a key function after these declarations.
template <> inline void Test5a<int>::bar() {}
@@ -281,7 +281,7 @@ template <> inline void Test5b<int>::bar() {}
template <> Test5b<int>::Test5b() { use(typeid(Test5b)); }
// CHECK: @_ZTV6Test5bIiE = linkonce_odr unnamed_addr constant
// CHECK: @_ZTS6Test5bIiE = linkonce_odr constant
-// CHECK: @_ZTI6Test5bIiE = linkonce_odr unnamed_addr constant
+// CHECK: @_ZTI6Test5bIiE = linkonce_odr constant
template <> inline void Test5a<int>::foo();
template <> inline void Test5b<int>::foo() {}
@@ -304,4 +304,4 @@ template <> inline void Test5c<int>::foo() {}
template <> Test5c<int>::Test5c() { use(typeid(Test5c)); }
// CHECK: @_ZTV6Test5cIiE = linkonce_odr unnamed_addr constant
// CHECK: @_ZTS6Test5cIiE = linkonce_odr constant
-// CHECK: @_ZTI6Test5cIiE = linkonce_odr unnamed_addr constant
+// CHECK: @_ZTI6Test5cIiE = linkonce_odr constant
diff --git a/test/CodeGenCXX/vtable-key-function-ios.cpp b/test/CodeGenCXX/vtable-key-function-ios.cpp
index bcd3e889d2ef..bf2e1f9720b5 100644
--- a/test/CodeGenCXX/vtable-key-function-ios.cpp
+++ b/test/CodeGenCXX/vtable-key-function-ios.cpp
@@ -4,7 +4,7 @@
// The 'a' variants ask for the v-table first.
// The 'b' variants ask for the v-table second.
// The 'c' variants ask for the v-table third.
-// We do a separate CHECK-LATE pass because the RTTI defintion gets
+// We do a separate CHECK-LATE pass because the RTTI definition gets
// changed after the fact, which causes reordering of the globals.
// These are not separated into namespaces because the way that Sema
@@ -59,7 +59,7 @@ struct Test1a {
Test1a::Test1a() { use(typeid(Test1a)); }
// CHECK: @_ZTV6Test1a = linkonce_odr unnamed_addr constant
// CHECK-LATE: @_ZTS6Test1a = linkonce_odr constant
-// CHECK-LATE: @_ZTI6Test1a = linkonce_odr unnamed_addr constant
+// CHECK-LATE: @_ZTI6Test1a = linkonce_odr constant
// This defines the key function.
inline void Test1a::foo() {}
@@ -79,7 +79,7 @@ inline void Test1b::foo() {}
Test1b::Test1b() { use(typeid(Test1b)); }
// CHECK: @_ZTV6Test1b = linkonce_odr unnamed_addr constant
// CHECK: @_ZTS6Test1b = linkonce_odr constant
-// CHECK: @_ZTI6Test1b = linkonce_odr unnamed_addr constant
+// CHECK: @_ZTI6Test1b = linkonce_odr constant
/*** Test2a ******************************************************************/
@@ -93,7 +93,7 @@ struct Test2a {
Test2a::Test2a() { use(typeid(Test2a)); }
// CHECK: @_ZTV6Test2a = linkonce_odr unnamed_addr constant
// CHECK-LATE: @_ZTS6Test2a = linkonce_odr constant
-// CHECK-LATE: @_ZTI6Test2a = linkonce_odr unnamed_addr constant
+// CHECK-LATE: @_ZTI6Test2a = linkonce_odr constant
void Test2a::bar() {}
inline void Test2a::foo() {}
@@ -112,7 +112,7 @@ void Test2b::bar() {}
Test2b::Test2b() { use(typeid(Test2b)); }
// CHECK: @_ZTV6Test2b = linkonce_odr unnamed_addr constant
// CHECK-LATE: @_ZTS6Test2b = linkonce_odr constant
-// CHECK-LATE: @_ZTI6Test2b = linkonce_odr unnamed_addr constant
+// CHECK-LATE: @_ZTI6Test2b = linkonce_odr constant
inline void Test2b::foo() {}
@@ -131,7 +131,7 @@ inline void Test2c::foo() {}
Test2c::Test2c() { use(typeid(Test2c)); }
// CHECK: @_ZTV6Test2c = linkonce_odr unnamed_addr constant
// CHECK: @_ZTS6Test2c = linkonce_odr constant
-// CHECK: @_ZTI6Test2c = linkonce_odr unnamed_addr constant
+// CHECK: @_ZTI6Test2c = linkonce_odr constant
/*** Test3a ******************************************************************/
@@ -145,7 +145,7 @@ struct Test3a {
Test3a::Test3a() { use(typeid(Test3a)); }
// CHECK: @_ZTV6Test3a = linkonce_odr unnamed_addr constant
// CHECK-LATE: @_ZTS6Test3a = linkonce_odr constant
-// CHECK-LATE: @_ZTI6Test3a = linkonce_odr unnamed_addr constant
+// CHECK-LATE: @_ZTI6Test3a = linkonce_odr constant
// This defines the key function.
inline void Test3a::bar() {}
@@ -165,7 +165,7 @@ inline void Test3b::bar() {}
Test3b::Test3b() { use(typeid(Test3b)); }
// CHECK: @_ZTV6Test3b = linkonce_odr unnamed_addr constant
// CHECK-LATE: @_ZTS6Test3b = linkonce_odr constant
-// CHECK-LATE: @_ZTI6Test3b = linkonce_odr unnamed_addr constant
+// CHECK-LATE: @_ZTI6Test3b = linkonce_odr constant
// This defines the key function.
inline void Test3b::foo() {}
@@ -186,4 +186,4 @@ inline void Test3c::foo() {}
Test3c::Test3c() { use(typeid(Test3c)); }
// CHECK: @_ZTV6Test3c = linkonce_odr unnamed_addr constant
// CHECK: @_ZTS6Test3c = linkonce_odr constant
-// CHECK: @_ZTI6Test3c = linkonce_odr unnamed_addr constant
+// CHECK: @_ZTI6Test3c = linkonce_odr constant
diff --git a/test/CodeGenCXX/vtable-layout-abi-examples.cpp b/test/CodeGenCXX/vtable-layout-abi-examples.cpp
index 8f084a9c5b7b..b8ac6f512b48 100644
--- a/test/CodeGenCXX/vtable-layout-abi-examples.cpp
+++ b/test/CodeGenCXX/vtable-layout-abi-examples.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm-only -fdump-vtable-layouts > %t 2>&1
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm-only -fdump-vtable-layouts > %t 2>/dev/null
// RUN: FileCheck --check-prefix=CHECK-1 %s < %t
// RUN: FileCheck --check-prefix=CHECK-2 %s < %t
// RUN: FileCheck --check-prefix=CHECK-3 %s < %t
diff --git a/test/CodeGenCXX/vtable-linkage.cpp b/test/CodeGenCXX/vtable-linkage.cpp
index c17e33387e52..9c08b3037ca1 100644
--- a/test/CodeGenCXX/vtable-linkage.cpp
+++ b/test/CodeGenCXX/vtable-linkage.cpp
@@ -1,8 +1,6 @@
// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o %t
-// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -fhidden-weak-vtables -emit-llvm -o %t.hidden
// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -disable-llvm-optzns -O3 -emit-llvm -o %t.opt
// RUN: FileCheck --check-prefix=CHECK %s < %t
-// RUN: FileCheck --check-prefix=CHECK-HIDDEN %s < %t.hidden
// RUN: FileCheck --check-prefix=CHECK-OPT %s < %t.opt
namespace {
@@ -93,57 +91,47 @@ void use_F() {
// and hidden visibility (rdar://problem/7523229).
// CHECK-DAG: @_ZTV1C = linkonce_odr unnamed_addr constant
// CHECK-DAG: @_ZTS1C = linkonce_odr constant
-// CHECK-DAG: @_ZTI1C = linkonce_odr unnamed_addr constant
+// CHECK-DAG: @_ZTI1C = linkonce_odr constant
// CHECK-DAG: @_ZTT1C = linkonce_odr unnamed_addr constant
-// CHECK-HIDDEN-DAG: @_ZTV1C = linkonce_odr hidden unnamed_addr constant
-// CHECK-HIDDEN-DAG: @_ZTS1C = linkonce_odr constant
-// CHECK-HIDDEN-DAG: @_ZTI1C = linkonce_odr hidden unnamed_addr constant
-// CHECK-HIDDEN-DAG: @_ZTT1C = linkonce_odr hidden unnamed_addr constant
// D has a key function that is defined in this translation unit so its vtable is
// defined in the translation unit.
// CHECK-DAG: @_ZTV1D = unnamed_addr constant
// CHECK-DAG: @_ZTS1D = constant
-// CHECK-DAG: @_ZTI1D = unnamed_addr constant
+// CHECK-DAG: @_ZTI1D = constant
// E<char> is an explicit specialization with a key function defined
// in this translation unit, so its vtable should have external
// linkage.
// CHECK-DAG: @_ZTV1EIcE = unnamed_addr constant
// CHECK-DAG: @_ZTS1EIcE = constant
-// CHECK-DAG: @_ZTI1EIcE = unnamed_addr constant
+// CHECK-DAG: @_ZTI1EIcE = constant
// E<short> is an explicit template instantiation with a key function
// defined in this translation unit, so its vtable should have
// weak_odr linkage.
// CHECK-DAG: @_ZTV1EIsE = weak_odr unnamed_addr constant
// CHECK-DAG: @_ZTS1EIsE = weak_odr constant
-// CHECK-DAG: @_ZTI1EIsE = weak_odr unnamed_addr constant
-// CHECK-HIDDEN-DAG: @_ZTV1EIsE = weak_odr unnamed_addr constant
-// CHECK-HIDDEN-DAG: @_ZTS1EIsE = weak_odr constant
-// CHECK-HIDDEN-DAG: @_ZTI1EIsE = weak_odr unnamed_addr constant
+// CHECK-DAG: @_ZTI1EIsE = weak_odr constant
// F<short> is an explicit template instantiation without a key
// function, so its vtable should have weak_odr linkage
// CHECK-DAG: @_ZTV1FIsE = weak_odr unnamed_addr constant
// CHECK-DAG: @_ZTS1FIsE = weak_odr constant
-// CHECK-DAG: @_ZTI1FIsE = weak_odr unnamed_addr constant
-// CHECK-HIDDEN-DAG: @_ZTV1FIsE = weak_odr unnamed_addr constant
-// CHECK-HIDDEN-DAG: @_ZTS1FIsE = weak_odr constant
-// CHECK-HIDDEN-DAG: @_ZTI1FIsE = weak_odr unnamed_addr constant
+// CHECK-DAG: @_ZTI1FIsE = weak_odr constant
// E<long> is an implicit template instantiation with a key function
// defined in this translation unit, so its vtable should have
// linkonce_odr linkage.
// CHECK-DAG: @_ZTV1EIlE = linkonce_odr unnamed_addr constant
// CHECK-DAG: @_ZTS1EIlE = linkonce_odr constant
-// CHECK-DAG: @_ZTI1EIlE = linkonce_odr unnamed_addr constant
+// CHECK-DAG: @_ZTI1EIlE = linkonce_odr constant
// F<long> is an implicit template instantiation with no key function,
// so its vtable should have linkonce_odr linkage.
// CHECK-DAG: @_ZTV1FIlE = linkonce_odr unnamed_addr constant
// CHECK-DAG: @_ZTS1FIlE = linkonce_odr constant
-// CHECK-DAG: @_ZTI1FIlE = linkonce_odr unnamed_addr constant
+// CHECK-DAG: @_ZTI1FIlE = linkonce_odr constant
// F<int> is an explicit template instantiation declaration without a
// key function, so its vtable should have external linkage.
@@ -160,19 +148,19 @@ void use_F() {
// internal linkage.
// CHECK-DAG: @"_ZTV3$_0" = internal unnamed_addr constant
// CHECK-DAG: @"_ZTS3$_0" = internal constant
-// CHECK-DAG: @"_ZTI3$_0" = internal unnamed_addr constant
+// CHECK-DAG: @"_ZTI3$_0" = internal constant
// The A vtable should have internal linkage since it is inside an anonymous
// namespace.
// CHECK-DAG: @_ZTVN12_GLOBAL__N_11AE = internal unnamed_addr constant
// CHECK-DAG: @_ZTSN12_GLOBAL__N_11AE = internal constant
-// CHECK-DAG: @_ZTIN12_GLOBAL__N_11AE = internal unnamed_addr constant
+// CHECK-DAG: @_ZTIN12_GLOBAL__N_11AE = internal constant
// F<char> is an explicit specialization without a key function, so
// its vtable should have linkonce_odr linkage.
// CHECK-DAG: @_ZTV1FIcE = linkonce_odr unnamed_addr constant
// CHECK-DAG: @_ZTS1FIcE = linkonce_odr constant
-// CHECK-DAG: @_ZTI1FIcE = linkonce_odr unnamed_addr constant
+// CHECK-DAG: @_ZTI1FIcE = linkonce_odr constant
// CHECK-DAG: @_ZTV1GIiE = linkonce_odr unnamed_addr constant
template <typename T>
diff --git a/test/CodeGenCXX/weak-extern-typeinfo.cpp b/test/CodeGenCXX/weak-extern-typeinfo.cpp
index 3c3406e55970..38f6a3e46233 100644
--- a/test/CodeGenCXX/weak-extern-typeinfo.cpp
+++ b/test/CodeGenCXX/weak-extern-typeinfo.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
// rdar://10246395
#define WEAK __attribute__ ((weak))
@@ -32,16 +32,16 @@ void V1::foo() { }
void V2::foo() { }
// CHECK: @_ZTS1A = weak_odr constant
-// CHECK: @_ZTI1A = weak_odr unnamed_addr constant
+// CHECK: @_ZTI1A = weak_odr constant
// CHECK: @_ZTS1B = weak_odr constant
-// CHECK: @_ZTI1B = weak_odr unnamed_addr constant
+// CHECK: @_ZTI1B = weak_odr constant
// CHECK: @_ZTS1C = weak_odr constant
// CHECK: @_ZTS2T1 = linkonce_odr constant
-// CHECK: @_ZTI2T1 = linkonce_odr unnamed_addr constant
+// CHECK: @_ZTI2T1 = linkonce_odr constant
// CHECK: @_ZTS1T = linkonce_odr constant
-// CHECK: @_ZTI1T = linkonce_odr unnamed_addr constant
-// CHECK: @_ZTI1C = weak_odr unnamed_addr constant
+// CHECK: @_ZTI1T = linkonce_odr constant
+// CHECK: @_ZTI1C = weak_odr constant
// CHECK: @_ZTS2V1 = weak_odr constant
-// CHECK: @_ZTI2V1 = weak_odr unnamed_addr constant
+// CHECK: @_ZTI2V1 = weak_odr constant
// CHECK: @_ZTS2V2 = weak_odr constant
-// CHECK: @_ZTI2V2 = weak_odr unnamed_addr constant
+// CHECK: @_ZTI2V2 = weak_odr constant
diff --git a/test/CodeGenCXX/weak-external.cpp b/test/CodeGenCXX/weak-external.cpp
index dad54f6861b0..a2c53a59dcd5 100644
--- a/test/CodeGenCXX/weak-external.cpp
+++ b/test/CodeGenCXX/weak-external.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang -fexceptions %s -S -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -triple %itanium_abi_triple %s -S -emit-llvm -o - | FileCheck %s
// PR4262
// CHECK-NOT: _ZNSs12_S_constructIPKcEEPcT_S3_RKSaIcESt20forward_iterator_tag
diff --git a/test/CodeGenCXX/windows-itanium-exceptions.cpp b/test/CodeGenCXX/windows-itanium-exceptions.cpp
new file mode 100644
index 000000000000..e2c4190ac9f6
--- /dev/null
+++ b/test/CodeGenCXX/windows-itanium-exceptions.cpp
@@ -0,0 +1,47 @@
+// RUN: %clang_cc1 -emit-llvm -triple thumbv7-windows-itanium -fexceptions -fcxx-exceptions %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple i686-windows-itanium -fexceptions -fcxx-exceptions %s -o - | FileCheck %s
+// REQUIRES: asserts
+
+void except() {
+ throw 32;
+}
+
+void attempt() {
+ try { except(); } catch (...) { }
+}
+
+// CHECK: @_ZTIi = external constant i8*
+
+// CHECK: define {{.*}}void @_Z6exceptv() {{.*}} {
+// CHECK: %exception = call {{.*}}i8* @__cxa_allocate_exception(i32 4)
+// CHECK: %0 = bitcast i8* %exception to i32*
+// CHECK: store i32 32, i32* %0
+// CHECK: call {{.*}}void @__cxa_throw(i8* %exception, i8* bitcast (i8** @_ZTIi to i8*), i8* null)
+// CHECK: unreachable
+// CHECK: }
+
+// CHECK: define {{.*}}void @_Z7attemptv() {{.*}} {
+// CHECK: %exn.slot = alloca i8*
+// CHECK: %ehselector.slot = alloca i32
+// CHECK: invoke {{.*}}void @_Z6exceptv()
+// CHECK: to label %invoke.cont unwind label %lpad
+// CHECK: invoke.cont:
+// CHECK: br label %try.cont
+// CHECK: lpad:
+// CHECK: %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+// CHECK: catch i8* null
+// CHECK: %1 = extractvalue { i8*, i32 } %0, 0
+// CHECK: store i8* %1, i8** %exn.slot
+// CHECK: %2 = extractvalue { i8*, i32 } %0, 1
+// CHECK: store i32 %2, i32* %ehselector.slot
+// CHECK: br label %catch
+// CHECK: catch:
+// CHECK: %exn = load i8** %exn.slot
+// CHECK: %3 = call {{.*}}i8* @__cxa_begin_catch(i8* %{{2|exn}})
+// CHECK: call {{.*}}void @__cxa_end_catch()
+// CHECK: br label %try.cont
+// CHECK: try.cont:
+// CHECK: ret void
+// CHECK: }
+
+
diff --git a/test/CodeGenObjC/2009-08-05-utf16.m b/test/CodeGenObjC/2009-08-05-utf16.m
index 06458e730ae2..18ac1db79e24 100644
--- a/test/CodeGenObjC/2009-08-05-utf16.m
+++ b/test/CodeGenObjC/2009-08-05-utf16.m
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -emit-llvm -w -x objective-c %s -o - | FileCheck %s
// rdar://7095855 rdar://7115749
-// CHECK: internal unnamed_addr constant [6 x i16] [i16 105, i16 80, i16 111, i16 100, i16 8482, i16 0], align 2
+// CHECK: private unnamed_addr constant [6 x i16] [i16 105, i16 80, i16 111, i16 100, i16 8482, i16 0], section "__TEXT,__ustring", align 2
void *P = @"iPod™";
diff --git a/test/CodeGenObjC/2010-02-01-utf16-with-null.m b/test/CodeGenObjC/2010-02-01-utf16-with-null.m
index 1863984c216e..37fb9cd3f285 100644
--- a/test/CodeGenObjC/2010-02-01-utf16-with-null.m
+++ b/test/CodeGenObjC/2010-02-01-utf16-with-null.m
@@ -1,5 +1,7 @@
-// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple i686-apple-darwin -emit-llvm %s -o - | FileCheck %s
// rdar://7589850
-// CHECK-NOT: __ustring
+// CHECK: @.str = private unnamed_addr constant [9 x i16] [i16 103, i16 111, i16 111, i16 100, i16 0, i16 98, i16 121, i16 101, i16 0], section "__TEXT,__ustring", align 2
+// CHECK: @_unnamed_cfstring_ = private constant %struct.NSConstantString { i32* getelementptr inbounds ([0 x i32]* @__CFConstantStringClassReference, i32 0, i32 0), i32 2000, i8* bitcast ([9 x i16]* @.str to i8*), i32 8 }, section "__DATA,__cfstring"
+// CHECK: @P = global i8* bitcast (%struct.NSConstantString* @_unnamed_cfstring_ to i8*), align 4
void *P = @"good\0bye";
diff --git a/test/CodeGenObjC/arc-arm.m b/test/CodeGenObjC/arc-arm.m
index 3989f56308a8..8d5f0d5c4b35 100644
--- a/test/CodeGenObjC/arc-arm.m
+++ b/test/CodeGenObjC/arc-arm.m
@@ -1,19 +1,22 @@
// RUN: %clang_cc1 -triple armv7-apple-darwin10 -emit-llvm -fblocks -fobjc-arc -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple arm64-apple-ios -emit-llvm -fblocks -fobjc-arc -o - %s | FileCheck %s
+
+// <rdar://12438598>: use an autorelease marker on ARM64.
id test0(void) {
extern id test0_helper(void);
- // CHECK: [[T0:%.*]] = call arm_aapcscc i8* @test0_helper()
+ // CHECK: [[T0:%.*]] = call [[CC:(arm_aapcscc )?]]i8* @test0_helper()
// CHECK-NEXT: ret i8* [[T0]]
return test0_helper();
}
void test1(void) {
extern id test1_helper(void);
- // CHECK: [[T0:%.*]] = call arm_aapcscc i8* @test1_helper()
- // CHECK-NEXT: call void asm sideeffect "mov\09r7, r7
- // CHECK-NEXT: [[T1:%.*]] = call arm_aapcscc i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
+ // CHECK: [[T0:%.*]] = call [[CC]]i8* @test1_helper()
+ // CHECK-NEXT: call void asm sideeffect "mov
+ // CHECK-NEXT: [[T1:%.*]] = call [[CC]]i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: store i8* [[T1]],
- // CHECK-NEXT: call arm_aapcscc void @objc_storeStrong(
+ // CHECK-NEXT: call [[CC]]void @objc_storeStrong(
// CHECK-NEXT: ret void
id x = test1_helper();
}
@@ -22,14 +25,14 @@ void test1(void) {
@class A;
A *test2(void) {
extern A *test2_helper(void);
- // CHECK: [[T0:%.*]] = call arm_aapcscc [[A:%.*]]* @test2_helper()
+ // CHECK: [[T0:%.*]] = call [[CC]][[A:%.*]]* @test2_helper()
// CHECK-NEXT: ret [[A]]* [[T0]]
return test2_helper();
}
id test3(void) {
extern A *test3_helper(void);
- // CHECK: [[T0:%.*]] = call arm_aapcscc [[A:%.*]]* @test3_helper()
+ // CHECK: [[T0:%.*]] = call [[CC]][[A:%.*]]* @test3_helper()
// CHECK-NEXT: [[T1:%.*]] = bitcast [[A]]* [[T0]] to i8*
// CHECK-NEXT: ret i8* [[T1]]
return test3_helper();
diff --git a/test/CodeGenObjC/arc-foreach.m b/test/CodeGenObjC/arc-foreach.m
index 44561818c94f..ec767d391fd6 100644
--- a/test/CodeGenObjC/arc-foreach.m
+++ b/test/CodeGenObjC/arc-foreach.m
@@ -172,4 +172,4 @@ void test3(NSArray *array) {
// CHECK-LP64-NEXT: br label [[L]]
}
-// CHECK: attributes [[NUW]] = { nounwind }
+// CHECK-LP64: attributes [[NUW]] = { nounwind }
diff --git a/test/CodeGenObjC/arc-ivar-layout.m b/test/CodeGenObjC/arc-ivar-layout.m
index 62428f5aefc7..06e387c817ee 100644
--- a/test/CodeGenObjC/arc-ivar-layout.m
+++ b/test/CodeGenObjC/arc-ivar-layout.m
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -fobjc-arc -fobjc-runtime-has-weak -triple x86_64-apple-darwin -S %s -o %t-64.s
// RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s
-// REQUIRES: x86-64-registered-target
+// REQUIRES: x86-registered-target
// rdar://8991729
@interface NSObject {
@@ -54,3 +54,12 @@
@implementation UnsafePerson @end
// CHECK-LP64: L_OBJC_CLASS_NAME_20:
// CHECK-LP64-NEXT: .asciz "!"
+
+// rdar://16136439
+@interface rdar16136439
+ @property (nonatomic, readonly, weak) id first;
+@end
+
+@implementation rdar16136439 @end
+// CHECK-LP64: L_OBJC_PROP_NAME_ATTR_29:
+// CHECK-LP64-NEXT: .asciz "T@,R,W,N,V_first"
diff --git a/test/CodeGenObjC/arc-linetable-autorelease.m b/test/CodeGenObjC/arc-linetable-autorelease.m
index be05ec2fcd8e..fa109154ce03 100644
--- a/test/CodeGenObjC/arc-linetable-autorelease.m
+++ b/test/CodeGenObjC/arc-linetable-autorelease.m
@@ -29,12 +29,11 @@ NSRect NSMakeRect(CGFloat x, CGFloat y, CGFloat w, CGFloat h);
CGFloat pattern[2];
// CHECK: define {{.*}}_createBezierPathWithWidth
// CHECK: load {{.*}} %path, align {{.*}}, !dbg ![[RET:[0-9]+]]
- // CHECK: call void @objc_storeStrong{{.*}} !dbg ![[ARC1:[0-9]+]]
- // CHECK: call {{.*}} @objc_autoreleaseReturnValue{{.*}} !dbg ![[ARC2:[0-9]+]]
- // CHECK: ret {{.*}} !dbg ![[ARC2]]
+ // CHECK: call void @objc_storeStrong{{.*}} !dbg ![[ARC:[0-9]+]]
+ // CHECK: call {{.*}} @objc_autoreleaseReturnValue{{.*}} !dbg ![[ARC]]
+ // CHECK: ret {{.*}} !dbg ![[ARC]]
// CHECK: ![[RET]] = metadata !{i32 [[@LINE+1]], i32 0, metadata !{{.*}}, null}
return path;
- // CHECK: ![[ARC1]] = metadata !{i32 [[@LINE+2]], i32 0, metadata !{{.*}}, null}
- // CHECK: ![[ARC2]] = metadata !{i32 [[@LINE+1]], i32 0, metadata !{{.*}}, null}
+ // CHECK: ![[ARC]] = metadata !{i32 [[@LINE+1]], i32 0, metadata !{{.*}}, null}
}
@end
diff --git a/test/CodeGenObjC/arc-linetable.m b/test/CodeGenObjC/arc-linetable.m
index eac91f188907..2d56ab3dfb55 100644
--- a/test/CodeGenObjC/arc-linetable.m
+++ b/test/CodeGenObjC/arc-linetable.m
@@ -32,6 +32,13 @@
// CHECK: @objc_msgSend{{.*}} !dbg ![[MSG7:[0-9]+]]
// CHECK: ret {{.*}} !dbg ![[RET7:[0-9]+]]
+// CHECK: define {{.*}}testCleanupVoid
+// CHECK: icmp ne {{.*}}!dbg ![[SKIP1:[0-9]+]]
+// CHECK: store i32 0, i32* {{.*}}, !dbg ![[RET8:[0-9]+]]
+// CHECK: @objc_storeStrong{{.*}}, !dbg ![[ARC8:[0-9]+]]
+// CHECK: ret {{.*}} !dbg ![[RET8]]
+
+typedef signed char BOOL;
@interface NSObject
+ (id)alloc;
@@ -47,8 +54,10 @@
@implementation AppDelegate : NSObject
+// CHECK: ![[TESTNOSIDEEFFECT:.*]] = {{.*}}[ DW_TAG_subprogram ] [line [[@LINE+1]]] [local] [def] [-[AppDelegate testNoSideEffect:]]
- (int)testNoSideEffect:(NSString *)foo {
- // CHECK: ![[ARC1]] = metadata !{i32 [[@LINE+1]], i32 0, metadata !{{.*}}, null}
+ int x = 1;
+ // CHECK: ![[ARC1]] = metadata !{i32 [[@LINE+1]], i32 0, metadata ![[TESTNOSIDEEFFECT]], null}
return 1; // Return expression
// CHECK: ![[RET1]] = metadata !{i32 [[@LINE+1]], i32 0, metadata !{{.*}}, null}
} // Cleanup + Ret
@@ -91,6 +100,22 @@
return 1;
}
+- (void)testCleanupVoid:(BOOL)skip withDelegate: (AppDelegate *) delegate {
+ static BOOL skip_all;
+ // CHECK: ![[SKIP1]] = metadata !{i32 [[@LINE+1]], i32 0,
+ if (!skip_all) {
+ if (!skip) {
+ return;
+ }
+ NSString *s = @"bar";
+ if (!skip) {
+ [delegate testVoid :s];
+ }
+ }
+ // CHECK: ![[RET8]] = metadata !{i32 [[@LINE+2]], i32 0,
+ // CHECK: ![[ARC8]] = metadata !{i32 [[@LINE+1]], i32 0,
+}
+
@end
diff --git a/test/CodeGenObjC/arc-property.m b/test/CodeGenObjC/arc-property.m
index c3c7e2bc11ec..8398a1b60f0d 100644
--- a/test/CodeGenObjC/arc-property.m
+++ b/test/CodeGenObjC/arc-property.m
@@ -67,7 +67,7 @@ static Class theGlobalClass;
// CHECK: define internal i8* @"\01-[Test2 theClass]"(
// CHECK: [[OFFSET:%.*]] = load i64* @"OBJC_IVAR_$_Test2._theClass"
-// CHECK-NEXT: [[T0:%.*]] = call i8* @objc_getProperty(i8* {{.*}}, i8* {{.*}}, i64 [[OFFSET]], i1 zeroext true)
+// CHECK-NEXT: [[T0:%.*]] = tail call i8* @objc_getProperty(i8* {{.*}}, i8* {{.*}}, i64 [[OFFSET]], i1 zeroext true)
// CHECK-NEXT: ret i8* [[T0]]
// CHECK: define internal void @"\01-[Test2 setTheClass:]"(
diff --git a/test/CodeGenObjC/arc.m b/test/CodeGenObjC/arc.m
index 00cdb6fcc529..8fc68ca2ffa8 100644
--- a/test/CodeGenObjC/arc.m
+++ b/test/CodeGenObjC/arc.m
@@ -180,7 +180,7 @@ id test4() {
// CHECK-NEXT: [[ALLOC:%.*]] = bitcast
// CHECK-NEXT: [[INIT:%.*]] = call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*, i32)*)(i8* [[ALLOC]],
- // Initialization of return value, occuring within full-expression.
+ // Initialization of return value, occurring within full-expression.
// Retain/release elided.
// CHECK-NEXT: bitcast
// CHECK-NEXT: [[INIT:%.*]] = bitcast
@@ -581,11 +581,11 @@ void test21(unsigned n) {
// rdar://problem/12492434
// Note that we set the flag saying that we need destruction *and*
// the flag saying that we don't also need construction.
-// CHECK-GLOBALS: @"\01l_OBJC_CLASS_RO_$_Test23" = internal global [[RO_T:%.*]] { i32 390,
+// CHECK-GLOBALS: @"\01l_OBJC_CLASS_RO_$_Test23" = private global [[RO_T:%.*]] { i32 390,
@interface Test23 { id x; } @end
@implementation Test23 @end
-// CHECK-GLOBALS: @"\01l_OBJC_CLASS_RO_$_Test24" = internal global [[RO_T:%.*]] { i32 130,
+// CHECK-GLOBALS: @"\01l_OBJC_CLASS_RO_$_Test24" = private global [[RO_T:%.*]] { i32 130,
@interface Test24 {} @end
@implementation Test24 @end
@@ -1004,7 +1004,7 @@ void test37(void) {
@synthesize x;
@end
// CHECK: define internal i8* @"\01-[Test45 x]"(
-// CHECK: [[CALL:%.*]] = call i8* @objc_getProperty(
+// CHECK: [[CALL:%.*]] = tail call i8* @objc_getProperty(
// CHECK-NEXT: ret i8* [[CALL]]
// rdar://problem/9315552
@@ -1352,7 +1352,7 @@ void test62(void) {
@implementation Person
@synthesize address;
@end
-// CHECK: call i8* @objc_getProperty
+// CHECK: tail call i8* @objc_getProperty
// CHECK: call void @objc_setProperty
// Verify that we successfully parse and preserve this attribute in
diff --git a/test/CodeGenObjC/arm64-int32-ivar.m b/test/CodeGenObjC/arm64-int32-ivar.m
new file mode 100644
index 000000000000..8f8c34a44a99
--- /dev/null
+++ b/test/CodeGenObjC/arm64-int32-ivar.m
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios -emit-llvm -o - %s | FileCheck %s
+// rdar://12617764
+
+// CHECK: @"OBJC_IVAR_$_I.IVAR2" = global i32 8
+// CHECK: @"OBJC_IVAR_$_I.IVAR1" = global i32 0
+@interface I
+{
+ id IVAR1;
+ id IVAR2;
+}
+@end
+
+@implementation I
+// CHECK: [[IVAR:%.*]] = load i32* @"OBJC_IVAR_$_I.IVAR2"
+// CHECK: [[CONV:%.*]] = sext i32 [[IVAR]] to i64
+- (id) METH { return IVAR2; }
+@end
diff --git a/test/CodeGenObjC/attr-callconv.m b/test/CodeGenObjC/attr-callconv.m
new file mode 100644
index 000000000000..b0a41f74381d
--- /dev/null
+++ b/test/CodeGenObjC/attr-callconv.m
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck %s
+
+@interface Test
+- (void)test;
+@end
+
+@implementation Test
+- (void)test __attribute__((stdcall)) {}
+ // CHECK: define{{.*}}x86_stdcallcc{{.*}}Test test
+
+- (void)test2 __attribute__((ms_abi)) {}
+ // CHECK: define{{.*}}x86_64_win64cc{{.*}}Test test2
+@end
diff --git a/test/CodeGenObjC/block-var-layout.m b/test/CodeGenObjC/block-var-layout.m
index 0ad44daa0bdb..171df7b27489 100644
--- a/test/CodeGenObjC/block-var-layout.m
+++ b/test/CodeGenObjC/block-var-layout.m
@@ -164,3 +164,11 @@ void test_empty_block() {
};
wrapperBlock();
}
+
+// rdar://16111839
+typedef union { char ch[8]; } SS;
+typedef struct { SS s[4]; } CS;
+void test_union_in_layout() {
+ CS cs;
+ ^{ cs; };
+}
diff --git a/test/CodeGenObjC/blocks.m b/test/CodeGenObjC/blocks.m
index 5245679dd42d..6ae3e9fda076 100644
--- a/test/CodeGenObjC/blocks.m
+++ b/test/CodeGenObjC/blocks.m
@@ -65,7 +65,7 @@ void test2(Test2 *x) {
// CHECK-NEXT: [[T3:%.*]] = getelementptr inbounds [[WEAK_T]]* [[WEAKX]], i32 0, i32 3
// CHECK-NEXT: store i32 28, i32* [[T3]]
- // Copy and dipose helpers.
+ // Copy and dispose helpers.
// CHECK-NEXT: [[T4:%.*]] = getelementptr inbounds [[WEAK_T]]* [[WEAKX]], i32 0, i32 4
// CHECK-NEXT: store i8* bitcast (void (i8*, i8*)* @__Block_byref_object_copy_{{.*}} to i8*), i8** [[T4]]
// CHECK-NEXT: [[T5:%.*]] = getelementptr inbounds [[WEAK_T]]* [[WEAKX]], i32 0, i32 5
diff --git a/test/CodeGenObjC/boxing.m b/test/CodeGenObjC/boxing.m
index 87ff0e7efb6c..efd2b1600b36 100644
--- a/test/CodeGenObjC/boxing.m
+++ b/test/CodeGenObjC/boxing.m
@@ -53,18 +53,18 @@ typedef signed char BOOL;
+ (id)stringWithUTF8String:(const char *)nullTerminatedCString;
@end
-// CHECK: [[WithIntMeth:@".*"]] = internal global [15 x i8] c"numberWithInt:\00"
-// CHECK: [[WithIntSEL:@".*"]] = internal externally_initialized global i8* getelementptr inbounds ([15 x i8]* [[WithIntMeth]]
-// CHECK: [[WithCharMeth:@".*"]] = internal global [16 x i8] c"numberWithChar:\00"
-// CHECK: [[WithCharSEL:@".*"]] = internal externally_initialized global i8* getelementptr inbounds ([16 x i8]* [[WithCharMeth]]
-// CHECK: [[WithBoolMeth:@".*"]] = internal global [16 x i8] c"numberWithBool:\00"
-// CHECK: [[WithBoolSEL:@".*"]] = internal externally_initialized global i8* getelementptr inbounds ([16 x i8]* [[WithBoolMeth]]
-// CHECK: [[WithIntegerMeth:@".*"]] = internal global [19 x i8] c"numberWithInteger:\00"
-// CHECK: [[WithIntegerSEL:@".*"]] = internal externally_initialized global i8* getelementptr inbounds ([19 x i8]* [[WithIntegerMeth]]
-// CHECK: [[WithUnsignedIntegerMeth:@".*"]] = internal global [27 x i8] c"numberWithUnsignedInteger:\00"
-// CHECK: [[WithUnsignedIntegerSEL:@".*"]] = internal externally_initialized global i8* getelementptr inbounds ([27 x i8]* [[WithUnsignedIntegerMeth]]
-// CHECK: [[stringWithUTF8StringMeth:@".*"]] = internal global [22 x i8] c"stringWithUTF8String:\00"
-// CHECK: [[stringWithUTF8StringSEL:@".*"]] = internal externally_initialized global i8* getelementptr inbounds ([22 x i8]* [[stringWithUTF8StringMeth]]
+// CHECK: [[WithIntMeth:@".*"]] = private global [15 x i8] c"numberWithInt:\00"
+// CHECK: [[WithIntSEL:@".*"]] = private externally_initialized global i8* getelementptr inbounds ([15 x i8]* [[WithIntMeth]]
+// CHECK: [[WithCharMeth:@".*"]] = private global [16 x i8] c"numberWithChar:\00"
+// CHECK: [[WithCharSEL:@".*"]] = private externally_initialized global i8* getelementptr inbounds ([16 x i8]* [[WithCharMeth]]
+// CHECK: [[WithBoolMeth:@".*"]] = private global [16 x i8] c"numberWithBool:\00"
+// CHECK: [[WithBoolSEL:@".*"]] = private externally_initialized global i8* getelementptr inbounds ([16 x i8]* [[WithBoolMeth]]
+// CHECK: [[WithIntegerMeth:@".*"]] = private global [19 x i8] c"numberWithInteger:\00"
+// CHECK: [[WithIntegerSEL:@".*"]] = private externally_initialized global i8* getelementptr inbounds ([19 x i8]* [[WithIntegerMeth]]
+// CHECK: [[WithUnsignedIntegerMeth:@".*"]] = private global [27 x i8] c"numberWithUnsignedInteger:\00"
+// CHECK: [[WithUnsignedIntegerSEL:@".*"]] = private externally_initialized global i8* getelementptr inbounds ([27 x i8]* [[WithUnsignedIntegerMeth]]
+// CHECK: [[stringWithUTF8StringMeth:@".*"]] = private global [22 x i8] c"stringWithUTF8String:\00"
+// CHECK: [[stringWithUTF8StringSEL:@".*"]] = private externally_initialized global i8* getelementptr inbounds ([22 x i8]* [[stringWithUTF8StringMeth]]
int main() {
// CHECK: load i8** [[WithIntSEL]]
diff --git a/test/CodeGenObjC/complex-property.m b/test/CodeGenObjC/complex-property.m
index d65d72fdd70c..bed0ca661155 100644
--- a/test/CodeGenObjC/complex-property.m
+++ b/test/CodeGenObjC/complex-property.m
@@ -13,8 +13,8 @@ void f0(A *a) {
a.y += a1;
}
-// CHECK-LP64: internal global [13 x i8] c"COMPLEX_PROP
-// CHECK-LP64: internal global [17 x i8] c"setCOMPLEX_PROP
+// CHECK-LP64: private global [13 x i8] c"COMPLEX_PROP
+// CHECK-LP64: private global [17 x i8] c"setCOMPLEX_PROP
// rdar: // 7351147
@interface B
diff --git a/test/CodeGenObjC/constant-strings.m b/test/CodeGenObjC/constant-strings.m
index cad634a4b103..0a6549637358 100644
--- a/test/CodeGenObjC/constant-strings.m
+++ b/test/CodeGenObjC/constant-strings.m
@@ -3,7 +3,7 @@
// Check that we set alignment 1 on the string.
//
-// CHECK-NEXT: @.str = {{.*}}constant [13 x i8] c"Hello World!\00", align 1
+// CHECK-NEXT: @.str = {{.*}}constant [13 x i8] c"Hello World!\00", section "__TEXT,__cstring,cstring_literals", align 1
// RUN: %clang_cc1 -fobjc-runtime=gcc -emit-llvm -o %t %s
// RUN: FileCheck --check-prefix=CHECK-GNU < %t %s
diff --git a/test/CodeGenObjC/debug-info-block-helper.m b/test/CodeGenObjC/debug-info-block-helper.m
index 49c8c5daea8c..1403327dcb49 100644
--- a/test/CodeGenObjC/debug-info-block-helper.m
+++ b/test/CodeGenObjC/debug-info-block-helper.m
@@ -1,4 +1,4 @@
-// REQUIRES: x86-64-registered-target
+// REQUIRES: x86-registered-target
// RUN: %clang_cc1 -emit-llvm -fblocks -g -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 %s -o - | FileCheck %s
extern void foo(void(^)(void));
diff --git a/test/CodeGenObjC/debug-info-block-line.m b/test/CodeGenObjC/debug-info-block-line.m
index 1965e1d7dcdc..9ba22bcd24fc 100644
--- a/test/CodeGenObjC/debug-info-block-line.m
+++ b/test/CodeGenObjC/debug-info-block-line.m
@@ -1,4 +1,4 @@
-// REQUIRES: x86-64-registered-target
+// REQUIRES: x86-registered-target
// RUN: %clang_cc1 -emit-llvm -fblocks -fobjc-arc -g -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
// rdar://11562117
diff --git a/test/CodeGenObjC/debug-info-blocks.m b/test/CodeGenObjC/debug-info-blocks.m
index 63068a9ca980..d025ca87d560 100644
--- a/test/CodeGenObjC/debug-info-blocks.m
+++ b/test/CodeGenObjC/debug-info-blocks.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -fblocks -g -triple x86_64-apple-darwin10 -fobjc-dispatch-method=mixed %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -fblocks -g -triple x86_64-apple-darwin10 -fobjc-dispatch-method=mixed -x objective-c < %s -o - | FileCheck %s
// rdar://problem/9279956
// Test that we generate the proper debug location for a captured self.
diff --git a/test/CodeGenObjC/debug-info-class-extension.m b/test/CodeGenObjC/debug-info-class-extension.m
index e1573f063377..0d1b720aa677 100644
--- a/test/CodeGenObjC/debug-info-class-extension.m
+++ b/test/CodeGenObjC/debug-info-class-extension.m
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -masm-verbose -S -g %s -o - | FileCheck %s
+// FIXME: Check IR rather than asm, then triple is not needed.
+// RUN: %clang_cc1 -triple %itanium_abi_triple -masm-verbose -S -g %s -o - | FileCheck %s
// CHECK: AT_APPLE_objc_complete_type
diff --git a/test/CodeGenObjC/debug-info-class-extension2.m b/test/CodeGenObjC/debug-info-class-extension2.m
index bae12dce4e4d..383390c4ab31 100644
--- a/test/CodeGenObjC/debug-info-class-extension2.m
+++ b/test/CodeGenObjC/debug-info-class-extension2.m
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -masm-verbose -S -g %s -o - | FileCheck %s
+// FIXME: Check IR rather than asm, then triple is not needed.
+// RUN: %clang_cc1 -triple %itanium_abi_triple -masm-verbose -S -g %s -o - | FileCheck %s
// CHECK: AT_APPLE_objc_complete_type
@interface Foo {} @end
diff --git a/test/CodeGenObjC/debug-info-crash-2.m b/test/CodeGenObjC/debug-info-crash-2.m
index 7d05f535c9af..9e80580796a0 100644
--- a/test/CodeGenObjC/debug-info-crash-2.m
+++ b/test/CodeGenObjC/debug-info-crash-2.m
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -g -S %s -o -
-// REQUIRES: x86-64-registered-target
+// REQUIRES: x86-registered-target
@class Bar;
@interface Foo
diff --git a/test/CodeGenObjC/debug-info-getter-name.m b/test/CodeGenObjC/debug-info-getter-name.m
index 3939f355b68f..70d99367cbf6 100644
--- a/test/CodeGenObjC/debug-info-getter-name.m
+++ b/test/CodeGenObjC/debug-info-getter-name.m
@@ -1,4 +1,4 @@
-// REQUIRES: x86-64-registered-target
+// REQUIRES: x86-registered-target
// RUN: %clang_cc1 -emit-llvm -triple x86_64-apple-darwin10 -fexceptions -fobjc-exceptions -g %s -o - | FileCheck %s
// CHECK: {{.*}}, metadata !"-[InstanceVariablesEverywhereButTheInterface someString]", {{.*}}} ; [ DW_TAG_subprogram ]
diff --git a/test/CodeGenObjC/debug-info-ivars-indirect.m b/test/CodeGenObjC/debug-info-ivars-indirect.m
index 1548ddd0bb6e..f9593d24dea0 100644
--- a/test/CodeGenObjC/debug-info-ivars-indirect.m
+++ b/test/CodeGenObjC/debug-info-ivars-indirect.m
@@ -3,6 +3,14 @@
// Make sure we generate debug symbols for an indirectly referenced
// extension to an interface.
+// This happens to be the order the members are emitted in... I'm assuming it's
+// not meaningful/important, so if something causes the order to change, feel
+// free to update the test to reflect the new order.
+// CHECK: ; [ DW_TAG_member ] [a]
+// CHECK: ; [ DW_TAG_member ] [d]
+// CHECK: ; [ DW_TAG_member ] [c]
+// CHECK: ; [ DW_TAG_member ] [b]
+
@interface I
{
@public int a;
@@ -29,4 +37,23 @@ void gorf (struct S* s) {
int _b = s->i->b;
}
-// CHECK: {{.*}} [ DW_TAG_member ] [b] [line 24, size 32, align 32, offset 0] [from int]
+
+I *source();
+
+@interface I()
+{
+ @public int c;
+}
+@end
+
+void use() {
+ int _c = source()->c;
+}
+
+@interface I()
+{
+ @public int d;
+}
+@end
+
+I *x();
diff --git a/test/CodeGenObjC/debug-info-lifetime-crash.m b/test/CodeGenObjC/debug-info-lifetime-crash.m
index 90382010fb6d..81c7fbca1a80 100644
--- a/test/CodeGenObjC/debug-info-lifetime-crash.m
+++ b/test/CodeGenObjC/debug-info-lifetime-crash.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -cc1 -triple arm-apple-ios -emit-llvm -g -fblocks -fobjc-runtime=ios-7.0.0 -fobjc-arc %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple arm-apple-ios -emit-llvm -g -fblocks -fobjc-runtime=ios-7.0.0 -fobjc-arc %s -o - | FileCheck %s
// rdar://problem/14990656
@protocol NSObject
- (id)copy;
diff --git a/test/CodeGenObjC/debug-info-property.m b/test/CodeGenObjC/debug-info-property.m
index dd105a58bdf4..6e2dcda8b54b 100644
--- a/test/CodeGenObjC/debug-info-property.m
+++ b/test/CodeGenObjC/debug-info-property.m
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -masm-verbose -S -g %s -o - | FileCheck %s
+// FIXME: Check IR rather than asm, then triple is not needed.
+// RUN: %clang_cc1 -triple %itanium_abi_triple -masm-verbose -S -g %s -o - | FileCheck %s
// CHECK: AT_APPLE_property_name
// CHECK: AT_APPLE_property_attribute
diff --git a/test/CodeGenObjC/debug-info-property2.m b/test/CodeGenObjC/debug-info-property2.m
index 4cd76c1ca6dc..41140dc20425 100644
--- a/test/CodeGenObjC/debug-info-property2.m
+++ b/test/CodeGenObjC/debug-info-property2.m
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -masm-verbose -S -g %s -o - | FileCheck %s
+// FIXME: Check IR rather than asm, then triple is not needed.
+// RUN: %clang_cc1 -triple %itanium_abi_triple -masm-verbose -S -g %s -o - | FileCheck %s
// CHECK: AT_APPLE_property_name
@interface C {
diff --git a/test/CodeGenObjC/debug-info-property4.m b/test/CodeGenObjC/debug-info-property4.m
index 71863a6b9f3b..2057d4d1d974 100644
--- a/test/CodeGenObjC/debug-info-property4.m
+++ b/test/CodeGenObjC/debug-info-property4.m
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -masm-verbose -S -g %s -o - | FileCheck %s
+// FIXME: Check IR rather than asm, then triple is not needed.
+// RUN: %clang_cc1 -triple %itanium_abi_triple -masm-verbose -S -g %s -o - | FileCheck %s
// CHECK: AT_APPLE_property_name
// CHECK-NOT: AT_APPLE_property_getter
diff --git a/test/CodeGenObjC/debug-info-property5.m b/test/CodeGenObjC/debug-info-property5.m
index 272aa5de0760..126d0a2677e2 100644
--- a/test/CodeGenObjC/debug-info-property5.m
+++ b/test/CodeGenObjC/debug-info-property5.m
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -masm-verbose -S -g %s -o - | FileCheck %s
+// FIXME: Check IR rather than asm, then triple is not needed.
+// RUN: %clang_cc1 -triple %itanium_abi_triple -masm-verbose -S -g %s -o - | FileCheck %s
// CHECK: AT_APPLE_property_name
// CHECK: AT_APPLE_property_getter
diff --git a/test/CodeGenObjC/debug-info-pubtypes.m b/test/CodeGenObjC/debug-info-pubtypes.m
index 8b7dfadfd91a..845b946f8899 100644
--- a/test/CodeGenObjC/debug-info-pubtypes.m
+++ b/test/CodeGenObjC/debug-info-pubtypes.m
@@ -1,4 +1,4 @@
-// REQUIRES: x86-64-registered-target
+// REQUIRES: x86-registered-target
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -g -emit-llvm %s -o - | FileCheck %s
// CHECK: {{.*}} [ DW_TAG_structure_type ] [H] [line 6,
diff --git a/test/CodeGenObjC/debug-info-self.m b/test/CodeGenObjC/debug-info-self.m
index 8cbc0292f0ae..7a484d81481a 100644
--- a/test/CodeGenObjC/debug-info-self.m
+++ b/test/CodeGenObjC/debug-info-self.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -g %s -o - | FileCheck %s
// self and _cmd are marked as DW_AT_artificial.
// myarg is not marked as DW_AT_artificial.
diff --git a/test/CodeGenObjC/debug-property-synth.m b/test/CodeGenObjC/debug-property-synth.m
index 954620a63598..68fb956def80 100644
--- a/test/CodeGenObjC/debug-property-synth.m
+++ b/test/CodeGenObjC/debug-property-synth.m
@@ -1,8 +1,27 @@
-// RUN: %clang_cc1 -masm-verbose -S -g %s -o - | FileCheck %s
-// Radar 9468526
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -g %s -o - | FileCheck %s
+// rdar://problem/9468526
+//
+// Setting a breakpoint on a property should create breakpoints in
+// synthesized getters/setters.
+//
@interface I {
int _p1;
}
+// Test that the linetable entries for the synthesized getter and
+// setter are correct.
+//
+// CHECK: define {{.*}}[I p1]
+// CHECK-NOT: ret
+// CHECK: load {{.*}}, !dbg ![[DBG1:[0-9]+]]
+//
+// CHECK: define {{.*}}[I setP1:]
+// CHECK-NOT: ret
+// CHECK: load {{.*}}, !dbg ![[DBG2:[0-9]+]]
+//
+// CHECK: [ DW_TAG_subprogram ] [line [[@LINE+4]]] [local] [def] [-[I p1]]
+// CHECK: [ DW_TAG_subprogram ] [line [[@LINE+3]]] [local] [def] [-[I setP1:]]
+// CHECK: ![[DBG1]] = metadata !{i32 [[@LINE+2]],
+// CHECK: ![[DBG2]] = metadata !{i32 [[@LINE+1]],
@property int p1;
@end
@@ -13,8 +32,5 @@
int main() {
I *myi;
myi.p1 = 2;
- return 0;
+ return myi.p1;
}
-
-// FIXME: Make this test ir files.
-// CHECK: .loc 2 6 0
diff --git a/test/CodeGenObjC/encode-cstyle-method.m b/test/CodeGenObjC/encode-cstyle-method.m
index 309089b9b602..d0a99215b9a5 100644
--- a/test/CodeGenObjC/encode-cstyle-method.m
+++ b/test/CodeGenObjC/encode-cstyle-method.m
@@ -8,4 +8,4 @@
@implementation Foo
- (id)test:(id )one, id two {return two; } @end
-// CHECK-LP64: internal global [11 x i8] c"@24@0:8@16
+// CHECK-LP64: private global [11 x i8] c"@24@0:8@16
diff --git a/test/CodeGenObjC/encode-test-6.m b/test/CodeGenObjC/encode-test-6.m
index b7b37997e1fa..4e9c4222033f 100644
--- a/test/CodeGenObjC/encode-test-6.m
+++ b/test/CodeGenObjC/encode-test-6.m
@@ -14,8 +14,8 @@ typedef struct {} Z;
-(void)foo:(Z)a: (char*)b : (Z)c : (double) d {}
@end
-// CHECK: internal global [14 x i8] c"v16@0:8{?=}16
-// CHECK: internal global [26 x i8] c"v32@0:8{?=}16*16{?=}24d24
+// CHECK: private global [14 x i8] c"v16@0:8{?=}16
+// CHECK: private global [26 x i8] c"v32@0:8{?=}16*16{?=}24d24
// rdar://13190095
@@ -34,7 +34,7 @@ typedef BABugExample BABugExampleRedefinition;
@synthesize property = _property;
@end
-// CHECK: internal global [24 x i8] c"^{BABugExample=@}16
+// CHECK: private global [24 x i8] c"^{BABugExample=@}16
// rdar://14408244
@class SCNCamera;
@@ -52,4 +52,15 @@ typedef struct
C3DCameraStorage _storage;
}
@end
-// CHECK: internal global [39 x i8] c"{?=\22presentationInstance\22^{SCNCamera}}\00"
+// CHECK: private global [39 x i8] c"{?=\22presentationInstance\22^{SCNCamera}}\00"
+
+// rdar://16655340
+int i;
+typeof(@encode(typeof(i))) e = @encode(typeof(i));
+const char * Test()
+{
+ return e;
+}
+// CHECK: @e = global [2 x i8] c"i\00", align 1
+// CHECK: define i8* @Test()
+// CHECK: ret i8* getelementptr inbounds ([2 x i8]* @e, i32 0, i32 0)
diff --git a/test/CodeGenObjC/encode-test.m b/test/CodeGenObjC/encode-test.m
index d6e7b6dfccad..6f2423b66874 100644
--- a/test/CodeGenObjC/encode-test.m
+++ b/test/CodeGenObjC/encode-test.m
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -triple i686-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o %t %s
// RUN: FileCheck < %t %s
//
-// CHECK: @"\01L_OBJC_METH_VAR_TYPE_34" = internal global [16 x i8] c"v12@0:4[3[4@]]8\00"
+// CHECK: @"\01L_OBJC_METH_VAR_TYPE_34" = private global [16 x i8] c"v12@0:4[3[4@]]8\00"
@class Int1;
@@ -169,3 +169,11 @@ const char g11[] = @encode(void);
// PR14628
// CHECK: @g12 = constant [3 x i8] c"Ai\00"
const char g12[] = @encode(_Atomic(int));
+
+// rdar://15824769
+id test_id = 0;
+Class test_class = 0;
+const char g13[] = @encode(__typeof__(*test_class));
+const char g14[] = @encode(__typeof__(*test_id));
+// CHECK: constant [14 x i8] c"{objc_class=}\00"
+// CHECK: constant [15 x i8] c"{objc_object=}\00"
diff --git a/test/CodeGenObjC/exceptions-asm-attribute.m b/test/CodeGenObjC/exceptions-asm-attribute.m
new file mode 100644
index 000000000000..eb369902a3c8
--- /dev/null
+++ b/test/CodeGenObjC/exceptions-asm-attribute.m
@@ -0,0 +1,86 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fexceptions -fobjc-exceptions -o %t %s
+// RUN: FileCheck -check-prefix=CHECK-X86_64 < %t %s
+// RUN: FileCheck -check-prefix=CHECK-EHTYPE < %t %s
+// rdar://16462586
+
+// We need exactly 3 of these.
+// CHECK-EHTYPE: @"OBJC_EHTYPE_$_MySecretNamespace.EH3"
+// CHECK-EHTYPE: @"OBJC_EHTYPE_$_MySecretNamespace.EH3"
+// CHECK-EHTYPE: @"OBJC_EHTYPE_$_MySecretNamespace.EH3"
+// CHECK-EHTYPE-NOT: @"OBJC_EHTYPE_$_MySecretNamespace.EH3"
+
+// CHECK-X86_64: @"OBJC_CLASS_$_MySecretNamespace.A" = global {{.*}}, section "__DATA, __objc_data", align 8
+// CHECK-X86_64: @"OBJC_METACLASS_$_MySecretNamespace.A" = global {{.*}}, section "__DATA, __objc_data", align 8
+// CHECK-X86_64: @"\01L_OBJC_CLASS_NAME_" = {{.*}}, section "__TEXT,__objc_classname,cstring_literals", align 1
+// CHECK-X86_64: @"OBJC_EHTYPE_$_MySecretNamespace.EH1" = weak global {{.*}}, section "__DATA,__datacoal_nt,coalesced", align 8
+// CHECK-X86_64: @"OBJC_EHTYPE_$_MySecretNamespace.EH2" = external global
+// CHECK-X86_64: @"OBJC_EHTYPE_$_MySecretNamespace.EH3" = global {{.*}}, section "__DATA,__objc_const", align 8
+// CHECK-X86_64: @"\01L_OBJC_LABEL_CLASS_$" = private global {{.*}}, section "__DATA, __objc_classlist, regular, no_dead_strip", align 8
+// CHECK-X86_64: define internal void @"\01-[A im0]"
+// CHECK-X86_64: define internal void @"\01-[A(Cat) im1]"
+
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-exceptions -fvisibility hidden -emit-llvm -o %t %s
+// RUN: FileCheck -check-prefix=CHECK-X86_64-HIDDEN < %t %s
+
+// CHECK-X86_64-HIDDEN: @"OBJC_CLASS_$_MySecretNamespace.A" = hidden global {{.*}}, section "__DATA, __objc_data", align 8
+// CHECK-X86_64-HIDDEN: @"OBJC_METACLASS_$_MySecretNamespace.A" = hidden global {{.*}}, section "__DATA, __objc_data", align 8
+// CHECK-X86_64-HIDDEN: @"OBJC_EHTYPE_$_MySecretNamespace.EH1" = weak hidden global {{.*}}, section "__DATA,__datacoal_nt,coalesced"
+// CHECK-X86_64-HIDDEN: @"OBJC_EHTYPE_$_MySecretNamespace.EH2" = external global
+// CHECK-X86_64-HIDDEN: @"OBJC_EHTYPE_$_MySecretNamespace.EH3" = hidden global {{.*}}, section "__DATA,__objc_const", align 8
+// CHECK-X86_64-HIDDEN: define internal void @"\01-[A im0]"
+// CHECK-X86_64-HIDDEN: define internal void @"\01-[A(Cat) im1]"
+
+// RUN: %clang_cc1 -triple armv6-apple-darwin10 -target-abi apcs-gnu -fobjc-exceptions -emit-llvm -o %t %s
+// RUN: FileCheck -check-prefix=CHECK-ARMV6 < %t %s
+
+// CHECK-ARMV6: @"OBJC_CLASS_$_MySecretNamespace.A" = global {{.*}}, section "__DATA, __objc_data", align 4
+// CHECK-ARMV6: @"OBJC_METACLASS_$_MySecretNamespace.A" = global {{.*}}, section "__DATA, __objc_data", align 4
+// CHECK-ARMV6: @"\01L_OBJC_CLASS_NAME_" = {{.*}}, section "__TEXT,__objc_classname,cstring_literals", align 1
+// CHECK-ARMV6: @"OBJC_EHTYPE_$_MySecretNamespace.EH1" = weak global {{.*}}, section "__DATA,__datacoal_nt,coalesced", align 4
+// CHECK-ARMV6: @"OBJC_EHTYPE_$_MySecretNamespace.EH2" = external global
+// CHECK-ARMV6: @"OBJC_EHTYPE_$_MySecretNamespace.EH3" = global {{.*}}, section "__DATA,__objc_const", align 4
+// CHECK-ARMV6: @"\01L_OBJC_LABEL_CLASS_$" = private global {{.*}}, section "__DATA, __objc_classlist, regular, no_dead_strip", align 4
+// CHECK-ARMV6: define internal void @"\01-[A im0]"
+// CHECK-ARMV6: define internal void @"\01-[A(Cat) im1]"
+
+__attribute__((objc_runtime_name("MySecretNamespace.A")))
+@interface A
+@end
+
+@implementation A
+-(void) im0 {
+}
+@end
+
+@implementation A (Cat)
+-(void) im1 {
+}
+@end
+
+__attribute__((objc_runtime_name("MySecretNamespace.EH1")))
+@interface EH1
+@end
+
+__attribute__((objc_runtime_name("MySecretNamespace.EH2")))
+__attribute__((__objc_exception__))
+@interface EH2
+@end
+
+__attribute__((objc_runtime_name("MySecretNamespace.EH3")))
+__attribute__((__objc_exception__))
+@interface EH3
+@end
+
+void f1();
+
+void f0(id x) {
+ @try {
+ f1();
+ } @catch (EH1 *x) {
+ } @catch (EH2 *x) {
+ } @catch (EH3 *x) {
+ }
+}
+
+@implementation EH3
+@end
diff --git a/test/CodeGenObjC/externally-initialized-selectors.m b/test/CodeGenObjC/externally-initialized-selectors.m
index 87a7c04cf718..0b7c24eadd84 100644
--- a/test/CodeGenObjC/externally-initialized-selectors.m
+++ b/test/CodeGenObjC/externally-initialized-selectors.m
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -cc1 -fobjc-runtime=macosx-fragile-10.5 -o - -emit-llvm %s | FileCheck %s
-// RUN: %clang_cc1 -cc1 -o - -emit-llvm %s | FileCheck %s
+// RUN: %clang_cc1 -fobjc-runtime=macosx-fragile-10.5 -o - -emit-llvm %s | FileCheck %s
+// RUN: %clang_cc1 -o - -emit-llvm %s | FileCheck %s
-// CHECK: @"\01L_OBJC_SELECTOR_REFERENCES_" = internal externally_initialized global
+// CHECK: @"\01L_OBJC_SELECTOR_REFERENCES_" = private externally_initialized global
void test(id x) {
[x doSomething];
diff --git a/test/CodeGenObjC/forward-protocol-metadata-symbols.m b/test/CodeGenObjC/forward-protocol-metadata-symbols.m
new file mode 100644
index 000000000000..2b687d19f907
--- /dev/null
+++ b/test/CodeGenObjC/forward-protocol-metadata-symbols.m
@@ -0,0 +1,26 @@
+// RUN: %clang_cc1 -emit-llvm -x objective-c %s -o - | FileCheck %s
+// rdar://16203115
+
+@interface NSObject @end
+
+@protocol P0;
+
+@interface A : NSObject <P0>
++(Class) getClass;
+@end
+
+@implementation A
++(Class) getClass { return self; }
+@end
+
+int main() {
+ Protocol *P0 = @protocol(P0);
+ return 0;
+}
+
+// CHECK: @"\01l_OBJC_PROTOCOL_$_P0" = weak hidden global
+// CHECK: @"\01l_OBJC_CLASS_PROTOCOLS_$_A" = private global
+// CHECK: @"\01l_OBJC_LABEL_PROTOCOL_$_P0" = weak hidden global
+// CHECK: @"\01l_OBJC_PROTOCOL_REFERENCE_$_P0" = weak hidden global
+
+// CHECK: llvm.compiler.used = appending global [10 x i8*] {{[^"]*}}"\01L_OBJC_CLASS_NAME_"{{[^"]*}}"\01L_OBJC_METH_VAR_NAME_"{{[^"]*}}"\01L_OBJC_METH_VAR_TYPE_"{{[^"]*}}"\01l_OBJC_$_CLASS_METHODS_A"{{[^"]*}}"\01l_OBJC_CLASS_PROTOCOLS_$_A"{{[^"]*}}"\01L_OBJC_CLASS_NAME_1"{{[^"]*}}"\01l_OBJC_PROTOCOL_$_P0"{{[^"]*}}"\01l_OBJC_LABEL_PROTOCOL_$_P0"{{[^"]*}}"\01l_OBJC_PROTOCOL_REFERENCE_$_P0"{{[^"]*}}"\01L_OBJC_LABEL_CLASS_$"{{[^"]*}} section "llvm.metadata"
diff --git a/test/CodeGenObjC/getter-property-mismatch.m b/test/CodeGenObjC/getter-property-mismatch.m
index 21ed6eea68e8..fe415d5358d3 100644
--- a/test/CodeGenObjC/getter-property-mismatch.m
+++ b/test/CodeGenObjC/getter-property-mismatch.m
@@ -13,7 +13,7 @@
@synthesize filenamesToServerLocation=_filenamesToServerLocation;
@end
-// CHECK: [[CALL:%.*]] = call i8* @objc_getProperty
+// CHECK: [[CALL:%.*]] = tail call i8* @objc_getProperty
// CHECK: [[ONE:%.*]] = bitcast i8* [[CALL:%.*]] to [[T1:%.*]]*
// CHECK: [[TWO:%.*]] = bitcast [[T1]]* [[ONE]] to [[T2:%.*]]*
// CHECK: ret [[T2]]* [[TWO]]
diff --git a/test/CodeGenObjC/image-info.m b/test/CodeGenObjC/image-info.m
index 030bcaed1a38..49f5d90808a9 100644
--- a/test/CodeGenObjC/image-info.m
+++ b/test/CodeGenObjC/image-info.m
@@ -4,14 +4,14 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o %t %s
// RUN: FileCheck --check-prefix CHECK-NONFRAGILE < %t %s
-// CHECK-FRAGILE: !llvm.module.flags = !{!0, !1, !2, !3}
-// CHECK-FRAGILE: !0 = metadata !{i32 1, metadata !"Objective-C Version", i32 1}
-// CHECK-FRAGILE-NEXT: !1 = metadata !{i32 1, metadata !"Objective-C Image Info Version", i32 0}
-// CHECK-FRAGILE-NEXT: !2 = metadata !{i32 1, metadata !"Objective-C Image Info Section", metadata !"__OBJC, __image_info,regular"}
-// CHECK-FRAGILE-NEXT: !3 = metadata !{i32 4, metadata !"Objective-C Garbage Collection", i32 0}
+// CHECK-FRAGILE: !llvm.module.flags = !{{{.*}}}
+// CHECK-FRAGILE: !{{[0-9]+}} = metadata !{i32 1, metadata !"Objective-C Version", i32 1}
+// CHECK-FRAGILE-NEXT: !{{[0-9]+}} = metadata !{i32 1, metadata !"Objective-C Image Info Version", i32 0}
+// CHECK-FRAGILE-NEXT: !{{[0-9]+}} = metadata !{i32 1, metadata !"Objective-C Image Info Section", metadata !"__OBJC, __image_info,regular"}
+// CHECK-FRAGILE-NEXT: !{{[0-9]+}} = metadata !{i32 4, metadata !"Objective-C Garbage Collection", i32 0}
-// CHECK-NONFRAGILE: !llvm.module.flags = !{!0, !1, !2, !3}
-// CHECK-NONFRAGILE: !0 = metadata !{i32 1, metadata !"Objective-C Version", i32 2}
-// CHECK-NONFRAGILE-NEXT: !1 = metadata !{i32 1, metadata !"Objective-C Image Info Version", i32 0}
-// CHECK-NONFRAGILE-NEXT: !2 = metadata !{i32 1, metadata !"Objective-C Image Info Section", metadata !"__DATA, __objc_imageinfo, regular, no_dead_strip"}
-// CHECK-NONFRAGILE-NEXT: !3 = metadata !{i32 4, metadata !"Objective-C Garbage Collection", i32 0}
+// CHECK-NONFRAGILE: !llvm.module.flags = !{{{.*}}}
+// CHECK-NONFRAGILE: !{{[0-9]+}} = metadata !{i32 1, metadata !"Objective-C Version", i32 2}
+// CHECK-NONFRAGILE-NEXT: !{{[0-9]+}} = metadata !{i32 1, metadata !"Objective-C Image Info Version", i32 0}
+// CHECK-NONFRAGILE-NEXT: !{{[0-9]+}} = metadata !{i32 1, metadata !"Objective-C Image Info Section", metadata !"__DATA, __objc_imageinfo, regular, no_dead_strip"}
+// CHECK-NONFRAGILE-NEXT: !{{[0-9]+}} = metadata !{i32 4, metadata !"Objective-C Garbage Collection", i32 0}
diff --git a/test/CodeGenObjC/instance-method-metadata.m b/test/CodeGenObjC/instance-method-metadata.m
index 0d8c0e0eae50..59be44031325 100644
--- a/test/CodeGenObjC/instance-method-metadata.m
+++ b/test/CodeGenObjC/instance-method-metadata.m
@@ -1,4 +1,4 @@
-// REQUIRES: x86-64-registered-target
+// REQUIRES: x86-registered-target
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -S -o %t %s
// RUN: FileCheck < %t %s
diff --git a/test/CodeGenObjC/interface-layout-64.m b/test/CodeGenObjC/interface-layout-64.m
index 4b41cf855ed3..450300de72b2 100644
--- a/test/CodeGenObjC/interface-layout-64.m
+++ b/test/CodeGenObjC/interface-layout-64.m
@@ -2,24 +2,24 @@
// CHECK: @"OBJC_IVAR_$_I3._iv2" = global i64 8, section "__DATA, __objc_ivar", align 8
// CHECK: @"OBJC_IVAR_$_I3._iv3" = global i64 12, section "__DATA, __objc_ivar", align 8
-// CHECK: _OBJC_CLASS_RO_$_I3" = internal global {{.*}} { i32 0, i32 8, i32 13
+// CHECK: _OBJC_CLASS_RO_$_I3" = private global {{.*}} { i32 0, i32 8, i32 13
// CHECK: @"OBJC_IVAR_$_I4._iv4" = global i64 13, section "__DATA, __objc_ivar", align 8
-// CHECK: _OBJC_CLASS_RO_$_I4" = internal global {{.*}} { i32 0, i32 13, i32 14, {{.*}}
+// CHECK: _OBJC_CLASS_RO_$_I4" = private global {{.*}} { i32 0, i32 13, i32 14, {{.*}}
// CHECK: @"OBJC_IVAR_$_I5._iv6_synth" = hidden global i64 16, section "__DATA, __objc_ivar", align 8
// CHECK: @"OBJC_IVAR_$_I5._iv7_synth" = hidden global i64 20, section "__DATA, __objc_ivar", align 8
// CHECK: @"OBJC_IVAR_$_I5._iv5" = global i64 14, section "__DATA, __objc_ivar", align 8
-// CHECK: _OBJC_CLASS_RO_$_I5" = internal global {{.*}} { i32 0, i32 14, i32 24, {{.*}}
+// CHECK: _OBJC_CLASS_RO_$_I5" = private global {{.*}} { i32 0, i32 14, i32 24, {{.*}}
// CHECK: @"OBJC_IVAR_$_I6.iv0" = global i64 0, section "__DATA, __objc_ivar", align 8
-// CHECK: _OBJC_CLASS_RO_$_I6" = internal global {{.*}} { i32 2, i32 0, i32 1, {{.*}}
+// CHECK: _OBJC_CLASS_RO_$_I6" = private global {{.*}} { i32 2, i32 0, i32 1, {{.*}}
// CHECK: @"OBJC_IVAR_$_I8.b" = global i64 8, section "__DATA, __objc_ivar", align 8
-// CHECK: _OBJC_CLASS_RO_$_I8" = internal global {{.*}} { i32 0, i32 8, i32 16, {{.*}}
+// CHECK: _OBJC_CLASS_RO_$_I8" = private global {{.*}} { i32 0, i32 8, i32 16, {{.*}}
// CHECK: @"OBJC_IVAR_$_I9.iv0" = global i64 0, section "__DATA, __objc_ivar", align 8
-// CHECK: _OBJC_CLASS_RO_$_I9" = internal global {{.*}} { i32 2, i32 0, i32 4, {{.*}}
+// CHECK: _OBJC_CLASS_RO_$_I9" = private global {{.*}} { i32 2, i32 0, i32 4, {{.*}}
// CHECK: @"OBJC_IVAR_$_I10.iv1" = global i64 4, section "__DATA, __objc_ivar", align 8
-// CHECK: _OBJC_CLASS_RO_$_I10" = internal global {{.*}} { i32 0, i32 4, i32 5, {{.*}}
-// CHECK: _OBJC_CLASS_RO_$_I11" = internal global {{.*}} { i32 0, i32 5, i32 5, {{.*}}
+// CHECK: _OBJC_CLASS_RO_$_I10" = private global {{.*}} { i32 0, i32 4, i32 5, {{.*}}
+// CHECK: _OBJC_CLASS_RO_$_I11" = private global {{.*}} { i32 0, i32 5, i32 5, {{.*}}
// CHECK: @"OBJC_IVAR_$_I12.iv2" = global i64 8, section "__DATA, __objc_ivar", align 8
-// CHECK: _OBJC_CLASS_RO_$_I12" = internal global {{.*}} { i32 0, i32 8, i32 12, {{.*}}
+// CHECK: _OBJC_CLASS_RO_$_I12" = private global {{.*}} { i32 0, i32 8, i32 12, {{.*}}
/*
Compare to:
diff --git a/test/CodeGenObjC/ivar-base-as-invariant-load.m b/test/CodeGenObjC/ivar-base-as-invariant-load.m
index 19dc6587f553..061fea31a5ce 100644
--- a/test/CodeGenObjC/ivar-base-as-invariant-load.m
+++ b/test/CodeGenObjC/ivar-base-as-invariant-load.m
@@ -23,7 +23,7 @@
@end
-// CHECK: [[T1:%.*]] = load i64* @"OBJC_IVAR_$_A._flags", !invariant.load !5
-// CHECK: [[T2:%.*]] = load i64* @"OBJC_IVAR_$_A._flags", !invariant.load !5
-// CHECK: [[T3:%.*]] = load i64* @"OBJC_IVAR_$_A._flags", !invariant.load !5
-
+// CHECK: [[T1:%.*]] = load i64* @"OBJC_IVAR_$_A._flags", !invariant.load ![[MD_NUM:[0-9]+]]
+// CHECK: [[T2:%.*]] = load i64* @"OBJC_IVAR_$_A._flags", !invariant.load ![[MD_NUM]]
+// CHECK: [[T3:%.*]] = load i64* @"OBJC_IVAR_$_A._flags", !invariant.load ![[MD_NUM]]
+//
diff --git a/test/CodeGenObjC/ivar-layout-64.m b/test/CodeGenObjC/ivar-layout-64.m
index 91a8375e6365..068d109321fc 100644
--- a/test/CodeGenObjC/ivar-layout-64.m
+++ b/test/CodeGenObjC/ivar-layout-64.m
@@ -33,9 +33,9 @@ __weak B *f2;
@property int p3;
@end
-// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"C\00"
-// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"\11p\00"
-// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"!`\00"
+// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"C\00"
+// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"\11p\00"
+// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"!`\00"
@implementation C
@@ -48,9 +48,9 @@ __weak B *f2;
@property (assign) __weak id p2;
@end
-// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"A\00"
-// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"\11q\10\00"
-// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"!q\00"
+// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"A\00"
+// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"\11q\10\00"
+// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"!q\00"
@implementation A
@synthesize p0 = _p0;
@@ -62,9 +62,9 @@ __weak B *f2;
@property int p3;
@end
-// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"D\00"
-// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"\11p\00"
-// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"!`\00"
+// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"D\00"
+// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"\11p\00"
+// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"!`\00"
@implementation D
@synthesize p3 = _p3;
@@ -89,8 +89,8 @@ typedef unsigned int FSCatalogInfoBitmap;
}
@end
-// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"NSFileLocationComponent\00"
-// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"\01\14\00"
+// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"NSFileLocationComponent\00"
+// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"\01\14\00"
@implementation NSFileLocationComponent @end
@@ -108,7 +108,7 @@ typedef unsigned int FSCatalogInfoBitmap;
}
@end
-// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"Foo\00"
-// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = internal global {{.*}} c"\02\10\00"
+// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"Foo\00"
+// CHECK: @"\01L_OBJC_CLASS_NAME_{{.*}}" = private global {{.*}} c"\02\10\00"
@implementation Foo @end
diff --git a/test/CodeGenObjC/ivar-layout-array0-struct.m b/test/CodeGenObjC/ivar-layout-array0-struct.m
index 47373035214d..8e277106a71c 100644
--- a/test/CodeGenObjC/ivar-layout-array0-struct.m
+++ b/test/CodeGenObjC/ivar-layout-array0-struct.m
@@ -1,4 +1,4 @@
-// REQUIRES: x86-64-registered-target
+// REQUIRES: x86-registered-target
// RUN: %clang_cc1 -fobjc-gc -triple x86_64-apple-darwin -fobjc-runtime=macosx-fragile-10.5 -S %s -o %t-64.s
// RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s
diff --git a/test/CodeGenObjC/ivar-layout-no-optimize.m b/test/CodeGenObjC/ivar-layout-no-optimize.m
index 17b519577f97..554038f5ba9e 100644
--- a/test/CodeGenObjC/ivar-layout-no-optimize.m
+++ b/test/CodeGenObjC/ivar-layout-no-optimize.m
@@ -1,4 +1,4 @@
-// REQUIRES: x86-64-registered-target
+// REQUIRES: x86-registered-target
// RUN: %clang_cc1 -fobjc-gc -triple x86_64-apple-darwin -fobjc-runtime=macosx-fragile-10.5 -S %s -o %t-64.s
// RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s
// RUN: %clang_cc1 -x objective-c++ -fobjc-gc -triple x86_64-apple-darwin -fobjc-runtime=macosx-fragile-10.5 -S %s -o %t-64.s
diff --git a/test/CodeGenObjC/metadata-symbols-32.m b/test/CodeGenObjC/metadata-symbols-32.m
index fda909ca7449..61279e1dbed9 100644
--- a/test/CodeGenObjC/metadata-symbols-32.m
+++ b/test/CodeGenObjC/metadata-symbols-32.m
@@ -2,31 +2,33 @@
// CHECK: .lazy_reference .objc_class_name_J0
-// CHECK: @"\01L_OBJC_METH_VAR_NAME_{{[0-9]*}}" = internal global {{.*}}section "__TEXT,__cstring,cstring_literals", align 1
-// CHECK: @"\01L_OBJC_METH_VAR_TYPE_{{[0-9]*}}" = internal global {{.*}}section "__TEXT,__cstring,cstring_literals", align 1
-// CHECK: @"\01L_OBJC_CLASS_NAME_{{[0-9]*}}" = internal global {{.*}}section "__TEXT,__cstring,cstring_literals", align 1
-// CHECK: @"\01L_OBJC_PROTOCOL_INSTANCE_METHODS_P" = internal global {{.*}}section "__OBJC,__cat_inst_meth,regular,no_dead_strip", align 4
-// CHECK: @"\01L_OBJC_PROTOCOL_CLASS_METHODS_P" = internal global {{.*}}section "__OBJC,__cat_cls_meth,regular,no_dead_strip", align 4
-// CHECK: @"\01L_OBJC_PROTOCOL_P" = internal global {{.*}}section "__OBJC,__protocol,regular,no_dead_strip", align 4
-// CHECK: @"\01L_OBJC_CLASS_PROTOCOLS_A" = internal global {{.*}}section "__OBJC,__cat_cls_meth,regular,no_dead_strip", align 4
-// CHECK: @"\01L_OBJC_CLASS_METHODS_A" = internal global {{.*}}section "__OBJC,__cls_meth,regular,no_dead_strip", align 4
-// CHECK: @"\01L_OBJC_METACLASS_A" = internal global {{.*}}section "__OBJC,__meta_class,regular,no_dead_strip", align 4
-// CHECK: @"\01L_OBJC_INSTANCE_VARIABLES_A" = internal global {{.*}}section "__OBJC,__instance_vars,regular,no_dead_strip", align 4
-// CHECK: @"\01L_OBJC_INSTANCE_METHODS_A" = internal global {{.*}}section "__OBJC,__inst_meth,regular,no_dead_strip", align 4
-// CHECK: @"\01L_OBJC_PROP_NAME_ATTR_{{[0-9]*}}" = internal global {{.*}}section "__TEXT,__cstring,cstring_literals", align 1
-// CHECK: @"\01l_OBJC_$_PROP_LIST_A" = internal global {{.*}}section "__OBJC,__property,regular,no_dead_strip", align 4
-// CHECK: @"\01L_OBJC_CLASSEXT_A" = internal global {{.*}}section "__OBJC,__class_ext,regular,no_dead_strip", align 4
-// CHECK: @"\01L_OBJC_CLASS_A" = internal global {{.*}}section "__OBJC,__class,regular,no_dead_strip", align 4
-// CHECK: @"\01L_OBJC_CATEGORY_INSTANCE_METHODS_A_Cat" = internal global {{.*}}section "__OBJC,__cat_inst_meth,regular,no_dead_strip", align 4
-// CHECK: @"\01L_OBJC_CATEGORY_CLASS_METHODS_A_Cat" = internal global {{.*}}section "__OBJC,__cat_cls_meth,regular,no_dead_strip", align 4
-// CHECK: @"\01L_OBJC_CATEGORY_A_Cat" = internal global {{.*}}section "__OBJC,__category,regular,no_dead_strip", align 4
-// CHECK: @"\01L_OBJC_CLASS_REFERENCES_{{[0-9]*}}" = internal global {{.*}}section "__OBJC,__cls_refs,literal_pointers,no_dead_strip", align 4
-// CHECK: @"\01L_OBJC_SELECTOR_REFERENCES_{{[0-9]*}}" = internal externally_initialized global {{.*}}section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4
-// CHECK: @"\01L_OBJC_SYMBOLS" = internal global {{.*}}section "__OBJC,__symbols,regular,no_dead_strip", align 4
-// CHECK: @"\01L_OBJC_MODULES" = internal global {{.*}}section "__OBJC,__module_info,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_METH_VAR_NAME_{{[0-9]*}}" = private global {{.*}}section "__TEXT,__cstring,cstring_literals", align 1
+// CHECK: @"\01L_OBJC_METH_VAR_TYPE_{{[0-9]*}}" = private global {{.*}}section "__TEXT,__cstring,cstring_literals", align 1
+// CHECK: @"\01l_OBJC_PROTOCOLEXT_P" = private global
+// CHECK-NOT: section
+// CHECK: @"\01L_OBJC_CLASS_NAME_{{[0-9]*}}" = private global {{.*}}section "__TEXT,__cstring,cstring_literals", align 1
+// CHECK: @"\01L_OBJC_PROTOCOL_INSTANCE_METHODS_P" = private global {{.*}}section "__OBJC,__cat_inst_meth,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_PROTOCOL_CLASS_METHODS_P" = private global {{.*}}section "__OBJC,__cat_cls_meth,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_PROTOCOL_P" = private global {{.*}}section "__OBJC,__protocol,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_CLASS_PROTOCOLS_A" = private global {{.*}}section "__OBJC,__cat_cls_meth,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_CLASS_METHODS_A" = private global {{.*}}section "__OBJC,__cls_meth,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_METACLASS_A" = private global {{.*}}section "__OBJC,__meta_class,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_INSTANCE_VARIABLES_A" = private global {{.*}}section "__OBJC,__instance_vars,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_INSTANCE_METHODS_A" = private global {{.*}}section "__OBJC,__inst_meth,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_PROP_NAME_ATTR_{{[0-9]*}}" = private global {{.*}}section "__TEXT,__cstring,cstring_literals", align 1
+// CHECK: @"\01l_OBJC_$_PROP_LIST_A" = private global {{.*}}section "__OBJC,__property,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_CLASSEXT_A" = private global {{.*}}section "__OBJC,__class_ext,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_CLASS_A" = private global {{.*}}section "__OBJC,__class,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_CATEGORY_INSTANCE_METHODS_A_Cat" = private global {{.*}}section "__OBJC,__cat_inst_meth,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_CATEGORY_CLASS_METHODS_A_Cat" = private global {{.*}}section "__OBJC,__cat_cls_meth,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_CATEGORY_A_Cat" = private global {{.*}}section "__OBJC,__category,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_CLASS_REFERENCES_{{[0-9]*}}" = private global {{.*}}section "__OBJC,__cls_refs,literal_pointers,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_SELECTOR_REFERENCES_{{[0-9]*}}" = private externally_initialized global {{.*}}section "__OBJC,__message_refs,literal_pointers,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_SYMBOLS" = private global {{.*}}section "__OBJC,__symbols,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_MODULES" = private global {{.*}}section "__OBJC,__module_info,regular,no_dead_strip", align 4
// Clang's Obj-C 32-bit doesn't emit ivars for the root class.
-// CHECKX: @"\01L_OBJC_CLASS_VARIABLES_A" = internal global {{.*}}section "__OBJC,__class_vars,regular,no_dead_strip", align 4
+// CHECKX: @"\01L_OBJC_CLASS_VARIABLES_A" = private global {{.*}}section "__OBJC,__class_vars,regular,no_dead_strip", align 4
/*
diff --git a/test/CodeGenObjC/metadata-symbols-64.m b/test/CodeGenObjC/metadata-symbols-64.m
index a89fec56de2b..7b9609386900 100644
--- a/test/CodeGenObjC/metadata-symbols-64.m
+++ b/test/CodeGenObjC/metadata-symbols-64.m
@@ -5,32 +5,32 @@
// CHECK: @_objc_empty_vtable = external global
// CHECK: @"OBJC_CLASS_$_A" = global
// CHECK: @"OBJC_METACLASS_$_A" = global {{.*}} section "__DATA, __objc_data", align 8
-// CHECK: @"\01L_OBJC_CLASS_NAME_{{[0-9]*}}" = internal global {{.*}} section "__TEXT,__objc_classname,cstring_literals", align 1
-// CHECK: @"\01L_OBJC_METH_VAR_NAME_{{[0-9]*}}" = internal global {{.*}} section "__TEXT,__objc_methname,cstring_literals", align 1
-// CHECK: @"\01L_OBJC_METH_VAR_TYPE_{{[0-9]*}}" = internal global {{.*}} section "__TEXT,__objc_methtype,cstring_literals", align 1
-// CHECK: @"\01l_OBJC_$_CLASS_METHODS_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
-// CHECK: @"\01l_OBJC_$_PROTOCOL_INSTANCE_METHODS_P" = internal global {{.*}} section "__DATA, __objc_const", align 8
-// CHECK: @"\01l_OBJC_$_PROTOCOL_CLASS_METHODS_P" = internal global {{.*}} section "__DATA, __objc_const", align 8
+// CHECK: @"\01L_OBJC_CLASS_NAME_{{[0-9]*}}" = private global {{.*}} section "__TEXT,__objc_classname,cstring_literals", align 1
+// CHECK: @"\01L_OBJC_METH_VAR_NAME_{{[0-9]*}}" = private global {{.*}} section "__TEXT,__objc_methname,cstring_literals", align 1
+// CHECK: @"\01L_OBJC_METH_VAR_TYPE_{{[0-9]*}}" = private global {{.*}} section "__TEXT,__objc_methtype,cstring_literals", align 1
+// CHECK: @"\01l_OBJC_$_CLASS_METHODS_A" = private global {{.*}} section "__DATA, __objc_const", align 8
+// CHECK: @"\01l_OBJC_$_PROTOCOL_INSTANCE_METHODS_P" = private global {{.*}} section "__DATA, __objc_const", align 8
+// CHECK: @"\01l_OBJC_$_PROTOCOL_CLASS_METHODS_P" = private global {{.*}} section "__DATA, __objc_const", align 8
// CHECK: @"\01l_OBJC_PROTOCOL_$_P" = weak hidden global {{.*}} section "__DATA,__datacoal_nt,coalesced", align 8
// CHECK: @"\01l_OBJC_LABEL_PROTOCOL_$_P" = weak hidden global {{.*}} section "__DATA, __objc_protolist, coalesced, no_dead_strip", align 8
-// CHECK: @"\01l_OBJC_CLASS_PROTOCOLS_$_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
-// CHECK: @"\01l_OBJC_METACLASS_RO_$_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
-// CHECK: @"\01l_OBJC_$_INSTANCE_METHODS_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
-// CHECK: @"\01l_OBJC_$_INSTANCE_VARIABLES_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
-// CHECK: @"\01L_OBJC_PROP_NAME_ATTR_{{[0-9]*}}" = internal global {{.*}} section "__TEXT,__cstring,cstring_literals", align 1
-// CHECK: @"\01l_OBJC_$_PROP_LIST_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
-// CHECK: @"\01l_OBJC_CLASS_RO_$_A" = internal global {{.*}} section "__DATA, __objc_const", align 8
-// CHECK: @"\01l_OBJC_$_CATEGORY_INSTANCE_METHODS_A_$_Cat" = internal global {{.*}} section "__DATA, __objc_const", align 8
-// CHECK: @"\01l_OBJC_$_CATEGORY_CLASS_METHODS_A_$_Cat" = internal global {{.*}} section "__DATA, __objc_const", align 8
-// CHECK: @"\01l_OBJC_$_CATEGORY_A_$_Cat" = internal global {{.*}} section "__DATA, __objc_const", align 8
-// CHECK: @"\01L_OBJC_CLASSLIST_SUP_REFS_$_{{[0-9]*}}" = internal global {{.*}} section "__DATA, __objc_superrefs, regular, no_dead_strip", align 8
-// CHECK: @"\01L_OBJC_SELECTOR_REFERENCES_" = internal externally_initialized global {{.*}} section "__DATA, __objc_selrefs, literal_pointers, no_dead_strip"
-// CHECK: @"\01L_OBJC_CLASSLIST_SUP_REFS_$_{{[0-9]*}}" = internal global {{.*}} section "__DATA, __objc_superrefs, regular, no_dead_strip", align 8
+// CHECK: @"\01l_OBJC_CLASS_PROTOCOLS_$_A" = private global {{.*}} section "__DATA, __objc_const", align 8
+// CHECK: @"\01l_OBJC_METACLASS_RO_$_A" = private global {{.*}} section "__DATA, __objc_const", align 8
+// CHECK: @"\01l_OBJC_$_INSTANCE_METHODS_A" = private global {{.*}} section "__DATA, __objc_const", align 8
+// CHECK: @"\01l_OBJC_$_INSTANCE_VARIABLES_A" = private global {{.*}} section "__DATA, __objc_const", align 8
+// CHECK: @"\01L_OBJC_PROP_NAME_ATTR_{{[0-9]*}}" = private global {{.*}} section "__TEXT,__cstring,cstring_literals", align 1
+// CHECK: @"\01l_OBJC_$_PROP_LIST_A" = private global {{.*}} section "__DATA, __objc_const", align 8
+// CHECK: @"\01l_OBJC_CLASS_RO_$_A" = private global {{.*}} section "__DATA, __objc_const", align 8
+// CHECK: @"\01l_OBJC_$_CATEGORY_INSTANCE_METHODS_A_$_Cat" = private global {{.*}} section "__DATA, __objc_const", align 8
+// CHECK: @"\01l_OBJC_$_CATEGORY_CLASS_METHODS_A_$_Cat" = private global {{.*}} section "__DATA, __objc_const", align 8
+// CHECK: @"\01l_OBJC_$_CATEGORY_A_$_Cat" = private global {{.*}} section "__DATA, __objc_const", align 8
+// CHECK: @"\01L_OBJC_CLASSLIST_SUP_REFS_$_{{[0-9]*}}" = private global {{.*}} section "__DATA, __objc_superrefs, regular, no_dead_strip", align 8
+// CHECK: @"\01L_OBJC_SELECTOR_REFERENCES_" = private externally_initialized global {{.*}} section "__DATA, __objc_selrefs, literal_pointers, no_dead_strip"
+// CHECK: @"\01L_OBJC_CLASSLIST_SUP_REFS_$_{{[0-9]*}}" = private global {{.*}} section "__DATA, __objc_superrefs, regular, no_dead_strip", align 8
// CHECK: @"OBJC_CLASS_$_B" = external global
-// CHECK: @"\01L_OBJC_CLASSLIST_REFERENCES_$_{{[0-9]*}}" = internal global {{.*}} section "__DATA, __objc_classrefs, regular, no_dead_strip", align 8
+// CHECK: @"\01L_OBJC_CLASSLIST_REFERENCES_$_{{[0-9]*}}" = private global {{.*}} section "__DATA, __objc_classrefs, regular, no_dead_strip", align 8
// CHECK: @"\01l_objc_msgSend_fixup_alloc" = weak hidden global {{.*}} section "__DATA, __objc_msgrefs, coalesced", align 16
-// CHECK: @"\01L_OBJC_LABEL_CLASS_$" = internal global {{.*}} section "__DATA, __objc_classlist, regular, no_dead_strip", align 8
-// CHECK: @"\01L_OBJC_LABEL_CATEGORY_$" = internal global {{.*}} section "__DATA, __objc_catlist, regular, no_dead_strip", align 8
+// CHECK: @"\01L_OBJC_LABEL_CLASS_$" = private global {{.*}} section "__DATA, __objc_classlist, regular, no_dead_strip", align 8
+// CHECK: @"\01L_OBJC_LABEL_CATEGORY_$" = private global {{.*}} section "__DATA, __objc_catlist, regular, no_dead_strip", align 8
// CHECK: @objc_msgSend_fpret(
// CHECK: @objc_msgSend_fixup(
diff --git a/test/CodeGenObjC/metadata_symbols.m b/test/CodeGenObjC/metadata_symbols.m
index eedcf16627a6..2b61c5d4bad3 100644
--- a/test/CodeGenObjC/metadata_symbols.m
+++ b/test/CodeGenObjC/metadata_symbols.m
@@ -14,7 +14,7 @@
// CHECK-X86_64: @"OBJC_EHTYPE_$_EH1" = weak global {{.*}}, section "__DATA,__datacoal_nt,coalesced", align 8
// CHECK-X86_64: @"OBJC_EHTYPE_$_EH2" = external global
// CHECK-X86_64: @"OBJC_EHTYPE_$_EH3" = global {{.*}}, section "__DATA,__objc_const", align 8
-// CHECK-X86_64: @"\01L_OBJC_LABEL_CLASS_$" = internal global {{.*}}, section "__DATA, __objc_classlist, regular, no_dead_strip", align 8
+// CHECK-X86_64: @"\01L_OBJC_LABEL_CLASS_$" = private global {{.*}}, section "__DATA, __objc_classlist, regular, no_dead_strip", align 8
// CHECK-X86_64: define internal void @"\01-[A im0]"
// CHECK-X86_64: define internal void @"\01-[A(Cat) im1]"
@@ -38,7 +38,7 @@
// CHECK-ARMV6: @"OBJC_EHTYPE_$_EH1" = weak global {{.*}}, section "__DATA,__datacoal_nt,coalesced", align 4
// CHECK-ARMV6: @"OBJC_EHTYPE_$_EH2" = external global
// CHECK-ARMV6: @"OBJC_EHTYPE_$_EH3" = global {{.*}}, section "__DATA,__objc_const", align 4
-// CHECK-ARMV6: @"\01L_OBJC_LABEL_CLASS_$" = internal global {{.*}}, section "__DATA, __objc_classlist, regular, no_dead_strip", align 4
+// CHECK-ARMV6: @"\01L_OBJC_LABEL_CLASS_$" = private global {{.*}}, section "__DATA, __objc_classlist, regular, no_dead_strip", align 4
// CHECK-ARMV6: define internal void @"\01-[A im0]"
// CHECK-ARMV6: define internal void @"\01-[A(Cat) im1]"
diff --git a/test/CodeGenObjC/no-vararg-messaging.m b/test/CodeGenObjC/no-vararg-messaging.m
index 3f9d934ec88f..0095209820b3 100644
--- a/test/CodeGenObjC/no-vararg-messaging.m
+++ b/test/CodeGenObjC/no-vararg-messaging.m
@@ -1,4 +1,4 @@
-// REQUIRES: x86-64-registered-target
+// REQUIRES: x86-registered-target
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -S -o - %s | FileCheck %s
// rdar://9048030
diff --git a/test/CodeGenObjC/non-lazy-classes.m b/test/CodeGenObjC/non-lazy-classes.m
index d95cb78d4b1c..760ddad068c5 100644
--- a/test/CodeGenObjC/non-lazy-classes.m
+++ b/test/CodeGenObjC/non-lazy-classes.m
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o %t %s
-// RUN: grep '@".01L_OBJC_LABEL_NONLAZY_CLASS_$" = internal global \[1 x .*\] .*@"OBJC_CLASS_$_A".*, section "__DATA, __objc_nlclslist, regular, no_dead_strip", align 8' %t
-// RUN: grep '@".01L_OBJC_LABEL_NONLAZY_CATEGORY_$" = internal global \[1 x .*\] .*@".01l_OBJC_$_CATEGORY_A_$_Cat".*, section "__DATA, __objc_nlcatlist, regular, no_dead_strip", align 8' %t
+// RUN: grep '@".01L_OBJC_LABEL_NONLAZY_CLASS_$" = private global \[1 x .*\] .*@"OBJC_CLASS_$_A".*, section "__DATA, __objc_nlclslist, regular, no_dead_strip", align 8' %t
+// RUN: grep '@".01L_OBJC_LABEL_NONLAZY_CATEGORY_$" = private global \[1 x .*\] .*@".01l_OBJC_$_CATEGORY_A_$_Cat".*, section "__DATA, __objc_nlcatlist, regular, no_dead_strip", align 8' %t
@interface A @end
@implementation A
diff --git a/test/CodeGenObjC/objc-align.m b/test/CodeGenObjC/objc-align.m
index 1a96f34c5d9f..2b2133ea59b1 100644
--- a/test/CodeGenObjC/objc-align.m
+++ b/test/CodeGenObjC/objc-align.m
@@ -1,14 +1,14 @@
// 32-bit
// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o - %s | FileCheck %s
-// CHECK: @"\01L_OBJC_METACLASS_A" = internal global {{.*}}, section "__OBJC,__meta_class,regular,no_dead_strip", align 4
-// CHECK: @"\01L_OBJC_CLASS_A" = internal global {{.*}}, section "__OBJC,__class,regular,no_dead_strip", align 4
-// CHECK: @"\01L_OBJC_CATEGORY_A_Cat" = internal global {{.*}}, section "__OBJC,__category,regular,no_dead_strip", align 4
-// CHECK: @"\01L_OBJC_PROTOCOL_P" = internal global {{.*}}, section "__OBJC,__protocol,regular,no_dead_strip", align 4
-// CHECK: @"\01L_OBJC_CLASS_PROTOCOLS_C" = internal global {{.*}}, section "__OBJC,__cat_cls_meth,regular,no_dead_strip", align 4
-// CHECK: @"\01L_OBJC_METACLASS_C" = internal global {{.*}}, section "__OBJC,__meta_class,regular,no_dead_strip", align 4
-// CHECK: @"\01L_OBJC_CLASS_C" = internal global {{.*}}, section "__OBJC,__class,regular,no_dead_strip", align 4
-// CHECK: @"\01L_OBJC_MODULES" = internal global {{.*}}, section "__OBJC,__module_info,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_METACLASS_A" = private global {{.*}}, section "__OBJC,__meta_class,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_CLASS_A" = private global {{.*}}, section "__OBJC,__class,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_CATEGORY_A_Cat" = private global {{.*}}, section "__OBJC,__category,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_PROTOCOL_P" = private global {{.*}}, section "__OBJC,__protocol,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_CLASS_PROTOCOLS_C" = private global {{.*}}, section "__OBJC,__cat_cls_meth,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_METACLASS_C" = private global {{.*}}, section "__OBJC,__meta_class,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_CLASS_C" = private global {{.*}}, section "__OBJC,__class,regular,no_dead_strip", align 4
+// CHECK: @"\01L_OBJC_MODULES" = private global {{.*}}, section "__OBJC,__module_info,regular,no_dead_strip", align 4
// 64-bit
@@ -17,16 +17,16 @@
// RUNX: grep '@"OBJC_CLASS_$_C" = global' %t &&
// RUNX: grep '@"OBJC_METACLASS_$_A" = global' %t &&
// RUNX: grep '@"OBJC_METACLASS_$_C" = global' %t &&
-// RUNX: grep '@"\\01L_OBJC_CLASSLIST_REFERENCES_$_0" = internal global .*, section "__DATA, __objc_classrefs, regular, no_dead_strip", align 8' %t &&
-// RUNX: grep '@"\\01L_OBJC_LABEL_CATEGORY_$" = internal global .*, section "__DATA, __objc_catlist, regular, no_dead_strip", align 8' %t &&
-// RUNX: grep '@"\\01L_OBJC_LABEL_CLASS_$" = internal global .*, section "__DATA, __objc_classlist, regular, no_dead_strip", align 8' %t &&
-// RUNX: grep '@"\\01l_OBJC_$_CATEGORY_A_$_Cat" = internal global .*, section "__DATA, __objc_const", align 8' %t &&
-// RUNX: grep '@"\\01l_OBJC_CLASS_PROTOCOLS_$_C" = internal global .*, section "__DATA, __objc_const", align 8' %t &&
-// RUNX: grep '@"\\01l_OBJC_CLASS_RO_$_A" = internal global .*, section "__DATA, __objc_const", align 8' %t &&
-// RUNX: grep '@"\\01l_OBJC_CLASS_RO_$_C" = internal global .*, section "__DATA, __objc_const", align 8' %t &&
+// RUNX: grep '@"\\01L_OBJC_CLASSLIST_REFERENCES_$_0" = private global .*, section "__DATA, __objc_classrefs, regular, no_dead_strip", align 8' %t &&
+// RUNX: grep '@"\\01L_OBJC_LABEL_CATEGORY_$" = private global .*, section "__DATA, __objc_catlist, regular, no_dead_strip", align 8' %t &&
+// RUNX: grep '@"\\01L_OBJC_LABEL_CLASS_$" = private global .*, section "__DATA, __objc_classlist, regular, no_dead_strip", align 8' %t &&
+// RUNX: grep '@"\\01l_OBJC_$_CATEGORY_A_$_Cat" = private global .*, section "__DATA, __objc_const", align 8' %t &&
+// RUNX: grep '@"\\01l_OBJC_CLASS_PROTOCOLS_$_C" = private global .*, section "__DATA, __objc_const", align 8' %t &&
+// RUNX: grep '@"\\01l_OBJC_CLASS_RO_$_A" = private global .*, section "__DATA, __objc_const", align 8' %t &&
+// RUNX: grep '@"\\01l_OBJC_CLASS_RO_$_C" = private global .*, section "__DATA, __objc_const", align 8' %t &&
// RUNX: grep '@"\\01l_OBJC_LABEL_PROTOCOL_$_P" = weak hidden global .*, section "__DATA, __objc_protolist, coalesced, no_dead_strip", align 8' %t &&
-// RUNX: grep '@"\\01l_OBJC_METACLASS_RO_$_A" = internal global .*, section "__DATA, __objc_const", align 8' %t &&
-// RUNX: grep '@"\\01l_OBJC_METACLASS_RO_$_C" = internal global .*, section "__DATA, __objc_const", align 8' %t &&
+// RUNX: grep '@"\\01l_OBJC_METACLASS_RO_$_A" = private global .*, section "__DATA, __objc_const", align 8' %t &&
+// RUNX: grep '@"\\01l_OBJC_METACLASS_RO_$_C" = private global .*, section "__DATA, __objc_const", align 8' %t &&
// RUNX: grep '@"\\01l_OBJC_PROTOCOL_$_P" = weak hidden global .*, section "__DATA,__datacoal_nt,coalesced", align 8' %t &&
diff --git a/test/CodeGenObjC/objc-asm-attribute-neg-test.m b/test/CodeGenObjC/objc-asm-attribute-neg-test.m
new file mode 100644
index 000000000000..e9bef4cdb762
--- /dev/null
+++ b/test/CodeGenObjC/objc-asm-attribute-neg-test.m
@@ -0,0 +1,34 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
+// rdar://16462586
+
+__attribute__((objc_runtime_name("MySecretNamespace.Protocol")))
+@protocol Protocol
+@end
+
+__attribute__((objc_runtime_name("MySecretNamespace.Message")))
+@interface Message <Protocol> {
+__attribute__((objc_runtime_name("MySecretNamespace.Message"))) // expected-error {{'objc_runtime_name' attribute only applies to interface or protocol declarations}}
+ id MyIVAR;
+}
+__attribute__((objc_runtime_name("MySecretNamespace.Message")))
+@property int MyProperty; // expected-error {{prefix attribute must be followed by an interface or protocol}}}}
+
+- (int) getMyProperty __attribute__((objc_runtime_name("MySecretNamespace.Message"))); // expected-error {{'objc_runtime_name' attribute only applies to interface or protocol declarations}}
+
+- (void) setMyProperty : (int) arg __attribute__((objc_runtime_name("MySecretNamespace.Message"))); // expected-error {{'objc_runtime_name' attribute only applies to interface or protocol declarations}}
+
+@end
+
+__attribute__((objc_runtime_name("MySecretNamespace.ForwardClass")))
+@class ForwardClass; // expected-error {{prefix attribute must be followed by an interface or protocol}}
+
+__attribute__((objc_runtime_name("MySecretNamespace.ForwardProtocol")))
+@protocol ForwardProtocol;
+
+__attribute__((objc_runtime_name("MySecretNamespace.Message")))
+@implementation Message // expected-error {{prefix attribute must be followed by an interface or protocol}}
+__attribute__((objc_runtime_name("MySecretNamespace.Message")))
+- (id) MyMethod {
+ return MyIVAR;
+}
+@end
diff --git a/test/CodeGenObjC/objc-asm-attribute-test.m b/test/CodeGenObjC/objc-asm-attribute-test.m
new file mode 100644
index 000000000000..12903b522e54
--- /dev/null
+++ b/test/CodeGenObjC/objc-asm-attribute-test.m
@@ -0,0 +1,54 @@
+// RUN: %clang_cc1 -emit-llvm -triple x86_64-apple-darwin %s -o - | FileCheck %s
+// rdar://16462586
+
+__attribute__((objc_runtime_name("MySecretNamespace.Protocol")))
+@protocol Protocol
+- (void) MethodP;
++ (void) ClsMethodP;
+@end
+
+__attribute__((objc_runtime_name("MySecretNamespace.Protocol2")))
+@protocol Protocol2
+- (void) MethodP2;
++ (void) ClsMethodP2;
+@end
+
+__attribute__((objc_runtime_name("MySecretNamespace.Message")))
+@interface Message <Protocol, Protocol2> {
+ id MyIVAR;
+}
+@end
+
+@implementation Message
+- (id) MyMethod {
+ return MyIVAR;
+}
+
++ (id) MyClsMethod {
+ return 0;
+}
+
+- (void) MethodP{}
+- (void) MethodP2{}
+
++ (void) ClsMethodP {}
++ (void) ClsMethodP2 {}
+@end
+
+// rdar://16877359
+__attribute__((objc_runtime_name("foo")))
+@interface SLREarth
+- (instancetype)init;
++ (instancetype)alloc;
+@end
+
+id Test16877359() {
+ return [SLREarth alloc];
+}
+
+// CHECK: @"OBJC_IVAR_$_MySecretNamespace.Message.MyIVAR" = global i64
+// CHECK: @"OBJC_CLASS_$_MySecretNamespace.Message" = global %struct._class_t
+// CHECK: @"OBJC_METACLASS_$_MySecretNamespace.Message" = global %struct._class_t
+// CHECK: @"OBJC_CLASS_$_foo" = external global %struct._class_t
+// CHECK: define internal i8* @"\01-[Message MyMethod]"
+// CHECK: [[IVAR:%.*]] = load i64* @"OBJC_IVAR_$_MySecretNamespace.Message.MyIVAR"
diff --git a/test/CodeGenObjC/objc-read-weak-byref.m b/test/CodeGenObjC/objc-read-weak-byref.m
index 35b4de1cec2e..228f4770892f 100644
--- a/test/CodeGenObjC/objc-read-weak-byref.m
+++ b/test/CodeGenObjC/objc-read-weak-byref.m
@@ -1,8 +1,7 @@
-// REQUIRES: x86-registered-target,x86-64-registered-target
-// RUN: %clang_cc1 -fblocks -fobjc-gc -triple x86_64-apple-darwin -fobjc-runtime=macosx-fragile-10.5 -S %s -o %t-64.s
-// RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s
-// RUN: %clang_cc1 -fblocks -fobjc-gc -triple i386-apple-darwin -fobjc-runtime=macosx-fragile-10.5 -S %s -o %t-32.s
-// RUN: FileCheck -check-prefix CHECK-LP32 --input-file=%t-32.s %s
+// RUN: %clang_cc1 -fblocks -fobjc-gc -triple x86_64-apple-darwin -fobjc-runtime=macosx-fragile-10.5 -emit-llvm %s -o - | \
+// RUN: FileCheck %s
+// RUN: %clang_cc1 -fblocks -fobjc-gc -triple i386-apple-darwin -fobjc-runtime=macosx-fragile-10.5 -emit-llvm %s -o - | \
+// RUN: FileCheck %s
@interface NSObject
- copy;
@@ -19,8 +18,5 @@ int main() {
return 0;
}
-// CHECK-LP64: callq _objc_read_weak
-// CHECK-LP64: callq _objc_read_weak
-
-// CHECK-LP32: calll L_objc_read_weak
-// CHECK-LP32: calll L_objc_read_weak
+// CHECK: call i8* @objc_read_weak
+// CHECK: call i8* @objc_read_weak
diff --git a/test/CodeGenObjC/objc2-weak-block-call.m b/test/CodeGenObjC/objc2-weak-block-call.m
index 7c6881751dbe..e13cc7d53984 100644
--- a/test/CodeGenObjC/objc2-weak-block-call.m
+++ b/test/CodeGenObjC/objc2-weak-block-call.m
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -fblocks -fobjc-gc -triple x86_64-apple-darwin -fobjc-runtime=macosx-fragile-10.5 -emit-llvm %s -o - | FileCheck -check-prefix CHECK-LP64 %s
-// RUN: %clang_cc1 -fblocks -fobjc-gc -triple i386-apple-darwin -fobjc-runtime=macosx-fragile-10.5 -emit-llvm %s -o - | FileCheck -check-prefix CHECK-LP64 %s
+// RUN: %clang_cc1 -fblocks -fobjc-gc -triple i386-apple-darwin -fobjc-runtime=macosx-fragile-10.5 -emit-llvm %s -o - | FileCheck -check-prefix CHECK-LP32 %s
@interface MyView
- (void)MyView_sharedInit;
diff --git a/test/CodeGenObjC/objc2-weak-import-attribute.m b/test/CodeGenObjC/objc2-weak-import-attribute.m
index 201e24b9e5ec..6ee57467b227 100644
--- a/test/CodeGenObjC/objc2-weak-import-attribute.m
+++ b/test/CodeGenObjC/objc2-weak-import-attribute.m
@@ -45,4 +45,4 @@ __attribute__((weak_import)) @interface Root @end
@implementation Root @end
-// CHECK-NOT-X86-64: OBJC_METACLASS_$_Root" = extern_weak global
+// CHECK-X86-64-NOT: OBJC_METACLASS_$_Root" = extern_weak global
diff --git a/test/CodeGenObjC/optimize-ivar-offset-load.m b/test/CodeGenObjC/optimize-ivar-offset-load.m
new file mode 100644
index 000000000000..d34ac137587f
--- /dev/null
+++ b/test/CodeGenObjC/optimize-ivar-offset-load.m
@@ -0,0 +1,64 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -Os -emit-llvm %s -o - | FileCheck %s
+// rdar://16095748
+
+@interface NSObject
+@end
+
+@interface SampleClass : NSObject {
+ @public
+ int _value;
+}
++ (SampleClass*) new;
+@end
+
+@interface AppDelegate : NSObject
+@end
+
+extern void foo(int);
+
+@implementation AppDelegate
+- (void)application
+{
+ // Create set of objects in loop
+ for(int i = 0; i < 2; i++) {
+ SampleClass *sample = [SampleClass new];
+ foo (sample->_value);
+ }
+}
+@end
+// CHECK: [[IVAR:%.*]] = load i64* @"OBJC_IVAR_$_SampleClass._value", align 8
+// CHECK: [[THREE:%.*]] = bitcast [[ONE:%.*]]* [[CALL:%.*]] to i8*
+// CHECK: [[ADDPTR:%.*]] = getelementptr inbounds i8* [[THREE]], i64 [[IVAR]]
+// CHECK: [[FOUR:%.*]] = bitcast i8* [[ADDPTR]] to i32*
+// CHECK: [[FIVE:%.*]] = load i32* [[FOUR]], align 4
+// CHECK: tail call void @foo(i32 [[FIVE]])
+
+@implementation SampleClass
++ (SampleClass*) new { return 0; }
+- (void) SampleClassApplication
+{
+ // Create set of objects in loop
+ for(int i = 0; i < 2; i++) {
+ SampleClass *sample = [SampleClass new];
+ foo (sample->_value);
+ }
+}
+@end
+// CHECK: [[ZERO:%.*]] = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8, !invariant.load
+// CHECK: [[IVAR:%.*]] = load i64* @"OBJC_IVAR_$_SampleClass._value", align 8, !invariant.load
+
+@interface Sample : SampleClass @end
+
+@implementation Sample
+- (void) SampleApplication
+{
+ // Create set of objects in loop
+ for(int i = 0; i < 2; i++) {
+ SampleClass *sample = [SampleClass new];
+ foo (sample->_value);
+ }
+}
+@end
+// CHECK: [[ZERO:%.*]] = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_", align 8, !invariant.load
+// CHECK: [[IVAR:%.*]] = load i64* @"OBJC_IVAR_$_SampleClass._value", align 8, !invariant.load
+
diff --git a/test/CodeGenObjC/overloadable.m b/test/CodeGenObjC/overloadable.m
index 4fd1429f2827..0d55cd3f3a26 100644
--- a/test/CodeGenObjC/overloadable.m
+++ b/test/CodeGenObjC/overloadable.m
@@ -1,10 +1,12 @@
// rdar://6657613
-// RUN: %clang_cc1 -emit-llvm %s -o %t
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s
@class C;
-// RUN: grep _Z1fP11objc_object %t | count 1
+// CHECK: _Z1fP11objc_object
+// CHECK-NOT: _Z1fP11objc_object
void __attribute__((overloadable)) f(id c) { }
-// RUN: grep _Z1fP1C %t | count 1
+// CHECK: _Z1fP1C
+// CHECK-NOT: _Z1fP1C
void __attribute__((overloadable)) f(C *c) { }
diff --git a/test/CodeGenObjC/property-array-type.m b/test/CodeGenObjC/property-array-type.m
new file mode 100644
index 000000000000..6600fd0f5965
--- /dev/null
+++ b/test/CodeGenObjC/property-array-type.m
@@ -0,0 +1,30 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
+// rdar://15610943
+
+struct _GLKMatrix4
+{
+ float m[16];
+};
+typedef struct _GLKMatrix4 GLKMatrix4;
+
+@interface NSObject @end
+
+@interface MyProgram
+- (void)setTransform:(float[16])transform;
+@end
+
+@interface ViewController
+@property (nonatomic, assign) GLKMatrix4 transform;
+@end
+
+@implementation ViewController
+- (void)viewDidLoad {
+ MyProgram *program;
+ program.transform = self.transform.m;
+}
+@end
+
+// CHECK: [[M:%.*]] = getelementptr inbounds %struct._GLKMatrix4* [[TMP:%.*]], i32 0, i32 0
+// CHECK: [[ARRAYDECAY:%.*]] = getelementptr inbounds [16 x float]* [[M]], i32 0, i32 0
+// CHECK: [[SIX:%.*]] = load i8** @"\01L_OBJC_SELECTOR_REFERENCES
+// CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, float*)*)(i8* [[SEVEN:%.*]], i8* [[SIX]], float* [[ARRAYDECAY]])
diff --git a/test/CodeGenObjC/property-category-impl.m b/test/CodeGenObjC/property-category-impl.m
index 734f9a37a24c..765f1ada3019 100644
--- a/test/CodeGenObjC/property-category-impl.m
+++ b/test/CodeGenObjC/property-category-impl.m
@@ -15,6 +15,6 @@
@end
-// CHECK: l_OBJC_$_PROP_LIST_Foo_$_Category" = internal global
-// CHECK: l_OBJC_$_CATEGORY_Foo_$_Category" = internal global
+// CHECK: l_OBJC_$_PROP_LIST_Foo_$_Category" = private global
+// CHECK: l_OBJC_$_CATEGORY_Foo_$_Category" = private global
// CHECK: l_OBJC_$_PROP_LIST_Foo_$_Category
diff --git a/test/CodeGenObjC/property-dbg.m b/test/CodeGenObjC/property-dbg.m
index 42ab6110541d..e0cac9850f25 100644
--- a/test/CodeGenObjC/property-dbg.m
+++ b/test/CodeGenObjC/property-dbg.m
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -S -g -masm-verbose -x objective-c < %s | grep DW_AT_name
+// FIXME: Check IR rather than asm, then triple is not needed.
+// RUN: %clang_cc1 -triple %itanium_abi_triple -S -g -masm-verbose -x objective-c < %s | grep DW_AT_name
@interface Foo {
int i;
}
diff --git a/test/CodeGenObjC/property-list-in-class.m b/test/CodeGenObjC/property-list-in-class.m
index e8014855af7e..2f92ca78b976 100644
--- a/test/CodeGenObjC/property-list-in-class.m
+++ b/test/CodeGenObjC/property-list-in-class.m
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck %s
-// CHECK: l_OBJC_$_PROP_LIST_C2" = internal global { i32, i32, [3 x %struct._prop_t] } { i32 16, i32 3
+// CHECK: l_OBJC_$_PROP_LIST_C2" = private global { i32, i32, [3 x %struct._prop_t] } { i32 16, i32 3
@protocol P
@property int i;
diff --git a/test/CodeGenObjC/property-section-attribute.m b/test/CodeGenObjC/property-section-attribute.m
new file mode 100644
index 000000000000..5ba064c6126f
--- /dev/null
+++ b/test/CodeGenObjC/property-section-attribute.m
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
+// rdar://15450637.
+
+@interface NSObject @end
+
+@interface Foo : NSObject
+@property int p __attribute__((section("__TEXT,foo")));
+@end
+
+@implementation Foo @end
+
+// CHECK: define internal i32 @"\01-[Foo p]"({{.*}} section "__TEXT,foo" {
+// CHECK: define internal void @"\01-[Foo setP:]"({{.*}} section "__TEXT,foo" {
diff --git a/test/CodeGenObjC/protocol-in-extended-class.m b/test/CodeGenObjC/protocol-in-extended-class.m
index a5fb80eca4b9..49b290133afa 100644
--- a/test/CodeGenObjC/protocol-in-extended-class.m
+++ b/test/CodeGenObjC/protocol-in-extended-class.m
@@ -1,4 +1,4 @@
-// REQUIRES: x86-registered-target,x86-64-registered-target
+// REQUIRES: x86-registered-target
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -S %s -o %t-64.s
// RUN: FileCheck -check-prefix CHECK-LP64 --input-file=%t-64.s %s
// RUN: %clang_cc1 -triple i386-apple-darwin -fobjc-runtime=macosx-fragile-10.5 -S %s -o %t-32.s
diff --git a/test/CodeGenObjC/reorder-synthesized-ivars.m b/test/CodeGenObjC/reorder-synthesized-ivars.m
index 0f8cf6a3ea87..8faafff2cdac 100644
--- a/test/CodeGenObjC/reorder-synthesized-ivars.m
+++ b/test/CodeGenObjC/reorder-synthesized-ivars.m
@@ -38,21 +38,21 @@ typedef signed char BOOL;
}
@end
-// CHECK: @"{{.*}}" = internal global [10 x i8] c"_boolean1
-// CHECK-NEXT: @"{{.*}}" = internal global [10 x i8] c"_boolean2
-// CHECK-NEXT: @"{{.*}}" = internal global [10 x i8] c"_boolean3
-// CHECK-NEXT: @"{{.*}}" = internal global [10 x i8] c"_boolean4
-// CHECK-NEXT: @"{{.*}}" = internal global [10 x i8] c"_boolean5
-// CHECK-NEXT: @"{{.*}}" = internal global [10 x i8] c"_boolean6
-// CHECK-NEXT: @"{{.*}}" = internal global [10 x i8] c"_boolean7
-// CHECK-NEXT: @"{{.*}}" = internal global [10 x i8] c"_boolean8
-// CHECK-NEXT: @"{{.*}}" = internal global [10 x i8] c"_boolean9
-// CHECK-NEXT: @"{{.*}}" = internal global [9 x i8] c"_object1
-// CHECK-NEXT: @"{{.*}}" = internal global [9 x i8] c"_object2
-// CHECK-NEXT: @"{{.*}}" = internal global [9 x i8] c"_object3
-// CHECK-NEXT: @"{{.*}}" = internal global [9 x i8] c"_object4
-// CHECK-NEXT: @"{{.*}}" = internal global [9 x i8] c"_object5
-// CHECK-NEXT: @"{{.*}}" = internal global [9 x i8] c"_object6
-// CHECK-NEXT: @"{{.*}}" = internal global [9 x i8] c"_object7
-// CHECK-NEXT: @"{{.*}}" = internal global [9 x i8] c"_object8
-// CHECK-NEXT: @"{{.*}}" = internal global [9 x i8] c"_object9
+// CHECK: @"{{.*}}" = private global [10 x i8] c"_boolean1
+// CHECK-NEXT: @"{{.*}}" = private global [10 x i8] c"_boolean2
+// CHECK-NEXT: @"{{.*}}" = private global [10 x i8] c"_boolean3
+// CHECK-NEXT: @"{{.*}}" = private global [10 x i8] c"_boolean4
+// CHECK-NEXT: @"{{.*}}" = private global [10 x i8] c"_boolean5
+// CHECK-NEXT: @"{{.*}}" = private global [10 x i8] c"_boolean6
+// CHECK-NEXT: @"{{.*}}" = private global [10 x i8] c"_boolean7
+// CHECK-NEXT: @"{{.*}}" = private global [10 x i8] c"_boolean8
+// CHECK-NEXT: @"{{.*}}" = private global [10 x i8] c"_boolean9
+// CHECK-NEXT: @"{{.*}}" = private global [9 x i8] c"_object1
+// CHECK-NEXT: @"{{.*}}" = private global [9 x i8] c"_object2
+// CHECK-NEXT: @"{{.*}}" = private global [9 x i8] c"_object3
+// CHECK-NEXT: @"{{.*}}" = private global [9 x i8] c"_object4
+// CHECK-NEXT: @"{{.*}}" = private global [9 x i8] c"_object5
+// CHECK-NEXT: @"{{.*}}" = private global [9 x i8] c"_object6
+// CHECK-NEXT: @"{{.*}}" = private global [9 x i8] c"_object7
+// CHECK-NEXT: @"{{.*}}" = private global [9 x i8] c"_object8
+// CHECK-NEXT: @"{{.*}}" = private global [9 x i8] c"_object9
diff --git a/test/CodeGenObjC/return-objc-object.mm b/test/CodeGenObjC/return-objc-object.mm
index 95cce23a8682..d756c4b78dba 100644
--- a/test/CodeGenObjC/return-objc-object.mm
+++ b/test/CodeGenObjC/return-objc-object.mm
@@ -15,5 +15,5 @@ void call_once() {
f();
f1();
}
-// CHECK: call %0* @_Z1fv()
-// CHECK: call %0* @_Z2f1v()
+// CHECK: call dereferenceable({{[0-9]+}}) %0* @_Z1fv()
+// CHECK: call dereferenceable({{[0-9]+}}) %0* @_Z2f1v()
diff --git a/test/CodeGenObjC/stret-1.m b/test/CodeGenObjC/stret-1.m
new file mode 100644
index 000000000000..f45d1219da65
--- /dev/null
+++ b/test/CodeGenObjC/stret-1.m
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -fblocks -triple arm64-apple-darwin %s -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-ARM64
+// rdar://12416433
+
+struct stret { int x[100]; };
+struct stret zero;
+struct stret one = {{1}};
+
+@interface Test @end
+
+@implementation Test
++(struct stret) method { return one; }
+@end
+
+int main(int argc, const char **argv)
+{
+ struct stret st2 = one;
+ if (argc) st2 = [(id)(argc&~255) method];
+}
+
+// CHECK-ARM64: call void @llvm.memset.p0i8.i64(i8* [[T0:%.*]], i8 0, i64 400, i32 4, i1 false)
diff --git a/test/CodeGenObjC/stret.m b/test/CodeGenObjC/stret.m
new file mode 100644
index 000000000000..beb6f302989e
--- /dev/null
+++ b/test/CodeGenObjC/stret.m
@@ -0,0 +1,22 @@
+// RUN: %clang_cc1 -fblocks -triple x86_64-apple-darwin9 %s -emit-llvm -o - | FileCheck %s -check-prefix=X86
+// RUN: %clang_cc1 -fblocks -triple arm-apple-darwin %s -emit-llvm -o - | FileCheck %s -check-prefix=ARM
+// RUN: %clang_cc1 -fblocks -triple arm64-apple-darwin %s -emit-llvm -o - | FileCheck %s -check-prefix=ARM64
+
+// <rdar://problem/9757015>: Don't use 'stret' variants on ARM64.
+
+// X86: @main
+// X86: @objc_msgSend_stret
+
+// ARM: @main
+// ARM: @objc_msgSend_stret
+
+// ARM64: @main
+// ARM64-NOT: @objc_msgSend_stret
+
+struct st { int i[1000]; };
+@interface Test
++(struct st)method;
+@end
+int main() {
+ [Test method];
+}
diff --git a/test/CodeGenObjC/try.m b/test/CodeGenObjC/try.m
index 56b8e646d983..4168cb2209f2 100644
--- a/test/CodeGenObjC/try.m
+++ b/test/CodeGenObjC/try.m
@@ -1,4 +1,4 @@
-// REQUIRES: x86-registered-target,x86-64-registered-target
+// REQUIRES: x86-registered-target
// RUN: %clang_cc1 %s -fobjc-exceptions -S -o - -triple=i686-apple-darwin9
// RUN: %clang_cc1 %s -fobjc-exceptions -S -o - -triple=x86_64-apple-darwin9
diff --git a/test/CodeGenObjC/weak-metaclass-visibility.m b/test/CodeGenObjC/weak-metaclass-visibility.m
new file mode 100644
index 000000000000..d174bdb08ef0
--- /dev/null
+++ b/test/CodeGenObjC/weak-metaclass-visibility.m
@@ -0,0 +1,60 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple armv7-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple arm64-apple-ios -emit-llvm -o - %s | FileCheck %s
+// rdar://16206443
+
+@interface NSObject
+- (void) finalize;
++ (void) class;
+@end
+
+__attribute__((availability(macosx,introduced=9876.5)))
+@interface MyClass : NSObject
++ (void)someClassMethod;
+- (void)someInstanceMethod;
+@end
+
+@implementation MyClass
++ (void)someClassMethod {
+}
+
+- (void)someInstanceMethod {
+ [MyClass someClassMethod];
+ [super finalize];
+}
+@end
+
+void kit()
+{
+ MyClass *wrapper = [MyClass alloc];
+}
+
+// CHECK: @"OBJC_CLASS_$_MyClass" = global %struct._class_t
+// CHECK: @"OBJC_METACLASS_$_NSObject" = external global %struct._class_t
+// CHECK: @"OBJC_METACLASS_$_MyClass" = global %struct._class_t
+// CHECK: @"OBJC_CLASS_$_NSObject" = external global %struct._class_t
+
+// rdar://16529125
+__attribute__((weak_import))
+@interface NSURLQueryItem : NSObject
+@end
+
+@implementation NSURLQueryItem (hax)
++(void)classmethod { [super class]; }
+@end
+
+// CHECK: @"OBJC_METACLASS_$_NSURLQueryItem" = extern_weak global
+// CHECK: @"OBJC_CLASS_$_NSURLQueryItem" = extern_weak global
+
+// rdar://17633301
+__attribute__((visibility("default"))) __attribute__((availability(ios,introduced=9876.5)))
+@interface AVScheduledAudioParameters @end
+
+@interface XXXX : AVScheduledAudioParameters
+@end
+
+@implementation AVScheduledAudioParameters @end
+@implementation XXXX @end
+
+// CHECK: @"OBJC_CLASS_$_AVScheduledAudioParameters" = global %struct._class_t
+// CHECK: @"OBJC_METACLASS_$_AVScheduledAudioParameters" = global %struct._class_t
diff --git a/test/CodeGenObjCXX/arc-blocks.mm b/test/CodeGenObjCXX/arc-blocks.mm
index ebb9d21c61f6..2695b4dbbd8c 100644
--- a/test/CodeGenObjCXX/arc-blocks.mm
+++ b/test/CodeGenObjCXX/arc-blocks.mm
@@ -2,7 +2,7 @@
// CHECK: [[A:.*]] = type { i64, [10 x i8*] }
-// CHECK: [[LAYOUT0:@.*]] = internal global [3 x i8] c" 9\00"
+// CHECK: [[LAYOUT0:@.*]] = private global [3 x i8] c" 9\00"
// rdar://13045269
// If a __block variable requires extended layout information *and*
@@ -38,7 +38,7 @@ namespace test0 {
// CHECK-NEXT: load
// CHECK-NEXT: [[T2:%.*]] = bitcast i8* {{.*}} to [[BYREF_A]]*
// CHECK-NEXT: [[T3:%.*]] = getelementptr inbounds [[BYREF_A]]* [[T2]], i32 0, i32 7
- // CHECK-NEXT: call void @_ZN5test01AC1ERKS0_([[A]]* [[T1]], [[A]]* [[T3]])
+ // CHECK-NEXT: call void @_ZN5test01AC1ERKS0_([[A]]* [[T1]], [[A]]* dereferenceable({{[0-9]+}}) [[T3]])
// CHECK-NEXT: ret void
// CHECK: define internal void [[DISPOSE_HELPER]](
diff --git a/test/CodeGenObjCXX/arc-cxx11-member-init.mm b/test/CodeGenObjCXX/arc-cxx11-member-init.mm
new file mode 100644
index 000000000000..213e7a1b7b50
--- /dev/null
+++ b/test/CodeGenObjCXX/arc-cxx11-member-init.mm
@@ -0,0 +1,32 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-arc -std=c++11 -emit-llvm -o - %s | FileCheck %s
+// rdar://16299964
+
+@interface NSObject
++ (id)new;
+@end
+
+@interface NSMutableDictionary : NSObject
+@end
+
+class XClipboardDataSet
+{
+ NSMutableDictionary* mClipData = [NSMutableDictionary new];
+};
+
+@interface AppDelegate @end
+
+@implementation AppDelegate
+- (void)applicationDidFinishLaunching
+{
+ XClipboardDataSet clip;
+}
+@end
+
+// CHECK: [[mClipData:%.*]] = getelementptr inbounds %class.XClipboardDataSet*
+// CHECK: [[ZERO:%.*]] = load %struct._class_t** @"\01L_OBJC_CLASSLIST_REFERENCES_$_"
+// CHECK: [[ONE:%.*]] = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_"
+// CHECK: [[TWO:%.*]] = bitcast %struct._class_t* [[ZERO]] to i8*
+// CHECK: [[CALL:%.*]] = call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* [[TWO]], i8* [[ONE]])
+// CHECK: [[THREE:%.*]] = bitcast i8* [[CALL]] to [[T:%.*]]*
+// CHECK: store [[T]]* [[THREE]], [[T]]** [[mClipData]], align 8
+
diff --git a/test/CodeGenObjCXX/arc-globals.mm b/test/CodeGenObjCXX/arc-globals.mm
index 84ea180bca7d..8ba3fb8f58c5 100644
--- a/test/CodeGenObjCXX/arc-globals.mm
+++ b/test/CodeGenObjCXX/arc-globals.mm
@@ -19,7 +19,7 @@ id global_obj = getObject();
// CHECK-NEXT: ret void
id global_obj2 = getObject();
-// CHECK-LABEL: define internal void @_GLOBAL__I_a
+// CHECK-LABEL: define internal void @_GLOBAL__sub_I_arc_globals.mm
// CHECK: call i8* @objc_autoreleasePoolPush()
// CHECK-NEXT: call void @__cxx_global_var_init
// CHECK-NEXT: call void @__cxx_global_var_init1
diff --git a/test/CodeGenObjCXX/arc-mangle.mm b/test/CodeGenObjCXX/arc-mangle.mm
index 10c4f68451f8..b921a7f935bc 100644
--- a/test/CodeGenObjCXX/arc-mangle.mm
+++ b/test/CodeGenObjCXX/arc-mangle.mm
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fobjc-arc -fobjc-runtime-has-weak -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -fobjc-arc -fobjc-runtime-has-weak -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
// CHECK-LABEL: define void @_Z1fPU8__strongP11objc_object(i8**)
void f(__strong id *) {}
diff --git a/test/CodeGenObjCXX/arc-move.mm b/test/CodeGenObjCXX/arc-move.mm
index 0a8286ded438..d7b9f55d5fdf 100644
--- a/test/CodeGenObjCXX/arc-move.mm
+++ b/test/CodeGenObjCXX/arc-move.mm
@@ -33,7 +33,7 @@ typename remove_reference<T>::type&& move(T &&x) {
// CHECK-LABEL: define void @_Z12library_moveRU8__strongP11objc_objectS2_
void library_move(__strong id &x, __strong id &y) {
- // CHECK: call i8** @_Z4moveIRU8__strongP11objc_objectEON16remove_referenceIT_E4typeEOS5_
+ // CHECK: call dereferenceable({{[0-9]+}}) i8** @_Z4moveIRU8__strongP11objc_objectEON16remove_referenceIT_E4typeEOS5_
// CHECK: load i8**
// CHECK: store i8* null, i8**
// CHECK: load i8***
@@ -46,7 +46,7 @@ void library_move(__strong id &x, __strong id &y) {
// CHECK-LABEL: define void @_Z12library_moveRU8__strongP11objc_object
void library_move(__strong id &y) {
- // CHECK: [[Y:%[a-zA-Z0-9]+]] = call i8** @_Z4moveIRU8__strongP11objc_objectEON16remove_referenceIT_E4typeEOS5_
+ // CHECK: [[Y:%[a-zA-Z0-9]+]] = call dereferenceable({{[0-9]+}}) i8** @_Z4moveIRU8__strongP11objc_objectEON16remove_referenceIT_E4typeEOS5_
// Load the object
// CHECK-NEXT: [[OBJ:%[a-zA-Z0-9]+]] = load i8** [[Y]]
// Null out y
@@ -65,7 +65,7 @@ void library_move(__strong id &y) {
// CHECK-LABEL: define void @_Z10const_moveRKU8__strongP11objc_object(
void const_move(const __strong id &x) {
// CHECK: [[Y:%.*]] = alloca i8*,
- // CHECK: [[X:%.*]] = call i8** @_Z4moveIRKU8__strongP11objc_objectEON16remove_referenceIT_E4typeEOS5_(
+ // CHECK: [[X:%.*]] = call dereferenceable({{[0-9]+}}) i8** @_Z4moveIRKU8__strongP11objc_objectEON16remove_referenceIT_E4typeEOS5_(
// CHECK-NEXT: [[T0:%.*]] = load i8** [[X]]
// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retain(i8* [[T0]])
// CHECK-NEXT: store i8* [[T1]], i8** [[Y]]
diff --git a/test/CodeGenObjCXX/arc-special-member-functions.mm b/test/CodeGenObjCXX/arc-special-member-functions.mm
index 49077ffec494..8b002d5b4fbe 100644
--- a/test/CodeGenObjCXX/arc-special-member-functions.mm
+++ b/test/CodeGenObjCXX/arc-special-member-functions.mm
@@ -91,7 +91,7 @@ void test_ObjCBlockMember_copy_assign(ObjCBlockMember m1, ObjCBlockMember m2) {
}
// Implicitly-generated copy assignment operator for ObjCBlockMember
-// CHECK: define linkonce_odr {{%.*}}* @_ZN15ObjCBlockMemberaSERKS_(
+// CHECK: define linkonce_odr dereferenceable({{[0-9]+}}) {{%.*}}* @_ZN15ObjCBlockMemberaSERKS_(
// CHECK: [[T0:%.*]] = getelementptr inbounds [[T:%.*]]* {{%.*}}, i32 0, i32 0
// CHECK-NEXT: [[T1:%.*]] = load i32 (i32)** [[T0]], align 8
// CHECK-NEXT: [[T2:%.*]] = bitcast i32 (i32)* [[T1]] to i8*
diff --git a/test/CodeGenObjCXX/encode.mm b/test/CodeGenObjCXX/encode.mm
index 075d7909d596..e0171efbed8a 100644
--- a/test/CodeGenObjCXX/encode.mm
+++ b/test/CodeGenObjCXX/encode.mm
@@ -213,7 +213,7 @@ public:
dynamic_class dynamic_class_ivar;
}
@end
-// CHECK: internal global [41 x i8] c"{dynamic_class=\22_vptr$dynamic_class\22^^?}\00"
+// CHECK: private global [41 x i8] c"{dynamic_class=\22_vptr$dynamic_class\22^^?}\00"
namespace PR17142 {
struct A { virtual ~A(); };
diff --git a/test/CodeGenObjCXX/externally-initialized-selectors.mm b/test/CodeGenObjCXX/externally-initialized-selectors.mm
index 87a7c04cf718..0b7c24eadd84 100644
--- a/test/CodeGenObjCXX/externally-initialized-selectors.mm
+++ b/test/CodeGenObjCXX/externally-initialized-selectors.mm
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -cc1 -fobjc-runtime=macosx-fragile-10.5 -o - -emit-llvm %s | FileCheck %s
-// RUN: %clang_cc1 -cc1 -o - -emit-llvm %s | FileCheck %s
+// RUN: %clang_cc1 -fobjc-runtime=macosx-fragile-10.5 -o - -emit-llvm %s | FileCheck %s
+// RUN: %clang_cc1 -o - -emit-llvm %s | FileCheck %s
-// CHECK: @"\01L_OBJC_SELECTOR_REFERENCES_" = internal externally_initialized global
+// CHECK: @"\01L_OBJC_SELECTOR_REFERENCES_" = private externally_initialized global
void test(id x) {
[x doSomething];
diff --git a/test/CodeGenObjCXX/implicit-copy-assign-operator.mm b/test/CodeGenObjCXX/implicit-copy-assign-operator.mm
index 88837c1713ba..01d81126b07b 100644
--- a/test/CodeGenObjCXX/implicit-copy-assign-operator.mm
+++ b/test/CodeGenObjCXX/implicit-copy-assign-operator.mm
@@ -43,7 +43,7 @@ void test_D(D d1, D d2) {
d1 = d2;
}
-// CHECK-OBJ-LABEL: define linkonce_odr %struct.D* @_ZN1DaSERS_
+// CHECK-OBJ-LABEL: define linkonce_odr dereferenceable({{[0-9]+}}) %struct.D* @_ZN1DaSERS_
// CHECK-OBJ: {{call.*_ZN1AaSERS_}}
// CHECK-OBJ: {{call.*_ZN1BaSERS_}}
// CHECK-OBJ: {{call.*_ZN1CaSERKS_}}
diff --git a/test/CodeGenObjCXX/implicit-copy-constructor.mm b/test/CodeGenObjCXX/implicit-copy-constructor.mm
index 6dbd39e15223..6c56616f04cf 100644
--- a/test/CodeGenObjCXX/implicit-copy-constructor.mm
+++ b/test/CodeGenObjCXX/implicit-copy-constructor.mm
@@ -41,7 +41,7 @@ void f(D d) {
D d2(d);
}
-// CHECK-LABEL: define linkonce_odr void @_ZN1DC1ERS_(%struct.D* %this, %struct.D*) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN1DC1ERS_(%struct.D* %this, %struct.D* dereferenceable({{[0-9]+}})) unnamed_addr
// CHECK: call void @_ZN1AC1Ev
// CHECK: call void @_ZN1CC2ERS_1A
// CHECK: call void @_ZN1AD1Ev
diff --git a/test/CodeGenObjCXX/lambda-expressions.mm b/test/CodeGenObjCXX/lambda-expressions.mm
index 2468eb1e71a4..435f805237c4 100644
--- a/test/CodeGenObjCXX/lambda-expressions.mm
+++ b/test/CodeGenObjCXX/lambda-expressions.mm
@@ -4,8 +4,8 @@
typedef int (^fp)();
fp f() { auto x = []{ return 3; }; return x; }
-// MRC: @"\01L_OBJC_METH_VAR_NAME{{.*}}" = internal global [5 x i8] c"copy\00"
-// MRC: @"\01L_OBJC_METH_VAR_NAME{{.*}}" = internal global [12 x i8] c"autorelease\00"
+// MRC: @"\01L_OBJC_METH_VAR_NAME{{.*}}" = private global [5 x i8] c"copy\00"
+// MRC: @"\01L_OBJC_METH_VAR_NAME{{.*}}" = private global [12 x i8] c"autorelease\00"
// MRC-LABEL: define i32 ()* @_Z1fv(
// MRC-LABEL: define internal i32 ()* @"_ZZ1fvENK3$_0cvU13block_pointerFivEEv"
// MRC: store i8* bitcast (i8** @_NSConcreteStackBlock to i8*)
diff --git a/test/CodeGenObjCXX/lvalue-reference-getter.mm b/test/CodeGenObjCXX/lvalue-reference-getter.mm
index 83d3b9320b29..5205a7c378ba 100644
--- a/test/CodeGenObjCXX/lvalue-reference-getter.mm
+++ b/test/CodeGenObjCXX/lvalue-reference-getter.mm
@@ -24,5 +24,5 @@ static SetSection gSetSection;
// CHECK: [[SELF:%.*]] = alloca [[T6:%.*]]*, align
// CHECK: [[T0:%.*]] = load {{.*}}* [[SELF]], align
// CHECK: [[T1:%.*]] = load {{.*}}* @"\01L_OBJC_SELECTOR_REFERENCES_"
-// CHECK: [[C:%.*]] = call %struct.SetSection* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
-// CHECK: call i32* @_ZN10SetSection2atEi(%struct.SetSection* [[C]]
+// CHECK: [[C:%.*]] = call dereferenceable({{[0-9]+}}) %struct.SetSection* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
+// CHECK: call dereferenceable({{[0-9]+}}) i32* @_ZN10SetSection2atEi(%struct.SetSection* [[C]]
diff --git a/test/CodeGenObjCXX/message-reference.mm b/test/CodeGenObjCXX/message-reference.mm
index 0d1bbc7bb0d4..6b341f866ba7 100644
--- a/test/CodeGenObjCXX/message-reference.mm
+++ b/test/CodeGenObjCXX/message-reference.mm
@@ -15,6 +15,6 @@
}
@end
-// CHECK: [[T:%.*]] = call i32* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
+// CHECK: [[T:%.*]] = call dereferenceable({{[0-9]+}}) i32* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
// CHECK: [[U:%.*]] = load i32* [[T]]
// CHECK [[V:%.*]] = icmp eq i32 [[U]], 0
diff --git a/test/CodeGenObjCXX/microsoft-abi-arc-param-order.mm b/test/CodeGenObjCXX/microsoft-abi-arc-param-order.mm
new file mode 100644
index 000000000000..0b01b27fa799
--- /dev/null
+++ b/test/CodeGenObjCXX/microsoft-abi-arc-param-order.mm
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -mconstructor-aliases -fobjc-arc -triple i686-pc-win32 -emit-llvm -o - %s | FileCheck %s
+
+struct A {
+ A();
+ A(const A &);
+ ~A();
+ int a;
+};
+
+// Verify that we destruct things from left to right in the MS C++ ABI: a, b, c, d.
+//
+// CHECK-LABEL: define void @"\01?test_arc_order@@YAXUA@@PAAAPAUobjc_object@@01@Z"
+// CHECK: (<{ %struct.A, i8*, %struct.A, i8* }>* inalloca)
+void test_arc_order(A a, id __attribute__((ns_consumed)) b , A c, id __attribute__((ns_consumed)) d) {
+ // CHECK: call x86_thiscallcc void @"\01??1A@@QAE@XZ"(%struct.A* %{{.*}})
+ // CHECK: call void @objc_storeStrong(i8** %{{.*}}, i8* null)
+ // CHECK: call x86_thiscallcc void @"\01??1A@@QAE@XZ"(%struct.A* %{{.*}})
+ // CHECK: call void @objc_storeStrong(i8** %{{.*}}, i8* null)
+ // CHECK: ret void
+}
diff --git a/test/CodeGenObjCXX/property-dot-reference.mm b/test/CodeGenObjCXX/property-dot-reference.mm
index be6742aef25f..8f3b29da47c5 100644
--- a/test/CodeGenObjCXX/property-dot-reference.mm
+++ b/test/CodeGenObjCXX/property-dot-reference.mm
@@ -11,7 +11,7 @@ void GetURL() const;
@implementation TNodeIconAndNameCell
- (const TFENode&) node {
-// CHECK: call %struct.TFENode* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
+// CHECK: call dereferenceable({{[0-9]+}}) %struct.TFENode* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
// CHECK-NEXT: call void @_ZNK7TFENode6GetURLEv(%struct.TFENode* %{{.*}})
self.node.GetURL();
} // expected-warning {{control reaches end of non-void function}}
@@ -27,12 +27,12 @@ void f0(const X &parent);
- (const X&) target;
@end
void f1(A *a) {
-// CHECK: [[PRP:%.*]] = call %struct.X* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
-// CHECK-NEXT:call void @_Z2f0RK1X(%struct.X* [[PRP]])
+// CHECK: [[PRP:%.*]] = call dereferenceable({{[0-9]+}}) %struct.X* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
+// CHECK-NEXT:call void @_Z2f0RK1X(%struct.X* dereferenceable({{[0-9]+}}) [[PRP]])
f0(a.target);
-// CHECK: [[MSG:%.*]] = call %struct.X* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
-// CHECK-NEXT:call void @_Z2f0RK1X(%struct.X* [[MSG]])
+// CHECK: [[MSG:%.*]] = call dereferenceable({{[0-9]+}}) %struct.X* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
+// CHECK-NEXT:call void @_Z2f0RK1X(%struct.X* dereferenceable({{[0-9]+}}) [[MSG]])
f0([a target]);
}
diff --git a/test/CodeGenObjCXX/property-lvalue-capture.mm b/test/CodeGenObjCXX/property-lvalue-capture.mm
new file mode 100644
index 000000000000..690ffa96b52a
--- /dev/null
+++ b/test/CodeGenObjCXX/property-lvalue-capture.mm
@@ -0,0 +1,53 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
+// rdar://15118128
+
+template <typename T> struct Quad2 {
+ Quad2() {}
+};
+
+typedef Quad2<double> Quad2d;
+
+@interface Root @end
+
+@interface PAGeometryFrame
+- (const Quad2d &)quad;
+- (void)setQuad:(const Quad2d &)quad;
+@end
+
+@interface PA2DScaleTransform : Root
+@end
+
+@implementation PA2DScaleTransform
+- (void)transformFrame:(PAGeometryFrame *)frame {
+ PAGeometryFrame *result;
+ result.quad = frame.quad;
+}
+@end
+
+// CHECK: [[TWO:%.*]] = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_", !invariant.load ![[MD_NUM:[0-9]+]]
+// CHECK: [[THREE:%.*]] = bitcast [[ONET:%.*]]* [[ONE:%.*]] to i8*
+// CHECK: [[CALL:%.*]] = call nonnull %struct.Quad2* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to %struct.Quad2* (i8*, i8*)*)(i8* [[THREE]], i8* [[TWO]])
+// CHECK: [[FOUR:%.*]] = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_2", !invariant.load ![[MD_NUM]]
+// CHECK: [[FIVE:%.*]] = bitcast [[ONET]]* [[ZERO:%.*]] to i8*
+// CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, %struct.Quad2*)*)(i8* [[FIVE]], i8* [[FOUR]], %struct.Quad2* nonnull [[CALL]])
+
+
+struct A {
+ void *ptr;
+ A();
+ A(const A &);
+ ~A();
+};
+
+@interface C
+- (void) setProp: (const A&) value;
+@end
+void test(C *c, const A &a) {
+ const A &result = c.prop = a;
+}
+
+// CHECK: [[ONE1:%.*]] = load %struct.A** [[AADDR:%.*]], align 8
+// CHECK: [[TWO1:%.*]] = load i8** @"\01L_OBJC_SELECTOR_REFERENCES_5", !invariant.load ![[MD_NUM]]
+// CHECK: [[THREE1:%.*]] = bitcast [[TWOT:%.*]]* [[ZERO1:%.*]] to i8*
+// CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, %struct.A*)*)(i8* [[THREE1]], i8* [[TWO1]], %struct.A* dereferenceable({{[0-9]+}}) [[ONE1]])
+// CHECK: store %struct.A* [[ONE1]], %struct.A** [[RESULT:%.*]], align 8
diff --git a/test/CodeGenObjCXX/property-object-reference-2.mm b/test/CodeGenObjCXX/property-object-reference-2.mm
index 542967c48e65..20949f71af33 100644
--- a/test/CodeGenObjCXX/property-object-reference-2.mm
+++ b/test/CodeGenObjCXX/property-object-reference-2.mm
@@ -33,7 +33,7 @@ struct TCPPObject
// CHECK: [[TWO:%.*]] = load %struct.TCPPObject** [[ADDR:%.*]], align 8
// CHECK: [[THREE:%.*]] = load %struct.TCPPObject** [[ADDR1:%.*]], align 8
// CHECK: [[CALL:%.*]] = call i32 @_Z7DEFAULTv()
-// CHECK: call void @_ZN10TCPPObjectC1ERKS_i(%struct.TCPPObject* [[TWO]], %struct.TCPPObject* [[THREE]], i32 [[CALL]])
+// CHECK: call void @_ZN10TCPPObjectC1ERKS_i(%struct.TCPPObject* [[TWO]], %struct.TCPPObject* dereferenceable({{[0-9]+}}) [[THREE]], i32 [[CALL]])
// CHECK: ret void
// CHECK: define internal void @"\01-[MyDocument MyProperty]"(
@@ -46,7 +46,7 @@ struct TCPPObject
// CHECK-LABEL: define internal void @__assign_helper_atomic_property_(
// CHECK: [[TWO:%.*]] = load %struct.TCPPObject** [[ADDR:%.*]], align 8
// CHECK: [[THREE:%.*]] = load %struct.TCPPObject** [[ADDR1:%.*]], align 8
-// CHECK: [[CALL:%.*]] = call %struct.TCPPObject* @_ZN10TCPPObjectaSERKS_(%struct.TCPPObject* [[TWO]], %struct.TCPPObject* [[THREE]])
+// CHECK: [[CALL:%.*]] = call dereferenceable({{[0-9]+}}) %struct.TCPPObject* @_ZN10TCPPObjectaSERKS_(%struct.TCPPObject* [[TWO]], %struct.TCPPObject* dereferenceable({{[0-9]+}}) [[THREE]])
// CHECK: ret void
// CHECK: define internal void @"\01-[MyDocument setMyProperty:]"(
diff --git a/test/CodeGenObjCXX/property-objects.mm b/test/CodeGenObjCXX/property-objects.mm
index 88e992c81a4b..c79c280eddb1 100644
--- a/test/CodeGenObjCXX/property-objects.mm
+++ b/test/CodeGenObjCXX/property-objects.mm
@@ -32,7 +32,7 @@ struct CGRect {
@synthesize frame;
// CHECK: define internal void @"\01-[I setPosition:]"
-// CHECK: call %class.S* @_ZN1SaSERKS_
+// CHECK: call dereferenceable({{[0-9]+}}) %class.S* @_ZN1SaSERKS_
// CHECK-NEXT: ret void
- (void)setFrame:(CGRect)frameRect {}
@@ -55,7 +55,7 @@ struct CGRect {
@end
// CHECK-LABEL: define i32 @main
-// CHECK: call void @_ZN1SC1ERKS_(%class.S* [[AGGTMP:%[a-zA-Z0-9\.]+]], %class.S* {{%[a-zA-Z0-9\.]+}})
+// CHECK: call void @_ZN1SC1ERKS_(%class.S* [[AGGTMP:%[a-zA-Z0-9\.]+]], %class.S* dereferenceable({{[0-9]+}}) {{%[a-zA-Z0-9\.]+}})
// CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, %class.S*)*)(i8* {{%[a-zA-Z0-9\.]+}}, i8* {{%[a-zA-Z0-9\.]+}}, %class.S* [[AGGTMP]])
// CHECK-NEXT: ret i32 0
int main() {
@@ -68,7 +68,7 @@ int main() {
// rdar://8379892
// CHECK-LABEL: define void @_Z1fP1A
// CHECK: call void @_ZN1XC1Ev(%struct.X* [[LVTEMP:%[a-zA-Z0-9\.]+]])
-// CHECK: call void @_ZN1XC1ERKS_(%struct.X* [[AGGTMP:%[a-zA-Z0-9\.]+]], %struct.X* [[LVTEMP]])
+// CHECK: call void @_ZN1XC1ERKS_(%struct.X* [[AGGTMP:%[a-zA-Z0-9\.]+]], %struct.X* dereferenceable({{[0-9]+}}) [[LVTEMP]])
// CHECK: call void bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to void (i8*, i8*, %struct.X*)*)({{.*}} %struct.X* [[AGGTMP]])
struct X {
X();
diff --git a/test/CodeGenObjCXX/property-reference.mm b/test/CodeGenObjCXX/property-reference.mm
index a4af90010b3b..e4269009e4ac 100644
--- a/test/CodeGenObjCXX/property-reference.mm
+++ b/test/CodeGenObjCXX/property-reference.mm
@@ -26,7 +26,7 @@ void test0() {
const MyStruct& currentMyStruct = myClass.foo;
}
-// CHECK: [[C:%.*]] = call %struct.MyStruct* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
+// CHECK: [[C:%.*]] = call dereferenceable({{[0-9]+}}) %struct.MyStruct* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend
// CHECK: store %struct.MyStruct* [[C]], %struct.MyStruct** [[D:%.*]]
namespace test1 {
@@ -40,7 +40,7 @@ namespace test1 {
@implementation Test1
@synthesize prop1 = ivar;
@end
-// CHECK: define internal [[A:%.*]]* @"\01-[Test1 prop1]"(
+// CHECK: define internal dereferenceable({{[0-9]+}}) [[A:%.*]]* @"\01-[Test1 prop1]"(
// CHECK: [[SELF:%.*]] = alloca [[TEST1:%.*]]*, align 8
// CHECK: [[T0:%.*]] = load [[TEST1]]** [[SELF]]
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
@@ -49,7 +49,7 @@ namespace test1 {
// CHECK-NEXT: ret [[A]]* [[T3]]
// CHECK: define internal void @"\01-[Test1 setProp1:]"(
-// CHECK: call [[A]]* @_ZN5test11AaSERKS0_(
+// CHECK: call dereferenceable({{[0-9]+}}) [[A]]* @_ZN5test11AaSERKS0_(
// CHECK-NEXT: ret void
// rdar://problem/10497174
diff --git a/test/CodeGenObjCXX/rtti.mm b/test/CodeGenObjCXX/rtti.mm
index e458f090a768..326760fa6f09 100644
--- a/test/CodeGenObjCXX/rtti.mm
+++ b/test/CodeGenObjCXX/rtti.mm
@@ -4,19 +4,19 @@
namespace std { class type_info; }
-// CHECK: @_ZTI1A = linkonce_odr unnamed_addr constant {{.*}}@_ZTVN10__cxxabiv117__class_type_infoE{{.*}}@_ZTS1A
+// CHECK: @_ZTI1A = linkonce_odr constant {{.*}}@_ZTVN10__cxxabiv117__class_type_infoE{{.*}}@_ZTS1A
@interface A
@end
-// CHECK: @_ZTI1B = linkonce_odr unnamed_addr constant {{.*}}@_ZTVN10__cxxabiv120__si_class_type_infoE{{.*}}@_ZTS1B{{.*}}@_ZTI1A
+// CHECK: @_ZTI1B = linkonce_odr constant {{.*}}@_ZTVN10__cxxabiv120__si_class_type_infoE{{.*}}@_ZTS1B{{.*}}@_ZTI1A
@interface B : A
@end
-// CHECK: @_ZTIP1B = linkonce_odr unnamed_addr constant {{.*}}@_ZTVN10__cxxabiv119__pointer_type_infoE{{.*}}@_ZTSP1B{{.*}}), i32 0, {{.*}}@_ZTI1B
-// CHECK: @_ZTI11objc_object = linkonce_odr unnamed_addr constant {{.*}}@_ZTVN10__cxxabiv117__class_type_infoE{{.*}}@_ZTS11objc_object
-// CHECK: @_ZTIP11objc_object = linkonce_odr unnamed_addr constant {{.*}}@_ZTVN10__cxxabiv119__pointer_type_infoE{{.*}}@_ZTSP11objc_object{{.*}}@_ZTI11objc_object
-// CHECK: @_ZTI10objc_class = linkonce_odr unnamed_addr constant {{.*}}@_ZTVN10__cxxabiv117__class_type_infoE{{.*}}@_ZTS10objc_class
-// CHECK: @_ZTIP10objc_class = linkonce_odr unnamed_addr constant {{.*}}@_ZTVN10__cxxabiv119__pointer_type_infoE{{.*}}@_ZTSP10objc_class{{.*}}@_ZTI10objc_class
+// CHECK: @_ZTIP1B = linkonce_odr constant {{.*}}@_ZTVN10__cxxabiv119__pointer_type_infoE{{.*}}@_ZTSP1B{{.*}}), i32 0, {{.*}}@_ZTI1B
+// CHECK: @_ZTI11objc_object = linkonce_odr constant {{.*}}@_ZTVN10__cxxabiv117__class_type_infoE{{.*}}@_ZTS11objc_object
+// CHECK: @_ZTIP11objc_object = linkonce_odr constant {{.*}}@_ZTVN10__cxxabiv119__pointer_type_infoE{{.*}}@_ZTSP11objc_object{{.*}}@_ZTI11objc_object
+// CHECK: @_ZTI10objc_class = linkonce_odr constant {{.*}}@_ZTVN10__cxxabiv117__class_type_infoE{{.*}}@_ZTS10objc_class
+// CHECK: @_ZTIP10objc_class = linkonce_odr constant {{.*}}@_ZTVN10__cxxabiv119__pointer_type_infoE{{.*}}@_ZTSP10objc_class{{.*}}@_ZTI10objc_class
@protocol P;
diff --git a/test/CodeGenOpenCL/address-space-constant-initializers.cl b/test/CodeGenOpenCL/address-space-constant-initializers.cl
new file mode 100644
index 000000000000..ae8cedc1ca5b
--- /dev/null
+++ b/test/CodeGenOpenCL/address-space-constant-initializers.cl
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 %s -ffake-address-space-map -emit-llvm -o - | FileCheck %s
+
+typedef struct {
+ int i;
+ float f; // At non-zero offset.
+} ArrayStruct;
+
+__constant ArrayStruct constant_array_struct = { 0, 0.0f };
+
+typedef struct {
+ __constant float* constant_float_ptr;
+} ConstantArrayPointerStruct;
+
+// CHECK: %struct.ConstantArrayPointerStruct = type { float addrspace(3)* }
+// CHECK: addrspace(3) global %struct.ConstantArrayPointerStruct { float addrspace(3)* bitcast (i8 addrspace(3)* getelementptr (i8 addrspace(3)* bitcast (%struct.ArrayStruct addrspace(3)* @constant_array_struct to i8 addrspace(3)*), i64 4) to float addrspace(3)*) }
+// Bug 18567
+__constant ConstantArrayPointerStruct constant_array_pointer_struct = {
+ &constant_array_struct.f
+};
+
diff --git a/test/CodeGenOpenCL/address-spaces-mangling.cl b/test/CodeGenOpenCL/address-spaces-mangling.cl
index 3c7a5183636c..edb53fc35821 100644
--- a/test/CodeGenOpenCL/address-spaces-mangling.cl
+++ b/test/CodeGenOpenCL/address-spaces-mangling.cl
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 %s -ffake-address-space-map -faddress-space-map-mangling=yes -emit-llvm -o - | FileCheck -check-prefix=ASMANG %s
-// RUN: %clang_cc1 %s -ffake-address-space-map -faddress-space-map-mangling=no -emit-llvm -o - | FileCheck -check-prefix=NOASMANG %s
+// RUN: %clang_cc1 %s -ffake-address-space-map -faddress-space-map-mangling=yes -triple %itanium_abi_triple -emit-llvm -o - | FileCheck -check-prefix=ASMANG %s
+// RUN: %clang_cc1 %s -ffake-address-space-map -faddress-space-map-mangling=no -triple %itanium_abi_triple -emit-llvm -o - | FileCheck -check-prefix=NOASMANG %s
// We can't name this f as private is equivalent to default
// no specifier given address space so we get multiple definition
diff --git a/test/CodeGenOpenCL/builtins-r600.cl b/test/CodeGenOpenCL/builtins-r600.cl
new file mode 100644
index 000000000000..cebeba185ea3
--- /dev/null
+++ b/test/CodeGenOpenCL/builtins-r600.cl
@@ -0,0 +1,114 @@
+// REQUIRES: r600-registered-target
+// RUN: %clang_cc1 -triple r600-unknown-unknown -S -emit-llvm -o - %s | FileCheck %s
+
+#pragma OPENCL EXTENSION cl_khr_fp64 : enable
+
+// CHECK-LABEL: @test_div_scale_f64
+// CHECK: call { double, i1 } @llvm.AMDGPU.div.scale.f64(double %a, double %b, i1 true)
+// CHECK-DAG: [[FLAG:%.+]] = extractvalue { double, i1 } %{{.+}}, 1
+// CHECK-DAG: [[VAL:%.+]] = extractvalue { double, i1 } %{{.+}}, 0
+// CHECK: [[FLAGEXT:%.+]] = zext i1 [[FLAG]] to i32
+// CHECK: store i32 [[FLAGEXT]]
+void test_div_scale_f64(global double* out, global int* flagout, double a, double b)
+{
+ bool flag;
+ *out = __builtin_amdgpu_div_scale(a, b, true, &flag);
+ *flagout = flag;
+}
+
+// CHECK-LABEL: @test_div_scale_f32
+// CHECK: call { float, i1 } @llvm.AMDGPU.div.scale.f32(float %a, float %b, i1 true)
+// CHECK-DAG: [[FLAG:%.+]] = extractvalue { float, i1 } %{{.+}}, 1
+// CHECK-DAG: [[VAL:%.+]] = extractvalue { float, i1 } %{{.+}}, 0
+// CHECK: [[FLAGEXT:%.+]] = zext i1 [[FLAG]] to i32
+// CHECK: store i32 [[FLAGEXT]]
+void test_div_scale_f32(global float* out, global int* flagout, float a, float b)
+{
+ bool flag;
+ *out = __builtin_amdgpu_div_scalef(a, b, true, &flag);
+ *flagout = flag;
+}
+
+// CHECK-LABEL: @test_div_fmas_f32
+// CHECK: call float @llvm.AMDGPU.div.fmas.f32
+void test_div_fmas_f32(global float* out, float a, float b, float c)
+{
+ *out = __builtin_amdgpu_div_fmasf(a, b, c);
+}
+
+// CHECK-LABEL: @test_div_fmas_f64
+// CHECK: call double @llvm.AMDGPU.div.fmas.f64
+void test_div_fmas_f64(global double* out, double a, double b, double c)
+{
+ *out = __builtin_amdgpu_div_fmas(a, b, c);
+}
+
+// CHECK-LABEL: @test_div_fixup_f32
+// CHECK: call float @llvm.AMDGPU.div.fixup.f32
+void test_div_fixup_f32(global float* out, float a, float b, float c)
+{
+ *out = __builtin_amdgpu_div_fixupf(a, b, c);
+}
+
+// CHECK-LABEL: @test_div_fixup_f64
+// CHECK: call double @llvm.AMDGPU.div.fixup.f64
+void test_div_fixup_f64(global double* out, double a, double b, double c)
+{
+ *out = __builtin_amdgpu_div_fixup(a, b, c);
+}
+
+// CHECK-LABEL: @test_trig_preop_f32
+// CHECK: call float @llvm.AMDGPU.trig.preop.f32
+void test_trig_preop_f32(global float* out, float a, int b)
+{
+ *out = __builtin_amdgpu_trig_preopf(a, b);
+}
+
+// CHECK-LABEL: @test_trig_preop_f64
+// CHECK: call double @llvm.AMDGPU.trig.preop.f64
+void test_trig_preop_f64(global double* out, double a, int b)
+{
+ *out = __builtin_amdgpu_trig_preop(a, b);
+}
+
+// CHECK-LABEL: @test_rcp_f32
+// CHECK: call float @llvm.AMDGPU.rcp.f32
+void test_rcp_f32(global float* out, float a)
+{
+ *out = __builtin_amdgpu_rcpf(a);
+}
+
+// CHECK-LABEL: @test_rcp_f64
+// CHECK: call double @llvm.AMDGPU.rcp.f64
+void test_rcp_f64(global double* out, double a)
+{
+ *out = __builtin_amdgpu_rcp(a);
+}
+
+// CHECK-LABEL: @test_rsq_f32
+// CHECK: call float @llvm.AMDGPU.rsq.f32
+void test_rsq_f32(global float* out, float a)
+{
+ *out = __builtin_amdgpu_rsqf(a);
+}
+
+// CHECK-LABEL: @test_rsq_f64
+// CHECK: call double @llvm.AMDGPU.rsq.f64
+void test_rsq_f64(global double* out, double a)
+{
+ *out = __builtin_amdgpu_rsq(a);
+}
+
+// CHECK-LABEL: @test_rsq_clamped_f32
+// CHECK: call float @llvm.AMDGPU.rsq.clamped.f32
+void test_rsq_clamped_f32(global float* out, float a)
+{
+ *out = __builtin_amdgpu_rsq_clampedf(a);
+}
+
+// CHECK-LABEL: @test_rsq_clamped_f64
+// CHECK: call double @llvm.AMDGPU.rsq.clamped.f64
+void test_rsq_clamped_f64(global double* out, double a)
+{
+ *out = __builtin_amdgpu_rsq_clamped(a);
+}
diff --git a/test/CodeGenOpenCL/kernel-arg-info.cl b/test/CodeGenOpenCL/kernel-arg-info.cl
index c7e20491a9bc..9832604b0459 100644
--- a/test/CodeGenOpenCL/kernel-arg-info.cl
+++ b/test/CodeGenOpenCL/kernel-arg-info.cl
@@ -13,8 +13,16 @@ kernel void foo(__global int * restrict X, const int Y,
kernel void foo2(read_only image1d_t img1, image2d_t img2, write_only image2d_array_t img3) {
}
-// CHECK: metadata !{metadata !"kernel_arg_addr_space", i32 0, i32 0, i32 0}
+// CHECK: metadata !{metadata !"kernel_arg_addr_space", i32 1, i32 1, i32 1}
// CHECK: metadata !{metadata !"kernel_arg_access_qual", metadata !"read_only", metadata !"read_only", metadata !"write_only"}
// CHECK: metadata !{metadata !"kernel_arg_type", metadata !"image1d_t", metadata !"image2d_t", metadata !"image2d_array_t"}
// CHECK: metadata !{metadata !"kernel_arg_type_qual", metadata !"", metadata !"", metadata !""}
// CHECK: metadata !{metadata !"kernel_arg_name", metadata !"img1", metadata !"img2", metadata !"img3"}
+
+kernel void foo3(__global half * X) {
+}
+// CHECK: metadata !{metadata !"kernel_arg_addr_space", i32 1}
+// CHECK: metadata !{metadata !"kernel_arg_access_qual", metadata !"none"}
+// CHECK: metadata !{metadata !"kernel_arg_type", metadata !"half*"}
+// CHECK: metadata !{metadata !"kernel_arg_type_qual", metadata !""}
+// CHECK: metadata !{metadata !"kernel_arg_name", metadata !"X"}
diff --git a/test/CodeGenOpenCL/local.cl b/test/CodeGenOpenCL/local.cl
index b5c67d9af9c7..895c8fa2717d 100644
--- a/test/CodeGenOpenCL/local.cl
+++ b/test/CodeGenOpenCL/local.cl
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 %s -ffake-address-space-map -faddress-space-map-mangling=no -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -ffake-address-space-map -faddress-space-map-mangling=no -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
__kernel void foo(void) {
- // CHECK: @foo.i = internal addrspace(2)
+ // CHECK: @foo.i = internal unnamed_addr addrspace(2)
__local int i;
++i;
}
diff --git a/test/CodeGenOpenCL/str_literals.cl b/test/CodeGenOpenCL/str_literals.cl
index 78a93056b98d..43c90f83f6e7 100644
--- a/test/CodeGenOpenCL/str_literals.cl
+++ b/test/CodeGenOpenCL/str_literals.cl
@@ -3,7 +3,7 @@
__constant char * __constant x = "hello world";
__constant char * __constant y = "hello world";
-// CHECK: addrspace(3) unnamed_addr constant
+// CHECK: unnamed_addr addrspace(3) constant
// CHECK-NOT: addrspace(3) unnamed_addr constant
// CHECK: @x = addrspace(3) global i8 addrspace(3)*
// CHECK: @y = addrspace(3) global i8 addrspace(3)*
diff --git a/test/Coverage/c-language-features.inc b/test/Coverage/c-language-features.inc
index 0ff1237b12e8..356687907d90 100644
--- a/test/Coverage/c-language-features.inc
+++ b/test/Coverage/c-language-features.inc
@@ -196,3 +196,15 @@ struct s11 {
} f0;
int f1;
};
+
+// Unnamed structures.
+struct s12 {
+ struct {
+ unsigned char aa;
+ unsigned char bb;
+ };
+};
+
+void f11() {
+ struct s12 var = { .aa = 33 };
+}
diff --git a/test/Coverage/html-diagnostics.c b/test/Coverage/html-diagnostics.c
index 410ee2acd5fd..c7489f82dd7c 100644
--- a/test/Coverage/html-diagnostics.c
+++ b/test/Coverage/html-diagnostics.c
@@ -2,6 +2,8 @@
// RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o %t %s
// RUN: cat %t/*.html | FileCheck %s
+// REQUIRES: staticanalyzer
+
// Because of the glob (*.html)
// REQUIRES: shell
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/el/fp64/bits/.keep b/test/Driver/Inputs/basic_android_tree/aarch64-linux-android/bin/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/el/fp64/bits/.keep
+++ b/test/Driver/Inputs/basic_android_tree/aarch64-linux-android/bin/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/fp64/bits/.keep b/test/Driver/Inputs/basic_android_tree/aarch64-linux-android/include/c++/4.8/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/fp64/bits/.keep
+++ b/test/Driver/Inputs/basic_android_tree/aarch64-linux-android/include/c++/4.8/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/micromips/el/fp64/bits/.keep b/test/Driver/Inputs/basic_android_tree/aarch64-linux-android/lib/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/micromips/el/fp64/bits/.keep
+++ b/test/Driver/Inputs/basic_android_tree/aarch64-linux-android/lib/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/el/fp64/crtend.o b/test/Driver/Inputs/basic_android_tree/arm-linux-androideabi/bin/ld
index e69de29bb2d1..e69de29bb2d1 100644..100755
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/el/fp64/crtend.o
+++ b/test/Driver/Inputs/basic_android_tree/arm-linux-androideabi/bin/ld
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/el/fp64/nan2008/crtbegin.o b/test/Driver/Inputs/basic_android_tree/arm-linux-androideabi/bin/ld.bfd
index e69de29bb2d1..e69de29bb2d1 100644..100755
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/el/fp64/nan2008/crtbegin.o
+++ b/test/Driver/Inputs/basic_android_tree/arm-linux-androideabi/bin/ld.bfd
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/el/fp64/nan2008/crtend.o b/test/Driver/Inputs/basic_android_tree/arm-linux-androideabi/bin/ld.gold
index e69de29bb2d1..e69de29bb2d1 100644..100755
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/el/fp64/nan2008/crtend.o
+++ b/test/Driver/Inputs/basic_android_tree/arm-linux-androideabi/bin/ld.gold
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/fp64/crtbegin.o b/test/Driver/Inputs/basic_android_tree/bin/arm-linux-androideabi-ld
index e69de29bb2d1..e69de29bb2d1 100644..100755
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/fp64/crtbegin.o
+++ b/test/Driver/Inputs/basic_android_tree/bin/arm-linux-androideabi-ld
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/fp64/crtend.o b/test/Driver/Inputs/basic_android_tree/bin/arm-linux-androideabi-ld.bfd
index e69de29bb2d1..e69de29bb2d1 100644..100755
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/fp64/crtend.o
+++ b/test/Driver/Inputs/basic_android_tree/bin/arm-linux-androideabi-ld.bfd
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/fp64/nan2008/crtbegin.o b/test/Driver/Inputs/basic_android_tree/bin/arm-linux-androideabi-ld.gold
index e69de29bb2d1..e69de29bb2d1 100644..100755
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/fp64/nan2008/crtbegin.o
+++ b/test/Driver/Inputs/basic_android_tree/bin/arm-linux-androideabi-ld.gold
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/micromips/el/fp64/crtbegin.o b/test/Driver/Inputs/basic_android_tree/lib/gcc/aarch64-linux-android/4.8/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/micromips/el/fp64/crtbegin.o
+++ b/test/Driver/Inputs/basic_android_tree/lib/gcc/aarch64-linux-android/4.8/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/fp64/nan2008/crtend.o b/test/Driver/Inputs/basic_android_tree/lib/gcc/aarch64-linux-android/4.8/crtbeginS.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/fp64/nan2008/crtend.o
+++ b/test/Driver/Inputs/basic_android_tree/lib/gcc/aarch64-linux-android/4.8/crtbeginS.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/micromips/el/fp64/crtend.o b/test/Driver/Inputs/basic_android_tree/lib/gcc/aarch64-linux-android/4.8/crtbeginT.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/micromips/el/fp64/crtend.o
+++ b/test/Driver/Inputs/basic_android_tree/lib/gcc/aarch64-linux-android/4.8/crtbeginT.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/micromips/el/fp64/nan2008/crtend.o b/test/Driver/Inputs/basic_android_tree/lib/gcc/aarch64-linux-android/4.8/crtend.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/micromips/el/fp64/nan2008/crtend.o
+++ b/test/Driver/Inputs/basic_android_tree/lib/gcc/aarch64-linux-android/4.8/crtend.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/micromips/el/fp64/nan2008/crtbegin.o b/test/Driver/Inputs/basic_android_tree/lib/gcc/aarch64-linux-android/4.8/crtendS.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/micromips/el/fp64/nan2008/crtbegin.o
+++ b/test/Driver/Inputs/basic_android_tree/lib/gcc/aarch64-linux-android/4.8/crtendS.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/micromips/fp64/crtbegin.o b/test/Driver/Inputs/basic_freebsd_tree/usr/bin/ld.bfd
index e69de29bb2d1..e69de29bb2d1 100644..100755
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/micromips/fp64/crtbegin.o
+++ b/test/Driver/Inputs/basic_freebsd_tree/usr/bin/ld.bfd
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/micromips/fp64/crtend.o b/test/Driver/Inputs/basic_freebsd_tree/usr/bin/ld.gold
index e69de29bb2d1..e69de29bb2d1 100644..100755
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/micromips/fp64/crtend.o
+++ b/test/Driver/Inputs/basic_freebsd_tree/usr/bin/ld.gold
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/micromips/fp64/bits/.keep b/test/Driver/Inputs/basic_linux_libcxx_tree/usr/bin/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/micromips/fp64/bits/.keep
+++ b/test/Driver/Inputs/basic_linux_libcxx_tree/usr/bin/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips16/el/fp64/bits/.keep b/test/Driver/Inputs/basic_linux_libcxx_tree/usr/include/c++/v1/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips16/el/fp64/bits/.keep
+++ b/test/Driver/Inputs/basic_linux_libcxx_tree/usr/include/c++/v1/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips16/fp64/bits/.keep b/test/Driver/Inputs/basic_linux_libcxx_tree/usr/lib/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips16/fp64/bits/.keep
+++ b/test/Driver/Inputs/basic_linux_libcxx_tree/usr/lib/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/el/fp64/nan2008/usr/lib/crti.o b/test/Driver/Inputs/basic_netbsd_tree/usr/lib/64/crti.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/el/fp64/nan2008/usr/lib/crti.o
+++ b/test/Driver/Inputs/basic_netbsd_tree/usr/lib/64/crti.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/el/fp64/usr/lib/crti.o b/test/Driver/Inputs/basic_netbsd_tree/usr/lib/eabi/crti.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/el/fp64/usr/lib/crti.o
+++ b/test/Driver/Inputs/basic_netbsd_tree/usr/lib/eabi/crti.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/fp64/nan2008/usr/lib/crti.o b/test/Driver/Inputs/basic_netbsd_tree/usr/lib/i386/crti.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/fp64/nan2008/usr/lib/crti.o
+++ b/test/Driver/Inputs/basic_netbsd_tree/usr/lib/i386/crti.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/fp64/usr/lib/crti.o b/test/Driver/Inputs/basic_netbsd_tree/usr/lib/o32/crti.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/fp64/usr/lib/crti.o
+++ b/test/Driver/Inputs/basic_netbsd_tree/usr/lib/o32/crti.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/el/fp64/nan2008/usr/lib/crti.o b/test/Driver/Inputs/basic_netbsd_tree/usr/lib/oabi/crti.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/el/fp64/nan2008/usr/lib/crti.o
+++ b/test/Driver/Inputs/basic_netbsd_tree/usr/lib/oabi/crti.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/el/fp64/usr/lib/crti.o b/test/Driver/Inputs/basic_netbsd_tree/usr/lib/sparc/crti.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/el/fp64/usr/lib/crti.o
+++ b/test/Driver/Inputs/basic_netbsd_tree/usr/lib/sparc/crti.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/micromips/fp64/nan2008/crtbegin.o b/test/Driver/Inputs/cl-libs/cl-test.lib
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/micromips/fp64/nan2008/crtbegin.o
+++ b/test/Driver/Inputs/cl-libs/cl-test.lib
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips32/el/fp64/bits/.keep b/test/Driver/Inputs/debian_6_mips64_tree/lib/mips64-linux-gnuabi64/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips32/el/fp64/bits/.keep
+++ b/test/Driver/Inputs/debian_6_mips64_tree/lib/mips64-linux-gnuabi64/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips32/fp64/bits/.keep b/test/Driver/Inputs/debian_6_mips64_tree/lib/mips64el-linux-gnuabi64/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips32/fp64/bits/.keep
+++ b/test/Driver/Inputs/debian_6_mips64_tree/lib/mips64el-linux-gnuabi64/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/64/el/fp64/bits/.keep b/test/Driver/Inputs/debian_6_mips64_tree/usr/include/c++/4.9/backward/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/64/el/fp64/bits/.keep
+++ b/test/Driver/Inputs/debian_6_mips64_tree/usr/include/c++/4.9/backward/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/64/fp64/bits/.keep b/test/Driver/Inputs/debian_6_mips64_tree/usr/include/c++/4.9/mips64-linux-gnuabi64/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/64/fp64/bits/.keep
+++ b/test/Driver/Inputs/debian_6_mips64_tree/usr/include/c++/4.9/mips64-linux-gnuabi64/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/el/fp64/bits/.keep b/test/Driver/Inputs/debian_6_mips64_tree/usr/include/c++/4.9/mips64el-linux-gnuabi64/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/el/fp64/bits/.keep
+++ b/test/Driver/Inputs/debian_6_mips64_tree/usr/include/c++/4.9/mips64el-linux-gnuabi64/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/fp64/bits/.keep b/test/Driver/Inputs/debian_6_mips64_tree/usr/include/mips64-linux-gnuabi64/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/fp64/bits/.keep
+++ b/test/Driver/Inputs/debian_6_mips64_tree/usr/include/mips64-linux-gnuabi64/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/64/el/fp64/bits/.keep b/test/Driver/Inputs/debian_6_mips64_tree/usr/include/mips64el-linux-gnuabi64/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/64/el/fp64/bits/.keep
+++ b/test/Driver/Inputs/debian_6_mips64_tree/usr/include/mips64el-linux-gnuabi64/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips16/el/fp64/crtbegin.o b/test/Driver/Inputs/debian_6_mips64_tree/usr/lib/gcc/mips64-linux-gnuabi64/4.9/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips16/el/fp64/crtbegin.o
+++ b/test/Driver/Inputs/debian_6_mips64_tree/usr/lib/gcc/mips64-linux-gnuabi64/4.9/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/micromips/fp64/nan2008/crtend.o b/test/Driver/Inputs/debian_6_mips64_tree/usr/lib/gcc/mips64-linux-gnuabi64/4.9/crtend.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/micromips/fp64/nan2008/crtend.o
+++ b/test/Driver/Inputs/debian_6_mips64_tree/usr/lib/gcc/mips64-linux-gnuabi64/4.9/crtend.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips16/el/fp64/nan2008/crtbegin.o b/test/Driver/Inputs/debian_6_mips64_tree/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips16/el/fp64/nan2008/crtbegin.o
+++ b/test/Driver/Inputs/debian_6_mips64_tree/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips16/el/fp64/crtend.o b/test/Driver/Inputs/debian_6_mips64_tree/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/crtend.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips16/el/fp64/crtend.o
+++ b/test/Driver/Inputs/debian_6_mips64_tree/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/crtend.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/el/fp64/nan2008/usr/lib/crt1.o b/test/Driver/Inputs/debian_6_mips64_tree/usr/lib/mips64-linux-gnuabi64/crt1.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/el/fp64/nan2008/usr/lib/crt1.o
+++ b/test/Driver/Inputs/debian_6_mips64_tree/usr/lib/mips64-linux-gnuabi64/crt1.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/fp64/nan2008/usr/lib/crti.o b/test/Driver/Inputs/debian_6_mips64_tree/usr/lib/mips64-linux-gnuabi64/crti.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/fp64/nan2008/usr/lib/crti.o
+++ b/test/Driver/Inputs/debian_6_mips64_tree/usr/lib/mips64-linux-gnuabi64/crti.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/el/fp64/nan2008/usr/lib/crtn.o b/test/Driver/Inputs/debian_6_mips64_tree/usr/lib/mips64-linux-gnuabi64/crtn.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/el/fp64/nan2008/usr/lib/crtn.o
+++ b/test/Driver/Inputs/debian_6_mips64_tree/usr/lib/mips64-linux-gnuabi64/crtn.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/el/fp64/usr/lib/crt1.o b/test/Driver/Inputs/debian_6_mips64_tree/usr/lib/mips64el-linux-gnuabi64/crt1.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/el/fp64/usr/lib/crt1.o
+++ b/test/Driver/Inputs/debian_6_mips64_tree/usr/lib/mips64el-linux-gnuabi64/crt1.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/fp64/usr/lib/crti.o b/test/Driver/Inputs/debian_6_mips64_tree/usr/lib/mips64el-linux-gnuabi64/crti.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/fp64/usr/lib/crti.o
+++ b/test/Driver/Inputs/debian_6_mips64_tree/usr/lib/mips64el-linux-gnuabi64/crti.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/el/fp64/usr/lib/crtn.o b/test/Driver/Inputs/debian_6_mips64_tree/usr/lib/mips64el-linux-gnuabi64/crtn.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/el/fp64/usr/lib/crtn.o
+++ b/test/Driver/Inputs/debian_6_mips64_tree/usr/lib/mips64el-linux-gnuabi64/crtn.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/64/fp64/bits/.keep b/test/Driver/Inputs/debian_reduced_mips_tree/lib/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/64/fp64/bits/.keep
+++ b/test/Driver/Inputs/debian_reduced_mips_tree/lib/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/el/fp64/bits/.keep b/test/Driver/Inputs/debian_reduced_mips_tree/lib/mips-linux-gnu/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/el/fp64/bits/.keep
+++ b/test/Driver/Inputs/debian_reduced_mips_tree/lib/mips-linux-gnu/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/fp64/bits/.keep b/test/Driver/Inputs/debian_reduced_mips_tree/lib/mipsel-linux-gnu/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/fp64/bits/.keep
+++ b/test/Driver/Inputs/debian_reduced_mips_tree/lib/mipsel-linux-gnu/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/el/fp64/nan2008/.keep b/test/Driver/Inputs/debian_reduced_mips_tree/usr/include/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/el/fp64/nan2008/.keep
+++ b/test/Driver/Inputs/debian_reduced_mips_tree/usr/include/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/fp64/nan2008/.keep b/test/Driver/Inputs/debian_reduced_mips_tree/usr/include/c++/4.7/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/fp64/nan2008/.keep
+++ b/test/Driver/Inputs/debian_reduced_mips_tree/usr/include/c++/4.7/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/micromips/el/fp64/nan2008/.keep b/test/Driver/Inputs/debian_reduced_mips_tree/usr/include/c++/4.7/backward/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/micromips/el/fp64/nan2008/.keep
+++ b/test/Driver/Inputs/debian_reduced_mips_tree/usr/include/c++/4.7/backward/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/micromips/fp64/nan2008/.keep b/test/Driver/Inputs/debian_reduced_mips_tree/usr/include/c++/4.7/mips-linux-gnu/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/micromips/fp64/nan2008/.keep
+++ b/test/Driver/Inputs/debian_reduced_mips_tree/usr/include/c++/4.7/mips-linux-gnu/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips16/el/fp64/nan2008/.keep b/test/Driver/Inputs/debian_reduced_mips_tree/usr/include/c++/4.7/mipsel-linux-gnu/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips16/el/fp64/nan2008/.keep
+++ b/test/Driver/Inputs/debian_reduced_mips_tree/usr/include/c++/4.7/mipsel-linux-gnu/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips16/fp64/nan2008/.keep b/test/Driver/Inputs/debian_reduced_mips_tree/usr/include/mips-linux-gnu/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips16/fp64/nan2008/.keep
+++ b/test/Driver/Inputs/debian_reduced_mips_tree/usr/include/mips-linux-gnu/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips32/el/fp64/nan2008/.keep b/test/Driver/Inputs/debian_reduced_mips_tree/usr/include/mipsel-linux-gnu/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips32/el/fp64/nan2008/.keep
+++ b/test/Driver/Inputs/debian_reduced_mips_tree/usr/include/mipsel-linux-gnu/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips32/fp64/nan2008/.keep b/test/Driver/Inputs/debian_reduced_mips_tree/usr/lib/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips32/fp64/nan2008/.keep
+++ b/test/Driver/Inputs/debian_reduced_mips_tree/usr/lib/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips16/fp64/crtbegin.o b/test/Driver/Inputs/debian_reduced_mips_tree/usr/lib/gcc/mips-linux-gnu/4.7/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips16/fp64/crtbegin.o
+++ b/test/Driver/Inputs/debian_reduced_mips_tree/usr/lib/gcc/mips-linux-gnu/4.7/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips16/fp64/nan2008/crtbegin.o b/test/Driver/Inputs/debian_reduced_mips_tree/usr/lib/gcc/mipsel-linux-gnu/4.7/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips16/fp64/nan2008/crtbegin.o
+++ b/test/Driver/Inputs/debian_reduced_mips_tree/usr/lib/gcc/mipsel-linux-gnu/4.7/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips32/mips16/el/fp64/nan2008/.keep b/test/Driver/Inputs/debian_reduced_mips_tree/usr/lib/mips-linux-gnu/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips32/mips16/el/fp64/nan2008/.keep
+++ b/test/Driver/Inputs/debian_reduced_mips_tree/usr/lib/mips-linux-gnu/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips32/mips16/fp64/nan2008/.keep b/test/Driver/Inputs/debian_reduced_mips_tree/usr/lib/mipsel-linux-gnu/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips32/mips16/fp64/nan2008/.keep
+++ b/test/Driver/Inputs/debian_reduced_mips_tree/usr/lib/mipsel-linux-gnu/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/el/fp64/crtbegin.o b/test/Driver/Inputs/fedora_21_tree/usr/lib/gcc/aarch64-redhat-linux/4.9.0/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/el/fp64/crtbegin.o
+++ b/test/Driver/Inputs/fedora_21_tree/usr/lib/gcc/aarch64-redhat-linux/4.9.0/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips16/el/fp64/nan2008/crtend.o b/test/Driver/Inputs/fedora_21_tree/usr/lib/gcc/aarch64-redhat-linux/4.9.0/crtend.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips16/el/fp64/nan2008/crtend.o
+++ b/test/Driver/Inputs/fedora_21_tree/usr/lib/gcc/aarch64-redhat-linux/4.9.0/crtend.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/fp64/nan2008/usr/lib/crt1.o b/test/Driver/Inputs/fedora_21_tree/usr/lib64/crt1.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/fp64/nan2008/usr/lib/crt1.o
+++ b/test/Driver/Inputs/fedora_21_tree/usr/lib64/crt1.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/el/fp64/nan2008/usr/lib/crti.o b/test/Driver/Inputs/fedora_21_tree/usr/lib64/crti.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/el/fp64/nan2008/usr/lib/crti.o
+++ b/test/Driver/Inputs/fedora_21_tree/usr/lib64/crti.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/fp64/nan2008/usr/lib/crtn.o b/test/Driver/Inputs/fedora_21_tree/usr/lib64/crtn.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/fp64/nan2008/usr/lib/crtn.o
+++ b/test/Driver/Inputs/fedora_21_tree/usr/lib64/crtn.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips16/fp64/crtend.o b/test/Driver/Inputs/file.ll
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips16/fp64/crtend.o
+++ b/test/Driver/Inputs/file.ll
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips64/64/el/fp64/nan2008/.keep b/test/Driver/Inputs/gentoo_linux_gcc_4.6.2_tree/usr/include/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips64/64/el/fp64/nan2008/.keep
+++ b/test/Driver/Inputs/gentoo_linux_gcc_4.6.2_tree/usr/include/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips64/64/fp64/nan2008/.keep b/test/Driver/Inputs/gentoo_linux_gcc_4.6.4_tree/usr/include/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips64/64/fp64/nan2008/.keep
+++ b/test/Driver/Inputs/gentoo_linux_gcc_4.6.4_tree/usr/include/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips64/el/fp64/nan2008/.keep b/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/include-fixed/nan2008/el/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips64/el/fp64/nan2008/.keep
+++ b/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/include-fixed/nan2008/el/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/el/fp64/nan2008/crtbegin.o b/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/nan2008/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/el/fp64/nan2008/crtbegin.o
+++ b/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/nan2008/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips16/fp64/nan2008/crtend.o b/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/nan2008/crtend.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips16/fp64/nan2008/crtend.o
+++ b/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/nan2008/crtend.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/fp64/crtbegin.o b/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/nan2008/el/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/fp64/crtbegin.o
+++ b/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/nan2008/el/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/el/fp64/crtend.o b/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/nan2008/el/crtend.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/el/fp64/crtend.o
+++ b/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/nan2008/el/crtend.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips64/fp64/nan2008/.keep b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/lib/nan2008/el/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips64/fp64/nan2008/.keep
+++ b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/lib/nan2008/el/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips64r2/64/el/fp64/nan2008/.keep b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/el/lib/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips64r2/64/el/fp64/nan2008/.keep
+++ b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/el/lib/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/fp64/usr/lib/crt1.o b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/el/usr/lib/crt1.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/fp64/usr/lib/crt1.o
+++ b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/el/usr/lib/crt1.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/el/fp64/usr/lib/crti.o b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/el/usr/lib/crti.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/el/fp64/usr/lib/crti.o
+++ b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/el/usr/lib/crti.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/fp64/usr/lib/crtn.o b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/el/usr/lib/crtn.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/fp64/usr/lib/crtn.o
+++ b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/el/usr/lib/crtn.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips64r2/64/fp64/nan2008/.keep b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/lib/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips64r2/64/fp64/nan2008/.keep
+++ b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/lib/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/el/fp64/nan2008/usr/lib/crt1.o b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/usr/lib/crt1.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/el/fp64/nan2008/usr/lib/crt1.o
+++ b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/usr/lib/crt1.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/fp64/nan2008/usr/lib/crti.o b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/usr/lib/crti.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/fp64/nan2008/usr/lib/crti.o
+++ b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/usr/lib/crti.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/el/fp64/nan2008/usr/lib/crtn.o b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/usr/lib/crtn.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/el/fp64/nan2008/usr/lib/crtn.o
+++ b/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/nan2008/usr/lib/crtn.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/el/fp64/nan2008/usr/lib/crti.o b/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/el/fp64/nan2008/usr/lib/crti.o
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/el/fp64/nan2008/usr/lib/crti.o
+++ /dev/null
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/el/fp64/nan2008/usr/lib/crtn.o b/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/el/fp64/nan2008/usr/lib/crtn.o
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/el/fp64/nan2008/usr/lib/crtn.o
+++ /dev/null
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/el/fp64/usr/lib/crt1.o b/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/el/fp64/usr/lib/crt1.o
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/el/fp64/usr/lib/crt1.o
+++ /dev/null
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/el/fp64/usr/lib/crti.o b/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/el/fp64/usr/lib/crti.o
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/el/fp64/usr/lib/crti.o
+++ /dev/null
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/el/fp64/usr/lib/crtn.o b/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/el/fp64/usr/lib/crtn.o
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/el/fp64/usr/lib/crtn.o
+++ /dev/null
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/fp64/nan2008/usr/lib/crt1.o b/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/fp64/nan2008/usr/lib/crt1.o
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/fp64/nan2008/usr/lib/crt1.o
+++ /dev/null
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/fp64/nan2008/usr/lib/crti.o b/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/fp64/nan2008/usr/lib/crti.o
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/fp64/nan2008/usr/lib/crti.o
+++ /dev/null
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/fp64/nan2008/usr/lib/crtn.o b/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/fp64/nan2008/usr/lib/crtn.o
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/fp64/nan2008/usr/lib/crtn.o
+++ /dev/null
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/fp64/usr/lib/crt1.o b/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/fp64/usr/lib/crt1.o
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/fp64/usr/lib/crt1.o
+++ /dev/null
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/fp64/usr/lib/crti.o b/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/fp64/usr/lib/crti.o
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/fp64/usr/lib/crti.o
+++ /dev/null
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/fp64/usr/lib/crtn.o b/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/fp64/usr/lib/crtn.o
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/fp64/usr/lib/crtn.o
+++ /dev/null
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/el/fp64/nan2008/usr/lib/crt1.o b/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/el/fp64/nan2008/usr/lib/crt1.o
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/el/fp64/nan2008/usr/lib/crt1.o
+++ /dev/null
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/el/fp64/nan2008/usr/lib/crti.o b/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/el/fp64/nan2008/usr/lib/crti.o
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/el/fp64/nan2008/usr/lib/crti.o
+++ /dev/null
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/el/fp64/nan2008/usr/lib/crtn.o b/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/el/fp64/nan2008/usr/lib/crtn.o
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/el/fp64/nan2008/usr/lib/crtn.o
+++ /dev/null
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/el/fp64/usr/lib/crt1.o b/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/el/fp64/usr/lib/crt1.o
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/el/fp64/usr/lib/crt1.o
+++ /dev/null
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/el/fp64/usr/lib/crti.o b/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/el/fp64/usr/lib/crti.o
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/el/fp64/usr/lib/crti.o
+++ /dev/null
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/el/fp64/usr/lib/crtn.o b/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/el/fp64/usr/lib/crtn.o
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/el/fp64/usr/lib/crtn.o
+++ /dev/null
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/fp64/nan2008/usr/lib/crt1.o b/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/fp64/nan2008/usr/lib/crt1.o
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/fp64/nan2008/usr/lib/crt1.o
+++ /dev/null
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/fp64/nan2008/usr/lib/crti.o b/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/fp64/nan2008/usr/lib/crti.o
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/fp64/nan2008/usr/lib/crti.o
+++ /dev/null
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/fp64/nan2008/usr/lib/crtn.o b/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/fp64/nan2008/usr/lib/crtn.o
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/fp64/nan2008/usr/lib/crtn.o
+++ /dev/null
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/fp64/usr/lib/crt1.o b/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/fp64/usr/lib/crt1.o
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/fp64/usr/lib/crt1.o
+++ /dev/null
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/fp64/usr/lib/crti.o b/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/fp64/usr/lib/crti.o
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/fp64/usr/lib/crti.o
+++ /dev/null
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/fp64/usr/lib/crtn.o b/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/fp64/usr/lib/crtn.o
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/fp64/usr/lib/crtn.o
+++ /dev/null
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips64r2/el/fp64/nan2008/.keep b/test/Driver/Inputs/mips_img_tree/bin/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips64r2/el/fp64/nan2008/.keep
+++ b/test/Driver/Inputs/mips_img_tree/bin/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/fp64/nan2008/crtbegin.o b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/fp64/nan2008/crtbegin.o
+++ b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/el/fp64/nan2008/crtend.o b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/crtend.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/el/fp64/nan2008/crtend.o
+++ b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/crtend.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/mips16/el/fp64/crtbegin.o b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/el/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/mips16/el/fp64/crtbegin.o
+++ b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/el/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/fp64/crtend.o b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/el/crtend.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/fp64/crtend.o
+++ b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/el/crtend.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips64r2/fp64/nan2008/.keep b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include-fixed/el/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/mips64r2/fp64/nan2008/.keep
+++ b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include-fixed/el/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/fp64/nan2008/crtend.o b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include-fixed/mips64r6/64/el/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/fp64/nan2008/crtend.o
+++ b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include-fixed/mips64r6/64/el/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/mips16/el/fp64/crtend.o b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include-fixed/mips64r6/el/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/mips16/el/fp64/crtend.o
+++ b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include-fixed/mips64r6/el/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/mips16/el/fp64/nan2008/crtbegin.o b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/mips16/el/fp64/nan2008/crtbegin.o
+++ b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/include/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/mips16/fp64/crtbegin.o b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/mips16/fp64/crtbegin.o
+++ b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/mips16/el/fp64/nan2008/crtend.o b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/crtend.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/mips16/el/fp64/nan2008/crtend.o
+++ b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/crtend.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/mips16/fp64/nan2008/crtbegin.o b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/el/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/mips16/fp64/nan2008/crtbegin.o
+++ b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/el/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/mips16/fp64/crtend.o b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/el/crtend.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/mips16/fp64/crtend.o
+++ b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/64/el/crtend.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/64/el/fp64/crtbegin.o b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/64/el/fp64/crtbegin.o
+++ b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/mips16/fp64/nan2008/crtend.o b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/crtend.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips32/mips16/fp64/nan2008/crtend.o
+++ b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/crtend.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/64/el/fp64/nan2008/crtbegin.o b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/el/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/64/el/fp64/nan2008/crtbegin.o
+++ b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/el/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/64/el/fp64/crtend.o b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/el/crtend.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/64/el/fp64/crtend.o
+++ b/test/Driver/Inputs/mips_img_tree/lib/gcc/mips-img-linux-gnu/4.9.0/mips64r6/el/crtend.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/64/el/fp64/nan2008/crtend.o b/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/bin/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/64/el/fp64/nan2008/crtend.o
+++ b/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/bin/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/64/fp64/crtbegin.o b/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/include/c++/4.9.0/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/64/fp64/crtbegin.o
+++ b/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/include/c++/4.9.0/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/64/fp64/crtend.o b/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/lib/el/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/64/fp64/crtend.o
+++ b/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/lib/el/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/64/fp64/nan2008/crtbegin.o b/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/lib/mips64r6/64/el/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/64/fp64/nan2008/crtbegin.o
+++ b/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/lib/mips64r6/64/el/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/64/fp64/nan2008/crtend.o b/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/lib/mips64r6/el/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/64/fp64/nan2008/crtend.o
+++ b/test/Driver/Inputs/mips_img_tree/mips-img-linux-gnu/lib/mips64r6/el/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/el/fp64/crtbegin.o b/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/bin/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/el/fp64/crtbegin.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/bin/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/el/fp64/usr/lib/crt1.o b/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/lib/crt1.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/el/fp64/usr/lib/crt1.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/lib/crt1.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/fp64/usr/lib/crti.o b/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/lib/crti.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/fp64/usr/lib/crti.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/lib/crti.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/el/fp64/usr/lib/crtn.o b/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/lib/crtn.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/el/fp64/usr/lib/crtn.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/lib/crtn.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/el/fp64/crtend.o b/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/sbin/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/el/fp64/crtend.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/el/usr/sbin/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/el/fp64/nan2008/crtbegin.o b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/bin/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/el/fp64/nan2008/crtbegin.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/bin/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/fp64/nan2008/usr/lib/crt1.o b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/lib/crt1.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/fp64/nan2008/usr/lib/crt1.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/lib/crt1.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/el/fp64/nan2008/usr/lib/crti.o b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/lib/crti.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/el/fp64/nan2008/usr/lib/crti.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/lib/crti.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/fp64/nan2008/usr/lib/crtn.o b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/lib/crtn.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/fp64/nan2008/usr/lib/crtn.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/lib/crtn.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/el/fp64/nan2008/crtend.o b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/sbin/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/el/fp64/nan2008/crtend.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/el/usr/sbin/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/fp64/crtbegin.o b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/bin/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/fp64/crtbegin.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/bin/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/fp64/usr/lib/crt1.o b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/lib/crt1.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/fp64/usr/lib/crt1.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/lib/crt1.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/el/fp64/usr/lib/crti.o b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/lib/crti.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/el/fp64/usr/lib/crti.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/lib/crti.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/fp64/usr/lib/crtn.o b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/lib/crtn.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/micromips/fp64/usr/lib/crtn.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/lib/crtn.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/fp64/crtend.o b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/sbin/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/fp64/crtend.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/64/usr/sbin/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/fp64/nan2008/crtbegin.o b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/bin/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/fp64/nan2008/crtbegin.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/bin/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/el/fp64/nan2008/usr/lib/crt1.o b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/lib/crt1.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/el/fp64/nan2008/usr/lib/crt1.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/lib/crt1.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/fp64/nan2008/usr/lib/crti.o b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/lib/crti.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/fp64/nan2008/usr/lib/crti.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/lib/crti.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/el/fp64/nan2008/usr/lib/crtn.o b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/lib/crtn.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/el/fp64/nan2008/usr/lib/crtn.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/lib/crtn.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/fp64/nan2008/crtend.o b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/sbin/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64/fp64/nan2008/crtend.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/el/usr/sbin/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/64/el/fp64/crtbegin.o b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/bin/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/64/el/fp64/crtbegin.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/bin/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/el/fp64/usr/lib/crt1.o b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/lib/crt1.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/el/fp64/usr/lib/crt1.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/lib/crt1.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/fp64/usr/lib/crti.o b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/lib/crti.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/fp64/usr/lib/crti.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/lib/crti.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/el/fp64/usr/lib/crtn.o b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/lib/crtn.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/el/fp64/usr/lib/crtn.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/lib/crtn.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/64/el/fp64/crtend.o b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/sbin/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/64/el/fp64/crtend.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/mips64r6/usr/sbin/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/64/el/fp64/nan2008/crtbegin.o b/test/Driver/Inputs/mips_img_tree/sysroot/usr/bin/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/64/el/fp64/nan2008/crtbegin.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/usr/bin/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/64/el/fp64/nan2008/crtend.o b/test/Driver/Inputs/mips_img_tree/sysroot/usr/include/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/64/el/fp64/nan2008/crtend.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/usr/include/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/fp64/nan2008/usr/lib/crt1.o b/test/Driver/Inputs/mips_img_tree/sysroot/usr/lib/crt1.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/fp64/nan2008/usr/lib/crt1.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/usr/lib/crt1.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/el/fp64/nan2008/usr/lib/crti.o b/test/Driver/Inputs/mips_img_tree/sysroot/usr/lib/crti.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/el/fp64/nan2008/usr/lib/crti.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/usr/lib/crti.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/fp64/nan2008/usr/lib/crtn.o b/test/Driver/Inputs/mips_img_tree/sysroot/usr/lib/crtn.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/fp64/nan2008/usr/lib/crtn.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/usr/lib/crtn.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/64/fp64/crtbegin.o b/test/Driver/Inputs/mips_img_tree/sysroot/usr/sbin/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/64/fp64/crtbegin.o
+++ b/test/Driver/Inputs/mips_img_tree/sysroot/usr/sbin/.keep
diff --git a/test/Driver/Inputs/module/module.modulemap b/test/Driver/Inputs/module/module.modulemap
new file mode 100644
index 000000000000..4fddd4b0a5dc
--- /dev/null
+++ b/test/Driver/Inputs/module/module.modulemap
@@ -0,0 +1,4 @@
+module simple {
+ header "simple.h"
+ export *
+}
diff --git a/test/Driver/Inputs/module/simple.h b/test/Driver/Inputs/module/simple.h
new file mode 100644
index 000000000000..afd674e74d5b
--- /dev/null
+++ b/test/Driver/Inputs/module/simple.h
@@ -0,0 +1 @@
+#define MODULE_MACRO 10
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/64/fp64/crtend.o b/test/Driver/Inputs/multilib_64bit_linux_tree/libx32/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/64/fp64/crtend.o
+++ b/test/Driver/Inputs/multilib_64bit_linux_tree/libx32/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/64/fp64/nan2008/crtbegin.o b/test/Driver/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/x32/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/64/fp64/nan2008/crtbegin.o
+++ b/test/Driver/Inputs/multilib_64bit_linux_tree/usr/lib/gcc/x86_64-unknown-linux/4.6.0/x32/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/el/fp64/crtbegin.o b/test/Driver/Inputs/multilib_64bit_linux_tree/usr/libx32/gcc/x86_64-unknown-gnu/4.6.0/32/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/el/fp64/crtbegin.o
+++ b/test/Driver/Inputs/multilib_64bit_linux_tree/usr/libx32/gcc/x86_64-unknown-gnu/4.6.0/32/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/el/fp64/nan2008/crtbegin.o b/test/Driver/Inputs/multilib_64bit_linux_tree/usr/libx32/gcc/x86_64-unknown-gnu/4.6.0/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/el/fp64/nan2008/crtbegin.o
+++ b/test/Driver/Inputs/multilib_64bit_linux_tree/usr/libx32/gcc/x86_64-unknown-gnu/4.6.0/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/fp64/crtbegin.o b/test/Driver/Inputs/multilib_64bit_linux_tree/usr/libx32/gcc/x86_64-unknown-gnu/4.6.0/x32/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/fp64/crtbegin.o
+++ b/test/Driver/Inputs/multilib_64bit_linux_tree/usr/libx32/gcc/x86_64-unknown-gnu/4.6.0/x32/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/64/fp64/nan2008/crtend.o b/test/Driver/Inputs/multilib_64bit_linux_tree/usr/x86_64-unknown-linux/libx32/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/64/fp64/nan2008/crtend.o
+++ b/test/Driver/Inputs/multilib_64bit_linux_tree/usr/x86_64-unknown-linux/libx32/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/el/fp64/crtend.o b/test/Driver/Inputs/resource_dir/lib/macho_embedded/libclang_rt.hard_pic.a
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/el/fp64/crtend.o
+++ b/test/Driver/Inputs/resource_dir/lib/macho_embedded/libclang_rt.hard_pic.a
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/el/fp64/nan2008/crtend.o b/test/Driver/Inputs/resource_dir/lib/macho_embedded/libclang_rt.hard_static.a
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/el/fp64/nan2008/crtend.o
+++ b/test/Driver/Inputs/resource_dir/lib/macho_embedded/libclang_rt.hard_static.a
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/fp64/crtend.o b/test/Driver/Inputs/resource_dir/lib/macho_embedded/libclang_rt.soft_pic.a
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/fp64/crtend.o
+++ b/test/Driver/Inputs/resource_dir/lib/macho_embedded/libclang_rt.soft_pic.a
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/fp64/nan2008/crtbegin.o b/test/Driver/Inputs/resource_dir/lib/macho_embedded/libclang_rt.soft_static.a
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/fp64/nan2008/crtbegin.o
+++ b/test/Driver/Inputs/resource_dir/lib/macho_embedded/libclang_rt.soft_static.a
diff --git a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/fp64/nan2008/crtend.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/lib/powerpc64le-linux-gnu/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/mips64r2/fp64/nan2008/crtend.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/lib/powerpc64le-linux-gnu/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/fp64/usr/lib/crt1.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/lib/x86_64-linux-gnu/.keep
index e69de29bb2d1..e69de29bb2d1 100644..100755
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/fp64/usr/lib/crt1.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/lib/x86_64-linux-gnu/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/fp64/usr/lib/crtn.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/libx32/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips16/fp64/usr/lib/crtn.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/libx32/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/el/fp64/nan2008/usr/lib/crt1.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/include/c++/4.8/backward/.keep
index e69de29bb2d1..e69de29bb2d1 100644..100755
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/el/fp64/nan2008/usr/lib/crt1.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/include/c++/4.8/backward/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/el/fp64/nan2008/usr/lib/crtn.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/include/powerpc64le-linux-gnu/c++/4.8/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/el/fp64/nan2008/usr/lib/crtn.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/include/powerpc64le-linux-gnu/c++/4.8/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/el/fp64/usr/lib/crt1.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/include/x86_64-linux-gnu/c++/4.8/32/.keep
index e69de29bb2d1..e69de29bb2d1 100644..100755
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/el/fp64/usr/lib/crt1.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/include/x86_64-linux-gnu/c++/4.8/32/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/el/fp64/usr/lib/crtn.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/include/x86_64-linux-gnu/c++/4.8/x32/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/el/fp64/usr/lib/crtn.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/include/x86_64-linux-gnu/c++/4.8/x32/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/fp64/nan2008/usr/lib/crt1.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/gcc/powerpc64le-linux-gnu/4.8/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/fp64/nan2008/usr/lib/crt1.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/gcc/powerpc64le-linux-gnu/4.8/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/fp64/nan2008/usr/lib/crtn.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/gcc/powerpc64le-linux-gnu/4.8/crtend.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/fp64/nan2008/usr/lib/crtn.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/gcc/powerpc64le-linux-gnu/4.8/crtend.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/fp64/usr/lib/crt1.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/gcc/powerpc64le-linux-gnu/4.9/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/fp64/usr/lib/crt1.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/gcc/powerpc64le-linux-gnu/4.9/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/fp64/usr/lib/crtn.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/gcc/x86_64-linux-gnu/4.8/32/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644..100755
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/fp64/usr/lib/crtn.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/gcc/x86_64-linux-gnu/4.8/32/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/el/fp64/nan2008/usr/lib/crt1.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/gcc/x86_64-linux-gnu/4.8/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644..100755
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/el/fp64/nan2008/usr/lib/crt1.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/gcc/x86_64-linux-gnu/4.8/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/el/fp64/nan2008/usr/lib/crtn.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/gcc/x86_64-linux-gnu/4.8/x32/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/el/fp64/nan2008/usr/lib/crtn.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/gcc/x86_64-linux-gnu/4.8/x32/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/el/fp64/usr/lib/crt1.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/gcc/x86_64-linux-gnu/4.8/x32/crtend.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/el/fp64/usr/lib/crt1.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/gcc/x86_64-linux-gnu/4.8/x32/crtend.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/el/fp64/usr/lib/crti.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/gcc/x86_64-linux-gnu/4.9/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/el/fp64/usr/lib/crti.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/gcc/x86_64-linux-gnu/4.9/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/fp64/nan2008/usr/lib/crt1.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/powerpc64le-linux-gnu/crt1.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/fp64/nan2008/usr/lib/crt1.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/powerpc64le-linux-gnu/crt1.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/fp64/nan2008/usr/lib/crti.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/powerpc64le-linux-gnu/crti.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/fp64/nan2008/usr/lib/crti.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/powerpc64le-linux-gnu/crti.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/el/fp64/usr/lib/crtn.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/powerpc64le-linux-gnu/crtn.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/el/fp64/usr/lib/crtn.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/powerpc64le-linux-gnu/crtn.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/fp64/nan2008/usr/lib/crtn.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/x86_64-linux-gnu/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/fp64/nan2008/usr/lib/crtn.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/lib/x86_64-linux-gnu/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/fp64/usr/lib/crt1.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/libx32/crt1.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/fp64/usr/lib/crt1.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/libx32/crt1.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/fp64/usr/lib/crti.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/libx32/crti.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/fp64/usr/lib/crti.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/libx32/crti.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/fp64/usr/lib/crtn.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/libx32/crtn.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips32/mips16/fp64/usr/lib/crtn.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree/usr/libx32/crtn.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/el/fp64/nan2008/usr/lib/crt1.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/lib/i386-linux-gnu/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/el/fp64/nan2008/usr/lib/crt1.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/lib/i386-linux-gnu/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/el/fp64/nan2008/usr/lib/crti.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/lib/x86_64-linux-gnu/.keep
index e69de29bb2d1..e69de29bb2d1 100644..100755
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/el/fp64/nan2008/usr/lib/crti.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/lib/x86_64-linux-gnu/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/el/fp64/nan2008/usr/lib/crtn.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/usr/include/c++/4.8/backward/.keep
index e69de29bb2d1..e69de29bb2d1 100644..100755
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/el/fp64/nan2008/usr/lib/crtn.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/usr/include/c++/4.8/backward/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/el/fp64/usr/lib/crt1.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/usr/include/i386-linux-gnu/c++/4.8/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/el/fp64/usr/lib/crt1.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/usr/include/i386-linux-gnu/c++/4.8/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/el/fp64/usr/lib/crti.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/usr/include/x86_64-linux-gnu/c++/4.8/32/.keep
index e69de29bb2d1..e69de29bb2d1 100644..100755
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/el/fp64/usr/lib/crti.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/usr/include/x86_64-linux-gnu/c++/4.8/32/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/el/fp64/usr/lib/crtn.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/usr/lib/gcc/i686-linux-gnu/4.8/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/el/fp64/usr/lib/crtn.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/usr/lib/gcc/i686-linux-gnu/4.8/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/fp64/nan2008/usr/lib/crt1.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/usr/lib/gcc/x86_64-linux-gnu/4.8/32/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644..100755
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/fp64/nan2008/usr/lib/crt1.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/usr/lib/gcc/x86_64-linux-gnu/4.8/32/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/fp64/nan2008/usr/lib/crti.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/usr/lib/gcc/x86_64-linux-gnu/4.8/crtbegin.o
index e69de29bb2d1..e69de29bb2d1 100644..100755
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/fp64/nan2008/usr/lib/crti.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/usr/lib/gcc/x86_64-linux-gnu/4.8/crtbegin.o
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/fp64/nan2008/usr/lib/crtn.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/usr/lib/i386-linux-gnu/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/fp64/nan2008/usr/lib/crtn.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/usr/lib/i386-linux-gnu/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/fp64/usr/lib/crt1.o b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/usr/lib/x86_64-linux-gnu/.keep
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/fp64/usr/lib/crt1.o
+++ b/test/Driver/Inputs/ubuntu_14.04_multiarch_tree2/usr/lib/x86_64-linux-gnu/.keep
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/fp64/usr/lib/crti.o b/test/Driver/Inputs/wildcard1.c
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/fp64/usr/lib/crti.o
+++ b/test/Driver/Inputs/wildcard1.c
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/fp64/usr/lib/crtn.o b/test/Driver/Inputs/wildcard2.c
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/64/fp64/usr/lib/crtn.o
+++ b/test/Driver/Inputs/wildcard2.c
diff --git a/test/Driver/Xlinker-args.c b/test/Driver/Xlinker-args.c
index 4285af7944b5..87b238b3b9d8 100644
--- a/test/Driver/Xlinker-args.c
+++ b/test/Driver/Xlinker-args.c
@@ -3,17 +3,17 @@
// RUN: %clang -target i386-apple-darwin9 -### \
// RUN: -Xlinker one -Xlinker --no-demangle \
-// RUN: -Wl,two,--no-demangle,three -Xlinker four %s 2> %t
+// RUN: -Wl,two,--no-demangle,three -Xlinker four -z five %s 2> %t
// RUN: FileCheck -check-prefix=DARWIN < %t %s
//
// RUN: %clang -target x86_64-pc-linux-gnu -### \
// RUN: -Xlinker one -Xlinker --no-demangle \
-// RUN: -Wl,two,--no-demangle,three -Xlinker four %s 2> %t
+// RUN: -Wl,two,--no-demangle,three -Xlinker four -z five %s 2> %t
// RUN: FileCheck -check-prefix=LINUX < %t %s
//
// DARWIN-NOT: --no-demangle
-// DARWIN: "one" "two" "three" "four"
-// LINUX: "--no-demangle" "one" "two" "three" "four"
+// DARWIN: "one" "two" "three" "four" "-z" "five"
+// LINUX: "--no-demangle" "one" "two" "three" "four" "-z" "five"
// Check that we forward '-Xlinker' and '-Wl,' on Windows.
// RUN: %clang -target i686-pc-win32 -### \
diff --git a/test/Driver/aarch64-cpus.c b/test/Driver/aarch64-cpus.c
index 799ce1042a0e..68ad326d5edf 100644
--- a/test/Driver/aarch64-cpus.c
+++ b/test/Driver/aarch64-cpus.c
@@ -1,10 +1,91 @@
// Check target CPUs are correctly passed.
// RUN: %clang -target aarch64 -### -c %s 2>&1 | FileCheck -check-prefix=GENERIC %s
+// RUN: %clang -target aarch64 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=GENERIC %s
+// RUN: %clang -target aarch64_be -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=GENERIC %s
// GENERIC: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-cpu" "generic"
+// RUN: %clang -target arm64 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-GENERIC %s
+// RUN: %clang -target arm64 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-GENERIC %s
+// RUN: %clang -target arm64_be -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-GENERIC %s
+// ARM64-GENERIC: "-cc1"{{.*}} "-triple" "arm64{{.*}}" "-target-cpu" "generic"
+
+// RUN: %clang -target arm64-apple-darwin -arch arm64 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-DARWIN %s
+// ARM64-DARWIN: "-cc1"{{.*}} "-triple" "arm64{{.*}}" "-target-cpu" "cyclone"
+
// RUN: %clang -target aarch64 -mcpu=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=CA53 %s
+// RUN: %clang -target aarch64 -mlittle-endian -mcpu=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=CA53 %s
+// RUN: %clang -target aarch64_be -mlittle-endian -mcpu=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=CA53 %s
+// RUN: %clang -target aarch64 -mtune=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=CA53 %s
+// RUN: %clang -target aarch64_be -mlittle-endian -mtune=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=CA53 %s
// CA53: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-cpu" "cortex-a53"
+// RUN: %clang -target arm64 -mcpu=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CA53 %s
+// RUN: %clang -target arm64 -mlittle-endian -mcpu=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CA53 %s
+// RUN: %clang -target arm64_be -mlittle-endian -mcpu=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CA53 %s
+// RUN: %clang -target arm64 -mtune=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CA53 %s
+// RUN: %clang -target arm64 -mlittle-endian -mtune=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CA53 %s
+// RUN: %clang -target arm64_be -mlittle-endian -mtune=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CA53 %s
+// ARM64-CA53: "-cc1"{{.*}} "-triple" "arm64{{.*}}" "-target-cpu" "cortex-a53"
+
// RUN: %clang -target aarch64 -mcpu=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=CA57 %s
+// RUN: %clang -target aarch64 -mlittle-endian -mcpu=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=CA57 %s
+// RUN: %clang -target aarch64_be -mlittle-endian -mcpu=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=CA57 %s
+// RUN: %clang -target aarch64 -mtune=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=CA57 %s
+// RUN: %clang -target aarch64 -mlittle-endian -mtune=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=CA57 %s
+// RUN: %clang -target aarch64_be -mlittle-endian -mtune=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=CA57 %s
// CA57: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-cpu" "cortex-a57"
+
+// RUN: %clang -target arm64 -mcpu=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CA57 %s
+// RUN: %clang -target arm64 -mlittle-endian -mcpu=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CA57 %s
+// RUN: %clang -target arm64_be -mlittle-endian -mcpu=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CA57 %s
+// RUN: %clang -target arm64 -mtune=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CA57 %s
+// RUN: %clang -target arm64 -mlittle-endian -mtune=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CA57 %s
+// RUN: %clang -target arm64_be -mlittle-endian -mtune=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CA57 %s
+// ARM64-CA57: "-cc1"{{.*}} "-triple" "arm64{{.*}}" "-target-cpu" "cortex-a57"
+
+// RUN: %clang -target aarch64_be -### -c %s 2>&1 | FileCheck -check-prefix=GENERIC-BE %s
+// RUN: %clang -target aarch64 -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=GENERIC-BE %s
+// RUN: %clang -target aarch64_be -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=GENERIC-BE %s
+// GENERIC-BE: "-cc1"{{.*}} "-triple" "aarch64_be{{.*}}" "-target-cpu" "generic"
+
+// RUN: %clang -target arm64_be -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-GENERIC-BE %s
+// RUN: %clang -target arm64 -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-GENERIC-BE %s
+// RUN: %clang -target arm64_be -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-GENERIC-BE %s
+// ARM64-GENERIC-BE: "-cc1"{{.*}} "-triple" "arm64_be{{.*}}" "-target-cpu" "generic"
+
+// RUN: %clang -target aarch64_be -mcpu=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=CA53-BE %s
+// RUN: %clang -target aarch64 -mbig-endian -mcpu=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=CA53-BE %s
+// RUN: %clang -target aarch64_be -mbig-endian -mcpu=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=CA53-BE %s
+// RUN: %clang -target aarch64_be -mtune=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=CA53-BE %s
+// RUN: %clang -target aarch64 -mbig-endian -mtune=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=CA53-BE %s
+// RUN: %clang -target aarch64_be -mbig-endian -mtune=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=CA53-BE %s
+// CA53-BE: "-cc1"{{.*}} "-triple" "aarch64_be{{.*}}" "-target-cpu" "cortex-a53"
+
+// RUN: %clang -target arm64_be -mcpu=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CA53-BE %s
+// RUN: %clang -target arm64 -mbig-endian -mcpu=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CA53-BE %s
+// RUN: %clang -target arm64_be -mbig-endian -mcpu=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CA53-BE %s
+// RUN: %clang -target arm64_be -mtune=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CA53-BE %s
+// RUN: %clang -target arm64 -mbig-endian -mtune=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CA53-BE %s
+// RUN: %clang -target arm64_be -mbig-endian -mtune=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CA53-BE %s
+// ARM64-CA53-BE: "-cc1"{{.*}} "-triple" "arm64_be{{.*}}" "-target-cpu" "cortex-a53"
+
+// RUN: %clang -target aarch64_be -mcpu=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=CA57-BE %s
+// RUN: %clang -target aarch64 -mbig-endian -mcpu=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=CA57-BE %s
+// RUN: %clang -target aarch64_be -mbig-endian -mcpu=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=CA57-BE %s
+// RUN: %clang -target aarch64_be -mtune=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=CA57-BE %s
+// RUN: %clang -target aarch64 -mbig-endian -mtune=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=CA57-BE %s
+// RUN: %clang -target aarch64_be -mbig-endian -mtune=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=CA57-BE %s
+// CA57-BE: "-cc1"{{.*}} "-triple" "aarch64_be{{.*}}" "-target-cpu" "cortex-a57"
+
+// RUN: %clang -target arm64_be -mcpu=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CA57-BE %s
+// RUN: %clang -target arm64 -mbig-endian -mcpu=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CA57-BE %s
+// RUN: %clang -target arm64_be -mbig-endian -mcpu=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CA57-BE %s
+// RUN: %clang -target arm64_be -mtune=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CA57-BE %s
+// RUN: %clang -target arm64 -mbig-endian -mtune=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CA57-BE %s
+// RUN: %clang -target arm64_be -mbig-endian -mtune=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-CA57-BE %s
+// ARM64-CA57-BE: "-cc1"{{.*}} "-triple" "arm64_be{{.*}}" "-target-cpu" "cortex-a57"
+
+// RUN: %clang -target aarch64 -mcpu=cortex-a57 -mtune=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=MCPU-MTUNE %s
+// RUN: %clang -target aarch64 -mtune=cortex-a53 -mcpu=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=MCPU-MTUNE %s
+// MCPU-MTUNE: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-cpu" "cortex-a53"
diff --git a/test/Driver/aarch64-features.c b/test/Driver/aarch64-features.c
index 2acb7157f6c5..7c3f8754049a 100644
--- a/test/Driver/aarch64-features.c
+++ b/test/Driver/aarch64-features.c
@@ -1,4 +1,5 @@
// RUN: %clang -target aarch64-none-linux-gnu -### %s -fsyntax-only 2>&1 | FileCheck %s
+// RUN: %clang -target arm64-none-linux-gnu -### %s -fsyntax-only 2>&1 | FileCheck %s
// The AArch64 PCS states that chars should be unsigned.
// CHECK: fno-signed-char
diff --git a/test/Driver/aarch64-mfpu.c b/test/Driver/aarch64-mfpu.c
deleted file mode 100644
index 234401bcb211..000000000000
--- a/test/Driver/aarch64-mfpu.c
+++ /dev/null
@@ -1,26 +0,0 @@
-// Test that different values of -mfpu pick correct AArch64 FPU target-feature(s).
-
-// RUN: %clang -target aarch64-linux-eabi -mfpu=neon %s -### -o %t.o 2>&1 \
-// RUN: | FileCheck --check-prefix=CHECK-NEON %s
-// CHECK-NEON: "-target-feature" "+neon"
-
-// RUN: %clang -target aarch64-linux-eabi -mfpu=fp-armv8 %s -### -o %t.o 2>&1 \
-// RUN: | FileCheck --check-prefix=CHECK-FP-ARMV8 %s
-// CHECK-FP-ARMV8: "-target-feature" "+fp-armv8"
-
-// RUN: %clang -target aarch64-linux-eabi -mfpu=neon-fp-armv8 %s -### 2>&1 \
-// RUN: | FileCheck --check-prefix=CHECK-NEON-FP-ARMV8 %s
-// CHECK-NEON-FP-ARMV8: "-target-feature" "+fp-armv8"
-// CHECK-NEON-FP-ARMV8: "-target-feature" "+neon"
-
-// RUN: %clang -target aarch64-linux-eabi -mfpu=crypto-neon-fp-armv8 %s -### 2>&1 \
-// RUN: | FileCheck --check-prefix=CHECK-CRYPTO-NEON-FP-ARMV8 %s
-// CHECK-CRYPTO-NEON-FP-ARMV8: "-target-feature" "+fp-armv8"
-// CHECK-CRYPTO-NEON-FP-ARMV8: "-target-feature" "+neon"
-// CHECK-CRYPTO-NEON-FP-ARMV8: "-target-feature" "+crypto"
-
-// RUN: %clang -target aarch64-linux-eabi -mfpu=none %s -### 2>&1 \
-// RUN: | FileCheck --check-prefix=CHECK-NO-FP %s
-// CHECK-NO-FP: "-target-feature" "-fp-armv8"
-// CHECK-NO-FP: "-target-feature" "-crypto"
-// CHECK-NO-FP: "-target-feature" "-neon"
diff --git a/test/Driver/aarch64-mgeneral_regs_only.c b/test/Driver/aarch64-mgeneral_regs_only.c
new file mode 100644
index 000000000000..43172c7bd6f7
--- /dev/null
+++ b/test/Driver/aarch64-mgeneral_regs_only.c
@@ -0,0 +1,9 @@
+// Test the -mgeneral-regs-only option
+
+// RUN: %clang -target aarch64-linux-eabi -mgeneral-regs-only %s -### 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-NO-FP %s
+// RUN: %clang -target arm64-linux-eabi -mgeneral-regs-only %s -### 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-NO-FP %s
+// CHECK-NO-FP: "-target-feature" "-fp-armv8"
+// CHECK-NO-FP: "-target-feature" "-crypto"
+// CHECK-NO-FP: "-target-feature" "-neon"
diff --git a/test/Driver/altivec-asm.S b/test/Driver/altivec-asm.S
index 4143d520f4a8..3f78b58e6424 100644
--- a/test/Driver/altivec-asm.S
+++ b/test/Driver/altivec-asm.S
@@ -1,3 +1,4 @@
// RUN: %clang -target powerpc64-linux-gnu -maltivec -S %s -o - | FileCheck %s
+// RUN: %clang -target powerpc64le-linux-gnu -maltivec -S %s -o - | FileCheck %s
// Verify that assembling an empty file does not auto-include altivec.h.
// CHECK-NOT: static vector
diff --git a/test/Driver/android-standalone.cpp b/test/Driver/android-standalone.cpp
index dc41ed7559a2..2bdaeddcdbd4 100644
--- a/test/Driver/android-standalone.cpp
+++ b/test/Driver/android-standalone.cpp
@@ -17,6 +17,36 @@
// CHECK: "-L{{.*}}/sysroot/usr/lib"
//
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -target aarch64-linux-android \
+// RUN: -B%S/Inputs/basic_android_tree \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-AARCH64 %s
+// CHECK-AARCH64: {{.*}}clang{{.*}}" "-cc1"
+// CHECK-AARCH64: "-internal-isystem" "{{.*}}/aarch64-linux-android/include/c++/4.8"
+// CHECK-AARCH64: "-internal-isystem" "{{.*}}/aarch64-linux-android/include/c++/4.8/aarch64-linux-android"
+// CHECK-AARCH64: "-internal-externc-isystem" "{{.*}}/sysroot/include"
+// CHECK-AARCH64: "-internal-externc-isystem" "{{.*}}/sysroot/usr/include"
+// CHECK-AARCH64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-AARCH64: "-L{{.*}}/lib/gcc/aarch64-linux-android/4.8"
+// CHECK-AARCH64: "-L{{.*}}/lib/gcc/aarch64-linux-android/4.8/../../../../aarch64-linux-android/lib"
+// CHECK-AARCH64: "-L{{.*}}/sysroot/usr/lib"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -target arm64-linux-android \
+// RUN: -B%S/Inputs/basic_android_tree \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-ARM64 %s
+// CHECK-ARM64: {{.*}}clang{{.*}}" "-cc1"
+// CHECK-ARM64: "-internal-isystem" "{{.*}}/aarch64-linux-android/include/c++/4.8"
+// CHECK-ARM64: "-internal-isystem" "{{.*}}/aarch64-linux-android/include/c++/4.8/aarch64-linux-android"
+// CHECK-ARM64: "-internal-externc-isystem" "{{.*}}/sysroot/include"
+// CHECK-ARM64: "-internal-externc-isystem" "{{.*}}/sysroot/usr/include"
+// CHECK-ARM64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-ARM64: "-L{{.*}}/lib/gcc/aarch64-linux-android/4.8"
+// CHECK-ARM64: "-L{{.*}}/lib/gcc/aarch64-linux-android/4.8/../../../../aarch64-linux-android/lib"
+// CHECK-ARM64: "-L{{.*}}/sysroot/usr/lib"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: -target mipsel-linux-android \
// RUN: -mips32 \
// RUN: -B%S/Inputs/basic_android_tree \
diff --git a/test/Driver/arm-alignment.c b/test/Driver/arm-alignment.c
index e3ab276212a3..98046d7edf1d 100644
--- a/test/Driver/arm-alignment.c
+++ b/test/Driver/arm-alignment.c
@@ -1,25 +1,48 @@
// RUN: %clang -target arm-none-gnueabi -munaligned-access -### %s 2> %t
-// RUN: FileCheck --check-prefix=CHECK-UNALIGNED < %t %s
+// RUN: FileCheck --check-prefix=CHECK-UNALIGNED-ARM < %t %s
// RUN: %clang -target arm-none-gnueabi -mstrict-align -munaligned-access -### %s 2> %t
-// RUN: FileCheck --check-prefix=CHECK-UNALIGNED < %t %s
+// RUN: FileCheck --check-prefix=CHECK-UNALIGNED-ARM < %t %s
// RUN: %clang -target arm-none-gnueabi -mno-unaligned-access -munaligned-access -### %s 2> %t
-// RUN: FileCheck --check-prefix=CHECK-UNALIGNED < %t %s
+// RUN: FileCheck --check-prefix=CHECK-UNALIGNED-ARM < %t %s
-// CHECK-UNALIGNED: "-backend-option" "-arm-no-strict-align"
+// RUN: %clang -target aarch64-none-gnueabi -munaligned-access -### %s 2> %t
+// RUN: FileCheck --check-prefix=CHECK-UNALIGNED-AARCH64 < %t %s
+
+// RUN: %clang -target aarch64-none-gnueabi -mstrict-align -munaligned-access -### %s 2> %t
+// RUN: FileCheck --check-prefix=CHECK-UNALIGNED-AARCH64 < %t %s
+
+// RUN: %clang -target aarch64-none-gnueabi -mno-unaligned-access -munaligned-access -### %s 2> %t
+// RUN: FileCheck --check-prefix=CHECK-UNALIGNED-AARCH64 < %t %s
+
+// CHECK-UNALIGNED-ARM: "-backend-option" "-arm-no-strict-align"
+// CHECK-UNALIGNED-AARCH64: "-backend-option" "-aarch64-no-strict-align"
// RUN: %clang -target arm-none-gnueabi -mno-unaligned-access -### %s 2> %t
-// RUN: FileCheck --check-prefix=CHECK-ALIGNED < %t %s
+// RUN: FileCheck --check-prefix=CHECK-ALIGNED-ARM < %t %s
// RUN: %clang -target arm-none-gnueabi -mstrict-align -### %s 2> %t
-// RUN: FileCheck --check-prefix=CHECK-ALIGNED < %t %s
+// RUN: FileCheck --check-prefix=CHECK-ALIGNED-ARM < %t %s
// RUN: %clang -target arm-none-gnueabi -munaligned-access -mno-unaligned-access -### %s 2> %t
-// RUN: FileCheck --check-prefix=CHECK-ALIGNED < %t %s
+// RUN: FileCheck --check-prefix=CHECK-ALIGNED-ARM < %t %s
// RUN: %clang -target arm-none-gnueabi -munaligned-access -mstrict-align -### %s 2> %t
-// RUN: FileCheck --check-prefix=CHECK-ALIGNED < %t %s
+// RUN: FileCheck --check-prefix=CHECK-ALIGNED-ARM < %t %s
+
+// RUN: %clang -target aarch64-none-gnueabi -mno-unaligned-access -### %s 2> %t
+// RUN: FileCheck --check-prefix=CHECK-ALIGNED-AARCH64 < %t %s
+
+// RUN: %clang -target aarch64-none-gnueabi -mstrict-align -### %s 2> %t
+// RUN: FileCheck --check-prefix=CHECK-ALIGNED-AARCH64 < %t %s
+
+// RUN: %clang -target aarch64-none-gnueabi -munaligned-access -mno-unaligned-access -### %s 2> %t
+// RUN: FileCheck --check-prefix=CHECK-ALIGNED-AARCH64 < %t %s
+
+// RUN: %clang -target aarch64-none-gnueabi -munaligned-access -mstrict-align -### %s 2> %t
+// RUN: FileCheck --check-prefix=CHECK-ALIGNED-AARCH64 < %t %s
-// CHECK-ALIGNED: "-backend-option" "-arm-strict-align"
+// CHECK-ALIGNED-ARM: "-backend-option" "-arm-strict-align"
+// CHECK-ALIGNED-AARCH64: "-backend-option" "-aarch64-strict-align"
diff --git a/test/Driver/arm-arch-darwin.c b/test/Driver/arm-arch-darwin.c
new file mode 100644
index 000000000000..55089619d1e7
--- /dev/null
+++ b/test/Driver/arm-arch-darwin.c
@@ -0,0 +1,6 @@
+// On Darwin, arch should override CPU for triple purposes
+// RUN: %clang -target armv7m-apple-darwin -arch armv7m -mcpu=cortex-m4 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7M-DARWIN %s
+// CHECK-V7M-DARWIN: "-cc1"{{.*}} "-triple" "thumbv7m-{{.*}} "-target-cpu" "cortex-m4"
+// RUN: %clang -target armv7m -arch armv7m -mcpu=cortex-m4 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7M-OVERRIDDEN %s
+// CHECK-V7M-OVERRIDDEN: "-cc1"{{.*}} "-triple" "thumbv7em-{{.*}} "-target-cpu" "cortex-m4"
+
diff --git a/test/Driver/arm-cortex-cpus.c b/test/Driver/arm-cortex-cpus.c
index bd833cbdd009..224ba575dddd 100644
--- a/test/Driver/arm-cortex-cpus.c
+++ b/test/Driver/arm-cortex-cpus.c
@@ -1,23 +1,167 @@
-// ================== Check default Cortex CPU on each major architecture
-// RUN: %clang -target armv6m-apple-darwin -arch armv6m -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6M %s
+// ================== Check default CPU on each major architecture
+// RUN: %clang -target armv4t -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V4T %s
+// RUN: %clang -target arm -march=armv4t -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V4T %s
+// CHECK-V4T: "-cc1"{{.*}} "-triple" "armv4t-{{.*}} "-target-cpu" "arm7tdmi"
+
+// RUN: %clang -target armv4t -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V4T-THUMB %s
+// RUN: %clang -target arm -mthumb -march=armv4t -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V4T-THUMB %s
+// CHECK-V4T-THUMB: "-cc1"{{.*}} "-triple" "thumbv4t-{{.*}} "-target-cpu" "arm7tdmi"
+
+// RUN: %clang -target armv5 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V5 %s
+// RUN: %clang -target arm -march=armv5 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V5 %s
+// RUN: %clang -target armv5t -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V5 %s
+// RUN: %clang -target arm -march=armv5t -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V5 %s
+// CHECK-V5: "-cc1"{{.*}} "-triple" "armv5-{{.*}} "-target-cpu" "arm10tdmi"
+
+// RUN: %clang -target armv5 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V5-THUMB %s
+// RUN: %clang -target armv -march=armv5 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V5-THUMB %s
+// RUN: %clang -target armv5t -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V5-THUMB %s
+// RUN: %clang -target arm -march=armv5 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V5-THUMB %s
+// CHECK-V5-THUMB: "-cc1"{{.*}} "-triple" "thumbv5-{{.*}} "-target-cpu" "arm10tdmi"
+
+// RUN: %clang -target armv5e -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V5E %s
+// RUN: %clang -target arm -march=armv5e -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V5E %s
+// CHECK-V5E: "-cc1"{{.*}} "-triple" "armv5e-{{.*}} "-target-cpu" "arm1022e"
+
+// RUN: %clang -target armv5e -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V5E-THUMB %s
+// RUN: %clang -target arm -march=armv5e -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V5E-THUMB %s
+// CHECK-V5E-THUMB: "-cc1"{{.*}} "-triple" "thumbv5e-{{.*}} "-target-cpu" "arm1022e"
+
+// FIXME %clang -target armv5tej -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V5TEJ %s
+// RUN: %clang -target arm -march=armv5tej -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V5TEJ %s
+// CHECK-V5TEJ: "-cc1"{{.*}} "-triple" "armv5e-{{.*}} "-target-cpu" "arm926ej-s"
+
+// FIXME %clang -target armv5tej -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V5TEJ-THUMB %s
+// RUN: %clang -target arm -march=armv5tej -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V5TEJ-THUMB %s
+// CHECK-V5TEJ-THUMB: "-cc1"{{.*}} "-triple" "thumbv5e-{{.*}} "-target-cpu" "arm926ej-s"
+
+// RUN: %clang -target armv6 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6 %s
+// RUN: %clang -target arm -march=armv6 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6 %s
+// CHECK-V6: "-cc1"{{.*}} "-triple" "armv6-{{.*}} "-target-cpu" "arm1136jf-s"
+
+// RUN: %clang -target armv6 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6-THUMB %s
+// RUN: %clang -target arm -march=armv6 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6-THUMB %s
+// CHECK-V6-THUMB: "-cc1"{{.*}} "-triple" "thumbv6-{{.*}} "-target-cpu" "arm1136jf-s"
+
+// FIXME %clang -target armv6j -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6J %s
+// RUN: %clang -target arm -march=armv6j -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6J %s
+// CHECK-V6J: "-cc1"{{.*}} "-triple" "armv6-{{.*}} "-target-cpu" "arm1136j-s"
+
+// FIXME %clang -target armv6j -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6J-THUMB %s
+// RUN: %clang -target arm -march=armv6j -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6J-THUMB %s
+// CHECK-V6J-THUMB: "-cc1"{{.*}} "-triple" "thumbv6-{{.*}} "-target-cpu" "arm1136j-s"
+
+// FIXME %clang -target armv6z -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6Z %s
+// FIXME %clang -target arm -march=armv6z -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6Z %s
+// CHECK-V6Z: "-cc1"{{.*}} "-triple" "armv6-{{.*}} "-target-cpu" "arm1176jzf-s"
+
+// FIXME %clang -target armv6z -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6Z-THUMB %s
+// FIXME %clang -target arm arch=armv6z -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6Z-THUMB %s
+// CHECK-V6Z-THUMB: "-cc1"{{.*}} "-triple" "thumbv6-{{.*}} "-target-cpu" "arm1176jzfs"
+
+// RUN: %clang -target armv6t2 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6T2 %s
+// RUN: %clang -target arm -march=armv6t2 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6T2 %s
+// CHECK-V6T2: "-cc1"{{.*}} "-triple" "armv6t2-{{.*}} "-target-cpu" "arm1156t2-s"
+
+// RUN: %clang -target armv6t2 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6T2-THUMB %s
+// RUN: %clang -target arm -march=armv6t2 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6T2-THUMB %s
+// CHECK-V6T2-THUMB: "-cc1"{{.*}} "-triple" "thumbv6t2-{{.*}} "-target-cpu" "arm1156t2-s"
+
+// RUN: %clang -target armv6m -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6M %s
+// RUN: %clang -target arm -march=armv6m -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6M %s
// CHECK-V6M: "-cc1"{{.*}} "-triple" "thumbv6m-{{.*}} "-target-cpu" "cortex-m0"
-// RUN: %clang -target armv7m-apple-darwin -arch armv7m -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7M %s
+// RUN: %clang -target armv6m -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6M-BIG %s
+// RUN: %clang -target arm -march=armv6m -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6M-BIG %s
+// CHECK-V6M-BIG: "-cc1"{{.*}} "-triple" "thumbebv6m-{{.*}} "-target-cpu" "cortex-m0"
+
+// RUN: %clang -target armv7m -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7M %s
+// RUN: %clang -target arm -march=armv7-m -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7M %s
// CHECK-V7M: "-cc1"{{.*}} "-triple" "thumbv7m-{{.*}} "-target-cpu" "cortex-m3"
-// RUN: %clang -target armv7em-apple-darwin -arch armv7em -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7EM %s
+// RUN: %clang -target armv7em -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7EM %s
+// RUN: %clang -target arm -march=armv7e-m -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7EM %s
// CHECK-V7EM: "-cc1"{{.*}} "-triple" "thumbv7em-{{.*}} "-target-cpu" "cortex-m4"
+// RUN: %clang -target armv7em -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7EM-BIG %s
+// RUN: %clang -target arm -march=armv7e-m -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7EM-BIG %s
+// CHECK-V7EM-BIG: "-cc1"{{.*}} "-triple" "thumbebv7em-{{.*}} "-target-cpu" "cortex-m4"
+
+// RUN: %clang -target armv6m-apple-darwin -arch armv6m -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V6M-DARWIN %s
+// CHECK-V6M-DARWIN: "-cc1"{{.*}} "-triple" "thumbv6m-{{.*}} "-target-cpu" "cortex-m0"
+
+// RUN: %clang -target armv7m-apple-darwin -arch armv7m -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7M-DARWIN %s
+// CHECK-V7M-DARWIN: "-cc1"{{.*}} "-triple" "thumbv7m-{{.*}} "-target-cpu" "cortex-m3"
+
+// RUN: %clang -target armv7em-apple-darwin -arch armv7em -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7EM-DARWIN %s
+// CHECK-V7EM-DARWIN: "-cc1"{{.*}} "-triple" "thumbv7em-{{.*}} "-target-cpu" "cortex-m4"
+
// RUN: %clang -target armv7a-linux-gnueabi -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7A %s
+// RUN: %clang -target arm-linux-gnueabi -march=armv7-a -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7A %s
// CHECK-V7A: "-cc1"{{.*}} "-triple" "armv7-{{.*}} "-target-cpu" "cortex-a8"
+// RUN: %clang -target armv7a-linux-gnueabi -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7A-THUMB %s
+// RUN: %clang -target arm-linux-gnueabi -march=armv7-a -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7A-THUMB %s
+// CHECK-V7A-THUMB: "-cc1"{{.*}} "-triple" "thumbv7-{{.*}} "-target-cpu" "cortex-a8"
+
// RUN: %clang -target armv7r-linux-gnueabi -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7R %s
+// RUN: %clang -target arm-linux-gnueabi -march=armv7-r -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7R %s
// CHECK-V7R: "-cc1"{{.*}} "-triple" "armv7r-{{.*}} "-target-cpu" "cortex-r4"
-// RUN: %clang -target armv8 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8A %s
+// RUN: %clang -target armv7r-linux-gnueabi -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7R-THUMB %s
+// RUN: %clang -target arm-linux-gnueabi -march=armv7-r -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7R-THUMB %s
+// CHECK-V7R-THUMB: "-cc1"{{.*}} "-triple" "thumbv7r-{{.*}} "-target-cpu" "cortex-r4"
+
+// RUN: %clang -target armv8 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8A %s
+// RUN: %clang -target arm -march=armv8 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8A %s
// RUN: %clang -target armv8a -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8A %s
+// RUN: %clang -target arm -march=armv8a -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8A %s
+// RUN: %clang -target arm -march=armv8-a -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8A %s
+// RUN: %clang -target armv8 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8A %s
+// RUN: %clang -target arm -march=armv8 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8A %s
+// RUN: %clang -target armv8a -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8A %s
+// RUN: %clang -target arm -march=armv8a -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8A %s
+// RUN: %clang -target arm -mlittle-endian -march=armv8-a -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8A %s
// CHECK-V8A: "-cc1"{{.*}} "-triple" "armv8-{{.*}}" "-target-cpu" "cortex-a53"
+// RUN: %clang -target armebv8 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V8A %s
+// RUN: %clang -target armeb -march=armebv8 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V8A %s
+// RUN: %clang -target armebv8a -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V8A %s
+// RUN: %clang -target armeb -march=armebv8a -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V8A %s
+// RUN: %clang -target armeb -march=armebv8-a -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V8A %s
+// RUN: %clang -target armv8 -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V8A %s
+// RUN: %clang -target arm -march=armebv8 -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V8A %s
+// RUN: %clang -target armv8a -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V8A %s
+// RUN: %clang -target arm -march=armebv8a -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V8A %s
+// RUN: %clang -target arm -march=armebv8-a -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V8A %s
+// CHECK-BE-V8A: "-cc1"{{.*}} "-triple" "armebv8-{{.*}}" "-target-cpu" "cortex-a53"
+
+// RUN: %clang -target armv8 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8A-THUMB %s
+// RUN: %clang -target arm -march=armv8 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8A-THUMB %s
+// RUN: %clang -target armv8a -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8A-THUMB %s
+// RUN: %clang -target arm -march=armv8a -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8A-THUMB %s
+// RUN: %clang -target armv8 -mlittle-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8A-THUMB %s
+// RUN: %clang -target arm -march=armv8 -mlittle-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8A-THUMB %s
+// RUN: %clang -target armv8a -mlittle-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8A-THUMB %s
+// RUN: %clang -target arm -march=armv8a -mlittle-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V8A-THUMB %s
+// CHECK-V8A-THUMB: "-cc1"{{.*}} "-triple" "thumbv8-{{.*}}" "-target-cpu" "cortex-a53"
+
+// RUN: %clang -target armebv8 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V8A-THUMB %s
+// RUN: %clang -target armeb -march=armebv8 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V8A-THUMB %s
+// RUN: %clang -target armebv8a -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V8A-THUMB %s
+// RUN: %clang -target armeb -march=armebv8a -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V8A-THUMB %s
+// RUN: %clang -target armv8 -mbig-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V8A-THUMB %s
+// RUN: %clang -target arm -march=armebv8 -mbig-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V8A-THUMB %s
+// RUN: %clang -target armv8a -mbig-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V8A-THUMB %s
+// RUN: %clang -target arm -march=armebv8a -mbig-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-V8A-THUMB %s
+// CHECK-BE-V8A-THUMB: "-cc1"{{.*}} "-triple" "thumbebv8-{{.*}}" "-target-cpu" "cortex-a53"
+
+// ================== Check default CPU on bogus architecture
+// RUN: %clang -target arm -march=armbogusv6 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BOGUS %s
+// CHECK-BOGUS: "-cc1"{{.*}} "-triple" "armv4t-{{.*}} "-target-cpu" "arm7tdmi"
+// RUN: %clang -target arm---eabihf -march=armbogusv7 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BOGUS-HF %s
+// CHECK-BOGUS-HF: "-cc1"{{.*}} "-triple" "armv6-{{.*}} "-target-cpu" "arm1176jzf-s"
+
// ================== Check default Architecture on each Cortex CPU
// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a5 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A %s
// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a7 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A %s
@@ -25,21 +169,119 @@
// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a9 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A %s
// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a12 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A %s
// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a15 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a5 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a7 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a8 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a9 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a12 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a15 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A %s
// CHECK-CPUV7A: "-cc1"{{.*}} "-triple" "armv7-{{.*}}
+// RUN: %clang -target armeb-linux-gnueabi -mcpu=cortex-a5 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7A %s
+// RUN: %clang -target armeb-linux-gnueabi -mcpu=cortex-a7 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7A %s
+// RUN: %clang -target armeb-linux-gnueabi -mcpu=cortex-a8 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7A %s
+// RUN: %clang -target armeb-linux-gnueabi -mcpu=cortex-a9 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7A %s
+// RUN: %clang -target armeb-linux-gnueabi -mcpu=cortex-a12 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7A %s
+// RUN: %clang -target armeb-linux-gnueabi -mcpu=cortex-a15 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7A %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a5 -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7A %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a7 -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7A %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a8 -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7A %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a9 -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7A %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a12 -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7A %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a15 -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7A %s
+// CHECK-BE-CPUV7A: "-cc1"{{.*}} "-triple" "armebv7-{{.*}}
+
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a5 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A-THUMB %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a7 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A-THUMB %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a8 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A-THUMB %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a9 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A-THUMB %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a12 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A-THUMB %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a15 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A-THUMB %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a5 -mlittle-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A-THUMB %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a7 -mlittle-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A-THUMB %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a8 -mlittle-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A-THUMB %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a9 -mlittle-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A-THUMB %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a12 -mlittle-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A-THUMB %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a15 -mlittle-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A-THUMB %s
+// CHECK-CPUV7A-THUMB: "-cc1"{{.*}} "-triple" "thumbv7-{{.*}}
+
+// RUN: %clang -target armeb-linux-gnueabi -mcpu=cortex-a5 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7A-THUMB %s
+// RUN: %clang -target armeb-linux-gnueabi -mcpu=cortex-a7 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7A-THUMB %s
+// RUN: %clang -target armeb-linux-gnueabi -mcpu=cortex-a8 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7A-THUMB %s
+// RUN: %clang -target armeb-linux-gnueabi -mcpu=cortex-a9 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7A-THUMB %s
+// RUN: %clang -target armeb-linux-gnueabi -mcpu=cortex-a12 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7A-THUMB %s
+// RUN: %clang -target armeb-linux-gnueabi -mcpu=cortex-a15 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7A-THUMB %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a5 -mbig-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7A-THUMB %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a7 -mbig-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7A-THUMB %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a8 -mbig-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7A-THUMB %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a9 -mbig-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7A-THUMB %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a12 -mbig-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7A-THUMB %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-a15 -mbig-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7A-THUMB %s
+// CHECK-BE-CPUV7A-THUMB: "-cc1"{{.*}} "-triple" "thumbebv7-{{.*}}
+
// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-m0 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV6M %s
// CHECK-CPUV6M: "-cc1"{{.*}} "-triple" "thumbv6m-{{.*}}
// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-m3 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7M %s
-// CHECK-CPUV7M: "-cc1"{{.*}} "-triple" "armv7m-{{.*}}
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-m3 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7M %s
+// CHECK-CPUV7M: "-cc1"{{.*}} "-triple" "thumbv7m-{{.*}}
+
+// RUN: %clang -target armeb-linux-gnueabi -mcpu=cortex-m3 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7M %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-m3 -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7M %s
+// CHECK-BE-CPUV7M: "-cc1"{{.*}} "-triple" "thumbebv7m-{{.*}}
// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-m4 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7EM %s
-// CHECK-CPUV7EM: "-cc1"{{.*}} "-triple" "armv7em-{{.*}}
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-m4 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7EM %s
+// CHECK-CPUV7EM: "-cc1"{{.*}} "-triple" "thumbv7em-{{.*}}
+
+// RUN: %clang -target armeb-linux-gnueabi -mcpu=cortex-m4 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7EM %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-m4 -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7EM %s
+// CHECK-BE-CPUV7EM: "-cc1"{{.*}} "-triple" "thumbebv7em-{{.*}}
// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r4 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R %s
// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r5 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r4 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r5 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R %s
// CHECK-CPUV7R: "-cc1"{{.*}} "-triple" "armv7r-{{.*}}
+// RUN: %clang -target armeb-linux-gnueabi -mcpu=cortex-r4 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7R %s
+// RUN: %clang -target armeb-linux-gnueabi -mcpu=cortex-r5 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7R %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r4 -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7R %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r5 -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7R %s
+// CHECK-BE-CPUV7R: "-cc1"{{.*}} "-triple" "armebv7r-{{.*}}
+
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r4 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R-THUMB %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r5 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R-THUMB %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r4 -mlittle-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R-THUMB %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r5 -mlittle-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7R-THUMB %s
+// CHECK-CPUV7R-THUMB: "-cc1"{{.*}} "-triple" "thumbv7r-{{.*}}
+
+// RUN: %clang -target armeb-linux-gnueabi -mcpu=cortex-r4 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7R-THUMB %s
+// RUN: %clang -target armeb-linux-gnueabi -mcpu=cortex-r5 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7R-THUMB %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r4 -mbig-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7R-THUMB %s
+// RUN: %clang -target arm-linux-gnueabi -mcpu=cortex-r5 -mbig-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV7R-THUMB %s
+// CHECK-BE-CPUV7R-THUMB: "-cc1"{{.*}} "-triple" "thumbebv7r-{{.*}}
+
// RUN: %clang -target arm -mcpu=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV8A %s
// RUN: %clang -target arm -mcpu=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV8A %s
+// RUN: %clang -target arm -mcpu=cortex-a53 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV8A %s
+// RUN: %clang -target arm -mcpu=cortex-a57 -mlittle-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV8A %s
// CHECK-CPUV8A: "-cc1"{{.*}} "-triple" "armv8-{{.*}}
+
+// RUN: %clang -target armeb -mcpu=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV8A %s
+// RUN: %clang -target armeb -mcpu=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV8A %s
+// RUN: %clang -target arm -mcpu=cortex-a53 -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV8A %s
+// RUN: %clang -target arm -mcpu=cortex-a57 -mbig-endian -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV8A %s
+// CHECK-BE-CPUV8A: "-cc1"{{.*}} "-triple" "armebv8-{{.*}}
+
+// RUN: %clang -target arm -mcpu=cortex-a53 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV8A-THUMB %s
+// RUN: %clang -target arm -mcpu=cortex-a57 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV8A-THUMB %s
+// RUN: %clang -target arm -mcpu=cortex-a53 -mlittle-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV8A-THUMB %s
+// RUN: %clang -target arm -mcpu=cortex-a57 -mlittle-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV8A-THUMB %s
+// CHECK-CPUV8A-THUMB: "-cc1"{{.*}} "-triple" "thumbv8-{{.*}}
+
+// RUN: %clang -target armeb -mcpu=cortex-a53 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV8A-THUMB %s
+// RUN: %clang -target armeb -mcpu=cortex-a57 -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV8A-THUMB %s
+// RUN: %clang -target arm -mcpu=cortex-a53 -mbig-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV8A-THUMB %s
+// RUN: %clang -target arm -mcpu=cortex-a57 -mbig-endian -mthumb -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BE-CPUV8A-THUMB %s
+// CHECK-BE-CPUV8A-THUMB: "-cc1"{{.*}} "-triple" "thumbebv8-{{.*}}
diff --git a/test/Driver/arm-hwdiv.c b/test/Driver/arm-hwdiv.c
index b3617ce53452..0b75948d2b98 100644
--- a/test/Driver/arm-hwdiv.c
+++ b/test/Driver/arm-hwdiv.c
@@ -37,3 +37,8 @@
// CHECK-ALT: "-target-feature" "+hwdiv-arm"
// CHECK-ALT: "-target-feature" "-hwdiv"
+// RUN: %clang -### -target arm %s --mhwdiv=arm -o %t.o 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-ALT-EQ %s
+// CHECK-ALT-EQ: "-target-feature" "+hwdiv-arm"
+// CHECK-ALT-EQ: "-target-feature" "-hwdiv"
+
diff --git a/test/Driver/arm-long-calls.c b/test/Driver/arm-long-calls.c
new file mode 100644
index 000000000000..62294a09c22a
--- /dev/null
+++ b/test/Driver/arm-long-calls.c
@@ -0,0 +1,15 @@
+// RUN: %clang -target armv7-eabi -### %s 2>&1 \
+// RUN: | FileCheck %s -check-prefix CHECK-DEFAULT
+
+// RUN: %clang -target armv7-eabi -### -mlong-calls %s 2>&1 \
+// RUN: | FileCheck %s -check-prefix CHECK-LONG-CALLS
+
+// RUN: %clang -target armv7-eabi -### -mlong-calls -mno-long-calls %s 2>&1 \
+// RUN: | FileCheck %s -check-prefix CHECK-NO-LONG-CALLS
+
+// CHECK-DEFAULT-NOT: "-backend-option" "-arm-long-calls"
+
+// CHECK-LONG-CALLS: "-backend-option" "-arm-long-calls"
+
+// CHECK-NO-LONG-CALLS-NOT: "-backend-option" "-arm-long-calls"
+
diff --git a/test/Driver/arm-mfpu.c b/test/Driver/arm-mfpu.c
index 765b2982156a..89c203542259 100644
--- a/test/Driver/arm-mfpu.c
+++ b/test/Driver/arm-mfpu.c
@@ -39,6 +39,30 @@
// CHECK-VFP3: "-target-feature" "+vfp3"
// CHECK-VFP3: "-target-feature" "-neon"
+// RUN: %clang -target arm-linux-eabi -mfpu=vfp4 %s -### -o %t.o 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-VFP4 %s
+// RUN: %clang -target arm-linux-eabi -mfpu=vfpv4 %s -### -o %t.o 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-VFP4 %s
+// CHECK-VFP4: "-target-feature" "+vfp4"
+// CHECK-VFP4: "-target-feature" "-neon"
+
+// RUN: %clang -target arm-linux-eabi -mfpu=vfp4-d16 %s -### -o %t.o 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-VFP4-D16 %s
+// RUN: %clang -target arm-linux-eabi -mfpu=vfpv4-d16 %s -### -o %t.o 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-VFP4-D16 %s
+// CHECK-VFP4-D16: "-target-feature" "+vfp4"
+// CHECK-VFP4-D16: "-target-feature" "+d16"
+// CHECK-VFP4-D16: "-target-feature" "-neon"
+
+// RUN: %clang -target arm-linux-eabi -mfpu=fp4-sp-d16 %s -### -o %t.o 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-FP4-SP-D16 %s
+// RUN: %clang -target arm-linux-eabi -mfpu=fpv4-sp-d16 %s -### -o %t.o 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-FP4-SP-D16 %s
+// CHECK-FP4-SP-D16: "-target-feature" "+vfp4"
+// CHECK-FP4-SP-D16: "-target-feature" "+d16"
+// CHECK-FP4-SP-D16: "-target-feature" "+fp-only-sp"
+// CHECK-FP4-SP-D16: "-target-feature" "-neon"
+
// RUN: %clang -target arm-linux-eabi -mfpu=neon %s -### -o %t.o 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NEON %s
// CHECK-NEON: "-target-feature" "+neon"
@@ -47,11 +71,16 @@
// RUN: | FileCheck --check-prefix=CHECK-SOFT-FLOAT %s
// CHECK-SOFT-FLOAT: "-target-feature" "-neon"
+// RUN: %clang -target armv8 %s -### 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-ARMV8-DEFAULT-SOFT-FP %s
+// CHECK-ARMV8-DEFAULT-SOFT-FP: "-target-feature" "-neon"
+// CHECK-ARMV8-DEFAULT-SOFT-FP: "-target-feature" "-crypto"
+
// RUN: %clang -target armv8 -mfpu=fp-armv8 %s -### 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-ARMV8-SOFT-FLOAT %s
// CHECK-ARMV8-SOFT-FLOAT: "-target-feature" "+fp-armv8"
-// CHECK-ARMV8-SOFT-FLOAT: "-target-feature" "-crypto"
// CHECK-ARMV8-SOFT-FLOAT: "-target-feature" "-neon"
+// CHECK-ARMV8-SOFT-FLOAT: "-target-feature" "-crypto"
// RUN: %clang -target armv8-linux-gnueabihf -mfpu=fp-armv8 %s -### 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-FP-ARMV8 %s
@@ -84,3 +113,7 @@
// RUN: %clang -target arm-linux-gnueabihf %s -### 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-HF %s
// CHECK-HF: "-target-cpu" "arm1136jf-s"
+
+// RUN: %clang -target armv7-apple-darwin -x assembler %s -### -c 2>&1 \
+// RUN: | FileCheck --check-prefix=ASM %s
+// ASM-NOT: -target-feature
diff --git a/test/Driver/arm64-as.s b/test/Driver/arm64-as.s
new file mode 100644
index 000000000000..061e5b2eff87
--- /dev/null
+++ b/test/Driver/arm64-as.s
@@ -0,0 +1,5 @@
+// Make sure the arm64 default on cyclone when compiling for apple.
+// RUN: %clang -target arm64-apple-ios -arch arm64 -### -c %s 2>&1 | FileCheck -check-prefix=TARGET %s
+//
+// TARGET: "-cc1as"
+// TARGET: "-target-cpu" "cyclone"
diff --git a/test/Driver/arm64-darwinpcs.c b/test/Driver/arm64-darwinpcs.c
new file mode 100644
index 000000000000..8d285528de5c
--- /dev/null
+++ b/test/Driver/arm64-darwinpcs.c
@@ -0,0 +1,3 @@
+// RUN: %clang -target arm64-apple-ios7.0 -### %s 2>&1 | FileCheck %s
+
+// CHECK: "-target-abi" "darwinpcs"
diff --git a/test/Driver/asan.c b/test/Driver/asan.c
index c9b3796b4436..f199e904e758 100644
--- a/test/Driver/asan.c
+++ b/test/Driver/asan.c
@@ -1,9 +1,8 @@
-// RUN: %clang -target i386-unknown-unknown -faddress-sanitizer %s -S -emit-llvm -o - | FileCheck %s
-// RUN: %clang -O1 -target i386-unknown-unknown -faddress-sanitizer %s -S -emit-llvm -o - | FileCheck %s
-// RUN: %clang -O2 -target i386-unknown-unknown -faddress-sanitizer %s -S -emit-llvm -o - | FileCheck %s
-// RUN: %clang -O3 -target i386-unknown-unknown -faddress-sanitizer %s -S -emit-llvm -o - | FileCheck %s
-// RUN: %clang -target i386-unknown-unknown -fsanitize=address %s -S -emit-llvm -o - | FileCheck %s
-// Verify that -faddress-sanitizer invokes asan instrumentation.
+// RUN: %clang -target i386-unknown-unknown -fsanitize=address %s -S -emit-llvm -o - | FileCheck %s
+// RUN: %clang -O1 -target i386-unknown-unknown -fsanitize=address %s -S -emit-llvm -o - | FileCheck %s
+// RUN: %clang -O2 -target i386-unknown-unknown -fsanitize=address %s -S -emit-llvm -o - | FileCheck %s
+// RUN: %clang -O3 -target i386-unknown-unknown -fsanitize=address %s -S -emit-llvm -o - | FileCheck %s
+// Verify that -fsanitize=address invokes asan instrumentation.
int foo(int *a) { return *a; }
// CHECK: __asan_init
diff --git a/test/Driver/at_file_missing.c b/test/Driver/at_file_missing.c
new file mode 100644
index 000000000000..0189a8bb7571
--- /dev/null
+++ b/test/Driver/at_file_missing.c
@@ -0,0 +1,7 @@
+// Make sure that arguments that begin with @ are left as is in the argument
+// stream, and also that @file arguments continue to be processed.
+
+// RUN: echo "%s -D FOO" > %t.args
+// RUN: %clang -rpath @executable_path/../lib @%t.args -### 2>&1 | FileCheck %s
+// CHECK: "-D" "FOO"
+// CHECK: "-rpath" "@executable_path/../lib"
diff --git a/test/Driver/bindings.c b/test/Driver/bindings.c
index d25fc8f8afd6..dd8ad14f6725 100644
--- a/test/Driver/bindings.c
+++ b/test/Driver/bindings.c
@@ -1,7 +1,7 @@
// Basic binding.
-// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings %s 2>&1 | FileCheck %s --check-prefix=CHECK01
+// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -no-integrated-as %s 2>&1 | FileCheck %s --check-prefix=CHECK01
// CHECK01: "clang", inputs: ["{{.*}}bindings.c"], output: "{{.*}}.s"
-// CHECK01: "gcc::Assemble", inputs: ["{{.*}}.s"], output: "{{.*}}.o"
+// CHECK01: "GNU::Assemble", inputs: ["{{.*}}.s"], output: "{{.*}}.o"
// CHECK01: "gcc::Link", inputs: ["{{.*}}.o"], output: "a.out"
// Clang control options
diff --git a/test/Driver/bitrig.c b/test/Driver/bitrig.c
index 876a9cdb9eae..934cb02f2240 100644
--- a/test/Driver/bitrig.c
+++ b/test/Driver/bitrig.c
@@ -4,14 +4,14 @@
// CHECK-LD-C: ld{{.*}}" {{.*}} "-lc" "-lclang_rt.amd64"
// RUN: %clangxx -no-canonical-prefixes -target amd64-pc-bitrig %s -### 2>&1 \
-// RUN: | FileCheck --check-prefix=CHECK-LD-CXX %s
-// CHECK-LD-CXX: clang{{.*}}" "-cc1" "-triple" "amd64-pc-bitrig"
-// CHECK-LD-CXX: ld{{.*}}" {{.*}} "-lstdc++" "-lm" "-lc" "-lclang_rt.amd64"
-
-// RUN: %clangxx -stdlib=libc++ -no-canonical-prefixes -target amd64-pc-bitrig %s -### 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-LD-CXX-STDLIB %s
// CHECK-LD-CXX-STDLIB: clang{{.*}}" "-cc1" "-triple" "amd64-pc-bitrig"
-// CHECK-LD-CXX-STDLIB: ld{{.*}}" {{.*}} "-lc++" "-lcxxrt" "-lgcc" "-lm" "-lc" "-lclang_rt.amd64"
+// CHECK-LD-CXX-STDLIB: ld{{.*}}" {{.*}} "-lc++" "-lc++abi" "-lpthread" "-lm" "-lc" "-lclang_rt.amd64"
+
+// RUN: %clangxx -stdlib=libstdc++ -no-canonical-prefixes -target amd64-pc-bitrig %s -### 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-LD-CXX %s
+// CHECK-LD-CXX: clang{{.*}}" "-cc1" "-triple" "amd64-pc-bitrig"
+// CHECK-LD-CXX: ld{{.*}}" {{.*}} "-lstdc++" "-lm" "-lc" "-lclang_rt.amd64"
// RUN: %clang -no-canonical-prefixes -target amd64-pc-bitrig -pthread %s -### 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-PTHREAD %s
diff --git a/test/Driver/bounds-checking.c b/test/Driver/bounds-checking.c
deleted file mode 100644
index fdd20ca374ef..000000000000
--- a/test/Driver/bounds-checking.c
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: %clang -fsanitize=bounds -### -fsyntax-only %s 2> %t
-// RUN: FileCheck -check-prefix=CHECK < %t %s
-// CHECK: "-fsanitize=array-bounds,local-bounds"
-
-// RUN: %clang -fbounds-checking -### -fsyntax-only %s 2> %t
-// RUN: FileCheck -check-prefix=CHECK-OLD < %t %s
-// CHECK-OLD: "-fsanitize=local-bounds"
-
-// RUN: %clang -fbounds-checking=3 -### -fsyntax-only %s 2> %t
-// RUN: FileCheck -check-prefix=CHECK-OLD2 < %t %s
-// CHECK-OLD2: "-fsanitize=local-bounds"
diff --git a/test/Driver/cfi.c b/test/Driver/cfi.c
deleted file mode 100644
index c33d19042861..000000000000
--- a/test/Driver/cfi.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// RUN: %clang -target i386-apple-darwin10 \
-// RUN: -no-integrated-as -### %s 2>&1 | \
-// RUN: FileCheck --check-prefix=CHECK-DARWIN %s
-
-// RUN: %clang -target i386-pc-linux-gnu -static -### %s 2>&1 | \
-// RUN: FileCheck --check-prefix=CHECK-LINUX %s
-
-// CHECK-DARWIN: -fno-dwarf2-cfi-asm
-// CHECK-LINUX-NOT: -fno-dwarf2-cfi-asm
diff --git a/test/Driver/cl-eh.cpp b/test/Driver/cl-eh.cpp
new file mode 100644
index 000000000000..8a3450a88c06
--- /dev/null
+++ b/test/Driver/cl-eh.cpp
@@ -0,0 +1,24 @@
+// Don't attempt slash switches on msys bash.
+// REQUIRES: shell-preserves-root
+
+// Note: %s must be preceded by --, otherwise it may be interpreted as a
+// command-line option, e.g. on Mac where %s is commonly under /Users.
+
+// RUN: %clang_cl /c /EHsc -### -- %s 2>&1 | FileCheck -check-prefix=EHsc %s
+// EHsc: "-fexceptions"
+
+// RUN: %clang_cl /c /EHs-c- -### -- %s 2>&1 | FileCheck -check-prefix=EHs_c_ %s
+// EHs_c_-NOT: "-fexceptions"
+
+// RUN: %clang_cl /c /EHs- /EHc- -### -- %s 2>&1 | FileCheck -check-prefix=EHs_EHc_ %s
+// EHs_EHc_-NOT: "-fexceptions"
+
+// RUN: %clang_cl /c /EHs- /EHs -### -- %s 2>&1 | FileCheck -check-prefix=EHs_EHs %s
+// EHs_EHs: "-fexceptions"
+
+// RUN: %clang_cl /c /EHs- /EHsa -### -- %s 2>&1 | FileCheck -check-prefix=EHs_EHa %s
+// EHs_EHa: "-fexceptions"
+
+// RUN: %clang_cl /c /EHinvalid -### -- %s 2>&1 | FileCheck -check-prefix=EHinvalid %s
+// EHinvalid: error: invalid value 'invalid' in '/EH'
+// EHinvalid-NOT: error:
diff --git a/test/Driver/cl-fallback.c b/test/Driver/cl-fallback.c
index 2433072a0250..bbc9ad84d6f3 100644
--- a/test/Driver/cl-fallback.c
+++ b/test/Driver/cl-fallback.c
@@ -4,8 +4,10 @@
// Note: %s must be preceded by --, otherwise it may be interpreted as a
// command-line option, e.g. on Mac where %s is commonly under /Users.
-// RUN: %clang_cl /fallback /Dfoo=bar /Ubaz /Ifoo /O0 /Ox /GR /GR- /LD /LDd \
-// RUN: /MD /MDd /MTd /MT /FImyheader.h -### -- %s 2>&1 | FileCheck %s
+// RUN: %clang_cl /fallback /Dfoo=bar /Ubaz /Ifoo /O0 /Ox /GR /GR- /Gy /Gy- \
+// RUN: /Gw /Gw- /LD /LDd /EHs /EHs- /MD /MDd /MTd /MT /FImyheader.h /Zi \
+// RUN: -### -- %s 2>&1 \
+// RUN: | FileCheck %s
// CHECK: "-fdiagnostics-format" "msvc-fallback"
// CHECK: ||
// CHECK: cl.exe
@@ -17,13 +19,22 @@
// CHECK: "-I" "foo"
// CHECK: "/Ox"
// CHECK: "/GR-"
+// CHECK: "/Gy-"
+// CHECK: "/Gw-"
+// CHECK: "/Z7"
// CHECK: "/FImyheader.h"
// CHECK: "/LD"
// CHECK: "/LDd"
+// CHECK: "/EHs"
+// CHECK: "/EHs-"
// CHECK: "/MT"
// CHECK: "/Tc" "{{.*cl-fallback.c}}"
// CHECK: "/Fo{{.*cl-fallback.*.obj}}"
+// RUN: %clang_cl /fallback /GR- -### -- %s 2>&1 | FileCheck -check-prefix=GR %s
+// GR: cl.exe
+// GR: "/GR-"
+
// RUN: %clang_cl /fallback /Od -### -- %s 2>&1 | FileCheck -check-prefix=O0 %s
// O0: cl.exe
// O0: "/Od"
@@ -39,3 +50,28 @@
// RUN: %clang_cl /fallback /Ox -### -- %s 2>&1 | FileCheck -check-prefix=Ox %s
// Ox: cl.exe
// Ox: "/Ox"
+
+// Only fall back when actually compiling, not for e.g. /P (preprocess).
+// RUN: %clang_cl /fallback /P -### -- %s 2>&1 | FileCheck -check-prefix=P %s
+// P-NOT: ||
+// P-NOT: "cl.exe"
+
+// RUN: not %clang_cl /fallback /c -- %s 2>&1 | \
+// RUN: FileCheck -check-prefix=ErrWarn %s
+// ErrWarn: warning: falling back to {{.*}}cl.exe
+
+// RUN: %clang_cl /fallback /c /GR /GR- -### -- %s 2>&1 | \
+// RUN: FileCheck -check-prefix=NO_RTTI %s
+// NO_RTTI: "-cc1"
+// NO_RTTI: ||
+// NO_RTTI: cl.exe
+// NO_RTTI: "/GR-"
+
+// Don't fall back on non-C or C++ files.
+// RUN: %clang_cl /fallback -### -- %S/Inputs/file.ll 2>&1 | FileCheck -check-prefix=LL %s
+// LL: file.ll
+// LL-NOT: ||
+// LL-NOT: "cl.exe"
+
+
+#error "This fails to compile."
diff --git a/test/Driver/cl-inputs.c b/test/Driver/cl-inputs.c
index d6ee520257d5..029aeadaec42 100644
--- a/test/Driver/cl-inputs.c
+++ b/test/Driver/cl-inputs.c
@@ -33,3 +33,20 @@
// WARN: warning: overriding '/TC' option with '/TP'
// WARN: note: The last /TC or /TP option takes precedence over earlier instances
// WARN-NOT: note
+
+// RUN: not %clang_cl - 2>&1 | FileCheck -check-prefix=STDIN %s
+// STDIN: error: use /Tc or /Tp
+
+// RUN: %clang_cl -### /Tc - 2>&1 | FileCheck -check-prefix=STDINTc %s
+// STDINTc: "-x" "c"
+
+// RUN: env LIB=%S/Inputs/cl-libs %clang_cl -### -- %s cl-test.lib 2>&1 | FileCheck -check-prefix=LIBINPUT %s
+// LIBINPUT: link.exe"
+// LIBINPUT: "cl-test.lib"
+
+// RUN: env LIB=%S/Inputs/cl-libs %clang_cl -### -- %s cl-test2.lib 2>&1 | FileCheck -check-prefix=LIBINPUT2 %s
+// LIBINPUT2: error: no such file or directory: 'cl-test2.lib'
+// LIBINPUT2: link.exe"
+// LIBINPUT2-NOT: "cl-test2.lib"
+
+void f();
diff --git a/test/Driver/cl-link.c b/test/Driver/cl-link.c
index 24e0702c8ab3..f4717465d3ec 100644
--- a/test/Driver/cl-link.c
+++ b/test/Driver/cl-link.c
@@ -16,6 +16,7 @@
// ASAN: "-debug"
// ASAN: "-incremental:no"
// ASAN: "{{.*}}clang_rt.asan-i386.lib"
+// ASAN: "{{.*}}clang_rt.asan_cxx-i386.lib"
// ASAN: "{{.*}}cl-link{{.*}}.obj"
// RUN: %clang_cl /LD -### /Tc%s 2>&1 | FileCheck --check-prefix=DLL %s
@@ -31,3 +32,7 @@
// ASAN-DLL: "-incremental:no"
// ASAN-DLL: "{{.*}}clang_rt.asan_dll_thunk-i386.lib"
// ASAN-DLL: "{{.*}}cl-link{{.*}}.obj"
+
+// RUN: %clang_cl /Zi /Tc%s -### 2>&1 | FileCheck --check-prefix=DEBUG %s
+// DEBUG: link.exe
+// DEBUG: "-debug"
diff --git a/test/Driver/cl-options.c b/test/Driver/cl-options.c
index 01032bb38eec..26cd7e9eb4c6 100644
--- a/test/Driver/cl-options.c
+++ b/test/Driver/cl-options.c
@@ -7,19 +7,47 @@
// Alias options:
-// RUN: %clang_cl /c -### -- %s 2>&1 | FileCheck -check-prefix=C %s
-// C: -c
+// RUN: %clang_cl /c -### -- %s 2>&1 | FileCheck -check-prefix=c %s
+// c: -c
+
+// RUN: %clang_cl /C -### -- %s 2>&1 | FileCheck -check-prefix=C %s
+// C: error: invalid argument '-C' only allowed with '/E, /P or /EP'
+
+// RUN: %clang_cl /C /P -### -- %s 2>&1 | FileCheck -check-prefix=C_P %s
+// C_P: "-E"
+// C_P: "-C"
// RUN: %clang_cl /Dfoo=bar -### -- %s 2>&1 | FileCheck -check-prefix=D %s
// RUN: %clang_cl /D foo=bar -### -- %s 2>&1 | FileCheck -check-prefix=D %s
// D: "-D" "foo=bar"
+// RUN: %clang_cl /E -### -- %s 2>&1 | FileCheck -check-prefix=E %s
+// E: "-E"
+// E: "-o" "-"
+
+// RUN: %clang_cl /EP -### -- %s 2>&1 | FileCheck -check-prefix=EP %s
+// EP: "-E"
+// EP: "-P"
+// EP: "-o" "-"
+
// RTTI is on by default; just check that we don't error.
// RUN: %clang_cl /Zs /GR -- %s 2>&1
// RUN: %clang_cl /GR- -### -- %s 2>&1 | FileCheck -check-prefix=GR_ %s
// GR_: -fno-rtti
+// RUN: %clang_cl /Gy -### -- %s 2>&1 | FileCheck -check-prefix=Gy %s
+// Gy: -ffunction-sections
+
+// RUN: %clang_cl /Gy /Gy- -### -- %s 2>&1 | FileCheck -check-prefix=Gy_ %s
+// Gy_-NOT: -ffunction-sections
+
+// RUN: %clang_cl /Gw -### -- %s 2>&1 | FileCheck -check-prefix=Gw %s
+// Gw: -fdata-sections
+
+// RUN: %clang_cl /Gw /Gw- -### -- %s 2>&1 | FileCheck -check-prefix=Gw_ %s
+// Gw_-NOT: -fdata-sections
+
// RUN: %clang_cl /Imyincludedir -### -- %s 2>&1 | FileCheck -check-prefix=SLASH_I %s
// RUN: %clang_cl /I myincludedir -### -- %s 2>&1 | FileCheck -check-prefix=SLASH_I %s
// SLASH_I: "-I" "myincludedir"
@@ -56,16 +84,38 @@
// RUN: %clang_cl /Oy- -### -- %s 2>&1 | FileCheck -check-prefix=Oy_ %s
// Oy_: -mdisable-fp-elim
-// RUN: %clang_cl /P -### -- %s 2>&1 | FileCheck -check-prefix=P %s
-// P: -E
-
// RUN: %clang_cl /showIncludes -### -- %s 2>&1 | FileCheck -check-prefix=showIncludes %s
// showIncludes: --show-includes
+// RUN: %clang_cl /E /showIncludes -### -- %s 2>&1 | FileCheck -check-prefix=showIncludes_E %s
+// RUN: %clang_cl /EP /showIncludes -### -- %s 2>&1 | FileCheck -check-prefix=showIncludes_E %s
+// showIncludes_E: warning: argument unused during compilation: '--show-includes'
+
// RUN: %clang_cl /Umymacro -### -- %s 2>&1 | FileCheck -check-prefix=U %s
// RUN: %clang_cl /U mymacro -### -- %s 2>&1 | FileCheck -check-prefix=U %s
// U: "-U" "mymacro"
+// RUN: %clang_cl /vd2 -### -- %s 2>&1 | FileCheck -check-prefix=VD2 %s
+// VD2: -vtordisp-mode=2
+
+// RUN: %clang_cl /vmg -### -- %s 2>&1 | FileCheck -check-prefix=VMG %s
+// VMG: "-fms-memptr-rep=virtual"
+
+// RUN: %clang_cl /vmg /vms -### -- %s 2>&1 | FileCheck -check-prefix=VMS %s
+// VMS: "-fms-memptr-rep=single"
+
+// RUN: %clang_cl /vmg /vmm -### -- %s 2>&1 | FileCheck -check-prefix=VMM %s
+// VMM: "-fms-memptr-rep=multiple"
+
+// RUN: %clang_cl /vmg /vmv -### -- %s 2>&1 | FileCheck -check-prefix=VMV %s
+// VMV: "-fms-memptr-rep=virtual"
+
+// RUN: %clang_cl /vmg /vmb -### -- %s 2>&1 | FileCheck -check-prefix=VMB %s
+// VMB: '/vmg' not allowed with '/vmb'
+
+// RUN: %clang_cl /vmg /vmm /vms -### -- %s 2>&1 | FileCheck -check-prefix=VMX %s
+// VMX: '/vms' not allowed with '/vmm'
+
// RUN: %clang_cl /W0 -### -- %s 2>&1 | FileCheck -check-prefix=W0 %s
// W0: -w
@@ -99,10 +149,22 @@
// WJoined: "-cc1"
// WJoined: "-Wunused-pragmas"
+// We recognize -f[no-]strict-aliasing.
+// RUN: %clang_cl -c -### -- %s 2>&1 | FileCheck -check-prefix=DEFAULTSTRICT %s
+// DEFAULTSTRICT: "-relaxed-aliasing"
+// RUN: %clang_cl -c -fstrict-aliasing -### -- %s 2>&1 | FileCheck -check-prefix=STRICT %s
+// STRICT-NOT: "-relaxed-aliasing"
+// RUN: %clang_cl -c -fno-strict-aliasing -### -- %s 2>&1 | FileCheck -check-prefix=NOSTRICT %s
+// NOSTRICT: "-relaxed-aliasing"
+
+// For some warning ids, we can map from MSVC warning to Clang warning.
+// RUN: %clang_cl -wd4005 -### -- %s 2>&1 | FileCheck -check-prefix=wd4005 %s
+// wd4005: "-cc1"
+// wd4005: "-Wno-macro-redefined"
// Ignored options. Check that we don't get "unused during compilation" errors.
-// (/Zs is for syntax-only, /WX is for -Werror)
-// RUN: %clang_cl /Zs /WX \
+// (/Zs is for syntax-only)
+// RUN: %clang_cl /Zs \
// RUN: /analyze- \
// RUN: /errorReport:foo \
// RUN: /FS \
@@ -120,7 +182,10 @@
// RUN: /wd1234 \
// RUN: /Zc:forScope \
// RUN: /Zc:wchar_t \
-// RUN: -- %s
+// RUN: /Zc:inline \
+// RUN: /Zc:rvalueCast \
+// RUN: -### -- %s 2>&1 | FileCheck -check-prefix=IGNORED %s
+// IGNORED-NOT: argument unused during compilation
// Ignored options and compile-only options are ignored for link jobs.
// RUN: touch %t.obj
@@ -131,18 +196,16 @@
// Support ignoring warnings about unused arguments.
// RUN: %clang_cl /Abracadabra -Qunused-arguments -### -- %s 2>&1 | FileCheck -check-prefix=UNUSED %s
-// UNUSED-NOT: warning
+// UNUSED-NOT: argument unused during compilation
// Unsupported but parsed options. Check that we don't error on them.
// (/Zs is for syntax-only)
// RUN: %clang_cl /Zs \
// RUN: /AIfoo \
-// RUN: /arch:sse2 \
// RUN: /clr:pure \
// RUN: /docname \
-// RUN: /E \
+// RUN: /d2Zi+ \
// RUN: /EHsc \
-// RUN: /EP \
// RUN: /F \
// RUN: /FA \
// RUN: /FAc \
@@ -176,8 +239,6 @@
// RUN: /Gs1000 \
// RUN: /GT \
// RUN: /GX \
-// RUN: /Gy \
-// RUN: /Gy- \
// RUN: /Gz \
// RUN: /GZ \
// RUN: /H \
@@ -196,11 +257,6 @@
// RUN: /Qvec-report:2 \
// RUN: /u \
// RUN: /V \
-// RUN: /vd2 \
-// RUN: /vmb \
-// RUN: /vmm \
-// RUN: /vms \
-// RUN: /vmv \
// RUN: /volatile \
// RUN: /wfoo \
// RUN: /WL \
@@ -223,6 +279,7 @@
// RUN: /ZI \
// RUN: /Zl \
// RUN: /Zp \
+// RUN: /Zp1 \
// RUN: /ZW:nostdlib \
// RUN: -- %s 2>&1
@@ -231,8 +288,25 @@
// Xclang: "-cc1"
// Xclang: "hellocc1"
-// We support -m32 and -m64.
-// RUN: %clang_cl /Zs /WX -m32 -m64 -- %s
+// RTTI is on by default. /GR- controls -fno-rtti-data.
+// RUN: %clang_cl /c /GR- -### -- %s 2>&1 | FileCheck -check-prefix=NoRTTI %s
+// NoRTTI: "-fno-rtti-data"
+// NoRTTI-NOT: "-fno-rtti"
+// RUN: %clang_cl /c /GR -### -- %s 2>&1 | FileCheck -check-prefix=RTTI %s
+// RTTI-NOT: "-fno-rtti-data"
+// RTTI-NOT: "-fno-rtti"
+
+// Accept "core" clang options.
+// (/Zs is for syntax-only)
+// RUN: %clang_cl \
+// RUN: --driver-mode=cl \
+// RUN: -ferror-limit=10 \
+// RUN: -fmsc-version=1800 \
+// RUN: -fno-strict-aliasing \
+// RUN: -fstrict-aliasing \
+// RUN: -mllvm -disable-llvm-optzns \
+// RUN: -Wunused-variables \
+// RUN: /Zs -- %s 2>&1
void f() { }
diff --git a/test/Driver/cl-outputs.c b/test/Driver/cl-outputs.c
index 2ceaa85471b1..46502f6427d6 100644
--- a/test/Driver/cl-outputs.c
+++ b/test/Driver/cl-outputs.c
@@ -105,3 +105,15 @@
// FaDIRNAMEEXT: "-o" "foo.dir{{[/\\]+}}a.ext"
// RUN: %clang_cl /Faa.asm -### -- %s %s 2>&1 | FileCheck -check-prefix=FaMULTIPLESOURCE %s
// FaMULTIPLESOURCE: error: cannot specify '/Faa.asm' when compiling multiple source files
+
+// RUN: %clang_cl /P -### -- %s 2>&1 | FileCheck -check-prefix=P %s
+// P: "-E"
+// P: "-o" "cl-outputs.i"
+
+// RUN: %clang_cl /P /Fifoo -### -- %s 2>&1 | FileCheck -check-prefix=Fi1 %s
+// Fi1: "-E"
+// Fi1: "-o" "foo.i"
+
+// RUN: %clang_cl /P /Fifoo.x -### -- %s 2>&1 | FileCheck -check-prefix=Fi2 %s
+// Fi2: "-E"
+// Fi2: "-o" "foo.x"
diff --git a/test/Driver/cl-x86-flags.c b/test/Driver/cl-x86-flags.c
new file mode 100644
index 000000000000..62083dbceb19
--- /dev/null
+++ b/test/Driver/cl-x86-flags.c
@@ -0,0 +1,83 @@
+// Don't attempt slash switches on msys bash.
+// REQUIRES: shell-preserves-root
+// REQUIRES: x86-registered-target
+
+// We support -m32 and -m64. We support all x86 CPU feature flags in gcc's -m
+// flag space.
+// RUN: %clang_cl /Zs /WX -m32 -m64 -msse3 -msse4.1 -mavx -mno-avx \
+// RUN: --target=i386-pc-win32 -### -- 2>&1 %s | FileCheck -check-prefix=MFLAGS %s
+// MFLAGS-NOT: argument unused during compilation
+
+// -arch:IA32 is no-op.
+// RUN: %clang_cl -m32 -arch:IA32 -### -- 2>&1 %s | FileCheck -check-prefix=IA32 %s
+// IA32-NOT: argument unused during compilation
+// IA32-NOT: -target-feature
+
+// RUN: %clang_cl -m32 -arch:ia32 -### -- 2>&1 %s | FileCheck -check-prefix=ia32 %s
+// ia32: argument unused during compilation
+// ia32-NOT: -target-feature
+
+// RUN: %clang_cl -m64 -arch:IA32 -### -- 2>&1 %s | FileCheck -check-prefix=IA3264 %s
+// IA3264: argument unused during compilation
+// IA3264-NOT: -target-feature
+
+// RUN: %clang_cl -m32 -arch:SSE -### -- 2>&1 %s | FileCheck -check-prefix=SSE %s
+// SSE: -target-feature
+// SSE: +sse
+// SSE-NOT: argument unused during compilation
+
+// RUN: %clang_cl -m32 -arch:sse -### -- 2>&1 %s | FileCheck -check-prefix=sse %s
+// sse: argument unused during compilation
+// sse-NOT: -target-feature
+
+// RUN: %clang_cl -m32 -arch:SSE2 -### -- 2>&1 %s | FileCheck -check-prefix=SSE2 %s
+// SSE2: -target-feature
+// SSE2: +sse2
+// SSE2-NOT: argument unused during compilation
+
+// RUN: %clang_cl -m32 -arch:sse2 -### -- 2>&1 %s | FileCheck -check-prefix=sse %s
+// sse2: argument unused during compilation
+// sse2-NOT: -target-feature
+
+// RUN: %clang_cl -m64 -arch:SSE -### -- 2>&1 %s | FileCheck -check-prefix=SSE64 %s
+// SSE64: argument unused during compilation
+// SSE64-NOT: -target-feature
+
+// RUN: %clang_cl -m64 -arch:SSE2 -### -- 2>&1 %s | FileCheck -check-prefix=SSE264 %s
+// SSE264: argument unused during compilation
+// SSE264-NOT: -target-feature
+
+// RUN: %clang_cl -m32 -arch:AVX -### -- 2>&1 %s | FileCheck -check-prefix=AVX %s
+// AVX: -target-feature
+// AVX: +avx
+
+// RUN: %clang_cl -m32 -arch:avx -### -- 2>&1 %s | FileCheck -check-prefix=avx %s
+// avx: argument unused during compilation
+// avx-NOT: -target-feature
+
+// RUN: %clang_cl -m32 -arch:AVX2 -### -- 2>&1 %s | FileCheck -check-prefix=AVX2 %s
+// AVX2: -target-feature
+// AVX2: +avx2
+
+// RUN: %clang_cl -m32 -arch:avx2 -### -- 2>&1 %s | FileCheck -check-prefix=avx2 %s
+// avx2: argument unused during compilation
+// avx2-NOT: -target-feature
+
+// RUN: %clang_cl -m64 -arch:AVX -### -- 2>&1 %s | FileCheck -check-prefix=AVX64 %s
+// AVX64: -target-feature
+// AVX64: +avx
+
+// RUN: %clang_cl -m64 -arch:avx -### -- 2>&1 %s | FileCheck -check-prefix=avx64 %s
+// avx64: argument unused during compilation
+// avx64-NOT: -target-feature
+
+// RUN: %clang_cl -m64 -arch:AVX2 -### -- 2>&1 %s | FileCheck -check-prefix=AVX264 %s
+// AVX264: -target-feature
+// AVX264: +avx2
+
+// RUN: %clang_cl -m64 -arch:avx2 -### -- 2>&1 %s | FileCheck -check-prefix=avx264 %s
+// avx264: argument unused during compilation
+// avx264-NOT: -target-feature
+
+void f() {
+}
diff --git a/test/Driver/cl.c b/test/Driver/cl.c
index 4fd406439797..855cdc8c9701 100644
--- a/test/Driver/cl.c
+++ b/test/Driver/cl.c
@@ -31,5 +31,4 @@
// CL-NOT: -fapple-kext
// RUN: %clang_cl /c -### -- %s 2>&1 | FileCheck -check-prefix=COMPILE %s
-// COMPILE: "-cxx-abi" "microsoft"
// COMPILE: "-fdiagnostics-format" "msvc"
diff --git a/test/Driver/clang-g-opts.c b/test/Driver/clang-g-opts.c
index 9ca1fd38e407..a9566b7ee1d5 100644
--- a/test/Driver/clang-g-opts.c
+++ b/test/Driver/clang-g-opts.c
@@ -2,15 +2,23 @@
// RUN: %clang -### -S %s -g -target x86_64-linux-gnu 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-WITH-G %s
// RUN: %clang -### -S %s -g -target x86_64-apple-darwin 2>&1 \
-// RUN: | FileCheck --check-prefix=CHECK-WITH-G-DARWIN %s
+// RUN: | FileCheck --check-prefix=CHECK-WITH-G-DWARF2 %s
+// RUN: %clang -### -S %s -g -target i686-pc-openbsd 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-WITH-G-DWARF2 %s
+// RUN: %clang -### -S %s -g -target x86_64-pc-freebsd10.0 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-WITH-G-DWARF2 %s
// RUN: %clang -### -S %s -g0 2>&1 | FileCheck --check-prefix=CHECK-WITHOUT-G %s
// RUN: %clang -### -S %s -g -g0 2>&1 | FileCheck --check-prefix=CHECK-WITHOUT-G %s
// RUN: %clang -### -S %s -g0 -g -target x86_64-linux-gnu 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-WITH-G %s
// RUN: %clang -### -S %s -g0 -g -target x86_64-apple-darwin 2>&1 \
-// RUN: | FileCheck --check-prefix=CHECK-WITH-G-DARWIN %s
+// RUN: | FileCheck --check-prefix=CHECK-WITH-G-DWARF2 %s
+// RUN: %clang -### -S %s -g0 -g -target i686-pc-openbsd 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-WITH-G-DWARF2 %s
+// RUN: %clang -### -S %s -g0 -g -target x86_64-pc-freebsd10.0 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-WITH-G-DWARF2 %s
// CHECK-WITHOUT-G-NOT: "-g"
// CHECK-WITH-G: "-g"
-// CHECK-WITH-G-DARWIN: "-gdwarf-2"
+// CHECK-WITH-G-DWARF2: "-gdwarf-2"
diff --git a/test/Driver/clang-translation.c b/test/Driver/clang-translation.c
index 09303841c34b..9db23a074d85 100644
--- a/test/Driver/clang-translation.c
+++ b/test/Driver/clang-translation.c
@@ -71,6 +71,12 @@
// PPCPWR7: "-target-cpu" "pwr7"
// RUN: %clang -target powerpc64-unknown-linux-gnu \
+// RUN: -### -S %s -mcpu=power8 2>&1 | FileCheck -check-prefix=PPCPWR8 %s
+// PPCPWR8: clang
+// PPCPWR8: "-cc1"
+// PPCPWR8: "-target-cpu" "pwr8"
+
+// RUN: %clang -target powerpc64-unknown-linux-gnu \
// RUN: -### -S %s -mcpu=a2q 2>&1 | FileCheck -check-prefix=PPCA2Q %s
// PPCA2Q: clang
// PPCA2Q: "-cc1"
@@ -203,11 +209,62 @@
// AMD64-MINGW: clang
// AMD64-MINGW: "-cc1"
// AMD64-MINGW: "-triple"
-// AMD64-MINGW: "amd64--mingw32"
+// AMD64-MINGW: "amd64--windows-gnu"
// AMD64-MINGW: "-munwind-tables"
-// RUN: %clang -target i386-linux-android -### -S %s 2>&1 \
+// RUN: %clang -target i686-linux-android -### -S %s 2>&1 \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=ANDROID-X86 %s
// ANDROID-X86: clang
-// ANDROID-X86: "-target-cpu" "core2"
+// ANDROID-X86: "-target-cpu" "i686"
+// ANDROID-X86: "-target-feature" "+ssse3"
+
+// RUN: %clang -target x86_64-linux-android -### -S %s 2>&1 \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=ANDROID-X86_64 %s
+// ANDROID-X86_64: clang
+// ANDROID-X86_64: "-target-cpu" "x86-64"
+// ANDROID-X86_64: "-target-feature" "+sse4.2"
+// ANDROID-X86_64: "-target-feature" "+popcnt"
+
+// RUN: %clang -target mips-linux-gnu -### -S %s 2>&1 | \
+// RUN: FileCheck -check-prefix=MIPS %s
+// MIPS: clang
+// MIPS: "-cc1"
+// MIPS: "-target-cpu" "mips32r2"
+// MIPS: "-mfloat-abi" "hard"
+
+// RUN: %clang -target mipsel-linux-gnu -### -S %s 2>&1 | \
+// RUN: FileCheck -check-prefix=MIPSEL %s
+// MIPSEL: clang
+// MIPSEL: "-cc1"
+// MIPSEL: "-target-cpu" "mips32r2"
+// MIPSEL: "-mfloat-abi" "hard"
+
+// RUN: %clang -target mipsel-linux-android -### -S %s 2>&1 | \
+// RUN: FileCheck -check-prefix=MIPSEL-ANDROID %s
+// MIPSEL-ANDROID: clang
+// MIPSEL-ANDROID: "-cc1"
+// MIPSEL-ANDROID: "-target-cpu" "mips32r2"
+// MIPSEL-ANDROID: "-mfloat-abi" "hard"
+
+// RUN: %clang -target mips64-linux-gnu -### -S %s 2>&1 | \
+// RUN: FileCheck -check-prefix=MIPS64 %s
+// MIPS64: clang
+// MIPS64: "-cc1"
+// MIPS64: "-target-cpu" "mips64r2"
+// MIPS64: "-mfloat-abi" "hard"
+
+// RUN: %clang -target mips64el-linux-gnu -### -S %s 2>&1 | \
+// RUN: FileCheck -check-prefix=MIPS64EL %s
+// MIPS64EL: clang
+// MIPS64EL: "-cc1"
+// MIPS64EL: "-target-cpu" "mips64r2"
+// MIPS64EL: "-mfloat-abi" "hard"
+
+// RUN: %clang -target mips64el-linux-android -### -S %s 2>&1 | \
+// RUN: FileCheck -check-prefix=MIPS64EL-ANDROID %s
+// MIPS64EL-ANDROID: clang
+// MIPS64EL-ANDROID: "-cc1"
+// MIPS64EL-ANDROID: "-target-cpu" "mips64r2"
+// MIPS64EL-ANDROID: "-mfloat-abi" "hard"
diff --git a/test/Driver/clang_f_opts.c b/test/Driver/clang_f_opts.c
index 8bf53e5e6dc3..796da768769e 100644
--- a/test/Driver/clang_f_opts.c
+++ b/test/Driver/clang_f_opts.c
@@ -1,3 +1,5 @@
+// REQUIRES: clang-driver
+
// RUN: %clang -### -S -fasm -fblocks -fbuiltin -fno-math-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fmath-errno -fno-common -fno-pascal-strings -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings -fsplit-stack %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS1 %s
// RUN: %clang -### -S -fasm -fblocks -fbuiltin -fno-math-errno -fcommon -fpascal-strings -fno-asm -fno-blocks -fno-builtin -fmath-errno -fno-common -fno-pascal-strings -fno-show-source-location -fshort-enums -fshort-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS2 %s
@@ -6,8 +8,8 @@
// CHECK-OPTIONS1: -fblocks
// CHECK-OPTIONS1: -fpascal-strings
-// CHECK_OPTIONS2: -fno-gnu-keywords
// CHECK-OPTIONS2: -fmath-errno
+// CHECK-OPTIONS2: -fno-gnu-keywords
// CHECK-OPTIONS2: -fno-builtin
// CHECK-OPTIONS2: -fshort-enums
// CHECK-OPTIONS2: -fshort-wchar
@@ -15,11 +17,11 @@
// CHECK-OPTIONS2: -fno-show-source-location
// RUN: %clang -### -S -Wwrite-strings %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS1 %s
-// RUN: %clang -### -S -Weverything %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS1 %s
// WRITE-STRINGS1: -fconst-strings
// RUN: %clang -### -S -Wwrite-strings -Wno-write-strings %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS2 %s
-// RUN: %clang -### -S -Wwrite-strings -w %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS2 %s
// WRITE-STRINGS2-NOT: -fconst-strings
+// RUN: %clang -### -S -Wwrite-strings -w %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS3 %s
+// WRITE-STRINGS3-NOT: -fconst-strings
// RUN: %clang -### -x c++ -c %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s
// RUN: %clang -### -x c++ -c -Wdeprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s
@@ -54,6 +56,9 @@
// RUN: %clang -### -S -fprofile-sample-use=%S/Inputs/file.prof %s 2>&1 | FileCheck -check-prefix=CHECK-SAMPLE-PROFILE %s
// CHECK-SAMPLE-PROFILE: "-fprofile-sample-use={{.*}}/file.prof"
+// RUN: %clang -### -S -fauto-profile=%S/Inputs/file.prof %s 2>&1 | FileCheck -check-prefix=CHECK-AUTO-PROFILE %s
+// CHECK-AUTO-PROFILE: "-fprofile-sample-use={{.*}}/file.prof"
+
// RUN: %clang -### -S -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
// RUN: %clang -### -S -fno-vectorize -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s
// RUN: %clang -### -S -fno-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s
@@ -84,6 +89,17 @@
// RUN: %clang -### -S -fno-tree-slp-vectorize -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
// RUN: %clang -### -S -fno-tree-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s
// RUN: %clang -### -S -ftree-slp-vectorize -fno-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s
+// RUN: %clang -### -S -O %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
+// RUN: %clang -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
+// RUN: %clang -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
+// RUN: %clang -### -S -Oz %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
+// RUN: %clang -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
+// RUN: %clang -### -S -fno-slp-vectorize -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
+// RUN: %clang -### -S -O1 -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
+// RUN: %clang -### -S -Ofast %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s
+// RUN: %clang -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s
+// RUN: %clang -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s
+// RUN: %clang -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s
// CHECK-SLP-VECTORIZE: "-vectorize-slp"
// CHECK-NO-SLP-VECTORIZE-NOT: "-vectorize-slp"
@@ -111,7 +127,10 @@
// CHECK-MAX-O: -O3
// RUN: %clang -S -O20 -o /dev/null %s 2>&1 | FileCheck -check-prefix=CHECK-INVALID-O %s
-// CHECK-INVALID-O: warning: optimization level '-O20' is unsupported; using '-O3' instead
+// CHECK-INVALID-O: warning: optimization level '-O20' is not supported; using '-O3' instead
+
+// RUN: %clang -### -S -finput-charset=iso-8859-1 -o /dev/null %s 2>&1 | FileCheck -check-prefix=CHECK-INVALID-CHARSET %s
+// CHECK-INVALID-CHARSET: error: invalid value 'iso-8859-1' in '-finput-charset=iso-8859-1'
// Test that we don't error on these.
// RUN: %clang -### -S -Werror \
@@ -124,9 +143,11 @@
// RUN: -fgcse -fno-gcse \
// RUN: -fident -fno-ident \
// RUN: -fimplicit-templates -fno-implicit-templates \
+// RUN: -finput-charset=UTF-8 \
// RUN: -fivopts -fno-ivopts \
// RUN: -fnon-call-exceptions -fno-non-call-exceptions \
// RUN: -fpermissive -fno-permissive \
+// RUN: -fdefer-pop -fno-defer-pop \
// RUN: -fprefetch-loop-arrays -fno-prefetch-loop-arrays \
// RUN: -fprofile-correction -fno-profile-correction \
// RUN: -fprofile-dir=bar \
@@ -143,5 +164,79 @@
// RUN: -fno-unsigned-char \
// RUN: -fno-signed-char \
// RUN: -fstrength-reduce -fno-strength-reduce \
+// RUN: -finline-limit=1000 \
+// RUN: -finline-limit \
// RUN: %s 2>&1 | FileCheck --check-prefix=IGNORE %s
// IGNORE-NOT: error: unknown argument
+
+// Test that the warning is displayed on these.
+// RUN: %clang -### \
+// RUN: -finline-limit=1000 \
+// RUN: -finline-limit \
+// RUN: -fexpensive-optimizations \
+// RUN: -fno-expensive-optimizations \
+// RUN: -fno-defer-pop \
+// RUN: -finline-functions \
+// RUN: -fno-keep-inline-functions \
+// RUN: -freorder-blocks \
+// RUN: -fprofile-dir=/rand/dir \
+// RUN: -fprofile-use \
+// RUN: -fprofile-use=/rand/dir \
+// RUN: -falign-functions \
+// RUN: -falign-functions=1 \
+// RUN: -ffloat-store \
+// RUN: -fgcse \
+// RUN: -fivopts \
+// RUN: -fprefetch-loop-arrays \
+// RUN: -fprofile-correction \
+// RUN: -fprofile-values \
+// RUN: -frounding-math \
+// RUN: -fschedule-insns \
+// RUN: -fsignaling-nans \
+// RUN: -fstrength-reduce \
+// RUN: -ftracer \
+// RUN: -funroll-all-loops \
+// RUN: -funswitch-loops \
+// RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-WARNING %s
+// CHECK-WARNING-DAG: optimization flag '-finline-limit=1000' is not supported
+// CHECK-WARNING-DAG: optimization flag '-finline-limit' is not supported
+// CHECK-WARNING-DAG: optimization flag '-fexpensive-optimizations' is not supported
+// CHECK-WARNING-DAG: optimization flag '-fno-expensive-optimizations' is not supported
+// CHECK-WARNING-DAG: optimization flag '-fno-defer-pop' is not supported
+// CHECK-WARNING-DAG: optimization flag '-finline-functions' is not supported
+// CHECK-WARNING-DAG: optimization flag '-fno-keep-inline-functions' is not supported
+// CHECK-WARNING-DAG: optimization flag '-freorder-blocks' is not supported
+// CHECK-WARNING-DAG: optimization flag '-fprofile-dir=/rand/dir' is not supported
+// CHECK-WARNING-DAG: optimization flag '-fprofile-use' is not supported
+// CHECK-WARNING-DAG: optimization flag '-fprofile-use=/rand/dir' is not supported
+// CHECK-WARNING-DAG: optimization flag '-falign-functions' is not supported
+// CHECK-WARNING-DAG: optimization flag '-falign-functions=1' is not supported
+// CHECK-WARNING-DAG: optimization flag '-ffloat-store' is not supported
+// CHECK-WARNING-DAG: optimization flag '-fgcse' is not supported
+// CHECK-WARNING-DAG: optimization flag '-fivopts' is not supported
+// CHECK-WARNING-DAG: optimization flag '-fprefetch-loop-arrays' is not supported
+// CHECK-WARNING-DAG: optimization flag '-fprofile-correction' is not supported
+// CHECK-WARNING-DAG: optimization flag '-fprofile-values' is not supported
+// CHECK-WARNING-DAG: optimization flag '-frounding-math' is not supported
+// CHECK-WARNING-DAG: optimization flag '-fschedule-insns' is not supported
+// CHECK-WARNING-DAG: optimization flag '-fsignaling-nans' is not supported
+// CHECK-WARNING-DAG: optimization flag '-fstrength-reduce' is not supported
+// CHECK-WARNING-DAG: optimization flag '-ftracer' is not supported
+// CHECK-WARNING-DAG: optimization flag '-funroll-all-loops' is not supported
+// CHECK-WARNING-DAG: optimization flag '-funswitch-loops' is not supported
+
+// Test that we mute the warning on these
+// RUN: %clang -### -finline-limit=1000 -Wno-invalid-command-line-argument \
+// RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-NO-WARNING1 %s
+// RUN: %clang -### -finline-limit -Wno-invalid-command-line-argument \
+// RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-NO-WARNING2 %s
+// CHECK-NO-WARNING1-NOT: optimization flag '-finline-limit=1000' is not supported
+// CHECK-NO-WARNING2-NOT: optimization flag '-finline-limit' is not supported
+
+
+// RUN: %clang -### -fshort-wchar -fno-short-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR1 %s
+// RUN: %clang -### -fno-short-wchar -fshort-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR2 %s
+// CHECK-WCHAR1: -fno-short-wchar
+// CHECK-WCHAR1-NOT: -fshort-wchar
+// CHECK-WCHAR2: -fshort-wchar
+// CHECK-WCHAR2-NOT: -fno-short-wchar
diff --git a/test/Driver/code-model.c b/test/Driver/code-model.c
new file mode 100644
index 000000000000..001ca606cde7
--- /dev/null
+++ b/test/Driver/code-model.c
@@ -0,0 +1,13 @@
+// RUN: %clang -### -c -mcmodel=small %s 2>&1 | FileCheck -check-prefix CHECK-SMALL %s
+// RUN: %clang -### -S -mcmodel=kernel %s 2>&1 | FileCheck -check-prefix CHECK-KERNEL %s
+// RUN: %clang -### -c -mcmodel=medium %s 2>&1 | FileCheck -check-prefix CHECK-MEDIUM %s
+// RUN: %clang -### -S -mcmodel=large %s 2>&1 | FileCheck -check-prefix CHECK-LARGE %s
+// RUN: not %clang -c -mcmodel=lager %s 2>&1 | FileCheck -check-prefix CHECK-INVALID %s
+
+// CHECK-SMALL: "-mcode-model" "small"
+// CHECK-KERNEL: "-mcode-model" "kernel"
+// CHECK-MEDIUM: "-mcode-model" "medium"
+// CHECK-LARGE: "-mcode-model" "large"
+
+// CHECK-INVALID: error: invalid value 'lager' in '-mcode-model lager'
+
diff --git a/test/Driver/compress.c b/test/Driver/compress.c
new file mode 100644
index 000000000000..6cdc6b72243e
--- /dev/null
+++ b/test/Driver/compress.c
@@ -0,0 +1,8 @@
+// RUN: %clang -### -c -integrated-as -Wa,-compress-debug-sections %s 2>&1 | FileCheck --check-prefix=COMPRESS_DEBUG %s
+// RUN: %clang -### -c -integrated-as -Wa,--compress-debug-sections %s 2>&1 | FileCheck --check-prefix=COMPRESS_DEBUG %s
+// REQUIRES: zlib
+
+// COMPRESS_DEBUG: "-compress-debug-sections"
+
+// RUN: %clang -### -c -integrated-as -Wa,--compress-debug-sections -Wa,--nocompress-debug-sections %s 2>&1 | FileCheck --check-prefix=NOCOMPRESS_DEBUG %s
+// NOCOMPRESS_DEBUG-NOT: "-compress-debug-sections"
diff --git a/test/Driver/constructors.c b/test/Driver/constructors.c
index 680705fbf948..a8b0942f01f4 100644
--- a/test/Driver/constructors.c
+++ b/test/Driver/constructors.c
@@ -55,3 +55,12 @@
// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
// RUN: -target aarch64-none-none-eabi \
// RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s
+
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target arm64-none-linux-gnu \
+// RUN: --sysroot=%S/Inputs/basic_linux_tree \
+// RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s
+//
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target arm64-none-none-eabi \
+// RUN: | FileCheck --check-prefix=CHECK-INIT-ARRAY %s
diff --git a/test/Driver/coverage-ld.c b/test/Driver/coverage-ld.c
index cbb7dd472410..0e39249a2f3e 100644
--- a/test/Driver/coverage-ld.c
+++ b/test/Driver/coverage-ld.c
@@ -17,3 +17,12 @@
//
// CHECK-LINUX-X86-64: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
// CHECK-LINUX-X86-64: "{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}linux{{/|\\\\}}libclang_rt.profile-x86_64.a" {{.*}} "-lc"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -target x86_64-unknown-freebsd --coverage \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
+// RUN: --sysroot=%S/Inputs/basic_freebsd64_tree \
+// RUN: | FileCheck --check-prefix=CHECK-FREEBSD-X86-64 %s
+//
+// CHECK-FREEBSD-X86-64: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
+// CHECK-FREEBSD-X86-64: "{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}freebsd{{/|\\\\}}libclang_rt.profile-x86_64.a"
diff --git a/test/Driver/crash-report-modules.m b/test/Driver/crash-report-modules.m
new file mode 100644
index 000000000000..d1c7832019cf
--- /dev/null
+++ b/test/Driver/crash-report-modules.m
@@ -0,0 +1,32 @@
+// RUN: rm -rf %t
+// RUN: mkdir %t
+
+// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: %clang -fsyntax-only %s -I %S/Inputs/module \
+// RUN: -fmodules -fmodules-cache-path=/tmp/ -DFOO=BAR 2>&1 | FileCheck %s
+
+// RUN: FileCheck --check-prefix=CHECKSRC %s -input-file %t/crash-report-*.m
+// RUN: FileCheck --check-prefix=CHECKSH %s -input-file %t/crash-report-*.sh
+// REQUIRES: crash-recovery
+
+// because of the glob (*.m, *.sh)
+// REQUIRES: shell
+
+// FIXME: This XFAIL is cargo-culted from crash-report.c. Do we need it?
+// XFAIL: mingw32
+
+@import simple;
+const int x = MODULE_MACRO;
+
+// CHECK: Preprocessed source(s) and associated run script(s) are located at:
+// CHECK-NEXT: note: diagnostic msg: {{.*}}.m
+// CHECK-NEXT: note: diagnostic msg: {{.*}}.cache
+
+// CHECKSRC: @import simple;
+// CHECKSRC: const int x = 10;
+
+// CHECKSH: -cc1
+// CHECKSH: -D "FOO=BAR"
+// CHECKSH-NOT: -fmodules-cache-path=/tmp/
+// CHECKSH: crash-report-modules-{{[^ ]*}}.m
+// CHECKSH: -ivfsoverlay crash-report-modules-{{[^ ]*}}.cache/vfs/vfs.yaml
diff --git a/test/Driver/crash-report.c b/test/Driver/crash-report.c
index 95c57f238e0a..da1ff950fb9a 100644
--- a/test/Driver/crash-report.c
+++ b/test/Driver/crash-report.c
@@ -13,7 +13,7 @@
// because of the glob (*.c, *.sh)
// REQUIRES: shell
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH=1 %clang -fsyntax-only -x c /dev/null 2>&1 | FileCheck %s
+// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH=1 %clang -fsyntax-only -x c /dev/null -lstdc++ 2>&1 | FileCheck %s
// FIXME: Investigating. "fatal error: file 'nul' modified since it was first processed"
// XFAIL: mingw32
@@ -36,3 +36,4 @@ FOO
// CHECKSH-NOT: -internal-isystem /tmp/
// CHECKSH-NOT: -internal-externc-isystem /tmp/
// CHECKSH-NOT: -dwarf-debug-flags
+// CHECKSH: crash-report-{{[^ ]*}}.c
diff --git a/test/Driver/cross-linux.c b/test/Driver/cross-linux.c
index 3013d80f4c1e..ade8d8f62f33 100644
--- a/test/Driver/cross-linux.c
+++ b/test/Driver/cross-linux.c
@@ -16,6 +16,14 @@
//
// RUN: %clang -### -o %t %s 2>&1 -no-integrated-as \
// RUN: --gcc-toolchain=%S/Inputs/basic_cross_linux_tree/usr \
+// RUN: --target=x86_64-unknown-linux-gnux32 \
+// RUN: | FileCheck --check-prefix=CHECK-X32 %s
+// CHECK-X32: "-cc1" "-triple" "x86_64-unknown-linux-gnux32"
+// CHECK-X32: "{{.*}}/Inputs/basic_cross_linux_tree/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../x86_64-unknown-linux-gnu/bin{{/|\\}}as" "--x32"
+// CHECK-X32: "{{.*}}/Inputs/basic_cross_linux_tree/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../x86_64-unknown-linux-gnu/bin{{/|\\}}ld" {{.*}} "-m" "elf32_x86_64"
+//
+// RUN: %clang -### -o %t %s 2>&1 -no-integrated-as \
+// RUN: --gcc-toolchain=%S/Inputs/basic_cross_linux_tree/usr \
// RUN: --target=x86_64-unknown-linux-gnu -m32 \
// RUN: | FileCheck --check-prefix=CHECK-I386 %s
//
diff --git a/test/Driver/darwin-asan-nofortify.c b/test/Driver/darwin-asan-nofortify.c
index 7f325e097b38..58b5be9fcbb7 100644
--- a/test/Driver/darwin-asan-nofortify.c
+++ b/test/Driver/darwin-asan-nofortify.c
@@ -1,6 +1,5 @@
// Make sure AddressSanitizer disables _FORTIFY_SOURCE on Darwin.
-// RUN: %clang -faddress-sanitizer %s -E -dM -target x86_64-darwin - | FileCheck %s
-// RUN: %clang -fsanitize=address %s -E -dM -target x86_64-darwin - | FileCheck %s
+// RUN: %clang -fsanitize=address %s -E -dM -target x86_64-darwin | FileCheck %s
// CHECK: #define _FORTIFY_SOURCE 0
diff --git a/test/Driver/darwin-dsymutil.c b/test/Driver/darwin-dsymutil.c
index b8c3083c9353..59084a2c85ed 100644
--- a/test/Driver/darwin-dsymutil.c
+++ b/test/Driver/darwin-dsymutil.c
@@ -43,3 +43,6 @@
// RUN: FileCheck -check-prefix=CHECK-LOCATION < %t %s
// CHECK-LOCATION: "x86_64-apple-darwin10" - "darwin::Dsymutil", inputs: ["bar/foo"], output: "bar/foo.dSYM"
+
+// Check that we don't crash when translating arguments for dsymutil.
+// RUN: %clang -m32 -arch x86_64 -g %s -###
diff --git a/test/Driver/darwin-eabi.c b/test/Driver/darwin-eabi.c
deleted file mode 100644
index 1288fa40608c..000000000000
--- a/test/Driver/darwin-eabi.c
+++ /dev/null
@@ -1,12 +0,0 @@
-// RUN: %clang -arch armv7 -target thumbv7-apple-darwin-eabi -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-AAPCS
-// RUN: %clang -arch armv7s -target thumbv7-apple-ios -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-APCS
-// RUN: %clang -arch armv7s -target thumbv7-apple-darwin -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-APCS
-// RUN: %clang -arch armv6m -target thumbv7-apple-darwin -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-DARWIN-EABI
-// RUN: %clang -arch armv7m -target thumbv7-apple-darwin -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-DARWIN-EABI
-// RUN: %clang -arch armv7em -target thumbv7-apple-darwin -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-DARWIN-EABI
-
-// CHECK-DARWIN-EABI: "-triple" "{{thumbv[67]e?m}}-apple-darwin-eabi"
-// CHECK-IOS: "-triple" "thumbv7" "thumbv7-apple-ios
-
-// CHECK-AAPCS: "-target-abi" "aapcs"
-// CHECK-APCS: "-target-abi" "apcs-gnu"
diff --git a/test/Driver/darwin-embedded.c b/test/Driver/darwin-embedded.c
new file mode 100644
index 000000000000..66b7bd9fa7fb
--- /dev/null
+++ b/test/Driver/darwin-embedded.c
@@ -0,0 +1,60 @@
+// RUN: %clang -target x86_64-apple-darwin -arch armv6m -resource-dir=%S/Inputs/resource_dir %s -### 2> %t
+// RUN: %clang -target x86_64-apple-darwin -arch armv7em -resource-dir=%S/Inputs/resource_dir %s -### 2>> %t
+// RUN: %clang -target x86_64-apple-darwin -arch armv7em -mhard-float -resource-dir=%S/Inputs/resource_dir %s -### 2>> %t
+
+// RUN: %clang -target x86_64-apple-darwin -arch armv7m -fPIC -resource-dir=%S/Inputs/resource_dir %s -### 2>> %t
+// RUN: %clang -target x86_64-apple-darwin -arch armv7em -fPIC -mfloat-abi=hard -resource-dir=%S/Inputs/resource_dir %s -### 2>> %t
+// RUN: %clang -target x86_64-apple-darwin -arch armv7em -fPIC -mfloat-abi=softfp -resource-dir=%S/Inputs/resource_dir %s -### 2>> %t
+// RUN: %clang -target x86_64-apple-none-macho -arch armv7 -mhard-float -resource-dir=%S/Inputs/resource_dir %s -### 2>> %t
+// RUN: %clang -target x86_64-apple-none-macho -arch armv7 -msoft-float -fPIC -resource-dir=%S/Inputs/resource_dir %s -### 2>> %t
+
+
+// RUN: FileCheck %s < %t
+
+// ARMv6m has no float
+// CHECK-LABEL: Target:
+// CHECK-NOT: warning: unknown platform
+// CHECK: "-mfloat-abi" "soft"
+// CHECK: libclang_rt.soft_static.a
+
+// ARMv7em does, but defaults to soft
+// CHECK-LABEL: Target:
+// CHECK-NOT: warning: unknown platform
+// CHECK: "-mfloat-abi" "soft"
+// CHECK: libclang_rt.soft_static.a
+
+// Which can be overridden
+// CHECK-LABEL: Target:
+// CHECK-NOT: warning: unknown platform
+// CHECK: "-mfloat-abi" "hard"
+// CHECK: libclang_rt.hard_static.a
+
+// ARMv7m has no float either
+// CHECK-LABEL: Target:
+// CHECK-NOT: warning: unknown platform
+// CHECK: "-mfloat-abi" "soft"
+// CHECK: libclang_rt.soft_pic.a
+
+// But it can be enabled on ARMv7em
+// CHECK-LABEL: Target:
+// CHECK-NOT: warning: unknown platform
+// CHECK: "-mfloat-abi" "hard"
+// CHECK: libclang_rt.hard_pic.a
+
+// "softfp" must link against a soft-float library since that's what the
+// callers we're compiling will expect.
+// CHECK-LABEL: Target:
+// CHECK-NOT: warning: unknown platform
+// CHECK: "-mfloat-abi" "soft"
+// CHECK: libclang_rt.soft_pic.a
+
+// -arch "armv7" (== embedded v7a) can be used in a couple of variants:
+// CHECK-LABEL: Target:
+// CHECK-NOT: warning: unknown platform
+// CHECK: "-mfloat-abi" "hard"
+// CHECK: libclang_rt.hard_static.a
+
+// CHECK-LABEL: Target:
+// CHECK-NOT: warning: unknown platform
+// CHECK: "-mfloat-abi" "soft"
+// CHECK: libclang_rt.soft_pic.a
diff --git a/test/Driver/darwin-ld.c b/test/Driver/darwin-ld.c
index d6c5170496ba..2da0d30b5008 100644
--- a/test/Driver/darwin-ld.c
+++ b/test/Driver/darwin-ld.c
@@ -45,6 +45,22 @@
// LINK_IPHONE_3_1-NOT: -lbundle1.o
// LINK_IPHONE_3_1: -lSystem
+// RUN: %clang -target i386-apple-darwin9 -### -arch i386 -mios-simulator-version-min=3.0 %t.o 2> %t.log
+// RUN: %clang -target i386-apple-darwin9 -### -arch i386 -mios-simulator-version-min=3.0 -dynamiclib %t.o 2>> %t.log
+// RUN: %clang -target i386-apple-darwin9 -### -arch i386 -mios-simulator-version-min=3.0 -bundle %t.o 2>> %t.log
+// RUN: FileCheck -check-prefix=LINK_IOSSIM_3_0 %s < %t.log
+
+// LINK_IOSSIM_3_0: {{ld(.exe)?"}}
+// LINK_IOSSIM_3_0-NOT: -lcrt1.o
+// LINK_IOSSIM_3_0: -lSystem
+// LINK_IOSSIM_3_0: {{ld(.exe)?"}}
+// LINK_IOSSIM_3_0: -dylib
+// LINK_IOSSIM_3_0-NOT: -ldylib1.o
+// LINK_IOSSIM_3_0: -lSystem
+// LINK_IOSSIM_3_0: {{ld(.exe)?"}}
+// LINK_IOSSIM_3_0-NOT: -lbundle1.o
+// LINK_IOSSIM_3_0: -lSystem
+
// RUN: %clang -target i386-apple-darwin9 -### -fpie %t.o 2> %t.log
// RUN: FileCheck -check-prefix=LINK_EXPLICIT_PIE %s < %t.log
//
@@ -126,11 +142,24 @@
// RUN: FileCheck -check-prefix=LINK_NO_IOS_CRT1 %s < %t.log
// LINK_NO_IOS_CRT1-NOT: crt
+// RUN: %clang -target arm64-apple-ios5.0 -miphoneos-version-min=5.0 -### %t.o 2> %t.log
+// RUN: FileCheck -check-prefix=LINK_NO_IOS_ARM64_CRT1 %s < %t.log
+// LINK_NO_IOS_ARM64_CRT1-NOT: crt
+
// RUN: %clang -target i386-apple-darwin12 -pg -### %t.o 2> %t.log
// RUN: FileCheck -check-prefix=LINK_PG %s < %t.log
// LINK_PG: -lgcrt1.o
// LINK_PG: -no_new_main
+// Check that clang links with libgcc_s.1 for iOS 4 and earlier, but not arm64.
+// RUN: %clang -target armv7-apple-ios4.0 -miphoneos-version-min=4.0 -### %t.o 2> %t.log
+// RUN: FileCheck -check-prefix=LINK_IOS_LIBGCC_S %s < %t.log
+// LINK_IOS_LIBGCC_S: lgcc_s.1
+
+// RUN: %clang -target arm64-apple-ios4.0 -miphoneos-version-min=4.0 -### %t.o 2> %t.log
+// RUN: FileCheck -check-prefix=LINK_NO_IOS_ARM64_LIBGCC_S %s < %t.log
+// LINK_NO_IOS_ARM64_LIBGCC_S-NOT: lgcc_s.1
+
// RUN: %clang -target x86_64-apple-darwin12 -rdynamic -### %t.o \
// RUN: -mlinker-version=100 2> %t.log
// RUN: FileCheck -check-prefix=LINK_NO_EXPORT_DYNAMIC %s < %t.log
@@ -143,4 +172,25 @@
// LINK_EXPORT_DYNAMIC: {{ld(.exe)?"}}
// LINK_EXPORT_DYNAMIC: "-export_dynamic"
+// RUN: %clang -target x86_64h-apple-darwin -### %t.o 2> %t.log
+// RUN: FileCheck -check-prefix=LINK_X86_64H_ARCH %s < %t.log
+//
+// LINK_X86_64H_ARCH: {{ld(.exe)?"}}
+// LINK_X86_64H_ARCH: "x86_64h"
+// RUN: %clang -target x86_64-apple-darwin -arch x86_64 -arch x86_64h -### %t.o 2> %t.log
+// RUN: FileCheck -check-prefix=LINK_X86_64H_MULTIARCH %s < %t.log
+//
+// LINK_X86_64H_MULTIARCH: {{ld(.exe)?"}}
+// LINK_X86_64H_MULTIARCH: "x86_64"
+//
+// LINK_X86_64H_MULTIARCH: {{ld(.exe)?"}}
+// LINK_X86_64H_MULTIARCH: "x86_64h"
+
+// Check that clang passes -iphoneos_version_min to the linker when building
+// for the iOS simulator but when -mios-simulator-version-min is not
+// explicitly specified (<rdar://problem/15959009>).
+// RUN: env IPHONEOS_DEPLOYMENT_TARGET=7.0 \
+// RUN: %clang -target i386-apple-darwin -### %t.o 2> %t.log
+// RUN: FileCheck -check-prefix=LINK_IPHONEOS_VERSION_MIN %s < %t.log
+// LINK_IPHONEOS_VERSION_MIN: -iphoneos_version_min
diff --git a/test/Driver/darwin-objc-defaults.m b/test/Driver/darwin-objc-defaults.m
index 1742deb1b12e..1b3f7a844445 100644
--- a/test/Driver/darwin-objc-defaults.m
+++ b/test/Driver/darwin-objc-defaults.m
@@ -32,11 +32,20 @@
// x86_64
// RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
+// RUN: -arch x86_64 -mmacosx-version-min=10.4 2> %t
+// RUN: FileCheck --check-prefix CHECK-CHECK-X86_64_OSX10_4 < %t %s
+
+// CHECK-CHECK-X86_64_OSX10_4: "-cc1"
+// CHECK-CHECK-X86_64_OSX10_4: -fobjc-dispatch-method=non-legacy
+
+// RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
// RUN: -arch x86_64 -mmacosx-version-min=10.5 2> %t
// RUN: FileCheck --check-prefix CHECK-CHECK-X86_64_OSX10_5 < %t %s
+
// CHECK-CHECK-X86_64_OSX10_5: "-cc1"
// CHECK-CHECK-X86_64_OSX10_5: -fobjc-runtime=macosx-10.5
+// CHECK-CHECK-X86_64_OSX10_5: -fobjc-dispatch-method=non-legacy
// CHECK-CHECK-X86_64_OSX10_5: darwin-objc-defaults
// RUN: %clang -target x86_64-apple-darwin10 -S -### %s \
diff --git a/test/Driver/darwin-objc-options.m b/test/Driver/darwin-objc-options.m
index a90a12d733d6..3e21fb38c0a9 100644
--- a/test/Driver/darwin-objc-options.m
+++ b/test/Driver/darwin-objc-options.m
@@ -30,3 +30,6 @@
// CHECK-CHECK-I386_IOS: -fexceptions
// CHECK-CHECK-I386_IOS-NOT: -fobjc-dispatch-method
// CHECK-CHECK-I386_IOS: darwin-objc-options
+
+// Don't crash with an unexpected target triple.
+// RUN: %clang -target i386-apple-ios7 -S -### %s
diff --git a/test/Driver/darwin-verify-debug.c b/test/Driver/darwin-verify-debug.c
index c419cef589d1..4878c746e07e 100644
--- a/test/Driver/darwin-verify-debug.c
+++ b/test/Driver/darwin-verify-debug.c
@@ -2,15 +2,15 @@
//
// REQUIRES: asserts
// RUN: %clang -target x86_64-apple-darwin10 -ccc-print-phases \
-// RUN: -verify -arch i386 -arch x86_64 %s -g 2> %t
+// RUN: --verify-debug-info -arch i386 -arch x86_64 %s -g 2> %t
// RUN: FileCheck -check-prefix=CHECK-MULTIARCH-ACTIONS < %t %s
//
// CHECK-MULTIARCH-ACTIONS: 0: input, "{{.*}}darwin-verify-debug.c", c
// CHECK-MULTIARCH-ACTIONS: 8: dsymutil, {7}, dSYM
-// CHECK-MULTIARCH-ACTIONS: 9: verify, {8}, none
+// CHECK-MULTIARCH-ACTIONS: 9: verify-debug-info, {8}, none
//
// RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \
-// RUN: -verify -arch i386 -arch x86_64 %s -g 2> %t
+// RUN: --verify-debug-info -arch i386 -arch x86_64 %s -g 2> %t
// RUN: FileCheck -check-prefix=CHECK-MULTIARCH-BINDINGS < %t %s
//
// CHECK-MULTIARCH-BINDINGS: # "x86_64-apple-darwin10" - "darwin::Dsymutil", inputs: ["a.out"], output: "a.out.dSYM"
@@ -19,7 +19,7 @@
// Check output name derivation.
//
// RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \
-// RUN: -verify -o foo %s -g 2> %t
+// RUN: --verify-debug-info -o foo %s -g 2> %t
// RUN: FileCheck -check-prefix=CHECK-OUTPUT-NAME < %t %s
//
// CHECK-OUTPUT-NAME: "x86_64-apple-darwin10" - "darwin::Link", inputs: [{{.*}}], output: "foo"
@@ -30,5 +30,5 @@
//
// RUN: touch %t.o
// RUN: %clang -target x86_64-apple-darwin10 -ccc-print-bindings \
-// RUN: -verify -o foo %t.o -g 2> %t
+// RUN: --verify-debug-info -o foo %t.o -g 2> %t
// RUN: not grep "Verify" %t
diff --git a/test/Driver/debug-options.c b/test/Driver/debug-options.c
index 1f890b2e67f4..a8fadb36e74b 100644
--- a/test/Driver/debug-options.c
+++ b/test/Driver/debug-options.c
@@ -33,28 +33,52 @@
// RUN: %clang -### -c -g -g0 %s 2>&1 | FileCheck -check-prefix=G_NO %s
// RUN: %clang -### -c -ggdb0 %s 2>&1 | FileCheck -check-prefix=G_NO %s
//
+// RUN: %clang -### -c -gmlt %s 2>&1 \
+// RUN: | FileCheck -check-prefix=GLTO_ONLY %s
// RUN: %clang -### -c -gline-tables-only %s 2>&1 \
// RUN: | FileCheck -check-prefix=GLTO_ONLY %s
+// RUN: %clang -### -c -gline-tables-only %s -target x86_64-apple-darwin 2>&1 \
+// RUN: | FileCheck -check-prefix=GLTO_ONLY_DWARF2 %s
+// RUN: %clang -### -c -gline-tables-only %s -target i686-pc-openbsd 2>&1 \
+// RUN: | FileCheck -check-prefix=GLTO_ONLY_DWARF2 %s
+// RUN: %clang -### -c -gline-tables-only %s -target x86_64-pc-freebsd10.0 2>&1 \
+// RUN: | FileCheck -check-prefix=GLTO_ONLY_DWARF2 %s
// RUN: %clang -### -c -gline-tables-only -g %s -target x86_64-linux-gnu 2>&1 \
// RUN: | FileCheck -check-prefix=G_ONLY %s
// RUN: %clang -### -c -gline-tables-only -g %s -target x86_64-apple-darwin 2>&1 \
-// RUN: | FileCheck -check-prefix=G_ONLY_DARWIN %s
+// RUN: | FileCheck -check-prefix=G_ONLY_DWARF2 %s
+// RUN: %clang -### -c -gline-tables-only -g %s -target i686-pc-openbsd 2>&1 \
+// RUN: | FileCheck -check-prefix=G_ONLY_DWARF2 %s
+// RUN: %clang -### -c -gline-tables-only -g %s -target x86_64-pc-freebsd10.0 2>&1 \
+// RUN: | FileCheck -check-prefix=G_ONLY_DWARF2 %s
// RUN: %clang -### -c -gline-tables-only -g0 %s 2>&1 \
// RUN: | FileCheck -check-prefix=GLTO_NO %s
//
// RUN: %clang -### -c -grecord-gcc-switches -gno-record-gcc-switches \
-// RUN: -gstrict-dwarf -gno-strict-dwarf -fdebug-types-section \
-// RUN: -fno-debug-types-section %s 2>&1 \
+// RUN: -gstrict-dwarf -gno-strict-dwarf %s 2>&1 \
// RUN: | FileCheck -check-prefix=GIGNORE %s
//
// RUN: %clang -### -c -ggnu-pubnames %s 2>&1 | FileCheck -check-prefix=GOPT %s
//
+// RUN: %clang -### -c -gdwarf-aranges %s 2>&1 | FileCheck -check-prefix=GARANGE %s
+//
+// RUN: %clang -### -fdebug-types-section %s 2>&1 \
+// RUN: | FileCheck -check-prefix=FDTS %s
+//
+// RUN: %clang -### -fdebug-types-section -fno-debug-types-section %s 2>&1 \
+// RUN: | FileCheck -check-prefix=NOFDTS %s
+//
+// RUN: %clang -### -g -gno-column-info %s 2>&1 \
+// RUN: | FileCheck -check-prefix=NOCI %s
+//
+// RUN: %clang -### -g %s 2>&1 | FileCheck -check-prefix=CI %s
+//
// G: "-cc1"
// G: "-g"
//
// G_DARWIN: "-cc1"
// G_DARWIN: "-gdwarf-2"
-//
+//
// G_D2: "-cc1"
// G_D2: "-gdwarf-2"
//
@@ -66,15 +90,21 @@
// GLTO_ONLY: "-gline-tables-only"
// GLTO_ONLY-NOT: "-g"
//
+// GLTO_ONLY_DWARF2: "-cc1"
+// GLTO_ONLY_DWARF2-NOT: "-g"
+// GLTO_ONLY_DWARF2: "-gline-tables-only"
+// GLTO_ONLY_DWARF2: "-gdwarf-2"
+// GLTO_ONLY_DWARF2-NOT: "-g"
+//
// G_ONLY: "-cc1"
// G_ONLY-NOT: "-gline-tables-only"
// G_ONLY: "-g"
// G_ONLY-NOT: "-gline-tables-only"
//
-// G_ONLY_DARWIN: "-cc1"
-// G_ONLY_DARWIN-NOT: "-gline-tables-only"
-// G_ONLY_DARWIN: "-gdwarf-2"
-// G_ONLY_DARWIN-NOT: "-gline-tables-only"
+// G_ONLY_DWARF2: "-cc1"
+// G_ONLY_DWARF2-NOT: "-gline-tables-only"
+// G_ONLY_DWARF2: "-gdwarf-2"
+// G_ONLY_DWARF2-NOT: "-gline-tables-only"
//
// GLTO_NO: "-cc1"
// GLTO_NO-NOT: "-gline-tables-only"
@@ -82,3 +112,13 @@
// GIGNORE-NOT: "argument unused during compilation"
//
// GOPT: -generate-gnu-dwarf-pub-sections
+//
+// GARANGE: -generate-arange-section
+//
+// FDTS: "-backend-option" "-generate-type-units"
+//
+// NOFDTS-NOT: "-backend-option" "-generate-type-units"
+//
+// CI: "-dwarf-column-info"
+//
+// NOCI-NOT: "-dwarf-column-info"
diff --git a/test/Driver/dwarf2-cfi-asm.c b/test/Driver/dwarf2-cfi-asm.c
deleted file mode 100644
index a5c4878703bd..000000000000
--- a/test/Driver/dwarf2-cfi-asm.c
+++ /dev/null
@@ -1,35 +0,0 @@
-// RUN: %clang -target x86_64-apple-darwin -### -S -integrated-as %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK-DARWIN-MC-DEFAULT %s
-// RUN: %clang -target x86_64-apple-darwin -### -S -integrated-as -fdwarf2-cfi-asm %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK-DARWIN-MC-CFI %s
-// RUN: %clang -target x86_64-apple-darwin -### -S -integrated-as -fno-dwarf2-cfi-asm %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK-DARWIN-MC-NOCFI %s
-
-// RUN: %clang -target x86_64-apple-darwin -### -S -no-integrated-as %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK-DARWIN-AS-DEFAULT %s
-// RUN: %clang -target x86_64-apple-darwin -### -S -no-integrated-as -fdwarf2-cfi-asm %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK-DARWIN-AS-CFI %s
-// RUN: %clang -target x86_64-apple-darwin -### -S -no-integrated-as -fno-dwarf2-cfi-asm %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK-DARWIN-AS-NOCFI %s
-
-
-// RUN: %clang -target x86_64-pc-linux -### -S -integrated-as %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK-LINUX-MC-DEFAULT %s
-// RUN: %clang -target x86_64-pc-linux -### -S -integrated-as -fdwarf2-cfi-asm %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK-LINUX-MC-CFI %s
-// RUN: %clang -target x86_64-pc-linux -### -S -integrated-as -fno-dwarf2-cfi-asm %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK-LINUX-MC-NOCFI %s
-
-// RUN: %clang -target x86_64-pc-linux -### -S -no-integrated-as %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK-LINUX-AS-DEFAULT %s
-// RUN: %clang -target x86_64-pc-linux -### -S -no-integrated-as -fdwarf2-cfi-asm %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK-LINUX-AS-CFI %s
-// RUN: %clang -target x86_64-pc-linux -### -S -no-integrated-as -fno-dwarf2-cfi-asm %s -o %t.s 2>&1 | FileCheck -check-prefix=CHECK-LINUX-AS-NOCFI %s
-
-
-
-// CHECK-DARWIN-MC-DEFAULT-NOT: -fno-dwarf2-cfi-asm
-// CHECK-DARWIN-MC-CFI-NOT: -fno-dwarf2-cfi-asm
-// CHECK-DARWIN-MC-NOCFI: -fno-dwarf2-cfi-asm
-
-// CHECK-DARWIN-AS-DEFAULT: -fno-dwarf2-cfi-asm
-// CHECK-DARWIN-AS-CFI-NOT: -fno-dwarf2-cfi-asm
-// CHECK-DARWIN-AS-NOCFI: -fno-dwarf2-cfi-asm
-
-
-// CHECK-LINUX-MC-DEFAULT-NOT: -fno-dwarf2-cfi-asmx
-// CHECK-LINUX-MC-CFI-NOT: -fno-dwarf2-cfi-asm
-// CHECK-LINUX-MC-NOCFI: -fno-dwarf2-cfi-asm
-
-// CHECK-LINUX-AS-DEFAULT-NOT: -fno-dwarf2-cfi-asm
-// CHECK-LINUX-AS-CFI-NOT: -fno-dwarf2-cfi-asm
-// CHECK-LINUX-AS-NOCFI: -fno-dwarf2-cfi-asm
diff --git a/test/Driver/dyld-prefix.c b/test/Driver/dyld-prefix.c
index 317d64449da6..5336a1142ea9 100644
--- a/test/Driver/dyld-prefix.c
+++ b/test/Driver/dyld-prefix.c
@@ -7,3 +7,6 @@
// RUN: %clang -target x86_64-unknown-linux --dyld-prefix /foo -### %t.o 2>&1 | FileCheck --check-prefix=CHECK-64 %s
// CHECK-64: "-dynamic-linker" "/foo/lib64/ld-linux-x86-64.so.2"
+
+// RUN: %clang -target x86_64-unknown-linux-gnux32 --dyld-prefix /foo -### %t.o 2>&1 | FileCheck --check-prefix=CHECK-X32 %s
+// CHECK-X32: "-dynamic-linker" "/foo/libx32/ld-linux-x32.so.2"
diff --git a/test/Driver/fast-math.c b/test/Driver/fast-math.c
index eba25c8fe85e..690d7a1e6ef5 100644
--- a/test/Driver/fast-math.c
+++ b/test/Driver/fast-math.c
@@ -9,6 +9,9 @@
//
// RUN: %clang -### -fno-honor-infinities -c %s 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-NO-INFS %s
+// infinites [sic] is a supported alternative spelling of infinities.
+// RUN: %clang -### -fno-honor-infinites -c %s 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-NO-INFS %s
// CHECK-NO-INFS: "-cc1"
// CHECK-NO-INFS: "-menable-no-infs"
//
diff --git a/test/Driver/freebsd-mips-as.c b/test/Driver/freebsd-mips-as.c
index 508debae7fb8..da2d1200c47b 100644
--- a/test/Driver/freebsd-mips-as.c
+++ b/test/Driver/freebsd-mips-as.c
@@ -3,67 +3,67 @@
// RUN: %clang -target mips-unknown-freebsd -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS32-EB-AS %s
-// MIPS32-EB-AS: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB"
+// MIPS32-EB-AS: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB"
// MIPS32-EB-AS-NOT: "-KPIC"
//
// RUN: %clang -target mips-unknown-freebsd -### \
// RUN: -no-integrated-as -fPIC -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS32-EB-PIC %s
-// MIPS32-EB-PIC: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB"
+// MIPS32-EB-PIC: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB"
// MIPS32-EB-PIC: "-KPIC"
//
// RUN: %clang -target mips-unknown-freebsd -### \
// RUN: -no-integrated-as -fpic -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS32-EB-PIC-SMALL %s
-// MIPS32-EB-PIC-SMALL: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB"
+// MIPS32-EB-PIC-SMALL: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB"
// MIPS32-EB-PIC-SMALL: "-KPIC"
//
// RUN: %clang -target mips-unknown-freebsd -### \
// RUN: -no-integrated-as -fPIE -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS32-EB-PIE %s
-// MIPS32-EB-PIE: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB"
+// MIPS32-EB-PIE: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB"
// MIPS32-EB-PIE: "-KPIC"
//
// RUN: %clang -target mips-unknown-freebsd -### \
// RUN: -no-integrated-as -fpie -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS32-EB-PIE-SMALL %s
-// MIPS32-EB-PIE-SMALL: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB"
+// MIPS32-EB-PIE-SMALL: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB"
// MIPS32-EB-PIE-SMALL: "-KPIC"
//
// RUN: %clang -target mipsel-unknown-freebsd -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS32-DEF-EL-AS %s
-// MIPS32-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EL"
+// MIPS32-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EL"
//
// RUN: %clang -target mips64-unknown-freebsd -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS64-EB-AS %s
-// MIPS64-EB-AS: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-EB"
+// MIPS64-EB-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EB"
//
// RUN: %clang -target mips64el-unknown-freebsd -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS64-DEF-EL-AS %s
-// MIPS64-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-EL"
+// MIPS64-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EL"
//
// RUN: %clang -target mips-unknown-freebsd -mabi=eabi -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-EABI %s
-// MIPS-EABI: as{{(.exe)?}}" "-march" "mips32" "-mabi" "eabi" "-EB"
+// MIPS-EABI: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "eabi" "-EB"
//
// RUN: %clang -target mips64-unknown-freebsd -mabi=n32 -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-N32 %s
-// MIPS-N32: as{{(.exe)?}}" "-march" "mips64" "-mabi" "n32" "-EB"
+// MIPS-N32: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "n32" "-EB"
//
// RUN: %clang -target mipsel-unknown-freebsd -mabi=32 -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS32-EL-AS %s
-// MIPS32-EL-AS: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EL"
+// MIPS32-EL-AS: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EL"
//
// RUN: %clang -target mips64el-unknown-freebsd -mabi=64 -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS64-EL-AS %s
-// MIPS64-EL-AS: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-EL"
+// MIPS64-EL-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EL"
//
// RUN: %clang -target mips-linux-freebsd -march=mips32r2 -### \
// RUN: -no-integrated-as -c %s 2>&1 \
@@ -80,12 +80,12 @@
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-32R2 %s
// MIPS-ALIAS-32R2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB"
//
-// RUN: %clang -target mips-unknown-freebsd -mips64 -### \
+// RUN: %clang -target mips64-unknown-freebsd -mips64 -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-64 %s
// MIPS-ALIAS-64: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-EB"
//
-// RUN: %clang -target mips-unknown-freebsd -mips64r2 -### \
+// RUN: %clang -target mips64-unknown-freebsd -mips64r2 -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-64R2 %s
// MIPS-ALIAS-64R2: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EB"
diff --git a/test/Driver/freebsd.c b/test/Driver/freebsd.c
index d1d9ea8a5106..f0275d0156f7 100644
--- a/test/Driver/freebsd.c
+++ b/test/Driver/freebsd.c
@@ -1,9 +1,8 @@
-// REQUIRES: ppc32-registered-target,ppc64-registered-target,mips-registered-target
// RUN: %clang -no-canonical-prefixes \
// RUN: -target powerpc-pc-freebsd8 %s \
// RUN: --sysroot=%S/Inputs/basic_freebsd_tree -### 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-PPC %s
-// CHECK-PPC: clang{{.*}}" "-cc1" "-triple" "powerpc-pc-freebsd8"
+// CHECK-PPC: "-cc1" "-triple" "powerpc-pc-freebsd8"
// CHECK-PPC: ld{{.*}}" "--sysroot=[[SYSROOT:[^"]+]]"
// CHECK-PPC: "--eh-frame-hdr" "-dynamic-linker" "{{.*}}ld-elf{{.*}}" "-o" "a.out" "{{.*}}crt1.o" "{{.*}}crti.o" "{{.*}}crtbegin.o" "-L[[SYSROOT]]/usr/lib" "{{.*}}.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "{{.*}}crtend.o" "{{.*}}crtn.o"
//
@@ -11,7 +10,7 @@
// RUN: -target powerpc64-pc-freebsd8 %s \
// RUN: --sysroot=%S/Inputs/basic_freebsd64_tree -### 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-PPC64 %s
-// CHECK-PPC64: clang{{.*}}" "-cc1" "-triple" "powerpc64-pc-freebsd8"
+// CHECK-PPC64: "-cc1" "-triple" "powerpc64-pc-freebsd8"
// CHECK-PPC64: ld{{.*}}" "--sysroot=[[SYSROOT:[^"]+]]"
// CHECK-PPC64: "--eh-frame-hdr" "-dynamic-linker" "{{.*}}ld-elf{{.*}}" "-o" "a.out" "{{.*}}crt1.o" "{{.*}}crti.o" "{{.*}}crtbegin.o" "-L[[SYSROOT]]/usr/lib" "{{.*}}.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "{{.*}}crtend.o" "{{.*}}crtn.o"
//
@@ -21,7 +20,7 @@
// RUN: %clang -no-canonical-prefixes -target x86_64-pc-freebsd8 -m32 %s \
// RUN: --sysroot=%S/Inputs/multiarch_freebsd64_tree -### 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-LIB32 %s
-// CHECK-LIB32: clang{{.*}}" "-cc1" "-triple" "i386-pc-freebsd8"
+// CHECK-LIB32: "-cc1" "-triple" "i386-pc-freebsd8"
// CHECK-LIB32: ld{{.*}}" {{.*}} "-m" "elf_i386_fbsd"
//
// RUN: %clang -target x86_64-pc-freebsd8 -m32 %s 2>&1 \
@@ -59,13 +58,13 @@
// CHECK-MIPSEL: "{{[^" ]*}}ld{{[^" ]*}}"
// CHECK-MIPSEL: "-dynamic-linker" "{{.*}}/libexec/ld-elf.so.1"
// CHECK-MIPSEL-NOT: "--hash-style={{gnu|both}}"
-// RUN: %clang %s -### -o %t.o 2>&1 \
+// RUN: %clang %s -### 2>&1 \
// RUN: -target mips64-unknown-freebsd10.0 \
// RUN: | FileCheck --check-prefix=CHECK-MIPS64 %s
// CHECK-MIPS64: "{{[^" ]*}}ld{{[^" ]*}}"
// CHECK-MIPS64: "-dynamic-linker" "{{.*}}/libexec/ld-elf.so.1"
// CHECK-MIPS64-NOT: "--hash-style={{gnu|both}}"
-// RUN: %clang %s -### -o %t.o 2>&1 \
+// RUN: %clang %s -### 2>&1 \
// RUN: -target mips64el-unknown-freebsd10.0 \
// RUN: | FileCheck --check-prefix=CHECK-MIPS64EL %s
// CHECK-MIPS64EL: "{{[^" ]*}}ld{{[^" ]*}}"
@@ -97,17 +96,35 @@
// CHECK-NORMAL: crt1.o
// CHECK-NORMAL: crtbegin.o
-// RUN: %clang %s -### -o %t.o -target arm-unknown-freebsd10.0 2>&1 \
+// RUN: %clang %s -### -target arm-unknown-freebsd10.0 -no-integrated-as 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-ARM %s
-// CHECK-ARM: clang{{.*}}" "-cc1"{{.*}}" "-fsjlj-exceptions"
+// CHECK-ARM: "-cc1"{{.*}}" "-fsjlj-exceptions"
// CHECK-ARM: as{{.*}}" "-mfpu=softvfp"{{.*}}"-matpcs"
+// CHECK-ARM-EABI-NOT: as{{.*}}" "-mfpu=vfp"
-// RUN: %clang %s -### -o %t.o -target arm-gnueabi-freebsd10.0 2>&1 \
+// RUN: %clang %s -### -target arm-gnueabi-freebsd10.0 -no-integrated-as 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-ARM-EABI %s
-// CHECK-ARM-EABI-NOT: clang{{.*}}" "-cc1"{{.*}}" "-fsjlj-exceptions"
+// CHECK-ARM-EABI-NOT: "-cc1"{{.*}}" "-fsjlj-exceptions"
// CHECK-ARM-EABI: as{{.*}}" "-mfpu=softvfp" "-meabi=5"
+// CHECK-ARM-EABI-NOT: as{{.*}}" "-mfpu=vfp"
// CHECK-ARM-EABI-NOT: as{{.*}}" "-matpcs"
-// RUN: %clang -target x86_64-pc-freebsd8 %s -### -flto -o %t.o 2>&1 \
+// RUN: %clang %s -### -target arm-gnueabihf-freebsd10.0 -no-integrated-as 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-ARM-EABIHF %s
+// CHECK-ARM-EABIHF-NOT: "-cc1"{{.*}}" "-fsjlj-exceptions"
+// CHECK-ARM-EABIHF: as{{.*}}" "-mfpu=vfp" "-meabi=5"
+// CHECK-ARM-EABIHF-NOT: as{{.*}}" "-mfpu=softvfp"
+// CHECK-ARM-EABIHF-NOT: as{{.*}}" "-matpcs"
+
+// RUN: %clang -target x86_64-pc-freebsd8 %s -### -flto 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-LTO %s
// CHECK-LTO: ld{{.*}}" "-plugin{{.*}}LLVMgold.so
+
+// RUN: %clang -target sparc-unknown-freebsd8 %s -### -fpic 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-SPARC-PIE %s
+// CHECK-SPARC-PIE: as{{.*}}" "-KPIC
+
+// RUN: %clang -mcpu=ultrasparc -target sparc64-unknown-freebsd8 %s -### 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-SPARC-CPU %s
+// CHECK-SPARC-CPU: cc1{{.*}}" "-target-cpu" "ultrasparc"
+// CHECK-SPARC-CPU: as{{.*}}" "-Av9a
diff --git a/test/Driver/fsanitize.c b/test/Driver/fsanitize.c
index 2d079236f574..57ea5a243fe4 100644
--- a/test/Driver/fsanitize.c
+++ b/test/Driver/fsanitize.c
@@ -1,4 +1,3 @@
-// RUN: %clang -target x86_64-linux-gnu -fcatch-undefined-behavior %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-TRAP
// RUN: %clang -target x86_64-linux-gnu -fsanitize=undefined-trap -fsanitize-undefined-trap-on-error %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-TRAP
// RUN: %clang -target x86_64-linux-gnu -fsanitize-undefined-trap-on-error -fsanitize=undefined-trap %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-TRAP
// CHECK-UNDEFINED-TRAP: "-fsanitize={{((signed-integer-overflow|integer-divide-by-zero|float-divide-by-zero|shift|unreachable|return|vla-bound|alignment|null|object-size|float-cast-overflow|array-bounds|enum|bool),?){14}"}}
@@ -13,26 +12,11 @@
// RUN: %clang -target x86_64-linux-gnu -fsanitize=integer %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-INTEGER
// CHECK-INTEGER: "-fsanitize={{((signed-integer-overflow|unsigned-integer-overflow|integer-divide-by-zero|shift),?){4}"}}
-// RUN: %clang -target x86_64-linux-gnu -fsanitize=thread,undefined -fno-thread-sanitizer -fno-sanitize=float-cast-overflow,vptr,bool,enum %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PARTIAL-UNDEFINED
-// CHECK-PARTIAL-UNDEFINED: "-fsanitize={{((signed-integer-overflow|integer-divide-by-zero|float-divide-by-zero|function|shift|unreachable|return|vla-bound|alignment|null|object-size|array-bounds),?){12}"}}
-
-// RUN: %clang -target x86_64-linux-gnu -fsanitize=address-full %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-FULL
-// CHECK-ASAN-FULL: "-fsanitize={{((address|init-order|use-after-return|use-after-scope),?){4}"}}
-
-// RUN: %clang -target x86_64-linux-gnu -fno-sanitize=init-order,use-after-return -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-IMPLIED-INIT-ORDER-UAR
-// CHECK-ASAN-IMPLIED-INIT-ORDER-UAR: "-fsanitize={{((address|init-order|use-after-return),?){3}"}}
-
-// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fno-sanitize=init-order %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-NO-IMPLIED-INIT-ORDER
-// CHECK-ASAN-NO-IMPLIED-INIT-ORDER-NOT: init-order
-
-// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fno-sanitize=use-after-return %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-NO-IMPLIED-UAR
-// CHECK-ASAN-NO-IMPLIED-UAR-NOT: use-after-return
-
-// RUN: %clang -target x86_64-linux-gnu -fcatch-undefined-behavior -fno-sanitize-undefined-trap-on-error %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-NO-TRAP-ERROR
-// CHECK-UNDEFINED-NO-TRAP-ERROR: '-fcatch-undefined-behavior' not allowed with '-fno-sanitize-undefined-trap-on-error'
+// RUN: %clang -fsanitize=bounds -### -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix=CHECK-BOUNDS
+// CHECK-BOUNDS: "-fsanitize={{((array-bounds|local-bounds),?){2}"}}
-// RUN: %clang -target x86_64-linux-gnu -fsanitize=vptr -fcatch-undefined-behavior %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-UNDEF-ERROR
-// CHECK-VPTR-UNDEF-ERROR: '-fsanitize=vptr' not allowed with '-fcatch-undefined-behavior'
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=thread,undefined -fno-sanitize=thread -fno-sanitize=float-cast-overflow,vptr,bool,enum %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PARTIAL-UNDEFINED
+// CHECK-PARTIAL-UNDEFINED: "-fsanitize={{((signed-integer-overflow|integer-divide-by-zero|float-divide-by-zero|function|shift|unreachable|return|vla-bound|alignment|null|object-size|array-bounds),?){12}"}}
// RUN: %clang -target x86_64-linux-gnu -fsanitize=undefined -fsanitize-undefined-trap-on-error %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-TRAP-ON-ERROR-UNDEF
// CHECK-UNDEFINED-TRAP-ON-ERROR-UNDEF: '-fsanitize=undefined' not allowed with '-fsanitize-undefined-trap-on-error'
@@ -62,49 +46,42 @@
// RUN: %clang -target x86_64-linux-gnu -fsanitize=leak,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-SANM
// CHECK-SANL-SANM: '-fsanitize=leak' not allowed with '-fsanitize=memory'
-// RUN: %clang -target x86_64-linux-gnu -faddress-sanitizer -fthread-sanitizer -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-TSAN
-// CHECK-ASAN-TSAN: '-faddress-sanitizer' not allowed with '-fthread-sanitizer'
-
-// RUN: %clang -target x86_64-linux-gnu -fsanitize=init-order %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ONLY-EXTRA-ASAN
-// CHECK-ONLY-EXTRA-ASAN: '-fsanitize=init-order' is ignored in absence of '-fsanitize=address'
-
-// RUN: %clang -target x86_64-linux-gnu -Wno-unused-sanitize-argument -fsanitize=init-order %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-WNO-UNUSED-SANITIZE-ARGUMENT
-// CHECK-WNO-UNUSED-SANITIZE-ARGUMENT-NOT: '-fsanitize=init-order' is ignored in absence of '-fsanitize=address'
-
-// RUN: %clang -target x86_64-linux-gnu -fsanitize=address,init-order -fno-sanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NOWARN-ONLY-EXTRA-ASAN
-// CHECK-NOWARN-ONLY-EXTRA-ASAN-NOT: is ignored in absence of '-fsanitize=address'
-
// RUN: %clang -target x86_64-linux-gnu -fsanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ONLY-TRACK-ORIGINS
// CHECK-ONLY-TRACK-ORIGINS: warning: argument unused during compilation: '-fsanitize-memory-track-origins'
// RUN: %clang -target x86_64-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-EXTRA-TRACK-ORIGINS
// CHECK-NO-EXTRA-TRACK-ORIGINS-NOT: "-fsanitize-memory-track-origins"
-// RUN: %clang -target x86_64-linux-gnu -fsanitize-address-zero-base-shadow -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ONLY-ASAN-ZERO-BASE-SHADOW
-// CHECK-ONLY-ASAN-ZERO-BASE-SHADOW: warning: argument unused during compilation: '-fsanitize-address-zero-base-shadow'
-
// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize=alignment -fsanitize=vptr -fno-sanitize=vptr %s -### 2>&1
// OK
// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -pie %s -### 2>&1
// OK
-// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins -pie %s -### 2>&1
-// OK
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-1
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=1 -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-1
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=2 -fsanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-1
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fno-sanitize-memory-track-origins -fsanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-1
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=0 -fsanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-1
-// RUN: %clang -target x86_64-linux-gnu -fsanitize=vptr -fno-sanitize=vptr -fsanitize=undefined,address %s -### 2>&1
-// OK
+// CHECK-TRACK-ORIGINS-1: -fsanitize-memory-track-origins=1
-// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-address-zero-base-shadow -pie %s -### 2>&1
-// OK
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fno-sanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-TRACK-ORIGINS
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=0 -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-TRACK-ORIGINS
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins -fno-sanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-TRACK-ORIGINS
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins -fsanitize-memory-track-origins=0 -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-TRACK-ORIGINS
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=2 -fno-sanitize-memory-track-origins -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-TRACK-ORIGINS
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=2 -fsanitize-memory-track-origins=0 -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-TRACK-ORIGINS
+// CHECK-NO-TRACK-ORIGINS-NOT: sanitize-memory-track-origins
+
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=2 -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-2
+// CHECK-TRACK-ORIGINS-2: -fsanitize-memory-track-origins=2
+
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=3 -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-3
+// CHECK-TRACK-ORIGINS-3: error: invalid value '3' in '-fsanitize-memory-track-origins=3'
-// RUN: %clang -target x86_64-linux-gnu -fcatch-undefined-behavior -fthread-sanitizer -fno-thread-sanitizer -faddress-sanitizer -fno-address-sanitizer -fbounds-checking -### %s 2>&1 | FileCheck %s --check-prefix=CHECK-DEPRECATED
-// CHECK-DEPRECATED: argument '-fbounds-checking' is deprecated, use '-fsanitize=local-bounds' instead
-// CHECK-DEPRECATED: argument '-fno-address-sanitizer' is deprecated, use '-fno-sanitize=address' instead
-// CHECK-DEPRECATED: argument '-faddress-sanitizer' is deprecated, use '-fsanitize=address' instead
-// CHECK-DEPRECATED: argument '-fno-thread-sanitizer' is deprecated, use '-fno-sanitize=thread' instead
-// CHECK-DEPRECATED: argument '-fthread-sanitizer' is deprecated, use '-fsanitize=thread' instead
-// CHECK-DEPRECATED: argument '-fcatch-undefined-behavior' is deprecated, use '-fsanitize=undefined-trap -fsanitize-undefined-trap-on-error' instead
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=vptr -fno-sanitize=vptr -fsanitize=undefined,address %s -### 2>&1
+// OK
// RUN: %clang -target x86_64-linux-gnu -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-NO-PIE
// CHECK-TSAN-NO-PIE: "-mrelocation-model" "pic" "-pic-level" "2" "-pie-level" "2"
@@ -114,26 +91,12 @@
// CHECK-MSAN-NO-PIE: "-mrelocation-model" "pic" "-pic-level" "2" "-pie-level" "2"
// CHECK-MSAN-NO-PIE: "-pie"
-// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-address-zero-base-shadow %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-ZERO-BASE-SHADOW-NO-PIE
-// CHECK-ASAN-ZERO-BASE-SHADOW-NO-PIE: "-mrelocation-model" "pic" "-pic-level" "2" "-pie-level" "2"
-// CHECK-ASAN-ZERO-BASE-SHADOW-NO-PIE: "-pie"
-
-// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-address-zero-base-shadow -fno-sanitize-address-zero-base-shadow %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-ZERO-BASE-SHADOW-CANCEL
-// CHECK-ASAN-ZERO-BASE-SHADOW-CANCEL-NOT: "-mrelocation-model" "pic" "-pic-level" "2" "-pie-level" "2"
-// CHECK-ASAN-ZERO-BASE-SHADOW-CANCEL-NOT: "-pie"
-
// RUN: %clang -target arm-linux-androideabi -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ANDROID-ASAN-NO-PIE
// CHECK-ANDROID-ASAN-NO-PIE: "-mrelocation-model" "pic" "-pic-level" "2" "-pie-level" "2"
// CHECK-ANDROID-ASAN-NO-PIE: "-pie"
// RUN: %clang -target arm-linux-androideabi %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ANDROID-NO-ASAN
-// CHECK-ANDROID-NO-ASAN: "-mrelocation-model" "static"
-
-// RUN: %clang -target arm-linux-androideabi -fsanitize=address -fsanitize-address-zero-base-shadow %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ANDROID-ASAN-ZERO-BASE
-// CHECK-ANDROID-ASAN-ZERO-BASE-NOT: argument unused during compilation
-
-// RUN: %clang -target arm-linux-androideabi -fsanitize=address -fno-sanitize-address-zero-base-shadow %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ANDROID-ASAN-NO-ZERO-BASE
-// CHECK-ANDROID-ASAN-NO-ZERO-BASE: '-fno-sanitize-address-zero-base-shadow' not allowed with '-fsanitize=address'
+// CHECK-ANDROID-NO-ASAN: "-mrelocation-model" "pic"
// RUN: %clang -target x86_64-linux-gnu %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-RECOVER
// RUN: %clang -target x86_64-linux-gnu %s -fsanitize-recover -### 2>&1 | FileCheck %s --check-prefix=CHECK-RECOVER
diff --git a/test/Driver/function-sections.c b/test/Driver/function-sections.c
new file mode 100644
index 000000000000..fe6d303e3ec4
--- /dev/null
+++ b/test/Driver/function-sections.c
@@ -0,0 +1,62 @@
+// Test handling of -f(no-)function-sections and -f(no-)data-sections
+//
+// CHECK-FS: -ffunction-sections
+// CHECK-NOFS-NOT: -ffunction-sections
+// CHECK-DS: -fdata-sections
+// CHECK-NODS-NOT: -fdata-sections
+
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target i386-unknown-linux \
+// RUN: | FileCheck --check-prefix=CHECK-NOFS --check-prefix=CHECK-NODS %s
+
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target i386-unknown-linux \
+// RUN: -ffunction-sections \
+// RUN: | FileCheck --check-prefix=CHECK-FS %s
+
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target i386-unknown-linux \
+// RUN: -fno-function-sections \
+// RUN: | FileCheck --check-prefix=CHECK-NOFS %s
+
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target i386-unknown-linux \
+// RUN: -ffunction-sections -fno-function-sections \
+// RUN: | FileCheck --check-prefix=CHECK-NOFS %s
+
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target i386-unknown-linux \
+// RUN: -fno-function-sections -ffunction-sections \
+// RUN: | FileCheck --check-prefix=CHECK-FS %s
+
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target i386-unknown-linux \
+// RUN: -ffunction-sections -fno-function-sections -ffunction-sections \
+// RUN: | FileCheck --check-prefix=CHECK-FS %s
+
+
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target i386-unknown-linux \
+// RUN: -fdata-sections \
+// RUN: | FileCheck --check-prefix=CHECK-DS %s
+
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target i386-unknown-linux \
+// RUN: -fno-data-sections \
+// RUN: | FileCheck --check-prefix=CHECK-NODS %s
+
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target i386-unknown-linux \
+// RUN: -fdata-sections -fno-data-sections \
+// RUN: | FileCheck --check-prefix=CHECK-NODS %s
+
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target i386-unknown-linux \
+// RUN: -fno-data-sections -fdata-sections \
+// RUN: | FileCheck --check-prefix=CHECK-DS %s
+
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target i386-unknown-linux \
+// RUN: -fdata-sections -fno-data-sections -fdata-sections \
+// RUN: | FileCheck --check-prefix=CHECK-DS %s
+
diff --git a/test/Driver/fuse-ld.c b/test/Driver/fuse-ld.c
new file mode 100644
index 000000000000..bd25b8deb328
--- /dev/null
+++ b/test/Driver/fuse-ld.c
@@ -0,0 +1,63 @@
+// RUN: %clang %s -### \
+// RUN: -target x86_64-unknown-freebsd 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-FREEBSD-LD
+// CHECK-FREEBSD-LD: ld
+
+// RUN: %clang %s -### -fuse-ld=bfd \
+// RUN: --sysroot=%S/Inputs/basic_freebsd_tree \
+// RUN: -target x86_64-unknown-freebsd \
+// RUN: -B%S/Inputs/basic_freebsd_tree/usr/bin 2>&1 \
+// RUN: | FileCheck %s -check-prefix=CHECK-FREEBSD-BFD
+// CHECK-FREEBSD-BFD: Inputs/basic_freebsd_tree/usr/bin{{/|\\+}}ld.bfd
+
+// RUN: %clang %s -### -fuse-ld=gold \
+// RUN: --sysroot=%S/Inputs/basic_freebsd_tree \
+// RUN: -target x86_64-unknown-freebsd \
+// RUN: -B%S/Inputs/basic_freebsd_tree/usr/bin 2>&1 \
+// RUN: | FileCheck %s -check-prefix=CHECK-FREEBSD-GOLD
+// CHECK-FREEBSD-GOLD: Inputs/basic_freebsd_tree/usr/bin{{/|\\+}}ld.gold
+
+// RUN: %clang %s -### -fuse-ld=plib \
+// RUN: --sysroot=%S/Inputs/basic_freebsd_tree \
+// RUN: -target x86_64-unknown-freebsd \
+// RUN: -B%S/Inputs/basic_freebsd_tree/usr/bin 2>&1 \
+// RUN: | FileCheck %s -check-prefix=CHECK-FREEBSD-PLIB
+// CHECK-FREEBSD-PLIB: error: invalid linker name
+
+
+
+// RUN: %clang %s -### \
+// RUN: -target arm-linux-androideabi \
+// RUN: -B%S/Inputs/basic_android_tree/bin 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-ANDROID-ARM-LD
+// CHECK-ANDROID-ARM-LD: Inputs/basic_android_tree/bin{{/|\\+}}arm-linux-androideabi-ld
+
+// RUN: %clang %s -### -fuse-ld=bfd \
+// RUN: -target arm-linux-androideabi \
+// RUN: -B%S/Inputs/basic_android_tree/bin 2>&1 \
+// RUN: | FileCheck %s -check-prefix=CHECK-ANDROID-ARM-BFD
+// CHECK-ANDROID-ARM-BFD: Inputs/basic_android_tree/bin{{/|\\+}}arm-linux-androideabi-ld.bfd
+
+// RUN: %clang %s -### -fuse-ld=gold \
+// RUN: -target arm-linux-androideabi \
+// RUN: -B%S/Inputs/basic_android_tree/bin 2>&1 \
+// RUN: | FileCheck %s -check-prefix=CHECK-ANDROID-ARM-GOLD
+// CHECK-ANDROID-ARM-GOLD: Inputs/basic_android_tree/bin{{/|\\+}}arm-linux-androideabi-ld.gold
+
+// RUN: %clang %s -### \
+// RUN: -target arm-linux-androideabi \
+// RUN: -gcc-toolchain %S/Inputs/basic_android_tree 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-ANDROID-ARM-LD-TC
+// CHECK-ANDROID-ARM-LD-TC: Inputs/basic_android_tree/lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin{{/|\\+}}ld
+
+// RUN: %clang %s -### -fuse-ld=bfd \
+// RUN: -target arm-linux-androideabi \
+// RUN: -gcc-toolchain %S/Inputs/basic_android_tree 2>&1 \
+// RUN: | FileCheck %s -check-prefix=CHECK-ANDROID-ARM-BFD-TC
+// CHECK-ANDROID-ARM-BFD-TC: Inputs/basic_android_tree/lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin{{/|\\+}}ld.bfd
+
+// RUN: %clang %s -### -fuse-ld=gold \
+// RUN: -target arm-linux-androideabi \
+// RUN: -gcc-toolchain %S/Inputs/basic_android_tree 2>&1 \
+// RUN: | FileCheck %s -check-prefix=CHECK-ANDROID-ARM-GOLD-TC
+// CHECK-ANDROID-ARM-GOLD-TC: Inputs/basic_android_tree/lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin{{/|\\+}}ld.gold
diff --git a/test/Driver/gcc_forward.c b/test/Driver/gcc_forward.c
index b9933d7fb376..3bc413193f16 100644
--- a/test/Driver/gcc_forward.c
+++ b/test/Driver/gcc_forward.c
@@ -13,19 +13,8 @@
// CHECK: "-Wall" "-Wdocumentation"
// CHECK: "-o" "{{[^"]+}}.s"
//
-// gcc-as
-// CHECK: gcc{{[^"]*}}"
-// CHECK-NOT: "-mlinker-version=10"
-// CHECK-NOT: "-Xclang"
-// CHECK-NOT: "foo-bar"
-// CHECK-NOT: "-Wall"
-// CHECK-NOT: "-Wdocumentation"
-// CHECK: -march
-// CHECK-NOT: "-mlinker-version=10"
-// CHECK-NOT: "-Xclang"
-// CHECK-NOT: "foo-bar"
-// CHECK-NOT: "-Wall"
-// CHECK-NOT: "-Wdocumentation"
+// gnu-as
+// CHECK: as{{[^"]*}}"
// CHECK: "-o" "{{[^"]+}}.o"
//
// gcc-ld
diff --git a/test/Driver/gold-lto.c b/test/Driver/gold-lto.c
index c2e8bdfbc747..18a293b6960e 100644
--- a/test/Driver/gold-lto.c
+++ b/test/Driver/gold-lto.c
@@ -19,3 +19,8 @@
// CHECK-ARM-V7A: "-plugin" "{{.*}}/LLVMgold.so"
// CHECK-ARM-V7A: "-plugin-opt=mcpu=cortex-a8"
// CHECK-ARM-V7A: "-plugin-opt=foo"
+//
+// RUN: %clang -target i686-linux-android -### %t.o -flto 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-X86-ANDROID
+// CHECK-X86-ANDROID: "-pie"
+// CHECK-X86-ANDROID: "-plugin" "{{.*}}/LLVMgold.so"
diff --git a/test/Driver/hexagon-toolchain-elf.c b/test/Driver/hexagon-toolchain-elf.c
index f60c61c9c355..87c33c755fc7 100644
--- a/test/Driver/hexagon-toolchain-elf.c
+++ b/test/Driver/hexagon-toolchain-elf.c
@@ -1,5 +1,3 @@
-// REQUIRES: hexagon-registered-target
-
// -----------------------------------------------------------------------------
// Test standard include paths
// -----------------------------------------------------------------------------
@@ -135,7 +133,7 @@
// RUN: -ccc-install-dir %S/Inputs/hexagon_tree/qc/bin \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK011 %s
-// CHECK011: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK011: "-cc1"
// CHECK011-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"{{.*}}
// CHECK011-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK011-NOT: "-static"
@@ -159,7 +157,7 @@
// RUN: -ccc-install-dir %S/Inputs/hexagon_tree/qc/bin \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK012 %s
-// CHECK012: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK012: "-cc1"
// CHECK012-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"{{.*}}
// CHECK012-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK012-NOT: "-static"
@@ -185,7 +183,7 @@
// RUN: -Lone -L two -L three \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK013 %s
-// CHECK013: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK013: "-cc1"
// CHECK013-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"{{.*}}
// CHECK013-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK013: "{{.*}}/hexagon/lib/v4/crt0_standalone.o"
@@ -209,7 +207,7 @@
// RUN: -static \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK014 %s
-// CHECK014: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK014: "-cc1"
// CHECK014-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"{{.*}}
// CHECK014-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK014: "-static"
@@ -230,7 +228,7 @@
// RUN: -shared \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK015 %s
-// CHECK015: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK015: "-cc1"
// CHECK015-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"{{.*}}
// CHECK015-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK015: "-shared" "-call_shared"
@@ -260,7 +258,7 @@
// RUN: -static \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK016 %s
-// CHECK016: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK016: "-cc1"
// CHECK016-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"{{.*}}
// CHECK016-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK016: "-shared" "-call_shared" "-static"
@@ -292,7 +290,7 @@
// RUN: -nostdlib \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK017 %s
-// CHECK017: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK017: "-cc1"
// CHECK017-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"{{.*}}
// CHECK017-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK017-NOT: crt0_standalone.o
@@ -318,7 +316,7 @@
// RUN: -nostartfiles \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK018 %s
-// CHECK018: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK018: "-cc1"
// CHECK018-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"{{.*}}
// CHECK018-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK018-NOT: crt0_standalone.o
@@ -344,7 +342,7 @@
// RUN: -nodefaultlibs \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK019 %s
-// CHECK019: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK019: "-cc1"
// CHECK019-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"{{.*}}
// CHECK019-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK019: "{{.*}}/hexagon/lib/v4/crt0_standalone.o"
@@ -373,7 +371,7 @@
// RUN: -moslib=first -moslib=second \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK020 %s
-// CHECK020: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK020: "-cc1"
// CHECK020-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"{{.*}}
// CHECK020-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK020-NOT: "-static"
@@ -398,7 +396,7 @@
// RUN: -moslib=first -moslib=second -moslib=standalone\
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK021 %s
-// CHECK021: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK021: "-cc1"
// CHECK021-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"{{.*}}
// CHECK021-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK021-NOT: "-static"
@@ -430,7 +428,7 @@
// RUN: -uFoo -undefined Bar \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK022 %s
-// CHECK022: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK022: "-cc1"
// CHECK022-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"{{.*}}
// CHECK022-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK022: "{{.*}}/hexagon/lib/v4/crt0_standalone.o"
@@ -457,7 +455,7 @@
// RUN: -ccc-install-dir %S/Inputs/hexagon_tree/qc/bin \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK023 %s
-// CHECK023: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK023: "-cc1"
// CHECK023: "-mrelocation-model" "static"
// CHECK023-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"
// CHECK023-NOT: "-G{{[0-9]+}}"
@@ -480,7 +478,7 @@
// RUN: -msmall-data-threshold=8 \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK024 %s
-// CHECK024: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK024: "-cc1"
// CHECK024-NOT: "-mrelocation-model" "static"
// CHECK024: "-pic-level" "{{[12]}}"
// CHECK024: "-mllvm" "-hexagon-small-data-threshold=0"
@@ -504,7 +502,7 @@
// RUN: -msmall-data-threshold=8 \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK025 %s
-// CHECK025: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK025: "-cc1"
// CHECK025: "-mrelocation-model" "static"
// CHECK025: "-mllvm" "-hexagon-small-data-threshold=8"
// CHECK025-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"
@@ -520,7 +518,7 @@
// RUN: -pie \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK026 %s
-// CHECK026: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK026: "-cc1"
// CHECK026-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"
// CHECK026-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK026: "-pie"
@@ -530,7 +528,7 @@
// RUN: -pie -shared \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK027 %s
-// CHECK027: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK027: "-cc1"
// CHECK027-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"
// CHECK027-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK027-NOT: "-pie"
@@ -542,7 +540,7 @@
// RUN: -ccc-install-dir %S/Inputs/hexagon_tree/qc/bin \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK028 %s
-// CHECK028: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK028: "-cc1"
// CHECK028: "-mqdsp6-compat"
// CHECK028: "-Wreturn-type"
// CHECK028-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"
@@ -558,7 +556,7 @@
// RUN: -Xassembler --keep-locals \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK029 %s
-// CHECK029: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK029: "-cc1"
// CHECK029-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"
// CHECK029: "--noexecstack" "--trap" "--keep-locals"
// CHECK029-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
diff --git a/test/Driver/hexagon-toolchain.c b/test/Driver/hexagon-toolchain.c
index f3d7e25aa9dc..88440f8d9d9b 100644
--- a/test/Driver/hexagon-toolchain.c
+++ b/test/Driver/hexagon-toolchain.c
@@ -1,5 +1,3 @@
-// REQUIRES: hexagon-registered-target
-
// -----------------------------------------------------------------------------
// Test standard include paths
// -----------------------------------------------------------------------------
@@ -135,7 +133,7 @@
// RUN: -ccc-install-dir %S/Inputs/hexagon_tree/qc/bin \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK011 %s
-// CHECK011: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK011: "-cc1"
// CHECK011-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"{{.*}}
// CHECK011-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK011-NOT: "-static"
@@ -159,7 +157,7 @@
// RUN: -ccc-install-dir %S/Inputs/hexagon_tree/qc/bin \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK012 %s
-// CHECK012: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK012: "-cc1"
// CHECK012-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"{{.*}}
// CHECK012-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK012-NOT: "-static"
@@ -185,7 +183,7 @@
// RUN: -Lone -L two -L three \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK013 %s
-// CHECK013: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK013: "-cc1"
// CHECK013-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"{{.*}}
// CHECK013-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK013: "{{.*}}/hexagon/lib/v4/crt0_standalone.o"
@@ -209,7 +207,7 @@
// RUN: -static \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK014 %s
-// CHECK014: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK014: "-cc1"
// CHECK014-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"{{.*}}
// CHECK014-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK014: "-static"
@@ -230,7 +228,7 @@
// RUN: -shared \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK015 %s
-// CHECK015: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK015: "-cc1"
// CHECK015-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"{{.*}}
// CHECK015-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK015: "-shared" "-call_shared"
@@ -260,7 +258,7 @@
// RUN: -static \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK016 %s
-// CHECK016: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK016: "-cc1"
// CHECK016-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"{{.*}}
// CHECK016-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK016: "-shared" "-call_shared" "-static"
@@ -292,7 +290,7 @@
// RUN: -nostdlib \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK017 %s
-// CHECK017: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK017: "-cc1"
// CHECK017-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"{{.*}}
// CHECK017-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK017-NOT: crt0_standalone.o
@@ -318,7 +316,7 @@
// RUN: -nostartfiles \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK018 %s
-// CHECK018: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK018: "-cc1"
// CHECK018-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"{{.*}}
// CHECK018-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK018-NOT: crt0_standalone.o
@@ -344,7 +342,7 @@
// RUN: -nodefaultlibs \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK019 %s
-// CHECK019: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK019: "-cc1"
// CHECK019-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"{{.*}}
// CHECK019-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK019: "{{.*}}/hexagon/lib/v4/crt0_standalone.o"
@@ -373,7 +371,7 @@
// RUN: -moslib=first -moslib=second \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK020 %s
-// CHECK020: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK020: "-cc1"
// CHECK020-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"{{.*}}
// CHECK020-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK020-NOT: "-static"
@@ -398,7 +396,7 @@
// RUN: -moslib=first -moslib=second -moslib=standalone\
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK021 %s
-// CHECK021: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK021: "-cc1"
// CHECK021-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"{{.*}}
// CHECK021-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK021-NOT: "-static"
@@ -430,7 +428,7 @@
// RUN: -uFoo -undefined Bar \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK022 %s
-// CHECK022: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK022: "-cc1"
// CHECK022-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"{{.*}}
// CHECK022-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK022: "{{.*}}/hexagon/lib/v4/crt0_standalone.o"
@@ -457,7 +455,7 @@
// RUN: -ccc-install-dir %S/Inputs/hexagon_tree/qc/bin \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK023 %s
-// CHECK023: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK023: "-cc1"
// CHECK023: "-mrelocation-model" "static"
// CHECK023-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"
// CHECK023-NOT: "-G{{[0-9]+}}"
@@ -480,7 +478,7 @@
// RUN: -msmall-data-threshold=8 \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK024 %s
-// CHECK024: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK024: "-cc1"
// CHECK024-NOT: "-mrelocation-model" "static"
// CHECK024: "-pic-level" "{{[12]}}"
// CHECK024: "-mllvm" "-hexagon-small-data-threshold=0"
@@ -504,7 +502,7 @@
// RUN: -msmall-data-threshold=8 \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK025 %s
-// CHECK025: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK025: "-cc1"
// CHECK025: "-mrelocation-model" "static"
// CHECK025: "-mllvm" "-hexagon-small-data-threshold=8"
// CHECK025-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"
@@ -520,7 +518,7 @@
// RUN: -pie \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK026 %s
-// CHECK026: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK026: "-cc1"
// CHECK026-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"
// CHECK026-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK026: "-pie"
@@ -530,7 +528,7 @@
// RUN: -pie -shared \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK027 %s
-// CHECK027: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK027: "-cc1"
// CHECK027-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"
// CHECK027-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
// CHECK027-NOT: "-pie"
@@ -542,7 +540,7 @@
// RUN: -ccc-install-dir %S/Inputs/hexagon_tree/qc/bin \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK028 %s
-// CHECK028: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK028: "-cc1"
// CHECK028: "-mqdsp6-compat"
// CHECK028: "-Wreturn-type"
// CHECK028-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"
@@ -558,7 +556,7 @@
// RUN: -Xassembler --keep-locals \
// RUN: %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK029 %s
-// CHECK029: "{{.*}}clang{{.*}}" "-cc1"
+// CHECK029: "-cc1"
// CHECK029-NEXT: "{{.*}}/bin{{/|\\}}hexagon-as"
// CHECK029: "--noexecstack" "--trap" "--keep-locals"
// CHECK029-NEXT: "{{.*}}/bin{{/|\\}}hexagon-ld"
diff --git a/test/Driver/ident_md.c b/test/Driver/ident_md.c
index d7da31707f04..7b2b2f6a7dee 100644
--- a/test/Driver/ident_md.c
+++ b/test/Driver/ident_md.c
@@ -1,6 +1,6 @@
// RUN: %clang %s -emit-llvm -S -o - | FileCheck %s
// Verify that clang version appears in the llvm.ident metadata.
-// CHECK: !llvm.ident = !{!0}
-// CHECK: !0 = metadata !{metadata !{{.*}}
+// CHECK: !llvm.ident = !{{{.*}}}
+// CHECK: !{{[0-9]+}} = metadata !{metadata !{{.*}}
diff --git a/test/Driver/implicit-function-as-error.c b/test/Driver/implicit-function-as-error.c
new file mode 100644
index 000000000000..5949e2064cee
--- /dev/null
+++ b/test/Driver/implicit-function-as-error.c
@@ -0,0 +1,9 @@
+// RUN: %clang -target x86_64-apple-darwin -mios-simulator-version-min=7 -fsyntax-only %s -Xclang -verify
+// RUN: %clang -target x86_64-apple-darwin -arch arm64 -target x86_64-apple-darwin -mios-version-min=7 -fsyntax-only %s -Xclang -verify
+
+// For 64-bit iOS, automatically promote -Wimplicit-function-declaration
+// to an error.
+
+void radar_10894044() {
+ radar_10894044_not_declared(); // expected-error {{implicit declaration of function 'radar_10894044_not_declared' is invalid in C99}}
+}
diff --git a/test/Driver/instrprof-ld.c b/test/Driver/instrprof-ld.c
new file mode 100644
index 000000000000..f70ae474d0db
--- /dev/null
+++ b/test/Driver/instrprof-ld.c
@@ -0,0 +1,58 @@
+// Test instrumented profiling ld flags.
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -target i386-unknown-linux -fprofile-instr-generate \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
+// RUN: --sysroot=%S/Inputs/basic_linux_tree \
+// RUN: | FileCheck --check-prefix=CHECK-LINUX-I386 %s
+//
+// CHECK-LINUX-I386: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
+// CHECK-LINUX-I386: "{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}linux{{/|\\\\}}libclang_rt.profile-i386.a" {{.*}} "-lc"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -target x86_64-unknown-linux -fprofile-instr-generate \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
+// RUN: --sysroot=%S/Inputs/basic_linux_tree \
+// RUN: | FileCheck --check-prefix=CHECK-LINUX-X86-64 %s
+//
+// CHECK-LINUX-X86-64: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
+// CHECK-LINUX-X86-64: "{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}linux{{/|\\\\}}libclang_rt.profile-x86_64.a" {{.*}} "-lc"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -target x86_64-unknown-freebsd -fprofile-instr-generate \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
+// RUN: --sysroot=%S/Inputs/basic_freebsd64_tree \
+// RUN: | FileCheck --check-prefix=CHECK-FREEBSD-X86-64 %s
+//
+// CHECK-FREEBSD-X86-64: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
+// CHECK-FREEBSD-X86-64: "{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}freebsd{{/|\\\\}}libclang_rt.profile-x86_64.a"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -shared \
+// RUN: -target i386-unknown-linux -fprofile-instr-generate \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
+// RUN: --sysroot=%S/Inputs/basic_linux_tree \
+// RUN: | FileCheck --check-prefix=CHECK-LINUX-I386-SHARED %s
+//
+// CHECK-LINUX-I386-SHARED: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
+// CHECK-LINUX-I386-SHARED: "{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}linux{{/|\\\\}}libclang_rt.profile-pic-i386.a" {{.*}} "-lc"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -shared \
+// RUN: -target x86_64-unknown-linux -fprofile-instr-generate \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
+// RUN: --sysroot=%S/Inputs/basic_linux_tree \
+// RUN: | FileCheck --check-prefix=CHECK-LINUX-X86-64-SHARED %s
+//
+// CHECK-LINUX-X86-64-SHARED: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
+// CHECK-LINUX-X86-64-SHARED: "{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}linux{{/|\\\\}}libclang_rt.profile-pic-x86_64.a" {{.*}} "-lc"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -shared \
+// RUN: -target x86_64-unknown-freebsd -fprofile-instr-generate \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
+// RUN: --sysroot=%S/Inputs/basic_freebsd64_tree \
+// RUN: | FileCheck --check-prefix=CHECK-FREEBSD-X86-64-SHARED %s
+//
+// CHECK-FREEBSD-X86-64-SHARED: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
+// CHECK-FREEBSD-X86-64-SHARED: "{{.*}}/Inputs/resource_dir{{/|\\\\}}lib{{/|\\\\}}freebsd{{/|\\\\}}libclang_rt.profile-pic-x86_64.a"
diff --git a/test/Driver/integrated-as.c b/test/Driver/integrated-as.c
index e73174e878f8..c65973ca5f32 100644
--- a/test/Driver/integrated-as.c
+++ b/test/Driver/integrated-as.c
@@ -2,3 +2,14 @@
// CHECK: cc1as
// CHECK: -mrelax-all
+
+// RUN: %clang -### -fintegrated-as -c -save-temps %s 2>&1 | FileCheck %s -check-prefix FIAS
+
+// FIAS: cc1as
+
+// RUN: %clang -### -fno-integrated-as -S %s 2>&1 \
+// RUN: | FileCheck %s -check-prefix NOFIAS
+
+// NOFIAS-NOT: cc1as
+// NOFIAS: -cc1
+// NOFIAS: -no-integrated-as
diff --git a/test/Driver/integrated-as.s b/test/Driver/integrated-as.s
index 0843cf93457b..9a7d2c5dfef4 100644
--- a/test/Driver/integrated-as.s
+++ b/test/Driver/integrated-as.s
@@ -5,29 +5,41 @@
// RUN: %clang -### -c -integrated-as -Wa,-L %s 2>&1 | FileCheck --check-prefix=OPT_L %s
// OPT_L: msave-temp-labels
-// RUN: not %clang -c -integrated-as -Wa,--compress-debug-sections %s 2>&1 | FileCheck --check-prefix=INVALID %s
-// INVALID: error: unsupported argument '--compress-debug-sections' to option 'Wa,'
-
// RUN: %clang -### -target x86_64-linux-gnu -c -integrated-as %s -fsanitize=address 2>&1 %s | FileCheck --check-prefix=SANITIZE %s
// SANITIZE: argument unused during compilation: '-fsanitize=address'
// Test that -I params in -Wa, and -Xassembler args are passed to integrated assembler
-// RUN: %clang -### -c -integrated-as %s -Wa,-I,foo_dir 2>&1 %s | FileCheck --check-prefix=WA_INCLUDE1 %s
+// RUN: %clang -### -c -integrated-as %s -Wa,-I,foo_dir 2>&1 | FileCheck --check-prefix=WA_INCLUDE1 %s
// WA_INCLUDE1: cc1as
// WA_INCLUDE1: "-I" "foo_dir"
-// RUN: %clang -### -c -integrated-as %s -Wa,-Ifoo_dir 2>&1 %s | FileCheck --check-prefix=WA_INCLUDE2 %s
+// RUN: %clang -### -c -integrated-as %s -Wa,-Ifoo_dir 2>&1 | FileCheck --check-prefix=WA_INCLUDE2 %s
// WA_INCLUDE2: cc1as
// WA_INCLUDE2: "-Ifoo_dir"
-// RUN: %clang -### -c -integrated-as %s -Wa,-I -Wa,foo_dir 2>&1 %s | FileCheck --check-prefix=WA_INCLUDE3 %s
+// RUN: %clang -### -c -integrated-as %s -Wa,-I -Wa,foo_dir 2>&1 | FileCheck --check-prefix=WA_INCLUDE3 %s
// WA_INCLUDE3: cc1as
// WA_INCLUDE3: "-I" "foo_dir"
-// RUN: %clang -### -c -integrated-as %s -Xassembler -I -Xassembler foo_dir 2>&1 %s | FileCheck --check-prefix=XA_INCLUDE1 %s
+// RUN: %clang -### -c -integrated-as %s -Xassembler -I -Xassembler foo_dir 2>&1 | FileCheck --check-prefix=XA_INCLUDE1 %s
// XA_INCLUDE1: cc1as
// XA_INCLUDE1: "-I" "foo_dir"
-// RUN: %clang -### -c -integrated-as %s -Xassembler -Ifoo_dir 2>&1 %s | FileCheck --check-prefix=XA_INCLUDE2 %s
+// RUN: %clang -### -c -integrated-as %s -Xassembler -Ifoo_dir 2>&1 | FileCheck --check-prefix=XA_INCLUDE2 %s
// XA_INCLUDE2: cc1as
// XA_INCLUDE2: "-Ifoo_dir"
+
+// RUN: %clang -### -c -integrated-as %s -gdwarf-2 2>&1 | FileCheck --check-prefix=DWARF2 %s
+// DWARF2: "-g" "-gdwarf-2"
+
+// RUN: %clang -### -c -integrated-as %s -gdwarf-3 2>&1 | FileCheck --check-prefix=DWARF3 %s
+// DWARF3: "-g" "-gdwarf-3"
+
+// RUN: %clang -### -c -integrated-as %s -gdwarf-4 2>&1 | FileCheck --check-prefix=DWARF4 %s
+// DWARF4: "-g" "-gdwarf-4"
+
+// RUN: %clang -### -c -integrated-as %s -Xassembler -gdwarf-2 2>&1 | FileCheck --check-prefix=DWARF2XASSEMBLER %s
+// DWARF2XASSEMBLER: "-gdwarf-2"
+
+// RUN: %clang -### -c -integrated-as %s -Wa,-gdwarf-2 2>&1 | FileCheck --check-prefix=DWARF2WA %s
+// DWARF2WA: "-gdwarf-2"
diff --git a/test/Driver/krait-cpu.c b/test/Driver/krait-cpu.c
new file mode 100644
index 000000000000..ee324b6a54a5
--- /dev/null
+++ b/test/Driver/krait-cpu.c
@@ -0,0 +1,3 @@
+// ================== Check default Architecture on krait CPU
+// RUN: %clang -target arm-linux-gnueabi -mcpu=krait -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-CPUV7A %s
+// CHECK-CPUV7A: "-cc1"{{.*}} "-triple" "armv7-{{.*}}
diff --git a/test/Driver/linker-opts.c b/test/Driver/linker-opts.c
index 7668a7599076..24866a63b1fd 100644
--- a/test/Driver/linker-opts.c
+++ b/test/Driver/linker-opts.c
@@ -4,3 +4,8 @@
// GCC driver is used as linker on cygming. It should be aware of LIBRARY_PATH.
// XFAIL: win32
// REQUIRES: clang-driver
+// REQUIRES: native
+
+// Make sure that LIBRARY_PATH works for both i386 and x86_64 on Darwin.
+// RUN: env LIBRARY_PATH=%T/test1 %clang -target x86_64-apple-darwin %s -### 2>&1 | FileCheck %s
+// RUN: env LIBRARY_PATH=%T/test1 %clang -target i386-apple-darwin %s -### 2>&1 | FileCheck %s
diff --git a/test/Driver/linux-as.c b/test/Driver/linux-as.c
index a449b7b65380..05c7fa70f3bb 100644
--- a/test/Driver/linux-as.c
+++ b/test/Driver/linux-as.c
@@ -60,6 +60,32 @@
// RUN: | FileCheck -check-prefix=CHECK-PPC-NO-MCPU %s
// CHECK-PPC-NO-MCPU-NOT: as{{.*}} "-mcpu=invalid-cpu"
//
+// RUN: %clang -target sparc64-linux -mcpu=invalid-cpu -### \
+// RUN: -no-integrated-as -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=CHECK-SPARCV9 %s
+// CHECK-SPARCV9: as
+// CHECK-SPARCV9: -64
+// CHECK-SPARCV9: -Av9a
+// CHECK-SPARCV9-NOT: -KPIC
+// CHECK-SPARCV9: -o
+//
+// RUN: %clang -target sparc64-linux -mcpu=invalid-cpu -### \
+// RUN: -no-integrated-as -fpic -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=CHECK-SPARCV9PIC %s
+// CHECK-SPARCV9PIC: as
+// CHECK-SPARCV9PIC: -64
+// CHECK-SPARCV9PIC: -Av9a
+// CHECK-SPARCV9PIC: -KPIC
+// CHECK-SPARCV9PIC: -o
+//
+// RUN: %clang -target sparc-linux -mcpu=invalid-cpu -### \
+// RUN: -no-integrated-as -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=CHECK-SPARCV8 %s
+// CHECK-SPARCV8: as
+// CHECK-SPARCV8: -32
+// CHECK-SPARCV8: -Av8plusa
+// CHECK-SPARCV8: -o
+//
// RUN: %clang -target s390x-linux -### -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-Z-DEFAULT-ARCH %s
// CHECK-Z-DEFAULT-ARCH: as{{.*}} "-march=z10"
diff --git a/test/Driver/linux-header-search.cpp b/test/Driver/linux-header-search.cpp
index 6395cfbb90bc..309ece28db77 100644
--- a/test/Driver/linux-header-search.cpp
+++ b/test/Driver/linux-header-search.cpp
@@ -1,6 +1,29 @@
// General tests that the header search paths detected by the driver and passed
// to CC1 are sane.
//
+// Test a simulated installation of libc++ on Linux, both through sysroot and
+// the installation path of Clang.
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target x86_64-unknown-linux-gnu \
+// RUN: -stdlib=libc++ \
+// RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin \
+// RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree \
+// RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBCXX-SYSROOT %s
+// CHECK-BASIC-LIBCXX-SYSROOT: "{{[^"]*}}clang{{[^"]*}}" "-cc1"
+// CHECK-BASIC-LIBCXX-SYSROOT: "-isysroot" "[[SYSROOT:[^"]+]]"
+// CHECK-BASIC-LIBCXX-SYSROOT: "-internal-isystem" "[[SYSROOT]]/usr/include/c++/v1"
+// CHECK-BASIC-LIBCXX-SYSROOT: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target x86_64-unknown-linux-gnu \
+// RUN: -stdlib=libc++ \
+// RUN: -ccc-install-dir %S/Inputs/basic_linux_libcxx_tree/usr/bin \
+// RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree \
+// RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBCXX-INSTALL %s
+// CHECK-BASIC-LIBCXX-INSTALL: "{{[^"]*}}clang{{[^"]*}}" "-cc1"
+// CHECK-BASIC-LIBCXX-INSTALL: "-isysroot" "[[SYSROOT:[^"]+]]"
+// CHECK-BASIC-LIBCXX-INSTALL: "-internal-isystem" "[[SYSROOT]]/usr/bin/../include/c++/v1"
+// CHECK-BASIC-LIBCXX-INSTALL: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
+//
// Test a very broken version of multiarch that shipped in Ubuntu 11.04.
// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
// RUN: -target i386-unknown-linux \
@@ -23,8 +46,8 @@
// CHECK-UBUNTU-13-04: "{{[^"]*}}clang{{[^"]*}}" "-cc1"
// CHECK-UBUNTU-13-04: "-isysroot" "[[SYSROOT:[^"]+]]"
// CHECK-UBUNTU-13-04: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7"
-// CHECK-UBUNTU-13-04: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/backward"
// CHECK-UBUNTU-13-04: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/x86_64-linux-gnu/c++/4.7"
+// CHECK-UBUNTU-13-04: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/backward"
// CHECK-UBUNTU-13-04: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
// CHECK-UBUNTU-13-04: "-internal-isystem" "{{.*}}{{/|\\\\}}lib{{(64|32)?}}{{/|\\\\}}clang{{/|\\\\}}{{[0-9]\.[0-9]\.[0-9]}}{{/|\\\\}}include"
// CHECK-UBUNTU-13-04: "-internal-externc-isystem" "[[SYSROOT]]/usr/include/x86_64-linux-gnu"
@@ -32,14 +55,29 @@
// CHECK-UBUNTU-13-04: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
//
// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target x86_64-unknown-linux-gnux32 \
+// RUN: --sysroot=%S/Inputs/ubuntu_14.04_multiarch_tree \
+// RUN: | FileCheck --check-prefix=CHECK-UBUNTU-14-04 %s
+// CHECK-UBUNTU-14-04: "{{[^"]*}}clang{{[^"]*}}" "-cc1"
+// CHECK-UBUNTU-14-04: "-isysroot" "[[SYSROOT:[^"]+]]"
+// CHECK-UBUNTU-14-04: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8"
+// CHECK-UBUNTU-14-04: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/x86_64-linux-gnu/c++/4.8/x32"
+// CHECK-UBUNTU-14-04: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/backward"
+// CHECK-UBUNTU-14-04: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
+// CHECK-UBUNTU-14-04: "-internal-isystem" "{{.*}}{{/|\\\\}}lib{{(64|x32)?}}{{/|\\\\}}clang{{/|\\\\}}{{[0-9]\.[0-9]\.[0-9]}}{{/|\\\\}}include"
+// CHECK-UBUNTU-14-04: "-internal-externc-isystem" "[[SYSROOT]]/usr/include/x86_64-linux-gnu"
+// CHECK-UBUNTU-14-04: "-internal-externc-isystem" "[[SYSROOT]]/include"
+// CHECK-UBUNTU-14-04: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
+///
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
// RUN: -target arm-linux-gnueabihf \
// RUN: --sysroot=%S/Inputs/ubuntu_13.04_multiarch_tree \
// RUN: | FileCheck --check-prefix=CHECK-UBUNTU-13-04-CROSS %s
// CHECK-UBUNTU-13-04-CROSS: "{{[^"]*}}clang{{[^"]*}}" "-cc1"
// CHECK-UBUNTU-13-04-CROSS: "-isysroot" "[[SYSROOT:[^"]+]]"
// CHECK-UBUNTU-13-04-CROSS: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../include/c++/4.7"
-// CHECK-UBUNTU-13-04-CROSS: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../include/c++/4.7/backward"
// CHECK-UBUNTU-13-04-CROSS: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../include/arm-linux-gnueabihf/c++/4.7"
+// CHECK-UBUNTU-13-04-CROSS: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../include/c++/4.7/backward"
// CHECK-UBUNTU-13-04-CROSS: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
// CHECK-UBUNTU-13-04-CROSS: "-internal-isystem" "{{.*}}{{/|\\\\}}lib{{(64|32)?}}{{/|\\\\}}clang{{/|\\\\}}{{[0-9]\.[0-9]\.[0-9]}}{{/|\\\\}}include"
// CHECK-UBUNTU-13-04-CROSS: "-internal-externc-isystem" "[[SYSROOT]]/include"
@@ -54,9 +92,50 @@
// CHECK-UBUNTU-13-04-M32: "-triple" "i386-unknown-linux-gnu"
// CHECK-UBUNTU-13-04-M32: "-isysroot" "[[SYSROOT:[^"]+]]"
// CHECK-UBUNTU-13-04-M32: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7"
-// CHECK-UBUNTU-13-04-M32: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/x86_64-linux-gnu/32"
-// CHECK-UBUNTU-13-04-M32: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/backward"
// CHECK-UBUNTU-13-04-M32: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/x86_64-linux-gnu/c++/4.7/32"
+// CHECK-UBUNTU-13-04-M32: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/backward"
+//
+// Test Ubuntu/Debian's Ubuntu 14.04 config variant, with -m32
+// and an empty 4.9 directory.
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target x86_64-unknown-linux-gnu -m32 \
+// RUN: --sysroot=%S/Inputs/ubuntu_14.04_multiarch_tree \
+// RUN: | FileCheck --check-prefix=CHECK-UBUNTU-14-04-M32 %s
+// CHECK-UBUNTU-14-04-M32: "{{[^"]*}}clang{{[^"]*}}" "-cc1"
+// CHECK-UBUNTU-14-04-M32: "-triple" "i386-unknown-linux-gnu"
+// CHECK-UBUNTU-14-04-M32: "-isysroot" "[[SYSROOT:[^"]+]]"
+// CHECK-UBUNTU-14-04-M32: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8"
+// CHECK-UBUNTU-14-04-M32: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/x86_64-linux-gnu/c++/4.8/32"
+// CHECK-UBUNTU-14-04-M32: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/backward"
+//
+// Test Ubuntu/Debian's Ubuntu 14.04 with -m32 and an i686 cross compiler
+// installed rather than relying on multilib. Also happens to look like an
+// actual i686 Ubuntu system.
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target x86_64-unknown-linux-gnu -m32 \
+// RUN: --sysroot=%S/Inputs/ubuntu_14.04_multiarch_tree2 \
+// RUN: | FileCheck --check-prefix=CHECK-UBUNTU-14-04-I686 %s
+// CHECK-UBUNTU-14-04-I686: "{{[^"]*}}clang{{[^"]*}}" "-cc1"
+// CHECK-UBUNTU-14-04-I686: "-triple" "i386-unknown-linux-gnu"
+// CHECK-UBUNTU-14-04-I686: "-isysroot" "[[SYSROOT:[^"]+]]"
+// CHECK-UBUNTU-14-04-I686: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-linux-gnu/4.8/../../../../include/c++/4.8"
+// CHECK-UBUNTU-14-04-I686: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-linux-gnu/4.8/../../../../include/i386-linux-gnu/c++/4.8"
+// CHECK-UBUNTU-14-04-I686: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-linux-gnu/4.8/../../../../include/c++/4.8/backward"
+//
+// Test Ubuntu/Debian's Ubuntu 14.04 for powerpc64le
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target powerpc64le-unknown-linux-gnu -m32 \
+// RUN: --sysroot=%S/Inputs/ubuntu_14.04_multiarch_tree \
+// RUN: | FileCheck --check-prefix=CHECK-UBUNTU-14-04-PPC64LE %s
+// CHECK-UBUNTU-14-04-PPC64LE: "{{[^"]*}}clang{{[^"]*}}" "-cc1"
+// CHECK-UBUNTU-14-04-PPC64LE: "-triple" "powerpc64le-unknown-linux-gnu"
+// CHECK-UBUNTU-14-04-PPC64LE: "-isysroot" "[[SYSROOT:[^"]+]]"
+// CHECK-UBUNTU-14-04-PPC64LE: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/powerpc64le-linux-gnu/4.8/../../../../include/c++/4.8"
+// CHECK-UBUNTU-14-04-PPC64LE: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/powerpc64le-linux-gnu/4.8/../../../../include/powerpc64le-linux-gnu/c++/4.8"
+// CHECK-UBUNTU-14-04-PPC64LE: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/powerpc64le-linux-gnu/4.8/../../../../include/c++/4.8/backward"
+// CHECK-UBUNTU-14-04-PPC64LE: "-internal-externc-isystem" "[[SYSROOT]]/usr/include/powerpc64le-linux-gnu"
+// CHECK-UBUNTU-14-04-PPC64LE: "-internal-externc-isystem" "[[SYSROOT]]/include"
+// CHECK-UBUNTU-14-04-PPC64LE: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
//
// Thoroughly exercise the Debian multiarch environment.
// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
@@ -144,3 +223,35 @@
// CHECK-GENTOO-4-6-4: "-internal-isystem" "{{.*}}{{/|\\\\}}lib{{(64|32)?}}{{/|\\\\}}clang{{/|\\\\}}{{[0-9]\.[0-9]\.[0-9]}}{{/|\\\\}}include"
// CHECK-GENTOO-4-6-4: "-internal-externc-isystem" "[[SYSROOT]]/include"
// CHECK-GENTOO-4-6-4: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
+//
+// Check header search on Debian 6 / MIPS64
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target mips64-unknown-linux-gnuabi64 \
+// RUN: --sysroot=%S/Inputs/debian_6_mips64_tree \
+// RUN: | FileCheck --check-prefix=CHECK-MIPS64-GNUABI %s
+// CHECK-MIPS64-GNUABI: "{{[^"]*}}clang{{[^"]*}}" "-cc1"
+// CHECK-MIPS64-GNUABI: "-isysroot" "[[SYSROOT:[^"]+]]"
+// CHECK-MIPS64-GNUABI: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/mips64-linux-gnuabi64/4.9/../../../../include/c++/4.9"
+// CHECK-MIPS64-GNUABI: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/mips64-linux-gnuabi64/4.9/../../../../include/c++/4.9/mips64-linux-gnuabi64"
+// CHECK-MIPS64-GNUABI: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/mips64-linux-gnuabi64/4.9/../../../../include/c++/4.9/backward"
+// CHECK-MIPS64-GNUABI: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
+// CHECK-MIPS64-GNUABI: "-internal-isystem" "{{.*}}{{/|\\\\}}lib{{(64|32)?}}{{/|\\\\}}clang{{/|\\\\}}{{[0-9]\.[0-9]\.[0-9]}}{{/|\\\\}}include"
+// CHECK-MIPS64-GNUABI: "-internal-externc-isystem" "[[SYSROOT]]/usr/include/mips64-linux-gnuabi64"
+// CHECK-MIPS64-GNUABI: "-internal-externc-isystem" "[[SYSROOT]]/include"
+// CHECK-MIPS64-GNUABI: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
+//
+// Check header search on Debian 6 / MIPS64
+// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \
+// RUN: -target mips64el-unknown-linux-gnuabi64 \
+// RUN: --sysroot=%S/Inputs/debian_6_mips64_tree \
+// RUN: | FileCheck --check-prefix=CHECK-MIPS64EL-GNUABI %s
+// CHECK-MIPS64EL-GNUABI: "{{[^"]*}}clang{{[^"]*}}" "-cc1"
+// CHECK-MIPS64EL-GNUABI: "-isysroot" "[[SYSROOT:[^"]+]]"
+// CHECK-MIPS64EL-GNUABI: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/../../../../include/c++/4.9"
+// CHECK-MIPS64EL-GNUABI: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/../../../../include/c++/4.9/mips64el-linux-gnuabi64"
+// CHECK-MIPS64EL-GNUABI: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/../../../../include/c++/4.9/backward"
+// CHECK-MIPS64EL-GNUABI: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
+// CHECK-MIPS64EL-GNUABI: "-internal-isystem" "{{.*}}{{/|\\\\}}lib{{(64|32)?}}{{/|\\\\}}clang{{/|\\\\}}{{[0-9]\.[0-9]\.[0-9]}}{{/|\\\\}}include"
+// CHECK-MIPS64EL-GNUABI: "-internal-externc-isystem" "[[SYSROOT]]/usr/include/mips64el-linux-gnuabi64"
+// CHECK-MIPS64EL-GNUABI: "-internal-externc-isystem" "[[SYSROOT]]/include"
+// CHECK-MIPS64EL-GNUABI: "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
diff --git a/test/Driver/linux-ld.c b/test/Driver/linux-ld.c
index 827afb331088..6a47d08274d2 100644
--- a/test/Driver/linux-ld.c
+++ b/test/Driver/linux-ld.c
@@ -34,6 +34,59 @@
// CHECK-LD-64: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
//
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=x86_64-unknown-linux-gnux32 \
+// RUN: --sysroot=%S/Inputs/basic_linux_tree \
+// RUN: | FileCheck --check-prefix=CHECK-LD-X32 %s
+// CHECK-LD-X32-NOT: warning:
+// CHECK-LD-X32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-LD-X32: "--eh-frame-hdr"
+// CHECK-LD-X32: "-m" "elf32_x86_64"
+// CHECK-LD-X32: "-dynamic-linker"
+// CHECK-LD-X32: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
+// CHECK-LD-X32: "-lc"
+// CHECK-LD-X32: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=x86_64-unknown-linux \
+// RUN: --sysroot=%S/Inputs/basic_linux_tree \
+// RUN: --rtlib=compiler-rt \
+// RUN: | FileCheck --check-prefix=CHECK-LD-RT %s
+// CHECK-LD-RT-NOT: warning:
+// CHECK-LD-RT: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-LD-RT: "--eh-frame-hdr"
+// CHECK-LD-RT: "-m" "elf_x86_64"
+// CHECK-LD-RT: "-dynamic-linker"
+// CHECK-LD-RT: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0{{/|\\\\}}crtbegin.o"
+// CHECK-LD-RT: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0"
+// CHECK-LD-RT: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib"
+// CHECK-LD-RT: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.."
+// CHECK-LD-RT: "-L[[SYSROOT]]/lib"
+// CHECK-LD-RT: "-L[[SYSROOT]]/usr/lib"
+// CHECK-LD-RT: libclang_rt.builtins-x86_64.a" "-lgcc_s"
+// CHECK-LD-RT: "-lc"
+// CHECK-LD-RT: libclang_rt.builtins-x86_64.a" "-lgcc_s"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=x86_64-unknown-linux \
+// RUN: --sysroot=%S/Inputs/basic_linux_tree \
+// RUN: --rtlib=libgcc \
+// RUN: | FileCheck --check-prefix=CHECK-LD-GCC %s
+// CHECK-LD-GCC-NOT: warning:
+// CHECK-LD-GCC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-LD-GCC: "--eh-frame-hdr"
+// CHECK-LD-GCC: "-m" "elf_x86_64"
+// CHECK-LD-GCC: "-dynamic-linker"
+// CHECK-LD-GCC: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0{{/|\\\\}}crtbegin.o"
+// CHECK-LD-GCC: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0"
+// CHECK-LD-GCC: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib"
+// CHECK-LD-GCC: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.."
+// CHECK-LD-GCC: "-L[[SYSROOT]]/lib"
+// CHECK-LD-GCC: "-L[[SYSROOT]]/usr/lib"
+// CHECK-LD-GCC "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
+// CHECK-LD-GCC: "-lc"
+// CHECK-LD-GCC: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: --target=x86_64-unknown-linux \
// RUN: -static-libgcc \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
@@ -146,6 +199,57 @@
// CHECK-64-TO-32: "-L[[SYSROOT]]/usr/lib"
//
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=x86_64-unknown-linux-gnux32 \
+// RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \
+// RUN: | FileCheck --check-prefix=CHECK-X32 %s
+// CHECK-X32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-X32: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/x32{{/|\\\\}}crtbegin.o"
+// CHECK-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/x32"
+// CHECK-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib/../libx32"
+// CHECK-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../libx32"
+// CHECK-X32: "-L[[SYSROOT]]/lib/../libx32"
+// CHECK-X32: "-L[[SYSROOT]]/usr/lib/../libx32"
+// CHECK-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0"
+// CHECK-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib"
+// CHECK-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.."
+// CHECK-X32: "-L[[SYSROOT]]/lib"
+// CHECK-X32: "-L[[SYSROOT]]/usr/lib"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=x86_64-unknown-linux -mx32 \
+// RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \
+// RUN: | FileCheck --check-prefix=CHECK-64-TO-X32 %s
+// CHECK-64-TO-X32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-64-TO-X32: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/x32{{/|\\\\}}crtbegin.o"
+// CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/x32"
+// CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib/../libx32"
+// CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../libx32"
+// CHECK-64-TO-X32: "-L[[SYSROOT]]/lib/../libx32"
+// CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib/../libx32"
+// CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0"
+// CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib"
+// CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.."
+// CHECK-64-TO-X32: "-L[[SYSROOT]]/lib"
+// CHECK-64-TO-X32: "-L[[SYSROOT]]/usr/lib"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=i386-unknown-linux -mx32 \
+// RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \
+// RUN: | FileCheck --check-prefix=CHECK-32-TO-X32 %s
+// CHECK-32-TO-X32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-32-TO-X32: "{{.*}}/usr/lib/gcc/x86_64-unknown-linux/4.6.0/x32{{/|\\\\}}crtbegin.o"
+// CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/x32"
+// CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib/../libx32"
+// CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../libx32"
+// CHECK-32-TO-X32: "-L[[SYSROOT]]/lib/../libx32"
+// CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib/../libx32"
+// CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0"
+// CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../../../x86_64-unknown-linux/lib"
+// CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-unknown-linux/4.6.0/../../.."
+// CHECK-32-TO-X32: "-L[[SYSROOT]]/lib"
+// CHECK-32-TO-X32: "-L[[SYSROOT]]/usr/lib"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: --target=x86_64-unknown-linux -m32 \
// RUN: --gcc-toolchain=%S/Inputs/multilib_64bit_linux_tree/usr \
// RUN: --sysroot=%S/Inputs/multilib_32bit_linux_tree \
@@ -214,6 +318,32 @@
// CHECK-GCC-VERSION4: "{{.*}}/Inputs/gcc_version_parsing4/bin/../lib/gcc/i386-unknown-linux/4.7.99{{/|\\\\}}crtbegin.o"
// CHECK-GCC-VERSION4: "-L{{.*}}/Inputs/gcc_version_parsing4/bin/../lib/gcc/i386-unknown-linux/4.7.99"
//
+// Test a simulated installation of libc++ on Linux, both through sysroot and
+// the installation path of Clang.
+// RUN: %clangxx -no-canonical-prefixes -x c++ %s -### -o %t.o 2>&1 \
+// RUN: -target x86_64-unknown-linux-gnu \
+// RUN: -stdlib=libc++ \
+// RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin \
+// RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree \
+// RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBCXX-SYSROOT %s
+// CHECK-BASIC-LIBCXX-SYSROOT: "{{[^"]*}}clang{{[^"]*}}" "-cc1"
+// CHECK-BASIC-LIBCXX-SYSROOT: "-isysroot" "[[SYSROOT:[^"]+]]"
+// CHECK-BASIC-LIBCXX-SYSROOT: "-internal-isystem" "[[SYSROOT]]/usr/include/c++/v1"
+// CHECK-BASIC-LIBCXX-SYSROOT: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
+// CHECK-BASIC-LIBCXX-SYSROOT: "--sysroot=[[SYSROOT]]"
+// RUN: %clang -no-canonical-prefixes -x c++ %s -### -o %t.o 2>&1 \
+// RUN: -target x86_64-unknown-linux-gnu \
+// RUN: -stdlib=libc++ \
+// RUN: -ccc-install-dir %S/Inputs/basic_linux_libcxx_tree/usr/bin \
+// RUN: --sysroot=%S/Inputs/basic_linux_libcxx_tree \
+// RUN: | FileCheck --check-prefix=CHECK-BASIC-LIBCXX-INSTALL %s
+// CHECK-BASIC-LIBCXX-INSTALL: "{{[^"]*}}clang{{[^"]*}}" "-cc1"
+// CHECK-BASIC-LIBCXX-INSTALL: "-isysroot" "[[SYSROOT:[^"]+]]"
+// CHECK-BASIC-LIBCXX-INSTALL: "-internal-isystem" "[[SYSROOT]]/usr/bin/../include/c++/v1"
+// CHECK-BASIC-LIBCXX-INSTALL: "-internal-isystem" "[[SYSROOT]]/usr/local/include"
+// CHECK-BASIC-LIBCXX-INSTALL: "--sysroot=[[SYSROOT]]"
+// CHECK-BASIC-LIBCXX-INSTALL: "-L[[SYSROOT]]/usr/bin/../lib"
+//
// Test a very broken version of multiarch that shipped in Ubuntu 11.04.
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: --target=i386-unknown-linux \
@@ -281,6 +411,43 @@
// CHECK-X86-64-UBUNTU-13-10-ARM: "{{.*}}/usr/lib/gcc-cross/arm-linux-gnueabi/4.7{{/|\\\\}}crtend.o"
// CHECK-X86-64-UBUNTU-13-10-ARM: "{{.*}}/usr/lib/gcc-cross/arm-linux-gnueabi/4.7/../../../../arm-linux-gnueabi/lib/../lib{{/|\\\\}}crtn.o"
//
+// Check Ubuntu 14.04 on powerpc64le.
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=powerpc64le-unknown-linux-gnu \
+// RUN: --sysroot=%S/Inputs/ubuntu_14.04_multiarch_tree \
+// RUN: | FileCheck --check-prefix=CHECK-UBUNTU-14-04-PPC64LE %s
+// CHECK-UBUNTU-14-04-PPC64LE: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-UBUNTU-14-04-PPC64LE: "{{.*}}/usr/lib/gcc/powerpc64le-linux-gnu/4.8/../../../powerpc64le-linux-gnu{{/|\\\\}}crt1.o"
+// CHECK-UBUNTU-14-04-PPC64LE: "{{.*}}/usr/lib/gcc/powerpc64le-linux-gnu/4.8/../../../powerpc64le-linux-gnu{{/|\\\\}}crti.o"
+// CHECK-UBUNTU-14-04-PPC64LE: "{{.*}}/usr/lib/gcc/powerpc64le-linux-gnu/4.8{{/|\\\\}}crtbegin.o"
+// CHECK-UBUNTU-14-04-PPC64LE: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64le-linux-gnu/4.8"
+// CHECK-UBUNTU-14-04-PPC64LE: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64le-linux-gnu/4.8/../../../powerpc64le-linux-gnu"
+// CHECK-UBUNTU-14-04-PPC64LE: "-L[[SYSROOT]]/lib/powerpc64le-linux-gnu"
+// CHECK-UBUNTU-14-04-PPC64LE: "-L[[SYSROOT]]/usr/lib/powerpc64le-linux-gnu"
+// CHECK-UBUNTU-14-04-PPC64LE: "-L[[SYSROOT]]/usr/lib/gcc/powerpc64le-linux-gnu/4.8/../../.."
+// CHECK-UBUNTU-14-04-PPC64LE: "{{.*}}/usr/lib/gcc/powerpc64le-linux-gnu/4.8{{/|\\\\}}crtend.o"
+// CHECK-UBUNTU-14-04-PPC64LE: "{{.*}}/usr/lib/gcc/powerpc64le-linux-gnu/4.8/../../../powerpc64le-linux-gnu{{/|\\\\}}crtn.o"
+//
+// Check Ubuntu 14.04 on x32.
+// "/usr/lib/gcc/x86_64-linux-gnu/4.8/x32/crtend.o" "/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../libx32/crtn.o"
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=x86_64-unknown-linux-gnux32 \
+// RUN: --sysroot=%S/Inputs/ubuntu_14.04_multiarch_tree \
+// RUN: | FileCheck --check-prefix=CHECK-UBUNTU-14-04-X32 %s
+// CHECK-UBUNTU-14-04-X32: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-UBUNTU-14-04-X32: "{{.*}}/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../libx32{{/|\\\\}}crt1.o"
+// CHECK-UBUNTU-14-04-X32: "{{.*}}/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../libx32{{/|\\\\}}crti.o"
+// CHECK-UBUNTU-14-04-X32: "{{.*}}/usr/lib/gcc/x86_64-linux-gnu/4.8/x32{{/|\\\\}}crtbegin.o"
+// CHECK-UBUNTU-14-04-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.8/x32"
+// CHECK-UBUNTU-14-04-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../libx32"
+// CHECK-UBUNTU-14-04-X32: "-L[[SYSROOT]]/lib/../libx32"
+// CHECK-UBUNTU-14-04-X32: "-L[[SYSROOT]]/usr/lib/../libx32"
+// CHECK-UBUNTU-14-04-X32: "-L[[SYSROOT]]/usr/lib/x86_64-linux-gnu/../../libx32"
+// CHECK-UBUNTU-14-04-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.8"
+// CHECK-UBUNTU-14-04-X32: "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.."
+// CHECK-UBUNTU-14-04-X32: "{{.*}}/usr/lib/gcc/x86_64-linux-gnu/4.8/x32{{/|\\\\}}crtend.o"
+// CHECK-UBUNTU-14-04-X32: "{{.*}}/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../libx32{{/|\\\\}}crtn.o"
+//
// Check fedora 18 on arm.
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: --target=armv7-unknown-linux-gnueabihf \
@@ -295,6 +462,24 @@
// CHECK-FEDORA-18-ARM-HF: "{{.*}}/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2{{/|\\\\}}crtend.o"
// CHECK-FEDORA-18-ARM-HF: "{{.*}}/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2/../../../../lib{{/|\\\\}}crtn.o"
//
+// Check Fedora 21 on AArch64.
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=arm64-unknown-linux-gnu \
+// RUN: --sysroot=%S/Inputs/fedora_21_tree \
+// RUN: | FileCheck --check-prefix=CHECK-FEDORA-21-AARCH64 %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=aarch64-unknown-linux-gnu \
+// RUN: --sysroot=%S/Inputs/fedora_21_tree \
+// RUN: | FileCheck --check-prefix=CHECK-FEDORA-21-AARCH64 %s
+// CHECK-FEDORA-21-AARCH64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-FEDORA-21-AARCH64: "{{.*}}/usr/lib/gcc/aarch64-redhat-linux/4.9.0/../../../../lib64{{/|\\\\}}crt1.o"
+// CHECK-FEDORA-21-AARCH64: "{{.*}}/usr/lib/gcc/aarch64-redhat-linux/4.9.0/../../../../lib64{{/|\\\\}}crti.o"
+// CHECK-FEDORA-21-AARCH64: "{{.*}}/usr/lib/gcc/aarch64-redhat-linux/4.9.0{{/|\\\\}}crtbegin.o"
+// CHECK-FEDORA-21-AARCH64: "-L[[SYSROOT]]/usr/lib/gcc/aarch64-redhat-linux/4.9.0"
+// CHECK-FEDORA-21-AARCH64: "-L[[SYSROOT]]/usr/lib/gcc/aarch64-redhat-linux/4.9.0/../../../../lib64"
+// CHECK-FEDORA-21-AARCH64: "{{.*}}/usr/lib/gcc/aarch64-redhat-linux/4.9.0{{/|\\\\}}crtend.o"
+// CHECK-FEDORA-21-AARCH64: "{{.*}}/usr/lib/gcc/aarch64-redhat-linux/4.9.0/../../../../lib64{{/|\\\\}}crtn.o"
+//
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: --target=arm-unknown-linux-gnueabi \
// RUN: --sysroot=%S/Inputs/ubuntu_12.04_LTS_multiarch_tree \
@@ -338,6 +523,13 @@
// CHECK-ARM-HF: "-m" "armelf_linux_eabi"
// CHECK-ARM-HF: "-dynamic-linker" "{{.*}}/lib/ld-linux-armhf.so.3"
//
+// RUN: %clang %s -### -o %t.o 2>&1 \
+// RUN: --target=powerpc64le-linux-gnu \
+// RUN: | FileCheck --check-prefix=CHECK-PPC64LE %s
+// CHECK-PPC64LE: "{{.*}}ld{{(.exe)?}}"
+// CHECK-PPC64LE: "-m" "elf64lppc"
+// CHECK-PPC64LE: "-dynamic-linker" "{{.*}}/lib64/ld64.so.2"
+//
// Check that we do not pass --hash-style=gnu and --hash-style=both to linker
// and provide correct path to the dynamic linker and emulation mode when build
// for MIPS platforms.
@@ -348,6 +540,7 @@
// CHECK-MIPS: "-m" "elf32btsmip"
// CHECK-MIPS: "-dynamic-linker" "{{.*}}/lib/ld.so.1"
// CHECK-MIPS-NOT: "--hash-style={{gnu|both}}"
+//
// RUN: %clang %s -### -o %t.o 2>&1 \
// RUN: --target=mipsel-linux-gnu \
// RUN: | FileCheck --check-prefix=CHECK-MIPSEL %s
@@ -355,6 +548,21 @@
// CHECK-MIPSEL: "-m" "elf32ltsmip"
// CHECK-MIPSEL: "-dynamic-linker" "{{.*}}/lib/ld.so.1"
// CHECK-MIPSEL-NOT: "--hash-style={{gnu|both}}"
+//
+// RUN: %clang %s -### -o %t.o 2>&1 --target=mipsel-linux-gnu -mnan=2008 \
+// RUN: | FileCheck --check-prefix=CHECK-MIPSEL-NAN2008 %s
+// CHECK-MIPSEL-NAN2008: "{{.*}}ld{{(.exe)?}}"
+// CHECK-MIPSEL-NAN2008: "-m" "elf32ltsmip"
+// CHECK-MIPSEL-NAN2008: "-dynamic-linker" "{{.*}}/lib/ld-linux-mipsn8.so.1"
+// CHECK-MIPSEL-NAN2008-NOT: "--hash-style={{gnu|both}}"
+//
+// RUN: %clang %s -### -o %t.o 2>&1 --target=mipsel-linux-gnu -mcpu=mips32r6 \
+// RUN: | FileCheck --check-prefix=CHECK-MIPS32R6EL %s
+// CHECK-MIPS32R6EL: "{{.*}}ld{{(.exe)?}}"
+// CHECK-MIPS32R6EL: "-m" "elf32ltsmip"
+// CHECK-MIPS32R6EL: "-dynamic-linker" "{{.*}}/lib/ld-linux-mipsn8.so.1"
+// CHECK-MIPS32R6EL-NOT: "--hash-style={{gnu|both}}"
+//
// RUN: %clang %s -### -o %t.o 2>&1 \
// RUN: --target=mips64-linux-gnu \
// RUN: | FileCheck --check-prefix=CHECK-MIPS64 %s
@@ -362,6 +570,7 @@
// CHECK-MIPS64: "-m" "elf64btsmip"
// CHECK-MIPS64: "-dynamic-linker" "{{.*}}/lib64/ld.so.1"
// CHECK-MIPS64-NOT: "--hash-style={{gnu|both}}"
+//
// RUN: %clang %s -### -o %t.o 2>&1 \
// RUN: --target=mips64el-linux-gnu \
// RUN: | FileCheck --check-prefix=CHECK-MIPS64EL %s
@@ -369,6 +578,21 @@
// CHECK-MIPS64EL: "-m" "elf64ltsmip"
// CHECK-MIPS64EL: "-dynamic-linker" "{{.*}}/lib64/ld.so.1"
// CHECK-MIPS64EL-NOT: "--hash-style={{gnu|both}}"
+//
+// RUN: %clang %s -### -o %t.o 2>&1 --target=mips64el-linux-gnu -mnan=2008 \
+// RUN: | FileCheck --check-prefix=CHECK-MIPS64EL-NAN2008 %s
+// CHECK-MIPS64EL-NAN2008: "{{.*}}ld{{(.exe)?}}"
+// CHECK-MIPS64EL-NAN2008: "-m" "elf64ltsmip"
+// CHECK-MIPS64EL-NAN2008: "-dynamic-linker" "{{.*}}/lib64/ld-linux-mipsn8.so.1"
+// CHECK-MIPS64EL-NAN2008-NOT: "--hash-style={{gnu|both}}"
+//
+// RUN: %clang %s -### -o %t.o 2>&1 --target=mips64el-linux-gnu -mcpu=mips64r6 \
+// RUN: | FileCheck --check-prefix=CHECK-MIPS64R6EL %s
+// CHECK-MIPS64R6EL: "{{.*}}ld{{(.exe)?}}"
+// CHECK-MIPS64R6EL: "-m" "elf64ltsmip"
+// CHECK-MIPS64R6EL: "-dynamic-linker" "{{.*}}/lib64/ld-linux-mipsn8.so.1"
+// CHECK-MIPS64R6EL-NOT: "--hash-style={{gnu|both}}"
+//
// RUN: %clang %s -### -o %t.o 2>&1 \
// RUN: --target=mips64-linux-gnu -mabi=n32 \
// RUN: | FileCheck --check-prefix=CHECK-MIPS64-N32 %s
@@ -376,6 +600,7 @@
// CHECK-MIPS64-N32: "-m" "elf32btsmipn32"
// CHECK-MIPS64-N32: "-dynamic-linker" "{{.*}}/lib32/ld.so.1"
// CHECK-MIPS64-N32-NOT: "--hash-style={{gnu|both}}"
+//
// RUN: %clang %s -### -o %t.o 2>&1 \
// RUN: --target=mips64el-linux-gnu -mabi=n32 \
// RUN: | FileCheck --check-prefix=CHECK-MIPS64EL-N32 %s
@@ -384,6 +609,27 @@
// CHECK-MIPS64EL-N32: "-dynamic-linker" "{{.*}}/lib32/ld.so.1"
// CHECK-MIPS64EL-N32-NOT: "--hash-style={{gnu|both}}"
//
+// RUN: %clang %s -### -o %t.o 2>&1 --target=mips64el-linux-gnu -mabi=n32 \
+// RUN: -mnan=2008 | FileCheck --check-prefix=CHECK-MIPS64EL-N32-NAN2008 %s
+// CHECK-MIPS64EL-N32-NAN2008: "{{.*}}ld{{(.exe)?}}"
+// CHECK-MIPS64EL-N32-NAN2008: "-m" "elf32ltsmipn32"
+// CHECK-MIPS64EL-N32-NAN2008: "-dynamic-linker" "{{.*}}/lib32/ld-linux-mipsn8.so.1"
+// CHECK-MIPS64EL-N32-NAN2008-NOT: "--hash-style={{gnu|both}}"
+//
+// RUN: %clang %s -### -o %t.o 2>&1 \
+// RUN: --target=sparc-linux-gnu \
+// RUN: | FileCheck --check-prefix=CHECK-SPARCV8 %s
+// CHECK-SPARCV8: "{{.*}}ld{{(.exe)?}}"
+// CHECK-SPARCV8: "-m" "elf32_sparc"
+// CHECK-SPARCV8: "-dynamic-linker" "/lib/ld-linux.so.2"
+//
+// RUN: %clang %s -### -o %t.o 2>&1 \
+// RUN: --target=sparcv9-linux-gnu \
+// RUN: | FileCheck --check-prefix=CHECK-SPARCV9 %s
+// CHECK-SPARCV9: "{{.*}}ld{{(.exe)?}}"
+// CHECK-SPARCV9: "-m" "elf64_sparc"
+// CHECK-SPARCV9: "-dynamic-linker" "/lib64/ld-linux.so.2"
+//
// Thoroughly exercise the Debian multiarch environment.
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: --target=i686-linux-gnu \
@@ -512,11 +758,27 @@
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID %s
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=aarch64-linux-android \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=arm64-linux-android \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: --target=mipsel-linux-android \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID %s
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN: --target=i386-linux-android \
+// RUN: --target=mips64el-linux-android \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=i686-linux-android \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=x86_64-linux-android \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID %s
// CHECK-ANDROID: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
@@ -538,17 +800,37 @@
// RUN: -shared \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=aarch64-linux-android \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -shared \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=arm64-linux-android \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -shared \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: --target=mipsel-linux-android \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -shared \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN: --target=i386-linux-android \
+// RUN: --target=mips64el-linux-android \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -shared \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=i686-linux-android \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -shared \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=x86_64-linux-android \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -shared \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-SO %s
// CHECK-ANDROID-SO: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
-// CHECK-ANDROID-SO: "-Bsymbolic"
+// CHECK-ANDROID-SO-NOT: "-Bsymbolic"
// CHECK-ANDROID-SO: "{{.*}}{{/|\\\\}}crtbegin_so.o"
// CHECK-ANDROID-SO: "-L[[SYSROOT]]/usr/lib"
// CHECK-ANDROID-SO-NOT: "gcc_s"
@@ -567,12 +849,32 @@
// RUN: -static \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=aarch64-linux-android \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -static \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=arm64-linux-android \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -static \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: --target=mipsel-linux-android \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -static \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN: --target=i386-linux-android \
+// RUN: --target=mips64el-linux-android \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -static \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=i686-linux-android \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -static \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=x86-linux-android \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -static \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-STATIC %s
@@ -595,12 +897,32 @@
// RUN: -pie \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=aarch64-linux-android \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -pie \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=arm64-linux-android \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -pie \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: --target=mipsel-linux-android \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -pie \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN: --target=i386-linux-android \
+// RUN: --target=mips64el-linux-android \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -pie \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=i686-linux-android \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -pie \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=x86_64-linux-android \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: -pie \
// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s
@@ -611,6 +933,121 @@
// CHECK-ANDROID-PIE: "-lgcc"
// CHECK-ANDROID-PIE-NOT: "gcc_s"
// CHECK-ANDROID-PIE: "{{.*}}{{/|\\\\}}crtend_android.o"
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=arm-linux-androideabi \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-32 %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=arm-linux-android \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-32 %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mipsel-linux-android \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-32 %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=aarch64-linux-android \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-64 %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=arm64-linux-android \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-64 %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips64el-linux-android \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-64 %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=i686-linux-android \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-32 %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=x86_64-linux-android \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-64 %s
+// CHECK-ANDROID-32: "-dynamic-linker" "/system/bin/linker"
+// CHECK-ANDROID-64: "-dynamic-linker" "/system/bin/linker64"
+//
+// Test that -pthread does not add -lpthread on Android.
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=arm-linux-androideabi -pthread \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=arm-linux-android -pthread \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=aarch64-linux-android -pthread \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=arm64-linux-android -pthread \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mipsel-linux-android -pthread \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips64el-linux-android -pthread \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=i686-linux-android -pthread \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=x86_64-linux-android -pthread \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=arm-linux-androideabi -pthread \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -shared \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=arm-linux-android -pthread \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -shared \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=aarch64-linux-android -pthread \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -shared \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=arm64-linux-android -pthread \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -shared \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mipsel-linux-android -pthread \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -shared \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips64el-linux-android -pthread \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -shared \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=i686-linux-android -pthread \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -shared \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=x86_64-linux-android -pthread \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -shared \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s
+// CHECK-ANDROID-PTHREAD-NOT: -lpthread
+//
+// RUN: %clang -no-canonical-prefixes %t.o -### -o %t 2>&1 \
+// RUN: --target=arm-linux-androideabi -pthread \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD-LINK %s
+// CHECK-ANDROID-PTHREAD-LINK-NOT: argument unused during compilation: '-pthread'
//
// Check linker invocation on Debian 6 MIPS 32/64-bit.
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -661,6 +1098,44 @@
// CHECK-DEBIAN-ML-MIPS64EL-N32: "-L[[SYSROOT]]/lib"
// CHECK-DEBIAN-ML-MIPS64EL-N32: "-L[[SYSROOT]]/usr/lib"
//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips64-linux-gnuabi64 -mabi=n64 \
+// RUN: --sysroot=%S/Inputs/debian_6_mips64_tree \
+// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-MIPS64-GNUABI %s
+// CHECK-DEBIAN-ML-MIPS64-GNUABI: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-DEBIAN-ML-MIPS64-GNUABI: "{{.*}}/usr/lib/gcc/mips64-linux-gnuabi64/4.9/../../../mips64-linux-gnuabi64{{/|\\\\}}crt1.o"
+// CHECK-DEBIAN-ML-MIPS64-GNUABI: "{{.*}}/usr/lib/gcc/mips64-linux-gnuabi64/4.9/../../../mips64-linux-gnuabi64{{/|\\\\}}crti.o"
+// CHECK-DEBIAN-ML-MIPS64-GNUABI: "{{.*}}/usr/lib/gcc/mips64-linux-gnuabi64/4.9{{/|\\\\}}crtbegin.o"
+// CHECK-DEBIAN-ML-MIPS64-GNUABI: "-L[[SYSROOT]]/usr/lib/gcc/mips64-linux-gnuabi64/4.9"
+// CHECK-DEBIAN-ML-MIPS64-GNUABI: "-L[[SYSROOT]]/usr/lib/gcc/mips64-linux-gnuabi64/4.9/../../../mips64-linux-gnuabi64"
+// CHECK-DEBIAN-ML-MIPS64-GNUABI: "-L[[SYSROOT]]/lib/mips64-linux-gnuabi64"
+// CHECK-DEBIAN-ML-MIPS64-GNUABI: "-L[[SYSROOT]]/usr/lib/mips64-linux-gnuabi64"
+// CHECK-DEBIAN-ML-MIPS64-GNUABI: "-L[[SYSROOT]]/usr/lib/gcc/mips64-linux-gnuabi64/4.9"
+// CHECK-DEBIAN-ML-MIPS64-GNUABI: "-L[[SYSROOT]]/usr/lib/gcc/mips64-linux-gnuabi64/4.9/../../.."
+// CHECK-DEBIAN-ML-MIPS64-GNUABI: "-L[[SYSROOT]]/lib"
+// CHECK-DEBIAN-ML-MIPS64-GNUABI: "-L[[SYSROOT]]/usr/lib"
+// CHECK-DEBIAN-ML-MIPS64-GNUABI: "{{.*}}/usr/lib/gcc/mips64-linux-gnuabi64/4.9{{/|\\\\}}crtend.o"
+// CHECK-DEBIAN-ML-MIPS64-GNUABI: "{{.*}}/usr/lib/gcc/mips64-linux-gnuabi64/4.9/../../../mips64-linux-gnuabi64{{/|\\\\}}crtn.o"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips64el-linux-gnuabi64 -mabi=n64 \
+// RUN: --sysroot=%S/Inputs/debian_6_mips64_tree \
+// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-ML-MIPS64EL-GNUABI %s
+// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "{{.*}}/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/../../../mips64el-linux-gnuabi64{{/|\\\\}}crt1.o"
+// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "{{.*}}/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/../../../mips64el-linux-gnuabi64{{/|\\\\}}crti.o"
+// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "{{.*}}/usr/lib/gcc/mips64el-linux-gnuabi64/4.9{{/|\\\\}}crtbegin.o"
+// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "-L[[SYSROOT]]/usr/lib/gcc/mips64el-linux-gnuabi64/4.9"
+// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "-L[[SYSROOT]]/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/../../../mips64el-linux-gnuabi64"
+// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "-L[[SYSROOT]]/lib/mips64el-linux-gnuabi64"
+// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "-L[[SYSROOT]]/usr/lib/mips64el-linux-gnuabi64"
+// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "-L[[SYSROOT]]/usr/lib/gcc/mips64el-linux-gnuabi64/4.9"
+// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "-L[[SYSROOT]]/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/../../.."
+// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "-L[[SYSROOT]]/lib"
+// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "-L[[SYSROOT]]/usr/lib"
+// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "{{.*}}/usr/lib/gcc/mips64el-linux-gnuabi64/4.9{{/|\\\\}}crtend.o"
+// CHECK-DEBIAN-ML-MIPS64EL-GNUABI: "{{.*}}/usr/lib/gcc/mips64el-linux-gnuabi64/4.9/../../../mips64el-linux-gnuabi64{{/|\\\\}}crtn.o"
+//
// Test linker invocation for Freescale SDK (OpenEmbedded).
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: --target=powerpc-fsl-linux \
@@ -728,3 +1203,9 @@
// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>& 1 \
// RUN: | FileCheck --check-prefix=CHECK-PG %s
// CHECK-PG: gcrt1.o
+
+// GCC forwards -u to the linker.
+// RUN: %clang -u asdf --target=x86_64-unknown-linux -### %s \
+// RUN: --sysroot=%S/Inputs/basic_linux_tree 2>& 1 \
+// RUN: | FileCheck --check-prefix=CHECK-u %s
+// CHECK-u: "-u" "asdf"
diff --git a/test/Driver/macho-embedded.c b/test/Driver/macho-embedded.c
new file mode 100644
index 000000000000..cde157d8b4d4
--- /dev/null
+++ b/test/Driver/macho-embedded.c
@@ -0,0 +1,15 @@
+// RUN: %clang -arch armv7 -target thumbv7-apple-darwin-eabi -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-AAPCS
+// RUN: %clang -target x86_64-apple-macosx10.9 -arch armv7m -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-AAPCS
+// RUN: %clang -arch armv7s -target thumbv7-apple-ios -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-APCS
+// RUN: %clang -arch armv7s -target thumbv7-apple-darwin -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-APCS
+// RUN: %clang -arch armv6m -target thumbv7-apple-darwin -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-MACHO-EMBEDDED
+// RUN: %clang -arch armv7m -target thumbv7-apple-darwin -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-MACHO-EMBEDDED
+// RUN: %clang -arch armv7em -target thumbv7-apple-darwin -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-MACHO-EMBEDDED
+
+// CHECK-IOS: "-triple" "thumbv7" "thumbv7-apple-ios
+
+// CHECK-AAPCS: "-target-abi" "aapcs"
+// CHECK-APCS: "-target-abi" "apcs-gnu"
+
+// CHECK-MACHO-EMBEDDED: "-triple" "{{thumbv[67]e?m}}-apple-unknown-macho"
+// CHECK-MACHO-EMBEDDED: "-mrelocation-model" "pic"
diff --git a/test/Driver/masm.c b/test/Driver/masm.c
new file mode 100644
index 000000000000..17c639358b0b
--- /dev/null
+++ b/test/Driver/masm.c
@@ -0,0 +1,12 @@
+// RUN: %clang -target i386-unknown-linux -masm=intel -S %s -### 2>&1 | FileCheck --check-prefix=CHECK-INTEL %s
+// RUN: %clang -target i386-unknown-linux -masm=att -S %s -### 2>&1 | FileCheck --check-prefix=CHECK-ATT %s
+// RUN: %clang -target i386-unknown-linux -S -masm=somerequired %s -### 2>&1 | FileCheck --check-prefix=CHECK-SOMEREQUIRED %s
+// RUN: %clang -target arm-unknown-eabi -S -masm=intel %s -### 2>&1 | FileCheck --check-prefix=CHECK-ARM %s
+
+int f() {
+// CHECK-INTEL: -x86-asm-syntax=intel
+// CHECK-ATT: -x86-asm-syntax=att
+// CHECK-SOMEREQUIRED: error: unsupported argument 'somerequired' to option 'masm='
+// CHECK-ARM: warning: argument unused during compilation: '-masm=intel'
+ return 0;
+}
diff --git a/test/Driver/mips-abi.c b/test/Driver/mips-abi.c
index fd2b46f41be5..f75632446e27 100644
--- a/test/Driver/mips-abi.c
+++ b/test/Driver/mips-abi.c
@@ -1,36 +1,133 @@
// Check passing Mips ABI options to the backend.
//
+// RUN: %clang -target mips-linux-gnu -### -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-DEF %s
+// MIPS-DEF: "-target-cpu" "mips32r2"
+// MIPS-DEF: "-target-abi" "o32"
+//
+// RUN: %clang -target mips64-linux-gnu -### -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS64-DEF %s
+// MIPS64-DEF: "-target-cpu" "mips64r2"
+// MIPS64-DEF: "-target-abi" "n64"
+//
// RUN: %clang -target mips-linux-gnu -### -c %s \
// RUN: -mabi=32 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-ABI-32 %s
+// MIPS-ABI-32: "-target-cpu" "mips32r2"
// MIPS-ABI-32: "-target-abi" "o32"
//
// RUN: %clang -target mips-linux-gnu -### -c %s \
// RUN: -mabi=o32 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-ABI-O32 %s
+// MIPS-ABI-O32: "-target-cpu" "mips32r2"
// MIPS-ABI-O32: "-target-abi" "o32"
//
// RUN: %clang -target mips-linux-gnu -### -c %s \
// RUN: -mabi=n32 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-ABI-N32 %s
+// MIPS-ABI-N32: "-target-cpu" "mips64r2"
// MIPS-ABI-N32: "-target-abi" "n32"
//
// RUN: %clang -target mips64-linux-gnu -### -c %s \
// RUN: -mabi=64 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-ABI-64 %s
+// MIPS-ABI-64: "-target-cpu" "mips64r2"
// MIPS-ABI-64: "-target-abi" "n64"
//
// RUN: %clang -target mips64-linux-gnu -### -c %s \
// RUN: -mabi=n64 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-ABI-N64 %s
+// MIPS-ABI-N64: "-target-cpu" "mips64r2"
// MIPS-ABI-N64: "-target-abi" "n64"
//
-// RUN: %clang -target mips64-linux-gnu -### -c %s \
+// RUN: not %clang -target mips64-linux-gnu -c %s \
// RUN: -mabi=o64 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-ABI-O64 %s
-// MIPS-ABI-O64: "-target-abi" "o64"
+// MIPS-ABI-O64: error: unknown target ABI 'o64'
//
// RUN: %clang -target mips-linux-gnu -### -c %s \
// RUN: -mabi=eabi 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-ABI-EABI %s
+// MIPS-ABI-EABI: "-target-cpu" "mips32r2"
// MIPS-ABI-EABI: "-target-abi" "eabi"
+//
+// RUN: not %clang -target mips-linux-gnu -c %s \
+// RUN: -mabi=unknown 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-ABI-UNKNOWN %s
+// MIPS-ABI-UNKNOWN: error: unknown target ABI 'unknown'
+//
+// RUN: %clang -target mips-linux-gnu -### -c %s \
+// RUN: -march=mips1 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-ARCH-1 %s
+// MIPS-ARCH-1: "-target-cpu" "mips1"
+// MIPS-ARCH-1: "-target-abi" "o32"
+//
+// RUN: %clang -target mips-linux-gnu -### -c %s \
+// RUN: -march=mips2 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-ARCH-2 %s
+// MIPS-ARCH-2: "-target-cpu" "mips2"
+// MIPS-ARCH-2: "-target-abi" "o32"
+//
+// RUN: %clang -target mips-linux-gnu -### -c %s \
+// RUN: -march=mips3 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-ARCH-3 %s
+// MIPS-ARCH-3: "-target-cpu" "mips3"
+// MIPS-ARCH-3: "-target-abi" "o32"
+//
+// RUN: %clang -target mips-linux-gnu -### -c %s \
+// RUN: -march=mips4 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-ARCH-4 %s
+// MIPS-ARCH-4: "-target-cpu" "mips4"
+// MIPS-ARCH-4: "-target-abi" "o32"
+//
+// RUN: %clang -target mips-linux-gnu -### -c %s \
+// RUN: -march=mips5 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-ARCH-5 %s
+// MIPS-ARCH-5: "-target-cpu" "mips5"
+// MIPS-ARCH-5: "-target-abi" "o32"
+//
+// RUN: %clang -target mips-linux-gnu -### -c %s \
+// RUN: -march=mips32 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-ARCH-32 %s
+// MIPS-ARCH-32: "-target-cpu" "mips32"
+// MIPS-ARCH-32: "-target-abi" "o32"
+//
+// RUN: %clang -target mips-linux-gnu -### -c %s \
+// RUN: -march=mips32r2 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-ARCH-32R2 %s
+// MIPS-ARCH-32R2: "-target-cpu" "mips32r2"
+// MIPS-ARCH-32R2: "-target-abi" "o32"
+//
+// RUN: %clang -target mips-linux-gnu -### -c %s \
+// RUN: -march=mips64 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-ARCH-3264 %s
+// MIPS-ARCH-3264: "-target-cpu" "mips64"
+// MIPS-ARCH-3264: "-target-abi" "o32"
+//
+// RUN: %clang -target mips64-linux-gnu -### -c %s \
+// RUN: -march=mips64 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-ARCH-64 %s
+// MIPS-ARCH-64: "-target-cpu" "mips64"
+// MIPS-ARCH-64: "-target-abi" "n64"
+//
+// RUN: %clang -target mips64-linux-gnu -### -c %s \
+// RUN: -march=mips64r2 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-ARCH-64R2 %s
+// MIPS-ARCH-64R2: "-target-cpu" "mips64r2"
+// MIPS-ARCH-64R2: "-target-abi" "n64"
+//
+// RUN: %clang -target mips64-linux-gnu -### -c %s \
+// RUN: -march=octeon 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-ARCH-OCTEON %s
+// MIPS-ARCH-OCTEON: "-target-cpu" "octeon"
+// MIPS-ARCH-OCTEON: "-target-abi" "n64"
+//
+// RUN: not %clang -target mips64-linux-gnu -c %s \
+// RUN: -march=mips32 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-ARCH-6432 %s
+// MIPS-ARCH-6432: error: unknown target CPU 'mips32'
+//
+// RUN: not %clang -target mips-linux-gnu -c %s \
+// RUN: -march=unknown 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-ARCH-UNKNOWN %s
+// MIPS-ARCH-UNKNOWN: error: unknown target CPU 'unknown'
diff --git a/test/Driver/mips-as.c b/test/Driver/mips-as.c
index df925f1a17d4..ecbe7d668f96 100644
--- a/test/Driver/mips-as.c
+++ b/test/Driver/mips-as.c
@@ -2,148 +2,262 @@
//
// RUN: %clang -target mips-linux-gnu -### \
// RUN: -no-integrated-as -c %s 2>&1 \
-// RUN: | FileCheck -check-prefix=MIPS32-EB-AS %s
-// MIPS32-EB-AS: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB"
-// MIPS32-EB-AS-NOT: "-KPIC"
+// RUN: | FileCheck -check-prefix=MIPS32R2-EB-AS %s
+// RUN: %clang -target mipsel-linux-gnu -### \
+// RUN: -no-integrated-as -c -EB %s 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS32R2-EB-AS %s
+// MIPS32R2-EB-AS: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
+// MIPS32R2-EB-AS-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-KPIC"
//
// RUN: %clang -target mips-linux-gnu -### \
// RUN: -no-integrated-as -fPIC -c %s 2>&1 \
-// RUN: | FileCheck -check-prefix=MIPS32-EB-PIC %s
-// MIPS32-EB-PIC: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB"
-// MIPS32-EB-PIC: "-KPIC"
+// RUN: | FileCheck -check-prefix=MIPS32R2-EB-PIC %s
+// MIPS32R2-EB-PIC: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-call_nonpic" "-EB"
+// MIPS32R2-EB-PIC: "-KPIC"
//
// RUN: %clang -target mipsel-linux-gnu -### \
// RUN: -no-integrated-as -c %s 2>&1 \
-// RUN: | FileCheck -check-prefix=MIPS32-DEF-EL-AS %s
-// MIPS32-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EL"
+// RUN: | FileCheck -check-prefix=MIPS32R2-DEF-EL-AS %s
+// MIPS32R2-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EL"
//
// RUN: %clang -target mips64-linux-gnu -### \
// RUN: -no-integrated-as -c %s 2>&1 \
-// RUN: | FileCheck -check-prefix=MIPS64-EB-AS %s
-// MIPS64-EB-AS: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-EB"
+// RUN: | FileCheck -check-prefix=MIPS64R2-EB-AS %s
+// MIPS64R2-EB-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
//
// RUN: %clang -target mips64el-linux-gnu -### \
// RUN: -no-integrated-as -c %s 2>&1 \
-// RUN: | FileCheck -check-prefix=MIPS64-DEF-EL-AS %s
-// MIPS64-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-EL"
+// RUN: | FileCheck -check-prefix=MIPS64R2-DEF-EL-AS %s
+// MIPS64R2-DEF-EL-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-KPIC" "-EL"
//
// RUN: %clang -target mips-linux-gnu -mabi=eabi -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-EABI %s
-// MIPS-EABI: as{{(.exe)?}}" "-march" "mips32" "-mabi" "eabi" "-EB"
+// MIPS-EABI: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "eabi" "-mno-shared" "-call_nonpic" "-EB"
//
// RUN: %clang -target mips64-linux-gnu -mabi=n32 -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-N32 %s
-// MIPS-N32: as{{(.exe)?}}" "-march" "mips64" "-mabi" "n32" "-EB"
+// MIPS-N32: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "n32" "-mno-shared" "-call_nonpic" "-EB"
//
// RUN: %clang -target mipsel-linux-gnu -mabi=32 -### \
// RUN: -no-integrated-as -c %s 2>&1 \
-// RUN: | FileCheck -check-prefix=MIPS32-EL-AS %s
-// MIPS32-EL-AS: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EL"
+// RUN: | FileCheck -check-prefix=MIPS32R2-EL-AS %s
+// RUN: %clang -target mips-linux-gnu -mabi=32 -### \
+// RUN: -no-integrated-as -c %s -EL 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS32R2-EL-AS %s
+// MIPS32R2-EL-AS: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EL"
//
// RUN: %clang -target mips64el-linux-gnu -mabi=64 -### \
// RUN: -no-integrated-as -c %s 2>&1 \
-// RUN: | FileCheck -check-prefix=MIPS64-EL-AS %s
-// MIPS64-EL-AS: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-EL"
+// RUN: | FileCheck -check-prefix=MIPS64R2-EL-AS %s
+// MIPS64R2-EL-AS: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-KPIC" "-EL"
//
// RUN: %clang -target mips-linux-gnu -march=mips32r2 -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-32R2 %s
-// MIPS-32R2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB"
+// MIPS-32R2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
+//
+// RUN: %clang -target mips64-linux-gnu -march=octeon -### \
+// RUN: -no-integrated-as -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-OCTEON %s
+// MIPS-OCTEON: as{{(.exe)?}}" "-march" "octeon" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
+//
+// RUN: %clang -target mips-linux-gnu -mips1 -### \
+// RUN: -no-integrated-as -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-ALIAS-1 %s
+// MIPS-ALIAS-1: as{{(.exe)?}}" "-march" "mips1" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
+//
+// RUN: %clang -target mips-linux-gnu -mips2 -### \
+// RUN: -no-integrated-as -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-ALIAS-2 %s
+// MIPS-ALIAS-2: as{{(.exe)?}}" "-march" "mips2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
+//
+// RUN: %clang -target mips-linux-gnu -mips3 -### \
+// RUN: -no-integrated-as -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-ALIAS-3 %s
+// MIPS-ALIAS-3: as{{(.exe)?}}" "-march" "mips3" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
+//
+// RUN: %clang -target mips-linux-gnu -mips4 -### \
+// RUN: -no-integrated-as -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-ALIAS-4 %s
+// MIPS-ALIAS-4: as{{(.exe)?}}" "-march" "mips4" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
+//
+// RUN: %clang -target mips-linux-gnu -mips5 -### \
+// RUN: -no-integrated-as -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-ALIAS-5 %s
+// MIPS-ALIAS-5: as{{(.exe)?}}" "-march" "mips5" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
//
// RUN: %clang -target mips-linux-gnu -mips32 -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-32 %s
-// MIPS-ALIAS-32: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB"
+// MIPS-ALIAS-32: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
//
// RUN: %clang -target mips-linux-gnu -mips32r2 -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-32R2 %s
-// MIPS-ALIAS-32R2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-EB"
+// MIPS-ALIAS-32R2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
+//
+// RUN: %clang -target mips-linux-gnu -mips32r6 -### \
+// RUN: -no-integrated-as -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-ALIAS-32R6 %s
+// MIPS-ALIAS-32R6: as{{(.exe)?}}" "-march" "mips32r6" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
//
-// RUN: %clang -target mips-linux-gnu -mips64 -### \
+// RUN: %clang -target mips64-linux-gnu -mips64 -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-64 %s
-// MIPS-ALIAS-64: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-EB"
+// MIPS-ALIAS-64: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
//
-// RUN: %clang -target mips-linux-gnu -mips64r2 -### \
+// RUN: %clang -target mips64-linux-gnu -mips64r2 -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-ALIAS-64R2 %s
-// MIPS-ALIAS-64R2: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-EB"
+// MIPS-ALIAS-64R2: as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
+//
+// RUN: %clang -target mips64-linux-gnu -mips64r6 -### \
+// RUN: -no-integrated-as -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-ALIAS-64R6 %s
+// MIPS-ALIAS-64R6: as{{(.exe)?}}" "-march" "mips64r6" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
//
// RUN: %clang -target mips-linux-gnu -mno-mips16 -mips16 -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-16 %s
-// MIPS-16: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB" "-mips16"
+// MIPS-16: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mips16"
//
// RUN: %clang -target mips-linux-gnu -mips16 -mno-mips16 -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-N16 %s
// MIPS-N16: as{{(.exe)?}}"
-// MIPS-N16-NOT: "-mips16"
+// MIPS-N16: -no-mips16
//
// RUN: %clang -target mips-linux-gnu -mno-micromips -mmicromips -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-MICRO %s
-// MIPS-MICRO: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB" "-mmicromips"
+// MIPS-MICRO: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mmicromips"
//
// RUN: %clang -target mips-linux-gnu -mmicromips -mno-micromips -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-NMICRO %s
// MIPS-NMICRO: as{{(.exe)?}}"
-// MIPS-NMICRO-NOT: "-mmicromips"
+// MIPS-NMICRO-NOT: {{[A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-mmicromips"
//
// RUN: %clang -target mips-linux-gnu -mno-dsp -mdsp -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-DSP %s
-// MIPS-DSP: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB" "-mdsp"
+// MIPS-DSP: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mdsp"
//
// RUN: %clang -target mips-linux-gnu -mdsp -mno-dsp -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-NDSP %s
// MIPS-NDSP: as{{(.exe)?}}"
-// MIPS-NDSP-NOT: "-mdsp"
+// MIPS-NDSP-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-mdsp"
//
// RUN: %clang -target mips-linux-gnu -mno-dspr2 -mdspr2 -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-DSPR2 %s
-// MIPS-DSPR2: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB" "-mdspr2"
+// MIPS-DSPR2: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mdspr2"
//
// RUN: %clang -target mips-linux-gnu -mdspr2 -mno-dspr2 -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-NDSPR2 %s
// MIPS-NDSPR2: as{{(.exe)?}}"
-// MIPS-NDSPR2-NOT: "-mdspr2"
+// MIPS-NDSPR2-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-mdspr2"
//
// RUN: %clang -target mips-linux-gnu -mnan=legacy -mnan=2008 -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-NAN2008 %s
-// MIPS-NAN2008: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB" "-mnan=2008"
+// MIPS-NAN2008: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mnan=2008"
//
// RUN: %clang -target mips-linux-gnu -mnan=2008 -mnan=legacy -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-NAN-LEGACY %s
// MIPS-NAN-LEGACY: as{{(.exe)?}}"
-// MIPS-NAN_LEGACY-NOT: "-mnan={{.*}}"
+// MIPS-NAN-LEGACY-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-mnan={{.*}}"
//
-// RUN: %clang -target mips-linux-gnu -mfp64 -mfp32 -### \
+// RUN: %clang -target mips-linux-gnu -mfp64 -mfpxx -mfp32 -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-MFP32 %s
-// MIPS-MFP32: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB" "-mfp32"
+// MIPS-MFP32: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mfp32"
+//
+// RUN: %clang -target mips-linux-gnu -mfp32 -mfp64 -mfpxx -### \
+// RUN: -no-integrated-as -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=MIPS-MFPXX %s
+// MIPS-MFPXX: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mfpxx"
//
-// RUN: %clang -target mips-linux-gnu -mfp32 -mfp64 -### \
+// RUN: %clang -target mips-linux-gnu -mfpxx -mfp32 -mfp64 -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-MFP64 %s
-// MIPS-MFP64: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB" "-mfp64"
+// MIPS-MFP64: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mfp64"
//
// RUN: %clang -target mips-linux-gnu -mno-msa -mmsa -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-MSA %s
-// MIPS-MSA: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB" "-mmsa"
+// MIPS-MSA: as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB" "-mmsa"
//
// RUN: %clang -target mips-linux-gnu -mmsa -mno-msa -### \
// RUN: -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS-NMSA %s
// MIPS-NMSA: as{{(.exe)?}}"
-// MIPS-NMSA-NOT: "-mmsa"
+// MIPS-NMSA-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-mmsa"
+//
+// We've already tested MIPS32r2 and MIPS64r2 thoroughly. Do minimal tests on
+// the remaining CPU's since it was possible to pass on a -mabi with no value
+// when the CPU name is absent from a StringSwitch in getMipsCPUAndABI()
+// RUN: %clang -target mips-linux-gnu -### -no-integrated-as -c %s -mcpu=mips1 \
+// RUN: 2>&1 | FileCheck -check-prefix=MIPS1-EB-AS %s
+// MIPS1-EB-AS: as{{(.exe)?}}" "-march" "mips1" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
+// MIPS1-EB-AS-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-KPIC"
+//
+// RUN: %clang -target mips-linux-gnu -### -no-integrated-as -c %s -mcpu=mips2 \
+// RUN: 2>&1 | FileCheck -check-prefix=MIPS2-EB-AS %s
+// MIPS2-EB-AS: as{{(.exe)?}}" "-march" "mips2" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
+// MIPS2-EB-AS-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-KPIC"
+//
+// RUN: %clang -target mips64-linux-gnu -### -no-integrated-as -c %s -mcpu=mips3 \
+// RUN: 2>&1 | FileCheck -check-prefix=MIPS3-EB-AS %s
+// MIPS3-EB-AS: as{{(.exe)?}}" "-march" "mips3" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
+//
+// RUN: %clang -target mips64-linux-gnu -### -no-integrated-as -c %s -mcpu=mips4 \
+// RUN: 2>&1 | FileCheck -check-prefix=MIPS4-EB-AS %s
+// MIPS4-EB-AS: as{{(.exe)?}}" "-march" "mips4" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
+//
+// RUN: %clang -target mips64-linux-gnu -### -no-integrated-as -c %s -mcpu=mips5 \
+// RUN: 2>&1 | FileCheck -check-prefix=MIPS5-EB-AS %s
+// MIPS5-EB-AS: as{{(.exe)?}}" "-march" "mips5" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
+//
+// RUN: %clang -target mips-linux-gnu -### -no-integrated-as -c %s -mcpu=mips32 \
+// RUN: 2>&1 | FileCheck -check-prefix=MIPS32-EB-AS %s
+// MIPS32-EB-AS: as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
+// MIPS32-EB-AS-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-KPIC"
+//
+// RUN: %clang -target mips-linux-gnu -### -no-integrated-as -c %s -mcpu=mips32r6 \
+// RUN: 2>&1 | FileCheck -check-prefix=MIPS32R6-EB-AS %s
+// MIPS32R6-EB-AS: as{{(.exe)?}}" "-march" "mips32r6" "-mabi" "32" "-mno-shared" "-call_nonpic" "-EB"
+// MIPS32R6-EB-AS-NOT: "{{[ A-Za-z\\\/]*}}as{{(.exe)?}}{{.*}}"-KPIC"
+//
+// RUN: %clang -target mips64-linux-gnu -### -no-integrated-as -c %s -mcpu=mips64 \
+// RUN: 2>&1 | FileCheck -check-prefix=MIPS64-EB-AS %s
+// MIPS64-EB-AS: as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
+//
+// RUN: %clang -target mips64-linux-gnu -### -no-integrated-as -c %s -mcpu=mips64r6 \
+// RUN: 2>&1 | FileCheck -check-prefix=MIPS64R6-EB-AS %s
+// MIPS64R6-EB-AS: as{{(.exe)?}}" "-march" "mips64r6" "-mabi" "64" "-mno-shared" "-KPIC" "-EB"
+//
+// RUN: %clang -target mips-linux-gnu -### -no-integrated-as -msoft-float -mhard-float -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=HARDFLOAT --implicit-check-not=-msoft-float %s
+// HARDFLOAT: as{{(.exe)?}}"
+// HARDFLOAT: -mhard-float
+//
+// RUN: %clang -target mips-linux-gnu -### -no-integrated-as -mhard-float -msoft-float -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=SOFTFLOAT --implicit-check-not=-mhard-float %s
+// SOFTFLOAT: as{{(.exe)?}}"
+// SOFTFLOAT: -msoft-float
+//
+// RUN: %clang -target mips-linux-gnu -### -no-integrated-as -mno-odd-spreg -modd-spreg -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=ODDSPREG --implicit-check-not=-mno-odd-spreg %s
+// ODDSPREG: as{{(.exe)?}}"
+// ODDSPREG: -modd-spreg
+//
+// RUN: %clang -target mips-linux-gnu -### -no-integrated-as -modd-spreg -mno-odd-spreg -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=NOODDSPREG --implicit-check-not=-modd-spreg %s
+// NOODDSPREG: as{{(.exe)?}}"
+// NOODDSPREG: -mno-odd-spreg
diff --git a/test/Driver/mips-cs-header-search.cpp b/test/Driver/mips-cs-header-search.cpp
deleted file mode 100644
index 5538031670db..000000000000
--- a/test/Driver/mips-cs-header-search.cpp
+++ /dev/null
@@ -1,257 +0,0 @@
-// Check frontend invocations on Mentor Graphics MIPS toolchain.
-//
-// = Big-endian, hard float
-// RUN: %clang -no-canonical-prefixes %s -### -c -o %t.o 2>&1 \
-// RUN: --target=mips-linux-gnu \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-BE-HF-32 %s
-// CHECK-BE-HF-32: "-internal-isystem"
-// CHECK-BE-HF-32: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
-// CHECK-BE-HF-32: "-internal-isystem"
-// CHECK-BE-HF-32: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu"
-// CHECK-BE-HF-32: "-internal-isystem"
-// CHECK-BE-HF-32: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
-// CHECK-BE-HF-32: "-internal-externc-isystem"
-// CHECK-BE-HF-32: "[[TC]]/include"
-// CHECK-BE-HF-32: "-internal-externc-isystem"
-// CHECK-BE-HF-32: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
-//
-// = Big-endian, hard float, mips16
-// RUN: %clang -no-canonical-prefixes %s -### -c -o %t.o 2>&1 \
-// RUN: --target=mips-linux-gnu -mips16 \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-BE-HF-16 %s
-// CHECK-BE-HF-16: "-internal-isystem"
-// CHECK-BE-HF-16: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
-// CHECK-BE-HF-16: "-internal-isystem"
-// CHECK-BE-HF-16: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/mips16"
-// CHECK-BE-HF-16: "-internal-isystem"
-// CHECK-BE-HF-16: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
-// CHECK-BE-HF-16: "-internal-externc-isystem"
-// CHECK-BE-HF-16: "[[TC]]/include"
-// CHECK-BE-HF-16: "-internal-externc-isystem"
-// CHECK-BE-HF-16: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
-//
-// = Big-endian, hard float, micromips
-// RUN: %clang -no-canonical-prefixes %s -### -c -o %t.o 2>&1 \
-// RUN: --target=mips-linux-gnu -mmicromips \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-BE-HF-MICRO %s
-// CHECK-BE-HF-MICRO: "-internal-isystem"
-// CHECK-BE-HF-MICRO: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
-// CHECK-BE-HF-MICRO: "-internal-isystem"
-// CHECK-BE-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/micromips"
-// CHECK-BE-HF-MICRO: "-internal-isystem"
-// CHECK-BE-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
-// CHECK-BE-HF-MICRO: "-internal-externc-isystem"
-// CHECK-BE-HF-MICRO: "[[TC]]/include"
-// CHECK-BE-HF-MICRO: "-internal-externc-isystem"
-// CHECK-BE-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
-//
-// = Big-endian, soft float
-// RUN: %clang -no-canonical-prefixes %s -### -c -o %t.o 2>&1 \
-// RUN: --target=mips-linux-gnu -msoft-float \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-BE-SF-32 %s
-// CHECK-BE-SF-32: "-internal-isystem"
-// CHECK-BE-SF-32: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
-// CHECK-BE-SF-32: "-internal-isystem"
-// CHECK-BE-SF-32: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/soft-float"
-// CHECK-BE-SF-32: "-internal-isystem"
-// CHECK-BE-SF-32: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
-// CHECK-BE-SF-32: "-internal-externc-isystem"
-// CHECK-BE-SF-32: "[[TC]]/include"
-// CHECK-BE-SF-32: "-internal-externc-isystem"
-// CHECK-BE-SF-32: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
-//
-// = Big-endian, soft float, mips16
-// RUN: %clang -no-canonical-prefixes %s -### -c -o %t.o 2>&1 \
-// RUN: --target=mips-linux-gnu -msoft-float -mips16 \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-BE-SF-16 %s
-// CHECK-BE-SF-16: "-internal-isystem"
-// CHECK-BE-SF-16: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
-// CHECK-BE-SF-16: "-internal-isystem"
-// CHECK-BE-SF-16: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/mips16/soft-float"
-// CHECK-BE-SF-16: "-internal-isystem"
-// CHECK-BE-SF-16: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
-// CHECK-BE-SF-16: "-internal-externc-isystem"
-// CHECK-BE-SF-16: "[[TC]]/include"
-// CHECK-BE-SF-16: "-internal-externc-isystem"
-// CHECK-BE-SF-16: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
-//
-// = Big-endian, soft float, micromips
-// RUN: %clang -no-canonical-prefixes %s -### -c -o %t.o 2>&1 \
-// RUN: --target=mips-linux-gnu -msoft-float -mmicromips \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-BE-SF-MICRO %s
-// CHECK-BE-SF-MICRO: "-internal-isystem"
-// CHECK-BE-SF-MICRO: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
-// CHECK-BE-SF-MICRO: "-internal-isystem"
-// CHECK-BE-SF-MICRO: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/micromips/soft-float"
-// CHECK-BE-SF-MICRO: "-internal-isystem"
-// CHECK-BE-SF-MICRO: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
-// CHECK-BE-SF-MICRO: "-internal-externc-isystem"
-// CHECK-BE-SF-MICRO: "[[TC]]/include"
-// CHECK-BE-SF-MICRO: "-internal-externc-isystem"
-// CHECK-BE-SF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
-//
-// = Big-endian, hard float, 64-bit
-// RUN: %clang -no-canonical-prefixes %s -### -c -o %t.o 2>&1 \
-// RUN: --target=mips64-linux-gnu \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-BE-HF-64 %s
-// CHECK-BE-HF-64: "-internal-isystem"
-// CHECK-BE-HF-64: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
-// CHECK-BE-HF-64: "-internal-isystem"
-// CHECK-BE-HF-64: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/64"
-// CHECK-BE-HF-64: "-internal-isystem"
-// CHECK-BE-HF-64: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
-// CHECK-BE-HF-64: "-internal-externc-isystem"
-// CHECK-BE-HF-64: "[[TC]]/include"
-// CHECK-BE-HF-64: "-internal-externc-isystem"
-// CHECK-BE-HF-64: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
-//
-// = Big-endian, soft float, 64-bit
-// RUN: %clang -no-canonical-prefixes %s -### -c -o %t.o 2>&1 \
-// RUN: --target=mips64-linux-gnu -msoft-float \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-BE-SF-64 %s
-// CHECK-BE-SF-64: "-internal-isystem"
-// CHECK-BE-SF-64: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
-// CHECK-BE-SF-64: "-internal-isystem"
-// CHECK-BE-SF-64: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/soft-float/64"
-// CHECK-BE-SF-64: "-internal-isystem"
-// CHECK-BE-SF-64: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
-// CHECK-BE-SF-64: "-internal-externc-isystem"
-// CHECK-BE-SF-64: "[[TC]]/include"
-// CHECK-BE-SF-64: "-internal-externc-isystem"
-// CHECK-BE-SF-64: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
-//
-// = Little-endian, hard float
-// RUN: %clang -no-canonical-prefixes %s -### -c -o %t.o 2>&1 \
-// RUN: --target=mipsel-linux-gnu -mhard-float \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-EL-HF-32 %s
-// CHECK-EL-HF-32: "-internal-isystem"
-// CHECK-EL-HF-32: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
-// CHECK-EL-HF-32: "-internal-isystem"
-// CHECK-EL-HF-32: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/el"
-// CHECK-EL-HF-32: "-internal-isystem"
-// CHECK-EL-HF-32: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
-// CHECK-EL-HF-32: "-internal-externc-isystem"
-// CHECK-EL-HF-32: "[[TC]]/include"
-// CHECK-EL-HF-32: "-internal-externc-isystem"
-// CHECK-EL-HF-32: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
-//
-// = Little-endian, hard float, mips16
-// RUN: %clang -no-canonical-prefixes %s -### -c -o %t.o 2>&1 \
-// RUN: --target=mipsel-linux-gnu -mips16 \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-EL-HF-16 %s
-// CHECK-EL-HF-16: "-internal-isystem"
-// CHECK-EL-HF-16: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
-// CHECK-EL-HF-16: "-internal-isystem"
-// CHECK-EL-HF-16: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/mips16/el"
-// CHECK-EL-HF-16: "-internal-isystem"
-// CHECK-EL-HF-16: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
-// CHECK-EL-HF-16: "-internal-externc-isystem"
-// CHECK-EL-HF-16: "[[TC]]/include"
-// CHECK-EL-HF-16: "-internal-externc-isystem"
-// CHECK-EL-HF-16: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
-//
-// = Little-endian, hard float, micromips
-// RUN: %clang -no-canonical-prefixes %s -### -c -o %t.o 2>&1 \
-// RUN: --target=mipsel-linux-gnu -mmicromips \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-EL-HF-MICRO %s
-// CHECK-EL-HF-MICRO: "-internal-isystem"
-// CHECK-EL-HF-MICRO: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
-// CHECK-EL-HF-MICRO: "-internal-isystem"
-// CHECK-EL-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/micromips/el"
-// CHECK-EL-HF-MICRO: "-internal-isystem"
-// CHECK-EL-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
-// CHECK-EL-HF-MICRO: "-internal-externc-isystem"
-// CHECK-EL-HF-MICRO: "[[TC]]/include"
-// CHECK-EL-HF-MICRO: "-internal-externc-isystem"
-// CHECK-EL-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
-//
-// = Little-endian, soft float
-// RUN: %clang -no-canonical-prefixes %s -### -c -o %t.o 2>&1 \
-// RUN: --target=mipsel-linux-gnu -mfloat-abi=soft \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-EL-SF-32 %s
-// CHECK-EL-SF-32: "-internal-isystem"
-// CHECK-EL-SF-32: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
-// CHECK-EL-SF-32: "-internal-isystem"
-// CHECK-EL-SF-32: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/soft-float/el"
-// CHECK-EL-SF-32: "-internal-isystem"
-// CHECK-EL-SF-32: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
-// CHECK-EL-SF-32: "-internal-externc-isystem"
-// CHECK-EL-SF-32: "[[TC]]/include"
-// CHECK-EL-SF-32: "-internal-externc-isystem"
-// CHECK-EL-SF-32: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
-//
-// = Little-endian, soft float, mips16
-// RUN: %clang -no-canonical-prefixes %s -### -c -o %t.o 2>&1 \
-// RUN: --target=mipsel-linux-gnu -mips16 -msoft-float \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-EL-SF-16 %s
-// CHECK-EL-SF-16: "-internal-isystem"
-// CHECK-EL-SF-16: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
-// CHECK-EL-SF-16: "-internal-isystem"
-// CHECK-EL-SF-16: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/mips16/soft-float/el"
-// CHECK-EL-SF-16: "-internal-isystem"
-// CHECK-EL-SF-16: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
-// CHECK-EL-SF-16: "-internal-externc-isystem"
-// CHECK-EL-SF-16: "[[TC]]/include"
-// CHECK-EL-SF-16: "-internal-externc-isystem"
-// CHECK-EL-SF-16: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
-//
-// = Little-endian, soft float, micromips
-// RUN: %clang -no-canonical-prefixes %s -### -c -o %t.o 2>&1 \
-// RUN: --target=mipsel-linux-gnu -mmicromips -msoft-float \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-EL-SF-MICRO %s
-// CHECK-EL-SF-MICRO: "-internal-isystem"
-// CHECK-EL-SF-MICRO: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
-// CHECK-EL-SF-MICRO: "-internal-isystem"
-// CHECK-EL-SF-MICRO: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/micromips/soft-float/el"
-// CHECK-EL-SF-MICRO: "-internal-isystem"
-// CHECK-EL-SF-MICRO: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
-// CHECK-EL-SF-MICRO: "-internal-externc-isystem"
-// CHECK-EL-SF-MICRO: "[[TC]]/include"
-// CHECK-EL-SF-MICRO: "-internal-externc-isystem"
-// CHECK-EL-SF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
-//
-// = Little-endian, hard float, 64-bit
-// RUN: %clang -no-canonical-prefixes %s -### -c -o %t.o 2>&1 \
-// RUN: --target=mips64el-linux-gnu \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-EL-HF-64 %s
-// CHECK-EL-HF-64: "-internal-isystem"
-// CHECK-EL-HF-64: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
-// CHECK-EL-HF-64: "-internal-isystem"
-// CHECK-EL-HF-64: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/el/64"
-// CHECK-EL-HF-64: "-internal-isystem"
-// CHECK-EL-HF-64: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
-// CHECK-EL-HF-64: "-internal-externc-isystem"
-// CHECK-EL-HF-64: "[[TC]]/include"
-// CHECK-EL-HF-64: "-internal-externc-isystem"
-// CHECK-EL-HF-64: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
-//
-// = Little-endian, soft float, 64-bit
-// RUN: %clang -no-canonical-prefixes %s -### -c -o %t.o 2>&1 \
-// RUN: --target=mips64el-linux-gnu -msoft-float \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-EL-SF-64 %s
-// CHECK-EL-SF-64: "-internal-isystem"
-// CHECK-EL-SF-64: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
-// CHECK-EL-SF-64: "-internal-isystem"
-// CHECK-EL-SF-64: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/soft-float/el/64"
-// CHECK-EL-SF-64: "-internal-isystem"
-// CHECK-EL-SF-64: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
-// CHECK-EL-SF-64: "-internal-externc-isystem"
-// CHECK-EL-SF-64: "[[TC]]/include"
-// CHECK-EL-SF-64: "-internal-externc-isystem"
-// CHECK-EL-SF-64: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
diff --git a/test/Driver/mips-cs-ld.c b/test/Driver/mips-cs-ld.c
deleted file mode 100644
index cdbd5c8c69c4..000000000000
--- a/test/Driver/mips-cs-ld.c
+++ /dev/null
@@ -1,288 +0,0 @@
-// Check ld invocations on Mentor Graphics MIPS toolchain.
-//
-// = Big-endian, hard float
-// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN: --target=mips-linux-gnu \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-BE-HF-32 %s
-// CHECK-BE-HF-32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-HF-32: "--sysroot=[[TC:[^"]+]]/../../../../mips-linux-gnu/libc"
-// CHECK-BE-HF-32: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-BE-HF-32: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-BE-HF-32: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3{{/|\\\\}}crtbegin.o"
-// CHECK-BE-HF-32: "-L[[TC]]"
-// CHECK-BE-HF-32: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib"
-// CHECK-BE-HF-32: "-L[[TC]]/../../../../mips-linux-gnu/libc/lib"
-// CHECK-BE-HF-32: "-L[[TC]]/../../../../mips-linux-gnu/libc/usr/lib"
-// CHECK-BE-HF-32: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3{{/|\\\\}}crtend.o"
-// CHECK-BE-HF-32: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/usr/lib/../lib{{/|\\\\}}crtn.o"
-//
-// = Big-endian, hard float, mips16
-// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN: --target=mips-linux-gnu -mips16 \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-BE-HF-16 %s
-// CHECK-BE-HF-16: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-HF-16: "--sysroot=[[TC:[^"]+]]/../../../../mips-linux-gnu/libc/mips16"
-// CHECK-BE-HF-16: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/mips16/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-BE-HF-16: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/mips16/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-BE-HF-16: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/mips16{{/|\\\\}}crtbegin.o"
-// CHECK-BE-HF-16: "-L[[TC]]/mips16"
-// CHECK-BE-HF-16: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/mips16"
-// CHECK-BE-HF-16-NOT: "-L[[TC]]"
-// CHECK-BE-HF-16: "-L[[TC]]/../../../../mips-linux-gnu/libc/mips16/lib/../lib"
-// CHECK-BE-HF-16: "-L[[TC]]/../../../../mips-linux-gnu/libc/mips16/usr/lib/../lib"
-// CHECK-BE-HF-16: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/mips16{{/|\\\\}}crtend.o"
-// CHECK-BE-HF-16: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/mips16/usr/lib/../lib{{/|\\\\}}crtn.o"
-//
-// = Big-endian, hard float, mmicromips
-// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN: --target=mips-linux-gnu -mmicromips \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-BE-HF-MICRO %s
-// CHECK-BE-HF-MICRO: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-HF-MICRO: "--sysroot=[[TC:[^"]+]]/../../../../mips-linux-gnu/libc/micromips"
-// CHECK-BE-HF-MICRO: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/micromips/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-BE-HF-MICRO: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/micromips/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-BE-HF-MICRO: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/micromips{{/|\\\\}}crtbegin.o"
-// CHECK-BE-HF-MICRO: "-L[[TC]]/micromips"
-// CHECK-BE-HF-MICRO: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/micromips"
-// CHECK-BE-HF-MICRO-NOT: "-L[[TC]]"
-// CHECK-BE-HF-MICRO: "-L[[TC]]/../../../../mips-linux-gnu/libc/micromips/lib/../lib"
-// CHECK-BE-HF-MICRO: "-L[[TC]]/../../../../mips-linux-gnu/libc/micromips/usr/lib/../lib"
-// CHECK-BE-HF-MICRO: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/micromips{{/|\\\\}}crtend.o"
-// CHECK-BE-HF-MICRO: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/micromips/usr/lib/../lib{{/|\\\\}}crtn.o"
-//
-// = Big-endian, soft float
-// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN: --target=mips-linux-gnu -msoft-float \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-BE-SF-32 %s
-// CHECK-BE-SF-32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-SF-32: "--sysroot=[[TC:[^"]+]]/../../../../mips-linux-gnu/libc/soft-float"
-// CHECK-BE-SF-32: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/soft-float/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-BE-SF-32: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/soft-float/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-BE-SF-32: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/soft-float{{/|\\\\}}crtbegin.o"
-// CHECK-BE-SF-32: "-L[[TC]]/soft-float"
-// CHECK-BE-SF-32: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/soft-float"
-// CHECK-BE-SF-32-NOT: "-L[[TC]]"
-// CHECK-BE-SF-32: "-L[[TC]]/../../../../mips-linux-gnu/libc/soft-float/lib/../lib"
-// CHECK-BE-SF-32: "-L[[TC]]/../../../../mips-linux-gnu/libc/soft-float/usr/lib/../lib"
-// CHECK-BE-SF-32: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/soft-float{{/|\\\\}}crtend.o"
-// CHECK-BE-SF-32: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/soft-float/usr/lib/../lib{{/|\\\\}}crtn.o"
-//
-// = Big-endian, soft float, mips16
-// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN: --target=mips-linux-gnu -msoft-float -mips16 \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-BE-SF-16 %s
-// CHECK-BE-SF-16: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-SF-16: "--sysroot=[[TC:[^"]+]]/../../../../mips-linux-gnu/libc/mips16/soft-float"
-// CHECK-BE-SF-16: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/mips16/soft-float/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-BE-SF-16: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/mips16/soft-float/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-BE-SF-16: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/mips16/soft-float{{/|\\\\}}crtbegin.o"
-// CHECK-BE-SF-16: "-L[[TC]]/mips16/soft-float"
-// CHECK-BE-SF-16: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/mips16/soft-float"
-// CHECK-BE-SF-16-NOT: "-L[[TC]]"
-// CHECK-BE-SF-16: "-L[[TC]]/../../../../mips-linux-gnu/libc/mips16/soft-float/lib/../lib"
-// CHECK-BE-SF-16: "-L[[TC]]/../../../../mips-linux-gnu/libc/mips16/soft-float/usr/lib/../lib"
-// CHECK-BE-SF-16: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/mips16/soft-float{{/|\\\\}}crtend.o"
-// CHECK-BE-SF-16: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/mips16/soft-float/usr/lib/../lib{{/|\\\\}}crtn.o"
-//
-// = Big-endian, soft float, micromips
-// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN: --target=mips-linux-gnu -msoft-float -mmicromips \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-BE-SF-MICRO %s
-// CHECK-BE-SF-MICRO: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-SF-MICRO: "--sysroot=[[TC:[^"]+]]/../../../../mips-linux-gnu/libc/micromips/soft-float"
-// CHECK-BE-SF-MICRO: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/micromips/soft-float/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-BE-SF-MICRO: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/micromips/soft-float/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-BE-SF-MICRO: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/micromips/soft-float{{/|\\\\}}crtbegin.o"
-// CHECK-BE-SF-MICRO: "-L[[TC]]/micromips/soft-float"
-// CHECK-BE-SF-MICRO: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/micromips/soft-float"
-// CHECK-BE-SF-MICRO-NOT: "-L[[TC]]"
-// CHECK-BE-SF-MICRO: "-L[[TC]]/../../../../mips-linux-gnu/libc/micromips/soft-float/lib/../lib"
-// CHECK-BE-SF-MICRO: "-L[[TC]]/../../../../mips-linux-gnu/libc/micromips/soft-float/usr/lib/../lib"
-// CHECK-BE-SF-MICRO: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/micromips/soft-float{{/|\\\\}}crtend.o"
-// CHECK-BE-SF-MICRO: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/micromips/soft-float/usr/lib/../lib{{/|\\\\}}crtn.o"
-//
-// = Big-endian, hard float, 64-bit
-// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN: --target=mips64-linux-gnu \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-BE-HF-64 %s
-// CHECK-BE-HF-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-HF-64: "--sysroot=[[TC:[^"]+]]/../../../../mips-linux-gnu/libc"
-// CHECK-BE-HF-64: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/usr/lib/../lib64{{/|\\\\}}crt1.o"
-// CHECK-BE-HF-64: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/usr/lib/../lib64{{/|\\\\}}crti.o"
-// CHECK-BE-HF-64: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/64{{/|\\\\}}crtbegin.o"
-// CHECK-BE-HF-64: "-L[[TC]]/64"
-// CHECK-BE-HF-64: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib64"
-// CHECK-BE-HF-64: "-L[[TC]]/../../../../mips-linux-gnu/libc/lib/../lib64"
-// CHECK-BE-HF-64: "-L[[TC]]/../../../../mips-linux-gnu/libc/usr/lib/../lib64"
-// CHECK-BE-HF-64-NOT: "-L[[TC]]"
-// CHECK-BE-HF-64: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/64{{/|\\\\}}crtend.o"
-// CHECK-BE-HF-64: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/usr/lib/../lib64{{/|\\\\}}crtn.o"
-//
-// = Big-endian, soft float, 64-bit
-// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN: --target=mips64-linux-gnu -msoft-float \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-BE-SF-64 %s
-// CHECK-BE-SF-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-SF-64: "--sysroot=[[TC:[^"]+]]/../../../../mips-linux-gnu/libc/soft-float"
-// CHECK-BE-SF-64: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/soft-float/usr/lib/../lib64{{/|\\\\}}crt1.o"
-// CHECK-BE-SF-64: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/soft-float/usr/lib/../lib64{{/|\\\\}}crti.o"
-// CHECK-BE-SF-64: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/soft-float/64{{/|\\\\}}crtbegin.o"
-// CHECK-BE-SF-64: "-L[[TC]]/soft-float/64"
-// CHECK-BE-SF-64: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib64/soft-float"
-// CHECK-BE-SF-64: "-L[[TC]]/../../../../mips-linux-gnu/libc/soft-float/lib/../lib64"
-// CHECK-BE-SF-64: "-L[[TC]]/../../../../mips-linux-gnu/libc/soft-float/usr/lib/../lib64"
-// CHECK-BE-SF-64-NOT: "-L[[TC]]"
-// CHECK-BE-SF-64: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/soft-float/64{{/|\\\\}}crtend.o"
-// CHECK-BE-SF-64: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/soft-float/usr/lib/../lib64{{/|\\\\}}crtn.o"
-//
-// = Little-endian, hard float
-// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN: --target=mipsel-linux-gnu -mhard-float \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-EL-HF-32 %s
-// CHECK-EL-HF-32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-HF-32: "--sysroot=[[TC:[^"]+]]/../../../../mips-linux-gnu/libc/el"
-// CHECK-EL-HF-32: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/el/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-EL-HF-32: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/el/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-EL-HF-32: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/el{{/|\\\\}}crtbegin.o"
-// CHECK-EL-HF-32: "-L[[TC]]/el"
-// CHECK-EL-HF-32: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/el"
-// CHECK-EL-HF-32-NOT: "-L[[TC]]"
-// CHECK-EL-HF-32: "-L[[TC]]/../../../../mips-linux-gnu/libc/el/lib/../lib"
-// CHECK-EL-HF-32: "-L[[TC]]/../../../../mips-linux-gnu/libc/el/usr/lib/../lib"
-// CHECK-EL-HF-32: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/el{{/|\\\\}}crtend.o"
-// CHECK-EL-HF-32: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/el/usr/lib/../lib{{/|\\\\}}crtn.o"
-//
-// = Little-endian, hard float, mips16
-// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN: --target=mipsel-linux-gnu -mips16 \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-EL-HF-16 %s
-// CHECK-EL-HF-16: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-HF-16: "--sysroot=[[TC:[^"]+]]/../../../../mips-linux-gnu/libc/mips16/el"
-// CHECK-EL-HF-16: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/mips16/el/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-EL-HF-16: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/mips16/el/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-EL-HF-16: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/mips16/el{{/|\\\\}}crtbegin.o"
-// CHECK-EL-HF-16: "-L[[TC]]/mips16/el"
-// CHECK-EL-HF-16: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/mips16/el"
-// CHECK-EL-HF-16-NOT: "-L[[TC]]"
-// CHECK-EL-HF-16: "-L[[TC]]/../../../../mips-linux-gnu/libc/mips16/el/lib/../lib"
-// CHECK-EL-HF-16: "-L[[TC]]/../../../../mips-linux-gnu/libc/mips16/el/usr/lib/../lib"
-// CHECK-EL-HF-16: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/mips16/el{{/|\\\\}}crtend.o"
-// CHECK-EL-HF-16: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/mips16/el/usr/lib/../lib{{/|\\\\}}crtn.o"
-//
-// = Little-endian, hard float, micromips
-// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN: --target=mipsel-linux-gnu -mmicromips \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-EL-HF-MICRO %s
-// CHECK-EL-HF-MICRO: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-HF-MICRO: "--sysroot=[[TC:[^"]+]]/../../../../mips-linux-gnu/libc/micromips/el"
-// CHECK-EL-HF-MICRO: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/micromips/el/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-EL-HF-MICRO: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/micromips/el/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-EL-HF-MICRO: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/micromips/el{{/|\\\\}}crtbegin.o"
-// CHECK-EL-HF-MICRO: "-L[[TC]]/micromips/el"
-// CHECK-EL-HF-MICRO: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/micromips/el"
-// CHECK-EL-HF-MICRO-NOT: "-L[[TC]]"
-// CHECK-EL-HF-MICRO: "-L[[TC]]/../../../../mips-linux-gnu/libc/micromips/el/lib/../lib"
-// CHECK-EL-HF-MICRO: "-L[[TC]]/../../../../mips-linux-gnu/libc/micromips/el/usr/lib/../lib"
-// CHECK-EL-HF-MICRO: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/micromips/el{{/|\\\\}}crtend.o"
-// CHECK-EL-HF-MICRO: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/micromips/el/usr/lib/../lib{{/|\\\\}}crtn.o"
-//
-// = Little-endian, soft float
-// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN: --target=mipsel-linux-gnu -mfloat-abi=soft \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-EL-SF-32 %s
-// CHECK-EL-SF-32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-SF-32: "--sysroot=[[TC:[^"]+]]/../../../../mips-linux-gnu/libc/soft-float/el"
-// CHECK-EL-SF-32: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/soft-float/el/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-EL-SF-32: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/soft-float/el/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-EL-SF-32: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/soft-float/el{{/|\\\\}}crtbegin.o"
-// CHECK-EL-SF-32: "-L[[TC]]/soft-float/el"
-// CHECK-EL-SF-32: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/soft-float/el"
-// CHECK-EL-SF-32-NOT: "-L[[TC]]"
-// CHECK-EL-SF-32: "-L[[TC]]/../../../../mips-linux-gnu/libc/soft-float/el/lib/../lib"
-// CHECK-EL-SF-32: "-L[[TC]]/../../../../mips-linux-gnu/libc/soft-float/el/usr/lib/../lib"
-// CHECK-EL-SF-32: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/soft-float/el{{/|\\\\}}crtend.o"
-// CHECK-EL-SF-32: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/soft-float/el/usr/lib/../lib{{/|\\\\}}crtn.o"
-//
-// = Little-endian, soft float, mips16
-// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN: --target=mipsel-linux-gnu -mips16 -msoft-float \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-EL-SF-16 %s
-// CHECK-EL-SF-16: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-SF-16: "--sysroot=[[TC:[^"]+]]/../../../../mips-linux-gnu/libc/mips16/soft-float/el"
-// CHECK-EL-SF-16: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/mips16/soft-float/el/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-EL-SF-16: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/mips16/soft-float/el/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-EL-SF-16: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/mips16/soft-float/el{{/|\\\\}}crtbegin.o"
-// CHECK-EL-SF-16: "-L[[TC]]/mips16/soft-float/el"
-// CHECK-EL-SF-16: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/mips16/soft-float/el"
-// CHECK-EL-SF-16-NOT: "-L[[TC]]"
-// CHECK-EL-SF-16: "-L[[TC]]/../../../../mips-linux-gnu/libc/mips16/soft-float/el/lib/../lib"
-// CHECK-EL-SF-16: "-L[[TC]]/../../../../mips-linux-gnu/libc/mips16/soft-float/el/usr/lib/../lib"
-// CHECK-EL-SF-16: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/mips16/soft-float/el{{/|\\\\}}crtend.o"
-// CHECK-EL-SF-16: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/mips16/soft-float/el/usr/lib/../lib{{/|\\\\}}crtn.o"
-//
-// = Little-endian, soft float, micromips
-// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN: --target=mipsel-linux-gnu -mmicromips -msoft-float \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-EL-SF-MICRO %s
-// CHECK-EL-SF-MICRO: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-SF-MICRO: "--sysroot=[[TC:[^"]+]]/../../../../mips-linux-gnu/libc/micromips/soft-float/el"
-// CHECK-EL-SF-MICRO: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/micromips/soft-float/el/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-EL-SF-MICRO: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/micromips/soft-float/el/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-EL-SF-MICRO: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/micromips/soft-float/el{{/|\\\\}}crtbegin.o"
-// CHECK-EL-SF-MICRO: "-L[[TC]]/micromips/soft-float/el"
-// CHECK-EL-SF-MICRO: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/micromips/soft-float/el"
-// CHECK-EL-SF-MICRO-NOT: "-L[[TC]]"
-// CHECK-EL-SF-MICRO: "-L[[TC]]/../../../../mips-linux-gnu/libc/micromips/soft-float/el/lib/../lib"
-// CHECK-EL-SF-MICRO: "-L[[TC]]/../../../../mips-linux-gnu/libc/micromips/soft-float/el/usr/lib/../lib"
-// CHECK-EL-SF-MICRO: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/micromips/soft-float/el{{/|\\\\}}crtend.o"
-// CHECK-EL-SF-MICRO: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/micromips/soft-float/el/usr/lib/../lib{{/|\\\\}}crtn.o"
-//
-// = Little-endian, hard float, 64-bit
-// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN: --target=mips64el-linux-gnu \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-EL-HF-64 %s
-// CHECK-EL-HF-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-HF-64: "--sysroot=[[TC:[^"]+]]/../../../../mips-linux-gnu/libc/el"
-// CHECK-EL-HF-64: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/el/usr/lib/../lib64{{/|\\\\}}crt1.o"
-// CHECK-EL-HF-64: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/el/usr/lib/../lib64{{/|\\\\}}crti.o"
-// CHECK-EL-HF-64: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/el/64{{/|\\\\}}crtbegin.o"
-// CHECK-EL-HF-64: "-L[[TC]]/el/64"
-// CHECK-EL-HF-64: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib64/el"
-// CHECK-EL-HF-64: "-L[[TC]]/../../../../mips-linux-gnu/libc/el/lib/../lib64"
-// CHECK-EL-HF-64: "-L[[TC]]/../../../../mips-linux-gnu/libc/el/usr/lib/../lib64"
-// CHECK-EL-HF-64-NOT: "-L[[TC]]"
-// CHECK-EL-HF-64: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/el/64{{/|\\\\}}crtend.o"
-// CHECK-EL-HF-64: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/el/usr/lib/../lib64{{/|\\\\}}crtn.o"
-//
-// = Little-endian, soft float, 64-bit
-// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
-// RUN: --target=mips64el-linux-gnu -msoft-float \
-// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
-// RUN: | FileCheck --check-prefix=CHECK-EL-SF-64 %s
-// CHECK-EL-SF-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-SF-64: "--sysroot=[[TC:[^"]+]]/../../../../mips-linux-gnu/libc/soft-float/el"
-// CHECK-EL-SF-64: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/soft-float/el/usr/lib/../lib64{{/|\\\\}}crt1.o"
-// CHECK-EL-SF-64: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/soft-float/el/usr/lib/../lib64{{/|\\\\}}crti.o"
-// CHECK-EL-SF-64: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/soft-float/el/64{{/|\\\\}}crtbegin.o"
-// CHECK-EL-SF-64: "-L[[TC]]/soft-float/el/64"
-// CHECK-EL-SF-64: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib64/soft-float/el"
-// CHECK-EL-SF-64: "-L[[TC]]/../../../../mips-linux-gnu/libc/soft-float/el/lib/../lib64"
-// CHECK-EL-SF-64: "-L[[TC]]/../../../../mips-linux-gnu/libc/soft-float/el/usr/lib/../lib64"
-// CHECK-EL-SF-64-NOT: "-L[[TC]]"
-// CHECK-EL-SF-64: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/soft-float/el/64{{/|\\\\}}crtend.o"
-// CHECK-EL-SF-64: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/../../../../mips-linux-gnu/libc/soft-float/el/usr/lib/../lib64{{/|\\\\}}crtn.o"
diff --git a/test/Driver/mips-cs.cpp b/test/Driver/mips-cs.cpp
new file mode 100644
index 000000000000..275d61540b47
--- /dev/null
+++ b/test/Driver/mips-cs.cpp
@@ -0,0 +1,504 @@
+// Check frontend and linker invocations on Mentor Graphics MIPS toolchain.
+//
+// = Big-endian, hard float
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips-linux-gnu \
+// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
+// RUN: | FileCheck --check-prefix=CHECK-BE-HF-32 %s
+// CHECK-BE-HF-32: "-internal-isystem"
+// CHECK-BE-HF-32: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
+// CHECK-BE-HF-32: "-internal-isystem"
+// CHECK-BE-HF-32: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu"
+// CHECK-BE-HF-32: "-internal-isystem"
+// CHECK-BE-HF-32: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
+// CHECK-BE-HF-32: "-internal-externc-isystem"
+// CHECK-BE-HF-32: "[[TC]]/include"
+// CHECK-BE-HF-32: "-internal-externc-isystem"
+// CHECK-BE-HF-32: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
+// CHECK-BE-HF-32: "{{.*}}ld{{(.exe)?}}"
+// CHECK-BE-HF-32: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc"
+// CHECK-BE-HF-32: "[[TC]]/../../../../mips-linux-gnu/libc/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-BE-HF-32: "[[TC]]/../../../../mips-linux-gnu/libc/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-BE-HF-32: "[[TC]]{{/|\\\\}}crtbegin.o"
+// CHECK-BE-HF-32: "-L[[TC]]"
+// CHECK-BE-HF-32: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib"
+// CHECK-BE-HF-32: "-L[[TC]]/../../../../mips-linux-gnu/libc/lib"
+// CHECK-BE-HF-32: "-L[[TC]]/../../../../mips-linux-gnu/libc/usr/lib"
+// CHECK-BE-HF-32: "[[TC]]{{/|\\\\}}crtend.o"
+// CHECK-BE-HF-32: "[[TC]]/../../../../mips-linux-gnu/libc/usr/lib/../lib{{/|\\\\}}crtn.o"
+//
+// = Big-endian, hard float, mips16
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips-linux-gnu -mips16 \
+// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
+// RUN: | FileCheck --check-prefix=CHECK-BE-HF-16 %s
+// CHECK-BE-HF-16: "-internal-isystem"
+// CHECK-BE-HF-16: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
+// CHECK-BE-HF-16: "-internal-isystem"
+// CHECK-BE-HF-16: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/mips16"
+// CHECK-BE-HF-16: "-internal-isystem"
+// CHECK-BE-HF-16: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
+// CHECK-BE-HF-16: "-internal-externc-isystem"
+// CHECK-BE-HF-16: "[[TC]]/include"
+// CHECK-BE-HF-16: "-internal-externc-isystem"
+// CHECK-BE-HF-16: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
+// CHECK-BE-HF-16: "{{.*}}ld{{(.exe)?}}"
+// CHECK-BE-HF-16: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/mips16"
+// CHECK-BE-HF-16: "[[TC]]/../../../../mips-linux-gnu/libc/mips16/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-BE-HF-16: "[[TC]]/../../../../mips-linux-gnu/libc/mips16/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-BE-HF-16: "[[TC]]/mips16{{/|\\\\}}crtbegin.o"
+// CHECK-BE-HF-16: "-L[[TC]]/mips16"
+// CHECK-BE-HF-16: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/mips16"
+// CHECK-BE-HF-16-NOT: "-L[[TC]]"
+// CHECK-BE-HF-16: "-L[[TC]]/../../../../mips-linux-gnu/libc/mips16/lib/../lib"
+// CHECK-BE-HF-16: "-L[[TC]]/../../../../mips-linux-gnu/libc/mips16/usr/lib/../lib"
+// CHECK-BE-HF-16: "[[TC]]/mips16{{/|\\\\}}crtend.o"
+// CHECK-BE-HF-16: "[[TC]]/../../../../mips-linux-gnu/libc/mips16/usr/lib/../lib{{/|\\\\}}crtn.o"
+//
+// = Big-endian, hard float, mmicromips
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips-linux-gnu -mmicromips \
+// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
+// RUN: | FileCheck --check-prefix=CHECK-BE-HF-MICRO %s
+// CHECK-BE-HF-MICRO: "-internal-isystem"
+// CHECK-BE-HF-MICRO: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
+// CHECK-BE-HF-MICRO: "-internal-isystem"
+// CHECK-BE-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/micromips"
+// CHECK-BE-HF-MICRO: "-internal-isystem"
+// CHECK-BE-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
+// CHECK-BE-HF-MICRO: "-internal-externc-isystem"
+// CHECK-BE-HF-MICRO: "[[TC]]/include"
+// CHECK-BE-HF-MICRO: "-internal-externc-isystem"
+// CHECK-BE-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
+// CHECK-BE-HF-MICRO: "{{.*}}ld{{(.exe)?}}"
+// CHECK-BE-HF-MICRO: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/micromips"
+// CHECK-BE-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/micromips/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-BE-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/micromips/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-BE-HF-MICRO: "[[TC]]/micromips{{/|\\\\}}crtbegin.o"
+// CHECK-BE-HF-MICRO: "-L[[TC]]/micromips"
+// CHECK-BE-HF-MICRO: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/micromips"
+// CHECK-BE-HF-MICRO-NOT: "-L[[TC]]"
+// CHECK-BE-HF-MICRO: "-L[[TC]]/../../../../mips-linux-gnu/libc/micromips/lib/../lib"
+// CHECK-BE-HF-MICRO: "-L[[TC]]/../../../../mips-linux-gnu/libc/micromips/usr/lib/../lib"
+// CHECK-BE-HF-MICRO: "[[TC]]/micromips{{/|\\\\}}crtend.o"
+// CHECK-BE-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/micromips/usr/lib/../lib{{/|\\\\}}crtn.o"
+//
+// = Big-endian, hard float, nan2008
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips-linux-gnu -mnan=2008 \
+// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
+// RUN: | FileCheck --check-prefix=CHECK-BE-HF-NAN %s
+// CHECK-BE-HF-NAN: "-internal-isystem"
+// CHECK-BE-HF-NAN: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
+// CHECK-BE-HF-NAN: "-internal-isystem"
+// CHECK-BE-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/nan2008"
+// CHECK-BE-HF-NAN: "-internal-isystem"
+// CHECK-BE-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
+// CHECK-BE-HF-NAN: "-internal-externc-isystem"
+// CHECK-BE-HF-NAN: "[[TC]]/include"
+// CHECK-BE-HF-NAN: "-internal-externc-isystem"
+// CHECK-BE-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
+// CHECK-BE-HF-NAN: "{{.*}}ld{{(.exe)?}}"
+// CHECK-BE-HF-NAN: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/nan2008"
+// CHECK-BE-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/libc/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-BE-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/libc/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-BE-HF-NAN: "[[TC]]/nan2008{{/|\\\\}}crtbegin.o"
+// CHECK-BE-HF-NAN: "-L[[TC]]/nan2008"
+// CHECK-BE-HF-NAN: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/nan2008"
+// CHECK-BE-HF-NAN-NOT: "-L[[TC]]"
+// CHECK-BE-HF-NAN: "-L[[TC]]/../../../../mips-linux-gnu/libc/nan2008/lib/../lib"
+// CHECK-BE-HF-NAN: "-L[[TC]]/../../../../mips-linux-gnu/libc/nan2008/usr/lib/../lib"
+// CHECK-BE-HF-NAN: "[[TC]]/nan2008{{/|\\\\}}crtend.o"
+// CHECK-BE-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/libc/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
+//
+// = Big-endian, soft float
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips-linux-gnu -msoft-float \
+// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
+// RUN: | FileCheck --check-prefix=CHECK-BE-SF-32 %s
+// CHECK-BE-SF-32: "-internal-isystem"
+// CHECK-BE-SF-32: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
+// CHECK-BE-SF-32: "-internal-isystem"
+// CHECK-BE-SF-32: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/soft-float"
+// CHECK-BE-SF-32: "-internal-isystem"
+// CHECK-BE-SF-32: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
+// CHECK-BE-SF-32: "-internal-externc-isystem"
+// CHECK-BE-SF-32: "[[TC]]/include"
+// CHECK-BE-SF-32: "-internal-externc-isystem"
+// CHECK-BE-SF-32: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
+// CHECK-BE-SF-32: "{{.*}}ld{{(.exe)?}}"
+// CHECK-BE-SF-32: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/soft-float"
+// CHECK-BE-SF-32: "[[TC]]/../../../../mips-linux-gnu/libc/soft-float/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-BE-SF-32: "[[TC]]/../../../../mips-linux-gnu/libc/soft-float/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-BE-SF-32: "[[TC]]/soft-float{{/|\\\\}}crtbegin.o"
+// CHECK-BE-SF-32: "-L[[TC]]/soft-float"
+// CHECK-BE-SF-32: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/soft-float"
+// CHECK-BE-SF-32-NOT: "-L[[TC]]"
+// CHECK-BE-SF-32: "-L[[TC]]/../../../../mips-linux-gnu/libc/soft-float/lib/../lib"
+// CHECK-BE-SF-32: "-L[[TC]]/../../../../mips-linux-gnu/libc/soft-float/usr/lib/../lib"
+// CHECK-BE-SF-32: "[[TC]]/soft-float{{/|\\\\}}crtend.o"
+// CHECK-BE-SF-32: "[[TC]]/../../../../mips-linux-gnu/libc/soft-float/usr/lib/../lib{{/|\\\\}}crtn.o"
+//
+// = Big-endian, soft float, mips16
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips-linux-gnu -msoft-float -mips16 \
+// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
+// RUN: | FileCheck --check-prefix=CHECK-BE-SF-16 %s
+// CHECK-BE-SF-16: "-internal-isystem"
+// CHECK-BE-SF-16: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
+// CHECK-BE-SF-16: "-internal-isystem"
+// CHECK-BE-SF-16: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/mips16/soft-float"
+// CHECK-BE-SF-16: "-internal-isystem"
+// CHECK-BE-SF-16: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
+// CHECK-BE-SF-16: "-internal-externc-isystem"
+// CHECK-BE-SF-16: "[[TC]]/include"
+// CHECK-BE-SF-16: "-internal-externc-isystem"
+// CHECK-BE-SF-16: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
+// CHECK-BE-SF-16: "{{.*}}ld{{(.exe)?}}"
+// CHECK-BE-SF-16: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/mips16/soft-float"
+// CHECK-BE-SF-16: "[[TC]]/../../../../mips-linux-gnu/libc/mips16/soft-float/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-BE-SF-16: "[[TC]]/../../../../mips-linux-gnu/libc/mips16/soft-float/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-BE-SF-16: "[[TC]]/mips16/soft-float{{/|\\\\}}crtbegin.o"
+// CHECK-BE-SF-16: "-L[[TC]]/mips16/soft-float"
+// CHECK-BE-SF-16: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/mips16/soft-float"
+// CHECK-BE-SF-16-NOT: "-L[[TC]]"
+// CHECK-BE-SF-16: "-L[[TC]]/../../../../mips-linux-gnu/libc/mips16/soft-float/lib/../lib"
+// CHECK-BE-SF-16: "-L[[TC]]/../../../../mips-linux-gnu/libc/mips16/soft-float/usr/lib/../lib"
+// CHECK-BE-SF-16: "[[TC]]/mips16/soft-float{{/|\\\\}}crtend.o"
+// CHECK-BE-SF-16: "[[TC]]/../../../../mips-linux-gnu/libc/mips16/soft-float/usr/lib/../lib{{/|\\\\}}crtn.o"
+//
+// = Big-endian, soft float, micromips
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips-linux-gnu -msoft-float -mmicromips \
+// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
+// RUN: | FileCheck --check-prefix=CHECK-BE-SF-MICRO %s
+// CHECK-BE-SF-MICRO: "-internal-isystem"
+// CHECK-BE-SF-MICRO: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
+// CHECK-BE-SF-MICRO: "-internal-isystem"
+// CHECK-BE-SF-MICRO: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/micromips/soft-float"
+// CHECK-BE-SF-MICRO: "-internal-isystem"
+// CHECK-BE-SF-MICRO: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
+// CHECK-BE-SF-MICRO: "-internal-externc-isystem"
+// CHECK-BE-SF-MICRO: "[[TC]]/include"
+// CHECK-BE-SF-MICRO: "-internal-externc-isystem"
+// CHECK-BE-SF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
+// CHECK-BE-SF-MICRO: "{{.*}}ld{{(.exe)?}}"
+// CHECK-BE-SF-MICRO: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/micromips/soft-float"
+// CHECK-BE-SF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/micromips/soft-float/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-BE-SF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/micromips/soft-float/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-BE-SF-MICRO: "[[TC]]/micromips/soft-float{{/|\\\\}}crtbegin.o"
+// CHECK-BE-SF-MICRO: "-L[[TC]]/micromips/soft-float"
+// CHECK-BE-SF-MICRO: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/micromips/soft-float"
+// CHECK-BE-SF-MICRO-NOT: "-L[[TC]]"
+// CHECK-BE-SF-MICRO: "-L[[TC]]/../../../../mips-linux-gnu/libc/micromips/soft-float/lib/../lib"
+// CHECK-BE-SF-MICRO: "-L[[TC]]/../../../../mips-linux-gnu/libc/micromips/soft-float/usr/lib/../lib"
+// CHECK-BE-SF-MICRO: "[[TC]]/micromips/soft-float{{/|\\\\}}crtend.o"
+// CHECK-BE-SF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/micromips/soft-float/usr/lib/../lib{{/|\\\\}}crtn.o"
+//
+// = Big-endian, hard float, 64-bit
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips64-linux-gnu \
+// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
+// RUN: | FileCheck --check-prefix=CHECK-BE-HF-64 %s
+// CHECK-BE-HF-64: "-internal-isystem"
+// CHECK-BE-HF-64: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
+// CHECK-BE-HF-64: "-internal-isystem"
+// CHECK-BE-HF-64: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/64"
+// CHECK-BE-HF-64: "-internal-isystem"
+// CHECK-BE-HF-64: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
+// CHECK-BE-HF-64: "-internal-externc-isystem"
+// CHECK-BE-HF-64: "[[TC]]/include"
+// CHECK-BE-HF-64: "-internal-externc-isystem"
+// CHECK-BE-HF-64: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
+// CHECK-BE-HF-64: "{{.*}}ld{{(.exe)?}}"
+// CHECK-BE-HF-64: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc"
+// CHECK-BE-HF-64: "[[TC]]/../../../../mips-linux-gnu/libc/usr/lib/../lib64{{/|\\\\}}crt1.o"
+// CHECK-BE-HF-64: "[[TC]]/../../../../mips-linux-gnu/libc/usr/lib/../lib64{{/|\\\\}}crti.o"
+// CHECK-BE-HF-64: "[[TC]]/64{{/|\\\\}}crtbegin.o"
+// CHECK-BE-HF-64: "-L[[TC]]/64"
+// CHECK-BE-HF-64: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib64"
+// CHECK-BE-HF-64: "-L[[TC]]/../../../../mips-linux-gnu/libc/lib/../lib64"
+// CHECK-BE-HF-64: "-L[[TC]]/../../../../mips-linux-gnu/libc/usr/lib/../lib64"
+// CHECK-BE-HF-64-NOT: "-L[[TC]]"
+// CHECK-BE-HF-64: "{{.*}}/lib/gcc/mips-linux-gnu/4.6.3/64{{/|\\\\}}crtend.o"
+// CHECK-BE-HF-64: "[[TC]]/../../../../mips-linux-gnu/libc/usr/lib/../lib64{{/|\\\\}}crtn.o"
+//
+// = Big-endian, soft float, 64-bit
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips64-linux-gnu -msoft-float \
+// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
+// RUN: | FileCheck --check-prefix=CHECK-BE-SF-64 %s
+// CHECK-BE-SF-64: "-internal-isystem"
+// CHECK-BE-SF-64: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
+// CHECK-BE-SF-64: "-internal-isystem"
+// CHECK-BE-SF-64: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/soft-float/64"
+// CHECK-BE-SF-64: "-internal-isystem"
+// CHECK-BE-SF-64: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
+// CHECK-BE-SF-64: "-internal-externc-isystem"
+// CHECK-BE-SF-64: "[[TC]]/include"
+// CHECK-BE-SF-64: "-internal-externc-isystem"
+// CHECK-BE-SF-64: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
+// CHECK-BE-SF-64: "{{.*}}ld{{(.exe)?}}"
+// CHECK-BE-SF-64: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/soft-float"
+// CHECK-BE-SF-64: "[[TC]]/../../../../mips-linux-gnu/libc/soft-float/usr/lib/../lib64{{/|\\\\}}crt1.o"
+// CHECK-BE-SF-64: "[[TC]]/../../../../mips-linux-gnu/libc/soft-float/usr/lib/../lib64{{/|\\\\}}crti.o"
+// CHECK-BE-SF-64: "[[TC]]/soft-float/64{{/|\\\\}}crtbegin.o"
+// CHECK-BE-SF-64: "-L[[TC]]/soft-float/64"
+// CHECK-BE-SF-64: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib64/soft-float"
+// CHECK-BE-SF-64: "-L[[TC]]/../../../../mips-linux-gnu/libc/soft-float/lib/../lib64"
+// CHECK-BE-SF-64: "-L[[TC]]/../../../../mips-linux-gnu/libc/soft-float/usr/lib/../lib64"
+// CHECK-BE-SF-64-NOT: "-L[[TC]]"
+// CHECK-BE-SF-64: "[[TC]]/soft-float/64{{/|\\\\}}crtend.o"
+// CHECK-BE-SF-64: "[[TC]]/../../../../mips-linux-gnu/libc/soft-float/usr/lib/../lib64{{/|\\\\}}crtn.o"
+//
+// = Little-endian, hard float
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mipsel-linux-gnu -mhard-float \
+// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
+// RUN: | FileCheck --check-prefix=CHECK-EL-HF-32 %s
+// CHECK-EL-HF-32: "-internal-isystem"
+// CHECK-EL-HF-32: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
+// CHECK-EL-HF-32: "-internal-isystem"
+// CHECK-EL-HF-32: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/el"
+// CHECK-EL-HF-32: "-internal-isystem"
+// CHECK-EL-HF-32: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
+// CHECK-EL-HF-32: "-internal-externc-isystem"
+// CHECK-EL-HF-32: "[[TC]]/include"
+// CHECK-EL-HF-32: "-internal-externc-isystem"
+// CHECK-EL-HF-32: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
+// CHECK-EL-HF-32: "{{.*}}ld{{(.exe)?}}"
+// CHECK-EL-HF-32: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/el"
+// CHECK-EL-HF-32: "[[TC]]/../../../../mips-linux-gnu/libc/el/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-EL-HF-32: "[[TC]]/../../../../mips-linux-gnu/libc/el/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-EL-HF-32: "[[TC]]/el{{/|\\\\}}crtbegin.o"
+// CHECK-EL-HF-32: "-L[[TC]]/el"
+// CHECK-EL-HF-32: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/el"
+// CHECK-EL-HF-32-NOT: "-L[[TC]]"
+// CHECK-EL-HF-32: "-L[[TC]]/../../../../mips-linux-gnu/libc/el/lib/../lib"
+// CHECK-EL-HF-32: "-L[[TC]]/../../../../mips-linux-gnu/libc/el/usr/lib/../lib"
+// CHECK-EL-HF-32: "[[TC]]/el{{/|\\\\}}crtend.o"
+// CHECK-EL-HF-32: "[[TC]]/../../../../mips-linux-gnu/libc/el/usr/lib/../lib{{/|\\\\}}crtn.o"
+//
+// = Little-endian, hard float, mips16
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mipsel-linux-gnu -mips16 \
+// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
+// RUN: | FileCheck --check-prefix=CHECK-EL-HF-16 %s
+// CHECK-EL-HF-16: "-internal-isystem"
+// CHECK-EL-HF-16: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
+// CHECK-EL-HF-16: "-internal-isystem"
+// CHECK-EL-HF-16: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/mips16/el"
+// CHECK-EL-HF-16: "-internal-isystem"
+// CHECK-EL-HF-16: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
+// CHECK-EL-HF-16: "-internal-externc-isystem"
+// CHECK-EL-HF-16: "[[TC]]/include"
+// CHECK-EL-HF-16: "-internal-externc-isystem"
+// CHECK-EL-HF-16: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
+// CHECK-EL-HF-16: "{{.*}}ld{{(.exe)?}}"
+// CHECK-EL-HF-16: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/mips16/el"
+// CHECK-EL-HF-16: "[[TC]]/../../../../mips-linux-gnu/libc/mips16/el/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-EL-HF-16: "[[TC]]/../../../../mips-linux-gnu/libc/mips16/el/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-EL-HF-16: "[[TC]]/mips16/el{{/|\\\\}}crtbegin.o"
+// CHECK-EL-HF-16: "-L[[TC]]/mips16/el"
+// CHECK-EL-HF-16: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/mips16/el"
+// CHECK-EL-HF-16-NOT: "-L[[TC]]"
+// CHECK-EL-HF-16: "-L[[TC]]/../../../../mips-linux-gnu/libc/mips16/el/lib/../lib"
+// CHECK-EL-HF-16: "-L[[TC]]/../../../../mips-linux-gnu/libc/mips16/el/usr/lib/../lib"
+// CHECK-EL-HF-16: "[[TC]]/mips16/el{{/|\\\\}}crtend.o"
+// CHECK-EL-HF-16: "[[TC]]/../../../../mips-linux-gnu/libc/mips16/el/usr/lib/../lib{{/|\\\\}}crtn.o"
+//
+// = Little-endian, hard float, micromips
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mipsel-linux-gnu -mmicromips \
+// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
+// RUN: | FileCheck --check-prefix=CHECK-EL-HF-MICRO %s
+// CHECK-EL-HF-MICRO: "-internal-isystem"
+// CHECK-EL-HF-MICRO: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
+// CHECK-EL-HF-MICRO: "-internal-isystem"
+// CHECK-EL-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/micromips/el"
+// CHECK-EL-HF-MICRO: "-internal-isystem"
+// CHECK-EL-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
+// CHECK-EL-HF-MICRO: "-internal-externc-isystem"
+// CHECK-EL-HF-MICRO: "[[TC]]/include"
+// CHECK-EL-HF-MICRO: "-internal-externc-isystem"
+// CHECK-EL-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
+// CHECK-EL-HF-MICRO: "{{.*}}ld{{(.exe)?}}"
+// CHECK-EL-HF-MICRO: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/micromips/el"
+// CHECK-EL-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/micromips/el/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-EL-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/micromips/el/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-EL-HF-MICRO: "[[TC]]/micromips/el{{/|\\\\}}crtbegin.o"
+// CHECK-EL-HF-MICRO: "-L[[TC]]/micromips/el"
+// CHECK-EL-HF-MICRO: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/micromips/el"
+// CHECK-EL-HF-MICRO-NOT: "-L[[TC]]"
+// CHECK-EL-HF-MICRO: "-L[[TC]]/../../../../mips-linux-gnu/libc/micromips/el/lib/../lib"
+// CHECK-EL-HF-MICRO: "-L[[TC]]/../../../../mips-linux-gnu/libc/micromips/el/usr/lib/../lib"
+// CHECK-EL-HF-MICRO: "[[TC]]/micromips/el{{/|\\\\}}crtend.o"
+// CHECK-EL-HF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/micromips/el/usr/lib/../lib{{/|\\\\}}crtn.o"
+//
+// = Little-endian, hard float, nan2008
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mipsel-linux-gnu -mnan=2008 \
+// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
+// RUN: | FileCheck --check-prefix=CHECK-EL-HF-NAN %s
+// CHECK-EL-HF-NAN: "-internal-isystem"
+// CHECK-EL-HF-NAN: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
+// CHECK-EL-HF-NAN: "-internal-isystem"
+// CHECK-EL-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/nan2008/el"
+// CHECK-EL-HF-NAN: "-internal-isystem"
+// CHECK-EL-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
+// CHECK-EL-HF-NAN: "-internal-externc-isystem"
+// CHECK-EL-HF-NAN: "[[TC]]/include"
+// CHECK-EL-HF-NAN: "-internal-externc-isystem"
+// CHECK-EL-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
+// CHECK-EL-HF-NAN: "{{.*}}ld{{(.exe)?}}"
+// CHECK-EL-HF-NAN: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/nan2008/el"
+// CHECK-EL-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/libc/nan2008/el/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-EL-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/libc/nan2008/el/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-EL-HF-NAN: "[[TC]]/nan2008/el{{/|\\\\}}crtbegin.o"
+// CHECK-EL-HF-NAN: "-L[[TC]]/nan2008/el"
+// CHECK-EL-HF-NAN: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/nan2008/el"
+// CHECK-EL-HF-NAN-NOT: "-L[[TC]]"
+// CHECK-EL-HF-NAN: "-L[[TC]]/../../../../mips-linux-gnu/libc/nan2008/el/lib/../lib"
+// CHECK-EL-HF-NAN: "-L[[TC]]/../../../../mips-linux-gnu/libc/nan2008/el/usr/lib/../lib"
+// CHECK-EL-HF-NAN: "[[TC]]/nan2008/el{{/|\\\\}}crtend.o"
+// CHECK-EL-HF-NAN: "[[TC]]/../../../../mips-linux-gnu/libc/nan2008/el/usr/lib/../lib{{/|\\\\}}crtn.o"
+//
+// = Little-endian, soft float
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mipsel-linux-gnu -mfloat-abi=soft \
+// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
+// RUN: | FileCheck --check-prefix=CHECK-EL-SF-32 %s
+// CHECK-EL-SF-32: "-internal-isystem"
+// CHECK-EL-SF-32: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
+// CHECK-EL-SF-32: "-internal-isystem"
+// CHECK-EL-SF-32: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/soft-float/el"
+// CHECK-EL-SF-32: "-internal-isystem"
+// CHECK-EL-SF-32: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
+// CHECK-EL-SF-32: "-internal-externc-isystem"
+// CHECK-EL-SF-32: "[[TC]]/include"
+// CHECK-EL-SF-32: "-internal-externc-isystem"
+// CHECK-EL-SF-32: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
+// CHECK-EL-SF-32: "{{.*}}ld{{(.exe)?}}"
+// CHECK-EL-SF-32: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/soft-float/el"
+// CHECK-EL-SF-32: "[[TC]]/../../../../mips-linux-gnu/libc/soft-float/el/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-EL-SF-32: "[[TC]]/../../../../mips-linux-gnu/libc/soft-float/el/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-EL-SF-32: "[[TC]]/soft-float/el{{/|\\\\}}crtbegin.o"
+// CHECK-EL-SF-32: "-L[[TC]]/soft-float/el"
+// CHECK-EL-SF-32: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/soft-float/el"
+// CHECK-EL-SF-32-NOT: "-L[[TC]]"
+// CHECK-EL-SF-32: "-L[[TC]]/../../../../mips-linux-gnu/libc/soft-float/el/lib/../lib"
+// CHECK-EL-SF-32: "-L[[TC]]/../../../../mips-linux-gnu/libc/soft-float/el/usr/lib/../lib"
+// CHECK-EL-SF-32: "[[TC]]/soft-float/el{{/|\\\\}}crtend.o"
+// CHECK-EL-SF-32: "[[TC]]/../../../../mips-linux-gnu/libc/soft-float/el/usr/lib/../lib{{/|\\\\}}crtn.o"
+//
+// = Little-endian, soft float, mips16
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mipsel-linux-gnu -mips16 -msoft-float \
+// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
+// RUN: | FileCheck --check-prefix=CHECK-EL-SF-16 %s
+// CHECK-EL-SF-16: "-internal-isystem"
+// CHECK-EL-SF-16: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
+// CHECK-EL-SF-16: "-internal-isystem"
+// CHECK-EL-SF-16: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/mips16/soft-float/el"
+// CHECK-EL-SF-16: "-internal-isystem"
+// CHECK-EL-SF-16: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
+// CHECK-EL-SF-16: "-internal-externc-isystem"
+// CHECK-EL-SF-16: "[[TC]]/include"
+// CHECK-EL-SF-16: "-internal-externc-isystem"
+// CHECK-EL-SF-16: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
+// CHECK-EL-SF-16: "{{.*}}ld{{(.exe)?}}"
+// CHECK-EL-SF-16: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/mips16/soft-float/el"
+// CHECK-EL-SF-16: "[[TC]]/../../../../mips-linux-gnu/libc/mips16/soft-float/el/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-EL-SF-16: "[[TC]]/../../../../mips-linux-gnu/libc/mips16/soft-float/el/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-EL-SF-16: "[[TC]]/mips16/soft-float/el{{/|\\\\}}crtbegin.o"
+// CHECK-EL-SF-16: "-L[[TC]]/mips16/soft-float/el"
+// CHECK-EL-SF-16: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/mips16/soft-float/el"
+// CHECK-EL-SF-16-NOT: "-L[[TC]]"
+// CHECK-EL-SF-16: "-L[[TC]]/../../../../mips-linux-gnu/libc/mips16/soft-float/el/lib/../lib"
+// CHECK-EL-SF-16: "-L[[TC]]/../../../../mips-linux-gnu/libc/mips16/soft-float/el/usr/lib/../lib"
+// CHECK-EL-SF-16: "[[TC]]/mips16/soft-float/el{{/|\\\\}}crtend.o"
+// CHECK-EL-SF-16: "[[TC]]/../../../../mips-linux-gnu/libc/mips16/soft-float/el/usr/lib/../lib{{/|\\\\}}crtn.o"
+//
+// = Little-endian, soft float, micromips
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mipsel-linux-gnu -mmicromips -msoft-float \
+// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
+// RUN: | FileCheck --check-prefix=CHECK-EL-SF-MICRO %s
+// CHECK-EL-SF-MICRO: "-internal-isystem"
+// CHECK-EL-SF-MICRO: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
+// CHECK-EL-SF-MICRO: "-internal-isystem"
+// CHECK-EL-SF-MICRO: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/micromips/soft-float/el"
+// CHECK-EL-SF-MICRO: "-internal-isystem"
+// CHECK-EL-SF-MICRO: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
+// CHECK-EL-SF-MICRO: "-internal-externc-isystem"
+// CHECK-EL-SF-MICRO: "[[TC]]/include"
+// CHECK-EL-SF-MICRO: "-internal-externc-isystem"
+// CHECK-EL-SF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
+// CHECK-EL-SF-MICRO: "{{.*}}ld{{(.exe)?}}"
+// CHECK-EL-SF-MICRO: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/micromips/soft-float/el"
+// CHECK-EL-SF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/micromips/soft-float/el/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-EL-SF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/micromips/soft-float/el/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-EL-SF-MICRO: "[[TC]]/micromips/soft-float/el{{/|\\\\}}crtbegin.o"
+// CHECK-EL-SF-MICRO: "-L[[TC]]/micromips/soft-float/el"
+// CHECK-EL-SF-MICRO: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib/micromips/soft-float/el"
+// CHECK-EL-SF-MICRO-NOT: "-L[[TC]]"
+// CHECK-EL-SF-MICRO: "-L[[TC]]/../../../../mips-linux-gnu/libc/micromips/soft-float/el/lib/../lib"
+// CHECK-EL-SF-MICRO: "-L[[TC]]/../../../../mips-linux-gnu/libc/micromips/soft-float/el/usr/lib/../lib"
+// CHECK-EL-SF-MICRO: "[[TC]]/micromips/soft-float/el{{/|\\\\}}crtend.o"
+// CHECK-EL-SF-MICRO: "[[TC]]/../../../../mips-linux-gnu/libc/micromips/soft-float/el/usr/lib/../lib{{/|\\\\}}crtn.o"
+//
+// = Little-endian, hard float, 64-bit
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips64el-linux-gnu \
+// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
+// RUN: | FileCheck --check-prefix=CHECK-EL-HF-64 %s
+// CHECK-EL-HF-64: "-internal-isystem"
+// CHECK-EL-HF-64: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
+// CHECK-EL-HF-64: "-internal-isystem"
+// CHECK-EL-HF-64: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/el/64"
+// CHECK-EL-HF-64: "-internal-isystem"
+// CHECK-EL-HF-64: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
+// CHECK-EL-HF-64: "-internal-externc-isystem"
+// CHECK-EL-HF-64: "[[TC]]/include"
+// CHECK-EL-HF-64: "-internal-externc-isystem"
+// CHECK-EL-HF-64: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
+// CHECK-EL-HF-64: "{{.*}}ld{{(.exe)?}}"
+// CHECK-EL-HF-64: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/el"
+// CHECK-EL-HF-64: "[[TC]]/../../../../mips-linux-gnu/libc/el/usr/lib/../lib64{{/|\\\\}}crt1.o"
+// CHECK-EL-HF-64: "[[TC]]/../../../../mips-linux-gnu/libc/el/usr/lib/../lib64{{/|\\\\}}crti.o"
+// CHECK-EL-HF-64: "[[TC]]/el/64{{/|\\\\}}crtbegin.o"
+// CHECK-EL-HF-64: "-L[[TC]]/el/64"
+// CHECK-EL-HF-64: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib64/el"
+// CHECK-EL-HF-64: "-L[[TC]]/../../../../mips-linux-gnu/libc/el/lib/../lib64"
+// CHECK-EL-HF-64: "-L[[TC]]/../../../../mips-linux-gnu/libc/el/usr/lib/../lib64"
+// CHECK-EL-HF-64-NOT: "-L[[TC]]"
+// CHECK-EL-HF-64: "[[TC]]/el/64{{/|\\\\}}crtend.o"
+// CHECK-EL-HF-64: "[[TC]]/../../../../mips-linux-gnu/libc/el/usr/lib/../lib64{{/|\\\\}}crtn.o"
+//
+// = Little-endian, soft float, 64-bit
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips64el-linux-gnu -msoft-float \
+// RUN: --gcc-toolchain=%S/Inputs/mips_cs_tree \
+// RUN: | FileCheck --check-prefix=CHECK-EL-SF-64 %s
+// CHECK-EL-SF-64: "-internal-isystem"
+// CHECK-EL-SF-64: "[[TC:[^"]+/lib/gcc/mips-linux-gnu/4.6.3]]/../../../../mips-linux-gnu/include/c++/4.6.3"
+// CHECK-EL-SF-64: "-internal-isystem"
+// CHECK-EL-SF-64: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/mips-linux-gnu/soft-float/el/64"
+// CHECK-EL-SF-64: "-internal-isystem"
+// CHECK-EL-SF-64: "[[TC]]/../../../../mips-linux-gnu/include/c++/4.6.3/backward"
+// CHECK-EL-SF-64: "-internal-externc-isystem"
+// CHECK-EL-SF-64: "[[TC]]/include"
+// CHECK-EL-SF-64: "-internal-externc-isystem"
+// CHECK-EL-SF-64: "[[TC]]/../../../../mips-linux-gnu/libc/usr/include"
+// CHECK-EL-SF-64: "{{.*}}ld{{(.exe)?}}"
+// CHECK-EL-SF-64: "--sysroot=[[TC]]/../../../../mips-linux-gnu/libc/soft-float/el"
+// CHECK-EL-SF-64: "[[TC]]/../../../../mips-linux-gnu/libc/soft-float/el/usr/lib/../lib64{{/|\\\\}}crt1.o"
+// CHECK-EL-SF-64: "[[TC]]/../../../../mips-linux-gnu/libc/soft-float/el/usr/lib/../lib64{{/|\\\\}}crti.o"
+// CHECK-EL-SF-64: "[[TC]]/soft-float/el/64{{/|\\\\}}crtbegin.o"
+// CHECK-EL-SF-64: "-L[[TC]]/soft-float/el/64"
+// CHECK-EL-SF-64: "-L[[TC]]/../../../../mips-linux-gnu/lib/../lib64/soft-float/el"
+// CHECK-EL-SF-64: "-L[[TC]]/../../../../mips-linux-gnu/libc/soft-float/el/lib/../lib64"
+// CHECK-EL-SF-64: "-L[[TC]]/../../../../mips-linux-gnu/libc/soft-float/el/usr/lib/../lib64"
+// CHECK-EL-SF-64-NOT: "-L[[TC]]"
+// CHECK-EL-SF-64: "[[TC]]/soft-float/el/64{{/|\\\\}}crtend.o"
+// CHECK-EL-SF-64: "[[TC]]/../../../../mips-linux-gnu/libc/soft-float/el/usr/lib/../lib64{{/|\\\\}}crtn.o"
diff --git a/test/Driver/mips-eleb.c b/test/Driver/mips-eleb.c
index 6ea49be3c358..aaa80e0c0908 100644
--- a/test/Driver/mips-eleb.c
+++ b/test/Driver/mips-eleb.c
@@ -4,26 +4,30 @@
// RUN: -EL -no-integrated-as %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS32-EL %s
// MIPS32-EL: "{{.*}}clang{{.*}}" "-cc1" "-triple" "mipsel-unknown-linux-gnu"
-// MIPS32-EL: "{{.*}}as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EL"
+// MIPS32-EL: "{{.*}}as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32"
+// MIPS32-EL: "-EL"
// MIPS32-EL: "{{.*}}ld{{(.exe)?}}" {{.*}} "-m" "elf32ltsmip"
//
// RUN: %clang -no-canonical-prefixes -target mips64-unknown-linux-gnu -### \
// RUN: -EL -no-integrated-as %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS64-EL %s
// MIPS64-EL: "{{.*}}clang{{.*}}" "-cc1" "-triple" "mips64el-unknown-linux-gnu"
-// MIPS64-EL: "{{.*}}as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-EL"
+// MIPS64-EL: "{{.*}}as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64"
+// MIPS64-EL: "-EL"
// MIPS64-EL: "{{.*}}ld{{(.exe)?}}" {{.*}} "-m" "elf64ltsmip"
//
// RUN: %clang -no-canonical-prefixes -target mipsel-unknown-linux-gnu -### \
// RUN: -EB -no-integrated-as %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS32-EB %s
// MIPS32-EB: "{{.*}}clang{{.*}}" "-cc1" "-triple" "mips-unknown-linux-gnu"
-// MIPS32-EB: "{{.*}}as{{(.exe)?}}" "-march" "mips32" "-mabi" "32" "-EB"
+// MIPS32-EB: "{{.*}}as{{(.exe)?}}" "-march" "mips32r2" "-mabi" "32"
+// MIPS32-EB: "-EB"
// MIPS32-EB: "{{.*}}ld{{(.exe)?}}" {{.*}} "-m" "elf32btsmip"
//
// RUN: %clang -no-canonical-prefixes -target mips64el-unknown-linux-gnu -### \
// RUN: -EB -no-integrated-as %s 2>&1 \
// RUN: | FileCheck -check-prefix=MIPS64-EB %s
// MIPS64-EB: "{{.*}}clang{{.*}}" "-cc1" "-triple" "mips64-unknown-linux-gnu"
-// MIPS64-EB: "{{.*}}as{{(.exe)?}}" "-march" "mips64" "-mabi" "64" "-EB"
+// MIPS64-EB: "{{.*}}as{{(.exe)?}}" "-march" "mips64r2" "-mabi" "64"
+// MIPS64-EB: "-EB"
// MIPS64-EB: "{{.*}}ld{{(.exe)?}}" {{.*}} "-m" "elf64btsmip"
diff --git a/test/Driver/mips-features.c b/test/Driver/mips-features.c
index d663e6651e53..03cc0fd7e368 100644
--- a/test/Driver/mips-features.c
+++ b/test/Driver/mips-features.c
@@ -60,6 +60,28 @@
// RUN: | FileCheck --check-prefix=CHECK-NOMMSA %s
// CHECK-NOMMSA: "-target-feature" "-msa"
//
+// -modd-spreg
+// RUN: %clang -target mips-linux-gnu -### -c %s -mno-odd-spreg -modd-spreg 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-MODDSPREG %s
+// CHECK-MODDSPREG: "-target-feature" "-nooddspreg"
+//
+// -mno-odd-spreg
+// RUN: %clang -target mips-linux-gnu -### -c %s -modd-spreg -mno-odd-spreg 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-NOMODDSPREG %s
+// CHECK-NOMODDSPREG: "-target-feature" "+nooddspreg"
+//
+// -mfpxx
+// RUN: %clang -target mips-linux-gnu -### -c %s -mfpxx 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-MFPXX %s
+// CHECK-MFPXX: "-target-feature" "+fpxx"
+// CHECK-MFPXX: "-target-feature" "+nooddspreg"
+//
+// -mfpxx -modd-spreg
+// RUN: %clang -target mips-linux-gnu -### -c %s -mfpxx -modd-spreg 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-MFPXX-ODDSPREG %s
+// CHECK-MFPXX-ODDSPREG: "-target-feature" "+fpxx"
+// CHECK-MFPXX-ODDSPREG: "-target-feature" "-nooddspreg"
+//
// -mfp64
// RUN: %clang -target mips-linux-gnu -### -c %s \
// RUN: -mfp32 -mfp64 2>&1 \
@@ -72,6 +94,18 @@
// RUN: | FileCheck --check-prefix=CHECK-NOMFP64 %s
// CHECK-NOMFP64: "-target-feature" "-fp64"
//
+// -mnan=2008
+// RUN: %clang -target mips-linux-gnu -### -c %s \
+// RUN: -mnan=legacy -mnan=2008 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-NAN2008 %s
+// CHECK-NAN2008: "-target-feature" "+nan2008"
+//
+// -mnan=legacy
+// RUN: %clang -target mips-linux-gnu -### -c %s \
+// RUN: -mnan=2008 -mnan=legacy 2>&1 \
+// RUN: | FileCheck --check-prefix=CHECK-NANLEGACY %s
+// CHECK-NANLEGACY: "-target-feature" "-nan2008"
+//
// -mxgot
// RUN: %clang -target mips-linux-gnu -### -c %s \
// RUN: -mno-xgot -mxgot 2>&1 \
diff --git a/test/Driver/mips-float.c b/test/Driver/mips-float.c
index ad2106a00e81..162107567298 100644
--- a/test/Driver/mips-float.c
+++ b/test/Driver/mips-float.c
@@ -60,23 +60,22 @@
// RUN: %clang -c %s -### -o %t.o 2>&1 \
// RUN: -target mips-linux-gnu -mips16 \
// RUN: | FileCheck --check-prefix=CHECK-DEF-MIPS16 %s
-// CHECK-DEF-MIPS16: "-mfloat-abi" "soft"
-// CHECK-DEF-MIPS16: "-mllvm" "-mips16-hard-float"
+// CHECK-DEF-MIPS16: "-target-feature" "+mips16"
+// CHECK-DEF-MIPS16: "-mfloat-abi" "hard"
//
// -mhard-float -mips16
// RUN: %clang -c %s -### -o %t.o 2>&1 \
// RUN: -target mips-linux-gnu -mhard-float -mips16 \
// RUN: | FileCheck --check-prefix=CHECK-HARD-MIPS16 %s
-// CHECK-HARD-MIPS16: "-target-feature" "+soft-float"
-// CHECK-HARD-MIPS16: "-msoft-float"
-// CHECK-HARD-MIPS16: "-mfloat-abi" "soft"
-// CHECK-HARD-MIPS16: "-mllvm" "-mips16-hard-float"
+// CHECK-HARD-MIPS16: "-target-feature" "+mips16"
+// CHECK-HARD-MIPS16: "-mfloat-abi" "hard"
//
// -msoft-float -mips16
// RUN: %clang -c %s -### -o %t.o 2>&1 \
// RUN: -target mips-linux-gnu -msoft-float -mips16 \
// RUN: | FileCheck --check-prefix=CHECK-SOFT-MIPS16 %s
// CHECK-SOFT-MIPS16: "-target-feature" "+soft-float"
+// CHECK-SOFT-MIPS16: "-target-feature" "+mips16"
// CHECK-SOFT-MIPS16: "-msoft-float"
// CHECK-SOFT-MIPS16: "-mfloat-abi" "soft"
//
@@ -84,15 +83,14 @@
// RUN: %clang -c %s -### -o %t.o 2>&1 \
// RUN: -target mips-linux-gnu -mfloat-abi=hard -mips16 \
// RUN: | FileCheck --check-prefix=CHECK-ABI-HARD-MIPS16 %s
-// CHECK-ABI-HARD-MIPS16: "-target-feature" "+soft-float"
-// CHECK-ABI-HARD-MIPS16: "-msoft-float"
-// CHECK-ABI-HARD-MIPS16: "-mfloat-abi" "soft"
-// CHECK-ABI-HARD-MIPS16: "-mllvm" "-mips16-hard-float"
+// CHECK-ABI-HARD-MIPS16: "-target-feature" "+mips16"
+// CHECK-ABI-HARD-MIPS16: "-mfloat-abi" "hard"
//
// -mfloat-abi=soft -mips16
// RUN: %clang -c %s -### -o %t.o 2>&1 \
// RUN: -target mips-linux-gnu -mfloat-abi=soft -mips16 \
// RUN: | FileCheck --check-prefix=CHECK-ABI-SOFT-MIPS16 %s
// CHECK-ABI-SOFT-MIPS16: "-target-feature" "+soft-float"
+// CHECK-ABI-SOFT-MIPS16: "-target-feature" "+mips16"
// CHECK-ABI-SOFT-MIPS16: "-msoft-float"
// CHECK-ABI-SOFT-MIPS16: "-mfloat-abi" "soft"
diff --git a/test/Driver/mips-fsf.cpp b/test/Driver/mips-fsf.cpp
index b9fb11fd7c72..4520aec88619 100644
--- a/test/Driver/mips-fsf.cpp
+++ b/test/Driver/mips-fsf.cpp
@@ -16,13 +16,13 @@
// CHECK-BE-HF-32: "-internal-externc-isystem"
// CHECK-BE-HF-32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-HF-32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-HF-32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips32"
+// CHECK-BE-HF-32: "--sysroot=[[TC]]/../../../../sysroot/mips32"
// CHECK-BE-HF-32: "[[TC]]/../../../../sysroot/mips32/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-BE-HF-32: "[[TC]]/../../../../sysroot/mips32/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-BE-HF-32: "[[TC]]/mips32{{/|\\\\}}crtbegin.o"
-// CHECK-BE-HF-32: "-L[[SR]]/mips32"
-// CHECK-BE-HF-32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32"
-// CHECK-BE-HF-32: "-L[[SR]]/../../../../sysroot/mips32/usr/lib/../lib"
+// CHECK-BE-HF-32: "-L[[TC]]/mips32"
+// CHECK-BE-HF-32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32"
+// CHECK-BE-HF-32: "-L[[TC]]/../../../../sysroot/mips32/usr/lib/../lib"
// CHECK-BE-HF-32: "[[TC]]/mips32{{/|\\\\}}crtend.o"
// CHECK-BE-HF-32: "[[TC]]/../../../../sysroot/mips32/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -34,7 +34,7 @@
// CHECK-BE-HF64-32: "-internal-isystem"
// CHECK-BE-HF64-32: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-BE-HF64-32: "-internal-isystem"
-// CHECK-BE-HF64-32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips32/fp64"
+// CHECK-BE-HF64-32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips32"
// CHECK-BE-HF64-32: "-internal-isystem"
// CHECK-BE-HF64-32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-BE-HF64-32: "-internal-externc-isystem"
@@ -42,15 +42,15 @@
// CHECK-BE-HF64-32: "-internal-externc-isystem"
// CHECK-BE-HF64-32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-HF64-32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-HF64-32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips32/fp64"
-// CHECK-BE-HF64-32: "[[TC]]/../../../../sysroot/mips32/fp64/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-BE-HF64-32: "[[TC]]/../../../../sysroot/mips32/fp64/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-BE-HF64-32: "[[TC]]/mips32/fp64{{/|\\\\}}crtbegin.o"
-// CHECK-BE-HF64-32: "-L[[SR]]/mips32/fp64"
-// CHECK-BE-HF64-32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/fp64"
-// CHECK-BE-HF64-32: "-L[[SR]]/../../../../sysroot/mips32/fp64/usr/lib/../lib"
-// CHECK-BE-HF64-32: "[[TC]]/mips32/fp64{{/|\\\\}}crtend.o"
-// CHECK-BE-HF64-32: "[[TC]]/../../../../sysroot/mips32/fp64/usr/lib/../lib{{/|\\\\}}crtn.o"
+// CHECK-BE-HF64-32: "--sysroot=[[TC]]/../../../../sysroot/mips32"
+// CHECK-BE-HF64-32: "[[TC]]/../../../../sysroot/mips32/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-BE-HF64-32: "[[TC]]/../../../../sysroot/mips32/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-BE-HF64-32: "[[TC]]/mips32{{/|\\\\}}crtbegin.o"
+// CHECK-BE-HF64-32: "-L[[TC]]/mips32"
+// CHECK-BE-HF64-32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32"
+// CHECK-BE-HF64-32: "-L[[TC]]/../../../../sysroot/mips32/usr/lib/../lib"
+// CHECK-BE-HF64-32: "[[TC]]/mips32{{/|\\\\}}crtend.o"
+// CHECK-BE-HF64-32: "[[TC]]/../../../../sysroot/mips32/usr/lib/../lib{{/|\\\\}}crtn.o"
//
// = Big-endian, mips32, soft float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -68,13 +68,13 @@
// CHECK-BE-SF-32: "-internal-externc-isystem"
// CHECK-BE-SF-32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-SF-32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-SF-32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips32/sof"
+// CHECK-BE-SF-32: "--sysroot=[[TC]]/../../../../sysroot/mips32/sof"
// CHECK-BE-SF-32: "[[TC]]/../../../../sysroot/mips32/sof/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-BE-SF-32: "[[TC]]/../../../../sysroot/mips32/sof/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-BE-SF-32: "[[TC]]/mips32/sof{{/|\\\\}}crtbegin.o"
-// CHECK-BE-SF-32: "-L[[SR]]/mips32/sof"
-// CHECK-BE-SF-32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/sof"
-// CHECK-BE-SF-32: "-L[[SR]]/../../../../sysroot/mips32/sof/usr/lib/../lib"
+// CHECK-BE-SF-32: "-L[[TC]]/mips32/sof"
+// CHECK-BE-SF-32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/sof"
+// CHECK-BE-SF-32: "-L[[TC]]/../../../../sysroot/mips32/sof/usr/lib/../lib"
// CHECK-BE-SF-32: "[[TC]]/mips32/sof{{/|\\\\}}crtend.o"
// CHECK-BE-SF-32: "[[TC]]/../../../../sysroot/mips32/sof/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -94,13 +94,13 @@
// CHECK-BE-HF-16: "-internal-externc-isystem"
// CHECK-BE-HF-16: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-HF-16: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-HF-16: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips32/mips16"
+// CHECK-BE-HF-16: "--sysroot=[[TC]]/../../../../sysroot/mips32/mips16"
// CHECK-BE-HF-16: "[[TC]]/../../../../sysroot/mips32/mips16/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-BE-HF-16: "[[TC]]/../../../../sysroot/mips32/mips16/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-BE-HF-16: "[[TC]]/mips32/mips16{{/|\\\\}}crtbegin.o"
-// CHECK-BE-HF-16: "-L[[SR]]/mips32/mips16"
-// CHECK-BE-HF-16: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/mips16"
-// CHECK-BE-HF-16: "-L[[SR]]/../../../../sysroot/mips32/mips16/usr/lib/../lib"
+// CHECK-BE-HF-16: "-L[[TC]]/mips32/mips16"
+// CHECK-BE-HF-16: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/mips16"
+// CHECK-BE-HF-16: "-L[[TC]]/../../../../sysroot/mips32/mips16/usr/lib/../lib"
// CHECK-BE-HF-16: "[[TC]]/mips32/mips16{{/|\\\\}}crtend.o"
// CHECK-BE-HF-16: "[[TC]]/../../../../sysroot/mips32/mips16/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -112,7 +112,7 @@
// CHECK-BE-HF64-16: "-internal-isystem"
// CHECK-BE-HF64-16: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-BE-HF64-16: "-internal-isystem"
-// CHECK-BE-HF64-16: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips32/mips16/fp64"
+// CHECK-BE-HF64-16: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips32/mips16"
// CHECK-BE-HF64-16: "-internal-isystem"
// CHECK-BE-HF64-16: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-BE-HF64-16: "-internal-externc-isystem"
@@ -120,15 +120,15 @@
// CHECK-BE-HF64-16: "-internal-externc-isystem"
// CHECK-BE-HF64-16: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-HF64-16: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-HF64-16: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips32/mips16/fp64"
-// CHECK-BE-HF64-16: "[[TC]]/../../../../sysroot/mips32/mips16/fp64/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-BE-HF64-16: "[[TC]]/../../../../sysroot/mips32/mips16/fp64/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-BE-HF64-16: "[[TC]]/mips32/mips16/fp64{{/|\\\\}}crtbegin.o"
-// CHECK-BE-HF64-16: "-L[[SR]]/mips32/mips16/fp64"
-// CHECK-BE-HF64-16: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/mips16/fp64"
-// CHECK-BE-HF64-16: "-L[[SR]]/../../../../sysroot/mips32/mips16/fp64/usr/lib/../lib"
-// CHECK-BE-HF64-16: "[[TC]]/mips32/mips16/fp64{{/|\\\\}}crtend.o"
-// CHECK-BE-HF64-16: "[[TC]]/../../../../sysroot/mips32/mips16/fp64/usr/lib/../lib{{/|\\\\}}crtn.o"
+// CHECK-BE-HF64-16: "--sysroot=[[TC]]/../../../../sysroot/mips32/mips16"
+// CHECK-BE-HF64-16: "[[TC]]/../../../../sysroot/mips32/mips16/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-BE-HF64-16: "[[TC]]/../../../../sysroot/mips32/mips16/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-BE-HF64-16: "[[TC]]/mips32/mips16{{/|\\\\}}crtbegin.o"
+// CHECK-BE-HF64-16: "-L[[TC]]/mips32/mips16"
+// CHECK-BE-HF64-16: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/mips16"
+// CHECK-BE-HF64-16: "-L[[TC]]/../../../../sysroot/mips32/mips16/usr/lib/../lib"
+// CHECK-BE-HF64-16: "[[TC]]/mips32/mips16{{/|\\\\}}crtend.o"
+// CHECK-BE-HF64-16: "[[TC]]/../../../../sysroot/mips32/mips16/usr/lib/../lib{{/|\\\\}}crtn.o"
//
// = Big-endian, mips16 / mips32, soft float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -146,13 +146,13 @@
// CHECK-BE-SF-16: "-internal-externc-isystem"
// CHECK-BE-SF-16: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-SF-16: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-SF-16: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips32/mips16/sof"
+// CHECK-BE-SF-16: "--sysroot=[[TC]]/../../../../sysroot/mips32/mips16/sof"
// CHECK-BE-SF-16: "[[TC]]/../../../../sysroot/mips32/mips16/sof/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-BE-SF-16: "[[TC]]/../../../../sysroot/mips32/mips16/sof/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-BE-SF-16: "[[TC]]/mips32/mips16/sof{{/|\\\\}}crtbegin.o"
-// CHECK-BE-SF-16: "-L[[SR]]/mips32/mips16/sof"
-// CHECK-BE-SF-16: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/mips16/sof"
-// CHECK-BE-SF-16: "-L[[SR]]/../../../../sysroot/mips32/mips16/sof/usr/lib/../lib"
+// CHECK-BE-SF-16: "-L[[TC]]/mips32/mips16/sof"
+// CHECK-BE-SF-16: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/mips16/sof"
+// CHECK-BE-SF-16: "-L[[TC]]/../../../../sysroot/mips32/mips16/sof/usr/lib/../lib"
// CHECK-BE-SF-16: "[[TC]]/mips32/mips16/sof{{/|\\\\}}crtend.o"
// CHECK-BE-SF-16: "[[TC]]/../../../../sysroot/mips32/mips16/sof/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -172,13 +172,13 @@
// CHECK-BE-NAN-16: "-internal-externc-isystem"
// CHECK-BE-NAN-16: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-NAN-16: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-NAN-16: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips32/mips16/nan2008"
+// CHECK-BE-NAN-16: "--sysroot=[[TC]]/../../../../sysroot/mips32/mips16/nan2008"
// CHECK-BE-NAN-16: "[[TC]]/../../../../sysroot/mips32/mips16/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-BE-NAN-16: "[[TC]]/../../../../sysroot/mips32/mips16/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-BE-NAN-16: "[[TC]]/mips32/mips16/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-BE-NAN-16: "-L[[SR]]/mips32/mips16/nan2008"
-// CHECK-BE-NAN-16: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/mips16/nan2008"
-// CHECK-BE-NAN-16: "-L[[SR]]/../../../../sysroot/mips32/mips16/nan2008/usr/lib/../lib"
+// CHECK-BE-NAN-16: "-L[[TC]]/mips32/mips16/nan2008"
+// CHECK-BE-NAN-16: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/mips16/nan2008"
+// CHECK-BE-NAN-16: "-L[[TC]]/../../../../sysroot/mips32/mips16/nan2008/usr/lib/../lib"
// CHECK-BE-NAN-16: "[[TC]]/mips32/mips16/nan2008{{/|\\\\}}crtend.o"
// CHECK-BE-NAN-16: "[[TC]]/../../../../sysroot/mips32/mips16/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -190,7 +190,7 @@
// CHECK-BE-NAN64-16: "-internal-isystem"
// CHECK-BE-NAN64-16: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-BE-NAN64-16: "-internal-isystem"
-// CHECK-BE-NAN64-16: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips32/mips16/fp64/nan2008"
+// CHECK-BE-NAN64-16: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips32/mips16/nan2008"
// CHECK-BE-NAN64-16: "-internal-isystem"
// CHECK-BE-NAN64-16: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-BE-NAN64-16: "-internal-externc-isystem"
@@ -198,15 +198,15 @@
// CHECK-BE-NAN64-16: "-internal-externc-isystem"
// CHECK-BE-NAN64-16: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-NAN64-16: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-NAN64-16: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips32/mips16/fp64/nan2008"
-// CHECK-BE-NAN64-16: "[[TC]]/../../../../sysroot/mips32/mips16/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-BE-NAN64-16: "[[TC]]/../../../../sysroot/mips32/mips16/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-BE-NAN64-16: "[[TC]]/mips32/mips16/fp64/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-BE-NAN64-16: "-L[[SR]]/mips32/mips16/fp64/nan2008"
-// CHECK-BE-NAN64-16: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/mips16/fp64/nan2008"
-// CHECK-BE-NAN64-16: "-L[[SR]]/../../../../sysroot/mips32/mips16/fp64/nan2008/usr/lib/../lib"
-// CHECK-BE-NAN64-16: "[[TC]]/mips32/mips16/fp64/nan2008{{/|\\\\}}crtend.o"
-// CHECK-BE-NAN64-16: "[[TC]]/../../../../sysroot/mips32/mips16/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
+// CHECK-BE-NAN64-16: "--sysroot=[[TC]]/../../../../sysroot/mips32/mips16/nan2008"
+// CHECK-BE-NAN64-16: "[[TC]]/../../../../sysroot/mips32/mips16/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-BE-NAN64-16: "[[TC]]/../../../../sysroot/mips32/mips16/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-BE-NAN64-16: "[[TC]]/mips32/mips16/nan2008{{/|\\\\}}crtbegin.o"
+// CHECK-BE-NAN64-16: "-L[[TC]]/mips32/mips16/nan2008"
+// CHECK-BE-NAN64-16: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/mips16/nan2008"
+// CHECK-BE-NAN64-16: "-L[[TC]]/../../../../sysroot/mips32/mips16/nan2008/usr/lib/../lib"
+// CHECK-BE-NAN64-16: "[[TC]]/mips32/mips16/nan2008{{/|\\\\}}crtend.o"
+// CHECK-BE-NAN64-16: "[[TC]]/../../../../sysroot/mips32/mips16/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
//
// = Big-endian, mips32, nan2008
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -224,13 +224,13 @@
// CHECK-BE-NAN-32: "-internal-externc-isystem"
// CHECK-BE-NAN-32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-NAN-32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-NAN-32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips32/nan2008"
+// CHECK-BE-NAN-32: "--sysroot=[[TC]]/../../../../sysroot/mips32/nan2008"
// CHECK-BE-NAN-32: "[[TC]]/../../../../sysroot/mips32/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-BE-NAN-32: "[[TC]]/../../../../sysroot/mips32/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-BE-NAN-32: "[[TC]]/mips32/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-BE-NAN-32: "-L[[SR]]/mips32/nan2008"
-// CHECK-BE-NAN-32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/nan2008"
-// CHECK-BE-NAN-32: "-L[[SR]]/../../../../sysroot/mips32/nan2008/usr/lib/../lib"
+// CHECK-BE-NAN-32: "-L[[TC]]/mips32/nan2008"
+// CHECK-BE-NAN-32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/nan2008"
+// CHECK-BE-NAN-32: "-L[[TC]]/../../../../sysroot/mips32/nan2008/usr/lib/../lib"
// CHECK-BE-NAN-32: "[[TC]]/mips32/nan2008{{/|\\\\}}crtend.o"
// CHECK-BE-NAN-32: "[[TC]]/../../../../sysroot/mips32/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -242,7 +242,7 @@
// CHECK-BE-NAN64-32: "-internal-isystem"
// CHECK-BE-NAN64-32: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-BE-NAN64-32: "-internal-isystem"
-// CHECK-BE-NAN64-32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips32/fp64/nan2008"
+// CHECK-BE-NAN64-32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips32/nan2008"
// CHECK-BE-NAN64-32: "-internal-isystem"
// CHECK-BE-NAN64-32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-BE-NAN64-32: "-internal-externc-isystem"
@@ -250,15 +250,15 @@
// CHECK-BE-NAN64-32: "-internal-externc-isystem"
// CHECK-BE-NAN64-32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-NAN64-32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-NAN64-32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips32/fp64/nan2008"
-// CHECK-BE-NAN64-32: "[[TC]]/../../../../sysroot/mips32/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-BE-NAN64-32: "[[TC]]/../../../../sysroot/mips32/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-BE-NAN64-32: "[[TC]]/mips32/fp64/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-BE-NAN64-32: "-L[[SR]]/mips32/fp64/nan2008"
-// CHECK-BE-NAN64-32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/fp64/nan2008"
-// CHECK-BE-NAN64-32: "-L[[SR]]/../../../../sysroot/mips32/fp64/nan2008/usr/lib/../lib"
-// CHECK-BE-NAN64-32: "[[TC]]/mips32/fp64/nan2008{{/|\\\\}}crtend.o"
-// CHECK-BE-NAN64-32: "[[TC]]/../../../../sysroot/mips32/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
+// CHECK-BE-NAN64-32: "--sysroot=[[TC]]/../../../../sysroot/mips32/nan2008"
+// CHECK-BE-NAN64-32: "[[TC]]/../../../../sysroot/mips32/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-BE-NAN64-32: "[[TC]]/../../../../sysroot/mips32/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-BE-NAN64-32: "[[TC]]/mips32/nan2008{{/|\\\\}}crtbegin.o"
+// CHECK-BE-NAN64-32: "-L[[TC]]/mips32/nan2008"
+// CHECK-BE-NAN64-32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/nan2008"
+// CHECK-BE-NAN64-32: "-L[[TC]]/../../../../sysroot/mips32/nan2008/usr/lib/../lib"
+// CHECK-BE-NAN64-32: "[[TC]]/mips32/nan2008{{/|\\\\}}crtend.o"
+// CHECK-BE-NAN64-32: "[[TC]]/../../../../sysroot/mips32/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
//
// = Big-endian, mips32r2, hard float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -276,13 +276,13 @@
// CHECK-BE-HF-32R2: "-internal-externc-isystem"
// CHECK-BE-HF-32R2: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-HF-32R2: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-HF-32R2: "--sysroot=[[SR:[^"]+]]/../../../../sysroot"
+// CHECK-BE-HF-32R2: "--sysroot=[[TC]]/../../../../sysroot"
// CHECK-BE-HF-32R2: "[[TC]]/../../../../sysroot/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-BE-HF-32R2: "[[TC]]/../../../../sysroot/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-BE-HF-32R2: "[[TC]]{{/|\\\\}}crtbegin.o"
-// CHECK-BE-HF-32R2: "-L[[SR]]"
-// CHECK-BE-HF-32R2: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib"
-// CHECK-BE-HF-32R2: "-L[[SR]]/../../../../sysroot/usr/lib/../lib"
+// CHECK-BE-HF-32R2: "-L[[TC]]"
+// CHECK-BE-HF-32R2: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib"
+// CHECK-BE-HF-32R2: "-L[[TC]]/../../../../sysroot/usr/lib/../lib"
// CHECK-BE-HF-32R2: "[[TC]]{{/|\\\\}}crtend.o"
// CHECK-BE-HF-32R2: "[[TC]]/../../../../sysroot/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -294,7 +294,7 @@
// CHECK-BE-HF64-32R2: "-internal-isystem"
// CHECK-BE-HF64-32R2: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-BE-HF64-32R2: "-internal-isystem"
-// CHECK-BE-HF64-32R2: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/fp64"
+// CHECK-BE-HF64-32R2: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu"
// CHECK-BE-HF64-32R2: "-internal-isystem"
// CHECK-BE-HF64-32R2: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-BE-HF64-32R2: "-internal-externc-isystem"
@@ -302,15 +302,15 @@
// CHECK-BE-HF64-32R2: "-internal-externc-isystem"
// CHECK-BE-HF64-32R2: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-HF64-32R2: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-HF64-32R2: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/fp64"
-// CHECK-BE-HF64-32R2: "[[TC]]/../../../../sysroot/fp64/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-BE-HF64-32R2: "[[TC]]/../../../../sysroot/fp64/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-BE-HF64-32R2: "[[TC]]/fp64{{/|\\\\}}crtbegin.o"
-// CHECK-BE-HF64-32R2: "-L[[SR]]/fp64"
-// CHECK-BE-HF64-32R2: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/fp64"
-// CHECK-BE-HF64-32R2: "-L[[SR]]/../../../../sysroot/fp64/usr/lib/../lib"
-// CHECK-BE-HF64-32R2: "[[TC]]/fp64{{/|\\\\}}crtend.o"
-// CHECK-BE-HF64-32R2: "[[TC]]/../../../../sysroot/fp64/usr/lib/../lib{{/|\\\\}}crtn.o"
+// CHECK-BE-HF64-32R2: "--sysroot=[[TC]]/../../../../sysroot"
+// CHECK-BE-HF64-32R2: "[[TC]]/../../../../sysroot/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-BE-HF64-32R2: "[[TC]]/../../../../sysroot/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-BE-HF64-32R2: "[[TC]]{{/|\\\\}}crtbegin.o"
+// CHECK-BE-HF64-32R2: "-L[[TC]]"
+// CHECK-BE-HF64-32R2: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib"
+// CHECK-BE-HF64-32R2: "-L[[TC]]/../../../../sysroot/usr/lib/../lib"
+// CHECK-BE-HF64-32R2: "[[TC]]{{/|\\\\}}crtend.o"
+// CHECK-BE-HF64-32R2: "[[TC]]/../../../../sysroot/usr/lib/../lib{{/|\\\\}}crtn.o"
//
// = Big-endian, mips32r2, soft float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -328,13 +328,13 @@
// CHECK-BE-SF-32R2: "-internal-externc-isystem"
// CHECK-BE-SF-32R2: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-SF-32R2: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-SF-32R2: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/sof"
+// CHECK-BE-SF-32R2: "--sysroot=[[TC]]/../../../../sysroot/sof"
// CHECK-BE-SF-32R2: "[[TC]]/../../../../sysroot/sof/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-BE-SF-32R2: "[[TC]]/../../../../sysroot/sof/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-BE-SF-32R2: "[[TC]]/sof{{/|\\\\}}crtbegin.o"
-// CHECK-BE-SF-32R2: "-L[[SR]]/sof"
-// CHECK-BE-SF-32R2: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/sof"
-// CHECK-BE-SF-32R2: "-L[[SR]]/../../../../sysroot/sof/usr/lib/../lib"
+// CHECK-BE-SF-32R2: "-L[[TC]]/sof"
+// CHECK-BE-SF-32R2: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/sof"
+// CHECK-BE-SF-32R2: "-L[[TC]]/../../../../sysroot/sof/usr/lib/../lib"
// CHECK-BE-SF-32R2: "[[TC]]/sof{{/|\\\\}}crtend.o"
// CHECK-BE-SF-32R2: "[[TC]]/../../../../sysroot/sof/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -354,13 +354,13 @@
// CHECK-BE-HF-16R2: "-internal-externc-isystem"
// CHECK-BE-HF-16R2: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-HF-16R2: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-HF-16R2: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips16"
+// CHECK-BE-HF-16R2: "--sysroot=[[TC]]/../../../../sysroot/mips16"
// CHECK-BE-HF-16R2: "[[TC]]/../../../../sysroot/mips16/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-BE-HF-16R2: "[[TC]]/../../../../sysroot/mips16/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-BE-HF-16R2: "[[TC]]/mips16{{/|\\\\}}crtbegin.o"
-// CHECK-BE-HF-16R2: "-L[[SR]]/mips16"
-// CHECK-BE-HF-16R2: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips16"
-// CHECK-BE-HF-16R2: "-L[[SR]]/../../../../sysroot/mips16/usr/lib/../lib"
+// CHECK-BE-HF-16R2: "-L[[TC]]/mips16"
+// CHECK-BE-HF-16R2: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips16"
+// CHECK-BE-HF-16R2: "-L[[TC]]/../../../../sysroot/mips16/usr/lib/../lib"
// CHECK-BE-HF-16R2: "[[TC]]/mips16{{/|\\\\}}crtend.o"
// CHECK-BE-HF-16R2: "[[TC]]/../../../../sysroot/mips16/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -372,7 +372,7 @@
// CHECK-BE-HF64-16R2: "-internal-isystem"
// CHECK-BE-HF64-16R2: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-BE-HF64-16R2: "-internal-isystem"
-// CHECK-BE-HF64-16R2: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips16/fp64"
+// CHECK-BE-HF64-16R2: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips16"
// CHECK-BE-HF64-16R2: "-internal-isystem"
// CHECK-BE-HF64-16R2: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-BE-HF64-16R2: "-internal-externc-isystem"
@@ -380,15 +380,15 @@
// CHECK-BE-HF64-16R2: "-internal-externc-isystem"
// CHECK-BE-HF64-16R2: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-HF64-16R2: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-HF64-16R2: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips16/fp64"
-// CHECK-BE-HF64-16R2: "[[TC]]/../../../../sysroot/mips16/fp64/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-BE-HF64-16R2: "[[TC]]/../../../../sysroot/mips16/fp64/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-BE-HF64-16R2: "[[TC]]/mips16/fp64{{/|\\\\}}crtbegin.o"
-// CHECK-BE-HF64-16R2: "-L[[SR]]/mips16/fp64"
-// CHECK-BE-HF64-16R2: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips16/fp64"
-// CHECK-BE-HF64-16R2: "-L[[SR]]/../../../../sysroot/mips16/fp64/usr/lib/../lib"
-// CHECK-BE-HF64-16R2: "[[TC]]/mips16/fp64{{/|\\\\}}crtend.o"
-// CHECK-BE-HF64-16R2: "[[TC]]/../../../../sysroot/mips16/fp64/usr/lib/../lib{{/|\\\\}}crtn.o"
+// CHECK-BE-HF64-16R2: "--sysroot=[[TC]]/../../../../sysroot/mips16"
+// CHECK-BE-HF64-16R2: "[[TC]]/../../../../sysroot/mips16/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-BE-HF64-16R2: "[[TC]]/../../../../sysroot/mips16/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-BE-HF64-16R2: "[[TC]]/mips16{{/|\\\\}}crtbegin.o"
+// CHECK-BE-HF64-16R2: "-L[[TC]]/mips16"
+// CHECK-BE-HF64-16R2: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips16"
+// CHECK-BE-HF64-16R2: "-L[[TC]]/../../../../sysroot/mips16/usr/lib/../lib"
+// CHECK-BE-HF64-16R2: "[[TC]]/mips16{{/|\\\\}}crtend.o"
+// CHECK-BE-HF64-16R2: "[[TC]]/../../../../sysroot/mips16/usr/lib/../lib{{/|\\\\}}crtn.o"
//
// = Big-endian, mips32r2 / mips16, soft float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -406,13 +406,13 @@
// CHECK-BE-SF-16R2: "-internal-externc-isystem"
// CHECK-BE-SF-16R2: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-SF-16R2: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-SF-16R2: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips16/sof"
+// CHECK-BE-SF-16R2: "--sysroot=[[TC]]/../../../../sysroot/mips16/sof"
// CHECK-BE-SF-16R2: "[[TC]]/../../../../sysroot/mips16/sof/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-BE-SF-16R2: "[[TC]]/../../../../sysroot/mips16/sof/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-BE-SF-16R2: "[[TC]]/mips16/sof{{/|\\\\}}crtbegin.o"
-// CHECK-BE-SF-16R2: "-L[[SR]]/mips16/sof"
-// CHECK-BE-SF-16R2: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips16/sof"
-// CHECK-BE-SF-16R2: "-L[[SR]]/../../../../sysroot/mips16/sof/usr/lib/../lib"
+// CHECK-BE-SF-16R2: "-L[[TC]]/mips16/sof"
+// CHECK-BE-SF-16R2: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips16/sof"
+// CHECK-BE-SF-16R2: "-L[[TC]]/../../../../sysroot/mips16/sof/usr/lib/../lib"
// CHECK-BE-SF-16R2: "[[TC]]/mips16/sof{{/|\\\\}}crtend.o"
// CHECK-BE-SF-16R2: "[[TC]]/../../../../sysroot/mips16/sof/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -432,13 +432,13 @@
// CHECK-BE-NAN-16R2: "-internal-externc-isystem"
// CHECK-BE-NAN-16R2: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-NAN-16R2: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-NAN-16R2: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips16/nan2008"
+// CHECK-BE-NAN-16R2: "--sysroot=[[TC]]/../../../../sysroot/mips16/nan2008"
// CHECK-BE-NAN-16R2: "[[TC]]/../../../../sysroot/mips16/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-BE-NAN-16R2: "[[TC]]/../../../../sysroot/mips16/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-BE-NAN-16R2: "[[TC]]/mips16/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-BE-NAN-16R2: "-L[[SR]]/mips16/nan2008"
-// CHECK-BE-NAN-16R2: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips16/nan2008"
-// CHECK-BE-NAN-16R2: "-L[[SR]]/../../../../sysroot/mips16/nan2008/usr/lib/../lib"
+// CHECK-BE-NAN-16R2: "-L[[TC]]/mips16/nan2008"
+// CHECK-BE-NAN-16R2: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips16/nan2008"
+// CHECK-BE-NAN-16R2: "-L[[TC]]/../../../../sysroot/mips16/nan2008/usr/lib/../lib"
// CHECK-BE-NAN-16R2: "[[TC]]/mips16/nan2008{{/|\\\\}}crtend.o"
// CHECK-BE-NAN-16R2: "[[TC]]/../../../../sysroot/mips16/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -450,7 +450,7 @@
// CHECK-BE-NAN64-16R2: "-internal-isystem"
// CHECK-BE-NAN64-16R2: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-BE-NAN64-16R2: "-internal-isystem"
-// CHECK-BE-NAN64-16R2: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips16/fp64/nan2008"
+// CHECK-BE-NAN64-16R2: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips16/nan2008"
// CHECK-BE-NAN64-16R2: "-internal-isystem"
// CHECK-BE-NAN64-16R2: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-BE-NAN64-16R2: "-internal-externc-isystem"
@@ -458,15 +458,15 @@
// CHECK-BE-NAN64-16R2: "-internal-externc-isystem"
// CHECK-BE-NAN64-16R2: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-NAN64-16R2: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-NAN64-16R2: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips16/fp64/nan2008"
-// CHECK-BE-NAN64-16R2: "[[TC]]/../../../../sysroot/mips16/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-BE-NAN64-16R2: "[[TC]]/../../../../sysroot/mips16/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-BE-NAN64-16R2: "[[TC]]/mips16/fp64/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-BE-NAN64-16R2: "-L[[SR]]/mips16/fp64/nan2008"
-// CHECK-BE-NAN64-16R2: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips16/fp64/nan2008"
-// CHECK-BE-NAN64-16R2: "-L[[SR]]/../../../../sysroot/mips16/fp64/nan2008/usr/lib/../lib"
-// CHECK-BE-NAN64-16R2: "[[TC]]/mips16/fp64/nan2008{{/|\\\\}}crtend.o"
-// CHECK-BE-NAN64-16R2: "[[TC]]/../../../../sysroot/mips16/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
+// CHECK-BE-NAN64-16R2: "--sysroot=[[TC]]/../../../../sysroot/mips16/nan2008"
+// CHECK-BE-NAN64-16R2: "[[TC]]/../../../../sysroot/mips16/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-BE-NAN64-16R2: "[[TC]]/../../../../sysroot/mips16/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-BE-NAN64-16R2: "[[TC]]/mips16/nan2008{{/|\\\\}}crtbegin.o"
+// CHECK-BE-NAN64-16R2: "-L[[TC]]/mips16/nan2008"
+// CHECK-BE-NAN64-16R2: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips16/nan2008"
+// CHECK-BE-NAN64-16R2: "-L[[TC]]/../../../../sysroot/mips16/nan2008/usr/lib/../lib"
+// CHECK-BE-NAN64-16R2: "[[TC]]/mips16/nan2008{{/|\\\\}}crtend.o"
+// CHECK-BE-NAN64-16R2: "[[TC]]/../../../../sysroot/mips16/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
//
// = Big-endian, mips32r2, nan2008
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -484,13 +484,13 @@
// CHECK-BE-NAN-32R2: "-internal-externc-isystem"
// CHECK-BE-NAN-32R2: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-NAN-32R2: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-NAN-32R2: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/nan2008"
+// CHECK-BE-NAN-32R2: "--sysroot=[[TC]]/../../../../sysroot/nan2008"
// CHECK-BE-NAN-32R2: "[[TC]]/../../../../sysroot/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-BE-NAN-32R2: "[[TC]]/../../../../sysroot/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-BE-NAN-32R2: "[[TC]]/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-BE-NAN-32R2: "-L[[SR]]/nan2008"
-// CHECK-BE-NAN-32R2: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/nan2008"
-// CHECK-BE-NAN-32R2: "-L[[SR]]/../../../../sysroot/nan2008/usr/lib/../lib"
+// CHECK-BE-NAN-32R2: "-L[[TC]]/nan2008"
+// CHECK-BE-NAN-32R2: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/nan2008"
+// CHECK-BE-NAN-32R2: "-L[[TC]]/../../../../sysroot/nan2008/usr/lib/../lib"
// CHECK-BE-NAN-32R2: "[[TC]]/nan2008{{/|\\\\}}crtend.o"
// CHECK-BE-NAN-32R2: "[[TC]]/../../../../sysroot/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -502,7 +502,7 @@
// CHECK-BE-NAN64-32R2: "-internal-isystem"
// CHECK-BE-NAN64-32R2: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-BE-NAN64-32R2: "-internal-isystem"
-// CHECK-BE-NAN64-32R2: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/fp64/nan2008"
+// CHECK-BE-NAN64-32R2: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/nan2008"
// CHECK-BE-NAN64-32R2: "-internal-isystem"
// CHECK-BE-NAN64-32R2: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-BE-NAN64-32R2: "-internal-externc-isystem"
@@ -510,15 +510,41 @@
// CHECK-BE-NAN64-32R2: "-internal-externc-isystem"
// CHECK-BE-NAN64-32R2: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-NAN64-32R2: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-NAN64-32R2: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/fp64/nan2008"
-// CHECK-BE-NAN64-32R2: "[[TC]]/../../../../sysroot/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-BE-NAN64-32R2: "[[TC]]/../../../../sysroot/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-BE-NAN64-32R2: "[[TC]]/fp64/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-BE-NAN64-32R2: "-L[[SR]]/fp64/nan2008"
-// CHECK-BE-NAN64-32R2: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/fp64/nan2008"
-// CHECK-BE-NAN64-32R2: "-L[[SR]]/../../../../sysroot/fp64/nan2008/usr/lib/../lib"
-// CHECK-BE-NAN64-32R2: "[[TC]]/fp64/nan2008{{/|\\\\}}crtend.o"
-// CHECK-BE-NAN64-32R2: "[[TC]]/../../../../sysroot/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
+// CHECK-BE-NAN64-32R2: "--sysroot=[[TC]]/../../../../sysroot/nan2008"
+// CHECK-BE-NAN64-32R2: "[[TC]]/../../../../sysroot/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-BE-NAN64-32R2: "[[TC]]/../../../../sysroot/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-BE-NAN64-32R2: "[[TC]]/nan2008{{/|\\\\}}crtbegin.o"
+// CHECK-BE-NAN64-32R2: "-L[[TC]]/nan2008"
+// CHECK-BE-NAN64-32R2: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/nan2008"
+// CHECK-BE-NAN64-32R2: "-L[[TC]]/../../../../sysroot/nan2008/usr/lib/../lib"
+// CHECK-BE-NAN64-32R2: "[[TC]]/nan2008{{/|\\\\}}crtend.o"
+// CHECK-BE-NAN64-32R2: "[[TC]]/../../../../sysroot/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
+//
+// = Big-endian, default (mips32r2), fp64, nan2008
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips-linux-gnu -mfp64 -mnan=2008 \
+// RUN: --gcc-toolchain=%S/Inputs/mips_fsf_tree \
+// RUN: | FileCheck --check-prefix=CHECK-BE-NAN64-32R2-DEF %s
+// CHECK-BE-NAN64-32R2-DEF: "-internal-isystem"
+// CHECK-BE-NAN64-32R2-DEF: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
+// CHECK-BE-NAN64-32R2-DEF: "-internal-isystem"
+// CHECK-BE-NAN64-32R2-DEF: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/nan2008"
+// CHECK-BE-NAN64-32R2-DEF: "-internal-isystem"
+// CHECK-BE-NAN64-32R2-DEF: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
+// CHECK-BE-NAN64-32R2-DEF: "-internal-externc-isystem"
+// CHECK-BE-NAN64-32R2-DEF: "[[TC]]/include"
+// CHECK-BE-NAN64-32R2-DEF: "-internal-externc-isystem"
+// CHECK-BE-NAN64-32R2-DEF: "[[TC]]/../../../../sysroot/usr/include"
+// CHECK-BE-NAN64-32R2-DEF: "{{.*}}ld{{(.exe)?}}"
+// CHECK-BE-NAN64-32R2-DEF: "--sysroot=[[TC]]/../../../../sysroot/nan2008"
+// CHECK-BE-NAN64-32R2-DEF: "[[TC]]/../../../../sysroot/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-BE-NAN64-32R2-DEF: "[[TC]]/../../../../sysroot/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-BE-NAN64-32R2-DEF: "[[TC]]/nan2008{{/|\\\\}}crtbegin.o"
+// CHECK-BE-NAN64-32R2-DEF: "-L[[TC]]/nan2008"
+// CHECK-BE-NAN64-32R2-DEF: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/nan2008"
+// CHECK-BE-NAN64-32R2-DEF: "-L[[TC]]/../../../../sysroot/nan2008/usr/lib/../lib"
+// CHECK-BE-NAN64-32R2-DEF: "[[TC]]/nan2008{{/|\\\\}}crtend.o"
+// CHECK-BE-NAN64-32R2-DEF: "[[TC]]/../../../../sysroot/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
//
// = Big-endian, micromips, hard float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -536,13 +562,13 @@
// CHECK-BE-HF-MM: "-internal-externc-isystem"
// CHECK-BE-HF-MM: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-HF-MM: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-HF-MM: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/micromips"
+// CHECK-BE-HF-MM: "--sysroot=[[TC]]/../../../../sysroot/micromips"
// CHECK-BE-HF-MM: "[[TC]]/../../../../sysroot/micromips/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-BE-HF-MM: "[[TC]]/../../../../sysroot/micromips/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-BE-HF-MM: "[[TC]]/micromips{{/|\\\\}}crtbegin.o"
-// CHECK-BE-HF-MM: "-L[[SR]]/micromips"
-// CHECK-BE-HF-MM: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/micromips"
-// CHECK-BE-HF-MM: "-L[[SR]]/../../../../sysroot/micromips/usr/lib/../lib"
+// CHECK-BE-HF-MM: "-L[[TC]]/micromips"
+// CHECK-BE-HF-MM: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/micromips"
+// CHECK-BE-HF-MM: "-L[[TC]]/../../../../sysroot/micromips/usr/lib/../lib"
// CHECK-BE-HF-MM: "[[TC]]/micromips{{/|\\\\}}crtend.o"
// CHECK-BE-HF-MM: "[[TC]]/../../../../sysroot/micromips/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -554,7 +580,7 @@
// CHECK-BE-HF64-MM: "-internal-isystem"
// CHECK-BE-HF64-MM: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-BE-HF64-MM: "-internal-isystem"
-// CHECK-BE-HF64-MM: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/micromips/fp64"
+// CHECK-BE-HF64-MM: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/micromips"
// CHECK-BE-HF64-MM: "-internal-isystem"
// CHECK-BE-HF64-MM: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-BE-HF64-MM: "-internal-externc-isystem"
@@ -562,15 +588,15 @@
// CHECK-BE-HF64-MM: "-internal-externc-isystem"
// CHECK-BE-HF64-MM: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-HF64-MM: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-HF64-MM: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/micromips/fp64"
-// CHECK-BE-HF64-MM: "[[TC]]/../../../../sysroot/micromips/fp64/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-BE-HF64-MM: "[[TC]]/../../../../sysroot/micromips/fp64/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-BE-HF64-MM: "[[TC]]/micromips/fp64{{/|\\\\}}crtbegin.o"
-// CHECK-BE-HF64-MM: "-L[[SR]]/micromips/fp64"
-// CHECK-BE-HF64-MM: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/micromips/fp64"
-// CHECK-BE-HF64-MM: "-L[[SR]]/../../../../sysroot/micromips/fp64/usr/lib/../lib"
-// CHECK-BE-HF64-MM: "[[TC]]/micromips/fp64{{/|\\\\}}crtend.o"
-// CHECK-BE-HF64-MM: "[[TC]]/../../../../sysroot/micromips/fp64/usr/lib/../lib{{/|\\\\}}crtn.o"
+// CHECK-BE-HF64-MM: "--sysroot=[[TC]]/../../../../sysroot/micromips"
+// CHECK-BE-HF64-MM: "[[TC]]/../../../../sysroot/micromips/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-BE-HF64-MM: "[[TC]]/../../../../sysroot/micromips/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-BE-HF64-MM: "[[TC]]/micromips{{/|\\\\}}crtbegin.o"
+// CHECK-BE-HF64-MM: "-L[[TC]]/micromips"
+// CHECK-BE-HF64-MM: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/micromips"
+// CHECK-BE-HF64-MM: "-L[[TC]]/../../../../sysroot/micromips/usr/lib/../lib"
+// CHECK-BE-HF64-MM: "[[TC]]/micromips{{/|\\\\}}crtend.o"
+// CHECK-BE-HF64-MM: "[[TC]]/../../../../sysroot/micromips/usr/lib/../lib{{/|\\\\}}crtn.o"
//
// = Big-endian, micromips, soft float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -588,13 +614,13 @@
// CHECK-BE-SF-MM: "-internal-externc-isystem"
// CHECK-BE-SF-MM: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-SF-MM: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-SF-MM: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/micromips/sof"
+// CHECK-BE-SF-MM: "--sysroot=[[TC]]/../../../../sysroot/micromips/sof"
// CHECK-BE-SF-MM: "[[TC]]/../../../../sysroot/micromips/sof/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-BE-SF-MM: "[[TC]]/../../../../sysroot/micromips/sof/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-BE-SF-MM: "[[TC]]/micromips/sof{{/|\\\\}}crtbegin.o"
-// CHECK-BE-SF-MM: "-L[[SR]]/micromips/sof"
-// CHECK-BE-SF-MM: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/micromips/sof"
-// CHECK-BE-SF-MM: "-L[[SR]]/../../../../sysroot/micromips/sof/usr/lib/../lib"
+// CHECK-BE-SF-MM: "-L[[TC]]/micromips/sof"
+// CHECK-BE-SF-MM: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/micromips/sof"
+// CHECK-BE-SF-MM: "-L[[TC]]/../../../../sysroot/micromips/sof/usr/lib/../lib"
// CHECK-BE-SF-MM: "[[TC]]/micromips/sof{{/|\\\\}}crtend.o"
// CHECK-BE-SF-MM: "[[TC]]/../../../../sysroot/micromips/sof/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -614,13 +640,13 @@
// CHECK-BE-NAN-MM: "-internal-externc-isystem"
// CHECK-BE-NAN-MM: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-NAN-MM: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-NAN-MM: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/micromips/nan2008"
+// CHECK-BE-NAN-MM: "--sysroot=[[TC]]/../../../../sysroot/micromips/nan2008"
// CHECK-BE-NAN-MM: "[[TC]]/../../../../sysroot/micromips/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-BE-NAN-MM: "[[TC]]/../../../../sysroot/micromips/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-BE-NAN-MM: "[[TC]]/micromips/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-BE-NAN-MM: "-L[[SR]]/micromips/nan2008"
-// CHECK-BE-NAN-MM: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/micromips/nan2008"
-// CHECK-BE-NAN-MM: "-L[[SR]]/../../../../sysroot/micromips/nan2008/usr/lib/../lib"
+// CHECK-BE-NAN-MM: "-L[[TC]]/micromips/nan2008"
+// CHECK-BE-NAN-MM: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/micromips/nan2008"
+// CHECK-BE-NAN-MM: "-L[[TC]]/../../../../sysroot/micromips/nan2008/usr/lib/../lib"
// CHECK-BE-NAN-MM: "[[TC]]/micromips/nan2008{{/|\\\\}}crtend.o"
// CHECK-BE-NAN-MM: "[[TC]]/../../../../sysroot/micromips/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -632,7 +658,7 @@
// CHECK-BE-NAN64-MM: "-internal-isystem"
// CHECK-BE-NAN64-MM: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-BE-NAN64-MM: "-internal-isystem"
-// CHECK-BE-NAN64-MM: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/micromips/fp64/nan2008"
+// CHECK-BE-NAN64-MM: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/micromips/nan2008"
// CHECK-BE-NAN64-MM: "-internal-isystem"
// CHECK-BE-NAN64-MM: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-BE-NAN64-MM: "-internal-externc-isystem"
@@ -640,15 +666,15 @@
// CHECK-BE-NAN64-MM: "-internal-externc-isystem"
// CHECK-BE-NAN64-MM: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-NAN64-MM: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-NAN64-MM: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/micromips/fp64/nan2008"
-// CHECK-BE-NAN64-MM: "[[TC]]/../../../../sysroot/micromips/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-BE-NAN64-MM: "[[TC]]/../../../../sysroot/micromips/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-BE-NAN64-MM: "[[TC]]/micromips/fp64/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-BE-NAN64-MM: "-L[[SR]]/micromips/fp64/nan2008"
-// CHECK-BE-NAN64-MM: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/micromips/fp64/nan2008"
-// CHECK-BE-NAN64-MM: "-L[[SR]]/../../../../sysroot/micromips/fp64/nan2008/usr/lib/../lib"
-// CHECK-BE-NAN64-MM: "[[TC]]/micromips/fp64/nan2008{{/|\\\\}}crtend.o"
-// CHECK-BE-NAN64-MM: "[[TC]]/../../../../sysroot/micromips/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
+// CHECK-BE-NAN64-MM: "--sysroot=[[TC]]/../../../../sysroot/micromips/nan2008"
+// CHECK-BE-NAN64-MM: "[[TC]]/../../../../sysroot/micromips/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-BE-NAN64-MM: "[[TC]]/../../../../sysroot/micromips/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-BE-NAN64-MM: "[[TC]]/micromips/nan2008{{/|\\\\}}crtbegin.o"
+// CHECK-BE-NAN64-MM: "-L[[TC]]/micromips/nan2008"
+// CHECK-BE-NAN64-MM: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/micromips/nan2008"
+// CHECK-BE-NAN64-MM: "-L[[TC]]/../../../../sysroot/micromips/nan2008/usr/lib/../lib"
+// CHECK-BE-NAN64-MM: "[[TC]]/micromips/nan2008{{/|\\\\}}crtend.o"
+// CHECK-BE-NAN64-MM: "[[TC]]/../../../../sysroot/micromips/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
//
// = Big-endian, mips64, ABI n32, hard float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -666,13 +692,13 @@
// CHECK-BE-HF-64-N32: "-internal-externc-isystem"
// CHECK-BE-HF-64-N32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-HF-64-N32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-HF-64-N32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64"
+// CHECK-BE-HF-64-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64"
// CHECK-BE-HF-64-N32: "[[TC]]/../../../../sysroot/mips64/usr/lib{{/|\\\\}}crt1.o"
// CHECK-BE-HF-64-N32: "[[TC]]/../../../../sysroot/mips64/usr/lib{{/|\\\\}}crti.o"
// CHECK-BE-HF-64-N32: "[[TC]]/mips64{{/|\\\\}}crtbegin.o"
-// CHECK-BE-HF-64-N32: "-L[[SR]]/mips64"
-// CHECK-BE-HF-64-N32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64"
-// CHECK-BE-HF-64-N32: "-L[[SR]]/../../../../sysroot/mips64/usr/lib"
+// CHECK-BE-HF-64-N32: "-L[[TC]]/mips64"
+// CHECK-BE-HF-64-N32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64"
+// CHECK-BE-HF-64-N32: "-L[[TC]]/../../../../sysroot/mips64/usr/lib"
// CHECK-BE-HF-64-N32: "[[TC]]/mips64{{/|\\\\}}crtend.o"
// CHECK-BE-HF-64-N32: "[[TC]]/../../../../sysroot/mips64/usr/lib{{/|\\\\}}crtn.o"
//
@@ -684,7 +710,7 @@
// CHECK-BE-HF64-64-N32: "-internal-isystem"
// CHECK-BE-HF64-64-N32: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-BE-HF64-64-N32: "-internal-isystem"
-// CHECK-BE-HF64-64-N32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/fp64"
+// CHECK-BE-HF64-64-N32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64"
// CHECK-BE-HF64-64-N32: "-internal-isystem"
// CHECK-BE-HF64-64-N32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-BE-HF64-64-N32: "-internal-externc-isystem"
@@ -692,15 +718,15 @@
// CHECK-BE-HF64-64-N32: "-internal-externc-isystem"
// CHECK-BE-HF64-64-N32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-HF64-64-N32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-HF64-64-N32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64/fp64"
-// CHECK-BE-HF64-64-N32: "[[TC]]/../../../../sysroot/mips64/fp64/usr/lib{{/|\\\\}}crt1.o"
-// CHECK-BE-HF64-64-N32: "[[TC]]/../../../../sysroot/mips64/fp64/usr/lib{{/|\\\\}}crti.o"
-// CHECK-BE-HF64-64-N32: "[[TC]]/mips64/fp64{{/|\\\\}}crtbegin.o"
-// CHECK-BE-HF64-64-N32: "-L[[SR]]/mips64/fp64"
-// CHECK-BE-HF64-64-N32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64/fp64"
-// CHECK-BE-HF64-64-N32: "-L[[SR]]/../../../../sysroot/mips64/fp64/usr/lib"
-// CHECK-BE-HF64-64-N32: "[[TC]]/mips64/fp64{{/|\\\\}}crtend.o"
-// CHECK-BE-HF64-64-N32: "[[TC]]/../../../../sysroot/mips64/fp64/usr/lib{{/|\\\\}}crtn.o"
+// CHECK-BE-HF64-64-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64"
+// CHECK-BE-HF64-64-N32: "[[TC]]/../../../../sysroot/mips64/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-BE-HF64-64-N32: "[[TC]]/../../../../sysroot/mips64/usr/lib{{/|\\\\}}crti.o"
+// CHECK-BE-HF64-64-N32: "[[TC]]/mips64{{/|\\\\}}crtbegin.o"
+// CHECK-BE-HF64-64-N32: "-L[[TC]]/mips64"
+// CHECK-BE-HF64-64-N32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64"
+// CHECK-BE-HF64-64-N32: "-L[[TC]]/../../../../sysroot/mips64/usr/lib"
+// CHECK-BE-HF64-64-N32: "[[TC]]/mips64{{/|\\\\}}crtend.o"
+// CHECK-BE-HF64-64-N32: "[[TC]]/../../../../sysroot/mips64/usr/lib{{/|\\\\}}crtn.o"
//
// = Big-endian, mips64, ABI n32, soft float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -718,13 +744,13 @@
// CHECK-BE-SF-64-N32: "-internal-externc-isystem"
// CHECK-BE-SF-64-N32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-SF-64-N32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-SF-64-N32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64/sof"
+// CHECK-BE-SF-64-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64/sof"
// CHECK-BE-SF-64-N32: "[[TC]]/../../../../sysroot/mips64/sof/usr/lib{{/|\\\\}}crt1.o"
// CHECK-BE-SF-64-N32: "[[TC]]/../../../../sysroot/mips64/sof/usr/lib{{/|\\\\}}crti.o"
// CHECK-BE-SF-64-N32: "[[TC]]/mips64/sof{{/|\\\\}}crtbegin.o"
-// CHECK-BE-SF-64-N32: "-L[[SR]]/mips64/sof"
-// CHECK-BE-SF-64-N32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64/sof"
-// CHECK-BE-SF-64-N32: "-L[[SR]]/../../../../sysroot/mips64/sof/usr/lib"
+// CHECK-BE-SF-64-N32: "-L[[TC]]/mips64/sof"
+// CHECK-BE-SF-64-N32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64/sof"
+// CHECK-BE-SF-64-N32: "-L[[TC]]/../../../../sysroot/mips64/sof/usr/lib"
// CHECK-BE-SF-64-N32: "[[TC]]/mips64/sof{{/|\\\\}}crtend.o"
// CHECK-BE-SF-64-N32: "[[TC]]/../../../../sysroot/mips64/sof/usr/lib{{/|\\\\}}crtn.o"
//
@@ -744,13 +770,13 @@
// CHECK-BE-NAN-64-N32: "-internal-externc-isystem"
// CHECK-BE-NAN-64-N32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-NAN-64-N32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-NAN-64-N32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64/nan2008"
+// CHECK-BE-NAN-64-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64/nan2008"
// CHECK-BE-NAN-64-N32: "[[TC]]/../../../../sysroot/mips64/nan2008/usr/lib{{/|\\\\}}crt1.o"
// CHECK-BE-NAN-64-N32: "[[TC]]/../../../../sysroot/mips64/nan2008/usr/lib{{/|\\\\}}crti.o"
// CHECK-BE-NAN-64-N32: "[[TC]]/mips64/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-BE-NAN-64-N32: "-L[[SR]]/mips64/nan2008"
-// CHECK-BE-NAN-64-N32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64/nan2008"
-// CHECK-BE-NAN-64-N32: "-L[[SR]]/../../../../sysroot/mips64/nan2008/usr/lib"
+// CHECK-BE-NAN-64-N32: "-L[[TC]]/mips64/nan2008"
+// CHECK-BE-NAN-64-N32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64/nan2008"
+// CHECK-BE-NAN-64-N32: "-L[[TC]]/../../../../sysroot/mips64/nan2008/usr/lib"
// CHECK-BE-NAN-64-N32: "[[TC]]/mips64/nan2008{{/|\\\\}}crtend.o"
// CHECK-BE-NAN-64-N32: "[[TC]]/../../../../sysroot/mips64/nan2008/usr/lib{{/|\\\\}}crtn.o"
//
@@ -762,7 +788,7 @@
// CHECK-BE-NAN64-64-N32: "-internal-isystem"
// CHECK-BE-NAN64-64-N32: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-BE-NAN64-64-N32: "-internal-isystem"
-// CHECK-BE-NAN64-64-N32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/fp64/nan2008"
+// CHECK-BE-NAN64-64-N32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/nan2008"
// CHECK-BE-NAN64-64-N32: "-internal-isystem"
// CHECK-BE-NAN64-64-N32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-BE-NAN64-64-N32: "-internal-externc-isystem"
@@ -770,15 +796,15 @@
// CHECK-BE-NAN64-64-N32: "-internal-externc-isystem"
// CHECK-BE-NAN64-64-N32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-NAN64-64-N32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-NAN64-64-N32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64/fp64/nan2008"
-// CHECK-BE-NAN64-64-N32: "[[TC]]/../../../../sysroot/mips64/fp64/nan2008/usr/lib{{/|\\\\}}crt1.o"
-// CHECK-BE-NAN64-64-N32: "[[TC]]/../../../../sysroot/mips64/fp64/nan2008/usr/lib{{/|\\\\}}crti.o"
-// CHECK-BE-NAN64-64-N32: "[[TC]]/mips64/fp64/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-BE-NAN64-64-N32: "-L[[SR]]/mips64/fp64/nan2008"
-// CHECK-BE-NAN64-64-N32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64/fp64/nan2008"
-// CHECK-BE-NAN64-64-N32: "-L[[SR]]/../../../../sysroot/mips64/fp64/nan2008/usr/lib"
-// CHECK-BE-NAN64-64-N32: "[[TC]]/mips64/fp64/nan2008{{/|\\\\}}crtend.o"
-// CHECK-BE-NAN64-64-N32: "[[TC]]/../../../../sysroot/mips64/fp64/nan2008/usr/lib{{/|\\\\}}crtn.o"
+// CHECK-BE-NAN64-64-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64/nan2008"
+// CHECK-BE-NAN64-64-N32: "[[TC]]/../../../../sysroot/mips64/nan2008/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-BE-NAN64-64-N32: "[[TC]]/../../../../sysroot/mips64/nan2008/usr/lib{{/|\\\\}}crti.o"
+// CHECK-BE-NAN64-64-N32: "[[TC]]/mips64/nan2008{{/|\\\\}}crtbegin.o"
+// CHECK-BE-NAN64-64-N32: "-L[[TC]]/mips64/nan2008"
+// CHECK-BE-NAN64-64-N32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64/nan2008"
+// CHECK-BE-NAN64-64-N32: "-L[[TC]]/../../../../sysroot/mips64/nan2008/usr/lib"
+// CHECK-BE-NAN64-64-N32: "[[TC]]/mips64/nan2008{{/|\\\\}}crtend.o"
+// CHECK-BE-NAN64-64-N32: "[[TC]]/../../../../sysroot/mips64/nan2008/usr/lib{{/|\\\\}}crtn.o"
//
// = Big-endian, mips64, ABI 64, hard float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -796,13 +822,13 @@
// CHECK-BE-HF-64-64: "-internal-externc-isystem"
// CHECK-BE-HF-64-64: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-HF-64-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-HF-64-64: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64/64"
+// CHECK-BE-HF-64-64: "--sysroot=[[TC]]/../../../../sysroot/mips64/64"
// CHECK-BE-HF-64-64: "[[TC]]/../../../../sysroot/mips64/64/usr/lib{{/|\\\\}}crt1.o"
// CHECK-BE-HF-64-64: "[[TC]]/../../../../sysroot/mips64/64/usr/lib{{/|\\\\}}crti.o"
// CHECK-BE-HF-64-64: "[[TC]]/mips64/64{{/|\\\\}}crtbegin.o"
-// CHECK-BE-HF-64-64: "-L[[SR]]/mips64/64"
-// CHECK-BE-HF-64-64: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64/64"
-// CHECK-BE-HF-64-64: "-L[[SR]]/../../../../sysroot/mips64/64/usr/lib"
+// CHECK-BE-HF-64-64: "-L[[TC]]/mips64/64"
+// CHECK-BE-HF-64-64: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64/64"
+// CHECK-BE-HF-64-64: "-L[[TC]]/../../../../sysroot/mips64/64/usr/lib"
// CHECK-BE-HF-64-64: "[[TC]]/mips64/64{{/|\\\\}}crtend.o"
// CHECK-BE-HF-64-64: "[[TC]]/../../../../sysroot/mips64/64/usr/lib{{/|\\\\}}crtn.o"
//
@@ -814,7 +840,7 @@
// CHECK-BE-HF64-64-64: "-internal-isystem"
// CHECK-BE-HF64-64-64: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-BE-HF64-64-64: "-internal-isystem"
-// CHECK-BE-HF64-64-64: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/64/fp64"
+// CHECK-BE-HF64-64-64: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/64"
// CHECK-BE-HF64-64-64: "-internal-isystem"
// CHECK-BE-HF64-64-64: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-BE-HF64-64-64: "-internal-externc-isystem"
@@ -822,15 +848,15 @@
// CHECK-BE-HF64-64-64: "-internal-externc-isystem"
// CHECK-BE-HF64-64-64: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-HF64-64-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-HF64-64-64: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64/64/fp64"
-// CHECK-BE-HF64-64-64: "[[TC]]/../../../../sysroot/mips64/64/fp64/usr/lib{{/|\\\\}}crt1.o"
-// CHECK-BE-HF64-64-64: "[[TC]]/../../../../sysroot/mips64/64/fp64/usr/lib{{/|\\\\}}crti.o"
-// CHECK-BE-HF64-64-64: "[[TC]]/mips64/64/fp64{{/|\\\\}}crtbegin.o"
-// CHECK-BE-HF64-64-64: "-L[[SR]]/mips64/64/fp64"
-// CHECK-BE-HF64-64-64: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64/64/fp64"
-// CHECK-BE-HF64-64-64: "-L[[SR]]/../../../../sysroot/mips64/64/fp64/usr/lib"
-// CHECK-BE-HF64-64-64: "[[TC]]/mips64/64/fp64{{/|\\\\}}crtend.o"
-// CHECK-BE-HF64-64-64: "[[TC]]/../../../../sysroot/mips64/64/fp64/usr/lib{{/|\\\\}}crtn.o"
+// CHECK-BE-HF64-64-64: "--sysroot=[[TC]]/../../../../sysroot/mips64/64"
+// CHECK-BE-HF64-64-64: "[[TC]]/../../../../sysroot/mips64/64/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-BE-HF64-64-64: "[[TC]]/../../../../sysroot/mips64/64/usr/lib{{/|\\\\}}crti.o"
+// CHECK-BE-HF64-64-64: "[[TC]]/mips64/64{{/|\\\\}}crtbegin.o"
+// CHECK-BE-HF64-64-64: "-L[[TC]]/mips64/64"
+// CHECK-BE-HF64-64-64: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64/64"
+// CHECK-BE-HF64-64-64: "-L[[TC]]/../../../../sysroot/mips64/64/usr/lib"
+// CHECK-BE-HF64-64-64: "[[TC]]/mips64/64{{/|\\\\}}crtend.o"
+// CHECK-BE-HF64-64-64: "[[TC]]/../../../../sysroot/mips64/64/usr/lib{{/|\\\\}}crtn.o"
//
// = Big-endian, mips64, ABI 64, soft float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -848,13 +874,13 @@
// CHECK-BE-SF-64-64: "-internal-externc-isystem"
// CHECK-BE-SF-64-64: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-SF-64-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-SF-64-64: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64/64/sof"
+// CHECK-BE-SF-64-64: "--sysroot=[[TC]]/../../../../sysroot/mips64/64/sof"
// CHECK-BE-SF-64-64: "[[TC]]/../../../../sysroot/mips64/64/sof/usr/lib{{/|\\\\}}crt1.o"
// CHECK-BE-SF-64-64: "[[TC]]/../../../../sysroot/mips64/64/sof/usr/lib{{/|\\\\}}crti.o"
// CHECK-BE-SF-64-64: "[[TC]]/mips64/64/sof{{/|\\\\}}crtbegin.o"
-// CHECK-BE-SF-64-64: "-L[[SR]]/mips64/64/sof"
-// CHECK-BE-SF-64-64: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64/64/sof"
-// CHECK-BE-SF-64-64: "-L[[SR]]/../../../../sysroot/mips64/64/sof/usr/lib"
+// CHECK-BE-SF-64-64: "-L[[TC]]/mips64/64/sof"
+// CHECK-BE-SF-64-64: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64/64/sof"
+// CHECK-BE-SF-64-64: "-L[[TC]]/../../../../sysroot/mips64/64/sof/usr/lib"
// CHECK-BE-SF-64-64: "[[TC]]/mips64/64/sof{{/|\\\\}}crtend.o"
// CHECK-BE-SF-64-64: "[[TC]]/../../../../sysroot/mips64/64/sof/usr/lib{{/|\\\\}}crtn.o"
//
@@ -874,13 +900,13 @@
// CHECK-BE-NAN-64-64: "-internal-externc-isystem"
// CHECK-BE-NAN-64-64: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-NAN-64-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-NAN-64-64: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64/64/nan2008"
+// CHECK-BE-NAN-64-64: "--sysroot=[[TC]]/../../../../sysroot/mips64/64/nan2008"
// CHECK-BE-NAN-64-64: "[[TC]]/../../../../sysroot/mips64/64/nan2008/usr/lib{{/|\\\\}}crt1.o"
// CHECK-BE-NAN-64-64: "[[TC]]/../../../../sysroot/mips64/64/nan2008/usr/lib{{/|\\\\}}crti.o"
// CHECK-BE-NAN-64-64: "[[TC]]/mips64/64/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-BE-NAN-64-64: "-L[[SR]]/mips64/64/nan2008"
-// CHECK-BE-NAN-64-64: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64/64/nan2008"
-// CHECK-BE-NAN-64-64: "-L[[SR]]/../../../../sysroot/mips64/64/nan2008/usr/lib"
+// CHECK-BE-NAN-64-64: "-L[[TC]]/mips64/64/nan2008"
+// CHECK-BE-NAN-64-64: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64/64/nan2008"
+// CHECK-BE-NAN-64-64: "-L[[TC]]/../../../../sysroot/mips64/64/nan2008/usr/lib"
// CHECK-BE-NAN-64-64: "[[TC]]/mips64/64/nan2008{{/|\\\\}}crtend.o"
// CHECK-BE-NAN-64-64: "[[TC]]/../../../../sysroot/mips64/64/nan2008/usr/lib{{/|\\\\}}crtn.o"
//
@@ -892,7 +918,7 @@
// CHECK-BE-NAN64-64-64: "-internal-isystem"
// CHECK-BE-NAN64-64-64: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-BE-NAN64-64-64: "-internal-isystem"
-// CHECK-BE-NAN64-64-64: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/64/fp64/nan2008"
+// CHECK-BE-NAN64-64-64: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/64/nan2008"
// CHECK-BE-NAN64-64-64: "-internal-isystem"
// CHECK-BE-NAN64-64-64: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-BE-NAN64-64-64: "-internal-externc-isystem"
@@ -900,15 +926,15 @@
// CHECK-BE-NAN64-64-64: "-internal-externc-isystem"
// CHECK-BE-NAN64-64-64: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-NAN64-64-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-NAN64-64-64: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64/64/fp64/nan2008"
-// CHECK-BE-NAN64-64-64: "[[TC]]/../../../../sysroot/mips64/64/fp64/nan2008/usr/lib{{/|\\\\}}crt1.o"
-// CHECK-BE-NAN64-64-64: "[[TC]]/../../../../sysroot/mips64/64/fp64/nan2008/usr/lib{{/|\\\\}}crti.o"
-// CHECK-BE-NAN64-64-64: "[[TC]]/mips64/64/fp64/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-BE-NAN64-64-64: "-L[[SR]]/mips64/64/fp64/nan2008"
-// CHECK-BE-NAN64-64-64: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64/64/fp64/nan2008"
-// CHECK-BE-NAN64-64-64: "-L[[SR]]/../../../../sysroot/mips64/64/fp64/nan2008/usr/lib"
-// CHECK-BE-NAN64-64-64: "[[TC]]/mips64/64/fp64/nan2008{{/|\\\\}}crtend.o"
-// CHECK-BE-NAN64-64-64: "[[TC]]/../../../../sysroot/mips64/64/fp64/nan2008/usr/lib{{/|\\\\}}crtn.o"
+// CHECK-BE-NAN64-64-64: "--sysroot=[[TC]]/../../../../sysroot/mips64/64/nan2008"
+// CHECK-BE-NAN64-64-64: "[[TC]]/../../../../sysroot/mips64/64/nan2008/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-BE-NAN64-64-64: "[[TC]]/../../../../sysroot/mips64/64/nan2008/usr/lib{{/|\\\\}}crti.o"
+// CHECK-BE-NAN64-64-64: "[[TC]]/mips64/64/nan2008{{/|\\\\}}crtbegin.o"
+// CHECK-BE-NAN64-64-64: "-L[[TC]]/mips64/64/nan2008"
+// CHECK-BE-NAN64-64-64: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64/64/nan2008"
+// CHECK-BE-NAN64-64-64: "-L[[TC]]/../../../../sysroot/mips64/64/nan2008/usr/lib"
+// CHECK-BE-NAN64-64-64: "[[TC]]/mips64/64/nan2008{{/|\\\\}}crtend.o"
+// CHECK-BE-NAN64-64-64: "[[TC]]/../../../../sysroot/mips64/64/nan2008/usr/lib{{/|\\\\}}crtn.o"
//
// = Big-endian, mips64r2, ABI n32, hard float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -926,13 +952,13 @@
// CHECK-BE-HF-64R2-N32: "-internal-externc-isystem"
// CHECK-BE-HF-64R2-N32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-HF-64R2-N32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-HF-64R2-N32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64r2"
+// CHECK-BE-HF-64R2-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64r2"
// CHECK-BE-HF-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/usr/lib{{/|\\\\}}crt1.o"
// CHECK-BE-HF-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/usr/lib{{/|\\\\}}crti.o"
// CHECK-BE-HF-64R2-N32: "[[TC]]/mips64r2{{/|\\\\}}crtbegin.o"
-// CHECK-BE-HF-64R2-N32: "-L[[SR]]/mips64r2"
-// CHECK-BE-HF-64R2-N32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64r2"
-// CHECK-BE-HF-64R2-N32: "-L[[SR]]/../../../../sysroot/mips64r2/usr/lib"
+// CHECK-BE-HF-64R2-N32: "-L[[TC]]/mips64r2"
+// CHECK-BE-HF-64R2-N32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64r2"
+// CHECK-BE-HF-64R2-N32: "-L[[TC]]/../../../../sysroot/mips64r2/usr/lib"
// CHECK-BE-HF-64R2-N32: "[[TC]]/mips64r2{{/|\\\\}}crtend.o"
// CHECK-BE-HF-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/usr/lib{{/|\\\\}}crtn.o"
//
@@ -944,7 +970,7 @@
// CHECK-BE-HF64-64R2-N32: "-internal-isystem"
// CHECK-BE-HF64-64R2-N32: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-BE-HF64-64R2-N32: "-internal-isystem"
-// CHECK-BE-HF64-64R2-N32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/fp64"
+// CHECK-BE-HF64-64R2-N32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2"
// CHECK-BE-HF64-64R2-N32: "-internal-isystem"
// CHECK-BE-HF64-64R2-N32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-BE-HF64-64R2-N32: "-internal-externc-isystem"
@@ -952,15 +978,15 @@
// CHECK-BE-HF64-64R2-N32: "-internal-externc-isystem"
// CHECK-BE-HF64-64R2-N32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-HF64-64R2-N32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-HF64-64R2-N32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64r2/fp64"
-// CHECK-BE-HF64-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/fp64/usr/lib{{/|\\\\}}crt1.o"
-// CHECK-BE-HF64-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/fp64/usr/lib{{/|\\\\}}crti.o"
-// CHECK-BE-HF64-64R2-N32: "[[TC]]/mips64r2/fp64{{/|\\\\}}crtbegin.o"
-// CHECK-BE-HF64-64R2-N32: "-L[[SR]]/mips64r2/fp64"
-// CHECK-BE-HF64-64R2-N32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64r2/fp64"
-// CHECK-BE-HF64-64R2-N32: "-L[[SR]]/../../../../sysroot/mips64r2/fp64/usr/lib"
-// CHECK-BE-HF64-64R2-N32: "[[TC]]/mips64r2/fp64{{/|\\\\}}crtend.o"
-// CHECK-BE-HF64-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/fp64/usr/lib{{/|\\\\}}crtn.o"
+// CHECK-BE-HF64-64R2-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64r2"
+// CHECK-BE-HF64-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-BE-HF64-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/usr/lib{{/|\\\\}}crti.o"
+// CHECK-BE-HF64-64R2-N32: "[[TC]]/mips64r2{{/|\\\\}}crtbegin.o"
+// CHECK-BE-HF64-64R2-N32: "-L[[TC]]/mips64r2"
+// CHECK-BE-HF64-64R2-N32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64r2"
+// CHECK-BE-HF64-64R2-N32: "-L[[TC]]/../../../../sysroot/mips64r2/usr/lib"
+// CHECK-BE-HF64-64R2-N32: "[[TC]]/mips64r2{{/|\\\\}}crtend.o"
+// CHECK-BE-HF64-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/usr/lib{{/|\\\\}}crtn.o"
//
// = Big-endian, mips64r2, ABI n32, soft float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -978,13 +1004,13 @@
// CHECK-BE-SF-64R2-N32: "-internal-externc-isystem"
// CHECK-BE-SF-64R2-N32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-SF-64R2-N32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-SF-64R2-N32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64r2/sof"
+// CHECK-BE-SF-64R2-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64r2/sof"
// CHECK-BE-SF-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/sof/usr/lib{{/|\\\\}}crt1.o"
// CHECK-BE-SF-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/sof/usr/lib{{/|\\\\}}crti.o"
// CHECK-BE-SF-64R2-N32: "[[TC]]/mips64r2/sof{{/|\\\\}}crtbegin.o"
-// CHECK-BE-SF-64R2-N32: "-L[[SR]]/mips64r2/sof"
-// CHECK-BE-SF-64R2-N32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64r2/sof"
-// CHECK-BE-SF-64R2-N32: "-L[[SR]]/../../../../sysroot/mips64r2/sof/usr/lib"
+// CHECK-BE-SF-64R2-N32: "-L[[TC]]/mips64r2/sof"
+// CHECK-BE-SF-64R2-N32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64r2/sof"
+// CHECK-BE-SF-64R2-N32: "-L[[TC]]/../../../../sysroot/mips64r2/sof/usr/lib"
// CHECK-BE-SF-64R2-N32: "[[TC]]/mips64r2/sof{{/|\\\\}}crtend.o"
// CHECK-BE-SF-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/sof/usr/lib{{/|\\\\}}crtn.o"
//
@@ -1004,13 +1030,13 @@
// CHECK-BE-NAN-64R2-N32: "-internal-externc-isystem"
// CHECK-BE-NAN-64R2-N32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-NAN-64R2-N32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-NAN-64R2-N32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64r2/nan2008"
+// CHECK-BE-NAN-64R2-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64r2/nan2008"
// CHECK-BE-NAN-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/nan2008/usr/lib{{/|\\\\}}crt1.o"
// CHECK-BE-NAN-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/nan2008/usr/lib{{/|\\\\}}crti.o"
// CHECK-BE-NAN-64R2-N32: "[[TC]]/mips64r2/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-BE-NAN-64R2-N32: "-L[[SR]]/mips64r2/nan2008"
-// CHECK-BE-NAN-64R2-N32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64r2/nan2008"
-// CHECK-BE-NAN-64R2-N32: "-L[[SR]]/../../../../sysroot/mips64r2/nan2008/usr/lib"
+// CHECK-BE-NAN-64R2-N32: "-L[[TC]]/mips64r2/nan2008"
+// CHECK-BE-NAN-64R2-N32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64r2/nan2008"
+// CHECK-BE-NAN-64R2-N32: "-L[[TC]]/../../../../sysroot/mips64r2/nan2008/usr/lib"
// CHECK-BE-NAN-64R2-N32: "[[TC]]/mips64r2/nan2008{{/|\\\\}}crtend.o"
// CHECK-BE-NAN-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/nan2008/usr/lib{{/|\\\\}}crtn.o"
//
@@ -1022,7 +1048,7 @@
// CHECK-BE-NAN64-64R2-N32: "-internal-isystem"
// CHECK-BE-NAN64-64R2-N32: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-BE-NAN64-64R2-N32: "-internal-isystem"
-// CHECK-BE-NAN64-64R2-N32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/fp64/nan2008"
+// CHECK-BE-NAN64-64R2-N32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/nan2008"
// CHECK-BE-NAN64-64R2-N32: "-internal-isystem"
// CHECK-BE-NAN64-64R2-N32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-BE-NAN64-64R2-N32: "-internal-externc-isystem"
@@ -1030,15 +1056,15 @@
// CHECK-BE-NAN64-64R2-N32: "-internal-externc-isystem"
// CHECK-BE-NAN64-64R2-N32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-NAN64-64R2-N32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-NAN64-64R2-N32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64r2/fp64/nan2008"
-// CHECK-BE-NAN64-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/fp64/nan2008/usr/lib{{/|\\\\}}crt1.o"
-// CHECK-BE-NAN64-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/fp64/nan2008/usr/lib{{/|\\\\}}crti.o"
-// CHECK-BE-NAN64-64R2-N32: "[[TC]]/mips64r2/fp64/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-BE-NAN64-64R2-N32: "-L[[SR]]/mips64r2/fp64/nan2008"
-// CHECK-BE-NAN64-64R2-N32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64r2/fp64/nan2008"
-// CHECK-BE-NAN64-64R2-N32: "-L[[SR]]/../../../../sysroot/mips64r2/fp64/nan2008/usr/lib"
-// CHECK-BE-NAN64-64R2-N32: "[[TC]]/mips64r2/fp64/nan2008{{/|\\\\}}crtend.o"
-// CHECK-BE-NAN64-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/fp64/nan2008/usr/lib{{/|\\\\}}crtn.o"
+// CHECK-BE-NAN64-64R2-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64r2/nan2008"
+// CHECK-BE-NAN64-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/nan2008/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-BE-NAN64-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/nan2008/usr/lib{{/|\\\\}}crti.o"
+// CHECK-BE-NAN64-64R2-N32: "[[TC]]/mips64r2/nan2008{{/|\\\\}}crtbegin.o"
+// CHECK-BE-NAN64-64R2-N32: "-L[[TC]]/mips64r2/nan2008"
+// CHECK-BE-NAN64-64R2-N32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64r2/nan2008"
+// CHECK-BE-NAN64-64R2-N32: "-L[[TC]]/../../../../sysroot/mips64r2/nan2008/usr/lib"
+// CHECK-BE-NAN64-64R2-N32: "[[TC]]/mips64r2/nan2008{{/|\\\\}}crtend.o"
+// CHECK-BE-NAN64-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/nan2008/usr/lib{{/|\\\\}}crtn.o"
//
// = Big-endian, mips64r2, ABI 64, hard float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -1056,13 +1082,13 @@
// CHECK-BE-HF-64R2-64: "-internal-externc-isystem"
// CHECK-BE-HF-64R2-64: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-HF-64R2-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-HF-64R2-64: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64r2/64"
+// CHECK-BE-HF-64R2-64: "--sysroot=[[TC]]/../../../../sysroot/mips64r2/64"
// CHECK-BE-HF-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/usr/lib{{/|\\\\}}crt1.o"
// CHECK-BE-HF-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/usr/lib{{/|\\\\}}crti.o"
// CHECK-BE-HF-64R2-64: "[[TC]]/mips64r2/64{{/|\\\\}}crtbegin.o"
-// CHECK-BE-HF-64R2-64: "-L[[SR]]/mips64r2/64"
-// CHECK-BE-HF-64R2-64: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64r2/64"
-// CHECK-BE-HF-64R2-64: "-L[[SR]]/../../../../sysroot/mips64r2/64/usr/lib"
+// CHECK-BE-HF-64R2-64: "-L[[TC]]/mips64r2/64"
+// CHECK-BE-HF-64R2-64: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64r2/64"
+// CHECK-BE-HF-64R2-64: "-L[[TC]]/../../../../sysroot/mips64r2/64/usr/lib"
// CHECK-BE-HF-64R2-64: "[[TC]]/mips64r2/64{{/|\\\\}}crtend.o"
// CHECK-BE-HF-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/usr/lib{{/|\\\\}}crtn.o"
//
@@ -1074,7 +1100,7 @@
// CHECK-BE-HF64-64R2-64: "-internal-isystem"
// CHECK-BE-HF64-64R2-64: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-BE-HF64-64R2-64: "-internal-isystem"
-// CHECK-BE-HF64-64R2-64: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/64/fp64"
+// CHECK-BE-HF64-64R2-64: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/64"
// CHECK-BE-HF64-64R2-64: "-internal-isystem"
// CHECK-BE-HF64-64R2-64: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-BE-HF64-64R2-64: "-internal-externc-isystem"
@@ -1082,15 +1108,15 @@
// CHECK-BE-HF64-64R2-64: "-internal-externc-isystem"
// CHECK-BE-HF64-64R2-64: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-HF64-64R2-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-HF64-64R2-64: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64r2/64/fp64"
-// CHECK-BE-HF64-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/fp64/usr/lib{{/|\\\\}}crt1.o"
-// CHECK-BE-HF64-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/fp64/usr/lib{{/|\\\\}}crti.o"
-// CHECK-BE-HF64-64R2-64: "[[TC]]/mips64r2/64/fp64{{/|\\\\}}crtbegin.o"
-// CHECK-BE-HF64-64R2-64: "-L[[SR]]/mips64r2/64/fp64"
-// CHECK-BE-HF64-64R2-64: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64r2/64/fp64"
-// CHECK-BE-HF64-64R2-64: "-L[[SR]]/../../../../sysroot/mips64r2/64/fp64/usr/lib"
-// CHECK-BE-HF64-64R2-64: "[[TC]]/mips64r2/64/fp64{{/|\\\\}}crtend.o"
-// CHECK-BE-HF64-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/fp64/usr/lib{{/|\\\\}}crtn.o"
+// CHECK-BE-HF64-64R2-64: "--sysroot=[[TC]]/../../../../sysroot/mips64r2/64"
+// CHECK-BE-HF64-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-BE-HF64-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/usr/lib{{/|\\\\}}crti.o"
+// CHECK-BE-HF64-64R2-64: "[[TC]]/mips64r2/64{{/|\\\\}}crtbegin.o"
+// CHECK-BE-HF64-64R2-64: "-L[[TC]]/mips64r2/64"
+// CHECK-BE-HF64-64R2-64: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64r2/64"
+// CHECK-BE-HF64-64R2-64: "-L[[TC]]/../../../../sysroot/mips64r2/64/usr/lib"
+// CHECK-BE-HF64-64R2-64: "[[TC]]/mips64r2/64{{/|\\\\}}crtend.o"
+// CHECK-BE-HF64-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/usr/lib{{/|\\\\}}crtn.o"
//
// = Big-endian, mips64r2, ABI 64, soft float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -1108,13 +1134,13 @@
// CHECK-BE-SF-64R2-64: "-internal-externc-isystem"
// CHECK-BE-SF-64R2-64: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-SF-64R2-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-SF-64R2-64: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64r2/64/sof"
+// CHECK-BE-SF-64R2-64: "--sysroot=[[TC]]/../../../../sysroot/mips64r2/64/sof"
// CHECK-BE-SF-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/sof/usr/lib{{/|\\\\}}crt1.o"
// CHECK-BE-SF-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/sof/usr/lib{{/|\\\\}}crti.o"
// CHECK-BE-SF-64R2-64: "[[TC]]/mips64r2/64/sof{{/|\\\\}}crtbegin.o"
-// CHECK-BE-SF-64R2-64: "-L[[SR]]/mips64r2/64/sof"
-// CHECK-BE-SF-64R2-64: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64r2/64/sof"
-// CHECK-BE-SF-64R2-64: "-L[[SR]]/../../../../sysroot/mips64r2/64/sof/usr/lib"
+// CHECK-BE-SF-64R2-64: "-L[[TC]]/mips64r2/64/sof"
+// CHECK-BE-SF-64R2-64: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64r2/64/sof"
+// CHECK-BE-SF-64R2-64: "-L[[TC]]/../../../../sysroot/mips64r2/64/sof/usr/lib"
// CHECK-BE-SF-64R2-64: "[[TC]]/mips64r2/64/sof{{/|\\\\}}crtend.o"
// CHECK-BE-SF-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/sof/usr/lib{{/|\\\\}}crtn.o"
//
@@ -1134,13 +1160,13 @@
// CHECK-BE-NAN-64R2-64: "-internal-externc-isystem"
// CHECK-BE-NAN-64R2-64: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-NAN-64R2-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-NAN-64R2-64: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64r2/64/nan2008"
+// CHECK-BE-NAN-64R2-64: "--sysroot=[[TC]]/../../../../sysroot/mips64r2/64/nan2008"
// CHECK-BE-NAN-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/nan2008/usr/lib{{/|\\\\}}crt1.o"
// CHECK-BE-NAN-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/nan2008/usr/lib{{/|\\\\}}crti.o"
// CHECK-BE-NAN-64R2-64: "[[TC]]/mips64r2/64/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-BE-NAN-64R2-64: "-L[[SR]]/mips64r2/64/nan2008"
-// CHECK-BE-NAN-64R2-64: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64r2/64/nan2008"
-// CHECK-BE-NAN-64R2-64: "-L[[SR]]/../../../../sysroot/mips64r2/64/nan2008/usr/lib"
+// CHECK-BE-NAN-64R2-64: "-L[[TC]]/mips64r2/64/nan2008"
+// CHECK-BE-NAN-64R2-64: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64r2/64/nan2008"
+// CHECK-BE-NAN-64R2-64: "-L[[TC]]/../../../../sysroot/mips64r2/64/nan2008/usr/lib"
// CHECK-BE-NAN-64R2-64: "[[TC]]/mips64r2/64/nan2008{{/|\\\\}}crtend.o"
// CHECK-BE-NAN-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/nan2008/usr/lib{{/|\\\\}}crtn.o"
//
@@ -1152,7 +1178,7 @@
// CHECK-BE-NAN64-64R2-64: "-internal-isystem"
// CHECK-BE-NAN64-64R2-64: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-BE-NAN64-64R2-64: "-internal-isystem"
-// CHECK-BE-NAN64-64R2-64: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/64/fp64/nan2008"
+// CHECK-BE-NAN64-64R2-64: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/64/nan2008"
// CHECK-BE-NAN64-64R2-64: "-internal-isystem"
// CHECK-BE-NAN64-64R2-64: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-BE-NAN64-64R2-64: "-internal-externc-isystem"
@@ -1160,15 +1186,41 @@
// CHECK-BE-NAN64-64R2-64: "-internal-externc-isystem"
// CHECK-BE-NAN64-64R2-64: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-BE-NAN64-64R2-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-BE-NAN64-64R2-64: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64r2/64/fp64/nan2008"
-// CHECK-BE-NAN64-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/fp64/nan2008/usr/lib{{/|\\\\}}crt1.o"
-// CHECK-BE-NAN64-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/fp64/nan2008/usr/lib{{/|\\\\}}crti.o"
-// CHECK-BE-NAN64-64R2-64: "[[TC]]/mips64r2/64/fp64/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-BE-NAN64-64R2-64: "-L[[SR]]/mips64r2/64/fp64/nan2008"
-// CHECK-BE-NAN64-64R2-64: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64r2/64/fp64/nan2008"
-// CHECK-BE-NAN64-64R2-64: "-L[[SR]]/../../../../sysroot/mips64r2/64/fp64/nan2008/usr/lib"
-// CHECK-BE-NAN64-64R2-64: "[[TC]]/mips64r2/64/fp64/nan2008{{/|\\\\}}crtend.o"
-// CHECK-BE-NAN64-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/fp64/nan2008/usr/lib{{/|\\\\}}crtn.o"
+// CHECK-BE-NAN64-64R2-64: "--sysroot=[[TC]]/../../../../sysroot/mips64r2/64/nan2008"
+// CHECK-BE-NAN64-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/nan2008/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-BE-NAN64-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/nan2008/usr/lib{{/|\\\\}}crti.o"
+// CHECK-BE-NAN64-64R2-64: "[[TC]]/mips64r2/64/nan2008{{/|\\\\}}crtbegin.o"
+// CHECK-BE-NAN64-64R2-64: "-L[[TC]]/mips64r2/64/nan2008"
+// CHECK-BE-NAN64-64R2-64: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64r2/64/nan2008"
+// CHECK-BE-NAN64-64R2-64: "-L[[TC]]/../../../../sysroot/mips64r2/64/nan2008/usr/lib"
+// CHECK-BE-NAN64-64R2-64: "[[TC]]/mips64r2/64/nan2008{{/|\\\\}}crtend.o"
+// CHECK-BE-NAN64-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/nan2008/usr/lib{{/|\\\\}}crtn.o"
+//
+// = Big-endian, default (mips64r2), ABI 64, fp64, nan2008
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips64-linux-gnu -mabi=64 -mfp64 -mnan=2008 \
+// RUN: --gcc-toolchain=%S/Inputs/mips_fsf_tree \
+// RUN: | FileCheck --check-prefix=CHECK-BE-NAN64-64R2-64-DEF %s
+// CHECK-BE-NAN64-64R2-64-DEF: "-internal-isystem"
+// CHECK-BE-NAN64-64R2-64-DEF: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
+// CHECK-BE-NAN64-64R2-64-DEF: "-internal-isystem"
+// CHECK-BE-NAN64-64R2-64-DEF: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/64/nan2008"
+// CHECK-BE-NAN64-64R2-64-DEF: "-internal-isystem"
+// CHECK-BE-NAN64-64R2-64-DEF: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
+// CHECK-BE-NAN64-64R2-64-DEF: "-internal-externc-isystem"
+// CHECK-BE-NAN64-64R2-64-DEF: "[[TC]]/include"
+// CHECK-BE-NAN64-64R2-64-DEF: "-internal-externc-isystem"
+// CHECK-BE-NAN64-64R2-64-DEF: "[[TC]]/../../../../sysroot/usr/include"
+// CHECK-BE-NAN64-64R2-64-DEF: "{{.*}}ld{{(.exe)?}}"
+// CHECK-BE-NAN64-64R2-64-DEF: "--sysroot=[[TC]]/../../../../sysroot/mips64r2/64/nan2008"
+// CHECK-BE-NAN64-64R2-64-DEF: "[[TC]]/../../../../sysroot/mips64r2/64/nan2008/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-BE-NAN64-64R2-64-DEF: "[[TC]]/../../../../sysroot/mips64r2/64/nan2008/usr/lib{{/|\\\\}}crti.o"
+// CHECK-BE-NAN64-64R2-64-DEF: "[[TC]]/mips64r2/64/nan2008{{/|\\\\}}crtbegin.o"
+// CHECK-BE-NAN64-64R2-64-DEF: "-L[[TC]]/mips64r2/64/nan2008"
+// CHECK-BE-NAN64-64R2-64-DEF: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64r2/64/nan2008"
+// CHECK-BE-NAN64-64R2-64-DEF: "-L[[TC]]/../../../../sysroot/mips64r2/64/nan2008/usr/lib"
+// CHECK-BE-NAN64-64R2-64-DEF: "[[TC]]/mips64r2/64/nan2008{{/|\\\\}}crtend.o"
+// CHECK-BE-NAN64-64R2-64-DEF: "[[TC]]/../../../../sysroot/mips64r2/64/nan2008/usr/lib{{/|\\\\}}crtn.o"
//
// = Little-endian, mips32, hard float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -1186,13 +1238,13 @@
// CHECK-EL-HF-32: "-internal-externc-isystem"
// CHECK-EL-HF-32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-HF-32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-HF-32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips32/el"
+// CHECK-EL-HF-32: "--sysroot=[[TC]]/../../../../sysroot/mips32/el"
// CHECK-EL-HF-32: "[[TC]]/../../../../sysroot/mips32/el/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-EL-HF-32: "[[TC]]/../../../../sysroot/mips32/el/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-EL-HF-32: "[[TC]]/mips32/el{{/|\\\\}}crtbegin.o"
-// CHECK-EL-HF-32: "-L[[SR]]/mips32/el"
-// CHECK-EL-HF-32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/el"
-// CHECK-EL-HF-32: "-L[[SR]]/../../../../sysroot/mips32/el/usr/lib/../lib"
+// CHECK-EL-HF-32: "-L[[TC]]/mips32/el"
+// CHECK-EL-HF-32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/el"
+// CHECK-EL-HF-32: "-L[[TC]]/../../../../sysroot/mips32/el/usr/lib/../lib"
// CHECK-EL-HF-32: "[[TC]]/mips32/el{{/|\\\\}}crtend.o"
// CHECK-EL-HF-32: "[[TC]]/../../../../sysroot/mips32/el/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -1204,7 +1256,7 @@
// CHECK-EL-HF64-32: "-internal-isystem"
// CHECK-EL-HF64-32: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-EL-HF64-32: "-internal-isystem"
-// CHECK-EL-HF64-32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips32/el/fp64"
+// CHECK-EL-HF64-32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips32/el"
// CHECK-EL-HF64-32: "-internal-isystem"
// CHECK-EL-HF64-32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-EL-HF64-32: "-internal-externc-isystem"
@@ -1212,15 +1264,15 @@
// CHECK-EL-HF64-32: "-internal-externc-isystem"
// CHECK-EL-HF64-32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-HF64-32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-HF64-32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips32/el/fp64"
-// CHECK-EL-HF64-32: "[[TC]]/../../../../sysroot/mips32/el/fp64/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-EL-HF64-32: "[[TC]]/../../../../sysroot/mips32/el/fp64/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-EL-HF64-32: "[[TC]]/mips32/el/fp64{{/|\\\\}}crtbegin.o"
-// CHECK-EL-HF64-32: "-L[[SR]]/mips32/el/fp64"
-// CHECK-EL-HF64-32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/el/fp64"
-// CHECK-EL-HF64-32: "-L[[SR]]/../../../../sysroot/mips32/el/fp64/usr/lib/../lib"
-// CHECK-EL-HF64-32: "[[TC]]/mips32/el/fp64{{/|\\\\}}crtend.o"
-// CHECK-EL-HF64-32: "[[TC]]/../../../../sysroot/mips32/el/fp64/usr/lib/../lib{{/|\\\\}}crtn.o"
+// CHECK-EL-HF64-32: "--sysroot=[[TC]]/../../../../sysroot/mips32/el"
+// CHECK-EL-HF64-32: "[[TC]]/../../../../sysroot/mips32/el/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-EL-HF64-32: "[[TC]]/../../../../sysroot/mips32/el/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-EL-HF64-32: "[[TC]]/mips32/el{{/|\\\\}}crtbegin.o"
+// CHECK-EL-HF64-32: "-L[[TC]]/mips32/el"
+// CHECK-EL-HF64-32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/el"
+// CHECK-EL-HF64-32: "-L[[TC]]/../../../../sysroot/mips32/el/usr/lib/../lib"
+// CHECK-EL-HF64-32: "[[TC]]/mips32/el{{/|\\\\}}crtend.o"
+// CHECK-EL-HF64-32: "[[TC]]/../../../../sysroot/mips32/el/usr/lib/../lib{{/|\\\\}}crtn.o"
//
// = Little-endian, mips32, soft float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -1238,13 +1290,13 @@
// CHECK-EL-SF-32: "-internal-externc-isystem"
// CHECK-EL-SF-32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-SF-32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-SF-32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips32/el/sof"
+// CHECK-EL-SF-32: "--sysroot=[[TC]]/../../../../sysroot/mips32/el/sof"
// CHECK-EL-SF-32: "[[TC]]/../../../../sysroot/mips32/el/sof/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-EL-SF-32: "[[TC]]/../../../../sysroot/mips32/el/sof/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-EL-SF-32: "[[TC]]/mips32/el/sof{{/|\\\\}}crtbegin.o"
-// CHECK-EL-SF-32: "-L[[SR]]/mips32/el/sof"
-// CHECK-EL-SF-32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/el/sof"
-// CHECK-EL-SF-32: "-L[[SR]]/../../../../sysroot/mips32/el/sof/usr/lib/../lib"
+// CHECK-EL-SF-32: "-L[[TC]]/mips32/el/sof"
+// CHECK-EL-SF-32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/el/sof"
+// CHECK-EL-SF-32: "-L[[TC]]/../../../../sysroot/mips32/el/sof/usr/lib/../lib"
// CHECK-EL-SF-32: "[[TC]]/mips32/el/sof{{/|\\\\}}crtend.o"
// CHECK-EL-SF-32: "[[TC]]/../../../../sysroot/mips32/el/sof/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -1264,13 +1316,13 @@
// CHECK-EL-HF-16: "-internal-externc-isystem"
// CHECK-EL-HF-16: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-HF-16: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-HF-16: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips32/mips16/el"
+// CHECK-EL-HF-16: "--sysroot=[[TC]]/../../../../sysroot/mips32/mips16/el"
// CHECK-EL-HF-16: "[[TC]]/../../../../sysroot/mips32/mips16/el/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-EL-HF-16: "[[TC]]/../../../../sysroot/mips32/mips16/el/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-EL-HF-16: "[[TC]]/mips32/mips16/el{{/|\\\\}}crtbegin.o"
-// CHECK-EL-HF-16: "-L[[SR]]/mips32/mips16/el"
-// CHECK-EL-HF-16: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/mips16/el"
-// CHECK-EL-HF-16: "-L[[SR]]/../../../../sysroot/mips32/mips16/el/usr/lib/../lib"
+// CHECK-EL-HF-16: "-L[[TC]]/mips32/mips16/el"
+// CHECK-EL-HF-16: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/mips16/el"
+// CHECK-EL-HF-16: "-L[[TC]]/../../../../sysroot/mips32/mips16/el/usr/lib/../lib"
// CHECK-EL-HF-16: "[[TC]]/mips32/mips16/el{{/|\\\\}}crtend.o"
// CHECK-EL-HF-16: "[[TC]]/../../../../sysroot/mips32/mips16/el/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -1282,7 +1334,7 @@
// CHECK-EL-HF64-16: "-internal-isystem"
// CHECK-EL-HF64-16: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-EL-HF64-16: "-internal-isystem"
-// CHECK-EL-HF64-16: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips32/mips16/el/fp64"
+// CHECK-EL-HF64-16: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips32/mips16/el"
// CHECK-EL-HF64-16: "-internal-isystem"
// CHECK-EL-HF64-16: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-EL-HF64-16: "-internal-externc-isystem"
@@ -1290,15 +1342,15 @@
// CHECK-EL-HF64-16: "-internal-externc-isystem"
// CHECK-EL-HF64-16: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-HF64-16: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-HF64-16: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips32/mips16/el/fp64"
-// CHECK-EL-HF64-16: "[[TC]]/../../../../sysroot/mips32/mips16/el/fp64/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-EL-HF64-16: "[[TC]]/../../../../sysroot/mips32/mips16/el/fp64/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-EL-HF64-16: "[[TC]]/mips32/mips16/el/fp64{{/|\\\\}}crtbegin.o"
-// CHECK-EL-HF64-16: "-L[[SR]]/mips32/mips16/el/fp64"
-// CHECK-EL-HF64-16: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/mips16/el/fp64"
-// CHECK-EL-HF64-16: "-L[[SR]]/../../../../sysroot/mips32/mips16/el/fp64/usr/lib/../lib"
-// CHECK-EL-HF64-16: "[[TC]]/mips32/mips16/el/fp64{{/|\\\\}}crtend.o"
-// CHECK-EL-HF64-16: "[[TC]]/../../../../sysroot/mips32/mips16/el/fp64/usr/lib/../lib{{/|\\\\}}crtn.o"
+// CHECK-EL-HF64-16: "--sysroot=[[TC]]/../../../../sysroot/mips32/mips16/el"
+// CHECK-EL-HF64-16: "[[TC]]/../../../../sysroot/mips32/mips16/el/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-EL-HF64-16: "[[TC]]/../../../../sysroot/mips32/mips16/el/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-EL-HF64-16: "[[TC]]/mips32/mips16/el{{/|\\\\}}crtbegin.o"
+// CHECK-EL-HF64-16: "-L[[TC]]/mips32/mips16/el"
+// CHECK-EL-HF64-16: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/mips16/el"
+// CHECK-EL-HF64-16: "-L[[TC]]/../../../../sysroot/mips32/mips16/el/usr/lib/../lib"
+// CHECK-EL-HF64-16: "[[TC]]/mips32/mips16/el{{/|\\\\}}crtend.o"
+// CHECK-EL-HF64-16: "[[TC]]/../../../../sysroot/mips32/mips16/el/usr/lib/../lib{{/|\\\\}}crtn.o"
//
// = Little-endian, mips32 / mips16, soft float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -1316,13 +1368,13 @@
// CHECK-EL-SF-16: "-internal-externc-isystem"
// CHECK-EL-SF-16: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-SF-16: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-SF-16: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips32/mips16/el/sof"
+// CHECK-EL-SF-16: "--sysroot=[[TC]]/../../../../sysroot/mips32/mips16/el/sof"
// CHECK-EL-SF-16: "[[TC]]/../../../../sysroot/mips32/mips16/el/sof/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-EL-SF-16: "[[TC]]/../../../../sysroot/mips32/mips16/el/sof/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-EL-SF-16: "[[TC]]/mips32/mips16/el/sof{{/|\\\\}}crtbegin.o"
-// CHECK-EL-SF-16: "-L[[SR]]/mips32/mips16/el/sof"
-// CHECK-EL-SF-16: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/mips16/el/sof"
-// CHECK-EL-SF-16: "-L[[SR]]/../../../../sysroot/mips32/mips16/el/sof/usr/lib/../lib"
+// CHECK-EL-SF-16: "-L[[TC]]/mips32/mips16/el/sof"
+// CHECK-EL-SF-16: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/mips16/el/sof"
+// CHECK-EL-SF-16: "-L[[TC]]/../../../../sysroot/mips32/mips16/el/sof/usr/lib/../lib"
// CHECK-EL-SF-16: "[[TC]]/mips32/mips16/el/sof{{/|\\\\}}crtend.o"
// CHECK-EL-SF-16: "[[TC]]/../../../../sysroot/mips32/mips16/el/sof/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -1342,13 +1394,13 @@
// CHECK-EL-NAN-16: "-internal-externc-isystem"
// CHECK-EL-NAN-16: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-NAN-16: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-NAN-16: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips32/mips16/el/nan2008"
+// CHECK-EL-NAN-16: "--sysroot=[[TC]]/../../../../sysroot/mips32/mips16/el/nan2008"
// CHECK-EL-NAN-16: "[[TC]]/../../../../sysroot/mips32/mips16/el/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-EL-NAN-16: "[[TC]]/../../../../sysroot/mips32/mips16/el/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-EL-NAN-16: "[[TC]]/mips32/mips16/el/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-EL-NAN-16: "-L[[SR]]/mips32/mips16/el/nan2008"
-// CHECK-EL-NAN-16: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/mips16/el/nan2008"
-// CHECK-EL-NAN-16: "-L[[SR]]/../../../../sysroot/mips32/mips16/el/nan2008/usr/lib/../lib"
+// CHECK-EL-NAN-16: "-L[[TC]]/mips32/mips16/el/nan2008"
+// CHECK-EL-NAN-16: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/mips16/el/nan2008"
+// CHECK-EL-NAN-16: "-L[[TC]]/../../../../sysroot/mips32/mips16/el/nan2008/usr/lib/../lib"
// CHECK-EL-NAN-16: "[[TC]]/mips32/mips16/el/nan2008{{/|\\\\}}crtend.o"
// CHECK-EL-NAN-16: "[[TC]]/../../../../sysroot/mips32/mips16/el/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -1360,7 +1412,7 @@
// CHECK-EL-NAN64-16: "-internal-isystem"
// CHECK-EL-NAN64-16: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-EL-NAN64-16: "-internal-isystem"
-// CHECK-EL-NAN64-16: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips32/mips16/el/fp64/nan2008"
+// CHECK-EL-NAN64-16: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips32/mips16/el/nan2008"
// CHECK-EL-NAN64-16: "-internal-isystem"
// CHECK-EL-NAN64-16: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-EL-NAN64-16: "-internal-externc-isystem"
@@ -1368,15 +1420,15 @@
// CHECK-EL-NAN64-16: "-internal-externc-isystem"
// CHECK-EL-NAN64-16: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-NAN64-16: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-NAN64-16: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips32/mips16/el/fp64/nan2008"
-// CHECK-EL-NAN64-16: "[[TC]]/../../../../sysroot/mips32/mips16/el/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-EL-NAN64-16: "[[TC]]/../../../../sysroot/mips32/mips16/el/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-EL-NAN64-16: "[[TC]]/mips32/mips16/el/fp64/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-EL-NAN64-16: "-L[[SR]]/mips32/mips16/el/fp64/nan2008"
-// CHECK-EL-NAN64-16: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/mips16/el/fp64/nan2008"
-// CHECK-EL-NAN64-16: "-L[[SR]]/../../../../sysroot/mips32/mips16/el/fp64/nan2008/usr/lib/../lib"
-// CHECK-EL-NAN64-16: "[[TC]]/mips32/mips16/el/fp64/nan2008{{/|\\\\}}crtend.o"
-// CHECK-EL-NAN64-16: "[[TC]]/../../../../sysroot/mips32/mips16/el/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
+// CHECK-EL-NAN64-16: "--sysroot=[[TC]]/../../../../sysroot/mips32/mips16/el/nan2008"
+// CHECK-EL-NAN64-16: "[[TC]]/../../../../sysroot/mips32/mips16/el/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-EL-NAN64-16: "[[TC]]/../../../../sysroot/mips32/mips16/el/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-EL-NAN64-16: "[[TC]]/mips32/mips16/el/nan2008{{/|\\\\}}crtbegin.o"
+// CHECK-EL-NAN64-16: "-L[[TC]]/mips32/mips16/el/nan2008"
+// CHECK-EL-NAN64-16: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/mips16/el/nan2008"
+// CHECK-EL-NAN64-16: "-L[[TC]]/../../../../sysroot/mips32/mips16/el/nan2008/usr/lib/../lib"
+// CHECK-EL-NAN64-16: "[[TC]]/mips32/mips16/el/nan2008{{/|\\\\}}crtend.o"
+// CHECK-EL-NAN64-16: "[[TC]]/../../../../sysroot/mips32/mips16/el/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
//
// = Little-endian, mips32, nan2008
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -1394,13 +1446,13 @@
// CHECK-EL-NAN-32: "-internal-externc-isystem"
// CHECK-EL-NAN-32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-NAN-32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-NAN-32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips32/el/nan2008"
+// CHECK-EL-NAN-32: "--sysroot=[[TC]]/../../../../sysroot/mips32/el/nan2008"
// CHECK-EL-NAN-32: "[[TC]]/../../../../sysroot/mips32/el/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-EL-NAN-32: "[[TC]]/../../../../sysroot/mips32/el/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-EL-NAN-32: "[[TC]]/mips32/el/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-EL-NAN-32: "-L[[SR]]/mips32/el/nan2008"
-// CHECK-EL-NAN-32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/el/nan2008"
-// CHECK-EL-NAN-32: "-L[[SR]]/../../../../sysroot/mips32/el/nan2008/usr/lib/../lib"
+// CHECK-EL-NAN-32: "-L[[TC]]/mips32/el/nan2008"
+// CHECK-EL-NAN-32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/el/nan2008"
+// CHECK-EL-NAN-32: "-L[[TC]]/../../../../sysroot/mips32/el/nan2008/usr/lib/../lib"
// CHECK-EL-NAN-32: "[[TC]]/mips32/el/nan2008{{/|\\\\}}crtend.o"
// CHECK-EL-NAN-32: "[[TC]]/../../../../sysroot/mips32/el/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -1412,7 +1464,7 @@
// CHECK-EL-NAN64-32: "-internal-isystem"
// CHECK-EL-NAN64-32: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-EL-NAN64-32: "-internal-isystem"
-// CHECK-EL-NAN64-32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips32/el/fp64/nan2008"
+// CHECK-EL-NAN64-32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips32/el/nan2008"
// CHECK-EL-NAN64-32: "-internal-isystem"
// CHECK-EL-NAN64-32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-EL-NAN64-32: "-internal-externc-isystem"
@@ -1420,15 +1472,15 @@
// CHECK-EL-NAN64-32: "-internal-externc-isystem"
// CHECK-EL-NAN64-32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-NAN64-32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-NAN64-32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips32/el/fp64/nan2008"
-// CHECK-EL-NAN64-32: "[[TC]]/../../../../sysroot/mips32/el/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-EL-NAN64-32: "[[TC]]/../../../../sysroot/mips32/el/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-EL-NAN64-32: "[[TC]]/mips32/el/fp64/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-EL-NAN64-32: "-L[[SR]]/mips32/el/fp64/nan2008"
-// CHECK-EL-NAN64-32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/el/fp64/nan2008"
-// CHECK-EL-NAN64-32: "-L[[SR]]/../../../../sysroot/mips32/el/fp64/nan2008/usr/lib/../lib"
-// CHECK-EL-NAN64-32: "[[TC]]/mips32/el/fp64/nan2008{{/|\\\\}}crtend.o"
-// CHECK-EL-NAN64-32: "[[TC]]/../../../../sysroot/mips32/el/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
+// CHECK-EL-NAN64-32: "--sysroot=[[TC]]/../../../../sysroot/mips32/el/nan2008"
+// CHECK-EL-NAN64-32: "[[TC]]/../../../../sysroot/mips32/el/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-EL-NAN64-32: "[[TC]]/../../../../sysroot/mips32/el/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-EL-NAN64-32: "[[TC]]/mips32/el/nan2008{{/|\\\\}}crtbegin.o"
+// CHECK-EL-NAN64-32: "-L[[TC]]/mips32/el/nan2008"
+// CHECK-EL-NAN64-32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips32/el/nan2008"
+// CHECK-EL-NAN64-32: "-L[[TC]]/../../../../sysroot/mips32/el/nan2008/usr/lib/../lib"
+// CHECK-EL-NAN64-32: "[[TC]]/mips32/el/nan2008{{/|\\\\}}crtend.o"
+// CHECK-EL-NAN64-32: "[[TC]]/../../../../sysroot/mips32/el/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
//
// = Little-endian, mips32r2, hard float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -1446,13 +1498,13 @@
// CHECK-EL-HF-32R2: "-internal-externc-isystem"
// CHECK-EL-HF-32R2: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-HF-32R2: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-HF-32R2: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/el"
+// CHECK-EL-HF-32R2: "--sysroot=[[TC]]/../../../../sysroot/el"
// CHECK-EL-HF-32R2: "[[TC]]/../../../../sysroot/el/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-EL-HF-32R2: "[[TC]]/../../../../sysroot/el/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-EL-HF-32R2: "[[TC]]/el{{/|\\\\}}crtbegin.o"
-// CHECK-EL-HF-32R2: "-L[[SR]]/el"
-// CHECK-EL-HF-32R2: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/el"
-// CHECK-EL-HF-32R2: "-L[[SR]]/../../../../sysroot/el/usr/lib/../lib"
+// CHECK-EL-HF-32R2: "-L[[TC]]/el"
+// CHECK-EL-HF-32R2: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/el"
+// CHECK-EL-HF-32R2: "-L[[TC]]/../../../../sysroot/el/usr/lib/../lib"
// CHECK-EL-HF-32R2: "[[TC]]/el{{/|\\\\}}crtend.o"
// CHECK-EL-HF-32R2: "[[TC]]/../../../../sysroot/el/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -1464,7 +1516,7 @@
// CHECK-EL-HF64-32R2: "-internal-isystem"
// CHECK-EL-HF64-32R2: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-EL-HF64-32R2: "-internal-isystem"
-// CHECK-EL-HF64-32R2: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/el/fp64"
+// CHECK-EL-HF64-32R2: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/el"
// CHECK-EL-HF64-32R2: "-internal-isystem"
// CHECK-EL-HF64-32R2: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-EL-HF64-32R2: "-internal-externc-isystem"
@@ -1472,15 +1524,15 @@
// CHECK-EL-HF64-32R2: "-internal-externc-isystem"
// CHECK-EL-HF64-32R2: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-HF64-32R2: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-HF64-32R2: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/el/fp64"
-// CHECK-EL-HF64-32R2: "[[TC]]/../../../../sysroot/el/fp64/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-EL-HF64-32R2: "[[TC]]/../../../../sysroot/el/fp64/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-EL-HF64-32R2: "[[TC]]/el/fp64{{/|\\\\}}crtbegin.o"
-// CHECK-EL-HF64-32R2: "-L[[SR]]/el/fp64"
-// CHECK-EL-HF64-32R2: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/el/fp64"
-// CHECK-EL-HF64-32R2: "-L[[SR]]/../../../../sysroot/el/fp64/usr/lib/../lib"
-// CHECK-EL-HF64-32R2: "[[TC]]/el/fp64{{/|\\\\}}crtend.o"
-// CHECK-EL-HF64-32R2: "[[TC]]/../../../../sysroot/el/fp64/usr/lib/../lib{{/|\\\\}}crtn.o"
+// CHECK-EL-HF64-32R2: "--sysroot=[[TC]]/../../../../sysroot/el"
+// CHECK-EL-HF64-32R2: "[[TC]]/../../../../sysroot/el/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-EL-HF64-32R2: "[[TC]]/../../../../sysroot/el/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-EL-HF64-32R2: "[[TC]]/el{{/|\\\\}}crtbegin.o"
+// CHECK-EL-HF64-32R2: "-L[[TC]]/el"
+// CHECK-EL-HF64-32R2: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/el"
+// CHECK-EL-HF64-32R2: "-L[[TC]]/../../../../sysroot/el/usr/lib/../lib"
+// CHECK-EL-HF64-32R2: "[[TC]]/el{{/|\\\\}}crtend.o"
+// CHECK-EL-HF64-32R2: "[[TC]]/../../../../sysroot/el/usr/lib/../lib{{/|\\\\}}crtn.o"
//
// = Little-endian, mips32r2, soft float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -1498,13 +1550,13 @@
// CHECK-EL-SF-32R2: "-internal-externc-isystem"
// CHECK-EL-SF-32R2: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-SF-32R2: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-SF-32R2: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/el/sof"
+// CHECK-EL-SF-32R2: "--sysroot=[[TC]]/../../../../sysroot/el/sof"
// CHECK-EL-SF-32R2: "[[TC]]/../../../../sysroot/el/sof/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-EL-SF-32R2: "[[TC]]/../../../../sysroot/el/sof/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-EL-SF-32R2: "[[TC]]/el/sof{{/|\\\\}}crtbegin.o"
-// CHECK-EL-SF-32R2: "-L[[SR]]/el/sof"
-// CHECK-EL-SF-32R2: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/el/sof"
-// CHECK-EL-SF-32R2: "-L[[SR]]/../../../../sysroot/el/sof/usr/lib/../lib"
+// CHECK-EL-SF-32R2: "-L[[TC]]/el/sof"
+// CHECK-EL-SF-32R2: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/el/sof"
+// CHECK-EL-SF-32R2: "-L[[TC]]/../../../../sysroot/el/sof/usr/lib/../lib"
// CHECK-EL-SF-32R2: "[[TC]]/el/sof{{/|\\\\}}crtend.o"
// CHECK-EL-SF-32R2: "[[TC]]/../../../../sysroot/el/sof/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -1524,13 +1576,13 @@
// CHECK-EL-HF-16R2: "-internal-externc-isystem"
// CHECK-EL-HF-16R2: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-HF-16R2: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-HF-16R2: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips16/el"
+// CHECK-EL-HF-16R2: "--sysroot=[[TC]]/../../../../sysroot/mips16/el"
// CHECK-EL-HF-16R2: "[[TC]]/../../../../sysroot/mips16/el/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-EL-HF-16R2: "[[TC]]/../../../../sysroot/mips16/el/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-EL-HF-16R2: "[[TC]]/mips16/el{{/|\\\\}}crtbegin.o"
-// CHECK-EL-HF-16R2: "-L[[SR]]/mips16/el"
-// CHECK-EL-HF-16R2: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips16/el"
-// CHECK-EL-HF-16R2: "-L[[SR]]/../../../../sysroot/mips16/el/usr/lib/../lib"
+// CHECK-EL-HF-16R2: "-L[[TC]]/mips16/el"
+// CHECK-EL-HF-16R2: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips16/el"
+// CHECK-EL-HF-16R2: "-L[[TC]]/../../../../sysroot/mips16/el/usr/lib/../lib"
// CHECK-EL-HF-16R2: "[[TC]]/mips16/el{{/|\\\\}}crtend.o"
// CHECK-EL-HF-16R2: "[[TC]]/../../../../sysroot/mips16/el/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -1542,7 +1594,7 @@
// CHECK-EL-HF64-16R2: "-internal-isystem"
// CHECK-EL-HF64-16R2: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-EL-HF64-16R2: "-internal-isystem"
-// CHECK-EL-HF64-16R2: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips16/el/fp64"
+// CHECK-EL-HF64-16R2: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips16/el"
// CHECK-EL-HF64-16R2: "-internal-isystem"
// CHECK-EL-HF64-16R2: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-EL-HF64-16R2: "-internal-externc-isystem"
@@ -1550,15 +1602,15 @@
// CHECK-EL-HF64-16R2: "-internal-externc-isystem"
// CHECK-EL-HF64-16R2: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-HF64-16R2: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-HF64-16R2: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips16/el/fp64"
-// CHECK-EL-HF64-16R2: "[[TC]]/../../../../sysroot/mips16/el/fp64/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-EL-HF64-16R2: "[[TC]]/../../../../sysroot/mips16/el/fp64/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-EL-HF64-16R2: "[[TC]]/mips16/el/fp64{{/|\\\\}}crtbegin.o"
-// CHECK-EL-HF64-16R2: "-L[[SR]]/mips16/el/fp64"
-// CHECK-EL-HF64-16R2: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips16/el/fp64"
-// CHECK-EL-HF64-16R2: "-L[[SR]]/../../../../sysroot/mips16/el/fp64/usr/lib/../lib"
-// CHECK-EL-HF64-16R2: "[[TC]]/mips16/el/fp64{{/|\\\\}}crtend.o"
-// CHECK-EL-HF64-16R2: "[[TC]]/../../../../sysroot/mips16/el/fp64/usr/lib/../lib{{/|\\\\}}crtn.o"
+// CHECK-EL-HF64-16R2: "--sysroot=[[TC]]/../../../../sysroot/mips16/el"
+// CHECK-EL-HF64-16R2: "[[TC]]/../../../../sysroot/mips16/el/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-EL-HF64-16R2: "[[TC]]/../../../../sysroot/mips16/el/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-EL-HF64-16R2: "[[TC]]/mips16/el{{/|\\\\}}crtbegin.o"
+// CHECK-EL-HF64-16R2: "-L[[TC]]/mips16/el"
+// CHECK-EL-HF64-16R2: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips16/el"
+// CHECK-EL-HF64-16R2: "-L[[TC]]/../../../../sysroot/mips16/el/usr/lib/../lib"
+// CHECK-EL-HF64-16R2: "[[TC]]/mips16/el{{/|\\\\}}crtend.o"
+// CHECK-EL-HF64-16R2: "[[TC]]/../../../../sysroot/mips16/el/usr/lib/../lib{{/|\\\\}}crtn.o"
//
// = Little-endian, mips32r2 / mips16, soft float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -1576,13 +1628,13 @@
// CHECK-EL-SF-16R2: "-internal-externc-isystem"
// CHECK-EL-SF-16R2: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-SF-16R2: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-SF-16R2: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips16/el/sof"
+// CHECK-EL-SF-16R2: "--sysroot=[[TC]]/../../../../sysroot/mips16/el/sof"
// CHECK-EL-SF-16R2: "[[TC]]/../../../../sysroot/mips16/el/sof/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-EL-SF-16R2: "[[TC]]/../../../../sysroot/mips16/el/sof/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-EL-SF-16R2: "[[TC]]/mips16/el/sof{{/|\\\\}}crtbegin.o"
-// CHECK-EL-SF-16R2: "-L[[SR]]/mips16/el/sof"
-// CHECK-EL-SF-16R2: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips16/el/sof"
-// CHECK-EL-SF-16R2: "-L[[SR]]/../../../../sysroot/mips16/el/sof/usr/lib/../lib"
+// CHECK-EL-SF-16R2: "-L[[TC]]/mips16/el/sof"
+// CHECK-EL-SF-16R2: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips16/el/sof"
+// CHECK-EL-SF-16R2: "-L[[TC]]/../../../../sysroot/mips16/el/sof/usr/lib/../lib"
// CHECK-EL-SF-16R2: "[[TC]]/mips16/el/sof{{/|\\\\}}crtend.o"
// CHECK-EL-SF-16R2: "[[TC]]/../../../../sysroot/mips16/el/sof/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -1602,13 +1654,13 @@
// CHECK-EL-NAN-16R2: "-internal-externc-isystem"
// CHECK-EL-NAN-16R2: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-NAN-16R2: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-NAN-16R2: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips16/el/nan2008"
+// CHECK-EL-NAN-16R2: "--sysroot=[[TC]]/../../../../sysroot/mips16/el/nan2008"
// CHECK-EL-NAN-16R2: "[[TC]]/../../../../sysroot/mips16/el/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-EL-NAN-16R2: "[[TC]]/../../../../sysroot/mips16/el/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-EL-NAN-16R2: "[[TC]]/mips16/el/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-EL-NAN-16R2: "-L[[SR]]/mips16/el/nan2008"
-// CHECK-EL-NAN-16R2: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips16/el/nan2008"
-// CHECK-EL-NAN-16R2: "-L[[SR]]/../../../../sysroot/mips16/el/nan2008/usr/lib/../lib"
+// CHECK-EL-NAN-16R2: "-L[[TC]]/mips16/el/nan2008"
+// CHECK-EL-NAN-16R2: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips16/el/nan2008"
+// CHECK-EL-NAN-16R2: "-L[[TC]]/../../../../sysroot/mips16/el/nan2008/usr/lib/../lib"
// CHECK-EL-NAN-16R2: "[[TC]]/mips16/el/nan2008{{/|\\\\}}crtend.o"
// CHECK-EL-NAN-16R2: "[[TC]]/../../../../sysroot/mips16/el/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -1620,7 +1672,7 @@
// CHECK-EL-NAN64-16R2: "-internal-isystem"
// CHECK-EL-NAN64-16R2: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-EL-NAN64-16R2: "-internal-isystem"
-// CHECK-EL-NAN64-16R2: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips16/el/fp64/nan2008"
+// CHECK-EL-NAN64-16R2: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips16/el/nan2008"
// CHECK-EL-NAN64-16R2: "-internal-isystem"
// CHECK-EL-NAN64-16R2: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-EL-NAN64-16R2: "-internal-externc-isystem"
@@ -1628,15 +1680,15 @@
// CHECK-EL-NAN64-16R2: "-internal-externc-isystem"
// CHECK-EL-NAN64-16R2: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-NAN64-16R2: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-NAN64-16R2: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips16/el/fp64/nan2008"
-// CHECK-EL-NAN64-16R2: "[[TC]]/../../../../sysroot/mips16/el/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-EL-NAN64-16R2: "[[TC]]/../../../../sysroot/mips16/el/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-EL-NAN64-16R2: "[[TC]]/mips16/el/fp64/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-EL-NAN64-16R2: "-L[[SR]]/mips16/el/fp64/nan2008"
-// CHECK-EL-NAN64-16R2: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/mips16/el/fp64/nan2008"
-// CHECK-EL-NAN64-16R2: "-L[[SR]]/../../../../sysroot/mips16/el/fp64/nan2008/usr/lib/../lib"
-// CHECK-EL-NAN64-16R2: "[[TC]]/mips16/el/fp64/nan2008{{/|\\\\}}crtend.o"
-// CHECK-EL-NAN64-16R2: "[[TC]]/../../../../sysroot/mips16/el/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
+// CHECK-EL-NAN64-16R2: "--sysroot=[[TC]]/../../../../sysroot/mips16/el/nan2008"
+// CHECK-EL-NAN64-16R2: "[[TC]]/../../../../sysroot/mips16/el/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-EL-NAN64-16R2: "[[TC]]/../../../../sysroot/mips16/el/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-EL-NAN64-16R2: "[[TC]]/mips16/el/nan2008{{/|\\\\}}crtbegin.o"
+// CHECK-EL-NAN64-16R2: "-L[[TC]]/mips16/el/nan2008"
+// CHECK-EL-NAN64-16R2: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/mips16/el/nan2008"
+// CHECK-EL-NAN64-16R2: "-L[[TC]]/../../../../sysroot/mips16/el/nan2008/usr/lib/../lib"
+// CHECK-EL-NAN64-16R2: "[[TC]]/mips16/el/nan2008{{/|\\\\}}crtend.o"
+// CHECK-EL-NAN64-16R2: "[[TC]]/../../../../sysroot/mips16/el/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
//
// = Little-endian, mips32r2, nan2008
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -1654,13 +1706,13 @@
// CHECK-EL-NAN-32R2: "-internal-externc-isystem"
// CHECK-EL-NAN-32R2: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-NAN-32R2: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-NAN-32R2: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/el/nan2008"
+// CHECK-EL-NAN-32R2: "--sysroot=[[TC]]/../../../../sysroot/el/nan2008"
// CHECK-EL-NAN-32R2: "[[TC]]/../../../../sysroot/el/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-EL-NAN-32R2: "[[TC]]/../../../../sysroot/el/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-EL-NAN-32R2: "[[TC]]/el/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-EL-NAN-32R2: "-L[[SR]]/el/nan2008"
-// CHECK-EL-NAN-32R2: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/el/nan2008"
-// CHECK-EL-NAN-32R2: "-L[[SR]]/../../../../sysroot/el/nan2008/usr/lib/../lib"
+// CHECK-EL-NAN-32R2: "-L[[TC]]/el/nan2008"
+// CHECK-EL-NAN-32R2: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/el/nan2008"
+// CHECK-EL-NAN-32R2: "-L[[TC]]/../../../../sysroot/el/nan2008/usr/lib/../lib"
// CHECK-EL-NAN-32R2: "[[TC]]/el/nan2008{{/|\\\\}}crtend.o"
// CHECK-EL-NAN-32R2: "[[TC]]/../../../../sysroot/el/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -1672,7 +1724,7 @@
// CHECK-EL-NAN64-32R2: "-internal-isystem"
// CHECK-EL-NAN64-32R2: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-EL-NAN64-32R2: "-internal-isystem"
-// CHECK-EL-NAN64-32R2: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/el/fp64/nan2008"
+// CHECK-EL-NAN64-32R2: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/el/nan2008"
// CHECK-EL-NAN64-32R2: "-internal-isystem"
// CHECK-EL-NAN64-32R2: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-EL-NAN64-32R2: "-internal-externc-isystem"
@@ -1680,15 +1732,41 @@
// CHECK-EL-NAN64-32R2: "-internal-externc-isystem"
// CHECK-EL-NAN64-32R2: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-NAN64-32R2: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-NAN64-32R2: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/el/fp64/nan2008"
-// CHECK-EL-NAN64-32R2: "[[TC]]/../../../../sysroot/el/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-EL-NAN64-32R2: "[[TC]]/../../../../sysroot/el/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-EL-NAN64-32R2: "[[TC]]/el/fp64/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-EL-NAN64-32R2: "-L[[SR]]/el/fp64/nan2008"
-// CHECK-EL-NAN64-32R2: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/el/fp64/nan2008"
-// CHECK-EL-NAN64-32R2: "-L[[SR]]/../../../../sysroot/el/fp64/nan2008/usr/lib/../lib"
-// CHECK-EL-NAN64-32R2: "[[TC]]/el/fp64/nan2008{{/|\\\\}}crtend.o"
-// CHECK-EL-NAN64-32R2: "[[TC]]/../../../../sysroot/el/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
+// CHECK-EL-NAN64-32R2: "--sysroot=[[TC]]/../../../../sysroot/el/nan2008"
+// CHECK-EL-NAN64-32R2: "[[TC]]/../../../../sysroot/el/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-EL-NAN64-32R2: "[[TC]]/../../../../sysroot/el/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-EL-NAN64-32R2: "[[TC]]/el/nan2008{{/|\\\\}}crtbegin.o"
+// CHECK-EL-NAN64-32R2: "-L[[TC]]/el/nan2008"
+// CHECK-EL-NAN64-32R2: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/el/nan2008"
+// CHECK-EL-NAN64-32R2: "-L[[TC]]/../../../../sysroot/el/nan2008/usr/lib/../lib"
+// CHECK-EL-NAN64-32R2: "[[TC]]/el/nan2008{{/|\\\\}}crtend.o"
+// CHECK-EL-NAN64-32R2: "[[TC]]/../../../../sysroot/el/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
+//
+// = Little-endian, default (mips32r2), fp64, nan2008
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mipsel-linux-gnu -mfp64 -mnan=2008 \
+// RUN: --gcc-toolchain=%S/Inputs/mips_fsf_tree \
+// RUN: | FileCheck --check-prefix=CHECK-EL-NAN64-32R2-DEF %s
+// CHECK-EL-NAN64-32R2-DEF: "-internal-isystem"
+// CHECK-EL-NAN64-32R2-DEF: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
+// CHECK-EL-NAN64-32R2-DEF: "-internal-isystem"
+// CHECK-EL-NAN64-32R2-DEF: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/el/nan2008"
+// CHECK-EL-NAN64-32R2-DEF: "-internal-isystem"
+// CHECK-EL-NAN64-32R2-DEF: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
+// CHECK-EL-NAN64-32R2-DEF: "-internal-externc-isystem"
+// CHECK-EL-NAN64-32R2-DEF: "[[TC]]/include"
+// CHECK-EL-NAN64-32R2-DEF: "-internal-externc-isystem"
+// CHECK-EL-NAN64-32R2-DEF: "[[TC]]/../../../../sysroot/usr/include"
+// CHECK-EL-NAN64-32R2-DEF: "{{.*}}ld{{(.exe)?}}"
+// CHECK-EL-NAN64-32R2-DEF: "--sysroot=[[TC]]/../../../../sysroot/el/nan2008"
+// CHECK-EL-NAN64-32R2-DEF: "[[TC]]/../../../../sysroot/el/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-EL-NAN64-32R2-DEF: "[[TC]]/../../../../sysroot/el/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-EL-NAN64-32R2-DEF: "[[TC]]/el/nan2008{{/|\\\\}}crtbegin.o"
+// CHECK-EL-NAN64-32R2-DEF: "-L[[TC]]/el/nan2008"
+// CHECK-EL-NAN64-32R2-DEF: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/el/nan2008"
+// CHECK-EL-NAN64-32R2-DEF: "-L[[TC]]/../../../../sysroot/el/nan2008/usr/lib/../lib"
+// CHECK-EL-NAN64-32R2-DEF: "[[TC]]/el/nan2008{{/|\\\\}}crtend.o"
+// CHECK-EL-NAN64-32R2-DEF: "[[TC]]/../../../../sysroot/el/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
//
// = Little-endian, micromips, hard float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -1706,13 +1784,13 @@
// CHECK-EL-HF-MM: "-internal-externc-isystem"
// CHECK-EL-HF-MM: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-HF-MM: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-HF-MM: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/micromips/el"
+// CHECK-EL-HF-MM: "--sysroot=[[TC]]/../../../../sysroot/micromips/el"
// CHECK-EL-HF-MM: "[[TC]]/../../../../sysroot/micromips/el/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-EL-HF-MM: "[[TC]]/../../../../sysroot/micromips/el/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-EL-HF-MM: "[[TC]]/micromips/el{{/|\\\\}}crtbegin.o"
-// CHECK-EL-HF-MM: "-L[[SR]]/micromips/el"
-// CHECK-EL-HF-MM: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/micromips/el"
-// CHECK-EL-HF-MM: "-L[[SR]]/../../../../sysroot/micromips/el/usr/lib/../lib"
+// CHECK-EL-HF-MM: "-L[[TC]]/micromips/el"
+// CHECK-EL-HF-MM: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/micromips/el"
+// CHECK-EL-HF-MM: "-L[[TC]]/../../../../sysroot/micromips/el/usr/lib/../lib"
// CHECK-EL-HF-MM: "[[TC]]/micromips/el{{/|\\\\}}crtend.o"
// CHECK-EL-HF-MM: "[[TC]]/../../../../sysroot/micromips/el/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -1724,7 +1802,7 @@
// CHECK-EL-HF64-MM: "-internal-isystem"
// CHECK-EL-HF64-MM: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-EL-HF64-MM: "-internal-isystem"
-// CHECK-EL-HF64-MM: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/micromips/el/fp64"
+// CHECK-EL-HF64-MM: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/micromips/el"
// CHECK-EL-HF64-MM: "-internal-isystem"
// CHECK-EL-HF64-MM: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-EL-HF64-MM: "-internal-externc-isystem"
@@ -1732,15 +1810,15 @@
// CHECK-EL-HF64-MM: "-internal-externc-isystem"
// CHECK-EL-HF64-MM: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-HF64-MM: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-HF64-MM: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/micromips/el/fp64"
-// CHECK-EL-HF64-MM: "[[TC]]/../../../../sysroot/micromips/el/fp64/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-EL-HF64-MM: "[[TC]]/../../../../sysroot/micromips/el/fp64/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-EL-HF64-MM: "[[TC]]/micromips/el/fp64{{/|\\\\}}crtbegin.o"
-// CHECK-EL-HF64-MM: "-L[[SR]]/micromips/el/fp64"
-// CHECK-EL-HF64-MM: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/micromips/el/fp64"
-// CHECK-EL-HF64-MM: "-L[[SR]]/../../../../sysroot/micromips/el/fp64/usr/lib/../lib"
-// CHECK-EL-HF64-MM: "[[TC]]/micromips/el/fp64{{/|\\\\}}crtend.o"
-// CHECK-EL-HF64-MM: "[[TC]]/../../../../sysroot/micromips/el/fp64/usr/lib/../lib{{/|\\\\}}crtn.o"
+// CHECK-EL-HF64-MM: "--sysroot=[[TC]]/../../../../sysroot/micromips/el"
+// CHECK-EL-HF64-MM: "[[TC]]/../../../../sysroot/micromips/el/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-EL-HF64-MM: "[[TC]]/../../../../sysroot/micromips/el/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-EL-HF64-MM: "[[TC]]/micromips/el{{/|\\\\}}crtbegin.o"
+// CHECK-EL-HF64-MM: "-L[[TC]]/micromips/el"
+// CHECK-EL-HF64-MM: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/micromips/el"
+// CHECK-EL-HF64-MM: "-L[[TC]]/../../../../sysroot/micromips/el/usr/lib/../lib"
+// CHECK-EL-HF64-MM: "[[TC]]/micromips/el{{/|\\\\}}crtend.o"
+// CHECK-EL-HF64-MM: "[[TC]]/../../../../sysroot/micromips/el/usr/lib/../lib{{/|\\\\}}crtn.o"
//
// = Little-endian, micromips, soft float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -1758,13 +1836,13 @@
// CHECK-EL-SF-MM: "-internal-externc-isystem"
// CHECK-EL-SF-MM: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-SF-MM: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-SF-MM: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/micromips/el/sof"
+// CHECK-EL-SF-MM: "--sysroot=[[TC]]/../../../../sysroot/micromips/el/sof"
// CHECK-EL-SF-MM: "[[TC]]/../../../../sysroot/micromips/el/sof/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-EL-SF-MM: "[[TC]]/../../../../sysroot/micromips/el/sof/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-EL-SF-MM: "[[TC]]/micromips/el/sof{{/|\\\\}}crtbegin.o"
-// CHECK-EL-SF-MM: "-L[[SR]]/micromips/el/sof"
-// CHECK-EL-SF-MM: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/micromips/el/sof"
-// CHECK-EL-SF-MM: "-L[[SR]]/../../../../sysroot/micromips/el/sof/usr/lib/../lib"
+// CHECK-EL-SF-MM: "-L[[TC]]/micromips/el/sof"
+// CHECK-EL-SF-MM: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/micromips/el/sof"
+// CHECK-EL-SF-MM: "-L[[TC]]/../../../../sysroot/micromips/el/sof/usr/lib/../lib"
// CHECK-EL-SF-MM: "[[TC]]/micromips/el/sof{{/|\\\\}}crtend.o"
// CHECK-EL-SF-MM: "[[TC]]/../../../../sysroot/micromips/el/sof/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -1784,13 +1862,13 @@
// CHECK-EL-NAN-MM: "-internal-externc-isystem"
// CHECK-EL-NAN-MM: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-NAN-MM: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-NAN-MM: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/micromips/el/nan2008"
+// CHECK-EL-NAN-MM: "--sysroot=[[TC]]/../../../../sysroot/micromips/el/nan2008"
// CHECK-EL-NAN-MM: "[[TC]]/../../../../sysroot/micromips/el/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
// CHECK-EL-NAN-MM: "[[TC]]/../../../../sysroot/micromips/el/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
// CHECK-EL-NAN-MM: "[[TC]]/micromips/el/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-EL-NAN-MM: "-L[[SR]]/micromips/el/nan2008"
-// CHECK-EL-NAN-MM: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/micromips/el/nan2008"
-// CHECK-EL-NAN-MM: "-L[[SR]]/../../../../sysroot/micromips/el/nan2008/usr/lib/../lib"
+// CHECK-EL-NAN-MM: "-L[[TC]]/micromips/el/nan2008"
+// CHECK-EL-NAN-MM: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/micromips/el/nan2008"
+// CHECK-EL-NAN-MM: "-L[[TC]]/../../../../sysroot/micromips/el/nan2008/usr/lib/../lib"
// CHECK-EL-NAN-MM: "[[TC]]/micromips/el/nan2008{{/|\\\\}}crtend.o"
// CHECK-EL-NAN-MM: "[[TC]]/../../../../sysroot/micromips/el/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
//
@@ -1802,7 +1880,7 @@
// CHECK-EL-NAN64-MM: "-internal-isystem"
// CHECK-EL-NAN64-MM: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-EL-NAN64-MM: "-internal-isystem"
-// CHECK-EL-NAN64-MM: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/micromips/el/fp64/nan2008"
+// CHECK-EL-NAN64-MM: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/micromips/el/nan2008"
// CHECK-EL-NAN64-MM: "-internal-isystem"
// CHECK-EL-NAN64-MM: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-EL-NAN64-MM: "-internal-externc-isystem"
@@ -1810,15 +1888,15 @@
// CHECK-EL-NAN64-MM: "-internal-externc-isystem"
// CHECK-EL-NAN64-MM: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-NAN64-MM: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-NAN64-MM: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/micromips/el/fp64/nan2008"
-// CHECK-EL-NAN64-MM: "[[TC]]/../../../../sysroot/micromips/el/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
-// CHECK-EL-NAN64-MM: "[[TC]]/../../../../sysroot/micromips/el/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
-// CHECK-EL-NAN64-MM: "[[TC]]/micromips/el/fp64/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-EL-NAN64-MM: "-L[[SR]]/micromips/el/fp64/nan2008"
-// CHECK-EL-NAN64-MM: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/../lib/micromips/el/fp64/nan2008"
-// CHECK-EL-NAN64-MM: "-L[[SR]]/../../../../sysroot/micromips/el/fp64/nan2008/usr/lib/../lib"
-// CHECK-EL-NAN64-MM: "[[TC]]/micromips/el/fp64/nan2008{{/|\\\\}}crtend.o"
-// CHECK-EL-NAN64-MM: "[[TC]]/../../../../sysroot/micromips/el/fp64/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
+// CHECK-EL-NAN64-MM: "--sysroot=[[TC]]/../../../../sysroot/micromips/el/nan2008"
+// CHECK-EL-NAN64-MM: "[[TC]]/../../../../sysroot/micromips/el/nan2008/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-EL-NAN64-MM: "[[TC]]/../../../../sysroot/micromips/el/nan2008/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-EL-NAN64-MM: "[[TC]]/micromips/el/nan2008{{/|\\\\}}crtbegin.o"
+// CHECK-EL-NAN64-MM: "-L[[TC]]/micromips/el/nan2008"
+// CHECK-EL-NAN64-MM: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/../lib/micromips/el/nan2008"
+// CHECK-EL-NAN64-MM: "-L[[TC]]/../../../../sysroot/micromips/el/nan2008/usr/lib/../lib"
+// CHECK-EL-NAN64-MM: "[[TC]]/micromips/el/nan2008{{/|\\\\}}crtend.o"
+// CHECK-EL-NAN64-MM: "[[TC]]/../../../../sysroot/micromips/el/nan2008/usr/lib/../lib{{/|\\\\}}crtn.o"
//
// = Little-endian, mips64, ABI n32, hard float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -1836,13 +1914,13 @@
// CHECK-EL-HF-64-N32: "-internal-externc-isystem"
// CHECK-EL-HF-64-N32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-HF-64-N32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-HF-64-N32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64/el"
+// CHECK-EL-HF-64-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64/el"
// CHECK-EL-HF-64-N32: "[[TC]]/../../../../sysroot/mips64/el/usr/lib{{/|\\\\}}crt1.o"
// CHECK-EL-HF-64-N32: "[[TC]]/../../../../sysroot/mips64/el/usr/lib{{/|\\\\}}crti.o"
// CHECK-EL-HF-64-N32: "[[TC]]/mips64/el{{/|\\\\}}crtbegin.o"
-// CHECK-EL-HF-64-N32: "-L[[SR]]/mips64/el"
-// CHECK-EL-HF-64-N32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64/el"
-// CHECK-EL-HF-64-N32: "-L[[SR]]/../../../../sysroot/mips64/el/usr/lib"
+// CHECK-EL-HF-64-N32: "-L[[TC]]/mips64/el"
+// CHECK-EL-HF-64-N32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64/el"
+// CHECK-EL-HF-64-N32: "-L[[TC]]/../../../../sysroot/mips64/el/usr/lib"
// CHECK-EL-HF-64-N32: "[[TC]]/mips64/el{{/|\\\\}}crtend.o"
// CHECK-EL-HF-64-N32: "[[TC]]/../../../../sysroot/mips64/el/usr/lib{{/|\\\\}}crtn.o"
//
@@ -1854,7 +1932,7 @@
// CHECK-EL-HF64-64-N32: "-internal-isystem"
// CHECK-EL-HF64-64-N32: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-EL-HF64-64-N32: "-internal-isystem"
-// CHECK-EL-HF64-64-N32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/el/fp64"
+// CHECK-EL-HF64-64-N32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/el"
// CHECK-EL-HF64-64-N32: "-internal-isystem"
// CHECK-EL-HF64-64-N32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-EL-HF64-64-N32: "-internal-externc-isystem"
@@ -1862,15 +1940,15 @@
// CHECK-EL-HF64-64-N32: "-internal-externc-isystem"
// CHECK-EL-HF64-64-N32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-HF64-64-N32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-HF64-64-N32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64/el/fp64"
-// CHECK-EL-HF64-64-N32: "[[TC]]/../../../../sysroot/mips64/el/fp64/usr/lib{{/|\\\\}}crt1.o"
-// CHECK-EL-HF64-64-N32: "[[TC]]/../../../../sysroot/mips64/el/fp64/usr/lib{{/|\\\\}}crti.o"
-// CHECK-EL-HF64-64-N32: "[[TC]]/mips64/el/fp64{{/|\\\\}}crtbegin.o"
-// CHECK-EL-HF64-64-N32: "-L[[SR]]/mips64/el/fp64"
-// CHECK-EL-HF64-64-N32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64/el/fp64"
-// CHECK-EL-HF64-64-N32: "-L[[SR]]/../../../../sysroot/mips64/el/fp64/usr/lib"
-// CHECK-EL-HF64-64-N32: "[[TC]]/mips64/el/fp64{{/|\\\\}}crtend.o"
-// CHECK-EL-HF64-64-N32: "[[TC]]/../../../../sysroot/mips64/el/fp64/usr/lib{{/|\\\\}}crtn.o"
+// CHECK-EL-HF64-64-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64/el"
+// CHECK-EL-HF64-64-N32: "[[TC]]/../../../../sysroot/mips64/el/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-EL-HF64-64-N32: "[[TC]]/../../../../sysroot/mips64/el/usr/lib{{/|\\\\}}crti.o"
+// CHECK-EL-HF64-64-N32: "[[TC]]/mips64/el{{/|\\\\}}crtbegin.o"
+// CHECK-EL-HF64-64-N32: "-L[[TC]]/mips64/el"
+// CHECK-EL-HF64-64-N32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64/el"
+// CHECK-EL-HF64-64-N32: "-L[[TC]]/../../../../sysroot/mips64/el/usr/lib"
+// CHECK-EL-HF64-64-N32: "[[TC]]/mips64/el{{/|\\\\}}crtend.o"
+// CHECK-EL-HF64-64-N32: "[[TC]]/../../../../sysroot/mips64/el/usr/lib{{/|\\\\}}crtn.o"
//
// = Little-endian, mips64, ABI n32, soft float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -1888,13 +1966,13 @@
// CHECK-EL-SF-64-N32: "-internal-externc-isystem"
// CHECK-EL-SF-64-N32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-SF-64-N32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-SF-64-N32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64/el/sof"
+// CHECK-EL-SF-64-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64/el/sof"
// CHECK-EL-SF-64-N32: "[[TC]]/../../../../sysroot/mips64/el/sof/usr/lib{{/|\\\\}}crt1.o"
// CHECK-EL-SF-64-N32: "[[TC]]/../../../../sysroot/mips64/el/sof/usr/lib{{/|\\\\}}crti.o"
// CHECK-EL-SF-64-N32: "[[TC]]/mips64/el/sof{{/|\\\\}}crtbegin.o"
-// CHECK-EL-SF-64-N32: "-L[[SR]]/mips64/el/sof"
-// CHECK-EL-SF-64-N32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64/el/sof"
-// CHECK-EL-SF-64-N32: "-L[[SR]]/../../../../sysroot/mips64/el/sof/usr/lib"
+// CHECK-EL-SF-64-N32: "-L[[TC]]/mips64/el/sof"
+// CHECK-EL-SF-64-N32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64/el/sof"
+// CHECK-EL-SF-64-N32: "-L[[TC]]/../../../../sysroot/mips64/el/sof/usr/lib"
// CHECK-EL-SF-64-N32: "[[TC]]/mips64/el/sof{{/|\\\\}}crtend.o"
// CHECK-EL-SF-64-N32: "[[TC]]/../../../../sysroot/mips64/el/sof/usr/lib{{/|\\\\}}crtn.o"
//
@@ -1914,13 +1992,13 @@
// CHECK-EL-NAN-64-N32: "-internal-externc-isystem"
// CHECK-EL-NAN-64-N32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-NAN-64-N32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-NAN-64-N32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64/el/nan2008"
+// CHECK-EL-NAN-64-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64/el/nan2008"
// CHECK-EL-NAN-64-N32: "[[TC]]/../../../../sysroot/mips64/el/nan2008/usr/lib{{/|\\\\}}crt1.o"
// CHECK-EL-NAN-64-N32: "[[TC]]/../../../../sysroot/mips64/el/nan2008/usr/lib{{/|\\\\}}crti.o"
// CHECK-EL-NAN-64-N32: "[[TC]]/mips64/el/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-EL-NAN-64-N32: "-L[[SR]]/mips64/el/nan2008"
-// CHECK-EL-NAN-64-N32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64/el/nan2008"
-// CHECK-EL-NAN-64-N32: "-L[[SR]]/../../../../sysroot/mips64/el/nan2008/usr/lib"
+// CHECK-EL-NAN-64-N32: "-L[[TC]]/mips64/el/nan2008"
+// CHECK-EL-NAN-64-N32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64/el/nan2008"
+// CHECK-EL-NAN-64-N32: "-L[[TC]]/../../../../sysroot/mips64/el/nan2008/usr/lib"
// CHECK-EL-NAN-64-N32: "[[TC]]/mips64/el/nan2008{{/|\\\\}}crtend.o"
// CHECK-EL-NAN-64-N32: "[[TC]]/../../../../sysroot/mips64/el/nan2008/usr/lib{{/|\\\\}}crtn.o"
//
@@ -1932,7 +2010,7 @@
// CHECK-EL-NAN64-64-N32: "-internal-isystem"
// CHECK-EL-NAN64-64-N32: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-EL-NAN64-64-N32: "-internal-isystem"
-// CHECK-EL-NAN64-64-N32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/el/fp64/nan2008"
+// CHECK-EL-NAN64-64-N32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/el/nan2008"
// CHECK-EL-NAN64-64-N32: "-internal-isystem"
// CHECK-EL-NAN64-64-N32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-EL-NAN64-64-N32: "-internal-externc-isystem"
@@ -1940,15 +2018,15 @@
// CHECK-EL-NAN64-64-N32: "-internal-externc-isystem"
// CHECK-EL-NAN64-64-N32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-NAN64-64-N32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-NAN64-64-N32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64/el/fp64/nan2008"
-// CHECK-EL-NAN64-64-N32: "[[TC]]/../../../../sysroot/mips64/el/fp64/nan2008/usr/lib{{/|\\\\}}crt1.o"
-// CHECK-EL-NAN64-64-N32: "[[TC]]/../../../../sysroot/mips64/el/fp64/nan2008/usr/lib{{/|\\\\}}crti.o"
-// CHECK-EL-NAN64-64-N32: "[[TC]]/mips64/el/fp64/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-EL-NAN64-64-N32: "-L[[SR]]/mips64/el/fp64/nan2008"
-// CHECK-EL-NAN64-64-N32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64/el/fp64/nan2008"
-// CHECK-EL-NAN64-64-N32: "-L[[SR]]/../../../../sysroot/mips64/el/fp64/nan2008/usr/lib"
-// CHECK-EL-NAN64-64-N32: "[[TC]]/mips64/el/fp64/nan2008{{/|\\\\}}crtend.o"
-// CHECK-EL-NAN64-64-N32: "[[TC]]/../../../../sysroot/mips64/el/fp64/nan2008/usr/lib{{/|\\\\}}crtn.o"
+// CHECK-EL-NAN64-64-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64/el/nan2008"
+// CHECK-EL-NAN64-64-N32: "[[TC]]/../../../../sysroot/mips64/el/nan2008/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-EL-NAN64-64-N32: "[[TC]]/../../../../sysroot/mips64/el/nan2008/usr/lib{{/|\\\\}}crti.o"
+// CHECK-EL-NAN64-64-N32: "[[TC]]/mips64/el/nan2008{{/|\\\\}}crtbegin.o"
+// CHECK-EL-NAN64-64-N32: "-L[[TC]]/mips64/el/nan2008"
+// CHECK-EL-NAN64-64-N32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64/el/nan2008"
+// CHECK-EL-NAN64-64-N32: "-L[[TC]]/../../../../sysroot/mips64/el/nan2008/usr/lib"
+// CHECK-EL-NAN64-64-N32: "[[TC]]/mips64/el/nan2008{{/|\\\\}}crtend.o"
+// CHECK-EL-NAN64-64-N32: "[[TC]]/../../../../sysroot/mips64/el/nan2008/usr/lib{{/|\\\\}}crtn.o"
//
// = Little-endian, mips64, ABI 64, hard float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -1966,13 +2044,13 @@
// CHECK-EL-HF-64-64: "-internal-externc-isystem"
// CHECK-EL-HF-64-64: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-HF-64-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-HF-64-64: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64/64/el"
+// CHECK-EL-HF-64-64: "--sysroot=[[TC]]/../../../../sysroot/mips64/64/el"
// CHECK-EL-HF-64-64: "[[TC]]/../../../../sysroot/mips64/64/el/usr/lib{{/|\\\\}}crt1.o"
// CHECK-EL-HF-64-64: "[[TC]]/../../../../sysroot/mips64/64/el/usr/lib{{/|\\\\}}crti.o"
// CHECK-EL-HF-64-64: "[[TC]]/mips64/64/el{{/|\\\\}}crtbegin.o"
-// CHECK-EL-HF-64-64: "-L[[SR]]/mips64/64/el"
-// CHECK-EL-HF-64-64: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64/64/el"
-// CHECK-EL-HF-64-64: "-L[[SR]]/../../../../sysroot/mips64/64/el/usr/lib"
+// CHECK-EL-HF-64-64: "-L[[TC]]/mips64/64/el"
+// CHECK-EL-HF-64-64: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64/64/el"
+// CHECK-EL-HF-64-64: "-L[[TC]]/../../../../sysroot/mips64/64/el/usr/lib"
// CHECK-EL-HF-64-64: "[[TC]]/mips64/64/el{{/|\\\\}}crtend.o"
// CHECK-EL-HF-64-64: "[[TC]]/../../../../sysroot/mips64/64/el/usr/lib{{/|\\\\}}crtn.o"
//
@@ -1984,7 +2062,7 @@
// CHECK-EL-HF64-64-64: "-internal-isystem"
// CHECK-EL-HF64-64-64: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-EL-HF64-64-64: "-internal-isystem"
-// CHECK-EL-HF64-64-64: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/64/el/fp64"
+// CHECK-EL-HF64-64-64: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/64/el"
// CHECK-EL-HF64-64-64: "-internal-isystem"
// CHECK-EL-HF64-64-64: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-EL-HF64-64-64: "-internal-externc-isystem"
@@ -1992,15 +2070,15 @@
// CHECK-EL-HF64-64-64: "-internal-externc-isystem"
// CHECK-EL-HF64-64-64: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-HF64-64-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-HF64-64-64: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64/64/el/fp64"
-// CHECK-EL-HF64-64-64: "[[TC]]/../../../../sysroot/mips64/64/el/fp64/usr/lib{{/|\\\\}}crt1.o"
-// CHECK-EL-HF64-64-64: "[[TC]]/../../../../sysroot/mips64/64/el/fp64/usr/lib{{/|\\\\}}crti.o"
-// CHECK-EL-HF64-64-64: "[[TC]]/mips64/64/el/fp64{{/|\\\\}}crtbegin.o"
-// CHECK-EL-HF64-64-64: "-L[[SR]]/mips64/64/el/fp64"
-// CHECK-EL-HF64-64-64: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64/64/el/fp64"
-// CHECK-EL-HF64-64-64: "-L[[SR]]/../../../../sysroot/mips64/64/el/fp64/usr/lib"
-// CHECK-EL-HF64-64-64: "[[TC]]/mips64/64/el/fp64{{/|\\\\}}crtend.o"
-// CHECK-EL-HF64-64-64: "[[TC]]/../../../../sysroot/mips64/64/el/fp64/usr/lib{{/|\\\\}}crtn.o"
+// CHECK-EL-HF64-64-64: "--sysroot=[[TC]]/../../../../sysroot/mips64/64/el"
+// CHECK-EL-HF64-64-64: "[[TC]]/../../../../sysroot/mips64/64/el/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-EL-HF64-64-64: "[[TC]]/../../../../sysroot/mips64/64/el/usr/lib{{/|\\\\}}crti.o"
+// CHECK-EL-HF64-64-64: "[[TC]]/mips64/64/el{{/|\\\\}}crtbegin.o"
+// CHECK-EL-HF64-64-64: "-L[[TC]]/mips64/64/el"
+// CHECK-EL-HF64-64-64: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64/64/el"
+// CHECK-EL-HF64-64-64: "-L[[TC]]/../../../../sysroot/mips64/64/el/usr/lib"
+// CHECK-EL-HF64-64-64: "[[TC]]/mips64/64/el{{/|\\\\}}crtend.o"
+// CHECK-EL-HF64-64-64: "[[TC]]/../../../../sysroot/mips64/64/el/usr/lib{{/|\\\\}}crtn.o"
//
// = Little-endian, mips64, ABI 64, soft float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -2018,13 +2096,13 @@
// CHECK-EL-SF-64-64: "-internal-externc-isystem"
// CHECK-EL-SF-64-64: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-SF-64-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-SF-64-64: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64/64/el/sof"
+// CHECK-EL-SF-64-64: "--sysroot=[[TC]]/../../../../sysroot/mips64/64/el/sof"
// CHECK-EL-SF-64-64: "[[TC]]/../../../../sysroot/mips64/64/el/sof/usr/lib{{/|\\\\}}crt1.o"
// CHECK-EL-SF-64-64: "[[TC]]/../../../../sysroot/mips64/64/el/sof/usr/lib{{/|\\\\}}crti.o"
// CHECK-EL-SF-64-64: "[[TC]]/mips64/64/el/sof{{/|\\\\}}crtbegin.o"
-// CHECK-EL-SF-64-64: "-L[[SR]]/mips64/64/el/sof"
-// CHECK-EL-SF-64-64: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64/64/el/sof"
-// CHECK-EL-SF-64-64: "-L[[SR]]/../../../../sysroot/mips64/64/el/sof/usr/lib"
+// CHECK-EL-SF-64-64: "-L[[TC]]/mips64/64/el/sof"
+// CHECK-EL-SF-64-64: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64/64/el/sof"
+// CHECK-EL-SF-64-64: "-L[[TC]]/../../../../sysroot/mips64/64/el/sof/usr/lib"
// CHECK-EL-SF-64-64: "[[TC]]/mips64/64/el/sof{{/|\\\\}}crtend.o"
// CHECK-EL-SF-64-64: "[[TC]]/../../../../sysroot/mips64/64/el/sof/usr/lib{{/|\\\\}}crtn.o"
//
@@ -2044,13 +2122,13 @@
// CHECK-EL-NAN-64-64: "-internal-externc-isystem"
// CHECK-EL-NAN-64-64: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-NAN-64-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-NAN-64-64: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64/64/el/nan2008"
+// CHECK-EL-NAN-64-64: "--sysroot=[[TC]]/../../../../sysroot/mips64/64/el/nan2008"
// CHECK-EL-NAN-64-64: "[[TC]]/../../../../sysroot/mips64/64/el/nan2008/usr/lib{{/|\\\\}}crt1.o"
// CHECK-EL-NAN-64-64: "[[TC]]/../../../../sysroot/mips64/64/el/nan2008/usr/lib{{/|\\\\}}crti.o"
// CHECK-EL-NAN-64-64: "[[TC]]/mips64/64/el/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-EL-NAN-64-64: "-L[[SR]]/mips64/64/el/nan2008"
-// CHECK-EL-NAN-64-64: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64/64/el/nan2008"
-// CHECK-EL-NAN-64-64: "-L[[SR]]/../../../../sysroot/mips64/64/el/nan2008/usr/lib"
+// CHECK-EL-NAN-64-64: "-L[[TC]]/mips64/64/el/nan2008"
+// CHECK-EL-NAN-64-64: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64/64/el/nan2008"
+// CHECK-EL-NAN-64-64: "-L[[TC]]/../../../../sysroot/mips64/64/el/nan2008/usr/lib"
// CHECK-EL-NAN-64-64: "[[TC]]/mips64/64/el/nan2008{{/|\\\\}}crtend.o"
// CHECK-EL-NAN-64-64: "[[TC]]/../../../../sysroot/mips64/64/el/nan2008/usr/lib{{/|\\\\}}crtn.o"
//
@@ -2062,7 +2140,7 @@
// CHECK-EL-NAN64-64-64: "-internal-isystem"
// CHECK-EL-NAN64-64-64: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-EL-NAN64-64-64: "-internal-isystem"
-// CHECK-EL-NAN64-64-64: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/64/el/fp64/nan2008"
+// CHECK-EL-NAN64-64-64: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64/64/el/nan2008"
// CHECK-EL-NAN64-64-64: "-internal-isystem"
// CHECK-EL-NAN64-64-64: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-EL-NAN64-64-64: "-internal-externc-isystem"
@@ -2070,15 +2148,15 @@
// CHECK-EL-NAN64-64-64: "-internal-externc-isystem"
// CHECK-EL-NAN64-64-64: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-NAN64-64-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-NAN64-64-64: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64/64/el/fp64/nan2008"
-// CHECK-EL-NAN64-64-64: "[[TC]]/../../../../sysroot/mips64/64/el/fp64/nan2008/usr/lib{{/|\\\\}}crt1.o"
-// CHECK-EL-NAN64-64-64: "[[TC]]/../../../../sysroot/mips64/64/el/fp64/nan2008/usr/lib{{/|\\\\}}crti.o"
-// CHECK-EL-NAN64-64-64: "[[TC]]/mips64/64/el/fp64/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-EL-NAN64-64-64: "-L[[SR]]/mips64/64/el/fp64/nan2008"
-// CHECK-EL-NAN64-64-64: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64/64/el/fp64/nan2008"
-// CHECK-EL-NAN64-64-64: "-L[[SR]]/../../../../sysroot/mips64/64/el/fp64/nan2008/usr/lib"
-// CHECK-EL-NAN64-64-64: "[[TC]]/mips64/64/el/fp64/nan2008{{/|\\\\}}crtend.o"
-// CHECK-EL-NAN64-64-64: "[[TC]]/../../../../sysroot/mips64/64/el/fp64/nan2008/usr/lib{{/|\\\\}}crtn.o"
+// CHECK-EL-NAN64-64-64: "--sysroot=[[TC]]/../../../../sysroot/mips64/64/el/nan2008"
+// CHECK-EL-NAN64-64-64: "[[TC]]/../../../../sysroot/mips64/64/el/nan2008/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-EL-NAN64-64-64: "[[TC]]/../../../../sysroot/mips64/64/el/nan2008/usr/lib{{/|\\\\}}crti.o"
+// CHECK-EL-NAN64-64-64: "[[TC]]/mips64/64/el/nan2008{{/|\\\\}}crtbegin.o"
+// CHECK-EL-NAN64-64-64: "-L[[TC]]/mips64/64/el/nan2008"
+// CHECK-EL-NAN64-64-64: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64/64/el/nan2008"
+// CHECK-EL-NAN64-64-64: "-L[[TC]]/../../../../sysroot/mips64/64/el/nan2008/usr/lib"
+// CHECK-EL-NAN64-64-64: "[[TC]]/mips64/64/el/nan2008{{/|\\\\}}crtend.o"
+// CHECK-EL-NAN64-64-64: "[[TC]]/../../../../sysroot/mips64/64/el/nan2008/usr/lib{{/|\\\\}}crtn.o"
//
// = Little-endian, mips64r2, ABI n32, hard float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -2096,13 +2174,13 @@
// CHECK-EL-HF-64R2-N32: "-internal-externc-isystem"
// CHECK-EL-HF-64R2-N32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-HF-64R2-N32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-HF-64R2-N32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64r2/el"
+// CHECK-EL-HF-64R2-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64r2/el"
// CHECK-EL-HF-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/el/usr/lib{{/|\\\\}}crt1.o"
// CHECK-EL-HF-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/el/usr/lib{{/|\\\\}}crti.o"
// CHECK-EL-HF-64R2-N32: "[[TC]]/mips64r2/el{{/|\\\\}}crtbegin.o"
-// CHECK-EL-HF-64R2-N32: "-L[[SR]]/mips64r2/el"
-// CHECK-EL-HF-64R2-N32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64r2/el"
-// CHECK-EL-HF-64R2-N32: "-L[[SR]]/../../../../sysroot/mips64r2/el/usr/lib"
+// CHECK-EL-HF-64R2-N32: "-L[[TC]]/mips64r2/el"
+// CHECK-EL-HF-64R2-N32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64r2/el"
+// CHECK-EL-HF-64R2-N32: "-L[[TC]]/../../../../sysroot/mips64r2/el/usr/lib"
// CHECK-EL-HF-64R2-N32: "[[TC]]/mips64r2/el{{/|\\\\}}crtend.o"
// CHECK-EL-HF-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/el/usr/lib{{/|\\\\}}crtn.o"
//
@@ -2114,7 +2192,7 @@
// CHECK-EL-HF64-64R2-N32: "-internal-isystem"
// CHECK-EL-HF64-64R2-N32: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-EL-HF64-64R2-N32: "-internal-isystem"
-// CHECK-EL-HF64-64R2-N32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/el/fp64"
+// CHECK-EL-HF64-64R2-N32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/el"
// CHECK-EL-HF64-64R2-N32: "-internal-isystem"
// CHECK-EL-HF64-64R2-N32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-EL-HF64-64R2-N32: "-internal-externc-isystem"
@@ -2122,15 +2200,15 @@
// CHECK-EL-HF64-64R2-N32: "-internal-externc-isystem"
// CHECK-EL-HF64-64R2-N32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-HF64-64R2-N32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-HF64-64R2-N32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64r2/el/fp64"
-// CHECK-EL-HF64-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/el/fp64/usr/lib{{/|\\\\}}crt1.o"
-// CHECK-EL-HF64-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/el/fp64/usr/lib{{/|\\\\}}crti.o"
-// CHECK-EL-HF64-64R2-N32: "[[TC]]/mips64r2/el/fp64{{/|\\\\}}crtbegin.o"
-// CHECK-EL-HF64-64R2-N32: "-L[[SR]]/mips64r2/el/fp64"
-// CHECK-EL-HF64-64R2-N32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64r2/el/fp64"
-// CHECK-EL-HF64-64R2-N32: "-L[[SR]]/../../../../sysroot/mips64r2/el/fp64/usr/lib"
-// CHECK-EL-HF64-64R2-N32: "[[TC]]/mips64r2/el/fp64{{/|\\\\}}crtend.o"
-// CHECK-EL-HF64-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/el/fp64/usr/lib{{/|\\\\}}crtn.o"
+// CHECK-EL-HF64-64R2-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64r2/el"
+// CHECK-EL-HF64-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/el/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-EL-HF64-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/el/usr/lib{{/|\\\\}}crti.o"
+// CHECK-EL-HF64-64R2-N32: "[[TC]]/mips64r2/el{{/|\\\\}}crtbegin.o"
+// CHECK-EL-HF64-64R2-N32: "-L[[TC]]/mips64r2/el"
+// CHECK-EL-HF64-64R2-N32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64r2/el"
+// CHECK-EL-HF64-64R2-N32: "-L[[TC]]/../../../../sysroot/mips64r2/el/usr/lib"
+// CHECK-EL-HF64-64R2-N32: "[[TC]]/mips64r2/el{{/|\\\\}}crtend.o"
+// CHECK-EL-HF64-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/el/usr/lib{{/|\\\\}}crtn.o"
//
// = Little-endian, mips64r2, ABI n32, soft float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -2148,13 +2226,13 @@
// CHECK-EL-SF-64R2-N32: "-internal-externc-isystem"
// CHECK-EL-SF-64R2-N32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-SF-64R2-N32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-SF-64R2-N32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64r2/el/sof"
+// CHECK-EL-SF-64R2-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64r2/el/sof"
// CHECK-EL-SF-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/el/sof/usr/lib{{/|\\\\}}crt1.o"
// CHECK-EL-SF-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/el/sof/usr/lib{{/|\\\\}}crti.o"
// CHECK-EL-SF-64R2-N32: "[[TC]]/mips64r2/el/sof{{/|\\\\}}crtbegin.o"
-// CHECK-EL-SF-64R2-N32: "-L[[SR]]/mips64r2/el/sof"
-// CHECK-EL-SF-64R2-N32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64r2/el/sof"
-// CHECK-EL-SF-64R2-N32: "-L[[SR]]/../../../../sysroot/mips64r2/el/sof/usr/lib"
+// CHECK-EL-SF-64R2-N32: "-L[[TC]]/mips64r2/el/sof"
+// CHECK-EL-SF-64R2-N32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64r2/el/sof"
+// CHECK-EL-SF-64R2-N32: "-L[[TC]]/../../../../sysroot/mips64r2/el/sof/usr/lib"
// CHECK-EL-SF-64R2-N32: "[[TC]]/mips64r2/el/sof{{/|\\\\}}crtend.o"
// CHECK-EL-SF-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/el/sof/usr/lib{{/|\\\\}}crtn.o"
//
@@ -2174,13 +2252,13 @@
// CHECK-EL-NAN-64R2-N32: "-internal-externc-isystem"
// CHECK-EL-NAN-64R2-N32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-NAN-64R2-N32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-NAN-64R2-N32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64r2/el/nan2008"
+// CHECK-EL-NAN-64R2-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64r2/el/nan2008"
// CHECK-EL-NAN-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/el/nan2008/usr/lib{{/|\\\\}}crt1.o"
// CHECK-EL-NAN-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/el/nan2008/usr/lib{{/|\\\\}}crti.o"
// CHECK-EL-NAN-64R2-N32: "[[TC]]/mips64r2/el/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-EL-NAN-64R2-N32: "-L[[SR]]/mips64r2/el/nan2008"
-// CHECK-EL-NAN-64R2-N32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64r2/el/nan2008"
-// CHECK-EL-NAN-64R2-N32: "-L[[SR]]/../../../../sysroot/mips64r2/el/nan2008/usr/lib"
+// CHECK-EL-NAN-64R2-N32: "-L[[TC]]/mips64r2/el/nan2008"
+// CHECK-EL-NAN-64R2-N32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64r2/el/nan2008"
+// CHECK-EL-NAN-64R2-N32: "-L[[TC]]/../../../../sysroot/mips64r2/el/nan2008/usr/lib"
// CHECK-EL-NAN-64R2-N32: "[[TC]]/mips64r2/el/nan2008{{/|\\\\}}crtend.o"
// CHECK-EL-NAN-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/el/nan2008/usr/lib{{/|\\\\}}crtn.o"
//
@@ -2192,7 +2270,7 @@
// CHECK-EL-NAN64-64R2-N32: "-internal-isystem"
// CHECK-EL-NAN64-64R2-N32: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-EL-NAN64-64R2-N32: "-internal-isystem"
-// CHECK-EL-NAN64-64R2-N32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/el/fp64/nan2008"
+// CHECK-EL-NAN64-64R2-N32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/el/nan2008"
// CHECK-EL-NAN64-64R2-N32: "-internal-isystem"
// CHECK-EL-NAN64-64R2-N32: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-EL-NAN64-64R2-N32: "-internal-externc-isystem"
@@ -2200,15 +2278,15 @@
// CHECK-EL-NAN64-64R2-N32: "-internal-externc-isystem"
// CHECK-EL-NAN64-64R2-N32: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-NAN64-64R2-N32: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-NAN64-64R2-N32: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64r2/el/fp64/nan2008"
-// CHECK-EL-NAN64-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/el/fp64/nan2008/usr/lib{{/|\\\\}}crt1.o"
-// CHECK-EL-NAN64-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/el/fp64/nan2008/usr/lib{{/|\\\\}}crti.o"
-// CHECK-EL-NAN64-64R2-N32: "[[TC]]/mips64r2/el/fp64/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-EL-NAN64-64R2-N32: "-L[[SR]]/mips64r2/el/fp64/nan2008"
-// CHECK-EL-NAN64-64R2-N32: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64r2/el/fp64/nan2008"
-// CHECK-EL-NAN64-64R2-N32: "-L[[SR]]/../../../../sysroot/mips64r2/el/fp64/nan2008/usr/lib"
-// CHECK-EL-NAN64-64R2-N32: "[[TC]]/mips64r2/el/fp64/nan2008{{/|\\\\}}crtend.o"
-// CHECK-EL-NAN64-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/el/fp64/nan2008/usr/lib{{/|\\\\}}crtn.o"
+// CHECK-EL-NAN64-64R2-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64r2/el/nan2008"
+// CHECK-EL-NAN64-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/el/nan2008/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-EL-NAN64-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/el/nan2008/usr/lib{{/|\\\\}}crti.o"
+// CHECK-EL-NAN64-64R2-N32: "[[TC]]/mips64r2/el/nan2008{{/|\\\\}}crtbegin.o"
+// CHECK-EL-NAN64-64R2-N32: "-L[[TC]]/mips64r2/el/nan2008"
+// CHECK-EL-NAN64-64R2-N32: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64r2/el/nan2008"
+// CHECK-EL-NAN64-64R2-N32: "-L[[TC]]/../../../../sysroot/mips64r2/el/nan2008/usr/lib"
+// CHECK-EL-NAN64-64R2-N32: "[[TC]]/mips64r2/el/nan2008{{/|\\\\}}crtend.o"
+// CHECK-EL-NAN64-64R2-N32: "[[TC]]/../../../../sysroot/mips64r2/el/nan2008/usr/lib{{/|\\\\}}crtn.o"
//
// = Little-endian, mips64r2, ABI 64, hard float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -2226,13 +2304,13 @@
// CHECK-EL-HF-64R2-64: "-internal-externc-isystem"
// CHECK-EL-HF-64R2-64: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-HF-64R2-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-HF-64R2-64: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64r2/64/el"
+// CHECK-EL-HF-64R2-64: "--sysroot=[[TC]]/../../../../sysroot/mips64r2/64/el"
// CHECK-EL-HF-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/el/usr/lib{{/|\\\\}}crt1.o"
// CHECK-EL-HF-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/el/usr/lib{{/|\\\\}}crti.o"
// CHECK-EL-HF-64R2-64: "[[TC]]/mips64r2/64/el{{/|\\\\}}crtbegin.o"
-// CHECK-EL-HF-64R2-64: "-L[[SR]]/mips64r2/64/el"
-// CHECK-EL-HF-64R2-64: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64r2/64/el"
-// CHECK-EL-HF-64R2-64: "-L[[SR]]/../../../../sysroot/mips64r2/64/el/usr/lib"
+// CHECK-EL-HF-64R2-64: "-L[[TC]]/mips64r2/64/el"
+// CHECK-EL-HF-64R2-64: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64r2/64/el"
+// CHECK-EL-HF-64R2-64: "-L[[TC]]/../../../../sysroot/mips64r2/64/el/usr/lib"
// CHECK-EL-HF-64R2-64: "[[TC]]/mips64r2/64/el{{/|\\\\}}crtend.o"
// CHECK-EL-HF-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/el/usr/lib{{/|\\\\}}crtn.o"
//
@@ -2244,7 +2322,7 @@
// CHECK-EL-HF64-64R2-64: "-internal-isystem"
// CHECK-EL-HF64-64R2-64: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-EL-HF64-64R2-64: "-internal-isystem"
-// CHECK-EL-HF64-64R2-64: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/64/el/fp64"
+// CHECK-EL-HF64-64R2-64: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/64/el"
// CHECK-EL-HF64-64R2-64: "-internal-isystem"
// CHECK-EL-HF64-64R2-64: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-EL-HF64-64R2-64: "-internal-externc-isystem"
@@ -2252,15 +2330,15 @@
// CHECK-EL-HF64-64R2-64: "-internal-externc-isystem"
// CHECK-EL-HF64-64R2-64: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-HF64-64R2-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-HF64-64R2-64: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64r2/64/el/fp64"
-// CHECK-EL-HF64-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/el/fp64/usr/lib{{/|\\\\}}crt1.o"
-// CHECK-EL-HF64-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/el/fp64/usr/lib{{/|\\\\}}crti.o"
-// CHECK-EL-HF64-64R2-64: "[[TC]]/mips64r2/64/el/fp64{{/|\\\\}}crtbegin.o"
-// CHECK-EL-HF64-64R2-64: "-L[[SR]]/mips64r2/64/el/fp64"
-// CHECK-EL-HF64-64R2-64: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64r2/64/el/fp64"
-// CHECK-EL-HF64-64R2-64: "-L[[SR]]/../../../../sysroot/mips64r2/64/el/fp64/usr/lib"
-// CHECK-EL-HF64-64R2-64: "[[TC]]/mips64r2/64/el/fp64{{/|\\\\}}crtend.o"
-// CHECK-EL-HF64-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/el/fp64/usr/lib{{/|\\\\}}crtn.o"
+// CHECK-EL-HF64-64R2-64: "--sysroot=[[TC]]/../../../../sysroot/mips64r2/64/el"
+// CHECK-EL-HF64-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/el/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-EL-HF64-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/el/usr/lib{{/|\\\\}}crti.o"
+// CHECK-EL-HF64-64R2-64: "[[TC]]/mips64r2/64/el{{/|\\\\}}crtbegin.o"
+// CHECK-EL-HF64-64R2-64: "-L[[TC]]/mips64r2/64/el"
+// CHECK-EL-HF64-64R2-64: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64r2/64/el"
+// CHECK-EL-HF64-64R2-64: "-L[[TC]]/../../../../sysroot/mips64r2/64/el/usr/lib"
+// CHECK-EL-HF64-64R2-64: "[[TC]]/mips64r2/64/el{{/|\\\\}}crtend.o"
+// CHECK-EL-HF64-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/el/usr/lib{{/|\\\\}}crtn.o"
//
// = Little-endian, mips64r2, ABI 64, soft float
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
@@ -2278,13 +2356,13 @@
// CHECK-EL-SF-64R2-64: "-internal-externc-isystem"
// CHECK-EL-SF-64R2-64: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-SF-64R2-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-SF-64R2-64: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64r2/64/el/sof"
+// CHECK-EL-SF-64R2-64: "--sysroot=[[TC]]/../../../../sysroot/mips64r2/64/el/sof"
// CHECK-EL-SF-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/el/sof/usr/lib{{/|\\\\}}crt1.o"
// CHECK-EL-SF-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/el/sof/usr/lib{{/|\\\\}}crti.o"
// CHECK-EL-SF-64R2-64: "[[TC]]/mips64r2/64/el/sof{{/|\\\\}}crtbegin.o"
-// CHECK-EL-SF-64R2-64: "-L[[SR]]/mips64r2/64/el/sof"
-// CHECK-EL-SF-64R2-64: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64r2/64/el/sof"
-// CHECK-EL-SF-64R2-64: "-L[[SR]]/../../../../sysroot/mips64r2/64/el/sof/usr/lib"
+// CHECK-EL-SF-64R2-64: "-L[[TC]]/mips64r2/64/el/sof"
+// CHECK-EL-SF-64R2-64: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64r2/64/el/sof"
+// CHECK-EL-SF-64R2-64: "-L[[TC]]/../../../../sysroot/mips64r2/64/el/sof/usr/lib"
// CHECK-EL-SF-64R2-64: "[[TC]]/mips64r2/64/el/sof{{/|\\\\}}crtend.o"
// CHECK-EL-SF-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/el/sof/usr/lib{{/|\\\\}}crtn.o"
//
@@ -2304,13 +2382,13 @@
// CHECK-EL-NAN-64R2-64: "-internal-externc-isystem"
// CHECK-EL-NAN-64R2-64: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-NAN-64R2-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-NAN-64R2-64: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64r2/64/el/nan2008"
+// CHECK-EL-NAN-64R2-64: "--sysroot=[[TC]]/../../../../sysroot/mips64r2/64/el/nan2008"
// CHECK-EL-NAN-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/el/nan2008/usr/lib{{/|\\\\}}crt1.o"
// CHECK-EL-NAN-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/el/nan2008/usr/lib{{/|\\\\}}crti.o"
// CHECK-EL-NAN-64R2-64: "[[TC]]/mips64r2/64/el/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-EL-NAN-64R2-64: "-L[[SR]]/mips64r2/64/el/nan2008"
-// CHECK-EL-NAN-64R2-64: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64r2/64/el/nan2008"
-// CHECK-EL-NAN-64R2-64: "-L[[SR]]/../../../../sysroot/mips64r2/64/el/nan2008/usr/lib"
+// CHECK-EL-NAN-64R2-64: "-L[[TC]]/mips64r2/64/el/nan2008"
+// CHECK-EL-NAN-64R2-64: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64r2/64/el/nan2008"
+// CHECK-EL-NAN-64R2-64: "-L[[TC]]/../../../../sysroot/mips64r2/64/el/nan2008/usr/lib"
// CHECK-EL-NAN-64R2-64: "[[TC]]/mips64r2/64/el/nan2008{{/|\\\\}}crtend.o"
// CHECK-EL-NAN-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/el/nan2008/usr/lib{{/|\\\\}}crtn.o"
//
@@ -2322,7 +2400,7 @@
// CHECK-EL-NAN64-64R2-64: "-internal-isystem"
// CHECK-EL-NAN64-64R2-64: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
// CHECK-EL-NAN64-64R2-64: "-internal-isystem"
-// CHECK-EL-NAN64-64R2-64: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/64/el/fp64/nan2008"
+// CHECK-EL-NAN64-64R2-64: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/64/el/nan2008"
// CHECK-EL-NAN64-64R2-64: "-internal-isystem"
// CHECK-EL-NAN64-64R2-64: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
// CHECK-EL-NAN64-64R2-64: "-internal-externc-isystem"
@@ -2330,12 +2408,38 @@
// CHECK-EL-NAN64-64R2-64: "-internal-externc-isystem"
// CHECK-EL-NAN64-64R2-64: "[[TC]]/../../../../sysroot/usr/include"
// CHECK-EL-NAN64-64R2-64: "{{.*}}ld{{(.exe)?}}"
-// CHECK-EL-NAN64-64R2-64: "--sysroot=[[SR:[^"]+]]/../../../../sysroot/mips64r2/64/el/fp64/nan2008"
-// CHECK-EL-NAN64-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/el/fp64/nan2008/usr/lib{{/|\\\\}}crt1.o"
-// CHECK-EL-NAN64-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/el/fp64/nan2008/usr/lib{{/|\\\\}}crti.o"
-// CHECK-EL-NAN64-64R2-64: "[[TC]]/mips64r2/64/el/fp64/nan2008{{/|\\\\}}crtbegin.o"
-// CHECK-EL-NAN64-64R2-64: "-L[[SR]]/mips64r2/64/el/fp64/nan2008"
-// CHECK-EL-NAN64-64R2-64: "-L[[SR]]/../../../../mips-mti-linux-gnu/lib/mips64r2/64/el/fp64/nan2008"
-// CHECK-EL-NAN64-64R2-64: "-L[[SR]]/../../../../sysroot/mips64r2/64/el/fp64/nan2008/usr/lib"
-// CHECK-EL-NAN64-64R2-64: "[[TC]]/mips64r2/64/el/fp64/nan2008{{/|\\\\}}crtend.o"
-// CHECK-EL-NAN64-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/el/fp64/nan2008/usr/lib{{/|\\\\}}crtn.o"
+// CHECK-EL-NAN64-64R2-64: "--sysroot=[[TC]]/../../../../sysroot/mips64r2/64/el/nan2008"
+// CHECK-EL-NAN64-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/el/nan2008/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-EL-NAN64-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/el/nan2008/usr/lib{{/|\\\\}}crti.o"
+// CHECK-EL-NAN64-64R2-64: "[[TC]]/mips64r2/64/el/nan2008{{/|\\\\}}crtbegin.o"
+// CHECK-EL-NAN64-64R2-64: "-L[[TC]]/mips64r2/64/el/nan2008"
+// CHECK-EL-NAN64-64R2-64: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64r2/64/el/nan2008"
+// CHECK-EL-NAN64-64R2-64: "-L[[TC]]/../../../../sysroot/mips64r2/64/el/nan2008/usr/lib"
+// CHECK-EL-NAN64-64R2-64: "[[TC]]/mips64r2/64/el/nan2008{{/|\\\\}}crtend.o"
+// CHECK-EL-NAN64-64R2-64: "[[TC]]/../../../../sysroot/mips64r2/64/el/nan2008/usr/lib{{/|\\\\}}crtn.o"
+//
+// = Little-endian, default (mips64r2), ABI 64, fp64, nan2008
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips64el-linux-gnu -mabi=64 -mfp64 -mnan=2008 \
+// RUN: --gcc-toolchain=%S/Inputs/mips_fsf_tree \
+// RUN: | FileCheck --check-prefix=CHECK-EL-NAN64-64R2-64-DEF %s
+// CHECK-EL-NAN64-64R2-64-DEF: "-internal-isystem"
+// CHECK-EL-NAN64-64R2-64-DEF: "[[TC:[^"]+/lib/gcc/mips-mti-linux-gnu/4.9.0]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0"
+// CHECK-EL-NAN64-64R2-64-DEF: "-internal-isystem"
+// CHECK-EL-NAN64-64R2-64-DEF: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/mips64r2/64/el/nan2008"
+// CHECK-EL-NAN64-64R2-64-DEF: "-internal-isystem"
+// CHECK-EL-NAN64-64R2-64-DEF: "[[TC]]/../../../../mips-mti-linux-gnu/include/c++/4.9.0/backward"
+// CHECK-EL-NAN64-64R2-64-DEF: "-internal-externc-isystem"
+// CHECK-EL-NAN64-64R2-64-DEF: "[[TC]]/include"
+// CHECK-EL-NAN64-64R2-64-DEF: "-internal-externc-isystem"
+// CHECK-EL-NAN64-64R2-64-DEF: "[[TC]]/../../../../sysroot/usr/include"
+// CHECK-EL-NAN64-64R2-64-DEF: "{{.*}}ld{{(.exe)?}}"
+// CHECK-EL-NAN64-64R2-64-DEF: "--sysroot=[[TC]]/../../../../sysroot/mips64r2/64/el/nan2008"
+// CHECK-EL-NAN64-64R2-64-DEF: "[[TC]]/../../../../sysroot/mips64r2/64/el/nan2008/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-EL-NAN64-64R2-64-DEF: "[[TC]]/../../../../sysroot/mips64r2/64/el/nan2008/usr/lib{{/|\\\\}}crti.o"
+// CHECK-EL-NAN64-64R2-64-DEF: "[[TC]]/mips64r2/64/el/nan2008{{/|\\\\}}crtbegin.o"
+// CHECK-EL-NAN64-64R2-64-DEF: "-L[[TC]]/mips64r2/64/el/nan2008"
+// CHECK-EL-NAN64-64R2-64-DEF: "-L[[TC]]/../../../../mips-mti-linux-gnu/lib/mips64r2/64/el/nan2008"
+// CHECK-EL-NAN64-64R2-64-DEF: "-L[[TC]]/../../../../sysroot/mips64r2/64/el/nan2008/usr/lib"
+// CHECK-EL-NAN64-64R2-64-DEF: "[[TC]]/mips64r2/64/el/nan2008{{/|\\\\}}crtend.o"
+// CHECK-EL-NAN64-64R2-64-DEF: "[[TC]]/../../../../sysroot/mips64r2/64/el/nan2008/usr/lib{{/|\\\\}}crtn.o"
diff --git a/test/Driver/mips-img.cpp b/test/Driver/mips-img.cpp
new file mode 100644
index 000000000000..389e0f741082
--- /dev/null
+++ b/test/Driver/mips-img.cpp
@@ -0,0 +1,163 @@
+// Check frontend and linker invocations on the IMG MIPS toolchain.
+//
+// = Big-endian, mips32r6
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips-img-linux-gnu -mips32r6 \
+// RUN: --gcc-toolchain=%S/Inputs/mips_img_tree \
+// RUN: | FileCheck --check-prefix=CHECK-BE-32R6 %s
+// CHECK-BE-32R6: "-internal-isystem"
+// CHECK-BE-32R6: "[[TC:[^"]+/lib/gcc/mips-img-linux-gnu/4.9.0]]/../../../../mips-img-linux-gnu/include/c++/4.9.0"
+// CHECK-BE-32R6: "-internal-isystem"
+// CHECK-BE-32R6: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/mips-img-linux-gnu"
+// CHECK-BE-32R6: "-internal-isystem"
+// CHECK-BE-32R6: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/backward"
+// CHECK-BE-32R6: "-internal-externc-isystem"
+// CHECK-BE-32R6: "[[TC]]/include"
+// CHECK-BE-32R6: "-internal-externc-isystem"
+// CHECK-BE-32R6: "[[TC]]/../../../../sysroot/usr/include"
+// CHECK-BE-32R6: "{{.*}}ld{{(.exe)?}}"
+// CHECK-BE-32R6: "--sysroot=[[TC]]/../../../../sysroot"
+// CHECK-BE-32R6: "-dynamic-linker" "/lib/ld-linux-mipsn8.so.1"
+// CHECK-BE-32R6: "[[TC]]/../../../../sysroot/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-BE-32R6: "[[TC]]/../../../../sysroot/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-BE-32R6: "[[TC]]{{/|\\\\}}crtbegin.o"
+// CHECK-BE-32R6: "-L[[TC]]"
+// CHECK-BE-32R6: "-L[[TC]]/../../../../mips-img-linux-gnu/lib/../lib"
+// CHECK-BE-32R6: "-L[[TC]]/../../../../sysroot/usr/lib/../lib"
+// CHECK-BE-32R6: "[[TC]]{{/|\\\\}}crtend.o"
+// CHECK-BE-32R6: "[[TC]]/../../../../sysroot/usr/lib/../lib{{/|\\\\}}crtn.o"
+//
+// = Little-endian, mips32r6
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips-img-linux-gnu -mips32r6 -EL \
+// RUN: --gcc-toolchain=%S/Inputs/mips_img_tree \
+// RUN: | FileCheck --check-prefix=CHECK-LE-32R6 %s
+// CHECK-LE-32R6: "-internal-isystem"
+// CHECK-LE-32R6: "[[TC:[^"]+/lib/gcc/mips-img-linux-gnu/4.9.0]]/../../../../mips-img-linux-gnu/include/c++/4.9.0"
+// CHECK-LE-32R6: "-internal-isystem"
+// CHECK-LE-32R6: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/mips-img-linux-gnu/el"
+// CHECK-LE-32R6: "-internal-isystem"
+// CHECK-LE-32R6: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/backward"
+// CHECK-LE-32R6: "-internal-externc-isystem"
+// CHECK-LE-32R6: "[[TC]]/include"
+// CHECK-LE-32R6: "-internal-externc-isystem"
+// CHECK-LE-32R6: "[[TC]]/../../../../sysroot/usr/include"
+// CHECK-LE-32R6: "{{.*}}ld{{(.exe)?}}"
+// CHECK-LE-32R6: "--sysroot=[[TC]]/../../../../sysroot/el"
+// CHECK-LE-32R6: "-dynamic-linker" "/lib/ld-linux-mipsn8.so.1"
+// CHECK-LE-32R6: "[[TC]]/../../../../sysroot/el/usr/lib/../lib{{/|\\\\}}crt1.o"
+// CHECK-LE-32R6: "[[TC]]/../../../../sysroot/el/usr/lib/../lib{{/|\\\\}}crti.o"
+// CHECK-LE-32R6: "[[TC]]/el{{/|\\\\}}crtbegin.o"
+// CHECK-LE-32R6: "-L[[TC]]/el"
+// CHECK-LE-32R6: "-L[[TC]]/../../../../mips-img-linux-gnu/lib/../lib/el"
+// CHECK-LE-32R6: "-L[[TC]]/../../../../sysroot/el/usr/lib/../lib"
+// CHECK-LE-32R6: "[[TC]]/el{{/|\\\\}}crtend.o"
+// CHECK-LE-32R6: "[[TC]]/../../../../sysroot/el/usr/lib/../lib{{/|\\\\}}crtn.o"
+//
+// = Big-endian, mips64r6, N32
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips64-img-linux-gnu -mips64r6 -mabi=n32 \
+// RUN: --gcc-toolchain=%S/Inputs/mips_img_tree \
+// RUN: | FileCheck --check-prefix=CHECK-BE-64R6-N32 %s
+// CHECK-BE-64R6-N32: "-internal-isystem"
+// CHECK-BE-64R6-N32: "[[TC:[^"]+/lib/gcc/mips-img-linux-gnu/4.9.0]]/../../../../mips-img-linux-gnu/include/c++/4.9.0"
+// CHECK-BE-64R6-N32: "-internal-isystem"
+// CHECK-BE-64R6-N32: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/mips-img-linux-gnu/mips64r6"
+// CHECK-BE-64R6-N32: "-internal-isystem"
+// CHECK-BE-64R6-N32: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/backward"
+// CHECK-BE-64R6-N32: "-internal-externc-isystem"
+// CHECK-BE-64R6-N32: "[[TC]]/include"
+// CHECK-BE-64R6-N32: "-internal-externc-isystem"
+// CHECK-BE-64R6-N32: "[[TC]]/../../../../sysroot/usr/include"
+// CHECK-BE-64R6-N32: "{{.*}}ld{{(.exe)?}}"
+// CHECK-BE-64R6-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64r6"
+// CHECK-BE-64R6-N32: "-dynamic-linker" "/lib32/ld-linux-mipsn8.so.1"
+// CHECK-BE-64R6-N32: "[[TC]]/../../../../sysroot/mips64r6/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-BE-64R6-N32: "[[TC]]/../../../../sysroot/mips64r6/usr/lib{{/|\\\\}}crti.o"
+// CHECK-BE-64R6-N32: "[[TC]]/mips64r6{{/|\\\\}}crtbegin.o"
+// CHECK-BE-64R6-N32: "-L[[TC]]/mips64r6"
+// CHECK-BE-64R6-N32: "-L[[TC]]/../../../../mips-img-linux-gnu/lib/mips64r6"
+// CHECK-BE-64R6-N32: "-L[[TC]]/../../../../sysroot/mips64r6/usr/lib"
+// CHECK-BE-64R6-N32: "[[TC]]/mips64r6{{/|\\\\}}crtend.o"
+// CHECK-BE-64R6-N32: "[[TC]]/../../../../sysroot/mips64r6/usr/lib{{/|\\\\}}crtn.o"
+//
+// = Little-endian, mips64r6, N32
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips64-img-linux-gnu -mips64r6 -EL -mabi=n32 \
+// RUN: --gcc-toolchain=%S/Inputs/mips_img_tree \
+// RUN: | FileCheck --check-prefix=CHECK-LE-64R6-N32 %s
+// CHECK-LE-64R6-N32: "-internal-isystem"
+// CHECK-LE-64R6-N32: "[[TC:[^"]+/lib/gcc/mips-img-linux-gnu/4.9.0]]/../../../../mips-img-linux-gnu/include/c++/4.9.0"
+// CHECK-LE-64R6-N32: "-internal-isystem"
+// CHECK-LE-64R6-N32: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/mips-img-linux-gnu/mips64r6/el"
+// CHECK-LE-64R6-N32: "-internal-isystem"
+// CHECK-LE-64R6-N32: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/backward"
+// CHECK-LE-64R6-N32: "-internal-externc-isystem"
+// CHECK-LE-64R6-N32: "[[TC]]/include"
+// CHECK-LE-64R6-N32: "-internal-externc-isystem"
+// CHECK-LE-64R6-N32: "[[TC]]/../../../../sysroot/usr/include"
+// CHECK-LE-64R6-N32: "{{.*}}ld{{(.exe)?}}"
+// CHECK-LE-64R6-N32: "--sysroot=[[TC]]/../../../../sysroot/mips64r6/el"
+// CHECK-LE-64R6-N32: "-dynamic-linker" "/lib32/ld-linux-mipsn8.so.1"
+// CHECK-LE-64R6-N32: "[[TC]]/../../../../sysroot/mips64r6/el/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-LE-64R6-N32: "[[TC]]/../../../../sysroot/mips64r6/el/usr/lib{{/|\\\\}}crti.o"
+// CHECK-LE-64R6-N32: "[[TC]]/mips64r6/el{{/|\\\\}}crtbegin.o"
+// CHECK-LE-64R6-N32: "-L[[TC]]/mips64r6/el"
+// CHECK-LE-64R6-N32: "-L[[TC]]/../../../../mips-img-linux-gnu/lib/mips64r6/el"
+// CHECK-LE-64R6-N32: "-L[[TC]]/../../../../sysroot/mips64r6/el/usr/lib"
+// CHECK-LE-64R6-N32: "[[TC]]/mips64r6/el{{/|\\\\}}crtend.o"
+// CHECK-LE-64R6-N32: "[[TC]]/../../../../sysroot/mips64r6/el/usr/lib{{/|\\\\}}crtn.o"
+//
+// = Big-endian, mips64r6, N64
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips64-img-linux-gnu -mips64r6 -mabi=64 \
+// RUN: --gcc-toolchain=%S/Inputs/mips_img_tree \
+// RUN: | FileCheck --check-prefix=CHECK-BE-64R6-N64 %s
+// CHECK-BE-64R6-N64: "-internal-isystem"
+// CHECK-BE-64R6-N64: "[[TC:[^"]+/lib/gcc/mips-img-linux-gnu/4.9.0]]/../../../../mips-img-linux-gnu/include/c++/4.9.0"
+// CHECK-BE-64R6-N64: "-internal-isystem"
+// CHECK-BE-64R6-N64: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/mips-img-linux-gnu/mips64r6/64"
+// CHECK-BE-64R6-N64: "-internal-isystem"
+// CHECK-BE-64R6-N64: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/backward"
+// CHECK-BE-64R6-N64: "-internal-externc-isystem"
+// CHECK-BE-64R6-N64: "[[TC]]/include"
+// CHECK-BE-64R6-N64: "-internal-externc-isystem"
+// CHECK-BE-64R6-N64: "[[TC]]/../../../../sysroot/usr/include"
+// CHECK-BE-64R6-N64: "{{.*}}ld{{(.exe)?}}"
+// CHECK-BE-64R6-N64: "--sysroot=[[TC]]/../../../../sysroot/mips64r6/64"
+// CHECK-BE-64R6-N64: "-dynamic-linker" "/lib64/ld-linux-mipsn8.so.1"
+// CHECK-BE-64R6-N64: "[[TC]]/../../../../sysroot/mips64r6/64/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-BE-64R6-N64: "[[TC]]/../../../../sysroot/mips64r6/64/usr/lib{{/|\\\\}}crti.o"
+// CHECK-BE-64R6-N64: "[[TC]]/mips64r6/64{{/|\\\\}}crtbegin.o"
+// CHECK-BE-64R6-N64: "-L[[TC]]/mips64r6/64"
+// CHECK-BE-64R6-N64: "-L[[TC]]/../../../../mips-img-linux-gnu/lib/mips64r6/64"
+// CHECK-BE-64R6-N64: "-L[[TC]]/../../../../sysroot/mips64r6/64/usr/lib"
+// CHECK-BE-64R6-N64: "[[TC]]/mips64r6/64{{/|\\\\}}crtend.o"
+// CHECK-BE-64R6-N64: "[[TC]]/../../../../sysroot/mips64r6/64/usr/lib{{/|\\\\}}crtn.o"
+//
+// = Little-endian, mips64r6, N64
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips64-img-linux-gnu -mips64r6 -EL -mabi=64 \
+// RUN: --gcc-toolchain=%S/Inputs/mips_img_tree \
+// RUN: | FileCheck --check-prefix=CHECK-LE-64R6-N64 %s
+// CHECK-LE-64R6-N64: "-internal-isystem"
+// CHECK-LE-64R6-N64: "[[TC:[^"]+/lib/gcc/mips-img-linux-gnu/4.9.0]]/../../../../mips-img-linux-gnu/include/c++/4.9.0"
+// CHECK-LE-64R6-N64: "-internal-isystem"
+// CHECK-LE-64R6-N64: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/mips-img-linux-gnu/mips64r6/64/el"
+// CHECK-LE-64R6-N64: "-internal-isystem"
+// CHECK-LE-64R6-N64: "[[TC]]/../../../../mips-img-linux-gnu/include/c++/4.9.0/backward"
+// CHECK-LE-64R6-N64: "-internal-externc-isystem"
+// CHECK-LE-64R6-N64: "[[TC]]/include"
+// CHECK-LE-64R6-N64: "-internal-externc-isystem"
+// CHECK-LE-64R6-N64: "[[TC]]/../../../../sysroot/usr/include"
+// CHECK-LE-64R6-N64: "{{.*}}ld{{(.exe)?}}"
+// CHECK-LE-64R6-N64: "--sysroot=[[TC]]/../../../../sysroot/mips64r6/64/el"
+// CHECK-LE-64R6-N64: "-dynamic-linker" "/lib64/ld-linux-mipsn8.so.1"
+// CHECK-LE-64R6-N64: "[[TC]]/../../../../sysroot/mips64r6/64/el/usr/lib{{/|\\\\}}crt1.o"
+// CHECK-LE-64R6-N64: "[[TC]]/../../../../sysroot/mips64r6/64/el/usr/lib{{/|\\\\}}crti.o"
+// CHECK-LE-64R6-N64: "[[TC]]/mips64r6/64/el{{/|\\\\}}crtbegin.o"
+// CHECK-LE-64R6-N64: "-L[[TC]]/mips64r6/64/el"
+// CHECK-LE-64R6-N64: "-L[[TC]]/../../../../mips-img-linux-gnu/lib/mips64r6/64/el"
+// CHECK-LE-64R6-N64: "-L[[TC]]/../../../../sysroot/mips64r6/64/el/usr/lib"
+// CHECK-LE-64R6-N64: "[[TC]]/mips64r6/64/el{{/|\\\\}}crtend.o"
+// CHECK-LE-64R6-N64: "[[TC]]/../../../../sysroot/mips64r6/64/el/usr/lib{{/|\\\\}}crtn.o"
diff --git a/test/Driver/mips-integrated-as.s b/test/Driver/mips-integrated-as.s
new file mode 100644
index 000000000000..c3b1db391e0f
--- /dev/null
+++ b/test/Driver/mips-integrated-as.s
@@ -0,0 +1,207 @@
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
+// RUN: FileCheck -check-prefix=ABI-O32 %s
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mabi=32 2>&1 | \
+// RUN: FileCheck -check-prefix=ABI-O32 %s
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mabi=o32 2>&1 | \
+// RUN: FileCheck -check-prefix=ABI-O32 %s
+// ABI-O32: -cc1as
+// ABI-O32: "-target-feature" "-n64"
+// ABI-O32: "-target-feature" "+o32"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mabi=eabi 2>&1 | \
+// RUN: FileCheck -check-prefix=ABI-EABI32 %s
+// ABI-EABI32: -cc1as
+// ABI-EABI32: "-target-feature" "-o32"
+// ABI-EABI32: "-target-feature" "-n64"
+// ABI-EABI32: "-target-feature" "+eabi"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=n32 2>&1 | \
+// RUN: FileCheck -check-prefix=ABI-N32 %s
+// RUN: %clang -target mips64-linux-gnu -### -fintegrated-as -c %s -mabi=n32 2>&1 | \
+// RUN: FileCheck -check-prefix=ABI-N32 %s
+// ABI-N32: -cc1as
+// ABI-N32: "-target-feature" "-o32"
+// ABI-N32: "-target-feature" "-n64"
+// ABI-N32: "-target-feature" "+n32"
+
+// FIXME: We should also test '-target mips-linux-gnu -mips64' defaults to the
+// default 64-bit ABI (N64 but GCC uses N32). It currently selects O32
+// because of the triple.
+// RUN: %clang -target mips64-linux-gnu -### -fintegrated-as -c %s -mips64 2>&1 | \
+// RUN: FileCheck -check-prefix=ABI-N64 %s
+//
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=64 2>&1 | \
+// RUN: FileCheck -check-prefix=ABI-N64 %s
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=n64 2>&1 | \
+// RUN: FileCheck -check-prefix=ABI-N64 %s
+// RUN: %clang -target mips64-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=64 2>&1 | \
+// RUN: FileCheck -check-prefix=ABI-N64 %s
+// RUN: %clang -target mips64-linux-gnu -### -fintegrated-as -c %s -mips64 -mabi=n64 2>&1 | \
+// RUN: FileCheck -check-prefix=ABI-N64 %s
+// ABI-N64: -cc1as
+// ABI-N64: "-target-feature" "-o32"
+// ABI-N64: "-target-feature" "+n64"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -msoft-float 2>&1 | \
+// RUN: FileCheck -check-prefix=SOFTFLOAT %s
+// SOFTFLOAT: -cc1as
+// SOFTFLOAT: "-target-feature" "+soft-float"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
+// RUN: FileCheck -check-prefix=HARDFLOAT %s
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mhard-float 2>&1 | \
+// RUN: FileCheck -check-prefix=HARDFLOAT %s
+// HARDFLOAT: -cc1as
+// HARDFLOAT-NOT: "-target-feature" "+soft-float"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
+// RUN: FileCheck -check-prefix=NAN-DEFAULT %s
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips32r6 2>&1 | \
+// RUN: FileCheck -check-prefix=NAN-DEFAULT %s
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips64r6 2>&1 | \
+// RUN: FileCheck -check-prefix=NAN-DEFAULT %s
+// NAN-DEFAULT: -cc1as
+// NAN-DEFAULT-NOT: "-target-feature" "{{[-+]}}nan2008"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mnan=legacy 2>&1 | \
+// RUN: FileCheck -check-prefix=NAN-LEGACY %s
+// NAN-LEGACY: -cc1as
+// NAN-LEGACY: "-target-feature" "-nan2008"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mnan=2008 2>&1 | \
+// RUN: FileCheck -check-prefix=NAN-2008 %s
+// NAN-2008: -cc1as
+// NAN-2008: "-target-feature" "+nan2008"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
+// RUN: FileCheck -check-prefix=DEFAULT-FLOAT %s
+// DEFAULT-FLOAT: -cc1as
+// DEFAULT-FLOAT-NOT: "-target-feature" "{{[+-]}}single-float"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -msingle-float 2>&1 | \
+// RUN: FileCheck -check-prefix=SINGLE-FLOAT %s
+// SINGLE-FLOAT: -cc1as
+// SINGLE-FLOAT: "-target-feature" "+single-float"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mdouble-float 2>&1 | \
+// RUN: FileCheck -check-prefix=DOUBLE-FLOAT %s
+// DOUBLE-FLOAT: -cc1as
+// DOUBLE-FLOAT: "-target-feature" "-single-float"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
+// RUN: FileCheck -check-prefix=MIPS16-DEFAULT %s
+// MIPS16-DEFAULT: -cc1as
+// MIPS16-DEFAULT-NOT: "-target-feature" "{{[+-]}}mips16"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mips16 2>&1 | \
+// RUN: FileCheck -check-prefix=MIPS16-ON %s
+// MIPS16-ON: -cc1as
+// MIPS16-ON: "-target-feature" "+mips16"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-mips16 2>&1 | \
+// RUN: FileCheck -check-prefix=MIPS16-OFF %s
+// MIPS16-OFF: -cc1as
+// MIPS16-OFF: "-target-feature" "-mips16"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
+// RUN: FileCheck -check-prefix=MICROMIPS-DEFAULT %s
+// MICROMIPS-DEFAULT: -cc1as
+// MICROMIPS-DEFAULT-NOT: "-target-feature" "{{[+-]}}micromips"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mmicromips 2>&1 | \
+// RUN: FileCheck -check-prefix=MICROMIPS-ON %s
+// MICROMIPS-ON: -cc1as
+// MICROMIPS-ON: "-target-feature" "+micromips"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-micromips 2>&1 | \
+// RUN: FileCheck -check-prefix=MICROMIPS-OFF %s
+// MICROMIPS-OFF: -cc1as
+// MICROMIPS-OFF: "-target-feature" "-micromips"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
+// RUN: FileCheck -check-prefix=DSP-DEFAULT %s
+// DSP-DEFAULT: -cc1as
+// DSP-DEFAULT-NOT: "-target-feature" "{{[+-]}}dsp"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mdsp 2>&1 | \
+// RUN: FileCheck -check-prefix=DSP-ON %s
+// DSP-ON: -cc1as
+// DSP-ON: "-target-feature" "+dsp"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-dsp 2>&1 | \
+// RUN: FileCheck -check-prefix=DSP-OFF %s
+// DSP-OFF: -cc1as
+// DSP-OFF: "-target-feature" "-dsp"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
+// RUN: FileCheck -check-prefix=DSPR2-DEFAULT %s
+// DSPR2-DEFAULT: -cc1as
+// DSPR2-DEFAULT-NOT: "-target-feature" "{{[+-]}}dspr2"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mdspr2 2>&1 | \
+// RUN: FileCheck -check-prefix=DSPR2-ON %s
+// DSPR2-ON: -cc1as
+// DSPR2-ON: "-target-feature" "+dspr2"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-dspr2 2>&1 | \
+// RUN: FileCheck -check-prefix=DSPR2-OFF %s
+// DSPR2-OFF: -cc1as
+// DSPR2-OFF: "-target-feature" "-dspr2"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
+// RUN: FileCheck -check-prefix=MSA-DEFAULT %s
+// MSA-DEFAULT: -cc1as
+// MSA-DEFAULT-NOT: "-target-feature" "{{[+-]}}msa"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mmsa 2>&1 | \
+// RUN: FileCheck -check-prefix=MSA-ON %s
+// MSA-ON: -cc1as
+// MSA-ON: "-target-feature" "+msa"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-msa 2>&1 | \
+// RUN: FileCheck -check-prefix=MSA-OFF %s
+// MSA-OFF: -cc1as
+// MSA-OFF: "-target-feature" "-msa"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
+// RUN: FileCheck -check-prefix=FPXX-DEFAULT %s
+// FPXX-DEFAULT: -cc1as
+// FPXX-DEFAULT-NOT: "-target-feature" "+fpxx"
+// FPXX-DEFAULT-NOT: "-target-feature" "+nooddspreg"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mfp32 2>&1 | \
+// RUN: FileCheck -check-prefix=FP32 %s
+// FP32: -cc1as
+// FP32: "-target-feature" "-fp64"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mfpxx 2>&1 | \
+// RUN: FileCheck -check-prefix=FPXX %s
+// FPXX: -cc1as
+// FPXX: "-target-feature" "+fpxx"
+// FPXX: "-target-feature" "+nooddspreg"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mfp64 2>&1 | \
+// RUN: FileCheck -check-prefix=FP64 %s
+// FP64: -cc1as
+// FP64: "-target-feature" "+fp64"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s 2>&1 | \
+// RUN: FileCheck -check-prefix=ODDSPREG-DEFAULT %s
+// ODDSPREG-DEFAULT: -cc1as
+// ODDSPREG-DEFAULT-NOT: "-target-feature" "{{[+-]}}nooddspreg"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -modd-spreg 2>&1 | \
+// RUN: FileCheck -check-prefix=ODDSPREG-ON %s
+// ODDSPREG-ON: -cc1as
+// ODDSPREG-ON: "-target-feature" "-nooddspreg"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mno-odd-spreg 2>&1 | \
+// RUN: FileCheck -check-prefix=ODDSPREG-OFF %s
+// ODDSPREG-OFF: -cc1as
+// ODDSPREG-OFF: "-target-feature" "+nooddspreg"
+
+// RUN: %clang -target mips-linux-gnu -### -fintegrated-as -c %s -mfpxx -modd-spreg 2>&1 | \
+// RUN: FileCheck -check-prefix=FPXX-ODDSPREG %s
+// FPXX-ODDSPREG: -cc1as
+// FPXX-ODDSPREG: "-target-feature" "+fpxx"
+// FPXX-ODDSPREG: "-target-feature" "-nooddspreg"
diff --git a/test/Driver/mips-reduced-toolchain.cpp b/test/Driver/mips-reduced-toolchain.cpp
new file mode 100644
index 000000000000..fe7ed8ae045d
--- /dev/null
+++ b/test/Driver/mips-reduced-toolchain.cpp
@@ -0,0 +1,28 @@
+// Check frontend and linker invocations on reduced Debian MIPS toolchain.
+// This toolchain icludes O32 ABI only.
+
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mips-linux-gnu \
+// RUN: --sysroot=%S/Inputs/debian_reduced_mips_tree \
+// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-MIPS %s
+// CHECK-DEBIAN-MIPS: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-DEBIAN-MIPS: "{{.*}}/usr/lib/gcc/mips-linux-gnu/4.7{{/|\\\\}}crtbegin.o"
+// CHECK-DEBIAN-MIPS: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.7"
+// CHECK-DEBIAN-MIPS: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.7/../../../mips-linux-gnu"
+// CHECK-DEBIAN-MIPS: "-L[[SYSROOT]]/usr/lib/mips-linux-gnu"
+// CHECK-DEBIAN-MIPS: "-L[[SYSROOT]]/usr/lib/gcc/mips-linux-gnu/4.7/../../.."
+// CHECK-DEBIAN-MIPS: "-L[[SYSROOT]]/lib"
+// CHECK-DEBIAN-MIPS: "-L[[SYSROOT]]/usr/lib"
+
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: --target=mipsel-linux-gnu \
+// RUN: --sysroot=%S/Inputs/debian_reduced_mips_tree \
+// RUN: | FileCheck --check-prefix=CHECK-DEBIAN-MIPSEL %s
+// CHECK-DEBIAN-MIPSEL: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-DEBIAN-MIPSEL: "{{.*}}/usr/lib/gcc/mipsel-linux-gnu/4.7{{/|\\\\}}crtbegin.o"
+// CHECK-DEBIAN-MIPSEL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.7"
+// CHECK-DEBIAN-MIPSEL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.7/../../../mipsel-linux-gnu"
+// CHECK-DEBIAN-MIPSEL: "-L[[SYSROOT]]/usr/lib/mipsel-linux-gnu"
+// CHECK-DEBIAN-MIPSEL: "-L[[SYSROOT]]/usr/lib/gcc/mipsel-linux-gnu/4.7/../../.."
+// CHECK-DEBIAN-MIPSEL: "-L[[SYSROOT]]/lib"
+// CHECK-DEBIAN-MIPSEL: "-L[[SYSROOT]]/usr/lib"
diff --git a/test/Driver/mno-global-merge.c b/test/Driver/mno-global-merge.c
index ec9f69e67ce2..a17848f04dec 100644
--- a/test/Driver/mno-global-merge.c
+++ b/test/Driver/mno-global-merge.c
@@ -2,11 +2,19 @@
// RUN: -mno-global-merge -### -fsyntax-only %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-NGM < %t %s
+// RUN: %clang -target arm64-apple-ios7 \
+// RUN: -mno-global-merge -### -fsyntax-only %s 2> %t
+// RUN: FileCheck --check-prefix=CHECK-NGM < %t %s
+
// CHECK-NGM: "-mno-global-merge"
// RUN: %clang -target armv7-apple-darwin10 \
// RUN: -mglobal-merge -### -fsyntax-only %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-GM < %t %s
+// RUN: %clang -target arm64-apple-ios7 \
+// RUN: -mglobal-merge -### -fsyntax-only %s 2> %t
+// RUN: FileCheck --check-prefix=CHECK-GM < %t %s
+
// CHECK-GM-NOT: "-mglobal-merge"
diff --git a/test/Driver/modules.m b/test/Driver/modules.m
index b93054dbf87f..d8e20e4148e9 100644
--- a/test/Driver/modules.m
+++ b/test/Driver/modules.m
@@ -4,3 +4,18 @@
// RUN: %clang -fmodules -fno-modules -fmodules -### %s 2>&1 | FileCheck -check-prefix=CHECK-HAS-MODULES %s
// CHECK-HAS-MODULES: -fmodules
+// RUN: %clang -fbuild-session-timestamp=123 -### %s 2>&1 | FileCheck -check-prefix=TIMESTAMP_ONLY %s
+// TIMESTAMP_ONLY: -fbuild-session-timestamp=123
+
+// RUN: %clang -fbuild-session-timestamp=123 -fmodules-validate-once-per-build-session -### %s 2>&1 | FileCheck -check-prefix=MODULES_VALIDATE_ONCE %s
+// MODULES_VALIDATE_ONCE: -fbuild-session-timestamp=123
+// MODULES_VALIDATE_ONCE: -fmodules-validate-once-per-build-session
+
+// RUN: %clang -fmodules-validate-once-per-build-session -### %s 2>&1 | FileCheck -check-prefix=MODULES_VALIDATE_ONCE_ERR %s
+// MODULES_VALIDATE_ONCE_ERR: option '-fmodules-validate-once-per-build-session' requires '-fbuild-session-timestamp=<seconds since Epoch>'
+
+// RUN: %clang -### %s 2>&1 | FileCheck -check-prefix=MODULES_VALIDATE_SYSTEM_HEADERS_DEFAULT %s
+// MODULES_VALIDATE_SYSTEM_HEADERS_DEFAULT-NOT: -fmodules-validate-system-headers
+
+// RUN: %clang -fmodules-validate-system-headers -### %s 2>&1 | FileCheck -check-prefix=MODULES_VALIDATE_SYSTEM_HEADERS %s
+// MODULES_VALIDATE_SYSTEM_HEADERS: -fmodules-validate-system-headers
diff --git a/test/Driver/msc-version.c b/test/Driver/msc-version.c
new file mode 100644
index 000000000000..1a88419c0225
--- /dev/null
+++ b/test/Driver/msc-version.c
@@ -0,0 +1,68 @@
+//
+// Verify defaults
+//
+
+// RUN: %clang -target i686-windows -fms-compatibility -dM -E - </dev/null -o - | FileCheck %s -check-prefix CHECK-NO-MSC-VERSION
+
+// CHECK-NO-MSC-VERSION: _MSC_BUILD 1
+// CHECK-NO-MSC-VERSION: _MSC_FULL_VER 170000000
+// CHECK-NO-MSC-VERSION: _MSC_VER 1700
+
+
+//
+// Verify -fms-compatibility-version parsing
+//
+
+// RUN: %clang -target i686-windows -fms-compatibility -fms-compatibility-version=14 -dM -E - </dev/null -o - | FileCheck %s -check-prefix CHECK-MSC-VERSION-MAJOR
+
+// CHECK-MSC-VERSION-MAJOR: _MSC_BUILD 1
+// CHECK-MSC-VERSION-MAJOR: _MSC_FULL_VER 140000000
+// CHECK-MSC-VERSION-MAJOR: _MSC_VER 1400
+
+// RUN: %clang -target i686-windows -fms-compatibility -fms-compatibility-version=15.00 -dM -E - </dev/null -o - | FileCheck %s -check-prefix CHECK-MSC-VERSION-MAJOR-MINOR
+
+// CHECK-MSC-VERSION-MAJOR-MINOR: _MSC_BUILD 1
+// CHECK-MSC-VERSION-MAJOR-MINOR: _MSC_FULL_VER 150000000
+// CHECK-MSC-VERSION-MAJOR-MINOR: _MSC_VER 1500
+
+// RUN: %clang -target i686-windows -fms-compatibility -fms-compatibility-version=15.00.20706 -dM -E - </dev/null -o - | FileCheck %s -check-prefix CHECK-MSC-VERSION-MAJOR-MINOR-BUILD
+
+// CHECK-MSC-VERSION-MAJOR-MINOR-BUILD: _MSC_BUILD 1
+// CHECK-MSC-VERSION-MAJOR-MINOR-BUILD: _MSC_FULL_VER 150020706
+// CHECK-MSC-VERSION-MAJOR-MINOR-BUILD: _MSC_VER 1500
+
+// RUN: %clang -target i686-windows -fms-compatibility -fms-compatibility-version=15.00.20706.01 -dM -E - </dev/null -o - | FileCheck %s -check-prefix CHECK-MSC-VERSION-MAJOR-MINOR-BUILD-PATCH
+
+// CHECK-MSC-VERSION-MAJOR-MINOR-BUILD-PATCH: _MSC_BUILD 1
+// CHECK-MSC-VERSION-MAJOR-MINOR-BUILD-PATCH: _MSC_FULL_VER 150020706
+// CHECK-MSC-VERSION-MAJOR-MINOR-BUILD-PATCH: _MSC_VER 1500
+
+
+//
+// Verify -fmsc-version and -fms-compatibility-version diagnostic
+//
+
+// RUN: not %clang -target i686-windows -fms-compatibility -fmsc-version=1700 -fms-compatibility-version=17.00.50727.1 -E - </dev/null 2>&1 | FileCheck %s -check-prefix CHECK-BASIC-EXTENDED-DIAGNOSTIC
+
+// CHECK-BASIC-EXTENDED-DIAGNOSTIC: invalid argument '-fmsc-version={{.*}}' not allowed with '-fms-compatibility-version={{.*}}'
+
+
+//
+// Verify -fmsc-version to -fms-compatibility-version conversion
+//
+
+// RUN: %clang -### -target i686-windows -fms-compatibility -fmsc-version=17 -E - </dev/null -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-MSC-17
+
+// CHECK-MSC-17-NOT: "-fmsc-version=1700"
+// CHECK-MSC-17: "-fms-compatibility-version=17.0"
+
+// RUN: %clang -### -target i686-windows -fms-compatibility -fmsc-version=1600 -E - </dev/null -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-MSC-16
+
+// CHECK-MSC-16-NOT: "-fmsc-version=1600"
+// CHECK-MSC-16: "-fms-compatibility-version=16.0"
+
+// RUN: %clang -### -target i686-windows -fms-compatibility -fmsc-version=150020706 -E - </dev/null -o /dev/null 2>&1 | FileCheck %s -check-prefix CHECK-MSC-15
+
+// CHECK-MSC-15-NOT: "-fmsc-version=150020706"
+// CHECK-MSC-15: "-fms-compatibility-version=15.0.20706"
+
diff --git a/test/Driver/netbsd.c b/test/Driver/netbsd.c
index 09c2bd3d6e1f..0e3ebf3c9a28 100644
--- a/test/Driver/netbsd.c
+++ b/test/Driver/netbsd.c
@@ -7,6 +7,42 @@
// RUN: %clang -no-canonical-prefixes -target x86_64--netbsd6.0.0 \
// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
// RUN: | FileCheck -check-prefix=X86_64-6 %s
+// RUN: %clang -no-canonical-prefixes -target aarch64--netbsd \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=AARCH64 %s
+// RUN: %clang -no-canonical-prefixes -target aarch64--netbsd7.0.0 \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=AARCH64-7 %s
+// RUN: %clang -no-canonical-prefixes -target arm64--netbsd \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=ARM64 %s
+// RUN: %clang -no-canonical-prefixes -target arm64--netbsd7.0.0 \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=ARM64-7 %s
+// RUN: %clang -no-canonical-prefixes -target arm--netbsd-eabi \
+// RUN: -no-integrated-as --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=ARM %s
+// RUN: %clang -no-canonical-prefixes -target arm--netbsd \
+// RUN: -no-integrated-as --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=ARM-APCS %s
+// RUN: %clang -no-canonical-prefixes -target thumb--netbsd-eabi \
+// RUN: -no-integrated-as --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=THUMB %s
+// RUN: %clang -no-canonical-prefixes -target arm--netbsd7.0.0-eabi \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=ARM-7 %s
+// RUN: %clang -no-canonical-prefixes -target arm--netbsd6.0.0-eabi \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=ARM-6 %s
+// RUN: %clang -no-canonical-prefixes -target arm--netbsd-eabihf \
+// RUN: -no-integrated-as --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=ARM-HF %s
+// RUN: %clang -no-canonical-prefixes -target sparc--netbsd \
+// RUN: -no-integrated-as --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=SPARC %s
+// RUN: %clang -no-canonical-prefixes -target sparc64--netbsd \
+// RUN: -no-integrated-as --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=SPARC64 %s
// RUN: %clang -no-canonical-prefixes -target x86_64--netbsd -static \
// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
@@ -17,6 +53,33 @@
// RUN: %clang -no-canonical-prefixes -target x86_64--netbsd6.0.0 -static \
// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
// RUN: | FileCheck -check-prefix=S-X86_64-6 %s
+// RUN: %clang -no-canonical-prefixes -target aarch64--netbsd -static \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=S-AARCH64 %s
+// RUN: %clang -no-canonical-prefixes -target aarch64--netbsd7.0.0 -static \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=S-AARCH64-7 %s
+// RUN: %clang -no-canonical-prefixes -target arm64--netbsd -static \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=S-ARM64 %s
+// RUN: %clang -no-canonical-prefixes -target arm64--netbsd7.0.0 -static \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=S-ARM64-7 %s
+// RUN: %clang -no-canonical-prefixes -target arm--netbsd-eabi -static \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=S-ARM %s
+// RUN: %clang -no-canonical-prefixes -target arm--netbsd7.0.0-eabi -static \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=S-ARM-7 %s
+// RUN: %clang -no-canonical-prefixes -target arm--netbsd6.0.0-eabi -static \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=S-ARM-6 %s
+// RUN: %clang -no-canonical-prefixes -target sparc--netbsd -static \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=S-SPARC %s
+// RUN: %clang -no-canonical-prefixes -target sparc64--netbsd -static \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=S-SPARC64 %s
// X86_64: clang{{.*}}" "-cc1" "-triple" "x86_64--netbsd"
// X86_64: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
@@ -34,24 +97,184 @@
// X86_64-6: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
// X86_64-6: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
// X86_64-6: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
-// X86_64-6: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
// X86_64-6: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+// AARCH64: clang{{.*}}" "-cc1" "-triple" "aarch64--netbsd"
+// AARCH64: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
+// AARCH64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
+// AARCH64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
+// AARCH64: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
+// AARCH64: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// AARCH64-7: clang{{.*}}" "-cc1" "-triple" "aarch64--netbsd7.0.0"
+// AARCH64-7: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
+// AARCH64-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
+// AARCH64-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
+// AARCH64-7: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
+// AARCH64-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// ARM64: clang{{.*}}" "-cc1" "-triple" "arm64--netbsd"
+// ARM64: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
+// ARM64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
+// ARM64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
+// ARM64: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
+// ARM64: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// ARM64-7: clang{{.*}}" "-cc1" "-triple" "arm64--netbsd7.0.0"
+// ARM64-7: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
+// ARM64-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
+// ARM64-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
+// ARM64-7: "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
+// ARM64-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// ARM: clang{{.*}}" "-cc1" "-triple" "armv5e--netbsd-eabi"
+// ARM: as{{.*}}" "-mcpu=arm926ej-s" "-o"
+// ARM: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
+// ARM: "-m" "armelf_nbsd_eabi"
+// ARM: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
+// ARM: "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
+// ARM: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
+// ARM: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// ARM-APCS: clang{{.*}}" "-cc1" "-triple" "armv4--netbsd"
+// ARM-APCS: as{{.*}}" "-mcpu=strongarm" "-o"
+// ARM-APCS: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
+// ARM-APCS: "-m" "armelf_nbsd"
+// ARM-APCS: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
+// ARM-APCS: "{{.*}}/usr/lib{{/|\\\\}}oabi{{/|\\\\}}crti.o"
+// ARM-APCS: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
+// ARM-APCS: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// THUMB: clang{{.*}}" "-cc1" "-triple" "armv5e--netbsd-eabi"
+// THUMB: as{{.*}}" "-mcpu=arm926ej-s" "-o"
+// THUMB: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
+// THUMB: "-m" "armelf_nbsd_eabi"
+// THUMB: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
+// THUMB: "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
+// THUMB: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
+// THUMB: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// ARM-7: clang{{.*}}" "-cc1" "-triple" "armv5e--netbsd7.0.0-eabi"
+// ARM-7: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
+// ARM-7: "-m" "armelf_nbsd_eabi"
+// ARM-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
+// ARM-7: "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
+// ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
+// ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// ARM-6: clang{{.*}}" "-cc1" "-triple" "armv5e--netbsd6.0.0-eabi"
+// ARM-6: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
+// ARM-6: "-m" "armelf_nbsd_eabi"
+// ARM-6: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
+// ARM-6: "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
+// ARM-6: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
+// ARM-6: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// ARM-HF: clang{{.*}}" "-cc1" "-triple" "armv5e--netbsd-eabihf"
+// ARM-HF: ld{{.*}}" "-m" "armelf_nbsd_eabihf"
+
+// SPARC: clang{{.*}}" "-cc1" "-triple" "sparc--netbsd"
+// SPARC: as{{.*}}" "-32" "-o"
+// SPARC: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
+// SPARC: "-m" "elf32_sparc"
+// SPARC: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
+// SPARC: "{{.*}}/usr/lib{{/|\\\\}}sparc{{/|\\\\}}crti.o"
+// SPARC: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
+// SPARC: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// SPARC64: clang{{.*}}" "-cc1" "-triple" "sparc64--netbsd"
+// SPARC64: as{{.*}}" "-64" "-Av9" "-o"
+// SPARC64: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
+// SPARC64: "-m" "elf64_sparc"
+// SPARC64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
+// SPARC64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
+// SPARC64: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
// S-X86_64: clang{{.*}}" "-cc1" "-triple" "x86_64--netbsd"
-// S-X86_64: ld{{.*}}" "-Bstatic"
+// S-X86_64: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
// S-X86_64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
// S-X86_64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
// S-X86_64: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
// S-X86_64-7: clang{{.*}}" "-cc1" "-triple" "x86_64--netbsd7.0.0"
-// S-X86_64-7: ld{{.*}}" "-Bstatic"
+// S-X86_64-7: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
// S-X86_64-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
// S-X86_64-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
// S-X86_64-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
// S-X86_64-6: clang{{.*}}" "-cc1" "-triple" "x86_64--netbsd6.0.0"
-// S-X86_64-6: ld{{.*}}" "-Bstatic"
+// S-X86_64-6: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
// S-X86_64-6: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
// S-X86_64-6: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
// S-X86_64-6: "-lgcc_eh" "-lc" "-lgcc"
// S-X86_64-6: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// S-AARCH64: clang{{.*}}" "-cc1" "-triple" "aarch64--netbsd"
+// S-AARCH64: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
+// S-AARCH64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
+// S-AARCH64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
+// S-AARCH64: "-lgcc_eh" "-lc" "-lgcc"
+// S-AARCH64: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// S-AARCH64-7: clang{{.*}}" "-cc1" "-triple" "aarch64--netbsd7.0.0"
+// S-AARCH64-7: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
+// S-AARCH64-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
+// S-AARCH64-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
+// S-AARCH64-7: "-lgcc_eh" "-lc" "-lgcc"
+// S-AARCH64-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// S-ARM64: clang{{.*}}" "-cc1" "-triple" "arm64--netbsd"
+// S-ARM64: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
+// S-ARM64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
+// S-ARM64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
+// S-ARM64: "-lgcc_eh" "-lc" "-lgcc"
+// S-ARM64: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// S-ARM64-7: clang{{.*}}" "-cc1" "-triple" "arm64--netbsd7.0.0"
+// S-ARM64-7: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
+// S-ARM64-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
+// S-ARM64-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
+// S-ARM64-7: "-lgcc_eh" "-lc" "-lgcc"
+// S-ARM64-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// S-ARM: clang{{.*}}" "-cc1" "-triple" "armv5e--netbsd-eabi"
+// S-ARM: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
+// S-ARM: "-m" "armelf_nbsd_eabi"
+// S-ARM: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
+// S-ARM: "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
+// S-ARM: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
+// S-ARM: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// S-ARM-7: clang{{.*}}" "-cc1" "-triple" "armv5e--netbsd7.0.0-eabi"
+// S-ARM-7: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
+// S-ARM-7: "-m" "armelf_nbsd_eabi"
+// S-ARM-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
+// S-ARM-7: "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
+// S-ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
+// S-ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// S-ARM-6: clang{{.*}}" "-cc1" "-triple" "armv5e--netbsd6.0.0-eabi"
+// S-ARM-6: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
+// S-ARM-6: "-m" "armelf_nbsd_eabi"
+// S-ARM-6: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
+// S-ARM-6: "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
+// S-ARM-6: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
+// S-ARM-6: "-lgcc_eh" "-lc" "-lgcc"
+// S-ARM-6: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// S-SPARC: clang{{.*}}" "-cc1" "-triple" "sparc--netbsd"
+// S-SPARC: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
+// S-SPARC: "-m" "elf32_sparc"
+// S-SPARC: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
+// S-SPARC: "{{.*}}/usr/lib{{/|\\\\}}sparc{{/|\\\\}}crti.o"
+// S-SPARC: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
+// S-SPARC: "-lgcc_eh" "-lc" "-lgcc"
+// S-SPARC: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// S-SPARC64: clang{{.*}}" "-cc1" "-triple" "sparc64--netbsd"
+// S-SPARC64: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
+// S-SPARC64: "-m" "elf64_sparc"
+// S-SPARC64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
+// S-SPARC64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc"
+// S-SPARC64: "-lgcc_eh" "-lc" "-lgcc"
+// S-SPARC64: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
diff --git a/test/Driver/netbsd.cpp b/test/Driver/netbsd.cpp
index 1c338d3e6925..43b9fdeaa587 100644
--- a/test/Driver/netbsd.cpp
+++ b/test/Driver/netbsd.cpp
@@ -7,6 +7,30 @@
// RUN: %clangxx -no-canonical-prefixes -target x86_64--netbsd6.0.0 \
// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
// RUN: | FileCheck -check-prefix=X86_64-6 %s
+// RUN: %clangxx -no-canonical-prefixes -target arm--netbsd6.0.0-eabi \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=ARM %s
+// RUN: %clangxx -no-canonical-prefixes -target arm--netbsd7.0.0-eabi \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=ARM-7 %s
+// RUN: %clangxx -no-canonical-prefixes -target aarch64--netbsd \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=AARCH64 %s
+// RUN: %clangxx -no-canonical-prefixes -target aarch64--netbsd7.0.0 \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=AARCH64-7 %s
+// RUN: %clangxx -no-canonical-prefixes -target arm64--netbsd \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=ARM64 %s
+// RUN: %clangxx -no-canonical-prefixes -target arm64--netbsd7.0.0 \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=ARM64-7 %s
+// RUN: %clangxx -no-canonical-prefixes -target sparc--netbsd \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=SPARC %s
+// RUN: %clangxx -no-canonical-prefixes -target sparc64--netbsd \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=SPARC64 %s
// RUN: %clangxx -no-canonical-prefixes -target x86_64--netbsd -static \
// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
@@ -17,6 +41,30 @@
// RUN: %clangxx -no-canonical-prefixes -target x86_64--netbsd6.0.0 -static \
// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
// RUN: | FileCheck -check-prefix=S-X86_64-6 %s
+// RUN: %clangxx -no-canonical-prefixes -target arm--netbsd6.0.0-eabi -static \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=S-ARM %s
+// RUN: %clangxx -no-canonical-prefixes -target arm--netbsd7.0.0-eabi -static \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=S-ARM-7 %s
+// RUN: %clangxx -no-canonical-prefixes -target aarch64--netbsd -static \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=S-AARCH64 %s
+// RUN: %clangxx -no-canonical-prefixes -target aarch64--netbsd7.0.0 -static \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=S-AARCH64-7 %s
+// RUN: %clangxx -no-canonical-prefixes -target arm64--netbsd -static \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=S-ARM64 %s
+// RUN: %clangxx -no-canonical-prefixes -target arm64--netbsd7.0.0 -static \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=S-ARM64-7 %s
+// RUN: %clangxx -no-canonical-prefixes -target sparc--netbsd -static \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=S-SPARC %s
+// RUN: %clangxx -no-canonical-prefixes -target sparc64--netbsd -static \
+// RUN: --sysroot=%S/Inputs/basic_netbsd_tree %s -### 2>&1 \
+// RUN: | FileCheck -check-prefix=S-SPARC64 %s
// X86_64: clang{{.*}}" "-cc1" "-triple" "x86_64--netbsd"
// X86_64: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
@@ -37,21 +85,133 @@
// X86_64-6: "-lm" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
// X86_64-6: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+// ARM: clang{{.*}}" "-cc1" "-triple" "armv5e--netbsd6.0.0-eabi"
+// ARM: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
+// ARM: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
+// ARM: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lstdc++"
+// ARM: "-lm" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
+// ARM: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// ARM-7: clang{{.*}}" "-cc1" "-triple" "armv5e--netbsd7.0.0-eabi"
+// ARM-7: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
+// ARM-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
+// ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++" "-lm" "-lc"
+// ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// AARCH64: clang{{.*}}" "-cc1" "-triple" "aarch64--netbsd"
+// AARCH64: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
+// AARCH64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
+// AARCH64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lstdc++"
+// AARCH64: "-lm" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
+// AARCH64: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// AARCH64-7: clang{{.*}}" "-cc1" "-triple" "aarch64--netbsd7.0.0"
+// AARCH64-7: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
+// AARCH64-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
+// AARCH64-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lstdc++"
+// AARCH64-7: "-lm" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
+// AARCH64-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// ARM64: clang{{.*}}" "-cc1" "-triple" "arm64--netbsd"
+// ARM64: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
+// ARM64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
+// ARM64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lstdc++"
+// ARM64: "-lm" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
+// ARM64: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// ARM64-7: clang{{.*}}" "-cc1" "-triple" "arm64--netbsd7.0.0"
+// ARM64-7: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
+// ARM64-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
+// ARM64-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lstdc++"
+// ARM64-7: "-lm" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
+// ARM64-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// SPARC: clang{{.*}}" "-cc1" "-triple" "sparc--netbsd"
+// SPARC: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
+// SPARC: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
+// SPARC: "{{.*}}/usr/lib{{/|\\\\}}sparc{{/|\\\\}}crti.o"
+// SPARC: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lstdc++"
+// SPARC: "-lm" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
+// SPARC: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// SPARC64: clang{{.*}}" "-cc1" "-triple" "sparc64--netbsd"
+// SPARC64: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
+// SPARC64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
+// SPARC64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lstdc++"
+// SPARC64: "-lm" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed"
+// SPARC64: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
// S-X86_64: clang{{.*}}" "-cc1" "-triple" "x86_64--netbsd"
-// S-X86_64: ld{{.*}}" "-Bstatic"
+// S-X86_64: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
// S-X86_64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
// S-X86_64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
// S-X86_64: "-lm" "-lc" "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
// S-X86_64-7: clang{{.*}}" "-cc1" "-triple" "x86_64--netbsd7.0.0"
-// S-X86_64-7: ld{{.*}}" "-Bstatic"
+// S-X86_64-7: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
// S-X86_64-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
// S-X86_64-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++"
// S-X86_64-7: "-lm" "-lc" "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
// S-X86_64-6: clang{{.*}}" "-cc1" "-triple" "x86_64--netbsd6.0.0"
-// S-X86_64-6: ld{{.*}}" "-Bstatic"
+// S-X86_64-6: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
// S-X86_64-6: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
// S-X86_64-6: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lstdc++"
// S-X86_64-6: "-lm" "-lc" "-lgcc_eh" "-lc" "-lgcc"
// S-X86_64-6: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// S-ARM: clang{{.*}}" "-cc1" "-triple" "armv5e--netbsd6.0.0-eabi"
+// S-ARM: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
+// S-ARM: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
+// S-ARM: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lstdc++"
+// S-ARM: "-lm" "-lc" "-lgcc_eh" "-lc" "-lgcc"
+// S-ARM: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// S-ARM-7: clang{{.*}}" "-cc1" "-triple" "armv5e--netbsd7.0.0-eabi"
+// S-ARM-7: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
+// S-ARM-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
+// S-ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++" "-lm" "-lc"
+// S-ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// S-AARCH64: clang{{.*}}" "-cc1" "-triple" "aarch64--netbsd"
+// S-AARCH64: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
+// S-AARCH64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
+// S-AARCH64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lstdc++"
+// S-AARCH64: "-lm" "-lc" "-lgcc_eh" "-lc" "-lgcc"
+// S-AARCH64: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// S-AARCH64-7: clang{{.*}}" "-cc1" "-triple" "aarch64--netbsd7.0.0"
+// S-AARCH64-7: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
+// S-AARCH64-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
+// S-AARCH64-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lstdc++"
+// S-AARCH64-7: "-lm" "-lc" "-lgcc_eh" "-lc" "-lgcc"
+// S-AARCH64-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// S-ARM64: clang{{.*}}" "-cc1" "-triple" "arm64--netbsd"
+// S-ARM64: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
+// S-ARM64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
+// S-ARM64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lstdc++"
+// S-ARM64: "-lm" "-lc" "-lgcc_eh" "-lc" "-lgcc"
+// S-ARM64: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// S-ARM64-7: clang{{.*}}" "-cc1" "-triple" "arm64--netbsd7.0.0"
+// S-ARM64-7: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
+// S-ARM64-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
+// S-ARM64-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lstdc++"
+// S-ARM64-7: "-lm" "-lc" "-lgcc_eh" "-lc" "-lgcc"
+// S-ARM64-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// S-SPARC: clang{{.*}}" "-cc1" "-triple" "sparc--netbsd"
+// S-SPARC: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
+// S-SPARC: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o"
+// S-SPARC: "{{.*}}/usr/lib{{/|\\\\}}sparc{{/|\\\\}}crti.o"
+// S-SPARC: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lstdc++"
+// S-SPARC: "-lm" "-lc" "-lgcc_eh" "-lc" "-lgcc"
+// S-SPARC: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
+
+// S-SPARC64: clang{{.*}}" "-cc1" "-triple" "sparc64--netbsd"
+// S-SPARC64: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
+// S-SPARC64: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}crti.o"
+// S-SPARC64: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lstdc++"
+// S-SPARC64: "-lm" "-lc" "-lgcc_eh" "-lc" "-lgcc"
+// S-SPARC64: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
diff --git a/test/Driver/no-integrated-as.c b/test/Driver/no-integrated-as.c
new file mode 100644
index 000000000000..812ab1e6463f
--- /dev/null
+++ b/test/Driver/no-integrated-as.c
@@ -0,0 +1,19 @@
+// RUN: %clang -target i386 -### -no-integrated-as -c %s 2>&1 \
+// RUN: | FileCheck %s -check-prefix NOIAS
+
+// NOIAS: -no-integrated-as
+
+// RUN: %clang -target i386 -### -integrated-as -c %s 2>&1 \
+// RUN: | FileCheck %s -check-prefix IAS
+
+// IAS-NOT: -no-integrated-as
+
+// RUN: %clang -target i386 -### -c %s 2>&1 | FileCheck %s -check-prefix DEFAULT
+
+// DEFAULT-NOT: -no-integrated-as
+
+// RUN: %clang -target msp430 -### -c %s 2>&1 \
+// RUN: | FileCheck %s -check-prefix NO-IAS-DEFAULT
+
+// NO-IAS-DEFAULT: -no-integrated-as
+
diff --git a/test/Driver/nostdincxx.cpp b/test/Driver/nostdincxx.cpp
index 1e1d85f35830..126828de9ac2 100644
--- a/test/Driver/nostdincxx.cpp
+++ b/test/Driver/nostdincxx.cpp
@@ -1,4 +1,6 @@
// RUN: not %clangxx -nostdinc++ %s 2>&1 | FileCheck %s
-// XFAIL: win32
// CHECK: file not found
#include <vector>
+
+// MSVC has C++ headers in same directory as C headers.
+// REQUIRES: non-ms-sdk
diff --git a/test/Driver/nozlibcompress.c b/test/Driver/nozlibcompress.c
new file mode 100644
index 000000000000..4eac06616555
--- /dev/null
+++ b/test/Driver/nozlibcompress.c
@@ -0,0 +1,6 @@
+// RUN: %clang -c %s -Wa,--compress-debug-sections 2>&1 | FileCheck %s
+// RUN: %clang -c %s -Wa,--compress-debug-sections -Wa,--nocompress-debug-sections 2>&1 | FileCheck --check-prefix=NOWARN %s
+// REQUIRES: nozlib
+
+// CHECK: warning: cannot compress debug sections (zlib not installed)
+// NOWARN-NOT: warning: cannot compress debug sections (zlib not installed)
diff --git a/test/Driver/openbsd.c b/test/Driver/openbsd.c
index ef02b07d29ef..d263f485bf2f 100644
--- a/test/Driver/openbsd.c
+++ b/test/Driver/openbsd.c
@@ -39,6 +39,10 @@
// RUN: | FileCheck -check-prefix=CHECK-AMD64-M32 %s
// RUN: %clang -target powerpc-unknown-openbsd -### -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-POWERPC %s
+// RUN: %clang -target sparc-unknown-openbsd -### -no-integrated-as -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=CHECK-SPARC %s
+// RUN: %clang -target sparc64-unknown-openbsd -### -no-integrated-as -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=CHECK-SPARC64 %s
// RUN: %clang -target mips64-unknown-openbsd -### -no-integrated-as -c %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-MIPS64 %s
// RUN: %clang -target mips64-unknown-openbsd -fPIC -### -no-integrated-as -c %s 2>&1 \
@@ -49,7 +53,18 @@
// RUN: | FileCheck -check-prefix=CHECK-MIPS64EL-PIC %s
// CHECK-AMD64-M32: as{{.*}}" "--32"
// CHECK-POWERPC: as{{.*}}" "-mppc" "-many"
+// CHECK-SPARC: as{{.*}}" "-32"
+// CHECK-SPARC64: as{{.*}}" "-64" "-Av9a"
// CHECK-MIPS64: as{{.*}}" "-mabi" "64" "-EB"
// CHECK-MIPS64-PIC: as{{.*}}" "-mabi" "64" "-EB" "-KPIC"
// CHECK-MIPS64EL: as{{.*}}" "-mabi" "64" "-EL"
// CHECK-MIPS64EL-PIC: as{{.*}}" "-mabi" "64" "-EL" "-KPIC"
+
+// Check that the integrated assembler is enabled for PowerPC and SPARC
+// RUN: %clang -target powerpc-unknown-openbsd -### -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=CHECK-IAS %s
+// RUN: %clang -target sparc-unknown-openbsd -### -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=CHECK-IAS %s
+// RUN: %clang -target sparc64-unknown-openbsd -### -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=CHECK-IAS %s
+// CHECK-IAS-NOT: "-no-integrated-as"
diff --git a/test/Driver/pch-deps.c b/test/Driver/pch-deps.c
new file mode 100644
index 000000000000..30486364cd4b
--- /dev/null
+++ b/test/Driver/pch-deps.c
@@ -0,0 +1,10 @@
+// RUN: %clang -x c-header %s -o %t.pch -MMD -MT dependencies -MF %t.d -### 2> %t
+// RUN: FileCheck %s -input-file=%t
+// CHECK: -emit-pch
+// CHECK: -dependency-file
+// CHECK: -module-file-deps
+
+// RUN: %clang -c %s -o %t -MMD -MT dependencies -MF %t.d -### 2> %t
+// RUN: FileCheck %s -check-prefix=CHECK-NOPCH -input-file=%t
+// CHECK-NOPCH: -dependency-file
+// CHECK-NOPCH-NOT: -module-file-deps
diff --git a/test/Driver/pic.c b/test/Driver/pic.c
index 30e1005c9737..3629cc473574 100644
--- a/test/Driver/pic.c
+++ b/test/Driver/pic.c
@@ -138,7 +138,7 @@
// RUN: | FileCheck %s --check-prefix=CHECK-NO-PIE
//
// Darwin is a beautiful and unique snowflake when it comes to these flags.
-// When targetting a 32-bit darwin system, the -fno-* flag variants work and
+// When targeting a 32-bit darwin system, the -fno-* flag variants work and
// disable PIC, but any other flag enables PIC (*not* PIE) even if the flag
// specifies PIE. On 64-bit targets, there is simply nothing you can do, there
// is no PIE, there is only PIC when it comes to compilation.
@@ -201,7 +201,17 @@
// RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
//
// On OpenBSD, PIE is enabled by default, but can be disabled.
+// RUN: %clang -c %s -target amd64-pc-openbsd -### 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-PIE1
// RUN: %clang -c %s -target i386-pc-openbsd -### 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-PIE1
+// RUN: %clang -c %s -target mips64-unknown-openbsd -### 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-PIE1
+// RUN: %clang -c %s -target mips64el-unknown-openbsd -### 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-PIE1
+// RUN: %clang -c %s -target powerpc-unknown-openbsd -### 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-PIE2
+// RUN: %clang -c %s -target sparc64-unknown-openbsd -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK-PIE2
// RUN: %clang -c %s -target i386-pc-openbsd -fno-pie -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK-NO-PIC
@@ -209,3 +219,15 @@
// On OpenBSD, -nopie needs to be passed through to the linker.
// RUN: %clang %s -target i386-pc-openbsd -nopie -### 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK-NOPIE-LD
+//
+// On Android PIC is enabled by default
+// RUN: %clang -c %s -target i686-linux-android -### 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-PIC2
+// RUN: %clang -c %s -target arm-linux-androideabi -### 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-PIC1
+// RUN: %clang -c %s -target mipsel-linux-android -### 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-PIC1
+// RUN: %clang -c %s -target aarch64-linux-android -### 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-PIC1
+// RUN: %clang -c %s -target arm64-linux-android -### 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-PIC1
diff --git a/test/Driver/ppc-features.cpp b/test/Driver/ppc-features.cpp
index 6959c629e581..fa9a7ecd4d2f 100644
--- a/test/Driver/ppc-features.cpp
+++ b/test/Driver/ppc-features.cpp
@@ -59,9 +59,12 @@
// RUN: %clang -target powerpc64-unknown-linux-gnu %s -fno-altivec -mcpu=pwr7 -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-14 %s
// CHECK-14: "-target-feature" "-altivec"
-// RUN: %clang -target powerpc64-unknown-linux-gnu %s -fno-altivec -mcpu=ppc64 -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-15 %s
+// RUN: %clang -target powerpc64-unknown-linux-gnu %s -fno-altivec -mcpu=pwr8 -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-15 %s
// CHECK-15: "-target-feature" "-altivec"
+// RUN: %clang -target powerpc64-unknown-linux-gnu %s -fno-altivec -mcpu=ppc64 -### -o %t.o 2>&1 | FileCheck --check-prefix=CHECK-16 %s
+// CHECK-16: "-target-feature" "-altivec"
+
// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-qpx -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOQPX %s
// CHECK-NOQPX: "-target-feature" "-qpx"
@@ -92,3 +95,27 @@
// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-vsx -mvsx -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-VSX %s
// CHECK-VSX: "-target-feature" "+vsx"
+// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-crbits -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOCRBITS %s
+// CHECK-NOCRBITS: "-target-feature" "-crbits"
+
+// RUN: %clang -target powerpc64-unknown-linux-gnu %s -mno-crbits -mcrbits -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK-CRBITS %s
+// CHECK-CRBITS: "-target-feature" "+crbits"
+
+// Assembler features
+// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK_BE_AS_ARGS %s
+// CHECK_BE_AS_ARGS: "-mppc64"
+// CHECK_BE_AS_ARGS: "-many"
+
+// RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK_LE_AS_ARGS %s
+// CHECK_LE_AS_ARGS: "-mppc64"
+// CHECK_LE_AS_ARGS: "-many"
+// CHECK_LE_AS_ARGS: "-mlittle-endian"
+
+// linker features
+// RUN: %clang -target powerpc64-unknown-linux-gnu %s -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK_BE_LD_ARGS %s
+// CHECK_BE_LD_ARGS: "elf64ppc"
+
+// RUN: %clang -target powerpc64le-unknown-linux-gnu %s -### -o %t.o 2>&1 | FileCheck -check-prefix=CHECK_LE_LD_ARGS %s
+// CHECK_LE_LD_ARGS: "elf64lppc"
+
+
diff --git a/test/Driver/preprocess-multiple.c b/test/Driver/preprocess-multiple.c
new file mode 100644
index 000000000000..9f87d3d74fd3
--- /dev/null
+++ b/test/Driver/preprocess-multiple.c
@@ -0,0 +1,6 @@
+// RUN: %clang -E %s %s | FileCheck %s
+// Test that the driver can preprocess multiple files.
+
+X
+// CHECK: X
+// CHECK: X
diff --git a/test/Driver/qa_override.c b/test/Driver/qa_override.c
index e5d9c95944aa..d2754c840ad2 100644
--- a/test/Driver/qa_override.c
+++ b/test/Driver/qa_override.c
@@ -1,12 +1,12 @@
-// RUN: env QA_OVERRIDE_GCC3_OPTIONS="#+-Os +-Oz +-O +-O3 +-Oignore +a +b +c xb Xa Omagic ^-### " %clang -target x86_64-apple-darwin %s -O2 b -O3 2>&1 | FileCheck %s
-// RUN: env QA_OVERRIDE_GCC3_OPTIONS="x-Werror +-msse" %clang -target x86_64-apple-darwin -Werror %s -c -### 2>&1 | FileCheck %s -check-prefix=RM-WERROR
+// RUN: env CCC_OVERRIDE_OPTIONS="#+-Os +-Oz +-O +-O3 +-Oignore +a +b +c xb Xa Omagic ^-### " %clang -target x86_64-apple-darwin %s -O2 b -O3 2>&1 | FileCheck %s
+// RUN: env CCC_OVERRIDE_OPTIONS="x-Werror +-msse" %clang -target x86_64-apple-darwin -Werror %s -c -### 2>&1 | FileCheck %s -check-prefix=RM-WERROR
// CHECK: "-cc1"
// CHECK-NOT: "-Oignore"
// CHECK: "-Omagic"
// CHECK-NOT: "-Oignore"
-// RM-WERROR: ### QA_OVERRIDE_GCC3_OPTIONS: x-Werror +-msse
+// RM-WERROR: ### CCC_OVERRIDE_OPTIONS: x-Werror +-msse
// RM-WERROR-NEXT: ### Deleting argument -Werror
// RM-WERROR-NEXT: ### Adding argument -msse at end
// RM-WERROR-NOT: "-Werror"
diff --git a/test/Driver/r600-mcpu.cl b/test/Driver/r600-mcpu.cl
index 7238ff4fbd20..47c018512bed 100644
--- a/test/Driver/r600-mcpu.cl
+++ b/test/Driver/r600-mcpu.cl
@@ -34,6 +34,7 @@
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=kabini %s -o - 2>&1 | FileCheck --check-prefix=KABINI-CHECK %s
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=kaveri %s -o - 2>&1 | FileCheck --check-prefix=KAVERI-CHECK %s
// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=hawaii %s -o - 2>&1 | FileCheck --check-prefix=HAWAII-CHECK %s
+// RUN: %clang -### -target r600 -x cl -S -emit-llvm -mcpu=mullins %s -o - 2>&1 | FileCheck --check-prefix=MULLINS-CHECK %s
// R600-CHECK: "-target-cpu" "r600"
// RS880-CHECK: "-target-cpu" "rs880"
@@ -58,3 +59,4 @@
// KABINI-CHECK: "-target-cpu" "kabini"
// KAVERI-CHECK: "-target-cpu" "kaveri"
// HAWAII-CHECK: "-target-cpu" "hawaii"
+// MULLINS-CHECK: "-target-cpu" "mullins"
diff --git a/test/Driver/sanitize_unwind_tables.c b/test/Driver/sanitize_unwind_tables.c
new file mode 100644
index 000000000000..8b7889966657
--- /dev/null
+++ b/test/Driver/sanitize_unwind_tables.c
@@ -0,0 +1,11 @@
+// Sanitizers need to unwind stack at any code location.
+// Test that unwind tables are enabled in supported configurations.
+
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s
+// RUN: %clang -target i686-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s
+// RUN: %clang -target arm-linux-androideabi -fsanitize=address %s -### 2>&1 | FileCheck %s
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory %s -### 2>&1 | FileCheck %s
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=thread %s -### 2>&1 | FileCheck %s
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=dataflow %s -### 2>&1 | FileCheck %s
+
+// CHECK: -munwind-tables
diff --git a/test/Driver/sanitizer-ld.c b/test/Driver/sanitizer-ld.c
index 691b44bba262..786262c68b84 100644
--- a/test/Driver/sanitizer-ld.c
+++ b/test/Driver/sanitizer-ld.c
@@ -15,6 +15,65 @@
// CHECK-ASAN-LINUX-NOT: "-export-dynamic"
// CHECK-ASAN-LINUX: "--dynamic-list={{.*}}libclang_rt.asan-i386.a.syms"
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -target i386-unknown-linux -fsanitize=address -shared-libasan \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
+// RUN: --sysroot=%S/Inputs/basic_linux_tree \
+// RUN: | FileCheck --check-prefix=CHECK-SHARED-ASAN-LINUX %s
+//
+// CHECK-SHARED-ASAN-LINUX: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
+// CHECK-SHARED-ASAN-LINUX-NOT: "-lc"
+// CHECK-SHARED-ASAN-LINUX-NOT: libclang_rt.asan-i386.a"
+// CHECK-SHARED-ASAN-LINUX: "-whole-archive" "{{.*}}libclang_rt.asan-preinit-i386.a" "-no-whole-archive"
+// CHECK-SHARED-ASAN-LINUX: libclang_rt.asan-i386.so"
+// CHECK-SHARED-ASAN-LINUX-NOT: "-lpthread"
+// CHECK-SHARED-ASAN-LINUX-NOT: "-lrt"
+// CHECK-SHARED-ASAN-LINUX-NOT: "-ldl"
+// CHECK-SHARED-ASAN-LINUX-NOT: "-export-dynamic"
+// CHECK-SHARED-ASAN-LINUX-NOT: "--dynamic-list"
+
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.so -shared 2>&1 \
+// RUN: -target i386-unknown-linux -fsanitize=address -shared-libasan \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
+// RUN: --sysroot=%S/Inputs/basic_linux_tree \
+// RUN: | FileCheck --check-prefix=CHECK-DSO-SHARED-ASAN-LINUX %s
+//
+// CHECK-DSO-SHARED-ASAN-LINUX: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
+// CHECK-DSO-SHARED-ASAN-LINUX-NOT: "-lc"
+// CHECK-DSO-SHARED-ASAN-LINUX-NOT: libclang_rt.asan-i386.a"
+// CHECK-DSO-SHARED-ASAN-LINUX-NOT: "libclang_rt.asan-preinit-i386.a"
+// CHECK-DSO-SHARED-ASAN-LINUX: libclang_rt.asan-i386.so"
+// CHECK-DSO-SHARED-ASAN-LINUX-NOT: "-lpthread"
+// CHECK-DSO-SHARED-ASAN-LINUX-NOT: "-lrt"
+// CHECK-DSO-SHARED-ASAN-LINUX-NOT: "-ldl"
+// CHECK-DSO-SHARED-ASAN-LINUX-NOT: "-export-dynamic"
+// CHECK-DSO-SHARED-ASAN-LINUX-NOT: "--dynamic-list"
+
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -target i386-unknown-freebsd -fsanitize=address \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
+// RUN: --sysroot=%S/Inputs/basic_freebsd_tree \
+// RUN: | FileCheck --check-prefix=CHECK-ASAN-FREEBSD %s
+//
+// CHECK-ASAN-FREEBSD: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
+// CHECK-ASAN-FREEBSD-NOT: "-lc"
+// CHECK-ASAN-FREEBSD-NOT: libclang_rt.asan_cxx
+// CHECK-ASAN-FREEBSD: freebsd{{/|\\+}}libclang_rt.asan-i386.a"
+// CHECK-ASAN-FREEBSD-NOT: libclang_rt.asan_cxx
+// CHECK-ASAN-FREEBSD: "-lpthread"
+// CHECK-ASAN-FREEBSD: "-lrt"
+// CHECK-ASAN-FREEBSD: "-export-dynamic"
+// CHECK-ASAN-FREEBSD-NOT: "--dynamic-list"
+
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -target i386-unknown-freebsd -fsanitize=address \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
+// RUN: --sysroot=%S/Inputs/basic_freebsd_tree \
+// RUN: | FileCheck --check-prefix=CHECK-ASAN-FREEBSD-LDL %s
+//
+// CHECK-ASAN-FREEBSD-LDL: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
+// CHECK-ASAN-FREEBSD-LDL-NOT: "-ldl"
+
// RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: -target i386-unknown-linux -fsanitize=address \
// RUN: -resource-dir=%S/Inputs/empty_resource_dir \
@@ -23,6 +82,7 @@
//
// CHECK-ASAN-LINUX-CXX: "{{(.*[^-.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
// CHECK-ASAN-LINUX-CXX-NOT: "-lc"
+// CHECK-ASAN-LINUX-CXX: "-whole-archive" "{{.*}}libclang_rt.asan_cxx-i386.a" "-no-whole-archive"
// CHECK-ASAN-LINUX-CXX: "-whole-archive" "{{.*}}libclang_rt.asan-i386.a" "-no-whole-archive"
// CHECK-ASAN-LINUX-CXX: "-lpthread"
// CHECK-ASAN-LINUX-CXX: "-lrt"
@@ -42,6 +102,24 @@
// CHECK-ASAN-LINUX-CXX-STATIC: stdc++
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -target arm-linux-gnueabi -fsanitize=address \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-ASAN-ARM %s
+//
+// CHECK-ASAN-ARM: "{{(.*[^.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
+// CHECK-ASAN-ARM-NOT: "-lc"
+// CHECK-ASAN-ARM: libclang_rt.asan-arm.a"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -target armv7l-linux-gnueabi -fsanitize=address \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: | FileCheck --check-prefix=CHECK-ASAN-ARMv7 %s
+//
+// CHECK-ASAN-ARMv7: "{{(.*[^.0-9A-Z_a-z])?}}ld{{(.exe)?}}"
+// CHECK-ASAN-ARMv7-NOT: "-lc"
+// CHECK-ASAN-ARMv7: libclang_rt.asan-arm.a"
+
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: -target arm-linux-androideabi -fsanitize=address \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=CHECK-ASAN-ANDROID %s
@@ -50,6 +128,16 @@
// CHECK-ASAN-ANDROID-NOT: "-lc"
// CHECK-ASAN-ANDROID: libclang_rt.asan-arm-android.so"
// CHECK-ASAN-ANDROID-NOT: "-lpthread"
+// CHECK-ASAN-ANDROID: "-pie"
+// CHECK-ASAN-ANDROID-NOT: "-lpthread"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -target arm-linux-androideabi -fsanitize=address \
+// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
+// RUN: -shared-libasan \
+// RUN: | FileCheck --check-prefix=CHECK-ASAN-ANDROID-SHARED-LIBASAN %s
+//
+// CHECK-ASAN-ANDROID-SHARED-LIBASAN-NOT: argument unused during compilation: '-shared-libasan'
//
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: -target arm-linux-androideabi -fsanitize=address \
@@ -109,6 +197,7 @@
// RUN: %clangxx -fsanitize=undefined %s -### -o %t.o 2>&1 \
// RUN: -target i386-unknown-linux \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: | FileCheck --check-prefix=CHECK-UBSAN-LINUX-CXX %s
// CHECK-UBSAN-LINUX-CXX: "{{.*}}ld{{(.exe)?}}"
@@ -116,8 +205,10 @@
// CHECK-UBSAN-LINUX-CXX: "-whole-archive" "{{.*}}libclang_rt.san-i386.a" "-no-whole-archive"
// CHECK-UBSAN-LINUX-CXX-NOT: libclang_rt.asan
// CHECK-UBSAN-LINUX-CXX: "-whole-archive" "{{.*}}libclang_rt.ubsan-i386.a" "-no-whole-archive"
+// CHECK-UBSAN-LINUX-CXX: "--dynamic-list={{.*}}libclang_rt.ubsan-i386.a.syms"
// CHECK-UBSAN-LINUX-CXX: "-whole-archive" "{{.*}}libclang_rt.ubsan_cxx-i386.a" "-no-whole-archive"
// CHECK-UBSAN-LINUX-CXX: "-lpthread"
+// CHECK-UBSAN-LINUX-CXX: "--dynamic-list={{.*}}libclang_rt.ubsan_cxx-i386.a.syms"
// CHECK-UBSAN-LINUX-CXX: "-lstdc++"
// RUN: %clang -fsanitize=address,undefined %s -### -o %t.o 2>&1 \
@@ -148,11 +239,16 @@
// RUN: %clang -fsanitize=undefined %s -### -o %t.o 2>&1 \
// RUN: -target i386-unknown-linux \
+// RUN: -resource-dir=%S/Inputs/resource_dir \
// RUN: --sysroot=%S/Inputs/basic_linux_tree \
// RUN: -shared \
// RUN: | FileCheck --check-prefix=CHECK-UBSAN-LINUX-SHARED %s
// CHECK-UBSAN-LINUX-SHARED: "{{.*}}ld{{(.exe)?}}"
-// CHECK-UBSAN-LINUX-SHARED: libclang_rt.ubsan-i386.a"
+// CHECK-UBSAN-LINUX-SHARED-NOT: --export-dynamic
+// CHECK-UBSAN-LINUX-SHARED-NOT: --dynamic-list
+// CHECK-UBSAN-LINUX-SHARED-NOT: libclang_rt.ubsan-i386.a"
+// CHECK-UBSAN-LINUX-SHARED-NOT: --export-dynamic
+// CHECK-UBSAN-LINUX-SHARED-NOT: --dynamic-list
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: -target x86_64-unknown-linux -fsanitize=leak \
diff --git a/test/Driver/sparc-float.c b/test/Driver/sparc-float.c
new file mode 100644
index 000000000000..15050d2c4ea4
--- /dev/null
+++ b/test/Driver/sparc-float.c
@@ -0,0 +1,38 @@
+// Check handling -mhard-float / -msoft-float options
+// when build for SPARC platforms.
+//
+// Default sparc
+// RUN: %clang -c %s -### -o %t.o 2>&1 \
+// RUN: -target sparc-linux-gnu \
+// RUN: | FileCheck --check-prefix=CHECK-DEF %s
+// CHECK-DEF: "-msoft-float"
+//
+// -mhard-float
+// RUN: %clang -c %s -### -o %t.o 2>&1 \
+// RUN: -target sparc-linux-gnu -mhard-float \
+// RUN: | FileCheck --check-prefix=CHECK-HARD %s
+// CHECK-HARD: "-mhard-float"
+//
+// -msoft-float
+// RUN: %clang -c %s -### -o %t.o 2>&1 \
+// RUN: -target sparc-linux-gnu -msoft-float \
+// RUN: | FileCheck --check-prefix=CHECK-SOFT %s
+// CHECK-SOFT: "-msoft-float"
+//
+// Default sparc64
+// RUN: %clang -c %s -### -o %t.o 2>&1 \
+// RUN: -target sparc64-linux-gnu \
+// RUN: | FileCheck --check-prefix=CHECK-DEF-SPARC64 %s
+// CHECK-DEF-SPARC64: "-msoft-float"
+//
+// -mhard-float
+// RUN: %clang -c %s -### -o %t.o 2>&1 \
+// RUN: -target sparc64-linux-gnu -mhard-float \
+// RUN: | FileCheck --check-prefix=CHECK-HARD-SPARC64 %s
+// CHECK-HARD-SPARC64: "-mhard-float"
+//
+// -msoft-float
+// RUN: %clang -c %s -### -o %t.o 2>&1 \
+// RUN: -target sparc64-linux-gnu -msoft-float \
+// RUN: | FileCheck --check-prefix=CHECK-SOFT-SPARC64 %s
+// CHECK-SOFT-SPARC64: "-msoft-float"
diff --git a/test/Driver/stack-protector.c b/test/Driver/stack-protector.c
index 2eb0f53530a7..7fecd1b02132 100644
--- a/test/Driver/stack-protector.c
+++ b/test/Driver/stack-protector.c
@@ -1,17 +1,25 @@
// RUN: %clang -fno-stack-protector -### %s 2>&1 | FileCheck %s -check-prefix=NOSSP
-// NOSSP-NOT: "-stack-protector" "1"
+// NOSSP-NOT: "-stack-protector"
// NOSSP-NOT: "-stack-protector-buffer-size"
-// RUN: %clang -fstack-protector -### %s 2>&1 | FileCheck %s -check-prefix=SSP
+// RUN: %clang -target i386-unknown-linux -fstack-protector -### %s 2>&1 | FileCheck %s -check-prefix=SSP
// SSP: "-stack-protector" "1"
// SSP-NOT: "-stack-protector-buffer-size"
-// RUN: %clang -fstack-protector --param ssp-buffer-size=16 -### %s 2>&1 | FileCheck %s -check-prefix=SSP-BUF
+// RUN: %clang -target i386-unknown-linux -fstack-protector --param ssp-buffer-size=16 -### %s 2>&1 | FileCheck %s -check-prefix=SSP-BUF
// SSP-BUF: "-stack-protector" "1"
// SSP-BUF: "-stack-protector-buffer-size" "16"
// RUN: %clang -target i386-pc-openbsd -### %s 2>&1 | FileCheck %s -check-prefix=OPENBSD
-// OPENBSD: "-stack-protector" "1"
+// OPENBSD: "-stack-protector" "2"
-// RUN: %clang -target i386-pc-openbsd -fno-stack-protector -### %s 2>&1 | FileCheck %s -check-prefix=OPENBSD_OFF
-// OPENBSD_OFF-NOT: "-stack-protector"
+// RUN: %clang -target i386-pc-openbsd -fstack-protector -### %s 2>&1 | FileCheck %s -check-prefix=OPENBSD_SPS
+// OPENBSD_SPS: "-stack-protector" "2"
+
+// RUN: %clang -fstack-protector-strong -### %s 2>&1 | FileCheck %s -check-prefix=SSP-STRONG
+// SSP-STRONG: "-stack-protector" "2"
+// SSP-STRONG-NOT: "-stack-protector-buffer-size"
+
+// RUN: %clang -fstack-protector-all -### %s 2>&1 | FileCheck %s -check-prefix=SSP-ALL
+// SSP-ALL: "-stack-protector" "3"
+// SSP-ALL-NOT: "-stack-protector-buffer-size"
diff --git a/test/Driver/std.cpp b/test/Driver/std.cpp
index e98fd2c6bf18..aceda017a4e1 100644
--- a/test/Driver/std.cpp
+++ b/test/Driver/std.cpp
@@ -7,6 +7,8 @@
// RUN: not %clang -std=gnu++11 %s -fsyntax-only 2>&1 | FileCheck -check-prefix=GNUXX11 %s
// RUN: not %clang -std=c++1y %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX1Y %s
// RUN: not %clang -std=gnu++1y %s -fsyntax-only 2>&1 | FileCheck -check-prefix=GNUXX1Y %s
+// RUN: not %clang -std=c++1z %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CXX1Z %s
+// RUN: not %clang -std=gnu++1z %s -fsyntax-only 2>&1 | FileCheck -check-prefix=GNUXX1Z %s
void f(int n) {
typeof(n)();
@@ -30,3 +32,9 @@ void f(int n) {
// GNUXX1Y-NOT: undeclared identifier 'typeof'
// GNUXX1Y-NOT: undeclared identifier 'decltype'
+
+// CXX1Z: undeclared identifier 'typeof'
+// CXX1Z-NOT: undeclared identifier 'decltype'
+
+// GNUXX1Z-NOT: undeclared identifier 'typeof'
+// GNUXX1Z-NOT: undeclared identifier 'decltype'
diff --git a/test/Driver/target-triple-deployment.c b/test/Driver/target-triple-deployment.c
index 8e4824a7fe95..4f5de59e73d8 100644
--- a/test/Driver/target-triple-deployment.c
+++ b/test/Driver/target-triple-deployment.c
@@ -7,6 +7,8 @@
// RUN: %clang -target armv7-apple-ios0.0 -### %t.o 2>> %t.log
// RUN: %clang -target armv7-apple-ios1.2.3 -### %t.o 2>> %t.log
// RUN: %clang -target armv7-apple-ios5.0 -### %t.o 2>> %t.log
+// RUN: %clang -target armv7-apple-ios7.0 -### %t.o 2>> %t.log
+// RUN: %clang -target arm64-apple-ios -### %t.o 2>> %t.log
//
// RUN: FileCheck %s < %t.log
@@ -21,13 +23,19 @@
// CHECK: 10.7.0
// CHECK: {{ld(.exe)?"}}
// CHECK: -iphoneos_version_min
-// CHECK: 3.0.0
+// CHECK: 5.0.0
// CHECK: {{ld(.exe)?"}}
// CHECK: -iphoneos_version_min
-// CHECK: 3.0.0
+// CHECK: 5.0.0
// CHECK: {{ld(.exe)?"}}
// CHECK: -iphoneos_version_min
// CHECK: 1.2.3
// CHECK: {{ld(.exe)?"}}
// CHECK: -iphoneos_version_min
// CHECK: 5.0.0
+// CHECK: {{ld(.exe)?"}}
+// CHECK: -iphoneos_version_min
+// CHECK: 7.0.0
+// CHECK: {{ld(.exe)?"}}
+// CHECK: -iphoneos_version_min
+// CHECK: 7.0.0
diff --git a/test/Driver/target.c b/test/Driver/target.c
index b400f990fb1b..a46ba16296a7 100644
--- a/test/Driver/target.c
+++ b/test/Driver/target.c
@@ -4,12 +4,6 @@
// Ensure we get a crazy triple here as we asked for one.
// CHECK: Target: unknown-unknown-unknown
//
-// Also, ensure we don't blindly hand our target selection logic down to GCC.
-// CHECK: "{{.*gcc(\.[Ee][Xx][Ee])?}}"
-// CHECK-NOT: "-target"
-// CHECK-NOT: "unknown-unknown-unknown"
-// CHECK: "-x" "assembler"
-//
// Also check that the legacy spelling works.
// RUN: %clang -no-canonical-prefixes -target unknown-unknown-unknown -c %s \
// RUN: -o %t.o -### 2>&1 | FileCheck %s
diff --git a/test/Driver/unknown-gcc-arch.c b/test/Driver/unknown-gcc-arch.c
index dcd17d4f467a..6317e13ec486 100644
--- a/test/Driver/unknown-gcc-arch.c
+++ b/test/Driver/unknown-gcc-arch.c
@@ -1,32 +1,40 @@
-// RUN: %clang -target x86_64-unknown-unknown -c -x assembler %s -### 2>&1 \
-// RUN: | FileCheck -check-prefix=X86_64 %s
-// X86_64: {{.*gcc.*-m64}}
+// RUN: %clang -target x86_64-unknown-unknown -no-integrated-as -c \
+// RUN: -x assembler %s -### 2>&1 | FileCheck -check-prefix=X86_64 %s
+// X86_64: {{.*as.*--64}}
-// RUN: %clang -target x86_64-unknown-unknown -c -x assembler %s -### -m32 2>&1 \
-// RUN: | FileCheck -check-prefix=X86_64-M32 %s
-// X86_64-M32: {{.*gcc.*-m32}}
+// RUN: %clang -target x86_64-unknown-unknown -c -x assembler %s -### -m32 \
+// RUN: -no-integrated-as 2>&1 | FileCheck -check-prefix=X86_64-M32 %s
+// X86_64-M32: {{.*as.*--32}}
-// RUN: %clang -target i386-unknown-unknown -c -x assembler %s -### 2>&1 \
-// RUN: | FileCheck -check-prefix=I386 %s
-// I386: {{.*gcc.*-m32}}
+// RUN: %clang -target i386-unknown-unknown -c -x assembler %s -### \
+// RUN: -no-integrated-as 2>&1| FileCheck -check-prefix=I386 %s
+// I386: {{.*as.*--32}}
-// RUN: %clang -target i386-unknown-unknown -c -x assembler %s -### -m64 2>&1 \
-// RUN: | FileCheck -check-prefix=I386-M64 %s
-// I386-M64: {{.*gcc.*-m64}}
+// RUN: %clang -target i386-unknown-unknown -c -x assembler %s -### -m64 \
+// RUN: -no-integrated-as 2>&1 | FileCheck -check-prefix=I386-M64 %s
+// I386-M64: {{.*as.*--64}}
// RUN: %clang -target powerpc64-unknown-unknown -c -x assembler %s -### 2>&1 \
// RUN: | FileCheck -check-prefix=PPC64 %s
-// PPC64: {{.*gcc.*-m64}}
+// PPC64: {{.*as.*-a64}}
// RUN: %clang -target powerpc64-unknown-unknown -c -x assembler %s -### -m32 2>&1 \
// RUN: | FileCheck -check-prefix=PPC64-M32 %s
-// PPC64-M32: {{.*gcc.*-m32}}
+// PPC64-M32: {{.*as.*-a32}}
// RUN: %clang -target powerpc-unknown-unknown -c -x assembler %s -### 2>&1 \
// RUN: | FileCheck -check-prefix=PPC %s
-// PPC: {{.*gcc.*-m32}}
+// PPC: {{.*as.*-a32}}
// RUN: %clang -target powerpc-unknown-unknown -c -x assembler %s -### -m64 2>&1 \
// RUN: | FileCheck -check-prefix=PPC-M64 %s
-// PPC-M64: {{.*gcc.*-m64}}
+// PPC-M64: {{.*as.*-a64}}
+
+// RUN: %clang -target sparc64-unknown-unknown -no-integrated-as -c -x assembler %s -### -m32 2>&1 \
+// RUN: | FileCheck -check-prefix=SPARCV8 %s
+// SPARCV8: {{.*as.*-32}}
+
+// RUN: %clang -target sparc-unknown-unknown -no-integrated-as -c -x assembler %s -### -m64 2>&1 \
+// RUN: | FileCheck -check-prefix=SPARCV9 %s
+// SPARCV9: {{.*as.*-64}}
diff --git a/test/Driver/verify_pch.m b/test/Driver/verify_pch.m
new file mode 100644
index 000000000000..c6eca4268bd7
--- /dev/null
+++ b/test/Driver/verify_pch.m
@@ -0,0 +1,12 @@
+// RUN: touch %t.pch
+// RUN: %clang -### -verify-pch %t.pch 2> %t.log.1
+// RUN: FileCheck %s < %t.log.1
+// CHECK: -verify-pch
+
+// Also ensure that the language setting is not affected by the .pch extension
+// CHECK-NOT: "-x" "precompiled-header"
+
+// RUN: %clang -### -verify-pch -x objective-c %t.pch 2> %t.log.2
+// RUN: FileCheck -check-prefix=CHECK2 %s < %t.log.2
+// CHECK2: "-x" "objective-c"
+// CHECK2-NOT: "-x" "precompiled-header"
diff --git a/test/Driver/vfsoverlay.c b/test/Driver/vfsoverlay.c
new file mode 100644
index 000000000000..6ae494544f9f
--- /dev/null
+++ b/test/Driver/vfsoverlay.c
@@ -0,0 +1,5 @@
+// RUN: %clang -ivfsoverlay foo.h -### %s 2>&1 | FileCheck %s
+// CHECK: "-ivfsoverlay" "foo.h"
+
+// RUN: not %clang -ivfsoverlay foo.h %s 2>&1 | FileCheck -check-prefix=CHECK-MISSING %s
+// CHECK-MISSING: virtual filesystem overlay file 'foo.h' not found
diff --git a/test/Driver/via-file-asm.c b/test/Driver/via-file-asm.c
new file mode 100644
index 000000000000..3fa5b54b581e
--- /dev/null
+++ b/test/Driver/via-file-asm.c
@@ -0,0 +1,10 @@
+// Should save and read back the assembly from a file
+// RUN: %clang -target arm-none-linux-gnueabi -integrated-as -via-file-asm %s -### 2>&1 | FileCheck %s
+// CHECK: "-cc1"
+// CHECK: "-o" "[[TMP:[^"]*]]"
+// CHECK: -cc1as
+// CHECK: [[TMP]]
+
+// Should not force using the integrated assembler
+// RUN: %clang -target arm-none-linux-gnueabi -no-integrated-as -via-file-asm %s -### 2>&1 | FileCheck --check-prefix=NO_IAS %s
+// NO_IAS-NOT: "-cc1as"
diff --git a/test/Driver/visibility.cpp b/test/Driver/visibility.cpp
index cdbef97aadc9..5b137c8a17dc 100644
--- a/test/Driver/visibility.cpp
+++ b/test/Driver/visibility.cpp
@@ -1,26 +1,26 @@
// RUN: %clang -### -S -fvisibility=hidden -fvisibility=default %s 2> %t.log
// RUN: FileCheck -check-prefix=CHECK-1 %s < %t.log
-// CHECK-NOT: "-ftype-visibility"
+// CHECK-1-NOT: "-ftype-visibility"
// CHECK-1: "-fvisibility" "default"
-// CHECK-NOT: "-ftype-visibility"
+// CHECK-1-NOT: "-ftype-visibility"
// RUN: %clang -### -S -fvisibility=default -fvisibility=hidden %s 2> %t.log
// RUN: FileCheck -check-prefix=CHECK-2 %s < %t.log
-// CHECK-NOT: "-ftype-visibility"
+// CHECK-2-NOT: "-ftype-visibility"
// CHECK-2: "-fvisibility" "hidden"
-// CHECK-NOT: "-ftype-visibility"
+// CHECK-2-NOT: "-ftype-visibility"
// RUN: %clang -### -S -fvisibility-ms-compat -fvisibility=hidden %s 2> %t.log
// RUN: FileCheck -check-prefix=CHECK-3 %s < %t.log
-// CHECK-NOT: "-ftype-visibility"
+// CHECK-3-NOT: "-ftype-visibility"
// CHECK-3: "-fvisibility" "hidden"
-// CHECK-NOT: "-ftype-visibility"
+// CHECK-3-NOT: "-ftype-visibility"
// RUN: %clang -### -S -fvisibility-ms-compat -fvisibility=default %s 2> %t.log
// RUN: FileCheck -check-prefix=CHECK-4 %s < %t.log
-// CHECK-NOT: "-ftype-visibility"
+// CHECK-4-NOT: "-ftype-visibility"
// CHECK-4: "-fvisibility" "default"
-// CHECK-NOT: "-ftype-visibility"
+// CHECK-4-NOT: "-ftype-visibility"
// RUN: %clang -### -S -fvisibility=hidden -fvisibility-ms-compat %s 2> %t.log
// RUN: FileCheck -check-prefix=CHECK-5 %s < %t.log
diff --git a/test/Driver/windows-arm-minimal-arch.c b/test/Driver/windows-arm-minimal-arch.c
new file mode 100644
index 000000000000..cf55b8f99d0f
--- /dev/null
+++ b/test/Driver/windows-arm-minimal-arch.c
@@ -0,0 +1,5 @@
+// RUN: not %clang -target thumbv5-windows -mcpu=arm10tdmi %s -o /dev/null 2>&1 \
+// RUN: | FileCheck %s
+
+// CHECK: error: the target architecture 'thumbv5' is not supported by the target 'thumbv5--windows-msvc'
+
diff --git a/test/Driver/windows-wildcard-expansion.c b/test/Driver/windows-wildcard-expansion.c
new file mode 100644
index 000000000000..3977dc399c72
--- /dev/null
+++ b/test/Driver/windows-wildcard-expansion.c
@@ -0,0 +1,7 @@
+// Clang does wildcard expansion on Windows. On other OSs, it's done by the shell.
+// REQUIRES: system-windows
+
+// RUN: %clang -c -### %S/Inputs/wildcard*.c 2>&1 | FileCheck %s
+// RUN: %clang -c -### %S/Inputs/wildcard?.c 2>&1 | FileCheck %s
+// CHECK: wildcard1.c
+// CHECK: wildcard2.c
diff --git a/test/Driver/woa-restrict-it.c b/test/Driver/woa-restrict-it.c
new file mode 100644
index 000000000000..c046991ae132
--- /dev/null
+++ b/test/Driver/woa-restrict-it.c
@@ -0,0 +1,4 @@
+// RUN: %clang -target armv7-windows -### %s 2>&1 | FileCheck %s
+
+// CHECK: "-backend-option" "-arm-restrict-it"
+
diff --git a/test/Driver/x86_m16.c b/test/Driver/x86_m16.c
new file mode 100644
index 000000000000..be15ff53c2f0
--- /dev/null
+++ b/test/Driver/x86_m16.c
@@ -0,0 +1,4 @@
+// RUN: %clang -target i386 -m16 -### -c %s 2>&1 | FileCheck %s
+
+// CHECK: Target: i386-{{.*}}-{{.*}}-code16
+
diff --git a/test/Driver/xcore-opts.c b/test/Driver/xcore-opts.c
index 10d8da172d4a..161756dbf028 100644
--- a/test/Driver/xcore-opts.c
+++ b/test/Driver/xcore-opts.c
@@ -1,13 +1,34 @@
-// RUN: %clang -target xcore %s -g -Wl,L1Arg,L2Arg -Wa,A1Arg,A2Arg -### -o %t.o 2>&1 | FileCheck %s
+// RUN: %clang -target xcore %s -g -Wl,L1Arg,L2Arg -Wa,A1Arg,A2Arg -fverbose-asm -v -### -o %t.o 2>&1 | FileCheck %s
+// RUN: %clang -target xcore -x c++ %s -g -Wl,L1Arg,L2Arg -Wa,A1Arg,A2Arg -fverbose-asm -v -### -o %t.o 2>&1 | FileCheck %s
+// RUN: %clang -target xcore -x c++ %s -fexceptions -### -o %t.o 2>&1 | FileCheck -check-prefix CHECK-EXCEP %s
+// RUN: %clang -target xcore %s -g0 -### -o %t.o 2>&1 | FileCheck -check-prefix CHECK-G0 %s
// CHECK: "-nostdsysteminc"
// CHECK: "-momit-leaf-frame-pointer"
// CHECK-NOT: "-mdisable-fp-elim"
// CHECK: "-fno-signed-char"
// CHECK: "-fno-use-cxa-atexit"
+// CHECK-NOT: "-fcxx-exceptions"
+// CHECK-NOT: "-fexceptions"
// CHECK: "-fno-common"
-// CHECH: xcc" "-o"
-// CHECK: "-c" "-g" "A1Arg" "A2Arg"
// CHECK: xcc" "-o"
+// CHECK-EXCEP-NOT: "-fexceptions"
+// CHECK: "-c" "-v" "-g" "-fverbose-asm" "A1Arg" "A2Arg"
+// CHECK: xcc" "-o"
+// CHECK-EXCEP-NOT: "-fexceptions"
+// CHECK: "-v"
// CHECK: "L1Arg" "L2Arg"
+// CHECK-EXCEP: "-fno-use-cxa-atexit"
+// CHECK-EXCEP: "-fcxx-exceptions"
+// CHECK-EXCEP: "-fexceptions"
+// CHECK-EXCEP: "-fno-common"
+// CHECK-EXCEP: xcc" "-o"
+// CHECK-EXCEP-NOT: "-fexceptions"
+// CHECK-EXCEP: xcc" "-o"
+// CHECK-EXCEP: "-fexceptions"
+
+// CHECK-G0: xcc"
+// CHECK-G0-NOT: "-g"
+// CHECK-G0: xcc"
+
diff --git a/test/FixIt/fixit-cxx0x.cpp b/test/FixIt/fixit-cxx0x.cpp
index bfd8c3dcfea6..49a05ff8d1e4 100644
--- a/test/FixIt/fixit-cxx0x.cpp
+++ b/test/FixIt/fixit-cxx0x.cpp
@@ -125,7 +125,8 @@ namespace NonStaticConstexpr {
struct foo {
constexpr int i; // expected-error {{non-static data member cannot be constexpr; did you intend to make it const?}}
constexpr int j = 7; // expected-error {{non-static data member cannot be constexpr; did you intend to make it static?}}
- foo() : i(3) {
+ constexpr const int k; // expected-error {{non-static data member cannot be constexpr; did you intend to make it const?}}
+ foo() : i(3), k(4) {
}
static int get_j() {
return j;
@@ -137,3 +138,23 @@ int RegisterVariable() {
register int n; // expected-warning {{'register' storage class specifier is deprecated}}
return n;
}
+
+namespace MisplacedParameterPack {
+ template <typename Args...> // expected-error {{'...' must immediately precede declared identifier}}
+ void misplacedEllipsisInTypeParameter(Args...);
+
+ template <typename... Args...> // expected-error {{'...' must immediately precede declared identifier}}
+ void redundantEllipsisInTypeParameter(Args...);
+
+ template <template <typename> class Args...> // expected-error {{'...' must immediately precede declared identifier}}
+ void misplacedEllipsisInTemplateTypeParameter(Args<int>...);
+
+ template <template <typename> class... Args...> // expected-error {{'...' must immediately precede declared identifier}}
+ void redundantEllipsisInTemplateTypeParameter(Args<int>...);
+
+ template <int N...> // expected-error {{'...' must immediately precede declared identifier}}
+ void misplacedEllipsisInNonTypeTemplateParameter();
+
+ template <int... N...> // expected-error {{'...' must immediately precede declared identifier}}
+ void redundantEllipsisInNonTypeTemplateParameter();
+}
diff --git a/test/FixIt/fixit-include.h b/test/FixIt/fixit-include.h
index 6a22d2e88eb3..358609b4066d 100644
--- a/test/FixIt/fixit-include.h
+++ b/test/FixIt/fixit-include.h
@@ -1 +1 @@
-// This file is purposefully left empty
+// This file is purposefully left empty
diff --git a/test/FixIt/fixit-multiple-selector-warnings.m b/test/FixIt/fixit-multiple-selector-warnings.m
new file mode 100644
index 000000000000..391728d0a9c1
--- /dev/null
+++ b/test/FixIt/fixit-multiple-selector-warnings.m
@@ -0,0 +1,26 @@
+/* RUN: cp %s %t
+ RUN: %clang_cc1 -x objective-c -Wselector-type-mismatch -fixit %t
+ RUN: %clang_cc1 -x objective-c -Wselector-type-mismatch -Werror %t
+*/
+// rdar://16458579
+
+@interface I
+- (id) compare: (char) arg1;
+- length;
+@end
+
+@interface J
+- (id) compare: (id) arg1;
+@end
+
+SEL func()
+{
+ (void)@selector( compare: );
+ (void)@selector (compare:);
+ (void)@selector( compare:);
+ (void)@selector(compare: );
+ (void)@selector ( compare: );
+ return @selector(compare:);
+}
+
+
diff --git a/test/FixIt/fixit-objc-arc.m b/test/FixIt/fixit-objc-arc.m
new file mode 100644
index 000000000000..dcee81594e78
--- /dev/null
+++ b/test/FixIt/fixit-objc-arc.m
@@ -0,0 +1,24 @@
+// RUN: %clang_cc1 -pedantic -verify %s
+// RUN: cp %s %t
+// RUN: not %clang_cc1 -pedantic -fobjc-arc -fixit -x objective-c %t
+// RUN: %clang_cc1 -pedantic -fobjc-arc -Werror -x objective-c %t
+// rdar://14106083
+
+@class A;
+@class NSString;
+
+@interface Test
+- (void)test:(NSString *)string;
+
+@property (copy) NSString *property;
+@end
+
+void g(NSString *a);
+void h(id a);
+
+void f(Test *t) {
+ NSString *a = "Foo"; // expected-error {{string literal must be prefixed by '@'}}
+ g("Foo"); // expected-error {{string literal must be prefixed by '@'}}
+ [t test:"Foo"]; // expected-error {{string literal must be prefixed by '@'}}
+ t.property = "Foo"; // expected-error {{string literal must be prefixed by '@'}}
+}
diff --git a/test/FixIt/fixit-objc-bridge-related-attr.m b/test/FixIt/fixit-objc-bridge-related-attr.m
new file mode 100644
index 000000000000..4a81ecd2ff9b
--- /dev/null
+++ b/test/FixIt/fixit-objc-bridge-related-attr.m
@@ -0,0 +1,35 @@
+// Objective-C recovery
+// RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -fdiagnostics-parseable-fixits -x objective-c %s 2>&1 | FileCheck %s
+// RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-arc -fdiagnostics-parseable-fixits -x objective-c %s 2>&1 | FileCheck %s
+// RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -fdiagnostics-parseable-fixits -x objective-c++ %s 2>&1 | FileCheck %s
+// rdar://15499111
+
+typedef struct __attribute__((objc_bridge_related(NSColor,colorWithCGColor:,CGColor))) CGColor *CGColorRef;
+
+@interface NSColor
++ (NSColor *)colorWithCGColor:(CGColorRef)cgColor;
+- (CGColorRef)CGColor;
+@end
+
+@interface NSTextField
+- (void)setBackgroundColor:(NSColor *)color;
+- (NSColor *)backgroundColor;
+@end
+
+NSColor * Test1(NSTextField *textField, CGColorRef newColor) {
+ textField.backgroundColor = newColor;
+ return newColor;
+}
+
+CGColorRef Test2(NSTextField *textField, CGColorRef newColor) {
+ newColor = textField.backgroundColor; // [textField.backgroundColor CGColor]
+ return textField.backgroundColor;
+}
+// CHECK: {20:30-20:30}:"[NSColor colorWithCGColor:"
+// CHECK: {20:38-20:38}:"]"
+// CHECK: {21:9-21:9}:"[NSColor colorWithCGColor:"
+// CHECK: {21:17-21:17}:"]"
+// CHECK: {25:13-25:13}:"["
+// CHECK: {25:38-25:38}:" CGColor]"
+// CHECK: {26:9-26:9}:"["
+// CHECK: {26:34-26:34}:" CGColor]"
diff --git a/test/FixIt/fixit-objc-bridge-related-property.m b/test/FixIt/fixit-objc-bridge-related-property.m
new file mode 100644
index 000000000000..5b13645d49a5
--- /dev/null
+++ b/test/FixIt/fixit-objc-bridge-related-property.m
@@ -0,0 +1,23 @@
+// RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -fdiagnostics-parseable-fixits -x objective-c %s 2>&1 | FileCheck %s
+// RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-arc -fdiagnostics-parseable-fixits -x objective-c %s 2>&1 | FileCheck %s
+// RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -fdiagnostics-parseable-fixits -x objective-c++ %s 2>&1 | FileCheck %s
+// rdar://15517899
+
+typedef struct __attribute__((objc_bridge_related(NSColor,colorWithCGColor:,CGColor))) CGColor *CGColorRef;
+
+@interface NSColor
++ (NSColor *)colorWithCGColor:(CGColorRef)cgColor;
+@property CGColorRef CGColor;
+@end
+
+@interface NSTextField
+- (void)setBackgroundColor:(NSColor *)color;
+- (NSColor *)backgroundColor;
+@end
+
+CGColorRef Test(NSTextField *textField, CGColorRef newColor) {
+ newColor = textField.backgroundColor;
+ return textField.backgroundColor;
+}
+// CHECK:{19:38-19:38}:".CGColor"
+// CHECK:{20:34-20:34}:".CGColor"
diff --git a/test/FixIt/fixit-objc-bridge-related.m b/test/FixIt/fixit-objc-bridge-related.m
new file mode 100644
index 000000000000..36ccbca45563
--- /dev/null
+++ b/test/FixIt/fixit-objc-bridge-related.m
@@ -0,0 +1,43 @@
+// RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -fdiagnostics-parseable-fixits -x objective-c -fobjc-arc %s 2>&1 | FileCheck %s
+// RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -fdiagnostics-parseable-fixits -x objective-c++ -fobjc-arc %s 2>&1 | FileCheck %s
+// rdar://15932435
+
+typedef struct __attribute__((objc_bridge_related(UIColor,colorWithCGColor:,CGColor))) CGColor *CGColorRef;
+
+@interface UIColor
++ (UIColor *)colorWithCGColor:(CGColorRef)cgColor;
+- (CGColorRef)CGColor;
+@end
+
+@interface UIButton
+@property(nonatomic,retain) UIColor *tintColor;
+@end
+
+void test(UIButton *myButton) {
+ CGColorRef cgColor = (CGColorRef)myButton.tintColor;
+ cgColor = myButton.tintColor;
+
+ cgColor = (CGColorRef)[myButton.tintColor CGColor];
+
+ cgColor = (CGColorRef)[myButton tintColor];
+}
+
+// CHECK: {17:36-17:36}:"["
+// CHECK: {17:54-17:54}:" CGColor]"
+
+// CHECK :{18:13-18:13}:"["
+// CHECK: {18:31-18:31}:" CGColor]"
+
+// CHECK :{22:25-22:25}:"["
+// CHECK :{22:45-22:45}:" CGColor]"
+
+@interface ImplicitPropertyTest
+- (UIColor *)tintColor;
+@end
+
+void test1(ImplicitPropertyTest *myImplicitPropertyTest) {
+ CGColorRef cgColor = (CGColorRef)[myImplicitPropertyTest tintColor];
+}
+
+// CHECK :{39:36-39:36}:"["
+// CHECK :{39:70-39:70}:" CGColor]"
diff --git a/test/FixIt/fixit-objc.m b/test/FixIt/fixit-objc.m
index 7c4776ae71e7..f41f75f1d7be 100644
--- a/test/FixIt/fixit-objc.m
+++ b/test/FixIt/fixit-objc.m
@@ -18,22 +18,22 @@ void foo() {
@class NSString;
@interface Test
-- (void)test:(NSString *)string; // expected-note{{passing argument to parameter 'string' here}}
+- (void)test:(NSString *)string;
@property (copy) NSString *property;
@end
-void g(NSString *a); // expected-note{{passing argument to parameter 'a' here}}
-void h(id a); // expected-note 2{{passing argument to parameter 'a' here}}
+void g(NSString *a);
+void h(id a);
void f(Test *t) {
- NSString *a = "Foo"; // expected-warning {{string literal must be prefixed by '@'}}
- id b = "Foo"; // expected-warning {{incompatible pointer types initializing 'id' with an expression of type 'char [4]'}}
- g("Foo"); // expected-warning {{string literal must be prefixed by '@'}}
- h("Foo"); // expected-warning{{incompatible pointer types passing 'char [4]' to parameter of type 'id'}}
- h(("Foo")); // expected-warning{{incompatible pointer types passing 'char [4]' to parameter of type 'id'}}
- [t test:"Foo"]; // expected-warning {{string literal must be prefixed by '@'}}
- t.property = "Foo"; // expected-warning {{string literal must be prefixed by '@'}}
+ NSString *a = "Foo"; // expected-error {{string literal must be prefixed by '@'}}
+ id b = "Foo"; // expected-error {{string literal must be prefixed by '@'}}
+ g("Foo"); // expected-error {{string literal must be prefixed by '@'}}
+ h("Foo"); // expected-error {{string literal must be prefixed by '@'}}
+ h(("Foo")); // expected-error {{string literal must be prefixed by '@'}}
+ [t test:"Foo"]; // expected-error {{string literal must be prefixed by '@'}}
+ t.property = "Foo"; // expected-error {{string literal must be prefixed by '@'}}
// <rdar://problem/6896493>
[t test:@"Foo"]]; // expected-error{{extraneous ']' before ';'}}
diff --git a/test/FixIt/fixit-unicode-with-utf8-output.c b/test/FixIt/fixit-unicode-with-utf8-output.c
index aff854274324..a1a7bb733809 100644
--- a/test/FixIt/fixit-unicode-with-utf8-output.c
+++ b/test/FixIt/fixit-unicode-with-utf8-output.c
@@ -2,6 +2,7 @@
// systems capable of outputting Unicode characters to the standard output in
// the UTF-8 encoding.
// RUN: not %clang_cc1 -fsyntax-only %S/fixit-unicode.c 2>&1 | FileCheck -strict-whitespace %s
+// REQUIRES: utf8-capable-terminal
// CHECK: warning: format specifies type 'int' but the argument has type 'long'
// CHECK: {{^ printf\("∆: %d", 1L\);}}
diff --git a/test/FixIt/fixit.cpp b/test/FixIt/fixit.cpp
index 52bbb3849a8f..f26493856560 100644
--- a/test/FixIt/fixit.cpp
+++ b/test/FixIt/fixit.cpp
@@ -19,7 +19,7 @@ virtual void C1::f() { } // expected-error{{'virtual' can only be specified insi
static void C1::g() { } // expected-error{{'static' can only be specified inside the class definition}}
-template<int Value> struct CT { }; // expected-note{{previous use is here}}
+template<int Value> struct CT { template<typename> struct Inner; }; // expected-note{{previous use is here}}
CT<10 >> 2> ct; // expected-warning{{require parentheses}}
@@ -32,6 +32,8 @@ struct CT<0> { }; // expected-error{{'template<>'}}
template<> union CT<1> { }; // expected-error{{tag type}}
+struct CT<2>::Inner<int> { }; // expected-error 2{{'template<>'}}
+
// Access declarations
class A {
protected:
@@ -202,7 +204,7 @@ template<class T> typedef Mystery<T>::type getMysteriousThing() { // \
}
template<template<typename> Foo, // expected-error {{template template parameter requires 'class' after the parameter list}}
- template<typename> typename Bar, // expected-error {{template template parameter requires 'class' after the parameter list}}
+ template<typename> typename Bar, // expected-warning {{template template parameter using 'typename' is a C++1z extension}}
template<typename> struct Baz> // expected-error {{template template parameter requires 'class' after the parameter list}}
void func();
diff --git a/test/FixIt/format-darwin.m b/test/FixIt/format-darwin.m
index f5205643489a..170bb09fb904 100644
--- a/test/FixIt/format-darwin.m
+++ b/test/FixIt/format-darwin.m
@@ -1,11 +1,8 @@
// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -fblocks -Wformat-non-iso -verify %s
// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fsyntax-only -fblocks -Wformat-non-iso -verify %s
-// RUN: %clang_cc1 -triple i386-apple-darwin9 -fdiagnostics-parseable-fixits -fblocks -Wformat-non-iso %s 2>&1 | FileCheck %s
-// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fdiagnostics-parseable-fixits -fblocks -Wformat-non-iso %s 2>&1 | FileCheck %s
-
-// RUN: %clang_cc1 -triple i386-apple-darwin9 -fdiagnostics-parseable-fixits -fblocks -Wformat-non-iso %s 2>&1 | FileCheck -check-prefix=CHECK-32 %s
-// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fdiagnostics-parseable-fixits -fblocks -Wformat-non-iso %s 2>&1 | FileCheck -check-prefix=CHECK-64 %s
+// RUN: %clang_cc1 -triple i386-apple-darwin9 -fdiagnostics-parseable-fixits -fblocks -Wformat-non-iso %s 2>&1 | FileCheck -check-prefix=CHECK -check-prefix=CHECK-32 %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fdiagnostics-parseable-fixits -fblocks -Wformat-non-iso %s 2>&1 | FileCheck -check-prefix=CHECK -check-prefix=CHECK-64 %s
int printf(const char * restrict, ...);
@@ -25,10 +22,16 @@ typedef unsigned long UInt32;
typedef SInt32 OSStatus;
+typedef enum NSIntegerEnum : NSInteger {
+ EnumValueA,
+ EnumValueB
+} NSIntegerEnum;
+
NSInteger getNSInteger();
NSUInteger getNSUInteger();
SInt32 getSInt32();
UInt32 getUInt32();
+NSIntegerEnum getNSIntegerEnum();
void testCorrectionInAllCases() {
printf("%s", getNSInteger()); // expected-warning{{values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead}}
@@ -47,6 +50,11 @@ void testCorrectionInAllCases() {
// CHECK: fix-it:"{{.*}}":{[[@LINE-11]]:11-[[@LINE-11]]:13}:"%u"
// CHECK: fix-it:"{{.*}}":{[[@LINE-12]]:16-[[@LINE-12]]:16}:"(unsigned int)"
+
+ printf("%s", getNSIntegerEnum()); // expected-warning{{enum values with underlying type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead}}
+
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-2]]:11-[[@LINE-2]]:13}:"%ld"
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:16-[[@LINE-3]]:16}:"(long)"
}
@interface Foo {
@@ -107,6 +115,11 @@ void testWarn() {
// CHECK-64: fix-it:"{{.*}}":{[[@LINE-11]]:11-[[@LINE-11]]:14}:"%u"
// CHECK-64: fix-it:"{{.*}}":{[[@LINE-12]]:17-[[@LINE-12]]:17}:"(unsigned int)"
+
+ printf("%d", getNSIntegerEnum()); // expected-warning{{enum values with underlying type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead}}
+
+ // CHECK-64: fix-it:"{{.*}}":{[[@LINE-2]]:11-[[@LINE-2]]:13}:"%ld"
+ // CHECK-64: fix-it:"{{.*}}":{[[@LINE-3]]:16-[[@LINE-3]]:16}:"(long)"
}
void testPreserveHex() {
@@ -135,6 +148,7 @@ void testNoWarn() {
printf("%lu", getNSUInteger()); // no-warning
printf("%d", getSInt32()); // no-warning
printf("%u", getUInt32()); // no-warning
+ printf("%ld", getNSIntegerEnum()); // no-warning
}
#else
@@ -149,6 +163,10 @@ void testWarn() {
// CHECK-32: fix-it:"{{.*}}":{[[@LINE-5]]:17-[[@LINE-5]]:17}:"(unsigned long)"
// CHECK-32: fix-it:"{{.*}}":{[[@LINE-5]]:16-[[@LINE-5]]:16}:"(int)"
// CHECK-32: fix-it:"{{.*}}":{[[@LINE-5]]:16-[[@LINE-5]]:16}:"(unsigned int)"
+
+ printf("%ld", getNSIntegerEnum()); // expected-warning{{enum values with underlying type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead}}
+
+ // CHECK-32: fix-it:"{{.*}}":{[[@LINE-2]]:17-[[@LINE-2]]:17}:"(long)"
}
void testPreserveHex() {
@@ -164,6 +182,7 @@ void testNoWarn() {
printf("%u", getNSUInteger()); // no-warning
printf("%ld", getSInt32()); // no-warning
printf("%lu", getUInt32()); // no-warning
+ printf("%d", getNSIntegerEnum()); // no-warning
}
void testSignedness(NSInteger i, NSUInteger u) {
@@ -194,6 +213,11 @@ void testCasts() {
// CHECK: fix-it:"{{.*}}":{[[@LINE-11]]:11-[[@LINE-11]]:13}:"%u"
// CHECK: fix-it:"{{.*}}":{[[@LINE-12]]:16-[[@LINE-12]]:24}:"(unsigned int)"
+
+ printf("%s", (NSIntegerEnum)0); // expected-warning{{enum values with underlying type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead}}
+
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-2]]:11-[[@LINE-2]]:13}:"%ld"
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:16-[[@LINE-3]]:31}:"(long)"
}
void testCapitals() {
diff --git a/test/FixIt/format.m b/test/FixIt/format.m
index 5e4636047e86..d07ee363b4a8 100644
--- a/test/FixIt/format.m
+++ b/test/FixIt/format.m
@@ -82,14 +82,14 @@ void test_class_correction (Class x) {
typedef enum : int { NSUTF8StringEncoding = 8 } NSStringEncoding;
void test_fixed_enum_correction(NSStringEncoding x) {
- NSLog(@"%@", x); // expected-warning{{format specifies type 'id' but the argument has type 'NSStringEncoding'}}
+ NSLog(@"%@", x); // expected-warning{{format specifies type 'id' but the argument has underlying type 'int'}}
// CHECK: fix-it:"{{.*}}":{85:11-85:13}:"%d"
}
typedef __SIZE_TYPE__ size_t;
enum SomeSize : size_t { IntegerSize = sizeof(int) };
void test_named_fixed_enum_correction(enum SomeSize x) {
- NSLog(@"%@", x); // expected-warning{{format specifies type 'id' but the argument has type 'enum SomeSize'}}
+ NSLog(@"%@", x); // expected-warning{{format specifies type 'id' but the argument has underlying type 'size_t' (aka}}
// CHECK: fix-it:"{{.*}}":{92:11-92:13}:"%zu"
}
@@ -228,3 +228,29 @@ void testSignedness(long i, unsigned long u) {
// CHECK: fix-it:"{{.*}}":{[[@LINE-2]]:11-[[@LINE-2]]:14}:"%+ld"
}
+
+void testEnum() {
+ typedef enum {
+ ImplicitA = 1,
+ ImplicitB = 2
+ } Implicit;
+
+ typedef enum {
+ ImplicitLLA = 0,
+ ImplicitLLB = ~0ULL
+ } ImplicitLongLong;
+
+ typedef enum : short {
+ ExplicitA = 0,
+ ExplicitB
+ } ExplicitShort;
+
+ printf("%f", (Implicit)0); // expected-warning{{format specifies type 'double' but the argument has underlying type}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:11-[[@LINE-1]]:13}:"%{{[du]}}"
+
+ printf("%f", (ImplicitLongLong)0); // expected-warning{{format specifies type 'double' but the argument has underlying type}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:11-[[@LINE-1]]:13}:"%{{l*[du]}}"
+
+ printf("%f", (ExplicitShort)0); // expected-warning{{format specifies type 'double' but the argument has underlying type 'short'}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:11-[[@LINE-1]]:13}:"%hd"
+}
diff --git a/test/FixIt/lit.local.cfg b/test/FixIt/lit.local.cfg
deleted file mode 100644
index 5bbc711c656d..000000000000
--- a/test/FixIt/lit.local.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-if config.root.clang_rewriter == 0:
- config.unsupported = True
diff --git a/test/FixIt/no-diagnostics-fixit-info.c b/test/FixIt/no-diagnostics-fixit-info.c
new file mode 100644
index 000000000000..9696a2eb181e
--- /dev/null
+++ b/test/FixIt/no-diagnostics-fixit-info.c
@@ -0,0 +1,16 @@
+// RUN: not %clang_cc1 %s 2>&1 | FileCheck -check-prefix=WITH-FIXIT %s
+// RUN: not %clang_cc1 -fno-diagnostics-fixit-info %s 2>&1 | FileCheck -check-prefix=WITHOUT-FIXIT %s
+
+struct Foo {
+ int x;
+}
+// WITH-FIXIT: error: expected ';' after struct
+// WITH-FIXIT-NEXT: }
+// WITH-FIXIT-NEXT: ^
+// WITH-FIXIT-NEXT: ;
+
+// WITHOUT-FIXIT: error: expected ';' after struct
+// WITHOUT-FIXIT-NEXT: }
+// WITHOUT-FIXIT-NEXT: ^
+// WITHOUT-FIXIT-NOT: ;
+
diff --git a/test/FixIt/typo-location-bugs.cpp b/test/FixIt/typo-location-bugs.cpp
index 9c34a91d49c7..e44664d49adb 100644
--- a/test/FixIt/typo-location-bugs.cpp
+++ b/test/FixIt/typo-location-bugs.cpp
@@ -19,3 +19,18 @@ void m() {
pb->f(); // expected-error{{too few arguments to function call, expected 1, have 0; did you mean 'A::f'?}}
}
}
+
+namespace PR18608 {
+struct A {
+virtual void f() const;
+virtual void f(int x) const; // expected-note{{'A::f' declared here}}
+};
+
+struct B : public A {
+virtual void f() const;
+};
+
+void test(B b) {
+ b.f(1); // expected-error{{too many arguments to function call, expected 0, have 1; did you mean 'A::f'?}}
+}
+}
diff --git a/test/Format/disable-format.cpp b/test/Format/disable-format.cpp
new file mode 100644
index 000000000000..59484b3df16d
--- /dev/null
+++ b/test/Format/disable-format.cpp
@@ -0,0 +1,6 @@
+// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp
+// RUN: clang-format -style=none -i %t.cpp
+// RUN: FileCheck -strict-whitespace -input-file=%t.cpp %s
+
+// CHECK: int i;
+int i;
diff --git a/test/Format/language-detection.cpp b/test/Format/language-detection.cpp
new file mode 100644
index 000000000000..bec444dc9dda
--- /dev/null
+++ b/test/Format/language-detection.cpp
@@ -0,0 +1,7 @@
+// RUN: grep -Ev "// *[A-Z0-9_]+:" %s > %t.js
+// RUN: grep -Ev "// *[A-Z0-9_]+:" %s > %t.cpp
+// RUN: clang-format -style=llvm %t.js | FileCheck -strict-whitespace -check-prefix=CHECK1 %s
+// RUN: clang-format -style=llvm %t.cpp | FileCheck -strict-whitespace -check-prefix=CHECK2 %s
+// CHECK1: {{^a >>>= b;$}}
+// CHECK2: {{^a >> >= b;$}}
+a >>>= b;
diff --git a/test/Format/style-on-command-line.cpp b/test/Format/style-on-command-line.cpp
index 22131a1ebe1b..007022e74461 100644
--- a/test/Format/style-on-command-line.cpp
+++ b/test/Format/style-on-command-line.cpp
@@ -1,29 +1,34 @@
// RUN: grep -Ev "// *[A-Z0-9_]+:" %s > %t.cpp
// RUN: clang-format -style="{BasedOnStyle: Google, IndentWidth: 8}" %t.cpp | FileCheck -strict-whitespace -check-prefix=CHECK1 %s
// RUN: clang-format -style="{BasedOnStyle: LLVM, IndentWidth: 7}" %t.cpp | FileCheck -strict-whitespace -check-prefix=CHECK2 %s
-// RUN: clang-format -style="{BasedOnStyle: invalid, IndentWidth: 7}" %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK3 %s
-// RUN: clang-format -style="{lsjd}" %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK4 %s
+// RUN: clang-format -style="{BasedOnStyle: invalid, IndentWidth: 7}" -fallback-style=LLVM %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK3 %s
+// RUN: clang-format -style="{lsjd}" %t.cpp -fallback-style=LLVM 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK4 %s
// RUN: [ ! -e %T/.clang-format ] || rm %T/.clang-format
// RUN: printf "BasedOnStyle: google\nIndentWidth: 5\n" > %T/.clang-format
// RUN: clang-format -style=file %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK5 %s
// RUN: printf "\n" > %T/.clang-format
-// RUN: clang-format -style=file %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK6 %s
+// RUN: clang-format -style=file -fallback-style=webkit %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK6 %s
// RUN: [ ! -e %T/.clang-format ] || rm %T/.clang-format
// RUN: [ ! -e %T/_clang-format ] || rm %T/_clang-format
// RUN: printf "BasedOnStyle: google\nIndentWidth: 6\n" > %T/_clang-format
// RUN: clang-format -style=file %t.cpp 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK7 %s
+// RUN: clang-format -style="{BasedOnStyle: LLVM, PointerBindsToType: true}" %t.cpp | FileCheck -strict-whitespace -check-prefix=CHECK8 %s
+// RUN: clang-format -style="{BasedOnStyle: WebKit, PointerBindsToType: false}" %t.cpp | FileCheck -strict-whitespace -check-prefix=CHECK9 %s
void f() {
// CHECK1: {{^ int\* i;$}}
// CHECK2: {{^ int \*i;$}}
// CHECK3: Unknown value for BasedOnStyle: invalid
-// CHECK3: Error parsing -style: Invalid argument, using LLVM style
+// CHECK3: Error parsing -style: {{I|i}}nvalid argument, using LLVM style
// CHECK3: {{^ int \*i;$}}
-// CHECK4: Error parsing -style: Invalid argument, using LLVM style
+// CHECK4: Error parsing -style: {{I|i}}nvalid argument, using LLVM style
// CHECK4: {{^ int \*i;$}}
// CHECK5: {{^ int\* i;$}}
-// CHECK6: {{^Error reading .*\.clang-format: Invalid argument}}
-// XCHECK6X: {{^ int \*i;$}}
+// CHECK6: {{^Error reading .*\.clang-format: (I|i)nvalid argument}}
+// CHECK6: {{^Can't find usable .clang-format, using webkit style$}}
+// CHECK6: {{^ int\* i;$}}
// CHECK7: {{^ int\* i;$}}
+// CHECK8: {{^ int\* i;$}}
+// CHECK9: {{^ int \*i;$}}
int*i;
int j;
}
diff --git a/test/Frontend/Inputs/rewrite-includes-messages.h b/test/Frontend/Inputs/rewrite-includes-messages.h
new file mode 100644
index 000000000000..e5f0eb251473
--- /dev/null
+++ b/test/Frontend/Inputs/rewrite-includes-messages.h
@@ -0,0 +1,4 @@
+void f()
+{
+ int unused_variable;
+}
diff --git a/test/Frontend/backend-diagnostic.c b/test/Frontend/backend-diagnostic.c
new file mode 100644
index 000000000000..1fe4fdb5b924
--- /dev/null
+++ b/test/Frontend/backend-diagnostic.c
@@ -0,0 +1,31 @@
+// REQUIRES: x86-registered-target
+// Play around with backend reporting:
+// _REGULAR_: Regular behavior, no warning switch enabled.
+// _PROMOTE_: Promote warning to error.
+// _IGNORE_: Drop backend warning.
+//
+// RUN: not %clang_cc1 %s -mllvm -warn-stack-size=0 -no-integrated-as -S -o - -triple=i386-apple-darwin 2> %t.err
+// RUN: FileCheck < %t.err %s --check-prefix=REGULAR --check-prefix=ASM
+// RUN: not %clang_cc1 %s -mllvm -warn-stack-size=0 -no-integrated-as -S -o - -triple=i386-apple-darwin -Werror=frame-larger-than= 2> %t.err
+// RUN: FileCheck < %t.err %s --check-prefix=PROMOTE --check-prefix=ASM
+// RUN: not %clang_cc1 %s -mllvm -warn-stack-size=0 -no-integrated-as -S -o - -triple=i386-apple-darwin -Wno-frame-larger-than= 2> %t.err
+// RUN: FileCheck < %t.err %s --check-prefix=IGNORE --check-prefix=ASM
+//
+// RUN: %clang_cc1 %s -S -o - -triple=i386-apple-darwin -verify -no-integrated-as
+
+extern void doIt(char *);
+
+// REGULAR: warning: stack frame size of {{[0-9]+}} bytes in function 'stackSizeWarning'
+// PROMOTE: error: stack frame size of {{[0-9]+}} bytes in function 'stackSizeWarning'
+// IGNORE-NOT: stack frame size of {{[0-9]+}} bytes in function 'stackSizeWarning'
+void stackSizeWarning() {
+ char buffer[80];
+ doIt(buffer);
+}
+
+// ASM: inline assembly requires more registers than available
+void inlineAsmError(int x0, int x1, int x2, int x3, int x4,
+ int x5, int x6, int x7, int x8, int x9) {
+ __asm__("hello world": : "r" (x0),"r" (x1),"r" (x2),"r" (x3), // expected-error + {{inline assembly requires more registers than available}}
+ "r" (x4),"r" (x5),"r" (x6),"r" (x7),"r" (x8),"r" (x9));
+}
diff --git a/test/Frontend/darwin-eabi.c b/test/Frontend/darwin-eabi.c
index b4b82aa842ed..27471e6cfb0e 100644
--- a/test/Frontend/darwin-eabi.c
+++ b/test/Frontend/darwin-eabi.c
@@ -1,7 +1,7 @@
// RUN: %clang -arch armv6m -dM -E %s | FileCheck %s
// RUN: %clang -arch armv7m -dM -E %s | FileCheck %s
// RUN: %clang -arch armv7em -dM -E %s | FileCheck %s
-// RUN: %clang -arch armv7 -target thumbv7-apple-darwin-eabi -dM -E %s | FileCheck %s
+// RUN: %clang_cc1 -triple thumbv7m-apple-unknown-macho -dM -E %s | FileCheck %s
// CHECK-NOT: __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__
// CHECK-NOT: __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
diff --git a/test/Frontend/darwin-version.c b/test/Frontend/darwin-version.c
index 7234ab48e3b0..2e0804baf90e 100644
--- a/test/Frontend/darwin-version.c
+++ b/test/Frontend/darwin-version.c
@@ -23,3 +23,5 @@
// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1050' | count 1
// RUN: %clang -target i686-apple-darwin9 -mmacosx-version-min=10.6 -dM -E -o %t %s
// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '1060' | count 1
+// RUN: %clang -target x86_64-apple-macosx -mmacosx-version-min=10.10 -dM -E -o %t %s
+// RUN: grep '__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__' %t | grep '101000' | count 1
diff --git a/test/Frontend/disable-output.c b/test/Frontend/disable-output.c
new file mode 100644
index 000000000000..786ac77ef18e
--- /dev/null
+++ b/test/Frontend/disable-output.c
@@ -0,0 +1,7 @@
+// REQUIRES: x86-registered-target
+// RUN: %clang_cc1 %s -emit-llvm-only -triple=i386-apple-darwin -o %t
+// RUN: not rm %t
+// RUN: %clang_cc1 %s -emit-codegen-only -triple=i386-apple-darwin -o %t
+// RUN: not rm %t
+
+// Test that output is not generated when emission is disabled.
diff --git a/test/Frontend/exceptions.c b/test/Frontend/exceptions.c
new file mode 100644
index 000000000000..4bbaaa39bfa6
--- /dev/null
+++ b/test/Frontend/exceptions.c
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -fms-compatibility -fexceptions -fcxx-exceptions -verify %s
+// expected-no-diagnostics
+
+#if defined(__EXCEPTIONS)
+#error __EXCEPTIONS should not be defined.
+#endif
diff --git a/test/Frontend/invalid-o-level.c b/test/Frontend/invalid-o-level.c
index b9e01fcf00c0..73be9b1c21ff 100644
--- a/test/Frontend/invalid-o-level.c
+++ b/test/Frontend/invalid-o-level.c
@@ -1,4 +1,4 @@
// RUN: %clang_cc1 %s -O900 -o /dev/null 2> %t.log
// RUN: FileCheck %s -input-file=%t.log
-// CHECK: warning: optimization level '-O900' is unsupported; using '-O3' instead
+// CHECK: warning: optimization level '-O900' is not supported; using '-O3' instead
diff --git a/test/Frontend/ir-support-codegen.ll b/test/Frontend/ir-support-codegen.ll
index e5e5b625d937..3dc3c0a571bd 100644
--- a/test/Frontend/ir-support-codegen.ll
+++ b/test/Frontend/ir-support-codegen.ll
@@ -1,9 +1,15 @@
-; REQUIRES: x86-64-registered-target
-; RUN: %clang_cc1 -S -o - %s | FileCheck %s
+; REQUIRES: x86-registered-target
+; RUN: %clang_cc1 -triple x86_64-apple-darwin10 -S -o - %s | FileCheck %s
+
+; RUN: %clang_cc1 -triple x86_64-pc-linux -S -o %t %s 2>&1 | \
+; RUN: FileCheck --check-prefix=WARN %s
+; WARN: warning: overriding the module target triple with x86_64-pc-linux
+; RUN: FileCheck --check-prefix=LINUX %s < %t
target triple = "x86_64-apple-darwin10"
; CHECK: .globl _f0
+; LINUX: .globl f0
define i32 @f0() nounwind ssp {
ret i32 0
}
diff --git a/test/Frontend/ir-support.c b/test/Frontend/ir-support.c
new file mode 100644
index 000000000000..f69161e8705c
--- /dev/null
+++ b/test/Frontend/ir-support.c
@@ -0,0 +1,19 @@
+// Test that we can consume LLVM IR/bitcode in the frontend and produce
+// equivalent output to a standard compilation.
+
+// We strip differing '.file' directives before comparing.
+
+// Reference output:
+// RUN: %clang_cc1 -S -o - %s | grep -v '\.file' > %t.s
+
+// LLVM bitcode:
+// RUN: %clang_cc1 -emit-llvm-bc -o %t.bc %s
+// RUN: %clang_cc1 -S -o - %t.bc | grep -v '\.file' > %t.bc.s
+// RUN: diff %t.s %t.bc.s
+
+// LLVM IR source code:
+// RUN: %clang_cc1 -emit-llvm -o %t.ll %s
+// RUN: %clang_cc1 -S -o - %t.ll | grep -v '\.file' > %t.ll.s
+// RUN: diff %t.s %t.ll.s
+
+int f() { return 0; }
diff --git a/test/Frontend/lit.local.cfg b/test/Frontend/lit.local.cfg
index 4c135982a452..c11fb6d611a5 100644
--- a/test/Frontend/lit.local.cfg
+++ b/test/Frontend/lit.local.cfg
@@ -1 +1 @@
-config.suffixes = ['.c', '.cpp', '.m', '.mm', '.ll', '.bc']
+config.suffixes = ['.c', '.cpp', '.m', '.mm', '.ll']
diff --git a/test/Frontend/optimization-remark-line-directive.c b/test/Frontend/optimization-remark-line-directive.c
new file mode 100644
index 000000000000..f4c0011fb4f8
--- /dev/null
+++ b/test/Frontend/optimization-remark-line-directive.c
@@ -0,0 +1,12 @@
+// This file tests -Rpass diagnostics together with #line
+// directives. We cannot map #line directives back to
+// a SourceLocation.
+
+// RUN: %clang_cc1 %s -Rpass=inline -gline-tables-only -dwarf-column-info -emit-llvm-only -verify
+
+int foo(int x, int y) __attribute__((always_inline));
+int foo(int x, int y) { return x + y; }
+
+// expected-remark@+2 {{foo inlined into bar}} expected-note@+2 {{could not determine the original source location for /bad/path/to/original.c:1230:25}}
+#line 1230 "/bad/path/to/original.c"
+int bar(int j) { return foo(j, j - 2); }
diff --git a/test/Frontend/optimization-remark.c b/test/Frontend/optimization-remark.c
new file mode 100644
index 000000000000..6ada0030a700
--- /dev/null
+++ b/test/Frontend/optimization-remark.c
@@ -0,0 +1,51 @@
+// This file tests the -Rpass family of flags (-Rpass, -Rpass-missed
+// and -Rpass-analysis) with the inliner. The test is designed to
+// always trigger the inliner, so it should be independent of the
+// optimization level.
+
+// RUN: %clang_cc1 %s -Rpass=inline -Rpass-analysis=inline -Rpass-missed=inline -O0 -emit-llvm-only -verify
+// RUN: %clang_cc1 %s -Rpass=inline -Rpass-analysis=inline -Rpass-missed=inline -O0 -emit-llvm-only -gline-tables-only -verify
+// RUN: %clang_cc1 %s -Rpass=inline -emit-llvm -o - 2>/dev/null | FileCheck %s
+//
+// Check that we can override -Rpass= with -Rno-pass.
+// RUN: %clang_cc1 %s -Rpass=inline -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK-REMARKS
+// RUN: %clang_cc1 %s -Rpass=inline -Rno-pass -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK-NO-REMARKS
+// RUN: %clang_cc1 %s -Rpass=inline -Rno-everything -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK-NO-REMARKS
+// RUN: %clang_cc1 %s -Rpass=inline -Rno-everything -Reverything -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=CHECK-REMARKS
+//
+// FIXME: -Reverything should imply -Rpass=.*.
+// RUN: %clang_cc1 %s -Reverything -emit-llvm -o - 2>/dev/null | FileCheck %s --check-prefix=CHECK-NO-REMARKS
+//
+// FIXME: -Rpass should either imply -Rpass=.* or should be rejected.
+// RUN: %clang_cc1 %s -Rpass -emit-llvm -o - 2>/dev/null | FileCheck %s --check-prefix=CHECK-NO-REMARKS
+
+// CHECK-REMARKS: remark:
+// CHECK-NO-REMARKS-NOT: remark:
+
+// -Rpass should produce source location annotations, exclusively (just
+// like -gmlt).
+// CHECK: , !dbg !
+// CHECK-NOT: DW_TAG_base_type
+
+// But llvm.dbg.cu should be missing (to prevent writing debug info to
+// the final output).
+// CHECK-NOT: !llvm.dbg.cu = !{
+
+int foo(int x, int y) __attribute__((always_inline));
+int foo(int x, int y) { return x + y; }
+
+float foz(int x, int y) __attribute__((noinline));
+float foz(int x, int y) { return x * y; }
+
+// The negative diagnostics are emitted twice because the inliner runs
+// twice.
+//
+int bar(int j) {
+// expected-remark@+6 {{foz should never be inlined (cost=never)}}
+// expected-remark@+5 {{foz will not be inlined into bar}}
+// expected-remark@+4 {{foz should never be inlined}}
+// expected-remark@+3 {{foz will not be inlined into bar}}
+// expected-remark@+2 {{foo should always be inlined}}
+// expected-remark@+1 {{foo inlined into bar}}
+ return foo(j, j - 2) * foz(j - 2, j);
+}
diff --git a/test/Frontend/plugins.c b/test/Frontend/plugins.c
new file mode 100644
index 000000000000..8117f72fa7ad
--- /dev/null
+++ b/test/Frontend/plugins.c
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -load %llvmshlibdir/PrintFunctionNames%pluginext -plugin print-fns %s 2>&1 | FileCheck %s
+// REQUIRES: plugins, examples
+
+// CHECK: top-level-decl: "x"
+void x();
diff --git a/test/Frontend/print-header-includes.c b/test/Frontend/print-header-includes.c
index aa3e3971fd1b..e248c76f9776 100644
--- a/test/Frontend/print-header-includes.c
+++ b/test/Frontend/print-header-includes.c
@@ -1,12 +1,12 @@
-// RUN: %clang_cc1 -include Inputs/test3.h -E -H -o %t.out %s 2> %t.err
-// RUN: FileCheck < %t.err %s
+// RUN: %clang_cc1 -include Inputs/test3.h -E -H -o %t.out %s 2> %t.stderr
+// RUN: FileCheck < %t.stderr %s
// CHECK-NOT: test3.h
// CHECK: . {{.*test.h}}
// CHECK: .. {{.*test2.h}}
-// RUN: %clang_cc1 -include Inputs/test3.h -E --show-includes -o %t.out %s 2> %t.err
-// RUN: FileCheck --check-prefix=MS < %t.err %s
+// RUN: %clang_cc1 -include Inputs/test3.h -E --show-includes -o %t.out %s > %t.stdout
+// RUN: FileCheck --check-prefix=MS < %t.stdout %s
// MS-NOT: test3.h
// MS: Note: including file: {{.*test.h}}
// MS: Note: including file: {{.*test2.h}}
diff --git a/test/Frontend/rewrite-includes-bom.c b/test/Frontend/rewrite-includes-bom.c
index a1aa4c98f86e..caa431ad9aaf 100644
--- a/test/Frontend/rewrite-includes-bom.c
+++ b/test/Frontend/rewrite-includes-bom.c
@@ -1,4 +1,8 @@
-// RUN: %clang -E -frewrite-includes -I %S/Inputs %s -o - | %clang -fsyntax-only -Xclang -verify -x c -
+// RUN: grep -q $'^\xEF\xBB\xBF' %S/Inputs/rewrite-includes-bom.h
+// RUN: %clang_cc1 -E -frewrite-includes -I %S/Inputs %s -o %t.c
+// RUN: ! grep -q $'\xEF\xBB\xBF' %t.c
+// RUN: %clang_cc1 -fsyntax-only -verify %t.c
// expected-no-diagnostics
+// REQUIRES: shell
#include "rewrite-includes-bom.h"
diff --git a/test/Frontend/rewrite-includes-cli-include.c b/test/Frontend/rewrite-includes-cli-include.c
new file mode 100644
index 000000000000..ba96039bdd5a
--- /dev/null
+++ b/test/Frontend/rewrite-includes-cli-include.c
@@ -0,0 +1,9 @@
+// RUN: not %clang_cc1 -verify -E -frewrite-includes -include %S/Inputs/rewrite-includes2.h %s -o - | FileCheck -strict-whitespace %s
+main_file_line
+// CHECK: {{^}}# 1 "<built-in>"{{$}}
+// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes2.h" 1{{$}}
+// CHECK-NEXT: {{^}}included_line2{{$}}
+// CHECK-NEXT: {{^}}# 1 "<built-in>" 2{{$}}
+// CHECK-NEXT: {{^}}# 1 "{{.*}}rewrite-includes-cli-include.c"{{$}}
+// CHECK-NEXT: FileCheck
+// CHECK-NEXT: {{^}}main_file_line{{$}}
diff --git a/test/Frontend/rewrite-includes-eof.c b/test/Frontend/rewrite-includes-eof.c
new file mode 100644
index 000000000000..af7fd89e3dfd
--- /dev/null
+++ b/test/Frontend/rewrite-includes-eof.c
@@ -0,0 +1,4 @@
+// RUN: %clang_cc1 -E -frewrite-includes -I %S/Inputs %s
+// expected-no-diagnostics
+// Note: there's no newline at the end of this C file.
+#include "rewrite-includes-bom.h" \ No newline at end of file
diff --git a/test/Frontend/rewrite-includes-messages.c b/test/Frontend/rewrite-includes-messages.c
new file mode 100644
index 000000000000..f93fe72e58d5
--- /dev/null
+++ b/test/Frontend/rewrite-includes-messages.c
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -E -frewrite-includes %s -I%S/Inputs/ | %clang_cc1 -Wall -fsyntax-only -Wunused-macros -x c - 2>&1 > %t.1
+// RUN: %clang_cc1 -I%S/Inputs/ -Wall -Wunused-macros -fsyntax-only %s 2>&1 > %t.2
+// RUN: diff %t.1 %t.2 -u
+// expected-no-diagnostics
+
+#include "rewrite-includes-messages.h"
+#define UNUSED_MACRO
diff --git a/test/Frontend/rewrite-includes-missing.c b/test/Frontend/rewrite-includes-missing.c
index da4e209bc1f7..25a59a03217f 100644
--- a/test/Frontend/rewrite-includes-missing.c
+++ b/test/Frontend/rewrite-includes-missing.c
@@ -4,4 +4,5 @@
// CHECK: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
// CHECK-NEXT: {{^}}#include "foobar.h"
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 3 "{{.*}}rewrite-includes-missing.c"{{$}}
// CHECK-NEXT: {{^}}# 4 "{{.*}}rewrite-includes-missing.c"{{$}}
diff --git a/test/Frontend/rewrite-includes-modules.c b/test/Frontend/rewrite-includes-modules.c
index 783a96739ae6..58d7809909da 100644
--- a/test/Frontend/rewrite-includes-modules.c
+++ b/test/Frontend/rewrite-includes-modules.c
@@ -10,11 +10,13 @@ int foo();
// CHECK-NEXT: #if 0 /* expanded by -frewrite-includes */{{$}}
// CHECK-NEXT: #include <Module/Module.h>{{$}}
// CHECK-NEXT: #endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: # 5 "{{.*[/\\]}}rewrite-includes-modules.c"{{$}}
// CHECK-NEXT: @import Module; /* clang -frewrite-includes: implicit import */{{$}}
// CHECK-NEXT: # 6 "{{.*[/\\]}}rewrite-includes-modules.c"{{$}}
// CHECK-NEXT: int foo();{{$}}
// CHECK-NEXT: #if 0 /* expanded by -frewrite-includes */{{$}}
// CHECK-NEXT: #include <Module/Module.h>{{$}}
// CHECK-NEXT: #endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: # 7 "{{.*[/\\]}}rewrite-includes-modules.c"{{$}}
// CHECK-NEXT: @import Module; /* clang -frewrite-includes: implicit import */{{$}}
// CHECK-NEXT: # 8 "{{.*[/\\]}}rewrite-includes-modules.c"{{$}}
diff --git a/test/Frontend/rewrite-includes.c b/test/Frontend/rewrite-includes.c
index 2158dd0e8ead..bed87efa1f7a 100644
--- a/test/Frontend/rewrite-includes.c
+++ b/test/Frontend/rewrite-includes.c
@@ -21,12 +21,14 @@ A(1,2)
#include "rewrite-includes7.h"
#include "rewrite-includes8.h"
// ENDCOMPARE
+// CHECK: {{^}}# 1 "{{.*}}rewrite-includes.c"{{$}}
// CHECK: {{^}}// STARTCOMPARE{{$}}
// CHECK-NEXT: {{^}}#define A(a,b) a ## b{{$}}
// CHECK-NEXT: {{^}}A(1,2){{$}}
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
// CHECK-NEXT: {{^}}#include "rewrite-includes1.h"{{$}}
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 6 "{{.*}}rewrite-includes.c"{{$}}
// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes1.h" 1{{$}}
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
// CHECK-NEXT: {{^}}#pragma clang system_header{{$}}
@@ -36,6 +38,7 @@ A(1,2)
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
// CHECK-NEXT: {{^}}#include "rewrite-includes2.h"{{$}}
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 3 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes1.h" 3{{$}}
// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes2.h" 1 3{{$}}
// CHECK-NEXT: {{^}}included_line2{{$}}
// CHECK-NEXT: {{^}}# 4 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes1.h" 2 3{{$}}
@@ -45,6 +48,7 @@ A(1,2)
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
// CHECK-NEXT: {{^}}#include HEADER{{$}}
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 9 "{{.*}}rewrite-includes.c"{{$}}
// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes3.h" 1{{$}}
// CHECK-NEXT: {{^}}included_line3{{$}}
// CHECK-NEXT: {{^}}# 10 "{{.*}}rewrite-includes.c" 2{{$}}
@@ -53,6 +57,7 @@ A(1,2)
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
// CHECK-NEXT: {{^}}#include "rewrite-includes4.h"{{$}}
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 11 "{{.*}}rewrite-includes.c"{{$}}
// CHECK-NEXT: {{^}}# 12 "{{.*}}rewrite-includes.c"{{$}}
// CHECK-NEXT: {{^}}#endif{{$}}
// CHECK-NEXT: {{^}}# 13 "{{.*}}rewrite-includes.c"{{$}}
@@ -61,12 +66,14 @@ A(1,2)
// CHECK-NEXT: {{^}}#/**/include /**/ "rewrite-includes5.h" /**/ {{\\}}{{$}}
// CHECK-NEXT: {{^}} {{$}}
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 15 "{{.*}}rewrite-includes.c"{{$}}
// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes5.h" 1{{$}}
// CHECK-NEXT: {{^}}included_line5{{$}}
// CHECK-NEXT: {{^}}# 16 "{{.*}}rewrite-includes.c" 2{{$}}
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
// CHECK-NEXT: {{^}}#include "rewrite-includes6.h" // comment{{$}}
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 16 "{{.*}}rewrite-includes.c"{{$}}
// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes6.h" 1{{$}}
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
// CHECK-NEXT: {{^}}#pragma once{{$}}
@@ -79,10 +86,12 @@ A(1,2)
// CHECK-NEXT: {{^}}#include "rewrite-includes6.h" /* comment{{$}}
// CHECK-NEXT: {{^}} continues */{{$}}
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 19 "{{.*}}rewrite-includes.c"{{$}}
// CHECK-NEXT: {{^}}# 20 "{{.*}}rewrite-includes.c"{{$}}
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
// CHECK-NEXT: {{^}}#include "rewrite-includes7.h"{{$}}
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 20 "{{.*}}rewrite-includes.c"{{$}}
// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes7.h" 1{{$}}
// CHECK-NEXT: {{^}}#ifndef REWRITE_INCLUDES_7{{$}}
// CHECK-NEXT: {{^}}#define REWRITE_INCLUDES_7{{$}}
@@ -93,10 +102,12 @@ A(1,2)
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
// CHECK-NEXT: {{^}}#include "rewrite-includes7.h"{{$}}
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 21 "{{.*}}rewrite-includes.c"{{$}}
// CHECK-NEXT: {{^}}# 22 "{{.*}}rewrite-includes.c"{{$}}
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
// CHECK-NEXT: {{^}}#include "rewrite-includes8.h"{{$}}
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
+// CHECK-NEXT: {{^}}# 22 "{{.*}}rewrite-includes.c"{{$}}
// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes8.h" 1{{$}}
// CHECK-NEXT: {{^}}#if (1)/*__has_include_next(<rewrite-includes8.h>)*/{{$}}
// CHECK-NEXT: {{^}}#elif (0)/*__has_include(<rewrite-includes8.hfail>)*/{{$}}
diff --git a/test/Frontend/rewrite-macros.c b/test/Frontend/rewrite-macros.c
index eab66571b8d7..759afb096a2d 100644
--- a/test/Frontend/rewrite-macros.c
+++ b/test/Frontend/rewrite-macros.c
@@ -17,5 +17,3 @@ _Pragma("mark")
// CHECK: {{^}}//#pragma mark mark{{$}}
#pragma mark mark
-
-
diff --git a/test/Frontend/stdlang.c b/test/Frontend/stdlang.c
new file mode 100644
index 000000000000..71997f1403c3
--- /dev/null
+++ b/test/Frontend/stdlang.c
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -x cuda -std=c++11 -DCUDA %s
+// RUN: %clang_cc1 -x cl -std=c99 -DOPENCL %s
+// expected-no-diagnostics
+
+#if defined(CUDA)
+ __attribute__((device)) void f_device();
+#elif defined(OPENCL)
+ kernel void func(void);
+#endif
diff --git a/test/Frontend/system-header-prefix.c b/test/Frontend/system-header-prefix.c
index 31194d96e58c..55b954fc1b2d 100644
--- a/test/Frontend/system-header-prefix.c
+++ b/test/Frontend/system-header-prefix.c
@@ -1,11 +1,12 @@
-// RUN: %clang_cc1 -isystem-prefix libs/ -ino-system-prefix libs/mylib/ -I%S/Inputs/SystemHeaderPrefix -Wundef -E %s 2>&1 | FileCheck %s
+// RUN: %clang --system-header-prefix=libs/ --no-system-header-prefix=libs/mylib/ -I%S/Inputs/SystemHeaderPrefix -Wundef -E %s 2>&1 | FileCheck %s
+// RUN: %clang --system-header-prefix libs/ --no-system-header-prefix libs/mylib/ -I%S/Inputs/SystemHeaderPrefix -Wundef -E %s 2>&1 | FileCheck %s
#include "src/all.h"
// CHECK-NOT: BOOST
-// CHECK: libs/mylib/warn.h:1:5: warning: 'MYLIB' is not defined, evaluates to 0
+// CHECK: libs{{/|\\}}mylib{{/|\\}}warn.h:1:5: warning: 'MYLIB' is not defined, evaluates to 0
// CHECK-NOT: BOOST
-// CHECK: libs/mylib/warn.h:1:5: warning: 'MYLIB' is not defined, evaluates to 0
+// CHECK: libs{{/|\\}}mylib{{/|\\}}warn.h:1:5: warning: 'MYLIB' is not defined, evaluates to 0
// CHECK-NOT: BOOST
-// CHECK: src/warn.h:1:5: warning: 'SRC' is not defined, evaluates to 0
+// CHECK: src{{/|\\}}warn.h:1:5: warning: 'SRC' is not defined, evaluates to 0
// CHECK-NOT: BOOST
diff --git a/test/Frontend/verify.c b/test/Frontend/verify.c
index 4bd0c90b4aea..e2e7894f3b9e 100644
--- a/test/Frontend/verify.c
+++ b/test/Frontend/verify.c
@@ -134,9 +134,18 @@ unexpected b; // expected-error@33 1-1 {{unknown type}}
// expected-warning@verify-directive.h: {{ }}
// expected-error@-1 {{missing or invalid line number}}
+// expected-warning@verify-directive.h:0 {{ }}
+// expected-error@-1 {{missing or invalid line number}}
+
+// expected-warning@verify-directive.h:0*{{ }}
+// expected-error@-1 {{missing or invalid line number}}
+
+// expected-warning@verify-directive.h:*0{{ }}
+// syntactically ok -- means match in any line for 0 occurrences.
+
// expected-warning@verify-directive.h:1 {{diagnostic}}
// CHECK8: error: 'warning' diagnostics expected but not seen:
-// CHECK8-NEXT: File {{.*}}verify-directive.h Line 1 (directive at {{.*}}verify.c:137): diagnostic
+// CHECK8-NEXT: File {{.*}}verify-directive.h Line 1 (directive at {{.*}}verify.c:146): diagnostic
// CHECK8-NEXT: 1 error generated.
#endif
diff --git a/test/Frontend/verify2.c b/test/Frontend/verify2.c
index 73eda4d815de..075a2ab6e0f0 100644
--- a/test/Frontend/verify2.c
+++ b/test/Frontend/verify2.c
@@ -14,7 +14,26 @@
// CHECK: error: no expected directives found: consider use of 'expected-no-diagnostics'
// CHECK-NEXT: error: 'error' diagnostics seen but not expected:
-// CHECK-NEXT: Line 1: header
+// CHECK-NEXT: Line 5: header
// CHECK-NEXT: Line 10: source
// CHECK-NEXT: 3 errors generated.
#endif
+
+#ifdef CHECK2
+// RUN: not %clang_cc1 -DCHECK2 -verify %s 2>&1 | FileCheck -check-prefix=CHECK2 %s
+
+// The following checks that -verify can match "any line" in an included file.
+// The location of the diagnostic need therefore only match in the file, not to
+// a specific line number. This is useful where -verify is used as a testing
+// tool for 3rd-party libraries where headers may change and the specific line
+// number of a diagnostic in a header is not important.
+
+// expected-error@verify2.h:* {{header}}
+// expected-error@verify2.h:* {{unknown}}
+
+// CHECK2: error: 'error' diagnostics expected but not seen:
+// CHECK2-NEXT: File {{.*}}verify2.h Line * (directive at {{.*}}verify2.c:32): unknown
+// CHECK2-NEXT: error: 'error' diagnostics seen but not expected:
+// CHECK2-NEXT: File {{.*}}verify2.c Line 10: source
+// CHECK2-NEXT: 2 errors generated.
+#endif
diff --git a/test/Frontend/verify2.h b/test/Frontend/verify2.h
index 8acbf6efdfe2..a426722ee6e7 100644
--- a/test/Frontend/verify2.h
+++ b/test/Frontend/verify2.h
@@ -1,5 +1,5 @@
-#error header
-
#if 0
// expected-error {{should be ignored}}
#endif
+
+#error header
diff --git a/test/Frontend/warning-options.cpp b/test/Frontend/warning-options.cpp
index 85bea625957c..3c3396becaf8 100644
--- a/test/Frontend/warning-options.cpp
+++ b/test/Frontend/warning-options.cpp
@@ -1,5 +1,7 @@
// RUN: %clang_cc1 -Wmonkey -Wno-monkey -Wno-unused-command-line-arguments \
-// RUN: -Wno-unused-command-line-argument %s 2>&1 | FileCheck %s
+// RUN: -Wno-unused-command-line-argument -Wmodule-build -Rmodule-built %s 2>&1 | FileCheck %s
// CHECK: unknown warning option '-Wmonkey'
// CHECK: unknown warning option '-Wno-monkey'
// CHECK: unknown warning option '-Wno-unused-command-line-arguments'; did you mean '-Wno-unused-command-line-argument'?
+// CHECK: unknown warning option '-Wmodule-build'; did you mean '-Wmodule-conflict'?
+// CHECK: unknown remark option '-Rmodule-built'; did you mean '-Rmodule-build'?
diff --git a/test/Frontend/windows-nul.c b/test/Frontend/windows-nul.c
new file mode 100644
index 000000000000..9f1fc04151d6
--- /dev/null
+++ b/test/Frontend/windows-nul.c
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 nul
+
+// REQUIRES: system-windows
+
+// Verify that cc1 doesn't crash with an assertion failure
+// in MemoryBuffer.cpp due to an invalid file size reported
+// when the Windows 'nul' device is passed in input.
+
diff --git a/test/Headers/Inputs/include/setjmp.h b/test/Headers/Inputs/include/setjmp.h
new file mode 100644
index 000000000000..3d5e903eff6f
--- /dev/null
+++ b/test/Headers/Inputs/include/setjmp.h
@@ -0,0 +1,8 @@
+#ifndef SETJMP_H
+#define SETJMP_H
+
+typedef struct {
+ int x[42];
+} jmp_buf;
+
+#endif
diff --git a/test/Headers/altivec-header.c b/test/Headers/altivec-header.c
index b01cc9716d76..3d8595734893 100644
--- a/test/Headers/altivec-header.c
+++ b/test/Headers/altivec-header.c
@@ -1,4 +1,4 @@
-// REQUIRES: ppc64-registered-target
+// REQUIRES: powerpc-registered-target
// RUN: %clang_cc1 -triple powerpc64-unknown-unknown -faltivec -ffreestanding -S -o - %s | FileCheck %s
// RUN: %clang_cc1 -triple powerpc64-unknown-unknown -faltivec -ffreestanding -fno-lax-vector-conversions -S -o - %s | FileCheck %s
// RUN: %clang_cc1 -triple powerpc64-unknown-unknown -faltivec -ffreestanding -x c++ -S -o - %s | FileCheck %s
@@ -8,5 +8,8 @@
// Verify that simply including <altivec.h> does not generate any code
// (i.e. all inline routines in the header are marked "static")
-// CHECK-NOT: .text
-
+// CHECK: .text
+// CHECK-NEXT: .file
+// CHECK-NEXT: {{^$}}
+// CHECK-NEXT: .ident{{.*$}}
+// CHECK-NOT: .
diff --git a/test/Headers/arm-acle-header.c b/test/Headers/arm-acle-header.c
new file mode 100644
index 000000000000..d9d2e04c945c
--- /dev/null
+++ b/test/Headers/arm-acle-header.c
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -triple armv7-eabi -target-cpu cortex-a15 -fsyntax-only -ffreestanding %s
+// RUN: %clang_cc1 -triple aarch64-eabi -target-cpu cortex-a53 -fsyntax-only -ffreestanding %s
+// RUN: %clang_cc1 -triple thumbv7-windows -target-cpu cortex-a53 -fsyntax-only -ffreestanding %s
+// RUN: %clang_cc1 -x c++ -triple armv7-eabi -target-cpu cortex-a15 -fsyntax-only -ffreestanding %s
+// RUN: %clang_cc1 -x c++ -triple aarch64-eabi -target-cpu cortex-a57 -fsyntax-only -ffreestanding %s
+// RUN: %clang_cc1 -x c++ -triple thumbv7-windows -target-cpu cortex-a15 -fsyntax-only -ffreestanding %s
+// expected-no-diagnostics
+
+#include <arm_acle.h>
diff --git a/test/Headers/c11.c b/test/Headers/c11.c
index 11bec1954462..b7b15011f3ce 100644
--- a/test/Headers/c11.c
+++ b/test/Headers/c11.c
@@ -1,6 +1,8 @@
+// RUN: rm -rf %t
// RUN: %clang_cc1 -fsyntax-only -verify -std=c11 %s
-// RUN: %clang_cc1 -fsyntax-only -verify -std=c11 -fmodules %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c11 -fmodules -fmodules-cache-path=%t %s
// RUN: %clang_cc1 -fsyntax-only -verify -std=c11 -ffreestanding %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c11 -triple i686-pc-win32 -fms-compatibility-version=17.00 %s
noreturn int f(); // expected-error 1+{{}}
@@ -22,6 +24,14 @@ _Static_assert(__alignof(c) == 4, "");
#define __STDC_WANT_LIB_EXT1__ 1
#include <stddef.h>
rsize_t x = 0;
+_Static_assert(sizeof(max_align_t) >= sizeof(long long), "");
+_Static_assert(alignof(max_align_t) >= alignof(long long), "");
+_Static_assert(sizeof(max_align_t) >= sizeof(long double), "");
+_Static_assert(alignof(max_align_t) >= alignof(long double), "");
+
+#ifdef _MSC_VER
+_Static_assert(sizeof(max_align_t) == sizeof(double), "");
+#endif
// If we are freestanding, then also check RSIZE_MAX (in a hosted implementation
// we will use the host stdint.h, which may not yet have C11 support).
diff --git a/test/Headers/cxx11.cpp b/test/Headers/cxx11.cpp
index 1a4b6400e095..5b0ec0b79ccb 100644
--- a/test/Headers/cxx11.cpp
+++ b/test/Headers/cxx11.cpp
@@ -1,6 +1,8 @@
// RUN: %clang_cc1 -ffreestanding -fsyntax-only -std=c++11 %s
// RUN: %clang_cc1 -ffreestanding -fsyntax-only -std=c++11 -fmodules %s
+// This test fails on systems with older OS X 10.9 SDK headers, see PR18322.
+
#include <stdalign.h>
#if defined alignas
diff --git a/test/Headers/ms-intrin.cpp b/test/Headers/ms-intrin.cpp
index 1bf134e7eac6..68f436cf2479 100644
--- a/test/Headers/ms-intrin.cpp
+++ b/test/Headers/ms-intrin.cpp
@@ -1,6 +1,17 @@
// RUN: %clang_cc1 -triple i386-pc-win32 -target-cpu pentium4 \
-// RUN: -fms-extensions -fms-compatibility -fmsc-version=1700 \
-// RUN: -ffreestanding -verify %s
+// RUN: -fms-extensions -fms-compatibility -fms-compatibility-version=17.00 \
+// RUN: -ffreestanding -fsyntax-only -Werror \
+// RUN: -isystem %S/Inputs/include %s
+
+// RUN: %clang_cc1 -triple x86_64-pc-win32 \
+// RUN: -fms-extensions -fms-compatibility -fms-compatibility-version=17.00 \
+// RUN: -ffreestanding -fsyntax-only -Werror \
+// RUN: -isystem %S/Inputs/include %s
+
+// RUN: %clang_cc1 -triple thumbv7--windows \
+// RUN: -fms-compatibility -fms-compatibility-version=17.00 \
+// RUN: -ffreestanding -fsyntax-only -Werror \
+// RUN: -isystem %S/Inputs/include %s
// Intrin.h needs size_t, but -ffreestanding prevents us from getting it from
// stddef.h. Work around it with this typedef.
@@ -11,14 +22,3 @@ typedef __SIZE_TYPE__ size_t;
// Use some C++ to make sure we closed the extern "C" brackets.
template <typename T>
void foo(T V) {}
-
-void bar() {
- _ReadWriteBarrier(); // expected-warning {{is deprecated: use other intrinsics or C++11 atomics instead}}
- _ReadBarrier(); // expected-warning {{is deprecated: use other intrinsics or C++11 atomics instead}}
- _WriteBarrier(); // expected-warning {{is deprecated: use other intrinsics or C++11 atomics instead}}
- // FIXME: It'd be handy if we didn't have to hardcode the line number in
- // intrin.h.
- // expected-note@Intrin.h:754 {{declared here}}
- // expected-note@Intrin.h:759 {{declared here}}
- // expected-note@Intrin.h:764 {{declared here}}
-}
diff --git a/test/Headers/ms-null-ms-header-vs-stddef.cpp b/test/Headers/ms-null-ms-header-vs-stddef.cpp
index 237ed51f965e..e3910896713c 100644
--- a/test/Headers/ms-null-ms-header-vs-stddef.cpp
+++ b/test/Headers/ms-null-ms-header-vs-stddef.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -triple i686-pc-win32 -fms-compatibility -fmsc-version=1700 %s
+// RUN: %clang_cc1 -fsyntax-only -triple i686-pc-win32 -fms-compatibility -fms-compatibility-version=17.00 %s
// RUN: %clang_cc1 -fsyntax-only -triple i386-mingw32 %s
// Something in MSVC's headers (pulled in e.g. by <crtdefs.h>) defines __null
diff --git a/test/Headers/stddefneeds.cpp b/test/Headers/stddefneeds.cpp
new file mode 100644
index 000000000000..0763bbdee13a
--- /dev/null
+++ b/test/Headers/stddefneeds.cpp
@@ -0,0 +1,69 @@
+// RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-macosx10.9.0 -verify -Wsentinel -std=c++11 %s
+
+ptrdiff_t p0; // expected-error{{unknown}}
+size_t s0; // expected-error{{unknown}}
+void* v0 = NULL; // expected-error{{undeclared}}
+wint_t w0; // expected-error{{unknown}}
+max_align_t m0; // expected-error{{unknown}}
+
+#define __need_ptrdiff_t
+#include <stddef.h>
+
+ptrdiff_t p1;
+size_t s1; // expected-error{{unknown}}
+void* v1 = NULL; // expected-error{{undeclared}}
+wint_t w1; // expected-error{{unknown}}
+max_align_t m1; // expected-error{{unknown}}
+
+#define __need_size_t
+#include <stddef.h>
+
+ptrdiff_t p2;
+size_t s2;
+void* v2 = NULL; // expected-error{{undeclared}}
+wint_t w2; // expected-error{{unknown}}
+max_align_t m2; // expected-error{{unknown}}
+
+#define __need_NULL
+#include <stddef.h>
+
+ptrdiff_t p3;
+size_t s3;
+void* v3 = NULL;
+wint_t w3; // expected-error{{unknown}}
+max_align_t m3; // expected-error{{unknown}}
+
+// Shouldn't bring in wint_t by default:
+#include <stddef.h>
+
+ptrdiff_t p4;
+size_t s4;
+void* v4 = NULL;
+wint_t w4; // expected-error{{unknown}}
+max_align_t m4;
+
+#define __need_wint_t
+#include <stddef.h>
+
+ptrdiff_t p5;
+size_t s5;
+void* v5 = NULL;
+wint_t w5;
+max_align_t m5;
+
+
+// linux/stddef.h does something like this for cpp files:
+#undef NULL
+#define NULL 0
+
+// glibc (and other) headers then define __need_NULL and rely on stddef.h
+// to redefine NULL to the correct value again.
+#define __need_NULL
+#include <stddef.h>
+
+// gtk headers then use __attribute__((sentinel)), which doesn't work if NULL
+// is 0.
+void f(const char* c, ...) __attribute__((sentinel));
+void g() {
+ f("", NULL); // Shouldn't warn.
+}
diff --git a/test/Headers/xmmintrin.c b/test/Headers/xmmintrin.c
new file mode 100644
index 000000000000..c426f34d06ea
--- /dev/null
+++ b/test/Headers/xmmintrin.c
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 %s -ffreestanding -triple x86_64-apple-macosx10.9.0 -emit-llvm -o - | FileCheck %s
+
+#include <xmmintrin.h>
+
+// Make sure the last step of _mm_cvtps_pi16 converts <4 x i32> to <4 x i16> by
+// checking that clang emits PACKSSDW instead of PACKSSWB.
+
+// CHECK: define i64 @test_mm_cvtps_pi16
+// CHECK: call x86_mmx @llvm.x86.mmx.packssdw
+
+__m64 test_mm_cvtps_pi16(__m128 a) {
+ return _mm_cvtps_pi16(a);
+}
diff --git a/test/Index/Inputs/CommentXML/valid-function-02.xml b/test/Index/Inputs/CommentXML/valid-function-02.xml
index 989d6a7c143d..6a8c2425d64e 100644
--- a/test/Index/Inputs/CommentXML/valid-function-02.xml
+++ b/test/Index/Inputs/CommentXML/valid-function-02.xml
@@ -1,5 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Function>
<Name>aaa</Name>
-<Abstract><Para>Aaa <bold>bbb</bold> <monospaced>ccc</monospaced> <emphasized>ddd</emphasized>.</Para></Abstract>
+<Abstract>
+ <Para>Aaa
+ <bold>bbb</bold>
+ <monospaced>ccc</monospaced>
+ <emphasized>ddd</emphasized>
+ <rawHTML>&lt;eee&gt;</rawHTML>
+ <rawHTML isMalformed="0">&lt;fff&gt;</rawHTML>
+ <rawHTML isMalformed="1">&lt;ggg&gt;</rawHTML>.
+ </Para>
+</Abstract>
</Function>
diff --git a/test/Index/Inputs/Frameworks/DocCommentsA.framework/Headers/DocCommentsA.h b/test/Index/Inputs/Frameworks/DocCommentsA.framework/Headers/DocCommentsA.h
new file mode 100644
index 000000000000..d548f8196db5
--- /dev/null
+++ b/test/Index/Inputs/Frameworks/DocCommentsA.framework/Headers/DocCommentsA.h
@@ -0,0 +1,8 @@
+/// Comment for 'functionFromDocCommentsA1'.
+void functionFromDocCommentsA1(void);
+
+#import <DocCommentsC/DocCommentsC.h>
+
+/// Comment for 'functionFromDocCommentsA2'.
+void functionFromDocCommentsA2(void);
+
diff --git a/test/Index/Inputs/Frameworks/DocCommentsB.framework/Headers/DocCommentsB.h b/test/Index/Inputs/Frameworks/DocCommentsB.framework/Headers/DocCommentsB.h
new file mode 100644
index 000000000000..af279e3ce5f9
--- /dev/null
+++ b/test/Index/Inputs/Frameworks/DocCommentsB.framework/Headers/DocCommentsB.h
@@ -0,0 +1,7 @@
+/// Comment for 'functionFromDocCommentsB1'.
+void functionFromDocCommentsB1(void);
+
+#import <DocCommentsC/DocCommentsC.h>
+
+/// Comment for 'functionFromDocCommentsB2'.
+void functionFromDocCommentsB2(void);
diff --git a/test/Index/Inputs/Frameworks/DocCommentsC.framework/Headers/DocCommentsC.h b/test/Index/Inputs/Frameworks/DocCommentsC.framework/Headers/DocCommentsC.h
new file mode 100644
index 000000000000..db696a385e50
--- /dev/null
+++ b/test/Index/Inputs/Frameworks/DocCommentsC.framework/Headers/DocCommentsC.h
@@ -0,0 +1,2 @@
+/// Comment for 'functionFromDocCommentsC'.
+void functionFromDocCommentsC(void);
diff --git a/test/Index/Inputs/base_module_needs_vfs.h b/test/Index/Inputs/base_module_needs_vfs.h
new file mode 100644
index 000000000000..9a7a2445a86f
--- /dev/null
+++ b/test/Index/Inputs/base_module_needs_vfs.h
@@ -0,0 +1 @@
+void base_module_needs_vfs(void);
diff --git a/test/Index/Inputs/crash-recovery-code-complete-remap.c b/test/Index/Inputs/crash-recovery-code-complete-remap.c
index 50a86580a136..0cc2e894687b 100644
--- a/test/Index/Inputs/crash-recovery-code-complete-remap.c
+++ b/test/Index/Inputs/crash-recovery-code-complete-remap.c
@@ -1,11 +1,9 @@
// RUN: echo env CINDEXTEST_EDITING=1 \
// RUN: not c-index-test -test-load-source-reparse 1 local \
-// RUN: -remap-file="%s;%S/Inputs/crash-recovery-code-complete-remap.c" \
+// RUN: -remap-file="%s,%S/Inputs/crash-recovery-code-complete-remap.c" \
// RUN: %s 2> %t.err
// RUN: FileCheck < %t.err -check-prefix=CHECK-CODE-COMPLETE-CRASH %s
// CHECK-CODE-COMPLETE-CRASH: Unable to reparse translation unit
-//
-// XFAIL: win32
#warning parsing original file
diff --git a/test/Index/Inputs/module.map b/test/Index/Inputs/module.map
new file mode 100644
index 000000000000..8f24840c81f9
--- /dev/null
+++ b/test/Index/Inputs/module.map
@@ -0,0 +1,6 @@
+// See vfsoverlay.yaml
+module ModuleNeedsVFS {
+ header "ModuleNeedsVFS.h"
+ export *
+}
+framework module * { }
diff --git a/test/Index/Inputs/module_needs_vfs.h b/test/Index/Inputs/module_needs_vfs.h
new file mode 100644
index 000000000000..d79cc3f0d3ad
--- /dev/null
+++ b/test/Index/Inputs/module_needs_vfs.h
@@ -0,0 +1,4 @@
+@import BaseModuleNeedsVFS;
+inline void module_needs_vfs(void) {
+ base_module_needs_vfs();
+}
diff --git a/test/Index/Inputs/retain-comments-from-system-headers-module.map b/test/Index/Inputs/retain-comments-from-system-headers-module.map
new file mode 100644
index 000000000000..0b77f3c1abf5
--- /dev/null
+++ b/test/Index/Inputs/retain-comments-from-system-headers-module.map
@@ -0,0 +1,4 @@
+module retain_comments_from_system_headers {
+ header "retain-comments-from-system-headers.h"
+ export *
+}
diff --git a/test/Index/Inputs/usrs-system.h b/test/Index/Inputs/usrs-system.h
new file mode 100644
index 000000000000..dee4d832571d
--- /dev/null
+++ b/test/Index/Inputs/usrs-system.h
@@ -0,0 +1 @@
+#define MACRO_FROM_SYSTEM_HEADER_1 meow
diff --git a/test/Index/Inputs/vfsoverlay.yaml b/test/Index/Inputs/vfsoverlay.yaml
new file mode 100644
index 000000000000..95b00bef7d0e
--- /dev/null
+++ b/test/Index/Inputs/vfsoverlay.yaml
@@ -0,0 +1,18 @@
+{
+ 'version': 0,
+ 'roots': [
+ { 'name': 'OUT_DIR', 'type': 'directory',
+ 'contents': [
+ { 'name': 'module.map', 'type': 'file',
+ 'external-contents': 'INPUT_DIR/module.map'
+ },
+ { 'name': 'ModuleNeedsVFS.h', 'type': 'file',
+ 'external-contents': 'INPUT_DIR/module_needs_vfs.h'
+ },
+ { 'name': 'BaseModuleNeedsVFS.framework/Headers/BaseModuleNeedsVFS.h', 'type': 'file',
+ 'external-contents': 'INPUT_DIR/base_module_needs_vfs.h'
+ },
+ ]
+ }
+ ]
+}
diff --git a/test/Index/annotate-comments-objc.m b/test/Index/annotate-comments-objc.m
index e778d6c65e1c..a8eaa0b03880 100644
--- a/test/Index/annotate-comments-objc.m
+++ b/test/Index/annotate-comments-objc.m
@@ -3,6 +3,12 @@
#ifndef HEADER
#define HEADER
+/// Comment for 'functionBeforeImports'.
+void functionBeforeImports(void);
+
+#import <DocCommentsA/DocCommentsA.h>
+#import <DocCommentsB/DocCommentsB.h>
+
@class NSString;
//===---
@@ -21,25 +27,54 @@
/// method1_isdoxy1 IS_DOXYGEN_SINGLE
- (void)method1_isdoxy1;
-- (void)method1_isdoxy2; /*!< method1_isdoxy2 IS_DOXYGEN_SINGLE */
-- (void)method1_isdoxy3; /*!< method1_isdoxy3 IS_DOXYGEN_SINGLE */
+- (void)method1_isdoxy2; ///< method1_isdoxy2 IS_DOXYGEN_SINGLE
+- (void)method1_isdoxy3; /**< method1_isdoxy3 IS_DOXYGEN_SINGLE */
- (void)method1_isdoxy4; /*!< method1_isdoxy4 IS_DOXYGEN_SINGLE */
@end
+//===---
+// rdar://14348912
+// Check that we attach comments to enums declared using the NS_ENUM macro.
+//===---
+
+#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
+
+/// An_NS_ENUM_isdoxy1 IS_DOXYGEN_SINGLE
+typedef NS_ENUM(int, An_NS_ENUM_isdoxy1) { Red, Green, Blue };
+
+// In the implementation of attaching comments to enums declared using the
+// NS_ENUM macro, it is tempting to use the fact that enum decl is embedded in
+// the typedef. Make sure that the heuristic is strong enough that it does not
+// attach unrelated comments in the following cases where tag decls are
+// embedded in declarators.
+
+#define DECLARE_FUNCTION() \
+ void functionFromMacro() { \
+ typedef struct Struct_notdoxy Struct_notdoxy; \
+ }
+
+/// IS_DOXYGEN_NOT_ATTACHED
+DECLARE_FUNCTION()
+
+/// typedef_isdoxy1 IS_DOXYGEN_SINGLE
+typedef struct Struct_notdoxy *typedef_isdoxy1;
#endif
// RUN: rm -rf %t
// RUN: mkdir %t
+// RUN: mkdir %t/module-cache
// Check that we serialize comment source locations properly.
-// RUN: %clang_cc1 -emit-pch -o %t/out.pch %s
-// RUN: %clang_cc1 -include-pch %t/out.pch -fsyntax-only %s
+// RUN: %clang_cc1 -emit-pch -o %t/out.pch -F %S/Inputs/Frameworks %s
+// RUN: %clang_cc1 -include-pch %t/out.pch -F %S/Inputs/Frameworks -fsyntax-only %s
-// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s > %t/out.c-index-direct
-// RUN: c-index-test -test-load-tu %t/out.pch all > %t/out.c-index-pch
+// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s -F %S/Inputs/Frameworks > %t/out.c-index-direct
+// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s -F %S/Inputs/Frameworks -fmodules -fmodules-cache-path=%t/module-cache > %t/out.c-index-modules
+// RUN: c-index-test -test-load-tu %t/out.pch all -F %S/Inputs/Frameworks > %t/out.c-index-pch
// RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-direct
+// RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-modules
// RUN: FileCheck %s -check-prefix=WRONG < %t/out.c-index-pch
// Declarations without Doxygen comments should not pick up some Doxygen comments.
@@ -60,6 +95,7 @@
// WRONG-NOT: CommentXMLInvalid
// RUN: FileCheck %s < %t/out.c-index-direct
+// RUN: FileCheck %s < %t/out.c-index-modules
// RUN: FileCheck %s < %t/out.c-index-pch
// These CHECK lines are not located near the code on purpose. This test
@@ -67,12 +103,22 @@
// Adding a non-documentation comment with CHECK line between every two
// documentation comments will only test a single code path.
//
-// CHECK: annotate-comments-objc.m:17:50: ObjCPropertyDecl=property1_isdoxy1:{{.*}} property1_isdoxy1 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments-objc.m:18:50: ObjCPropertyDecl=property1_isdoxy2:{{.*}} property1_isdoxy2 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments-objc.m:19:50: ObjCPropertyDecl=property1_isdoxy3:{{.*}} property1_isdoxy3 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments-objc.m:20:50: ObjCPropertyDecl=property1_isdoxy4:{{.*}} property1_isdoxy4 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments-objc.m:23:9: ObjCInstanceMethodDecl=method1_isdoxy1:{{.*}} method1_isdoxy1 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments-objc.m:24:9: ObjCInstanceMethodDecl=method1_isdoxy2:{{.*}} method1_isdoxy2 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments-objc.m:25:9: ObjCInstanceMethodDecl=method1_isdoxy3:{{.*}} method1_isdoxy3 IS_DOXYGEN_SINGLE
-// CHECK: annotate-comments-objc.m:26:9: ObjCInstanceMethodDecl=method1_isdoxy4:{{.*}} method1_isdoxy4 IS_DOXYGEN_SINGLE
+// CHECK-DAG: annotate-comments-objc.m:7:6: FunctionDecl=functionBeforeImports:{{.*}} BriefComment=[Comment for 'functionBeforeImports'.]
+// CHECK-DAG: DocCommentsA.h:2:6: FunctionDecl=functionFromDocCommentsA1:{{.*}} BriefComment=[Comment for 'functionFromDocCommentsA1'.]
+// CHECK-DAG: DocCommentsA.h:7:6: FunctionDecl=functionFromDocCommentsA2:{{.*}} BriefComment=[Comment for 'functionFromDocCommentsA2'.]
+// CHECK-DAG: DocCommentsB.h:2:6: FunctionDecl=functionFromDocCommentsB1:{{.*}} BriefComment=[Comment for 'functionFromDocCommentsB1'.]
+// CHECK-DAG: DocCommentsB.h:7:6: FunctionDecl=functionFromDocCommentsB2:{{.*}} BriefComment=[Comment for 'functionFromDocCommentsB2'.]
+// CHECK-DAG: DocCommentsC.h:2:6: FunctionDecl=functionFromDocCommentsC:{{.*}} BriefComment=[Comment for 'functionFromDocCommentsC'.]
+// CHECK: annotate-comments-objc.m:23:50: ObjCPropertyDecl=property1_isdoxy1:{{.*}} property1_isdoxy1 IS_DOXYGEN_SINGLE
+// CHECK: annotate-comments-objc.m:24:50: ObjCPropertyDecl=property1_isdoxy2:{{.*}} property1_isdoxy2 IS_DOXYGEN_SINGLE
+// CHECK: annotate-comments-objc.m:25:50: ObjCPropertyDecl=property1_isdoxy3:{{.*}} property1_isdoxy3 IS_DOXYGEN_SINGLE
+// CHECK: annotate-comments-objc.m:26:50: ObjCPropertyDecl=property1_isdoxy4:{{.*}} property1_isdoxy4 IS_DOXYGEN_SINGLE
+// CHECK: annotate-comments-objc.m:29:9: ObjCInstanceMethodDecl=method1_isdoxy1:{{.*}} method1_isdoxy1 IS_DOXYGEN_SINGLE
+// CHECK: annotate-comments-objc.m:30:9: ObjCInstanceMethodDecl=method1_isdoxy2:{{.*}} method1_isdoxy2 IS_DOXYGEN_SINGLE
+// CHECK: annotate-comments-objc.m:31:9: ObjCInstanceMethodDecl=method1_isdoxy3:{{.*}} method1_isdoxy3 IS_DOXYGEN_SINGLE
+// CHECK: annotate-comments-objc.m:32:9: ObjCInstanceMethodDecl=method1_isdoxy4:{{.*}} method1_isdoxy4 IS_DOXYGEN_SINGLE
+// CHECK: annotate-comments-objc.m:43:22: EnumDecl=An_NS_ENUM_isdoxy1:{{.*}} An_NS_ENUM_isdoxy1 IS_DOXYGEN_SINGLE
+// CHECK: annotate-comments-objc.m:43:22: TypedefDecl=An_NS_ENUM_isdoxy1:{{.*}} An_NS_ENUM_isdoxy1 IS_DOXYGEN_SINGLE
+// CHECK: annotate-comments-objc.m:43:22: EnumDecl=An_NS_ENUM_isdoxy1:{{.*}} An_NS_ENUM_isdoxy1 IS_DOXYGEN_SINGLE
+// CHECK: annotate-comments-objc.m:60:32: TypedefDecl=typedef_isdoxy1:{{.*}} typedef_isdoxy1 IS_DOXYGEN_SINGLE
diff --git a/test/Index/annotate-comments-typedef.m b/test/Index/annotate-comments-typedef.m
index b23e53512c9d..751cfaab4931 100644
--- a/test/Index/annotate-comments-typedef.m
+++ b/test/Index/annotate-comments-typedef.m
@@ -45,5 +45,5 @@ struct Foo1 {
/** About Foo1T */
typedef struct Foo1 Foo1T;
// FIXME: we don't attach this comment to 'struct Foo1'
-// CHECK: TypedefDecl=Foo1T:[[@LINE-2]]:21 (Definition) {{.*}} FullCommentAsHTML=[<p class="para-brief"> About Foo1T </p>] FullCommentAsXML=[<Typedef file="{{[^"]+}}annotate-comments-typedef.m" line="[[@LINE-2]]" column="21"><Name>Foo1T</Name><USR>c:annotate-comments-typedef.m@{{[0-9]+}}@T@Foo1T</USR><Declaration>typedef struct Foo1 Foo1T</Declaration><Abstract><Para> About Foo1T </Para></Abstract></Typedef>]
+// CHECK: TypedefDecl=Foo1T:[[@LINE-2]]:21 (Definition) {{.*}} FullCommentAsHTML=[<p class="para-brief"> About Foo1T </p>] FullCommentAsXML=[<Typedef file="{{[^"]+}}annotate-comments-typedef.m" line="[[@LINE-2]]" column="21"><Name>Foo1T</Name><USR>c:annotate-comments-typedef.m@T@Foo1T</USR><Declaration>typedef struct Foo1 Foo1T</Declaration><Abstract><Para> About Foo1T </Para></Abstract></Typedef>]
diff --git a/test/Index/annotate-deep-statements.cpp b/test/Index/annotate-deep-statements.cpp
index 79f2d39ae526..c0a55f25e49d 100644
--- a/test/Index/annotate-deep-statements.cpp
+++ b/test/Index/annotate-deep-statements.cpp
@@ -4,13 +4,13 @@
// Check that we don't get stack overflow trying to annotate an extremely deep AST.
// AddressSanitizer increases stack usage.
-// XFAIL: asan
+// REQUIRES: not_asan
struct S {
S &operator()();
};
-// CHECK: Identifier: "foo" [11:6 - 11:9] FunctionDecl=foo:11:6 (Definition)
+// CHECK: Identifier: "foo" {{\[}}[[@LINE+1]]:6 - [[@LINE+1]]:9] FunctionDecl=foo:[[@LINE+1]]:6 (Definition)
void foo() {
S s;
s()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()
diff --git a/test/Index/annotate-module.m b/test/Index/annotate-module.m
index 55e21d235e7c..456a192f4253 100644
--- a/test/Index/annotate-module.m
+++ b/test/Index/annotate-module.m
@@ -44,6 +44,6 @@ int glob;
// RUN: c-index-test -cursor-at=%s:3:11 %s -fmodules-cache-path=%t.cache -fmodules -F %S/../Modules/Inputs \
// RUN: | FileCheck %s -check-prefix=CHECK-CURSOR
-// CHECK-CURSOR: 3:1 ModuleImport=DependsOnModule:3:1 (Definition) Extent=[3:1 - 3:24] Spelling=DependsOnModule ([3:9 - 3:24]) ModuleName=DependsOnModule ({{.*}}DependsOnModule.pcm) Headers(2):
+// CHECK-CURSOR: 3:1 ModuleImport=DependsOnModule:3:1 (Definition) Extent=[3:1 - 3:24] Spelling=DependsOnModule ([3:9 - 3:24]) ModuleName=DependsOnModule ({{.*}}DependsOnModule-{{[^.]*}}.pcm) system=0 Headers(2):
// CHECK-CURSOR-NEXT: {{.*}}other.h
// CHECK-CURSOR-NEXT: {{.*}}DependsOnModule.h
diff --git a/test/Index/annotate-tokens-cxx0x.cpp b/test/Index/annotate-tokens-cxx0x.cpp
index 4e6d156dfa9f..8992aff25234 100644
--- a/test/Index/annotate-tokens-cxx0x.cpp
+++ b/test/Index/annotate-tokens-cxx0x.cpp
@@ -83,14 +83,14 @@ void test2() {
// CHECK-WITH-OVERRIDE: Identifier: "foo" [19:15 - 19:18] CXXMethod=foo:19:15 (virtual)
// CHECK-WITH-OVERRIDE: Punctuation: "(" [19:18 - 19:19] CXXMethod=foo:19:15 (virtual)
// CHECK-WITH-OVERRIDE: Identifier: "Int" [19:19 - 19:22] TypeRef=Int:16:13
-// CHECK-WITH-OVERRIDE: Punctuation: ")" [19:22 - 19:23] ParmDecl=:19:22 (Definition)
+// CHECK-WITH-OVERRIDE: Punctuation: ")" [19:22 - 19:23] CXXMethod=foo:19:15 (virtual)
// CHECK-WITH-OVERRIDE: Punctuation: ";" [19:23 - 19:24] ClassDecl=B:18:7 (Definition)
// CHECK-WITH-OVERRIDE: Keyword: "virtual" [23:3 - 23:10] CXXMethod=foo:23:16 (virtual) [Overrides @19:15]
// CHECK-WITH-OVERRIDE: Keyword: "void" [23:11 - 23:15] CXXMethod=foo:23:16 (virtual) [Overrides @19:15]
// CHECK-WITH-OVERRIDE: Identifier: "foo" [23:16 - 23:19] CXXMethod=foo:23:16 (virtual) [Overrides @19:15]
// CHECK-WITH-OVERRIDE: Punctuation: "(" [23:19 - 23:20] CXXMethod=foo:23:16 (virtual) [Overrides @19:15]
// CHECK-WITH-OVERRIDE: Identifier: "Int" [23:20 - 23:23] TypeRef=Int:16:13
-// CHECK-WITH-OVERRIDE: Punctuation: ")" [23:23 - 23:24] ParmDecl=:23:23 (Definition)
+// CHECK-WITH-OVERRIDE: Punctuation: ")" [23:23 - 23:24] CXXMethod=foo:23:16 (virtual) [Overrides @19:15]
// CHECK-WITH-OVERRIDE: Keyword: "override" [23:25 - 23:33] attribute(override)=
// CHECK-WITH-OVERRIDE: Punctuation: ";" [23:33 - 23:34] ClassDecl=S:22:7 (Definition)
diff --git a/test/Index/annotate-tokens.cpp b/test/Index/annotate-tokens.cpp
index 16726547a2e2..460ab51dd959 100644
--- a/test/Index/annotate-tokens.cpp
+++ b/test/Index/annotate-tokens.cpp
@@ -28,7 +28,16 @@ struct TS {
template <bool (*tfn)(X*)>
void TS<tfn>::foo() {}
-// RUN: c-index-test -test-annotate-tokens=%s:1:1:30:1 %s -fno-delayed-template-parsing | FileCheck %s
+void test4() {
+ if (int p = 0)
+ return;
+}
+
+class C {
+ ~C();
+};
+
+// RUN: c-index-test -test-annotate-tokens=%s:1:1:38:1 %s -fno-delayed-template-parsing | FileCheck %s
// CHECK: Keyword: "struct" [1:1 - 1:7] StructDecl=bonk:1:8 (Definition)
// CHECK: Identifier: "bonk" [1:8 - 1:12] StructDecl=bonk:1:8 (Definition)
// CHECK: Punctuation: "{" [1:13 - 1:14] StructDecl=bonk:1:8 (Definition)
@@ -66,8 +75,8 @@ void TS<tfn>::foo() {}
// CHECK: Keyword: "operator" [9:5 - 9:13] CXXMethod=operator++:9:5
// CHECK: Punctuation: "++" [9:13 - 9:15] CXXMethod=operator++:9:5
// CHECK: Punctuation: "(" [9:15 - 9:16] CXXMethod=operator++:9:5
-// CHECK: Keyword: "int" [9:16 - 9:19] ParmDecl=:9:19 (Definition)
-// CHECK: Punctuation: ")" [9:19 - 9:20] ParmDecl=:9:19 (Definition)
+// CHECK: Keyword: "int" [9:16 - 9:19] ParmDecl=:9:19 (Definition
+// CHECK: Punctuation: ")" [9:19 - 9:20] CXXMethod=operator++:9:5
// CHECK: Punctuation: ";" [9:20 - 9:21] StructDecl=X:7:8 (Definition)
// CHECK: Punctuation: "}" [10:1 - 10:2] StructDecl=X:7:8 (Definition)
// CHECK: Punctuation: ";" [10:2 - 10:3]
@@ -138,7 +147,7 @@ void TS<tfn>::foo() {}
// CHECK: Punctuation: "(" [23:22 - 23:23] NonTypeTemplateParameter=tfn:23:18 (Definition)
// CHECK: Identifier: "X" [23:23 - 23:24] TypeRef=struct X:7:8
// CHECK: Punctuation: "*" [23:24 - 23:25] ParmDecl=:23:25 (Definition)
-// CHECK: Punctuation: ")" [23:25 - 23:26] ParmDecl=:23:25 (Definition)
+// CHECK: Punctuation: ")" [23:25 - 23:26] NonTypeTemplateParameter=tfn:23:18 (Definition)
// CHECK: Punctuation: ">" [23:26 - 23:27] ClassTemplate=TS:24:8 (Definition)
// CHECK: Keyword: "struct" [24:1 - 24:7] ClassTemplate=TS:24:8 (Definition)
// CHECK: Identifier: "TS" [24:8 - 24:10] ClassTemplate=TS:24:8 (Definition)
@@ -160,7 +169,7 @@ void TS<tfn>::foo() {}
// CHECK: Punctuation: "(" [28:22 - 28:23] NonTypeTemplateParameter=tfn:28:18 (Definition)
// CHECK: Identifier: "X" [28:23 - 28:24] TypeRef=struct X:7:8
// CHECK: Punctuation: "*" [28:24 - 28:25] ParmDecl=:28:25 (Definition)
-// CHECK: Punctuation: ")" [28:25 - 28:26] ParmDecl=:28:25 (Definition)
+// CHECK: Punctuation: ")" [28:25 - 28:26] NonTypeTemplateParameter=tfn:28:18 (Definition)
// CHECK: Punctuation: ">" [28:26 - 28:27] CXXMethod=foo:29:15 (Definition)
// CHECK: Keyword: "void" [29:1 - 29:5] CXXMethod=foo:29:15 (Definition)
// CHECK: Identifier: "TS" [29:6 - 29:8] TemplateRef=TS:24:8
@@ -173,3 +182,12 @@ void TS<tfn>::foo() {}
// CHECK: Punctuation: ")" [29:19 - 29:20] CXXMethod=foo:29:15 (Definition)
// CHECK: Punctuation: "{" [29:21 - 29:22] CompoundStmt=
// CHECK: Punctuation: "}" [29:22 - 29:23] CompoundStmt=
+// CHECK: Punctuation: "~" [37:3 - 37:4] CXXDestructor=~C:37:3
+// CHECK: Identifier: "C" [37:4 - 37:5] CXXDestructor=~C:37:3
+
+// RUN: env LIBCLANG_DISABLE_CRASH_RECOVERY=1 c-index-test -test-annotate-tokens=%s:32:1:32:13 %s | FileCheck %s -check-prefix=CHECK2
+// CHECK2: Keyword: "if" [32:3 - 32:5] IfStmt=
+// CHECK2: Punctuation: "(" [32:6 - 32:7] IfStmt=
+// CHECK2: Keyword: "int" [32:7 - 32:10] VarDecl=p:32:11 (Definition)
+// CHECK2: Identifier: "p" [32:11 - 32:12] VarDecl=p:32:11 (Definition)
+// CHECK2: Punctuation: "=" [32:13 - 32:14] VarDecl=p:32:11 (Definition)
diff --git a/test/Index/attributes-cuda.cu b/test/Index/attributes-cuda.cu
new file mode 100644
index 000000000000..953ef3d51fee
--- /dev/null
+++ b/test/Index/attributes-cuda.cu
@@ -0,0 +1,15 @@
+// RUN: c-index-test -test-load-source all -x cuda %s | FileCheck %s
+
+__attribute__((device)) void f_device();
+__attribute__((global)) void f_global();
+__attribute__((constant)) int* g_constant;
+__attribute__((host)) void f_host();
+
+// CHECK: attributes-cuda.cu:3:30: FunctionDecl=f_device:3:30
+// CHECK-NEXT: attributes-cuda.cu:3:16: attribute(device)
+// CHECK: attributes-cuda.cu:4:30: FunctionDecl=f_global:4:30
+// CHECK-NEXT: attributes-cuda.cu:4:16: attribute(global)
+// CHECK: attributes-cuda.cu:5:32: VarDecl=g_constant:5:32 (Definition)
+// CHECK-NEXT: attributes-cuda.cu:5:16: attribute(constant)
+// CHECK: attributes-cuda.cu:6:28: FunctionDecl=f_host:6:28
+// CHECK-NEXT: attributes-cuda.cu:6:16: attribute(host)
diff --git a/test/Index/attributes.c b/test/Index/attributes.c
index 3e60e6c0e495..95d9c7548bd7 100644
--- a/test/Index/attributes.c
+++ b/test/Index/attributes.c
@@ -4,7 +4,17 @@ struct __attribute__((packed)) Test2 {
char a;
};
+void pure_fn() __attribute__((pure));
+void const_fn() __attribute__((const));
+void noduplicate_fn() __attribute__((noduplicate));
+
// CHECK: attributes.c:3:32: StructDecl=Test2:3:32 (Definition) Extent=[3:1 - 5:2]
// CHECK: attributes.c:3:23: attribute(packed)=packed Extent=[3:23 - 3:29]
// CHECK: attributes.c:4:8: FieldDecl=a:4:8 (Definition) Extent=[4:3 - 4:9] [access=public]
+// CHECK: attributes.c:7:6: FunctionDecl=pure_fn:7:6 Extent=[7:1 - 7:37]
+// CHECK: attributes.c:7:31: attribute(pure)= Extent=[7:31 - 7:35]
+// CHECK: attributes.c:8:6: FunctionDecl=const_fn:8:6 Extent=[8:1 - 8:39]
+// CHECK: attributes.c:8:32: attribute(const)= Extent=[8:32 - 8:37]
+// CHECK: attributes.c:9:6: FunctionDecl=noduplicate_fn:9:6 Extent=[9:1 - 9:51]
+// CHECK: attributes.c:9:38: attribute(noduplicate)= Extent=[9:38 - 9:49]
diff --git a/test/Index/comment-cplus-decls.cpp b/test/Index/comment-cplus-decls.cpp
index de1c2c522624..002482ed0f35 100644
--- a/test/Index/comment-cplus-decls.cpp
+++ b/test/Index/comment-cplus-decls.cpp
@@ -42,7 +42,7 @@ protected:
// CHECK: <Declaration>class Test {}</Declaration>
// CHECK: <Declaration>Test() : reserved(new Test::data())</Declaration>
// CHECK: <Declaration>unsigned int getID() const</Declaration>
-// CHECK: <Declaration>void ~Test()</Declaration>
+// CHECK: <Declaration>~Test()</Declaration>
// CHECK: <Declaration>Test::data *reserved</Declaration>
diff --git a/test/Index/comment-cplus-template-decls.cpp b/test/Index/comment-cplus-template-decls.cpp
index 039f092a6280..7ef09bd691b1 100644
--- a/test/Index/comment-cplus-template-decls.cpp
+++ b/test/Index/comment-cplus-template-decls.cpp
@@ -27,7 +27,7 @@ template<typename T> struct A {
};
// CHECK: <Declaration>template &lt;typename T&gt; struct A {}</Declaration>
// CHECK: <Declaration>A&lt;T&gt;()</Declaration>
-// CHECK: <Declaration>void ~A&lt;T&gt;()</Declaration>
+// CHECK: <Declaration>~A&lt;T&gt;()</Declaration>
/**
* \Brief Eee
@@ -67,3 +67,18 @@ void func_template_1(T AAA);
template<template<template<typename CCC> class DDD, class BBB> class AAA>
void func_template_2();
// FIXME: There is not Declaration field in the generated output.
+
+namespace rdar16128173 {
+// CHECK: <Declaration>template &lt;class PtrTy&gt; class OpaquePtr {}</Declaration>
+
+/// \brief Wrapper for void* pointer.
+/// \tparam PtrTy Either a pointer type like 'T*' or a type that behaves like
+/// a pointer.
+template <class PtrTy>
+class OpaquePtr {};
+
+// CHECK: <Declaration>typedef OpaquePtr&lt;int&gt; DeclGroupPtrTy</Declaration>
+typedef OpaquePtr<int> DeclGroupPtrTy;
+
+DeclGroupPtrTy blah;
+}
diff --git a/test/Index/comment-to-html-xml-conversion.cpp b/test/Index/comment-to-html-xml-conversion.cpp
index 8c0ed21b2f04..95e11c3bc348 100644
--- a/test/Index/comment-to-html-xml-conversion.cpp
+++ b/test/Index/comment-to-html-xml-conversion.cpp
@@ -25,19 +25,23 @@
#ifndef HEADER
#define HEADER
+//===---
+// Tests for \brief and its aliases.
+//===---
+
/// Aaa.
-void comment_to_html_conversion_1();
+void test_cmd_brief_like_1();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_1:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_1</Name><USR>c:@F@comment_to_html_conversion_1#</USR><Declaration>void comment_to_html_conversion_1()</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_brief_like_1:{{.*}} BriefComment=[Aaa.] FullCommentAsHTML=[<p class="para-brief"> Aaa.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_brief_like_1</Name><USR>c:@F@test_cmd_brief_like_1#</USR><Declaration>void test_cmd_brief_like_1()</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph
// CHECK-NEXT: (CXComment_Text Text=[ Aaa.])))]
/// \brief Aaa.
-void comment_to_html_conversion_2();
+void test_cmd_brief_like_2();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_2:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_2</Name><USR>c:@F@comment_to_html_conversion_2#</USR><Declaration>void comment_to_html_conversion_2()</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_brief_like_2:{{.*}} BriefComment=[Aaa.] FullCommentAsHTML=[<p class="para-brief"> Aaa.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_brief_like_2</Name><USR>c:@F@test_cmd_brief_like_2#</USR><Declaration>void test_cmd_brief_like_2()</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
@@ -47,9 +51,9 @@ void comment_to_html_conversion_2();
// CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))))]
/// \short Aaa.
-void comment_to_html_conversion_3();
+void test_cmd_brief_like_3();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_3:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_3</Name><USR>c:@F@comment_to_html_conversion_3#</USR><Declaration>void comment_to_html_conversion_3()</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_brief_like_3:{{.*}} BriefComment=[Aaa.] FullCommentAsHTML=[<p class="para-brief"> Aaa.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_brief_like_3</Name><USR>c:@F@test_cmd_brief_like_3#</USR><Declaration>void test_cmd_brief_like_3()</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
@@ -61,9 +65,9 @@ void comment_to_html_conversion_3();
/// Aaa.
///
/// \brief Bbb.
-void comment_to_html_conversion_4();
+void test_cmd_brief_like_4();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_4:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Bbb.</p><p> Aaa.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_4</Name><USR>c:@F@comment_to_html_conversion_4#</USR><Declaration>void comment_to_html_conversion_4()</Declaration><Abstract><Para> Bbb.</Para></Abstract><Discussion><Para> Aaa.</Para></Discussion></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_brief_like_4:{{.*}} BriefComment=[Bbb.] FullCommentAsHTML=[<p class="para-brief"> Bbb.</p><p> Aaa.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_brief_like_4</Name><USR>c:@F@test_cmd_brief_like_4#</USR><Declaration>void test_cmd_brief_like_4()</Declaration><Abstract><Para> Bbb.</Para></Abstract><Discussion><Para> Aaa.</Para></Discussion></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph
@@ -79,9 +83,9 @@ void comment_to_html_conversion_4();
/// \brief Bbb.
///
/// Ccc.
-void comment_to_html_conversion_5();
+void test_cmd_brief_like_5();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_5:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Bbb.</p><p> Aaa.</p><p> Ccc.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_5</Name><USR>c:@F@comment_to_html_conversion_5#</USR><Declaration>void comment_to_html_conversion_5()</Declaration><Abstract><Para> Bbb.</Para></Abstract><Discussion><Para> Aaa.</Para><Para> Ccc.</Para></Discussion></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_brief_like_5:{{.*}} BriefComment=[Bbb.] FullCommentAsHTML=[<p class="para-brief"> Bbb.</p><p> Aaa.</p><p> Ccc.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_brief_like_5</Name><USR>c:@F@test_cmd_brief_like_5#</USR><Declaration>void test_cmd_brief_like_5()</Declaration><Abstract><Para> Bbb.</Para></Abstract><Discussion><Para> Aaa.</Para><Para> Ccc.</Para></Discussion></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph
@@ -96,9 +100,9 @@ void comment_to_html_conversion_5();
/// \brief Aaa.
/// \brief Bbb.
-void comment_to_html_conversion_6();
+void test_cmd_brief_like_6();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_6:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa. </p><p class="para-brief"> Bbb.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_6</Name><USR>c:@F@comment_to_html_conversion_6#</USR><Declaration>void comment_to_html_conversion_6()</Declaration><Abstract><Para> Aaa. </Para></Abstract><Discussion><Para> Bbb.</Para></Discussion></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_brief_like_6:{{.*}} BriefComment=[Bbb.] FullCommentAsHTML=[<p class="para-brief"> Aaa. </p><p class="para-brief"> Bbb.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_brief_like_6</Name><USR>c:@F@test_cmd_brief_like_6#</USR><Declaration>void test_cmd_brief_like_6()</Declaration><Abstract><Para> Aaa. </Para></Abstract><Discussion><Para> Bbb.</Para></Discussion></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
@@ -111,12 +115,32 @@ void comment_to_html_conversion_6();
// CHECK-NEXT: (CXComment_Paragraph
// CHECK-NEXT: (CXComment_Text Text=[ Bbb.]))))]
+/// \abstract Aaa.
+///
+/// Bbb.
+void test_cmd_brief_like_7();
+
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_brief_like_7:{{.*}} BriefComment=[Aaa.] FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><p> Bbb.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_brief_like_7</Name><USR>c:@F@test_cmd_brief_like_7#</USR><Declaration>void test_cmd_brief_like_7()</Declaration><Abstract><Para> Aaa.</Para></Abstract><Discussion><Para> Bbb.</Para></Discussion></Function>]
+// CHECK-NEXT: CommentAST=[
+// CHECK-NEXT: (CXComment_FullComment
+// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
+// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace))
+// CHECK-NEXT: (CXComment_BlockCommand CommandName=[abstract]
+// CHECK-NEXT: (CXComment_Paragraph
+// CHECK-NEXT: (CXComment_Text Text=[ Aaa.])))
+// CHECK-NEXT: (CXComment_Paragraph
+// CHECK-NEXT: (CXComment_Text Text=[ Bbb.])))]
+
+//===---
+// Tests for \returns and its aliases.
+//===---
+
/// Aaa.
///
/// \return Bbb.
-void comment_to_html_conversion_7();
+void test_cmd_returns_like_1();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_7:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><div class="result-discussion"><p class="para-returns"><span class="word-returns">Returns</span> Bbb.</p></div>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_7</Name><USR>c:@F@comment_to_html_conversion_7#</USR><Declaration>void comment_to_html_conversion_7()</Declaration><Abstract><Para> Aaa.</Para></Abstract><ResultDiscussion><Para> Bbb.</Para></ResultDiscussion></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_returns_like_1:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><div class="result-discussion"><p class="para-returns"><span class="word-returns">Returns</span> Bbb.</p></div>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_returns_like_1</Name><USR>c:@F@test_cmd_returns_like_1#</USR><Declaration>void test_cmd_returns_like_1()</Declaration><Abstract><Para> Aaa.</Para></Abstract><ResultDiscussion><Para> Bbb.</Para></ResultDiscussion></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
@@ -131,9 +155,9 @@ void comment_to_html_conversion_7();
/// Aaa.
///
/// \returns Bbb.
-void comment_to_html_conversion_8();
+void test_cmd_returns_like_2();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_8:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><div class="result-discussion"><p class="para-returns"><span class="word-returns">Returns</span> Bbb.</p></div>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_8</Name><USR>c:@F@comment_to_html_conversion_8#</USR><Declaration>void comment_to_html_conversion_8()</Declaration><Abstract><Para> Aaa.</Para></Abstract><ResultDiscussion><Para> Bbb.</Para></ResultDiscussion></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_returns_like_2:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><div class="result-discussion"><p class="para-returns"><span class="word-returns">Returns</span> Bbb.</p></div>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_returns_like_2</Name><USR>c:@F@test_cmd_returns_like_2#</USR><Declaration>void test_cmd_returns_like_2()</Declaration><Abstract><Para> Aaa.</Para></Abstract><ResultDiscussion><Para> Bbb.</Para></ResultDiscussion></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph
@@ -147,9 +171,9 @@ void comment_to_html_conversion_8();
/// Aaa.
///
/// \result Bbb.
-void comment_to_html_conversion_9();
+void test_cmd_returns_like_3();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_9:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><div class="result-discussion"><p class="para-returns"><span class="word-returns">Returns</span> Bbb.</p></div>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_9</Name><USR>c:@F@comment_to_html_conversion_9#</USR><Declaration>void comment_to_html_conversion_9()</Declaration><Abstract><Para> Aaa.</Para></Abstract><ResultDiscussion><Para> Bbb.</Para></ResultDiscussion></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_returns_like_3:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><div class="result-discussion"><p class="para-returns"><span class="word-returns">Returns</span> Bbb.</p></div>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_returns_like_3</Name><USR>c:@F@test_cmd_returns_like_3#</USR><Declaration>void test_cmd_returns_like_3()</Declaration><Abstract><Para> Aaa.</Para></Abstract><ResultDiscussion><Para> Bbb.</Para></ResultDiscussion></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph
@@ -162,9 +186,9 @@ void comment_to_html_conversion_9();
/// \returns Aaa.
/// \returns Bbb.
-void comment_to_html_conversion_10();
+void test_cmd_returns_like_4();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_10:{{.*}} FullCommentAsHTML=[<div class="result-discussion"><p class="para-returns"><span class="word-returns">Returns</span> Aaa. </p><p class="para-returns"><span class="word-returns">Returns</span> Bbb.</p></div>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_10</Name><USR>c:@F@comment_to_html_conversion_10#</USR><Declaration>void comment_to_html_conversion_10()</Declaration><ResultDiscussion><Para> Aaa. </Para><Para> Bbb.</Para></ResultDiscussion></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_returns_like_4:{{.*}} FullCommentAsHTML=[<div class="result-discussion"><p class="para-returns"><span class="word-returns">Returns</span> Aaa. </p><p class="para-returns"><span class="word-returns">Returns</span> Bbb.</p></div>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_returns_like_4</Name><USR>c:@F@test_cmd_returns_like_4#</USR><Declaration>void test_cmd_returns_like_4()</Declaration><ResultDiscussion><Para> Aaa. </Para><Para> Bbb.</Para></ResultDiscussion></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
@@ -182,9 +206,9 @@ void comment_to_html_conversion_10();
/// Bbb.
///
/// \returns Ccc.
-void comment_to_html_conversion_11();
+void test_cmd_returns_like_5();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_11:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><p> Bbb.</p><div class="result-discussion"><p class="para-returns"><span class="word-returns">Returns</span> Ccc.</p></div>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_11</Name><USR>c:@F@comment_to_html_conversion_11#</USR><Declaration>void comment_to_html_conversion_11()</Declaration><Abstract><Para> Aaa.</Para></Abstract><ResultDiscussion><Para> Ccc.</Para></ResultDiscussion><Discussion><Para> Bbb.</Para></Discussion></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_returns_like_5:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><p> Bbb.</p><div class="result-discussion"><p class="para-returns"><span class="word-returns">Returns</span> Ccc.</p></div>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_returns_like_5</Name><USR>c:@F@test_cmd_returns_like_5#</USR><Declaration>void test_cmd_returns_like_5()</Declaration><Abstract><Para> Aaa.</Para></Abstract><ResultDiscussion><Para> Ccc.</Para></ResultDiscussion><Discussion><Para> Bbb.</Para></Discussion></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph
@@ -197,10 +221,14 @@ void comment_to_html_conversion_11();
// CHECK-NEXT: (CXComment_Paragraph
// CHECK-NEXT: (CXComment_Text Text=[ Ccc.]))))]
+//===---
+// Tests for \param.
+//===---
+
/// \param
-void comment_to_html_conversion_12(int x1);
+void test_cmd_param_1(int x1);
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_12:{{.*}} FullCommentAsHTML=[] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_12</Name><USR>c:@F@comment_to_html_conversion_12#I#</USR><Declaration>void comment_to_html_conversion_12(int x1)</Declaration></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_param_1:{{.*}} FullCommentAsHTML=[] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_param_1</Name><USR>c:@F@test_cmd_param_1#I#</USR><Declaration>void test_cmd_param_1(int x1)</Declaration></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
@@ -209,9 +237,9 @@ void comment_to_html_conversion_12(int x1);
// CHECK-NEXT: (CXComment_Paragraph IsWhitespace)))]
/// \param x1 Aaa.
-void comment_to_html_conversion_13(int x1);
+void test_cmd_param_2(int x1);
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_13:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">x1</dt><dd class="param-descr-index-0"> Aaa.</dd></dl>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_13</Name><USR>c:@F@comment_to_html_conversion_13#I#</USR><Declaration>void comment_to_html_conversion_13(int x1)</Declaration><Parameters><Parameter><Name>x1</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Aaa.</Para></Discussion></Parameter></Parameters></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_param_2:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">x1</dt><dd class="param-descr-index-0"> Aaa.</dd></dl>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_param_2</Name><USR>c:@F@test_cmd_param_2#I#</USR><Declaration>void test_cmd_param_2(int x1)</Declaration><Parameters><Parameter><Name>x1</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Aaa.</Para></Discussion></Parameter></Parameters></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
@@ -221,9 +249,9 @@ void comment_to_html_conversion_13(int x1);
// CHECK-NEXT: (CXComment_Text Text=[ Aaa.]))))]
/// \param zzz Aaa.
-void comment_to_html_conversion_14(int x1);
+void test_cmd_param_3(int x1);
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_14:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-invalid">zzz</dt><dd class="param-descr-index-invalid"> Aaa.</dd></dl>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_14</Name><USR>c:@F@comment_to_html_conversion_14#I#</USR><Declaration>void comment_to_html_conversion_14(int x1)</Declaration><Parameters><Parameter><Name>zzz</Name><Direction isExplicit="0">in</Direction><Discussion><Para> Aaa.</Para></Discussion></Parameter></Parameters></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_param_3:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-invalid">zzz</dt><dd class="param-descr-index-invalid"> Aaa.</dd></dl>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_param_3</Name><USR>c:@F@test_cmd_param_3#I#</USR><Declaration>void test_cmd_param_3(int x1)</Declaration><Parameters><Parameter><Name>zzz</Name><Direction isExplicit="0">in</Direction><Discussion><Para> Aaa.</Para></Discussion></Parameter></Parameters></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
@@ -234,9 +262,9 @@ void comment_to_html_conversion_14(int x1);
/// \param x2 Bbb.
/// \param x1 Aaa.
-void comment_to_html_conversion_15(int x1, int x2);
+void test_cmd_param_4(int x1, int x2);
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_15:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">x1</dt><dd class="param-descr-index-0"> Aaa.</dd><dt class="param-name-index-1">x2</dt><dd class="param-descr-index-1"> Bbb. </dd></dl>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_15</Name><USR>c:@F@comment_to_html_conversion_15#I#I#</USR><Declaration>void comment_to_html_conversion_15(int x1, int x2)</Declaration><Parameters><Parameter><Name>x1</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Aaa.</Para></Discussion></Parameter><Parameter><Name>x2</Name><Index>1</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Bbb. </Para></Discussion></Parameter></Parameters></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_param_4:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">x1</dt><dd class="param-descr-index-0"> Aaa.</dd><dt class="param-name-index-1">x2</dt><dd class="param-descr-index-1"> Bbb. </dd></dl>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_param_4</Name><USR>c:@F@test_cmd_param_4#I#I#</USR><Declaration>void test_cmd_param_4(int x1, int x2)</Declaration><Parameters><Parameter><Name>x1</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Aaa.</Para></Discussion></Parameter><Parameter><Name>x2</Name><Index>1</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Bbb. </Para></Discussion></Parameter></Parameters></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
@@ -252,9 +280,9 @@ void comment_to_html_conversion_15(int x1, int x2);
/// \param x2 Bbb.
/// \param zzz Aaa.
/// \param x1 Aaa.
-void comment_to_html_conversion_16(int x1, int x2);
+void test_cmd_param_5(int x1, int x2);
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_16:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">x1</dt><dd class="param-descr-index-0"> Aaa.</dd><dt class="param-name-index-1">x2</dt><dd class="param-descr-index-1"> Bbb. </dd><dt class="param-name-index-invalid">zzz</dt><dd class="param-descr-index-invalid"> Aaa. </dd></dl>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_16</Name><USR>c:@F@comment_to_html_conversion_16#I#I#</USR><Declaration>void comment_to_html_conversion_16(int x1, int x2)</Declaration><Parameters><Parameter><Name>x1</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Aaa.</Para></Discussion></Parameter><Parameter><Name>x2</Name><Index>1</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Bbb. </Para></Discussion></Parameter><Parameter><Name>zzz</Name><Direction isExplicit="0">in</Direction><Discussion><Para> Aaa. </Para></Discussion></Parameter></Parameters></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_param_5:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">x1</dt><dd class="param-descr-index-0"> Aaa.</dd><dt class="param-name-index-1">x2</dt><dd class="param-descr-index-1"> Bbb. </dd><dt class="param-name-index-invalid">zzz</dt><dd class="param-descr-index-invalid"> Aaa. </dd></dl>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_param_5</Name><USR>c:@F@test_cmd_param_5#I#I#</USR><Declaration>void test_cmd_param_5(int x1, int x2)</Declaration><Parameters><Parameter><Name>x1</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Aaa.</Para></Discussion></Parameter><Parameter><Name>x2</Name><Index>1</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Bbb. </Para></Discussion></Parameter><Parameter><Name>zzz</Name><Direction isExplicit="0">in</Direction><Discussion><Para> Aaa. </Para></Discussion></Parameter></Parameters></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
@@ -273,9 +301,9 @@ void comment_to_html_conversion_16(int x1, int x2);
/// \param x1 Aaa.
/// \param ... Bbb.
-void comment_to_html_conversion_17(int x1, ...);
+void test_cmd_param_6(int x1, ...);
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_17:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">x1</dt><dd class="param-descr-index-0"> Aaa. </dd><dt class="param-name-index-vararg">...</dt><dd class="param-descr-index-vararg"> Bbb.</dd></dl>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_17</Name><USR>c:@F@comment_to_html_conversion_17#I.#</USR><Declaration>void comment_to_html_conversion_17(int x1, ...)</Declaration><Parameters><Parameter><Name>x1</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Aaa. </Para></Discussion></Parameter><Parameter><Name>...</Name><IsVarArg /><Direction isExplicit="0">in</Direction><Discussion><Para> Bbb.</Para></Discussion></Parameter></Parameters></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_cmd_param_6:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">x1</dt><dd class="param-descr-index-0"> Aaa. </dd><dt class="param-name-index-vararg">...</dt><dd class="param-descr-index-vararg"> Bbb.</dd></dl>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_param_6</Name><USR>c:@F@test_cmd_param_6#I.#</USR><Declaration>void test_cmd_param_6(int x1, ...)</Declaration><Parameters><Parameter><Name>x1</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Aaa. </Para></Discussion></Parameter><Parameter><Name>...</Name><IsVarArg /><Direction isExplicit="0">in</Direction><Discussion><Para> Bbb.</Para></Discussion></Parameter></Parameters></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
@@ -286,14 +314,18 @@ void comment_to_html_conversion_17(int x1, ...);
// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)))
// CHECK-NEXT: (CXComment_ParamCommand in implicitly ParamName=[...] ParamIndex=4294967295
// CHECK-NEXT: (CXComment_Paragraph
-// CHECK-NEXT: (CXComment_Text Text=[ Bbb.]))))] Extent=[276:1 - 276:48]
+// CHECK-NEXT: (CXComment_Text Text=[ Bbb.]))))]
+
+//===---
+// Tests for \tparam.
+//===---
/// \tparam
/// \param aaa Blah blah
template<typename T>
-void comment_to_html_conversion_18(T aaa);
+void test_cmd_tparam_1(T aaa);
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=comment_to_html_conversion_18:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">aaa</dt><dd class="param-descr-index-0"> Blah blah</dd></dl>] FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_18</Name><USR>c:@FT@&gt;1#Tcomment_to_html_conversion_18#t0.0#</USR><Declaration>template &lt;typename T&gt; void comment_to_html_conversion_18(T aaa)</Declaration><Parameters><Parameter><Name>aaa</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Blah blah</Para></Discussion></Parameter></Parameters></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=test_cmd_tparam_1:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">aaa</dt><dd class="param-descr-index-0"> Blah blah</dd></dl>] FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_tparam_1</Name><USR>c:@FT@&gt;1#Ttest_cmd_tparam_1#t0.0#</USR><Declaration>template &lt;typename T&gt; void test_cmd_tparam_1(T aaa)</Declaration><Parameters><Parameter><Name>aaa</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Blah blah</Para></Discussion></Parameter></Parameters></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
@@ -308,9 +340,9 @@ void comment_to_html_conversion_18(T aaa);
/// \tparam T
/// \param aaa Blah blah
template<typename T>
-void comment_to_html_conversion_19(T aaa);
+void test_cmd_tparam_2(T aaa);
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=comment_to_html_conversion_19:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">aaa</dt><dd class="param-descr-index-0"> Blah blah</dd></dl>] FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_19</Name><USR>c:@FT@&gt;1#Tcomment_to_html_conversion_19#t0.0#</USR><Declaration>template &lt;typename T&gt; void comment_to_html_conversion_19(T aaa)</Declaration><Parameters><Parameter><Name>aaa</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Blah blah</Para></Discussion></Parameter></Parameters></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=test_cmd_tparam_2:{{.*}} FullCommentAsHTML=[<dl><dt class="param-name-index-0">aaa</dt><dd class="param-descr-index-0"> Blah blah</dd></dl>] FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_tparam_2</Name><USR>c:@FT@&gt;1#Ttest_cmd_tparam_2#t0.0#</USR><Declaration>template &lt;typename T&gt; void test_cmd_tparam_2(T aaa)</Declaration><Parameters><Parameter><Name>aaa</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Blah blah</Para></Discussion></Parameter></Parameters></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
@@ -325,9 +357,9 @@ void comment_to_html_conversion_19(T aaa);
/// \tparam T2 Bbb
/// \tparam T1 Aaa
template<typename T1, typename T2>
-void comment_to_html_conversion_20(T1 aaa, T2 bbb);
+void test_cmd_tparam_3(T1 aaa, T2 bbb);
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=comment_to_html_conversion_20:{{.*}} FullCommentAsHTML=[<dl><dt class="tparam-name-index-0">T1</dt><dd class="tparam-descr-index-0"> Aaa</dd><dt class="tparam-name-index-1">T2</dt><dd class="tparam-descr-index-1"> Bbb </dd></dl>] FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_20</Name><USR>c:@FT@&gt;2#T#Tcomment_to_html_conversion_20#t0.0#t0.1#</USR><Declaration>template &lt;typename T1, typename T2&gt;\nvoid comment_to_html_conversion_20(T1 aaa, T2 bbb)</Declaration><TemplateParameters><Parameter><Name>T1</Name><Index>0</Index><Discussion><Para> Aaa</Para></Discussion></Parameter><Parameter><Name>T2</Name><Index>1</Index><Discussion><Para> Bbb </Para></Discussion></Parameter></TemplateParameters></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=test_cmd_tparam_3:{{.*}} FullCommentAsHTML=[<dl><dt class="tparam-name-index-0">T1</dt><dd class="tparam-descr-index-0"> Aaa</dd><dt class="tparam-name-index-1">T2</dt><dd class="tparam-descr-index-1"> Bbb </dd></dl>] FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_tparam_3</Name><USR>c:@FT@&gt;2#T#Ttest_cmd_tparam_3#t0.0#t0.1#</USR><Declaration>template &lt;typename T1, typename T2&gt; void test_cmd_tparam_3(T1 aaa, T2 bbb)</Declaration><TemplateParameters><Parameter><Name>T1</Name><Index>0</Index><Discussion><Para> Aaa</Para></Discussion></Parameter><Parameter><Name>T2</Name><Index>1</Index><Discussion><Para> Bbb </Para></Discussion></Parameter></TemplateParameters></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
@@ -345,9 +377,9 @@ void comment_to_html_conversion_20(T1 aaa, T2 bbb);
/// \tparam V Ccc
/// \tparam T1 Aaa
template<typename T1, typename T2, int V>
-void comment_to_html_conversion_21(T1 aaa, T2 bbb);
+void test_cmd_tparam_4(T1 aaa, T2 bbb);
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=comment_to_html_conversion_21:{{.*}} FullCommentAsHTML=[<dl><dt class="tparam-name-index-0">T1</dt><dd class="tparam-descr-index-0"> Aaa</dd><dt class="tparam-name-index-1">T2</dt><dd class="tparam-descr-index-1"> Bbb </dd><dt class="tparam-name-index-2">V</dt><dd class="tparam-descr-index-2"> Ccc </dd><dt class="tparam-name-index-invalid">U</dt><dd class="tparam-descr-index-invalid"> Zzz </dd></dl>] FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_21</Name><USR>c:@FT@&gt;3#T#T#NIcomment_to_html_conversion_21#t0.0#t0.1#</USR><Declaration>template &lt;typename T1, typename T2, int V&gt;\nvoid comment_to_html_conversion_21(T1 aaa, T2 bbb)</Declaration><TemplateParameters><Parameter><Name>T1</Name><Index>0</Index><Discussion><Para> Aaa</Para></Discussion></Parameter><Parameter><Name>T2</Name><Index>1</Index><Discussion><Para> Bbb </Para></Discussion></Parameter><Parameter><Name>V</Name><Index>2</Index><Discussion><Para> Ccc </Para></Discussion></Parameter><Parameter><Name>U</Name><Discussion><Para> Zzz </Para></Discussion></Parameter></TemplateParameters></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=test_cmd_tparam_4:{{.*}} FullCommentAsHTML=[<dl><dt class="tparam-name-index-0">T1</dt><dd class="tparam-descr-index-0"> Aaa</dd><dt class="tparam-name-index-1">T2</dt><dd class="tparam-descr-index-1"> Bbb </dd><dt class="tparam-name-index-2">V</dt><dd class="tparam-descr-index-2"> Ccc </dd><dt class="tparam-name-index-invalid">U</dt><dd class="tparam-descr-index-invalid"> Zzz </dd></dl>] FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_tparam_4</Name><USR>c:@FT@&gt;3#T#T#NItest_cmd_tparam_4#t0.0#t0.1#</USR><Declaration>template &lt;typename T1, typename T2, int V&gt;\nvoid test_cmd_tparam_4(T1 aaa, T2 bbb)</Declaration><TemplateParameters><Parameter><Name>T1</Name><Index>0</Index><Discussion><Para> Aaa</Para></Discussion></Parameter><Parameter><Name>T2</Name><Index>1</Index><Discussion><Para> Bbb </Para></Discussion></Parameter><Parameter><Name>V</Name><Index>2</Index><Discussion><Para> Ccc </Para></Discussion></Parameter><Parameter><Name>U</Name><Discussion><Para> Zzz </Para></Discussion></Parameter></TemplateParameters></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
@@ -373,9 +405,9 @@ void comment_to_html_conversion_21(T1 aaa, T2 bbb);
/// \tparam T Aaa
/// \tparam TT Bbb
template<template<template<typename T> class TT, class C> class TTT>
-void comment_to_html_conversion_22();
+void test_cmd_tparam_5();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=comment_to_html_conversion_22:{{.*}} FullCommentAsHTML=[<dl><dt class="tparam-name-index-0">TTT</dt><dd class="tparam-descr-index-0"> Ddd </dd><dt class="tparam-name-index-other">C</dt><dd class="tparam-descr-index-other"> Ccc </dd><dt class="tparam-name-index-other">T</dt><dd class="tparam-descr-index-other"> Aaa </dd><dt class="tparam-name-index-other">TT</dt><dd class="tparam-descr-index-other"> Bbb</dd></dl>] FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_22</Name><USR>c:@FT@&gt;1#t&gt;2#t&gt;1#T#Tcomment_to_html_conversion_22#</USR><Declaration>template &lt;template &lt;template &lt;typename T&gt; class TT, class C&gt; class TTT&gt;\nvoid comment_to_html_conversion_22()</Declaration><TemplateParameters><Parameter><Name>TTT</Name><Index>0</Index><Discussion><Para> Ddd </Para></Discussion></Parameter><Parameter><Name>C</Name><Discussion><Para> Ccc </Para></Discussion></Parameter><Parameter><Name>T</Name><Discussion><Para> Aaa </Para></Discussion></Parameter><Parameter><Name>TT</Name><Discussion><Para> Bbb</Para></Discussion></Parameter></TemplateParameters></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionTemplate=test_cmd_tparam_5:{{.*}} FullCommentAsHTML=[<dl><dt class="tparam-name-index-0">TTT</dt><dd class="tparam-descr-index-0"> Ddd </dd><dt class="tparam-name-index-other">C</dt><dd class="tparam-descr-index-other"> Ccc </dd><dt class="tparam-name-index-other">T</dt><dd class="tparam-descr-index-other"> Aaa </dd><dt class="tparam-name-index-other">TT</dt><dd class="tparam-descr-index-other"> Bbb</dd></dl>] FullCommentAsXML=[<Function templateKind="template" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_cmd_tparam_5</Name><USR>c:@FT@&gt;1#t&gt;2#t&gt;1#T#Ttest_cmd_tparam_5#</USR><Declaration>template &lt;template &lt;template &lt;typename T&gt; class TT, class C&gt; class TTT&gt;\nvoid test_cmd_tparam_5()</Declaration><TemplateParameters><Parameter><Name>TTT</Name><Index>0</Index><Discussion><Para> Ddd </Para></Discussion></Parameter><Parameter><Name>C</Name><Discussion><Para> Ccc </Para></Discussion></Parameter><Parameter><Name>T</Name><Discussion><Para> Aaa </Para></Discussion></Parameter><Parameter><Name>TT</Name><Discussion><Para> Bbb</Para></Discussion></Parameter></TemplateParameters></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
@@ -396,6 +428,10 @@ void comment_to_html_conversion_22();
// CHECK-NEXT: (CXComment_Paragraph
// CHECK-NEXT: (CXComment_Text Text=[ Bbb]))))]
+//===---
+// Tests for interaction between commands.
+//===---
+
/// \brief Aaa.
///
/// Bbb.
@@ -403,9 +439,9 @@ void comment_to_html_conversion_22();
/// \param x2 Ddd.
/// \param x1 Ccc.
/// \returns Eee.
-void comment_to_html_conversion_23(int x1, int x2);
+void test_full_comment_1(int x1, int x2);
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_23:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><p> Bbb.</p><dl><dt class="param-name-index-0">x1</dt><dd class="param-descr-index-0"> Ccc. </dd><dt class="param-name-index-1">x2</dt><dd class="param-descr-index-1"> Ddd. </dd></dl><div class="result-discussion"><p class="para-returns"><span class="word-returns">Returns</span> Eee.</p></div>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_23</Name><USR>c:@F@comment_to_html_conversion_23#I#I#</USR><Declaration>void comment_to_html_conversion_23(int x1, int x2)</Declaration><Abstract><Para> Aaa.</Para></Abstract><Parameters><Parameter><Name>x1</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Ccc. </Para></Discussion></Parameter><Parameter><Name>x2</Name><Index>1</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Ddd. </Para></Discussion></Parameter></Parameters><ResultDiscussion><Para> Eee.</Para></ResultDiscussion><Discussion><Para> Bbb.</Para></Discussion></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=test_full_comment_1:{{.*}} FullCommentAsHTML=[<p class="para-brief"> Aaa.</p><p> Bbb.</p><dl><dt class="param-name-index-0">x1</dt><dd class="param-descr-index-0"> Ccc. </dd><dt class="param-name-index-1">x2</dt><dd class="param-descr-index-1"> Ddd. </dd></dl><div class="result-discussion"><p class="para-returns"><span class="word-returns">Returns</span> Eee.</p></div>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>test_full_comment_1</Name><USR>c:@F@test_full_comment_1#I#I#</USR><Declaration>void test_full_comment_1(int x1, int x2)</Declaration><Abstract><Para> Aaa.</Para></Abstract><Parameters><Parameter><Name>x1</Name><Index>0</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Ccc. </Para></Discussion></Parameter><Parameter><Name>x2</Name><Index>1</Index><Direction isExplicit="0">in</Direction><Discussion><Para> Ddd. </Para></Discussion></Parameter></Parameters><ResultDiscussion><Para> Eee.</Para></ResultDiscussion><Discussion><Para> Bbb.</Para></Discussion></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph IsWhitespace
@@ -429,6 +465,10 @@ void comment_to_html_conversion_23(int x1, int x2);
// CHECK-NEXT: (CXComment_Paragraph
// CHECK-NEXT: (CXComment_Text Text=[ Eee.]))))]
+//===---
+// Misc tests.
+//===---
+
/// <br><a href="http://example.com/">Aaa</a>
void comment_to_html_conversion_24();
@@ -653,12 +693,12 @@ void comment_to_html_conversion_34();
/// &copy; the copyright symbol
/// &trade; the trade mark symbol
/// &reg; the registered trade mark symbol
-/// &nbsp; a non breakable space.
+/// &nbsp; a non-breakable space.
/// &Delta; Greek letter Delta Δ.
/// &Gamma; Greek letter Gamma Γ.
void comment_to_html_conversion_35();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_35:{{.*}} FullCommentAsHTML=[<p class="para-brief"> © the copyright symbol ™ the trade mark symbol ® the registered trade mark symbol   a non breakable space. Δ Greek letter Delta Δ. Γ Greek letter Gamma Γ.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_35</Name><USR>c:@F@comment_to_html_conversion_35#</USR><Declaration>void comment_to_html_conversion_35()</Declaration><Abstract><Para> © the copyright symbol ™ the trade mark symbol ® the registered trade mark symbol   a non breakable space. Δ Greek letter Delta Δ. Γ Greek letter Gamma Γ.</Para></Abstract></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_35:{{.*}} FullCommentAsHTML=[<p class="para-brief"> © the copyright symbol ™ the trade mark symbol ® the registered trade mark symbol   a non-breakable space. Δ Greek letter Delta Δ. Γ Greek letter Gamma Γ.</p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_35</Name><USR>c:@F@comment_to_html_conversion_35#</USR><Declaration>void comment_to_html_conversion_35()</Declaration><Abstract><Para> © the copyright symbol ™ the trade mark symbol ® the registered trade mark symbol   a non-breakable space. Δ Greek letter Delta Δ. Γ Greek letter Gamma Γ.</Para></Abstract></Function>]
// CHECK-NEXT: CommentAST=[
// CHECK-NEXT: (CXComment_FullComment
// CHECK-NEXT: (CXComment_Paragraph
@@ -673,7 +713,7 @@ void comment_to_html_conversion_35();
// CHECK-NEXT: (CXComment_Text Text=[ the registered trade mark symbol] HasTrailingNewline)
// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
// CHECK-NEXT: (CXComment_Text Text=[ ])
-// CHECK-NEXT: (CXComment_Text Text=[ a non breakable space.] HasTrailingNewline)
+// CHECK-NEXT: (CXComment_Text Text=[ a non-breakable space.] HasTrailingNewline)
// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
// CHECK-NEXT: (CXComment_Text Text=[Δ])
// CHECK-NEXT: (CXComment_Text Text=[ Greek letter Delta Δ.] HasTrailingNewline)
@@ -681,6 +721,18 @@ void comment_to_html_conversion_35();
// CHECK-NEXT: (CXComment_Text Text=[Γ])
// CHECK-NEXT: (CXComment_Text Text=[ Greek letter Gamma Γ.])))]
+/// <h1 id="]]>">Aaa</h1>
+void comment_to_html_conversion_36();
+
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:6: FunctionDecl=comment_to_html_conversion_36:{{.*}} FullCommentAsHTML=[<p class="para-brief"> <h1 id="]]>">Aaa</h1></p>] FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="6"><Name>comment_to_html_conversion_36</Name><USR>c:@F@comment_to_html_conversion_36#</USR><Declaration>void comment_to_html_conversion_36()</Declaration><Abstract><Para> <rawHTML><![CDATA[<h1 id="]]]]><![CDATA[>">]]></rawHTML>Aaa<rawHTML>&lt;/h1&gt;</rawHTML></Para></Abstract></Function>]
+// CHECK-NEXT: CommentAST=[
+// CHECK-NEXT: (CXComment_FullComment
+// CHECK-NEXT: (CXComment_Paragraph
+// CHECK-NEXT: (CXComment_Text Text=[ ] IsWhitespace)
+// CHECK-NEXT: (CXComment_HTMLStartTag Name=[h1] Attrs: id=]]>)
+// CHECK-NEXT: (CXComment_Text Text=[Aaa])
+// CHECK-NEXT: (CXComment_HTMLEndTag Name=[h1])))]
+
/// Aaa.
class comment_to_xml_conversion_01 {
@@ -694,7 +746,7 @@ class comment_to_xml_conversion_01 {
/// Aaa.
~comment_to_xml_conversion_01();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:3: CXXDestructor=~comment_to_xml_conversion_01:{{.*}} FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="3"><Name>~comment_to_xml_conversion_01</Name><USR>c:@C@comment_to_xml_conversion_01@F@~comment_to_xml_conversion_01#</USR><Declaration>void ~comment_to_xml_conversion_01()</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:3: CXXDestructor=~comment_to_xml_conversion_01:{{.*}} FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="3"><Name>~comment_to_xml_conversion_01</Name><USR>c:@C@comment_to_xml_conversion_01@F@~comment_to_xml_conversion_01#</USR><Declaration>~comment_to_xml_conversion_01()</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
/// \param aaa Blah blah.
int comment_to_xml_conversion_02(int aaa);
@@ -724,7 +776,7 @@ class comment_to_xml_conversion_01 {
/// Aaa.
operator bool();
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:3: CXXConversion=operator _Bool:{{.*}} FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="3"><Name>operator _Bool</Name><USR>c:@C@comment_to_xml_conversion_01@F@operator _Bool#</USR><Declaration>bool operator _Bool()</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-2]]:3: CXXConversion=operator bool:{{.*}} FullCommentAsXML=[<Function isInstanceMethod="1" file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-2]]" column="3"><Name>operator bool</Name><USR>c:@C@comment_to_xml_conversion_01@F@operator bool#</USR><Declaration>operator bool()</Declaration><Abstract><Para> Aaa.</Para></Abstract></Function>]
/// Aaa.
typedef int comment_to_xml_conversion_06;
@@ -813,6 +865,34 @@ enum class comment_to_xml_conversion_17 {
// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:3: EnumConstantDecl=comment_to_xml_conversion_18:{{.*}} FullCommentAsXML=[<Variable file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="3"><Name>comment_to_xml_conversion_18</Name><USR>c:@E@comment_to_xml_conversion_17@comment_to_xml_conversion_18</USR><Declaration>comment_to_xml_conversion_18</Declaration><Abstract><Para> Aaa.</Para></Abstract></Variable>]
};
+/// <a href="http://example.org/">
+void comment_to_xml_conversion_unsafe_html_01();
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_unsafe_html_01:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_unsafe_html_01</Name><USR>c:@F@comment_to_xml_conversion_unsafe_html_01#</USR><Declaration>void comment_to_xml_conversion_unsafe_html_01()</Declaration><Abstract><Para> <rawHTML isMalformed="1"><![CDATA[<a href="http://example.org/">]]></rawHTML></Para></Abstract></Function>]
+
+/// <a href="http://example.org/"><em>Aaa</em>
+void comment_to_xml_conversion_unsafe_html_02();
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_unsafe_html_02:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_unsafe_html_02</Name><USR>c:@F@comment_to_xml_conversion_unsafe_html_02#</USR><Declaration>void comment_to_xml_conversion_unsafe_html_02()</Declaration><Abstract><Para> <rawHTML isMalformed="1"><![CDATA[<a href="http://example.org/">]]></rawHTML><rawHTML><![CDATA[<em>]]></rawHTML>Aaa<rawHTML>&lt;/em&gt;</rawHTML></Para></Abstract></Function>]
+
+/// <em>Aaa
+void comment_to_xml_conversion_unsafe_html_03();
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_unsafe_html_03:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_unsafe_html_03</Name><USR>c:@F@comment_to_xml_conversion_unsafe_html_03#</USR><Declaration>void comment_to_xml_conversion_unsafe_html_03()</Declaration><Abstract><Para> <rawHTML isMalformed="1"><![CDATA[<em>]]></rawHTML>Aaa</Para></Abstract></Function>]
+
+/// <em>Aaa</b></em>
+void comment_to_xml_conversion_unsafe_html_04();
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_unsafe_html_04:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_unsafe_html_04</Name><USR>c:@F@comment_to_xml_conversion_unsafe_html_04#</USR><Declaration>void comment_to_xml_conversion_unsafe_html_04()</Declaration><Abstract><Para> <rawHTML><![CDATA[<em>]]></rawHTML>Aaa<rawHTML isMalformed="1">&lt;/b&gt;</rawHTML><rawHTML>&lt;/em&gt;</rawHTML></Para></Abstract></Function>]
+
+/// <em>Aaa</em></b>
+void comment_to_xml_conversion_unsafe_html_05();
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_unsafe_html_05:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_unsafe_html_05</Name><USR>c:@F@comment_to_xml_conversion_unsafe_html_05#</USR><Declaration>void comment_to_xml_conversion_unsafe_html_05()</Declaration><Abstract><Para> <rawHTML><![CDATA[<em>]]></rawHTML>Aaa<rawHTML>&lt;/em&gt;</rawHTML><rawHTML isMalformed="1">&lt;/b&gt;</rawHTML></Para></Abstract></Function>]
+
+/// </table>
+void comment_to_xml_conversion_unsafe_html_06();
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_unsafe_html_06:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_unsafe_html_06</Name><USR>c:@F@comment_to_xml_conversion_unsafe_html_06#</USR><Declaration>void comment_to_xml_conversion_unsafe_html_06()</Declaration><Abstract><Para> <rawHTML isMalformed="1">&lt;/table&gt;</rawHTML></Para></Abstract></Function>]
+
+/// <div onclick="alert('meow');">Aaa</div>
+void comment_to_xml_conversion_unsafe_html_07();
+// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:6: FunctionDecl=comment_to_xml_conversion_unsafe_html_07:{{.*}} FullCommentAsXML=[<Function file="{{[^"]+}}comment-to-html-xml-conversion.cpp" line="[[@LINE-1]]" column="6"><Name>comment_to_xml_conversion_unsafe_html_07</Name><USR>c:@F@comment_to_xml_conversion_unsafe_html_07#</USR><Declaration>void comment_to_xml_conversion_unsafe_html_07()</Declaration><Abstract><Para> <rawHTML><![CDATA[<div onclick="alert('meow');">]]></rawHTML>Aaa<rawHTML>&lt;/div&gt;</rawHTML></Para></Abstract></Function>]
+
//===---
// Check that we attach comments from the base class to derived classes if they don't have a comment.
// rdar://13647476
@@ -975,17 +1055,5 @@ void comment_to_xml_conversion_exceptions_5();
// CHECK-NEXT: (CXComment_Paragraph
// CHECK-NEXT: (CXComment_Text Text=[ Ccc.]))))]
-
-// rdar://14348912
-#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type
-
-/**! Documentation comment */
-typedef NS_ENUM(int, Color) { Red, Green, Blue };
-// CHECK: comment-to-html-xml-conversion.cpp:[[@LINE-1]]:22: TypedefDecl=Color:[[@LINE-1]]:22
-// CHECK-NEXT: CommentAST=[
-// CHECK-NEXT: (CXComment_FullComment
-// CHECK-NEXT: (CXComment_Paragraph
-// CHECK-NEXT: (CXComment_Text Text=[! Documentation comment ])))]
-
#endif
diff --git a/test/Index/comment-xml-schema.c b/test/Index/comment-xml-schema.c
index 2bbdfcfe9999..37cb47c3d6cd 100644
--- a/test/Index/comment-xml-schema.c
+++ b/test/Index/comment-xml-schema.c
@@ -11,6 +11,7 @@
// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-function-07.xml
// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-function-08.xml
// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-function-09.xml
+// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-function-10.xml
//
// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-availability-attr-01.xml
// RUN: xmllint --noout --relaxng %S/../../bindings/xml/comment-xml-schema.rng %S/Inputs/CommentXML/valid-availability-attr-02.xml
diff --git a/test/Index/complete-macros.c b/test/Index/complete-macros.c
index 6d27b449ae2b..c81c8caad8d4 100644
--- a/test/Index/complete-macros.c
+++ b/test/Index/complete-macros.c
@@ -1,5 +1,5 @@
-// Note: the run lines follow their respective tests, since line/column
-// matter in this test.
+#include "complete-macros.h"
+// Note: the run lines follow their respective tests, since line/column matter in this test.
#define FOO(Arg1,Arg2) foobar
#define nil 0
#undef FOO
@@ -25,20 +25,23 @@ void test_variadic() {
}
-// RUN: c-index-test -code-completion-at=%s:7:1 %s | FileCheck -check-prefix=CHECK-CC0 %s
+// RUN: c-index-test -code-completion-at=%s:7:1 %s -I%S | FileCheck -check-prefix=CHECK-CC0 %s
// CHECK-CC0-NOT: FOO
-// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:7:1 %s | FileCheck -check-prefix=CHECK-CC1 %s
+// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:7:1 %s -I%S | FileCheck -check-prefix=CHECK-CC1 %s
// CHECK-CC1: macro definition:{TypedText FOO}{LeftParen (}{Placeholder Arg1}{Comma , }{Placeholder Arg2}{RightParen )}
-// RUN: c-index-test -code-completion-at=%s:13:13 %s | FileCheck -check-prefix=CHECK-CC2 %s
-// RUN: c-index-test -code-completion-at=%s:14:8 %s | FileCheck -check-prefix=CHECK-CC2 %s
-// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:14:8 %s | FileCheck -check-prefix=CHECK-CC2 %s
+// RUN: c-index-test -code-completion-at=%s:13:13 %s -I%S | FileCheck -check-prefix=CHECK-CC2 %s
+// RUN: c-index-test -code-completion-at=%s:14:8 %s -I%S | FileCheck -check-prefix=CHECK-CC2 %s
+// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:14:8 %s -I%S | FileCheck -check-prefix=CHECK-CC2 %s
// CHECK-CC2: macro definition:{TypedText nil} (32)
-// RUN: c-index-test -code-completion-at=%s:15:5 %s | FileCheck -check-prefix=CHECK-CC3 %s
-// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:15:5 %s | FileCheck -check-prefix=CHECK-CC3 %s
+// RUN: c-index-test -code-completion-at=%s:15:5 %s -I%S | FileCheck -check-prefix=CHECK-CC3 %s
+// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:15:5 %s -I%S | FileCheck -check-prefix=CHECK-CC3 %s
// CHECK-CC3: macro definition:{TypedText nil} (65)
-// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:25:2 %s | FileCheck -check-prefix=CHECK-VARIADIC %s
+// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:25:2 %s -I%S | FileCheck -check-prefix=CHECK-VARIADIC %s
// CHECK-VARIADIC: macro definition:{TypedText variadic1}{LeftParen (}{Placeholder ...}{RightParen )} (70)
// CHECK-VARIADIC: macro definition:{TypedText variadic2}{LeftParen (}{Placeholder args...}{RightParen )} (70)
// CHECK-VARIADIC: macro definition:{TypedText variadic3}{LeftParen (}{Placeholder args, ...}{RightParen )} (70)
// CHECK-VARIADIC: macro definition:{TypedText variadic4}{LeftParen (}{Placeholder first}{Comma , }{Placeholder second}{Comma , }{Placeholder args, ...}{RightParen )} (70)
// CHECK-VARIADIC: macro definition:{TypedText variadic5}{LeftParen (}{Placeholder first}{Comma , }{Placeholder second}{Comma , }{Placeholder args...}{RightParen )} (70)
+
+// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_CACHING=1 c-index-test -code-completion-at=%s:15:5 %s -I%S | FileCheck -check-prefix=CHECK-CC4 %s
+// CHECK-CC4-NOT: COMPLETE_MACROS_H_GUARD
diff --git a/test/Index/complete-macros.h b/test/Index/complete-macros.h
new file mode 100644
index 000000000000..70f49e31a1e3
--- /dev/null
+++ b/test/Index/complete-macros.h
@@ -0,0 +1,6 @@
+#ifndef COMPLETE_MACROS_H_GUARD
+#define COMPLETE_MACROS_H_GUARD
+
+void in_header(int);
+
+#endif
diff --git a/test/Index/complete-method-decls.m b/test/Index/complete-method-decls.m
index 9e52d93e5701..eceaa833fc3e 100644
--- a/test/Index/complete-method-decls.m
+++ b/test/Index/complete-method-decls.m
@@ -72,6 +72,19 @@
- (oneway void)method:(in id x) {}
@end
+typedef A MyObject;
+typedef A *MyObjectRef;
+
+@interface I1
+-(Class<P1>)meth;
+-(MyObject <P1> *)meth2;
+-(MyObjectRef)meth3;
+@end
+
+@implementation I1
+-
+@end
+
// RUN: c-index-test -code-completion-at=%s:17:3 %s | FileCheck -check-prefix=CHECK-CC1 %s
// CHECK-CC1: ObjCInstanceMethodDecl:{LeftParen (}{Text id}{RightParen )}{TypedText abc} (40)
// CHECK-CC1: ObjCInstanceMethodDecl:{LeftParen (}{Text int}{RightParen )}{TypedText getInt} (40)
@@ -182,3 +195,9 @@
// RUN: c-index-test -code-completion-at=%s:72:2 %s | FileCheck -check-prefix=CHECK-ONEWAY %s
// CHECK-ONEWAY: ObjCInstanceMethodDecl:{LeftParen (}{Text oneway }{Text void}{RightParen )}{TypedText method}{TypedText :}{LeftParen (}{Text in }{Text id}{RightParen )}{Text x} (40)
+
+// RUN: c-index-test -code-completion-at=%s:85:2 %s | FileCheck -check-prefix=CHECK-CLASSTY %s
+// CHECK-CLASSTY: ObjCInstanceMethodDecl:{LeftParen (}{Text Class<P1>}{RightParen )}{TypedText meth}
+// FIXME: It should be "MyObject <P1> *""
+// CHECK-CLASSTY: ObjCInstanceMethodDecl:{LeftParen (}{Text A<P1> *}{RightParen )}{TypedText meth2}
+// CHECK-CLASSTY: ObjCInstanceMethodDecl:{LeftParen (}{Text MyObjectRef}{RightParen )}{TypedText meth3}
diff --git a/test/Index/complete-property-flags.m b/test/Index/complete-property-flags.m
index 86ee8e26f759..13ec1e725f20 100644
--- a/test/Index/complete-property-flags.m
+++ b/test/Index/complete-property-flags.m
@@ -11,12 +11,12 @@
// CHECK-CC1: {TypedText assign}
// CHECK-CC1-NEXT: {TypedText atomic}
// CHECK-CC1-NEXT: {TypedText copy}
-// CHECK-CC1-NEXT: {TypedText getter}{Text = }{Placeholder method}
+// CHECK-CC1-NEXT: {TypedText getter}{Text =}{Placeholder method}
// CHECK-CC1-NEXT: {TypedText nonatomic}
// CHECK-CC1-NEXT: {TypedText readonly}
// CHECK-CC1-NEXT: {TypedText readwrite}
// CHECK-CC1-NEXT: {TypedText retain}
-// CHECK-CC1-NEXT: {TypedText setter}{Text = }{Placeholder method}
+// CHECK-CC1-NEXT: {TypedText setter}{Text =}{Placeholder method}
// CHECK-CC1-NEXT: {TypedText strong}
// CHECK-CC1-NEXT: {TypedText unsafe_unretained}
// CHECK-CC1-NOT: {TypedText weak}
@@ -25,20 +25,20 @@
// CHECK-CC1-ARC: {TypedText assign}
// CHECK-CC1-ARC-NEXT: {TypedText atomic}
// CHECK-CC1-ARC-NEXT: {TypedText copy}
-// CHECK-CC1-ARC-NEXT: {TypedText getter}{Text = }{Placeholder method}
+// CHECK-CC1-ARC-NEXT: {TypedText getter}{Text =}{Placeholder method}
// CHECK-CC1-ARC-NEXT: {TypedText nonatomic}
// CHECK-CC1-ARC-NEXT: {TypedText readonly}
// CHECK-CC1-ARC-NEXT: {TypedText readwrite}
// CHECK-CC1-ARC-NEXT: {TypedText retain}
-// CHECK-CC1-ARC-NEXT: {TypedText setter}{Text = }{Placeholder method}
+// CHECK-CC1-ARC-NEXT: {TypedText setter}{Text =}{Placeholder method}
// CHECK-CC1-ARC-NEXT: {TypedText strong}
// CHECK-CC1-ARC-NEXT: {TypedText unsafe_unretained}
// CHECK-CC1-ARC-NEXT: {TypedText weak}
// RUN: c-index-test -code-completion-at=%s:8:18 %s | FileCheck -check-prefix=CHECK-CC2 %s
-// CHECK-CC2: {TypedText getter}{Text = }{Placeholder method}
+// CHECK-CC2: {TypedText getter}{Text =}{Placeholder method}
// CHECK-CC2-NEXT: {TypedText nonatomic}
// CHECK-CC2-NEXT: {TypedText readonly}
// CHECK-CC2-NEXT: {TypedText readwrite}
-// CHECK-CC2-NEXT: {TypedText setter}{Text = }{Placeholder method}
+// CHECK-CC2-NEXT: {TypedText setter}{Text =}{Placeholder method}
@end
diff --git a/test/Index/complete-recovery.m b/test/Index/complete-recovery.m
index 19de0fbfc41e..ec5bf8af6ab1 100644
--- a/test/Index/complete-recovery.m
+++ b/test/Index/complete-recovery.m
@@ -23,7 +23,7 @@
// CHECK-CC1: VarDecl:{ResultType A *}{TypedText a}
// CHECK-CC1: NotImplemented:{ResultType size_t}{TypedText sizeof}{LeftParen (}{Placeholder expression-or-type}{RightParen )}
-// Test case for fix comitted in r145441.
+// Test case for fix committed in r145441.
// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:9:20 %s -fms-compatibility | FileCheck -check-prefix=CHECK-CC1 %s
// RUN: env CINDEXTEST_CODE_COMPLETE_PATTERNS=1 c-index-test -code-completion-at=%s:10:24 %s | FileCheck -check-prefix=CHECK-CC2 %s
diff --git a/test/Index/crash-recovery-code-complete.c b/test/Index/crash-recovery-code-complete.c
index c502ce5186f7..b2a1a9b3f96b 100644
--- a/test/Index/crash-recovery-code-complete.c
+++ b/test/Index/crash-recovery-code-complete.c
@@ -1,6 +1,6 @@
// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_PREAMBLE_FILE=%t-preamble.pch \
// RUN: not c-index-test -code-completion-at=%s:20:1 \
-// RUN: "-remap-file=%s;%S/Inputs/crash-recovery-code-complete-remap.c" \
+// RUN: "-remap-file=%s,%S/Inputs/crash-recovery-code-complete-remap.c" \
// RUN: %s 2> %t.err
// RUN: FileCheck < %t.err -check-prefix=CHECK-CODE-COMPLETE-CRASH %s
// RUN: test ! -e %t-preamble.pch
@@ -9,6 +9,6 @@
// REQUIRES: crash-recovery
// FIXME: Please investigate abnormal path in MemoryBuffer.
-// XFAIL: mingw32,win32
+// REQUIRES: can-remove-opened-file
#warning parsing original file
diff --git a/test/Index/crash-recovery-reparse.c b/test/Index/crash-recovery-reparse.c
index e3f7265e8494..baa6604b5352 100644
--- a/test/Index/crash-recovery-reparse.c
+++ b/test/Index/crash-recovery-reparse.c
@@ -1,6 +1,6 @@
// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_PREAMBLE_FILE=%t-preamble.pch \
// RUN: not c-index-test -test-load-source-reparse 1 local \
-// RUN: -remap-file="%s;%S/Inputs/crash-recovery-reparse-remap.c" \
+// RUN: -remap-file="%s,%S/Inputs/crash-recovery-reparse-remap.c" \
// RUN: %s 2> %t.err
// RUN: FileCheck < %t.err -check-prefix=CHECK-REPARSE-SOURCE-CRASH %s
// RUN: test ! -e $t-preamble.pch
diff --git a/test/Index/crash-recovery.c b/test/Index/crash-recovery.c
index b7f6e0b2b9e9..e8e84bc504dc 100644
--- a/test/Index/crash-recovery.c
+++ b/test/Index/crash-recovery.c
@@ -1,6 +1,7 @@
// RUN: not c-index-test -test-load-source all %s 2> %t.err
// RUN: FileCheck < %t.err -check-prefix=CHECK-LOAD-SOURCE-CRASH %s
// CHECK-LOAD-SOURCE-CRASH: Unable to load translation unit
+// RUN: env LIBCLANG_DISABLE_CRASH_RECOVERY=1 not --crash c-index-test -test-load-source all %s
//
// REQUIRES: crash-recovery
diff --git a/test/Index/cxx11-lambdas.cpp b/test/Index/cxx11-lambdas.cpp
index 93db0220359a..afb540a84d5f 100644
--- a/test/Index/cxx11-lambdas.cpp
+++ b/test/Index/cxx11-lambdas.cpp
@@ -26,8 +26,8 @@ struct X {
// RUN: env CINDEXTEST_INDEXLOCALSYMBOLS=1 c-index-test -index-file -std=c++11 %s | FileCheck -check-prefix=CHECK-INDEX %s
// CHECK-INDEX: [indexEntityReference]: kind: variable | name: localA | USR: c:cxx11-lambdas.cpp@100@S@X@F@f#@localA | lang: C | cursor: VariableRef=localA:6:9 | loc: 7:21
// CHECK-INDEX: [indexEntityReference]: kind: variable | name: localB | USR: c:cxx11-lambdas.cpp@100@S@X@F@f#@localB | lang: C | cursor: VariableRef=localB:6:17 | loc: 7:29
-// CHECK-INDEX: [indexEntityReference]: kind: typedef | name: Integer | USR: c:cxx11-lambdas.cpp@51@T@Integer | lang: C | cursor: TypeRef=Integer:3:13 | loc: 7:52
-// CHECK-INDEX: [indexEntityReference]: kind: typedef | name: Integer | USR: c:cxx11-lambdas.cpp@51@T@Integer | lang: C | cursor: TypeRef=Integer:3:13 | loc: 7:38
+// CHECK-INDEX: [indexEntityReference]: kind: typedef | name: Integer | USR: c:cxx11-lambdas.cpp@T@Integer | lang: C | cursor: TypeRef=Integer:3:13 | loc: 7:52
+// CHECK-INDEX: [indexEntityReference]: kind: typedef | name: Integer | USR: c:cxx11-lambdas.cpp@T@Integer | lang: C | cursor: TypeRef=Integer:3:13 | loc: 7:38
// CHECK-INDEX: [indexEntityReference]: kind: variable | name: localA | USR: c:cxx11-lambdas.cpp@100@S@X@F@f#@localA | lang: C | cursor: DeclRefExpr=localA:6:9 | loc: 8:14
// CHECK-INDEX: [indexEntityReference]: kind: variable | name: localB | USR: c:cxx11-lambdas.cpp@100@S@X@F@f#@localB | lang: C | cursor: DeclRefExpr=localB:6:17 | loc: 8:23
// CHECK-INDEX: [indexEntityReference]: kind: variable | name: x | USR: c:cxx11-lambdas.cpp@157@S@X@F@f#@Ca@F@operator()#I#1@x | lang: C | cursor: DeclRefExpr=x:7:46 | loc: 8:32
diff --git a/test/Index/fix-its.m b/test/Index/fix-its.m
index b307cf4c6dc6..fabcdb2905f6 100644
--- a/test/Index/fix-its.m
+++ b/test/Index/fix-its.m
@@ -24,5 +24,3 @@ void _rdar_12584554_A (volatile const void * object, volatile const void * selec
// CHECK: Number FIX-ITs = 0
// CHECK: fix-its.m:7:77: note: expanded from macro '_rdar_12584554_B'
// CHECK: Number FIX-ITs = 0
-// CHECK: fix-its.m:5:172: note: passing argument to parameter 'msgFormat' here
-// CHECK: Number FIX-ITs = 0
diff --git a/test/Index/index-module-with-vfs.m b/test/Index/index-module-with-vfs.m
new file mode 100644
index 000000000000..f3ca60cf941f
--- /dev/null
+++ b/test/Index/index-module-with-vfs.m
@@ -0,0 +1,26 @@
+// REQUIRES: shell
+@import ModuleNeedsVFS;
+
+void foo() {
+ module_needs_vfs();
+ base_module_needs_vfs();
+}
+
+// RUN: rm -rf %t.cache
+// RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%t:g" %S/Inputs/vfsoverlay.yaml > %t.yaml
+// RUN: c-index-test -index-file %s -fmodules-cache-path=%t.cache -fmodules -F %t -I %t \
+// RUN: -ivfsoverlay %t.yaml -Xclang -fdisable-module-hash | FileCheck %s
+
+// CHECK: [importedASTFile]: {{.*}}ModuleNeedsVFS.pcm | loc: 2:1 | name: "ModuleNeedsVFS" | isImplicit: 0
+// CHECK: [indexEntityReference]: kind: function | name: module_needs_vfs
+// CHECK: [indexEntityReference]: kind: function | name: base_module_needs_vfs
+
+// RUN: c-index-test -index-tu %t.cache/ModuleNeedsVFS.pcm | FileCheck %s -check-prefix=CHECK-MOD
+
+// CHECK-MOD: [ppIncludedFile]: {{.*}}module_needs_vfs.h
+// CHECK-MOD: [importedASTFile]: {{.*}}BaseModuleNeedsVFS.pcm
+// CHECK-MOD: [indexEntityReference]: kind: function | name: base_module_needs_vfs
+
+// RUN: c-index-test -index-tu %t.cache/BaseModuleNeedsVFS.pcm | FileCheck %s -check-prefix=CHECK-MOD2
+
+// CHECK-MOD2: [ppIncludedFile]: {{.*}}base_module_needs_vfs.h
diff --git a/test/Index/index-module.m b/test/Index/index-module.m
index d6953136d863..8e0155607dda 100644
--- a/test/Index/index-module.m
+++ b/test/Index/index-module.m
@@ -18,13 +18,13 @@ int glob;
// RUN: c-index-test -index-tu %t.cache/DependsOnModule.pcm | FileCheck %s -check-prefix=CHECK-DMOD
// CHECK-DMOD: [startedTranslationUnit]
-// CHECK-DMOD-NEXT: [ppIncludedFile]: [[DMOD_MODULE_H:.*/Modules/Inputs/DependsOnModule\.framework[/\\]Headers[/\\]DependsOnModule\.h]] | {{.*}} | hash loc: <invalid>
-// CHECK-DMOD-NEXT: [ppIncludedFile]: {{.*}}/Modules/Inputs/Module.framework{{[/\\]}}Headers{{[/\\]}}Module.h | name: "Module/Module.h" | hash loc: {{.*}}/Modules/Inputs/DependsOnModule.framework{{[/\\]}}Headers{{[/\\]}}DependsOnModule.h:1:1 | isImport: 0 | isAngled: 1 | isModule: 1
-// CHECK-DMOD-NEXT: [ppIncludedFile]: [[DMOD_OTHER_H:.*/Modules/Inputs/DependsOnModule\.framework[/\\]Headers[/\\]other\.h]] | {{.*}} | hash loc: <invalid>
-// CHECK-DMOD-NEXT: [ppIncludedFile]: [[DMOD_NOT_CXX_H:.*/Modules/Inputs/DependsOnModule\.framework[/\\]Headers[/\\]not_cxx\.h]] | {{.*}} | hash loc: <invalid>
-// CHECK-DMOD-NEXT: [ppIncludedFile]: [[DMOD_SUB_H:.*/Modules/Inputs/DependsOnModule\.framework[/\\]Frameworks[/\\]SubFramework\.framework[/\\]Headers[/\\]SubFramework\.h]] | {{.*}} | hash loc: <invalid>
-// CHECK-DMOD-NEXT: [ppIncludedFile]: [[DMOD_SUB_OTHER_H:.*/Modules/Inputs/DependsOnModule.framework[/\\]Frameworks/SubFramework\.framework/Headers/Other\.h]] | name: "SubFramework/Other.h" | hash loc: [[DMOD_SUB_H]]:1:1 | isImport: 0 | isAngled: 0
-// CHECK-DMOD-NEXT: [ppIncludedFile]: [[DMOD_PRIVATE_H:.*/Modules/Inputs/DependsOnModule.framework[/\\]PrivateHeaders[/\\]DependsOnModulePrivate.h]] | {{.*}} | hash loc: <invalid>
+// CHECK-DMOD-NEXT: [ppIncludedFile]: [[DMOD_MODULE_H:.*/Modules/Inputs/DependsOnModule\.framework[/\\]Headers[/\\]DependsOnModule\.h]] | {{.*}} | hash loc: <invalid> | {{.*}} | module: DependsOnModule
+// CHECK-DMOD-NEXT: [ppIncludedFile]: {{.*}}/Modules/Inputs/Module.framework{{[/\\]}}Headers{{[/\\]}}Module.h | name: "Module/Module.h" | hash loc: {{.*}}/Modules/Inputs/DependsOnModule.framework{{[/\\]}}Headers{{[/\\]}}DependsOnModule.h:1:1 | isImport: 0 | isAngled: 1 | isModule: 1 | module: Module
+// CHECK-DMOD-NEXT: [ppIncludedFile]: [[DMOD_OTHER_H:.*/Modules/Inputs/DependsOnModule\.framework[/\\]Headers[/\\]other\.h]] | {{.*}} | hash loc: <invalid> | {{.*}} | module: DependsOnModule
+// CHECK-DMOD-NEXT: [ppIncludedFile]: [[DMOD_NOT_CXX_H:.*/Modules/Inputs/DependsOnModule\.framework[/\\]Headers[/\\]not_cxx\.h]] | {{.*}} | hash loc: <invalid> | {{.*}} | module: DependsOnModule.NotCXX
+// CHECK-DMOD-NEXT: [ppIncludedFile]: [[DMOD_SUB_H:.*/Modules/Inputs/DependsOnModule\.framework[/\\]Frameworks[/\\]SubFramework\.framework[/\\]Headers[/\\]SubFramework\.h]] | {{.*}} | hash loc: <invalid> | {{.*}} | module: DependsOnModule.SubFramework
+// CHECK-DMOD-NEXT: [ppIncludedFile]: [[DMOD_SUB_OTHER_H:.*/Modules/Inputs/DependsOnModule.framework[/\\]Frameworks/SubFramework\.framework/Headers/Other\.h]] | name: "SubFramework/Other.h" | hash loc: [[DMOD_SUB_H]]:1:1 | isImport: 0 | isAngled: 0 | isModule: 0 | module: DependsOnModule.SubFramework.Other
+// CHECK-DMOD-NEXT: [ppIncludedFile]: [[DMOD_PRIVATE_H:.*/Modules/Inputs/DependsOnModule.framework[/\\]PrivateHeaders[/\\]DependsOnModulePrivate.h]] | {{.*}} | hash loc: <invalid> | {{.*}} | module: DependsOnModule.Private.DependsOnModule
// CHECK-DMOD-NEXT: [importedASTFile]: {{.*}}.cache{{[/\\]}}Module.pcm | loc: [[DMOD_MODULE_H]]:1:2 | name: "Module" | isImplicit: 1
// CHECK-DMOD-NEXT: [indexDeclaration]: kind: variable | name: depends_on_module_other | {{.*}} | loc: [[DMOD_OTHER_H]]:1:5
// CHECK-DMOD-NEXT: [indexDeclaration]: kind: variable | name: template | {{.*}} | loc: [[DMOD_NOT_CXX_H]]:1:12
diff --git a/test/Index/index-pch-objc.m b/test/Index/index-pch-objc.m
new file mode 100644
index 000000000000..b9b741f9b7f6
--- /dev/null
+++ b/test/Index/index-pch-objc.m
@@ -0,0 +1,10 @@
+// RUN: c-index-test -write-pch %t.pch -target x86_64-apple-darwin10 %s
+// RUN: env LIBCLANG_NOTHREADS=1 c-index-test -index-tu %t.pch | FileCheck %s
+
+@interface SomeClass
+@property (retain) id foo;
+@end
+@implementation SomeClass
+@end
+
+// CHECK: [indexDeclaration]: kind: objc-ivar | name: _foo
diff --git a/test/Index/index-refs.cpp b/test/Index/index-refs.cpp
index 77e2af71f885..adbf02a7c6e2 100644
--- a/test/Index/index-refs.cpp
+++ b/test/Index/index-refs.cpp
@@ -102,7 +102,7 @@ void foo5() {
// CHECK: [indexDeclaration]: kind: c++-class-template | name: TS | {{.*}} | loc: 47:8
// CHECK-NEXT: [indexDeclaration]: kind: struct-template-partial-spec | name: TS | USR: c:@SP>1#T@TS>#t0.0#I | {{.*}} | loc: 50:8
-// CHECK-NEXT: [indexDeclaration]: kind: typedef | name: MyInt | USR: c:index-refs.cpp@593@SP>1#T@TS>#t0.0#I@T@MyInt | {{.*}} | loc: 51:15 | semantic-container: [TS:50:8] | lexical-container: [TS:50:8]
+// CHECK-NEXT: [indexDeclaration]: kind: typedef | name: MyInt | USR: c:index-refs.cpp@SP>1#T@TS>#t0.0#I@T@MyInt | {{.*}} | loc: 51:15 | semantic-container: [TS:50:8] | lexical-container: [TS:50:8]
/* when indexing implicit instantiations
[indexDeclaration]: kind: struct-template-spec | name: TS | USR: c:@S@TS>#I | {{.*}} | loc: 50:8
[indexDeclaration]: kind: typedef | name: MyInt | USR: c:index-refs.cpp@593@S@TS>#I@T@MyInt | {{.*}} | loc: 51:15 | semantic-container: [TS:50:8] | lexical-container: [TS:50:8]
diff --git a/test/Index/index-templates.cpp b/test/Index/index-templates.cpp
index 05068df5c599..5fcb652cea1a 100644
--- a/test/Index/index-templates.cpp
+++ b/test/Index/index-templates.cpp
@@ -143,7 +143,7 @@ struct SuperPair : Pair<int, int>, Pair<T, U> { };
// CHECK-LOAD: index-templates.cpp:40:8: ClassTemplate=storage:40:8 (Definition) Extent=[39:1 - 40:19]
// CHECK-LOAD: index-templates.cpp:39:45: TemplateTemplateParameter=DataStructure:39:45 (Definition) Extent=[39:10 - 39:66]
// CHECK-LOAD: index-templates.cpp:39:19: TemplateTypeParameter=:39:19 (Definition) Extent=[39:19 - 39:27]
-// CHECK-LOAD: index-templates.cpp:39:37: NonTypeTemplateParameter=:39:37 (Definition) Extent=[39:29 - 39:38]
+// CHECK-LOAD: index-templates.cpp:39:37: NonTypeTemplateParameter=:39:37 (Definition) Extent=[39:29 - 39:37]
// CHECK-LOAD: index-templates.cpp:39:61: TemplateRef=array:37:8 Extent=[39:61 - 39:66]
// CHECK-LOAD: index-templates.cpp:42:18: TypedefDecl=Unsigned:42:18 (Definition) Extent=[42:1 - 42:26]
// CHECK-LOAD: index-templates.cpp:45:8: ClassTemplate=value_c:45:8 Extent=[44:1 - 45:15]
diff --git a/test/Index/load-classes.cpp b/test/Index/load-classes.cpp
index db7b48f7efce..3b66be5398af 100644
--- a/test/Index/load-classes.cpp
+++ b/test/Index/load-classes.cpp
@@ -7,13 +7,24 @@ protected:
~X();
private:
operator X*();
+
+ void constMemberFunction() const;
+ template<typename T>
+ void constMemberFunctionTemplate() const;
+
+ static void staticMemberFunction();
+ template<typename T>
+ static void staticMemberFunctionTemplate();
+
+ virtual void virtualMemberFunction();
+ virtual void pureVirtualMemberFunction() = 0;
};
X::X(int value) {
}
// RUN: c-index-test -test-load-source all %s | FileCheck %s
-// CHECK: load-classes.cpp:3:8: StructDecl=X:3:8 (Definition) Extent=[3:1 - 10:2]
+// CHECK: load-classes.cpp:3:8: StructDecl=X:3:8 (Definition) Extent=[3:1 - 21:2]
// CHECK: load-classes.cpp:4:3: CXXConstructor=X:4:3 Extent=[4:3 - 4:15] [access=public]
// FIXME: missing TypeRef in the constructor name
// CHECK: load-classes.cpp:4:9: ParmDecl=value:4:9 (Definition) Extent=[4:5 - 4:14]
@@ -21,10 +32,21 @@ X::X(int value) {
// FIXME: missing TypeRef in the constructor name
// CHECK: load-classes.cpp:5:14: ParmDecl=x:5:14 (Definition) Extent=[5:5 - 5:15]
// CHECK: load-classes.cpp:5:11: TypeRef=struct X:3:8 Extent=[5:11 - 5:12]
+// CHECK: load-classes.cpp:6:1: CXXAccessSpecifier=:6:1 (Definition) Extent=[6:1 - 6:11] [access=protected]
// CHECK: load-classes.cpp:7:3: CXXDestructor=~X:7:3 Extent=[7:3 - 7:7] [access=protected]
// FIXME: missing TypeRef in the destructor name
-// CHECK: load-classes.cpp:9:3: CXXConversion=operator struct X *:9:3 Extent=[9:3 - 9:16] [access=private]
+// CHECK: load-classes.cpp:8:1: CXXAccessSpecifier=:8:1 (Definition) Extent=[8:1 - 8:9] [access=private]
+// CHECK: load-classes.cpp:9:3: CXXConversion=operator X *:9:3 Extent=[9:3 - 9:16] [access=private]
// CHECK: load-classes.cpp:9:12: TypeRef=struct X:3:8 Extent=[9:12 - 9:13]
-// CHECK: load-classes.cpp:12:4: CXXConstructor=X:12:4 (Definition) Extent=[12:1 - 13:2] [access=public]
-// CHECK: load-classes.cpp:12:1: TypeRef=struct X:3:8 Extent=[12:1 - 12:2]
-// CHECK: load-classes.cpp:12:10: ParmDecl=value:12:10 (Definition) Extent=[12:6 - 12:15]
+// CHECK: load-classes.cpp:11:8: CXXMethod=constMemberFunction:11:8 (const) Extent=[11:3 - 11:35] [access=private]
+// CHECK: load-classes.cpp:13:8: FunctionTemplate=constMemberFunctionTemplate:13:8 (const) Extent=[12:3 - 13:43] [access=private]
+// CHECK: load-classes.cpp:12:21: TemplateTypeParameter=T:12:21 (Definition) Extent=[12:12 - 12:22] [access=public]
+// CHECK: load-classes.cpp:15:15: CXXMethod=staticMemberFunction:15:15 (static) Extent=[15:3 - 15:37] [access=private]
+// CHECK: load-classes.cpp:17:15: FunctionTemplate=staticMemberFunctionTemplate:17:15 (static) Extent=[16:3 - 17:45] [access=private]
+// CHECK: load-classes.cpp:16:21: TemplateTypeParameter=T:16:21 (Definition) Extent=[16:12 - 16:22] [access=public]
+// CHECK: load-classes.cpp:19:16: CXXMethod=virtualMemberFunction:19:16 (virtual) Extent=[19:3 - 19:39] [access=private]
+// CHECK: load-classes.cpp:20:16: CXXMethod=pureVirtualMemberFunction:20:16 (virtual) (pure) Extent=[20:3 - 20:47] [access=private]
+// CHECK: load-classes.cpp:23:4: CXXConstructor=X:23:4 (Definition) Extent=[23:1 - 24:2] [access=public]
+// CHECK: load-classes.cpp:23:1: TypeRef=struct X:3:8 Extent=[23:1 - 23:2]
+// CHECK: load-classes.cpp:23:10: ParmDecl=value:23:10 (Definition) Extent=[23:6 - 23:15]
+// CHECK: load-classes.cpp:23:17: CompoundStmt= Extent=[23:17 - 24:2]
diff --git a/test/Index/load-decls.c b/test/Index/load-decls.c
index e0617c07df42..8d50134b58ae 100644
--- a/test/Index/load-decls.c
+++ b/test/Index/load-decls.c
@@ -6,6 +6,8 @@ enum Color {
Rouge = Red
};
+void PR17970(void (*)(int), float);
+
// RUN: c-index-test -test-load-source all %s | FileCheck %s
// CHECK: load-decls.c:1:6: EnumDecl=Color:1:6 (Definition) Extent=[1:1 - 7:2]
// CHECK: load-decls.c:2:3: EnumConstantDecl=Red:2:3 (Definition) Extent=[2:3 - 2:6]
@@ -13,3 +15,8 @@ enum Color {
// CHECK: load-decls.c:4:3: EnumConstantDecl=Blue:4:3 (Definition) Extent=[4:3 - 4:7]
// CHECK: load-decls.c:6:3: EnumConstantDecl=Rouge:6:3 (Definition) Extent=[6:3 - 6:14]
// CHECK: load-decls.c:6:11: DeclRefExpr=Red:2:3 Extent=[6:11 - 6:14]
+//
+// CHECK: load-decls.c:9:6: FunctionDecl=PR17970:9:6 Extent=[9:1 - 9:35]
+// CHECK: load-decls.c:9:21: ParmDecl=:9:21 (Definition) Extent=[9:14 - 9:27]
+// CHECK: load-decls.c:9:26: ParmDecl=:9:26 (Definition) Extent=[9:23 - 9:26]
+// CHECK: load-decls.c:9:34: ParmDecl=:9:34 (Definition) Extent=[9:29 - 9:34]
diff --git a/test/Index/load-namespaces.cpp b/test/Index/load-namespaces.cpp
index 49de66a81d36..7d83aca1d7d1 100644
--- a/test/Index/load-namespaces.cpp
+++ b/test/Index/load-namespaces.cpp
@@ -40,7 +40,7 @@ namespace my_rel_ops = std::rel_ops;
// CHECK: load-namespaces.cpp:16:17: NamespaceRef=std0x:14:11 Extent=[16:17 - 16:22]
// CHECK: load-namespaces.cpp:18:11: Namespace=std:18:11 (Definition) Extent=[18:1 - 20:2]
// CHECK: load-namespaces.cpp:19:7: FunctionDecl=g:19:7 Extent=[19:3 - 19:13]
-// CHECK: load-namespaces.cpp:19:12: ParmDecl=:19:12 (Definition) Extent=[19:9 - 19:13]
+// CHECK: load-namespaces.cpp:19:12: ParmDecl=:19:12 (Definition) Extent=[19:9 - 19:12]
// CHECK: load-namespaces.cpp:22:12: UsingDeclaration=g[19:7, 10:8] Extent=[22:1 - 22:13]
// CHECK: load-namespaces.cpp:22:7: NamespaceRef=std:18:11 Extent=[22:7 - 22:10]
// CHECK: load-namespaces.cpp:24:11: FunctionDecl=g:24:11 (Definition) Extent=[24:1 - 25:2]
diff --git a/test/Index/local-symbols.m b/test/Index/local-symbols.m
index b4eb262583a9..c7b903a9e457 100644
--- a/test/Index/local-symbols.m
+++ b/test/Index/local-symbols.m
@@ -26,6 +26,12 @@
@interface R8380046 () <Prot8380046>
@end
+@class NSString;
+
+void test() {
+ NSString *s = @"objc str";
+}
+
// CHECK: local-symbols.m:6:12: ObjCInterfaceDecl=Foo:6:12 Extent=[6:1 - 10:5]
// CHECK: local-symbols.m:7:6: ObjCIvarDecl=x:7:6 (Definition) Extent=[7:3 - 7:7]
// CHECK: local-symbols.m:7:3: TypeRef=id:0:0 Extent=[7:3 - 7:5]
@@ -42,3 +48,4 @@
// CHECK: local-symbols.m:26:12: ObjCClassRef=R8380046:23:12 Extent=[26:12 - 26:20]
// CHECK: local-symbols.m:26:25: ObjCProtocolRef=Prot8380046:20:11 Extent=[26:25 - 26:36]
+// CHECK: local-symbols.m:32:17: ObjCStringLiteral="objc str" Extent=[32:17 - 32:28]
diff --git a/test/Index/pch-depending-on-deleted-module.c b/test/Index/pch-depending-on-deleted-module.c
new file mode 100644
index 000000000000..4e85ff0f96b9
--- /dev/null
+++ b/test/Index/pch-depending-on-deleted-module.c
@@ -0,0 +1,14 @@
+#include "a.h"
+
+// RUN: rm -rf %t
+// RUN: mkdir %t
+
+// RUN: %clang_cc1 -x c-header -fmodules -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -emit-pch -I %S/Inputs/Headers -o %t/use_LibA.pch %s
+// RUN: %clang_cc1 -fmodules -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -I %S/Inputs/Headers -verify-pch %t/use_LibA.pch
+// RUN: rm -f %t/modules-cache/LibA.pcm
+// RUN: not %clang_cc1 -fmodules -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -I %S/Inputs/Headers -verify-pch %t/use_LibA.pch 2>&1 | FileCheck -check-prefix=VERIFY %s
+// RUN: not c-index-test -test-load-source all -x c -fmodules -Xclang -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -I %S/Inputs/Headers -include-pch %t/use_LibA.pch %s 2>&1 | FileCheck -check-prefix=INDEX %s
+
+// VERIFY: fatal error: malformed or corrupted AST file: 'Unable to load module
+// INDEX: {{^}}Failure: AST deserialization error occurred{{$}}
+
diff --git a/test/Index/preamble-reparse-cmd-define.c b/test/Index/preamble-reparse-cmd-define.c
index 67ffde1a0cb8..3fa76836d614 100644
--- a/test/Index/preamble-reparse-cmd-define.c
+++ b/test/Index/preamble-reparse-cmd-define.c
@@ -1,6 +1,6 @@
// RUN: c-index-test -write-pch %t.h.pch %s.h
// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_REMAP_AFTER_TRIAL=1 c-index-test -test-load-source-reparse 3 local \
-// RUN: "-remap-file=%s;%s.remap" %s -include %t.h -D CMD_MACRO=1 2>&1 | FileCheck %s
+// RUN: "-remap-file=%s,%s.remap" %s -include %t.h -D CMD_MACRO=1 2>&1 | FileCheck %s
// CHECK-NOT: error:
diff --git a/test/Index/preamble-reparse-warn-end-of-file.c b/test/Index/preamble-reparse-warn-end-of-file.c
new file mode 100644
index 000000000000..c2ae892fbc62
--- /dev/null
+++ b/test/Index/preamble-reparse-warn-end-of-file.c
@@ -0,0 +1,11 @@
+// RUN: mkdir -p %t
+// RUN: touch %t/header.h
+// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 2 local %s -I %t 2>&1 > %t.out.txt | FileCheck -check-prefix=STDERR %s
+// RUN: FileCheck -input-file=%t.out.txt %s
+// CHECK: preamble-reparse-warn-end-of-file.c:[[@LINE+6]]:6: FunctionDecl=test:[[@LINE+6]]:6
+// STDERR: preamble-reparse-warn-end-of-file.c:[[@LINE+5]]:14: error: expected '}'
+// STDERR: preamble-reparse-warn-end-of-file.c:[[@LINE+4]]:14: error: expected '}'
+
+#include "header.h"
+
+void test() {
diff --git a/test/Index/preamble-reparse-warn-macro.c b/test/Index/preamble-reparse-warn-macro.c
new file mode 100644
index 000000000000..e02fbde78403
--- /dev/null
+++ b/test/Index/preamble-reparse-warn-macro.c
@@ -0,0 +1,12 @@
+// RUN: mkdir -p %t
+// RUN: touch %t/header.h
+// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 2 local %s -I %t 2>&1 > %t.out.txt | FileCheck %s
+// CHECK: preamble-reparse-warn-macro.c:[[@LINE+8]]:9: warning: 'MAC' macro redefined
+// CHECK-NEXT: Number FIX-ITs = 0
+// CHECK-NEXT: preamble-reparse-warn-macro.c:[[@LINE+2]]:9: note: previous definition is here
+
+#define MAC 1
+#include "header.h"
+
+void test();
+#define MAC 2
diff --git a/test/Index/preamble-reparse.c b/test/Index/preamble-reparse.c
index 5bd03b3f4de4..a7c87806d507 100644
--- a/test/Index/preamble-reparse.c
+++ b/test/Index/preamble-reparse.c
@@ -1,2 +1,2 @@
-// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 5 local "-remap-file=%S/Inputs/preamble-reparse-1.c;%S/Inputs/preamble-reparse-2.c" %S/Inputs/preamble-reparse-1.c | FileCheck %s
+// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 5 local "-remap-file=%S/Inputs/preamble-reparse-1.c,%S/Inputs/preamble-reparse-2.c" %S/Inputs/preamble-reparse-1.c | FileCheck %s
// CHECK: preamble-reparse-1.c:1:5: VarDecl=x:1:5 Extent=[1:1 - 1:6]
diff --git a/test/Index/preamble.c b/test/Index/preamble.c
index 92a9b84546ff..ae8e1aa6a52c 100644
--- a/test/Index/preamble.c
+++ b/test/Index/preamble.c
@@ -2,13 +2,16 @@
#include "preamble.h"
#include "preamble-with-error.h"
+#define MACRO_UNUSED 1
+#define MACRO_USED 2
+
int wibble(int);
void f(int x) {
-
+ x = MACRO_USED
}
// RUN: c-index-test -write-pch %t.pch -x c-header %S/Inputs/prefix.h
-// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 5 local -I %S/Inputs -include %t %s 2> %t.stderr.txt | FileCheck %s
+// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 5 local -I %S/Inputs -include %t %s -Wunused-macros 2> %t.stderr.txt | FileCheck %s
// RUN: FileCheck -check-prefix CHECK-DIAG %s < %t.stderr.txt
// CHECK: preamble.h:1:12: FunctionDecl=bar:1:12 (Definition) Extent=[1:1 - 6:2]
// CHECK: preamble.h:4:3: BinaryOperator= Extent=[4:3 - 4:13]
@@ -16,10 +19,13 @@ void f(int x) {
// CHECK: preamble.h:4:9: UnexposedExpr=ptr1:3:10 Extent=[4:9 - 4:13]
// CHECK: preamble.h:4:9: DeclRefExpr=ptr1:3:10 Extent=[4:9 - 4:13]
// CHECK: preamble.h:5:10: IntegerLiteral= Extent=[5:10 - 5:11]
-// CHECK: preamble.c:5:5: FunctionDecl=wibble:5:5 Extent=[5:1 - 5:16]
-// CHECK: preamble.c:5:15: ParmDecl=:5:15 (Definition) Extent=[5:12 - 5:16]
+// CHECK: preamble.c:8:5: FunctionDecl=wibble:8:5 Extent=[8:1 - 8:16]
+// CHECK: preamble.c:8:15: ParmDecl=:8:15 (Definition) Extent=[8:12 - 8:15]
// CHECK-DIAG: preamble.h:4:7:{4:9-4:13}: warning: incompatible pointer types assigning to 'int *' from 'float *'
-// RUN: env CINDEXTEST_EDITING=1 c-index-test -code-completion-at=%s:8:1 -I %S/Inputs -include %t %s 2> %t.stderr.txt | FileCheck -check-prefix CHECK-CC %s
+// FIXME: Should see:
+// preamble.c:5:9: warning: macro is not used
+// CHECK-DIAG-NOT: preamble.c:6:9: warning: macro is not used
+// RUN: env CINDEXTEST_EDITING=1 c-index-test -code-completion-at=%s:11:1 -I %S/Inputs -include %t %s 2> %t.stderr.txt | FileCheck -check-prefix CHECK-CC %s
// CHECK-CC: FunctionDecl:{ResultType int}{TypedText bar}{LeftParen (}{Placeholder int i}{RightParen )} (50)
// CHECK-CC: FunctionDecl:{ResultType void}{TypedText f}{LeftParen (}{Placeholder int x}{RightParen )} (50)
// CHECK-CC: FunctionDecl:{ResultType int}{TypedText foo}{LeftParen (}{Placeholder int}{RightParen )} (50)
diff --git a/test/Index/print-type-cxx11.cpp b/test/Index/print-type-cxx11.cpp
index 0ad547377462..1f7522f0a120 100644
--- a/test/Index/print-type-cxx11.cpp
+++ b/test/Index/print-type-cxx11.cpp
@@ -4,5 +4,5 @@ struct RefQualifierTest {
};
// RUN: c-index-test -test-print-type -std=c++11 %s | FileCheck %s
-// CHECK: CXXMethod=f:2:8 (Definition) [type=void () &] [typekind=FunctionProto] lvalue-ref-qualifier [resulttype=void] [resulttypekind=Void] [isPOD=0]
-// CHECK: CXXMethod=f:3:8 (Definition) [type=void () &&] [typekind=FunctionProto] rvalue-ref-qualifier [resulttype=void] [resulttypekind=Void] [isPOD=0]
+// CHECK: CXXMethod=f:2:8 (Definition) [type=void () {{.*}}&] [typekind=FunctionProto] lvalue-ref-qualifier [resulttype=void] [resulttypekind=Void] [isPOD=0]
+// CHECK: CXXMethod=f:3:8 (Definition) [type=void () {{.*}}&&] [typekind=FunctionProto] rvalue-ref-qualifier [resulttype=void] [resulttypekind=Void] [isPOD=0]
diff --git a/test/Index/print-type.c b/test/Index/print-type.c
index 6c7095a4e5f5..35aab711db3d 100644
--- a/test/Index/print-type.c
+++ b/test/Index/print-type.c
@@ -14,27 +14,27 @@ int f2(int incompletearray[]);
// RUN: c-index-test -test-print-type %s | FileCheck %s
// CHECK: FunctionDecl=f:3:6 (Definition) [type=int *(int *, char *, FooType, int *, void (*)(int))] [typekind=FunctionProto] [canonicaltype=int *(int *, char *, int, int *, void (*)(int))] [canonicaltypekind=FunctionProto] [resulttype=int *] [resulttypekind=Pointer] [args= [int *] [Pointer] [char *] [Pointer] [FooType] [Typedef] [int [5]] [ConstantArray] [void (*)(int)] [Pointer]] [isPOD=0]
-// CHECK: ParmDecl=p:3:13 (Definition) [type=int *] [typekind=Pointer] [isPOD=1]
-// CHECK: ParmDecl=x:3:22 (Definition) [type=char *] [typekind=Pointer] [isPOD=1]
+// CHECK: ParmDecl=p:3:13 (Definition) [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int]
+// CHECK: ParmDecl=x:3:22 (Definition) [type=char *] [typekind=Pointer] [isPOD=1] [pointeetype=char] [pointeekind=Char_{{[US]}}]
// CHECK: ParmDecl=z:3:33 (Definition) [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1]
// CHECK: TypeRef=FooType:1:13 [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1]
// CHECK: ParmDecl=arr:3:40 (Definition) [type=int [5]] [typekind=ConstantArray] [isPOD=1]
// CHECK: IntegerLiteral= [type=int] [typekind=Int] [isPOD=1]
-// CHECK: ParmDecl=fn:3:55 (Definition) [type=void (*)(int)] [typekind=Pointer] [canonicaltype=void (*)(int)] [canonicaltypekind=Pointer] [isPOD=1]
+// CHECK: ParmDecl=fn:3:55 (Definition) [type=void (*)(int)] [typekind=Pointer] [canonicaltype=void (*)(int)] [canonicaltypekind=Pointer] [isPOD=1] [pointeetype=void (int)] [pointeekind=Unexposed]
// CHECK: ParmDecl=:3:62 (Definition) [type=int] [typekind=Int] [isPOD=1]
// CHECK: CompoundStmt= [type=] [typekind=Invalid] [isPOD=0]
// CHECK: CallExpr=fn:3:55 [type=void] [typekind=Void] [args= [int] [Int]] [isPOD=0]
-// CHECK: DeclRefExpr=fn:3:55 [type=void (*)(int)] [typekind=Pointer] [canonicaltype=void (*)(int)] [canonicaltypekind=Pointer] [isPOD=1]
+// CHECK: DeclRefExpr=fn:3:55 [type=void (*)(int)] [typekind=Pointer] [canonicaltype=void (*)(int)] [canonicaltypekind=Pointer] [isPOD=1] [pointeetype=void (int)] [pointeekind=Unexposed]
// CHECK: UnaryOperator= [type=int] [typekind=Int] [isPOD=1]
-// CHECK: DeclRefExpr=p:3:13 [type=int *] [typekind=Pointer] [isPOD=1]
+// CHECK: DeclRefExpr=p:3:13 [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int]
// CHECK: DeclStmt= [type=] [typekind=Invalid] [isPOD=0]
// CHECK: VarDecl=w:5:17 (Definition) [type=const FooType] [typekind=Typedef] const [canonicaltype=const int] [canonicaltypekind=Int] [isPOD=1]
// CHECK: TypeRef=FooType:1:13 [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1]
// CHECK: DeclRefExpr=z:3:33 [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1]
// CHECK: ReturnStmt= [type=] [typekind=Invalid] [isPOD=0]
-// CHECK: BinaryOperator= [type=int *] [typekind=Pointer] [isPOD=1]
-// CHECK: BinaryOperator= [type=int *] [typekind=Pointer] [isPOD=1]
-// CHECK: DeclRefExpr=p:3:13 [type=int *] [typekind=Pointer] [isPOD=1]
+// CHECK: BinaryOperator= [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int]
+// CHECK: BinaryOperator= [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int]
+// CHECK: DeclRefExpr=p:3:13 [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int]
// CHECK: DeclRefExpr=z:3:33 [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1]
// CHECK: ArraySubscriptExpr= [type=int] [typekind=Int] [isPOD=1]
// CHECK: UnexposedExpr=arr:3:40 [type=int [5]] [typekind=ConstantArray] [isPOD=1]
diff --git a/test/Index/print-type.cpp b/test/Index/print-type.cpp
index 6324d439a6d5..af5c556c4dc6 100644
--- a/test/Index/print-type.cpp
+++ b/test/Index/print-type.cpp
@@ -5,10 +5,16 @@ struct Foo {
T t;
};
+template <typename T, unsigned U, template<typename> class W>
+struct Baz { };
+
+template <typename... T>
+struct Qux { };
+
namespace inner {
struct Bar {
- Bar(outer::Foo<bool>* foo) { };
+ Bar(outer::Foo<bool>* foo) { }
typedef int FooType;
int *p;
@@ -18,6 +24,8 @@ struct Bar {
}
typedef double OtherType;
typedef int ArrayType[5];
+ Baz<int, 1, Foo> baz;
+ Qux<int, char*, Foo<int>> qux;
};
}
@@ -39,43 +47,74 @@ struct Blob {
};
int Blob::*member_pointer;
-// RUN: c-index-test -test-print-type %s | FileCheck %s
+// RUN: c-index-test -test-print-type %s -std=c++11 | FileCheck %s
// CHECK: Namespace=outer:1:11 (Definition) [type=] [typekind=Invalid] [isPOD=0]
// CHECK: ClassTemplate=Foo:4:8 (Definition) [type=] [typekind=Invalid] [isPOD=0]
// CHECK: TemplateTypeParameter=T:3:19 (Definition) [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0]
// CHECK: FieldDecl=t:5:5 (Definition) [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0]
// CHECK: TypeRef=T:3:19 [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0]
-// CHECK: Namespace=inner:8:11 (Definition) [type=] [typekind=Invalid] [isPOD=0]
-// CHECK: StructDecl=Bar:10:8 (Definition) [type=outer::inner::Bar] [typekind=Record] [isPOD=0]
-// CHECK: CXXConstructor=Bar:11:3 (Definition) [type=void (outer::Foo<bool> *)] [typekind=FunctionProto] [canonicaltype=void (outer::Foo<bool> *)] [canonicaltypekind=FunctionProto] [resulttype=void] [resulttypekind=Void] [args= [outer::Foo<bool> *] [Pointer]] [isPOD=0]
-// CHECK: ParmDecl=foo:11:25 (Definition) [type=outer::Foo<bool> *] [typekind=Pointer] [canonicaltype=outer::Foo<bool> *] [canonicaltypekind=Pointer] [isPOD=1]
+// CHECK: ClassTemplate=Baz:9:8 (Definition) [type=] [typekind=Invalid] [isPOD=0]
+// CHECK: TemplateTypeParameter=T:8:20 (Definition) [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0]
+// CHECK: NonTypeTemplateParameter=U:8:32 (Definition) [type=unsigned int] [typekind=UInt] [isPOD=1]
+// CHECK: TemplateTemplateParameter=W:8:60 (Definition) [type=] [typekind=Invalid] [isPOD=0]
+// CHECK: Namespace=inner:14:11 (Definition) [type=] [typekind=Invalid] [isPOD=0]
+// CHECK: StructDecl=Bar:16:8 (Definition) [type=outer::inner::Bar] [typekind=Record] [isPOD=0]
+// CHECK: CXXConstructor=Bar:17:3 (Definition) [type=void (outer::Foo<bool> *){{.*}}] [typekind=FunctionProto] [canonicaltype=void (outer::Foo<bool> *){{.*}}] [canonicaltypekind=FunctionProto] [resulttype=void] [resulttypekind=Void] [args= [outer::Foo<bool> *] [Pointer]] [isPOD=0]
+// CHECK: ParmDecl=foo:17:25 (Definition) [type=outer::Foo<bool> *] [typekind=Pointer] [canonicaltype=outer::Foo<bool> *] [canonicaltypekind=Pointer] [isPOD=1] [pointeetype=outer::Foo<bool>] [pointeekind=Unexposed]
// CHECK: NamespaceRef=outer:1:11 [type=] [typekind=Invalid] [isPOD=0]
// CHECK: TemplateRef=Foo:4:8 [type=] [typekind=Invalid] [isPOD=0]
// CHECK: CompoundStmt= [type=] [typekind=Invalid] [isPOD=0]
-// CHECK: TypedefDecl=FooType:13:15 (Definition) [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1]
-// CHECK: FieldDecl=p:14:8 (Definition) [type=int *] [typekind=Pointer] [isPOD=1]
-// CHECK: CXXMethod=f:15:8 (Definition) [type=int *(int *, char *, FooType)] [typekind=FunctionProto] [canonicaltype=int *(int *, char *, int)] [canonicaltypekind=FunctionProto] [resulttype=int *] [resulttypekind=Pointer] [args= [int *] [Pointer] [char *] [Pointer] [FooType] [Typedef]] [isPOD=0]
-// CHECK: ParmDecl=p:15:15 (Definition) [type=int *] [typekind=Pointer] [isPOD=1]
-// CHECK: ParmDecl=x:15:24 (Definition) [type=char *] [typekind=Pointer] [isPOD=1]
-// CHECK: ParmDecl=z:15:35 (Definition) [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1]
-// CHECK: TypeRef=FooType:13:15 [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1]
+// CHECK: TypedefDecl=FooType:19:15 (Definition) [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1]
+// CHECK: FieldDecl=p:20:8 (Definition) [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int]
+// CHECK: CXXMethod=f:21:8 (Definition) [type=int *(int *, char *, FooType){{.*}}] [typekind=FunctionProto] [canonicaltype=int *(int *, char *, int){{.*}}] [canonicaltypekind=FunctionProto] [resulttype=int *] [resulttypekind=Pointer] [args= [int *] [Pointer] [char *] [Pointer] [FooType] [Typedef]] [isPOD=0]
+// CHECK: ParmDecl=p:21:15 (Definition) [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int]
+// CHECK: ParmDecl=x:21:24 (Definition) [type=char *] [typekind=Pointer] [isPOD=1] [pointeetype=char] [pointeekind=Char_{{[US]}}]
+// CHECK: ParmDecl=z:21:35 (Definition) [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1]
+// CHECK: TypeRef=FooType:19:15 [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1]
// CHECK: CompoundStmt= [type=] [typekind=Invalid] [isPOD=0]
// CHECK: DeclStmt= [type=] [typekind=Invalid] [isPOD=0]
-// CHECK: VarDecl=w:16:19 (Definition) [type=const FooType] [typekind=Typedef] const [canonicaltype=const int] [canonicaltypekind=Int] [isPOD=1]
-// CHECK: TypeRef=FooType:13:15 [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1]
-// CHECK: DeclRefExpr=z:15:35 [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1]
+// CHECK: VarDecl=w:22:19 (Definition) [type=const FooType] [typekind=Typedef] const [canonicaltype=const int] [canonicaltypekind=Int] [isPOD=1]
+// CHECK: TypeRef=FooType:19:15 [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1]
+// CHECK: UnexposedExpr=z:21:35 [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1]
+// CHECK: DeclRefExpr=z:21:35 [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1]
// CHECK: ReturnStmt= [type=] [typekind=Invalid] [isPOD=0]
-// CHECK: BinaryOperator= [type=int *] [typekind=Pointer] [isPOD=1]
-// CHECK: DeclRefExpr=p:15:15 [type=int *] [typekind=Pointer] [isPOD=1]
-// CHECK: DeclRefExpr=z:15:35 [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1]
-// CHECK: TypedefDecl=OtherType:19:18 (Definition) [type=OtherType] [typekind=Typedef] [canonicaltype=double] [canonicaltypekind=Double] [isPOD=1]
-// CHECK: TypedefDecl=ArrayType:20:15 (Definition) [type=ArrayType] [typekind=Typedef] [canonicaltype=int [5]] [canonicaltypekind=ConstantArray] [isPOD=1]
-// CHECK: FunctionTemplate=tbar:27:3 [type=T (int)] [typekind=FunctionProto] [canonicaltype=type-parameter-0-0 (int)] [canonicaltypekind=FunctionProto] [resulttype=T] [resulttypekind=Unexposed] [isPOD=0]
-// CHECK: TemplateTypeParameter=T:26:20 (Definition) [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0]
-// CHECK: FunctionTemplate=tbar:30:3 [type=T (int *)] [typekind=FunctionProto] [canonicaltype=type-parameter-0-0 (int *)] [canonicaltypekind=FunctionProto] [resulttype=T] [resulttypekind=Unexposed] [isPOD=0]
-// CHECK: ParmDecl=:30:11 (Definition) [type=int [5]] [typekind=ConstantArray] [isPOD=1]
-// CHECK: FunctionTemplate=tbar:33:3 [type=T (int *)] [typekind=FunctionProto] [canonicaltype=type-parameter-0-0 (int *)] [canonicaltypekind=FunctionProto] [resulttype=T] [resulttypekind=Unexposed] [isPOD=0]
-// CHECK: ParmDecl=:33:11 (Definition) [type=int [size]] [typekind=DependentSizedArray] [isPOD=0]
-// CHECK: ParmDecl=incomplete_array:35:21 (Definition) [type=int []] [typekind=IncompleteArray] [isPOD=1]
-// CHECK: VarDecl=variable_array:35:47 (Definition) [type=int [i]] [typekind=VariableArray] [isPOD=1]
-// CHECK: VarDecl=member_pointer:40:12 (Definition) [type=int Blob::*] [typekind=MemberPointer] [isPOD=1]
+// CHECK: BinaryOperator= [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int]
+// CHECK: UnexposedExpr=p:21:15 [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int]
+// CHECK: DeclRefExpr=p:21:15 [type=int *] [typekind=Pointer] [isPOD=1] [pointeetype=int] [pointeekind=Int]
+// CHECK: UnexposedExpr=z:21:35 [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1]
+// CHECK: DeclRefExpr=z:21:35 [type=FooType] [typekind=Typedef] [canonicaltype=int] [canonicaltypekind=Int] [isPOD=1]
+// CHECK: TypedefDecl=OtherType:25:18 (Definition) [type=OtherType] [typekind=Typedef] [canonicaltype=double] [canonicaltypekind=Double] [isPOD=1]
+// CHECK: TypedefDecl=ArrayType:26:15 (Definition) [type=ArrayType] [typekind=Typedef] [canonicaltype=int [5]] [canonicaltypekind=ConstantArray] [isPOD=1]
+// CHECK: IntegerLiteral= [type=int] [typekind=Int] [isPOD=1]
+// CHECK: FieldDecl=baz:27:20 (Definition) [type=Baz<int, 1, Foo>] [typekind=Unexposed] [canonicaltype=outer::Baz<int, 1, Foo>] [canonicaltypekind=Record] [templateargs/3= [type=int] [typekind=Int]] [isPOD=1]
+// CHECK: TemplateRef=Baz:9:8 [type=] [typekind=Invalid] [isPOD=0]
+// CHECK: IntegerLiteral= [type=int] [typekind=Int] [isPOD=1]
+// CHECK: TemplateRef=Foo:4:8 [type=] [typekind=Invalid] [isPOD=0]
+// CHECK: FieldDecl=qux:28:29 (Definition) [type=Qux<int, char *, Foo<int> >] [typekind=Unexposed] [canonicaltype=outer::Qux<int, char *, outer::Foo<int> >] [canonicaltypekind=Record] [templateargs/1=] [isPOD=1]
+// CHECK: TemplateRef=Qux:12:8 [type=] [typekind=Invalid] [isPOD=0]
+// CHECK: TemplateRef=Foo:4:8 [type=] [typekind=Invalid] [isPOD=0]
+// CHECK: FunctionTemplate=tbar:35:3 [type=T (int)] [typekind=FunctionProto] [canonicaltype=type-parameter-0-0 (int)] [canonicaltypekind=FunctionProto] [resulttype=T] [resulttypekind=Unexposed] [isPOD=0]
+// CHECK: TemplateTypeParameter=T:34:20 (Definition) [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0]
+// CHECK: TypeRef=T:34:20 [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0]
+// CHECK: ParmDecl=:35:11 (Definition) [type=int] [typekind=Int] [isPOD=1]
+// CHECK: FunctionTemplate=tbar:38:3 [type=T (int *)] [typekind=FunctionProto] [canonicaltype=type-parameter-0-0 (int *)] [canonicaltypekind=FunctionProto] [resulttype=T] [resulttypekind=Unexposed] [isPOD=0]
+// CHECK: TemplateTypeParameter=T:37:20 (Definition) [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0]
+// CHECK: TypeRef=T:37:20 [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0]
+// CHECK: ParmDecl=:38:11 (Definition) [type=int [5]] [typekind=ConstantArray] [isPOD=1]
+// CHECK: IntegerLiteral= [type=int] [typekind=Int] [isPOD=1]
+// CHECK: FunctionTemplate=tbar:41:3 [type=T (int *)] [typekind=FunctionProto] [canonicaltype=type-parameter-0-0 (int *)] [canonicaltypekind=FunctionProto] [resulttype=T] [resulttypekind=Unexposed] [isPOD=0]
+// CHECK: TemplateTypeParameter=T:40:20 (Definition) [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0]
+// CHECK: NonTypeTemplateParameter=size:40:27 (Definition) [type=int] [typekind=Int] [isPOD=1]
+// CHECK: TypeRef=T:40:20 [type=T] [typekind=Unexposed] [canonicaltype=type-parameter-0-0] [canonicaltypekind=Unexposed] [isPOD=0]
+// CHECK: ParmDecl=:41:11 (Definition) [type=int [size]] [typekind=DependentSizedArray] [isPOD=0]
+// CHECK: DeclRefExpr=size:40:27 [type=int] [typekind=Int] [isPOD=1]
+// CHECK: FunctionDecl=foo:43:6 (Definition) [type=void (int, int *)] [typekind=FunctionProto] [canonicaltype=void (int, int *)] [canonicaltypekind=FunctionProto] [resulttype=void] [resulttypekind=Void] [args= [int] [Int] [int []] [IncompleteArray]] [isPOD=0]
+// CHECK: ParmDecl=i:43:14 (Definition) [type=int] [typekind=Int] [isPOD=1]
+// CHECK: ParmDecl=incomplete_array:43:21 (Definition) [type=int []] [typekind=IncompleteArray] [isPOD=1]
+// CHECK: CompoundStmt= [type=] [typekind=Invalid] [isPOD=0]
+// CHECK: DeclStmt= [type=] [typekind=Invalid] [isPOD=0]
+// CHECK: VarDecl=variable_array:43:47 (Definition) [type=int [i]] [typekind=VariableArray] [isPOD=1]
+// CHECK: DeclRefExpr=i:43:14 [type=int] [typekind=Int] [isPOD=1]
+// CHECK: StructDecl=Blob:45:8 (Definition) [type=Blob] [typekind=Record] [isPOD=1]
+// CHECK: FieldDecl=i:46:7 (Definition) [type=int] [typekind=Int] [isPOD=1]
+// CHECK: VarDecl=member_pointer:48:12 (Definition) [type=int Blob::*] [typekind=MemberPointer] [isPOD=1]
diff --git a/test/Index/print-type.m b/test/Index/print-type.m
index 6f146f80202b..5a4272b131b6 100644
--- a/test/Index/print-type.m
+++ b/test/Index/print-type.m
@@ -12,4 +12,4 @@
// CHECK: ParmDecl=z:4:52 (Definition) [type=SEL] [typekind=ObjCSel] [canonicaltype=SEL *] [canonicaltypekind=Pointer] [isPOD=1]
// CHECK: ObjCInstanceMethodDecl=methodIn:andOut::5:10 (variadic) [Bycopy,] [type=] [typekind=Invalid] [resulttype=id] [resulttypekind=ObjCId] [args= [int] [Int] [short *] [Pointer]] [isPOD=0]
// CHECK: ParmDecl=i:5:27 (Definition) [In,] [type=int] [typekind=Int] [isPOD=1]
-// CHECK: ParmDecl=j:5:49 (Definition) [Out,] [type=short *] [typekind=Pointer] [isPOD=1]
+// CHECK: ParmDecl=j:5:49 (Definition) [Out,] [type=short *] [typekind=Pointer] [isPOD=1] [pointeetype=short] [pointeekind=Short]
diff --git a/test/Index/recursive-cxx-member-calls.cpp b/test/Index/recursive-cxx-member-calls.cpp
index 2cd8d138e9ac..34a56529548f 100644
--- a/test/Index/recursive-cxx-member-calls.cpp
+++ b/test/Index/recursive-cxx-member-calls.cpp
@@ -185,7 +185,7 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo * Name) {
.Default(UnknownAttribute);
}
-// RUN: c-index-test -test-annotate-tokens=%s:1:1:186:1 %s 2>&1 | FileCheck -check-prefix=CHECK-tokens %s
+// RUN: c-index-test -test-annotate-tokens=%s:1:1:186:1 -target x86_64-unknown-unknown %s 2>&1 | FileCheck -check-prefix=CHECK-tokens %s
// CHECK-tokens: Keyword: "typedef" [1:1 - 1:8]
// CHECK-tokens: Keyword: "long" [1:9 - 1:13]
// CHECK-tokens: Keyword: "unsigned" [1:14 - 1:22]
@@ -225,13 +225,13 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo * Name) {
// CHECK-tokens: Keyword: "const" [7:14 - 7:19] ParmDecl=:7:26 (Definition)
// CHECK-tokens: Keyword: "void" [7:20 - 7:24] ParmDecl=:7:26 (Definition)
// CHECK-tokens: Punctuation: "*" [7:25 - 7:26] ParmDecl=:7:26 (Definition)
-// CHECK-tokens: Punctuation: "," [7:26 - 7:27] ParmDecl=:7:26 (Definition)
+// CHECK-tokens: Punctuation: "," [7:26 - 7:27] FunctionDecl=memcmp:7:7
// CHECK-tokens: Keyword: "const" [7:28 - 7:33] ParmDecl=:7:40 (Definition)
// CHECK-tokens: Keyword: "void" [7:34 - 7:38] ParmDecl=:7:40 (Definition)
// CHECK-tokens: Punctuation: "*" [7:39 - 7:40] ParmDecl=:7:40 (Definition)
-// CHECK-tokens: Punctuation: "," [7:40 - 7:41] ParmDecl=:7:40 (Definition)
+// CHECK-tokens: Punctuation: "," [7:40 - 7:41] FunctionDecl=memcmp:7:7
// CHECK-tokens: Identifier: "size_t" [7:42 - 7:48] TypeRef=size_t:2:25
-// CHECK-tokens: Punctuation: ")" [7:48 - 7:49] ParmDecl=:7:48 (Definition)
+// CHECK-tokens: Punctuation: ")" [7:48 - 7:49] FunctionDecl=memcmp:7:7
// CHECK-tokens: Punctuation: ";" [7:49 - 7:50] UnexposedDecl=:6:8 (Definition)
// CHECK-tokens: Identifier: "size_t" [8:3 - 8:9] TypeRef=size_t:2:25
// CHECK-tokens: Identifier: "strlen" [8:10 - 8:16] FunctionDecl=strlen:8:10
@@ -239,7 +239,7 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo * Name) {
// CHECK-tokens: Keyword: "const" [8:17 - 8:22] ParmDecl=:8:29 (Definition)
// CHECK-tokens: Keyword: "char" [8:23 - 8:27] ParmDecl=:8:29 (Definition)
// CHECK-tokens: Punctuation: "*" [8:28 - 8:29] ParmDecl=:8:29 (Definition)
-// CHECK-tokens: Punctuation: ")" [8:29 - 8:30] ParmDecl=:8:29 (Definition)
+// CHECK-tokens: Punctuation: ")" [8:29 - 8:30] FunctionDecl=strlen:8:10
// CHECK-tokens: Punctuation: ";" [8:30 - 8:31]
// CHECK-tokens: Punctuation: "}" [9:1 - 9:2]
// CHECK-tokens: Keyword: "namespace" [10:1 - 10:10]
@@ -1523,7 +1523,7 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo * Name) {
// CHECK-tokens: Punctuation: ";" [185:31 - 185:32] CompoundStmt=
// CHECK-tokens: Punctuation: "}" [186:1 - 186:2] CompoundStmt=
-// RUN: c-index-test -test-load-source all %s -std=c++98 2>&1 | FileCheck %s
+// RUN: c-index-test -test-load-source all %s -std=c++98 -target x86_64-unknown-unknown 2>&1 | FileCheck %s
// CHECK: 1:27: TypedefDecl=__darwin_size_t:1:27 (Definition) Extent=[1:1 - 1:42]
// CHECK: 2:25: TypedefDecl=size_t:2:25 (Definition) Extent=[2:1 - 2:31]
// CHECK: 2:9: TypeRef=__darwin_size_t:1:27 Extent=[2:9 - 2:24]
@@ -1534,13 +1534,13 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo * Name) {
// CHECK: 4:55: FieldDecl=second:4:55 (Definition) Extent=[4:51 - 4:61]
// CHECK: 6:8: UnexposedDecl=:6:8 (Definition) Extent=[6:1 - 9:2]
// CHECK: 7:7: FunctionDecl=memcmp:7:7 Extent=[7:3 - 7:49]
-// CHECK: 7:26: ParmDecl=:7:26 (Definition) Extent=[7:14 - 7:27]
-// CHECK: 7:40: ParmDecl=:7:40 (Definition) Extent=[7:28 - 7:41]
-// CHECK: 7:48: ParmDecl=:7:48 (Definition) Extent=[7:42 - 7:49]
+// CHECK: 7:26: ParmDecl=:7:26 (Definition) Extent=[7:14 - 7:26]
+// CHECK: 7:40: ParmDecl=:7:40 (Definition) Extent=[7:28 - 7:40]
+// CHECK: 7:48: ParmDecl=:7:48 (Definition) Extent=[7:42 - 7:48]
// CHECK: 7:42: TypeRef=size_t:2:25 Extent=[7:42 - 7:48]
// CHECK: 8:10: FunctionDecl=strlen:8:10 Extent=[8:3 - 8:30]
// CHECK: 8:3: TypeRef=size_t:2:25 Extent=[8:3 - 8:9]
-// CHECK: 8:29: ParmDecl=:8:29 (Definition) Extent=[8:17 - 8:30]
+// CHECK: 8:29: ParmDecl=:8:29 (Definition) Extent=[8:17 - 8:29]
// CHECK: 10:17: Namespace=clang:10:17 (Definition) Extent=[10:1 - 35:2]
// CHECK: 11:9: ClassDecl=IdentifierInfo:11:9 Extent=[11:3 - 11:23]
// CHECK: 12:9: ClassDecl=AttributeList:12:9 (Definition) Extent=[12:3 - 34:4]
@@ -1680,17 +1680,17 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo * Name) {
// CHECK: 49:60: MemberRef=Length:44:10 Extent=[49:60 - 49:66]
// CHECK: 49:67: DeclRefExpr=length:49:38 Extent=[49:67 - 49:73]
// CHECK: 49:75: CompoundStmt= Extent=[49:75 - 49:77]
-// CHECK: 50:12: CXXMethod=end:50:12 (Definition) Extent=[50:3 - 50:40]
+// CHECK: 50:12: CXXMethod=end:50:12 (Definition) (const) Extent=[50:3 - 50:40] [access=public]
// CHECK: 50:3: TypeRef=iterator:40:23 Extent=[50:3 - 50:11]
// CHECK: 50:24: CompoundStmt= Extent=[50:24 - 50:40]
// CHECK: 50:26: ReturnStmt= Extent=[50:26 - 50:37]
// CHECK: 50:33: MemberRefExpr=Data:43:15 Extent=[50:33 - 50:37]
-// CHECK: 51:10: CXXMethod=size:51:10 (Definition) Extent=[51:3 - 51:41]
+// CHECK: 51:10: CXXMethod=size:51:10 (Definition) (const) Extent=[51:3 - 51:41] [access=public]
// CHECK: 51:3: TypeRef=size_t:2:25 Extent=[51:3 - 51:9]
// CHECK: 51:23: CompoundStmt= Extent=[51:23 - 51:41]
// CHECK: 51:25: ReturnStmt= Extent=[51:25 - 51:38]
// CHECK: 51:32: MemberRefExpr=Length:44:10 Extent=[51:32 - 51:38]
-// CHECK: 52:8: CXXMethod=startswith:52:8 (Definition) Extent=[52:3 - 55:4]
+// CHECK: 52:8: CXXMethod=startswith:52:8 (Definition) (const) Extent=[52:3 - 55:4] [access=public]
// CHECK: 52:29: ParmDecl=Prefix:52:29 (Definition) Extent=[52:19 - 52:35]
// CHECK: 52:19: TypeRef=class llvm::StringRef:38:7 Extent=[52:19 - 52:28]
// CHECK: 52:43: CompoundStmt= Extent=[52:43 - 55:4]
@@ -1713,7 +1713,7 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo * Name) {
// CHECK: 54:44: MemberRefExpr=Length:44:10 SingleRefName=[54:44 - 54:50] RefName=[54:44 - 54:50] Extent=[54:37 - 54:50]
// CHECK: 54:37: DeclRefExpr=Prefix:52:29 Extent=[54:37 - 54:43]
// CHECK: 54:55: IntegerLiteral= Extent=[54:55 - 54:56]
-// CHECK: 56:8: CXXMethod=endswith:56:8 (Definition) Extent=[56:3 - 59:4]
+// CHECK: 56:8: CXXMethod=endswith:56:8 (Definition) (const) Extent=[56:3 - 59:4] [access=public]
// CHECK: 56:27: ParmDecl=Suffix:56:27 (Definition) Extent=[56:17 - 56:33]
// CHECK: 56:17: TypeRef=class llvm::StringRef:38:7 Extent=[56:17 - 56:26]
// CHECK: 56:41: CompoundStmt= Extent=[56:41 - 59:4]
@@ -1740,7 +1740,7 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo * Name) {
// CHECK: 58:57: MemberRefExpr=Length:44:10 SingleRefName=[58:57 - 58:63] RefName=[58:57 - 58:63] Extent=[58:50 - 58:63]
// CHECK: 58:50: DeclRefExpr=Suffix:56:27 Extent=[58:50 - 58:56]
// CHECK: 58:68: IntegerLiteral= Extent=[58:68 - 58:69]
-// CHECK: 60:13: CXXMethod=substr:60:13 (Definition) Extent=[60:3 - 62:4]
+// CHECK: 60:13: CXXMethod=substr:60:13 (Definition) (const) Extent=[60:3 - 62:4] [access=public]
// CHECK: 60:3: TypeRef=class llvm::StringRef:38:7 Extent=[60:3 - 60:12]
// CHECK: 60:27: ParmDecl=Start:60:27 (Definition) Extent=[60:20 - 60:32]
// CHECK: 60:20: TypeRef=size_t:2:25 Extent=[60:20 - 60:26]
@@ -1769,7 +1769,7 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo * Name) {
// CHECK: 66:7: ClassDecl=IdentifierInfo:66:7 (Definition) Extent=[66:1 - 80:2]
// CHECK: 67:1: CXXAccessSpecifier=:67:1 (Definition) Extent=[67:1 - 67:8]
// CHECK: 67:8: CXXConstructor=IdentifierInfo:67:8 Extent=[67:8 - 67:24]
-// CHECK: 68:15: CXXMethod=getNameStart:68:15 (Definition) Extent=[68:3 - 71:4]
+// CHECK: 68:15: CXXMethod=getNameStart:68:15 (Definition) (const) Extent=[68:3 - 71:4] [access=public]
// CHECK: 68:36: CompoundStmt= Extent=[68:36 - 71:4]
// CHECK: 69:5: DeclStmt= Extent=[69:5 - 69:65]
// CHECK: 69:54: TypedefDecl=actualtype:69:54 (Definition) Extent=[69:5 - 69:64]
@@ -1781,7 +1781,7 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo * Name) {
// CHECK: 70:13: CStyleCastExpr= Extent=[70:13 - 70:38]
// CHECK: 70:20: TypeRef=actualtype:69:54 Extent=[70:20 - 70:30]
// CHECK: 70:34: CXXThisExpr= Extent=[70:34 - 70:38]
-// CHECK: 72:12: CXXMethod=getLength:72:12 (Definition) Extent=[72:3 - 76:4]
+// CHECK: 72:12: CXXMethod=getLength:72:12 (Definition) (const) Extent=[72:3 - 76:4] [access=public]
// CHECK: 72:30: CompoundStmt= Extent=[72:30 - 76:4]
// CHECK: 73:5: DeclStmt= Extent=[73:5 - 73:65]
// CHECK: 73:54: TypedefDecl=actualtype:73:54 (Definition) Extent=[73:5 - 73:64]
@@ -1820,7 +1820,7 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo * Name) {
// CHECK: 75:55: IntegerLiteral= Extent=[75:55 - 75:56]
// CHECK: 75:61: UnexposedExpr= Extent=[75:61 - 75:62]
// CHECK: 75:61: IntegerLiteral= Extent=[75:61 - 75:62]
-// CHECK: 77:19: CXXMethod=getName:77:19 (Definition) Extent=[77:3 - 79:4]
+// CHECK: 77:19: CXXMethod=getName:77:19 (Definition) (const) Extent=[77:3 - 79:4] [access=public]
// CHECK: 77:35: CompoundStmt= Extent=[77:35 - 79:4]
// CHECK: 78:5: ReturnStmt= Extent=[78:5 - 78:56]
// CHECK: 78:12: CallExpr= Extent=[78:12 - 78:56]
@@ -1858,7 +1858,7 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo * Name) {
// CHECK: 90:5: ReturnStmt= Extent=[90:5 - 90:17]
// CHECK: 90:12: UnaryOperator= Extent=[90:12 - 90:17]
// CHECK: 90:13: CXXThisExpr= Extent=[90:13 - 90:17]
-// CHECK: 92:5: CXXMethod=Default:92:5 (Definition) Extent=[92:3 - 94:4]
+// CHECK: 92:5: CXXMethod=Default:92:5 (Definition) (const) Extent=[92:3 - 94:4] [access=public]
// CHECK: 92:23: ParmDecl=Value:92:23 (Definition) Extent=[92:13 - 92:28]
// CHECK: 92:36: CompoundStmt= Extent=[92:36 - 94:4]
// CHECK: 93:5: ReturnStmt= Extent=[93:5 - 93:17]
@@ -1888,7 +1888,7 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo * Name) {
// CHECK: 102:27: UnexposedExpr=StringRef:48:3 Extent=[102:27 - 102:31]
// CHECK: 102:27: CallExpr=StringRef:48:3 Extent=[102:27 - 102:31]
// CHECK: 102:27: UnexposedExpr= Extent=[102:27 - 102:31]
-// CHECK: 102:27: StringLiteral= Extent=[102:27 - 102:31]
+// CHECK: 102:27: StringLiteral="__" Extent=[102:27 - 102:31]
// CHECK: 102:36: CallExpr=endswith:56:8 Extent=[102:36 - 102:59]
// CHECK: 102:45: MemberRefExpr=endswith:56:8 SingleRefName=[102:45 - 102:53] RefName=[102:45 - 102:53] Extent=[102:36 - 102:53]
// CHECK: 102:36: UnexposedExpr=AttrName:101:19 Extent=[102:36 - 102:44]
@@ -1898,7 +1898,7 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo * Name) {
// CHECK: 102:54: UnexposedExpr=StringRef:48:3 Extent=[102:54 - 102:58]
// CHECK: 102:54: CallExpr=StringRef:48:3 Extent=[102:54 - 102:58]
// CHECK: 102:54: UnexposedExpr= Extent=[102:54 - 102:58]
-// CHECK: 102:54: StringLiteral= Extent=[102:54 - 102:58]
+// CHECK: 102:54: StringLiteral="__" Extent=[102:54 - 102:58]
// CHECK: 103:5: CallExpr=operator=:38:7 Extent=[103:5 - 103:55]
// CHECK: 103:5: DeclRefExpr=AttrName:101:19 Extent=[103:5 - 103:13]
// CHECK: 103:14: UnexposedExpr=operator=:38:7
@@ -2085,158 +2085,158 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo * Name) {
// CHECK: 105:54: CallExpr=StringRef:38:7 Extent=[105:54 - 105:62]
// CHECK: 105:54: UnexposedExpr=AttrName:101:19 Extent=[105:54 - 105:62]
// CHECK: 105:54: DeclRefExpr=AttrName:101:19 Extent=[105:54 - 105:62]
-// CHECK: 106:11: StringLiteral= Extent=[106:11 - 106:17]
+// CHECK: 106:11: StringLiteral="weak" Extent=[106:11 - 106:17]
// CHECK: 106:19: DeclRefExpr=AT_weak:29:45 Extent=[106:19 - 106:26]
-// CHECK: 107:11: StringLiteral= Extent=[107:11 - 107:20]
+// CHECK: 107:11: StringLiteral="weakref" Extent=[107:11 - 107:20]
// CHECK: 107:22: DeclRefExpr=AT_weakref:29:54 Extent=[107:22 - 107:32]
-// CHECK: 108:11: StringLiteral= Extent=[108:11 - 108:17]
+// CHECK: 108:11: StringLiteral="pure" Extent=[108:11 - 108:17]
// CHECK: 108:19: DeclRefExpr=AT_pure:26:49 Extent=[108:19 - 108:26]
-// CHECK: 109:11: StringLiteral= Extent=[109:11 - 109:17]
+// CHECK: 109:11: StringLiteral="mode" Extent=[109:11 - 109:17]
// CHECK: 109:19: DeclRefExpr=AT_mode:20:44 Extent=[109:19 - 109:26]
-// CHECK: 110:11: StringLiteral= Extent=[110:11 - 110:17]
+// CHECK: 110:11: StringLiteral="used" Extent=[110:11 - 110:17]
// CHECK: 110:19: DeclRefExpr=AT_used:28:34 Extent=[110:19 - 110:26]
-// CHECK: 111:11: StringLiteral= Extent=[111:11 - 111:18]
+// CHECK: 111:11: StringLiteral="alias" Extent=[111:11 - 111:18]
// CHECK: 111:20: DeclRefExpr=AT_alias:15:25 Extent=[111:20 - 111:28]
-// CHECK: 112:11: StringLiteral= Extent=[112:11 - 112:18]
+// CHECK: 112:11: StringLiteral="align" Extent=[112:11 - 112:18]
// CHECK: 112:20: DeclRefExpr=AT_aligned:15:35 Extent=[112:20 - 112:30]
-// CHECK: 113:11: StringLiteral= Extent=[113:11 - 113:18]
+// CHECK: 113:11: StringLiteral="final" Extent=[113:11 - 113:18]
// CHECK: 113:20: DeclRefExpr=AT_final:19:40 Extent=[113:20 - 113:28]
-// CHECK: 114:11: StringLiteral= Extent=[114:11 - 114:18]
+// CHECK: 114:11: StringLiteral="cdecl" Extent=[114:11 - 114:18]
// CHECK: 114:20: DeclRefExpr=AT_cdecl:17:30 Extent=[114:20 - 114:28]
-// CHECK: 115:11: StringLiteral= Extent=[115:11 - 115:18]
+// CHECK: 115:11: StringLiteral="const" Extent=[115:11 - 115:18]
// CHECK: 115:20: DeclRefExpr=AT_const:17:52 Extent=[115:20 - 115:28]
-// CHECK: 116:11: StringLiteral= Extent=[116:11 - 116:20]
+// CHECK: 116:11: StringLiteral="__const" Extent=[116:11 - 116:20]
// CHECK: 116:22: DeclRefExpr=AT_const:17:52 Extent=[116:22 - 116:30]
-// CHECK: 117:11: StringLiteral= Extent=[117:11 - 117:19]
+// CHECK: 117:11: StringLiteral="blocks" Extent=[117:11 - 117:19]
// CHECK: 117:21: DeclRefExpr=AT_blocks:16:57 Extent=[117:21 - 117:30]
-// CHECK: 118:11: StringLiteral= Extent=[118:11 - 118:19]
+// CHECK: 118:11: StringLiteral="format" Extent=[118:11 - 118:19]
// CHECK: 118:21: DeclRefExpr=AT_format:19:50 Extent=[118:21 - 118:30]
-// CHECK: 119:11: StringLiteral= Extent=[119:11 - 119:19]
+// CHECK: 119:11: StringLiteral="hiding" Extent=[119:11 - 119:19]
// CHECK: 119:21: DeclRefExpr=AT_hiding:20:22 Extent=[119:21 - 119:30]
-// CHECK: 120:11: StringLiteral= Extent=[120:11 - 120:19]
+// CHECK: 120:11: StringLiteral="malloc" Extent=[120:11 - 120:19]
// CHECK: 120:21: DeclRefExpr=AT_malloc:20:33 Extent=[120:21 - 120:30]
-// CHECK: 121:11: StringLiteral= Extent=[121:11 - 121:19]
+// CHECK: 121:11: StringLiteral="packed" Extent=[121:11 - 121:19]
// CHECK: 121:21: DeclRefExpr=AT_packed:26:27 Extent=[121:21 - 121:30]
-// CHECK: 122:11: StringLiteral= Extent=[122:11 - 122:19]
+// CHECK: 122:11: StringLiteral="unused" Extent=[122:11 - 122:19]
// CHECK: 122:21: DeclRefExpr=AT_unused:28:23 Extent=[122:21 - 122:30]
-// CHECK: 123:11: StringLiteral= Extent=[123:11 - 123:20]
+// CHECK: 123:11: StringLiteral="aligned" Extent=[123:11 - 123:20]
// CHECK: 123:22: DeclRefExpr=AT_aligned:15:35 Extent=[123:22 - 123:32]
-// CHECK: 124:11: StringLiteral= Extent=[124:11 - 124:20]
+// CHECK: 124:11: StringLiteral="cleanup" Extent=[124:11 - 124:20]
// CHECK: 124:22: DeclRefExpr=AT_cleanup:17:40 Extent=[124:22 - 124:32]
-// CHECK: 125:11: StringLiteral= Extent=[125:11 - 125:18]
+// CHECK: 125:11: StringLiteral="naked" Extent=[125:11 - 125:18]
// CHECK: 125:20: DeclRefExpr=AT_naked:20:53 Extent=[125:20 - 125:28]
-// CHECK: 126:11: StringLiteral= Extent=[126:11 - 126:20]
+// CHECK: 126:11: StringLiteral="nodebug" Extent=[126:11 - 126:20]
// CHECK: 126:22: DeclRefExpr=AT_nodebug:20:63 Extent=[126:22 - 126:32]
-// CHECK: 127:11: StringLiteral= Extent=[127:11 - 127:20]
+// CHECK: 127:11: StringLiteral="nonnull" Extent=[127:11 - 127:20]
// CHECK: 127:22: DeclRefExpr=AT_nonnull:21:47 Extent=[127:22 - 127:32]
-// CHECK: 128:11: StringLiteral= Extent=[128:11 - 128:20]
+// CHECK: 128:11: StringLiteral="nothrow" Extent=[128:11 - 128:20]
// CHECK: 128:22: DeclRefExpr=AT_nothrow:22:7 Extent=[128:22 - 128:32]
-// CHECK: 129:11: StringLiteral= Extent=[129:11 - 129:20]
+// CHECK: 129:11: StringLiteral="objc_gc" Extent=[129:11 - 129:20]
// CHECK: 129:22: DeclRefExpr=AT_objc_gc:24:59 Extent=[129:22 - 129:32]
-// CHECK: 130:11: StringLiteral= Extent=[130:11 - 130:20]
+// CHECK: 130:11: StringLiteral="regparm" Extent=[130:11 - 130:20]
// CHECK: 130:22: DeclRefExpr=AT_regparm:26:58 Extent=[130:22 - 130:32]
-// CHECK: 131:11: StringLiteral= Extent=[131:11 - 131:20]
+// CHECK: 131:11: StringLiteral="section" Extent=[131:11 - 131:20]
// CHECK: 131:22: DeclRefExpr=AT_section:27:7 Extent=[131:22 - 131:32]
-// CHECK: 132:11: StringLiteral= Extent=[132:11 - 132:20]
+// CHECK: 132:11: StringLiteral="stdcall" Extent=[132:11 - 132:20]
// CHECK: 132:22: DeclRefExpr=AT_stdcall:27:32 Extent=[132:22 - 132:32]
-// CHECK: 133:11: StringLiteral= Extent=[133:11 - 133:21]
+// CHECK: 133:11: StringLiteral="annotate" Extent=[133:11 - 133:21]
// CHECK: 133:23: DeclRefExpr=AT_annotate:16:29 Extent=[133:23 - 133:34]
-// CHECK: 134:11: StringLiteral= Extent=[134:11 - 134:21]
+// CHECK: 134:11: StringLiteral="fastcall" Extent=[134:11 - 134:21]
// CHECK: 134:23: DeclRefExpr=AT_fastcall:19:27 Extent=[134:23 - 134:34]
-// CHECK: 135:11: StringLiteral= Extent=[135:11 - 135:21]
+// CHECK: 135:11: StringLiteral="ibaction" Extent=[135:11 - 135:21]
// CHECK: 135:23: DeclRefExpr=AT_IBAction:14:7 Extent=[135:23 - 135:34]
-// CHECK: 136:11: StringLiteral= Extent=[136:11 - 136:21]
+// CHECK: 136:11: StringLiteral="iboutlet" Extent=[136:11 - 136:21]
// CHECK: 136:23: DeclRefExpr=AT_IBOutlet:14:20 Extent=[136:23 - 136:34]
-// CHECK: 137:11: StringLiteral= Extent=[137:11 - 137:31]
+// CHECK: 137:11: StringLiteral="iboutletcollection" Extent=[137:11 - 137:31]
// CHECK: 137:33: DeclRefExpr=AT_IBOutletCollection:14:33 Extent=[137:33 - 137:54]
-// CHECK: 138:11: StringLiteral= Extent=[138:11 - 138:21]
+// CHECK: 138:11: StringLiteral="noreturn" Extent=[138:11 - 138:21]
// CHECK: 138:23: DeclRefExpr=AT_noreturn:21:59 Extent=[138:23 - 138:34]
-// CHECK: 139:11: StringLiteral= Extent=[139:11 - 139:21]
+// CHECK: 139:11: StringLiteral="noinline" Extent=[139:11 - 139:21]
// CHECK: 139:23: DeclRefExpr=AT_noinline:21:7 Extent=[139:23 - 139:34]
-// CHECK: 140:11: StringLiteral= Extent=[140:11 - 140:21]
+// CHECK: 140:11: StringLiteral="override" Extent=[140:11 - 140:21]
// CHECK: 140:23: DeclRefExpr=AT_override:22:51 Extent=[140:23 - 140:34]
-// CHECK: 141:11: StringLiteral= Extent=[141:11 - 141:21]
+// CHECK: 141:11: StringLiteral="sentinel" Extent=[141:11 - 141:21]
// CHECK: 141:23: DeclRefExpr=AT_sentinel:27:19 Extent=[141:23 - 141:34]
-// CHECK: 142:11: StringLiteral= Extent=[142:11 - 142:21]
+// CHECK: 142:11: StringLiteral="NSObject" Extent=[142:11 - 142:21]
// CHECK: 142:23: DeclRefExpr=AT_nsobject:22:19 Extent=[142:23 - 142:34]
-// CHECK: 143:11: StringLiteral= Extent=[143:11 - 143:22]
+// CHECK: 143:11: StringLiteral="dllimport" Extent=[143:11 - 143:22]
// CHECK: 143:24: DeclRefExpr=AT_dllimport:18:51 Extent=[143:24 - 143:36]
-// CHECK: 144:11: StringLiteral= Extent=[144:11 - 144:22]
+// CHECK: 144:11: StringLiteral="dllexport" Extent=[144:11 - 144:22]
// CHECK: 144:24: DeclRefExpr=AT_dllexport:18:37 Extent=[144:24 - 144:36]
-// CHECK: 145:11: StringLiteral= Extent=[145:11 - 145:22]
-// CHECK: 146:11: StringLiteral= Extent=[146:11 - 146:23]
+// CHECK: 145:11: StringLiteral="may_alias" Extent=[145:11 - 145:22]
+// CHECK: 146:11: StringLiteral="base_check" Extent=[146:11 - 146:23]
// CHECK: 146:25: DeclRefExpr=AT_base_check:16:42 Extent=[146:25 - 146:38]
-// CHECK: 147:11: StringLiteral= Extent=[147:11 - 147:23]
+// CHECK: 147:11: StringLiteral="deprecated" Extent=[147:11 - 147:23]
// CHECK: 147:25: DeclRefExpr=AT_deprecated:18:7 Extent=[147:25 - 147:38]
-// CHECK: 148:11: StringLiteral= Extent=[148:11 - 148:23]
+// CHECK: 148:11: StringLiteral="visibility" Extent=[148:11 - 148:23]
// CHECK: 148:25: DeclRefExpr=AT_visibility:29:7 Extent=[148:25 - 148:38]
-// CHECK: 149:11: StringLiteral= Extent=[149:11 - 149:23]
+// CHECK: 149:11: StringLiteral="destructor" Extent=[149:11 - 149:23]
// CHECK: 149:25: DeclRefExpr=AT_destructor:18:22 Extent=[149:25 - 149:38]
-// CHECK: 150:11: StringLiteral= Extent=[150:11 - 150:23]
+// CHECK: 150:11: StringLiteral="format_arg" Extent=[150:11 - 150:23]
// CHECK: 150:25: DeclRefExpr=AT_format_arg:19:61 Extent=[150:25 - 150:38]
-// CHECK: 151:11: StringLiteral= Extent=[151:11 - 151:23]
+// CHECK: 151:11: StringLiteral="gnu_inline" Extent=[151:11 - 151:23]
// CHECK: 151:25: DeclRefExpr=AT_gnu_inline:20:7 Extent=[151:25 - 151:38]
-// CHECK: 152:11: StringLiteral= Extent=[152:11 - 152:24]
+// CHECK: 152:11: StringLiteral="weak_import" Extent=[152:11 - 152:24]
// CHECK: 152:26: DeclRefExpr=AT_weak_import:30:7 Extent=[152:26 - 152:40]
-// CHECK: 153:11: StringLiteral= Extent=[153:11 - 153:22]
+// CHECK: 153:11: StringLiteral="vecreturn" Extent=[153:11 - 153:22]
// CHECK: 153:24: DeclRefExpr=AT_vecreturn:28:43 Extent=[153:24 - 153:36]
-// CHECK: 154:11: StringLiteral= Extent=[154:11 - 154:24]
+// CHECK: 154:11: StringLiteral="vector_size" Extent=[154:11 - 154:24]
// CHECK: 154:26: DeclRefExpr=AT_vector_size:28:57 Extent=[154:26 - 154:40]
-// CHECK: 155:11: StringLiteral= Extent=[155:11 - 155:24]
+// CHECK: 155:11: StringLiteral="constructor" Extent=[155:11 - 155:24]
// CHECK: 155:26: DeclRefExpr=AT_constructor:17:62 Extent=[155:26 - 155:40]
-// CHECK: 156:11: StringLiteral= Extent=[156:11 - 156:24]
+// CHECK: 156:11: StringLiteral="unavailable" Extent=[156:11 - 156:24]
// CHECK: 156:26: DeclRefExpr=AT_unavailable:28:7 Extent=[156:26 - 156:40]
-// CHECK: 157:11: StringLiteral= Extent=[157:11 - 157:25]
+// CHECK: 157:11: StringLiteral="overloadable" Extent=[157:11 - 157:25]
// CHECK: 157:27: DeclRefExpr=AT_overloadable:25:7 Extent=[157:27 - 157:42]
-// CHECK: 158:11: StringLiteral= Extent=[158:11 - 158:26]
+// CHECK: 158:11: StringLiteral="address_space" Extent=[158:11 - 158:26]
// CHECK: 158:28: DeclRefExpr=AT_address_space:15:7 Extent=[158:28 - 158:44]
-// CHECK: 159:11: StringLiteral= Extent=[159:11 - 159:26]
+// CHECK: 159:11: StringLiteral="always_inline" Extent=[159:11 - 159:26]
// CHECK: 159:28: DeclRefExpr=AT_always_inline:15:47 Extent=[159:28 - 159:44]
-// CHECK: 160:11: StringLiteral= Extent=[160:11 - 160:26]
-// CHECK: 161:11: StringLiteral= Extent=[161:11 - 161:26]
-// CHECK: 162:11: StringLiteral= Extent=[162:11 - 162:27]
+// CHECK: 160:11: StringLiteral="returns_twice" Extent=[160:11 - 160:26]
+// CHECK: 161:11: StringLiteral="vec_type_hint" Extent=[161:11 - 161:26]
+// CHECK: 162:11: StringLiteral="objc_exception" Extent=[162:11 - 162:27]
// CHECK: 162:29: DeclRefExpr=AT_objc_exception:22:32 Extent=[162:29 - 162:46]
-// CHECK: 163:11: StringLiteral= Extent=[163:11 - 163:28]
+// CHECK: 163:11: StringLiteral="ext_vector_type" Extent=[163:11 - 163:28]
// CHECK: 163:30: DeclRefExpr=AT_ext_vector_type:19:7 Extent=[163:30 - 163:48]
-// CHECK: 164:11: StringLiteral= Extent=[164:11 - 164:30]
+// CHECK: 164:11: StringLiteral="transparent_union" Extent=[164:11 - 164:30]
// CHECK: 164:32: DeclRefExpr=AT_transparent_union:27:57 Extent=[164:32 - 164:52]
-// CHECK: 165:11: StringLiteral= Extent=[165:11 - 165:30]
+// CHECK: 165:11: StringLiteral="analyzer_noreturn" Extent=[165:11 - 165:30]
// CHECK: 165:32: DeclRefExpr=AT_analyzer_noreturn:16:7 Extent=[165:32 - 165:52]
-// CHECK: 166:11: StringLiteral= Extent=[166:11 - 166:31]
+// CHECK: 166:11: StringLiteral="warn_unused_result" Extent=[166:11 - 166:31]
// CHECK: 166:33: DeclRefExpr=AT_warn_unused_result:29:22 Extent=[166:33 - 166:54]
-// CHECK: 167:11: StringLiteral= Extent=[167:11 - 167:31]
+// CHECK: 167:11: StringLiteral="carries_dependency" Extent=[167:11 - 167:31]
// CHECK: 167:33: DeclRefExpr=AT_carries_dependency:17:7 Extent=[167:33 - 167:54]
-// CHECK: 168:11: StringLiteral= Extent=[168:11 - 168:36]
+// CHECK: 168:11: StringLiteral="ns_returns_not_retained" Extent=[168:11 - 168:36]
// CHECK: 168:38: DeclRefExpr=AT_ns_returns_not_retained:24:7 Extent=[168:38 - 168:64]
-// CHECK: 169:11: StringLiteral= Extent=[169:11 - 169:32]
+// CHECK: 169:11: StringLiteral="ns_returns_retained" Extent=[169:11 - 169:32]
// CHECK: 169:34: DeclRefExpr=AT_ns_returns_retained:24:35 Extent=[169:34 - 169:56]
-// CHECK: 170:11: StringLiteral= Extent=[170:11 - 170:36]
+// CHECK: 170:11: StringLiteral="cf_returns_not_retained" Extent=[170:11 - 170:36]
// CHECK: 170:38: DeclRefExpr=AT_cf_returns_not_retained:23:7 Extent=[170:38 - 170:64]
-// CHECK: 171:11: StringLiteral= Extent=[171:11 - 171:32]
+// CHECK: 171:11: StringLiteral="cf_returns_retained" Extent=[171:11 - 171:32]
// CHECK: 171:34: DeclRefExpr=AT_cf_returns_retained:23:35 Extent=[171:34 - 171:56]
-// CHECK: 172:11: StringLiteral= Extent=[172:11 - 172:30]
+// CHECK: 172:11: StringLiteral="ownership_returns" Extent=[172:11 - 172:30]
// CHECK: 172:32: DeclRefExpr=AT_ownership_returns:25:44 Extent=[172:32 - 172:52]
-// CHECK: 173:11: StringLiteral= Extent=[173:11 - 173:28]
+// CHECK: 173:11: StringLiteral="ownership_holds" Extent=[173:11 - 173:28]
// CHECK: 173:30: DeclRefExpr=AT_ownership_holds:25:24 Extent=[173:30 - 173:48]
-// CHECK: 174:11: StringLiteral= Extent=[174:11 - 174:28]
+// CHECK: 174:11: StringLiteral="ownership_takes" Extent=[174:11 - 174:28]
// CHECK: 174:30: DeclRefExpr=AT_ownership_takes:26:7 Extent=[174:30 - 174:48]
-// CHECK: 175:11: StringLiteral= Extent=[175:11 - 175:33]
+// CHECK: 175:11: StringLiteral="reqd_work_group_size" Extent=[175:11 - 175:33]
// CHECK: 175:35: DeclRefExpr=AT_reqd_wg_size:30:23 Extent=[175:35 - 175:50]
-// CHECK: 176:11: StringLiteral= Extent=[176:11 - 176:26]
+// CHECK: 176:11: StringLiteral="init_priority" Extent=[176:11 - 176:26]
// CHECK: 176:28: DeclRefExpr=AT_init_priority:30:40 Extent=[176:28 - 176:44]
-// CHECK: 177:11: StringLiteral= Extent=[177:11 - 177:35]
+// CHECK: 177:11: StringLiteral="no_instrument_function" Extent=[177:11 - 177:35]
// CHECK: 177:37: DeclRefExpr=AT_no_instrument_function:21:20 Extent=[177:37 - 177:62]
-// CHECK: 178:11: StringLiteral= Extent=[178:11 - 178:21]
+// CHECK: 178:11: StringLiteral="thiscall" Extent=[178:11 - 178:21]
// CHECK: 178:23: DeclRefExpr=AT_thiscall:27:44 Extent=[178:23 - 178:34]
-// CHECK: 179:11: StringLiteral= Extent=[179:11 - 179:19]
+// CHECK: 179:11: StringLiteral="pascal" Extent=[179:11 - 179:19]
// CHECK: 179:21: DeclRefExpr=AT_pascal:26:38 Extent=[179:21 - 179:30]
-// CHECK: 180:11: StringLiteral= Extent=[180:11 - 180:20]
+// CHECK: 180:11: StringLiteral="__cdecl" Extent=[180:11 - 180:20]
// CHECK: 180:22: DeclRefExpr=AT_cdecl:17:30 Extent=[180:22 - 180:30]
-// CHECK: 181:11: StringLiteral= Extent=[181:11 - 181:22]
+// CHECK: 181:11: StringLiteral="__stdcall" Extent=[181:11 - 181:22]
// CHECK: 181:24: DeclRefExpr=AT_stdcall:27:32 Extent=[181:24 - 181:34]
-// CHECK: 182:11: StringLiteral= Extent=[182:11 - 182:23]
+// CHECK: 182:11: StringLiteral="__fastcall" Extent=[182:11 - 182:23]
// CHECK: 182:25: DeclRefExpr=AT_fastcall:19:27 Extent=[182:25 - 182:36]
-// CHECK: 183:11: StringLiteral= Extent=[183:11 - 183:23]
+// CHECK: 183:11: StringLiteral="__thiscall" Extent=[183:11 - 183:23]
// CHECK: 183:25: DeclRefExpr=AT_thiscall:27:44 Extent=[183:25 - 183:36]
-// CHECK: 184:11: StringLiteral= Extent=[184:11 - 184:21]
+// CHECK: 184:11: StringLiteral="__pascal" Extent=[184:11 - 184:21]
// CHECK: 184:23: DeclRefExpr=AT_pascal:26:38 Extent=[184:23 - 184:32]
diff --git a/test/Index/remap-complete.c b/test/Index/remap-complete.c
index 93fb6236c243..ffc467f4a7bd 100644
--- a/test/Index/remap-complete.c
+++ b/test/Index/remap-complete.c
@@ -1,4 +1,4 @@
-// RUN: c-index-test -code-completion-at=%s:6:2 -remap-file="%s;%S/Inputs/remap-complete-to.c" %s | FileCheck %s
+// RUN: c-index-test -code-completion-at=%s:6:2 -remap-file="%s,%S/Inputs/remap-complete-to.c" %s | FileCheck %s
// CHECK: FunctionDecl:{ResultType int}{TypedText f0}{LeftParen (}
void f() { }
diff --git a/test/Index/remap-cursor-at.c b/test/Index/remap-cursor-at.c
index c2bed0e69cac..782b6bbad7f1 100644
--- a/test/Index/remap-cursor-at.c
+++ b/test/Index/remap-cursor-at.c
@@ -1,4 +1,4 @@
-// RUN: c-index-test -cursor-at=%s:1:15 -cursor-at=%s:2:21 -remap-file="%s;%S/Inputs/remap-load-to.c" %s | FileCheck %s
+// RUN: c-index-test -cursor-at=%s:1:15 -cursor-at=%s:2:21 -remap-file="%s,%S/Inputs/remap-load-to.c" %s | FileCheck %s
// CHECK: ParmDecl=parm1:1:13 (Definition)
// CHECK: DeclRefExpr=parm2:1:26
diff --git a/test/Index/remap-load.c b/test/Index/remap-load.c
index 260887469f6c..f433fa7eac75 100644
--- a/test/Index/remap-load.c
+++ b/test/Index/remap-load.c
@@ -1,4 +1,4 @@
-// RUN: c-index-test -test-load-source all -remap-file="%s;%S/Inputs/remap-load-to.c" %s | FileCheck -check-prefix=CHECK %s
+// RUN: c-index-test -test-load-source all -remap-file="%s,%S/Inputs/remap-load-to.c" %s | FileCheck -check-prefix=CHECK %s
// CHECK: remap-load.c:1:5: FunctionDecl=foo:1:5 (Definition) Extent=[1:1 - 3:2]
// CHECK: remap-load.c:1:13: ParmDecl=parm1:1:13 (Definition) Extent=[1:9 - 1:18]
diff --git a/test/Index/reparse-with-remaps/reparse.c b/test/Index/reparse-with-remaps/reparse.c
new file mode 100644
index 000000000000..617626b15e32
--- /dev/null
+++ b/test/Index/reparse-with-remaps/reparse.c
@@ -0,0 +1,8 @@
+// RUN: env CINDEXTEST_EDITING=1 CINDEXTEST_COMPLETION_BRIEF_COMMENTS=1 LIBCLANG_DISABLE_CRASH_RECOVERY=1 \
+// RUN: c-index-test -test-load-source-reparse 2 all -remap-file-0="%S/test.h,%S/test.h-0" -remap-file-1="%S/test.h,%S/test.h-1" -- %s
+
+#include "test.h"
+
+void foo() {
+ bar();
+}
diff --git a/test/Index/reparse-with-remaps/test.h b/test/Index/reparse-with-remaps/test.h
new file mode 100644
index 000000000000..3e2adb043be3
--- /dev/null
+++ b/test/Index/reparse-with-remaps/test.h
@@ -0,0 +1,3 @@
+
+/// Comment for bar
+void bar(void);
diff --git a/test/Index/reparse-with-remaps/test.h-0 b/test/Index/reparse-with-remaps/test.h-0
new file mode 100644
index 000000000000..0d666a7d8eb5
--- /dev/null
+++ b/test/Index/reparse-with-remaps/test.h-0
@@ -0,0 +1,6 @@
+void test1(void);
+
+/// Comment for bar
+void bar(void);
+void test3(void);
+
diff --git a/test/Index/reparse-with-remaps/test.h-1 b/test/Index/reparse-with-remaps/test.h-1
new file mode 100644
index 000000000000..1eed01e00e98
--- /dev/null
+++ b/test/Index/reparse-with-remaps/test.h-1
@@ -0,0 +1,6 @@
+
+void test1(void);
+void test2(void);
+
+/// Comment for bar
+void bar(void);
diff --git a/test/Index/retain-comments-from-system-headers.c b/test/Index/retain-comments-from-system-headers.c
index 67a0fd05f5de..490699dbd884 100644
--- a/test/Index/retain-comments-from-system-headers.c
+++ b/test/Index/retain-comments-from-system-headers.c
@@ -8,12 +8,16 @@
*/
int user_function(int a);
+// RUN: rm -rf %t/cache
// RUN: c-index-test -test-load-source all %s -I %S/Inputs | FileCheck %s
// RUN: c-index-test -test-load-source all %s -fretain-comments-from-system-headers -I %S/Inputs | FileCheck %s -check-prefix=CHECK-RETAIN
+// Modules:
+// RUN: c-index-test -test-load-source all %s -I %S/Inputs -fmodules -fmodules-cache-path=%t/cache -fmodule-map-file=%S/Inputs/retain-comments-from-system-headers-module.map | FileCheck %s -check-prefix=CHECK
+// RUN: c-index-test -test-load-source all %s -fretain-comments-from-system-headers -I %S/Inputs -fmodules -fmodules-cache-path=%t/cache -fmodule-map-file=%S/Inputs/retain-comments-from-system-headers-module.map | FileCheck %s -check-prefix=CHECK-RETAIN
+
// CHECK: retain-comments-from-system-headers.h:7:5: FunctionDecl=system_function:7:5 Extent=[7:1 - 7:27]
// CHECK: retain-comments-from-system-headers.c:9:5: FunctionDecl=user_function:9:5 RawComment=[/**\n * user_function\n * \param a Aaa.\n */] RawCommentRange=[5:1 - 8:4] BriefComment=[user_function]
// CHECK-RETAIN: retain-comments-from-system-headers.h:7:5: FunctionDecl=system_function:7:5 RawComment=[/**\n * system_function\n * \param a Aaa.\n */] RawCommentRange=[3:1 - 6:4] BriefComment=[system_function]
// CHECK-RETAIN: retain-comments-from-system-headers.c:9:5: FunctionDecl=user_function:9:5 RawComment=[/**\n * user_function\n * \param a Aaa.\n */] RawCommentRange=[5:1 - 8:4] BriefComment=[user_function]
-
diff --git a/test/Index/skipped-ranges.c b/test/Index/skipped-ranges.c
new file mode 100644
index 000000000000..bd16fb3856b2
--- /dev/null
+++ b/test/Index/skipped-ranges.c
@@ -0,0 +1,25 @@
+#define cool
+
+#if defined(cool)
+
+#if defined(really_cool)
+#endif // really_cool
+
+#elif defined(hot)
+// hot
+
+
+#endif // trailing comment
+
+#ifndef cool
+#ifndef uncool
+
+int probably_hot = 1;
+
+#endif // uncool
+#endif // cool
+
+// RUN: env CINDEXTEST_SHOW_SKIPPED_RANGES=1 c-index-test -test-annotate-tokens=%s:1:1:16:1 %s | FileCheck %s
+// CHECK: Skipping: [5:2 - 6:7]
+// CHECK: Skipping: [8:2 - 12:7]
+// CHECK: Skipping: [14:2 - 20:7]
diff --git a/test/Index/usrs.cpp b/test/Index/usrs.cpp
index e350f5cedf0c..909ce75922a9 100644
--- a/test/Index/usrs.cpp
+++ b/test/Index/usrs.cpp
@@ -85,7 +85,7 @@ void rdar9371763() {
// CHECK: usrs.cpp c:@N@foo@F@bar#I# Extent=[3:3 - 3:18]
// CHECK: usrs.cpp c:usrs.cpp@36@N@foo@F@bar#I#@z Extent=[3:12 - 3:17]
// CHECK: usrs.cpp c:@N@bar Extent=[5:1 - 8:2]
-// CHECK: usrs.cpp c:usrs.cpp@64@N@bar@T@QType Extent=[6:3 - 6:20]
+// CHECK: usrs.cpp c:usrs.cpp@N@bar@T@QType Extent=[6:3 - 6:20]
// CHECK: usrs.cpp c:@N@bar@F@bar#I# Extent=[7:3 - 7:20]
// CHECK: usrs.cpp c:usrs.cpp@94@N@bar@F@bar#I#@z Extent=[7:12 - 7:19]
// CHECK: usrs.cpp c:@C@ClsA Extent=[10:1 - 14:2]
@@ -101,13 +101,13 @@ void rdar9371763() {
// CHECK: usrs.cpp c:@N@foo@C@ClsB@F@ClsB# Extent=[19:5 - 19:27]
// CHECK: usrs.cpp c:@N@foo@C@ClsB@F@result#1 Extent=[20:5 - 20:23]
// CHECK: usrs.cpp c:@N@foo@C@ClsB@F@result#1 Extent=[24:1 - 26:2]
-// CHECK: usrs.cpp c:usrs.cpp@360@aN@C@ClsC Extent=[29:3 - 29:35]
-// CHECK: usrs.cpp c:usrs.cpp@396@aN@w Extent=[30:3 - 30:8]
+// CHECK: usrs.cpp c:usrs.cpp@aN@C@ClsC Extent=[29:3 - 29:35]
+// CHECK: usrs.cpp c:usrs.cpp@aN@w Extent=[30:3 - 30:8]
// CHECK: usrs.cpp c:@z Extent=[33:1 - 33:6]
// CHECK: usrs.cpp c:@N@foo Extent=[35:1 - 40:2]
// CHECK: usrs.cpp c:@N@foo@N@taz Extent=[35:17 - 39:2]
// CHECK: usrs.cpp c:@N@foo@N@taz@x Extent=[36:3 - 36:8]
-// CHECK: usrs.cpp c:usrs.cpp@457@N@foo@N@taz@F@add#I#I# Extent=[37:3 - 37:56]
+// CHECK: usrs.cpp c:usrs.cpp@N@foo@N@taz@F@add#I#I# Extent=[37:3 - 37:56]
// CHECK: usrs.cpp c:usrs.cpp@479@N@foo@N@taz@F@add#I#I#@a Extent=[37:25 - 37:30]
// CHECK: usrs.cpp c:usrs.cpp@486@N@foo@N@taz@F@add#I#I#@b Extent=[37:32 - 37:37]
// CHECK: usrs.cpp c:@N@foo@N@taz@F@sub#I#I# Extent=[38:3 - 38:25]
@@ -137,10 +137,10 @@ void rdar9371763() {
// CHECK-NOT: ClsB
// CHECK: usrs.cpp c:@NA@foo_alias3
// CHECK: usrs.cpp c:@aN Extent=[68:1 - 73:2]
-// CHECK: usrs.cpp c:usrs.cpp@1097@aN@C@RDar9371763_Foo Extent=[69:1 - 72:2]
+// CHECK: usrs.cpp c:usrs.cpp@aN@C@RDar9371763_Foo Extent=[69:1 - 72:2]
// CHECK: usrs.cpp c: Extent=[70:1 - 70:8]
-// CHECK: usrs.cpp c:usrs.cpp@1131@aN@C@RDar9371763_Foo@F@bar# Extent=[71:3 - 71:13]
-// CHECK: usrs.cpp c:usrs.cpp@1131@aN@C@RDar9371763_Foo@F@bar# Extent=[75:1 - 75:31]
+// CHECK: usrs.cpp c:usrs.cpp@aN@C@RDar9371763_Foo@F@bar# Extent=[71:3 - 71:13]
+// CHECK: usrs.cpp c:usrs.cpp@aN@C@RDar9371763_Foo@F@bar# Extent=[75:1 - 75:31]
// CHECK: usrs.cpp c:@F@rdar9371763# Extent=[77:1 - 80:2]
// CHECK: usrs.cpp c:usrs.cpp@1204@F@rdar9371763#@foo Extent=[78:3 - 78:22]
diff --git a/test/Index/usrs.m b/test/Index/usrs.m
index cc2e0fd4b4c2..fc3fbc910578 100644
--- a/test/Index/usrs.m
+++ b/test/Index/usrs.m
@@ -89,20 +89,37 @@ int test_multi_declaration(void) {
-(int)methodWithFn:(void (*)(int *p))fn;
@end
-// RUN: c-index-test -test-load-source-usrs all -target x86_64-apple-macosx10.7 %s | FileCheck %s
-// CHECK: usrs.m c:usrs.m@67@F@my_helper Extent=[3:1 - 3:60]
+#include <usrs-system.h>
+
+#define MACRO1 123
+
+#define MACRO2 123
+#undef MACRO2
+#define MACRO2 789
+
+#define MACRO3(X) 123, X
+#define MACRO3(X) 789, X
+
+// RUN: c-index-test -test-load-source-usrs all -target x86_64-apple-macosx10.7 %s -isystem %S/Inputs | FileCheck %s
+// CHECK: usrs-system.h c:@macro@MACRO_FROM_SYSTEM_HEADER_1 Extent=[1:9 - 1:40]
+// CHECK: usrs.m c:usrs.m@1265@macro@MACRO1 Extent=[94:9 - 94:19]
+// CHECK: usrs.m c:usrs.m@1285@macro@MACRO2 Extent=[96:9 - 96:19]
+// CHECK: usrs.m c:usrs.m@1318@macro@MACRO2 Extent=[98:9 - 98:19]
+// CHECK: usrs.m c:usrs.m@1338@macro@MACRO3 Extent=[100:9 - 100:25]
+// CHECK: usrs.m c:usrs.m@1363@macro@MACRO3 Extent=[101:9 - 101:25]
+// CHECK: usrs.m c:usrs.m@F@my_helper Extent=[3:1 - 3:60]
// CHECK: usrs.m c:usrs.m@95@F@my_helper@x Extent=[3:29 - 3:34]
// CHECK: usrs.m c:usrs.m@102@F@my_helper@y Extent=[3:36 - 3:41]
-// CHECK: usrs.m c:usrs.m@128@Ea Extent=[5:1 - 8:2]
-// CHECK: usrs.m c:usrs.m@128@Ea@ABA Extent=[6:3 - 6:6]
-// CHECK: usrs.m c:usrs.m@128@Ea@CADABA Extent=[7:3 - 7:9]
-// CHECK: usrs.m c:usrs.m@155@Ea Extent=[10:1 - 13:2]
-// CHECK: usrs.m c:usrs.m@155@Ea@FOO Extent=[11:3 - 11:6]
-// CHECK: usrs.m c:usrs.m@155@Ea@BAR Extent=[12:3 - 12:6]
+// CHECK: usrs.m c:usrs.m@Ea Extent=[5:1 - 8:2]
+// CHECK: usrs.m c:usrs.m@Ea@ABA Extent=[6:3 - 6:6]
+// CHECK: usrs.m c:usrs.m@Ea@CADABA Extent=[7:3 - 7:9]
+// CHECK: usrs.m c:usrs.m@Ea Extent=[10:1 - 13:2]
+// CHECK: usrs.m c:usrs.m@Ea@FOO Extent=[11:3 - 11:6]
+// CHECK: usrs.m c:usrs.m@Ea@BAR Extent=[12:3 - 12:6]
// CHECK: usrs.m c:@SA@MyStruct Extent=[15:9 - 18:2]
// CHECK: usrs.m c:@SA@MyStruct@FI@wa Extent=[16:3 - 16:9]
// CHECK: usrs.m c:@SA@MyStruct@FI@moo Extent=[17:3 - 17:10]
-// CHECK: usrs.m c:usrs.m@179@T@MyStruct Extent=[15:1 - 18:11]
+// CHECK: usrs.m c:usrs.m@T@MyStruct Extent=[15:1 - 18:11]
// CHECK: usrs.m c:@E@Pizza Extent=[20:1 - 23:2]
// CHECK: usrs.m c:@E@Pizza@CHEESE Extent=[21:3 - 21:9]
// CHECK: usrs.m c:@E@Pizza@MUSHROOMS Extent=[22:3 - 22:12]
@@ -123,7 +140,7 @@ int test_multi_declaration(void) {
// CHECK: usrs.m c:usrs.m@470objc(cs)Foo(cm)kingkong@local_var Extent=[41:3 - 41:16]
// CHECK: usrs.m c:objc(cs)Foo(py)d1 Extent=[44:1 - 44:15]
// CHECK: usrs.m c:@z Extent=[47:1 - 47:6]
-// CHECK: usrs.m c:usrs.m@529@F@local_func Extent=[49:1 - 49:43]
+// CHECK: usrs.m c:usrs.m@F@local_func Extent=[49:1 - 49:43]
// CHECK: usrs.m c:usrs.m@551@F@local_func@x Extent=[49:23 - 49:28]
// CHECK: usrs.m c:objc(cs)CWithExt Extent=[51:1 - 53:5]
// CHECK: usrs.m c:objc(cs)CWithExt(im)meth1 Extent=[52:1 - 52:14]
@@ -153,7 +170,13 @@ int test_multi_declaration(void) {
// CHECK: usrs.m c:objc(cs)CWithExt2(im)pro_ext Extent=[88:23 - 88:30]
// CHECK: usrs.m c:objc(cs)CWithExt2(im)setPro_ext: Extent=[88:23 - 88:30]
-// RUN: c-index-test -test-load-source all %s | FileCheck -check-prefix=CHECK-source %s
+// RUN: c-index-test -test-load-source all %s -isystem %S/Inputs | FileCheck -check-prefix=CHECK-source %s
+// CHECK-source: usrs-system.h:1:9: macro definition=MACRO_FROM_SYSTEM_HEADER_1 Extent=[1:9 - 1:40]
+// CHECK-source: usrs.m:94:9: macro definition=MACRO1 Extent=[94:9 - 94:19]
+// CHECK-source: usrs.m:96:9: macro definition=MACRO2 Extent=[96:9 - 96:19]
+// CHECK-source: usrs.m:98:9: macro definition=MACRO2 Extent=[98:9 - 98:19]
+// CHECK-source: usrs.m:100:9: macro definition=MACRO3 Extent=[100:9 - 100:25]
+// CHECK-source: usrs.m:101:9: macro definition=MACRO3 Extent=[101:9 - 101:25]
// CHECK-source: usrs.m:3:19: FunctionDecl=my_helper:3:19 (Definition) Extent=[3:1 - 3:60]
// CHECK-source: usrs.m:3:33: ParmDecl=x:3:33 (Definition) Extent=[3:29 - 3:34]
// CHECK-source: usrs.m:3:40: ParmDecl=y:3:40 (Definition) Extent=[3:36 - 3:41]
@@ -258,9 +281,9 @@ int test_multi_declaration(void) {
// CHECK-source: usrs.m:69:23: UnexposedExpr= Extent=[69:23 - 69:24]
// CHECK-source: usrs.m:69:23: IntegerLiteral= Extent=[69:23 - 69:24]
// CHECK-source: usrs.m:72:6: FunctionDecl=aux_1:72:6 Extent=[72:1 - 72:26]
-// CHECK-source: usrs.m:72:15: ParmDecl=:72:15 (Definition) Extent=[72:12 - 72:16]
-// CHECK-source: usrs.m:72:20: ParmDecl=:72:20 (Definition) Extent=[72:17 - 72:21]
-// CHECK-source: usrs.m:72:25: ParmDecl=:72:25 (Definition) Extent=[72:22 - 72:26]
+// CHECK-source: usrs.m:72:15: ParmDecl=:72:15 (Definition) Extent=[72:12 - 72:15]
+// CHECK-source: usrs.m:72:20: ParmDecl=:72:20 (Definition) Extent=[72:17 - 72:20]
+// CHECK-source: usrs.m:72:25: ParmDecl=:72:25 (Definition) Extent=[72:22 - 72:25]
// CHECK-source: usrs.m:73:5: FunctionDecl=test_multi_declaration:73:5 (Definition) Extent=[73:1 - 77:2]
// CHECK-source: usrs.m:73:34: CompoundStmt= Extent=[73:34 - 77:2]
// CHECK-source: usrs.m:74:3: DeclStmt= Extent=[74:3 - 74:33]
diff --git a/test/Sema/carbon.c b/test/Integration/carbon.c
index 0498116dd181..0498116dd181 100644
--- a/test/Sema/carbon.c
+++ b/test/Integration/carbon.c
diff --git a/test/PCH/cocoa.m b/test/Integration/cocoa-pch.m
index 0159b3201492..0159b3201492 100644
--- a/test/PCH/cocoa.m
+++ b/test/Integration/cocoa-pch.m
diff --git a/test/Integration/cocoa.m b/test/Integration/cocoa.m
new file mode 100644
index 000000000000..d814b3ee21bc
--- /dev/null
+++ b/test/Integration/cocoa.m
@@ -0,0 +1,5 @@
+// RUN: %clang -arch x86_64 %s -fsyntax-only -Xclang -print-stats
+#ifdef __APPLE__
+#include <Cocoa/Cocoa.h>
+#endif
+
diff --git a/test/Layout/ms-x86-alias-avoidance-padding.cpp b/test/Layout/ms-x86-alias-avoidance-padding.cpp
new file mode 100644
index 000000000000..e51bab387115
--- /dev/null
+++ b/test/Layout/ms-x86-alias-avoidance-padding.cpp
@@ -0,0 +1,599 @@
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
+// RUN: | FileCheck %s
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
+// RUN: | FileCheck %s -check-prefix CHECK-X64
+
+extern "C" int printf(const char *fmt, ...);
+__declspec(align(4096)) char buffer[4096];
+
+struct AT {};
+
+struct V : AT {
+ char c;
+ V() {
+ printf("V - this: %d\n", (int)((char*)this - buffer));
+ }
+};
+
+struct AT0 {
+ union { struct { int a; AT t; } y; int b; } x;
+ char c;
+ AT0() {
+ printf("AT0 - this: %d\n", (int)((char*)this - buffer));
+ }
+};
+
+struct AT1 : V {
+ int a;
+ AT1() {
+ printf("AT1 - this: %d\n", (int)((char*)this - buffer));
+ }
+};
+
+struct AT2 {
+ AT0 t;
+ char AT2FieldName0;
+ AT2() {
+ printf("AT2 - this: %d\n", (int)((char*)this - buffer));
+ printf("AT2 - Fiel: %d\n", (int)((char*)&AT2FieldName0 - buffer));
+ }
+};
+
+struct AT3 : AT2, AT1 {
+ AT3() {
+ printf("AT3 - this: %d\n", (int)((char*)this - buffer));
+ }
+};
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct AT3
+// CHECK-NEXT: 0 | struct AT2 (base)
+// CHECK-NEXT: 0 | struct AT0 t
+// CHECK-NEXT: 0 | union AT0::(anonymous at {{.*}} x
+// CHECK-NEXT: 0 | struct AT0::(anonymous at {{.*}} y
+// CHECK-NEXT: 0 | int a
+// CHECK-NEXT: 4 | struct AT t (empty)
+// CHECK: 0 | int b
+// CHECK: 8 | char c
+// CHECK: 12 | char AT2FieldName0
+// CHECK-NEXT: 20 | struct AT1 (base)
+// CHECK-NEXT: 20 | struct V (base)
+// CHECK-NEXT: 20 | struct AT (base) (empty)
+// CHECK-NEXT: 20 | char c
+// CHECK-NEXT: 24 | int a
+// CHECK-NEXT: | [sizeof=28, align=4
+// CHECK-NEXT: | nvsize=28, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct AT3
+// CHECK-X64-NEXT: 0 | struct AT2 (base)
+// CHECK-X64-NEXT: 0 | struct AT0 t
+// CHECK-X64-NEXT: 0 | union AT0::(anonymous at {{.*}} x
+// CHECK-X64-NEXT: 0 | struct AT0::(anonymous at {{.*}} y
+// CHECK-X64-NEXT: 0 | int a
+// CHECK-X64-NEXT: 4 | struct AT t (empty)
+// CHECK-X64: 0 | int b
+// CHECK-X64: 8 | char c
+// CHECK-X64: 12 | char AT2FieldName0
+// CHECK-X64-NEXT: 20 | struct AT1 (base)
+// CHECK-X64-NEXT: 20 | struct V (base)
+// CHECK-X64-NEXT: 20 | struct AT (base) (empty)
+// CHECK-X64-NEXT: 20 | char c
+// CHECK-X64-NEXT: 24 | int a
+// CHECK-X64-NEXT: | [sizeof=28, align=4
+// CHECK-X64-NEXT: | nvsize=28, nvalign=4]
+
+struct BT0 {
+ BT0() {
+ printf("BT0 - this: %d\n", (int)((char*)this - buffer));
+ }
+};
+
+struct BT2 : BT0 {
+ char BT2FieldName0;
+ BT2() {
+ printf("BT2 - this: %d\n", (int)((char*)this - buffer));
+ printf("BT2 - Fiel: %d\n", (int)((char*)&BT2FieldName0 - buffer));
+ }
+};
+
+struct BT3 : BT0, BT2 {
+ BT3() {
+ printf("BT3 - this: %d\n", (int)((char*)this - buffer));
+ }
+};
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct BT3
+// CHECK-NEXT: 0 | struct BT0 (base) (empty)
+// CHECK-NEXT: 1 | struct BT2 (base)
+// CHECK-NEXT: 1 | struct BT0 (base) (empty)
+// CHECK-NEXT: 1 | char BT2FieldName0
+// CHECK-NEXT: | [sizeof=2, align=1
+// CHECK-NEXT: | nvsize=2, nvalign=1]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct BT3
+// CHECK-X64-NEXT: 0 | struct BT0 (base) (empty)
+// CHECK-X64-NEXT: 1 | struct BT2 (base)
+// CHECK-X64-NEXT: 1 | struct BT0 (base) (empty)
+// CHECK-X64-NEXT: 1 | char BT2FieldName0
+// CHECK-X64-NEXT: | [sizeof=2, align=1
+// CHECK-X64-NEXT: | nvsize=2, nvalign=1]
+
+struct T0 : AT {
+ T0() {
+ printf("T0 (this) : %d\n", (int)((char*)this - buffer));
+ }
+};
+
+struct T1 : T0 {
+ char a;
+ T1() {
+ printf("T1 (this) : %d\n", (int)((char*)this - buffer));
+ printf("T1 (fiel) : %d\n", (int)((char*)&a - buffer));
+ }
+};
+
+struct T2 : AT {
+ char a;
+ T2() {
+ printf("T2 (this) : %d\n", (int)((char*)this - buffer));
+ printf("T2 (fiel) : %d\n", (int)((char*)&a - buffer));
+ }
+};
+
+struct __declspec(align(1)) T3 : virtual T1, virtual T2 {
+ T3() {
+ printf("T3 (this) : %d\n", (int)((char*)this - buffer));
+ }
+};
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct T3
+// CHECK-NEXT: 0 | (T3 vbtable pointer)
+// CHECK-NEXT: 4 | struct T1 (virtual base)
+// CHECK-NEXT: 4 | struct T0 (base) (empty)
+// CHECK-NEXT: 4 | struct AT (base) (empty)
+// CHECK-NEXT: 4 | char a
+// CHECK-NEXT: 12 | struct T2 (virtual base)
+// CHECK-NEXT: 12 | struct AT (base) (empty)
+// CHECK-NEXT: 12 | char a
+// CHECK-NEXT: | [sizeof=16, align=4
+// CHECK-NEXT: | nvsize=4, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct T3
+// CHECK-X64-NEXT: 0 | (T3 vbtable pointer)
+// CHECK-X64-NEXT: 8 | struct T1 (virtual base)
+// CHECK-X64-NEXT: 8 | struct T0 (base) (empty)
+// CHECK-X64-NEXT: 8 | struct AT (base) (empty)
+// CHECK-X64-NEXT: 8 | char a
+// CHECK-X64-NEXT: 16 | struct T2 (virtual base)
+// CHECK-X64-NEXT: 16 | struct AT (base) (empty)
+// CHECK-X64-NEXT: 16 | char a
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=8, nvalign=8]
+
+struct B {};
+struct C { int a; };
+struct D : B, virtual C { B b; };
+struct E : D, B {};
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct E
+// CHECK-NEXT: 0 | struct D (base)
+// CHECK-NEXT: 4 | struct B (base) (empty)
+// CHECK-NEXT: 0 | (D vbtable pointer)
+// CHECK-NEXT: 4 | struct B b (empty)
+// CHECK: 8 | struct B (base) (empty)
+// CHECK-NEXT: 8 | struct C (virtual base)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: | [sizeof=12, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct E
+// CHECK-X64-NEXT: 0 | struct D (base)
+// CHECK-X64-NEXT: 8 | struct B (base) (empty)
+// CHECK-X64-NEXT: 0 | (D vbtable pointer)
+// CHECK-X64-NEXT: 8 | struct B b (empty)
+// CHECK-X64: 16 | struct B (base) (empty)
+// CHECK-X64-NEXT: 16 | struct C (virtual base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
+
+struct F : virtual D, virtual B {};
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct F
+// CHECK-NEXT: 0 | (F vbtable pointer)
+// CHECK-NEXT: 4 | struct C (virtual base)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | struct D (virtual base)
+// CHECK-NEXT: 12 | struct B (base) (empty)
+// CHECK-NEXT: 8 | (D vbtable pointer)
+// CHECK-NEXT: 12 | struct B b (empty)
+// CHECK: 16 | struct B (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=16, align=4
+// CHECK-NEXT: | nvsize=4, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct F
+// CHECK-X64-NEXT: 0 | (F vbtable pointer)
+// CHECK-X64-NEXT: 8 | struct C (virtual base)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | struct D (virtual base)
+// CHECK-X64-NEXT: 24 | struct B (base) (empty)
+// CHECK-X64-NEXT: 16 | (D vbtable pointer)
+// CHECK-X64-NEXT: 24 | struct B b (empty)
+// CHECK-X64: 32 | struct B (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=32, align=8
+// CHECK-X64-NEXT: | nvsize=8, nvalign=8]
+
+struct JC0 {
+ JC0() { printf("JC0 : %d\n", (int)((char*)this - buffer)); }
+};
+struct JC1 : JC0 {
+ virtual void f() {}
+ JC1() { printf("JC1 : %d\n", (int)((char*)this - buffer)); }
+};
+struct JC2 : JC1 {
+ JC2() { printf("JC2 : %d\n", (int)((char*)this - buffer)); }
+};
+struct JC4 : JC1, JC2 {
+ JC4() { printf("JC4 : %d\n", (int)((char*)this - buffer)); }
+};
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct JC4
+// CHECK-NEXT: 0 | struct JC1 (primary base)
+// CHECK-NEXT: 0 | (JC1 vftable pointer)
+// CHECK-NEXT: 4 | struct JC0 (base) (empty)
+// CHECK-NEXT: 8 | struct JC2 (base)
+// CHECK-NEXT: 8 | struct JC1 (primary base)
+// CHECK-NEXT: 8 | (JC1 vftable pointer)
+// CHECK-NEXT: 12 | struct JC0 (base) (empty)
+// CHECK-NEXT: | [sizeof=12, align=4
+// CHECK-NEXT: | nvsize=12, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct JC4
+// CHECK-X64-NEXT: 0 | struct JC1 (primary base)
+// CHECK-X64-NEXT: 0 | (JC1 vftable pointer)
+// CHECK-X64-NEXT: 8 | struct JC0 (base) (empty)
+// CHECK-X64-NEXT: 16 | struct JC2 (base)
+// CHECK-X64-NEXT: 16 | struct JC1 (primary base)
+// CHECK-X64-NEXT: 16 | (JC1 vftable pointer)
+// CHECK-X64-NEXT: 24 | struct JC0 (base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
+
+struct RA {};
+struct RB { char c; };
+struct RV {};
+struct RW { char c; };
+struct RY { RY() { printf("%Id\n", (char*)this - buffer); } };
+struct RX0 : RB, RA {};
+struct RX1 : RA, RB {};
+struct RX2 : RA { char a; };
+struct RX3 : RA { RB a; };
+struct RX4 { RA a; char b; };
+struct RX5 { RA a; RB b; };
+struct RX6 : virtual RV { RB a; };
+struct RX7 : virtual RW { RA a; };
+struct RX8 : RA, virtual RW {};
+
+struct RZ0 : RX0, RY {};
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct RZ0
+// CHECK-NEXT: 0 | struct RX0 (base)
+// CHECK-NEXT: 0 | struct RB (base)
+// CHECK-NEXT: 0 | char c
+// CHECK-NEXT: 1 | struct RA (base) (empty)
+// CHECK-NEXT: 2 | struct RY (base) (empty)
+// CHECK-NEXT: | [sizeof=2, align=1
+// CHECK-NEXT: | nvsize=2, nvalign=1]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct RZ0
+// CHECK-X64-NEXT: 0 | struct RX0 (base)
+// CHECK-X64-NEXT: 0 | struct RB (base)
+// CHECK-X64-NEXT: 0 | char c
+// CHECK-X64-NEXT: 1 | struct RA (base) (empty)
+// CHECK-X64-NEXT: 2 | struct RY (base) (empty)
+// CHECK-X64-NEXT: | [sizeof=2, align=1
+// CHECK-X64-NEXT: | nvsize=2, nvalign=1]
+
+struct RZ1 : RX1, RY {};
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct RZ1
+// CHECK-NEXT: 0 | struct RX1 (base)
+// CHECK-NEXT: 0 | struct RA (base) (empty)
+// CHECK-NEXT: 0 | struct RB (base)
+// CHECK-NEXT: 0 | char c
+// CHECK-NEXT: 1 | struct RY (base) (empty)
+// CHECK-NEXT: | [sizeof=1, align=1
+// CHECK-NEXT: | nvsize=1, nvalign=1]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct RZ1
+// CHECK-X64-NEXT: 0 | struct RX1 (base)
+// CHECK-X64-NEXT: 0 | struct RA (base) (empty)
+// CHECK-X64-NEXT: 0 | struct RB (base)
+// CHECK-X64-NEXT: 0 | char c
+// CHECK-X64-NEXT: 1 | struct RY (base) (empty)
+// CHECK-X64-NEXT: | [sizeof=1, align=1
+// CHECK-X64-NEXT: | nvsize=1, nvalign=1]
+
+struct RZ2 : RX2, RY {};
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct RZ2
+// CHECK-NEXT: 0 | struct RX2 (base)
+// CHECK-NEXT: 0 | struct RA (base) (empty)
+// CHECK-NEXT: 0 | char a
+// CHECK-NEXT: 2 | struct RY (base) (empty)
+// CHECK-NEXT: | [sizeof=2, align=1
+// CHECK-NEXT: | nvsize=2, nvalign=1]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct RZ2
+// CHECK-X64-NEXT: 0 | struct RX2 (base)
+// CHECK-X64-NEXT: 0 | struct RA (base) (empty)
+// CHECK-X64-NEXT: 0 | char a
+// CHECK-X64-NEXT: 2 | struct RY (base) (empty)
+// CHECK-X64-NEXT: | [sizeof=2, align=1
+// CHECK-X64-NEXT: | nvsize=2, nvalign=1]
+
+struct RZ3 : RX3, RY {};
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct RZ3
+// CHECK-NEXT: 0 | struct RX3 (base)
+// CHECK-NEXT: 0 | struct RA (base) (empty)
+// CHECK-NEXT: 0 | struct RB a
+// CHECK-NEXT: 0 | char c
+// CHECK-NEXT: | [sizeof=1, align=1
+// CHECK-NEXT: | nvsize=1, nvalign=1]
+// CHECK-NEXT: 1 | struct RY (base) (empty)
+// CHECK-NEXT: | [sizeof=1, align=1
+// CHECK-NEXT: | nvsize=1, nvalign=1]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct RZ3
+// CHECK-X64-NEXT: 0 | struct RX3 (base)
+// CHECK-X64-NEXT: 0 | struct RA (base) (empty)
+// CHECK-X64-NEXT: 0 | struct RB a
+// CHECK-X64-NEXT: 0 | char c
+// CHECK-X64-NEXT: | [sizeof=1, align=1
+// CHECK-X64-NEXT: | nvsize=1, nvalign=1]
+// CHECK-X64-NEXT: 1 | struct RY (base) (empty)
+// CHECK-X64-NEXT: | [sizeof=1, align=1
+// CHECK-X64-NEXT: | nvsize=1, nvalign=1]
+
+struct RZ4 : RX4, RY {};
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct RZ4
+// CHECK-NEXT: 0 | struct RX4 (base)
+// CHECK-NEXT: 0 | struct RA a (empty)
+// CHECK-NEXT: | [sizeof=1, align=1
+// CHECK-NEXT: | nvsize=0, nvalign=1]
+// CHECK-NEXT: 1 | char b
+// CHECK-NEXT: 3 | struct RY (base) (empty)
+// CHECK-NEXT: | [sizeof=3, align=1
+// CHECK-NEXT: | nvsize=3, nvalign=1]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct RZ4
+// CHECK-X64-NEXT: 0 | struct RX4 (base)
+// CHECK-X64-NEXT: 0 | struct RA a (empty)
+// CHECK-X64-NEXT: | [sizeof=1, align=1
+// CHECK-X64-NEXT: | nvsize=0, nvalign=1]
+// CHECK-X64-NEXT: 1 | char b
+// CHECK-X64-NEXT: 3 | struct RY (base) (empty)
+// CHECK-X64-NEXT: | [sizeof=3, align=1
+// CHECK-X64-NEXT: | nvsize=3, nvalign=1]
+
+struct RZ5 : RX5, RY {};
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct RZ5
+// CHECK-NEXT: 0 | struct RX5 (base)
+// CHECK-NEXT: 0 | struct RA a (empty)
+// CHECK-NEXT: | [sizeof=1, align=1
+// CHECK-NEXT: | nvsize=0, nvalign=1]
+// CHECK-NEXT: 1 | struct RB b
+// CHECK-NEXT: 1 | char c
+// CHECK-NEXT: | [sizeof=1, align=1
+// CHECK-NEXT: | nvsize=1, nvalign=1]
+// CHECK-NEXT: 2 | struct RY (base) (empty)
+// CHECK-NEXT: | [sizeof=2, align=1
+// CHECK-NEXT: | nvsize=2, nvalign=1]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct RZ5
+// CHECK-X64-NEXT: 0 | struct RX5 (base)
+// CHECK-X64-NEXT: 0 | struct RA a (empty)
+// CHECK-X64-NEXT: | [sizeof=1, align=1
+// CHECK-X64-NEXT: | nvsize=0, nvalign=1]
+// CHECK-X64-NEXT: 1 | struct RB b
+// CHECK-X64-NEXT: 1 | char c
+// CHECK-X64-NEXT: | [sizeof=1, align=1
+// CHECK-X64-NEXT: | nvsize=1, nvalign=1]
+// CHECK-X64-NEXT: 2 | struct RY (base) (empty)
+// CHECK-X64-NEXT: | [sizeof=2, align=1
+// CHECK-X64-NEXT: | nvsize=2, nvalign=1]
+
+struct RZ6 : RX6, RY {};
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct RZ6
+// CHECK-NEXT: 0 | struct RX6 (base)
+// CHECK-NEXT: 0 | (RX6 vbtable pointer)
+// CHECK-NEXT: 4 | struct RB a
+// CHECK-NEXT: 4 | char c
+// CHECK-NEXT: | [sizeof=1, align=1
+// CHECK-NEXT: | nvsize=1, nvalign=1]
+// CHECK-NEXT: 9 | struct RY (base) (empty)
+// CHECK-NEXT: 12 | struct RV (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=12, align=4
+// CHECK-NEXT: | nvsize=12, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct RZ6
+// CHECK-X64-NEXT: 0 | struct RX6 (base)
+// CHECK-X64-NEXT: 0 | (RX6 vbtable pointer)
+// CHECK-X64-NEXT: 8 | struct RB a
+// CHECK-X64-NEXT: 8 | char c
+// CHECK-X64-NEXT: | [sizeof=1, align=1
+// CHECK-X64-NEXT: | nvsize=1, nvalign=1]
+// CHECK-X64-NEXT: 17 | struct RY (base) (empty)
+// CHECK-X64-NEXT: 24 | struct RV (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
+
+struct RZ7 : RX7, RY {};
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct RZ7
+// CHECK-NEXT: 0 | struct RX7 (base)
+// CHECK-NEXT: 0 | (RX7 vbtable pointer)
+// CHECK-NEXT: 4 | struct RA a (empty)
+// CHECK-NEXT: | [sizeof=1, align=1
+// CHECK-NEXT: | nvsize=0, nvalign=1]
+// CHECK-NEXT: 8 | struct RY (base) (empty)
+// CHECK-NEXT: 8 | struct RW (virtual base)
+// CHECK-NEXT: 8 | char c
+// CHECK-NEXT: | [sizeof=9, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct RZ7
+// CHECK-X64-NEXT: 0 | struct RX7 (base)
+// CHECK-X64-NEXT: 0 | (RX7 vbtable pointer)
+// CHECK-X64-NEXT: 8 | struct RA a (empty)
+// CHECK-X64-NEXT: | [sizeof=1, align=1
+// CHECK-X64-NEXT: | nvsize=0, nvalign=1]
+// CHECK-X64-NEXT: 16 | struct RY (base) (empty)
+// CHECK-X64-NEXT: 16 | struct RW (virtual base)
+// CHECK-X64-NEXT: 16 | char c
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
+
+struct RZ8 : RX8, RY {};
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct RZ8
+// CHECK-NEXT: 0 | struct RX8 (base)
+// CHECK-NEXT: 4 | struct RA (base) (empty)
+// CHECK-NEXT: 0 | (RX8 vbtable pointer)
+// CHECK-NEXT: 4 | struct RY (base) (empty)
+// CHECK-NEXT: 4 | struct RW (virtual base)
+// CHECK-NEXT: 4 | char c
+// CHECK-NEXT: | [sizeof=5, align=4
+// CHECK-NEXT: | nvsize=4, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct RZ8
+// CHECK-X64-NEXT: 0 | struct RX8 (base)
+// CHECK-X64-NEXT: 8 | struct RA (base) (empty)
+// CHECK-X64-NEXT: 0 | (RX8 vbtable pointer)
+// CHECK-X64-NEXT: 8 | struct RY (base) (empty)
+// CHECK-X64-NEXT: 8 | struct RW (virtual base)
+// CHECK-X64-NEXT: 8 | char c
+// CHECK-X64-NEXT: | [sizeof=16, align=8
+// CHECK-X64-NEXT: | nvsize=8, nvalign=8]
+
+struct JA {};
+struct JB {};
+struct JC : JA { virtual void f() {} };
+struct JD : virtual JB, virtual JC { virtual void f() {} JD() {} };
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct JD
+// CHECK-NEXT: 0 | (JD vbtable pointer)
+// CHECK-NEXT: 4 | struct JB (virtual base) (empty)
+// CHECK-NEXT: 4 | (vtordisp for vbase JC)
+// CHECK-NEXT: 8 | struct JC (virtual base)
+// CHECK-NEXT: 8 | (JC vftable pointer)
+// CHECK-NEXT: 12 | struct JA (base) (empty)
+// CHECK-NEXT: | [sizeof=12, align=4
+// CHECK-NEXT: | nvsize=4, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct JD
+// CHECK-X64-NEXT: 0 | (JD vbtable pointer)
+// CHECK-X64-NEXT: 8 | struct JB (virtual base) (empty)
+// CHECK-X64-NEXT: 12 | (vtordisp for vbase JC)
+// CHECK-X64-NEXT: 16 | struct JC (virtual base)
+// CHECK-X64-NEXT: 16 | (JC vftable pointer)
+// CHECK-X64-NEXT: 24 | struct JA (base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=8, nvalign=8]
+
+int a[
+sizeof(AT3) +
+sizeof(BT3) +
+sizeof(T3) +
+sizeof(E) +
+sizeof(F) +
+sizeof(JC4) +
+sizeof(RZ0) +
+sizeof(RZ1) +
+sizeof(RZ2) +
+sizeof(RZ3) +
+sizeof(RZ4) +
+sizeof(RZ5) +
+sizeof(RZ6) +
+sizeof(RZ7) +
+sizeof(RZ8) +
+sizeof(JD) +
+0];
diff --git a/test/Layout/ms-x86-aligned-tail-padding.cpp b/test/Layout/ms-x86-aligned-tail-padding.cpp
index b9020f386c03..f919766546e4 100644
--- a/test/Layout/ms-x86-aligned-tail-padding.cpp
+++ b/test/Layout/ms-x86-aligned-tail-padding.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only -cxx-abi microsoft %s 2>/dev/null \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
// RUN: | FileCheck %s
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only -cxx-abi microsoft %s 2>/dev/null \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
// RUN: | FileCheck %s -check-prefix CHECK-X64
extern "C" int printf(const char *fmt, ...);
@@ -75,33 +75,41 @@ struct A : B1, B0, B2, virtual V {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct A
-// CHECK: 0 | struct B1 (base)
-// CHECK: 0 | int a
-// CHECK: 4 | struct B0 (base)
-// CHECK: 4 | int a
-// CHECK: 16 | struct B2 (base)
-// CHECK: 16 | int a
-// CHECK: 32 | (A vbtable pointer)
-// CHECK: 48 | int a
-// CHECK: 64 | struct V (virtual base)
-// CHECK: 64 | char a
-// CHECK: | [sizeof=80, align=16
-// CHECK: | nvsize=64, nvalign=16]
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct A
+// CHECK-NEXT: 0 | struct B1 (base)
+// CHECK-NEXT: 0 | int a
+// CHECK-NEXT: 4 | struct B0 (base)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 16 | struct B2 (base)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 32 | (A vbtable pointer)
+// CHECK-NEXT: 48 | int a
+// CHECK-NEXT: 64 | struct V (virtual base)
+// CHECK-NEXT: 64 | char a
+// CHECK-NEXT: | [sizeof=80, align=16
+// CHECK-NEXT: | nvsize=64, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct A
-// CHECK-X64: 0 | struct B1 (base)
-// CHECK-X64: 0 | int a
-// CHECK-X64: 4 | struct B0 (base)
-// CHECK-X64: 4 | int a
-// CHECK-X64: 16 | struct B2 (base)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 32 | (A vbtable pointer)
-// CHECK-X64: 40 | int a
-// CHECK-X64: 48 | struct V (virtual base)
-// CHECK-X64: 48 | char a
-// CHECK-X64: | [sizeof=64, align=16
-// CHECK-X64: | nvsize=48, nvalign=16]
+// CHECK-X64-NEXT: 0 | struct A
+// CHECK-X64-NEXT: 0 | struct B1 (base)
+// CHECK-X64-NEXT: 0 | int a
+// CHECK-X64-NEXT: 4 | struct B0 (base)
+// CHECK-X64-NEXT: 4 | int a
+// CHECK-X64-NEXT: 16 | struct B2 (base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 32 | (A vbtable pointer)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: 64 | struct V (virtual base)
+// CHECK-X64-NEXT: 64 | char a
+// CHECK-X64-NEXT: | [sizeof=80, align=16
+// CHECK-X64-NEXT: | nvsize=64, nvalign=16]
struct B : B2, B0, B1, virtual V {
int a;
@@ -109,33 +117,33 @@ struct B : B2, B0, B1, virtual V {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct B
-// CHECK: 0 | struct B2 (base)
-// CHECK: 0 | int a
-// CHECK: 16 | struct B0 (base)
-// CHECK: 16 | int a
-// CHECK: 32 | struct B1 (base)
-// CHECK: 32 | int a
-// CHECK: 36 | (B vbtable pointer)
-// CHECK: 52 | int a
-// CHECK: 64 | struct V (virtual base)
-// CHECK: 64 | char a
-// CHECK: | [sizeof=80, align=16
-// CHECK: | nvsize=64, nvalign=16]
+// CHECK-NEXT: 0 | struct B
+// CHECK-NEXT: 0 | struct B2 (base)
+// CHECK-NEXT: 0 | int a
+// CHECK-NEXT: 16 | struct B0 (base)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 32 | struct B1 (base)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: 36 | (B vbtable pointer)
+// CHECK-NEXT: 52 | int a
+// CHECK-NEXT: 64 | struct V (virtual base)
+// CHECK-NEXT: 64 | char a
+// CHECK-NEXT: | [sizeof=80, align=16
+// CHECK-NEXT: | nvsize=64, nvalign=16]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct B
-// CHECK-X64: 0 | struct B2 (base)
-// CHECK-X64: 0 | int a
-// CHECK-X64: 16 | struct B0 (base)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 32 | struct B1 (base)
-// CHECK-X64: 32 | int a
-// CHECK-X64: 40 | (B vbtable pointer)
-// CHECK-X64: 48 | int a
-// CHECK-X64: 64 | struct V (virtual base)
-// CHECK-X64: 64 | char a
-// CHECK-X64: | [sizeof=80, align=16
-// CHECK-X64: | nvsize=64, nvalign=16]
+// CHECK-X64-NEXT: 0 | struct B
+// CHECK-X64-NEXT: 0 | struct B2 (base)
+// CHECK-X64-NEXT: 0 | int a
+// CHECK-X64-NEXT: 16 | struct B0 (base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 32 | struct B1 (base)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 40 | (B vbtable pointer)
+// CHECK-X64-NEXT: 52 | int a
+// CHECK-X64-NEXT: 64 | struct V (virtual base)
+// CHECK-X64-NEXT: 64 | char a
+// CHECK-X64-NEXT: | [sizeof=80, align=16
+// CHECK-X64-NEXT: | nvsize=64, nvalign=16]
struct C : B1, B0, virtual V {
int a;
@@ -144,31 +152,31 @@ struct C : B1, B0, virtual V {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct C
-// CHECK: 0 | struct B1 (base)
-// CHECK: 0 | int a
-// CHECK: 4 | struct B0 (base)
-// CHECK: 4 | int a
-// CHECK: 8 | (C vbtable pointer)
-// CHECK: 24 | int a
-// CHECK: 32 | long long a1
-// CHECK: 48 | struct V (virtual base)
-// CHECK: 48 | char a
-// CHECK: | [sizeof=64, align=16
-// CHECK: | nvsize=48, nvalign=16]
+// CHECK-NEXT: 0 | struct C
+// CHECK-NEXT: 0 | struct B1 (base)
+// CHECK-NEXT: 0 | int a
+// CHECK-NEXT: 4 | struct B0 (base)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | (C vbtable pointer)
+// CHECK-NEXT: 24 | int a
+// CHECK-NEXT: 32 | long long a1
+// CHECK-NEXT: 48 | struct V (virtual base)
+// CHECK-NEXT: 48 | char a
+// CHECK-NEXT: | [sizeof=64, align=16
+// CHECK-NEXT: | nvsize=48, nvalign=16]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct C
-// CHECK-X64: 0 | struct B1 (base)
-// CHECK-X64: 0 | int a
-// CHECK-X64: 4 | struct B0 (base)
-// CHECK-X64: 4 | int a
-// CHECK-X64: 8 | (C vbtable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 24 | long long a1
-// CHECK-X64: 32 | struct V (virtual base)
-// CHECK-X64: 32 | char a
-// CHECK-X64: | [sizeof=48, align=16
-// CHECK-X64: | nvsize=32, nvalign=16]
+// CHECK-X64-NEXT: 0 | struct C
+// CHECK-X64-NEXT: 0 | struct B1 (base)
+// CHECK-X64-NEXT: 0 | int a
+// CHECK-X64-NEXT: 4 | struct B0 (base)
+// CHECK-X64-NEXT: 4 | int a
+// CHECK-X64-NEXT: 8 | (C vbtable pointer)
+// CHECK-X64-NEXT: 24 | int a
+// CHECK-X64-NEXT: 32 | long long a1
+// CHECK-X64-NEXT: 48 | struct V (virtual base)
+// CHECK-X64-NEXT: 48 | char a
+// CHECK-X64-NEXT: | [sizeof=64, align=16
+// CHECK-X64-NEXT: | nvsize=48, nvalign=16]
struct D : B2, B0, virtual V {
int a;
@@ -176,29 +184,29 @@ struct D : B2, B0, virtual V {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct D
-// CHECK: 0 | struct B2 (base)
-// CHECK: 0 | int a
-// CHECK: 16 | struct B0 (base)
-// CHECK: 16 | int a
-// CHECK: 20 | (D vbtable pointer)
-// CHECK: 36 | int a
-// CHECK: 48 | struct V (virtual base)
-// CHECK: 48 | char a
-// CHECK: | [sizeof=64, align=16
-// CHECK: | nvsize=48, nvalign=16]
+// CHECK-NEXT: 0 | struct D
+// CHECK-NEXT: 0 | struct B2 (base)
+// CHECK-NEXT: 0 | int a
+// CHECK-NEXT: 16 | struct B0 (base)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 20 | (D vbtable pointer)
+// CHECK-NEXT: 36 | int a
+// CHECK-NEXT: 48 | struct V (virtual base)
+// CHECK-NEXT: 48 | char a
+// CHECK-NEXT: | [sizeof=64, align=16
+// CHECK-NEXT: | nvsize=48, nvalign=16]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct D
-// CHECK-X64: 0 | struct B2 (base)
-// CHECK-X64: 0 | int a
-// CHECK-X64: 16 | struct B0 (base)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 24 | (D vbtable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: 48 | struct V (virtual base)
-// CHECK-X64: 48 | char a
-// CHECK-X64: | [sizeof=64, align=16
-// CHECK-X64: | nvsize=48, nvalign=16]
+// CHECK-X64-NEXT: 0 | struct D
+// CHECK-X64-NEXT: 0 | struct B2 (base)
+// CHECK-X64-NEXT: 0 | int a
+// CHECK-X64-NEXT: 16 | struct B0 (base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 24 | (D vbtable pointer)
+// CHECK-X64-NEXT: 36 | int a
+// CHECK-X64-NEXT: 48 | struct V (virtual base)
+// CHECK-X64-NEXT: 48 | char a
+// CHECK-X64-NEXT: | [sizeof=64, align=16
+// CHECK-X64-NEXT: | nvsize=48, nvalign=16]
struct E : B3, B0, virtual V {
int a;
@@ -206,31 +214,33 @@ struct E : B3, B0, virtual V {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct E
-// CHECK: 0 | struct B3 (base)
-// CHECK: 0 | long long a1
-// CHECK: 8 | int a
-// CHECK: 16 | struct B0 (base)
-// CHECK: 16 | int a
-// CHECK: 20 | (E vbtable pointer)
-// CHECK: 36 | int a
-// CHECK: 48 | struct V (virtual base)
-// CHECK: 48 | char a
-// CHECK: | [sizeof=64, align=16
-// CHECK: | nvsize=48, nvalign=16]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct E
+// CHECK-NEXT: 0 | struct B3 (base)
+// CHECK-NEXT: 0 | long long a1
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: 16 | struct B0 (base)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 20 | (E vbtable pointer)
+// CHECK-NEXT: 36 | int a
+// CHECK-NEXT: 48 | struct V (virtual base)
+// CHECK-NEXT: 48 | char a
+// CHECK-NEXT: | [sizeof=64, align=16
+// CHECK-NEXT: | nvsize=48, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct E
-// CHECK-X64: 0 | struct B3 (base)
-// CHECK-X64: 0 | long long a1
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | struct B0 (base)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 24 | (E vbtable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: 48 | struct V (virtual base)
-// CHECK-X64: 48 | char a
-// CHECK-X64: | [sizeof=64, align=16
-// CHECK-X64: | nvsize=48, nvalign=16]
+// CHECK-X64-NEXT: 0 | struct E
+// CHECK-X64-NEXT: 0 | struct B3 (base)
+// CHECK-X64-NEXT: 0 | long long a1
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | struct B0 (base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 24 | (E vbtable pointer)
+// CHECK-X64-NEXT: 36 | int a
+// CHECK-X64-NEXT: 48 | struct V (virtual base)
+// CHECK-X64-NEXT: 48 | char a
+// CHECK-X64-NEXT: | [sizeof=64, align=16
+// CHECK-X64-NEXT: | nvsize=48, nvalign=16]
struct F : B0, virtual V1 {
__declspec(align(16)) int a;
@@ -239,29 +249,33 @@ struct F : B0, virtual V1 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct F
-// CHECK: 0 | struct B0 (base)
-// CHECK: 0 | int a
-// CHECK: 4 | (F vbtable pointer)
-// CHECK: 32 | int a
-// CHECK: 92 | (vtordisp for vbase V1)
-// CHECK: 96 | struct V1 (virtual base)
-// CHECK: 96 | (V1 vftable pointer)
-// CHECK: 128 | struct A16 (base) (empty)
-// CHECK: | [sizeof=128, align=32
-// CHECK: | nvsize=48, nvalign=16]
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct F
+// CHECK-NEXT: 0 | struct B0 (base)
+// CHECK-NEXT: 0 | int a
+// CHECK-NEXT: 4 | (F vbtable pointer)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: 92 | (vtordisp for vbase V1)
+// CHECK-NEXT: 96 | struct V1 (virtual base)
+// CHECK-NEXT: 96 | (V1 vftable pointer)
+// CHECK-NEXT: 128 | struct A16 (base) (empty)
+// CHECK-NEXT: | [sizeof=128, align=32
+// CHECK-NEXT: | nvsize=48, nvalign=32]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct F
-// CHECK-X64: 0 | struct B0 (base)
-// CHECK-X64: 0 | int a
-// CHECK-X64: 8 | (F vbtable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 60 | (vtordisp for vbase V1)
-// CHECK-X64: 64 | struct V1 (virtual base)
-// CHECK-X64: 64 | (V1 vftable pointer)
-// CHECK-X64: 96 | struct A16 (base) (empty)
-// CHECK-X64: | [sizeof=96, align=32
-// CHECK-X64: | nvsize=32, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct F
+// CHECK-X64-NEXT: 0 | struct B0 (base)
+// CHECK-X64-NEXT: 0 | int a
+// CHECK-X64-NEXT: 8 | (F vbtable pointer)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 92 | (vtordisp for vbase V1)
+// CHECK-X64-NEXT: 96 | struct V1 (virtual base)
+// CHECK-X64-NEXT: 96 | (V1 vftable pointer)
+// CHECK-X64-NEXT: 128 | struct A16 (base) (empty)
+// CHECK-X64-NEXT: | [sizeof=128, align=32
+// CHECK-X64-NEXT: | nvsize=48, nvalign=32]
struct G : virtual V2, virtual V3 {
int a;
@@ -269,27 +283,31 @@ struct G : virtual V2, virtual V3 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct G
-// CHECK: 0 | (G vbtable pointer)
-// CHECK: 4 | int a
-// CHECK: 8 | struct V2 (virtual base)
-// CHECK: 8 | long long a
-// CHECK: 16 | int a1
-// CHECK: 24 | struct V3 (virtual base)
-// CHECK: 24 | int a
-// CHECK: | [sizeof=28, align=8
-// CHECK: | nvsize=8, nvalign=4]
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct G
+// CHECK-NEXT: 0 | (G vbtable pointer)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | struct V2 (virtual base)
+// CHECK-NEXT: 8 | long long a
+// CHECK-NEXT: 16 | int a1
+// CHECK-NEXT: 24 | struct V3 (virtual base)
+// CHECK-NEXT: 24 | int a
+// CHECK-NEXT: | [sizeof=28, align=8
+// CHECK-NEXT: | nvsize=8, nvalign=8]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct G
-// CHECK-X64: 0 | (G vbtable pointer)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | struct V2 (virtual base)
-// CHECK-X64: 16 | long long a
-// CHECK-X64: 24 | int a1
-// CHECK-X64: 32 | struct V3 (virtual base)
-// CHECK-X64: 32 | int a
-// CHECK-X64: | [sizeof=40, align=8
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct G
+// CHECK-X64-NEXT: 0 | (G vbtable pointer)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | struct V2 (virtual base)
+// CHECK-X64-NEXT: 16 | long long a
+// CHECK-X64-NEXT: 24 | int a1
+// CHECK-X64-NEXT: 32 | struct V3 (virtual base)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: | [sizeof=40, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
struct H {
__declspec(align(16)) int a;
@@ -298,17 +316,17 @@ struct H {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct H
-// CHECK: 0 | int a
-// CHECK: 4 | int b
-// CHECK: | [sizeof=16, align=16
-// CHECK: | nvsize=16, nvalign=16]
+// CHECK-NEXT: 0 | struct H
+// CHECK-NEXT: 0 | int a
+// CHECK-NEXT: 4 | int b
+// CHECK-NEXT: | [sizeof=16, align=16
+// CHECK-NEXT: | nvsize=16, nvalign=16]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct H
-// CHECK-X64: 0 | int a
-// CHECK-X64: 4 | int b
-// CHECK-X64: | [sizeof=16, align=16
-// CHECK-X64: | nvsize=16, nvalign=16]
+// CHECK-X64-NEXT: 0 | struct H
+// CHECK-X64-NEXT: 0 | int a
+// CHECK-X64-NEXT: 4 | int b
+// CHECK-X64-NEXT: | [sizeof=16, align=16
+// CHECK-X64-NEXT: | nvsize=16, nvalign=16]
struct I {
B2 a;
@@ -317,19 +335,19 @@ struct I {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct I
-// CHECK: 0 | struct B2 a
-// CHECK: 0 | int a
-// CHECK: 16 | int b
-// CHECK: | [sizeof=32, align=16
-// CHECK: | nvsize=32, nvalign=16]
+// CHECK-NEXT: 0 | struct I
+// CHECK-NEXT: 0 | struct B2 a
+// CHECK-NEXT: 0 | int a
+// CHECK: 16 | int b
+// CHECK-NEXT: | [sizeof=32, align=16
+// CHECK-NEXT: | nvsize=32, nvalign=16]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct I
-// CHECK-X64: 0 | struct B2 a
-// CHECK-X64: 0 | int a
-// CHECK-X64: 16 | int b
-// CHECK-X64: | [sizeof=32, align=16
-// CHECK-X64: | nvsize=32, nvalign=16]
+// CHECK-X64-NEXT: 0 | struct I
+// CHECK-X64-NEXT: 0 | struct B2 a
+// CHECK-X64-NEXT: 0 | int a
+// CHECK-X64: 16 | int b
+// CHECK-X64-NEXT: | [sizeof=32, align=16
+// CHECK-X64-NEXT: | nvsize=32, nvalign=16]
struct AX : B0X, virtual B2X, virtual B6X, virtual B3X {
int a;
@@ -339,41 +357,49 @@ struct AX : B0X, virtual B2X, virtual B6X, virtual B3X {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct AX
-// CHECK: 0 | (AX vftable pointer)
-// CHECK: 16 | struct B0X (base)
-// CHECK: 16 | int a
-// CHECK: 20 | int a1
-// CHECK: 24 | (AX vbtable pointer)
-// CHECK: 40 | int a
-// CHECK: 48 | struct B2X (virtual base)
-// CHECK: 48 | int a
-// CHECK: 52 | struct B6X (virtual base)
-// CHECK: 52 | int a
-// CHECK: 76 | (vtordisp for vbase B3X)
-// CHECK: 80 | struct B3X (virtual base)
-// CHECK: 80 | (B3X vftable pointer)
-// CHECK: 84 | int a
-// CHECK: | [sizeof=96, align=16
-// CHECK: | nvsize=48, nvalign=16]
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct AX
+// CHECK-NEXT: 0 | (AX vftable pointer)
+// CHECK-NEXT: 16 | struct B0X (base)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 20 | int a1
+// CHECK-NEXT: 24 | (AX vbtable pointer)
+// CHECK-NEXT: 40 | int a
+// CHECK-NEXT: 48 | struct B2X (virtual base)
+// CHECK-NEXT: 48 | int a
+// CHECK-NEXT: 52 | struct B6X (virtual base)
+// CHECK-NEXT: 52 | int a
+// CHECK-NEXT: 76 | (vtordisp for vbase B3X)
+// CHECK-NEXT: 80 | struct B3X (virtual base)
+// CHECK-NEXT: 80 | (B3X vftable pointer)
+// CHECK-NEXT: 84 | int a
+// CHECK-NEXT: | [sizeof=96, align=16
+// CHECK-NEXT: | nvsize=48, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct AX
-// CHECK-X64: 0 | (AX vftable pointer)
-// CHECK-X64: 16 | struct B0X (base)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 20 | int a1
-// CHECK-X64: 24 | (AX vbtable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: 48 | struct B2X (virtual base)
-// CHECK-X64: 48 | int a
-// CHECK-X64: 52 | struct B6X (virtual base)
-// CHECK-X64: 52 | int a
-// CHECK-X64: 76 | (vtordisp for vbase B3X)
-// CHECK-X64: 80 | struct B3X (virtual base)
-// CHECK-X64: 80 | (B3X vftable pointer)
-// CHECK-X64: 88 | int a
-// CHECK-X64: | [sizeof=96, align=16
-// CHECK-X64: | nvsize=48, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct AX
+// CHECK-X64-NEXT: 0 | (AX vftable pointer)
+// CHECK-X64-NEXT: 16 | struct B0X (base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 20 | int a1
+// CHECK-X64-NEXT: 24 | (AX vbtable pointer)
+// CHECK-X64-NEXT: 40 | int a
+// CHECK-X64-NEXT: 48 | struct B2X (virtual base)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: 52 | struct B6X (virtual base)
+// CHECK-X64-NEXT: 52 | int a
+// CHECK-X64-NEXT: 76 | (vtordisp for vbase B3X)
+// CHECK-X64-NEXT: 80 | struct B3X (virtual base)
+// CHECK-X64-NEXT: 80 | (B3X vftable pointer)
+// CHECK-X64-NEXT: 88 | int a
+// CHECK-X64-NEXT: | [sizeof=96, align=16
+// CHECK-X64-NEXT: | nvsize=48, nvalign=16]
struct BX : B4X, virtual B2X, virtual B6X, virtual B3X {
int a;
@@ -383,43 +409,47 @@ struct BX : B4X, virtual B2X, virtual B6X, virtual B3X {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct BX
-// CHECK: 0 | (BX vftable pointer)
-// CHECK: 16 | struct B4X (base)
-// CHECK: 16 | struct A16X (base) (empty)
-// CHECK: 16 | int a
-// CHECK: 20 | int a1
-// CHECK: 32 | (BX vbtable pointer)
-// CHECK: 48 | int a
-// CHECK: 64 | struct B2X (virtual base)
-// CHECK: 64 | int a
-// CHECK: 68 | struct B6X (virtual base)
-// CHECK: 68 | int a
-// CHECK: 92 | (vtordisp for vbase B3X)
-// CHECK: 96 | struct B3X (virtual base)
-// CHECK: 96 | (B3X vftable pointer)
-// CHECK: 100 | int a
-// CHECK: | [sizeof=112, align=16
-// CHECK: | nvsize=64, nvalign=16]
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct BX
+// CHECK-NEXT: 0 | (BX vftable pointer)
+// CHECK-NEXT: 16 | struct B4X (base)
+// CHECK-NEXT: 16 | struct A16X (base) (empty)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 20 | int a1
+// CHECK-NEXT: 32 | (BX vbtable pointer)
+// CHECK-NEXT: 48 | int a
+// CHECK-NEXT: 64 | struct B2X (virtual base)
+// CHECK-NEXT: 64 | int a
+// CHECK-NEXT: 68 | struct B6X (virtual base)
+// CHECK-NEXT: 68 | int a
+// CHECK-NEXT: 92 | (vtordisp for vbase B3X)
+// CHECK-NEXT: 96 | struct B3X (virtual base)
+// CHECK-NEXT: 96 | (B3X vftable pointer)
+// CHECK-NEXT: 100 | int a
+// CHECK-NEXT: | [sizeof=112, align=16
+// CHECK-NEXT: | nvsize=64, nvalign=16]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct BX
-// CHECK-X64: 0 | (BX vftable pointer)
-// CHECK-X64: 16 | struct B4X (base)
-// CHECK-X64: 16 | struct A16X (base) (empty)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 20 | int a1
-// CHECK-X64: 32 | (BX vbtable pointer)
-// CHECK-X64: 40 | int a
-// CHECK-X64: 48 | struct B2X (virtual base)
-// CHECK-X64: 48 | int a
-// CHECK-X64: 52 | struct B6X (virtual base)
-// CHECK-X64: 52 | int a
-// CHECK-X64: 76 | (vtordisp for vbase B3X)
-// CHECK-X64: 80 | struct B3X (virtual base)
-// CHECK-X64: 80 | (B3X vftable pointer)
-// CHECK-X64: 88 | int a
-// CHECK-X64: | [sizeof=96, align=16
-// CHECK-X64: | nvsize=48, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct BX
+// CHECK-X64-NEXT: 0 | (BX vftable pointer)
+// CHECK-X64-NEXT: 16 | struct B4X (base)
+// CHECK-X64-NEXT: 16 | struct A16X (base) (empty)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 20 | int a1
+// CHECK-X64-NEXT: 32 | (BX vbtable pointer)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: 64 | struct B2X (virtual base)
+// CHECK-X64-NEXT: 64 | int a
+// CHECK-X64-NEXT: 68 | struct B6X (virtual base)
+// CHECK-X64-NEXT: 68 | int a
+// CHECK-X64-NEXT: 92 | (vtordisp for vbase B3X)
+// CHECK-X64-NEXT: 96 | struct B3X (virtual base)
+// CHECK-X64-NEXT: 96 | (B3X vftable pointer)
+// CHECK-X64-NEXT: 104 | int a
+// CHECK-X64-NEXT: | [sizeof=112, align=16
+// CHECK-X64-NEXT: | nvsize=64, nvalign=16]
struct CX : B5X, virtual B2X, virtual B6X, virtual B3X {
int a;
@@ -429,43 +459,45 @@ struct CX : B5X, virtual B2X, virtual B6X, virtual B3X {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct CX
-// CHECK: 0 | (CX vftable pointer)
-// CHECK: 16 | struct B5X (base)
-// CHECK: 16 | (B5X vbtable pointer)
-// CHECK: 20 | int a
-// CHECK: 24 | int a1
-// CHECK: 28 | int a
-// CHECK: 32 | struct A16X (virtual base) (empty)
-// CHECK: 32 | struct B2X (virtual base)
-// CHECK: 32 | int a
-// CHECK: 36 | struct B6X (virtual base)
-// CHECK: 36 | int a
-// CHECK: 60 | (vtordisp for vbase B3X)
-// CHECK: 64 | struct B3X (virtual base)
-// CHECK: 64 | (B3X vftable pointer)
-// CHECK: 68 | int a
-// CHECK: | [sizeof=80, align=16
-// CHECK: | nvsize=32, nvalign=16]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct CX
+// CHECK-NEXT: 0 | (CX vftable pointer)
+// CHECK-NEXT: 16 | struct B5X (base)
+// CHECK-NEXT: 16 | (B5X vbtable pointer)
+// CHECK-NEXT: 20 | int a
+// CHECK-NEXT: 24 | int a1
+// CHECK-NEXT: 28 | int a
+// CHECK-NEXT: 32 | struct A16X (virtual base) (empty)
+// CHECK-NEXT: 32 | struct B2X (virtual base)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: 36 | struct B6X (virtual base)
+// CHECK-NEXT: 36 | int a
+// CHECK-NEXT: 60 | (vtordisp for vbase B3X)
+// CHECK-NEXT: 64 | struct B3X (virtual base)
+// CHECK-NEXT: 64 | (B3X vftable pointer)
+// CHECK-NEXT: 68 | int a
+// CHECK-NEXT: | [sizeof=80, align=16
+// CHECK-NEXT: | nvsize=32, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct CX
-// CHECK-X64: 0 | (CX vftable pointer)
-// CHECK-X64: 16 | struct B5X (base)
-// CHECK-X64: 16 | (B5X vbtable pointer)
-// CHECK-X64: 24 | int a
-// CHECK-X64: 28 | int a1
-// CHECK-X64: 32 | int a
-// CHECK-X64: 48 | struct A16X (virtual base) (empty)
-// CHECK-X64: 48 | struct B2X (virtual base)
-// CHECK-X64: 48 | int a
-// CHECK-X64: 52 | struct B6X (virtual base)
-// CHECK-X64: 52 | int a
-// CHECK-X64: 76 | (vtordisp for vbase B3X)
-// CHECK-X64: 80 | struct B3X (virtual base)
-// CHECK-X64: 80 | (B3X vftable pointer)
-// CHECK-X64: 88 | int a
-// CHECK-X64: | [sizeof=96, align=16
-// CHECK-X64: | nvsize=48, nvalign=16]
+// CHECK-X64-NEXT: 0 | struct CX
+// CHECK-X64-NEXT: 0 | (CX vftable pointer)
+// CHECK-X64-NEXT: 16 | struct B5X (base)
+// CHECK-X64-NEXT: 16 | (B5X vbtable pointer)
+// CHECK-X64-NEXT: 24 | int a
+// CHECK-X64-NEXT: 28 | int a1
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 48 | struct A16X (virtual base) (empty)
+// CHECK-X64-NEXT: 48 | struct B2X (virtual base)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: 52 | struct B6X (virtual base)
+// CHECK-X64-NEXT: 52 | int a
+// CHECK-X64-NEXT: 76 | (vtordisp for vbase B3X)
+// CHECK-X64-NEXT: 80 | struct B3X (virtual base)
+// CHECK-X64-NEXT: 80 | (B3X vftable pointer)
+// CHECK-X64-NEXT: 88 | int a
+// CHECK-X64-NEXT: | [sizeof=96, align=16
+// CHECK-X64-NEXT: | nvsize=48, nvalign=16]
struct __declspec(align(16)) DX {
int a;
@@ -474,17 +506,17 @@ struct __declspec(align(16)) DX {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct DX
-// CHECK: 0 | (DX vftable pointer)
-// CHECK: 4 | int a
-// CHECK: | [sizeof=16, align=16
-// CHECK: | nvsize=8, nvalign=4]
+// CHECK-NEXT: 0 | struct DX
+// CHECK-NEXT: 0 | (DX vftable pointer)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: | [sizeof=16, align=16
+// CHECK-NEXT: | nvsize=8, nvalign=16]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct DX
-// CHECK-X64: 0 | (DX vftable pointer)
-// CHECK-X64: 8 | int a
-// CHECK-X64: | [sizeof=16, align=16
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct DX
+// CHECK-X64-NEXT: 0 | (DX vftable pointer)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: | [sizeof=16, align=16
+// CHECK-X64-NEXT: | nvsize=16, nvalign=16]
int a[
sizeof(A)+
diff --git a/test/Layout/ms-x86-basic-layout.cpp b/test/Layout/ms-x86-basic-layout.cpp
index 86b3553b0ba0..b6ffeee7114a 100644
--- a/test/Layout/ms-x86-basic-layout.cpp
+++ b/test/Layout/ms-x86-basic-layout.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only -cxx-abi microsoft %s 2>/dev/null \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
// RUN: | FileCheck %s
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only -cxx-abi microsoft %s 2>/dev/null \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
// RUN: | FileCheck %s -check-prefix CHECK-X64
extern "C" int printf(const char *fmt, ...);
@@ -38,25 +38,29 @@ struct TestF0 : A4, virtual B4 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct TestF0
-// CHECK: 0 | struct A4 (base)
-// CHECK: 0 | int a
-// CHECK: 4 | (TestF0 vbtable pointer)
-// CHECK: 8 | int a
-// CHECK: 12 | struct B4 (virtual base)
-// CHECK: 12 | int a
-// CHECK: | [sizeof=16, align=4
-// CHECK: | nvsize=12, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct TestF0
-// CHECK-X64: 0 | struct A4 (base)
-// CHECK-X64: 0 | int a
-// CHECK-X64: 8 | (TestF0 vbtable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 24 | struct B4 (virtual base)
-// CHECK-X64: 24 | int a
-// CHECK-X64: | [sizeof=32, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct TestF0
+// CHECK-NEXT: 0 | struct A4 (base)
+// CHECK-NEXT: 0 | int a
+// CHECK-NEXT: 4 | (TestF0 vbtable pointer)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: 12 | struct B4 (virtual base)
+// CHECK-NEXT: 12 | int a
+// CHECK-NEXT: | [sizeof=16, align=4
+// CHECK-NEXT: | nvsize=12, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct TestF0
+// CHECK-X64-NEXT: 0 | struct A4 (base)
+// CHECK-X64-NEXT: 0 | int a
+// CHECK-X64-NEXT: 8 | (TestF0 vbtable pointer)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 24 | struct B4 (virtual base)
+// CHECK-X64-NEXT: 24 | int a
+// CHECK-X64-NEXT: | [sizeof=32, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct TestF1 : A4, virtual A16 {
int a;
@@ -64,25 +68,27 @@ struct TestF1 : A4, virtual A16 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct TestF1
-// CHECK: 0 | struct A4 (base)
-// CHECK: 0 | int a
-// CHECK: 4 | (TestF1 vbtable pointer)
-// CHECK: 8 | int a
-// CHECK: 16 | struct A16 (virtual base)
-// CHECK: 16 | int a
-// CHECK: | [sizeof=32, align=16
-// CHECK: | nvsize=12, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct TestF1
-// CHECK-X64: 0 | struct A4 (base)
-// CHECK-X64: 0 | int a
-// CHECK-X64: 8 | (TestF1 vbtable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 32 | struct A16 (virtual base)
-// CHECK-X64: 32 | int a
-// CHECK-X64: | [sizeof=48, align=16
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct TestF1
+// CHECK-NEXT: 0 | struct A4 (base)
+// CHECK-NEXT: 0 | int a
+// CHECK-NEXT: 4 | (TestF1 vbtable pointer)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: 16 | struct A16 (virtual base)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: | [sizeof=32, align=16
+// CHECK-NEXT: | nvsize=12, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct TestF1
+// CHECK-X64-NEXT: 0 | struct A4 (base)
+// CHECK-X64-NEXT: 0 | int a
+// CHECK-X64-NEXT: 8 | (TestF1 vbtable pointer)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 32 | struct A16 (virtual base)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: | [sizeof=48, align=16
+// CHECK-X64-NEXT: | nvsize=24, nvalign=16]
struct TestF2 : A4, virtual C4 {
int a;
@@ -90,27 +96,29 @@ struct TestF2 : A4, virtual C4 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct TestF2
-// CHECK: 0 | struct A4 (base)
-// CHECK: 0 | int a
-// CHECK: 4 | (TestF2 vbtable pointer)
-// CHECK: 8 | int a
-// CHECK: 12 | struct C4 (virtual base)
-// CHECK: 12 | (C4 vftable pointer)
-// CHECK: 16 | int a
-// CHECK: | [sizeof=20, align=4
-// CHECK: | nvsize=12, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct TestF2
-// CHECK-X64: 0 | struct A4 (base)
-// CHECK-X64: 0 | int a
-// CHECK-X64: 8 | (TestF2 vbtable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 24 | struct C4 (virtual base)
-// CHECK-X64: 24 | (C4 vftable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: | [sizeof=40, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct TestF2
+// CHECK-NEXT: 0 | struct A4 (base)
+// CHECK-NEXT: 0 | int a
+// CHECK-NEXT: 4 | (TestF2 vbtable pointer)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: 12 | struct C4 (virtual base)
+// CHECK-NEXT: 12 | (C4 vftable pointer)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: | [sizeof=20, align=4
+// CHECK-NEXT: | nvsize=12, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct TestF2
+// CHECK-X64-NEXT: 0 | struct A4 (base)
+// CHECK-X64-NEXT: 0 | int a
+// CHECK-X64-NEXT: 8 | (TestF2 vbtable pointer)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 24 | struct C4 (virtual base)
+// CHECK-X64-NEXT: 24 | (C4 vftable pointer)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: | [sizeof=40, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct TestF3 : A4, virtual C16 {
int a;
@@ -118,27 +126,29 @@ struct TestF3 : A4, virtual C16 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct TestF3
-// CHECK: 0 | struct A4 (base)
-// CHECK: 0 | int a
-// CHECK: 4 | (TestF3 vbtable pointer)
-// CHECK: 8 | int a
-// CHECK: 16 | struct C16 (virtual base)
-// CHECK: 16 | (C16 vftable pointer)
-// CHECK: 32 | int a
-// CHECK: | [sizeof=48, align=16
-// CHECK: | nvsize=12, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct TestF3
-// CHECK-X64: 0 | struct A4 (base)
-// CHECK-X64: 0 | int a
-// CHECK-X64: 8 | (TestF3 vbtable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 32 | struct C16 (virtual base)
-// CHECK-X64: 32 | (C16 vftable pointer)
-// CHECK-X64: 48 | int a
-// CHECK-X64: | [sizeof=64, align=16
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct TestF3
+// CHECK-NEXT: 0 | struct A4 (base)
+// CHECK-NEXT: 0 | int a
+// CHECK-NEXT: 4 | (TestF3 vbtable pointer)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: 16 | struct C16 (virtual base)
+// CHECK-NEXT: 16 | (C16 vftable pointer)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: | [sizeof=48, align=16
+// CHECK-NEXT: | nvsize=12, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct TestF3
+// CHECK-X64-NEXT: 0 | struct A4 (base)
+// CHECK-X64-NEXT: 0 | int a
+// CHECK-X64-NEXT: 8 | (TestF3 vbtable pointer)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 32 | struct C16 (virtual base)
+// CHECK-X64-NEXT: 32 | (C16 vftable pointer)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: | [sizeof=64, align=16
+// CHECK-X64-NEXT: | nvsize=24, nvalign=16]
struct TestF4 : TestF3, A4 {
int a;
@@ -146,35 +156,35 @@ struct TestF4 : TestF3, A4 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct TestF4
-// CHECK: 0 | struct TestF3 (base)
-// CHECK: 0 | struct A4 (base)
-// CHECK: 0 | int a
-// CHECK: 4 | (TestF3 vbtable pointer)
-// CHECK: 8 | int a
-// CHECK: 12 | struct A4 (base)
-// CHECK: 12 | int a
-// CHECK: 16 | int a
-// CHECK: 32 | struct C16 (virtual base)
-// CHECK: 32 | (C16 vftable pointer)
-// CHECK: 48 | int a
-// CHECK: | [sizeof=64, align=16
-// CHECK: | nvsize=32, nvalign=16]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct TestF4
-// CHECK-X64: 0 | struct TestF3 (base)
-// CHECK-X64: 0 | struct A4 (base)
-// CHECK-X64: 0 | int a
-// CHECK-X64: 8 | (TestF3 vbtable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 24 | struct A4 (base)
-// CHECK-X64: 24 | int a
-// CHECK-X64: 28 | int a
-// CHECK-X64: 32 | struct C16 (virtual base)
-// CHECK-X64: 32 | (C16 vftable pointer)
-// CHECK-X64: 48 | int a
-// CHECK-X64: | [sizeof=64, align=16
-// CHECK-X64: | nvsize=32, nvalign=16]
+// CHECK-NEXT: 0 | struct TestF4
+// CHECK-NEXT: 0 | struct TestF3 (base)
+// CHECK-NEXT: 0 | struct A4 (base)
+// CHECK-NEXT: 0 | int a
+// CHECK-NEXT: 4 | (TestF3 vbtable pointer)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: 12 | struct A4 (base)
+// CHECK-NEXT: 12 | int a
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 32 | struct C16 (virtual base)
+// CHECK-NEXT: 32 | (C16 vftable pointer)
+// CHECK-NEXT: 48 | int a
+// CHECK-NEXT: | [sizeof=64, align=16
+// CHECK-NEXT: | nvsize=32, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct TestF4
+// CHECK-X64-NEXT: 0 | struct TestF3 (base)
+// CHECK-X64-NEXT: 0 | struct A4 (base)
+// CHECK-X64-NEXT: 0 | int a
+// CHECK-X64-NEXT: 8 | (TestF3 vbtable pointer)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 24 | struct A4 (base)
+// CHECK-X64-NEXT: 24 | int a
+// CHECK-X64-NEXT: 28 | int a
+// CHECK-X64-NEXT: 32 | struct C16 (virtual base)
+// CHECK-X64-NEXT: 32 | (C16 vftable pointer)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: | [sizeof=64, align=16
+// CHECK-X64-NEXT: | nvsize=32, nvalign=16]
struct TestF5 : TestF3, A4 {
int a;
@@ -183,37 +193,37 @@ struct TestF5 : TestF3, A4 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct TestF5
-// CHECK: 0 | (TestF5 vftable pointer)
-// CHECK: 16 | struct TestF3 (base)
-// CHECK: 16 | struct A4 (base)
-// CHECK: 16 | int a
-// CHECK: 20 | (TestF3 vbtable pointer)
-// CHECK: 24 | int a
-// CHECK: 28 | struct A4 (base)
-// CHECK: 28 | int a
-// CHECK: 32 | int a
-// CHECK: 48 | struct C16 (virtual base)
-// CHECK: 48 | (C16 vftable pointer)
-// CHECK: 64 | int a
-// CHECK: | [sizeof=80, align=16
-// CHECK: | nvsize=48, nvalign=16]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct TestF5
-// CHECK-X64: 0 | (TestF5 vftable pointer)
-// CHECK-X64: 16 | struct TestF3 (base)
-// CHECK-X64: 16 | struct A4 (base)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 24 | (TestF3 vbtable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: 40 | struct A4 (base)
-// CHECK-X64: 40 | int a
-// CHECK-X64: 44 | int a
-// CHECK-X64: 48 | struct C16 (virtual base)
-// CHECK-X64: 48 | (C16 vftable pointer)
-// CHECK-X64: 64 | int a
-// CHECK-X64: | [sizeof=80, align=16
-// CHECK-X64: | nvsize=48, nvalign=16]
+// CHECK-NEXT: 0 | struct TestF5
+// CHECK-NEXT: 0 | (TestF5 vftable pointer)
+// CHECK-NEXT: 16 | struct TestF3 (base)
+// CHECK-NEXT: 16 | struct A4 (base)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 20 | (TestF3 vbtable pointer)
+// CHECK-NEXT: 24 | int a
+// CHECK-NEXT: 28 | struct A4 (base)
+// CHECK-NEXT: 28 | int a
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: 48 | struct C16 (virtual base)
+// CHECK-NEXT: 48 | (C16 vftable pointer)
+// CHECK-NEXT: 64 | int a
+// CHECK-NEXT: | [sizeof=80, align=16
+// CHECK-NEXT: | nvsize=48, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct TestF5
+// CHECK-X64-NEXT: 0 | (TestF5 vftable pointer)
+// CHECK-X64-NEXT: 16 | struct TestF3 (base)
+// CHECK-X64-NEXT: 16 | struct A4 (base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 24 | (TestF3 vbtable pointer)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 40 | struct A4 (base)
+// CHECK-X64-NEXT: 40 | int a
+// CHECK-X64-NEXT: 44 | int a
+// CHECK-X64-NEXT: 48 | struct C16 (virtual base)
+// CHECK-X64-NEXT: 48 | (C16 vftable pointer)
+// CHECK-X64-NEXT: 64 | int a
+// CHECK-X64-NEXT: | [sizeof=80, align=16
+// CHECK-X64-NEXT: | nvsize=48, nvalign=16]
struct TestF6 : TestF3, A4 {
int a;
@@ -222,37 +232,37 @@ struct TestF6 : TestF3, A4 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct TestF6
-// CHECK: 0 | struct TestF3 (base)
-// CHECK: 0 | struct A4 (base)
-// CHECK: 0 | int a
-// CHECK: 4 | (TestF3 vbtable pointer)
-// CHECK: 8 | int a
-// CHECK: 12 | struct A4 (base)
-// CHECK: 12 | int a
-// CHECK: 16 | int a
-// CHECK: 44 | (vtordisp for vbase C16)
-// CHECK: 48 | struct C16 (virtual base)
-// CHECK: 48 | (C16 vftable pointer)
-// CHECK: 64 | int a
-// CHECK: | [sizeof=80, align=16
-// CHECK: | nvsize=32, nvalign=16]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct TestF6
-// CHECK-X64: 0 | struct TestF3 (base)
-// CHECK-X64: 0 | struct A4 (base)
-// CHECK-X64: 0 | int a
-// CHECK-X64: 8 | (TestF3 vbtable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 24 | struct A4 (base)
-// CHECK-X64: 24 | int a
-// CHECK-X64: 28 | int a
-// CHECK-X64: 44 | (vtordisp for vbase C16)
-// CHECK-X64: 48 | struct C16 (virtual base)
-// CHECK-X64: 48 | (C16 vftable pointer)
-// CHECK-X64: 64 | int a
-// CHECK-X64: | [sizeof=80, align=16
-// CHECK-X64: | nvsize=32, nvalign=16]
+// CHECK-NEXT: 0 | struct TestF6
+// CHECK-NEXT: 0 | struct TestF3 (base)
+// CHECK-NEXT: 0 | struct A4 (base)
+// CHECK-NEXT: 0 | int a
+// CHECK-NEXT: 4 | (TestF3 vbtable pointer)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: 12 | struct A4 (base)
+// CHECK-NEXT: 12 | int a
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 44 | (vtordisp for vbase C16)
+// CHECK-NEXT: 48 | struct C16 (virtual base)
+// CHECK-NEXT: 48 | (C16 vftable pointer)
+// CHECK-NEXT: 64 | int a
+// CHECK-NEXT: | [sizeof=80, align=16
+// CHECK-NEXT: | nvsize=32, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct TestF6
+// CHECK-X64-NEXT: 0 | struct TestF3 (base)
+// CHECK-X64-NEXT: 0 | struct A4 (base)
+// CHECK-X64-NEXT: 0 | int a
+// CHECK-X64-NEXT: 8 | (TestF3 vbtable pointer)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 24 | struct A4 (base)
+// CHECK-X64-NEXT: 24 | int a
+// CHECK-X64-NEXT: 28 | int a
+// CHECK-X64-NEXT: 44 | (vtordisp for vbase C16)
+// CHECK-X64-NEXT: 48 | struct C16 (virtual base)
+// CHECK-X64-NEXT: 48 | (C16 vftable pointer)
+// CHECK-X64-NEXT: 64 | int a
+// CHECK-X64-NEXT: | [sizeof=80, align=16
+// CHECK-X64-NEXT: | nvsize=32, nvalign=16]
struct TestF7 : A4, virtual C16 {
int a;
@@ -261,29 +271,29 @@ struct TestF7 : A4, virtual C16 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct TestF7
-// CHECK: 0 | struct A4 (base)
-// CHECK: 0 | int a
-// CHECK: 4 | (TestF7 vbtable pointer)
-// CHECK: 8 | int a
-// CHECK: 28 | (vtordisp for vbase C16)
-// CHECK: 32 | struct C16 (virtual base)
-// CHECK: 32 | (C16 vftable pointer)
-// CHECK: 48 | int a
-// CHECK: | [sizeof=64, align=16
-// CHECK: | nvsize=12, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct TestF7
-// CHECK-X64: 0 | struct A4 (base)
-// CHECK-X64: 0 | int a
-// CHECK-X64: 8 | (TestF7 vbtable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 44 | (vtordisp for vbase C16)
-// CHECK-X64: 48 | struct C16 (virtual base)
-// CHECK-X64: 48 | (C16 vftable pointer)
-// CHECK-X64: 64 | int a
-// CHECK-X64: | [sizeof=80, align=16
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK-NEXT: 0 | struct TestF7
+// CHECK-NEXT: 0 | struct A4 (base)
+// CHECK-NEXT: 0 | int a
+// CHECK-NEXT: 4 | (TestF7 vbtable pointer)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: 28 | (vtordisp for vbase C16)
+// CHECK-NEXT: 32 | struct C16 (virtual base)
+// CHECK-NEXT: 32 | (C16 vftable pointer)
+// CHECK-NEXT: 48 | int a
+// CHECK-NEXT: | [sizeof=64, align=16
+// CHECK-NEXT: | nvsize=12, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct TestF7
+// CHECK-X64-NEXT: 0 | struct A4 (base)
+// CHECK-X64-NEXT: 0 | int a
+// CHECK-X64-NEXT: 8 | (TestF7 vbtable pointer)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 44 | (vtordisp for vbase C16)
+// CHECK-X64-NEXT: 48 | struct C16 (virtual base)
+// CHECK-X64-NEXT: 48 | (C16 vftable pointer)
+// CHECK-X64-NEXT: 64 | int a
+// CHECK-X64-NEXT: | [sizeof=80, align=16
+// CHECK-X64-NEXT: | nvsize=24, nvalign=16]
struct TestF8 : TestF7, A4 {
int a;
@@ -292,37 +302,37 @@ struct TestF8 : TestF7, A4 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct TestF8
-// CHECK: 0 | struct TestF7 (base)
-// CHECK: 0 | struct A4 (base)
-// CHECK: 0 | int a
-// CHECK: 4 | (TestF7 vbtable pointer)
-// CHECK: 8 | int a
-// CHECK: 12 | struct A4 (base)
-// CHECK: 12 | int a
-// CHECK: 16 | int a
-// CHECK: 44 | (vtordisp for vbase C16)
-// CHECK: 48 | struct C16 (virtual base)
-// CHECK: 48 | (C16 vftable pointer)
-// CHECK: 64 | int a
-// CHECK: | [sizeof=80, align=16
-// CHECK: | nvsize=32, nvalign=16]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct TestF8
-// CHECK-X64: 0 | struct TestF7 (base)
-// CHECK-X64: 0 | struct A4 (base)
-// CHECK-X64: 0 | int a
-// CHECK-X64: 8 | (TestF7 vbtable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 24 | struct A4 (base)
-// CHECK-X64: 24 | int a
-// CHECK-X64: 28 | int a
-// CHECK-X64: 44 | (vtordisp for vbase C16)
-// CHECK-X64: 48 | struct C16 (virtual base)
-// CHECK-X64: 48 | (C16 vftable pointer)
-// CHECK-X64: 64 | int a
-// CHECK-X64: | [sizeof=80, align=16
-// CHECK-X64: | nvsize=32, nvalign=16]
+// CHECK-NEXT: 0 | struct TestF8
+// CHECK-NEXT: 0 | struct TestF7 (base)
+// CHECK-NEXT: 0 | struct A4 (base)
+// CHECK-NEXT: 0 | int a
+// CHECK-NEXT: 4 | (TestF7 vbtable pointer)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: 12 | struct A4 (base)
+// CHECK-NEXT: 12 | int a
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 44 | (vtordisp for vbase C16)
+// CHECK-NEXT: 48 | struct C16 (virtual base)
+// CHECK-NEXT: 48 | (C16 vftable pointer)
+// CHECK-NEXT: 64 | int a
+// CHECK-NEXT: | [sizeof=80, align=16
+// CHECK-NEXT: | nvsize=32, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct TestF8
+// CHECK-X64-NEXT: 0 | struct TestF7 (base)
+// CHECK-X64-NEXT: 0 | struct A4 (base)
+// CHECK-X64-NEXT: 0 | int a
+// CHECK-X64-NEXT: 8 | (TestF7 vbtable pointer)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 24 | struct A4 (base)
+// CHECK-X64-NEXT: 24 | int a
+// CHECK-X64-NEXT: 28 | int a
+// CHECK-X64-NEXT: 44 | (vtordisp for vbase C16)
+// CHECK-X64-NEXT: 48 | struct C16 (virtual base)
+// CHECK-X64-NEXT: 48 | (C16 vftable pointer)
+// CHECK-X64-NEXT: 64 | int a
+// CHECK-X64-NEXT: | [sizeof=80, align=16
+// CHECK-X64-NEXT: | nvsize=32, nvalign=16]
struct TestF9 : A4, virtual C16 {
int a;
@@ -331,29 +341,29 @@ struct TestF9 : A4, virtual C16 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct TestF9
-// CHECK: 0 | (TestF9 vftable pointer)
-// CHECK: 4 | struct A4 (base)
-// CHECK: 4 | int a
-// CHECK: 8 | (TestF9 vbtable pointer)
-// CHECK: 12 | int a
-// CHECK: 16 | struct C16 (virtual base)
-// CHECK: 16 | (C16 vftable pointer)
-// CHECK: 32 | int a
-// CHECK: | [sizeof=48, align=16
-// CHECK: | nvsize=16, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct TestF9
-// CHECK-X64: 0 | (TestF9 vftable pointer)
-// CHECK-X64: 8 | struct A4 (base)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | (TestF9 vbtable pointer)
-// CHECK-X64: 24 | int a
-// CHECK-X64: 32 | struct C16 (virtual base)
-// CHECK-X64: 32 | (C16 vftable pointer)
-// CHECK-X64: 48 | int a
-// CHECK-X64: | [sizeof=64, align=16
-// CHECK-X64: | nvsize=32, nvalign=8]
+// CHECK-NEXT: 0 | struct TestF9
+// CHECK-NEXT: 0 | (TestF9 vftable pointer)
+// CHECK-NEXT: 4 | struct A4 (base)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | (TestF9 vbtable pointer)
+// CHECK-NEXT: 12 | int a
+// CHECK-NEXT: 16 | struct C16 (virtual base)
+// CHECK-NEXT: 16 | (C16 vftable pointer)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: | [sizeof=48, align=16
+// CHECK-NEXT: | nvsize=16, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct TestF9
+// CHECK-X64-NEXT: 0 | (TestF9 vftable pointer)
+// CHECK-X64-NEXT: 8 | struct A4 (base)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | (TestF9 vbtable pointer)
+// CHECK-X64-NEXT: 24 | int a
+// CHECK-X64-NEXT: 32 | struct C16 (virtual base)
+// CHECK-X64-NEXT: 32 | (C16 vftable pointer)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: | [sizeof=64, align=16
+// CHECK-X64-NEXT: | nvsize=32, nvalign=16]
struct TestFA : TestF9, A4 {
int a;
@@ -362,37 +372,37 @@ struct TestFA : TestF9, A4 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct TestFA
-// CHECK: 0 | struct TestF9 (primary base)
-// CHECK: 0 | (TestF9 vftable pointer)
-// CHECK: 4 | struct A4 (base)
-// CHECK: 4 | int a
-// CHECK: 8 | (TestF9 vbtable pointer)
-// CHECK: 12 | int a
-// CHECK: 16 | struct A4 (base)
-// CHECK: 16 | int a
-// CHECK: 20 | int a
-// CHECK: 32 | struct C16 (virtual base)
-// CHECK: 32 | (C16 vftable pointer)
-// CHECK: 48 | int a
-// CHECK: | [sizeof=64, align=16
-// CHECK: | nvsize=32, nvalign=16]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct TestFA
-// CHECK-X64: 0 | struct TestF9 (primary base)
-// CHECK-X64: 0 | (TestF9 vftable pointer)
-// CHECK-X64: 8 | struct A4 (base)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | (TestF9 vbtable pointer)
-// CHECK-X64: 24 | int a
-// CHECK-X64: 32 | struct A4 (base)
-// CHECK-X64: 32 | int a
-// CHECK-X64: 36 | int a
-// CHECK-X64: 48 | struct C16 (virtual base)
-// CHECK-X64: 48 | (C16 vftable pointer)
-// CHECK-X64: 64 | int a
-// CHECK-X64: | [sizeof=80, align=16
-// CHECK-X64: | nvsize=48, nvalign=16]
+// CHECK-NEXT: 0 | struct TestFA
+// CHECK-NEXT: 0 | struct TestF9 (primary base)
+// CHECK-NEXT: 0 | (TestF9 vftable pointer)
+// CHECK-NEXT: 4 | struct A4 (base)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | (TestF9 vbtable pointer)
+// CHECK-NEXT: 12 | int a
+// CHECK-NEXT: 16 | struct A4 (base)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 20 | int a
+// CHECK-NEXT: 32 | struct C16 (virtual base)
+// CHECK-NEXT: 32 | (C16 vftable pointer)
+// CHECK-NEXT: 48 | int a
+// CHECK-NEXT: | [sizeof=64, align=16
+// CHECK-NEXT: | nvsize=32, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct TestFA
+// CHECK-X64-NEXT: 0 | struct TestF9 (primary base)
+// CHECK-X64-NEXT: 0 | (TestF9 vftable pointer)
+// CHECK-X64-NEXT: 8 | struct A4 (base)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | (TestF9 vbtable pointer)
+// CHECK-X64-NEXT: 24 | int a
+// CHECK-X64-NEXT: 32 | struct A4 (base)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 36 | int a
+// CHECK-X64-NEXT: 48 | struct C16 (virtual base)
+// CHECK-X64-NEXT: 48 | (C16 vftable pointer)
+// CHECK-X64-NEXT: 64 | int a
+// CHECK-X64-NEXT: | [sizeof=80, align=16
+// CHECK-X64-NEXT: | nvsize=48, nvalign=16]
struct TestFB : A16, virtual C16 {
int a;
@@ -401,29 +411,29 @@ struct TestFB : A16, virtual C16 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct TestFB
-// CHECK: 0 | (TestFB vftable pointer)
-// CHECK: 16 | struct A16 (base)
-// CHECK: 16 | int a
-// CHECK: 32 | (TestFB vbtable pointer)
-// CHECK: 48 | int a
-// CHECK: 64 | struct C16 (virtual base)
-// CHECK: 64 | (C16 vftable pointer)
-// CHECK: 80 | int a
-// CHECK: | [sizeof=96, align=16
-// CHECK: | nvsize=64, nvalign=16]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct TestFB
-// CHECK-X64: 0 | (TestFB vftable pointer)
-// CHECK-X64: 16 | struct A16 (base)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 32 | (TestFB vbtable pointer)
-// CHECK-X64: 40 | int a
-// CHECK-X64: 48 | struct C16 (virtual base)
-// CHECK-X64: 48 | (C16 vftable pointer)
-// CHECK-X64: 64 | int a
-// CHECK-X64: | [sizeof=80, align=16
-// CHECK-X64: | nvsize=48, nvalign=16]
+// CHECK-NEXT: 0 | struct TestFB
+// CHECK-NEXT: 0 | (TestFB vftable pointer)
+// CHECK-NEXT: 16 | struct A16 (base)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 32 | (TestFB vbtable pointer)
+// CHECK-NEXT: 48 | int a
+// CHECK-NEXT: 64 | struct C16 (virtual base)
+// CHECK-NEXT: 64 | (C16 vftable pointer)
+// CHECK-NEXT: 80 | int a
+// CHECK-NEXT: | [sizeof=96, align=16
+// CHECK-NEXT: | nvsize=64, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct TestFB
+// CHECK-X64-NEXT: 0 | (TestFB vftable pointer)
+// CHECK-X64-NEXT: 16 | struct A16 (base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 32 | (TestFB vbtable pointer)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: 64 | struct C16 (virtual base)
+// CHECK-X64-NEXT: 64 | (C16 vftable pointer)
+// CHECK-X64-NEXT: 80 | int a
+// CHECK-X64-NEXT: | [sizeof=96, align=16
+// CHECK-X64-NEXT: | nvsize=64, nvalign=16]
struct TestFC : TestFB, A4 {
int a;
@@ -432,37 +442,37 @@ struct TestFC : TestFB, A4 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct TestFC
-// CHECK: 0 | struct TestFB (primary base)
-// CHECK: 0 | (TestFB vftable pointer)
-// CHECK: 16 | struct A16 (base)
-// CHECK: 16 | int a
-// CHECK: 32 | (TestFB vbtable pointer)
-// CHECK: 48 | int a
-// CHECK: 64 | struct A4 (base)
-// CHECK: 64 | int a
-// CHECK: 68 | int a
-// CHECK: 80 | struct C16 (virtual base)
-// CHECK: 80 | (C16 vftable pointer)
-// CHECK: 96 | int a
-// CHECK: | [sizeof=112, align=16
-// CHECK: | nvsize=80, nvalign=16]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct TestFC
-// CHECK-X64: 0 | struct TestFB (primary base)
-// CHECK-X64: 0 | (TestFB vftable pointer)
-// CHECK-X64: 16 | struct A16 (base)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 32 | (TestFB vbtable pointer)
-// CHECK-X64: 40 | int a
-// CHECK-X64: 48 | struct A4 (base)
-// CHECK-X64: 48 | int a
-// CHECK-X64: 52 | int a
-// CHECK-X64: 64 | struct C16 (virtual base)
-// CHECK-X64: 64 | (C16 vftable pointer)
-// CHECK-X64: 80 | int a
-// CHECK-X64: | [sizeof=96, align=16
-// CHECK-X64: | nvsize=64, nvalign=16]
+// CHECK-NEXT: 0 | struct TestFC
+// CHECK-NEXT: 0 | struct TestFB (primary base)
+// CHECK-NEXT: 0 | (TestFB vftable pointer)
+// CHECK-NEXT: 16 | struct A16 (base)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 32 | (TestFB vbtable pointer)
+// CHECK-NEXT: 48 | int a
+// CHECK-NEXT: 64 | struct A4 (base)
+// CHECK-NEXT: 64 | int a
+// CHECK-NEXT: 68 | int a
+// CHECK-NEXT: 80 | struct C16 (virtual base)
+// CHECK-NEXT: 80 | (C16 vftable pointer)
+// CHECK-NEXT: 96 | int a
+// CHECK-NEXT: | [sizeof=112, align=16
+// CHECK-NEXT: | nvsize=80, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct TestFC
+// CHECK-X64-NEXT: 0 | struct TestFB (primary base)
+// CHECK-X64-NEXT: 0 | (TestFB vftable pointer)
+// CHECK-X64-NEXT: 16 | struct A16 (base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 32 | (TestFB vbtable pointer)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: 64 | struct A4 (base)
+// CHECK-X64-NEXT: 64 | int a
+// CHECK-X64-NEXT: 68 | int a
+// CHECK-X64-NEXT: 80 | struct C16 (virtual base)
+// CHECK-X64-NEXT: 80 | (C16 vftable pointer)
+// CHECK-X64-NEXT: 96 | int a
+// CHECK-X64-NEXT: | [sizeof=112, align=16
+// CHECK-X64-NEXT: | nvsize=80, nvalign=16]
struct A16f {
@@ -486,43 +496,51 @@ struct F0 : A4, B {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct F0
-// CHECK: 0 | (F0 vftable pointer)
-// CHECK: 16 | struct A4 (base)
-// CHECK: 16 | int a
-// CHECK: 32 | struct B (base)
-// CHECK: 32 | struct A4 (base)
-// CHECK: 32 | int a
-// CHECK: 36 | struct Y (base)
-// CHECK: 36 | char y
-// CHECK: 48 | struct X (base)
-// CHECK: 48 | (X vbtable pointer)
-// CHECK: 52 | int a
-// CHECK: 64 | int a
-// CHECK: 80 | struct A16f (virtual base)
-// CHECK: 80 | (A16f vftable pointer)
-// CHECK: 96 | int a
-// CHECK: | [sizeof=112, align=16
-// CHECK: | nvsize=80, nvalign=16]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct F0
-// CHECK-X64: 0 | (F0 vftable pointer)
-// CHECK-X64: 8 | struct A4 (base)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | struct B (base)
-// CHECK-X64: 16 | struct A4 (base)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 20 | struct Y (base)
-// CHECK-X64: 20 | char y
-// CHECK-X64: 32 | struct X (base)
-// CHECK-X64: 32 | (X vbtable pointer)
-// CHECK-X64: 40 | int a
-// CHECK-X64: 48 | int a
-// CHECK-X64: 64 | struct A16f (virtual base)
-// CHECK-X64: 64 | (A16f vftable pointer)
-// CHECK-X64: 80 | int a
-// CHECK-X64: | [sizeof=96, align=16
-// CHECK-X64: | nvsize=64, nvalign=16]
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct F0
+// CHECK-NEXT: 0 | (F0 vftable pointer)
+// CHECK-NEXT: 16 | struct A4 (base)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 32 | struct B (base)
+// CHECK-NEXT: 32 | struct A4 (base)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: 36 | struct Y (base)
+// CHECK-NEXT: 36 | char y
+// CHECK-NEXT: 48 | struct X (base)
+// CHECK-NEXT: 48 | (X vbtable pointer)
+// CHECK-NEXT: 52 | int a
+// CHECK-NEXT: 64 | int a
+// CHECK-NEXT: 80 | struct A16f (virtual base)
+// CHECK-NEXT: 80 | (A16f vftable pointer)
+// CHECK-NEXT: 96 | int a
+// CHECK-NEXT: | [sizeof=112, align=16
+// CHECK-NEXT: | nvsize=80, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct F0
+// CHECK-X64-NEXT: 0 | (F0 vftable pointer)
+// CHECK-X64-NEXT: 16 | struct A4 (base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 32 | struct B (base)
+// CHECK-X64-NEXT: 32 | struct A4 (base)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 36 | struct Y (base)
+// CHECK-X64-NEXT: 36 | char y
+// CHECK-X64-NEXT: 48 | struct X (base)
+// CHECK-X64-NEXT: 48 | (X vbtable pointer)
+// CHECK-X64-NEXT: 56 | int a
+// CHECK-X64-NEXT: 64 | int a
+// CHECK-X64-NEXT: 80 | struct A16f (virtual base)
+// CHECK-X64-NEXT: 80 | (A16f vftable pointer)
+// CHECK-X64-NEXT: 96 | int a
+// CHECK-X64-NEXT: | [sizeof=112, align=16
+// CHECK-X64-NEXT: | nvsize=80, nvalign=16]
struct F1 : B, A4 {
int a;
@@ -531,43 +549,43 @@ struct F1 : B, A4 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct F1
-// CHECK: 0 | (F1 vftable pointer)
-// CHECK: 16 | struct B (base)
-// CHECK: 16 | struct A4 (base)
-// CHECK: 16 | int a
-// CHECK: 20 | struct Y (base)
-// CHECK: 20 | char y
-// CHECK: 32 | struct X (base)
-// CHECK: 32 | (X vbtable pointer)
-// CHECK: 36 | int a
-// CHECK: 48 | struct A4 (base)
-// CHECK: 48 | int a
-// CHECK: 52 | int a
-// CHECK: 64 | struct A16f (virtual base)
-// CHECK: 64 | (A16f vftable pointer)
-// CHECK: 80 | int a
-// CHECK: | [sizeof=96, align=16
-// CHECK: | nvsize=64, nvalign=16]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct F1
-// CHECK-X64: 0 | (F1 vftable pointer)
-// CHECK-X64: 16 | struct B (base)
-// CHECK-X64: 16 | struct A4 (base)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 20 | struct Y (base)
-// CHECK-X64: 20 | char y
-// CHECK-X64: 32 | struct X (base)
-// CHECK-X64: 32 | (X vbtable pointer)
-// CHECK-X64: 40 | int a
-// CHECK-X64: 48 | struct A4 (base)
-// CHECK-X64: 48 | int a
-// CHECK-X64: 52 | int a
-// CHECK-X64: 64 | struct A16f (virtual base)
-// CHECK-X64: 64 | (A16f vftable pointer)
-// CHECK-X64: 80 | int a
-// CHECK-X64: | [sizeof=96, align=16
-// CHECK-X64: | nvsize=64, nvalign=16]
+// CHECK-NEXT: 0 | struct F1
+// CHECK-NEXT: 0 | (F1 vftable pointer)
+// CHECK-NEXT: 16 | struct B (base)
+// CHECK-NEXT: 16 | struct A4 (base)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 20 | struct Y (base)
+// CHECK-NEXT: 20 | char y
+// CHECK-NEXT: 32 | struct X (base)
+// CHECK-NEXT: 32 | (X vbtable pointer)
+// CHECK-NEXT: 36 | int a
+// CHECK-NEXT: 48 | struct A4 (base)
+// CHECK-NEXT: 48 | int a
+// CHECK-NEXT: 52 | int a
+// CHECK-NEXT: 64 | struct A16f (virtual base)
+// CHECK-NEXT: 64 | (A16f vftable pointer)
+// CHECK-NEXT: 80 | int a
+// CHECK-NEXT: | [sizeof=96, align=16
+// CHECK-NEXT: | nvsize=64, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct F1
+// CHECK-X64-NEXT: 0 | (F1 vftable pointer)
+// CHECK-X64-NEXT: 16 | struct B (base)
+// CHECK-X64-NEXT: 16 | struct A4 (base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 20 | struct Y (base)
+// CHECK-X64-NEXT: 20 | char y
+// CHECK-X64-NEXT: 32 | struct X (base)
+// CHECK-X64-NEXT: 32 | (X vbtable pointer)
+// CHECK-X64-NEXT: 40 | int a
+// CHECK-X64-NEXT: 48 | struct A4 (base)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: 52 | int a
+// CHECK-X64-NEXT: 64 | struct A16f (virtual base)
+// CHECK-X64-NEXT: 64 | (A16f vftable pointer)
+// CHECK-X64-NEXT: 80 | int a
+// CHECK-X64-NEXT: | [sizeof=96, align=16
+// CHECK-X64-NEXT: | nvsize=64, nvalign=16]
struct F2 : A4, virtual A16f {
int a;
@@ -576,29 +594,29 @@ struct F2 : A4, virtual A16f {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct F2
-// CHECK: 0 | (F2 vftable pointer)
-// CHECK: 4 | struct A4 (base)
-// CHECK: 4 | int a
-// CHECK: 8 | (F2 vbtable pointer)
-// CHECK: 12 | int a
-// CHECK: 16 | struct A16f (virtual base)
-// CHECK: 16 | (A16f vftable pointer)
-// CHECK: 32 | int a
-// CHECK: | [sizeof=48, align=16
-// CHECK: | nvsize=16, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct F2
-// CHECK-X64: 0 | (F2 vftable pointer)
-// CHECK-X64: 8 | struct A4 (base)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | (F2 vbtable pointer)
-// CHECK-X64: 24 | int a
-// CHECK-X64: 32 | struct A16f (virtual base)
-// CHECK-X64: 32 | (A16f vftable pointer)
-// CHECK-X64: 48 | int a
-// CHECK-X64: | [sizeof=64, align=16
-// CHECK-X64: | nvsize=32, nvalign=8]
+// CHECK-NEXT: 0 | struct F2
+// CHECK-NEXT: 0 | (F2 vftable pointer)
+// CHECK-NEXT: 4 | struct A4 (base)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | (F2 vbtable pointer)
+// CHECK-NEXT: 12 | int a
+// CHECK-NEXT: 16 | struct A16f (virtual base)
+// CHECK-NEXT: 16 | (A16f vftable pointer)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: | [sizeof=48, align=16
+// CHECK-NEXT: | nvsize=16, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct F2
+// CHECK-X64-NEXT: 0 | (F2 vftable pointer)
+// CHECK-X64-NEXT: 8 | struct A4 (base)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | (F2 vbtable pointer)
+// CHECK-X64-NEXT: 24 | int a
+// CHECK-X64-NEXT: 32 | struct A16f (virtual base)
+// CHECK-X64-NEXT: 32 | (A16f vftable pointer)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: | [sizeof=64, align=16
+// CHECK-X64-NEXT: | nvsize=32, nvalign=16]
struct F3 : A4, virtual A16f {
__declspec(align(16)) int a;
@@ -607,29 +625,29 @@ struct F3 : A4, virtual A16f {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct F3
-// CHECK: 0 | (F3 vftable pointer)
-// CHECK: 16 | struct A4 (base)
-// CHECK: 16 | int a
-// CHECK: 20 | (F3 vbtable pointer)
-// CHECK: 48 | int a
-// CHECK: 64 | struct A16f (virtual base)
-// CHECK: 64 | (A16f vftable pointer)
-// CHECK: 80 | int a
-// CHECK: | [sizeof=96, align=16
-// CHECK: | nvsize=64, nvalign=16]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct F3
-// CHECK-X64: 0 | (F3 vftable pointer)
-// CHECK-X64: 8 | struct A4 (base)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | (F3 vbtable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: 48 | struct A16f (virtual base)
-// CHECK-X64: 48 | (A16f vftable pointer)
-// CHECK-X64: 64 | int a
-// CHECK-X64: | [sizeof=80, align=16
-// CHECK-X64: | nvsize=48, nvalign=16]
+// CHECK-NEXT: 0 | struct F3
+// CHECK-NEXT: 0 | (F3 vftable pointer)
+// CHECK-NEXT: 16 | struct A4 (base)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 20 | (F3 vbtable pointer)
+// CHECK-NEXT: 48 | int a
+// CHECK-NEXT: 64 | struct A16f (virtual base)
+// CHECK-NEXT: 64 | (A16f vftable pointer)
+// CHECK-NEXT: 80 | int a
+// CHECK-NEXT: | [sizeof=96, align=16
+// CHECK-NEXT: | nvsize=64, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct F3
+// CHECK-X64-NEXT: 0 | (F3 vftable pointer)
+// CHECK-X64-NEXT: 16 | struct A4 (base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 24 | (F3 vbtable pointer)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: 64 | struct A16f (virtual base)
+// CHECK-X64-NEXT: 64 | (A16f vftable pointer)
+// CHECK-X64-NEXT: 80 | int a
+// CHECK-X64-NEXT: | [sizeof=96, align=16
+// CHECK-X64-NEXT: | nvsize=64, nvalign=16]
struct F4 : A4, B {
__declspec(align(16)) int a;
@@ -638,43 +656,43 @@ struct F4 : A4, B {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct F4
-// CHECK: 0 | (F4 vftable pointer)
-// CHECK: 16 | struct A4 (base)
-// CHECK: 16 | int a
-// CHECK: 32 | struct B (base)
-// CHECK: 32 | struct A4 (base)
-// CHECK: 32 | int a
-// CHECK: 36 | struct Y (base)
-// CHECK: 36 | char y
-// CHECK: 48 | struct X (base)
-// CHECK: 48 | (X vbtable pointer)
-// CHECK: 52 | int a
-// CHECK: 64 | int a
-// CHECK: 80 | struct A16f (virtual base)
-// CHECK: 80 | (A16f vftable pointer)
-// CHECK: 96 | int a
-// CHECK: | [sizeof=112, align=16
-// CHECK: | nvsize=80, nvalign=16]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct F4
-// CHECK-X64: 0 | (F4 vftable pointer)
-// CHECK-X64: 8 | struct A4 (base)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | struct B (base)
-// CHECK-X64: 16 | struct A4 (base)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 20 | struct Y (base)
-// CHECK-X64: 20 | char y
-// CHECK-X64: 32 | struct X (base)
-// CHECK-X64: 32 | (X vbtable pointer)
-// CHECK-X64: 40 | int a
-// CHECK-X64: 48 | int a
-// CHECK-X64: 64 | struct A16f (virtual base)
-// CHECK-X64: 64 | (A16f vftable pointer)
-// CHECK-X64: 80 | int a
-// CHECK-X64: | [sizeof=96, align=16
-// CHECK-X64: | nvsize=64, nvalign=16]
+// CHECK-NEXT: 0 | struct F4
+// CHECK-NEXT: 0 | (F4 vftable pointer)
+// CHECK-NEXT: 16 | struct A4 (base)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 32 | struct B (base)
+// CHECK-NEXT: 32 | struct A4 (base)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: 36 | struct Y (base)
+// CHECK-NEXT: 36 | char y
+// CHECK-NEXT: 48 | struct X (base)
+// CHECK-NEXT: 48 | (X vbtable pointer)
+// CHECK-NEXT: 52 | int a
+// CHECK-NEXT: 64 | int a
+// CHECK-NEXT: 80 | struct A16f (virtual base)
+// CHECK-NEXT: 80 | (A16f vftable pointer)
+// CHECK-NEXT: 96 | int a
+// CHECK-NEXT: | [sizeof=112, align=16
+// CHECK-NEXT: | nvsize=80, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct F4
+// CHECK-X64-NEXT: 0 | (F4 vftable pointer)
+// CHECK-X64-NEXT: 16 | struct A4 (base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 32 | struct B (base)
+// CHECK-X64-NEXT: 32 | struct A4 (base)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 36 | struct Y (base)
+// CHECK-X64-NEXT: 36 | char y
+// CHECK-X64-NEXT: 48 | struct X (base)
+// CHECK-X64-NEXT: 48 | (X vbtable pointer)
+// CHECK-X64-NEXT: 56 | int a
+// CHECK-X64-NEXT: 64 | int a
+// CHECK-X64-NEXT: 80 | struct A16f (virtual base)
+// CHECK-X64-NEXT: 80 | (A16f vftable pointer)
+// CHECK-X64-NEXT: 96 | int a
+// CHECK-X64-NEXT: | [sizeof=112, align=16
+// CHECK-X64-NEXT: | nvsize=80, nvalign=16]
struct F5 : A16f, virtual A4 {
int a;
@@ -683,27 +701,27 @@ struct F5 : A16f, virtual A4 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct F5
-// CHECK: 0 | struct A16f (primary base)
-// CHECK: 0 | (A16f vftable pointer)
-// CHECK: 16 | int a
-// CHECK: 32 | (F5 vbtable pointer)
-// CHECK: 48 | int a
-// CHECK: 64 | struct A4 (virtual base)
-// CHECK: 64 | int a
-// CHECK: | [sizeof=80, align=16
-// CHECK: | nvsize=64, nvalign=16]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct F5
-// CHECK-X64: 0 | struct A16f (primary base)
-// CHECK-X64: 0 | (A16f vftable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 32 | (F5 vbtable pointer)
-// CHECK-X64: 40 | int a
-// CHECK-X64: 48 | struct A4 (virtual base)
-// CHECK-X64: 48 | int a
-// CHECK-X64: | [sizeof=64, align=16
-// CHECK-X64: | nvsize=48, nvalign=16]
+// CHECK-NEXT: 0 | struct F5
+// CHECK-NEXT: 0 | struct A16f (primary base)
+// CHECK-NEXT: 0 | (A16f vftable pointer)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 32 | (F5 vbtable pointer)
+// CHECK-NEXT: 48 | int a
+// CHECK-NEXT: 64 | struct A4 (virtual base)
+// CHECK-NEXT: 64 | int a
+// CHECK-NEXT: | [sizeof=80, align=16
+// CHECK-NEXT: | nvsize=64, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct F5
+// CHECK-X64-NEXT: 0 | struct A16f (primary base)
+// CHECK-X64-NEXT: 0 | (A16f vftable pointer)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 32 | (F5 vbtable pointer)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: 64 | struct A4 (virtual base)
+// CHECK-X64-NEXT: 64 | int a
+// CHECK-X64-NEXT: | [sizeof=80, align=16
+// CHECK-X64-NEXT: | nvsize=64, nvalign=16]
struct F6 : virtual A16f, A4, virtual B {
int a;
@@ -712,45 +730,91 @@ struct F6 : virtual A16f, A4, virtual B {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct F6
-// CHECK: 0 | (F6 vftable pointer)
-// CHECK: 4 | struct A4 (base)
-// CHECK: 4 | int a
-// CHECK: 8 | (F6 vbtable pointer)
-// CHECK: 12 | int a
-// CHECK: 16 | struct A16f (virtual base)
-// CHECK: 16 | (A16f vftable pointer)
-// CHECK: 32 | int a
-// CHECK: 48 | struct B (virtual base)
-// CHECK: 48 | struct A4 (base)
-// CHECK: 48 | int a
-// CHECK: 52 | struct Y (base)
-// CHECK: 52 | char y
-// CHECK: 64 | struct X (base)
-// CHECK: 64 | (X vbtable pointer)
-// CHECK: 68 | int a
-// CHECK: | [sizeof=80, align=16
-// CHECK: | nvsize=16, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct F6
-// CHECK-X64: 0 | (F6 vftable pointer)
-// CHECK-X64: 8 | struct A4 (base)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | (F6 vbtable pointer)
-// CHECK-X64: 24 | int a
-// CHECK-X64: 32 | struct A16f (virtual base)
-// CHECK-X64: 32 | (A16f vftable pointer)
-// CHECK-X64: 48 | int a
-// CHECK-X64: 64 | struct B (virtual base)
-// CHECK-X64: 64 | struct A4 (base)
-// CHECK-X64: 64 | int a
-// CHECK-X64: 68 | struct Y (base)
-// CHECK-X64: 68 | char y
-// CHECK-X64: 80 | struct X (base)
-// CHECK-X64: 80 | (X vbtable pointer)
-// CHECK-X64: 88 | int a
-// CHECK-X64: | [sizeof=96, align=16
-// CHECK-X64: | nvsize=32, nvalign=8]
+// CHECK-NEXT: 0 | struct F6
+// CHECK-NEXT: 0 | (F6 vftable pointer)
+// CHECK-NEXT: 4 | struct A4 (base)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | (F6 vbtable pointer)
+// CHECK-NEXT: 12 | int a
+// CHECK-NEXT: 16 | struct A16f (virtual base)
+// CHECK-NEXT: 16 | (A16f vftable pointer)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: 48 | struct B (virtual base)
+// CHECK-NEXT: 48 | struct A4 (base)
+// CHECK-NEXT: 48 | int a
+// CHECK-NEXT: 52 | struct Y (base)
+// CHECK-NEXT: 52 | char y
+// CHECK-NEXT: 64 | struct X (base)
+// CHECK-NEXT: 64 | (X vbtable pointer)
+// CHECK-NEXT: 68 | int a
+// CHECK-NEXT: | [sizeof=80, align=16
+// CHECK-NEXT: | nvsize=16, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct F6
+// CHECK-X64-NEXT: 0 | (F6 vftable pointer)
+// CHECK-X64-NEXT: 8 | struct A4 (base)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | (F6 vbtable pointer)
+// CHECK-X64-NEXT: 24 | int a
+// CHECK-X64-NEXT: 32 | struct A16f (virtual base)
+// CHECK-X64-NEXT: 32 | (A16f vftable pointer)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: 64 | struct B (virtual base)
+// CHECK-X64-NEXT: 64 | struct A4 (base)
+// CHECK-X64-NEXT: 64 | int a
+// CHECK-X64-NEXT: 68 | struct Y (base)
+// CHECK-X64-NEXT: 68 | char y
+// CHECK-X64-NEXT: 80 | struct X (base)
+// CHECK-X64-NEXT: 80 | (X vbtable pointer)
+// CHECK-X64-NEXT: 88 | int a
+// CHECK-X64-NEXT: | [sizeof=96, align=16
+// CHECK-X64-NEXT: | nvsize=32, nvalign=16]
+
+struct ArrayFieldOfRecords {
+ A4 InlineElts[2];
+};
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct ArrayFieldOfRecords
+// CHECK-NEXT: 0 | struct A4 [2] InlineElts
+// CHECK-NEXT: | [sizeof=8, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct ArrayFieldOfRecords
+// CHECK-X64-NEXT: 0 | struct A4 [2] InlineElts
+// CHECK-X64-NEXT: | [sizeof=8, align=4
+// CHECK-X64-NEXT: | nvsize=8, nvalign=4]
+
+struct ArrayOfArrayFieldOfRecords {
+ A4 InlineElts[2][2];
+};
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct ArrayOfArrayFieldOfRecords
+// CHECK-NEXT: 0 | struct A4 [2][2] InlineElts
+// CHECK-NEXT: | [sizeof=16, align=4
+// CHECK-NEXT: | nvsize=16, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct ArrayOfArrayFieldOfRecords
+// CHECK-X64-NEXT: 0 | struct A4 [2][2] InlineElts
+// CHECK-X64-NEXT: | [sizeof=16, align=4
+// CHECK-X64-NEXT: | nvsize=16, nvalign=4]
+
+struct RecordArrayTypedef {
+ typedef A4 ArrayTy[2];
+ ArrayTy InlineElts[2];
+};
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct RecordArrayTypedef
+// CHECK-NEXT: 0 | ArrayTy [2] InlineElts
+// CHECK-NEXT: | [sizeof=16, align=4
+// CHECK-NEXT: | nvsize=16, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct RecordArrayTypedef
+// CHECK-X64-NEXT: 0 | ArrayTy [2] InlineElts
+// CHECK-X64-NEXT: | [sizeof=16, align=4
+// CHECK-X64-NEXT: | nvsize=16, nvalign=4]
int a[
sizeof(TestF0)+
@@ -772,4 +836,8 @@ sizeof(F2)+
sizeof(F3)+
sizeof(F4)+
sizeof(F5)+
-sizeof(F6)];
+sizeof(F6)+
+sizeof(ArrayFieldOfRecords)+
+sizeof(ArrayOfArrayFieldOfRecords)+
+sizeof(RecordArrayTypedef)+
+0];
diff --git a/test/Layout/ms-x86-bitfields-vbases.cpp b/test/Layout/ms-x86-bitfields-vbases.cpp
index e11ef67a6347..5b54596bbb83 100644
--- a/test/Layout/ms-x86-bitfields-vbases.cpp
+++ b/test/Layout/ms-x86-bitfields-vbases.cpp
@@ -1,84 +1,120 @@
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only -cxx-abi microsoft %s 2>&1 \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>&1 \
// RUN: | FileCheck %s
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only -cxx-abi microsoft %s 2>/dev/null \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
// RUN: | FileCheck %s -check-prefix CHECK-X64
-struct B0 { };
-
-struct A : virtual B0 { char a : 1; };
+struct B0 { int a; };
+struct B1 { int a; };
-// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct A
-// CHECK: 0 | (A vbtable pointer)
-// CHECK: 4 | char a
-// CHECK: 9 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=9, align=4
-// CHECK: | nvsize=8, nvalign=4]
+struct A : virtual B0 { char a : 1; };
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct A
+// CHECK-NEXT: 0 | (A vbtable pointer)
+// CHECK-NEXT: 4 | char a
+// CHECK-NEXT: 8 | struct B0 (virtual base)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: | [sizeof=12, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct A
-// CHECK-X64: 0 | (A vbtable pointer)
-// CHECK-X64: 8 | char a
-// CHECK-X64: 17 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct A
+// CHECK-X64-NEXT: 0 | (A vbtable pointer)
+// CHECK-X64-NEXT: 8 | char a
+// CHECK-X64-NEXT: 16 | struct B0 (virtual base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
-struct B : virtual B0 { short a : 1; };
+struct B : virtual B0 { short a : 1; };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct B
-// CHECK: 0 | (B vbtable pointer)
-// CHECK: 4 | short a
-// CHECK: 10 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=10, align=4
-// CHECK: | nvsize=8, nvalign=4]
+// CHECK-NEXT: 0 | struct B
+// CHECK-NEXT: 0 | (B vbtable pointer)
+// CHECK-NEXT: 4 | short a
+// CHECK-NEXT: 8 | struct B0 (virtual base)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: | [sizeof=12, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct B
-// CHECK-X64: 0 | (B vbtable pointer)
-// CHECK-X64: 8 | short a
-// CHECK-X64: 18 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct B
+// CHECK-X64-NEXT: 0 | (B vbtable pointer)
+// CHECK-X64-NEXT: 8 | short a
+// CHECK-X64-NEXT: 16 | struct B0 (virtual base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
-struct C : virtual B0 { char a : 1; char : 0; };
+struct C : virtual B0 { char a : 1; char : 0; };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct C
-// CHECK: 0 | (C vbtable pointer)
-// CHECK: 4 | char a
-// CHECK: 5 | char
-// CHECK: 8 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=8, align=4
-// CHECK: | nvsize=8, nvalign=4]
+// CHECK-NEXT: 0 | struct C
+// CHECK-NEXT: 0 | (C vbtable pointer)
+// CHECK-NEXT: 4 | char a
+// CHECK-NEXT: 5 | char
+// CHECK-NEXT: 8 | struct B0 (virtual base)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: | [sizeof=12, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct C
-// CHECK-X64: 0 | (C vbtable pointer)
-// CHECK-X64: 8 | char a
-// CHECK-X64: 9 | char
-// CHECK-X64: 16 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=16, align=8
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct C
+// CHECK-X64-NEXT: 0 | (C vbtable pointer)
+// CHECK-X64-NEXT: 8 | char a
+// CHECK-X64-NEXT: 9 | char
+// CHECK-X64-NEXT: 16 | struct B0 (virtual base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
-struct D : virtual B0 { char a : 1; char b; };
+struct D : virtual B0 { char a : 1; char b; };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct D
-// CHECK: 0 | (D vbtable pointer)
-// CHECK: 4 | char a
-// CHECK: 5 | char b
-// CHECK: 8 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=8, align=4
-// CHECK: | nvsize=8, nvalign=4]
+// CHECK-NEXT: 0 | struct D
+// CHECK-NEXT: 0 | (D vbtable pointer)
+// CHECK-NEXT: 4 | char a
+// CHECK-NEXT: 5 | char b
+// CHECK-NEXT: 8 | struct B0 (virtual base)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: | [sizeof=12, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct D
+// CHECK-X64-NEXT: 0 | (D vbtable pointer)
+// CHECK-X64-NEXT: 8 | char a
+// CHECK-X64-NEXT: 9 | char b
+// CHECK-X64-NEXT: 16 | struct B0 (virtual base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
+
+struct E : virtual B0, virtual B1 { long long : 1; };
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct E
+// CHECK-NEXT: 0 | (E vbtable pointer)
+// CHECK-NEXT: 8 | long long
+// CHECK-NEXT: 16 | struct B0 (virtual base)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 20 | struct B1 (virtual base)
+// CHECK-NEXT: 20 | int a
+// CHECK-NEXT: | [sizeof=24, align=8
+// CHECK-NEXT: | nvsize=16, nvalign=8]
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct D
-// CHECK-X64: 0 | (D vbtable pointer)
-// CHECK-X64: 8 | char a
-// CHECK-X64: 9 | char b
-// CHECK-X64: 16 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=16, align=8
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct E
+// CHECK-X64-NEXT: 0 | (E vbtable pointer)
+// CHECK-X64-NEXT: 8 | long long
+// CHECK-X64-NEXT: 16 | struct B0 (virtual base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 20 | struct B1 (virtual base)
+// CHECK-X64-NEXT: 20 | int a
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
int a[
sizeof(A)+
sizeof(B)+
sizeof(C)+
-sizeof(D)];
+sizeof(D)+
+sizeof(E)];
diff --git a/test/Layout/ms-x86-empty-base-after-base-with-vbptr.cpp b/test/Layout/ms-x86-empty-base-after-base-with-vbptr.cpp
index 293a61b96e64..224594ead408 100644
--- a/test/Layout/ms-x86-empty-base-after-base-with-vbptr.cpp
+++ b/test/Layout/ms-x86-empty-base-after-base-with-vbptr.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -cxx-abi microsoft %s 2>/dev/null \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts %s 2>/dev/null \
// RUN: | FileCheck %s
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -cxx-abi microsoft %s 2>/dev/null \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts %s 2>/dev/null \
// RUN: | FileCheck %s -check-prefix CHECK-X64
@@ -14,197 +14,209 @@ struct Z : Y { };
struct A : X, W { char a; };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct A
-// CHECK: 0 | struct X (base)
-// CHECK: 0 | (X vbtable pointer)
-// CHECK: 4 | char a
-// CHECK: 9 | struct W (base) (empty)
-// CHECK: 9 | char a
-// CHECK: 12 | struct V (virtual base) (empty)
-// CHECK: | [sizeof=12, align=4
-// CHECK: | nvsize=12, nvalign=4]
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct A
+// CHECK-NEXT: 0 | struct X (base)
+// CHECK-NEXT: 0 | (X vbtable pointer)
+// CHECK-NEXT: 4 | char a
+// CHECK-NEXT: 9 | struct W (base) (empty)
+// CHECK-NEXT: 9 | char a
+// CHECK-NEXT: 12 | struct V (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=12, align=4
+// CHECK-NEXT: | nvsize=12, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct A
-// CHECK-X64: 0 | struct X (base)
-// CHECK-X64: 0 | (X vbtable pointer)
-// CHECK-X64: 8 | char a
-// CHECK-X64: 17 | struct W (base) (empty)
-// CHECK-X64: 17 | char a
-// CHECK-X64: 24 | struct V (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct A
+// CHECK-X64-NEXT: 0 | struct X (base)
+// CHECK-X64-NEXT: 0 | (X vbtable pointer)
+// CHECK-X64-NEXT: 8 | char a
+// CHECK-X64-NEXT: 17 | struct W (base) (empty)
+// CHECK-X64-NEXT: 17 | char a
+// CHECK-X64-NEXT: 24 | struct V (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct B : X, U, W { char a; };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct B
-// CHECK: 0 | struct X (base)
-// CHECK: 0 | (X vbtable pointer)
-// CHECK: 4 | char a
-// CHECK: 8 | struct U (base)
-// CHECK: 8 | char a
-// CHECK: 9 | struct W (base) (empty)
-// CHECK: 9 | char a
-// CHECK: 12 | struct V (virtual base) (empty)
-// CHECK: | [sizeof=12, align=4
-// CHECK: | nvsize=12, nvalign=4]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct B
+// CHECK-NEXT: 0 | struct X (base)
+// CHECK-NEXT: 0 | (X vbtable pointer)
+// CHECK-NEXT: 4 | char a
+// CHECK-NEXT: 8 | struct U (base)
+// CHECK-NEXT: 8 | char a
+// CHECK-NEXT: 9 | struct W (base) (empty)
+// CHECK-NEXT: 9 | char a
+// CHECK-NEXT: 12 | struct V (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=12, align=4
+// CHECK-NEXT: | nvsize=12, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct B
-// CHECK-X64: 0 | struct X (base)
-// CHECK-X64: 0 | (X vbtable pointer)
-// CHECK-X64: 8 | char a
-// CHECK-X64: 16 | struct U (base)
-// CHECK-X64: 16 | char a
-// CHECK-X64: 17 | struct W (base) (empty)
-// CHECK-X64: 17 | char a
-// CHECK-X64: 24 | struct V (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct B
+// CHECK-X64-NEXT: 0 | struct X (base)
+// CHECK-X64-NEXT: 0 | (X vbtable pointer)
+// CHECK-X64-NEXT: 8 | char a
+// CHECK-X64-NEXT: 16 | struct U (base)
+// CHECK-X64-NEXT: 16 | char a
+// CHECK-X64-NEXT: 17 | struct W (base) (empty)
+// CHECK-X64-NEXT: 17 | char a
+// CHECK-X64-NEXT: 24 | struct V (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct C : X, V, W { char a; };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct C
-// CHECK: 0 | struct X (base)
-// CHECK: 0 | (X vbtable pointer)
-// CHECK: 4 | char a
-// CHECK: 9 | struct V (base) (empty)
-// CHECK: 10 | struct W (base) (empty)
-// CHECK: 10 | char a
-// CHECK: 12 | struct V (virtual base) (empty)
-// CHECK: | [sizeof=12, align=4
-// CHECK: | nvsize=12, nvalign=4]
+// CHECK-NEXT: 0 | struct C
+// CHECK-NEXT: 0 | struct X (base)
+// CHECK-NEXT: 0 | (X vbtable pointer)
+// CHECK-NEXT: 4 | char a
+// CHECK-NEXT: 9 | struct V (base) (empty)
+// CHECK-NEXT: 10 | struct W (base) (empty)
+// CHECK-NEXT: 10 | char a
+// CHECK-NEXT: 12 | struct V (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=12, align=4
+// CHECK-NEXT: | nvsize=12, nvalign=4]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct C
-// CHECK-X64: 0 | struct X (base)
-// CHECK-X64: 0 | (X vbtable pointer)
-// CHECK-X64: 8 | char a
-// CHECK-X64: 17 | struct V (base) (empty)
-// CHECK-X64: 18 | struct W (base) (empty)
-// CHECK-X64: 18 | char a
-// CHECK-X64: 24 | struct V (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct C
+// CHECK-X64-NEXT: 0 | struct X (base)
+// CHECK-X64-NEXT: 0 | (X vbtable pointer)
+// CHECK-X64-NEXT: 8 | char a
+// CHECK-X64-NEXT: 17 | struct V (base) (empty)
+// CHECK-X64-NEXT: 18 | struct W (base) (empty)
+// CHECK-X64-NEXT: 18 | char a
+// CHECK-X64-NEXT: 24 | struct V (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct D : X, U, V, W { char a; };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct D
-// CHECK: 0 | struct X (base)
-// CHECK: 0 | (X vbtable pointer)
-// CHECK: 4 | char a
-// CHECK: 8 | struct U (base)
-// CHECK: 8 | char a
-// CHECK: 9 | struct V (base) (empty)
-// CHECK: 10 | struct W (base) (empty)
-// CHECK: 10 | char a
-// CHECK: 12 | struct V (virtual base) (empty)
-// CHECK: | [sizeof=12, align=4
-// CHECK: | nvsize=12, nvalign=4]
+// CHECK-NEXT: 0 | struct D
+// CHECK-NEXT: 0 | struct X (base)
+// CHECK-NEXT: 0 | (X vbtable pointer)
+// CHECK-NEXT: 4 | char a
+// CHECK-NEXT: 8 | struct U (base)
+// CHECK-NEXT: 8 | char a
+// CHECK-NEXT: 9 | struct V (base) (empty)
+// CHECK-NEXT: 10 | struct W (base) (empty)
+// CHECK-NEXT: 10 | char a
+// CHECK-NEXT: 12 | struct V (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=12, align=4
+// CHECK-NEXT: | nvsize=12, nvalign=4]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct D
-// CHECK-X64: 0 | struct X (base)
-// CHECK-X64: 0 | (X vbtable pointer)
-// CHECK-X64: 8 | char a
-// CHECK-X64: 16 | struct U (base)
-// CHECK-X64: 16 | char a
-// CHECK-X64: 17 | struct V (base) (empty)
-// CHECK-X64: 18 | struct W (base) (empty)
-// CHECK-X64: 18 | char a
-// CHECK-X64: 24 | struct V (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct D
+// CHECK-X64-NEXT: 0 | struct X (base)
+// CHECK-X64-NEXT: 0 | (X vbtable pointer)
+// CHECK-X64-NEXT: 8 | char a
+// CHECK-X64-NEXT: 16 | struct U (base)
+// CHECK-X64-NEXT: 16 | char a
+// CHECK-X64-NEXT: 17 | struct V (base) (empty)
+// CHECK-X64-NEXT: 18 | struct W (base) (empty)
+// CHECK-X64-NEXT: 18 | char a
+// CHECK-X64-NEXT: 24 | struct V (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct E : X, U, Y, V, W { char a; };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct E
-// CHECK: 0 | struct X (base)
-// CHECK: 0 | (X vbtable pointer)
-// CHECK: 4 | char a
-// CHECK: 8 | struct U (base)
-// CHECK: 8 | char a
-// CHECK: 12 | struct Y (base)
-// CHECK: 12 | (Y vbtable pointer)
-// CHECK: 16 | char a
-// CHECK: 21 | struct V (base) (empty)
-// CHECK: 22 | struct W (base) (empty)
-// CHECK: 22 | char a
-// CHECK: 24 | struct V (virtual base) (empty)
-// CHECK: | [sizeof=24, align=4
-// CHECK: | nvsize=24, nvalign=4]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct E
+// CHECK-NEXT: 0 | struct X (base)
+// CHECK-NEXT: 0 | (X vbtable pointer)
+// CHECK-NEXT: 4 | char a
+// CHECK-NEXT: 8 | struct U (base)
+// CHECK-NEXT: 8 | char a
+// CHECK-NEXT: 12 | struct Y (base)
+// CHECK-NEXT: 12 | (Y vbtable pointer)
+// CHECK-NEXT: 16 | char a
+// CHECK-NEXT: 21 | struct V (base) (empty)
+// CHECK-NEXT: 22 | struct W (base) (empty)
+// CHECK-NEXT: 22 | char a
+// CHECK-NEXT: 24 | struct V (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=24, align=4
+// CHECK-NEXT: | nvsize=24, nvalign=4]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct E
-// CHECK-X64: 0 | struct X (base)
-// CHECK-X64: 0 | (X vbtable pointer)
-// CHECK-X64: 8 | char a
-// CHECK-X64: 16 | struct U (base)
-// CHECK-X64: 16 | char a
-// CHECK-X64: 24 | struct Y (base)
-// CHECK-X64: 24 | (Y vbtable pointer)
-// CHECK-X64: 32 | char a
-// CHECK-X64: 41 | struct V (base) (empty)
-// CHECK-X64: 42 | struct W (base) (empty)
-// CHECK-X64: 42 | char a
-// CHECK-X64: 48 | struct V (virtual base) (empty)
-// CHECK-X64: | [sizeof=48, align=8
-// CHECK-X64: | nvsize=48, nvalign=8]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct E
+// CHECK-X64-NEXT: 0 | struct X (base)
+// CHECK-X64-NEXT: 0 | (X vbtable pointer)
+// CHECK-X64-NEXT: 8 | char a
+// CHECK-X64-NEXT: 16 | struct U (base)
+// CHECK-X64-NEXT: 16 | char a
+// CHECK-X64-NEXT: 24 | struct Y (base)
+// CHECK-X64-NEXT: 24 | (Y vbtable pointer)
+// CHECK-X64-NEXT: 32 | char a
+// CHECK-X64-NEXT: 41 | struct V (base) (empty)
+// CHECK-X64-NEXT: 42 | struct W (base) (empty)
+// CHECK-X64-NEXT: 42 | char a
+// CHECK-X64-NEXT: 48 | struct V (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=48, align=8
+// CHECK-X64-NEXT: | nvsize=48, nvalign=8]
struct F : Z, W { char a; };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct F
-// CHECK: 0 | struct Z (base)
-// CHECK: 0 | struct Y (base)
-// CHECK: 0 | (Y vbtable pointer)
-// CHECK: 4 | char a
-// CHECK: 9 | struct W (base) (empty)
-// CHECK: 9 | char a
-// CHECK: 12 | struct V (virtual base) (empty)
-// CHECK: | [sizeof=12, align=4
-// CHECK: | nvsize=12, nvalign=4]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct F
+// CHECK-NEXT: 0 | struct Z (base)
+// CHECK-NEXT: 0 | struct Y (base)
+// CHECK-NEXT: 0 | (Y vbtable pointer)
+// CHECK-NEXT: 4 | char a
+// CHECK-NEXT: 9 | struct W (base) (empty)
+// CHECK-NEXT: 9 | char a
+// CHECK-NEXT: 12 | struct V (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=12, align=4
+// CHECK-NEXT: | nvsize=12, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct F
-// CHECK-X64: 0 | struct Z (base)
-// CHECK-X64: 0 | struct Y (base)
-// CHECK-X64: 0 | (Y vbtable pointer)
-// CHECK-X64: 8 | char a
-// CHECK-X64: 17 | struct W (base) (empty)
-// CHECK-X64: 17 | char a
-// CHECK-X64: 24 | struct V (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct F
+// CHECK-X64-NEXT: 0 | struct Z (base)
+// CHECK-X64-NEXT: 0 | struct Y (base)
+// CHECK-X64-NEXT: 0 | (Y vbtable pointer)
+// CHECK-X64-NEXT: 8 | char a
+// CHECK-X64-NEXT: 17 | struct W (base) (empty)
+// CHECK-X64-NEXT: 17 | char a
+// CHECK-X64-NEXT: 24 | struct V (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct G : X, W, Y, V { char a; };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct G
-// CHECK: 0 | struct X (base)
-// CHECK: 0 | (X vbtable pointer)
-// CHECK: 4 | char a
-// CHECK: 9 | struct W (base) (empty)
-// CHECK: 12 | struct Y (base)
-// CHECK: 12 | (Y vbtable pointer)
-// CHECK: 16 | char a
-// CHECK: 21 | struct V (base) (empty)
-// CHECK: 21 | char a
-// CHECK: 24 | struct V (virtual base) (empty)
-// CHECK: | [sizeof=24, align=4
-// CHECK: | nvsize=24, nvalign=4]
+// CHECK-NEXT: 0 | struct G
+// CHECK-NEXT: 0 | struct X (base)
+// CHECK-NEXT: 0 | (X vbtable pointer)
+// CHECK-NEXT: 4 | char a
+// CHECK-NEXT: 9 | struct W (base) (empty)
+// CHECK-NEXT: 12 | struct Y (base)
+// CHECK-NEXT: 12 | (Y vbtable pointer)
+// CHECK-NEXT: 16 | char a
+// CHECK-NEXT: 21 | struct V (base) (empty)
+// CHECK-NEXT: 21 | char a
+// CHECK-NEXT: 24 | struct V (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=24, align=4
+// CHECK-NEXT: | nvsize=24, nvalign=4]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct G
-// CHECK-X64: 0 | struct X (base)
-// CHECK-X64: 0 | (X vbtable pointer)
-// CHECK-X64: 8 | char a
-// CHECK-X64: 17 | struct W (base) (empty)
-// CHECK-X64: 24 | struct Y (base)
-// CHECK-X64: 24 | (Y vbtable pointer)
-// CHECK-X64: 32 | char a
-// CHECK-X64: 41 | struct V (base) (empty)
-// CHECK-X64: 41 | char a
-// CHECK-X64: 48 | struct V (virtual base) (empty)
-// CHECK-X64: | [sizeof=48, align=8
-// CHECK-X64: | nvsize=48, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct G
+// CHECK-X64-NEXT: 0 | struct X (base)
+// CHECK-X64-NEXT: 0 | (X vbtable pointer)
+// CHECK-X64-NEXT: 8 | char a
+// CHECK-X64-NEXT: 17 | struct W (base) (empty)
+// CHECK-X64-NEXT: 24 | struct Y (base)
+// CHECK-X64-NEXT: 24 | (Y vbtable pointer)
+// CHECK-X64-NEXT: 32 | char a
+// CHECK-X64-NEXT: 41 | struct V (base) (empty)
+// CHECK-X64-NEXT: 41 | char a
+// CHECK-X64-NEXT: 48 | struct V (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=48, align=8
+// CHECK-X64-NEXT: | nvsize=48, nvalign=8]
int a[
sizeof(A)+
diff --git a/test/Layout/ms-x86-empty-nonvirtual-bases.cpp b/test/Layout/ms-x86-empty-nonvirtual-bases.cpp
index 01d10c9994f6..6ef14948e346 100644
--- a/test/Layout/ms-x86-empty-nonvirtual-bases.cpp
+++ b/test/Layout/ms-x86-empty-nonvirtual-bases.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only -cxx-abi microsoft %s 2>/dev/null \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
// RUN: | FileCheck %s
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only -cxx-abi microsoft %s 2>/dev/null \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
// RUN: | FileCheck %s
extern "C" int printf(const char *fmt, ...);
@@ -23,11 +23,12 @@ struct A : B0 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct A
-// CHECK: 0 | struct B0 (base) (empty)
-// CHECK: 0 | int a
-// CHECK: | [sizeof=8, align=8
-// CHECK: | nvsize=8, nvalign=8]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct A
+// CHECK-NEXT: 0 | struct B0 (base) (empty)
+// CHECK-NEXT: 0 | int a
+// CHECK-NEXT: | [sizeof=8, align=8
+// CHECK-NEXT: | nvsize=8, nvalign=8]
struct B : B0 {
B0 b0;
@@ -36,14 +37,14 @@ struct B : B0 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct B
-// CHECK: 0 | struct B0 (base) (empty)
-// CHECK: 0 | struct B0 b0 (empty)
-// CHECK: | [sizeof=8, align=8
-// CHECK: | nvsize=0, nvalign=1]
-// CHECK: 8 | int a
-// CHECK: | [sizeof=16, align=8
-// CHECK: | nvsize=16, nvalign=8]
+// CHECK-NEXT: 0 | struct B
+// CHECK-NEXT: 0 | struct B0 (base) (empty)
+// CHECK-NEXT: 0 | struct B0 b0 (empty)
+// CHECK-NEXT: | [sizeof=8, align=8
+// CHECK-NEXT: | nvsize=0, nvalign=8]
+// CHECK: 8 | int a
+// CHECK-NEXT: | [sizeof=16, align=8
+// CHECK-NEXT: | nvsize=16, nvalign=8]
struct C : B0, B1, B2, B3, B4 {
int a;
@@ -51,15 +52,19 @@ struct C : B0, B1, B2, B3, B4 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct C
-// CHECK: 0 | struct B0 (base) (empty)
-// CHECK: 8 | struct B1 (base) (empty)
-// CHECK: 16 | struct B2 (base) (empty)
-// CHECK: 24 | struct B3 (base) (empty)
-// CHECK: 32 | struct B4 (base) (empty)
-// CHECK: 32 | int a
-// CHECK: | [sizeof=40, align=8
-// CHECK: | nvsize=40, nvalign=8]
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct C
+// CHECK-NEXT: 0 | struct B0 (base) (empty)
+// CHECK-NEXT: 8 | struct B1 (base) (empty)
+// CHECK-NEXT: 16 | struct B2 (base) (empty)
+// CHECK-NEXT: 24 | struct B3 (base) (empty)
+// CHECK-NEXT: 32 | struct B4 (base) (empty)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: | [sizeof=40, align=8
+// CHECK-NEXT: | nvsize=40, nvalign=8]
struct D {
B0 b0;
@@ -72,28 +77,31 @@ struct D {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct D
-// CHECK: 0 | struct B0 b0 (empty)
-// CHECK: | [sizeof=8, align=8
-// CHECK: | nvsize=0, nvalign=1]
-// CHECK: 8 | struct C0 c0
-// CHECK: 8 | int a
-// CHECK: | [sizeof=4, align=4
-// CHECK: | nvsize=4, nvalign=4]
-// CHECK: 12 | struct C1 c1
-// CHECK: 12 | int a
-// CHECK: | [sizeof=4, align=4
-// CHECK: | nvsize=4, nvalign=4]
-// CHECK: 16 | struct C2 c2
-// CHECK: 16 | int a
-// CHECK: | [sizeof=4, align=4
-// CHECK: | nvsize=4, nvalign=4]
-// CHECK: 24 | struct B1 b1 (empty)
-// CHECK: | [sizeof=8, align=8
-// CHECK: | nvsize=0, nvalign=1]
-// CHECK: 32 | int a
-// CHECK: | [sizeof=40, align=8
-// CHECK: | nvsize=40, nvalign=8]
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct D
+// CHECK-NEXT: 0 | struct B0 b0 (empty)
+// CHECK-NEXT: | [sizeof=8, align=8
+// CHECK-NEXT: | nvsize=0, nvalign=8]
+// CHECK: 8 | struct C0 c0
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: | [sizeof=4, align=4
+// CHECK-NEXT: | nvsize=4, nvalign=4]
+// CHECK: 12 | struct C1 c1
+// CHECK-NEXT: 12 | int a
+// CHECK-NEXT: | [sizeof=4, align=4
+// CHECK-NEXT: | nvsize=4, nvalign=4]
+// CHECK: 16 | struct C2 c2
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: | [sizeof=4, align=4
+// CHECK-NEXT: | nvsize=4, nvalign=4]
+// CHECK: 24 | struct B1 b1 (empty)
+// CHECK-NEXT: | [sizeof=8, align=8
+// CHECK-NEXT: | nvsize=0, nvalign=8]
+// CHECK: 32 | int a
+// CHECK-NEXT: | [sizeof=40, align=8
+// CHECK-NEXT: | nvsize=40, nvalign=8]
struct E : B0, C0, C1, C2, B1 {
int a;
@@ -101,18 +109,18 @@ struct E : B0, C0, C1, C2, B1 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct E
-// CHECK: 0 | struct B0 (base) (empty)
-// CHECK: 0 | struct C0 (base)
-// CHECK: 0 | int a
-// CHECK: 4 | struct C1 (base)
-// CHECK: 4 | int a
-// CHECK: 8 | struct C2 (base)
-// CHECK: 8 | int a
-// CHECK: 16 | struct B1 (base) (empty)
-// CHECK: 16 | int a
-// CHECK: | [sizeof=24, align=8
-// CHECK: | nvsize=24, nvalign=8]
+// CHECK-NEXT: 0 | struct E
+// CHECK-NEXT: 0 | struct B0 (base) (empty)
+// CHECK-NEXT: 0 | struct C0 (base)
+// CHECK-NEXT: 0 | int a
+// CHECK-NEXT: 4 | struct C1 (base)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | struct C2 (base)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: 16 | struct B1 (base) (empty)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: | [sizeof=24, align=8
+// CHECK-NEXT: | nvsize=24, nvalign=8]
struct F : C0, B0, B1, C1 {
int a;
@@ -120,16 +128,16 @@ struct F : C0, B0, B1, C1 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct F
-// CHECK: 0 | struct C0 (base)
-// CHECK: 0 | int a
-// CHECK: 8 | struct B0 (base) (empty)
-// CHECK: 16 | struct B1 (base) (empty)
-// CHECK: 16 | struct C1 (base)
-// CHECK: 16 | int a
-// CHECK: 20 | int a
-// CHECK: | [sizeof=24, align=8
-// CHECK: | nvsize=24, nvalign=8]
+// CHECK-NEXT: 0 | struct F
+// CHECK-NEXT: 0 | struct C0 (base)
+// CHECK-NEXT: 0 | int a
+// CHECK-NEXT: 8 | struct B0 (base) (empty)
+// CHECK-NEXT: 16 | struct B1 (base) (empty)
+// CHECK-NEXT: 16 | struct C1 (base)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 20 | int a
+// CHECK-NEXT: | [sizeof=24, align=8
+// CHECK-NEXT: | nvsize=24, nvalign=8]
struct G : B0, B1, B2, B3, B4 {
__declspec(align(32)) int a;
@@ -137,15 +145,15 @@ struct G : B0, B1, B2, B3, B4 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct G
-// CHECK: 0 | struct B0 (base) (empty)
-// CHECK: 8 | struct B1 (base) (empty)
-// CHECK: 16 | struct B2 (base) (empty)
-// CHECK: 24 | struct B3 (base) (empty)
-// CHECK: 32 | struct B4 (base) (empty)
-// CHECK: 32 | int a
-// CHECK: | [sizeof=64, align=32
-// CHECK: | nvsize=64, nvalign=32]
+// CHECK-NEXT: 0 | struct G
+// CHECK-NEXT: 0 | struct B0 (base) (empty)
+// CHECK-NEXT: 8 | struct B1 (base) (empty)
+// CHECK-NEXT: 16 | struct B2 (base) (empty)
+// CHECK-NEXT: 24 | struct B3 (base) (empty)
+// CHECK-NEXT: 32 | struct B4 (base) (empty)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: | [sizeof=64, align=32
+// CHECK-NEXT: | nvsize=64, nvalign=32]
struct __declspec(align(32)) H : B0, B1, B2, B3, B4 {
int a;
@@ -153,15 +161,15 @@ struct __declspec(align(32)) H : B0, B1, B2, B3, B4 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct H
-// CHECK: 0 | struct B0 (base) (empty)
-// CHECK: 8 | struct B1 (base) (empty)
-// CHECK: 16 | struct B2 (base) (empty)
-// CHECK: 24 | struct B3 (base) (empty)
-// CHECK: 32 | struct B4 (base) (empty)
-// CHECK: 32 | int a
-// CHECK: | [sizeof=64, align=32
-// CHECK: | nvsize=40, nvalign=8]
+// CHECK-NEXT: 0 | struct H
+// CHECK-NEXT: 0 | struct B0 (base) (empty)
+// CHECK-NEXT: 8 | struct B1 (base) (empty)
+// CHECK-NEXT: 16 | struct B2 (base) (empty)
+// CHECK-NEXT: 24 | struct B3 (base) (empty)
+// CHECK-NEXT: 32 | struct B4 (base) (empty)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: | [sizeof=64, align=32
+// CHECK-NEXT: | nvsize=40, nvalign=32]
int a[
sizeof(A)+
diff --git a/test/Layout/ms-x86-empty-virtual-base.cpp b/test/Layout/ms-x86-empty-virtual-base.cpp
index ef6f08175e7a..23e287acf93b 100644
--- a/test/Layout/ms-x86-empty-virtual-base.cpp
+++ b/test/Layout/ms-x86-empty-virtual-base.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only -cxx-abi microsoft %s 2>/dev/null \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
// RUN: | FileCheck %s
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only -cxx-abi microsoft %s 2>/dev/null \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
// RUN: | FileCheck %s -check-prefix CHECK-X64
extern "C" int printf(const char *fmt, ...);
@@ -27,19 +27,21 @@ struct A : virtual B0 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct A
-// CHECK: 0 | (A vbtable pointer)
-// CHECK: 4 | int a
-// CHECK: 8 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=8, align=8
-// CHECK: | nvsize=8, nvalign=4]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct A
+// CHECK-NEXT: 0 | (A vbtable pointer)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=8, align=8
+// CHECK-NEXT: | nvsize=8, nvalign=8]
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct A
-// CHECK-X64: 0 | (A vbtable pointer)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=16, align=8
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct A
+// CHECK-X64-NEXT: 0 | (A vbtable pointer)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=16, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
struct B : virtual B0 {
B0 b0;
@@ -48,25 +50,25 @@ struct B : virtual B0 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct B
-// CHECK: 0 | (B vbtable pointer)
-// CHECK: 8 | struct B0 b0 (empty)
-// CHECK: | [sizeof=8, align=8
-// CHECK: | nvsize=0, nvalign=1]
-// CHECK: 16 | int a
-// CHECK: 24 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=24, align=8
-// CHECK: | nvsize=24, nvalign=8]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct B
-// CHECK-X64: 0 | (B vbtable pointer)
-// CHECK-X64: 8 | struct B0 b0 (empty)
-// CHECK-X64: | [sizeof=8, align=8
-// CHECK-X64: | nvsize=0, nvalign=1]
-// CHECK-X64: 16 | int a
-// CHECK-X64: 24 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK-NEXT: 0 | struct B
+// CHECK-NEXT: 0 | (B vbtable pointer)
+// CHECK-NEXT: 8 | struct B0 b0 (empty)
+// CHECK-NEXT: | [sizeof=8, align=8
+// CHECK-NEXT: | nvsize=0, nvalign=8]
+// CHECK: 16 | int a
+// CHECK-NEXT: 24 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=24, align=8
+// CHECK-NEXT: | nvsize=24, nvalign=8]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct B
+// CHECK-X64-NEXT: 0 | (B vbtable pointer)
+// CHECK-X64-NEXT: 8 | struct B0 b0 (empty)
+// CHECK-X64-NEXT: | [sizeof=8, align=8
+// CHECK-X64-NEXT: | nvsize=0, nvalign=8]
+// CHECK-X64: 16 | int a
+// CHECK-X64-NEXT: 24 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct C : virtual B0, virtual B1, virtual B2, virtual B3, virtual B4 {
int a;
@@ -74,27 +76,35 @@ struct C : virtual B0, virtual B1, virtual B2, virtual B3, virtual B4 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct C
-// CHECK: 0 | (C vbtable pointer)
-// CHECK: 4 | int a
-// CHECK: 8 | struct B0 (virtual base) (empty)
-// CHECK: 16 | struct B1 (virtual base) (empty)
-// CHECK: 24 | struct B2 (virtual base) (empty)
-// CHECK: 32 | struct B3 (virtual base) (empty)
-// CHECK: 40 | struct B4 (virtual base) (empty)
-// CHECK: | [sizeof=40, align=8
-// CHECK: | nvsize=8, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct C
-// CHECK-X64: 0 | (C vbtable pointer)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | struct B0 (virtual base) (empty)
-// CHECK-X64: 24 | struct B1 (virtual base) (empty)
-// CHECK-X64: 32 | struct B2 (virtual base) (empty)
-// CHECK-X64: 40 | struct B3 (virtual base) (empty)
-// CHECK-X64: 48 | struct B4 (virtual base) (empty)
-// CHECK-X64: | [sizeof=48, align=8
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct C
+// CHECK-NEXT: 0 | (C vbtable pointer)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: 16 | struct B1 (virtual base) (empty)
+// CHECK-NEXT: 24 | struct B2 (virtual base) (empty)
+// CHECK-NEXT: 32 | struct B3 (virtual base) (empty)
+// CHECK-NEXT: 40 | struct B4 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=40, align=8
+// CHECK-NEXT: | nvsize=8, nvalign=8]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct C
+// CHECK-X64-NEXT: 0 | (C vbtable pointer)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: 24 | struct B1 (virtual base) (empty)
+// CHECK-X64-NEXT: 32 | struct B2 (virtual base) (empty)
+// CHECK-X64-NEXT: 40 | struct B3 (virtual base) (empty)
+// CHECK-X64-NEXT: 48 | struct B4 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=48, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
struct D {
B0 b0;
@@ -107,31 +117,37 @@ struct D {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct D
-// CHECK: 0 | struct B0 b0 (empty)
-// CHECK: 8 | struct C0 c0
-// CHECK: 8 | int a
-// CHECK: 12 | struct C1 c1
-// CHECK: 12 | int a
-// CHECK: 16 | struct C2 c2
-// CHECK: 16 | int a
-// CHECK: 24 | struct B1 b1 (empty)
-// CHECK: 32 | int a
-// CHECK: | [sizeof=40, align=8
-// CHECK: | nvsize=40, nvalign=8]
-// CHECK-64: *** Dumping AST Record Layout
-// CHECK-64: 0 | struct D
-// CHECK-64: 0 | struct B0 b0 (empty)
-// CHECK-64: 8 | struct C0 c0
-// CHECK-64: 8 | int a
-// CHECK-64: 12 | struct C1 c1
-// CHECK-64: 12 | int a
-// CHECK-64: 16 | struct C2 c2
-// CHECK-64: 16 | int a
-// CHECK-64: 24 | struct B1 b1 (empty)
-// CHECK-64: 32 | int a
-// CHECK-64: | [sizeof=40, align=8
-// CHECK-64: | nvsize=40, nvalign=8]
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct D
+// CHECK-NEXT: 0 | struct B0 b0 (empty)
+// CHECK: 8 | struct C0 c0
+// CHECK-NEXT: 8 | int a
+// CHECK: 12 | struct C1 c1
+// CHECK-NEXT: 12 | int a
+// CHECK: 16 | struct C2 c2
+// CHECK-NEXT: 16 | int a
+// CHECK: 24 | struct B1 b1 (empty)
+// CHECK: 32 | int a
+// CHECK-NEXT: | [sizeof=40, align=8
+// CHECK-NEXT: | nvsize=40, nvalign=8]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct D
+// CHECK-X64-NEXT: 0 | struct B0 b0 (empty)
+// CHECK-X64: 8 | struct C0 c0
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64: 12 | struct C1 c1
+// CHECK-X64-NEXT: 12 | int a
+// CHECK-X64: 16 | struct C2 c2
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64: 24 | struct B1 b1 (empty)
+// CHECK-X64: 32 | int a
+// CHECK-X64-NEXT: | [sizeof=40, align=8
+// CHECK-X64-NEXT: | nvsize=40, nvalign=8]
struct E : virtual B0, virtual C0, virtual C1, virtual C2, virtual B1 {
int a;
@@ -139,33 +155,33 @@ struct E : virtual B0, virtual C0, virtual C1, virtual C2, virtual B1 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct E
-// CHECK: 0 | (E vbtable pointer)
-// CHECK: 4 | int a
-// CHECK: 8 | struct B0 (virtual base) (empty)
-// CHECK: 8 | struct C0 (virtual base)
-// CHECK: 8 | int a
-// CHECK: 12 | struct C1 (virtual base)
-// CHECK: 12 | int a
-// CHECK: 16 | struct C2 (virtual base)
-// CHECK: 16 | int a
-// CHECK: 24 | struct B1 (virtual base) (empty)
-// CHECK: | [sizeof=24, align=8
-// CHECK: | nvsize=8, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct E
-// CHECK-X64: 0 | (E vbtable pointer)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | struct B0 (virtual base) (empty)
-// CHECK-X64: 16 | struct C0 (virtual base)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 20 | struct C1 (virtual base)
-// CHECK-X64: 20 | int a
-// CHECK-X64: 24 | struct C2 (virtual base)
-// CHECK-X64: 24 | int a
-// CHECK-X64: 32 | struct B1 (virtual base) (empty)
-// CHECK-X64: | [sizeof=32, align=8
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-NEXT: 0 | struct E
+// CHECK-NEXT: 0 | (E vbtable pointer)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: 8 | struct C0 (virtual base)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: 12 | struct C1 (virtual base)
+// CHECK-NEXT: 12 | int a
+// CHECK-NEXT: 16 | struct C2 (virtual base)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 24 | struct B1 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=24, align=8
+// CHECK-NEXT: | nvsize=8, nvalign=8]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct E
+// CHECK-X64-NEXT: 0 | (E vbtable pointer)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: 16 | struct C0 (virtual base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 20 | struct C1 (virtual base)
+// CHECK-X64-NEXT: 20 | int a
+// CHECK-X64-NEXT: 24 | struct C2 (virtual base)
+// CHECK-X64-NEXT: 24 | int a
+// CHECK-X64-NEXT: 32 | struct B1 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=32, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
struct F : virtual C0, virtual B0, virtual B1, virtual C1 {
int a;
@@ -173,29 +189,29 @@ struct F : virtual C0, virtual B0, virtual B1, virtual C1 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct F
-// CHECK: 0 | (F vbtable pointer)
-// CHECK: 4 | int a
-// CHECK: 8 | struct C0 (virtual base)
-// CHECK: 8 | int a
-// CHECK: 16 | struct B0 (virtual base) (empty)
-// CHECK: 24 | struct B1 (virtual base) (empty)
-// CHECK: 24 | struct C1 (virtual base)
-// CHECK: 24 | int a
-// CHECK: | [sizeof=32, align=8
-// CHECK: | nvsize=8, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct F
-// CHECK-X64: 0 | (F vbtable pointer)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | struct C0 (virtual base)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 24 | struct B0 (virtual base) (empty)
-// CHECK-X64: 32 | struct B1 (virtual base) (empty)
-// CHECK-X64: 32 | struct C1 (virtual base)
-// CHECK-X64: 32 | int a
-// CHECK-X64: | [sizeof=40, align=8
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-NEXT: 0 | struct F
+// CHECK-NEXT: 0 | (F vbtable pointer)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | struct C0 (virtual base)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: 16 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: 24 | struct B1 (virtual base) (empty)
+// CHECK-NEXT: 24 | struct C1 (virtual base)
+// CHECK-NEXT: 24 | int a
+// CHECK-NEXT: | [sizeof=32, align=8
+// CHECK-NEXT: | nvsize=8, nvalign=8]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct F
+// CHECK-X64-NEXT: 0 | (F vbtable pointer)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | struct C0 (virtual base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 24 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: 32 | struct B1 (virtual base) (empty)
+// CHECK-X64-NEXT: 32 | struct C1 (virtual base)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: | [sizeof=40, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
struct G : virtual C0, virtual B0, virtual B1, D0, virtual C1 {
int a;
@@ -204,33 +220,35 @@ struct G : virtual C0, virtual B0, virtual B1, D0, virtual C1 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct G
-// CHECK: 0 | struct D0 (primary base)
-// CHECK: 0 | (D0 vftable pointer)
-// CHECK: 4 | (G vbtable pointer)
-// CHECK: 20 | int a
-// CHECK: 32 | struct C0 (virtual base)
-// CHECK: 32 | int a
-// CHECK: 40 | struct B0 (virtual base) (empty)
-// CHECK: 56 | struct B1 (virtual base) (empty)
-// CHECK: 56 | struct C1 (virtual base)
-// CHECK: 56 | int a
-// CHECK: | [sizeof=64, align=16
-// CHECK: | nvsize=32, nvalign=16]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct G
-// CHECK-X64: 0 | struct D0 (primary base)
-// CHECK-X64: 0 | (D0 vftable pointer)
-// CHECK-X64: 8 | (G vbtable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 32 | struct C0 (virtual base)
-// CHECK-X64: 32 | int a
-// CHECK-X64: 40 | struct B0 (virtual base) (empty)
-// CHECK-X64: 56 | struct B1 (virtual base) (empty)
-// CHECK-X64: 56 | struct C1 (virtual base)
-// CHECK-X64: 56 | int a
-// CHECK-X64: | [sizeof=64, align=16
-// CHECK-X64: | nvsize=32, nvalign=16]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct G
+// CHECK-NEXT: 0 | struct D0 (primary base)
+// CHECK-NEXT: 0 | (D0 vftable pointer)
+// CHECK-NEXT: 4 | (G vbtable pointer)
+// CHECK-NEXT: 20 | int a
+// CHECK-NEXT: 32 | struct C0 (virtual base)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: 40 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: 56 | struct B1 (virtual base) (empty)
+// CHECK-NEXT: 56 | struct C1 (virtual base)
+// CHECK-NEXT: 56 | int a
+// CHECK-NEXT: | [sizeof=64, align=16
+// CHECK-NEXT: | nvsize=32, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct G
+// CHECK-X64-NEXT: 0 | struct D0 (primary base)
+// CHECK-X64-NEXT: 0 | (D0 vftable pointer)
+// CHECK-X64-NEXT: 8 | (G vbtable pointer)
+// CHECK-X64-NEXT: 24 | int a
+// CHECK-X64-NEXT: 32 | struct C0 (virtual base)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 40 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: 56 | struct B1 (virtual base) (empty)
+// CHECK-X64-NEXT: 56 | struct C1 (virtual base)
+// CHECK-X64-NEXT: 56 | int a
+// CHECK-X64-NEXT: | [sizeof=64, align=16
+// CHECK-X64-NEXT: | nvsize=32, nvalign=16]
struct H : virtual C0, virtual B0, virtual B1, virtual D0, virtual C1 {
int a;
@@ -239,35 +257,35 @@ struct H : virtual C0, virtual B0, virtual B1, virtual D0, virtual C1 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct H
-// CHECK: 0 | (H vbtable pointer)
-// CHECK: 4 | int a
-// CHECK: 8 | struct C0 (virtual base)
-// CHECK: 8 | int a
-// CHECK: 16 | struct B0 (virtual base) (empty)
-// CHECK: 24 | struct B1 (virtual base) (empty)
-// CHECK: 44 | (vtordisp for vbase D0)
-// CHECK: 48 | struct D0 (virtual base)
-// CHECK: 48 | (D0 vftable pointer)
-// CHECK: 52 | struct C1 (virtual base)
-// CHECK: 52 | int a
-// CHECK: | [sizeof=64, align=16
-// CHECK: | nvsize=8, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct H
-// CHECK-X64: 0 | (H vbtable pointer)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | struct C0 (virtual base)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 24 | struct B0 (virtual base) (empty)
-// CHECK-X64: 40 | struct B1 (virtual base) (empty)
-// CHECK-X64: 60 | (vtordisp for vbase D0)
-// CHECK-X64: 64 | struct D0 (virtual base)
-// CHECK-X64: 64 | (D0 vftable pointer)
-// CHECK-X64: 72 | struct C1 (virtual base)
-// CHECK-X64: 72 | int a
-// CHECK-X64: | [sizeof=80, align=16
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-NEXT: 0 | struct H
+// CHECK-NEXT: 0 | (H vbtable pointer)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | struct C0 (virtual base)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: 16 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: 24 | struct B1 (virtual base) (empty)
+// CHECK-NEXT: 44 | (vtordisp for vbase D0)
+// CHECK-NEXT: 48 | struct D0 (virtual base)
+// CHECK-NEXT: 48 | (D0 vftable pointer)
+// CHECK-NEXT: 52 | struct C1 (virtual base)
+// CHECK-NEXT: 52 | int a
+// CHECK-NEXT: | [sizeof=64, align=16
+// CHECK-NEXT: | nvsize=8, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct H
+// CHECK-X64-NEXT: 0 | (H vbtable pointer)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | struct C0 (virtual base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 24 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: 40 | struct B1 (virtual base) (empty)
+// CHECK-X64-NEXT: 60 | (vtordisp for vbase D0)
+// CHECK-X64-NEXT: 64 | struct D0 (virtual base)
+// CHECK-X64-NEXT: 64 | (D0 vftable pointer)
+// CHECK-X64-NEXT: 72 | struct C1 (virtual base)
+// CHECK-X64-NEXT: 72 | int a
+// CHECK-X64-NEXT: | [sizeof=80, align=16
+// CHECK-X64-NEXT: | nvsize=16, nvalign=16]
struct I : virtual B0, virtual B1, virtual B2, virtual B3, virtual B4 {
__declspec(align(32)) int a;
@@ -275,27 +293,27 @@ struct I : virtual B0, virtual B1, virtual B2, virtual B3, virtual B4 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct I
-// CHECK: 0 | (I vbtable pointer)
-// CHECK: 32 | int a
-// CHECK: 64 | struct B0 (virtual base) (empty)
-// CHECK: 72 | struct B1 (virtual base) (empty)
-// CHECK: 104 | struct B2 (virtual base) (empty)
-// CHECK: 136 | struct B3 (virtual base) (empty)
-// CHECK: 168 | struct B4 (virtual base) (empty)
-// CHECK: | [sizeof=192, align=32
-// CHECK: | nvsize=64, nvalign=32]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct I
-// CHECK-X64: 0 | (I vbtable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: 64 | struct B0 (virtual base) (empty)
-// CHECK-X64: 72 | struct B1 (virtual base) (empty)
-// CHECK-X64: 104 | struct B2 (virtual base) (empty)
-// CHECK-X64: 136 | struct B3 (virtual base) (empty)
-// CHECK-X64: 168 | struct B4 (virtual base) (empty)
-// CHECK-X64: | [sizeof=192, align=32
-// CHECK-X64: | nvsize=64, nvalign=32]
+// CHECK-NEXT: 0 | struct I
+// CHECK-NEXT: 0 | (I vbtable pointer)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: 64 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: 72 | struct B1 (virtual base) (empty)
+// CHECK-NEXT: 104 | struct B2 (virtual base) (empty)
+// CHECK-NEXT: 136 | struct B3 (virtual base) (empty)
+// CHECK-NEXT: 168 | struct B4 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=192, align=32
+// CHECK-NEXT: | nvsize=64, nvalign=32]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct I
+// CHECK-X64-NEXT: 0 | (I vbtable pointer)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 64 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: 72 | struct B1 (virtual base) (empty)
+// CHECK-X64-NEXT: 104 | struct B2 (virtual base) (empty)
+// CHECK-X64-NEXT: 136 | struct B3 (virtual base) (empty)
+// CHECK-X64-NEXT: 168 | struct B4 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=192, align=32
+// CHECK-X64-NEXT: | nvsize=64, nvalign=32]
struct __declspec(align(32)) J : virtual B0, virtual B1, virtual B2, virtual B3, virtual B4 {
int a;
@@ -303,27 +321,27 @@ struct __declspec(align(32)) J : virtual B0, virtual B1, virtual B2, virtual B3,
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct J
-// CHECK: 0 | (J vbtable pointer)
-// CHECK: 4 | int a
-// CHECK: 8 | struct B0 (virtual base) (empty)
-// CHECK: 40 | struct B1 (virtual base) (empty)
-// CHECK: 72 | struct B2 (virtual base) (empty)
-// CHECK: 104 | struct B3 (virtual base) (empty)
-// CHECK: 136 | struct B4 (virtual base) (empty)
-// CHECK: | [sizeof=160, align=32
-// CHECK: | nvsize=8, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct J
-// CHECK-X64: 0 | (J vbtable pointer)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | struct B0 (virtual base) (empty)
-// CHECK-X64: 40 | struct B1 (virtual base) (empty)
-// CHECK-X64: 72 | struct B2 (virtual base) (empty)
-// CHECK-X64: 104 | struct B3 (virtual base) (empty)
-// CHECK-X64: 136 | struct B4 (virtual base) (empty)
-// CHECK-X64: | [sizeof=160, align=32
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-NEXT: 0 | struct J
+// CHECK-NEXT: 0 | (J vbtable pointer)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: 40 | struct B1 (virtual base) (empty)
+// CHECK-NEXT: 72 | struct B2 (virtual base) (empty)
+// CHECK-NEXT: 104 | struct B3 (virtual base) (empty)
+// CHECK-NEXT: 136 | struct B4 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=160, align=32
+// CHECK-NEXT: | nvsize=8, nvalign=32]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct J
+// CHECK-X64-NEXT: 0 | (J vbtable pointer)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: 40 | struct B1 (virtual base) (empty)
+// CHECK-X64-NEXT: 72 | struct B2 (virtual base) (empty)
+// CHECK-X64-NEXT: 104 | struct B3 (virtual base) (empty)
+// CHECK-X64-NEXT: 136 | struct B4 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=160, align=32
+// CHECK-X64-NEXT: | nvsize=16, nvalign=32]
struct K : virtual D1, virtual B1, virtual B2, virtual B3, virtual B4 {
__declspec(align(32)) int a;
@@ -331,27 +349,29 @@ struct K : virtual D1, virtual B1, virtual B2, virtual B3, virtual B4 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct K
-// CHECK: 0 | (K vbtable pointer)
-// CHECK: 32 | int a
-// CHECK: 64 | struct D1 (virtual base) (empty)
-// CHECK: 72 | struct B1 (virtual base) (empty)
-// CHECK: 104 | struct B2 (virtual base) (empty)
-// CHECK: 136 | struct B3 (virtual base) (empty)
-// CHECK: 168 | struct B4 (virtual base) (empty)
-// CHECK: | [sizeof=192, align=32
-// CHECK: | nvsize=64, nvalign=32]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct K
-// CHECK-X64: 0 | (K vbtable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: 64 | struct D1 (virtual base) (empty)
-// CHECK-X64: 72 | struct B1 (virtual base) (empty)
-// CHECK-X64: 104 | struct B2 (virtual base) (empty)
-// CHECK-X64: 136 | struct B3 (virtual base) (empty)
-// CHECK-X64: 168 | struct B4 (virtual base) (empty)
-// CHECK-X64: | [sizeof=192, align=32
-// CHECK-X64: | nvsize=64, nvalign=32]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct K
+// CHECK-NEXT: 0 | (K vbtable pointer)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: 64 | struct D1 (virtual base) (empty)
+// CHECK-NEXT: 72 | struct B1 (virtual base) (empty)
+// CHECK-NEXT: 104 | struct B2 (virtual base) (empty)
+// CHECK-NEXT: 136 | struct B3 (virtual base) (empty)
+// CHECK-NEXT: 168 | struct B4 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=192, align=32
+// CHECK-NEXT: | nvsize=64, nvalign=32]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct K
+// CHECK-X64-NEXT: 0 | (K vbtable pointer)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 64 | struct D1 (virtual base) (empty)
+// CHECK-X64-NEXT: 72 | struct B1 (virtual base) (empty)
+// CHECK-X64-NEXT: 104 | struct B2 (virtual base) (empty)
+// CHECK-X64-NEXT: 136 | struct B3 (virtual base) (empty)
+// CHECK-X64-NEXT: 168 | struct B4 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=192, align=32
+// CHECK-X64-NEXT: | nvsize=64, nvalign=32]
struct L : virtual B1, virtual D1, virtual B2, virtual B3, virtual B4 {
__declspec(align(32)) int a;
@@ -359,27 +379,27 @@ struct L : virtual B1, virtual D1, virtual B2, virtual B3, virtual B4 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct L
-// CHECK: 0 | (L vbtable pointer)
-// CHECK: 32 | int a
-// CHECK: 64 | struct B1 (virtual base) (empty)
-// CHECK: 68 | struct D1 (virtual base) (empty)
-// CHECK: 104 | struct B2 (virtual base) (empty)
-// CHECK: 136 | struct B3 (virtual base) (empty)
-// CHECK: 168 | struct B4 (virtual base) (empty)
-// CHECK: | [sizeof=192, align=32
-// CHECK: | nvsize=64, nvalign=32]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct L
-// CHECK-X64: 0 | (L vbtable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: 64 | struct B1 (virtual base) (empty)
-// CHECK-X64: 68 | struct D1 (virtual base) (empty)
-// CHECK-X64: 104 | struct B2 (virtual base) (empty)
-// CHECK-X64: 136 | struct B3 (virtual base) (empty)
-// CHECK-X64: 168 | struct B4 (virtual base) (empty)
-// CHECK-X64: | [sizeof=192, align=32
-// CHECK-X64: | nvsize=64, nvalign=32]
+// CHECK-NEXT: 0 | struct L
+// CHECK-NEXT: 0 | (L vbtable pointer)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: 64 | struct B1 (virtual base) (empty)
+// CHECK-NEXT: 68 | struct D1 (virtual base) (empty)
+// CHECK-NEXT: 104 | struct B2 (virtual base) (empty)
+// CHECK-NEXT: 136 | struct B3 (virtual base) (empty)
+// CHECK-NEXT: 168 | struct B4 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=192, align=32
+// CHECK-NEXT: | nvsize=64, nvalign=32]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct L
+// CHECK-X64-NEXT: 0 | (L vbtable pointer)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 64 | struct B1 (virtual base) (empty)
+// CHECK-X64-NEXT: 68 | struct D1 (virtual base) (empty)
+// CHECK-X64-NEXT: 104 | struct B2 (virtual base) (empty)
+// CHECK-X64-NEXT: 136 | struct B3 (virtual base) (empty)
+// CHECK-X64-NEXT: 168 | struct B4 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=192, align=32
+// CHECK-X64-NEXT: | nvsize=64, nvalign=32]
struct M : virtual B1, virtual B2, virtual D1, virtual B3, virtual B4 {
__declspec(align(32)) int a;
@@ -387,27 +407,27 @@ struct M : virtual B1, virtual B2, virtual D1, virtual B3, virtual B4 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct M
-// CHECK: 0 | (M vbtable pointer)
-// CHECK: 32 | int a
-// CHECK: 64 | struct B1 (virtual base) (empty)
-// CHECK: 72 | struct B2 (virtual base) (empty)
-// CHECK: 100 | struct D1 (virtual base) (empty)
-// CHECK: 136 | struct B3 (virtual base) (empty)
-// CHECK: 168 | struct B4 (virtual base) (empty)
-// CHECK: | [sizeof=192, align=32
-// CHECK: | nvsize=64, nvalign=32]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct M
-// CHECK-X64: 0 | (M vbtable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: 64 | struct B1 (virtual base) (empty)
-// CHECK-X64: 72 | struct B2 (virtual base) (empty)
-// CHECK-X64: 100 | struct D1 (virtual base) (empty)
-// CHECK-X64: 136 | struct B3 (virtual base) (empty)
-// CHECK-X64: 168 | struct B4 (virtual base) (empty)
-// CHECK-X64: | [sizeof=192, align=32
-// CHECK-X64: | nvsize=64, nvalign=32]
+// CHECK-NEXT: 0 | struct M
+// CHECK-NEXT: 0 | (M vbtable pointer)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: 64 | struct B1 (virtual base) (empty)
+// CHECK-NEXT: 72 | struct B2 (virtual base) (empty)
+// CHECK-NEXT: 100 | struct D1 (virtual base) (empty)
+// CHECK-NEXT: 136 | struct B3 (virtual base) (empty)
+// CHECK-NEXT: 168 | struct B4 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=192, align=32
+// CHECK-NEXT: | nvsize=64, nvalign=32]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct M
+// CHECK-X64-NEXT: 0 | (M vbtable pointer)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 64 | struct B1 (virtual base) (empty)
+// CHECK-X64-NEXT: 72 | struct B2 (virtual base) (empty)
+// CHECK-X64-NEXT: 100 | struct D1 (virtual base) (empty)
+// CHECK-X64-NEXT: 136 | struct B3 (virtual base) (empty)
+// CHECK-X64-NEXT: 168 | struct B4 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=192, align=32
+// CHECK-X64-NEXT: | nvsize=64, nvalign=32]
struct N : virtual C0, virtual B1, virtual D1, virtual B2, virtual B3, virtual B4 {
__declspec(align(32)) int a;
@@ -415,31 +435,31 @@ struct N : virtual C0, virtual B1, virtual D1, virtual B2, virtual B3, virtual B
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct N
-// CHECK: 0 | (N vbtable pointer)
-// CHECK: 32 | int a
-// CHECK: 64 | struct C0 (virtual base)
-// CHECK: 64 | int a
-// CHECK: 72 | struct B1 (virtual base) (empty)
-// CHECK: 100 | struct D1 (virtual base) (empty)
-// CHECK: 136 | struct B2 (virtual base) (empty)
-// CHECK: 168 | struct B3 (virtual base) (empty)
-// CHECK: 200 | struct B4 (virtual base) (empty)
-// CHECK: | [sizeof=224, align=32
-// CHECK: | nvsize=64, nvalign=32]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct N
-// CHECK-X64: 0 | (N vbtable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: 64 | struct C0 (virtual base)
-// CHECK-X64: 64 | int a
-// CHECK-X64: 72 | struct B1 (virtual base) (empty)
-// CHECK-X64: 100 | struct D1 (virtual base) (empty)
-// CHECK-X64: 136 | struct B2 (virtual base) (empty)
-// CHECK-X64: 168 | struct B3 (virtual base) (empty)
-// CHECK-X64: 200 | struct B4 (virtual base) (empty)
-// CHECK-X64: | [sizeof=224, align=32
-// CHECK-X64: | nvsize=64, nvalign=32]
+// CHECK-NEXT: 0 | struct N
+// CHECK-NEXT: 0 | (N vbtable pointer)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: 64 | struct C0 (virtual base)
+// CHECK-NEXT: 64 | int a
+// CHECK-NEXT: 72 | struct B1 (virtual base) (empty)
+// CHECK-NEXT: 100 | struct D1 (virtual base) (empty)
+// CHECK-NEXT: 136 | struct B2 (virtual base) (empty)
+// CHECK-NEXT: 168 | struct B3 (virtual base) (empty)
+// CHECK-NEXT: 200 | struct B4 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=224, align=32
+// CHECK-NEXT: | nvsize=64, nvalign=32]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct N
+// CHECK-X64-NEXT: 0 | (N vbtable pointer)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 64 | struct C0 (virtual base)
+// CHECK-X64-NEXT: 64 | int a
+// CHECK-X64-NEXT: 72 | struct B1 (virtual base) (empty)
+// CHECK-X64-NEXT: 100 | struct D1 (virtual base) (empty)
+// CHECK-X64-NEXT: 136 | struct B2 (virtual base) (empty)
+// CHECK-X64-NEXT: 168 | struct B3 (virtual base) (empty)
+// CHECK-X64-NEXT: 200 | struct B4 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=224, align=32
+// CHECK-X64-NEXT: | nvsize=64, nvalign=32]
struct O : virtual C0, virtual B1, virtual B2, virtual D1, virtual B3, virtual B4 {
__declspec(align(32)) int a;
@@ -447,31 +467,31 @@ struct O : virtual C0, virtual B1, virtual B2, virtual D1, virtual B3, virtual B
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct O
-// CHECK: 0 | (O vbtable pointer)
-// CHECK: 32 | int a
-// CHECK: 64 | struct C0 (virtual base)
-// CHECK: 64 | int a
-// CHECK: 72 | struct B1 (virtual base) (empty)
-// CHECK: 104 | struct B2 (virtual base) (empty)
-// CHECK: 132 | struct D1 (virtual base) (empty)
-// CHECK: 168 | struct B3 (virtual base) (empty)
-// CHECK: 200 | struct B4 (virtual base) (empty)
-// CHECK: | [sizeof=224, align=32
-// CHECK: | nvsize=64, nvalign=32]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct O
-// CHECK-X64: 0 | (O vbtable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: 64 | struct C0 (virtual base)
-// CHECK-X64: 64 | int a
-// CHECK-X64: 72 | struct B1 (virtual base) (empty)
-// CHECK-X64: 104 | struct B2 (virtual base) (empty)
-// CHECK-X64: 132 | struct D1 (virtual base) (empty)
-// CHECK-X64: 168 | struct B3 (virtual base) (empty)
-// CHECK-X64: 200 | struct B4 (virtual base) (empty)
-// CHECK-X64: | [sizeof=224, align=32
-// CHECK-X64: | nvsize=64, nvalign=32]
+// CHECK-NEXT: 0 | struct O
+// CHECK-NEXT: 0 | (O vbtable pointer)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: 64 | struct C0 (virtual base)
+// CHECK-NEXT: 64 | int a
+// CHECK-NEXT: 72 | struct B1 (virtual base) (empty)
+// CHECK-NEXT: 104 | struct B2 (virtual base) (empty)
+// CHECK-NEXT: 132 | struct D1 (virtual base) (empty)
+// CHECK-NEXT: 168 | struct B3 (virtual base) (empty)
+// CHECK-NEXT: 200 | struct B4 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=224, align=32
+// CHECK-NEXT: | nvsize=64, nvalign=32]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct O
+// CHECK-X64-NEXT: 0 | (O vbtable pointer)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 64 | struct C0 (virtual base)
+// CHECK-X64-NEXT: 64 | int a
+// CHECK-X64-NEXT: 72 | struct B1 (virtual base) (empty)
+// CHECK-X64-NEXT: 104 | struct B2 (virtual base) (empty)
+// CHECK-X64-NEXT: 132 | struct D1 (virtual base) (empty)
+// CHECK-X64-NEXT: 168 | struct B3 (virtual base) (empty)
+// CHECK-X64-NEXT: 200 | struct B4 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=224, align=32
+// CHECK-X64-NEXT: | nvsize=64, nvalign=32]
struct P : virtual B1, virtual C0, virtual D1, virtual B2, virtual B3, virtual B4 {
__declspec(align(32)) int a;
@@ -479,31 +499,31 @@ struct P : virtual B1, virtual C0, virtual D1, virtual B2, virtual B3, virtual B
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct P
-// CHECK: 0 | (P vbtable pointer)
-// CHECK: 32 | int a
-// CHECK: 64 | struct B1 (virtual base) (empty)
-// CHECK: 64 | struct C0 (virtual base)
-// CHECK: 64 | int a
-// CHECK: 68 | struct D1 (virtual base) (empty)
-// CHECK: 104 | struct B2 (virtual base) (empty)
-// CHECK: 136 | struct B3 (virtual base) (empty)
-// CHECK: 168 | struct B4 (virtual base) (empty)
-// CHECK: | [sizeof=192, align=32
-// CHECK: | nvsize=64, nvalign=32]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct P
-// CHECK-X64: 0 | (P vbtable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: 64 | struct B1 (virtual base) (empty)
-// CHECK-X64: 64 | struct C0 (virtual base)
-// CHECK-X64: 64 | int a
-// CHECK-X64: 68 | struct D1 (virtual base) (empty)
-// CHECK-X64: 104 | struct B2 (virtual base) (empty)
-// CHECK-X64: 136 | struct B3 (virtual base) (empty)
-// CHECK-X64: 168 | struct B4 (virtual base) (empty)
-// CHECK-X64: | [sizeof=192, align=32
-// CHECK-X64: | nvsize=64, nvalign=32]
+// CHECK-NEXT: 0 | struct P
+// CHECK-NEXT: 0 | (P vbtable pointer)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: 64 | struct B1 (virtual base) (empty)
+// CHECK-NEXT: 64 | struct C0 (virtual base)
+// CHECK-NEXT: 64 | int a
+// CHECK-NEXT: 68 | struct D1 (virtual base) (empty)
+// CHECK-NEXT: 104 | struct B2 (virtual base) (empty)
+// CHECK-NEXT: 136 | struct B3 (virtual base) (empty)
+// CHECK-NEXT: 168 | struct B4 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=192, align=32
+// CHECK-NEXT: | nvsize=64, nvalign=32]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct P
+// CHECK-X64-NEXT: 0 | (P vbtable pointer)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 64 | struct B1 (virtual base) (empty)
+// CHECK-X64-NEXT: 64 | struct C0 (virtual base)
+// CHECK-X64-NEXT: 64 | int a
+// CHECK-X64-NEXT: 68 | struct D1 (virtual base) (empty)
+// CHECK-X64-NEXT: 104 | struct B2 (virtual base) (empty)
+// CHECK-X64-NEXT: 136 | struct B3 (virtual base) (empty)
+// CHECK-X64-NEXT: 168 | struct B4 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=192, align=32
+// CHECK-X64-NEXT: | nvsize=64, nvalign=32]
struct Q : virtual B1, virtual C0, virtual B2, virtual D1, virtual B3, virtual B4 {
__declspec(align(32)) int a;
@@ -511,31 +531,31 @@ struct Q : virtual B1, virtual C0, virtual B2, virtual D1, virtual B3, virtual B
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct Q
-// CHECK: 0 | (Q vbtable pointer)
-// CHECK: 32 | int a
-// CHECK: 64 | struct B1 (virtual base) (empty)
-// CHECK: 64 | struct C0 (virtual base)
-// CHECK: 64 | int a
-// CHECK: 72 | struct B2 (virtual base) (empty)
-// CHECK: 100 | struct D1 (virtual base) (empty)
-// CHECK: 136 | struct B3 (virtual base) (empty)
-// CHECK: 168 | struct B4 (virtual base) (empty)
-// CHECK: | [sizeof=192, align=32
-// CHECK: | nvsize=64, nvalign=32]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct Q
-// CHECK-X64: 0 | (Q vbtable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: 64 | struct B1 (virtual base) (empty)
-// CHECK-X64: 64 | struct C0 (virtual base)
-// CHECK-X64: 64 | int a
-// CHECK-X64: 72 | struct B2 (virtual base) (empty)
-// CHECK-X64: 100 | struct D1 (virtual base) (empty)
-// CHECK-X64: 136 | struct B3 (virtual base) (empty)
-// CHECK-X64: 168 | struct B4 (virtual base) (empty)
-// CHECK-X64: | [sizeof=192, align=32
-// CHECK-X64: | nvsize=64, nvalign=32]
+// CHECK-NEXT: 0 | struct Q
+// CHECK-NEXT: 0 | (Q vbtable pointer)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: 64 | struct B1 (virtual base) (empty)
+// CHECK-NEXT: 64 | struct C0 (virtual base)
+// CHECK-NEXT: 64 | int a
+// CHECK-NEXT: 72 | struct B2 (virtual base) (empty)
+// CHECK-NEXT: 100 | struct D1 (virtual base) (empty)
+// CHECK-NEXT: 136 | struct B3 (virtual base) (empty)
+// CHECK-NEXT: 168 | struct B4 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=192, align=32
+// CHECK-NEXT: | nvsize=64, nvalign=32]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct Q
+// CHECK-X64-NEXT: 0 | (Q vbtable pointer)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 64 | struct B1 (virtual base) (empty)
+// CHECK-X64-NEXT: 64 | struct C0 (virtual base)
+// CHECK-X64-NEXT: 64 | int a
+// CHECK-X64-NEXT: 72 | struct B2 (virtual base) (empty)
+// CHECK-X64-NEXT: 100 | struct D1 (virtual base) (empty)
+// CHECK-X64-NEXT: 136 | struct B3 (virtual base) (empty)
+// CHECK-X64-NEXT: 168 | struct B4 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=192, align=32
+// CHECK-X64-NEXT: | nvsize=64, nvalign=32]
struct R : virtual B0, virtual B1, virtual B2, virtual C0, virtual B3, virtual B4 {
__declspec(align(32)) int a;
@@ -543,31 +563,31 @@ struct R : virtual B0, virtual B1, virtual B2, virtual C0, virtual B3, virtual B
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct R
-// CHECK: 0 | (R vbtable pointer)
-// CHECK: 32 | int a
-// CHECK: 64 | struct B0 (virtual base) (empty)
-// CHECK: 72 | struct B1 (virtual base) (empty)
-// CHECK: 104 | struct B2 (virtual base) (empty)
-// CHECK: 104 | struct C0 (virtual base)
-// CHECK: 104 | int a
-// CHECK: 112 | struct B3 (virtual base) (empty)
-// CHECK: 136 | struct B4 (virtual base) (empty)
-// CHECK: | [sizeof=160, align=32
-// CHECK: | nvsize=64, nvalign=32]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct R
-// CHECK-X64: 0 | (R vbtable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: 64 | struct B0 (virtual base) (empty)
-// CHECK-X64: 72 | struct B1 (virtual base) (empty)
-// CHECK-X64: 104 | struct B2 (virtual base) (empty)
-// CHECK-X64: 104 | struct C0 (virtual base)
-// CHECK-X64: 104 | int a
-// CHECK-X64: 112 | struct B3 (virtual base) (empty)
-// CHECK-X64: 136 | struct B4 (virtual base) (empty)
-// CHECK-X64: | [sizeof=160, align=32
-// CHECK-X64: | nvsize=64, nvalign=32]
+// CHECK-NEXT: 0 | struct R
+// CHECK-NEXT: 0 | (R vbtable pointer)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: 64 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: 72 | struct B1 (virtual base) (empty)
+// CHECK-NEXT: 104 | struct B2 (virtual base) (empty)
+// CHECK-NEXT: 104 | struct C0 (virtual base)
+// CHECK-NEXT: 104 | int a
+// CHECK-NEXT: 112 | struct B3 (virtual base) (empty)
+// CHECK-NEXT: 136 | struct B4 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=160, align=32
+// CHECK-NEXT: | nvsize=64, nvalign=32]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct R
+// CHECK-X64-NEXT: 0 | (R vbtable pointer)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 64 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: 72 | struct B1 (virtual base) (empty)
+// CHECK-X64-NEXT: 104 | struct B2 (virtual base) (empty)
+// CHECK-X64-NEXT: 104 | struct C0 (virtual base)
+// CHECK-X64-NEXT: 104 | int a
+// CHECK-X64-NEXT: 112 | struct B3 (virtual base) (empty)
+// CHECK-X64-NEXT: 136 | struct B4 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=160, align=32
+// CHECK-X64-NEXT: | nvsize=64, nvalign=32]
struct S : virtual B0, virtual B1, virtual C0, virtual B2, virtual B3, virtual B4 {
__declspec(align(32)) int a;
@@ -575,31 +595,31 @@ struct S : virtual B0, virtual B1, virtual C0, virtual B2, virtual B3, virtual B
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct S
-// CHECK: 0 | (S vbtable pointer)
-// CHECK: 32 | int a
-// CHECK: 64 | struct B0 (virtual base) (empty)
-// CHECK: 72 | struct B1 (virtual base) (empty)
-// CHECK: 72 | struct C0 (virtual base)
-// CHECK: 72 | int a
-// CHECK: 80 | struct B2 (virtual base) (empty)
-// CHECK: 104 | struct B3 (virtual base) (empty)
-// CHECK: 136 | struct B4 (virtual base) (empty)
-// CHECK: | [sizeof=160, align=32
-// CHECK: | nvsize=64, nvalign=32]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct S
-// CHECK-X64: 0 | (S vbtable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: 64 | struct B0 (virtual base) (empty)
-// CHECK-X64: 72 | struct B1 (virtual base) (empty)
-// CHECK-X64: 72 | struct C0 (virtual base)
-// CHECK-X64: 72 | int a
-// CHECK-X64: 80 | struct B2 (virtual base) (empty)
-// CHECK-X64: 104 | struct B3 (virtual base) (empty)
-// CHECK-X64: 136 | struct B4 (virtual base) (empty)
-// CHECK-X64: | [sizeof=160, align=32
-// CHECK-X64: | nvsize=64, nvalign=32]
+// CHECK-NEXT: 0 | struct S
+// CHECK-NEXT: 0 | (S vbtable pointer)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: 64 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: 72 | struct B1 (virtual base) (empty)
+// CHECK-NEXT: 72 | struct C0 (virtual base)
+// CHECK-NEXT: 72 | int a
+// CHECK-NEXT: 80 | struct B2 (virtual base) (empty)
+// CHECK-NEXT: 104 | struct B3 (virtual base) (empty)
+// CHECK-NEXT: 136 | struct B4 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=160, align=32
+// CHECK-NEXT: | nvsize=64, nvalign=32]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct S
+// CHECK-X64-NEXT: 0 | (S vbtable pointer)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 64 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: 72 | struct B1 (virtual base) (empty)
+// CHECK-X64-NEXT: 72 | struct C0 (virtual base)
+// CHECK-X64-NEXT: 72 | int a
+// CHECK-X64-NEXT: 80 | struct B2 (virtual base) (empty)
+// CHECK-X64-NEXT: 104 | struct B3 (virtual base) (empty)
+// CHECK-X64-NEXT: 136 | struct B4 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=160, align=32
+// CHECK-X64-NEXT: | nvsize=64, nvalign=32]
struct T : virtual B0, virtual B1, virtual C0, virtual D2, virtual B2, virtual B3, virtual B4 {
__declspec(align(16)) int a;
@@ -607,35 +627,37 @@ struct T : virtual B0, virtual B1, virtual C0, virtual D2, virtual B2, virtual B
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct T
-// CHECK: 0 | (T vbtable pointer)
-// CHECK: 16 | int a
-// CHECK: 32 | struct B0 (virtual base) (empty)
-// CHECK: 40 | struct B1 (virtual base) (empty)
-// CHECK: 40 | struct C0 (virtual base)
-// CHECK: 40 | int a
-// CHECK: 44 | struct D2 (virtual base)
-// CHECK: 44 | int [8] a
-// CHECK: 80 | struct B2 (virtual base) (empty)
-// CHECK: 88 | struct B3 (virtual base) (empty)
-// CHECK: 104 | struct B4 (virtual base) (empty)
-// CHECK: | [sizeof=112, align=16
-// CHECK: | nvsize=32, nvalign=16]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct T
-// CHECK-X64: 0 | (T vbtable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 32 | struct B0 (virtual base) (empty)
-// CHECK-X64: 40 | struct B1 (virtual base) (empty)
-// CHECK-X64: 40 | struct C0 (virtual base)
-// CHECK-X64: 40 | int a
-// CHECK-X64: 44 | struct D2 (virtual base)
-// CHECK-X64: 44 | int [8] a
-// CHECK-X64: 80 | struct B2 (virtual base) (empty)
-// CHECK-X64: 88 | struct B3 (virtual base) (empty)
-// CHECK-X64: 104 | struct B4 (virtual base) (empty)
-// CHECK-X64: | [sizeof=112, align=16
-// CHECK-X64: | nvsize=32, nvalign=16]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct T
+// CHECK-NEXT: 0 | (T vbtable pointer)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 32 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: 40 | struct B1 (virtual base) (empty)
+// CHECK-NEXT: 40 | struct C0 (virtual base)
+// CHECK-NEXT: 40 | int a
+// CHECK-NEXT: 44 | struct D2 (virtual base)
+// CHECK-NEXT: 44 | int [8] a
+// CHECK-NEXT: 80 | struct B2 (virtual base) (empty)
+// CHECK-NEXT: 88 | struct B3 (virtual base) (empty)
+// CHECK-NEXT: 104 | struct B4 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=112, align=16
+// CHECK-NEXT: | nvsize=32, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct T
+// CHECK-X64-NEXT: 0 | (T vbtable pointer)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 32 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: 40 | struct B1 (virtual base) (empty)
+// CHECK-X64-NEXT: 40 | struct C0 (virtual base)
+// CHECK-X64-NEXT: 40 | int a
+// CHECK-X64-NEXT: 44 | struct D2 (virtual base)
+// CHECK-X64-NEXT: 44 | int [8] a
+// CHECK-X64-NEXT: 80 | struct B2 (virtual base) (empty)
+// CHECK-X64-NEXT: 88 | struct B3 (virtual base) (empty)
+// CHECK-X64-NEXT: 104 | struct B4 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=112, align=16
+// CHECK-X64-NEXT: | nvsize=32, nvalign=16]
struct __declspec(align(32)) U : virtual B0, virtual B1 {
int a;
@@ -643,21 +665,21 @@ struct __declspec(align(32)) U : virtual B0, virtual B1 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct U
-// CHECK: 0 | (U vbtable pointer)
-// CHECK: 4 | int a
-// CHECK: 8 | struct B0 (virtual base) (empty)
-// CHECK: 40 | struct B1 (virtual base) (empty)
-// CHECK: | [sizeof=64, align=32
-// CHECK: | nvsize=8, nvalign=4]
+// CHECK-NEXT: 0 | struct U
+// CHECK-NEXT: 0 | (U vbtable pointer)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: 40 | struct B1 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=64, align=32
+// CHECK-NEXT: | nvsize=8, nvalign=32]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct U
-// CHECK-X64: 0 | (U vbtable pointer)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | struct B0 (virtual base) (empty)
-// CHECK-X64: 40 | struct B1 (virtual base) (empty)
-// CHECK-X64: | [sizeof=64, align=32
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct U
+// CHECK-X64-NEXT: 0 | (U vbtable pointer)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: 40 | struct B1 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=64, align=32
+// CHECK-X64-NEXT: | nvsize=16, nvalign=32]
struct __declspec(align(32)) V : virtual D1 {
int a;
@@ -665,19 +687,82 @@ struct __declspec(align(32)) V : virtual D1 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct V
-// CHECK: 0 | (V vbtable pointer)
-// CHECK: 4 | int a
-// CHECK: 8 | struct D1 (virtual base) (empty)
-// CHECK: | [sizeof=32, align=32
-// CHECK: | nvsize=8, nvalign=4]
+// CHECK-NEXT: 0 | struct V
+// CHECK-NEXT: 0 | (V vbtable pointer)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | struct D1 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=32, align=32
+// CHECK-NEXT: | nvsize=8, nvalign=32]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct V
+// CHECK-X64-NEXT: 0 | (V vbtable pointer)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | struct D1 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=32, align=32
+// CHECK-X64-NEXT: | nvsize=16, nvalign=32]
+
+struct T0 {};
+struct T1 : T0 { char a; };
+struct T3 : virtual T1, virtual T0 { long long a; };
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct T3
+// CHECK-NEXT: 0 | (T3 vbtable pointer)
+// CHECK-NEXT: 8 | long long a
+// CHECK-NEXT: 16 | struct T1 (virtual base)
+// CHECK-NEXT: 16 | struct T0 (base) (empty)
+// CHECK-NEXT: 16 | char a
+// CHECK-NEXT: 24 | struct T0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=24, align=8
+// CHECK-NEXT: | nvsize=16, nvalign=8]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct T3
+// CHECK-X64-NEXT: 0 | (T3 vbtable pointer)
+// CHECK-X64-NEXT: 8 | long long a
+// CHECK-X64-NEXT: 16 | struct T1 (virtual base)
+// CHECK-X64-NEXT: 16 | struct T0 (base) (empty)
+// CHECK-X64-NEXT: 16 | char a
+// CHECK-X64-NEXT: 24 | struct T0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
+
+struct Q0A {};
+struct Q0B { char Q0BField; };
+struct Q0C : virtual Q0A, virtual Q0B { char Q0CField; };
+struct Q0D : Q0C, Q0A {};
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct Q0D
+// CHECK-NEXT: 0 | struct Q0C (base)
+// CHECK-NEXT: 0 | (Q0C vbtable pointer)
+// CHECK-NEXT: 4 | char Q0CField
+// CHECK-NEXT: 8 | struct Q0A (base) (empty)
+// CHECK-NEXT: 8 | struct Q0A (virtual base) (empty)
+// CHECK-NEXT: 8 | struct Q0B (virtual base)
+// CHECK-NEXT: 8 | char Q0BField
+// CHECK-NEXT: | [sizeof=9, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct V
-// CHECK-X64: 0 | (V vbtable pointer)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | struct D1 (virtual base) (empty)
-// CHECK-X64: | [sizeof=32, align=32
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct Q0D
+// CHECK-X64-NEXT: 0 | struct Q0C (base)
+// CHECK-X64-NEXT: 0 | (Q0C vbtable pointer)
+// CHECK-X64-NEXT: 8 | char Q0CField
+// CHECK-X64-NEXT: 16 | struct Q0A (base) (empty)
+// CHECK-X64-NEXT: 16 | struct Q0A (virtual base) (empty)
+// CHECK-X64-NEXT: 16 | struct Q0B (virtual base)
+// CHECK-X64-NEXT: 16 | char Q0BField
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
int a[
sizeof(A)+
@@ -701,4 +786,6 @@ sizeof(R)+
sizeof(S)+
sizeof(T)+
sizeof(U)+
-sizeof(V)]; \ No newline at end of file
+sizeof(V)+
+sizeof(T3)+
+sizeof(Q0D)];
diff --git a/test/Layout/ms-x86-lazy-empty-nonvirtual-base.cpp b/test/Layout/ms-x86-lazy-empty-nonvirtual-base.cpp
index 7dd3fad5bf45..34ae0cf9dde8 100644
--- a/test/Layout/ms-x86-lazy-empty-nonvirtual-base.cpp
+++ b/test/Layout/ms-x86-lazy-empty-nonvirtual-base.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only -cxx-abi microsoft %s 2>/dev/null \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
// RUN: | FileCheck %s
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only -cxx-abi microsoft %s 2>/dev/null \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
// RUN: | FileCheck %s -check-prefix CHECK-X64
extern "C" int printf(const char *fmt, ...);
@@ -24,687 +24,786 @@ struct __declspec(align(2)) B3X { B3X() { printf("B3 = %p\n", this); } };
struct B4X { B4X() { printf("B4 = %p\n", this); } };
struct B5X { B5X() { printf("B5 = %p\n", this); } };
struct B6X { B6X() { printf("B6 = %p\n", this); } };
-struct B8X { short a; B8X() : a(0xf00000B8) { printf("B8 = %p\n", this); } };
+struct B8X { short a; B8X() : a(0x000000B8) { printf("B8 = %p\n", this); } };
struct AA : B8, B1, virtual B0 {
int a;
- AA() : a(0xf00000AA) { printf("AA = %p\n", this); }
+ AA() : a(0x000000AA) { printf("AA = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct AA
-// CHECK: 0 | struct B8 (base)
-// CHECK: 0 | char [5] c
-// CHECK: 13 | struct B1 (base) (empty)
-// CHECK: 8 | (AA vbtable pointer)
-// CHECK: 16 | int a
-// CHECK: 20 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=20, align=4
-// CHECK: | nvsize=20, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct AA
-// CHECK-X64: 0 | struct B8 (base)
-// CHECK-X64: 0 | char [5] c
-// CHECK-X64: 17 | struct B1 (base) (empty)
-// CHECK-X64: 8 | (AA vbtable pointer)
-// CHECK-X64: 20 | int a
-// CHECK-X64: 24 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct AA
+// CHECK-NEXT: 0 | struct B8 (base)
+// CHECK-NEXT: 0 | char [5] c
+// CHECK-NEXT: 13 | struct B1 (base) (empty)
+// CHECK-NEXT: 8 | (AA vbtable pointer)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 20 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=20, align=4
+// CHECK-NEXT: | nvsize=20, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct AA
+// CHECK-X64-NEXT: 0 | struct B8 (base)
+// CHECK-X64-NEXT: 0 | char [5] c
+// CHECK-X64-NEXT: 17 | struct B1 (base) (empty)
+// CHECK-X64-NEXT: 8 | (AA vbtable pointer)
+// CHECK-X64-NEXT: 20 | int a
+// CHECK-X64-NEXT: 24 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct AB : B8, B1, virtual B0 {
short a;
- AB() : a(0xf00000AB) { printf("AB = %p\n", this); }
+ AB() : a(0x000000AB) { printf("AB = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct AB
-// CHECK: 0 | struct B8 (base)
-// CHECK: 0 | char [5] c
-// CHECK: 13 | struct B1 (base) (empty)
-// CHECK: 8 | (AB vbtable pointer)
-// CHECK: 14 | short a
-// CHECK: 16 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=16, align=4
-// CHECK: | nvsize=16, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct AB
-// CHECK-X64: 0 | struct B8 (base)
-// CHECK-X64: 0 | char [5] c
-// CHECK-X64: 17 | struct B1 (base) (empty)
-// CHECK-X64: 8 | (AB vbtable pointer)
-// CHECK-X64: 18 | short a
-// CHECK-X64: 24 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK-NEXT: 0 | struct AB
+// CHECK-NEXT: 0 | struct B8 (base)
+// CHECK-NEXT: 0 | char [5] c
+// CHECK-NEXT: 13 | struct B1 (base) (empty)
+// CHECK-NEXT: 8 | (AB vbtable pointer)
+// CHECK-NEXT: 14 | short a
+// CHECK-NEXT: 16 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=16, align=4
+// CHECK-NEXT: | nvsize=16, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct AB
+// CHECK-X64-NEXT: 0 | struct B8 (base)
+// CHECK-X64-NEXT: 0 | char [5] c
+// CHECK-X64-NEXT: 17 | struct B1 (base) (empty)
+// CHECK-X64-NEXT: 8 | (AB vbtable pointer)
+// CHECK-X64-NEXT: 18 | short a
+// CHECK-X64-NEXT: 24 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct AC : B8, B1, virtual B0 {
char a;
- AC() : a(0xf00000AC) { printf("AC = %p\n", this); }
+ AC() : a(0x000000AC) { printf("AC = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct AC
-// CHECK: 0 | struct B8 (base)
-// CHECK: 0 | char [5] c
-// CHECK: 12 | struct B1 (base) (empty)
-// CHECK: 8 | (AC vbtable pointer)
-// CHECK: 12 | char a
-// CHECK: 16 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=16, align=4
-// CHECK: | nvsize=16, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct AC
-// CHECK-X64: 0 | struct B8 (base)
-// CHECK-X64: 0 | char [5] c
-// CHECK-X64: 16 | struct B1 (base) (empty)
-// CHECK-X64: 8 | (AC vbtable pointer)
-// CHECK-X64: 16 | char a
-// CHECK-X64: 24 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK-NEXT: 0 | struct AC
+// CHECK-NEXT: 0 | struct B8 (base)
+// CHECK-NEXT: 0 | char [5] c
+// CHECK-NEXT: 12 | struct B1 (base) (empty)
+// CHECK-NEXT: 8 | (AC vbtable pointer)
+// CHECK-NEXT: 12 | char a
+// CHECK-NEXT: 16 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=16, align=4
+// CHECK-NEXT: | nvsize=16, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct AC
+// CHECK-X64-NEXT: 0 | struct B8 (base)
+// CHECK-X64-NEXT: 0 | char [5] c
+// CHECK-X64-NEXT: 16 | struct B1 (base) (empty)
+// CHECK-X64-NEXT: 8 | (AC vbtable pointer)
+// CHECK-X64-NEXT: 16 | char a
+// CHECK-X64-NEXT: 24 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct AD : B8, B1, virtual B0 {
AD() { printf("AD = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct AD
-// CHECK: 0 | struct B8 (base)
-// CHECK: 0 | char [5] c
-// CHECK: 12 | struct B1 (base) (empty)
-// CHECK: 8 | (AD vbtable pointer)
-// CHECK: 12 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=12, align=4
-// CHECK: | nvsize=12, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct AD
-// CHECK-X64: 0 | struct B8 (base)
-// CHECK-X64: 0 | char [5] c
-// CHECK-X64: 16 | struct B1 (base) (empty)
-// CHECK-X64: 8 | (AD vbtable pointer)
-// CHECK-X64: 16 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=16, align=8
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-NEXT: 0 | struct AD
+// CHECK-NEXT: 0 | struct B8 (base)
+// CHECK-NEXT: 0 | char [5] c
+// CHECK-NEXT: 12 | struct B1 (base) (empty)
+// CHECK-NEXT: 8 | (AD vbtable pointer)
+// CHECK-NEXT: 12 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=12, align=4
+// CHECK-NEXT: | nvsize=12, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct AD
+// CHECK-X64-NEXT: 0 | struct B8 (base)
+// CHECK-X64-NEXT: 0 | char [5] c
+// CHECK-X64-NEXT: 16 | struct B1 (base) (empty)
+// CHECK-X64-NEXT: 8 | (AD vbtable pointer)
+// CHECK-X64-NEXT: 16 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=16, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
struct AA1 : B9, B1, virtual B0 {
int a;
- AA1() : a(0xf0000AA1) { printf("AA1 = %p\n", this); }
+ AA1() : a(0x00000AA1) { printf("AA1 = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct AA1
-// CHECK: 0 | struct B9 (base)
-// CHECK: 0 | char [6] c
-// CHECK: 14 | struct B1 (base) (empty)
-// CHECK: 8 | (AA1 vbtable pointer)
-// CHECK: 16 | int a
-// CHECK: 20 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=20, align=4
-// CHECK: | nvsize=20, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct AA1
-// CHECK-X64: 0 | struct B9 (base)
-// CHECK-X64: 0 | char [6] c
-// CHECK-X64: 18 | struct B1 (base) (empty)
-// CHECK-X64: 8 | (AA1 vbtable pointer)
-// CHECK-X64: 20 | int a
-// CHECK-X64: 24 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct AA1
+// CHECK-NEXT: 0 | struct B9 (base)
+// CHECK-NEXT: 0 | char [6] c
+// CHECK-NEXT: 14 | struct B1 (base) (empty)
+// CHECK-NEXT: 8 | (AA1 vbtable pointer)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 20 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=20, align=4
+// CHECK-NEXT: | nvsize=20, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct AA1
+// CHECK-X64-NEXT: 0 | struct B9 (base)
+// CHECK-X64-NEXT: 0 | char [6] c
+// CHECK-X64-NEXT: 18 | struct B1 (base) (empty)
+// CHECK-X64-NEXT: 8 | (AA1 vbtable pointer)
+// CHECK-X64-NEXT: 20 | int a
+// CHECK-X64-NEXT: 24 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct AB1 : B9, B1, virtual B0 {
short a;
- AB1() : a(0xf0000AB1) { printf("AB1 = %p\n", this); }
+ AB1() : a(0x00000AB1) { printf("AB1 = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct AB1
-// CHECK: 0 | struct B9 (base)
-// CHECK: 0 | char [6] c
-// CHECK: 12 | struct B1 (base) (empty)
-// CHECK: 8 | (AB1 vbtable pointer)
-// CHECK: 12 | short a
-// CHECK: 16 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=16, align=4
-// CHECK: | nvsize=16, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct AB1
-// CHECK-X64: 0 | struct B9 (base)
-// CHECK-X64: 0 | char [6] c
-// CHECK-X64: 16 | struct B1 (base) (empty)
-// CHECK-X64: 8 | (AB1 vbtable pointer)
-// CHECK-X64: 16 | short a
-// CHECK-X64: 24 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK-NEXT: 0 | struct AB1
+// CHECK-NEXT: 0 | struct B9 (base)
+// CHECK-NEXT: 0 | char [6] c
+// CHECK-NEXT: 12 | struct B1 (base) (empty)
+// CHECK-NEXT: 8 | (AB1 vbtable pointer)
+// CHECK-NEXT: 12 | short a
+// CHECK-NEXT: 16 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=16, align=4
+// CHECK-NEXT: | nvsize=16, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct AB1
+// CHECK-X64-NEXT: 0 | struct B9 (base)
+// CHECK-X64-NEXT: 0 | char [6] c
+// CHECK-X64-NEXT: 16 | struct B1 (base) (empty)
+// CHECK-X64-NEXT: 8 | (AB1 vbtable pointer)
+// CHECK-X64-NEXT: 16 | short a
+// CHECK-X64-NEXT: 24 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct AC1 : B9, B1, virtual B0 {
char a;
- AC1() : a(0xf0000AC1) { printf("AC1 = %p\n", this); }
+ AC1() : a(0x000000C1) { printf("AC1 = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct AC1
-// CHECK: 0 | struct B9 (base)
-// CHECK: 0 | char [6] c
-// CHECK: 12 | struct B1 (base) (empty)
-// CHECK: 8 | (AC1 vbtable pointer)
-// CHECK: 12 | char a
-// CHECK: 16 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=16, align=4
-// CHECK: | nvsize=16, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct AC1
-// CHECK-X64: 0 | struct B9 (base)
-// CHECK-X64: 0 | char [6] c
-// CHECK-X64: 16 | struct B1 (base) (empty)
-// CHECK-X64: 8 | (AC1 vbtable pointer)
-// CHECK-X64: 16 | char a
-// CHECK-X64: 24 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK-NEXT: 0 | struct AC1
+// CHECK-NEXT: 0 | struct B9 (base)
+// CHECK-NEXT: 0 | char [6] c
+// CHECK-NEXT: 12 | struct B1 (base) (empty)
+// CHECK-NEXT: 8 | (AC1 vbtable pointer)
+// CHECK-NEXT: 12 | char a
+// CHECK-NEXT: 16 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=16, align=4
+// CHECK-NEXT: | nvsize=16, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct AC1
+// CHECK-X64-NEXT: 0 | struct B9 (base)
+// CHECK-X64-NEXT: 0 | char [6] c
+// CHECK-X64-NEXT: 16 | struct B1 (base) (empty)
+// CHECK-X64-NEXT: 8 | (AC1 vbtable pointer)
+// CHECK-X64-NEXT: 16 | char a
+// CHECK-X64-NEXT: 24 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct AD1 : B9, B1, virtual B0 {
AD1() { printf("AD1 = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct AD1
-// CHECK: 0 | struct B9 (base)
-// CHECK: 0 | char [6] c
-// CHECK: 12 | struct B1 (base) (empty)
-// CHECK: 8 | (AD1 vbtable pointer)
-// CHECK: 12 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=12, align=4
-// CHECK: | nvsize=12, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct AD1
-// CHECK-X64: 0 | struct B9 (base)
-// CHECK-X64: 0 | char [6] c
-// CHECK-X64: 16 | struct B1 (base) (empty)
-// CHECK-X64: 8 | (AD1 vbtable pointer)
-// CHECK-X64: 16 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=16, align=8
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-NEXT: 0 | struct AD1
+// CHECK-NEXT: 0 | struct B9 (base)
+// CHECK-NEXT: 0 | char [6] c
+// CHECK-NEXT: 12 | struct B1 (base) (empty)
+// CHECK-NEXT: 8 | (AD1 vbtable pointer)
+// CHECK-NEXT: 12 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=12, align=4
+// CHECK-NEXT: | nvsize=12, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct AD1
+// CHECK-X64-NEXT: 0 | struct B9 (base)
+// CHECK-X64-NEXT: 0 | char [6] c
+// CHECK-X64-NEXT: 16 | struct B1 (base) (empty)
+// CHECK-X64-NEXT: 8 | (AD1 vbtable pointer)
+// CHECK-X64-NEXT: 16 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=16, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
struct AA2 : B10, B1, virtual B0 {
int a;
- AA2() : a(0xf0000AA2) { printf("AA2 = %p\n", this); }
+ AA2() : a(0x00000AA2) { printf("AA2 = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct AA2
-// CHECK: 0 | struct B10 (base)
-// CHECK: 0 | char [7] c
-// CHECK: 15 | struct B1 (base) (empty)
-// CHECK: 8 | (AA2 vbtable pointer)
-// CHECK: 16 | int a
-// CHECK: 20 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=20, align=4
-// CHECK: | nvsize=20, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct AA2
-// CHECK-X64: 0 | struct B10 (base)
-// CHECK-X64: 0 | char [7] c
-// CHECK-X64: 19 | struct B1 (base) (empty)
-// CHECK-X64: 8 | (AA2 vbtable pointer)
-// CHECK-X64: 20 | int a
-// CHECK-X64: 24 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct AA2
+// CHECK-NEXT: 0 | struct B10 (base)
+// CHECK-NEXT: 0 | char [7] c
+// CHECK-NEXT: 15 | struct B1 (base) (empty)
+// CHECK-NEXT: 8 | (AA2 vbtable pointer)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 20 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=20, align=4
+// CHECK-NEXT: | nvsize=20, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct AA2
+// CHECK-X64-NEXT: 0 | struct B10 (base)
+// CHECK-X64-NEXT: 0 | char [7] c
+// CHECK-X64-NEXT: 19 | struct B1 (base) (empty)
+// CHECK-X64-NEXT: 8 | (AA2 vbtable pointer)
+// CHECK-X64-NEXT: 20 | int a
+// CHECK-X64-NEXT: 24 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct AB2 : B10, B1, virtual B0 {
short a;
- AB2() : a(0xf0000AB2) { printf("AB2 = %p\n", this); }
+ AB2() : a(0x00000AB2) { printf("AB2 = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct AB2
-// CHECK: 0 | struct B10 (base)
-// CHECK: 0 | char [7] c
-// CHECK: 13 | struct B1 (base) (empty)
-// CHECK: 8 | (AB2 vbtable pointer)
-// CHECK: 14 | short a
-// CHECK: 16 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=16, align=4
-// CHECK: | nvsize=16, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct AB2
-// CHECK-X64: 0 | struct B10 (base)
-// CHECK-X64: 0 | char [7] c
-// CHECK-X64: 17 | struct B1 (base) (empty)
-// CHECK-X64: 8 | (AB2 vbtable pointer)
-// CHECK-X64: 18 | short a
-// CHECK-X64: 24 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK-NEXT: 0 | struct AB2
+// CHECK-NEXT: 0 | struct B10 (base)
+// CHECK-NEXT: 0 | char [7] c
+// CHECK-NEXT: 13 | struct B1 (base) (empty)
+// CHECK-NEXT: 8 | (AB2 vbtable pointer)
+// CHECK-NEXT: 14 | short a
+// CHECK-NEXT: 16 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=16, align=4
+// CHECK-NEXT: | nvsize=16, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct AB2
+// CHECK-X64-NEXT: 0 | struct B10 (base)
+// CHECK-X64-NEXT: 0 | char [7] c
+// CHECK-X64-NEXT: 17 | struct B1 (base) (empty)
+// CHECK-X64-NEXT: 8 | (AB2 vbtable pointer)
+// CHECK-X64-NEXT: 18 | short a
+// CHECK-X64-NEXT: 24 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct AC2 : B10, B1, virtual B0 {
char a;
- AC2() : a(0xf0000AC2) { printf("AC2 = %p\n", this); }
+ AC2() : a(0x000000C2) { printf("AC2 = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct AC2
-// CHECK: 0 | struct B10 (base)
-// CHECK: 0 | char [7] c
-// CHECK: 12 | struct B1 (base) (empty)
-// CHECK: 8 | (AC2 vbtable pointer)
-// CHECK: 12 | char a
-// CHECK: 16 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=16, align=4
-// CHECK: | nvsize=16, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct AC2
-// CHECK-X64: 0 | struct B10 (base)
-// CHECK-X64: 0 | char [7] c
-// CHECK-X64: 16 | struct B1 (base) (empty)
-// CHECK-X64: 8 | (AC2 vbtable pointer)
-// CHECK-X64: 16 | char a
-// CHECK-X64: 24 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK-NEXT: 0 | struct AC2
+// CHECK-NEXT: 0 | struct B10 (base)
+// CHECK-NEXT: 0 | char [7] c
+// CHECK-NEXT: 12 | struct B1 (base) (empty)
+// CHECK-NEXT: 8 | (AC2 vbtable pointer)
+// CHECK-NEXT: 12 | char a
+// CHECK-NEXT: 16 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=16, align=4
+// CHECK-NEXT: | nvsize=16, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct AC2
+// CHECK-X64-NEXT: 0 | struct B10 (base)
+// CHECK-X64-NEXT: 0 | char [7] c
+// CHECK-X64-NEXT: 16 | struct B1 (base) (empty)
+// CHECK-X64-NEXT: 8 | (AC2 vbtable pointer)
+// CHECK-X64-NEXT: 16 | char a
+// CHECK-X64-NEXT: 24 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct AD2 : B10, B1, virtual B0 {
AD2() { printf("AD2 = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct AD2
-// CHECK: 0 | struct B10 (base)
-// CHECK: 0 | char [7] c
-// CHECK: 12 | struct B1 (base) (empty)
-// CHECK: 8 | (AD2 vbtable pointer)
-// CHECK: 12 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=12, align=4
-// CHECK: | nvsize=12, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct AD2
-// CHECK-X64: 0 | struct B10 (base)
-// CHECK-X64: 0 | char [7] c
-// CHECK-X64: 16 | struct B1 (base) (empty)
-// CHECK-X64: 8 | (AD2 vbtable pointer)
-// CHECK-X64: 16 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=16, align=8
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-NEXT: 0 | struct AD2
+// CHECK-NEXT: 0 | struct B10 (base)
+// CHECK-NEXT: 0 | char [7] c
+// CHECK-NEXT: 12 | struct B1 (base) (empty)
+// CHECK-NEXT: 8 | (AD2 vbtable pointer)
+// CHECK-NEXT: 12 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=12, align=4
+// CHECK-NEXT: | nvsize=12, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct AD2
+// CHECK-X64-NEXT: 0 | struct B10 (base)
+// CHECK-X64-NEXT: 0 | char [7] c
+// CHECK-X64-NEXT: 16 | struct B1 (base) (empty)
+// CHECK-X64-NEXT: 8 | (AD2 vbtable pointer)
+// CHECK-X64-NEXT: 16 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=16, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
struct AA3 : B11, B1, virtual B0 {
int a;
- AA3() : a(0xf0000AA3) { printf("AA3 = %p\n", this); }
+ AA3() : a(0x00000AA3) { printf("AA3 = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct AA3
-// CHECK: 0 | struct B11 (base)
-// CHECK: 0 | char [8] c
-// CHECK: 12 | struct B1 (base) (empty)
-// CHECK: 8 | (AA3 vbtable pointer)
-// CHECK: 12 | int a
-// CHECK: 16 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=16, align=4
-// CHECK: | nvsize=16, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct AA3
-// CHECK-X64: 0 | struct B11 (base)
-// CHECK-X64: 0 | char [8] c
-// CHECK-X64: 16 | struct B1 (base) (empty)
-// CHECK-X64: 8 | (AA3 vbtable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 24 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct AA3
+// CHECK-NEXT: 0 | struct B11 (base)
+// CHECK-NEXT: 0 | char [8] c
+// CHECK-NEXT: 12 | struct B1 (base) (empty)
+// CHECK-NEXT: 8 | (AA3 vbtable pointer)
+// CHECK-NEXT: 12 | int a
+// CHECK-NEXT: 16 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=16, align=4
+// CHECK-NEXT: | nvsize=16, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct AA3
+// CHECK-X64-NEXT: 0 | struct B11 (base)
+// CHECK-X64-NEXT: 0 | char [8] c
+// CHECK-X64-NEXT: 16 | struct B1 (base) (empty)
+// CHECK-X64-NEXT: 8 | (AA3 vbtable pointer)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 24 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct AB3 : B11, B1, virtual B0 {
short a;
- AB3() : a(0xf0000AB3) { printf("AB3 = %p\n", this); }
+ AB3() : a(0x00000AB3) { printf("AB3 = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct AB3
-// CHECK: 0 | struct B11 (base)
-// CHECK: 0 | char [8] c
-// CHECK: 12 | struct B1 (base) (empty)
-// CHECK: 8 | (AB3 vbtable pointer)
-// CHECK: 12 | short a
-// CHECK: 16 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=16, align=4
-// CHECK: | nvsize=16, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct AB3
-// CHECK-X64: 0 | struct B11 (base)
-// CHECK-X64: 0 | char [8] c
-// CHECK-X64: 16 | struct B1 (base) (empty)
-// CHECK-X64: 8 | (AB3 vbtable pointer)
-// CHECK-X64: 16 | short a
-// CHECK-X64: 24 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK-NEXT: 0 | struct AB3
+// CHECK-NEXT: 0 | struct B11 (base)
+// CHECK-NEXT: 0 | char [8] c
+// CHECK-NEXT: 12 | struct B1 (base) (empty)
+// CHECK-NEXT: 8 | (AB3 vbtable pointer)
+// CHECK-NEXT: 12 | short a
+// CHECK-NEXT: 16 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=16, align=4
+// CHECK-NEXT: | nvsize=16, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct AB3
+// CHECK-X64-NEXT: 0 | struct B11 (base)
+// CHECK-X64-NEXT: 0 | char [8] c
+// CHECK-X64-NEXT: 16 | struct B1 (base) (empty)
+// CHECK-X64-NEXT: 8 | (AB3 vbtable pointer)
+// CHECK-X64-NEXT: 16 | short a
+// CHECK-X64-NEXT: 24 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct AC3 : B11, B1, virtual B0 {
char a;
- AC3() : a(0xf0000AC3) { printf("AC3 = %p\n", this); }
+ AC3() : a(0x000000C3) { printf("AC3 = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct AC3
-// CHECK: 0 | struct B11 (base)
-// CHECK: 0 | char [8] c
-// CHECK: 12 | struct B1 (base) (empty)
-// CHECK: 8 | (AC3 vbtable pointer)
-// CHECK: 12 | char a
-// CHECK: 16 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=16, align=4
-// CHECK: | nvsize=16, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct AC3
-// CHECK-X64: 0 | struct B11 (base)
-// CHECK-X64: 0 | char [8] c
-// CHECK-X64: 16 | struct B1 (base) (empty)
-// CHECK-X64: 8 | (AC3 vbtable pointer)
-// CHECK-X64: 16 | char a
-// CHECK-X64: 24 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK-NEXT: 0 | struct AC3
+// CHECK-NEXT: 0 | struct B11 (base)
+// CHECK-NEXT: 0 | char [8] c
+// CHECK-NEXT: 12 | struct B1 (base) (empty)
+// CHECK-NEXT: 8 | (AC3 vbtable pointer)
+// CHECK-NEXT: 12 | char a
+// CHECK-NEXT: 16 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=16, align=4
+// CHECK-NEXT: | nvsize=16, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct AC3
+// CHECK-X64-NEXT: 0 | struct B11 (base)
+// CHECK-X64-NEXT: 0 | char [8] c
+// CHECK-X64-NEXT: 16 | struct B1 (base) (empty)
+// CHECK-X64-NEXT: 8 | (AC3 vbtable pointer)
+// CHECK-X64-NEXT: 16 | char a
+// CHECK-X64-NEXT: 24 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct AD3 : B11, B1, virtual B0 {
AD3() { printf("AD3 = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct AD3
-// CHECK: 0 | struct B11 (base)
-// CHECK: 0 | char [8] c
-// CHECK: 12 | struct B1 (base) (empty)
-// CHECK: 8 | (AD3 vbtable pointer)
-// CHECK: 12 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=12, align=4
-// CHECK: | nvsize=12, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct AD3
-// CHECK-X64: 0 | struct B11 (base)
-// CHECK-X64: 0 | char [8] c
-// CHECK-X64: 16 | struct B1 (base) (empty)
-// CHECK-X64: 8 | (AD3 vbtable pointer)
-// CHECK-X64: 16 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=16, align=8
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-NEXT: 0 | struct AD3
+// CHECK-NEXT: 0 | struct B11 (base)
+// CHECK-NEXT: 0 | char [8] c
+// CHECK-NEXT: 12 | struct B1 (base) (empty)
+// CHECK-NEXT: 8 | (AD3 vbtable pointer)
+// CHECK-NEXT: 12 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=12, align=4
+// CHECK-NEXT: | nvsize=12, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct AD3
+// CHECK-X64-NEXT: 0 | struct B11 (base)
+// CHECK-X64-NEXT: 0 | char [8] c
+// CHECK-X64-NEXT: 16 | struct B1 (base) (empty)
+// CHECK-X64-NEXT: 8 | (AD3 vbtable pointer)
+// CHECK-X64-NEXT: 16 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=16, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
struct B : B1, B2, virtual B0 {
B() { printf("B = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct B
-// CHECK: 0 | struct B1 (base) (empty)
-// CHECK: 8 | struct B2 (base) (empty)
-// CHECK: 4 | (B vbtable pointer)
-// CHECK: 8 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=8, align=4
-// CHECK: | nvsize=8, nvalign=4]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct B
+// CHECK-NEXT: 0 | struct B1 (base) (empty)
+// CHECK-NEXT: 8 | struct B2 (base) (empty)
+// CHECK-NEXT: 4 | (B vbtable pointer)
+// CHECK-NEXT: 8 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=8, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct B
-// CHECK-X64: 0 | struct B1 (base) (empty)
-// CHECK-X64: 16 | struct B2 (base) (empty)
-// CHECK-X64: 8 | (B vbtable pointer)
-// CHECK-X64: 16 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=16, align=8
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct B
+// CHECK-X64-NEXT: 0 | struct B1 (base) (empty)
+// CHECK-X64-NEXT: 16 | struct B2 (base) (empty)
+// CHECK-X64-NEXT: 8 | (B vbtable pointer)
+// CHECK-X64-NEXT: 16 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=16, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
struct C : B1, B2, B3, virtual B0 {
char a;
- C() : a(0xf000000C) { printf("C = %p\n", this); }
+ C() : a(0x0000000C) { printf("C = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct C
-// CHECK: 0 | struct B1 (base) (empty)
-// CHECK: 1 | struct B2 (base) (empty)
-// CHECK: 8 | struct B3 (base) (empty)
-// CHECK: 4 | (C vbtable pointer)
-// CHECK: 8 | char a
-// CHECK: 12 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=12, align=4
-// CHECK: | nvsize=12, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct C
-// CHECK-X64: 0 | struct B1 (base) (empty)
-// CHECK-X64: 1 | struct B2 (base) (empty)
-// CHECK-X64: 16 | struct B3 (base) (empty)
-// CHECK-X64: 8 | (C vbtable pointer)
-// CHECK-X64: 16 | char a
-// CHECK-X64: 24 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct C
+// CHECK-NEXT: 0 | struct B1 (base) (empty)
+// CHECK-NEXT: 1 | struct B2 (base) (empty)
+// CHECK-NEXT: 8 | struct B3 (base) (empty)
+// CHECK-NEXT: 4 | (C vbtable pointer)
+// CHECK-NEXT: 8 | char a
+// CHECK-NEXT: 12 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=12, align=4
+// CHECK-NEXT: | nvsize=12, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct C
+// CHECK-X64-NEXT: 0 | struct B1 (base) (empty)
+// CHECK-X64-NEXT: 1 | struct B2 (base) (empty)
+// CHECK-X64-NEXT: 16 | struct B3 (base) (empty)
+// CHECK-X64-NEXT: 8 | (C vbtable pointer)
+// CHECK-X64-NEXT: 16 | char a
+// CHECK-X64-NEXT: 24 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct D : B1, B2, B3, B4, B5, virtual B0 {
int a;
- D() : a(0xf000000D) { printf("D = %p\n", this); }
+ D() : a(0x0000000D) { printf("D = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct D
-// CHECK: 0 | struct B1 (base) (empty)
-// CHECK: 1 | struct B2 (base) (empty)
-// CHECK: 2 | struct B3 (base) (empty)
-// CHECK: 3 | struct B4 (base) (empty)
-// CHECK: 8 | struct B5 (base) (empty)
-// CHECK: 4 | (D vbtable pointer)
-// CHECK: 8 | int a
-// CHECK: 12 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=12, align=4
-// CHECK: | nvsize=12, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct D
-// CHECK-X64: 0 | struct B1 (base) (empty)
-// CHECK-X64: 1 | struct B2 (base) (empty)
-// CHECK-X64: 2 | struct B3 (base) (empty)
-// CHECK-X64: 3 | struct B4 (base) (empty)
-// CHECK-X64: 16 | struct B5 (base) (empty)
-// CHECK-X64: 8 | (D vbtable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 24 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct D
+// CHECK-NEXT: 0 | struct B1 (base) (empty)
+// CHECK-NEXT: 1 | struct B2 (base) (empty)
+// CHECK-NEXT: 2 | struct B3 (base) (empty)
+// CHECK-NEXT: 3 | struct B4 (base) (empty)
+// CHECK-NEXT: 8 | struct B5 (base) (empty)
+// CHECK-NEXT: 4 | (D vbtable pointer)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: 12 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=12, align=4
+// CHECK-NEXT: | nvsize=12, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct D
+// CHECK-X64-NEXT: 0 | struct B1 (base) (empty)
+// CHECK-X64-NEXT: 1 | struct B2 (base) (empty)
+// CHECK-X64-NEXT: 2 | struct B3 (base) (empty)
+// CHECK-X64-NEXT: 3 | struct B4 (base) (empty)
+// CHECK-X64-NEXT: 16 | struct B5 (base) (empty)
+// CHECK-X64-NEXT: 8 | (D vbtable pointer)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 24 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct E : B1, B6, B3, B4, B5, virtual B0 {
int a;
- E() : a(0xf000000E) { printf("E = %p\n", this); }
+ E() : a(0x0000000E) { printf("E = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct E
-// CHECK: 0 | struct B1 (base) (empty)
-// CHECK: 2 | struct B6 (base) (empty)
-// CHECK: 3 | struct B3 (base) (empty)
-// CHECK: 4 | struct B4 (base) (empty)
-// CHECK: 13 | struct B5 (base) (empty)
-// CHECK: 8 | (E vbtable pointer)
-// CHECK: 16 | int a
-// CHECK: 20 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=20, align=4
-// CHECK: | nvsize=20, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct E
-// CHECK-X64: 0 | struct B1 (base) (empty)
-// CHECK-X64: 2 | struct B6 (base) (empty)
-// CHECK-X64: 3 | struct B3 (base) (empty)
-// CHECK-X64: 4 | struct B4 (base) (empty)
-// CHECK-X64: 17 | struct B5 (base) (empty)
-// CHECK-X64: 8 | (E vbtable pointer)
-// CHECK-X64: 20 | int a
-// CHECK-X64: 24 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct E
+// CHECK-NEXT: 0 | struct B1 (base) (empty)
+// CHECK-NEXT: 2 | struct B6 (base) (empty)
+// CHECK-NEXT: 3 | struct B3 (base) (empty)
+// CHECK-NEXT: 4 | struct B4 (base) (empty)
+// CHECK-NEXT: 13 | struct B5 (base) (empty)
+// CHECK-NEXT: 8 | (E vbtable pointer)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 20 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=20, align=4
+// CHECK-NEXT: | nvsize=20, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct E
+// CHECK-X64-NEXT: 0 | struct B1 (base) (empty)
+// CHECK-X64-NEXT: 2 | struct B6 (base) (empty)
+// CHECK-X64-NEXT: 3 | struct B3 (base) (empty)
+// CHECK-X64-NEXT: 4 | struct B4 (base) (empty)
+// CHECK-X64-NEXT: 17 | struct B5 (base) (empty)
+// CHECK-X64-NEXT: 8 | (E vbtable pointer)
+// CHECK-X64-NEXT: 20 | int a
+// CHECK-X64-NEXT: 24 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct F : B1, B6, B4, B8, B5, virtual B0 {
int a;
- F() : a(0xf000000F) { printf("&a = %p\n", &a); printf("F = %p\n", this); }
+ F() : a(0x0000000F) { printf("&a = %p\n", &a); printf("F = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct F
-// CHECK: 0 | struct B1 (base) (empty)
-// CHECK: 2 | struct B6 (base) (empty)
-// CHECK: 3 | struct B4 (base) (empty)
-// CHECK: 3 | struct B8 (base)
-// CHECK: 3 | char [5] c
-// CHECK: 12 | struct B5 (base) (empty)
-// CHECK: 8 | (F vbtable pointer)
-// CHECK: 12 | int a
-// CHECK: 16 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=16, align=4
-// CHECK: | nvsize=16, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct F
-// CHECK-X64: 0 | struct B1 (base) (empty)
-// CHECK-X64: 2 | struct B6 (base) (empty)
-// CHECK-X64: 3 | struct B4 (base) (empty)
-// CHECK-X64: 3 | struct B8 (base)
-// CHECK-X64: 3 | char [5] c
-// CHECK-X64: 16 | struct B5 (base) (empty)
-// CHECK-X64: 8 | (F vbtable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 24 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK-NEXT: 0 | struct F
+// CHECK-NEXT: 0 | struct B1 (base) (empty)
+// CHECK-NEXT: 2 | struct B6 (base) (empty)
+// CHECK-NEXT: 3 | struct B4 (base) (empty)
+// CHECK-NEXT: 3 | struct B8 (base)
+// CHECK-NEXT: 3 | char [5] c
+// CHECK-NEXT: 12 | struct B5 (base) (empty)
+// CHECK-NEXT: 8 | (F vbtable pointer)
+// CHECK-NEXT: 12 | int a
+// CHECK-NEXT: 16 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=16, align=4
+// CHECK-NEXT: | nvsize=16, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct F
+// CHECK-X64-NEXT: 0 | struct B1 (base) (empty)
+// CHECK-X64-NEXT: 2 | struct B6 (base) (empty)
+// CHECK-X64-NEXT: 3 | struct B4 (base) (empty)
+// CHECK-X64-NEXT: 3 | struct B8 (base)
+// CHECK-X64-NEXT: 3 | char [5] c
+// CHECK-X64-NEXT: 16 | struct B5 (base) (empty)
+// CHECK-X64-NEXT: 8 | (F vbtable pointer)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 24 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct G : B8, B1, virtual B0 {
int a;
__declspec(align(16)) int a1;
- G() : a(0xf0000010), a1(0xf0000010) { printf("G = %p\n", this); }
+ G() : a(0x00000010), a1(0xf0000010) { printf("G = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct G
-// CHECK: 0 | struct B8 (base)
-// CHECK: 0 | char [5] c
-// CHECK: 21 | struct B1 (base) (empty)
-// CHECK: 8 | (G vbtable pointer)
-// CHECK: 24 | int a
-// CHECK: 32 | int a1
-// CHECK: 48 | struct B0 (virtual base) (empty)
-// CHECK: | [sizeof=48, align=16
-// CHECK: | nvsize=48, nvalign=16]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct G
-// CHECK-X64: 0 | struct B8 (base)
-// CHECK-X64: 0 | char [5] c
-// CHECK-X64: 16 | struct B1 (base) (empty)
-// CHECK-X64: 8 | (G vbtable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 32 | int a1
-// CHECK-X64: 48 | struct B0 (virtual base) (empty)
-// CHECK-X64: | [sizeof=48, align=16
-// CHECK-X64: | nvsize=48, nvalign=16]
+// CHECK-NEXT: 0 | struct G
+// CHECK-NEXT: 0 | struct B8 (base)
+// CHECK-NEXT: 0 | char [5] c
+// CHECK-NEXT: 21 | struct B1 (base) (empty)
+// CHECK-NEXT: 8 | (G vbtable pointer)
+// CHECK-NEXT: 24 | int a
+// CHECK-NEXT: 32 | int a1
+// CHECK-NEXT: 48 | struct B0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=48, align=16
+// CHECK-NEXT: | nvsize=48, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct G
+// CHECK-X64-NEXT: 0 | struct B8 (base)
+// CHECK-X64-NEXT: 0 | char [5] c
+// CHECK-X64-NEXT: 21 | struct B1 (base) (empty)
+// CHECK-X64-NEXT: 8 | (G vbtable pointer)
+// CHECK-X64-NEXT: 24 | int a
+// CHECK-X64-NEXT: 32 | int a1
+// CHECK-X64-NEXT: 48 | struct B0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=48, align=16
+// CHECK-X64-NEXT: | nvsize=48, nvalign=16]
struct AX : B1X, B2X, B3X, B4X, virtual B0X {
int a;
- AX() : a(0xf000000A) { printf(" A = %p\n", this); }
+ AX() : a(0x0000000A) { printf(" A = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct AX
-// CHECK: 0 | struct B1X (base) (empty)
-// CHECK: 16 | struct B2X (base) (empty)
-// CHECK: 18 | struct B3X (base) (empty)
-// CHECK: 35 | struct B4X (base) (empty)
-// CHECK: 20 | (AX vbtable pointer)
-// CHECK: 36 | int a
-// CHECK: 48 | struct B0X (virtual base) (empty)
-// CHECK: | [sizeof=48, align=16
-// CHECK: | nvsize=48, nvalign=16]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct AX
-// CHECK-X64: 0 | struct B1X (base) (empty)
-// CHECK-X64: 16 | struct B2X (base) (empty)
-// CHECK-X64: 18 | struct B3X (base) (empty)
-// CHECK-X64: 33 | struct B4X (base) (empty)
-// CHECK-X64: 24 | (AX vbtable pointer)
-// CHECK-X64: 36 | int a
-// CHECK-X64: 48 | struct B0X (virtual base) (empty)
-// CHECK-X64: | [sizeof=48, align=16
-// CHECK-X64: | nvsize=48, nvalign=16]
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct AX
+// CHECK-NEXT: 0 | struct B1X (base) (empty)
+// CHECK-NEXT: 16 | struct B2X (base) (empty)
+// CHECK-NEXT: 18 | struct B3X (base) (empty)
+// CHECK-NEXT: 35 | struct B4X (base) (empty)
+// CHECK-NEXT: 20 | (AX vbtable pointer)
+// CHECK-NEXT: 36 | int a
+// CHECK-NEXT: 48 | struct B0X (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=48, align=16
+// CHECK-NEXT: | nvsize=48, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct AX
+// CHECK-X64-NEXT: 0 | struct B1X (base) (empty)
+// CHECK-X64-NEXT: 16 | struct B2X (base) (empty)
+// CHECK-X64-NEXT: 18 | struct B3X (base) (empty)
+// CHECK-X64-NEXT: 35 | struct B4X (base) (empty)
+// CHECK-X64-NEXT: 24 | (AX vbtable pointer)
+// CHECK-X64-NEXT: 36 | int a
+// CHECK-X64-NEXT: 48 | struct B0X (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=48, align=16
+// CHECK-X64-NEXT: | nvsize=48, nvalign=16]
struct BX : B2X, B1X, B3X, B4X, virtual B0X {
int a;
- BX() : a(0xf000000B) { printf(" B = %p\n", this); }
+ BX() : a(0x0000000B) { printf(" B = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct BX
-// CHECK: 0 | struct B2X (base) (empty)
-// CHECK: 1 | struct B1X (base) (empty)
-// CHECK: 2 | struct B3X (base) (empty)
-// CHECK: 19 | struct B4X (base) (empty)
-// CHECK: 4 | (BX vbtable pointer)
-// CHECK: 20 | int a
-// CHECK: 32 | struct B0X (virtual base) (empty)
-// CHECK: | [sizeof=32, align=16
-// CHECK: | nvsize=32, nvalign=16]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct BX
-// CHECK-X64: 0 | struct B2X (base) (empty)
-// CHECK-X64: 1 | struct B1X (base) (empty)
-// CHECK-X64: 2 | struct B3X (base) (empty)
-// CHECK-X64: 17 | struct B4X (base) (empty)
-// CHECK-X64: 8 | (BX vbtable pointer)
-// CHECK-X64: 20 | int a
-// CHECK-X64: 32 | struct B0X (virtual base) (empty)
-// CHECK-X64: | [sizeof=32, align=16
-// CHECK-X64: | nvsize=32, nvalign=16]
+// CHECK-NEXT: 0 | struct BX
+// CHECK-NEXT: 0 | struct B2X (base) (empty)
+// CHECK-NEXT: 1 | struct B1X (base) (empty)
+// CHECK-NEXT: 2 | struct B3X (base) (empty)
+// CHECK-NEXT: 19 | struct B4X (base) (empty)
+// CHECK-NEXT: 4 | (BX vbtable pointer)
+// CHECK-NEXT: 20 | int a
+// CHECK-NEXT: 32 | struct B0X (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=32, align=16
+// CHECK-NEXT: | nvsize=32, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct BX
+// CHECK-X64-NEXT: 0 | struct B2X (base) (empty)
+// CHECK-X64-NEXT: 1 | struct B1X (base) (empty)
+// CHECK-X64-NEXT: 2 | struct B3X (base) (empty)
+// CHECK-X64-NEXT: 19 | struct B4X (base) (empty)
+// CHECK-X64-NEXT: 8 | (BX vbtable pointer)
+// CHECK-X64-NEXT: 20 | int a
+// CHECK-X64-NEXT: 32 | struct B0X (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=32, align=16
+// CHECK-X64-NEXT: | nvsize=32, nvalign=16]
struct CX : B1X, B3X, B2X, virtual B0X {
int a;
- CX() : a(0xf000000C) { printf(" C = %p\n", this); }
+ CX() : a(0x0000000C) { printf(" C = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct CX
-// CHECK: 0 | struct B1X (base) (empty)
-// CHECK: 2 | struct B3X (base) (empty)
-// CHECK: 32 | struct B2X (base) (empty)
-// CHECK: 4 | (CX vbtable pointer)
-// CHECK: 32 | int a
-// CHECK: 48 | struct B0X (virtual base) (empty)
-// CHECK: | [sizeof=48, align=16
-// CHECK: | nvsize=48, nvalign=16]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct CX
-// CHECK-X64: 0 | struct B1X (base) (empty)
-// CHECK-X64: 2 | struct B3X (base) (empty)
-// CHECK-X64: 32 | struct B2X (base) (empty)
-// CHECK-X64: 8 | (CX vbtable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: 48 | struct B0X (virtual base) (empty)
-// CHECK-X64: | [sizeof=48, align=16
-// CHECK-X64: | nvsize=48, nvalign=16]
+// CHECK-NEXT: 0 | struct CX
+// CHECK-NEXT: 0 | struct B1X (base) (empty)
+// CHECK-NEXT: 2 | struct B3X (base) (empty)
+// CHECK-NEXT: 32 | struct B2X (base) (empty)
+// CHECK-NEXT: 16 | (CX vbtable pointer)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: 48 | struct B0X (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=48, align=16
+// CHECK-NEXT: | nvsize=48, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct CX
+// CHECK-X64-NEXT: 0 | struct B1X (base) (empty)
+// CHECK-X64-NEXT: 2 | struct B3X (base) (empty)
+// CHECK-X64-NEXT: 32 | struct B2X (base) (empty)
+// CHECK-X64-NEXT: 16 | (CX vbtable pointer)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 48 | struct B0X (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=48, align=16
+// CHECK-X64-NEXT: | nvsize=48, nvalign=16]
struct DX : B8X, B1X, virtual B0X {
int a;
- DX() : a(0xf000000D) { printf(" D = %p\n", this); }
+ DX() : a(0x0000000D) { printf(" D = %p\n", this); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct DX
-// CHECK: 0 | struct B8X (base)
-// CHECK: 0 | short a
-// CHECK: 10 | struct B1X (base) (empty)
-// CHECK: 4 | (DX vbtable pointer)
-// CHECK: 12 | int a
-// CHECK: 16 | struct B0X (virtual base) (empty)
-// CHECK: | [sizeof=16, align=4
-// CHECK: | nvsize=16, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct DX
-// CHECK-X64: 0 | struct B8X (base)
-// CHECK-X64: 0 | short a
-// CHECK-X64: 18 | struct B1X (base) (empty)
-// CHECK-X64: 8 | (DX vbtable pointer)
-// CHECK-X64: 20 | int a
-// CHECK-X64: 24 | struct B0X (virtual base) (empty)
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct DX
+// CHECK-NEXT: 0 | struct B8X (base)
+// CHECK-NEXT: 0 | short a
+// CHECK-NEXT: 10 | struct B1X (base) (empty)
+// CHECK-NEXT: 4 | (DX vbtable pointer)
+// CHECK-NEXT: 12 | int a
+// CHECK-NEXT: 16 | struct B0X (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=16, align=4
+// CHECK-NEXT: | nvsize=16, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct DX
+// CHECK-X64-NEXT: 0 | struct B8X (base)
+// CHECK-X64-NEXT: 0 | short a
+// CHECK-X64-NEXT: 18 | struct B1X (base) (empty)
+// CHECK-X64-NEXT: 8 | (DX vbtable pointer)
+// CHECK-X64-NEXT: 20 | int a
+// CHECK-X64-NEXT: 24 | struct B0X (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
+
+
+struct C0 {};
+struct C1 : public C0 { int C1F0; };
+struct C2 : public C1, public C0 {};
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct C2
+// CHECK-NEXT: 0 | struct C1 (base)
+// CHECK-NEXT: 0 | struct C0 (base) (empty)
+// CHECK-NEXT: 0 | int C1F0
+// CHECK-NEXT: 5 | struct C0 (base) (empty)
+// CHECK-NEXT: | [sizeof=8, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct C2
+// CHECK-X64-NEXT: 0 | struct C1 (base)
+// CHECK-X64-NEXT: 0 | struct C0 (base) (empty)
+// CHECK-X64-NEXT: 0 | int C1F0
+// CHECK-X64-NEXT: 5 | struct C0 (base) (empty)
+// CHECK-X64-NEXT: | [sizeof=8, align=4
+// CHECK-X64-NEXT: | nvsize=8, nvalign=4]
+
+struct JA { char a; };
+struct JB {
+ char a;
+ virtual void f() {}
+};
+struct JC { char a; };
+struct JD : JA, JB, virtual JC {};
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct JD
+// CHECK-NEXT: 0 | struct JB (primary base)
+// CHECK-NEXT: 0 | (JB vftable pointer)
+// CHECK-NEXT: 4 | char a
+// CHECK-NEXT: 12 | struct JA (base)
+// CHECK-NEXT: 12 | char a
+// CHECK-NEXT: 8 | (JD vbtable pointer)
+// CHECK-NEXT: 16 | struct JC (virtual base)
+// CHECK-NEXT: 16 | char a
+// CHECK-NEXT: | [sizeof=17, align=4
+// CHECK-NEXT: | nvsize=16, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct JD
+// CHECK-X64-NEXT: 0 | struct JB (primary base)
+// CHECK-X64-NEXT: 0 | (JB vftable pointer)
+// CHECK-X64-NEXT: 8 | char a
+// CHECK-X64-NEXT: 24 | struct JA (base)
+// CHECK-X64-NEXT: 24 | char a
+// CHECK-X64-NEXT: 16 | (JD vbtable pointer)
+// CHECK-X64-NEXT: 32 | struct JC (virtual base)
+// CHECK-X64-NEXT: 32 | char a
+// CHECK-X64-NEXT: | [sizeof=40, align=8
+// CHECK-X64-NEXT: | nvsize=32, nvalign=8]
int a[
sizeof(AA)+
@@ -732,4 +831,7 @@ sizeof(G)+
sizeof(AX)+
sizeof(BX)+
sizeof(CX)+
-sizeof(DX)];
+sizeof(DX)+
+sizeof(C2)+
+sizeof(JD)+
+0];
diff --git a/test/Layout/ms-x86-member-pointers.cpp b/test/Layout/ms-x86-member-pointers.cpp
new file mode 100644
index 000000000000..89dd211a3515
--- /dev/null
+++ b/test/Layout/ms-x86-member-pointers.cpp
@@ -0,0 +1,80 @@
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fms-extensions -fsyntax-only %s 2>&1 | FileCheck %s
+
+struct __single_inheritance S;
+struct __multiple_inheritance M;
+struct __virtual_inheritance V;
+struct U;
+
+struct SD { char a; int S::*mp; };
+struct MD { char a; int M::*mp; };
+struct VD { char a; int V::*mp; };
+struct UD { char a; int U::*mp; };
+struct SF { char a; int (S::*mp)(); };
+struct MF { char a; int (M::*mp)(); };
+struct VF { char a; int (V::*mp)(); };
+struct UF { char a; int (U::*mp)(); };
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct SD
+// CHECK-NEXT: 0 | char a
+// CHECK-NEXT: 4 | int struct S::* mp
+// CHECK-NEXT: | [sizeof=8, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct MD
+// CHECK-NEXT: 0 | char a
+// CHECK-NEXT: 4 | int struct M::* mp
+// CHECK-NEXT: | [sizeof=8, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct VD
+// CHECK-NEXT: 0 | char a
+// CHECK-NEXT: 8 | int struct V::* mp
+// CHECK-NEXT: | [sizeof=16, align=8
+// CHECK-NEXT: | nvsize=16, nvalign=8]
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct UD
+// CHECK-NEXT: 0 | char a
+// CHECK-NEXT: 8 | int struct U::* mp
+// CHECK-NEXT: | [sizeof=24, align=8
+// CHECK-NEXT: | nvsize=24, nvalign=8]
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct SF
+// CHECK-NEXT: 0 | char a
+// CHECK-NEXT: 4 | int (struct S::*)(void) __attribute__((thiscall)) mp
+// CHECK-NEXT: | [sizeof=8, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct MF
+// CHECK-NEXT: 0 | char a
+// CHECK-NEXT: 8 | int (struct M::*)(void) __attribute__((thiscall)) mp
+// CHECK-NEXT: | [sizeof=16, align=8
+// CHECK-NEXT: | nvsize=16, nvalign=8]
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct VF
+// CHECK-NEXT: 0 | char a
+// CHECK-NEXT: 8 | int (struct V::*)(void) __attribute__((thiscall)) mp
+// CHECK-NEXT: | [sizeof=24, align=8
+// CHECK-NEXT: | nvsize=24, nvalign=8]
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct UF
+// CHECK-NEXT: 0 | char a
+// CHECK-NEXT: 8 | int (struct U::*)(void) __attribute__((thiscall)) mp
+// CHECK-NEXT: | [sizeof=24, align=8
+// CHECK-NEXT: | nvsize=24, nvalign=8]
+
+char a[sizeof(SD) +
+ sizeof(MD) +
+ sizeof(VD) +
+ sizeof(UD) +
+ sizeof(SF) +
+ sizeof(MF) +
+ sizeof(VF) +
+ sizeof(UF)];
diff --git a/test/Layout/ms-x86-misalignedarray.cpp b/test/Layout/ms-x86-misalignedarray.cpp
index f6887daf15b6..de5bcc7c35c2 100644
--- a/test/Layout/ms-x86-misalignedarray.cpp
+++ b/test/Layout/ms-x86-misalignedarray.cpp
@@ -1,23 +1,27 @@
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only -cxx-abi microsoft %s 2>&1 \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>&1 \
// RUN: | FileCheck %s
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only -cxx-abi microsoft %s 2>/dev/null \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
// RUN: | FileCheck %s -check-prefix CHECK-X64
-struct T0 { char c; };
-struct T2 : virtual T0 { };
-struct T3 { T2 a[1]; char c; };
+struct T0 { char c; };
+struct T2 : virtual T0 { };
+struct T3 { T2 a[1]; char c; };
-// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct T3
-// CHECK: 0 | struct T2 [1] a
-// CHECK: 5 | char c
-// CHECK: | [sizeof=8, align=4
-// CHECK: | nvsize=8, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct T3
-// CHECK-X64: 0 | struct T2 [1] a
-// CHECK-X64: 16 | char c
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct T3
+// CHECK-NEXT: 0 | struct T2 [1] a
+// CHECK-NEXT: 5 | char c
+// CHECK-NEXT: | [sizeof=8, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct T3
+// CHECK-X64-NEXT: 0 | struct T2 [1] a
+// CHECK-X64-NEXT: 16 | char c
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
int a[sizeof(T3)];
diff --git a/test/Layout/ms-x86-pack-and-align.cpp b/test/Layout/ms-x86-pack-and-align.cpp
new file mode 100644
index 000000000000..5e1aae1ca757
--- /dev/null
+++ b/test/Layout/ms-x86-pack-and-align.cpp
@@ -0,0 +1,683 @@
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>&1 \
+// RUN: | FileCheck %s
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
+// RUN: | FileCheck %s -check-prefix CHECK-X64
+
+extern "C" int printf(const char *fmt, ...);
+char buffer[419430400];
+
+struct A {
+ char a;
+ A() {
+ printf("A = %d\n", (int)((char*)this - buffer));
+ printf("A.a = %d\n", (int)((char*)&a - buffer));
+ }
+};
+
+struct B {
+ __declspec(align(4)) long long a;
+ B() {
+ printf("B = %d\n", (int)((char*)this - buffer));
+ printf("B.a = %d\n", (int)((char*)&a - buffer));
+ }
+};
+
+#pragma pack(push, 2)
+struct X {
+ B a;
+ char b;
+ int c;
+ X() {
+ printf("X = %d\n", (int)((char*)this - buffer));
+ printf("X.a = %d\n", (int)((char*)&a - buffer));
+ printf("X.b = %d\n", (int)((char*)&b - buffer));
+ printf("X.c = %d\n", (int)((char*)&c - buffer));
+ }
+};
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct X
+// CHECK-NEXT: 0 | struct B a
+// CHECK-NEXT: 0 | long long a
+// CHECK-NEXT: | [sizeof=8, align=8
+// CHECK-NEXT: | nvsize=8, nvalign=8]
+// CHECK-NEXT: 8 | char b
+// CHECK-NEXT: 10 | int c
+// CHECK-NEXT: | [sizeof=16, align=4
+// CHECK-NEXT: | nvsize=14, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct X
+// CHECK-X64-NEXT: 0 | struct B a
+// CHECK-X64-NEXT: 0 | long long a
+// CHECK-X64-NEXT: | [sizeof=8, align=8
+// CHECK-X64-NEXT: | nvsize=8, nvalign=8]
+// CHECK-X64-NEXT: 8 | char b
+// CHECK-X64-NEXT: 10 | int c
+// CHECK-X64-NEXT: | [sizeof=16, align=4
+// CHECK-X64-NEXT: | nvsize=14, nvalign=4]
+
+struct Y : A, B {
+ char a;
+ int b;
+ Y() {
+ printf("Y = %d\n", (int)((char*)this - buffer));
+ printf("Y.a = %d\n", (int)((char*)&a - buffer));
+ printf("Y.b = %d\n", (int)((char*)&b - buffer));
+ }
+};
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct Y
+// CHECK-NEXT: 0 | struct A (base)
+// CHECK-NEXT: 0 | char a
+// CHECK-NEXT: 4 | struct B (base)
+// CHECK-NEXT: 4 | long long a
+// CHECK-NEXT: 12 | char a
+// CHECK-NEXT: 14 | int b
+// CHECK-NEXT: | [sizeof=20, align=4
+// CHECK-NEXT: | nvsize=18, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct Y
+// CHECK-X64-NEXT: 0 | struct A (base)
+// CHECK-X64-NEXT: 0 | char a
+// CHECK-X64-NEXT: 4 | struct B (base)
+// CHECK-X64-NEXT: 4 | long long a
+// CHECK-X64-NEXT: 12 | char a
+// CHECK-X64-NEXT: 14 | int b
+// CHECK-X64-NEXT: | [sizeof=20, align=4
+// CHECK-X64-NEXT: | nvsize=18, nvalign=4]
+
+struct Z : virtual B {
+ char a;
+ int b;
+ Z() {
+ printf("Z = %d\n", (int)((char*)this - buffer));
+ printf("Z.a = %d\n", (int)((char*)&a - buffer));
+ printf("Z.b = %d\n", (int)((char*)&b - buffer));
+ }
+};
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct Z
+// CHECK-NEXT: 0 | (Z vbtable pointer)
+// CHECK-NEXT: 4 | char a
+// CHECK-NEXT: 6 | int b
+// CHECK-NEXT: 12 | struct B (virtual base)
+// CHECK-NEXT: 12 | long long a
+// CHECK-NEXT: | [sizeof=20, align=4
+// CHECK-NEXT: | nvsize=10, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct Z
+// CHECK-X64-NEXT: 0 | (Z vbtable pointer)
+// CHECK-X64-NEXT: 8 | char a
+// CHECK-X64-NEXT: 10 | int b
+// CHECK-X64-NEXT: 16 | struct B (virtual base)
+// CHECK-X64-NEXT: 16 | long long a
+// CHECK-X64-NEXT: | [sizeof=24, align=4
+// CHECK-X64-NEXT: | nvsize=14, nvalign=4]
+
+#pragma pack(pop)
+
+struct A1 { long long a; };
+#pragma pack(push, 1)
+struct B1 : virtual A1 { char a; };
+#pragma pack(pop)
+struct C1 : B1 {};
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct C1
+// CHECK-NEXT: 0 | struct B1 (base)
+// CHECK-NEXT: 0 | (B1 vbtable pointer)
+// CHECK-NEXT: 4 | char a
+// CHECK-NEXT: 8 | struct A1 (virtual base)
+// CHECK-NEXT: 8 | long long a
+// CHECK-NEXT: | [sizeof=16, align=8
+// CHECK-NEXT: | nvsize=5, nvalign=8]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct C1
+// CHECK-X64-NEXT: 0 | struct B1 (base)
+// CHECK-X64-NEXT: 0 | (B1 vbtable pointer)
+// CHECK-X64-NEXT: 8 | char a
+// CHECK-X64-NEXT: 16 | struct A1 (virtual base)
+// CHECK-X64-NEXT: 16 | long long a
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=9, nvalign=8]
+
+struct CA0 {
+ CA0() {}
+};
+struct CA1 : virtual CA0 {
+ CA1() {}
+};
+#pragma pack(push, 1)
+struct CA2 : public CA1, public CA0 {
+ virtual void CA2Method() {}
+ CA2() {}
+};
+#pragma pack(pop)
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct CA2
+// CHECK-NEXT: 0 | (CA2 vftable pointer)
+// CHECK-NEXT: 4 | struct CA1 (base)
+// CHECK-NEXT: 4 | (CA1 vbtable pointer)
+// CHECK-NEXT: 9 | struct CA0 (base) (empty)
+// CHECK-NEXT: 9 | struct CA0 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=9, align=1
+// CHECK-NEXT: | nvsize=9, nvalign=1]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct CA2
+// CHECK-X64-NEXT: 0 | (CA2 vftable pointer)
+// CHECK-X64-NEXT: 8 | struct CA1 (base)
+// CHECK-X64-NEXT: 8 | (CA1 vbtable pointer)
+// CHECK-X64-NEXT: 17 | struct CA0 (base) (empty)
+// CHECK-X64-NEXT: 17 | struct CA0 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=17, align=1
+// CHECK-X64-NEXT: | nvsize=17, nvalign=1]
+
+#pragma pack(16)
+struct YA {
+ __declspec(align(32)) char : 1;
+};
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct YA (empty)
+// CHECK-NEXT: 0 | char
+// CHECK-NEXT: | [sizeof=32, align=32
+// CHECK-NEXT: | nvsize=32, nvalign=32]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct YA (empty)
+// CHECK-X64-NEXT: 0 | char
+// CHECK-X64-NEXT: | [sizeof=32, align=32
+// CHECK-X64-NEXT: | nvsize=32, nvalign=32]
+
+#pragma pack(1)
+struct YB {
+ char a;
+ YA b;
+};
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct YB
+// CHECK-NEXT: 0 | char a
+// CHECK-NEXT: 1 | struct YA b (empty)
+// CHECK-NEXT: 1 | char
+// CHECK-NEXT: | [sizeof=32, align=32
+// CHECK-NEXT: | nvsize=32, nvalign=32]
+// CHECK-NEXT: | [sizeof=33, align=1
+// CHECK-NEXT: | nvsize=33, nvalign=1]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct YB
+// CHECK-X64-NEXT: 0 | char a
+// CHECK-X64-NEXT: 1 | struct YA b (empty)
+// CHECK-X64-NEXT: 1 | char
+// CHECK-X64-NEXT: | [sizeof=32, align=32
+// CHECK-X64-NEXT: | nvsize=32, nvalign=32]
+// CHECK-X64-NEXT: | [sizeof=33, align=1
+// CHECK-X64-NEXT: | nvsize=33, nvalign=1]
+
+#pragma pack(8)
+struct YC {
+ __declspec(align(32)) char : 1;
+};
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct YC (empty)
+// CHECK-NEXT: 0 | char
+// CHECK-NEXT: | [sizeof=32, align=32
+// CHECK-NEXT: | nvsize=32, nvalign=32]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct YC (empty)
+// CHECK-X64-NEXT: 0 | char
+// CHECK-X64-NEXT: | [sizeof=8, align=32
+// CHECK-X64-NEXT: | nvsize=8, nvalign=32]
+
+#pragma pack(1)
+struct YD {
+ char a;
+ YC b;
+};
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct YD
+// CHECK-NEXT: 0 | char a
+// CHECK-NEXT: 1 | struct YC b (empty)
+// CHECK-NEXT: 1 | char
+// CHECK-NEXT: | [sizeof=32, align=32
+// CHECK-NEXT: | nvsize=32, nvalign=32]
+// CHECK-NEXT: | [sizeof=33, align=1
+// CHECK-NEXT: | nvsize=33, nvalign=1]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct YD
+// CHECK-X64-NEXT: 0 | char a
+// CHECK-X64-NEXT: 1 | struct YC b (empty)
+// CHECK-X64-NEXT: 1 | char
+// CHECK-X64-NEXT: | [sizeof=8, align=32
+// CHECK-X64-NEXT: | nvsize=8, nvalign=32]
+// CHECK-X64-NEXT: | [sizeof=9, align=1
+// CHECK-X64-NEXT: | nvsize=9, nvalign=1]
+
+#pragma pack(4)
+struct YE {
+ __declspec(align(32)) char : 1;
+};
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct YE (empty)
+// CHECK-NEXT: 0 | char
+// CHECK-NEXT: | [sizeof=4, align=32
+// CHECK-NEXT: | nvsize=4, nvalign=32]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct YE (empty)
+// CHECK-X64-NEXT: 0 | char
+// CHECK-X64-NEXT: | [sizeof=4, align=32
+// CHECK-X64-NEXT: | nvsize=4, nvalign=32]
+
+#pragma pack(1)
+struct YF {
+ char a;
+ YE b;
+};
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct YF
+// CHECK-NEXT: 0 | char a
+// CHECK-NEXT: 1 | struct YE b (empty)
+// CHECK-NEXT: 1 | char
+// CHECK-NEXT: | [sizeof=4, align=32
+// CHECK-NEXT: | nvsize=4, nvalign=32]
+// CHECK-NEXT: | [sizeof=5, align=1
+// CHECK-NEXT: | nvsize=5, nvalign=1]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct YF
+// CHECK-X64-NEXT: 0 | char a
+// CHECK-X64-NEXT: 1 | struct YE b (empty)
+// CHECK-X64-NEXT: 1 | char
+// CHECK-X64-NEXT: | [sizeof=4, align=32
+// CHECK-X64-NEXT: | nvsize=4, nvalign=32]
+// CHECK-X64-NEXT: | [sizeof=5, align=1
+// CHECK-X64-NEXT: | nvsize=5, nvalign=1]
+
+#pragma pack(16)
+struct __declspec(align(16)) D0 { char a; };
+#pragma pack(1)
+struct D1 : public D0 { char a; };
+#pragma pack(16)
+struct D2 : D1 { char a; };
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct D2
+// CHECK-NEXT: 0 | struct D1 (base)
+// CHECK-NEXT: 0 | struct D0 (base)
+// CHECK-NEXT: 0 | char a
+// CHECK-NEXT: 1 | char a
+// CHECK-NEXT: 2 | char a
+// CHECK-NEXT: | [sizeof=16, align=16
+// CHECK-NEXT: | nvsize=16, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct D2
+// CHECK-X64-NEXT: 0 | struct D1 (base)
+// CHECK-X64-NEXT: 0 | struct D0 (base)
+// CHECK-X64-NEXT: 0 | char a
+// CHECK-X64-NEXT: 1 | char a
+// CHECK-X64-NEXT: 2 | char a
+// CHECK-X64-NEXT: | [sizeof=16, align=16
+// CHECK-X64-NEXT: | nvsize=16, nvalign=16]
+
+#pragma pack()
+struct JA { char a; };
+#pragma pack(1)
+struct JB { __declspec(align(4)) char a; };
+#pragma pack()
+struct JC : JB, JA { };
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct JC
+// CHECK-NEXT: 0 | struct JB (base)
+// CHECK-NEXT: 0 | char a
+// CHECK-NEXT: 1 | struct JA (base)
+// CHECK-NEXT: 1 | char a
+// CHECK-NEXT: | [sizeof=4, align=4
+// CHECK-NEXT: | nvsize=4, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct JC
+// CHECK-X64-NEXT: 0 | struct JB (base)
+// CHECK-X64-NEXT: 0 | char a
+// CHECK-X64-NEXT: 1 | struct JA (base)
+// CHECK-X64-NEXT: 1 | char a
+// CHECK-X64-NEXT: | [sizeof=4, align=4
+// CHECK-X64-NEXT: | nvsize=4, nvalign=4]
+
+#pragma pack()
+struct KA { char a; };
+#pragma pack(1)
+struct KB : KA { __declspec(align(2)) char a; };
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct KB
+// CHECK-NEXT: 0 | struct KA (base)
+// CHECK-NEXT: 0 | char a
+// CHECK-NEXT: 2 | char a
+// CHECK-NEXT: | [sizeof=4, align=2
+// CHECK-NEXT: | nvsize=3, nvalign=2]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct KB
+// CHECK-X64-NEXT: 0 | struct KA (base)
+// CHECK-X64-NEXT: 0 | char a
+// CHECK-X64-NEXT: 2 | char a
+// CHECK-X64-NEXT: | [sizeof=4, align=2
+// CHECK-X64-NEXT: | nvsize=3, nvalign=2]
+
+#pragma pack(1)
+struct L {
+ virtual void fun() {}
+ __declspec(align(256)) int Field;
+};
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct L
+// CHECK-NEXT: 0 | (L vftable pointer)
+// CHECK-NEXT: 256 | int Field
+// CHECK-NEXT: | [sizeof=512, align=256
+// CHECK-NEXT: | nvsize=260, nvalign=256]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct L
+// CHECK-X64-NEXT: 0 | (L vftable pointer)
+// CHECK-X64-NEXT: 256 | int Field
+// CHECK-X64-NEXT: | [sizeof=512, align=256
+// CHECK-X64-NEXT: | nvsize=260, nvalign=256]
+
+#pragma pack()
+struct MA {};
+#pragma pack(1)
+struct MB : virtual MA {
+ __declspec(align(256)) int Field;
+};
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct MB
+// CHECK-NEXT: 0 | (MB vbtable pointer)
+// CHECK-NEXT: 256 | int Field
+// CHECK-NEXT: 260 | struct MA (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=512, align=256
+// CHECK-NEXT: | nvsize=260, nvalign=256]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct MB
+// CHECK-X64-NEXT: 0 | (MB vbtable pointer)
+// CHECK-X64-NEXT: 256 | int Field
+// CHECK-X64-NEXT: 260 | struct MA (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=512, align=256
+// CHECK-X64-NEXT: | nvsize=260, nvalign=256]
+
+struct RA {};
+#pragma pack(1)
+struct __declspec(align(8)) RB0 {
+ __declspec(align(1024)) int b : 3;
+};
+
+struct __declspec(align(8)) RB1 {
+ __declspec(align(1024)) int b : 3;
+ virtual void f() {}
+};
+
+struct __declspec(align(8)) RB2 : virtual RA {
+ __declspec(align(1024)) int b : 3;
+};
+
+struct __declspec(align(8)) RB3 : virtual RA {
+ __declspec(align(1024)) int b : 3;
+ virtual void f() {}
+};
+
+struct RC {
+ char _;
+ __declspec(align(1024)) int c : 3;
+};
+struct RE {
+ char _;
+ RC c;
+};
+#pragma pack()
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct RB0
+// CHECK-NEXT: 0 | int b
+// CHECK-NEXT: | [sizeof=8, align=1024
+// CHECK-NEXT: | nvsize=4, nvalign=1024]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct RB1
+// CHECK-NEXT: 0 | (RB1 vftable pointer)
+// CHECK-NEXT: 1024 | int b
+// CHECK-NEXT: | [sizeof=1032, align=1024
+// CHECK-NEXT: | nvsize=1028, nvalign=1024]
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct RB2
+// CHECK-NEXT: 0 | (RB2 vbtable pointer)
+// CHECK-NEXT: 1024 | int b
+// CHECK-NEXT: 1028 | struct RA (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=1032, align=1024
+// CHECK-NEXT: | nvsize=1028, nvalign=1024]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct RB3
+// CHECK-NEXT: 0 | (RB3 vftable pointer)
+// CHECK-NEXT: 1024 | (RB3 vbtable pointer)
+// CHECK-NEXT: 2048 | int b
+// CHECK-NEXT: 2052 | struct RA (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=2056, align=1024
+// CHECK-NEXT: | nvsize=2052, nvalign=1024]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct RC
+// CHECK-NEXT: 0 | char _
+// CHECK-NEXT: 1024 | int c
+// CHECK-NEXT: | [sizeof=1028, align=1024
+// CHECK-NEXT: | nvsize=1028, nvalign=1024]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct RE
+// CHECK-NEXT: 0 | char _
+// CHECK-NEXT: 1 | struct RC c
+// CHECK-NEXT: 1 | char _
+// CHECK-NEXT: 1025 | int c
+// CHECK-NEXT: | [sizeof=1028, align=1024
+// CHECK-NEXT: | nvsize=1028, nvalign=1024]
+// CHECK-NEXT: | [sizeof=1029, align=1
+// CHECK-NEXT: | nvsize=1029, nvalign=1]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct RB0
+// CHECK-X64-NEXT: 0 | int b
+// CHECK-X64-NEXT: | [sizeof=8, align=1024
+// CHECK-X64-NEXT: | nvsize=4, nvalign=1024]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct RB1
+// CHECK-X64-NEXT: 0 | (RB1 vftable pointer)
+// CHECK-X64-NEXT: 1024 | int b
+// CHECK-X64-NEXT: | [sizeof=1032, align=1024
+// CHECK-X64-NEXT: | nvsize=1028, nvalign=1024]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct RB2
+// CHECK-X64-NEXT: 0 | (RB2 vbtable pointer)
+// CHECK-X64-NEXT: 1024 | int b
+// CHECK-X64-NEXT: 1028 | struct RA (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=1032, align=1024
+// CHECK-X64-NEXT: | nvsize=1028, nvalign=1024]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct RB3
+// CHECK-X64-NEXT: 0 | (RB3 vftable pointer)
+// CHECK-X64-NEXT: 1024 | (RB3 vbtable pointer)
+// CHECK-X64-NEXT: 2048 | int b
+// CHECK-X64-NEXT: 2052 | struct RA (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=2056, align=1024
+// CHECK-X64-NEXT: | nvsize=2052, nvalign=1024]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct RC
+// CHECK-X64-NEXT: 0 | char _
+// CHECK-X64-NEXT: 1024 | int c
+// CHECK-X64-NEXT: | [sizeof=1028, align=1024
+// CHECK-X64-NEXT: | nvsize=1028, nvalign=1024]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct RE
+// CHECK-X64-NEXT: 0 | char _
+// CHECK-X64-NEXT: 1 | struct RC c
+// CHECK-X64-NEXT: 1 | char _
+// CHECK-X64-NEXT: 1025 | int c
+// CHECK-X64-NEXT: | [sizeof=1028, align=1024
+// CHECK-X64-NEXT: | nvsize=1028, nvalign=1024]
+// CHECK-X64-NEXT: | [sizeof=1029, align=1
+// CHECK-X64-NEXT: | nvsize=1029, nvalign=1]
+
+struct NA {};
+struct NB {};
+#pragma pack(push, 1)
+struct NC : virtual NA, virtual NB {};
+#pragma pack(pop)
+struct ND : NC {};
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct NA (empty)
+// CHECK-NEXT: | [sizeof=1, align=1
+// CHECK-NEXT: | nvsize=0, nvalign=1]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct NB (empty)
+// CHECK-NEXT: | [sizeof=1, align=1
+// CHECK-NEXT: | nvsize=0, nvalign=1]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct NC
+// CHECK-NEXT: 0 | (NC vbtable pointer)
+// CHECK-NEXT: 4 | struct NA (virtual base) (empty)
+// CHECK-NEXT: 8 | struct NB (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=8, align=1
+// CHECK-NEXT: | nvsize=4, nvalign=1]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct ND
+// CHECK-NEXT: 0 | struct NC (base)
+// CHECK-NEXT: 0 | (NC vbtable pointer)
+// CHECK-NEXT: 4 | struct NA (virtual base) (empty)
+// CHECK-NEXT: 8 | struct NB (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=8, align=4
+// CHECK-NEXT: | nvsize=4, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct NA (empty)
+// CHECK-X64-NEXT: | [sizeof=1, align=1
+// CHECK-X64-NEXT: | nvsize=0, nvalign=1]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct NB (empty)
+// CHECK-X64-NEXT: | [sizeof=1, align=1
+// CHECK-X64-NEXT: | nvsize=0, nvalign=1]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct NC
+// CHECK-X64-NEXT: 0 | (NC vbtable pointer)
+// CHECK-X64-NEXT: 8 | struct NA (virtual base) (empty)
+// CHECK-X64-NEXT: 12 | struct NB (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=12, align=1
+// CHECK-X64-NEXT: | nvsize=8, nvalign=1]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct ND
+// CHECK-X64-NEXT: 0 | struct NC (base)
+// CHECK-X64-NEXT: 0 | (NC vbtable pointer)
+// CHECK-X64-NEXT: 8 | struct NA (virtual base) (empty)
+// CHECK-X64-NEXT: 12 | struct NB (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=12, align=4
+// CHECK-X64-NEXT: | nvsize=8, nvalign=4]
+
+struct OA {};
+struct OB {};
+struct OC : virtual OA, virtual OB {};
+#pragma pack(push, 1)
+struct OD : OC {};
+#pragma pack(pop)
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct OA (empty)
+// CHECK-NEXT: | [sizeof=1, align=1
+// CHECK-NEXT: | nvsize=0, nvalign=1]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct OB (empty)
+// CHECK-NEXT: | [sizeof=1, align=1
+// CHECK-NEXT: | nvsize=0, nvalign=1]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct OC
+// CHECK-NEXT: 0 | (OC vbtable pointer)
+// CHECK-NEXT: 4 | struct OA (virtual base) (empty)
+// CHECK-NEXT: 8 | struct OB (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=8, align=4
+// CHECK-NEXT: | nvsize=4, nvalign=4]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct OD
+// CHECK-NEXT: 0 | struct OC (base)
+// CHECK-NEXT: 0 | (OC vbtable pointer)
+// CHECK-NEXT: 4 | struct OA (virtual base) (empty)
+// CHECK-NEXT: 8 | struct OB (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=8, align=1
+// CHECK-NEXT: | nvsize=4, nvalign=1]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct OA (empty)
+// CHECK-X64-NEXT: | [sizeof=1, align=1
+// CHECK-X64-NEXT: | nvsize=0, nvalign=1]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct OB (empty)
+// CHECK-X64-NEXT: | [sizeof=1, align=1
+// CHECK-X64-NEXT: | nvsize=0, nvalign=1]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct OC
+// CHECK-X64-NEXT: 0 | (OC vbtable pointer)
+// CHECK-X64-NEXT: 8 | struct OA (virtual base) (empty)
+// CHECK-X64-NEXT: 12 | struct OB (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=16, align=8
+// CHECK-X64-NEXT: | nvsize=8, nvalign=8]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct OD
+// CHECK-X64-NEXT: 0 | struct OC (base)
+// CHECK-X64-NEXT: 0 | (OC vbtable pointer)
+// CHECK-X64-NEXT: 8 | struct OA (virtual base) (empty)
+// CHECK-X64-NEXT: 12 | struct OB (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=12, align=1
+// CHECK-X64-NEXT: | nvsize=8, nvalign=1]
+
+
+
+int a[
+sizeof(X)+
+sizeof(Y)+
+sizeof(Z)+
+sizeof(C1)+
+sizeof(CA2)+
+sizeof(YA)+
+sizeof(YB)+
+sizeof(YC)+
+sizeof(YD)+
+sizeof(YE)+
+sizeof(YF)+
+sizeof(YF)+
+sizeof(D2)+
+sizeof(JC)+
+sizeof(KB)+
+sizeof(L)+
+sizeof(MB)+
+sizeof(RB0)+
+sizeof(RB1)+
+sizeof(RB2)+
+sizeof(RB3)+
+sizeof(RC)+
+sizeof(RE)+
+sizeof(ND)+
+sizeof(OD)+
+0];
diff --git a/test/Layout/ms-x86-primary-bases.cpp b/test/Layout/ms-x86-primary-bases.cpp
index bc9b801d99c8..b5bd041fa116 100644
--- a/test/Layout/ms-x86-primary-bases.cpp
+++ b/test/Layout/ms-x86-primary-bases.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only -cxx-abi microsoft %s 2>/dev/null \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
// RUN: | FileCheck %s
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only -cxx-abi microsoft %s 2>/dev/null \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
// RUN: | FileCheck %s -check-prefix CHECK-X64
extern "C" int printf(const char *fmt, ...);
@@ -16,65 +16,67 @@ struct A : virtual B0 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct A
-// CHECK: 0 | (A vbtable pointer)
-// CHECK: 4 | struct B0 (virtual base)
-// CHECK: 4 | (B0 vftable pointer)
-// CHECK: 8 | int a
-// CHECK: | [sizeof=12, align=4
-// CHECK: | nvsize=4, nvalign=4]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct A
+// CHECK-NEXT: 0 | (A vbtable pointer)
+// CHECK-NEXT: 4 | struct B0 (virtual base)
+// CHECK-NEXT: 4 | (B0 vftable pointer)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: | [sizeof=12, align=4
+// CHECK-NEXT: | nvsize=4, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct A
-// CHECK-X64: 0 | (A vbtable pointer)
-// CHECK-X64: 8 | struct B0 (virtual base)
-// CHECK-X64: 8 | (B0 vftable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=8, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct A
+// CHECK-X64-NEXT: 0 | (A vbtable pointer)
+// CHECK-X64-NEXT: 8 | struct B0 (virtual base)
+// CHECK-X64-NEXT: 8 | (B0 vftable pointer)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=8, nvalign=8]
struct B : virtual B0 {
virtual void f() { printf("B"); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct B
-// CHECK: 0 | (B vbtable pointer)
-// CHECK: 4 | struct B0 (virtual base)
-// CHECK: 4 | (B0 vftable pointer)
-// CHECK: 8 | int a
-// CHECK: | [sizeof=12, align=4
-// CHECK: | nvsize=4, nvalign=4]
+// CHECK-NEXT: 0 | struct B
+// CHECK-NEXT: 0 | (B vbtable pointer)
+// CHECK-NEXT: 4 | struct B0 (virtual base)
+// CHECK-NEXT: 4 | (B0 vftable pointer)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: | [sizeof=12, align=4
+// CHECK-NEXT: | nvsize=4, nvalign=4]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct B
-// CHECK-X64: 0 | (B vbtable pointer)
-// CHECK-X64: 8 | struct B0 (virtual base)
-// CHECK-X64: 8 | (B0 vftable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=8, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct B
+// CHECK-X64-NEXT: 0 | (B vbtable pointer)
+// CHECK-X64-NEXT: 8 | struct B0 (virtual base)
+// CHECK-X64-NEXT: 8 | (B0 vftable pointer)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=8, nvalign=8]
struct C : virtual B0 {
virtual void g() { printf("A"); }
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct C
-// CHECK: 0 | (C vftable pointer)
-// CHECK: 4 | (C vbtable pointer)
-// CHECK: 8 | struct B0 (virtual base)
-// CHECK: 8 | (B0 vftable pointer)
-// CHECK: 12 | int a
-// CHECK: | [sizeof=16, align=4
-// CHECK: | nvsize=8, nvalign=4]
+// CHECK-NEXT: 0 | struct C
+// CHECK-NEXT: 0 | (C vftable pointer)
+// CHECK-NEXT: 4 | (C vbtable pointer)
+// CHECK-NEXT: 8 | struct B0 (virtual base)
+// CHECK-NEXT: 8 | (B0 vftable pointer)
+// CHECK-NEXT: 12 | int a
+// CHECK-NEXT: | [sizeof=16, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct C
-// CHECK-X64: 0 | (C vftable pointer)
-// CHECK-X64: 8 | (C vbtable pointer)
-// CHECK-X64: 16 | struct B0 (virtual base)
-// CHECK-X64: 16 | (B0 vftable pointer)
-// CHECK-X64: 24 | int a
-// CHECK-X64: | [sizeof=32, align=8
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct C
+// CHECK-X64-NEXT: 0 | (C vftable pointer)
+// CHECK-X64-NEXT: 8 | (C vbtable pointer)
+// CHECK-X64-NEXT: 16 | struct B0 (virtual base)
+// CHECK-X64-NEXT: 16 | (B0 vftable pointer)
+// CHECK-X64-NEXT: 24 | int a
+// CHECK-X64-NEXT: | [sizeof=32, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
struct D : virtual B2, virtual B0 {
virtual void f() { printf("D"); }
@@ -82,27 +84,29 @@ struct D : virtual B2, virtual B0 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct D
-// CHECK: 0 | (D vftable pointer)
-// CHECK: 4 | (D vbtable pointer)
-// CHECK: 8 | struct B2 (virtual base)
-// CHECK: 8 | int a
-// CHECK: 12 | struct B0 (virtual base)
-// CHECK: 12 | (B0 vftable pointer)
-// CHECK: 16 | int a
-// CHECK: | [sizeof=20, align=4
-// CHECK: | nvsize=8, nvalign=4]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct D
+// CHECK-NEXT: 0 | (D vftable pointer)
+// CHECK-NEXT: 4 | (D vbtable pointer)
+// CHECK-NEXT: 8 | struct B2 (virtual base)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: 12 | struct B0 (virtual base)
+// CHECK-NEXT: 12 | (B0 vftable pointer)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: | [sizeof=20, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct D
-// CHECK-X64: 0 | (D vftable pointer)
-// CHECK-X64: 8 | (D vbtable pointer)
-// CHECK-X64: 16 | struct B2 (virtual base)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 24 | struct B0 (virtual base)
-// CHECK-X64: 24 | (B0 vftable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: | [sizeof=40, align=8
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct D
+// CHECK-X64-NEXT: 0 | (D vftable pointer)
+// CHECK-X64-NEXT: 8 | (D vbtable pointer)
+// CHECK-X64-NEXT: 16 | struct B2 (virtual base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 24 | struct B0 (virtual base)
+// CHECK-X64-NEXT: 24 | (B0 vftable pointer)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: | [sizeof=40, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
struct E : B0, virtual B1 {
virtual void f() { printf("E"); }
@@ -110,197 +114,205 @@ struct E : B0, virtual B1 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct E
-// CHECK: 0 | struct B0 (primary base)
-// CHECK: 0 | (B0 vftable pointer)
-// CHECK: 4 | int a
-// CHECK: 8 | (E vbtable pointer)
-// CHECK: 12 | struct B1 (virtual base)
-// CHECK: 12 | (B1 vftable pointer)
-// CHECK: 16 | int a
-// CHECK: | [sizeof=20, align=4
-// CHECK: | nvsize=12, nvalign=4]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct E
+// CHECK-NEXT: 0 | struct B0 (primary base)
+// CHECK-NEXT: 0 | (B0 vftable pointer)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | (E vbtable pointer)
+// CHECK-NEXT: 12 | struct B1 (virtual base)
+// CHECK-NEXT: 12 | (B1 vftable pointer)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: | [sizeof=20, align=4
+// CHECK-NEXT: | nvsize=12, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct E
-// CHECK-X64: 0 | struct B0 (primary base)
-// CHECK-X64: 0 | (B0 vftable pointer)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | (E vbtable pointer)
-// CHECK-X64: 24 | struct B1 (virtual base)
-// CHECK-X64: 24 | (B1 vftable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: | [sizeof=40, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct E
+// CHECK-X64-NEXT: 0 | struct B0 (primary base)
+// CHECK-X64-NEXT: 0 | (B0 vftable pointer)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | (E vbtable pointer)
+// CHECK-X64-NEXT: 24 | struct B1 (virtual base)
+// CHECK-X64-NEXT: 24 | (B1 vftable pointer)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: | [sizeof=40, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct F : virtual B0, virtual B1 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct F
-// CHECK: 0 | (F vbtable pointer)
-// CHECK: 4 | struct B0 (virtual base)
-// CHECK: 4 | (B0 vftable pointer)
-// CHECK: 8 | int a
-// CHECK: 12 | struct B1 (virtual base)
-// CHECK: 12 | (B1 vftable pointer)
-// CHECK: 16 | int a
-// CHECK: | [sizeof=20, align=4
-// CHECK: | nvsize=4, nvalign=4]
+// CHECK-NEXT: 0 | struct F
+// CHECK-NEXT: 0 | (F vbtable pointer)
+// CHECK-NEXT: 4 | struct B0 (virtual base)
+// CHECK-NEXT: 4 | (B0 vftable pointer)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: 12 | struct B1 (virtual base)
+// CHECK-NEXT: 12 | (B1 vftable pointer)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: | [sizeof=20, align=4
+// CHECK-NEXT: | nvsize=4, nvalign=4]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct F
-// CHECK-X64: 0 | (F vbtable pointer)
-// CHECK-X64: 8 | struct B0 (virtual base)
-// CHECK-X64: 8 | (B0 vftable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 24 | struct B1 (virtual base)
-// CHECK-X64: 24 | (B1 vftable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: | [sizeof=40, align=8
-// CHECK-X64: | nvsize=8, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct F
+// CHECK-X64-NEXT: 0 | (F vbtable pointer)
+// CHECK-X64-NEXT: 8 | struct B0 (virtual base)
+// CHECK-X64-NEXT: 8 | (B0 vftable pointer)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 24 | struct B1 (virtual base)
+// CHECK-X64-NEXT: 24 | (B1 vftable pointer)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: | [sizeof=40, align=8
+// CHECK-X64-NEXT: | nvsize=8, nvalign=8]
struct AX : B0X, B1X { int a; AX() : a(0xf000000A) {} virtual void f() { printf("A"); } };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct AX
-// CHECK: 8 | struct B0X (base)
-// CHECK: 8 | int a
-// CHECK: 0 | struct B1X (primary base)
-// CHECK: 0 | (B1X vftable pointer)
-// CHECK: 4 | int a
-// CHECK: 12 | int a
-// CHECK: | [sizeof=16, align=4
-// CHECK: | nvsize=16, nvalign=4]
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct AX
+// CHECK-NEXT: 0 | struct B1X (primary base)
+// CHECK-NEXT: 0 | (B1X vftable pointer)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | struct B0X (base)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: 12 | int a
+// CHECK-NEXT: | [sizeof=16, align=4
+// CHECK-NEXT: | nvsize=16, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct AX
-// CHECK-X64: 16 | struct B0X (base)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 0 | struct B1X (primary base)
-// CHECK-X64: 0 | (B1X vftable pointer)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 20 | int a
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct AX
+// CHECK-X64-NEXT: 0 | struct B1X (primary base)
+// CHECK-X64-NEXT: 0 | (B1X vftable pointer)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | struct B0X (base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 20 | int a
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct BX : B0X, B1X { int a; BX() : a(0xf000000B) {} virtual void g() { printf("B"); } };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct BX
-// CHECK: 8 | struct B0X (base)
-// CHECK: 8 | int a
-// CHECK: 0 | struct B1X (primary base)
-// CHECK: 0 | (B1X vftable pointer)
-// CHECK: 4 | int a
-// CHECK: 12 | int a
-// CHECK: | [sizeof=16, align=4
-// CHECK: | nvsize=16, nvalign=4]
-// CHECK-x64: *** Dumping AST Record Layout
-// CHECK-x64: 0 | struct BX
-// CHECK-x64: 16 | struct B0X (base)
-// CHECK-x64: 16 | int a
-// CHECK-x64: 0 | struct B1X (primary base)
-// CHECK-x64: 0 | (B1X vftable pointer)
-// CHECK-x64: 8 | int a
-// CHECK-x64: 24 | int a
-// CHECK-x64: | [sizeof=24, align=8
-// CHECK-x64: | nvsize=24, nvalign=8]
+// CHECK-NEXT: 0 | struct BX
+// CHECK-NEXT: 0 | struct B1X (primary base)
+// CHECK-NEXT: 0 | (B1X vftable pointer)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | struct B0X (base)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: 12 | int a
+// CHECK-NEXT: | [sizeof=16, align=4
+// CHECK-NEXT: | nvsize=16, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct BX
+// CHECK-X64-NEXT: 0 | struct B1X (primary base)
+// CHECK-X64-NEXT: 0 | (B1X vftable pointer)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | struct B0X (base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 20 | int a
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct CX : B0X, B2X { int a; CX() : a(0xf000000C) {} virtual void g() { printf("C"); } };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct CX
-// CHECK: 0 | (CX vftable pointer)
-// CHECK: 4 | struct B0X (base)
-// CHECK: 4 | int a
-// CHECK: 8 | struct B2X (base)
-// CHECK: 8 | (B2X vbtable pointer)
-// CHECK: 12 | int a
-// CHECK: 16 | int a
-// CHECK: 20 | struct B1X (virtual base)
-// CHECK: 20 | (B1X vftable pointer)
-// CHECK: 24 | int a
-// CHECK: | [sizeof=28, align=4
-// CHECK: | nvsize=20, nvalign=4]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct CX
+// CHECK-NEXT: 0 | (CX vftable pointer)
+// CHECK-NEXT: 4 | struct B0X (base)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | struct B2X (base)
+// CHECK-NEXT: 8 | (B2X vbtable pointer)
+// CHECK-NEXT: 12 | int a
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 20 | struct B1X (virtual base)
+// CHECK-NEXT: 20 | (B1X vftable pointer)
+// CHECK-NEXT: 24 | int a
+// CHECK-NEXT: | [sizeof=28, align=4
+// CHECK-NEXT: | nvsize=20, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct CX
-// CHECK-X64: 0 | (CX vftable pointer)
-// CHECK-X64: 8 | struct B0X (base)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | struct B2X (base)
-// CHECK-X64: 16 | (B2X vbtable pointer)
-// CHECK-X64: 24 | int a
-// CHECK-X64: 32 | int a
-// CHECK-X64: 40 | struct B1X (virtual base)
-// CHECK-X64: 40 | (B1X vftable pointer)
-// CHECK-X64: 48 | int a
-// CHECK-X64: | [sizeof=56, align=8
-// CHECK-X64: | nvsize=40, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct CX
+// CHECK-X64-NEXT: 0 | (CX vftable pointer)
+// CHECK-X64-NEXT: 8 | struct B0X (base)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | struct B2X (base)
+// CHECK-X64-NEXT: 16 | (B2X vbtable pointer)
+// CHECK-X64-NEXT: 24 | int a
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 40 | struct B1X (virtual base)
+// CHECK-X64-NEXT: 40 | (B1X vftable pointer)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: | [sizeof=56, align=8
+// CHECK-X64-NEXT: | nvsize=40, nvalign=8]
struct DX : virtual B1X { int a; DX() : a(0xf000000D) {} virtual void f() { printf("D"); } };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct DX
-// CHECK: 0 | (DX vbtable pointer)
-// CHECK: 4 | int a
-// CHECK: 8 | (vtordisp for vbase B1X)
-// CHECK: 12 | struct B1X (virtual base)
-// CHECK: 12 | (B1X vftable pointer)
-// CHECK: 16 | int a
-// CHECK: | [sizeof=20, align=4
-// CHECK: | nvsize=8, nvalign=4]
+// CHECK-NEXT: 0 | struct DX
+// CHECK-NEXT: 0 | (DX vbtable pointer)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | (vtordisp for vbase B1X)
+// CHECK-NEXT: 12 | struct B1X (virtual base)
+// CHECK-NEXT: 12 | (B1X vftable pointer)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: | [sizeof=20, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct DX
-// CHECK-X64: 0 | (DX vbtable pointer)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 20 | (vtordisp for vbase B1X)
-// CHECK-X64: 24 | struct B1X (virtual base)
-// CHECK-X64: 24 | (B1X vftable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: | [sizeof=40, align=8
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct DX
+// CHECK-X64-NEXT: 0 | (DX vbtable pointer)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 20 | (vtordisp for vbase B1X)
+// CHECK-X64-NEXT: 24 | struct B1X (virtual base)
+// CHECK-X64-NEXT: 24 | (B1X vftable pointer)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: | [sizeof=40, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
struct EX : virtual B1X { int a; EX() : a(0xf000000E) {} virtual void g() { printf("E"); } };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct EX
-// CHECK: 0 | (EX vftable pointer)
-// CHECK: 4 | (EX vbtable pointer)
-// CHECK: 8 | int a
-// CHECK: 12 | struct B1X (virtual base)
-// CHECK: 12 | (B1X vftable pointer)
-// CHECK: 16 | int a
-// CHECK: | [sizeof=20, align=4
-// CHECK: | nvsize=12, nvalign=4]
+// CHECK-NEXT: 0 | struct EX
+// CHECK-NEXT: 0 | (EX vftable pointer)
+// CHECK-NEXT: 4 | (EX vbtable pointer)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: 12 | struct B1X (virtual base)
+// CHECK-NEXT: 12 | (B1X vftable pointer)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: | [sizeof=20, align=4
+// CHECK-NEXT: | nvsize=12, nvalign=4]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct EX
-// CHECK-X64: 0 | (EX vftable pointer)
-// CHECK-X64: 8 | (EX vbtable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 24 | struct B1X (virtual base)
-// CHECK-X64: 24 | (B1X vftable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: | [sizeof=40, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct EX
+// CHECK-X64-NEXT: 0 | (EX vftable pointer)
+// CHECK-X64-NEXT: 8 | (EX vbtable pointer)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 24 | struct B1X (virtual base)
+// CHECK-X64-NEXT: 24 | (B1X vftable pointer)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: | [sizeof=40, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct FX : virtual B1X { int a; FX() : a(0xf000000F) {} };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct FX
-// CHECK: 0 | (FX vbtable pointer)
-// CHECK: 4 | int a
-// CHECK: 8 | struct B1X (virtual base)
-// CHECK: 8 | (B1X vftable pointer)
-// CHECK: 12 | int a
-// CHECK: | [sizeof=16, align=4
-// CHECK: | nvsize=8, nvalign=4]
+// CHECK-NEXT: 0 | struct FX
+// CHECK-NEXT: 0 | (FX vbtable pointer)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | struct B1X (virtual base)
+// CHECK-NEXT: 8 | (B1X vftable pointer)
+// CHECK-NEXT: 12 | int a
+// CHECK-NEXT: | [sizeof=16, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct FX
-// CHECK-X64: 0 | (FX vbtable pointer)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | struct B1X (virtual base)
-// CHECK-X64: 16 | (B1X vftable pointer)
-// CHECK-X64: 24 | int a
-// CHECK-X64: | [sizeof=32, align=8
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct FX
+// CHECK-X64-NEXT: 0 | (FX vbtable pointer)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | struct B1X (virtual base)
+// CHECK-X64-NEXT: 16 | (B1X vftable pointer)
+// CHECK-X64-NEXT: 24 | int a
+// CHECK-X64-NEXT: | [sizeof=32, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
int a[
sizeof(A)+
diff --git a/test/Layout/ms-x86-size-alignment-fail.cpp b/test/Layout/ms-x86-size-alignment-fail.cpp
index f998ee12c8d1..7e975b0039e2 100644
--- a/test/Layout/ms-x86-size-alignment-fail.cpp
+++ b/test/Layout/ms-x86-size-alignment-fail.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -cxx-abi microsoft %s 2>/dev/null \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts %s 2>/dev/null \
// RUN: | FileCheck %s
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -cxx-abi microsoft %s 2>/dev/null \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts %s 2>/dev/null \
// RUN: | FileCheck %s -check-prefix CHECK-X64
extern "C" int printf(const char *fmt, ...);
@@ -11,108 +11,112 @@ struct __declspec(align(1)) B1 {};
struct A : virtual B0 {};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct A
-// CHECK: 0 | (A vbtable pointer)
-// CHECK: 4 | struct B0 (virtual base)
-// CHECK: 4 | char a
-// CHECK: | [sizeof=5, align=4
-// CHECK: | nvsize=4, nvalign=4]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct A
+// CHECK-NEXT: 0 | (A vbtable pointer)
+// CHECK-NEXT: 4 | struct B0 (virtual base)
+// CHECK-NEXT: 4 | char a
+// CHECK-NEXT: | [sizeof=5, align=4
+// CHECK-NEXT: | nvsize=4, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct A
-// CHECK-X64: 0 | (A vbtable pointer)
-// CHECK-X64: 8 | struct B0 (virtual base)
-// CHECK-X64: 8 | char a
-// CHECK-X64: | [sizeof=16, align=8
-// CHECK-X64: | nvsize=8, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct A
+// CHECK-X64-NEXT: 0 | (A vbtable pointer)
+// CHECK-X64-NEXT: 8 | struct B0 (virtual base)
+// CHECK-X64-NEXT: 8 | char a
+// CHECK-X64-NEXT: | [sizeof=16, align=8
+// CHECK-X64-NEXT: | nvsize=8, nvalign=8]
struct __declspec(align(1)) B : virtual B0 {};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct B
-// CHECK: 0 | (B vbtable pointer)
-// CHECK: 4 | struct B0 (virtual base)
-// CHECK: 4 | char a
-// CHECK: | [sizeof=8, align=4
-// CHECK: | nvsize=4, nvalign=4]
+// CHECK-NEXT: 0 | struct B
+// CHECK-NEXT: 0 | (B vbtable pointer)
+// CHECK-NEXT: 4 | struct B0 (virtual base)
+// CHECK-NEXT: 4 | char a
+// CHECK-NEXT: | [sizeof=8, align=4
+// CHECK-NEXT: | nvsize=4, nvalign=4]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct B
-// CHECK-X64: 0 | (B vbtable pointer)
-// CHECK-X64: 8 | struct B0 (virtual base)
-// CHECK-X64: 8 | char a
-// CHECK-X64: | [sizeof=16, align=8
-// CHECK-X64: | nvsize=8, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct B
+// CHECK-X64-NEXT: 0 | (B vbtable pointer)
+// CHECK-X64-NEXT: 8 | struct B0 (virtual base)
+// CHECK-X64-NEXT: 8 | char a
+// CHECK-X64-NEXT: | [sizeof=16, align=8
+// CHECK-X64-NEXT: | nvsize=8, nvalign=8]
struct C : virtual B0 { int a; C() : a(0xC) {} };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct C
-// CHECK: 0 | (C vbtable pointer)
-// CHECK: 4 | int a
-// CHECK: 8 | struct B0 (virtual base)
-// CHECK: 8 | char a
-// CHECK: | [sizeof=9, align=4
-// CHECK: | nvsize=8, nvalign=4]
+// CHECK-NEXT: 0 | struct C
+// CHECK-NEXT: 0 | (C vbtable pointer)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | struct B0 (virtual base)
+// CHECK-NEXT: 8 | char a
+// CHECK-NEXT: | [sizeof=9, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct C
-// CHECK-X64: 0 | (C vbtable pointer)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | struct B0 (virtual base)
-// CHECK-X64: 16 | char a
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct C
+// CHECK-X64-NEXT: 0 | (C vbtable pointer)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | struct B0 (virtual base)
+// CHECK-X64-NEXT: 16 | char a
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
struct D : virtual B0 { __declspec(align(1)) int a; D() : a(0xD) {} };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct D
-// CHECK: 0 | (D vbtable pointer)
-// CHECK: 4 | int a
-// CHECK: 8 | struct B0 (virtual base)
-// CHECK: 8 | char a
-// CHECK: | [sizeof=12, align=4
-// CHECK: | nvsize=8, nvalign=4]
+// CHECK-NEXT: 0 | struct D
+// CHECK-NEXT: 0 | (D vbtable pointer)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | struct B0 (virtual base)
+// CHECK-NEXT: 8 | char a
+// CHECK-NEXT: | [sizeof=12, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct D
-// CHECK-X64: 0 | (D vbtable pointer)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | struct B0 (virtual base)
-// CHECK-X64: 16 | char a
-// CHECK-X64: | [sizeof=24, align=8
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct D
+// CHECK-X64-NEXT: 0 | (D vbtable pointer)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | struct B0 (virtual base)
+// CHECK-X64-NEXT: 16 | char a
+// CHECK-X64-NEXT: | [sizeof=24, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
struct E : virtual B0, virtual B1 {};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct E
-// CHECK: 0 | (E vbtable pointer)
-// CHECK: 4 | struct B0 (virtual base)
-// CHECK: 4 | char a
-// CHECK: 5 | struct B1 (virtual base) (empty)
-// CHECK: | [sizeof=8, align=4
-// CHECK: | nvsize=4, nvalign=4]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct E
+// CHECK-NEXT: 0 | (E vbtable pointer)
+// CHECK-NEXT: 4 | struct B0 (virtual base)
+// CHECK-NEXT: 4 | char a
+// CHECK-NEXT: 5 | struct B1 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=8, align=4
+// CHECK-NEXT: | nvsize=4, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct E
-// CHECK-X64: 0 | (E vbtable pointer)
-// CHECK-X64: 8 | struct B0 (virtual base)
-// CHECK-X64: 8 | char a
-// CHECK-X64: 9 | struct B1 (virtual base) (empty)
-// CHECK-X64: | [sizeof=16, align=8
-// CHECK-X64: | nvsize=8, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct E
+// CHECK-X64-NEXT: 0 | (E vbtable pointer)
+// CHECK-X64-NEXT: 8 | struct B0 (virtual base)
+// CHECK-X64-NEXT: 8 | char a
+// CHECK-X64-NEXT: 9 | struct B1 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=16, align=8
+// CHECK-X64-NEXT: | nvsize=8, nvalign=8]
struct F { char a; virtual ~F(); };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct F
-// CHECK: 0 | (F vftable pointer)
-// CHECK: 4 | char a
-// CHECK: | [sizeof=8, align=4
-// CHECK: | nvsize=8, nvalign=4]
+// CHECK-NEXT: 0 | struct F
+// CHECK-NEXT: 0 | (F vftable pointer)
+// CHECK-NEXT: 4 | char a
+// CHECK-NEXT: | [sizeof=8, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct F
-// CHECK-X64: 0 | (F vftable pointer)
-// CHECK-X64: 8 | char a
-// CHECK-X64: | [sizeof=16, align=8
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct F
+// CHECK-X64-NEXT: 0 | (F vftable pointer)
+// CHECK-X64-NEXT: 8 | char a
+// CHECK-X64-NEXT: | [sizeof=16, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
int a[
sizeof(A)+
diff --git a/test/Layout/ms-x86-vfvb-alignment.cpp b/test/Layout/ms-x86-vfvb-alignment.cpp
index 8eea20959b0e..54f74ac16d10 100644
--- a/test/Layout/ms-x86-vfvb-alignment.cpp
+++ b/test/Layout/ms-x86-vfvb-alignment.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only -cxx-abi microsoft %s 2>&1 \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>&1 \
// RUN: | FileCheck %s
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only -cxx-abi microsoft %s 2>/dev/null \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
// RUN: | FileCheck %s -check-prefix CHECK-X64
extern "C" int printf(const char *fmt, ...);
@@ -16,349 +16,361 @@ struct B6 { int a; B6() : a(0xf00000B6) {} virtual void f() { printf("B6"); } };
struct A : B0, virtual B1 { __declspec(align(16)) int a; A() : a(0xf000000A) {} virtual void f() { printf("A"); } };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct A
-// CHECK: 0 | (A vftable pointer)
-// CHECK: 16 | struct B0 (base)
-// CHECK: 16 | int a
-// CHECK: 20 | (A vbtable pointer)
-// CHECK: 48 | int a
-// CHECK: 64 | struct B1 (virtual base)
-// CHECK: 64 | char a
-// CHECK: | [sizeof=80, align=16
-// CHECK: | nvsize=64, nvalign=16]
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct A
+// CHECK-NEXT: 0 | (A vftable pointer)
+// CHECK-NEXT: 16 | struct B0 (base)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 20 | (A vbtable pointer)
+// CHECK-NEXT: 48 | int a
+// CHECK-NEXT: 64 | struct B1 (virtual base)
+// CHECK-NEXT: 64 | char a
+// CHECK-NEXT: | [sizeof=80, align=16
+// CHECK-NEXT: | nvsize=64, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct A
-// CHECK-X64: 0 | (A vftable pointer)
-// CHECK-X64: 8 | struct B0 (base)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | (A vbtable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: 48 | struct B1 (virtual base)
-// CHECK-X64: 48 | char a
-// CHECK-X64: | [sizeof=64, align=16
-// CHECK-X64: | nvsize=48, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct A
+// CHECK-X64-NEXT: 0 | (A vftable pointer)
+// CHECK-X64-NEXT: 16 | struct B0 (base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 24 | (A vbtable pointer)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: 64 | struct B1 (virtual base)
+// CHECK-X64-NEXT: 64 | char a
+// CHECK-X64-NEXT: | [sizeof=80, align=16
+// CHECK-X64-NEXT: | nvsize=64, nvalign=16]
struct B : A, B2 { int a; B() : a(0xf000000B) {} virtual void f() { printf("B"); } };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct B
-// CHECK: 0 | struct A (primary base)
-// CHECK: 0 | (A vftable pointer)
-// CHECK: 16 | struct B0 (base)
-// CHECK: 16 | int a
-// CHECK: 20 | (A vbtable pointer)
-// CHECK: 48 | int a
-// CHECK: 64 | struct B2 (base)
-// CHECK: 64 | (B2 vbtable pointer)
-// CHECK: 68 | int a
-// CHECK: 72 | int a
-// CHECK: 80 | struct B1 (virtual base)
-// CHECK: 80 | char a
-// CHECK: | [sizeof=96, align=16
-// CHECK: | nvsize=80, nvalign=16]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct B
+// CHECK-NEXT: 0 | struct A (primary base)
+// CHECK-NEXT: 0 | (A vftable pointer)
+// CHECK-NEXT: 16 | struct B0 (base)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 20 | (A vbtable pointer)
+// CHECK-NEXT: 48 | int a
+// CHECK-NEXT: 64 | struct B2 (base)
+// CHECK-NEXT: 64 | (B2 vbtable pointer)
+// CHECK-NEXT: 68 | int a
+// CHECK-NEXT: 72 | int a
+// CHECK-NEXT: 80 | struct B1 (virtual base)
+// CHECK-NEXT: 80 | char a
+// CHECK-NEXT: | [sizeof=96, align=16
+// CHECK-NEXT: | nvsize=80, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct B
-// CHECK-X64: 0 | struct A (primary base)
-// CHECK-X64: 0 | (A vftable pointer)
-// CHECK-X64: 8 | struct B0 (base)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | (A vbtable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: 48 | struct B2 (base)
-// CHECK-X64: 48 | (B2 vbtable pointer)
-// CHECK-X64: 56 | int a
-// CHECK-X64: 64 | int a
-// CHECK-X64: 80 | struct B1 (virtual base)
-// CHECK-X64: 80 | char a
-// CHECK-X64: | [sizeof=96, align=16
-// CHECK-X64: | nvsize=80, nvalign=16]
+// CHECK-X64-NEXT: 0 | struct B
+// CHECK-X64-NEXT: 0 | struct A (primary base)
+// CHECK-X64-NEXT: 0 | (A vftable pointer)
+// CHECK-X64-NEXT: 16 | struct B0 (base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 24 | (A vbtable pointer)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: 64 | struct B2 (base)
+// CHECK-X64-NEXT: 64 | (B2 vbtable pointer)
+// CHECK-X64-NEXT: 72 | int a
+// CHECK-X64-NEXT: 80 | int a
+// CHECK-X64-NEXT: 96 | struct B1 (virtual base)
+// CHECK-X64-NEXT: 96 | char a
+// CHECK-X64-NEXT: | [sizeof=112, align=16
+// CHECK-X64-NEXT: | nvsize=96, nvalign=16]
struct C : B4 { int a; C() : a(0xf000000C) {} virtual void f() { printf("C"); } };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct C
-// CHECK: 0 | (C vftable pointer)
-// CHECK: 16 | struct B4 (base)
-// CHECK: 16 | (B4 vbtable pointer)
-// CHECK: 20 | int a
-// CHECK: 24 | int a
-// CHECK: 32 | struct B3 (virtual base)
-// CHECK: 32 | int a
-// CHECK: | [sizeof=48, align=16
-// CHECK: | nvsize=32, nvalign=16]
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct C
+// CHECK-NEXT: 0 | (C vftable pointer)
+// CHECK-NEXT: 16 | struct B4 (base)
+// CHECK-NEXT: 16 | (B4 vbtable pointer)
+// CHECK-NEXT: 20 | int a
+// CHECK-NEXT: 24 | int a
+// CHECK-NEXT: 32 | struct B3 (virtual base)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: | [sizeof=48, align=16
+// CHECK-NEXT: | nvsize=32, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct C
-// CHECK-X64: 0 | (C vftable pointer)
-// CHECK-X64: 16 | struct B4 (base)
-// CHECK-X64: 16 | (B4 vbtable pointer)
-// CHECK-X64: 24 | int a
-// CHECK-X64: 32 | int a
-// CHECK-X64: 48 | struct B3 (virtual base)
-// CHECK-X64: 48 | int a
-// CHECK-X64: | [sizeof=64, align=16
-// CHECK-X64: | nvsize=48, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct C
+// CHECK-X64-NEXT: 0 | (C vftable pointer)
+// CHECK-X64-NEXT: 16 | struct B4 (base)
+// CHECK-X64-NEXT: 16 | (B4 vbtable pointer)
+// CHECK-X64-NEXT: 24 | int a
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 48 | struct B3 (virtual base)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: | [sizeof=64, align=16
+// CHECK-X64-NEXT: | nvsize=48, nvalign=16]
struct D : C { int a; D() : a(0xf000000D) {} virtual void f() { printf("D"); } };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct D
-// CHECK: 0 | struct C (primary base)
-// CHECK: 0 | (C vftable pointer)
-// CHECK: 16 | struct B4 (base)
-// CHECK: 16 | (B4 vbtable pointer)
-// CHECK: 20 | int a
-// CHECK: 24 | int a
-// CHECK: 32 | int a
-// CHECK: 48 | struct B3 (virtual base)
-// CHECK: 48 | int a
-// CHECK: | [sizeof=64, align=16
-// CHECK: | nvsize=48, nvalign=16]
+// CHECK-NEXT: 0 | struct D
+// CHECK-NEXT: 0 | struct C (primary base)
+// CHECK-NEXT: 0 | (C vftable pointer)
+// CHECK-NEXT: 16 | struct B4 (base)
+// CHECK-NEXT: 16 | (B4 vbtable pointer)
+// CHECK-NEXT: 20 | int a
+// CHECK-NEXT: 24 | int a
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: 48 | struct B3 (virtual base)
+// CHECK-NEXT: 48 | int a
+// CHECK-NEXT: | [sizeof=64, align=16
+// CHECK-NEXT: | nvsize=48, nvalign=16]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct D
-// CHECK-X64: 0 | struct C (primary base)
-// CHECK-X64: 0 | (C vftable pointer)
-// CHECK-X64: 16 | struct B4 (base)
-// CHECK-X64: 16 | (B4 vbtable pointer)
-// CHECK-X64: 24 | int a
-// CHECK-X64: 32 | int a
-// CHECK-X64: 48 | int a
-// CHECK-X64: 64 | struct B3 (virtual base)
-// CHECK-X64: 64 | int a
-// CHECK-X64: | [sizeof=80, align=16
-// CHECK-X64: | nvsize=64, nvalign=16]
+// CHECK-X64-NEXT: 0 | struct D
+// CHECK-X64-NEXT: 0 | struct C (primary base)
+// CHECK-X64-NEXT: 0 | (C vftable pointer)
+// CHECK-X64-NEXT: 16 | struct B4 (base)
+// CHECK-X64-NEXT: 16 | (B4 vbtable pointer)
+// CHECK-X64-NEXT: 24 | int a
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: 64 | struct B3 (virtual base)
+// CHECK-X64-NEXT: 64 | int a
+// CHECK-X64-NEXT: | [sizeof=80, align=16
+// CHECK-X64-NEXT: | nvsize=64, nvalign=16]
struct E : virtual C { int a; E() : a(0xf000000E) {} virtual void f() { printf("E"); } };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct E
-// CHECK: 0 | (E vbtable pointer)
-// CHECK: 4 | int a
-// CHECK: 16 | struct B3 (virtual base)
-// CHECK: 16 | int a
-// CHECK: 44 | (vtordisp for vbase C)
-// CHECK: 48 | struct C (virtual base)
-// CHECK: 48 | (C vftable pointer)
-// CHECK: 64 | struct B4 (base)
-// CHECK: 64 | (B4 vbtable pointer)
-// CHECK: 68 | int a
-// CHECK: 72 | int a
-// CHECK: | [sizeof=80, align=16
-// CHECK: | nvsize=8, nvalign=4]
+// CHECK-NEXT: 0 | struct E
+// CHECK-NEXT: 0 | (E vbtable pointer)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 16 | struct B3 (virtual base)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 44 | (vtordisp for vbase C)
+// CHECK-NEXT: 48 | struct C (virtual base)
+// CHECK-NEXT: 48 | (C vftable pointer)
+// CHECK-NEXT: 64 | struct B4 (base)
+// CHECK-NEXT: 64 | (B4 vbtable pointer)
+// CHECK-NEXT: 68 | int a
+// CHECK-NEXT: 72 | int a
+// CHECK-NEXT: | [sizeof=80, align=16
+// CHECK-NEXT: | nvsize=8, nvalign=16]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct E
-// CHECK-X64: 0 | (E vbtable pointer)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | struct B3 (virtual base)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 44 | (vtordisp for vbase C)
-// CHECK-X64: 48 | struct C (virtual base)
-// CHECK-X64: 48 | (C vftable pointer)
-// CHECK-X64: 64 | struct B4 (base)
-// CHECK-X64: 64 | (B4 vbtable pointer)
-// CHECK-X64: 72 | int a
-// CHECK-X64: 80 | int a
-// CHECK-X64: | [sizeof=96, align=16
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct E
+// CHECK-X64-NEXT: 0 | (E vbtable pointer)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | struct B3 (virtual base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 44 | (vtordisp for vbase C)
+// CHECK-X64-NEXT: 48 | struct C (virtual base)
+// CHECK-X64-NEXT: 48 | (C vftable pointer)
+// CHECK-X64-NEXT: 64 | struct B4 (base)
+// CHECK-X64-NEXT: 64 | (B4 vbtable pointer)
+// CHECK-X64-NEXT: 72 | int a
+// CHECK-X64-NEXT: 80 | int a
+// CHECK-X64-NEXT: | [sizeof=96, align=16
+// CHECK-X64-NEXT: | nvsize=16, nvalign=16]
struct F : B3, virtual B0 { int a; F() : a(0xf000000F) {} virtual void f() { printf("F"); } };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct F
-// CHECK: 0 | (F vftable pointer)
-// CHECK: 16 | struct B3 (base)
-// CHECK: 16 | int a
-// CHECK: 32 | (F vbtable pointer)
-// CHECK: 48 | int a
-// CHECK: 64 | struct B0 (virtual base)
-// CHECK: 64 | int a
-// CHECK: | [sizeof=80, align=16
-// CHECK: | nvsize=64, nvalign=16]
+// CHECK-NEXT: 0 | struct F
+// CHECK-NEXT: 0 | (F vftable pointer)
+// CHECK-NEXT: 16 | struct B3 (base)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 32 | (F vbtable pointer)
+// CHECK-NEXT: 48 | int a
+// CHECK-NEXT: 64 | struct B0 (virtual base)
+// CHECK-NEXT: 64 | int a
+// CHECK-NEXT: | [sizeof=80, align=16
+// CHECK-NEXT: | nvsize=64, nvalign=16]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct F
-// CHECK-X64: 0 | (F vftable pointer)
-// CHECK-X64: 16 | struct B3 (base)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 32 | (F vbtable pointer)
-// CHECK-X64: 40 | int a
-// CHECK-X64: 48 | struct B0 (virtual base)
-// CHECK-X64: 48 | int a
-// CHECK-X64: | [sizeof=64, align=16
-// CHECK-X64: | nvsize=48, nvalign=16]
+// CHECK-X64-NEXT: 0 | struct F
+// CHECK-X64-NEXT: 0 | (F vftable pointer)
+// CHECK-X64-NEXT: 16 | struct B3 (base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 32 | (F vbtable pointer)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: 64 | struct B0 (virtual base)
+// CHECK-X64-NEXT: 64 | int a
+// CHECK-X64-NEXT: | [sizeof=80, align=16
+// CHECK-X64-NEXT: | nvsize=64, nvalign=16]
struct G : B2, B6, virtual B1 { int a; G() : a(0xf0000010) {} };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct G
-// CHECK: 8 | struct B2 (base)
-// CHECK: 8 | (B2 vbtable pointer)
-// CHECK: 12 | int a
-// CHECK: 0 | struct B6 (primary base)
-// CHECK: 0 | (B6 vftable pointer)
-// CHECK: 4 | int a
-// CHECK: 16 | int a
-// CHECK: 20 | struct B1 (virtual base)
-// CHECK: 20 | char a
-// CHECK: | [sizeof=21, align=4
-// CHECK: | nvsize=20, nvalign=4]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct G
+// CHECK-NEXT: 0 | struct B6 (primary base)
+// CHECK-NEXT: 0 | (B6 vftable pointer)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | struct B2 (base)
+// CHECK-NEXT: 8 | (B2 vbtable pointer)
+// CHECK-NEXT: 12 | int a
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 20 | struct B1 (virtual base)
+// CHECK-NEXT: 20 | char a
+// CHECK-NEXT: | [sizeof=21, align=4
+// CHECK-NEXT: | nvsize=20, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct G
-// CHECK-X64: 16 | struct B2 (base)
-// CHECK-X64: 16 | (B2 vbtable pointer)
-// CHECK-X64: 24 | int a
-// CHECK-X64: 0 | struct B6 (primary base)
-// CHECK-X64: 0 | (B6 vftable pointer)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 32 | int a
-// CHECK-X64: 40 | struct B1 (virtual base)
-// CHECK-X64: 40 | char a
-// CHECK-X64: | [sizeof=48, align=8
-// CHECK-X64: | nvsize=40, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct G
+// CHECK-X64-NEXT: 0 | struct B6 (primary base)
+// CHECK-X64-NEXT: 0 | (B6 vftable pointer)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | struct B2 (base)
+// CHECK-X64-NEXT: 16 | (B2 vbtable pointer)
+// CHECK-X64-NEXT: 24 | int a
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 40 | struct B1 (virtual base)
+// CHECK-X64-NEXT: 40 | char a
+// CHECK-X64-NEXT: | [sizeof=48, align=8
+// CHECK-X64-NEXT: | nvsize=40, nvalign=8]
struct H : B6, B2, virtual B1 { int a; H() : a(0xf0000011) {} };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct H
-// CHECK: 0 | struct B6 (primary base)
-// CHECK: 0 | (B6 vftable pointer)
-// CHECK: 4 | int a
-// CHECK: 8 | struct B2 (base)
-// CHECK: 8 | (B2 vbtable pointer)
-// CHECK: 12 | int a
-// CHECK: 16 | int a
-// CHECK: 20 | struct B1 (virtual base)
-// CHECK: 20 | char a
-// CHECK: | [sizeof=21, align=4
-// CHECK: | nvsize=20, nvalign=4]
+// CHECK-NEXT: 0 | struct H
+// CHECK-NEXT: 0 | struct B6 (primary base)
+// CHECK-NEXT: 0 | (B6 vftable pointer)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | struct B2 (base)
+// CHECK-NEXT: 8 | (B2 vbtable pointer)
+// CHECK-NEXT: 12 | int a
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 20 | struct B1 (virtual base)
+// CHECK-NEXT: 20 | char a
+// CHECK-NEXT: | [sizeof=21, align=4
+// CHECK-NEXT: | nvsize=20, nvalign=4]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct H
-// CHECK-X64: 0 | struct B6 (primary base)
-// CHECK-X64: 0 | (B6 vftable pointer)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | struct B2 (base)
-// CHECK-X64: 16 | (B2 vbtable pointer)
-// CHECK-X64: 24 | int a
-// CHECK-X64: 32 | int a
-// CHECK-X64: 40 | struct B1 (virtual base)
-// CHECK-X64: 40 | char a
-// CHECK-X64: | [sizeof=48, align=8
-// CHECK-X64: | nvsize=40, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct H
+// CHECK-X64-NEXT: 0 | struct B6 (primary base)
+// CHECK-X64-NEXT: 0 | (B6 vftable pointer)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | struct B2 (base)
+// CHECK-X64-NEXT: 16 | (B2 vbtable pointer)
+// CHECK-X64-NEXT: 24 | int a
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 40 | struct B1 (virtual base)
+// CHECK-X64-NEXT: 40 | char a
+// CHECK-X64-NEXT: | [sizeof=48, align=8
+// CHECK-X64-NEXT: | nvsize=40, nvalign=8]
struct I : B0, virtual B1 { int a; int a1; __declspec(align(16)) int a2; I() : a(0xf0000011), a1(0xf0000011), a2(0xf0000011) {} };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct I
-// CHECK: 0 | struct B0 (base)
-// CHECK: 0 | int a
-// CHECK: 4 | (I vbtable pointer)
-// CHECK: 20 | int a
-// CHECK: 24 | int a1
-// CHECK: 32 | int a2
-// CHECK: 48 | struct B1 (virtual base)
-// CHECK: 48 | char a
-// CHECK: | [sizeof=64, align=16
-// CHECK: | nvsize=48, nvalign=16]
+// CHECK-NEXT: 0 | struct I
+// CHECK-NEXT: 0 | struct B0 (base)
+// CHECK-NEXT: 0 | int a
+// CHECK-NEXT: 4 | (I vbtable pointer)
+// CHECK-NEXT: 20 | int a
+// CHECK-NEXT: 24 | int a1
+// CHECK-NEXT: 32 | int a2
+// CHECK-NEXT: 48 | struct B1 (virtual base)
+// CHECK-NEXT: 48 | char a
+// CHECK-NEXT: | [sizeof=64, align=16
+// CHECK-NEXT: | nvsize=48, nvalign=16]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct I
-// CHECK-X64: 0 | struct B0 (base)
-// CHECK-X64: 0 | int a
-// CHECK-X64: 8 | (I vbtable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 20 | int a1
-// CHECK-X64: 32 | int a2
-// CHECK-X64: 48 | struct B1 (virtual base)
-// CHECK-X64: 48 | char a
-// CHECK-X64: | [sizeof=64, align=16
-// CHECK-X64: | nvsize=48, nvalign=16]
+// CHECK-X64-NEXT: 0 | struct I
+// CHECK-X64-NEXT: 0 | struct B0 (base)
+// CHECK-X64-NEXT: 0 | int a
+// CHECK-X64-NEXT: 8 | (I vbtable pointer)
+// CHECK-X64-NEXT: 20 | int a
+// CHECK-X64-NEXT: 24 | int a1
+// CHECK-X64-NEXT: 32 | int a2
+// CHECK-X64-NEXT: 48 | struct B1 (virtual base)
+// CHECK-X64-NEXT: 48 | char a
+// CHECK-X64-NEXT: | [sizeof=64, align=16
+// CHECK-X64-NEXT: | nvsize=48, nvalign=16]
struct J : B0, B3, virtual B1 { int a; int a1; J() : a(0xf0000012), a1(0xf0000012) {} };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct J
-// CHECK: 0 | struct B0 (base)
-// CHECK: 0 | int a
-// CHECK: 16 | struct B3 (base)
-// CHECK: 16 | int a
-// CHECK: 32 | (J vbtable pointer)
-// CHECK: 48 | int a
-// CHECK: 52 | int a1
-// CHECK: 64 | struct B1 (virtual base)
-// CHECK: 64 | char a
-// CHECK: | [sizeof=80, align=16
-// CHECK: | nvsize=64, nvalign=16]
+// CHECK-NEXT: 0 | struct J
+// CHECK-NEXT: 0 | struct B0 (base)
+// CHECK-NEXT: 0 | int a
+// CHECK-NEXT: 16 | struct B3 (base)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 32 | (J vbtable pointer)
+// CHECK-NEXT: 48 | int a
+// CHECK-NEXT: 52 | int a1
+// CHECK-NEXT: 64 | struct B1 (virtual base)
+// CHECK-NEXT: 64 | char a
+// CHECK-NEXT: | [sizeof=80, align=16
+// CHECK-NEXT: | nvsize=64, nvalign=16]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct J
-// CHECK-X64: 0 | struct B0 (base)
-// CHECK-X64: 0 | int a
-// CHECK-X64: 16 | struct B3 (base)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 32 | (J vbtable pointer)
-// CHECK-X64: 40 | int a
-// CHECK-X64: 44 | int a1
-// CHECK-X64: 48 | struct B1 (virtual base)
-// CHECK-X64: 48 | char a
-// CHECK-X64: | [sizeof=64, align=16
-// CHECK-X64: | nvsize=48, nvalign=16]
+// CHECK-X64-NEXT: 0 | struct J
+// CHECK-X64-NEXT: 0 | struct B0 (base)
+// CHECK-X64-NEXT: 0 | int a
+// CHECK-X64-NEXT: 16 | struct B3 (base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 32 | (J vbtable pointer)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: 52 | int a1
+// CHECK-X64-NEXT: 64 | struct B1 (virtual base)
+// CHECK-X64-NEXT: 64 | char a
+// CHECK-X64-NEXT: | [sizeof=80, align=16
+// CHECK-X64-NEXT: | nvsize=64, nvalign=16]
struct K { int a; K() : a(0xf0000013) {} virtual void f() { printf("K"); } };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct K
-// CHECK: 0 | (K vftable pointer)
-// CHECK: 4 | int a
-// CHECK: | [sizeof=8, align=4
-// CHECK: | nvsize=8, nvalign=4]
+// CHECK-NEXT: 0 | struct K
+// CHECK-NEXT: 0 | (K vftable pointer)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: | [sizeof=8, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct K
-// CHECK-X64: 0 | (K vftable pointer)
-// CHECK-X64: 8 | int a
-// CHECK-X64: | [sizeof=16, align=8
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct K
+// CHECK-X64-NEXT: 0 | (K vftable pointer)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: | [sizeof=16, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
struct L : virtual K { int a; L() : a(0xf0000014) {} virtual void g() { printf("L"); } };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct L
-// CHECK: 0 | (L vftable pointer)
-// CHECK: 4 | (L vbtable pointer)
-// CHECK: 8 | int a
-// CHECK: 12 | struct K (virtual base)
-// CHECK: 12 | (K vftable pointer)
-// CHECK: 16 | int a
-// CHECK: | [sizeof=20, align=4
-// CHECK: | nvsize=12, nvalign=4]
+// CHECK-NEXT: 0 | struct L
+// CHECK-NEXT: 0 | (L vftable pointer)
+// CHECK-NEXT: 4 | (L vbtable pointer)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: 12 | struct K (virtual base)
+// CHECK-NEXT: 12 | (K vftable pointer)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: | [sizeof=20, align=4
+// CHECK-NEXT: | nvsize=12, nvalign=4]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct L
-// CHECK-X64: 0 | (L vftable pointer)
-// CHECK-X64: 8 | (L vbtable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 24 | struct K (virtual base)
-// CHECK-X64: 24 | (K vftable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: | [sizeof=40, align=8
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct L
+// CHECK-X64-NEXT: 0 | (L vftable pointer)
+// CHECK-X64-NEXT: 8 | (L vbtable pointer)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 24 | struct K (virtual base)
+// CHECK-X64-NEXT: 24 | (K vftable pointer)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: | [sizeof=40, align=8
+// CHECK-X64-NEXT: | nvsize=24, nvalign=8]
struct M : virtual K { int a; M() : a(0xf0000015) {} virtual void f() { printf("M"); } };
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct M
-// CHECK: 0 | (M vbtable pointer)
-// CHECK: 4 | int a
-// CHECK: 8 | (vtordisp for vbase K)
-// CHECK: 12 | struct K (virtual base)
-// CHECK: 12 | (K vftable pointer)
-// CHECK: 16 | int a
-// CHECK: | [sizeof=20, align=4
-// CHECK: | nvsize=8, nvalign=4]
+// CHECK-NEXT: 0 | struct M
+// CHECK-NEXT: 0 | (M vbtable pointer)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | (vtordisp for vbase K)
+// CHECK-NEXT: 12 | struct K (virtual base)
+// CHECK-NEXT: 12 | (K vftable pointer)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: | [sizeof=20, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct M
-// CHECK-X64: 0 | (M vbtable pointer)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 20 | (vtordisp for vbase K)
-// CHECK-X64: 24 | struct K (virtual base)
-// CHECK-X64: 24 | (K vftable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: | [sizeof=40, align=8
-// CHECK-X64: | nvsize=16, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct M
+// CHECK-X64-NEXT: 0 | (M vbtable pointer)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 20 | (vtordisp for vbase K)
+// CHECK-X64-NEXT: 24 | struct K (virtual base)
+// CHECK-X64-NEXT: 24 | (K vftable pointer)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: | [sizeof=40, align=8
+// CHECK-X64-NEXT: | nvsize=16, nvalign=8]
int a[
sizeof(A)+
diff --git a/test/Layout/ms-x86-vfvb-sharing.cpp b/test/Layout/ms-x86-vfvb-sharing.cpp
index 2b3d08e44c67..91f194f2a5e5 100644
--- a/test/Layout/ms-x86-vfvb-sharing.cpp
+++ b/test/Layout/ms-x86-vfvb-sharing.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only -cxx-abi microsoft %s 2>&1 \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>&1 \
// RUN: | FileCheck %s
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only -cxx-abi microsoft %s 2>/dev/null \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
// RUN: | FileCheck %s -check-prefix CHECK-X64
extern "C" int printf(const char *fmt, ...);
@@ -18,27 +18,31 @@ struct A : B0, virtual B1 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct A
-// CHECK: 0 | (A vftable pointer)
-// CHECK: 16 | struct B0 (base)
-// CHECK: 16 | int a
-// CHECK: 20 | (A vbtable pointer)
-// CHECK: 48 | int a
-// CHECK: 64 | struct B1 (virtual base)
-// CHECK: 64 | int a
-// CHECK: | [sizeof=80, align=16
-// CHECK: | nvsize=64, nvalign=16]
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct A
+// CHECK-NEXT: 0 | (A vftable pointer)
+// CHECK-NEXT: 16 | struct B0 (base)
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 20 | (A vbtable pointer)
+// CHECK-NEXT: 48 | int a
+// CHECK-NEXT: 64 | struct B1 (virtual base)
+// CHECK-NEXT: 64 | int a
+// CHECK-NEXT: | [sizeof=80, align=16
+// CHECK-NEXT: | nvsize=64, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct A
-// CHECK-X64: 0 | (A vftable pointer)
-// CHECK-X64: 8 | struct B0 (base)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | (A vbtable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: 48 | struct B1 (virtual base)
-// CHECK-X64: 48 | int a
-// CHECK-X64: | [sizeof=64, align=16
-// CHECK-X64: | nvsize=48, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct A
+// CHECK-X64-NEXT: 0 | (A vftable pointer)
+// CHECK-X64-NEXT: 16 | struct B0 (base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 24 | (A vbtable pointer)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: 64 | struct B1 (virtual base)
+// CHECK-X64-NEXT: 64 | int a
+// CHECK-X64-NEXT: | [sizeof=80, align=16
+// CHECK-X64-NEXT: | nvsize=64, nvalign=16]
struct B : B2, B0, virtual B1 {
__declspec(align(16)) int a;
@@ -47,29 +51,31 @@ struct B : B2, B0, virtual B1 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct B
-// CHECK: 0 | struct B2 (primary base)
-// CHECK: 0 | (B2 vftable pointer)
-// CHECK: 4 | struct B0 (base)
-// CHECK: 4 | int a
-// CHECK: 8 | (B vbtable pointer)
-// CHECK: 32 | int a
-// CHECK: 48 | struct B1 (virtual base)
-// CHECK: 48 | int a
-// CHECK: | [sizeof=64, align=16
-// CHECK: | nvsize=48, nvalign=16]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct B
+// CHECK-NEXT: 0 | struct B2 (primary base)
+// CHECK-NEXT: 0 | (B2 vftable pointer)
+// CHECK-NEXT: 4 | struct B0 (base)
+// CHECK-NEXT: 4 | int a
+// CHECK-NEXT: 8 | (B vbtable pointer)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: 48 | struct B1 (virtual base)
+// CHECK-NEXT: 48 | int a
+// CHECK-NEXT: | [sizeof=64, align=16
+// CHECK-NEXT: | nvsize=48, nvalign=16]
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct B
-// CHECK-X64: 0 | struct B2 (primary base)
-// CHECK-X64: 0 | (B2 vftable pointer)
-// CHECK-X64: 8 | struct B0 (base)
-// CHECK-X64: 8 | int a
-// CHECK-X64: 16 | (B vbtable pointer)
-// CHECK-X64: 32 | int a
-// CHECK-X64: 48 | struct B1 (virtual base)
-// CHECK-X64: 48 | int a
-// CHECK-X64: | [sizeof=64, align=16
-// CHECK-X64: | nvsize=48, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct B
+// CHECK-X64-NEXT: 0 | struct B2 (primary base)
+// CHECK-X64-NEXT: 0 | (B2 vftable pointer)
+// CHECK-X64-NEXT: 8 | struct B0 (base)
+// CHECK-X64-NEXT: 8 | int a
+// CHECK-X64-NEXT: 16 | (B vbtable pointer)
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 48 | struct B1 (virtual base)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: | [sizeof=64, align=16
+// CHECK-X64-NEXT: | nvsize=48, nvalign=16]
struct C : B3, B0, virtual B1 {
__declspec(align(16)) int a;
@@ -78,29 +84,31 @@ struct C : B3, B0, virtual B1 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct C
-// CHECK: 0 | (C vftable pointer)
-// CHECK: 16 | struct B3 (base)
-// CHECK: 16 | (B3 vbtable pointer)
-// CHECK: 20 | struct B0 (base)
-// CHECK: 20 | int a
-// CHECK: 32 | int a
-// CHECK: 48 | struct B1 (virtual base)
-// CHECK: 48 | int a
-// CHECK: | [sizeof=64, align=16
-// CHECK: | nvsize=48, nvalign=16]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct C
+// CHECK-NEXT: 0 | (C vftable pointer)
+// CHECK-NEXT: 16 | struct B3 (base)
+// CHECK-NEXT: 16 | (B3 vbtable pointer)
+// CHECK-NEXT: 20 | struct B0 (base)
+// CHECK-NEXT: 20 | int a
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: 48 | struct B1 (virtual base)
+// CHECK-NEXT: 48 | int a
+// CHECK-NEXT: | [sizeof=64, align=16
+// CHECK-NEXT: | nvsize=48, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct C
-// CHECK-X64: 0 | (C vftable pointer)
-// CHECK-X64: 8 | struct B3 (base)
-// CHECK-X64: 8 | (B3 vbtable pointer)
-// CHECK-X64: 16 | struct B0 (base)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 32 | int a
-// CHECK-X64: 48 | struct B1 (virtual base)
-// CHECK-X64: 48 | int a
-// CHECK-X64: | [sizeof=64, align=16
-// CHECK-X64: | nvsize=48, nvalign=16]
+// CHECK-X64-NEXT: 0 | struct C
+// CHECK-X64-NEXT: 0 | (C vftable pointer)
+// CHECK-X64-NEXT: 16 | struct B3 (base)
+// CHECK-X64-NEXT: 16 | (B3 vbtable pointer)
+// CHECK-X64-NEXT: 24 | struct B0 (base)
+// CHECK-X64-NEXT: 24 | int a
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 48 | struct B1 (virtual base)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: | [sizeof=64, align=16
+// CHECK-X64-NEXT: | nvsize=48, nvalign=16]
struct D : B4, B0, virtual B1 {
__declspec(align(16)) int a;
@@ -109,29 +117,31 @@ struct D : B4, B0, virtual B1 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct D
-// CHECK: 0 | struct B4 (primary base)
-// CHECK: 0 | (B4 vftable pointer)
-// CHECK: 4 | (B4 vbtable pointer)
-// CHECK: 8 | struct B0 (base)
-// CHECK: 8 | int a
-// CHECK: 16 | int a
-// CHECK: 32 | struct B1 (virtual base)
-// CHECK: 32 | int a
-// CHECK: | [sizeof=48, align=16
-// CHECK: | nvsize=32, nvalign=16]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct D
+// CHECK-NEXT: 0 | struct B4 (primary base)
+// CHECK-NEXT: 0 | (B4 vftable pointer)
+// CHECK-NEXT: 4 | (B4 vbtable pointer)
+// CHECK-NEXT: 8 | struct B0 (base)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: 16 | int a
+// CHECK-NEXT: 32 | struct B1 (virtual base)
+// CHECK-NEXT: 32 | int a
+// CHECK-NEXT: | [sizeof=48, align=16
+// CHECK-NEXT: | nvsize=32, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct D
-// CHECK-X64: 0 | struct B4 (primary base)
-// CHECK-X64: 0 | (B4 vftable pointer)
-// CHECK-X64: 8 | (B4 vbtable pointer)
-// CHECK-X64: 16 | struct B0 (base)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 32 | int a
-// CHECK-X64: 48 | struct B1 (virtual base)
-// CHECK-X64: 48 | int a
-// CHECK-X64: | [sizeof=64, align=16
-// CHECK-X64: | nvsize=48, nvalign=16]
+// CHECK-X64-NEXT: 0 | struct D
+// CHECK-X64-NEXT: 0 | struct B4 (primary base)
+// CHECK-X64-NEXT: 0 | (B4 vftable pointer)
+// CHECK-X64-NEXT: 8 | (B4 vbtable pointer)
+// CHECK-X64-NEXT: 16 | struct B0 (base)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 32 | int a
+// CHECK-X64-NEXT: 48 | struct B1 (virtual base)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: | [sizeof=64, align=16
+// CHECK-X64-NEXT: | nvsize=48, nvalign=16]
int a[
sizeof(A)+
diff --git a/test/Layout/ms-x86-vtordisp.cpp b/test/Layout/ms-x86-vtordisp.cpp
index b16f09ed704c..60779fb1975b 100644
--- a/test/Layout/ms-x86-vtordisp.cpp
+++ b/test/Layout/ms-x86-vtordisp.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only -cxx-abi microsoft %s 2>&1 \
+// RUN: %clang_cc1 -fno-rtti -fms-extensions -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>&1 \
// RUN: | FileCheck %s
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only -cxx-abi microsoft %s 2>/dev/null \
+// RUN: %clang_cc1 -fno-rtti -fms-extensions -emit-llvm-only -triple x86_64-pc-win32 -fdump-record-layouts -fsyntax-only %s 2>/dev/null \
// RUN: | FileCheck %s -check-prefix CHECK-X64
extern "C" int printf(const char *fmt, ...);
@@ -30,35 +30,39 @@ struct A : virtual B0, virtual B1 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct A
-// CHECK: 0 | (A vftable pointer)
-// CHECK: 4 | (A vbtable pointer)
-// CHECK: 8 | int a
-// CHECK: 16 | (vtordisp for vbase B0)
-// CHECK: 20 | struct B0 (virtual base)
-// CHECK: 20 | (B0 vftable pointer)
-// CHECK: 24 | int a
-// CHECK: 44 | (vtordisp for vbase B1)
-// CHECK: 48 | struct B1 (virtual base)
-// CHECK: 48 | (B1 vftable pointer)
-// CHECK: 52 | int a
-// CHECK: | [sizeof=64, align=16
-// CHECK: | nvsize=12, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct A
-// CHECK-X64: 0 | (A vftable pointer)
-// CHECK-X64: 8 | (A vbtable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 36 | (vtordisp for vbase B0)
-// CHECK-X64: 40 | struct B0 (virtual base)
-// CHECK-X64: 40 | (B0 vftable pointer)
-// CHECK-X64: 48 | int a
-// CHECK-X64: 76 | (vtordisp for vbase B1)
-// CHECK-X64: 80 | struct B1 (virtual base)
-// CHECK-X64: 80 | (B1 vftable pointer)
-// CHECK-X64: 88 | int a
-// CHECK-X64: | [sizeof=96, align=16
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct A
+// CHECK-NEXT: 0 | (A vftable pointer)
+// CHECK-NEXT: 4 | (A vbtable pointer)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: 16 | (vtordisp for vbase B0)
+// CHECK-NEXT: 20 | struct B0 (virtual base)
+// CHECK-NEXT: 20 | (B0 vftable pointer)
+// CHECK-NEXT: 24 | int a
+// CHECK-NEXT: 44 | (vtordisp for vbase B1)
+// CHECK-NEXT: 48 | struct B1 (virtual base)
+// CHECK-NEXT: 48 | (B1 vftable pointer)
+// CHECK-NEXT: 52 | int a
+// CHECK-NEXT: | [sizeof=64, align=16
+// CHECK-NEXT: | nvsize=12, nvalign=16]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct A
+// CHECK-X64-NEXT: 0 | (A vftable pointer)
+// CHECK-X64-NEXT: 8 | (A vbtable pointer)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 36 | (vtordisp for vbase B0)
+// CHECK-X64-NEXT: 40 | struct B0 (virtual base)
+// CHECK-X64-NEXT: 40 | (B0 vftable pointer)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: 76 | (vtordisp for vbase B1)
+// CHECK-X64-NEXT: 80 | struct B1 (virtual base)
+// CHECK-X64-NEXT: 80 | (B1 vftable pointer)
+// CHECK-X64-NEXT: 88 | int a
+// CHECK-X64-NEXT: | [sizeof=96, align=16
+// CHECK-X64-NEXT: | nvsize=24, nvalign=16]
struct C : virtual B0, virtual B1, VAlign32 {
int a;
@@ -68,39 +72,43 @@ struct C : virtual B0, virtual B1, VAlign32 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct C
-// CHECK: 0 | (C vftable pointer)
-// CHECK: 32 | struct VAlign32 (base)
-// CHECK: 32 | (VAlign32 vbtable pointer)
-// CHECK: 36 | int a
-// CHECK: 64 | (vtordisp for vbase B0)
-// CHECK: 68 | struct B0 (virtual base)
-// CHECK: 68 | (B0 vftable pointer)
-// CHECK: 72 | int a
-// CHECK: 108 | (vtordisp for vbase B1)
-// CHECK: 112 | struct B1 (virtual base)
-// CHECK: 112 | (B1 vftable pointer)
-// CHECK: 116 | int a
-// CHECK: 128 | struct Align32 (virtual base) (empty)
-// CHECK: | [sizeof=128, align=32
-// CHECK: | nvsize=64, nvalign=32]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct C
-// CHECK-X64: 0 | (C vftable pointer)
-// CHECK-X64: 32 | struct VAlign32 (base)
-// CHECK-X64: 32 | (VAlign32 vbtable pointer)
-// CHECK-X64: 40 | int a
-// CHECK-X64: 68 | (vtordisp for vbase B0)
-// CHECK-X64: 72 | struct B0 (virtual base)
-// CHECK-X64: 72 | (B0 vftable pointer)
-// CHECK-X64: 80 | int a
-// CHECK-X64: 108 | (vtordisp for vbase B1)
-// CHECK-X64: 112 | struct B1 (virtual base)
-// CHECK-X64: 112 | (B1 vftable pointer)
-// CHECK-X64: 120 | int a
-// CHECK-X64: 128 | struct Align32 (virtual base) (empty)
-// CHECK-X64: | [sizeof=128, align=32
-// CHECK-X64: | nvsize=64, nvalign=32]
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct C
+// CHECK-NEXT: 0 | (C vftable pointer)
+// CHECK-NEXT: 32 | struct VAlign32 (base)
+// CHECK-NEXT: 32 | (VAlign32 vbtable pointer)
+// CHECK-NEXT: 36 | int a
+// CHECK-NEXT: 64 | (vtordisp for vbase B0)
+// CHECK-NEXT: 68 | struct B0 (virtual base)
+// CHECK-NEXT: 68 | (B0 vftable pointer)
+// CHECK-NEXT: 72 | int a
+// CHECK-NEXT: 108 | (vtordisp for vbase B1)
+// CHECK-NEXT: 112 | struct B1 (virtual base)
+// CHECK-NEXT: 112 | (B1 vftable pointer)
+// CHECK-NEXT: 116 | int a
+// CHECK-NEXT: 128 | struct Align32 (virtual base) (empty)
+// CHECK-NEXT: | [sizeof=128, align=32
+// CHECK-NEXT: | nvsize=64, nvalign=32]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct C
+// CHECK-X64-NEXT: 0 | (C vftable pointer)
+// CHECK-X64-NEXT: 32 | struct VAlign32 (base)
+// CHECK-X64-NEXT: 32 | (VAlign32 vbtable pointer)
+// CHECK-X64-NEXT: 40 | int a
+// CHECK-X64-NEXT: 68 | (vtordisp for vbase B0)
+// CHECK-X64-NEXT: 72 | struct B0 (virtual base)
+// CHECK-X64-NEXT: 72 | (B0 vftable pointer)
+// CHECK-X64-NEXT: 80 | int a
+// CHECK-X64-NEXT: 108 | (vtordisp for vbase B1)
+// CHECK-X64-NEXT: 112 | struct B1 (virtual base)
+// CHECK-X64-NEXT: 112 | (B1 vftable pointer)
+// CHECK-X64-NEXT: 120 | int a
+// CHECK-X64-NEXT: 128 | struct Align32 (virtual base) (empty)
+// CHECK-X64-NEXT: | [sizeof=128, align=32
+// CHECK-X64-NEXT: | nvsize=64, nvalign=32]
struct __declspec(align(32)) D : virtual B0, virtual B1 {
int a;
@@ -110,35 +118,35 @@ struct __declspec(align(32)) D : virtual B0, virtual B1 {
};
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct D
-// CHECK: 0 | (D vftable pointer)
-// CHECK: 4 | (D vbtable pointer)
-// CHECK: 8 | int a
-// CHECK: 32 | (vtordisp for vbase B0)
-// CHECK: 36 | struct B0 (virtual base)
-// CHECK: 36 | (B0 vftable pointer)
-// CHECK: 40 | int a
-// CHECK: 76 | (vtordisp for vbase B1)
-// CHECK: 80 | struct B1 (virtual base)
-// CHECK: 80 | (B1 vftable pointer)
-// CHECK: 84 | int a
-// CHECK: | [sizeof=96, align=32
-// CHECK: | nvsize=12, nvalign=4]
-// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct D
-// CHECK-X64: 0 | (D vftable pointer)
-// CHECK-X64: 8 | (D vbtable pointer)
-// CHECK-X64: 16 | int a
-// CHECK-X64: 36 | (vtordisp for vbase B0)
-// CHECK-X64: 40 | struct B0 (virtual base)
-// CHECK-X64: 40 | (B0 vftable pointer)
-// CHECK-X64: 48 | int a
-// CHECK-X64: 76 | (vtordisp for vbase B1)
-// CHECK-X64: 80 | struct B1 (virtual base)
-// CHECK-X64: 80 | (B1 vftable pointer)
-// CHECK-X64: 88 | int a
-// CHECK-X64: | [sizeof=96, align=32
-// CHECK-X64: | nvsize=24, nvalign=8]
+// CHECK-NEXT: 0 | struct D
+// CHECK-NEXT: 0 | (D vftable pointer)
+// CHECK-NEXT: 4 | (D vbtable pointer)
+// CHECK-NEXT: 8 | int a
+// CHECK-NEXT: 32 | (vtordisp for vbase B0)
+// CHECK-NEXT: 36 | struct B0 (virtual base)
+// CHECK-NEXT: 36 | (B0 vftable pointer)
+// CHECK-NEXT: 40 | int a
+// CHECK-NEXT: 76 | (vtordisp for vbase B1)
+// CHECK-NEXT: 80 | struct B1 (virtual base)
+// CHECK-NEXT: 80 | (B1 vftable pointer)
+// CHECK-NEXT: 84 | int a
+// CHECK-NEXT: | [sizeof=96, align=32
+// CHECK-NEXT: | nvsize=12, nvalign=32]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct D
+// CHECK-X64-NEXT: 0 | (D vftable pointer)
+// CHECK-X64-NEXT: 8 | (D vbtable pointer)
+// CHECK-X64-NEXT: 16 | int a
+// CHECK-X64-NEXT: 36 | (vtordisp for vbase B0)
+// CHECK-X64-NEXT: 40 | struct B0 (virtual base)
+// CHECK-X64-NEXT: 40 | (B0 vftable pointer)
+// CHECK-X64-NEXT: 48 | int a
+// CHECK-X64-NEXT: 76 | (vtordisp for vbase B1)
+// CHECK-X64-NEXT: 80 | struct B1 (virtual base)
+// CHECK-X64-NEXT: 80 | (B1 vftable pointer)
+// CHECK-X64-NEXT: 88 | int a
+// CHECK-X64-NEXT: | [sizeof=96, align=32
+// CHECK-X64-NEXT: | nvsize=24, nvalign=32]
struct AT {
virtual ~AT(){}
@@ -149,22 +157,275 @@ struct CT : virtual AT {
CT::~CT(){}
// CHECK: *** Dumping AST Record Layout
-// CHECK: 0 | struct CT
-// CHECK: 0 | (CT vbtable pointer)
-// CHECK: 4 | struct AT (virtual base)
-// CHECK: 4 | (AT vftable pointer)
-// CHECK: | [sizeof=8, align=4
-// CHECK: | nvsize=4, nvalign=4]
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct CT
+// CHECK-NEXT: 0 | (CT vbtable pointer)
+// CHECK-NEXT: 4 | struct AT (virtual base)
+// CHECK-NEXT: 4 | (AT vftable pointer)
+// CHECK-NEXT: | [sizeof=8, align=4
+// CHECK-NEXT: | nvsize=4, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct CT
+// CHECK-X64-NEXT: 0 | (CT vbtable pointer)
+// CHECK-X64-NEXT: 8 | struct AT (virtual base)
+// CHECK-X64-NEXT: 8 | (AT vftable pointer)
+// CHECK-X64-NEXT: | [sizeof=16, align=8
+// CHECK-X64-NEXT: | nvsize=8, nvalign=8]
+
+struct XA {
+ XA() { printf("XA"); }
+ long long ll;
+};
+struct XB : XA {
+ XB() { printf("XB"); }
+ virtual void foo() {}
+ int b;
+};
+struct XC : virtual XB {
+ XC() { printf("XC"); }
+ virtual void foo() {}
+};
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct XC
+// CHECK-NEXT: 0 | (XC vbtable pointer)
+// CHECK-NEXT: 4 | (vtordisp for vbase XB)
+// CHECK-NEXT: 8 | struct XB (virtual base)
+// CHECK-NEXT: 8 | (XB vftable pointer)
+// CHECK-NEXT: 16 | struct XA (base)
+// CHECK-NEXT: 16 | long long ll
+// CHECK-NEXT: 24 | int b
+// CHECK-NEXT: | [sizeof=32, align=8
+// CHECK-NEXT: | nvsize=4, nvalign=8]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct XC
+// CHECK-X64-NEXT: 0 | (XC vbtable pointer)
+// CHECK-X64-NEXT: 12 | (vtordisp for vbase XB)
+// CHECK-X64-NEXT: 16 | struct XB (virtual base)
+// CHECK-X64-NEXT: 16 | (XB vftable pointer)
+// CHECK-X64-NEXT: 24 | struct XA (base)
+// CHECK-X64-NEXT: 24 | long long ll
+// CHECK-X64-NEXT: 32 | int b
+// CHECK-X64-NEXT: | [sizeof=40, align=8
+// CHECK-X64-NEXT: | nvsize=8, nvalign=8]
+
+namespace pragma_test1 {
+// No overrides means no vtordisps by default.
+struct A { virtual ~A(); virtual void foo(); int a; };
+struct B : virtual A { virtual ~B(); virtual void bar(); int b; };
+struct C : virtual B { int c; };
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct pragma_test1::C
+// CHECK-NEXT: 0 | (C vbtable pointer)
+// CHECK-NEXT: 4 | int c
+// CHECK-NEXT: 8 | struct pragma_test1::A (virtual base)
+// CHECK-NEXT: 8 | (A vftable pointer)
+// CHECK-NEXT: 12 | int a
+// CHECK-NEXT: 16 | struct pragma_test1::B (virtual base)
+// CHECK-NEXT: 16 | (B vftable pointer)
+// CHECK-NEXT: 20 | (B vbtable pointer)
+// CHECK-NEXT: 24 | int b
+// CHECK-NEXT: | [sizeof=28, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+}
+
+namespace pragma_test2 {
+struct A { virtual ~A(); virtual void foo(); int a; };
+#pragma vtordisp(push,2)
+struct B : virtual A { virtual ~B(); virtual void bar(); int b; };
+struct C : virtual B { int c; };
+#pragma vtordisp(pop)
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct pragma_test2::C
+// CHECK-NEXT: 0 | (C vbtable pointer)
+// CHECK-NEXT: 4 | int c
+// CHECK-NEXT: 8 | (vtordisp for vbase A)
+// CHECK-NEXT: 12 | struct pragma_test2::A (virtual base)
+// CHECK-NEXT: 12 | (A vftable pointer)
+// CHECK-NEXT: 16 | int a
+// By adding a virtual method and vftable to B, now we need a vtordisp.
+// CHECK-NEXT: 20 | (vtordisp for vbase B)
+// CHECK-NEXT: 24 | struct pragma_test2::B (virtual base)
+// CHECK-NEXT: 24 | (B vftable pointer)
+// CHECK-NEXT: 28 | (B vbtable pointer)
+// CHECK-NEXT: 32 | int b
+// CHECK-NEXT: | [sizeof=36, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+}
+
+namespace pragma_test3 {
+struct A { virtual ~A(); virtual void foo(); int a; };
+#pragma vtordisp(push,2)
+struct B : virtual A { virtual ~B(); virtual void foo(); int b; };
+struct C : virtual B { int c; };
+#pragma vtordisp(pop)
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct pragma_test3::C
+// CHECK-NEXT: 0 | (C vbtable pointer)
+// CHECK-NEXT: 4 | int c
+// CHECK-NEXT: 8 | (vtordisp for vbase A)
+// CHECK-NEXT: 12 | struct pragma_test3::A (virtual base)
+// CHECK-NEXT: 12 | (A vftable pointer)
+// CHECK-NEXT: 16 | int a
+// No vtordisp before B! It doesn't have its own vftable.
+// CHECK-NEXT: 20 | struct pragma_test3::B (virtual base)
+// CHECK-NEXT: 20 | (B vbtable pointer)
+// CHECK-NEXT: 24 | int b
+// CHECK-NEXT: | [sizeof=28, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+}
+
+namespace pragma_test4 {
+struct A {
+ A();
+ virtual void foo();
+ int a;
+};
+
+// Make sure the pragma applies to class template decls before they've been
+// instantiated.
+#pragma vtordisp(push,2)
+template <typename T>
+struct B : virtual A {
+ B();
+ virtual ~B();
+ virtual void bar();
+ T b;
+};
+#pragma vtordisp(pop)
+
+struct C : virtual B<int> { int c; };
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct pragma_test4::C
+// CHECK-NEXT: 0 | (C vbtable pointer)
+// CHECK-NEXT: 4 | int c
+// Pragma applies to B, which has vbase A.
+// CHECK-NEXT: 8 | (vtordisp for vbase A)
+// CHECK-NEXT: 12 | struct pragma_test4::A (virtual base)
+// CHECK-NEXT: 12 | (A vftable pointer)
+// CHECK-NEXT: 16 | int a
+// Pragma does not apply to C, and B doesn't usually need a vtordisp in C.
+// CHECK-NEXT: 20 | struct pragma_test4::B<int> (virtual base)
+// CHECK-NEXT: 20 | (B vftable pointer)
+// CHECK-NEXT: 24 | (B vbtable pointer)
+// CHECK-NEXT: 28 | int b
+// CHECK-NEXT: | [sizeof=32, align=4
+// CHECK-NEXT: | nvsize=8, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+}
+
+struct GA {
+ virtual void fun() {}
+};
+struct GB: public GA {};
+struct GC: public virtual GA {
+ virtual void fun() {}
+ GC() {}
+};
+struct GD: public virtual GC, public virtual GB {};
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct GD
+// CHECK-NEXT: 0 | (GD vbtable pointer)
+// CHECK-NEXT: 4 | (vtordisp for vbase GA)
+// CHECK-NEXT: 8 | struct GA (virtual base)
+// CHECK-NEXT: 8 | (GA vftable pointer)
+// CHECK-NEXT: 12 | struct GC (virtual base)
+// CHECK-NEXT: 12 | (GC vbtable pointer)
+// CHECK-NEXT: 16 | struct GB (virtual base)
+// CHECK-NEXT: 16 | struct GA (primary base)
+// CHECK-NEXT: 16 | (GA vftable pointer)
+// CHECK-NEXT: | [sizeof=20, align=4
+// CHECK-NEXT: | nvsize=4, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64-NEXT: 0 | struct GD
+// CHECK-X64-NEXT: 0 | (GD vbtable pointer)
+// CHECK-X64-NEXT: 12 | (vtordisp for vbase GA)
+// CHECK-X64-NEXT: 16 | struct GA (virtual base)
+// CHECK-X64-NEXT: 16 | (GA vftable pointer)
+// CHECK-X64-NEXT: 24 | struct GC (virtual base)
+// CHECK-X64-NEXT: 24 | (GC vbtable pointer)
+// CHECK-X64-NEXT: 32 | struct GB (virtual base)
+// CHECK-X64-NEXT: 32 | struct GA (primary base)
+// CHECK-X64-NEXT: 32 | (GA vftable pointer)
+// CHECK-X64-NEXT: | [sizeof=40, align=8
+// CHECK-X64-NEXT: | nvsize=8, nvalign=8]
+
+struct HA {
+ virtual void fun() {}
+};
+#pragma vtordisp(push, 2)
+struct HB : virtual HA {};
+#pragma vtordisp(pop)
+#pragma vtordisp(push, 0)
+struct HC : virtual HB {};
+#pragma vtordisp(pop)
+
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK: *** Dumping AST Record Layout
+// CHECK-NEXT: 0 | struct HC
+// CHECK-NEXT: 0 | (HC vbtable pointer)
+// CHECK-NEXT: 4 | (vtordisp for vbase HA)
+// CHECK-NEXT: 8 | struct HA (virtual base)
+// CHECK-NEXT: 8 | (HA vftable pointer)
+// CHECK-NEXT: 12 | struct HB (virtual base)
+// CHECK-NEXT: 12 | (HB vbtable pointer)
+// CHECK-NEXT: | [sizeof=16, align=4
+// CHECK-NEXT: | nvsize=4, nvalign=4]
+// CHECK-X64: *** Dumping AST Record Layout
+// CHECK-X64: *** Dumping AST Record Layout
// CHECK-X64: *** Dumping AST Record Layout
-// CHECK-X64: 0 | struct CT
-// CHECK-X64: 0 | (CT vbtable pointer)
-// CHECK-X64: 8 | struct AT (virtual base)
-// CHECK-X64: 8 | (AT vftable pointer)
-// CHECK-X64: | [sizeof=16, align=8
-// CHECK-X64: | nvsize=8, nvalign=8]
+// CHECK-X64-NEXT: 0 | struct HC
+// CHECK-X64-NEXT: 0 | (HC vbtable pointer)
+// CHECK-X64-NEXT: 12 | (vtordisp for vbase HA)
+// CHECK-X64-NEXT: 16 | struct HA (virtual base)
+// CHECK-X64-NEXT: 16 | (HA vftable pointer)
+// CHECK-X64-NEXT: 24 | struct HB (virtual base)
+// CHECK-X64-NEXT: 24 | (HB vbtable pointer)
+// CHECK-X64-NEXT: | [sizeof=32, align=8
+// CHECK-X64-NEXT: | nvsize=8, nvalign=8]
int a[
sizeof(A)+
sizeof(C)+
sizeof(D)+
-sizeof(CT)];
+sizeof(CT)+
+sizeof(XC)+
+sizeof(pragma_test1::C)+
+sizeof(pragma_test2::C)+
+sizeof(pragma_test3::C)+
+sizeof(pragma_test4::C)+
+sizeof(GD)+
+sizeof(HC)+
+0];
diff --git a/test/Lexer/Inputs/success.h b/test/Lexer/Inputs/success.h
new file mode 100644
index 000000000000..5fdf5aae7500
--- /dev/null
+++ b/test/Lexer/Inputs/success.h
@@ -0,0 +1 @@
+#error success
diff --git a/test/Lexer/bcpl-escaped-newline.c b/test/Lexer/bcpl-escaped-newline.c
index d87ee9b83aed..05d4773b87eb 100644
--- a/test/Lexer/bcpl-escaped-newline.c
+++ b/test/Lexer/bcpl-escaped-newline.c
@@ -11,3 +11,4 @@
// Trailing whitespace!
//\
#error quux
+// expected-warning@-2 {{backslash and newline separated by space}}
diff --git a/test/Lexer/clang-keywords.cpp b/test/Lexer/clang-keywords.cpp
deleted file mode 100644
index 3a24dce981a3..000000000000
--- a/test/Lexer/clang-keywords.cpp
+++ /dev/null
@@ -1,4 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
-// expected-no-diagnostics
-__char16_t c16;
-void f(__char32_t) { }
diff --git a/test/Lexer/cross-windows-on-linux-default.cpp b/test/Lexer/cross-windows-on-linux-default.cpp
new file mode 100644
index 000000000000..520b419a7100
--- /dev/null
+++ b/test/Lexer/cross-windows-on-linux-default.cpp
@@ -0,0 +1,6 @@
+// RUN: not %clang_cc1 -fsyntax-only -fms-compatibility -triple i686-win32 %s 2>&1 \
+// RUN: | FileCheck %s
+
+#include "Inputs\success.h"
+
+// CHECK: error: success
diff --git a/test/Lexer/cross-windows-on-linux.cpp b/test/Lexer/cross-windows-on-linux.cpp
new file mode 100644
index 000000000000..810e1d6ea966
--- /dev/null
+++ b/test/Lexer/cross-windows-on-linux.cpp
@@ -0,0 +1,15 @@
+// RUN: not %clang_cc1 -fsyntax-only -triple i686-win32 %s 2>&1 | FileCheck %s
+
+#include "Inputs\success.h"
+
+// CHECK: error: 'Inputs\success.h' file not found
+// CHECK: #include "Inputs\success.h"
+// CHECK: ^
+
+// expected to fail on windows as the inclusion would succeed and the
+// compilation will fail due to the '#error success'.
+// XFAIL: win32
+
+// This test may or may not fail since 'Inputs\success.h' is passed
+// to Win32 APIs on Windows.
+// REQUIRES: disabled
diff --git a/test/Lexer/cxx0x_keyword.cpp b/test/Lexer/cxx0x_keyword.cpp
deleted file mode 100644
index e6841ef7665d..000000000000
--- a/test/Lexer/cxx0x_keyword.cpp
+++ /dev/null
@@ -1,2 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s 2>&1
-int static_assert; /* expected-error {{expected unqualified-id}} */
diff --git a/test/Lexer/cxx1y_digit_separators.cpp b/test/Lexer/cxx1y_digit_separators.cpp
index 39ea3e7b8d74..c4c6aee963da 100644
--- a/test/Lexer/cxx1y_digit_separators.cpp
+++ b/test/Lexer/cxx1y_digit_separators.cpp
@@ -18,6 +18,8 @@ namespace integral {
int e = 0'b1010; // expected-error {{digit 'b' in octal constant}}
int f = 0b'1010; // expected-error {{invalid digit 'b' in octal}}
int g = 123'ms; // expected-error {{digit separator cannot appear at end of digit sequence}}
+ int h = 0x1e+1; // expected-error {{invalid suffix '+1' on integer constant}}
+ int i = 0x1'e+1; // ok, 'e+' is not recognized after a digit separator
int z = 0'123'_foo; //'; // expected-error {{cannot appear at end of digit seq}}
}
@@ -32,6 +34,20 @@ namespace floating {
float d = 1.0'e1; // expected-error {{digit separator cannot appear at end of digit sequence}}
float e = 1e'1; // expected-error {{digit separator cannot appear at start of digit sequence}}
float f = 1e1'ms; // expected-error {{digit separator cannot appear at end of digit sequence}}
+ float g = 0.'0; // expected-error {{digit separator cannot appear at start of digit sequence}}
+ float h = .'0; // '; // expected-error {{expected expression}}, lexed as . followed by character literal
+ float i = 0x.'0p0; // expected-error {{digit separator cannot appear at start of digit sequence}}
+ float j = 0x'0.0p0; // expected-error {{invalid suffix 'x'0.0p0'}}
+ float k = 0x0'.0p0; // '; // expected-error {{expected ';'}}
+ float l = 0x0.'0p0; // expected-error {{digit separator cannot appear at start of digit sequence}}
+ float m = 0x0.0'p0; // expected-error {{digit separator cannot appear at end of digit sequence}}
+ float n = 0x0.0p'0; // expected-error {{digit separator cannot appear at start of digit sequence}}
+ float o = 0x0.0p0'ms; // expected-error {{digit separator cannot appear at end of digit sequence}}
+ float p = 0'e1; // expected-error {{digit separator cannot appear at end of digit sequence}}
+ float q = 0'0e1;
+ float r = 0.'0e1; // expected-error {{digit separator cannot appear at start of digit sequence}}
+ float s = 0.0'e1; // expected-error {{digit separator cannot appear at end of digit sequence}}
+ float t = 0.0e'1; // expected-error {{digit separator cannot appear at start of digit sequence}}
}
#line 123'456
@@ -41,3 +57,23 @@ static_assert(__LINE__ == 123456, "");
#define M(x, ...) __VA_ARGS__
constexpr int x = { M(1'2,3'4) };
static_assert(x == 34, "");
+
+namespace UCNs {
+ // UCNs can appear before digit separators but not after.
+ int a = 0\u1234'5; // expected-error {{invalid suffix '\u1234'5' on integer constant}}
+ int b = 0'\u12345; // '; // expected-error {{expected ';'}}
+ constexpr int c {M(0\u1234'0,0'1)};
+ constexpr int d {M(00'\u1234,0'1)};
+ static_assert(c == 1, "");
+ static_assert(d == 0, "");
+}
+
+namespace UTF8 {
+ // extended characters can appear before digit separators but not after.
+ int a = 0ሴ'5; // expected-error {{invalid suffix 'ሴ'5' on integer constant}}
+ int b = 0'ሴ5; // '; // expected-error {{expected ';'}}
+ constexpr int c {M(0ሴ'0,0'1)};
+ constexpr int d {M(00'ሴ,0'1)};
+ static_assert(c == 1, "");
+ static_assert(d == 0, "");
+}
diff --git a/test/Lexer/cxx1z-trigraphs.cpp b/test/Lexer/cxx1z-trigraphs.cpp
new file mode 100644
index 000000000000..410626fd7bb8
--- /dev/null
+++ b/test/Lexer/cxx1z-trigraphs.cpp
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -std=c++1z %s -verify
+// RUN: %clang_cc1 -std=c++1z %s -trigraphs -fsyntax-only
+
+??= define foo ; // expected-error {{}} expected-warning {{trigraph ignored}}
+
+static_assert("??="[0] == '#', ""); // expected-error {{failed}} expected-warning {{trigraph ignored}}
+
+// ??/
+error here; // expected-error {{}}
diff --git a/test/Lexer/gnu_keywords.c b/test/Lexer/gnu_keywords.c
deleted file mode 100644
index 10a7d31d2038..000000000000
--- a/test/Lexer/gnu_keywords.c
+++ /dev/null
@@ -1,13 +0,0 @@
-// RUN: %clang_cc1 -DGNU_KEYWORDS -std=gnu89 -fsyntax-only -verify %s
-// RUN: %clang_cc1 -DGNU_KEYWORDS -std=c99 -fgnu-keywords -fsyntax-only -verify %s
-// RUN: %clang_cc1 -std=c99 -fsyntax-only -verify %s
-// RUN: %clang_cc1 -std=gnu89 -fno-gnu-keywords -fsyntax-only -verify %s
-// expected-no-diagnostics
-
-void f() {
-#ifdef GNU_KEYWORDS
- asm ("ret" : :);
-#else
- int asm;
-#endif
-}
diff --git a/test/Lexer/has_feature_cxx0x.cpp b/test/Lexer/has_feature_cxx0x.cpp
index b2fe842bd678..e558f8804b22 100644
--- a/test/Lexer/has_feature_cxx0x.cpp
+++ b/test/Lexer/has_feature_cxx0x.cpp
@@ -396,3 +396,23 @@ int no_init_captures();
// CHECK-1Y: has_init_captures
// CHECK-11: no_init_captures
// CHECK-NO-11: no_init_captures
+
+#if __has_feature(cxx_decltype_auto)
+int has_decltype_auto();
+#else
+int no_decltype_auto();
+#endif
+
+// CHECK-1Y: has_decltype_auto
+// CHECK-11: no_decltype_auto
+// CHECK-NO-11: no_decltype_auto
+
+#if __has_feature(cxx_generic_lambdas)
+int has_generic_lambdas();
+#else
+int no_generic_lambdas();
+#endif
+
+// CHECK-1Y: has_generic_lambdas
+// CHECK-11: no_generic_lambdas
+// CHECK-NO-11: no_generic_lambdas
diff --git a/test/Lexer/has_feature_exceptions.cpp b/test/Lexer/has_feature_exceptions.cpp
index bb5dc0c13362..242a01526462 100644
--- a/test/Lexer/has_feature_exceptions.cpp
+++ b/test/Lexer/has_feature_exceptions.cpp
@@ -1,4 +1,10 @@
-// RUN: %clang_cc1 -E -fexceptions %s -o - | FileCheck --check-prefix=CHECK-EXCEPTIONS %s
+// RUN: %clang -E -fexceptions %s -o - | FileCheck --check-prefix=CHECK-EXCEPTIONS %s
+// RUN: %clang -E -fexceptions -fno-cxx-exceptions %s -o - | FileCheck --check-prefix=CHECK-NO-EXCEPTIONS %s
+// RUN: %clang -E -fno-exceptions %s -o - | FileCheck --check-prefix=CHECK-NO-EXCEPTIONS %s
+
+// RUN: %clang_cc1 -E -fcxx-exceptions %s -o - | FileCheck --check-prefix=CHECK-EXCEPTIONS %s
+// RUN: %clang_cc1 -E -fobjc-exceptions %s -o - | FileCheck --check-prefix=CHECK-NO-EXCEPTIONS %s
+// RUN: %clang_cc1 -E -fexceptions %s -o - | FileCheck --check-prefix=CHECK-NO-EXCEPTIONS %s
// RUN: %clang_cc1 -E %s -o - | FileCheck --check-prefix=CHECK-NO-EXCEPTIONS %s
#if __has_feature(cxx_exceptions)
diff --git a/test/Lexer/has_feature_type_traits.cpp b/test/Lexer/has_feature_type_traits.cpp
index 0c2cfa56c4ad..f772d6d18452 100644
--- a/test/Lexer/has_feature_type_traits.cpp
+++ b/test/Lexer/has_feature_type_traits.cpp
@@ -55,6 +55,11 @@ int is_class();
#endif
// CHECK: int is_class();
+#if __has_feature(is_constructible)
+int is_constructible();
+#endif
+// CHECK: int is_constructible();
+
#if __has_feature(is_convertible_to)
int is_convertible_to();
#endif
diff --git a/test/Lexer/hexfloat.cpp b/test/Lexer/hexfloat.cpp
index 9bd8f830f030..bd53d4a89e56 100644
--- a/test/Lexer/hexfloat.cpp
+++ b/test/Lexer/hexfloat.cpp
@@ -12,4 +12,4 @@ double h = 0x1.p2; // expected-warning{{hexadecimal floating constants are a C99
double i = 0p+3; // expected-error{{invalid suffix 'p' on integer constant}}
#define PREFIX(x) foo ## x
double foo0p = 1, j = PREFIX(0p+3); // ok
-double k = 0x42_amp+3; // expected-error-re{{invalid suffix '_amp' on integer constant|no matching literal operator for call to 'operator "" _amp'}}
+double k = 0x42_amp+3; // expected-error-re{{{{invalid suffix '_amp' on integer constant|no matching literal operator for call to 'operator "" _amp'}}}}
diff --git a/test/Lexer/keywords_test.c b/test/Lexer/keywords_test.c
new file mode 100644
index 000000000000..4eb1700e9b60
--- /dev/null
+++ b/test/Lexer/keywords_test.c
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -std=c99 -E %s -o - | FileCheck --check-prefix=CHECK-NONE %s
+
+// RUN: %clang_cc1 -std=gnu89 -E %s -o - \
+// RUN: | FileCheck --check-prefix=CHECK-GNU-KEYWORDS %s
+// RUN: %clang_cc1 -std=c99 -fgnu-keywords -E %s -o - \
+// RUN: | FileCheck --check-prefix=CHECK-GNU-KEYWORDS %s
+// RUN: %clang_cc1 -std=gnu89 -fno-gnu-keywords -E %s -o - \
+// RUN: | FileCheck --check-prefix=CHECK-NONE %s
+
+// RUN: %clang_cc1 -std=c99 -fms-extensions -E %s -o - \
+// RUN: | FileCheck --check-prefix=CHECK-MS-KEYWORDS %s
+
+void f() {
+// CHECK-NONE: int asm
+// CHECK-GNU-KEYWORDS: asm ("ret" : :)
+#if __is_identifier(asm)
+ int asm;
+#else
+ asm ("ret" : :);
+#endif
+}
+
+// CHECK-NONE: no_ms_wchar
+// CHECK-MS-KEYWORDS: has_ms_wchar
+#if __is_identifier(__wchar_t)
+void no_ms_wchar();
+#else
+void has_ms_wchar();
+#endif
diff --git a/test/Lexer/keywords_test.cpp b/test/Lexer/keywords_test.cpp
new file mode 100644
index 000000000000..19a89c3d30f3
--- /dev/null
+++ b/test/Lexer/keywords_test.cpp
@@ -0,0 +1,34 @@
+// RUN: %clang_cc1 -std=c++03 -fsyntax-only %s
+// RUN: %clang_cc1 -std=c++11 -DCXX11 -fsyntax-only %s
+
+#define IS_KEYWORD(NAME) _Static_assert(!__is_identifier(NAME), #NAME)
+#define NOT_KEYWORD(NAME) _Static_assert(__is_identifier(NAME), #NAME)
+#define IS_TYPE(NAME) void is_##NAME##_type() { int f(NAME); }
+
+#ifdef CXX11
+#define CXX11_KEYWORD(NAME) IS_KEYWORD(NAME)
+#define CXX11_TYPE(NAME) IS_TYPE(NAME)
+#else
+#define CXX11_KEYWORD(NAME) NOT_KEYWORD(NAME)
+#define CXX11_TYPE(NAME)
+#endif
+
+// C++11 keywords
+CXX11_KEYWORD(nullptr);
+CXX11_KEYWORD(decltype);
+CXX11_KEYWORD(alignof);
+CXX11_KEYWORD(alignas);
+CXX11_KEYWORD(char16_t);
+CXX11_TYPE(char16_t);
+CXX11_KEYWORD(char32_t);
+CXX11_TYPE(char32_t);
+CXX11_KEYWORD(constexpr);
+CXX11_KEYWORD(noexcept);
+CXX11_KEYWORD(static_assert);
+CXX11_KEYWORD(thread_local);
+
+// Clang extension
+IS_KEYWORD(__char16_t);
+IS_TYPE(__char16_t);
+IS_KEYWORD(__char32_t);
+IS_TYPE(__char32_t);
diff --git a/test/Lexer/ms-extensions.c b/test/Lexer/ms-extensions.c
index 377d2d53cda7..ebcf0f49998f 100644
--- a/test/Lexer/ms-extensions.c
+++ b/test/Lexer/ms-extensions.c
@@ -1,11 +1,15 @@
// RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions %s
// RUN: %clang_cc1 -fsyntax-only -verify -fms-compatibility %s
+// RUN: %clang_cc1 -fsyntax-only -verify -triple i386-pc-win32 -fms-compatibility %s
__int8 x1 = 3i8;
__int16 x2 = 4i16;
__int32 x3 = 5i32;
__int64 x5 = 0x42i64;
__int64 x6 = 0x42I64;
+#ifndef __SIZEOF_INT128__
+// expected-error@+2 {{__int128 is not supported on this target}}
+#endif
__int64 x4 = 70000000i128;
__int64 y = 0x42i64u; // expected-error {{invalid suffix}}
@@ -13,6 +17,10 @@ __int64 w = 0x43ui64;
__int64 z = 9Li64; // expected-error {{invalid suffix}}
__int64 q = 10lli64; // expected-error {{invalid suffix}}
+__complex double c1 = 1i;
+__complex double c2 = 1.0i;
+__complex float c3 = 1.0if;
+
// radar 7562363
#define ULLONG_MAX 0xffffffffffffffffui64
#define UINT 0xffffffffui32
diff --git a/test/Lexer/warn-date-time.c b/test/Lexer/warn-date-time.c
new file mode 100644
index 000000000000..96fb55317ebc
--- /dev/null
+++ b/test/Lexer/warn-date-time.c
@@ -0,0 +1,23 @@
+// RUN: %clang_cc1 -Wdate-time -Wno-builtin-macro-redefined %s -verify -E
+// RUN: %clang_cc1 -Wdate-time -Wno-builtin-macro-redefined %s -DIS_SYSHEADER -verify -E
+// RUN: not %clang_cc1 -Werror=date-time -Wno-builtin-macro-redefined %s -DIS_SYSHEADER -E 2>&1 | grep 'error: expansion' | count 3
+
+
+#ifdef IS_HEADER
+
+#ifdef IS_SYSHEADER
+#pragma clang system_header
+#endif
+
+__TIME__ // expected-warning {{expansion of date or time macro is not reproducible}}
+__DATE__ // expected-warning {{expansion of date or time macro is not reproducible}}
+__TIMESTAMP__ // expected-warning {{expansion of date or time macro is not reproducible}}
+
+#define __TIME__
+__TIME__
+
+#else
+
+#define IS_HEADER
+#include __FILE__
+#endif
diff --git a/test/Makefile b/test/Makefile
index dbfa52177b71..bd0bd2e96569 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -44,10 +44,12 @@ lit.site.cfg: FORCE
@$(ECHOPATH) s=@LLVM_LIBS_DIR@=$(LibDir)=g >> lit.tmp
@$(ECHOPATH) s=@CLANG_SOURCE_DIR@=$(PROJ_SRC_DIR)/..=g >> lit.tmp
@$(ECHOPATH) s=@CLANG_BINARY_DIR@=$(PROJ_OBJ_DIR)/..=g >> lit.tmp
+ @$(ECHOPATH) s=@CLANG_TOOLS_DIR@=$(ToolDir)=g >> lit.tmp
@$(ECHOPATH) s=@TARGET_TRIPLE@=$(TARGET_TRIPLE)=g >> lit.tmp
@$(ECHOPATH) s=@ENABLE_CLANG_ARCMT@=$(ENABLE_CLANG_ARCMT)=g >> lit.tmp
- @$(ECHOPATH) s=@ENABLE_CLANG_REWRITER@=$(ENABLE_CLANG_REWRITER)=g >> lit.tmp
@$(ECHOPATH) s=@ENABLE_CLANG_STATIC_ANALYZER@=$(ENABLE_CLANG_STATIC_ANALYZER)=g >> lit.tmp
+ @$(ECHOPATH) s=@ENABLE_CLANG_EXAMPLES@=$(ENABLE_CLANG_EXAMPLES)=g >> lit.tmp
+ @$(ECHOPATH) s=@ENABLE_SHARED@=$(ENABLE_SHARED)=g >> lit.tmp
@sed -f lit.tmp $(PROJ_SRC_DIR)/lit.site.cfg.in > $@
@-rm -f lit.tmp
diff --git a/test/Misc/Inputs/serialized-diags-stable.dia b/test/Misc/Inputs/serialized-diags-stable.dia
new file mode 100644
index 000000000000..acdaad26627e
--- /dev/null
+++ b/test/Misc/Inputs/serialized-diags-stable.dia
Binary files differ
diff --git a/test/Misc/ast-dump-arm-attr.c b/test/Misc/ast-dump-arm-attr.c
new file mode 100644
index 000000000000..bec3531828b1
--- /dev/null
+++ b/test/Misc/ast-dump-arm-attr.c
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -triple arm-apple-darwin -ast-dump -ast-dump-filter Test %s | FileCheck --strict-whitespace %s
+
+__attribute__((interrupt)) void Test(void);
+// CHECK: FunctionDecl{{.*}}Test
+// CHECK-NEXT: ARMInterruptAttr
diff --git a/test/Misc/ast-dump-attr.cpp b/test/Misc/ast-dump-attr.cpp
index 729be1f24773..1aa6adf79b09 100644
--- a/test/Misc/ast-dump-attr.cpp
+++ b/test/Misc/ast-dump-attr.cpp
@@ -29,12 +29,12 @@ void TestAttributedStmt() {
int TestAlignedNull __attribute__((aligned));
// CHECK: VarDecl{{.*}}TestAlignedNull
-// CHECK-NEXT: AlignedAttr
+// CHECK-NEXT: AlignedAttr {{.*}} aligned
// CHECK-NEXT: <<<NULL>>>
int TestAlignedExpr __attribute__((aligned(4)));
// CHECK: VarDecl{{.*}}TestAlignedExpr
-// CHECK-NEXT: AlignedAttr
+// CHECK-NEXT: AlignedAttr {{.*}} aligned
// CHECK-NEXT: IntegerLiteral
int TestEnum __attribute__((visibility("default")));
@@ -63,17 +63,17 @@ void function1(void *) {
void TestIdentifier(void *, int)
__attribute__((pointer_with_type_tag(ident1,1,2)));
// CHECK: FunctionDecl{{.*}}TestIdentifier
-// CHECK: ArgumentWithTypeTagAttr{{.*}} ident1
+// CHECK: ArgumentWithTypeTagAttr{{.*}} pointer_with_type_tag ident1
void TestBool(void *, int)
__attribute__((pointer_with_type_tag(bool1,1,2)));
// CHECK: FunctionDecl{{.*}}TestBool
-// CHECK: ArgumentWithTypeTagAttr{{.*}} IsPointer
+// CHECK: ArgumentWithTypeTagAttr{{.*}}pointer_with_type_tag bool1 0 1 IsPointer
void TestUnsigned(void *, int)
__attribute__((pointer_with_type_tag(unsigned1,1,2)));
// CHECK: FunctionDecl{{.*}}TestUnsigned
-// CHECK: ArgumentWithTypeTagAttr{{.*}} 0 1
+// CHECK: ArgumentWithTypeTagAttr{{.*}} pointer_with_type_tag unsigned1 0 1
void TestInt(void) __attribute__((constructor(123)));
// CHECK: FunctionDecl{{.*}}TestInt
@@ -88,14 +88,6 @@ __attribute__((type_tag_for_datatype(ident1,int)));
// CHECK: VarDecl{{.*}}TestType
// CHECK-NEXT: TypeTagForDatatypeAttr{{.*}} int
-void *TestVariadicUnsigned1(int) __attribute__((alloc_size(1)));
-// CHECK: FunctionDecl{{.*}}TestVariadicUnsigned1
-// CHECK: AllocSizeAttr{{.*}} 0
-
-void *TestVariadicUnsigned2(int, int) __attribute__((alloc_size(1,2)));
-// CHECK: FunctionDecl{{.*}}TestVariadicUnsigned2
-// CHECK: AllocSizeAttr{{.*}} 0 1
-
void TestLabel() {
L: __attribute__((unused)) int i;
// CHECK: LabelStmt{{.*}}'L'
@@ -111,3 +103,35 @@ N: __attribute(()) ;
// CHECK: LabelStmt {{.*}} 'N'
// CHECK-NEXT: NullStmt
}
+
+namespace Test {
+extern "C" int printf(const char *format, ...);
+// CHECK: FunctionDecl{{.*}}printf
+// CHECK-NEXT: ParmVarDecl{{.*}}format{{.*}}'const char *'
+// CHECK-NEXT: FormatAttr{{.*}}Implicit printf 1 2
+
+alignas(8) extern int x;
+extern int x;
+// CHECK: VarDecl{{.*}} x 'int'
+// CHECK: VarDecl{{.*}} x 'int'
+// CHECK-NEXT: AlignedAttr{{.*}} Inherited
+}
+
+int __attribute__((cdecl)) TestOne(void), TestTwo(void);
+// CHECK: FunctionDecl{{.*}}TestOne{{.*}}__attribute__((cdecl))
+// CHECK: FunctionDecl{{.*}}TestTwo{{.*}}__attribute__((cdecl))
+
+void func() {
+ auto Test = []() __attribute__((no_thread_safety_analysis)) {};
+ // CHECK: CXXMethodDecl{{.*}}operator() 'void (void) const'
+ // CHECK: NoThreadSafetyAnalysisAttr
+
+ // Because GNU's noreturn applies to the function type, and this lambda does
+ // not have a capture list, the call operator and the function pointer
+ // conversion should both be noreturn, but the method should not contain a
+ // NoReturnAttr because the attribute applied to the type.
+ auto Test2 = []() __attribute__((noreturn)) { while(1); };
+ // CHECK: CXXMethodDecl{{.*}}operator() 'void (void) __attribute__((noreturn)) const'
+ // CHECK-NOT: NoReturnAttr
+ // CHECK: CXXConversionDecl{{.*}}operator void (*)() __attribute__((noreturn))
+}
diff --git a/test/Misc/ast-dump-color.cpp b/test/Misc/ast-dump-color.cpp
index cedabb04ce6f..b4660b4a724e 100644
--- a/test/Misc/ast-dump-color.cpp
+++ b/test/Misc/ast-dump-color.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-pc-linux -std=c++11 -ast-dump -fcolor-diagnostics %s | FileCheck --strict-whitespace %s
+// RUN: not %clang_cc1 -triple x86_64-pc-linux -std=c++11 -ast-dump -fcolor-diagnostics %s | FileCheck --strict-whitespace %s
// REQUIRES: ansi-escape-sequences
/// <a>Hello</a>
@@ -25,11 +25,15 @@ class __attribute__((lockable)) Mutex {
} mu1, mu2;
int TestExpr __attribute__((guarded_by(mu1)));
-//CHECK: {{^}}[[Blue:.\[0;34m]][[RESET:.\[0m]][[GREEN:.\[0;1;32m]]TranslationUnitDecl[[RESET]][[Yellow:.\[0;33m]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]<invalid sloc>[[RESET]]>{{$}}
-//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]TypedefDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]<invalid sloc>[[RESET]]>[[CYAN:.\[0;1;36m]] __int128_t[[RESET]] [[Green:.\[0;32m]]'__int128'[[RESET]]{{$}}
-//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]TypedefDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]<invalid sloc>[[RESET]]>[[CYAN]] __uint128_t[[RESET]] [[Green]]'unsigned __int128'[[RESET]]{{$}}
-//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]TypedefDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]<invalid sloc>[[RESET]]>[[CYAN]] __builtin_va_list[[RESET]] [[Green]]'__va_list_tag [1]'[[RESET]]{{$}}
-//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]VarDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]{{.*}}ast-dump-color.cpp:6:1[[RESET]], [[Yellow]]col:5[[RESET]]>[[CYAN]] Test[[RESET]] [[Green]]'int'[[RESET]]{{$}}
+struct Invalid {
+ __attribute__((noinline)) Invalid(error);
+} Invalid;
+
+//CHECK: {{^}}[[Blue:.\[0;34m]][[RESET:.\[0m]][[GREEN:.\[0;1;32m]]TranslationUnitDecl[[RESET]][[Yellow:.\[0;33m]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]<invalid sloc>[[RESET]]> [[Yellow]]<invalid sloc>[[RESET]]{{$}}
+//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]TypedefDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]<invalid sloc>[[RESET]]> [[Yellow]]<invalid sloc>[[RESET]] implicit[[CYAN:.\[0;1;36m]] __int128_t[[RESET]] [[Green:.\[0;32m]]'__int128'[[RESET]]{{$}}
+//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]TypedefDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]<invalid sloc>[[RESET]]> [[Yellow]]<invalid sloc>[[RESET]] implicit[[CYAN]] __uint128_t[[RESET]] [[Green]]'unsigned __int128'[[RESET]]{{$}}
+//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]TypedefDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]<invalid sloc>[[RESET]]> [[Yellow]]<invalid sloc>[[RESET]] implicit[[CYAN]] __builtin_va_list[[RESET]] [[Green]]'__va_list_tag [1]'[[RESET]]{{$}}
+//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]VarDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]{{.*}}ast-dump-color.cpp:6:1[[RESET]], [[Yellow]]col:5[[RESET]]> [[Yellow]]col:5[[RESET]][[CYAN]] Test[[RESET]] [[Green]]'int'[[RESET]]
//CHECK: {{^}}[[Blue]]| |-[[RESET]][[BLUE:.\[0;1;34m]]UnusedAttr[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:25[[RESET]]>{{$}}
//CHECK: {{^}}[[Blue]]| `-[[RESET]][[Blue]]FullComment[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:4:4[[RESET]], [[Yellow]]line:5:8[[RESET]]>{{$}}
//CHECK: {{^}}[[Blue]]| `-[[RESET]][[Blue]]ParagraphComment[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:4:4[[RESET]], [[Yellow]]line:5:8[[RESET]]>{{$}}
@@ -39,8 +43,8 @@ int TestExpr __attribute__((guarded_by(mu1)));
//CHECK: {{^}}[[Blue]]| |-[[RESET]][[Blue]]HTMLEndTagComment[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:13[[RESET]], [[Yellow]]col:16[[RESET]]> Name="a"{{$}}
//CHECK: {{^}}[[Blue]]| |-[[RESET]][[Blue]]TextComment[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:5:4[[RESET]]> Text=" "{{$}}
//CHECK: {{^}}[[Blue]]| `-[[RESET]][[Blue]]HTMLStartTagComment[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:5[[RESET]], [[Yellow]]col:8[[RESET]]> Name="br" SelfClosing{{$}}
-//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]FunctionDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:9:1[[RESET]], [[Yellow]]line:16:1[[RESET]]>[[CYAN]] TestAttributedStmt[[RESET]] [[Green]]'void (void)'[[RESET]]{{$}}
-//CHECK: {{^}}[[Blue]]| |-[[RESET]][[MAGENTA:.\[0;1;35m]]CompoundStmt[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:9:27[[RESET]], [[Yellow]]line:16:1[[RESET]]>{{$}}
+//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]FunctionDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:9:1[[RESET]], [[Yellow]]line:16:1[[RESET]]> [[Yellow]]line:9:6[[RESET]][[CYAN]] TestAttributedStmt[[RESET]] [[Green]]'void (void)'[[RESET]]{{$}}
+//CHECK: {{^}}[[Blue]]| |-[[RESET]][[MAGENTA:.\[0;1;35m]]CompoundStmt[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:27[[RESET]], [[Yellow]]line:16:1[[RESET]]>{{$}}
//CHECK: {{^}}[[Blue]]| | `-[[RESET]][[MAGENTA]]SwitchStmt[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:10:3[[RESET]], [[Yellow]]line:15:3[[RESET]]>{{$}}
//CHECK: {{^}}[[Blue]]| | |-[[RESET]][[Blue:.\[0;34m]]<<<NULL>>>[[RESET]]{{$}}
//CHECK: {{^}}[[Blue]]| | |-[[RESET]][[MAGENTA]]IntegerLiteral[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:10:11[[RESET]]> [[Green]]'int'[[RESET]][[Cyan:.\[0;36m]][[RESET]][[Cyan]][[RESET]][[CYAN]] 1[[RESET]]{{$}}
@@ -58,30 +62,42 @@ int TestExpr __attribute__((guarded_by(mu1)));
//CHECK: {{^}}[[Blue]]| `-[[RESET]][[Blue]]FullComment[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:8:4[[RESET]], [[Yellow]]col:11[[RESET]]>{{$}}
//CHECK: {{^}}[[Blue]]| `-[[RESET]][[Blue]]ParagraphComment[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:4[[RESET]], [[Yellow]]col:11[[RESET]]>{{$}}
//CHECK: {{^}}[[Blue]]| `-[[RESET]][[Blue]]TextComment[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:4[[RESET]], [[Yellow]]col:11[[RESET]]> Text=" Comment"{{$}}
-//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]CXXRecordDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:18:1[[RESET]], [[Yellow]]line:25:1[[RESET]]> class[[CYAN]] Mutex[[RESET]] definition{{$}}
-//CHECK: {{^}}[[Blue]]| |-[[RESET]][[BLUE]]LockableAttr[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:18:22[[RESET]]>{{$}}
-//CHECK: {{^}}[[Blue]]| |-[[RESET]][[GREEN]]CXXRecordDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:1[[RESET]], [[Yellow]]col:33[[RESET]]> class[[CYAN]] Mutex[[RESET]]{{$}}
-//CHECK: {{^}}[[Blue]]| |-[[RESET]][[GREEN]]FieldDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:20:3[[RESET]], [[Yellow]]col:7[[RESET]]>[[CYAN]] var1[[RESET]] [[Green]]'int'[[RESET]]{{$}}
+//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]CXXRecordDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:18:1[[RESET]], [[Yellow]]line:25:1[[RESET]]> [[Yellow]]line:18:33[[RESET]] class[[CYAN]] Mutex[[RESET]] definition{{$}}
+//CHECK: {{^}}[[Blue]]| |-[[RESET]][[BLUE]]CapabilityAttr[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:22[[RESET]]> capability "mutex"{{$}}
+//CHECK: {{^}}[[Blue]]| |-[[RESET]][[GREEN]]CXXRecordDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:1[[RESET]], [[Yellow]]col:33[[RESET]]> [[Yellow]]col:33[[RESET]] implicit class[[CYAN]] Mutex[[RESET]]{{$}}
+//CHECK: {{^}}[[Blue]]| |-[[RESET]][[GREEN]]FieldDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:20:3[[RESET]], [[Yellow]]col:7[[RESET]]> [[Yellow]]col:7[[RESET]][[CYAN]] var1[[RESET]] [[Green]]'int'[[RESET]]{{$}}
//CHECK: {{^}}[[Blue]]| | `-[[RESET]][[Blue]]FullComment[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:19:6[[RESET]], [[Yellow]]col:16[[RESET]]>{{$}}
//CHECK: {{^}}[[Blue]]| | `-[[RESET]][[Blue]]ParagraphComment[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:6[[RESET]], [[Yellow]]col:16[[RESET]]>{{$}}
//CHECK: {{^}}[[Blue]]| | `-[[RESET]][[Blue]]TextComment[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:6[[RESET]], [[Yellow]]col:16[[RESET]]> Text=" A variable"{{$}}
-//CHECK: {{^}}[[Blue]]| |-[[RESET]][[GREEN]]FieldDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:24:3[[RESET]], [[Yellow]]col:7[[RESET]]>[[CYAN]] var2[[RESET]] [[Green]]'int'[[RESET]]{{$}}
+//CHECK: {{^}}[[Blue]]| |-[[RESET]][[GREEN]]FieldDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:24:3[[RESET]], [[Yellow]]col:7[[RESET]]> [[Yellow]]col:7[[RESET]][[CYAN]] var2[[RESET]] [[Green]]'int'[[RESET]]{{$}}
//CHECK: {{^}}[[Blue]]| | `-[[RESET]][[Blue]]FullComment[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:21:6[[RESET]], [[Yellow]]line:23:44[[RESET]]>{{$}}
//CHECK: {{^}}[[Blue]]| | |-[[RESET]][[Blue]]ParagraphComment[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:21:6[[RESET]], [[Yellow]]col:22[[RESET]]>{{$}}
//CHECK: {{^}}[[Blue]]| | | `-[[RESET]][[Blue]]TextComment[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:6[[RESET]], [[Yellow]]col:22[[RESET]]> Text=" Another variable"{{$}}
//CHECK: {{^}}[[Blue]]| | `-[[RESET]][[Blue]]ParagraphComment[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:23:6[[RESET]], [[Yellow]]col:44[[RESET]]>{{$}}
//CHECK: {{^}}[[Blue]]| | `-[[RESET]][[Blue]]TextComment[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:6[[RESET]], [[Yellow]]col:44[[RESET]]> Text=" Like the other variable, but different"{{$}}
-//CHECK: {{^}}[[Blue]]| |-[[RESET]][[GREEN]]CXXConstructorDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:18:33[[RESET]]>[[CYAN]] Mutex[[RESET]] [[Green]]'void (void)'[[RESET]] inline{{.*$}}
+//CHECK: {{^}}[[Blue]]| |-[[RESET]][[GREEN]]CXXConstructorDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:18:33[[RESET]]> [[Yellow]]col:33[[RESET]] implicit used[[CYAN]] Mutex[[RESET]] [[Green]]'void (void)'[[RESET]] inline{{.*$}}
//CHECK: {{^}}[[Blue]]| | `-[[RESET]][[MAGENTA]]CompoundStmt[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:33[[RESET]]>{{$}}
-//CHECK: {{^}}[[Blue]]| |-[[RESET]][[GREEN]]CXXConstructorDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:33[[RESET]]>[[CYAN]] Mutex[[RESET]] [[Green]]'void (const class Mutex &)'[[RESET]] inline{{ .*$}}
-//CHECK: {{^}}[[Blue]]| | `-[[RESET]][[GREEN]]ParmVarDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:33[[RESET]]> [[Green]]'const class Mutex &'[[RESET]]{{$}}
-//CHECK: {{^}}[[Blue]]| `-[[RESET]][[GREEN]]CXXConstructorDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:33[[RESET]]>[[CYAN]] Mutex[[RESET]] [[Green]]'void (class Mutex &&)'[[RESET]] inline{{ .*$}}
-//CHECK: {{^}}[[Blue]]| `-[[RESET]][[GREEN]]ParmVarDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:33[[RESET]]> [[Green]]'class Mutex &&'[[RESET]]{{$}}
-//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]VarDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:1[[RESET]], [[Yellow]]line:25:3[[RESET]]>[[CYAN]] mu1[[RESET]] [[Green]]'class Mutex':'class Mutex'[[RESET]]{{$}}
+//CHECK: {{^}}[[Blue]]| |-[[RESET]][[GREEN]]CXXConstructorDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:33[[RESET]]> [[Yellow]]col:33[[RESET]] implicit[[CYAN]] Mutex[[RESET]] [[Green]]'void (const class Mutex &)'[[RESET]] inline{{ .*$}}
+//CHECK: {{^}}[[Blue]]| | `-[[RESET]][[GREEN]]ParmVarDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:33[[RESET]]> [[Yellow]]col:33[[RESET]] [[Green]]'const class Mutex &'[[RESET]]{{$}}
+//CHECK: {{^}}[[Blue]]| `-[[RESET]][[GREEN]]CXXConstructorDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:33[[RESET]]> [[Yellow]]col:33[[RESET]] implicit[[CYAN]] Mutex[[RESET]] [[Green]]'void (class Mutex &&)'[[RESET]] inline{{ .*$}}
+//CHECK: {{^}}[[Blue]]| `-[[RESET]][[GREEN]]ParmVarDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:33[[RESET]]> [[Yellow]]col:33[[RESET]] [[Green]]'class Mutex &&'[[RESET]]{{$}}
+//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]VarDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:1[[RESET]], [[Yellow]]line:25:3[[RESET]]> [[Yellow]]col:3[[RESET]] referenced[[CYAN]] mu1[[RESET]] [[Green]]'class Mutex':'class Mutex'[[RESET]]
//CHECK: {{^}}[[Blue]]| `-[[RESET]][[MAGENTA]]CXXConstructExpr[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:3[[RESET]]> [[Green]]'class Mutex':'class Mutex'[[RESET]][[Cyan]][[RESET]][[Cyan]][[RESET]] [[Green]]'void (void)'[[RESET]]{{$}}
-//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]VarDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:18:1[[RESET]], [[Yellow]]line:25:8[[RESET]]>[[CYAN]] mu2[[RESET]] [[Green]]'class Mutex':'class Mutex'[[RESET]]{{$}}
+//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]VarDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:18:1[[RESET]], [[Yellow]]line:25:8[[RESET]]> [[Yellow]]col:8[[RESET]][[CYAN]] mu2[[RESET]] [[Green]]'class Mutex':'class Mutex'[[RESET]]
//CHECK: {{^}}[[Blue]]| `-[[RESET]][[MAGENTA]]CXXConstructExpr[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:8[[RESET]]> [[Green]]'class Mutex':'class Mutex'[[RESET]][[Cyan]][[RESET]][[Cyan]][[RESET]] [[Green]]'void (void)'[[RESET]]{{$}}
-//CHECK: {{^}}[[Blue]]`-[[RESET]][[GREEN]]VarDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:26:1[[RESET]], [[Yellow]]col:5[[RESET]]>[[CYAN]] TestExpr[[RESET]] [[Green]]'int'[[RESET]]{{$}}
-//CHECK: {{^}}[[Blue]] `-[[RESET]][[BLUE]]GuardedByAttr[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:29[[RESET]]>{{$}}
-//CHECK: {{^}}[[Blue]] `-[[RESET]][[MAGENTA]]DeclRefExpr[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:40[[RESET]]> [[Green]]'class Mutex':'class Mutex'[[RESET]][[Cyan]] lvalue[[RESET]][[Cyan]][[RESET]] [[GREEN]]Var[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]][[CYAN]] 'mu1'[[RESET]] [[Green]]'class Mutex':'class Mutex'[[RESET]]{{$}}
-
+//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]VarDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:26:1[[RESET]], [[Yellow]]col:5[[RESET]]> [[Yellow]]col:5[[RESET]][[CYAN]] TestExpr[[RESET]] [[Green]]'int'[[RESET]]
+//CHECK: {{^}}[[Blue]]| `-[[RESET]][[BLUE]]GuardedByAttr[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:29[[RESET]], [[Yellow]]col:43[[RESET]]>{{$}}
+//CHECK: {{^}}[[Blue]]| `-[[RESET]][[MAGENTA]]DeclRefExpr[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:40[[RESET]]> [[Green]]'class Mutex':'class Mutex'[[RESET]][[Cyan]] lvalue[[RESET]][[Cyan]][[RESET]] [[GREEN]]Var[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]][[CYAN]] 'mu1'[[RESET]] [[Green]]'class Mutex':'class Mutex'[[RESET]]{{$}}
+//CHECK: {{^}}[[Blue]]|-[[RESET]][[GREEN]]CXXRecordDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:28:1[[RESET]], [[Yellow]]line:30:1[[RESET]]> [[Yellow]]line:28:8[[RESET]] struct[[CYAN]] Invalid[[RESET]] definition
+//CHECK: {{^}}[[Blue]]| |-[[RESET]][[GREEN]]CXXRecordDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:1[[RESET]], [[Yellow]]col:8[[RESET]]> [[Yellow]]col:8[[RESET]] implicit struct[[CYAN]] Invalid[[RESET]]
+//CHECK: {{^}}[[Blue]]| |-[[RESET]][[GREEN]]CXXConstructorDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:29:3[[RESET]], [[Yellow]]col:42[[RESET]]> [[Yellow]]col:29[[RESET]] invalid[[CYAN]] Invalid[[RESET]] [[Green]]'void (int)'[[RESET]]
+//CHECK: {{^}}[[Blue]]| | |-[[RESET]][[GREEN]]ParmVarDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:37[[RESET]], [[Yellow]]<invalid sloc>[[RESET]]> [[Yellow]]col:42[[RESET]] invalid [[Green]]'int'[[RESET]]
+//CHECK: {{^}}[[Blue]]| | `-[[RESET]][[BLUE]]NoInlineAttr[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:18[[RESET]]>
+//CHECK: {{^}}[[Blue]]| |-[[RESET]][[GREEN]]CXXConstructorDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]line:28:8[[RESET]]> [[Yellow]]col:8[[RESET]] implicit used[[CYAN]] Invalid[[RESET]] [[Green]]'void (void)'[[RESET]] inline noexcept-unevaluated 0x{{[0-9a-fA-F]*}}
+//CHECK: {{^}}[[Blue]]| | `-[[RESET]][[MAGENTA]]CompoundStmt[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:8[[RESET]]>
+//CHECK: {{^}}[[Blue]]| |-[[RESET]][[GREEN]]CXXConstructorDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:8[[RESET]]> [[Yellow]]col:8[[RESET]] implicit[[CYAN]] Invalid[[RESET]] [[Green]]'void (const struct Invalid &)'[[RESET]] inline noexcept-unevaluated 0x{{[0-9a-fA-F]*}}
+//CHECK: {{^}}[[Blue]]| | `-[[RESET]][[GREEN]]ParmVarDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:8[[RESET]]> [[Yellow]]col:8[[RESET]] [[Green]]'const struct Invalid &'[[RESET]]
+//CHECK: {{^}}[[Blue]]| `-[[RESET]][[GREEN]]CXXConstructorDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:8[[RESET]]> [[Yellow]]col:8[[RESET]] implicit[[CYAN]] Invalid[[RESET]] [[Green]]'void (struct Invalid &&)'[[RESET]] inline noexcept-unevaluated 0x{{[0-9a-fA-F]*}}
+//CHECK: {{^}}[[Blue]]| `-[[RESET]][[GREEN]]ParmVarDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:8[[RESET]]> [[Yellow]]col:8[[RESET]] [[Green]]'struct Invalid &&'[[RESET]]
+//CHECK: {{^}}[[Blue]]`-[[RESET]][[GREEN]]VarDecl[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:1[[RESET]], [[Yellow]]line:30:3[[RESET]]> [[Yellow]]col:3[[RESET]][[CYAN]] Invalid[[RESET]] [[Green]]'struct Invalid':'struct Invalid'[[RESET]]
+//CHECK: {{^}}[[Blue]] `-[[RESET]][[MAGENTA]]CXXConstructExpr[[RESET]][[Yellow]] 0x{{[0-9a-fA-F]*}}[[RESET]] <[[Yellow]]col:3[[RESET]]> [[Green]]'struct Invalid':'struct Invalid'[[RESET]][[Cyan]][[RESET]][[Cyan]][[RESET]] [[Green]]'void (void)'[[RESET]]
diff --git a/test/Misc/ast-dump-comment.cpp b/test/Misc/ast-dump-comment.cpp
index 4e84af01a516..5bd6934d80cf 100644
--- a/test/Misc/ast-dump-comment.cpp
+++ b/test/Misc/ast-dump-comment.cpp
@@ -67,3 +67,11 @@ int Test_VerbatimBlockComment;
// CHECK: VarDecl{{.*}}Test_VerbatimBlockComment
// CHECK: VerbatimBlockComment{{.*}} Name="verbatim" CloseName="endverbatim"
// CHECK-NEXT: VerbatimBlockLineComment{{.*}} Text=" Aaa"
+
+/// \param ... More arguments
+template<typename T>
+void Test_TemplatedFunctionVariadic(int arg, ...);
+// CHECK: FunctionTemplateDecl{{.*}}Test_TemplatedFunctionVariadic
+// CHECK: ParamCommandComment{{.*}} [in] implicitly Param="..."
+// CHECK-NEXT: ParagraphComment
+// CHECK-NEXT: TextComment{{.*}} Text=" More arguments"
diff --git a/test/Misc/ast-dump-decl.c b/test/Misc/ast-dump-decl.c
index 94335b825c86..7d39e6b315c8 100644
--- a/test/Misc/ast-dump-decl.c
+++ b/test/Misc/ast-dump-decl.c
@@ -2,7 +2,7 @@
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -ast-dump %s | FileCheck -check-prefix CHECK-TU -strict-whitespace %s
int TestLocation;
-// CHECK: VarDecl 0x{{[^ ]*}} <{{.*}}:4:1, col:5> TestLocation
+// CHECK: VarDecl 0x{{[^ ]*}} <{{.*}}:4:1, col:5> col:5 TestLocation
struct TestIndent {
int x;
@@ -47,7 +47,7 @@ struct TestEnumDeclAnon {
} e;
};
// CHECK: RecordDecl{{.*}} TestEnumDeclAnon
-// CHECK-NEXT: EnumDecl{{.*>$}}
+// CHECK-NEXT: EnumDecl{{.*> .*$}}
enum TestEnumDeclForward;
// CHECK: EnumDecl{{.*}} TestEnumDeclForward
diff --git a/test/Misc/ast-dump-decl.cpp b/test/Misc/ast-dump-decl.cpp
index d98bdb56d5bd..b41e4ee3d0f0 100644
--- a/test/Misc/ast-dump-decl.cpp
+++ b/test/Misc/ast-dump-decl.cpp
@@ -133,6 +133,31 @@ class TestCXXDestructorDecl {
// CHECK: CXXDestructorDecl{{.*}} ~TestCXXDestructorDecl 'void (void) noexcept'
// CHECK-NEXT: CompoundStmt
+// Test that the range of a defaulted members is computed correctly.
+// FIXME: This should include the "= default".
+class TestMemberRanges {
+public:
+ TestMemberRanges() = default;
+ TestMemberRanges(const TestMemberRanges &Other) = default;
+ TestMemberRanges(TestMemberRanges &&Other) = default;
+ ~TestMemberRanges() = default;
+ TestMemberRanges &operator=(const TestMemberRanges &Other) = default;
+ TestMemberRanges &operator=(TestMemberRanges &&Other) = default;
+};
+void SomeFunction() {
+ TestMemberRanges A;
+ TestMemberRanges B(A);
+ B = A;
+ A = static_cast<TestMemberRanges &&>(B);
+ TestMemberRanges C(static_cast<TestMemberRanges &&>(A));
+}
+// CHECK: CXXConstructorDecl{{.*}} <line:{{.*}}:3, col:20>
+// CHECK: CXXConstructorDecl{{.*}} <line:{{.*}}:3, col:49>
+// CHECK: CXXConstructorDecl{{.*}} <line:{{.*}}:3, col:44>
+// CHECK: CXXDestructorDecl{{.*}} <line:{{.*}}:3, col:21>
+// CHECK: CXXMethodDecl{{.*}} <line:{{.*}}:3, col:60>
+// CHECK: CXXMethodDecl{{.*}} <line:{{.*}}:3, col:55>
+
class TestCXXConversionDecl {
operator int() { return 0; }
};
@@ -143,7 +168,7 @@ namespace TestStaticAssertDecl {
static_assert(true, "msg");
}
// CHECK: NamespaceDecl{{.*}} TestStaticAssertDecl
-// CHECK-NEXT: StaticAssertDecl{{.*>$}}
+// CHECK-NEXT: StaticAssertDecl{{.*> .*$}}
// CHECK-NEXT: CXXBoolLiteralExpr
// CHECK-NEXT: StringLiteral
@@ -273,7 +298,7 @@ namespace testCanonicalTemplate {
// CHECK-NEXT: FunctionDecl{{.*}} TestFunctionTemplate 'void (T)'
// CHECK-NEXT: ParmVarDecl{{.*}} 'T'
// CHECK-NEXT: Function{{.*}} 'TestFunctionTemplate'
- // CHECK-NEXT-NOT: TemplateArgument
+ // CHECK-NOT: TemplateArgument
template<typename T1> class TestClassTemplate {
template<typename T2> friend class TestClassTemplate;
@@ -308,7 +333,8 @@ namespace TestTemplateTypeParmDecl {
// CHECK: NamespaceDecl{{.*}} TestTemplateTypeParmDecl
// CHECK-NEXT: FunctionTemplateDecl
// CHECK-NEXT: TemplateTypeParmDecl{{.*}} typename ... T
-// CHECK-NEXT: TemplateTypeParmDecl{{.*}} class U 'int'
+// CHECK-NEXT: TemplateTypeParmDecl{{.*}} class U
+// CHECK-NEXT: TemplateArgument type 'int'
namespace TestNonTypeTemplateParmDecl {
template<int I = 1, int ... J> void foo();
@@ -316,7 +342,8 @@ namespace TestNonTypeTemplateParmDecl {
// CHECK: NamespaceDecl{{.*}} TestNonTypeTemplateParmDecl
// CHECK-NEXT: FunctionTemplateDecl
// CHECK-NEXT: NonTypeTemplateParmDecl{{.*}} 'int' I
-// CHECK-NEXT: IntegerLiteral{{.*}} 'int' 1
+// CHECK-NEXT: TemplateArgument expr
+// CHECK-NEXT: IntegerLiteral{{.*}} 'int' 1
// CHECK-NEXT: NonTypeTemplateParmDecl{{.*}} 'int' ... J
namespace TestTemplateTemplateParmDecl {
@@ -443,7 +470,7 @@ namespace TestFileScopeAsmDecl {
asm("ret");
}
// CHECK: NamespaceDecl{{.*}} TestFileScopeAsmDecl{{$}}
-// CHECK: FileScopeAsmDecl{{.*>$}}
+// CHECK: FileScopeAsmDecl{{.*> .*$}}
// CHECK-NEXT: StringLiteral
namespace TestFriendDecl2 {
@@ -452,12 +479,12 @@ namespace TestFriendDecl2 {
friend void f();
};
}
-// CHECK: NamespaceDecl [[TestFriendDecl2:0x.*]] <{{.*}}> TestFriendDecl2
-// CHECK: |-FunctionDecl [[TestFriendDecl2_f:0x.*]] <{{.*}}> f 'void (void)'
+// CHECK: NamespaceDecl [[TestFriendDecl2:0x.*]] <{{.*}}> {{.*}} TestFriendDecl2
+// CHECK: |-FunctionDecl [[TestFriendDecl2_f:0x.*]] <{{.*}}> {{.*}} f 'void (void)'
// CHECK: `-CXXRecordDecl {{.*}} struct S
// CHECK: |-CXXRecordDecl {{.*}} struct S
// CHECK: `-FriendDecl
-// CHECK: `-FunctionDecl {{.*}} parent [[TestFriendDecl2]] prev [[TestFriendDecl2_f]] <{{.*}}> f 'void (void)'
+// CHECK: `-FunctionDecl {{.*}} parent [[TestFriendDecl2]] prev [[TestFriendDecl2_f]] <{{.*}}> {{.*}} f 'void (void)'
namespace Comment {
extern int Test;
diff --git a/test/Misc/ast-dump-msp430-attr.c b/test/Misc/ast-dump-msp430-attr.c
new file mode 100644
index 000000000000..170e0bef9d99
--- /dev/null
+++ b/test/Misc/ast-dump-msp430-attr.c
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -triple msp430-unknown-unknown -ast-dump -ast-dump-filter Test %s | FileCheck --strict-whitespace %s
+
+__attribute__((interrupt(12))) void Test(void);
+// CHECK: FunctionDecl{{.*}}Test
+// CHECK-NEXT: MSP430InterruptAttr
diff --git a/test/Misc/ast-print-pragmas-xfail.cpp b/test/Misc/ast-print-pragmas-xfail.cpp
new file mode 100644
index 000000000000..994e1fda3205
--- /dev/null
+++ b/test/Misc/ast-print-pragmas-xfail.cpp
@@ -0,0 +1,21 @@
+// RUN: %clang_cc1 %s -ast-print -o - | FileCheck %s
+
+// FIXME: Test fails because attribute order is reversed by ParsedAttributes.
+// XFAIL: *
+
+void run1(int *List, int Length) {
+ int i = 0;
+// CEHCK: #pragma loop vectorize(4)
+// CHECK-NEXT: #pragma loop interleave(8)
+// CHECK-NEXT: #pragma loop vectorize(enable)
+// CHECK-NEXT: #pragma loop interleave(enable)
+#pragma loop vectorize(4)
+#pragma loop interleave(8)
+#pragma loop vectorize(enable)
+#pragma loop interleave(enable)
+// CHECK-NEXT: while (i < Length)
+ while (i < Length) {
+ List[i] = i;
+ i++;
+ }
+}
diff --git a/test/Misc/ast-print-pragmas.cpp b/test/Misc/ast-print-pragmas.cpp
new file mode 100644
index 000000000000..25421fcd0c3e
--- /dev/null
+++ b/test/Misc/ast-print-pragmas.cpp
@@ -0,0 +1,40 @@
+// RUN: %clang_cc1 -ast-print %s -o - | FileCheck %s
+
+// FIXME: A bug in ParsedAttributes causes the order of the attributes to be
+// reversed. The checks are consequently in the reverse order below.
+
+// CHECK: #pragma clang loop interleave_count(8)
+// CHECK-NEXT: #pragma clang loop vectorize_width(4)
+
+void test(int *List, int Length) {
+ int i = 0;
+#pragma clang loop vectorize_width(4)
+#pragma clang loop interleave_count(8)
+// CHECK-NEXT: while (i < Length)
+ while (i < Length) {
+ List[i] = i * 2;
+ i++;
+ }
+
+// CHECK: #pragma clang loop interleave(disable)
+// CHECK-NEXT: #pragma clang loop vectorize(enable)
+
+#pragma clang loop vectorize(enable)
+#pragma clang loop interleave(disable)
+// CHECK-NEXT: while (i - 1 < Length)
+ while (i - 1 < Length) {
+ List[i] = i * 2;
+ i++;
+ }
+
+// CHECK: #pragma clang loop interleave(enable)
+// CHECK-NEXT: #pragma clang loop vectorize(disable)
+
+#pragma clang loop vectorize(disable)
+#pragma clang loop interleave(enable)
+// CHECK-NEXT: while (i - 2 < Length)
+ while (i - 2 < Length) {
+ List[i] = i * 2;
+ i++;
+ }
+}
diff --git a/test/Misc/backend-optimization-failure.cpp b/test/Misc/backend-optimization-failure.cpp
new file mode 100644
index 000000000000..1b79fb31d1f9
--- /dev/null
+++ b/test/Misc/backend-optimization-failure.cpp
@@ -0,0 +1,21 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s -O3 -emit-llvm -gline-tables-only -S -verify -o /dev/null
+// REQUIRES: x86-registered-target
+
+// Test verifies optimization failures generated by the backend are handled
+// correctly by clang. LLVM tests verify all of the failure conditions.
+
+void test_switch(int *A, int *B, int Length) {
+#pragma clang loop vectorize(enable) unroll(disable)
+ for (int i = 0; i < Length; i++) {
+ /* expected-warning {{loop not vectorized: failed explicitly specified loop vectorization}} */ switch (A[i]) {
+ case 0:
+ B[i] = 1;
+ break;
+ case 1:
+ B[i] = 2;
+ break;
+ default:
+ B[i] = 3;
+ }
+ }
+}
diff --git a/test/Misc/backend-stack-frame-diagnostics-fallback.cpp b/test/Misc/backend-stack-frame-diagnostics-fallback.cpp
new file mode 100644
index 000000000000..8ae8c55396dc
--- /dev/null
+++ b/test/Misc/backend-stack-frame-diagnostics-fallback.cpp
@@ -0,0 +1,18 @@
+// REQUIRES: x86-registered-target
+// RUN: %clang_cc1 %s -mllvm -warn-stack-size=0 -emit-codegen-only -triple=i386-apple-darwin 2>&1 | FileCheck %s
+
+// TODO: Emit rich diagnostics for thunks and move this into the appropriate test file.
+// Until then, test that we fall back and display the LLVM backend diagnostic.
+namespace frameSizeThunkWarning {
+ struct A {
+ virtual void f();
+ };
+
+ struct B : virtual A {
+ virtual void f();
+ };
+
+ // CHECK: warning: stack frame size of {{[0-9]+}} bytes in function 'frameSizeThunkWarning::B::f'
+ // CHECK: warning: stack size limit exceeded ({{[0-9]+}}) in {{[^ ]+}}
+ void B::f() { }
+}
diff --git a/test/Misc/backend-stack-frame-diagnostics.cpp b/test/Misc/backend-stack-frame-diagnostics.cpp
new file mode 100644
index 000000000000..1d865e7646e9
--- /dev/null
+++ b/test/Misc/backend-stack-frame-diagnostics.cpp
@@ -0,0 +1,85 @@
+// REQUIRES: x86-registered-target
+// RUN: %clang -target i386-apple-darwin -std=c++11 -fblocks -Wframe-larger-than=70 -Xclang -verify -o /dev/null -c %s
+// RUN: %clang -target i386-apple-darwin -std=c++11 -fblocks -Wframe-larger-than=70 -Xclang -verify -o /dev/null -c %s -DIS_SYSHEADER
+
+// Test that:
+// * The driver passes the option through to the backend.
+// * The frontend diagnostic handler 'demangles' and resolves the correct function definition.
+
+// Test that link invocations don't emit an "argument unused during compilation" diagnostic.
+// RUN: touch %t.o
+// RUN: %clang -Werror -Wframe-larger-than=0 %t.o -### 2>&1 | not grep ' error: '
+
+// TODO: Support rich backend diagnostics for Objective-C methods.
+
+// Backend diagnostics aren't suppressed in system headers because such results
+// are significant and actionable.
+#ifdef IS_HEADER
+
+#ifdef IS_SYSHEADER
+#pragma clang system_header
+#endif
+
+extern void doIt(char *);
+
+void frameSizeWarning(int, int) {}
+
+void frameSizeWarning();
+
+void frameSizeWarning() { // expected-warning-re {{stack frame size of {{[0-9]+}} bytes in function 'frameSizeWarning'}}
+ char buffer[80];
+ doIt(buffer);
+}
+
+void frameSizeWarning();
+
+void frameSizeWarning(int) {}
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wframe-larger-than="
+void frameSizeWarningIgnored() {
+ char buffer[80];
+ doIt(buffer);
+}
+#pragma GCC diagnostic pop
+
+#pragma GCC diagnostic push
+#ifndef IS_SYSHEADER
+// expected-warning@+2 {{unknown warning group '-Wframe-larger-than'}}
+#endif
+#pragma GCC diagnostic ignored "-Wframe-larger-than"
+#pragma GCC diagnostic pop
+
+void frameSizeLocalClassWarning() {
+ struct S {
+ S() { // expected-warning-re {{stack frame size of {{[0-9]+}} bytes in function 'frameSizeLocalClassWarning()::S::S'}}
+ char buffer[80];
+ doIt(buffer);
+ }
+ };
+ S();
+}
+
+void frameSizeLambdaWarning() {
+ auto fn =
+ []() { // expected-warning-re {{stack frame size of {{[0-9]+}} bytes in lambda expression}}
+ char buffer[80];
+ doIt(buffer);
+ };
+ fn();
+}
+
+void frameSizeBlocksWarning() {
+ auto fn =
+ ^() { // expected-warning-re {{stack frame size of {{[0-9]+}} bytes in block literal}}
+ char buffer[80];
+ doIt(buffer);
+ };
+ fn();
+}
+
+#else
+
+#define IS_HEADER
+#include __FILE__
+#endif
diff --git a/test/Misc/diag-format.c b/test/Misc/diag-format.c
index 3dc351d4290c..8e30cf76afd2 100644
--- a/test/Misc/diag-format.c
+++ b/test/Misc/diag-format.c
@@ -2,8 +2,14 @@
// RUN: %clang -fsyntax-only -fdiagnostics-format=clang %s 2>&1 | FileCheck %s -check-prefix=DEFAULT
// RUN: %clang -fsyntax-only -fdiagnostics-format=clang -target x86_64-pc-win32 %s 2>&1 | FileCheck %s -check-prefix=DEFAULT
//
+// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fmsc-version=1300 %s 2>&1 | FileCheck %s -check-prefix=MSVC2010
+// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fms-compatibility-version=13.00 %s 2>&1 | FileCheck %s -check-prefix=MSVC2010
// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc %s 2>&1 | FileCheck %s -check-prefix=MSVC
+// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fmsc-version=1300 -target x86_64-pc-win32 %s 2>&1 | FileCheck %s -check-prefix=MSVC2010
+// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fms-compatibility-version=13.00 -target x86_64-pc-win32 %s 2>&1 | FileCheck %s -check-prefix=MSVC2010
// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -target x86_64-pc-win32 %s 2>&1 | FileCheck %s -check-prefix=MSVC
+// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fmsc-version=1300 -target x86_64-pc-win32 -fshow-column %s 2>&1 | FileCheck %s -check-prefix=MSVC2010
+// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -fms-compatibility-version=13.00 -target x86_64-pc-win32 -fshow-column %s 2>&1 | FileCheck %s -check-prefix=MSVC2010
// RUN: %clang -fsyntax-only -fdiagnostics-format=msvc -target x86_64-pc-win32 -fshow-column %s 2>&1 | FileCheck %s -check-prefix=MSVC
//
// RUN: %clang -fsyntax-only -fdiagnostics-format=vi %s 2>&1 | FileCheck %s -check-prefix=VI
@@ -12,6 +18,8 @@
//
// RUN: %clang -fsyntax-only -fno-show-column %s 2>&1 | FileCheck %s -check-prefix=NO_COLUMN
//
+// RUN: not %clang -fsyntax-only -Werror -fdiagnostics-format=msvc-fallback -fmsc-version=1300 %s 2>&1 | FileCheck %s -check-prefix=MSVC2010-FALLBACK
+// RUN: not %clang -fsyntax-only -Werror -fdiagnostics-format=msvc-fallback -fms-compatibility-version=13.00 %s 2>&1 | FileCheck %s -check-prefix=MSVC2010-FALLBACK
// RUN: not %clang -fsyntax-only -Werror -fdiagnostics-format=msvc-fallback %s 2>&1 | FileCheck %s -check-prefix=MSVC-FALLBACK
@@ -26,10 +34,12 @@
#ifdef foo
#endif bad // extension!
-// DEFAULT: {{.*}}:28:8: warning: extra tokens at end of #endif directive [-Wextra-tokens]
-// MSVC: {{.*}}(28,7) : warning: extra tokens at end of #endif directive [-Wextra-tokens]
-// VI: {{.*}} +28:8: warning: extra tokens at end of #endif directive [-Wextra-tokens]
-// MSVC_ORIG: {{.*}}(28) : warning: extra tokens at end of #endif directive [-Wextra-tokens]
-// NO_COLUMN: {{.*}}:28: warning: extra tokens at end of #endif directive [-Wextra-tokens]
-// MSVC-FALLBACK: {{.*}}(28,7) : error(clang): extra tokens at end of #endif directive
+// DEFAULT: {{.*}}:36:8: warning: extra tokens at end of #endif directive [-Wextra-tokens]
+// MSVC2010: {{.*}}(36,7) : warning: extra tokens at end of #endif directive [-Wextra-tokens]
+// MSVC: {{.*}}(36,8) : warning: extra tokens at end of #endif directive [-Wextra-tokens]
+// VI: {{.*}} +36:8: warning: extra tokens at end of #endif directive [-Wextra-tokens]
+// MSVC_ORIG: {{.*}}(36) : warning: extra tokens at end of #endif directive [-Wextra-tokens]
+// NO_COLUMN: {{.*}}:36: warning: extra tokens at end of #endif directive [-Wextra-tokens]
+// MSVC2010-FALLBACK: {{.*}}(36,7) : error(clang): extra tokens at end of #endif directive
+// MSVC-FALLBACK: {{.*}}(36,8) : error(clang): extra tokens at end of #endif directive
int x;
diff --git a/test/Misc/diag-mapping2.c b/test/Misc/diag-mapping2.c
index c4ade074cb05..672d0548ad82 100644
--- a/test/Misc/diag-mapping2.c
+++ b/test/Misc/diag-mapping2.c
@@ -1,22 +1,21 @@
// This should warn by default.
-// RUN: %clang_cc1 %s 2>&1 | grep "warning:"
+// RUN: %clang_cc1 %s 2>&1 | grep "warning: foo"
// This should not emit anything.
// RUN: %clang_cc1 %s -w 2>&1 | not grep diagnostic
// RUN: %clang_cc1 %s -Wno-#warnings 2>&1 | not grep diagnostic
// -Werror can map all warnings to error.
-// RUN: not %clang_cc1 %s -Werror 2>&1 | grep "error:"
+// RUN: not %clang_cc1 %s -Werror 2>&1 | grep "error: foo"
// -Werror can map this one warning to error.
-// RUN: not %clang_cc1 %s -Werror=#warnings 2>&1 | grep "error:"
+// RUN: not %clang_cc1 %s -Werror=#warnings 2>&1 | grep "error: foo"
// -Wno-error= overrides -Werror. rdar://3158301
-// RUN: %clang_cc1 %s -Werror -Wno-error=#warnings 2>&1 | grep "warning:"
+// RUN: %clang_cc1 %s -Werror -Wno-error=#warnings 2>&1 | grep "warning: foo"
// -Wno-error overrides -Werror. PR4715
-// RUN: %clang_cc1 %s -Werror -Wno-error 2>&1 | grep "warning:"
+// RUN: %clang_cc1 %s -Werror -Wno-error 2>&1 | grep "warning: foo"
#warning foo
-
diff --git a/test/Misc/diag-template-diffing.cpp b/test/Misc/diag-template-diffing.cpp
index 46807070c7cc..bdd6d62fdda2 100644
--- a/test/Misc/diag-template-diffing.cpp
+++ b/test/Misc/diag-template-diffing.cpp
@@ -24,17 +24,17 @@ namespace std {
}
} // end namespace std
// CHECK-ELIDE-NOTREE: no matching function for call to 'f'
-// CHECK-ELIDE-NOTREE: candidate function not viable: no known conversion from 'vector<class std::basic_string>' to 'vector<class versa_string>' for 1st argument
+// CHECK-ELIDE-NOTREE: candidate function not viable: no known conversion from 'vector<std::basic_string>' to 'vector<versa_string>' for 1st argument
// CHECK-NOELIDE-NOTREE: no matching function for call to 'f'
-// CHECK-NOELIDE-NOTREE: candidate function not viable: no known conversion from 'vector<class std::basic_string>' to 'vector<class versa_string>' for 1st argument
+// CHECK-NOELIDE-NOTREE: candidate function not viable: no known conversion from 'vector<std::basic_string>' to 'vector<versa_string>' for 1st argument
// CHECK-ELIDE-TREE: no matching function for call to 'f'
// CHECK-ELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument
// CHECK-ELIDE-TREE: vector<
-// CHECK-ELIDE-TREE: [class std::basic_string != class versa_string]>
+// CHECK-ELIDE-TREE: [std::basic_string != versa_string]>
// CHECK-NOELIDE-TREE: no matching function for call to 'f'
// CHECK-NOELIDE-TREE: candidate function not viable: no known conversion from argument type to parameter type for 1st argument
// CHECK-NOELIDE-TREE: vector<
-// CHECK-NOELIDE-TREE: [class std::basic_string != class versa_string]>
+// CHECK-NOELIDE-TREE: [std::basic_string != versa_string]>
template <int... A>
class I1{};
@@ -1047,7 +1047,7 @@ namespace DependentInt {
using T2 = M<C<N>>;
T2 p;
T1 x = p;
- // CHECK-ELIDE-NOTREE: no viable conversion from 'M<C<struct DependentInt::N, INT<1>>>' to 'M<C<int, INT<0>>>'
+ // CHECK-ELIDE-NOTREE: no viable conversion from 'M<C<DependentInt::N, INT<1>>>' to 'M<C<int, INT<0>>>'
}
}
@@ -1064,10 +1064,189 @@ template <typename T, typename A = allocator<const Atom *> > class vector {};
void foo() {
vector<Atom *> v;
AtomVector v2(v);
- // CHECK-ELIDE-NOTREE: no known conversion from 'vector<class PR17510::Atom *, [...]>' to 'const vector<const class PR17510::Atom *, [...]>'
+ // CHECK-ELIDE-NOTREE: no known conversion from 'vector<PR17510::Atom *, [...]>' to 'const vector<const PR17510::Atom *, [...]>'
}
}
+namespace PR15677 {
+template <bool>
+struct A{};
+
+template <typename T>
+using B = A<T::value>;
+
+template <typename T>
+using B = A<!T::value>;
+// CHECK-ELIDE-NOTREE: type alias template redefinition with different types ('A<!T::value>' vs 'A<T::value>')
+
+template <int>
+struct C{};
+
+template <typename T>
+using D = C<T::value>;
+
+template <typename T>
+using D = C<T::value + 1>;
+// CHECK-ELIDE-NOTREE: type alias template redefinition with different types ('C<T::value + 1>' vs 'C<T::value>')
+
+template <typename T>
+using E = C<T::value>;
+
+template <typename T>
+using E = C<42>;
+// CHECK-ELIDE-NOTREE: type alias template redefinition with different types ('C<42>' vs 'C<T::value>')
+
+template <typename T>
+using F = C<T::value>;
+
+template <typename T>
+using F = C<21 + 21>;
+// CHECK-ELIDE-NOTREE: type alias template redefinition with different types ('C<21 + 21 aka 42>' vs 'C<T::value>')
+}
+}
+
+namespace AddressOf {
+template <int*>
+struct S {};
+
+template <class T>
+struct Wrapper {};
+
+template <class T>
+Wrapper<T> MakeWrapper();
+int global, global2;
+constexpr int * ptr = nullptr;
+Wrapper<S<ptr>> W = MakeWrapper<S<&global>>();
+// Don't print an extra '&' for 'ptr'
+// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<&global>>' to 'Wrapper<S<ptr>>'
+
+// Handle parens correctly
+Wrapper<S<(&global2)>> W2 = MakeWrapper<S<&global>>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<&global>>' to 'Wrapper<S<&global2>>'
+Wrapper<S<&global2>> W3 = MakeWrapper<S<(&global)>>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<&global>>' to 'Wrapper<S<&global2>>'
+Wrapper<S<(&global2)>> W4 = MakeWrapper<S<(&global)>>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<&global>>' to 'Wrapper<S<&global2>>'
+}
+
+namespace NullPtr {
+template <int*, int*>
+struct S {};
+
+template <class T>
+struct Wrapper {};
+
+template <class T>
+Wrapper<T> MakeWrapper();
+int global, global2;
+constexpr int * ptr = nullptr;
+constexpr int * ptr2 = static_cast<int*>(0);
+
+S<&global> s1 = S<&global, ptr>();
+S<&global, nullptr> s2 = S<&global, ptr>();
+
+S<&global, nullptr> s3 = S<&global, &global>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'S<[...], &global>' to 'S<[...], nullptr>'
+S<&global, ptr> s4 = S<&global, &global>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'S<[...], &global>' to 'S<[...], ptr>
+
+Wrapper<S<&global, nullptr>> W1 = MakeWrapper<S<&global, ptr>>();
+Wrapper<S<&global, static_cast<int*>(0)>> W2 = MakeWrapper<S<&global, ptr>>();
+
+Wrapper<S<&global, nullptr>> W3 = MakeWrapper<S<&global, &global>>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<[...], &global>>' to 'Wrapper<S<[...], nullptr>>'
+Wrapper<S<&global, ptr>> W4 = MakeWrapper<S<&global, &global>>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<[...], &global>>' to 'Wrapper<S<[...], ptr>>'
+
+Wrapper<S<&global2, ptr>> W5 = MakeWrapper<S<&global, nullptr>>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<&global, [...]>>' to 'Wrapper<S<&global2, [...]>>'
+Wrapper<S<&global2, nullptr>> W6 = MakeWrapper<S<&global, nullptr>>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<&global, [...]>>' to 'Wrapper<S<&global2, [...]>>'
+Wrapper<S<&global2, ptr2>> W7 = MakeWrapper<S<&global, nullptr>>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<&global, [...]>>' to 'Wrapper<S<&global2, [...]>>'
+Wrapper<S<&global2, nullptr>> W8 = MakeWrapper<S<&global, ptr2>>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<&global, [...]>>' to 'Wrapper<S<&global2, [...]>>'
+Wrapper<S<&global2, ptr>> W9 = MakeWrapper<S<&global, ptr2>>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<&global, [...]>>' to 'Wrapper<S<&global2, [...]>>'
+Wrapper<S<&global2, ptr2>> W10 = MakeWrapper<S<&global, ptr>>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<&global, [...]>>' to 'Wrapper<S<&global2, [...]>>'
+Wrapper<S<&global2, static_cast<int *>(0)>> W11 =
+ MakeWrapper<S<&global, nullptr>>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<&global, [...]>>' to 'Wrapper<S<&global2, [...]>>'
+Wrapper<S<&global2, nullptr>> W12 =
+ MakeWrapper<S<&global, static_cast<int *>(0)>>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<&global, [...]>>' to 'Wrapper<S<&global2, [...]>>'
+
+Wrapper<S<&global, &global>> W13 = MakeWrapper<S<&global, ptr>>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<[...], nullptr>>' to 'Wrapper<S<[...], &global>>'
+Wrapper<S<&global, ptr>> W14 = MakeWrapper<S<&global, &global>>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'Wrapper<S<[...], &global>>' to 'Wrapper<S<[...], ptr>>'
+}
+
+namespace TemplateTemplateDefault {
+template <class> class A{};
+template <class> class B{};
+template <class> class C{};
+template <template <class> class, template <class> class = A>
+ class T {};
+
+T<A> t1 = T<A, C>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'T<[...], template C>' to 'T<[...], (default) template A>'
+T<A, C> t2 = T<A>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'T<[...], (default) template A>' to 'T<[...], template C>'
+T<A> t3 = T<B>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'T<template B>' to 'T<template A>'
+T<B, C> t4 = T<C, B>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'T<template C, template B>' to 'T<template B, template C>'
+T<A, A> t5 = T<B>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'T<template B, [...]>' to 'T<template A, [...]>'
+T<B> t6 = T<A, A>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'T<template A, [...]>' to 'T<template B, [...]>'
+}
+
+namespace Bool {
+template <class> class A{};
+A<bool> a1 = A<int>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'A<int>' to 'A<bool>'
+A<int> a2 = A<bool>();
+// CHECK-ELIDE-NOTREE: no viable conversion from 'A<bool>' to 'A<int>'
+}
+
+namespace TypeAlias {
+template <int, int = 0> class A {};
+
+template <class T> using a = A<T::num, 0>;
+template <class T> using a = A<T::num>;
+
+template <class T> using A1 = A<T::num>;
+template <class T> using A1 = A<T::num + 0>;
+// CHECK-ELIDE-NOTREE: type alias template redefinition with different types ('A<T::num + 0>' vs 'A<T::num>')
+
+template <class T> using A2 = A<1 + T::num>;
+template <class T> using A2 = A<T::num + 1>;
+// CHECK-ELIDE-NOTREE: type alias template redefinition with different types ('A<T::num + 1>' vs 'A<1 + T::num>')
+
+template <class T> using A3 = A<(T::num)>;
+template <class T> using A3 = A<T::num>;
+// CHECK-ELIDE-NOTREE: error: type alias template redefinition with different types ('A<T::num>' vs 'A<(T::num)>')
+
+ template <class T> using A4 = A<(T::num)>;
+template <class T> using A4 = A<((T::num))>;
+// CHECK-ELIDE-NOTREE: type alias template redefinition with different types ('A<((T::num))>' vs 'A<(T::num)>')
+
+template <class T> using A5 = A<T::num, 1>;
+template <class T> using A5 = A<T::num>;
+// CHECK-ELIDE-NOTREE: type alias template redefinition with different types ('A<[...], (default) 0>' vs 'A<[...], 1>')
+
+template <class T> using A6 = A<T::num + 5, 1>;
+template <class T> using A6 = A<T::num + 5>;
+// CHECK-ELIDE-NOTREE: type alias template redefinition with different types ('A<[...], (default) 0>' vs 'A<[...], 1>')
+
+template <class T> using A7 = A<T::num, 1>;
+template <class T> using A7 = A<(T::num)>;
+// CHECK-ELIDE-NOTREE: type alias template redefinition with different types ('A<(T::num), (default) 0>' vs 'A<T::num, 1>')
+}
+
// CHECK-ELIDE-NOTREE: {{[0-9]*}} errors generated.
// CHECK-NOELIDE-NOTREE: {{[0-9]*}} errors generated.
// CHECK-ELIDE-TREE: {{[0-9]*}} errors generated.
diff --git a/test/Misc/driver-verify.c b/test/Misc/driver-verify.c
new file mode 100644
index 000000000000..fa31f820b108
--- /dev/null
+++ b/test/Misc/driver-verify.c
@@ -0,0 +1,6 @@
+// RUN: not %clang -verify %s 2>&1 | FileCheck %s
+// RUN: %clang -cc1 -verify %s
+// expected-no-diagnostics
+
+// Test that -verify is strictly rejected as unknown by the driver.
+// CHECK: unknown argument: '-verify'
diff --git a/test/Misc/error-limit-multiple-notes.cpp b/test/Misc/error-limit-multiple-notes.cpp
index 71a39091f60c..a0c3967ff5bf 100644
--- a/test/Misc/error-limit-multiple-notes.cpp
+++ b/test/Misc/error-limit-multiple-notes.cpp
@@ -4,20 +4,22 @@
void foo(int);
void foo(double);
void foo(int, int);
+void foo(int, int, int, int);
int main()
{
- foo();
+ foo(1, 2, 3);
}
// error and note suppressed by error-limit
struct s1{};
struct s1{};
-// CHECK: 10:5: error: no matching function for call to 'foo'
-// CHECK: 6:6: note: candidate function not viable: requires 2 arguments, but 0 were provided
-// CHECK: 5:6: note: candidate function not viable: requires 1 argument, but 0 were provided
-// CHECK: 4:6: note: candidate function not viable: requires 1 argument, but 0 were provided
+// CHECK: 11:5: error: no matching function for call to 'foo'
+// CHECK: 6:6: note: candidate function not viable: requires 2 arguments, but 3 were provided
+// CHECK: 7:6: note: candidate function not viable: requires 4 arguments, but 3 were provided
+// CHECK: 5:6: note: candidate function not viable: requires 1 argument, but 3 were provided
+// CHECK: 4:6: note: candidate function not viable: requires 1 argument, but 3 were provided
// CHECK: fatal error: too many errors emitted, stopping now
-// CHECK-NOT: 15:8: error: redefinition of 's1'
-// CHECK-NOT: 14:8: note: previous definition is here
+// CHECK-NOT: 16:8: error: redefinition of 's1'
+// CHECK-NOT: 15:8: note: previous definition is here
diff --git a/test/Misc/interpreter.c b/test/Misc/interpreter.c
new file mode 100644
index 000000000000..42e1645b7c61
--- /dev/null
+++ b/test/Misc/interpreter.c
@@ -0,0 +1,10 @@
+// RUN: clang-interpreter %s | FileCheck %s
+// REQUIRES: native, examples
+
+int printf(const char *, ...);
+
+int main() {
+ // CHECK: {{Hello world!}}
+ printf("Hello world!\n");
+ return 0;
+}
diff --git a/test/Misc/languageOptsOpenCL.cl b/test/Misc/languageOptsOpenCL.cl
index c81db995808f..82a8f3614f37 100644
--- a/test/Misc/languageOptsOpenCL.cl
+++ b/test/Misc/languageOptsOpenCL.cl
@@ -3,17 +3,19 @@
// Test the forced language options for OpenCL are set correctly.
-__constant int v0[(sizeof(int) == 4) -1];
-__constant int v1[(__alignof(int) == 4) -1];
-__constant int v2[(sizeof(long) == 8) -1];
-__constant int v3[(__alignof(long) == 8) -1];
-__constant int v4[(sizeof(long long) == 16) -1];
-__constant int v5[(__alignof(long long) == 16) -1];
-__constant int v6[(sizeof(float) == 4) -1];
-__constant int v7[(__alignof(float) == 4) -1];
+kernel void test() {
+ int v0[(sizeof(int) == 4) - 1];
+ int v1[(__alignof(int)== 4) - 1];
+ int v2[(sizeof(long) == 8) - 1];
+ int v3[(__alignof(long)== 8) - 1];
+ int v4[(sizeof(long long) == 16) - 1];
+ int v5[(__alignof(long long)== 16) - 1];
+ int v6[(sizeof(float) == 4) - 1];
+ int v7[(__alignof(float)== 4) - 1];
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
-__constant int v8[(sizeof(double)==8) -1];
-__constant int v9[(__alignof(double)==8) -1];
+ int v8[(sizeof(double) == 8) - 1];
+ int v9[(__alignof(double)== 8) - 1];
#pragma OPENCL EXTENSION cl_khr_fp16 : enable
-__constant int v10[(sizeof(half) == 2) -1];
-__constant int v11[(__alignof(half) == 2) -1];
+ int v10[(sizeof(half) == 2) - 1];
+ int v11[(__alignof(half) == 2) - 1];
+}
diff --git a/test/Misc/serialized-diags-stable.c b/test/Misc/serialized-diags-stable.c
new file mode 100644
index 000000000000..4bd4c99af31e
--- /dev/null
+++ b/test/Misc/serialized-diags-stable.c
@@ -0,0 +1,20 @@
+// RUN: rm -f %t
+// RUN: not %clang -Wall -fsyntax-only %s --serialize-diagnostics %t.dia > /dev/null 2>&1
+// RUN: c-index-test -read-diagnostics %t.dia 2>&1 | FileCheck %s
+
+// RUN: c-index-test -read-diagnostics %S/Inputs/serialized-diags-stable.dia 2>&1 | FileCheck %s
+
+int foo() {
+ // CHECK: serialized-diags-stable.c:[[@LINE+2]]:1: warning: control reaches end of non-void function [-Wreturn-type] [Semantic Issue]
+ // CHECK-NEXT: Number FIXITs = 0
+}
+
+// CHECK: serialized-diags-stable.c:[[@LINE+5]]:13: error: redefinition of 'bar' as different kind of symbol [] [Semantic Issue]
+// CHECK-NEXT: Number FIXITs = 0
+// CHECK-NEXT: +-{{.*}}serialized-diags-stable.c:[[@LINE+2]]:6: note: previous definition is here [] []
+// CHECK-NEXT: Number FIXITs = 0
+void bar() {}
+typedef int bar;
+
+
+// CHECK-LABEL: Number of diagnostics: 2
diff --git a/test/Misc/verify.c b/test/Misc/verify.c
index 85b034e95724..9fe83e122e15 100644
--- a/test/Misc/verify.c
+++ b/test/Misc/verify.c
@@ -7,8 +7,8 @@ struct s s1; // expected-error {{tentative definition has type 'struct s' that i
struct s s2; // expected-error {{tentative definition has type}}
// regex matching
-struct s r1; // expected-error-re {{tentative definition has type 'struct s' that is never completed}}
-struct s r2; // expected-error-re {{tentative definition has type '.*[[:space:]]*.*' that is never completed}}
-struct s r3; // expected-error-re {{tentative definition has type '(.*)[[:space:]]*(.*)' that is never completed}}
-struct s r4; // expected-error-re {{^tentative}}
-struct s r5; // expected-error-re {{completed$}}
+struct s r1; // expected-error {{tentative definition has type 'struct s' that is never completed}}
+struct s r2; // expected-error-re {{tentative definition has type '{{.*[[:space:]]*.*}}' that is never completed}}
+struct s r3; // expected-error-re {{tentative definition has type '{{(.*)[[:space:]]*(.*)}}' that is never completed}}
+struct s r4; // expected-error-re {{{{^}}tentative}}
+struct s r5; // expected-error-re {{completed{{$}}}}
diff --git a/test/Misc/warn-sysheader.cpp b/test/Misc/warn-sysheader.cpp
new file mode 100644
index 000000000000..dbc38258c4d2
--- /dev/null
+++ b/test/Misc/warn-sysheader.cpp
@@ -0,0 +1,33 @@
+// Test that -Wsystem-headers works with default and custom mappings like -Werror.
+// Keep run lines at the bottom for line number stability.
+
+#ifdef IS_SYSHEADER
+#pragma clang system_header
+
+int f() { return (int)0; } // Use the old-style-cast warning as an arbitrary "ordinary" diagnostic for the purpose of testing.
+
+#warning "custom message"
+
+#if defined(A) || defined(B)
+// expected-warning@9 {{"custom message"}}
+#elif defined(C)
+// expected-warning@7 {{use of old-style cast}}
+// expected-warning@9 {{"custom message"}}
+#elif defined(D)
+// expected-error@7 {{use of old-style cast}}
+// expected-error@9 {{"custom message"}}
+#elif defined(E)
+// expected-error@7 {{use of old-style cast}}
+// expected-warning@9 {{"custom message"}}
+#endif
+
+#else
+#define IS_SYSHEADER
+#include __FILE__
+#endif
+
+// RUN: %clang_cc1 -verify -fsyntax-only -DA %s
+// RUN: %clang_cc1 -verify -fsyntax-only -DB -Wold-style-cast %s
+// RUN: %clang_cc1 -verify -fsyntax-only -DC -Wold-style-cast -Wsystem-headers %s
+// RUN: %clang_cc1 -verify -fsyntax-only -DD -Wold-style-cast -Wsystem-headers -Werror %s
+// RUN: %clang_cc1 -verify -fsyntax-only -DE -Wold-style-cast -Wsystem-headers -Werror=old-style-cast %s
diff --git a/test/Misc/warning-flags.c b/test/Misc/warning-flags.c
index e61225ad20a5..f58d2bf52b1f 100644
--- a/test/Misc/warning-flags.c
+++ b/test/Misc/warning-flags.c
@@ -18,23 +18,25 @@ This test serves two purposes:
The list of warnings below should NEVER grow. It should gradually shrink to 0.
-CHECK: Warnings without flags (134):
+CHECK: Warnings without flags (103):
CHECK-NEXT: ext_delete_void_ptr_operand
+CHECK-NEXT: ext_excess_initializers
+CHECK-NEXT: ext_excess_initializers_in_char_array_initializer
CHECK-NEXT: ext_expected_semi_decl_list
CHECK-NEXT: ext_explicit_specialization_storage_class
CHECK-NEXT: ext_implicit_lib_function_decl
+CHECK-NEXT: ext_initializer_string_for_char_array_too_long
+CHECK-NEXT: ext_many_braces_around_scalar_init
CHECK-NEXT: ext_missing_declspec
CHECK-NEXT: ext_missing_whitespace_after_macro_name
CHECK-NEXT: ext_new_paren_array_nonconst
CHECK-NEXT: ext_plain_complex
-CHECK-NEXT: ext_pp_macro_redef
CHECK-NEXT: ext_template_arg_extra_parens
CHECK-NEXT: ext_typecheck_comparison_of_pointer_integer
CHECK-NEXT: ext_typecheck_cond_incompatible_operands
CHECK-NEXT: ext_typecheck_cond_incompatible_operands_nonstandard
CHECK-NEXT: ext_typecheck_ordered_comparison_of_function_pointers
CHECK-NEXT: ext_typecheck_ordered_comparison_of_pointer_integer
-CHECK-NEXT: ext_unknown_escape
CHECK-NEXT: ext_using_undefined_std
CHECK-NEXT: pp_include_next_absolute_path
CHECK-NEXT: pp_include_next_in_primary
@@ -46,9 +48,9 @@ CHECK-NEXT: pp_pragma_sysheader_in_main_file
CHECK-NEXT: w_asm_qualifier_ignored
CHECK-NEXT: warn_accessor_property_type_mismatch
CHECK-NEXT: warn_anon_bitfield_width_exceeds_type_size
+CHECK-NEXT: warn_arcmt_nsalloc_realloc
CHECK-NEXT: warn_asm_label_on_auto_decl
CHECK-NEXT: warn_bitfield_width_exceeds_type_size
-CHECK-NEXT: warn_bool_switch_condition
CHECK-NEXT: warn_braces_around_scalar_init
CHECK-NEXT: warn_c_kext
CHECK-NEXT: warn_call_to_pure_virtual_member_function_from_ctor_dtor
@@ -68,12 +70,8 @@ CHECK-NEXT: warn_drv_objc_gc_unsupported
CHECK-NEXT: warn_drv_pch_not_first_include
CHECK-NEXT: warn_dup_category_def
CHECK-NEXT: warn_duplicate_protocol_def
-CHECK-NEXT: warn_enum_too_large
CHECK-NEXT: warn_enum_value_overflow
-CHECK-NEXT: warn_enumerator_too_large
CHECK-NEXT: warn_exception_caught_by_earlier_handler
-CHECK-NEXT: warn_excess_initializers
-CHECK-NEXT: warn_excess_initializers_in_char_array_initializer
CHECK-NEXT: warn_expected_qualified_after_typename
CHECK-NEXT: warn_extraneous_char_constant
CHECK-NEXT: warn_fe_cc_log_diagnostics_failure
@@ -83,55 +81,28 @@ CHECK-NEXT: warn_file_asm_volatile
CHECK-NEXT: warn_ignoring_ftabstop_value
CHECK-NEXT: warn_implements_nscopying
CHECK-NEXT: warn_incompatible_qualified_id
-CHECK-NEXT: warn_initializer_string_for_char_array_too_long
CHECK-NEXT: warn_inline_namespace_reopened_noninline
-CHECK-NEXT: warn_integer_too_large_for_signed
CHECK-NEXT: warn_invalid_asm_cast_lvalue
-CHECK-NEXT: warn_many_braces_around_scalar_init
CHECK-NEXT: warn_maynot_respond
CHECK-NEXT: warn_method_param_redefinition
-CHECK-NEXT: warn_mismatched_exception_spec
CHECK-NEXT: warn_missing_case_for_condition
CHECK-NEXT: warn_missing_dependent_template_keyword
CHECK-NEXT: warn_missing_exception_specification
CHECK-NEXT: warn_missing_whitespace_after_macro_name
+CHECK-NEXT: warn_mt_message
CHECK-NEXT: warn_multiple_method_decl
CHECK-NEXT: warn_no_constructor_for_refconst
-CHECK-NEXT: warn_nonnull_pointers_only
CHECK-NEXT: warn_not_compound_assign
CHECK-NEXT: warn_objc_property_copy_missing_on_block
CHECK-NEXT: warn_objc_protocol_qualifier_missing_id
CHECK-NEXT: warn_on_superclass_use
-CHECK-NEXT: warn_param_default_argument_redefinition
CHECK-NEXT: warn_partial_specs_not_deducible
CHECK-NEXT: warn_pp_convert_lhs_to_positive
CHECK-NEXT: warn_pp_convert_rhs_to_positive
CHECK-NEXT: warn_pp_expr_overflow
CHECK-NEXT: warn_pp_line_decimal
-CHECK-NEXT: warn_pragma_align_expected_equal
-CHECK-NEXT: warn_pragma_align_invalid_option
-CHECK-NEXT: warn_pragma_debug_unexpected_command
-CHECK-NEXT: warn_pragma_expected_colon
-CHECK-NEXT: warn_pragma_expected_enable_disable
-CHECK-NEXT: warn_pragma_expected_identifier
-CHECK-NEXT: warn_pragma_expected_lparen
-CHECK-NEXT: warn_pragma_expected_rparen
-CHECK-NEXT: warn_pragma_extra_tokens_at_eol
-CHECK-NEXT: warn_pragma_ms_struct
-CHECK-NEXT: warn_pragma_options_align_reset_failed
-CHECK-NEXT: warn_pragma_options_expected_align
-CHECK-NEXT: warn_pragma_pack_invalid_action
-CHECK-NEXT: warn_pragma_pack_invalid_alignment
-CHECK-NEXT: warn_pragma_pack_malformed
-CHECK-NEXT: warn_pragma_pack_pop_failed
CHECK-NEXT: warn_pragma_pack_pop_identifer_and_alignment
CHECK-NEXT: warn_pragma_pack_show
-CHECK-NEXT: warn_pragma_pop_macro_no_push
-CHECK-NEXT: warn_pragma_unknown_extension
-CHECK-NEXT: warn_pragma_unused_expected_punc
-CHECK-NEXT: warn_pragma_unused_expected_var
-CHECK-NEXT: warn_pragma_unused_expected_var_arg
-CHECK-NEXT: warn_pragma_unused_undeclared_var
CHECK-NEXT: warn_property_attr_mismatch
CHECK-NEXT: warn_property_attribute
CHECK-NEXT: warn_property_getter_owning_mismatch
@@ -141,12 +112,10 @@ CHECK-NEXT: warn_redeclaration_without_attribute_prev_attribute_ignored
CHECK-NEXT: warn_register_objc_catch_parm
CHECK-NEXT: warn_related_result_type_compatibility_class
CHECK-NEXT: warn_related_result_type_compatibility_protocol
-CHECK-NEXT: warn_static_non_static
CHECK-NEXT: warn_template_export_unsupported
CHECK-NEXT: warn_template_spec_extra_headers
CHECK-NEXT: warn_tentative_incomplete_array
CHECK-NEXT: warn_typecheck_function_qualifiers
-CHECK-NEXT: warn_unavailable_fwdclass_message
CHECK-NEXT: warn_undef_interface
CHECK-NEXT: warn_undef_interface_suggest
CHECK-NEXT: warn_undef_protocolref
diff --git a/test/Misc/win32-macho.c b/test/Misc/win32-macho.c
new file mode 100644
index 000000000000..517bde9af936
--- /dev/null
+++ b/test/Misc/win32-macho.c
@@ -0,0 +1,2 @@
+// Check that basic use of win32-macho targets works.
+// RUN: %clang -fsyntax-only -target x86_64-pc-win32-macho %s
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/el/fp64/nan2008/usr/lib/crt1.o b/test/Modules/Inputs/ModuleMapLocations/Both/a.h
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/el/fp64/nan2008/usr/lib/crt1.o
+++ b/test/Modules/Inputs/ModuleMapLocations/Both/a.h
diff --git a/test/Modules/Inputs/ModuleMapLocations/Both/b.h b/test/Modules/Inputs/ModuleMapLocations/Both/b.h
new file mode 100644
index 000000000000..3abbd398c7e2
--- /dev/null
+++ b/test/Modules/Inputs/ModuleMapLocations/Both/b.h
@@ -0,0 +1 @@
+void wont_be_found1(void);
diff --git a/test/Modules/Inputs/ModuleMapLocations/Both/module.map b/test/Modules/Inputs/ModuleMapLocations/Both/module.map
new file mode 100644
index 000000000000..bf5aaed37ab0
--- /dev/null
+++ b/test/Modules/Inputs/ModuleMapLocations/Both/module.map
@@ -0,0 +1,3 @@
+module both {
+ header "b.h"
+}
diff --git a/test/Modules/Inputs/ModuleMapLocations/Both/module.modulemap b/test/Modules/Inputs/ModuleMapLocations/Both/module.modulemap
new file mode 100644
index 000000000000..0bfa0968c45f
--- /dev/null
+++ b/test/Modules/Inputs/ModuleMapLocations/Both/module.modulemap
@@ -0,0 +1,3 @@
+module both {
+ header "a.h"
+}
diff --git a/test/Modules/Inputs/ModuleMapLocations/Both_F.framework/Headers/a.h b/test/Modules/Inputs/ModuleMapLocations/Both_F.framework/Headers/a.h
new file mode 100644
index 000000000000..9dabfc089a15
--- /dev/null
+++ b/test/Modules/Inputs/ModuleMapLocations/Both_F.framework/Headers/a.h
@@ -0,0 +1 @@
+void will_be_found2(void);
diff --git a/test/Modules/Inputs/ModuleMapLocations/Both_F.framework/Headers/b.h b/test/Modules/Inputs/ModuleMapLocations/Both_F.framework/Headers/b.h
new file mode 100644
index 000000000000..26169fa2f693
--- /dev/null
+++ b/test/Modules/Inputs/ModuleMapLocations/Both_F.framework/Headers/b.h
@@ -0,0 +1 @@
+void wont_be_found2(void);
diff --git a/test/Modules/Inputs/ModuleMapLocations/Both_F.framework/Modules/module.modulemap b/test/Modules/Inputs/ModuleMapLocations/Both_F.framework/Modules/module.modulemap
new file mode 100644
index 000000000000..da49ba5392f5
--- /dev/null
+++ b/test/Modules/Inputs/ModuleMapLocations/Both_F.framework/Modules/module.modulemap
@@ -0,0 +1,3 @@
+framework module Both_F {
+ header "a.h"
+}
diff --git a/test/Modules/Inputs/ModuleMapLocations/Both_F.framework/module.map b/test/Modules/Inputs/ModuleMapLocations/Both_F.framework/module.map
new file mode 100644
index 000000000000..8fc108d3eaa7
--- /dev/null
+++ b/test/Modules/Inputs/ModuleMapLocations/Both_F.framework/module.map
@@ -0,0 +1,3 @@
+framework module Both_F {
+ header "b.h"
+}
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/el/fp64/nan2008/usr/lib/crti.o b/test/Modules/Inputs/ModuleMapLocations/Inferred.framework/Headers/Inferred.h
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/el/fp64/nan2008/usr/lib/crti.o
+++ b/test/Modules/Inputs/ModuleMapLocations/Inferred.framework/Headers/Inferred.h
diff --git a/test/Modules/Inputs/ModuleMapLocations/Module_ModuleMap/a.h b/test/Modules/Inputs/ModuleMapLocations/Module_ModuleMap/a.h
new file mode 100644
index 000000000000..d571c6e4f799
--- /dev/null
+++ b/test/Modules/Inputs/ModuleMapLocations/Module_ModuleMap/a.h
@@ -0,0 +1 @@
+void will_be_found1(void);
diff --git a/test/Modules/Inputs/ModuleMapLocations/Module_ModuleMap/module.modulemap b/test/Modules/Inputs/ModuleMapLocations/Module_ModuleMap/module.modulemap
new file mode 100644
index 000000000000..2ac7cc52b4f3
--- /dev/null
+++ b/test/Modules/Inputs/ModuleMapLocations/Module_ModuleMap/module.modulemap
@@ -0,0 +1,3 @@
+module module_modulemap {
+ header "a.h"
+}
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/el/fp64/nan2008/usr/lib/crtn.o b/test/Modules/Inputs/ModuleMapLocations/Module_ModuleMap_F.framework/Headers/a.h
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/el/fp64/nan2008/usr/lib/crtn.o
+++ b/test/Modules/Inputs/ModuleMapLocations/Module_ModuleMap_F.framework/Headers/a.h
diff --git a/test/Modules/Inputs/ModuleMapLocations/Module_ModuleMap_F.framework/Modules/module.modulemap b/test/Modules/Inputs/ModuleMapLocations/Module_ModuleMap_F.framework/Modules/module.modulemap
new file mode 100644
index 000000000000..400f3043e7ab
--- /dev/null
+++ b/test/Modules/Inputs/ModuleMapLocations/Module_ModuleMap_F.framework/Modules/module.modulemap
@@ -0,0 +1,3 @@
+framework module Module_ModuleMap_F {
+ header "a.h"
+}
diff --git a/test/Modules/Inputs/ModuleMapLocations/Module_ModuleMap_F.framework/Modules/module.private.modulemap b/test/Modules/Inputs/ModuleMapLocations/Module_ModuleMap_F.framework/Modules/module.private.modulemap
new file mode 100644
index 000000000000..25a469dafbe2
--- /dev/null
+++ b/test/Modules/Inputs/ModuleMapLocations/Module_ModuleMap_F.framework/Modules/module.private.modulemap
@@ -0,0 +1,3 @@
+explicit framework module Module_ModuleMap_F.Private {
+ header "private.h"
+}
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/el/fp64/usr/lib/crt1.o b/test/Modules/Inputs/ModuleMapLocations/Module_ModuleMap_F.framework/PrivateHeaders/private.h
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/el/fp64/usr/lib/crt1.o
+++ b/test/Modules/Inputs/ModuleMapLocations/Module_ModuleMap_F.framework/PrivateHeaders/private.h
diff --git a/test/Modules/Inputs/ModuleMapLocations/module.modulemap b/test/Modules/Inputs/ModuleMapLocations/module.modulemap
new file mode 100644
index 000000000000..a8f5d1fbf258
--- /dev/null
+++ b/test/Modules/Inputs/ModuleMapLocations/module.modulemap
@@ -0,0 +1,2 @@
+framework module * {
+}
diff --git a/test/Modules/Inputs/autolink-sub3.h b/test/Modules/Inputs/autolink-sub3.h
new file mode 100644
index 000000000000..132c72976cd5
--- /dev/null
+++ b/test/Modules/Inputs/autolink-sub3.h
@@ -0,0 +1 @@
+int autolink_sub3(void);
diff --git a/test/Modules/Inputs/autolink-sub3.pch b/test/Modules/Inputs/autolink-sub3.pch
new file mode 100644
index 000000000000..f63b2d5b25b3
--- /dev/null
+++ b/test/Modules/Inputs/autolink-sub3.pch
@@ -0,0 +1 @@
+@import autolink.sub3;
diff --git a/test/Modules/Inputs/c-header-bad.h b/test/Modules/Inputs/c-header-bad.h
new file mode 100644
index 000000000000..7f7cd8701ee0
--- /dev/null
+++ b/test/Modules/Inputs/c-header-bad.h
@@ -0,0 +1,4 @@
+} // expected-error {{extraneous closing brace ('}')}}
+int not_in_extern_c;
+extern "C" { // expected-note {{to match this '{'}}
+// expected-error {{expected '}'}}
diff --git a/test/Modules/Inputs/c-header.h b/test/Modules/Inputs/c-header.h
new file mode 100644
index 000000000000..e12f6446729d
--- /dev/null
+++ b/test/Modules/Inputs/c-header.h
@@ -0,0 +1 @@
+int f(void);
diff --git a/test/Modules/Inputs/cxx-decls-imported.h b/test/Modules/Inputs/cxx-decls-imported.h
index b94368614dfb..38cc00d863f2 100644
--- a/test/Modules/Inputs/cxx-decls-imported.h
+++ b/test/Modules/Inputs/cxx-decls-imported.h
@@ -3,3 +3,23 @@ class HasFriends {
friend void friend_2(HasFriends);
void private_thing();
};
+
+struct HasNontrivialDefaultConstructor {
+ HasNontrivialDefaultConstructor() = default;
+ HasNontrivialDefaultConstructor(int n = 0);
+
+ // Ensure this class is not POD but is still trivially-copyable.
+ // This is necessary to exercise the second static_assert below,
+ // because GCC's spec for __has_trivial_constructor is absurd.
+ int m;
+private:
+ int n;
+};
+
+static_assert(!__is_trivial(HasNontrivialDefaultConstructor), "");
+static_assert(!__has_trivial_constructor(HasNontrivialDefaultConstructor), "");
+
+void *operator new[](__SIZE_TYPE__);
+
+extern int mergeUsedFlag;
+inline int getMergeUsedFlag() { return mergeUsedFlag; }
diff --git a/test/Modules/Inputs/cxx-decls-merged.h b/test/Modules/Inputs/cxx-decls-merged.h
new file mode 100644
index 000000000000..ccc3b0154872
--- /dev/null
+++ b/test/Modules/Inputs/cxx-decls-merged.h
@@ -0,0 +1 @@
+extern int mergeUsedFlag;
diff --git a/test/Modules/Inputs/cxx-header.h b/test/Modules/Inputs/cxx-header.h
new file mode 100644
index 000000000000..7ed777512290
--- /dev/null
+++ b/test/Modules/Inputs/cxx-header.h
@@ -0,0 +1 @@
+int f();
diff --git a/test/Modules/Inputs/cxx-inline-namespace-b.h b/test/Modules/Inputs/cxx-inline-namespace-b.h
new file mode 100644
index 000000000000..242a585673ae
--- /dev/null
+++ b/test/Modules/Inputs/cxx-inline-namespace-b.h
@@ -0,0 +1,5 @@
+@import cxx_inline_namespace;
+
+struct X::Y::Z {
+ void f(struct Elaborated);
+};
diff --git a/test/Modules/Inputs/cxx-inline-namespace.h b/test/Modules/Inputs/cxx-inline-namespace.h
index 2525ad3569c0..4feb8501801e 100644
--- a/test/Modules/Inputs/cxx-inline-namespace.h
+++ b/test/Modules/Inputs/cxx-inline-namespace.h
@@ -9,3 +9,9 @@ namespace std {
typedef int size_t;
}
}
+
+namespace X {
+ inline namespace Y {
+ struct Z;
+ }
+}
diff --git a/test/Modules/Inputs/cxx-irgen-left.h b/test/Modules/Inputs/cxx-irgen-left.h
new file mode 100644
index 000000000000..ceb50846bbf4
--- /dev/null
+++ b/test/Modules/Inputs/cxx-irgen-left.h
@@ -0,0 +1,11 @@
+#include "cxx-irgen-top.h"
+
+S<int> s;
+
+inline int instantiate_min() {
+ return min(1, 2);
+}
+
+inline int instantiate_CtorInit(CtorInit<int> i = CtorInit<int>()) {
+ return i.a;
+}
diff --git a/test/Modules/Inputs/cxx-irgen-right.h b/test/Modules/Inputs/cxx-irgen-right.h
new file mode 100644
index 000000000000..4400c760f07a
--- /dev/null
+++ b/test/Modules/Inputs/cxx-irgen-right.h
@@ -0,0 +1,3 @@
+#include "cxx-irgen-top.h"
+
+inline int h() { return S<int>::f(); }
diff --git a/test/Modules/Inputs/cxx-irgen-top.h b/test/Modules/Inputs/cxx-irgen-top.h
new file mode 100644
index 000000000000..8753d8daa3dc
--- /dev/null
+++ b/test/Modules/Inputs/cxx-irgen-top.h
@@ -0,0 +1,16 @@
+template<typename T> struct S {
+ __attribute__((always_inline)) static int f() { return 0; }
+ __attribute__((always_inline, visibility("hidden"))) static int g() { return 0; }
+};
+
+extern template struct S<int>;
+
+template<typename T> T min(T a, T b) { return a < b ? a : b; }
+
+extern decltype(min(1, 2)) instantiate_min_decl;
+
+template<typename T> struct CtorInit {
+ static int f() { return 0; }
+ int a;
+ CtorInit() : a(f()) {}
+};
diff --git a/test/Modules/Inputs/cxx-templates-a.h b/test/Modules/Inputs/cxx-templates-a.h
index 0b1614d3d9e6..c95dc6325e49 100644
--- a/test/Modules/Inputs/cxx-templates-a.h
+++ b/test/Modules/Inputs/cxx-templates-a.h
@@ -48,3 +48,28 @@ template<typename T> struct MergeSpecializations<T*> {
template<> struct MergeSpecializations<char> {
typedef int explicitly_specialized_in_a;
};
+
+void InstantiateWithFriend(Std::WithFriend<int> wfi) {}
+
+template<typename T> struct WithPartialSpecialization<T*> {
+ typedef int type;
+ T &f() { static T t; return t; }
+};
+typedef WithPartialSpecializationUse::type WithPartialSpecializationInstantiate;
+
+template<> struct WithExplicitSpecialization<int> {
+ int n;
+ template<typename T> T &inner_template() {
+ return n;
+ }
+};
+
+template<typename T> template<typename U>
+constexpr int Outer<T>::Inner<U>::f() { return 1; }
+static_assert(Outer<int>::Inner<int>::f() == 1, "");
+
+template<typename T> struct MergeTemplateDefinitions {
+ static constexpr int f();
+ static constexpr int g();
+};
+template<typename T> constexpr int MergeTemplateDefinitions<T>::f() { return 1; }
diff --git a/test/Modules/Inputs/cxx-templates-b-impl.h b/test/Modules/Inputs/cxx-templates-b-impl.h
index fdf4a4fbc4d4..93d057433dd3 100644
--- a/test/Modules/Inputs/cxx-templates-b-impl.h
+++ b/test/Modules/Inputs/cxx-templates-b-impl.h
@@ -3,3 +3,10 @@ struct DefinedInBImpl {
struct Inner {};
friend void FoundByADL(DefinedInBImpl);
};
+
+@import cxx_templates_common;
+template struct TemplateInstantiationVisibility<char[1]>;
+extern template struct TemplateInstantiationVisibility<char[2]>;
+template<> struct TemplateInstantiationVisibility<char[3]> {};
+extern TemplateInstantiationVisibility<char[4]>::type
+ TemplateInstantiationVisibility_ImplicitInstantiation;
diff --git a/test/Modules/Inputs/cxx-templates-b.h b/test/Modules/Inputs/cxx-templates-b.h
index 6cd83faf1a1b..efd07c617e52 100644
--- a/test/Modules/Inputs/cxx-templates-b.h
+++ b/test/Modules/Inputs/cxx-templates-b.h
@@ -20,6 +20,10 @@ extern DefinedInCommon &defined_in_common;
template<int> struct MergeTemplates;
MergeTemplates<0> *merge_templates_b;
+template<typename T> template<typename U>
+constexpr int Outer<T>::Inner<U>::g() { return 2; }
+static_assert(Outer<int>::Inner<int>::g() == 2, "");
+
@import cxx_templates_b_impl;
template<typename T, typename> struct Identity { typedef T type; };
@@ -66,4 +70,5 @@ template<typename T> void UseDefinedInBImplIndirectly(T &v) {
void TriggerInstantiation() {
UseDefinedInBImpl<void>();
+ Std::f<int>();
}
diff --git a/test/Modules/Inputs/cxx-templates-c.h b/test/Modules/Inputs/cxx-templates-c.h
index 4c0fc8a4a825..6daffadc6ced 100644
--- a/test/Modules/Inputs/cxx-templates-c.h
+++ b/test/Modules/Inputs/cxx-templates-c.h
@@ -5,3 +5,9 @@ template<typename T> struct MergeSpecializations<T[]> {
template<> struct MergeSpecializations<bool> {
typedef int explicitly_specialized_in_c;
};
+
+template<typename T> struct MergeTemplateDefinitions {
+ static constexpr int f();
+ static constexpr int g();
+};
+template<typename T> constexpr int MergeTemplateDefinitions<T>::g() { return 2; }
diff --git a/test/Modules/Inputs/cxx-templates-common.h b/test/Modules/Inputs/cxx-templates-common.h
index 40a11e20b4f0..682ef939cec0 100644
--- a/test/Modules/Inputs/cxx-templates-common.h
+++ b/test/Modules/Inputs/cxx-templates-common.h
@@ -9,3 +9,30 @@ struct DefinedInCommon {
template<typename T> struct CommonTemplate {
enum E { a = 1, b = 2, c = 3 };
};
+
+namespace Std {
+ template<typename T> struct WithFriend {
+ friend bool operator!=(const WithFriend &A, const WithFriend &B) { return false; }
+ };
+}
+
+namespace Std {
+ template<typename T> void f() {
+ extern T g();
+ }
+}
+
+template<typename T> struct TemplateInstantiationVisibility { typedef int type; };
+
+template<typename T> struct Outer {
+ template<typename U> struct Inner {
+ static constexpr int f();
+ static constexpr int g();
+ };
+};
+
+template<typename T> struct WithPartialSpecialization {};
+typedef WithPartialSpecialization<int*> WithPartialSpecializationUse;
+
+template<typename T> struct WithExplicitSpecialization;
+typedef WithExplicitSpecialization<int> WithExplicitSpecializationUse;
diff --git a/test/Modules/Inputs/declare-use/e.h b/test/Modules/Inputs/declare-use/e.h
index ed8d843f9a85..31247f7f9c7d 100644
--- a/test/Modules/Inputs/declare-use/e.h
+++ b/test/Modules/Inputs/declare-use/e.h
@@ -1,6 +1,7 @@
#ifndef E_H
#define E_H
-#include "a.h"
+#define HEADER "a.h"
+#include HEADER
#include "b.h"
const int e = a*b;
#endif
diff --git a/test/Modules/Inputs/declare-use/h.h b/test/Modules/Inputs/declare-use/h.h
index df99a6dd10ae..379e50180ca1 100644
--- a/test/Modules/Inputs/declare-use/h.h
+++ b/test/Modules/Inputs/declare-use/h.h
@@ -1,7 +1,7 @@
#ifndef H_H
#define H_H
#include "c.h"
-#include "d.h" // expected-error {{use of a module not declared used}}
+#include "d.h" // expected-error {{does not depend on a module exporting}}
#include "h1.h"
const int h1 = aux_h*c*7*d;
#endif
diff --git a/test/Modules/Inputs/declare-use/i.h b/test/Modules/Inputs/declare-use/i.h
new file mode 100644
index 000000000000..30e7ded79b79
--- /dev/null
+++ b/test/Modules/Inputs/declare-use/i.h
@@ -0,0 +1 @@
+int aux_i = 13;
diff --git a/test/Modules/Inputs/declare-use/j.h b/test/Modules/Inputs/declare-use/j.h
new file mode 100644
index 000000000000..04d46a9fb2b7
--- /dev/null
+++ b/test/Modules/Inputs/declare-use/j.h
@@ -0,0 +1,14 @@
+#ifndef J_H
+#define J_H
+
+#define STR(x) #x
+#define HDR(x) STR(x.h)
+
+#include ALLOWED_INC
+#include HDR(a)
+
+const int j = a * a + b;
+
+// expected-no-diagnostics
+
+#endif
diff --git a/test/Modules/Inputs/declare-use/module.map b/test/Modules/Inputs/declare-use/module.map
index 774fc37760c9..a176fb3a141f 100644
--- a/test/Modules/Inputs/declare-use/module.map
+++ b/test/Modules/Inputs/declare-use/module.map
@@ -9,21 +9,25 @@ module XB {
module XC {
header "c.h"
use XA
+ // Intentionally doesn't use XB to show that -fdecl-use isn't transitive.
}
module XD {
header "d.h"
use XA
+ // Intentionally doesn't use XB to show that -fdecl-use isn't transitive.
}
module XE {
header "e.h"
+ header "unavailable.h"
use XA
use XB
}
module XF {
header "f.h"
+ header "unavailable.h"
use XA
use XB
}
@@ -33,11 +37,20 @@ module XG {
header "g1.h"
use XC
use XE
+ use XJ
}
module XH {
header "h.h"
header "h1.h"
+ header "s.h"
use XC
use XE
}
+
+module XJ {
+ header "j.h"
+}
+
+module XS {
+}
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/el/fp64/usr/lib/crti.o b/test/Modules/Inputs/declare-use/s.h
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/el/fp64/usr/lib/crti.o
+++ b/test/Modules/Inputs/declare-use/s.h
diff --git a/test/Modules/Inputs/elsewhere/c-header-indirect.h b/test/Modules/Inputs/elsewhere/c-header-indirect.h
new file mode 100644
index 000000000000..083c41f77c5e
--- /dev/null
+++ b/test/Modules/Inputs/elsewhere/c-header-indirect.h
@@ -0,0 +1 @@
+#include "c-header.h"
diff --git a/test/Modules/Inputs/elsewhere/module.map b/test/Modules/Inputs/elsewhere/module.map
new file mode 100644
index 000000000000..2c56820676aa
--- /dev/null
+++ b/test/Modules/Inputs/elsewhere/module.map
@@ -0,0 +1 @@
+module c_library_indirect { header "c-header-indirect.h" }
diff --git a/test/Modules/Inputs/exclude-header/module.map b/test/Modules/Inputs/exclude-header/module.map
new file mode 100644
index 000000000000..2563ef9dc9cd
--- /dev/null
+++ b/test/Modules/Inputs/exclude-header/module.map
@@ -0,0 +1,3 @@
+module x { umbrella "x" exclude header "x/bad.h" module * {} }
+module y { umbrella "y" module * {} }
+module bad { header "x/bad.h" }
diff --git a/test/Modules/Inputs/exclude-header/x/a.h b/test/Modules/Inputs/exclude-header/x/a.h
new file mode 100644
index 000000000000..389d285a4582
--- /dev/null
+++ b/test/Modules/Inputs/exclude-header/x/a.h
@@ -0,0 +1 @@
+typedef int a;
diff --git a/test/Modules/Inputs/exclude-header/x/bad.h b/test/Modules/Inputs/exclude-header/x/bad.h
new file mode 100644
index 000000000000..179ef267be22
--- /dev/null
+++ b/test/Modules/Inputs/exclude-header/x/bad.h
@@ -0,0 +1 @@
+#error bad
diff --git a/test/Modules/Inputs/exclude-header/y/b.h b/test/Modules/Inputs/exclude-header/y/b.h
new file mode 100644
index 000000000000..a16836aac77f
--- /dev/null
+++ b/test/Modules/Inputs/exclude-header/y/b.h
@@ -0,0 +1 @@
+typedef int b;
diff --git a/test/Modules/Inputs/include-relative/a.h b/test/Modules/Inputs/include-relative/a.h
new file mode 100644
index 000000000000..b95284b323b2
--- /dev/null
+++ b/test/Modules/Inputs/include-relative/a.h
@@ -0,0 +1 @@
+extern int n;
diff --git a/test/Modules/Inputs/include-relative/module.map b/test/Modules/Inputs/include-relative/module.map
new file mode 100644
index 000000000000..bb00c840ce39
--- /dev/null
+++ b/test/Modules/Inputs/include-relative/module.map
@@ -0,0 +1 @@
+module a { header "a.h" }
diff --git a/test/Modules/Inputs/macro-hiding/a1.h b/test/Modules/Inputs/macro-hiding/a1.h
new file mode 100644
index 000000000000..b17c8eeb69ab
--- /dev/null
+++ b/test/Modules/Inputs/macro-hiding/a1.h
@@ -0,0 +1 @@
+#define assert(x)
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/el/fp64/usr/lib/crtn.o b/test/Modules/Inputs/macro-hiding/a2.h
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/el/fp64/usr/lib/crtn.o
+++ b/test/Modules/Inputs/macro-hiding/a2.h
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/fp64/nan2008/usr/lib/crt1.o b/test/Modules/Inputs/macro-hiding/b1.h
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/fp64/nan2008/usr/lib/crt1.o
+++ b/test/Modules/Inputs/macro-hiding/b1.h
diff --git a/test/Modules/Inputs/macro-hiding/b2.h b/test/Modules/Inputs/macro-hiding/b2.h
new file mode 100644
index 000000000000..83918489e92e
--- /dev/null
+++ b/test/Modules/Inputs/macro-hiding/b2.h
@@ -0,0 +1,2 @@
+#include "a2.h"
+#define assert(x)
diff --git a/test/Modules/Inputs/macro-hiding/c1.h b/test/Modules/Inputs/macro-hiding/c1.h
new file mode 100644
index 000000000000..4b78b3c27343
--- /dev/null
+++ b/test/Modules/Inputs/macro-hiding/c1.h
@@ -0,0 +1,2 @@
+#include "b1.h"
+#define assert(x)
diff --git a/test/Modules/Inputs/macro-hiding/d1.h b/test/Modules/Inputs/macro-hiding/d1.h
new file mode 100644
index 000000000000..83918489e92e
--- /dev/null
+++ b/test/Modules/Inputs/macro-hiding/d1.h
@@ -0,0 +1,2 @@
+#include "a2.h"
+#define assert(x)
diff --git a/test/Modules/Inputs/macro-hiding/e1.h b/test/Modules/Inputs/macro-hiding/e1.h
new file mode 100644
index 000000000000..bd01708c5e32
--- /dev/null
+++ b/test/Modules/Inputs/macro-hiding/e1.h
@@ -0,0 +1 @@
+#include "a1.h"
diff --git a/test/Modules/Inputs/macro-hiding/e2.h b/test/Modules/Inputs/macro-hiding/e2.h
new file mode 100644
index 000000000000..f3a49c70aeae
--- /dev/null
+++ b/test/Modules/Inputs/macro-hiding/e2.h
@@ -0,0 +1,2 @@
+#include "a1.h"
+inline void e1() { assert(true); }
diff --git a/test/Modules/Inputs/macro-hiding/module.modulemap b/test/Modules/Inputs/macro-hiding/module.modulemap
new file mode 100644
index 000000000000..20632d35aebc
--- /dev/null
+++ b/test/Modules/Inputs/macro-hiding/module.modulemap
@@ -0,0 +1,18 @@
+module a {
+ module a1 { header "a1.h" export * }
+ module a2 { header "a2.h" export * }
+}
+module b {
+ module b1 { header "b1.h" export * }
+ module b2 { header "b2.h" export * }
+}
+module c {
+ module c1 { header "c1.h" export * }
+}
+module d {
+ module d1 { header "d1.h" export * }
+}
+module e {
+ module e1 { header "e1.h" export * }
+ module e2 { header "e2.h" export * }
+}
diff --git a/test/Modules/Inputs/macro-undef-through-pch/A.h b/test/Modules/Inputs/macro-undef-through-pch/A.h
new file mode 100644
index 000000000000..6a2cc5cf6c2e
--- /dev/null
+++ b/test/Modules/Inputs/macro-undef-through-pch/A.h
@@ -0,0 +1,2 @@
+#define AB
+#undef AB
diff --git a/test/Modules/Inputs/macro-undef-through-pch/foo.h b/test/Modules/Inputs/macro-undef-through-pch/foo.h
new file mode 100644
index 000000000000..9d0256bdff2e
--- /dev/null
+++ b/test/Modules/Inputs/macro-undef-through-pch/foo.h
@@ -0,0 +1 @@
+@import A;
diff --git a/test/Modules/Inputs/macro-undef-through-pch/module.map b/test/Modules/Inputs/macro-undef-through-pch/module.map
new file mode 100644
index 000000000000..63f68ca5033a
--- /dev/null
+++ b/test/Modules/Inputs/macro-undef-through-pch/module.map
@@ -0,0 +1,3 @@
+module A {
+ header "A.h"
+}
diff --git a/test/Modules/Inputs/macros_other.h b/test/Modules/Inputs/macros_other.h
index ea686bfc558a..4923a7fe56aa 100644
--- a/test/Modules/Inputs/macros_other.h
+++ b/test/Modules/Inputs/macros_other.h
@@ -1 +1,6 @@
-#define OTHER_INTEGER int
+#undef TOP_OTHER_UNDEF1
+#define TOP_OTHER_UNDEF2 42
+#define TOP_OTHER_REDEF1 1
+#define TOP_OTHER_REDEF1 3
+
+#define TOP_OTHER_DEF_RIGHT_UNDEF 4
diff --git a/test/Modules/Inputs/macros_right.h b/test/Modules/Inputs/macros_right.h
index dbbd2c364350..a70c3501e5c9 100644
--- a/test/Modules/Inputs/macros_right.h
+++ b/test/Modules/Inputs/macros_right.h
@@ -17,3 +17,5 @@
#define TOP_RIGHT_REDEF float
#define FN_ADD(x, y) (x+y)
+
+#undef TOP_OTHER_DEF_RIGHT_UNDEF
diff --git a/test/Modules/Inputs/macros_right_undef.h b/test/Modules/Inputs/macros_right_undef.h
index 49473e36f0cb..15a83666a136 100644
--- a/test/Modules/Inputs/macros_right_undef.h
+++ b/test/Modules/Inputs/macros_right_undef.h
@@ -1 +1,4 @@
#undef TOP_RIGHT_UNDEF
+
+@import macros_top;
+#undef TOP_OTHER_DEF_RIGHT_UNDEF
diff --git a/test/Modules/Inputs/macros_top.h b/test/Modules/Inputs/macros_top.h
index dd303ffee4e1..10935043e2a1 100644
--- a/test/Modules/Inputs/macros_top.h
+++ b/test/Modules/Inputs/macros_top.h
@@ -14,3 +14,11 @@
#define TOP_RIGHT_UNDEF int
+#define TOP_OTHER_UNDEF1 42
+#undef TOP_OTHER_UNDEF2
+#define TOP_OTHER_REDEF1 1
+#define TOP_OTHER_REDEF2 2
+
+#define TOP_OTHER_DEF_RIGHT_UNDEF void
+
+#define TOP_REDEF_IN_SUBMODULES 0
diff --git a/test/Modules/Inputs/macros_top_b.h b/test/Modules/Inputs/macros_top_b.h
new file mode 100644
index 000000000000..cfee17cb5874
--- /dev/null
+++ b/test/Modules/Inputs/macros_top_b.h
@@ -0,0 +1,5 @@
+#include "macros_top.h"
+#undef TOP_REDEF_IN_SUBMODULES
+#define TOP_REDEF_IN_SUBMODULES 1
+#undef TOP_REDEF_IN_SUBMODULES
+#define TOP_REDEF_IN_SUBMODULES 2
diff --git a/test/Modules/Inputs/macros_top_c.h b/test/Modules/Inputs/macros_top_c.h
new file mode 100644
index 000000000000..aee82462131a
--- /dev/null
+++ b/test/Modules/Inputs/macros_top_c.h
@@ -0,0 +1,2 @@
+#include "macros_top_b.h"
+#undef TOP_REDEF_IN_SUBMODULES
diff --git a/test/Modules/Inputs/malformed/a1.h b/test/Modules/Inputs/malformed/a1.h
new file mode 100644
index 000000000000..400b916e211d
--- /dev/null
+++ b/test/Modules/Inputs/malformed/a1.h
@@ -0,0 +1 @@
+void f() {
diff --git a/test/Modules/Inputs/malformed/a2.h b/test/Modules/Inputs/malformed/a2.h
new file mode 100644
index 000000000000..5c34318c2147
--- /dev/null
+++ b/test/Modules/Inputs/malformed/a2.h
@@ -0,0 +1 @@
+}
diff --git a/test/Modules/Inputs/malformed/b1.h b/test/Modules/Inputs/malformed/b1.h
new file mode 100644
index 000000000000..3d98bc1b55f0
--- /dev/null
+++ b/test/Modules/Inputs/malformed/b1.h
@@ -0,0 +1,3 @@
+struct S {
+ #include "b2.h"
+};
diff --git a/test/Modules/Inputs/malformed/b2.h b/test/Modules/Inputs/malformed/b2.h
new file mode 100644
index 000000000000..7fc534016407
--- /dev/null
+++ b/test/Modules/Inputs/malformed/b2.h
@@ -0,0 +1 @@
+void g() {}
diff --git a/test/Modules/Inputs/malformed/module.map b/test/Modules/Inputs/malformed/module.map
new file mode 100644
index 000000000000..5277ffa41edd
--- /dev/null
+++ b/test/Modules/Inputs/malformed/module.map
@@ -0,0 +1,8 @@
+module malformed_a {
+ module a1 { header "a1.h" }
+ module a2 { header "a2.h" }
+}
+module malformed_b {
+ module b1 { header "b1.h" }
+ module b2 { header "b2.h" }
+}
diff --git a/test/Modules/Inputs/module.map b/test/Modules/Inputs/module.map
index cf8a298ccee7..fea12015233b 100644
--- a/test/Modules/Inputs/module.map
+++ b/test/Modules/Inputs/module.map
@@ -1,3 +1,6 @@
+module c_library [extern_c] { module inner { header "c-header.h" } }
+module cxx_library { header "cxx-header.h" requires cplusplus }
+module c_library_bad [extern_c] { header "c-header-bad.h" }
module diamond_top { header "diamond_top.h" }
module diamond_left {
header "diamond_left.h"
@@ -12,6 +15,9 @@ module diamond_bottom {
export *
}
module irgen { header "irgen.h" }
+module cxx_irgen_top { header "cxx-irgen-top.h" }
+module cxx_irgen_left { header "cxx-irgen-left.h" }
+module cxx_irgen_right { header "cxx-irgen-right.h" }
module lookup_left_objc { header "lookup_left.h" }
module lookup_right_objc { header "lookup_right.h" }
module lookup_left_cxx { header "lookup_left.hpp" }
@@ -20,6 +26,8 @@ module module_private_left { header "module_private_left.h" }
module module_private_right { header "module_private_right.h" }
module macros_top {
header "macros_top.h"
+ explicit module b { header "macros_top_b.h" }
+ explicit module c { header "macros_top_c.h" }
}
module macros_left {
header "macros_left.h"
@@ -33,6 +41,7 @@ module macros_right {
}
}
module macros { header "macros.h" }
+module macros_other { header "macros_other.h" }
module category_top { header "category_top.h" }
module category_left {
header "category_left.h"
@@ -60,6 +69,9 @@ module redeclarations_left { header "redeclarations_left.h" }
module redeclarations_right { header "redeclarations_right.h" }
module redecl_namespaces_left { header "redecl_namespaces_left.h" }
module redecl_namespaces_right { header "redecl_namespaces_right.h" }
+module redecl_add_after_load_top { header "redecl-add-after-load-top.h" }
+module redecl_add_after_load_decls { header "redecl-add-after-load-decls.h" }
+module redecl_add_after_load { header "redecl-add-after-load.h" }
module load_failure { header "load_failure.h" }
module decldef {
@@ -166,6 +178,11 @@ module autolink {
header "autolink-sub2.h"
link framework "autolink_framework"
}
+
+ explicit module sub3 {
+ header "autolink-sub3.h"
+ link "autolink_from_pch"
+ }
}
module weird_objc {
@@ -184,6 +201,10 @@ module cxx_inline_namespace {
header "cxx-inline-namespace.h"
}
+module cxx_inline_namespace_b {
+ header "cxx-inline-namespace-b.h"
+}
+
module cxx_linkage_cache {
header "cxx-linkage-cache.h"
}
@@ -217,6 +238,10 @@ module cxx_decls {
}
}
+module cxx_decls_merged {
+ header "cxx-decls-merged.h"
+}
+
module config {
header "config.h"
config_macros [exhaustive] WANT_FOO, WANT_BAR
@@ -281,3 +306,9 @@ module recursive_visibility_b {
module recursive_visibility_c {
header "recursive_visibility_c.h"
}
+module recursive1 {
+ header "recursive1.h"
+}
+module recursive2 {
+ header "recursive2.h"
+}
diff --git a/test/Modules/Inputs/modules-with-same-name/DependsOnA/DependsOnA.h b/test/Modules/Inputs/modules-with-same-name/DependsOnA/DependsOnA.h
new file mode 100644
index 000000000000..9d0256bdff2e
--- /dev/null
+++ b/test/Modules/Inputs/modules-with-same-name/DependsOnA/DependsOnA.h
@@ -0,0 +1 @@
+@import A;
diff --git a/test/Modules/Inputs/modules-with-same-name/DependsOnA/module.modulemap b/test/Modules/Inputs/modules-with-same-name/DependsOnA/module.modulemap
new file mode 100644
index 000000000000..b2a027b55d74
--- /dev/null
+++ b/test/Modules/Inputs/modules-with-same-name/DependsOnA/module.modulemap
@@ -0,0 +1,4 @@
+module DependsOnA {
+ header "DependsOnA.h"
+ export *
+}
diff --git a/test/Modules/Inputs/modules-with-same-name/path1/A/a.h b/test/Modules/Inputs/modules-with-same-name/path1/A/a.h
new file mode 100644
index 000000000000..0086e2a2504c
--- /dev/null
+++ b/test/Modules/Inputs/modules-with-same-name/path1/A/a.h
@@ -0,0 +1 @@
+#define FROM_PATH 1
diff --git a/test/Modules/Inputs/modules-with-same-name/path1/A/module.modulemap b/test/Modules/Inputs/modules-with-same-name/path1/A/module.modulemap
new file mode 100644
index 000000000000..76c3358335fc
--- /dev/null
+++ b/test/Modules/Inputs/modules-with-same-name/path1/A/module.modulemap
@@ -0,0 +1,5 @@
+// path1. This comment keeps this file from being identical to
+// path2/A/module.modulemap.
+module A {
+ header "a.h"
+}
diff --git a/test/Modules/Inputs/modules-with-same-name/path2/A/a.h b/test/Modules/Inputs/modules-with-same-name/path2/A/a.h
new file mode 100644
index 000000000000..184c190bcbc4
--- /dev/null
+++ b/test/Modules/Inputs/modules-with-same-name/path2/A/a.h
@@ -0,0 +1 @@
+#define FROM_PATH 2
diff --git a/test/Modules/Inputs/modules-with-same-name/path2/A/module.modulemap b/test/Modules/Inputs/modules-with-same-name/path2/A/module.modulemap
new file mode 100644
index 000000000000..2ff394378e72
--- /dev/null
+++ b/test/Modules/Inputs/modules-with-same-name/path2/A/module.modulemap
@@ -0,0 +1,5 @@
+// path2. This comment keeps this file from being identical to
+// path1/A/module.modulemap.
+module A {
+ header "a.h"
+}
diff --git a/test/Modules/Inputs/namespaces-left.h b/test/Modules/Inputs/namespaces-left.h
index bd192afd2e89..787fe753fba9 100644
--- a/test/Modules/Inputs/namespaces-left.h
+++ b/test/Modules/Inputs/namespaces-left.h
@@ -1,5 +1,18 @@
+namespace RedeclAcrossImport {
+ enum E { e };
+}
+
+namespace AddAndReexportBeforeImport {
+ struct S {};
+ extern struct S t;
+}
+
@import namespaces_top;
+namespace RedeclAcrossImport {
+ E x = e;
+}
+
float &global(float);
float &global2(float);
diff --git a/test/Modules/Inputs/namespaces-top.h b/test/Modules/Inputs/namespaces-top.h
index 7aa8490eb7e1..7bf5394f55be 100644
--- a/test/Modules/Inputs/namespaces-top.h
+++ b/test/Modules/Inputs/namespaces-top.h
@@ -17,3 +17,7 @@ namespace N13 {
int f(int);
void (*p)() = &f;
}
+
+namespace AddAndReexportBeforeImport {
+ int S;
+}
diff --git a/test/Modules/Inputs/recursive1.h b/test/Modules/Inputs/recursive1.h
new file mode 100644
index 000000000000..8cb591739726
--- /dev/null
+++ b/test/Modules/Inputs/recursive1.h
@@ -0,0 +1 @@
+#include "recursive2.h"
diff --git a/test/Modules/Inputs/recursive2.h b/test/Modules/Inputs/recursive2.h
new file mode 100644
index 000000000000..d9480aa1e14a
--- /dev/null
+++ b/test/Modules/Inputs/recursive2.h
@@ -0,0 +1 @@
+#include "recursive1.h"
diff --git a/test/Modules/Inputs/redecl-add-after-load-decls.h b/test/Modules/Inputs/redecl-add-after-load-decls.h
new file mode 100644
index 000000000000..fbe6b9387a17
--- /dev/null
+++ b/test/Modules/Inputs/redecl-add-after-load-decls.h
@@ -0,0 +1,24 @@
+typedef struct A B;
+extern const int variable;
+extern constexpr int function();
+constexpr int test(bool b) { return b ? variable : function(); }
+
+namespace N {
+ typedef struct A B;
+ extern const int variable;
+ extern constexpr int function();
+}
+typedef N::B NB;
+constexpr int N_test(bool b) { return b ? N::variable : N::function(); }
+
+@import redecl_add_after_load_top;
+typedef C::A CB;
+constexpr int C_test(bool b) { return b ? C::variable : C::function(); }
+
+struct D {
+ struct A; // expected-note {{forward}}
+ static const int variable;
+ static constexpr int function(); // expected-note {{here}}
+};
+typedef D::A DB;
+constexpr int D_test(bool b) { return b ? D::variable : D::function(); } // expected-note {{subexpression}} expected-note {{undefined}}
diff --git a/test/Modules/Inputs/redecl-add-after-load-top.h b/test/Modules/Inputs/redecl-add-after-load-top.h
new file mode 100644
index 000000000000..638fb013cd7e
--- /dev/null
+++ b/test/Modules/Inputs/redecl-add-after-load-top.h
@@ -0,0 +1,5 @@
+struct C {
+ struct A;
+ static const int variable;
+ static constexpr int function();
+};
diff --git a/test/Modules/Inputs/redecl-add-after-load.h b/test/Modules/Inputs/redecl-add-after-load.h
new file mode 100644
index 000000000000..6951a76289f0
--- /dev/null
+++ b/test/Modules/Inputs/redecl-add-after-load.h
@@ -0,0 +1,23 @@
+struct A {};
+extern const int variable = 0;
+extern constexpr int function() { return 0; }
+
+namespace N {
+ struct A {};
+ extern const int variable = 0;
+ extern constexpr int function() { return 0; }
+}
+
+@import redecl_add_after_load_top;
+struct C::A {};
+const int C::variable = 0;
+constexpr int C::function() { return 0; }
+
+struct D {
+ struct A;
+ static const int variable;
+ static constexpr int function();
+};
+struct D::A {};
+const int D::variable = 0;
+constexpr int D::function() { return 0; }
diff --git a/test/Modules/Inputs/require-modular-includes/A.framework/Headers/A.h b/test/Modules/Inputs/require-modular-includes/A.framework/Headers/A.h
new file mode 100644
index 000000000000..fad91bdbfd0d
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/A.framework/Headers/A.h
@@ -0,0 +1 @@
+#include "B/B.h"
diff --git a/test/Modules/Inputs/require-modular-includes/AnotherModule.h b/test/Modules/Inputs/require-modular-includes/AnotherModule.h
new file mode 100644
index 000000000000..96913aa22ace
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/AnotherModule.h
@@ -0,0 +1 @@
+// AnotherModule.h
diff --git a/test/Modules/Inputs/require-modular-includes/AnotherModuleExcluded.h b/test/Modules/Inputs/require-modular-includes/AnotherModuleExcluded.h
new file mode 100644
index 000000000000..b539dd9ba9c9
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/AnotherModuleExcluded.h
@@ -0,0 +1 @@
+// AnotherModuleExcluded.h
diff --git a/test/Modules/Inputs/require-modular-includes/B.framework/Headers/B.h b/test/Modules/Inputs/require-modular-includes/B.framework/Headers/B.h
new file mode 100644
index 000000000000..77d6ff1e5f47
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/B.framework/Headers/B.h
@@ -0,0 +1 @@
+#include "C.h"
diff --git a/test/Modules/Inputs/require-modular-includes/C.h b/test/Modules/Inputs/require-modular-includes/C.h
new file mode 100644
index 000000000000..a0121d46b41f
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/C.h
@@ -0,0 +1 @@
+// C.h
diff --git a/test/Modules/Inputs/require-modular-includes/ExcludedFromAnotherModule.framework/Headers/ExcludedFromAnotherModule.h b/test/Modules/Inputs/require-modular-includes/ExcludedFromAnotherModule.framework/Headers/ExcludedFromAnotherModule.h
new file mode 100644
index 000000000000..0c0ce7bb560a
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/ExcludedFromAnotherModule.framework/Headers/ExcludedFromAnotherModule.h
@@ -0,0 +1 @@
+#include "AnotherModuleExcluded.h"
diff --git a/test/Modules/Inputs/require-modular-includes/FromAnotherModule.framework/Headers/FromAnotherModule.h b/test/Modules/Inputs/require-modular-includes/FromAnotherModule.framework/Headers/FromAnotherModule.h
new file mode 100644
index 000000000000..1fe5c08aceef
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/FromAnotherModule.framework/Headers/FromAnotherModule.h
@@ -0,0 +1 @@
+#include "AnotherModule.h"
diff --git a/test/Modules/Inputs/require-modular-includes/FromImportedModuleFail.framework/Headers/FromImportedModuleFail.h b/test/Modules/Inputs/require-modular-includes/FromImportedModuleFail.framework/Headers/FromImportedModuleFail.h
new file mode 100644
index 000000000000..a80bcc6945b7
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/FromImportedModuleFail.framework/Headers/FromImportedModuleFail.h
@@ -0,0 +1,2 @@
+// FromImportedModuleFail.h
+#include "NotInModule.h"
diff --git a/test/Modules/Inputs/require-modular-includes/FromImportedModuleOK.framework/Headers/FromImportedModuleOK.h b/test/Modules/Inputs/require-modular-includes/FromImportedModuleOK.framework/Headers/FromImportedModuleOK.h
new file mode 100644
index 000000000000..3b2056c45494
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/FromImportedModuleOK.framework/Headers/FromImportedModuleOK.h
@@ -0,0 +1 @@
+#include "FromImportedModuleOK2.h"
diff --git a/test/Modules/Inputs/require-modular-includes/FromImportedModuleOK.framework/Headers/FromImportedModuleOK2.h b/test/Modules/Inputs/require-modular-includes/FromImportedModuleOK.framework/Headers/FromImportedModuleOK2.h
new file mode 100644
index 000000000000..775fd6e4d82a
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/FromImportedModuleOK.framework/Headers/FromImportedModuleOK2.h
@@ -0,0 +1 @@
+// FromImportedModuleOK2.h
diff --git a/test/Modules/Inputs/require-modular-includes/FromImportedModuleOK.framework/Modules/module.modulemap b/test/Modules/Inputs/require-modular-includes/FromImportedModuleOK.framework/Modules/module.modulemap
new file mode 100644
index 000000000000..26381110d20d
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/FromImportedModuleOK.framework/Modules/module.modulemap
@@ -0,0 +1,4 @@
+framework module FromImportedModuleOK {
+ header "FromImportedModuleOK.h"
+ header "FromImportedModuleOK2.h"
+}
diff --git a/test/Modules/Inputs/require-modular-includes/FromImportedSubModule.framework/Headers/Header.h b/test/Modules/Inputs/require-modular-includes/FromImportedSubModule.framework/Headers/Header.h
new file mode 100644
index 000000000000..613cd9d68168
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/FromImportedSubModule.framework/Headers/Header.h
@@ -0,0 +1,2 @@
+// Header.h
+#include "NotInModule.h"
diff --git a/test/Modules/Inputs/require-modular-includes/FromImportedSubModule.framework/Modules/module.modulemap b/test/Modules/Inputs/require-modular-includes/FromImportedSubModule.framework/Modules/module.modulemap
new file mode 100644
index 000000000000..c07efec72b89
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/FromImportedSubModule.framework/Modules/module.modulemap
@@ -0,0 +1,5 @@
+framework module FromImportedSubModule {
+ module Sub {
+ header "Header.h"
+ }
+}
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/fp64/nan2008/usr/lib/crti.o b/test/Modules/Inputs/require-modular-includes/FromNonModularSubframework.framework/Frameworks/Subframework.framework/Headers/Subframework.h
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/fp64/nan2008/usr/lib/crti.o
+++ b/test/Modules/Inputs/require-modular-includes/FromNonModularSubframework.framework/Frameworks/Subframework.framework/Headers/Subframework.h
diff --git a/test/Modules/Inputs/require-modular-includes/FromNonModularSubframework.framework/Headers/FromNonModularSubframework.h b/test/Modules/Inputs/require-modular-includes/FromNonModularSubframework.framework/Headers/FromNonModularSubframework.h
new file mode 100644
index 000000000000..4680be4a37ae
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/FromNonModularSubframework.framework/Headers/FromNonModularSubframework.h
@@ -0,0 +1 @@
+#include "Subframework/Subframework.h"
diff --git a/test/Modules/Inputs/require-modular-includes/FromNonModularSubframework.framework/Modules/module.modulemap b/test/Modules/Inputs/require-modular-includes/FromNonModularSubframework.framework/Modules/module.modulemap
new file mode 100644
index 000000000000..c308ea429bd5
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/FromNonModularSubframework.framework/Modules/module.modulemap
@@ -0,0 +1,3 @@
+framework module FromNonModularSubframework {
+ header "FromNonModularSubframework.h"
+}
diff --git a/test/Modules/Inputs/require-modular-includes/FromSubframework.framework/Frameworks/Subframework.framework/Headers/Subframework.h b/test/Modules/Inputs/require-modular-includes/FromSubframework.framework/Frameworks/Subframework.framework/Headers/Subframework.h
new file mode 100644
index 000000000000..c08fac0b55f4
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/FromSubframework.framework/Frameworks/Subframework.framework/Headers/Subframework.h
@@ -0,0 +1 @@
+// Subframework.h
diff --git a/test/Modules/Inputs/require-modular-includes/FromSubframework.framework/Headers/FromSubframework.h b/test/Modules/Inputs/require-modular-includes/FromSubframework.framework/Headers/FromSubframework.h
new file mode 100644
index 000000000000..4680be4a37ae
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/FromSubframework.framework/Headers/FromSubframework.h
@@ -0,0 +1 @@
+#include "Subframework/Subframework.h"
diff --git a/test/Modules/Inputs/require-modular-includes/FromSubframework.framework/Modules/module.modulemap b/test/Modules/Inputs/require-modular-includes/FromSubframework.framework/Modules/module.modulemap
new file mode 100644
index 000000000000..250f05ace0d1
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/FromSubframework.framework/Modules/module.modulemap
@@ -0,0 +1,7 @@
+framework module FromSubframework {
+ umbrella header "FromSubframework.h"
+
+ framework module Subframework {
+ umbrella header "Subframework.h"
+ }
+}
diff --git a/test/Modules/Inputs/require-modular-includes/FromUmbrella.framework/Headers/FromUmbrella.h b/test/Modules/Inputs/require-modular-includes/FromUmbrella.framework/Headers/FromUmbrella.h
new file mode 100644
index 000000000000..f6f891f53f31
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/FromUmbrella.framework/Headers/FromUmbrella.h
@@ -0,0 +1,2 @@
+#include "umbrella/foo.h"
+#include "umbrella/bar/bar.h"
diff --git a/test/Modules/Inputs/require-modular-includes/IncludeExcluded.framework/Headers/Excluded.h b/test/Modules/Inputs/require-modular-includes/IncludeExcluded.framework/Headers/Excluded.h
new file mode 100644
index 000000000000..f330e6c0ecd2
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/IncludeExcluded.framework/Headers/Excluded.h
@@ -0,0 +1 @@
+// Excluded.h
diff --git a/test/Modules/Inputs/require-modular-includes/IncludeExcluded.framework/Headers/IncludeExcluded.h b/test/Modules/Inputs/require-modular-includes/IncludeExcluded.framework/Headers/IncludeExcluded.h
new file mode 100644
index 000000000000..f2ffdc327ed9
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/IncludeExcluded.framework/Headers/IncludeExcluded.h
@@ -0,0 +1 @@
+#include "Excluded.h"
diff --git a/test/Modules/Inputs/require-modular-includes/IncludeExcluded.framework/Modules/module.modulemap b/test/Modules/Inputs/require-modular-includes/IncludeExcluded.framework/Modules/module.modulemap
new file mode 100644
index 000000000000..a1753539bd1f
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/IncludeExcluded.framework/Modules/module.modulemap
@@ -0,0 +1,4 @@
+framework module IncludeExcluded {
+ header "IncludeExcluded.h"
+ exclude header "Excluded.h"
+}
diff --git a/test/Modules/Inputs/require-modular-includes/NotFramework.h b/test/Modules/Inputs/require-modular-includes/NotFramework.h
new file mode 100644
index 000000000000..3afd8fc64a02
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/NotFramework.h
@@ -0,0 +1,2 @@
+// NotFramework.h
+#import "NotInModule.h"
diff --git a/test/Modules/Inputs/require-modular-includes/NotInModule.h b/test/Modules/Inputs/require-modular-includes/NotInModule.h
new file mode 100644
index 000000000000..c2a626cab92e
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/NotInModule.h
@@ -0,0 +1 @@
+// NotInModule.h
diff --git a/test/Modules/Inputs/require-modular-includes/module.modulemap b/test/Modules/Inputs/require-modular-includes/module.modulemap
new file mode 100644
index 000000000000..0ac4d5b7030d
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/module.modulemap
@@ -0,0 +1,12 @@
+module AnotherModule {
+ header "AnotherModule.h"
+ exclude header "AnotherModuleExcluded.h"
+}
+module Umbrella {
+ umbrella "umbrella"
+}
+module NotFramework {
+ header "NotFramework.h"
+}
+
+framework module * { }
diff --git a/test/Modules/Inputs/require-modular-includes/umbrella/bar/bar.h b/test/Modules/Inputs/require-modular-includes/umbrella/bar/bar.h
new file mode 100644
index 000000000000..410aba263906
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/umbrella/bar/bar.h
@@ -0,0 +1 @@
+// bar.h
diff --git a/test/Modules/Inputs/require-modular-includes/umbrella/foo.h b/test/Modules/Inputs/require-modular-includes/umbrella/foo.h
new file mode 100644
index 000000000000..249664863bd2
--- /dev/null
+++ b/test/Modules/Inputs/require-modular-includes/umbrella/foo.h
@@ -0,0 +1 @@
+// foo.h
diff --git a/test/Modules/Inputs/string_names/a.h b/test/Modules/Inputs/string_names/a.h
new file mode 100644
index 000000000000..a36dc1b59d6f
--- /dev/null
+++ b/test/Modules/Inputs/string_names/a.h
@@ -0,0 +1,4 @@
+#ifndef A_H
+#define A_H
+const int a = 2;
+#endif
diff --git a/test/Modules/Inputs/string_names/b.h b/test/Modules/Inputs/string_names/b.h
new file mode 100644
index 000000000000..55daf7286801
--- /dev/null
+++ b/test/Modules/Inputs/string_names/b.h
@@ -0,0 +1,4 @@
+#ifndef B_H
+#define B_H
+const int b = 3;
+#endif
diff --git a/test/Modules/Inputs/string_names/c.h b/test/Modules/Inputs/string_names/c.h
new file mode 100644
index 000000000000..38c278fc87d2
--- /dev/null
+++ b/test/Modules/Inputs/string_names/c.h
@@ -0,0 +1,4 @@
+#ifndef C_H
+#define C_H
+const int c = 2;
+#endif
diff --git a/test/Modules/Inputs/string_names/module.map b/test/Modules/Inputs/string_names/module.map
new file mode 100644
index 000000000000..4e70eda39924
--- /dev/null
+++ b/test/Modules/Inputs/string_names/module.map
@@ -0,0 +1,16 @@
+module "my/module-a" {
+ header "a.h"
+ use "my/module-c"
+
+ module "Sub" {
+ header "sub.h"
+ }
+}
+
+module "my/module-b" {
+ header "b.h"
+}
+
+module "my/module-c" {
+ header "c.h"
+}
diff --git a/test/Modules/Inputs/string_names/sub.h b/test/Modules/Inputs/string_names/sub.h
new file mode 100644
index 000000000000..64b9112d3e6c
--- /dev/null
+++ b/test/Modules/Inputs/string_names/sub.h
@@ -0,0 +1,4 @@
+#ifndef SUB_H
+#define SUB_H
+const int sub = 2;
+#endif
diff --git a/test/Modules/Inputs/submodules/import-self-b.h b/test/Modules/Inputs/submodules/import-self-b.h
index f88b56d5f082..9852094b10b9 100644
--- a/test/Modules/Inputs/submodules/import-self-b.h
+++ b/test/Modules/Inputs/submodules/import-self-b.h
@@ -1,10 +1,12 @@
+// FIXME: This import has no effect, because the submodule isn't built yet, and
+// we don't map an @import to a #include in this case.
@import import_self.c;
#include "import-self-d.h"
// FIXME: This should not work; names from 'a' should not be visible here.
MyTypeA import_self_test_a;
-// FIXME: This should work but does not; names from 'b' are not actually visible here.
+// FIXME: This should work but does not; names from 'c' are not actually visible here.
//MyTypeC import_self_test_c;
MyTypeD import_self_test_d;
diff --git a/test/Modules/Inputs/submodules/module.map b/test/Modules/Inputs/submodules/module.map
index c91e94f47d23..1c1b76a08969 100644
--- a/test/Modules/Inputs/submodules/module.map
+++ b/test/Modules/Inputs/submodules/module.map
@@ -10,3 +10,23 @@ module import_self {
module c { header "import-self-c.h" }
module d { header "import-self-d.h" }
}
+
+module missing_headers {
+ module missing { header "missing.h" }
+ module not_missing { header "not_missing.h" }
+}
+
+module missing_unavailable_headers {
+ module missing {
+ requires !objc
+ header "missing.h"
+ module also_missing { header "also_missing.h" }
+ }
+ module not_missing { }
+}
+
+module missing_umbrella_with_inferred_submodules {
+ umbrella header "missing_umbrella.h"
+ module * { export * }
+ export *
+}
diff --git a/test/Modules/Inputs/submodules/not_missing.h b/test/Modules/Inputs/submodules/not_missing.h
new file mode 100644
index 000000000000..1f8d0480e5ed
--- /dev/null
+++ b/test/Modules/Inputs/submodules/not_missing.h
@@ -0,0 +1,2 @@
+void NotMissingFunction() {
+}
diff --git a/test/Modules/Inputs/template-specialization-visibility/a.h b/test/Modules/Inputs/template-specialization-visibility/a.h
new file mode 100644
index 000000000000..e88205558726
--- /dev/null
+++ b/test/Modules/Inputs/template-specialization-visibility/a.h
@@ -0,0 +1,8 @@
+#ifndef A_H
+#define A_H
+template<typename T> struct S;
+template<typename U> struct T {
+ struct S;
+ enum E : int;
+};
+#endif
diff --git a/test/Modules/Inputs/template-specialization-visibility/b.h b/test/Modules/Inputs/template-specialization-visibility/b.h
new file mode 100644
index 000000000000..1a098262456a
--- /dev/null
+++ b/test/Modules/Inputs/template-specialization-visibility/b.h
@@ -0,0 +1,7 @@
+#ifndef B_H
+#define B_H
+#include "a.h"
+S<int> *s1;
+T<int>::S *s2;
+T<int>::E e1;
+#endif
diff --git a/test/Modules/Inputs/template-specialization-visibility/c.h b/test/Modules/Inputs/template-specialization-visibility/c.h
new file mode 100644
index 000000000000..a92fb3b4c60c
--- /dev/null
+++ b/test/Modules/Inputs/template-specialization-visibility/c.h
@@ -0,0 +1,6 @@
+#ifndef C_H
+#define C_H
+template<typename T> struct S { int n; };
+template<typename U> struct T<U>::S { int n; };
+template<typename U> enum T<U>::E : int { e };
+#endif
diff --git a/test/Modules/Inputs/template-specialization-visibility/d.h b/test/Modules/Inputs/template-specialization-visibility/d.h
new file mode 100644
index 000000000000..3048272c5f2d
--- /dev/null
+++ b/test/Modules/Inputs/template-specialization-visibility/d.h
@@ -0,0 +1,5 @@
+#ifndef D_H
+#define D_H
+template<typename> struct S;
+template<typename> struct T;
+#endif
diff --git a/test/Modules/Inputs/template-specialization-visibility/e.h b/test/Modules/Inputs/template-specialization-visibility/e.h
new file mode 100644
index 000000000000..5d6b14290471
--- /dev/null
+++ b/test/Modules/Inputs/template-specialization-visibility/e.h
@@ -0,0 +1,6 @@
+#ifndef E_H
+#define E_H
+#include "c.h"
+template struct S<char>;
+template struct T<char>;
+#endif
diff --git a/test/Modules/Inputs/template-specialization-visibility/module.map b/test/Modules/Inputs/template-specialization-visibility/module.map
new file mode 100644
index 000000000000..f0e2a0ef9022
--- /dev/null
+++ b/test/Modules/Inputs/template-specialization-visibility/module.map
@@ -0,0 +1,7 @@
+module tsv {
+ module a { header "a.h" }
+ module b { header "b.h" }
+ module c { header "c.h" }
+ module d { header "d.h" }
+ module e { header "e.h" }
+}
diff --git a/test/Modules/Inputs/templates-left.h b/test/Modules/Inputs/templates-left.h
index e76598d6bd5c..2bd79be94584 100644
--- a/test/Modules/Inputs/templates-left.h
+++ b/test/Modules/Inputs/templates-left.h
@@ -33,3 +33,30 @@ void triggerPendingInstantiation() {
void redeclDefinitionEmit(){}
typedef Outer<int>::Inner OuterIntInner_left;
+
+int defineListDoubleLeft() {
+ List<double> ld;
+ ld.push_back(0.0);
+ return ld.size;
+}
+
+template<typename T> struct MergePatternDecl;
+
+extern template struct ExplicitInstantiation<false, false>;
+extern template struct ExplicitInstantiation<false, true>;
+extern template struct ExplicitInstantiation<true, false>;
+extern template struct ExplicitInstantiation<true, true>;
+
+void useExplicitInstantiation() {
+ ExplicitInstantiation<true, false>().f();
+ ExplicitInstantiation<true, true>().f();
+}
+
+template<typename> struct DelayUpdates;
+template<> struct DelayUpdates<int>;
+template<typename T> struct DelayUpdates<T*>;
+template<typename T> void testDelayUpdates(DelayUpdates<T> *p = 0) {}
+
+void outOfLineInlineUseLeftF(void (OutOfLineInline<int>::*)() = &OutOfLineInline<int>::f);
+void outOfLineInlineUseLeftG(void (OutOfLineInline<int>::*)() = &OutOfLineInline<int>::g);
+void outOfLineInlineUseLeftH(void (OutOfLineInline<int>::*)() = &OutOfLineInline<int>::h);
diff --git a/test/Modules/Inputs/templates-right.h b/test/Modules/Inputs/templates-right.h
index 16d0a714d90e..5907cbca73ee 100644
--- a/test/Modules/Inputs/templates-right.h
+++ b/test/Modules/Inputs/templates-right.h
@@ -31,3 +31,15 @@ void triggerPendingInstantiationToo() {
void redeclDefinitionEmit(){}
typedef Outer<int>::Inner OuterIntInner_right;
+
+int defineListDoubleRight() {
+ List<double> ld;
+ ld.push_back(0.0);
+ return ld.size;
+}
+
+template<typename T> struct MergePatternDecl;
+
+void outOfLineInlineUseRightF(void (OutOfLineInline<int>::*)() = &OutOfLineInline<int>::f);
+void outOfLineInlineUseRightG(void (OutOfLineInline<int>::*)() = &OutOfLineInline<int>::g);
+void outOfLineInlineUseRightH(void (OutOfLineInline<int>::*)() = &OutOfLineInline<int>::h);
diff --git a/test/Modules/Inputs/templates-top.h b/test/Modules/Inputs/templates-top.h
index 87dcd8b7f465..1216266f34fb 100644
--- a/test/Modules/Inputs/templates-top.h
+++ b/test/Modules/Inputs/templates-top.h
@@ -9,6 +9,8 @@ public:
unsigned size;
};
+extern List<double> *instantiateListDoubleDeclaration;
+
namespace A {
class Y {
template <typename T> friend class WhereAmI;
@@ -23,3 +25,18 @@ public:
template<typename T> struct Outer {
struct Inner {};
};
+
+template<bool, bool> struct ExplicitInstantiation {
+ void f() {}
+};
+
+template<typename> struct DelayUpdates {};
+
+template<typename T> struct OutOfLineInline {
+ void f();
+ void g();
+ void h();
+};
+template<typename T> inline void OutOfLineInline<T>::f() {}
+template<typename T> inline void OutOfLineInline<T>::g() {}
+template<typename T> inline void OutOfLineInline<T>::h() {}
diff --git a/test/Modules/Inputs/undefined-type-fixit/module.map b/test/Modules/Inputs/undefined-type-fixit/module.map
new file mode 100644
index 000000000000..f5ce34b8fc06
--- /dev/null
+++ b/test/Modules/Inputs/undefined-type-fixit/module.map
@@ -0,0 +1,9 @@
+module public1 {
+ header "public1.h"
+}
+module public2 {
+ header "public2.h"
+ module public2sub {
+ header "public2sub.h"
+ }
+}
diff --git a/test/Modules/Inputs/undefined-type-fixit/public1.h b/test/Modules/Inputs/undefined-type-fixit/public1.h
new file mode 100644
index 000000000000..bc98ca9e0ec6
--- /dev/null
+++ b/test/Modules/Inputs/undefined-type-fixit/public1.h
@@ -0,0 +1,6 @@
+#ifndef PUBLIC1_H
+#define PUBLIC1_H
+
+struct use_this1 { int field; };
+
+#endif
diff --git a/test/Modules/Inputs/undefined-type-fixit/public2.h b/test/Modules/Inputs/undefined-type-fixit/public2.h
new file mode 100644
index 000000000000..2aa3e9614c81
--- /dev/null
+++ b/test/Modules/Inputs/undefined-type-fixit/public2.h
@@ -0,0 +1,6 @@
+#ifndef PUBLIC2_H
+#define PUBLIC2_H
+
+struct use_this2 { int field; };
+
+#endif
diff --git a/test/Modules/Inputs/undefined-type-fixit/public2sub.h b/test/Modules/Inputs/undefined-type-fixit/public2sub.h
new file mode 100644
index 000000000000..4c8c3cce0333
--- /dev/null
+++ b/test/Modules/Inputs/undefined-type-fixit/public2sub.h
@@ -0,0 +1,6 @@
+#ifndef PUBLIC2SUB_H
+#define PUBLIC2SUB_H
+
+struct use_this2sub { int field; };
+
+#endif
diff --git a/test/Modules/Inputs/unnecessary-module-map-parsing/a1.h b/test/Modules/Inputs/unnecessary-module-map-parsing/a1.h
new file mode 100644
index 000000000000..56757a701bf5
--- /dev/null
+++ b/test/Modules/Inputs/unnecessary-module-map-parsing/a1.h
@@ -0,0 +1 @@
+void f() {}
diff --git a/test/Modules/Inputs/unnecessary-module-map-parsing/module.map b/test/Modules/Inputs/unnecessary-module-map-parsing/module.map
new file mode 100644
index 000000000000..6d4ceeeb0cca
--- /dev/null
+++ b/test/Modules/Inputs/unnecessary-module-map-parsing/module.map
@@ -0,0 +1,3 @@
+module a {
+ eader "unknown.h"
+}
diff --git a/test/Modules/Inputs/update-after-load/a.h b/test/Modules/Inputs/update-after-load/a.h
new file mode 100644
index 000000000000..0ebcf3e34a70
--- /dev/null
+++ b/test/Modules/Inputs/update-after-load/a.h
@@ -0,0 +1 @@
+namespace llvm {}
diff --git a/test/Modules/Inputs/update-after-load/b.h b/test/Modules/Inputs/update-after-load/b.h
new file mode 100644
index 000000000000..64e9bfd4bc79
--- /dev/null
+++ b/test/Modules/Inputs/update-after-load/b.h
@@ -0,0 +1,2 @@
+#include "a.h"
+namespace llvm { void f(); }
diff --git a/test/Modules/Inputs/update-after-load/module.map b/test/Modules/Inputs/update-after-load/module.map
new file mode 100644
index 000000000000..21e160ea051b
--- /dev/null
+++ b/test/Modules/Inputs/update-after-load/module.map
@@ -0,0 +1 @@
+module a { header "a.h" } module b { header "b.h" }
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/fp64/nan2008/usr/lib/crtn.o b/test/Modules/Inputs/update-after-load/modules.timestamp
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/fp64/nan2008/usr/lib/crtn.o
+++ b/test/Modules/Inputs/update-after-load/modules.timestamp
diff --git a/test/Modules/Rmodule-build.m b/test/Modules/Rmodule-build.m
new file mode 100644
index 000000000000..b8abc01c2c1a
--- /dev/null
+++ b/test/Modules/Rmodule-build.m
@@ -0,0 +1,34 @@
+// REQUIRES: shell
+// RUN: rm -rf %t
+// RUN: mkdir %t
+// RUN: echo '// A' > %t/A.h
+// RUN: echo '// B' > %t/B.h
+// RUN: echo 'module A { header "A.h" }' > %t/module.modulemap
+// RUN: echo 'module B { header "B.h" }' >> %t/module.modulemap
+
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -verify \
+// RUN: -I %t -Rmodule-build
+
+@import A; // expected-remark{{building module 'A' as}}
+@import B; // expected-remark{{building module 'B' as}}
+@import A; // no diagnostic
+@import B; // no diagnostic
+
+// RUN: echo ' ' >> %t/B.h
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \
+// RUN: -Rmodule-build 2>&1 | FileCheck %s
+
+// RUN: echo ' ' >> %t/B.h
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \
+// RUN: -Reverything 2>&1 | FileCheck %s
+
+// RUN: echo ' ' >> %t/B.h
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \
+// RUN: 2>&1 | count 0
+
+// RUN: echo ' ' >> %t/B.h
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fsyntax-only %s -I %t \
+// RUN: -Rmodule-build -Rno-everything 2>&1 | count 0
+
+// CHECK-NOT: building module 'A'
+// CHECK: building module 'B'
diff --git a/test/Modules/Werror-Wsystem-headers.m b/test/Modules/Werror-Wsystem-headers.m
new file mode 100644
index 000000000000..c4cd1a6378cc
--- /dev/null
+++ b/test/Modules/Werror-Wsystem-headers.m
@@ -0,0 +1,23 @@
+// REQUIRES: shell
+// RUN: rm -rf %t
+// RUN: rm -rf %t-saved
+// RUN: mkdir %t-saved
+
+// Initial module build
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \
+// RUN: -isysroot %S/Inputs/System -triple x86_64-apple-darwin10 -fsyntax-only %s -verify
+// RUN: cp %t/cstd.pcm %t-saved/cstd.pcm
+
+// Even with -Werror don't rebuild a system module
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \
+// RUN: -isysroot %S/Inputs/System -triple x86_64-apple-darwin10 -fsyntax-only %s -verify -Werror
+// RUN: diff %t/cstd.pcm %t-saved/cstd.pcm
+
+// Unless -Wsystem-headers is on
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \
+// RUN: -isysroot %S/Inputs/System -triple x86_64-apple-darwin10 -fsyntax-only %s -verify \
+// RUN: -Werror=unused -Wsystem-headers
+// RUN: not diff %t/cstd.pcm %t-saved/cstd.pcm
+
+// expected-no-diagnostics
+@import cstd;
diff --git a/test/Modules/Werror.m b/test/Modules/Werror.m
new file mode 100644
index 000000000000..94a98a5a198d
--- /dev/null
+++ b/test/Modules/Werror.m
@@ -0,0 +1,75 @@
+// REQUIRES: shell
+// RUN: rm -rf %t
+// RUN: rm -rf %t-saved
+// RUN: mkdir -p %t-saved
+
+// Initial module build (-Werror=header-guard)
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \
+// RUN: -F %S/Inputs -fsyntax-only %s -verify -Wno-incomplete-umbrella \
+// RUN: -Werror=header-guard
+// RUN: cp %t/Module.pcm %t-saved/Module.pcm
+
+// Building with looser -Werror options does not rebuild
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \
+// RUN: -F %S/Inputs -fsyntax-only %s -verify -Wno-incomplete-umbrella
+// RUN: diff %t/Module.pcm %t-saved/Module.pcm
+
+// Make the build more restricted (-Werror)
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \
+// RUN: -F %S/Inputs -fsyntax-only %s -verify -Wno-incomplete-umbrella \
+// RUN: -Werror -Wno-incomplete-umbrella
+// RUN: not diff %t/Module.pcm %t-saved/Module.pcm
+// RUN: cp %t/Module.pcm %t-saved/Module.pcm
+
+// Ensure -Werror=header-guard is less strict than -Werror
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \
+// RUN: -F %S/Inputs -fsyntax-only %s -verify -Wno-incomplete-umbrella \
+// RUN: -Werror=header-guard -Wno-incomplete-umbrella
+// RUN: diff %t/Module.pcm %t-saved/Module.pcm
+
+// But -Werror=unused is not, because some of its diags are DefaultIgnore
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \
+// RUN: -F %S/Inputs -fsyntax-only %s -verify -Wno-incomplete-umbrella \
+// RUN: -Werror=unused
+// RUN: not diff %t/Module.pcm %t-saved/Module.pcm
+// RUN: cp %t/Module.pcm %t-saved/Module.pcm
+
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \
+// RUN: -F %S/Inputs -fsyntax-only %s -verify -Wno-incomplete-umbrella \
+// RUN: -Werror -Wno-incomplete-umbrella
+
+// FIXME: when rebuilding the module, take the union of the diagnostic options
+// so that we don't need to rebuild here
+// RUN-DISABLED: diff %t/Module.pcm %t-saved/Module.pcm
+
+// -Wno-everything, -Werror
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \
+// RUN: -F %S/Inputs -fsyntax-only %s -verify -Wno-incomplete-umbrella \
+// RUN: -Wno-everything -Wall -Werror
+// RUN: cp %t/Module.pcm %t-saved/Module.pcm
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \
+// RUN: -F %S/Inputs -fsyntax-only %s -verify -Wno-incomplete-umbrella \
+// RUN: -Wall -Werror
+// RUN: not diff %t/Module.pcm %t-saved/Module.pcm
+
+// -pedantic, -Werror is not compatible with -Wall -Werror
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \
+// RUN: -F %S/Inputs -fsyntax-only %s -verify -Wno-incomplete-umbrella \
+// RUN: -Werror -pedantic
+// RUN: not diff %t/Module.pcm %t-saved/Module.pcm
+// RUN: cp %t/Module.pcm %t-saved/Module.pcm
+
+// -pedantic-errors is less strict that -pedantic, -Werror
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \
+// RUN: -F %S/Inputs -fsyntax-only %s -verify -Wno-incomplete-umbrella \
+// RUN: -pedantic-errors
+// RUN: diff %t/Module.pcm %t-saved/Module.pcm
+
+// -Wsystem-headers does not affect non-system modules
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \
+// RUN: -F %S/Inputs -fsyntax-only %s -verify -Wno-incomplete-umbrella \
+// RUN: -pedantic-errors -Wsystem-headers
+// RUN: diff %t/Module.pcm %t-saved/Module.pcm
+
+// expected-no-diagnostics
+@import Module;
diff --git a/test/Modules/auto-module-import.m b/test/Modules/auto-module-import.m
index d7fb9d1f9fd6..bf9937778631 100644
--- a/test/Modules/auto-module-import.m
+++ b/test/Modules/auto-module-import.m
@@ -83,6 +83,6 @@ int getNotInModule() {
return not_in_module;
}
-void includeNotAtTopLevel() {
- #include <NoUmbrella/A.h> // expected-warning {{treating #include as an import}} expected-error {{expected expression}}
-}
+void includeNotAtTopLevel() { // expected-note {{to match this '{'}}
+ #include <NoUmbrella/A.h> // expected-warning {{treating #include as an import}} expected-error {{expected '}'}}
+} // expected-error {{extraneous closing brace}}
diff --git a/test/Modules/autolink.m b/test/Modules/autolink.m
index 077aac5374a0..47eda3f80e01 100644
--- a/test/Modules/autolink.m
+++ b/test/Modules/autolink.m
@@ -1,6 +1,7 @@
// RUN: rm -rf %t
-// RUN: %clang_cc1 -emit-llvm -o - -fmodules-cache-path=%t -fmodules -F %S/Inputs -I %S/Inputs %s | FileCheck %s
-// RUN: %clang_cc1 -emit-llvm -fno-autolink -o - -fmodules-cache-path=%t -fmodules -F %S/Inputs -I %S/Inputs %s | FileCheck --check-prefix=CHECK-AUTOLINK-DISABLED %s
+// RUN: %clang_cc1 -emit-pch -fmodules-cache-path=%t -fmodules -o %t.pch -I %S/Inputs -x objective-c-header %S/Inputs/autolink-sub3.pch
+// RUN: %clang_cc1 -emit-llvm -o - -fmodules-cache-path=%t -fmodules -F %S/Inputs -I %S/Inputs -include-pch %t.pch %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -fno-autolink -o - -fmodules-cache-path=%t -fmodules -F %S/Inputs -I %S/Inputs -include-pch %t.pch %s | FileCheck --check-prefix=CHECK-AUTOLINK-DISABLED %s
@import autolink.sub2;
@@ -29,11 +30,16 @@ int use_no_umbrella() {
return no_umbrella_A;
}
+int use_autolink_sub3() {
+ return autolink_sub3();
+}
+
// NOTE: "autolink_sub" is intentionally not linked.
-// CHECK: !llvm.module.flags = !{!0, !1, !2, !3, !4}
-// CHECK: !4 = metadata !{i32 6, metadata !"Linker Options", metadata ![[AUTOLINK_OPTIONS:[0-9]+]]}
-// CHECK: ![[AUTOLINK_OPTIONS]] = metadata !{metadata ![[AUTOLINK_FRAMEWORK:[0-9]+]], metadata ![[AUTOLINK:[0-9]+]], metadata ![[DEPENDSONMODULE:[0-9]+]], metadata ![[MODULE:[0-9]+]], metadata ![[NOUMBRELLA:[0-9]+]]}
+// CHECK: !llvm.module.flags = !{{{.*}}}
+// CHECK: !{{[0-9]+}} = metadata !{i32 6, metadata !"Linker Options", metadata ![[AUTOLINK_OPTIONS:[0-9]+]]}
+// CHECK: ![[AUTOLINK_OPTIONS]] = metadata !{metadata ![[AUTOLINK_PCH:[0-9]+]], metadata ![[AUTOLINK_FRAMEWORK:[0-9]+]], metadata ![[AUTOLINK:[0-9]+]], metadata ![[DEPENDSONMODULE:[0-9]+]], metadata ![[MODULE:[0-9]+]], metadata ![[NOUMBRELLA:[0-9]+]]}
+// CHECK: ![[AUTOLINK_PCH]] = metadata !{metadata !"{{(-l|/DEFAULTLIB:)}}autolink_from_pch{{(\.lib)?}}"}
// CHECK: ![[AUTOLINK_FRAMEWORK]] = metadata !{metadata !"-framework", metadata !"autolink_framework"}
// CHECK: ![[AUTOLINK]] = metadata !{metadata !"{{(-l|/DEFAULTLIB:)}}autolink{{(\.lib)?}}"}
// CHECK: ![[DEPENDSONMODULE]] = metadata !{metadata !"-framework", metadata !"DependsOnModule"}
diff --git a/test/Modules/compiler_builtins_arm.m b/test/Modules/compiler_builtins_arm.m
index d15437cafcdb..5da6a12fb3a6 100644
--- a/test/Modules/compiler_builtins_arm.m
+++ b/test/Modules/compiler_builtins_arm.m
@@ -1,6 +1,5 @@
// RUN: rm -rf %t
// RUN: %clang_cc1 -fsyntax-only -triple thumbv7-none-linux-gnueabihf -target-abi aapcs -target-cpu cortex-a8 -mfloat-abi hard -std=c99 -fmodules -fmodules-cache-path=%t -D__need_wint_t %s -verify
// expected-no-diagnostics
-// REQUIRES: arm-registered-target
@import _Builtin_intrinsics.arm.neon;
diff --git a/test/Modules/config_macros.m b/test/Modules/config_macros.m
index 200744d614a7..b147317bf60d 100644
--- a/test/Modules/config_macros.m
+++ b/test/Modules/config_macros.m
@@ -24,5 +24,5 @@ char *test_bar() {
// RUN: rm -rf %t
// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -DWANT_FOO=1 -emit-module -fmodule-name=config %S/Inputs/module.map
-// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -DWANT_FOO=1 %s -verify
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs -DWANT_FOO=1 %s -verify
diff --git a/test/Modules/cxx-decls.cpp b/test/Modules/cxx-decls.cpp
index ba3281aaec7a..5498b47fc9fe 100644
--- a/test/Modules/cxx-decls.cpp
+++ b/test/Modules/cxx-decls.cpp
@@ -1,8 +1,11 @@
// RUN: rm -rf %t
// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11
+// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -ast-dump -ast-dump-filter merge -std=c++11 | FileCheck %s
// expected-no-diagnostics
+void use_implicit_new() { operator new[](3); }
+
@import dummy;
@import cxx_decls.imported;
@@ -19,3 +22,15 @@ void test_friends(HasFriends s) {
friend_1(s);
friend_2(s);
}
+
+static_assert(!__is_trivial(HasNontrivialDefaultConstructor), "");
+static_assert(!__has_trivial_constructor(HasNontrivialDefaultConstructor), "");
+
+void use_implicit_new_again() { operator new[](3); }
+
+int importMergeUsedFlag = getMergeUsedFlag();
+
+@import cxx_decls_merged;
+
+// CHECK: VarDecl [[mergeUsedFlag:0x[0-9a-f]*]] {{.*}} in cxx_decls.imported used mergeUsedFlag
+// CHECK: VarDecl {{0x[0-9a-f]*}} prev [[mergeUsedFlag]] {{.*}} in cxx_decls_merged used mergeUsedFlag
diff --git a/test/Modules/cxx-inline-namespace.cpp b/test/Modules/cxx-inline-namespace.cpp
index 5b967901b338..f67d43b6843a 100644
--- a/test/Modules/cxx-inline-namespace.cpp
+++ b/test/Modules/cxx-inline-namespace.cpp
@@ -2,5 +2,8 @@
// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11
@import cxx_inline_namespace;
+@import cxx_inline_namespace_b;
T x; // expected-error {{unknown type name 'T'}}
+
+X::Elaborated *p;
diff --git a/test/Modules/cxx-irgen.cpp b/test/Modules/cxx-irgen.cpp
new file mode 100644
index 000000000000..4c61a3a3583b
--- /dev/null
+++ b/test/Modules/cxx-irgen.cpp
@@ -0,0 +1,22 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodules -x objective-c++ -std=c++11 -fmodules-cache-path=%t -I %S/Inputs -triple %itanium_abi_triple -disable-llvm-optzns -emit-llvm -o - %s | FileCheck %s
+// FIXME: When we have a syntax for modules in C++, use that.
+
+@import cxx_irgen_top;
+
+// CHECK-DAG: call {{[a-z]*[ ]?i32}} @_ZN8CtorInitIiE1fEv(
+CtorInit<int> x;
+
+@import cxx_irgen_left;
+@import cxx_irgen_right;
+
+// CHECK-DAG: define available_externally hidden {{signext i32|i32}} @_ZN1SIiE1gEv({{.*}} #[[ALWAYS_INLINE:.*]] align
+int a = S<int>::g();
+
+// CHECK-DAG: define available_externally {{signext i32|i32}} @_ZN1SIiE1fEv({{.*}} #[[ALWAYS_INLINE]] align
+int b = h();
+
+// CHECK-DAG: define linkonce_odr {{signext i32|i32}} @_Z3minIiET_S0_S0_(i32
+int c = min(1, 2);
+
+// CHECK: attributes #[[ALWAYS_INLINE]] = {{.*}} alwaysinline
diff --git a/test/Modules/cxx-templates.cpp b/test/Modules/cxx-templates.cpp
index 65f41f677be5..cbe9f3508951 100644
--- a/test/Modules/cxx-templates.cpp
+++ b/test/Modules/cxx-templates.cpp
@@ -1,7 +1,8 @@
// RUN: rm -rf %t
-// RUN: not %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -std=c++11 -ast-dump -ast-dump-lookups | FileCheck %s --check-prefix=CHECK-GLOBAL
-// RUN: not %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -std=c++11 -ast-dump -ast-dump-lookups -ast-dump-filter N | FileCheck %s --check-prefix=CHECK-NAMESPACE-N
-// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11
+// RUN: not %clang_cc1 -x objective-c++ -fmodules -fno-modules-error-recovery -fmodules-cache-path=%t -I %S/Inputs %s -std=c++11 -ast-dump -ast-dump-lookups | FileCheck %s --check-prefix=CHECK-GLOBAL
+// RUN: not %clang_cc1 -x objective-c++ -fmodules -fno-modules-error-recovery -fmodules-cache-path=%t -I %S/Inputs %s -std=c++11 -ast-dump -ast-dump-lookups -ast-dump-filter N | FileCheck %s --check-prefix=CHECK-NAMESPACE-N
+// RUN: not %clang_cc1 -x objective-c++ -fmodules -fno-modules-error-recovery -fmodules-cache-path=%t -I %S/Inputs %s -std=c++11 -ast-dump | FileCheck %s --check-prefix=CHECK-DUMP
+// RUN: %clang_cc1 -x objective-c++ -fmodules -fno-modules-error-recovery -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11
@import cxx_templates_a;
@import cxx_templates_b;
@@ -28,8 +29,8 @@ void g() {
N::f<double>(1.0);
N::f<int>();
N::f(); // expected-error {{no matching function}}
- // expected-note@Inputs/cxx-templates-b.h:6 {{couldn't infer template argument}}
- // expected-note@Inputs/cxx-templates-b.h:7 {{requires single argument 't'}}
+ // expected-note@Inputs/cxx-templates-a.h:6 {{couldn't infer template argument}}
+ // expected-note@Inputs/cxx-templates-a.h:7 {{requires 1 argument}}
template_param_kinds_1<0>(); // ok, from cxx-templates-a.h
template_param_kinds_1<int>(); // ok, from cxx-templates-b.h
@@ -70,8 +71,15 @@ void g() {
// Trigger the instantiation of a template in 'a' that uses a type defined in
// 'b_impl'. That type is not visible here, nor in 'a'. This fails; there is
// no reason why DefinedInBImpl should be visible here.
+ //
+ // We turn off error recovery for modules in this test (so we don't get an
+ // implicit import of cxx_templates_b_impl), and that results in us producing
+ // a big spew of errors here.
+ //
// expected-error@Inputs/cxx-templates-a.h:19 {{definition of 'DefinedInBImpl' must be imported}}
- // expected-note@Inputs/cxx-templates-b-impl.h:1 {{definition is here}}
+ // expected-note@Inputs/cxx-templates-b-impl.h:1 +{{definition is here}}
+ // expected-error@Inputs/cxx-templates-a.h:19 +{{}}
+ // expected-error@Inputs/cxx-templates-a.h:20 +{{}}
PerformDelayedLookup(defined_in_b_impl); // expected-note {{in instantiation of}}
merge_templates_a = merge_templates_b; // ok, same type
@@ -88,8 +96,23 @@ void g() {
static_assert(enum_c_from_a == enum_c_from_b, "");
CommonTemplate<int> cti;
CommonTemplate<int>::E eee = CommonTemplate<int>::c;
+
+ TemplateInstantiationVisibility<char[1]> tiv1;
+ TemplateInstantiationVisibility<char[2]> tiv2;
+ TemplateInstantiationVisibility<char[3]> tiv3; // expected-error {{must be imported from module 'cxx_templates_b_impl'}}
+ // expected-note@cxx-templates-b-impl.h:10 {{previous definition is here}}
+ TemplateInstantiationVisibility<char[4]> tiv4;
+
+ int &p = WithPartialSpecializationUse().f();
+ int &q = WithExplicitSpecializationUse().inner_template<int>();
}
+static_assert(Outer<int>::Inner<int>::f() == 1, "");
+static_assert(Outer<int>::Inner<int>::g() == 2, "");
+
+static_assert(MergeTemplateDefinitions<int>::f() == 1, "");
+static_assert(MergeTemplateDefinitions<int>::g() == 2, "");
+
RedeclaredAsFriend<int> raf1;
RedeclareTemplateAsFriend<double> rtaf;
RedeclaredAsFriend<double> raf2;
@@ -116,6 +139,15 @@ void testImplicitSpecialMembers(SomeTemplate<char[1]> &a,
c = d;
}
+bool testFriendInClassTemplate(Std::WithFriend<int> wfi) {
+ return wfi != wfi;
+}
+
+namespace Std {
+ void g(); // expected-error {{functions that differ only in their return type cannot be overloaded}}
+ // expected-note@cxx-templates-common.h:21 {{previous}}
+}
+
// CHECK-GLOBAL: DeclarationName 'f'
// CHECK-GLOBAL-NEXT: |-FunctionTemplate {{.*}} 'f'
// CHECK-GLOBAL-NEXT: `-FunctionTemplate {{.*}} 'f'
@@ -123,3 +155,13 @@ void testImplicitSpecialMembers(SomeTemplate<char[1]> &a,
// CHECK-NAMESPACE-N: DeclarationName 'f'
// CHECK-NAMESPACE-N-NEXT: |-FunctionTemplate {{.*}} 'f'
// CHECK-NAMESPACE-N-NEXT: `-FunctionTemplate {{.*}} 'f'
+
+// CHECK-DUMP: ClassTemplateDecl {{.*}} <{{.*[/\\]}}cxx-templates-common.h:1:1, {{.*}}> col:{{.*}} in cxx_templates_common SomeTemplate
+// CHECK-DUMP: ClassTemplateSpecializationDecl {{.*}} prev [[CHAR2:[^ ]*]] {{.*}} SomeTemplate
+// CHECK-DUMP-NEXT: TemplateArgument type 'char [2]'
+// CHECK-DUMP: ClassTemplateSpecializationDecl [[CHAR2]] {{.*}} SomeTemplate definition
+// CHECK-DUMP-NEXT: TemplateArgument type 'char [2]'
+// CHECK-DUMP: ClassTemplateSpecializationDecl {{.*}} prev [[CHAR1:[^ ]*]] {{.*}} SomeTemplate
+// CHECK-DUMP-NEXT: TemplateArgument type 'char [1]'
+// CHECK-DUMP: ClassTemplateSpecializationDecl [[CHAR1]] {{.*}} SomeTemplate definition
+// CHECK-DUMP-NEXT: TemplateArgument type 'char [1]'
diff --git a/test/Modules/declare-use.S b/test/Modules/declare-use.S
new file mode 100644
index 000000000000..2c5d8af7dd25
--- /dev/null
+++ b/test/Modules/declare-use.S
@@ -0,0 +1,5 @@
+// RUN: rm -rf %t
+// RUN: %clang -fmodule-maps -fmodules-cache-path=%t -fmodules-decluse -fmodule-name=XS -I %S/Inputs/declare-use -S %s -Xclang -verify
+// expected-no-diagnostics
+
+#include "s.h"
diff --git a/test/Modules/declare-use1.cpp b/test/Modules/declare-use1.cpp
index 4508017c12d2..5fc43360ffa3 100644
--- a/test/Modules/declare-use1.cpp
+++ b/test/Modules/declare-use1.cpp
@@ -1,7 +1,8 @@
// RUN: rm -rf %t
-// RUN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -fmodules-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify
+// RUN: %clang_cc1 -fmodule-maps -fmodules-cache-path=%t -fmodules-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify
#include "g.h"
#include "e.h"
-#include "f.h" // expected-error {{use of a module not declared used}}
-const int g2 = g1+e+f;
+#include "f.h" // expected-error {{module XG does not depend on a module exporting 'f.h'}}
+#include "i.h"
+const int g2 = g1 + e + f + aux_i;
diff --git a/test/Modules/declare-use2.cpp b/test/Modules/declare-use2.cpp
index a2ec55e5e5ca..45352891685d 100644
--- a/test/Modules/declare-use2.cpp
+++ b/test/Modules/declare-use2.cpp
@@ -1,7 +1,7 @@
// RUN: rm -rf %t
-// RUN: %clang_cc1 -x objective-c++ -fmodules-cache-path=%t -fmodules -fmodules-decluse -fmodule-name=XH -I %S/Inputs/declare-use %s -verify
+// RUN: %clang_cc1 -fmodule-maps -fmodules-cache-path=%t -fmodules-decluse -fmodule-name=XH -I %S/Inputs/declare-use %s -verify
#include "h.h"
#include "e.h"
-#include "f.h" // expected-error {{use of a module not declared used}}
+#include "f.h" // expected-error {{module XH does not depend on a module exporting 'f.h'}}
const int h2 = h1+e+f;
diff --git a/test/Modules/declare-use3.cpp b/test/Modules/declare-use3.cpp
new file mode 100644
index 000000000000..8b0bbfa756c3
--- /dev/null
+++ b/test/Modules/declare-use3.cpp
@@ -0,0 +1,4 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -include "g.h" -include "e.h" -include "f.h" -include "i.h" -fmodule-maps -fmodules-cache-path=%t -fmodules-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify
+// expected-error {{module XG does not depend on a module exporting 'f.h'}}
+const int g2 = g1 + e + f + aux_i;
diff --git a/test/Modules/declare-use4.cpp b/test/Modules/declare-use4.cpp
new file mode 100644
index 000000000000..1d346469f1ef
--- /dev/null
+++ b/test/Modules/declare-use4.cpp
@@ -0,0 +1,10 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodule-maps -fmodules-cache-path=%t -fmodules-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify
+
+#define ALLOWED_INC "b.h"
+
+#include "j.h"
+
+const int g2 = j;
+
+// expected-no-diagnostics
diff --git a/test/Modules/decldef.mm b/test/Modules/decldef.mm
index 35694935dfbb..2e2bd8a75e20 100644
--- a/test/Modules/decldef.mm
+++ b/test/Modules/decldef.mm
@@ -1,14 +1,18 @@
// RUN: rm -rf %t
-// RUN: %clang_cc1 -fmodules -fobjc-arc -I %S/Inputs -fmodules-cache-path=%t %s -verify -DUSE_EARLY
-// RUN: %clang_cc1 -fmodules -fobjc-arc -I %S/Inputs -fmodules-cache-path=%t %s -verify
+// RUN: %clang_cc1 -fmodules -fobjc-arc -I %S/Inputs -fmodules-cache-path=%t %s -verify -DUSE_1 -DUSE_2 -DUSE_3 -DUSE_4
+// RUN: %clang_cc1 -fmodules -fobjc-arc -I %S/Inputs -fmodules-cache-path=%t %s -verify -DUSE_2 -DUSE_3 -DUSE_4
+// RUN: %clang_cc1 -fmodules -fobjc-arc -I %S/Inputs -fmodules-cache-path=%t %s -verify -DUSE_3 -DUSE_4
+// RUN: %clang_cc1 -fmodules -fobjc-arc -I %S/Inputs -fmodules-cache-path=%t %s -verify -DUSE_4
-// expected-note@Inputs/def.h:5 {{previous}}
+// expected-note@Inputs/def.h:5 0-1{{previous}}
+// expected-note@Inputs/def.h:16 0-1{{previous}}
+// expected-note@Inputs/def-include.h:11 0-1{{previous}}
@class Def;
Def *def;
-class Def2; // expected-note {{forward decl}}
+class Def2; // expected-note 0-1{{forward decl}}
Def2 *def2;
-namespace Def3NS { class Def3; } // expected-note {{forward decl}}
+namespace Def3NS { class Def3; } // expected-note 0-1{{forward decl}}
Def3NS::Def3 *def3;
@interface Unrelated
@@ -16,9 +20,10 @@ Def3NS::Def3 *def3;
@end
@import decldef;
-#ifdef USE_EARLY
+#ifdef USE_1
A *a1; // expected-error{{declaration of 'A' must be imported from module 'decldef.Def'}}
B *b1;
+#define USED
#endif
@import decldef.Decl;
@@ -26,14 +31,23 @@ A *a2;
B *b;
void testA(A *a) {
+#ifdef USE_2
a->ivar = 17;
-#ifndef USE_EARLY
+ #ifndef USED
// expected-error@-2{{definition of 'A' must be imported from module 'decldef.Def' before it is required}}
+ #define USED
+ #endif
#endif
}
void testB() {
- B b; // Note: redundant error silenced
+#ifdef USE_3
+ B b;
+ #ifndef USED
+ // expected-error@-2{{definition of 'B' must be imported from module 'decldef.Def' before it is required}}
+ #define USED
+ #endif
+#endif
}
void testDef() {
@@ -41,9 +55,12 @@ void testDef() {
}
void testDef2() {
- // FIXME: These should both work, since we've (implicitly) imported
- // decldef.Def here, but they don't, because nothing has triggered the lazy
- // loading of the definitions of these classes.
- def2->func(); // expected-error {{incomplete}}
- def3->func(); // expected-error {{incomplete}}
+#ifdef USE_4
+ def2->func();
+ def3->func();
+ #ifndef USED
+ // expected-error@-3 {{definition of 'Def2' must be imported}}
+ #define USED
+ #endif
+#endif
}
diff --git a/test/Modules/dependency-dump-dependent-module.m b/test/Modules/dependency-dump-dependent-module.m
new file mode 100644
index 000000000000..3b04435dd594
--- /dev/null
+++ b/test/Modules/dependency-dump-dependent-module.m
@@ -0,0 +1,22 @@
+// When a module depends on another, check that we dump the dependency header
+// files for both.
+
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t/cache -module-dependency-dir %t/vfs -F %S/Inputs -I %S/Inputs -verify %s
+// expected-no-diagnostics
+
+// RUN: FileCheck %s -check-prefix=VFS < %t/vfs/vfs.yaml
+// VFS: 'name': "AlsoDependsOnModule.h"
+// VFS: 'name': "SubFramework.h"
+// VFS: 'name': "Treasure.h"
+// VFS: 'name': "Module.h"
+// VFS: 'name': "Sub.h"
+// VFS: 'name': "Sub2.h"
+
+@import AlsoDependsOnModule;
+
+// FIXME: This fails on win32 due to ERROR_FILENAME_EXCED_RANGE
+// if the working directory is too deep.
+// We should make Win32/Path.inc capable of long pathnames with '\\?\'.
+// For now, this is suppressed on win32.
+// REQUIRES: shell
diff --git a/test/Modules/dependency-dump.m b/test/Modules/dependency-dump.m
new file mode 100644
index 000000000000..630af4950c18
--- /dev/null
+++ b/test/Modules/dependency-dump.m
@@ -0,0 +1,15 @@
+// Check that we can dump all of the headers a module depends on, and a VFS map
+// for the same.
+
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t/cache -module-dependency-dir %t/vfs -F %S/Inputs -I %S/Inputs -verify %s
+// expected-no-diagnostics
+
+// RUN: FileCheck %s -check-prefix=VFS -input-file %t/vfs/vfs.yaml
+// VFS: 'name': "SubFramework.h"
+// VFS: 'name': "Treasure.h"
+// VFS: 'name': "Module.h"
+// VFS: 'name': "Sub.h"
+// VFS: 'name': "Sub2.h"
+
+@import Module;
diff --git a/test/Modules/dependency-gen-inferred-map.m b/test/Modules/dependency-gen-inferred-map.m
new file mode 100644
index 000000000000..11cc87288115
--- /dev/null
+++ b/test/Modules/dependency-gen-inferred-map.m
@@ -0,0 +1,8 @@
+// Test that the virtual file "__inferred_module.map" doesn't show up as dependency.
+
+// RUN: rm -rf %t-mcp
+// RUN: %clang_cc1 -isysroot %S/Inputs/System -triple x86_64-apple-darwin10 -dependency-file %t.d -MT %s.o -F %S/Inputs -fsyntax-only -fmodules -fmodules-cache-path=%t-mcp %s
+// RUN: FileCheck %s < %t.d
+// CHECK-NOT: __inferred_module
+
+@import Module;
diff --git a/test/Modules/dependency-gen-pch.m b/test/Modules/dependency-gen-pch.m
new file mode 100644
index 000000000000..65e22d485dd2
--- /dev/null
+++ b/test/Modules/dependency-gen-pch.m
@@ -0,0 +1,12 @@
+// RUN: rm -rf %t-mcp
+// RUN: mkdir -p %t-mcp
+
+// RUN: %clang_cc1 -isysroot %S/Inputs/System -triple x86_64-apple-darwin10 -module-file-deps -dependency-file %t.d -MT %s.o -I %S/Inputs -fmodules -fdisable-module-hash -fmodules-cache-path=%t-mcp -emit-pch -o %t.pch %s
+// RUN: FileCheck %s < %t.d
+// CHECK: dependency-gen-pch.m.o
+// CHECK-NEXT: dependency-gen-pch.m
+// CHECK-NEXT: diamond_top.pcm
+// CHECK-NEXT: Inputs{{.}}diamond_top.h
+// CHECK-NEXT: Inputs{{.}}module.map
+
+#import "diamond_top.h"
diff --git a/test/Modules/dependency-gen.m b/test/Modules/dependency-gen.m
new file mode 100644
index 000000000000..dec83848f061
--- /dev/null
+++ b/test/Modules/dependency-gen.m
@@ -0,0 +1,22 @@
+// RUN: rm -rf %t-mcp
+// RUN: mkdir -p %t-mcp
+
+// RUN: %clang_cc1 -x objective-c -isysroot %S/Inputs/System -triple x86_64-apple-darwin10 -dependency-file %t.d.1 -MT %s.o -I %S/Inputs -fsyntax-only -fmodules -fmodules-cache-path=%t-mcp %s
+// RUN: FileCheck %s < %t.d.1
+// CHECK: dependency-gen.m
+// CHECK: Inputs{{.}}diamond_top.h
+// CHECK: Inputs{{.}}module.map
+// CHECK-NOT: usr{{.}}include{{.}}module.map
+// CHECK-NOT: stdint.h
+
+
+// RUN: %clang_cc1 -x objective-c -isysroot %S/Inputs/System -triple x86_64-apple-darwin10 -dependency-file %t.d.2 -MT %s.o -I %S/Inputs -sys-header-deps -fsyntax-only -fmodules -fmodules-cache-path=%t-mcp %s
+// RUN: FileCheck %s -check-prefix=CHECK-SYS < %t.d.2
+// CHECK-SYS: dependency-gen.m
+// CHECK-SYS: Inputs{{.}}diamond_top.h
+// CHECK-SYS: Inputs{{.}}module.map
+// CHECK-SYS: usr{{.}}include{{.}}module.map
+// CHECK-SYS: stdint.h
+
+#import "diamond_top.h"
+#import "stdint.h" // inside sysroot
diff --git a/test/Modules/diag-pragma.c b/test/Modules/diag-pragma.c
index 7ec3400bba24..89435c176ed5 100644
--- a/test/Modules/diag-pragma.c
+++ b/test/Modules/diag-pragma.c
@@ -1,6 +1,6 @@
// RUN: rm -rf %t
// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diag_pragma %S/Inputs/module.map
-// RUN: %clang_cc1 -fmodules -x objective-c -verify -fmodules-cache-path=%t %s
+// RUN: %clang_cc1 -fmodules -x objective-c -verify -fmodules-cache-path=%t -I %S/Inputs %s
// FIXME: When we have a syntax for modules in C, use that.
@import diag_pragma;
diff --git a/test/Modules/diamond-pch.c b/test/Modules/diamond-pch.c
index e7ad02dbe48a..f66ad877dee4 100644
--- a/test/Modules/diamond-pch.c
+++ b/test/Modules/diamond-pch.c
@@ -3,8 +3,8 @@
// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_left %S/Inputs/module.map
// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_right %S/Inputs/module.map
// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_bottom %S/Inputs/module.map
-// RUN: %clang_cc1 -fmodules -x objective-c -emit-pch -fmodules-cache-path=%t -o %t.pch %S/Inputs/diamond.h
-// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -include-pch %t.pch %s -verify
+// RUN: %clang_cc1 -fmodules -x objective-c -emit-pch -fmodules-cache-path=%t -I %S/Inputs -o %t.pch %S/Inputs/diamond.h
+// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -include-pch %t.pch %s -I %S/Inputs -verify
// FIXME: When we have a syntax for modules in C, use that.
void test_diamond(int i, float f, double d, char c) {
diff --git a/test/Modules/diamond.c b/test/Modules/diamond.c
index 89d5bc0dda5f..8b824081a1e3 100644
--- a/test/Modules/diamond.c
+++ b/test/Modules/diamond.c
@@ -3,7 +3,7 @@
// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_left %S/Inputs/module.map
// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_right %S/Inputs/module.map
// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_bottom %S/Inputs/module.map
-// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t %s -verify
+// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -I %S/Inputs %s -verify
// FIXME: When we have a syntax for modules in C, use that.
@import diamond_bottom;
diff --git a/test/Modules/exclude-header.c b/test/Modules/exclude-header.c
new file mode 100644
index 000000000000..4134c82483d3
--- /dev/null
+++ b/test/Modules/exclude-header.c
@@ -0,0 +1,11 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -x objective-c -fmodules -fmodules-cache-path=%t -I %S/Inputs/exclude-header %s -verify
+
+@import x;
+
+a var_a;
+b var_b1; // expected-error {{unknown type name 'b'}}
+
+@import y;
+
+b var_b2;
diff --git a/test/Modules/extern_c.cpp b/test/Modules/extern_c.cpp
new file mode 100644
index 000000000000..ba466f2a53a2
--- /dev/null
+++ b/test/Modules/extern_c.cpp
@@ -0,0 +1,81 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs %s
+// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs %s -DEXTERN_C
+// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs %s -DEXTERN_CXX
+// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs %s -DEXTERN_C -DEXTERN_CXX
+// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs %s -DEXTERN_C -DNAMESPACE
+// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs %s -DCXX_HEADER
+// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs %s -DCXX_HEADER -DEXTERN_C
+// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs %s -DCXX_HEADER -DEXTERN_CXX
+// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs %s -DCXX_HEADER -DEXTERN_C -DEXTERN_CXX
+// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs %s -DCXX_HEADER -DEXTERN_C -DNAMESPACE
+// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs -x c %s
+// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs/elsewhere -I %S/Inputs %s -DEXTERN_C -DINDIRECT
+
+#ifdef INDIRECT
+#include "c-header-indirect.h"
+#endif
+
+#ifdef NAMESPACE
+namespace M {
+#endif
+
+#ifdef EXTERN_C
+extern "C" {
+#endif
+
+#ifdef EXTERN_CXX
+extern "C++" {
+#endif
+
+#ifdef CXX_HEADER
+#define HEADER "cxx-header.h"
+#else
+#define HEADER "c-header.h"
+#endif
+
+#include HEADER
+
+#if defined(EXTERN_C) && !defined(EXTERN_CXX) && defined(CXX_HEADER)
+// expected-error@-3 {{import of C++ module 'cxx_library' appears within extern "C" language linkage specification}}
+// expected-note@-17 {{extern "C" language linkage specification begins here}}
+#elif defined(NAMESPACE)
+// expected-error-re@-6 {{import of module '{{c_library.inner|cxx_library}}' appears within namespace 'M'}}
+// expected-note@-24 {{namespace 'M' begins here}}
+#endif
+
+#ifdef EXTERN_CXX
+}
+#endif
+
+#ifdef EXTERN_C
+}
+#endif
+
+#ifdef NAMESPACE
+}
+using namespace M;
+#endif
+
+#ifdef __cplusplus
+namespace N {
+#endif
+ void g() {
+ int k = f();
+ }
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+ int f;
+#if !defined(CXX_HEADER)
+ // expected-error@-2 {{redefinition of 'f' as different kind of symbol}}
+ // expected-note@c-header.h:1 {{previous}}
+#endif
+
+#ifdef __cplusplus
+ }
+}
+#endif
+
+suppress_expected_no_diagnostics_error error_here; // expected-error {{}}
diff --git a/test/Modules/extern_c_bad.cpp b/test/Modules/extern_c_bad.cpp
new file mode 100644
index 000000000000..bafdc046ce0a
--- /dev/null
+++ b/test/Modules/extern_c_bad.cpp
@@ -0,0 +1,2 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -verify -fmodules -x c++ -emit-module -fmodules-cache-path=%t -fmodule-name=c_library_bad %S/Inputs/module.map
diff --git a/test/Modules/fatal-module-loader-error.m b/test/Modules/fatal-module-loader-error.m
index 6af3b4c7c370..2d8dd24e5135 100644
--- a/test/Modules/fatal-module-loader-error.m
+++ b/test/Modules/fatal-module-loader-error.m
@@ -23,4 +23,4 @@
// Also check that libclang does not create a PCH with such an error.
// RUN: not c-index-test -write-pch %t.pch -fmodules -fmodules-cache-path=%t \
// RUN: %s -Xclang -fdisable-module-hash -F %S/Inputs 2>&1 | FileCheck %s
-// CHECK: Unable to write PCH file
+// CHECK: {{^}}Failure: AST deserialization error occurred{{$}}
diff --git a/test/Modules/fmodules-validate-once-per-build-session.c b/test/Modules/fmodules-validate-once-per-build-session.c
new file mode 100644
index 000000000000..346d5a72c3e8
--- /dev/null
+++ b/test/Modules/fmodules-validate-once-per-build-session.c
@@ -0,0 +1,45 @@
+#include "foo.h"
+
+// Clear the module cache.
+// RUN: rm -rf %t
+// RUN: mkdir -p %t/Inputs
+// RUN: mkdir -p %t/modules-to-compare
+
+// ===
+// Create a module with system headers.
+// RUN: echo 'void meow(void);' > %t/Inputs/foo.h
+// RUN: echo 'module Foo [system] { header "foo.h" }' > %t/Inputs/module.map
+
+// ===
+// Compile the module.
+// RUN: %clang_cc1 -cc1 -fmodules -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -fsyntax-only -I %t/Inputs -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s
+// RUN: ls -R %t/modules-cache | grep Foo.pcm.timestamp
+// RUN: cp %t/modules-cache/Foo.pcm %t/modules-to-compare/Foo-before.pcm
+
+// ===
+// Use it, and make sure that we did not recompile it.
+// RUN: %clang_cc1 -cc1 -fmodules -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -fsyntax-only -I %t/Inputs -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s
+// RUN: ls -R %t/modules-cache | grep Foo.pcm.timestamp
+// RUN: cp %t/modules-cache/Foo.pcm %t/modules-to-compare/Foo-after.pcm
+
+// RUN: diff %t/modules-to-compare/Foo-before.pcm %t/modules-to-compare/Foo-after.pcm
+
+// ===
+// Change the sources.
+// RUN: echo 'void meow2(void);' > %t/Inputs/foo.h
+
+// ===
+// Use the module, and make sure that we did not recompile it, even though the sources changed.
+// RUN: %clang_cc1 -cc1 -fmodules -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -fsyntax-only -I %t/Inputs -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session %s
+// RUN: ls -R %t/modules-cache | grep Foo.pcm.timestamp
+// RUN: cp %t/modules-cache/Foo.pcm %t/modules-to-compare/Foo-after.pcm
+
+// RUN: diff %t/modules-to-compare/Foo-before.pcm %t/modules-to-compare/Foo-after.pcm
+
+// ===
+// Recompile the module if the today's date is before 01 January 2030.
+// RUN: %clang_cc1 -cc1 -fmodules -fdisable-module-hash -fmodules-cache-path=%t/modules-cache -fsyntax-only -I %t/Inputs -fbuild-session-timestamp=1893456000 -fmodules-validate-once-per-build-session %s
+// RUN: ls -R %t/modules-cache | grep Foo.pcm.timestamp
+// RUN: cp %t/modules-cache/Foo.pcm %t/modules-to-compare/Foo-after.pcm
+
+// RUN: not diff %t/modules-to-compare/Foo-before.pcm %t/modules-to-compare/Foo-after.pcm
diff --git a/test/Modules/import-self.m b/test/Modules/import-self.m
new file mode 100644
index 000000000000..68be565eaf40
--- /dev/null
+++ b/test/Modules/import-self.m
@@ -0,0 +1,11 @@
+// RUN: rm -rf %t
+// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t \
+// RUN: -I %S/Inputs/submodules %s 2>&1 | FileCheck %s
+// CHECK: import of module 'import_self.c' appears within same top-level module 'import_self'
+
+// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t \
+// RUN: -I %S/Inputs/submodules -fmodule-name=import_self %s \
+// RUN: 2>&1 | FileCheck -check-prefix=CHECK-fmodule-name %s
+// CHECK-fmodule-name: import of module 'import_self.b' appears within same top-level module 'import_self'
+
+@import import_self.b;
diff --git a/test/Modules/include-relative.c b/test/Modules/include-relative.c
new file mode 100644
index 000000000000..9ca76eeb921c
--- /dev/null
+++ b/test/Modules/include-relative.c
@@ -0,0 +1,12 @@
+// RUN: rm -rf %t
+// RUN: mkdir %t
+// RUN: cp -r %S/Inputs/include-relative %t/include-relative
+// RUN: cd %t
+// RUN: %clang_cc1 -fmodules -x c -verify -fmodules-cache-path=%t -I include-relative %s
+// REQUIRES: shell
+
+// expected-no-diagnostics
+
+#include "a.h"
+
+int f() { return n; }
diff --git a/test/Modules/inferred-framework-case.m b/test/Modules/inferred-framework-case.m
new file mode 100644
index 000000000000..e511155de9ef
--- /dev/null
+++ b/test/Modules/inferred-framework-case.m
@@ -0,0 +1,7 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -F %S/Inputs %s -verify -DA
+// FIXME: PR20299 - getCanonicalName() is not implemented on Windows.
+// REQUIRES: shell
+
+@import MOdule; // expected-error{{module 'MOdule' not found}}
+@import Module;
diff --git a/test/Modules/irgen.c b/test/Modules/irgen.c
index 9a7cf7eff08c..c44afb1becb1 100644
--- a/test/Modules/irgen.c
+++ b/test/Modules/irgen.c
@@ -1,6 +1,6 @@
// RUN: rm -rf %t
// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=irgen -triple x86_64-apple-darwin10 %S/Inputs/module.map
-// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -I %S/Inputs -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
// FIXME: When we have a syntax for modules in C, use that.
@import irgen;
diff --git a/test/Modules/linkage-merge.cpp b/test/Modules/linkage-merge.cpp
index 9cc9ae64bf97..664716d3bed7 100644
--- a/test/Modules/linkage-merge.cpp
+++ b/test/Modules/linkage-merge.cpp
@@ -7,6 +7,5 @@ static int f(int);
int f(int);
static void g(int);
-// expected-error@-1 {{declaration conflicts with target of using declaration already in scope}}
-// expected-note@Inputs/linkage-merge-foo.h:2 {{target of using declaration}}
-// expected-note@Inputs/linkage-merge-bar.h:3 {{using declaration}}
+// expected-error@-1 {{functions that differ only in their return type cannot be overloaded}}
+// expected-note@Inputs/linkage-merge-foo.h:2 {{previous declaration is here}}
diff --git a/test/Modules/linkage-merge.m b/test/Modules/linkage-merge.m
index e838ca10183d..12ad32fa3d18 100644
--- a/test/Modules/linkage-merge.m
+++ b/test/Modules/linkage-merge.m
@@ -1,6 +1,6 @@
// RUN: rm -rf %t
// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=linkage_merge_left %S/Inputs/module.map
-// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -w %s -verify
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs -w %s -verify
// Test redeclarations of functions where the original declaration is
// still hidden.
diff --git a/test/Modules/load-after-failure.m b/test/Modules/load-after-failure.m
new file mode 100644
index 000000000000..f471fd88d505
--- /dev/null
+++ b/test/Modules/load-after-failure.m
@@ -0,0 +1,25 @@
+// REQUIRES: shell
+// RUN: rm -rf %t
+// RUN: mkdir -p %t
+
+// RUN: echo '@import B;' > %t/A.h
+// RUN: echo '@import C;' > %t/B.h
+// RUN: echo '@import D;' >> %t/B.h
+// RUN: echo '// C.h' > %t/C.h
+// RUN: echo '// D.h' > %t/D.h
+// RUN: echo 'module A { header "A.h" }' > %t/module.modulemap
+// RUN: echo 'module B { header "B.h" }' >> %t/module.modulemap
+// RUN: echo 'module C { header "C.h" }' >> %t/module.modulemap
+// RUN: echo 'module D { header "D.h" }' >> %t/module.modulemap
+
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %t %s -verify
+// RUN: echo " " >> %t/D.h
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %t %s -verify
+// expected-no-diagnostics
+
+
+@import C;
+@import A;
+@import C;
+// When compiling A, C will be be loaded then removed when D fails. Ensure
+// this does not cause problems importing C again later.
diff --git a/test/Modules/load_failure.c b/test/Modules/load_failure.c
index 6c6d812bafa3..8b0d202ee8b5 100644
--- a/test/Modules/load_failure.c
+++ b/test/Modules/load_failure.c
@@ -8,10 +8,10 @@
// RUN: rm -rf %t
// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodules-cache-path=%t -fdisable-module-hash -emit-module -fmodule-name=load_failure %S/Inputs/module.map
-// RUN: not %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -fdisable-module-hash %s -DNONEXISTENT 2>&1 | FileCheck -check-prefix=CHECK-NONEXISTENT %s
+// RUN: not %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -I %S/Inputs -fdisable-module-hash %s -DNONEXISTENT 2>&1 | FileCheck -check-prefix=CHECK-NONEXISTENT %s
// CHECK-NONEXISTENT: load_failure.c:2:9: fatal error: module 'load_nonexistent' not found
-// RUN: not %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -fdisable-module-hash %s -DFAILURE 2> %t.out
+// RUN: not %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -I %S/Inputs -fdisable-module-hash %s -DFAILURE 2> %t.out
// RUN: FileCheck -check-prefix=CHECK-FAILURE %s < %t.out
// FIXME: Clean up diagnostic text below and give it a location
diff --git a/test/Modules/lookup.cpp b/test/Modules/lookup.cpp
index efd88f47e35e..bfe0307a0b2e 100644
--- a/test/Modules/lookup.cpp
+++ b/test/Modules/lookup.cpp
@@ -26,8 +26,8 @@ void f() {
// RUN: rm -rf %t
// RUN: %clang_cc1 -fmodules -x objective-c++ -emit-module -fmodules-cache-path=%t -fmodule-name=lookup_left_cxx %S/Inputs/module.map -verify
// RUN: %clang_cc1 -fmodules -x objective-c++ -emit-module -fmodules-cache-path=%t -fmodule-name=lookup_right_cxx %S/Inputs/module.map -verify
-// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodules-cache-path=%t %s -verify
-// RUN: %clang_cc1 -fmodules -ast-print -x objective-c++ -fmodules-cache-path=%t %s | FileCheck -check-prefix=CHECK-PRINT %s
+// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodules-cache-path=%t -I %S/Inputs %s -verify
+// RUN: %clang_cc1 -fmodules -ast-print -x objective-c++ -fmodules-cache-path=%t -I %S/Inputs %s | FileCheck -check-prefix=CHECK-PRINT %s
// FIXME: When we have a syntax for modules in C++, use that.
// CHECK-PRINT: int *f0(int *);
diff --git a/test/Modules/lookup.m b/test/Modules/lookup.m
index 54c74913907d..187e8763ca63 100644
--- a/test/Modules/lookup.m
+++ b/test/Modules/lookup.m
@@ -1,8 +1,8 @@
// RUN: rm -rf %t
// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -emit-module -x objective-c -fmodule-name=lookup_left_objc %S/Inputs/module.map
// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -emit-module -x objective-c -fmodule-name=lookup_right_objc %S/Inputs/module.map
-// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -verify %s
-// RUN: %clang_cc1 -fmodules -ast-print -x objective-c -fmodules-cache-path=%t %s | FileCheck -check-prefix=CHECK-PRINT %s
+// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -I %S/Inputs -verify %s
+// RUN: %clang_cc1 -fmodules -ast-print -x objective-c -fmodules-cache-path=%t -I %S/Inputs %s | FileCheck -check-prefix=CHECK-PRINT %s
@import lookup_left_objc;
@import lookup_right_objc;
diff --git a/test/Modules/macro-hiding.cpp b/test/Modules/macro-hiding.cpp
new file mode 100644
index 000000000000..b166f4b194cf
--- /dev/null
+++ b/test/Modules/macro-hiding.cpp
@@ -0,0 +1,104 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DC1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DC1 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB2
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB2 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB2 -DC1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB2 -DC1 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB1 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB1 -DC1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB1 -DC1 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB1 -DB2
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB1 -DB2 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB1 -DB2 -DC1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DB1 -DB2 -DC1 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DC1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DC1 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB2
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB2 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB2 -DC1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB2 -DC1 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB1 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB1 -DC1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB1 -DC1 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB1 -DB2
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB1 -DB2 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB1 -DB2 -DC1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA2 -DB1 -DB2 -DC1 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DC1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DC1 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB2
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB2 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB2 -DC1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB2 -DC1 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB1 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB1 -DC1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB1 -DC1 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB1 -DB2
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB1 -DB2 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB1 -DB2 -DC1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DB1 -DB2 -DC1 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DC1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DC1 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB2
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB2 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB2 -DC1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB2 -DC1 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB1 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB1 -DC1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB1 -DC1 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB1 -DB2
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB1 -DB2 -DD1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB1 -DB2 -DC1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DA1 -DA2 -DB1 -DB2 -DC1 -DD1
+//
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/macro-hiding %s -DE1
+
+#ifdef A1
+#include "a1.h"
+#endif
+
+#ifdef A2
+#include "a2.h"
+#endif
+
+#ifdef B1
+#include "b1.h"
+#endif
+
+#ifdef B2
+#include "b2.h"
+#endif
+
+#ifdef C1
+#include "c1.h"
+#endif
+
+#ifdef D1
+#include "d1.h"
+#endif
+
+#ifdef E1
+#include "e1.h"
+#endif
+
+#ifdef E2
+#include "e2.h"
+#endif
+
+#if defined(A1) || defined(B2) || defined(C1) || defined(D1) || defined(E1) || defined(E2)
+void h() { assert(true); }
+#else
+void assert() {}
+#endif
diff --git a/test/Modules/macro-reexport/a1.h b/test/Modules/macro-reexport/a1.h
new file mode 100644
index 000000000000..39933315f7ee
--- /dev/null
+++ b/test/Modules/macro-reexport/a1.h
@@ -0,0 +1 @@
+#define assert(x) a
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/fp64/usr/lib/crt1.o b/test/Modules/macro-reexport/a2.h
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/fp64/usr/lib/crt1.o
+++ b/test/Modules/macro-reexport/a2.h
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/fp64/usr/lib/crti.o b/test/Modules/macro-reexport/b1.h
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/fp64/usr/lib/crti.o
+++ b/test/Modules/macro-reexport/b1.h
diff --git a/test/Modules/macro-reexport/b2.h b/test/Modules/macro-reexport/b2.h
new file mode 100644
index 000000000000..26150458d353
--- /dev/null
+++ b/test/Modules/macro-reexport/b2.h
@@ -0,0 +1,2 @@
+#include "a2.h"
+#define assert(x) b
diff --git a/test/Modules/macro-reexport/c1.h b/test/Modules/macro-reexport/c1.h
new file mode 100644
index 000000000000..d6a20e7419c1
--- /dev/null
+++ b/test/Modules/macro-reexport/c1.h
@@ -0,0 +1,2 @@
+#include "b1.h"
+#define assert(x) c
diff --git a/test/Modules/macro-reexport/d1.h b/test/Modules/macro-reexport/d1.h
new file mode 100644
index 000000000000..fbd68d5de582
--- /dev/null
+++ b/test/Modules/macro-reexport/d1.h
@@ -0,0 +1,2 @@
+#include "c1.h"
+#define assert(x) d
diff --git a/test/Modules/macro-reexport/d2.h b/test/Modules/macro-reexport/d2.h
new file mode 100644
index 000000000000..688f2d98a13b
--- /dev/null
+++ b/test/Modules/macro-reexport/d2.h
@@ -0,0 +1 @@
+#include "b2.h"
diff --git a/test/Modules/macro-reexport/macro-reexport.cpp b/test/Modules/macro-reexport/macro-reexport.cpp
new file mode 100644
index 000000000000..47b15c2740bd
--- /dev/null
+++ b/test/Modules/macro-reexport/macro-reexport.cpp
@@ -0,0 +1,13 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fsyntax-only -DD2 -I. %s -fmodules-cache-path=%t -verify
+// RUN: %clang_cc1 -fsyntax-only -DD2 -I. -fmodules %s -fmodules-cache-path=%t -verify
+// RUN: %clang_cc1 -fsyntax-only -DC1 -I. %s -fmodules-cache-path=%t -verify
+// RUN: %clang_cc1 -fsyntax-only -DC1 -I. -fmodules %s -fmodules-cache-path=%t -verify
+
+#ifdef D2
+#include "d2.h"
+void f() { return assert(true); } // expected-error {{undeclared identifier 'b'}}
+#else
+#include "c1.h"
+void f() { return assert(true); } // expected-error {{undeclared identifier 'c'}}
+#endif
diff --git a/test/Modules/macro-reexport/module.modulemap b/test/Modules/macro-reexport/module.modulemap
new file mode 100644
index 000000000000..21585b692e3f
--- /dev/null
+++ b/test/Modules/macro-reexport/module.modulemap
@@ -0,0 +1,15 @@
+module b {
+ module b2 { header "b2.h" export * }
+ module b1 { header "b1.h" export * }
+}
+module a {
+ module a1 { header "a1.h" export * }
+ module a2 { header "a2.h" export * }
+}
+module c {
+ module c1 { header "c1.h" export * }
+}
+module d {
+ module d1 { header "d1.h" export * }
+ module d2 { header "d2.h" export * }
+}
diff --git a/test/Modules/macro-undef-through-pch.m b/test/Modules/macro-undef-through-pch.m
new file mode 100644
index 000000000000..0e5e99fb8bef
--- /dev/null
+++ b/test/Modules/macro-undef-through-pch.m
@@ -0,0 +1,10 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -x objective-c-header -fmodules -fmodules-cache-path=%t \
+// RUN: -I%S/Inputs/macro-undef-through-pch -emit-pch \
+// RUN: %S/Inputs/macro-undef-through-pch/foo.h -o %t.pch
+// RUN: %clang_cc1 -x objective-c -fmodules -fmodules-cache-path=%t \
+// RUN: -I%S/Inputs/macro-undef-through-pch -emit-pch \
+// RUN: -include-pch %t.pch %s
+
+// PR19215
+#undef AB
diff --git a/test/Modules/macros.c b/test/Modules/macros.c
index 541c95be58de..7a7e570ca256 100644
--- a/test/Modules/macros.c
+++ b/test/Modules/macros.c
@@ -3,18 +3,16 @@
// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=macros_left %S/Inputs/module.map
// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=macros_right %S/Inputs/module.map
// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=macros %S/Inputs/module.map
-// RUN: %clang_cc1 -fmodules -x objective-c -verify -fmodules-cache-path=%t %s
-// RUN: not %clang_cc1 -E -fmodules -x objective-c -fmodules-cache-path=%t %s | FileCheck -check-prefix CHECK-PREPROCESSED %s
+// RUN: %clang_cc1 -fmodules -x objective-c -verify -fmodules-cache-path=%t -I %S/Inputs %s
+// RUN: not %clang_cc1 -E -fmodules -x objective-c -fmodules-cache-path=%t -I %S/Inputs %s | FileCheck -check-prefix CHECK-PREPROCESSED %s
// FIXME: When we have a syntax for modules in C, use that.
// These notes come from headers in modules, and are bogus.
// FIXME: expected-note@Inputs/macros_left.h:11{{previous definition is here}}
// FIXME: expected-note@Inputs/macros_right.h:12{{previous definition is here}}
// expected-note@Inputs/macros_right.h:12{{expanding this definition of 'LEFT_RIGHT_DIFFERENT'}}
-// expected-note@Inputs/macros_top.h:13{{other definition of 'TOP_RIGHT_REDEF'}}
// expected-note@Inputs/macros_right.h:13{{expanding this definition of 'LEFT_RIGHT_DIFFERENT2'}}
// expected-note@Inputs/macros_left.h:14{{other definition of 'LEFT_RIGHT_DIFFERENT'}}
-// expected-note@Inputs/macros_right.h:17{{expanding this definition of 'TOP_RIGHT_REDEF'}}
@import macros;
@@ -79,8 +77,8 @@ void f() {
# error TOP should be visible
#endif
-#ifndef TOP_LEFT_UNDEF
-# error TOP_LEFT_UNDEF should still be defined
+#ifdef TOP_LEFT_UNDEF
+# error TOP_LEFT_UNDEF should not be defined
#endif
void test1() {
@@ -112,7 +110,7 @@ void test2() {
int i;
float f;
double d;
- TOP_RIGHT_REDEF *fp = &f; // expected-warning{{ambiguous expansion of macro 'TOP_RIGHT_REDEF'}}
+ TOP_RIGHT_REDEF *fp = &f; // ok, right's definition overrides top's definition
LEFT_RIGHT_IDENTICAL *ip = &i;
LEFT_RIGHT_DIFFERENT *ip2 = &i; // expected-warning{{ambiguous expansion of macro 'LEFT_RIGHT_DIFFERENT'}}
@@ -134,6 +132,33 @@ void test3() {
@import macros_right.undef;
-#ifndef TOP_RIGHT_UNDEF
-# error TOP_RIGHT_UNDEF should still be defined
+// FIXME: When macros_right.undef is built, macros_top is visible because
+// the state from building macros_right leaks through, so macros_right.undef
+// undefines macros_top's macro.
+#ifdef TOP_RIGHT_UNDEF
+# error TOP_RIGHT_UNDEF should not be defined
+#endif
+
+@import macros_other;
+
+#ifndef TOP_OTHER_UNDEF1
+# error TOP_OTHER_UNDEF1 should still be defined
+#endif
+
+#ifndef TOP_OTHER_UNDEF2
+# error TOP_OTHER_UNDEF2 should still be defined
#endif
+
+#ifndef TOP_OTHER_REDEF1
+# error TOP_OTHER_REDEF1 should still be defined
+#endif
+int n1 = TOP_OTHER_REDEF1; // expected-warning{{ambiguous expansion of macro 'TOP_OTHER_REDEF1'}}
+// expected-note@macros_top.h:19 {{expanding this definition}}
+// expected-note@macros_other.h:4 {{other definition}}
+
+#ifndef TOP_OTHER_REDEF2
+# error TOP_OTHER_REDEF2 should still be defined
+#endif
+int n2 = TOP_OTHER_REDEF2; // ok
+
+int n3 = TOP_OTHER_DEF_RIGHT_UNDEF; // ok
diff --git a/test/Modules/macros2.c b/test/Modules/macros2.c
new file mode 100644
index 000000000000..c4c8059011cc
--- /dev/null
+++ b/test/Modules/macros2.c
@@ -0,0 +1,83 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=macros_top %S/Inputs/module.map
+// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=macros_left %S/Inputs/module.map
+// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=macros_right %S/Inputs/module.map
+// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=macros %S/Inputs/module.map
+// RUN: %clang_cc1 -fmodules -x objective-c -verify -fmodules-cache-path=%t -I %S/Inputs %s
+
+// This test checks some of the same things as macros.c, but imports modules in
+// a different order.
+
+@import macros_other;
+
+int n0 = TOP_OTHER_DEF_RIGHT_UNDEF; // ok
+
+@import macros_top;
+
+TOP_OTHER_DEF_RIGHT_UNDEF *n0b; // expected-warning{{ambiguous expansion of macro 'TOP_OTHER_DEF_RIGHT_UNDEF'}}
+// expected-note@macros_top.h:22 {{expanding this definition of 'TOP_OTHER_DEF_RIGHT_UNDEF'}}
+// expected-note@macros_other.h:6 {{other definition of 'TOP_OTHER_DEF_RIGHT_UNDEF'}}
+
+@import macros_right;
+@import macros_left;
+
+#ifdef TOP_LEFT_UNDEF
+# error TOP_LEFT_UNDEF should not be defined
+#endif
+
+#ifndef TOP_RIGHT_UNDEF
+# error TOP_RIGHT_UNDEF should still be defined
+#endif
+
+void test() {
+ float f;
+ TOP_RIGHT_REDEF *fp = &f; // ok, right's definition overrides top's definition
+
+ // Note, left's definition wins here, whereas right's definition wins in
+ // macros.c.
+ int i;
+ LEFT_RIGHT_IDENTICAL *ip = &i;
+ LEFT_RIGHT_DIFFERENT *ip2 = &f; // expected-warning{{ambiguous expansion of macro 'LEFT_RIGHT_DIFFERENT'}}
+ // expected-note@macros_left.h:14 {{expanding this}}
+ // expected-note@macros_right.h:12 {{other}}
+ LEFT_RIGHT_DIFFERENT2 *ip3 = &f; // expected-warning{{ambiguous expansion of macro 'LEFT_RIGHT_DIFFERENT2}}
+ // expected-note@macros_left.h:11 {{expanding this}}
+ // expected-note@macros_right.h:13 {{other}}
+#undef LEFT_RIGHT_DIFFERENT3
+ int LEFT_RIGHT_DIFFERENT3;
+}
+
+@import macros_right.undef;
+
+// FIXME: See macros.c.
+#ifdef TOP_RIGHT_UNDEF
+# error TOP_RIGHT_UNDEF should not be defined
+#endif
+
+#ifndef TOP_OTHER_UNDEF1
+# error TOP_OTHER_UNDEF1 should still be defined
+#endif
+
+#ifndef TOP_OTHER_UNDEF2
+# error TOP_OTHER_UNDEF2 should still be defined
+#endif
+
+#ifndef TOP_OTHER_REDEF1
+# error TOP_OTHER_REDEF1 should still be defined
+#endif
+int n1 = TOP_OTHER_REDEF1; // expected-warning{{ambiguous expansion of macro 'TOP_OTHER_REDEF1'}}
+// expected-note@macros_top.h:19 {{expanding this definition}}
+// expected-note@macros_other.h:4 {{other definition}}
+
+#ifndef TOP_OTHER_REDEF2
+# error TOP_OTHER_REDEF2 should still be defined
+#endif
+int n2 = TOP_OTHER_REDEF2; // ok
+
+int n3 = TOP_OTHER_DEF_RIGHT_UNDEF; // ok
+
+int top_redef_in_submodules = TOP_REDEF_IN_SUBMODULES;
+@import macros_top.c;
+void test2() {
+ int TOP_REDEF_IN_SUBMODULES = top_redef_in_submodules;
+}
diff --git a/test/Modules/malformed.cpp b/test/Modules/malformed.cpp
new file mode 100644
index 000000000000..cd7b33493998
--- /dev/null
+++ b/test/Modules/malformed.cpp
@@ -0,0 +1,23 @@
+// RUN: rm -rf %t
+// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs/malformed -DHEADER="a1.h" %s 2>&1 | FileCheck %s --check-prefix=CHECK-A
+// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs/malformed -DHEADER="b1.h" %s 2>&1 | FileCheck %s --check-prefix=CHECK-B
+
+#define STR2(x) #x
+#define STR(x) STR2(x)
+#include STR(HEADER)
+
+// CHECK-A: While building module 'malformed_a'
+// CHECK-A: a1.h:1:{{.*}} error: expected '}'
+// CHECK-A: a1.h:1:{{.*}} note: to match this '{'
+//
+// CHECK-A: While building module 'malformed_a'
+// CHECK-A: a2.h:1:{{.*}} error: extraneous closing brace
+
+// CHECK-B: While building module 'malformed_b'
+// CHECK-B: b1.h:2:{{.*}} error: expected '}'
+// CHECK-B: b1.h:1:{{.*}} note: to match this '{'
+// CHECK-B: b1.h:3:{{.*}} error: extraneous closing brace ('}')
+//
+// CHECK-B: While building module 'malformed_b'
+// CHECK-B: b2.h:1:{{.*}} error: redefinition of 'g'
+// CHECK-B: b2.h:1:{{.*}} note: previous definition is here
diff --git a/test/Modules/missing-header.m b/test/Modules/missing-header.m
new file mode 100644
index 000000000000..c2c1673ac5b0
--- /dev/null
+++ b/test/Modules/missing-header.m
@@ -0,0 +1,13 @@
+// RUN: rm -rf %t
+// RUN: not %clang_cc1 -x objective-c -fmodules-cache-path=%t -fmodules -I %S/Inputs/submodules %s 2>&1 | FileCheck %s
+
+// FIXME: cannot use -verify, because the error from inside the module build has
+// a different source manager than the verifier.
+
+@import missing_unavailable_headers; // OK
+@import missing_unavailable_headers.not_missing; // OK
+// CHECK-NOT: missing_unavailable_headers
+
+@import missing_headers;
+// CHECK: module.map:15:27: error: header 'missing.h' not found
+// CHECK: could not build module 'missing_headers'
diff --git a/test/Modules/missing-submodule.m b/test/Modules/missing-submodule.m
new file mode 100644
index 000000000000..4f3553ce6c4b
--- /dev/null
+++ b/test/Modules/missing-submodule.m
@@ -0,0 +1,7 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -F %S/Inputs %s -verify
+#include <Module/NotInModule.h> // expected-warning{{missing submodule 'Module.NotInModule'}}
+
+int getNotInModule() {
+ return not_in_module;
+}
diff --git a/test/Modules/module-private.cpp b/test/Modules/module-private.cpp
index 438dcab9841c..9213a0f20cbc 100644
--- a/test/Modules/module-private.cpp
+++ b/test/Modules/module-private.cpp
@@ -1,7 +1,7 @@
// RUN: rm -rf %t
// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodules-cache-path=%t -fmodule-name=module_private_left -emit-module %S/Inputs/module.map
// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodules-cache-path=%t -fmodule-name=module_private_right -emit-module %S/Inputs/module.map
-// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodules-cache-path=%t %s -verify
+// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodules-cache-path=%t -I %S/Inputs %s -verify
// FIXME: When we have a syntax for modules in C++, use that.
@import module_private_left;
diff --git a/test/Modules/module_file_info.m b/test/Modules/module_file_info.m
index 09319d60fe80..2447a747e3dd 100644
--- a/test/Modules/module_file_info.m
+++ b/test/Modules/module_file_info.m
@@ -2,11 +2,14 @@
@import DependsOnModule;
// RUN: rm -rf %t
-// RUN: %clang_cc1 -w -fmodules -fdisable-module-hash -fmodules-cache-path=%t -F %S/Inputs -DBLARG -DWIBBLE=WOBBLE %s
+// RUN: %clang_cc1 -w -Wunused -fmodules -fdisable-module-hash -fmodules-cache-path=%t -F %S/Inputs -DBLARG -DWIBBLE=WOBBLE %s
// RUN: %clang_cc1 -module-file-info %t/DependsOnModule.pcm | FileCheck %s
// CHECK: Generated by this Clang:
+// CHECK: Module name: DependsOnModule
+// CHECK: Module map file: {{.*}}DependsOnModule.framework{{[/\\]}}module.map
+
// CHECK: Language options:
// CHECK: C99: Yes
// CHECK: Objective-C 1: Yes
@@ -16,8 +19,11 @@
// CHECK: Triple:
// CHECK: CPU:
// CHECK: ABI:
-// CHECK: C++ ABI:
-// CHECK: Linker version:
+
+// CHECK: Diagnostic options:
+// CHECK: IgnoreWarnings: Yes
+// CHECK: Diagnostic flags:
+// CHECK: -Wunused
// CHECK: Header search options:
// CHECK: System root [-isysroot=]: '/'
diff --git a/test/Modules/modulemap-locations.m b/test/Modules/modulemap-locations.m
new file mode 100644
index 000000000000..9acdcd63436b
--- /dev/null
+++ b/test/Modules/modulemap-locations.m
@@ -0,0 +1,18 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs/ModuleMapLocations/Module_ModuleMap -I %S/Inputs/ModuleMapLocations/Both -F %S/Inputs/ModuleMapLocations -x objective-c -fsyntax-only %s -verify
+
+// regular
+@import module_modulemap;
+@import both;
+// framework
+@import Module_ModuleMap_F;
+@import Module_ModuleMap_F.Private;
+@import Both_F;
+@import Inferred;
+
+void test() {
+ will_be_found1();
+ wont_be_found1(); // expected-warning{{implicit declaration of function 'wont_be_found1' is invalid in C99}}
+ will_be_found2();
+ wont_be_found2(); // expected-warning{{implicit declaration of function 'wont_be_found2' is invalid in C99}}
+}
diff --git a/test/Modules/modules-with-same-name.m b/test/Modules/modules-with-same-name.m
new file mode 100644
index 000000000000..c90aa5d7d842
--- /dev/null
+++ b/test/Modules/modules-with-same-name.m
@@ -0,0 +1,35 @@
+// REQUIRES: shell
+// RUN: rm -rf %t
+
+// A from path 1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fmodules-ignore-macro=EXPECTED_PATH -fmodules-ignore-macro=DIRECT -fsyntax-only %s -verify -I %S/Inputs/modules-with-same-name/path1/A -DDIRECT -DEXPECTED_PATH=1
+
+// A from path 2
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fmodules-ignore-macro=EXPECTED_PATH -fmodules-ignore-macro=DIRECT -fsyntax-only %s -verify -I %S/Inputs/modules-with-same-name/path2/A -DDIRECT -DEXPECTED_PATH=2
+
+// Confirm that we have two pcm files (one for each 'A').
+// RUN: find %t -name "A-*.pcm" | count 2
+
+// DependsOnA, using A from path 1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fmodules-ignore-macro=EXPECTED_PATH -fmodules-ignore-macro=DIRECT -fsyntax-only %s -verify -I %S/Inputs/modules-with-same-name/DependsOnA -I %S/Inputs/modules-with-same-name/path1/A -DEXPECTED_PATH=1
+
+// Confirm that we have three pcm files (one for each 'A', and one for 'DependsOnA')
+// RUN: find %t -name "*.pcm" | count 3
+
+// DependsOnA, using A from path 2
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fmodules-ignore-macro=EXPECTED_PATH -fmodules-ignore-macro=DIRECT -fsyntax-only %s -verify -I %S/Inputs/modules-with-same-name/DependsOnA -I %S/Inputs/modules-with-same-name/path2/A -DEXPECTED_PATH=2
+
+// Confirm that we still have three pcm files, since DependsOnA will be rebuilt
+// RUN: find %t -name "*.pcm" | count 3
+
+#ifdef DIRECT
+@import A;
+#else
+@import DependsOnA;
+#endif
+
+#if FROM_PATH != EXPECTED_PATH
+#error "Got the wrong module!"
+#endif
+
+// expected-no-diagnostics
diff --git a/test/Modules/namespaces.cpp b/test/Modules/namespaces.cpp
index 8c225e051bde..a6f4c25cc094 100644
--- a/test/Modules/namespaces.cpp
+++ b/test/Modules/namespaces.cpp
@@ -36,6 +36,9 @@ void test() {
double &dr3 = global(1.0);
double &dr4 = ::global2(1.0);
double &dr5 = LookupBeforeImport::f(1.0);
+
+ struct AddAndReexportBeforeImport::S s;
+ int k = AddAndReexportBeforeImport::S;
}
// Test namespaces merged without a common first declaration.
@@ -69,8 +72,8 @@ void testMergedMerged() {
// Test merging when using anonymous namespaces, which does not
// actually perform any merging.
void testAnonymousNotMerged() {
- N11::consumeFoo(N11::getFoo()); // expected-error{{cannot initialize a parameter of type 'N11::<anonymous>::Foo *' with an rvalue of type 'N11::<anonymous>::Foo *'}}
- N12::consumeFoo(N12::getFoo()); // expected-error{{cannot initialize a parameter of type 'N12::<anonymous>::Foo *' with an rvalue of type 'N12::<anonymous>::Foo *'}}
+ N11::consumeFoo(N11::getFoo()); // expected-error{{cannot initialize a parameter of type 'N11::(anonymous namespace)::Foo *' with an rvalue of type 'N11::(anonymous namespace)::Foo *'}}
+ N12::consumeFoo(N12::getFoo()); // expected-error{{cannot initialize a parameter of type 'N12::(anonymous namespace)::Foo *' with an rvalue of type 'N12::(anonymous namespace)::Foo *'}}
}
// expected-note@Inputs/namespaces-right.h:60 {{passing argument to parameter here}}
diff --git a/test/Modules/no-stale-modtime.m b/test/Modules/no-stale-modtime.m
new file mode 100644
index 000000000000..1bff2b017a43
--- /dev/null
+++ b/test/Modules/no-stale-modtime.m
@@ -0,0 +1,37 @@
+// Ensure that when rebuilding a module we don't save its old modtime when
+// building modules that depend on it.
+
+// REQUIRES: shell
+// RUN: rm -rf %t
+// RUN: mkdir -p %t
+// This could be replaced by diamond_*, except we want to modify the top header
+// RUN: echo '@import l; @import r;' > %t/b.h
+// RUN: echo '@import t; // fromt l' > %t/l.h
+// RUN: echo '@import t; // fromt r' > %t/r.h
+// RUN: echo '// top' > %t/t.h
+// RUN: echo 'module b { header "b.h" } module l { header "l.h" }' > %t/module.map
+// RUN: echo 'module r { header "r.h" } module t { header "t.h" }' >> %t/module.map
+
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \
+// RUN: -I %t -fsyntax-only %s -Rmodule-build 2>&1 \
+// RUN: | FileCheck -check-prefix=REBUILD-ALL %s
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \
+// RUN: -I %t -fsyntax-only %s -Rmodule-build -verify
+
+// Add an identifier to ensure everything depending on t is out of date
+// RUN: echo 'extern int a;' >> %t/t.h
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \
+// RUN: -I %t -fsyntax-only %s -Rmodule-build 2>&1 \
+// RUN: | FileCheck -check-prefix=REBUILD-ALL %s
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fdisable-module-hash \
+// RUN: -I %t -fsyntax-only %s -Rmodule-build -verify
+
+// REBUILD-ALL: building module 'b'
+// REBUILD-ALL: building module 'l'
+// REBUILD-ALL: building module 't'
+// REBUILD-ALL: building module 'r'
+
+// Use -verify when expecting no modules to be rebuilt.
+// expected-no-diagnostics
+
+@import b;
diff --git a/test/Modules/objc-categories.m b/test/Modules/objc-categories.m
index f08b13a78ab2..a66ab8d63125 100644
--- a/test/Modules/objc-categories.m
+++ b/test/Modules/objc-categories.m
@@ -4,7 +4,7 @@
// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -x objective-c -fmodule-name=category_right -emit-module %S/Inputs/module.map
// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -x objective-c -fmodule-name=category_bottom -emit-module %S/Inputs/module.map
// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -x objective-c -fmodule-name=category_other -emit-module %S/Inputs/module.map
-// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t %s -verify
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -verify
@import category_bottom;
diff --git a/test/Modules/objc_redef.m b/test/Modules/objc_redef.m
index f91124172f76..28e47665f24f 100644
--- a/test/Modules/objc_redef.m
+++ b/test/Modules/objc_redef.m
@@ -8,6 +8,6 @@ int test(id x) {
// RUN: rm -rf %t
// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=redeclarations_left %S/Inputs/module.map
// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=weird_objc %S/Inputs/module.map
-// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t %s -verify
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -verify
// expected-no-diagnostics
diff --git a/test/Modules/prune.m b/test/Modules/prune.m
index 8af7e6c395ae..7bc771f7843d 100644
--- a/test/Modules/prune.m
+++ b/test/Modules/prune.m
@@ -14,33 +14,33 @@
// RUN: %clang_cc1 -DIMPORT_DEPENDS_ON_MODULE -fmodules-ignore-macro=DIMPORT_DEPENDS_ON_MODULE -fmodules -F %S/Inputs -fmodules-cache-path=%t %s -verify
// RUN: %clang_cc1 -DIMPORT_DEPENDS_ON_MODULE -fmodules-ignore-macro=DIMPORT_DEPENDS_ON_MODULE -fmodules -F %S/Inputs -fmodules-cache-path=%t %s -verify
// RUN: ls %t | grep modules.timestamp
-// RUN: ls -R %t | grep ^Module.pcm
-// RUN: ls -R %t | grep DependsOnModule.pcm
+// RUN: ls -R %t | grep ^Module.*pcm
+// RUN: ls -R %t | grep DependsOnModule.*pcm
// Set the timestamp back more than two days. We should try to prune,
// but nothing gets pruned because the module files are new enough.
// RUN: touch -m -a -t 201101010000 %t/modules.timestamp
// RUN: %clang_cc1 -fmodules -F %S/Inputs -fmodules-cache-path=%t -fmodules -fmodules-prune-interval=172800 -fmodules-prune-after=345600 %s -verify
// RUN: ls %t | grep modules.timestamp
-// RUN: ls -R %t | grep ^Module.pcm
-// RUN: ls -R %t | grep DependsOnModule.pcm
+// RUN: ls -R %t | grep ^Module.*pcm
+// RUN: ls -R %t | grep DependsOnModule.*pcm
// Set the DependsOnModule access time back more than four days.
// This shouldn't prune anything, because the timestamp has been updated, so
// the pruning mechanism won't fire.
-// RUN: find %t -name DependsOnModule.pcm | xargs touch -a -t 201101010000
+// RUN: find %t -name DependsOnModule*.pcm | xargs touch -a -t 201101010000
// RUN: %clang_cc1 -fmodules -F %S/Inputs -fmodules-cache-path=%t -fmodules -fmodules-prune-interval=172800 -fmodules-prune-after=345600 %s -verify
// RUN: ls %t | grep modules.timestamp
-// RUN: ls -R %t | grep ^Module.pcm
-// RUN: ls -R %t | grep DependsOnModule.pcm
+// RUN: ls -R %t | grep ^Module.*pcm
+// RUN: ls -R %t | grep DependsOnModule.*pcm
// Set both timestamp and DependsOnModule.pcm back beyond the cutoff.
// This should trigger pruning, which will remove DependsOnModule but not Module.
// RUN: touch -m -a -t 201101010000 %t/modules.timestamp
-// RUN: find %t -name DependsOnModule.pcm | xargs touch -a -t 201101010000
+// RUN: find %t -name DependsOnModule*.pcm | xargs touch -a -t 201101010000
// RUN: %clang_cc1 -fmodules -F %S/Inputs -fmodules-cache-path=%t -fmodules -fmodules-prune-interval=172800 -fmodules-prune-after=345600 %s -verify
// RUN: ls %t | grep modules.timestamp
-// RUN: ls -R %t | grep ^Module.pcm
-// RUN: ls -R %t | not grep DependsOnModule.pcm
+// RUN: ls -R %t | grep ^Module.*pcm
+// RUN: ls -R %t | not grep DependsOnModule.*pcm
// expected-no-diagnostics
diff --git a/test/Modules/recursive.c b/test/Modules/recursive.c
new file mode 100644
index 000000000000..5315b10522b4
--- /dev/null
+++ b/test/Modules/recursive.c
@@ -0,0 +1,11 @@
+// RUN: rm -rf %t
+// RUN: not %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -I %S/Inputs %s 2>&1 | FileCheck %s
+#include "recursive1.h"
+
+// RUN: rm -rf %t
+// RUN: not %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=recursive1 %S/Inputs/module.map 2>&1 | FileCheck %s
+
+// CHECK: While building module 'recursive1'{{( imported from .*[/\]recursive.c:3)?}}:
+// CHECK-NEXT: While building module 'recursive2' imported from {{.*Inputs[/\]}}recursive1.h:1:
+// CHECK-NEXT: In file included from <module-includes>:1:
+// CHECK-NEXT: recursive2.h:1:10: fatal error: cyclic dependency in module 'recursive1': recursive1 -> recursive2 -> recursive1
diff --git a/test/Modules/redecl-add-after-load.cpp b/test/Modules/redecl-add-after-load.cpp
new file mode 100644
index 000000000000..68deaf8b4ef9
--- /dev/null
+++ b/test/Modules/redecl-add-after-load.cpp
@@ -0,0 +1,59 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -x objective-c++ -fmodules -fno-modules-error-recovery -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11
+// RUN: %clang_cc1 -x objective-c++ -fmodules -fno-modules-error-recovery -fmodules-cache-path=%t -I %S/Inputs %s -verify -std=c++11 -DIMPORT_DECLS
+
+#ifdef IMPORT_DECLS
+// expected-no-diagnostics
+@import redecl_add_after_load_decls;
+#else
+typedef struct A B;
+extern const int variable;
+extern constexpr int function();
+constexpr int test(bool b) { return b ? variable : function(); }
+
+namespace N {
+ typedef struct A B;
+ extern const int variable;
+ extern constexpr int function();
+}
+typedef N::B NB;
+constexpr int N_test(bool b) { return b ? N::variable : N::function(); }
+
+@import redecl_add_after_load_top;
+typedef C::A CB;
+constexpr int C_test(bool b) { return b ? C::variable : C::function(); }
+
+struct D {
+ struct A; // expected-note {{forward}}
+ static const int variable;
+ static constexpr int function(); // expected-note {{here}}
+};
+typedef D::A DB;
+constexpr int D_test(bool b) { return b ? D::variable : D::function(); } // expected-note {{subexpression}} expected-note {{undefined}}
+#endif
+
+@import redecl_add_after_load;
+
+B tu_struct_test;
+constexpr int tu_variable_test = test(true);
+constexpr int tu_function_test = test(false);
+
+NB ns_struct_test;
+constexpr int ns_variable_test = N_test(true);
+constexpr int ns_function_test = N_test(false);
+
+CB struct_struct_test;
+constexpr int struct_variable_test = C_test(true);
+constexpr int struct_function_test = C_test(false);
+
+// FIXME: We should accept this, but we're currently too lazy when merging class
+// definitions to determine that the definitions in redecl_add_after_load are
+// definitions of these entities.
+DB merged_struct_struct_test;
+constexpr int merged_struct_variable_test = D_test(true);
+constexpr int merged_struct_function_test = D_test(false);
+#ifndef IMPORT_DECLS
+// expected-error@-4 {{incomplete}}
+// expected-error@-4 {{constant}} expected-note@-4 {{in call to}}
+// expected-error@-4 {{constant}} expected-note@-4 {{in call to}}
+#endif
diff --git a/test/Modules/redecl-namespaces.mm b/test/Modules/redecl-namespaces.mm
index 93102c04bc3a..203daa9a2bb0 100644
--- a/test/Modules/redecl-namespaces.mm
+++ b/test/Modules/redecl-namespaces.mm
@@ -10,4 +10,4 @@ void test() {
// RUN: rm -rf %t
// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodules-cache-path=%t -emit-module -fmodule-name=redecl_namespaces_left %S/Inputs/module.map
// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodules-cache-path=%t -emit-module -fmodule-name=redecl_namespaces_right %S/Inputs/module.map
-// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -w %s -verify
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs -w %s -verify
diff --git a/test/Modules/redeclarations.m b/test/Modules/redeclarations.m
index f210f37f3ab8..11aca7597830 100644
--- a/test/Modules/redeclarations.m
+++ b/test/Modules/redeclarations.m
@@ -7,6 +7,6 @@
// RUN: rm -rf %t
// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=redeclarations_left %S/Inputs/module.map
// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=redeclarations_right %S/Inputs/module.map
-// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t %s -verify
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs %s -verify
// expected-no-diagnostics
diff --git a/test/Modules/redecls/main.m b/test/Modules/redecls/main.m
index 9ec02b03f2cc..bf3788a96d80 100644
--- a/test/Modules/redecls/main.m
+++ b/test/Modules/redecls/main.m
@@ -1,9 +1,9 @@
// RUN: rm -rf %t.mcp
// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodule-name=a %S/module.map -fmodules-cache-path=%t.mcp
// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodule-name=b %S/module.map -fmodules-cache-path=%t.mcp
-// RUN: %clang_cc1 -fmodules %s -emit-pch -o %t1.pch -fmodules-cache-path=%t.mcp
-// RUN: %clang_cc1 -fmodules %s -emit-pch -o %t2.pch -include-pch %t1.pch -fmodules-cache-path=%t.mcp
-// RUN: %clang_cc1 -fmodules %s -fsyntax-only -include-pch %t2.pch -fmodules-cache-path=%t.mcp -verify
+// RUN: %clang_cc1 -fmodules %s -emit-pch -o %t1.pch -fmodules-cache-path=%t.mcp -I %S
+// RUN: %clang_cc1 -fmodules %s -emit-pch -o %t2.pch -include-pch %t1.pch -fmodules-cache-path=%t.mcp -I %S
+// RUN: %clang_cc1 -fmodules %s -fsyntax-only -include-pch %t2.pch -I %S -fmodules-cache-path=%t.mcp -verify
#ifndef HEADER1
#define HEADER1
diff --git a/test/Modules/renamed.m b/test/Modules/renamed.m
index 4e8f5329bb0f..ec2616e9a724 100644
--- a/test/Modules/renamed.m
+++ b/test/Modules/renamed.m
@@ -3,6 +3,6 @@
int f() { return same_api; }
// RUN: rm -rf %t
-// RUN: %clang_cc1 -fmodules -I %S/Inputs -fmodules-cache-path=%t %s -verify
+// RUN: %clang_cc1 -fmodules -I %S/Inputs/oldname -fmodules-cache-path=%t %s -verify
// expected-no-diagnostics
diff --git a/test/Modules/require-modular-includes.m b/test/Modules/require-modular-includes.m
new file mode 100644
index 000000000000..835a35243396
--- /dev/null
+++ b/test/Modules/require-modular-includes.m
@@ -0,0 +1,83 @@
+// RUN: rm -rf %t
+// REQUIRES: shell
+
+// Including a header from the imported module
+// RUN: echo '@import FromImportedModuleOK;' | \
+// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \
+// RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \
+// RUN: -Werror -fsyntax-only -x objective-c -
+
+// Including a non-modular header
+// RUN: echo '@import FromImportedModuleFail;' | \
+// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \
+// RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \
+// RUN: -I %S/Inputs/require-modular-includes \
+// RUN: -fsyntax-only -x objective-c - 2>&1 | FileCheck %s
+
+// Including a header from a subframework
+// RUN: echo '@import FromSubframework;' | \
+// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \
+// RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \
+// RUN: -Werror -fsyntax-only -x objective-c -
+
+// Including a header from a subframework (fail)
+// RUN: echo '@import FromNonModularSubframework;' | \
+// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \
+// RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \
+// RUN: -I %S/Inputs/require-modular-includes \
+// RUN: -fsyntax-only -x objective-c - 2>&1 | FileCheck %s
+
+// Including a non-modular header from a submodule
+// RUN: echo '@import FromImportedSubModule;' | \
+// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \
+// RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \
+// RUN: -I %S/Inputs/require-modular-includes \
+// RUN: -fsyntax-only -x objective-c - 2>&1 | FileCheck %s
+
+// Including a non-modular header (directly) with -fmodule-name set
+// RUN: echo '#include "NotInModule.h"' | \
+// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \
+// RUN: -fmodules-cache-path=%t -I %S/Inputs/require-modular-includes \
+// RUN: -Werror -fmodule-name=A -fsyntax-only -x objective-c -
+
+// Including an excluded header
+// RUN: echo '@import IncludeExcluded;' | \
+// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \
+// RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \
+// RUN: -Werror -fsyntax-only -x objective-c -
+
+// Including a header from another module
+// RUN: echo '@import FromAnotherModule;' | \
+// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \
+// RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \
+// RUN: -I %S/Inputs/require-modular-includes \
+// RUN: -Werror -fsyntax-only -x objective-c -
+
+// Including an excluded header from another module
+// RUN: echo '@import ExcludedFromAnotherModule;' | \
+// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \
+// RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \
+// RUN: -I %S/Inputs/require-modular-includes \
+// RUN: -Werror -fsyntax-only -x objective-c -
+
+// Including a header from an umbrella directory
+// RUN: echo '@import FromUmbrella;' | \
+// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \
+// RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \
+// RUN: -I %S/Inputs/require-modular-includes \
+// RUN: -Werror -fsyntax-only -x objective-c -
+
+// A includes B includes non-modular C
+// RUN: echo '@import A;' | \
+// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \
+// RUN: -fmodules-cache-path=%t -F %S/Inputs/require-modular-includes \
+// RUN: -I %S/Inputs/require-modular-includes \
+// RUN: -fsyntax-only -x objective-c - 2>&1 | FileCheck %s
+
+// Non-framework module (pass)
+// RUN: echo '@import NotFramework;' | \
+// RUN: %clang_cc1 -Wnon-modular-include-in-framework-module -fmodules \
+// RUN: -fmodules-cache-path=%t -I %S/Inputs/require-modular-includes \
+// RUN: -Werror -fsyntax-only -x objective-c -
+
+// CHECK: include of non-modular header
diff --git a/test/Modules/resolution-change.m b/test/Modules/resolution-change.m
new file mode 100644
index 000000000000..011782eec2bf
--- /dev/null
+++ b/test/Modules/resolution-change.m
@@ -0,0 +1,27 @@
+// RUN: rm -rf %t
+
+// Build PCH using A from path 1
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs/modules-with-same-name/DependsOnA -I %S/Inputs/modules-with-same-name/path1/A -emit-pch -o %t-A.pch %s
+
+// Use the PCH with the same header search options; should be fine
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs/modules-with-same-name/DependsOnA -I %S/Inputs/modules-with-same-name/path1/A -include-pch %t-A.pch %s -fsyntax-only -Werror
+
+// Different -W options are ok
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs/modules-with-same-name/DependsOnA -I %S/Inputs/modules-with-same-name/path1/A -include-pch %t-A.pch %s -fsyntax-only -Werror -Wauto-import
+
+// Use the PCH with no way to resolve DependsOnA
+// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t -include-pch %t-A.pch %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-NODOA %s
+// CHECK-NODOA: module 'DependsOnA' imported by AST file '{{.*A.pch}}' not found
+
+// Use the PCH with no way to resolve A
+// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs/modules-with-same-name/DependsOnA -include-pch %t-A.pch %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-NOA %s
+// CHECK-NOA: module 'A' imported by AST file '{{.*DependsOnA.*pcm}}' not found
+
+// Use the PCH and have it resolve the the other A
+// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs/modules-with-same-name/DependsOnA -I %S/Inputs/modules-with-same-name/path2/A -include-pch %t-A.pch %s -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-WRONGA %s
+// CHECK-WRONGA: module 'A' imported by AST file '{{.*DependsOnA.*pcm}}' found in a different module map file ({{.*path2.*}}) than when the importing AST file was built ({{.*path1.*}})
+
+#ifndef HEADER
+#define HEADER
+@import DependsOnA;
+#endif
diff --git a/test/Modules/strict-decluse.cpp b/test/Modules/strict-decluse.cpp
new file mode 100644
index 000000000000..fa6955aef0d6
--- /dev/null
+++ b/test/Modules/strict-decluse.cpp
@@ -0,0 +1,9 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodule-maps -fmodules-cache-path=%t -fmodules-strict-decluse -fmodule-name=XG -I %S/Inputs/declare-use %s -verify
+
+#include "g.h"
+#include "e.h"
+#include "f.h" // expected-error {{module XG does not depend on a module exporting 'f.h'}}
+#include "i.h" // expected-error {{module XG does not depend on a module exporting 'i.h'}}
+
+const int g2 = g1 + e + f + aux_i;
diff --git a/test/Modules/string_names.cpp b/test/Modules/string_names.cpp
new file mode 100644
index 000000000000..ed65aa8a6703
--- /dev/null
+++ b/test/Modules/string_names.cpp
@@ -0,0 +1,6 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fmodules-decluse -I %S/Inputs/string_names %s -fmodule-name="my/module-a" -verify
+
+#include "a.h"
+#include "b.h" // expected-error {{does not depend on a module exporting}}
+#include "c.h"
diff --git a/test/Modules/subframework-from-intermediate-path.m b/test/Modules/subframework-from-intermediate-path.m
new file mode 100644
index 000000000000..ae0bd64e394a
--- /dev/null
+++ b/test/Modules/subframework-from-intermediate-path.m
@@ -0,0 +1,5 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -F %S/Inputs -F %S/Inputs/DependsOnModule.framework/Frameworks %s -verify
+
+@import DependsOnModule;
+@import SubFramework; // expected-error{{module 'SubFramework' not found}}
diff --git a/test/Modules/submodules.cpp b/test/Modules/submodules.cpp
index 9c62389eadc0..c3b2623016a8 100644
--- a/test/Modules/submodules.cpp
+++ b/test/Modules/submodules.cpp
@@ -26,11 +26,3 @@ hash_map<int, float> ints_to_floats; // expected-error{{declaration of 'hash_map
@import std.hash_map;
hash_map<int, float> ints_to_floats2;
-
-@import import_self.b;
-extern MyTypeA import_self_test_a; // expected-error {{must be imported from module 'import_self.a'}}
-// expected-note@import-self-a.h:1 {{here}}
-extern MyTypeC import_self_test_c;
-// FIXME: This should be valid; import_self.b re-exports import_self.d.
-extern MyTypeD import_self_test_d; // expected-error {{must be imported from module 'import_self.d'}}
-// expected-note@import-self-d.h:1 {{here}}
diff --git a/test/Modules/system_version.m b/test/Modules/system_version.m
index 85b3263f7256..bc82bf8bc17b 100644
--- a/test/Modules/system_version.m
+++ b/test/Modules/system_version.m
@@ -11,21 +11,21 @@
// Run once with no system version file. We should end up with one module.
// RUN: %clang_cc1 -fmodules-cache-path=%t/cache -fmodules -isysroot %t -I %t/usr/include %s -verify
-// RUN: ls -R %t | grep -c ModA.pcm| grep 1
+// RUN: ls -R %t | grep -c "ModA.*pcm" | grep 1
// Add a system version file and run again. We should now have two
// module variants.
// RUN: mkdir -p %t/System/Library/CoreServices
// RUN: echo "hello" > %t/System/Library/CoreServices/SystemVersion.plist
// RUN: %clang_cc1 -fmodules-cache-path=%t/cache -fmodules -isysroot %t -I %t/usr/include %s -verify
-// RUN: ls -R %t | grep -c ModA.pcm| grep 2
+// RUN: ls -R %t | grep -c "ModA.*pcm" | grep 2
// Change the system version file and run again. We should now have three
// module variants.
// RUN: mkdir -p %t/System/Library/CoreServices
// RUN: echo "modules" > %t/System/Library/CoreServices/SystemVersion.plist
// RUN: %clang_cc1 -fmodules-cache-path=%t/cache -fmodules -isysroot %t -I %t/usr/include %s -verify
-// RUN: ls -R %t | grep -c ModA.pcm| grep 3
+// RUN: ls -R %t | grep -c "ModA.*pcm" | grep 3
// expected-no-diagnostics
@import ModA;
diff --git a/test/Modules/template-specialization-visibility.cpp b/test/Modules/template-specialization-visibility.cpp
new file mode 100644
index 000000000000..efcfd93dd88b
--- /dev/null
+++ b/test/Modules/template-specialization-visibility.cpp
@@ -0,0 +1,26 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodules -verify -fmodules-cache-path=%t -I %S/Inputs/template-specialization-visibility -std=c++11 %s
+//
+// expected-no-diagnostics
+
+#include "c.h"
+
+S<int> implicit_inst_class_template;
+int k1 = implicit_inst_class_template.n;
+
+S<char> explicit_inst_class_template;
+int k2 = explicit_inst_class_template.n;
+
+#include "a.h"
+
+T<int>::S implicit_inst_member_class_template;
+int k3 = implicit_inst_member_class_template.n;
+
+T<char>::S explicit_inst_member_class_template;
+int k4 = explicit_inst_member_class_template.n;
+
+T<int>::E implicit_inst_member_enum_template;
+int k5 = decltype(implicit_inst_member_enum_template)::e;
+
+T<char>::E explicit_inst_member_enum_template;
+int k6 = decltype(explicit_inst_member_enum_template)::e;
diff --git a/test/Modules/templates.mm b/test/Modules/templates.mm
index 080f9e7c665e..78348af41e77 100644
--- a/test/Modules/templates.mm
+++ b/test/Modules/templates.mm
@@ -4,6 +4,12 @@
// expected-no-diagnostics
@import templates_left;
+
+void testInlineRedeclEarly() {
+ // instantiate definition now, we'll add another declaration in _right.
+ OutOfLineInline<int>().h();
+}
+
@import templates_right;
// CHECK: @list_left = global { %{{.*}}*, i32, [4 x i8] } { %{{.*}}* null, i32 8,
@@ -20,6 +26,9 @@ void testTemplateClasses() {
N::Set<char> set_char;
set_char.insert('A');
+
+ List<double> list_double;
+ list_double.push_back(0.0);
}
void testPendingInstantiations() {
@@ -36,6 +45,19 @@ void testRedeclDefinition() {
redeclDefinitionEmit();
}
+void testInlineRedecl() {
+ outOfLineInlineUseLeftF();
+ outOfLineInlineUseRightG();
+
+ outOfLineInlineUseRightF();
+ outOfLineInlineUseLeftG();
+}
+
+// CHECK-NOT: @_ZN21ExplicitInstantiationILb0ELb0EE1fEv(
+// CHECK: declare {{.*}}@_ZN21ExplicitInstantiationILb1ELb0EE1fEv(
+// CHECK: define {{.*}}@_ZN21ExplicitInstantiationILb1ELb1EE1fEv(
+// CHECK-NOT: @_ZN21ExplicitInstantiationILb0ELb0EE1fEv(
+
// These three are all the same type.
typedef OuterIntInner_left OuterIntInner;
typedef OuterIntInner_right OuterIntInner;
@@ -58,12 +80,23 @@ unsigned testMixedStruct() {
// CHECK: call {{.*}}memcpy{{.*}}(i8* %{{.*}}, i8* bitcast ({{.*}}* @_ZZ15testMixedStructvE1r to i8*), i64 16,
ListInt_right r{0, 2};
- // CHECK: call void @_Z10useListIntR4ListIiE(%[[ListInt]]* %[[l]])
+ // CHECK: call void @_Z10useListIntR4ListIiE(%[[ListInt]]* dereferenceable({{[0-9]+}}) %[[l]])
useListInt(l);
- // CHECK: call void @_Z10useListIntR4ListIiE(%[[ListInt]]* %[[r]])
+ // CHECK: call void @_Z10useListIntR4ListIiE(%[[ListInt]]* dereferenceable({{[0-9]+}}) %[[r]])
useListInt(r);
// CHECK: load i32* bitcast (i8* getelementptr inbounds (i8* bitcast ({{.*}}* @list_left to i8*), i64 8) to i32*)
// CHECK: load i32* bitcast (i8* getelementptr inbounds (i8* bitcast ({{.*}}* @list_right to i8*), i64 8) to i32*)
return list_left.*size_right + list_right.*size_left;
}
+
+template<typename T> struct MergePatternDecl {
+ typedef int Type;
+ void f(Type);
+};
+template<typename T> void MergePatternDecl<T>::f(Type type) {}
+// CHECK: define {{.*}}@_ZN21ExplicitInstantiationILb0ELb1EE1fEv(
+template struct ExplicitInstantiation<false, true>;
+template struct ExplicitInstantiation<true, true>;
+
+void testDelayUpdatesImpl() { testDelayUpdates<int>(); }
diff --git a/test/Modules/undefined-type-fixit1.cpp b/test/Modules/undefined-type-fixit1.cpp
new file mode 100644
index 000000000000..78ce174f5462
--- /dev/null
+++ b/test/Modules/undefined-type-fixit1.cpp
@@ -0,0 +1,12 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fmodules-search-all -I %S/Inputs/undefined-type-fixit %s -verify
+
+//#include "public1.h"
+#include "public2.h"
+#include "public2sub.h"
+
+use_this1 client_variable1; // expected-error{{declaration of 'use_this1' must be imported from module 'public1' before it is required}}
+use_this2 client_variable2;
+use_this2sub client_variable2sub;
+
+// expected-note@Inputs/undefined-type-fixit/public1.h:4 {{previous declaration is here}}
diff --git a/test/Modules/unnecessary-module-map-parsing.c b/test/Modules/unnecessary-module-map-parsing.c
new file mode 100644
index 000000000000..4c83448179e0
--- /dev/null
+++ b/test/Modules/unnecessary-module-map-parsing.c
@@ -0,0 +1,8 @@
+// This checks that we are not parsing module maps if modules are not enabled.
+
+// RUN: not %clang_cc1 -fmodules -I %S/Inputs/unnecessary-module-map-parsing -fsyntax-only %s 2>&1 | FileCheck %s
+// RUN: %clang_cc1 -I %S/Inputs/unnecessary-module-map-parsing -fsyntax-only %s
+
+// CHECK: error: expected umbrella, header, submodule, or module export
+
+#include "a1.h"
diff --git a/test/Modules/update-after-load.cpp b/test/Modules/update-after-load.cpp
new file mode 100644
index 000000000000..f497ea47945b
--- /dev/null
+++ b/test/Modules/update-after-load.cpp
@@ -0,0 +1,8 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fmodules -I %S/Inputs/update-after-load -verify -fmodules-cache-path=%t %s
+
+// expected-no-diagnostics
+#include "a.h"
+namespace llvm {}
+#include "b.h"
+void llvm::f() {}
diff --git a/test/Modules/validate-system-headers.m b/test/Modules/validate-system-headers.m
new file mode 100644
index 000000000000..48ea64c5a938
--- /dev/null
+++ b/test/Modules/validate-system-headers.m
@@ -0,0 +1,43 @@
+// RUN: rm -rf %t/ModuleCache
+// RUN: mkdir -p %t/Inputs/usr/include
+// RUN: touch %t/Inputs/usr/include/foo.h
+// RUN: echo 'module Foo [system] { header "foo.h" }' > %t/Inputs/usr/include/module.map
+
+////
+// Build a module using a system header
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -isysroot %t/Inputs -fmodules -fmodules-cache-path=%t/ModuleCache -fdisable-module-hash -x objective-c-header -fsyntax-only %s
+// RUN: cp %t/ModuleCache/Foo.pcm %t/Foo.pcm.saved
+
+////
+// Modify the system header, and confirm that we don't notice without -fmodules-validate-system-headers.
+// The pcm file in the cache should fail to validate.
+// RUN: echo ' ' >> %t/Inputs/usr/include/foo.h
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -isysroot %t/Inputs -fmodules -fmodules-cache-path=%t/ModuleCache -fdisable-module-hash -x objective-c-header -fsyntax-only %s
+// RUN: diff %t/ModuleCache/Foo.pcm %t/Foo.pcm.saved
+
+////
+// Now make sure we rebuild the module when -fmodules-validate-system-headers is set.
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -isysroot %t/Inputs -fmodules -fmodules-validate-system-headers -fmodules-cache-path=%t/ModuleCache -fdisable-module-hash -x objective-c-header -fsyntax-only %s
+// RUN: not diff %t/ModuleCache/Foo.pcm %t/Foo.pcm.saved
+
+
+////
+// This should override -fmodules-validate-once-per-build-session
+// RUN: cp %t/ModuleCache/Foo.pcm %t/Foo.pcm.saved
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -isysroot %t/Inputs -fmodules -fmodules-cache-path=%t/ModuleCache -fdisable-module-hash -x objective-c-header -fsyntax-only %s -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session
+// RUN: diff %t/ModuleCache/Foo.pcm %t/Foo.pcm.saved
+
+// Modify the system header...
+// RUN: echo ' ' >> %t/Inputs/usr/include/foo.h
+
+// Don't recompile due to -fmodules-validate-once-per-build-session
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -isysroot %t/Inputs -fmodules -fmodules-cache-path=%t/ModuleCache -fdisable-module-hash -x objective-c-header -fsyntax-only %s -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session
+// RUN: diff %t/ModuleCache/Foo.pcm %t/Foo.pcm.saved
+
+// Now add -fmodules-validate-system-headers and rebuild
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -isysroot %t/Inputs -fmodules -fmodules-validate-system-headers -fmodules-cache-path=%t/ModuleCache -fdisable-module-hash -x objective-c-header -fsyntax-only %s -fbuild-session-timestamp=1390000000 -fmodules-validate-once-per-build-session
+// RUN: not diff %t/ModuleCache/Foo.pcm %t/Foo.pcm.saved
+
+// REQUIRES: shell
+
+@import Foo;
diff --git a/test/OpenMP/barrier_ast_print.cpp b/test/OpenMP/barrier_ast_print.cpp
new file mode 100644
index 000000000000..0ce344f6d992
--- /dev/null
+++ b/test/OpenMP/barrier_ast_print.cpp
@@ -0,0 +1,32 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ast-print %s | FileCheck %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -emit-pch -o %t %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
+// expected-no-diagnostics
+
+#ifndef HEADER
+#define HEADER
+
+void foo() {}
+
+template <class T>
+T tmain(T argc) {
+ static T a;
+#pragma omp barrier
+ return a + argc;
+}
+// CHECK: static int a;
+// CHECK-NEXT: #pragma omp barrier
+// CHECK: static char a;
+// CHECK-NEXT: #pragma omp barrier
+// CHECK: static T a;
+// CHECK-NEXT: #pragma omp barrier
+
+int main(int argc, char **argv) {
+ static int a;
+// CHECK: static int a;
+#pragma omp barrier
+ // CHECK-NEXT: #pragma omp barrier
+ return tmain(argc) + tmain(argv[0][0]) + a;
+}
+
+#endif
diff --git a/test/OpenMP/barrier_messages.cpp b/test/OpenMP/barrier_messages.cpp
new file mode 100644
index 000000000000..81ff84eab746
--- /dev/null
+++ b/test/OpenMP/barrier_messages.cpp
@@ -0,0 +1,110 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s
+
+template <class T>
+T tmain(T argc) {
+#pragma omp barrier
+ ;
+#pragma omp barrier untied // expected-error {{unexpected OpenMP clause 'untied' in directive '#pragma omp barrier'}}
+#pragma omp barrier unknown // expected-warning {{extra tokens at the end of '#pragma omp barrier' are ignored}}
+ if (argc)
+#pragma omp barrier // expected-error {{'#pragma omp barrier' cannot be an immediate substatement}}
+ if (argc) {
+#pragma omp barrier
+ }
+ while (argc)
+#pragma omp barrier // expected-error {{'#pragma omp barrier' cannot be an immediate substatement}}
+ while (argc) {
+#pragma omp barrier
+ }
+ do
+#pragma omp barrier // expected-error {{'#pragma omp barrier' cannot be an immediate substatement}}
+ while (argc)
+ ;
+ do {
+#pragma omp barrier
+ } while (argc);
+ switch (argc)
+#pragma omp barrier // expected-error {{'#pragma omp barrier' cannot be an immediate substatement}}
+ switch (argc)
+ case 1:
+#pragma omp barrier // expected-error {{'#pragma omp barrier' cannot be an immediate substatement}}
+ switch (argc)
+ case 1: {
+#pragma omp barrier
+ }
+ switch (argc) {
+#pragma omp barrier
+ case 1:
+#pragma omp barrier // expected-error {{'#pragma omp barrier' cannot be an immediate substatement}}
+ break;
+ default: {
+#pragma omp barrier
+ } break;
+ }
+ for (;;)
+#pragma omp barrier // expected-error {{'#pragma omp barrier' cannot be an immediate substatement}}
+ for (;;) {
+#pragma omp barrier
+ }
+label:
+#pragma omp barrier // expected-error {{'#pragma omp barrier' cannot be an immediate substatement}}
+label1 : {
+#pragma omp barrier
+}
+
+ return T();
+}
+
+int main(int argc, char **argv) {
+#pragma omp barrier
+ ;
+#pragma omp barrier untied // expected-error {{unexpected OpenMP clause 'untied' in directive '#pragma omp barrier'}}
+#pragma omp barrier unknown // expected-warning {{extra tokens at the end of '#pragma omp barrier' are ignored}}
+ if (argc)
+#pragma omp barrier // expected-error {{'#pragma omp barrier' cannot be an immediate substatement}}
+ if (argc) {
+#pragma omp barrier
+ }
+ while (argc)
+#pragma omp barrier // expected-error {{'#pragma omp barrier' cannot be an immediate substatement}}
+ while (argc) {
+#pragma omp barrier
+ }
+ do
+#pragma omp barrier // expected-error {{'#pragma omp barrier' cannot be an immediate substatement}}
+ while (argc)
+ ;
+ do {
+#pragma omp barrier
+ } while (argc);
+ switch (argc)
+#pragma omp barrier // expected-error {{'#pragma omp barrier' cannot be an immediate substatement}}
+ switch (argc)
+ case 1:
+#pragma omp barrier // expected-error {{'#pragma omp barrier' cannot be an immediate substatement}}
+ switch (argc)
+ case 1: {
+#pragma omp barrier
+ }
+ switch (argc) {
+#pragma omp barrier
+ case 1:
+#pragma omp barrier // expected-error {{'#pragma omp barrier' cannot be an immediate substatement}}
+ break;
+ default: {
+#pragma omp barrier
+ } break;
+ }
+ for (;;)
+#pragma omp barrier // expected-error {{'#pragma omp barrier' cannot be an immediate substatement}}
+ for (;;) {
+#pragma omp barrier
+ }
+label:
+#pragma omp barrier // expected-error {{'#pragma omp barrier' cannot be an immediate substatement}}
+label1 : {
+#pragma omp barrier
+}
+
+ return tmain(argc);
+}
diff --git a/test/OpenMP/critical_ast_print.cpp b/test/OpenMP/critical_ast_print.cpp
new file mode 100644
index 000000000000..98ece88e0f71
--- /dev/null
+++ b/test/OpenMP/critical_ast_print.cpp
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ast-print %s | FileCheck %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -emit-pch -o %t %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
+// expected-no-diagnostics
+
+#ifndef HEADER
+#define HEADER
+
+void foo() {}
+
+int main (int argc, char **argv) {
+ int b = argc, c, d, e, f, g;
+ static int a;
+// CHECK: static int a;
+#pragma omp critical
+ a=2;
+// CHECK-NEXT: #pragma omp critical
+// CHECK-NEXT: a = 2;
+// CHECK-NEXT: ++a;
+ ++a;
+#pragma omp critical (the_name)
+ foo();
+// CHECK-NEXT: #pragma omp critical (the_name)
+// CHECK-NEXT: foo();
+// CHECK-NEXT: return 0;
+ return 0;
+}
+
+#endif
diff --git a/test/OpenMP/critical_messages.cpp b/test/OpenMP/critical_messages.cpp
new file mode 100644
index 000000000000..08df9e0666e4
--- /dev/null
+++ b/test/OpenMP/critical_messages.cpp
@@ -0,0 +1,72 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+int foo();
+
+int main() {
+ #pragma omp critical
+ ;
+ #pragma omp critical untied // expected-error {{unexpected OpenMP clause 'untied' in directive '#pragma omp critical'}}
+ #pragma omp critical unknown // expected-warning {{extra tokens at the end of '#pragma omp critical' are ignored}}
+ #pragma omp critical ( // expected-error {{expected identifier}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp critical ( + // expected-error {{expected identifier}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp critical (name // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp critical (name1)
+ foo();
+ {
+ #pragma omp critical
+ } // expected-error {{expected statement}}
+ #pragma omp critical (name) // expected-note {{previous 'critical' region starts here}}
+ #pragma omp critical
+ for (int i = 0; i < 10; ++i) {
+ foo();
+ #pragma omp parallel
+ #pragma omp for
+ for (int j = 0; j < 10; j++) {
+ foo();
+ #pragma omp critical(name) // expected-error {{cannot nest 'critical' regions having the same name 'name'}}
+ foo();
+ }
+ }
+ #pragma omp critical (name)
+ #pragma omp critical
+ for (int i = 0; i < 10; ++i) {
+ foo();
+ #pragma omp parallel
+ #pragma omp for
+ for (int j = 0; j < 10; j++) {
+ #pragma omp critical
+ foo();
+ }
+ }
+ #pragma omp critical (name)
+ #pragma omp critical
+ for (int i = 0; i < 10; ++i) {
+ foo();
+ #pragma omp parallel
+ #pragma omp for
+ for (int j = 0; j < 10; j++) {
+ #pragma omp critical (nam)
+ foo();
+ }
+ }
+
+ return 0;
+}
+
+int foo() {
+ L1:
+ foo();
+ #pragma omp critical
+ {
+ foo();
+ goto L1; // expected-error {{use of undeclared label 'L1'}}
+ }
+ goto L2; // expected-error {{use of undeclared label 'L2'}}
+ #pragma omp critical
+ {
+ L2:
+ foo();
+ }
+
+ return 0;
+}
diff --git a/test/OpenMP/flush_ast_print.cpp b/test/OpenMP/flush_ast_print.cpp
new file mode 100644
index 000000000000..7eb18f0c17f2
--- /dev/null
+++ b/test/OpenMP/flush_ast_print.cpp
@@ -0,0 +1,38 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ast-print %s | FileCheck %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -emit-pch -o %t %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
+// expected-no-diagnostics
+
+#ifndef HEADER
+#define HEADER
+
+void foo() {}
+
+template <class T>
+T tmain(T argc) {
+ static T a;
+#pragma omp flush
+#pragma omp flush(a)
+ return a + argc;
+}
+// CHECK: static int a;
+// CHECK-NEXT: #pragma omp flush
+// CHECK-NEXT: #pragma omp flush (a)
+// CHECK: static char a;
+// CHECK-NEXT: #pragma omp flush
+// CHECK-NEXT: #pragma omp flush (a)
+// CHECK: static T a;
+// CHECK-NEXT: #pragma omp flush
+// CHECK-NEXT: #pragma omp flush (a)
+
+int main(int argc, char **argv) {
+ static int a;
+// CHECK: static int a;
+#pragma omp flush
+#pragma omp flush(a)
+// CHECK-NEXT: #pragma omp flush
+// CHECK-NEXT: #pragma omp flush (a)
+ return tmain(argc) + tmain(argv[0][0]) + a;
+}
+
+#endif
diff --git a/test/OpenMP/flush_messages.cpp b/test/OpenMP/flush_messages.cpp
new file mode 100644
index 000000000000..8c61680929ab
--- /dev/null
+++ b/test/OpenMP/flush_messages.cpp
@@ -0,0 +1,134 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s
+
+struct S1 { // expected-note 2 {{declared here}}
+ int a;
+};
+
+template <class T>
+T tmain(T argc) {
+#pragma omp flush
+ ;
+#pragma omp flush untied // expected-error {{unexpected OpenMP clause 'untied' in directive '#pragma omp flush'}}
+#pragma omp flush unknown // expected-warning {{extra tokens at the end of '#pragma omp flush' are ignored}}
+ if (argc)
+#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
+ if (argc) {
+#pragma omp flush
+ }
+ while (argc)
+#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
+ while (argc) {
+#pragma omp flush
+ }
+ do
+#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
+ while (argc)
+ ;
+ do {
+#pragma omp flush
+ } while (argc);
+ switch (argc)
+#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
+ switch (argc)
+ case 1:
+#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
+ switch (argc)
+ case 1: {
+#pragma omp flush
+ }
+ switch (argc) {
+#pragma omp flush
+ case 1:
+#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
+ break;
+ default: {
+#pragma omp flush
+ } break;
+ }
+ for (;;)
+#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
+ for (;;) {
+#pragma omp flush
+ }
+label:
+#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
+label1 : {
+#pragma omp flush
+}
+
+#pragma omp flush
+#pragma omp flush( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+#pragma omp flush() // expected-error {{expected expression}}
+#pragma omp flush(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+#pragma omp flush(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+#pragma omp flush(argc)
+#pragma omp flush(S1) // expected-error {{'S1' does not refer to a value}}
+#pragma omp flush(argc) flush(argc) // expected-warning {{extra tokens at the end of '#pragma omp flush' are ignored}}
+#pragma omp parallel flush(argc) // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
+ ;
+ return T();
+}
+
+int main(int argc, char **argv) {
+#pragma omp flush
+ ;
+#pragma omp flush untied // expected-error {{unexpected OpenMP clause 'untied' in directive '#pragma omp flush'}}
+#pragma omp flush unknown // expected-warning {{extra tokens at the end of '#pragma omp flush' are ignored}}
+ if (argc)
+#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
+ if (argc) {
+#pragma omp flush
+ }
+ while (argc)
+#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
+ while (argc) {
+#pragma omp flush
+ }
+ do
+#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
+ while (argc)
+ ;
+ do {
+#pragma omp flush
+ } while (argc);
+ switch (argc)
+#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
+ switch (argc)
+ case 1:
+#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
+ switch (argc)
+ case 1: {
+#pragma omp flush
+ }
+ switch (argc) {
+#pragma omp flush
+ case 1:
+#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
+ break;
+ default: {
+#pragma omp flush
+ } break;
+ }
+ for (;;)
+#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
+ for (;;) {
+#pragma omp flush
+ }
+label:
+#pragma omp flush // expected-error {{'#pragma omp flush' cannot be an immediate substatement}}
+label1 : {
+#pragma omp flush
+}
+
+#pragma omp flush
+#pragma omp flush( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+#pragma omp flush() // expected-error {{expected expression}}
+#pragma omp flush(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+#pragma omp flush(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+#pragma omp flush(argc)
+#pragma omp flush(S1) // expected-error {{'S1' does not refer to a value}}
+#pragma omp flush(argc) flush(argc) // expected-warning {{extra tokens at the end of '#pragma omp flush' are ignored}}
+#pragma omp parallel flush(argc) // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
+ ;
+ return tmain(argc);
+}
diff --git a/test/OpenMP/for_ast_print.cpp b/test/OpenMP/for_ast_print.cpp
new file mode 100644
index 000000000000..8802237b2574
--- /dev/null
+++ b/test/OpenMP/for_ast_print.cpp
@@ -0,0 +1,64 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ast-print %s | FileCheck %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -emit-pch -o %t %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
+// expected-no-diagnostics
+
+#ifndef HEADER
+#define HEADER
+
+void foo() {}
+
+template <class T, int N>
+T tmain(T argc) {
+ T b = argc, c, d, e, f, g;
+ static T a;
+// CHECK: static T a;
+#pragma omp for schedule(dynamic)
+ // CHECK-NEXT: #pragma omp for schedule(dynamic)
+ for (int i = 0; i < 2; ++i)
+ a = 2;
+// CHECK-NEXT: for (int i = 0; i < 2; ++i)
+// CHECK-NEXT: a = 2;
+#pragma omp parallel
+#pragma omp for private(argc, b), firstprivate(c, d), lastprivate(d, f) collapse(N) schedule(static, N) ordered nowait
+ for (int i = 0; i < 10; ++i)
+ for (int j = 0; j < 10; ++j)
+ for (int j = 0; j < 10; ++j)
+ for (int j = 0; j < 10; ++j)
+ for (int j = 0; j < 10; ++j)
+ foo();
+ // CHECK-NEXT: #pragma omp parallel
+ // CHECK-NEXT: #pragma omp for private(argc,b) firstprivate(c,d) lastprivate(d,f) collapse(N) schedule(static, N) ordered nowait
+ // CHECK-NEXT: for (int i = 0; i < 10; ++i)
+ // CHECK-NEXT: for (int j = 0; j < 10; ++j)
+ // CHECK-NEXT: for (int j = 0; j < 10; ++j)
+ // CHECK-NEXT: for (int j = 0; j < 10; ++j)
+ // CHECK-NEXT: for (int j = 0; j < 10; ++j)
+ // CHECK-NEXT: foo();
+ return T();
+}
+
+int main(int argc, char **argv) {
+ int b = argc, c, d, e, f, g;
+ static int a;
+// CHECK: static int a;
+#pragma omp for schedule(guided, argc)
+ // CHECK-NEXT: #pragma omp for schedule(guided, argc)
+ for (int i = 0; i < 2; ++i)
+ a = 2;
+// CHECK-NEXT: for (int i = 0; i < 2; ++i)
+// CHECK-NEXT: a = 2;
+#pragma omp parallel
+#pragma omp for private(argc, b), firstprivate(argv, c), lastprivate(d, f) collapse(2) schedule(auto) ordered nowait
+ for (int i = 0; i < 10; ++i)
+ for (int j = 0; j < 10; ++j)
+ foo();
+ // CHECK-NEXT: #pragma omp parallel
+ // CHECK-NEXT: #pragma omp for private(argc,b) firstprivate(argv,c) lastprivate(d,f) collapse(2) schedule(auto) ordered nowait
+ // CHECK-NEXT: for (int i = 0; i < 10; ++i)
+ // CHECK-NEXT: for (int j = 0; j < 10; ++j)
+ // CHECK-NEXT: foo();
+ return (tmain<int, 5>(argc) + tmain<char, 1>(argv[0][0]));
+}
+
+#endif
diff --git a/test/OpenMP/for_collapse_messages.cpp b/test/OpenMP/for_collapse_messages.cpp
new file mode 100644
index 000000000000..9e14234e0723
--- /dev/null
+++ b/test/OpenMP/for_collapse_messages.cpp
@@ -0,0 +1,83 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}}
+
+template <class T, typename S, int N, int ST> // expected-note {{declared here}}
+T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+ #pragma omp for collapse // expected-error {{expected '(' after 'collapse'}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp for collapse ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp for collapse () // expected-error {{expected expression}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ // expected-error@+3 {{expected ')'}} expected-note@+3 {{to match this '('}}
+ // expected-error@+2 2 {{expression is not an integral constant expression}}
+ // expected-note@+1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ #pragma omp for collapse (argc
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ // expected-error@+1 2 {{argument to 'collapse' clause must be a positive integer value}}
+ #pragma omp for collapse (ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp for collapse (1)) // expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp for collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp for', but found only 1}}
+ // expected-error@+3 2 {{directive '#pragma omp for' cannot contain more than one 'collapse' clause}}
+ // expected-error@+2 2 {{argument to 'collapse' clause must be a positive integer value}}
+ // expected-error@+1 2 {{expression is not an integral constant expression}}
+ #pragma omp for collapse (foobool(argc)), collapse (true), collapse (-5)
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp for collapse (S) // expected-error {{'S' does not refer to a value}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ // expected-error@+1 2 {{expression is not an integral constant expression}}
+ #pragma omp for collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp for collapse (1)
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp for collapse (N) // expected-error {{argument to 'collapse' clause must be a positive integer value}}
+ for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp for collapse (2) // expected-note {{as specified in 'collapse' clause}}
+ foo(); // expected-error {{expected 2 for loops after '#pragma omp for'}}
+ return argc;
+}
+
+int main(int argc, char **argv) {
+ #pragma omp for collapse // expected-error {{expected '(' after 'collapse'}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp for collapse ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp for collapse () // expected-error {{expected expression}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp for collapse (4 // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-note {{as specified in 'collapse' clause}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp for', but found only 1}}
+ #pragma omp for collapse (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}} expected-note {{as specified in 'collapse' clause}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp for', but found only 1}}
+ #pragma omp for collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{expression is not an integral constant expression}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ // expected-error@+3 {{expression is not an integral constant expression}}
+ // expected-error@+2 2 {{directive '#pragma omp for' cannot contain more than one 'collapse' clause}}
+ // expected-error@+1 2 {{argument to 'collapse' clause must be a positive integer value}}
+ #pragma omp for collapse (foobool(argc)), collapse (true), collapse (-5)
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp for collapse (S1) // expected-error {{'S1' does not refer to a value}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ // expected-error@+1 {{expression is not an integral constant expression}}
+ #pragma omp for collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ // expected-error@+3 {{statement after '#pragma omp for' must be a for loop}}
+ // expected-note@+1 {{in instantiation of function template specialization 'tmain<int, char, -1, -2>' requested here}}
+ #pragma omp for collapse(collapse(tmain<int, char, -1, -2>(argc, argv) // expected-error 2 {{expected ')'}} expected-note 2 {{to match this '('}}
+ foo();
+ #pragma omp for collapse (2) // expected-note {{as specified in 'collapse' clause}}
+ foo(); // expected-error {{expected 2 for loops after '#pragma omp for'}}
+ // expected-note@+1 {{in instantiation of function template specialization 'tmain<int, char, 1, 0>' requested here}}
+ return tmain<int, char, 1, 0>(argc, argv);
+}
+
diff --git a/test/OpenMP/for_firstprivate_messages.cpp b/test/OpenMP/for_firstprivate_messages.cpp
new file mode 100644
index 000000000000..f1d21b8ce5af
--- /dev/null
+++ b/test/OpenMP/for_firstprivate_messages.cpp
@@ -0,0 +1,293 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+
+public:
+ S2() : a(0) {}
+ S2(S2 &s2) : a(s2.a) {}
+ static float S2s;
+ static const float S2sc;
+};
+const float S2::S2sc = 0;
+const S2 b;
+const S2 ba[5];
+class S3 {
+ int a;
+ S3 &operator=(const S3 &s3);
+
+public:
+ S3() : a(0) {}
+ S3(S3 &s3) : a(s3.a) {}
+};
+const S3 c;
+const S3 ca[5];
+extern const int f;
+class S4 { // expected-note 2 {{'S4' declared here}}
+ int a;
+ S4();
+ S4(const S4 &s4);
+
+public:
+ S4(int v) : a(v) {}
+};
+class S5 { // expected-note 4 {{'S5' declared here}}
+ int a;
+ S5(const S5 &s5) : a(s5.a) {}
+
+public:
+ S5() : a(0) {}
+ S5(int v) : a(v) {}
+};
+class S6 {
+ int a;
+ S6() : a(0) {}
+
+public:
+ S6(const S6 &s6) : a(s6.a) {}
+ S6(int v) : a(v) {}
+};
+
+S3 h;
+#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
+
+template <class I, class C>
+int foomain(int argc, char **argv) {
+ I e(4); // expected-note {{'e' defined here}}
+ C g(5); // expected-note 2 {{'g' defined here}}
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp parallel
+#pragma omp for firstprivate // expected-error {{expected '(' after 'firstprivate'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for firstprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for firstprivate() // expected-error {{expected expression}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for firstprivate(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for firstprivate(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for firstprivate(argc)
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for firstprivate(argv[1]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for firstprivate(e, g) // expected-error 2 {{firstprivate variable must have an accessible, unambiguous copy constructor}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for linear(i) // expected-error {{unexpected OpenMP clause 'linear' in directive '#pragma omp for'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+ {
+ int v = 0;
+ int i; // expected-note {{variable with automatic storage duration is predetermined as private; perhaps you forget to enclose 'omp for' directive into a parallel or another task region?}}
+#pragma omp for firstprivate(i) // expected-error {{private variable cannot be firstprivate}}
+ for (int k = 0; k < argc; ++k) {
+ i = k;
+ v += i;
+ }
+ }
+#pragma omp parallel shared(i)
+#pragma omp parallel private(i)
+#pragma omp for firstprivate(j) // expected-error {{arguments of OpenMP clause 'firstprivate' cannot be of reference type}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for firstprivate(i)
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for lastprivate(g) firstprivate(g) // expected-error {{firstprivate variable must have an accessible, unambiguous copy constructor}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel private(i) // expected-note {{defined as private}}
+#pragma omp for firstprivate(i) // expected-error {{firstprivate variable must be shared}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel reduction(+ : i) // expected-note {{defined as reduction}}
+#pragma omp for firstprivate(i) // expected-error {{firstprivate variable must be shared}}
+ for (i = 0; i < argc; ++i)
+ foo();
+ return 0;
+}
+
+int main(int argc, char **argv) {
+ const int d = 5;
+ const int da[5] = {0};
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note 2 {{'g' defined here}}
+ S3 m;
+ S6 n(2);
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp parallel
+#pragma omp for firstprivate // expected-error {{expected '(' after 'firstprivate'}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for firstprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for firstprivate() // expected-error {{expected expression}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for firstprivate(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for firstprivate(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for firstprivate(argc)
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for firstprivate(argv[1]) // expected-error {{expected variable name}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for firstprivate(2 * 2) // expected-error {{expected variable name}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for firstprivate(ba) // OK
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for firstprivate(ca) // OK
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for firstprivate(da) // OK
+ for (i = 0; i < argc; ++i)
+ foo();
+ int xa;
+#pragma omp parallel
+#pragma omp for firstprivate(xa) // OK
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for firstprivate(S2::S2s) // OK
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for firstprivate(S2::S2sc) // OK
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for safelen(5) // expected-error {{unexpected OpenMP clause 'safelen' in directive '#pragma omp for'}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for firstprivate(e, g) // expected-error 2 {{firstprivate variable must have an accessible, unambiguous copy constructor}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for firstprivate(m) // OK
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for private(xa), firstprivate(xa) // expected-error {{private variable cannot be firstprivate}} expected-note {{defined as private}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for firstprivate(i) // expected-note {{defined as firstprivate}}
+ for (i = 0; i < argc; ++i) // expected-error {{loop iteration variable in the associated loop of 'omp for' directive may not be firstprivate, predetermined as private}}
+ foo();
+#pragma omp parallel shared(xa)
+#pragma omp for firstprivate(xa) // OK: may be firstprivate
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for firstprivate(j) // expected-error {{arguments of OpenMP clause 'firstprivate' cannot be of reference type}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for lastprivate(g) firstprivate(g) // expected-error {{firstprivate variable must have an accessible, unambiguous copy constructor}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for lastprivate(n) firstprivate(n) // OK
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+ {
+ int v = 0;
+ int i; // expected-note {{variable with automatic storage duration is predetermined as private; perhaps you forget to enclose 'omp for' directive into a parallel or another task region?}}
+#pragma omp for firstprivate(i) // expected-error {{private variable cannot be firstprivate}}
+ for (int k = 0; k < argc; ++k) {
+ i = k;
+ v += i;
+ }
+ }
+#pragma omp parallel private(i) // expected-note {{defined as private}}
+#pragma omp for firstprivate(i) // expected-error {{firstprivate variable must be shared}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel reduction(+ : i) // expected-note {{defined as reduction}}
+#pragma omp for firstprivate(i) // expected-error {{firstprivate variable must be shared}}
+ for (i = 0; i < argc; ++i)
+ foo();
+
+ return foomain<S4, S5>(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<S4, S5>' requested here}}
+}
diff --git a/test/OpenMP/for_lastprivate_messages.cpp b/test/OpenMP/for_lastprivate_messages.cpp
new file mode 100644
index 000000000000..a3a1c4b34ed8
--- /dev/null
+++ b/test/OpenMP/for_lastprivate_messages.cpp
@@ -0,0 +1,266 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+
+public:
+ S2() : a(0) {}
+ S2(S2 &s2) : a(s2.a) {}
+ static float S2s; // expected-note {{static data member is predetermined as shared}}
+ static const float S2sc;
+};
+const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const S2 b;
+const S2 ba[5];
+class S3 { // expected-note 2 {{'S3' declared here}}
+ int a;
+ S3 &operator=(const S3 &s3);
+
+public:
+ S3() : a(0) {}
+ S3(S3 &s3) : a(s3.a) {}
+};
+const S3 c; // expected-note {{global variable is predetermined as shared}}
+const S3 ca[5]; // expected-note {{global variable is predetermined as shared}}
+extern const int f; // expected-note {{global variable is predetermined as shared}}
+class S4 { // expected-note 3 {{'S4' declared here}}
+ int a;
+ S4();
+ S4(const S4 &s4);
+
+public:
+ S4(int v) : a(v) {}
+};
+class S5 { // expected-note {{'S5' declared here}}
+ int a;
+ S5() : a(0) {}
+
+public:
+ S5(const S5 &s5) : a(s5.a) {}
+ S5(int v) : a(v) {}
+};
+class S6 {
+ int a;
+ S6() : a(0) {}
+
+public:
+ S6(const S6 &s6) : a(s6.a) {}
+ S6(int v) : a(v) {}
+};
+
+S3 h;
+#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
+
+template <class I, class C>
+int foomain(int argc, char **argv) {
+ I e(4); // expected-note {{'e' defined here}}
+ I g(5); // expected-note {{'g' defined here}}
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp parallel
+#pragma omp for lastprivate // expected-error {{expected '(' after 'lastprivate'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for lastprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for lastprivate() // expected-error {{expected expression}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for lastprivate(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for lastprivate(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for lastprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for lastprivate(argc)
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for lastprivate(S1) // expected-error {{'S1' does not refer to a value}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for lastprivate(argv[1]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for lastprivate(e, g) // expected-error 2 {{lastprivate variable must have an accessible, unambiguous default constructor}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for linear(i) // expected-error {{unexpected OpenMP clause 'linear' in directive '#pragma omp for'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+ {
+ int v = 0;
+ int i; // expected-note {{variable with automatic storage duration is predetermined as private; perhaps you forget to enclose 'omp for' directive into a parallel or another task region?}}
+#pragma omp for lastprivate(i) // expected-error {{lastprivate variable must be shared}}
+ for (int k = 0; k < argc; ++k) {
+ i = k;
+ v += i;
+ }
+ }
+#pragma omp parallel shared(i)
+#pragma omp parallel private(i)
+#pragma omp for lastprivate(j) // expected-error {{arguments of OpenMP clause 'lastprivate' cannot be of reference type}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+#pragma omp for lastprivate(i)
+ for (int k = 0; k < argc; ++k)
+ ++k;
+ return 0;
+}
+
+int main(int argc, char **argv) {
+ const int d = 5; // expected-note {{constant variable is predetermined as shared}}
+ const int da[5] = {0}; // expected-note {{constant variable is predetermined as shared}}
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note {{'g' defined here}}
+ S3 m; // expected-note 2 {{'m' defined here}}
+ S6 n(2);
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp parallel
+#pragma omp for lastprivate // expected-error {{expected '(' after 'lastprivate'}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for lastprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for lastprivate() // expected-error {{expected expression}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for lastprivate(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for lastprivate(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for lastprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for lastprivate(argc)
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for lastprivate(S1) // expected-error {{'S1' does not refer to a value}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for lastprivate(argv[1]) // expected-error {{expected variable name}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for lastprivate(2 * 2) // expected-error {{expected variable name}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for lastprivate(ba)
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for lastprivate(da) // expected-error {{shared variable cannot be lastprivate}}
+ for (i = 0; i < argc; ++i)
+ foo();
+ int xa;
+#pragma omp parallel
+#pragma omp for lastprivate(xa) // OK
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for lastprivate(S2::S2s) // expected-error {{shared variable cannot be lastprivate}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for safelen(5) // expected-error {{unexpected OpenMP clause 'safelen' in directive '#pragma omp for'}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for lastprivate(e, g) // expected-error 2 {{lastprivate variable must have an accessible, unambiguous default constructor}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for lastprivate(m) // expected-error {{lastprivate variable must have an accessible, unambiguous copy assignment operator}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for private(xa), lastprivate(xa) // expected-error {{private variable cannot be lastprivate}} expected-note {{defined as private}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for lastprivate(i)
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel private(xa) // expected-note {{defined as private}}
+#pragma omp for lastprivate(xa) // expected-error {{lastprivate variable must be shared}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel reduction(+ : xa) // expected-note {{defined as reduction}}
+#pragma omp for lastprivate(xa) // expected-error {{lastprivate variable must be shared}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for lastprivate(j) // expected-error {{arguments of OpenMP clause 'lastprivate' cannot be of reference type}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for firstprivate(m) lastprivate(m) // expected-error {{lastprivate variable must have an accessible, unambiguous copy assignment operator}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for lastprivate(n) firstprivate(n) // OK
+ for (i = 0; i < argc; ++i)
+ foo();
+ return foomain<S4, S5>(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<S4, S5>' requested here}}
+}
diff --git a/test/OpenMP/for_loop_messages.cpp b/test/OpenMP/for_loop_messages.cpp
new file mode 100644
index 000000000000..8cc882e13a9f
--- /dev/null
+++ b/test/OpenMP/for_loop_messages.cpp
@@ -0,0 +1,694 @@
+// RUN: %clang_cc1 -fsyntax-only -fopenmp=libiomp5 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+
+class S {
+ int a;
+ S() : a(0) {}
+
+public:
+ S(int v) : a(v) {}
+ S(const S &s) : a(s.a) {}
+};
+
+static int sii;
+#pragma omp threadprivate(sii) // expected-note {{defined as threadprivate or thread local}}
+
+int test_iteration_spaces() {
+ const int N = 100;
+ float a[N], b[N], c[N];
+ int ii, jj, kk;
+ float fii;
+ double dii;
+#pragma omp parallel
+#pragma omp for
+ for (int i = 0; i < 10; i += 1) {
+ c[i] = a[i] + b[i];
+ }
+#pragma omp parallel
+#pragma omp for
+ for (char i = 0; i < 10; i++) {
+ c[i] = a[i] + b[i];
+ }
+#pragma omp parallel
+#pragma omp for
+ for (char i = 0; i < 10; i += '\1') {
+ c[i] = a[i] + b[i];
+ }
+#pragma omp parallel
+#pragma omp for
+ for (long long i = 0; i < 10; i++) {
+ c[i] = a[i] + b[i];
+ }
+#pragma omp parallel
+// expected-error@+2 {{expression must have integral or unscoped enumeration type, not 'double'}}
+#pragma omp for
+ for (long long i = 0; i < 10; i += 1.5) {
+ c[i] = a[i] + b[i];
+ }
+#pragma omp parallel
+#pragma omp for
+ for (long long i = 0; i < 'z'; i += 1u) {
+ c[i] = a[i] + b[i];
+ }
+#pragma omp parallel
+// expected-error@+2 {{variable must be of integer or random access iterator type}}
+#pragma omp for
+ for (float fi = 0; fi < 10.0; fi++) {
+ c[(int)fi] = a[(int)fi] + b[(int)fi];
+ }
+#pragma omp parallel
+// expected-error@+2 {{variable must be of integer or random access iterator type}}
+#pragma omp for
+ for (double fi = 0; fi < 10.0; fi++) {
+ c[(int)fi] = a[(int)fi] + b[(int)fi];
+ }
+#pragma omp parallel
+// expected-error@+2 {{variable must be of integer or random access iterator type}}
+#pragma omp for
+ for (int &ref = ii; ref < 10; ref++) {
+ }
+#pragma omp parallel
+// expected-error@+2 {{initialization clause of OpenMP for loop must be of the form 'var = init' or 'T var = init'}}
+#pragma omp for
+ for (int i; i < 10; i++)
+ c[i] = a[i];
+
+#pragma omp parallel
+// expected-error@+2 {{initialization clause of OpenMP for loop must be of the form 'var = init' or 'T var = init'}}
+#pragma omp for
+ for (int i = 0, j = 0; i < 10; ++i)
+ c[i] = a[i];
+
+#pragma omp parallel
+// expected-error@+2 {{initialization clause of OpenMP for loop must be of the form 'var = init' or 'T var = init'}}
+#pragma omp for
+ for (; ii < 10; ++ii)
+ c[ii] = a[ii];
+
+#pragma omp parallel
+// expected-warning@+3 {{expression result unused}}
+// expected-error@+2 {{initialization clause of OpenMP for loop must be of the form 'var = init' or 'T var = init'}}
+#pragma omp for
+ for (ii + 1; ii < 10; ++ii)
+ c[ii] = a[ii];
+
+#pragma omp parallel
+// expected-error@+2 {{initialization clause of OpenMP for loop must be of the form 'var = init' or 'T var = init'}}
+#pragma omp for
+ for (c[ii] = 0; ii < 10; ++ii)
+ c[ii] = a[ii];
+
+#pragma omp parallel
+// Ok to skip parenthesises.
+#pragma omp for
+ for (((ii)) = 0; ii < 10; ++ii)
+ c[ii] = a[ii];
+
+#pragma omp parallel
+// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
+#pragma omp for
+ for (int i = 0; i; i++)
+ c[i] = a[i];
+
+#pragma omp parallel
+// expected-error@+3 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
+// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'i'}}
+#pragma omp for
+ for (int i = 0; jj < kk; ii++)
+ c[i] = a[i];
+
+#pragma omp parallel
+// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
+#pragma omp for
+ for (int i = 0; !!i; i++)
+ c[i] = a[i];
+
+#pragma omp parallel
+// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
+#pragma omp for
+ for (int i = 0; i != 1; i++)
+ c[i] = a[i];
+
+#pragma omp parallel
+// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
+#pragma omp for
+ for (int i = 0;; i++)
+ c[i] = a[i];
+
+#pragma omp parallel
+// Ok.
+#pragma omp for
+ for (int i = 11; i > 10; i--)
+ c[i] = a[i];
+
+#pragma omp parallel
+// Ok.
+#pragma omp for
+ for (int i = 0; i < 10; ++i)
+ c[i] = a[i];
+
+#pragma omp parallel
+// Ok.
+#pragma omp for
+ for (ii = 0; ii < 10; ++ii)
+ c[ii] = a[ii];
+
+#pragma omp parallel
+// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
+#pragma omp for
+ for (ii = 0; ii < 10; ++jj)
+ c[ii] = a[jj];
+
+#pragma omp parallel
+// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
+#pragma omp for
+ for (ii = 0; ii < 10; ++++ii)
+ c[ii] = a[ii];
+
+#pragma omp parallel
+// Ok but undefined behavior (in general, cannot check that incr
+// is really loop-invariant).
+#pragma omp for
+ for (ii = 0; ii < 10; ii = ii + ii)
+ c[ii] = a[ii];
+
+#pragma omp parallel
+// expected-error@+2 {{expression must have integral or unscoped enumeration type, not 'float'}}
+#pragma omp for
+ for (ii = 0; ii < 10; ii = ii + 1.0f)
+ c[ii] = a[ii];
+
+#pragma omp parallel
+// Ok - step was converted to integer type.
+#pragma omp for
+ for (ii = 0; ii < 10; ii = ii + (int)1.1f)
+ c[ii] = a[ii];
+
+#pragma omp parallel
+// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
+#pragma omp for
+ for (ii = 0; ii < 10; jj = ii + 2)
+ c[ii] = a[ii];
+
+#pragma omp parallel
+// expected-warning@+3 {{relational comparison result unused}}
+// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
+#pragma omp for
+ for (ii = 0; ii<10; jj> kk + 2)
+ c[ii] = a[ii];
+
+#pragma omp parallel
+// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
+#pragma omp for
+ for (ii = 0; ii < 10;)
+ c[ii] = a[ii];
+
+#pragma omp parallel
+// expected-warning@+3 {{expression result unused}}
+// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
+#pragma omp for
+ for (ii = 0; ii < 10; !ii)
+ c[ii] = a[ii];
+
+#pragma omp parallel
+// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
+#pragma omp for
+ for (ii = 0; ii < 10; ii ? ++ii : ++jj)
+ c[ii] = a[ii];
+
+#pragma omp parallel
+// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
+#pragma omp for
+ for (ii = 0; ii < 10; ii = ii < 10)
+ c[ii] = a[ii];
+
+#pragma omp parallel
+// expected-note@+3 {{loop step is expected to be positive due to this condition}}
+// expected-error@+2 {{increment expression must cause 'ii' to increase on each iteration of OpenMP for loop}}
+#pragma omp for
+ for (ii = 0; ii < 10; ii = ii + 0)
+ c[ii] = a[ii];
+
+#pragma omp parallel
+// expected-note@+3 {{loop step is expected to be positive due to this condition}}
+// expected-error@+2 {{increment expression must cause 'ii' to increase on each iteration of OpenMP for loop}}
+#pragma omp for
+ for (ii = 0; ii < 10; ii = ii + (int)(0.8 - 0.45))
+ c[ii] = a[ii];
+
+#pragma omp parallel
+// expected-note@+3 {{loop step is expected to be positive due to this condition}}
+// expected-error@+2 {{increment expression must cause 'ii' to increase on each iteration of OpenMP for loop}}
+#pragma omp for
+ for (ii = 0; (ii) < 10; ii -= 25)
+ c[ii] = a[ii];
+
+#pragma omp parallel
+// expected-note@+3 {{loop step is expected to be positive due to this condition}}
+// expected-error@+2 {{increment expression must cause 'ii' to increase on each iteration of OpenMP for loop}}
+#pragma omp for
+ for (ii = 0; (ii < 10); ii -= 0)
+ c[ii] = a[ii];
+
+#pragma omp parallel
+// expected-note@+3 {{loop step is expected to be negative due to this condition}}
+// expected-error@+2 {{increment expression must cause 'ii' to decrease on each iteration of OpenMP for loop}}
+#pragma omp for
+ for (ii = 0; ii > 10; (ii += 0))
+ c[ii] = a[ii];
+
+#pragma omp parallel
+// expected-note@+3 {{loop step is expected to be positive due to this condition}}
+// expected-error@+2 {{increment expression must cause 'ii' to increase on each iteration of OpenMP for loop}}
+#pragma omp for
+ for (ii = 0; ii < 10; (ii) = (1 - 1) + (ii))
+ c[ii] = a[ii];
+
+#pragma omp parallel
+// expected-note@+3 {{loop step is expected to be negative due to this condition}}
+// expected-error@+2 {{increment expression must cause 'ii' to decrease on each iteration of OpenMP for loop}}
+#pragma omp for
+ for ((ii = 0); ii > 10; (ii -= 0))
+ c[ii] = a[ii];
+
+#pragma omp parallel
+// expected-note@+3 {{loop step is expected to be positive due to this condition}}
+// expected-error@+2 {{increment expression must cause 'ii' to increase on each iteration of OpenMP for loop}}
+#pragma omp for
+ for (ii = 0; (ii < 10); (ii -= 0))
+ c[ii] = a[ii];
+
+#pragma omp parallel
+// expected-note@+2 {{defined as firstprivate}}
+// expected-error@+2 {{loop iteration variable in the associated loop of 'omp for' directive may not be firstprivate, predetermined as private}}
+#pragma omp for firstprivate(ii)
+ for (ii = 0; ii < 10; ii++)
+ c[ii] = a[ii];
+
+#pragma omp parallel
+// expected-error@+3 {{unexpected OpenMP clause 'linear' in directive '#pragma omp for'}}
+// expected-note@+2 {{defined as linear}}
+// expected-error@+2 {{loop iteration variable in the associated loop of 'omp for' directive may not be linear, predetermined as private}}
+#pragma omp for linear(ii)
+ for (ii = 0; ii < 10; ii++)
+ c[ii] = a[ii];
+
+#pragma omp parallel
+#pragma omp for private(ii)
+ for (ii = 0; ii < 10; ii++)
+ c[ii] = a[ii];
+
+#pragma omp parallel
+#pragma omp for lastprivate(ii)
+ for (ii = 0; ii < 10; ii++)
+ c[ii] = a[ii];
+
+#pragma omp parallel
+ {
+// expected-error@+2 {{loop iteration variable in the associated loop of 'omp for' directive may not be threadprivate or thread local, predetermined as private}}
+#pragma omp for
+ for (sii = 0; sii < 10; sii += 1)
+ c[sii] = a[sii];
+ }
+
+#pragma omp parallel
+// expected-error@+2 {{statement after '#pragma omp for' must be a for loop}}
+#pragma omp for
+ for (auto &item : a) {
+ item = item + 1;
+ }
+
+#pragma omp parallel
+// expected-note@+3 {{loop step is expected to be positive due to this condition}}
+// expected-error@+2 {{increment expression must cause 'i' to increase on each iteration of OpenMP for loop}}
+#pragma omp for
+ for (unsigned i = 9; i < 10; i--) {
+ c[i] = a[i] + b[i];
+ }
+
+ int(*lb)[4] = nullptr;
+#pragma omp parallel
+#pragma omp for
+ for (int(*p)[4] = lb; p < lb + 8; ++p) {
+ }
+
+#pragma omp parallel
+// expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}}
+#pragma omp for
+ for (int a{0}; a < 10; ++a) {
+ }
+
+ return 0;
+}
+
+// Iterators allowed in openmp for-loops.
+namespace std {
+struct random_access_iterator_tag {};
+template <class Iter>
+struct iterator_traits {
+ typedef typename Iter::difference_type difference_type;
+ typedef typename Iter::iterator_category iterator_category;
+};
+template <class Iter>
+typename iterator_traits<Iter>::difference_type
+distance(Iter first, Iter last) { return first - last; }
+}
+class Iter0 {
+public:
+ Iter0() {}
+ Iter0(const Iter0 &) {}
+ Iter0 operator++() { return *this; }
+ Iter0 operator--() { return *this; }
+ bool operator<(Iter0 a) { return true; }
+};
+int operator-(Iter0 a, Iter0 b) { return 0; }
+class Iter1 {
+public:
+ Iter1(float f = 0.0f, double d = 0.0) {}
+ Iter1(const Iter1 &) {}
+ Iter1 operator++() { return *this; }
+ Iter1 operator--() { return *this; }
+ bool operator<(Iter1 a) { return true; }
+ bool operator>=(Iter1 a) { return false; }
+};
+class GoodIter {
+public:
+ GoodIter() {}
+ GoodIter(const GoodIter &) {}
+ GoodIter(int fst, int snd) {}
+ GoodIter &operator=(const GoodIter &that) { return *this; }
+ GoodIter &operator=(const Iter0 &that) { return *this; }
+ GoodIter &operator+=(int x) { return *this; }
+ explicit GoodIter(void *) {}
+ GoodIter operator++() { return *this; }
+ GoodIter operator--() { return *this; }
+ bool operator!() { return true; }
+ bool operator<(GoodIter a) { return true; }
+ bool operator<=(GoodIter a) { return true; }
+ bool operator>=(GoodIter a) { return false; }
+ typedef int difference_type;
+ typedef std::random_access_iterator_tag iterator_category;
+};
+int operator-(GoodIter a, GoodIter b) { return 0; }
+GoodIter operator-(GoodIter a) { return a; }
+GoodIter operator-(GoodIter a, int v) { return GoodIter(); }
+GoodIter operator+(GoodIter a, int v) { return GoodIter(); }
+GoodIter operator-(int v, GoodIter a) { return GoodIter(); }
+GoodIter operator+(int v, GoodIter a) { return GoodIter(); }
+
+int test_with_random_access_iterator() {
+ GoodIter begin, end;
+ Iter0 begin0, end0;
+#pragma omp parallel
+#pragma omp for
+ for (GoodIter I = begin; I < end; ++I)
+ ++I;
+#pragma omp parallel
+// expected-error@+2 {{variable must be of integer or random access iterator type}}
+#pragma omp for
+ for (GoodIter &I = begin; I < end; ++I)
+ ++I;
+#pragma omp parallel
+#pragma omp for
+ for (GoodIter I = begin; I >= end; --I)
+ ++I;
+#pragma omp parallel
+// expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}}
+#pragma omp for
+ for (GoodIter I(begin); I < end; ++I)
+ ++I;
+#pragma omp parallel
+// expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}}
+#pragma omp for
+ for (GoodIter I(nullptr); I < end; ++I)
+ ++I;
+#pragma omp parallel
+// expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}}
+#pragma omp for
+ for (GoodIter I(0); I < end; ++I)
+ ++I;
+#pragma omp parallel
+// expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}}
+#pragma omp for
+ for (GoodIter I(1, 2); I < end; ++I)
+ ++I;
+#pragma omp parallel
+#pragma omp for
+ for (begin = GoodIter(0); begin < end; ++begin)
+ ++begin;
+#pragma omp parallel
+#pragma omp for
+ for (begin = begin0; begin < end; ++begin)
+ ++begin;
+#pragma omp parallel
+// expected-error@+2 {{initialization clause of OpenMP for loop must be of the form 'var = init' or 'T var = init'}}
+#pragma omp for
+ for (++begin; begin < end; ++begin)
+ ++begin;
+#pragma omp parallel
+#pragma omp for
+ for (begin = end; begin < end; ++begin)
+ ++begin;
+#pragma omp parallel
+// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'I'}}
+#pragma omp for
+ for (GoodIter I = begin; I - I; ++I)
+ ++I;
+#pragma omp parallel
+// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'I'}}
+#pragma omp for
+ for (GoodIter I = begin; begin < end; ++I)
+ ++I;
+#pragma omp parallel
+// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'I'}}
+#pragma omp for
+ for (GoodIter I = begin; !I; ++I)
+ ++I;
+#pragma omp parallel
+// expected-note@+3 {{loop step is expected to be negative due to this condition}}
+// expected-error@+2 {{increment expression must cause 'I' to decrease on each iteration of OpenMP for loop}}
+#pragma omp for
+ for (GoodIter I = begin; I >= end; I = I + 1)
+ ++I;
+#pragma omp parallel
+#pragma omp for
+ for (GoodIter I = begin; I >= end; I = I - 1)
+ ++I;
+#pragma omp parallel
+// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'I'}}
+#pragma omp for
+ for (GoodIter I = begin; I >= end; I = -I)
+ ++I;
+#pragma omp parallel
+// expected-note@+3 {{loop step is expected to be negative due to this condition}}
+// expected-error@+2 {{increment expression must cause 'I' to decrease on each iteration of OpenMP for loop}}
+#pragma omp for
+ for (GoodIter I = begin; I >= end; I = 2 + I)
+ ++I;
+#pragma omp parallel
+// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'I'}}
+#pragma omp for
+ for (GoodIter I = begin; I >= end; I = 2 - I)
+ ++I;
+#pragma omp parallel
+#pragma omp for
+ for (Iter0 I = begin0; I < end0; ++I)
+ ++I;
+#pragma omp parallel
+// Initializer is constructor without params.
+// expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}}
+#pragma omp for
+ for (Iter0 I; I < end0; ++I)
+ ++I;
+ Iter1 begin1, end1;
+#pragma omp parallel
+#pragma omp for
+ for (Iter1 I = begin1; I < end1; ++I)
+ ++I;
+#pragma omp parallel
+// expected-note@+3 {{loop step is expected to be negative due to this condition}}
+// expected-error@+2 {{increment expression must cause 'I' to decrease on each iteration of OpenMP for loop}}
+#pragma omp for
+ for (Iter1 I = begin1; I >= end1; ++I)
+ ++I;
+#pragma omp parallel
+// Initializer is constructor with all default params.
+// expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}}
+#pragma omp for
+ for (Iter1 I; I < end1; ++I) {
+ }
+ return 0;
+}
+
+template <typename IT, int ST>
+class TC {
+public:
+ int dotest_lt(IT begin, IT end) {
+#pragma omp parallel
+// expected-note@+3 {{loop step is expected to be positive due to this condition}}
+// expected-error@+2 {{increment expression must cause 'I' to increase on each iteration of OpenMP for loop}}
+#pragma omp for
+ for (IT I = begin; I < end; I = I + ST) {
+ ++I;
+ }
+#pragma omp parallel
+// expected-note@+3 {{loop step is expected to be positive due to this condition}}
+// expected-error@+2 {{increment expression must cause 'I' to increase on each iteration of OpenMP for loop}}
+#pragma omp for
+ for (IT I = begin; I <= end; I += ST) {
+ ++I;
+ }
+#pragma omp parallel
+#pragma omp for
+ for (IT I = begin; I < end; ++I) {
+ ++I;
+ }
+ }
+
+ static IT step() {
+ return IT(ST);
+ }
+};
+template <typename IT, int ST = 0>
+int dotest_gt(IT begin, IT end) {
+#pragma omp parallel
+// expected-note@+3 2 {{loop step is expected to be negative due to this condition}}
+// expected-error@+2 2 {{increment expression must cause 'I' to decrease on each iteration of OpenMP for loop}}
+#pragma omp for
+ for (IT I = begin; I >= end; I = I + ST) {
+ ++I;
+ }
+#pragma omp parallel
+// expected-note@+3 2 {{loop step is expected to be negative due to this condition}}
+// expected-error@+2 2 {{increment expression must cause 'I' to decrease on each iteration of OpenMP for loop}}
+#pragma omp for
+ for (IT I = begin; I >= end; I += ST) {
+ ++I;
+ }
+
+#pragma omp parallel
+// expected-note@+3 {{loop step is expected to be negative due to this condition}}
+// expected-error@+2 {{increment expression must cause 'I' to decrease on each iteration of OpenMP for loop}}
+#pragma omp for
+ for (IT I = begin; I >= end; ++I) {
+ ++I;
+ }
+
+#pragma omp parallel
+#pragma omp for
+ for (IT I = begin; I < end; I += TC<int, ST>::step()) {
+ ++I;
+ }
+}
+
+void test_with_template() {
+ GoodIter begin, end;
+ TC<GoodIter, 100> t1;
+ TC<GoodIter, -100> t2;
+ t1.dotest_lt(begin, end);
+ t2.dotest_lt(begin, end); // expected-note {{in instantiation of member function 'TC<GoodIter, -100>::dotest_lt' requested here}}
+ dotest_gt(begin, end); // expected-note {{in instantiation of function template specialization 'dotest_gt<GoodIter, 0>' requested here}}
+ dotest_gt<unsigned, -10>(0, 100); // expected-note {{in instantiation of function template specialization 'dotest_gt<unsigned int, -10>' requested here}}
+}
+
+void test_loop_break() {
+ const int N = 100;
+ float a[N], b[N], c[N];
+#pragma omp parallel
+#pragma omp for
+ for (int i = 0; i < 10; i++) {
+ c[i] = a[i] + b[i];
+ for (int j = 0; j < 10; ++j) {
+ if (a[i] > b[j])
+ break; // OK in nested loop
+ }
+ switch (i) {
+ case 1:
+ b[i]++;
+ break;
+ default:
+ break;
+ }
+ if (c[i] > 10)
+ break; // expected-error {{'break' statement cannot be used in OpenMP for loop}}
+
+ if (c[i] > 11)
+ break; // expected-error {{'break' statement cannot be used in OpenMP for loop}}
+ }
+
+#pragma omp parallel
+#pragma omp for
+ for (int i = 0; i < 10; i++) {
+ for (int j = 0; j < 10; j++) {
+ c[i] = a[i] + b[i];
+ if (c[i] > 10) {
+ if (c[i] < 20) {
+ break; // OK
+ }
+ }
+ }
+ }
+}
+
+void test_loop_eh() {
+ const int N = 100;
+ float a[N], b[N], c[N];
+#pragma omp parallel
+#pragma omp for
+ for (int i = 0; i < 10; i++) {
+ c[i] = a[i] + b[i];
+ try {
+ for (int j = 0; j < 10; ++j) {
+ if (a[i] > b[j])
+ throw a[i];
+ }
+ throw a[i];
+ } catch (float f) {
+ if (f > 0.1)
+ throw a[i];
+ return; // expected-error {{cannot return from OpenMP region}}
+ }
+ switch (i) {
+ case 1:
+ b[i]++;
+ break;
+ default:
+ break;
+ }
+ for (int j = 0; j < 10; j++) {
+ if (c[i] > 10)
+ throw c[i];
+ }
+ }
+ if (c[9] > 10)
+ throw c[9]; // OK
+
+#pragma omp parallel
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+ struct S {
+ void g() { throw 0; }
+ };
+ }
+}
+
+void test_loop_firstprivate_lastprivate() {
+ S s(4);
+#pragma omp parallel
+#pragma omp for lastprivate(s) firstprivate(s)
+ for (int i = 0; i < 16; ++i)
+ ;
+}
+
+void test_ordered() {
+#pragma omp parallel
+#pragma omp for ordered ordered // expected-error {{directive '#pragma omp for' cannot contain more than one 'ordered' clause}}
+ for (int i = 0; i < 16; ++i)
+ ;
+}
+
+void test_nowait() {
+#pragma omp parallel
+#pragma omp for nowait nowait // expected-error {{directive '#pragma omp for' cannot contain more than one 'nowait' clause}}
+ for (int i = 0; i < 16; ++i)
+ ;
+}
diff --git a/test/OpenMP/for_misc_messages.c b/test/OpenMP/for_misc_messages.c
new file mode 100644
index 000000000000..854898c04432
--- /dev/null
+++ b/test/OpenMP/for_misc_messages.c
@@ -0,0 +1,363 @@
+// RUN: %clang_cc1 -fsyntax-only -fopenmp=libiomp5 -verify %s
+
+// expected-error@+1 {{unexpected OpenMP directive '#pragma omp for'}}
+#pragma omp for
+
+// expected-error@+1 {{unexpected OpenMP directive '#pragma omp for'}}
+#pragma omp for foo
+
+void test_no_clause() {
+ int i;
+#pragma omp for
+ for (i = 0; i < 16; ++i)
+ ;
+
+// expected-error@+2 {{statement after '#pragma omp for' must be a for loop}}
+#pragma omp for
+ ++i;
+}
+
+void test_branch_protected_scope() {
+ int i = 0;
+L1:
+ ++i;
+
+ int x[24];
+
+#pragma omp parallel
+#pragma omp for
+ for (i = 0; i < 16; ++i) {
+ if (i == 5)
+ goto L1; // expected-error {{use of undeclared label 'L1'}}
+ else if (i == 6)
+ return; // expected-error {{cannot return from OpenMP region}}
+ else if (i == 7)
+ goto L2;
+ else if (i == 8) {
+ L2:
+ x[i]++;
+ }
+ }
+
+ if (x[0] == 0)
+ goto L2; // expected-error {{use of undeclared label 'L2'}}
+ else if (x[1] == 1)
+ goto L1;
+}
+
+void test_invalid_clause() {
+ int i;
+#pragma omp parallel
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp for' are ignored}}
+#pragma omp for foo bar
+ for (i = 0; i < 16; ++i)
+ ;
+}
+
+void test_non_identifiers() {
+ int i, x;
+
+#pragma omp parallel
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp for' are ignored}}
+#pragma omp for;
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+// expected-error@+2 {{unexpected OpenMP clause 'linear' in directive '#pragma omp for'}}
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp for' are ignored}}
+#pragma omp for linear(x);
+ for (i = 0; i < 16; ++i)
+ ;
+
+#pragma omp parallel
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp for' are ignored}}
+#pragma omp for private(x);
+ for (i = 0; i < 16; ++i)
+ ;
+
+#pragma omp parallel
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp for' are ignored}}
+#pragma omp for, private(x);
+ for (i = 0; i < 16; ++i)
+ ;
+}
+
+extern int foo();
+
+void test_collapse() {
+ int i;
+#pragma omp parallel
+// expected-error@+1 {{expected '('}}
+#pragma omp for collapse
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+// expected-error@+1 {{expected expression}} expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+#pragma omp for collapse(
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+// expected-error@+1 {{expected expression}}
+#pragma omp for collapse()
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+// expected-error@+1 {{expected expression}} expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+#pragma omp for collapse(,
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+// expected-error@+1 {{expected expression}} expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+#pragma omp for collapse(, )
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+// expected-warning@+2 {{extra tokens at the end of '#pragma omp for' are ignored}}
+// expected-error@+1 {{expected '('}}
+#pragma omp for collapse 4)
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+// expected-error@+2 {{expected ')'}}
+// expected-note@+1 {{to match this '('}} expected-note@+1 {{as specified in 'collapse' clause}}
+#pragma omp for collapse(4
+ for (i = 0; i < 16; ++i)
+ ; // expected-error {{expected 4 for loops after '#pragma omp for', but found only 1}}
+#pragma omp parallel
+// expected-error@+2 {{expected ')'}}
+// expected-note@+1 {{to match this '('}} expected-note@+1 {{as specified in 'collapse' clause}}
+#pragma omp for collapse(4,
+ for (i = 0; i < 16; ++i)
+ ; // expected-error {{expected 4 for loops after '#pragma omp for', but found only 1}}
+#pragma omp parallel
+// expected-error@+2 {{expected ')'}}
+// expected-note@+1 {{to match this '('}} expected-note@+1 {{as specified in 'collapse' clause}}
+#pragma omp for collapse(4, )
+ for (i = 0; i < 16; ++i)
+ ; // expected-error {{expected 4 for loops after '#pragma omp for', but found only 1}}
+#pragma omp parallel
+// expected-note@+1 {{as specified in 'collapse' clause}}
+#pragma omp for collapse(4)
+ for (i = 0; i < 16; ++i)
+ ; // expected-error {{expected 4 for loops after '#pragma omp for', but found only 1}}
+#pragma omp parallel
+// expected-error@+2 {{expected ')'}}
+// expected-note@+1 {{to match this '('}} expected-note@+1 {{as specified in 'collapse' clause}}
+#pragma omp for collapse(4 4)
+ for (i = 0; i < 16; ++i)
+ ; // expected-error {{expected 4 for loops after '#pragma omp for', but found only 1}}
+#pragma omp parallel
+// expected-error@+2 {{expected ')'}}
+// expected-note@+1 {{to match this '('}} expected-note@+1 {{as specified in 'collapse' clause}}
+#pragma omp for collapse(4, , 4)
+ for (i = 0; i < 16; ++i)
+ ; // expected-error {{expected 4 for loops after '#pragma omp for', but found only 1}}
+#pragma omp parallel
+#pragma omp for collapse(4)
+ for (int i1 = 0; i1 < 16; ++i1)
+ for (int i2 = 0; i2 < 16; ++i2)
+ for (int i3 = 0; i3 < 16; ++i3)
+ for (int i4 = 0; i4 < 16; ++i4)
+ foo();
+#pragma omp parallel
+// expected-error@+2 {{expected ')'}}
+// expected-note@+1 {{to match this '('}} expected-note@+1 {{as specified in 'collapse' clause}}
+#pragma omp for collapse(4, 8)
+ for (i = 0; i < 16; ++i)
+ ; // expected-error {{expected 4 for loops after '#pragma omp for', but found only 1}}
+#pragma omp parallel
+// expected-error@+1 {{expression is not an integer constant expression}}
+#pragma omp for collapse(2.5)
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+// expected-error@+1 {{expression is not an integer constant expression}}
+#pragma omp for collapse(foo())
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+// expected-error@+1 {{argument to 'collapse' clause must be a positive integer value}}
+#pragma omp for collapse(-5)
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+// expected-error@+1 {{argument to 'collapse' clause must be a positive integer value}}
+#pragma omp for collapse(0)
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+// expected-error@+1 {{argument to 'collapse' clause must be a positive integer value}}
+#pragma omp for collapse(5 - 5)
+ for (i = 0; i < 16; ++i)
+ ;
+}
+
+void test_private() {
+ int i;
+#pragma omp parallel
+// expected-error@+2 {{expected expression}}
+// expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+#pragma omp for private(
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+// expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+// expected-error@+1 2 {{expected expression}}
+#pragma omp for private(,
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+// expected-error@+1 2 {{expected expression}}
+#pragma omp for private(, )
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+// expected-error@+1 {{expected expression}}
+#pragma omp for private()
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+// expected-error@+1 {{expected expression}}
+#pragma omp for private(int)
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+// expected-error@+1 {{expected variable name}}
+#pragma omp for private(0)
+ for (i = 0; i < 16; ++i)
+ ;
+
+ int x, y, z;
+#pragma omp parallel
+#pragma omp for private(x)
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+#pragma omp for private(x, y)
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+#pragma omp for private(x, y, z)
+ for (i = 0; i < 16; ++i) {
+ x = y * i + z;
+ }
+}
+
+void test_lastprivate() {
+ int i;
+#pragma omp parallel
+// expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+// expected-error@+1 {{expected expression}}
+#pragma omp for lastprivate(
+ for (i = 0; i < 16; ++i)
+ ;
+
+#pragma omp parallel
+// expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+// expected-error@+1 2 {{expected expression}}
+#pragma omp for lastprivate(,
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+// expected-error@+1 2 {{expected expression}}
+#pragma omp for lastprivate(, )
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+// expected-error@+1 {{expected expression}}
+#pragma omp for lastprivate()
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+// expected-error@+1 {{expected expression}}
+#pragma omp for lastprivate(int)
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+// expected-error@+1 {{expected variable name}}
+#pragma omp for lastprivate(0)
+ for (i = 0; i < 16; ++i)
+ ;
+
+ int x, y, z;
+#pragma omp parallel
+#pragma omp for lastprivate(x)
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+#pragma omp for lastprivate(x, y)
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+#pragma omp for lastprivate(x, y, z)
+ for (i = 0; i < 16; ++i)
+ ;
+}
+
+void test_firstprivate() {
+ int i;
+#pragma omp parallel
+// expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+// expected-error@+1 {{expected expression}}
+#pragma omp for firstprivate(
+ for (i = 0; i < 16; ++i)
+ ;
+
+#pragma omp parallel
+// expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+// expected-error@+1 2 {{expected expression}}
+#pragma omp for firstprivate(,
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+// expected-error@+1 2 {{expected expression}}
+#pragma omp for firstprivate(, )
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+// expected-error@+1 {{expected expression}}
+#pragma omp for firstprivate()
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+// expected-error@+1 {{expected expression}}
+#pragma omp for firstprivate(int)
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+// expected-error@+1 {{expected variable name}}
+#pragma omp for firstprivate(0)
+ for (i = 0; i < 16; ++i)
+ ;
+
+ int x, y, z;
+#pragma omp parallel
+#pragma omp for lastprivate(x) firstprivate(x)
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+#pragma omp for lastprivate(x, y) firstprivate(x, y)
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel
+#pragma omp for lastprivate(x, y, z) firstprivate(x, y, z)
+ for (i = 0; i < 16; ++i)
+ ;
+}
+
+void test_loop_messages() {
+ float a[100], b[100], c[100];
+#pragma omp parallel
+// expected-error@+2 {{variable must be of integer or pointer type}}
+#pragma omp for
+ for (float fi = 0; fi < 10.0; fi++) {
+ c[(int)fi] = a[(int)fi] + b[(int)fi];
+ }
+#pragma omp parallel
+// expected-error@+2 {{variable must be of integer or pointer type}}
+#pragma omp for
+ for (double fi = 0; fi < 10.0; fi++) {
+ c[(int)fi] = a[(int)fi] + b[(int)fi];
+ }
+}
+
diff --git a/test/OpenMP/for_private_messages.cpp b/test/OpenMP/for_private_messages.cpp
new file mode 100644
index 000000000000..f7a497930d01
--- /dev/null
+++ b/test/OpenMP/for_private_messages.cpp
@@ -0,0 +1,173 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+
+public:
+ S2() : a(0) {}
+};
+const S2 b;
+const S2 ba[5];
+class S3 {
+ int a;
+
+public:
+ S3() : a(0) {}
+};
+const S3 ca[5];
+class S4 { // expected-note {{'S4' declared here}}
+ int a;
+ S4();
+
+public:
+ S4(int v) : a(v) {}
+};
+class S5 { // expected-note {{'S5' declared here}}
+ int a;
+ S5() : a(0) {}
+
+public:
+ S5(int v) : a(v) {}
+};
+
+S3 h;
+#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
+
+template <class I, class C>
+int foomain(I argc, C **argv) {
+ I e(4);
+ I g(5);
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp for private // expected-error {{expected '(' after 'private'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for private( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for private() // expected-error {{expected expression}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for private(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for private(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for private(argc)
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for private(S1) // expected-error {{'S1' does not refer to a value}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for private(a, b) // expected-error {{private variable with incomplete type 'S1'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for private(argv[1]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for private(e, g)
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for private(h) // expected-error {{threadprivate or thread local variable cannot be private}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for shared(i) // expected-error {{unexpected OpenMP clause 'shared' in directive '#pragma omp for'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+ {
+ int v = 0;
+ int i;
+#pragma omp for private(i)
+ for (int k = 0; k < argc; ++k) {
+ i = k;
+ v += i;
+ }
+ }
+#pragma omp parallel shared(i)
+#pragma omp parallel private(i)
+#pragma omp for private(j) // expected-error {{arguments of OpenMP clause 'private' cannot be of reference type}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for private(i)
+ for (int k = 0; k < argc; ++k)
+ ++k;
+ return 0;
+}
+
+int main(int argc, char **argv) {
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note {{'g' defined here}}
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp for private // expected-error {{expected '(' after 'private'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for private( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for private() // expected-error {{expected expression}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for private(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for private(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for private(argc)
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for private(S1) // expected-error {{'S1' does not refer to a value}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for private(a, b) // expected-error {{private variable with incomplete type 'S1'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for private(argv[1]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for private(e, g) // expected-error 2 {{private variable must have an accessible, unambiguous default constructor}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for private(h) // expected-error {{threadprivate or thread local variable cannot be private}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for shared(i) // expected-error {{unexpected OpenMP clause 'shared' in directive '#pragma omp for'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+ {
+ int i;
+#pragma omp for private(i)
+ for (int k = 0; k < argc; ++k)
+ ++k;
+ }
+#pragma omp parallel shared(i)
+#pragma omp parallel private(i)
+#pragma omp for private(j) // expected-error {{arguments of OpenMP clause 'private' cannot be of reference type}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp for private(i)
+ for (int k = 0; k < argc; ++k)
+ ++k;
+
+ return 0;
+}
+
diff --git a/test/OpenMP/for_reduction_messages.cpp b/test/OpenMP/for_reduction_messages.cpp
new file mode 100644
index 000000000000..62fee52e4903
--- /dev/null
+++ b/test/OpenMP/for_reduction_messages.cpp
@@ -0,0 +1,350 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -o - %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}} expected-note 4 {{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+ S2 &operator+=(const S2 &arg) { return (*this); }
+
+public:
+ S2() : a(0) {}
+ S2(S2 &s2) : a(s2.a) {}
+ static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
+ static const float S2sc;
+};
+const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+S2 b; // expected-note 2 {{'b' defined here}}
+const S2 ba[5]; // expected-note 2 {{'ba' defined here}}
+class S3 {
+ int a;
+
+public:
+ S3() : a(0) {}
+ S3(const S3 &s3) : a(s3.a) {}
+ S3 operator+=(const S3 &arg1) { return arg1; }
+};
+int operator+=(const S3 &arg1, const S3 &arg2) { return 5; }
+S3 c; // expected-note 2 {{'c' defined here}}
+const S3 ca[5]; // expected-note 2 {{'ca' defined here}}
+extern const int f; // expected-note 4 {{'f' declared here}}
+class S4 { // expected-note {{'S4' declared here}}
+ int a;
+ S4();
+ S4(const S4 &s4);
+ S4 &operator+=(const S4 &arg) { return (*this); }
+
+public:
+ S4(int v) : a(v) {}
+};
+S4 &operator&=(S4 &arg1, S4 &arg2) { return arg1; }
+class S5 {
+ int a;
+ S5() : a(0) {}
+ S5(const S5 &s5) : a(s5.a) {}
+ S5 &operator+=(const S5 &arg);
+
+public:
+ S5(int v) : a(v) {}
+};
+class S6 {
+ int a;
+
+public:
+ S6() : a(6) {}
+ operator int() { return 6; }
+} o; // expected-note 2 {{'o' defined here}}
+
+S3 h, k;
+#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
+
+template <class T> // expected-note {{declared here}}
+T tmain(T argc) { // expected-note 2 {{'argc' defined here}}
+ const T d = T(); // expected-note 4 {{'d' defined here}}
+ const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
+ T qa[5] = {T()};
+ T i;
+ T &j = i; // expected-note 4 {{'j' defined here}}
+ S3 &p = k; // expected-note 2 {{'p' defined here}}
+ const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
+ T &q = qa[(int)i]; // expected-note 2 {{'q' defined here}}
+ T fl; // expected-note {{'fl' defined here}}
+#pragma omp parallel
+#pragma omp for reduction // expected-error {{expected '(' after 'reduction'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction + // expected-error {{expected '(' after 'reduction'}} expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction( // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(- // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction() // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(*) // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(\) // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(& : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{variable of type 'float' is not valid for specified reduction operation}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(| : argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{variable of type 'float' is not valid for specified reduction operation}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(|| : argc ? i : argc) // expected-error 2 {{expected variable name}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(foo : argc) //expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(&& : argc)
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(^ : T) // expected-error {{'T' does not refer to a value}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(+ : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(min : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(max : qa[1]) // expected-error 2 {{expected variable name}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(+ : ba) // expected-error {{a reduction variable with array type 'const S2 [5]'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(* : ca) // expected-error {{a reduction variable with array type 'const S3 [5]'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(- : da) // expected-error {{a reduction variable with array type 'const int [5]'}} expected-error {{a reduction variable with array type 'const float [5]'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(^ : fl) // expected-error {{variable of type 'float' is not valid for specified reduction operation}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(+ : o) // expected-error {{variable of type 'class S6' is not valid for specified reduction operation}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for private(i), reduction(+ : j), reduction(+ : q) // expected-error 4 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel private(k)
+#pragma omp for reduction(+ : p), reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(+ : p), reduction(+ : p) // expected-error 3 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 3 {{previously referenced here}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel shared(i)
+#pragma omp parallel reduction(min : i)
+#pragma omp for reduction(max : j) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel private(fl) // expected-note 2 {{defined as private}}
+#pragma omp for reduction(+ : fl) // expected-error 2 {{reduction variable must be shared}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel reduction(* : fl) // expected-note 2 {{defined as reduction}}
+#pragma omp for reduction(+ : fl) // expected-error 2 {{reduction variable must be shared}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+
+ return T();
+}
+
+int main(int argc, char **argv) {
+ const int d = 5; // expected-note 2 {{'d' defined here}}
+ const int da[5] = {0}; // expected-note {{'da' defined here}}
+ int qa[5] = {0};
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note {{'g' defined here}}
+ int i;
+ int &j = i; // expected-note 2 {{'j' defined here}}
+ S3 &p = k; // expected-note 2 {{'p' defined here}}
+ const int &r = da[i]; // expected-note {{'r' defined here}}
+ int &q = qa[i]; // expected-note {{'q' defined here}}
+ float fl; // expected-note {{'fl' defined here}}
+#pragma omp parallel
+#pragma omp for reduction // expected-error {{expected '(' after 'reduction'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction + // expected-error {{expected '(' after 'reduction'}} expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction( // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(- // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction() // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(*) // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(\) // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(foo : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(| : argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(|| : argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(~ : argc) // expected-error {{expected unqualified-id}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(&& : argc)
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(+ : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(min : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(max : argv[1]) // expected-error {{expected variable name}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(+ : ba) // expected-error {{a reduction variable with array type 'const S2 [5]'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(* : ca) // expected-error {{a reduction variable with array type 'const S3 [5]'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(- : da) // expected-error {{a reduction variable with array type 'const int [5]'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(^ : fl) // expected-error {{variable of type 'float' is not valid for specified reduction operation}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(& : e, g) // expected-error {{reduction variable must have an accessible, unambiguous default constructor}} expected-error {{variable of type 'S5' is not valid for specified reduction operation}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(+ : o) // expected-error {{variable of type 'class S6' is not valid for specified reduction operation}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for private(i), reduction(+ : j), reduction(+ : q) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel private(k)
+#pragma omp for reduction(+ : p), reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel shared(i)
+#pragma omp parallel reduction(min : i)
+#pragma omp for reduction(max : j) // expected-error {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel private(fl) // expected-note {{defined as private}}
+#pragma omp for reduction(+ : fl) // expected-error {{reduction variable must be shared}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel reduction(* : fl) // expected-note {{defined as reduction}}
+#pragma omp for reduction(+ : fl) // expected-error {{reduction variable must be shared}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+
+ return tmain(argc) + tmain(fl); // expected-note {{in instantiation of function template specialization 'tmain<int>' requested here}} expected-note {{in instantiation of function template specialization 'tmain<float>' requested here}}
+}
diff --git a/test/OpenMP/for_schedule_messages.cpp b/test/OpenMP/for_schedule_messages.cpp
new file mode 100644
index 000000000000..be4ff4f70349
--- /dev/null
+++ b/test/OpenMP/for_schedule_messages.cpp
@@ -0,0 +1,91 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}}
+
+template <class T, typename S, int N, int ST> // expected-note {{declared here}}
+T tmain(T argc, S **argv) {
+ #pragma omp for schedule // expected-error {{expected '(' after 'schedule'}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto' or 'runtime' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp for schedule () // expected-error {{expected 'static', 'dynamic', 'guided', 'auto' or 'runtime' in OpenMP clause 'schedule'}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp for schedule (auto // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp for schedule (auto_dynamic // expected-error {{expected 'static', 'dynamic', 'guided', 'auto' or 'runtime' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp for schedule (auto, // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp for schedule (runtime, 3) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ // expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+ #pragma omp for schedule (guided argc
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ // expected-error@+1 2 {{argument to 'schedule' clause must be a positive integer value}}
+ #pragma omp for schedule (static, ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp for schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp for schedule (guided, (ST > 0) ? 1 + ST : 2)
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ // expected-error@+2 2 {{directive '#pragma omp for' cannot contain more than one 'schedule' clause}}
+ // expected-error@+1 {{argument to 'schedule' clause must be a positive integer value}}
+ #pragma omp for schedule (static, foobool(argc)), schedule (dynamic, true), schedule (guided, -5)
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp for schedule (static, S) // expected-error {{'S' does not refer to a value}} expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ // expected-error@+1 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
+ #pragma omp for schedule (guided, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp for schedule (dynamic, 1)
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp for schedule (static, N) // expected-error {{argument to 'schedule' clause must be a positive integer value}}
+ for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ return argc;
+}
+
+int main(int argc, char **argv) {
+ #pragma omp for schedule // expected-error {{expected '(' after 'schedule'}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto' or 'runtime' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp for schedule () // expected-error {{expected 'static', 'dynamic', 'guided', 'auto' or 'runtime' in OpenMP clause 'schedule'}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp for schedule (auto // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp for schedule (auto_dynamic // expected-error {{expected 'static', 'dynamic', 'guided', 'auto' or 'runtime' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp for schedule (auto, // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp for schedule (runtime, 3) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp for schedule (guided, 4 // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp for schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp for schedule (dynamic, foobool(1) > 0 ? 1 : 2)
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ // expected-error@+2 2 {{directive '#pragma omp for' cannot contain more than one 'schedule' clause}}
+ // expected-error@+1 {{argument to 'schedule' clause must be a positive integer value}}
+ #pragma omp for schedule (guided, foobool(argc)), schedule (static, true), schedule (dynamic, -5)
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp for schedule (guided, S1) // expected-error {{'S1' does not refer to a value}} expected-warning {{extra tokens at the end of '#pragma omp for' are ignored}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ // expected-error@+1 {{expression must have integral or unscoped enumeration type, not 'char *'}}
+ #pragma omp for schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ // expected-error@+3 {{statement after '#pragma omp for' must be a for loop}}
+ // expected-note@+1 {{in instantiation of function template specialization 'tmain<int, char, -1, -2>' requested here}}
+ #pragma omp for schedule(dynamic, schedule(tmain<int, char, -1, -2>(argc, argv) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+ // expected-note@+1 {{in instantiation of function template specialization 'tmain<int, char, 1, 0>' requested here}}
+ return tmain<int, char, 1, 0>(argc, argv);
+}
+
diff --git a/test/OpenMP/linking.c b/test/OpenMP/linking.c
index 31fd57de9267..979ba1f4e41e 100644
--- a/test/OpenMP/linking.c
+++ b/test/OpenMP/linking.c
@@ -1,5 +1,5 @@
// Test the that the driver produces reasonable linker invocations with
-// -fopenmp.
+// -fopenmp or -fopenmp=libiomp5|libgomp.
//
// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
// RUN: -fopenmp -target i386-unknown-linux \
@@ -14,3 +14,58 @@
// CHECK-LD-64: "{{.*}}ld{{(.exe)?}}"
// CHECK-LD-64: "-lgomp" "-lrt" "-lgcc"
// CHECK-LD-64: "-lpthread" "-lc"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -fopenmp=libgomp -target i386-unknown-linux \
+// RUN: | FileCheck --check-prefix=CHECK-GOMP-LD-32 %s
+// CHECK-GOMP-LD-32: "{{.*}}ld{{(.exe)?}}"
+// CHECK-GOMP-LD-32: "-lgomp" "-lrt" "-lgcc"
+// CHECK-GOMP-LD-32: "-lpthread" "-lc"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -fopenmp=libgomp -target x86_64-unknown-linux \
+// RUN: | FileCheck --check-prefix=CHECK-GOMP-LD-64 %s
+// CHECK-GOMP-LD-64: "{{.*}}ld{{(.exe)?}}"
+// CHECK-GOMP-LD-64: "-lgomp" "-lrt" "-lgcc"
+// CHECK-GOMP-LD-64: "-lpthread" "-lc"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -fopenmp=libiomp5 -target i386-unknown-linux \
+// RUN: | FileCheck --check-prefix=CHECK-IOMP5-LD-32 %s
+// CHECK-IOMP5-LD-32: "{{.*}}ld{{(.exe)?}}"
+// CHECK-IOMP5-LD-32: "-liomp5" "-lgcc"
+// CHECK-IOMP5-LD-32: "-lpthread" "-lc"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -fopenmp=libiomp5 -target x86_64-unknown-linux \
+// RUN: | FileCheck --check-prefix=CHECK-IOMP5-LD-64 %s
+// CHECK-IOMP5-LD-64: "{{.*}}ld{{(.exe)?}}"
+// CHECK-IOMP5-LD-64: "-liomp5" "-lgcc"
+// CHECK-IOMP5-LD-64: "-lpthread" "-lc"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -fopenmp=lib -target i386-unknown-linux \
+// RUN: | FileCheck --check-prefix=CHECK-LIB-LD-32 %s
+// CHECK-LIB-LD-32: error: unsupported argument 'lib' to option 'fopenmp='
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -fopenmp=lib -target x86_64-unknown-linux \
+// RUN: | FileCheck --check-prefix=CHECK-LIB-LD-64 %s
+// CHECK-LIB-LD-64: error: unsupported argument 'lib' to option 'fopenmp='
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -fopenmp -fopenmp=libiomp5 -target i386-unknown-linux \
+// RUN: | FileCheck --check-prefix=CHECK-LD-WARN-32 %s
+// CHECK-LD-WARN-32: warning: argument unused during compilation: '-fopenmp=libiomp5'
+// CHECK-LD-WARN-32: "{{.*}}ld{{(.exe)?}}"
+// CHECK-LD-WARN-32: "-lgomp" "-lrt" "-lgcc"
+// CHECK-LD-WARN-32: "-lpthread" "-lc"
+//
+// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -fopenmp -fopenmp=libiomp5 -target x86_64-unknown-linux \
+// RUN: | FileCheck --check-prefix=CHECK-LD-WARN-64 %s
+// CHECK-LD-WARN-64: warning: argument unused during compilation: '-fopenmp=libiomp5'
+// CHECK-LD-WARN-64: "{{.*}}ld{{(.exe)?}}"
+// CHECK-LD-WARN-64: "-lgomp" "-lrt" "-lgcc"
+// CHECK-LD-WARN-64: "-lpthread" "-lc"
+//
diff --git a/test/OpenMP/master_ast_print.cpp b/test/OpenMP/master_ast_print.cpp
new file mode 100644
index 000000000000..7ce4c10020c0
--- /dev/null
+++ b/test/OpenMP/master_ast_print.cpp
@@ -0,0 +1,32 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ast-print %s | FileCheck %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -emit-pch -o %t %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
+// expected-no-diagnostics
+
+#ifndef HEADER
+#define HEADER
+
+void foo() {}
+
+int main (int argc, char **argv) {
+ int b = argc, c, d, e, f, g;
+ static int a;
+// CHECK: static int a;
+#pragma omp parallel
+{
+#pragma omp master
+{
+ a=2;
+}
+}
+// CHECK-NEXT: #pragma omp parallel
+// CHECK-NEXT: {
+// CHECK-NEXT: #pragma omp master
+// CHECK-NEXT: {
+// CHECK-NEXT: a = 2;
+// CHECK-NEXT: }
+// CHECK-NEXT: }
+ return (0);
+}
+
+#endif
diff --git a/test/OpenMP/master_messages.cpp b/test/OpenMP/master_messages.cpp
new file mode 100644
index 000000000000..fbe35ac68e4a
--- /dev/null
+++ b/test/OpenMP/master_messages.cpp
@@ -0,0 +1,64 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+int foo();
+
+int main() {
+ #pragma omp master
+ ;
+ #pragma omp master nowait // expected-error {{unexpected OpenMP clause 'nowait' in directive '#pragma omp master'}}
+ #pragma omp master unknown // expected-warning {{extra tokens at the end of '#pragma omp master' are ignored}}
+ foo();
+ {
+ #pragma omp master
+ } // expected-error {{expected statement}}
+ #pragma omp for
+ for (int i = 0; i < 10; ++i) {
+ foo();
+ #pragma omp master // expected-error {{region cannot be closely nested inside 'for' region}}
+ foo();
+ }
+ #pragma omp sections
+ {
+ foo();
+ #pragma omp master // expected-error {{region cannot be closely nested inside 'sections' region}}
+ foo();
+ }
+ #pragma omp single
+ for (int i = 0; i < 10; ++i) {
+ foo();
+ #pragma omp master // expected-error {{region cannot be closely nested inside 'single' region}}
+ foo();
+ }
+ #pragma omp master
+ for (int i = 0; i < 10; ++i) {
+ foo();
+ #pragma omp master
+ foo();
+ }
+ #pragma omp for ordered
+ for (int i = 0; i < 10; ++i)
+ #pragma omp master // expected-error {{region cannot be closely nested inside 'for' region}}
+ {
+ foo();
+ }
+
+ return 0;
+}
+
+int foo() {
+ L1:
+ foo();
+ #pragma omp master
+ {
+ foo();
+ goto L1; // expected-error {{use of undeclared label 'L1'}}
+ }
+ goto L2; // expected-error {{use of undeclared label 'L2'}}
+ #pragma omp master
+ {
+ L2:
+ foo();
+ }
+
+ return 0;
+}
diff --git a/test/OpenMP/nesting_of_regions.cpp b/test/OpenMP/nesting_of_regions.cpp
new file mode 100644
index 000000000000..d8dcec5edf2e
--- /dev/null
+++ b/test/OpenMP/nesting_of_regions.cpp
@@ -0,0 +1,2278 @@
+// RUN: %clang_cc1 -fsyntax-only -fopenmp=libiomp5 -verify %s
+
+void bar();
+
+template <class T>
+void foo() {
+// PARALLEL DIRECTIVE
+#pragma omp parallel
+#pragma omp for
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp parallel
+#pragma omp simd
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp parallel
+#pragma omp sections
+ {
+ bar();
+ }
+#pragma omp parallel
+#pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a parallel region}}
+ {
+ bar();
+ }
+#pragma omp parallel
+#pragma omp single
+ bar();
+
+#pragma omp parallel
+#pragma omp master
+ {
+ bar();
+ }
+#pragma omp parallel
+#pragma omp critical
+ {
+ bar();
+ }
+#pragma omp parallel
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp parallel
+#pragma omp parallel sections
+ {
+ bar();
+ }
+#pragma omp parallel
+#pragma omp task
+ {
+ bar();
+ }
+#pragma omp parallel
+ {
+#pragma omp taskyield
+ bar();
+ }
+#pragma omp parallel
+ {
+#pragma omp barrier
+ bar();
+ }
+#pragma omp parallel
+ {
+#pragma omp taskwait
+ bar();
+ }
+#pragma omp parallel
+ {
+#pragma omp flush
+ bar();
+ }
+
+// SIMD DIRECTIVE
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ {
+ bar();
+ }
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp section // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ {
+ bar();
+ }
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp single // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ {
+ bar();
+ }
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp master // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ {
+ bar();
+ }
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp critical // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ {
+ bar();
+ }
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp parallel sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ {
+ bar();
+ }
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp task // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ {
+ bar();
+ }
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp taskyield // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ bar();
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp barrier // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ bar();
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp taskwait // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ bar();
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp flush // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ bar();
+ }
+
+// FOR DIRECTIVE
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp for // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp simd
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp parallel
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp sections // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
+ {
+ bar();
+ }
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a for region}}
+ {
+ bar();
+ }
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp single // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
+ {
+ bar();
+ }
+ }
+
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp master // expected-error {{region cannot be closely nested inside 'for' region}}
+ {
+ bar();
+ }
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp critical
+ {
+ bar();
+ }
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp parallel
+ {
+#pragma omp single // OK
+ {
+ bar();
+ }
+#pragma omp for // OK
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp sections // OK
+ {
+ bar();
+ }
+ }
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp parallel sections
+ {
+ bar();
+ }
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp task
+ {
+ bar();
+ }
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp taskyield
+ bar();
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp barrier // expected-error {{region cannot be closely nested inside 'for' region}}
+ bar();
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp taskwait
+ bar();
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp flush
+ bar();
+ }
+
+// SECTIONS DIRECTIVE
+#pragma omp sections
+ {
+#pragma omp for // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp sections
+ {
+#pragma omp simd
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp sections
+ {
+#pragma omp parallel
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp sections
+ {
+#pragma omp sections // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
+ {
+ bar();
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+ bar();
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp parallel
+ {
+#pragma omp single // OK
+ {
+ bar();
+ }
+#pragma omp for // OK
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp sections // OK
+ {
+ bar();
+ }
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp parallel
+ {
+#pragma omp master // OK
+ {
+ bar();
+ }
+#pragma omp for // OK
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp master // OK
+ {
+ bar();
+ }
+ }
+#pragma omp master // expected-error {{region cannot be closely nested inside 'sections' region}}
+ bar();
+ }
+#pragma omp sections
+ {
+#pragma omp parallel
+ {
+#pragma omp critical(A) // OK
+ {
+ bar();
+ }
+#pragma omp for // OK
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp critical // OK
+ {
+ bar();
+ }
+ }
+#pragma omp critical(A) // expected-error {{statement in 'omp sections' directive must be enclosed into a section region}}
+ bar();
+ }
+#pragma omp sections
+ {
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp sections
+ {
+#pragma omp parallel sections
+ {
+ bar();
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp task
+ {
+ bar();
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp taskyield
+ }
+#pragma omp sections
+ {
+#pragma omp barrier // expected-error {{region cannot be closely nested inside 'sections' region}}
+ }
+#pragma omp sections
+ {
+#pragma omp taskwait
+ }
+#pragma omp sections
+ {
+#pragma omp flush
+ }
+
+// SECTION DIRECTIVE
+#pragma omp section // expected-error {{orphaned 'omp section' directives are prohibited, it must be closely nested to a sections region}}
+ {
+ bar();
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp for // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp simd
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp parallel
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp sections // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
+ {
+ bar();
+ }
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a section region}}
+ {
+ bar();
+ }
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp single // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
+ bar();
+#pragma omp master // expected-error {{region cannot be closely nested inside 'section' region}}
+ bar();
+#pragma omp critical
+ bar();
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp parallel
+ {
+#pragma omp single // OK
+ {
+ bar();
+ }
+#pragma omp for // OK
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp sections // OK
+ {
+ bar();
+ }
+ }
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp parallel sections
+ {
+ bar();
+ }
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp task
+ {
+ bar();
+ }
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp taskyield
+ bar();
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp barrier // expected-error {{region cannot be closely nested inside 'section' region}}
+ bar();
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp taskwait
+ bar();
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp flush
+ bar();
+ }
+ }
+
+// SINGLE DIRECTIVE
+#pragma omp single
+ {
+#pragma omp for // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp single
+ {
+#pragma omp simd
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp single
+ {
+#pragma omp parallel
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp single
+ {
+#pragma omp single // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
+ {
+ bar();
+ }
+ }
+#pragma omp single
+ {
+#pragma omp master // expected-error {{region cannot be closely nested inside 'single' region}}
+ {
+ bar();
+ }
+ }
+#pragma omp single
+ {
+#pragma omp critical
+ {
+ bar();
+ }
+ }
+#pragma omp single
+ {
+#pragma omp sections // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
+ {
+ bar();
+ }
+ }
+#pragma omp single
+ {
+#pragma omp parallel
+ {
+#pragma omp single // OK
+ {
+ bar();
+ }
+#pragma omp for // OK
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp sections // OK
+ {
+ bar();
+ }
+ }
+ }
+#pragma omp single
+ {
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp single
+ {
+#pragma omp parallel sections
+ {
+ bar();
+ }
+ }
+#pragma omp single
+ {
+#pragma omp task
+ {
+ bar();
+ }
+ }
+#pragma omp single
+ {
+#pragma omp taskyield
+ bar();
+ }
+#pragma omp single
+ {
+#pragma omp barrier // expected-error {{region cannot be closely nested inside 'single' region}}
+ bar();
+ }
+#pragma omp single
+ {
+#pragma omp taskwait
+ bar();
+ }
+#pragma omp single
+ {
+#pragma omp flush
+ bar();
+ }
+
+// MASTER DIRECTIVE
+#pragma omp master
+ {
+#pragma omp for // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp master
+ {
+#pragma omp simd
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp master
+ {
+#pragma omp parallel
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp master
+ {
+#pragma omp single // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
+ {
+ bar();
+ }
+ }
+#pragma omp master
+ {
+#pragma omp master // OK, though second 'master' is redundant
+ {
+ bar();
+ }
+ }
+#pragma omp master
+ {
+#pragma omp critical
+ {
+ bar();
+ }
+ }
+#pragma omp master
+ {
+#pragma omp sections // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
+ {
+ bar();
+ }
+ }
+#pragma omp master
+ {
+#pragma omp parallel
+ {
+#pragma omp master // OK
+ {
+ bar();
+ }
+#pragma omp for // OK
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp sections // OK
+ {
+ bar();
+ }
+ }
+ }
+#pragma omp master
+ {
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp master
+ {
+#pragma omp parallel sections
+ {
+ bar();
+ }
+ }
+#pragma omp master
+ {
+#pragma omp task
+ {
+ bar();
+ }
+ }
+#pragma omp master
+ {
+#pragma omp taskyield
+ bar();
+ }
+#pragma omp master
+ {
+#pragma omp barrier // expected-error {{region cannot be closely nested inside 'master' region}}
+ bar();
+ }
+#pragma omp master
+ {
+#pragma omp taskwait
+ bar();
+ }
+#pragma omp master
+ {
+#pragma omp flush
+ bar();
+ }
+
+// CRITICAL DIRECTIVE
+#pragma omp critical
+ {
+#pragma omp for // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp critical
+ {
+#pragma omp simd
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp critical
+ {
+#pragma omp parallel
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp critical
+ {
+#pragma omp single // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
+ {
+ bar();
+ }
+ }
+#pragma omp critical
+ {
+#pragma omp master // OK, though second 'master' is redundant
+ {
+ bar();
+ }
+ }
+#pragma omp critical
+ {
+#pragma omp critical
+ {
+ bar();
+ }
+ }
+#pragma omp critical
+ {
+#pragma omp sections // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
+ {
+ bar();
+ }
+ }
+#pragma omp critical
+ {
+#pragma omp parallel
+ {
+#pragma omp master // OK
+ {
+ bar();
+ }
+#pragma omp for // OK
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp sections // OK
+ {
+ bar();
+ }
+ }
+ }
+#pragma omp critical
+ {
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp critical
+ {
+#pragma omp parallel sections
+ {
+ bar();
+ }
+ }
+#pragma omp critical
+ {
+#pragma omp task
+ {
+ bar();
+ }
+ }
+#pragma omp critical
+ {
+#pragma omp taskyield
+ bar();
+ }
+#pragma omp critical
+ {
+#pragma omp barrier // expected-error {{region cannot be closely nested inside 'critical' region}}
+ bar();
+ }
+#pragma omp critical
+ {
+#pragma omp taskwait
+ bar();
+ }
+#pragma omp critical(Tuzik)
+ {
+#pragma omp critical(grelka)
+ bar();
+ }
+#pragma omp critical(Belka)// expected-note {{previous 'critical' region starts here}}
+ {
+#pragma omp critical(Belka) // expected-error {{cannot nest 'critical' regions having the same name 'Belka'}}
+ {
+#pragma omp critical(Tuzik)
+ {
+#pragma omp parallel
+#pragma omp critical(grelka)
+ {
+ bar();
+ }
+ }
+ }
+ }
+
+// PARALLEL FOR DIRECTIVE
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp for // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp simd
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp parallel
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp sections // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
+ {
+ bar();
+ }
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a parallel for region}}
+ {
+ bar();
+ }
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp single // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
+ {
+ bar();
+ }
+ }
+
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp master // expected-error {{region cannot be closely nested inside 'parallel for' region}}
+ {
+ bar();
+ }
+ }
+
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp critical
+ {
+ bar();
+ }
+ }
+
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp parallel
+ {
+#pragma omp single // OK
+ {
+ bar();
+ }
+#pragma omp for // OK
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp sections // OK
+ {
+ bar();
+ }
+ }
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp parallel sections
+ {
+ bar();
+ }
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp task
+ {
+ bar();
+ }
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp taskyield
+ bar();
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp barrier // expected-error {{region cannot be closely nested inside 'parallel for' region}}
+ bar();
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp taskwait
+ bar();
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp flush
+ bar();
+ }
+
+// PARALLEL SECTIONS DIRECTIVE
+#pragma omp parallel sections
+ {
+#pragma omp for // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp parallel sections
+ {
+#pragma omp simd
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp parallel sections
+ {
+#pragma omp parallel
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp parallel sections
+ {
+#pragma omp sections // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
+ {
+ bar();
+ }
+ }
+#pragma omp parallel sections
+ {
+#pragma omp section
+ {
+ bar();
+ }
+ }
+#pragma omp parallel sections
+ {
+#pragma omp section
+ {
+#pragma omp single // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
+ bar();
+ }
+ }
+#pragma omp parallel sections
+ {
+#pragma omp section
+ {
+#pragma omp master // expected-error {{region cannot be closely nested inside 'section' region}}
+ bar();
+ }
+ }
+#pragma omp parallel sections
+ {
+#pragma omp section
+ {
+#pragma omp critical
+ bar();
+ }
+ }
+#pragma omp parallel sections
+ {
+#pragma omp parallel
+ {
+#pragma omp single // OK
+ {
+ bar();
+ }
+#pragma omp for // OK
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp sections // OK
+ {
+ bar();
+ }
+ }
+ }
+#pragma omp parallel sections
+ {
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp parallel sections
+ {
+#pragma omp parallel sections
+ {
+ bar();
+ }
+ }
+#pragma omp parallel sections
+ {
+#pragma omp task
+ {
+ bar();
+ }
+ }
+#pragma omp parallel sections
+ {
+#pragma omp taskyield
+ }
+#pragma omp parallel sections
+ {
+#pragma omp barrier // expected-error {{region cannot be closely nested inside 'parallel sections' region}}
+ }
+#pragma omp parallel sections
+ {
+#pragma omp taskwait
+ }
+#pragma omp parallel sections
+ {
+#pragma omp flush
+ }
+
+// TASK DIRECTIVE
+#pragma omp task
+#pragma omp for // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp task
+#pragma omp simd
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp task
+#pragma omp sections // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
+ {
+ bar();
+ }
+#pragma omp task
+#pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a task region}}
+ {
+ bar();
+ }
+#pragma omp task
+#pragma omp single // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
+ bar();
+#pragma omp task
+#pragma omp master // expected-error {{region cannot be closely nested inside 'task' region}}
+ bar();
+#pragma omp task
+#pragma omp critical
+ bar();
+
+#pragma omp task
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp task
+#pragma omp parallel sections
+ {
+ bar();
+ }
+#pragma omp task
+#pragma omp task
+ {
+ bar();
+ }
+#pragma omp task
+ {
+#pragma omp taskyield
+ bar();
+ }
+#pragma omp task
+ {
+#pragma omp barrier // expected-error {{region cannot be closely nested inside 'task' region}}
+ bar();
+ }
+#pragma omp task
+ {
+#pragma omp taskwait
+ bar();
+ }
+#pragma omp task
+ {
+#pragma omp flush
+ bar();
+ }
+}
+
+void foo() {
+// PARALLEL DIRECTIVE
+#pragma omp parallel
+#pragma omp for
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp parallel
+#pragma omp simd
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp parallel
+#pragma omp sections
+ {
+ bar();
+ }
+#pragma omp parallel
+#pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a parallel region}}
+ {
+ bar();
+ }
+#pragma omp parallel
+#pragma omp sections
+ {
+ bar();
+ }
+#pragma omp parallel
+#pragma omp single
+ bar();
+#pragma omp parallel
+#pragma omp master
+ bar();
+#pragma omp parallel
+#pragma omp critical
+ bar();
+#pragma omp parallel
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp parallel
+#pragma omp parallel sections
+ {
+ bar();
+ }
+#pragma omp parallel
+#pragma omp task
+ {
+ bar();
+ }
+#pragma omp parallel
+ {
+#pragma omp taskyield
+ bar();
+ }
+#pragma omp parallel
+ {
+#pragma omp barrier
+ bar();
+ }
+#pragma omp parallel
+ {
+#pragma omp taskwait
+ bar();
+ }
+#pragma omp parallel
+ {
+#pragma omp flush
+ bar();
+ }
+
+// SIMD DIRECTIVE
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp simd // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp parallel // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ {
+ bar();
+ }
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp section // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ {
+ bar();
+ }
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp single // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ bar();
+#pragma omp master // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ bar();
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp single // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ bar();
+#pragma omp critical // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ bar();
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp parallel for // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp parallel sections // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ {
+ bar();
+ }
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp task // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ {
+ bar();
+ }
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp taskyield // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ bar();
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp barrier // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ bar();
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp taskwait // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ bar();
+ }
+#pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+#pragma omp flush // expected-error {{OpenMP constructs may not be nested inside a simd region}}
+ bar();
+ }
+
+// FOR DIRECTIVE
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp for // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp simd
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp parallel
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp sections // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
+ {
+ bar();
+ }
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a for region}}
+ {
+ bar();
+ }
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp single // expected-error {{region cannot be closely nested inside 'for' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
+ bar();
+#pragma omp master // expected-error {{region cannot be closely nested inside 'for' region}}
+ bar();
+#pragma omp critical
+ bar();
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp parallel
+ {
+#pragma omp single // OK
+ {
+ bar();
+ }
+#pragma omp for // OK
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp sections // OK
+ {
+ bar();
+ }
+ }
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp parallel sections
+ {
+ bar();
+ }
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp task
+ {
+ bar();
+ }
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp taskyield
+ bar();
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp barrier // expected-error {{region cannot be closely nested inside 'for' region}}
+ bar();
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp taskwait
+ bar();
+ }
+#pragma omp for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp flush
+ bar();
+ }
+
+// SECTIONS DIRECTIVE
+#pragma omp sections
+ {
+#pragma omp for // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp sections
+ {
+#pragma omp simd
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp sections
+ {
+#pragma omp parallel
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp sections
+ {
+#pragma omp sections // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
+ {
+ bar();
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+ bar();
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp critical
+ bar();
+#pragma omp single // expected-error {{region cannot be closely nested inside 'sections' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
+ bar();
+#pragma omp master // expected-error {{region cannot be closely nested inside 'sections' region}}
+ bar();
+ }
+#pragma omp sections
+ {
+#pragma omp parallel
+ {
+#pragma omp single // OK
+ {
+ bar();
+ }
+#pragma omp for // OK
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp sections // OK
+ {
+ bar();
+ }
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp sections
+ {
+#pragma omp parallel sections
+ {
+ bar();
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp task
+ {
+ bar();
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp taskyield
+ }
+#pragma omp sections
+ {
+#pragma omp barrier // expected-error {{region cannot be closely nested inside 'sections' region}}
+ bar();
+ }
+#pragma omp sections
+ {
+#pragma omp taskwait
+ }
+#pragma omp sections
+ {
+#pragma omp flush
+ }
+
+// SECTION DIRECTIVE
+#pragma omp section // expected-error {{orphaned 'omp section' directives are prohibited, it must be closely nested to a sections region}}
+ {
+ bar();
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp for // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp simd
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp parallel
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp sections // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
+ {
+ bar();
+ }
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a section region}}
+ {
+ bar();
+ }
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp single // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
+ bar();
+#pragma omp master // expected-error {{region cannot be closely nested inside 'section' region}}
+ bar();
+#pragma omp critical
+ bar();
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp parallel
+ {
+#pragma omp single // OK
+ {
+ bar();
+ }
+#pragma omp for // OK
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp sections // OK
+ {
+ bar();
+ }
+ }
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp parallel sections
+ {
+ bar();
+ }
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp task
+ {
+ bar();
+ }
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp taskyield
+ bar();
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp barrier // expected-error {{region cannot be closely nested inside 'section' region}}
+ bar();
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp taskwait
+ bar();
+ }
+ }
+#pragma omp sections
+ {
+#pragma omp section
+ {
+#pragma omp flush
+ bar();
+ }
+ }
+
+// SINGLE DIRECTIVE
+#pragma omp single
+ {
+#pragma omp for // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp single
+ {
+#pragma omp simd
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp single
+ {
+#pragma omp parallel
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp single
+ {
+#pragma omp single // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
+ {
+ bar();
+ }
+#pragma omp master // expected-error {{region cannot be closely nested inside 'single' region}}
+ bar();
+#pragma omp critical
+ bar();
+ }
+#pragma omp single
+ {
+#pragma omp sections // expected-error {{region cannot be closely nested inside 'single' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
+ {
+ bar();
+ }
+ }
+#pragma omp single
+ {
+#pragma omp parallel
+ {
+#pragma omp single // OK
+ {
+ bar();
+ }
+#pragma omp for // OK
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp sections // OK
+ {
+ bar();
+ }
+ }
+ }
+#pragma omp single
+ {
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp single
+ {
+#pragma omp parallel sections
+ {
+ bar();
+ }
+ }
+#pragma omp single
+ {
+#pragma omp task
+ {
+ bar();
+ }
+ }
+#pragma omp single
+ {
+#pragma omp taskyield
+ bar();
+ }
+#pragma omp single
+ {
+#pragma omp barrier // expected-error {{region cannot be closely nested inside 'single' region}}
+ bar();
+ }
+#pragma omp single
+ {
+#pragma omp taskwait
+ bar();
+ }
+#pragma omp single
+ {
+#pragma omp flush
+ bar();
+ }
+
+// MASTER DIRECTIVE
+#pragma omp master
+ {
+#pragma omp for // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp master
+ {
+#pragma omp simd
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp master
+ {
+#pragma omp parallel
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp master
+ {
+#pragma omp single // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
+ {
+ bar();
+ }
+ }
+#pragma omp master
+ {
+#pragma omp master // OK, though second 'master' is redundant
+ {
+ bar();
+ }
+ }
+#pragma omp master
+ {
+#pragma omp critical
+ {
+ bar();
+ }
+ }
+#pragma omp master
+ {
+#pragma omp sections // expected-error {{region cannot be closely nested inside 'master' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
+ {
+ bar();
+ }
+ }
+#pragma omp master
+ {
+#pragma omp parallel
+ {
+#pragma omp master // OK
+ {
+ bar();
+ }
+#pragma omp for // OK
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp sections // OK
+ {
+ bar();
+ }
+ }
+ }
+#pragma omp master
+ {
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp master
+ {
+#pragma omp parallel sections
+ {
+ bar();
+ }
+ }
+#pragma omp master
+ {
+#pragma omp task
+ {
+ bar();
+ }
+ }
+#pragma omp master
+ {
+#pragma omp taskyield
+ bar();
+ }
+#pragma omp master
+ {
+#pragma omp barrier // expected-error {{region cannot be closely nested inside 'master' region}}
+ bar();
+ }
+#pragma omp master
+ {
+#pragma omp taskwait
+ bar();
+ }
+#pragma omp master
+ {
+#pragma omp flush
+ bar();
+ }
+
+// CRITICAL DIRECTIVE
+#pragma omp critical
+ {
+#pragma omp for // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp critical
+ {
+#pragma omp simd
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp critical
+ {
+#pragma omp parallel
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp critical
+ {
+#pragma omp single // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
+ {
+ bar();
+ }
+ }
+#pragma omp critical
+ {
+#pragma omp master // OK, though second 'master' is redundant
+ {
+ bar();
+ }
+ }
+#pragma omp critical
+ {
+#pragma omp critical
+ {
+ bar();
+ }
+ }
+#pragma omp critical
+ {
+#pragma omp sections // expected-error {{region cannot be closely nested inside 'critical' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
+ {
+ bar();
+ }
+ }
+#pragma omp critical
+ {
+#pragma omp parallel
+ {
+#pragma omp master // OK
+ {
+ bar();
+ }
+#pragma omp for // OK
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp sections // OK
+ {
+ bar();
+ }
+ }
+ }
+#pragma omp critical
+ {
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp critical
+ {
+#pragma omp parallel sections
+ {
+ bar();
+ }
+ }
+#pragma omp critical
+ {
+#pragma omp task
+ {
+ bar();
+ }
+ }
+#pragma omp critical
+ {
+#pragma omp taskyield
+ bar();
+ }
+#pragma omp critical
+ {
+#pragma omp barrier // expected-error {{region cannot be closely nested inside 'critical' region}}
+ bar();
+ }
+#pragma omp critical
+ {
+#pragma omp taskwait
+ bar();
+ }
+#pragma omp critical(Belka)
+ {
+#pragma omp critical(Strelka)
+ bar();
+ }
+#pragma omp critical(Tuzik)// expected-note {{previous 'critical' region starts here}}
+ {
+#pragma omp critical(grelka) // expected-note {{previous 'critical' region starts here}}
+ {
+#pragma omp critical(Tuzik) // expected-error {{cannot nest 'critical' regions having the same name 'Tuzik'}}
+ {
+#pragma omp parallel
+#pragma omp critical(grelka) // expected-error {{cannot nest 'critical' regions having the same name 'grelka'}}
+ {
+ bar();
+ }
+ }
+ }
+ }
+
+// PARALLEL FOR DIRECTIVE
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp for // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp simd
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp parallel
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp sections // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
+ {
+ bar();
+ }
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a parallel for region}}
+ {
+ bar();
+ }
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp single // expected-error {{region cannot be closely nested inside 'parallel for' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
+ {
+ bar();
+ }
+#pragma omp master // expected-error {{region cannot be closely nested inside 'parallel for' region}}
+ {
+ bar();
+ }
+#pragma omp critical
+ {
+ bar();
+ }
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp parallel
+ {
+#pragma omp single // OK
+ {
+ bar();
+ }
+#pragma omp master // OK
+ {
+ bar();
+ }
+#pragma omp critical // OK
+ {
+ bar();
+ }
+#pragma omp for // OK
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp sections // OK
+ {
+ bar();
+ }
+ }
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp parallel sections
+ {
+ bar();
+ }
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp task
+ {
+ bar();
+ }
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp taskyield
+ bar();
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp barrier // expected-error {{region cannot be closely nested inside 'parallel for' region}}
+ bar();
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp taskwait
+ bar();
+ }
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+#pragma omp flush
+ bar();
+ }
+
+// PARALLEL SECTIONS DIRECTIVE
+#pragma omp parallel sections
+ {
+#pragma omp for // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp parallel sections
+ {
+#pragma omp simd
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp parallel sections
+ {
+#pragma omp parallel
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp parallel sections
+ {
+#pragma omp sections // expected-error {{region cannot be closely nested inside 'parallel sections' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
+ {
+ bar();
+ }
+ }
+#pragma omp parallel sections
+ {
+#pragma omp section
+ {
+ bar();
+ }
+ }
+#pragma omp parallel sections
+ {
+#pragma omp section
+ {
+#pragma omp single // expected-error {{region cannot be closely nested inside 'section' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
+ bar();
+#pragma omp master // expected-error {{region cannot be closely nested inside 'section' region}}
+ bar();
+#pragma omp critical
+ bar();
+ }
+ }
+#pragma omp parallel sections
+ {
+#pragma omp parallel
+ {
+#pragma omp single // OK
+ {
+ bar();
+ }
+#pragma omp master // OK
+ {
+ bar();
+ }
+#pragma omp critical // OK
+ {
+ bar();
+ }
+#pragma omp for // OK
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp sections // OK
+ {
+ bar();
+ }
+ }
+ }
+#pragma omp parallel sections
+ {
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i)
+ ;
+ }
+#pragma omp parallel sections
+ {
+#pragma omp parallel sections
+ {
+ bar();
+ }
+ }
+#pragma omp parallel sections
+ {
+#pragma omp task
+ {
+ bar();
+ }
+ }
+#pragma omp parallel sections
+ {
+#pragma omp taskyield
+ }
+#pragma omp parallel sections
+ {
+#pragma omp barrier // expected-error {{region cannot be closely nested inside 'parallel sections' region}}
+ }
+#pragma omp parallel sections
+ {
+#pragma omp taskwait
+ }
+#pragma omp parallel sections
+ {
+#pragma omp flush
+ }
+
+// TASK DIRECTIVE
+#pragma omp task
+#pragma omp for // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp task
+#pragma omp simd
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp task
+#pragma omp sections // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp sections' directive into a parallel region?}}
+ {
+ bar();
+ }
+#pragma omp task
+#pragma omp section // expected-error {{'omp section' directive must be closely nested to a sections region, not a task region}}
+ {
+ bar();
+ }
+#pragma omp task
+#pragma omp single // expected-error {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp single' directive into a parallel region?}}
+ bar();
+#pragma omp task
+#pragma omp master // expected-error {{region cannot be closely nested inside 'task' region}}
+ bar();
+#pragma omp task
+#pragma omp critical
+ bar();
+#pragma omp task
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i)
+ ;
+#pragma omp task
+#pragma omp parallel sections
+ {
+ bar();
+ }
+#pragma omp task
+#pragma omp task
+ {
+ bar();
+ }
+#pragma omp task
+ {
+#pragma omp taskyield
+ bar();
+ }
+#pragma omp task
+ {
+#pragma omp barrier // expected-error {{region cannot be closely nested inside 'task' region}}
+ bar();
+ }
+#pragma omp task
+ {
+#pragma omp taskwait
+ bar();
+ }
+#pragma omp task
+ {
+#pragma omp flush
+ bar();
+ }
+ return foo<int>();
+}
+
diff --git a/test/OpenMP/no_option.c b/test/OpenMP/no_option.c
index 4acc8d0656b3..8a65b039fc9f 100644
--- a/test/OpenMP/no_option.c
+++ b/test/OpenMP/no_option.c
@@ -2,5 +2,5 @@
// expected-no-diagnostics
int a;
-#pragma omp threadprivate(a,b)
+#pragma omp threadprivate(a, b)
#pragma omp parallel
diff --git a/test/OpenMP/no_option_no_warn.c b/test/OpenMP/no_option_no_warn.c
index c989991371f4..10778c0b1e35 100644
--- a/test/OpenMP/no_option_no_warn.c
+++ b/test/OpenMP/no_option_no_warn.c
@@ -2,5 +2,5 @@
// expected-no-diagnostics
int a;
-#pragma omp threadprivate(a,b)
+#pragma omp threadprivate(a, b)
#pragma omp parallel
diff --git a/test/OpenMP/openmp_common.c b/test/OpenMP/openmp_common.c
index 3765f4c5dc14..3131b3045b6f 100644
--- a/test/OpenMP/openmp_common.c
+++ b/test/OpenMP/openmp_common.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -o - %s
#pragma omp // expected-error {{expected an OpenMP directive}}
#pragma omp unknown_directive // expected-error {{expected an OpenMP directive}}
diff --git a/test/OpenMP/parallel_ast_print.cpp b/test/OpenMP/parallel_ast_print.cpp
index f2fd2f7b69f9..0415c0ca555c 100644
--- a/test/OpenMP/parallel_ast_print.cpp
+++ b/test/OpenMP/parallel_ast_print.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fopenmp -ast-print %s | FileCheck %s
-// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -emit-pch -o %t %s
-// RUN: %clang_cc1 -fopenmp -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ast-print %s | FileCheck %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -emit-pch -o %t %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
// expected-no-diagnostics
#ifndef HEADER
@@ -8,53 +8,89 @@
void foo() {}
+template <class T>
+struct S {
+ operator T() {return T();}
+ static T TS;
+ #pragma omp threadprivate(TS)
+};
-template <typename T>
+// CHECK: template <class T = int> struct S {
+// CHECK: static int TS;
+// CHECK-NEXT: #pragma omp threadprivate(S<int>::TS)
+// CHECK-NEXT: }
+// CHECK: template <class T = long> struct S {
+// CHECK: static long TS;
+// CHECK-NEXT: #pragma omp threadprivate(S<long>::TS)
+// CHECK-NEXT: }
+// CHECK: template <class T> struct S {
+// CHECK: static T TS;
+// CHECK-NEXT: #pragma omp threadprivate(S::TS)
+// CHECK: };
+
+template <typename T, int C>
T tmain(T argc, T *argv) {
T b = argc, c, d, e, f, g;
static T a;
+ S<T> s;
#pragma omp parallel
a=2;
-#pragma omp parallel default(none), private(argc,b) firstprivate(argv) shared (d)
+#pragma omp parallel default(none), private(argc,b) firstprivate(argv) shared (d) if (argc > 0) num_threads(C) copyin(S<T>::TS) proc_bind(master) reduction(+:c) reduction(max:e)
+ foo();
+#pragma omp parallel if (C) num_threads(s) proc_bind(close) reduction(^:e, f) reduction(&& : g)
foo();
return 0;
}
-// CHECK: template <typename T = int> int tmain(int argc, int *argv) {
+
+// CHECK: template <typename T = int, int C = 5> int tmain(int argc, int *argv) {
// CHECK-NEXT: int b = argc, c, d, e, f, g;
// CHECK-NEXT: static int a;
+// CHECK-NEXT: S<int> s;
// CHECK-NEXT: #pragma omp parallel
// CHECK-NEXT: a = 2;
-// CHECK-NEXT: #pragma omp parallel default(none) private(argc,b) firstprivate(argv) shared(d)
+// CHECK-NEXT: #pragma omp parallel default(none) private(argc,b) firstprivate(argv) shared(d) if(argc > 0) num_threads(5) copyin(S<int>::TS) proc_bind(master) reduction(+: c) reduction(max: e)
+// CHECK-NEXT: foo()
+// CHECK-NEXT: #pragma omp parallel if(5) num_threads(s) proc_bind(close) reduction(^: e,f) reduction(&&: g)
// CHECK-NEXT: foo()
-// CHECK: template <typename T = float> float tmain(float argc, float *argv) {
-// CHECK-NEXT: float b = argc, c, d, e, f, g;
-// CHECK-NEXT: static float a;
+// CHECK: template <typename T = long, int C = 1> long tmain(long argc, long *argv) {
+// CHECK-NEXT: long b = argc, c, d, e, f, g;
+// CHECK-NEXT: static long a;
+// CHECK-NEXT: S<long> s;
// CHECK-NEXT: #pragma omp parallel
// CHECK-NEXT: a = 2;
-// CHECK-NEXT: #pragma omp parallel default(none) private(argc,b) firstprivate(argv) shared(d)
+// CHECK-NEXT: #pragma omp parallel default(none) private(argc,b) firstprivate(argv) shared(d) if(argc > 0) num_threads(1) copyin(S<long>::TS) proc_bind(master) reduction(+: c) reduction(max: e)
// CHECK-NEXT: foo()
-// CHECK: template <typename T> T tmain(T argc, T *argv) {
+// CHECK-NEXT: #pragma omp parallel if(1) num_threads(s) proc_bind(close) reduction(^: e,f) reduction(&&: g)
+// CHECK-NEXT: foo()
+// CHECK: template <typename T, int C> T tmain(T argc, T *argv) {
// CHECK-NEXT: T b = argc, c, d, e, f, g;
// CHECK-NEXT: static T a;
+// CHECK-NEXT: S<T> s;
// CHECK-NEXT: #pragma omp parallel
// CHECK-NEXT: a = 2;
-// CHECK-NEXT: #pragma omp parallel default(none) private(argc,b) firstprivate(argv) shared(d)
+// CHECK-NEXT: #pragma omp parallel default(none) private(argc,b) firstprivate(argv) shared(d) if(argc > 0) num_threads(C) copyin(S<T>::TS) proc_bind(master) reduction(+: c) reduction(max: e)
+// CHECK-NEXT: foo()
+// CHECK-NEXT: #pragma omp parallel if(C) num_threads(s) proc_bind(close) reduction(^: e,f) reduction(&&: g)
// CHECK-NEXT: foo()
+enum Enum { };
+
int main (int argc, char **argv) {
- float x;
+ long x;
int b = argc, c, d, e, f, g;
static int a;
-// CHECK: static int a;
+ #pragma omp threadprivate(a)
+ Enum ee;
+// CHECK: Enum ee;
#pragma omp parallel
// CHECK-NEXT: #pragma omp parallel
a=2;
// CHECK-NEXT: a = 2;
-#pragma omp parallel default(none), private(argc,b) firstprivate(argv)
-// CHECK-NEXT: #pragma omp parallel default(none) private(argc,b) firstprivate(argv)
+#pragma omp parallel default(none), private(argc,b) firstprivate(argv) if (argc > 0) num_threads(ee) copyin(a) proc_bind(spread) reduction(| : c, d) reduction(* : e)
+// CHECK-NEXT: #pragma omp parallel default(none) private(argc,b) firstprivate(argv) if(argc > 0) num_threads(ee) copyin(a) proc_bind(spread) reduction(|: c,d) reduction(*: e)
foo();
// CHECK-NEXT: foo();
- return tmain(b, &b) + tmain(x, &x);
+ return tmain<int, 5>(b, &b) + tmain<long, 1>(x, &x);
}
#endif
diff --git a/test/OpenMP/parallel_codegen.cpp b/test/OpenMP/parallel_codegen.cpp
new file mode 100644
index 000000000000..d9ff5ac02333
--- /dev/null
+++ b/test/OpenMP/parallel_codegen.cpp
@@ -0,0 +1,145 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -x c++ -emit-llvm %s -fexceptions -fcxx-exceptions -o - | FileCheck %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -emit-pch -o %t %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -g -std=c++11 -include-pch %t -verify %s -emit-llvm -o - | FileCheck --check-prefix=CHECK-DEBUG %s
+// expected-no-diagnostics
+#ifndef HEADER
+#define HEADER
+
+// CHECK-DAG: %ident_t = type { i32, i32, i32, i32, i8* }
+// CHECK-DAG: %struct.anon = type { i32* }
+// CHECK-DAG: %struct.anon.0 = type { i8*** }
+// CHECK-DAG: [[STR:@.+]] = private unnamed_addr constant [23 x i8] c";unknown;unknown;0;0;;\00"
+// CHECK-DAG: [[DEF_LOC_2:@.+]] = private unnamed_addr constant %ident_t { i32 0, i32 2, i32 0, i32 0, i8* getelementptr inbounds ([23 x i8]* [[STR]], i32 0, i32 0) }
+// CHECK-DEBUG-DAG: %ident_t = type { i32, i32, i32, i32, i8* }
+// CHECK-DEBUG-DAG: %struct.anon = type { i32* }
+// CHECK-DEBUG-DAG: %struct.anon.0 = type { i8*** }
+// CHECK-DEBUG-DAG: [[STR:@.+]] = private unnamed_addr constant [23 x i8] c";unknown;unknown;0;0;;\00"
+// CHECK-DEBUG-DAG: [[DEF_LOC_2:@.+]] = private unnamed_addr constant %ident_t { i32 0, i32 2, i32 0, i32 0, i8* getelementptr inbounds ([23 x i8]* [[STR]], i32 0, i32 0) }
+// CHECK-DEBUG-DAG: [[LOC1:@.+]] = private unnamed_addr constant [{{.+}} x i8] c";{{.*}}parallel_codegen.cpp;main;[[@LINE+14]];9;;\00"
+// CHECK-DEBUG-DAG: [[LOC2:@.+]] = private unnamed_addr constant [{{.+}} x i8] c";{{.*}}parallel_codegen.cpp;tmain;[[@LINE+7]];9;;\00"
+
+template <class T>
+void foo(T argc) {}
+
+template <typename T>
+int tmain(T argc) {
+#pragma omp parallel
+ foo(argc);
+ return 0;
+}
+
+int main (int argc, char **argv) {
+#pragma omp parallel
+ foo(argc);
+ return tmain(argv);
+}
+
+// CHECK-LABEL: define {{[a-z]*[ ]?i32}} @main({{i32[ ]?[a-z]*}} %argc, i8** %argv)
+// CHECK: [[AGG_CAPTURED:%.+]] = alloca %struct.anon
+// CHECK: [[ARGC_REF:%.+]] = getelementptr inbounds %struct.anon* [[AGG_CAPTURED]], i32 0, i32 0
+// CHECK-NEXT: store i32* {{%[a-z0-9.]+}}, i32** [[ARGC_REF]]
+// CHECK-NEXT: [[BITCAST:%.+]] = bitcast %struct.anon* [[AGG_CAPTURED]] to i8*
+// CHECK-NEXT: call void (%ident_t*, i32, void (i32*, i32*, ...)*, ...)* @__kmpc_fork_call(%ident_t* [[DEF_LOC_2]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @__captured_stmt to void (i32*, i32*, ...)*), i8* [[BITCAST]])
+// CHECK-NEXT: [[ARGV:%.+]] = load i8*** {{%[a-z0-9.]+}}
+// CHECK-NEXT: [[RET:%.+]] = call {{[a-z]*[ ]?i32}} [[TMAIN:@.+tmain.+]](i8** [[ARGV]])
+// CHECK-NEXT: ret i32 [[RET]]
+// CHECK-NEXT: }
+// CHECK-DEBUG-LABEL: define i32 @main(i32 %argc, i8** %argv)
+// CHECK-DEBUG-DAG: [[AGG_CAPTURED:%.+]] = alloca %struct.anon
+// CHECK-DEBUG-DAG: [[LOC_2_ADDR:%.+]] = alloca %ident_t
+// CHECK-DEBUG: [[KMPC_LOC_VOIDPTR:%.+]] = bitcast %ident_t* [[LOC_2_ADDR]] to i8*
+// CHECK-DEBUG-NEXT: [[KMPC_DEFAULT_LOC_VOIDPTR:%.+]] = bitcast %ident_t* [[DEF_LOC_2]] to i8*
+// CHECK-DEBUG-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* [[KMPC_LOC_VOIDPTR]], i8* [[KMPC_DEFAULT_LOC_VOIDPTR]], i64 ptrtoint (%ident_t* getelementptr (%ident_t* null, i32 1) to i64), i32 8, i1 false)
+// CHECK-DEBUG: [[ARGC_REF:%.+]] = getelementptr inbounds %struct.anon* [[AGG_CAPTURED]], i32 0, i32 0
+// CHECK-DEBUG-NEXT: store i32* {{%[a-z0-9.]+}}, i32** [[ARGC_REF]]
+// CHECK-DEBUG-NEXT: [[KMPC_LOC_PSOURCE_REF:%.+]] = getelementptr inbounds %ident_t* [[LOC_2_ADDR]], i32 0, i32 4
+// CHECK-DEBUG-NEXT: store i8* getelementptr inbounds ([{{.+}} x i8]* [[LOC1]], i32 0, i32 0), i8** [[KMPC_LOC_PSOURCE_REF]]
+// CHECK-DEBUG-NEXT: [[BITCAST:%.+]] = bitcast %struct.anon* [[AGG_CAPTURED]] to i8*
+// CHECK-DEBUG-NEXT: call void (%ident_t*, i32, void (i32*, i32*, ...)*, ...)* @__kmpc_fork_call(%ident_t* [[LOC_2_ADDR]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon*)* @__captured_stmt to void (i32*, i32*, ...)*), i8* [[BITCAST]])
+// CHECK-DEBUG-NEXT: [[ARGV:%.+]] = load i8*** {{%[a-z0-9.]+}}
+// CHECK-DEBUG-NEXT: [[RET:%.+]] = call i32 [[TMAIN:@.+tmain.+]](i8** [[ARGV]])
+// CHECK-DEBUG-NEXT: ret i32 [[RET]]
+// CHECK-DEBUG-NEXT: }
+
+// CHECK-LABEL: define internal void @__captured_stmt(i32* %.global_tid., i32* %.bound_tid., %struct.anon* %__context)
+// CHECK: [[CONTEXT_ADDR:%.+]] = alloca %struct.anon*
+// CHECK: store %struct.anon* %__context, %struct.anon** [[CONTEXT_ADDR]]
+// CHECK: [[CONTEXT_PTR:%.+]] = load %struct.anon** [[CONTEXT_ADDR]]
+// CHECK-NEXT: [[ARGC_PTR_REF:%.+]] = getelementptr inbounds %struct.anon* [[CONTEXT_PTR]], i32 0, i32 0
+// CHECK-NEXT: [[ARGC_REF:%.+]] = load i32** [[ARGC_PTR_REF]]
+// CHECK-NEXT: [[ARGC:%.+]] = load i32* [[ARGC_REF]]
+// CHECK-NEXT: invoke void [[FOO:@.+foo.+]](i32{{[ ]?[a-z]*}} [[ARGC]])
+// CHECK: ret void
+// CHECK: call void @{{.+terminate.*}}(
+// CHECK-NEXT: unreachable
+// CHECK-NEXT: }
+// CHECK-DEBUG-LABEL: define internal void @__captured_stmt(i32* %.global_tid., i32* %.bound_tid., %struct.anon* %__context)
+// CHECK-DEBUG: [[CONTEXT_ADDR:%.+]] = alloca %struct.anon*
+// CHECK-DEBUG: store %struct.anon* %__context, %struct.anon** [[CONTEXT_ADDR]]
+// CHECK-DEBUG: [[CONTEXT_PTR:%.+]] = load %struct.anon** [[CONTEXT_ADDR]]
+// CHECK-DEBUG-NEXT: [[ARGC_PTR_REF:%.+]] = getelementptr inbounds %struct.anon* [[CONTEXT_PTR]], i32 0, i32 0
+// CHECK-DEBUG-NEXT: [[ARGC_REF:%.+]] = load i32** [[ARGC_PTR_REF]]
+// CHECK-DEBUG-NEXT: [[ARGC:%.+]] = load i32* [[ARGC_REF]]
+// CHECK-DEBUG-NEXT: invoke void [[FOO:@.+foo.+]](i32 [[ARGC]])
+// CHECK-DEBUG: ret void
+// CHECK-DEBUG: call void @{{.+terminate.*}}(
+// CHECK-DEBUG-NEXT: unreachable
+// CHECK-DEBUG-NEXT: }
+
+// CHECK-DAG: define linkonce_odr void [[FOO]]({{i32[ ]?[a-z]*}} %argc)
+// CHECK-DAG: declare void @__kmpc_fork_call(%ident_t*, i32, void (i32*, i32*, ...)*, ...)
+// CHECK-DEBUG-DAG: define linkonce_odr void [[FOO]](i32 %argc)
+// CHECK-DEBUG-DAG: declare void @__kmpc_fork_call(%ident_t*, i32, void (i32*, i32*, ...)*, ...)
+
+// CHECK: define linkonce_odr {{[a-z]*[ ]?i32}} [[TMAIN]](i8** %argc)
+// CHECK: [[AGG_CAPTURED:%.+]] = alloca %struct.anon.0
+// CHECK: [[ARGC_REF:%.+]] = getelementptr inbounds %struct.anon.0* [[AGG_CAPTURED]], i32 0, i32 0
+// CHECK-NEXT: store i8*** {{%[a-z0-9.]+}}, i8**** [[ARGC_REF]]
+// CHECK-NEXT: [[BITCAST:%.+]] = bitcast %struct.anon.0* [[AGG_CAPTURED]] to i8*
+// CHECK-NEXT: call void (%ident_t*, i32, void (i32*, i32*, ...)*, ...)* @__kmpc_fork_call(%ident_t* [[DEF_LOC_2]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon.0*)* @__captured_stmt1 to void (i32*, i32*, ...)*), i8* [[BITCAST]])
+// CHECK-NEXT: ret i32 0
+// CHECK-NEXT: }
+// CHECK-DEBUG: define linkonce_odr i32 [[TMAIN]](i8** %argc)
+// CHECK-DEBUG-DAG: [[AGG_CAPTURED:%.+]] = alloca %struct.anon.0
+// CHECK-DEBUG-DAG: [[LOC_2_ADDR:%.+]] = alloca %ident_t
+// CHECK-DEBUG: [[KMPC_LOC_VOIDPTR:%.+]] = bitcast %ident_t* [[LOC_2_ADDR]] to i8*
+// CHECK-DEBUG-NEXT: [[KMPC_DEFAULT_LOC_VOIDPTR:%.+]] = bitcast %ident_t* [[DEF_LOC_2]] to i8*
+// CHECK-DEBUG-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* [[KMPC_LOC_VOIDPTR]], i8* [[KMPC_DEFAULT_LOC_VOIDPTR]], i64 ptrtoint (%ident_t* getelementptr (%ident_t* null, i32 1) to i64), i32 8, i1 false)
+// CHECK-DEBUG: [[ARGC_REF:%.+]] = getelementptr inbounds %struct.anon.0* [[AGG_CAPTURED]], i32 0, i32 0
+// CHECK-DEBUG-NEXT: store i8*** {{%[a-z0-9.]+}}, i8**** [[ARGC_REF]]
+// CHECK-DEBUG-NEXT: [[KMPC_LOC_PSOURCE_REF:%.+]] = getelementptr inbounds %ident_t* [[LOC_2_ADDR]], i32 0, i32 4
+// CHECK-DEBUG-NEXT: store i8* getelementptr inbounds ([{{.+}} x i8]* [[LOC2]], i32 0, i32 0), i8** [[KMPC_LOC_PSOURCE_REF]]
+// CHECK-DEBUG-NEXT: [[BITCAST:%.+]] = bitcast %struct.anon.0* [[AGG_CAPTURED]] to i8*
+// CHECK-DEBUG-NEXT: call void (%ident_t*, i32, void (i32*, i32*, ...)*, ...)* @__kmpc_fork_call(%ident_t* [[LOC_2_ADDR]], i32 1, void (i32*, i32*, ...)* bitcast (void (i32*, i32*, %struct.anon.0*)* @__captured_stmt1 to void (i32*, i32*, ...)*), i8* [[BITCAST]])
+// CHECK-DEBUG-NEXT: ret i32 0
+// CHECK-DEBUG-NEXT: }
+
+// CHECK-LABEL: define internal void @__captured_stmt1(i32* %.global_tid., i32* %.bound_tid., %struct.anon.0* %__context)
+// CHECK: [[CONTEXT_ADDR:%.+]] = alloca %struct.anon.0*
+// CHECK: store %struct.anon.0* %__context, %struct.anon.0** [[CONTEXT_ADDR]]
+// CHECK: [[CONTEXT_PTR:%.+]] = load %struct.anon.0** [[CONTEXT_ADDR]]
+// CHECK-NEXT: [[ARGC_PTR_REF:%.+]] = getelementptr inbounds %struct.anon.0* [[CONTEXT_PTR]], i32 0, i32 0
+// CHECK-NEXT: [[ARGC_REF:%.+]] = load i8**** [[ARGC_PTR_REF]]
+// CHECK-NEXT: [[ARGC:%.+]] = load i8*** [[ARGC_REF]]
+// CHECK-NEXT: invoke void [[FOO1:@.+foo.+]](i8** [[ARGC]])
+// CHECK: ret void
+// CHECK: call void @{{.+terminate.*}}(
+// CHECK-NEXT: unreachable
+// CHECK-NEXT: }
+// CHECK-DEBUG-LABEL: define internal void @__captured_stmt1(i32* %.global_tid., i32* %.bound_tid., %struct.anon.0* %__context)
+// CHECK-DEBUG: [[CONTEXT_ADDR:%.+]] = alloca %struct.anon.0*
+// CHECK-DEBUG: store %struct.anon.0* %__context, %struct.anon.0** [[CONTEXT_ADDR]]
+// CHECK-DEBUG: [[CONTEXT_PTR:%.+]] = load %struct.anon.0** [[CONTEXT_ADDR]]
+// CHECK-DEBUG-NEXT: [[ARGC_PTR_REF:%.+]] = getelementptr inbounds %struct.anon.0* [[CONTEXT_PTR]], i32 0, i32 0
+// CHECK-DEBUG-NEXT: [[ARGC_REF:%.+]] = load i8**** [[ARGC_PTR_REF]]
+// CHECK-DEBUG-NEXT: [[ARGC:%.+]] = load i8*** [[ARGC_REF]]
+// CHECK-DEBUG-NEXT: invoke void [[FOO1:@.+foo.+]](i8** [[ARGC]])
+// CHECK-DEBUG: ret void
+// CHECK-DEBUG: call void @{{.+terminate.*}}(
+// CHECK-DEBUG-NEXT: unreachable
+// CHECK-DEBUG-NEXT: }
+
+// CHECK: define linkonce_odr void [[FOO1]](i8** %argc)
+// CHECK-DEBUG: define linkonce_odr void [[FOO1]](i8** %argc)
+
+#endif
diff --git a/test/OpenMP/parallel_copyin_messages.cpp b/test/OpenMP/parallel_copyin_messages.cpp
new file mode 100644
index 000000000000..c1ce363b47bd
--- /dev/null
+++ b/test/OpenMP/parallel_copyin_messages.cpp
@@ -0,0 +1,67 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -o - %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}}
+class S2 {
+ mutable int a;
+public:
+ S2():a(0) { }
+ S2 & operator =(S2 &s2) { return *this; }
+};
+class S3 {
+ int a;
+public:
+ S3():a(0) { }
+ S3 &operator =(S3 &s3) { return *this; }
+};
+class S4 { // expected-note {{'S4' declared here}}
+ int a;
+ S4();
+ S4 &operator =(const S4 &s4);
+public:
+ S4(int v):a(v) { }
+};
+class S5 { // expected-note {{'S5' declared here}}
+ int a;
+ S5():a(0) {}
+ S5 &operator =(const S5 &s5) { return *this; }
+public:
+ S5(int v):a(v) { }
+};
+template <class T>
+class ST {
+public:
+ static T s;
+};
+
+
+S2 k;
+S3 h;
+S4 l(3); // expected-note {{'l' defined here}}
+S5 m(4); // expected-note {{'m' defined here}}
+#pragma omp threadprivate(h, k, l, m)
+
+int main(int argc, char **argv) {
+ int i;
+ #pragma omp parallel copyin // expected-error {{expected '(' after 'copyin'}}
+ #pragma omp parallel copyin ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp parallel copyin () // expected-error {{expected expression}}
+ #pragma omp parallel copyin (k // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp parallel copyin (h, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp parallel copyin (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ #pragma omp parallel copyin (l) // expected-error {{copyin variable must have an accessible, unambiguous copy assignment operator}}
+ #pragma omp parallel copyin (S1) // expected-error {{'S1' does not refer to a value}}
+ #pragma omp parallel copyin (argv[1]) // expected-error {{expected variable name}}
+ #pragma omp parallel copyin(i) // expected-error {{copyin variable must be threadprivate}}
+ #pragma omp parallel copyin(m) // expected-error {{copyin variable must have an accessible, unambiguous copy assignment operator}}
+ #pragma omp parallel copyin(ST<int>::s) // expected-error {{copyin variable must be threadprivate}}
+ foo();
+
+ return 0;
+}
diff --git a/test/OpenMP/parallel_default_messages.cpp b/test/OpenMP/parallel_default_messages.cpp
index cbc6a73fe35d..6014cdfd4bcc 100644
--- a/test/OpenMP/parallel_default_messages.cpp
+++ b/test/OpenMP/parallel_default_messages.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -o - %s
void foo();
diff --git a/test/OpenMP/parallel_firstprivate_messages.cpp b/test/OpenMP/parallel_firstprivate_messages.cpp
index 780059e282bf..9df45c60e708 100644
--- a/test/OpenMP/parallel_firstprivate_messages.cpp
+++ b/test/OpenMP/parallel_firstprivate_messages.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s
void foo() {
}
diff --git a/test/OpenMP/parallel_for_ast_print.cpp b/test/OpenMP/parallel_for_ast_print.cpp
new file mode 100644
index 000000000000..375664f4243d
--- /dev/null
+++ b/test/OpenMP/parallel_for_ast_print.cpp
@@ -0,0 +1,64 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ast-print %s | FileCheck %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -emit-pch -o %t %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
+// expected-no-diagnostics
+
+#ifndef HEADER
+#define HEADER
+
+void foo() {}
+
+template <class T, int N>
+T tmain(T argc) {
+ T b = argc, c, d, e, f, h;
+ static T a;
+// CHECK: static T a;
+ static T g;
+#pragma omp threadprivate(g)
+#pragma omp parallel for schedule(dynamic) default(none) copyin(g)
+ // CHECK: #pragma omp parallel for schedule(dynamic) default(none) copyin(g)
+ for (int i = 0; i < 2; ++i)
+ a = 2;
+// CHECK-NEXT: for (int i = 0; i < 2; ++i)
+// CHECK-NEXT: a = 2;
+#pragma omp parallel for private(argc, b), firstprivate(c, d), lastprivate(d, f) collapse(N) schedule(static, N) ordered if (argc) num_threads(N) default(shared) shared(e) reduction(+ : h)
+ for (int i = 0; i < 10; ++i)
+ for (int j = 0; j < 10; ++j)
+ for (int j = 0; j < 10; ++j)
+ for (int j = 0; j < 10; ++j)
+ for (int j = 0; j < 10; ++j)
+ foo();
+ // CHECK-NEXT: #pragma omp parallel for private(argc,b) firstprivate(c,d) lastprivate(d,f) collapse(N) schedule(static, N) ordered if(argc) num_threads(N) default(shared) shared(e) reduction(+: h)
+ // CHECK-NEXT: for (int i = 0; i < 10; ++i)
+ // CHECK-NEXT: for (int j = 0; j < 10; ++j)
+ // CHECK-NEXT: for (int j = 0; j < 10; ++j)
+ // CHECK-NEXT: for (int j = 0; j < 10; ++j)
+ // CHECK-NEXT: for (int j = 0; j < 10; ++j)
+ // CHECK-NEXT: foo();
+ return T();
+}
+
+int main(int argc, char **argv) {
+ int b = argc, c, d, e, f, h;
+ static int a;
+// CHECK: static int a;
+ static float g;
+#pragma omp threadprivate(g)
+#pragma omp parallel for schedule(guided, argc) default(none) copyin(g)
+ // CHECK: #pragma omp parallel for schedule(guided, argc) default(none) copyin(g)
+ for (int i = 0; i < 2; ++i)
+ a = 2;
+// CHECK-NEXT: for (int i = 0; i < 2; ++i)
+// CHECK-NEXT: a = 2;
+#pragma omp parallel for private(argc, b), firstprivate(argv, c), lastprivate(d, f) collapse(2) schedule(auto) ordered if (argc) num_threads(a) default(shared) shared(e) reduction(+ : h)
+ for (int i = 0; i < 10; ++i)
+ for (int j = 0; j < 10; ++j)
+ foo();
+ // CHECK-NEXT: #pragma omp parallel for private(argc,b) firstprivate(argv,c) lastprivate(d,f) collapse(2) schedule(auto) ordered if(argc) num_threads(a) default(shared) shared(e) reduction(+: h)
+ // CHECK-NEXT: for (int i = 0; i < 10; ++i)
+ // CHECK-NEXT: for (int j = 0; j < 10; ++j)
+ // CHECK-NEXT: foo();
+ return (tmain<int, 5>(argc) + tmain<char, 1>(argv[0][0]));
+}
+
+#endif
diff --git a/test/OpenMP/parallel_for_collapse_messages.cpp b/test/OpenMP/parallel_for_collapse_messages.cpp
new file mode 100644
index 000000000000..06dfe0f77721
--- /dev/null
+++ b/test/OpenMP/parallel_for_collapse_messages.cpp
@@ -0,0 +1,83 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}}
+
+template <class T, typename S, int N, int ST> // expected-note {{declared here}}
+T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+ #pragma omp parallel for collapse // expected-error {{expected '(' after 'collapse'}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp parallel for collapse ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp parallel for collapse () // expected-error {{expected expression}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ // expected-error@+3 {{expected ')'}} expected-note@+3 {{to match this '('}}
+ // expected-error@+2 2 {{expression is not an integral constant expression}}
+ // expected-note@+1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ #pragma omp parallel for collapse (argc
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ // expected-error@+1 2 {{argument to 'collapse' clause must be a positive integer value}}
+ #pragma omp parallel for collapse (ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp parallel for collapse (1)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp parallel for collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp parallel for', but found only 1}}
+ // expected-error@+3 2 {{directive '#pragma omp parallel for' cannot contain more than one 'collapse' clause}}
+ // expected-error@+2 2 {{argument to 'collapse' clause must be a positive integer value}}
+ // expected-error@+1 2 {{expression is not an integral constant expression}}
+ #pragma omp parallel for collapse (foobool(argc)), collapse (true), collapse (-5)
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp parallel for collapse (S) // expected-error {{'S' does not refer to a value}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ // expected-error@+1 2 {{expression is not an integral constant expression}}
+ #pragma omp parallel for collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp parallel for collapse (1)
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp parallel for collapse (N) // expected-error {{argument to 'collapse' clause must be a positive integer value}}
+ for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp parallel for collapse (2) // expected-note {{as specified in 'collapse' clause}}
+ foo(); // expected-error {{expected 2 for loops after '#pragma omp parallel for'}}
+ return argc;
+}
+
+int main(int argc, char **argv) {
+ #pragma omp parallel for collapse // expected-error {{expected '(' after 'collapse'}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp parallel for collapse ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp parallel for collapse () // expected-error {{expected expression}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp parallel for collapse (4 // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-note {{as specified in 'collapse' clause}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp parallel for', but found only 1}}
+ #pragma omp parallel for collapse (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}} expected-note {{as specified in 'collapse' clause}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp parallel for', but found only 1}}
+ #pragma omp parallel for collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{expression is not an integral constant expression}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ // expected-error@+3 {{expression is not an integral constant expression}}
+ // expected-error@+2 2 {{directive '#pragma omp parallel for' cannot contain more than one 'collapse' clause}}
+ // expected-error@+1 2 {{argument to 'collapse' clause must be a positive integer value}}
+ #pragma omp parallel for collapse (foobool(argc)), collapse (true), collapse (-5)
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp parallel for collapse (S1) // expected-error {{'S1' does not refer to a value}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ // expected-error@+1 {{expression is not an integral constant expression}}
+ #pragma omp parallel for collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ // expected-error@+3 {{statement after '#pragma omp parallel for' must be a for loop}}
+ // expected-note@+1 {{in instantiation of function template specialization 'tmain<int, char, -1, -2>' requested here}}
+ #pragma omp parallel for collapse(collapse(tmain<int, char, -1, -2>(argc, argv) // expected-error 2 {{expected ')'}} expected-note 2 {{to match this '('}}
+ foo();
+ #pragma omp parallel for collapse (2) // expected-note {{as specified in 'collapse' clause}}
+ foo(); // expected-error {{expected 2 for loops after '#pragma omp parallel for'}}
+ // expected-note@+1 {{in instantiation of function template specialization 'tmain<int, char, 1, 0>' requested here}}
+ return tmain<int, char, 1, 0>(argc, argv);
+}
+
diff --git a/test/OpenMP/parallel_for_copyin_messages.cpp b/test/OpenMP/parallel_for_copyin_messages.cpp
new file mode 100644
index 000000000000..2ebc2ded7387
--- /dev/null
+++ b/test/OpenMP/parallel_for_copyin_messages.cpp
@@ -0,0 +1,93 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -o - %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}}
+class S2 {
+ mutable int a;
+
+public:
+ S2() : a(0) {}
+ S2 &operator=(S2 &s2) { return *this; }
+};
+class S3 {
+ int a;
+
+public:
+ S3() : a(0) {}
+ S3 &operator=(S3 &s3) { return *this; }
+};
+class S4 { // expected-note {{'S4' declared here}}
+ int a;
+ S4();
+ S4 &operator=(const S4 &s4);
+
+public:
+ S4(int v) : a(v) {}
+};
+class S5 { // expected-note {{'S5' declared here}}
+ int a;
+ S5() : a(0) {}
+ S5 &operator=(const S5 &s5) { return *this; }
+
+public:
+ S5(int v) : a(v) {}
+};
+template <class T>
+class ST {
+public:
+ static T s;
+};
+
+S2 k;
+S3 h;
+S4 l(3); // expected-note {{'l' defined here}}
+S5 m(4); // expected-note {{'m' defined here}}
+#pragma omp threadprivate(h, k, l, m)
+
+int main(int argc, char **argv) {
+ int i;
+#pragma omp parallel for copyin // expected-error {{expected '(' after 'copyin'}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for copyin( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for copyin() // expected-error {{expected expression}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for copyin(k // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for copyin(h, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for copyin(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for copyin(l) // expected-error {{copyin variable must have an accessible, unambiguous copy assignment operator}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for copyin(S1) // expected-error {{'S1' does not refer to a value}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for copyin(argv[1]) // expected-error {{expected variable name}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for copyin(i) // expected-error {{copyin variable must be threadprivate}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for copyin(m) // expected-error {{copyin variable must have an accessible, unambiguous copy assignment operator}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for copyin(ST < int > ::s) // expected-error {{copyin variable must be threadprivate}}
+ for (i = 0; i < argc; ++i)
+ foo();
+
+ return 0;
+}
diff --git a/test/OpenMP/parallel_for_default_messages.cpp b/test/OpenMP/parallel_for_default_messages.cpp
new file mode 100644
index 000000000000..ed478a8c9721
--- /dev/null
+++ b/test/OpenMP/parallel_for_default_messages.cpp
@@ -0,0 +1,36 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -o - %s
+
+void foo();
+
+int main(int argc, char **argv) {
+ int i;
+#pragma omp parallel for default // expected-error {{expected '(' after 'default'}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for default( // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for default() // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for default(none // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
+ foo();
+#pragma omp parallel for default(shared), default(shared) // expected-error {{directive '#pragma omp parallel for' cannot contain more than one 'default' clause}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for default(x) // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}}
+ for (i = 0; i < argc; ++i)
+ foo();
+
+#pragma omp parallel for default(none)
+ for (i = 0; i < argc; ++i) // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
+ foo();
+
+#pragma omp parallel default(none)
+#pragma omp parallel for default(shared)
+ for (i = 0; i < argc; ++i)
+ foo();
+
+ return 0;
+}
diff --git a/test/OpenMP/parallel_for_firstprivate_messages.cpp b/test/OpenMP/parallel_for_firstprivate_messages.cpp
new file mode 100644
index 000000000000..99dd68f3cbfa
--- /dev/null
+++ b/test/OpenMP/parallel_for_firstprivate_messages.cpp
@@ -0,0 +1,252 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+
+public:
+ S2() : a(0) {}
+ S2(S2 &s2) : a(s2.a) {}
+ static float S2s;
+ static const float S2sc;
+};
+const float S2::S2sc = 0;
+const S2 b;
+const S2 ba[5];
+class S3 {
+ int a;
+ S3 &operator=(const S3 &s3);
+
+public:
+ S3() : a(0) {}
+ S3(S3 &s3) : a(s3.a) {}
+};
+const S3 c;
+const S3 ca[5];
+extern const int f;
+class S4 { // expected-note 2 {{'S4' declared here}}
+ int a;
+ S4();
+ S4(const S4 &s4);
+
+public:
+ S4(int v) : a(v) {}
+};
+class S5 { // expected-note 4 {{'S5' declared here}}
+ int a;
+ S5(const S5 &s5) : a(s5.a) {}
+
+public:
+ S5() : a(0) {}
+ S5(int v) : a(v) {}
+};
+class S6 {
+ int a;
+ S6() : a(0) {}
+
+public:
+ S6(const S6 &s6) : a(s6.a) {}
+ S6(int v) : a(v) {}
+};
+
+S3 h;
+#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
+
+template <class I, class C>
+int foomain(int argc, char **argv) {
+ I e(4); // expected-note {{'e' defined here}}
+ C g(5); // expected-note 2 {{'g' defined here}}
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp parallel for firstprivate // expected-error {{expected '(' after 'firstprivate'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for firstprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for firstprivate() // expected-error {{expected expression}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for firstprivate(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for firstprivate(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for firstprivate(argc)
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for firstprivate(argv[1]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for firstprivate(e, g) // expected-error 2 {{firstprivate variable must have an accessible, unambiguous copy constructor}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for linear(i) // expected-error {{unexpected OpenMP clause 'linear' in directive '#pragma omp parallel for'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+ {
+ int v = 0;
+ int i;
+#pragma omp parallel for firstprivate(i)
+ for (int k = 0; k < argc; ++k) {
+ i = k;
+ v += i;
+ }
+ }
+#pragma omp parallel shared(i)
+#pragma omp parallel private(i)
+#pragma omp parallel for firstprivate(j) // expected-error {{arguments of OpenMP clause 'firstprivate' cannot be of reference type}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for firstprivate(i)
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for lastprivate(g) firstprivate(g) // expected-error {{firstprivate variable must have an accessible, unambiguous copy constructor}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel private(i)
+#pragma omp parallel for firstprivate(i) // expected-note {{defined as firstprivate}}
+ for (i = 0; i < argc; ++i) // expected-error {{loop iteration variable in the associated loop of 'omp parallel for' directive may not be firstprivate, predetermined as private}}
+ foo();
+#pragma omp parallel reduction(+ : i)
+#pragma omp parallel for firstprivate(i) // expected-note {{defined as firstprivate}}
+ for (i = 0; i < argc; ++i) // expected-error {{loop iteration variable in the associated loop of 'omp parallel for' directive may not be firstprivate, predetermined as private}}
+ foo();
+ return 0;
+}
+
+int main(int argc, char **argv) {
+ const int d = 5;
+ const int da[5] = {0};
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note 2 {{'g' defined here}}
+ S3 m;
+ S6 n(2);
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp parallel for firstprivate // expected-error {{expected '(' after 'firstprivate'}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for firstprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for firstprivate() // expected-error {{expected expression}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for firstprivate(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for firstprivate(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for firstprivate(argc)
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for firstprivate(argv[1]) // expected-error {{expected variable name}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for firstprivate(2 * 2) // expected-error {{expected variable name}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for firstprivate(ba) // OK
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for firstprivate(ca) // OK
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for firstprivate(da) // OK
+ for (i = 0; i < argc; ++i)
+ foo();
+ int xa;
+#pragma omp parallel for firstprivate(xa) // OK
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for firstprivate(S2::S2s) // OK
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for firstprivate(S2::S2sc) // OK
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for safelen(5) // expected-error {{unexpected OpenMP clause 'safelen' in directive '#pragma omp parallel for'}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for firstprivate(e, g) // expected-error 2 {{firstprivate variable must have an accessible, unambiguous copy constructor}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for firstprivate(m) // OK
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for private(xa), firstprivate(xa) // expected-error {{private variable cannot be firstprivate}} expected-note {{defined as private}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for firstprivate(i) // expected-note {{defined as firstprivate}}
+ for (i = 0; i < argc; ++i) // expected-error {{loop iteration variable in the associated loop of 'omp parallel for' directive may not be firstprivate, predetermined as private}}
+ foo();
+#pragma omp parallel shared(xa)
+#pragma omp parallel for firstprivate(xa) // OK: may be firstprivate
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for firstprivate(j) // expected-error {{arguments of OpenMP clause 'firstprivate' cannot be of reference type}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for lastprivate(g) firstprivate(g) // expected-error {{firstprivate variable must have an accessible, unambiguous copy constructor}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for lastprivate(n) firstprivate(n) // OK
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+ {
+ int v = 0;
+ int i;
+#pragma omp parallel for firstprivate(i)
+ for (int k = 0; k < argc; ++k) {
+ i = k;
+ v += i;
+ }
+ }
+#pragma omp parallel private(i)
+#pragma omp parallel for firstprivate(i) // expected-note {{defined as firstprivate}}
+ for (i = 0; i < argc; ++i) // expected-error {{loop iteration variable in the associated loop of 'omp parallel for' directive may not be firstprivate, predetermined as private}}
+ foo();
+#pragma omp parallel reduction(+ : i)
+#pragma omp parallel for firstprivate(i) // expected-note {{defined as firstprivate}}
+ for (i = 0; i < argc; ++i) // expected-error {{loop iteration variable in the associated loop of 'omp parallel for' directive may not be firstprivate, predetermined as private}}
+ foo();
+
+ return foomain<S4, S5>(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<S4, S5>' requested here}}
+}
diff --git a/test/OpenMP/parallel_for_if_messages.cpp b/test/OpenMP/parallel_for_if_messages.cpp
new file mode 100644
index 000000000000..295d7398b839
--- /dev/null
+++ b/test/OpenMP/parallel_for_if_messages.cpp
@@ -0,0 +1,69 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}}
+
+template <class T, class S> // expected-note {{declared here}}
+int tmain(T argc, S **argv) {
+ T i;
+ #pragma omp parallel for if // expected-error {{expected '(' after 'if'}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for if () // expected-error {{expected expression}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for if (argc > 0 ? argv[1] : argv[2])
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp parallel for' cannot contain more than one 'if' clause}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for if (S) // expected-error {{'S' does not refer to a value}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for if(argc)
+ for (i = 0; i < argc; ++i) foo();
+
+ return 0;
+}
+
+int main(int argc, char **argv) {
+ int i;
+ #pragma omp parallel for if // expected-error {{expected '(' after 'if'}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for if () // expected-error {{expected expression}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for if (argc > 0 ? argv[1] : argv[2])
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp parallel for' cannot contain more than one 'if' clause}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for if (S1) // expected-error {{'S1' does not refer to a value}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for if (1 0) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for if(if(tmain(argc, argv) // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i) foo();
+
+ return tmain(argc, argv);
+}
diff --git a/test/OpenMP/parallel_for_lastprivate_messages.cpp b/test/OpenMP/parallel_for_lastprivate_messages.cpp
new file mode 100644
index 000000000000..bd1dd4b52768
--- /dev/null
+++ b/test/OpenMP/parallel_for_lastprivate_messages.cpp
@@ -0,0 +1,226 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+
+public:
+ S2() : a(0) {}
+ S2(S2 &s2) : a(s2.a) {}
+ static float S2s; // expected-note {{static data member is predetermined as shared}}
+ static const float S2sc;
+};
+const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const S2 b;
+const S2 ba[5];
+class S3 { // expected-note 2 {{'S3' declared here}}
+ int a;
+ S3 &operator=(const S3 &s3);
+
+public:
+ S3() : a(0) {}
+ S3(S3 &s3) : a(s3.a) {}
+};
+const S3 c; // expected-note {{global variable is predetermined as shared}}
+const S3 ca[5]; // expected-note {{global variable is predetermined as shared}}
+extern const int f; // expected-note {{global variable is predetermined as shared}}
+class S4 { // expected-note 3 {{'S4' declared here}}
+ int a;
+ S4();
+ S4(const S4 &s4);
+
+public:
+ S4(int v) : a(v) {}
+};
+class S5 { // expected-note {{'S5' declared here}}
+ int a;
+ S5() : a(0) {}
+
+public:
+ S5(const S5 &s5) : a(s5.a) {}
+ S5(int v) : a(v) {}
+};
+class S6 {
+ int a;
+ S6() : a(0) {}
+
+public:
+ S6(const S6 &s6) : a(s6.a) {}
+ S6(int v) : a(v) {}
+};
+
+S3 h;
+#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
+
+template <class I, class C>
+int foomain(int argc, char **argv) {
+ I e(4); // expected-note {{'e' defined here}}
+ I g(5); // expected-note {{'g' defined here}}
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp parallel for lastprivate // expected-error {{expected '(' after 'lastprivate'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for lastprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for lastprivate() // expected-error {{expected expression}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for lastprivate(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for lastprivate(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for lastprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for lastprivate(argc)
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for lastprivate(S1) // expected-error {{'S1' does not refer to a value}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for lastprivate(argv[1]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for lastprivate(e, g) // expected-error 2 {{lastprivate variable must have an accessible, unambiguous default constructor}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for linear(i) // expected-error {{unexpected OpenMP clause 'linear' in directive '#pragma omp parallel for'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+ {
+ int v = 0;
+ int i;
+#pragma omp parallel for lastprivate(i)
+ for (int k = 0; k < argc; ++k) {
+ i = k;
+ v += i;
+ }
+ }
+#pragma omp parallel shared(i)
+#pragma omp parallel private(i)
+#pragma omp parallel for lastprivate(j) // expected-error {{arguments of OpenMP clause 'lastprivate' cannot be of reference type}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for lastprivate(i)
+ for (int k = 0; k < argc; ++k)
+ ++k;
+ return 0;
+}
+
+int main(int argc, char **argv) {
+ const int d = 5; // expected-note {{constant variable is predetermined as shared}}
+ const int da[5] = {0}; // expected-note {{constant variable is predetermined as shared}}
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note {{'g' defined here}}
+ S3 m; // expected-note 2 {{'m' defined here}}
+ S6 n(2);
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp parallel for lastprivate // expected-error {{expected '(' after 'lastprivate'}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for lastprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for lastprivate() // expected-error {{expected expression}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for lastprivate(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for lastprivate(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for lastprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for lastprivate(argc)
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for lastprivate(S1) // expected-error {{'S1' does not refer to a value}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for lastprivate(argv[1]) // expected-error {{expected variable name}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for lastprivate(2 * 2) // expected-error {{expected variable name}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for lastprivate(ba)
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for lastprivate(da) // expected-error {{shared variable cannot be lastprivate}}
+ for (i = 0; i < argc; ++i)
+ foo();
+ int xa;
+#pragma omp parallel for lastprivate(xa) // OK
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for lastprivate(S2::S2s) // expected-error {{shared variable cannot be lastprivate}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for safelen(5) // expected-error {{unexpected OpenMP clause 'safelen' in directive '#pragma omp parallel for'}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for lastprivate(e, g) // expected-error 2 {{lastprivate variable must have an accessible, unambiguous default constructor}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for lastprivate(m) // expected-error {{lastprivate variable must have an accessible, unambiguous copy assignment operator}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for private(xa), lastprivate(xa) // expected-error {{private variable cannot be lastprivate}} expected-note {{defined as private}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for lastprivate(i)
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel private(xa)
+#pragma omp parallel for lastprivate(xa)
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel reduction(+ : xa)
+#pragma omp parallel for lastprivate(xa)
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for lastprivate(j) // expected-error {{arguments of OpenMP clause 'lastprivate' cannot be of reference type}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for firstprivate(m) lastprivate(m) // expected-error {{lastprivate variable must have an accessible, unambiguous copy assignment operator}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for lastprivate(n) firstprivate(n) // OK
+ for (i = 0; i < argc; ++i)
+ foo();
+ return foomain<S4, S5>(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<S4, S5>' requested here}}
+}
diff --git a/test/OpenMP/parallel_for_loop_messages.cpp b/test/OpenMP/parallel_for_loop_messages.cpp
new file mode 100644
index 000000000000..f029ef4d76cb
--- /dev/null
+++ b/test/OpenMP/parallel_for_loop_messages.cpp
@@ -0,0 +1,593 @@
+// RUN: %clang_cc1 -fsyntax-only -fopenmp=libiomp5 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+
+class S {
+ int a;
+ S() : a(0) {}
+
+public:
+ S(int v) : a(v) {}
+ S(const S &s) : a(s.a) {}
+};
+
+static int sii;
+#pragma omp threadprivate(sii) // expected-note {{defined as threadprivate or thread local}}
+
+int test_iteration_spaces() {
+ const int N = 100;
+ float a[N], b[N], c[N];
+ int ii, jj, kk;
+ float fii;
+ double dii;
+#pragma omp parallel for
+ for (int i = 0; i < 10; i += 1) {
+ c[i] = a[i] + b[i];
+ }
+#pragma omp parallel for
+ for (char i = 0; i < 10; i++) {
+ c[i] = a[i] + b[i];
+ }
+#pragma omp parallel for
+ for (char i = 0; i < 10; i += '\1') {
+ c[i] = a[i] + b[i];
+ }
+#pragma omp parallel for
+ for (long long i = 0; i < 10; i++) {
+ c[i] = a[i] + b[i];
+ }
+// expected-error@+2 {{expression must have integral or unscoped enumeration type, not 'double'}}
+#pragma omp parallel for
+ for (long long i = 0; i < 10; i += 1.5) {
+ c[i] = a[i] + b[i];
+ }
+#pragma omp parallel for
+ for (long long i = 0; i < 'z'; i += 1u) {
+ c[i] = a[i] + b[i];
+ }
+// expected-error@+2 {{variable must be of integer or random access iterator type}}
+#pragma omp parallel for
+ for (float fi = 0; fi < 10.0; fi++) {
+ c[(int)fi] = a[(int)fi] + b[(int)fi];
+ }
+// expected-error@+2 {{variable must be of integer or random access iterator type}}
+#pragma omp parallel for
+ for (double fi = 0; fi < 10.0; fi++) {
+ c[(int)fi] = a[(int)fi] + b[(int)fi];
+ }
+// expected-error@+2 {{variable must be of integer or random access iterator type}}
+#pragma omp parallel for
+ for (int &ref = ii; ref < 10; ref++) {
+ }
+// expected-error@+2 {{initialization clause of OpenMP for loop must be of the form 'var = init' or 'T var = init'}}
+#pragma omp parallel for
+ for (int i; i < 10; i++)
+ c[i] = a[i];
+
+// expected-error@+2 {{initialization clause of OpenMP for loop must be of the form 'var = init' or 'T var = init'}}
+#pragma omp parallel for
+ for (int i = 0, j = 0; i < 10; ++i)
+ c[i] = a[i];
+
+// expected-error@+2 {{initialization clause of OpenMP for loop must be of the form 'var = init' or 'T var = init'}}
+#pragma omp parallel for
+ for (; ii < 10; ++ii)
+ c[ii] = a[ii];
+
+// expected-warning@+3 {{expression result unused}}
+// expected-error@+2 {{initialization clause of OpenMP for loop must be of the form 'var = init' or 'T var = init'}}
+#pragma omp parallel for
+ for (ii + 1; ii < 10; ++ii)
+ c[ii] = a[ii];
+
+// expected-error@+2 {{initialization clause of OpenMP for loop must be of the form 'var = init' or 'T var = init'}}
+#pragma omp parallel for
+ for (c[ii] = 0; ii < 10; ++ii)
+ c[ii] = a[ii];
+
+// Ok to skip parenthesises.
+#pragma omp parallel for
+ for (((ii)) = 0; ii < 10; ++ii)
+ c[ii] = a[ii];
+
+// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
+#pragma omp parallel for
+ for (int i = 0; i; i++)
+ c[i] = a[i];
+
+// expected-error@+3 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
+// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'i'}}
+#pragma omp parallel for
+ for (int i = 0; jj < kk; ii++)
+ c[i] = a[i];
+
+// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
+#pragma omp parallel for
+ for (int i = 0; !!i; i++)
+ c[i] = a[i];
+
+// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
+#pragma omp parallel for
+ for (int i = 0; i != 1; i++)
+ c[i] = a[i];
+
+// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
+#pragma omp parallel for
+ for (int i = 0;; i++)
+ c[i] = a[i];
+
+// Ok.
+#pragma omp parallel for
+ for (int i = 11; i > 10; i--)
+ c[i] = a[i];
+
+// Ok.
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i)
+ c[i] = a[i];
+
+// Ok.
+#pragma omp parallel for
+ for (ii = 0; ii < 10; ++ii)
+ c[ii] = a[ii];
+
+// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
+#pragma omp parallel for
+ for (ii = 0; ii < 10; ++jj)
+ c[ii] = a[jj];
+
+// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
+#pragma omp parallel for
+ for (ii = 0; ii < 10; ++++ii)
+ c[ii] = a[ii];
+
+// Ok but undefined behavior (in general, cannot check that incr
+// is really loop-invariant).
+#pragma omp parallel for
+ for (ii = 0; ii < 10; ii = ii + ii)
+ c[ii] = a[ii];
+
+// expected-error@+2 {{expression must have integral or unscoped enumeration type, not 'float'}}
+#pragma omp parallel for
+ for (ii = 0; ii < 10; ii = ii + 1.0f)
+ c[ii] = a[ii];
+
+// Ok - step was converted to integer type.
+#pragma omp parallel for
+ for (ii = 0; ii < 10; ii = ii + (int)1.1f)
+ c[ii] = a[ii];
+
+// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
+#pragma omp parallel for
+ for (ii = 0; ii < 10; jj = ii + 2)
+ c[ii] = a[ii];
+
+// expected-warning@+3 {{relational comparison result unused}}
+// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
+#pragma omp parallel for
+ for (ii = 0; ii<10; jj> kk + 2)
+ c[ii] = a[ii];
+
+// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
+#pragma omp parallel for
+ for (ii = 0; ii < 10;)
+ c[ii] = a[ii];
+
+// expected-warning@+3 {{expression result unused}}
+// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
+#pragma omp parallel for
+ for (ii = 0; ii < 10; !ii)
+ c[ii] = a[ii];
+
+// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
+#pragma omp parallel for
+ for (ii = 0; ii < 10; ii ? ++ii : ++jj)
+ c[ii] = a[ii];
+
+// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
+#pragma omp parallel for
+ for (ii = 0; ii < 10; ii = ii < 10)
+ c[ii] = a[ii];
+
+// expected-note@+3 {{loop step is expected to be positive due to this condition}}
+// expected-error@+2 {{increment expression must cause 'ii' to increase on each iteration of OpenMP for loop}}
+#pragma omp parallel for
+ for (ii = 0; ii < 10; ii = ii + 0)
+ c[ii] = a[ii];
+
+// expected-note@+3 {{loop step is expected to be positive due to this condition}}
+// expected-error@+2 {{increment expression must cause 'ii' to increase on each iteration of OpenMP for loop}}
+#pragma omp parallel for
+ for (ii = 0; ii < 10; ii = ii + (int)(0.8 - 0.45))
+ c[ii] = a[ii];
+
+// expected-note@+3 {{loop step is expected to be positive due to this condition}}
+// expected-error@+2 {{increment expression must cause 'ii' to increase on each iteration of OpenMP for loop}}
+#pragma omp parallel for
+ for (ii = 0; (ii) < 10; ii -= 25)
+ c[ii] = a[ii];
+
+// expected-note@+3 {{loop step is expected to be positive due to this condition}}
+// expected-error@+2 {{increment expression must cause 'ii' to increase on each iteration of OpenMP for loop}}
+#pragma omp parallel for
+ for (ii = 0; (ii < 10); ii -= 0)
+ c[ii] = a[ii];
+
+// expected-note@+3 {{loop step is expected to be negative due to this condition}}
+// expected-error@+2 {{increment expression must cause 'ii' to decrease on each iteration of OpenMP for loop}}
+#pragma omp parallel for
+ for (ii = 0; ii > 10; (ii += 0))
+ c[ii] = a[ii];
+
+// expected-note@+3 {{loop step is expected to be positive due to this condition}}
+// expected-error@+2 {{increment expression must cause 'ii' to increase on each iteration of OpenMP for loop}}
+#pragma omp parallel for
+ for (ii = 0; ii < 10; (ii) = (1 - 1) + (ii))
+ c[ii] = a[ii];
+
+// expected-note@+3 {{loop step is expected to be negative due to this condition}}
+// expected-error@+2 {{increment expression must cause 'ii' to decrease on each iteration of OpenMP for loop}}
+#pragma omp parallel for
+ for ((ii = 0); ii > 10; (ii -= 0))
+ c[ii] = a[ii];
+
+// expected-note@+3 {{loop step is expected to be positive due to this condition}}
+// expected-error@+2 {{increment expression must cause 'ii' to increase on each iteration of OpenMP for loop}}
+#pragma omp parallel for
+ for (ii = 0; (ii < 10); (ii -= 0))
+ c[ii] = a[ii];
+
+// expected-note@+2 {{defined as firstprivate}}
+// expected-error@+2 {{loop iteration variable in the associated loop of 'omp parallel for' directive may not be firstprivate, predetermined as private}}
+#pragma omp parallel for firstprivate(ii)
+ for (ii = 0; ii < 10; ii++)
+ c[ii] = a[ii];
+
+// expected-error@+3 {{unexpected OpenMP clause 'linear' in directive '#pragma omp parallel for'}}
+// expected-note@+2 {{defined as linear}}
+// expected-error@+2 {{loop iteration variable in the associated loop of 'omp parallel for' directive may not be linear, predetermined as private}}
+#pragma omp parallel for linear(ii)
+ for (ii = 0; ii < 10; ii++)
+ c[ii] = a[ii];
+
+#pragma omp parallel for private(ii)
+ for (ii = 0; ii < 10; ii++)
+ c[ii] = a[ii];
+
+#pragma omp parallel for lastprivate(ii)
+ for (ii = 0; ii < 10; ii++)
+ c[ii] = a[ii];
+
+ {
+// expected-error@+2 {{loop iteration variable in the associated loop of 'omp parallel for' directive may not be threadprivate or thread local, predetermined as private}}
+#pragma omp parallel for
+ for (sii = 0; sii < 10; sii += 1)
+ c[sii] = a[sii];
+ }
+
+// expected-error@+2 {{statement after '#pragma omp parallel for' must be a for loop}}
+#pragma omp parallel for
+ for (auto &item : a) {
+ item = item + 1;
+ }
+
+// expected-note@+3 {{loop step is expected to be positive due to this condition}}
+// expected-error@+2 {{increment expression must cause 'i' to increase on each iteration of OpenMP for loop}}
+#pragma omp parallel for
+ for (unsigned i = 9; i < 10; i--) {
+ c[i] = a[i] + b[i];
+ }
+
+ int(*lb)[4] = nullptr;
+#pragma omp parallel for
+ for (int(*p)[4] = lb; p < lb + 8; ++p) {
+ }
+
+// expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}}
+#pragma omp parallel for
+ for (int a{0}; a < 10; ++a) {
+ }
+
+ return 0;
+}
+
+// Iterators allowed in openmp for-loops.
+namespace std {
+struct random_access_iterator_tag {};
+template <class Iter>
+struct iterator_traits {
+ typedef typename Iter::difference_type difference_type;
+ typedef typename Iter::iterator_category iterator_category;
+};
+template <class Iter>
+typename iterator_traits<Iter>::difference_type
+distance(Iter first, Iter last) { return first - last; }
+}
+class Iter0 {
+public:
+ Iter0() {}
+ Iter0(const Iter0 &) {}
+ Iter0 operator++() { return *this; }
+ Iter0 operator--() { return *this; }
+ bool operator<(Iter0 a) { return true; }
+};
+int operator-(Iter0 a, Iter0 b) { return 0; }
+class Iter1 {
+public:
+ Iter1(float f = 0.0f, double d = 0.0) {}
+ Iter1(const Iter1 &) {}
+ Iter1 operator++() { return *this; }
+ Iter1 operator--() { return *this; }
+ bool operator<(Iter1 a) { return true; }
+ bool operator>=(Iter1 a) { return false; }
+};
+class GoodIter {
+public:
+ GoodIter() {}
+ GoodIter(const GoodIter &) {}
+ GoodIter(int fst, int snd) {}
+ GoodIter &operator=(const GoodIter &that) { return *this; }
+ GoodIter &operator=(const Iter0 &that) { return *this; }
+ GoodIter &operator+=(int x) { return *this; }
+ explicit GoodIter(void *) {}
+ GoodIter operator++() { return *this; }
+ GoodIter operator--() { return *this; }
+ bool operator!() { return true; }
+ bool operator<(GoodIter a) { return true; }
+ bool operator<=(GoodIter a) { return true; }
+ bool operator>=(GoodIter a) { return false; }
+ typedef int difference_type;
+ typedef std::random_access_iterator_tag iterator_category;
+};
+int operator-(GoodIter a, GoodIter b) { return 0; }
+GoodIter operator-(GoodIter a) { return a; }
+GoodIter operator-(GoodIter a, int v) { return GoodIter(); }
+GoodIter operator+(GoodIter a, int v) { return GoodIter(); }
+GoodIter operator-(int v, GoodIter a) { return GoodIter(); }
+GoodIter operator+(int v, GoodIter a) { return GoodIter(); }
+
+int test_with_random_access_iterator() {
+ GoodIter begin, end;
+ Iter0 begin0, end0;
+#pragma omp parallel for
+ for (GoodIter I = begin; I < end; ++I)
+ ++I;
+// expected-error@+2 {{variable must be of integer or random access iterator type}}
+#pragma omp parallel for
+ for (GoodIter &I = begin; I < end; ++I)
+ ++I;
+#pragma omp parallel for
+ for (GoodIter I = begin; I >= end; --I)
+ ++I;
+// expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}}
+#pragma omp parallel for
+ for (GoodIter I(begin); I < end; ++I)
+ ++I;
+// expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}}
+#pragma omp parallel for
+ for (GoodIter I(nullptr); I < end; ++I)
+ ++I;
+// expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}}
+#pragma omp parallel for
+ for (GoodIter I(0); I < end; ++I)
+ ++I;
+// expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}}
+#pragma omp parallel for
+ for (GoodIter I(1, 2); I < end; ++I)
+ ++I;
+#pragma omp parallel for
+ for (begin = GoodIter(0); begin < end; ++begin)
+ ++begin;
+#pragma omp parallel for
+ for (begin = begin0; begin < end; ++begin)
+ ++begin;
+// expected-error@+2 {{initialization clause of OpenMP for loop must be of the form 'var = init' or 'T var = init'}}
+#pragma omp parallel for
+ for (++begin; begin < end; ++begin)
+ ++begin;
+#pragma omp parallel for
+ for (begin = end; begin < end; ++begin)
+ ++begin;
+// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'I'}}
+#pragma omp parallel for
+ for (GoodIter I = begin; I - I; ++I)
+ ++I;
+// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'I'}}
+#pragma omp parallel for
+ for (GoodIter I = begin; begin < end; ++I)
+ ++I;
+// expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'I'}}
+#pragma omp parallel for
+ for (GoodIter I = begin; !I; ++I)
+ ++I;
+// expected-note@+3 {{loop step is expected to be negative due to this condition}}
+// expected-error@+2 {{increment expression must cause 'I' to decrease on each iteration of OpenMP for loop}}
+#pragma omp parallel for
+ for (GoodIter I = begin; I >= end; I = I + 1)
+ ++I;
+#pragma omp parallel for
+ for (GoodIter I = begin; I >= end; I = I - 1)
+ ++I;
+// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'I'}}
+#pragma omp parallel for
+ for (GoodIter I = begin; I >= end; I = -I)
+ ++I;
+// expected-note@+3 {{loop step is expected to be negative due to this condition}}
+// expected-error@+2 {{increment expression must cause 'I' to decrease on each iteration of OpenMP for loop}}
+#pragma omp parallel for
+ for (GoodIter I = begin; I >= end; I = 2 + I)
+ ++I;
+// expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'I'}}
+#pragma omp parallel for
+ for (GoodIter I = begin; I >= end; I = 2 - I)
+ ++I;
+#pragma omp parallel for
+ for (Iter0 I = begin0; I < end0; ++I)
+ ++I;
+// Initializer is constructor without params.
+// expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}}
+#pragma omp parallel for
+ for (Iter0 I; I < end0; ++I)
+ ++I;
+ Iter1 begin1, end1;
+#pragma omp parallel for
+ for (Iter1 I = begin1; I < end1; ++I)
+ ++I;
+// expected-note@+3 {{loop step is expected to be negative due to this condition}}
+// expected-error@+2 {{increment expression must cause 'I' to decrease on each iteration of OpenMP for loop}}
+#pragma omp parallel for
+ for (Iter1 I = begin1; I >= end1; ++I)
+ ++I;
+// Initializer is constructor with all default params.
+// expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}}
+#pragma omp parallel for
+ for (Iter1 I; I < end1; ++I) {
+ }
+ return 0;
+}
+
+template <typename IT, int ST>
+class TC {
+public:
+ int dotest_lt(IT begin, IT end) {
+// expected-note@+3 {{loop step is expected to be positive due to this condition}}
+// expected-error@+2 {{increment expression must cause 'I' to increase on each iteration of OpenMP for loop}}
+#pragma omp parallel for
+ for (IT I = begin; I < end; I = I + ST) {
+ ++I;
+ }
+// expected-note@+3 {{loop step is expected to be positive due to this condition}}
+// expected-error@+2 {{increment expression must cause 'I' to increase on each iteration of OpenMP for loop}}
+#pragma omp parallel for
+ for (IT I = begin; I <= end; I += ST) {
+ ++I;
+ }
+#pragma omp parallel for
+ for (IT I = begin; I < end; ++I) {
+ ++I;
+ }
+ }
+
+ static IT step() {
+ return IT(ST);
+ }
+};
+template <typename IT, int ST = 0>
+int dotest_gt(IT begin, IT end) {
+// expected-note@+3 2 {{loop step is expected to be negative due to this condition}}
+// expected-error@+2 2 {{increment expression must cause 'I' to decrease on each iteration of OpenMP for loop}}
+#pragma omp parallel for
+ for (IT I = begin; I >= end; I = I + ST) {
+ ++I;
+ }
+// expected-note@+3 2 {{loop step is expected to be negative due to this condition}}
+// expected-error@+2 2 {{increment expression must cause 'I' to decrease on each iteration of OpenMP for loop}}
+#pragma omp parallel for
+ for (IT I = begin; I >= end; I += ST) {
+ ++I;
+ }
+
+// expected-note@+3 {{loop step is expected to be negative due to this condition}}
+// expected-error@+2 {{increment expression must cause 'I' to decrease on each iteration of OpenMP for loop}}
+#pragma omp parallel for
+ for (IT I = begin; I >= end; ++I) {
+ ++I;
+ }
+
+#pragma omp parallel for
+ for (IT I = begin; I < end; I += TC<int, ST>::step()) {
+ ++I;
+ }
+}
+
+void test_with_template() {
+ GoodIter begin, end;
+ TC<GoodIter, 100> t1;
+ TC<GoodIter, -100> t2;
+ t1.dotest_lt(begin, end);
+ t2.dotest_lt(begin, end); // expected-note {{in instantiation of member function 'TC<GoodIter, -100>::dotest_lt' requested here}}
+ dotest_gt(begin, end); // expected-note {{in instantiation of function template specialization 'dotest_gt<GoodIter, 0>' requested here}}
+ dotest_gt<unsigned, -10>(0, 100); // expected-note {{in instantiation of function template specialization 'dotest_gt<unsigned int, -10>' requested here}}
+}
+
+void test_loop_break() {
+ const int N = 100;
+ float a[N], b[N], c[N];
+#pragma omp parallel for
+ for (int i = 0; i < 10; i++) {
+ c[i] = a[i] + b[i];
+ for (int j = 0; j < 10; ++j) {
+ if (a[i] > b[j])
+ break; // OK in nested loop
+ }
+ switch (i) {
+ case 1:
+ b[i]++;
+ break;
+ default:
+ break;
+ }
+ if (c[i] > 10)
+ break; // expected-error {{'break' statement cannot be used in OpenMP for loop}}
+
+ if (c[i] > 11)
+ break; // expected-error {{'break' statement cannot be used in OpenMP for loop}}
+ }
+
+#pragma omp parallel for
+ for (int i = 0; i < 10; i++) {
+ for (int j = 0; j < 10; j++) {
+ c[i] = a[i] + b[i];
+ if (c[i] > 10) {
+ if (c[i] < 20) {
+ break; // OK
+ }
+ }
+ }
+ }
+}
+
+void test_loop_eh() {
+ const int N = 100;
+ float a[N], b[N], c[N];
+#pragma omp parallel for
+ for (int i = 0; i < 10; i++) {
+ c[i] = a[i] + b[i];
+ try {
+ for (int j = 0; j < 10; ++j) {
+ if (a[i] > b[j])
+ throw a[i];
+ }
+ throw a[i];
+ } catch (float f) {
+ if (f > 0.1)
+ throw a[i];
+ return; // expected-error {{cannot return from OpenMP region}}
+ }
+ switch (i) {
+ case 1:
+ b[i]++;
+ break;
+ default:
+ break;
+ }
+ for (int j = 0; j < 10; j++) {
+ if (c[i] > 10)
+ throw c[i];
+ }
+ }
+ if (c[9] > 10)
+ throw c[9]; // OK
+
+#pragma omp parallel for
+ for (int i = 0; i < 10; ++i) {
+ struct S {
+ void g() { throw 0; }
+ };
+ }
+}
+
+void test_loop_firstprivate_lastprivate() {
+ S s(4);
+#pragma omp parallel for lastprivate(s) firstprivate(s)
+ for (int i = 0; i < 16; ++i)
+ ;
+}
diff --git a/test/OpenMP/parallel_for_messages.cpp b/test/OpenMP/parallel_for_messages.cpp
new file mode 100644
index 000000000000..e4ea0d5e2d93
--- /dev/null
+++ b/test/OpenMP/parallel_for_messages.cpp
@@ -0,0 +1,86 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -std=c++11 -o - %s
+
+void foo() {
+}
+
+#pragma omp parallel for // expected-error {{unexpected OpenMP directive '#pragma omp parallel for'}}
+
+int main(int argc, char **argv) {
+#pragma omp parallel for { // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+ for (int i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for ( // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+ for (int i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for[ // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+ for (int i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for] // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+ for (int i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+ for (int i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for } // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+ for (int i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for
+ for (int i = 0; i < argc; ++i)
+ foo();
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+#pragma omp parallel for unknown()
+ for (int i = 0; i < argc; ++i)
+ foo();
+L1:
+ for (int i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for
+ for (int i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for
+ for (int i = 0; i < argc; ++i) {
+ goto L1; // expected-error {{use of undeclared label 'L1'}}
+ argc++;
+ }
+
+ for (int i = 0; i < 10; ++i) {
+ switch (argc) {
+ case (0):
+#pragma omp parallel for
+ for (int i = 0; i < argc; ++i) {
+ foo();
+ break; // expected-error {{'break' statement cannot be used in OpenMP for loop}}
+ continue;
+ }
+ default:
+ break;
+ }
+ }
+#pragma omp parallel for default(none)
+ for (int i = 0; i < 10; ++i)
+ ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
+
+ goto L2; // expected-error {{use of undeclared label 'L2'}}
+#pragma omp parallel for
+ for (int i = 0; i < argc; ++i)
+ L2:
+ foo();
+#pragma omp parallel for
+ for (int i = 0; i < argc; ++i) {
+ return 1; // expected-error {{cannot return from OpenMP region}}
+ }
+
+ [[]] // expected-error {{an attribute list cannot appear here}}
+#pragma omp parallel for
+ for (int n = 0; n < 100; ++n) {
+ }
+
+ return 0;
+}
+
+void test_ordered() {
+#pragma omp parallel for ordered ordered // expected-error {{directive '#pragma omp parallel for' cannot contain more than one 'ordered' clause}}
+ for (int i = 0; i < 16; ++i)
+ ;
+}
+
diff --git a/test/OpenMP/parallel_for_misc_messages.c b/test/OpenMP/parallel_for_misc_messages.c
new file mode 100644
index 000000000000..b236a613c319
--- /dev/null
+++ b/test/OpenMP/parallel_for_misc_messages.c
@@ -0,0 +1,309 @@
+// RUN: %clang_cc1 -fsyntax-only -fopenmp=libiomp5 -verify %s
+
+// expected-error@+1 {{unexpected OpenMP directive '#pragma omp parallel for'}}
+#pragma omp parallel for
+
+// expected-error@+1 {{unexpected OpenMP directive '#pragma omp parallel for'}}
+#pragma omp parallel for foo
+
+void test_no_clause() {
+ int i;
+#pragma omp parallel for
+ for (i = 0; i < 16; ++i)
+ ;
+
+// expected-error@+2 {{statement after '#pragma omp parallel for' must be a for loop}}
+#pragma omp parallel for
+ ++i;
+}
+
+void test_branch_protected_scope() {
+ int i = 0;
+L1:
+ ++i;
+
+ int x[24];
+
+#pragma omp parallel for
+ for (i = 0; i < 16; ++i) {
+ if (i == 5)
+ goto L1; // expected-error {{use of undeclared label 'L1'}}
+ else if (i == 6)
+ return; // expected-error {{cannot return from OpenMP region}}
+ else if (i == 7)
+ goto L2;
+ else if (i == 8) {
+ L2:
+ x[i]++;
+ }
+ }
+
+ if (x[0] == 0)
+ goto L2; // expected-error {{use of undeclared label 'L2'}}
+ else if (x[1] == 1)
+ goto L1;
+}
+
+void test_invalid_clause() {
+ int i;
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+#pragma omp parallel for foo bar
+ for (i = 0; i < 16; ++i)
+ ;
+}
+
+void test_non_identifiers() {
+ int i, x;
+
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+#pragma omp parallel for;
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error@+2 {{unexpected OpenMP clause 'linear' in directive '#pragma omp parallel for'}}
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+#pragma omp parallel for linear(x);
+ for (i = 0; i < 16; ++i)
+ ;
+
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+#pragma omp parallel for private(x);
+ for (i = 0; i < 16; ++i)
+ ;
+
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+#pragma omp parallel for, private(x);
+ for (i = 0; i < 16; ++i)
+ ;
+}
+
+extern int foo();
+
+void test_collapse() {
+ int i;
+// expected-error@+1 {{expected '('}}
+#pragma omp parallel for collapse
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error@+1 {{expected expression}} expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+#pragma omp parallel for collapse(
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error@+1 {{expected expression}}
+#pragma omp parallel for collapse()
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error@+1 {{expected expression}} expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+#pragma omp parallel for collapse(,
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error@+1 {{expected expression}} expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+#pragma omp parallel for collapse(, )
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-warning@+2 {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+// expected-error@+1 {{expected '('}}
+#pragma omp parallel for collapse 4)
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error@+2 {{expected ')'}}
+// expected-note@+1 {{to match this '('}} expected-note@+1 {{as specified in 'collapse' clause}}
+#pragma omp parallel for collapse(4
+ for (i = 0; i < 16; ++i)
+ ; // expected-error {{expected 4 for loops after '#pragma omp parallel for', but found only 1}}
+// expected-error@+2 {{expected ')'}}
+// expected-note@+1 {{to match this '('}} expected-note@+1 {{as specified in 'collapse' clause}}
+#pragma omp parallel for collapse(4,
+ for (i = 0; i < 16; ++i)
+ ; // expected-error {{expected 4 for loops after '#pragma omp parallel for', but found only 1}}
+// expected-error@+2 {{expected ')'}}
+// expected-note@+1 {{to match this '('}} expected-note@+1 {{as specified in 'collapse' clause}}
+#pragma omp parallel for collapse(4, )
+ for (i = 0; i < 16; ++i)
+ ; // expected-error {{expected 4 for loops after '#pragma omp parallel for', but found only 1}}
+// expected-note@+1 {{as specified in 'collapse' clause}}
+#pragma omp parallel for collapse(4)
+ for (i = 0; i < 16; ++i)
+ ; // expected-error {{expected 4 for loops after '#pragma omp parallel for', but found only 1}}
+// expected-error@+2 {{expected ')'}}
+// expected-note@+1 {{to match this '('}} expected-note@+1 {{as specified in 'collapse' clause}}
+#pragma omp parallel for collapse(4 4)
+ for (i = 0; i < 16; ++i)
+ ; // expected-error {{expected 4 for loops after '#pragma omp parallel for', but found only 1}}
+// expected-error@+2 {{expected ')'}}
+// expected-note@+1 {{to match this '('}} expected-note@+1 {{as specified in 'collapse' clause}}
+#pragma omp parallel for collapse(4, , 4)
+ for (i = 0; i < 16; ++i)
+ ; // expected-error {{expected 4 for loops after '#pragma omp parallel for', but found only 1}}
+#pragma omp parallel for collapse(4)
+ for (int i1 = 0; i1 < 16; ++i1)
+ for (int i2 = 0; i2 < 16; ++i2)
+ for (int i3 = 0; i3 < 16; ++i3)
+ for (int i4 = 0; i4 < 16; ++i4)
+ foo();
+// expected-error@+2 {{expected ')'}}
+// expected-note@+1 {{to match this '('}} expected-note@+1 {{as specified in 'collapse' clause}}
+#pragma omp parallel for collapse(4, 8)
+ for (i = 0; i < 16; ++i)
+ ; // expected-error {{expected 4 for loops after '#pragma omp parallel for', but found only 1}}
+// expected-error@+1 {{expression is not an integer constant expression}}
+#pragma omp parallel for collapse(2.5)
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error@+1 {{expression is not an integer constant expression}}
+#pragma omp parallel for collapse(foo())
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error@+1 {{argument to 'collapse' clause must be a positive integer value}}
+#pragma omp parallel for collapse(-5)
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error@+1 {{argument to 'collapse' clause must be a positive integer value}}
+#pragma omp parallel for collapse(0)
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error@+1 {{argument to 'collapse' clause must be a positive integer value}}
+#pragma omp parallel for collapse(5 - 5)
+ for (i = 0; i < 16; ++i)
+ ;
+}
+
+void test_private() {
+ int i;
+// expected-error@+2 {{expected expression}}
+// expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+#pragma omp parallel for private(
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+// expected-error@+1 2 {{expected expression}}
+#pragma omp parallel for private(,
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error@+1 2 {{expected expression}}
+#pragma omp parallel for private(, )
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error@+1 {{expected expression}}
+#pragma omp parallel for private()
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error@+1 {{expected expression}}
+#pragma omp parallel for private(int)
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error@+1 {{expected variable name}}
+#pragma omp parallel for private(0)
+ for (i = 0; i < 16; ++i)
+ ;
+
+ int x, y, z;
+#pragma omp parallel for private(x)
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel for private(x, y)
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel for private(x, y, z)
+ for (i = 0; i < 16; ++i) {
+ x = y * i + z;
+ }
+}
+
+void test_lastprivate() {
+ int i;
+// expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+// expected-error@+1 {{expected expression}}
+#pragma omp parallel for lastprivate(
+ for (i = 0; i < 16; ++i)
+ ;
+
+// expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+// expected-error@+1 2 {{expected expression}}
+#pragma omp parallel for lastprivate(,
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error@+1 2 {{expected expression}}
+#pragma omp parallel for lastprivate(, )
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error@+1 {{expected expression}}
+#pragma omp parallel for lastprivate()
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error@+1 {{expected expression}}
+#pragma omp parallel for lastprivate(int)
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error@+1 {{expected variable name}}
+#pragma omp parallel for lastprivate(0)
+ for (i = 0; i < 16; ++i)
+ ;
+
+ int x, y, z;
+#pragma omp parallel for lastprivate(x)
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel for lastprivate(x, y)
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel for lastprivate(x, y, z)
+ for (i = 0; i < 16; ++i)
+ ;
+}
+
+void test_firstprivate() {
+ int i;
+// expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+// expected-error@+1 {{expected expression}}
+#pragma omp parallel for firstprivate(
+ for (i = 0; i < 16; ++i)
+ ;
+
+// expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+// expected-error@+1 2 {{expected expression}}
+#pragma omp parallel for firstprivate(,
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error@+1 2 {{expected expression}}
+#pragma omp parallel for firstprivate(, )
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error@+1 {{expected expression}}
+#pragma omp parallel for firstprivate()
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error@+1 {{expected expression}}
+#pragma omp parallel for firstprivate(int)
+ for (i = 0; i < 16; ++i)
+ ;
+// expected-error@+1 {{expected variable name}}
+#pragma omp parallel for firstprivate(0)
+ for (i = 0; i < 16; ++i)
+ ;
+
+ int x, y, z;
+#pragma omp parallel for lastprivate(x) firstprivate(x)
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel for lastprivate(x, y) firstprivate(x, y)
+ for (i = 0; i < 16; ++i)
+ ;
+#pragma omp parallel for lastprivate(x, y, z) firstprivate(x, y, z)
+ for (i = 0; i < 16; ++i)
+ ;
+}
+
+void test_loop_messages() {
+ float a[100], b[100], c[100];
+// expected-error@+2 {{variable must be of integer or pointer type}}
+#pragma omp parallel for
+ for (float fi = 0; fi < 10.0; fi++) {
+ c[(int)fi] = a[(int)fi] + b[(int)fi];
+ }
+// expected-error@+2 {{variable must be of integer or pointer type}}
+#pragma omp parallel for
+ for (double fi = 0; fi < 10.0; fi++) {
+ c[(int)fi] = a[(int)fi] + b[(int)fi];
+ }
+}
+
diff --git a/test/OpenMP/parallel_for_num_threads_messages.cpp b/test/OpenMP/parallel_for_num_threads_messages.cpp
new file mode 100644
index 000000000000..e1928982ad1a
--- /dev/null
+++ b/test/OpenMP/parallel_for_num_threads_messages.cpp
@@ -0,0 +1,65 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}}
+
+template <class T, typename S, int N> // expected-note {{declared here}}
+T tmain(T argc, S **argv) {
+ T i;
+ #pragma omp parallel for num_threads // expected-error {{expected '(' after 'num_threads'}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for num_threads () // expected-error {{expected expression}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for num_threads ((argc > 0) ? argv[1] : argv[2]) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel for' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a positive integer value}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for num_threads (S) // expected-error {{'S' does not refer to a value}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for num_threads (argc)
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for num_threads (N) // expected-error {{argument to 'num_threads' clause must be a positive integer value}}
+ for (i = 0; i < argc; ++i) foo();
+
+ return argc;
+}
+
+int main(int argc, char **argv) {
+ int i;
+ #pragma omp parallel for num_threads // expected-error {{expected '(' after 'num_threads'}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for num_threads () // expected-error {{expected expression}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel for' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a positive integer value}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for num_threads (S1) // expected-error {{'S1' does not refer to a value}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
+ for (i = 0; i < argc; ++i) foo();
+ #pragma omp parallel for num_threads (num_threads(tmain<int, char, -1>(argc, argv) // expected-error 2 {{expected ')'}} expected-note 2 {{to match this '('}} expected-note {{in instantiation of function template specialization 'tmain<int, char, -1>' requested here}}
+ for (i = 0; i < argc; ++i) foo();
+
+ return tmain<int, char, 3>(argc, argv); // expected-note {{in instantiation of function template specialization 'tmain<int, char, 3>' requested here}}
+}
diff --git a/test/OpenMP/parallel_for_private_messages.cpp b/test/OpenMP/parallel_for_private_messages.cpp
new file mode 100644
index 000000000000..7366fe8c47c5
--- /dev/null
+++ b/test/OpenMP/parallel_for_private_messages.cpp
@@ -0,0 +1,173 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+
+public:
+ S2() : a(0) {}
+};
+const S2 b;
+const S2 ba[5];
+class S3 {
+ int a;
+
+public:
+ S3() : a(0) {}
+};
+const S3 ca[5];
+class S4 { // expected-note {{'S4' declared here}}
+ int a;
+ S4();
+
+public:
+ S4(int v) : a(v) {}
+};
+class S5 { // expected-note {{'S5' declared here}}
+ int a;
+ S5() : a(0) {}
+
+public:
+ S5(int v) : a(v) {}
+};
+
+S3 h;
+#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
+
+template <class I, class C>
+int foomain(I argc, C **argv) {
+ I e(4);
+ I g(5);
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp parallel for private // expected-error {{expected '(' after 'private'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for private( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for private() // expected-error {{expected expression}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for private(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for private(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for private(argc)
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for private(S1) // expected-error {{'S1' does not refer to a value}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for private(a, b) // expected-error {{private variable with incomplete type 'S1'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for private(argv[1]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for private(e, g)
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for private(h) // expected-error {{threadprivate or thread local variable cannot be private}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for nowait // expected-error {{unexpected OpenMP clause 'nowait' in directive '#pragma omp parallel for'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+ {
+ int v = 0;
+ int i;
+#pragma omp parallel for private(i)
+ for (int k = 0; k < argc; ++k) {
+ i = k;
+ v += i;
+ }
+ }
+#pragma omp parallel shared(i)
+#pragma omp parallel private(i)
+#pragma omp parallel for private(j) // expected-error {{arguments of OpenMP clause 'private' cannot be of reference type}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for private(i)
+ for (int k = 0; k < argc; ++k)
+ ++k;
+ return 0;
+}
+
+int main(int argc, char **argv) {
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note {{'g' defined here}}
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp parallel for private // expected-error {{expected '(' after 'private'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for private( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for private() // expected-error {{expected expression}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for private(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for private(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for private(argc)
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for private(S1) // expected-error {{'S1' does not refer to a value}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for private(a, b) // expected-error {{private variable with incomplete type 'S1'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for private(argv[1]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for private(e, g) // expected-error 2 {{private variable must have an accessible, unambiguous default constructor}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for private(h) // expected-error {{threadprivate or thread local variable cannot be private}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for nowait // expected-error {{unexpected OpenMP clause 'nowait' in directive '#pragma omp parallel for'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+ {
+ int i;
+#pragma omp parallel for private(i)
+ for (int k = 0; k < argc; ++k)
+ ++k;
+ }
+#pragma omp parallel shared(i)
+#pragma omp parallel private(i)
+#pragma omp parallel for private(j) // expected-error {{arguments of OpenMP clause 'private' cannot be of reference type}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel for private(i)
+ for (int k = 0; k < argc; ++k)
+ ++k;
+
+ return 0;
+}
+
diff --git a/test/OpenMP/parallel_for_proc_bind_messages.cpp b/test/OpenMP/parallel_for_proc_bind_messages.cpp
new file mode 100644
index 000000000000..0347caf68b02
--- /dev/null
+++ b/test/OpenMP/parallel_for_proc_bind_messages.cpp
@@ -0,0 +1,35 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -o - %s
+
+void foo();
+
+int main(int argc, char **argv) {
+ int i;
+#pragma omp parallel for proc_bind // expected-error {{expected '(' after 'proc_bind'}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for proc_bind( // expected-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for proc_bind() // expected-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for proc_bind(master // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for proc_bind(close), proc_bind(spread) // expected-error {{directive '#pragma omp parallel for' cannot contain more than one 'proc_bind' clause}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel for proc_bind(x) // expected-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}}
+ for (i = 0; i < argc; ++i)
+ foo();
+
+#pragma omp parallel for proc_bind(master)
+ for (i = 0; i < argc; ++i)
+ foo();
+
+#pragma omp parallel proc_bind(close)
+#pragma omp parallel for proc_bind(spread)
+ for (i = 0; i < argc; ++i)
+ foo();
+ return 0;
+}
diff --git a/test/OpenMP/parallel_for_reduction_messages.cpp b/test/OpenMP/parallel_for_reduction_messages.cpp
new file mode 100644
index 000000000000..8e482ef73536
--- /dev/null
+++ b/test/OpenMP/parallel_for_reduction_messages.cpp
@@ -0,0 +1,295 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -o - %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}} expected-note 4 {{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+ S2 &operator+=(const S2 &arg) { return (*this); }
+
+public:
+ S2() : a(0) {}
+ S2(S2 &s2) : a(s2.a) {}
+ static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
+ static const float S2sc;
+};
+const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+S2 b; // expected-note 2 {{'b' defined here}}
+const S2 ba[5]; // expected-note 2 {{'ba' defined here}}
+class S3 {
+ int a;
+
+public:
+ S3() : a(0) {}
+ S3(const S3 &s3) : a(s3.a) {}
+ S3 operator+=(const S3 &arg1) { return arg1; }
+};
+int operator+=(const S3 &arg1, const S3 &arg2) { return 5; }
+S3 c; // expected-note 2 {{'c' defined here}}
+const S3 ca[5]; // expected-note 2 {{'ca' defined here}}
+extern const int f; // expected-note 4 {{'f' declared here}}
+class S4 { // expected-note {{'S4' declared here}}
+ int a;
+ S4();
+ S4(const S4 &s4);
+ S4 &operator+=(const S4 &arg) { return (*this); }
+
+public:
+ S4(int v) : a(v) {}
+};
+S4 &operator&=(S4 &arg1, S4 &arg2) { return arg1; }
+class S5 {
+ int a;
+ S5() : a(0) {}
+ S5(const S5 &s5) : a(s5.a) {}
+ S5 &operator+=(const S5 &arg);
+
+public:
+ S5(int v) : a(v) {}
+};
+class S6 {
+ int a;
+
+public:
+ S6() : a(6) {}
+ operator int() { return 6; }
+} o; // expected-note 2 {{'o' defined here}}
+
+S3 h, k;
+#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
+
+template <class T> // expected-note {{declared here}}
+T tmain(T argc) { // expected-note 2 {{'argc' defined here}}
+ const T d = T(); // expected-note 4 {{'d' defined here}}
+ const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
+ T qa[5] = {T()};
+ T i;
+ T &j = i; // expected-note 4 {{'j' defined here}}
+ S3 &p = k; // expected-note 2 {{'p' defined here}}
+ const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
+ T &q = qa[(int)i]; // expected-note 2 {{'q' defined here}}
+ T fl; // expected-note {{'fl' defined here}}
+#pragma omp parallel for reduction // expected-error {{expected '(' after 'reduction'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction + // expected-error {{expected '(' after 'reduction'}} expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction( // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(- // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction() // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(*) // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(\) // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(& : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{variable of type 'float' is not valid for specified reduction operation}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(| : argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{variable of type 'float' is not valid for specified reduction operation}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(|| : argc ? i : argc) // expected-error 2 {{expected variable name}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(foo : argc) //expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(&& : argc)
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(^ : T) // expected-error {{'T' does not refer to a value}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(+ : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(min : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(max : qa[1]) // expected-error 2 {{expected variable name}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(+ : ba) // expected-error {{a reduction variable with array type 'const S2 [5]'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(* : ca) // expected-error {{a reduction variable with array type 'const S3 [5]'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(- : da) // expected-error {{a reduction variable with array type 'const int [5]'}} expected-error {{a reduction variable with array type 'const float [5]'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(^ : fl) // expected-error {{variable of type 'float' is not valid for specified reduction operation}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(+ : o) // expected-error {{variable of type 'class S6' is not valid for specified reduction operation}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for private(i), reduction(+ : j), reduction(+ : q) // expected-error 4 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel private(k)
+#pragma omp parallel for reduction(+ : p), reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(+ : p), reduction(+ : p) // expected-error 3 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 3 {{previously referenced here}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel shared(i)
+#pragma omp parallel reduction(min : i)
+#pragma omp parallel for reduction(max : j) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel private(fl)
+#pragma omp parallel for reduction(+ : fl)
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel reduction(* : fl)
+#pragma omp parallel for reduction(+ : fl)
+ for (int i = 0; i < 10; ++i)
+ foo();
+
+ return T();
+}
+
+int main(int argc, char **argv) {
+ const int d = 5; // expected-note 2 {{'d' defined here}}
+ const int da[5] = {0}; // expected-note {{'da' defined here}}
+ int qa[5] = {0};
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note {{'g' defined here}}
+ int i;
+ int &j = i; // expected-note 2 {{'j' defined here}}
+ S3 &p = k; // expected-note 2 {{'p' defined here}}
+ const int &r = da[i]; // expected-note {{'r' defined here}}
+ int &q = qa[i]; // expected-note {{'q' defined here}}
+ float fl; // expected-note {{'fl' defined here}}
+#pragma omp parallel for reduction // expected-error {{expected '(' after 'reduction'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction + // expected-error {{expected '(' after 'reduction'}} expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction( // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(- // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction() // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(*) // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(\) // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(foo : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(| : argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(|| : argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(~ : argc) // expected-error {{expected unqualified-id}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(&& : argc)
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(+ : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(min : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(max : argv[1]) // expected-error {{expected variable name}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(+ : ba) // expected-error {{a reduction variable with array type 'const S2 [5]'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(* : ca) // expected-error {{a reduction variable with array type 'const S3 [5]'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(- : da) // expected-error {{a reduction variable with array type 'const int [5]'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(^ : fl) // expected-error {{variable of type 'float' is not valid for specified reduction operation}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(& : e, g) // expected-error {{reduction variable must have an accessible, unambiguous default constructor}} expected-error {{variable of type 'S5' is not valid for specified reduction operation}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(+ : o) // expected-error {{variable of type 'class S6' is not valid for specified reduction operation}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for private(i), reduction(+ : j), reduction(+ : q) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel private(k)
+#pragma omp parallel for reduction(+ : p), reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel for reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel shared(i)
+#pragma omp parallel reduction(min : i)
+#pragma omp parallel for reduction(max : j) // expected-error {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel private(fl)
+#pragma omp parallel for reduction(+ : fl)
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel reduction(* : fl)
+#pragma omp parallel for reduction(+ : fl)
+ for (int i = 0; i < 10; ++i)
+ foo();
+
+ return tmain(argc) + tmain(fl); // expected-note {{in instantiation of function template specialization 'tmain<int>' requested here}} expected-note {{in instantiation of function template specialization 'tmain<float>' requested here}}
+}
diff --git a/test/OpenMP/parallel_for_schedule_messages.cpp b/test/OpenMP/parallel_for_schedule_messages.cpp
new file mode 100644
index 000000000000..b03758a10d66
--- /dev/null
+++ b/test/OpenMP/parallel_for_schedule_messages.cpp
@@ -0,0 +1,91 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}}
+
+template <class T, typename S, int N, int ST> // expected-note {{declared here}}
+T tmain(T argc, S **argv) {
+ #pragma omp parallel for schedule // expected-error {{expected '(' after 'schedule'}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp parallel for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto' or 'runtime' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp parallel for schedule () // expected-error {{expected 'static', 'dynamic', 'guided', 'auto' or 'runtime' in OpenMP clause 'schedule'}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp parallel for schedule (auto // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp parallel for schedule (auto_dynamic // expected-error {{expected 'static', 'dynamic', 'guided', 'auto' or 'runtime' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp parallel for schedule (auto, // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp parallel for schedule (runtime, 3) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ // expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+ #pragma omp parallel for schedule (guided argc
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ // expected-error@+1 2 {{argument to 'schedule' clause must be a positive integer value}}
+ #pragma omp parallel for schedule (static, ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp parallel for schedule (dynamic, 1)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp parallel for schedule (guided, (ST > 0) ? 1 + ST : 2)
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ // expected-error@+2 2 {{directive '#pragma omp parallel for' cannot contain more than one 'schedule' clause}}
+ // expected-error@+1 {{argument to 'schedule' clause must be a positive integer value}}
+ #pragma omp parallel for schedule (static, foobool(argc)), schedule (dynamic, true), schedule (guided, -5)
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp parallel for schedule (static, S) // expected-error {{'S' does not refer to a value}} expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ // expected-error@+1 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
+ #pragma omp parallel for schedule (guided, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp parallel for schedule (dynamic, 1)
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp parallel for schedule (static, N) // expected-error {{argument to 'schedule' clause must be a positive integer value}}
+ for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ return argc;
+}
+
+int main(int argc, char **argv) {
+ #pragma omp parallel for schedule // expected-error {{expected '(' after 'schedule'}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp parallel for schedule ( // expected-error {{expected 'static', 'dynamic', 'guided', 'auto' or 'runtime' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp parallel for schedule () // expected-error {{expected 'static', 'dynamic', 'guided', 'auto' or 'runtime' in OpenMP clause 'schedule'}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp parallel for schedule (auto // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp parallel for schedule (auto_dynamic // expected-error {{expected 'static', 'dynamic', 'guided', 'auto' or 'runtime' in OpenMP clause 'schedule'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp parallel for schedule (auto, // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp parallel for schedule (runtime, 3) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp parallel for schedule (guided, 4 // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp parallel for schedule (static, 2+2)) // expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp parallel for schedule (dynamic, foobool(1) > 0 ? 1 : 2)
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ // expected-error@+2 2 {{directive '#pragma omp parallel for' cannot contain more than one 'schedule' clause}}
+ // expected-error@+1 {{argument to 'schedule' clause must be a positive integer value}}
+ #pragma omp parallel for schedule (guided, foobool(argc)), schedule (static, true), schedule (dynamic, -5)
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp parallel for schedule (guided, S1) // expected-error {{'S1' does not refer to a value}} expected-warning {{extra tokens at the end of '#pragma omp parallel for' are ignored}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ // expected-error@+1 {{expression must have integral or unscoped enumeration type, not 'char *'}}
+ #pragma omp parallel for schedule (static, argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ // expected-error@+3 {{statement after '#pragma omp parallel for' must be a for loop}}
+ // expected-note@+1 {{in instantiation of function template specialization 'tmain<int, char, -1, -2>' requested here}}
+ #pragma omp parallel for schedule(dynamic, schedule(tmain<int, char, -1, -2>(argc, argv) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+ // expected-note@+1 {{in instantiation of function template specialization 'tmain<int, char, 1, 0>' requested here}}
+ return tmain<int, char, 1, 0>(argc, argv);
+}
+
diff --git a/test/OpenMP/parallel_if_messages.cpp b/test/OpenMP/parallel_if_messages.cpp
new file mode 100644
index 000000000000..1559692a989d
--- /dev/null
+++ b/test/OpenMP/parallel_if_messages.cpp
@@ -0,0 +1,46 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}}
+
+template <class T, class S> // expected-note {{declared here}}
+int tmain(T argc, S **argv) {
+ #pragma omp parallel if // expected-error {{expected '(' after 'if'}}
+ #pragma omp parallel if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp parallel if () // expected-error {{expected expression}}
+ #pragma omp parallel if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp parallel if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
+ #pragma omp parallel if (argc > 0 ? argv[1] : argv[2])
+ #pragma omp parallel if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp parallel' cannot contain more than one 'if' clause}}
+ #pragma omp parallel if (S) // expected-error {{'S' does not refer to a value}}
+ #pragma omp parallel if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp parallel if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp parallel if(argc)
+ foo();
+
+ return 0;
+}
+
+int main(int argc, char **argv) {
+ #pragma omp parallel if // expected-error {{expected '(' after 'if'}}
+ #pragma omp parallel if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp parallel if () // expected-error {{expected expression}}
+ #pragma omp parallel if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp parallel if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
+ #pragma omp parallel if (argc > 0 ? argv[1] : argv[2])
+ #pragma omp parallel if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp parallel' cannot contain more than one 'if' clause}}
+ #pragma omp parallel if (S1) // expected-error {{'S1' does not refer to a value}}
+ #pragma omp parallel if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp parallel if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp parallel if (1 0) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp parallel if(if(tmain(argc, argv) // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+
+ return tmain(argc, argv);
+}
diff --git a/test/OpenMP/parallel_messages.cpp b/test/OpenMP/parallel_messages.cpp
index d991ccfc3806..1e0edbc6f808 100644
--- a/test/OpenMP/parallel_messages.cpp
+++ b/test/OpenMP/parallel_messages.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 -std=c++11 -o - %s
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -std=c++11 -o - %s
void foo() {
}
@@ -6,8 +6,21 @@ void foo() {
#pragma omp parallel // expected-error {{unexpected OpenMP directive '#pragma omp parallel'}}
int main(int argc, char **argv) {
+ #pragma omp parallel { // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
+ foo();
+ #pragma omp parallel ( // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
+ foo();
+ #pragma omp parallel [ // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
+ foo();
+ #pragma omp parallel ] // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
+ foo();
+ #pragma omp parallel ) // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
+ foo();
+ #pragma omp parallel } // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
+ foo();
#pragma omp parallel
- #pragma omp parallel unknown() // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
+ // expected-warning@+1 {{extra tokens at the end of '#pragma omp parallel' are ignored}}
+ #pragma omp parallel unknown()
foo();
L1:
foo();
diff --git a/test/OpenMP/parallel_num_threads_messages.cpp b/test/OpenMP/parallel_num_threads_messages.cpp
new file mode 100644
index 000000000000..facca5e35879
--- /dev/null
+++ b/test/OpenMP/parallel_num_threads_messages.cpp
@@ -0,0 +1,44 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}}
+
+template <class T, typename S, int N> // expected-note {{declared here}}
+T tmain(T argc, S **argv) {
+ #pragma omp parallel num_threads // expected-error {{expected '(' after 'num_threads'}}
+ #pragma omp parallel num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp parallel num_threads () // expected-error {{expected expression}}
+ #pragma omp parallel num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp parallel num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
+ #pragma omp parallel num_threads ((argc > 0) ? argv[1] : argv[2]) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
+ #pragma omp parallel num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a positive integer value}}
+ #pragma omp parallel num_threads (S) // expected-error {{'S' does not refer to a value}}
+ #pragma omp parallel num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
+ #pragma omp parallel num_threads (argc)
+ #pragma omp parallel num_threads (N) // expected-error {{argument to 'num_threads' clause must be a positive integer value}}
+ foo();
+
+ return argc;
+}
+
+int main(int argc, char **argv) {
+ #pragma omp parallel num_threads // expected-error {{expected '(' after 'num_threads'}}
+ #pragma omp parallel num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp parallel num_threads () // expected-error {{expected expression}}
+ #pragma omp parallel num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp parallel num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
+ #pragma omp parallel num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
+ #pragma omp parallel num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a positive integer value}}
+ #pragma omp parallel num_threads (S1) // expected-error {{'S1' does not refer to a value}}
+ #pragma omp parallel num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
+ #pragma omp parallel num_threads (num_threads(tmain<int, char, -1>(argc, argv) // expected-error 2 {{expected ')'}} expected-note 2 {{to match this '('}} expected-note {{in instantiation of function template specialization 'tmain<int, char, -1>' requested here}}
+ foo();
+
+ return tmain<int, char, 3>(argc, argv); // expected-note {{in instantiation of function template specialization 'tmain<int, char, 3>' requested here}}
+}
diff --git a/test/OpenMP/parallel_private_messages.cpp b/test/OpenMP/parallel_private_messages.cpp
index 2037d56daf0c..1cd86d2b5fbc 100644
--- a/test/OpenMP/parallel_private_messages.cpp
+++ b/test/OpenMP/parallel_private_messages.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s
void foo() {
}
@@ -13,7 +13,7 @@ class S2 {
mutable int a;
public:
S2():a(0) { }
- static float S2s; // expected-note {{predetermined as shared}}
+ static float S2s; // expected-note {{static data member is predetermined as shared}}
};
const S2 b;
const S2 ba[5];
@@ -22,9 +22,9 @@ class S3 {
public:
S3():a(0) { }
};
-const S3 c; // expected-note {{predetermined as shared}}
-const S3 ca[5]; // expected-note {{predetermined as shared}}
-extern const int f; // expected-note {{predetermined as shared}}
+const S3 c; // expected-note {{global variable is predetermined as shared}}
+const S3 ca[5]; // expected-note {{global variable is predetermined as shared}}
+extern const int f; // expected-note {{global variable is predetermined as shared}}
class S4 { // expected-note {{'S4' declared here}}
int a;
S4();
@@ -42,8 +42,8 @@ int threadvar;
#pragma omp threadprivate(threadvar) // expected-note {{defined as threadprivate or thread local}}
int main(int argc, char **argv) {
- const int d = 5; // expected-note {{predetermined as shared}}
- const int da[5] = { 0 }; // expected-note {{predetermined as shared}}
+ const int d = 5; // expected-note {{constant variable is predetermined as shared}}
+ const int da[5] = { 0 }; // expected-note {{constant variable is predetermined as shared}}
S4 e(4); // expected-note {{'e' defined here}}
S5 g(5); // expected-note {{'g' defined here}}
int i;
diff --git a/test/OpenMP/parallel_proc_bind_messages.cpp b/test/OpenMP/parallel_proc_bind_messages.cpp
new file mode 100644
index 000000000000..0bb9fc7db626
--- /dev/null
+++ b/test/OpenMP/parallel_proc_bind_messages.cpp
@@ -0,0 +1,21 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -o - %s
+
+void foo();
+
+int main(int argc, char **argv) {
+ #pragma omp parallel proc_bind // expected-error {{expected '(' after 'proc_bind'}}
+ #pragma omp parallel proc_bind ( // expected-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp parallel proc_bind () // expected-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}}
+ #pragma omp parallel proc_bind (master // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp parallel proc_bind (close), proc_bind(spread) // expected-error {{directive '#pragma omp parallel' cannot contain more than one 'proc_bind' clause}}
+ #pragma omp parallel proc_bind (x) // expected-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}}
+ foo();
+
+ #pragma omp parallel proc_bind(master)
+ ++argc;
+
+ #pragma omp parallel proc_bind(close)
+ #pragma omp parallel proc_bind(spread)
+ ++argc;
+ return 0;
+}
diff --git a/test/OpenMP/parallel_reduction_messages.cpp b/test/OpenMP/parallel_reduction_messages.cpp
new file mode 100644
index 000000000000..43ebc01b2a36
--- /dev/null
+++ b/test/OpenMP/parallel_reduction_messages.cpp
@@ -0,0 +1,240 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -o - %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}} expected-note 4 {{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+ S2 &operator+=(const S2 &arg) { return (*this); }
+
+public:
+ S2() : a(0) {}
+ S2(S2 &s2) : a(s2.a) {}
+ static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
+ static const float S2sc;
+};
+const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+S2 b; // expected-note 2 {{'b' defined here}}
+const S2 ba[5]; // expected-note 2 {{'ba' defined here}}
+class S3 {
+ int a;
+
+public:
+ S3() : a(0) {}
+ S3(const S3 &s3) : a(s3.a) {}
+ S3 operator+=(const S3 &arg1) { return arg1; }
+};
+int operator+=(const S3 &arg1, const S3 &arg2) { return 5; }
+S3 c; // expected-note 2 {{'c' defined here}}
+const S3 ca[5]; // expected-note 2 {{'ca' defined here}}
+extern const int f; // expected-note 4 {{'f' declared here}}
+class S4 { // expected-note {{'S4' declared here}}
+ int a;
+ S4();
+ S4(const S4 &s4);
+ S4 &operator+=(const S4 &arg) { return (*this); }
+
+public:
+ S4(int v) : a(v) {}
+};
+S4 &operator&=(S4 &arg1, S4 &arg2) { return arg1; }
+class S5 {
+ int a;
+ S5() : a(0) {}
+ S5(const S5 &s5) : a(s5.a) {}
+ S5 &operator+=(const S5 &arg);
+
+public:
+ S5(int v) : a(v) {}
+};
+class S6 {
+ int a;
+
+public:
+ S6() : a(6) {}
+ operator int() { return 6; }
+} o; // expected-note 2 {{'o' defined here}}
+
+S3 h, k;
+#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
+
+template <class T> // expected-note {{declared here}}
+T tmain(T argc) { // expected-note 2 {{'argc' defined here}}
+ const T d = T(); // expected-note 4 {{'d' defined here}}
+ const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
+ T qa[5] = {T()};
+ T i;
+ T &j = i; // expected-note 4 {{'j' defined here}}
+ S3 &p = k; // expected-note 2 {{'p' defined here}}
+ const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
+ T &q = qa[(int)i]; // expected-note 2 {{'q' defined here}}
+ T fl; // expected-note {{'fl' defined here}}
+#pragma omp parallel reduction // expected-error {{expected '(' after 'reduction'}}
+ foo();
+#pragma omp parallel reduction + // expected-error {{expected '(' after 'reduction'}} expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
+ foo();
+#pragma omp parallel reduction( // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+#pragma omp parallel reduction(- // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+#pragma omp parallel reduction() // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
+ foo();
+#pragma omp parallel reduction(*) // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}}
+ foo();
+#pragma omp parallel reduction(\) // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
+ foo();
+#pragma omp parallel reduction(& : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{variable of type 'float' is not valid for specified reduction operation}}
+ foo();
+#pragma omp parallel reduction(| : argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{variable of type 'float' is not valid for specified reduction operation}}
+ foo();
+#pragma omp parallel reduction(|| : argc ? i : argc) // expected-error 2 {{expected variable name}}
+ foo();
+#pragma omp parallel reduction(foo : argc) //expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max'}}
+ foo();
+#pragma omp parallel reduction(&& : argc)
+ foo();
+#pragma omp parallel reduction(^ : T) // expected-error {{'T' does not refer to a value}}
+ foo();
+#pragma omp parallel reduction(+ : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}}
+ foo();
+#pragma omp parallel reduction(min : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
+ foo();
+#pragma omp parallel reduction(max : qa[1]) // expected-error 2 {{expected variable name}}
+ foo();
+#pragma omp parallel reduction(+ : ba) // expected-error {{a reduction variable with array type 'const S2 [5]'}}
+ foo();
+#pragma omp parallel reduction(* : ca) // expected-error {{a reduction variable with array type 'const S3 [5]'}}
+ foo();
+#pragma omp parallel reduction(- : da) // expected-error {{a reduction variable with array type 'const int [5]'}} expected-error {{a reduction variable with array type 'const float [5]'}}
+ foo();
+#pragma omp parallel reduction(^ : fl) // expected-error {{variable of type 'float' is not valid for specified reduction operation}}
+ foo();
+#pragma omp parallel reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}}
+ foo();
+#pragma omp parallel reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}}
+ foo();
+#pragma omp parallel reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}}
+ foo();
+#pragma omp parallel reduction(+ : o) // expected-error {{variable of type 'class S6' is not valid for specified reduction operation}}
+ foo();
+#pragma omp parallel private(i), reduction(+ : j), reduction(+ : q) // expected-error 4 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ foo();
+#pragma omp parallel private(k)
+#pragma omp parallel reduction(+ : p), reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ foo();
+#pragma omp parallel reduction(+ : p), reduction(+ : p) // expected-error 3 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 3 {{previously referenced here}}
+ foo();
+#pragma omp parallel reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}}
+ foo();
+#pragma omp parallel shared(i)
+#pragma omp parallel reduction(min : i)
+#pragma omp parallel reduction(max : j) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ foo();
+#pragma omp parallel
+#pragma omp for private(fl)
+ for (int i = 0; i < 10; ++i)
+#pragma omp parallel reduction(+ : fl)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(- : fl)
+ for (int i = 0; i < 10; ++i)
+#pragma omp parallel reduction(+ : fl)
+ foo();
+
+ return T();
+}
+
+int main(int argc, char **argv) {
+ const int d = 5; // expected-note 2 {{'d' defined here}}
+ const int da[5] = {0}; // expected-note {{'da' defined here}}
+ int qa[5] = {0};
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note {{'g' defined here}}
+ int i;
+ int &j = i; // expected-note 2 {{'j' defined here}}
+ S3 &p = k; // expected-note 2 {{'p' defined here}}
+ const int &r = da[i]; // expected-note {{'r' defined here}}
+ int &q = qa[i]; // expected-note {{'q' defined here}}
+ float fl; // expected-note {{'fl' defined here}}
+#pragma omp parallel reduction // expected-error {{expected '(' after 'reduction'}}
+ foo();
+#pragma omp parallel reduction + // expected-error {{expected '(' after 'reduction'}} expected-warning {{extra tokens at the end of '#pragma omp parallel' are ignored}}
+ foo();
+#pragma omp parallel reduction( // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+#pragma omp parallel reduction(- // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+#pragma omp parallel reduction() // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
+ foo();
+#pragma omp parallel reduction(*) // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}}
+ foo();
+#pragma omp parallel reduction(\) // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
+ foo();
+#pragma omp parallel reduction(foo : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max'}}
+ foo();
+#pragma omp parallel reduction(| : argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+#pragma omp parallel reduction(|| : argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ foo();
+#pragma omp parallel reduction(~ : argc) // expected-error {{expected unqualified-id}}
+ foo();
+#pragma omp parallel reduction(&& : argc)
+ foo();
+#pragma omp parallel reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
+ foo();
+#pragma omp parallel reduction(+ : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}}
+ foo();
+#pragma omp parallel reduction(min : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}}
+ foo();
+#pragma omp parallel reduction(max : argv[1]) // expected-error {{expected variable name}}
+ foo();
+#pragma omp parallel reduction(+ : ba) // expected-error {{a reduction variable with array type 'const S2 [5]'}}
+ foo();
+#pragma omp parallel reduction(* : ca) // expected-error {{a reduction variable with array type 'const S3 [5]'}}
+ foo();
+#pragma omp parallel reduction(- : da) // expected-error {{a reduction variable with array type 'const int [5]'}}
+ foo();
+#pragma omp parallel reduction(^ : fl) // expected-error {{variable of type 'float' is not valid for specified reduction operation}}
+ foo();
+#pragma omp parallel reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}}
+ foo();
+#pragma omp parallel reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}}
+ foo();
+#pragma omp parallel reduction(& : e, g) // expected-error {{reduction variable must have an accessible, unambiguous default constructor}} expected-error {{variable of type 'S5' is not valid for specified reduction operation}}
+ foo();
+#pragma omp parallel reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}}
+ foo();
+#pragma omp parallel reduction(+ : o) // expected-error {{variable of type 'class S6' is not valid for specified reduction operation}}
+ foo();
+#pragma omp parallel private(i), reduction(+ : j), reduction(+ : q) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ foo();
+#pragma omp parallel private(k)
+#pragma omp parallel reduction(+ : p), reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ foo();
+#pragma omp parallel reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}}
+ foo();
+#pragma omp parallel reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}}
+ foo();
+#pragma omp parallel shared(i)
+#pragma omp parallel reduction(min : i)
+#pragma omp parallel reduction(max : j) // expected-error {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ foo();
+#pragma omp parallel
+#pragma omp for private(fl)
+ for (int i = 0; i < 10; ++i)
+#pragma omp parallel reduction(+ : fl)
+ foo();
+#pragma omp parallel
+#pragma omp for reduction(- : fl)
+ for (int i = 0; i < 10; ++i)
+#pragma omp parallel reduction(+ : fl)
+ foo();
+
+ return tmain(argc) + tmain(fl); // expected-note {{in instantiation of function template specialization 'tmain<int>' requested here}} expected-note {{in instantiation of function template specialization 'tmain<float>' requested here}}
+}
diff --git a/test/OpenMP/parallel_sections_ast_print.cpp b/test/OpenMP/parallel_sections_ast_print.cpp
new file mode 100644
index 000000000000..43665f743952
--- /dev/null
+++ b/test/OpenMP/parallel_sections_ast_print.cpp
@@ -0,0 +1,144 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ast-print %s | FileCheck %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -emit-pch -o %t %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
+// expected-no-diagnostics
+
+#ifndef HEADER
+#define HEADER
+
+void foo() {}
+
+template <class T>
+struct S {
+ operator T() { return T(); }
+ static T TS;
+#pragma omp threadprivate(TS)
+};
+
+// CHECK: template <class T = int> struct S {
+// CHECK: static int TS;
+// CHECK-NEXT: #pragma omp threadprivate(S<int>::TS)
+// CHECK-NEXT: }
+// CHECK: template <class T = long> struct S {
+// CHECK: static long TS;
+// CHECK-NEXT: #pragma omp threadprivate(S<long>::TS)
+// CHECK-NEXT: }
+// CHECK: template <class T> struct S {
+// CHECK: static T TS;
+// CHECK-NEXT: #pragma omp threadprivate(S::TS)
+// CHECK: };
+
+template <typename T, int C>
+T tmain(T argc, T *argv) {
+ T b = argc, c, d, e, f, g;
+ static T a;
+ S<T> s;
+#pragma omp parallel sections
+ {
+ a = 2;
+ }
+#pragma omp parallel sections default(none), private(argc, b) firstprivate(argv) shared(d) if (argc > 0) num_threads(C) copyin(S < T > ::TS) proc_bind(master) reduction(+ : c) reduction(max : e)
+ {
+ foo();
+ }
+#pragma omp parallel sections if (C) num_threads(s) proc_bind(close) reduction(^ : e, f) reduction(&& : g) lastprivate(b, c)
+ {
+ foo();
+#pragma omp section
+ foo();
+ }
+ return 0;
+}
+
+// CHECK: template <typename T = int, int C = 5> int tmain(int argc, int *argv) {
+// CHECK-NEXT: int b = argc, c, d, e, f, g;
+// CHECK-NEXT: static int a;
+// CHECK-NEXT: S<int> s;
+// CHECK-NEXT: #pragma omp parallel sections
+// CHECK-NEXT: {
+// CHECK-NEXT: a = 2;
+// CHECK-NEXT: }
+// CHECK-NEXT: #pragma omp parallel sections default(none) private(argc,b) firstprivate(argv) shared(d) if(argc > 0) num_threads(5) copyin(S<int>::TS) proc_bind(master) reduction(+: c) reduction(max: e)
+// CHECK-NEXT: {
+// CHECK-NEXT: foo();
+// CHECK-NEXT: }
+// CHECK-NEXT: #pragma omp parallel sections if(5) num_threads(s) proc_bind(close) reduction(^: e,f) reduction(&&: g) lastprivate(b,c)
+// CHECK-NEXT: {
+// CHECK-NEXT: foo();
+// CHECK-NEXT: #pragma omp section
+// CHECK-NEXT: foo();
+// CHECK-NEXT: }
+// CHECK: template <typename T = long, int C = 1> long tmain(long argc, long *argv) {
+// CHECK-NEXT: long b = argc, c, d, e, f, g;
+// CHECK-NEXT: static long a;
+// CHECK-NEXT: S<long> s;
+// CHECK-NEXT: #pragma omp parallel sections
+// CHECK-NEXT: {
+// CHECK-NEXT: a = 2;
+// CHECK-NEXT: }
+// CHECK-NEXT: #pragma omp parallel sections default(none) private(argc,b) firstprivate(argv) shared(d) if(argc > 0) num_threads(1) copyin(S<long>::TS) proc_bind(master) reduction(+: c) reduction(max: e)
+// CHECK-NEXT: {
+// CHECK-NEXT: foo();
+// CHECK-NEXT: }
+// CHECK-NEXT: #pragma omp parallel sections if(1) num_threads(s) proc_bind(close) reduction(^: e,f) reduction(&&: g) lastprivate(b,c)
+// CHECK-NEXT: {
+// CHECK-NEXT: foo();
+// CHECK-NEXT: #pragma omp section
+// CHECK-NEXT: foo();
+// CHECK-NEXT: }
+// CHECK: template <typename T, int C> T tmain(T argc, T *argv) {
+// CHECK-NEXT: T b = argc, c, d, e, f, g;
+// CHECK-NEXT: static T a;
+// CHECK-NEXT: S<T> s;
+// CHECK-NEXT: #pragma omp parallel sections
+// CHECK-NEXT: {
+// CHECK-NEXT: a = 2;
+// CHECK-NEXT: }
+// CHECK-NEXT: #pragma omp parallel sections default(none) private(argc,b) firstprivate(argv) shared(d) if(argc > 0) num_threads(C) copyin(S<T>::TS) proc_bind(master) reduction(+: c) reduction(max: e)
+// CHECK-NEXT: {
+// CHECK-NEXT: foo();
+// CHECK-NEXT: }
+// CHECK-NEXT: #pragma omp parallel sections if(C) num_threads(s) proc_bind(close) reduction(^: e,f) reduction(&&: g) lastprivate(b,c)
+// CHECK-NEXT: {
+// CHECK-NEXT: foo();
+// CHECK-NEXT: #pragma omp section
+// CHECK-NEXT: foo();
+// CHECK-NEXT: }
+
+enum Enum {};
+
+int main(int argc, char **argv) {
+ long x;
+ int b = argc, c, d, e, f, g;
+ static int a;
+#pragma omp threadprivate(a)
+ Enum ee;
+// CHECK: Enum ee;
+#pragma omp parallel sections
+ // CHECK-NEXT: #pragma omp parallel sections
+ {
+ a = 2;
+ }
+// CHECK-NEXT: {
+// CHECK-NEXT: a = 2;
+// CHECK-NEXT: }
+#pragma omp parallel sections default(none), private(argc, b) firstprivate(argv) if (argc > 0) num_threads(ee) copyin(a) proc_bind(spread) reduction(| : c, d) reduction(* : e) lastprivate(argv)
+ // CHECK-NEXT: #pragma omp parallel sections default(none) private(argc,b) firstprivate(argv) if(argc > 0) num_threads(ee) copyin(a) proc_bind(spread) reduction(|: c,d) reduction(*: e) lastprivate(argv)
+ {
+ foo();
+#pragma omp section
+ foo();
+#pragma omp section
+ foo();
+ }
+ // CHECK-NEXT: {
+ // CHECK-NEXT: foo();
+ // CHECK-NEXT: #pragma omp section
+ // CHECK-NEXT: foo();
+ // CHECK-NEXT: #pragma omp section
+ // CHECK-NEXT: foo();
+ // CHECK-NEXT: }
+ return tmain<int, 5>(b, &b) + tmain<long, 1>(x, &x);
+}
+
+#endif
diff --git a/test/OpenMP/parallel_sections_copyin_messages.cpp b/test/OpenMP/parallel_sections_copyin_messages.cpp
new file mode 100644
index 000000000000..500417e113be
--- /dev/null
+++ b/test/OpenMP/parallel_sections_copyin_messages.cpp
@@ -0,0 +1,105 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -o - %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}}
+class S2 {
+ mutable int a;
+
+public:
+ S2() : a(0) {}
+ S2 &operator=(S2 &s2) { return *this; }
+};
+class S3 {
+ int a;
+
+public:
+ S3() : a(0) {}
+ S3 &operator=(S3 &s3) { return *this; }
+};
+class S4 { // expected-note {{'S4' declared here}}
+ int a;
+ S4();
+ S4 &operator=(const S4 &s4);
+
+public:
+ S4(int v) : a(v) {}
+};
+class S5 { // expected-note {{'S5' declared here}}
+ int a;
+ S5() : a(0) {}
+ S5 &operator=(const S5 &s5) { return *this; }
+
+public:
+ S5(int v) : a(v) {}
+};
+template <class T>
+class ST {
+public:
+ static T s;
+};
+
+S2 k;
+S3 h;
+S4 l(3); // expected-note {{'l' defined here}}
+S5 m(4); // expected-note {{'m' defined here}}
+#pragma omp threadprivate(h, k, l, m)
+
+int main(int argc, char **argv) {
+ int i;
+#pragma omp parallel sections copyin // expected-error {{expected '(' after 'copyin'}}
+ {
+ foo();
+ }
+#pragma omp parallel sections copyin( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections copyin() // expected-error {{expected expression}}
+ {
+ foo();
+ }
+#pragma omp parallel sections copyin(k // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections copyin(h, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections copyin(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel sections copyin(l) // expected-error {{copyin variable must have an accessible, unambiguous copy assignment operator}}
+ {
+ foo();
+ }
+#pragma omp parallel sections copyin(S1) // expected-error {{'S1' does not refer to a value}}
+ {
+ foo();
+ }
+#pragma omp parallel sections copyin(argv[1]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel sections copyin(i) // expected-error {{copyin variable must be threadprivate}}
+ {
+ foo();
+ }
+#pragma omp parallel sections copyin(m) // expected-error {{copyin variable must have an accessible, unambiguous copy assignment operator}}
+ {
+ foo();
+ }
+#pragma omp parallel sections copyin(ST < int > ::s) // expected-error {{copyin variable must be threadprivate}}
+ {
+ foo();
+ }
+
+ return 0;
+}
diff --git a/test/OpenMP/parallel_sections_default_messages.cpp b/test/OpenMP/parallel_sections_default_messages.cpp
new file mode 100644
index 000000000000..55d5d4f2efb6
--- /dev/null
+++ b/test/OpenMP/parallel_sections_default_messages.cpp
@@ -0,0 +1,39 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -o - %s
+
+void foo();
+
+int main(int argc, char **argv) {
+#pragma omp parallel sections default // expected-error {{expected '(' after 'default'}}
+ {
+#pragma omp parallel sections default( // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+#pragma omp parallel sections default() // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}}
+ {
+#pragma omp parallel sections default(none // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+#pragma omp parallel sections default(shared), default(shared) // expected-error {{directive '#pragma omp parallel sections' cannot contain more than one 'default' clause}}
+ {
+#pragma omp parallel sections default(x) // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}}
+ {
+ foo();
+ }
+ }
+ }
+ }
+ }
+ }
+
+#pragma omp parallel sections default(none)
+ {
+ ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
+ }
+
+#pragma omp parallel sections default(none)
+ {
+#pragma omp parallel sections default(shared)
+ {
+ ++argc;
+ }
+ }
+ return 0;
+}
diff --git a/test/OpenMP/parallel_sections_firstprivate_messages.cpp b/test/OpenMP/parallel_sections_firstprivate_messages.cpp
new file mode 100644
index 000000000000..ffd2b0cfd5e5
--- /dev/null
+++ b/test/OpenMP/parallel_sections_firstprivate_messages.cpp
@@ -0,0 +1,295 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+
+public:
+ S2() : a(0) {}
+ S2(S2 &s2) : a(s2.a) {}
+ static float S2s;
+ static const float S2sc;
+};
+const float S2::S2sc = 0;
+const S2 b;
+const S2 ba[5];
+class S3 {
+ int a;
+ S3 &operator=(const S3 &s3);
+
+public:
+ S3() : a(0) {}
+ S3(S3 &s3) : a(s3.a) {}
+};
+const S3 c;
+const S3 ca[5];
+extern const int f;
+class S4 { // expected-note 2 {{'S4' declared here}}
+ int a;
+ S4();
+ S4(const S4 &s4);
+
+public:
+ S4(int v) : a(v) {}
+};
+class S5 { // expected-note 4 {{'S5' declared here}}
+ int a;
+ S5(const S5 &s5) : a(s5.a) {}
+
+public:
+ S5() : a(0) {}
+ S5(int v) : a(v) {}
+};
+class S6 {
+ int a;
+ S6() : a(0) {}
+
+public:
+ S6(const S6 &s6) : a(s6.a) {}
+ S6(int v) : a(v) {}
+};
+
+S3 h;
+#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
+
+template <class I, class C>
+int foomain(int argc, char **argv) {
+ I e(4); // expected-note {{'e' defined here}}
+ C g(5); // expected-note 2 {{'g' defined here}}
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp parallel sections firstprivate // expected-error {{expected '(' after 'firstprivate'}}
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate() // expected-error {{expected expression}}
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(argc)
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(argv[1]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(e, g) // expected-error 2 {{firstprivate variable must have an accessible, unambiguous copy constructor}}
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
+ {
+ foo();
+ }
+#pragma omp parallel sections linear(i) // expected-error {{unexpected OpenMP clause 'linear' in directive '#pragma omp parallel sections'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+ {
+ int v = 0;
+ int i;
+#pragma omp parallel sections firstprivate(i)
+ {
+ foo();
+ }
+ v += i;
+ }
+#pragma omp parallel shared(i)
+#pragma omp parallel private(i)
+#pragma omp parallel sections firstprivate(j) // expected-error {{arguments of OpenMP clause 'firstprivate' cannot be of reference type}}
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(i)
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(g) firstprivate(g) // expected-error {{firstprivate variable must have an accessible, unambiguous copy constructor}}
+ {
+ foo();
+ }
+#pragma omp parallel private(i)
+#pragma omp parallel sections firstprivate(i)
+ {
+ foo();
+ }
+#pragma omp parallel reduction(+ : i)
+#pragma omp parallel sections firstprivate(i)
+ {
+ foo();
+ }
+ return 0;
+}
+
+int main(int argc, char **argv) {
+ const int d = 5;
+ const int da[5] = {0};
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note 2 {{'g' defined here}}
+ S3 m;
+ S6 n(2);
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp parallel sections firstprivate // expected-error {{expected '(' after 'firstprivate'}}
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate() // expected-error {{expected expression}}
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(argc)
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(argv[1]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(2 * 2) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(ba) // OK
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(ca) // OK
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(da) // OK
+ {
+ foo();
+ }
+ int xa;
+#pragma omp parallel sections firstprivate(xa) // OK
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(S2::S2s) // OK
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(S2::S2sc) // OK
+ {
+ foo();
+ }
+#pragma omp parallel sections safelen(5) // expected-error {{unexpected OpenMP clause 'safelen' in directive '#pragma omp parallel sections'}}
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(e, g) // expected-error 2 {{firstprivate variable must have an accessible, unambiguous copy constructor}}
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(m) // OK
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private(xa), firstprivate(xa) // expected-error {{private variable cannot be firstprivate}} expected-note {{defined as private}}
+ {
+ foo();
+ }
+#pragma omp parallel shared(xa)
+#pragma omp parallel sections firstprivate(xa) // OK: may be firstprivate
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(j) // expected-error {{arguments of OpenMP clause 'firstprivate' cannot be of reference type}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(g) firstprivate(g) // expected-error {{firstprivate variable must have an accessible, unambiguous copy constructor}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(n) firstprivate(n) // OK
+ {
+ foo();
+ }
+#pragma omp parallel
+ {
+ int v = 0;
+ int i;
+#pragma omp parallel sections firstprivate(i)
+ {
+ foo();
+ }
+ v += i;
+ }
+#pragma omp parallel private(i)
+#pragma omp parallel sections firstprivate(i)
+ {
+ foo();
+ }
+#pragma omp parallel reduction(+ : i)
+#pragma omp parallel sections firstprivate(i)
+ {
+ foo();
+ }
+
+ return foomain<S4, S5>(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<S4, S5>' requested here}}
+}
diff --git a/test/OpenMP/parallel_sections_if_messages.cpp b/test/OpenMP/parallel_sections_if_messages.cpp
new file mode 100644
index 000000000000..4af0d8561d03
--- /dev/null
+++ b/test/OpenMP/parallel_sections_if_messages.cpp
@@ -0,0 +1,113 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}}
+
+template <class T, class S> // expected-note {{declared here}}
+int tmain(T argc, S **argv) {
+ #pragma omp parallel sections if // expected-error {{expected '(' after 'if'}}
+ {
+ foo();
+ }
+ #pragma omp parallel sections if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+ #pragma omp parallel sections if () // expected-error {{expected expression}}
+ {
+ foo();
+ }
+ #pragma omp parallel sections if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+ #pragma omp parallel sections if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
+ {
+ foo();
+ }
+ #pragma omp parallel sections if (argc > 0 ? argv[1] : argv[2])
+ {
+ foo();
+ }
+ #pragma omp parallel sections if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp parallel sections' cannot contain more than one 'if' clause}}
+ {
+ foo();
+ }
+ #pragma omp parallel sections if (S) // expected-error {{'S' does not refer to a value}}
+ {
+ foo();
+ }
+ #pragma omp parallel sections if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+ #pragma omp parallel sections if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+ #pragma omp parallel sections if(argc)
+ {
+ foo();
+ }
+
+ return 0;
+}
+
+int main(int argc, char **argv) {
+ #pragma omp parallel sections if // expected-error {{expected '(' after 'if'}}
+ {
+ foo();
+ }
+ #pragma omp parallel sections if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+ #pragma omp parallel sections if () // expected-error {{expected expression}}
+ {
+ foo();
+ }
+ #pragma omp parallel sections if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+ #pragma omp parallel sections if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
+ {
+ foo();
+ }
+ #pragma omp parallel sections if (argc > 0 ? argv[1] : argv[2])
+ {
+ foo();
+ }
+ #pragma omp parallel sections if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp parallel sections' cannot contain more than one 'if' clause}}
+ {
+ foo();
+ }
+ #pragma omp parallel sections if (S1) // expected-error {{'S1' does not refer to a value}}
+ {
+ foo();
+ }
+ #pragma omp parallel sections if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+ #pragma omp parallel sections if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+ #pragma omp parallel sections if (1 0) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+ #pragma omp parallel sections if(if(tmain(argc, argv) // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+
+ return tmain(argc, argv);
+}
diff --git a/test/OpenMP/parallel_sections_lastprivate_messages.cpp b/test/OpenMP/parallel_sections_lastprivate_messages.cpp
new file mode 100644
index 000000000000..c71c115bd187
--- /dev/null
+++ b/test/OpenMP/parallel_sections_lastprivate_messages.cpp
@@ -0,0 +1,269 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+
+public:
+ S2() : a(0) {}
+ S2(S2 &s2) : a(s2.a) {}
+ static float S2s; // expected-note {{static data member is predetermined as shared}}
+ static const float S2sc;
+};
+const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const S2 b;
+const S2 ba[5];
+class S3 { // expected-note 2 {{'S3' declared here}}
+ int a;
+ S3 &operator=(const S3 &s3);
+
+public:
+ S3() : a(0) {}
+ S3(S3 &s3) : a(s3.a) {}
+};
+const S3 c; // expected-note {{global variable is predetermined as shared}}
+const S3 ca[5]; // expected-note {{global variable is predetermined as shared}}
+extern const int f; // expected-note {{global variable is predetermined as shared}}
+class S4 { // expected-note 3 {{'S4' declared here}}
+ int a;
+ S4();
+ S4(const S4 &s4);
+
+public:
+ S4(int v) : a(v) {}
+};
+class S5 { // expected-note {{'S5' declared here}}
+ int a;
+ S5() : a(0) {}
+
+public:
+ S5(const S5 &s5) : a(s5.a) {}
+ S5(int v) : a(v) {}
+};
+class S6 {
+ int a;
+ S6() : a(0) {}
+
+public:
+ S6(const S6 &s6) : a(s6.a) {}
+ S6(int v) : a(v) {}
+};
+
+S3 h;
+#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
+
+template <class I, class C>
+int foomain(int argc, char **argv) {
+ I e(4); // expected-note {{'e' defined here}}
+ I g(5); // expected-note {{'g' defined here}}
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp parallel sections lastprivate // expected-error {{expected '(' after 'lastprivate'}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate() // expected-error {{expected expression}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(argc)
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(S1) // expected-error {{'S1' does not refer to a value}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(argv[1]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(e, g) // expected-error 2 {{lastprivate variable must have an accessible, unambiguous default constructor}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}}
+ {
+ foo();
+ }
+#pragma omp parallel sections linear(i) // expected-error {{unexpected OpenMP clause 'linear' in directive '#pragma omp parallel sections'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+ {
+ int v = 0;
+ int i;
+#pragma omp parallel sections lastprivate(i)
+ {
+ foo();
+ }
+ v += i;
+ }
+#pragma omp parallel shared(i)
+#pragma omp parallel private(i)
+#pragma omp parallel sections lastprivate(j) // expected-error {{arguments of OpenMP clause 'lastprivate' cannot be of reference type}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(i)
+ {
+ foo();
+ }
+ return 0;
+}
+
+int main(int argc, char **argv) {
+ const int d = 5; // expected-note {{constant variable is predetermined as shared}}
+ const int da[5] = {0}; // expected-note {{constant variable is predetermined as shared}}
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note {{'g' defined here}}
+ S3 m; // expected-note 2 {{'m' defined here}}
+ S6 n(2);
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp parallel sections lastprivate // expected-error {{expected '(' after 'lastprivate'}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate() // expected-error {{expected expression}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(argc)
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(S1) // expected-error {{'S1' does not refer to a value}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(argv[1]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(2 * 2) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(ba)
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(da) // expected-error {{shared variable cannot be lastprivate}}
+ {
+ foo();
+ }
+ int xa;
+#pragma omp parallel sections lastprivate(xa) // OK
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(S2::S2s) // expected-error {{shared variable cannot be lastprivate}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}}
+ {
+ foo();
+ }
+#pragma omp parallel sections safelen(5) // expected-error {{unexpected OpenMP clause 'safelen' in directive '#pragma omp parallel sections'}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(e, g) // expected-error 2 {{lastprivate variable must have an accessible, unambiguous default constructor}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(m) // expected-error {{lastprivate variable must have an accessible, unambiguous copy assignment operator}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private(xa), lastprivate(xa) // expected-error {{private variable cannot be lastprivate}} expected-note {{defined as private}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(i)
+ {
+ foo();
+ }
+#pragma omp parallel private(xa)
+#pragma omp parallel sections lastprivate(xa)
+ {
+ foo();
+ }
+#pragma omp parallel reduction(+ : xa)
+#pragma omp parallel sections lastprivate(xa)
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(j) // expected-error {{arguments of OpenMP clause 'lastprivate' cannot be of reference type}}
+ {
+ foo();
+ }
+#pragma omp parallel sections firstprivate(m) lastprivate(m) // expected-error {{lastprivate variable must have an accessible, unambiguous copy assignment operator}}
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(n) firstprivate(n) // OK
+ {
+ foo();
+ }
+ return foomain<S4, S5>(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<S4, S5>' requested here}}
+}
diff --git a/test/OpenMP/parallel_sections_messages.cpp b/test/OpenMP/parallel_sections_messages.cpp
new file mode 100644
index 000000000000..f5875098e82b
--- /dev/null
+++ b/test/OpenMP/parallel_sections_messages.cpp
@@ -0,0 +1,85 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -std=c++11 -o - %s
+
+void foo() {
+}
+
+#pragma omp parallel sections // expected-error {{unexpected OpenMP directive '#pragma omp parallel sections'}}
+
+int main(int argc, char **argv) {
+#pragma omp parallel sections {// expected-warning {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
+ {
+ foo();
+ }
+#pragma omp parallel sections( // expected-warning {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
+ {
+ foo();
+ }
+#pragma omp parallel sections[ // expected-warning {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
+ {
+ foo();
+ }
+#pragma omp parallel sections] // expected-warning {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
+ {
+ foo();
+ }
+#pragma omp parallel sections) // expected-warning {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
+ {
+ foo();
+ }
+#pragma omp parallel sections } // expected-warning {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
+ {
+ foo();
+ }
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
+#pragma omp parallel sections unknown()
+ {
+ foo();
+#pragma omp section
+ L1:
+ foo();
+ }
+#pragma omp parallel sections
+ {
+ ;
+ }
+#pragma omp parallel sections
+ {
+ goto L1; // expected-error {{use of undeclared label 'L1'}}
+ }
+
+ for (int i = 0; i < 10; ++i) {
+ switch (argc) {
+ case (0):
+#pragma omp parallel sections
+ {
+ foo();
+ break; // expected-error {{'break' statement not in loop or switch statement}}
+ continue; // expected-error {{'continue' statement not in loop statement}}
+ }
+ default:
+ break;
+ }
+ }
+#pragma omp parallel sections default(none)
+ {
+ ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
+ }
+
+ goto L2; // expected-error {{use of undeclared label 'L2'}}
+#pragma omp parallel sections
+ {
+ L2:
+ foo();
+ }
+#pragma omp parallel sections
+ {
+ return 1; // expected-error {{cannot return from OpenMP region}}
+ }
+
+ [[]] // expected-error {{an attribute list cannot appear here}}
+#pragma omp parallel sections
+ {
+ }
+
+ return 0;
+}
diff --git a/test/OpenMP/parallel_sections_misc_messages.c b/test/OpenMP/parallel_sections_misc_messages.c
new file mode 100644
index 000000000000..94f1241335ab
--- /dev/null
+++ b/test/OpenMP/parallel_sections_misc_messages.c
@@ -0,0 +1,260 @@
+// RUN: %clang_cc1 -fsyntax-only -fopenmp=libiomp5 -verify %s
+
+void foo();
+
+// expected-error@+1 {{unexpected OpenMP directive '#pragma omp parallel sections'}}
+#pragma omp parallel sections
+
+// expected-error@+1 {{unexpected OpenMP directive '#pragma omp parallel sections'}}
+#pragma omp parallel sections foo
+
+void test_no_clause() {
+ int i;
+#pragma omp parallel sections
+ {
+ foo();
+ }
+
+// expected-error@+2 {{the statement for '#pragma omp parallel sections' must be a compound statement}}
+#pragma omp parallel sections
+ ++i;
+
+#pragma omp parallel sections
+ {
+ foo();
+ foo(); // expected-error {{statement in 'omp parallel sections' directive must be enclosed into a section region}}
+ }
+
+}
+
+void test_branch_protected_scope() {
+ int i = 0;
+L1:
+ ++i;
+
+ int x[24];
+
+#pragma omp parallel sections
+ {
+ if (i == 5)
+ goto L1; // expected-error {{use of undeclared label 'L1'}}
+ else if (i == 6)
+ return; // expected-error {{cannot return from OpenMP region}}
+ else if (i == 7)
+ goto L2;
+ else if (i == 8) {
+ L2:
+ x[i]++;
+ }
+#pragma omp section
+ if (i == 5)
+ goto L1; // expected-error {{use of undeclared label 'L1'}}
+ else if (i == 6)
+ return; // expected-error {{cannot return from OpenMP region}}
+ else if (i == 7)
+ goto L3;
+ else if (i == 8) {
+ L3:
+ x[i]++;
+ }
+ }
+
+ if (x[0] == 0)
+ goto L2; // expected-error {{use of undeclared label 'L2'}}
+ else if (x[1] == 1)
+ goto L1;
+ goto L3; // expected-error {{use of undeclared label 'L3'}}
+}
+
+void test_invalid_clause() {
+ int i;
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
+#pragma omp parallel sections foo bar
+ {
+ foo();
+// expected-error@+1 {{unexpected OpenMP clause 'nowait' in directive '#pragma omp section'}}
+#pragma omp section nowait
+ ;
+ }
+}
+
+void test_non_identifiers() {
+ int i, x;
+
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
+#pragma omp parallel sections;
+ {
+ foo();
+ }
+// expected-error@+2 {{unexpected OpenMP clause 'linear' in directive '#pragma omp parallel sections'}}
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
+#pragma omp parallel sections linear(x);
+ {
+ foo();
+ }
+
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
+#pragma omp parallel sections private(x);
+ {
+ foo();
+ }
+
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
+#pragma omp parallel sections, private(x);
+ {
+ foo();
+ }
+}
+
+void test_private() {
+ int i;
+// expected-error@+2 {{expected expression}}
+// expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+#pragma omp parallel sections private(
+ {
+ foo();
+ }
+// expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+// expected-error@+1 2 {{expected expression}}
+#pragma omp parallel sections private(,
+ {
+ foo();
+ }
+// expected-error@+1 2 {{expected expression}}
+#pragma omp parallel sections private(, )
+ {
+ foo();
+ }
+// expected-error@+1 {{expected expression}}
+#pragma omp parallel sections private()
+ {
+ foo();
+ }
+// expected-error@+1 {{expected expression}}
+#pragma omp parallel sections private(int)
+ {
+ foo();
+ }
+// expected-error@+1 {{expected variable name}}
+#pragma omp parallel sections private(0)
+ {
+ foo();
+ }
+
+ int x, y, z;
+#pragma omp parallel sections private(x)
+ {
+ foo();
+ }
+#pragma omp parallel sections private(x, y)
+ {
+ foo();
+ }
+#pragma omp parallel sections private(x, y, z)
+ {
+ foo();
+ }
+}
+
+void test_lastprivate() {
+ int i;
+// expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+// expected-error@+1 {{expected expression}}
+#pragma omp parallel sections lastprivate(
+ {
+ foo();
+ }
+
+// expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+// expected-error@+1 2 {{expected expression}}
+#pragma omp parallel sections lastprivate(,
+ {
+ foo();
+ }
+// expected-error@+1 2 {{expected expression}}
+#pragma omp parallel sections lastprivate(, )
+ {
+ foo();
+ }
+// expected-error@+1 {{expected expression}}
+#pragma omp parallel sections lastprivate()
+ {
+ foo();
+ }
+// expected-error@+1 {{expected expression}}
+#pragma omp parallel sections lastprivate(int)
+ {
+ foo();
+ }
+// expected-error@+1 {{expected variable name}}
+#pragma omp parallel sections lastprivate(0)
+ {
+ foo();
+ }
+
+ int x, y, z;
+#pragma omp parallel sections lastprivate(x)
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(x, y)
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(x, y, z)
+ {
+ foo();
+ }
+}
+
+void test_firstprivate() {
+ int i;
+// expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+// expected-error@+1 {{expected expression}}
+#pragma omp parallel sections firstprivate(
+ {
+ foo();
+ }
+
+// expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+// expected-error@+1 2 {{expected expression}}
+#pragma omp parallel sections firstprivate(,
+ {
+ foo();
+ }
+// expected-error@+1 2 {{expected expression}}
+#pragma omp parallel sections firstprivate(, )
+ {
+ foo();
+ }
+// expected-error@+1 {{expected expression}}
+#pragma omp parallel sections firstprivate()
+ {
+ foo();
+ }
+// expected-error@+1 {{expected expression}}
+#pragma omp parallel sections firstprivate(int)
+ {
+ foo();
+ }
+// expected-error@+1 {{expected variable name}}
+#pragma omp parallel sections firstprivate(0)
+ {
+ foo();
+ }
+
+ int x, y, z;
+#pragma omp parallel sections lastprivate(x) firstprivate(x)
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(x, y) firstprivate(x, y)
+ {
+ foo();
+ }
+#pragma omp parallel sections lastprivate(x, y, z) firstprivate(x, y, z)
+ {
+ foo();
+ }
+}
+
diff --git a/test/OpenMP/parallel_sections_num_threads_messages.cpp b/test/OpenMP/parallel_sections_num_threads_messages.cpp
new file mode 100644
index 000000000000..927e8d76d54c
--- /dev/null
+++ b/test/OpenMP/parallel_sections_num_threads_messages.cpp
@@ -0,0 +1,63 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}}
+
+template <class T, typename S, int N> // expected-note {{declared here}}
+T tmain(T argc, S **argv) {
+ #pragma omp parallel sections num_threads // expected-error {{expected '(' after 'num_threads'}}
+ {foo();}
+ #pragma omp parallel sections num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {foo();}
+ #pragma omp parallel sections num_threads () // expected-error {{expected expression}}
+ {foo();}
+ #pragma omp parallel sections num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {foo();}
+ #pragma omp parallel sections num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
+ {foo();}
+ #pragma omp parallel sections num_threads ((argc > 0) ? argv[1] : argv[2]) // expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
+ {foo();}
+ #pragma omp parallel sections num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel sections' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a positive integer value}}
+ {foo();}
+ #pragma omp parallel sections num_threads (S) // expected-error {{'S' does not refer to a value}}
+ {foo();}
+ #pragma omp parallel sections num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error 2 {{expression must have integral or unscoped enumeration type, not 'char *'}}
+ {foo();}
+ #pragma omp parallel sections num_threads (argc)
+ {foo();}
+ #pragma omp parallel sections num_threads (N) // expected-error {{argument to 'num_threads' clause must be a positive integer value}}
+ {foo();}
+
+ return argc;
+}
+
+int main(int argc, char **argv) {
+ #pragma omp parallel sections num_threads // expected-error {{expected '(' after 'num_threads'}}
+ {foo();}
+ #pragma omp parallel sections num_threads ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {foo();}
+ #pragma omp parallel sections num_threads () // expected-error {{expected expression}}
+ {foo();}
+ #pragma omp parallel sections num_threads (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {foo();}
+ #pragma omp parallel sections num_threads (argc)) // expected-warning {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
+ {foo();}
+ #pragma omp parallel sections num_threads (argc > 0 ? argv[1] : argv[2]) // expected-error {{integral }}
+ {foo();}
+ #pragma omp parallel sections num_threads (foobool(argc)), num_threads (true), num_threads (-5) // expected-error 2 {{directive '#pragma omp parallel sections' cannot contain more than one 'num_threads' clause}} expected-error {{argument to 'num_threads' clause must be a positive integer value}}
+ {foo();}
+ #pragma omp parallel sections num_threads (S1) // expected-error {{'S1' does not refer to a value}}
+ {foo();}
+ #pragma omp parallel sections num_threads (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{expression must have integral or unscoped enumeration type, not 'char *'}}
+ {foo();}
+ #pragma omp parallel sections num_threads (num_threads(tmain<int, char, -1>(argc, argv) // expected-error 2 {{expected ')'}} expected-note 2 {{to match this '('}} expected-note {{in instantiation of function template specialization 'tmain<int, char, -1>' requested here}}
+ {foo();}
+
+ return tmain<int, char, 3>(argc, argv); // expected-note {{in instantiation of function template specialization 'tmain<int, char, 3>' requested here}}
+}
diff --git a/test/OpenMP/parallel_sections_private_messages.cpp b/test/OpenMP/parallel_sections_private_messages.cpp
new file mode 100644
index 000000000000..7d39c7e2c5bb
--- /dev/null
+++ b/test/OpenMP/parallel_sections_private_messages.cpp
@@ -0,0 +1,204 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+
+public:
+ S2() : a(0) {}
+};
+const S2 b;
+const S2 ba[5];
+class S3 {
+ int a;
+
+public:
+ S3() : a(0) {}
+};
+const S3 ca[5];
+class S4 { // expected-note {{'S4' declared here}}
+ int a;
+ S4();
+
+public:
+ S4(int v) : a(v) {}
+};
+class S5 { // expected-note {{'S5' declared here}}
+ int a;
+ S5() : a(0) {}
+
+public:
+ S5(int v) : a(v) {}
+};
+
+S3 h;
+#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
+
+template <class I, class C>
+int foomain(I argc, C **argv) {
+ I e(4);
+ I g(5);
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp parallel sections private // expected-error {{expected '(' after 'private'}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private() // expected-error {{expected expression}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private(argc)
+ {
+ foo();
+ }
+#pragma omp parallel sections private(S1) // expected-error {{'S1' does not refer to a value}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private(a, b) // expected-error {{private variable with incomplete type 'S1'}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private(argv[1]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private(e, g)
+ {
+ foo();
+ }
+#pragma omp parallel sections private(h) // expected-error {{threadprivate or thread local variable cannot be private}}
+ {
+ foo();
+ }
+#pragma omp parallel sections copyprivate(h) // expected-error {{unexpected OpenMP clause 'copyprivate' in directive '#pragma omp parallel sections'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+ {
+ int v = 0;
+ int i;
+#pragma omp parallel sections private(i)
+ {
+ foo();
+ }
+ v += i;
+ }
+#pragma omp parallel shared(i)
+#pragma omp parallel private(i)
+#pragma omp parallel sections private(j) // expected-error {{arguments of OpenMP clause 'private' cannot be of reference type}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private(i)
+ {
+ foo();
+ }
+ return 0;
+}
+
+int main(int argc, char **argv) {
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note {{'g' defined here}}
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp parallel sections private // expected-error {{expected '(' after 'private'}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private() // expected-error {{expected expression}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private(argc)
+ {
+ foo();
+ }
+#pragma omp parallel sections private(S1) // expected-error {{'S1' does not refer to a value}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private(a, b) // expected-error {{private variable with incomplete type 'S1'}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private(argv[1]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private(e, g) // expected-error 2 {{private variable must have an accessible, unambiguous default constructor}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private(h) // expected-error {{threadprivate or thread local variable cannot be private}}
+ {
+ foo();
+ }
+#pragma omp parallel sections copyprivate(h) // expected-error {{unexpected OpenMP clause 'copyprivate' in directive '#pragma omp parallel sections'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+ {
+ int i;
+#pragma omp parallel sections private(i)
+ {
+ foo();
+ }
+ }
+#pragma omp parallel shared(i)
+#pragma omp parallel private(i)
+#pragma omp parallel sections private(j) // expected-error {{arguments of OpenMP clause 'private' cannot be of reference type}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private(i)
+ {
+ foo();
+ }
+
+ return 0;
+}
+
diff --git a/test/OpenMP/parallel_sections_proc_bind_messages.cpp b/test/OpenMP/parallel_sections_proc_bind_messages.cpp
new file mode 100644
index 000000000000..9e58a734efb0
--- /dev/null
+++ b/test/OpenMP/parallel_sections_proc_bind_messages.cpp
@@ -0,0 +1,28 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -o - %s
+
+void foo();
+
+int main(int argc, char **argv) {
+#pragma omp parallel sections proc_bind // expected-error {{expected '(' after 'proc_bind'}}
+ { foo(); }
+#pragma omp parallel sections proc_bind( // expected-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ { foo(); }
+#pragma omp parallel sections proc_bind() // expected-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}}
+ { foo(); }
+#pragma omp parallel sections proc_bind(master // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ { foo(); }
+#pragma omp parallel sections proc_bind(close), proc_bind(spread) // expected-error {{directive '#pragma omp parallel sections' cannot contain more than one 'proc_bind' clause}}
+ { foo(); }
+#pragma omp parallel sections proc_bind(x) // expected-error {{expected 'master', 'close' or 'spread' in OpenMP clause 'proc_bind'}}
+ { foo(); }
+
+#pragma omp parallel sections proc_bind(master)
+ { ++argc; }
+
+#pragma omp parallel sections proc_bind(close)
+ {
+#pragma omp parallel sections proc_bind(spread)
+ { ++argc; }
+ }
+ return 0;
+}
diff --git a/test/OpenMP/parallel_sections_reduction_messages.cpp b/test/OpenMP/parallel_sections_reduction_messages.cpp
new file mode 100644
index 000000000000..8b02f2315c9d
--- /dev/null
+++ b/test/OpenMP/parallel_sections_reduction_messages.cpp
@@ -0,0 +1,358 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -o - %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}} expected-note 4 {{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+ S2 &operator+=(const S2 &arg) { return (*this); }
+
+public:
+ S2() : a(0) {}
+ S2(S2 &s2) : a(s2.a) {}
+ static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
+ static const float S2sc;
+};
+const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+S2 b; // expected-note 2 {{'b' defined here}}
+const S2 ba[5]; // expected-note 2 {{'ba' defined here}}
+class S3 {
+ int a;
+
+public:
+ S3() : a(0) {}
+ S3(const S3 &s3) : a(s3.a) {}
+ S3 operator+=(const S3 &arg1) { return arg1; }
+};
+int operator+=(const S3 &arg1, const S3 &arg2) { return 5; }
+S3 c; // expected-note 2 {{'c' defined here}}
+const S3 ca[5]; // expected-note 2 {{'ca' defined here}}
+extern const int f; // expected-note 4 {{'f' declared here}}
+class S4 { // expected-note {{'S4' declared here}}
+ int a;
+ S4();
+ S4(const S4 &s4);
+ S4 &operator+=(const S4 &arg) { return (*this); }
+
+public:
+ S4(int v) : a(v) {}
+};
+S4 &operator&=(S4 &arg1, S4 &arg2) { return arg1; }
+class S5 {
+ int a;
+ S5() : a(0) {}
+ S5(const S5 &s5) : a(s5.a) {}
+ S5 &operator+=(const S5 &arg);
+
+public:
+ S5(int v) : a(v) {}
+};
+class S6 {
+ int a;
+
+public:
+ S6() : a(6) {}
+ operator int() { return 6; }
+} o; // expected-note 2 {{'o' defined here}}
+
+S3 h, k;
+#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
+
+template <class T> // expected-note {{declared here}}
+T tmain(T argc) { // expected-note 2 {{'argc' defined here}}
+ const T d = T(); // expected-note 4 {{'d' defined here}}
+ const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
+ T qa[5] = {T()};
+ T i;
+ T &j = i; // expected-note 4 {{'j' defined here}}
+ S3 &p = k; // expected-note 2 {{'p' defined here}}
+ const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
+ T &q = qa[(int)i]; // expected-note 2 {{'q' defined here}}
+ T fl; // expected-note {{'fl' defined here}}
+#pragma omp parallel sections reduction // expected-error {{expected '(' after 'reduction'}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction + // expected-error {{expected '(' after 'reduction'}} expected-warning {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction( // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(- // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction() // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(*) // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(\) // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(& : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{variable of type 'float' is not valid for specified reduction operation}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(| : argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{variable of type 'float' is not valid for specified reduction operation}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(|| : argc ? i : argc) // expected-error 2 {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(foo : argc) //expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max'}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(&& : argc)
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(^ : T) // expected-error {{'T' does not refer to a value}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(+ : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(min : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(max : qa[1]) // expected-error 2 {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(+ : ba) // expected-error {{a reduction variable with array type 'const S2 [5]'}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(* : ca) // expected-error {{a reduction variable with array type 'const S3 [5]'}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(- : da) // expected-error {{a reduction variable with array type 'const int [5]'}} expected-error {{a reduction variable with array type 'const float [5]'}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(^ : fl) // expected-error {{variable of type 'float' is not valid for specified reduction operation}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(+ : o) // expected-error {{variable of type 'class S6' is not valid for specified reduction operation}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private(i), reduction(+ : j), reduction(+ : q) // expected-error 4 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ {
+ foo();
+ }
+#pragma omp parallel private(k)
+#pragma omp parallel sections reduction(+ : p), reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(+ : p), reduction(+ : p) // expected-error 3 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 3 {{previously referenced here}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}}
+ {
+ foo();
+ }
+#pragma omp parallel shared(i)
+#pragma omp parallel reduction(min : i)
+#pragma omp parallel sections reduction(max : j) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ {
+ foo();
+ }
+#pragma omp parallel private(fl)
+#pragma omp parallel sections reduction(+ : fl)
+ {
+ foo();
+ }
+#pragma omp parallel reduction(* : fl)
+#pragma omp parallel sections reduction(+ : fl)
+ {
+ foo();
+ }
+
+ return T();
+}
+
+int main(int argc, char **argv) {
+ const int d = 5; // expected-note 2 {{'d' defined here}}
+ const int da[5] = {0}; // expected-note {{'da' defined here}}
+ int qa[5] = {0};
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note {{'g' defined here}}
+ int i;
+ int &j = i; // expected-note 2 {{'j' defined here}}
+ S3 &p = k; // expected-note 2 {{'p' defined here}}
+ const int &r = da[i]; // expected-note {{'r' defined here}}
+ int &q = qa[i]; // expected-note {{'q' defined here}}
+ float fl; // expected-note {{'fl' defined here}}
+#pragma omp parallel sections reduction // expected-error {{expected '(' after 'reduction'}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction + // expected-error {{expected '(' after 'reduction'}} expected-warning {{extra tokens at the end of '#pragma omp parallel sections' are ignored}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction( // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(- // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction() // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(*) // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(\) // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(foo : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max'}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(| : argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(|| : argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(~ : argc) // expected-error {{expected unqualified-id}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(&& : argc)
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(+ : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(min : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(max : argv[1]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(+ : ba) // expected-error {{a reduction variable with array type 'const S2 [5]'}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(* : ca) // expected-error {{a reduction variable with array type 'const S3 [5]'}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(- : da) // expected-error {{a reduction variable with array type 'const int [5]'}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(^ : fl) // expected-error {{variable of type 'float' is not valid for specified reduction operation}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(& : e, g) // expected-error {{reduction variable must have an accessible, unambiguous default constructor}} expected-error {{variable of type 'S5' is not valid for specified reduction operation}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(+ : o) // expected-error {{variable of type 'class S6' is not valid for specified reduction operation}}
+ {
+ foo();
+ }
+#pragma omp parallel sections private(i), reduction(+ : j), reduction(+ : q) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ {
+ foo();
+ }
+#pragma omp parallel private(k)
+#pragma omp parallel sections reduction(+ : p), reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}}
+ {
+ foo();
+ }
+#pragma omp parallel sections reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}}
+ {
+ foo();
+ }
+#pragma omp parallel shared(i)
+#pragma omp parallel reduction(min : i)
+#pragma omp parallel sections reduction(max : j) // expected-error {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ {
+ foo();
+ }
+#pragma omp parallel private(fl)
+#pragma omp parallel sections reduction(+ : fl)
+ {
+ foo();
+ }
+#pragma omp parallel reduction(* : fl)
+#pragma omp parallel sections reduction(+ : fl)
+ {
+ foo();
+ }
+
+ return tmain(argc) + tmain(fl); // expected-note {{in instantiation of function template specialization 'tmain<int>' requested here}} expected-note {{in instantiation of function template specialization 'tmain<float>' requested here}}
+}
diff --git a/test/OpenMP/parallel_sections_shared_messages.cpp b/test/OpenMP/parallel_sections_shared_messages.cpp
new file mode 100644
index 000000000000..d4915c8eaa45
--- /dev/null
+++ b/test/OpenMP/parallel_sections_shared_messages.cpp
@@ -0,0 +1,110 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}}
+extern S1 a;
+class S2 {
+ mutable int a;
+
+public:
+ S2() : a(0) {}
+ S2(S2 &s2) : a(s2.a) {}
+};
+const S2 b;
+const S2 ba[5];
+class S3 {
+ int a;
+
+public:
+ S3() : a(0) {}
+ S3(S3 &s3) : a(s3.a) {}
+};
+const S3 c;
+const S3 ca[5];
+extern const int f;
+class S4 {
+ int a;
+ S4();
+ S4(const S4 &s4);
+
+public:
+ S4(int v) : a(v) {}
+};
+class S5 {
+ int a;
+ S5() : a(0) {}
+ S5(const S5 &s5) : a(s5.a) {}
+
+public:
+ S5(int v) : a(v) {}
+};
+
+S3 h;
+#pragma omp threadprivate(h) // expected-note {{defined as threadprivate or thread local}}
+
+int main(int argc, char **argv) {
+ const int d = 5;
+ const int da[5] = {0};
+ S4 e(4);
+ S5 g(5);
+ int i;
+ int &j = i;
+#pragma omp parallel sections shared // expected-error {{expected '(' after 'shared'}}
+ { foo(); }
+#pragma omp parallel sections shared( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ { foo(); }
+#pragma omp parallel sections shared() // expected-error {{expected expression}}
+ { foo(); }
+#pragma omp parallel sections shared(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ { foo(); }
+#pragma omp parallel sections shared(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ { foo(); }
+#pragma omp parallel sections shared(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ { foo(); }
+#pragma omp parallel sections shared(argc)
+ { foo(); }
+#pragma omp parallel sections shared(S1) // expected-error {{'S1' does not refer to a value}}
+ { foo(); }
+#pragma omp parallel sections shared(a, b, c, d, f)
+ { foo(); }
+#pragma omp parallel sections shared(argv[1]) // expected-error {{expected variable name}}
+ { foo(); }
+#pragma omp parallel sections shared(ba)
+ { foo(); }
+#pragma omp parallel sections shared(ca)
+ { foo(); }
+#pragma omp parallel sections shared(da)
+ { foo(); }
+#pragma omp parallel sections shared(e, g)
+ { foo(); }
+#pragma omp parallel sections shared(h) // expected-error {{threadprivate or thread local variable cannot be shared}}
+ { foo(); }
+#pragma omp parallel sections private(i), shared(i) // expected-error {{private variable cannot be shared}} expected-note {{defined as private}}
+ { foo(); }
+#pragma omp parallel sections firstprivate(i), shared(i) // expected-error {{firstprivate variable cannot be shared}} expected-note {{defined as firstprivate}}
+ { foo(); }
+#pragma omp parallel sections private(i)
+ {
+#pragma omp parallel sections shared(i)
+ {
+#pragma omp parallel sections shared(j)
+ { foo(); }
+ }
+ }
+#pragma omp parallel sections firstprivate(i)
+ {
+#pragma omp parallel sections shared(i)
+ {
+#pragma omp parallel sections shared(j)
+ { foo(); }
+ }
+ }
+
+ return 0;
+}
diff --git a/test/OpenMP/parallel_shared_messages.cpp b/test/OpenMP/parallel_shared_messages.cpp
index 211d392fe04e..8363989439be 100644
--- a/test/OpenMP/parallel_shared_messages.cpp
+++ b/test/OpenMP/parallel_shared_messages.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s
void foo() {
}
diff --git a/test/OpenMP/predefined_macro.c b/test/OpenMP/predefined_macro.c
index 3a8118620962..c9829ce4572a 100644
--- a/test/OpenMP/predefined_macro.c
+++ b/test/OpenMP/predefined_macro.c
@@ -1,32 +1,32 @@
-// RUN: %clang_cc1 -fopenmp -verify -DFOPENMP -o - %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -verify -DFOPENMP -o - %s
// RUN: %clang_cc1 -verify -o - %s
// expected-no-diagnostics
#ifdef FOPENMP
-// -fopenmp option is specified
+// -fopenmp=libiomp5 option is specified
#ifndef _OPENMP
#error "No _OPENMP macro is defined with -fopenmp option"
-#elsif _OPENMP != 201107
+#elsif _OPENMP != 201307
#error "_OPENMP has incorrect value"
#endif //_OPENMP
#else
-// No -fopenmp option is specified
+// No -fopenmp=libiomp5 option is specified
#ifdef _OPENMP
#error "_OPENMP macro is defined without -fopenmp option"
#endif // _OPENMP
#endif // FOPENMP
-// RUN: %clang_cc1 -fopenmp -verify -DFOPENMP -o - %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -verify -DFOPENMP -o - %s
// RUN: %clang_cc1 -verify -o - %s
// expected-no-diagnostics
#ifdef FOPENMP
-// -fopenmp option is specified
+// -fopenmp=libiomp5 option is specified
#ifndef _OPENMP
#error "No _OPENMP macro is defined with -fopenmp option"
-#elsif _OPENMP != 201107
+#elsif _OPENMP != 201307
#error "_OPENMP has incorrect value"
#endif // _OPENMP
#else
-// No -fopenmp option is specified
+// No -fopenmp=libiomp5 option is specified
#ifdef _OPENMP
#error "_OPENMP macro is defined without -fopenmp option"
#endif // _OPENMP
diff --git a/test/OpenMP/sections_ast_print.cpp b/test/OpenMP/sections_ast_print.cpp
new file mode 100644
index 000000000000..b1a2e0304001
--- /dev/null
+++ b/test/OpenMP/sections_ast_print.cpp
@@ -0,0 +1,52 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ast-print %s | FileCheck %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -emit-pch -o %t %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
+// expected-no-diagnostics
+
+#ifndef HEADER
+#define HEADER
+
+void foo() {}
+
+template <class T, int N>
+T tmain(T argc) {
+ T b = argc, c, d, e, f, g;
+ static T a;
+// CHECK: static T a;
+#pragma omp parallel
+#pragma omp sections private(argc, b), firstprivate(c, d), lastprivate(d, f) reduction(- : g) nowait
+ {
+ foo();
+ }
+ // CHECK-NEXT: #pragma omp parallel
+ // CHECK-NEXT: #pragma omp sections private(argc,b) firstprivate(c,d) lastprivate(d,f) reduction(-: g) nowait
+ // CHECK-NEXT: {
+ // CHECK-NEXT: foo();
+ // CHECK-NEXT: }
+ return T();
+}
+
+int main(int argc, char **argv) {
+ int b = argc, c, d, e, f, g;
+ static int a;
+// CHECK: static int a;
+#pragma omp parallel
+#pragma omp sections private(argc, b), firstprivate(argv, c), lastprivate(d, f) reduction(+ : g) nowait
+ {
+#pragma omp section
+ foo();
+#pragma omp section
+ foo();
+ }
+ // CHECK-NEXT: #pragma omp parallel
+ // CHECK-NEXT: #pragma omp sections private(argc,b) firstprivate(argv,c) lastprivate(d,f) reduction(+: g) nowait
+ // CHECK-NEXT: {
+ // CHECK-NEXT: #pragma omp section
+ // CHECK-NEXT: foo();
+ // CHECK-NEXT: #pragma omp section
+ // CHECK-NEXT: foo();
+ // CHECK-NEXT: }
+ return (tmain<int, 5>(argc) + tmain<char, 1>(argv[0][0]));
+}
+
+#endif
diff --git a/test/OpenMP/sections_firstprivate_messages.cpp b/test/OpenMP/sections_firstprivate_messages.cpp
new file mode 100644
index 000000000000..b030ce549d33
--- /dev/null
+++ b/test/OpenMP/sections_firstprivate_messages.cpp
@@ -0,0 +1,335 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+
+public:
+ S2() : a(0) {}
+ S2(S2 &s2) : a(s2.a) {}
+ static float S2s;
+ static const float S2sc;
+};
+const float S2::S2sc = 0;
+const S2 b;
+const S2 ba[5];
+class S3 {
+ int a;
+ S3 &operator=(const S3 &s3);
+
+public:
+ S3() : a(0) {}
+ S3(S3 &s3) : a(s3.a) {}
+};
+const S3 c;
+const S3 ca[5];
+extern const int f;
+class S4 { // expected-note 2 {{'S4' declared here}}
+ int a;
+ S4();
+ S4(const S4 &s4);
+
+public:
+ S4(int v) : a(v) {}
+};
+class S5 { // expected-note 4 {{'S5' declared here}}
+ int a;
+ S5(const S5 &s5) : a(s5.a) {}
+
+public:
+ S5() : a(0) {}
+ S5(int v) : a(v) {}
+};
+class S6 {
+ int a;
+ S6() : a(0) {}
+
+public:
+ S6(const S6 &s6) : a(s6.a) {}
+ S6(int v) : a(v) {}
+};
+
+S3 h;
+#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
+
+template <class I, class C>
+int foomain(int argc, char **argv) {
+ I e(4); // expected-note {{'e' defined here}}
+ C g(5); // expected-note 2 {{'g' defined here}}
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp parallel
+#pragma omp sections firstprivate // expected-error {{expected '(' after 'firstprivate'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate() // expected-error {{expected expression}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(argc)
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(argv[1]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(e, g) // expected-error 2 {{firstprivate variable must have an accessible, unambiguous copy constructor}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections linear(i) // expected-error {{unexpected OpenMP clause 'linear' in directive '#pragma omp sections'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+ {
+ int v = 0;
+ int i; // expected-note {{variable with automatic storage duration is predetermined as private; perhaps you forget to enclose 'omp sections' directive into a parallel or another task region?}}
+#pragma omp sections firstprivate(i) // expected-error {{private variable cannot be firstprivate}}
+ {
+ foo();
+ }
+ v += i;
+ }
+#pragma omp parallel shared(i)
+#pragma omp parallel private(i)
+#pragma omp sections firstprivate(j) // expected-error {{arguments of OpenMP clause 'firstprivate' cannot be of reference type}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(i)
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(g) firstprivate(g) // expected-error {{firstprivate variable must have an accessible, unambiguous copy constructor}}
+ {
+ foo();
+ }
+#pragma omp parallel private(i) // expected-note {{defined as private}}
+#pragma omp sections firstprivate(i) // expected-error {{firstprivate variable must be shared}}
+ {
+ foo();
+ }
+#pragma omp parallel reduction(+ : i) // expected-note {{defined as reduction}}
+#pragma omp sections firstprivate(i) // expected-error {{firstprivate variable must be shared}}
+ {
+ foo();
+ }
+ return 0;
+}
+
+int main(int argc, char **argv) {
+ const int d = 5;
+ const int da[5] = {0};
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note 2 {{'g' defined here}}
+ S3 m;
+ S6 n(2);
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp parallel
+#pragma omp sections firstprivate // expected-error {{expected '(' after 'firstprivate'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate() // expected-error {{expected expression}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(argc)
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(argv[1]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(2 * 2) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(ba) // OK
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(ca) // OK
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(da) // OK
+ {
+ foo();
+ }
+ int xa;
+#pragma omp parallel
+#pragma omp sections firstprivate(xa) // OK
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(S2::S2s) // OK
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(S2::S2sc) // OK
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections safelen(5) // expected-error {{unexpected OpenMP clause 'safelen' in directive '#pragma omp sections'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(e, g) // expected-error 2 {{firstprivate variable must have an accessible, unambiguous copy constructor}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(m) // OK
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections private(xa), firstprivate(xa) // expected-error {{private variable cannot be firstprivate}} expected-note {{defined as private}}
+ {
+ foo();
+ }
+#pragma omp parallel shared(xa)
+#pragma omp sections firstprivate(xa) // OK: may be firstprivate
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(j) // expected-error {{arguments of OpenMP clause 'firstprivate' cannot be of reference type}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(g) firstprivate(g) // expected-error {{firstprivate variable must have an accessible, unambiguous copy constructor}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(n) firstprivate(n) // OK
+ {
+ foo();
+ }
+#pragma omp parallel
+ {
+ int v = 0;
+ int i; // expected-note {{variable with automatic storage duration is predetermined as private; perhaps you forget to enclose 'omp sections' directive into a parallel or another task region?}}
+#pragma omp sections firstprivate(i) // expected-error {{private variable cannot be firstprivate}}
+ {
+ foo();
+ }
+ v += i;
+ }
+#pragma omp parallel private(i) // expected-note {{defined as private}}
+#pragma omp sections firstprivate(i) // expected-error {{firstprivate variable must be shared}}
+ {
+ foo();
+ }
+#pragma omp parallel reduction(+ : i) // expected-note {{defined as reduction}}
+#pragma omp sections firstprivate(i) // expected-error {{firstprivate variable must be shared}}
+ {
+ foo();
+ }
+
+ return foomain<S4, S5>(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<S4, S5>' requested here}}
+}
diff --git a/test/OpenMP/sections_lastprivate_messages.cpp b/test/OpenMP/sections_lastprivate_messages.cpp
new file mode 100644
index 000000000000..54c6005dcef3
--- /dev/null
+++ b/test/OpenMP/sections_lastprivate_messages.cpp
@@ -0,0 +1,309 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+
+public:
+ S2() : a(0) {}
+ S2(S2 &s2) : a(s2.a) {}
+ static float S2s; // expected-note {{static data member is predetermined as shared}}
+ static const float S2sc;
+};
+const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const S2 b;
+const S2 ba[5];
+class S3 { // expected-note 2 {{'S3' declared here}}
+ int a;
+ S3 &operator=(const S3 &s3);
+
+public:
+ S3() : a(0) {}
+ S3(S3 &s3) : a(s3.a) {}
+};
+const S3 c; // expected-note {{global variable is predetermined as shared}}
+const S3 ca[5]; // expected-note {{global variable is predetermined as shared}}
+extern const int f; // expected-note {{global variable is predetermined as shared}}
+class S4 { // expected-note 3 {{'S4' declared here}}
+ int a;
+ S4();
+ S4(const S4 &s4);
+
+public:
+ S4(int v) : a(v) {}
+};
+class S5 { // expected-note {{'S5' declared here}}
+ int a;
+ S5() : a(0) {}
+
+public:
+ S5(const S5 &s5) : a(s5.a) {}
+ S5(int v) : a(v) {}
+};
+class S6 {
+ int a;
+ S6() : a(0) {}
+
+public:
+ S6(const S6 &s6) : a(s6.a) {}
+ S6(int v) : a(v) {}
+};
+
+S3 h;
+#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
+
+template <class I, class C>
+int foomain(int argc, char **argv) {
+ I e(4); // expected-note {{'e' defined here}}
+ I g(5); // expected-note {{'g' defined here}}
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp parallel
+#pragma omp sections lastprivate // expected-error {{expected '(' after 'lastprivate'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate() // expected-error {{expected expression}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(argc)
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(S1) // expected-error {{'S1' does not refer to a value}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(argv[1]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(e, g) // expected-error 2 {{lastprivate variable must have an accessible, unambiguous default constructor}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections linear(i) // expected-error {{unexpected OpenMP clause 'linear' in directive '#pragma omp sections'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+ {
+ int v = 0;
+ int i; // expected-note {{variable with automatic storage duration is predetermined as private; perhaps you forget to enclose 'omp sections' directive into a parallel or another task region?}}
+#pragma omp sections lastprivate(i) // expected-error {{lastprivate variable must be shared}}
+ {
+ foo();
+ }
+ v += i;
+ }
+#pragma omp parallel shared(i)
+#pragma omp parallel private(i)
+#pragma omp sections lastprivate(j) // expected-error {{arguments of OpenMP clause 'lastprivate' cannot be of reference type}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(i)
+ {
+ foo();
+ }
+ return 0;
+}
+
+int main(int argc, char **argv) {
+ const int d = 5; // expected-note {{constant variable is predetermined as shared}}
+ const int da[5] = {0}; // expected-note {{constant variable is predetermined as shared}}
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note {{'g' defined here}}
+ S3 m; // expected-note 2 {{'m' defined here}}
+ S6 n(2);
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp parallel
+#pragma omp sections lastprivate // expected-error {{expected '(' after 'lastprivate'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate() // expected-error {{expected expression}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(argc)
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(S1) // expected-error {{'S1' does not refer to a value}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(argv[1]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(2 * 2) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(ba)
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(da) // expected-error {{shared variable cannot be lastprivate}}
+ {
+ foo();
+ }
+ int xa;
+#pragma omp parallel
+#pragma omp sections lastprivate(xa) // OK
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(S2::S2s) // expected-error {{shared variable cannot be lastprivate}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections safelen(5) // expected-error {{unexpected OpenMP clause 'safelen' in directive '#pragma omp sections'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(e, g) // expected-error 2 {{lastprivate variable must have an accessible, unambiguous default constructor}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(m) // expected-error {{lastprivate variable must have an accessible, unambiguous copy assignment operator}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections private(xa), lastprivate(xa) // expected-error {{private variable cannot be lastprivate}} expected-note {{defined as private}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(i)
+ {
+ foo();
+ }
+#pragma omp parallel private(xa) // expected-note {{defined as private}}
+#pragma omp sections lastprivate(xa) // expected-error {{lastprivate variable must be shared}}
+ {
+ foo();
+ }
+#pragma omp parallel reduction(+ : xa) // expected-note {{defined as reduction}}
+#pragma omp sections lastprivate(xa) // expected-error {{lastprivate variable must be shared}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(j) // expected-error {{arguments of OpenMP clause 'lastprivate' cannot be of reference type}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections firstprivate(m) lastprivate(m) // expected-error {{lastprivate variable must have an accessible, unambiguous copy assignment operator}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(n) firstprivate(n) // OK
+ {
+ foo();
+ }
+ return foomain<S4, S5>(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<S4, S5>' requested here}}
+}
diff --git a/test/OpenMP/sections_misc_messages.c b/test/OpenMP/sections_misc_messages.c
new file mode 100644
index 000000000000..0297513543a9
--- /dev/null
+++ b/test/OpenMP/sections_misc_messages.c
@@ -0,0 +1,299 @@
+// RUN: %clang_cc1 -fsyntax-only -fopenmp=libiomp5 -verify %s
+
+void foo();
+
+// expected-error@+1 {{unexpected OpenMP directive '#pragma omp sections'}}
+#pragma omp sections
+
+// expected-error@+1 {{unexpected OpenMP directive '#pragma omp sections'}}
+#pragma omp sections foo
+
+void test_no_clause() {
+ int i;
+#pragma omp sections
+ {
+ foo();
+ }
+
+// expected-error@+2 {{the statement for '#pragma omp sections' must be a compound statement}}
+#pragma omp sections
+ ++i;
+
+#pragma omp sections
+ {
+ foo();
+ foo(); // expected-error {{statement in 'omp sections' directive must be enclosed into a section region}}
+ }
+}
+
+void test_branch_protected_scope() {
+ int i = 0;
+L1:
+ ++i;
+
+ int x[24];
+
+#pragma omp parallel
+#pragma omp sections
+ {
+ if (i == 5)
+ goto L1; // expected-error {{use of undeclared label 'L1'}}
+ else if (i == 6)
+ return; // expected-error {{cannot return from OpenMP region}}
+ else if (i == 7)
+ goto L2;
+ else if (i == 8) {
+ L2:
+ x[i]++;
+ }
+#pragma omp section
+ if (i == 5)
+ goto L1; // expected-error {{use of undeclared label 'L1'}}
+ else if (i == 6)
+ return; // expected-error {{cannot return from OpenMP region}}
+ else if (i == 7)
+ goto L3;
+ else if (i == 8) {
+ L3:
+ x[i]++;
+ }
+ }
+
+ if (x[0] == 0)
+ goto L2; // expected-error {{use of undeclared label 'L2'}}
+ else if (x[1] == 1)
+ goto L1;
+ goto L3; // expected-error {{use of undeclared label 'L3'}}
+}
+
+void test_invalid_clause() {
+ int i;
+#pragma omp parallel
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp sections' are ignored}}
+#pragma omp sections foo bar
+ {
+ foo();
+// expected-error@+1 {{unexpected OpenMP clause 'nowait' in directive '#pragma omp section'}}
+#pragma omp section nowait
+ ;
+ }
+}
+
+void test_non_identifiers() {
+ int i, x;
+
+#pragma omp parallel
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp sections' are ignored}}
+#pragma omp sections;
+ {
+ foo();
+ }
+#pragma omp parallel
+// expected-error@+2 {{unexpected OpenMP clause 'linear' in directive '#pragma omp sections'}}
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp sections' are ignored}}
+#pragma omp sections linear(x);
+ {
+ foo();
+ }
+
+#pragma omp parallel
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp sections' are ignored}}
+#pragma omp sections private(x);
+ {
+ foo();
+ }
+
+#pragma omp parallel
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp sections' are ignored}}
+#pragma omp sections, private(x);
+ {
+ foo();
+ }
+}
+
+void test_private() {
+ int i;
+#pragma omp parallel
+// expected-error@+2 {{expected expression}}
+// expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+#pragma omp sections private(
+ {
+ foo();
+ }
+#pragma omp parallel
+// expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+// expected-error@+1 2 {{expected expression}}
+#pragma omp sections private(,
+ {
+ foo();
+ }
+#pragma omp parallel
+// expected-error@+1 2 {{expected expression}}
+#pragma omp sections private(, )
+ {
+ foo();
+ }
+#pragma omp parallel
+// expected-error@+1 {{expected expression}}
+#pragma omp sections private()
+ {
+ foo();
+ }
+#pragma omp parallel
+// expected-error@+1 {{expected expression}}
+#pragma omp sections private(int)
+ {
+ foo();
+ }
+#pragma omp parallel
+// expected-error@+1 {{expected variable name}}
+#pragma omp sections private(0)
+ {
+ foo();
+ }
+
+ int x, y, z;
+#pragma omp parallel
+#pragma omp sections private(x)
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections private(x, y)
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections private(x, y, z)
+ {
+ foo();
+ }
+}
+
+void test_lastprivate() {
+ int i;
+#pragma omp parallel
+// expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+// expected-error@+1 {{expected expression}}
+#pragma omp sections lastprivate(
+ {
+ foo();
+ }
+
+#pragma omp parallel
+// expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+// expected-error@+1 2 {{expected expression}}
+#pragma omp sections lastprivate(,
+ {
+ foo();
+ }
+#pragma omp parallel
+// expected-error@+1 2 {{expected expression}}
+#pragma omp sections lastprivate(, )
+ {
+ foo();
+ }
+#pragma omp parallel
+// expected-error@+1 {{expected expression}}
+#pragma omp sections lastprivate()
+ {
+ foo();
+ }
+#pragma omp parallel
+// expected-error@+1 {{expected expression}}
+#pragma omp sections lastprivate(int)
+ {
+ foo();
+ }
+#pragma omp parallel
+// expected-error@+1 {{expected variable name}}
+#pragma omp sections lastprivate(0)
+ {
+ foo();
+ }
+
+ int x, y, z;
+#pragma omp parallel
+#pragma omp sections lastprivate(x)
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(x, y)
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(x, y, z)
+ {
+ foo();
+ }
+}
+
+void test_firstprivate() {
+ int i;
+#pragma omp parallel
+// expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+// expected-error@+1 {{expected expression}}
+#pragma omp sections firstprivate(
+ {
+ foo();
+ }
+
+#pragma omp parallel
+// expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+// expected-error@+1 2 {{expected expression}}
+#pragma omp sections firstprivate(,
+ {
+ foo();
+ }
+#pragma omp parallel
+// expected-error@+1 2 {{expected expression}}
+#pragma omp sections firstprivate(, )
+ {
+ foo();
+ }
+#pragma omp parallel
+// expected-error@+1 {{expected expression}}
+#pragma omp sections firstprivate()
+ {
+ foo();
+ }
+#pragma omp parallel
+// expected-error@+1 {{expected expression}}
+#pragma omp sections firstprivate(int)
+ {
+ foo();
+ }
+#pragma omp parallel
+// expected-error@+1 {{expected variable name}}
+#pragma omp sections firstprivate(0)
+ {
+ foo();
+ }
+
+ int x, y, z;
+#pragma omp parallel
+#pragma omp sections lastprivate(x) firstprivate(x)
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(x, y) firstprivate(x, y)
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections lastprivate(x, y, z) firstprivate(x, y, z)
+ {
+ foo();
+ }
+}
+
+void test_nowait() {
+#pragma omp parallel
+#pragma omp sections nowait nowait // expected-error {{directive '#pragma omp sections' cannot contain more than one 'nowait' clause}}
+ {
+ ;
+ }
+}
diff --git a/test/OpenMP/sections_private_messages.cpp b/test/OpenMP/sections_private_messages.cpp
new file mode 100644
index 000000000000..7f5aa849682a
--- /dev/null
+++ b/test/OpenMP/sections_private_messages.cpp
@@ -0,0 +1,204 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+
+public:
+ S2() : a(0) {}
+};
+const S2 b;
+const S2 ba[5];
+class S3 {
+ int a;
+
+public:
+ S3() : a(0) {}
+};
+const S3 ca[5];
+class S4 { // expected-note {{'S4' declared here}}
+ int a;
+ S4();
+
+public:
+ S4(int v) : a(v) {}
+};
+class S5 { // expected-note {{'S5' declared here}}
+ int a;
+ S5() : a(0) {}
+
+public:
+ S5(int v) : a(v) {}
+};
+
+S3 h;
+#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
+
+template <class I, class C>
+int foomain(I argc, C **argv) {
+ I e(4);
+ I g(5);
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp sections private // expected-error {{expected '(' after 'private'}}
+ {
+ foo();
+ }
+#pragma omp sections private( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp sections private() // expected-error {{expected expression}}
+ {
+ foo();
+ }
+#pragma omp sections private(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp sections private(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp sections private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp sections private(argc)
+ {
+ foo();
+ }
+#pragma omp sections private(S1) // expected-error {{'S1' does not refer to a value}}
+ {
+ foo();
+ }
+#pragma omp sections private(a, b) // expected-error {{private variable with incomplete type 'S1'}}
+ {
+ foo();
+ }
+#pragma omp sections private(argv[1]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp sections private(e, g)
+ {
+ foo();
+ }
+#pragma omp sections private(h) // expected-error {{threadprivate or thread local variable cannot be private}}
+ {
+ foo();
+ }
+#pragma omp sections shared(i) // expected-error {{unexpected OpenMP clause 'shared' in directive '#pragma omp sections'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+ {
+ int v = 0;
+ int i;
+#pragma omp sections private(i)
+ {
+ foo();
+ }
+ v += i;
+ }
+#pragma omp parallel shared(i)
+#pragma omp parallel private(i)
+#pragma omp sections private(j) // expected-error {{arguments of OpenMP clause 'private' cannot be of reference type}}
+ {
+ foo();
+ }
+#pragma omp sections private(i)
+ {
+ foo();
+ }
+ return 0;
+}
+
+int main(int argc, char **argv) {
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note {{'g' defined here}}
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp sections private // expected-error {{expected '(' after 'private'}}
+ {
+ foo();
+ }
+#pragma omp sections private( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp sections private() // expected-error {{expected expression}}
+ {
+ foo();
+ }
+#pragma omp sections private(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp sections private(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp sections private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp sections private(argc)
+ {
+ foo();
+ }
+#pragma omp sections private(S1) // expected-error {{'S1' does not refer to a value}}
+ {
+ foo();
+ }
+#pragma omp sections private(a, b) // expected-error {{private variable with incomplete type 'S1'}}
+ {
+ foo();
+ }
+#pragma omp sections private(argv[1]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp sections private(e, g) // expected-error 2 {{private variable must have an accessible, unambiguous default constructor}}
+ {
+ foo();
+ }
+#pragma omp sections private(h) // expected-error {{threadprivate or thread local variable cannot be private}}
+ {
+ foo();
+ }
+#pragma omp sections shared(i) // expected-error {{unexpected OpenMP clause 'shared' in directive '#pragma omp sections'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+ {
+ int i;
+#pragma omp sections private(i)
+ {
+ foo();
+ }
+ }
+#pragma omp parallel shared(i)
+#pragma omp parallel private(i)
+#pragma omp sections private(j) // expected-error {{arguments of OpenMP clause 'private' cannot be of reference type}}
+ {
+ foo();
+ }
+#pragma omp sections private(i)
+ {
+ foo();
+ }
+
+ return 0;
+}
+
diff --git a/test/OpenMP/sections_reduction_messages.cpp b/test/OpenMP/sections_reduction_messages.cpp
new file mode 100644
index 000000000000..8c4bdcc2e8fc
--- /dev/null
+++ b/test/OpenMP/sections_reduction_messages.cpp
@@ -0,0 +1,413 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -o - %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}} expected-note 4 {{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+ S2 &operator+=(const S2 &arg) { return (*this); }
+
+public:
+ S2() : a(0) {}
+ S2(S2 &s2) : a(s2.a) {}
+ static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
+ static const float S2sc;
+};
+const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+S2 b; // expected-note 2 {{'b' defined here}}
+const S2 ba[5]; // expected-note 2 {{'ba' defined here}}
+class S3 {
+ int a;
+
+public:
+ S3() : a(0) {}
+ S3(const S3 &s3) : a(s3.a) {}
+ S3 operator+=(const S3 &arg1) { return arg1; }
+};
+int operator+=(const S3 &arg1, const S3 &arg2) { return 5; }
+S3 c; // expected-note 2 {{'c' defined here}}
+const S3 ca[5]; // expected-note 2 {{'ca' defined here}}
+extern const int f; // expected-note 4 {{'f' declared here}}
+class S4 { // expected-note {{'S4' declared here}}
+ int a;
+ S4();
+ S4(const S4 &s4);
+ S4 &operator+=(const S4 &arg) { return (*this); }
+
+public:
+ S4(int v) : a(v) {}
+};
+S4 &operator&=(S4 &arg1, S4 &arg2) { return arg1; }
+class S5 {
+ int a;
+ S5() : a(0) {}
+ S5(const S5 &s5) : a(s5.a) {}
+ S5 &operator+=(const S5 &arg);
+
+public:
+ S5(int v) : a(v) {}
+};
+class S6 {
+ int a;
+
+public:
+ S6() : a(6) {}
+ operator int() { return 6; }
+} o; // expected-note 2 {{'o' defined here}}
+
+S3 h, k;
+#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
+
+template <class T> // expected-note {{declared here}}
+T tmain(T argc) { // expected-note 2 {{'argc' defined here}}
+ const T d = T(); // expected-note 4 {{'d' defined here}}
+ const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
+ T qa[5] = {T()};
+ T i;
+ T &j = i; // expected-note 4 {{'j' defined here}}
+ S3 &p = k; // expected-note 2 {{'p' defined here}}
+ const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
+ T &q = qa[(int)i]; // expected-note 2 {{'q' defined here}}
+ T fl; // expected-note {{'fl' defined here}}
+#pragma omp parallel
+#pragma omp sections reduction // expected-error {{expected '(' after 'reduction'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction + // expected-error {{expected '(' after 'reduction'}} expected-warning {{extra tokens at the end of '#pragma omp sections' are ignored}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction( // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(- // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction() // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(*) // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(\) // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(& : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{variable of type 'float' is not valid for specified reduction operation}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(| : argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{variable of type 'float' is not valid for specified reduction operation}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(|| : argc ? i : argc) // expected-error 2 {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(foo : argc) //expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(&& : argc)
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(^ : T) // expected-error {{'T' does not refer to a value}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(+ : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(min : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(max : qa[1]) // expected-error 2 {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(+ : ba) // expected-error {{a reduction variable with array type 'const S2 [5]'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(* : ca) // expected-error {{a reduction variable with array type 'const S3 [5]'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(- : da) // expected-error {{a reduction variable with array type 'const int [5]'}} expected-error {{a reduction variable with array type 'const float [5]'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(^ : fl) // expected-error {{variable of type 'float' is not valid for specified reduction operation}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(+ : o) // expected-error {{variable of type 'class S6' is not valid for specified reduction operation}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections private(i), reduction(+ : j), reduction(+ : q) // expected-error 4 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ {
+ foo();
+ }
+#pragma omp parallel private(k)
+#pragma omp sections reduction(+ : p), reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(+ : p), reduction(+ : p) // expected-error 3 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 3 {{previously referenced here}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}}
+ {
+ foo();
+ }
+#pragma omp parallel shared(i)
+#pragma omp parallel reduction(min : i)
+#pragma omp sections reduction(max : j) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ {
+ foo();
+ }
+#pragma omp parallel private(fl) // expected-note 2 {{defined as private}}
+#pragma omp sections reduction(+ : fl) // expected-error 2 {{reduction variable must be shared}}
+ {
+ foo();
+ }
+#pragma omp parallel reduction(* : fl) // expected-note 2 {{defined as reduction}}
+#pragma omp sections reduction(+ : fl) // expected-error 2 {{reduction variable must be shared}}
+ {
+ foo();
+ }
+
+ return T();
+}
+
+int main(int argc, char **argv) {
+ const int d = 5; // expected-note 2 {{'d' defined here}}
+ const int da[5] = {0}; // expected-note {{'da' defined here}}
+ int qa[5] = {0};
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note {{'g' defined here}}
+ int i;
+ int &j = i; // expected-note 2 {{'j' defined here}}
+ S3 &p = k; // expected-note 2 {{'p' defined here}}
+ const int &r = da[i]; // expected-note {{'r' defined here}}
+ int &q = qa[i]; // expected-note {{'q' defined here}}
+ float fl; // expected-note {{'fl' defined here}}
+#pragma omp parallel
+#pragma omp sections reduction // expected-error {{expected '(' after 'reduction'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction + // expected-error {{expected '(' after 'reduction'}} expected-warning {{extra tokens at the end of '#pragma omp sections' are ignored}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction( // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(- // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction() // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(*) // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(\) // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(foo : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(| : argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(|| : argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(~ : argc) // expected-error {{expected unqualified-id}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(&& : argc)
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(+ : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(min : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(max : argv[1]) // expected-error {{expected variable name}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(+ : ba) // expected-error {{a reduction variable with array type 'const S2 [5]'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(* : ca) // expected-error {{a reduction variable with array type 'const S3 [5]'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(- : da) // expected-error {{a reduction variable with array type 'const int [5]'}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(^ : fl) // expected-error {{variable of type 'float' is not valid for specified reduction operation}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(& : e, g) // expected-error {{reduction variable must have an accessible, unambiguous default constructor}} expected-error {{variable of type 'S5' is not valid for specified reduction operation}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(+ : o) // expected-error {{variable of type 'class S6' is not valid for specified reduction operation}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections private(i), reduction(+ : j), reduction(+ : q) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ {
+ foo();
+ }
+#pragma omp parallel private(k)
+#pragma omp sections reduction(+ : p), reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}}
+ {
+ foo();
+ }
+#pragma omp parallel
+#pragma omp sections reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}}
+ {
+ foo();
+ }
+#pragma omp parallel shared(i)
+#pragma omp parallel reduction(min : i)
+#pragma omp sections reduction(max : j) // expected-error {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ {
+ foo();
+ }
+#pragma omp parallel private(fl) // expected-note {{defined as private}}
+#pragma omp sections reduction(+ : fl) // expected-error {{reduction variable must be shared}}
+ {
+ foo();
+ }
+#pragma omp parallel reduction(* : fl) // expected-note {{defined as reduction}}
+#pragma omp sections reduction(+ : fl) // expected-error {{reduction variable must be shared}}
+ {
+ foo();
+ }
+
+ return tmain(argc) + tmain(fl); // expected-note {{in instantiation of function template specialization 'tmain<int>' requested here}} expected-note {{in instantiation of function template specialization 'tmain<float>' requested here}}
+}
diff --git a/test/OpenMP/simd_aligned_messages.cpp b/test/OpenMP/simd_aligned_messages.cpp
new file mode 100644
index 000000000000..84cf40c1731b
--- /dev/null
+++ b/test/OpenMP/simd_aligned_messages.cpp
@@ -0,0 +1,201 @@
+// RUN: %clang_cc1 -x c++ -std=c++11 -verify -fopenmp=libiomp5 %s
+
+struct B {
+ static int ib[20]; // expected-note 0 {{'B::ib' declared here}}
+ static constexpr int bfoo() { return 8; }
+};
+namespace X {
+ B x; // expected-note {{'x' defined here}}
+};
+constexpr int bfoo() { return 4; }
+
+int **z;
+const int C1 = 1;
+const int C2 = 2;
+void test_aligned_colons(int *&rp)
+{
+ int *B = 0;
+ #pragma omp simd aligned(B:bfoo())
+ for (int i = 0; i < 10; ++i) ;
+ // expected-error@+1 {{unexpected ':' in nested name specifier; did you mean '::'}}
+ #pragma omp simd aligned(B::ib:B:bfoo())
+ for (int i = 0; i < 10; ++i) ;
+ #pragma omp simd aligned(B:B::bfoo())
+ for (int i = 0; i < 10; ++i) ;
+ // expected-error@+1 {{unexpected ':' in nested name specifier; did you mean '::'?}}
+ #pragma omp simd aligned(z:B:bfoo())
+ for (int i = 0; i < 10; ++i) ;
+ #pragma omp simd aligned(B:B::bfoo())
+ for (int i = 0; i < 10; ++i) ;
+ // expected-error@+2 {{integral constant expression must have integral or unscoped enumeration type, not 'int **'}}
+ // expected-error@+1 {{argument of aligned clause should be array, pointer, reference to array or reference to pointer, not 'B'}}
+ #pragma omp simd aligned(X::x : ::z)
+ for (int i = 0; i < 10; ++i) ;
+ // expected-error@+1 {{integral constant expression must have integral or unscoped enumeration type, not 'B'}}
+ #pragma omp simd aligned(B,rp,::z: X::x)
+ for (int i = 0; i < 10; ++i) ;
+ #pragma omp simd aligned(::z)
+ for (int i = 0; i < 10; ++i) ;
+ // expected-error@+1 {{expected variable name}}
+ #pragma omp simd aligned(B::bfoo())
+ for (int i = 0; i < 10; ++i) ;
+ #pragma omp simd aligned(B::ib,B:C1+C2)
+ for (int i = 0; i < 10; ++i) ;
+}
+
+// expected-note@+1 {{'num' defined here}}
+template<int L, class T, class N> T test_template(T* arr, N num) {
+ N i;
+ T sum = (T)0;
+ T ind2 = - num * L;
+ // Negative number is passed as L.
+ // expected-error@+1 {{argument to 'aligned' clause must be a positive integer value}}
+ #pragma omp simd aligned(arr:L)
+ for (i = 0; i < num; ++i) {
+ T cur = arr[(int)ind2];
+ ind2 += L;
+ sum += cur;
+ }
+ // expected-error@+1 {{argument of aligned clause should be array, pointer, reference to array or reference to pointer, not 'int'}}
+ #pragma omp simd aligned(num:4)
+ for (i = 0; i < num; ++i);
+ return T();
+}
+
+template<int LEN> int test_warn() {
+ int *ind2 = 0;
+ // expected-error@+1 {{argument to 'aligned' clause must be a positive integer value}}
+ #pragma omp simd aligned(ind2:LEN)
+ for (int i = 0; i < 100; i++) {
+ ind2 += LEN;
+ }
+ return 0;
+}
+
+struct S1; // expected-note 2 {{declared here}}
+extern S1 a; // expected-note {{'a' declared here}}
+class S2 {
+ mutable int a;
+public:
+ S2():a(0) { }
+};
+const S2 b; // expected-note 1 {{'b' defined here}}
+const S2 ba[5];
+class S3 {
+ int a;
+public:
+ S3():a(0) { }
+};
+const S3 ca[5];
+class S4 {
+ int a;
+ S4();
+public:
+ S4(int v):a(v) { }
+};
+class S5 {
+ int a;
+ S5():a(0) {}
+public:
+ S5(int v):a(v) { }
+};
+
+S3 h; // expected-note 2 {{'h' defined here}}
+#pragma omp threadprivate(h)
+
+template<class I, class C> int foomain(I argc, C **argv) {
+ I e(argc);
+ I g(argc);
+ int i; // expected-note {{declared here}} expected-note {{'i' defined here}}
+ // expected-note@+2 {{declared here}}
+ // expected-note@+1 {{reference to 'i' is not a constant expression}}
+ int &j = i;
+ #pragma omp simd aligned // expected-error {{expected '(' after 'aligned'}}
+ for (I k = 0; k < argc; ++k) ++k;
+ #pragma omp simd aligned ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (I k = 0; k < argc; ++k) ++k;
+ #pragma omp simd aligned () // expected-error {{expected expression}}
+ for (I k = 0; k < argc; ++k) ++k;
+ #pragma omp simd aligned (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (I k = 0; k < argc; ++k) ++k;
+ #pragma omp simd aligned (argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (I k = 0; k < argc; ++k) ++k;
+ #pragma omp simd aligned (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ for (I k = 0; k < argc; ++k) ++k;
+ #pragma omp simd aligned (argc : 5)
+ for (I k = 0; k < argc; ++k) ++k;
+ #pragma omp simd aligned (S1) // expected-error {{'S1' does not refer to a value}}
+ for (I k = 0; k < argc; ++k) ++k;
+ #pragma omp simd aligned (argv[1]) // expected-error {{expected variable name}}
+ for (I k = 0; k < argc; ++k) ++k;
+ #pragma omp simd aligned(e, g)
+ for (I k = 0; k < argc; ++k) ++k;
+ // expected-error@+1 {{argument of aligned clause should be array, pointer, reference to array or reference to pointer, not 'S3'}}
+ #pragma omp simd aligned(h)
+ for (I k = 0; k < argc; ++k) ++k;
+ // expected-error@+1 {{argument of aligned clause should be array, pointer, reference to array or reference to pointer, not 'int'}}
+ #pragma omp simd aligned(i)
+ for (I k = 0; k < argc; ++k) ++k;
+ #pragma omp parallel
+ {
+ int *v = 0;
+ I i;
+ #pragma omp simd aligned(v:16)
+ for (I k = 0; k < argc; ++k) { i = k; v += 2; }
+ }
+ float *f;
+ #pragma omp simd aligned(f)
+ for (I k = 0; k < argc; ++k) ++k;
+ int v = 0;
+ // expected-note@+2 {{initializer of 'j' is not a constant expression}}
+ // expected-error@+1 {{expression is not an integral constant expression}}
+ #pragma omp simd aligned(f:j)
+ for (I k = 0; k < argc; ++k) { ++k; v += j; }
+ #pragma omp simd aligned(f)
+ for (I k = 0; k < argc; ++k) ++k;
+ return 0;
+}
+
+// expected-note@+1 2 {{'argc' defined here}}
+int main(int argc, char **argv) {
+ double darr[100];
+ // expected-note@+1 {{in instantiation of function template specialization 'test_template<-4, double, int>' requested here}}
+ test_template<-4>(darr, 4);
+ test_warn<4>(); // ok
+ // expected-note@+1 {{in instantiation of function template specialization 'test_warn<0>' requested here}}
+ test_warn<0>();
+
+ int i;
+ int &j = i;
+ #pragma omp simd aligned // expected-error {{expected '(' after 'aligned'}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd aligned ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd aligned () // expected-error {{expected expression}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd aligned (argv // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k) ++k;
+ // expected-error@+1 {{argument of aligned clause should be array, pointer, reference to array or reference to pointer, not 'int'}}
+ #pragma omp simd aligned (argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd aligned (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k) ++k;
+ // expected-error@+1 {{argument of aligned clause should be array, pointer, reference to array or reference to pointer, not 'int'}}
+ #pragma omp simd aligned (argc)
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd aligned (S1) // expected-error {{'S1' does not refer to a value}}
+ for (int k = 0; k < argc; ++k) ++k;
+ // expected-error@+2 {{argument of aligned clause should be array, pointer, reference to array or reference to pointer, not 'S1'}}
+ // expected-error@+1 {{argument of aligned clause should be array, pointer, reference to array or reference to pointer, not 'S2'}}
+ #pragma omp simd aligned (a, b)
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd aligned (argv[1]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k) ++k;
+ // expected-error@+1 {{argument of aligned clause should be array, pointer, reference to array or reference to pointer, not 'S3'}}
+ #pragma omp simd aligned(h)
+ for (int k = 0; k < argc; ++k) ++k;
+ int *pargc = &argc;
+ foomain<int*,char>(pargc,argv);
+ return 0;
+}
+
diff --git a/test/OpenMP/simd_ast_print.cpp b/test/OpenMP/simd_ast_print.cpp
new file mode 100644
index 000000000000..46286123750d
--- /dev/null
+++ b/test/OpenMP/simd_ast_print.cpp
@@ -0,0 +1,126 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ast-print %s | FileCheck %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -emit-pch -o %t %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
+// expected-no-diagnostics
+
+#ifndef HEADER
+#define HEADER
+
+void foo() {}
+int g_ind = 1;
+template<class T, class N> T reduct(T* arr, N num) {
+ N i;
+ N ind;
+ N myind;
+ T sum = (T)0;
+// CHECK: T sum = (T)0;
+#pragma omp simd private(myind, g_ind), linear(ind), aligned(arr)
+// CHECK-NEXT: #pragma omp simd private(myind,g_ind) linear(ind) aligned(arr)
+ for (i = 0; i < num; ++i) {
+ myind = ind;
+ T cur = arr[myind];
+ ind += g_ind;
+ sum += cur;
+ }
+}
+
+template<class T> struct S {
+ S(const T &a)
+ :m_a(a)
+ {}
+ T result(T *v) const {
+ T res;
+ T val;
+ T lin = 0;
+// CHECK: T res;
+// CHECK: T val;
+// CHECK: T lin = 0;
+ #pragma omp simd private(val) safelen(7) linear(lin : -5) lastprivate(res)
+// CHECK-NEXT: #pragma omp simd private(val) safelen(7) linear(lin: -5) lastprivate(res)
+ for (T i = 7; i < m_a; ++i) {
+ val = v[i-7] + m_a;
+ res = val;
+ lin -= 5;
+ }
+ const T clen = 3;
+// CHECK: T clen = 3;
+ #pragma omp simd safelen(clen-1)
+// CHECK-NEXT: #pragma omp simd safelen(clen - 1)
+ for(T i = clen+2; i < 20; ++i) {
+// CHECK-NEXT: for (T i = clen + 2; i < 20; ++i) {
+ v[i] = v[v-clen] + 1;
+// CHECK-NEXT: v[i] = v[v - clen] + 1;
+ }
+// CHECK-NEXT: }
+ return res;
+ }
+ ~S()
+ {}
+ T m_a;
+};
+
+template<int LEN> struct S2 {
+ static void func(int n, float *a, float *b, float *c) {
+ int k1 = 0, k2 = 0;
+#pragma omp simd safelen(LEN) linear(k1,k2:LEN) aligned(a:LEN)
+ for(int i = 0; i < n; i++) {
+ c[i] = a[i] + b[i];
+ c[k1] = a[k1] + b[k1];
+ c[k2] = a[k2] + b[k2];
+ k1 = k1 + LEN;
+ k2 = k2 + LEN;
+ }
+ }
+};
+
+// S2<4>::func is called below in main.
+// CHECK: template <int LEN = 4> struct S2 {
+// CHECK-NEXT: static void func(int n, float *a, float *b, float *c) {
+// CHECK-NEXT: int k1 = 0, k2 = 0;
+// CHECK-NEXT: #pragma omp simd safelen(4) linear(k1,k2: 4) aligned(a: 4)
+// CHECK-NEXT: for (int i = 0; i < n; i++) {
+// CHECK-NEXT: c[i] = a[i] + b[i];
+// CHECK-NEXT: c[k1] = a[k1] + b[k1];
+// CHECK-NEXT: c[k2] = a[k2] + b[k2];
+// CHECK-NEXT: k1 = k1 + 4;
+// CHECK-NEXT: k2 = k2 + 4;
+// CHECK-NEXT: }
+// CHECK-NEXT: }
+
+int main (int argc, char **argv) {
+ int b = argc, c, d, e, f, g;
+ int k1=0,k2=0;
+ static int *a;
+// CHECK: static int *a;
+#pragma omp simd
+// CHECK-NEXT: #pragma omp simd
+ for (int i=0; i < 2; ++i)*a=2;
+// CHECK-NEXT: for (int i = 0; i < 2; ++i)
+// CHECK-NEXT: *a = 2;
+#pragma omp simd private(argc, b),lastprivate(d,f) collapse(2) aligned(a : 4)
+ for (int i = 0; i < 10; ++i)
+ for (int j = 0; j < 10; ++j) {foo(); k1 += 8; k2 += 8;}
+// CHECK-NEXT: #pragma omp simd private(argc,b) lastprivate(d,f) collapse(2) aligned(a: 4)
+// CHECK-NEXT: for (int i = 0; i < 10; ++i)
+// CHECK-NEXT: for (int j = 0; j < 10; ++j) {
+// CHECK-NEXT: foo();
+// CHECK-NEXT: k1 += 8;
+// CHECK-NEXT: k2 += 8;
+// CHECK-NEXT: }
+ for (int i = 0; i < 10; ++i)foo();
+// CHECK-NEXT: for (int i = 0; i < 10; ++i)
+// CHECK-NEXT: foo();
+ const int CLEN = 4;
+// CHECK-NEXT: const int CLEN = 4;
+ #pragma omp simd aligned(a:CLEN) linear(a:CLEN) safelen(CLEN) collapse( 1 )
+// CHECK-NEXT: #pragma omp simd aligned(a: CLEN) linear(a: CLEN) safelen(CLEN) collapse(1)
+ for (int i = 0; i < 10; ++i)foo();
+// CHECK-NEXT: for (int i = 0; i < 10; ++i)
+// CHECK-NEXT: foo();
+
+ float arr[16];
+ S2<4>::func(0,arr,arr,arr);
+ return (0);
+}
+
+#endif
diff --git a/test/OpenMP/simd_collapse_messages.cpp b/test/OpenMP/simd_collapse_messages.cpp
new file mode 100644
index 000000000000..56523b33726c
--- /dev/null
+++ b/test/OpenMP/simd_collapse_messages.cpp
@@ -0,0 +1,83 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}}
+
+template <class T, typename S, int N, int ST> // expected-note {{declared here}}
+T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+ #pragma omp simd collapse // expected-error {{expected '(' after 'collapse'}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp simd collapse ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp simd collapse () // expected-error {{expected expression}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ // expected-error@+3 {{expected ')'}} expected-note@+3 {{to match this '('}}
+ // expected-error@+2 2 {{expression is not an integral constant expression}}
+ // expected-note@+1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ #pragma omp simd collapse (argc
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ // expected-error@+1 2 {{argument to 'collapse' clause must be a positive integer value}}
+ #pragma omp simd collapse (ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp simd collapse (1)) // expected-warning {{extra tokens at the end of '#pragma omp simd' are ignored}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp simd collapse ((ST > 0) ? 1 + ST : 2) // expected-note 2 {{as specified in 'collapse' clause}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST]; // expected-error 2 {{expected 2 for loops after '#pragma omp simd', but found only 1}}
+ // expected-error@+3 2 {{directive '#pragma omp simd' cannot contain more than one 'collapse' clause}}
+ // expected-error@+2 2 {{argument to 'collapse' clause must be a positive integer value}}
+ // expected-error@+1 2 {{expression is not an integral constant expression}}
+ #pragma omp simd collapse (foobool(argc)), collapse (true), collapse (-5)
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp simd collapse (S) // expected-error {{'S' does not refer to a value}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ // expected-error@+1 2 {{expression is not an integral constant expression}}
+ #pragma omp simd collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp simd collapse (1)
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp simd collapse (N) // expected-error {{argument to 'collapse' clause must be a positive integer value}}
+ for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp simd collapse (2) // expected-note {{as specified in 'collapse' clause}}
+ foo(); // expected-error {{expected 2 for loops after '#pragma omp simd'}}
+ return argc;
+}
+
+int main(int argc, char **argv) {
+ #pragma omp simd collapse // expected-error {{expected '(' after 'collapse'}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp simd collapse ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp simd collapse () // expected-error {{expected expression}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp simd collapse (4 // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-note {{as specified in 'collapse' clause}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp simd', but found only 1}}
+ #pragma omp simd collapse (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp simd' are ignored}} expected-note {{as specified in 'collapse' clause}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4]; // expected-error {{expected 4 for loops after '#pragma omp simd', but found only 1}}
+ #pragma omp simd collapse (foobool(1) > 0 ? 1 : 2) // expected-error {{expression is not an integral constant expression}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ // expected-error@+3 {{expression is not an integral constant expression}}
+ // expected-error@+2 2 {{directive '#pragma omp simd' cannot contain more than one 'collapse' clause}}
+ // expected-error@+1 2 {{argument to 'collapse' clause must be a positive integer value}}
+ #pragma omp simd collapse (foobool(argc)), collapse (true), collapse (-5)
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp simd collapse (S1) // expected-error {{'S1' does not refer to a value}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ // expected-error@+1 {{expression is not an integral constant expression}}
+ #pragma omp simd collapse (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp simd collapse (2) // expected-note {{as specified in 'collapse' clause}}
+ foo(); // expected-error {{expected 2 for loops after '#pragma omp simd'}}
+ // expected-error@+3 {{statement after '#pragma omp simd' must be a for loop}}
+ // expected-note@+1 {{in instantiation of function template specialization 'tmain<int, char, -1, -2>' requested here}}
+ #pragma omp simd collapse(collapse(tmain<int, char, -1, -2>(argc, argv) // expected-error 2 {{expected ')'}} expected-note 2 {{to match this '('}}
+ foo();
+ // expected-note@+1 {{in instantiation of function template specialization 'tmain<int, char, 1, 0>' requested here}}
+ return tmain<int, char, 1, 0>(argc, argv);
+}
+
diff --git a/test/OpenMP/simd_lastprivate_messages.cpp b/test/OpenMP/simd_lastprivate_messages.cpp
new file mode 100644
index 000000000000..55f60583506d
--- /dev/null
+++ b/test/OpenMP/simd_lastprivate_messages.cpp
@@ -0,0 +1,208 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+
+public:
+ S2() : a(0) {}
+ S2(S2 &s2) : a(s2.a) {}
+ static float S2s; // expected-note {{static data member is predetermined as shared}}
+ static const float S2sc;
+};
+const float S2::S2sc = 0; // expected-note {{static data member is predetermined as shared}}
+const S2 b;
+const S2 ba[5];
+class S3 { // expected-note {{'S3' declared here}}
+ int a;
+ S3 &operator=(const S3 &s3);
+
+public:
+ S3() : a(0) {}
+ S3(S3 &s3) : a(s3.a) {}
+};
+const S3 c; // expected-note {{global variable is predetermined as shared}}
+const S3 ca[5]; // expected-note {{global variable is predetermined as shared}}
+extern const int f; // expected-note {{global variable is predetermined as shared}}
+class S4 { // expected-note {{'S4' declared here}}
+ int a;
+ S4();
+ S4(const S4 &s4);
+
+public:
+ S4(int v) : a(v) {}
+};
+class S5 { // expected-note {{'S5' declared here}}
+ int a;
+ S5() : a(0) {}
+
+public:
+ S5(const S5 &s5) : a(s5.a) {}
+ S5(int v) : a(v) {}
+};
+
+S3 h;
+#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
+
+template <class I, class C>
+int foomain(I argc, C **argv) {
+ I e(4);
+ I g(5);
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp simd lastprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp simd lastprivate() // expected-error {{expected expression}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp simd lastprivate(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp simd lastprivate(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp simd lastprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp simd lastprivate(argc)
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp simd lastprivate(S1) // expected-error {{'S1' does not refer to a value}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp simd lastprivate(a, b) // expected-error {{lastprivate variable with incomplete type 'S1'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp simd lastprivate(argv[1]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp simd lastprivate(e, g)
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp simd lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp simd firstprivate(i) // expected-error {{unexpected OpenMP clause 'firstprivate' in directive '#pragma omp simd'}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp parallel
+ {
+ int v = 0;
+ int i;
+#pragma omp simd lastprivate(i)
+ for (int k = 0; k < argc; ++k) {
+ i = k;
+ v += i;
+ }
+ }
+#pragma omp parallel shared(i)
+#pragma omp parallel private(i)
+#pragma omp simd lastprivate(j) // expected-error {{arguments of OpenMP clause 'lastprivate' cannot be of reference type}}
+ for (int k = 0; k < argc; ++k)
+ ++k;
+#pragma omp simd lastprivate(i)
+ for (int k = 0; k < argc; ++k)
+ ++k;
+ return 0;
+}
+
+int main(int argc, char **argv) {
+ const int d = 5; // expected-note {{constant variable is predetermined as shared}}
+ const int da[5] = {0}; // expected-note {{constant variable is predetermined as shared}}
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note {{'g' defined here}}
+ S3 m; // expected-note {{'m' defined here}}
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp simd lastprivate // expected-error {{expected '(' after 'lastprivate'}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp simd lastprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp simd lastprivate() // expected-error {{expected expression}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp simd lastprivate(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp simd lastprivate(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp simd lastprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp simd lastprivate(argc)
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp simd lastprivate(S1) // expected-error {{'S1' does not refer to a value}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp simd lastprivate(a, b, c, d, f) // expected-error {{lastprivate variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be lastprivate}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp simd lastprivate(argv[1]) // expected-error {{expected variable name}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp simd lastprivate(2 * 2) // expected-error {{expected variable name}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp simd lastprivate(ba)
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp simd lastprivate(ca) // expected-error {{shared variable cannot be lastprivate}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp simd lastprivate(da) // expected-error {{shared variable cannot be lastprivate}}
+ for (i = 0; i < argc; ++i)
+ foo();
+ int xa;
+#pragma omp simd lastprivate(xa) // OK
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp simd lastprivate(S2::S2s) // expected-error {{shared variable cannot be lastprivate}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp simd lastprivate(S2::S2sc) // expected-error {{shared variable cannot be lastprivate}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp simd firstprivate(g) // expected-error {{unexpected OpenMP clause 'firstprivate' in directive '#pragma omp simd'}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp simd lastprivate(e, g) // expected-error 2 {{lastprivate variable must have an accessible, unambiguous default constructor}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp simd lastprivate(m) // expected-error {{lastprivate variable must have an accessible, unambiguous copy assignment operator}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp simd lastprivate(h) // expected-error {{threadprivate or thread local variable cannot be lastprivate}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp simd private(xa), lastprivate(xa) // expected-error {{private variable cannot be lastprivate}} expected-note {{defined as private}}
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp simd lastprivate(i) // expected-note {{defined as lastprivate}}
+ for (i = 0; i < argc; ++i) // expected-error {{loop iteration variable in the associated loop of 'omp simd' directive may not be lastprivate, predetermined as linear}}
+ foo();
+#pragma omp parallel private(xa)
+#pragma omp simd lastprivate(xa) // OK: may be lastprivate
+ for (i = 0; i < argc; ++i)
+ foo();
+#pragma omp parallel
+#pragma omp simd lastprivate(j) // expected-error {{arguments of OpenMP clause 'lastprivate' cannot be of reference type}}
+ for (i = 0; i < argc; ++i)
+ foo();
+ return 0;
+}
diff --git a/test/OpenMP/simd_linear_messages.cpp b/test/OpenMP/simd_linear_messages.cpp
new file mode 100644
index 000000000000..b8b783107993
--- /dev/null
+++ b/test/OpenMP/simd_linear_messages.cpp
@@ -0,0 +1,206 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+namespace X {
+ int x;
+};
+
+struct B {
+ static int ib; // expected-note {{'B::ib' declared here}}
+ static int bfoo() { return 8; }
+};
+
+int bfoo() { return 4; }
+
+int z;
+const int C1 = 1;
+const int C2 = 2;
+void test_linear_colons()
+{
+ int B = 0;
+ #pragma omp simd linear(B:bfoo())
+ for (int i = 0; i < 10; ++i) ;
+ // expected-error@+1 {{unexpected ':' in nested name specifier; did you mean '::'}}
+ #pragma omp simd linear(B::ib:B:bfoo())
+ for (int i = 0; i < 10; ++i) ;
+ // expected-error@+1 {{use of undeclared identifier 'ib'; did you mean 'B::ib'}}
+ #pragma omp simd linear(B:ib)
+ for (int i = 0; i < 10; ++i) ;
+ // expected-error@+1 {{unexpected ':' in nested name specifier; did you mean '::'?}}
+ #pragma omp simd linear(z:B:ib)
+ for (int i = 0; i < 10; ++i) ;
+ #pragma omp simd linear(B:B::bfoo())
+ for (int i = 0; i < 10; ++i) ;
+ #pragma omp simd linear(X::x : ::z)
+ for (int i = 0; i < 10; ++i) ;
+ #pragma omp simd linear(B,::z, X::x)
+ for (int i = 0; i < 10; ++i) ;
+ #pragma omp simd linear(::z)
+ for (int i = 0; i < 10; ++i) ;
+ // expected-error@+1 {{expected variable name}}
+ #pragma omp simd linear(B::bfoo())
+ for (int i = 0; i < 10; ++i) ;
+ #pragma omp simd linear(B::ib,B:C1+C2)
+ for (int i = 0; i < 10; ++i) ;
+}
+
+template<int L, class T, class N> T test_template(T* arr, N num) {
+ N i;
+ T sum = (T)0;
+ T ind2 = - num * L; // expected-note {{'ind2' defined here}}
+ // expected-error@+1 {{argument of a linear clause should be of integral or pointer type}}
+#pragma omp simd linear(ind2:L)
+ for (i = 0; i < num; ++i) {
+ T cur = arr[(int)ind2];
+ ind2 += L;
+ sum += cur;
+ }
+ return T();
+}
+
+template<int LEN> int test_warn() {
+ int ind2 = 0;
+ // expected-warning@+1 {{zero linear step (ind2 should probably be const)}}
+ #pragma omp simd linear(ind2:LEN)
+ for (int i = 0; i < 100; i++) {
+ ind2 += LEN;
+ }
+ return ind2;
+}
+
+struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+public:
+ S2():a(0) { }
+};
+const S2 b; // expected-note 2 {{'b' defined here}}
+const S2 ba[5];
+class S3 {
+ int a;
+public:
+ S3():a(0) { }
+};
+const S3 ca[5];
+class S4 {
+ int a;
+ S4();
+public:
+ S4(int v):a(v) { }
+};
+class S5 {
+ int a;
+ S5():a(0) {}
+public:
+ S5(int v):a(v) { }
+};
+
+S3 h;
+#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
+
+template<class I, class C> int foomain(I argc, C **argv) {
+ I e(4);
+ I g(5);
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+ #pragma omp simd linear // expected-error {{expected '(' after 'linear'}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd linear ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd linear () // expected-error {{expected expression}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd linear (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd linear (argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd linear (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd linear (argc : 5)
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd linear (S1) // expected-error {{'S1' does not refer to a value}}
+ for (int k = 0; k < argc; ++k) ++k;
+ // expected-error@+2 {{linear variable with incomplete type 'S1'}}
+ // expected-error@+1 {{const-qualified variable cannot be linear}}
+ #pragma omp simd linear (a, b:B::ib)
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd linear (argv[1]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd linear(e, g)
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd linear(i)
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp parallel
+ {
+ int v = 0;
+ int i;
+ #pragma omp simd linear(v:i)
+ for (int k = 0; k < argc; ++k) { i = k; v += i; }
+ }
+ #pragma omp simd linear(j) // expected-error {{arguments of OpenMP clause 'linear' cannot be of reference type}}
+ for (int k = 0; k < argc; ++k) ++k;
+ int v = 0;
+ #pragma omp simd linear(v:j)
+ for (int k = 0; k < argc; ++k) { ++k; v += j; }
+ #pragma omp simd linear(i)
+ for (int k = 0; k < argc; ++k) ++k;
+ return 0;
+}
+
+int main(int argc, char **argv) {
+ double darr[100];
+ // expected-note@+1 {{in instantiation of function template specialization 'test_template<-4, double, int>' requested here}}
+ test_template<-4>(darr, 4);
+ // expected-note@+1 {{in instantiation of function template specialization 'test_warn<0>' requested here}}
+ test_warn<0>();
+
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note {{'g' defined here}}
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+ #pragma omp simd linear // expected-error {{expected '(' after 'linear'}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd linear ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd linear () // expected-error {{expected expression}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd linear (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd linear (argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd linear (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd linear (argc)
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd linear (S1) // expected-error {{'S1' does not refer to a value}}
+ for (int k = 0; k < argc; ++k) ++k;
+ // expected-error@+2 {{linear variable with incomplete type 'S1'}}
+ // expected-error@+1 {{const-qualified variable cannot be linear}}
+ #pragma omp simd linear (a, b)
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd linear (argv[1]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k) ++k;
+ // expected-error@+2 {{argument of a linear clause should be of integral or pointer type, not 'S4'}}
+ // expected-error@+1 {{argument of a linear clause should be of integral or pointer type, not 'S5'}}
+ #pragma omp simd linear(e, g)
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd linear(h) // expected-error {{threadprivate or thread local variable cannot be linear}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp parallel
+ {
+ int i;
+ #pragma omp simd linear(i)
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd linear(i : 4)
+ for (int k = 0; k < argc; ++k) { ++k; i += 4; }
+ }
+ #pragma omp simd linear(j) // expected-error {{arguments of OpenMP clause 'linear' cannot be of reference type 'int &'}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd linear(i)
+ for (int k = 0; k < argc; ++k) ++k;
+
+ foomain<int,char>(argc,argv);
+ return 0;
+}
+
diff --git a/test/OpenMP/simd_loop_messages.cpp b/test/OpenMP/simd_loop_messages.cpp
new file mode 100644
index 000000000000..ea663fddd9cf
--- /dev/null
+++ b/test/OpenMP/simd_loop_messages.cpp
@@ -0,0 +1,579 @@
+// RUN: %clang_cc1 -fsyntax-only -fopenmp=libiomp5 -x c++ -std=c++11 -fexceptions -fcxx-exceptions -verify %s
+
+static int sii;
+#pragma omp threadprivate(sii) // expected-note {{defined as threadprivate or thread local}}
+
+int test_iteration_spaces() {
+ const int N = 100;
+ float a[N], b[N], c[N];
+ int ii, jj, kk;
+ float fii;
+ double dii;
+ #pragma omp simd
+ for (int i = 0; i < 10; i+=1) {
+ c[i] = a[i] + b[i];
+ }
+ #pragma omp simd
+ for (char i = 0; i < 10; i++) {
+ c[i] = a[i] + b[i];
+ }
+ #pragma omp simd
+ for (char i = 0; i < 10; i+='\1') {
+ c[i] = a[i] + b[i];
+ }
+ #pragma omp simd
+ for (long long i = 0; i < 10; i++) {
+ c[i] = a[i] + b[i];
+ }
+ // expected-error@+2 {{expression must have integral or unscoped enumeration type, not 'double'}}
+ #pragma omp simd
+ for (long long i = 0; i < 10; i+=1.5) {
+ c[i] = a[i] + b[i];
+ }
+ #pragma omp simd
+ for (long long i = 0; i < 'z'; i+=1u) {
+ c[i] = a[i] + b[i];
+ }
+ // expected-error@+2 {{variable must be of integer or random access iterator type}}
+ #pragma omp simd
+ for (float fi = 0; fi < 10.0; fi++) {
+ c[(int)fi] = a[(int)fi] + b[(int)fi];
+ }
+ // expected-error@+2 {{variable must be of integer or random access iterator type}}
+ #pragma omp simd
+ for (double fi = 0; fi < 10.0; fi++) {
+ c[(int)fi] = a[(int)fi] + b[(int)fi];
+ }
+ // expected-error@+2 {{variable must be of integer or random access iterator type}}
+ #pragma omp simd
+ for (int &ref = ii; ref < 10; ref++) {
+ }
+ // expected-error@+2 {{initialization clause of OpenMP for loop must be of the form 'var = init' or 'T var = init'}}
+ #pragma omp simd
+ for (int i; i < 10; i++)
+ c[i] = a[i];
+
+ // expected-error@+2 {{initialization clause of OpenMP for loop must be of the form 'var = init' or 'T var = init'}}
+ #pragma omp simd
+ for (int i = 0, j = 0; i < 10; ++i)
+ c[i] = a[i];
+
+ // expected-error@+2 {{initialization clause of OpenMP for loop must be of the form 'var = init' or 'T var = init'}}
+ #pragma omp simd
+ for (;ii < 10; ++ii)
+ c[ii] = a[ii];
+
+ // expected-warning@+3 {{expression result unused}}
+ // expected-error@+2 {{initialization clause of OpenMP for loop must be of the form 'var = init' or 'T var = init'}}
+ #pragma omp simd
+ for (ii + 1;ii < 10; ++ii)
+ c[ii] = a[ii];
+
+ // expected-error@+2 {{initialization clause of OpenMP for loop must be of the form 'var = init' or 'T var = init'}}
+ #pragma omp simd
+ for (c[ii] = 0;ii < 10; ++ii)
+ c[ii] = a[ii];
+
+ // Ok to skip parenthesises.
+ #pragma omp simd
+ for (((ii)) = 0;ii < 10; ++ii)
+ c[ii] = a[ii];
+
+ // expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
+ #pragma omp simd
+ for (int i = 0; i; i++)
+ c[i] = a[i];
+
+ // expected-error@+3 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
+ // expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'i'}}
+ #pragma omp simd
+ for (int i = 0; jj < kk; ii++)
+ c[i] = a[i];
+
+ // expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
+ #pragma omp simd
+ for (int i = 0; !!i; i++)
+ c[i] = a[i];
+
+ // expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
+ #pragma omp simd
+ for (int i = 0; i != 1; i++)
+ c[i] = a[i];
+
+ // expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'i'}}
+ #pragma omp simd
+ for (int i = 0; ; i++)
+ c[i] = a[i];
+
+ // Ok.
+ #pragma omp simd
+ for (int i = 11; i > 10; i--)
+ c[i] = a[i];
+
+ // Ok.
+ #pragma omp simd
+ for (int i = 0; i < 10; ++i)
+ c[i] = a[i];
+
+ // Ok.
+ #pragma omp simd
+ for (ii = 0; ii < 10; ++ii)
+ c[ii] = a[ii];
+
+ // expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
+ #pragma omp simd
+ for (ii = 0; ii < 10; ++jj)
+ c[ii] = a[jj];
+
+ // expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
+ #pragma omp simd
+ for (ii = 0; ii < 10; ++ ++ ii)
+ c[ii] = a[ii];
+
+ // Ok but undefined behavior (in general, cannot check that incr
+ // is really loop-invariant).
+ #pragma omp simd
+ for (ii = 0; ii < 10; ii = ii + ii)
+ c[ii] = a[ii];
+
+ // expected-error@+2 {{expression must have integral or unscoped enumeration type, not 'float'}}
+ #pragma omp simd
+ for (ii = 0; ii < 10; ii = ii + 1.0f)
+ c[ii] = a[ii];
+
+ // Ok - step was converted to integer type.
+ #pragma omp simd
+ for (ii = 0; ii < 10; ii = ii + (int)1.1f)
+ c[ii] = a[ii];
+
+ // expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
+ #pragma omp simd
+ for (ii = 0; ii < 10; jj = ii + 2)
+ c[ii] = a[ii];
+
+ // expected-warning@+3 {{relational comparison result unused}}
+ // expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
+ #pragma omp simd
+ for (ii = 0; ii < 10; jj > kk + 2)
+ c[ii] = a[ii];
+
+ // expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
+ #pragma omp simd
+ for (ii = 0; ii < 10;)
+ c[ii] = a[ii];
+
+ // expected-warning@+3 {{expression result unused}}
+ // expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
+ #pragma omp simd
+ for (ii = 0; ii < 10; !ii)
+ c[ii] = a[ii];
+
+ // expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
+ #pragma omp simd
+ for (ii = 0; ii < 10; ii ? ++ii : ++jj)
+ c[ii] = a[ii];
+
+ // expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'ii'}}
+ #pragma omp simd
+ for (ii = 0; ii < 10; ii = ii < 10)
+ c[ii] = a[ii];
+
+ // expected-note@+3 {{loop step is expected to be positive due to this condition}}
+ // expected-error@+2 {{increment expression must cause 'ii' to increase on each iteration of OpenMP for loop}}
+ #pragma omp simd
+ for (ii = 0; ii < 10; ii = ii + 0)
+ c[ii] = a[ii];
+
+ // expected-note@+3 {{loop step is expected to be positive due to this condition}}
+ // expected-error@+2 {{increment expression must cause 'ii' to increase on each iteration of OpenMP for loop}}
+ #pragma omp simd
+ for (ii = 0; ii < 10; ii = ii + (int)(0.8 - 0.45))
+ c[ii] = a[ii];
+
+ // expected-note@+3 {{loop step is expected to be positive due to this condition}}
+ // expected-error@+2 {{increment expression must cause 'ii' to increase on each iteration of OpenMP for loop}}
+ #pragma omp simd
+ for (ii = 0; (ii) < 10; ii-=25)
+ c[ii] = a[ii];
+
+ // expected-note@+3 {{loop step is expected to be positive due to this condition}}
+ // expected-error@+2 {{increment expression must cause 'ii' to increase on each iteration of OpenMP for loop}}
+ #pragma omp simd
+ for (ii = 0; (ii < 10); ii-=0)
+ c[ii] = a[ii];
+
+ // expected-note@+3 {{loop step is expected to be negative due to this condition}}
+ // expected-error@+2 {{increment expression must cause 'ii' to decrease on each iteration of OpenMP for loop}}
+ #pragma omp simd
+ for (ii = 0; ii > 10; (ii+=0))
+ c[ii] = a[ii];
+
+ // expected-note@+3 {{loop step is expected to be positive due to this condition}}
+ // expected-error@+2 {{increment expression must cause 'ii' to increase on each iteration of OpenMP for loop}}
+ #pragma omp simd
+ for (ii = 0; ii < 10; (ii) = (1-1)+(ii))
+ c[ii] = a[ii];
+
+ // expected-note@+3 {{loop step is expected to be negative due to this condition}}
+ // expected-error@+2 {{increment expression must cause 'ii' to decrease on each iteration of OpenMP for loop}}
+ #pragma omp simd
+ for ((ii = 0); ii > 10; (ii-=0))
+ c[ii] = a[ii];
+
+ // expected-note@+3 {{loop step is expected to be positive due to this condition}}
+ // expected-error@+2 {{increment expression must cause 'ii' to increase on each iteration of OpenMP for loop}}
+ #pragma omp simd
+ for (ii = 0; (ii < 10); (ii-=0))
+ c[ii] = a[ii];
+
+ // expected-note@+2 {{defined as private}}
+ // expected-error@+2 {{loop iteration variable in the associated loop of 'omp simd' directive may not be private, predetermined as linear}}
+ #pragma omp simd private(ii)
+ for (ii = 0; ii < 10; ii++)
+ c[ii] = a[ii];
+
+ // expected-error@+3 {{unexpected OpenMP clause 'shared' in directive '#pragma omp simd'}}
+ // expected-note@+2 {{defined as shared}}
+ // expected-error@+2 {{loop iteration variable in the associated loop of 'omp simd' directive may not be shared, predetermined as linear}}
+ #pragma omp simd shared(ii)
+ for (ii = 0; ii < 10; ii++)
+ c[ii] = a[ii];
+
+ #pragma omp simd linear(ii)
+ for (ii = 0; ii < 10; ii++)
+ c[ii] = a[ii];
+
+ #pragma omp simd lastprivate(ii) linear(jj) collapse(2) // expected-note {{defined as linear}}
+ for (ii = 0; ii < 10; ii++)
+ for (jj = 0; jj < 10; jj++) // expected-error {{loop iteration variable in the associated loop of 'omp simd' directive may not be linear, predetermined as lastprivate}}
+ c[ii] = a[jj];
+
+
+ #pragma omp parallel
+ {
+ // expected-error@+2 {{loop iteration variable in the associated loop of 'omp simd' directive may not be threadprivate or thread local, predetermined as linear}}
+ #pragma omp simd
+ for (sii = 0; sii < 10; sii+=1)
+ c[sii] = a[sii];
+ }
+
+ // expected-error@+2 {{statement after '#pragma omp simd' must be a for loop}}
+ #pragma omp simd
+ for (auto &item : a) {
+ item = item + 1;
+ }
+
+ // expected-note@+3 {{loop step is expected to be positive due to this condition}}
+ // expected-error@+2 {{increment expression must cause 'i' to increase on each iteration of OpenMP for loop}}
+ #pragma omp simd
+ for (unsigned i = 9; i < 10; i--) {
+ c[i] = a[i] + b[i];
+ }
+
+ int (*lb)[4] = nullptr;
+ #pragma omp simd
+ for (int (*p)[4] = lb; p < lb + 8; ++p) {
+ }
+
+ // expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}}
+ #pragma omp simd
+ for (int a{0}; a<10; ++a) {
+ }
+
+ return 0;
+}
+
+// Iterators allowed in openmp for-loops.
+namespace std {
+struct random_access_iterator_tag { };
+template <class Iter> struct iterator_traits {
+ typedef typename Iter::difference_type difference_type;
+ typedef typename Iter::iterator_category iterator_category;
+};
+template <class Iter>
+typename iterator_traits<Iter>::difference_type
+distance(Iter first, Iter last) { return first - last; }
+}
+class Iter0 {
+ public:
+ Iter0() { }
+ Iter0(const Iter0 &) { }
+ Iter0 operator ++() { return *this; }
+ Iter0 operator --() { return *this; }
+ bool operator <(Iter0 a) { return true; }
+};
+int operator -(Iter0 a, Iter0 b) { return 0; }
+class Iter1 {
+ public:
+ Iter1(float f=0.0f, double d=0.0) { }
+ Iter1(const Iter1 &) { }
+ Iter1 operator ++() { return *this; }
+ Iter1 operator --() { return *this; }
+ bool operator <(Iter1 a) { return true; }
+ bool operator >=(Iter1 a) { return false; }
+};
+class GoodIter {
+ public:
+ GoodIter() { }
+ GoodIter(const GoodIter &) { }
+ GoodIter(int fst, int snd) { }
+ GoodIter &operator =(const GoodIter &that) { return *this; }
+ GoodIter &operator =(const Iter0 &that) { return *this; }
+ GoodIter &operator +=(int x) { return *this; }
+ explicit GoodIter(void *) { }
+ GoodIter operator ++() { return *this; }
+ GoodIter operator --() { return *this; }
+ bool operator !() { return true; }
+ bool operator <(GoodIter a) { return true; }
+ bool operator <=(GoodIter a) { return true; }
+ bool operator >=(GoodIter a) { return false; }
+ typedef int difference_type;
+ typedef std::random_access_iterator_tag iterator_category;
+};
+int operator -(GoodIter a, GoodIter b) { return 0; }
+GoodIter operator -(GoodIter a) { return a; }
+GoodIter operator -(GoodIter a, int v) { return GoodIter(); }
+GoodIter operator +(GoodIter a, int v) { return GoodIter(); }
+GoodIter operator -(int v, GoodIter a) { return GoodIter(); }
+GoodIter operator +(int v, GoodIter a) { return GoodIter(); }
+
+int test_with_random_access_iterator() {
+ GoodIter begin, end;
+ Iter0 begin0, end0;
+ #pragma omp simd
+ for (GoodIter I = begin; I < end; ++I)
+ ++I;
+ // expected-error@+2 {{variable must be of integer or random access iterator type}}
+ #pragma omp simd
+ for (GoodIter &I = begin; I < end; ++I)
+ ++I;
+ #pragma omp simd
+ for (GoodIter I = begin; I >= end; --I)
+ ++I;
+ // expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}}
+ #pragma omp simd
+ for (GoodIter I(begin); I < end; ++I)
+ ++I;
+ // expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}}
+ #pragma omp simd
+ for (GoodIter I(nullptr); I < end; ++I)
+ ++I;
+ // expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}}
+ #pragma omp simd
+ for (GoodIter I(0); I < end; ++I)
+ ++I;
+ // expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}}
+ #pragma omp simd
+ for (GoodIter I(1,2); I < end; ++I)
+ ++I;
+ #pragma omp simd
+ for (begin = GoodIter(0); begin < end; ++begin)
+ ++begin;
+ #pragma omp simd
+ for (begin = begin0; begin < end; ++begin)
+ ++begin;
+ // expected-error@+2 {{initialization clause of OpenMP for loop must be of the form 'var = init' or 'T var = init'}}
+ #pragma omp simd
+ for (++begin; begin < end; ++begin)
+ ++begin;
+ #pragma omp simd
+ for (begin = end; begin < end; ++begin)
+ ++begin;
+ // expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'I'}}
+ #pragma omp simd
+ for (GoodIter I = begin; I - I; ++I)
+ ++I;
+ // expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'I'}}
+ #pragma omp simd
+ for (GoodIter I = begin; begin < end; ++I)
+ ++I;
+ // expected-error@+2 {{condition of OpenMP for loop must be a relational comparison ('<', '<=', '>', or '>=') of loop variable 'I'}}
+ #pragma omp simd
+ for (GoodIter I = begin; !I; ++I)
+ ++I;
+ // expected-note@+3 {{loop step is expected to be negative due to this condition}}
+ // expected-error@+2 {{increment expression must cause 'I' to decrease on each iteration of OpenMP for loop}}
+ #pragma omp simd
+ for (GoodIter I = begin; I >= end; I = I + 1)
+ ++I;
+ #pragma omp simd
+ for (GoodIter I = begin; I >= end; I = I - 1)
+ ++I;
+ // expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'I'}}
+ #pragma omp simd
+ for (GoodIter I = begin; I >= end; I = -I)
+ ++I;
+ // expected-note@+3 {{loop step is expected to be negative due to this condition}}
+ // expected-error@+2 {{increment expression must cause 'I' to decrease on each iteration of OpenMP for loop}}
+ #pragma omp simd
+ for (GoodIter I = begin; I >= end; I = 2 + I)
+ ++I;
+ // expected-error@+2 {{increment clause of OpenMP for loop must perform simple addition or subtraction on loop variable 'I'}}
+ #pragma omp simd
+ for (GoodIter I = begin; I >= end; I = 2 - I)
+ ++I;
+ #pragma omp simd
+ for (Iter0 I = begin0; I < end0; ++I)
+ ++I;
+ // Initializer is constructor without params.
+ // expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}}
+ #pragma omp simd
+ for (Iter0 I; I < end0; ++I)
+ ++I;
+ Iter1 begin1, end1;
+ #pragma omp simd
+ for (Iter1 I = begin1; I < end1; ++I)
+ ++I;
+ // expected-note@+3 {{loop step is expected to be negative due to this condition}}
+ // expected-error@+2 {{increment expression must cause 'I' to decrease on each iteration of OpenMP for loop}}
+ #pragma omp simd
+ for (Iter1 I = begin1; I >= end1; ++I)
+ ++I;
+ // Initializer is constructor with all default params.
+ // expected-warning@+2 {{initialization clause of OpenMP for loop is not in canonical form ('var = init' or 'T var = init')}}
+ #pragma omp simd
+ for (Iter1 I; I < end1; ++I) {
+ }
+ return 0;
+}
+
+template <typename IT, int ST> class TC {
+ public:
+ int dotest_lt(IT begin, IT end) {
+ // expected-note@+3 {{loop step is expected to be positive due to this condition}}
+ // expected-error@+2 {{increment expression must cause 'I' to increase on each iteration of OpenMP for loop}}
+ #pragma omp simd
+ for (IT I = begin; I < end; I = I + ST) {
+ ++I;
+ }
+ // expected-note@+3 {{loop step is expected to be positive due to this condition}}
+ // expected-error@+2 {{increment expression must cause 'I' to increase on each iteration of OpenMP for loop}}
+ #pragma omp simd
+ for (IT I = begin; I <= end; I += ST) {
+ ++I;
+ }
+ #pragma omp simd
+ for (IT I = begin; I < end; ++I) {
+ ++I;
+ }
+ }
+
+ static IT step() {
+ return IT(ST);
+ }
+};
+template <typename IT, int ST=0> int dotest_gt(IT begin, IT end) {
+ // expected-note@+3 2 {{loop step is expected to be negative due to this condition}}
+ // expected-error@+2 2 {{increment expression must cause 'I' to decrease on each iteration of OpenMP for loop}}
+ #pragma omp simd
+ for (IT I = begin; I >= end; I = I + ST) {
+ ++I;
+ }
+ // expected-note@+3 2 {{loop step is expected to be negative due to this condition}}
+ // expected-error@+2 2 {{increment expression must cause 'I' to decrease on each iteration of OpenMP for loop}}
+ #pragma omp simd
+ for (IT I = begin; I >= end; I += ST) {
+ ++I;
+ }
+
+ // expected-note@+3 {{loop step is expected to be negative due to this condition}}
+ // expected-error@+2 {{increment expression must cause 'I' to decrease on each iteration of OpenMP for loop}}
+ #pragma omp simd
+ for (IT I = begin; I >= end; ++I) {
+ ++I;
+ }
+
+ #pragma omp simd
+ for (IT I = begin; I < end; I+=TC<int,ST>::step()) {
+ ++I;
+ }
+}
+
+void test_with_template() {
+ GoodIter begin, end;
+ TC<GoodIter, 100> t1;
+ TC<GoodIter, -100> t2;
+ t1.dotest_lt(begin, end);
+ t2.dotest_lt(begin, end); // expected-note {{in instantiation of member function 'TC<GoodIter, -100>::dotest_lt' requested here}}
+ dotest_gt(begin, end); // expected-note {{in instantiation of function template specialization 'dotest_gt<GoodIter, 0>' requested here}}
+ dotest_gt<unsigned, -10>(0, 100); // expected-note {{in instantiation of function template specialization 'dotest_gt<unsigned int, -10>' requested here}}
+}
+
+void test_loop_break() {
+ const int N = 100;
+ float a[N], b[N], c[N];
+ #pragma omp simd
+ for (int i = 0; i < 10; i++) {
+ c[i] = a[i] + b[i];
+ for (int j = 0; j < 10; ++j) {
+ if (a[i] > b[j])
+ break; // OK in nested loop
+ }
+ switch(i) {
+ case 1:
+ b[i]++;
+ break;
+ default:
+ break;
+ }
+ if (c[i] > 10)
+ break; // expected-error {{'break' statement cannot be used in OpenMP for loop}}
+
+ if (c[i] > 11)
+ break; // expected-error {{'break' statement cannot be used in OpenMP for loop}}
+ }
+
+ #pragma omp simd
+ for (int i = 0; i < 10; i++) {
+ for (int j = 0; j < 10; j++) {
+ c[i] = a[i] + b[i];
+ if (c[i] > 10) {
+ if (c[i] < 20) {
+ break; // OK
+ }
+ }
+ }
+ }
+}
+
+void test_loop_eh() {
+ const int N = 100;
+ float a[N], b[N], c[N];
+ #pragma omp simd
+ for (int i = 0; i < 10; i++) {
+ c[i] = a[i] + b[i];
+ try { // expected-error {{'try' statement cannot be used in OpenMP simd region}}
+ for (int j = 0; j < 10; ++j) {
+ if (a[i] > b[j])
+ throw a[i]; // expected-error {{'throw' statement cannot be used in OpenMP simd region}}
+ }
+ throw a[i]; // expected-error {{'throw' statement cannot be used in OpenMP simd region}}
+ }
+ catch (float f) {
+ if (f > 0.1)
+ throw a[i]; // expected-error {{'throw' statement cannot be used in OpenMP simd region}}
+ return; // expected-error {{cannot return from OpenMP region}}
+ }
+ switch(i) {
+ case 1:
+ b[i]++;
+ break;
+ default:
+ break;
+ }
+ for (int j = 0; j < 10; j++) {
+ if (c[i] > 10)
+ throw c[i]; // expected-error {{'throw' statement cannot be used in OpenMP simd region}}
+ }
+ }
+ if (c[9] > 10)
+ throw c[9]; // OK
+
+ #pragma omp simd
+ for (int i = 0; i < 10; ++i) {
+ struct S {
+ void g() { throw 0; }
+ };
+ }
+}
+
diff --git a/test/OpenMP/simd_metadata.c b/test/OpenMP/simd_metadata.c
new file mode 100644
index 000000000000..a0588adf7dad
--- /dev/null
+++ b/test/OpenMP/simd_metadata.c
@@ -0,0 +1,51 @@
+// RUN: %clang_cc1 -fopenmp=libiomp5 -emit-llvm %s -o - | FileCheck %s
+
+void h1(float *c, float *a, float *b, int size)
+{
+// CHECK-LABEL: define void @h1
+ int t = 0;
+#pragma omp simd safelen(16) linear(t)
+ for (int i = 0; i < size; ++i) {
+ c[i] = a[i] * a[i] + b[i] * b[t];
+ ++t;
+// do not emit parallel_loop_access metadata due to usage of safelen clause.
+// CHECK-NOT: store float {{.+}}, float* {{.+}}, align {{.+}}, !llvm.mem.parallel_loop_access {{![0-9]+}}
+ }
+}
+
+void h2(float *c, float *a, float *b, int size)
+{
+// CHECK-LABEL: define void @h2
+ int t = 0;
+#pragma omp simd linear(t)
+ for (int i = 0; i < size; ++i) {
+ c[i] = a[i] * a[i] + b[i] * b[t];
+ ++t;
+// CHECK: store float {{.+}}, float* {{.+}}, align {{.+}}, !llvm.mem.parallel_loop_access [[LOOP_H2_HEADER:![0-9]+]]
+ }
+}
+
+void h3(float *c, float *a, float *b, int size)
+{
+// CHECK-LABEL: define void @h3
+#pragma omp simd
+ for (int i = 0; i < size; ++i) {
+ for (int j = 0; j < size; ++j) {
+ c[j*i] = a[i] * b[j];
+ }
+ }
+// do not emit parallel_loop_access for nested loop.
+// CHECK-NOT: store float {{.+}}, float* {{.+}}, align {{.+}}, !llvm.mem.parallel_loop_access {{![0-9]+}}
+}
+
+// Metadata for h1:
+// CHECK: [[LOOP_H1_HEADER:![0-9]+]] = metadata !{metadata [[LOOP_H1_HEADER]], metadata [[LOOP_WIDTH_16:![0-9]+]], metadata [[LOOP_VEC_ENABLE:![0-9]+]]}
+// CHECK: [[LOOP_WIDTH_16]] = metadata !{metadata !"llvm.loop.vectorize.width", i32 16}
+// CHECK: [[LOOP_VEC_ENABLE]] = metadata !{metadata !"llvm.loop.vectorize.enable", i1 true}
+//
+// Metadata for h2:
+// CHECK: [[LOOP_H2_HEADER]] = metadata !{metadata [[LOOP_H2_HEADER]], metadata [[LOOP_VEC_ENABLE]]}
+//
+// Metadata for h3:
+// CHECK: [[LOOP_H3_HEADER:![0-9]+]] = metadata !{metadata [[LOOP_H3_HEADER]], metadata [[LOOP_VEC_ENABLE]]}
+//
diff --git a/test/OpenMP/simd_misc_messages.c b/test/OpenMP/simd_misc_messages.c
new file mode 100644
index 000000000000..67edc6d1f867
--- /dev/null
+++ b/test/OpenMP/simd_misc_messages.c
@@ -0,0 +1,555 @@
+// RUN: %clang_cc1 -fsyntax-only -fopenmp=libiomp5 -verify %s
+
+// expected-error@+1 {{unexpected OpenMP directive '#pragma omp simd'}}
+#pragma omp simd
+
+// expected-error@+1 {{unexpected OpenMP directive '#pragma omp simd'}}
+#pragma omp simd foo
+
+// expected-error@+1 {{unexpected OpenMP directive '#pragma omp simd'}}
+#pragma omp simd safelen(4)
+
+void test_no_clause()
+{
+ int i;
+ #pragma omp simd
+ for (i = 0; i < 16; ++i) ;
+
+ // expected-error@+2 {{statement after '#pragma omp simd' must be a for loop}}
+ #pragma omp simd
+ ++i;
+}
+
+void test_branch_protected_scope()
+{
+ int i = 0;
+L1:
+ ++i;
+
+ int x[24];
+
+ #pragma omp simd
+ for (i = 0; i < 16; ++i) {
+ if (i == 5)
+ goto L1; // expected-error {{use of undeclared label 'L1'}}
+ else if (i == 6)
+ return; // expected-error {{cannot return from OpenMP region}}
+ else if (i == 7)
+ goto L2;
+ else if (i == 8) {
+L2:
+ x[i]++;
+ }
+ }
+
+ if (x[0] == 0)
+ goto L2; // expected-error {{use of undeclared label 'L2'}}
+ else if (x[1] == 1)
+ goto L1;
+}
+
+void test_invalid_clause()
+{
+ int i;
+ // expected-warning@+1 {{extra tokens at the end of '#pragma omp simd' are ignored}}
+ #pragma omp simd foo bar
+ for (i = 0; i < 16; ++i) ;
+}
+
+void test_non_identifiers()
+{
+ int i, x;
+
+ // expected-warning@+1 {{extra tokens at the end of '#pragma omp simd' are ignored}}
+ #pragma omp simd;
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+2 {{unexpected OpenMP clause 'firstprivate' in directive '#pragma omp simd'}}
+ // expected-warning@+1 {{extra tokens at the end of '#pragma omp simd' are ignored}}
+ #pragma omp simd firstprivate(x);
+ for (i = 0; i < 16; ++i) ;
+
+ // expected-warning@+1 {{extra tokens at the end of '#pragma omp simd' are ignored}}
+ #pragma omp simd private(x);
+ for (i = 0; i < 16; ++i) ;
+
+ // expected-warning@+1 {{extra tokens at the end of '#pragma omp simd' are ignored}}
+ #pragma omp simd , private(x);
+ for (i = 0; i < 16; ++i) ;
+}
+
+extern int foo();
+void test_safelen()
+{
+ int i;
+ // expected-error@+1 {{expected '('}}
+ #pragma omp simd safelen
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected expression}} expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+ #pragma omp simd safelen(
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected expression}}
+ #pragma omp simd safelen()
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected expression}} expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+ #pragma omp simd safelen(,
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected expression}} expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+ #pragma omp simd safelen(,)
+ for (i = 0; i < 16; ++i) ;
+ // expected-warning@+2 {{extra tokens at the end of '#pragma omp simd' are ignored}}
+ // expected-error@+1 {{expected '('}}
+ #pragma omp simd safelen 4)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+2 {{expected ')'}}
+ // expected-note@+1 {{to match this '('}}
+ #pragma omp simd safelen(4
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+2 {{expected ')'}}
+ // expected-note@+1 {{to match this '('}}
+ #pragma omp simd safelen(4,
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+2 {{expected ')'}}
+ // expected-note@+1 {{to match this '('}}
+ #pragma omp simd safelen(4,)
+ for (i = 0; i < 16; ++i) ;
+ // xxpected-error@+1 {{expected expression}}
+ #pragma omp simd safelen(4)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+2 {{expected ')'}}
+ // expected-note@+1 {{to match this '('}}
+ #pragma omp simd safelen(4 4)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+2 {{expected ')'}}
+ // expected-note@+1 {{to match this '('}}
+ #pragma omp simd safelen(4,,4)
+ for (i = 0; i < 16; ++i) ;
+ #pragma omp simd safelen(4)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+2 {{expected ')'}}
+ // expected-note@+1 {{to match this '('}}
+ #pragma omp simd safelen(4,8)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expression is not an integer constant expression}}
+ #pragma omp simd safelen(2.5)
+ for (i = 0; i < 16; ++i);
+ // expected-error@+1 {{expression is not an integer constant expression}}
+ #pragma omp simd safelen(foo())
+ for (i = 0; i < 16; ++i);
+ // expected-error@+1 {{argument to 'safelen' clause must be a positive integer value}}
+ #pragma omp simd safelen(-5)
+ for (i = 0; i < 16; ++i);
+ // expected-error@+1 {{argument to 'safelen' clause must be a positive integer value}}
+ #pragma omp simd safelen(0)
+ for (i = 0; i < 16; ++i);
+ // expected-error@+1 {{argument to 'safelen' clause must be a positive integer value}}
+ #pragma omp simd safelen(5-5)
+ for (i = 0; i < 16; ++i);
+}
+
+void test_collapse()
+{
+ int i;
+ // expected-error@+1 {{expected '('}}
+ #pragma omp simd collapse
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected expression}} expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+ #pragma omp simd collapse(
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected expression}}
+ #pragma omp simd collapse()
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected expression}} expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+ #pragma omp simd collapse(,
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected expression}} expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+ #pragma omp simd collapse(,)
+ for (i = 0; i < 16; ++i) ;
+ // expected-warning@+2 {{extra tokens at the end of '#pragma omp simd' are ignored}}
+ // expected-error@+1 {{expected '('}}
+ #pragma omp simd collapse 4)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+2 {{expected ')'}}
+ // expected-note@+1 {{to match this '('}} expected-note@+1 {{as specified in 'collapse' clause}}
+ #pragma omp simd collapse(4
+ for (i = 0; i < 16; ++i) ; // expected-error {{expected 4 for loops after '#pragma omp simd', but found only 1}}
+ // expected-error@+2 {{expected ')'}}
+ // expected-note@+1 {{to match this '('}} expected-note@+1 {{as specified in 'collapse' clause}}
+ #pragma omp simd collapse(4,
+ for (i = 0; i < 16; ++i) ; // expected-error {{expected 4 for loops after '#pragma omp simd', but found only 1}}
+ // expected-error@+2 {{expected ')'}}
+ // expected-note@+1 {{to match this '('}} expected-note@+1 {{as specified in 'collapse' clause}}
+ #pragma omp simd collapse(4,)
+ for (i = 0; i < 16; ++i) ; // expected-error {{expected 4 for loops after '#pragma omp simd', but found only 1}}
+ // xxpected-error@+1 {{expected expression}} expected-note@+1 {{as specified in 'collapse' clause}}
+ #pragma omp simd collapse(4)
+ for (i = 0; i < 16; ++i) ; // expected-error {{expected 4 for loops after '#pragma omp simd', but found only 1}}
+ // expected-error@+2 {{expected ')'}}
+ // expected-note@+1 {{to match this '('}} expected-note@+1 {{as specified in 'collapse' clause}}
+ #pragma omp simd collapse(4 4)
+ for (i = 0; i < 16; ++i) ; // expected-error {{expected 4 for loops after '#pragma omp simd', but found only 1}}
+ // expected-error@+2 {{expected ')'}}
+ // expected-note@+1 {{to match this '('}} expected-note@+1 {{as specified in 'collapse' clause}}
+ #pragma omp simd collapse(4,,4)
+ for (i = 0; i < 16; ++i) ; // expected-error {{expected 4 for loops after '#pragma omp simd', but found only 1}}
+ #pragma omp simd collapse(4)
+ for (int i1 = 0; i1 < 16; ++i1)
+ for (int i2 = 0; i2 < 16; ++i2)
+ for (int i3 = 0; i3 < 16; ++i3)
+ for (int i4 = 0; i4 < 16; ++i4)
+ foo();
+ // expected-error@+2 {{expected ')'}}
+ // expected-note@+1 {{to match this '('}} expected-note@+1 {{as specified in 'collapse' clause}}
+ #pragma omp simd collapse(4,8)
+ for (i = 0; i < 16; ++i) ; // expected-error {{expected 4 for loops after '#pragma omp simd', but found only 1}}
+ // expected-error@+1 {{expression is not an integer constant expression}}
+ #pragma omp simd collapse(2.5)
+ for (i = 0; i < 16; ++i);
+ // expected-error@+1 {{expression is not an integer constant expression}}
+ #pragma omp simd collapse(foo())
+ for (i = 0; i < 16; ++i);
+ // expected-error@+1 {{argument to 'collapse' clause must be a positive integer value}}
+ #pragma omp simd collapse(-5)
+ for (i = 0; i < 16; ++i);
+ // expected-error@+1 {{argument to 'collapse' clause must be a positive integer value}}
+ #pragma omp simd collapse(0)
+ for (i = 0; i < 16; ++i);
+ // expected-error@+1 {{argument to 'collapse' clause must be a positive integer value}}
+ #pragma omp simd collapse(5-5)
+ for (i = 0; i < 16; ++i);
+}
+
+void test_linear()
+{
+ int i;
+ // expected-error@+1 {{expected expression}} expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+ #pragma omp simd linear(
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+2 {{expected expression}}
+ // expected-error@+1 {{expected expression}} expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+ #pragma omp simd linear(,
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+2 {{expected expression}}
+ // expected-error@+1 {{expected expression}}
+ #pragma omp simd linear(,)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected expression}}
+ #pragma omp simd linear()
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected expression}}
+ #pragma omp simd linear(int)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected variable name}}
+ #pragma omp simd linear(0)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{use of undeclared identifier 'x'}}
+ #pragma omp simd linear(x)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+2 {{use of undeclared identifier 'x'}}
+ // expected-error@+1 {{use of undeclared identifier 'y'}}
+ #pragma omp simd linear(x, y)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+3 {{use of undeclared identifier 'x'}}
+ // expected-error@+2 {{use of undeclared identifier 'y'}}
+ // expected-error@+1 {{use of undeclared identifier 'z'}}
+ #pragma omp simd linear(x, y, z)
+ for (i = 0; i < 16; ++i) ;
+
+ int x, y;
+ // expected-error@+1 {{expected expression}}
+ #pragma omp simd linear(x:)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected expression}} expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+ #pragma omp simd linear(x:,)
+ for (i = 0; i < 16; ++i) ;
+ #pragma omp simd linear(x:1)
+ for (i = 0; i < 16; ++i) ;
+ #pragma omp simd linear(x:2*2)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+ #pragma omp simd linear(x:1,y)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+ #pragma omp simd linear(x:1,y,z:1)
+ for (i = 0; i < 16; ++i) ;
+
+ // expected-note@+2 {{defined as linear}}
+ // expected-error@+1 {{linear variable cannot be linear}}
+ #pragma omp simd linear(x) linear(x)
+ for (i = 0; i < 16; ++i) ;
+
+ // expected-note@+2 {{defined as private}}
+ // expected-error@+1 {{private variable cannot be linear}}
+ #pragma omp simd private(x) linear(x)
+ for (i = 0; i < 16; ++i) ;
+
+ // expected-note@+2 {{defined as linear}}
+ // expected-error@+1 {{linear variable cannot be private}}
+ #pragma omp simd linear(x) private(x)
+ for (i = 0; i < 16; ++i) ;
+
+ // expected-warning@+1 {{zero linear step (x and other variables in clause should probably be const)}}
+ #pragma omp simd linear(x,y:0)
+ for (i = 0; i < 16; ++i) ;
+
+ // expected-note@+2 {{defined as linear}}
+ // expected-error@+1 {{linear variable cannot be lastprivate}}
+ #pragma omp simd linear(x) lastprivate(x)
+ for (i = 0; i < 16; ++i) ;
+
+ // expected-note@+2 {{defined as lastprivate}}
+ // expected-error@+1 {{lastprivate variable cannot be linear}}
+ #pragma omp simd lastprivate(x) linear(x)
+ for (i = 0; i < 16; ++i) ;
+
+}
+
+void test_aligned()
+{
+ int i;
+ // expected-error@+1 {{expected expression}} expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+ #pragma omp simd aligned(
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+2 {{expected expression}}
+ // expected-error@+1 {{expected expression}} expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+ #pragma omp simd aligned(,
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+2 {{expected expression}}
+ // expected-error@+1 {{expected expression}}
+ #pragma omp simd aligned(,)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected expression}}
+ #pragma omp simd aligned()
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected expression}}
+ #pragma omp simd aligned(int)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected variable name}}
+ #pragma omp simd aligned(0)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{use of undeclared identifier 'x'}}
+ #pragma omp simd aligned(x)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+2 {{use of undeclared identifier 'x'}}
+ // expected-error@+1 {{use of undeclared identifier 'y'}}
+ #pragma omp simd aligned(x, y)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+3 {{use of undeclared identifier 'x'}}
+ // expected-error@+2 {{use of undeclared identifier 'y'}}
+ // expected-error@+1 {{use of undeclared identifier 'z'}}
+ #pragma omp simd aligned(x, y, z)
+ for (i = 0; i < 16; ++i) ;
+
+ int *x, y, z[25]; // expected-note 4 {{'y' defined here}}
+ #pragma omp simd aligned(x)
+ for (i = 0; i < 16; ++i) ;
+ #pragma omp simd aligned(z)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected expression}}
+ #pragma omp simd aligned(x:)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected expression}} expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+ #pragma omp simd aligned(x:,)
+ for (i = 0; i < 16; ++i) ;
+ #pragma omp simd aligned(x:1)
+ for (i = 0; i < 16; ++i) ;
+ #pragma omp simd aligned(x:2*2)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+ #pragma omp simd aligned(x:1,y)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+ #pragma omp simd aligned(x:1,y,z:1)
+ for (i = 0; i < 16; ++i) ;
+
+ // expected-error@+1 {{argument of aligned clause should be array or pointer, not 'int'}}
+ #pragma omp simd aligned(x, y)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{argument of aligned clause should be array or pointer, not 'int'}}
+ #pragma omp simd aligned(x, y, z)
+ for (i = 0; i < 16; ++i) ;
+
+ // expected-note@+2 {{defined as aligned}}
+ // expected-error@+1 {{a variable cannot appear in more than one aligned clause}}
+ #pragma omp simd aligned(x) aligned(z,x)
+ for (i = 0; i < 16; ++i) ;
+
+ // expected-note@+3 {{defined as aligned}}
+ // expected-error@+2 {{a variable cannot appear in more than one aligned clause}}
+ // expected-error@+1 2 {{argument of aligned clause should be array or pointer, not 'int'}}
+ #pragma omp simd aligned(x,y,z) aligned(y,z)
+ for (i = 0; i < 16; ++i) ;
+}
+
+void test_private()
+{
+ int i;
+ // expected-error@+2 {{expected expression}}
+ // expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+ #pragma omp simd private(
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+ // expected-error@+1 2 {{expected expression}}
+ #pragma omp simd private(,
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 2 {{expected expression}}
+ #pragma omp simd private(,)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected expression}}
+ #pragma omp simd private()
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected expression}}
+ #pragma omp simd private(int)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected variable name}}
+ #pragma omp simd private(0)
+ for (i = 0; i < 16; ++i) ;
+
+ int x, y, z;
+ #pragma omp simd private(x)
+ for (i = 0; i < 16; ++i) ;
+ #pragma omp simd private(x, y)
+ for (i = 0; i < 16; ++i) ;
+ #pragma omp simd private(x, y, z)
+ for (i = 0; i < 16; ++i) {
+ x = y * i + z;
+ }
+}
+
+void test_firstprivate()
+{
+ int i;
+ // expected-error@+3 {{expected ')'}} expected-note@+3 {{to match this '('}}
+ // expected-error@+2 {{unexpected OpenMP clause 'firstprivate' in directive '#pragma omp simd'}}
+ // expected-error@+1 {{expected expression}}
+ #pragma omp simd firstprivate(
+ for (i = 0; i < 16; ++i) ;
+}
+
+void test_lastprivate()
+{
+ int i;
+ // expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+ // expected-error@+1 {{expected expression}}
+ #pragma omp simd lastprivate(
+ for (i = 0; i < 16; ++i) ;
+
+ // expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+ // expected-error@+1 2 {{expected expression}}
+ #pragma omp simd lastprivate(,
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 2 {{expected expression}}
+ #pragma omp simd lastprivate(,)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected expression}}
+ #pragma omp simd lastprivate()
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected expression}}
+ #pragma omp simd lastprivate(int)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected variable name}}
+ #pragma omp simd lastprivate(0)
+ for (i = 0; i < 16; ++i) ;
+
+ int x, y, z;
+ #pragma omp simd lastprivate(x)
+ for (i = 0; i < 16; ++i) ;
+ #pragma omp simd lastprivate(x, y)
+ for (i = 0; i < 16; ++i) ;
+ #pragma omp simd lastprivate(x, y, z)
+ for (i = 0; i < 16; ++i) ;
+}
+
+void test_reduction()
+{
+ int i, x, y;
+ // expected-error@+3 {{expected ')'}} expected-note@+3 {{to match this '('}}
+ // expected-error@+2 {{expected identifier}}
+ // expected-warning@+1 {{missing ':' after reduction identifier - ignoring}}
+ #pragma omp simd reduction(
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+2 {{expected identifier}}
+ // expected-warning@+1 {{missing ':' after reduction identifier - ignoring}}
+ #pragma omp simd reduction()
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+2 {{expected expression}}
+ // expected-warning@+1 {{missing ':' after reduction identifier - ignoring}}
+ #pragma omp simd reduction(x)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected identifier}}
+ #pragma omp simd reduction(:x)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+3 {{expected ')'}} expected-note@+3 {{to match this '('}}
+ // expected-error@+2 {{expected identifier}}
+ // expected-warning@+1 {{missing ':' after reduction identifier - ignoring}}
+ #pragma omp simd reduction(,
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+3 {{expected ')'}} expected-note@+3 {{to match this '('}}
+ // expected-error@+2 {{expected expression}}
+ // expected-warning@+1 {{missing ':' after reduction identifier - ignoring}}
+ #pragma omp simd reduction(+
+ for (i = 0; i < 16; ++i) ;
+
+ // expected-error@+3 {{expected ')'}} expected-note@+3 {{to match this '('}}
+ //
+ // expected-error@+1 {{expected expression}}
+ #pragma omp simd reduction(+:
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected expression}}
+ #pragma omp simd reduction(+:)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected expression}}
+ #pragma omp simd reduction(+:,y)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected expression}}
+ #pragma omp simd reduction(+:x,+:y)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+2 {{expected identifier}}
+ // expected-warning@+1 {{missing ':' after reduction identifier - ignoring}}
+ #pragma omp simd reduction(%:x)
+ for (i = 0; i < 16; ++i) ;
+
+ #pragma omp simd reduction(+:x)
+ for (i = 0; i < 16; ++i) ;
+ #pragma omp simd reduction(*:x)
+ for (i = 0; i < 16; ++i) ;
+ #pragma omp simd reduction(-:x)
+ for (i = 0; i < 16; ++i) ;
+ #pragma omp simd reduction(&:x)
+ for (i = 0; i < 16; ++i) ;
+ #pragma omp simd reduction(|:x)
+ for (i = 0; i < 16; ++i) ;
+ #pragma omp simd reduction(^:x)
+ for (i = 0; i < 16; ++i) ;
+ #pragma omp simd reduction(&&:x)
+ for (i = 0; i < 16; ++i) ;
+ #pragma omp simd reduction(||:x)
+ for (i = 0; i < 16; ++i) ;
+ #pragma omp simd reduction(max:x)
+ for (i = 0; i < 16; ++i) ;
+ #pragma omp simd reduction(min:x)
+ for (i = 0; i < 16; ++i) ;
+ struct X { int x; };
+ struct X X;
+ // expected-error@+1 {{expected variable name}}
+ #pragma omp simd reduction(+:X.x)
+ for (i = 0; i < 16; ++i) ;
+ // expected-error@+1 {{expected variable name}}
+ #pragma omp simd reduction(+:x+x)
+ for (i = 0; i < 16; ++i) ;
+}
+
+void test_loop_messages()
+{
+ float a[100], b[100], c[100];
+ // expected-error@+2 {{variable must be of integer or pointer type}}
+ #pragma omp simd
+ for (float fi = 0; fi < 10.0; fi++) {
+ c[(int)fi] = a[(int)fi] + b[(int)fi];
+ }
+ // expected-error@+2 {{variable must be of integer or pointer type}}
+ #pragma omp simd
+ for (double fi = 0; fi < 10.0; fi++) {
+ c[(int)fi] = a[(int)fi] + b[(int)fi];
+ }
+}
+
diff --git a/test/OpenMP/simd_private_messages.cpp b/test/OpenMP/simd_private_messages.cpp
new file mode 100644
index 000000000000..e5e4fe5b8b39
--- /dev/null
+++ b/test/OpenMP/simd_private_messages.cpp
@@ -0,0 +1,134 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+public:
+ S2():a(0) { }
+};
+const S2 b;
+const S2 ba[5];
+class S3 {
+ int a;
+public:
+ S3():a(0) { }
+};
+const S3 ca[5];
+class S4 { // expected-note {{'S4' declared here}}
+ int a;
+ S4();
+public:
+ S4(int v):a(v) { }
+};
+class S5 { // expected-note {{'S5' declared here}}
+ int a;
+ S5():a(0) {}
+public:
+ S5(int v):a(v) { }
+};
+
+S3 h;
+#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
+
+template<class I, class C> int foomain(I argc, C **argv) {
+ I e(4);
+ I g(5);
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+ #pragma omp simd private // expected-error {{expected '(' after 'private'}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd private ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd private () // expected-error {{expected expression}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd private (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd private (argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd private (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd private (argc)
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd private (S1) // expected-error {{'S1' does not refer to a value}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd private (a, b) // expected-error {{private variable with incomplete type 'S1'}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd private (argv[1]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd private(e, g)
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd private(h) // expected-error {{threadprivate or thread local variable cannot be private}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd shared(i) // expected-error {{unexpected OpenMP clause 'shared' in directive '#pragma omp simd'}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp parallel
+ {
+ int v = 0;
+ int i;
+ #pragma omp simd private(i)
+ for (int k = 0; k < argc; ++k) { i = k; v += i; }
+ }
+ #pragma omp parallel shared(i)
+ #pragma omp parallel private(i)
+ #pragma omp simd private(j) // expected-error {{arguments of OpenMP clause 'private' cannot be of reference type}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd private(i)
+ for (int k = 0; k < argc; ++k) ++k;
+ return 0;
+}
+
+int main(int argc, char **argv) {
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note {{'g' defined here}}
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+ #pragma omp simd private // expected-error {{expected '(' after 'private'}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd private ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd private () // expected-error {{expected expression}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd private (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd private (argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd private (argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd private (argc)
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd private (S1) // expected-error {{'S1' does not refer to a value}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd private (a, b) // expected-error {{private variable with incomplete type 'S1'}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd private (argv[1]) // expected-error {{expected variable name}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd private(e, g) // expected-error 2 {{private variable must have an accessible, unambiguous default constructor}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd private(h) // expected-error {{threadprivate or thread local variable cannot be private}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd shared(i) // expected-error {{unexpected OpenMP clause 'shared' in directive '#pragma omp simd'}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp parallel
+ {
+ int i;
+ #pragma omp simd private(i)
+ for (int k = 0; k < argc; ++k) ++k;
+ }
+ #pragma omp parallel shared(i)
+ #pragma omp parallel private(i)
+ #pragma omp simd private(j) // expected-error {{arguments of OpenMP clause 'private' cannot be of reference type}}
+ for (int k = 0; k < argc; ++k) ++k;
+ #pragma omp simd private(i)
+ for (int k = 0; k < argc; ++k) ++k;
+
+ return 0;
+}
+
diff --git a/test/OpenMP/simd_reduction_messages.cpp b/test/OpenMP/simd_reduction_messages.cpp
new file mode 100644
index 000000000000..347a5c1a4105
--- /dev/null
+++ b/test/OpenMP/simd_reduction_messages.cpp
@@ -0,0 +1,298 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}} expected-note 4 {{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+ S2 &operator+=(const S2 &arg) { return (*this); }
+
+public:
+ S2() : a(0) {}
+ S2(S2 &s2) : a(s2.a) {}
+ static float S2s; // expected-note 2 {{static data member is predetermined as shared}}
+ static const float S2sc;
+};
+const float S2::S2sc = 0; // expected-note 2 {{'S2sc' defined here}}
+S2 b; // expected-note 2 {{'b' defined here}}
+const S2 ba[5]; // expected-note 2 {{'ba' defined here}}
+class S3 {
+ int a;
+
+public:
+ S3() : a(0) {}
+ S3(const S3 &s3) : a(s3.a) {}
+ S3 operator+=(const S3 &arg1) { return arg1; }
+};
+int operator+=(const S3 &arg1, const S3 &arg2) { return 5; }
+S3 c; // expected-note 2 {{'c' defined here}}
+const S3 ca[5]; // expected-note 2 {{'ca' defined here}}
+extern const int f; // expected-note 4 {{'f' declared here}}
+class S4 { // expected-note {{'S4' declared here}}
+ int a;
+ S4();
+ S4(const S4 &s4);
+ S4 &operator+=(const S4 &arg) { return (*this); }
+
+public:
+ S4(int v) : a(v) {}
+};
+S4 &operator&=(S4 &arg1, S4 &arg2) { return arg1; }
+class S5 {
+ int a;
+ S5() : a(0) {}
+ S5(const S5 &s5) : a(s5.a) {}
+ S5 &operator+=(const S5 &arg);
+
+public:
+ S5(int v) : a(v) {}
+};
+class S6 {
+ int a;
+
+public:
+ S6() : a(6) {}
+ operator int() { return 6; }
+} o; // expected-note 2 {{'o' defined here}}
+
+S3 h, k;
+#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
+
+template <class T> // expected-note {{declared here}}
+T tmain(T argc) { // expected-note 2 {{'argc' defined here}}
+ const T d = T(); // expected-note 4 {{'d' defined here}}
+ const T da[5] = {T()}; // expected-note 2 {{'da' defined here}}
+ T qa[5] = {T()};
+ T i;
+ T &j = i; // expected-note 4 {{'j' defined here}}
+ S3 &p = k; // expected-note 2 {{'p' defined here}}
+ const T &r = da[(int)i]; // expected-note 2 {{'r' defined here}}
+ T &q = qa[(int)i]; // expected-note 2 {{'q' defined here}}
+ T fl; // expected-note {{'fl' defined here}}
+#pragma omp simd reduction // expected-error {{expected '(' after 'reduction'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction + // expected-error {{expected '(' after 'reduction'}} expected-warning {{extra tokens at the end of '#pragma omp simd' are ignored}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction( // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(- // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction() // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(*) // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(\) // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(& : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{variable of type 'float' is not valid for specified reduction operation}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(| : argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{variable of type 'float' is not valid for specified reduction operation}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(|| : argc ? i : argc) // expected-error 2 {{expected variable name}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(foo : argc) //expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(&& : argc)
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(^ : T) // expected-error {{'T' does not refer to a value}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(+ : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 3 {{const-qualified variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(min : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 3 {{const-qualified variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(max : qa[1]) // expected-error 2 {{expected variable name}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(+ : ba) // expected-error {{a reduction variable with array type 'const S2 [5]'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(* : ca) // expected-error {{a reduction variable with array type 'const S3 [5]'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(- : da) // expected-error {{a reduction variable with array type 'const int [5]'}} expected-error {{a reduction variable with array type 'const float [5]'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(^ : fl) // expected-error {{variable of type 'float' is not valid for specified reduction operation}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(+ : o) // expected-error {{variable of type 'class S6' is not valid for specified reduction operation}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd private(i), reduction(+ : j), reduction(+ : q) // expected-error 4 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(+ : j), reduction(+ : q) // OK
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel private(k)
+#pragma omp simd reduction(+ : p), reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(+ : p), reduction(+ : p) // expected-error 3 {{variable can appear only once in OpenMP 'reduction' clause}} expected-note 3 {{previously referenced here}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(+ : r) // expected-error 2 {{const-qualified variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel shared(i)
+#pragma omp parallel reduction(min : i)
+#pragma omp simd reduction(max : j) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel private(fl)
+#pragma omp simd reduction(+ : fl)
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel reduction(* : fl)
+#pragma omp simd reduction(+ : fl)
+ for (int i = 0; i < 10; ++i)
+ foo();
+
+ return T();
+}
+
+int main(int argc, char **argv) {
+ const int d = 5; // expected-note 2 {{'d' defined here}}
+ const int da[5] = {0}; // expected-note {{'da' defined here}}
+ int qa[5] = {0};
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note {{'g' defined here}}
+ int i;
+ int &j = i; // expected-note 2 {{'j' defined here}}
+ S3 &p = k; // expected-note 2 {{'p' defined here}}
+ const int &r = da[i]; // expected-note {{'r' defined here}}
+ int &q = qa[i]; // expected-note {{'q' defined here}}
+ float fl; // expected-note {{'fl' defined here}}
+#pragma omp simd reduction // expected-error {{expected '(' after 'reduction'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction + // expected-error {{expected '(' after 'reduction'}} expected-warning {{extra tokens at the end of '#pragma omp simd' are ignored}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction( // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(- // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction() // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(*) // expected-warning {{missing ':' after reduction identifier - ignoring}} expected-error {{expected expression}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(\) // expected-error {{expected unqualified-id}} expected-warning {{missing ':' after reduction identifier - ignoring}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(foo : argc // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(| : argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(|| : argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(~ : argc) // expected-error {{expected unqualified-id}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(&& : argc)
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(^ : S1) // expected-error {{'S1' does not refer to a value}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(+ : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 2 {{const-qualified variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(min : a, b, c, d, f) // expected-error {{reduction variable with incomplete type 'S1'}} expected-error 2 {{arguments of OpenMP clause 'reduction' for 'min' or 'max' must be of arithmetic type}} expected-error 2 {{const-qualified variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(max : argv[1]) // expected-error {{expected variable name}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(+ : ba) // expected-error {{a reduction variable with array type 'const S2 [5]'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(* : ca) // expected-error {{a reduction variable with array type 'const S3 [5]'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(- : da) // expected-error {{a reduction variable with array type 'const int [5]'}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(^ : fl) // expected-error {{variable of type 'float' is not valid for specified reduction operation}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(&& : S2::S2s) // expected-error {{shared variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(&& : S2::S2sc) // expected-error {{const-qualified variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(& : e, g) // expected-error {{reduction variable must have an accessible, unambiguous default constructor}} expected-error {{variable of type 'S5' is not valid for specified reduction operation}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(+ : h, k) // expected-error {{threadprivate or thread local variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(+ : o) // expected-error {{variable of type 'class S6' is not valid for specified reduction operation}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd private(i), reduction(+ : j), reduction(+ : q) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel private(k)
+#pragma omp simd reduction(+ : p), reduction(+ : p) // expected-error 2 {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(+ : p), reduction(+ : p) // expected-error {{variable can appear only once in OpenMP 'reduction' clause}} expected-note {{previously referenced here}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp simd reduction(+ : r) // expected-error {{const-qualified variable cannot be reduction}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel shared(i)
+#pragma omp parallel reduction(min : i)
+#pragma omp simd reduction(max : j) // expected-error {{argument of OpenMP clause 'reduction' must reference the same object in all threads}}
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel private(fl)
+#pragma omp simd reduction(+ : fl)
+ for (int i = 0; i < 10; ++i)
+ foo();
+#pragma omp parallel reduction(* : fl)
+#pragma omp simd reduction(+ : fl)
+ for (int i = 0; i < 10; ++i)
+ foo();
+
+ return tmain(argc) + tmain(fl); // expected-note {{in instantiation of function template specialization 'tmain<int>' requested here}} expected-note {{in instantiation of function template specialization 'tmain<float>' requested here}}
+}
diff --git a/test/OpenMP/simd_safelen_messages.cpp b/test/OpenMP/simd_safelen_messages.cpp
new file mode 100644
index 000000000000..0e7e80dd976c
--- /dev/null
+++ b/test/OpenMP/simd_safelen_messages.cpp
@@ -0,0 +1,79 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}}
+
+template <class T, typename S, int N, int ST> // expected-note {{declared here}}
+T tmain(T argc, S **argv) { //expected-note 2 {{declared here}}
+ #pragma omp simd safelen // expected-error {{expected '(' after 'safelen'}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp simd safelen ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp simd safelen () // expected-error {{expected expression}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ // expected-error@+3 {{expected ')'}} expected-note@+3 {{to match this '('}}
+ // expected-error@+2 2 {{expression is not an integral constant expression}}
+ // expected-note@+1 2 {{read of non-const variable 'argc' is not allowed in a constant expression}}
+ #pragma omp simd safelen (argc
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ // expected-error@+1 {{argument to 'safelen' clause must be a positive integer value}}
+ #pragma omp simd safelen (ST // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp simd safelen (1)) // expected-warning {{extra tokens at the end of '#pragma omp simd' are ignored}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp simd safelen ((ST > 0) ? 1 + ST : 2)
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ // expected-error@+3 2 {{directive '#pragma omp simd' cannot contain more than one 'safelen' clause}}
+ // expected-error@+2 2 {{argument to 'safelen' clause must be a positive integer value}}
+ // expected-error@+1 2 {{expression is not an integral constant expression}}
+ #pragma omp simd safelen (foobool(argc)), safelen (true), safelen (-5)
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp simd safelen (S) // expected-error {{'S' does not refer to a value}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ // expected-error@+1 2 {{expression is not an integral constant expression}}
+ #pragma omp simd safelen (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp simd safelen (4)
+ for (int i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ #pragma omp simd safelen (N) // expected-error {{argument to 'safelen' clause must be a positive integer value}}
+ for (T i = ST; i < N; i++) argv[0][i] = argv[0][i] - argv[0][i-ST];
+ return argc;
+}
+
+int main(int argc, char **argv) {
+ #pragma omp simd safelen // expected-error {{expected '(' after 'safelen'}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp simd safelen ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp simd safelen () // expected-error {{expected expression}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp simd safelen (4 // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp simd safelen (2+2)) // expected-warning {{extra tokens at the end of '#pragma omp simd' are ignored}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp simd safelen (foobool(1) > 0 ? 1 : 2) // expected-error {{expression is not an integral constant expression}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ // expected-error@+3 {{expression is not an integral constant expression}}
+ // expected-error@+2 2 {{directive '#pragma omp simd' cannot contain more than one 'safelen' clause}}
+ // expected-error@+1 2 {{argument to 'safelen' clause must be a positive integer value}}
+ #pragma omp simd safelen (foobool(argc)), safelen (true), safelen (-5)
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ #pragma omp simd safelen (S1) // expected-error {{'S1' does not refer to a value}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ // expected-error@+1 {{expression is not an integral constant expression}}
+ #pragma omp simd safelen (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ for (int i = 4; i < 12; i++) argv[0][i] = argv[0][i] - argv[0][i-4];
+ // expected-error@+3 {{statement after '#pragma omp simd' must be a for loop}}
+ // expected-note@+1 {{in instantiation of function template specialization 'tmain<int, char, -1, -2>' requested here}}
+ #pragma omp simd safelen(safelen(tmain<int, char, -1, -2>(argc, argv) // expected-error 2 {{expected ')'}} expected-note 2 {{to match this '('}}
+ foo();
+ // expected-note@+1 {{in instantiation of function template specialization 'tmain<int, char, 12, 4>' requested here}}
+ return tmain<int, char, 12, 4>(argc, argv);
+}
+
diff --git a/test/OpenMP/single_ast_print.cpp b/test/OpenMP/single_ast_print.cpp
new file mode 100644
index 000000000000..65a007e271c4
--- /dev/null
+++ b/test/OpenMP/single_ast_print.cpp
@@ -0,0 +1,38 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ast-print %s | FileCheck %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -emit-pch -o %t %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
+// expected-no-diagnostics
+
+#ifndef HEADER
+#define HEADER
+
+void foo() {}
+
+template <class T, int N>
+T tmain(T argc) {
+ T b = argc, c, d, e, f, g;
+ static T a;
+// CHECK: static T a;
+#pragma omp parallel private(g)
+#pragma omp single private(argc, b), firstprivate(c, d), nowait copyprivate(g)
+ foo();
+ // CHECK-NEXT: #pragma omp parallel private(g)
+ // CHECK-NEXT: #pragma omp single private(argc,b) firstprivate(c,d) nowait copyprivate(g)
+ // CHECK-NEXT: foo();
+ return T();
+}
+
+int main(int argc, char **argv) {
+ int b = argc, c, d, e, f, g;
+ static int a;
+// CHECK: static int a;
+#pragma omp parallel private(g)
+#pragma omp single private(argc, b), firstprivate(argv, c), nowait copyprivate(g)
+ foo();
+ // CHECK-NEXT: #pragma omp parallel private(g)
+ // CHECK-NEXT: #pragma omp single private(argc,b) firstprivate(argv,c) nowait copyprivate(g)
+ // CHECK-NEXT: foo();
+ return (tmain<int, 5>(argc) + tmain<char, 1>(argv[0][0]));
+}
+
+#endif
diff --git a/test/OpenMP/single_copyprivate_messages.cpp b/test/OpenMP/single_copyprivate_messages.cpp
new file mode 100644
index 000000000000..f07ab12bfb46
--- /dev/null
+++ b/test/OpenMP/single_copyprivate_messages.cpp
@@ -0,0 +1,157 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+void foo() {
+}
+
+struct S1; // expected-note 2 {{declared here}}
+class S2 {
+ mutable int a;
+
+public:
+ S2() : a(0) {}
+ S2 &operator=(S2 &s2) { return *this; }
+};
+class S3 {
+ int a;
+
+public:
+ S3() : a(0) {}
+ S3 &operator=(S3 &s3) { return *this; }
+};
+class S4 { // expected-note 2 {{'S4' declared here}}
+ int a;
+ S4();
+ S4 &operator=(const S4 &s4);
+
+public:
+ S4(int v) : a(v) {}
+};
+class S5 { // expected-note 2 {{'S5' declared here}}
+ int a;
+ S5() : a(0) {}
+ S5 &operator=(const S5 &s5) { return *this; }
+
+public:
+ S5(int v) : a(v) {}
+};
+
+S2 k;
+S3 h;
+S4 l(3); // expected-note 2 {{'l' defined here}}
+S5 m(4); // expected-note 2 {{'m' defined here}}
+#pragma omp threadprivate(h, k, l, m)
+
+template <class T, class C>
+T tmain(T argc, C **argv) {
+ T i;
+#pragma omp parallel
+#pragma omp single copyprivate // expected-error {{expected '(' after 'copyprivate'}}
+#pragma omp parallel
+#pragma omp single copyprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+#pragma omp parallel
+#pragma omp single copyprivate() // expected-error {{expected expression}}
+#pragma omp parallel
+#pragma omp single copyprivate(k // expected-error {{expected ')'}} expected-note {{to match this '('}}
+#pragma omp parallel
+#pragma omp single copyprivate(h, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+#pragma omp parallel
+#pragma omp single copyprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+#pragma omp parallel
+#pragma omp single copyprivate(l) // expected-error {{copyprivate variable must have an accessible, unambiguous copy assignment operator}}
+#pragma omp parallel
+#pragma omp single copyprivate(S1) // expected-error {{'S1' does not refer to a value}}
+#pragma omp parallel
+#pragma omp single copyprivate(argv[1]) // expected-error {{expected variable name}}
+#pragma omp parallel // expected-note {{implicitly determined as shared}}
+#pragma omp single copyprivate(i) // expected-error {{copyprivate variable must be threadprivate or private in the enclosing context}}
+#pragma omp parallel
+#pragma omp single copyprivate(m) // expected-error {{copyprivate variable must have an accessible, unambiguous copy assignment operator}}
+ foo();
+#pragma omp parallel private(i)
+ {
+#pragma omp single copyprivate(i)
+ foo();
+ }
+#pragma omp parallel shared(i) // expected-note {{defined as shared}}
+ {
+#pragma omp single copyprivate(i) // expected-error {{copyprivate variable must be threadprivate or private in the enclosing context}}
+ foo();
+ }
+#pragma omp parallel private(i)
+#pragma omp parallel default(shared) // expected-note {{implicitly determined as shared}}
+ {
+#pragma omp single copyprivate(i) // expected-error {{copyprivate variable must be threadprivate or private in the enclosing context}}
+ foo();
+ }
+#pragma omp parallel private(i)
+#pragma omp parallel // expected-note {{implicitly determined as shared}}
+ {
+#pragma omp single copyprivate(i) // expected-error {{copyprivate variable must be threadprivate or private in the enclosing context}}
+ foo();
+ }
+#pragma omp parallel
+#pragma omp single private(i) copyprivate(i) // expected-error {{private variable cannot be copyprivate}} expected-note {{defined as private}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(i) copyprivate(i) // expected-error {{firstprivate variable cannot be copyprivate}} expected-note {{defined as firstprivate}}
+ foo();
+
+ return T();
+}
+
+int main(int argc, char **argv) {
+ int i;
+#pragma omp parallel
+#pragma omp single copyprivate // expected-error {{expected '(' after 'copyprivate'}}
+#pragma omp parallel
+#pragma omp single copyprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+#pragma omp parallel
+#pragma omp single copyprivate() // expected-error {{expected expression}}
+#pragma omp parallel
+#pragma omp single copyprivate(k // expected-error {{expected ')'}} expected-note {{to match this '('}}
+#pragma omp parallel
+#pragma omp single copyprivate(h, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+#pragma omp parallel
+#pragma omp single copyprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+#pragma omp parallel
+#pragma omp single copyprivate(l) // expected-error {{copyprivate variable must have an accessible, unambiguous copy assignment operator}}
+#pragma omp parallel
+#pragma omp single copyprivate(S1) // expected-error {{'S1' does not refer to a value}}
+#pragma omp parallel
+#pragma omp single copyprivate(argv[1]) // expected-error {{expected variable name}}
+#pragma omp parallel // expected-note {{implicitly determined as shared}}
+#pragma omp single copyprivate(i) // expected-error {{copyprivate variable must be threadprivate or private in the enclosing context}}
+#pragma omp parallel
+#pragma omp single copyprivate(m) // expected-error {{copyprivate variable must have an accessible, unambiguous copy assignment operator}}
+ foo();
+#pragma omp parallel private(i)
+ {
+#pragma omp single copyprivate(i)
+ foo();
+ }
+#pragma omp parallel shared(i) // expected-note {{defined as shared}}
+ {
+#pragma omp single copyprivate(i) // expected-error {{copyprivate variable must be threadprivate or private in the enclosing context}}
+ foo();
+ }
+#pragma omp parallel private(i)
+#pragma omp parallel default(shared) // expected-note {{implicitly determined as shared}}
+ {
+#pragma omp single copyprivate(i) // expected-error {{copyprivate variable must be threadprivate or private in the enclosing context}}
+ foo();
+ }
+#pragma omp parallel private(i)
+#pragma omp parallel // expected-note {{implicitly determined as shared}}
+ {
+#pragma omp single copyprivate(i) // expected-error {{copyprivate variable must be threadprivate or private in the enclosing context}}
+ foo();
+ }
+#pragma omp parallel
+#pragma omp single private(i) copyprivate(i) // expected-error {{private variable cannot be copyprivate}} expected-note {{defined as private}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(i) copyprivate(i) // expected-error {{firstprivate variable cannot be copyprivate}} expected-note {{defined as firstprivate}}
+ foo();
+
+ return tmain(argc, argv); // expected-note {{in instantiation of function template specialization 'tmain<int, char>' requested here}}
+}
diff --git a/test/OpenMP/single_firstprivate_messages.cpp b/test/OpenMP/single_firstprivate_messages.cpp
new file mode 100644
index 000000000000..6d4988254fb6
--- /dev/null
+++ b/test/OpenMP/single_firstprivate_messages.cpp
@@ -0,0 +1,239 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+
+public:
+ S2() : a(0) {}
+ S2(S2 &s2) : a(s2.a) {}
+ static float S2s;
+ static const float S2sc;
+};
+const float S2::S2sc = 0;
+const S2 b;
+const S2 ba[5];
+class S3 {
+ int a;
+ S3 &operator=(const S3 &s3);
+
+public:
+ S3() : a(0) {}
+ S3(S3 &s3) : a(s3.a) {}
+};
+const S3 c;
+const S3 ca[5];
+extern const int f;
+class S4 { // expected-note 2 {{'S4' declared here}}
+ int a;
+ S4();
+ S4(const S4 &s4);
+
+public:
+ S4(int v) : a(v) {}
+};
+class S5 { // expected-note 4 {{'S5' declared here}}
+ int a;
+ S5(const S5 &s5) : a(s5.a) {}
+
+public:
+ S5() : a(0) {}
+ S5(int v) : a(v) {}
+};
+class S6 {
+ int a;
+ S6() : a(0) {}
+
+public:
+ S6(const S6 &s6) : a(s6.a) {}
+ S6(int v) : a(v) {}
+};
+
+S3 h;
+#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
+
+template <class I, class C>
+int foomain(int argc, char **argv) {
+ I e(4); // expected-note {{'e' defined here}}
+ C g(5); // expected-note 2 {{'g' defined here}}
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp parallel
+#pragma omp single firstprivate // expected-error {{expected '(' after 'firstprivate'}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate() // expected-error {{expected expression}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(argc)
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(a, b) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(argv[1]) // expected-error {{expected variable name}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(e, g) // expected-error 2 {{firstprivate variable must have an accessible, unambiguous copy constructor}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
+ foo();
+#pragma omp parallel
+#pragma omp single linear(i) // expected-error {{unexpected OpenMP clause 'linear' in directive '#pragma omp single'}}
+ foo();
+#pragma omp parallel
+ {
+ int v = 0;
+ int i; // expected-note {{variable with automatic storage duration is predetermined as private; perhaps you forget to enclose 'omp single' directive into a parallel or another task region?}}
+#pragma omp single firstprivate(i) // expected-error {{private variable cannot be firstprivate}}
+ foo();
+ v += i;
+ }
+#pragma omp parallel shared(i)
+#pragma omp parallel private(i)
+#pragma omp single firstprivate(j) // expected-error {{arguments of OpenMP clause 'firstprivate' cannot be of reference type}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(i)
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(g) // expected-error {{firstprivate variable must have an accessible, unambiguous copy constructor}}
+ foo();
+#pragma omp parallel private(i) // expected-note {{defined as private}}
+#pragma omp single firstprivate(i) // expected-error {{firstprivate variable must be shared}}
+ foo();
+#pragma omp parallel reduction(+ : i) // expected-note {{defined as reduction}}
+#pragma omp single firstprivate(i) // expected-error {{firstprivate variable must be shared}}
+ foo();
+ return 0;
+}
+
+int main(int argc, char **argv) {
+ const int d = 5;
+ const int da[5] = {0};
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note 2 {{'g' defined here}}
+ S3 m;
+ S6 n(2);
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp parallel
+#pragma omp single firstprivate // expected-error {{expected '(' after 'firstprivate'}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate() // expected-error {{expected expression}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(argc)
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(argv[1]) // expected-error {{expected variable name}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(2 * 2) // expected-error {{expected variable name}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(ba) // OK
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(ca) // OK
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(da) // OK
+ foo();
+ int xa;
+#pragma omp parallel
+#pragma omp single firstprivate(xa) // OK
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(S2::S2s) // OK
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(S2::S2sc) // OK
+ foo();
+#pragma omp parallel
+#pragma omp single safelen(5) // expected-error {{unexpected OpenMP clause 'safelen' in directive '#pragma omp single'}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(e, g) // expected-error 2 {{firstprivate variable must have an accessible, unambiguous copy constructor}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(m) // OK
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
+ foo();
+#pragma omp parallel
+#pragma omp single private(xa), firstprivate(xa) // expected-error {{private variable cannot be firstprivate}} expected-note {{defined as private}}
+ foo();
+#pragma omp parallel shared(xa)
+#pragma omp single firstprivate(xa) // OK: may be firstprivate
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(j) // expected-error {{arguments of OpenMP clause 'firstprivate' cannot be of reference type}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(g) // expected-error {{firstprivate variable must have an accessible, unambiguous copy constructor}}
+ foo();
+#pragma omp parallel
+#pragma omp single firstprivate(n) // OK
+ foo();
+#pragma omp parallel
+ {
+ int v = 0;
+ int i; // expected-note {{variable with automatic storage duration is predetermined as private; perhaps you forget to enclose 'omp single' directive into a parallel or another task region?}}
+#pragma omp single firstprivate(i) // expected-error {{private variable cannot be firstprivate}}
+ foo();
+ v += i;
+ }
+#pragma omp parallel private(i) // expected-note {{defined as private}}
+#pragma omp single firstprivate(i) // expected-error {{firstprivate variable must be shared}}
+ foo();
+#pragma omp parallel reduction(+ : i) // expected-note {{defined as reduction}}
+#pragma omp single firstprivate(i) // expected-error {{firstprivate variable must be shared}}
+ foo();
+
+ return foomain<S4, S5>(argc, argv); // expected-note {{in instantiation of function template specialization 'foomain<S4, S5>' requested here}}
+}
diff --git a/test/OpenMP/single_misc_messages.c b/test/OpenMP/single_misc_messages.c
new file mode 100644
index 000000000000..7c10ca0a2887
--- /dev/null
+++ b/test/OpenMP/single_misc_messages.c
@@ -0,0 +1,156 @@
+// RUN: %clang_cc1 -fsyntax-only -fopenmp=libiomp5 -verify %s
+
+void foo();
+
+// expected-error@+1 {{unexpected OpenMP directive '#pragma omp single'}}
+#pragma omp single
+
+// expected-error@+1 {{unexpected OpenMP directive '#pragma omp single'}}
+#pragma omp single foo
+
+void test_no_clause() {
+ int i;
+#pragma omp single
+ foo();
+
+#pragma omp single
+ ++i;
+}
+
+void test_branch_protected_scope() {
+ int i = 0;
+L1:
+ ++i;
+
+ int x[24];
+
+#pragma omp parallel
+#pragma omp single
+ {
+ if (i == 5)
+ goto L1; // expected-error {{use of undeclared label 'L1'}}
+ else if (i == 6)
+ return; // expected-error {{cannot return from OpenMP region}}
+ else if (i == 7)
+ goto L2;
+ else if (i == 8) {
+ L2:
+ x[i]++;
+ }
+ }
+
+ if (x[0] == 0)
+ goto L2; // expected-error {{use of undeclared label 'L2'}}
+ else if (x[1] == 1)
+ goto L1;
+}
+
+void test_invalid_clause() {
+ int i;
+#pragma omp parallel
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp single' are ignored}}
+#pragma omp single foo bar
+ foo();
+}
+
+void test_non_identifiers() {
+ int i, x;
+
+#pragma omp parallel
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp single' are ignored}}
+#pragma omp single;
+ foo();
+#pragma omp parallel
+// expected-error@+2 {{unexpected OpenMP clause 'linear' in directive '#pragma omp single'}}
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp single' are ignored}}
+#pragma omp single linear(x);
+ foo();
+
+#pragma omp parallel
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp single' are ignored}}
+#pragma omp single private(x);
+ foo();
+
+#pragma omp parallel
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp single' are ignored}}
+#pragma omp single, private(x);
+ foo();
+}
+
+void test_private() {
+ int i;
+#pragma omp parallel
+// expected-error@+2 {{expected expression}}
+// expected-error@+1 {{expected ')'}} expected-note@+1 {{to match this '('}}
+#pragma omp single private(
+ foo();
+#pragma omp parallel
+// expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+// expected-error@+1 2 {{expected expression}}
+#pragma omp single private(,
+ foo();
+#pragma omp parallel
+// expected-error@+1 2 {{expected expression}}
+#pragma omp single private(, )
+ foo();
+#pragma omp parallel
+// expected-error@+1 {{expected expression}}
+#pragma omp single private()
+ foo();
+#pragma omp parallel
+// expected-error@+1 {{expected expression}}
+#pragma omp single private(int)
+ foo();
+#pragma omp parallel
+// expected-error@+1 {{expected variable name}}
+#pragma omp single private(0)
+ foo();
+
+ int x, y, z;
+#pragma omp parallel
+#pragma omp single private(x)
+ foo();
+#pragma omp parallel
+#pragma omp single private(x, y)
+ foo();
+#pragma omp parallel
+#pragma omp single private(x, y, z)
+ foo();
+}
+
+void test_firstprivate() {
+ int i;
+#pragma omp parallel
+// expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+// expected-error@+1 {{expected expression}}
+#pragma omp single firstprivate(
+ foo();
+
+#pragma omp parallel
+// expected-error@+2 {{expected ')'}} expected-note@+2 {{to match this '('}}
+// expected-error@+1 2 {{expected expression}}
+#pragma omp single firstprivate(,
+ foo();
+#pragma omp parallel
+// expected-error@+1 2 {{expected expression}}
+#pragma omp single firstprivate(, )
+ foo();
+#pragma omp parallel
+// expected-error@+1 {{expected expression}}
+#pragma omp single firstprivate()
+ foo();
+#pragma omp parallel
+// expected-error@+1 {{expected expression}}
+#pragma omp single firstprivate(int)
+ foo();
+#pragma omp parallel
+// expected-error@+1 {{expected variable name}}
+#pragma omp single firstprivate(0)
+ foo();
+}
+
+void test_nowait() {
+#pragma omp single nowait nowait // expected-error {{directive '#pragma omp single' cannot contain more than one 'nowait' clause}}
+ for (int i = 0; i < 16; ++i)
+ ;
+}
diff --git a/test/OpenMP/single_private_messages.cpp b/test/OpenMP/single_private_messages.cpp
new file mode 100644
index 000000000000..1414a92ee030
--- /dev/null
+++ b/test/OpenMP/single_private_messages.cpp
@@ -0,0 +1,140 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note 2 {{declared here}} expected-note 2 {{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+
+public:
+ S2() : a(0) {}
+};
+const S2 b;
+const S2 ba[5];
+class S3 {
+ int a;
+
+public:
+ S3() : a(0) {}
+};
+const S3 ca[5];
+class S4 { // expected-note {{'S4' declared here}}
+ int a;
+ S4();
+
+public:
+ S4(int v) : a(v) {}
+};
+class S5 { // expected-note {{'S5' declared here}}
+ int a;
+ S5() : a(0) {}
+
+public:
+ S5(int v) : a(v) {}
+};
+
+S3 h;
+#pragma omp threadprivate(h) // expected-note 2 {{defined as threadprivate or thread local}}
+
+template <class I, class C>
+int foomain(I argc, C **argv) {
+ I e(4);
+ I g(5);
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp single private // expected-error {{expected '(' after 'private'}}
+ foo();
+#pragma omp single private( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+#pragma omp single private() // expected-error {{expected expression}}
+ foo();
+#pragma omp single private(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+#pragma omp single private(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+#pragma omp single private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ foo();
+#pragma omp single private(argc)
+ foo();
+#pragma omp single private(S1) // expected-error {{'S1' does not refer to a value}}
+ foo();
+#pragma omp single private(a, b) // expected-error {{private variable with incomplete type 'S1'}}
+ foo();
+#pragma omp single private(argv[1]) // expected-error {{expected variable name}}
+ foo();
+#pragma omp single private(e, g)
+ foo();
+#pragma omp single private(h) // expected-error {{threadprivate or thread local variable cannot be private}}
+ foo();
+#pragma omp single shared(i) // expected-error {{unexpected OpenMP clause 'shared' in directive '#pragma omp single'}}
+ foo();
+#pragma omp parallel
+ {
+ int v = 0;
+ int i;
+#pragma omp single private(i)
+ foo();
+ v += i;
+ }
+#pragma omp parallel shared(i)
+#pragma omp parallel private(i)
+#pragma omp single private(j) // expected-error {{arguments of OpenMP clause 'private' cannot be of reference type}}
+ foo();
+#pragma omp single private(i)
+ foo();
+ return 0;
+}
+
+int main(int argc, char **argv) {
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note {{'g' defined here}}
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp single private // expected-error {{expected '(' after 'private'}}
+ foo();
+#pragma omp single private( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+#pragma omp single private() // expected-error {{expected expression}}
+ foo();
+#pragma omp single private(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+#pragma omp single private(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+#pragma omp single private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ foo();
+#pragma omp single private(argc)
+ foo();
+#pragma omp single private(S1) // expected-error {{'S1' does not refer to a value}}
+ foo();
+#pragma omp single private(a, b) // expected-error {{private variable with incomplete type 'S1'}}
+ foo();
+#pragma omp single private(argv[1]) // expected-error {{expected variable name}}
+ foo();
+#pragma omp single private(e, g) // expected-error 2 {{private variable must have an accessible, unambiguous default constructor}}
+ foo();
+#pragma omp single private(h) // expected-error {{threadprivate or thread local variable cannot be private}}
+ foo();
+#pragma omp single shared(i) // expected-error {{unexpected OpenMP clause 'shared' in directive '#pragma omp single'}}
+ foo();
+#pragma omp parallel
+ {
+ int i;
+#pragma omp single private(i)
+ foo();
+ }
+#pragma omp parallel shared(i)
+#pragma omp parallel private(i)
+#pragma omp single private(j) // expected-error {{arguments of OpenMP clause 'private' cannot be of reference type}}
+ foo();
+#pragma omp single private(i)
+ foo();
+
+ return 0;
+}
+
diff --git a/test/OpenMP/task_ast_print.cpp b/test/OpenMP/task_ast_print.cpp
new file mode 100644
index 000000000000..2b43c0b0896d
--- /dev/null
+++ b/test/OpenMP/task_ast_print.cpp
@@ -0,0 +1,96 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ast-print %s | FileCheck %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -emit-pch -o %t %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
+// expected-no-diagnostics
+
+#ifndef HEADER
+#define HEADER
+
+void foo() {}
+
+template <class T>
+struct S {
+ operator T() { return T(); }
+ static T TS;
+#pragma omp threadprivate(TS)
+};
+
+// CHECK: template <class T = int> struct S {
+// CHECK: static int TS;
+// CHECK-NEXT: #pragma omp threadprivate(S<int>::TS)
+// CHECK-NEXT: }
+// CHECK: template <class T = long> struct S {
+// CHECK: static long TS;
+// CHECK-NEXT: #pragma omp threadprivate(S<long>::TS)
+// CHECK-NEXT: }
+// CHECK: template <class T> struct S {
+// CHECK: static T TS;
+// CHECK-NEXT: #pragma omp threadprivate(S::TS)
+// CHECK: };
+
+template <typename T, int C>
+T tmain(T argc, T *argv) {
+ T b = argc, c, d, e, f, g;
+ static T a;
+ S<T> s;
+#pragma omp task untied
+ a = 2;
+#pragma omp task default(none), private(argc, b) firstprivate(argv) shared(d) if (argc > 0) final(S<T>::TS > 0)
+ foo();
+#pragma omp task if (C) mergeable
+ foo();
+ return 0;
+}
+
+// CHECK: template <typename T = int, int C = 5> int tmain(int argc, int *argv) {
+// CHECK-NEXT: int b = argc, c, d, e, f, g;
+// CHECK-NEXT: static int a;
+// CHECK-NEXT: S<int> s;
+// CHECK-NEXT: #pragma omp task untied
+// CHECK-NEXT: a = 2;
+// CHECK-NEXT: #pragma omp task default(none) private(argc,b) firstprivate(argv) shared(d) if(argc > 0) final(S<int>::TS > 0)
+// CHECK-NEXT: foo()
+// CHECK-NEXT: #pragma omp task if(5) mergeable
+// CHECK-NEXT: foo()
+// CHECK: template <typename T = long, int C = 1> long tmain(long argc, long *argv) {
+// CHECK-NEXT: long b = argc, c, d, e, f, g;
+// CHECK-NEXT: static long a;
+// CHECK-NEXT: S<long> s;
+// CHECK-NEXT: #pragma omp task untied
+// CHECK-NEXT: a = 2;
+// CHECK-NEXT: #pragma omp task default(none) private(argc,b) firstprivate(argv) shared(d) if(argc > 0) final(S<long>::TS > 0)
+// CHECK-NEXT: foo()
+// CHECK-NEXT: #pragma omp task if(1) mergeable
+// CHECK-NEXT: foo()
+// CHECK: template <typename T, int C> T tmain(T argc, T *argv) {
+// CHECK-NEXT: T b = argc, c, d, e, f, g;
+// CHECK-NEXT: static T a;
+// CHECK-NEXT: S<T> s;
+// CHECK-NEXT: #pragma omp task untied
+// CHECK-NEXT: a = 2;
+// CHECK-NEXT: #pragma omp task default(none) private(argc,b) firstprivate(argv) shared(d) if(argc > 0) final(S<T>::TS > 0)
+// CHECK-NEXT: foo()
+// CHECK-NEXT: #pragma omp task if(C) mergeable
+// CHECK-NEXT: foo()
+
+enum Enum {};
+
+int main(int argc, char **argv) {
+ long x;
+ int b = argc, c, d, e, f, g;
+ static int a;
+#pragma omp threadprivate(a)
+ Enum ee;
+// CHECK: Enum ee;
+#pragma omp task untied mergeable
+ // CHECK-NEXT: #pragma omp task untied mergeable
+ a = 2;
+// CHECK-NEXT: a = 2;
+#pragma omp task default(none), private(argc, b) firstprivate(argv) if (argc > 0) final(a > 0)
+ // CHECK-NEXT: #pragma omp task default(none) private(argc,b) firstprivate(argv) if(argc > 0) final(a > 0)
+ foo();
+ // CHECK-NEXT: foo();
+ return tmain<int, 5>(b, &b) + tmain<long, 1>(x, &x);
+}
+
+#endif
diff --git a/test/OpenMP/task_default_messages.cpp b/test/OpenMP/task_default_messages.cpp
new file mode 100644
index 000000000000..8da6b1aeea17
--- /dev/null
+++ b/test/OpenMP/task_default_messages.cpp
@@ -0,0 +1,21 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -o - %s
+
+void foo();
+
+int main(int argc, char **argv) {
+#pragma omp task default // expected-error {{expected '(' after 'default'}}
+#pragma omp task default( // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+#pragma omp task default() // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}}
+#pragma omp task default(none // expected-error {{expected ')'}} expected-note {{to match this '('}}
+#pragma omp task default(shared), default(shared) // expected-error {{directive '#pragma omp task' cannot contain more than one 'default' clause}}
+#pragma omp task default(x) // expected-error {{expected 'none' or 'shared' in OpenMP clause 'default'}}
+ foo();
+
+#pragma omp task default(none)
+ ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
+
+#pragma omp task default(none)
+#pragma omp task default(shared)
+ ++argc;
+ return 0;
+}
diff --git a/test/OpenMP/task_final_messages.cpp b/test/OpenMP/task_final_messages.cpp
new file mode 100644
index 000000000000..0b52e6aca150
--- /dev/null
+++ b/test/OpenMP/task_final_messages.cpp
@@ -0,0 +1,46 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}}
+
+template <class T, class S> // expected-note {{declared here}}
+int tmain(T argc, S **argv) {
+ #pragma omp task final // expected-error {{expected '(' after 'final'}}
+ #pragma omp task final ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task final () // expected-error {{expected expression}}
+ #pragma omp task final (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task final (argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
+ #pragma omp task final (argc > 0 ? argv[1] : argv[2])
+ #pragma omp task final (foobool(argc)), final (true) // expected-error {{directive '#pragma omp task' cannot contain more than one 'final' clause}}
+ #pragma omp task final (S) // expected-error {{'S' does not refer to a value}}
+ #pragma omp task final (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task final (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task final(argc)
+ foo();
+
+ return 0;
+}
+
+int main(int argc, char **argv) {
+ #pragma omp task final // expected-error {{expected '(' after 'final'}}
+ #pragma omp task final ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task final () // expected-error {{expected expression}}
+ #pragma omp task final (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task final (argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
+ #pragma omp task final (argc > 0 ? argv[1] : argv[2])
+ #pragma omp task final (foobool(argc)), final (true) // expected-error {{directive '#pragma omp task' cannot contain more than one 'final' clause}}
+ #pragma omp task final (S1) // expected-error {{'S1' does not refer to a value}}
+ #pragma omp task final (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task final (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task final (1 0) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task final(if(tmain(argc, argv) // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+
+ return tmain(argc, argv);
+}
diff --git a/test/OpenMP/task_firstprivate_messages.cpp b/test/OpenMP/task_firstprivate_messages.cpp
new file mode 100644
index 000000000000..85d3f9f46144
--- /dev/null
+++ b/test/OpenMP/task_firstprivate_messages.cpp
@@ -0,0 +1,86 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}} expected-note{{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+
+public:
+ S2() : a(0) {}
+ S2(S2 &s2) : a(s2.a) {}
+ static float S2s;
+ static const float S2sc;
+};
+const float S2::S2sc = 0;
+const S2 b;
+const S2 ba[5];
+class S3 {
+ int a;
+
+public:
+ S3() : a(0) {}
+ S3(S3 &s3) : a(s3.a) {}
+};
+const S3 c;
+const S3 ca[5];
+extern const int f;
+class S4 { // expected-note {{'S4' declared here}}
+ int a;
+ S4();
+ S4(const S4 &s4);
+
+public:
+ S4(int v) : a(v) {}
+};
+class S5 { // expected-note {{'S5' declared here}}
+ int a;
+ S5() : a(0) {}
+ S5(const S5 &s5) : a(s5.a) {}
+
+public:
+ S5(int v) : a(v) {}
+};
+
+S3 h;
+#pragma omp threadprivate(h) // expected-note {{defined as threadprivate or thread local}}
+
+int main(int argc, char **argv) {
+ const int d = 5;
+ const int da[5] = {0};
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note {{'g' defined here}}
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp task firstprivate // expected-error {{expected '(' after 'firstprivate'}}
+#pragma omp task firstprivate( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+#pragma omp task firstprivate() // expected-error {{expected expression}}
+#pragma omp task firstprivate(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+#pragma omp task firstprivate(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+#pragma omp task firstprivate(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+#pragma omp task firstprivate(argc)
+#pragma omp task firstprivate(S1) // expected-error {{'S1' does not refer to a value}}
+#pragma omp task firstprivate(a, b, c, d, f) // expected-error {{firstprivate variable with incomplete type 'S1'}}
+#pragma omp task firstprivate(argv[1]) // expected-error {{expected variable name}}
+#pragma omp task firstprivate(ba)
+#pragma omp task firstprivate(ca)
+#pragma omp task firstprivate(da)
+#pragma omp task firstprivate(S2::S2s)
+#pragma omp task firstprivate(S2::S2sc)
+#pragma omp task firstprivate(e, g) // expected-error 2 {{firstprivate variable must have an accessible, unambiguous copy constructor}}
+#pragma omp task firstprivate(h) // expected-error {{threadprivate or thread local variable cannot be firstprivate}}
+#pragma omp task private(i), firstprivate(i) // expected-error {{private variable cannot be firstprivate}} expected-note{{defined as private}}
+ foo();
+#pragma omp task shared(i)
+#pragma omp task firstprivate(i)
+#pragma omp task firstprivate(j) // expected-error {{arguments of OpenMP clause 'firstprivate' cannot be of reference type}}
+ foo();
+
+ return 0;
+}
diff --git a/test/OpenMP/task_if_messages.cpp b/test/OpenMP/task_if_messages.cpp
new file mode 100644
index 000000000000..51900c0be2e5
--- /dev/null
+++ b/test/OpenMP/task_if_messages.cpp
@@ -0,0 +1,46 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}}
+
+template <class T, class S> // expected-note {{declared here}}
+int tmain(T argc, S **argv) {
+ #pragma omp task if // expected-error {{expected '(' after 'if'}}
+ #pragma omp task if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task if () // expected-error {{expected expression}}
+ #pragma omp task if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
+ #pragma omp task if (argc > 0 ? argv[1] : argv[2])
+ #pragma omp task if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp task' cannot contain more than one 'if' clause}}
+ #pragma omp task if (S) // expected-error {{'S' does not refer to a value}}
+ #pragma omp task if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task if(argc)
+ foo();
+
+ return 0;
+}
+
+int main(int argc, char **argv) {
+ #pragma omp task if // expected-error {{expected '(' after 'if'}}
+ #pragma omp task if ( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task if () // expected-error {{expected expression}}
+ #pragma omp task if (argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task if (argc)) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
+ #pragma omp task if (argc > 0 ? argv[1] : argv[2])
+ #pragma omp task if (foobool(argc)), if (true) // expected-error {{directive '#pragma omp task' cannot contain more than one 'if' clause}}
+ #pragma omp task if (S1) // expected-error {{'S1' does not refer to a value}}
+ #pragma omp task if (argv[1]=2) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task if (argc argc) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task if (1 0) // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ #pragma omp task if(if(tmain(argc, argv) // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+
+ return tmain(argc, argv);
+}
diff --git a/test/OpenMP/task_messages.cpp b/test/OpenMP/task_messages.cpp
new file mode 100644
index 000000000000..88c339afc117
--- /dev/null
+++ b/test/OpenMP/task_messages.cpp
@@ -0,0 +1,275 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 -std=c++11 -o - %s
+
+void foo() {
+}
+
+#pragma omp task // expected-error {{unexpected OpenMP directive '#pragma omp task'}}
+
+class S { // expected-note 6 {{'S' declared here}}
+ S(const S &s) { a = s.a + 12; }
+ int a;
+
+public:
+ S() : a(0) {}
+ S(int a) : a(a) {}
+ operator int() { return a; }
+ S &operator++() { return *this; }
+ S operator+(const S &) { return *this; }
+};
+
+template <class T>
+int foo() {
+ T a; // expected-note 3 {{'a' defined here}}
+ T &b = a; // expected-note 4 {{'b' defined here}}
+ int r;
+#pragma omp task default(none)
+#pragma omp task default(shared)
+ ++a;
+// expected-error@+2 {{predetermined as a firstprivate in a task construct variable must have an accessible, unambiguous copy constructor}}
+#pragma omp task default(none)
+#pragma omp task
+// expected-note@+1 {{used here}}
+ ++a;
+#pragma omp task
+// expected-error@+1 {{predetermined as a firstprivate in a task construct variable must have an accessible, unambiguous copy constructor}}
+#pragma omp task
+ // expected-note@+1 {{used here}}
+ ++a;
+#pragma omp task default(shared)
+#pragma omp task
+ ++a;
+#pragma omp task
+#pragma omp parallel
+ ++a;
+// expected-error@+2 {{predetermined as a firstprivate in a task construct variable cannot be of reference type 'int &'}}
+// expected-error@+1 {{predetermined as a firstprivate in a task construct variable cannot be of reference type 'S &'}}
+#pragma omp task
+ // expected-note@+1 2 {{used here}}
+ ++b;
+// expected-error@+3 {{predetermined as a firstprivate in a task construct variable cannot be of reference type 'int &'}}
+// expected-error@+2 {{predetermined as a firstprivate in a task construct variable cannot be of reference type 'S &'}}
+// expected-error@+1 {{predetermined as a firstprivate in a task construct variable must have an accessible, unambiguous copy constructor}}
+#pragma omp task
+// expected-note@+1 3 {{used here}}
+#pragma omp parallel shared(a, b)
+ ++a, ++b;
+// expected-note@+1 3 {{defined as reduction}}
+#pragma omp parallel reduction(+ : r)
+// expected-error@+1 {{argument of a reduction clause of a parallel construct must not appear in a firstprivate clause on a task construct}}
+#pragma omp task firstprivate(r)
+ // expected-error@+1 2 {{reduction variables may not be accessed in an explicit task}}
+ ++r;
+// expected-note@+1 2 {{defined as reduction}}
+#pragma omp parallel reduction(+ : r)
+#pragma omp task default(shared)
+ // expected-error@+1 2 {{reduction variables may not be accessed in an explicit task}}
+ ++r;
+// expected-note@+1 2 {{defined as reduction}}
+#pragma omp parallel reduction(+ : r)
+#pragma omp task
+ // expected-error@+1 2 {{reduction variables may not be accessed in an explicit task}}
+ ++r;
+#pragma omp parallel
+// expected-note@+1 3 {{defined as reduction}}
+#pragma omp for reduction(+ : r)
+ for (int i = 0; i < 10; ++i)
+// expected-error@+1 {{argument of a reduction clause of a for construct must not appear in a firstprivate clause on a task construct}}
+#pragma omp task firstprivate(r)
+ // expected-error@+1 2 {{reduction variables may not be accessed in an explicit task}}
+ ++r;
+#pragma omp parallel
+// expected-note@+1 2 {{defined as reduction}}
+#pragma omp for reduction(+ : r)
+ for (int i = 0; i < 10; ++i)
+#pragma omp task default(shared)
+ // expected-error@+1 2 {{reduction variables may not be accessed in an explicit task}}
+ ++r;
+#pragma omp parallel
+// expected-note@+1 2 {{defined as reduction}}
+#pragma omp for reduction(+ : r)
+ for (int i = 0; i < 10; ++i)
+#pragma omp task
+ // expected-error@+1 2 {{reduction variables may not be accessed in an explicit task}}
+ ++r;
+// expected-note@+1 {{non-shared variable in a task construct is predetermined as firstprivate}}
+#pragma omp task
+// expected-error@+2 {{reduction variable must be shared}}
+// expected-error@+1 {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
+#pragma omp for reduction(+ : r)
+ ++r;
+// expected-error@+1 {{directive '#pragma omp task' cannot contain more than one 'untied' clause}}
+#pragma omp task untied untied
+ ++r;
+// expected-error@+1 {{directive '#pragma omp task' cannot contain more than one 'mergeable' clause}}
+#pragma omp task mergeable mergeable
+ ++r;
+ return a + b;
+}
+
+int main(int argc, char **argv) {
+ int a;
+ int &b = a; // expected-note 2 {{'b' defined here}}
+ S sa; // expected-note 3 {{'sa' defined here}}
+ S &sb = sa; // expected-note 2 {{'sb' defined here}}
+ int r;
+#pragma omp task { // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
+ foo();
+#pragma omp task( // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
+ foo();
+#pragma omp task[ // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
+ foo();
+#pragma omp task] // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
+ foo();
+#pragma omp task) // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
+ foo();
+#pragma omp task } // expected-warning {{extra tokens at the end of '#pragma omp task' are ignored}}
+ foo();
+#pragma omp task
+// expected-warning@+1 {{extra tokens at the end of '#pragma omp task' are ignored}}
+#pragma omp task unknown()
+ foo();
+L1:
+ foo();
+#pragma omp task
+ ;
+#pragma omp task
+ {
+ goto L1; // expected-error {{use of undeclared label 'L1'}}
+ argc++;
+ }
+
+ for (int i = 0; i < 10; ++i) {
+ switch (argc) {
+ case (0):
+#pragma omp task
+ {
+ foo();
+ break; // expected-error {{'break' statement not in loop or switch statement}}
+ continue; // expected-error {{'continue' statement not in loop statement}}
+ }
+ default:
+ break;
+ }
+ }
+#pragma omp task default(none)
+ ++argc; // expected-error {{variable 'argc' must have explicitly specified data sharing attributes}}
+
+ goto L2; // expected-error {{use of undeclared label 'L2'}}
+#pragma omp task
+L2:
+ foo();
+#pragma omp task
+ {
+ return 1; // expected-error {{cannot return from OpenMP region}}
+ }
+
+ [[]] // expected-error {{an attribute list cannot appear here}}
+#pragma omp task
+ for (int n = 0; n < 100; ++n) {
+ }
+
+#pragma omp task default(none)
+#pragma omp task default(shared)
+ ++a;
+#pragma omp task default(none)
+#pragma omp task
+ ++a;
+#pragma omp task default(shared)
+#pragma omp task
+ ++a;
+#pragma omp task
+#pragma omp parallel
+ ++a;
+// expected-error@+1 {{predetermined as a firstprivate in a task construct variable cannot be of reference type 'int &'}}
+#pragma omp task
+ // expected-note@+1 {{used here}}
+ ++b;
+// expected-error@+1 {{predetermined as a firstprivate in a task construct variable cannot be of reference type 'int &'}}
+#pragma omp task
+// expected-note@+1 {{used here}}
+#pragma omp parallel shared(a, b)
+ ++a, ++b;
+#pragma omp task default(none)
+#pragma omp task default(shared)
+ ++sa;
+#pragma omp task default(none)
+// expected-error@+1 {{predetermined as a firstprivate in a task construct variable must have an accessible, unambiguous copy constructor}}
+#pragma omp task
+// expected-note@+1 {{used here}}
+ ++sa;
+#pragma omp task
+// expected-error@+1 {{predetermined as a firstprivate in a task construct variable must have an accessible, unambiguous copy constructor}}
+#pragma omp task
+// expected-note@+1 {{used here}}
+ ++sa;
+#pragma omp task default(shared)
+#pragma omp task
+ ++sa;
+#pragma omp task
+#pragma omp parallel
+ ++sa;
+// expected-error@+1 {{predetermined as a firstprivate in a task construct variable cannot be of reference type 'S &'}}
+#pragma omp task
+ // expected-note@+1 {{used here}}
+ ++sb;
+// expected-error@+2 {{predetermined as a firstprivate in a task construct variable cannot be of reference type 'S &'}}
+// expected-error@+1 {{predetermined as a firstprivate in a task construct variable must have an accessible, unambiguous copy constructor}}
+#pragma omp task
+// expected-note@+1 2 {{used here}}
+#pragma omp parallel shared(sa, sb)
+ ++sa, ++sb;
+// expected-note@+1 2 {{defined as reduction}}
+#pragma omp parallel reduction(+ : r)
+// expected-error@+1 {{argument of a reduction clause of a parallel construct must not appear in a firstprivate clause on a task construct}}
+#pragma omp task firstprivate(r)
+ // expected-error@+1 {{reduction variables may not be accessed in an explicit task}}
+ ++r;
+// expected-note@+1 {{defined as reduction}}
+#pragma omp parallel reduction(+ : r)
+#pragma omp task default(shared)
+ // expected-error@+1 {{reduction variables may not be accessed in an explicit task}}
+ ++r;
+// expected-note@+1 {{defined as reduction}}
+#pragma omp parallel reduction(+ : r)
+#pragma omp task
+ // expected-error@+1 {{reduction variables may not be accessed in an explicit task}}
+ ++r;
+#pragma omp parallel
+// expected-note@+1 2 {{defined as reduction}}
+#pragma omp for reduction(+ : r)
+ for (int i = 0; i < 10; ++i)
+// expected-error@+1 {{argument of a reduction clause of a for construct must not appear in a firstprivate clause on a task construct}}
+#pragma omp task firstprivate(r)
+ // expected-error@+1 {{reduction variables may not be accessed in an explicit task}}
+ ++r;
+#pragma omp parallel
+// expected-note@+1 {{defined as reduction}}
+#pragma omp for reduction(+ : r)
+ for (int i = 0; i < 10; ++i)
+#pragma omp task default(shared)
+ // expected-error@+1 {{reduction variables may not be accessed in an explicit task}}
+ ++r;
+#pragma omp parallel
+// expected-note@+1 {{defined as reduction}}
+#pragma omp for reduction(+ : r)
+ for (int i = 0; i < 10; ++i)
+#pragma omp task
+ // expected-error@+1 {{reduction variables may not be accessed in an explicit task}}
+ ++r;
+// expected-note@+1 {{non-shared variable in a task construct is predetermined as firstprivate}}
+#pragma omp task
+// expected-error@+2 {{reduction variable must be shared}}
+// expected-error@+1 {{region cannot be closely nested inside 'task' region; perhaps you forget to enclose 'omp for' directive into a parallel region?}}
+#pragma omp for reduction(+ : r)
+ ++r;
+// expected-error@+1 {{directive '#pragma omp task' cannot contain more than one 'untied' clause}}
+#pragma omp task untied untied
+ ++r;
+// expected-error@+1 {{directive '#pragma omp task' cannot contain more than one 'mergeable' clause}}
+#pragma omp task mergeable mergeable
+ ++r;
+ // expected-note@+2 {{in instantiation of function template specialization 'foo<int>' requested here}}
+ // expected-note@+1 {{in instantiation of function template specialization 'foo<S>' requested here}}
+ return foo<int>() + foo<S>();
+}
+
diff --git a/test/OpenMP/task_private_messages.cpp b/test/OpenMP/task_private_messages.cpp
new file mode 100644
index 000000000000..0be238dd90c4
--- /dev/null
+++ b/test/OpenMP/task_private_messages.cpp
@@ -0,0 +1,85 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}} expected-note{{forward declaration of 'S1'}}
+extern S1 a;
+class S2 {
+ mutable int a;
+
+public:
+ S2() : a(0) {}
+ static float S2s; // expected-note {{static data member is predetermined as shared}}
+};
+const S2 b;
+const S2 ba[5];
+class S3 {
+ int a;
+
+public:
+ S3() : a(0) {}
+};
+const S3 c; // expected-note {{global variable is predetermined as shared}}
+const S3 ca[5]; // expected-note {{global variable is predetermined as shared}}
+extern const int f; // expected-note {{global variable is predetermined as shared}}
+class S4 { // expected-note {{'S4' declared here}}
+ int a;
+ S4();
+
+public:
+ S4(int v) : a(v) {}
+};
+class S5 { // expected-note {{'S5' declared here}}
+ int a;
+ S5() : a(0) {}
+
+public:
+ S5(int v) : a(v) {}
+};
+
+int threadvar;
+#pragma omp threadprivate(threadvar) // expected-note {{defined as threadprivate or thread local}}
+
+int main(int argc, char **argv) {
+ const int d = 5; // expected-note {{constant variable is predetermined as shared}}
+ const int da[5] = {0}; // expected-note {{constant variable is predetermined as shared}}
+ S4 e(4); // expected-note {{'e' defined here}}
+ S5 g(5); // expected-note {{'g' defined here}}
+ int i;
+ int &j = i; // expected-note {{'j' defined here}}
+#pragma omp task private // expected-error {{expected '(' after 'private'}}
+#pragma omp task private( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+#pragma omp task private() // expected-error {{expected expression}}
+#pragma omp task private(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+#pragma omp task private(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+#pragma omp task private(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+#pragma omp task private(argc argv) // expected-error {{expected ',' or ')' in 'private' clause}}
+#pragma omp task private(S1) // expected-error {{'S1' does not refer to a value}}
+#pragma omp task private(a, b, c, d, f) // expected-error {{a private variable with incomplete type 'S1'}} expected-error 3 {{shared variable cannot be private}}
+#pragma omp task private(argv[1]) // expected-error {{expected variable name}}
+#pragma omp task private(ba)
+#pragma omp task private(ca) // expected-error {{shared variable cannot be private}}
+#pragma omp task private(da) // expected-error {{shared variable cannot be private}}
+#pragma omp task private(S2::S2s) // expected-error {{shared variable cannot be private}}
+#pragma omp task private(e, g) // expected-error 2 {{private variable must have an accessible, unambiguous default constructor}}
+#pragma omp task private(threadvar) // expected-error {{threadprivate or thread local variable cannot be private}}
+#pragma omp task shared(i), private(i) // expected-error {{shared variable cannot be private}} expected-note {{defined as shared}}
+ foo();
+#pragma omp task firstprivate(i) private(i) // expected-error {{firstprivate variable cannot be private}} expected-note {{defined as firstprivate}}
+ foo();
+#pragma omp task private(i)
+#pragma omp task private(j) // expected-error {{arguments of OpenMP clause 'private' cannot be of reference type 'int &'}}
+ foo();
+#pragma omp task firstprivate(i)
+ for (int k = 0; k < 10; ++k) {
+#pragma omp task private(i)
+ foo();
+ }
+
+ return 0;
+}
diff --git a/test/OpenMP/task_shared_messages.cpp b/test/OpenMP/task_shared_messages.cpp
new file mode 100644
index 000000000000..747923721b9a
--- /dev/null
+++ b/test/OpenMP/task_shared_messages.cpp
@@ -0,0 +1,102 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s
+
+void foo() {
+}
+
+bool foobool(int argc) {
+ return argc;
+}
+
+struct S1; // expected-note {{declared here}}
+extern S1 a;
+class S2 {
+ mutable int a;
+
+public:
+ S2() : a(0) {}
+ S2(S2 &s2) : a(s2.a) {}
+};
+const S2 b;
+const S2 ba[5];
+class S3 {
+ int a;
+
+public:
+ S3() : a(0) {}
+ S3(S3 &s3) : a(s3.a) {}
+};
+const S3 c;
+const S3 ca[5];
+extern const int f;
+class S4 {
+ int a;
+ S4();
+ S4(const S4 &s4);
+
+public:
+ S4(int v) : a(v) {}
+};
+class S5 {
+ int a;
+ S5() : a(0) {}
+ S5(const S5 &s5) : a(s5.a) {}
+
+public:
+ S5(int v) : a(v) {}
+};
+
+S3 h;
+#pragma omp threadprivate(h) // expected-note {{defined as threadprivate or thread local}}
+
+int main(int argc, char **argv) {
+ const int d = 5;
+ const int da[5] = {0};
+ S4 e(4);
+ S5 g(5);
+ int i;
+ int &j = i;
+#pragma omp task shared // expected-error {{expected '(' after 'shared'}}
+ foo();
+#pragma omp task shared( // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+#pragma omp task shared() // expected-error {{expected expression}}
+ foo();
+#pragma omp task shared(argc // expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+#pragma omp task shared(argc, // expected-error {{expected expression}} expected-error {{expected ')'}} expected-note {{to match this '('}}
+ foo();
+#pragma omp task shared(argc > 0 ? argv[1] : argv[2]) // expected-error {{expected variable name}}
+ foo();
+#pragma omp task shared(argc)
+ foo();
+#pragma omp task shared(S1) // expected-error {{'S1' does not refer to a value}}
+ foo();
+#pragma omp task shared(a, b, c, d, f)
+ foo();
+#pragma omp task shared(argv[1]) // expected-error {{expected variable name}}
+ foo();
+#pragma omp task shared(ba)
+ foo();
+#pragma omp task shared(ca)
+ foo();
+#pragma omp task shared(da)
+ foo();
+#pragma omp task shared(e, g)
+ foo();
+#pragma omp task shared(h) // expected-error {{threadprivate or thread local variable cannot be shared}}
+ foo();
+#pragma omp task private(i), shared(i) // expected-error {{private variable cannot be shared}} expected-note {{defined as private}}
+ foo();
+#pragma omp task firstprivate(i), shared(i) // expected-error {{firstprivate variable cannot be shared}} expected-note {{defined as firstprivate}}
+ foo();
+#pragma omp parallel private(i)
+#pragma omp task shared(i)
+#pragma omp task shared(j)
+ foo();
+#pragma omp parallel firstprivate(i)
+#pragma omp task shared(i)
+#pragma omp task shared(j)
+ foo();
+
+ return 0;
+}
diff --git a/test/OpenMP/taskwait_ast_print.cpp b/test/OpenMP/taskwait_ast_print.cpp
new file mode 100644
index 000000000000..994262242eb7
--- /dev/null
+++ b/test/OpenMP/taskwait_ast_print.cpp
@@ -0,0 +1,32 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ast-print %s | FileCheck %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -emit-pch -o %t %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
+// expected-no-diagnostics
+
+#ifndef HEADER
+#define HEADER
+
+void foo() {}
+
+template <class T>
+T tmain(T argc) {
+ static T a;
+#pragma omp taskwait
+ return a + argc;
+}
+// CHECK: static int a;
+// CHECK-NEXT: #pragma omp taskwait
+// CHECK: static char a;
+// CHECK-NEXT: #pragma omp taskwait
+// CHECK: static T a;
+// CHECK-NEXT: #pragma omp taskwait
+
+int main(int argc, char **argv) {
+ static int a;
+// CHECK: static int a;
+#pragma omp taskwait
+ // CHECK-NEXT: #pragma omp taskwait
+ return tmain(argc) + tmain(argv[0][0]) + a;
+}
+
+#endif
diff --git a/test/OpenMP/taskwait_messages.cpp b/test/OpenMP/taskwait_messages.cpp
new file mode 100644
index 000000000000..f325c7328372
--- /dev/null
+++ b/test/OpenMP/taskwait_messages.cpp
@@ -0,0 +1,110 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s
+
+template <class T>
+T tmain(T argc) {
+#pragma omp taskwait
+ ;
+#pragma omp taskwait untied // expected-error {{unexpected OpenMP clause 'untied' in directive '#pragma omp taskwait'}}
+#pragma omp taskwait unknown // expected-warning {{extra tokens at the end of '#pragma omp taskwait' are ignored}}
+ if (argc)
+#pragma omp taskwait // expected-error {{'#pragma omp taskwait' cannot be an immediate substatement}}
+ if (argc) {
+#pragma omp taskwait
+ }
+ while (argc)
+#pragma omp taskwait // expected-error {{'#pragma omp taskwait' cannot be an immediate substatement}}
+ while (argc) {
+#pragma omp taskwait
+ }
+ do
+#pragma omp taskwait // expected-error {{'#pragma omp taskwait' cannot be an immediate substatement}}
+ while (argc)
+ ;
+ do {
+#pragma omp taskwait
+ } while (argc);
+ switch (argc)
+#pragma omp taskwait // expected-error {{'#pragma omp taskwait' cannot be an immediate substatement}}
+ switch (argc)
+ case 1:
+#pragma omp taskwait // expected-error {{'#pragma omp taskwait' cannot be an immediate substatement}}
+ switch (argc)
+ case 1: {
+#pragma omp taskwait
+ }
+ switch (argc) {
+#pragma omp taskwait
+ case 1:
+#pragma omp taskwait // expected-error {{'#pragma omp taskwait' cannot be an immediate substatement}}
+ break;
+ default: {
+#pragma omp taskwait
+ } break;
+ }
+ for (;;)
+#pragma omp taskwait // expected-error {{'#pragma omp taskwait' cannot be an immediate substatement}}
+ for (;;) {
+#pragma omp taskwait
+ }
+label:
+#pragma omp taskwait // expected-error {{'#pragma omp taskwait' cannot be an immediate substatement}}
+label1 : {
+#pragma omp taskwait
+}
+
+ return T();
+}
+
+int main(int argc, char **argv) {
+#pragma omp taskwait
+ ;
+#pragma omp taskwait untied // expected-error {{unexpected OpenMP clause 'untied' in directive '#pragma omp taskwait'}}
+#pragma omp taskwait unknown // expected-warning {{extra tokens at the end of '#pragma omp taskwait' are ignored}}
+ if (argc)
+#pragma omp taskwait // expected-error {{'#pragma omp taskwait' cannot be an immediate substatement}}
+ if (argc) {
+#pragma omp taskwait
+ }
+ while (argc)
+#pragma omp taskwait // expected-error {{'#pragma omp taskwait' cannot be an immediate substatement}}
+ while (argc) {
+#pragma omp taskwait
+ }
+ do
+#pragma omp taskwait // expected-error {{'#pragma omp taskwait' cannot be an immediate substatement}}
+ while (argc)
+ ;
+ do {
+#pragma omp taskwait
+ } while (argc);
+ switch (argc)
+#pragma omp taskwait // expected-error {{'#pragma omp taskwait' cannot be an immediate substatement}}
+ switch (argc)
+ case 1:
+#pragma omp taskwait // expected-error {{'#pragma omp taskwait' cannot be an immediate substatement}}
+ switch (argc)
+ case 1: {
+#pragma omp taskwait
+ }
+ switch (argc) {
+#pragma omp taskwait
+ case 1:
+#pragma omp taskwait // expected-error {{'#pragma omp taskwait' cannot be an immediate substatement}}
+ break;
+ default: {
+#pragma omp taskwait
+ } break;
+ }
+ for (;;)
+#pragma omp taskwait // expected-error {{'#pragma omp taskwait' cannot be an immediate substatement}}
+ for (;;) {
+#pragma omp taskwait
+ }
+label:
+#pragma omp taskwait // expected-error {{'#pragma omp taskwait' cannot be an immediate substatement}}
+label1 : {
+#pragma omp taskwait
+}
+
+ return tmain(argc);
+}
diff --git a/test/OpenMP/taskyield_ast_print.cpp b/test/OpenMP/taskyield_ast_print.cpp
new file mode 100644
index 000000000000..4c3ca47cba45
--- /dev/null
+++ b/test/OpenMP/taskyield_ast_print.cpp
@@ -0,0 +1,32 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ast-print %s | FileCheck %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -emit-pch -o %t %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s
+// expected-no-diagnostics
+
+#ifndef HEADER
+#define HEADER
+
+void foo() {}
+
+template <class T>
+T tmain(T argc) {
+ static T a;
+#pragma omp taskyield
+ return a + argc;
+}
+// CHECK: static int a;
+// CHECK-NEXT: #pragma omp taskyield
+// CHECK: static char a;
+// CHECK-NEXT: #pragma omp taskyield
+// CHECK: static T a;
+// CHECK-NEXT: #pragma omp taskyield
+
+int main(int argc, char **argv) {
+ static int a;
+// CHECK: static int a;
+#pragma omp taskyield
+ // CHECK-NEXT: #pragma omp taskyield
+ return tmain(argc) + tmain(argv[0][0]) + a;
+}
+
+#endif
diff --git a/test/OpenMP/taskyield_messages.cpp b/test/OpenMP/taskyield_messages.cpp
new file mode 100644
index 000000000000..7c355595d7ac
--- /dev/null
+++ b/test/OpenMP/taskyield_messages.cpp
@@ -0,0 +1,110 @@
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ferror-limit 100 %s
+
+template <class T>
+T tmain(T argc) {
+#pragma omp taskyield
+ ;
+#pragma omp taskyield untied // expected-error {{unexpected OpenMP clause 'untied' in directive '#pragma omp taskyield'}}
+#pragma omp taskyield unknown // expected-warning {{extra tokens at the end of '#pragma omp taskyield' are ignored}}
+ if (argc)
+#pragma omp taskyield // expected-error {{'#pragma omp taskyield' cannot be an immediate substatement}}
+ if (argc) {
+#pragma omp taskyield
+ }
+ while (argc)
+#pragma omp taskyield // expected-error {{'#pragma omp taskyield' cannot be an immediate substatement}}
+ while (argc) {
+#pragma omp taskyield
+ }
+ do
+#pragma omp taskyield // expected-error {{'#pragma omp taskyield' cannot be an immediate substatement}}
+ while (argc)
+ ;
+ do {
+#pragma omp taskyield
+ } while (argc);
+ switch (argc)
+#pragma omp taskyield // expected-error {{'#pragma omp taskyield' cannot be an immediate substatement}}
+ switch (argc)
+ case 1:
+#pragma omp taskyield // expected-error {{'#pragma omp taskyield' cannot be an immediate substatement}}
+ switch (argc)
+ case 1: {
+#pragma omp taskyield
+ }
+ switch (argc) {
+#pragma omp taskyield
+ case 1:
+#pragma omp taskyield // expected-error {{'#pragma omp taskyield' cannot be an immediate substatement}}
+ break;
+ default: {
+#pragma omp taskyield
+ } break;
+ }
+ for (;;)
+#pragma omp taskyield // expected-error {{'#pragma omp taskyield' cannot be an immediate substatement}}
+ for (;;) {
+#pragma omp taskyield
+ }
+label:
+#pragma omp taskyield // expected-error {{'#pragma omp taskyield' cannot be an immediate substatement}}
+label1 : {
+#pragma omp taskyield
+}
+
+ return T();
+}
+
+int main(int argc, char **argv) {
+#pragma omp taskyield
+ ;
+#pragma omp taskyield untied // expected-error {{unexpected OpenMP clause 'untied' in directive '#pragma omp taskyield'}}
+#pragma omp taskyield unknown // expected-warning {{extra tokens at the end of '#pragma omp taskyield' are ignored}}
+ if (argc)
+#pragma omp taskyield // expected-error {{'#pragma omp taskyield' cannot be an immediate substatement}}
+ if (argc) {
+#pragma omp taskyield
+ }
+ while (argc)
+#pragma omp taskyield // expected-error {{'#pragma omp taskyield' cannot be an immediate substatement}}
+ while (argc) {
+#pragma omp taskyield
+ }
+ do
+#pragma omp taskyield // expected-error {{'#pragma omp taskyield' cannot be an immediate substatement}}
+ while (argc)
+ ;
+ do {
+#pragma omp taskyield
+ } while (argc);
+ switch (argc)
+#pragma omp taskyield // expected-error {{'#pragma omp taskyield' cannot be an immediate substatement}}
+ switch (argc)
+ case 1:
+#pragma omp taskyield // expected-error {{'#pragma omp taskyield' cannot be an immediate substatement}}
+ switch (argc)
+ case 1: {
+#pragma omp taskyield
+ }
+ switch (argc) {
+#pragma omp taskyield
+ case 1:
+#pragma omp taskyield // expected-error {{'#pragma omp taskyield' cannot be an immediate substatement}}
+ break;
+ default: {
+#pragma omp taskyield
+ } break;
+ }
+ for (;;)
+#pragma omp taskyield // expected-error {{'#pragma omp taskyield' cannot be an immediate substatement}}
+ for (;;) {
+#pragma omp taskyield
+ }
+label:
+#pragma omp taskyield // expected-error {{'#pragma omp taskyield' cannot be an immediate substatement}}
+label1 : {
+#pragma omp taskyield
+}
+
+ return tmain(argc);
+}
diff --git a/test/OpenMP/threadprivate_ast_print.cpp b/test/OpenMP/threadprivate_ast_print.cpp
index 72bf6f4077eb..4d0d40e213f2 100644
--- a/test/OpenMP/threadprivate_ast_print.cpp
+++ b/test/OpenMP/threadprivate_ast_print.cpp
@@ -1,9 +1,7 @@
-// RUN: %clang_cc1 -verify -fopenmp -ast-print %s | FileCheck %s
-// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -emit-pch -o %t %s
-// RUN: %clang_cc1 -fopenmp -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print
+// RUN: %clang_cc1 -verify -fopenmp=libiomp5 -ast-print %s | FileCheck %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -x c++ -std=c++11 -emit-pch -o %t %s
+// RUN: %clang_cc1 -fopenmp=libiomp5 -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print
// expected-no-diagnostics
-// FIXME: This test has been crashing since r186647.
-// REQUIRES: disabled
#ifndef HEADER
#define HEADER
@@ -28,9 +26,16 @@ int a, b;
#pragma omp threadprivate(d, b)
// CHECK-NEXT: #pragma omp threadprivate(d,b)
+template <class T>
+struct ST {
+ static T m;
+ #pragma omp threadprivate(m)
+};
+
template <class T> T foo() {
static T v;
#pragma omp threadprivate(v)
+ v = ST<T>::m;
return v;
}
//CHECK: template <class T = int> int foo() {
diff --git a/test/OpenMP/threadprivate_messages.cpp b/test/OpenMP/threadprivate_messages.cpp
index 4858549a7038..491f30ad041f 100644
--- a/test/OpenMP/threadprivate_messages.cpp
+++ b/test/OpenMP/threadprivate_messages.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp -ferror-limit 100 %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -verify -fopenmp=libiomp5 -ferror-limit 100 %s
#pragma omp threadprivate // expected-error {{expected '(' after 'threadprivate'}}
#pragma omp threadprivate( // expected-error {{expected identifier}} expected-error {{expected ')'}} expected-note {{to match this '('}}
@@ -24,13 +24,22 @@ int foo() { // expected-note {{declared here}}
return (a);
}
+#pragma omp threadprivate (a) (
+// expected-error@-1 {{'#pragma omp threadprivate' must precede all references to variable 'a'}} expected-warning@-1 {{extra tokens at the end of '#pragma omp threadprivate' are ignored}}
+#pragma omp threadprivate (a) [ // expected-error {{'#pragma omp threadprivate' must precede all references to variable 'a'}} expected-warning {{extra tokens at the end of '#pragma omp threadprivate' are ignored}}
+#pragma omp threadprivate (a) { // expected-error {{'#pragma omp threadprivate' must precede all references to variable 'a'}} expected-warning {{extra tokens at the end of '#pragma omp threadprivate' are ignored}}
+#pragma omp threadprivate (a) ) // expected-error {{'#pragma omp threadprivate' must precede all references to variable 'a'}} expected-warning {{extra tokens at the end of '#pragma omp threadprivate' are ignored}}
+#pragma omp threadprivate (a) ] // expected-error {{'#pragma omp threadprivate' must precede all references to variable 'a'}} expected-warning {{extra tokens at the end of '#pragma omp threadprivate' are ignored}}
+#pragma omp threadprivate (a) } // expected-error {{'#pragma omp threadprivate' must precede all references to variable 'a'}} expected-warning {{extra tokens at the end of '#pragma omp threadprivate' are ignored}}
#pragma omp threadprivate a // expected-error {{expected '(' after 'threadprivate'}}
#pragma omp threadprivate(d // expected-error {{expected ')'}} expected-note {{to match this '('}} expected-error {{'#pragma omp threadprivate' must precede all references to variable 'd'}}
#pragma omp threadprivate(d)) // expected-error {{'#pragma omp threadprivate' must precede all references to variable 'd'}} expected-warning {{extra tokens at the end of '#pragma omp threadprivate' are ignored}}
int x, y;
#pragma omp threadprivate(x)) // expected-warning {{extra tokens at the end of '#pragma omp threadprivate' are ignored}}
-#pragma omp threadprivate(y)), // expected-warning {{extra tokens at the end of '#pragma omp threadprivate' are ignored}}
-#pragma omp threadprivate(a,d) // expected-error {{'#pragma omp threadprivate' must precede all references to variable 'a'}} expected-error {{'#pragma omp threadprivate' must precede all references to variable 'd'}}
+#pragma omp threadprivate(y)),
+// expected-warning@-1 {{extra tokens at the end of '#pragma omp threadprivate' are ignored}}
+#pragma omp threadprivate(a,d)
+// expected-error@-1 {{'#pragma omp threadprivate' must precede all references to variable 'a'}} expected-error@-1 {{'#pragma omp threadprivate' must precede all references to variable 'd'}}
#pragma omp threadprivate(d.a) // expected-error {{expected identifier}}
#pragma omp threadprivate((float)a) // expected-error {{expected unqualified-id}}
int foa; // expected-note {{'foa' declared here}}
@@ -46,17 +55,17 @@ extern IncompleteSt e;
int &f = a; // expected-note {{'f' defined here}}
#pragma omp threadprivate (f) // expected-error {{arguments of '#pragma omp threadprivate' cannot be of reference type 'int &'}}
-class Class {
+class TestClass {
private:
int a; // expected-note {{declared here}}
static int b; // expected-note {{'b' declared here}}
- Class() : a(0){}
+ TestClass() : a(0){}
public:
- Class (int aaa) : a(aaa) {}
+ TestClass (int aaa) : a(aaa) {}
#pragma omp threadprivate (b, a) // expected-error {{'a' is not a global variable, static local variable or static data member}}
} g(10);
#pragma omp threadprivate (b) // expected-error {{use of undeclared identifier 'b'}}
-#pragma omp threadprivate (Class::b) // expected-error {{'#pragma omp threadprivate' must appear in the scope of the 'Class::b' variable declaration}}
+#pragma omp threadprivate (TestClass::b) // expected-error {{'#pragma omp threadprivate' must appear in the scope of the 'TestClass::b' variable declaration}}
#pragma omp threadprivate (g)
namespace ns {
@@ -90,19 +99,21 @@ static __thread int t; // expected-note {{'t' defined here}}
int o; // expected-note {{candidate found by name lookup is 'o'}}
#pragma omp threadprivate (o)
namespace {
-int o; // expected-note {{candidate found by name lookup is '<anonymous namespace>::o'}}
+int o; // expected-note {{candidate found by name lookup is '(anonymous namespace)::o'}}
#pragma omp threadprivate (o)
-#pragma omp threadprivate (o) // expected-error {{'#pragma omp threadprivate' must precede all references to variable '<anonymous namespace>::o'}}
+#pragma omp threadprivate (o) // expected-error {{'#pragma omp threadprivate' must precede all references to variable '(anonymous namespace)::o'}}
}
#pragma omp threadprivate (o) // expected-error {{reference to 'o' is ambiguous}}
#pragma omp threadprivate (::o) // expected-error {{'#pragma omp threadprivate' must precede all references to variable 'o'}}
int main(int argc, char **argv) { // expected-note {{'argc' defined here}}
- int x, y = argc; // expected-note {{'y' defined here}}
+ int x, y = argc; // expected-note 2 {{'y' defined here}}
static double d1;
static double d2;
static double d3; // expected-note {{'d3' defined here}}
+ static TestClass LocalClass(y); // expected-error {{variable with local storage in initial value of threadprivate variable}}
+#pragma omp threadprivate(LocalClass)
d.a = a;
d2++;
diff --git a/test/PCH/Inputs/chain-selectors2.h b/test/PCH/Inputs/chain-selectors2.h
index d54244de617b..741da9288a0c 100644
--- a/test/PCH/Inputs/chain-selectors2.h
+++ b/test/PCH/Inputs/chain-selectors2.h
@@ -1,6 +1,8 @@
@interface Y
-(void)f;
-(void)f2;
+ -(void)x;
+ -(void)y;
-(void)e;
@end
diff --git a/test/PCH/Inputs/cuda.h b/test/PCH/Inputs/cuda.h
new file mode 100644
index 000000000000..a9a4595a14a9
--- /dev/null
+++ b/test/PCH/Inputs/cuda.h
@@ -0,0 +1,20 @@
+/* Minimal declarations for CUDA support. Testing purposes only. */
+
+#include <stddef.h>
+
+#define __constant__ __attribute__((constant))
+#define __device__ __attribute__((device))
+#define __global__ __attribute__((global))
+#define __host__ __attribute__((host))
+#define __shared__ __attribute__((shared))
+#define __launch_bounds__(...) __attribute__((launch_bounds(__VA_ARGS__)))
+
+struct dim3 {
+ unsigned x, y, z;
+ __host__ __device__ dim3(unsigned x, unsigned y = 1, unsigned z = 1) : x(x), y(y), z(z) {}
+};
+
+typedef struct cudaStream *cudaStream_t;
+
+int cudaConfigureCall(dim3 gridSize, dim3 blockSize, size_t sharedSize = 0,
+ cudaStream_t stream = 0);
diff --git a/test/PCH/chain-pending-instantiations.cpp b/test/PCH/chain-pending-instantiations.cpp
index e49abcda4484..e87d3366ecb9 100644
--- a/test/PCH/chain-pending-instantiations.cpp
+++ b/test/PCH/chain-pending-instantiations.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -emit-llvm -o - -chain-include %s -chain-include %s | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -triple i686-pc-linux -o - -chain-include %s -chain-include %s | FileCheck %s
// CHECK: define linkonce_odr %{{[^ ]+}} @_ZN1AI1BE3getEv
#if !defined(PASS1)
#define PASS1
diff --git a/test/PCH/chain-selectors.m b/test/PCH/chain-selectors.m
index f2bfc4b9d3df..2551c643cc8b 100644
--- a/test/PCH/chain-selectors.m
+++ b/test/PCH/chain-selectors.m
@@ -18,9 +18,9 @@ void bar() {
// FIXME: Can't verify notes in headers
//[a f2];
- (void)@selector(x); // expected-warning {{creating selector for nonexistent method 'x'}}
- (void)@selector(y); // expected-warning {{creating selector for nonexistent method 'y'}}
- (void)@selector(e); // expected-warning {{creating selector for nonexistent method 'e'}}
+ (void)@selector(x); // expected-warning {{no method with selector 'x' is implemented in this translation unit}}
+ (void)@selector(y); // expected-warning {{no method with selector 'y' is implemented in this translation unit}}
+ (void)@selector(e); // expected-warning {{no method with selector 'e' is implemented in this translation unit}}
}
@implementation X (Blah)
diff --git a/test/PCH/cuda-kernel-call.cu b/test/PCH/cuda-kernel-call.cu
index ef12c5920745..ffb0c1444fe6 100644
--- a/test/PCH/cuda-kernel-call.cu
+++ b/test/PCH/cuda-kernel-call.cu
@@ -5,7 +5,7 @@
#define HEADER
// Header.
-#include "../SemaCUDA/cuda.h"
+#include "Inputs/cuda.h"
void kcall(void (*kp)()) {
kp<<<1, 1>>>();
diff --git a/test/PCH/cxx-key-functions.cpp b/test/PCH/cxx-key-functions.cpp
new file mode 100644
index 000000000000..9e7411c28f83
--- /dev/null
+++ b/test/PCH/cxx-key-functions.cpp
@@ -0,0 +1,97 @@
+// RUN: %clang_cc1 -x c++ -include %s -emit-llvm-only %s
+// RUN: %clang_cc1 -x c++ -emit-pch %s -o %t
+// RUN: %clang_cc1 -include-pch %t -emit-llvm-only %s
+
+#ifndef HEADER
+#define HEADER
+
+struct S00 { virtual void f(); };
+struct S01 { virtual void f(); };
+struct S02 { virtual void f(); };
+struct S03 { virtual void f(); };
+struct S04 { virtual void f(); };
+struct S05 { virtual void f(); };
+struct S06 { virtual void f(); };
+struct S07 { virtual void f(); };
+struct S08 { virtual void f(); };
+struct S09 { virtual void f(); };
+struct S10 { virtual void f(); };
+struct S11 { virtual void f(); };
+struct S12 { virtual void f(); };
+struct S13 { virtual void f(); };
+struct S14 { virtual void f(); };
+struct S15 { virtual void f(); };
+struct S16 { virtual void f(); };
+struct S17 { virtual void f(); };
+struct S18 { virtual void f(); };
+struct S19 { virtual void f(); };
+struct S20 { virtual void f(); };
+struct S21 { virtual void f(); };
+struct S22 { virtual void f(); };
+struct S23 { virtual void f(); };
+struct S24 { virtual void f(); };
+struct S25 { virtual void f(); };
+struct S26 { virtual void f(); };
+struct S27 { virtual void f(); };
+struct S28 { virtual void f(); };
+struct S29 { virtual void f(); };
+struct S30 { virtual void f(); };
+struct S31 { virtual void f(); };
+struct S32 { virtual void f(); };
+struct S33 { virtual void f(); };
+struct S34 { virtual void f(); };
+struct S35 { virtual void f(); };
+struct S36 { virtual void f(); };
+struct S37 { virtual void f(); };
+struct S38 { virtual void f(); };
+struct S39 { virtual void f(); };
+struct S40 { virtual void f(); };
+struct S41 { virtual void f(); };
+struct S42 { virtual void f(); };
+struct S43 { virtual void f(); };
+struct S44 { virtual void f(); };
+struct S45 { virtual void f(); };
+struct S46 { virtual void f(); };
+struct S47 { virtual void f(); };
+struct S48 { virtual void f(); };
+struct S49 { virtual void f(); };
+struct S50 { virtual void f(); };
+struct S51 { virtual void f(); };
+struct S52 { virtual void f(); };
+struct S53 { virtual void f(); };
+struct S54 { virtual void f(); };
+struct S55 { virtual void f(); };
+struct S56 { virtual void f(); };
+struct S57 { virtual void f(); };
+struct S58 { virtual void f(); };
+struct S59 { virtual void f(); };
+struct S60 { virtual void f(); };
+struct S61 { virtual void f(); };
+struct S62 { virtual void f(); };
+struct S63 { virtual void f(); };
+struct S64 { virtual void f(); };
+struct S65 { virtual void f(); };
+struct S66 { virtual void f(); };
+struct S67 { virtual void f(); };
+struct S68 { virtual void f(); };
+struct S69 { virtual void f(); };
+
+struct Test {
+ // Deserializing this key function should cause the key functions
+ // table to get resized.
+ virtual void f(S00, S01, S02, S03, S04, S05, S06, S07, S08, S09,
+ S10, S11, S12, S13, S14, S15, S16, S17, S18, S19,
+ S20, S21, S22, S23, S24, S25, S26, S27, S28, S29,
+ S30, S31, S32, S33, S34, S35, S36, S37, S38, S39,
+ S40, S41, S42, S43, S44, S45, S46, S47, S48, S49,
+ S50, S51, S52, S53, S54, S55, S56, S57, S58, S59,
+ S60, S61, S62, S63, S64, S65, S66, S67, S68, S69);
+ virtual void g();
+};
+
+#else
+
+void Test::g() {}
+void h(Test &t) { t.g(); }
+
+#endif
diff --git a/test/PCH/cxx-mangling.cpp b/test/PCH/cxx-mangling.cpp
new file mode 100644
index 000000000000..d086f26465aa
--- /dev/null
+++ b/test/PCH/cxx-mangling.cpp
@@ -0,0 +1,28 @@
+// Test without PCH.
+// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -include %s %s -emit-llvm -o - | FileCheck %s
+//
+// Test with PCH.
+// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -x c++-header %s -emit-pch -o %t
+// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -include-pch %t %s -emit-llvm -o - | FileCheck %s
+
+#ifndef HEADER
+#define HEADER
+
+struct A {
+ struct { int a; } a;
+ struct { int b; } b;
+};
+
+#else
+
+template<typename T> void f(T) {}
+
+// CHECK-LABEL: define void @_Z1g1A(
+void g(A a) {
+ // CHECK: call void @_Z1fIN1AUt0_EEvT_(
+ f(a.b);
+ // CHECK: call void @_Z1fIN1AUt_EEvT_(
+ f(a.a);
+}
+
+#endif
diff --git a/test/PCH/cxx-reference.cpp b/test/PCH/cxx-reference.cpp
index a1a44e6893df..becb9356731b 100644
--- a/test/PCH/cxx-reference.cpp
+++ b/test/PCH/cxx-reference.cpp
@@ -1,6 +1,6 @@
// Test this without pch.
-// RUN: %clang_cc1 -x c++ -std=c++11 -include %S/cxx-reference.h -fsyntax-only -emit-llvm -o - %s
+// RUN: %clang_cc1 -x c++ -triple %itanium_abi_triple -std=c++11 -include %S/cxx-reference.h -fsyntax-only -emit-llvm -o - %s
// Test with pch.
-// RUN: %clang_cc1 -x c++ -std=c++11 -emit-pch -o %t %S/cxx-reference.h
-// RUN: %clang_cc1 -x c++ -std=c++11 -include-pch %t -fsyntax-only -emit-llvm -o - %s
+// RUN: %clang_cc1 -x c++ -triple %itanium_abi_triple -std=c++11 -emit-pch -o %t %S/cxx-reference.h
+// RUN: %clang_cc1 -x c++ -triple %itanium_abi_triple -std=c++11 -include-pch %t -fsyntax-only -emit-llvm -o - %s
diff --git a/test/PCH/cxx-required-decls.cpp b/test/PCH/cxx-required-decls.cpp
index 8c4b11cd8414..c2f8e2fd68fe 100644
--- a/test/PCH/cxx-required-decls.cpp
+++ b/test/PCH/cxx-required-decls.cpp
@@ -1,9 +1,9 @@
// Test this without pch.
-// RUN: %clang_cc1 -include %S/cxx-required-decls.h %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -include %S/cxx-required-decls.h %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
// Test with pch.
-// RUN: %clang_cc1 -x c++-header -emit-pch -o %t %S/cxx-required-decls.h
-// RUN: %clang_cc1 -include-pch %t %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -x c++-header -triple %itanium_abi_triple -emit-pch -o %t %S/cxx-required-decls.h
+// RUN: %clang_cc1 -include-pch %t %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
// CHECK: @_ZL5globS = internal global %struct.S zeroinitializer
// CHECK: @_ZL3bar = internal global i32 0, align 4
diff --git a/test/PCH/cxx-templates.cpp b/test/PCH/cxx-templates.cpp
index e5ddd86e3802..52ea8752b360 100644
--- a/test/PCH/cxx-templates.cpp
+++ b/test/PCH/cxx-templates.cpp
@@ -1,24 +1,24 @@
// Test this without pch.
-// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions -include %S/cxx-templates.h -verify %s -ast-dump -o -
-// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions -include %S/cxx-templates.h %s -emit-llvm -o - -DNO_ERRORS | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -include %S/cxx-templates.h -verify %s -ast-dump -o -
+// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -include %S/cxx-templates.h %s -emit-llvm -o - -DNO_ERRORS | FileCheck %s
// Test with pch.
-// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions -x c++-header -emit-pch -o %t %S/cxx-templates.h
-// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions -include-pch %t -verify %s -ast-dump -o -
-// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions -include-pch %t %s -emit-llvm -o - -error-on-deserialized-decl doNotDeserialize -DNO_ERRORS | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -x c++-header -emit-pch -o %t %S/cxx-templates.h
+// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -include-pch %t -verify %s -ast-dump -o -
+// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -include-pch %t %s -emit-llvm -o - -error-on-deserialized-decl doNotDeserialize -DNO_ERRORS | FileCheck %s
// Test with modules.
-// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions -fmodules -x c++-header -emit-pch -o %t %S/cxx-templates.h
-// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions -fmodules -include-pch %t -verify %s -ast-dump -o -
-// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fexceptions -fmodules -include-pch %t %s -emit-llvm -o - -error-on-deserialized-decl doNotDeserialize -DNO_ERRORS | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -fmodules -x c++-header -emit-pch -o %t %S/cxx-templates.h
+// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -fmodules -include-pch %t -verify %s -ast-dump -o -
+// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fexceptions -fmodules -include-pch %t %s -emit-llvm -o - -error-on-deserialized-decl doNotDeserialize -DNO_ERRORS | FileCheck %s
// Test with pch and delayed template parsing.
-// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fdelayed-template-parsing -fexceptions -x c++-header -emit-pch -o %t %S/cxx-templates.h
-// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fdelayed-template-parsing -fexceptions -include-pch %t -verify %s -ast-dump -o -
-// RUN: %clang_cc1 -std=c++11 -fcxx-exceptions -fdelayed-template-parsing -fexceptions -include-pch %t %s -emit-llvm -o - -DNO_ERRORS | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fdelayed-template-parsing -fexceptions -x c++-header -emit-pch -o %t %S/cxx-templates.h
+// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fdelayed-template-parsing -fexceptions -include-pch %t -verify %s -ast-dump -o -
+// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fcxx-exceptions -fdelayed-template-parsing -fexceptions -include-pch %t %s -emit-llvm -o - -DNO_ERRORS | FileCheck %s
-// CHECK: define weak_odr void @_ZN2S4IiE1mEv
-// CHECK: define linkonce_odr void @_ZN2S3IiE1mEv
+// CHECK: define weak_odr {{.*}}void @_ZN2S4IiE1mEv
+// CHECK: define linkonce_odr {{.*}}void @_ZN2S3IiE1mEv
struct A {
typedef int type;
diff --git a/test/PCH/cxx-templates.h b/test/PCH/cxx-templates.h
index 992f478e33e6..c4a844727691 100644
--- a/test/PCH/cxx-templates.h
+++ b/test/PCH/cxx-templates.h
@@ -311,3 +311,50 @@ namespace local_extern {
return sizeof(arr);
}
}
+
+namespace rdar15468709a {
+ template<typename> struct decay {};
+
+ template<typename FooParamTy> auto foo(FooParamTy fooParam) -> decltype(fooParam);
+ template<typename BarParamTy> auto bar(BarParamTy barParam) -> decay<decltype(barParam)>;
+
+ struct B {};
+
+ void crash() {
+ B some;
+ bar(some);
+ }
+}
+
+namespace rdar15468709b {
+ template<typename> struct decay {};
+
+ template<typename... Foos> int returnsInt(Foos... foos);
+
+ template<typename... FooParamTy> auto foo(FooParamTy... fooParam) -> decltype(returnsInt(fooParam...));
+ template<typename... BarParamTy> auto bar(BarParamTy... barParam) -> decay<decltype(returnsInt(barParam...))>;
+
+ struct B {};
+
+ void crash() {
+ B some;
+ bar(some);
+ }
+}
+
+namespace rdar15468709c {
+ template<typename> struct decay {};
+
+ template<class... Foos> int returnsInt(Foos... foos);
+
+ template<typename FooParamTy> void foo(FooParamTy fooParam) { decltype(fooParam) a; }
+ template<typename BarParamTy> auto bar(BarParamTy barParam) -> decay<decltype(barParam)>;
+
+ struct B {};
+
+ void crash() {
+ B some;
+ bar(some);
+ }
+}
+
diff --git a/test/PCH/cxx-traits.h b/test/PCH/cxx-traits.h
index 836804ef2c88..e6f2feb1d116 100644
--- a/test/PCH/cxx-traits.h
+++ b/test/PCH/cxx-traits.h
@@ -1,12 +1,12 @@
// Header for PCH test cxx-traits.cpp
template<typename _Tp>
-struct __is_pod { // expected-warning {{keyword '__is_pod' will be treated as an identifier for the remainder of the translation unit}}
+struct __is_pod { // expected-warning {{keyword '__is_pod' will be made available as an identifier for the remainder of the translation unit}}
enum { __value };
};
template<typename _Tp>
-struct __is_empty { // expected-warning {{keyword '__is_empty' will be treated as an identifier for the remainder of the translation unit}}
+struct __is_empty { // expected-warning {{keyword '__is_empty' will be made available as an identifier for the remainder of the translation unit}}
enum { __value };
};
diff --git a/test/PCH/cxx11-exception-spec.cpp b/test/PCH/cxx11-exception-spec.cpp
index 446619ed1c94..8c7388a767b3 100644
--- a/test/PCH/cxx11-exception-spec.cpp
+++ b/test/PCH/cxx11-exception-spec.cpp
@@ -1,18 +1,47 @@
-// RUN: %clang_cc1 -pedantic-errors -std=c++11 -emit-pch %s -o %t
-// RUN: %clang_cc1 -pedantic-errors -std=c++11 -include-pch %t -verify %s
+// RUN: %clang_cc1 -pedantic-errors -std=c++11 -emit-pch %s -o %t.1
+// RUN: %clang_cc1 -pedantic-errors -std=c++11 -include-pch %t.1 -emit-pch %s -o %t.2
+// RUN: %clang_cc1 -pedantic-errors -std=c++11 -include-pch %t.2 -verify %s
+// RUN: %clang_cc1 -pedantic-errors -std=c++11 -include-pch %t.2 -emit-llvm-only %s
// expected-no-diagnostics
-#ifndef HEADER_INCLUDED
+#ifndef PHASE1_DONE
+#define PHASE1_DONE
-#define HEADER_INCLUDED
+template<int n> int f() noexcept(n % 2) { return 0; }
+template<int n> int g() noexcept(n % 2);
-template<bool b> int f() noexcept(b) {}
-decltype(f<false>()) a;
-decltype(f<true>()) b;
+decltype(f<2>()) f0;
+decltype(f<3>()) f1;
+template int f<4>();
+template int f<5>();
+decltype(f<6>()) f6;
+decltype(f<7>()) f7;
+
+struct A {
+ A();
+ A(const A&);
+};
+
+decltype(g<0>()) g0;
+
+#elif !defined(PHASE2_DONE)
+#define PHASE2_DONE
+
+template int f<6>();
+template int f<7>();
+decltype(f<8>()) f8;
+decltype(f<9>()) f9;
+template int f<10>();
+template int f<11>();
+
+A::A() = default;
+A::A(const A&) = default;
+
+int g0val = g<0>();
#else
-static_assert(!noexcept(f<false>()), "");
-static_assert(noexcept(f<true>()), "");
+static_assert(!noexcept(f<0>()), "");
+static_assert(noexcept(f<1>()), "");
#endif
diff --git a/test/PCH/cxx11-inheriting-ctors.cpp b/test/PCH/cxx11-inheriting-ctors.cpp
new file mode 100644
index 000000000000..79f78ba6c126
--- /dev/null
+++ b/test/PCH/cxx11-inheriting-ctors.cpp
@@ -0,0 +1,39 @@
+// RUN: %clang_cc1 -std=c++11 -emit-pch -o %t %s
+// RUN: %clang_cc1 -std=c++11 -include-pch %t -verify %s
+
+// expected-no-diagnostics
+
+#ifndef HEADER_INCLUDED
+#define HEADER_INCLUDED
+
+struct Base {
+ Base(int) {}
+
+ template <typename T>
+ Base(T) {}
+};
+
+struct Test : Base {
+ using Base::Base;
+};
+
+template <typename T>
+struct Test2 : Base {
+ using Base::Base;
+};
+
+template <typename B>
+struct Test3 : B {
+ using B::B;
+};
+
+#else
+
+Test test1a(42);
+Test test1b(nullptr);
+Test2<int> test2a(42);
+Test2<int> test2b(nullptr);
+Test3<Base> test3a(42);
+Test3<Base> test3b(nullptr);
+
+#endif // HEADER_INCLUDED
diff --git a/test/PCH/different-diagnostic-level.c b/test/PCH/different-diagnostic-level.c
new file mode 100644
index 000000000000..ac1a0daab164
--- /dev/null
+++ b/test/PCH/different-diagnostic-level.c
@@ -0,0 +1,17 @@
+// RUN: %clang -x c-header %s -Weverything -o %t.h.pch
+// RUN: %clang -x c %s -w -include %t.h -fsyntax-only -Xclang -verify
+
+#ifndef HEADER
+#define HEADER
+
+extern int foo;
+
+#else
+
+void f() {
+ int a = foo;
+ // Make sure we parsed this by getting an error.
+ int b = bar; // expected-error {{undeclared}}
+}
+
+#endif
diff --git a/test/PCH/different-linker-version.c b/test/PCH/different-linker-version.c
new file mode 100644
index 000000000000..9e2f38f674a4
--- /dev/null
+++ b/test/PCH/different-linker-version.c
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -target-linker-version 100 -emit-pch %s -o %t.h.pch
+// RUN: %clang_cc1 -target-linker-version 200 %s -include-pch %t.h.pch -fsyntax-only -verify
+
+#ifndef HEADER
+#define HEADER
+
+extern int foo;
+
+#else
+
+void f() {
+ int a = foo;
+ // Make sure we parsed this by getting an error.
+ int b = bar; // expected-error {{undeclared}}
+}
+
+#endif
diff --git a/test/PCH/field-designator.c b/test/PCH/field-designator.c
index 763cfdab28da..6f318fd3c82a 100644
--- a/test/PCH/field-designator.c
+++ b/test/PCH/field-designator.c
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -cc1 %s -include %s
-// RUN: %clang_cc1 -cc1 %s -emit-pch -o %t.pch
-// RUN: %clang_cc1 -cc1 %s -include-pch %t.pch
+// RUN: %clang_cc1 %s -include %s
+// RUN: %clang_cc1 %s -emit-pch -o %t.pch
+// RUN: %clang_cc1 %s -include-pch %t.pch
// rdar://12239321 Make sure we don't emit a bogus
// error: field designator 'e' does not refer to a non-static data member
diff --git a/test/PCH/irgen-rdar13114142.mm b/test/PCH/irgen-rdar13114142.mm
index 7a9cfba942d8..288c39d3f293 100644
--- a/test/PCH/irgen-rdar13114142.mm
+++ b/test/PCH/irgen-rdar13114142.mm
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 %s -emit-pch -o %t.pch
-// RUN: %clang_cc1 %s -emit-llvm -include-pch %t.pch -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple %itanium_abi_triple -emit-pch -o %t.pch
+// RUN: %clang_cc1 %s -triple %itanium_abi_triple -emit-llvm -include-pch %t.pch -o - | FileCheck %s
#ifndef HEADER
#define HEADER
diff --git a/test/PCH/local_static.cpp b/test/PCH/local_static.cpp
new file mode 100644
index 000000000000..1085d81d3175
--- /dev/null
+++ b/test/PCH/local_static.cpp
@@ -0,0 +1,20 @@
+// Test this without PCH.
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -include %S/local_static.h -fsyntax-only %s -emit-llvm -o %t.no_pch.ll %s
+// RUN: FileCheck --input-file %t.no_pch.ll %s
+
+// Test with PCH.
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -x c++-header -emit-pch -o %t.pch %S/local_static.h
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -include-pch %t.pch -emit-llvm -o %t.pch.ll %s
+// RUN: FileCheck --input-file %t.pch.ll %s
+
+void test(Bar &b) {
+ b.f<int>();
+ static int s;
+}
+
+// Check if the mangling of static and local extern variables
+// are correct and preserved by PCH.
+
+// CHECK: @_ZZ4testR3BarE1s = internal global i32 0, align 4
+// CHECK: @_ZZN3Bar1fIiEEvvE1y = linkonce_odr constant i32 0, align 4
+
diff --git a/test/PCH/local_static.h b/test/PCH/local_static.h
new file mode 100644
index 000000000000..a69382adf838
--- /dev/null
+++ b/test/PCH/local_static.h
@@ -0,0 +1,7 @@
+class Bar {
+public:
+ template<typename T>
+ void f() {
+ static const T y = 0;
+ }
+};
diff --git a/test/PCH/macro-undef.cpp b/test/PCH/macro-undef.cpp
new file mode 100644
index 000000000000..c0ce2de23fe3
--- /dev/null
+++ b/test/PCH/macro-undef.cpp
@@ -0,0 +1,36 @@
+// RUN: %clang_cc1 -emit-pch -o %t %s
+// RUN: %clang_cc1 -fsyntax-only -include-pch %t %s -Wuninitialized -verify
+// RUN: %clang_cc1 -fsyntax-only -include-pch %t %s -Wuninitialized -fdiagnostics-parseable-fixits 2>&1 | FileCheck %s
+
+#ifndef HEADER
+#define HEADER
+
+#define NULL 0
+template<typename T>
+void *f() {
+ void *p; // @11
+ return p; // @12
+}
+#undef NULL
+template<typename T>
+void *g() {
+ void *p; // @17
+ return p; // @18
+}
+
+#else
+
+// expected-warning@12 {{uninitialized}}
+// expected-note@11 {{initialize}}
+// CHECK: fix-it:"{{.*}}":{11:10-11:10}:" = NULL"
+
+// expected-warning@18 {{uninitialized}}
+// expected-note@17 {{initialize}}
+// CHECK: fix-it:"{{.*}}":{17:10-17:10}:" = 0"
+
+int main() {
+ f<int>(); // expected-note {{instantiation}}
+ g<int>(); // expected-note {{instantiation}}
+}
+
+#endif
diff --git a/test/PCH/modified-module-dependency.m b/test/PCH/modified-module-dependency.m
new file mode 100644
index 000000000000..3db8f3d9c75b
--- /dev/null
+++ b/test/PCH/modified-module-dependency.m
@@ -0,0 +1,20 @@
+// RUN: rm -rf %t-dir
+// RUN: mkdir -p %t-dir
+// RUN: echo '@import test;' > %t-dir/prefix.h
+// RUN: echo 'void foo(void);' > %t-dir/test.h
+// RUN: cp %S/modified-module-dependency.module.map %t-dir/module.map
+
+// Precompile prefix.pch.
+// RUN: %clang_cc1 -x objective-c -I %t-dir -fmodules -fmodules-cache-path=%t-dir/cache -fdisable-module-hash -emit-pch %t-dir/prefix.h -o %t-dir/prefix.pch
+
+// Modify the dependency.
+// RUN: echo ' ' >> %t-dir/test.h
+
+// Run and check the diagnostics.
+// RUN: not %clang_cc1 -x objective-c -I %t-dir -include-pch %t-dir/prefix.pch -fmodules -fmodules-cache-path=%t-dir/cache -fdisable-module-hash -fsyntax-only %s 2> %t-dir/log
+// RUN: FileCheck %s < %t-dir/log
+
+// CHECK: file '[[TEST_H:.*[/\\]test\.h]]' has been modified since the precompiled header '[[PREFIX_PCH:.*/prefix\.pch]]' was built
+// CHECK: '[[TEST_H]]' required by '[[TEST_PCM:.*[/\\]test\.pcm]]'
+// CHECK: '[[TEST_PCM]]' required by '[[PREFIX_PCH]]'
+// CHECK: please rebuild precompiled header '[[PREFIX_PCH]]'
diff --git a/test/PCH/modified-module-dependency.module.map b/test/PCH/modified-module-dependency.module.map
new file mode 100644
index 000000000000..b4706778f89e
--- /dev/null
+++ b/test/PCH/modified-module-dependency.module.map
@@ -0,0 +1,4 @@
+module test {
+ header "test.h"
+ export *
+}
diff --git a/test/PCH/objc_container.m b/test/PCH/objc_container.m
index 0f25d3252c68..44aac709d43a 100644
--- a/test/PCH/objc_container.m
+++ b/test/PCH/objc_container.m
@@ -21,5 +21,5 @@
// CHECK-IR: {{call.*objc_msgSend}}
// CHECK-IR: ret void
-// CHECK: attributes #0 = { nounwind {{.*}} }
-// CHECK: attributes #1 = { nonlazybind }
+// CHECK-IR: attributes #0 = { nounwind {{.*}} }
+// CHECK-IR: attributes #1 = { nonlazybind }
diff --git a/test/PCH/objc_literals.mm b/test/PCH/objc_literals.mm
index 59f33815a2b8..777046ef29f2 100644
--- a/test/PCH/objc_literals.mm
+++ b/test/PCH/objc_literals.mm
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -emit-pch -x objective-c++ -std=c++0x -o %t %s
-// RUN: %clang_cc1 -include-pch %t -x objective-c++ -std=c++0x -verify %s
-// RUN: %clang_cc1 -include-pch %t -x objective-c++ -std=c++0x -ast-print %s | FileCheck -check-prefix=CHECK-PRINT %s
-// RUN: %clang_cc1 -include-pch %t -x objective-c++ -std=c++0x -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-IR %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-pch -x objective-c++ -std=c++0x -o %t %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -include-pch %t -x objective-c++ -std=c++0x -verify %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -include-pch %t -x objective-c++ -std=c++0x -ast-print %s | FileCheck -check-prefix=CHECK-PRINT %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -include-pch %t -x objective-c++ -std=c++0x -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-IR %s
// expected-no-diagnostics
diff --git a/test/PCH/objcxx-ivar-class.mm b/test/PCH/objcxx-ivar-class.mm
index a83d7e74d758..329f06f0de8a 100644
--- a/test/PCH/objcxx-ivar-class.mm
+++ b/test/PCH/objcxx-ivar-class.mm
@@ -1,15 +1,15 @@
// Test this without pch.
-// RUN: not %clang_cc1 -include %S/objcxx-ivar-class.h -verify %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -include %S/objcxx-ivar-class.h -triple %itanium_abi_triple %s -emit-llvm -o - | FileCheck %s
// Test with pch.
-// RUN: %clang_cc1 -x objective-c++-header -emit-pch -o %t %S/objcxx-ivar-class.h
-// RUN: not %clang_cc1 -include-pch %t -verify %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -x objective-c++-header -triple %itanium_abi_triple -emit-pch -o %t %S/objcxx-ivar-class.h
+// RUN: %clang_cc1 -include-pch %t -triple %itanium_abi_triple %s -emit-llvm -o - | FileCheck %s
// CHECK: [C position]
// CHECK: call {{.*}} @_ZN1SC1ERKS_
// CHECK: [C setPosition:]
-// CHECK: call %struct.S* @_ZN1SaSERKS_
+// CHECK: = call {{.*}}%struct.S* @_ZN1SaSERKS_
// CHECK: [C .cxx_destruct]
// CHECK: [C .cxx_construct]
diff --git a/test/PCH/pr18806.cpp b/test/PCH/pr18806.cpp
new file mode 100644
index 000000000000..c28320db9561
--- /dev/null
+++ b/test/PCH/pr18806.cpp
@@ -0,0 +1,31 @@
+// RUN: %clang_cc1 -std=c++11 -emit-pch -o %t %s
+// RUN: %clang_cc1 -std=c++11 -include-pch %t -verify %s
+
+// expected-no-diagnostics
+
+// Before the patch, this test triggered an assert violation in
+// ASTContext::getSubstTemplateTypeParmType.
+
+#ifndef HEADER_INCLUDED
+#define HEADER_INCLUDED
+
+template <typename T>
+using Id = T;
+
+template <typename X>
+struct Class1 {
+ template <typename Y, typename = decltype(Y())>
+ struct Nested1;
+};
+
+template <typename A>
+struct Class2 {
+ template <typename B, typename = Id<decltype(B())>>
+ struct Nested2;
+};
+
+#else
+
+Class2<char> test;
+
+#endif
diff --git a/test/PCH/pr4489.c b/test/PCH/pr4489.c
index 033e55b853c8..574e33f18c0d 100644
--- a/test/PCH/pr4489.c
+++ b/test/PCH/pr4489.c
@@ -2,12 +2,6 @@
// RUN: echo > %t.empty.c
// RUN: %clang -include %t -x c %t.empty.c -emit-llvm -S -o -
-// FIXME: This test is forcibly disabled, it is flaky on the clang-i686-xp-msvc9
-// buildbot.
-//
-// RUN: false
-// XFAIL: *
-
// PR 4489: Crash with PCH
// PR 4492: Crash with PCH (round two)
// PR 4509: Crash with PCH (round three)
diff --git a/test/PCH/pragma-loop.cpp b/test/PCH/pragma-loop.cpp
new file mode 100644
index 000000000000..1456a2778f33
--- /dev/null
+++ b/test/PCH/pragma-loop.cpp
@@ -0,0 +1,90 @@
+// RUN: %clang_cc1 -emit-pch -o %t.a %s
+// RUN: %clang_cc1 -include-pch %t.a %s -ast-print -o - | FileCheck %s
+
+// FIXME: A bug in ParsedAttributes causes the order of the attributes to be
+// reversed. The checks are consequently in the reverse order below.
+
+// CHECK: #pragma clang loop unroll_count(16)
+// CHECK: #pragma clang loop interleave_count(8)
+// CHECK: #pragma clang loop vectorize_width(4)
+// CHECK: #pragma clang loop unroll(disable)
+// CHECK: #pragma clang loop interleave(disable)
+// CHECK: #pragma clang loop vectorize(enable)
+// CHECK: #pragma clang loop unroll(enable)
+// CHECK: #pragma clang loop interleave(enable)
+// CHECK: #pragma clang loop vectorize(disable)
+// CHECK: #pragma unroll
+// CHECK: #pragma unroll (32)
+
+#ifndef HEADER
+#define HEADER
+
+class pragma_test {
+public:
+ inline void run1(int *List, int Length) {
+ int i = 0;
+#pragma clang loop vectorize_width(4)
+#pragma clang loop interleave_count(8)
+#pragma clang loop unroll_count(16)
+ while (i < Length) {
+ List[i] = i;
+ i++;
+ }
+ }
+
+ inline void run2(int *List, int Length) {
+ int i = 0;
+#pragma clang loop vectorize(enable)
+#pragma clang loop interleave(disable)
+#pragma clang loop unroll(disable)
+ while (i - 1 < Length) {
+ List[i] = i;
+ i++;
+ }
+ }
+
+ inline void run3(int *List, int Length) {
+ int i = 0;
+#pragma clang loop vectorize(disable)
+#pragma clang loop interleave(enable)
+#pragma clang loop unroll(enable)
+ while (i - 3 < Length) {
+ List[i] = i;
+ i++;
+ }
+ }
+
+ inline void run4(int *List, int Length) {
+ int i = 0;
+#pragma unroll
+ while (i - 3 < Length) {
+ List[i] = i;
+ i++;
+ }
+ }
+
+ inline void run5(int *List, int Length) {
+ int i = 0;
+#pragma unroll 32
+ while (i - 3 < Length) {
+ List[i] = i;
+ i++;
+ }
+ }
+};
+
+#else
+
+void test() {
+ int List[100];
+
+ pragma_test pt;
+
+ pt.run1(List, 100);
+ pt.run2(List, 100);
+ pt.run3(List, 100);
+ pt.run4(List, 100);
+ pt.run5(List, 100);
+}
+
+#endif
diff --git a/test/PCH/pragma-optimize.c b/test/PCH/pragma-optimize.c
new file mode 100644
index 000000000000..2206fe75cd82
--- /dev/null
+++ b/test/PCH/pragma-optimize.c
@@ -0,0 +1,27 @@
+// Test this without pch.
+// RUN: %clang_cc1 %s -include %s -verify -fsyntax-only
+
+// Test with pch.
+// RUN: %clang_cc1 %s -emit-pch -o %t
+// RUN: %clang_cc1 %s -emit-llvm -include-pch %t -o - | FileCheck %s
+
+// expected-no-diagnostics
+
+#ifndef HEADER
+#define HEADER
+#pragma clang optimize off
+
+#else
+
+int a;
+
+void f() {
+ a = 12345;
+}
+
+// Check that the function is decorated with optnone
+
+// CHECK-DAG: @f() [[ATTRF:#[0-9]+]]
+// CHECK-DAG: attributes [[ATTRF]] = { {{.*}}noinline{{.*}}optnone{{.*}} }
+
+#endif
diff --git a/test/PCH/single-token-macro.c b/test/PCH/single-token-macro.c
index 52873bfc2441..aa02f65f78b1 100644
--- a/test/PCH/single-token-macro.c
+++ b/test/PCH/single-token-macro.c
@@ -12,6 +12,11 @@
#ifndef HEADER
#define HEADER
+#ifdef __stdcall
+// __stdcall is defined as __attribute__((__stdcall__)) for targeting mingw32.
+#undef __stdcall
+#endif
+
#define __stdcall
#define STDCALL __stdcall
diff --git a/test/PCH/stmt-attrs.cpp b/test/PCH/stmt-attrs.cpp
new file mode 100644
index 000000000000..3d7c7a27a7e2
--- /dev/null
+++ b/test/PCH/stmt-attrs.cpp
@@ -0,0 +1,24 @@
+// RUN: %clang_cc1 -std=c++11 -emit-pch -o %t.a %s
+// RUN: %clang_cc1 -std=c++11 -include-pch %t.a %s -ast-print -o - | FileCheck %s
+
+#ifndef HEADER
+#define HEADER
+
+inline void test(int i) {
+ switch (i) {
+ case 1:
+ // Notice that the NullStmt has two attributes.
+ // CHECK: {{\[\[clang::fallthrough\]\] \[\[clang::fallthrough\]\]}}
+ [[clang::fallthrough]] [[clang::fallthrough]];
+ case 2:
+ break;
+ }
+}
+
+#else
+
+void foo(void) {
+ test(1);
+}
+
+#endif
diff --git a/test/PCH/thread-safety-attrs.cpp b/test/PCH/thread-safety-attrs.cpp
index a588c0e523a9..3e6f029632ef 100644
--- a/test/PCH/thread-safety-attrs.cpp
+++ b/test/PCH/thread-safety-attrs.cpp
@@ -209,33 +209,33 @@ void sls_fun_good_8() {
void sls_fun_bad_1() {
sls_mu.Unlock(); // \
- // expected-warning{{unlocking 'sls_mu' that was not locked}}
+ // expected-warning{{releasing mutex 'sls_mu' that was not held}}
}
void sls_fun_bad_2() {
sls_mu.Lock();
sls_mu.Lock(); // \
- // expected-warning{{locking 'sls_mu' that is already locked}}
+ // expected-warning{{acquiring mutex 'sls_mu' that is already held}}
sls_mu.Unlock();
}
void sls_fun_bad_3() {
sls_mu.Lock(); // expected-note {{mutex acquired here}}
-} // expected-warning{{mutex 'sls_mu' is still locked at the end of function}}
+} // expected-warning{{mutex 'sls_mu' is still held at the end of function}}
void sls_fun_bad_4() {
if (getBool())
sls_mu.Lock(); // expected-note{{mutex acquired here}}
else
sls_mu2.Lock(); // expected-note{{mutex acquired here}}
-} // expected-warning{{mutex 'sls_mu' is not locked on every path through here}} \
- // expected-warning{{mutex 'sls_mu2' is not locked on every path through here}}
+} // expected-warning{{mutex 'sls_mu' is not held on every path through here}} \
+ // expected-warning{{mutex 'sls_mu2' is not held on every path through here}}
void sls_fun_bad_5() {
sls_mu.Lock(); // expected-note {{mutex acquired here}}
if (getBool())
sls_mu.Unlock();
-} // expected-warning{{mutex 'sls_mu' is not locked on every path through here}}
+} // expected-warning{{mutex 'sls_mu' is not held on every path through here}}
void sls_fun_bad_6() {
if (getBool()) {
@@ -248,8 +248,8 @@ void sls_fun_bad_6() {
}
}
sls_mu.Unlock(); // \
- expected-warning{{mutex 'sls_mu' is not locked on every path through here}}\
- expected-warning{{unlocking 'sls_mu' that was not locked}}
+ expected-warning{{mutex 'sls_mu' is not held on every path through here}}\
+ expected-warning{{releasing mutex 'sls_mu' that was not held}}
}
void sls_fun_bad_7() {
@@ -259,7 +259,7 @@ void sls_fun_bad_7() {
if (getBool()) {
if (getBool()) {
continue; // \
- expected-warning{{expecting mutex 'sls_mu' to be locked at start of each loop}}
+ expected-warning{{expecting mutex 'sls_mu' to be held at start of each loop}}
}
}
sls_mu.Lock(); // expected-note {{mutex acquired here}}
@@ -271,14 +271,14 @@ void sls_fun_bad_8() {
sls_mu.Lock(); // expected-note{{mutex acquired here}}
do {
- sls_mu.Unlock(); // expected-warning{{expecting mutex 'sls_mu' to be locked at start of each loop}}
+ sls_mu.Unlock(); // expected-warning{{expecting mutex 'sls_mu' to be held at start of each loop}}
} while (getBool());
}
void sls_fun_bad_9() {
do {
sls_mu.Lock(); // \
- // expected-warning{{expecting mutex 'sls_mu' to be locked at start of each loop}} \
+ // expected-warning{{expecting mutex 'sls_mu' to be held at start of each loop}} \
// expected-note{{mutex acquired here}}
} while (getBool());
sls_mu.Unlock();
@@ -286,18 +286,18 @@ void sls_fun_bad_9() {
void sls_fun_bad_10() {
sls_mu.Lock(); // expected-note 2{{mutex acquired here}}
- while(getBool()) { // expected-warning{{expecting mutex 'sls_mu' to be locked at start of each loop}}
+ while(getBool()) { // expected-warning{{expecting mutex 'sls_mu' to be held at start of each loop}}
sls_mu.Unlock();
}
-} // expected-warning{{mutex 'sls_mu' is still locked at the end of function}}
+} // expected-warning{{mutex 'sls_mu' is still held at the end of function}}
void sls_fun_bad_11() {
while (getBool()) { // \
- expected-warning{{expecting mutex 'sls_mu' to be locked at start of each loop}}
+ expected-warning{{expecting mutex 'sls_mu' to be held at start of each loop}}
sls_mu.Lock(); // expected-note {{mutex acquired here}}
}
sls_mu.Unlock(); // \
- // expected-warning{{unlocking 'sls_mu' that was not locked}}
+ // expected-warning{{releasing mutex 'sls_mu' that was not held}}
}
void sls_fun_bad_12() {
@@ -306,7 +306,7 @@ void sls_fun_bad_12() {
sls_mu.Unlock();
if (getBool()) {
if (getBool()) {
- break; // expected-warning{{mutex 'sls_mu' is not locked on every path through here}}
+ break; // expected-warning{{mutex 'sls_mu' is not held on every path through here}}
}
}
sls_mu.Lock();
diff --git a/test/PCH/verify_pch.m b/test/PCH/verify_pch.m
new file mode 100644
index 000000000000..dcfb286e2a11
--- /dev/null
+++ b/test/PCH/verify_pch.m
@@ -0,0 +1,30 @@
+// Setup:
+// RUN: rm -rf %t
+// RUN: mkdir -p %t/usr/include
+// RUN: echo '// empty' > %t/usr/include/sys_header.h
+// RUN: cp %s %t.h
+//
+// Precompile
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -isysroot %t -x objective-c-header -emit-pch -o %t.pch %t.h
+
+// Verify successfully
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -isysroot %t -verify-pch %t.pch
+
+// Incompatible lang options ignored
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -isysroot %t -x objective-c -fno-builtin -verify-pch %t.pch
+
+// Stale dependency
+// RUN: echo ' ' >> %t.h
+// RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -isysroot %t -verify-pch %t.pch 2> %t.log.2
+// RUN: FileCheck -check-prefix=CHECK-STALE-DEP %s < %t.log.2
+// CHECK-STALE-DEP: file '{{.*}}.h' has been modified since the precompiled header '{{.*}}.pch' was built
+
+// Stale dependency in system header
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -isysroot %t -x objective-c-header -emit-pch -o %t.pch %t.h
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -isysroot %t -verify-pch %t.pch
+// RUN: echo ' ' >> %t/usr/include/sys_header.h
+// RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -isysroot %t -verify-pch %t.pch 2> %t.log.3
+// RUN: FileCheck -check-prefix=CHECK-STALE-SYS-H %s < %t.log.3
+// CHECK-STALE-SYS-H: file '{{.*}}sys_header.h' has been modified since the precompiled header '{{.*}}.pch' was built
+
+#include <sys_header.h>
diff --git a/test/Parser/DelayedTemplateParsing.cpp b/test/Parser/DelayedTemplateParsing.cpp
index 73128c49f247..eff31208c83e 100644
--- a/test/Parser/DelayedTemplateParsing.cpp
+++ b/test/Parser/DelayedTemplateParsing.cpp
@@ -121,3 +121,63 @@ constexpr T Fun(T A) { return T(0); }
constexpr int Var = Fun(20);
}
+template <typename T>
+auto invalidTrailingRetType() -> Bogus {} // expected-error {{unknown type name 'Bogus'}}
+
+namespace PR19613 {
+
+struct HeapTypeConfig {
+ static void from_bitset();
+};
+
+template <class Config>
+struct TypeImpl {
+ struct BitsetType;
+
+ static void Any() {
+ BitsetType::New();
+ }
+};
+
+template<class Config>
+struct TypeImpl<Config>::BitsetType {
+ static void New() {
+ Config::from_bitset();
+ }
+};
+
+static void f() {
+ TypeImpl<HeapTypeConfig>::Any();
+}
+
+template<typename A> struct S {
+ template<typename B> struct T;
+};
+template<typename A> template<typename B> struct S<A>::T {
+ template<typename C, typename D> struct U;
+ template<typename C> struct U<C, C> {
+ template<typename E> static int f() {
+ return sizeof(A) + sizeof(B) + sizeof(C) + sizeof(E);
+ }
+ };
+};
+
+static void g() {
+ S<int>::T<int>::U<int,int>::f<int>();
+}
+
+template<typename T> struct SS {
+ template<typename U> struct X;
+ template<typename U> struct X<U*>;
+};
+template<typename T> template<typename U> struct SS<T>::X<U*> {
+ static int f() {
+ return sizeof(T) + sizeof(U);
+ }
+};
+
+static void h() {
+ SS<int>::X<int*>::f();
+}
+
+}
diff --git a/test/Parser/MicrosoftExtensions.c b/test/Parser/MicrosoftExtensions.c
index 5e1139338b81..d7ea20bca01c 100644
--- a/test/Parser/MicrosoftExtensions.c
+++ b/test/Parser/MicrosoftExtensions.c
@@ -1,124 +1,79 @@
-// RUN: %clang_cc1 -triple i386-mingw32 -fsyntax-only -verify -fms-extensions -Wno-missing-declarations -x objective-c++ %s
-__stdcall int func0();
-int __stdcall func();
-typedef int (__cdecl *tptr)();
-void (*__fastcall fastpfunc)();
-struct __declspec(uuid("00000000-0000-0000-C000-000000000046")) __declspec(novtable) IUnknown {}; /* expected-warning{{__declspec attribute 'novtable' is not supported}} */
-extern __declspec(dllimport) void __stdcall VarR4FromDec();
+// RUN: %clang_cc1 -triple i386-mingw32 -fsyntax-only -Wno-missing-declarations -verify -fms-extensions %s
+__stdcall int func0(void);
+int __stdcall func(void);
+typedef int (__cdecl *tptr)(void);
+void (*__fastcall fastpfunc)(void);
+extern __declspec(dllimport) void __stdcall VarR4FromDec(void);
__declspec(deprecated) __declspec(deprecated) char * __cdecl ltoa( long _Val, char * _DstBuf, int _Radix);
-__declspec(safebuffers) __declspec(noalias) __declspec(restrict) void * __cdecl xxx( void * _Memory ); /* expected-warning{{__declspec attribute 'safebuffers' is not supported}} expected-warning{{__declspec attribute 'noalias' is not supported}} expected-warning{{__declspec attribute 'restrict' is not supported}} */
+__declspec(safebuffers) __declspec(noalias) __declspec(restrict) void * __cdecl xxx(void *_Memory); /* expected-warning{{__declspec attribute 'safebuffers' is not supported}} expected-warning{{__declspec attribute 'noalias' is not supported}} expected-warning{{__declspec attribute 'restrict' is not supported}} */
typedef __w64 unsigned long ULONG_PTR, *PULONG_PTR;
-void * __ptr64 PtrToPtr64(const void *p)
-{
+void * __ptr64 PtrToPtr64(const void *p) {
return((void * __ptr64) (unsigned __int64) (ULONG_PTR)p );
}
-void * __ptr32 PtrToPtr32(const void *p)
-{
- return((void * __ptr32) (unsigned __int32) (ULONG_PTR)p );
-}
-void __forceinline InterlockedBitTestAndSet (long *Base, long Bit)
-{
- // FIXME: Re-enable this once MS inline asm stabilizes.
-#if 0
- __asm {
- mov eax, Bit
- mov ecx, Base
- lock bts [ecx], eax
- setc al
- };
-#endif
+void * __ptr32 PtrToPtr32(const void *p) {
+ return((void * __ptr32) (unsigned __int32) (ULONG_PTR)p );
}
-// Both inline and __forceinline is OK.
-inline void __forceinline pr8264() {
-}
-__forceinline void inline pr8264_1() {
-}
-void inline __forceinline pr8264_2() {
-}
-void __forceinline inline pr8264_3() {
-}
-// But duplicate __forceinline causes warning.
-void __forceinline __forceinline pr8264_4() { // expected-warning{{duplicate '__forceinline' declaration specifier}}
+/* Both inline and __forceinline is OK. */
+inline void __forceinline pr8264(void) {}
+__forceinline void inline pr8264_1(void) {}
+void inline __forceinline pr8264_2(void) {}
+void __forceinline inline pr8264_3(void) {}
+/* But duplicate __forceinline causes warning. */
+void __forceinline __forceinline pr8264_4(void) { /* expected-warning{{duplicate '__forceinline' declaration specifier}} */
}
-_inline int foo99() { return 99; }
+_inline int foo99(void) { return 99; }
-void test_ms_alignof_alias() {
+void test_ms_alignof_alias(void) {
unsigned int s = _alignof(int);
s = __builtin_alignof(int);
}
-void *_alloca(int);
-
-void foo() {
- __declspec(align(16)) int *buffer = (int *)_alloca(9);
-}
-
-typedef bool (__stdcall __stdcall *blarg)(int);
-
-void local_callconv()
-{
- bool (__stdcall *p)(int);
-}
-
-// Charify extension.
+/* Charify extension. */
#define FOO(x) #@x
char x = FOO(a);
typedef enum E { e1 };
+enum __declspec(deprecated) E2 { i, j, k }; /* expected-note {{'E2' has been explicitly marked deprecated here}} */
+__declspec(deprecated) enum E3 { a, b, c } e; /* expected-note {{'e' has been explicitly marked deprecated here}} */
-enum __declspec(deprecated) E2 { i, j, k }; // expected-note {{declared here}}
-__declspec(deprecated) enum E3 { a, b, c } e; // expected-note {{declared here}}
-
-void deprecated_enum_test(void)
-{
- // Test to make sure the deprecated warning follows the right thing
- enum E2 e1; // expected-warning {{'E2' is deprecated}}
- enum E3 e2; // No warning expected, the deprecation follows the variable
- enum E3 e3 = e; // expected-warning {{'e' is deprecated}}
+void deprecated_enum_test(void) {
+ /* Test to make sure the deprecated warning follows the right thing */
+ enum E2 e1; /* expected-warning {{'E2' is deprecated}} */
+ enum E3 e2; /* No warning expected, the deprecation follows the variable */
+ enum E3 e3 = e; /* expected-warning {{'e' is deprecated}} */
}
/* Microsoft attribute tests */
-[repeatable][source_annotation_attribute( Parameter|ReturnValue )]
-struct SA_Post{ SA_Post(); int attr; };
-
[returnvalue:SA_Post( attr=1)]
int foo1([SA_Post(attr=1)] void *param);
-
-
-void ms_intrinsics(int a)
-{
+void ms_intrinsics(int a) {
__noop();
__assume(a);
__debugbreak();
}
-struct __declspec(frobble) S1 {}; /* expected-warning {{unknown __declspec attribute 'frobble' ignored}} */
+struct __declspec(frobble) S1 {}; /* expected-warning {{__declspec attribute 'frobble' is not supported}} */
struct __declspec(12) S2 {}; /* expected-error {{__declspec attributes must be an identifier or string literal}} */
struct __declspec("testing") S3 {}; /* expected-warning {{__declspec attribute '"testing"' is not supported}} */
+/* declspecs with arguments cannot have an empty argument list, even if the
+ arguments are optional. */
+__declspec(deprecated()) void dep_func_test(void); /* expected-error {{parentheses must be omitted if 'deprecated' attribute's argument list is empty}} */
+__declspec(deprecated) void dep_func_test2(void);
+__declspec(deprecated("")) void dep_func_test3(void);
+
/* Ensure multiple declspec attributes are supported */
struct __declspec(align(8) deprecated) S4 {};
/* But multiple declspecs must still be legal */
-struct __declspec(deprecated frobble "testing") S5 {}; /* expected-warning {{unknown __declspec attribute 'frobble' ignored}} expected-warning {{__declspec attribute '"testing"' is not supported}} */
-struct __declspec(unknown(12) deprecated) S6 {}; /* expected-warning {{unknown __declspec attribute 'unknown' ignored}}*/
-
-struct S7 {
- int foo() { return 12; }
- __declspec(property(get=foo) deprecated) int t; // expected-note {{declared here}}
-};
-
-/* Technically, this is legal (though it does nothing) */
-__declspec() void quux( void ) {
- struct S7 s;
- int i = s.t; /* expected-warning {{'t' is deprecated}} */
-}
+struct __declspec(deprecated frobble "testing") S5 {}; /* expected-warning {{__declspec attribute 'frobble' is not supported}} expected-warning {{__declspec attribute '"testing"' is not supported}} */
+struct __declspec(unknown(12) deprecated) S6 {}; /* expected-warning {{__declspec attribute 'unknown' is not supported}}*/
int * __sptr psp;
int * __uptr pup;
diff --git a/test/Parser/MicrosoftExtensions.cpp b/test/Parser/MicrosoftExtensions.cpp
index efb5c3ce1fdc..0174ec2f292d 100644
--- a/test/Parser/MicrosoftExtensions.cpp
+++ b/test/Parser/MicrosoftExtensions.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -std=c++11 -fsyntax-only -Wno-unused-value -Wmicrosoft -verify -fms-extensions -fms-compatibility -fdelayed-template-parsing
+// RUN: %clang_cc1 %s -triple i386-mingw32 -std=c++11 -fsyntax-only -Wno-unused-value -Wmicrosoft -verify -fms-extensions -fms-compatibility -fdelayed-template-parsing
/* Microsoft attribute tests */
[repeatable][source_annotation_attribute( Parameter|ReturnValue )]
@@ -50,7 +50,7 @@ struct __declspec(uuid("0000000-0000-0000-1234-0000500000047")) uuid_attr_bad3 {
struct __declspec(uuid("0000000-0000-0000-Z234-000000000047")) uuid_attr_bad4 { };// expected-error {{uuid attribute contains a malformed GUID}}
struct __declspec(uuid("000000000000-0000-1234-000000000047")) uuid_attr_bad5 { };// expected-error {{uuid attribute contains a malformed GUID}}
-
+__declspec(uuid("000000A0-0000-0000-C000-000000000046")) int i; // expected-warning {{'uuid' attribute only applies to classes}}
struct __declspec(uuid("000000A0-0000-0000-C000-000000000046"))
struct_with_uuid { };
@@ -227,104 +227,30 @@ void interface_test() {
__int64 x7 = __int64(0);
-
-namespace If_exists_test {
-
-class IF_EXISTS {
-private:
- typedef int Type;
-};
-
-int __if_exists_test() {
- int b=0;
- __if_exists(IF_EXISTS::Type) {
- b++;
- b++;
- }
- __if_exists(IF_EXISTS::Type_not) {
- this wont compile.
- }
- __if_not_exists(IF_EXISTS::Type) {
- this wont compile.
- }
- __if_not_exists(IF_EXISTS::Type_not) {
- b++;
- b++;
- }
-}
-
-
-__if_exists(IF_EXISTS::Type) {
- int var23;
-}
-
-__if_exists(IF_EXISTS::Type_not) {
- this wont compile.
-}
-
-__if_not_exists(IF_EXISTS::Type) {
- this wont compile.
-}
-
-__if_not_exists(IF_EXISTS::Type_not) {
- int var244;
-}
-
-int __if_exists_init_list() {
-
- int array1[] = {
- 0,
- __if_exists(IF_EXISTS::Type) {2, }
- 3
- };
-
- int array2[] = {
- 0,
- __if_exists(IF_EXISTS::Type_not) { this wont compile }
- 3
- };
-
- int array3[] = {
- 0,
- __if_not_exists(IF_EXISTS::Type_not) {2, }
- 3
- };
-
- int array4[] = {
- 0,
- __if_not_exists(IF_EXISTS::Type) { this wont compile }
- 3
- };
-
-}
-
-
-class IF_EXISTS_CLASS_TEST {
- __if_exists(IF_EXISTS::Type) {
- // __if_exists, __if_not_exists can nest
- __if_not_exists(IF_EXISTS::Type_not) {
- int var123;
- }
- int var23;
- }
-
- __if_exists(IF_EXISTS::Type_not) {
- this wont compile.
- }
-
- __if_not_exists(IF_EXISTS::Type) {
- this wont compile.
- }
-
- __if_not_exists(IF_EXISTS::Type_not) {
- int var244;
- }
-};
-
-}
-
-
int __identifier(generic) = 3;
+int __identifier(int) = 4;
+struct __identifier(class) { __identifier(class) *__identifier(for); };
+__identifier(class) __identifier(struct) = { &__identifier(struct) };
+
+int __identifier for; // expected-error {{missing '(' after '__identifier'}}
+int __identifier(else} = __identifier(for); // expected-error {{missing ')' after identifier}} expected-note {{to match this '('}}
+#define identifier_weird(x) __identifier(x
+int k = identifier_weird(if)); // expected-error {{use of undeclared identifier 'if'}}
+
+// This is a bit weird, but the alternative tokens aren't keywords, and this
+// behavior matches MSVC. FIXME: Consider supporting this anyway.
+extern int __identifier(and) r; // expected-error {{cannot convert '&&' token to an identifier}}
+
+void f() {
+ __identifier(() // expected-error {{cannot convert '(' token to an identifier}}
+ __identifier(void) // expected-error {{use of undeclared identifier 'void'}}
+ __identifier()) // expected-error {{cannot convert ')' token to an identifier}}
+ // FIXME: We should pick a friendlier display name for this token kind.
+ __identifier(1) // expected-error {{cannot convert <numeric_constant> token to an identifier}}
+ __identifier(+) // expected-error {{cannot convert '+' token to an identifier}}
+ __identifier("foo") // expected-error {{cannot convert <string_literal> token to an identifier}}
+ __identifier(;) // expected-error {{cannot convert ';' token to an identifier}}
+}
class inline_definition_pure_spec {
virtual int f() = 0 { return 0; }// expected-warning {{function definition with pure-specifier is a Microsoft extension}}
@@ -403,3 +329,35 @@ void TestProperty() {
sp.V11++;
++sp.V11;
}
+
+//expected-warning@+1 {{C++ operator 'and' (aka '&&') used as a macro name}}
+#define and foo
+
+struct __declspec(uuid("00000000-0000-0000-C000-000000000046")) __declspec(novtable) IUnknown {}; // expected-warning{{__declspec attribute 'novtable' is not supported}}
+
+typedef bool (__stdcall __stdcall *blarg)(int);
+
+void local_callconv() {
+ bool (__stdcall *p)(int);
+}
+
+struct S7 {
+ int foo() { return 12; }
+ __declspec(property(get=foo) deprecated) int t; // expected-note {{'t' has been explicitly marked deprecated here}}
+};
+
+// Technically, this is legal (though it does nothing)
+__declspec() void quux( void ) {
+ struct S7 s;
+ int i = s.t; // expected-warning {{'t' is deprecated}}
+}
+
+void *_alloca(int);
+
+void foo(void) {
+ __declspec(align(16)) int *buffer = (int *)_alloca(9);
+}
+
+template <int *>
+struct NullptrArg {};
+NullptrArg<nullptr> a;
diff --git a/test/Parser/MicrosoftExtensionsInlineAsm.c b/test/Parser/MicrosoftExtensionsInlineAsm.c
new file mode 100644
index 000000000000..a973152b2781
--- /dev/null
+++ b/test/Parser/MicrosoftExtensionsInlineAsm.c
@@ -0,0 +1,13 @@
+// REQUIRES: x86-registered-target
+// RUN: %clang_cc1 -triple i386-mingw32 -fsyntax-only -verify -fms-extensions %s
+// expected-no-diagnostics
+
+void __forceinline InterlockedBitTestAndSet (long *Base, long Bit)
+{
+ __asm {
+ mov eax, Bit
+ mov ecx, Base
+ lock bts [ecx], eax
+ setc al
+ };
+}
diff --git a/test/Parser/altivec-csk-bool.c b/test/Parser/altivec-csk-bool.c
index ba6fa3b2f77b..c1c253958c66 100644
--- a/test/Parser/altivec-csk-bool.c
+++ b/test/Parser/altivec-csk-bool.c
@@ -1,4 +1,5 @@
-// RUN: %clang -target powerpc64-unknown-linux-gnu -maltivec -fsyntax-only %s
+// RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -faltivec -fsyntax-only %s
+// RUN: %clang_cc1 -triple powerpc64le-unknown-linux-gnu -faltivec -fsyntax-only %s
// PR16456: Verify that bool, true, false are treated as context-sensitive
// keywords (and therefore available for use as identifiers) when in
diff --git a/test/Parser/altivec.c b/test/Parser/altivec.c
index 0bdc3dcffe2a..0b8147a3b7b0 100644
--- a/test/Parser/altivec.c
+++ b/test/Parser/altivec.c
@@ -1,4 +1,6 @@
// RUN: %clang_cc1 -triple=powerpc-apple-darwin8 -faltivec -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple=powerpc64-unknown-linux-gnu -faltivec -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple=powerpc64le-unknown-linux-gnu -faltivec -fsyntax-only -verify %s
__vector char vv_c;
__vector signed char vv_sc;
@@ -103,8 +105,8 @@ void f() {
gccvector unsigned int gv = v;
gccvector int gvi = (gccvector int)v;
__attribute__((vector_size(8))) unsigned int gv8;
- gv8 = gccv; // expected-error {{assigning to '__attribute__((__vector_size__(2 * sizeof(unsigned int)))) unsigned int' from incompatible type '__attribute__((__vector_size__(4 * sizeof(unsigned int)))) unsigned int'}}
- av = gv8; // expected-error {{assigning to '__vector unsigned int' from incompatible type '__attribute__((__vector_size__(2 * sizeof(unsigned int)))) unsigned int'}}
+ gv8 = gccv; // expected-error {{assigning to '__attribute__((__vector_size__(2 * sizeof(unsigned int)))) unsigned int' (vector of 2 'unsigned int' values) from incompatible type '__attribute__((__vector_size__(4 * sizeof(unsigned int)))) unsigned int' (vector of 4 'unsigned int' values)}}
+ av = gv8; // expected-error {{assigning to '__vector unsigned int' (vector of 4 'unsigned int' values) from incompatible type '__attribute__((__vector_size__(2 * sizeof(unsigned int)))) unsigned int' (vector of 2 'unsigned int' values)}}
v = gccv;
__vector unsigned int tv = gccv;
diff --git a/test/Parser/arm-windows-calling-convention-handling.c b/test/Parser/arm-windows-calling-convention-handling.c
new file mode 100644
index 000000000000..7717aada53a3
--- /dev/null
+++ b/test/Parser/arm-windows-calling-convention-handling.c
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -triple thumbv7-windows -fms-compatibility -fsyntax-only -verify %s
+
+int __cdecl cdecl(int a, int b, int c, int d) { // expected-warning {{calling convention '__cdecl' ignored for this target}}
+ return a + b + c + d;
+}
+
+float __stdcall stdcall(float a, float b, float c, float d) { // expected-warning {{calling convention '__stdcall' ignored for this target}}
+ return a + b + c + d;
+}
+
diff --git a/test/Parser/asm.c b/test/Parser/asm.c
index b95e08bcca10..dabb010529a9 100644
--- a/test/Parser/asm.c
+++ b/test/Parser/asm.c
@@ -23,3 +23,16 @@ __asm ; // expected-error {{expected '(' after 'asm'}}
// <rdar://problem/10465079> - Don't crash on wide string literals in 'asm'.
int foo asm (L"bar"); // expected-error {{cannot use wide string literal in 'asm'}}
+asm() // expected-error {{expected string literal in 'asm'}}
+// expected-error@-1 {{expected ';' after top-level asm block}}
+
+asm(; // expected-error {{expected string literal in 'asm'}}
+
+asm("") // expected-error {{expected ';' after top-level asm block}}
+
+// Unterminated asm strings at the end of the file were causing us to crash, so
+// this needs to be last. rdar://15624081
+// expected-warning@+3 {{missing terminating '"' character}}
+// expected-error@+2 {{expected string literal in 'asm'}}
+// expected-error@+1 {{expected ';' after top-level asm block}}
+asm("
diff --git a/test/Parser/attr-availability.c b/test/Parser/attr-availability.c
index 06bebbad5c59..d812296d9354 100644
--- a/test/Parser/attr-availability.c
+++ b/test/Parser/attr-availability.c
@@ -20,6 +20,8 @@ void f6() __attribute__((availability(macosx,unavailable,introduced=10.5))); //
void f7() __attribute__((availability(macosx,message=L"wide"))); // expected-error {{expected string literal for optional message in 'availability' attribute}}
+void f8() __attribute__((availability(macosx,message="a" L"b"))); // expected-error {{expected string literal for optional message in 'availability' attribute}}
+
// rdar://10095131
enum E{
gorf __attribute__((availability(macosx,introduced=8.5, message = 10.0))), // expected-error {{expected string literal for optional message in 'availability' attribute}}
diff --git a/test/Parser/attributes.c b/test/Parser/attributes.c
index 376ed2e7d2c9..3d69c72c322c 100644
--- a/test/Parser/attributes.c
+++ b/test/Parser/attributes.c
@@ -65,27 +65,27 @@ int __attribute__((format(printf, 0 aligned(16) )) missing_rparen_3; // expected
int testFundef1(int *a) __attribute__((nonnull(1))) { // \
- // expected-warning {{GCC does not allow nonnull attribute in this position on a function definition}}
+ // expected-warning {{GCC does not allow 'nonnull' attribute in this position on a function definition}}
return *a;
}
// noreturn is lifted to type qualifier
void testFundef2() __attribute__((noreturn)) { // \
- // expected-warning {{GCC does not allow noreturn attribute in this position on a function definition}}
+ // expected-warning {{GCC does not allow 'noreturn' attribute in this position on a function definition}}
testFundef2();
}
int testFundef3(int *a) __attribute__((nonnull(1), // \
- // expected-warning {{GCC does not allow nonnull attribute in this position on a function definition}}
+ // expected-warning {{GCC does not allow 'nonnull' attribute in this position on a function definition}}
pure)) { // \
- // expected-warning {{GCC does not allow pure attribute in this position on a function definition}}
+ // expected-warning {{GCC does not allow 'pure' attribute in this position on a function definition}}
return *a;
}
int testFundef4(int *a) __attribute__((nonnull(1))) // \
- // expected-warning {{GCC does not allow nonnull attribute in this position on a function definition}}
+ // expected-warning {{GCC does not allow 'nonnull' attribute in this position on a function definition}}
__attribute((pure)) { // \
- // expected-warning {{GCC does not allow pure attribute in this position on a function definition}}
+ // expected-warning {{GCC does not allow 'pure' attribute in this position on a function definition}}
return *a;
}
@@ -94,5 +94,4 @@ void testFundef5() __attribute__(()) { }
__attribute__((pure)) int testFundef6(int a) { return a; }
-
-
+void deprecatedTestFun(void) __attribute__((deprecated()));
diff --git a/test/Parser/attributes.mm b/test/Parser/attributes.mm
index d92e3d35cfbf..024606bed3a1 100644
--- a/test/Parser/attributes.mm
+++ b/test/Parser/attributes.mm
@@ -14,11 +14,11 @@ EXP class C2 {}; // expected-warning {{attribute 'visibility' is ignored, place
@interface EXP I @end // expected-error {{postfix attributes are not allowed on Objective-C directives, place them in front of '@interface'}}
EXP @interface I2 @end
-@implementation EXP I @end // expected-error-re {{postfix attributes are not allowed on Objective-C directives$}}
+@implementation EXP I @end // expected-error-re {{postfix attributes are not allowed on Objective-C directives{{$}}}}
// FIXME: Prefix attribute recovery skips until ';'
EXP @implementation I2 @end; // expected-error {{prefix attribute must be followed by an interface or protocol}}
-@class EXP OC; // expected-error-re {{postfix attributes are not allowed on Objective-C directives$}}
+@class EXP OC; // expected-error-re {{postfix attributes are not allowed on Objective-C directives{{$}}}}
EXP @class OC2; // expected-error {{prefix attribute must be followed by an interface or protocol}}
@protocol EXP P @end // expected-error {{postfix attributes are not allowed on Objective-C directives, place them in front of '@protocol'}}
diff --git a/test/Parser/bad-control.c b/test/Parser/bad-control.c
index 480d81be0d57..72614eb2551e 100644
--- a/test/Parser/bad-control.c
+++ b/test/Parser/bad-control.c
@@ -7,3 +7,18 @@ void foo() {
void foo2() {
continue; /* expected-error {{'continue' statement not in loop statement}} */
}
+
+int pr8880_9 (int first) {
+ switch(({ if (first) { first = 0; break; } 1; })) { // expected-error {{'break' statement not in loop or switch statement}}
+ case 2: return 2;
+ default: return 0;
+ }
+}
+
+void pr8880_24() {
+ for (({break;});;); // expected-error {{'break' statement not in loop or switch statement}}
+}
+
+void pr8880_25() {
+ for (({continue;});;); // expected-error {{'continue' statement not in loop statement}}
+}
diff --git a/test/Parser/brackets.c b/test/Parser/brackets.c
new file mode 100644
index 000000000000..2750d0e42ed8
--- /dev/null
+++ b/test/Parser/brackets.c
@@ -0,0 +1,79 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: cp %s %t
+// RUN: not %clang_cc1 -fixit %t -x c -DFIXIT
+// RUN: %clang_cc1 -fsyntax-only %t -x c -DFIXIT
+// RUN: not %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s -strict-whitespace
+
+void test1() {
+ int a[] = {0,1,1,2,3};
+ int []b = {0,1,4,9,16};
+ // expected-error@-1{{brackets go after the identifier}}
+ // CHECK: {{^}} int []b = {0,1,4,9,16};
+ // CHECK: {{^}} ~~ ^
+ // CHECK: {{^}} []
+ // CHECK: fix-it:{{.*}}:{[[@LINE-5]]:7-[[@LINE-5]]:9}:""
+ // CHECK: fix-it:{{.*}}:{[[@LINE-6]]:10-[[@LINE-6]]:10}:"[]"
+
+ int c = a[0];
+ int d = b[0]; // No undeclared identifer error here.
+
+ int *e = a;
+ int *f = b; // No undeclared identifer error here.
+}
+
+struct S {
+ int [1][1]x;
+ // expected-error@-1{{brackets go after the identifier}}
+ // CHECK: {{^}} int [1][1]x;
+ // CHECK: {{^}} ~~~~~~ ^
+ // CHECK: {{^}} [1][1]
+ // CHECK: fix-it:{{.*}}:{[[@LINE-5]]:7-[[@LINE-5]]:13}:""
+ // CHECK: fix-it:{{.*}}:{[[@LINE-6]]:14-[[@LINE-6]]:14}:"[1][1]"
+} s;
+
+#ifndef FIXIT
+void test2() {
+ int [][][];
+ // expected-error@-1{{expected identifier or '('}}
+ // CHECK: {{^}} int [][][];
+ // CHECK: {{^}} ^
+ // CHECK-NOT: fix-it
+ struct T {
+ int [];
+ // expected-error@-1{{expected member name or ';' after declaration specifiers}}
+ // CHECK: {{^}} int [];
+ // CHECK: {{^}} ~~~ ^
+ // CHECK-NOT: fix-it
+ };
+}
+
+void test3() {
+ int [5] *;
+ // expected-error@-1{{expected identifier or '('}}
+ // CHECK: {{^}} int [5] *;
+ // CHECK: {{^}} ^
+ // CHECK-NOT: fix-it
+ // expected-error@-5{{brackets go after the identifier}}
+ // CHECK: {{^}} int [5] *;
+ // CHECK: {{^}} ~~~~ ^
+ // CHECK: {{^}} ()[5]
+ // CHECK: fix-it:{{.*}}:{[[@LINE-9]]:7-[[@LINE-9]]:11}:""
+ // CHECK: fix-it:{{.*}}:{[[@LINE-10]]:11-[[@LINE-10]]:11}:"("
+ // CHECK: fix-it:{{.*}}:{[[@LINE-11]]:12-[[@LINE-11]]:12}:")[5]"
+
+ int [5] * a;
+ // expected-error@-1{{brackets go after the identifier}}
+ // CHECK: {{^}} int [5] * a;
+ // CHECK: {{^}} ~~~~ ^
+ // CHECK: {{^}} ( )[5]
+ // CHECK: fix-it:{{.*}}:{[[@LINE-5]]:7-[[@LINE-5]]:11}:""
+ // CHECK: fix-it:{{.*}}:{[[@LINE-6]]:11-[[@LINE-6]]:11}:"("
+ // CHECK: fix-it:{{.*}}:{[[@LINE-7]]:14-[[@LINE-7]]:14}:")[5]"
+
+ int *b[5] = a; // expected-error{{}} a should not be corrected to type b
+
+ int (*c)[5] = a; // a should be the same type as c
+}
+#endif
+
+// CHECK: 8 errors generated.
diff --git a/test/Parser/brackets.cpp b/test/Parser/brackets.cpp
new file mode 100644
index 000000000000..f418c11d3ac3
--- /dev/null
+++ b/test/Parser/brackets.cpp
@@ -0,0 +1,153 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: cp %s %t
+// RUN: not %clang_cc1 -fixit %t -x c++ -DFIXIT
+// RUN: %clang_cc1 -fsyntax-only %t -x c++ -DFIXIT
+// RUN: not %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s -strict-whitespace
+
+void test1() {
+ int a[] = {0,1,1,2,3};
+ int []b = {0,1,4,9,16};
+ // expected-error@-1{{brackets go after the unqualified-id}}
+ // CHECK: {{^}} int []b = {0,1,4,9,16};
+ // CHECK: {{^}} ~~ ^
+ // CHECK: {{^}} []
+ // CHECK: fix-it:{{.*}}:{[[@LINE-5]]:7-[[@LINE-5]]:9}:""
+ // CHECK: fix-it:{{.*}}:{[[@LINE-6]]:10-[[@LINE-6]]:10}:"[]"
+
+ int c = a[0];
+ int d = b[0]; // No undeclared identifer error here.
+
+ int *e = a;
+ int *f = b; // No undeclared identifer error here.
+
+ int[1] g[2];
+ // expected-error@-1{{brackets go after the unqualified-id}}
+ // CHECK: {{^}} int[1] g[2];
+ // CHECK: {{^}} ~~~ ^
+ // CHECK: {{^}} [1]
+ // CHECK: fix-it:{{.*}}:{[[@LINE-5]]:6-[[@LINE-5]]:9}:""
+ // CHECK: fix-it:{{.*}}:{[[@LINE-6]]:14-[[@LINE-6]]:14}:"[1]"
+}
+
+void test2() {
+ int [3] (*a) = 0;
+ // expected-error@-1{{brackets go after the unqualified-id}}
+ // CHECK: {{^}} int [3] (*a) = 0;
+ // CHECK: {{^}} ~~~~ ^
+ // CHECK: {{^}} [3]
+ // CHECK: fix-it:{{.*}}:{[[@LINE-5]]:7-[[@LINE-5]]:11}:""
+ // CHECK: fix-it:{{.*}}:{[[@LINE-6]]:15-[[@LINE-6]]:15}:"[3]"
+
+#ifndef FIXIT
+ // Make sure a is corrected to be like type y, instead of like type z.
+ int (*b)[3] = a;
+ int (*c[3]) = a; // expected-error{{}}
+#endif
+}
+
+struct A {
+ static int [1][1]x;
+ // expected-error@-1{{brackets go after the unqualified-id}}
+ // CHECK: {{^}} static int [1][1]x;
+ // CHECK: {{^}} ~~~~~~ ^
+ // CHECK: {{^}} [1][1]
+ // CHECK: fix-it:{{.*}}:{[[@LINE-5]]:14-[[@LINE-5]]:20}:""
+ // CHECK: fix-it:{{.*}}:{[[@LINE-6]]:21-[[@LINE-6]]:21}:"[1][1]"
+};
+
+int [1][1]A::x = { {42} };
+// expected-error@-1{{brackets go after the unqualified-id}}
+// CHECK: {{^}}int [1][1]A::x = { {42} };
+// CHECK: {{^}} ~~~~~~ ^
+// CHECK: {{^}} [1][1]
+// CHECK: fix-it:{{.*}}:{[[@LINE-5]]:5-[[@LINE-5]]:11}:""
+// CHECK: fix-it:{{.*}}:{[[@LINE-6]]:15-[[@LINE-6]]:15}:"[1][1]"
+
+struct B { static int (*x)[5]; };
+int [5] *B::x = 0;
+// expected-error@-1{{brackets go after the unqualified-id}}
+// CHECK: {{^}}int [5] *B::x = 0;
+// CHECK: {{^}} ~~~~ ^
+// CHECK: {{^}} ( )[5]
+// CHECK: fix-it:{{.*}}:{[[@LINE-5]]:5-[[@LINE-5]]:9}:""
+// CHECK: fix-it:{{.*}}:{[[@LINE-6]]:9-[[@LINE-6]]:9}:"("
+// CHECK: fix-it:{{.*}}:{[[@LINE-7]]:14-[[@LINE-7]]:14}:")[5]"
+
+void test3() {
+ int [3] *a;
+ // expected-error@-1{{brackets go after the unqualified-id}}
+ // CHECK: {{^}} int [3] *a;
+ // CHECK: {{^}} ~~~~ ^
+ // CHECK: {{^}} ( )[3]
+ // CHECK: fix-it:{{.*}}:{[[@LINE-5]]:7-[[@LINE-5]]:11}:""
+ // CHECK: fix-it:{{.*}}:{[[@LINE-6]]:11-[[@LINE-6]]:11}:"("
+ // CHECK: fix-it:{{.*}}:{[[@LINE-7]]:13-[[@LINE-7]]:13}:")[3]"
+
+ int (*b)[3] = a; // no error
+}
+
+void test4() {
+ int [2] a;
+ // expected-error@-1{{brackets go after the unqualified-id}}
+ // CHECK: {{^}} int [2] a;
+ // CHECK: {{^}} ~~~~ ^
+ // CHECK: {{^}} [2]
+ // CHECK: fix-it:{{.*}}:{[[@LINE-5]]:7-[[@LINE-5]]:11}:""
+ // CHECK: fix-it:{{.*}}:{[[@LINE-6]]:12-[[@LINE-6]]:12}:"[2]"
+
+ int [2] &b = a;
+ // expected-error@-1{{brackets go after the unqualified-id}}
+ // CHECK: {{^}} int [2] &b = a;
+ // CHECK: {{^}} ~~~~ ^
+ // CHECK: {{^}} ( )[2]
+ // CHECK: fix-it:{{.*}}:{[[@LINE-5]]:7-[[@LINE-5]]:11}:""
+ // CHECK: fix-it:{{.*}}:{[[@LINE-6]]:11-[[@LINE-6]]:11}:"("
+ // CHECK: fix-it:{{.*}}:{[[@LINE-7]]:13-[[@LINE-7]]:13}:")[2]"
+
+}
+
+namespace test5 {
+#ifndef FIXIT
+int [][][];
+// expected-error@-1{{expected unqualified-id}}
+// CHECK: {{^}}int [][][];
+// CHECK: {{^}} ^
+
+struct C {
+ int [];
+ // expected-error@-1{{expected member name or ';' after declaration specifiers}}
+ // CHECK: {{^}} int [];
+ // CHECK: {{^}} ~~~ ^
+};
+
+#endif
+}
+
+namespace test6 {
+struct A {
+ static int arr[3];
+};
+int [3] ::test6::A::arr = {1,2,3};
+// expected-error@-1{{brackets go after the unqualified-id}}
+// CHECK: {{^}}int [3] ::test6::A::arr = {1,2,3};
+// CHECK: {{^}} ~~~~ ^
+// CHECK: {{^}} [3]
+// CHECK: fix-it:{{.*}}:{[[@LINE-5]]:5-[[@LINE-5]]:9}:""
+// CHECK: fix-it:{{.*}}:{[[@LINE-6]]:24-[[@LINE-6]]:24}:"[3]"
+
+}
+
+namespace test7 {
+class A{};
+void test() {
+ int [3] A::*a;
+ // expected-error@-1{{brackets go after the unqualified-id}}
+ // CHECK: {{^}} int [3] A::*a;
+ // CHECK: {{^}} ~~~~ ^
+ // CHECK: {{^}} ( )[3]
+ // CHECK: fix-it:{{.*}}:{[[@LINE-5]]:7-[[@LINE-5]]:11}:""
+ // CHECK: fix-it:{{.*}}:{[[@LINE-6]]:11-[[@LINE-6]]:11}:"("
+ // CHECK: fix-it:{{.*}}:{[[@LINE-7]]:16-[[@LINE-7]]:16}:")[3]"
+}
+}
+// CHECK: 14 errors generated.
diff --git a/test/Parser/builtin_classify_type.c b/test/Parser/builtin_classify_type.c
index ff483b20974b..63fd8e28045a 100644
--- a/test/Parser/builtin_classify_type.c
+++ b/test/Parser/builtin_classify_type.c
@@ -9,7 +9,7 @@ int main() {
struct foo s;
static int ary[__builtin_classify_type(a)];
- static int ary2[(__builtin_classify_type)(a)]; // expected-error{{variable length array declaration can not have 'static' storage duration}}
+ static int ary2[(__builtin_classify_type)(a)]; // expected-error{{variable length array declaration cannot have 'static' storage duration}}
static int ary3[(*__builtin_classify_type)(a)]; // expected-error{{builtin functions must be directly called}}
int result;
diff --git a/test/Parser/check-objc2-syntax-1.m b/test/Parser/check-objc2-syntax-1.m
index 9aff96377404..364f826776c8 100644
--- a/test/Parser/check-objc2-syntax-1.m
+++ b/test/Parser/check-objc2-syntax-1.m
@@ -1,5 +1,7 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
-// expected-no-diagnostics
+
+// rdar://15505492
+@import Foundation; // expected-error {{use of '@import' when modules are disabled}}
@interface Subclass
+ (int)magicNumber;
diff --git a/test/Parser/compound_literal.c b/test/Parser/compound_literal.c
index 9a0e4a64a654..00544996e3c1 100644
--- a/test/Parser/compound_literal.c
+++ b/test/Parser/compound_literal.c
@@ -1,6 +1,8 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -x c++ %s
// expected-no-diagnostics
int main() {
char *s;
- s = (char []){"whatever"};
+ s = (char []){"whatever"};
+ s = (char(*)){s};
}
diff --git a/test/Parser/cuda-kernel-call-c++11.cu b/test/Parser/cuda-kernel-call-c++11.cu
new file mode 100644
index 000000000000..8f833f79af50
--- /dev/null
+++ b/test/Parser/cuda-kernel-call-c++11.cu
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
+
+template<typename> struct S {};
+template<typename> void f();
+
+
+void foo(void) {
+ // In C++11 mode, all of these are expected to parse correctly, and the CUDA
+ // language should not interfere with that.
+
+ // expected-no-diagnostics
+
+ S<S<S<int>>> s3;
+
+ S<S<S<S<int>>>> s4;
+
+ S<S<S<S<S<int>>>>> s5;
+
+ (void)(&f<S<S<int>>>==0);
+}
diff --git a/test/Parser/cuda-kernel-call.cu b/test/Parser/cuda-kernel-call.cu
index 92e46e3acaf5..1970c558c506 100644
--- a/test/Parser/cuda-kernel-call.cu
+++ b/test/Parser/cuda-kernel-call.cu
@@ -10,7 +10,8 @@ void foo(void) {
foo<<<>>>(); // expected-error {{expected expression}}
- S<S<S<int>>> s; // expected-error 2{{use '> >'}}
+ // The following two are parse errors because -std=c++11 is not enabled.
+ S<S<S<int>>> s; // expected-error 2{{use '> >'}}
(void)(&f<S<S<int>>>==0); // expected-error 2{{use '> >'}}
}
diff --git a/test/Parser/cxx-altivec.cpp b/test/Parser/cxx-altivec.cpp
index be00e494fd53..565decc601f8 100644
--- a/test/Parser/cxx-altivec.cpp
+++ b/test/Parser/cxx-altivec.cpp
@@ -1,4 +1,6 @@
// RUN: %clang_cc1 -triple=powerpc-apple-darwin8 -faltivec -fsyntax-only -verify -std=c++11 %s
+// RUN: %clang_cc1 -triple=powerpc64-unknown-linux-gnu -faltivec -fsyntax-only -verify -std=c++11 %s
+// RUN: %clang_cc1 -triple=powerpc64le-unknown-linux-gnu -faltivec -fsyntax-only -verify -std=c++11 %s
__vector char vv_c;
__vector signed char vv_sc;
@@ -93,8 +95,8 @@ void f() {
gccvector unsigned int gv = v;
gccvector int gvi = (gccvector int)v;
__attribute__((vector_size(8))) unsigned int gv8;
- gv8 = gccv; // expected-error {{assigning to '__attribute__((__vector_size__(2 * sizeof(unsigned int)))) unsigned int' from incompatible type '__attribute__((__vector_size__(4 * sizeof(unsigned int)))) unsigned int'}}
- av = gv8; // expected-error {{assigning to '__vector unsigned int' from incompatible type '__attribute__((__vector_size__(2 * sizeof(unsigned int)))) unsigned int'}}
+ gv8 = gccv; // expected-error {{assigning to '__attribute__((__vector_size__(2 * sizeof(unsigned int)))) unsigned int' (vector of 2 'unsigned int' values) from incompatible type '__attribute__((__vector_size__(4 * sizeof(unsigned int)))) unsigned int' (vector of 4 'unsigned int' values)}}
+ av = gv8; // expected-error {{assigning to '__vector unsigned int' (vector of 4 'unsigned int' values) from incompatible type '__attribute__((__vector_size__(2 * sizeof(unsigned int)))) unsigned int' (vector of 2 'unsigned int' values)}}
v = gccv;
__vector unsigned int tv = gccv;
diff --git a/test/Parser/cxx-ambig-decl-expr-xfail.cpp b/test/Parser/cxx-ambig-decl-expr-xfail.cpp
index ac4accb2acf9..85c34680f0a3 100644
--- a/test/Parser/cxx-ambig-decl-expr-xfail.cpp
+++ b/test/Parser/cxx-ambig-decl-expr-xfail.cpp
@@ -1,5 +1,7 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
// XFAIL: *
+// FIXME: This is PR7655
+
struct X {
template<typename T> X(T);
X(int, int);
diff --git a/test/Parser/cxx-casting.cpp b/test/Parser/cxx-casting.cpp
index 69680e421b0d..d2c97b88b809 100644
--- a/test/Parser/cxx-casting.cpp
+++ b/test/Parser/cxx-casting.cpp
@@ -90,5 +90,22 @@ void test3() {
// expected-error {{expected unqualified-id}}
}
+// Ensure that a C-style cast doesn't turn off colon protection.
+void PR19748() {
+ struct A {};
+ int A = 0, b;
+ int test1 = true ? (int)A : b;
+
+ struct f {};
+ extern B f(), (*p)();
+ (true ? (B(*)())f : p)();
+}
+
+void PR19751(int n) {
+ struct T { void operator++(int); };
+ (T())++; // ok, not an ill-formed cast to function type
+ (T())++n; // expected-error {{C-style cast from 'int' to 'T ()' is not allowed}}
+}
+
// PR13619. Must be at end of file.
int n = reinterpret_cast // expected-error {{expected '<'}} expected-error {{expected ';'}}
diff --git a/test/Parser/cxx-class.cpp b/test/Parser/cxx-class.cpp
index 5fac79728579..80cd8288011d 100644
--- a/test/Parser/cxx-class.cpp
+++ b/test/Parser/cxx-class.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s
+// RUN: %clang_cc1 -fsyntax-only -verify -pedantic -fcxx-exceptions %s
class C;
class C {
public:
@@ -113,6 +113,32 @@ namespace PR13775 {
}
}
+class pr16989 {
+ void tpl_mem(int *) {
+ return;
+ class C2 {
+ void f();
+ };
+ void C2::f() {} // expected-error{{function definition is not allowed here}}
+ };
+};
+
+namespace CtorErrors {
+ struct A {
+ A(NonExistent); // expected-error {{unknown type name 'NonExistent'}}
+ };
+ struct B {
+ B(NonExistent) : n(0) {} // expected-error {{unknown type name 'NonExistent'}}
+ int n;
+ };
+ struct C {
+ C(NonExistent) try {} catch (...) {} // expected-error {{unknown type name 'NonExistent'}}
+ };
+ struct D {
+ D(NonExistent) {} // expected-error {{unknown type name 'NonExistent'}}
+ };
+}
+
// PR11109 must appear at the end of the source file
class pr11109r3 { // expected-note{{to match this '{'}}
public // expected-error{{expected ':'}} expected-error{{expected '}'}} expected-error{{expected ';' after class}}
diff --git a/test/Parser/cxx-decl.cpp b/test/Parser/cxx-decl.cpp
index 8c4c6175f5c5..be79eb433fd0 100644
--- a/test/Parser/cxx-decl.cpp
+++ b/test/Parser/cxx-decl.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -verify -fsyntax-only -triple i386-linux -pedantic -fcxx-exceptions -fexceptions %s
+// RUN: %clang_cc1 -verify -fsyntax-only -triple i386-linux -pedantic-errors -fcxx-exceptions -fexceptions %s
-const char const *x10; // expected-warning {{duplicate 'const' declaration specifier}}
+const char const *x10; // expected-error {{duplicate 'const' declaration specifier}}
int x(*g); // expected-error {{use of undeclared identifier 'g'}}
@@ -46,7 +46,7 @@ class asm_class_test {
void foo() __asm__("baz");
};
-enum { fooenum = 1, }; // expected-warning {{commas at the end of enumerator lists are a C++11 extension}}
+enum { fooenum = 1, }; // expected-error {{commas at the end of enumerator lists are a C++11 extension}}
struct a {
int Type : fooenum;
@@ -81,7 +81,7 @@ namespace Commas {
(global5),
*global6,
&global7 = global1,
- &&global8 = static_cast<int&&>(global1), // expected-warning 2{{rvalue reference}}
+ &&global8 = static_cast<int&&>(global1), // expected-error 2{{rvalue reference}}
S::a,
global9,
global10 = 0,
@@ -181,7 +181,7 @@ void test (DIE die, DIE *Die, DIE INT, DIE *FLOAT) {
}
namespace PR15017 {
- template<typename T = struct X { int i; }> struct S {}; // expected-error {{'PR15017::X' can not be defined in a type specifier}}
+ template<typename T = struct X { int i; }> struct S {}; // expected-error {{'PR15017::X' cannot be defined in a type specifier}}
}
// Ensure we produce at least some diagnostic for attributes in C++98.
@@ -212,14 +212,14 @@ namespace PR5066 {
template<typename T> struct X {};
X<int N> x; // expected-error {{type-id cannot have a name}}
- using T = int (*T)(); // expected-error {{type-id cannot have a name}} expected-warning {{C++11}}
+ using T = int (*T)(); // expected-error {{type-id cannot have a name}} expected-error {{C++11}}
}
namespace PR17255 {
void foo() {
typename A::template B<>; // expected-error {{use of undeclared identifier 'A'}} \
// expected-error {{expected a qualified name after 'typename'}} \
- // expected-warning {{'template' keyword outside of a template}}
+ // expected-error {{'template' keyword outside of a template}}
}
}
@@ -232,6 +232,13 @@ namespace PR17567 {
FooBar::~FooBar() {} // expected-error {{undeclared}} expected-error {{expected the class name}}
}
+namespace DuplicateFriend {
+ struct A {
+ friend void friend f(); // expected-warning {{duplicate 'friend' declaration specifier}}
+ friend struct B friend; // expected-warning {{duplicate 'friend' declaration specifier}}
+ };
+}
+
// PR8380
extern "" // expected-error {{unknown linkage language}}
test6a { ;// expected-error {{C++ requires a type specifier for all declarations}} \
diff --git a/test/Parser/cxx-friend.cpp b/test/Parser/cxx-friend.cpp
index a3b89cc688bb..ace0ff26e2d9 100644
--- a/test/Parser/cxx-friend.cpp
+++ b/test/Parser/cxx-friend.cpp
@@ -30,7 +30,7 @@ class B {
void f(A *a) { a->f(); }
};
-void bar() {} // expected-note {{previous definition is here}}
+inline void bar() {} // expected-note {{previous definition is here}}
class E {
friend void bar() {} // expected-error {{redefinition of 'bar'}}
};
diff --git a/test/Parser/cxx-reference.cpp b/test/Parser/cxx-reference.cpp
index d21412cec0fc..b62638b1a4f9 100644
--- a/test/Parser/cxx-reference.cpp
+++ b/test/Parser/cxx-reference.cpp
@@ -10,7 +10,7 @@ void foo(int &a) {
typedef int & A;
-void g(const A aref) {
+void g(const A aref) { // expected-warning {{'const' qualifier on reference type 'A' (aka 'int &') has no effect}}
}
int & const X = val; // expected-error {{'const' qualifier may not be applied to a reference}}
diff --git a/test/Parser/cxx-template-argument.cpp b/test/Parser/cxx-template-argument.cpp
index 8bf2a4f78add..bbd53b2bdd69 100644
--- a/test/Parser/cxx-template-argument.cpp
+++ b/test/Parser/cxx-template-argument.cpp
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s -fdelayed-template-parsing
template<typename T> struct A {};
diff --git a/test/Parser/cxx-template-decl.cpp b/test/Parser/cxx-template-decl.cpp
index 81269ce25416..8b2b12037b3c 100644
--- a/test/Parser/cxx-template-decl.cpp
+++ b/test/Parser/cxx-template-decl.cpp
@@ -1,4 +1,8 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s -fdelayed-template-parsing -DDELAYED_TEMPLATE_PARSING
+// RUN: %clang_cc1 -fsyntax-only -verify -std=gnu++1z %s
+
+
// Errors
export class foo { }; // expected-error {{expected template}}
@@ -21,6 +25,11 @@ template <template X> struct Err1; // expected-error {{expected '<' after 'templ
template <template <typename> > struct Err2; // expected-error {{template template parameter requires 'class' after the parameter list}}
template <template <typename> Foo> struct Err3; // expected-error {{template template parameter requires 'class' after the parameter list}}
+template <template <typename> typename Foo> struct Cxx1z;
+#if __cplusplus <= 201402L
+// expected-warning@-2 {{extension}}
+#endif
+
// Template function declarations
template <typename T> void foo();
template <typename T, typename U> void foo();
@@ -102,7 +111,11 @@ template<template<typename> class T> struct shadow8 { // expected-note{{template
template<int Size>
void f(int& i) {
i = Size;
+ #ifdef DELAYED_TEMPLATE_PARSING
+ Size = i;
+ #else
Size = i; // expected-error{{expression is not assignable}}
+ #endif
}
template<typename T>
@@ -127,3 +140,73 @@ namespace PR6184 {
template <typename T>
void N::bar(typename T::x) { }
}
+
+// This PR occurred only in template parsing mode.
+namespace PR17637 {
+template <int>
+struct L {
+ template <typename T>
+ struct O {
+ template <typename U>
+ static void Fun(U);
+ };
+};
+
+template <int k>
+template <typename T>
+template <typename U>
+void L<k>::O<T>::Fun(U) {}
+
+void Instantiate() { L<0>::O<int>::Fun(0); }
+
+}
+
+namespace explicit_partial_specializations {
+typedef char (&oneT)[1];
+typedef char (&twoT)[2];
+typedef char (&threeT)[3];
+typedef char (&fourT)[4];
+typedef char (&fiveT)[5];
+typedef char (&sixT)[6];
+
+char one[1];
+char two[2];
+char three[3];
+char four[4];
+char five[5];
+char six[6];
+
+template<bool b> struct bool_ { typedef int type; };
+template<> struct bool_<false> { };
+
+#define XCAT(x,y) x ## y
+#define CAT(x,y) XCAT(x,y)
+#define sassert(_b_) bool_<(_b_)>::type CAT(var, __LINE__);
+
+
+template <int>
+struct L {
+ template <typename T>
+ struct O {
+ template <typename U>
+ static oneT Fun(U);
+
+ };
+};
+template <int k>
+template <typename T>
+template <typename U>
+oneT L<k>::O<T>::Fun(U) { return one; }
+
+template<>
+template<>
+template<typename U>
+oneT L<0>::O<char>::Fun(U) { return one; }
+
+
+void Instantiate() {
+ sassert(sizeof(L<0>::O<int>::Fun(0)) == sizeof(one));
+ sassert(sizeof(L<0>::O<char>::Fun(0)) == sizeof(one));
+}
+
+}
diff --git a/test/Parser/cxx-using-declaration.cpp b/test/Parser/cxx-using-declaration.cpp
index 320fd09e55a1..17237a3b9b2b 100644
--- a/test/Parser/cxx-using-declaration.cpp
+++ b/test/Parser/cxx-using-declaration.cpp
@@ -33,7 +33,7 @@ namespace E {
template <typename TYPE> int funcE(TYPE arg) { return(arg); }
}
-using E::funcE<int>; // expected-error{{using declaration can not refer to a template specialization}}
+using E::funcE<int>; // expected-error{{using declaration cannot refer to a template specialization}}
namespace F {
struct X;
diff --git a/test/Parser/cxx0x-ambig.cpp b/test/Parser/cxx0x-ambig.cpp
index 4c22ed3a9bbc..b06f432c4359 100644
--- a/test/Parser/cxx0x-ambig.cpp
+++ b/test/Parser/cxx0x-ambig.cpp
@@ -48,7 +48,7 @@ namespace bitfield {
};
// This could be a bit-field.
struct S2 {
- enum E : T { a = 1, b = 2, c = 3, 4 }; // expected-error {{non-integral type}} expected-error {{expected '}'}} expected-note {{to match}}
+ enum E : T { a = 1, b = 2, c = 3, 4 }; // expected-error {{non-integral type}} expected-error {{expected identifier}}
};
struct S3 {
enum E : int { a = 1, b = 2, c = 3, d }; // ok, defines an enum
@@ -64,7 +64,7 @@ namespace bitfield {
};
// This could be a bit-field.
struct S6 {
- enum E : int { 1 }; // expected-error {{expected '}'}} expected-note {{to match}}
+ enum E : int { 1 }; // expected-error {{expected identifier}}
};
struct U {
diff --git a/test/Parser/cxx0x-attributes.cpp b/test/Parser/cxx0x-attributes.cpp
index b02add98457e..f8abc76fb2f3 100644
--- a/test/Parser/cxx0x-attributes.cpp
+++ b/test/Parser/cxx0x-attributes.cpp
@@ -48,13 +48,13 @@ int array_attr [1] [[]];
alignas(8) int aligned_attr;
[[test::valid(for 42 [very] **** '+' symbols went on a trip and had a "good"_time; the end.)]] int garbage_attr; // expected-warning {{unknown attribute 'valid' ignored}}
[[,,,static, class, namespace,, inline, constexpr, mutable,, bitand, bitor::compl(!.*_ Cx.!U^*R),,,]] int more_garbage_attr; // expected-warning {{unknown attribute 'static' ignored}} \
- // expected-warning {{unknown attribute 'class' ignored}} \
- // expected-warning {{unknown attribute 'namespace' ignored}} \
- // expected-warning {{unknown attribute 'inline' ignored}} \
- // expected-warning {{unknown attribute 'constexpr' ignored}} \
- // expected-warning {{unknown attribute 'mutable' ignored}} \
- // expected-warning {{unknown attribute 'bitand' ignored}} \
- // expected-warning {{unknown attribute 'compl' ignored}}
+ // expected-warning {{unknown attribute 'class' ignored}} \
+ // expected-warning {{unknown attribute 'namespace' ignored}} \
+ // expected-warning {{unknown attribute 'inline' ignored}} \
+ // expected-warning {{unknown attribute 'constexpr' ignored}} \
+ // expected-warning {{unknown attribute 'mutable' ignored}} \
+ // expected-warning {{unknown attribute 'bitand' ignored}} \
+ // expected-warning {{unknown attribute 'compl' ignored}}
[[u8"invalid!"]] int invalid_string_attr; // expected-error {{expected ']'}}
void fn_attr () [[]];
void noexcept_fn_attr () noexcept [[]];
@@ -78,11 +78,11 @@ class c [[]] [[]] y [[]] [[]];
class c final [(int){0}];
class base {};
-class [[]] [[]] final_class
+class [[]] [[]] final_class
alignas(float) [[]] final // expected-error {{an attribute list cannot appear here}}
alignas(float) [[]] [[]] alignas(float): base{}; // expected-error {{an attribute list cannot appear here}}
-class [[]] [[]] final_class_another
+class [[]] [[]] final_class_another
[[]] [[]] alignas(16) final // expected-error {{an attribute list cannot appear here}}
[[]] [[]] alignas(16) [[]]{}; // expected-error {{an attribute list cannot appear here}}
@@ -120,7 +120,7 @@ extern "C++" [[]] { } // expected-error {{an attribute list cannot appear here}}
[[]] using ns::i; // expected-error {{an attribute list cannot appear here}}
[[unknown]] using namespace ns; // expected-warning {{unknown attribute 'unknown' ignored}}
-[[noreturn]] using namespace ns; // expected-error {{'noreturn' attribute only applies to functions and methods}}
+[[noreturn]] using namespace ns; // expected-error {{'noreturn' attribute only applies to functions}}
using [[]] alignas(4) [[]] ns::i; // expected-error {{an attribute list cannot appear here}}
using [[]] alignas(4) [[]] foobar = int; // expected-error {{an attribute list cannot appear here}} expected-error {{'alignas' attribute only applies to}}
@@ -146,7 +146,7 @@ template<typename T> using U [[]] = T;
using ns::i [[]]; // expected-error {{an attribute list cannot appear here}}
using [[]] ns::i; // expected-error {{an attribute list cannot appear here}}
using T [[unknown]] = int; // expected-warning {{unknown attribute 'unknown' ignored}}
-using T [[noreturn]] = int; // expected-error {{'noreturn' attribute only applies to functions and methods}}
+using T [[noreturn]] = int; // expected-error {{'noreturn' attribute only applies to functions}}
using V = int; // expected-note {{previous}}
using V [[gnu::vector_size(16)]] = int; // expected-error {{redefinition with different types}}
@@ -210,16 +210,16 @@ void foo () {
[[]] continue;
} while (0);
[[]] while (0);
-
+
[[]] switch (i) {
[[]] case 0:
[[]] default:
[[]] break;
}
-
+
[[]] goto there;
[[]] there:
-
+
[[]] try {
} [[]] catch (...) { // expected-error {{an attribute list cannot appear here}}
}
@@ -281,7 +281,8 @@ enum class [[]] EvenMoreSecrets {};
namespace arguments {
void f[[gnu::format(printf, 1, 2)]](const char*, ...);
- void g() [[unknown::foo(arguments of attributes from unknown namespace other than 'gnu' namespace are ignored... blah...)]]; // expected-warning {{unknown attribute 'foo' ignored}}
+ void g() [[unknown::foo(ignore arguments for unknown attributes, even with symbols!)]]; // expected-warning {{unknown attribute 'foo' ignored}}
+ [[deprecated("with argument")]] int i;
}
// Forbid attributes on decl specifiers.
@@ -297,7 +298,7 @@ int v4[2][[gnu::unused]]; // expected-warning {{attribute 'unused' ignored}}
int v5()[[gnu::unused]]; // expected-warning {{attribute 'unused' ignored}}
[[attribute_declaration]]; // expected-warning {{unknown attribute 'attribute_declaration' ignored}}
-[[noreturn]]; // expected-error {{'noreturn' attribute only applies to functions and methods}}
+[[noreturn]]; // expected-error {{'noreturn' attribute only applies to functions}}
[[carries_dependency]]; // expected-error {{'carries_dependency' attribute only applies to functions, methods, and parameters}}
class A {
@@ -309,8 +310,10 @@ namespace GccConst {
// GCC's tokenizer treats const and __const as the same token.
[[gnu::const]] int *f1();
[[gnu::__const]] int *f2();
+ [[gnu::__const__]] int *f3();
void f(const int *);
void g() { f(f1()); f(f2()); }
+ void h() { f(f3()); }
}
namespace GccASan {
@@ -319,3 +322,10 @@ namespace GccASan {
[[gnu::no_address_safety_analysis]] void f3();
[[gnu::no_sanitize_address]] void f4();
}
+
+namespace {
+ [[deprecated]] void bar();
+ [[deprecated("hello")]] void baz();
+ [[deprecated()]] void foo(); // expected-error {{parentheses must be omitted if 'deprecated' attribute's argument list is empty}}
+ [[gnu::deprecated()]] void quux();
+}
diff --git a/test/Parser/cxx0x-decl.cpp b/test/Parser/cxx0x-decl.cpp
index 257c56c9ce98..a0334cdde292 100644
--- a/test/Parser/cxx0x-decl.cpp
+++ b/test/Parser/cxx0x-decl.cpp
@@ -104,3 +104,21 @@ namespace UsingDeclAttrs {
using [[gnu::aligned(1)]] T = int; // expected-error {{an attribute list cannot appear here}}
using T = int [[gnu::aligned(1)]]; // expected-error {{'aligned' attribute cannot be applied to types}}
}
+
+namespace DuplicateSpecifier {
+ constexpr constexpr int f(); // expected-warning {{duplicate 'constexpr' declaration specifier}}
+ constexpr int constexpr a = 0; // expected-warning {{duplicate 'constexpr' declaration specifier}}
+
+ struct A {
+ friend constexpr int constexpr friend f(); // expected-warning {{duplicate 'friend' declaration specifier}} \
+ // expected-warning {{duplicate 'constexpr' declaration specifier}}
+ friend struct A friend; // expected-warning {{duplicate 'friend'}} expected-error {{'friend' must appear first}}
+ };
+}
+
+struct Base { virtual void f() = 0; virtual void g() = 0; virtual void h() = 0; };
+struct MemberComponentOrder : Base {
+ void f() override __asm__("foobar") __attribute__(( )) {}
+ void g() __attribute__(( )) override;
+ void h() __attribute__(( )) override {}
+};
diff --git a/test/Parser/cxx0x-for-range.cpp b/test/Parser/cxx0x-for-range.cpp
index f920ef9085b1..c3276ebeaabb 100644
--- a/test/Parser/cxx0x-for-range.cpp
+++ b/test/Parser/cxx0x-for-range.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
+// RUN: not %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits -std=c++11 %s 2>&1 | FileCheck %s
template<typename T, typename U>
struct pair {};
@@ -28,3 +28,35 @@ int foo(map<char*,int> &m) {
return n;
}
+
+namespace PR19176 {
+struct Vector {
+ struct iterator {
+ int &operator*();
+ iterator &operator++();
+ iterator &operator++(int);
+ bool operator==(const iterator &) const;
+ };
+ iterator begin();
+ iterator end();
+};
+
+void f() {
+ Vector v;
+ int a[] = {1, 2, 3, 4};
+ for (auto foo = a) // expected-error {{range-based 'for' statement uses ':', not '='}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:19-[[@LINE-1]]:20}:":"
+ (void)foo;
+ for (auto i
+ =
+ v) // expected-error@-1 {{range-based 'for' statement uses ':', not '='}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-2]]:7-[[@LINE-2]]:8}:":"
+ (void)i;
+#define FORRANGE(v, a) for (DECLVARWITHINIT(v) a) // expected-note {{expanded from macro}}
+#define DECLAUTOVAR(v) auto v
+#define DECLVARWITHINIT(v) DECLAUTOVAR(v) = // expected-note {{expanded from macro}}
+ FORRANGE(i, a) { // expected-error {{range-based 'for' statement uses ':', not '='}}
+
+ }
+}
+}
diff --git a/test/Parser/cxx0x-lambda-expressions.cpp b/test/Parser/cxx0x-lambda-expressions.cpp
index 289d03c223b3..8cfe7f3b02da 100644
--- a/test/Parser/cxx0x-lambda-expressions.cpp
+++ b/test/Parser/cxx0x-lambda-expressions.cpp
@@ -2,6 +2,8 @@
enum E { e };
+constexpr int id(int n) { return n; }
+
class C {
int f() {
@@ -34,12 +36,18 @@ class C {
typedef int T;
const int b = 0;
const int c = 1;
- int a1[1] = {[b] (T()) {}}; // expected-error{{no viable conversion from '<lambda}}
+ int d;
+ int a1[1] = {[b] (T()) {}}; // expected-error{{no viable conversion from '(lambda}}
int a2[1] = {[b] = 1 };
- int a3[1] = {[b,c] = 1 }; // expected-error{{expected body of lambda expression}}
+ int a3[1] = {[b,c] = 1 }; // expected-error{{expected ']'}} expected-note {{to match}}
int a4[1] = {[&b] = 1 }; // expected-error{{integral constant expression must have integral or unscoped enumeration type, not 'const int *'}}
int a5[3] = { []{return 0;}() };
int a6[1] = {[this] = 1 }; // expected-error{{integral constant expression must have integral or unscoped enumeration type, not 'C *'}}
+ int a7[1] = {[d(0)] { return d; } ()}; // expected-warning{{extension}}
+ int a8[1] = {[d = 0] { return d; } ()}; // expected-warning{{extension}}
+ int a9[1] = {[d = 0] = 1}; // expected-error{{is not an integral constant expression}}
+ int a10[1] = {[id(0)] { return id; } ()}; // expected-warning{{extension}}
+ int a11[1] = {[id(0)] = 1};
}
void delete_lambda(int *p) {
@@ -64,4 +72,22 @@ class C {
return x + 2;
} ();
}
+
+ void attributes() {
+ [] [[]] {}; // expected-error {{lambda requires '()' before attribute specifier}}
+ [] __attribute__((noreturn)) {}; // expected-error {{lambda requires '()' before attribute specifier}}
+ []() [[]]
+ mutable {}; // expected-error {{expected body of lambda expression}}
+
+ []() [[]] {};
+ []() [[]] -> void {};
+ []() mutable [[]] -> void {};
+ []() mutable noexcept [[]] -> void {};
+
+ // Testing GNU-style attributes on lambdas -- the attribute is specified
+ // before the mutable specifier instead of after (unlike C++11).
+ []() __attribute__((noreturn)) mutable { while(1); };
+ []() mutable
+ __attribute__((noreturn)) { while(1); }; // expected-error {{expected body of lambda expression}}
+ }
};
diff --git a/test/Parser/cxx0x-member-initializers.cpp b/test/Parser/cxx0x-member-initializers.cpp
index 43e99b133646..4d14394c0794 100644
--- a/test/Parser/cxx0x-member-initializers.cpp
+++ b/test/Parser/cxx0x-member-initializers.cpp
@@ -37,3 +37,7 @@ struct A {
bool d1 = T1<int, T1<int, int>>::V < 3, d2;
T1<int, int()> e = T1<int, int()>();
};
+
+struct PR19993 {
+ static int n = delete; // expected-error {{only functions can have deleted definitions}}
+};
diff --git a/test/Parser/cxx0x-rvalue-reference.cpp b/test/Parser/cxx0x-rvalue-reference.cpp
index e57e6013e5e7..613b8289fdff 100644
--- a/test/Parser/cxx0x-rvalue-reference.cpp
+++ b/test/Parser/cxx0x-rvalue-reference.cpp
@@ -3,7 +3,7 @@
int && r1(int &&a);
typedef int && R;
-void r2(const R a) {
+void r2(const R a) { // expected-warning {{'const' qualifier on reference type 'R' (aka 'int &&') has no effect}}
int & &&ar = a; // expected-error{{'ar' declared as a reference to a reference}}
}
diff --git a/test/Parser/cxx11-type-specifier.cpp b/test/Parser/cxx11-type-specifier.cpp
index c66462a84f01..1676623ef65b 100644
--- a/test/Parser/cxx11-type-specifier.cpp
+++ b/test/Parser/cxx11-type-specifier.cpp
@@ -15,8 +15,8 @@ void f() {
// These parse as type definitions, not as type references with braced
// initializers. Sad but true...
- (void) new struct S {}; // expected-error{{'S' can not be defined in a type specifier}}
- (void) new enum E { e }; // expected-error{{'E' can not be defined in a type specifier}}
+ (void) new struct S {}; // expected-error{{'S' cannot be defined in a type specifier}}
+ (void) new enum E { e }; // expected-error{{'E' cannot be defined in a type specifier}}
}
// And for trailing-type-specifier-seq
diff --git a/test/Parser/cxx11-user-defined-literals.cpp b/test/Parser/cxx11-user-defined-literals.cpp
index 613c0b9ec6ee..b89a57418656 100644
--- a/test/Parser/cxx11-user-defined-literals.cpp
+++ b/test/Parser/cxx11-user-defined-literals.cpp
@@ -15,7 +15,7 @@ _Pragma("comment(lib, \"foo\"_bar)") // expected-error {{user-defined suffix can
#elif __has_include("foo"_bar) // expected-error {{expected "FILENAME" or <FILENAME>}}
#endif
-extern "C++"_x {} // expected-error {{user-defined suffix cannot be used here}} expected-error {{unknown linkage language}}
+extern "C++"_x {} // expected-error {{user-defined suffix cannot be used here}}
int f() {
asm("mov %eax, %rdx"_foo); // expected-error {{user-defined suffix cannot be used here}}
@@ -111,3 +111,35 @@ void operator "" ""
U"" // expected-error {{cannot have an encoding prefix}}
"" _also_not_char(const char *);
void operator "" u8"" "\u0123" "hello"_all_of_the_things ""(const char*); // expected-error {{must be '""'}}
+
+// Make sure we treat UCNs and UTF-8 as equivalent.
+int operator""_µs(unsigned long long) {} // expected-note {{previous}}
+int hundred_µs = 50_µs + 50_\u00b5s;
+int operator""_\u00b5s(unsigned long long) {} // expected-error {{redefinition of 'operator "" _µs'}}
+
+int operator""_\U0000212B(long double) {} // expected-note {{previous}}
+int hundred_Å = 50.0_Å + 50._\U0000212B;
+int operator""_Å(long double) {} // expected-error {{redefinition of 'operator "" _Å'}}
+
+int operator""_𐀀(char) {} // expected-note {{previous}}
+int 𐀀 = '4'_𐀀 + '2'_\U00010000;
+int operator""_\U00010000(char) {} // expected-error {{redefinition of 'operator "" _𐀀'}}
+
+// These all declare the same function.
+int operator""_℮""_\u212e""_\U0000212e""(const char*, size_t);
+int operator""_\u212e""_\U0000212e""_℮""(const char*, size_t);
+int operator""_\U0000212e""_℮""_\u212e""(const char*, size_t);
+int mix_ucn_utf8 = ""_℮""_\u212e""_\U0000212e"";
+
+void operator""_℮""_ℯ(unsigned long long) {} // expected-error {{differing user-defined suffixes ('_℮' and '_ℯ') in string literal concatenation}}
+void operator""_℮""_\u212f(unsigned long long) {} // expected-error {{differing user-defined suffixes ('_℮' and '_ℯ') in string literal concatenation}}
+void operator""_\u212e""_ℯ(unsigned long long) {} // expected-error {{differing user-defined suffixes ('_℮' and '_ℯ') in string literal concatenation}}
+void operator""_\u212e""_\u212f(unsigned long long) {} // expected-error {{differing user-defined suffixes ('_℮' and '_ℯ') in string literal concatenation}}
+
+void operator""_℮""_℮(unsigned long long) {} // expected-note {{previous}}
+void operator""_\u212e""_\u212e(unsigned long long) {} // expected-error {{redefinition}}
+
+#define ¢ *0.01 // expected-error {{macro name must be an identifier}}
+constexpr int operator""_¢(long double d) { return d * 100; } // expected-error {{non-ASCII}}
+constexpr int operator""_¢(unsigned long long n) { return n; } // expected-error {{non-ASCII}}
+static_assert(0.02_¢ == 2_¢, ""); // expected-error 2{{non-ASCII}}
diff --git a/test/Parser/declarators.c b/test/Parser/declarators.c
index 210a8e2befc7..39d9dc94490d 100644
--- a/test/Parser/declarators.c
+++ b/test/Parser/declarators.c
@@ -100,6 +100,7 @@ long struct X { int x; } test15(); // expected-error {{'long struct' is invalid}
void test16(i) int i j; { } // expected-error {{expected ';' at end of declaration}}
void test17(i, j) int i, j k; { } // expected-error {{expected ';' at end of declaration}}
+void knrNoSemi(i) int i { } // expected-error {{expected ';' at end of declaration}}
// PR12595
@@ -113,3 +114,37 @@ struct EnumBitfield { // expected-warning {{struct without named members is a GN
struct S { int n; }: // expected-error {{expected ';'}}
};
+
+// PR10982
+enum E11 {
+ A1 = 1,
+};
+
+enum E12 {
+ , // expected-error{{expected identifier}}
+ A2
+};
+void func_E12(enum E12 *p) { *p = A2; }
+
+enum E13 {
+ 1D, // expected-error{{expected identifier}}
+ A3
+};
+void func_E13(enum E13 *p) { *p = A3; }
+
+enum E14 {
+ A4 12, // expected-error{{expected '= constant-expression' or end of enumerator definition}}
+ A4a
+};
+void func_E14(enum E14 *p) { *p = A4a; }
+
+enum E15 {
+ A5=12 4, // expected-error{{expected '}' or ','}}
+ A5a
+};
+void func_E15(enum E15 *p) { *p = A5a; }
+
+enum E16 {
+ A6; // expected-error{{expected '= constant-expression' or end of enumerator definition}}
+ A6a
+};
diff --git a/test/Parser/diag-crash.c b/test/Parser/diag-crash.c
new file mode 100644
index 000000000000..4f1265f2b9c3
--- /dev/null
+++ b/test/Parser/diag-crash.c
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+// Avoid preprocessor diag crash caused by a parser diag left in flight.
+
+int foo: // expected-error {{expected ';' after top level declarator}}
+#endif // expected-error {{#endif without #if}}
diff --git a/test/Parser/eof.cpp b/test/Parser/eof.cpp
new file mode 100644
index 000000000000..3c966c50e1db
--- /dev/null
+++ b/test/Parser/eof.cpp
@@ -0,0 +1,13 @@
+// RUN: not %clang_cc1 %s -fsyntax-only 2>&1 | FileCheck %s
+
+// CHECK: error: expected member name or ';' after declaration specifiers
+// CHECK: error: expected '}'
+// CHECK: note: to match this '{'
+// CHECK: error: expected ';' after class
+// CHECK: error: anonymous structs and classes must be class members
+// CHECK: 4 errors generated.
+
+// Do not add anything to the end of this file. This requires the whitespace
+// plus EOF after the template keyword.
+
+class { template
diff --git a/test/Parser/expressions.c b/test/Parser/expressions.c
index 95d6fb354f3f..64b44470f7e7 100644
--- a/test/Parser/expressions.c
+++ b/test/Parser/expressions.c
@@ -67,3 +67,9 @@ void func_16992 () {
int x3 = __alignof int; // expected-error {{expected parentheses around type name in __alignof expression}}
int x4 = _Alignof int; // expected-error {{expected parentheses around type name in _Alignof expression}}
}
+
+void callee(double, double);
+void test8() {
+ callee(foobar, // expected-error {{use of undeclared identifier 'foobar'}}
+ fizbin); // expected-error {{use of undeclared identifier 'fizbin'}}
+}
diff --git a/test/Parser/ms-if-exists.cpp b/test/Parser/ms-if-exists.cpp
new file mode 100644
index 000000000000..79cc571a357f
--- /dev/null
+++ b/test/Parser/ms-if-exists.cpp
@@ -0,0 +1,117 @@
+// RUN: %clang_cc1 %s -std=c++11 -fsyntax-only -Wmicrosoft -verify -fms-extensions
+
+class MayExist {
+private:
+ typedef int Type;
+};
+
+void test_if_exists_stmts() {
+ int b = 0;
+ __if_exists(MayExist::Type) {
+ b++;
+ b++;
+ }
+ __if_exists(MayExist::Type_not) {
+ this will not compile.
+ }
+ __if_not_exists(MayExist::Type) {
+ this will not compile.
+ }
+ __if_not_exists(MayExist::Type_not) {
+ b++;
+ b++;
+ }
+}
+
+int if_exists_creates_no_scope() {
+ __if_exists(MayExist::Type) {
+ int x; // 'x' is declared in the parent scope.
+ }
+ __if_not_exists(MayExist::Type_not) {
+ x++;
+ }
+ return x;
+}
+
+__if_exists(MayExist::Type) {
+ int var23;
+}
+
+__if_exists(MayExist::Type_not) {
+ this will not compile.
+}
+
+__if_not_exists(MayExist::Type) {
+ this will not compile.
+}
+
+__if_not_exists(MayExist::Type_not) {
+ int var244;
+}
+
+void test_if_exists_init_list() {
+
+ int array1[] = {
+ 0,
+ __if_exists(MayExist::Type) {2, }
+ 3
+ };
+
+ int array2[] = {
+ 0,
+ __if_exists(MayExist::Type_not) { this will not compile }
+ 3
+ };
+
+ int array3[] = {
+ 0,
+ __if_not_exists(MayExist::Type_not) {2, }
+ 3
+ };
+
+ int array4[] = {
+ 0,
+ __if_not_exists(MayExist::Type) { this will not compile }
+ 3
+ };
+
+}
+
+
+class IfExistsClassScope {
+ __if_exists(MayExist::Type) {
+ // __if_exists, __if_not_exists can nest
+ __if_not_exists(MayExist::Type_not) {
+ int var123;
+ }
+ int var23;
+ }
+
+ __if_exists(MayExist::Type_not) {
+ this will not compile.
+ }
+
+ __if_not_exists(MayExist::Type) {
+ this will not compile.
+ }
+
+ __if_not_exists(MayExist::Type_not) {
+ int var244;
+ }
+};
+
+void test_nested_if_exists() {
+ __if_exists(MayExist::Type) {
+ int x = 42;
+ __if_not_exists(MayExist::Type_not) {
+ x++;
+ }
+ }
+}
+
+void test_attribute_on_if_exists() {
+ [[clang::fallthrough]] // expected-error {{an attribute list cannot appear here}}
+ __if_exists(MayExist::Type) {
+ int x;
+ }
+}
diff --git a/test/Parser/ms-inline-asm-nested-braces.c b/test/Parser/ms-inline-asm-nested-braces.c
new file mode 100644
index 000000000000..58b055bb1a2a
--- /dev/null
+++ b/test/Parser/ms-inline-asm-nested-braces.c
@@ -0,0 +1,9 @@
+// REQUIRES: x86-registered-target
+// RUN: %clang_cc1 %s -triple i386-apple-darwin10 -verify -fasm-blocks
+
+int t_fail() { // expected-note {{to match this}}
+ __asm
+ { // expected-note {{to match this}}
+ { // expected-note {{to match this}}
+ {
+ } // expected-error 3 {{expected}}
diff --git a/test/Parser/ms-inline-asm.c b/test/Parser/ms-inline-asm.c
index dff19b4654b0..00508f5cf098 100644
--- a/test/Parser/ms-inline-asm.c
+++ b/test/Parser/ms-inline-asm.c
@@ -1,4 +1,4 @@
-// REQUIRES: disabled
+// REQUIRES: x86-registered-target
// RUN: %clang_cc1 %s -triple i386-apple-darwin10 -verify -fasm-blocks
#define M __asm int 0x2c
@@ -34,6 +34,20 @@ void t8() {
void t9() {
__asm nop __asm nop ; __asm nop
}
+void t10() {
+ __asm {
+ mov eax, 0
+ __asm {
+ mov eax, 1
+ {
+ mov eax, 2
+ }
+ }
+ }
+}
+void t11() {
+ do { __asm mov eax, 0 __asm { __asm mov edx, 1 } } while(0);
+}
int t_fail() { // expected-note {{to match this}}
__asm
__asm { // expected-error 3 {{expected}} expected-note {{to match this}}
diff --git a/test/Parser/namespace-alias-attr.cpp b/test/Parser/namespace-alias-attr.cpp
index ba809229a646..0baba8493d0f 100644
--- a/test/Parser/namespace-alias-attr.cpp
+++ b/test/Parser/namespace-alias-attr.cpp
@@ -4,5 +4,5 @@ namespace A
{
}
-namespace B __attribute__ (( static )) = A; // expected-error{{attributes can not be specified on namespace alias}}
+namespace B __attribute__ (( static )) = A; // expected-error{{attributes cannot be specified on namespace alias}}
diff --git a/test/Parser/objc-error-qualified-implementation.m b/test/Parser/objc-error-qualified-implementation.m
index 8bbd50236027..664737223e67 100644
--- a/test/Parser/objc-error-qualified-implementation.m
+++ b/test/Parser/objc-error-qualified-implementation.m
@@ -6,24 +6,24 @@
@interface I @end
-@implementation I<P> @end // expected-error {{@implementation declaration can not be protocol qualified}}
+@implementation I<P> @end // expected-error {{@implementation declaration cannot be protocol qualified}}
@interface J < P,P >
@end
-@implementation J < P,P > // expected-error {{@implementation declaration can not be protocol qualified}}
+@implementation J < P,P > // expected-error {{@implementation declaration cannot be protocol qualified}}
@end
@interface K @end
-@implementation K <P // expected-error {{@implementation declaration can not be protocol qualified}}
+@implementation K <P // expected-error {{@implementation declaration cannot be protocol qualified}}
@end // expected-error {{expected '>'}}
// rdar://13920026
-@implementation I (Cat) <P> // expected-error {{@implementation declaration can not be protocol qualified}}
+@implementation I (Cat) <P> // expected-error {{@implementation declaration cannot be protocol qualified}}
- (void) Meth {}
@end
-@implementation I (Cat1) <P // expected-error {{@implementation declaration can not be protocol qualified}}
+@implementation I (Cat1) <P // expected-error {{@implementation declaration cannot be protocol qualified}}
@end // expected-error {{expected '>'}}
diff --git a/test/Parser/objcbridge-related-attribute.m b/test/Parser/objcbridge-related-attribute.m
new file mode 100644
index 000000000000..209448bba8ce
--- /dev/null
+++ b/test/Parser/objcbridge-related-attribute.m
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -verify -fsyntax-only %s
+// rdar://15499111
+
+typedef struct __attribute__((objc_bridge_related(NSColor,colorWithCGColor:,CGColor))) CGColor *CGColorRefOk;
+typedef struct __attribute__((objc_bridge_related(NSColor,,CGColor))) CGColor *CGColorRef1Ok;
+typedef struct __attribute__((objc_bridge_related(NSColor,,))) CGColor *CGColorRef2Ok;
+typedef struct __attribute__((objc_bridge_related(NSColor,colorWithCGColor:,))) CGColor *CGColorRef3Ok;
+
+typedef struct __attribute__((objc_bridge_related(,colorWithCGColor:,CGColor))) CGColor *CGColorRef1NotOk; // expected-error {{expected a related ObjectiveC class name, e.g., 'NSColor'}}
+typedef struct __attribute__((objc_bridge_related(NSColor,colorWithCGColor,CGColor))) CGColor *CGColorRef2NotOk; // expected-error {{expected a class method selector with single argument, e.g., 'colorWithCGColor:'}}
+typedef struct __attribute__((objc_bridge_related(NSColor,colorWithCGColor::,CGColor))) CGColor *CGColorRef3NotOk; // expected-error {{expected a class method selector with single argument, e.g., 'colorWithCGColor:'}}
+typedef struct __attribute__((objc_bridge_related(12,colorWithCGColor:,CGColor))) CGColor *CGColorRef4NotOk; // expected-error {{expected a related ObjectiveC class name, e.g., 'NSColor'}}
+typedef struct __attribute__((objc_bridge_related(NSColor,+:,CGColor))) CGColor *CGColorRef5NotOk; // expected-error {{expected ','}}
+typedef struct __attribute__((objc_bridge_related(NSColor,colorWithCGColor:,+))) CGColor *CGColorRef6NotOk; // expected-error {{expected ')'}}
+
diff --git a/test/Parser/objcxx11-attributes.mm b/test/Parser/objcxx11-attributes.mm
index c1d8c4132dc7..4bff2151a9c6 100644
--- a/test/Parser/objcxx11-attributes.mm
+++ b/test/Parser/objcxx11-attributes.mm
@@ -13,12 +13,12 @@ void f(X *noreturn) {
int a[ [noreturn getSize] ];
// ... but is interpreted as an attribute where possible.
- int b[ [noreturn] ]; // expected-error {{'noreturn' attribute only applies to functions and methods}}
+ int b[ [noreturn] ]; // expected-error {{'noreturn' attribute only applies to functions}}
int c[ [noreturn getSize] + 1 ];
// An array size which is computed by a lambda is not OK.
- int d[ [noreturn] { return 3; } () ]; // expected-error {{expected ']'}} expected-error {{'noreturn' attribute only applies}}
+ int d[ [noreturn] { return 3; } () ]; // expected-error {{expected ']'}} expected-error {{'noreturn' attribute only applies to functions}}
// A message send which contains a message send is OK.
[ [ X alloc ] init ];
diff --git a/test/Parser/opencl-astype.cl b/test/Parser/opencl-astype.cl
index d4c547e5cb82..72f98a4ace9f 100644
--- a/test/Parser/opencl-astype.cl
+++ b/test/Parser/opencl-astype.cl
@@ -11,7 +11,7 @@ void test_astype() {
typedef __attribute__(( ext_vector_type(4) )) double double4;
float4 f4;
- double4 d4 = __builtin_astype(f4, double4); // expected-error{{invalid reinterpretation: sizes of 'double4' and 'float4' must match}}
+ double4 d4 = __builtin_astype(f4, double4); // expected-error{{invalid reinterpretation: sizes of 'double4' (vector of 4 'double' values) and 'float4' (vector of 4 'float' values) must match}}
// Verify int4->float3, float3->int4 works.
int4 i4;
diff --git a/test/Parser/opencl-keywords.cl b/test/Parser/opencl-keywords.cl
new file mode 100644
index 000000000000..5bc705493737
--- /dev/null
+++ b/test/Parser/opencl-keywords.cl
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only
+// expected-no-diagnostics
+
+void f(half *h) {
+ bool b;
+ int wchar_t;
+ int constexpr;
+}
diff --git a/test/Parser/pragma-loop.cpp b/test/Parser/pragma-loop.cpp
new file mode 100644
index 000000000000..23f185d52284
--- /dev/null
+++ b/test/Parser/pragma-loop.cpp
@@ -0,0 +1,166 @@
+// RUN: %clang_cc1 -std=c++11 -verify %s
+
+// Note that this puts the expected lines before the directives to work around
+// limitations in the -verify mode.
+
+void test(int *List, int Length) {
+ int i = 0;
+
+#pragma clang loop vectorize(enable)
+#pragma clang loop interleave(enable)
+#pragma clang loop unroll(enable)
+ while (i + 1 < Length) {
+ List[i] = i;
+ }
+
+#pragma clang loop vectorize_width(4)
+#pragma clang loop interleave_count(8)
+#pragma clang loop unroll_count(16)
+ while (i < Length) {
+ List[i] = i;
+ }
+
+#pragma clang loop vectorize(disable)
+#pragma clang loop interleave(disable)
+#pragma clang loop unroll(disable)
+ while (i - 1 < Length) {
+ List[i] = i;
+ }
+
+#pragma clang loop vectorize_width(4) interleave_count(8) unroll_count(16)
+ while (i - 2 < Length) {
+ List[i] = i;
+ }
+
+#pragma clang loop interleave_count(16)
+ while (i - 3 < Length) {
+ List[i] = i;
+ }
+
+ int VList[Length];
+#pragma clang loop vectorize(disable) interleave(disable) unroll(disable)
+ for (int j : VList) {
+ VList[j] = List[j];
+ }
+
+/* expected-error {{expected '('}} */ #pragma clang loop vectorize
+/* expected-error {{expected '('}} */ #pragma clang loop interleave
+/* expected-error {{expected '('}} */ #pragma clang loop unroll
+
+/* expected-error {{expected ')'}} */ #pragma clang loop vectorize(enable
+/* expected-error {{expected ')'}} */ #pragma clang loop interleave(enable
+/* expected-error {{expected ')'}} */ #pragma clang loop unroll(enable
+
+/* expected-error {{expected ')'}} */ #pragma clang loop vectorize_width(4
+/* expected-error {{expected ')'}} */ #pragma clang loop interleave_count(4
+/* expected-error {{expected ')'}} */ #pragma clang loop unroll_count(4
+
+/* expected-error {{missing argument to '#pragma clang loop vectorize'; expected a positive integer value}} */ #pragma clang loop vectorize()
+/* expected-error {{missing argument to '#pragma clang loop interleave_count'; expected a positive integer value}} */ #pragma clang loop interleave_count()
+/* expected-error {{missing argument to '#pragma clang loop unroll'; expected a positive integer value}} */ #pragma clang loop unroll()
+
+/* expected-error {{missing option}} */ #pragma clang loop
+/* expected-error {{invalid option 'badkeyword'}} */ #pragma clang loop badkeyword
+/* expected-error {{invalid option 'badkeyword'}} */ #pragma clang loop badkeyword(enable)
+/* expected-error {{invalid option 'badkeyword'}} */ #pragma clang loop vectorize(enable) badkeyword(4)
+/* expected-warning {{extra tokens at end of '#pragma clang loop'}} */ #pragma clang loop vectorize(enable) ,
+
+ while (i-4 < Length) {
+ List[i] = i;
+ }
+
+/* expected-error {{invalid argument; expected a positive integer value}} */ #pragma clang loop vectorize_width(0)
+/* expected-error {{invalid argument; expected a positive integer value}} */ #pragma clang loop interleave_count(0)
+/* expected-error {{invalid argument; expected a positive integer value}} */ #pragma clang loop unroll_count(0)
+ while (i-5 < Length) {
+ List[i] = i;
+ }
+
+/* expected-error {{invalid argument; expected a positive integer value}} */ #pragma clang loop vectorize_width(3000000000)
+/* expected-error {{invalid argument; expected a positive integer value}} */ #pragma clang loop interleave_count(3000000000)
+/* expected-error {{invalid argument; expected a positive integer value}} */ #pragma clang loop unroll_count(3000000000)
+ while (i-6 < Length) {
+ List[i] = i;
+ }
+
+/* expected-error {{invalid argument; expected a positive integer value}} */ #pragma clang loop vectorize_width(badvalue)
+/* expected-error {{invalid argument; expected a positive integer value}} */ #pragma clang loop interleave_count(badvalue)
+/* expected-error {{invalid argument; expected a positive integer value}} */ #pragma clang loop unroll_count(badvalue)
+ while (i-6 < Length) {
+ List[i] = i;
+ }
+
+/* expected-error {{invalid argument; expected 'enable' or 'disable'}} */ #pragma clang loop vectorize(badidentifier)
+/* expected-error {{invalid argument; expected 'enable' or 'disable'}} */ #pragma clang loop interleave(badidentifier)
+/* expected-error {{invalid argument; expected 'enable' or 'disable'}} */ #pragma clang loop unroll(badidentifier)
+ while (i-7 < Length) {
+ List[i] = i;
+ }
+
+// PR20069 - Loop pragma arguments that are not identifiers or numeric
+// constants crash FE.
+/* expected-error {{invalid argument; expected 'enable' or 'disable'}} */ #pragma clang loop vectorize(()
+/* expected-error {{invalid argument; expected 'enable' or 'disable'}} */ #pragma clang loop interleave(*)
+/* expected-error {{invalid argument; expected 'enable' or 'disable'}} */ #pragma clang loop unroll(=)
+/* expected-error {{invalid argument; expected a positive integer value}} */ #pragma clang loop vectorize_width(^)
+/* expected-error {{invalid argument; expected a positive integer value}} */ #pragma clang loop interleave_count(/)
+/* expected-error {{invalid argument; expected a positive integer value}} */ #pragma clang loop unroll_count(==)
+ while (i-8 < Length) {
+ List[i] = i;
+ }
+
+#pragma clang loop vectorize(enable)
+/* expected-error {{expected a for, while, or do-while loop to follow '#pragma clang loop'}} */ int j = Length;
+ List[0] = List[1];
+
+ while (j-1 < Length) {
+ List[j] = j;
+ }
+
+// FIXME: A bug in ParsedAttributes causes the order of the attributes to be
+// processed in reverse. Consequently, the errors occur on the first of pragma
+// of the next three tests rather than the last, and the order of the kinds
+// is also reversed.
+
+/* expected-error {{incompatible directives 'vectorize(disable)' and 'vectorize_width(4)'}} */ #pragma clang loop vectorize_width(4)
+#pragma clang loop vectorize(disable)
+/* expected-error {{incompatible directives 'interleave(disable)' and 'interleave_count(4)'}} */ #pragma clang loop interleave_count(4)
+#pragma clang loop interleave(disable)
+/* expected-error {{incompatible directives 'unroll(disable)' and 'unroll_count(4)'}} */ #pragma clang loop unroll_count(4)
+#pragma clang loop unroll(disable)
+ while (i-8 < Length) {
+ List[i] = i;
+ }
+
+/* expected-error {{duplicate directives 'vectorize(disable)' and 'vectorize(enable)'}} */ #pragma clang loop vectorize(enable)
+#pragma clang loop vectorize(disable)
+/* expected-error {{duplicate directives 'interleave(disable)' and 'interleave(enable)'}} */ #pragma clang loop interleave(enable)
+#pragma clang loop interleave(disable)
+/* expected-error {{duplicate directives 'unroll(disable)' and 'unroll(enable)'}} */ #pragma clang loop unroll(enable)
+#pragma clang loop unroll(disable)
+ while (i-9 < Length) {
+ List[i] = i;
+ }
+
+/* expected-error {{incompatible directives 'vectorize(disable)' and 'vectorize_width(4)'}} */ #pragma clang loop vectorize(disable)
+#pragma clang loop vectorize_width(4)
+/* expected-error {{incompatible directives 'interleave(disable)' and 'interleave_count(4)'}} */ #pragma clang loop interleave(disable)
+#pragma clang loop interleave_count(4)
+/* expected-error {{incompatible directives 'unroll(disable)' and 'unroll_count(4)'}} */ #pragma clang loop unroll(disable)
+#pragma clang loop unroll_count(4)
+ while (i-10 < Length) {
+ List[i] = i;
+ }
+
+/* expected-error {{duplicate directives 'vectorize_width(4)' and 'vectorize_width(8)'}} */ #pragma clang loop vectorize_width(8)
+#pragma clang loop vectorize_width(4)
+/* expected-error {{duplicate directives 'interleave_count(4)' and 'interleave_count(8)'}} */ #pragma clang loop interleave_count(8)
+#pragma clang loop interleave_count(4)
+/* expected-error {{duplicate directives 'unroll_count(4)' and 'unroll_count(8)'}} */ #pragma clang loop unroll_count(8)
+#pragma clang loop unroll_count(4)
+ while (i-11 < Length) {
+ List[i] = i;
+ }
+
+#pragma clang loop interleave(enable)
+/* expected-error {{expected statement}} */ }
diff --git a/test/Parser/pragma-optimize-diagnostics.cpp b/test/Parser/pragma-optimize-diagnostics.cpp
new file mode 100644
index 000000000000..af11a4ef8153
--- /dev/null
+++ b/test/Parser/pragma-optimize-diagnostics.cpp
@@ -0,0 +1,28 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+#pragma clang optimize off
+
+#pragma clang optimize on
+
+// Extra arguments
+#pragma clang optimize on top of spaghetti // expected-error {{unexpected extra argument 'top' to '#pragma clang optimize'}}
+
+// Wrong argument
+#pragma clang optimize something_wrong // expected-error {{unexpected argument 'something_wrong' to '#pragma clang optimize'; expected 'on' or 'off'}}
+
+// No argument
+#pragma clang optimize // expected-error {{missing argument to '#pragma clang optimize'; expected 'on' or 'off'}}
+
+// Check that macros can be used in the pragma
+#define OFF off
+#define ON on
+#pragma clang optimize OFF
+#pragma clang optimize ON
+
+// Check that _Pragma can also be used to address the use case where users want
+// to define optimization control macros to abstract out which compiler they are
+// using.
+#define OPT_OFF _Pragma("clang optimize off")
+#define OPT_ON _Pragma("clang optimize on")
+OPT_OFF
+OPT_ON
diff --git a/test/Parser/pragma-unroll.cpp b/test/Parser/pragma-unroll.cpp
new file mode 100644
index 000000000000..1d89e63028c4
--- /dev/null
+++ b/test/Parser/pragma-unroll.cpp
@@ -0,0 +1,89 @@
+// RUN: %clang_cc1 -std=c++11 -verify %s
+
+// Note that this puts the expected lines before the directives to work around
+// limitations in the -verify mode.
+
+void test(int *List, int Length) {
+ int i = 0;
+
+#pragma unroll
+ while (i + 1 < Length) {
+ List[i] = i;
+ }
+
+#pragma unroll 4
+ while (i - 1 < Length) {
+ List[i] = i;
+ }
+
+#pragma unroll(8)
+ while (i - 2 < Length) {
+ List[i] = i;
+ }
+
+#pragma unroll
+#pragma unroll(8)
+ while (i - 3 < Length) {
+ List[i] = i;
+ }
+
+#pragma clang loop unroll(enable)
+#pragma unroll(8)
+ while (i - 4 < Length) {
+ List[i] = i;
+ }
+
+#pragma unroll
+#pragma clang loop unroll_count(4)
+ while (i - 5 < Length) {
+ List[i] = i;
+ }
+
+/* expected-error {{expected ')'}} */ #pragma unroll(4
+/* expected-error {{missing argument to '#pragma unroll'; expected a positive integer value}} */ #pragma unroll()
+/* expected-warning {{extra tokens at end of '#pragma unroll'}} */ #pragma unroll 1 2
+ while (i-6 < Length) {
+ List[i] = i;
+ }
+
+/* expected-error {{invalid argument; expected a positive integer value}} */ #pragma unroll(()
+/* expected-error {{invalid argument; expected a positive integer value}} */ #pragma unroll -
+/* expected-error {{invalid argument; expected a positive integer value}} */ #pragma unroll(0)
+/* expected-error {{invalid argument; expected a positive integer value}} */ #pragma unroll 0
+/* expected-error {{invalid argument; expected a positive integer value}} */ #pragma unroll(3000000000)
+/* expected-error {{invalid argument; expected a positive integer value}} */ #pragma unroll 3000000000
+ while (i-8 < Length) {
+ List[i] = i;
+ }
+
+#pragma unroll
+/* expected-error {{expected a for, while, or do-while loop to follow '#pragma unroll'}} */ int j = Length;
+#pragma unroll 4
+/* expected-error {{expected a for, while, or do-while loop to follow '#pragma unroll'}} */ int k = Length;
+
+/* expected-error {{incompatible directives 'unroll(disable)' and '#pragma unroll(4)'}} */ #pragma unroll 4
+#pragma clang loop unroll(disable)
+ while (i-10 < Length) {
+ List[i] = i;
+ }
+
+/* expected-error {{duplicate directives '#pragma unroll' and '#pragma unroll'}} */ #pragma unroll
+#pragma unroll
+ while (i-14 < Length) {
+ List[i] = i;
+ }
+
+/* expected-error {{duplicate directives 'unroll(enable)' and '#pragma unroll'}} */ #pragma unroll
+#pragma clang loop unroll(enable)
+ while (i-15 < Length) {
+ List[i] = i;
+ }
+
+/* expected-error {{duplicate directives '#pragma unroll(4)' and '#pragma unroll(4)'}} */ #pragma unroll 4
+#pragma unroll(4)
+ while (i-16 < Length) {
+ List[i] = i;
+ }
+
+#pragma unroll
+/* expected-error {{expected statement}} */ }
diff --git a/test/Parser/recovery.cpp b/test/Parser/recovery.cpp
index 4bed2570fcba..5608b5046825 100644
--- a/test/Parser/recovery.cpp
+++ b/test/Parser/recovery.cpp
@@ -120,8 +120,85 @@ void MissingSemiInFunction() {
Inner5;
}
+namespace NS {
+ template<typename T> struct Foo {};
+}
+struct MissingSemiThenTemplate1 {} // expected-error {{expected ';' after struct}}
+NS::Foo<int> missingSemiBeforeFunctionReturningTemplateId1();
+
+using NS::Foo;
+struct MissingSemiThenTemplate2 {} // expected-error {{expected ';' after struct}}
+Foo<int> missingSemiBeforeFunctionReturningTemplateId2();
+
namespace PR17084 {
enum class EnumID {};
template <typename> struct TempID;
template <> struct TempID<BadType> : BadType, EnumID::Garbage; // expected-error{{use of undeclared identifier 'BadType'}}
}
+
+namespace pr15133 {
+ namespace ns {
+ const int V1 = 1; // expected-note {{declared here}}
+ }
+ struct C1 {
+ enum E1 { V2 = 2 }; // expected-note {{declared here}}
+ static const int V3 = 3; // expected-note {{declared here}}
+ };
+ enum E2 {
+ V4 = 4, // expected-note {{declared here}}
+ V6 // expected-note {{declared here}}
+ };
+ enum class EC3 { V0 = 0, V5 = 5 }; // expected-note {{declared here}}
+ void func_3();
+
+ void func_1(int x) {
+ switch(x) {
+ case 0: break;
+ case ns::V1:: break; // expected-error{{'V1' cannot appear before '::' because it is not a class, namespace, or scoped enumeration; did you mean ':'?}}
+ case C1::V2:: break; // expected-error{{'V2' cannot appear before '::' because it is not a class, namespace, or scoped enumeration; did you mean ':'?}}
+ case C1::V3:: break; // expected-error{{'V3' cannot appear before '::' because it is not a class, namespace, or scoped enumeration; did you mean ':'?}}
+ case V4:: break; // expected-error{{'V4' cannot appear before '::' because it is not a class, namespace, or scoped enumeration; did you mean ':'?}}
+ case V6:: func_3(); // expected-error{{'V6' cannot appear before '::' because it is not a class, namespace, or scoped enumeration; did you mean ':'?}}
+ }
+ }
+ void func_2(EC3 x) {
+ switch(x) {
+ case EC3::V0: break;
+ case EC3::V5:: break; // expected-error{{'V5' cannot appear before '::' because it is not a class, namespace, or scoped enumeration; did you mean ':'?}}
+ }
+ }
+
+ template<class T> struct TS1 {
+ typedef int A;
+ };
+ template<class T> void func(int x) {
+ switch(x) {
+ case TS1<T>::A:: break; // expected-error{{expected unqualified-id}}
+ }
+ };
+ void mainf() {
+ func<int>(1);
+ }
+
+ struct S {
+ static int n; // expected-note{{declared here}}
+ int nn; // expected-note 2 {{declared here}}
+ };
+
+ int func_3(int x) {
+ return x ? S::n :: 0; // expected-error{{'n' cannot appear before '::' because it is not a class, namespace, or scoped enumeration; did you mean ':'?}}
+ }
+ int func_4(int x, S &s) {
+ return x ? s.nn :: x; // expected-error{{'nn' cannot appear before '::' because it is not a class, namespace, or scoped enumeration; did you mean ':'?}}
+ }
+ int func_5(int x, S &s) {
+ return x ? s.nn :: S::n; // expected-error{{'nn' cannot appear before '::' because it is not a class, namespace, or scoped enumeration; did you mean ':'?}}
+ }
+
+ struct S2 {
+ struct S3;
+ };
+
+ struct S2 :: S3 :: public S2 { // expected-error{{'public' cannot be a part of nested name specifier; did you mean ':'?}}
+ };
+}
diff --git a/test/Parser/switch-recovery.cpp b/test/Parser/switch-recovery.cpp
index 63b580202af8..534517018267 100644
--- a/test/Parser/switch-recovery.cpp
+++ b/test/Parser/switch-recovery.cpp
@@ -170,3 +170,53 @@ void missing_statement_default(int x) {
default: // expected-error {{label at end of compound statement: expected statement}}
}
}
+
+void pr19022_1() {
+ switch (int x) // expected-error {{variable declaration in condition must have an initializer}}
+ case v: ; // expected-error {{use of undeclared identifier 'v'}}
+}
+
+void pr19022_1a(int x) {
+ switch(x) {
+ case 1 // expected-error{{expected ':' after 'case'}} \
+ // expected-error{{label at end of compound statement: expected statement}}
+ }
+}
+
+void pr19022_1b(int x) {
+ switch(x) {
+ case v // expected-error{{use of undeclared identifier 'v'}}
+ }
+ }
+
+void pr19022_2() {
+ switch (int x) // expected-error {{variable declaration in condition must have an initializer}}
+ case v1: case v2: ; // expected-error {{use of undeclared identifier 'v1'}} \
+ // expected-error {{use of undeclared identifier 'v2'}}
+}
+
+void pr19022_3(int x) {
+ switch (x)
+ case 1: case v2: ; // expected-error {{use of undeclared identifier 'v2'}}
+}
+
+int pr19022_4(int x) {
+ switch(x) {
+ case 1 // expected-error{{expected ':' after 'case'}} expected-note{{previous case defined here}}
+ case 1 : return x; // expected-error{{duplicate case value '1'}}
+ }
+}
+
+void pr19022_5(int x) {
+ switch(x) {
+ case 1: case
+ } // expected-error{{expected expression}}
+}
+
+namespace pr19022 {
+int baz5() {}
+bool bar0() {
+ switch (int foo0) //expected-error{{variable declaration in condition must have an initializer}}
+ case bar5: ; // expected-error{{use of undeclared identifier 'bar5'}}
+}
+}
diff --git a/test/Parser/warn-cuda-compat.cu b/test/Parser/warn-cuda-compat.cu
new file mode 100644
index 000000000000..c3aad6f66360
--- /dev/null
+++ b/test/Parser/warn-cuda-compat.cu
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -Wno-cuda-compat -Werror %s
+// RUN: %clang_cc1 -Wcuda-compat -verify %s
+// RUN: %clang_cc1 -x c++ -Wcuda-compat -Werror %s
+
+// Note that this puts the expected lines before the directives to work around
+// limitations in the -verify mode.
+
+void test(int *List, int Length) {
+/* expected-warning {{argument to '#pragma unroll' should not be in parentheses in CUDA C/C++}} */#pragma unroll(4)
+ for (int i = 0; i < Length; ++i) {
+ List[i] = i;
+ }
+}
diff --git a/test/Parser/warn-semicolon-before-method-body.m b/test/Parser/warn-semicolon-before-method-body.m
index be408ebd3119..abdf9f2b02ff 100644
--- a/test/Parser/warn-semicolon-before-method-body.m
+++ b/test/Parser/warn-semicolon-before-method-body.m
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -fsyntax-only -Wsemicolon-before-method-body -verify %s
// RUN: %clang_cc1 -fsyntax-only -Wsemicolon-before-method-body -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
-// Allow optional semicolon in objc method definiton after method prototype,
+// Allow optional semicolon in objc method definition after method prototype,
// warn about it and suggest a fixit.
@interface NSObject
diff --git a/test/Preprocessor/Inputs/headermap-rel/Foo.framework/Headers/Foo.h b/test/Preprocessor/Inputs/headermap-rel/Foo.framework/Headers/Foo.h
new file mode 100644
index 000000000000..04ffb5a488f9
--- /dev/null
+++ b/test/Preprocessor/Inputs/headermap-rel/Foo.framework/Headers/Foo.h
@@ -0,0 +1,2 @@
+
+Foo.h is parsed
diff --git a/test/Preprocessor/Inputs/headermap-rel/foo.hmap b/test/Preprocessor/Inputs/headermap-rel/foo.hmap
new file mode 100644
index 000000000000..783c64e67bb8
--- /dev/null
+++ b/test/Preprocessor/Inputs/headermap-rel/foo.hmap
Binary files differ
diff --git a/test/Preprocessor/Inputs/headermap-rel2/Product/someheader.h b/test/Preprocessor/Inputs/headermap-rel2/Product/someheader.h
new file mode 100644
index 000000000000..ca2e52103b30
--- /dev/null
+++ b/test/Preprocessor/Inputs/headermap-rel2/Product/someheader.h
@@ -0,0 +1 @@
+#define A 2
diff --git a/test/Preprocessor/Inputs/headermap-rel2/project-headers.hmap b/test/Preprocessor/Inputs/headermap-rel2/project-headers.hmap
new file mode 100644
index 000000000000..a0770fb25124
--- /dev/null
+++ b/test/Preprocessor/Inputs/headermap-rel2/project-headers.hmap
Binary files differ
diff --git a/test/Preprocessor/Inputs/headermap-rel2/system/usr/include/someheader.h b/test/Preprocessor/Inputs/headermap-rel2/system/usr/include/someheader.h
new file mode 100644
index 000000000000..ab2a05dbbf84
--- /dev/null
+++ b/test/Preprocessor/Inputs/headermap-rel2/system/usr/include/someheader.h
@@ -0,0 +1 @@
+#define A 1
diff --git a/test/Preprocessor/Inputs/microsoft-header-search/a/b/include3.h b/test/Preprocessor/Inputs/microsoft-header-search/a/b/include3.h
new file mode 100644
index 000000000000..3f477e725d73
--- /dev/null
+++ b/test/Preprocessor/Inputs/microsoft-header-search/a/b/include3.h
@@ -0,0 +1,5 @@
+#pragma once
+
+#include "findme.h"
+
+#include "falsepos.h"
diff --git a/test/Preprocessor/Inputs/microsoft-header-search/a/findme.h b/test/Preprocessor/Inputs/microsoft-header-search/a/findme.h
new file mode 100644
index 000000000000..b809c9075d60
--- /dev/null
+++ b/test/Preprocessor/Inputs/microsoft-header-search/a/findme.h
@@ -0,0 +1,3 @@
+#pragma once
+
+#warning findme.h successfully included using MS search rules \ No newline at end of file
diff --git a/test/Preprocessor/Inputs/microsoft-header-search/a/include2.h b/test/Preprocessor/Inputs/microsoft-header-search/a/include2.h
new file mode 100644
index 000000000000..99640ae47a87
--- /dev/null
+++ b/test/Preprocessor/Inputs/microsoft-header-search/a/include2.h
@@ -0,0 +1,6 @@
+#pragma once
+
+#include "b/include3.h"
+#pragma once
+
+#include "b/include3.h" \ No newline at end of file
diff --git a/test/Preprocessor/Inputs/microsoft-header-search/falsepos.h b/test/Preprocessor/Inputs/microsoft-header-search/falsepos.h
new file mode 100644
index 000000000000..cb8596985743
--- /dev/null
+++ b/test/Preprocessor/Inputs/microsoft-header-search/falsepos.h
@@ -0,0 +1,3 @@
+#pragma once
+
+#warning successfully resolved the falsepos.h header
diff --git a/test/Preprocessor/Inputs/microsoft-header-search/findme.h b/test/Preprocessor/Inputs/microsoft-header-search/findme.h
new file mode 100644
index 000000000000..aeaf795a1a80
--- /dev/null
+++ b/test/Preprocessor/Inputs/microsoft-header-search/findme.h
@@ -0,0 +1,3 @@
+#pragma once
+
+#error Wrong findme.h included, MSVC header search incorrect \ No newline at end of file
diff --git a/test/Preprocessor/Inputs/microsoft-header-search/include1.h b/test/Preprocessor/Inputs/microsoft-header-search/include1.h
new file mode 100644
index 000000000000..f00fac7a1799
--- /dev/null
+++ b/test/Preprocessor/Inputs/microsoft-header-search/include1.h
@@ -0,0 +1,6 @@
+#pragma once
+
+#include "a/include2.h"
+#pragma once
+
+#include "a/include2.h" \ No newline at end of file
diff --git a/test/Preprocessor/aarch64-target-features.c b/test/Preprocessor/aarch64-target-features.c
index 9978f91e2605..137a1d81920a 100644
--- a/test/Preprocessor/aarch64-target-features.c
+++ b/test/Preprocessor/aarch64-target-features.c
@@ -1,4 +1,5 @@
// RUN: %clang -target aarch64-none-linux-gnu -x c -E -dM %s -o - | FileCheck %s
+// RUN: %clang -target arm64-none-linux-gnu -x c -E -dM %s -o - | FileCheck %s
// CHECK: __AARCH64EL__ 1
// CHECK: __ARM_64BIT_STATE 1
@@ -9,6 +10,7 @@
// CHECK: __ARM_ARCH_PROFILE 'A'
// CHECK-NOT: __ARM_FEATURE_BIG_ENDIAN
// CHECK: __ARM_FEATURE_CLZ 1
+// CHECK-NOT: __ARM_FEATURE_CRC32 1
// CHECK-NOT: __ARM_FEATURE_CRYPTO 1
// CHECK: __ARM_FEATURE_DIV 1
// CHECK: __ARM_FEATURE_FMA 1
@@ -17,24 +19,85 @@
// CHECK: __ARM_FP16_FORMAT_IEEE 1
// CHECK-NOT: __ARM_FP_FAST 1
// CHECK: __ARM_FP_FENV_ROUNDING 1
-// CHECK-NOT: __ARM_NEON 1
-// CHECK-NOT: __ARM_NEON_FP 7
+// CHECK: __ARM_NEON 1
+// CHECK: __ARM_NEON_FP 0xe
// CHECK: __ARM_PCS_AAPCS64 1
// CHECK-NOT: __ARM_SIZEOF_MINIMAL_ENUM 1
// CHECK-NOT: __ARM_SIZEOF_WCHAR_T 2
-// RUN: %clang -target aarch64-none-linux-gnu -mfpu=crypto-neon-fp-armv8 -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-CRYPTO %s
+// RUN: %clang -target aarch64-none-linux-gnu -march=armv8-a+crypto -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-CRYPTO %s
+// RUN: %clang -target arm64-none-linux-gnu -march=armv8-a+crypto -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-CRYPTO %s
// CHECK-CRYPTO: __ARM_FEATURE_CRYPTO 1
+// RUN: %clang -target aarch64-none-linux-gnu -mcrc -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-CRC32 %s
+// RUN: %clang -target arm64-none-linux-gnu -mcrc -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-CRC32 %s
+// RUN: %clang -target aarch64-none-linux-gnu -march=armv8-a+crc -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-CRC32 %s
+// RUN: %clang -target arm64-none-linux-gnu -march=armv8-a+crc -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-CRC32 %s
+// CHECK-CRC32: __ARM_FEATURE_CRC32 1
+
// RUN: %clang -target aarch64-none-linux-gnu -ffast-math -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-FASTMATH %s
+// RUN: %clang -target arm64-none-linux-gnu -ffast-math -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-FASTMATH %s
// CHECK-FASTMATH: __ARM_FP_FAST 1
// RUN: %clang -target aarch64-none-linux-gnu -fshort-wchar -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-SHORTWCHAR %s
+// RUN: %clang -target arm64-none-linux-gnu -fshort-wchar -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-SHORTWCHAR %s
// CHECK-SHORTWCHAR: __ARM_SIZEOF_WCHAR_T 2
// RUN: %clang -target aarch64-none-linux-gnu -fshort-enums -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-SHORTENUMS %s
+// RUN: %clang -target arm64-none-linux-gnu -fshort-enums -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-SHORTENUMS %s
// CHECK-SHORTENUMS: __ARM_SIZEOF_MINIMAL_ENUM 1
-// RUN: %clang -target aarch64-none-linux-gnu -mfpu=neon -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-NEON %s
+// RUN: %clang -target aarch64-none-linux-gnu -march=armv8-a+simd -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-NEON %s
+// RUN: %clang -target arm64-none-linux-gnu -march=armv8-a+simd -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-NEON %s
// CHECK-NEON: __ARM_NEON 1
-// CHECK-NEON: __ARM_NEON_FP 7
+// CHECK-NEON: __ARM_NEON_FP 0xe
+
+// RUN: %clang -target aarch64 -march=arm64 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ARCH-NOT-ACCEPT %s
+// RUN: %clang -target aarch64 -march=aarch64 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ARCH-NOT-ACCEPT %s
+// CHECK-ARCH-NOT-ACCEPT: error: the clang compiler does not support
+
+// RUN: %clang -target aarch64 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-GENERIC %s
+// RUN: %clang -target aarch64 -march=armv8-a -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-GENERIC %s
+// CHECK-GENERIC: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon"
+
+// RUN: %clang -target aarch64 -mtune=cyclone -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MTUNE-CYCLONE %s
+// CHECK-MTUNE-CYCLONE: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+zcm" "-target-feature" "+zcz"
+
+// RUN: %clang -target aarch64 -mcpu=cyclone -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-CYCLONE %s
+// RUN: %clang -target aarch64 -mcpu=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-A53 %s
+// RUN: %clang -target aarch64 -mcpu=cortex-a57 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-A57 %s
+// CHECK-MCPU-CYCLONE: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+crc" "-target-feature" "+crypto" "-target-feature" "+zcm" "-target-feature" "+zcz"
+// CHECK-MCPU-A53: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+crc" "-target-feature" "+crypto"
+// CHECK-MCPU-A57: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+crc" "-target-feature" "+crypto"
+
+// RUN: %clang -target aarch64 -march=armv8-a+fp+simd+crc+crypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MARCH-1 %s
+// RUN: %clang -target aarch64 -march=armv8-a+nofp+nosimd+nocrc+nocrypto+fp+simd+crc+crypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MARCH-1 %s
+// RUN: %clang -target aarch64 -march=armv8-a+nofp+nosimd+nocrc+nocrypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MARCH-2 %s
+// RUN: %clang -target aarch64 -march=armv8-a+fp+simd+crc+crypto+nofp+nosimd+nocrc+nocrypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MARCH-2 %s
+// RUN: %clang -target aarch64 -march=armv8-a+nosimd -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MARCH-3 %s
+// CHECK-MARCH-1: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+fp-armv8" "-target-feature" "+neon" "-target-feature" "+crc" "-target-feature" "+crypto"
+// CHECK-MARCH-2: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "-fp-armv8" "-target-feature" "-neon" "-target-feature" "-crc" "-target-feature" "-crypto"
+// CHECK-MARCH-3: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "-neon"
+
+// RUN: %clang -target aarch64 -mcpu=cyclone+nocrypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-1 %s
+// RUN: %clang -target aarch64 -mcpu=cyclone+crypto+nocrypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-1 %s
+// RUN: %clang -target aarch64 -mcpu=generic+crc -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-2 %s
+// RUN: %clang -target aarch64 -mcpu=generic+nocrc+crc -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-2 %s
+// RUN: %clang -target aarch64 -mcpu=cortex-a53+nosimd -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-3 %s
+// CHECK-MCPU-1: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+crc" "-target-feature" "-crypto" "-target-feature" "+zcm" "-target-feature" "+zcz"
+// CHECK-MCPU-2: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+crc"
+// CHECK-MCPU-3: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "-neon"
+
+// RUN: %clang -target aarch64 -mcpu=cyclone+nocrc+nocrypto -march=armv8-a -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-MARCH %s
+// RUN: %clang -target aarch64 -march=armv8-a -mcpu=cyclone+nocrc+nocrypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-MARCH %s
+// CHECK-MCPU-MARCH: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+zcm" "-target-feature" "+zcz"
+
+// RUN: %clang -target aarch64 -mcpu=cortex-a53 -mtune=cyclone -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-MTUNE %s
+// RUN: %clang -target aarch64 -mtune=cyclone -mcpu=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-MTUNE %s
+// CHECK-MCPU-MTUNE: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+neon" "-target-feature" "+crc" "-target-feature" "+crypto" "-target-feature" "+zcm" "-target-feature" "+zcz"
+
+// RUN: %clang -target aarch64 -mcpu=generic+neon -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ERROR-NEON %s
+// RUN: %clang -target aarch64 -mcpu=generic+noneon -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ERROR-NEON %s
+// RUN: %clang -target aarch64 -march=armv8-a+neon -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ERROR-NEON %s
+// RUN: %clang -target aarch64 -march=armv8-a+noneon -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ERROR-NEON %s
+// CHECK-ERROR-NEON: error: [no]neon is not accepted as modifier, please use [no]simd instead
diff --git a/test/Preprocessor/arm-acle-6.4.c b/test/Preprocessor/arm-acle-6.4.c
new file mode 100644
index 000000000000..a656f7608c0f
--- /dev/null
+++ b/test/Preprocessor/arm-acle-6.4.c
@@ -0,0 +1,40 @@
+// RUN: %clang -target arm-eabi -mcpu=cortex-m0 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-CORTEX-M0
+
+// CHECK-CORTEX-M0: __ARM_32BIT_STATE 1
+// CHECK-CORTEX-M0: __ARM_ARCH 6
+// CHECK-CORTEX-M0-NOT: __ARM_ARCH_ISA_ARM
+// CHECK-CORTEX-M0: __ARM_ARCH_ISA_THUMB 1
+// CHECK-CORTEX-M0: __ARM_ARCH_PROFILE 'M'
+
+// RUN: %clang -target arm-eabi -mcpu=arm810 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-ARM810
+
+// CHECK-ARM810: __ARM_32BIT_STATE 1
+// CHECK-ARM810: __ARM_ARCH 4
+// CHECK-ARM810: __ARM_ARCH_ISA_ARM 1
+// CHECK-ARM810-NOT: __ARM_ARCH_ISA_THUMB
+// CHECK-ARM810-NOT: __ARM_ARCH_PROFILE
+
+// RUN: %clang -target arm-eabi -mcpu=arm7tdmi -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-ARM7TDMI
+
+// CHECK-ARM7TDMI: __ARM_32BIT_STATE 1
+// CHECK-ARM7TDMI: __ARM_ARCH 4
+// CHECK-ARM7TDMI: __ARM_ARCH_ISA_ARM 1
+// CHECK-ARM7TDMI: __ARM_ARCH_ISA_THUMB 1
+// CHECK-ARM7TDMI-NOT: __ARM_ARCH_PROFILE
+
+// RUN: %clang -target arm-eabi -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-CORTEX-A7
+
+// CHECK-CORTEX-A7: __ARM_32BIT_STATE 1
+// CHECK-CORTEX-A7: __ARM_ARCH 7
+// CHECK-CORTEX-A7: __ARM_ARCH_ISA_ARM 1
+// CHECK-CORTEX-A7: __ARM_ARCH_ISA_THUMB 2
+// CHECK-CORTEX-A7: __ARM_ARCH_PROFILE 'A'
+
+// RUN: %clang -target arm-eabi -mcpu=cortex-r4 -x c -E -dM %s -o - | FileCheck %s -check-prefix CHECK-CORTEX-R4
+
+// CHECK-CORTEX-R4: __ARM_32BIT_STATE 1
+// CHECK-CORTEX-R4: __ARM_ARCH 7
+// CHECK-CORTEX-R4: __ARM_ARCH_ISA_ARM 1
+// CHECK-CORTEX-R4: __ARM_ARCH_ISA_THUMB 2
+// CHECK-CORTEX-R4: __ARM_ARCH_PROFILE 'R'
+
diff --git a/test/Preprocessor/arm-target-features.c b/test/Preprocessor/arm-target-features.c
index ae93a3da7c08..08fe29a72502 100644
--- a/test/Preprocessor/arm-target-features.c
+++ b/test/Preprocessor/arm-target-features.c
@@ -8,7 +8,7 @@
// CHECK-V7: __ARMEL__ 1
// CHECK-V7: __ARM_ARCH 7
// CHECK-V7: __ARM_ARCH_7A__ 1
-// CHECK-NOT-V7: __ARM_FEATURE_CRC32
+// CHECK-V7-NOT: __ARM_FEATURE_CRC32
// RUN: %clang -target armv8a -mfloat-abi=hard -x c -E -dM %s | FileCheck --check-prefix=CHECK-V8-BAREHF %s
// CHECK-V8-BAREHF: __ARMEL__ 1
@@ -68,6 +68,15 @@
// RUN: %clang -target armv8a-eabi -x c -E -dM %s -o - | FileCheck --check-prefix=THUMBV8A-EABI %s
// THUMBV8A-EABI:#define __ARM_ARCH_EXT_IDIV__ 1
+// RUN: %clang -target arm-none-linux-gnu -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-DEFS %s
+// CHECK-DEFS:#define __ARM_SIZEOF_MINIMAL_ENUM 4
+// CHECK-DEFS:#define __ARM_SIZEOF_WCHAR_T 4
+
+// RUN: %clang -target arm-none-linux-gnu -fshort-wchar -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-SHORTWCHAR %s
+// CHECK-SHORTWCHAR:#define __ARM_SIZEOF_WCHAR_T 2
+
+// RUN: %clang -target arm-none-linux-gnu -fshort-enums -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-SHORTENUMS %s
+// CHECK-SHORTENUMS:#define __ARM_SIZEOF_MINIMAL_ENUM 1
// Test that -mhwdiv has the right effect for a target CPU which has hwdiv enabled by default.
// RUN: %clang -target armv7 -mcpu=cortex-a15 -x c -E -dM %s -o - | FileCheck --check-prefix=DEFAULTHWDIV-ARM %s
@@ -94,6 +103,39 @@
// RUN: %clang -target arm -mthumb -mcpu=cortex-a15 -mhwdiv=none -x c -E -dM %s -o - | FileCheck --check-prefix=DEFAULTHWDIV-NONEHWDIV-THUMB %s
// DEFAULTHWDIV-NONEHWDIV-THUMB-NOT:#define __ARM_ARCH_EXT_IDIV__
+
+// Check that -mfpu works properly for Cortex-A7 (enabled by default).
+// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck --check-prefix=DEFAULTFPU-A7 %s
+// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck --check-prefix=DEFAULTFPU-A7 %s
+// DEFAULTFPU-A7:#define __ARM_NEON__ 1
+// DEFAULTFPU-A7:#define __ARM_VFPV4__ 1
+
+// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a7 -mfpu=none -x c -E -dM %s -o - | FileCheck --check-prefix=FPUNONE-A7 %s
+// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a7 -mfpu=none -x c -E -dM %s -o - | FileCheck --check-prefix=FPUNONE-A7 %s
+// FPUNONE-A7-NOT:#define __ARM_NEON__ 1
+// FPUNONE-A7-NOT:#define __ARM_VFPV4__ 1
+
+// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a7 -mfpu=vfp4 -x c -E -dM %s -o - | FileCheck --check-prefix=NONEON-A7 %s
+// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a7 -mfpu=vfp4 -x c -E -dM %s -o - | FileCheck --check-prefix=NONEON-A7 %s
+// NONEON-A7-NOT:#define __ARM_NEON__ 1
+// NONEON-A7:#define __ARM_VFPV4__ 1
+
+// Check that -mfpu works properly for Cortex-A5 (enabled by default).
+// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck --check-prefix=DEFAULTFPU-A5 %s
+// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck --check-prefix=DEFAULTFPU-A5 %s
+// DEFAULTFPU-A5:#define __ARM_NEON__ 1
+// DEFAULTFPU-A5:#define __ARM_VFPV4__ 1
+
+// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a5 -mfpu=none -x c -E -dM %s -o - | FileCheck --check-prefix=FPUNONE-A5 %s
+// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a5 -mfpu=none -x c -E -dM %s -o - | FileCheck --check-prefix=FPUNONE-A5 %s
+// FPUNONE-A5-NOT:#define __ARM_NEON__ 1
+// FPUNONE-A5-NOT:#define __ARM_VFPV4__ 1
+
+// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a5 -mfpu=vfp3-d16 -x c -E -dM %s -o - | FileCheck --check-prefix=NONEON-A5 %s
+// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a5 -mfpu=vfp3-d16 -x c -E -dM %s -o - | FileCheck --check-prefix=NONEON-A5 %s
+// NONEON-A5-NOT:#define __ARM_NEON__ 1
+// NONEON-A5:#define __ARM_VFPV4__ 1
+
// FIXME: add check for further predefines
// Test whether predefines are as expected when targeting cortex-a5.
// RUN: %clang -target armv7 -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck --check-prefix=A5-ARM %s
@@ -102,6 +144,20 @@
// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck --check-prefix=A5-THUMB %s
// A5-THUMB-NOT:#define __ARM_ARCH_EXT_IDIV__
+// RUN: %clang -target armv7 -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck --check-prefix=A5 %s
+// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a5 -x c -E -dM %s -o - | FileCheck --check-prefix=A5 %s
+// A5:#define __ARM_ARCH 7
+// A5:#define __ARM_ARCH_7A__ 1
+// A5:#define __ARM_ARCH_PROFILE 'A'
+
+// Test whether predefines are as expected when targeting cortex-a7.
+// RUN: %clang -target armv7 -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck --check-prefix=A7 %s
+// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a7 -x c -E -dM %s -o - | FileCheck --check-prefix=A7 %s
+// A7:#define __ARM_ARCH 7
+// A7:#define __ARM_ARCH_7A__ 1
+// A7:#define __ARM_ARCH_EXT_IDIV__ 1
+// A7:#define __ARM_ARCH_PROFILE 'A'
+
// Test whether predefines are as expected when targeting cortex-a8.
// RUN: %clang -target armv7 -mcpu=cortex-a8 -x c -E -dM %s -o - | FileCheck --check-prefix=A8-ARM %s
// A8-ARM-NOT:#define __ARM_ARCH_EXT_IDIV__
@@ -116,6 +172,26 @@
// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a9 -x c -E -dM %s -o - | FileCheck --check-prefix=A9-THUMB %s
// A9-THUMB-NOT:#define __ARM_ARCH_EXT_IDIV__
+
+// Check that -mfpu works properly for Cortex-A12 (enabled by default).
+// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a12 -x c -E -dM %s -o - | FileCheck --check-prefix=DEFAULTFPU-A12 %s
+// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a12 -x c -E -dM %s -o - | FileCheck --check-prefix=DEFAULTFPU-A12 %s
+// DEFAULTFPU-A12:#define __ARM_NEON__ 1
+// DEFAULTFPU-A12:#define __ARM_VFPV4__ 1
+
+// RUN: %clang -target armv7-none-linux-gnueabi -mcpu=cortex-a12 -mfpu=none -x c -E -dM %s -o - | FileCheck --check-prefix=FPUNONE-A12 %s
+// RUN: %clang -target armv7-none-linux-gnueabi -mthumb -mcpu=cortex-a12 -mfpu=none -x c -E -dM %s -o - | FileCheck --check-prefix=FPUNONE-A12 %s
+// FPUNONE-A12-NOT:#define __ARM_NEON__ 1
+// FPUNONE-A12-NOT:#define __ARM_VFPV4__ 1
+
+// Test whether predefines are as expected when targeting cortex-a12.
+// RUN: %clang -target armv7 -mcpu=cortex-a12 -x c -E -dM %s -o - | FileCheck --check-prefix=A12 %s
+// RUN: %clang -target armv7 -mthumb -mcpu=cortex-a12 -x c -E -dM %s -o - | FileCheck --check-prefix=A12 %s
+// A12:#define __ARM_ARCH 7
+// A12:#define __ARM_ARCH_7A__ 1
+// A12:#define __ARM_ARCH_EXT_IDIV__ 1
+// A12:#define __ARM_ARCH_PROFILE 'A'
+
// Test whether predefines are as expected when targeting cortex-a15.
// RUN: %clang -target armv7 -mcpu=cortex-a15 -x c -E -dM %s -o - | FileCheck --check-prefix=A15-ARM %s
// A15-ARM:#define __ARM_ARCH_EXT_IDIV__ 1
@@ -155,3 +231,13 @@
// Test whether predefines are as expected when targeting cortex-m4.
// RUN: %clang -target armv7 -mthumb -mcpu=cortex-m4 -x c -E -dM %s -o - | FileCheck --check-prefix=M4-THUMB %s
// M4-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1
+
+// Test whether predefines are as expected when targeting krait.
+// RUN: %clang -target armv7 -mcpu=krait -x c -E -dM %s -o - | FileCheck --check-prefix=KRAIT-ARM %s
+// KRAIT-ARM:#define __ARM_ARCH_EXT_IDIV__ 1
+// KRAIT-ARM:#define __ARM_VFPV4__ 1
+
+// RUN: %clang -target armv7 -mthumb -mcpu=krait -x c -E -dM %s -o - | FileCheck --check-prefix=KRAIT-THUMB %s
+// KRAIT-THUMB:#define __ARM_ARCH_EXT_IDIV__ 1
+// KRAIT-THUMB:#define __ARM_VFPV4__ 1
+
diff --git a/test/Preprocessor/cxx_oper_keyword.cpp b/test/Preprocessor/cxx_oper_keyword.cpp
index 3fc246dd6c2a..89a094d073ca 100644
--- a/test/Preprocessor/cxx_oper_keyword.cpp
+++ b/test/Preprocessor/cxx_oper_keyword.cpp
@@ -1,7 +1,31 @@
-// RUN: not %clang_cc1 %s -E
-// RUN: %clang_cc1 %s -E -fno-operator-names
+// RUN: %clang_cc1 %s -E -verify -DOPERATOR_NAMES
+// RUN: %clang_cc1 %s -E -verify -fno-operator-names
-// Not valid in C++ unless -fno-operator-names is passed.
+#ifndef OPERATOR_NAMES
+//expected-error@+3 {{token is not a valid binary operator in a preprocessor subexpression}}
+#endif
+// Valid because 'and' is a spelling of '&&'
+#if defined foo and bar
+#endif
+
+// Not valid in C++ unless -fno-operator-names is passed:
+
+#ifdef OPERATOR_NAMES
+//expected-error@+2 {{C++ operator 'and' (aka '&&') used as a macro name}}
+#endif
#define and foo
+#ifdef OPERATOR_NAMES
+//expected-error@+2 {{C++ operator 'xor' (aka '^') used as a macro name}}
+#endif
+#if defined xor
+#endif
+// For error recovery we continue as though the identifier was a macro name regardless of -fno-operator-names.
+#ifdef OPERATOR_NAMES
+//expected-error@+3 {{C++ operator 'and' (aka '&&') used as a macro name}}
+#endif
+//expected-warning@+2 {{and is defined}}
+#ifdef and
+#warning and is defined
+#endif
diff --git a/test/Preprocessor/cxx_oper_keyword_ms_compat.cpp b/test/Preprocessor/cxx_oper_keyword_ms_compat.cpp
index 1c6ef90c8b88..8e1351e34728 100644
--- a/test/Preprocessor/cxx_oper_keyword_ms_compat.cpp
+++ b/test/Preprocessor/cxx_oper_keyword_ms_compat.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 %s -E -fms-compatibility
+// RUN: %clang_cc1 %s -E -verify -fms-extensions
+// expected-no-diagnostics
bool f() {
// Check that operators still work before redefining them.
@@ -7,6 +8,13 @@ bool f() {
#endif
}
+#ifdef and
+#endif
+
+// The second 'and' is a valid C++ operator name for '&&'.
+#if defined and and defined(and)
+#endif
+
// All c++ keywords should be #define-able in ms mode.
// (operators like "and" aren't normally, the rest always is.)
#define and
diff --git a/test/Preprocessor/has_attribute.c b/test/Preprocessor/has_attribute.c
index 555c2b3f9e22..5fe060e68d3c 100644
--- a/test/Preprocessor/has_attribute.c
+++ b/test/Preprocessor/has_attribute.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -E %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple arm-unknown-linux -E %s -o - | FileCheck %s
// CHECK: always_inline
#if __has_attribute(always_inline)
@@ -38,3 +38,13 @@ int has_something_we_dont_have();
#if !__has_attribute(volatile)
int has_no_volatile_attribute();
#endif
+
+// CHECK: has_arm_interrupt
+#if __has_attribute(interrupt)
+ int has_arm_interrupt();
+#endif
+
+// CHECK: does_not_have_dllexport
+#if !__has_attribute(dllexport)
+ int does_not_have_dllexport();
+#endif
diff --git a/test/Preprocessor/header_lookup1.c b/test/Preprocessor/header_lookup1.c
index d0909363737c..336aba655661 100644
--- a/test/Preprocessor/header_lookup1.c
+++ b/test/Preprocessor/header_lookup1.c
@@ -1,2 +1,2 @@
-// RUN: %clang -fno-ms-extensions %s -E | grep 'stddef.h.*3'
+// RUN: %clang_cc1 %s -E | grep 'stddef.h.*3'
#include <stddef.h>
diff --git a/test/Preprocessor/headermap-rel.c b/test/Preprocessor/headermap-rel.c
new file mode 100644
index 000000000000..38500a70f697
--- /dev/null
+++ b/test/Preprocessor/headermap-rel.c
@@ -0,0 +1,12 @@
+
+// This uses a headermap with this entry:
+// Foo.h -> Foo/Foo.h
+
+// RUN: %clang_cc1 -E %s -o %t.i -I %S/Inputs/headermap-rel/foo.hmap -F %S/Inputs/headermap-rel
+// RUN: FileCheck %s -input-file %t.i
+
+// CHECK: Foo.h is parsed
+// CHECK: Foo.h is parsed
+
+#include "Foo.h"
+#include "Foo.h"
diff --git a/test/Preprocessor/headermap-rel2.c b/test/Preprocessor/headermap-rel2.c
new file mode 100644
index 000000000000..430854de0679
--- /dev/null
+++ b/test/Preprocessor/headermap-rel2.c
@@ -0,0 +1,14 @@
+// This uses a headermap with this entry:
+// someheader.h -> Product/someheader.h
+
+// RUN: %clang_cc1 -triple x86_64-apple-darwin13 -v -fsyntax-only %s -iquote %S/Inputs/headermap-rel2/project-headers.hmap -isysroot %S/Inputs/headermap-rel2/system -I %S/Inputs/headermap-rel2 -H
+// RUN: %clang_cc1 -triple x86_64-apple-darwin13 -fsyntax-only %s -iquote %S/Inputs/headermap-rel2/project-headers.hmap -isysroot %S/Inputs/headermap-rel2/system -I %S/Inputs/headermap-rel2 -H 2> %t.out
+// RUN: FileCheck %s -input-file %t.out
+
+// CHECK: Product/someheader.h
+// CHECK: system/usr/include{{[/\\]+}}someheader.h
+// CHECK: system/usr/include{{[/\\]+}}someheader.h
+
+#include "someheader.h"
+#include <someheader.h>
+#include <someheader.h>
diff --git a/test/Preprocessor/ifdef-recover.c b/test/Preprocessor/ifdef-recover.c
index 3d652dc604d9..a6481359f437 100644
--- a/test/Preprocessor/ifdef-recover.c
+++ b/test/Preprocessor/ifdef-recover.c
@@ -1,15 +1,22 @@
-/* RUN: not %clang_cc1 -E %s 2>&1 >/dev/null | grep error: | count 3
+/* RUN: %clang_cc1 -E -verify %s
*/
+/* expected-error@+1 {{macro name missing}} */
#ifdef
+#endif
+
+/* expected-error@+1 {{macro name must be an identifier}} */
+#ifdef !
+#endif
+/* expected-error@+1 {{macro name missing}} */
+#if defined
#endif
-/* End of function-like macro invocation in #ifdef */
/* PR1936 */
+/* expected-error@+2 {{unterminated function-like macro invocation}} expected-error@+2 {{expected value in expression}} expected-note@+1 {{macro 'f' defined here}} */
#define f(x) x
#if f(2
#endif
int x;
-
diff --git a/test/Preprocessor/ignore-pragmas.c b/test/Preprocessor/ignore-pragmas.c
new file mode 100644
index 000000000000..e2f9ef3dfa34
--- /dev/null
+++ b/test/Preprocessor/ignore-pragmas.c
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -E %s -Wall -verify
+// RUN: %clang_cc1 -Eonly %s -Wall -verify
+// RUN: %clang -M -Wall %s -Xclang -verify
+// RUN: %clang -E -frewrite-includes %s -Wall -Xclang -verify
+// RUN: %clang -E -dD -dM %s -Wall -Xclang -verify
+// expected-no-diagnostics
+
+#pragma GCC visibility push (default)
+#pragma weak
+#pragma this_pragma_does_not_exist
diff --git a/test/Preprocessor/init.c b/test/Preprocessor/init.c
index 8486e94b3a73..7b73ce0fa60d 100644
--- a/test/Preprocessor/init.c
+++ b/test/Preprocessor/init.c
@@ -9,13 +9,23 @@
// BLOCKS:#define __block __attribute__((__blocks__(byref)))
//
//
+// RUN: %clang_cc1 -x c++ -std=c++1z -E -dM < /dev/null | FileCheck -check-prefix CXX1Z %s
+//
+// CXX1Z:#define __GNUG__
+// CXX1Z:#define __GXX_EXPERIMENTAL_CXX0X__ 1
+// CXX1Z:#define __GXX_RTTI 1
+// CXX1Z:#define __GXX_WEAK__ 1
+// CXX1Z:#define __cplusplus 201406L
+// CXX1Z:#define __private_extern__ extern
+//
+//
// RUN: %clang_cc1 -x c++ -std=c++1y -E -dM < /dev/null | FileCheck -check-prefix CXX1Y %s
//
// CXX1Y:#define __GNUG__
// CXX1Y:#define __GXX_EXPERIMENTAL_CXX0X__ 1
// CXX1Y:#define __GXX_RTTI 1
// CXX1Y:#define __GXX_WEAK__ 1
-// CXX1Y:#define __cplusplus 201305L
+// CXX1Y:#define __cplusplus 201402L
// CXX1Y:#define __private_extern__ extern
//
//
@@ -85,11 +95,19 @@
// FREESTANDING:#define __STDC_HOSTED__ 0
//
//
+// RUN: %clang_cc1 -x c++ -std=gnu++1z -E -dM < /dev/null | FileCheck -check-prefix GXX1Z %s
+//
+// GXX1Z:#define __GNUG__
+// GXX1Z:#define __GXX_WEAK__ 1
+// GXX1Z:#define __cplusplus 201406L
+// GXX1Z:#define __private_extern__ extern
+//
+//
// RUN: %clang_cc1 -x c++ -std=gnu++1y -E -dM < /dev/null | FileCheck -check-prefix GXX1Y %s
//
// GXX1Y:#define __GNUG__
// GXX1Y:#define __GXX_WEAK__ 1
-// GXX1Y:#define __cplusplus 201305L
+// GXX1Y:#define __cplusplus 201402L
// GXX1Y:#define __private_extern__ extern
//
//
@@ -196,18 +214,603 @@
// SCHAR:#define __clang__ 1
//
// RUN: %clang_cc1 -E -dM -fshort-wchar < /dev/null | FileCheck -check-prefix SHORTWCHAR %s
+// wchar_t is u16 for targeting Win32.
+// FIXME: Implement and check x86_64-cygwin.
+// RUN: %clang_cc1 -E -dM -fno-short-wchar -triple=x86_64-w64-mingw32 < /dev/null | FileCheck -check-prefix SHORTWCHAR %s
//
// SHORTWCHAR: #define __SIZEOF_WCHAR_T__ 2
-// SHORTWCHAR: #define __WCHAR_MAX__ 65535U
+// SHORTWCHAR: #define __WCHAR_MAX__ 65535
// SHORTWCHAR: #define __WCHAR_TYPE__ unsigned short
// SHORTWCHAR: #define __WCHAR_WIDTH__ 16
//
+// RUN: %clang_cc1 -E -dM -fno-short-wchar -triple=i686-unknown-unknown < /dev/null | FileCheck -check-prefix SHORTWCHAR2 %s
+// RUN: %clang_cc1 -E -dM -fno-short-wchar -triple=x86_64-unknown-unknown < /dev/null | FileCheck -check-prefix SHORTWCHAR2 %s
+//
+// SHORTWCHAR2: #define __SIZEOF_WCHAR_T__ 4
+// SHORTWCHAR2: #define __WCHAR_WIDTH__ 32
+// Other definitions vary from platform to platform
+
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=aarch64-none-none < /dev/null | FileCheck -check-prefix AARCH64 %s
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=arm64-none-none < /dev/null | FileCheck -check-prefix AARCH64 %s
+//
+// AARCH64:#define _LP64 1
+// AARCH64-NOT:#define __AARCH64EB__ 1
+// AARCH64:#define __AARCH64EL__ 1
+// AARCH64-NOT:#define __AARCH_BIG_ENDIAN 1
+// AARCH64:#define __ARM_64BIT_STATE 1
+// AARCH64:#define __ARM_ARCH 8
+// AARCH64:#define __ARM_ARCH_ISA_A64 1
+// AARCH64-NOT:#define __ARM_BIG_ENDIAN 1
+// AARCH64:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
+// AARCH64:#define __CHAR16_TYPE__ unsigned short
+// AARCH64:#define __CHAR32_TYPE__ unsigned int
+// AARCH64:#define __CHAR_BIT__ 8
+// AARCH64:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
+// AARCH64:#define __DBL_DIG__ 15
+// AARCH64:#define __DBL_EPSILON__ 2.2204460492503131e-16
+// AARCH64:#define __DBL_HAS_DENORM__ 1
+// AARCH64:#define __DBL_HAS_INFINITY__ 1
+// AARCH64:#define __DBL_HAS_QUIET_NAN__ 1
+// AARCH64:#define __DBL_MANT_DIG__ 53
+// AARCH64:#define __DBL_MAX_10_EXP__ 308
+// AARCH64:#define __DBL_MAX_EXP__ 1024
+// AARCH64:#define __DBL_MAX__ 1.7976931348623157e+308
+// AARCH64:#define __DBL_MIN_10_EXP__ (-307)
+// AARCH64:#define __DBL_MIN_EXP__ (-1021)
+// AARCH64:#define __DBL_MIN__ 2.2250738585072014e-308
+// AARCH64:#define __DECIMAL_DIG__ 36
+// AARCH64:#define __FLT_DENORM_MIN__ 1.40129846e-45F
+// AARCH64:#define __FLT_DIG__ 6
+// AARCH64:#define __FLT_EPSILON__ 1.19209290e-7F
+// AARCH64:#define __FLT_EVAL_METHOD__ 0
+// AARCH64:#define __FLT_HAS_DENORM__ 1
+// AARCH64:#define __FLT_HAS_INFINITY__ 1
+// AARCH64:#define __FLT_HAS_QUIET_NAN__ 1
+// AARCH64:#define __FLT_MANT_DIG__ 24
+// AARCH64:#define __FLT_MAX_10_EXP__ 38
+// AARCH64:#define __FLT_MAX_EXP__ 128
+// AARCH64:#define __FLT_MAX__ 3.40282347e+38F
+// AARCH64:#define __FLT_MIN_10_EXP__ (-37)
+// AARCH64:#define __FLT_MIN_EXP__ (-125)
+// AARCH64:#define __FLT_MIN__ 1.17549435e-38F
+// AARCH64:#define __FLT_RADIX__ 2
+// AARCH64:#define __INT16_C_SUFFIX__ {{$}}
+// AARCH64:#define __INT16_FMTd__ "hd"
+// AARCH64:#define __INT16_FMTi__ "hi"
+// AARCH64:#define __INT16_MAX__ 32767
+// AARCH64:#define __INT16_TYPE__ short
+// AARCH64:#define __INT32_C_SUFFIX__ {{$}}
+// AARCH64:#define __INT32_FMTd__ "d"
+// AARCH64:#define __INT32_FMTi__ "i"
+// AARCH64:#define __INT32_MAX__ 2147483647
+// AARCH64:#define __INT32_TYPE__ int
+// AARCH64:#define __INT64_C_SUFFIX__ L
+// AARCH64:#define __INT64_FMTd__ "ld"
+// AARCH64:#define __INT64_FMTi__ "li"
+// AARCH64:#define __INT64_MAX__ 9223372036854775807L
+// AARCH64:#define __INT64_TYPE__ long int
+// AARCH64:#define __INT8_C_SUFFIX__ {{$}}
+// AARCH64:#define __INT8_FMTd__ "hhd"
+// AARCH64:#define __INT8_FMTi__ "hhi"
+// AARCH64:#define __INT8_MAX__ 127
+// AARCH64:#define __INT8_TYPE__ signed char
+// AARCH64:#define __INTMAX_C_SUFFIX__ L
+// AARCH64:#define __INTMAX_FMTd__ "ld"
+// AARCH64:#define __INTMAX_FMTi__ "li"
+// AARCH64:#define __INTMAX_MAX__ 9223372036854775807L
+// AARCH64:#define __INTMAX_TYPE__ long int
+// AARCH64:#define __INTMAX_WIDTH__ 64
+// AARCH64:#define __INTPTR_FMTd__ "ld"
+// AARCH64:#define __INTPTR_FMTi__ "li"
+// AARCH64:#define __INTPTR_MAX__ 9223372036854775807L
+// AARCH64:#define __INTPTR_TYPE__ long int
+// AARCH64:#define __INTPTR_WIDTH__ 64
+// AARCH64:#define __INT_FAST16_FMTd__ "hd"
+// AARCH64:#define __INT_FAST16_FMTi__ "hi"
+// AARCH64:#define __INT_FAST16_MAX__ 32767
+// AARCH64:#define __INT_FAST16_TYPE__ short
+// AARCH64:#define __INT_FAST32_FMTd__ "d"
+// AARCH64:#define __INT_FAST32_FMTi__ "i"
+// AARCH64:#define __INT_FAST32_MAX__ 2147483647
+// AARCH64:#define __INT_FAST32_TYPE__ int
+// AARCH64:#define __INT_FAST64_FMTd__ "ld"
+// AARCH64:#define __INT_FAST64_FMTi__ "li"
+// AARCH64:#define __INT_FAST64_MAX__ 9223372036854775807L
+// AARCH64:#define __INT_FAST64_TYPE__ long int
+// AARCH64:#define __INT_FAST8_FMTd__ "hhd"
+// AARCH64:#define __INT_FAST8_FMTi__ "hhi"
+// AARCH64:#define __INT_FAST8_MAX__ 127
+// AARCH64:#define __INT_FAST8_TYPE__ signed char
+// AARCH64:#define __INT_LEAST16_FMTd__ "hd"
+// AARCH64:#define __INT_LEAST16_FMTi__ "hi"
+// AARCH64:#define __INT_LEAST16_MAX__ 32767
+// AARCH64:#define __INT_LEAST16_TYPE__ short
+// AARCH64:#define __INT_LEAST32_FMTd__ "d"
+// AARCH64:#define __INT_LEAST32_FMTi__ "i"
+// AARCH64:#define __INT_LEAST32_MAX__ 2147483647
+// AARCH64:#define __INT_LEAST32_TYPE__ int
+// AARCH64:#define __INT_LEAST64_FMTd__ "ld"
+// AARCH64:#define __INT_LEAST64_FMTi__ "li"
+// AARCH64:#define __INT_LEAST64_MAX__ 9223372036854775807L
+// AARCH64:#define __INT_LEAST64_TYPE__ long int
+// AARCH64:#define __INT_LEAST8_FMTd__ "hhd"
+// AARCH64:#define __INT_LEAST8_FMTi__ "hhi"
+// AARCH64:#define __INT_LEAST8_MAX__ 127
+// AARCH64:#define __INT_LEAST8_TYPE__ signed char
+// AARCH64:#define __INT_MAX__ 2147483647
+// AARCH64:#define __LDBL_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966L
+// AARCH64:#define __LDBL_DIG__ 33
+// AARCH64:#define __LDBL_EPSILON__ 1.92592994438723585305597794258492732e-34L
+// AARCH64:#define __LDBL_HAS_DENORM__ 1
+// AARCH64:#define __LDBL_HAS_INFINITY__ 1
+// AARCH64:#define __LDBL_HAS_QUIET_NAN__ 1
+// AARCH64:#define __LDBL_MANT_DIG__ 113
+// AARCH64:#define __LDBL_MAX_10_EXP__ 4932
+// AARCH64:#define __LDBL_MAX_EXP__ 16384
+// AARCH64:#define __LDBL_MAX__ 1.18973149535723176508575932662800702e+4932L
+// AARCH64:#define __LDBL_MIN_10_EXP__ (-4931)
+// AARCH64:#define __LDBL_MIN_EXP__ (-16381)
+// AARCH64:#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L
+// AARCH64:#define __LONG_LONG_MAX__ 9223372036854775807LL
+// AARCH64:#define __LONG_MAX__ 9223372036854775807L
+// AARCH64:#define __LP64__ 1
+// AARCH64:#define __POINTER_WIDTH__ 64
+// AARCH64:#define __PTRDIFF_TYPE__ long int
+// AARCH64:#define __PTRDIFF_WIDTH__ 64
+// AARCH64:#define __SCHAR_MAX__ 127
+// AARCH64:#define __SHRT_MAX__ 32767
+// AARCH64:#define __SIG_ATOMIC_MAX__ 2147483647
+// AARCH64:#define __SIG_ATOMIC_WIDTH__ 32
+// AARCH64:#define __SIZEOF_DOUBLE__ 8
+// AARCH64:#define __SIZEOF_FLOAT__ 4
+// AARCH64:#define __SIZEOF_INT128__ 16
+// AARCH64:#define __SIZEOF_INT__ 4
+// AARCH64:#define __SIZEOF_LONG_DOUBLE__ 16
+// AARCH64:#define __SIZEOF_LONG_LONG__ 8
+// AARCH64:#define __SIZEOF_LONG__ 8
+// AARCH64:#define __SIZEOF_POINTER__ 8
+// AARCH64:#define __SIZEOF_PTRDIFF_T__ 8
+// AARCH64:#define __SIZEOF_SHORT__ 2
+// AARCH64:#define __SIZEOF_SIZE_T__ 8
+// AARCH64:#define __SIZEOF_WCHAR_T__ 4
+// AARCH64:#define __SIZEOF_WINT_T__ 4
+// AARCH64:#define __SIZE_MAX__ 18446744073709551615UL
+// AARCH64:#define __SIZE_TYPE__ long unsigned int
+// AARCH64:#define __SIZE_WIDTH__ 64
+// AARCH64:#define __UINT16_C_SUFFIX__ {{$}}
+// AARCH64:#define __UINT16_MAX__ 65535
+// AARCH64:#define __UINT16_TYPE__ unsigned short
+// AARCH64:#define __UINT32_C_SUFFIX__ U
+// AARCH64:#define __UINT32_MAX__ 4294967295U
+// AARCH64:#define __UINT32_TYPE__ unsigned int
+// AARCH64:#define __UINT64_C_SUFFIX__ UL
+// AARCH64:#define __UINT64_MAX__ 18446744073709551615UL
+// AARCH64:#define __UINT64_TYPE__ long unsigned int
+// AARCH64:#define __UINT8_C_SUFFIX__ {{$}}
+// AARCH64:#define __UINT8_MAX__ 255
+// AARCH64:#define __UINT8_TYPE__ unsigned char
+// AARCH64:#define __UINTMAX_C_SUFFIX__ UL
+// AARCH64:#define __UINTMAX_MAX__ 18446744073709551615UL
+// AARCH64:#define __UINTMAX_TYPE__ long unsigned int
+// AARCH64:#define __UINTMAX_WIDTH__ 64
+// AARCH64:#define __UINTPTR_MAX__ 18446744073709551615UL
+// AARCH64:#define __UINTPTR_TYPE__ long unsigned int
+// AARCH64:#define __UINTPTR_WIDTH__ 64
+// AARCH64:#define __UINT_FAST16_MAX__ 65535
+// AARCH64:#define __UINT_FAST16_TYPE__ unsigned short
+// AARCH64:#define __UINT_FAST32_MAX__ 4294967295U
+// AARCH64:#define __UINT_FAST32_TYPE__ unsigned int
+// AARCH64:#define __UINT_FAST64_MAX__ 18446744073709551615UL
+// AARCH64:#define __UINT_FAST64_TYPE__ long unsigned int
+// AARCH64:#define __UINT_FAST8_MAX__ 255
+// AARCH64:#define __UINT_FAST8_TYPE__ unsigned char
+// AARCH64:#define __UINT_LEAST16_MAX__ 65535
+// AARCH64:#define __UINT_LEAST16_TYPE__ unsigned short
+// AARCH64:#define __UINT_LEAST32_MAX__ 4294967295U
+// AARCH64:#define __UINT_LEAST32_TYPE__ unsigned int
+// AARCH64:#define __UINT_LEAST64_MAX__ 18446744073709551615UL
+// AARCH64:#define __UINT_LEAST64_TYPE__ long unsigned int
+// AARCH64:#define __UINT_LEAST8_MAX__ 255
+// AARCH64:#define __UINT_LEAST8_TYPE__ unsigned char
+// AARCH64:#define __USER_LABEL_PREFIX__ _
+// AARCH64:#define __WCHAR_MAX__ 4294967295U
+// AARCH64:#define __WCHAR_TYPE__ unsigned int
+// AARCH64:#define __WCHAR_UNSIGNED__ 1
+// AARCH64:#define __WCHAR_WIDTH__ 32
+// AARCH64:#define __WINT_TYPE__ int
+// AARCH64:#define __WINT_WIDTH__ 32
+// AARCH64:#define __aarch64__ 1
+//
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=aarch64_be-none-none < /dev/null | FileCheck -check-prefix AARCH64-BE %s
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=arm64_be-none-none < /dev/null | FileCheck -check-prefix AARCH64-BE %s
+//
+// AARCH64-BE:#define _LP64 1
+// AARCH64-BE:#define __AARCH64EB__ 1
+// AARCH64-BE-NOT:#define __AARCH64EL__ 1
+// AARCH64-BE:#define __AARCH_BIG_ENDIAN 1
+// AARCH64-BE:#define __ARM_64BIT_STATE 1
+// AARCH64-BE:#define __ARM_ARCH 8
+// AARCH64-BE:#define __ARM_ARCH_ISA_A64 1
+// AARCH64-BE:#define __ARM_BIG_ENDIAN 1
+// AARCH64-BE:#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
+// AARCH64-BE:#define __CHAR16_TYPE__ unsigned short
+// AARCH64-BE:#define __CHAR32_TYPE__ unsigned int
+// AARCH64-BE:#define __CHAR_BIT__ 8
+// AARCH64-BE:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
+// AARCH64-BE:#define __DBL_DIG__ 15
+// AARCH64-BE:#define __DBL_EPSILON__ 2.2204460492503131e-16
+// AARCH64-BE:#define __DBL_HAS_DENORM__ 1
+// AARCH64-BE:#define __DBL_HAS_INFINITY__ 1
+// AARCH64-BE:#define __DBL_HAS_QUIET_NAN__ 1
+// AARCH64-BE:#define __DBL_MANT_DIG__ 53
+// AARCH64-BE:#define __DBL_MAX_10_EXP__ 308
+// AARCH64-BE:#define __DBL_MAX_EXP__ 1024
+// AARCH64-BE:#define __DBL_MAX__ 1.7976931348623157e+308
+// AARCH64-BE:#define __DBL_MIN_10_EXP__ (-307)
+// AARCH64-BE:#define __DBL_MIN_EXP__ (-1021)
+// AARCH64-BE:#define __DBL_MIN__ 2.2250738585072014e-308
+// AARCH64-BE:#define __DECIMAL_DIG__ 36
+// AARCH64-BE:#define __FLT_DENORM_MIN__ 1.40129846e-45F
+// AARCH64-BE:#define __FLT_DIG__ 6
+// AARCH64-BE:#define __FLT_EPSILON__ 1.19209290e-7F
+// AARCH64-BE:#define __FLT_EVAL_METHOD__ 0
+// AARCH64-BE:#define __FLT_HAS_DENORM__ 1
+// AARCH64-BE:#define __FLT_HAS_INFINITY__ 1
+// AARCH64-BE:#define __FLT_HAS_QUIET_NAN__ 1
+// AARCH64-BE:#define __FLT_MANT_DIG__ 24
+// AARCH64-BE:#define __FLT_MAX_10_EXP__ 38
+// AARCH64-BE:#define __FLT_MAX_EXP__ 128
+// AARCH64-BE:#define __FLT_MAX__ 3.40282347e+38F
+// AARCH64-BE:#define __FLT_MIN_10_EXP__ (-37)
+// AARCH64-BE:#define __FLT_MIN_EXP__ (-125)
+// AARCH64-BE:#define __FLT_MIN__ 1.17549435e-38F
+// AARCH64-BE:#define __FLT_RADIX__ 2
+// AARCH64-BE:#define __INT16_C_SUFFIX__ {{$}}
+// AARCH64-BE:#define __INT16_FMTd__ "hd"
+// AARCH64-BE:#define __INT16_FMTi__ "hi"
+// AARCH64-BE:#define __INT16_MAX__ 32767
+// AARCH64-BE:#define __INT16_TYPE__ short
+// AARCH64-BE:#define __INT32_C_SUFFIX__ {{$}}
+// AARCH64-BE:#define __INT32_FMTd__ "d"
+// AARCH64-BE:#define __INT32_FMTi__ "i"
+// AARCH64-BE:#define __INT32_MAX__ 2147483647
+// AARCH64-BE:#define __INT32_TYPE__ int
+// AARCH64-BE:#define __INT64_C_SUFFIX__ L
+// AARCH64-BE:#define __INT64_FMTd__ "ld"
+// AARCH64-BE:#define __INT64_FMTi__ "li"
+// AARCH64-BE:#define __INT64_MAX__ 9223372036854775807L
+// AARCH64-BE:#define __INT64_TYPE__ long int
+// AARCH64-BE:#define __INT8_C_SUFFIX__ {{$}}
+// AARCH64-BE:#define __INT8_FMTd__ "hhd"
+// AARCH64-BE:#define __INT8_FMTi__ "hhi"
+// AARCH64-BE:#define __INT8_MAX__ 127
+// AARCH64-BE:#define __INT8_TYPE__ signed char
+// AARCH64-BE:#define __INTMAX_C_SUFFIX__ L
+// AARCH64-BE:#define __INTMAX_FMTd__ "ld"
+// AARCH64-BE:#define __INTMAX_FMTi__ "li"
+// AARCH64-BE:#define __INTMAX_MAX__ 9223372036854775807L
+// AARCH64-BE:#define __INTMAX_TYPE__ long int
+// AARCH64-BE:#define __INTMAX_WIDTH__ 64
+// AARCH64-BE:#define __INTPTR_FMTd__ "ld"
+// AARCH64-BE:#define __INTPTR_FMTi__ "li"
+// AARCH64-BE:#define __INTPTR_MAX__ 9223372036854775807L
+// AARCH64-BE:#define __INTPTR_TYPE__ long int
+// AARCH64-BE:#define __INTPTR_WIDTH__ 64
+// AARCH64-BE:#define __INT_FAST16_FMTd__ "hd"
+// AARCH64-BE:#define __INT_FAST16_FMTi__ "hi"
+// AARCH64-BE:#define __INT_FAST16_MAX__ 32767
+// AARCH64-BE:#define __INT_FAST16_TYPE__ short
+// AARCH64-BE:#define __INT_FAST32_FMTd__ "d"
+// AARCH64-BE:#define __INT_FAST32_FMTi__ "i"
+// AARCH64-BE:#define __INT_FAST32_MAX__ 2147483647
+// AARCH64-BE:#define __INT_FAST32_TYPE__ int
+// AARCH64-BE:#define __INT_FAST64_FMTd__ "ld"
+// AARCH64-BE:#define __INT_FAST64_FMTi__ "li"
+// AARCH64-BE:#define __INT_FAST64_MAX__ 9223372036854775807L
+// AARCH64-BE:#define __INT_FAST64_TYPE__ long int
+// AARCH64-BE:#define __INT_FAST8_FMTd__ "hhd"
+// AARCH64-BE:#define __INT_FAST8_FMTi__ "hhi"
+// AARCH64-BE:#define __INT_FAST8_MAX__ 127
+// AARCH64-BE:#define __INT_FAST8_TYPE__ signed char
+// AARCH64-BE:#define __INT_LEAST16_FMTd__ "hd"
+// AARCH64-BE:#define __INT_LEAST16_FMTi__ "hi"
+// AARCH64-BE:#define __INT_LEAST16_MAX__ 32767
+// AARCH64-BE:#define __INT_LEAST16_TYPE__ short
+// AARCH64-BE:#define __INT_LEAST32_FMTd__ "d"
+// AARCH64-BE:#define __INT_LEAST32_FMTi__ "i"
+// AARCH64-BE:#define __INT_LEAST32_MAX__ 2147483647
+// AARCH64-BE:#define __INT_LEAST32_TYPE__ int
+// AARCH64-BE:#define __INT_LEAST64_FMTd__ "ld"
+// AARCH64-BE:#define __INT_LEAST64_FMTi__ "li"
+// AARCH64-BE:#define __INT_LEAST64_MAX__ 9223372036854775807L
+// AARCH64-BE:#define __INT_LEAST64_TYPE__ long int
+// AARCH64-BE:#define __INT_LEAST8_FMTd__ "hhd"
+// AARCH64-BE:#define __INT_LEAST8_FMTi__ "hhi"
+// AARCH64-BE:#define __INT_LEAST8_MAX__ 127
+// AARCH64-BE:#define __INT_LEAST8_TYPE__ signed char
+// AARCH64-BE:#define __INT_MAX__ 2147483647
+// AARCH64-BE:#define __LDBL_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966L
+// AARCH64-BE:#define __LDBL_DIG__ 33
+// AARCH64-BE:#define __LDBL_EPSILON__ 1.92592994438723585305597794258492732e-34L
+// AARCH64-BE:#define __LDBL_HAS_DENORM__ 1
+// AARCH64-BE:#define __LDBL_HAS_INFINITY__ 1
+// AARCH64-BE:#define __LDBL_HAS_QUIET_NAN__ 1
+// AARCH64-BE:#define __LDBL_MANT_DIG__ 113
+// AARCH64-BE:#define __LDBL_MAX_10_EXP__ 4932
+// AARCH64-BE:#define __LDBL_MAX_EXP__ 16384
+// AARCH64-BE:#define __LDBL_MAX__ 1.18973149535723176508575932662800702e+4932L
+// AARCH64-BE:#define __LDBL_MIN_10_EXP__ (-4931)
+// AARCH64-BE:#define __LDBL_MIN_EXP__ (-16381)
+// AARCH64-BE:#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L
+// AARCH64-BE:#define __LONG_LONG_MAX__ 9223372036854775807LL
+// AARCH64-BE:#define __LONG_MAX__ 9223372036854775807L
+// AARCH64-BE:#define __LP64__ 1
+// AARCH64-BE:#define __POINTER_WIDTH__ 64
+// AARCH64-BE:#define __PTRDIFF_TYPE__ long int
+// AARCH64-BE:#define __PTRDIFF_WIDTH__ 64
+// AARCH64-BE:#define __SCHAR_MAX__ 127
+// AARCH64-BE:#define __SHRT_MAX__ 32767
+// AARCH64-BE:#define __SIG_ATOMIC_MAX__ 2147483647
+// AARCH64-BE:#define __SIG_ATOMIC_WIDTH__ 32
+// AARCH64-BE:#define __SIZEOF_DOUBLE__ 8
+// AARCH64-BE:#define __SIZEOF_FLOAT__ 4
+// AARCH64-BE:#define __SIZEOF_INT128__ 16
+// AARCH64-BE:#define __SIZEOF_INT__ 4
+// AARCH64-BE:#define __SIZEOF_LONG_DOUBLE__ 16
+// AARCH64-BE:#define __SIZEOF_LONG_LONG__ 8
+// AARCH64-BE:#define __SIZEOF_LONG__ 8
+// AARCH64-BE:#define __SIZEOF_POINTER__ 8
+// AARCH64-BE:#define __SIZEOF_PTRDIFF_T__ 8
+// AARCH64-BE:#define __SIZEOF_SHORT__ 2
+// AARCH64-BE:#define __SIZEOF_SIZE_T__ 8
+// AARCH64-BE:#define __SIZEOF_WCHAR_T__ 4
+// AARCH64-BE:#define __SIZEOF_WINT_T__ 4
+// AARCH64-BE:#define __SIZE_MAX__ 18446744073709551615UL
+// AARCH64-BE:#define __SIZE_TYPE__ long unsigned int
+// AARCH64-BE:#define __SIZE_WIDTH__ 64
+// AARCH64-BE:#define __UINT16_C_SUFFIX__ {{$}}
+// AARCH64-BE:#define __UINT16_MAX__ 65535
+// AARCH64-BE:#define __UINT16_TYPE__ unsigned short
+// AARCH64-BE:#define __UINT32_C_SUFFIX__ U
+// AARCH64-BE:#define __UINT32_MAX__ 4294967295U
+// AARCH64-BE:#define __UINT32_TYPE__ unsigned int
+// AARCH64-BE:#define __UINT64_C_SUFFIX__ UL
+// AARCH64-BE:#define __UINT64_MAX__ 18446744073709551615UL
+// AARCH64-BE:#define __UINT64_TYPE__ long unsigned int
+// AARCH64-BE:#define __UINT8_C_SUFFIX__ {{$}}
+// AARCH64-BE:#define __UINT8_MAX__ 255
+// AARCH64-BE:#define __UINT8_TYPE__ unsigned char
+// AARCH64-BE:#define __UINTMAX_C_SUFFIX__ UL
+// AARCH64-BE:#define __UINTMAX_MAX__ 18446744073709551615UL
+// AARCH64-BE:#define __UINTMAX_TYPE__ long unsigned int
+// AARCH64-BE:#define __UINTMAX_WIDTH__ 64
+// AARCH64-BE:#define __UINTPTR_MAX__ 18446744073709551615UL
+// AARCH64-BE:#define __UINTPTR_TYPE__ long unsigned int
+// AARCH64-BE:#define __UINTPTR_WIDTH__ 64
+// AARCH64-BE:#define __UINT_FAST16_MAX__ 65535
+// AARCH64-BE:#define __UINT_FAST16_TYPE__ unsigned short
+// AARCH64-BE:#define __UINT_FAST32_MAX__ 4294967295U
+// AARCH64-BE:#define __UINT_FAST32_TYPE__ unsigned int
+// AARCH64-BE:#define __UINT_FAST64_MAX__ 18446744073709551615UL
+// AARCH64-BE:#define __UINT_FAST64_TYPE__ long unsigned int
+// AARCH64-BE:#define __UINT_FAST8_MAX__ 255
+// AARCH64-BE:#define __UINT_FAST8_TYPE__ unsigned char
+// AARCH64-BE:#define __UINT_LEAST16_MAX__ 65535
+// AARCH64-BE:#define __UINT_LEAST16_TYPE__ unsigned short
+// AARCH64-BE:#define __UINT_LEAST32_MAX__ 4294967295U
+// AARCH64-BE:#define __UINT_LEAST32_TYPE__ unsigned int
+// AARCH64-BE:#define __UINT_LEAST64_MAX__ 18446744073709551615UL
+// AARCH64-BE:#define __UINT_LEAST64_TYPE__ long unsigned int
+// AARCH64-BE:#define __UINT_LEAST8_MAX__ 255
+// AARCH64-BE:#define __UINT_LEAST8_TYPE__ unsigned char
+// AARCH64-BE:#define __USER_LABEL_PREFIX__ _
+// AARCH64-BE:#define __WCHAR_MAX__ 4294967295U
+// AARCH64-BE:#define __WCHAR_TYPE__ unsigned int
+// AARCH64-BE:#define __WCHAR_UNSIGNED__ 1
+// AARCH64-BE:#define __WCHAR_WIDTH__ 32
+// AARCH64-BE:#define __WINT_TYPE__ int
+// AARCH64-BE:#define __WINT_WIDTH__ 32
+// AARCH64-BE:#define __aarch64__ 1
+//
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=aarch64-netbsd < /dev/null | FileCheck -check-prefix AARCH64-NETBSD %s
+//
+// AARCH64-NETBSD:#define _LP64 1
+// AARCH64-NETBSD-NOT:#define __AARCH64EB__ 1
+// AARCH64-NETBSD:#define __AARCH64EL__ 1
+// AARCH64-NETBSD-NOT:#define __AARCH_BIG_ENDIAN 1
+// AARCH64-NETBSD:#define __ARM_64BIT_STATE 1
+// AARCH64-NETBSD:#define __ARM_ARCH 8
+// AARCH64-NETBSD:#define __ARM_ARCH_ISA_A64 1
+// AARCH64-NETBSD-NOT:#define __ARM_BIG_ENDIAN 1
+// AARCH64-NETBSD:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
+// AARCH64-NETBSD:#define __CHAR16_TYPE__ unsigned short
+// AARCH64-NETBSD:#define __CHAR32_TYPE__ unsigned int
+// AARCH64-NETBSD:#define __CHAR_BIT__ 8
+// AARCH64-NETBSD:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
+// AARCH64-NETBSD:#define __DBL_DIG__ 15
+// AARCH64-NETBSD:#define __DBL_EPSILON__ 2.2204460492503131e-16
+// AARCH64-NETBSD:#define __DBL_HAS_DENORM__ 1
+// AARCH64-NETBSD:#define __DBL_HAS_INFINITY__ 1
+// AARCH64-NETBSD:#define __DBL_HAS_QUIET_NAN__ 1
+// AARCH64-NETBSD:#define __DBL_MANT_DIG__ 53
+// AARCH64-NETBSD:#define __DBL_MAX_10_EXP__ 308
+// AARCH64-NETBSD:#define __DBL_MAX_EXP__ 1024
+// AARCH64-NETBSD:#define __DBL_MAX__ 1.7976931348623157e+308
+// AARCH64-NETBSD:#define __DBL_MIN_10_EXP__ (-307)
+// AARCH64-NETBSD:#define __DBL_MIN_EXP__ (-1021)
+// AARCH64-NETBSD:#define __DBL_MIN__ 2.2250738585072014e-308
+// AARCH64-NETBSD:#define __DECIMAL_DIG__ 36
+// AARCH64-NETBSD:#define __ELF__ 1
+// AARCH64-NETBSD:#define __FLT_DENORM_MIN__ 1.40129846e-45F
+// AARCH64-NETBSD:#define __FLT_DIG__ 6
+// AARCH64-NETBSD:#define __FLT_EPSILON__ 1.19209290e-7F
+// AARCH64-NETBSD:#define __FLT_EVAL_METHOD__ 0
+// AARCH64-NETBSD:#define __FLT_HAS_DENORM__ 1
+// AARCH64-NETBSD:#define __FLT_HAS_INFINITY__ 1
+// AARCH64-NETBSD:#define __FLT_HAS_QUIET_NAN__ 1
+// AARCH64-NETBSD:#define __FLT_MANT_DIG__ 24
+// AARCH64-NETBSD:#define __FLT_MAX_10_EXP__ 38
+// AARCH64-NETBSD:#define __FLT_MAX_EXP__ 128
+// AARCH64-NETBSD:#define __FLT_MAX__ 3.40282347e+38F
+// AARCH64-NETBSD:#define __FLT_MIN_10_EXP__ (-37)
+// AARCH64-NETBSD:#define __FLT_MIN_EXP__ (-125)
+// AARCH64-NETBSD:#define __FLT_MIN__ 1.17549435e-38F
+// AARCH64-NETBSD:#define __FLT_RADIX__ 2
+// AARCH64-NETBSD:#define __INT16_C_SUFFIX__ {{$}}
+// AARCH64-NETBSD:#define __INT16_FMTd__ "hd"
+// AARCH64-NETBSD:#define __INT16_FMTi__ "hi"
+// AARCH64-NETBSD:#define __INT16_MAX__ 32767
+// AARCH64-NETBSD:#define __INT16_TYPE__ short
+// AARCH64-NETBSD:#define __INT32_C_SUFFIX__ {{$}}
+// AARCH64-NETBSD:#define __INT32_FMTd__ "d"
+// AARCH64-NETBSD:#define __INT32_FMTi__ "i"
+// AARCH64-NETBSD:#define __INT32_MAX__ 2147483647
+// AARCH64-NETBSD:#define __INT32_TYPE__ int
+// AARCH64-NETBSD:#define __INT64_C_SUFFIX__ LL
+// AARCH64-NETBSD:#define __INT64_FMTd__ "lld"
+// AARCH64-NETBSD:#define __INT64_FMTi__ "lli"
+// AARCH64-NETBSD:#define __INT64_MAX__ 9223372036854775807L
+// AARCH64-NETBSD:#define __INT64_TYPE__ long long int
+// AARCH64-NETBSD:#define __INT8_C_SUFFIX__ {{$}}
+// AARCH64-NETBSD:#define __INT8_FMTd__ "hhd"
+// AARCH64-NETBSD:#define __INT8_FMTi__ "hhi"
+// AARCH64-NETBSD:#define __INT8_MAX__ 127
+// AARCH64-NETBSD:#define __INT8_TYPE__ signed char
+// AARCH64-NETBSD:#define __INTMAX_C_SUFFIX__ LL
+// AARCH64-NETBSD:#define __INTMAX_FMTd__ "lld"
+// AARCH64-NETBSD:#define __INTMAX_FMTi__ "lli"
+// AARCH64-NETBSD:#define __INTMAX_MAX__ 9223372036854775807LL
+// AARCH64-NETBSD:#define __INTMAX_TYPE__ long long int
+// AARCH64-NETBSD:#define __INTMAX_WIDTH__ 64
+// AARCH64-NETBSD:#define __INTPTR_FMTd__ "ld"
+// AARCH64-NETBSD:#define __INTPTR_FMTi__ "li"
+// AARCH64-NETBSD:#define __INTPTR_MAX__ 9223372036854775807L
+// AARCH64-NETBSD:#define __INTPTR_TYPE__ long int
+// AARCH64-NETBSD:#define __INTPTR_WIDTH__ 64
+// AARCH64-NETBSD:#define __INT_FAST16_FMTd__ "hd"
+// AARCH64-NETBSD:#define __INT_FAST16_FMTi__ "hi"
+// AARCH64-NETBSD:#define __INT_FAST16_MAX__ 32767
+// AARCH64-NETBSD:#define __INT_FAST16_TYPE__ short
+// AARCH64-NETBSD:#define __INT_FAST32_FMTd__ "d"
+// AARCH64-NETBSD:#define __INT_FAST32_FMTi__ "i"
+// AARCH64-NETBSD:#define __INT_FAST32_MAX__ 2147483647
+// AARCH64-NETBSD:#define __INT_FAST32_TYPE__ int
+// AARCH64-NETBSD:#define __INT_FAST64_FMTd__ "ld"
+// AARCH64-NETBSD:#define __INT_FAST64_FMTi__ "li"
+// AARCH64-NETBSD:#define __INT_FAST64_MAX__ 9223372036854775807L
+// AARCH64-NETBSD:#define __INT_FAST64_TYPE__ long int
+// AARCH64-NETBSD:#define __INT_FAST8_FMTd__ "hhd"
+// AARCH64-NETBSD:#define __INT_FAST8_FMTi__ "hhi"
+// AARCH64-NETBSD:#define __INT_FAST8_MAX__ 127
+// AARCH64-NETBSD:#define __INT_FAST8_TYPE__ signed char
+// AARCH64-NETBSD:#define __INT_LEAST16_FMTd__ "hd"
+// AARCH64-NETBSD:#define __INT_LEAST16_FMTi__ "hi"
+// AARCH64-NETBSD:#define __INT_LEAST16_MAX__ 32767
+// AARCH64-NETBSD:#define __INT_LEAST16_TYPE__ short
+// AARCH64-NETBSD:#define __INT_LEAST32_FMTd__ "d"
+// AARCH64-NETBSD:#define __INT_LEAST32_FMTi__ "i"
+// AARCH64-NETBSD:#define __INT_LEAST32_MAX__ 2147483647
+// AARCH64-NETBSD:#define __INT_LEAST32_TYPE__ int
+// AARCH64-NETBSD:#define __INT_LEAST64_FMTd__ "ld"
+// AARCH64-NETBSD:#define __INT_LEAST64_FMTi__ "li"
+// AARCH64-NETBSD:#define __INT_LEAST64_MAX__ 9223372036854775807L
+// AARCH64-NETBSD:#define __INT_LEAST64_TYPE__ long int
+// AARCH64-NETBSD:#define __INT_LEAST8_FMTd__ "hhd"
+// AARCH64-NETBSD:#define __INT_LEAST8_FMTi__ "hhi"
+// AARCH64-NETBSD:#define __INT_LEAST8_MAX__ 127
+// AARCH64-NETBSD:#define __INT_LEAST8_TYPE__ signed char
+// AARCH64-NETBSD:#define __INT_MAX__ 2147483647
+// AARCH64-NETBSD:#define __LDBL_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966L
+// AARCH64-NETBSD:#define __LDBL_DIG__ 33
+// AARCH64-NETBSD:#define __LDBL_EPSILON__ 1.92592994438723585305597794258492732e-34L
+// AARCH64-NETBSD:#define __LDBL_HAS_DENORM__ 1
+// AARCH64-NETBSD:#define __LDBL_HAS_INFINITY__ 1
+// AARCH64-NETBSD:#define __LDBL_HAS_QUIET_NAN__ 1
+// AARCH64-NETBSD:#define __LDBL_MANT_DIG__ 113
+// AARCH64-NETBSD:#define __LDBL_MAX_10_EXP__ 4932
+// AARCH64-NETBSD:#define __LDBL_MAX_EXP__ 16384
+// AARCH64-NETBSD:#define __LDBL_MAX__ 1.18973149535723176508575932662800702e+4932L
+// AARCH64-NETBSD:#define __LDBL_MIN_10_EXP__ (-4931)
+// AARCH64-NETBSD:#define __LDBL_MIN_EXP__ (-16381)
+// AARCH64-NETBSD:#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L
+// AARCH64-NETBSD:#define __LITTLE_ENDIAN__ 1
+// AARCH64-NETBSD:#define __LONG_LONG_MAX__ 9223372036854775807LL
+// AARCH64-NETBSD:#define __LONG_MAX__ 9223372036854775807L
+// AARCH64-NETBSD:#define __LP64__ 1
+// AARCH64-NETBSD:#define __NetBSD__ 1
+// AARCH64-NETBSD:#define __POINTER_WIDTH__ 64
+// AARCH64-NETBSD:#define __PTRDIFF_TYPE__ long int
+// AARCH64-NETBSD:#define __PTRDIFF_WIDTH__ 64
+// AARCH64-NETBSD:#define __SCHAR_MAX__ 127
+// AARCH64-NETBSD:#define __SHRT_MAX__ 32767
+// AARCH64-NETBSD:#define __SIG_ATOMIC_MAX__ 2147483647
+// AARCH64-NETBSD:#define __SIG_ATOMIC_WIDTH__ 32
+// AARCH64-NETBSD:#define __SIZEOF_DOUBLE__ 8
+// AARCH64-NETBSD:#define __SIZEOF_FLOAT__ 4
+// AARCH64-NETBSD:#define __SIZEOF_INT__ 4
+// AARCH64-NETBSD:#define __SIZEOF_LONG_DOUBLE__ 16
+// AARCH64-NETBSD:#define __SIZEOF_LONG_LONG__ 8
+// AARCH64-NETBSD:#define __SIZEOF_LONG__ 8
+// AARCH64-NETBSD:#define __SIZEOF_POINTER__ 8
+// AARCH64-NETBSD:#define __SIZEOF_PTRDIFF_T__ 8
+// AARCH64-NETBSD:#define __SIZEOF_SHORT__ 2
+// AARCH64-NETBSD:#define __SIZEOF_SIZE_T__ 8
+// AARCH64-NETBSD:#define __SIZEOF_WCHAR_T__ 4
+// AARCH64-NETBSD:#define __SIZEOF_WINT_T__ 4
+// AARCH64-NETBSD:#define __SIZE_MAX__ 18446744073709551615UL
+// AARCH64-NETBSD:#define __SIZE_TYPE__ long unsigned int
+// AARCH64-NETBSD:#define __SIZE_WIDTH__ 64
+// AARCH64-NETBSD:#define __UINT16_C_SUFFIX__ {{$}}
+// AARCH64-NETBSD:#define __UINT16_MAX__ 65535
+// AARCH64-NETBSD:#define __UINT16_TYPE__ unsigned short
+// AARCH64-NETBSD:#define __UINT32_C_SUFFIX__ U
+// AARCH64-NETBSD:#define __UINT32_MAX__ 4294967295U
+// AARCH64-NETBSD:#define __UINT32_TYPE__ unsigned int
+// AARCH64-NETBSD:#define __UINT64_C_SUFFIX__ ULL
+// AARCH64-NETBSD:#define __UINT64_MAX__ 18446744073709551615ULL
+// AARCH64-NETBSD:#define __UINT64_TYPE__ long long unsigned int
+// AARCH64-NETBSD:#define __UINT8_C_SUFFIX__ {{$}}
+// AARCH64-NETBSD:#define __UINT8_MAX__ 255
+// AARCH64-NETBSD:#define __UINT8_TYPE__ unsigned char
+// AARCH64-NETBSD:#define __UINTMAX_C_SUFFIX__ ULL
+// AARCH64-NETBSD:#define __UINTMAX_MAX__ 18446744073709551615ULL
+// AARCH64-NETBSD:#define __UINTMAX_TYPE__ long long unsigned int
+// AARCH64-NETBSD:#define __UINTMAX_WIDTH__ 64
+// AARCH64-NETBSD:#define __UINTPTR_MAX__ 18446744073709551615UL
+// AARCH64-NETBSD:#define __UINTPTR_TYPE__ long unsigned int
+// AARCH64-NETBSD:#define __UINTPTR_WIDTH__ 64
+// AARCH64-NETBSD:#define __UINT_FAST16_MAX__ 65535
+// AARCH64-NETBSD:#define __UINT_FAST16_TYPE__ unsigned short
+// AARCH64-NETBSD:#define __UINT_FAST32_MAX__ 4294967295U
+// AARCH64-NETBSD:#define __UINT_FAST32_TYPE__ unsigned int
+// AARCH64-NETBSD:#define __UINT_FAST64_MAX__ 18446744073709551615UL
+// AARCH64-NETBSD:#define __UINT_FAST64_TYPE__ long unsigned int
+// AARCH64-NETBSD:#define __UINT_FAST8_MAX__ 255
+// AARCH64-NETBSD:#define __UINT_FAST8_TYPE__ unsigned char
+// AARCH64-NETBSD:#define __UINT_LEAST16_MAX__ 65535
+// AARCH64-NETBSD:#define __UINT_LEAST16_TYPE__ unsigned short
+// AARCH64-NETBSD:#define __UINT_LEAST32_MAX__ 4294967295U
+// AARCH64-NETBSD:#define __UINT_LEAST32_TYPE__ unsigned int
+// AARCH64-NETBSD:#define __UINT_LEAST64_MAX__ 18446744073709551615UL
+// AARCH64-NETBSD:#define __UINT_LEAST64_TYPE__ long unsigned int
+// AARCH64-NETBSD:#define __UINT_LEAST8_MAX__ 255
+// AARCH64-NETBSD:#define __UINT_LEAST8_TYPE__ unsigned char
+// AARCH64-NETBSD:#define __USER_LABEL_PREFIX__
+// AARCH64-NETBSD:#define __WCHAR_MAX__ 2147483647
+// AARCH64-NETBSD:#define __WCHAR_TYPE__ int
+// AARCH64-NETBSD:#define __WCHAR_WIDTH__ 32
+// AARCH64-NETBSD:#define __WINT_TYPE__ int
+// AARCH64-NETBSD:#define __WINT_WIDTH__ 32
+// AARCH64-NETBSD:#define __aarch64__ 1
+
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=arm-none-none < /dev/null | FileCheck -check-prefix ARM %s
//
// ARM-NOT:#define _LP64
// ARM:#define __APCS_32__ 1
+// ARM-NOT:#define __ARMEB__ 1
// ARM:#define __ARMEL__ 1
// ARM:#define __ARM_ARCH_6J__ 1
+// ARM-NOT:#define __ARM_BIG_ENDIAN 1
// ARM:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
// ARM:#define __CHAR16_TYPE__ unsigned short
// ARM:#define __CHAR32_TYPE__ unsigned int
@@ -241,16 +844,69 @@
// ARM:#define __FLT_MIN_EXP__ (-125)
// ARM:#define __FLT_MIN__ 1.17549435e-38F
// ARM:#define __FLT_RADIX__ 2
+// ARM:#define __INT16_C_SUFFIX__ {{$}}
+// ARM:#define __INT16_FMTd__ "hd"
+// ARM:#define __INT16_FMTi__ "hi"
+// ARM:#define __INT16_MAX__ 32767
// ARM:#define __INT16_TYPE__ short
+// ARM:#define __INT32_C_SUFFIX__ {{$}}
+// ARM:#define __INT32_FMTd__ "d"
+// ARM:#define __INT32_FMTi__ "i"
+// ARM:#define __INT32_MAX__ 2147483647
// ARM:#define __INT32_TYPE__ int
// ARM:#define __INT64_C_SUFFIX__ LL
+// ARM:#define __INT64_FMTd__ "lld"
+// ARM:#define __INT64_FMTi__ "lli"
+// ARM:#define __INT64_MAX__ 9223372036854775807LL
// ARM:#define __INT64_TYPE__ long long int
-// ARM:#define __INT8_TYPE__ char
+// ARM:#define __INT8_C_SUFFIX__ {{$}}
+// ARM:#define __INT8_FMTd__ "hhd"
+// ARM:#define __INT8_FMTi__ "hhi"
+// ARM:#define __INT8_MAX__ 127
+// ARM:#define __INT8_TYPE__ signed char
+// ARM:#define __INTMAX_C_SUFFIX__ LL
+// ARM:#define __INTMAX_FMTd__ "lld"
+// ARM:#define __INTMAX_FMTi__ "lli"
// ARM:#define __INTMAX_MAX__ 9223372036854775807LL
// ARM:#define __INTMAX_TYPE__ long long int
// ARM:#define __INTMAX_WIDTH__ 64
+// ARM:#define __INTPTR_FMTd__ "ld"
+// ARM:#define __INTPTR_FMTi__ "li"
+// ARM:#define __INTPTR_MAX__ 2147483647L
// ARM:#define __INTPTR_TYPE__ long int
// ARM:#define __INTPTR_WIDTH__ 32
+// ARM:#define __INT_FAST16_FMTd__ "hd"
+// ARM:#define __INT_FAST16_FMTi__ "hi"
+// ARM:#define __INT_FAST16_MAX__ 32767
+// ARM:#define __INT_FAST16_TYPE__ short
+// ARM:#define __INT_FAST32_FMTd__ "d"
+// ARM:#define __INT_FAST32_FMTi__ "i"
+// ARM:#define __INT_FAST32_MAX__ 2147483647
+// ARM:#define __INT_FAST32_TYPE__ int
+// ARM:#define __INT_FAST64_FMTd__ "lld"
+// ARM:#define __INT_FAST64_FMTi__ "lli"
+// ARM:#define __INT_FAST64_MAX__ 9223372036854775807LL
+// ARM:#define __INT_FAST64_TYPE__ long long int
+// ARM:#define __INT_FAST8_FMTd__ "hhd"
+// ARM:#define __INT_FAST8_FMTi__ "hhi"
+// ARM:#define __INT_FAST8_MAX__ 127
+// ARM:#define __INT_FAST8_TYPE__ signed char
+// ARM:#define __INT_LEAST16_FMTd__ "hd"
+// ARM:#define __INT_LEAST16_FMTi__ "hi"
+// ARM:#define __INT_LEAST16_MAX__ 32767
+// ARM:#define __INT_LEAST16_TYPE__ short
+// ARM:#define __INT_LEAST32_FMTd__ "d"
+// ARM:#define __INT_LEAST32_FMTi__ "i"
+// ARM:#define __INT_LEAST32_MAX__ 2147483647
+// ARM:#define __INT_LEAST32_TYPE__ int
+// ARM:#define __INT_LEAST64_FMTd__ "lld"
+// ARM:#define __INT_LEAST64_FMTi__ "lli"
+// ARM:#define __INT_LEAST64_MAX__ 9223372036854775807LL
+// ARM:#define __INT_LEAST64_TYPE__ long long int
+// ARM:#define __INT_LEAST8_FMTd__ "hhd"
+// ARM:#define __INT_LEAST8_FMTi__ "hhi"
+// ARM:#define __INT_LEAST8_MAX__ 127
+// ARM:#define __INT_LEAST8_TYPE__ signed char
// ARM:#define __INT_MAX__ 2147483647
// ARM:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
// ARM:#define __LDBL_DIG__ 15
@@ -275,6 +931,7 @@
// ARM:#define __REGISTER_PREFIX__
// ARM:#define __SCHAR_MAX__ 127
// ARM:#define __SHRT_MAX__ 32767
+// ARM:#define __SIG_ATOMIC_MAX__ 2147483647
// ARM:#define __SIG_ATOMIC_WIDTH__ 32
// ARM:#define __SIZEOF_DOUBLE__ 8
// ARM:#define __SIZEOF_FLOAT__ 4
@@ -292,7 +949,41 @@
// ARM:#define __SIZE_TYPE__ unsigned int
// ARM:#define __SIZE_WIDTH__ 32
// ARM:#define __THUMB_INTERWORK__ 1
+// ARM:#define __UINT16_C_SUFFIX__ {{$}}
+// ARM:#define __UINT16_MAX__ 65535
+// ARM:#define __UINT16_TYPE__ unsigned short
+// ARM:#define __UINT32_C_SUFFIX__ U
+// ARM:#define __UINT32_MAX__ 4294967295U
+// ARM:#define __UINT32_TYPE__ unsigned int
+// ARM:#define __UINT64_C_SUFFIX__ ULL
+// ARM:#define __UINT64_MAX__ 18446744073709551615ULL
+// ARM:#define __UINT64_TYPE__ long long unsigned int
+// ARM:#define __UINT8_C_SUFFIX__ {{$}}
+// ARM:#define __UINT8_MAX__ 255
+// ARM:#define __UINT8_TYPE__ unsigned char
+// ARM:#define __UINTMAX_C_SUFFIX__ ULL
+// ARM:#define __UINTMAX_MAX__ 18446744073709551615ULL
// ARM:#define __UINTMAX_TYPE__ long long unsigned int
+// ARM:#define __UINTMAX_WIDTH__ 64
+// ARM:#define __UINTPTR_MAX__ 4294967295U
+// ARM:#define __UINTPTR_TYPE__ long unsigned int
+// ARM:#define __UINTPTR_WIDTH__ 32
+// ARM:#define __UINT_FAST16_MAX__ 65535
+// ARM:#define __UINT_FAST16_TYPE__ unsigned short
+// ARM:#define __UINT_FAST32_MAX__ 4294967295U
+// ARM:#define __UINT_FAST32_TYPE__ unsigned int
+// ARM:#define __UINT_FAST64_MAX__ 18446744073709551615ULL
+// ARM:#define __UINT_FAST64_TYPE__ long long unsigned int
+// ARM:#define __UINT_FAST8_MAX__ 255
+// ARM:#define __UINT_FAST8_TYPE__ unsigned char
+// ARM:#define __UINT_LEAST16_MAX__ 65535
+// ARM:#define __UINT_LEAST16_TYPE__ unsigned short
+// ARM:#define __UINT_LEAST32_MAX__ 4294967295U
+// ARM:#define __UINT_LEAST32_TYPE__ unsigned int
+// ARM:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL
+// ARM:#define __UINT_LEAST64_TYPE__ long long unsigned int
+// ARM:#define __UINT_LEAST8_MAX__ 255
+// ARM:#define __UINT_LEAST8_TYPE__ unsigned char
// ARM:#define __USER_LABEL_PREFIX__ _
// ARM:#define __WCHAR_MAX__ 4294967295U
// ARM:#define __WCHAR_TYPE__ unsigned int
@@ -302,13 +993,205 @@
// ARM:#define __arm 1
// ARM:#define __arm__ 1
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=armeb-none-none < /dev/null | FileCheck -check-prefix ARM-BE %s
+//
+// ARM-BE-NOT:#define _LP64
+// ARM-BE:#define __APCS_32__ 1
+// ARM-BE:#define __ARMEB__ 1
+// ARM-BE-NOT:#define __ARMEL__ 1
+// ARM-BE:#define __ARM_ARCH_6J__ 1
+// ARM-BE:#define __ARM_BIG_ENDIAN 1
+// ARM-BE:#define __BIG_ENDIAN__ 1
+// ARM-BE:#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
+// ARM-BE:#define __CHAR16_TYPE__ unsigned short
+// ARM-BE:#define __CHAR32_TYPE__ unsigned int
+// ARM-BE:#define __CHAR_BIT__ 8
+// ARM-BE:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
+// ARM-BE:#define __DBL_DIG__ 15
+// ARM-BE:#define __DBL_EPSILON__ 2.2204460492503131e-16
+// ARM-BE:#define __DBL_HAS_DENORM__ 1
+// ARM-BE:#define __DBL_HAS_INFINITY__ 1
+// ARM-BE:#define __DBL_HAS_QUIET_NAN__ 1
+// ARM-BE:#define __DBL_MANT_DIG__ 53
+// ARM-BE:#define __DBL_MAX_10_EXP__ 308
+// ARM-BE:#define __DBL_MAX_EXP__ 1024
+// ARM-BE:#define __DBL_MAX__ 1.7976931348623157e+308
+// ARM-BE:#define __DBL_MIN_10_EXP__ (-307)
+// ARM-BE:#define __DBL_MIN_EXP__ (-1021)
+// ARM-BE:#define __DBL_MIN__ 2.2250738585072014e-308
+// ARM-BE:#define __DECIMAL_DIG__ 17
+// ARM-BE:#define __FLT_DENORM_MIN__ 1.40129846e-45F
+// ARM-BE:#define __FLT_DIG__ 6
+// ARM-BE:#define __FLT_EPSILON__ 1.19209290e-7F
+// ARM-BE:#define __FLT_EVAL_METHOD__ 0
+// ARM-BE:#define __FLT_HAS_DENORM__ 1
+// ARM-BE:#define __FLT_HAS_INFINITY__ 1
+// ARM-BE:#define __FLT_HAS_QUIET_NAN__ 1
+// ARM-BE:#define __FLT_MANT_DIG__ 24
+// ARM-BE:#define __FLT_MAX_10_EXP__ 38
+// ARM-BE:#define __FLT_MAX_EXP__ 128
+// ARM-BE:#define __FLT_MAX__ 3.40282347e+38F
+// ARM-BE:#define __FLT_MIN_10_EXP__ (-37)
+// ARM-BE:#define __FLT_MIN_EXP__ (-125)
+// ARM-BE:#define __FLT_MIN__ 1.17549435e-38F
+// ARM-BE:#define __FLT_RADIX__ 2
+// ARM-BE:#define __INT16_C_SUFFIX__ {{$}}
+// ARM-BE:#define __INT16_FMTd__ "hd"
+// ARM-BE:#define __INT16_FMTi__ "hi"
+// ARM-BE:#define __INT16_MAX__ 32767
+// ARM-BE:#define __INT16_TYPE__ short
+// ARM-BE:#define __INT32_C_SUFFIX__ {{$}}
+// ARM-BE:#define __INT32_FMTd__ "d"
+// ARM-BE:#define __INT32_FMTi__ "i"
+// ARM-BE:#define __INT32_MAX__ 2147483647
+// ARM-BE:#define __INT32_TYPE__ int
+// ARM-BE:#define __INT64_C_SUFFIX__ LL
+// ARM-BE:#define __INT64_FMTd__ "lld"
+// ARM-BE:#define __INT64_FMTi__ "lli"
+// ARM-BE:#define __INT64_MAX__ 9223372036854775807LL
+// ARM-BE:#define __INT64_TYPE__ long long int
+// ARM-BE:#define __INT8_C_SUFFIX__ {{$}}
+// ARM-BE:#define __INT8_FMTd__ "hhd"
+// ARM-BE:#define __INT8_FMTi__ "hhi"
+// ARM-BE:#define __INT8_MAX__ 127
+// ARM-BE:#define __INT8_TYPE__ signed char
+// ARM-BE:#define __INTMAX_C_SUFFIX__ LL
+// ARM-BE:#define __INTMAX_FMTd__ "lld"
+// ARM-BE:#define __INTMAX_FMTi__ "lli"
+// ARM-BE:#define __INTMAX_MAX__ 9223372036854775807LL
+// ARM-BE:#define __INTMAX_TYPE__ long long int
+// ARM-BE:#define __INTMAX_WIDTH__ 64
+// ARM-BE:#define __INTPTR_FMTd__ "ld"
+// ARM-BE:#define __INTPTR_FMTi__ "li"
+// ARM-BE:#define __INTPTR_MAX__ 2147483647L
+// ARM-BE:#define __INTPTR_TYPE__ long int
+// ARM-BE:#define __INTPTR_WIDTH__ 32
+// ARM-BE:#define __INT_FAST16_FMTd__ "hd"
+// ARM-BE:#define __INT_FAST16_FMTi__ "hi"
+// ARM-BE:#define __INT_FAST16_MAX__ 32767
+// ARM-BE:#define __INT_FAST16_TYPE__ short
+// ARM-BE:#define __INT_FAST32_FMTd__ "d"
+// ARM-BE:#define __INT_FAST32_FMTi__ "i"
+// ARM-BE:#define __INT_FAST32_MAX__ 2147483647
+// ARM-BE:#define __INT_FAST32_TYPE__ int
+// ARM-BE:#define __INT_FAST64_FMTd__ "lld"
+// ARM-BE:#define __INT_FAST64_FMTi__ "lli"
+// ARM-BE:#define __INT_FAST64_MAX__ 9223372036854775807LL
+// ARM-BE:#define __INT_FAST64_TYPE__ long long int
+// ARM-BE:#define __INT_FAST8_FMTd__ "hhd"
+// ARM-BE:#define __INT_FAST8_FMTi__ "hhi"
+// ARM-BE:#define __INT_FAST8_MAX__ 127
+// ARM-BE:#define __INT_FAST8_TYPE__ signed char
+// ARM-BE:#define __INT_LEAST16_FMTd__ "hd"
+// ARM-BE:#define __INT_LEAST16_FMTi__ "hi"
+// ARM-BE:#define __INT_LEAST16_MAX__ 32767
+// ARM-BE:#define __INT_LEAST16_TYPE__ short
+// ARM-BE:#define __INT_LEAST32_FMTd__ "d"
+// ARM-BE:#define __INT_LEAST32_FMTi__ "i"
+// ARM-BE:#define __INT_LEAST32_MAX__ 2147483647
+// ARM-BE:#define __INT_LEAST32_TYPE__ int
+// ARM-BE:#define __INT_LEAST64_FMTd__ "lld"
+// ARM-BE:#define __INT_LEAST64_FMTi__ "lli"
+// ARM-BE:#define __INT_LEAST64_MAX__ 9223372036854775807LL
+// ARM-BE:#define __INT_LEAST64_TYPE__ long long int
+// ARM-BE:#define __INT_LEAST8_FMTd__ "hhd"
+// ARM-BE:#define __INT_LEAST8_FMTi__ "hhi"
+// ARM-BE:#define __INT_LEAST8_MAX__ 127
+// ARM-BE:#define __INT_LEAST8_TYPE__ signed char
+// ARM-BE:#define __INT_MAX__ 2147483647
+// ARM-BE:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
+// ARM-BE:#define __LDBL_DIG__ 15
+// ARM-BE:#define __LDBL_EPSILON__ 2.2204460492503131e-16L
+// ARM-BE:#define __LDBL_HAS_DENORM__ 1
+// ARM-BE:#define __LDBL_HAS_INFINITY__ 1
+// ARM-BE:#define __LDBL_HAS_QUIET_NAN__ 1
+// ARM-BE:#define __LDBL_MANT_DIG__ 53
+// ARM-BE:#define __LDBL_MAX_10_EXP__ 308
+// ARM-BE:#define __LDBL_MAX_EXP__ 1024
+// ARM-BE:#define __LDBL_MAX__ 1.7976931348623157e+308L
+// ARM-BE:#define __LDBL_MIN_10_EXP__ (-307)
+// ARM-BE:#define __LDBL_MIN_EXP__ (-1021)
+// ARM-BE:#define __LDBL_MIN__ 2.2250738585072014e-308L
+// ARM-BE:#define __LONG_LONG_MAX__ 9223372036854775807LL
+// ARM-BE:#define __LONG_MAX__ 2147483647L
+// ARM-BE-NOT:#define __LP64__
+// ARM-BE:#define __POINTER_WIDTH__ 32
+// ARM-BE:#define __PTRDIFF_TYPE__ int
+// ARM-BE:#define __PTRDIFF_WIDTH__ 32
+// ARM-BE:#define __REGISTER_PREFIX__
+// ARM-BE:#define __SCHAR_MAX__ 127
+// ARM-BE:#define __SHRT_MAX__ 32767
+// ARM-BE:#define __SIG_ATOMIC_MAX__ 2147483647
+// ARM-BE:#define __SIG_ATOMIC_WIDTH__ 32
+// ARM-BE:#define __SIZEOF_DOUBLE__ 8
+// ARM-BE:#define __SIZEOF_FLOAT__ 4
+// ARM-BE:#define __SIZEOF_INT__ 4
+// ARM-BE:#define __SIZEOF_LONG_DOUBLE__ 8
+// ARM-BE:#define __SIZEOF_LONG_LONG__ 8
+// ARM-BE:#define __SIZEOF_LONG__ 4
+// ARM-BE:#define __SIZEOF_POINTER__ 4
+// ARM-BE:#define __SIZEOF_PTRDIFF_T__ 4
+// ARM-BE:#define __SIZEOF_SHORT__ 2
+// ARM-BE:#define __SIZEOF_SIZE_T__ 4
+// ARM-BE:#define __SIZEOF_WCHAR_T__ 4
+// ARM-BE:#define __SIZEOF_WINT_T__ 4
+// ARM-BE:#define __SIZE_MAX__ 4294967295U
+// ARM-BE:#define __SIZE_TYPE__ unsigned int
+// ARM-BE:#define __SIZE_WIDTH__ 32
+// ARM-BE:#define __THUMB_INTERWORK__ 1
+// ARM-BE:#define __UINT16_C_SUFFIX__ {{$}}
+// ARM-BE:#define __UINT16_MAX__ 65535
+// ARM-BE:#define __UINT16_TYPE__ unsigned short
+// ARM-BE:#define __UINT32_C_SUFFIX__ U
+// ARM-BE:#define __UINT32_MAX__ 4294967295U
+// ARM-BE:#define __UINT32_TYPE__ unsigned int
+// ARM-BE:#define __UINT64_C_SUFFIX__ ULL
+// ARM-BE:#define __UINT64_MAX__ 18446744073709551615ULL
+// ARM-BE:#define __UINT64_TYPE__ long long unsigned int
+// ARM-BE:#define __UINT8_C_SUFFIX__ {{$}}
+// ARM-BE:#define __UINT8_MAX__ 255
+// ARM-BE:#define __UINT8_TYPE__ unsigned char
+// ARM-BE:#define __UINTMAX_C_SUFFIX__ ULL
+// ARM-BE:#define __UINTMAX_MAX__ 18446744073709551615ULL
+// ARM-BE:#define __UINTMAX_TYPE__ long long unsigned int
+// ARM-BE:#define __UINTMAX_WIDTH__ 64
+// ARM-BE:#define __UINTPTR_MAX__ 4294967295U
+// ARM-BE:#define __UINTPTR_TYPE__ long unsigned int
+// ARM-BE:#define __UINTPTR_WIDTH__ 32
+// ARM-BE:#define __UINT_FAST16_MAX__ 65535
+// ARM-BE:#define __UINT_FAST16_TYPE__ unsigned short
+// ARM-BE:#define __UINT_FAST32_MAX__ 4294967295U
+// ARM-BE:#define __UINT_FAST32_TYPE__ unsigned int
+// ARM-BE:#define __UINT_FAST64_MAX__ 18446744073709551615ULL
+// ARM-BE:#define __UINT_FAST64_TYPE__ long long unsigned int
+// ARM-BE:#define __UINT_FAST8_MAX__ 255
+// ARM-BE:#define __UINT_FAST8_TYPE__ unsigned char
+// ARM-BE:#define __UINT_LEAST16_MAX__ 65535
+// ARM-BE:#define __UINT_LEAST16_TYPE__ unsigned short
+// ARM-BE:#define __UINT_LEAST32_MAX__ 4294967295U
+// ARM-BE:#define __UINT_LEAST32_TYPE__ unsigned int
+// ARM-BE:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL
+// ARM-BE:#define __UINT_LEAST64_TYPE__ long long unsigned int
+// ARM-BE:#define __UINT_LEAST8_MAX__ 255
+// ARM-BE:#define __UINT_LEAST8_TYPE__ unsigned char
+// ARM-BE:#define __USER_LABEL_PREFIX__ _
+// ARM-BE:#define __WCHAR_MAX__ 4294967295U
+// ARM-BE:#define __WCHAR_TYPE__ unsigned int
+// ARM-BE:#define __WCHAR_WIDTH__ 32
+// ARM-BE:#define __WINT_TYPE__ int
+// ARM-BE:#define __WINT_WIDTH__ 32
+// ARM-BE:#define __arm 1
+// ARM-BE:#define __arm__ 1
+
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=arm-none-linux-gnueabi -target-feature +soft-float -target-feature +soft-float-abi < /dev/null | FileCheck -check-prefix ARMEABISOFTFP %s
//
-// ARM-NOT:#define _LP64
+// ARMEABISOFTFP-NOT:#define _LP64
// ARMEABISOFTFP:#define __APCS_32__ 1
+// ARMEABISOFTFP-NOT:#define __ARMEB__ 1
// ARMEABISOFTFP:#define __ARMEL__ 1
// ARMEABISOFTFP:#define __ARM_ARCH 6
// ARMEABISOFTFP:#define __ARM_ARCH_6J__ 1
+// ARMEABISOFTFP-NOT:#define __ARM_BIG_ENDIAN 1
// ARMEABISOFTFP:#define __ARM_EABI__ 1
// ARMEABISOFTFP:#define __ARM_PCS 1
// ARMEABISOFTFP-NOT:#define __ARM_PCS_VFP 1
@@ -345,16 +1228,69 @@
// ARMEABISOFTFP:#define __FLT_MIN_EXP__ (-125)
// ARMEABISOFTFP:#define __FLT_MIN__ 1.17549435e-38F
// ARMEABISOFTFP:#define __FLT_RADIX__ 2
+// ARMEABISOFTFP:#define __INT16_C_SUFFIX__ {{$}}
+// ARMEABISOFTFP:#define __INT16_FMTd__ "hd"
+// ARMEABISOFTFP:#define __INT16_FMTi__ "hi"
+// ARMEABISOFTFP:#define __INT16_MAX__ 32767
// ARMEABISOFTFP:#define __INT16_TYPE__ short
+// ARMEABISOFTFP:#define __INT32_C_SUFFIX__ {{$}}
+// ARMEABISOFTFP:#define __INT32_FMTd__ "d"
+// ARMEABISOFTFP:#define __INT32_FMTi__ "i"
+// ARMEABISOFTFP:#define __INT32_MAX__ 2147483647
// ARMEABISOFTFP:#define __INT32_TYPE__ int
// ARMEABISOFTFP:#define __INT64_C_SUFFIX__ LL
+// ARMEABISOFTFP:#define __INT64_FMTd__ "lld"
+// ARMEABISOFTFP:#define __INT64_FMTi__ "lli"
+// ARMEABISOFTFP:#define __INT64_MAX__ 9223372036854775807LL
// ARMEABISOFTFP:#define __INT64_TYPE__ long long int
-// ARMEABISOFTFP:#define __INT8_TYPE__ char
+// ARMEABISOFTFP:#define __INT8_C_SUFFIX__ {{$}}
+// ARMEABISOFTFP:#define __INT8_FMTd__ "hhd"
+// ARMEABISOFTFP:#define __INT8_FMTi__ "hhi"
+// ARMEABISOFTFP:#define __INT8_MAX__ 127
+// ARMEABISOFTFP:#define __INT8_TYPE__ signed char
+// ARMEABISOFTFP:#define __INTMAX_C_SUFFIX__ LL
+// ARMEABISOFTFP:#define __INTMAX_FMTd__ "lld"
+// ARMEABISOFTFP:#define __INTMAX_FMTi__ "lli"
// ARMEABISOFTFP:#define __INTMAX_MAX__ 9223372036854775807LL
// ARMEABISOFTFP:#define __INTMAX_TYPE__ long long int
// ARMEABISOFTFP:#define __INTMAX_WIDTH__ 64
+// ARMEABISOFTFP:#define __INTPTR_FMTd__ "ld"
+// ARMEABISOFTFP:#define __INTPTR_FMTi__ "li"
+// ARMEABISOFTFP:#define __INTPTR_MAX__ 2147483647L
// ARMEABISOFTFP:#define __INTPTR_TYPE__ long int
// ARMEABISOFTFP:#define __INTPTR_WIDTH__ 32
+// ARMEABISOFTFP:#define __INT_FAST16_FMTd__ "hd"
+// ARMEABISOFTFP:#define __INT_FAST16_FMTi__ "hi"
+// ARMEABISOFTFP:#define __INT_FAST16_MAX__ 32767
+// ARMEABISOFTFP:#define __INT_FAST16_TYPE__ short
+// ARMEABISOFTFP:#define __INT_FAST32_FMTd__ "d"
+// ARMEABISOFTFP:#define __INT_FAST32_FMTi__ "i"
+// ARMEABISOFTFP:#define __INT_FAST32_MAX__ 2147483647
+// ARMEABISOFTFP:#define __INT_FAST32_TYPE__ int
+// ARMEABISOFTFP:#define __INT_FAST64_FMTd__ "lld"
+// ARMEABISOFTFP:#define __INT_FAST64_FMTi__ "lli"
+// ARMEABISOFTFP:#define __INT_FAST64_MAX__ 9223372036854775807LL
+// ARMEABISOFTFP:#define __INT_FAST64_TYPE__ long long int
+// ARMEABISOFTFP:#define __INT_FAST8_FMTd__ "hhd"
+// ARMEABISOFTFP:#define __INT_FAST8_FMTi__ "hhi"
+// ARMEABISOFTFP:#define __INT_FAST8_MAX__ 127
+// ARMEABISOFTFP:#define __INT_FAST8_TYPE__ signed char
+// ARMEABISOFTFP:#define __INT_LEAST16_FMTd__ "hd"
+// ARMEABISOFTFP:#define __INT_LEAST16_FMTi__ "hi"
+// ARMEABISOFTFP:#define __INT_LEAST16_MAX__ 32767
+// ARMEABISOFTFP:#define __INT_LEAST16_TYPE__ short
+// ARMEABISOFTFP:#define __INT_LEAST32_FMTd__ "d"
+// ARMEABISOFTFP:#define __INT_LEAST32_FMTi__ "i"
+// ARMEABISOFTFP:#define __INT_LEAST32_MAX__ 2147483647
+// ARMEABISOFTFP:#define __INT_LEAST32_TYPE__ int
+// ARMEABISOFTFP:#define __INT_LEAST64_FMTd__ "lld"
+// ARMEABISOFTFP:#define __INT_LEAST64_FMTi__ "lli"
+// ARMEABISOFTFP:#define __INT_LEAST64_MAX__ 9223372036854775807LL
+// ARMEABISOFTFP:#define __INT_LEAST64_TYPE__ long long int
+// ARMEABISOFTFP:#define __INT_LEAST8_FMTd__ "hhd"
+// ARMEABISOFTFP:#define __INT_LEAST8_FMTi__ "hhi"
+// ARMEABISOFTFP:#define __INT_LEAST8_MAX__ 127
+// ARMEABISOFTFP:#define __INT_LEAST8_TYPE__ signed char
// ARMEABISOFTFP:#define __INT_MAX__ 2147483647
// ARMEABISOFTFP:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
// ARMEABISOFTFP:#define __LDBL_DIG__ 15
@@ -379,6 +1315,7 @@
// ARMEABISOFTFP:#define __REGISTER_PREFIX__
// ARMEABISOFTFP:#define __SCHAR_MAX__ 127
// ARMEABISOFTFP:#define __SHRT_MAX__ 32767
+// ARMEABISOFTFP:#define __SIG_ATOMIC_MAX__ 2147483647
// ARMEABISOFTFP:#define __SIG_ATOMIC_WIDTH__ 32
// ARMEABISOFTFP:#define __SIZEOF_DOUBLE__ 8
// ARMEABISOFTFP:#define __SIZEOF_FLOAT__ 4
@@ -397,7 +1334,41 @@
// ARMEABISOFTFP:#define __SIZE_WIDTH__ 32
// ARMEABISOFTFP:#define __SOFTFP__ 1
// ARMEABISOFTFP:#define __THUMB_INTERWORK__ 1
+// ARMEABISOFTFP:#define __UINT16_C_SUFFIX__ {{$}}
+// ARMEABISOFTFP:#define __UINT16_MAX__ 65535
+// ARMEABISOFTFP:#define __UINT16_TYPE__ unsigned short
+// ARMEABISOFTFP:#define __UINT32_C_SUFFIX__ U
+// ARMEABISOFTFP:#define __UINT32_MAX__ 4294967295U
+// ARMEABISOFTFP:#define __UINT32_TYPE__ unsigned int
+// ARMEABISOFTFP:#define __UINT64_C_SUFFIX__ ULL
+// ARMEABISOFTFP:#define __UINT64_MAX__ 18446744073709551615ULL
+// ARMEABISOFTFP:#define __UINT64_TYPE__ long long unsigned int
+// ARMEABISOFTFP:#define __UINT8_C_SUFFIX__ {{$}}
+// ARMEABISOFTFP:#define __UINT8_MAX__ 255
+// ARMEABISOFTFP:#define __UINT8_TYPE__ unsigned char
+// ARMEABISOFTFP:#define __UINTMAX_C_SUFFIX__ ULL
+// ARMEABISOFTFP:#define __UINTMAX_MAX__ 18446744073709551615ULL
// ARMEABISOFTFP:#define __UINTMAX_TYPE__ long long unsigned int
+// ARMEABISOFTFP:#define __UINTMAX_WIDTH__ 64
+// ARMEABISOFTFP:#define __UINTPTR_MAX__ 4294967295U
+// ARMEABISOFTFP:#define __UINTPTR_TYPE__ long unsigned int
+// ARMEABISOFTFP:#define __UINTPTR_WIDTH__ 32
+// ARMEABISOFTFP:#define __UINT_FAST16_MAX__ 65535
+// ARMEABISOFTFP:#define __UINT_FAST16_TYPE__ unsigned short
+// ARMEABISOFTFP:#define __UINT_FAST32_MAX__ 4294967295U
+// ARMEABISOFTFP:#define __UINT_FAST32_TYPE__ unsigned int
+// ARMEABISOFTFP:#define __UINT_FAST64_MAX__ 18446744073709551615ULL
+// ARMEABISOFTFP:#define __UINT_FAST64_TYPE__ long long unsigned int
+// ARMEABISOFTFP:#define __UINT_FAST8_MAX__ 255
+// ARMEABISOFTFP:#define __UINT_FAST8_TYPE__ unsigned char
+// ARMEABISOFTFP:#define __UINT_LEAST16_MAX__ 65535
+// ARMEABISOFTFP:#define __UINT_LEAST16_TYPE__ unsigned short
+// ARMEABISOFTFP:#define __UINT_LEAST32_MAX__ 4294967295U
+// ARMEABISOFTFP:#define __UINT_LEAST32_TYPE__ unsigned int
+// ARMEABISOFTFP:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL
+// ARMEABISOFTFP:#define __UINT_LEAST64_TYPE__ long long unsigned int
+// ARMEABISOFTFP:#define __UINT_LEAST8_MAX__ 255
+// ARMEABISOFTFP:#define __UINT_LEAST8_TYPE__ unsigned char
// ARMEABISOFTFP:#define __USER_LABEL_PREFIX__
// ARMEABISOFTFP:#define __WCHAR_MAX__ 4294967295U
// ARMEABISOFTFP:#define __WCHAR_TYPE__ unsigned int
@@ -409,11 +1380,13 @@
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=arm-none-linux-gnueabi < /dev/null | FileCheck -check-prefix ARMEABIHARDFP %s
//
-// ARM-NOT:#define _LP64
+// ARMEABIHARDFP-NOT:#define _LP64
// ARMEABIHARDFP:#define __APCS_32__ 1
+// ARMEABIHARDFP-NOT:#define __ARMEB__ 1
// ARMEABIHARDFP:#define __ARMEL__ 1
// ARMEABIHARDFP:#define __ARM_ARCH 6
// ARMEABIHARDFP:#define __ARM_ARCH_6J__ 1
+// ARMEABIHARDFP-NOT:#define __ARM_BIG_ENDIAN 1
// ARMEABIHARDFP:#define __ARM_EABI__ 1
// ARMEABIHARDFP:#define __ARM_PCS 1
// ARMEABIHARDFP:#define __ARM_PCS_VFP 1
@@ -450,16 +1423,69 @@
// ARMEABIHARDFP:#define __FLT_MIN_EXP__ (-125)
// ARMEABIHARDFP:#define __FLT_MIN__ 1.17549435e-38F
// ARMEABIHARDFP:#define __FLT_RADIX__ 2
+// ARMEABIHARDFP:#define __INT16_C_SUFFIX__ {{$}}
+// ARMEABIHARDFP:#define __INT16_FMTd__ "hd"
+// ARMEABIHARDFP:#define __INT16_FMTi__ "hi"
+// ARMEABIHARDFP:#define __INT16_MAX__ 32767
// ARMEABIHARDFP:#define __INT16_TYPE__ short
+// ARMEABIHARDFP:#define __INT32_C_SUFFIX__ {{$}}
+// ARMEABIHARDFP:#define __INT32_FMTd__ "d"
+// ARMEABIHARDFP:#define __INT32_FMTi__ "i"
+// ARMEABIHARDFP:#define __INT32_MAX__ 2147483647
// ARMEABIHARDFP:#define __INT32_TYPE__ int
// ARMEABIHARDFP:#define __INT64_C_SUFFIX__ LL
+// ARMEABIHARDFP:#define __INT64_FMTd__ "lld"
+// ARMEABIHARDFP:#define __INT64_FMTi__ "lli"
+// ARMEABIHARDFP:#define __INT64_MAX__ 9223372036854775807LL
// ARMEABIHARDFP:#define __INT64_TYPE__ long long int
-// ARMEABIHARDFP:#define __INT8_TYPE__ char
+// ARMEABIHARDFP:#define __INT8_C_SUFFIX__ {{$}}
+// ARMEABIHARDFP:#define __INT8_FMTd__ "hhd"
+// ARMEABIHARDFP:#define __INT8_FMTi__ "hhi"
+// ARMEABIHARDFP:#define __INT8_MAX__ 127
+// ARMEABIHARDFP:#define __INT8_TYPE__ signed char
+// ARMEABIHARDFP:#define __INTMAX_C_SUFFIX__ LL
+// ARMEABIHARDFP:#define __INTMAX_FMTd__ "lld"
+// ARMEABIHARDFP:#define __INTMAX_FMTi__ "lli"
// ARMEABIHARDFP:#define __INTMAX_MAX__ 9223372036854775807LL
// ARMEABIHARDFP:#define __INTMAX_TYPE__ long long int
// ARMEABIHARDFP:#define __INTMAX_WIDTH__ 64
+// ARMEABIHARDFP:#define __INTPTR_FMTd__ "ld"
+// ARMEABIHARDFP:#define __INTPTR_FMTi__ "li"
+// ARMEABIHARDFP:#define __INTPTR_MAX__ 2147483647L
// ARMEABIHARDFP:#define __INTPTR_TYPE__ long int
// ARMEABIHARDFP:#define __INTPTR_WIDTH__ 32
+// ARMEABIHARDFP:#define __INT_FAST16_FMTd__ "hd"
+// ARMEABIHARDFP:#define __INT_FAST16_FMTi__ "hi"
+// ARMEABIHARDFP:#define __INT_FAST16_MAX__ 32767
+// ARMEABIHARDFP:#define __INT_FAST16_TYPE__ short
+// ARMEABIHARDFP:#define __INT_FAST32_FMTd__ "d"
+// ARMEABIHARDFP:#define __INT_FAST32_FMTi__ "i"
+// ARMEABIHARDFP:#define __INT_FAST32_MAX__ 2147483647
+// ARMEABIHARDFP:#define __INT_FAST32_TYPE__ int
+// ARMEABIHARDFP:#define __INT_FAST64_FMTd__ "lld"
+// ARMEABIHARDFP:#define __INT_FAST64_FMTi__ "lli"
+// ARMEABIHARDFP:#define __INT_FAST64_MAX__ 9223372036854775807LL
+// ARMEABIHARDFP:#define __INT_FAST64_TYPE__ long long int
+// ARMEABIHARDFP:#define __INT_FAST8_FMTd__ "hhd"
+// ARMEABIHARDFP:#define __INT_FAST8_FMTi__ "hhi"
+// ARMEABIHARDFP:#define __INT_FAST8_MAX__ 127
+// ARMEABIHARDFP:#define __INT_FAST8_TYPE__ signed char
+// ARMEABIHARDFP:#define __INT_LEAST16_FMTd__ "hd"
+// ARMEABIHARDFP:#define __INT_LEAST16_FMTi__ "hi"
+// ARMEABIHARDFP:#define __INT_LEAST16_MAX__ 32767
+// ARMEABIHARDFP:#define __INT_LEAST16_TYPE__ short
+// ARMEABIHARDFP:#define __INT_LEAST32_FMTd__ "d"
+// ARMEABIHARDFP:#define __INT_LEAST32_FMTi__ "i"
+// ARMEABIHARDFP:#define __INT_LEAST32_MAX__ 2147483647
+// ARMEABIHARDFP:#define __INT_LEAST32_TYPE__ int
+// ARMEABIHARDFP:#define __INT_LEAST64_FMTd__ "lld"
+// ARMEABIHARDFP:#define __INT_LEAST64_FMTi__ "lli"
+// ARMEABIHARDFP:#define __INT_LEAST64_MAX__ 9223372036854775807LL
+// ARMEABIHARDFP:#define __INT_LEAST64_TYPE__ long long int
+// ARMEABIHARDFP:#define __INT_LEAST8_FMTd__ "hhd"
+// ARMEABIHARDFP:#define __INT_LEAST8_FMTi__ "hhi"
+// ARMEABIHARDFP:#define __INT_LEAST8_MAX__ 127
+// ARMEABIHARDFP:#define __INT_LEAST8_TYPE__ signed char
// ARMEABIHARDFP:#define __INT_MAX__ 2147483647
// ARMEABIHARDFP:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
// ARMEABIHARDFP:#define __LDBL_DIG__ 15
@@ -484,6 +1510,7 @@
// ARMEABIHARDFP:#define __REGISTER_PREFIX__
// ARMEABIHARDFP:#define __SCHAR_MAX__ 127
// ARMEABIHARDFP:#define __SHRT_MAX__ 32767
+// ARMEABIHARDFP:#define __SIG_ATOMIC_MAX__ 2147483647
// ARMEABIHARDFP:#define __SIG_ATOMIC_WIDTH__ 32
// ARMEABIHARDFP:#define __SIZEOF_DOUBLE__ 8
// ARMEABIHARDFP:#define __SIZEOF_FLOAT__ 4
@@ -502,7 +1529,41 @@
// ARMEABIHARDFP:#define __SIZE_WIDTH__ 32
// ARMEABIHARDFP-NOT:#define __SOFTFP__ 1
// ARMEABIHARDFP:#define __THUMB_INTERWORK__ 1
+// ARMEABIHARDFP:#define __UINT16_C_SUFFIX__ {{$}}
+// ARMEABIHARDFP:#define __UINT16_MAX__ 65535
+// ARMEABIHARDFP:#define __UINT16_TYPE__ unsigned short
+// ARMEABIHARDFP:#define __UINT32_C_SUFFIX__ U
+// ARMEABIHARDFP:#define __UINT32_MAX__ 4294967295U
+// ARMEABIHARDFP:#define __UINT32_TYPE__ unsigned int
+// ARMEABIHARDFP:#define __UINT64_C_SUFFIX__ ULL
+// ARMEABIHARDFP:#define __UINT64_MAX__ 18446744073709551615ULL
+// ARMEABIHARDFP:#define __UINT64_TYPE__ long long unsigned int
+// ARMEABIHARDFP:#define __UINT8_C_SUFFIX__ {{$}}
+// ARMEABIHARDFP:#define __UINT8_MAX__ 255
+// ARMEABIHARDFP:#define __UINT8_TYPE__ unsigned char
+// ARMEABIHARDFP:#define __UINTMAX_C_SUFFIX__ ULL
+// ARMEABIHARDFP:#define __UINTMAX_MAX__ 18446744073709551615ULL
// ARMEABIHARDFP:#define __UINTMAX_TYPE__ long long unsigned int
+// ARMEABIHARDFP:#define __UINTMAX_WIDTH__ 64
+// ARMEABIHARDFP:#define __UINTPTR_MAX__ 4294967295U
+// ARMEABIHARDFP:#define __UINTPTR_TYPE__ long unsigned int
+// ARMEABIHARDFP:#define __UINTPTR_WIDTH__ 32
+// ARMEABIHARDFP:#define __UINT_FAST16_MAX__ 65535
+// ARMEABIHARDFP:#define __UINT_FAST16_TYPE__ unsigned short
+// ARMEABIHARDFP:#define __UINT_FAST32_MAX__ 4294967295U
+// ARMEABIHARDFP:#define __UINT_FAST32_TYPE__ unsigned int
+// ARMEABIHARDFP:#define __UINT_FAST64_MAX__ 18446744073709551615ULL
+// ARMEABIHARDFP:#define __UINT_FAST64_TYPE__ long long unsigned int
+// ARMEABIHARDFP:#define __UINT_FAST8_MAX__ 255
+// ARMEABIHARDFP:#define __UINT_FAST8_TYPE__ unsigned char
+// ARMEABIHARDFP:#define __UINT_LEAST16_MAX__ 65535
+// ARMEABIHARDFP:#define __UINT_LEAST16_TYPE__ unsigned short
+// ARMEABIHARDFP:#define __UINT_LEAST32_MAX__ 4294967295U
+// ARMEABIHARDFP:#define __UINT_LEAST32_TYPE__ unsigned int
+// ARMEABIHARDFP:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL
+// ARMEABIHARDFP:#define __UINT_LEAST64_TYPE__ long long unsigned int
+// ARMEABIHARDFP:#define __UINT_LEAST8_MAX__ 255
+// ARMEABIHARDFP:#define __UINT_LEAST8_TYPE__ unsigned char
// ARMEABIHARDFP:#define __USER_LABEL_PREFIX__
// ARMEABIHARDFP:#define __WCHAR_MAX__ 4294967295U
// ARMEABIHARDFP:#define __WCHAR_TYPE__ unsigned int
@@ -512,6 +1573,198 @@
// ARMEABIHARDFP:#define __arm 1
// ARMEABIHARDFP:#define __arm__ 1
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=arm-netbsd-eabi < /dev/null | FileCheck -check-prefix ARM-NETBSD %s
+//
+// ARM-NETBSD-NOT:#define _LP64
+// ARM-NETBSD:#define __APCS_32__ 1
+// ARM-NETBSD-NOT:#define __ARMEB__ 1
+// ARM-NETBSD:#define __ARMEL__ 1
+// ARM-NETBSD:#define __ARM_ARCH_6J__ 1
+// ARM-NETBSD:#define __ARM_DWARF_EH__ 1
+// ARM-NETBSD:#define __ARM_EABI__ 1
+// ARM-NETBSD-NOT:#define __ARM_BIG_ENDIAN 1
+// ARM-NETBSD:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
+// ARM-NETBSD:#define __CHAR16_TYPE__ unsigned short
+// ARM-NETBSD:#define __CHAR32_TYPE__ unsigned int
+// ARM-NETBSD:#define __CHAR_BIT__ 8
+// ARM-NETBSD:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
+// ARM-NETBSD:#define __DBL_DIG__ 15
+// ARM-NETBSD:#define __DBL_EPSILON__ 2.2204460492503131e-16
+// ARM-NETBSD:#define __DBL_HAS_DENORM__ 1
+// ARM-NETBSD:#define __DBL_HAS_INFINITY__ 1
+// ARM-NETBSD:#define __DBL_HAS_QUIET_NAN__ 1
+// ARM-NETBSD:#define __DBL_MANT_DIG__ 53
+// ARM-NETBSD:#define __DBL_MAX_10_EXP__ 308
+// ARM-NETBSD:#define __DBL_MAX_EXP__ 1024
+// ARM-NETBSD:#define __DBL_MAX__ 1.7976931348623157e+308
+// ARM-NETBSD:#define __DBL_MIN_10_EXP__ (-307)
+// ARM-NETBSD:#define __DBL_MIN_EXP__ (-1021)
+// ARM-NETBSD:#define __DBL_MIN__ 2.2250738585072014e-308
+// ARM-NETBSD:#define __DECIMAL_DIG__ 17
+// ARM-NETBSD:#define __FLT_DENORM_MIN__ 1.40129846e-45F
+// ARM-NETBSD:#define __FLT_DIG__ 6
+// ARM-NETBSD:#define __FLT_EPSILON__ 1.19209290e-7F
+// ARM-NETBSD:#define __FLT_EVAL_METHOD__ 0
+// ARM-NETBSD:#define __FLT_HAS_DENORM__ 1
+// ARM-NETBSD:#define __FLT_HAS_INFINITY__ 1
+// ARM-NETBSD:#define __FLT_HAS_QUIET_NAN__ 1
+// ARM-NETBSD:#define __FLT_MANT_DIG__ 24
+// ARM-NETBSD:#define __FLT_MAX_10_EXP__ 38
+// ARM-NETBSD:#define __FLT_MAX_EXP__ 128
+// ARM-NETBSD:#define __FLT_MAX__ 3.40282347e+38F
+// ARM-NETBSD:#define __FLT_MIN_10_EXP__ (-37)
+// ARM-NETBSD:#define __FLT_MIN_EXP__ (-125)
+// ARM-NETBSD:#define __FLT_MIN__ 1.17549435e-38F
+// ARM-NETBSD:#define __FLT_RADIX__ 2
+// ARM-NETBSD:#define __INT16_C_SUFFIX__ {{$}}
+// ARM-NETBSD:#define __INT16_FMTd__ "hd"
+// ARM-NETBSD:#define __INT16_FMTi__ "hi"
+// ARM-NETBSD:#define __INT16_MAX__ 32767
+// ARM-NETBSD:#define __INT16_TYPE__ short
+// ARM-NETBSD:#define __INT32_C_SUFFIX__ {{$}}
+// ARM-NETBSD:#define __INT32_FMTd__ "d"
+// ARM-NETBSD:#define __INT32_FMTi__ "i"
+// ARM-NETBSD:#define __INT32_MAX__ 2147483647
+// ARM-NETBSD:#define __INT32_TYPE__ int
+// ARM-NETBSD:#define __INT64_C_SUFFIX__ LL
+// ARM-NETBSD:#define __INT64_FMTd__ "lld"
+// ARM-NETBSD:#define __INT64_FMTi__ "lli"
+// ARM-NETBSD:#define __INT64_MAX__ 9223372036854775807LL
+// ARM-NETBSD:#define __INT64_TYPE__ long long int
+// ARM-NETBSD:#define __INT8_C_SUFFIX__ {{$}}
+// ARM-NETBSD:#define __INT8_FMTd__ "hhd"
+// ARM-NETBSD:#define __INT8_FMTi__ "hhi"
+// ARM-NETBSD:#define __INT8_MAX__ 127
+// ARM-NETBSD:#define __INT8_TYPE__ signed char
+// ARM-NETBSD:#define __INTMAX_C_SUFFIX__ LL
+// ARM-NETBSD:#define __INTMAX_FMTd__ "lld"
+// ARM-NETBSD:#define __INTMAX_FMTi__ "lli"
+// ARM-NETBSD:#define __INTMAX_MAX__ 9223372036854775807LL
+// ARM-NETBSD:#define __INTMAX_TYPE__ long long int
+// ARM-NETBSD:#define __INTMAX_WIDTH__ 64
+// ARM-NETBSD:#define __INTPTR_FMTd__ "ld"
+// ARM-NETBSD:#define __INTPTR_FMTi__ "li"
+// ARM-NETBSD:#define __INTPTR_MAX__ 2147483647L
+// ARM-NETBSD:#define __INTPTR_TYPE__ long int
+// ARM-NETBSD:#define __INTPTR_WIDTH__ 32
+// ARM-NETBSD:#define __INT_FAST16_FMTd__ "hd"
+// ARM-NETBSD:#define __INT_FAST16_FMTi__ "hi"
+// ARM-NETBSD:#define __INT_FAST16_MAX__ 32767
+// ARM-NETBSD:#define __INT_FAST16_TYPE__ short
+// ARM-NETBSD:#define __INT_FAST32_FMTd__ "d"
+// ARM-NETBSD:#define __INT_FAST32_FMTi__ "i"
+// ARM-NETBSD:#define __INT_FAST32_MAX__ 2147483647
+// ARM-NETBSD:#define __INT_FAST32_TYPE__ int
+// ARM-NETBSD:#define __INT_FAST64_FMTd__ "lld"
+// ARM-NETBSD:#define __INT_FAST64_FMTi__ "lli"
+// ARM-NETBSD:#define __INT_FAST64_MAX__ 9223372036854775807LL
+// ARM-NETBSD:#define __INT_FAST64_TYPE__ long long int
+// ARM-NETBSD:#define __INT_FAST8_FMTd__ "hhd"
+// ARM-NETBSD:#define __INT_FAST8_FMTi__ "hhi"
+// ARM-NETBSD:#define __INT_FAST8_MAX__ 127
+// ARM-NETBSD:#define __INT_FAST8_TYPE__ signed char
+// ARM-NETBSD:#define __INT_LEAST16_FMTd__ "hd"
+// ARM-NETBSD:#define __INT_LEAST16_FMTi__ "hi"
+// ARM-NETBSD:#define __INT_LEAST16_MAX__ 32767
+// ARM-NETBSD:#define __INT_LEAST16_TYPE__ short
+// ARM-NETBSD:#define __INT_LEAST32_FMTd__ "d"
+// ARM-NETBSD:#define __INT_LEAST32_FMTi__ "i"
+// ARM-NETBSD:#define __INT_LEAST32_MAX__ 2147483647
+// ARM-NETBSD:#define __INT_LEAST32_TYPE__ int
+// ARM-NETBSD:#define __INT_LEAST64_FMTd__ "lld"
+// ARM-NETBSD:#define __INT_LEAST64_FMTi__ "lli"
+// ARM-NETBSD:#define __INT_LEAST64_MAX__ 9223372036854775807LL
+// ARM-NETBSD:#define __INT_LEAST64_TYPE__ long long int
+// ARM-NETBSD:#define __INT_LEAST8_FMTd__ "hhd"
+// ARM-NETBSD:#define __INT_LEAST8_FMTi__ "hhi"
+// ARM-NETBSD:#define __INT_LEAST8_MAX__ 127
+// ARM-NETBSD:#define __INT_LEAST8_TYPE__ signed char
+// ARM-NETBSD:#define __INT_MAX__ 2147483647
+// ARM-NETBSD:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
+// ARM-NETBSD:#define __LDBL_DIG__ 15
+// ARM-NETBSD:#define __LDBL_EPSILON__ 2.2204460492503131e-16L
+// ARM-NETBSD:#define __LDBL_HAS_DENORM__ 1
+// ARM-NETBSD:#define __LDBL_HAS_INFINITY__ 1
+// ARM-NETBSD:#define __LDBL_HAS_QUIET_NAN__ 1
+// ARM-NETBSD:#define __LDBL_MANT_DIG__ 53
+// ARM-NETBSD:#define __LDBL_MAX_10_EXP__ 308
+// ARM-NETBSD:#define __LDBL_MAX_EXP__ 1024
+// ARM-NETBSD:#define __LDBL_MAX__ 1.7976931348623157e+308L
+// ARM-NETBSD:#define __LDBL_MIN_10_EXP__ (-307)
+// ARM-NETBSD:#define __LDBL_MIN_EXP__ (-1021)
+// ARM-NETBSD:#define __LDBL_MIN__ 2.2250738585072014e-308L
+// ARM-NETBSD:#define __LITTLE_ENDIAN__ 1
+// ARM-NETBSD:#define __LONG_LONG_MAX__ 9223372036854775807LL
+// ARM-NETBSD:#define __LONG_MAX__ 2147483647L
+// ARM-NETBSD-NOT:#define __LP64__
+// ARM-NETBSD:#define __POINTER_WIDTH__ 32
+// ARM-NETBSD:#define __PTRDIFF_TYPE__ long int
+// ARM-NETBSD:#define __PTRDIFF_WIDTH__ 32
+// ARM-NETBSD:#define __REGISTER_PREFIX__
+// ARM-NETBSD:#define __SCHAR_MAX__ 127
+// ARM-NETBSD:#define __SHRT_MAX__ 32767
+// ARM-NETBSD:#define __SIG_ATOMIC_MAX__ 2147483647
+// ARM-NETBSD:#define __SIG_ATOMIC_WIDTH__ 32
+// ARM-NETBSD:#define __SIZEOF_DOUBLE__ 8
+// ARM-NETBSD:#define __SIZEOF_FLOAT__ 4
+// ARM-NETBSD:#define __SIZEOF_INT__ 4
+// ARM-NETBSD:#define __SIZEOF_LONG_DOUBLE__ 8
+// ARM-NETBSD:#define __SIZEOF_LONG_LONG__ 8
+// ARM-NETBSD:#define __SIZEOF_LONG__ 4
+// ARM-NETBSD:#define __SIZEOF_POINTER__ 4
+// ARM-NETBSD:#define __SIZEOF_PTRDIFF_T__ 4
+// ARM-NETBSD:#define __SIZEOF_SHORT__ 2
+// ARM-NETBSD:#define __SIZEOF_SIZE_T__ 4
+// ARM-NETBSD:#define __SIZEOF_WCHAR_T__ 4
+// ARM-NETBSD:#define __SIZEOF_WINT_T__ 4
+// ARM-NETBSD:#define __SIZE_MAX__ 4294967295U
+// ARM-NETBSD:#define __SIZE_TYPE__ long unsigned int
+// ARM-NETBSD:#define __SIZE_WIDTH__ 32
+// ARM-NETBSD:#define __THUMB_INTERWORK__ 1
+// ARM-NETBSD:#define __UINT16_C_SUFFIX__ {{$}}
+// ARM-NETBSD:#define __UINT16_MAX__ 65535
+// ARM-NETBSD:#define __UINT16_TYPE__ unsigned short
+// ARM-NETBSD:#define __UINT32_C_SUFFIX__ U
+// ARM-NETBSD:#define __UINT32_MAX__ 4294967295U
+// ARM-NETBSD:#define __UINT32_TYPE__ unsigned int
+// ARM-NETBSD:#define __UINT64_C_SUFFIX__ ULL
+// ARM-NETBSD:#define __UINT64_MAX__ 18446744073709551615ULL
+// ARM-NETBSD:#define __UINT64_TYPE__ long long unsigned int
+// ARM-NETBSD:#define __UINT8_C_SUFFIX__ {{$}}
+// ARM-NETBSD:#define __UINT8_MAX__ 255
+// ARM-NETBSD:#define __UINT8_TYPE__ unsigned char
+// ARM-NETBSD:#define __UINTMAX_C_SUFFIX__ UL
+// ARM-NETBSD:#define __UINTMAX_MAX__ 18446744073709551615ULL
+// ARM-NETBSD:#define __UINTMAX_TYPE__ long long unsigned int
+// ARM-NETBSD:#define __UINTMAX_WIDTH__ 64
+// ARM-NETBSD:#define __UINTPTR_MAX__ 4294967295U
+// ARM-NETBSD:#define __UINTPTR_TYPE__ long unsigned int
+// ARM-NETBSD:#define __UINTPTR_WIDTH__ 32
+// ARM-NETBSD:#define __UINT_FAST16_MAX__ 65535
+// ARM-NETBSD:#define __UINT_FAST16_TYPE__ unsigned short
+// ARM-NETBSD:#define __UINT_FAST32_MAX__ 4294967295U
+// ARM-NETBSD:#define __UINT_FAST32_TYPE__ unsigned int
+// ARM-NETBSD:#define __UINT_FAST64_MAX__ 18446744073709551615ULL
+// ARM-NETBSD:#define __UINT_FAST64_TYPE__ long long unsigned int
+// ARM-NETBSD:#define __UINT_FAST8_MAX__ 255
+// ARM-NETBSD:#define __UINT_FAST8_TYPE__ unsigned char
+// ARM-NETBSD:#define __UINT_LEAST16_MAX__ 65535
+// ARM-NETBSD:#define __UINT_LEAST16_TYPE__ unsigned short
+// ARM-NETBSD:#define __UINT_LEAST32_MAX__ 4294967295U
+// ARM-NETBSD:#define __UINT_LEAST32_TYPE__ unsigned int
+// ARM-NETBSD:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL
+// ARM-NETBSD:#define __UINT_LEAST64_TYPE__ long long unsigned int
+// ARM-NETBSD:#define __UINT_LEAST8_MAX__ 255
+// ARM-NETBSD:#define __UINT_LEAST8_TYPE__ unsigned char
+// ARM-NETBSD:#define __USER_LABEL_PREFIX__
+// ARM-NETBSD:#define __WCHAR_MAX__ 2147483647
+// ARM-NETBSD:#define __WCHAR_TYPE__ int
+// ARM-NETBSD:#define __WCHAR_WIDTH__ 32
+// ARM-NETBSD:#define __WINT_TYPE__ int
+// ARM-NETBSD:#define __WINT_WIDTH__ 32
+// ARM-NETBSD:#define __arm 1
+// ARM-NETBSD:#define __arm__ 1
+
// RUN: %clang -target arm -arch armv7s -x c -E -dM %s -o - | FileCheck --check-prefix=ARM-DARWIN-NO-EABI %s
// RUN: %clang -target arm -arch armv6m -x c -E -dM %s -o - | FileCheck --check-prefix=ARM-DARWIN-NO-EABI %s
// RUN: %clang -target arm -arch armv7m -x c -E -dM %s -o - | FileCheck --check-prefix=ARM-DARWIN-NO-EABI %s
@@ -539,6 +1792,38 @@
// RUN: %clang -target arm -mthumb -mhwdiv=arm -x c -E -dM %s -o - | FileCheck --check-prefix=ARMHWDIV-THUMB-FALSE %s
// ARMHWDIV-THUMB-FALSE-NOT:#define __ARM_ARCH_EXT_IDIV__
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=armv8-none-none < /dev/null | FileCheck -check-prefix ARMv8 %s
+// ARMv8: #define __THUMB_INTERWORK__ 1
+// ARMv8-NOT: #define __thumb2__
+
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=armebv8-none-none < /dev/null | FileCheck -check-prefix ARMebv8 %s
+// ARMebv8: #define __THUMB_INTERWORK__ 1
+// ARMebv8-NOT: #define __thumb2__
+
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=thumbv8 < /dev/null | FileCheck -check-prefix Thumbv8 %s
+// Thumbv8: #define __THUMB_INTERWORK__ 1
+// Thumbv8: #define __thumb2__
+
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=thumbebv8 < /dev/null | FileCheck -check-prefix Thumbebv8 %s
+// Thumbebv8: #define __THUMB_INTERWORK__ 1
+// Thumbebv8: #define __thumb2__
+
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=thumbv5 < /dev/null | FileCheck -check-prefix Thumbv5 %s
+// Thumbv5: #define __THUMB_INTERWORK__ 1
+// Thumbv5-NOT: #define __thumb2__
+
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=thumbv6t2 < /dev/null | FileCheck -check-prefix Thumbv6t2 %s
+// Thumbv6t2: #define __THUMB_INTERWORK__ 1
+// Thumbv6t2: #define __thumb2__
+
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=thumbv7 < /dev/null | FileCheck -check-prefix Thumbv7 %s
+// Thumbv7: #define __THUMB_INTERWORK__ 1
+// Thumbv7: #define __thumb2__
+
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=thumbebv7 < /dev/null | FileCheck -check-prefix Thumbebv7 %s
+// Thumbebv7: #define __THUMB_INTERWORK__ 1
+// Thumbebv7: #define __thumb2__
+
//
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=i386-none-none < /dev/null | FileCheck -check-prefix I386 %s
//
@@ -576,16 +1861,69 @@
// I386:#define __FLT_MIN_EXP__ (-125)
// I386:#define __FLT_MIN__ 1.17549435e-38F
// I386:#define __FLT_RADIX__ 2
+// I386:#define __INT16_C_SUFFIX__ {{$}}
+// I386:#define __INT16_FMTd__ "hd"
+// I386:#define __INT16_FMTi__ "hi"
+// I386:#define __INT16_MAX__ 32767
// I386:#define __INT16_TYPE__ short
+// I386:#define __INT32_C_SUFFIX__ {{$}}
+// I386:#define __INT32_FMTd__ "d"
+// I386:#define __INT32_FMTi__ "i"
+// I386:#define __INT32_MAX__ 2147483647
// I386:#define __INT32_TYPE__ int
// I386:#define __INT64_C_SUFFIX__ LL
+// I386:#define __INT64_FMTd__ "lld"
+// I386:#define __INT64_FMTi__ "lli"
+// I386:#define __INT64_MAX__ 9223372036854775807LL
// I386:#define __INT64_TYPE__ long long int
-// I386:#define __INT8_TYPE__ char
+// I386:#define __INT8_C_SUFFIX__ {{$}}
+// I386:#define __INT8_FMTd__ "hhd"
+// I386:#define __INT8_FMTi__ "hhi"
+// I386:#define __INT8_MAX__ 127
+// I386:#define __INT8_TYPE__ signed char
+// I386:#define __INTMAX_C_SUFFIX__ LL
+// I386:#define __INTMAX_FMTd__ "lld"
+// I386:#define __INTMAX_FMTi__ "lli"
// I386:#define __INTMAX_MAX__ 9223372036854775807LL
// I386:#define __INTMAX_TYPE__ long long int
// I386:#define __INTMAX_WIDTH__ 64
+// I386:#define __INTPTR_FMTd__ "d"
+// I386:#define __INTPTR_FMTi__ "i"
+// I386:#define __INTPTR_MAX__ 2147483647
// I386:#define __INTPTR_TYPE__ int
// I386:#define __INTPTR_WIDTH__ 32
+// I386:#define __INT_FAST16_FMTd__ "hd"
+// I386:#define __INT_FAST16_FMTi__ "hi"
+// I386:#define __INT_FAST16_MAX__ 32767
+// I386:#define __INT_FAST16_TYPE__ short
+// I386:#define __INT_FAST32_FMTd__ "d"
+// I386:#define __INT_FAST32_FMTi__ "i"
+// I386:#define __INT_FAST32_MAX__ 2147483647
+// I386:#define __INT_FAST32_TYPE__ int
+// I386:#define __INT_FAST64_FMTd__ "lld"
+// I386:#define __INT_FAST64_FMTi__ "lli"
+// I386:#define __INT_FAST64_MAX__ 9223372036854775807LL
+// I386:#define __INT_FAST64_TYPE__ long long int
+// I386:#define __INT_FAST8_FMTd__ "hhd"
+// I386:#define __INT_FAST8_FMTi__ "hhi"
+// I386:#define __INT_FAST8_MAX__ 127
+// I386:#define __INT_FAST8_TYPE__ signed char
+// I386:#define __INT_LEAST16_FMTd__ "hd"
+// I386:#define __INT_LEAST16_FMTi__ "hi"
+// I386:#define __INT_LEAST16_MAX__ 32767
+// I386:#define __INT_LEAST16_TYPE__ short
+// I386:#define __INT_LEAST32_FMTd__ "d"
+// I386:#define __INT_LEAST32_FMTi__ "i"
+// I386:#define __INT_LEAST32_MAX__ 2147483647
+// I386:#define __INT_LEAST32_TYPE__ int
+// I386:#define __INT_LEAST64_FMTd__ "lld"
+// I386:#define __INT_LEAST64_FMTi__ "lli"
+// I386:#define __INT_LEAST64_MAX__ 9223372036854775807LL
+// I386:#define __INT_LEAST64_TYPE__ long long int
+// I386:#define __INT_LEAST8_FMTd__ "hhd"
+// I386:#define __INT_LEAST8_FMTi__ "hhi"
+// I386:#define __INT_LEAST8_MAX__ 127
+// I386:#define __INT_LEAST8_TYPE__ signed char
// I386:#define __INT_MAX__ 2147483647
// I386:#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
// I386:#define __LDBL_DIG__ 18
@@ -611,6 +1949,7 @@
// I386:#define __REGISTER_PREFIX__
// I386:#define __SCHAR_MAX__ 127
// I386:#define __SHRT_MAX__ 32767
+// I386:#define __SIG_ATOMIC_MAX__ 2147483647
// I386:#define __SIG_ATOMIC_WIDTH__ 32
// I386:#define __SIZEOF_DOUBLE__ 8
// I386:#define __SIZEOF_FLOAT__ 4
@@ -627,7 +1966,41 @@
// I386:#define __SIZE_MAX__ 4294967295U
// I386:#define __SIZE_TYPE__ unsigned int
// I386:#define __SIZE_WIDTH__ 32
+// I386:#define __UINT16_C_SUFFIX__ {{$}}
+// I386:#define __UINT16_MAX__ 65535
+// I386:#define __UINT16_TYPE__ unsigned short
+// I386:#define __UINT32_C_SUFFIX__ U
+// I386:#define __UINT32_MAX__ 4294967295U
+// I386:#define __UINT32_TYPE__ unsigned int
+// I386:#define __UINT64_C_SUFFIX__ ULL
+// I386:#define __UINT64_MAX__ 18446744073709551615ULL
+// I386:#define __UINT64_TYPE__ long long unsigned int
+// I386:#define __UINT8_C_SUFFIX__ {{$}}
+// I386:#define __UINT8_MAX__ 255
+// I386:#define __UINT8_TYPE__ unsigned char
+// I386:#define __UINTMAX_C_SUFFIX__ ULL
+// I386:#define __UINTMAX_MAX__ 18446744073709551615ULL
// I386:#define __UINTMAX_TYPE__ long long unsigned int
+// I386:#define __UINTMAX_WIDTH__ 64
+// I386:#define __UINTPTR_MAX__ 4294967295U
+// I386:#define __UINTPTR_TYPE__ unsigned int
+// I386:#define __UINTPTR_WIDTH__ 32
+// I386:#define __UINT_FAST16_MAX__ 65535
+// I386:#define __UINT_FAST16_TYPE__ unsigned short
+// I386:#define __UINT_FAST32_MAX__ 4294967295U
+// I386:#define __UINT_FAST32_TYPE__ unsigned int
+// I386:#define __UINT_FAST64_MAX__ 18446744073709551615ULL
+// I386:#define __UINT_FAST64_TYPE__ long long unsigned int
+// I386:#define __UINT_FAST8_MAX__ 255
+// I386:#define __UINT_FAST8_TYPE__ unsigned char
+// I386:#define __UINT_LEAST16_MAX__ 65535
+// I386:#define __UINT_LEAST16_TYPE__ unsigned short
+// I386:#define __UINT_LEAST32_MAX__ 4294967295U
+// I386:#define __UINT_LEAST32_TYPE__ unsigned int
+// I386:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL
+// I386:#define __UINT_LEAST64_TYPE__ long long unsigned int
+// I386:#define __UINT_LEAST8_MAX__ 255
+// I386:#define __UINT_LEAST8_TYPE__ unsigned char
// I386:#define __USER_LABEL_PREFIX__ _
// I386:#define __WCHAR_MAX__ 2147483647
// I386:#define __WCHAR_TYPE__ int
@@ -674,16 +2047,69 @@
// I386-LINUX:#define __FLT_MIN_EXP__ (-125)
// I386-LINUX:#define __FLT_MIN__ 1.17549435e-38F
// I386-LINUX:#define __FLT_RADIX__ 2
+// I386-LINUX:#define __INT16_C_SUFFIX__ {{$}}
+// I386-LINUX:#define __INT16_FMTd__ "hd"
+// I386-LINUX:#define __INT16_FMTi__ "hi"
+// I386-LINUX:#define __INT16_MAX__ 32767
// I386-LINUX:#define __INT16_TYPE__ short
+// I386-LINUX:#define __INT32_C_SUFFIX__ {{$}}
+// I386-LINUX:#define __INT32_FMTd__ "d"
+// I386-LINUX:#define __INT32_FMTi__ "i"
+// I386-LINUX:#define __INT32_MAX__ 2147483647
// I386-LINUX:#define __INT32_TYPE__ int
// I386-LINUX:#define __INT64_C_SUFFIX__ LL
+// I386-LINUX:#define __INT64_FMTd__ "lld"
+// I386-LINUX:#define __INT64_FMTi__ "lli"
+// I386-LINUX:#define __INT64_MAX__ 9223372036854775807LL
// I386-LINUX:#define __INT64_TYPE__ long long int
-// I386-LINUX:#define __INT8_TYPE__ char
+// I386-LINUX:#define __INT8_C_SUFFIX__ {{$}}
+// I386-LINUX:#define __INT8_FMTd__ "hhd"
+// I386-LINUX:#define __INT8_FMTi__ "hhi"
+// I386-LINUX:#define __INT8_MAX__ 127
+// I386-LINUX:#define __INT8_TYPE__ signed char
+// I386-LINUX:#define __INTMAX_C_SUFFIX__ LL
+// I386-LINUX:#define __INTMAX_FMTd__ "lld"
+// I386-LINUX:#define __INTMAX_FMTi__ "lli"
// I386-LINUX:#define __INTMAX_MAX__ 9223372036854775807LL
// I386-LINUX:#define __INTMAX_TYPE__ long long int
// I386-LINUX:#define __INTMAX_WIDTH__ 64
+// I386-LINUX:#define __INTPTR_FMTd__ "d"
+// I386-LINUX:#define __INTPTR_FMTi__ "i"
+// I386-LINUX:#define __INTPTR_MAX__ 2147483647
// I386-LINUX:#define __INTPTR_TYPE__ int
// I386-LINUX:#define __INTPTR_WIDTH__ 32
+// I386-LINUX:#define __INT_FAST16_FMTd__ "hd"
+// I386-LINUX:#define __INT_FAST16_FMTi__ "hi"
+// I386-LINUX:#define __INT_FAST16_MAX__ 32767
+// I386-LINUX:#define __INT_FAST16_TYPE__ short
+// I386-LINUX:#define __INT_FAST32_FMTd__ "d"
+// I386-LINUX:#define __INT_FAST32_FMTi__ "i"
+// I386-LINUX:#define __INT_FAST32_MAX__ 2147483647
+// I386-LINUX:#define __INT_FAST32_TYPE__ int
+// I386-LINUX:#define __INT_FAST64_FMTd__ "lld"
+// I386-LINUX:#define __INT_FAST64_FMTi__ "lli"
+// I386-LINUX:#define __INT_FAST64_MAX__ 9223372036854775807LL
+// I386-LINUX:#define __INT_FAST64_TYPE__ long long int
+// I386-LINUX:#define __INT_FAST8_FMTd__ "hhd"
+// I386-LINUX:#define __INT_FAST8_FMTi__ "hhi"
+// I386-LINUX:#define __INT_FAST8_MAX__ 127
+// I386-LINUX:#define __INT_FAST8_TYPE__ signed char
+// I386-LINUX:#define __INT_LEAST16_FMTd__ "hd"
+// I386-LINUX:#define __INT_LEAST16_FMTi__ "hi"
+// I386-LINUX:#define __INT_LEAST16_MAX__ 32767
+// I386-LINUX:#define __INT_LEAST16_TYPE__ short
+// I386-LINUX:#define __INT_LEAST32_FMTd__ "d"
+// I386-LINUX:#define __INT_LEAST32_FMTi__ "i"
+// I386-LINUX:#define __INT_LEAST32_MAX__ 2147483647
+// I386-LINUX:#define __INT_LEAST32_TYPE__ int
+// I386-LINUX:#define __INT_LEAST64_FMTd__ "lld"
+// I386-LINUX:#define __INT_LEAST64_FMTi__ "lli"
+// I386-LINUX:#define __INT_LEAST64_MAX__ 9223372036854775807LL
+// I386-LINUX:#define __INT_LEAST64_TYPE__ long long int
+// I386-LINUX:#define __INT_LEAST8_FMTd__ "hhd"
+// I386-LINUX:#define __INT_LEAST8_FMTi__ "hhi"
+// I386-LINUX:#define __INT_LEAST8_MAX__ 127
+// I386-LINUX:#define __INT_LEAST8_TYPE__ signed char
// I386-LINUX:#define __INT_MAX__ 2147483647
// I386-LINUX:#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
// I386-LINUX:#define __LDBL_DIG__ 18
@@ -709,6 +2135,7 @@
// I386-LINUX:#define __REGISTER_PREFIX__
// I386-LINUX:#define __SCHAR_MAX__ 127
// I386-LINUX:#define __SHRT_MAX__ 32767
+// I386-LINUX:#define __SIG_ATOMIC_MAX__ 2147483647
// I386-LINUX:#define __SIG_ATOMIC_WIDTH__ 32
// I386-LINUX:#define __SIZEOF_DOUBLE__ 8
// I386-LINUX:#define __SIZEOF_FLOAT__ 4
@@ -725,7 +2152,41 @@
// I386-LINUX:#define __SIZE_MAX__ 4294967295U
// I386-LINUX:#define __SIZE_TYPE__ unsigned int
// I386-LINUX:#define __SIZE_WIDTH__ 32
+// I386-LINUX:#define __UINT16_C_SUFFIX__ {{$}}
+// I386-LINUX:#define __UINT16_MAX__ 65535
+// I386-LINUX:#define __UINT16_TYPE__ unsigned short
+// I386-LINUX:#define __UINT32_C_SUFFIX__ U
+// I386-LINUX:#define __UINT32_MAX__ 4294967295U
+// I386-LINUX:#define __UINT32_TYPE__ unsigned int
+// I386-LINUX:#define __UINT64_C_SUFFIX__ ULL
+// I386-LINUX:#define __UINT64_MAX__ 18446744073709551615ULL
+// I386-LINUX:#define __UINT64_TYPE__ long long unsigned int
+// I386-LINUX:#define __UINT8_C_SUFFIX__ {{$}}
+// I386-LINUX:#define __UINT8_MAX__ 255
+// I386-LINUX:#define __UINT8_TYPE__ unsigned char
+// I386-LINUX:#define __UINTMAX_C_SUFFIX__ ULL
+// I386-LINUX:#define __UINTMAX_MAX__ 18446744073709551615ULL
// I386-LINUX:#define __UINTMAX_TYPE__ long long unsigned int
+// I386-LINUX:#define __UINTMAX_WIDTH__ 64
+// I386-LINUX:#define __UINTPTR_MAX__ 4294967295U
+// I386-LINUX:#define __UINTPTR_TYPE__ unsigned int
+// I386-LINUX:#define __UINTPTR_WIDTH__ 32
+// I386-LINUX:#define __UINT_FAST16_MAX__ 65535
+// I386-LINUX:#define __UINT_FAST16_TYPE__ unsigned short
+// I386-LINUX:#define __UINT_FAST32_MAX__ 4294967295U
+// I386-LINUX:#define __UINT_FAST32_TYPE__ unsigned int
+// I386-LINUX:#define __UINT_FAST64_MAX__ 18446744073709551615ULL
+// I386-LINUX:#define __UINT_FAST64_TYPE__ long long unsigned int
+// I386-LINUX:#define __UINT_FAST8_MAX__ 255
+// I386-LINUX:#define __UINT_FAST8_TYPE__ unsigned char
+// I386-LINUX:#define __UINT_LEAST16_MAX__ 65535
+// I386-LINUX:#define __UINT_LEAST16_TYPE__ unsigned short
+// I386-LINUX:#define __UINT_LEAST32_MAX__ 4294967295U
+// I386-LINUX:#define __UINT_LEAST32_TYPE__ unsigned int
+// I386-LINUX:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL
+// I386-LINUX:#define __UINT_LEAST64_TYPE__ long long unsigned int
+// I386-LINUX:#define __UINT_LEAST8_MAX__ 255
+// I386-LINUX:#define __UINT_LEAST8_TYPE__ unsigned char
// I386-LINUX:#define __USER_LABEL_PREFIX__
// I386-LINUX:#define __WCHAR_MAX__ 2147483647
// I386-LINUX:#define __WCHAR_TYPE__ int
@@ -772,16 +2233,69 @@
// I386-NETBSD:#define __FLT_MIN_EXP__ (-125)
// I386-NETBSD:#define __FLT_MIN__ 1.17549435e-38F
// I386-NETBSD:#define __FLT_RADIX__ 2
+// I386-NETBSD:#define __INT16_C_SUFFIX__ {{$}}
+// I386-NETBSD:#define __INT16_FMTd__ "hd"
+// I386-NETBSD:#define __INT16_FMTi__ "hi"
+// I386-NETBSD:#define __INT16_MAX__ 32767
// I386-NETBSD:#define __INT16_TYPE__ short
+// I386-NETBSD:#define __INT32_C_SUFFIX__ {{$}}
+// I386-NETBSD:#define __INT32_FMTd__ "d"
+// I386-NETBSD:#define __INT32_FMTi__ "i"
+// I386-NETBSD:#define __INT32_MAX__ 2147483647
// I386-NETBSD:#define __INT32_TYPE__ int
// I386-NETBSD:#define __INT64_C_SUFFIX__ LL
+// I386-NETBSD:#define __INT64_FMTd__ "lld"
+// I386-NETBSD:#define __INT64_FMTi__ "lli"
+// I386-NETBSD:#define __INT64_MAX__ 9223372036854775807LL
// I386-NETBSD:#define __INT64_TYPE__ long long int
-// I386-NETBSD:#define __INT8_TYPE__ char
+// I386-NETBSD:#define __INT8_C_SUFFIX__ {{$}}
+// I386-NETBSD:#define __INT8_FMTd__ "hhd"
+// I386-NETBSD:#define __INT8_FMTi__ "hhi"
+// I386-NETBSD:#define __INT8_MAX__ 127
+// I386-NETBSD:#define __INT8_TYPE__ signed char
+// I386-NETBSD:#define __INTMAX_C_SUFFIX__ LL
+// I386-NETBSD:#define __INTMAX_FMTd__ "lld"
+// I386-NETBSD:#define __INTMAX_FMTi__ "lli"
// I386-NETBSD:#define __INTMAX_MAX__ 9223372036854775807LL
// I386-NETBSD:#define __INTMAX_TYPE__ long long int
// I386-NETBSD:#define __INTMAX_WIDTH__ 64
+// I386-NETBSD:#define __INTPTR_FMTd__ "d"
+// I386-NETBSD:#define __INTPTR_FMTi__ "i"
+// I386-NETBSD:#define __INTPTR_MAX__ 2147483647
// I386-NETBSD:#define __INTPTR_TYPE__ int
// I386-NETBSD:#define __INTPTR_WIDTH__ 32
+// I386-NETBSD:#define __INT_FAST16_FMTd__ "hd"
+// I386-NETBSD:#define __INT_FAST16_FMTi__ "hi"
+// I386-NETBSD:#define __INT_FAST16_MAX__ 32767
+// I386-NETBSD:#define __INT_FAST16_TYPE__ short
+// I386-NETBSD:#define __INT_FAST32_FMTd__ "d"
+// I386-NETBSD:#define __INT_FAST32_FMTi__ "i"
+// I386-NETBSD:#define __INT_FAST32_MAX__ 2147483647
+// I386-NETBSD:#define __INT_FAST32_TYPE__ int
+// I386-NETBSD:#define __INT_FAST64_FMTd__ "lld"
+// I386-NETBSD:#define __INT_FAST64_FMTi__ "lli"
+// I386-NETBSD:#define __INT_FAST64_MAX__ 9223372036854775807LL
+// I386-NETBSD:#define __INT_FAST64_TYPE__ long long int
+// I386-NETBSD:#define __INT_FAST8_FMTd__ "hhd"
+// I386-NETBSD:#define __INT_FAST8_FMTi__ "hhi"
+// I386-NETBSD:#define __INT_FAST8_MAX__ 127
+// I386-NETBSD:#define __INT_FAST8_TYPE__ signed char
+// I386-NETBSD:#define __INT_LEAST16_FMTd__ "hd"
+// I386-NETBSD:#define __INT_LEAST16_FMTi__ "hi"
+// I386-NETBSD:#define __INT_LEAST16_MAX__ 32767
+// I386-NETBSD:#define __INT_LEAST16_TYPE__ short
+// I386-NETBSD:#define __INT_LEAST32_FMTd__ "d"
+// I386-NETBSD:#define __INT_LEAST32_FMTi__ "i"
+// I386-NETBSD:#define __INT_LEAST32_MAX__ 2147483647
+// I386-NETBSD:#define __INT_LEAST32_TYPE__ int
+// I386-NETBSD:#define __INT_LEAST64_FMTd__ "lld"
+// I386-NETBSD:#define __INT_LEAST64_FMTi__ "lli"
+// I386-NETBSD:#define __INT_LEAST64_MAX__ 9223372036854775807LL
+// I386-NETBSD:#define __INT_LEAST64_TYPE__ long long int
+// I386-NETBSD:#define __INT_LEAST8_FMTd__ "hhd"
+// I386-NETBSD:#define __INT_LEAST8_FMTi__ "hhi"
+// I386-NETBSD:#define __INT_LEAST8_MAX__ 127
+// I386-NETBSD:#define __INT_LEAST8_TYPE__ signed char
// I386-NETBSD:#define __INT_MAX__ 2147483647
// I386-NETBSD:#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
// I386-NETBSD:#define __LDBL_DIG__ 18
@@ -807,6 +2321,7 @@
// I386-NETBSD:#define __REGISTER_PREFIX__
// I386-NETBSD:#define __SCHAR_MAX__ 127
// I386-NETBSD:#define __SHRT_MAX__ 32767
+// I386-NETBSD:#define __SIG_ATOMIC_MAX__ 2147483647
// I386-NETBSD:#define __SIG_ATOMIC_WIDTH__ 32
// I386-NETBSD:#define __SIZEOF_DOUBLE__ 8
// I386-NETBSD:#define __SIZEOF_FLOAT__ 4
@@ -823,7 +2338,41 @@
// I386-NETBSD:#define __SIZE_MAX__ 4294967295U
// I386-NETBSD:#define __SIZE_TYPE__ unsigned int
// I386-NETBSD:#define __SIZE_WIDTH__ 32
+// I386-NETBSD:#define __UINT16_C_SUFFIX__ {{$}}
+// I386-NETBSD:#define __UINT16_MAX__ 65535
+// I386-NETBSD:#define __UINT16_TYPE__ unsigned short
+// I386-NETBSD:#define __UINT32_C_SUFFIX__ U
+// I386-NETBSD:#define __UINT32_MAX__ 4294967295U
+// I386-NETBSD:#define __UINT32_TYPE__ unsigned int
+// I386-NETBSD:#define __UINT64_C_SUFFIX__ ULL
+// I386-NETBSD:#define __UINT64_MAX__ 18446744073709551615ULL
+// I386-NETBSD:#define __UINT64_TYPE__ long long unsigned int
+// I386-NETBSD:#define __UINT8_C_SUFFIX__ {{$}}
+// I386-NETBSD:#define __UINT8_MAX__ 255
+// I386-NETBSD:#define __UINT8_TYPE__ unsigned char
+// I386-NETBSD:#define __UINTMAX_C_SUFFIX__ ULL
+// I386-NETBSD:#define __UINTMAX_MAX__ 18446744073709551615ULL
// I386-NETBSD:#define __UINTMAX_TYPE__ long long unsigned int
+// I386-NETBSD:#define __UINTMAX_WIDTH__ 64
+// I386-NETBSD:#define __UINTPTR_MAX__ 4294967295U
+// I386-NETBSD:#define __UINTPTR_TYPE__ unsigned int
+// I386-NETBSD:#define __UINTPTR_WIDTH__ 32
+// I386-NETBSD:#define __UINT_FAST16_MAX__ 65535
+// I386-NETBSD:#define __UINT_FAST16_TYPE__ unsigned short
+// I386-NETBSD:#define __UINT_FAST32_MAX__ 4294967295U
+// I386-NETBSD:#define __UINT_FAST32_TYPE__ unsigned int
+// I386-NETBSD:#define __UINT_FAST64_MAX__ 18446744073709551615ULL
+// I386-NETBSD:#define __UINT_FAST64_TYPE__ long long unsigned int
+// I386-NETBSD:#define __UINT_FAST8_MAX__ 255
+// I386-NETBSD:#define __UINT_FAST8_TYPE__ unsigned char
+// I386-NETBSD:#define __UINT_LEAST16_MAX__ 65535
+// I386-NETBSD:#define __UINT_LEAST16_TYPE__ unsigned short
+// I386-NETBSD:#define __UINT_LEAST32_MAX__ 4294967295U
+// I386-NETBSD:#define __UINT_LEAST32_TYPE__ unsigned int
+// I386-NETBSD:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL
+// I386-NETBSD:#define __UINT_LEAST64_TYPE__ long long unsigned int
+// I386-NETBSD:#define __UINT_LEAST8_MAX__ 255
+// I386-NETBSD:#define __UINT_LEAST8_TYPE__ unsigned char
// I386-NETBSD:#define __USER_LABEL_PREFIX__
// I386-NETBSD:#define __WCHAR_MAX__ 2147483647
// I386-NETBSD:#define __WCHAR_TYPE__ int
@@ -848,13 +2397,14 @@
// MIPS32BE:#define _ABIO32 1
// MIPS32BE-NOT:#define _LP64
// MIPS32BE:#define _MIPSEB 1
-// MIPS32BE:#define _MIPS_ARCH "mips32"
-// MIPS32BE:#define _MIPS_ARCH_MIPS32 1
+// MIPS32BE:#define _MIPS_ARCH "mips32r2"
+// MIPS32BE:#define _MIPS_ARCH_MIPS32R2 1
// MIPS32BE:#define _MIPS_FPSET 16
// MIPS32BE:#define _MIPS_SIM _ABIO32
// MIPS32BE:#define _MIPS_SZINT 32
// MIPS32BE:#define _MIPS_SZLONG 32
// MIPS32BE:#define _MIPS_SZPTR 32
+// MIPS32BE:#define __BIG_ENDIAN__ 1
// MIPS32BE:#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
// MIPS32BE:#define __CHAR16_TYPE__ unsigned short
// MIPS32BE:#define __CHAR32_TYPE__ unsigned int
@@ -889,16 +2439,69 @@
// MIPS32BE:#define __FLT_MIN_EXP__ (-125)
// MIPS32BE:#define __FLT_MIN__ 1.17549435e-38F
// MIPS32BE:#define __FLT_RADIX__ 2
+// MIPS32BE:#define __INT16_C_SUFFIX__ {{$}}
+// MIPS32BE:#define __INT16_FMTd__ "hd"
+// MIPS32BE:#define __INT16_FMTi__ "hi"
+// MIPS32BE:#define __INT16_MAX__ 32767
// MIPS32BE:#define __INT16_TYPE__ short
+// MIPS32BE:#define __INT32_C_SUFFIX__ {{$}}
+// MIPS32BE:#define __INT32_FMTd__ "d"
+// MIPS32BE:#define __INT32_FMTi__ "i"
+// MIPS32BE:#define __INT32_MAX__ 2147483647
// MIPS32BE:#define __INT32_TYPE__ int
// MIPS32BE:#define __INT64_C_SUFFIX__ LL
+// MIPS32BE:#define __INT64_FMTd__ "lld"
+// MIPS32BE:#define __INT64_FMTi__ "lli"
+// MIPS32BE:#define __INT64_MAX__ 9223372036854775807LL
// MIPS32BE:#define __INT64_TYPE__ long long int
-// MIPS32BE:#define __INT8_TYPE__ char
+// MIPS32BE:#define __INT8_C_SUFFIX__ {{$}}
+// MIPS32BE:#define __INT8_FMTd__ "hhd"
+// MIPS32BE:#define __INT8_FMTi__ "hhi"
+// MIPS32BE:#define __INT8_MAX__ 127
+// MIPS32BE:#define __INT8_TYPE__ signed char
+// MIPS32BE:#define __INTMAX_C_SUFFIX__ LL
+// MIPS32BE:#define __INTMAX_FMTd__ "lld"
+// MIPS32BE:#define __INTMAX_FMTi__ "lli"
// MIPS32BE:#define __INTMAX_MAX__ 9223372036854775807LL
// MIPS32BE:#define __INTMAX_TYPE__ long long int
// MIPS32BE:#define __INTMAX_WIDTH__ 64
+// MIPS32BE:#define __INTPTR_FMTd__ "ld"
+// MIPS32BE:#define __INTPTR_FMTi__ "li"
+// MIPS32BE:#define __INTPTR_MAX__ 2147483647L
// MIPS32BE:#define __INTPTR_TYPE__ long int
// MIPS32BE:#define __INTPTR_WIDTH__ 32
+// MIPS32BE:#define __INT_FAST16_FMTd__ "hd"
+// MIPS32BE:#define __INT_FAST16_FMTi__ "hi"
+// MIPS32BE:#define __INT_FAST16_MAX__ 32767
+// MIPS32BE:#define __INT_FAST16_TYPE__ short
+// MIPS32BE:#define __INT_FAST32_FMTd__ "d"
+// MIPS32BE:#define __INT_FAST32_FMTi__ "i"
+// MIPS32BE:#define __INT_FAST32_MAX__ 2147483647
+// MIPS32BE:#define __INT_FAST32_TYPE__ int
+// MIPS32BE:#define __INT_FAST64_FMTd__ "lld"
+// MIPS32BE:#define __INT_FAST64_FMTi__ "lli"
+// MIPS32BE:#define __INT_FAST64_MAX__ 9223372036854775807LL
+// MIPS32BE:#define __INT_FAST64_TYPE__ long long int
+// MIPS32BE:#define __INT_FAST8_FMTd__ "hhd"
+// MIPS32BE:#define __INT_FAST8_FMTi__ "hhi"
+// MIPS32BE:#define __INT_FAST8_MAX__ 127
+// MIPS32BE:#define __INT_FAST8_TYPE__ signed char
+// MIPS32BE:#define __INT_LEAST16_FMTd__ "hd"
+// MIPS32BE:#define __INT_LEAST16_FMTi__ "hi"
+// MIPS32BE:#define __INT_LEAST16_MAX__ 32767
+// MIPS32BE:#define __INT_LEAST16_TYPE__ short
+// MIPS32BE:#define __INT_LEAST32_FMTd__ "d"
+// MIPS32BE:#define __INT_LEAST32_FMTi__ "i"
+// MIPS32BE:#define __INT_LEAST32_MAX__ 2147483647
+// MIPS32BE:#define __INT_LEAST32_TYPE__ int
+// MIPS32BE:#define __INT_LEAST64_FMTd__ "lld"
+// MIPS32BE:#define __INT_LEAST64_FMTi__ "lli"
+// MIPS32BE:#define __INT_LEAST64_MAX__ 9223372036854775807LL
+// MIPS32BE:#define __INT_LEAST64_TYPE__ long long int
+// MIPS32BE:#define __INT_LEAST8_FMTd__ "hhd"
+// MIPS32BE:#define __INT_LEAST8_FMTi__ "hhi"
+// MIPS32BE:#define __INT_LEAST8_MAX__ 127
+// MIPS32BE:#define __INT_LEAST8_TYPE__ signed char
// MIPS32BE:#define __INT_MAX__ 2147483647
// MIPS32BE:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
// MIPS32BE:#define __LDBL_DIG__ 15
@@ -925,6 +2528,7 @@
// MIPS32BE:#define __REGISTER_PREFIX__
// MIPS32BE:#define __SCHAR_MAX__ 127
// MIPS32BE:#define __SHRT_MAX__ 32767
+// MIPS32BE:#define __SIG_ATOMIC_MAX__ 2147483647
// MIPS32BE:#define __SIG_ATOMIC_WIDTH__ 32
// MIPS32BE:#define __SIZEOF_DOUBLE__ 8
// MIPS32BE:#define __SIZEOF_FLOAT__ 4
@@ -944,7 +2548,41 @@
// MIPS32BE:#define __STDC_HOSTED__ 0
// MIPS32BE:#define __STDC_VERSION__ 199901L
// MIPS32BE:#define __STDC__ 1
+// MIPS32BE:#define __UINT16_C_SUFFIX__ {{$}}
+// MIPS32BE:#define __UINT16_MAX__ 65535
+// MIPS32BE:#define __UINT16_TYPE__ unsigned short
+// MIPS32BE:#define __UINT32_C_SUFFIX__ U
+// MIPS32BE:#define __UINT32_MAX__ 4294967295U
+// MIPS32BE:#define __UINT32_TYPE__ unsigned int
+// MIPS32BE:#define __UINT64_C_SUFFIX__ ULL
+// MIPS32BE:#define __UINT64_MAX__ 18446744073709551615ULL
+// MIPS32BE:#define __UINT64_TYPE__ long long unsigned int
+// MIPS32BE:#define __UINT8_C_SUFFIX__ {{$}}
+// MIPS32BE:#define __UINT8_MAX__ 255
+// MIPS32BE:#define __UINT8_TYPE__ unsigned char
+// MIPS32BE:#define __UINTMAX_C_SUFFIX__ ULL
+// MIPS32BE:#define __UINTMAX_MAX__ 18446744073709551615ULL
// MIPS32BE:#define __UINTMAX_TYPE__ long long unsigned int
+// MIPS32BE:#define __UINTMAX_WIDTH__ 64
+// MIPS32BE:#define __UINTPTR_MAX__ 4294967295U
+// MIPS32BE:#define __UINTPTR_TYPE__ long unsigned int
+// MIPS32BE:#define __UINTPTR_WIDTH__ 32
+// MIPS32BE:#define __UINT_FAST16_MAX__ 65535
+// MIPS32BE:#define __UINT_FAST16_TYPE__ unsigned short
+// MIPS32BE:#define __UINT_FAST32_MAX__ 4294967295U
+// MIPS32BE:#define __UINT_FAST32_TYPE__ unsigned int
+// MIPS32BE:#define __UINT_FAST64_MAX__ 18446744073709551615ULL
+// MIPS32BE:#define __UINT_FAST64_TYPE__ long long unsigned int
+// MIPS32BE:#define __UINT_FAST8_MAX__ 255
+// MIPS32BE:#define __UINT_FAST8_TYPE__ unsigned char
+// MIPS32BE:#define __UINT_LEAST16_MAX__ 65535
+// MIPS32BE:#define __UINT_LEAST16_TYPE__ unsigned short
+// MIPS32BE:#define __UINT_LEAST32_MAX__ 4294967295U
+// MIPS32BE:#define __UINT_LEAST32_TYPE__ unsigned int
+// MIPS32BE:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL
+// MIPS32BE:#define __UINT_LEAST64_TYPE__ long long unsigned int
+// MIPS32BE:#define __UINT_LEAST8_MAX__ 255
+// MIPS32BE:#define __UINT_LEAST8_TYPE__ unsigned char
// MIPS32BE:#define __USER_LABEL_PREFIX__ _
// MIPS32BE:#define __WCHAR_MAX__ 2147483647
// MIPS32BE:#define __WCHAR_TYPE__ int
@@ -953,7 +2591,7 @@
// MIPS32BE:#define __WINT_WIDTH__ 32
// MIPS32BE:#define __clang__ 1
// MIPS32BE:#define __llvm__ 1
-// MIPS32BE:#define __mips 1
+// MIPS32BE:#define __mips 32
// MIPS32BE:#define __mips__ 1
// MIPS32BE:#define __mips_fpr 32
// MIPS32BE:#define __mips_hard_float 1
@@ -967,8 +2605,8 @@
// MIPS32EL:#define _ABIO32 1
// MIPS32EL-NOT:#define _LP64
// MIPS32EL:#define _MIPSEL 1
-// MIPS32EL:#define _MIPS_ARCH "mips32"
-// MIPS32EL:#define _MIPS_ARCH_MIPS32 1
+// MIPS32EL:#define _MIPS_ARCH "mips32r2"
+// MIPS32EL:#define _MIPS_ARCH_MIPS32R2 1
// MIPS32EL:#define _MIPS_FPSET 16
// MIPS32EL:#define _MIPS_SIM _ABIO32
// MIPS32EL:#define _MIPS_SZINT 32
@@ -1008,16 +2646,69 @@
// MIPS32EL:#define __FLT_MIN_EXP__ (-125)
// MIPS32EL:#define __FLT_MIN__ 1.17549435e-38F
// MIPS32EL:#define __FLT_RADIX__ 2
+// MIPS32EL:#define __INT16_C_SUFFIX__ {{$}}
+// MIPS32EL:#define __INT16_FMTd__ "hd"
+// MIPS32EL:#define __INT16_FMTi__ "hi"
+// MIPS32EL:#define __INT16_MAX__ 32767
// MIPS32EL:#define __INT16_TYPE__ short
+// MIPS32EL:#define __INT32_C_SUFFIX__ {{$}}
+// MIPS32EL:#define __INT32_FMTd__ "d"
+// MIPS32EL:#define __INT32_FMTi__ "i"
+// MIPS32EL:#define __INT32_MAX__ 2147483647
// MIPS32EL:#define __INT32_TYPE__ int
// MIPS32EL:#define __INT64_C_SUFFIX__ LL
+// MIPS32EL:#define __INT64_FMTd__ "lld"
+// MIPS32EL:#define __INT64_FMTi__ "lli"
+// MIPS32EL:#define __INT64_MAX__ 9223372036854775807LL
// MIPS32EL:#define __INT64_TYPE__ long long int
-// MIPS32EL:#define __INT8_TYPE__ char
+// MIPS32EL:#define __INT8_C_SUFFIX__ {{$}}
+// MIPS32EL:#define __INT8_FMTd__ "hhd"
+// MIPS32EL:#define __INT8_FMTi__ "hhi"
+// MIPS32EL:#define __INT8_MAX__ 127
+// MIPS32EL:#define __INT8_TYPE__ signed char
+// MIPS32EL:#define __INTMAX_C_SUFFIX__ LL
+// MIPS32EL:#define __INTMAX_FMTd__ "lld"
+// MIPS32EL:#define __INTMAX_FMTi__ "lli"
// MIPS32EL:#define __INTMAX_MAX__ 9223372036854775807LL
// MIPS32EL:#define __INTMAX_TYPE__ long long int
// MIPS32EL:#define __INTMAX_WIDTH__ 64
+// MIPS32EL:#define __INTPTR_FMTd__ "ld"
+// MIPS32EL:#define __INTPTR_FMTi__ "li"
+// MIPS32EL:#define __INTPTR_MAX__ 2147483647L
// MIPS32EL:#define __INTPTR_TYPE__ long int
// MIPS32EL:#define __INTPTR_WIDTH__ 32
+// MIPS32EL:#define __INT_FAST16_FMTd__ "hd"
+// MIPS32EL:#define __INT_FAST16_FMTi__ "hi"
+// MIPS32EL:#define __INT_FAST16_MAX__ 32767
+// MIPS32EL:#define __INT_FAST16_TYPE__ short
+// MIPS32EL:#define __INT_FAST32_FMTd__ "d"
+// MIPS32EL:#define __INT_FAST32_FMTi__ "i"
+// MIPS32EL:#define __INT_FAST32_MAX__ 2147483647
+// MIPS32EL:#define __INT_FAST32_TYPE__ int
+// MIPS32EL:#define __INT_FAST64_FMTd__ "lld"
+// MIPS32EL:#define __INT_FAST64_FMTi__ "lli"
+// MIPS32EL:#define __INT_FAST64_MAX__ 9223372036854775807LL
+// MIPS32EL:#define __INT_FAST64_TYPE__ long long int
+// MIPS32EL:#define __INT_FAST8_FMTd__ "hhd"
+// MIPS32EL:#define __INT_FAST8_FMTi__ "hhi"
+// MIPS32EL:#define __INT_FAST8_MAX__ 127
+// MIPS32EL:#define __INT_FAST8_TYPE__ signed char
+// MIPS32EL:#define __INT_LEAST16_FMTd__ "hd"
+// MIPS32EL:#define __INT_LEAST16_FMTi__ "hi"
+// MIPS32EL:#define __INT_LEAST16_MAX__ 32767
+// MIPS32EL:#define __INT_LEAST16_TYPE__ short
+// MIPS32EL:#define __INT_LEAST32_FMTd__ "d"
+// MIPS32EL:#define __INT_LEAST32_FMTi__ "i"
+// MIPS32EL:#define __INT_LEAST32_MAX__ 2147483647
+// MIPS32EL:#define __INT_LEAST32_TYPE__ int
+// MIPS32EL:#define __INT_LEAST64_FMTd__ "lld"
+// MIPS32EL:#define __INT_LEAST64_FMTi__ "lli"
+// MIPS32EL:#define __INT_LEAST64_MAX__ 9223372036854775807LL
+// MIPS32EL:#define __INT_LEAST64_TYPE__ long long int
+// MIPS32EL:#define __INT_LEAST8_FMTd__ "hhd"
+// MIPS32EL:#define __INT_LEAST8_FMTi__ "hhi"
+// MIPS32EL:#define __INT_LEAST8_MAX__ 127
+// MIPS32EL:#define __INT_LEAST8_TYPE__ signed char
// MIPS32EL:#define __INT_MAX__ 2147483647
// MIPS32EL:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
// MIPS32EL:#define __LDBL_DIG__ 15
@@ -1032,6 +2723,7 @@
// MIPS32EL:#define __LDBL_MIN_10_EXP__ (-307)
// MIPS32EL:#define __LDBL_MIN_EXP__ (-1021)
// MIPS32EL:#define __LDBL_MIN__ 2.2250738585072014e-308L
+// MIPS32EL:#define __LITTLE_ENDIAN__ 1
// MIPS32EL:#define __LONG_LONG_MAX__ 9223372036854775807LL
// MIPS32EL:#define __LONG_MAX__ 2147483647L
// MIPS32EL-NOT:#define __LP64__
@@ -1044,6 +2736,7 @@
// MIPS32EL:#define __REGISTER_PREFIX__
// MIPS32EL:#define __SCHAR_MAX__ 127
// MIPS32EL:#define __SHRT_MAX__ 32767
+// MIPS32EL:#define __SIG_ATOMIC_MAX__ 2147483647
// MIPS32EL:#define __SIG_ATOMIC_WIDTH__ 32
// MIPS32EL:#define __SIZEOF_DOUBLE__ 8
// MIPS32EL:#define __SIZEOF_FLOAT__ 4
@@ -1060,7 +2753,41 @@
// MIPS32EL:#define __SIZE_MAX__ 4294967295U
// MIPS32EL:#define __SIZE_TYPE__ unsigned int
// MIPS32EL:#define __SIZE_WIDTH__ 32
+// MIPS32EL:#define __UINT16_C_SUFFIX__ {{$}}
+// MIPS32EL:#define __UINT16_MAX__ 65535
+// MIPS32EL:#define __UINT16_TYPE__ unsigned short
+// MIPS32EL:#define __UINT32_C_SUFFIX__ U
+// MIPS32EL:#define __UINT32_MAX__ 4294967295U
+// MIPS32EL:#define __UINT32_TYPE__ unsigned int
+// MIPS32EL:#define __UINT64_C_SUFFIX__ ULL
+// MIPS32EL:#define __UINT64_MAX__ 18446744073709551615ULL
+// MIPS32EL:#define __UINT64_TYPE__ long long unsigned int
+// MIPS32EL:#define __UINT8_C_SUFFIX__ {{$}}
+// MIPS32EL:#define __UINT8_MAX__ 255
+// MIPS32EL:#define __UINT8_TYPE__ unsigned char
+// MIPS32EL:#define __UINTMAX_C_SUFFIX__ ULL
+// MIPS32EL:#define __UINTMAX_MAX__ 18446744073709551615ULL
// MIPS32EL:#define __UINTMAX_TYPE__ long long unsigned int
+// MIPS32EL:#define __UINTMAX_WIDTH__ 64
+// MIPS32EL:#define __UINTPTR_MAX__ 4294967295U
+// MIPS32EL:#define __UINTPTR_TYPE__ long unsigned int
+// MIPS32EL:#define __UINTPTR_WIDTH__ 32
+// MIPS32EL:#define __UINT_FAST16_MAX__ 65535
+// MIPS32EL:#define __UINT_FAST16_TYPE__ unsigned short
+// MIPS32EL:#define __UINT_FAST32_MAX__ 4294967295U
+// MIPS32EL:#define __UINT_FAST32_TYPE__ unsigned int
+// MIPS32EL:#define __UINT_FAST64_MAX__ 18446744073709551615ULL
+// MIPS32EL:#define __UINT_FAST64_TYPE__ long long unsigned int
+// MIPS32EL:#define __UINT_FAST8_MAX__ 255
+// MIPS32EL:#define __UINT_FAST8_TYPE__ unsigned char
+// MIPS32EL:#define __UINT_LEAST16_MAX__ 65535
+// MIPS32EL:#define __UINT_LEAST16_TYPE__ unsigned short
+// MIPS32EL:#define __UINT_LEAST32_MAX__ 4294967295U
+// MIPS32EL:#define __UINT_LEAST32_TYPE__ unsigned int
+// MIPS32EL:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL
+// MIPS32EL:#define __UINT_LEAST64_TYPE__ long long unsigned int
+// MIPS32EL:#define __UINT_LEAST8_MAX__ 255
+// MIPS32EL:#define __UINT_LEAST8_TYPE__ unsigned char
// MIPS32EL:#define __USER_LABEL_PREFIX__ _
// MIPS32EL:#define __WCHAR_MAX__ 2147483647
// MIPS32EL:#define __WCHAR_TYPE__ int
@@ -1069,7 +2796,7 @@
// MIPS32EL:#define __WINT_WIDTH__ 32
// MIPS32EL:#define __clang__ 1
// MIPS32EL:#define __llvm__ 1
-// MIPS32EL:#define __mips 1
+// MIPS32EL:#define __mips 32
// MIPS32EL:#define __mips__ 1
// MIPS32EL:#define __mips_fpr 32
// MIPS32EL:#define __mips_hard_float 1
@@ -1083,13 +2810,14 @@
// MIPS64BE:#define _ABI64 3
// MIPS64BE:#define _LP64 1
// MIPS64BE:#define _MIPSEB 1
-// MIPS64BE:#define _MIPS_ARCH "mips64"
-// MIPS64BE:#define _MIPS_ARCH_MIPS64 1
+// MIPS64BE:#define _MIPS_ARCH "mips64r2"
+// MIPS64BE:#define _MIPS_ARCH_MIPS64R2 1
// MIPS64BE:#define _MIPS_FPSET 32
// MIPS64BE:#define _MIPS_SIM _ABI64
// MIPS64BE:#define _MIPS_SZINT 32
// MIPS64BE:#define _MIPS_SZLONG 64
// MIPS64BE:#define _MIPS_SZPTR 64
+// MIPS64BE:#define __BIG_ENDIAN__ 1
// MIPS64BE:#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
// MIPS64BE:#define __CHAR16_TYPE__ unsigned short
// MIPS64BE:#define __CHAR32_TYPE__ unsigned int
@@ -1124,16 +2852,69 @@
// MIPS64BE:#define __FLT_MIN_EXP__ (-125)
// MIPS64BE:#define __FLT_MIN__ 1.17549435e-38F
// MIPS64BE:#define __FLT_RADIX__ 2
+// MIPS64BE:#define __INT16_C_SUFFIX__ {{$}}
+// MIPS64BE:#define __INT16_FMTd__ "hd"
+// MIPS64BE:#define __INT16_FMTi__ "hi"
+// MIPS64BE:#define __INT16_MAX__ 32767
// MIPS64BE:#define __INT16_TYPE__ short
+// MIPS64BE:#define __INT32_C_SUFFIX__ {{$}}
+// MIPS64BE:#define __INT32_FMTd__ "d"
+// MIPS64BE:#define __INT32_FMTi__ "i"
+// MIPS64BE:#define __INT32_MAX__ 2147483647
// MIPS64BE:#define __INT32_TYPE__ int
// MIPS64BE:#define __INT64_C_SUFFIX__ LL
+// MIPS64BE:#define __INT64_FMTd__ "lld"
+// MIPS64BE:#define __INT64_FMTi__ "lli"
+// MIPS64BE:#define __INT64_MAX__ 9223372036854775807L
// MIPS64BE:#define __INT64_TYPE__ long long int
-// MIPS64BE:#define __INT8_TYPE__ char
+// MIPS64BE:#define __INT8_C_SUFFIX__ {{$}}
+// MIPS64BE:#define __INT8_FMTd__ "hhd"
+// MIPS64BE:#define __INT8_FMTi__ "hhi"
+// MIPS64BE:#define __INT8_MAX__ 127
+// MIPS64BE:#define __INT8_TYPE__ signed char
+// MIPS64BE:#define __INTMAX_C_SUFFIX__ LL
+// MIPS64BE:#define __INTMAX_FMTd__ "lld"
+// MIPS64BE:#define __INTMAX_FMTi__ "lli"
// MIPS64BE:#define __INTMAX_MAX__ 9223372036854775807LL
// MIPS64BE:#define __INTMAX_TYPE__ long long int
// MIPS64BE:#define __INTMAX_WIDTH__ 64
+// MIPS64BE:#define __INTPTR_FMTd__ "ld"
+// MIPS64BE:#define __INTPTR_FMTi__ "li"
+// MIPS64BE:#define __INTPTR_MAX__ 9223372036854775807L
// MIPS64BE:#define __INTPTR_TYPE__ long int
// MIPS64BE:#define __INTPTR_WIDTH__ 64
+// MIPS64BE:#define __INT_FAST16_FMTd__ "hd"
+// MIPS64BE:#define __INT_FAST16_FMTi__ "hi"
+// MIPS64BE:#define __INT_FAST16_MAX__ 32767
+// MIPS64BE:#define __INT_FAST16_TYPE__ short
+// MIPS64BE:#define __INT_FAST32_FMTd__ "d"
+// MIPS64BE:#define __INT_FAST32_FMTi__ "i"
+// MIPS64BE:#define __INT_FAST32_MAX__ 2147483647
+// MIPS64BE:#define __INT_FAST32_TYPE__ int
+// MIPS64BE:#define __INT_FAST64_FMTd__ "ld"
+// MIPS64BE:#define __INT_FAST64_FMTi__ "li"
+// MIPS64BE:#define __INT_FAST64_MAX__ 9223372036854775807L
+// MIPS64BE:#define __INT_FAST64_TYPE__ long int
+// MIPS64BE:#define __INT_FAST8_FMTd__ "hhd"
+// MIPS64BE:#define __INT_FAST8_FMTi__ "hhi"
+// MIPS64BE:#define __INT_FAST8_MAX__ 127
+// MIPS64BE:#define __INT_FAST8_TYPE__ signed char
+// MIPS64BE:#define __INT_LEAST16_FMTd__ "hd"
+// MIPS64BE:#define __INT_LEAST16_FMTi__ "hi"
+// MIPS64BE:#define __INT_LEAST16_MAX__ 32767
+// MIPS64BE:#define __INT_LEAST16_TYPE__ short
+// MIPS64BE:#define __INT_LEAST32_FMTd__ "d"
+// MIPS64BE:#define __INT_LEAST32_FMTi__ "i"
+// MIPS64BE:#define __INT_LEAST32_MAX__ 2147483647
+// MIPS64BE:#define __INT_LEAST32_TYPE__ int
+// MIPS64BE:#define __INT_LEAST64_FMTd__ "ld"
+// MIPS64BE:#define __INT_LEAST64_FMTi__ "li"
+// MIPS64BE:#define __INT_LEAST64_MAX__ 9223372036854775807L
+// MIPS64BE:#define __INT_LEAST64_TYPE__ long int
+// MIPS64BE:#define __INT_LEAST8_FMTd__ "hhd"
+// MIPS64BE:#define __INT_LEAST8_FMTi__ "hhi"
+// MIPS64BE:#define __INT_LEAST8_MAX__ 127
+// MIPS64BE:#define __INT_LEAST8_TYPE__ signed char
// MIPS64BE:#define __INT_MAX__ 2147483647
// MIPS64BE:#define __LDBL_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966L
// MIPS64BE:#define __LDBL_DIG__ 33
@@ -1160,6 +2941,7 @@
// MIPS64BE:#define __REGISTER_PREFIX__
// MIPS64BE:#define __SCHAR_MAX__ 127
// MIPS64BE:#define __SHRT_MAX__ 32767
+// MIPS64BE:#define __SIG_ATOMIC_MAX__ 2147483647
// MIPS64BE:#define __SIG_ATOMIC_WIDTH__ 32
// MIPS64BE:#define __SIZEOF_DOUBLE__ 8
// MIPS64BE:#define __SIZEOF_FLOAT__ 4
@@ -1176,7 +2958,41 @@
// MIPS64BE:#define __SIZE_MAX__ 18446744073709551615UL
// MIPS64BE:#define __SIZE_TYPE__ long unsigned int
// MIPS64BE:#define __SIZE_WIDTH__ 64
+// MIPS64BE:#define __UINT16_C_SUFFIX__ {{$}}
+// MIPS64BE:#define __UINT16_MAX__ 65535
+// MIPS64BE:#define __UINT16_TYPE__ unsigned short
+// MIPS64BE:#define __UINT32_C_SUFFIX__ U
+// MIPS64BE:#define __UINT32_MAX__ 4294967295U
+// MIPS64BE:#define __UINT32_TYPE__ unsigned int
+// MIPS64BE:#define __UINT64_C_SUFFIX__ ULL
+// MIPS64BE:#define __UINT64_MAX__ 18446744073709551615ULL
+// MIPS64BE:#define __UINT64_TYPE__ long long unsigned int
+// MIPS64BE:#define __UINT8_C_SUFFIX__ {{$}}
+// MIPS64BE:#define __UINT8_MAX__ 255
+// MIPS64BE:#define __UINT8_TYPE__ unsigned char
+// MIPS64BE:#define __UINTMAX_C_SUFFIX__ ULL
+// MIPS64BE:#define __UINTMAX_MAX__ 18446744073709551615ULL
// MIPS64BE:#define __UINTMAX_TYPE__ long long unsigned int
+// MIPS64BE:#define __UINTMAX_WIDTH__ 64
+// MIPS64BE:#define __UINTPTR_MAX__ 18446744073709551615UL
+// MIPS64BE:#define __UINTPTR_TYPE__ long unsigned int
+// MIPS64BE:#define __UINTPTR_WIDTH__ 64
+// MIPS64BE:#define __UINT_FAST16_MAX__ 65535
+// MIPS64BE:#define __UINT_FAST16_TYPE__ unsigned short
+// MIPS64BE:#define __UINT_FAST32_MAX__ 4294967295U
+// MIPS64BE:#define __UINT_FAST32_TYPE__ unsigned int
+// MIPS64BE:#define __UINT_FAST64_MAX__ 18446744073709551615UL
+// MIPS64BE:#define __UINT_FAST64_TYPE__ long unsigned int
+// MIPS64BE:#define __UINT_FAST8_MAX__ 255
+// MIPS64BE:#define __UINT_FAST8_TYPE__ unsigned char
+// MIPS64BE:#define __UINT_LEAST16_MAX__ 65535
+// MIPS64BE:#define __UINT_LEAST16_TYPE__ unsigned short
+// MIPS64BE:#define __UINT_LEAST32_MAX__ 4294967295U
+// MIPS64BE:#define __UINT_LEAST32_TYPE__ unsigned int
+// MIPS64BE:#define __UINT_LEAST64_MAX__ 18446744073709551615UL
+// MIPS64BE:#define __UINT_LEAST64_TYPE__ long unsigned int
+// MIPS64BE:#define __UINT_LEAST8_MAX__ 255
+// MIPS64BE:#define __UINT_LEAST8_TYPE__ unsigned char
// MIPS64BE:#define __USER_LABEL_PREFIX__ _
// MIPS64BE:#define __WCHAR_MAX__ 2147483647
// MIPS64BE:#define __WCHAR_TYPE__ int
@@ -1185,7 +3001,7 @@
// MIPS64BE:#define __WINT_WIDTH__ 32
// MIPS64BE:#define __clang__ 1
// MIPS64BE:#define __llvm__ 1
-// MIPS64BE:#define __mips 1
+// MIPS64BE:#define __mips 64
// MIPS64BE:#define __mips64 1
// MIPS64BE:#define __mips64__ 1
// MIPS64BE:#define __mips__ 1
@@ -1201,8 +3017,8 @@
// MIPS64EL:#define _ABI64 3
// MIPS64EL:#define _LP64 1
// MIPS64EL:#define _MIPSEL 1
-// MIPS64EL:#define _MIPS_ARCH "mips64"
-// MIPS64EL:#define _MIPS_ARCH_MIPS64 1
+// MIPS64EL:#define _MIPS_ARCH "mips64r2"
+// MIPS64EL:#define _MIPS_ARCH_MIPS64R2 1
// MIPS64EL:#define _MIPS_FPSET 32
// MIPS64EL:#define _MIPS_SIM _ABI64
// MIPS64EL:#define _MIPS_SZINT 32
@@ -1242,16 +3058,69 @@
// MIPS64EL:#define __FLT_MIN_EXP__ (-125)
// MIPS64EL:#define __FLT_MIN__ 1.17549435e-38F
// MIPS64EL:#define __FLT_RADIX__ 2
+// MIPS64EL:#define __INT16_C_SUFFIX__ {{$}}
+// MIPS64EL:#define __INT16_FMTd__ "hd"
+// MIPS64EL:#define __INT16_FMTi__ "hi"
+// MIPS64EL:#define __INT16_MAX__ 32767
// MIPS64EL:#define __INT16_TYPE__ short
+// MIPS64EL:#define __INT32_C_SUFFIX__ {{$}}
+// MIPS64EL:#define __INT32_FMTd__ "d"
+// MIPS64EL:#define __INT32_FMTi__ "i"
+// MIPS64EL:#define __INT32_MAX__ 2147483647
// MIPS64EL:#define __INT32_TYPE__ int
// MIPS64EL:#define __INT64_C_SUFFIX__ LL
+// MIPS64EL:#define __INT64_FMTd__ "lld"
+// MIPS64EL:#define __INT64_FMTi__ "lli"
+// MIPS64EL:#define __INT64_MAX__ 9223372036854775807L
// MIPS64EL:#define __INT64_TYPE__ long long int
-// MIPS64EL:#define __INT8_TYPE__ char
+// MIPS64EL:#define __INT8_C_SUFFIX__ {{$}}
+// MIPS64EL:#define __INT8_FMTd__ "hhd"
+// MIPS64EL:#define __INT8_FMTi__ "hhi"
+// MIPS64EL:#define __INT8_MAX__ 127
+// MIPS64EL:#define __INT8_TYPE__ signed char
+// MIPS64EL:#define __INTMAX_C_SUFFIX__ LL
+// MIPS64EL:#define __INTMAX_FMTd__ "lld"
+// MIPS64EL:#define __INTMAX_FMTi__ "lli"
// MIPS64EL:#define __INTMAX_MAX__ 9223372036854775807LL
// MIPS64EL:#define __INTMAX_TYPE__ long long int
// MIPS64EL:#define __INTMAX_WIDTH__ 64
+// MIPS64EL:#define __INTPTR_FMTd__ "ld"
+// MIPS64EL:#define __INTPTR_FMTi__ "li"
+// MIPS64EL:#define __INTPTR_MAX__ 9223372036854775807L
// MIPS64EL:#define __INTPTR_TYPE__ long int
// MIPS64EL:#define __INTPTR_WIDTH__ 64
+// MIPS64EL:#define __INT_FAST16_FMTd__ "hd"
+// MIPS64EL:#define __INT_FAST16_FMTi__ "hi"
+// MIPS64EL:#define __INT_FAST16_MAX__ 32767
+// MIPS64EL:#define __INT_FAST16_TYPE__ short
+// MIPS64EL:#define __INT_FAST32_FMTd__ "d"
+// MIPS64EL:#define __INT_FAST32_FMTi__ "i"
+// MIPS64EL:#define __INT_FAST32_MAX__ 2147483647
+// MIPS64EL:#define __INT_FAST32_TYPE__ int
+// MIPS64EL:#define __INT_FAST64_FMTd__ "ld"
+// MIPS64EL:#define __INT_FAST64_FMTi__ "li"
+// MIPS64EL:#define __INT_FAST64_MAX__ 9223372036854775807L
+// MIPS64EL:#define __INT_FAST64_TYPE__ long int
+// MIPS64EL:#define __INT_FAST8_FMTd__ "hhd"
+// MIPS64EL:#define __INT_FAST8_FMTi__ "hhi"
+// MIPS64EL:#define __INT_FAST8_MAX__ 127
+// MIPS64EL:#define __INT_FAST8_TYPE__ signed char
+// MIPS64EL:#define __INT_LEAST16_FMTd__ "hd"
+// MIPS64EL:#define __INT_LEAST16_FMTi__ "hi"
+// MIPS64EL:#define __INT_LEAST16_MAX__ 32767
+// MIPS64EL:#define __INT_LEAST16_TYPE__ short
+// MIPS64EL:#define __INT_LEAST32_FMTd__ "d"
+// MIPS64EL:#define __INT_LEAST32_FMTi__ "i"
+// MIPS64EL:#define __INT_LEAST32_MAX__ 2147483647
+// MIPS64EL:#define __INT_LEAST32_TYPE__ int
+// MIPS64EL:#define __INT_LEAST64_FMTd__ "ld"
+// MIPS64EL:#define __INT_LEAST64_FMTi__ "li"
+// MIPS64EL:#define __INT_LEAST64_MAX__ 9223372036854775807L
+// MIPS64EL:#define __INT_LEAST64_TYPE__ long int
+// MIPS64EL:#define __INT_LEAST8_FMTd__ "hhd"
+// MIPS64EL:#define __INT_LEAST8_FMTi__ "hhi"
+// MIPS64EL:#define __INT_LEAST8_MAX__ 127
+// MIPS64EL:#define __INT_LEAST8_TYPE__ signed char
// MIPS64EL:#define __INT_MAX__ 2147483647
// MIPS64EL:#define __LDBL_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966L
// MIPS64EL:#define __LDBL_DIG__ 33
@@ -1266,6 +3135,7 @@
// MIPS64EL:#define __LDBL_MIN_10_EXP__ (-4931)
// MIPS64EL:#define __LDBL_MIN_EXP__ (-16381)
// MIPS64EL:#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L
+// MIPS64EL:#define __LITTLE_ENDIAN__ 1
// MIPS64EL:#define __LONG_LONG_MAX__ 9223372036854775807LL
// MIPS64EL:#define __LONG_MAX__ 9223372036854775807L
// MIPS64EL:#define __LP64__ 1
@@ -1278,6 +3148,7 @@
// MIPS64EL:#define __REGISTER_PREFIX__
// MIPS64EL:#define __SCHAR_MAX__ 127
// MIPS64EL:#define __SHRT_MAX__ 32767
+// MIPS64EL:#define __SIG_ATOMIC_MAX__ 2147483647
// MIPS64EL:#define __SIG_ATOMIC_WIDTH__ 32
// MIPS64EL:#define __SIZEOF_DOUBLE__ 8
// MIPS64EL:#define __SIZEOF_FLOAT__ 4
@@ -1294,7 +3165,41 @@
// MIPS64EL:#define __SIZE_MAX__ 18446744073709551615UL
// MIPS64EL:#define __SIZE_TYPE__ long unsigned int
// MIPS64EL:#define __SIZE_WIDTH__ 64
+// MIPS64EL:#define __UINT16_C_SUFFIX__ {{$}}
+// MIPS64EL:#define __UINT16_MAX__ 65535
+// MIPS64EL:#define __UINT16_TYPE__ unsigned short
+// MIPS64EL:#define __UINT32_C_SUFFIX__ U
+// MIPS64EL:#define __UINT32_MAX__ 4294967295U
+// MIPS64EL:#define __UINT32_TYPE__ unsigned int
+// MIPS64EL:#define __UINT64_C_SUFFIX__ ULL
+// MIPS64EL:#define __UINT64_MAX__ 18446744073709551615ULL
+// MIPS64EL:#define __UINT64_TYPE__ long long unsigned int
+// MIPS64EL:#define __UINT8_C_SUFFIX__ {{$}}
+// MIPS64EL:#define __UINT8_MAX__ 255
+// MIPS64EL:#define __UINT8_TYPE__ unsigned char
+// MIPS64EL:#define __UINTMAX_C_SUFFIX__ ULL
+// MIPS64EL:#define __UINTMAX_MAX__ 18446744073709551615ULL
// MIPS64EL:#define __UINTMAX_TYPE__ long long unsigned int
+// MIPS64EL:#define __UINTMAX_WIDTH__ 64
+// MIPS64EL:#define __UINTPTR_MAX__ 18446744073709551615UL
+// MIPS64EL:#define __UINTPTR_TYPE__ long unsigned int
+// MIPS64EL:#define __UINTPTR_WIDTH__ 64
+// MIPS64EL:#define __UINT_FAST16_MAX__ 65535
+// MIPS64EL:#define __UINT_FAST16_TYPE__ unsigned short
+// MIPS64EL:#define __UINT_FAST32_MAX__ 4294967295U
+// MIPS64EL:#define __UINT_FAST32_TYPE__ unsigned int
+// MIPS64EL:#define __UINT_FAST64_MAX__ 18446744073709551615UL
+// MIPS64EL:#define __UINT_FAST64_TYPE__ long unsigned int
+// MIPS64EL:#define __UINT_FAST8_MAX__ 255
+// MIPS64EL:#define __UINT_FAST8_TYPE__ unsigned char
+// MIPS64EL:#define __UINT_LEAST16_MAX__ 65535
+// MIPS64EL:#define __UINT_LEAST16_TYPE__ unsigned short
+// MIPS64EL:#define __UINT_LEAST32_MAX__ 4294967295U
+// MIPS64EL:#define __UINT_LEAST32_TYPE__ unsigned int
+// MIPS64EL:#define __UINT_LEAST64_MAX__ 18446744073709551615UL
+// MIPS64EL:#define __UINT_LEAST64_TYPE__ long unsigned int
+// MIPS64EL:#define __UINT_LEAST8_MAX__ 255
+// MIPS64EL:#define __UINT_LEAST8_TYPE__ unsigned char
// MIPS64EL:#define __USER_LABEL_PREFIX__ _
// MIPS64EL:#define __WCHAR_MAX__ 2147483647
// MIPS64EL:#define __WCHAR_TYPE__ int
@@ -1303,7 +3208,7 @@
// MIPS64EL:#define __WINT_WIDTH__ 32
// MIPS64EL:#define __clang__ 1
// MIPS64EL:#define __llvm__ 1
-// MIPS64EL:#define __mips 1
+// MIPS64EL:#define __mips 64
// MIPS64EL:#define __mips64 1
// MIPS64EL:#define __mips64__ 1
// MIPS64EL:#define __mips__ 1
@@ -1313,6 +3218,62 @@
// MIPS64EL:#define _mips 1
// MIPS64EL:#define mips 1
//
+// Check MIPS arch and isa macros
+//
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=mips-none-none \
+// RUN: < /dev/null \
+// RUN: | FileCheck -check-prefix MIPS-ARCH-DEF32 %s
+//
+// MIPS-ARCH-DEF32:#define _MIPS_ARCH "mips32r2"
+// MIPS-ARCH-DEF32:#define _MIPS_ARCH_MIPS32R2 1
+// MIPS-ARCH-DEF32:#define _MIPS_ISA _MIPS_ISA_MIPS32
+// MIPS-ARCH-DEF32:#define __mips_isa_rev 2
+//
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=mips-none-nones \
+// RUN: -target-cpu mips32 < /dev/null \
+// RUN: | FileCheck -check-prefix MIPS-ARCH-32 %s
+//
+// MIPS-ARCH-32:#define _MIPS_ARCH "mips32"
+// MIPS-ARCH-32:#define _MIPS_ARCH_MIPS32 1
+// MIPS-ARCH-32:#define _MIPS_ISA _MIPS_ISA_MIPS32
+// MIPS-ARCH-32:#define __mips_isa_rev 1
+//
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=mips-none-none \
+// RUN: -target-cpu mips32r2 < /dev/null \
+// RUN: | FileCheck -check-prefix MIPS-ARCH-32R2 %s
+//
+// MIPS-ARCH-32R2:#define _MIPS_ARCH "mips32r2"
+// MIPS-ARCH-32R2:#define _MIPS_ARCH_MIPS32R2 1
+// MIPS-ARCH-32R2:#define _MIPS_ISA _MIPS_ISA_MIPS32
+// MIPS-ARCH-32R2:#define __mips_isa_rev 2
+//
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=mips64-none-none \
+// RUN: < /dev/null \
+// RUN: | FileCheck -check-prefix MIPS-ARCH-DEF64 %s
+//
+// MIPS-ARCH-DEF64:#define _MIPS_ARCH "mips64r2"
+// MIPS-ARCH-DEF64:#define _MIPS_ARCH_MIPS64R2 1
+// MIPS-ARCH-DEF64:#define _MIPS_ISA _MIPS_ISA_MIPS64
+// MIPS-ARCH-DEF64:#define __mips_isa_rev 2
+//
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=mips64-none-none \
+// RUN: -target-cpu mips64 < /dev/null \
+// RUN: | FileCheck -check-prefix MIPS-ARCH-64 %s
+//
+// MIPS-ARCH-64:#define _MIPS_ARCH "mips64"
+// MIPS-ARCH-64:#define _MIPS_ARCH_MIPS64 1
+// MIPS-ARCH-64:#define _MIPS_ISA _MIPS_ISA_MIPS64
+// MIPS-ARCH-64:#define __mips_isa_rev 1
+//
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=mips64-none-none \
+// RUN: -target-cpu mips64r2 < /dev/null \
+// RUN: | FileCheck -check-prefix MIPS-ARCH-64R2 %s
+//
+// MIPS-ARCH-64R2:#define _MIPS_ARCH "mips64r2"
+// MIPS-ARCH-64R2:#define _MIPS_ARCH_MIPS64R2 1
+// MIPS-ARCH-64R2:#define _MIPS_ISA _MIPS_ISA_MIPS64
+// MIPS-ARCH-64R2:#define __mips_isa_rev 2
+//
// Check MIPS float ABI macros
//
// RUN: %clang_cc1 -E -dM -ffreestanding \
@@ -1413,6 +3374,16 @@
// MIPS64-NOMFP64:#define _MIPS_FPSET 32
// MIPS64-NOMFP64:#define __mips_fpr 32
//
+// RUN: %clang_cc1 -target-cpu mips32r6 \
+// RUN: -E -dM -triple=mips-none-none < /dev/null \
+// RUN: | FileCheck -check-prefix MIPS-XXR6 %s
+// RUN: %clang_cc1 -target-cpu mips64r6 \
+// RUN: -E -dM -triple=mips64-none-none < /dev/null \
+// RUN: | FileCheck -check-prefix MIPS-XXR6 %s
+// MIPS-XXR6:#define _MIPS_FPSET 32
+// MIPS-XXR6:#define __mips_fpr 64
+// MIPS-XXR6:#define __mips_nan2008 1
+//
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=msp430-none-none < /dev/null | FileCheck -check-prefix MSP430 %s
//
// MSP430:#define MSP430 1
@@ -1450,15 +3421,69 @@
// MSP430:#define __FLT_MIN_EXP__ (-125)
// MSP430:#define __FLT_MIN__ 1.17549435e-38F
// MSP430:#define __FLT_RADIX__ 2
+// MSP430:#define __INT16_C_SUFFIX__ {{$}}
+// MSP430:#define __INT16_FMTd__ "hd"
+// MSP430:#define __INT16_FMTi__ "hi"
+// MSP430:#define __INT16_MAX__ 32767
// MSP430:#define __INT16_TYPE__ short
// MSP430:#define __INT32_C_SUFFIX__ L
+// MSP430:#define __INT32_FMTd__ "ld"
+// MSP430:#define __INT32_FMTi__ "li"
+// MSP430:#define __INT32_MAX__ 2147483647L
// MSP430:#define __INT32_TYPE__ long int
-// MSP430:#define __INT8_TYPE__ char
+// MSP430:#define __INT64_C_SUFFIX__ LL
+// MSP430:#define __INT64_FMTd__ "lld"
+// MSP430:#define __INT64_FMTi__ "lli"
+// MSP430:#define __INT64_MAX__ 9223372036854775807LL
+// MSP430:#define __INT64_TYPE__ long long int
+// MSP430:#define __INT8_C_SUFFIX__ {{$}}
+// MSP430:#define __INT8_FMTd__ "hhd"
+// MSP430:#define __INT8_FMTi__ "hhi"
+// MSP430:#define __INT8_MAX__ 127
+// MSP430:#define __INT8_TYPE__ signed char
+// MSP430:#define __INTMAX_C_SUFFIX__ LL
+// MSP430:#define __INTMAX_FMTd__ "lld"
+// MSP430:#define __INTMAX_FMTi__ "lli"
// MSP430:#define __INTMAX_MAX__ 9223372036854775807LL
// MSP430:#define __INTMAX_TYPE__ long long int
// MSP430:#define __INTMAX_WIDTH__ 64
+// MSP430:#define __INTPTR_FMTd__ "d"
+// MSP430:#define __INTPTR_FMTi__ "i"
+// MSP430:#define __INTPTR_MAX__ 32767
// MSP430:#define __INTPTR_TYPE__ int
// MSP430:#define __INTPTR_WIDTH__ 16
+// MSP430:#define __INT_FAST16_FMTd__ "hd"
+// MSP430:#define __INT_FAST16_FMTi__ "hi"
+// MSP430:#define __INT_FAST16_MAX__ 32767
+// MSP430:#define __INT_FAST16_TYPE__ short
+// MSP430:#define __INT_FAST32_FMTd__ "ld"
+// MSP430:#define __INT_FAST32_FMTi__ "li"
+// MSP430:#define __INT_FAST32_MAX__ 2147483647L
+// MSP430:#define __INT_FAST32_TYPE__ long int
+// MSP430:#define __INT_FAST64_FMTd__ "lld"
+// MSP430:#define __INT_FAST64_FMTi__ "lli"
+// MSP430:#define __INT_FAST64_MAX__ 9223372036854775807LL
+// MSP430:#define __INT_FAST64_TYPE__ long long int
+// MSP430:#define __INT_FAST8_FMTd__ "hhd"
+// MSP430:#define __INT_FAST8_FMTi__ "hhi"
+// MSP430:#define __INT_FAST8_MAX__ 127
+// MSP430:#define __INT_FAST8_TYPE__ signed char
+// MSP430:#define __INT_LEAST16_FMTd__ "hd"
+// MSP430:#define __INT_LEAST16_FMTi__ "hi"
+// MSP430:#define __INT_LEAST16_MAX__ 32767
+// MSP430:#define __INT_LEAST16_TYPE__ short
+// MSP430:#define __INT_LEAST32_FMTd__ "ld"
+// MSP430:#define __INT_LEAST32_FMTi__ "li"
+// MSP430:#define __INT_LEAST32_MAX__ 2147483647L
+// MSP430:#define __INT_LEAST32_TYPE__ long int
+// MSP430:#define __INT_LEAST64_FMTd__ "lld"
+// MSP430:#define __INT_LEAST64_FMTi__ "lli"
+// MSP430:#define __INT_LEAST64_MAX__ 9223372036854775807LL
+// MSP430:#define __INT_LEAST64_TYPE__ long long int
+// MSP430:#define __INT_LEAST8_FMTd__ "hhd"
+// MSP430:#define __INT_LEAST8_FMTi__ "hhi"
+// MSP430:#define __INT_LEAST8_MAX__ 127
+// MSP430:#define __INT_LEAST8_TYPE__ signed char
// MSP430:#define __INT_MAX__ 32767
// MSP430:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
// MSP430:#define __LDBL_DIG__ 15
@@ -1473,6 +3498,7 @@
// MSP430:#define __LDBL_MIN_10_EXP__ (-307)
// MSP430:#define __LDBL_MIN_EXP__ (-1021)
// MSP430:#define __LDBL_MIN__ 2.2250738585072014e-308L
+// MSP430:#define __LITTLE_ENDIAN__ 1
// MSP430:#define __LONG_LONG_MAX__ 9223372036854775807LL
// MSP430:#define __LONG_MAX__ 2147483647L
// MSP430-NOT:#define __LP64__
@@ -1482,6 +3508,7 @@
// MSP430:#define __PTRDIFF_WIDTH__ 16
// MSP430:#define __SCHAR_MAX__ 127
// MSP430:#define __SHRT_MAX__ 32767
+// MSP430:#define __SIG_ATOMIC_MAX__ 2147483647
// MSP430:#define __SIG_ATOMIC_WIDTH__ 32
// MSP430:#define __SIZEOF_DOUBLE__ 8
// MSP430:#define __SIZEOF_FLOAT__ 4
@@ -1495,10 +3522,44 @@
// MSP430:#define __SIZEOF_SIZE_T__ 2
// MSP430:#define __SIZEOF_WCHAR_T__ 2
// MSP430:#define __SIZEOF_WINT_T__ 2
-// MSP430:#define __SIZE_MAX__ 65535U
+// MSP430:#define __SIZE_MAX__ 65535
// MSP430:#define __SIZE_TYPE__ unsigned int
// MSP430:#define __SIZE_WIDTH__ 16
+// MSP430:#define __UINT16_C_SUFFIX__ U
+// MSP430:#define __UINT16_MAX__ 65535
+// MSP430:#define __UINT16_TYPE__ unsigned short
+// MSP430:#define __UINT32_C_SUFFIX__ UL
+// MSP430:#define __UINT32_MAX__ 4294967295UL
+// MSP430:#define __UINT32_TYPE__ long unsigned int
+// MSP430:#define __UINT64_C_SUFFIX__ ULL
+// MSP430:#define __UINT64_MAX__ 18446744073709551615ULL
+// MSP430:#define __UINT64_TYPE__ long long unsigned int
+// MSP430:#define __UINT8_C_SUFFIX__ {{$}}
+// MSP430:#define __UINT8_MAX__ 255
+// MSP430:#define __UINT8_TYPE__ unsigned char
+// MSP430:#define __UINTMAX_C_SUFFIX__ ULL
+// MSP430:#define __UINTMAX_MAX__ 18446744073709551615ULL
// MSP430:#define __UINTMAX_TYPE__ long long unsigned int
+// MSP430:#define __UINTMAX_WIDTH__ 64
+// MSP430:#define __UINTPTR_MAX__ 65535
+// MSP430:#define __UINTPTR_TYPE__ unsigned int
+// MSP430:#define __UINTPTR_WIDTH__ 16
+// MSP430:#define __UINT_FAST16_MAX__ 65535
+// MSP430:#define __UINT_FAST16_TYPE__ unsigned short
+// MSP430:#define __UINT_FAST32_MAX__ 4294967295UL
+// MSP430:#define __UINT_FAST32_TYPE__ long unsigned int
+// MSP430:#define __UINT_FAST64_MAX__ 18446744073709551615ULL
+// MSP430:#define __UINT_FAST64_TYPE__ long long unsigned int
+// MSP430:#define __UINT_FAST8_MAX__ 255
+// MSP430:#define __UINT_FAST8_TYPE__ unsigned char
+// MSP430:#define __UINT_LEAST16_MAX__ 65535
+// MSP430:#define __UINT_LEAST16_TYPE__ unsigned short
+// MSP430:#define __UINT_LEAST32_MAX__ 4294967295UL
+// MSP430:#define __UINT_LEAST32_TYPE__ long unsigned int
+// MSP430:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL
+// MSP430:#define __UINT_LEAST64_TYPE__ long long unsigned int
+// MSP430:#define __UINT_LEAST8_MAX__ 255
+// MSP430:#define __UINT_LEAST8_TYPE__ unsigned char
// MSP430:#define __USER_LABEL_PREFIX__ _
// MSP430:#define __WCHAR_MAX__ 32767
// MSP430:#define __WCHAR_TYPE__ int
@@ -1545,16 +3606,69 @@
// NVPTX32:#define __FLT_MIN_EXP__ (-125)
// NVPTX32:#define __FLT_MIN__ 1.17549435e-38F
// NVPTX32:#define __FLT_RADIX__ 2
+// NVPTX32:#define __INT16_C_SUFFIX__ {{$}}
+// NVPTX32:#define __INT16_FMTd__ "hd"
+// NVPTX32:#define __INT16_FMTi__ "hi"
+// NVPTX32:#define __INT16_MAX__ 32767
// NVPTX32:#define __INT16_TYPE__ short
+// NVPTX32:#define __INT32_C_SUFFIX__ {{$}}
+// NVPTX32:#define __INT32_FMTd__ "d"
+// NVPTX32:#define __INT32_FMTi__ "i"
+// NVPTX32:#define __INT32_MAX__ 2147483647
// NVPTX32:#define __INT32_TYPE__ int
// NVPTX32:#define __INT64_C_SUFFIX__ LL
+// NVPTX32:#define __INT64_FMTd__ "lld"
+// NVPTX32:#define __INT64_FMTi__ "lli"
+// NVPTX32:#define __INT64_MAX__ 9223372036854775807L
// NVPTX32:#define __INT64_TYPE__ long long int
-// NVPTX32:#define __INT8_TYPE__ char
+// NVPTX32:#define __INT8_C_SUFFIX__ {{$}}
+// NVPTX32:#define __INT8_FMTd__ "hhd"
+// NVPTX32:#define __INT8_FMTi__ "hhi"
+// NVPTX32:#define __INT8_MAX__ 127
+// NVPTX32:#define __INT8_TYPE__ signed char
+// NVPTX32:#define __INTMAX_C_SUFFIX__ LL
+// NVPTX32:#define __INTMAX_FMTd__ "lld"
+// NVPTX32:#define __INTMAX_FMTi__ "lli"
// NVPTX32:#define __INTMAX_MAX__ 9223372036854775807LL
// NVPTX32:#define __INTMAX_TYPE__ long long int
// NVPTX32:#define __INTMAX_WIDTH__ 64
-// NVPTX32:#define __INTPTR_TYPE__ unsigned int
+// NVPTX32:#define __INTPTR_FMTd__ "d"
+// NVPTX32:#define __INTPTR_FMTi__ "i"
+// NVPTX32:#define __INTPTR_MAX__ 2147483647
+// NVPTX32:#define __INTPTR_TYPE__ int
// NVPTX32:#define __INTPTR_WIDTH__ 32
+// NVPTX32:#define __INT_FAST16_FMTd__ "hd"
+// NVPTX32:#define __INT_FAST16_FMTi__ "hi"
+// NVPTX32:#define __INT_FAST16_MAX__ 32767
+// NVPTX32:#define __INT_FAST16_TYPE__ short
+// NVPTX32:#define __INT_FAST32_FMTd__ "d"
+// NVPTX32:#define __INT_FAST32_FMTi__ "i"
+// NVPTX32:#define __INT_FAST32_MAX__ 2147483647
+// NVPTX32:#define __INT_FAST32_TYPE__ int
+// NVPTX32:#define __INT_FAST64_FMTd__ "ld"
+// NVPTX32:#define __INT_FAST64_FMTi__ "li"
+// NVPTX32:#define __INT_FAST64_MAX__ 9223372036854775807L
+// NVPTX32:#define __INT_FAST64_TYPE__ long int
+// NVPTX32:#define __INT_FAST8_FMTd__ "hhd"
+// NVPTX32:#define __INT_FAST8_FMTi__ "hhi"
+// NVPTX32:#define __INT_FAST8_MAX__ 127
+// NVPTX32:#define __INT_FAST8_TYPE__ signed char
+// NVPTX32:#define __INT_LEAST16_FMTd__ "hd"
+// NVPTX32:#define __INT_LEAST16_FMTi__ "hi"
+// NVPTX32:#define __INT_LEAST16_MAX__ 32767
+// NVPTX32:#define __INT_LEAST16_TYPE__ short
+// NVPTX32:#define __INT_LEAST32_FMTd__ "d"
+// NVPTX32:#define __INT_LEAST32_FMTi__ "i"
+// NVPTX32:#define __INT_LEAST32_MAX__ 2147483647
+// NVPTX32:#define __INT_LEAST32_TYPE__ int
+// NVPTX32:#define __INT_LEAST64_FMTd__ "ld"
+// NVPTX32:#define __INT_LEAST64_FMTi__ "li"
+// NVPTX32:#define __INT_LEAST64_MAX__ 9223372036854775807L
+// NVPTX32:#define __INT_LEAST64_TYPE__ long int
+// NVPTX32:#define __INT_LEAST8_FMTd__ "hhd"
+// NVPTX32:#define __INT_LEAST8_FMTi__ "hhi"
+// NVPTX32:#define __INT_LEAST8_MAX__ 127
+// NVPTX32:#define __INT_LEAST8_TYPE__ signed char
// NVPTX32:#define __INT_MAX__ 2147483647
// NVPTX32:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
// NVPTX32:#define __LDBL_DIG__ 15
@@ -1569,6 +3683,7 @@
// NVPTX32:#define __LDBL_MIN_10_EXP__ (-307)
// NVPTX32:#define __LDBL_MIN_EXP__ (-1021)
// NVPTX32:#define __LDBL_MIN__ 2.2250738585072014e-308L
+// NVPTX32:#define __LITTLE_ENDIAN__ 1
// NVPTX32:#define __LONG_LONG_MAX__ 9223372036854775807LL
// NVPTX32:#define __LONG_MAX__ 9223372036854775807L
// NVPTX32-NOT:#define __LP64__
@@ -1580,6 +3695,7 @@
// NVPTX32:#define __PTX__ 1
// NVPTX32:#define __SCHAR_MAX__ 127
// NVPTX32:#define __SHRT_MAX__ 32767
+// NVPTX32:#define __SIG_ATOMIC_MAX__ 2147483647
// NVPTX32:#define __SIG_ATOMIC_WIDTH__ 32
// NVPTX32:#define __SIZEOF_DOUBLE__ 8
// NVPTX32:#define __SIZEOF_FLOAT__ 4
@@ -1596,7 +3712,41 @@
// NVPTX32:#define __SIZE_MAX__ 4294967295U
// NVPTX32:#define __SIZE_TYPE__ unsigned int
// NVPTX32:#define __SIZE_WIDTH__ 32
+// NVPTX32:#define __UINT16_C_SUFFIX__ {{$}}
+// NVPTX32:#define __UINT16_MAX__ 65535
+// NVPTX32:#define __UINT16_TYPE__ unsigned short
+// NVPTX32:#define __UINT32_C_SUFFIX__ U
+// NVPTX32:#define __UINT32_MAX__ 4294967295U
+// NVPTX32:#define __UINT32_TYPE__ unsigned int
+// NVPTX32:#define __UINT64_C_SUFFIX__ ULL
+// NVPTX32:#define __UINT64_MAX__ 18446744073709551615ULL
+// NVPTX32:#define __UINT64_TYPE__ long long unsigned int
+// NVPTX32:#define __UINT8_C_SUFFIX__ {{$}}
+// NVPTX32:#define __UINT8_MAX__ 255
+// NVPTX32:#define __UINT8_TYPE__ unsigned char
+// NVPTX32:#define __UINTMAX_C_SUFFIX__ ULL
+// NVPTX32:#define __UINTMAX_MAX__ 18446744073709551615ULL
// NVPTX32:#define __UINTMAX_TYPE__ long long unsigned int
+// NVPTX32:#define __UINTMAX_WIDTH__ 64
+// NVPTX32:#define __UINTPTR_MAX__ 4294967295U
+// NVPTX32:#define __UINTPTR_TYPE__ unsigned int
+// NVPTX32:#define __UINTPTR_WIDTH__ 32
+// NVPTX32:#define __UINT_FAST16_MAX__ 65535
+// NVPTX32:#define __UINT_FAST16_TYPE__ unsigned short
+// NVPTX32:#define __UINT_FAST32_MAX__ 4294967295U
+// NVPTX32:#define __UINT_FAST32_TYPE__ unsigned int
+// NVPTX32:#define __UINT_FAST64_MAX__ 18446744073709551615UL
+// NVPTX32:#define __UINT_FAST64_TYPE__ long unsigned int
+// NVPTX32:#define __UINT_FAST8_MAX__ 255
+// NVPTX32:#define __UINT_FAST8_TYPE__ unsigned char
+// NVPTX32:#define __UINT_LEAST16_MAX__ 65535
+// NVPTX32:#define __UINT_LEAST16_TYPE__ unsigned short
+// NVPTX32:#define __UINT_LEAST32_MAX__ 4294967295U
+// NVPTX32:#define __UINT_LEAST32_TYPE__ unsigned int
+// NVPTX32:#define __UINT_LEAST64_MAX__ 18446744073709551615UL
+// NVPTX32:#define __UINT_LEAST64_TYPE__ long unsigned int
+// NVPTX32:#define __UINT_LEAST8_MAX__ 255
+// NVPTX32:#define __UINT_LEAST8_TYPE__ unsigned char
// NVPTX32:#define __USER_LABEL_PREFIX__ _
// NVPTX32:#define __WCHAR_MAX__ 2147483647
// NVPTX32:#define __WCHAR_TYPE__ int
@@ -1642,16 +3792,69 @@
// NVPTX64:#define __FLT_MIN_EXP__ (-125)
// NVPTX64:#define __FLT_MIN__ 1.17549435e-38F
// NVPTX64:#define __FLT_RADIX__ 2
+// NVPTX64:#define __INT16_C_SUFFIX__ {{$}}
+// NVPTX64:#define __INT16_FMTd__ "hd"
+// NVPTX64:#define __INT16_FMTi__ "hi"
+// NVPTX64:#define __INT16_MAX__ 32767
// NVPTX64:#define __INT16_TYPE__ short
+// NVPTX64:#define __INT32_C_SUFFIX__ {{$}}
+// NVPTX64:#define __INT32_FMTd__ "d"
+// NVPTX64:#define __INT32_FMTi__ "i"
+// NVPTX64:#define __INT32_MAX__ 2147483647
// NVPTX64:#define __INT32_TYPE__ int
// NVPTX64:#define __INT64_C_SUFFIX__ LL
+// NVPTX64:#define __INT64_FMTd__ "lld"
+// NVPTX64:#define __INT64_FMTi__ "lli"
+// NVPTX64:#define __INT64_MAX__ 9223372036854775807L
// NVPTX64:#define __INT64_TYPE__ long long int
-// NVPTX64:#define __INT8_TYPE__ char
+// NVPTX64:#define __INT8_C_SUFFIX__ {{$}}
+// NVPTX64:#define __INT8_FMTd__ "hhd"
+// NVPTX64:#define __INT8_FMTi__ "hhi"
+// NVPTX64:#define __INT8_MAX__ 127
+// NVPTX64:#define __INT8_TYPE__ signed char
+// NVPTX64:#define __INTMAX_C_SUFFIX__ LL
+// NVPTX64:#define __INTMAX_FMTd__ "lld"
+// NVPTX64:#define __INTMAX_FMTi__ "lli"
// NVPTX64:#define __INTMAX_MAX__ 9223372036854775807LL
// NVPTX64:#define __INTMAX_TYPE__ long long int
// NVPTX64:#define __INTMAX_WIDTH__ 64
-// NVPTX64:#define __INTPTR_TYPE__ long long unsigned int
+// NVPTX64:#define __INTPTR_FMTd__ "lld"
+// NVPTX64:#define __INTPTR_FMTi__ "lli"
+// NVPTX64:#define __INTPTR_MAX__ 9223372036854775807LL
+// NVPTX64:#define __INTPTR_TYPE__ long long int
// NVPTX64:#define __INTPTR_WIDTH__ 64
+// NVPTX64:#define __INT_FAST16_FMTd__ "hd"
+// NVPTX64:#define __INT_FAST16_FMTi__ "hi"
+// NVPTX64:#define __INT_FAST16_MAX__ 32767
+// NVPTX64:#define __INT_FAST16_TYPE__ short
+// NVPTX64:#define __INT_FAST32_FMTd__ "d"
+// NVPTX64:#define __INT_FAST32_FMTi__ "i"
+// NVPTX64:#define __INT_FAST32_MAX__ 2147483647
+// NVPTX64:#define __INT_FAST32_TYPE__ int
+// NVPTX64:#define __INT_FAST64_FMTd__ "ld"
+// NVPTX64:#define __INT_FAST64_FMTi__ "li"
+// NVPTX64:#define __INT_FAST64_MAX__ 9223372036854775807L
+// NVPTX64:#define __INT_FAST64_TYPE__ long int
+// NVPTX64:#define __INT_FAST8_FMTd__ "hhd"
+// NVPTX64:#define __INT_FAST8_FMTi__ "hhi"
+// NVPTX64:#define __INT_FAST8_MAX__ 127
+// NVPTX64:#define __INT_FAST8_TYPE__ signed char
+// NVPTX64:#define __INT_LEAST16_FMTd__ "hd"
+// NVPTX64:#define __INT_LEAST16_FMTi__ "hi"
+// NVPTX64:#define __INT_LEAST16_MAX__ 32767
+// NVPTX64:#define __INT_LEAST16_TYPE__ short
+// NVPTX64:#define __INT_LEAST32_FMTd__ "d"
+// NVPTX64:#define __INT_LEAST32_FMTi__ "i"
+// NVPTX64:#define __INT_LEAST32_MAX__ 2147483647
+// NVPTX64:#define __INT_LEAST32_TYPE__ int
+// NVPTX64:#define __INT_LEAST64_FMTd__ "ld"
+// NVPTX64:#define __INT_LEAST64_FMTi__ "li"
+// NVPTX64:#define __INT_LEAST64_MAX__ 9223372036854775807L
+// NVPTX64:#define __INT_LEAST64_TYPE__ long int
+// NVPTX64:#define __INT_LEAST8_FMTd__ "hhd"
+// NVPTX64:#define __INT_LEAST8_FMTi__ "hhi"
+// NVPTX64:#define __INT_LEAST8_MAX__ 127
+// NVPTX64:#define __INT_LEAST8_TYPE__ signed char
// NVPTX64:#define __INT_MAX__ 2147483647
// NVPTX64:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
// NVPTX64:#define __LDBL_DIG__ 15
@@ -1666,6 +3869,7 @@
// NVPTX64:#define __LDBL_MIN_10_EXP__ (-307)
// NVPTX64:#define __LDBL_MIN_EXP__ (-1021)
// NVPTX64:#define __LDBL_MIN__ 2.2250738585072014e-308L
+// NVPTX64:#define __LITTLE_ENDIAN__ 1
// NVPTX64:#define __LONG_LONG_MAX__ 9223372036854775807LL
// NVPTX64:#define __LONG_MAX__ 9223372036854775807L
// NVPTX64:#define __LP64__ 1
@@ -1677,6 +3881,7 @@
// NVPTX64:#define __PTX__ 1
// NVPTX64:#define __SCHAR_MAX__ 127
// NVPTX64:#define __SHRT_MAX__ 32767
+// NVPTX64:#define __SIG_ATOMIC_MAX__ 2147483647
// NVPTX64:#define __SIG_ATOMIC_WIDTH__ 32
// NVPTX64:#define __SIZEOF_DOUBLE__ 8
// NVPTX64:#define __SIZEOF_FLOAT__ 4
@@ -1693,7 +3898,41 @@
// NVPTX64:#define __SIZE_MAX__ 18446744073709551615UL
// NVPTX64:#define __SIZE_TYPE__ long long unsigned int
// NVPTX64:#define __SIZE_WIDTH__ 64
+// NVPTX64:#define __UINT16_C_SUFFIX__ {{$}}
+// NVPTX64:#define __UINT16_MAX__ 65535
+// NVPTX64:#define __UINT16_TYPE__ unsigned short
+// NVPTX64:#define __UINT32_C_SUFFIX__ U
+// NVPTX64:#define __UINT32_MAX__ 4294967295U
+// NVPTX64:#define __UINT32_TYPE__ unsigned int
+// NVPTX64:#define __UINT64_C_SUFFIX__ ULL
+// NVPTX64:#define __UINT64_MAX__ 18446744073709551615ULL
+// NVPTX64:#define __UINT64_TYPE__ long long unsigned int
+// NVPTX64:#define __UINT8_C_SUFFIX__ {{$}}
+// NVPTX64:#define __UINT8_MAX__ 255
+// NVPTX64:#define __UINT8_TYPE__ unsigned char
+// NVPTX64:#define __UINTMAX_C_SUFFIX__ ULL
+// NVPTX64:#define __UINTMAX_MAX__ 18446744073709551615ULL
// NVPTX64:#define __UINTMAX_TYPE__ long long unsigned int
+// NVPTX64:#define __UINTMAX_WIDTH__ 64
+// NVPTX64:#define __UINTPTR_MAX__ 18446744073709551615ULL
+// NVPTX64:#define __UINTPTR_TYPE__ long long unsigned int
+// NVPTX64:#define __UINTPTR_WIDTH__ 64
+// NVPTX64:#define __UINT_FAST16_MAX__ 65535
+// NVPTX64:#define __UINT_FAST16_TYPE__ unsigned short
+// NVPTX64:#define __UINT_FAST32_MAX__ 4294967295U
+// NVPTX64:#define __UINT_FAST32_TYPE__ unsigned int
+// NVPTX64:#define __UINT_FAST64_MAX__ 18446744073709551615UL
+// NVPTX64:#define __UINT_FAST64_TYPE__ long unsigned int
+// NVPTX64:#define __UINT_FAST8_MAX__ 255
+// NVPTX64:#define __UINT_FAST8_TYPE__ unsigned char
+// NVPTX64:#define __UINT_LEAST16_MAX__ 65535
+// NVPTX64:#define __UINT_LEAST16_TYPE__ unsigned short
+// NVPTX64:#define __UINT_LEAST32_MAX__ 4294967295U
+// NVPTX64:#define __UINT_LEAST32_TYPE__ unsigned int
+// NVPTX64:#define __UINT_LEAST64_MAX__ 18446744073709551615UL
+// NVPTX64:#define __UINT_LEAST64_TYPE__ long unsigned int
+// NVPTX64:#define __UINT_LEAST8_MAX__ 255
+// NVPTX64:#define __UINT_LEAST8_TYPE__ unsigned char
// NVPTX64:#define __USER_LABEL_PREFIX__ _
// NVPTX64:#define __WCHAR_MAX__ 2147483647
// NVPTX64:#define __WCHAR_TYPE__ int
@@ -1743,16 +3982,69 @@
// PPC603E:#define __FLT_MIN_EXP__ (-125)
// PPC603E:#define __FLT_MIN__ 1.17549435e-38F
// PPC603E:#define __FLT_RADIX__ 2
+// PPC603E:#define __INT16_C_SUFFIX__ {{$}}
+// PPC603E:#define __INT16_FMTd__ "hd"
+// PPC603E:#define __INT16_FMTi__ "hi"
+// PPC603E:#define __INT16_MAX__ 32767
// PPC603E:#define __INT16_TYPE__ short
+// PPC603E:#define __INT32_C_SUFFIX__ {{$}}
+// PPC603E:#define __INT32_FMTd__ "d"
+// PPC603E:#define __INT32_FMTi__ "i"
+// PPC603E:#define __INT32_MAX__ 2147483647
// PPC603E:#define __INT32_TYPE__ int
// PPC603E:#define __INT64_C_SUFFIX__ LL
+// PPC603E:#define __INT64_FMTd__ "lld"
+// PPC603E:#define __INT64_FMTi__ "lli"
+// PPC603E:#define __INT64_MAX__ 9223372036854775807LL
// PPC603E:#define __INT64_TYPE__ long long int
-// PPC603E:#define __INT8_TYPE__ char
+// PPC603E:#define __INT8_C_SUFFIX__ {{$}}
+// PPC603E:#define __INT8_FMTd__ "hhd"
+// PPC603E:#define __INT8_FMTi__ "hhi"
+// PPC603E:#define __INT8_MAX__ 127
+// PPC603E:#define __INT8_TYPE__ signed char
+// PPC603E:#define __INTMAX_C_SUFFIX__ LL
+// PPC603E:#define __INTMAX_FMTd__ "lld"
+// PPC603E:#define __INTMAX_FMTi__ "lli"
// PPC603E:#define __INTMAX_MAX__ 9223372036854775807LL
// PPC603E:#define __INTMAX_TYPE__ long long int
// PPC603E:#define __INTMAX_WIDTH__ 64
+// PPC603E:#define __INTPTR_FMTd__ "ld"
+// PPC603E:#define __INTPTR_FMTi__ "li"
+// PPC603E:#define __INTPTR_MAX__ 2147483647L
// PPC603E:#define __INTPTR_TYPE__ long int
// PPC603E:#define __INTPTR_WIDTH__ 32
+// PPC603E:#define __INT_FAST16_FMTd__ "hd"
+// PPC603E:#define __INT_FAST16_FMTi__ "hi"
+// PPC603E:#define __INT_FAST16_MAX__ 32767
+// PPC603E:#define __INT_FAST16_TYPE__ short
+// PPC603E:#define __INT_FAST32_FMTd__ "d"
+// PPC603E:#define __INT_FAST32_FMTi__ "i"
+// PPC603E:#define __INT_FAST32_MAX__ 2147483647
+// PPC603E:#define __INT_FAST32_TYPE__ int
+// PPC603E:#define __INT_FAST64_FMTd__ "lld"
+// PPC603E:#define __INT_FAST64_FMTi__ "lli"
+// PPC603E:#define __INT_FAST64_MAX__ 9223372036854775807LL
+// PPC603E:#define __INT_FAST64_TYPE__ long long int
+// PPC603E:#define __INT_FAST8_FMTd__ "hhd"
+// PPC603E:#define __INT_FAST8_FMTi__ "hhi"
+// PPC603E:#define __INT_FAST8_MAX__ 127
+// PPC603E:#define __INT_FAST8_TYPE__ signed char
+// PPC603E:#define __INT_LEAST16_FMTd__ "hd"
+// PPC603E:#define __INT_LEAST16_FMTi__ "hi"
+// PPC603E:#define __INT_LEAST16_MAX__ 32767
+// PPC603E:#define __INT_LEAST16_TYPE__ short
+// PPC603E:#define __INT_LEAST32_FMTd__ "d"
+// PPC603E:#define __INT_LEAST32_FMTi__ "i"
+// PPC603E:#define __INT_LEAST32_MAX__ 2147483647
+// PPC603E:#define __INT_LEAST32_TYPE__ int
+// PPC603E:#define __INT_LEAST64_FMTd__ "lld"
+// PPC603E:#define __INT_LEAST64_FMTi__ "lli"
+// PPC603E:#define __INT_LEAST64_MAX__ 9223372036854775807LL
+// PPC603E:#define __INT_LEAST64_TYPE__ long long int
+// PPC603E:#define __INT_LEAST8_FMTd__ "hhd"
+// PPC603E:#define __INT_LEAST8_FMTi__ "hhi"
+// PPC603E:#define __INT_LEAST8_MAX__ 127
+// PPC603E:#define __INT_LEAST8_TYPE__ signed char
// PPC603E:#define __INT_MAX__ 2147483647
// PPC603E:#define __LDBL_DENORM_MIN__ 4.94065645841246544176568792868221e-324L
// PPC603E:#define __LDBL_DIG__ 31
@@ -1780,6 +4072,7 @@
// PPC603E:#define __REGISTER_PREFIX__
// PPC603E:#define __SCHAR_MAX__ 127
// PPC603E:#define __SHRT_MAX__ 32767
+// PPC603E:#define __SIG_ATOMIC_MAX__ 2147483647
// PPC603E:#define __SIG_ATOMIC_WIDTH__ 32
// PPC603E:#define __SIZEOF_DOUBLE__ 8
// PPC603E:#define __SIZEOF_FLOAT__ 4
@@ -1796,7 +4089,41 @@
// PPC603E:#define __SIZE_MAX__ 4294967295U
// PPC603E:#define __SIZE_TYPE__ long unsigned int
// PPC603E:#define __SIZE_WIDTH__ 32
+// PPC603E:#define __UINT16_C_SUFFIX__ {{$}}
+// PPC603E:#define __UINT16_MAX__ 65535
+// PPC603E:#define __UINT16_TYPE__ unsigned short
+// PPC603E:#define __UINT32_C_SUFFIX__ U
+// PPC603E:#define __UINT32_MAX__ 4294967295U
+// PPC603E:#define __UINT32_TYPE__ unsigned int
+// PPC603E:#define __UINT64_C_SUFFIX__ ULL
+// PPC603E:#define __UINT64_MAX__ 18446744073709551615ULL
+// PPC603E:#define __UINT64_TYPE__ long long unsigned int
+// PPC603E:#define __UINT8_C_SUFFIX__ {{$}}
+// PPC603E:#define __UINT8_MAX__ 255
+// PPC603E:#define __UINT8_TYPE__ unsigned char
+// PPC603E:#define __UINTMAX_C_SUFFIX__ ULL
+// PPC603E:#define __UINTMAX_MAX__ 18446744073709551615ULL
// PPC603E:#define __UINTMAX_TYPE__ long long unsigned int
+// PPC603E:#define __UINTMAX_WIDTH__ 64
+// PPC603E:#define __UINTPTR_MAX__ 4294967295U
+// PPC603E:#define __UINTPTR_TYPE__ long unsigned int
+// PPC603E:#define __UINTPTR_WIDTH__ 32
+// PPC603E:#define __UINT_FAST16_MAX__ 65535
+// PPC603E:#define __UINT_FAST16_TYPE__ unsigned short
+// PPC603E:#define __UINT_FAST32_MAX__ 4294967295U
+// PPC603E:#define __UINT_FAST32_TYPE__ unsigned int
+// PPC603E:#define __UINT_FAST64_MAX__ 18446744073709551615ULL
+// PPC603E:#define __UINT_FAST64_TYPE__ long long unsigned int
+// PPC603E:#define __UINT_FAST8_MAX__ 255
+// PPC603E:#define __UINT_FAST8_TYPE__ unsigned char
+// PPC603E:#define __UINT_LEAST16_MAX__ 65535
+// PPC603E:#define __UINT_LEAST16_TYPE__ unsigned short
+// PPC603E:#define __UINT_LEAST32_MAX__ 4294967295U
+// PPC603E:#define __UINT_LEAST32_TYPE__ unsigned int
+// PPC603E:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL
+// PPC603E:#define __UINT_LEAST64_TYPE__ long long unsigned int
+// PPC603E:#define __UINT_LEAST8_MAX__ 255
+// PPC603E:#define __UINT_LEAST8_TYPE__ unsigned char
// PPC603E:#define __USER_LABEL_PREFIX__ _
// PPC603E:#define __WCHAR_MAX__ 2147483647
// PPC603E:#define __WCHAR_TYPE__ int
@@ -1853,16 +4180,69 @@
// PPC64:#define __FLT_MIN_EXP__ (-125)
// PPC64:#define __FLT_MIN__ 1.17549435e-38F
// PPC64:#define __FLT_RADIX__ 2
+// PPC64:#define __INT16_C_SUFFIX__ {{$}}
+// PPC64:#define __INT16_FMTd__ "hd"
+// PPC64:#define __INT16_FMTi__ "hi"
+// PPC64:#define __INT16_MAX__ 32767
// PPC64:#define __INT16_TYPE__ short
+// PPC64:#define __INT32_C_SUFFIX__ {{$}}
+// PPC64:#define __INT32_FMTd__ "d"
+// PPC64:#define __INT32_FMTi__ "i"
+// PPC64:#define __INT32_MAX__ 2147483647
// PPC64:#define __INT32_TYPE__ int
// PPC64:#define __INT64_C_SUFFIX__ L
+// PPC64:#define __INT64_FMTd__ "ld"
+// PPC64:#define __INT64_FMTi__ "li"
+// PPC64:#define __INT64_MAX__ 9223372036854775807L
// PPC64:#define __INT64_TYPE__ long int
-// PPC64:#define __INT8_TYPE__ char
+// PPC64:#define __INT8_C_SUFFIX__ {{$}}
+// PPC64:#define __INT8_FMTd__ "hhd"
+// PPC64:#define __INT8_FMTi__ "hhi"
+// PPC64:#define __INT8_MAX__ 127
+// PPC64:#define __INT8_TYPE__ signed char
+// PPC64:#define __INTMAX_C_SUFFIX__ L
+// PPC64:#define __INTMAX_FMTd__ "ld"
+// PPC64:#define __INTMAX_FMTi__ "li"
// PPC64:#define __INTMAX_MAX__ 9223372036854775807L
// PPC64:#define __INTMAX_TYPE__ long int
// PPC64:#define __INTMAX_WIDTH__ 64
+// PPC64:#define __INTPTR_FMTd__ "ld"
+// PPC64:#define __INTPTR_FMTi__ "li"
+// PPC64:#define __INTPTR_MAX__ 9223372036854775807L
// PPC64:#define __INTPTR_TYPE__ long int
// PPC64:#define __INTPTR_WIDTH__ 64
+// PPC64:#define __INT_FAST16_FMTd__ "hd"
+// PPC64:#define __INT_FAST16_FMTi__ "hi"
+// PPC64:#define __INT_FAST16_MAX__ 32767
+// PPC64:#define __INT_FAST16_TYPE__ short
+// PPC64:#define __INT_FAST32_FMTd__ "d"
+// PPC64:#define __INT_FAST32_FMTi__ "i"
+// PPC64:#define __INT_FAST32_MAX__ 2147483647
+// PPC64:#define __INT_FAST32_TYPE__ int
+// PPC64:#define __INT_FAST64_FMTd__ "ld"
+// PPC64:#define __INT_FAST64_FMTi__ "li"
+// PPC64:#define __INT_FAST64_MAX__ 9223372036854775807L
+// PPC64:#define __INT_FAST64_TYPE__ long int
+// PPC64:#define __INT_FAST8_FMTd__ "hhd"
+// PPC64:#define __INT_FAST8_FMTi__ "hhi"
+// PPC64:#define __INT_FAST8_MAX__ 127
+// PPC64:#define __INT_FAST8_TYPE__ signed char
+// PPC64:#define __INT_LEAST16_FMTd__ "hd"
+// PPC64:#define __INT_LEAST16_FMTi__ "hi"
+// PPC64:#define __INT_LEAST16_MAX__ 32767
+// PPC64:#define __INT_LEAST16_TYPE__ short
+// PPC64:#define __INT_LEAST32_FMTd__ "d"
+// PPC64:#define __INT_LEAST32_FMTi__ "i"
+// PPC64:#define __INT_LEAST32_MAX__ 2147483647
+// PPC64:#define __INT_LEAST32_TYPE__ int
+// PPC64:#define __INT_LEAST64_FMTd__ "ld"
+// PPC64:#define __INT_LEAST64_FMTi__ "li"
+// PPC64:#define __INT_LEAST64_MAX__ 9223372036854775807L
+// PPC64:#define __INT_LEAST64_TYPE__ long int
+// PPC64:#define __INT_LEAST8_FMTd__ "hhd"
+// PPC64:#define __INT_LEAST8_FMTi__ "hhi"
+// PPC64:#define __INT_LEAST8_MAX__ 127
+// PPC64:#define __INT_LEAST8_TYPE__ signed char
// PPC64:#define __INT_MAX__ 2147483647
// PPC64:#define __LDBL_DENORM_MIN__ 4.94065645841246544176568792868221e-324L
// PPC64:#define __LDBL_DIG__ 31
@@ -1891,6 +4271,7 @@
// PPC64:#define __REGISTER_PREFIX__
// PPC64:#define __SCHAR_MAX__ 127
// PPC64:#define __SHRT_MAX__ 32767
+// PPC64:#define __SIG_ATOMIC_MAX__ 2147483647
// PPC64:#define __SIG_ATOMIC_WIDTH__ 32
// PPC64:#define __SIZEOF_DOUBLE__ 8
// PPC64:#define __SIZEOF_FLOAT__ 4
@@ -1907,7 +4288,41 @@
// PPC64:#define __SIZE_MAX__ 18446744073709551615UL
// PPC64:#define __SIZE_TYPE__ long unsigned int
// PPC64:#define __SIZE_WIDTH__ 64
+// PPC64:#define __UINT16_C_SUFFIX__ {{$}}
+// PPC64:#define __UINT16_MAX__ 65535
+// PPC64:#define __UINT16_TYPE__ unsigned short
+// PPC64:#define __UINT32_C_SUFFIX__ U
+// PPC64:#define __UINT32_MAX__ 4294967295U
+// PPC64:#define __UINT32_TYPE__ unsigned int
+// PPC64:#define __UINT64_C_SUFFIX__ UL
+// PPC64:#define __UINT64_MAX__ 18446744073709551615UL
+// PPC64:#define __UINT64_TYPE__ long unsigned int
+// PPC64:#define __UINT8_C_SUFFIX__ {{$}}
+// PPC64:#define __UINT8_MAX__ 255
+// PPC64:#define __UINT8_TYPE__ unsigned char
+// PPC64:#define __UINTMAX_C_SUFFIX__ UL
+// PPC64:#define __UINTMAX_MAX__ 18446744073709551615UL
// PPC64:#define __UINTMAX_TYPE__ long unsigned int
+// PPC64:#define __UINTMAX_WIDTH__ 64
+// PPC64:#define __UINTPTR_MAX__ 18446744073709551615UL
+// PPC64:#define __UINTPTR_TYPE__ long unsigned int
+// PPC64:#define __UINTPTR_WIDTH__ 64
+// PPC64:#define __UINT_FAST16_MAX__ 65535
+// PPC64:#define __UINT_FAST16_TYPE__ unsigned short
+// PPC64:#define __UINT_FAST32_MAX__ 4294967295U
+// PPC64:#define __UINT_FAST32_TYPE__ unsigned int
+// PPC64:#define __UINT_FAST64_MAX__ 18446744073709551615UL
+// PPC64:#define __UINT_FAST64_TYPE__ long unsigned int
+// PPC64:#define __UINT_FAST8_MAX__ 255
+// PPC64:#define __UINT_FAST8_TYPE__ unsigned char
+// PPC64:#define __UINT_LEAST16_MAX__ 65535
+// PPC64:#define __UINT_LEAST16_TYPE__ unsigned short
+// PPC64:#define __UINT_LEAST32_MAX__ 4294967295U
+// PPC64:#define __UINT_LEAST32_TYPE__ unsigned int
+// PPC64:#define __UINT_LEAST64_MAX__ 18446744073709551615UL
+// PPC64:#define __UINT_LEAST64_TYPE__ long unsigned int
+// PPC64:#define __UINT_LEAST8_MAX__ 255
+// PPC64:#define __UINT_LEAST8_TYPE__ unsigned char
// PPC64:#define __USER_LABEL_PREFIX__ _
// PPC64:#define __WCHAR_MAX__ 2147483647
// PPC64:#define __WCHAR_TYPE__ int
@@ -1929,6 +4344,7 @@
// PPC64LE:#define _ARCH_PWR6 1
// PPC64LE:#define _ARCH_PWR6X 1
// PPC64LE:#define _ARCH_PWR7 1
+// PPC64LE:#define _CALL_ELF 2
// PPC64LE:#define _LITTLE_ENDIAN 1
// PPC64LE:#define _LP64 1
// PPC64LE:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
@@ -1965,16 +4381,69 @@
// PPC64LE:#define __FLT_MIN_EXP__ (-125)
// PPC64LE:#define __FLT_MIN__ 1.17549435e-38F
// PPC64LE:#define __FLT_RADIX__ 2
+// PPC64LE:#define __INT16_C_SUFFIX__ {{$}}
+// PPC64LE:#define __INT16_FMTd__ "hd"
+// PPC64LE:#define __INT16_FMTi__ "hi"
+// PPC64LE:#define __INT16_MAX__ 32767
// PPC64LE:#define __INT16_TYPE__ short
+// PPC64LE:#define __INT32_C_SUFFIX__ {{$}}
+// PPC64LE:#define __INT32_FMTd__ "d"
+// PPC64LE:#define __INT32_FMTi__ "i"
+// PPC64LE:#define __INT32_MAX__ 2147483647
// PPC64LE:#define __INT32_TYPE__ int
// PPC64LE:#define __INT64_C_SUFFIX__ L
+// PPC64LE:#define __INT64_FMTd__ "ld"
+// PPC64LE:#define __INT64_FMTi__ "li"
+// PPC64LE:#define __INT64_MAX__ 9223372036854775807L
// PPC64LE:#define __INT64_TYPE__ long int
-// PPC64LE:#define __INT8_TYPE__ char
+// PPC64LE:#define __INT8_C_SUFFIX__ {{$}}
+// PPC64LE:#define __INT8_FMTd__ "hhd"
+// PPC64LE:#define __INT8_FMTi__ "hhi"
+// PPC64LE:#define __INT8_MAX__ 127
+// PPC64LE:#define __INT8_TYPE__ signed char
+// PPC64LE:#define __INTMAX_C_SUFFIX__ L
+// PPC64LE:#define __INTMAX_FMTd__ "ld"
+// PPC64LE:#define __INTMAX_FMTi__ "li"
// PPC64LE:#define __INTMAX_MAX__ 9223372036854775807L
// PPC64LE:#define __INTMAX_TYPE__ long int
// PPC64LE:#define __INTMAX_WIDTH__ 64
+// PPC64LE:#define __INTPTR_FMTd__ "ld"
+// PPC64LE:#define __INTPTR_FMTi__ "li"
+// PPC64LE:#define __INTPTR_MAX__ 9223372036854775807L
// PPC64LE:#define __INTPTR_TYPE__ long int
// PPC64LE:#define __INTPTR_WIDTH__ 64
+// PPC64LE:#define __INT_FAST16_FMTd__ "hd"
+// PPC64LE:#define __INT_FAST16_FMTi__ "hi"
+// PPC64LE:#define __INT_FAST16_MAX__ 32767
+// PPC64LE:#define __INT_FAST16_TYPE__ short
+// PPC64LE:#define __INT_FAST32_FMTd__ "d"
+// PPC64LE:#define __INT_FAST32_FMTi__ "i"
+// PPC64LE:#define __INT_FAST32_MAX__ 2147483647
+// PPC64LE:#define __INT_FAST32_TYPE__ int
+// PPC64LE:#define __INT_FAST64_FMTd__ "ld"
+// PPC64LE:#define __INT_FAST64_FMTi__ "li"
+// PPC64LE:#define __INT_FAST64_MAX__ 9223372036854775807L
+// PPC64LE:#define __INT_FAST64_TYPE__ long int
+// PPC64LE:#define __INT_FAST8_FMTd__ "hhd"
+// PPC64LE:#define __INT_FAST8_FMTi__ "hhi"
+// PPC64LE:#define __INT_FAST8_MAX__ 127
+// PPC64LE:#define __INT_FAST8_TYPE__ signed char
+// PPC64LE:#define __INT_LEAST16_FMTd__ "hd"
+// PPC64LE:#define __INT_LEAST16_FMTi__ "hi"
+// PPC64LE:#define __INT_LEAST16_MAX__ 32767
+// PPC64LE:#define __INT_LEAST16_TYPE__ short
+// PPC64LE:#define __INT_LEAST32_FMTd__ "d"
+// PPC64LE:#define __INT_LEAST32_FMTi__ "i"
+// PPC64LE:#define __INT_LEAST32_MAX__ 2147483647
+// PPC64LE:#define __INT_LEAST32_TYPE__ int
+// PPC64LE:#define __INT_LEAST64_FMTd__ "ld"
+// PPC64LE:#define __INT_LEAST64_FMTi__ "li"
+// PPC64LE:#define __INT_LEAST64_MAX__ 9223372036854775807L
+// PPC64LE:#define __INT_LEAST64_TYPE__ long int
+// PPC64LE:#define __INT_LEAST8_FMTd__ "hhd"
+// PPC64LE:#define __INT_LEAST8_FMTi__ "hhi"
+// PPC64LE:#define __INT_LEAST8_MAX__ 127
+// PPC64LE:#define __INT_LEAST8_TYPE__ signed char
// PPC64LE:#define __INT_MAX__ 2147483647
// PPC64LE:#define __LDBL_DENORM_MIN__ 4.94065645841246544176568792868221e-324L
// PPC64LE:#define __LDBL_DIG__ 31
@@ -2004,6 +4473,7 @@
// PPC64LE:#define __REGISTER_PREFIX__
// PPC64LE:#define __SCHAR_MAX__ 127
// PPC64LE:#define __SHRT_MAX__ 32767
+// PPC64LE:#define __SIG_ATOMIC_MAX__ 2147483647
// PPC64LE:#define __SIG_ATOMIC_WIDTH__ 32
// PPC64LE:#define __SIZEOF_DOUBLE__ 8
// PPC64LE:#define __SIZEOF_FLOAT__ 4
@@ -2020,7 +4490,41 @@
// PPC64LE:#define __SIZE_MAX__ 18446744073709551615UL
// PPC64LE:#define __SIZE_TYPE__ long unsigned int
// PPC64LE:#define __SIZE_WIDTH__ 64
+// PPC64LE:#define __UINT16_C_SUFFIX__ {{$}}
+// PPC64LE:#define __UINT16_MAX__ 65535
+// PPC64LE:#define __UINT16_TYPE__ unsigned short
+// PPC64LE:#define __UINT32_C_SUFFIX__ U
+// PPC64LE:#define __UINT32_MAX__ 4294967295U
+// PPC64LE:#define __UINT32_TYPE__ unsigned int
+// PPC64LE:#define __UINT64_C_SUFFIX__ UL
+// PPC64LE:#define __UINT64_MAX__ 18446744073709551615UL
+// PPC64LE:#define __UINT64_TYPE__ long unsigned int
+// PPC64LE:#define __UINT8_C_SUFFIX__ {{$}}
+// PPC64LE:#define __UINT8_MAX__ 255
+// PPC64LE:#define __UINT8_TYPE__ unsigned char
+// PPC64LE:#define __UINTMAX_C_SUFFIX__ UL
+// PPC64LE:#define __UINTMAX_MAX__ 18446744073709551615UL
// PPC64LE:#define __UINTMAX_TYPE__ long unsigned int
+// PPC64LE:#define __UINTMAX_WIDTH__ 64
+// PPC64LE:#define __UINTPTR_MAX__ 18446744073709551615UL
+// PPC64LE:#define __UINTPTR_TYPE__ long unsigned int
+// PPC64LE:#define __UINTPTR_WIDTH__ 64
+// PPC64LE:#define __UINT_FAST16_MAX__ 65535
+// PPC64LE:#define __UINT_FAST16_TYPE__ unsigned short
+// PPC64LE:#define __UINT_FAST32_MAX__ 4294967295U
+// PPC64LE:#define __UINT_FAST32_TYPE__ unsigned int
+// PPC64LE:#define __UINT_FAST64_MAX__ 18446744073709551615UL
+// PPC64LE:#define __UINT_FAST64_TYPE__ long unsigned int
+// PPC64LE:#define __UINT_FAST8_MAX__ 255
+// PPC64LE:#define __UINT_FAST8_TYPE__ unsigned char
+// PPC64LE:#define __UINT_LEAST16_MAX__ 65535
+// PPC64LE:#define __UINT_LEAST16_TYPE__ unsigned short
+// PPC64LE:#define __UINT_LEAST32_MAX__ 4294967295U
+// PPC64LE:#define __UINT_LEAST32_TYPE__ unsigned int
+// PPC64LE:#define __UINT_LEAST64_MAX__ 18446744073709551615UL
+// PPC64LE:#define __UINT_LEAST64_TYPE__ long unsigned int
+// PPC64LE:#define __UINT_LEAST8_MAX__ 255
+// PPC64LE:#define __UINT_LEAST8_TYPE__ unsigned char
// PPC64LE:#define __USER_LABEL_PREFIX__ _
// PPC64LE:#define __WCHAR_MAX__ 2147483647
// PPC64LE:#define __WCHAR_TYPE__ int
@@ -2190,6 +4694,34 @@
// PPCPOWER7:#define _ARCH_PWR6X 1
// PPCPOWER7:#define _ARCH_PWR7 1
//
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc64-none-none -target-cpu pwr8 -fno-signed-char < /dev/null | FileCheck -check-prefix PPCPWR8 %s
+//
+// PPCPWR8:#define _ARCH_PPC 1
+// PPCPWR8:#define _ARCH_PPC64 1
+// PPCPWR8:#define _ARCH_PPCGR 1
+// PPCPWR8:#define _ARCH_PPCSQ 1
+// PPCPWR8:#define _ARCH_PWR4 1
+// PPCPWR8:#define _ARCH_PWR5 1
+// PPCPWR8:#define _ARCH_PWR5X 1
+// PPCPWR8:#define _ARCH_PWR6 1
+// PPCPWR8:#define _ARCH_PWR6X 1
+// PPCPWR8:#define _ARCH_PWR7 1
+// PPCPWR8:#define _ARCH_PWR8 1
+//
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc64-none-none -target-cpu power8 -fno-signed-char < /dev/null | FileCheck -check-prefix PPCPOWER8 %s
+//
+// PPCPOWER8:#define _ARCH_PPC 1
+// PPCPOWER8:#define _ARCH_PPC64 1
+// PPCPOWER8:#define _ARCH_PPCGR 1
+// PPCPOWER8:#define _ARCH_PPCSQ 1
+// PPCPOWER8:#define _ARCH_PWR4 1
+// PPCPOWER8:#define _ARCH_PWR5 1
+// PPCPOWER8:#define _ARCH_PWR5X 1
+// PPCPOWER8:#define _ARCH_PWR6 1
+// PPCPOWER8:#define _ARCH_PWR6X 1
+// PPCPOWER8:#define _ARCH_PWR7 1
+// PPCPOWER8:#define _ARCH_PWR8 1
+//
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc64-unknown-linux-gnu -fno-signed-char < /dev/null | FileCheck -check-prefix PPC64-LINUX %s
//
// PPC64-LINUX:#define _ARCH_PPC 1
@@ -2231,16 +4763,69 @@
// PPC64-LINUX:#define __FLT_MIN_EXP__ (-125)
// PPC64-LINUX:#define __FLT_MIN__ 1.17549435e-38F
// PPC64-LINUX:#define __FLT_RADIX__ 2
+// PPC64-LINUX:#define __INT16_C_SUFFIX__ {{$}}
+// PPC64-LINUX:#define __INT16_FMTd__ "hd"
+// PPC64-LINUX:#define __INT16_FMTi__ "hi"
+// PPC64-LINUX:#define __INT16_MAX__ 32767
// PPC64-LINUX:#define __INT16_TYPE__ short
+// PPC64-LINUX:#define __INT32_C_SUFFIX__ {{$}}
+// PPC64-LINUX:#define __INT32_FMTd__ "d"
+// PPC64-LINUX:#define __INT32_FMTi__ "i"
+// PPC64-LINUX:#define __INT32_MAX__ 2147483647
// PPC64-LINUX:#define __INT32_TYPE__ int
// PPC64-LINUX:#define __INT64_C_SUFFIX__ L
+// PPC64-LINUX:#define __INT64_FMTd__ "ld"
+// PPC64-LINUX:#define __INT64_FMTi__ "li"
+// PPC64-LINUX:#define __INT64_MAX__ 9223372036854775807L
// PPC64-LINUX:#define __INT64_TYPE__ long int
-// PPC64-LINUX:#define __INT8_TYPE__ char
+// PPC64-LINUX:#define __INT8_C_SUFFIX__ {{$}}
+// PPC64-LINUX:#define __INT8_FMTd__ "hhd"
+// PPC64-LINUX:#define __INT8_FMTi__ "hhi"
+// PPC64-LINUX:#define __INT8_MAX__ 127
+// PPC64-LINUX:#define __INT8_TYPE__ signed char
+// PPC64-LINUX:#define __INTMAX_C_SUFFIX__ L
+// PPC64-LINUX:#define __INTMAX_FMTd__ "ld"
+// PPC64-LINUX:#define __INTMAX_FMTi__ "li"
// PPC64-LINUX:#define __INTMAX_MAX__ 9223372036854775807L
// PPC64-LINUX:#define __INTMAX_TYPE__ long int
// PPC64-LINUX:#define __INTMAX_WIDTH__ 64
+// PPC64-LINUX:#define __INTPTR_FMTd__ "ld"
+// PPC64-LINUX:#define __INTPTR_FMTi__ "li"
+// PPC64-LINUX:#define __INTPTR_MAX__ 9223372036854775807L
// PPC64-LINUX:#define __INTPTR_TYPE__ long int
// PPC64-LINUX:#define __INTPTR_WIDTH__ 64
+// PPC64-LINUX:#define __INT_FAST16_FMTd__ "hd"
+// PPC64-LINUX:#define __INT_FAST16_FMTi__ "hi"
+// PPC64-LINUX:#define __INT_FAST16_MAX__ 32767
+// PPC64-LINUX:#define __INT_FAST16_TYPE__ short
+// PPC64-LINUX:#define __INT_FAST32_FMTd__ "d"
+// PPC64-LINUX:#define __INT_FAST32_FMTi__ "i"
+// PPC64-LINUX:#define __INT_FAST32_MAX__ 2147483647
+// PPC64-LINUX:#define __INT_FAST32_TYPE__ int
+// PPC64-LINUX:#define __INT_FAST64_FMTd__ "ld"
+// PPC64-LINUX:#define __INT_FAST64_FMTi__ "li"
+// PPC64-LINUX:#define __INT_FAST64_MAX__ 9223372036854775807L
+// PPC64-LINUX:#define __INT_FAST64_TYPE__ long int
+// PPC64-LINUX:#define __INT_FAST8_FMTd__ "hhd"
+// PPC64-LINUX:#define __INT_FAST8_FMTi__ "hhi"
+// PPC64-LINUX:#define __INT_FAST8_MAX__ 127
+// PPC64-LINUX:#define __INT_FAST8_TYPE__ signed char
+// PPC64-LINUX:#define __INT_LEAST16_FMTd__ "hd"
+// PPC64-LINUX:#define __INT_LEAST16_FMTi__ "hi"
+// PPC64-LINUX:#define __INT_LEAST16_MAX__ 32767
+// PPC64-LINUX:#define __INT_LEAST16_TYPE__ short
+// PPC64-LINUX:#define __INT_LEAST32_FMTd__ "d"
+// PPC64-LINUX:#define __INT_LEAST32_FMTi__ "i"
+// PPC64-LINUX:#define __INT_LEAST32_MAX__ 2147483647
+// PPC64-LINUX:#define __INT_LEAST32_TYPE__ int
+// PPC64-LINUX:#define __INT_LEAST64_FMTd__ "ld"
+// PPC64-LINUX:#define __INT_LEAST64_FMTi__ "li"
+// PPC64-LINUX:#define __INT_LEAST64_MAX__ 9223372036854775807L
+// PPC64-LINUX:#define __INT_LEAST64_TYPE__ long int
+// PPC64-LINUX:#define __INT_LEAST8_FMTd__ "hhd"
+// PPC64-LINUX:#define __INT_LEAST8_FMTi__ "hhi"
+// PPC64-LINUX:#define __INT_LEAST8_MAX__ 127
+// PPC64-LINUX:#define __INT_LEAST8_TYPE__ signed char
// PPC64-LINUX:#define __INT_MAX__ 2147483647
// PPC64-LINUX:#define __LDBL_DENORM_MIN__ 4.94065645841246544176568792868221e-324L
// PPC64-LINUX:#define __LDBL_DIG__ 31
@@ -2269,6 +4854,7 @@
// PPC64-LINUX:#define __REGISTER_PREFIX__
// PPC64-LINUX:#define __SCHAR_MAX__ 127
// PPC64-LINUX:#define __SHRT_MAX__ 32767
+// PPC64-LINUX:#define __SIG_ATOMIC_MAX__ 2147483647
// PPC64-LINUX:#define __SIG_ATOMIC_WIDTH__ 32
// PPC64-LINUX:#define __SIZEOF_DOUBLE__ 8
// PPC64-LINUX:#define __SIZEOF_FLOAT__ 4
@@ -2285,7 +4871,41 @@
// PPC64-LINUX:#define __SIZE_MAX__ 18446744073709551615UL
// PPC64-LINUX:#define __SIZE_TYPE__ long unsigned int
// PPC64-LINUX:#define __SIZE_WIDTH__ 64
+// PPC64-LINUX:#define __UINT16_C_SUFFIX__ {{$}}
+// PPC64-LINUX:#define __UINT16_MAX__ 65535
+// PPC64-LINUX:#define __UINT16_TYPE__ unsigned short
+// PPC64-LINUX:#define __UINT32_C_SUFFIX__ U
+// PPC64-LINUX:#define __UINT32_MAX__ 4294967295U
+// PPC64-LINUX:#define __UINT32_TYPE__ unsigned int
+// PPC64-LINUX:#define __UINT64_C_SUFFIX__ UL
+// PPC64-LINUX:#define __UINT64_MAX__ 18446744073709551615UL
+// PPC64-LINUX:#define __UINT64_TYPE__ long unsigned int
+// PPC64-LINUX:#define __UINT8_C_SUFFIX__ {{$}}
+// PPC64-LINUX:#define __UINT8_MAX__ 255
+// PPC64-LINUX:#define __UINT8_TYPE__ unsigned char
+// PPC64-LINUX:#define __UINTMAX_C_SUFFIX__ UL
+// PPC64-LINUX:#define __UINTMAX_MAX__ 18446744073709551615UL
// PPC64-LINUX:#define __UINTMAX_TYPE__ long unsigned int
+// PPC64-LINUX:#define __UINTMAX_WIDTH__ 64
+// PPC64-LINUX:#define __UINTPTR_MAX__ 18446744073709551615UL
+// PPC64-LINUX:#define __UINTPTR_TYPE__ long unsigned int
+// PPC64-LINUX:#define __UINTPTR_WIDTH__ 64
+// PPC64-LINUX:#define __UINT_FAST16_MAX__ 65535
+// PPC64-LINUX:#define __UINT_FAST16_TYPE__ unsigned short
+// PPC64-LINUX:#define __UINT_FAST32_MAX__ 4294967295U
+// PPC64-LINUX:#define __UINT_FAST32_TYPE__ unsigned int
+// PPC64-LINUX:#define __UINT_FAST64_MAX__ 18446744073709551615UL
+// PPC64-LINUX:#define __UINT_FAST64_TYPE__ long unsigned int
+// PPC64-LINUX:#define __UINT_FAST8_MAX__ 255
+// PPC64-LINUX:#define __UINT_FAST8_TYPE__ unsigned char
+// PPC64-LINUX:#define __UINT_LEAST16_MAX__ 65535
+// PPC64-LINUX:#define __UINT_LEAST16_TYPE__ unsigned short
+// PPC64-LINUX:#define __UINT_LEAST32_MAX__ 4294967295U
+// PPC64-LINUX:#define __UINT_LEAST32_TYPE__ unsigned int
+// PPC64-LINUX:#define __UINT_LEAST64_MAX__ 18446744073709551615UL
+// PPC64-LINUX:#define __UINT_LEAST64_TYPE__ long unsigned int
+// PPC64-LINUX:#define __UINT_LEAST8_MAX__ 255
+// PPC64-LINUX:#define __UINT_LEAST8_TYPE__ unsigned char
// PPC64-LINUX:#define __USER_LABEL_PREFIX__
// PPC64-LINUX:#define __WCHAR_MAX__ 2147483647
// PPC64-LINUX:#define __WCHAR_TYPE__ int
@@ -2338,16 +4958,69 @@
// PPC:#define __FLT_MIN_EXP__ (-125)
// PPC:#define __FLT_MIN__ 1.17549435e-38F
// PPC:#define __FLT_RADIX__ 2
+// PPC:#define __INT16_C_SUFFIX__ {{$}}
+// PPC:#define __INT16_FMTd__ "hd"
+// PPC:#define __INT16_FMTi__ "hi"
+// PPC:#define __INT16_MAX__ 32767
// PPC:#define __INT16_TYPE__ short
+// PPC:#define __INT32_C_SUFFIX__ {{$}}
+// PPC:#define __INT32_FMTd__ "d"
+// PPC:#define __INT32_FMTi__ "i"
+// PPC:#define __INT32_MAX__ 2147483647
// PPC:#define __INT32_TYPE__ int
// PPC:#define __INT64_C_SUFFIX__ LL
+// PPC:#define __INT64_FMTd__ "lld"
+// PPC:#define __INT64_FMTi__ "lli"
+// PPC:#define __INT64_MAX__ 9223372036854775807LL
// PPC:#define __INT64_TYPE__ long long int
-// PPC:#define __INT8_TYPE__ char
+// PPC:#define __INT8_C_SUFFIX__ {{$}}
+// PPC:#define __INT8_FMTd__ "hhd"
+// PPC:#define __INT8_FMTi__ "hhi"
+// PPC:#define __INT8_MAX__ 127
+// PPC:#define __INT8_TYPE__ signed char
+// PPC:#define __INTMAX_C_SUFFIX__ LL
+// PPC:#define __INTMAX_FMTd__ "lld"
+// PPC:#define __INTMAX_FMTi__ "lli"
// PPC:#define __INTMAX_MAX__ 9223372036854775807LL
// PPC:#define __INTMAX_TYPE__ long long int
// PPC:#define __INTMAX_WIDTH__ 64
+// PPC:#define __INTPTR_FMTd__ "ld"
+// PPC:#define __INTPTR_FMTi__ "li"
+// PPC:#define __INTPTR_MAX__ 2147483647L
// PPC:#define __INTPTR_TYPE__ long int
// PPC:#define __INTPTR_WIDTH__ 32
+// PPC:#define __INT_FAST16_FMTd__ "hd"
+// PPC:#define __INT_FAST16_FMTi__ "hi"
+// PPC:#define __INT_FAST16_MAX__ 32767
+// PPC:#define __INT_FAST16_TYPE__ short
+// PPC:#define __INT_FAST32_FMTd__ "d"
+// PPC:#define __INT_FAST32_FMTi__ "i"
+// PPC:#define __INT_FAST32_MAX__ 2147483647
+// PPC:#define __INT_FAST32_TYPE__ int
+// PPC:#define __INT_FAST64_FMTd__ "lld"
+// PPC:#define __INT_FAST64_FMTi__ "lli"
+// PPC:#define __INT_FAST64_MAX__ 9223372036854775807LL
+// PPC:#define __INT_FAST64_TYPE__ long long int
+// PPC:#define __INT_FAST8_FMTd__ "hhd"
+// PPC:#define __INT_FAST8_FMTi__ "hhi"
+// PPC:#define __INT_FAST8_MAX__ 127
+// PPC:#define __INT_FAST8_TYPE__ signed char
+// PPC:#define __INT_LEAST16_FMTd__ "hd"
+// PPC:#define __INT_LEAST16_FMTi__ "hi"
+// PPC:#define __INT_LEAST16_MAX__ 32767
+// PPC:#define __INT_LEAST16_TYPE__ short
+// PPC:#define __INT_LEAST32_FMTd__ "d"
+// PPC:#define __INT_LEAST32_FMTi__ "i"
+// PPC:#define __INT_LEAST32_MAX__ 2147483647
+// PPC:#define __INT_LEAST32_TYPE__ int
+// PPC:#define __INT_LEAST64_FMTd__ "lld"
+// PPC:#define __INT_LEAST64_FMTi__ "lli"
+// PPC:#define __INT_LEAST64_MAX__ 9223372036854775807LL
+// PPC:#define __INT_LEAST64_TYPE__ long long int
+// PPC:#define __INT_LEAST8_FMTd__ "hhd"
+// PPC:#define __INT_LEAST8_FMTi__ "hhi"
+// PPC:#define __INT_LEAST8_MAX__ 127
+// PPC:#define __INT_LEAST8_TYPE__ signed char
// PPC:#define __INT_MAX__ 2147483647
// PPC:#define __LDBL_DENORM_MIN__ 4.94065645841246544176568792868221e-324L
// PPC:#define __LDBL_DIG__ 31
@@ -2375,6 +5048,7 @@
// PPC:#define __REGISTER_PREFIX__
// PPC:#define __SCHAR_MAX__ 127
// PPC:#define __SHRT_MAX__ 32767
+// PPC:#define __SIG_ATOMIC_MAX__ 2147483647
// PPC:#define __SIG_ATOMIC_WIDTH__ 32
// PPC:#define __SIZEOF_DOUBLE__ 8
// PPC:#define __SIZEOF_FLOAT__ 4
@@ -2391,7 +5065,41 @@
// PPC:#define __SIZE_MAX__ 4294967295U
// PPC:#define __SIZE_TYPE__ long unsigned int
// PPC:#define __SIZE_WIDTH__ 32
+// PPC:#define __UINT16_C_SUFFIX__ {{$}}
+// PPC:#define __UINT16_MAX__ 65535
+// PPC:#define __UINT16_TYPE__ unsigned short
+// PPC:#define __UINT32_C_SUFFIX__ U
+// PPC:#define __UINT32_MAX__ 4294967295U
+// PPC:#define __UINT32_TYPE__ unsigned int
+// PPC:#define __UINT64_C_SUFFIX__ ULL
+// PPC:#define __UINT64_MAX__ 18446744073709551615ULL
+// PPC:#define __UINT64_TYPE__ long long unsigned int
+// PPC:#define __UINT8_C_SUFFIX__ {{$}}
+// PPC:#define __UINT8_MAX__ 255
+// PPC:#define __UINT8_TYPE__ unsigned char
+// PPC:#define __UINTMAX_C_SUFFIX__ ULL
+// PPC:#define __UINTMAX_MAX__ 18446744073709551615ULL
// PPC:#define __UINTMAX_TYPE__ long long unsigned int
+// PPC:#define __UINTMAX_WIDTH__ 64
+// PPC:#define __UINTPTR_MAX__ 4294967295U
+// PPC:#define __UINTPTR_TYPE__ long unsigned int
+// PPC:#define __UINTPTR_WIDTH__ 32
+// PPC:#define __UINT_FAST16_MAX__ 65535
+// PPC:#define __UINT_FAST16_TYPE__ unsigned short
+// PPC:#define __UINT_FAST32_MAX__ 4294967295U
+// PPC:#define __UINT_FAST32_TYPE__ unsigned int
+// PPC:#define __UINT_FAST64_MAX__ 18446744073709551615ULL
+// PPC:#define __UINT_FAST64_TYPE__ long long unsigned int
+// PPC:#define __UINT_FAST8_MAX__ 255
+// PPC:#define __UINT_FAST8_TYPE__ unsigned char
+// PPC:#define __UINT_LEAST16_MAX__ 65535
+// PPC:#define __UINT_LEAST16_TYPE__ unsigned short
+// PPC:#define __UINT_LEAST32_MAX__ 4294967295U
+// PPC:#define __UINT_LEAST32_TYPE__ unsigned int
+// PPC:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL
+// PPC:#define __UINT_LEAST64_TYPE__ long long unsigned int
+// PPC:#define __UINT_LEAST8_MAX__ 255
+// PPC:#define __UINT_LEAST8_TYPE__ unsigned char
// PPC:#define __USER_LABEL_PREFIX__ _
// PPC:#define __WCHAR_MAX__ 2147483647
// PPC:#define __WCHAR_TYPE__ int
@@ -2440,16 +5148,69 @@
// PPC-LINUX:#define __FLT_MIN_EXP__ (-125)
// PPC-LINUX:#define __FLT_MIN__ 1.17549435e-38F
// PPC-LINUX:#define __FLT_RADIX__ 2
+// PPC-LINUX:#define __INT16_C_SUFFIX__ {{$}}
+// PPC-LINUX:#define __INT16_FMTd__ "hd"
+// PPC-LINUX:#define __INT16_FMTi__ "hi"
+// PPC-LINUX:#define __INT16_MAX__ 32767
// PPC-LINUX:#define __INT16_TYPE__ short
+// PPC-LINUX:#define __INT32_C_SUFFIX__ {{$}}
+// PPC-LINUX:#define __INT32_FMTd__ "d"
+// PPC-LINUX:#define __INT32_FMTi__ "i"
+// PPC-LINUX:#define __INT32_MAX__ 2147483647
// PPC-LINUX:#define __INT32_TYPE__ int
// PPC-LINUX:#define __INT64_C_SUFFIX__ LL
+// PPC-LINUX:#define __INT64_FMTd__ "lld"
+// PPC-LINUX:#define __INT64_FMTi__ "lli"
+// PPC-LINUX:#define __INT64_MAX__ 9223372036854775807LL
// PPC-LINUX:#define __INT64_TYPE__ long long int
-// PPC-LINUX:#define __INT8_TYPE__ char
+// PPC-LINUX:#define __INT8_C_SUFFIX__ {{$}}
+// PPC-LINUX:#define __INT8_FMTd__ "hhd"
+// PPC-LINUX:#define __INT8_FMTi__ "hhi"
+// PPC-LINUX:#define __INT8_MAX__ 127
+// PPC-LINUX:#define __INT8_TYPE__ signed char
+// PPC-LINUX:#define __INTMAX_C_SUFFIX__ LL
+// PPC-LINUX:#define __INTMAX_FMTd__ "lld"
+// PPC-LINUX:#define __INTMAX_FMTi__ "lli"
// PPC-LINUX:#define __INTMAX_MAX__ 9223372036854775807LL
// PPC-LINUX:#define __INTMAX_TYPE__ long long int
// PPC-LINUX:#define __INTMAX_WIDTH__ 64
+// PPC-LINUX:#define __INTPTR_FMTd__ "d"
+// PPC-LINUX:#define __INTPTR_FMTi__ "i"
+// PPC-LINUX:#define __INTPTR_MAX__ 2147483647
// PPC-LINUX:#define __INTPTR_TYPE__ int
// PPC-LINUX:#define __INTPTR_WIDTH__ 32
+// PPC-LINUX:#define __INT_FAST16_FMTd__ "hd"
+// PPC-LINUX:#define __INT_FAST16_FMTi__ "hi"
+// PPC-LINUX:#define __INT_FAST16_MAX__ 32767
+// PPC-LINUX:#define __INT_FAST16_TYPE__ short
+// PPC-LINUX:#define __INT_FAST32_FMTd__ "d"
+// PPC-LINUX:#define __INT_FAST32_FMTi__ "i"
+// PPC-LINUX:#define __INT_FAST32_MAX__ 2147483647
+// PPC-LINUX:#define __INT_FAST32_TYPE__ int
+// PPC-LINUX:#define __INT_FAST64_FMTd__ "lld"
+// PPC-LINUX:#define __INT_FAST64_FMTi__ "lli"
+// PPC-LINUX:#define __INT_FAST64_MAX__ 9223372036854775807LL
+// PPC-LINUX:#define __INT_FAST64_TYPE__ long long int
+// PPC-LINUX:#define __INT_FAST8_FMTd__ "hhd"
+// PPC-LINUX:#define __INT_FAST8_FMTi__ "hhi"
+// PPC-LINUX:#define __INT_FAST8_MAX__ 127
+// PPC-LINUX:#define __INT_FAST8_TYPE__ signed char
+// PPC-LINUX:#define __INT_LEAST16_FMTd__ "hd"
+// PPC-LINUX:#define __INT_LEAST16_FMTi__ "hi"
+// PPC-LINUX:#define __INT_LEAST16_MAX__ 32767
+// PPC-LINUX:#define __INT_LEAST16_TYPE__ short
+// PPC-LINUX:#define __INT_LEAST32_FMTd__ "d"
+// PPC-LINUX:#define __INT_LEAST32_FMTi__ "i"
+// PPC-LINUX:#define __INT_LEAST32_MAX__ 2147483647
+// PPC-LINUX:#define __INT_LEAST32_TYPE__ int
+// PPC-LINUX:#define __INT_LEAST64_FMTd__ "lld"
+// PPC-LINUX:#define __INT_LEAST64_FMTi__ "lli"
+// PPC-LINUX:#define __INT_LEAST64_MAX__ 9223372036854775807LL
+// PPC-LINUX:#define __INT_LEAST64_TYPE__ long long int
+// PPC-LINUX:#define __INT_LEAST8_FMTd__ "hhd"
+// PPC-LINUX:#define __INT_LEAST8_FMTi__ "hhi"
+// PPC-LINUX:#define __INT_LEAST8_MAX__ 127
+// PPC-LINUX:#define __INT_LEAST8_TYPE__ signed char
// PPC-LINUX:#define __INT_MAX__ 2147483647
// PPC-LINUX:#define __LDBL_DENORM_MIN__ 4.94065645841246544176568792868221e-324L
// PPC-LINUX:#define __LDBL_DIG__ 31
@@ -2477,6 +5238,7 @@
// PPC-LINUX:#define __REGISTER_PREFIX__
// PPC-LINUX:#define __SCHAR_MAX__ 127
// PPC-LINUX:#define __SHRT_MAX__ 32767
+// PPC-LINUX:#define __SIG_ATOMIC_MAX__ 2147483647
// PPC-LINUX:#define __SIG_ATOMIC_WIDTH__ 32
// PPC-LINUX:#define __SIZEOF_DOUBLE__ 8
// PPC-LINUX:#define __SIZEOF_FLOAT__ 4
@@ -2493,7 +5255,41 @@
// PPC-LINUX:#define __SIZE_MAX__ 4294967295U
// PPC-LINUX:#define __SIZE_TYPE__ unsigned int
// PPC-LINUX:#define __SIZE_WIDTH__ 32
+// PPC-LINUX:#define __UINT16_C_SUFFIX__ {{$}}
+// PPC-LINUX:#define __UINT16_MAX__ 65535
+// PPC-LINUX:#define __UINT16_TYPE__ unsigned short
+// PPC-LINUX:#define __UINT32_C_SUFFIX__ U
+// PPC-LINUX:#define __UINT32_MAX__ 4294967295U
+// PPC-LINUX:#define __UINT32_TYPE__ unsigned int
+// PPC-LINUX:#define __UINT64_C_SUFFIX__ ULL
+// PPC-LINUX:#define __UINT64_MAX__ 18446744073709551615ULL
+// PPC-LINUX:#define __UINT64_TYPE__ long long unsigned int
+// PPC-LINUX:#define __UINT8_C_SUFFIX__ {{$}}
+// PPC-LINUX:#define __UINT8_MAX__ 255
+// PPC-LINUX:#define __UINT8_TYPE__ unsigned char
+// PPC-LINUX:#define __UINTMAX_C_SUFFIX__ ULL
+// PPC-LINUX:#define __UINTMAX_MAX__ 18446744073709551615ULL
// PPC-LINUX:#define __UINTMAX_TYPE__ long long unsigned int
+// PPC-LINUX:#define __UINTMAX_WIDTH__ 64
+// PPC-LINUX:#define __UINTPTR_MAX__ 4294967295U
+// PPC-LINUX:#define __UINTPTR_TYPE__ unsigned int
+// PPC-LINUX:#define __UINTPTR_WIDTH__ 32
+// PPC-LINUX:#define __UINT_FAST16_MAX__ 65535
+// PPC-LINUX:#define __UINT_FAST16_TYPE__ unsigned short
+// PPC-LINUX:#define __UINT_FAST32_MAX__ 4294967295U
+// PPC-LINUX:#define __UINT_FAST32_TYPE__ unsigned int
+// PPC-LINUX:#define __UINT_FAST64_MAX__ 18446744073709551615ULL
+// PPC-LINUX:#define __UINT_FAST64_TYPE__ long long unsigned int
+// PPC-LINUX:#define __UINT_FAST8_MAX__ 255
+// PPC-LINUX:#define __UINT_FAST8_TYPE__ unsigned char
+// PPC-LINUX:#define __UINT_LEAST16_MAX__ 65535
+// PPC-LINUX:#define __UINT_LEAST16_TYPE__ unsigned short
+// PPC-LINUX:#define __UINT_LEAST32_MAX__ 4294967295U
+// PPC-LINUX:#define __UINT_LEAST32_TYPE__ unsigned int
+// PPC-LINUX:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL
+// PPC-LINUX:#define __UINT_LEAST64_TYPE__ long long unsigned int
+// PPC-LINUX:#define __UINT_LEAST8_MAX__ 255
+// PPC-LINUX:#define __UINT_LEAST8_TYPE__ unsigned char
// PPC-LINUX:#define __USER_LABEL_PREFIX__
// PPC-LINUX:#define __WCHAR_MAX__ 2147483647
// PPC-LINUX:#define __WCHAR_TYPE__ int
@@ -2542,16 +5338,69 @@
// PPC-DARWIN:#define __FLT_MIN_EXP__ (-125)
// PPC-DARWIN:#define __FLT_MIN__ 1.17549435e-38F
// PPC-DARWIN:#define __FLT_RADIX__ 2
+// PPC-DARWIN:#define __INT16_C_SUFFIX__ {{$}}
+// PPC-DARWIN:#define __INT16_FMTd__ "hd"
+// PPC-DARWIN:#define __INT16_FMTi__ "hi"
+// PPC-DARWIN:#define __INT16_MAX__ 32767
// PPC-DARWIN:#define __INT16_TYPE__ short
+// PPC-DARWIN:#define __INT32_C_SUFFIX__ {{$}}
+// PPC-DARWIN:#define __INT32_FMTd__ "d"
+// PPC-DARWIN:#define __INT32_FMTi__ "i"
+// PPC-DARWIN:#define __INT32_MAX__ 2147483647
// PPC-DARWIN:#define __INT32_TYPE__ int
// PPC-DARWIN:#define __INT64_C_SUFFIX__ LL
+// PPC-DARWIN:#define __INT64_FMTd__ "lld"
+// PPC-DARWIN:#define __INT64_FMTi__ "lli"
+// PPC-DARWIN:#define __INT64_MAX__ 9223372036854775807LL
// PPC-DARWIN:#define __INT64_TYPE__ long long int
-// PPC-DARWIN:#define __INT8_TYPE__ char
+// PPC-DARWIN:#define __INT8_C_SUFFIX__ {{$}}
+// PPC-DARWIN:#define __INT8_FMTd__ "hhd"
+// PPC-DARWIN:#define __INT8_FMTi__ "hhi"
+// PPC-DARWIN:#define __INT8_MAX__ 127
+// PPC-DARWIN:#define __INT8_TYPE__ signed char
+// PPC-DARWIN:#define __INTMAX_C_SUFFIX__ LL
+// PPC-DARWIN:#define __INTMAX_FMTd__ "lld"
+// PPC-DARWIN:#define __INTMAX_FMTi__ "lli"
// PPC-DARWIN:#define __INTMAX_MAX__ 9223372036854775807LL
// PPC-DARWIN:#define __INTMAX_TYPE__ long long int
// PPC-DARWIN:#define __INTMAX_WIDTH__ 64
+// PPC-DARWIN:#define __INTPTR_FMTd__ "ld"
+// PPC-DARWIN:#define __INTPTR_FMTi__ "li"
+// PPC-DARWIN:#define __INTPTR_MAX__ 2147483647L
// PPC-DARWIN:#define __INTPTR_TYPE__ long int
// PPC-DARWIN:#define __INTPTR_WIDTH__ 32
+// PPC-DARWIN:#define __INT_FAST16_FMTd__ "hd"
+// PPC-DARWIN:#define __INT_FAST16_FMTi__ "hi"
+// PPC-DARWIN:#define __INT_FAST16_MAX__ 32767
+// PPC-DARWIN:#define __INT_FAST16_TYPE__ short
+// PPC-DARWIN:#define __INT_FAST32_FMTd__ "d"
+// PPC-DARWIN:#define __INT_FAST32_FMTi__ "i"
+// PPC-DARWIN:#define __INT_FAST32_MAX__ 2147483647
+// PPC-DARWIN:#define __INT_FAST32_TYPE__ int
+// PPC-DARWIN:#define __INT_FAST64_FMTd__ "lld"
+// PPC-DARWIN:#define __INT_FAST64_FMTi__ "lli"
+// PPC-DARWIN:#define __INT_FAST64_MAX__ 9223372036854775807LL
+// PPC-DARWIN:#define __INT_FAST64_TYPE__ long long int
+// PPC-DARWIN:#define __INT_FAST8_FMTd__ "hhd"
+// PPC-DARWIN:#define __INT_FAST8_FMTi__ "hhi"
+// PPC-DARWIN:#define __INT_FAST8_MAX__ 127
+// PPC-DARWIN:#define __INT_FAST8_TYPE__ signed char
+// PPC-DARWIN:#define __INT_LEAST16_FMTd__ "hd"
+// PPC-DARWIN:#define __INT_LEAST16_FMTi__ "hi"
+// PPC-DARWIN:#define __INT_LEAST16_MAX__ 32767
+// PPC-DARWIN:#define __INT_LEAST16_TYPE__ short
+// PPC-DARWIN:#define __INT_LEAST32_FMTd__ "d"
+// PPC-DARWIN:#define __INT_LEAST32_FMTi__ "i"
+// PPC-DARWIN:#define __INT_LEAST32_MAX__ 2147483647
+// PPC-DARWIN:#define __INT_LEAST32_TYPE__ int
+// PPC-DARWIN:#define __INT_LEAST64_FMTd__ "lld"
+// PPC-DARWIN:#define __INT_LEAST64_FMTi__ "lli"
+// PPC-DARWIN:#define __INT_LEAST64_MAX__ 9223372036854775807LL
+// PPC-DARWIN:#define __INT_LEAST64_TYPE__ long long int
+// PPC-DARWIN:#define __INT_LEAST8_FMTd__ "hhd"
+// PPC-DARWIN:#define __INT_LEAST8_FMTi__ "hhi"
+// PPC-DARWIN:#define __INT_LEAST8_MAX__ 127
+// PPC-DARWIN:#define __INT_LEAST8_TYPE__ signed char
// PPC-DARWIN:#define __INT_MAX__ 2147483647
// PPC-DARWIN:#define __LDBL_DENORM_MIN__ 4.94065645841246544176568792868221e-324L
// PPC-DARWIN:#define __LDBL_DIG__ 31
@@ -2582,6 +5431,7 @@
// PPC-DARWIN:#define __REGISTER_PREFIX__
// PPC-DARWIN:#define __SCHAR_MAX__ 127
// PPC-DARWIN:#define __SHRT_MAX__ 32767
+// PPC-DARWIN:#define __SIG_ATOMIC_MAX__ 2147483647
// PPC-DARWIN:#define __SIG_ATOMIC_WIDTH__ 32
// PPC-DARWIN:#define __SIZEOF_DOUBLE__ 8
// PPC-DARWIN:#define __SIZEOF_FLOAT__ 4
@@ -2601,7 +5451,41 @@
// PPC-DARWIN:#define __STDC_HOSTED__ 0
// PPC-DARWIN:#define __STDC_VERSION__ 199901L
// PPC-DARWIN:#define __STDC__ 1
+// PPC-DARWIN:#define __UINT16_C_SUFFIX__ {{$}}
+// PPC-DARWIN:#define __UINT16_MAX__ 65535
+// PPC-DARWIN:#define __UINT16_TYPE__ unsigned short
+// PPC-DARWIN:#define __UINT32_C_SUFFIX__ U
+// PPC-DARWIN:#define __UINT32_MAX__ 4294967295U
+// PPC-DARWIN:#define __UINT32_TYPE__ unsigned int
+// PPC-DARWIN:#define __UINT64_C_SUFFIX__ ULL
+// PPC-DARWIN:#define __UINT64_MAX__ 18446744073709551615ULL
+// PPC-DARWIN:#define __UINT64_TYPE__ long long unsigned int
+// PPC-DARWIN:#define __UINT8_C_SUFFIX__ {{$}}
+// PPC-DARWIN:#define __UINT8_MAX__ 255
+// PPC-DARWIN:#define __UINT8_TYPE__ unsigned char
+// PPC-DARWIN:#define __UINTMAX_C_SUFFIX__ ULL
+// PPC-DARWIN:#define __UINTMAX_MAX__ 18446744073709551615ULL
// PPC-DARWIN:#define __UINTMAX_TYPE__ long long unsigned int
+// PPC-DARWIN:#define __UINTMAX_WIDTH__ 64
+// PPC-DARWIN:#define __UINTPTR_MAX__ 4294967295U
+// PPC-DARWIN:#define __UINTPTR_TYPE__ long unsigned int
+// PPC-DARWIN:#define __UINTPTR_WIDTH__ 32
+// PPC-DARWIN:#define __UINT_FAST16_MAX__ 65535
+// PPC-DARWIN:#define __UINT_FAST16_TYPE__ unsigned short
+// PPC-DARWIN:#define __UINT_FAST32_MAX__ 4294967295U
+// PPC-DARWIN:#define __UINT_FAST32_TYPE__ unsigned int
+// PPC-DARWIN:#define __UINT_FAST64_MAX__ 18446744073709551615ULL
+// PPC-DARWIN:#define __UINT_FAST64_TYPE__ long long unsigned int
+// PPC-DARWIN:#define __UINT_FAST8_MAX__ 255
+// PPC-DARWIN:#define __UINT_FAST8_TYPE__ unsigned char
+// PPC-DARWIN:#define __UINT_LEAST16_MAX__ 65535
+// PPC-DARWIN:#define __UINT_LEAST16_TYPE__ unsigned short
+// PPC-DARWIN:#define __UINT_LEAST32_MAX__ 4294967295U
+// PPC-DARWIN:#define __UINT_LEAST32_TYPE__ unsigned int
+// PPC-DARWIN:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL
+// PPC-DARWIN:#define __UINT_LEAST64_TYPE__ long long unsigned int
+// PPC-DARWIN:#define __UINT_LEAST8_MAX__ 255
+// PPC-DARWIN:#define __UINT_LEAST8_TYPE__ unsigned char
// PPC-DARWIN:#define __USER_LABEL_PREFIX__ _
// PPC-DARWIN:#define __WCHAR_MAX__ 2147483647
// PPC-DARWIN:#define __WCHAR_TYPE__ int
@@ -2646,16 +5530,69 @@
// S390X:#define __FLT_MIN_EXP__ (-125)
// S390X:#define __FLT_MIN__ 1.17549435e-38F
// S390X:#define __FLT_RADIX__ 2
+// S390X:#define __INT16_C_SUFFIX__ {{$}}
+// S390X:#define __INT16_FMTd__ "hd"
+// S390X:#define __INT16_FMTi__ "hi"
+// S390X:#define __INT16_MAX__ 32767
// S390X:#define __INT16_TYPE__ short
+// S390X:#define __INT32_C_SUFFIX__ {{$}}
+// S390X:#define __INT32_FMTd__ "d"
+// S390X:#define __INT32_FMTi__ "i"
+// S390X:#define __INT32_MAX__ 2147483647
// S390X:#define __INT32_TYPE__ int
-// S390X:#define __INT64_C_SUFFIX__ L
+// S390X:#define __INT64_C_SUFFIX__ LL
+// S390X:#define __INT64_FMTd__ "lld"
+// S390X:#define __INT64_FMTi__ "lli"
+// S390X:#define __INT64_MAX__ 9223372036854775807LL
// S390X:#define __INT64_TYPE__ long long int
-// S390X:#define __INT8_TYPE__ char
+// S390X:#define __INT8_C_SUFFIX__ {{$}}
+// S390X:#define __INT8_FMTd__ "hhd"
+// S390X:#define __INT8_FMTi__ "hhi"
+// S390X:#define __INT8_MAX__ 127
+// S390X:#define __INT8_TYPE__ signed char
+// S390X:#define __INTMAX_C_SUFFIX__ LL
+// S390X:#define __INTMAX_FMTd__ "lld"
+// S390X:#define __INTMAX_FMTi__ "lli"
// S390X:#define __INTMAX_MAX__ 9223372036854775807LL
// S390X:#define __INTMAX_TYPE__ long long int
// S390X:#define __INTMAX_WIDTH__ 64
+// S390X:#define __INTPTR_FMTd__ "ld"
+// S390X:#define __INTPTR_FMTi__ "li"
+// S390X:#define __INTPTR_MAX__ 9223372036854775807L
// S390X:#define __INTPTR_TYPE__ long int
// S390X:#define __INTPTR_WIDTH__ 64
+// S390X:#define __INT_FAST16_FMTd__ "hd"
+// S390X:#define __INT_FAST16_FMTi__ "hi"
+// S390X:#define __INT_FAST16_MAX__ 32767
+// S390X:#define __INT_FAST16_TYPE__ short
+// S390X:#define __INT_FAST32_FMTd__ "d"
+// S390X:#define __INT_FAST32_FMTi__ "i"
+// S390X:#define __INT_FAST32_MAX__ 2147483647
+// S390X:#define __INT_FAST32_TYPE__ int
+// S390X:#define __INT_FAST64_FMTd__ "ld"
+// S390X:#define __INT_FAST64_FMTi__ "li"
+// S390X:#define __INT_FAST64_MAX__ 9223372036854775807L
+// S390X:#define __INT_FAST64_TYPE__ long int
+// S390X:#define __INT_FAST8_FMTd__ "hhd"
+// S390X:#define __INT_FAST8_FMTi__ "hhi"
+// S390X:#define __INT_FAST8_MAX__ 127
+// S390X:#define __INT_FAST8_TYPE__ signed char
+// S390X:#define __INT_LEAST16_FMTd__ "hd"
+// S390X:#define __INT_LEAST16_FMTi__ "hi"
+// S390X:#define __INT_LEAST16_MAX__ 32767
+// S390X:#define __INT_LEAST16_TYPE__ short
+// S390X:#define __INT_LEAST32_FMTd__ "d"
+// S390X:#define __INT_LEAST32_FMTi__ "i"
+// S390X:#define __INT_LEAST32_MAX__ 2147483647
+// S390X:#define __INT_LEAST32_TYPE__ int
+// S390X:#define __INT_LEAST64_FMTd__ "ld"
+// S390X:#define __INT_LEAST64_FMTi__ "li"
+// S390X:#define __INT_LEAST64_MAX__ 9223372036854775807L
+// S390X:#define __INT_LEAST64_TYPE__ long int
+// S390X:#define __INT_LEAST8_FMTd__ "hhd"
+// S390X:#define __INT_LEAST8_FMTi__ "hhi"
+// S390X:#define __INT_LEAST8_MAX__ 127
+// S390X:#define __INT_LEAST8_TYPE__ signed char
// S390X:#define __INT_MAX__ 2147483647
// S390X:#define __LDBL_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966L
// S390X:#define __LDBL_DIG__ 33
@@ -2678,6 +5615,7 @@
// S390X:#define __PTRDIFF_WIDTH__ 64
// S390X:#define __SCHAR_MAX__ 127
// S390X:#define __SHRT_MAX__ 32767
+// S390X:#define __SIG_ATOMIC_MAX__ 2147483647
// S390X:#define __SIG_ATOMIC_WIDTH__ 32
// S390X:#define __SIZEOF_DOUBLE__ 8
// S390X:#define __SIZEOF_FLOAT__ 4
@@ -2693,7 +5631,41 @@
// S390X:#define __SIZEOF_WINT_T__ 4
// S390X:#define __SIZE_TYPE__ long unsigned int
// S390X:#define __SIZE_WIDTH__ 64
+// S390X:#define __UINT16_C_SUFFIX__ {{$}}
+// S390X:#define __UINT16_MAX__ 65535
+// S390X:#define __UINT16_TYPE__ unsigned short
+// S390X:#define __UINT32_C_SUFFIX__ U
+// S390X:#define __UINT32_MAX__ 4294967295U
+// S390X:#define __UINT32_TYPE__ unsigned int
+// S390X:#define __UINT64_C_SUFFIX__ ULL
+// S390X:#define __UINT64_MAX__ 18446744073709551615ULL
+// S390X:#define __UINT64_TYPE__ long long unsigned int
+// S390X:#define __UINT8_C_SUFFIX__ {{$}}
+// S390X:#define __UINT8_MAX__ 255
+// S390X:#define __UINT8_TYPE__ unsigned char
+// S390X:#define __UINTMAX_C_SUFFIX__ ULL
+// S390X:#define __UINTMAX_MAX__ 18446744073709551615ULL
// S390X:#define __UINTMAX_TYPE__ long long unsigned int
+// S390X:#define __UINTMAX_WIDTH__ 64
+// S390X:#define __UINTPTR_MAX__ 18446744073709551615UL
+// S390X:#define __UINTPTR_TYPE__ long unsigned int
+// S390X:#define __UINTPTR_WIDTH__ 64
+// S390X:#define __UINT_FAST16_MAX__ 65535
+// S390X:#define __UINT_FAST16_TYPE__ unsigned short
+// S390X:#define __UINT_FAST32_MAX__ 4294967295U
+// S390X:#define __UINT_FAST32_TYPE__ unsigned int
+// S390X:#define __UINT_FAST64_MAX__ 18446744073709551615UL
+// S390X:#define __UINT_FAST64_TYPE__ long unsigned int
+// S390X:#define __UINT_FAST8_MAX__ 255
+// S390X:#define __UINT_FAST8_TYPE__ unsigned char
+// S390X:#define __UINT_LEAST16_MAX__ 65535
+// S390X:#define __UINT_LEAST16_TYPE__ unsigned short
+// S390X:#define __UINT_LEAST32_MAX__ 4294967295U
+// S390X:#define __UINT_LEAST32_TYPE__ unsigned int
+// S390X:#define __UINT_LEAST64_MAX__ 18446744073709551615UL
+// S390X:#define __UINT_LEAST64_TYPE__ long unsigned int
+// S390X:#define __UINT_LEAST8_MAX__ 255
+// S390X:#define __UINT_LEAST8_TYPE__ unsigned char
// S390X:#define __USER_LABEL_PREFIX__ _
// S390X:#define __WCHAR_MAX__ 2147483647
// S390X:#define __WCHAR_TYPE__ int
@@ -2706,6 +5678,7 @@
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=sparc-none-none < /dev/null | FileCheck -check-prefix SPARC %s
//
// SPARC-NOT:#define _LP64
+// SPARC:#define __BIG_ENDIAN__ 1
// SPARC:#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
// SPARC:#define __CHAR16_TYPE__ unsigned short
// SPARC:#define __CHAR32_TYPE__ unsigned int
@@ -2739,16 +5712,69 @@
// SPARC:#define __FLT_MIN_EXP__ (-125)
// SPARC:#define __FLT_MIN__ 1.17549435e-38F
// SPARC:#define __FLT_RADIX__ 2
+// SPARC:#define __INT16_C_SUFFIX__ {{$}}
+// SPARC:#define __INT16_FMTd__ "hd"
+// SPARC:#define __INT16_FMTi__ "hi"
+// SPARC:#define __INT16_MAX__ 32767
// SPARC:#define __INT16_TYPE__ short
+// SPARC:#define __INT32_C_SUFFIX__ {{$}}
+// SPARC:#define __INT32_FMTd__ "d"
+// SPARC:#define __INT32_FMTi__ "i"
+// SPARC:#define __INT32_MAX__ 2147483647
// SPARC:#define __INT32_TYPE__ int
// SPARC:#define __INT64_C_SUFFIX__ LL
+// SPARC:#define __INT64_FMTd__ "lld"
+// SPARC:#define __INT64_FMTi__ "lli"
+// SPARC:#define __INT64_MAX__ 9223372036854775807LL
// SPARC:#define __INT64_TYPE__ long long int
-// SPARC:#define __INT8_TYPE__ char
+// SPARC:#define __INT8_C_SUFFIX__ {{$}}
+// SPARC:#define __INT8_FMTd__ "hhd"
+// SPARC:#define __INT8_FMTi__ "hhi"
+// SPARC:#define __INT8_MAX__ 127
+// SPARC:#define __INT8_TYPE__ signed char
+// SPARC:#define __INTMAX_C_SUFFIX__ LL
+// SPARC:#define __INTMAX_FMTd__ "lld"
+// SPARC:#define __INTMAX_FMTi__ "lli"
// SPARC:#define __INTMAX_MAX__ 9223372036854775807LL
// SPARC:#define __INTMAX_TYPE__ long long int
// SPARC:#define __INTMAX_WIDTH__ 64
+// SPARC:#define __INTPTR_FMTd__ "ld"
+// SPARC:#define __INTPTR_FMTi__ "li"
+// SPARC:#define __INTPTR_MAX__ 2147483647L
// SPARC:#define __INTPTR_TYPE__ long int
// SPARC:#define __INTPTR_WIDTH__ 32
+// SPARC:#define __INT_FAST16_FMTd__ "hd"
+// SPARC:#define __INT_FAST16_FMTi__ "hi"
+// SPARC:#define __INT_FAST16_MAX__ 32767
+// SPARC:#define __INT_FAST16_TYPE__ short
+// SPARC:#define __INT_FAST32_FMTd__ "d"
+// SPARC:#define __INT_FAST32_FMTi__ "i"
+// SPARC:#define __INT_FAST32_MAX__ 2147483647
+// SPARC:#define __INT_FAST32_TYPE__ int
+// SPARC:#define __INT_FAST64_FMTd__ "lld"
+// SPARC:#define __INT_FAST64_FMTi__ "lli"
+// SPARC:#define __INT_FAST64_MAX__ 9223372036854775807LL
+// SPARC:#define __INT_FAST64_TYPE__ long long int
+// SPARC:#define __INT_FAST8_FMTd__ "hhd"
+// SPARC:#define __INT_FAST8_FMTi__ "hhi"
+// SPARC:#define __INT_FAST8_MAX__ 127
+// SPARC:#define __INT_FAST8_TYPE__ signed char
+// SPARC:#define __INT_LEAST16_FMTd__ "hd"
+// SPARC:#define __INT_LEAST16_FMTi__ "hi"
+// SPARC:#define __INT_LEAST16_MAX__ 32767
+// SPARC:#define __INT_LEAST16_TYPE__ short
+// SPARC:#define __INT_LEAST32_FMTd__ "d"
+// SPARC:#define __INT_LEAST32_FMTi__ "i"
+// SPARC:#define __INT_LEAST32_MAX__ 2147483647
+// SPARC:#define __INT_LEAST32_TYPE__ int
+// SPARC:#define __INT_LEAST64_FMTd__ "lld"
+// SPARC:#define __INT_LEAST64_FMTi__ "lli"
+// SPARC:#define __INT_LEAST64_MAX__ 9223372036854775807LL
+// SPARC:#define __INT_LEAST64_TYPE__ long long int
+// SPARC:#define __INT_LEAST8_FMTd__ "hhd"
+// SPARC:#define __INT_LEAST8_FMTi__ "hhi"
+// SPARC:#define __INT_LEAST8_MAX__ 127
+// SPARC:#define __INT_LEAST8_TYPE__ signed char
// SPARC:#define __INT_MAX__ 2147483647
// SPARC:#define __LDBL_DENORM_MIN__ 4.9406564584124654e-324L
// SPARC:#define __LDBL_DIG__ 15
@@ -2772,6 +5798,7 @@
// SPARC:#define __REGISTER_PREFIX__
// SPARC:#define __SCHAR_MAX__ 127
// SPARC:#define __SHRT_MAX__ 32767
+// SPARC:#define __SIG_ATOMIC_MAX__ 2147483647
// SPARC:#define __SIG_ATOMIC_WIDTH__ 32
// SPARC:#define __SIZEOF_DOUBLE__ 8
// SPARC:#define __SIZEOF_FLOAT__ 4
@@ -2788,7 +5815,41 @@
// SPARC:#define __SIZE_MAX__ 4294967295U
// SPARC:#define __SIZE_TYPE__ long unsigned int
// SPARC:#define __SIZE_WIDTH__ 32
+// SPARC:#define __UINT16_C_SUFFIX__ {{$}}
+// SPARC:#define __UINT16_MAX__ 65535
+// SPARC:#define __UINT16_TYPE__ unsigned short
+// SPARC:#define __UINT32_C_SUFFIX__ U
+// SPARC:#define __UINT32_MAX__ 4294967295U
+// SPARC:#define __UINT32_TYPE__ unsigned int
+// SPARC:#define __UINT64_C_SUFFIX__ ULL
+// SPARC:#define __UINT64_MAX__ 18446744073709551615ULL
+// SPARC:#define __UINT64_TYPE__ long long unsigned int
+// SPARC:#define __UINT8_C_SUFFIX__ {{$}}
+// SPARC:#define __UINT8_MAX__ 255
+// SPARC:#define __UINT8_TYPE__ unsigned char
+// SPARC:#define __UINTMAX_C_SUFFIX__ ULL
+// SPARC:#define __UINTMAX_MAX__ 18446744073709551615ULL
// SPARC:#define __UINTMAX_TYPE__ long long unsigned int
+// SPARC:#define __UINTMAX_WIDTH__ 64
+// SPARC:#define __UINTPTR_MAX__ 4294967295U
+// SPARC:#define __UINTPTR_TYPE__ long unsigned int
+// SPARC:#define __UINTPTR_WIDTH__ 32
+// SPARC:#define __UINT_FAST16_MAX__ 65535
+// SPARC:#define __UINT_FAST16_TYPE__ unsigned short
+// SPARC:#define __UINT_FAST32_MAX__ 4294967295U
+// SPARC:#define __UINT_FAST32_TYPE__ unsigned int
+// SPARC:#define __UINT_FAST64_MAX__ 18446744073709551615ULL
+// SPARC:#define __UINT_FAST64_TYPE__ long long unsigned int
+// SPARC:#define __UINT_FAST8_MAX__ 255
+// SPARC:#define __UINT_FAST8_TYPE__ unsigned char
+// SPARC:#define __UINT_LEAST16_MAX__ 65535
+// SPARC:#define __UINT_LEAST16_TYPE__ unsigned short
+// SPARC:#define __UINT_LEAST32_MAX__ 4294967295U
+// SPARC:#define __UINT_LEAST32_TYPE__ unsigned int
+// SPARC:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL
+// SPARC:#define __UINT_LEAST64_TYPE__ long long unsigned int
+// SPARC:#define __UINT_LEAST8_MAX__ 255
+// SPARC:#define __UINT_LEAST8_TYPE__ unsigned char
// SPARC:#define __USER_LABEL_PREFIX__ _
// SPARC:#define __VERSION__ "4.2.1 Compatible
// SPARC:#define __WCHAR_MAX__ 2147483647
@@ -2804,6 +5865,7 @@
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=tce-none-none < /dev/null | FileCheck -check-prefix TCE %s
//
// TCE-NOT:#define _LP64
+// TCE:#define __BIG_ENDIAN__ 1
// TCE:#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
// TCE:#define __CHAR16_TYPE__ unsigned short
// TCE:#define __CHAR32_TYPE__ unsigned int
@@ -2837,14 +5899,56 @@
// TCE:#define __FLT_MIN_EXP__ (-125)
// TCE:#define __FLT_MIN__ 1.17549435e-38F
// TCE:#define __FLT_RADIX__ 2
+// TCE:#define __INT16_C_SUFFIX__ {{$}}
+// TCE:#define __INT16_FMTd__ "hd"
+// TCE:#define __INT16_FMTi__ "hi"
+// TCE:#define __INT16_MAX__ 32767
// TCE:#define __INT16_TYPE__ short
+// TCE:#define __INT32_C_SUFFIX__ {{$}}
+// TCE:#define __INT32_FMTd__ "d"
+// TCE:#define __INT32_FMTi__ "i"
+// TCE:#define __INT32_MAX__ 2147483647
// TCE:#define __INT32_TYPE__ int
-// TCE:#define __INT8_TYPE__ char
+// TCE:#define __INT8_C_SUFFIX__ {{$}}
+// TCE:#define __INT8_FMTd__ "hhd"
+// TCE:#define __INT8_FMTi__ "hhi"
+// TCE:#define __INT8_MAX__ 127
+// TCE:#define __INT8_TYPE__ signed char
+// TCE:#define __INTMAX_C_SUFFIX__ L
+// TCE:#define __INTMAX_FMTd__ "ld"
+// TCE:#define __INTMAX_FMTi__ "li"
// TCE:#define __INTMAX_MAX__ 2147483647L
// TCE:#define __INTMAX_TYPE__ long int
// TCE:#define __INTMAX_WIDTH__ 32
+// TCE:#define __INTPTR_FMTd__ "d"
+// TCE:#define __INTPTR_FMTi__ "i"
+// TCE:#define __INTPTR_MAX__ 2147483647
// TCE:#define __INTPTR_TYPE__ int
// TCE:#define __INTPTR_WIDTH__ 32
+// TCE:#define __INT_FAST16_FMTd__ "hd"
+// TCE:#define __INT_FAST16_FMTi__ "hi"
+// TCE:#define __INT_FAST16_MAX__ 32767
+// TCE:#define __INT_FAST16_TYPE__ short
+// TCE:#define __INT_FAST32_FMTd__ "d"
+// TCE:#define __INT_FAST32_FMTi__ "i"
+// TCE:#define __INT_FAST32_MAX__ 2147483647
+// TCE:#define __INT_FAST32_TYPE__ int
+// TCE:#define __INT_FAST8_FMTd__ "hhd"
+// TCE:#define __INT_FAST8_FMTi__ "hhi"
+// TCE:#define __INT_FAST8_MAX__ 127
+// TCE:#define __INT_FAST8_TYPE__ signed char
+// TCE:#define __INT_LEAST16_FMTd__ "hd"
+// TCE:#define __INT_LEAST16_FMTi__ "hi"
+// TCE:#define __INT_LEAST16_MAX__ 32767
+// TCE:#define __INT_LEAST16_TYPE__ short
+// TCE:#define __INT_LEAST32_FMTd__ "d"
+// TCE:#define __INT_LEAST32_FMTi__ "i"
+// TCE:#define __INT_LEAST32_MAX__ 2147483647
+// TCE:#define __INT_LEAST32_TYPE__ int
+// TCE:#define __INT_LEAST8_FMTd__ "hhd"
+// TCE:#define __INT_LEAST8_FMTi__ "hhi"
+// TCE:#define __INT_LEAST8_MAX__ 127
+// TCE:#define __INT_LEAST8_TYPE__ signed char
// TCE:#define __INT_MAX__ 2147483647
// TCE:#define __LDBL_DENORM_MIN__ 1.40129846e-45L
// TCE:#define __LDBL_DIG__ 6
@@ -2867,6 +5971,7 @@
// TCE:#define __PTRDIFF_WIDTH__ 32
// TCE:#define __SCHAR_MAX__ 127
// TCE:#define __SHRT_MAX__ 32767
+// TCE:#define __SIG_ATOMIC_MAX__ 2147483647
// TCE:#define __SIG_ATOMIC_WIDTH__ 32
// TCE:#define __SIZEOF_DOUBLE__ 4
// TCE:#define __SIZEOF_FLOAT__ 4
@@ -2885,7 +5990,34 @@
// TCE:#define __SIZE_WIDTH__ 32
// TCE:#define __TCE_V1__ 1
// TCE:#define __TCE__ 1
+// TCE:#define __UINT16_C_SUFFIX__ {{$}}
+// TCE:#define __UINT16_MAX__ 65535
+// TCE:#define __UINT16_TYPE__ unsigned short
+// TCE:#define __UINT32_C_SUFFIX__ U
+// TCE:#define __UINT32_MAX__ 4294967295U
+// TCE:#define __UINT32_TYPE__ unsigned int
+// TCE:#define __UINT8_C_SUFFIX__ {{$}}
+// TCE:#define __UINT8_MAX__ 255
+// TCE:#define __UINT8_TYPE__ unsigned char
+// TCE:#define __UINTMAX_C_SUFFIX__ UL
+// TCE:#define __UINTMAX_MAX__ 4294967295UL
// TCE:#define __UINTMAX_TYPE__ long unsigned int
+// TCE:#define __UINTMAX_WIDTH__ 32
+// TCE:#define __UINTPTR_MAX__ 4294967295U
+// TCE:#define __UINTPTR_TYPE__ unsigned int
+// TCE:#define __UINTPTR_WIDTH__ 32
+// TCE:#define __UINT_FAST16_MAX__ 65535
+// TCE:#define __UINT_FAST16_TYPE__ unsigned short
+// TCE:#define __UINT_FAST32_MAX__ 4294967295U
+// TCE:#define __UINT_FAST32_TYPE__ unsigned int
+// TCE:#define __UINT_FAST8_MAX__ 255
+// TCE:#define __UINT_FAST8_TYPE__ unsigned char
+// TCE:#define __UINT_LEAST16_MAX__ 65535
+// TCE:#define __UINT_LEAST16_TYPE__ unsigned short
+// TCE:#define __UINT_LEAST32_MAX__ 4294967295U
+// TCE:#define __UINT_LEAST32_TYPE__ unsigned int
+// TCE:#define __UINT_LEAST8_MAX__ 255
+// TCE:#define __UINT_LEAST8_TYPE__ unsigned char
// TCE:#define __USER_LABEL_PREFIX__ _
// TCE:#define __WCHAR_MAX__ 2147483647
// TCE:#define __WCHAR_TYPE__ int
@@ -2899,6 +6031,7 @@
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=x86_64-none-none < /dev/null | FileCheck -check-prefix X86_64 %s
//
// X86_64:#define _LP64 1
+// X86_64-NOT:#define _LP32 1
// X86_64:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
// X86_64:#define __CHAR16_TYPE__ unsigned short
// X86_64:#define __CHAR32_TYPE__ unsigned int
@@ -2932,16 +6065,69 @@
// X86_64:#define __FLT_MIN_EXP__ (-125)
// X86_64:#define __FLT_MIN__ 1.17549435e-38F
// X86_64:#define __FLT_RADIX__ 2
+// X86_64:#define __INT16_C_SUFFIX__ {{$}}
+// X86_64:#define __INT16_FMTd__ "hd"
+// X86_64:#define __INT16_FMTi__ "hi"
+// X86_64:#define __INT16_MAX__ 32767
// X86_64:#define __INT16_TYPE__ short
+// X86_64:#define __INT32_C_SUFFIX__ {{$}}
+// X86_64:#define __INT32_FMTd__ "d"
+// X86_64:#define __INT32_FMTi__ "i"
+// X86_64:#define __INT32_MAX__ 2147483647
// X86_64:#define __INT32_TYPE__ int
// X86_64:#define __INT64_C_SUFFIX__ L
+// X86_64:#define __INT64_FMTd__ "ld"
+// X86_64:#define __INT64_FMTi__ "li"
+// X86_64:#define __INT64_MAX__ 9223372036854775807L
// X86_64:#define __INT64_TYPE__ long int
-// X86_64:#define __INT8_TYPE__ char
+// X86_64:#define __INT8_C_SUFFIX__ {{$}}
+// X86_64:#define __INT8_FMTd__ "hhd"
+// X86_64:#define __INT8_FMTi__ "hhi"
+// X86_64:#define __INT8_MAX__ 127
+// X86_64:#define __INT8_TYPE__ signed char
+// X86_64:#define __INTMAX_C_SUFFIX__ L
+// X86_64:#define __INTMAX_FMTd__ "ld"
+// X86_64:#define __INTMAX_FMTi__ "li"
// X86_64:#define __INTMAX_MAX__ 9223372036854775807L
// X86_64:#define __INTMAX_TYPE__ long int
// X86_64:#define __INTMAX_WIDTH__ 64
+// X86_64:#define __INTPTR_FMTd__ "ld"
+// X86_64:#define __INTPTR_FMTi__ "li"
+// X86_64:#define __INTPTR_MAX__ 9223372036854775807L
// X86_64:#define __INTPTR_TYPE__ long int
// X86_64:#define __INTPTR_WIDTH__ 64
+// X86_64:#define __INT_FAST16_FMTd__ "hd"
+// X86_64:#define __INT_FAST16_FMTi__ "hi"
+// X86_64:#define __INT_FAST16_MAX__ 32767
+// X86_64:#define __INT_FAST16_TYPE__ short
+// X86_64:#define __INT_FAST32_FMTd__ "d"
+// X86_64:#define __INT_FAST32_FMTi__ "i"
+// X86_64:#define __INT_FAST32_MAX__ 2147483647
+// X86_64:#define __INT_FAST32_TYPE__ int
+// X86_64:#define __INT_FAST64_FMTd__ "ld"
+// X86_64:#define __INT_FAST64_FMTi__ "li"
+// X86_64:#define __INT_FAST64_MAX__ 9223372036854775807L
+// X86_64:#define __INT_FAST64_TYPE__ long int
+// X86_64:#define __INT_FAST8_FMTd__ "hhd"
+// X86_64:#define __INT_FAST8_FMTi__ "hhi"
+// X86_64:#define __INT_FAST8_MAX__ 127
+// X86_64:#define __INT_FAST8_TYPE__ signed char
+// X86_64:#define __INT_LEAST16_FMTd__ "hd"
+// X86_64:#define __INT_LEAST16_FMTi__ "hi"
+// X86_64:#define __INT_LEAST16_MAX__ 32767
+// X86_64:#define __INT_LEAST16_TYPE__ short
+// X86_64:#define __INT_LEAST32_FMTd__ "d"
+// X86_64:#define __INT_LEAST32_FMTi__ "i"
+// X86_64:#define __INT_LEAST32_MAX__ 2147483647
+// X86_64:#define __INT_LEAST32_TYPE__ int
+// X86_64:#define __INT_LEAST64_FMTd__ "ld"
+// X86_64:#define __INT_LEAST64_FMTi__ "li"
+// X86_64:#define __INT_LEAST64_MAX__ 9223372036854775807L
+// X86_64:#define __INT_LEAST64_TYPE__ long int
+// X86_64:#define __INT_LEAST8_FMTd__ "hhd"
+// X86_64:#define __INT_LEAST8_FMTi__ "hhi"
+// X86_64:#define __INT_LEAST8_MAX__ 127
+// X86_64:#define __INT_LEAST8_TYPE__ signed char
// X86_64:#define __INT_MAX__ 2147483647
// X86_64:#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
// X86_64:#define __LDBL_DIG__ 18
@@ -2960,6 +6146,7 @@
// X86_64:#define __LONG_LONG_MAX__ 9223372036854775807LL
// X86_64:#define __LONG_MAX__ 9223372036854775807L
// X86_64:#define __LP64__ 1
+// X86_64-NOT:#define __ILP32__ 1
// X86_64:#define __MMX__ 1
// X86_64:#define __NO_MATH_INLINES 1
// X86_64:#define __POINTER_WIDTH__ 64
@@ -2968,6 +6155,7 @@
// X86_64:#define __REGISTER_PREFIX__
// X86_64:#define __SCHAR_MAX__ 127
// X86_64:#define __SHRT_MAX__ 32767
+// X86_64:#define __SIG_ATOMIC_MAX__ 2147483647
// X86_64:#define __SIG_ATOMIC_WIDTH__ 32
// X86_64:#define __SIZEOF_DOUBLE__ 8
// X86_64:#define __SIZEOF_FLOAT__ 4
@@ -2988,7 +6176,41 @@
// X86_64:#define __SSE2__ 1
// X86_64:#define __SSE_MATH__ 1
// X86_64:#define __SSE__ 1
+// X86_64:#define __UINT16_C_SUFFIX__ {{$}}
+// X86_64:#define __UINT16_MAX__ 65535
+// X86_64:#define __UINT16_TYPE__ unsigned short
+// X86_64:#define __UINT32_C_SUFFIX__ U
+// X86_64:#define __UINT32_MAX__ 4294967295U
+// X86_64:#define __UINT32_TYPE__ unsigned int
+// X86_64:#define __UINT64_C_SUFFIX__ UL
+// X86_64:#define __UINT64_MAX__ 18446744073709551615UL
+// X86_64:#define __UINT64_TYPE__ long unsigned int
+// X86_64:#define __UINT8_C_SUFFIX__ {{$}}
+// X86_64:#define __UINT8_MAX__ 255
+// X86_64:#define __UINT8_TYPE__ unsigned char
+// X86_64:#define __UINTMAX_C_SUFFIX__ UL
+// X86_64:#define __UINTMAX_MAX__ 18446744073709551615UL
// X86_64:#define __UINTMAX_TYPE__ long unsigned int
+// X86_64:#define __UINTMAX_WIDTH__ 64
+// X86_64:#define __UINTPTR_MAX__ 18446744073709551615UL
+// X86_64:#define __UINTPTR_TYPE__ long unsigned int
+// X86_64:#define __UINTPTR_WIDTH__ 64
+// X86_64:#define __UINT_FAST16_MAX__ 65535
+// X86_64:#define __UINT_FAST16_TYPE__ unsigned short
+// X86_64:#define __UINT_FAST32_MAX__ 4294967295U
+// X86_64:#define __UINT_FAST32_TYPE__ unsigned int
+// X86_64:#define __UINT_FAST64_MAX__ 18446744073709551615UL
+// X86_64:#define __UINT_FAST64_TYPE__ long unsigned int
+// X86_64:#define __UINT_FAST8_MAX__ 255
+// X86_64:#define __UINT_FAST8_TYPE__ unsigned char
+// X86_64:#define __UINT_LEAST16_MAX__ 65535
+// X86_64:#define __UINT_LEAST16_TYPE__ unsigned short
+// X86_64:#define __UINT_LEAST32_MAX__ 4294967295U
+// X86_64:#define __UINT_LEAST32_TYPE__ unsigned int
+// X86_64:#define __UINT_LEAST64_MAX__ 18446744073709551615UL
+// X86_64:#define __UINT_LEAST64_TYPE__ long unsigned int
+// X86_64:#define __UINT_LEAST8_MAX__ 255
+// X86_64:#define __UINT_LEAST8_TYPE__ unsigned char
// X86_64:#define __USER_LABEL_PREFIX__ _
// X86_64:#define __WCHAR_MAX__ 2147483647
// X86_64:#define __WCHAR_TYPE__ int
@@ -3000,6 +6222,200 @@
// X86_64:#define __x86_64 1
// X86_64:#define __x86_64__ 1
//
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=x86_64-none-none-gnux32 < /dev/null | FileCheck -check-prefix X32 %s
+//
+// X32:#define _ILP32 1
+// X32-NOT:#define _LP64 1
+// X32:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
+// X32:#define __CHAR16_TYPE__ unsigned short
+// X32:#define __CHAR32_TYPE__ unsigned int
+// X32:#define __CHAR_BIT__ 8
+// X32:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
+// X32:#define __DBL_DIG__ 15
+// X32:#define __DBL_EPSILON__ 2.2204460492503131e-16
+// X32:#define __DBL_HAS_DENORM__ 1
+// X32:#define __DBL_HAS_INFINITY__ 1
+// X32:#define __DBL_HAS_QUIET_NAN__ 1
+// X32:#define __DBL_MANT_DIG__ 53
+// X32:#define __DBL_MAX_10_EXP__ 308
+// X32:#define __DBL_MAX_EXP__ 1024
+// X32:#define __DBL_MAX__ 1.7976931348623157e+308
+// X32:#define __DBL_MIN_10_EXP__ (-307)
+// X32:#define __DBL_MIN_EXP__ (-1021)
+// X32:#define __DBL_MIN__ 2.2250738585072014e-308
+// X32:#define __DECIMAL_DIG__ 21
+// X32:#define __FLT_DENORM_MIN__ 1.40129846e-45F
+// X32:#define __FLT_DIG__ 6
+// X32:#define __FLT_EPSILON__ 1.19209290e-7F
+// X32:#define __FLT_EVAL_METHOD__ 0
+// X32:#define __FLT_HAS_DENORM__ 1
+// X32:#define __FLT_HAS_INFINITY__ 1
+// X32:#define __FLT_HAS_QUIET_NAN__ 1
+// X32:#define __FLT_MANT_DIG__ 24
+// X32:#define __FLT_MAX_10_EXP__ 38
+// X32:#define __FLT_MAX_EXP__ 128
+// X32:#define __FLT_MAX__ 3.40282347e+38F
+// X32:#define __FLT_MIN_10_EXP__ (-37)
+// X32:#define __FLT_MIN_EXP__ (-125)
+// X32:#define __FLT_MIN__ 1.17549435e-38F
+// X32:#define __FLT_RADIX__ 2
+// X32:#define __ILP32__ 1
+// X32-NOT:#define __LP64__ 1
+// X32:#define __INT16_C_SUFFIX__ {{$}}
+// X32:#define __INT16_FMTd__ "hd"
+// X32:#define __INT16_FMTi__ "hi"
+// X32:#define __INT16_MAX__ 32767
+// X32:#define __INT16_TYPE__ short
+// X32:#define __INT32_C_SUFFIX__ {{$}}
+// X32:#define __INT32_FMTd__ "d"
+// X32:#define __INT32_FMTi__ "i"
+// X32:#define __INT32_MAX__ 2147483647
+// X32:#define __INT32_TYPE__ int
+// X32:#define __INT64_C_SUFFIX__ L
+// X32:#define __INT64_FMTd__ "lld"
+// X32:#define __INT64_FMTi__ "lli"
+// X32:#define __INT64_MAX__ 9223372036854775807L
+// X32:#define __INT64_TYPE__ long long int
+// X32:#define __INT8_C_SUFFIX__ {{$}}
+// X32:#define __INT8_FMTd__ "hhd"
+// X32:#define __INT8_FMTi__ "hhi"
+// X32:#define __INT8_MAX__ 127
+// X32:#define __INT8_TYPE__ signed char
+// X32:#define __INTMAX_C_SUFFIX__ LL
+// X32:#define __INTMAX_FMTd__ "lld"
+// X32:#define __INTMAX_FMTi__ "lli"
+// X32:#define __INTMAX_MAX__ 9223372036854775807L
+// X32:#define __INTMAX_TYPE__ long long int
+// X32:#define __INTMAX_WIDTH__ 64
+// X32:#define __INTPTR_FMTd__ "d"
+// X32:#define __INTPTR_FMTi__ "i"
+// X32:#define __INTPTR_MAX__ 2147483647
+// X32:#define __INTPTR_TYPE__ int
+// X32:#define __INTPTR_WIDTH__ 32
+// X32:#define __INT_FAST16_FMTd__ "hd"
+// X32:#define __INT_FAST16_FMTi__ "hi"
+// X32:#define __INT_FAST16_MAX__ 32767
+// X32:#define __INT_FAST16_TYPE__ short
+// X32:#define __INT_FAST32_FMTd__ "d"
+// X32:#define __INT_FAST32_FMTi__ "i"
+// X32:#define __INT_FAST32_MAX__ 2147483647
+// X32:#define __INT_FAST32_TYPE__ int
+// X32:#define __INT_FAST64_FMTd__ "lld"
+// X32:#define __INT_FAST64_FMTi__ "lli"
+// X32:#define __INT_FAST64_MAX__ 9223372036854775807L
+// X32:#define __INT_FAST64_TYPE__ long long int
+// X32:#define __INT_FAST8_FMTd__ "hhd"
+// X32:#define __INT_FAST8_FMTi__ "hhi"
+// X32:#define __INT_FAST8_MAX__ 127
+// X32:#define __INT_FAST8_TYPE__ signed char
+// X32:#define __INT_LEAST16_FMTd__ "hd"
+// X32:#define __INT_LEAST16_FMTi__ "hi"
+// X32:#define __INT_LEAST16_MAX__ 32767
+// X32:#define __INT_LEAST16_TYPE__ short
+// X32:#define __INT_LEAST32_FMTd__ "d"
+// X32:#define __INT_LEAST32_FMTi__ "i"
+// X32:#define __INT_LEAST32_MAX__ 2147483647
+// X32:#define __INT_LEAST32_TYPE__ int
+// X32:#define __INT_LEAST64_FMTd__ "lld"
+// X32:#define __INT_LEAST64_FMTi__ "lli"
+// X32:#define __INT_LEAST64_MAX__ 9223372036854775807L
+// X32:#define __INT_LEAST64_TYPE__ long long int
+// X32:#define __INT_LEAST8_FMTd__ "hhd"
+// X32:#define __INT_LEAST8_FMTi__ "hhi"
+// X32:#define __INT_LEAST8_MAX__ 127
+// X32:#define __INT_LEAST8_TYPE__ signed char
+// X32:#define __INT_MAX__ 2147483647
+// X32:#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
+// X32:#define __LDBL_DIG__ 18
+// X32:#define __LDBL_EPSILON__ 1.08420217248550443401e-19L
+// X32:#define __LDBL_HAS_DENORM__ 1
+// X32:#define __LDBL_HAS_INFINITY__ 1
+// X32:#define __LDBL_HAS_QUIET_NAN__ 1
+// X32:#define __LDBL_MANT_DIG__ 64
+// X32:#define __LDBL_MAX_10_EXP__ 4932
+// X32:#define __LDBL_MAX_EXP__ 16384
+// X32:#define __LDBL_MAX__ 1.18973149535723176502e+4932L
+// X32:#define __LDBL_MIN_10_EXP__ (-4931)
+// X32:#define __LDBL_MIN_EXP__ (-16381)
+// X32:#define __LDBL_MIN__ 3.36210314311209350626e-4932L
+// X32:#define __LITTLE_ENDIAN__ 1
+// X32:#define __LONG_LONG_MAX__ 9223372036854775807LL
+// X32:#define __LONG_MAX__ 2147483647L
+// X32:#define __MMX__ 1
+// X32:#define __NO_MATH_INLINES 1
+// X32:#define __POINTER_WIDTH__ 32
+// X32:#define __PTRDIFF_TYPE__ int
+// X32:#define __PTRDIFF_WIDTH__ 32
+// X32:#define __REGISTER_PREFIX__
+// X32:#define __SCHAR_MAX__ 127
+// X32:#define __SHRT_MAX__ 32767
+// X32:#define __SIG_ATOMIC_MAX__ 2147483647
+// X32:#define __SIG_ATOMIC_WIDTH__ 32
+// X32:#define __SIZEOF_DOUBLE__ 8
+// X32:#define __SIZEOF_FLOAT__ 4
+// X32:#define __SIZEOF_INT__ 4
+// X32:#define __SIZEOF_LONG_DOUBLE__ 16
+// X32:#define __SIZEOF_LONG_LONG__ 8
+// X32:#define __SIZEOF_LONG__ 4
+// X32:#define __SIZEOF_POINTER__ 4
+// X32:#define __SIZEOF_PTRDIFF_T__ 4
+// X32:#define __SIZEOF_SHORT__ 2
+// X32:#define __SIZEOF_SIZE_T__ 4
+// X32:#define __SIZEOF_WCHAR_T__ 4
+// X32:#define __SIZEOF_WINT_T__ 4
+// X32:#define __SIZE_MAX__ 4294967295U
+// X32:#define __SIZE_TYPE__ unsigned int
+// X32:#define __SIZE_WIDTH__ 32
+// X32:#define __SSE2_MATH__ 1
+// X32:#define __SSE2__ 1
+// X32:#define __SSE_MATH__ 1
+// X32:#define __SSE__ 1
+// X32:#define __UINT16_C_SUFFIX__ {{$}}
+// X32:#define __UINT16_MAX__ 65535
+// X32:#define __UINT16_TYPE__ unsigned short
+// X32:#define __UINT32_C_SUFFIX__ U
+// X32:#define __UINT32_MAX__ 4294967295U
+// X32:#define __UINT32_TYPE__ unsigned int
+// X32:#define __UINT64_C_SUFFIX__ UL
+// X32:#define __UINT64_MAX__ 18446744073709551615ULL
+// X32:#define __UINT64_TYPE__ long long unsigned int
+// X32:#define __UINT8_C_SUFFIX__ {{$}}
+// X32:#define __UINT8_MAX__ 255
+// X32:#define __UINT8_TYPE__ unsigned char
+// X32:#define __UINTMAX_C_SUFFIX__ ULL
+// X32:#define __UINTMAX_MAX__ 18446744073709551615ULL
+// X32:#define __UINTMAX_TYPE__ long long unsigned int
+// X32:#define __UINTMAX_WIDTH__ 64
+// X32:#define __UINTPTR_MAX__ 4294967295U
+// X32:#define __UINTPTR_TYPE__ unsigned int
+// X32:#define __UINTPTR_WIDTH__ 32
+// X32:#define __UINT_FAST16_MAX__ 65535
+// X32:#define __UINT_FAST16_TYPE__ unsigned short
+// X32:#define __UINT_FAST32_MAX__ 4294967295U
+// X32:#define __UINT_FAST32_TYPE__ unsigned int
+// X32:#define __UINT_FAST64_MAX__ 18446744073709551615ULL
+// X32:#define __UINT_FAST64_TYPE__ long long unsigned int
+// X32:#define __UINT_FAST8_MAX__ 255
+// X32:#define __UINT_FAST8_TYPE__ unsigned char
+// X32:#define __UINT_LEAST16_MAX__ 65535
+// X32:#define __UINT_LEAST16_TYPE__ unsigned short
+// X32:#define __UINT_LEAST32_MAX__ 4294967295U
+// X32:#define __UINT_LEAST32_TYPE__ unsigned int
+// X32:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL
+// X32:#define __UINT_LEAST64_TYPE__ long long unsigned int
+// X32:#define __UINT_LEAST8_MAX__ 255
+// X32:#define __UINT_LEAST8_TYPE__ unsigned char
+// X32:#define __USER_LABEL_PREFIX__ _
+// X32:#define __WCHAR_MAX__ 2147483647
+// X32:#define __WCHAR_TYPE__ int
+// X32:#define __WCHAR_WIDTH__ 32
+// X32:#define __WINT_TYPE__ int
+// X32:#define __WINT_WIDTH__ 32
+// X32:#define __amd64 1
+// X32:#define __amd64__ 1
+// X32:#define __x86_64 1
+// X32:#define __x86_64__ 1
+//
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=x86_64-pc-linux-gnu < /dev/null | FileCheck -check-prefix X86_64-LINUX %s
//
// X86_64-LINUX:#define _LP64 1
@@ -3036,16 +6452,69 @@
// X86_64-LINUX:#define __FLT_MIN_EXP__ (-125)
// X86_64-LINUX:#define __FLT_MIN__ 1.17549435e-38F
// X86_64-LINUX:#define __FLT_RADIX__ 2
+// X86_64-LINUX:#define __INT16_C_SUFFIX__ {{$}}
+// X86_64-LINUX:#define __INT16_FMTd__ "hd"
+// X86_64-LINUX:#define __INT16_FMTi__ "hi"
+// X86_64-LINUX:#define __INT16_MAX__ 32767
// X86_64-LINUX:#define __INT16_TYPE__ short
+// X86_64-LINUX:#define __INT32_C_SUFFIX__ {{$}}
+// X86_64-LINUX:#define __INT32_FMTd__ "d"
+// X86_64-LINUX:#define __INT32_FMTi__ "i"
+// X86_64-LINUX:#define __INT32_MAX__ 2147483647
// X86_64-LINUX:#define __INT32_TYPE__ int
// X86_64-LINUX:#define __INT64_C_SUFFIX__ L
+// X86_64-LINUX:#define __INT64_FMTd__ "ld"
+// X86_64-LINUX:#define __INT64_FMTi__ "li"
+// X86_64-LINUX:#define __INT64_MAX__ 9223372036854775807L
// X86_64-LINUX:#define __INT64_TYPE__ long int
-// X86_64-LINUX:#define __INT8_TYPE__ char
+// X86_64-LINUX:#define __INT8_C_SUFFIX__ {{$}}
+// X86_64-LINUX:#define __INT8_FMTd__ "hhd"
+// X86_64-LINUX:#define __INT8_FMTi__ "hhi"
+// X86_64-LINUX:#define __INT8_MAX__ 127
+// X86_64-LINUX:#define __INT8_TYPE__ signed char
+// X86_64-LINUX:#define __INTMAX_C_SUFFIX__ L
+// X86_64-LINUX:#define __INTMAX_FMTd__ "ld"
+// X86_64-LINUX:#define __INTMAX_FMTi__ "li"
// X86_64-LINUX:#define __INTMAX_MAX__ 9223372036854775807L
// X86_64-LINUX:#define __INTMAX_TYPE__ long int
// X86_64-LINUX:#define __INTMAX_WIDTH__ 64
+// X86_64-LINUX:#define __INTPTR_FMTd__ "ld"
+// X86_64-LINUX:#define __INTPTR_FMTi__ "li"
+// X86_64-LINUX:#define __INTPTR_MAX__ 9223372036854775807L
// X86_64-LINUX:#define __INTPTR_TYPE__ long int
// X86_64-LINUX:#define __INTPTR_WIDTH__ 64
+// X86_64-LINUX:#define __INT_FAST16_FMTd__ "hd"
+// X86_64-LINUX:#define __INT_FAST16_FMTi__ "hi"
+// X86_64-LINUX:#define __INT_FAST16_MAX__ 32767
+// X86_64-LINUX:#define __INT_FAST16_TYPE__ short
+// X86_64-LINUX:#define __INT_FAST32_FMTd__ "d"
+// X86_64-LINUX:#define __INT_FAST32_FMTi__ "i"
+// X86_64-LINUX:#define __INT_FAST32_MAX__ 2147483647
+// X86_64-LINUX:#define __INT_FAST32_TYPE__ int
+// X86_64-LINUX:#define __INT_FAST64_FMTd__ "ld"
+// X86_64-LINUX:#define __INT_FAST64_FMTi__ "li"
+// X86_64-LINUX:#define __INT_FAST64_MAX__ 9223372036854775807L
+// X86_64-LINUX:#define __INT_FAST64_TYPE__ long int
+// X86_64-LINUX:#define __INT_FAST8_FMTd__ "hhd"
+// X86_64-LINUX:#define __INT_FAST8_FMTi__ "hhi"
+// X86_64-LINUX:#define __INT_FAST8_MAX__ 127
+// X86_64-LINUX:#define __INT_FAST8_TYPE__ signed char
+// X86_64-LINUX:#define __INT_LEAST16_FMTd__ "hd"
+// X86_64-LINUX:#define __INT_LEAST16_FMTi__ "hi"
+// X86_64-LINUX:#define __INT_LEAST16_MAX__ 32767
+// X86_64-LINUX:#define __INT_LEAST16_TYPE__ short
+// X86_64-LINUX:#define __INT_LEAST32_FMTd__ "d"
+// X86_64-LINUX:#define __INT_LEAST32_FMTi__ "i"
+// X86_64-LINUX:#define __INT_LEAST32_MAX__ 2147483647
+// X86_64-LINUX:#define __INT_LEAST32_TYPE__ int
+// X86_64-LINUX:#define __INT_LEAST64_FMTd__ "ld"
+// X86_64-LINUX:#define __INT_LEAST64_FMTi__ "li"
+// X86_64-LINUX:#define __INT_LEAST64_MAX__ 9223372036854775807L
+// X86_64-LINUX:#define __INT_LEAST64_TYPE__ long int
+// X86_64-LINUX:#define __INT_LEAST8_FMTd__ "hhd"
+// X86_64-LINUX:#define __INT_LEAST8_FMTi__ "hhi"
+// X86_64-LINUX:#define __INT_LEAST8_MAX__ 127
+// X86_64-LINUX:#define __INT_LEAST8_TYPE__ signed char
// X86_64-LINUX:#define __INT_MAX__ 2147483647
// X86_64-LINUX:#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
// X86_64-LINUX:#define __LDBL_DIG__ 18
@@ -3072,6 +6541,7 @@
// X86_64-LINUX:#define __REGISTER_PREFIX__
// X86_64-LINUX:#define __SCHAR_MAX__ 127
// X86_64-LINUX:#define __SHRT_MAX__ 32767
+// X86_64-LINUX:#define __SIG_ATOMIC_MAX__ 2147483647
// X86_64-LINUX:#define __SIG_ATOMIC_WIDTH__ 32
// X86_64-LINUX:#define __SIZEOF_DOUBLE__ 8
// X86_64-LINUX:#define __SIZEOF_FLOAT__ 4
@@ -3092,7 +6562,41 @@
// X86_64-LINUX:#define __SSE2__ 1
// X86_64-LINUX:#define __SSE_MATH__ 1
// X86_64-LINUX:#define __SSE__ 1
+// X86_64-LINUX:#define __UINT16_C_SUFFIX__ {{$}}
+// X86_64-LINUX:#define __UINT16_MAX__ 65535
+// X86_64-LINUX:#define __UINT16_TYPE__ unsigned short
+// X86_64-LINUX:#define __UINT32_C_SUFFIX__ U
+// X86_64-LINUX:#define __UINT32_MAX__ 4294967295U
+// X86_64-LINUX:#define __UINT32_TYPE__ unsigned int
+// X86_64-LINUX:#define __UINT64_C_SUFFIX__ UL
+// X86_64-LINUX:#define __UINT64_MAX__ 18446744073709551615UL
+// X86_64-LINUX:#define __UINT64_TYPE__ long unsigned int
+// X86_64-LINUX:#define __UINT8_C_SUFFIX__ {{$}}
+// X86_64-LINUX:#define __UINT8_MAX__ 255
+// X86_64-LINUX:#define __UINT8_TYPE__ unsigned char
+// X86_64-LINUX:#define __UINTMAX_C_SUFFIX__ UL
+// X86_64-LINUX:#define __UINTMAX_MAX__ 18446744073709551615UL
// X86_64-LINUX:#define __UINTMAX_TYPE__ long unsigned int
+// X86_64-LINUX:#define __UINTMAX_WIDTH__ 64
+// X86_64-LINUX:#define __UINTPTR_MAX__ 18446744073709551615UL
+// X86_64-LINUX:#define __UINTPTR_TYPE__ long unsigned int
+// X86_64-LINUX:#define __UINTPTR_WIDTH__ 64
+// X86_64-LINUX:#define __UINT_FAST16_MAX__ 65535
+// X86_64-LINUX:#define __UINT_FAST16_TYPE__ unsigned short
+// X86_64-LINUX:#define __UINT_FAST32_MAX__ 4294967295U
+// X86_64-LINUX:#define __UINT_FAST32_TYPE__ unsigned int
+// X86_64-LINUX:#define __UINT_FAST64_MAX__ 18446744073709551615UL
+// X86_64-LINUX:#define __UINT_FAST64_TYPE__ long unsigned int
+// X86_64-LINUX:#define __UINT_FAST8_MAX__ 255
+// X86_64-LINUX:#define __UINT_FAST8_TYPE__ unsigned char
+// X86_64-LINUX:#define __UINT_LEAST16_MAX__ 65535
+// X86_64-LINUX:#define __UINT_LEAST16_TYPE__ unsigned short
+// X86_64-LINUX:#define __UINT_LEAST32_MAX__ 4294967295U
+// X86_64-LINUX:#define __UINT_LEAST32_TYPE__ unsigned int
+// X86_64-LINUX:#define __UINT_LEAST64_MAX__ 18446744073709551615UL
+// X86_64-LINUX:#define __UINT_LEAST64_TYPE__ long unsigned int
+// X86_64-LINUX:#define __UINT_LEAST8_MAX__ 255
+// X86_64-LINUX:#define __UINT_LEAST8_TYPE__ unsigned char
// X86_64-LINUX:#define __USER_LABEL_PREFIX__
// X86_64-LINUX:#define __WCHAR_MAX__ 2147483647
// X86_64-LINUX:#define __WCHAR_TYPE__ int
@@ -3146,16 +6650,69 @@
// X86_64-NETBSD:#define __FLT_MIN_EXP__ (-125)
// X86_64-NETBSD:#define __FLT_MIN__ 1.17549435e-38F
// X86_64-NETBSD:#define __FLT_RADIX__ 2
+// X86_64-NETBSD:#define __INT16_C_SUFFIX__ {{$}}
+// X86_64-NETBSD:#define __INT16_FMTd__ "hd"
+// X86_64-NETBSD:#define __INT16_FMTi__ "hi"
+// X86_64-NETBSD:#define __INT16_MAX__ 32767
// X86_64-NETBSD:#define __INT16_TYPE__ short
+// X86_64-NETBSD:#define __INT32_C_SUFFIX__ {{$}}
+// X86_64-NETBSD:#define __INT32_FMTd__ "d"
+// X86_64-NETBSD:#define __INT32_FMTi__ "i"
+// X86_64-NETBSD:#define __INT32_MAX__ 2147483647
// X86_64-NETBSD:#define __INT32_TYPE__ int
// X86_64-NETBSD:#define __INT64_C_SUFFIX__ L
+// X86_64-NETBSD:#define __INT64_FMTd__ "ld"
+// X86_64-NETBSD:#define __INT64_FMTi__ "li"
+// X86_64-NETBSD:#define __INT64_MAX__ 9223372036854775807L
// X86_64-NETBSD:#define __INT64_TYPE__ long int
-// X86_64-NETBSD:#define __INT8_TYPE__ char
+// X86_64-NETBSD:#define __INT8_C_SUFFIX__ {{$}}
+// X86_64-NETBSD:#define __INT8_FMTd__ "hhd"
+// X86_64-NETBSD:#define __INT8_FMTi__ "hhi"
+// X86_64-NETBSD:#define __INT8_MAX__ 127
+// X86_64-NETBSD:#define __INT8_TYPE__ signed char
+// X86_64-NETBSD:#define __INTMAX_C_SUFFIX__ L
+// X86_64-NETBSD:#define __INTMAX_FMTd__ "ld"
+// X86_64-NETBSD:#define __INTMAX_FMTi__ "li"
// X86_64-NETBSD:#define __INTMAX_MAX__ 9223372036854775807L
// X86_64-NETBSD:#define __INTMAX_TYPE__ long int
// X86_64-NETBSD:#define __INTMAX_WIDTH__ 64
+// X86_64-NETBSD:#define __INTPTR_FMTd__ "ld"
+// X86_64-NETBSD:#define __INTPTR_FMTi__ "li"
+// X86_64-NETBSD:#define __INTPTR_MAX__ 9223372036854775807L
// X86_64-NETBSD:#define __INTPTR_TYPE__ long int
// X86_64-NETBSD:#define __INTPTR_WIDTH__ 64
+// X86_64-NETBSD:#define __INT_FAST16_FMTd__ "hd"
+// X86_64-NETBSD:#define __INT_FAST16_FMTi__ "hi"
+// X86_64-NETBSD:#define __INT_FAST16_MAX__ 32767
+// X86_64-NETBSD:#define __INT_FAST16_TYPE__ short
+// X86_64-NETBSD:#define __INT_FAST32_FMTd__ "d"
+// X86_64-NETBSD:#define __INT_FAST32_FMTi__ "i"
+// X86_64-NETBSD:#define __INT_FAST32_MAX__ 2147483647
+// X86_64-NETBSD:#define __INT_FAST32_TYPE__ int
+// X86_64-NETBSD:#define __INT_FAST64_FMTd__ "ld"
+// X86_64-NETBSD:#define __INT_FAST64_FMTi__ "li"
+// X86_64-NETBSD:#define __INT_FAST64_MAX__ 9223372036854775807L
+// X86_64-NETBSD:#define __INT_FAST64_TYPE__ long int
+// X86_64-NETBSD:#define __INT_FAST8_FMTd__ "hhd"
+// X86_64-NETBSD:#define __INT_FAST8_FMTi__ "hhi"
+// X86_64-NETBSD:#define __INT_FAST8_MAX__ 127
+// X86_64-NETBSD:#define __INT_FAST8_TYPE__ signed char
+// X86_64-NETBSD:#define __INT_LEAST16_FMTd__ "hd"
+// X86_64-NETBSD:#define __INT_LEAST16_FMTi__ "hi"
+// X86_64-NETBSD:#define __INT_LEAST16_MAX__ 32767
+// X86_64-NETBSD:#define __INT_LEAST16_TYPE__ short
+// X86_64-NETBSD:#define __INT_LEAST32_FMTd__ "d"
+// X86_64-NETBSD:#define __INT_LEAST32_FMTi__ "i"
+// X86_64-NETBSD:#define __INT_LEAST32_MAX__ 2147483647
+// X86_64-NETBSD:#define __INT_LEAST32_TYPE__ int
+// X86_64-NETBSD:#define __INT_LEAST64_FMTd__ "ld"
+// X86_64-NETBSD:#define __INT_LEAST64_FMTi__ "li"
+// X86_64-NETBSD:#define __INT_LEAST64_MAX__ 9223372036854775807L
+// X86_64-NETBSD:#define __INT_LEAST64_TYPE__ long int
+// X86_64-NETBSD:#define __INT_LEAST8_FMTd__ "hhd"
+// X86_64-NETBSD:#define __INT_LEAST8_FMTi__ "hhi"
+// X86_64-NETBSD:#define __INT_LEAST8_MAX__ 127
+// X86_64-NETBSD:#define __INT_LEAST8_TYPE__ signed char
// X86_64-NETBSD:#define __INT_MAX__ 2147483647
// X86_64-NETBSD:#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
// X86_64-NETBSD:#define __LDBL_DIG__ 18
@@ -3182,6 +6739,7 @@
// X86_64-NETBSD:#define __REGISTER_PREFIX__
// X86_64-NETBSD:#define __SCHAR_MAX__ 127
// X86_64-NETBSD:#define __SHRT_MAX__ 32767
+// X86_64-NETBSD:#define __SIG_ATOMIC_MAX__ 2147483647
// X86_64-NETBSD:#define __SIG_ATOMIC_WIDTH__ 32
// X86_64-NETBSD:#define __SIZEOF_DOUBLE__ 8
// X86_64-NETBSD:#define __SIZEOF_FLOAT__ 4
@@ -3202,7 +6760,41 @@
// X86_64-NETBSD:#define __SSE2__ 1
// X86_64-NETBSD:#define __SSE_MATH__ 1
// X86_64-NETBSD:#define __SSE__ 1
+// X86_64-NETBSD:#define __UINT16_C_SUFFIX__ {{$}}
+// X86_64-NETBSD:#define __UINT16_MAX__ 65535
+// X86_64-NETBSD:#define __UINT16_TYPE__ unsigned short
+// X86_64-NETBSD:#define __UINT32_C_SUFFIX__ U
+// X86_64-NETBSD:#define __UINT32_MAX__ 4294967295U
+// X86_64-NETBSD:#define __UINT32_TYPE__ unsigned int
+// X86_64-NETBSD:#define __UINT64_C_SUFFIX__ UL
+// X86_64-NETBSD:#define __UINT64_MAX__ 18446744073709551615UL
+// X86_64-NETBSD:#define __UINT64_TYPE__ long unsigned int
+// X86_64-NETBSD:#define __UINT8_C_SUFFIX__ {{$}}
+// X86_64-NETBSD:#define __UINT8_MAX__ 255
+// X86_64-NETBSD:#define __UINT8_TYPE__ unsigned char
+// X86_64-NETBSD:#define __UINTMAX_C_SUFFIX__ UL
+// X86_64-NETBSD:#define __UINTMAX_MAX__ 18446744073709551615UL
// X86_64-NETBSD:#define __UINTMAX_TYPE__ long unsigned int
+// X86_64-NETBSD:#define __UINTMAX_WIDTH__ 64
+// X86_64-NETBSD:#define __UINTPTR_MAX__ 18446744073709551615UL
+// X86_64-NETBSD:#define __UINTPTR_TYPE__ long unsigned int
+// X86_64-NETBSD:#define __UINTPTR_WIDTH__ 64
+// X86_64-NETBSD:#define __UINT_FAST16_MAX__ 65535
+// X86_64-NETBSD:#define __UINT_FAST16_TYPE__ unsigned short
+// X86_64-NETBSD:#define __UINT_FAST32_MAX__ 4294967295U
+// X86_64-NETBSD:#define __UINT_FAST32_TYPE__ unsigned int
+// X86_64-NETBSD:#define __UINT_FAST64_MAX__ 18446744073709551615UL
+// X86_64-NETBSD:#define __UINT_FAST64_TYPE__ long unsigned int
+// X86_64-NETBSD:#define __UINT_FAST8_MAX__ 255
+// X86_64-NETBSD:#define __UINT_FAST8_TYPE__ unsigned char
+// X86_64-NETBSD:#define __UINT_LEAST16_MAX__ 65535
+// X86_64-NETBSD:#define __UINT_LEAST16_TYPE__ unsigned short
+// X86_64-NETBSD:#define __UINT_LEAST32_MAX__ 4294967295U
+// X86_64-NETBSD:#define __UINT_LEAST32_TYPE__ unsigned int
+// X86_64-NETBSD:#define __UINT_LEAST64_MAX__ 18446744073709551615UL
+// X86_64-NETBSD:#define __UINT_LEAST64_TYPE__ long unsigned int
+// X86_64-NETBSD:#define __UINT_LEAST8_MAX__ 255
+// X86_64-NETBSD:#define __UINT_LEAST8_TYPE__ unsigned char
// X86_64-NETBSD:#define __USER_LABEL_PREFIX__
// X86_64-NETBSD:#define __WCHAR_MAX__ 2147483647
// X86_64-NETBSD:#define __WCHAR_TYPE__ int
@@ -3216,16 +6808,20 @@
//
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=sparc64-none-none < /dev/null | FileCheck -check-prefix SPARCV9 %s
// SPARCV9:#define __INT64_TYPE__ long int
+// SPARCV9:#define __INTMAX_C_SUFFIX__ L
// SPARCV9:#define __INTMAX_TYPE__ long int
// SPARCV9:#define __INTPTR_TYPE__ long int
// SPARCV9:#define __LONG_MAX__ 9223372036854775807L
// SPARCV9:#define __LP64__ 1
// SPARCV9:#define __SIZEOF_LONG__ 8
// SPARCV9:#define __SIZEOF_POINTER__ 8
+// SPARCV9:#define __UINTPTR_TYPE__ long unsigned int
//
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=sparc64-none-openbsd < /dev/null | FileCheck -check-prefix SPARC64-OBSD %s
// SPARC64-OBSD:#define __INT64_TYPE__ long long int
+// SPARC64-OBSD:#define __INTMAX_C_SUFFIX__ LL
// SPARC64-OBSD:#define __INTMAX_TYPE__ long long int
+// SPARC64-OBSD:#define __UINTMAX_C_SUFFIX__ ULL
// SPARC64-OBSD:#define __UINTMAX_TYPE__ long long unsigned int
//
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=x86_64-pc-kfreebsd-gnu < /dev/null | FileCheck -check-prefix KFREEBSD-DEFINE %s
@@ -3251,4 +6847,6 @@
// PPC64-FREEBSD-NOT: #define __LONG_DOUBLE_128__ 1
//
// RUN: %clang_cc1 -E -dM -ffreestanding -triple=xcore-none-none < /dev/null | FileCheck -check-prefix XCORE %s
+// XCORE:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
+// XCORE:#define __LITTLE_ENDIAN__ 1
// XCORE:#define __XS1B__ 1
diff --git a/test/Preprocessor/macho-embedded-predefines.c b/test/Preprocessor/macho-embedded-predefines.c
new file mode 100644
index 000000000000..74f29199218c
--- /dev/null
+++ b/test/Preprocessor/macho-embedded-predefines.c
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -E -dM -triple thumbv7m-apple-unknown-macho -target-cpu cortex-m3 %s | FileCheck %s -check-prefix CHECK-7M
+
+// CHECK-7M: #define __APPLE_CC__
+// CHECK-7M: #define __APPLE__
+// CHECK-7M: #define __ARM_ARCH_7M__
+// CHECK-7M-NOT: #define __MACH__
+
+// RUN: %clang_cc1 -E -dM -triple thumbv7em-apple-unknown-macho -target-cpu cortex-m4 %s | FileCheck %s -check-prefix CHECK-7EM
+
+// CHECK-7EM: #define __APPLE_CC__
+// CHECK-7EM: #define __APPLE__
+// CHECK-7EM: #define __ARM_ARCH_7EM__
+// CHECK-7EM-NOT: #define __MACH__
+
+// RUN: %clang_cc1 -E -dM -triple thumbv6m-apple-unknown-macho -target-cpu cortex-m0 %s | FileCheck %s -check-prefix CHECK-6M
+
+// CHECK-6M: #define __APPLE_CC__
+// CHECK-6M: #define __APPLE__
+// CHECK-6M: #define __ARM_ARCH_6M__
+// CHECK-6M-NOT: #define __MACH__
diff --git a/test/Preprocessor/macro-multiline.c b/test/Preprocessor/macro-multiline.c
new file mode 100644
index 000000000000..526192860cf0
--- /dev/null
+++ b/test/Preprocessor/macro-multiline.c
@@ -0,0 +1,7 @@
+// RUN: printf -- "-DX=A\nTHIS_SHOULD_NOT_EXIST_IN_THE_OUTPUT" | xargs -0 %clang -E %s | FileCheck -strict-whitespace %s
+// REQUIRES: shell
+
+// Per GCC -D semantics, \n and anything that follows is ignored.
+
+// CHECK: {{^START A END$}}
+START X END
diff --git a/test/Preprocessor/macro-multiline.c.ignoreme b/test/Preprocessor/macro-multiline.c.ignoreme
deleted file mode 100644
index df7c40a954d6..000000000000
--- a/test/Preprocessor/macro-multiline.c.ignoreme
+++ /dev/null
@@ -1,8 +0,0 @@
-// RUN: %clang -E %s "-DX=A
-// RUN: THIS_SHOULD_NOT_EXIST_IN_THE_OUTPUT" > %t
-// RUN: grep "GOOD: A" %t
-// RUN: not grep THIS_SHOULD_NOT_EXIST_IN_THE_OUTPUT %t
-// rdar://6762183
-
-GOOD: X
-
diff --git a/test/Preprocessor/macro_arg_empty.c b/test/Preprocessor/macro_arg_empty.c
new file mode 100644
index 000000000000..b5ecaa27ba19
--- /dev/null
+++ b/test/Preprocessor/macro_arg_empty.c
@@ -0,0 +1,7 @@
+// RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s
+
+#define FOO(x) x
+#define BAR(x) x x
+#define BAZ(x) [x] [ x] [x ]
+[FOO()] [ FOO()] [FOO() ] [BAR()] [ BAR()] [BAR() ] BAZ()
+// CHECK: [] [ ] [ ] [ ] [ ] [ ] [] [ ] [ ]
diff --git a/test/Preprocessor/macro_expand_empty.c b/test/Preprocessor/macro_expand_empty.c
index 3fb6394dc9ea..550772888146 100644
--- a/test/Preprocessor/macro_expand_empty.c
+++ b/test/Preprocessor/macro_expand_empty.c
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only %s
+// RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s
+
// Check that this doesn't crash
#define IDENTITY1(x) x
@@ -12,3 +13,9 @@
#define IDENTITY9(x) IDENTITY8(x) IDENTITY8(x) IDENTITY8(x) IDENTITY8(x)
#define IDENTITY0(x) IDENTITY9(x) IDENTITY9(x) IDENTITY9(x) IDENTITY9(x)
IDENTITY0()
+
+#define FOO() BAR() second
+#define BAR()
+first // CHECK: {{^}}first{{$}}
+FOO() // CHECK: {{^}} second{{$}}
+third // CHECK: {{^}}third{{$}}
diff --git a/test/Preprocessor/macro_paste_commaext.c b/test/Preprocessor/macro_paste_commaext.c
index 7cfe43d077be..fdb8f982a929 100644
--- a/test/Preprocessor/macro_paste_commaext.c
+++ b/test/Preprocessor/macro_paste_commaext.c
@@ -1,8 +1,8 @@
// RUN: %clang_cc1 %s -E | grep 'V);'
// RUN: %clang_cc1 %s -E | grep 'W, 1, 2);'
// RUN: %clang_cc1 %s -E | grep 'X, 1, 2);'
-// RUN: %clang_cc1 %s -E | grep 'Y, );'
-// RUN: %clang_cc1 %s -E | grep 'Z, );'
+// RUN: %clang_cc1 %s -E | grep 'Y,);'
+// RUN: %clang_cc1 %s -E | grep 'Z,);'
#define debug(format, ...) format, ## __VA_ARGS__)
debug(V);
diff --git a/test/Preprocessor/macro_paste_spacing.c b/test/Preprocessor/macro_paste_spacing.c
index 6498ffc9814d..481d457e66a5 100644
--- a/test/Preprocessor/macro_paste_spacing.c
+++ b/test/Preprocessor/macro_paste_spacing.c
@@ -1,7 +1,21 @@
-// RUN: %clang_cc1 %s -E | grep "^xy$"
+// RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s
#define A x ## y
blah
A
+// CHECK: {{^}}xy{{$}}
+#define B(x, y) [v ## w] [ v##w] [v##w ] [w ## x] [ w##x] [w##x ] [x ## y] [ x##y] [x##y ] [y ## z] [ y##z] [y##z ]
+B(x,y)
+// CHECK: [vw] [ vw] [vw ] [wx] [ wx] [wx ] [xy] [ xy] [xy ] [yz] [ yz] [yz ]
+B(x,)
+// CHECK: [vw] [ vw] [vw ] [wx] [ wx] [wx ] [x] [ x] [x ] [z] [ z] [z ]
+B(,y)
+// CHECK: [vw] [ vw] [vw ] [w] [ w] [w ] [y] [ y] [y ] [yz] [ yz] [yz ]
+B(,)
+// CHECK: [vw] [ vw] [vw ] [w] [ w] [w ] [] [ ] [ ] [z] [ z] [z ]
+
+#define C(x, y, z) [x ## y ## z]
+C(,,) C(a,,) C(,b,) C(,,c) C(a,b,) C(a,,c) C(,b,c) C(a,b,c)
+// CHECK: [] [a] [b] [c] [ab] [ac] [bc] [abc]
diff --git a/test/Preprocessor/macro_redefined.c b/test/Preprocessor/macro_redefined.c
new file mode 100644
index 000000000000..f7d3d6db002f
--- /dev/null
+++ b/test/Preprocessor/macro_redefined.c
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 %s -Eonly -verify -Wno-all -Wmacro-redefined -DCLI_MACRO=1 -DWMACRO_REDEFINED
+// RUN: %clang_cc1 %s -Eonly -verify -Wno-all -Wno-macro-redefined -DCLI_MACRO=1
+
+#ifndef WMACRO_REDEFINED
+// expected-no-diagnostics
+#endif
+
+#ifdef WMACRO_REDEFINED
+// expected-note@1 {{previous definition is here}}
+// expected-warning@+2 {{macro redefined}}
+#endif
+#define CLI_MACRO
+
+#ifdef WMACRO_REDEFINED
+// expected-note@+3 {{previous definition is here}}
+// expected-warning@+3 {{macro redefined}}
+#endif
+#define REGULAR_MACRO
+#define REGULAR_MACRO 1
diff --git a/test/Preprocessor/macro_space.c b/test/Preprocessor/macro_space.c
index 8a47a3b08f68..13e531fff151 100644
--- a/test/Preprocessor/macro_space.c
+++ b/test/Preprocessor/macro_space.c
@@ -1,6 +1,36 @@
// RUN: %clang_cc1 -E %s | FileCheck --strict-whitespace %s
-#define XX
-! XX,
+#define FOO1()
+#define FOO2(x)x
+#define FOO3(x) x
+#define FOO4(x)x x
+#define FOO5(x) x x
+#define FOO6(x) [x]
+#define FOO7(x) [ x]
+#define FOO8(x) [x ]
-// CHECK: {{^}}! ,{{$}}
+#define TEST(FOO,x) FOO <FOO()> < FOO()> <FOO ()> <FOO( )> <FOO() > <FOO()x> <FOO() x> < FOO()x>
+
+TEST(FOO1,)
+// CHECK: FOO1 <> < > <> <> < > <> < > < >
+
+TEST(FOO2,)
+// CHECK: FOO2 <> < > <> <> < > <> < > < >
+
+TEST(FOO3,)
+// CHECK: FOO3 <> < > <> <> < > <> < > < >
+
+TEST(FOO4,)
+// CHECK: FOO4 < > < > < > < > < > < > < > < >
+
+TEST(FOO5,)
+// CHECK: FOO5 < > < > < > < > < > < > < > < >
+
+TEST(FOO6,)
+// CHECK: FOO6 <[]> < []> <[]> <[]> <[] > <[]> <[] > < []>
+
+TEST(FOO7,)
+// CHECK: FOO7 <[ ]> < [ ]> <[ ]> <[ ]> <[ ] > <[ ]> <[ ] > < [ ]>
+
+TEST(FOO8,)
+// CHECK: FOO8 <[ ]> < [ ]> <[ ]> <[ ]> <[ ] > <[ ]> <[ ] > < [ ]>
diff --git a/test/Preprocessor/microsoft-header-search.c b/test/Preprocessor/microsoft-header-search.c
new file mode 100644
index 000000000000..2cdc54e5c416
--- /dev/null
+++ b/test/Preprocessor/microsoft-header-search.c
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -I%S/Inputs/microsoft-header-search %s -fms-compatibility -verify
+
+// expected-warning@Inputs/microsoft-header-search/a/findme.h:3 {{findme.h successfully included using MS search rules}}
+// expected-warning@Inputs/microsoft-header-search/a/b/include3.h:3 {{#include resolved using non-portable MSVC search rules as}}
+
+// expected-warning@Inputs/microsoft-header-search/falsepos.h:3 {{successfully resolved the falsepos.h header}}
+
+#include "Inputs/microsoft-header-search/include1.h"
diff --git a/test/Preprocessor/predefined-arch-macros.c b/test/Preprocessor/predefined-arch-macros.c
index 26298f9ada34..cba458e7267f 100644
--- a/test/Preprocessor/predefined-arch-macros.c
+++ b/test/Preprocessor/predefined-arch-macros.c
@@ -1437,6 +1437,76 @@
// CHECK_BDVER3_M64: #define __tune_bdver3__ 1
// CHECK_BDVER3_M64: #define __x86_64 1
// CHECK_BDVER3_M64: #define __x86_64__ 1
+// RUN: %clang -march=bdver4 -m32 -E -dM %s -o - 2>&1 \
+// RUN: -target i386-unknown-linux \
+// RUN: | FileCheck %s -check-prefix=CHECK_BDVER4_M32
+// CHECK_BDVER4_M32-NOT: #define __3dNOW_A__ 1
+// CHECK_BDVER4_M32-NOT: #define __3dNOW__ 1
+// CHECK_BDVER4_M32: #define __AES__ 1
+// CHECK_BDVER4_M32: #define __AVX2__ 1
+// CHECK_BDVER4_M32: #define __AVX__ 1
+// CHECK_BDVER4_M32: #define __BMI2__ 1
+// CHECK_BDVER4_M32: #define __BMI__ 1
+// CHECK_BDVER4_M32: #define __F16C__ 1
+// CHECK_BDVER4_M32: #define __FMA4__ 1
+// CHECK_BDVER4_M32: #define __FMA__ 1
+// CHECK_BDVER4_M32: #define __LZCNT__ 1
+// CHECK_BDVER4_M32: #define __MMX__ 1
+// CHECK_BDVER4_M32: #define __PCLMUL__ 1
+// CHECK_BDVER4_M32: #define __POPCNT__ 1
+// CHECK_BDVER4_M32: #define __PRFCHW__ 1
+// CHECK_BDVER4_M32: #define __SSE2_MATH__ 1
+// CHECK_BDVER4_M32: #define __SSE2__ 1
+// CHECK_BDVER4_M32: #define __SSE3__ 1
+// CHECK_BDVER4_M32: #define __SSE4A__ 1
+// CHECK_BDVER4_M32: #define __SSE4_1__ 1
+// CHECK_BDVER4_M32: #define __SSE4_2__ 1
+// CHECK_BDVER4_M32: #define __SSE_MATH__ 1
+// CHECK_BDVER4_M32: #define __SSE__ 1
+// CHECK_BDVER4_M32: #define __SSSE3__ 1
+// CHECK_BDVER4_M32: #define __TBM__ 1
+// CHECK_BDVER4_M32: #define __XOP__ 1
+// CHECK_BDVER4_M32: #define __bdver4 1
+// CHECK_BDVER4_M32: #define __bdver4__ 1
+// CHECK_BDVER4_M32: #define __i386 1
+// CHECK_BDVER4_M32: #define __i386__ 1
+// CHECK_BDVER4_M32: #define __tune_bdver4__ 1
+// RUN: %clang -march=bdver4 -m64 -E -dM %s -o - 2>&1 \
+// RUN: -target i386-unknown-linux \
+// RUN: | FileCheck %s -check-prefix=CHECK_BDVER4_M64
+// CHECK_BDVER4_M64-NOT: #define __3dNOW_A__ 1
+// CHECK_BDVER4_M64-NOT: #define __3dNOW__ 1
+// CHECK_BDVER4_M64: #define __AES__ 1
+// CHECK_BDVER4_M64: #define __AVX2__ 1
+// CHECK_BDVER4_M64: #define __AVX__ 1
+// CHECK_BDVER4_M64: #define __BMI2__ 1
+// CHECK_BDVER4_M64: #define __BMI__ 1
+// CHECK_BDVER4_M64: #define __F16C__ 1
+// CHECK_BDVER4_M64: #define __FMA4__ 1
+// CHECK_BDVER4_M64: #define __FMA__ 1
+// CHECK_BDVER4_M64: #define __LZCNT__ 1
+// CHECK_BDVER4_M64: #define __MMX__ 1
+// CHECK_BDVER4_M64: #define __PCLMUL__ 1
+// CHECK_BDVER4_M64: #define __POPCNT__ 1
+// CHECK_BDVER4_M64: #define __PRFCHW__ 1
+// CHECK_BDVER4_M64: #define __SSE2_MATH__ 1
+// CHECK_BDVER4_M64: #define __SSE2__ 1
+// CHECK_BDVER4_M64: #define __SSE3__ 1
+// CHECK_BDVER4_M64: #define __SSE4A__ 1
+// CHECK_BDVER4_M64: #define __SSE4_1__ 1
+// CHECK_BDVER4_M64: #define __SSE4_2__ 1
+// CHECK_BDVER4_M64: #define __SSE_MATH__ 1
+// CHECK_BDVER4_M64: #define __SSE__ 1
+// CHECK_BDVER4_M64: #define __SSSE3__ 1
+// CHECK_BDVER4_M64: #define __TBM__ 1
+// CHECK_BDVER4_M64: #define __XOP__ 1
+// CHECK_BDVER4_M64: #define __amd64 1
+// CHECK_BDVER4_M64: #define __amd64__ 1
+// CHECK_BDVER4_M64: #define __bdver4 1
+// CHECK_BDVER4_M64: #define __bdver4__ 1
+// CHECK_BDVER4_M64: #define __tune_bdver4__ 1
+// CHECK_BDVER4_M64: #define __x86_64 1
+// CHECK_BDVER4_M64: #define __x86_64__ 1
//
// End X86/GCC/Linux tests ------------------
diff --git a/test/Preprocessor/predefined-macros.c b/test/Preprocessor/predefined-macros.c
index 11449f930ef1..1db9080ac34c 100644
--- a/test/Preprocessor/predefined-macros.c
+++ b/test/Preprocessor/predefined-macros.c
@@ -1,14 +1,86 @@
// This test verifies that the correct macros are predefined.
//
// RUN: %clang_cc1 %s -E -dM -triple i686-pc-win32 -fms-extensions -fms-compatibility \
-// RUN: -fmsc-version=1300 -o - | FileCheck %s --check-prefix=CHECK-MS
+// RUN: -fms-compatibility-version=13.00 -o - | FileCheck %s --check-prefix=CHECK-MS
// CHECK-MS: #define _INTEGRAL_MAX_BITS 64
// CHECK-MS: #define _MSC_EXTENSIONS 1
// CHECK-MS: #define _MSC_VER 1300
// CHECK-MS: #define _M_IX86 600
// CHECK-MS: #define _M_IX86_FP
// CHECK-MS: #define _WIN32 1
-// CHECK-MS-NOT: #define __GNUC__
+// CHECK-MS-NOT: #define __STRICT_ANSI__
+// CHECK-MS-NOT: GCC
+// CHECK-MS-NOT: GNU
+// CHECK-MS-NOT: GXX
+//
+// RUN: %clang_cc1 %s -E -dM -triple x86_64-pc-win32 -fms-extensions -fms-compatibility \
+// RUN: -fms-compatibility-version=13.00 -o - | FileCheck %s --check-prefix=CHECK-MS64
+// CHECK-MS64: #define _INTEGRAL_MAX_BITS 64
+// CHECK-MS64: #define _MSC_EXTENSIONS 1
+// CHECK-MS64: #define _MSC_VER 1300
+// CHECK-MS64: #define _M_AMD64 1
+// CHECK-MS64: #define _M_X64 1
+// CHECK-MS64: #define _WIN64 1
+// CHECK-MS64-NOT: #define __STRICT_ANSI__
+// CHECK-MS64-NOT: GCC
+// CHECK-MS64-NOT: GNU
+// CHECK-MS64-NOT: GXX
+//
+// RUN: %clang_cc1 %s -E -dM -triple i686-pc-win32 -fms-compatibility \
+// RUN: -o - | FileCheck %s --check-prefix=CHECK-MS-STDINT
+// CHECK-MS-STDINT-NOT:#define __INT16_MAX__ 32767
+// CHECK-MS-STDINT-NOT:#define __INT32_MAX__ 2147483647
+// CHECK-MS-STDINT-NOT:#define __INT64_MAX__ 9223372036854775807LL
+// CHECK-MS-STDINT-NOT:#define __INT8_MAX__ 127
+// CHECK-MS-STDINT-NOT:#define __INTPTR_MAX__ 2147483647
+// CHECK-MS-STDINT-NOT:#define __INT_FAST16_MAX__ 32767
+// CHECK-MS-STDINT-NOT:#define __INT_FAST16_TYPE__ short
+// CHECK-MS-STDINT-NOT:#define __INT_FAST32_MAX__ 2147483647
+// CHECK-MS-STDINT-NOT:#define __INT_FAST32_TYPE__ int
+// CHECK-MS-STDINT-NOT:#define __INT_FAST64_MAX__ 9223372036854775807LL
+// CHECK-MS-STDINT-NOT:#define __INT_FAST64_TYPE__ long long int
+// CHECK-MS-STDINT-NOT:#define __INT_FAST8_MAX__ 127
+// CHECK-MS-STDINT-NOT:#define __INT_FAST8_TYPE__ char
+// CHECK-MS-STDINT-NOT:#define __INT_LEAST16_MAX__ 32767
+// CHECK-MS-STDINT-NOT:#define __INT_LEAST16_TYPE__ short
+// CHECK-MS-STDINT-NOT:#define __INT_LEAST32_MAX__ 2147483647
+// CHECK-MS-STDINT-NOT:#define __INT_LEAST32_TYPE__ int
+// CHECK-MS-STDINT-NOT:#define __INT_LEAST64_MAX__ 9223372036854775807LL
+// CHECK-MS-STDINT-NOT:#define __INT_LEAST64_TYPE__ long long int
+// CHECK-MS-STDINT-NOT:#define __INT_LEAST8_MAX__ 127
+// CHECK-MS-STDINT-NOT:#define __INT_LEAST8_TYPE__ char
+// CHECK-MS-STDINT-NOT:#define __UINT16_C_SUFFIX__ U
+// CHECK-MS-STDINT-NOT:#define __UINT16_MAX__ 65535U
+// CHECK-MS-STDINT-NOT:#define __UINT16_TYPE__ unsigned short
+// CHECK-MS-STDINT-NOT:#define __UINT32_C_SUFFIX__ U
+// CHECK-MS-STDINT-NOT:#define __UINT32_MAX__ 4294967295U
+// CHECK-MS-STDINT-NOT:#define __UINT32_TYPE__ unsigned int
+// CHECK-MS-STDINT-NOT:#define __UINT64_C_SUFFIX__ ULL
+// CHECK-MS-STDINT-NOT:#define __UINT64_MAX__ 18446744073709551615ULL
+// CHECK-MS-STDINT-NOT:#define __UINT64_TYPE__ long long unsigned int
+// CHECK-MS-STDINT-NOT:#define __UINT8_C_SUFFIX__ U
+// CHECK-MS-STDINT-NOT:#define __UINT8_MAX__ 255U
+// CHECK-MS-STDINT-NOT:#define __UINT8_TYPE__ unsigned char
+// CHECK-MS-STDINT-NOT:#define __UINTMAX_MAX__ 18446744073709551615ULL
+// CHECK-MS-STDINT-NOT:#define __UINTPTR_MAX__ 4294967295U
+// CHECK-MS-STDINT-NOT:#define __UINTPTR_TYPE__ unsigned int
+// CHECK-MS-STDINT-NOT:#define __UINTPTR_WIDTH__ 32
+// CHECK-MS-STDINT-NOT:#define __UINT_FAST16_MAX__ 65535U
+// CHECK-MS-STDINT-NOT:#define __UINT_FAST16_TYPE__ unsigned short
+// CHECK-MS-STDINT-NOT:#define __UINT_FAST32_MAX__ 4294967295U
+// CHECK-MS-STDINT-NOT:#define __UINT_FAST32_TYPE__ unsigned int
+// CHECK-MS-STDINT-NOT:#define __UINT_FAST64_MAX__ 18446744073709551615ULL
+// CHECK-MS-STDINT-NOT:#define __UINT_FAST64_TYPE__ long long unsigned int
+// CHECK-MS-STDINT-NOT:#define __UINT_FAST8_MAX__ 255U
+// CHECK-MS-STDINT-NOT:#define __UINT_FAST8_TYPE__ unsigned char
+// CHECK-MS-STDINT-NOT:#define __UINT_LEAST16_MAX__ 65535U
+// CHECK-MS-STDINT-NOT:#define __UINT_LEAST16_TYPE__ unsigned short
+// CHECK-MS-STDINT-NOT:#define __UINT_LEAST32_MAX__ 4294967295U
+// CHECK-MS-STDINT-NOT:#define __UINT_LEAST32_TYPE__ unsigned int
+// CHECK-MS-STDINT-NOT:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL
+// CHECK-MS-STDINT-NOT:#define __UINT_LEAST64_TYPE__ long long unsigned int
+// CHECK-MS-STDINT-NOT:#define __UINT_LEAST8_MAX__ 255U
+// CHECK-MS-STDINT-NOT:#define __UINT_LEAST8_TYPE__ unsigned char
//
// RUN: %clang_cc1 %s -E -dM -ffast-math -o - \
// RUN: | FileCheck %s --check-prefix=CHECK-FAST-MATH
diff --git a/test/Preprocessor/print-pragma-microsoft.c b/test/Preprocessor/print-pragma-microsoft.c
new file mode 100644
index 000000000000..5c4fb4ffc965
--- /dev/null
+++ b/test/Preprocessor/print-pragma-microsoft.c
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 %s -fsyntax-only -fms-extensions -E -o - | FileCheck %s
+
+#define BAR "2"
+#pragma comment(linker, "bar=" BAR)
+// CHECK: #pragma comment(linker, "bar=" "2")
+#pragma comment(user, "Compiled on " __DATE__ " at " __TIME__)
+// CHECK: #pragma comment(user, "Compiled on " "{{[^"]*}}" " at " "{{[^"]*}}")
+
+#define KEY1 "KEY1"
+#define KEY2 "KEY2"
+#define VAL1 "VAL1\""
+#define VAL2 "VAL2"
+
+#pragma detect_mismatch(KEY1 KEY2, VAL1 VAL2)
+// CHECK: #pragma detect_mismatch("KEY1" "KEY2", "VAL1\"" "VAL2")
+
+#define _CRT_PACKING 8
+#pragma pack(push, _CRT_PACKING)
+// CHECK: #pragma pack(push, 8)
+#pragma pack(pop)
diff --git a/test/Preprocessor/stdint.c b/test/Preprocessor/stdint.c
index b92cfe7cf37a..94d5b0b0b337 100644
--- a/test/Preprocessor/stdint.c
+++ b/test/Preprocessor/stdint.c
@@ -1,20 +1,20 @@
// RUN: %clang_cc1 -E -ffreestanding -triple=arm-none-none %s | FileCheck -check-prefix ARM %s
//
-// ARM:typedef signed long long int int64_t;
-// ARM:typedef unsigned long long int uint64_t;
+// ARM:typedef long long int int64_t;
+// ARM:typedef long long unsigned int uint64_t;
// ARM:typedef int64_t int_least64_t;
// ARM:typedef uint64_t uint_least64_t;
// ARM:typedef int64_t int_fast64_t;
// ARM:typedef uint64_t uint_fast64_t;
//
-// ARM:typedef signed int int32_t;
+// ARM:typedef int int32_t;
// ARM:typedef unsigned int uint32_t;
// ARM:typedef int32_t int_least32_t;
// ARM:typedef uint32_t uint_least32_t;
// ARM:typedef int32_t int_fast32_t;
// ARM:typedef uint32_t uint_fast32_t;
//
-// ARM:typedef signed short int16_t;
+// ARM:typedef short int16_t;
// ARM:typedef unsigned short uint16_t;
// ARM:typedef int16_t int_least16_t;
// ARM:typedef uint16_t uint_least16_t;
@@ -108,21 +108,21 @@
//
// RUN: %clang_cc1 -E -ffreestanding -triple=i386-none-none %s | FileCheck -check-prefix I386 %s
//
-// I386:typedef signed long long int int64_t;
-// I386:typedef unsigned long long int uint64_t;
+// I386:typedef long long int int64_t;
+// I386:typedef long long unsigned int uint64_t;
// I386:typedef int64_t int_least64_t;
// I386:typedef uint64_t uint_least64_t;
// I386:typedef int64_t int_fast64_t;
// I386:typedef uint64_t uint_fast64_t;
//
-// I386:typedef signed int int32_t;
+// I386:typedef int int32_t;
// I386:typedef unsigned int uint32_t;
// I386:typedef int32_t int_least32_t;
// I386:typedef uint32_t uint_least32_t;
// I386:typedef int32_t int_fast32_t;
// I386:typedef uint32_t uint_fast32_t;
//
-// I386:typedef signed short int16_t;
+// I386:typedef short int16_t;
// I386:typedef unsigned short uint16_t;
// I386:typedef int16_t int_least16_t;
// I386:typedef uint16_t uint_least16_t;
@@ -215,21 +215,21 @@
//
// RUN: %clang_cc1 -E -ffreestanding -triple=mips-none-none %s | FileCheck -check-prefix MIPS %s
//
-// MIPS:typedef signed long long int int64_t;
-// MIPS:typedef unsigned long long int uint64_t;
+// MIPS:typedef long long int int64_t;
+// MIPS:typedef long long unsigned int uint64_t;
// MIPS:typedef int64_t int_least64_t;
// MIPS:typedef uint64_t uint_least64_t;
// MIPS:typedef int64_t int_fast64_t;
// MIPS:typedef uint64_t uint_fast64_t;
//
-// MIPS:typedef signed int int32_t;
+// MIPS:typedef int int32_t;
// MIPS:typedef unsigned int uint32_t;
// MIPS:typedef int32_t int_least32_t;
// MIPS:typedef uint32_t uint_least32_t;
// MIPS:typedef int32_t int_fast32_t;
// MIPS:typedef uint32_t uint_fast32_t;
//
-// MIPS:typedef signed short int16_t;
+// MIPS:typedef short int16_t;
// MIPS:typedef unsigned short uint16_t;
// MIPS:typedef int16_t int_least16_t;
// MIPS:typedef uint16_t uint_least16_t;
@@ -322,21 +322,21 @@
//
// RUN: %clang_cc1 -E -ffreestanding -triple=mips64-none-none %s | FileCheck -check-prefix MIPS64 %s
//
-// MIPS64:typedef signed long long int int64_t;
-// MIPS64:typedef unsigned long long int uint64_t;
+// MIPS64:typedef long long int int64_t;
+// MIPS64:typedef long long unsigned int uint64_t;
// MIPS64:typedef int64_t int_least64_t;
// MIPS64:typedef uint64_t uint_least64_t;
// MIPS64:typedef int64_t int_fast64_t;
// MIPS64:typedef uint64_t uint_fast64_t;
//
-// MIPS64:typedef signed int int32_t;
+// MIPS64:typedef int int32_t;
// MIPS64:typedef unsigned int uint32_t;
// MIPS64:typedef int32_t int_least32_t;
// MIPS64:typedef uint32_t uint_least32_t;
// MIPS64:typedef int32_t int_fast32_t;
// MIPS64:typedef uint32_t uint_fast32_t;
//
-// MIPS64:typedef signed short int16_t;
+// MIPS64:typedef short int16_t;
// MIPS64:typedef unsigned short uint16_t;
// MIPS64:typedef int16_t int_least16_t;
// MIPS64:typedef uint16_t uint_least16_t;
@@ -429,14 +429,14 @@
//
// RUN: %clang_cc1 -E -ffreestanding -triple=msp430-none-none %s | FileCheck -check-prefix MSP430 %s
//
-// MSP430:typedef signed long int int32_t;
-// MSP430:typedef unsigned long int uint32_t;
+// MSP430:typedef long int int32_t;
+// MSP430:typedef long unsigned int uint32_t;
// MSP430:typedef int32_t int_least32_t;
// MSP430:typedef uint32_t uint_least32_t;
// MSP430:typedef int32_t int_fast32_t;
// MSP430:typedef uint32_t uint_fast32_t;
//
-// MSP430:typedef signed short int16_t;
+// MSP430:typedef short int16_t;
// MSP430:typedef unsigned short uint16_t;
// MSP430:typedef int16_t int_least16_t;
// MSP430:typedef uint16_t uint_least16_t;
@@ -529,21 +529,21 @@
//
// RUN: %clang_cc1 -E -ffreestanding -triple=powerpc64-none-none %s | FileCheck -check-prefix PPC64 %s
//
-// PPC64:typedef signed long int int64_t;
-// PPC64:typedef unsigned long int uint64_t;
+// PPC64:typedef long int int64_t;
+// PPC64:typedef long unsigned int uint64_t;
// PPC64:typedef int64_t int_least64_t;
// PPC64:typedef uint64_t uint_least64_t;
// PPC64:typedef int64_t int_fast64_t;
// PPC64:typedef uint64_t uint_fast64_t;
//
-// PPC64:typedef signed int int32_t;
+// PPC64:typedef int int32_t;
// PPC64:typedef unsigned int uint32_t;
// PPC64:typedef int32_t int_least32_t;
// PPC64:typedef uint32_t uint_least32_t;
// PPC64:typedef int32_t int_fast32_t;
// PPC64:typedef uint32_t uint_fast32_t;
//
-// PPC64:typedef signed short int16_t;
+// PPC64:typedef short int16_t;
// PPC64:typedef unsigned short uint16_t;
// PPC64:typedef int16_t int_least16_t;
// PPC64:typedef uint16_t uint_least16_t;
@@ -637,21 +637,21 @@
// RUN: %clang_cc1 -E -ffreestanding -triple=powerpc-none-none %s | FileCheck -check-prefix PPC %s
//
//
-// PPC:typedef signed long long int int64_t;
-// PPC:typedef unsigned long long int uint64_t;
+// PPC:typedef long long int int64_t;
+// PPC:typedef long long unsigned int uint64_t;
// PPC:typedef int64_t int_least64_t;
// PPC:typedef uint64_t uint_least64_t;
// PPC:typedef int64_t int_fast64_t;
// PPC:typedef uint64_t uint_fast64_t;
//
-// PPC:typedef signed int int32_t;
+// PPC:typedef int int32_t;
// PPC:typedef unsigned int uint32_t;
// PPC:typedef int32_t int_least32_t;
// PPC:typedef uint32_t uint_least32_t;
// PPC:typedef int32_t int_fast32_t;
// PPC:typedef uint32_t uint_fast32_t;
//
-// PPC:typedef signed short int16_t;
+// PPC:typedef short int16_t;
// PPC:typedef unsigned short uint16_t;
// PPC:typedef int16_t int_least16_t;
// PPC:typedef uint16_t uint_least16_t;
@@ -744,21 +744,21 @@
//
// RUN: %clang_cc1 -E -ffreestanding -triple=s390x-none-none %s | FileCheck -check-prefix S390X %s
//
-// S390X:typedef signed long long int int64_t;
-// S390X:typedef unsigned long long int uint64_t;
+// S390X:typedef long long int int64_t;
+// S390X:typedef long long unsigned int uint64_t;
// S390X:typedef int64_t int_least64_t;
// S390X:typedef uint64_t uint_least64_t;
// S390X:typedef int64_t int_fast64_t;
// S390X:typedef uint64_t uint_fast64_t;
//
-// S390X:typedef signed int int32_t;
+// S390X:typedef int int32_t;
// S390X:typedef unsigned int uint32_t;
// S390X:typedef int32_t int_least32_t;
// S390X:typedef uint32_t uint_least32_t;
// S390X:typedef int32_t int_fast32_t;
// S390X:typedef uint32_t uint_fast32_t;
//
-// S390X:typedef signed short int16_t;
+// S390X:typedef short int16_t;
// S390X:typedef unsigned short uint16_t;
// S390X:typedef int16_t int_least16_t;
// S390X:typedef uint16_t uint_least16_t;
@@ -851,21 +851,21 @@
//
// RUN: %clang_cc1 -E -ffreestanding -triple=sparc-none-none %s | FileCheck -check-prefix SPARC %s
//
-// SPARC:typedef signed long long int int64_t;
-// SPARC:typedef unsigned long long int uint64_t;
+// SPARC:typedef long long int int64_t;
+// SPARC:typedef long long unsigned int uint64_t;
// SPARC:typedef int64_t int_least64_t;
// SPARC:typedef uint64_t uint_least64_t;
// SPARC:typedef int64_t int_fast64_t;
// SPARC:typedef uint64_t uint_fast64_t;
//
-// SPARC:typedef signed int int32_t;
+// SPARC:typedef int int32_t;
// SPARC:typedef unsigned int uint32_t;
// SPARC:typedef int32_t int_least32_t;
// SPARC:typedef uint32_t uint_least32_t;
// SPARC:typedef int32_t int_fast32_t;
// SPARC:typedef uint32_t uint_fast32_t;
//
-// SPARC:typedef signed short int16_t;
+// SPARC:typedef short int16_t;
// SPARC:typedef unsigned short uint16_t;
// SPARC:typedef int16_t int_least16_t;
// SPARC:typedef uint16_t uint_least16_t;
@@ -958,14 +958,14 @@
//
// RUN: %clang_cc1 -E -ffreestanding -triple=tce-none-none %s | FileCheck -check-prefix TCE %s
//
-// TCE:typedef signed int int32_t;
+// TCE:typedef int int32_t;
// TCE:typedef unsigned int uint32_t;
// TCE:typedef int32_t int_least32_t;
// TCE:typedef uint32_t uint_least32_t;
// TCE:typedef int32_t int_fast32_t;
// TCE:typedef uint32_t uint_fast32_t;
//
-// TCE:typedef signed short int16_t;
+// TCE:typedef short int16_t;
// TCE:typedef unsigned short uint16_t;
// TCE:typedef int16_t int_least16_t;
// TCE:typedef uint16_t uint_least16_t;
@@ -1059,21 +1059,21 @@
// RUN: %clang_cc1 -E -ffreestanding -triple=x86_64-none-none %s | FileCheck -check-prefix X86_64 %s
//
//
-// X86_64:typedef signed long int int64_t;
-// X86_64:typedef unsigned long int uint64_t;
+// X86_64:typedef long int int64_t;
+// X86_64:typedef long unsigned int uint64_t;
// X86_64:typedef int64_t int_least64_t;
// X86_64:typedef uint64_t uint_least64_t;
// X86_64:typedef int64_t int_fast64_t;
// X86_64:typedef uint64_t uint_fast64_t;
//
-// X86_64:typedef signed int int32_t;
+// X86_64:typedef int int32_t;
// X86_64:typedef unsigned int uint32_t;
// X86_64:typedef int32_t int_least32_t;
// X86_64:typedef uint32_t uint_least32_t;
// X86_64:typedef int32_t int_fast32_t;
// X86_64:typedef uint32_t uint_fast32_t;
//
-// X86_64:typedef signed short int16_t;
+// X86_64:typedef short int16_t;
// X86_64:typedef unsigned short uint16_t;
// X86_64:typedef int16_t int_least16_t;
// X86_64:typedef uint16_t uint_least16_t;
@@ -1173,27 +1173,27 @@
//
// RUN: %clang_cc1 -E -ffreestanding -triple=i386-mingw32 %s | FileCheck -check-prefix I386_MINGW32 %s
//
-// I386_MINGW32:WCHAR_MAX_ 65535U
-// I386_MINGW32:WCHAR_MIN_ 0U
+// I386_MINGW32:WCHAR_MAX_ 65535
+// I386_MINGW32:WCHAR_MIN_ 0
//
//
// RUN: %clang_cc1 -E -ffreestanding -triple=xcore-none-none %s | FileCheck -check-prefix XCORE %s
//
-// XCORE:typedef signed long long int int64_t;
-// XCORE:typedef unsigned long long int uint64_t;
+// XCORE:typedef long long int int64_t;
+// XCORE:typedef long long unsigned int uint64_t;
// XCORE:typedef int64_t int_least64_t;
// XCORE:typedef uint64_t uint_least64_t;
// XCORE:typedef int64_t int_fast64_t;
// XCORE:typedef uint64_t uint_fast64_t;
//
-// XCORE:typedef signed int int32_t;
+// XCORE:typedef int int32_t;
// XCORE:typedef unsigned int uint32_t;
// XCORE:typedef int32_t int_least32_t;
// XCORE:typedef uint32_t uint_least32_t;
// XCORE:typedef int32_t int_fast32_t;
// XCORE:typedef uint32_t uint_fast32_t;
//
-// XCORE:typedef signed short int16_t;
+// XCORE:typedef short int16_t;
// XCORE:typedef unsigned short uint16_t;
// XCORE:typedef int16_t int_least16_t;
// XCORE:typedef uint16_t uint_least16_t;
@@ -1269,7 +1269,7 @@
// XCORE:WINT_MIN_ 0U
// XCORE:WINT_MAX_ 4294967295U
//
-// XCORE:WCHAR_MAX_ 255U
+// XCORE:WCHAR_MAX_ 255
// XCORE:WCHAR_MIN_ 0
//
// XCORE:INT8_C_(0) 0
diff --git a/test/Preprocessor/ucn-allowed-chars.c b/test/Preprocessor/ucn-allowed-chars.c
index d49aa9cbb46e..d7d67fe0d60c 100644
--- a/test/Preprocessor/ucn-allowed-chars.c
+++ b/test/Preprocessor/ucn-allowed-chars.c
@@ -17,7 +17,7 @@ extern char a\uFFFF; // none
// Identifier initial characters
extern char \u0E50; // C++03, C11, C++11
extern char \u0300; // disallowed initially in C11/C++11, always in C99/C++03
-
+extern char \u0D61; // C99, C11, C++03, C++11
diff --git a/test/Preprocessor/ucn-pp-identifier.c b/test/Preprocessor/ucn-pp-identifier.c
index 6936ed92cb59..f045e38e94af 100644
--- a/test/Preprocessor/ucn-pp-identifier.c
+++ b/test/Preprocessor/ucn-pp-identifier.c
@@ -24,9 +24,9 @@
#endif
// Make sure we reject disallowed UCNs
-#define \ufffe // expected-error {{macro names must be identifiers}}
-#define \U10000000 // expected-error {{macro names must be identifiers}}
-#define \u0061 // expected-error {{character 'a' cannot be specified by a universal character name}} expected-error {{macro names must be identifiers}}
+#define \ufffe // expected-error {{macro name must be an identifier}}
+#define \U10000000 // expected-error {{macro name must be an identifier}}
+#define \u0061 // expected-error {{character 'a' cannot be specified by a universal character name}} expected-error {{macro name must be an identifier}}
// FIXME: Not clear what our behavior should be here; \u0024 is "$".
#define a\u0024 // expected-warning {{whitespace}}
diff --git a/test/Preprocessor/woa-defaults.c b/test/Preprocessor/woa-defaults.c
new file mode 100644
index 000000000000..6eab3b96f414
--- /dev/null
+++ b/test/Preprocessor/woa-defaults.c
@@ -0,0 +1,33 @@
+// RUN: %clang_cc1 -dM -triple armv7-windows -E %s | FileCheck %s
+// RUN: %clang_cc1 -dM -fno-signed-char -triple armv7-windows -E %s \
+// RUN: | FileCheck %s -check-prefix CHECK-UNSIGNED-CHAR
+
+// CHECK: #define _INTEGRAL_MAX_BITS 64
+// CHECK: #define _M_ARM 7
+// CHECK: #define _M_ARMT _M_ARM
+// CHECK: #define _M_ARM_FP 31
+// CHECK: #define _M_ARM_NT 1
+// CHECK: #define _M_THUMB _M_ARM
+// CHECK: #define _WIN32 1
+
+// CHECK: #define __ARM_PCS 1
+// CHECK: #define __ARM_PCS_VFP 1
+// CHECK: #define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
+// CHECK: #define __SIZEOF_DOUBLE__ 8
+// CHECK: #define __SIZEOF_FLOAT__ 4
+// CHECK: #define __SIZEOF_INT__ 4
+// CHECK: #define __SIZEOF_LONG_DOUBLE__ 8
+// CHECK: #define __SIZEOF_LONG_LONG__ 8
+// CHECK: #define __SIZEOF_LONG__ 4
+// CHECK: #define __SIZEOF_POINTER__ 4
+// CHECK: #define __SIZEOF_PTRDIFF_T__ 4
+// CHECK: #define __SIZEOF_SHORT__ 2
+// CHECK: #define __SIZEOF_SIZE_T__ 4
+// CHECK: #define __SIZEOF_WCHAR_T__ 2
+// CHECK: #define __SIZEOF_WINT_T__ 4
+
+// CHECK-NOT: __THUMB_INTERWORK__
+// CHECK-NOT: __ARM_EABI__
+// CHECK-NOT: _CHAR_UNSIGNED
+
+// CHECK-UNSIGNED-CHAR: #define _CHAR_UNSIGNED 1
diff --git a/test/Preprocessor/woa-wchar_t.c b/test/Preprocessor/woa-wchar_t.c
new file mode 100644
index 000000000000..eb9a8628537a
--- /dev/null
+++ b/test/Preprocessor/woa-wchar_t.c
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -dM -triple armv7-windows -E %s | FileCheck %s
+// RUN: %clang_cc1 -dM -fno-signed-char -triple armv7-windows -E %s | FileCheck %s
+
+// CHECK: #define __WCHAR_TYPE__ unsigned short
+
diff --git a/test/Preprocessor/x86_target_features.c b/test/Preprocessor/x86_target_features.c
index 751c8ae95853..7bc5cd8b2c1b 100644
--- a/test/Preprocessor/x86_target_features.c
+++ b/test/Preprocessor/x86_target_features.c
@@ -193,16 +193,16 @@
// SHA: #define __SSE2__ 1
// SHA-NOT: #define __SSE3__ 1
-// run: %clang -target i386-unknown-unknown -march=pentiumpro -msha -mno-sha -x c -e -dm -o - %s | filecheck --check-prefix=SHANOSHA %s
+// RUN: %clang -target i386-unknown-unknown -march=pentiumpro -msha -mno-sha -x c -E -dM -o - %s | FileCheck --check-prefix=SHANOSHA %s
// SHANOSHA-NOT: #define __SHA__ 1
// SHANOSHA-NOT: #define __SSE2__ 1
-// run: %clang -target i386-unknown-unknown -march=pentiumpro -msha -mno-sse2 -x c -e -dm -o - %s | filecheck --check-prefix=SHANOSSE2 %s
+// RUN: %clang -target i386-unknown-unknown -march=pentiumpro -msha -mno-sse2 -x c -E -dM -o - %s | FileCheck --check-prefix=SHANOSSE2 %s
-// SHANOSSSE2-NOT: #define __SHA__ 1
-// SHANOSSSE2-NOT: #define __SSE2__ 1
-// SHANOSSSE2-NOT: #define __SSE3__ 1
+// SHANOSSE2-NOT: #define __SHA__ 1
+// SHANOSSE2-NOT: #define __SSE2__ 1
+// SHANOSSE2-NOT: #define __SSE3__ 1
// RUN: %clang -target i386-unknown-unknown -march=atom -mtbm -x c -E -dM -o - %s | FileCheck --check-prefix=TBM %s
diff --git a/test/Profile/Inputs/c-attributes.proftext b/test/Profile/Inputs/c-attributes.proftext
new file mode 100644
index 000000000000..e4d4694a8d92
--- /dev/null
+++ b/test/Profile/Inputs/c-attributes.proftext
@@ -0,0 +1,34 @@
+hot_100_percent
+2
+2
+100000
+4999950000
+
+hot_40_percent
+2
+2
+40000
+799980000
+
+normal_func
+2
+2
+20000
+199990000
+
+cold_func
+2
+2
+500
+124750
+
+main
+219169028
+6
+1
+0
+100000
+40000
+20000
+500
+
diff --git a/test/Profile/Inputs/c-captured.proftext b/test/Profile/Inputs/c-captured.proftext
new file mode 100644
index 000000000000..c1baefc894b5
--- /dev/null
+++ b/test/Profile/Inputs/c-captured.proftext
@@ -0,0 +1,25 @@
+c-captured.c:__captured_stmt
+10
+2
+1
+1
+
+c-captured.c:__captured_stmt1
+266
+3
+1
+10
+1
+
+main
+0
+1
+1
+
+debug_captured
+650
+3
+1
+1
+1
+
diff --git a/test/Profile/Inputs/c-counter-overflows.proftext b/test/Profile/Inputs/c-counter-overflows.proftext
new file mode 100644
index 000000000000..5a3633ecfc78
--- /dev/null
+++ b/test/Profile/Inputs/c-counter-overflows.proftext
@@ -0,0 +1,12 @@
+main
+285734896137
+8
+1
+68719476720
+64424509425
+68719476720
+21474836475
+21474836475
+21474836475
+4294967295
+
diff --git a/test/Profile/Inputs/c-general.proftext b/test/Profile/Inputs/c-general.proftext
new file mode 100644
index 000000000000..19e5bd3db442
--- /dev/null
+++ b/test/Profile/Inputs/c-general.proftext
@@ -0,0 +1,157 @@
+simple_loops
+16515
+4
+1
+100
+100
+75
+
+conditionals
+74917022372782735
+11
+1
+100
+50
+50
+33
+33
+16
+99
+100
+99
+100
+
+early_exits
+44128811889290
+9
+1
+0
+51
+1
+25
+1
+25
+1
+0
+
+jumps
+2016037664281362839
+22
+1
+1
+0
+1
+0
+0
+1
+0
+1
+2
+3
+2
+0
+3
+0
+1
+1
+1
+10
+0
+10
+9
+
+switches
+2745195701975551402
+19
+1
+1
+1
+15
+7
+1
+0
+2
+2
+3
+3
+4
+4
+0
+4
+4
+5
+1
+0
+
+big_switch
+10218718452081869619
+17
+1
+32
+32
+1
+0
+1
+1
+11
+11
+1
+1
+15
+15
+1
+1
+2
+2
+
+boolean_operators
+291222909838
+8
+1
+100
+34
+66
+17
+34
+33
+50
+
+boolop_loops
+9760565944591
+9
+1
+50
+51
+50
+26
+50
+51
+50
+26
+
+conditional_operator
+848
+3
+1
+0
+1
+
+do_fallthrough
+16586
+4
+1
+10
+2
+8
+
+main
+0
+1
+1
+
+c-general.c:static_func
+4
+2
+1
+10
+
diff --git a/test/Profile/Inputs/c-outdated-data.proftext b/test/Profile/Inputs/c-outdated-data.proftext
new file mode 100644
index 000000000000..d57a6e9d0691
--- /dev/null
+++ b/test/Profile/Inputs/c-outdated-data.proftext
@@ -0,0 +1,12 @@
+no_usable_data
+650
+3
+1
+0
+0
+
+main
+0
+1
+1
+
diff --git a/test/Profile/Inputs/c-unprofiled-blocks.proftext b/test/Profile/Inputs/c-unprofiled-blocks.proftext
new file mode 100644
index 000000000000..87b48e13fbbe
--- /dev/null
+++ b/test/Profile/Inputs/c-unprofiled-blocks.proftext
@@ -0,0 +1,32 @@
+never_called
+44257542701577
+9
+0
+0
+0
+0
+0
+0
+0
+0
+0
+
+main
+1
+1
+1
+
+dead_code
+2859007309808137
+10
+1
+0
+0
+0
+0
+0
+0
+0
+0
+0
+
diff --git a/test/Profile/Inputs/c-unprofiled.proftext b/test/Profile/Inputs/c-unprofiled.proftext
new file mode 100644
index 000000000000..d2ef7ae301d8
--- /dev/null
+++ b/test/Profile/Inputs/c-unprofiled.proftext
@@ -0,0 +1,10 @@
+function_in_header
+10
+2
+1
+0
+
+main
+0
+1
+1
diff --git a/test/Profile/Inputs/cxx-class.proftext b/test/Profile/Inputs/cxx-class.proftext
new file mode 100644
index 000000000000..b4645edf9333
--- /dev/null
+++ b/test/Profile/Inputs/cxx-class.proftext
@@ -0,0 +1,41 @@
+_Z14simple_wrapperv
+4
+2
+1
+100
+
+main
+0
+1
+1
+
+_ZN6SimpleD1Ev
+10
+2
+0
+0
+
+_ZN6SimpleD2Ev
+10
+2
+100
+99
+
+_ZN6Simple6methodEv
+10
+2
+100
+99
+
+_ZN6SimpleC1Ei
+10
+2
+0
+0
+
+_ZN6SimpleC2Ei
+10
+2
+100
+99
+
diff --git a/test/Profile/Inputs/cxx-lambda.proftext b/test/Profile/Inputs/cxx-lambda.proftext
new file mode 100644
index 000000000000..36646b5ab37c
--- /dev/null
+++ b/test/Profile/Inputs/cxx-lambda.proftext
@@ -0,0 +1,20 @@
+cxx-lambda.cpp:_ZZ7lambdasvENK3$_0clEi
+654
+3
+10
+9
+9
+
+main
+0
+1
+1
+
+_Z7lambdasv
+41226
+4
+1
+1
+10
+1
+
diff --git a/test/Profile/Inputs/cxx-templates.proftext b/test/Profile/Inputs/cxx-templates.proftext
new file mode 100644
index 000000000000..5ea840038d59
--- /dev/null
+++ b/test/Profile/Inputs/cxx-templates.proftext
@@ -0,0 +1,17 @@
+main
+0
+1
+1
+
+_Z4loopILj0EEvv
+4
+2
+1
+0
+
+_Z4loopILj100EEvv
+4
+2
+1
+100
+
diff --git a/test/Profile/Inputs/cxx-throws.proftext b/test/Profile/Inputs/cxx-throws.proftext
new file mode 100644
index 000000000000..4016eca2ac86
--- /dev/null
+++ b/test/Profile/Inputs/cxx-throws.proftext
@@ -0,0 +1,18 @@
+_Z6throwsv
+18359008150154
+9
+1
+100
+100
+66
+33
+17
+50
+33
+100
+
+main
+0
+1
+1
+
diff --git a/test/Profile/Inputs/objc-general.proftext b/test/Profile/Inputs/objc-general.proftext
new file mode 100644
index 000000000000..8d6771f9b324
--- /dev/null
+++ b/test/Profile/Inputs/objc-general.proftext
@@ -0,0 +1,17 @@
+objc-general.m:__13+[A foreach:]_block_invoke
+10
+2
+2
+1
+
+objc-general.m:+[A foreach:]
+6
+2
+1
+2
+
+main
+0
+1
+1
+
diff --git a/test/Profile/Inputs/profiled_header.h b/test/Profile/Inputs/profiled_header.h
new file mode 100644
index 000000000000..fa649d4b5995
--- /dev/null
+++ b/test/Profile/Inputs/profiled_header.h
@@ -0,0 +1,3 @@
+void function_in_header(int i) {
+ if (i) {}
+}
diff --git a/test/Profile/README b/test/Profile/README
new file mode 100644
index 000000000000..3b66765711f2
--- /dev/null
+++ b/test/Profile/README
@@ -0,0 +1,16 @@
+These are tests for instrumentation based profiling. This specifically means
+the -fprofile-instr-generate and -fprofile-instr-use driver flags.
+
+Tests in this directory should usually test both:
+
+ - the generation of instrumentation (-fprofile-instr-generate), and
+ - the use of profile data from instrumented runs (-fprofile-instr-use).
+
+In order to test -fprofile-instr-use without actually running an instrumented
+program, .profdata files are checked into Inputs/.
+
+The input source files must include a main function such that building with
+-fprofile-instr-generate and running the resulting program generates the same
+.profdata file that is consumed by the tests for -fprofile-instr-use. Even
+tests that only check -fprofile-instr-use should include such a main function,
+so that profile data can be regenerated as the .profdata file format evolves.
diff --git a/test/Profile/c-attributes.c b/test/Profile/c-attributes.c
new file mode 100644
index 000000000000..2dcc180624ce
--- /dev/null
+++ b/test/Profile/c-attributes.c
@@ -0,0 +1,48 @@
+// Test that instrumentation based profiling sets function attributes correctly.
+
+// RUN: llvm-profdata merge %S/Inputs/c-attributes.proftext -o %t.profdata
+// RUN: %clang %s -o - -mllvm -disable-llvm-optzns -emit-llvm -S -fprofile-instr-use=%t.profdata | FileCheck %s
+
+extern int atoi(const char *);
+
+// CHECK: hot_100_percent(i32{{.*}}%i) [[HOT:#[0-9]+]]
+void hot_100_percent(int i) {
+ while (i > 0)
+ i--;
+}
+
+// CHECK: hot_40_percent(i32{{.*}}%i) [[HOT]]
+void hot_40_percent(int i) {
+ while (i > 0)
+ i--;
+}
+
+// CHECK: normal_func(i32{{.*}}%i) [[NORMAL:#[0-9]+]]
+void normal_func(int i) {
+ while (i > 0)
+ i--;
+}
+
+// CHECK: cold_func(i32{{.*}}%i) [[COLD:#[0-9]+]]
+void cold_func(int i) {
+ while (i > 0)
+ i--;
+}
+
+// CHECK: attributes [[HOT]] = { inlinehint nounwind {{.*}} }
+// CHECK: attributes [[NORMAL]] = { nounwind {{.*}} }
+// CHECK: attributes [[COLD]] = { cold nounwind {{.*}} }
+
+int main(int argc, const char *argv[]) {
+ int max = atoi(argv[1]);
+ int i;
+ for (i = 0; i < max; i++)
+ hot_100_percent(i);
+ for (i = 0; i < max * 4 / 10; i++)
+ hot_40_percent(i);
+ for (i = 0; i < max * 2 / 10; i++)
+ normal_func(i);
+ for (i = 0; i < max / 200; i++)
+ cold_func(i);
+ return 0;
+}
diff --git a/test/Profile/c-captured.c b/test/Profile/c-captured.c
new file mode 100644
index 000000000000..ef7fb318508d
--- /dev/null
+++ b/test/Profile/c-captured.c
@@ -0,0 +1,59 @@
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-captured.c %s -o - -emit-llvm -fprofile-instr-generate | FileCheck -check-prefix=PGOGEN -check-prefix=PGOALL %s
+
+// RUN: llvm-profdata merge %S/Inputs/c-captured.proftext -o %t.profdata
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-captured.c %s -o - -emit-llvm -fprofile-instr-use=%t.profdata | FileCheck -check-prefix=PGOUSE -check-prefix=PGOALL %s
+
+// PGOGEN: @[[DCC:__llvm_profile_counters_debug_captured]] = hidden global [3 x i64] zeroinitializer
+// PGOGEN: @[[CSC:__llvm_profile_counters___captured_stmt]] = internal global [2 x i64] zeroinitializer
+// PGOGEN: @[[C1C:__llvm_profile_counters___captured_stmt1]] = internal global [3 x i64] zeroinitializer
+
+// PGOALL-LABEL: define void @debug_captured()
+// PGOGEN: store {{.*}} @[[DCC]], i64 0, i64 0
+void debug_captured() {
+ int x = 10;
+
+ // Check both debug_captured counters, so we can do this all in one pass
+ // PGOGEN: store {{.*}} @[[DCC]], i64 0, i64 1
+ // PGOUSE: br {{.*}} !prof ![[DC1:[0-9]+]]
+ // PGOGEN: store {{.*}} @[[DCC]], i64 0, i64 2
+ // PGOUSE: br {{.*}} !prof ![[DC2:[0-9]+]]
+ // PGOALL: ret
+
+ // PGOALL-LABEL: define internal void @__captured_stmt(
+ // PGOGEN: store {{.*}} @[[CSC]], i64 0, i64 0
+ #pragma clang __debug captured
+ {
+ // PGOGEN: store {{.*}} @[[CSC]], i64 0, i64 1
+ // PGOUSE: br {{.*}} !prof ![[CS1:[0-9]+]]
+ if (x) {}
+ // PGOALL: ret
+ }
+
+ if (x) {} // This is DC1. Checked above.
+
+ // PGOALL-LABEL: define internal void @__captured_stmt1(
+ // PGOGEN: store {{.*}} @[[C1C]], i64 0, i64 0
+ #pragma clang __debug captured
+ {
+ // PGOGEN: store {{.*}} @[[C1C]], i64 0, i64 1
+ // PGOUSE: br {{.*}} !prof ![[C11:[0-9]+]]
+ for (int i = 0; i < x; ++i) {}
+ // PGOGEN: store {{.*}} @[[C1C]], i64 0, i64 2
+ // PGOUSE: br {{.*}} !prof ![[C12:[0-9]+]]
+ if (x) {}
+ // PGOALL: ret
+ }
+
+ if (x) {} // This is DC2. Checked above.
+}
+
+// PGOUSE-DAG: ![[DC1]] = metadata !{metadata !"branch_weights", i32 2, i32 1}
+// PGOUSE-DAG: ![[DC2]] = metadata !{metadata !"branch_weights", i32 2, i32 1}
+// PGOUSE-DAG: ![[CS1]] = metadata !{metadata !"branch_weights", i32 2, i32 1}
+// PGOUSE-DAG: ![[C11]] = metadata !{metadata !"branch_weights", i32 11, i32 2}
+// PGOUSE-DAG: ![[C12]] = metadata !{metadata !"branch_weights", i32 2, i32 1}
+
+int main(int argc, const char *argv[]) {
+ debug_captured();
+ return 0;
+}
diff --git a/test/Profile/c-counter-overflows.c b/test/Profile/c-counter-overflows.c
new file mode 100644
index 000000000000..f6f8f73fd949
--- /dev/null
+++ b/test/Profile/c-counter-overflows.c
@@ -0,0 +1,49 @@
+// Test that big branch weights get scaled down to 32-bits, rather than just
+// truncated.
+
+// RUN: llvm-profdata merge %S/Inputs/c-counter-overflows.proftext -o %t.profdata
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-counter-overflows.c %s -o - -emit-llvm -fprofile-instr-use=%t.profdata | FileCheck %s
+
+typedef unsigned long long uint64_t;
+
+int main(int argc, const char *argv[]) {
+ // Need counts higher than 32-bits.
+ // CHECK: br {{.*}} !prof ![[FOR:[0-9]+]]
+ // max = 0xffffffff0
+ // scale = 0xffffffff0 / 0xffffffff + 1 = 17
+ // loop-body: 0xffffffff0 / 17 + 1 = 0xf0f0f0f0 + 1 = 4042322161 => -252645135
+ // loop-exit: 0x000000001 / 17 + 1 = 0x00000000 + 1 = 1 => 1
+ for (uint64_t I = 0; I < 0xffffffff0; ++I) {
+ // max = 0xffffffff * 15 = 0xefffffff1
+ // scale = 0xefffffff1 / 0xffffffff + 1 = 16
+ // CHECK: br {{.*}} !prof ![[IF:[0-9]+]]
+ if (I & 0xf) {
+ // 0xefffffff1 / 16 + 1 = 0xefffffff + 1 = 4026531840 => -268435456
+ } else {
+ // 0x0ffffffff / 16 + 1 = 0x0fffffff + 1 = 268435456 => 268435456
+ }
+
+ // max = 0xffffffff * 5 = 0x4fffffffb
+ // scale = 0x4fffffffb / 0xffffffff + 1 = 6
+ // CHECK: ], !prof ![[SWITCH:[0-9]+]]
+ switch ((I & 0xf) / 5) {
+ case 0:
+ // 0x4fffffffb / 6 = 0xd5555554 + 1 = 3579139413 => -715827883
+ break;
+ case 1:
+ // 0x4fffffffb / 6 = 0xd5555554 + 1 = 3579139413 => -715827883
+ break;
+ case 2:
+ // 0x4fffffffb / 6 = 0xd5555554 + 1 = 3579139413 => -715827883
+ break;
+ default:
+ // 0x0ffffffff / 6 = 0x2aaaaaaa + 1 = 715827883 => 715827883
+ break;
+ }
+ }
+ return 0;
+}
+
+// CHECK-DAG: ![[FOR]] = metadata !{metadata !"branch_weights", i32 -252645135, i32 1}
+// CHECK-DAG: ![[IF]] = metadata !{metadata !"branch_weights", i32 -268435456, i32 268435456}
+// CHECK-DAG: ![[SWITCH]] = metadata !{metadata !"branch_weights", i32 715827883, i32 -715827883, i32 -715827883, i32 -715827883}
diff --git a/test/Profile/c-general.c b/test/Profile/c-general.c
new file mode 100644
index 000000000000..442fdd336c7c
--- /dev/null
+++ b/test/Profile/c-general.c
@@ -0,0 +1,544 @@
+// Test instrumentation of general constructs in C.
+
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-general.c %s -o - -emit-llvm -fprofile-instr-generate | FileCheck -check-prefix=PGOGEN %s
+
+// RUN: llvm-profdata merge %S/Inputs/c-general.proftext -o %t.profdata
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-general.c %s -o - -emit-llvm -fprofile-instr-use=%t.profdata | FileCheck -check-prefix=PGOUSE %s
+
+// PGOGEN: @[[SLC:__llvm_profile_counters_simple_loops]] = hidden global [4 x i64] zeroinitializer
+// PGOGEN: @[[IFC:__llvm_profile_counters_conditionals]] = hidden global [11 x i64] zeroinitializer
+// PGOGEN: @[[EEC:__llvm_profile_counters_early_exits]] = hidden global [9 x i64] zeroinitializer
+// PGOGEN: @[[JMC:__llvm_profile_counters_jumps]] = hidden global [22 x i64] zeroinitializer
+// PGOGEN: @[[SWC:__llvm_profile_counters_switches]] = hidden global [19 x i64] zeroinitializer
+// PGOGEN: @[[BSC:__llvm_profile_counters_big_switch]] = hidden global [17 x i64] zeroinitializer
+// PGOGEN: @[[BOC:__llvm_profile_counters_boolean_operators]] = hidden global [8 x i64] zeroinitializer
+// PGOGEN: @[[BLC:__llvm_profile_counters_boolop_loops]] = hidden global [9 x i64] zeroinitializer
+// PGOGEN: @[[COC:__llvm_profile_counters_conditional_operator]] = hidden global [3 x i64] zeroinitializer
+// PGOGEN: @[[MAC:__llvm_profile_counters_main]] = hidden global [1 x i64] zeroinitializer
+// PGOGEN: @[[STC:__llvm_profile_counters_static_func]] = internal global [2 x i64] zeroinitializer
+
+// PGOGEN-LABEL: @simple_loops()
+// PGOUSE-LABEL: @simple_loops()
+// PGOGEN: store {{.*}} @[[SLC]], i64 0, i64 0
+void simple_loops() {
+ int i;
+ // PGOGEN: store {{.*}} @[[SLC]], i64 0, i64 1
+ // PGOUSE: br {{.*}} !prof ![[SL1:[0-9]+]]
+ for (i = 0; i < 100; ++i) {
+ }
+ // PGOGEN: store {{.*}} @[[SLC]], i64 0, i64 2
+ // PGOUSE: br {{.*}} !prof ![[SL2:[0-9]+]]
+ while (i > 0)
+ i--;
+ // PGOGEN: store {{.*}} @[[SLC]], i64 0, i64 3
+ // PGOUSE: br {{.*}} !prof ![[SL3:[0-9]+]]
+ do {} while (i++ < 75);
+
+ // PGOGEN-NOT: store {{.*}} @[[SLC]],
+ // PGOUSE-NOT: br {{.*}} !prof ![0-9]+
+}
+
+// PGOGEN-LABEL: @conditionals()
+// PGOUSE-LABEL: @conditionals()
+// PGOGEN: store {{.*}} @[[IFC]], i64 0, i64 0
+void conditionals() {
+ // PGOGEN: store {{.*}} @[[IFC]], i64 0, i64 1
+ // PGOUSE: br {{.*}} !prof ![[IF1:[0-9]+]]
+ for (int i = 0; i < 100; ++i) {
+ // PGOGEN: store {{.*}} @[[IFC]], i64 0, i64 2
+ // PGOUSE: br {{.*}} !prof ![[IF2:[0-9]+]]
+ if (i % 2) {
+ // PGOGEN: store {{.*}} @[[IFC]], i64 0, i64 3
+ // PGOUSE: br {{.*}} !prof ![[IF3:[0-9]+]]
+ if (i) {}
+ // PGOGEN: store {{.*}} @[[IFC]], i64 0, i64 4
+ // PGOUSE: br {{.*}} !prof ![[IF4:[0-9]+]]
+ } else if (i % 3) {
+ // PGOGEN: store {{.*}} @[[IFC]], i64 0, i64 5
+ // PGOUSE: br {{.*}} !prof ![[IF5:[0-9]+]]
+ if (i) {}
+ } else {
+ // PGOGEN: store {{.*}} @[[IFC]], i64 0, i64 6
+ // PGOUSE: br {{.*}} !prof ![[IF6:[0-9]+]]
+ if (i) {}
+ }
+
+ // PGOGEN: store {{.*}} @[[IFC]], i64 0, i64 8
+ // PGOGEN: store {{.*}} @[[IFC]], i64 0, i64 7
+ // PGOUSE: br {{.*}} !prof ![[IF7:[0-9]+]]
+ if (1 && i) {}
+ // PGOGEN: store {{.*}} @[[IFC]], i64 0, i64 10
+ // PGOGEN: store {{.*}} @[[IFC]], i64 0, i64 9
+ // PGOUSE: br {{.*}} !prof ![[IF8:[0-9]+]]
+ if (0 || i) {}
+ }
+
+ // PGOGEN-NOT: store {{.*}} @[[IFC]],
+ // PGOUSE-NOT: br {{.*}} !prof ![0-9]+
+}
+
+// PGOGEN-LABEL: @early_exits()
+// PGOUSE-LABEL: @early_exits()
+// PGOGEN: store {{.*}} @[[EEC]], i64 0, i64 0
+void early_exits() {
+ int i = 0;
+
+ // PGOGEN: store {{.*}} @[[EEC]], i64 0, i64 1
+ // PGOUSE: br {{.*}} !prof ![[EE1:[0-9]+]]
+ if (i) {}
+
+ // PGOGEN: store {{.*}} @[[EEC]], i64 0, i64 2
+ // PGOUSE: br {{.*}} !prof ![[EE2:[0-9]+]]
+ while (i < 100) {
+ i++;
+ // PGOGEN: store {{.*}} @[[EEC]], i64 0, i64 3
+ // PGOUSE: br {{.*}} !prof ![[EE3:[0-9]+]]
+ if (i > 50)
+ break;
+ // PGOGEN: store {{.*}} @[[EEC]], i64 0, i64 4
+ // PGOUSE: br {{.*}} !prof ![[EE4:[0-9]+]]
+ if (i % 2)
+ continue;
+ }
+
+ // PGOGEN: store {{.*}} @[[EEC]], i64 0, i64 5
+ // PGOUSE: br {{.*}} !prof ![[EE5:[0-9]+]]
+ if (i) {}
+
+ // PGOGEN: store {{.*}} @[[EEC]], i64 0, i64 6
+ do {
+ // PGOGEN: store {{.*}} @[[EEC]], i64 0, i64 7
+ // PGOUSE: br {{.*}} !prof ![[EE6:[0-9]+]]
+ if (i > 75)
+ return;
+ else
+ i++;
+ // PGOUSE: br {{.*}} !prof ![[EE7:[0-9]+]]
+ } while (i < 100);
+
+ // PGOGEN: store {{.*}} @[[EEC]], i64 0, i64 8
+ // Never reached -> no weights
+ if (i) {}
+
+ // PGOGEN-NOT: store {{.*}} @[[EEC]],
+ // PGOUSE-NOT: br {{.*}} !prof ![0-9]+
+}
+
+// PGOGEN-LABEL: @jumps()
+// PGOUSE-LABEL: @jumps()
+// PGOGEN: store {{.*}} @[[JMC]], i64 0, i64 0
+void jumps() {
+ int i;
+
+ // PGOGEN: store {{.*}} @[[JMC]], i64 0, i64 1
+ // PGOUSE: br {{.*}} !prof ![[JM1:[0-9]+]]
+ for (i = 0; i < 2; ++i) {
+ goto outofloop;
+ // Never reached -> no weights
+ if (i) {}
+ }
+// PGOGEN: store {{.*}} @[[JMC]], i64 0, i64 3
+outofloop:
+ // PGOGEN: store {{.*}} @[[JMC]], i64 0, i64 4
+ // PGOUSE: br {{.*}} !prof ![[JM2:[0-9]+]]
+ if (i) {}
+
+ goto loop1;
+
+ // PGOGEN: store {{.*}} @[[JMC]], i64 0, i64 5
+ // PGOUSE: br {{.*}} !prof ![[JM3:[0-9]+]]
+ while (i) {
+ // PGOGEN: store {{.*}} @[[JMC]], i64 0, i64 6
+ loop1:
+ // PGOGEN: store {{.*}} @[[JMC]], i64 0, i64 7
+ // PGOUSE: br {{.*}} !prof ![[JM4:[0-9]+]]
+ if (i) {}
+ }
+
+ goto loop2;
+// PGOGEN: store {{.*}} @[[JMC]], i64 0, i64 8
+first:
+// PGOGEN: store {{.*}} @[[JMC]], i64 0, i64 9
+second:
+// PGOGEN: store {{.*}} @[[JMC]], i64 0, i64 10
+third:
+ i++;
+ // PGOGEN: store {{.*}} @[[JMC]], i64 0, i64 11
+ // PGOUSE: br {{.*}} !prof ![[JM5:[0-9]+]]
+ if (i < 3)
+ goto loop2;
+
+ // PGOGEN: store {{.*}} @[[JMC]], i64 0, i64 12
+ // PGOUSE: br {{.*}} !prof ![[JM6:[0-9]+]]
+ while (i < 3) {
+ // PGOGEN: store {{.*}} @[[JMC]], i64 0, i64 13
+ loop2:
+ // PGOUSE: switch {{.*}} [
+ // PGOUSE: ], !prof ![[JM7:[0-9]+]]
+ switch (i) {
+ // PGOGEN: store {{.*}} @[[JMC]], i64 0, i64 15
+ case 0:
+ goto first;
+ // PGOGEN: store {{.*}} @[[JMC]], i64 0, i64 16
+ case 1:
+ goto second;
+ // PGOGEN: store {{.*}} @[[JMC]], i64 0, i64 17
+ case 2:
+ goto third;
+ }
+ // PGOGEN: store {{.*}} @[[JMC]], i64 0, i64 14
+ }
+
+ // PGOGEN: store {{.*}} @[[JMC]], i64 0, i64 18
+ // PGOUSE: br {{.*}} !prof ![[JM8:[0-9]+]]
+ for (i = 0; i < 10; ++i) {
+ goto withinloop;
+ // never reached -> no weights
+ if (i) {}
+ // PGOGEN: store {{.*}} @[[JMC]], i64 0, i64 20
+ withinloop:
+ // PGOGEN: store {{.*}} @[[JMC]], i64 0, i64 21
+ // PGOUSE: br {{.*}} !prof ![[JM9:[0-9]+]]
+ if (i) {}
+ }
+
+ // PGOGEN-NOT: store {{.*}} @[[JMC]],
+ // PGOUSE-NOT: br {{.*}} !prof ![0-9]+
+}
+
+// PGOGEN-LABEL: @switches()
+// PGOUSE-LABEL: @switches()
+// PGOGEN: store {{.*}} @[[SWC]], i64 0, i64 0
+void switches() {
+ static int weights[] = {1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5};
+
+ // No cases -> no weights
+ switch (weights[0]) {
+ // PGOGEN: store {{.*}} @[[SWC]], i64 0, i64 2
+ default:
+ break;
+ }
+ // PGOGEN: store {{.*}} @[[SWC]], i64 0, i64 1
+
+ // PGOGEN: store {{.*}} @[[SWC]], i64 0, i64 3
+ // PGOUSE: br {{.*}} !prof ![[SW1:[0-9]+]]
+ for (int i = 0, len = sizeof(weights) / sizeof(weights[0]); i < len; ++i) {
+ // PGOUSE: switch {{.*}} [
+ // PGOUSE: ], !prof ![[SW2:[0-9]+]]
+ switch (i[weights]) {
+ // PGOGEN: store {{.*}} @[[SWC]], i64 0, i64 5
+ case 1:
+ // PGOGEN: store {{.*}} @[[SWC]], i64 0, i64 6
+ // PGOUSE: br {{.*}} !prof ![[SW3:[0-9]+]]
+ if (i) {}
+ // fallthrough
+ // PGOGEN: store {{.*}} @[[SWC]], i64 0, i64 7
+ case 2:
+ // PGOGEN: store {{.*}} @[[SWC]], i64 0, i64 8
+ // PGOUSE: br {{.*}} !prof ![[SW4:[0-9]+]]
+ if (i) {}
+ break;
+ // PGOGEN: store {{.*}} @[[SWC]], i64 0, i64 9
+ case 3:
+ // PGOGEN: store {{.*}} @[[SWC]], i64 0, i64 10
+ // PGOUSE: br {{.*}} !prof ![[SW5:[0-9]+]]
+ if (i) {}
+ continue;
+ // PGOGEN: store {{.*}} @[[SWC]], i64 0, i64 11
+ case 4:
+ // PGOGEN: store {{.*}} @[[SWC]], i64 0, i64 12
+ // PGOUSE: br {{.*}} !prof ![[SW6:[0-9]+]]
+ if (i) {}
+ // PGOUSE: switch {{.*}} [
+ // PGOUSE: ], !prof ![[SW7:[0-9]+]]
+ switch (i) {
+ // PGOGEN: store {{.*}} @[[SWC]], i64 0, i64 14
+ case 6 ... 9:
+ // PGOGEN: store {{.*}} @[[SWC]], i64 0, i64 15
+ // PGOUSE: br {{.*}} !prof ![[SW8:[0-9]+]]
+ if (i) {}
+ continue;
+ }
+ // PGOGEN: store {{.*}} @[[SWC]], i64 0, i64 13
+
+ // PGOGEN: store {{.*}} @[[SWC]], i64 0, i64 16
+ default:
+ // PGOGEN: store {{.*}} @[[SWC]], i64 0, i64 17
+ // PGOUSE: br {{.*}} !prof ![[SW9:[0-9]+]]
+ if (i == len - 1)
+ return;
+ }
+ // PGOGEN: store {{.*}} @[[SWC]], i64 0, i64 4
+ }
+
+ // PGOGEN: store {{.*}} @[[SWC]], i64 0, i64 18
+ // Never reached -> no weights
+ if (weights[0]) {}
+
+ // PGOGEN-NOT: store {{.*}} @[[SWC]],
+ // PGOUSE-NOT: br {{.*}} !prof ![0-9]+
+}
+
+// PGOGEN-LABEL: @big_switch()
+// PGOUSE-LABEL: @big_switch()
+// PGOGEN: store {{.*}} @[[BSC]], i64 0, i64 0
+void big_switch() {
+ // PGOGEN: store {{.*}} @[[BSC]], i64 0, i64 1
+ // PGOUSE: br {{.*}} !prof ![[BS1:[0-9]+]]
+ for (int i = 0; i < 32; ++i) {
+ // PGOUSE: switch {{.*}} [
+ // PGOUSE: ], !prof ![[BS2:[0-9]+]]
+ switch (1 << i) {
+ // PGOGEN: store {{.*}} @[[BSC]], i64 0, i64 3
+ case (1 << 0):
+ // PGOGEN: store {{.*}} @[[BSC]], i64 0, i64 4
+ // PGOUSE: br {{.*}} !prof ![[BS3:[0-9]+]]
+ if (i) {}
+ // fallthrough
+ // PGOGEN: store {{.*}} @[[BSC]], i64 0, i64 5
+ case (1 << 1):
+ // PGOGEN: store {{.*}} @[[BSC]], i64 0, i64 6
+ // PGOUSE: br {{.*}} !prof ![[BS4:[0-9]+]]
+ if (i) {}
+ break;
+ // PGOGEN: store {{.*}} @[[BSC]], i64 0, i64 7
+ case (1 << 2) ... (1 << 12):
+ // PGOGEN: store {{.*}} @[[BSC]], i64 0, i64 8
+ // PGOUSE: br {{.*}} !prof ![[BS5:[0-9]+]]
+ if (i) {}
+ break;
+ // The branch for the large case range above appears after the case body
+ // PGOUSE: br {{.*}} !prof ![[BS6:[0-9]+]]
+
+ // PGOGEN: store {{.*}} @[[BSC]], i64 0, i64 9
+ case (1 << 13):
+ // PGOGEN: store {{.*}} @[[BSC]], i64 0, i64 10
+ // PGOUSE: br {{.*}} !prof ![[BS7:[0-9]+]]
+ if (i) {}
+ break;
+ // PGOGEN: store {{.*}} @[[BSC]], i64 0, i64 11
+ case (1 << 14) ... (1 << 28):
+ // PGOGEN: store {{.*}} @[[BSC]], i64 0, i64 12
+ // PGOUSE: br {{.*}} !prof ![[BS8:[0-9]+]]
+ if (i) {}
+ break;
+ // The branch for the large case range above appears after the case body
+ // PGOUSE: br {{.*}} !prof ![[BS9:[0-9]+]]
+
+ // PGOGEN: store {{.*}} @[[BSC]], i64 0, i64 13
+ case (1 << 29) ... ((1 << 29) + 1):
+ // PGOGEN: store {{.*}} @[[BSC]], i64 0, i64 14
+ // PGOUSE: br {{.*}} !prof ![[BS10:[0-9]+]]
+ if (i) {}
+ break;
+ // PGOGEN: store {{.*}} @[[BSC]], i64 0, i64 15
+ default:
+ // PGOGEN: store {{.*}} @[[BSC]], i64 0, i64 16
+ // PGOUSE: br {{.*}} !prof ![[BS11:[0-9]+]]
+ if (i) {}
+ break;
+ }
+ // PGOGEN: store {{.*}} @[[BSC]], i64 0, i64 2
+ }
+
+ // PGOGEN-NOT: store {{.*}} @[[BSC]],
+ // PGOUSE-NOT: br {{.*}} !prof ![0-9]+
+ // PGOUSE: ret void
+}
+
+// PGOGEN-LABEL: @boolean_operators()
+// PGOUSE-LABEL: @boolean_operators()
+// PGOGEN: store {{.*}} @[[BOC]], i64 0, i64 0
+void boolean_operators() {
+ int v;
+ // PGOGEN: store {{.*}} @[[BOC]], i64 0, i64 1
+ // PGOUSE: br {{.*}} !prof ![[BO1:[0-9]+]]
+ for (int i = 0; i < 100; ++i) {
+ // PGOGEN: store {{.*}} @[[BOC]], i64 0, i64 2
+ // PGOUSE: br {{.*}} !prof ![[BO2:[0-9]+]]
+ v = i % 3 || i;
+
+ // PGOGEN: store {{.*}} @[[BOC]], i64 0, i64 3
+ // PGOUSE: br {{.*}} !prof ![[BO3:[0-9]+]]
+ v = i % 3 && i;
+
+ // PGOGEN: store {{.*}} @[[BOC]], i64 0, i64 5
+ // PGOGEN: store {{.*}} @[[BOC]], i64 0, i64 4
+ // PGOUSE: br {{.*}} !prof ![[BO4:[0-9]+]]
+ // PGOUSE: br {{.*}} !prof ![[BO5:[0-9]+]]
+ v = i % 3 || i % 2 || i;
+
+ // PGOGEN: store {{.*}} @[[BOC]], i64 0, i64 7
+ // PGOGEN: store {{.*}} @[[BOC]], i64 0, i64 6
+ // PGOUSE: br {{.*}} !prof ![[BO6:[0-9]+]]
+ // PGOUSE: br {{.*}} !prof ![[BO7:[0-9]+]]
+ v = i % 2 && i % 3 && i;
+ }
+
+ // PGOGEN-NOT: store {{.*}} @[[BOC]],
+ // PGOUSE-NOT: br {{.*}} !prof ![0-9]+
+}
+
+// PGOGEN-LABEL: @boolop_loops()
+// PGOUSE-LABEL: @boolop_loops()
+// PGOGEN: store {{.*}} @[[BLC]], i64 0, i64 0
+void boolop_loops() {
+ int i = 100;
+
+ // PGOGEN: store {{.*}} @[[BLC]], i64 0, i64 2
+ // PGOGEN: store {{.*}} @[[BLC]], i64 0, i64 1
+ // PGOUSE: br {{.*}} !prof ![[BL1:[0-9]+]]
+ // PGOUSE: br {{.*}} !prof ![[BL2:[0-9]+]]
+ while (i && i > 50)
+ i--;
+
+ // PGOGEN: store {{.*}} @[[BLC]], i64 0, i64 4
+ // PGOGEN: store {{.*}} @[[BLC]], i64 0, i64 3
+ // PGOUSE: br {{.*}} !prof ![[BL3:[0-9]+]]
+ // PGOUSE: br {{.*}} !prof ![[BL4:[0-9]+]]
+ while ((i % 2) || (i > 0))
+ i--;
+
+ // PGOGEN: store {{.*}} @[[BLC]], i64 0, i64 6
+ // PGOGEN: store {{.*}} @[[BLC]], i64 0, i64 5
+ // PGOUSE: br {{.*}} !prof ![[BL5:[0-9]+]]
+ // PGOUSE: br {{.*}} !prof ![[BL6:[0-9]+]]
+ for (i = 100; i && i > 50; --i);
+
+ // PGOGEN: store {{.*}} @[[BLC]], i64 0, i64 8
+ // PGOGEN: store {{.*}} @[[BLC]], i64 0, i64 7
+ // PGOUSE: br {{.*}} !prof ![[BL7:[0-9]+]]
+ // PGOUSE: br {{.*}} !prof ![[BL8:[0-9]+]]
+ for (; (i % 2) || (i > 0); --i);
+
+ // PGOGEN-NOT: store {{.*}} @[[BLC]],
+ // PGOUSE-NOT: br {{.*}} !prof ![0-9]+
+}
+
+// PGOGEN-LABEL: @conditional_operator()
+// PGOUSE-LABEL: @conditional_operator()
+// PGOGEN: store {{.*}} @[[COC]], i64 0, i64 0
+void conditional_operator() {
+ int i = 100;
+
+ // PGOGEN: store {{.*}} @[[COC]], i64 0, i64 1
+ // PGOUSE: br {{.*}} !prof ![[CO1:[0-9]+]]
+ int j = i < 50 ? i : 1;
+
+ // PGOGEN: store {{.*}} @[[COC]], i64 0, i64 2
+ // PGOUSE: br {{.*}} !prof ![[CO2:[0-9]+]]
+ int k = i ?: 0;
+
+ // PGOGEN-NOT: store {{.*}} @[[COC]],
+ // PGOUSE-NOT: br {{.*}} !prof ![0-9]+
+}
+
+void do_fallthrough() {
+ for (int i = 0; i < 10; ++i) {
+ int j = 0;
+ do {
+ // The number of exits out of this do-loop via the break statement
+ // exceeds the counter value for the loop (which does not include the
+ // fallthrough count). Make sure that does not violate any assertions.
+ if (i < 8) break;
+ j++;
+ } while (j < 2);
+ }
+}
+
+// PGOGEN-LABEL: @static_func()
+// PGOUSE-LABEL: @static_func()
+// PGOGEN: store {{.*}} @[[STC]], i64 0, i64 0
+static void static_func() {
+ // PGOGEN: store {{.*}} @[[STC]], i64 0, i64 1
+ // PGOUSE: br {{.*}} !prof ![[ST1:[0-9]+]]
+ for (int i = 0; i < 10; ++i) {
+ }
+}
+
+// PGOUSE-DAG: ![[SL1]] = metadata !{metadata !"branch_weights", i32 101, i32 2}
+// PGOUSE-DAG: ![[SL2]] = metadata !{metadata !"branch_weights", i32 101, i32 2}
+// PGOUSE-DAG: ![[SL3]] = metadata !{metadata !"branch_weights", i32 76, i32 2}
+
+// PGOUSE-DAG: ![[EE1]] = metadata !{metadata !"branch_weights", i32 1, i32 2}
+// PGOUSE-DAG: ![[EE2]] = metadata !{metadata !"branch_weights", i32 52, i32 1}
+// PGOUSE-DAG: ![[EE3]] = metadata !{metadata !"branch_weights", i32 2, i32 51}
+// PGOUSE-DAG: ![[EE4]] = metadata !{metadata !"branch_weights", i32 26, i32 26}
+// PGOUSE-DAG: ![[EE5]] = metadata !{metadata !"branch_weights", i32 2, i32 1}
+// PGOUSE-DAG: ![[EE6]] = metadata !{metadata !"branch_weights", i32 2, i32 26}
+// PGOUSE-DAG: ![[EE7]] = metadata !{metadata !"branch_weights", i32 26, i32 1}
+
+// PGOUSE-DAG: ![[IF1]] = metadata !{metadata !"branch_weights", i32 101, i32 2}
+// PGOUSE-DAG: ![[IF2]] = metadata !{metadata !"branch_weights", i32 51, i32 51}
+// PGOUSE-DAG: ![[IF3]] = metadata !{metadata !"branch_weights", i32 51, i32 1}
+// PGOUSE-DAG: ![[IF4]] = metadata !{metadata !"branch_weights", i32 34, i32 18}
+// PGOUSE-DAG: ![[IF5]] = metadata !{metadata !"branch_weights", i32 34, i32 1}
+// PGOUSE-DAG: ![[IF6]] = metadata !{metadata !"branch_weights", i32 17, i32 2}
+// PGOUSE-DAG: ![[IF7]] = metadata !{metadata !"branch_weights", i32 100, i32 2}
+// PGOUSE-DAG: ![[IF8]] = metadata !{metadata !"branch_weights", i32 100, i32 2}
+
+// PGOUSE-DAG: ![[JM1]] = metadata !{metadata !"branch_weights", i32 2, i32 1}
+// PGOUSE-DAG: ![[JM2]] = metadata !{metadata !"branch_weights", i32 1, i32 2}
+// PGOUSE-DAG: ![[JM3]] = metadata !{metadata !"branch_weights", i32 1, i32 2}
+// PGOUSE-DAG: ![[JM4]] = metadata !{metadata !"branch_weights", i32 1, i32 2}
+// PGOUSE-DAG: ![[JM5]] = metadata !{metadata !"branch_weights", i32 3, i32 2}
+// PGOUSE-DAG: ![[JM6]] = metadata !{metadata !"branch_weights", i32 1, i32 2}
+// PGOUSE-DAG: ![[JM7]] = metadata !{metadata !"branch_weights", i32 1, i32 2, i32 2, i32 2}
+// PGOUSE-DAG: ![[JM8]] = metadata !{metadata !"branch_weights", i32 11, i32 2}
+// PGOUSE-DAG: ![[JM9]] = metadata !{metadata !"branch_weights", i32 10, i32 2}
+
+// PGOUSE-DAG: ![[SW1]] = metadata !{metadata !"branch_weights", i32 16, i32 1}
+// PGOUSE-DAG: ![[SW2]] = metadata !{metadata !"branch_weights", i32 6, i32 2, i32 3, i32 4, i32 5}
+// PGOUSE-DAG: ![[SW3]] = metadata !{metadata !"branch_weights", i32 1, i32 2}
+// PGOUSE-DAG: ![[SW4]] = metadata !{metadata !"branch_weights", i32 3, i32 2}
+// PGOUSE-DAG: ![[SW5]] = metadata !{metadata !"branch_weights", i32 4, i32 1}
+// PGOUSE-DAG: ![[SW6]] = metadata !{metadata !"branch_weights", i32 5, i32 1}
+// PGOUSE-DAG: ![[SW7]] = metadata !{metadata !"branch_weights", i32 1, i32 2, i32 2, i32 2, i32 2}
+// PGOUSE-DAG: ![[SW8]] = metadata !{metadata !"branch_weights", i32 5, i32 1}
+// PGOUSE-DAG: ![[SW9]] = metadata !{metadata !"branch_weights", i32 2, i32 5}
+
+// PGOUSE-DAG: ![[BS1]] = metadata !{metadata !"branch_weights", i32 33, i32 2}
+// PGOUSE-DAG: ![[BS2]] = metadata !{metadata !"branch_weights", i32 29, i32 2, i32 2, i32 2, i32 2, i32 1}
+// PGOUSE-DAG: ![[BS3]] = metadata !{metadata !"branch_weights", i32 1, i32 2}
+// PGOUSE-DAG: ![[BS4]] = metadata !{metadata !"branch_weights", i32 2, i32 2}
+// PGOUSE-DAG: ![[BS5]] = metadata !{metadata !"branch_weights", i32 12, i32 1}
+// PGOUSE-DAG: ![[BS6]] = metadata !{metadata !"branch_weights", i32 12, i32 3}
+// PGOUSE-DAG: ![[BS7]] = metadata !{metadata !"branch_weights", i32 2, i32 1}
+// PGOUSE-DAG: ![[BS8]] = metadata !{metadata !"branch_weights", i32 16, i32 1}
+// PGOUSE-DAG: ![[BS9]] = metadata !{metadata !"branch_weights", i32 16, i32 14}
+// PGOUSE-DAG: ![[BS10]] = metadata !{metadata !"branch_weights", i32 2, i32 1}
+// PGOUSE-DAG: ![[BS11]] = metadata !{metadata !"branch_weights", i32 3, i32 1}
+
+// PGOUSE-DAG: ![[BO1]] = metadata !{metadata !"branch_weights", i32 101, i32 2}
+// PGOUSE-DAG: ![[BO2]] = metadata !{metadata !"branch_weights", i32 67, i32 35}
+// PGOUSE-DAG: ![[BO3]] = metadata !{metadata !"branch_weights", i32 67, i32 35}
+// PGOUSE-DAG: ![[BO4]] = metadata !{metadata !"branch_weights", i32 67, i32 35}
+// PGOUSE-DAG: ![[BO5]] = metadata !{metadata !"branch_weights", i32 18, i32 18}
+// PGOUSE-DAG: ![[BO6]] = metadata !{metadata !"branch_weights", i32 51, i32 51}
+// PGOUSE-DAG: ![[BO7]] = metadata !{metadata !"branch_weights", i32 34, i32 18}
+// PGOUSE-DAG: ![[BL1]] = metadata !{metadata !"branch_weights", i32 52, i32 1}
+// PGOUSE-DAG: ![[BL2]] = metadata !{metadata !"branch_weights", i32 51, i32 2}
+// PGOUSE-DAG: ![[BL3]] = metadata !{metadata !"branch_weights", i32 26, i32 27}
+// PGOUSE-DAG: ![[BL4]] = metadata !{metadata !"branch_weights", i32 51, i32 2}
+// PGOUSE-DAG: ![[BL5]] = metadata !{metadata !"branch_weights", i32 52, i32 1}
+// PGOUSE-DAG: ![[BL6]] = metadata !{metadata !"branch_weights", i32 51, i32 2}
+// PGOUSE-DAG: ![[BL7]] = metadata !{metadata !"branch_weights", i32 26, i32 27}
+// PGOUSE-DAG: ![[BL8]] = metadata !{metadata !"branch_weights", i32 51, i32 2}
+// PGOUSE-DAG: ![[CO1]] = metadata !{metadata !"branch_weights", i32 1, i32 2}
+// PGOUSE-DAG: ![[CO2]] = metadata !{metadata !"branch_weights", i32 2, i32 1}
+// PGOUSE-DAG: ![[ST1]] = metadata !{metadata !"branch_weights", i32 11, i32 2}
+
+int main(int argc, const char *argv[]) {
+ simple_loops();
+ conditionals();
+ early_exits();
+ jumps();
+ switches();
+ big_switch();
+ boolean_operators();
+ boolop_loops();
+ conditional_operator();
+ do_fallthrough();
+ static_func();
+ return 0;
+}
diff --git a/test/Profile/c-linkage-available_externally.c b/test/Profile/c-linkage-available_externally.c
new file mode 100644
index 000000000000..aa1080b2b443
--- /dev/null
+++ b/test/Profile/c-linkage-available_externally.c
@@ -0,0 +1,12 @@
+// Make sure instrementation data from available_externally functions doesn't
+// get thrown out.
+// RUN: %clang_cc1 -O2 -triple x86_64-apple-macosx10.9 -main-file-name c-linkage-available_externally.c %s -o - -emit-llvm -fprofile-instr-generate | FileCheck %s
+
+// CHECK: @__llvm_profile_counters_foo = linkonce_odr hidden global [1 x i64] zeroinitializer, section "__DATA,__llvm_prf_cnts", align 8
+// CHECK: @__llvm_profile_name_foo = linkonce_odr hidden constant [3 x i8] c"foo", section "__DATA,__llvm_prf_names", align 1
+// CHECK: @__llvm_profile_data_foo = linkonce_odr hidden constant { i32, i32, i64, i8*, i64* } { i32 3, i32 1, i64 {{[0-9]+}}, i8* getelementptr inbounds ([3 x i8]* @__llvm_profile_name_foo, i32 0, i32 0), i64* getelementptr inbounds ([1 x i64]* @__llvm_profile_counters_foo, i32 0, i32 0) }, section "__DATA,__llvm_prf_data", align 8
+inline int foo(void) { return 1; }
+
+int main(void) {
+ return foo();
+}
diff --git a/test/Profile/c-linkage.c b/test/Profile/c-linkage.c
new file mode 100644
index 000000000000..3b0fa1a5a6ba
--- /dev/null
+++ b/test/Profile/c-linkage.c
@@ -0,0 +1,37 @@
+// Check the data structures emitted by instrumentation.
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-linkage.c %s -o - -emit-llvm -fprofile-instr-generate | FileCheck %s
+
+// CHECK: @__llvm_profile_runtime = external global i32
+// CHECK: @__llvm_profile_counters_foo = hidden global [1 x i64] zeroinitializer, section "__DATA,__llvm_prf_cnts", align 8
+// CHECK: @__llvm_profile_name_foo = hidden constant [3 x i8] c"foo", section "__DATA,__llvm_prf_names", align 1
+// CHECK: @__llvm_profile_data_foo = hidden constant { i32, i32, i64, i8*, i64* } { i32 3, i32 1, i64 {{[0-9]+}}, i8* getelementptr inbounds ([3 x i8]* @__llvm_profile_name_foo, i32 0, i32 0), i64* getelementptr inbounds ([1 x i64]* @__llvm_profile_counters_foo, i32 0, i32 0) }, section "__DATA,__llvm_prf_data", align 8
+void foo(void) { }
+
+// CHECK: @__llvm_profile_counters_foo_weak = weak hidden global [5 x i64] zeroinitializer, section "__DATA,__llvm_prf_cnts", align 8
+// CHECK: @__llvm_profile_name_foo_weak = weak hidden constant [8 x i8] c"foo_weak", section "__DATA,__llvm_prf_names", align 1
+// CHECK: @__llvm_profile_data_foo_weak = weak hidden constant { i32, i32, i64, i8*, i64* } { i32 8, i32 5, i64 {{[0-9]+}}, i8* getelementptr inbounds ([8 x i8]* @__llvm_profile_name_foo_weak, i32 0, i32 0), i64* getelementptr inbounds ([5 x i64]* @__llvm_profile_counters_foo_weak, i32 0, i32 0) }, section "__DATA,__llvm_prf_data", align 8
+void foo_weak(void) __attribute__((weak));
+void foo_weak(void) { if (0){} if (0){} if (0){} if (0){} }
+
+// CHECK: @__llvm_profile_counters_main = hidden global [1 x i64] zeroinitializer, section "__DATA,__llvm_prf_cnts", align 8
+// CHECK: @__llvm_profile_name_main = hidden constant [4 x i8] c"main", section "__DATA,__llvm_prf_names", align 1
+// CHECK: @__llvm_profile_data_main = hidden constant { i32, i32, i64, i8*, i64* } { i32 4, i32 1, i64 {{[0-9]+}}, i8* getelementptr inbounds ([4 x i8]* @__llvm_profile_name_main, i32 0, i32 0), i64* getelementptr inbounds ([1 x i64]* @__llvm_profile_counters_main, i32 0, i32 0) }, section "__DATA,__llvm_prf_data", align 8
+static void foo_internal(void);
+int main(void) {
+ foo();
+ foo_internal();
+ foo_weak();
+ return 0;
+}
+
+// CHECK: @__llvm_profile_counters_foo_internal = internal global [3 x i64] zeroinitializer, section "__DATA,__llvm_prf_cnts", align 8
+// CHECK: @__llvm_profile_name_foo_internal = internal constant [24 x i8] c"c-linkage.c:foo_internal", section "__DATA,__llvm_prf_names", align 1
+// CHECK: @__llvm_profile_data_foo_internal = internal constant { i32, i32, i64, i8*, i64* } { i32 24, i32 3, i64 {{[0-9]+}}, i8* getelementptr inbounds ([24 x i8]* @__llvm_profile_name_foo_internal, i32 0, i32 0), i64* getelementptr inbounds ([3 x i64]* @__llvm_profile_counters_foo_internal, i32 0, i32 0) }, section "__DATA,__llvm_prf_data", align 8
+static void foo_internal(void) { if (0){} if (0){} }
+
+// CHECK: @llvm.used = appending global [5 x i8*] [i8* bitcast (i32 ()* @__llvm_profile_runtime_user to i8*), i8* bitcast ({ i32, i32, i64, i8*, i64* }* @__llvm_profile_data_foo to i8*), i8* bitcast ({ i32, i32, i64, i8*, i64* }* @__llvm_profile_data_foo_weak to i8*), i8* bitcast ({ i32, i32, i64, i8*, i64* }* @__llvm_profile_data_main to i8*), i8* bitcast ({ i32, i32, i64, i8*, i64* }* @__llvm_profile_data_foo_internal to i8*)], section "llvm.metadata"
+
+// CHECK: define linkonce_odr i32 @__llvm_profile_runtime_user() {{.*}} {
+// CHECK: %[[REG:.*]] = load i32* @__llvm_profile_runtime
+// CHECK: ret i32 %[[REG]]
+// CHECK: }
diff --git a/test/Profile/c-outdated-data.c b/test/Profile/c-outdated-data.c
new file mode 100644
index 000000000000..d0503acdb6ea
--- /dev/null
+++ b/test/Profile/c-outdated-data.c
@@ -0,0 +1,28 @@
+// Test that outdated data is ignored.
+
+// FIXME: It would be nice to use -verify here instead of FileCheck, but -verify
+// doesn't play well with warnings that have no line number.
+
+// RUN: llvm-profdata merge %S/Inputs/c-outdated-data.proftext -o %t.profdata
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-outdated-data.c %s -o /dev/null -emit-llvm -fprofile-instr-use=%t.profdata -Wprofile-instr-dropped 2>&1 | FileCheck %s
+// CHECK: warning: profile data may be out of date: of 3 functions, 1 has no data and 1 has mismatched data that will be ignored
+
+void no_usable_data() {
+ int i = 0;
+
+ if (i) {}
+
+#ifdef GENERATE_OUTDATED_DATA
+ if (i) {}
+#endif
+}
+
+#ifndef GENERATE_OUTDATED_DATA
+void no_data() {
+}
+#endif
+
+int main(int argc, const char *argv[]) {
+ no_usable_data();
+ return 0;
+}
diff --git a/test/Profile/c-unprofiled-blocks.c b/test/Profile/c-unprofiled-blocks.c
new file mode 100644
index 000000000000..58bef9e2962d
--- /dev/null
+++ b/test/Profile/c-unprofiled-blocks.c
@@ -0,0 +1,69 @@
+// Blocks that we have no profile data for (ie, it was never reached in training
+// runs) shouldn't have any branch weight metadata added.
+
+// RUN: llvm-profdata merge %S/Inputs/c-unprofiled-blocks.proftext -o %t.profdata
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-unprofiled-blocks.c %s -o - -emit-llvm -fprofile-instr-use=%t.profdata | FileCheck -check-prefix=PGOUSE %s
+
+// PGOUSE-LABEL: @never_called(i32 %i)
+int never_called(int i) {
+ // PGOUSE: br i1 %{{[^,]*}}, label %{{[^,]*}}, label %{{[^,]*}}{{$}}
+ if (i) {}
+
+ // PGOUSE: br i1 %{{[^,]*}}, label %{{[^,]*}}, label %{{[^,]*}}{{$}}
+ for (i = 0; i < 100; ++i) {
+ }
+
+ // PGOUSE: br i1 %{{[^,]*}}, label %{{[^,]*}}, label %{{[^,]*}}{{$}}
+ while (--i) {}
+
+ // PGOUSE: br i1 %{{[^,]*}}, label %{{[^,]*}}, label %{{[^,]*}}{{$}}
+ do {} while (i++ < 75);
+
+ // PGOUSE: switch {{.*}} [
+ // PGOUSE-NEXT: i32 12
+ // PGOUSE-NEXT: i32 82
+ // PGOUSE-NEXT: ]{{$}}
+ switch (i) {
+ case 12: return 3;
+ case 82: return 0;
+ default: return 89;
+ }
+}
+
+// PGOUSE-LABEL: @dead_code(i32 %i)
+int dead_code(int i) {
+ // PGOUSE: br {{.*}}, !prof !{{[0-9]+}}
+ if (i) {
+ // This branch is never reached.
+
+ // PGOUSE: br i1 %{{[^,]*}}, label %{{[^,]*}}, label %{{[^,]*}}{{$}}
+ if (!i) {}
+
+ // PGOUSE: br i1 %{{[^,]*}}, label %{{[^,]*}}, label %{{[^,]*}}{{$}}
+ for (i = 0; i < 100; ++i) {
+ }
+
+ // PGOUSE: br i1 %{{[^,]*}}, label %{{[^,]*}}, label %{{[^,]*}}{{$}}
+ while (--i) {}
+
+ // PGOUSE: br i1 %{{[^,]*}}, label %{{[^,]*}}, label %{{[^,]*}}{{$}}
+ do {} while (i++ < 75);
+
+ // PGOUSE: switch {{.*}} [
+ // PGOUSE-NEXT: i32 12
+ // PGOUSE-NEXT: i32 82
+ // PGOUSE-NEXT: ]{{$}}
+ switch (i) {
+ case 12: return 3;
+ case 82: return 0;
+ default: return 89;
+ }
+ }
+ return 2;
+}
+
+// PGOUSE-LABEL: @main(i32 %argc, i8** %argv)
+int main(int argc, const char *argv[]) {
+ dead_code(0);
+ return 0;
+}
diff --git a/test/Profile/c-unprofiled.c b/test/Profile/c-unprofiled.c
new file mode 100644
index 000000000000..275cd2d1458d
--- /dev/null
+++ b/test/Profile/c-unprofiled.c
@@ -0,0 +1,26 @@
+// Test that unprofiled files are recognized. Here, we have two functions in the
+// profile, main() and function_in_header, but we use the profile on a file that
+// has the profile-less some_unprofiled_function so that the only profiled code
+// in #included in a header.
+
+// FIXME: It would be nice to use -verify here instead of FileCheck, but -verify
+// doesn't play well with warnings that have no line number.
+
+// RUN: llvm-profdata merge %S/Inputs/c-unprofiled.proftext -o %t.profdata
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-unprofiled.c -I %S/Inputs/ %s -o /dev/null -emit-llvm -fprofile-instr-use=%t.profdata -Wprofile-instr-unprofiled 2>&1 | FileCheck %s
+
+// CHECK: warning: no profile data available for file "c-unprofiled.c"
+
+#include "profiled_header.h"
+
+#ifdef GENERATE_OUTDATED_DATA
+int main(int argc, const char *argv[]) {
+ function_in_header(0);
+ return 0;
+}
+#else
+void some_unprofiled_function(int i) {
+ if (i)
+ function_in_header(i);
+}
+#endif
diff --git a/test/Profile/cxx-class.cpp b/test/Profile/cxx-class.cpp
new file mode 100644
index 000000000000..1a0c84bdccea
--- /dev/null
+++ b/test/Profile/cxx-class.cpp
@@ -0,0 +1,78 @@
+// Tests for instrumentation of C++ methods, constructors, and destructors.
+
+// RUN: %clang %s -o - -emit-llvm -S -fprofile-instr-generate -fno-exceptions -target %itanium_abi_triple > %tgen
+// RUN: FileCheck --input-file=%tgen -check-prefix=CTRGEN %s
+// RUN: FileCheck --input-file=%tgen -check-prefix=DTRGEN %s
+// RUN: FileCheck --input-file=%tgen -check-prefix=MTHGEN %s
+// RUN: FileCheck --input-file=%tgen -check-prefix=WRPGEN %s
+
+// RUN: llvm-profdata merge %S/Inputs/cxx-class.proftext -o %t.profdata
+// RUN: %clang %s -o - -emit-llvm -S -fprofile-instr-use=%t.profdata -fno-exceptions -target %itanium_abi_triple > %tuse
+// RUN: FileCheck --input-file=%tuse -check-prefix=CTRUSE %s
+// RUN: FileCheck --input-file=%tuse -check-prefix=DTRUSE %s
+// RUN: FileCheck --input-file=%tuse -check-prefix=MTHUSE %s
+// RUN: FileCheck --input-file=%tuse -check-prefix=WRPUSE %s
+
+class Simple {
+ int Member;
+public:
+ // CTRGEN-LABEL: define {{.*}} @_ZN6SimpleC2Ei(
+ // CTRUSE-LABEL: define {{.*}} @_ZN6SimpleC2Ei(
+ // CTRGEN: store {{.*}} @[[SCC:__llvm_profile_counters__ZN6SimpleC2Ei]], i64 0, i64 0
+ explicit Simple(int Member) : Member(Member) {
+ // CTRGEN: store {{.*}} @[[SCC]], i64 0, i64 1
+ // CTRUSE: br {{.*}} !prof ![[SC1:[0-9]+]]
+ if (Member) {}
+ // CTRGEN-NOT: store {{.*}} @[[SCC]],
+ // CTRUSE-NOT: br {{.*}} !prof ![0-9]+
+ // CTRUSE: ret
+ }
+ // CTRUSE: ![[SC1]] = metadata !{metadata !"branch_weights", i32 100, i32 2}
+
+ // DTRGEN-LABEL: define {{.*}} @_ZN6SimpleD2Ev(
+ // DTRUSE-LABEL: define {{.*}} @_ZN6SimpleD2Ev(
+ // DTRGEN: store {{.*}} @[[SDC:__llvm_profile_counters__ZN6SimpleD2Ev]], i64 0, i64 0
+ ~Simple() {
+ // DTRGEN: store {{.*}} @[[SDC]], i64 0, i64 1
+ // DTRUSE: br {{.*}} !prof ![[SD1:[0-9]+]]
+ if (Member) {}
+ // DTRGEN-NOT: store {{.*}} @[[SDC]],
+ // DTRUSE-NOT: br {{.*}} !prof ![0-9]+
+ // DTRUSE: ret
+ }
+ // DTRUSE: ![[SD1]] = metadata !{metadata !"branch_weights", i32 100, i32 2}
+
+ // MTHGEN-LABEL: define {{.*}} @_ZN6Simple6methodEv(
+ // MTHUSE-LABEL: define {{.*}} @_ZN6Simple6methodEv(
+ // MTHGEN: store {{.*}} @[[SMC:__llvm_profile_counters__ZN6Simple6methodEv]], i64 0, i64 0
+ void method() {
+ // MTHGEN: store {{.*}} @[[SMC]], i64 0, i64 1
+ // MTHUSE: br {{.*}} !prof ![[SM1:[0-9]+]]
+ if (Member) {}
+ // MTHGEN-NOT: store {{.*}} @[[SMC]],
+ // MTHUSE-NOT: br {{.*}} !prof ![0-9]+
+ // MTHUSE: ret
+ }
+ // MTHUSE: ![[SM1]] = metadata !{metadata !"branch_weights", i32 100, i32 2}
+};
+
+// WRPGEN-LABEL: define {{.*}} @_Z14simple_wrapperv(
+// WRPUSE-LABEL: define {{.*}} @_Z14simple_wrapperv(
+// WRPGEN: store {{.*}} @[[SWC:__llvm_profile_counters__Z14simple_wrapperv]], i64 0, i64 0
+void simple_wrapper() {
+ // WRPGEN: store {{.*}} @[[SWC]], i64 0, i64 1
+ // WRPUSE: br {{.*}} !prof ![[SW1:[0-9]+]]
+ for (int I = 0; I < 100; ++I) {
+ Simple S(I);
+ S.method();
+ }
+ // WRPGEN-NOT: store {{.*}} @[[SWC]],
+ // WRPUSE-NOT: br {{.*}} !prof ![0-9]+
+ // WRPUSE: ret
+}
+// WRPUSE: ![[SW1]] = metadata !{metadata !"branch_weights", i32 101, i32 2}
+
+int main(int argc, const char *argv[]) {
+ simple_wrapper();
+ return 0;
+}
diff --git a/test/Profile/cxx-implicit.cpp b/test/Profile/cxx-implicit.cpp
new file mode 100644
index 000000000000..79840ad93856
--- /dev/null
+++ b/test/Profile/cxx-implicit.cpp
@@ -0,0 +1,17 @@
+// Ensure that implicit methods aren't instrumented.
+
+// RUN: %clang_cc1 -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-implicit.cpp -o - -emit-llvm -fprofile-instr-generate | FileCheck %s
+
+// An implicit constructor is generated for Base. We should not emit counters
+// for it.
+// CHECK-NOT: @__llvm_profile_counters__ZN4BaseC2Ev =
+
+struct Base {
+ virtual void foo();
+};
+
+struct Derived : public Base {
+ Derived();
+};
+
+Derived::Derived() {}
diff --git a/test/Profile/cxx-lambda.cpp b/test/Profile/cxx-lambda.cpp
new file mode 100644
index 000000000000..6c37a863e5c1
--- /dev/null
+++ b/test/Profile/cxx-lambda.cpp
@@ -0,0 +1,58 @@
+// Tests for instrumentation of C++11 lambdas
+
+// RUN: %clang_cc1 -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-lambda.cpp -std=c++11 -o - -emit-llvm -fprofile-instr-generate > %tgen
+// RUN: FileCheck --input-file=%tgen -check-prefix=PGOGEN %s
+// RUN: FileCheck --input-file=%tgen -check-prefix=LMBGEN %s
+
+// RUN: llvm-profdata merge %S/Inputs/cxx-lambda.proftext -o %t.profdata
+// RUN: %clang_cc1 -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-lambda.cpp -std=c++11 -o - -emit-llvm -fprofile-instr-use=%t.profdata > %tuse
+// RUN: FileCheck --input-file=%tuse -check-prefix=PGOUSE %s
+// RUN: FileCheck --input-file=%tuse -check-prefix=LMBUSE %s
+
+// PGOGEN: @[[LWC:__llvm_profile_counters__Z7lambdasv]] = hidden global [4 x i64] zeroinitializer
+// PGOGEN: @[[MAC:__llvm_profile_counters_main]] = hidden global [1 x i64] zeroinitializer
+// LMBGEN: @[[LFC:"__llvm_profile_counters__ZZ7lambdasvENK3\$_0clEi"]] = internal global [3 x i64] zeroinitializer
+
+// PGOGEN-LABEL: define void @_Z7lambdasv()
+// PGOUSE-LABEL: define void @_Z7lambdasv()
+// PGOGEN: store {{.*}} @[[LWC]], i64 0, i64 0
+void lambdas() {
+ int i = 1;
+
+ // LMBGEN-LABEL: define internal{{( zeroext)?}} i1 @"_ZZ7lambdasvENK3$_0clEi"(
+ // LMBUSE-LABEL: define internal{{( zeroext)?}} i1 @"_ZZ7lambdasvENK3$_0clEi"(
+ // LMBGEN: store {{.*}} @[[LFC]], i64 0, i64 0
+ auto f = [&i](int k) {
+ // LMBGEN: store {{.*}} @[[LFC]], i64 0, i64 1
+ // LMBUSE: br {{.*}} !prof ![[LF1:[0-9]+]]
+ if (i > 0) {}
+ // LMBGEN: store {{.*}} @[[LFC]], i64 0, i64 2
+ // LMBUSE: br {{.*}} !prof ![[LF2:[0-9]+]]
+ return k && i;
+ };
+
+ // PGOGEN: store {{.*}} @[[LWC]], i64 0, i64 1
+ // PGOUSE: br {{.*}} !prof ![[LW1:[0-9]+]]
+ if (i) {}
+
+ // PGOGEN: store {{.*}} @[[LWC]], i64 0, i64 2
+ // PGOUSE: br {{.*}} !prof ![[LW2:[0-9]+]]
+ for (i = 0; i < 10; ++i)
+ f(9 - i);
+
+ // PGOGEN: store {{.*}} @[[LWC]], i64 0, i64 3
+ // PGOUSE: br {{.*}} !prof ![[LW3:[0-9]+]]
+ if (i) {}
+}
+
+// PGOUSE-DAG: ![[LW1]] = metadata !{metadata !"branch_weights", i32 2, i32 1}
+// PGOUSE-DAG: ![[LW2]] = metadata !{metadata !"branch_weights", i32 11, i32 2}
+// PGOUSE-DAG: ![[LW3]] = metadata !{metadata !"branch_weights", i32 2, i32 1}
+
+// LMBUSE-DAG: ![[LF1]] = metadata !{metadata !"branch_weights", i32 10, i32 2}
+// LMBUSE-DAG: ![[LF2]] = metadata !{metadata !"branch_weights", i32 10, i32 2}
+
+int main(int argc, const char *argv[]) {
+ lambdas();
+ return 0;
+}
diff --git a/test/Profile/cxx-linkage.cpp b/test/Profile/cxx-linkage.cpp
new file mode 100644
index 000000000000..df896e7a78f2
--- /dev/null
+++ b/test/Profile/cxx-linkage.cpp
@@ -0,0 +1,36 @@
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9.0 -emit-llvm -main-file-name cxx-linkage.cpp %s -o - -fprofile-instr-generate | FileCheck %s
+
+// CHECK: @__llvm_profile_runtime = external global i32
+// CHECK: @__llvm_profile_counters__Z3foov = hidden global [1 x i64] zeroinitializer, section "__DATA,__llvm_prf_cnts", align 8
+// CHECK: @__llvm_profile_name__Z3foov = hidden constant [7 x i8] c"_Z3foov", section "__DATA,__llvm_prf_names", align 1
+// CHECK: @__llvm_profile_data__Z3foov = hidden constant { i32, i32, i64, i8*, i64* } { i32 7, i32 1, i64 {{[0-9]+}}, i8* getelementptr inbounds ([7 x i8]* @__llvm_profile_name__Z3foov, i32 0, i32 0), i64* getelementptr inbounds ([1 x i64]* @__llvm_profile_counters__Z3foov, i32 0, i32 0) }, section "__DATA,__llvm_prf_data", align 8
+void foo(void) { }
+
+// CHECK: @__llvm_profile_counters__Z8foo_weakv = weak hidden global [5 x i64] zeroinitializer, section "__DATA,__llvm_prf_cnts", align 8
+// CHECK: @__llvm_profile_name__Z8foo_weakv = weak hidden constant [12 x i8] c"_Z8foo_weakv", section "__DATA,__llvm_prf_names", align 1
+// CHECK: @__llvm_profile_data__Z8foo_weakv = weak hidden constant { i32, i32, i64, i8*, i64* } { i32 12, i32 5, i64 {{[0-9]+}}, i8* getelementptr inbounds ([12 x i8]* @__llvm_profile_name__Z8foo_weakv, i32 0, i32 0), i64* getelementptr inbounds ([5 x i64]* @__llvm_profile_counters__Z8foo_weakv, i32 0, i32 0) }, section "__DATA,__llvm_prf_data", align 8
+void foo_weak(void) __attribute__((weak));
+void foo_weak(void) { if (0){} if (0){} if (0){} if (0){} }
+
+// CHECK: @__llvm_profile_counters_main = hidden global [1 x i64] zeroinitializer, section "__DATA,__llvm_prf_cnts", align 8
+// CHECK: @__llvm_profile_name_main = hidden constant [4 x i8] c"main", section "__DATA,__llvm_prf_names", align 1
+// CHECK: @__llvm_profile_data_main = hidden constant { i32, i32, i64, i8*, i64* } { i32 4, i32 1, i64 {{[0-9]+}}, i8* getelementptr inbounds ([4 x i8]* @__llvm_profile_name_main, i32 0, i32 0), i64* getelementptr inbounds ([1 x i64]* @__llvm_profile_counters_main, i32 0, i32 0) }, section "__DATA,__llvm_prf_data", align 8
+inline void foo_inline(void);
+int main(void) {
+ foo();
+ foo_inline();
+ foo_weak();
+ return 0;
+}
+
+// CHECK: @__llvm_profile_counters__Z10foo_inlinev = linkonce_odr hidden global [7 x i64] zeroinitializer, section "__DATA,__llvm_prf_cnts", align 8
+// CHECK: @__llvm_profile_name__Z10foo_inlinev = linkonce_odr hidden constant [15 x i8] c"_Z10foo_inlinev", section "__DATA,__llvm_prf_names", align 1
+// CHECK: @__llvm_profile_data__Z10foo_inlinev = linkonce_odr hidden constant { i32, i32, i64, i8*, i64* } { i32 15, i32 7, i64 {{[0-9]+}}, i8* getelementptr inbounds ([15 x i8]* @__llvm_profile_name__Z10foo_inlinev, i32 0, i32 0), i64* getelementptr inbounds ([7 x i64]* @__llvm_profile_counters__Z10foo_inlinev, i32 0, i32 0) }, section "__DATA,__llvm_prf_data", align 8
+inline void foo_inline(void) { if (0){} if (0){} if (0){} if (0){} if (0){} if (0){}}
+
+// CHECK: @llvm.used = appending global [5 x i8*] [i8* bitcast (i32 ()* @__llvm_profile_runtime_user to i8*), i8* bitcast ({ i32, i32, i64, i8*, i64* }* @__llvm_profile_data__Z3foov to i8*), i8* bitcast ({ i32, i32, i64, i8*, i64* }* @__llvm_profile_data__Z8foo_weakv to i8*), i8* bitcast ({ i32, i32, i64, i8*, i64* }* @__llvm_profile_data_main to i8*), i8* bitcast ({ i32, i32, i64, i8*, i64* }* @__llvm_profile_data__Z10foo_inlinev to i8*)], section "llvm.metadata"
+
+// CHECK: define linkonce_odr i32 @__llvm_profile_runtime_user() {{.*}} {
+// CHECK: %[[REG:.*]] = load i32* @__llvm_profile_runtime
+// CHECK: ret i32 %[[REG]]
+// CHECK: }
diff --git a/test/Profile/cxx-templates.cpp b/test/Profile/cxx-templates.cpp
new file mode 100644
index 000000000000..55ab36fe560d
--- /dev/null
+++ b/test/Profile/cxx-templates.cpp
@@ -0,0 +1,42 @@
+// Tests for instrumentation of templated code. Each instantiation of a template
+// should be instrumented separately.
+
+// RUN: %clang_cc1 -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-templates.cpp -std=c++11 -o - -emit-llvm -fprofile-instr-generate > %tgen
+// RUN: FileCheck --input-file=%tgen -check-prefix=T0GEN -check-prefix=ALL %s
+// RUN: FileCheck --input-file=%tgen -check-prefix=T100GEN -check-prefix=ALL %s
+
+// RUN: llvm-profdata merge %S/Inputs/cxx-templates.proftext -o %t.profdata
+// RUN: %clang_cc1 -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-templates.cpp -std=c++11 -o - -emit-llvm -fprofile-instr-use=%t.profdata > %tuse
+// RUN: FileCheck --input-file=%tuse -check-prefix=T0USE -check-prefix=ALL %s
+// RUN: FileCheck --input-file=%tuse -check-prefix=T100USE -check-prefix=ALL %s
+
+// T0GEN: @[[T0C:__llvm_profile_counters__Z4loopILj0EEvv]] = linkonce_odr hidden global [2 x i64] zeroinitializer
+// T100GEN: @[[T100C:__llvm_profile_counters__Z4loopILj100EEvv]] = linkonce_odr hidden global [2 x i64] zeroinitializer
+
+// T0GEN-LABEL: define linkonce_odr void @_Z4loopILj0EEvv()
+// T0USE-LABEL: define linkonce_odr void @_Z4loopILj0EEvv()
+// T100GEN-LABEL: define linkonce_odr void @_Z4loopILj100EEvv()
+// T100USE-LABEL: define linkonce_odr void @_Z4loopILj100EEvv()
+template <unsigned N> void loop() {
+ // ALL-NOT: ret
+ // T0GEN: store {{.*}} @[[T0C]], i64 0, i64 0
+ // T100GEN: store {{.*}} @[[T100C]], i64 0, i64 0
+
+ // ALL-NOT: ret
+ // T0GEN: store {{.*}} @[[T0C]], i64 0, i64 1
+ // T0USE: br {{.*}} !prof ![[T01:[0-9]+]]
+ // T100GEN: store {{.*}} @[[T100C]], i64 0, i64 1
+ // T100USE: br {{.*}} !prof ![[T1001:[0-9]+]]
+ for (unsigned I = 0; I < N; ++I) {}
+
+ // ALL: ret
+}
+
+// T0USE-DAG: ![[T01]] = metadata !{metadata !"branch_weights", i32 1, i32 2}
+// T100USE-DAG: ![[T1001]] = metadata !{metadata !"branch_weights", i32 101, i32 2}
+
+int main(int argc, const char *argv[]) {
+ loop<0>();
+ loop<100>();
+ return 0;
+}
diff --git a/test/Profile/cxx-throws.cpp b/test/Profile/cxx-throws.cpp
new file mode 100644
index 000000000000..9ea5ace4b74a
--- /dev/null
+++ b/test/Profile/cxx-throws.cpp
@@ -0,0 +1,73 @@
+// Test instrumentation of C++ exception handling constructs.
+
+// FIXME: Don't seek bb labels, like "if.else"
+// REQUIRES: asserts
+
+// RUN: %clangxx %s -o - -emit-llvm -S -fprofile-instr-generate -target %itanium_abi_triple | FileCheck -check-prefix=PGOGEN %s
+// RUN: %clangxx %s -o - -emit-llvm -S -fprofile-instr-generate -target %itanium_abi_triple | FileCheck -check-prefix=PGOGEN-EXC %s
+
+// RUN: llvm-profdata merge %S/Inputs/cxx-throws.proftext -o %t.profdata
+// RUN: %clang %s -o - -emit-llvm -S -fprofile-instr-use=%t.profdata -target %itanium_abi_triple | FileCheck -check-prefix=PGOUSE %s
+// RUN: %clang %s -o - -emit-llvm -S -fprofile-instr-use=%t.profdata -target %itanium_abi_triple | FileCheck -check-prefix=PGOUSE-EXC %s
+
+// PGOGEN: @[[THC:__llvm_profile_counters__Z6throwsv]] = hidden global [9 x i64] zeroinitializer
+// PGOGEN-EXC: @[[THC:__llvm_profile_counters__Z6throwsv]] = hidden global [9 x i64] zeroinitializer
+
+// PGOGEN-LABEL: @_Z6throwsv()
+// PGOUSE-LABEL: @_Z6throwsv()
+// PGOGEN: store {{.*}} @[[THC]], i64 0, i64 0
+void throws() {
+ // PGOGEN: store {{.*}} @[[THC]], i64 0, i64 1
+ // PGOUSE: br {{.*}} !prof ![[TH1:[0-9]+]]
+ for (int i = 0; i < 100; ++i) {
+ try {
+ // PGOGEN: store {{.*}} @[[THC]], i64 0, i64 3
+ // PGOUSE: br {{.*}} !prof ![[TH2:[0-9]+]]
+ if (i % 3) {
+ // PGOGEN: store {{.*}} @[[THC]], i64 0, i64 4
+ // PGOUSE: br {{.*}} !prof ![[TH3:[0-9]+]]
+ if (i < 50)
+ throw 1;
+ } else {
+ // The catch block may be emitted after the throw above, we can skip it
+ // by looking for an else block, but this will break if anyone puts an
+ // else in the catch
+ // PGOUSE: if.else{{.*}}:
+ // PGOGEN: if.else{{.*}}:
+
+ // PGOGEN: store {{.*}} @[[THC]], i64 0, i64 5
+ // PGOUSE: br {{.*}} !prof ![[TH4:[0-9]+]]
+ if (i >= 50)
+ throw 0;
+ }
+ } catch (int e) {
+ // PGOUSE-EXC: catch{{.*}}:
+ // PGOGEN-EXC: catch{{.*}}:
+
+ // PGOGEN-EXC: store {{.*}} @[[THC]], i64 0, i64 6
+ // PGOGEN-EXC: store {{.*}} @[[THC]], i64 0, i64 7
+ // PGOUSE-EXC: br {{.*}} !prof ![[TH5:[0-9]+]]
+ if (e) {}
+ }
+ // PGOGEN: store {{.*}} @[[THC]], i64 0, i64 2
+
+ // PGOGEN: store {{.*}} @[[THC]], i64 0, i64 8
+ // PGOUSE: br {{.*}} !prof ![[TH6:[0-9]+]]
+ if (i < 100) {}
+ }
+
+ // PGOUSE-NOT: br {{.*}} !prof ![0-9]+
+ // PGOUSE: ret void
+}
+
+// PGOUSE-DAG: ![[TH1]] = metadata !{metadata !"branch_weights", i32 101, i32 2}
+// PGOUSE-DAG: ![[TH2]] = metadata !{metadata !"branch_weights", i32 67, i32 35}
+// PGOUSE-DAG: ![[TH3]] = metadata !{metadata !"branch_weights", i32 34, i32 34}
+// PGOUSE-DAG: ![[TH4]] = metadata !{metadata !"branch_weights", i32 18, i32 18}
+// PGOUSE-EXC: ![[TH5]] = metadata !{metadata !"branch_weights", i32 34, i32 18}
+// PGOUSE-DAG: ![[TH6]] = metadata !{metadata !"branch_weights", i32 101, i32 1}
+
+int main(int argc, const char *argv[]) {
+ throws();
+ return 0;
+}
diff --git a/test/Profile/objc-general.m b/test/Profile/objc-general.m
new file mode 100644
index 000000000000..ba06f91a7f98
--- /dev/null
+++ b/test/Profile/objc-general.m
@@ -0,0 +1,75 @@
+// Test instrumentation of general constructs in objective C.
+
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name objc-general.m %s -o - -emit-llvm -fblocks -fprofile-instr-generate | FileCheck -check-prefix=PGOGEN %s
+
+// RUN: llvm-profdata merge %S/Inputs/objc-general.proftext -o %t.profdata
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name objc-general.m %s -o - -emit-llvm -fblocks -fprofile-instr-use=%t.profdata | FileCheck -check-prefix=PGOUSE %s
+
+#ifdef HAVE_FOUNDATION
+
+// Use this to build an instrumented version to regenerate the input file.
+#import <Foundation/Foundation.h>
+
+#else
+
+// Minimal definitions to get this to compile without Foundation.h.
+
+@protocol NSObject
+@end
+
+@interface NSObject <NSObject>
+- (id)init;
++ (id)alloc;
+@end
+
+struct NSFastEnumerationState;
+@interface NSArray : NSObject
+- (unsigned long) countByEnumeratingWithState: (struct NSFastEnumerationState*) state
+ objects: (id*) buffer
+ count: (unsigned long) bufferSize;
++(NSArray*) arrayWithObjects: (id) first, ...;
+@end;
+#endif
+
+// PGOGEN: @[[FRC:"__llvm_profile_counters_\+\[A foreach:\]"]] = internal global [2 x i64] zeroinitializer
+// PGOGEN: @[[BLC:"__llvm_profile_counters___13\+\[A foreach:\]_block_invoke"]] = internal global [2 x i64] zeroinitializer
+// PGOGEN: @[[MAC:__llvm_profile_counters_main]] = hidden global [1 x i64] zeroinitializer
+
+@interface A : NSObject
++ (void)foreach: (NSArray *)array;
+@end
+
+@implementation A
+// PGOGEN: define {{.*}}+[A foreach:]
+// PGOUSE: define {{.*}}+[A foreach:]
+// PGOGEN: store {{.*}} @[[FRC]], i64 0, i64 0
++ (void)foreach: (NSArray *)array
+{
+ __block id result;
+ // PGOGEN: store {{.*}} @[[FRC]], i64 0, i64 1
+ // PGOUSE: br {{.*}} !prof ![[FR1:[0-9]+]]
+ // PGOUSE: br {{.*}} !prof ![[FR2:[0-9]+]]
+ for (id x in array) {
+ // PGOGEN: define {{.*}}_block_invoke
+ // PGOUSE: define {{.*}}_block_invoke
+ // PGOGEN: store {{.*}} @[[BLC]], i64 0, i64 0
+ ^{ static int init = 0;
+ // PGOGEN: store {{.*}} @[[BLC]], i64 0, i64 1
+ // PGOUSE: br {{.*}} !prof ![[BL1:[0-9]+]]
+ if (init)
+ result = x;
+ init = 1; }();
+ }
+}
+@end
+
+// PGOUSE-DAG: ![[FR1]] = metadata !{metadata !"branch_weights", i32 2, i32 3}
+// PGOUSE-DAG: ![[FR2]] = metadata !{metadata !"branch_weights", i32 3, i32 2}
+// PGOUSE-DAG: ![[BL1]] = metadata !{metadata !"branch_weights", i32 2, i32 2}
+
+int main(int argc, const char *argv[]) {
+ A *a = [[A alloc] init];
+ NSArray *array = [NSArray arrayWithObjects: @"0", @"1", (void*)0];
+ [A foreach: array];
+ return 0;
+}
diff --git a/test/Rewriter/dllimport-typedef.c b/test/Rewriter/dllimport-typedef.c
deleted file mode 100644
index 97610ddb28e1..000000000000
--- a/test/Rewriter/dllimport-typedef.c
+++ /dev/null
@@ -1,17 +0,0 @@
-// RUN: not %clang_cc1 -triple i686-pc-win32 -fms-extensions -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-NEG %s
-// RUN: not %clang_cc1 -triple i686-pc-win32 -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-POS %s
-
-// Do not report an error with including dllimport in the typedef when -fms-extensions is specified.
-// Addresses <rdar://problem/7653870>.
-typedef __declspec(dllimport) int CB(void);
-
-// This function is added just to trigger a diagnostic. This way we can test how many
-// diagnostics we expect.
-void bar() { return 1; }
-
-// CHECK-NEG: error: void function 'bar' should not return a value
-// CHECK-NEG: 1 error generated
-// CHECK-POS: warning: 'dllimport' attribute only applies to variables and functions
-// CHECK-POS: error: void function 'bar' should not return a value
-// CHECK-POS: 1 warning and 1 error generated
-
diff --git a/test/Rewriter/finally.m b/test/Rewriter/finally.m
index f46b4b01a5ff..e60ba9ec8526 100644
--- a/test/Rewriter/finally.m
+++ b/test/Rewriter/finally.m
@@ -3,7 +3,7 @@
int main() {
@try {
printf("executing try"); // expected-warning{{implicitly declaring library function 'printf' with type 'int (const char *, ...)'}} \
- // expected-note{{please include the header <stdio.h> or explicitly provide a declaration for 'printf'}}
+ // expected-note{{include the header <stdio.h> or explicitly provide a declaration for 'printf'}}
return(0); // expected-warning{{rewriter doesn't support user-specified control flow semantics for @try/@finally (code may not execute properly)}}
} @finally {
printf("executing finally");
diff --git a/test/Rewriter/lit.local.cfg b/test/Rewriter/lit.local.cfg
index 5bbc711c656d..69b733b2e4a3 100644
--- a/test/Rewriter/lit.local.cfg
+++ b/test/Rewriter/lit.local.cfg
@@ -1,2 +1,3 @@
-if config.root.clang_rewriter == 0:
+# The Objective-C rewriters are currently grouped with ARCMT.
+if config.root.clang_arcmt == 0:
config.unsupported = True
diff --git a/test/Rewriter/missing-dllimport.c b/test/Rewriter/missing-dllimport.c
index 127989b0ed8a..a09ebff44db6 100644
--- a/test/Rewriter/missing-dllimport.c
+++ b/test/Rewriter/missing-dllimport.c
@@ -1,19 +1,8 @@
-// RUN: not %clang_cc1 -triple i686-pc-win32 -fms-extensions -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-NEG %s
-// RUN: not %clang_cc1 -triple i686-pc-win32 -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-POS %s
+// RUN: %clang_cc1 -triple i686-pc-win32 -verify %s
-// Do not report that 'foo()' is redeclared without dllimport attribute with -fms-extensions
+// Do not report that 'foo()' is redeclared without dllimport attribute.
// specified. Addresses <rdar://problem/7653912>.
+// expected-no-diagnostics
__declspec(dllimport) int __cdecl foo(void);
inline int __cdecl foo() { return 0; }
-
-// This function is added just to trigger a diagnostic. This way we can test how many
-// diagnostics we expect.
-void bar() { return 1; }
-
-// CHECK-NEG: error: void function 'bar' should not return a value
-// CHECK-NEG: 1 error generated
-// CHECK-POS: warning: 'foo' redeclared without dllimport attribute: previous dllimport ignored
-// CHECK-POS: error: void function 'bar' should not return a value
-// CHECK-POS: 1 warning and 1 error generated
-
diff --git a/test/Rewriter/no-integrated-preprocessing-64bit.m b/test/Rewriter/no-integrated-preprocessing-64bit.m
index 63184493b3b8..ea63c0b1d439 100644
--- a/test/Rewriter/no-integrated-preprocessing-64bit.m
+++ b/test/Rewriter/no-integrated-preprocessing-64bit.m
@@ -1,4 +1,4 @@
-// RUN: %clang -target x86_64-unkown-unknown -fms-extensions -rewrite-objc %s -o - | FileCheck %s
+// RUN: %clang -target x86_64-unknown-unknown -fms-extensions -rewrite-objc %s -o - | FileCheck %s
// rdar://12189793
#ifdef __cplusplus
diff --git a/test/Rewriter/no-integrated-preprocessing.m b/test/Rewriter/no-integrated-preprocessing.m
index e4cc301ab4e8..bc27a630bb1e 100644
--- a/test/Rewriter/no-integrated-preprocessing.m
+++ b/test/Rewriter/no-integrated-preprocessing.m
@@ -1,4 +1,4 @@
-// RUN: %clang -arch i386 -fms-extensions -rewrite-objc %s -o %t-rw.cpp
+// RUN: %clang -target i386-unknown-unknown -fms-extensions -rewrite-objc %s -o %t-rw.cpp
// RUN: FileCheck %s < %t-rw.cpp
// rdar://12189793
@@ -23,4 +23,4 @@ int main() {
// CHECK: static struct _class_ro_t _OBJC_CLASS_RO_$_MYINTF
// CHECK-NEXT: 0, 0, 0,
// CHECK-NEXT: 0,
-// CHECK-NEST: "MYINTF",
+// CHECK-NEXT: "MYINTF",
diff --git a/test/Rewriter/protocol-rewrite-1.m b/test/Rewriter/protocol-rewrite-1.m
index 541b7ee9baba..0c5104fbb56a 100644
--- a/test/Rewriter/protocol-rewrite-1.m
+++ b/test/Rewriter/protocol-rewrite-1.m
@@ -1,4 +1,7 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
+// RUN: %clang_cc1 -x objective-c -Wno-objc-root-class -fms-extensions -rewrite-objc %s -o %t-rw.cpp
+// RUN: FileCheck --input-file=%t-rw.cpp %s
+// rdar://9846759
+// rdar://15517895
typedef struct MyWidget {
int a;
@@ -46,3 +49,25 @@ int main(void) {
return 0;
}
+
+// rdar://15517895
+@class NSObject;
+
+@interface NSProtocolChecker
++ (id)protocolCheckerWithTarget:(NSObject *)anObject protocol:(Protocol *)aProtocol;
+@end
+
+@protocol NSConnectionVersionedProtocol
+@end
+
+
+@interface NSConnection @end
+
+@implementation NSConnection
+- (void) Meth {
+ [NSProtocolChecker protocolCheckerWithTarget:0 protocol:@protocol(NSConnectionVersionedProtocol)];
+}
+@end
+
+// CHECK: static struct _protocol_t *_OBJC_PROTOCOL_REFERENCE_$_NSConnectionVersionedProtocol = &_OBJC_PROTOCOL_NSConnectionVersionedProtocol
+// CHECK: sel_registerName("protocolCheckerWithTarget:protocol:"), (NSObject *)0, (Protocol *)_OBJC_PROTOCOL_REFERENCE_$_NSConnectionVersionedProtocol
diff --git a/test/Sema/2007-10-01-BuildArrayRef.c b/test/Sema/2007-10-01-BuildArrayRef.c
index 4692731b5c25..2552934f6485 100644
--- a/test/Sema/2007-10-01-BuildArrayRef.c
+++ b/test/Sema/2007-10-01-BuildArrayRef.c
@@ -1,9 +1,9 @@
-// RUN: not %clang_cc1_only -c %s -o - > /dev/null
+// RUN: %clang_cc1 -fsyntax-only -verify %s
// PR 1603
void func()
{
const int *arr;
- arr[0] = 1; // expected-error {{assignment of read-only location}}
+ arr[0] = 1; // expected-error {{read-only variable is not assignable}}
}
struct foo {
@@ -15,6 +15,6 @@ int func2()
{
const struct foo *fp;
fp = &sfoo;
- fp[0].bar = 1; // expected-error {{ assignment of read-only member}}
+ fp[0].bar = 1; // expected-error {{read-only variable is not assignable}}
return sfoo.bar;
}
diff --git a/test/Sema/2009-03-09-WeakDeclarations-1.c b/test/Sema/2009-03-09-WeakDeclarations-1.c
index f219de6b848f..c0035a49b838 100644
--- a/test/Sema/2009-03-09-WeakDeclarations-1.c
+++ b/test/Sema/2009-03-09-WeakDeclarations-1.c
@@ -1,12 +1,12 @@
-// RUN: %clang_cc1 %s -triple i686-apple-darwin
+// RUN: %clang_cc1 -verify %s -triple i686-apple-darwin
// Insist upon warnings for inappropriate weak attributes.
// O.K.
extern int ext_weak_import __attribute__ ((__weak_import__));
// These are inappropriate, and should generate warnings:
-int decl_weak_import __attribute__ ((__weak_import__)); // expected-warning {'weak_import' attribute cannot be specified on a definition}
-int decl_initialized_weak_import __attribute__ ((__weak_import__)) = 13; // expected-warning {'weak_import' attribute cannot be specified on a definition}
+int decl_weak_import __attribute__ ((__weak_import__)); // expected-warning {{'weak_import' attribute cannot be specified on a definition}}
+int decl_initialized_weak_import __attribute__ ((__weak_import__)) = 13; // expected-warning {{'weak_import' attribute cannot be specified on a definition}}
// O.K.
extern int ext_f(void) __attribute__ ((__weak_import__));
diff --git a/test/Sema/2009-04-22-UnknownSize.c b/test/Sema/2009-04-22-UnknownSize.c
index 9f717408b5ea..60bd8d2d7771 100644
--- a/test/Sema/2009-04-22-UnknownSize.c
+++ b/test/Sema/2009-04-22-UnknownSize.c
@@ -1,4 +1,4 @@
-// RUN: not %clang_cc1 %s -emit-llvm -o -
+// RUN: not %clang_cc1 -fsyntax-only -verify %s
// PR2958
static struct foo s; // expected-error { tentative definition has type 'struct foo' that is never completed }
struct foo *p = &s;
diff --git a/test/Sema/2009-07-17-VoidParameter.c b/test/Sema/2009-07-17-VoidParameter.c
index 68d1b1ec33ad..b838b02ab59d 100644
--- a/test/Sema/2009-07-17-VoidParameter.c
+++ b/test/Sema/2009-07-17-VoidParameter.c
@@ -1,4 +1,4 @@
-// RUN: not %clang_cc1 -emit-llvm %s -o -
+// RUN: %clang_cc1 -verify -fsyntax-only %s
// PR4214
typedef void vt;
-void (*func_ptr)(vt my_vt); // expected-error {argument may not have 'void' type}
+void (*func_ptr)(vt my_vt); // expected-error {{argument may not have 'void' type}}
diff --git a/test/Sema/Inputs/ms-keyword-system-header.h b/test/Sema/Inputs/ms-keyword-system-header.h
index 43a3db7a12ba..dda4c2a01111 100644
--- a/test/Sema/Inputs/ms-keyword-system-header.h
+++ b/test/Sema/Inputs/ms-keyword-system-header.h
@@ -3,7 +3,7 @@
typedef union {
union w *__uptr;
#if defined(MS) && defined(NOT_SYSTEM)
- // expected-warning@-2 {{keyword '__uptr' will be treated as an identifier here}}
+ // expected-warning@-2 {{keyword '__uptr' will be made available as an identifier here}}
#endif
int *__iptr;
} WS __attribute__((__transparent_union__));
diff --git a/test/Sema/Inputs/warn-unreachable.h b/test/Sema/Inputs/warn-unreachable.h
new file mode 100644
index 000000000000..394242f90829
--- /dev/null
+++ b/test/Sema/Inputs/warn-unreachable.h
@@ -0,0 +1,7 @@
+// Test that this unreachable code warning is
+// not reported because it is in a header.
+
+void foo_unreachable_header() {
+ return;
+ foo_unreachable_header(); // no-warning
+} \ No newline at end of file
diff --git a/test/Sema/MicrosoftCompatibility.c b/test/Sema/MicrosoftCompatibility.c
index 6330c1566703..a193b26b4223 100644
--- a/test/Sema/MicrosoftCompatibility.c
+++ b/test/Sema/MicrosoftCompatibility.c
@@ -16,6 +16,8 @@ __declspec(noreturn) void f6( void ) {
}
__declspec(align(32768)) struct S1 { int a; } s; /* expected-error {{requested alignment must be 8192 bytes or smaller}} */
-struct __declspec(aligned) S2 {}; /* expected-warning {{unknown __declspec attribute 'aligned' ignored}} */
+struct __declspec(aligned) S2 {}; /* expected-warning {{__declspec attribute 'aligned' is not supported}} */
struct __declspec(appdomain) S3 {}; /* expected-warning {{__declspec attribute 'appdomain' is not supported}} */
+
+__declspec(__noreturn__) void f7(void); /* expected-warning {{__declspec attribute '__noreturn__' is not supported}} */
diff --git a/test/Sema/MicrosoftExtensions.c b/test/Sema/MicrosoftExtensions.c
index a6caf7acb8a8..429dd943a746 100644
--- a/test/Sema/MicrosoftExtensions.c
+++ b/test/Sema/MicrosoftExtensions.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -fsyntax-only -Wno-unused-value -Wmicrosoft -verify -fms-extensions
+// RUN: %clang_cc1 -triple i686-windows %s -fsyntax-only -Wno-unused-value -Wmicrosoft -verify -fms-extensions
struct A
@@ -20,10 +20,7 @@ struct D {
int D[];
};
-
-
-
-
+struct __declspec(uuid("00000000-0000-0000-C000-000000000046")) IUnknown {}; /* expected-error {{'uuid' attribute is not supported in C}} */
typedef struct notnested {
long bad1;
@@ -90,11 +87,11 @@ typedef struct {
AA; // expected-warning {{anonymous structs are a Microsoft extension}}
} BB;
-__declspec(deprecated("This is deprecated")) enum DE1 { one, two } e1; // expected-note {{'e1' declared here}}
-struct __declspec(deprecated) DS1 { int i; float f; }; // expected-note {{declared here}}
+__declspec(deprecated("This is deprecated")) enum DE1 { one, two } e1; // expected-note {{'e1' has been explicitly marked deprecated here}}
+struct __declspec(deprecated) DS1 { int i; float f; }; // expected-note {{'DS1' has been explicitly marked deprecated here}}
#define MY_TEXT "This is also deprecated"
-__declspec(deprecated(MY_TEXT)) void Dfunc1( void ) {} // expected-note {{'Dfunc1' declared here}}
+__declspec(deprecated(MY_TEXT)) void Dfunc1( void ) {} // expected-note {{'Dfunc1' has been explicitly marked deprecated here}}
struct __declspec(deprecated(123)) DS2 {}; // expected-error {{'deprecated' attribute requires a string}}
@@ -134,3 +131,17 @@ int *(__ptr32 __sptr wrong9); // expected-error {{'__sptr' attribute only applie
typedef int *T;
T __ptr32 wrong10; // expected-error {{'__ptr32' attribute only applies to pointer arguments}}
+
+typedef char *my_va_list;
+void __va_start(my_va_list *ap, ...); // expected-note {{passing argument to parameter 'ap' here}}
+void vmyprintf(const char *f, my_va_list ap);
+void myprintf(const char *f, ...) {
+ my_va_list ap;
+ if (1) {
+ __va_start(&ap, f);
+ vmyprintf(f, ap);
+ ap = 0;
+ } else {
+ __va_start(ap, f); // expected-warning {{incompatible pointer types passing 'my_va_list'}}
+ }
+}
diff --git a/test/Sema/__try.c b/test/Sema/__try.c
index 1641402e7eae..a355de9ccf94 100644
--- a/test/Sema/__try.c
+++ b/test/Sema/__try.c
@@ -170,3 +170,22 @@ void TEST() {
(void)GetExceptionInformation(); // expected-error{{only allowed in __except filter expression}}
(void)AbnormalTermination(); // expected-error{{only allowed in __finally block}}
}
+
+void test_seh_leave_stmt() {
+ __leave; // expected-error{{'__leave' statement not in __try block}}
+
+ __try {
+ __leave;
+ __leave 4; // expected-error{{expected ';' after __leave statement}}
+ } __except(1) {
+ __leave; // expected-error{{'__leave' statement not in __try block}}
+ }
+
+ __try {
+ __leave;
+ } __finally {
+ __leave; // expected-error{{'__leave' statement not in __try block}}
+ }
+ __leave; // expected-error{{'__leave' statement not in __try block}}
+}
+
diff --git a/test/Sema/aarch64-neon-ranges.c b/test/Sema/aarch64-neon-ranges.c
new file mode 100644
index 000000000000..3a170b8f4cb9
--- /dev/null
+++ b/test/Sema/aarch64-neon-ranges.c
@@ -0,0 +1,218 @@
+// RUN: %clang_cc1 -triple aarch64-linux-gnu -target-feature +neon -ffreestanding -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple arm64-linux-gnu -target-feature +neon -ffreestanding -fsyntax-only -verify %s
+
+#include <arm_neon.h>
+
+void test_vext_8bit(int8x8_t small, int8x16_t big) {
+ vext_s8(small, small, 7);
+ vext_u8(small, small, 7);
+ vext_p8(small, small, 7);
+ vextq_s8(big, big, 15);
+ vextq_u8(big, big, 15);
+ vextq_p8(big, big, 15);
+
+ vext_s8(small, small, 8); // expected-error {{argument should be a value from 0 to 7}}
+ vext_u8(small, small, 8); // expected-error {{argument should be a value from 0 to 7}}
+ vext_p8(small, small, 8); // expected-error {{argument should be a value from 0 to 7}}
+ vextq_s8(big, big, 16); // expected-error {{argument should be a value from 0 to 15}}
+ vextq_u8(big, big, 16); // expected-error {{argument should be a value from 0 to 15}}
+ vextq_p8(big, big, 16); // expected-error {{argument should be a value from 0 to 15}}
+}
+
+void test_mul_lane_f64(float64x1_t small, float64x2_t big, float64x2_t rhs) {
+ vmul_lane_f64(small, small, 0);
+ vmul_laneq_f64(small, big, 1);
+ vmulq_lane_f64(big, small, 0);
+ vmulq_laneq_f64(big, big, 1);
+ vfma_lane_f64(small, small, small, 0);
+ vfma_laneq_f64(small, small, big, 1);
+ vfmaq_lane_f64(big, big, small, 0);
+ vfmaq_laneq_f64(big, big, big, 1);
+
+ vmul_lane_f64(small, small, 1); // expected-error {{argument should be a value from 0 to 0}}
+ vmul_laneq_f64(small, big, 2); // expected-error {{argument should be a value from 0 to 1}}
+ vfma_lane_f64(small, small, small, 1); // expected-error {{argument should be a value from 0 to 0}}
+ vfma_laneq_f64(small, small, big, 2); // expected-error {{argument should be a value from 0 to 1}}
+ vfmaq_laneq_f64(big, big, big, 2); // expected-error {{argument should be a value from 0 to 1}}
+}
+
+void test_ld1st1(int8x8_t small, int8x16_t big, void *addr) {
+ vld1_lane_s8(addr, small, 7);
+ vld1_lane_s16(addr, small, 3);
+ vld1_lane_s32(addr, small, 1);
+ vld1_lane_s64(addr, small, 0);
+
+ vld1q_lane_s8(addr, big, 15);
+ vld1q_lane_s16(addr, big, 7);
+ vld1q_lane_s32(addr, big, 3);
+ vld1q_lane_s64(addr, big, 1);
+
+ vld1_lane_s8(addr, small, 8); // expected-error {{argument should be a value from 0 to 7}}
+ vld1_lane_s16(addr, small, 4); // expected-error {{argument should be a value from 0 to 3}}
+ vld1_lane_s32(addr, small, 2); // expected-error {{argument should be a value from 0 to 1}}
+ vld1_lane_s64(addr, small, 1); // expected-error {{argument should be a value from 0 to 0}}
+
+ vld1q_lane_s8(addr, big, 16); // expected-error {{argument should be a value from 0 to 15}}
+ vld1q_lane_s16(addr, big, 8); // expected-error {{argument should be a value from 0 to 7}}
+ vld1q_lane_s32(addr, big, 4); // expected-error {{argument should be a value from 0 to 3}}
+ vld1q_lane_s64(addr, big, 2); // expected-error {{argument should be a value from 0 to 1}}
+
+ vst1_lane_s8(addr, small, 7);
+ vst1_lane_s16(addr, small, 3);
+ vst1_lane_s32(addr, small, 1);
+ vst1_lane_s64(addr, small, 0);
+
+ vst1q_lane_s8(addr, big, 15);
+ vst1q_lane_s16(addr, big, 7);
+ vst1q_lane_s32(addr, big, 3);
+ vst1q_lane_s64(addr, big, 1);
+
+ vst1_lane_s8(addr, small, 8); // expected-error {{argument should be a value from 0 to 7}}
+ vst1_lane_s16(addr, small, 4); // expected-error {{argument should be a value from 0 to 3}}
+ vst1_lane_s32(addr, small, 2); // expected-error {{argument should be a value from 0 to 1}}
+ vst1_lane_s64(addr, small, 1); // expected-error {{argument should be a value from 0 to 0}}
+
+ vst1q_lane_s8(addr, big, 16); // expected-error {{argument should be a value from 0 to 15}}
+ vst1q_lane_s16(addr, big, 8); // expected-error {{argument should be a value from 0 to 7}}
+ vst1q_lane_s32(addr, big, 4); // expected-error {{argument should be a value from 0 to 3}}
+ vst1q_lane_s64(addr, big, 2); // expected-error {{argument should be a value from 0 to 1}}
+}
+
+void test_ld2st2(int8x8x2_t small8, int8x16x2_t big8,
+ int16x4x2_t small16, int16x8x2_t big16,
+ int32x2x2_t small32, int32x4x2_t big32,
+ int64x1x2_t small64, int64x2x2_t big64,
+ void *addr) {
+ vld2_lane_s8(addr, small8, 7);
+ vld2_lane_s16(addr, small16, 3);
+ vld2_lane_s32(addr, small32, 1);
+ vld2_lane_s64(addr, small64, 0);
+
+ vld2q_lane_s8(addr, big8, 15);
+ vld2q_lane_s16(addr, big16, 7);
+ vld2q_lane_s32(addr, big32, 3);
+ vld2q_lane_s64(addr, big64, 1);
+
+ vld2_lane_s8(addr, small8, 8); // expected-error {{argument should be a value from 0 to 7}}
+ vld2_lane_s16(addr, small16, 4); // expected-error {{argument should be a value from 0 to 3}}
+ vld2_lane_s32(addr, small32, 2); // expected-error {{argument should be a value from 0 to 1}}
+ vld2_lane_s64(addr, small64, 1); // expected-error {{argument should be a value from 0 to 0}}
+
+ vld2q_lane_s8(addr, big8, 16); // expected-error {{argument should be a value from 0 to 15}}
+ vld2q_lane_s16(addr, big16, 8); // expected-error {{argument should be a value from 0 to 7}}
+ vld2q_lane_s32(addr, big32, 4); // expected-error {{argument should be a value from 0 to 3}}
+ vld2q_lane_s64(addr, big64, 2); // expected-error {{argument should be a value from 0 to 1}}
+
+ vst2_lane_s8(addr, small8, 7);
+ vst2_lane_s16(addr, small16, 3);
+ vst2_lane_s32(addr, small32, 1);
+ vst2_lane_s64(addr, small64, 0);
+
+ vst2q_lane_s8(addr, big8, 15);
+ vst2q_lane_s16(addr, big16, 7);
+ vst2q_lane_s32(addr, big32, 3);
+ vst2q_lane_s64(addr, big64, 1);
+
+ vst2_lane_s8(addr, small8, 8); // expected-error {{argument should be a value from 0 to 7}}
+ vst2_lane_s16(addr, small16, 4); // expected-error {{argument should be a value from 0 to 3}}
+ vst2_lane_s32(addr, small32, 2); // expected-error {{argument should be a value from 0 to 1}}
+ vst2_lane_s64(addr, small64, 1); // expected-error {{argument should be a value from 0 to 0}}
+
+ vst2q_lane_s8(addr, big8, 16); // expected-error {{argument should be a value from 0 to 15}}
+ vst2q_lane_s16(addr, big16, 8); // expected-error {{argument should be a value from 0 to 7}}
+ vst2q_lane_s32(addr, big32, 4); // expected-error {{argument should be a value from 0 to 3}}
+ vst2q_lane_s64(addr, big64, 2); // expected-error {{argument should be a value from 0 to 1}}
+}
+
+void test_ld3st3(int8x8x3_t small8, int8x16x3_t big8,
+ int16x4x3_t small16, int16x8x3_t big16,
+ int32x2x3_t small32, int32x4x3_t big32,
+ int64x1x3_t small64, int64x2x3_t big64,
+ void *addr) {
+ vld3_lane_s8(addr, small8, 7);
+ vld3_lane_s16(addr, small16, 3);
+ vld3_lane_s32(addr, small32, 1);
+ vld3_lane_s64(addr, small64, 0);
+
+ vld3q_lane_s8(addr, big8, 15);
+ vld3q_lane_s16(addr, big16, 7);
+ vld3q_lane_s32(addr, big32, 3);
+ vld3q_lane_s64(addr, big64, 1);
+
+ vld3_lane_s8(addr, small8, 8); // expected-error {{argument should be a value from 0 to 7}}
+ vld3_lane_s16(addr, small16, 4); // expected-error {{argument should be a value from 0 to 3}}
+ vld3_lane_s32(addr, small32, 2); // expected-error {{argument should be a value from 0 to 1}}
+ vld3_lane_s64(addr, small64, 1); // expected-error {{argument should be a value from 0 to 0}}
+
+ vld3q_lane_s8(addr, big8, 16); // expected-error {{argument should be a value from 0 to 15}}
+ vld3q_lane_s16(addr, big16, 8); // expected-error {{argument should be a value from 0 to 7}}
+ vld3q_lane_s32(addr, big32, 4); // expected-error {{argument should be a value from 0 to 3}}
+ vld3q_lane_s64(addr, big64, 2); // expected-error {{argument should be a value from 0 to 1}}
+
+ vst3_lane_s8(addr, small8, 7);
+ vst3_lane_s16(addr, small16, 3);
+ vst3_lane_s32(addr, small32, 1);
+ vst3_lane_s64(addr, small64, 0);
+
+ vst3q_lane_s8(addr, big8, 15);
+ vst3q_lane_s16(addr, big16, 7);
+ vst3q_lane_s32(addr, big32, 3);
+ vst3q_lane_s64(addr, big64, 1);
+
+ vst3_lane_s8(addr, small8, 8); // expected-error {{argument should be a value from 0 to 7}}
+ vst3_lane_s16(addr, small16, 4); // expected-error {{argument should be a value from 0 to 3}}
+ vst3_lane_s32(addr, small32, 2); // expected-error {{argument should be a value from 0 to 1}}
+ vst3_lane_s64(addr, small64, 1); // expected-error {{argument should be a value from 0 to 0}}
+
+ vst3q_lane_s8(addr, big8, 16); // expected-error {{argument should be a value from 0 to 15}}
+ vst3q_lane_s16(addr, big16, 8); // expected-error {{argument should be a value from 0 to 7}}
+ vst3q_lane_s32(addr, big32, 4); // expected-error {{argument should be a value from 0 to 3}}
+ vst3q_lane_s64(addr, big64, 2); // expected-error {{argument should be a value from 0 to 1}}
+}
+
+void test_ld4st4(int8x8x4_t small8, int8x16x4_t big8,
+ int16x4x4_t small16, int16x8x4_t big16,
+ int32x2x4_t small32, int32x4x4_t big32,
+ int64x1x4_t small64, int64x2x4_t big64,
+ void *addr) {
+ vld4_lane_s8(addr, small8, 7);
+ vld4_lane_s16(addr, small16, 3);
+ vld4_lane_s32(addr, small32, 1);
+ vld4_lane_s64(addr, small64, 0);
+
+ vld4q_lane_s8(addr, big8, 15);
+ vld4q_lane_s16(addr, big16, 7);
+ vld4q_lane_s32(addr, big32, 3);
+ vld4q_lane_s64(addr, big64, 1);
+
+ vld4_lane_s8(addr, small8, 8); // expected-error {{argument should be a value from 0 to 7}}
+ vld4_lane_s16(addr, small16, 4); // expected-error {{argument should be a value from 0 to 3}}
+ vld4_lane_s32(addr, small32, 2); // expected-error {{argument should be a value from 0 to 1}}
+ vld4_lane_s64(addr, small64, 1); // expected-error {{argument should be a value from 0 to 0}}
+
+ vld4q_lane_s8(addr, big8, 16); // expected-error {{argument should be a value from 0 to 15}}
+ vld4q_lane_s16(addr, big16, 8); // expected-error {{argument should be a value from 0 to 7}}
+ vld4q_lane_s32(addr, big32, 4); // expected-error {{argument should be a value from 0 to 3}}
+ vld4q_lane_s64(addr, big64, 2); // expected-error {{argument should be a value from 0 to 1}}
+
+ vst4_lane_s8(addr, small8, 7);
+ vst4_lane_s16(addr, small16, 3);
+ vst4_lane_s32(addr, small32, 1);
+ vst4_lane_s64(addr, small64, 0);
+
+ vst4q_lane_s8(addr, big8, 15);
+ vst4q_lane_s16(addr, big16, 7);
+ vst4q_lane_s32(addr, big32, 3);
+ vst4q_lane_s64(addr, big64, 1);
+
+ vst4_lane_s8(addr, small8, 8); // expected-error {{argument should be a value from 0 to 7}}
+ vst4_lane_s16(addr, small16, 4); // expected-error {{argument should be a value from 0 to 3}}
+ vst4_lane_s32(addr, small32, 2); // expected-error {{argument should be a value from 0 to 1}}
+ vst4_lane_s64(addr, small64, 1); // expected-error {{argument should be a value from 0 to 0}}
+
+ vst4q_lane_s8(addr, big8, 16); // expected-error {{argument should be a value from 0 to 15}}
+ vst4q_lane_s16(addr, big16, 8); // expected-error {{argument should be a value from 0 to 7}}
+ vst4q_lane_s32(addr, big32, 4); // expected-error {{argument should be a value from 0 to 3}}
+ vst4q_lane_s64(addr, big64, 2); // expected-error {{argument should be a value from 0 to 1}}
+}
+
diff --git a/test/Sema/aarch64-neon-vector-types.c b/test/Sema/aarch64-neon-vector-types.c
index 894cf6de1b0c..4cc1e2c292d1 100644
--- a/test/Sema/aarch64-neon-vector-types.c
+++ b/test/Sema/aarch64-neon-vector-types.c
@@ -1,19 +1,36 @@
// RUN: %clang_cc1 %s -triple aarch64-none-linux-gnu -target-feature +neon -fsyntax-only -verify
+// RUN: %clang_cc1 %s -triple aarch64-none-linux-gnu -target-feature +neon -DUSE_LONG -fsyntax-only -verify
+// RUN: %clang_cc1 %s -triple arm64-none-linux-gnu -target-feature +neon -fsyntax-only -verify
+// RUN: %clang_cc1 %s -triple arm64-none-linux-gnu -target-feature +neon -DUSE_LONG -fsyntax-only -verify
typedef float float32_t;
typedef unsigned char poly8_t;
typedef unsigned short poly16_t;
+
+// Both "long" and "long long" should work for 64-bit arch like aarch64.
+// stdint.h in gnu libc is using "long" for 64-bit arch.
+#if USE_LONG
+typedef long int64_t;
+typedef unsigned long uint64_t;
+#else
+typedef long long int64_t;
typedef unsigned long long uint64_t;
+#endif
+typedef uint64_t poly64_t;
// Define some valid Neon types.
typedef __attribute__((neon_vector_type(2))) int int32x2_t;
typedef __attribute__((neon_vector_type(4))) int int32x4_t;
+typedef __attribute__((neon_vector_type(1))) int64_t int64x1_t;
+typedef __attribute__((neon_vector_type(2))) int64_t int64x2_t;
typedef __attribute__((neon_vector_type(1))) uint64_t uint64x1_t;
typedef __attribute__((neon_vector_type(2))) uint64_t uint64x2_t;
typedef __attribute__((neon_vector_type(2))) float32_t float32x2_t;
typedef __attribute__((neon_vector_type(4))) float32_t float32x4_t;
typedef __attribute__((neon_polyvector_type(16))) poly8_t poly8x16_t;
typedef __attribute__((neon_polyvector_type(8))) poly16_t poly16x8_t;
+typedef __attribute__((neon_polyvector_type(1))) poly64_t poly64x1_t;
+typedef __attribute__((neon_polyvector_type(2))) poly64_t poly64x2_t;
// The attributes must have a single argument.
typedef __attribute__((neon_vector_type(2, 4))) int only_one_arg; // expected-error{{attribute takes one argument}}
diff --git a/test/Sema/align-x86.c b/test/Sema/align-x86.c
index 6b93a4893d15..f112c6398c60 100644
--- a/test/Sema/align-x86.c
+++ b/test/Sema/align-x86.c
@@ -23,6 +23,10 @@ struct __attribute__((packed)) {unsigned int a;} g4;
short chk1[__alignof__(g4) == 1 ? 1 : -1];
short chk2[__alignof__(g4.a) == 1 ? 1 : -1];
+double g6[3];
+short chk1[__alignof__(g6) == 8 ? 1 : -1];
+short chk2[__alignof__(double[3]) == 8 ? 1 : -1];
+
// PR5637
diff --git a/test/Sema/alloc_size.c b/test/Sema/alloc_size.c
deleted file mode 100644
index 053323a9f11b..000000000000
--- a/test/Sema/alloc_size.c
+++ /dev/null
@@ -1,27 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
-
-void* my_malloc(unsigned char) __attribute__((alloc_size(1)));
-void* my_calloc(unsigned char, short) __attribute__((alloc_size(1,2)));
-void* my_realloc(void*, unsigned) __attribute__((alloc_size(2)));
-
-
-void* fn1(int) __attribute__((alloc_size("xpto"))); // expected-error{{'alloc_size' attribute requires parameter 1 to be an integer constant}}
-
-void* fn2(void*) __attribute__((alloc_size(1))); // expected-error{{'alloc_size' attribute requires an integer constant}}
-
-void* fn3(unsigned) __attribute__((alloc_size(0))); // expected-error{{attribute parameter 1 is out of bounds}}
-void* fn4(unsigned) __attribute__((alloc_size(2))); // expected-error{{attribute parameter 1 is out of bounds}}
-
-void fn5(unsigned) __attribute__((alloc_size(1))); // expected-warning{{only applies to functions that return a pointer}}
-char fn6(unsigned) __attribute__((alloc_size(1))); // expected-warning{{only applies to functions that return a pointer}}
-
-void* fn7(unsigned) __attribute__((alloc_size)); // expected-error {{attribute takes at least 1 argument}}
-
-void *fn8(int, int) __attribute__((alloc_size(1, 1))); // OK
-
-void* fn9(unsigned) __attribute__((alloc_size(12345678901234567890123))); // expected-error {{integer constant is larger than the largest unsigned integer type}} // expected-error {{attribute parameter 1 is out of bounds}}
-
-void* fn10(size_t, size_t) __attribute__((alloc_size(1,2))); // expected-error{{redefinition of parameter}} \
- // expected-error{{a parameter list without types is only allowed in a function definition}} \
- // expected-error{{attribute parameter 1 is out of bounds}}
-void* fn11() __attribute__((alloc_size(1))); // expected-error{{attribute parameter 1 is out of bounds}}
diff --git a/test/Sema/arm-interrupt-attr.c b/test/Sema/arm-interrupt-attr.c
index b2cedc2e4d20..e8f21ada7fc1 100644
--- a/test/Sema/arm-interrupt-attr.c
+++ b/test/Sema/arm-interrupt-attr.c
@@ -1,9 +1,9 @@
// RUN: %clang_cc1 %s -triple arm-apple-darwin -verify -fsyntax-only
-__attribute__((interrupt(IRQ))) void foo() {} // expected-error {{'interrupt' attribute requires a string}}
+__attribute__((interrupt(IRQ))) void foo() {} // expected-error {{'interrupt' attribute requires a string}}
__attribute__((interrupt("irq"))) void foo1() {} // expected-warning {{'interrupt' attribute argument not supported: irq}}
-__attribute__((interrupt("IRQ", 1))) void foo2() {} // expected-error {{attribute takes no more than 1 argument}}
+__attribute__((interrupt("IRQ", 1))) void foo2() {} // expected-error {{'interrupt' attribute takes no more than 1 argument}}
__attribute__((interrupt("IRQ"))) void foo3() {}
__attribute__((interrupt("FIQ"))) void foo4() {}
diff --git a/test/Sema/arm-neon-types.c b/test/Sema/arm-neon-types.c
index a49de12d4485..a5ee708b5034 100644
--- a/test/Sema/arm-neon-types.c
+++ b/test/Sema/arm-neon-types.c
@@ -17,7 +17,7 @@ float32x2_t test2(uint32x2_t x) {
float32x2_t test3(uint32x2_t x) {
// FIXME: The "incompatible result type" error is due to pr10112 and should be
// removed when that is fixed.
- return vcvt_n_f32_u32(x, 0); // expected-error {{argument should be a value from 1 to 32}} expected-error {{incompatible result type}}
+ return vcvt_n_f32_u32(x, 0); // expected-error {{argument should be a value from 1 to 32}}
}
typedef signed int vSInt32 __attribute__((__vector_size__(16)));
diff --git a/test/Sema/arm64-inline-asm.c b/test/Sema/arm64-inline-asm.c
new file mode 100644
index 000000000000..08eb669265f7
--- /dev/null
+++ b/test/Sema/arm64-inline-asm.c
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios7.1 -fsyntax-only -verify %s
+// expected-no-diagnostics
+
+void foo() {
+ asm volatile("USE(%0)" :: "z"(0LL));
+ asm volatile("USE(%x0)" :: "z"(0LL));
+ asm volatile("USE(%w0)" :: "z"(0));
+
+}
diff --git a/test/Sema/arm64-neon-args.c b/test/Sema/arm64-neon-args.c
new file mode 100644
index 000000000000..315a7044040e
--- /dev/null
+++ b/test/Sema/arm64-neon-args.c
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -triple arm64-apple-darwin -target-feature +neon -fsyntax-only -ffreestanding -verify %s
+// RUN: %clang_cc1 -triple arm64_be-none-linux-gnu -target-feature +neon -fsyntax-only -ffreestanding -verify %s
+
+#include <arm_neon.h>
+
+// rdar://13527900
+void vcopy_reject(float32x4_t vOut0, float32x4_t vAlpha, int t) {
+ vcopyq_laneq_f32(vOut0, 1, vAlpha, t); // expected-error {{argument to '__builtin_neon_vgetq_lane_f32' must be a constant integer}}
+}
+
+// rdar://problem/15256199
+float32x4_t test_vmlsq_lane(float32x4_t accum, float32x4_t lhs, float32x2_t rhs) {
+ return vmlsq_lane_f32(accum, lhs, rhs, 1);
+}
diff --git a/test/Sema/arm_acle.c b/test/Sema/arm_acle.c
new file mode 100644
index 000000000000..866626fc38cb
--- /dev/null
+++ b/test/Sema/arm_acle.c
@@ -0,0 +1,32 @@
+// RUN: %clang_cc1 -triple armv8 -target-cpu cortex-a57 -fsyntax-only -ffreestanding -verify %s
+
+#include <arm_acle.h>
+/*
+ * Memory barrier intrinsics
+ * Argument for dmb, dsb, isb must be compile-time constant,
+ * otherwise an error should be raised.
+ */
+void test_dmb_const_diag(const unsigned int t) {
+ return __dmb(t); // expected-error-re {{argument to {{.*}} must be a constant integer}}
+}
+
+void test_dsb_const_diag(const unsigned int t) {
+ return __dsb(t); // expected-error-re {{argument to {{.*}} must be a constant integer}}
+}
+
+void test_isb_const_diag(const unsigned int t) {
+ return __isb(t); // expected-error-re {{argument to {{.*}} must be a constant integer}}
+}
+
+/*
+ * Saturating intrinsics
+ * Second argument for SSAT and USAT intrinsics must be compile-time constant,
+ * otherwise an error should be raised.
+ */
+int32_t test_ssat_const_diag(int32_t t, const int32_t v) {
+ return __ssat(t, v); // expected-error-re {{argument to {{.*}} must be a constant integer}}
+}
+
+int32_t test_usat_const_diag(int32_t t, const int32_t v) {
+ return __usat(t, v); // expected-error-re {{argument to {{.*}} must be a constant integer}}
+}
diff --git a/test/Sema/array-init.c b/test/Sema/array-init.c
index ae2c7425662b..4cc5e412c2d5 100644
--- a/test/Sema/array-init.c
+++ b/test/Sema/array-init.c
@@ -282,7 +282,12 @@ int a5[] = (int5){1, 2, 3, 4, 5}; // expected-warning{{initialization of an arra
int a6[5] = (int[]){1, 2, 3}; // expected-error{{cannot initialize array of type 'int [5]' with array of type 'int [3]'}}
int nonconst_value();
-int a7[5] = (int[5]){ 1, 2, 3, 4, nonconst_value() }; // expected-error{{initializer element is not a compile-time constant}}
+int a7[5] = (int[5]){ 1,
+ 2,
+ 3,
+ 4,
+ nonconst_value() // expected-error{{initializer element is not a compile-time constant}}
+};
// <rdar://problem/10636946>
__attribute__((weak)) const unsigned int test10_bound = 10;
diff --git a/test/Sema/asm.c b/test/Sema/asm.c
index c81f16a3875d..89c8c574eb5a 100644
--- a/test/Sema/asm.c
+++ b/test/Sema/asm.c
@@ -1,5 +1,7 @@
// RUN: %clang_cc1 %s -Wno-private-extern -triple i386-pc-linux-gnu -verify -fsyntax-only
+
+
void f() {
int i;
@@ -13,6 +15,9 @@ void f() {
asm ("foo\n" : "=a" (i) : "[" (i)); // expected-error {{invalid input constraint '[' in asm}}
asm ("foo\n" : "=a" (i) : "[foo" (i)); // expected-error {{invalid input constraint '[foo' in asm}}
asm ("foo\n" : "=a" (i) : "[symbolic_name]" (i)); // expected-error {{invalid input constraint '[symbolic_name]' in asm}}
+
+ asm ("foo\n" : : "" (i)); // expected-error {{invalid input constraint '' in asm}}
+ asm ("foo\n" : "=a" (i) : "" (i)); // expected-error {{invalid input constraint '' in asm}}
}
void clobbers() {
@@ -92,8 +97,6 @@ void test9(int i) {
asm("" : [foo] "=r" (i), "=r"(i) : "[foo]1"(i)); // expected-error{{invalid input constraint '[foo]1' in asm}}
}
-register int g asm("dx"); // expected-error{{global register variables are not supported}}
-
void test10(void){
static int g asm ("g_asm") = 0;
extern int gg asm ("gg_asm");
@@ -146,3 +149,17 @@ double test15() {
__asm("0.0":"=g"(ret)); // no-error
return ret;
}
+
+// PR19837
+struct foo {
+ int a;
+ char b;
+};
+register struct foo bar asm("sp"); // expected-error {{bad type for named register variable}}
+register float baz asm("sp"); // expected-error {{bad type for named register variable}}
+
+double f_output_constraint(void) {
+ double result;
+ __asm("foo1": "=f" (result)); // expected-error {{invalid output constraint '=f' in asm}}
+ return result;
+}
diff --git a/test/Sema/ast-print.c b/test/Sema/ast-print.c
index 2066e182c12d..382f0d389627 100644
--- a/test/Sema/ast-print.c
+++ b/test/Sema/ast-print.c
@@ -18,3 +18,24 @@ int foo(const struct blah *b) {
// CHECK: return b->b;
return b->b;
}
+
+int arr(int a[static 3]) {
+ // CHECK: int a[static 3]
+ return a[2];
+}
+
+int rarr(int a[restrict static 3]) {
+ // CHECK: int a[restrict static 3]
+ return a[2];
+}
+
+int varr(int n, int a[static n]) {
+ // CHECK: int a[static n]
+ return a[2];
+}
+
+int rvarr(int n, int a[restrict static n]) {
+ // CHECK: int a[restrict static n]
+ return a[2];
+}
+
diff --git a/test/Sema/atomic-compare.c b/test/Sema/atomic-compare.c
new file mode 100644
index 000000000000..2eed09126026
--- /dev/null
+++ b/test/Sema/atomic-compare.c
@@ -0,0 +1,21 @@
+// RUN: %clang_cc1 %s -verify -fsyntax-only
+
+void f(_Atomic(int) a, _Atomic(int) b) {
+ if (a > b) {} // no warning
+ if (a < b) {} // no warning
+ if (a >= b) {} // no warning
+ if (a <= b) {} // no warning
+ if (a == b) {} // no warning
+ if (a != b) {} // no warning
+
+ if (a == 0) {} // no warning
+ if (a > 0) {} // no warning
+ if (a > 1) {} // no warning
+ if (a > 2) {} // no warning
+
+ if (!a > 0) {} // no warning
+ if (!a > 1) {} // expected-warning {{comparison of constant 1 with boolean expression is always false}}
+ if (!a > 2) {} // expected-warning {{comparison of constant 2 with boolean expression is always false}}
+ if (!a > b) {} // no warning
+ if (!a > -1) {} // expected-warning {{comparison of constant -1 with boolean expression is always true}}
+}
diff --git a/test/Sema/atomic-expr.c b/test/Sema/atomic-expr.c
index 5602d545cc7f..997ee90e9f3b 100644
--- a/test/Sema/atomic-expr.c
+++ b/test/Sema/atomic-expr.c
@@ -58,3 +58,6 @@ int func_13 (int x, unsigned y) {
return x ? data1 : y;
}
+int func_14 () {
+ return data1 == 0;
+}
diff --git a/test/Sema/atomic-ops.c b/test/Sema/atomic-ops.c
index c2d38e714bf2..320abc5ad479 100644
--- a/test/Sema/atomic-ops.c
+++ b/test/Sema/atomic-ops.c
@@ -1,5 +1,4 @@
// RUN: %clang_cc1 %s -verify -fsyntax-only -triple=i686-linux-gnu -std=c11
-// RUN: %clang_cc1 %s -verify -fsyntax-only -triple=aarch64-linux-gnu -std=c11
// Basic parsing/Sema tests for __c11_atomic_*
@@ -182,3 +181,225 @@ void PR16931(int* x) { // expected-note {{passing argument to parameter 'x' here
flag flagvar = { 0 };
PR16931(&flagvar); // expected-warning {{incompatible pointer types}}
}
+
+void memory_checks(_Atomic(int) *Ap, int *p, int val) {
+ (void)__c11_atomic_load(Ap, memory_order_relaxed);
+ (void)__c11_atomic_load(Ap, memory_order_acquire);
+ (void)__c11_atomic_load(Ap, memory_order_consume);
+ (void)__c11_atomic_load(Ap, memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}}
+ (void)__c11_atomic_load(Ap, memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}}
+ (void)__c11_atomic_load(Ap, memory_order_seq_cst);
+ (void)__c11_atomic_load(Ap, val);
+ (void)__c11_atomic_load(Ap, -1); // expected-warning {{memory order argument to atomic operation is invalid}}
+ (void)__c11_atomic_load(Ap, 42); // expected-warning {{memory order argument to atomic operation is invalid}}
+
+ (void)__c11_atomic_store(Ap, val, memory_order_relaxed);
+ (void)__c11_atomic_store(Ap, val, memory_order_acquire); // expected-warning {{memory order argument to atomic operation is invalid}}
+ (void)__c11_atomic_store(Ap, val, memory_order_consume); // expected-warning {{memory order argument to atomic operation is invalid}}
+ (void)__c11_atomic_store(Ap, val, memory_order_release);
+ (void)__c11_atomic_store(Ap, val, memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}}
+ (void)__c11_atomic_store(Ap, val, memory_order_seq_cst);
+
+ (void)__c11_atomic_fetch_add(Ap, 1, memory_order_relaxed);
+ (void)__c11_atomic_fetch_add(Ap, 1, memory_order_acquire);
+ (void)__c11_atomic_fetch_add(Ap, 1, memory_order_consume);
+ (void)__c11_atomic_fetch_add(Ap, 1, memory_order_release);
+ (void)__c11_atomic_fetch_add(Ap, 1, memory_order_acq_rel);
+ (void)__c11_atomic_fetch_add(Ap, 1, memory_order_seq_cst);
+
+ (void)__c11_atomic_init(Ap, val);
+ (void)__c11_atomic_init(Ap, val);
+ (void)__c11_atomic_init(Ap, val);
+ (void)__c11_atomic_init(Ap, val);
+ (void)__c11_atomic_init(Ap, val);
+ (void)__c11_atomic_init(Ap, val);
+
+ (void)__c11_atomic_fetch_sub(Ap, val, memory_order_relaxed);
+ (void)__c11_atomic_fetch_sub(Ap, val, memory_order_acquire);
+ (void)__c11_atomic_fetch_sub(Ap, val, memory_order_consume);
+ (void)__c11_atomic_fetch_sub(Ap, val, memory_order_release);
+ (void)__c11_atomic_fetch_sub(Ap, val, memory_order_acq_rel);
+ (void)__c11_atomic_fetch_sub(Ap, val, memory_order_seq_cst);
+
+ (void)__c11_atomic_fetch_and(Ap, val, memory_order_relaxed);
+ (void)__c11_atomic_fetch_and(Ap, val, memory_order_acquire);
+ (void)__c11_atomic_fetch_and(Ap, val, memory_order_consume);
+ (void)__c11_atomic_fetch_and(Ap, val, memory_order_release);
+ (void)__c11_atomic_fetch_and(Ap, val, memory_order_acq_rel);
+ (void)__c11_atomic_fetch_and(Ap, val, memory_order_seq_cst);
+
+ (void)__c11_atomic_fetch_or(Ap, val, memory_order_relaxed);
+ (void)__c11_atomic_fetch_or(Ap, val, memory_order_acquire);
+ (void)__c11_atomic_fetch_or(Ap, val, memory_order_consume);
+ (void)__c11_atomic_fetch_or(Ap, val, memory_order_release);
+ (void)__c11_atomic_fetch_or(Ap, val, memory_order_acq_rel);
+ (void)__c11_atomic_fetch_or(Ap, val, memory_order_seq_cst);
+
+ (void)__c11_atomic_fetch_xor(Ap, val, memory_order_relaxed);
+ (void)__c11_atomic_fetch_xor(Ap, val, memory_order_acquire);
+ (void)__c11_atomic_fetch_xor(Ap, val, memory_order_consume);
+ (void)__c11_atomic_fetch_xor(Ap, val, memory_order_release);
+ (void)__c11_atomic_fetch_xor(Ap, val, memory_order_acq_rel);
+ (void)__c11_atomic_fetch_xor(Ap, val, memory_order_seq_cst);
+
+ (void)__c11_atomic_exchange(Ap, val, memory_order_relaxed);
+ (void)__c11_atomic_exchange(Ap, val, memory_order_acquire);
+ (void)__c11_atomic_exchange(Ap, val, memory_order_consume);
+ (void)__c11_atomic_exchange(Ap, val, memory_order_release);
+ (void)__c11_atomic_exchange(Ap, val, memory_order_acq_rel);
+ (void)__c11_atomic_exchange(Ap, val, memory_order_seq_cst);
+
+ (void)__c11_atomic_compare_exchange_strong(Ap, p, val, memory_order_relaxed, memory_order_relaxed);
+ (void)__c11_atomic_compare_exchange_strong(Ap, p, val, memory_order_acquire, memory_order_relaxed);
+ (void)__c11_atomic_compare_exchange_strong(Ap, p, val, memory_order_consume, memory_order_relaxed);
+ (void)__c11_atomic_compare_exchange_strong(Ap, p, val, memory_order_release, memory_order_relaxed);
+ (void)__c11_atomic_compare_exchange_strong(Ap, p, val, memory_order_acq_rel, memory_order_relaxed);
+ (void)__c11_atomic_compare_exchange_strong(Ap, p, val, memory_order_seq_cst, memory_order_relaxed);
+
+ (void)__c11_atomic_compare_exchange_weak(Ap, p, val, memory_order_relaxed, memory_order_relaxed);
+ (void)__c11_atomic_compare_exchange_weak(Ap, p, val, memory_order_acquire, memory_order_relaxed);
+ (void)__c11_atomic_compare_exchange_weak(Ap, p, val, memory_order_consume, memory_order_relaxed);
+ (void)__c11_atomic_compare_exchange_weak(Ap, p, val, memory_order_release, memory_order_relaxed);
+ (void)__c11_atomic_compare_exchange_weak(Ap, p, val, memory_order_acq_rel, memory_order_relaxed);
+ (void)__c11_atomic_compare_exchange_weak(Ap, p, val, memory_order_seq_cst, memory_order_relaxed);
+
+ (void)__atomic_load_n(p, memory_order_relaxed);
+ (void)__atomic_load_n(p, memory_order_acquire);
+ (void)__atomic_load_n(p, memory_order_consume);
+ (void)__atomic_load_n(p, memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}}
+ (void)__atomic_load_n(p, memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}}
+ (void)__atomic_load_n(p, memory_order_seq_cst);
+
+ (void)__atomic_load(p, p, memory_order_relaxed);
+ (void)__atomic_load(p, p, memory_order_acquire);
+ (void)__atomic_load(p, p, memory_order_consume);
+ (void)__atomic_load(p, p, memory_order_release); // expected-warning {{memory order argument to atomic operation is invalid}}
+ (void)__atomic_load(p, p, memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}}
+ (void)__atomic_load(p, p, memory_order_seq_cst);
+
+ (void)__atomic_store(p, p, memory_order_relaxed);
+ (void)__atomic_store(p, p, memory_order_acquire); // expected-warning {{memory order argument to atomic operation is invalid}}
+ (void)__atomic_store(p, p, memory_order_consume); // expected-warning {{memory order argument to atomic operation is invalid}}
+ (void)__atomic_store(p, p, memory_order_release);
+ (void)__atomic_store(p, p, memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}}
+ (void)__atomic_store(p, p, memory_order_seq_cst);
+
+ (void)__atomic_store_n(p, val, memory_order_relaxed);
+ (void)__atomic_store_n(p, val, memory_order_acquire); // expected-warning {{memory order argument to atomic operation is invalid}}
+ (void)__atomic_store_n(p, val, memory_order_consume); // expected-warning {{memory order argument to atomic operation is invalid}}
+ (void)__atomic_store_n(p, val, memory_order_release);
+ (void)__atomic_store_n(p, val, memory_order_acq_rel); // expected-warning {{memory order argument to atomic operation is invalid}}
+ (void)__atomic_store_n(p, val, memory_order_seq_cst);
+
+ (void)__atomic_fetch_add(p, val, memory_order_relaxed);
+ (void)__atomic_fetch_add(p, val, memory_order_acquire);
+ (void)__atomic_fetch_add(p, val, memory_order_consume);
+ (void)__atomic_fetch_add(p, val, memory_order_release);
+ (void)__atomic_fetch_add(p, val, memory_order_acq_rel);
+ (void)__atomic_fetch_add(p, val, memory_order_seq_cst);
+
+ (void)__atomic_fetch_sub(p, val, memory_order_relaxed);
+ (void)__atomic_fetch_sub(p, val, memory_order_acquire);
+ (void)__atomic_fetch_sub(p, val, memory_order_consume);
+ (void)__atomic_fetch_sub(p, val, memory_order_release);
+ (void)__atomic_fetch_sub(p, val, memory_order_acq_rel);
+ (void)__atomic_fetch_sub(p, val, memory_order_seq_cst);
+
+ (void)__atomic_add_fetch(p, val, memory_order_relaxed);
+ (void)__atomic_add_fetch(p, val, memory_order_acquire);
+ (void)__atomic_add_fetch(p, val, memory_order_consume);
+ (void)__atomic_add_fetch(p, val, memory_order_release);
+ (void)__atomic_add_fetch(p, val, memory_order_acq_rel);
+ (void)__atomic_add_fetch(p, val, memory_order_seq_cst);
+
+ (void)__atomic_sub_fetch(p, val, memory_order_relaxed);
+ (void)__atomic_sub_fetch(p, val, memory_order_acquire);
+ (void)__atomic_sub_fetch(p, val, memory_order_consume);
+ (void)__atomic_sub_fetch(p, val, memory_order_release);
+ (void)__atomic_sub_fetch(p, val, memory_order_acq_rel);
+ (void)__atomic_sub_fetch(p, val, memory_order_seq_cst);
+
+ (void)__atomic_fetch_and(p, val, memory_order_relaxed);
+ (void)__atomic_fetch_and(p, val, memory_order_acquire);
+ (void)__atomic_fetch_and(p, val, memory_order_consume);
+ (void)__atomic_fetch_and(p, val, memory_order_release);
+ (void)__atomic_fetch_and(p, val, memory_order_acq_rel);
+ (void)__atomic_fetch_and(p, val, memory_order_seq_cst);
+
+ (void)__atomic_fetch_or(p, val, memory_order_relaxed);
+ (void)__atomic_fetch_or(p, val, memory_order_acquire);
+ (void)__atomic_fetch_or(p, val, memory_order_consume);
+ (void)__atomic_fetch_or(p, val, memory_order_release);
+ (void)__atomic_fetch_or(p, val, memory_order_acq_rel);
+ (void)__atomic_fetch_or(p, val, memory_order_seq_cst);
+
+ (void)__atomic_fetch_xor(p, val, memory_order_relaxed);
+ (void)__atomic_fetch_xor(p, val, memory_order_acquire);
+ (void)__atomic_fetch_xor(p, val, memory_order_consume);
+ (void)__atomic_fetch_xor(p, val, memory_order_release);
+ (void)__atomic_fetch_xor(p, val, memory_order_acq_rel);
+ (void)__atomic_fetch_xor(p, val, memory_order_seq_cst);
+
+ (void)__atomic_fetch_nand(p, val, memory_order_relaxed);
+ (void)__atomic_fetch_nand(p, val, memory_order_acquire);
+ (void)__atomic_fetch_nand(p, val, memory_order_consume);
+ (void)__atomic_fetch_nand(p, val, memory_order_release);
+ (void)__atomic_fetch_nand(p, val, memory_order_acq_rel);
+ (void)__atomic_fetch_nand(p, val, memory_order_seq_cst);
+
+ (void)__atomic_and_fetch(p, val, memory_order_relaxed);
+ (void)__atomic_and_fetch(p, val, memory_order_acquire);
+ (void)__atomic_and_fetch(p, val, memory_order_consume);
+ (void)__atomic_and_fetch(p, val, memory_order_release);
+ (void)__atomic_and_fetch(p, val, memory_order_acq_rel);
+ (void)__atomic_and_fetch(p, val, memory_order_seq_cst);
+
+ (void)__atomic_or_fetch(p, val, memory_order_relaxed);
+ (void)__atomic_or_fetch(p, val, memory_order_acquire);
+ (void)__atomic_or_fetch(p, val, memory_order_consume);
+ (void)__atomic_or_fetch(p, val, memory_order_release);
+ (void)__atomic_or_fetch(p, val, memory_order_acq_rel);
+ (void)__atomic_or_fetch(p, val, memory_order_seq_cst);
+
+ (void)__atomic_xor_fetch(p, val, memory_order_relaxed);
+ (void)__atomic_xor_fetch(p, val, memory_order_acquire);
+ (void)__atomic_xor_fetch(p, val, memory_order_consume);
+ (void)__atomic_xor_fetch(p, val, memory_order_release);
+ (void)__atomic_xor_fetch(p, val, memory_order_acq_rel);
+ (void)__atomic_xor_fetch(p, val, memory_order_seq_cst);
+
+ (void)__atomic_nand_fetch(p, val, memory_order_relaxed);
+ (void)__atomic_nand_fetch(p, val, memory_order_acquire);
+ (void)__atomic_nand_fetch(p, val, memory_order_consume);
+ (void)__atomic_nand_fetch(p, val, memory_order_release);
+ (void)__atomic_nand_fetch(p, val, memory_order_acq_rel);
+ (void)__atomic_nand_fetch(p, val, memory_order_seq_cst);
+
+ (void)__atomic_exchange_n(p, val, memory_order_relaxed);
+ (void)__atomic_exchange_n(p, val, memory_order_acquire);
+ (void)__atomic_exchange_n(p, val, memory_order_consume);
+ (void)__atomic_exchange_n(p, val, memory_order_release);
+ (void)__atomic_exchange_n(p, val, memory_order_acq_rel);
+ (void)__atomic_exchange_n(p, val, memory_order_seq_cst);
+
+ (void)__atomic_exchange(p, p, p, memory_order_relaxed);
+ (void)__atomic_exchange(p, p, p, memory_order_acquire);
+ (void)__atomic_exchange(p, p, p, memory_order_consume);
+ (void)__atomic_exchange(p, p, p, memory_order_release);
+ (void)__atomic_exchange(p, p, p, memory_order_acq_rel);
+ (void)__atomic_exchange(p, p, p, memory_order_seq_cst);
+
+ (void)__atomic_compare_exchange(p, p, p, 0, memory_order_relaxed, memory_order_relaxed);
+ (void)__atomic_compare_exchange(p, p, p, 0, memory_order_acquire, memory_order_relaxed);
+ (void)__atomic_compare_exchange(p, p, p, 0, memory_order_consume, memory_order_relaxed);
+ (void)__atomic_compare_exchange(p, p, p, 0, memory_order_release, memory_order_relaxed);
+ (void)__atomic_compare_exchange(p, p, p, 0, memory_order_acq_rel, memory_order_relaxed);
+ (void)__atomic_compare_exchange(p, p, p, 0, memory_order_seq_cst, memory_order_relaxed);
+
+ (void)__atomic_compare_exchange_n(p, p, val, 0, memory_order_relaxed, memory_order_relaxed);
+ (void)__atomic_compare_exchange_n(p, p, val, 0, memory_order_acquire, memory_order_relaxed);
+ (void)__atomic_compare_exchange_n(p, p, val, 0, memory_order_consume, memory_order_relaxed);
+ (void)__atomic_compare_exchange_n(p, p, val, 0, memory_order_release, memory_order_relaxed);
+ (void)__atomic_compare_exchange_n(p, p, val, 0, memory_order_acq_rel, memory_order_relaxed);
+ (void)__atomic_compare_exchange_n(p, p, val, 0, memory_order_seq_cst, memory_order_relaxed);
+}
diff --git a/test/Sema/attr-alias-elf.c b/test/Sema/attr-alias-elf.c
index 88bd7b70958b..f14514dccd2c 100644
--- a/test/Sema/attr-alias-elf.c
+++ b/test/Sema/attr-alias-elf.c
@@ -52,3 +52,18 @@ extern int b3;
extern int a4 __attribute__((alias("b4"))); // expected-error {{alias must point to a defined variable or function}}
typedef int b4;
+
+void test2_bar() {}
+void test2_foo() __attribute__((weak, alias("test2_bar")));
+void test2_zed() __attribute__((alias("test2_foo"))); // expected-warning {{alias will always resolve to test2_bar even if weak definition of alias test2_foo is overridden}}
+
+void test3_bar() { }
+void test3_foo() __attribute__((section("test"))); // expected-warning {{alias will not be in section 'test' but in the same section as the aliasee}}
+void test3_foo() __attribute__((alias("test3_bar")));
+
+__attribute__((section("test"))) void test4_bar() { }
+void test4_foo() __attribute__((section("test")));
+void test4_foo() __attribute__((alias("test4_bar")));
+
+int test5_bar = 0;
+extern struct incomplete_type test5_foo __attribute__((alias("test5_bar")));
diff --git a/test/Sema/attr-aligned.c b/test/Sema/attr-aligned.c
index 92f2742d2f22..0a2698ec91af 100644
--- a/test/Sema/attr-aligned.c
+++ b/test/Sema/attr-aligned.c
@@ -1,6 +1,7 @@
// RUN: %clang_cc1 -triple i386-apple-darwin9 -fsyntax-only -verify %s
int x __attribute__((aligned(3))); // expected-error {{requested alignment is not a power of 2}}
+int y __attribute__((aligned(1 << 29))); // expected-error {{requested alignment must be 268435456 bytes or smaller}}
// PR3254
short g0[3] __attribute__((aligned));
@@ -20,6 +21,12 @@ char a1[__alignof__(struct struct_with_ueber_char) == 8? 1 : -1] = { 0 };
char a2[__alignof__(a) == 1? : -1] = { 0 };
char a3[sizeof(a) == 1? : -1] = { 0 };
+typedef long long __attribute__((aligned(1))) underaligned_longlong;
+char a4[__alignof__(underaligned_longlong) == 1 ?: -1] = {0};
+
+typedef long long __attribute__((aligned(1))) underaligned_complex_longlong;
+char a5[__alignof__(underaligned_complex_longlong) == 1 ?: -1] = {0};
+
// rdar://problem/8335865
int b __attribute__((aligned(2)));
char b1[__alignof__(b) == 2 ?: -1] = {0};
@@ -32,7 +39,18 @@ struct D { int member __attribute__((aligned(2))) __attribute__((packed)); } d;
char d1[__alignof__(d) == 2 ?: -1] = {0};
char d2[__alignof__(d.member) == 2 ?: -1] = {0};
-struct E { int member __attribute__((align(2))); } __attribute__((packed));
+struct E { int member __attribute__((aligned(2))); } __attribute__((packed));
struct E e;
char e1[__alignof__(e) == 2 ?: -1] = {0};
char e2[__alignof__(e.member) == 2 ?: -1] = {0};
+
+typedef char overaligned_char __attribute__((aligned(16)));
+typedef overaligned_char array_with_overaligned_char[11];
+typedef char array_with_align_attr[11] __attribute__((aligned(16)));
+
+char f0[__alignof__(array_with_overaligned_char) == 16 ? 1 : -1] = { 0 };
+char f1[__alignof__(array_with_align_attr) == 16 ? 1 : -1] = { 0 };
+array_with_overaligned_char F2;
+char f2[__alignof__(F2) == 16 ? 1 : -1] = { 0 };
+array_with_align_attr F3;
+char f3[__alignof__(F3) == 16 ? 1 : -1] = { 0 };
diff --git a/test/Sema/attr-availability-ios.c b/test/Sema/attr-availability-ios.c
index 329068cf16bb..6462d58beec0 100644
--- a/test/Sema/attr-availability-ios.c
+++ b/test/Sema/attr-availability-ios.c
@@ -1,14 +1,14 @@
// RUN: %clang_cc1 "-triple" "x86_64-apple-ios3.0" -fsyntax-only -verify %s
-void f0(int) __attribute__((availability(ios,introduced=2.0,deprecated=2.1))); // expected-note {{'f0' declared here}}
+void f0(int) __attribute__((availability(ios,introduced=2.0,deprecated=2.1))); // expected-note {{'f0' has been explicitly marked deprecated here}}
void f1(int) __attribute__((availability(ios,introduced=2.1)));
-void f2(int) __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note {{'f2' declared here}}
+void f2(int) __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note {{'f2' has been explicitly marked deprecated here}}
void f3(int) __attribute__((availability(ios,introduced=3.0)));
void f4(int) __attribute__((availability(macosx,introduced=10.1,deprecated=10.3,obsoleted=10.5), availability(ios,introduced=2.0,deprecated=2.1,obsoleted=3.0))); // expected-note{{explicitly marked unavailable}}
-void f5(int) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(ios,deprecated=3.0))); // expected-note {{'f5' declared here}}
+void f5(int) __attribute__((availability(ios,introduced=2.0))) __attribute__((availability(ios,deprecated=3.0))); // expected-note {{'f5' has been explicitly marked deprecated here}}
void f6(int) __attribute__((availability(ios,deprecated=3.0)));
-void f6(int) __attribute__((availability(ios,introduced=2.0))); // expected-note {{'f6' declared here}}
+void f6(int) __attribute__((availability(ios,introduced=2.0))); // expected-note {{'f6' has been explicitly marked deprecated here}}
void test() {
f0(0); // expected-warning{{'f0' is deprecated: first deprecated in iOS 2.1}}
diff --git a/test/Sema/attr-availability-macosx.c b/test/Sema/attr-availability-macosx.c
index 468e9303e70d..38f149ba62ae 100644
--- a/test/Sema/attr-availability-macosx.c
+++ b/test/Sema/attr-availability-macosx.c
@@ -2,10 +2,10 @@
void f0(int) __attribute__((availability(macosx,introduced=10.4,deprecated=10.6)));
void f1(int) __attribute__((availability(macosx,introduced=10.5)));
-void f2(int) __attribute__((availability(macosx,introduced=10.4,deprecated=10.5))); // expected-note {{'f2' declared here}}
+void f2(int) __attribute__((availability(macosx,introduced=10.4,deprecated=10.5))); // expected-note {{'f2' has been explicitly marked deprecated here}}
void f3(int) __attribute__((availability(macosx,introduced=10.6)));
void f4(int) __attribute__((availability(macosx,introduced=10.1,deprecated=10.3,obsoleted=10.5), availability(ios,introduced=2.0,deprecated=3.0))); // expected-note{{explicitly marked unavailable}}
-void f5(int) __attribute__((availability(ios,introduced=3.2), availability(macosx,unavailable))); // expected-note{{function has been explicitly marked unavailable here}}
+void f5(int) __attribute__((availability(ios,introduced=3.2), availability(macosx,unavailable))); // expected-note{{'f5' has been explicitly marked unavailable here}}
void test() {
f0(0);
diff --git a/test/Sema/attr-availability.c b/test/Sema/attr-availability.c
index ac6a187591b0..b7a8e6ef0f59 100644
--- a/test/Sema/attr-availability.c
+++ b/test/Sema/attr-availability.c
@@ -8,10 +8,10 @@ void f3() __attribute__((availability(otheros,introduced=2.2))); // expected-war
// rdar://10095131
extern void
-ATSFontGetName(const char *oName) __attribute__((availability(macosx,introduced=8.0,deprecated=9.0, message="use CTFontCopyFullName"))); // expected-note {{'ATSFontGetName' declared here}}
+ATSFontGetName(const char *oName) __attribute__((availability(macosx,introduced=8.0,deprecated=9.0, message="use CTFontCopyFullName"))); // expected-note {{'ATSFontGetName' has been explicitly marked deprecated here}}
extern void
-ATSFontGetPostScriptName(int flags) __attribute__((availability(macosx,introduced=8.0,obsoleted=9.0, message="use ATSFontGetFullPostScriptName"))); // expected-note {{function has been explicitly marked unavailable here}}
+ATSFontGetPostScriptName(int flags) __attribute__((availability(macosx,introduced=8.0,obsoleted=9.0, message="use ATSFontGetFullPostScriptName"))); // expected-note {{'ATSFontGetPostScriptName' has been explicitly marked unavailable here}}
void test_10095131() {
ATSFontGetName("Hello"); // expected-warning {{'ATSFontGetName' is deprecated: first deprecated in OS X 9.0 - use CTFontCopyFullName}}
diff --git a/test/Sema/attr-capabilities.c b/test/Sema/attr-capabilities.c
new file mode 100644
index 000000000000..cdbd2f3b2d26
--- /dev/null
+++ b/test/Sema/attr-capabilities.c
@@ -0,0 +1,62 @@
+// RUN: %clang_cc1 -fsyntax-only -Wthread-safety -verify %s
+
+typedef int __attribute__((capability("role"))) ThreadRole;
+struct __attribute__((shared_capability("mutex"))) Mutex {};
+struct NotACapability {};
+
+// Test an invalid capability name
+struct __attribute__((capability("wrong"))) IncorrectName {}; // expected-warning {{invalid capability name 'wrong'; capability name must be 'mutex' or 'role'}}
+
+int Test1 __attribute__((capability("test1"))); // expected-error {{'capability' attribute only applies to structs or typedefs}}
+int Test2 __attribute__((shared_capability("test2"))); // expected-error {{'shared_capability' attribute only applies to structs or typedefs}}
+int Test3 __attribute__((acquire_capability("test3"))); // expected-warning {{'acquire_capability' attribute only applies to functions}}
+int Test4 __attribute__((try_acquire_capability("test4"))); // expected-error {{'try_acquire_capability' attribute only applies to functions}}
+int Test5 __attribute__((release_capability("test5"))); // expected-warning {{'release_capability' attribute only applies to functions}}
+
+struct __attribute__((capability(12))) Test3 {}; // expected-error {{'capability' attribute requires a string}}
+struct __attribute__((shared_capability(Test2))) Test4 {}; // expected-error {{'shared_capability' attribute requires a string}}
+
+struct __attribute__((capability)) Test5 {}; // expected-error {{'capability' attribute takes one argument}}
+struct __attribute__((shared_capability("test1", 12))) Test6 {}; // expected-error {{'shared_capability' attribute takes one argument}}
+
+struct NotACapability BadCapability;
+ThreadRole GUI, Worker;
+void Func1(void) __attribute__((requires_capability(GUI))) {}
+void Func2(void) __attribute__((requires_shared_capability(Worker))) {}
+
+void Func3(void) __attribute__((requires_capability)) {} // expected-error {{'requires_capability' attribute takes at least 1 argument}}
+void Func4(void) __attribute__((requires_shared_capability)) {} // expected-error {{'requires_shared_capability' attribute takes at least 1 argument}}
+
+void Func5(void) __attribute__((requires_capability(1))) {} // expected-warning {{'requires_capability' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'int'}}
+void Func6(void) __attribute__((requires_shared_capability(BadCapability))) {} // expected-warning {{'requires_shared_capability' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'struct NotACapability'}}
+
+void Func7(void) __attribute__((assert_capability(GUI))) {}
+void Func8(void) __attribute__((assert_shared_capability(GUI))) {}
+
+void Func9(void) __attribute__((assert_capability())) {} // expected-error {{'assert_capability' attribute takes one argument}}
+void Func10(void) __attribute__((assert_shared_capability())) {} // expected-error {{'assert_shared_capability' attribute takes one argument}}
+
+void Func11(void) __attribute__((acquire_capability(GUI))) {}
+void Func12(void) __attribute__((acquire_shared_capability(GUI))) {}
+
+void Func15(void) __attribute__((release_capability(GUI))) {}
+void Func16(void) __attribute__((release_shared_capability(GUI))) {}
+void Func17(void) __attribute__((release_generic_capability(GUI))) {}
+
+void Func21(void) __attribute__((try_acquire_capability(1))) {}
+void Func22(void) __attribute__((try_acquire_shared_capability(1))) {}
+
+void Func23(void) __attribute__((try_acquire_capability(1, GUI))) {}
+void Func24(void) __attribute__((try_acquire_shared_capability(1, GUI))) {}
+
+void Func25(void) __attribute__((try_acquire_capability())) {} // expected-error {{'try_acquire_capability' attribute takes at least 1 argument}}
+void Func26(void) __attribute__((try_acquire_shared_capability())) {} // expected-error {{'try_acquire_shared_capability' attribute takes at least 1 argument}}
+
+// Test that boolean logic works with capability attributes
+void Func27(void) __attribute__((requires_capability(!GUI)));
+void Func28(void) __attribute__((requires_capability(GUI && Worker)));
+void Func29(void) __attribute__((requires_capability(GUI || Worker)));
+void Func30(void) __attribute__((requires_capability((Worker || Worker) && !GUI)));
+
+int AlsoNotACapability;
+void Func31(void) __attribute__((requires_capability(GUI && AlsoNotACapability))); // expected-warning {{'requires_capability' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'int'}}
diff --git a/test/Sema/attr-cleanup.c b/test/Sema/attr-cleanup.c
index f5cbc385c689..26f283a1a4fa 100644
--- a/test/Sema/attr-cleanup.c
+++ b/test/Sema/attr-cleanup.c
@@ -38,7 +38,7 @@ void t4() {
__attribute((cleanup(c4))) void* g;
}
-void c5(void*) __attribute__((deprecated)); // expected-note{{'c5' declared here}}
+void c5(void*) __attribute__((deprecated)); // expected-note{{'c5' has been explicitly marked deprecated here}}
void t5() {
int i __attribute__((cleanup(c5))); // expected-warning {{'c5' is deprecated}}
}
diff --git a/test/Sema/attr-coldhot.c b/test/Sema/attr-coldhot.c
index 253b1898c0a0..abadf889fc63 100644
--- a/test/Sema/attr-coldhot.c
+++ b/test/Sema/attr-coldhot.c
@@ -6,5 +6,5 @@ int bar() __attribute__((__cold__));
int var1 __attribute__((__cold__)); // expected-warning{{'__cold__' attribute only applies to functions}}
int var2 __attribute__((__hot__)); // expected-warning{{'__hot__' attribute only applies to functions}}
-int qux() __attribute__((__hot__)) __attribute__((__cold__)); // expected-error{{'__hot__' and cold attributes are not compatible}}
-int baz() __attribute__((__cold__)) __attribute__((__hot__)); // expected-error{{'__cold__' and hot attributes are not compatible}}
+int qux() __attribute__((__hot__)) __attribute__((__cold__)); // expected-error{{'__hot__' and 'cold' attributes are not compatible}}
+int baz() __attribute__((__cold__)) __attribute__((__hot__)); // expected-error{{'__cold__' and 'hot' attributes are not compatible}}
diff --git a/test/Sema/attr-deprecated-message.c b/test/Sema/attr-deprecated-message.c
index f48d13e607dd..c68306132c3e 100644
--- a/test/Sema/attr-deprecated-message.c
+++ b/test/Sema/attr-deprecated-message.c
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 %s -verify -fsyntax-only
// rdar: // 6734520
-typedef int INT1 __attribute__((deprecated("Please avoid INT1"))); // expected-note 3 {{'INT1' declared here}}
+typedef int INT1 __attribute__((deprecated("Please avoid INT1"))); // expected-note 3 {{'INT1' has been explicitly marked deprecated here}}
typedef INT1 INT2 __attribute__ ((__deprecated__("Please avoid INT2")));
@@ -12,16 +12,16 @@ typedef INT1 INT1b __attribute__ ((deprecated("Please avoid INT1b")));
INT1 should_be_unavailable; // expected-warning {{'INT1' is deprecated: Please avoid INT1}}
INT1a should_not_be_deprecated;
-INT1 f1(void) __attribute__ ((deprecated("Please avoid f1"))); // expected-note {{'f1' declared here}}
+INT1 f1(void) __attribute__ ((deprecated("Please avoid f1"))); // expected-note {{'f1' has been explicitly marked deprecated here}}
INT1 f2(void); // expected-warning {{'INT1' is deprecated: Please avoid INT1}}
-typedef enum {red, green, blue} Color __attribute__((deprecated("Please avoid Color"))); // expected-note {{'Color' declared here}}
+typedef enum {red, green, blue} Color __attribute__((deprecated("Please avoid Color"))); // expected-note {{'Color' has been explicitly marked deprecated here}}
Color c1; // expected-warning {{'Color' is deprecated: Please avoid Color}}
int g1;
-int g2 __attribute__ ((deprecated("Please avoid g2"))); // expected-note {{'g2' declared here}}
+int g2 __attribute__ ((deprecated("Please avoid g2"))); // expected-note {{'g2' has been explicitly marked deprecated here}}
int func1()
{
diff --git a/test/Sema/attr-deprecated.c b/test/Sema/attr-deprecated.c
index 8124ab0ddd02..c9e3dd546c58 100644
--- a/test/Sema/attr-deprecated.c
+++ b/test/Sema/attr-deprecated.c
@@ -1,10 +1,10 @@
// RUN: %clang_cc1 %s -verify -fsyntax-only
-int f() __attribute__((deprecated)); // expected-note 2 {{declared here}}
+int f() __attribute__((deprecated)); // expected-note 2 {{'f' has been explicitly marked deprecated here}}
void g() __attribute__((deprecated));
-void g(); // expected-note {{declared here}}
+void g(); // expected-note {{'g' has been explicitly marked deprecated here}}
-extern int var __attribute__((deprecated)); // expected-note {{declared here}}
+extern int var __attribute__((deprecated)); // expected-note {{'var' has been explicitly marked deprecated here}}
int a() {
int (*ptr)() = f; // expected-warning {{'f' is deprecated}}
@@ -17,13 +17,13 @@ int a() {
}
// test if attributes propagate to variables
-extern int var; // expected-note {{declared here}}
+extern int var; // expected-note {{'var' has been explicitly marked deprecated here}}
int w() {
return var; // expected-warning {{'var' is deprecated}}
}
int old_fn() __attribute__ ((deprecated));
-int old_fn(); // expected-note {{declared here}}
+int old_fn(); // expected-note {{'old_fn' has been explicitly marked deprecated here}}
int (*fn_ptr)() = old_fn; // expected-warning {{'old_fn' is deprecated}}
int old_fn() {
@@ -32,7 +32,7 @@ int old_fn() {
struct foo {
- int x __attribute__((deprecated)); // expected-note 3 {{declared here}}
+ int x __attribute__((deprecated)); // expected-note 3 {{'x' has been explicitly marked deprecated here}}
};
void test1(struct foo *F) {
@@ -41,11 +41,11 @@ void test1(struct foo *F) {
struct foo f2 = { 17 }; // expected-warning {{'x' is deprecated}}
}
-typedef struct foo foo_dep __attribute__((deprecated)); // expected-note 12 {{declared here}}
+typedef struct foo foo_dep __attribute__((deprecated)); // expected-note 12 {{'foo_dep' has been explicitly marked deprecated here}}
foo_dep *test2; // expected-warning {{'foo_dep' is deprecated}}
struct __attribute__((deprecated,
- invalid_attribute)) bar_dep ; // expected-warning {{unknown attribute 'invalid_attribute' ignored}} expected-note 2 {{declared here}}
+ invalid_attribute)) bar_dep ; // expected-warning {{unknown attribute 'invalid_attribute' ignored}} expected-note 2 {{'bar_dep' has been explicitly marked deprecated here}}
struct bar_dep *test3; // expected-warning {{'bar_dep' is deprecated}}
@@ -102,9 +102,9 @@ foo_dep test17, // expected-warning {{'foo_dep' is deprecated}}
test19;
// rdar://problem/8518751
-enum __attribute__((deprecated)) Test20 { // expected-note {{declared here}}
- test20_a __attribute__((deprecated)), // expected-note {{declared here}}
- test20_b // expected-note {{declared here}}
+enum __attribute__((deprecated)) Test20 { // expected-note {{'Test20' has been explicitly marked deprecated here}}
+ test20_a __attribute__((deprecated)), // expected-note {{'test20_a' has been explicitly marked deprecated here}}
+ test20_b // expected-note {{'test20_b' has been explicitly marked deprecated here}}
};
void test20() {
enum Test20 f; // expected-warning {{'Test20' is deprecated}}
@@ -122,5 +122,5 @@ struct test22 {
};
typedef int test23_ty __attribute((deprecated)); // expected-note {{previous definition is here}}
-typedef int test23_ty; // expected-note {{'test23_ty' declared here}} expected-warning {{redefinition of typedef 'test23_ty' is a C11 feature}}
+typedef int test23_ty; // expected-note {{'test23_ty' has been explicitly marked deprecated here}} expected-warning {{redefinition of typedef 'test23_ty' is a C11 feature}}
test23_ty test23_v; // expected-warning {{'test23_ty' is deprecated}}
diff --git a/test/Sema/attr-malloc.c b/test/Sema/attr-malloc.c
index 2cec84de4969..c78d15c802ce 100644
--- a/test/Sema/attr-malloc.c
+++ b/test/Sema/attr-malloc.c
@@ -1,5 +1,5 @@
-// RUN: %clang -Xclang -verify -fsyntax-only %s
-// RUN: %clang -emit-llvm -S -o %t %s
+// RUN: %clang_cc1 -verify -fsyntax-only %s
+// RUN: %clang_cc1 -emit-llvm -o %t %s
#include <stddef.h>
diff --git a/test/Sema/attr-msp430.c b/test/Sema/attr-msp430.c
new file mode 100644
index 000000000000..d08cd8ecc9ef
--- /dev/null
+++ b/test/Sema/attr-msp430.c
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -triple msp430-unknown-unknown -fsyntax-only -verify %s
+
+int i;
+void f(void) __attribute__((interrupt(i))); /* expected-error {{'interrupt' attribute requires an integer constant}} */
+
+void f2(void) __attribute__((interrupt(12)));
diff --git a/test/Sema/attr-noduplicate.c b/test/Sema/attr-noduplicate.c
new file mode 100644
index 000000000000..2a77de50c038
--- /dev/null
+++ b/test/Sema/attr-noduplicate.c
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 %s -verify -fsyntax-only
+
+int a __attribute__((noduplicate)); // expected-warning {{'noduplicate' attribute only applies to functions}}
+
+void t1() __attribute__((noduplicate));
+
+void t2() __attribute__((noduplicate(2))); // expected-error {{'noduplicate' attribute takes no arguments}}
+
diff --git a/test/Sema/attr-ownership.c b/test/Sema/attr-ownership.c
index e31b429ef6ed..2aa9f9f27cc9 100644
--- a/test/Sema/attr-ownership.c
+++ b/test/Sema/attr-ownership.c
@@ -1,12 +1,12 @@
// RUN: %clang_cc1 %s -verify
void f1(void) __attribute__((ownership_takes("foo"))); // expected-error {{'ownership_takes' attribute requires parameter 1 to be an identifier}}
-void *f2(void) __attribute__((ownership_returns(foo, 1, 2))); // expected-error {{attribute takes no more than 1 argument}}
+void *f2(void) __attribute__((ownership_returns(foo, 1, 2))); // expected-error {{'ownership_returns' attribute takes no more than 1 argument}}
void f3(void) __attribute__((ownership_holds(foo, 1))); // expected-error {{'ownership_holds' attribute parameter 1 is out of bounds}}
void *f4(void) __attribute__((ownership_returns(foo)));
-void f5(void) __attribute__((ownership_holds(foo))); // expected-error {{attribute takes at least 2 arguments}}
+void f5(void) __attribute__((ownership_holds(foo))); // expected-error {{'ownership_holds' attribute takes at least 2 arguments}}
void f6(void) __attribute__((ownership_holds(foo, 1, 2, 3))); // expected-error {{'ownership_holds' attribute parameter 1 is out of bounds}}
-void f7(void) __attribute__((ownership_takes(foo))); // expected-error {{attribute takes at least 2 arguments}}
+void f7(void) __attribute__((ownership_takes(foo))); // expected-error {{'ownership_takes' attribute takes at least 2 arguments}}
void f8(int *i, int *j, int k) __attribute__((ownership_holds(foo, 1, 2, 4))); // expected-error {{'ownership_holds' attribute parameter 3 is out of bounds}}
int f9 __attribute__((ownership_takes(foo, 1))); // expected-warning {{'ownership_takes' attribute only applies to functions}}
diff --git a/test/Sema/attr-section.c b/test/Sema/attr-section.c
index 396892a1c5e9..812de067180c 100644
--- a/test/Sema/attr-section.c
+++ b/test/Sema/attr-section.c
@@ -10,10 +10,12 @@ int y __attribute__((section(
// PR6007
void test() {
- __attribute__((section("NEAR,x"))) int n1; // expected-error {{'section' attribute is not valid on local variables}}
+ __attribute__((section("NEAR,x"))) int n1; // expected-error {{'section' attribute only applies to functions and global variables}}
__attribute__((section("NEAR,x"))) static int n2; // ok.
}
// pr9356
void __attribute__((section("foo,zed"))) test2(void); // expected-note {{previous attribute is here}}
void __attribute__((section("bar,zed"))) test2(void) {} // expected-warning {{section does not match previous declaration}}
+
+enum __attribute__((section("NEAR,x"))) e { one }; // expected-error {{'section' attribute only applies to functions and global variables}}
diff --git a/test/Sema/attr-unavailable-message.c b/test/Sema/attr-unavailable-message.c
index ebdf945867fe..400a2c632883 100644
--- a/test/Sema/attr-unavailable-message.c
+++ b/test/Sema/attr-unavailable-message.c
@@ -1,8 +1,8 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
// rdar: //6734520
-int foo(int) __attribute__((__unavailable__("USE IFOO INSTEAD"))); // expected-note {{function has been explicitly marked unavailable here}}
-double dfoo(double) __attribute__((__unavailable__("NO LONGER"))); // expected-note 2 {{function has been explicitly marked unavailable here}}
+int foo(int) __attribute__((__unavailable__("USE IFOO INSTEAD"))); // expected-note {{'foo' has been explicitly marked unavailable here}}
+double dfoo(double) __attribute__((__unavailable__("NO LONGER"))); // expected-note 2 {{'dfoo' has been explicitly marked unavailable here}}
void bar() __attribute__((__unavailable__)); // expected-note {{explicitly marked unavailable}}
@@ -34,13 +34,13 @@ void unavail(void) {
// rdar://10201690
enum foo {
- a = 1, // expected-note {{declared here}}
- b __attribute__((deprecated())) = 2, // expected-note {{declared here}}
+ a = 1, // expected-note {{'a' has been explicitly marked deprecated here}}
+ b __attribute__((deprecated())) = 2, // expected-note {{'b' has been explicitly marked deprecated here}}
c = 3
}__attribute__((deprecated()));
-enum fee { // expected-note {{declaration has been explicitly marked unavailable here}}
- r = 1, // expected-note {{declaration has been explicitly marked unavailable here}}
+enum fee { // expected-note {{'fee' has been explicitly marked unavailable here}}
+ r = 1, // expected-note {{'r' has been explicitly marked unavailable here}}
s = 2,
t = 3
}__attribute__((unavailable()));
diff --git a/test/Sema/attr-used.c b/test/Sema/attr-used.c
index accc7b620b5b..4e3bda7609bb 100644
--- a/test/Sema/attr-used.c
+++ b/test/Sema/attr-used.c
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -verify -fsyntax-only -Wno-private-extern %s
-extern int l0 __attribute__((used)); // expected-warning {{used attribute ignored}}
-__private_extern__ int l1 __attribute__((used)); // expected-warning {{used attribute ignored}}
+extern int l0 __attribute__((used)); // expected-warning {{'used' attribute ignored}}
+__private_extern__ int l1 __attribute__((used)); // expected-warning {{'used' attribute ignored}}
struct __attribute__((used)) s { // expected-warning {{'used' attribute only applies to variables and functions}}
int x;
@@ -13,8 +13,8 @@ static void __attribute__((used)) f0(void) {
}
void f1() {
- static int a __attribute__((used));
- int b __attribute__((used)); // expected-warning {{used attribute ignored}}
+ static int a __attribute__((used));
+ int b __attribute__((used)); // expected-warning {{'used' attribute ignored}}
}
static void __attribute__((used)) f0(void);
diff --git a/test/Sema/big-endian-neon-initializers.c b/test/Sema/big-endian-neon-initializers.c
new file mode 100644
index 000000000000..ffe310903bcf
--- /dev/null
+++ b/test/Sema/big-endian-neon-initializers.c
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 %s -triple arm64_be -target-feature +neon -verify -fsyntax-only -ffreestanding
+// RUN: %clang_cc1 %s -triple armebv7 -target-cpu cortex-a8 -verify -fsyntax-only -ffreestanding
+
+#include <arm_neon.h>
+
+int32x4_t x = {1, 2, 3, 4}; // expected-warning{{vector initializers are not compatible with NEON intrinsics}} expected-note{{consider using vld1q_s32() to initialize a vector from memory, or vcombine_s32(vcreate_s32(), vcreate_s32()) to initialize from integer constants}}
+int16x4_t y = {1, 2, 3, 4}; // expected-warning{{vector initializers are not compatible with NEON intrinsics}} expected-note{{consider using vld1_s16() to initialize a vector from memory, or vcreate_s16() to initialize from an integer constant}}
+int64x2_t z = {1, 2}; // expected-warning{{vector initializers are not compatible with NEON intrinsics}} expected-note{{consider using vld1q_s64() to initialize a vector from memory, or vcombine_s64(vcreate_s64(), vcreate_s64()) to initialize from integer constants}}
+float32x2_t b = {1, 2}; // expected-warning{{vector initializers are not compatible with NEON intrinsics}} expected-note{{consider using vld1_f32() to initialize a vector from memory, or vcreate_f32() to initialize from an integer constant}}
+
+// No warning expected here.
+typedef int v4si __attribute__ ((vector_size (16)));
+v4si c = {1, 2, 3, 4};
diff --git a/test/Sema/bitfield-layout.c b/test/Sema/bitfield-layout.c
index d22639147586..2abd139d238f 100644
--- a/test/Sema/bitfield-layout.c
+++ b/test/Sema/bitfield-layout.c
@@ -9,6 +9,21 @@ struct a {char x; int : 0; char y;};
CHECK_SIZE(struct, a, 5)
CHECK_ALIGN(struct, a, 1)
+// Zero-width bit-fields with packed
+struct __attribute__((packed)) a2 { short x : 9; char : 0; int y : 17; };
+CHECK_SIZE(struct, a2, 5)
+CHECK_ALIGN(struct, a2, 1)
+
+// Zero-width bit-fields at the end of packed struct
+struct __attribute__((packed)) a3 { short x : 9; int : 0; };
+CHECK_SIZE(struct, a3, 4)
+CHECK_ALIGN(struct, a3, 1)
+
+// For comparison, non-zero-width bit-fields at the end of packed struct
+struct __attribute__((packed)) a4 { short x : 9; int : 1; };
+CHECK_SIZE(struct, a4, 2)
+CHECK_ALIGN(struct, a4, 1)
+
union b {char x; int : 0; char y;};
CHECK_SIZE(union, b, 1)
CHECK_ALIGN(union, b, 1)
diff --git a/test/Sema/block-misc.c b/test/Sema/block-misc.c
index 22604582db80..b4732b599c85 100644
--- a/test/Sema/block-misc.c
+++ b/test/Sema/block-misc.c
@@ -131,7 +131,7 @@ void test14() {
static void *P = ^{ // expected-error {{initializer element is not a compile-time constant}}
void *Q = ^{
- // References test14's "X": outer block is non constant.
+ // References test14's "X": outer block is non-constant.
return X+4;
};
};
diff --git a/test/Sema/block-return.c b/test/Sema/block-return.c
index 6b4d99830c6d..08e9249847cb 100644
--- a/test/Sema/block-return.c
+++ b/test/Sema/block-return.c
@@ -82,7 +82,7 @@ void foo4() {
int (*yy)(const char *s) = funk; // expected-warning {{incompatible pointer types initializing 'int (*)(const char *)' with an expression of type 'int (char *)'}}
int (^nested)(char *s) = ^(char *str) { void (^nest)(void) = ^(void) { printf("%s\n", str); }; next(); return 1; }; // expected-warning{{implicitly declaring library function 'printf' with type 'int (const char *, ...)'}} \
- // expected-note{{please include the header <stdio.h> or explicitly provide a declaration for 'printf'}}
+ // expected-note{{include the header <stdio.h> or explicitly provide a declaration for 'printf'}}
}
typedef void (^bptr)(void);
diff --git a/test/Sema/bool-compare.c b/test/Sema/bool-compare.c
new file mode 100644
index 000000000000..3f1f286a2a38
--- /dev/null
+++ b/test/Sema/bool-compare.c
@@ -0,0 +1,162 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+
+void f(int x, int y, int z) {
+ int a,b;
+
+
+ if ((a > 2) > 1) {} // expected-warning {{comparison of constant 1 with boolean expression is always false}}
+
+ if (a > b) {} // no warning
+ if (a < b) {} // no warning
+ if (a >= b) {} // no warning
+ if (a <= b) {} // no warning
+ if (a == b) {} // no warning
+ if (a != b) {} // no warning
+
+ if (a > 0) {} // no warning
+ if (a > 1) {} // no warning
+ if (a > 2) {} // no warning
+
+ if (a >= 0) {} // no warning
+ if (a >= 1) {} // no warning
+ if (a >= 2) {} // no warning
+ if (a >= -1) {} // no warning
+
+ if (a <= 0) {} // no warning
+ if (a <= 1) {} // no warning
+ if (a <= 2) {} // no warning
+ if (a <= -1) {} // no warning
+
+
+ if (!a > 0) {} // no warning
+ if (!a > 1) {} // expected-warning {{comparison of constant 1 with boolean expression is always false}}
+ if (!a > 2) {} // expected-warning {{comparison of constant 2 with boolean expression is always false}}
+ if (!a > y) {} // no warning
+ if (!a > b) {} // no warning
+ if (!a > -1) {} // expected-warning {{comparison of constant -1 with boolean expression is always true}}
+
+ if (!a < 0) {} // expected-warning {{comparison of constant 0 with boolean expression is always false}}
+ if (!a < 1) {} // no warning
+ if (!a < 2) {} // expected-warning {{comparison of constant 2 with boolean expression is always true}}
+ if (!a < y) {} // no warning
+ if (!a < b) {} // no warning
+ if (!a < -1) {} // expected-warning {{comparison of constant -1 with boolean expression is always false}}
+
+ if (!a >= 0) {} // expected-warning {{comparison of constant 0 with boolean expression is always true}}
+ if (!a >= 1) {} // no warning
+ if (!a >= 2) {} // expected-warning {{comparison of constant 2 with boolean expression is always false}}
+ if (!a >= y) {} // no warning
+ if (!a >= b) {} // no warning
+ if (!a >= -1) {} // expected-warning {{comparison of constant -1 with boolean expression is always true}}
+
+ if (!a <= 0) {} // no warning
+ if (!a <= 1) {} // expected-warning {{comparison of constant 1 with boolean expression is always true}}
+ if (!a <= 2) {} // expected-warning {{comparison of constant 2 with boolean expression is always true}}
+ if (!a <= y) {} // no warning
+ if (!a <= b) {} // no warning
+ if (!a <= -1) {} // expected-warning {{comparison of constant -1 with boolean expression is always false}}
+
+ if ((a||b) > 0) {} // no warning
+ if ((a||b) > 1) {} // expected-warning {{comparison of constant 1 with boolean expression is always false}}
+ if ((a||b) > 4) {} // expected-warning {{comparison of constant 4 with boolean expression is always false}}
+ if ((a||b) > -1) {}// expected-warning {{comparison of constant -1 with boolean expression is always true}}
+
+ if ((a&&b) > 0) {} // no warning
+ if ((a&&b) > 1) {} // expected-warning {{comparison of constant 1 with boolean expression is always false}}
+ if ((a&&b) > 4) {} // expected-warning {{comparison of constant 4 with boolean expression is always false}}
+
+ if ((a<y) > 0) {} // no warning
+ if ((a<y) > 1) {} // expected-warning {{comparison of constant 1 with boolean expression is always false}}
+ if ((a<y) > 4) {} // expected-warning {{comparison of constant 4 with boolean expression is always false}}
+ if ((a<y) > z) {} // no warning
+ if ((a<y) > -1) {} // expected-warning {{comparison of constant -1 with boolean expression is always true}}
+
+ if ((a<y) == 0) {} // no warning
+ if ((a<y) == 1) {} // no warning
+ if ((a<y) == 2) {} // expected-warning {{comparison of constant 2 with boolean expression is always false}}
+ if ((a<y) == z) {} // no warning
+ if ((a<y) == -1) {}// expected-warning {{comparison of constant -1 with boolean expression is always false}}
+
+ if ((a<y) != 0) {} // no warning
+ if ((a<y) != 1) {} // no warning
+ if ((a<y) != 2) {} // expected-warning {{comparison of constant 2 with boolean expression is always true}}
+ if ((a<y) != z) {} // no warning
+ if ((a<y) != -1) {}// expected-warning {{comparison of constant -1 with boolean expression is always true}}
+
+ if ((a<y) == z) {} // no warning
+ if (a>y<z) {} // no warning
+ if ((a<y) > z) {} // no warning
+ if((a<y)>(z<y)) {} // no warning
+ if((a<y)==(z<y)){} // no warning
+ if((a<y)!=(z<y)){} // no warning
+ if((z==x)<(y==z)){}// no warning
+ if((a<y)!=((z==x)<(y==z))){} //no warning
+
+
+ if (0 > !a) {} // expected-warning {{comparison of constant 0 with boolean expression is always false}}
+ if (1 > !a) {} // no warning
+ if (2 > !a) {} // expected-warning {{comparison of constant 2 with boolean expression is always true}}
+ if (y > !a) {} // no warning
+ if (-1 > !a) {} // expected-warning {{comparison of constant -1 with boolean expression is always false}}
+
+ if (0 < !a) {} // no warning
+ if (1 < !a) {} // expected-warning {{comparison of constant 1 with boolean expression is always false}}
+ if (2 < !a) {} // expected-warning {{comparison of constant 2 with boolean expression is always false}}
+ if (y < !a) {} // no warning
+ if (-1 < !a) {} // expected-warning {{comparison of constant -1 with boolean expression is always true}}
+
+ if (0 >= !a) {} // no warning
+ if (1 >= !a) {} // expected-warning {{comparison of constant 1 with boolean expression is always true}}
+ if (2 >= !a) {} // expected-warning {{comparison of constant 2 with boolean expression is always true}}
+ if (y >= !a) {} // no warning
+ if (-1 >= !a) {} // expected-warning {{comparison of constant -1 with boolean expression is always false}}
+
+ if (0 <= !a) {} // expected-warning {{comparison of constant 0 with boolean expression is always true}}
+ if (1 <= !a) {} // no warning
+ if (2 <= !a) {} // expected-warning {{comparison of constant 2 with boolean expression is always false}}
+ if (y <= !a) {} // no warning
+ if (-1 <= !a) {} // expected-warning {{comparison of constant -1 with boolean expression is always true}}
+
+ if (0 > (a||b)) {} // expected-warning {{comparison of constant 0 with boolean expression is always false}}
+ if (1 > (a||b)) {} // no warning
+ if (4 > (a||b)) {} // expected-warning {{comparison of constant 4 with boolean expression is always true}}
+
+ if (0 > (a&&b)) {} // expected-warning {{comparison of constant 0 with boolean expression is always false}}
+ if (1 > (a&&b)) {} // no warning
+ if (4 > (a&&b)) {} // expected-warning {{comparison of constant 4 with boolean expression is always true}}
+
+ if (0 > (a<y)) {} // expected-warning {{comparison of constant 0 with boolean expression is always false}}
+ if (1 > (a<y)) {} // no warning
+ if (4 > (a<y)) {} // expected-warning {{comparison of constant 4 with boolean expression is always true}}
+ if (z > (a<y)) {} // no warning
+ if (-1 > (a<y)) {} // expected-warning {{comparison of constant -1 with boolean expression is always false}}
+
+ if (0 == (a<y)) {} // no warning
+ if (1 == (a<y)) {} // no warning
+ if (2 == (a<y)) {} // expected-warning {{comparison of constant 2 with boolean expression is always false}}
+ if (z == (a<y)) {} // no warning
+ if (-1 == (a<y)){} // expected-warning {{comparison of constant -1 with boolean expression is always false}}
+
+ if (0 !=(a<y)) {} // no warning
+ if (1 !=(a<y)) {} // no warning
+ if (2 !=(a<y)) {} // expected-warning {{comparison of constant 2 with boolean expression is always true}}
+ if (z !=(a<y)) {} // no warning
+ if (-1 !=(a<y)) {} // expected-warning {{comparison of constant -1 with boolean expression is always true}}
+
+ if (z ==(a<y)) {} // no warning
+ if (z<a>y) {} // no warning
+ if (z > (a<y)) {} // no warning
+ if((z<y)>(a<y)) {} // no warning
+ if((z<y)==(a<y)){} // no warning
+ if((z<y)!=(a<y)){} // no warning
+ if((y==z)<(z==x)){} // no warning
+ if(((z==x)<(y==z))!=(a<y)){} // no warning
+
+ if(((z==x)<(-1==z))!=(a<y)){} // no warning
+ if(((z==x)<(z==-1))!=(a<y)){} // no warning
+ if(((z==x)<-1)!=(a<y)){} // expected-warning {{comparison of constant -1 with boolean expression is always false}}
+ if(((z==x)< 2)!=(a<y)){} // expected-warning {{comparison of constant 2 with boolean expression is always true}}
+ if(((z==x)<(z>2))!=(a<y)){} // no warning
+
+}
diff --git a/test/Sema/builtin-assume.c b/test/Sema/builtin-assume.c
new file mode 100644
index 000000000000..1f6a3a0cd910
--- /dev/null
+++ b/test/Sema/builtin-assume.c
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -triple i386-mingw32 -fms-extensions -fsyntax-only -verify %s
+
+int foo(int *a, int i) {
+ __assume(i != 4);
+ __assume(++i > 2); //expected-warning {{the argument to __assume has side effects that will be discarded}}
+
+ int test = sizeof(struct{char qq[(__assume(i != 5), 7)];});
+
+ return a[i];
+}
+
diff --git a/test/Sema/builtin-clear_cache.c b/test/Sema/builtin-clear_cache.c
index e21aad79d12a..3193f3124dde 100644
--- a/test/Sema/builtin-clear_cache.c
+++ b/test/Sema/builtin-clear_cache.c
@@ -1,5 +1,6 @@
// RUN: %clang_cc1 -triple armv7-none-linux-gnu -fsyntax-only -verify %s
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -fsyntax-only -verify %s
// expected-no-diagnostics
void __clear_cache(void *a, void *b) {}
diff --git a/test/Sema/builtins-aarch64.c b/test/Sema/builtins-aarch64.c
index b0557532fab6..b4d8aaef63c0 100644
--- a/test/Sema/builtins-aarch64.c
+++ b/test/Sema/builtins-aarch64.c
@@ -1,5 +1,7 @@
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -fsyntax-only -verify %s
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -DTEST1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -DTEST1 -fsyntax-only -verify %s
#ifdef TEST1
void __clear_cache(void *start, void *end);
diff --git a/test/Sema/builtins-arm-exclusive.c b/test/Sema/builtins-arm-exclusive.c
index 8c784031142b..4e6a96bc322f 100644
--- a/test/Sema/builtins-arm-exclusive.c
+++ b/test/Sema/builtins-arm-exclusive.c
@@ -55,6 +55,57 @@ int test_strex(char *addr) {
return res;
}
+int test_ldaex(char *addr) {
+ int sum = 0;
+ sum += __builtin_arm_ldaex(addr);
+ sum += __builtin_arm_ldaex((short *)addr);
+ sum += __builtin_arm_ldaex((int *)addr);
+ sum += __builtin_arm_ldaex((long long *)addr);
+ sum += __builtin_arm_ldaex((float *)addr);
+ sum += __builtin_arm_ldaex((double *)addr);
+ sum += *__builtin_arm_ldaex((int **)addr);
+ sum += __builtin_arm_ldaex((struct Simple **)addr)->a;
+ sum += __builtin_arm_ldaex((volatile char *)addr);
+ sum += __builtin_arm_ldaex((const volatile char *)addr);
+
+ // In principle this might be valid, but stick to ints and floats for scalar
+ // types at the moment.
+ sum += __builtin_arm_ldaex((struct Simple *)addr).a; // expected-error {{address argument to atomic builtin must be a pointer to}}
+
+ sum += __builtin_arm_ldaex((__int128 *)addr); // expected-error {{__int128 is not supported on this target}} expected-error {{address argument to load or store exclusive builtin must be a pointer to 1,2,4 or 8 byte type}}
+
+ __builtin_arm_ldaex(); // expected-error {{too few arguments to function call}}
+ __builtin_arm_ldaex(1, 2); // expected-error {{too many arguments to function call}}
+ return sum;
+}
+
+int test_stlex(char *addr) {
+ int res = 0;
+ struct Simple var = {0};
+ res |= __builtin_arm_stlex(4, addr);
+ res |= __builtin_arm_stlex(42, (short *)addr);
+ res |= __builtin_arm_stlex(42, (int *)addr);
+ res |= __builtin_arm_stlex(42, (long long *)addr);
+ res |= __builtin_arm_stlex(2.71828f, (float *)addr);
+ res |= __builtin_arm_stlex(3.14159, (double *)addr);
+ res |= __builtin_arm_stlex(&var, (struct Simple **)addr);
+
+ res |= __builtin_arm_stlex(42, (volatile char *)addr);
+ res |= __builtin_arm_stlex(42, (char *const)addr);
+ res |= __builtin_arm_stlex(42, (const char *)addr); // expected-warning {{passing 'const char *' to parameter of type 'volatile char *' discards qualifiers}}
+
+
+ res |= __builtin_arm_stlex(var, (struct Simple *)addr); // expected-error {{address argument to atomic builtin must be a pointer to}}
+ res |= __builtin_arm_stlex(var, (struct Simple **)addr); // expected-error {{passing 'struct Simple' to parameter of incompatible type 'struct Simple *'}}
+ res |= __builtin_arm_stlex(&var, (struct Simple **)addr).a; // expected-error {{is not a structure or union}}
+
+ res |= __builtin_arm_stlex(1, (__int128 *)addr); // expected-error {{__int128 is not supported on this target}} expected-error {{address argument to load or store exclusive builtin must be a pointer to 1,2,4 or 8 byte type}}
+
+ __builtin_arm_stlex(1); // expected-error {{too few arguments to function call}}
+ __builtin_arm_stlex(1, 2, 3); // expected-error {{too many arguments to function call}}
+ return res;
+}
+
void test_clrex() {
__builtin_arm_clrex();
__builtin_arm_clrex(1); // expected-error {{too many arguments to function call}}
diff --git a/test/Sema/builtins-arm.c b/test/Sema/builtins-arm.c
index 3ac1da0aa93d..6c367d35a5f5 100644
--- a/test/Sema/builtins-arm.c
+++ b/test/Sema/builtins-arm.c
@@ -31,4 +31,10 @@ void test2() {
*ptr = '0'; // expected-error {{incomplete type 'void' is not assignable}}
}
+void test3() {
+ __builtin_arm_dsb(16); // expected-error {{argument should be a value from 0 to 15}}
+ __builtin_arm_dmb(17); // expected-error {{argument should be a value from 0 to 15}}
+ __builtin_arm_isb(18); // expected-error {{argument should be a value from 0 to 15}}
+}
+
#endif
diff --git a/test/Sema/builtins-arm64-exclusive.c b/test/Sema/builtins-arm64-exclusive.c
new file mode 100644
index 000000000000..4d678cc98027
--- /dev/null
+++ b/test/Sema/builtins-arm64-exclusive.c
@@ -0,0 +1,108 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios7.0 -fsyntax-only -verify %s
+
+struct Simple {
+ char a, b;
+};
+
+int test_ldrex(char *addr) {
+ int sum = 0;
+ sum += __builtin_arm_ldrex(addr);
+ sum += __builtin_arm_ldrex((short *)addr);
+ sum += __builtin_arm_ldrex((int *)addr);
+ sum += __builtin_arm_ldrex((long long *)addr);
+ sum += __builtin_arm_ldrex((__int128 *)addr);
+ sum += __builtin_arm_ldrex((float *)addr);
+ sum += __builtin_arm_ldrex((double *)addr);
+ sum += *__builtin_arm_ldrex((int **)addr);
+ sum += __builtin_arm_ldrex((struct Simple **)addr)->a;
+ sum += __builtin_arm_ldrex((volatile char *)addr);
+ sum += __builtin_arm_ldrex((const volatile char *)addr);
+
+ // In principle this might be valid, but stick to ints and floats for scalar
+ // types at the moment.
+ sum += __builtin_arm_ldrex((struct Simple *)addr).a; // expected-error {{address argument to atomic builtin must be a pointer to}}
+
+ __builtin_arm_ldrex(); // expected-error {{too few arguments to function call}}
+ __builtin_arm_ldrex(1, 2); // expected-error {{too many arguments to function call}}
+ return sum;
+}
+
+int test_strex(char *addr) {
+ int res = 0;
+ struct Simple var = {0};
+ res |= __builtin_arm_strex(4, addr);
+ res |= __builtin_arm_strex(42, (short *)addr);
+ res |= __builtin_arm_strex(42, (int *)addr);
+ res |= __builtin_arm_strex(42, (long long *)addr);
+ res |= __builtin_arm_strex(42, (__int128 *)addr);
+ res |= __builtin_arm_strex(2.71828f, (float *)addr);
+ res |= __builtin_arm_strex(3.14159, (double *)addr);
+ res |= __builtin_arm_strex(&var, (struct Simple **)addr);
+
+ res |= __builtin_arm_strex(42, (volatile char *)addr);
+ res |= __builtin_arm_strex(42, (char *const)addr);
+ res |= __builtin_arm_strex(42, (const char *)addr); // expected-warning {{passing 'const char *' to parameter of type 'volatile char *' discards qualifiers}}
+
+
+ res |= __builtin_arm_strex(var, (struct Simple *)addr); // expected-error {{address argument to atomic builtin must be a pointer to}}
+ res |= __builtin_arm_strex(var, (struct Simple **)addr); // expected-error {{passing 'struct Simple' to parameter of incompatible type 'struct Simple *'}}
+ res |= __builtin_arm_strex(&var, (struct Simple **)addr).a; // expected-error {{is not a structure or union}}
+
+ __builtin_arm_strex(1); // expected-error {{too few arguments to function call}}
+ __builtin_arm_strex(1, 2, 3); // expected-error {{too many arguments to function call}}
+ return res;
+}
+
+int test_ldaex(char *addr) {
+ int sum = 0;
+ sum += __builtin_arm_ldaex(addr);
+ sum += __builtin_arm_ldaex((short *)addr);
+ sum += __builtin_arm_ldaex((int *)addr);
+ sum += __builtin_arm_ldaex((long long *)addr);
+ sum += __builtin_arm_ldaex((__int128 *)addr);
+ sum += __builtin_arm_ldaex((float *)addr);
+ sum += __builtin_arm_ldaex((double *)addr);
+ sum += *__builtin_arm_ldaex((int **)addr);
+ sum += __builtin_arm_ldaex((struct Simple **)addr)->a;
+ sum += __builtin_arm_ldaex((volatile char *)addr);
+ sum += __builtin_arm_ldaex((const volatile char *)addr);
+
+ // In principle this might be valid, but stick to ints and floats for scalar
+ // types at the moment.
+ sum += __builtin_arm_ldaex((struct Simple *)addr).a; // expected-error {{address argument to atomic builtin must be a pointer to}}
+
+ __builtin_arm_ldaex(); // expected-error {{too few arguments to function call}}
+ __builtin_arm_ldaex(1, 2); // expected-error {{too many arguments to function call}}
+ return sum;
+}
+
+int test_stlex(char *addr) {
+ int res = 0;
+ struct Simple var = {0};
+ res |= __builtin_arm_stlex(4, addr);
+ res |= __builtin_arm_stlex(42, (short *)addr);
+ res |= __builtin_arm_stlex(42, (int *)addr);
+ res |= __builtin_arm_stlex(42, (long long *)addr);
+ res |= __builtin_arm_stlex(42, (__int128 *)addr);
+ res |= __builtin_arm_stlex(2.71828f, (float *)addr);
+ res |= __builtin_arm_stlex(3.14159, (double *)addr);
+ res |= __builtin_arm_stlex(&var, (struct Simple **)addr);
+
+ res |= __builtin_arm_stlex(42, (volatile char *)addr);
+ res |= __builtin_arm_stlex(42, (char *const)addr);
+ res |= __builtin_arm_stlex(42, (const char *)addr); // expected-warning {{passing 'const char *' to parameter of type 'volatile char *' discards qualifiers}}
+
+
+ res |= __builtin_arm_stlex(var, (struct Simple *)addr); // expected-error {{address argument to atomic builtin must be a pointer to}}
+ res |= __builtin_arm_stlex(var, (struct Simple **)addr); // expected-error {{passing 'struct Simple' to parameter of incompatible type 'struct Simple *'}}
+ res |= __builtin_arm_stlex(&var, (struct Simple **)addr).a; // expected-error {{is not a structure or union}}
+
+ __builtin_arm_stlex(1); // expected-error {{too few arguments to function call}}
+ __builtin_arm_stlex(1, 2, 3); // expected-error {{too many arguments to function call}}
+ return res;
+}
+
+void test_clrex() {
+ __builtin_arm_clrex();
+ __builtin_arm_clrex(1); // expected-error {{too many arguments to function call}}
+}
diff --git a/test/Sema/builtins-arm64.c b/test/Sema/builtins-arm64.c
new file mode 100644
index 000000000000..113f4fc302da
--- /dev/null
+++ b/test/Sema/builtins-arm64.c
@@ -0,0 +1,24 @@
+// RUN: %clang_cc1 -triple arm64-apple-ios -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple arm64-apple-ios -DTEST1 -fsyntax-only -verify %s
+
+#ifdef TEST1
+void __clear_cache(void *start, void *end);
+#endif
+
+void test_clear_cache_chars(char *start, char *end) {
+ __clear_cache(start, end);
+}
+
+void test_clear_cache_voids(void *start, void *end) {
+ __clear_cache(start, end);
+}
+
+void test_clear_cache_no_args() {
+ __clear_cache(); // expected-error {{too few arguments to function call}}
+}
+
+void test_memory_barriers() {
+ __builtin_arm_dmb(16); // expected-error {{argument should be a value from 0 to 15}}
+ __builtin_arm_dsb(17); // expected-error {{argument should be a value from 0 to 15}}
+ __builtin_arm_isb(18); // expected-error {{argument should be a value from 0 to 15}}
+}
diff --git a/test/Sema/builtins-gnu-mode.c b/test/Sema/builtins-gnu-mode.c
index 718803eabe2a..d93b6fdef027 100644
--- a/test/Sema/builtins-gnu-mode.c
+++ b/test/Sema/builtins-gnu-mode.c
@@ -13,14 +13,6 @@ int bzero;
int strcasecmp;
int strncasecmp;
int _exit;
-int vfork;
-int _setjmp;
-int __sigsetjmp;
-int sigsetjmp;
-int setjmp_syscall;
-int savectx;
-int qsetjmp;
-int getcontext;
int _longjmp;
int siglongjmp;
int strlcpy;
diff --git a/test/Sema/builtins.c b/test/Sema/builtins.c
index 8ca33c8e7527..7647100bc270 100644
--- a/test/Sema/builtins.c
+++ b/test/Sema/builtins.c
@@ -197,3 +197,8 @@ void no_ms_builtins() {
__noop(1); // expected-warning {{implicit declaration}}
__debugbreak(); // expected-warning {{implicit declaration}}
}
+
+void unavailable() {
+ __builtin_operator_new(0); // expected-error {{'__builtin_operator_new' is only available in C++}}
+ __builtin_operator_delete(0); // expected-error {{'__builtin_operator_delete' is only available in C++}}
+}
diff --git a/test/Sema/c89.c b/test/Sema/c89.c
index b746d383f306..c9e81f1c41ca 100644
--- a/test/Sema/c89.c
+++ b/test/Sema/c89.c
@@ -111,6 +111,8 @@ const array_of_pointer_to_CI mine3;
void main() {} /* expected-error {{'main' must return 'int'}} */
+const int main() {} /* expected-error {{'main' must return 'int'}} */
+
long long ll1 = /* expected-warning {{'long long' is an extension when C99 mode is not enabled}} */
-42LL; /* expected-warning {{'long long' is an extension when C99 mode is not enabled}} */
unsigned long long ull1 = /* expected-warning {{'long long' is an extension when C99 mode is not enabled}} */
diff --git a/test/Sema/callingconv.c b/test/Sema/callingconv.c
index 500c0fbfb275..f9fa9fef2b36 100644
--- a/test/Sema/callingconv.c
+++ b/test/Sema/callingconv.c
@@ -66,3 +66,5 @@ void __attribute__((intel_ocl_bicc)) inteloclbifunc(float *a) {}
typedef void typedef_fun_t(int);
typedef_fun_t typedef_fun; // expected-note {{previous declaration is here}}
void __attribute__((stdcall)) typedef_fun(int x) { } // expected-error {{function declared 'stdcall' here was previously declared without calling convention}}
+
+struct type_test {} __attribute__((stdcall)); // expected-warning {{'stdcall' attribute only applies to functions and methods}}
diff --git a/test/Sema/const-eval.c b/test/Sema/const-eval.c
index 16d028eaf60e..883cced9f3b0 100644
--- a/test/Sema/const-eval.c
+++ b/test/Sema/const-eval.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -triple i686-linux %s
+// RUN: %clang_cc1 -fsyntax-only -verify -triple i686-linux %s -Wno-tautological-pointer-compare
#define EVAL_EXPR(testno, expr) int test##testno = sizeof(struct{char qq[expr];});
int x;
diff --git a/test/Sema/constant-builtins-2.c b/test/Sema/constant-builtins-2.c
index d2d221c5e12b..a4baecb61558 100644
--- a/test/Sema/constant-builtins-2.c
+++ b/test/Sema/constant-builtins-2.c
@@ -112,49 +112,53 @@ char isnormal_snan [!__builtin_isnormal(__builtin_nans("")) ? 1 : -1];
//long double g21 = __builtin_powil(2.0L, 4);
#define BITSIZE(x) (sizeof(x) * 8)
-char g22[__builtin_clz(1) == BITSIZE(int) - 1 ? 1 : -1];
-char g23[__builtin_clz(7) == BITSIZE(int) - 3 ? 1 : -1];
-char g24[__builtin_clz(1 << (BITSIZE(int) - 1)) == 0 ? 1 : -1];
-int g25 = __builtin_clz(0); // expected-error {{not a compile-time constant}}
-char g26[__builtin_clzl(0xFL) == BITSIZE(long) - 4 ? 1 : -1];
-char g27[__builtin_clzll(0xFFLL) == BITSIZE(long long) - 8 ? 1 : -1];
-
-char g28[__builtin_ctz(1) == 0 ? 1 : -1];
-char g29[__builtin_ctz(8) == 3 ? 1 : -1];
-char g30[__builtin_ctz(1 << (BITSIZE(int) - 1)) == BITSIZE(int) - 1 ? 1 : -1];
-int g31 = __builtin_ctz(0); // expected-error {{not a compile-time constant}}
-char g32[__builtin_ctzl(0x10L) == 4 ? 1 : -1];
-char g33[__builtin_ctzll(0x100LL) == 8 ? 1 : -1];
-
-char g34[__builtin_popcount(0) == 0 ? 1 : -1];
-char g35[__builtin_popcount(0xF0F0) == 8 ? 1 : -1];
-char g36[__builtin_popcount(~0) == BITSIZE(int) ? 1 : -1];
-char g37[__builtin_popcount(~0L) == BITSIZE(int) ? 1 : -1];
-char g38[__builtin_popcountl(0L) == 0 ? 1 : -1];
-char g39[__builtin_popcountl(0xF0F0L) == 8 ? 1 : -1];
-char g40[__builtin_popcountl(~0L) == BITSIZE(long) ? 1 : -1];
-char g41[__builtin_popcountll(0LL) == 0 ? 1 : -1];
-char g42[__builtin_popcountll(0xF0F0LL) == 8 ? 1 : -1];
-char g43[__builtin_popcountll(~0LL) == BITSIZE(long long) ? 1 : -1];
-
-char g44[__builtin_parity(0) == 0 ? 1 : -1];
-char g45[__builtin_parity(0xb821) == 0 ? 1 : -1];
-char g46[__builtin_parity(0xb822) == 0 ? 1 : -1];
-char g47[__builtin_parity(0xb823) == 1 ? 1 : -1];
-char g48[__builtin_parity(0xb824) == 0 ? 1 : -1];
-char g49[__builtin_parity(0xb825) == 1 ? 1 : -1];
-char g50[__builtin_parity(0xb826) == 1 ? 1 : -1];
-char g51[__builtin_parity(~0) == 0 ? 1 : -1];
-char g52[__builtin_parityl(1L << (BITSIZE(long) - 1)) == 1 ? 1 : -1];
-char g53[__builtin_parityll(1LL << (BITSIZE(long long) - 1)) == 1 ? 1 : -1];
-
-char g54[__builtin_ffs(0) == 0 ? 1 : -1];
-char g55[__builtin_ffs(1) == 1 ? 1 : -1];
-char g56[__builtin_ffs(0xfbe71) == 1 ? 1 : -1];
-char g57[__builtin_ffs(0xfbe70) == 5 ? 1 : -1];
-char g58[__builtin_ffs(1U << (BITSIZE(int) - 1)) == BITSIZE(int) ? 1 : -1];
-char g59[__builtin_ffsl(0x10L) == 5 ? 1 : -1];
-char g60[__builtin_ffsll(0x100LL) == 9 ? 1 : -1];
+char clz1[__builtin_clz(1) == BITSIZE(int) - 1 ? 1 : -1];
+char clz2[__builtin_clz(7) == BITSIZE(int) - 3 ? 1 : -1];
+char clz3[__builtin_clz(1 << (BITSIZE(int) - 1)) == 0 ? 1 : -1];
+int clz4 = __builtin_clz(0); // expected-error {{not a compile-time constant}}
+char clz5[__builtin_clzl(0xFL) == BITSIZE(long) - 4 ? 1 : -1];
+char clz6[__builtin_clzll(0xFFLL) == BITSIZE(long long) - 8 ? 1 : -1];
+char clz7[__builtin_clzs(0x1) == BITSIZE(short) - 1 ? 1 : -1];
+char clz8[__builtin_clzs(0xf) == BITSIZE(short) - 4 ? 1 : -1];
+char clz9[__builtin_clzs(0xfff) == BITSIZE(short) - 12 ? 1 : -1];
+
+char ctz1[__builtin_ctz(1) == 0 ? 1 : -1];
+char ctz2[__builtin_ctz(8) == 3 ? 1 : -1];
+char ctz3[__builtin_ctz(1 << (BITSIZE(int) - 1)) == BITSIZE(int) - 1 ? 1 : -1];
+int ctz4 = __builtin_ctz(0); // expected-error {{not a compile-time constant}}
+char ctz5[__builtin_ctzl(0x10L) == 4 ? 1 : -1];
+char ctz6[__builtin_ctzll(0x100LL) == 8 ? 1 : -1];
+char ctz7[__builtin_ctzs(1 << (BITSIZE(short) - 1)) == BITSIZE(short) - 1 ? 1 : -1];
+
+char popcount1[__builtin_popcount(0) == 0 ? 1 : -1];
+char popcount2[__builtin_popcount(0xF0F0) == 8 ? 1 : -1];
+char popcount3[__builtin_popcount(~0) == BITSIZE(int) ? 1 : -1];
+char popcount4[__builtin_popcount(~0L) == BITSIZE(int) ? 1 : -1];
+char popcount5[__builtin_popcountl(0L) == 0 ? 1 : -1];
+char popcount6[__builtin_popcountl(0xF0F0L) == 8 ? 1 : -1];
+char popcount7[__builtin_popcountl(~0L) == BITSIZE(long) ? 1 : -1];
+char popcount8[__builtin_popcountll(0LL) == 0 ? 1 : -1];
+char popcount9[__builtin_popcountll(0xF0F0LL) == 8 ? 1 : -1];
+char popcount10[__builtin_popcountll(~0LL) == BITSIZE(long long) ? 1 : -1];
+
+char parity1[__builtin_parity(0) == 0 ? 1 : -1];
+char parity2[__builtin_parity(0xb821) == 0 ? 1 : -1];
+char parity3[__builtin_parity(0xb822) == 0 ? 1 : -1];
+char parity4[__builtin_parity(0xb823) == 1 ? 1 : -1];
+char parity5[__builtin_parity(0xb824) == 0 ? 1 : -1];
+char parity6[__builtin_parity(0xb825) == 1 ? 1 : -1];
+char parity7[__builtin_parity(0xb826) == 1 ? 1 : -1];
+char parity8[__builtin_parity(~0) == 0 ? 1 : -1];
+char parity9[__builtin_parityl(1L << (BITSIZE(long) - 1)) == 1 ? 1 : -1];
+char parity10[__builtin_parityll(1LL << (BITSIZE(long long) - 1)) == 1 ? 1 : -1];
+
+char ffs1[__builtin_ffs(0) == 0 ? 1 : -1];
+char ffs2[__builtin_ffs(1) == 1 ? 1 : -1];
+char ffs3[__builtin_ffs(0xfbe71) == 1 ? 1 : -1];
+char ffs4[__builtin_ffs(0xfbe70) == 5 ? 1 : -1];
+char ffs5[__builtin_ffs(1U << (BITSIZE(int) - 1)) == BITSIZE(int) ? 1 : -1];
+char ffs6[__builtin_ffsl(0x10L) == 5 ? 1 : -1];
+char ffs7[__builtin_ffsll(0x100LL) == 9 ? 1 : -1];
#undef BITSIZE
// GCC misc stuff
diff --git a/test/Sema/constructor-attribute.c b/test/Sema/constructor-attribute.c
index 382591654d91..1bb69fc4aa56 100644
--- a/test/Sema/constructor-attribute.c
+++ b/test/Sema/constructor-attribute.c
@@ -3,13 +3,13 @@
int x __attribute__((constructor)); // expected-warning {{'constructor' attribute only applies to functions}}
int f() __attribute__((constructor));
int f() __attribute__((constructor(1)));
-int f() __attribute__((constructor(1,2))); // expected-error {{attribute takes no more than 1 argument}}
-int f() __attribute__((constructor(1.0))); // expected-error {{'constructor' attribute requires parameter 1 to be an integer constant}}
+int f() __attribute__((constructor(1,2))); // expected-error {{'constructor' attribute takes no more than 1 argument}}
+int f() __attribute__((constructor(1.0))); // expected-error {{'constructor' attribute requires an integer constant}}
int x __attribute__((destructor)); // expected-warning {{'destructor' attribute only applies to functions}}
int f() __attribute__((destructor));
int f() __attribute__((destructor(1)));
-int f() __attribute__((destructor(1,2))); // expected-error {{attribute takes no more than 1 argument}}
-int f() __attribute__((destructor(1.0))); // expected-error {{'destructor' attribute requires parameter 1 to be an integer constant}}
+int f() __attribute__((destructor(1,2))); // expected-error {{'destructor' attribute takes no more than 1 argument}}
+int f() __attribute__((destructor(1.0))); // expected-error {{'destructor' attribute requires an integer constant}}
diff --git a/test/Sema/conversion.c b/test/Sema/conversion.c
index a591ac0eef83..89c34c6a224c 100644
--- a/test/Sema/conversion.c
+++ b/test/Sema/conversion.c
@@ -417,3 +417,15 @@ void test26(int si, long sl) {
si = si / sl;
si = sl / si; // expected-warning {{implicit conversion loses integer precision: 'long' to 'int'}}
}
+
+// rdar://16502418
+typedef unsigned short uint16_t;
+typedef unsigned int uint32_t;
+typedef __attribute__ ((ext_vector_type(16),__aligned__(32))) uint16_t ushort16;
+typedef __attribute__ ((ext_vector_type( 8),__aligned__( 32))) uint32_t uint8;
+
+void test27(ushort16 constants) {
+ uint8 pairedConstants = (uint8) constants;
+ ushort16 crCbScale = pairedConstants.s4; // expected-warning {{implicit conversion loses integer precision: 'uint32_t' (aka 'unsigned int') to 'ushort16'}}
+ ushort16 brBias = pairedConstants.s6; // expected-warning {{implicit conversion loses integer precision: 'uint32_t' (aka 'unsigned int') to 'ushort16'}}
+}
diff --git a/test/Sema/crash-invalid-array.c b/test/Sema/crash-invalid-array.c
index eeac39148ca4..029413b9843f 100644
--- a/test/Sema/crash-invalid-array.c
+++ b/test/Sema/crash-invalid-array.c
@@ -1,18 +1,16 @@
-// RUN: not %clang_cc1 -O1 %s -emit-llvm
+// RUN: %clang_cc1 -triple=x86_64-apple-darwin -fsyntax-only -verify %s
// PR6913
-#include <stdio.h>
-
int main()
{
int x[10][10];
- int (*p)[] = x; // expected-error {{invalid use of array with unspecified bounds}
+ int (*p)[] = x;
int i;
for(i = 0; i < 10; ++i)
{
- p[i][i] = i;
+ p[i][i] = i; // expected-error {{subscript of pointer to incomplete type 'int []'}}
}
}
diff --git a/test/Sema/decl-in-prototype.c b/test/Sema/decl-in-prototype.c
index 05b8e0a1c3bf..4f581aa54e53 100644
--- a/test/Sema/decl-in-prototype.c
+++ b/test/Sema/decl-in-prototype.c
@@ -1,12 +1,12 @@
-// RUN: %clang_cc1_only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
const int AA = 5;
-int f1(enum {AA,BB} E) {
+int f1(enum {AA,BB} E) { // expected-warning {{will not be visible outside of this function}}
return BB;
}
-int f2(enum {AA=7,BB} E) {
+int f2(enum {AA=7,BB} E) { // expected-warning {{will not be visible outside of this function}}
return AA;
}
@@ -31,3 +31,7 @@ void f6(struct z {int b;} c) { // expected-warning {{declaration of 'struct z' w
struct z d;
d.b = 4;
}
+
+void pr19018_1 (enum e19018 { qq } x); // expected-warning{{declaration of 'enum e19018' will not be visible outside of this function}}
+enum e19018 qq; //expected-error{{tentative definition has type 'enum e19018' that is never completed}} \
+ //expected-note{{forward declaration of 'enum e19018'}}
diff --git a/test/Sema/decl-invalid.c b/test/Sema/decl-invalid.c
index 0544304c20e6..c7ec6dd725d6 100644
--- a/test/Sema/decl-invalid.c
+++ b/test/Sema/decl-invalid.c
@@ -24,5 +24,4 @@ I; // expected-warning {{declaration does not declare anything}}
// rdar://6880449
register int test1; // expected-error {{illegal storage class on file-scoped variable}}
-register int test2 __asm__("edi"); // expected-error {{global register variables are not supported}}
diff --git a/test/Sema/dllexport.c b/test/Sema/dllexport.c
new file mode 100644
index 000000000000..c6d04dc63423
--- /dev/null
+++ b/test/Sema/dllexport.c
@@ -0,0 +1,138 @@
+// RUN: %clang_cc1 -triple i686-win32 -fsyntax-only -verify -std=c99 %s
+// RUN: %clang_cc1 -triple x86_64-win32 -fsyntax-only -verify -std=c11 %s
+// RUN: %clang_cc1 -triple i686-mingw32 -fsyntax-only -verify -std=c11 %s
+// RUN: %clang_cc1 -triple x86_64-mingw32 -fsyntax-only -verify -std=c99 %s
+
+// Invalid usage.
+__declspec(dllexport) typedef int typedef1; // expected-warning{{'dllexport' attribute only applies to variables and functions}}
+typedef __declspec(dllexport) int typedef2; // expected-warning{{'dllexport' attribute only applies to variables and functions}}
+typedef int __declspec(dllexport) typedef3; // expected-warning{{'dllexport' attribute only applies to variables and functions}}
+typedef __declspec(dllexport) void (*FunTy)(); // expected-warning{{'dllexport' attribute only applies to variables and functions}}
+enum __declspec(dllexport) Enum { EnumVal }; // expected-warning{{'dllexport' attribute only applies to variables and functions}}
+struct __declspec(dllexport) Record {}; // expected-warning{{'dllexport' attribute only applies to variables and functions}}
+
+
+
+//===----------------------------------------------------------------------===//
+// Globals
+//===----------------------------------------------------------------------===//
+
+// Export declaration.
+__declspec(dllexport) extern int ExternGlobalDecl;
+
+// dllexport implies a definition.
+__declspec(dllexport) int GlobalDef;
+
+// Export definition.
+__declspec(dllexport) int GlobalInit1 = 1;
+int __declspec(dllexport) GlobalInit2 = 1;
+
+// Declare, then export definition.
+__declspec(dllexport) extern int GlobalDeclInit;
+int GlobalDeclInit = 1;
+
+// Redeclarations
+__declspec(dllexport) extern int GlobalRedecl1;
+__declspec(dllexport) int GlobalRedecl1;
+
+__declspec(dllexport) extern int GlobalRedecl2;
+ int GlobalRedecl2;
+
+ extern int GlobalRedecl3; // expected-note{{previous declaration is here}}
+__declspec(dllexport) extern int GlobalRedecl3; // expected-error{{redeclaration of 'GlobalRedecl3' cannot add 'dllexport' attribute}}
+
+// External linkage is required.
+__declspec(dllexport) static int StaticGlobal; // expected-error{{'StaticGlobal' must have external linkage when declared 'dllexport'}}
+
+// Export in local scope.
+void functionScope() {
+ __declspec(dllexport) int LocalVarDecl; // expected-error{{'LocalVarDecl' must have external linkage when declared 'dllexport'}}
+ __declspec(dllexport) int LocalVarDef = 1; // expected-error{{'LocalVarDef' must have external linkage when declared 'dllexport'}}
+ __declspec(dllexport) extern int ExternLocalVarDecl;
+ __declspec(dllexport) static int StaticLocalVar; // expected-error{{'StaticLocalVar' must have external linkage when declared 'dllexport'}}
+}
+
+
+
+//===----------------------------------------------------------------------===//
+// Functions
+//===----------------------------------------------------------------------===//
+
+// Export function declaration. Check different placements.
+__attribute__((dllexport)) void decl1A(); // Sanity check with __attribute__
+__declspec(dllexport) void decl1B();
+
+void __attribute__((dllexport)) decl2A();
+void __declspec(dllexport) decl2B();
+
+// Export function definition.
+__declspec(dllexport) void def() {}
+
+// Export inline function.
+__declspec(dllexport) inline void inlineFunc1() {}
+extern void inlineFunc1();
+
+inline void __attribute__((dllexport)) inlineFunc2() {}
+extern void inlineFunc2();
+
+// Redeclarations
+__declspec(dllexport) void redecl1();
+__declspec(dllexport) void redecl1();
+
+__declspec(dllexport) void redecl2();
+ void redecl2();
+
+__declspec(dllexport) void redecl3();
+ void redecl3() {}
+
+ void redecl4(); // expected-note{{previous declaration is here}}
+__declspec(dllexport) void redecl4(); // expected-error{{redeclaration of 'redecl4' cannot add 'dllexport' attribute}}
+
+ void redecl5(); // expected-note{{previous declaration is here}}
+__declspec(dllexport) inline void redecl5() {} // expected-error{{redeclaration of 'redecl5' cannot add 'dllexport' attribute}}
+
+// External linkage is required.
+__declspec(dllexport) static int staticFunc(); // expected-error{{'staticFunc' must have external linkage when declared 'dllexport'}}
+
+
+
+//===----------------------------------------------------------------------===//
+// Precedence
+//===----------------------------------------------------------------------===//
+
+// dllexport takes precedence over dllimport if both are specified.
+__attribute__((dllimport, dllexport)) extern int PrecedenceExternGlobal1A; // expected-warning{{'dllimport' attribute ignored}}
+__declspec(dllimport) __declspec(dllexport) extern int PrecedenceExternGlobal1B; // expected-warning{{'dllimport' attribute ignored}}
+
+__attribute__((dllexport, dllimport)) extern int PrecedenceExternGlobal2A; // expected-warning{{'dllimport' attribute ignored}}
+__declspec(dllexport) __declspec(dllimport) extern int PrecedenceExternGlobal2B; // expected-warning{{'dllimport' attribute ignored}}
+
+__attribute__((dllimport, dllexport)) int PrecedenceGlobal1A; // expected-warning{{'dllimport' attribute ignored}}
+__declspec(dllimport) __declspec(dllexport) int PrecedenceGlobal1B; // expected-warning{{'dllimport' attribute ignored}}
+
+__attribute__((dllexport, dllimport)) int PrecedenceGlobal2A; // expected-warning{{'dllimport' attribute ignored}}
+__declspec(dllexport) __declspec(dllimport) int PrecedenceGlobal2B; // expected-warning{{'dllimport' attribute ignored}}
+
+__declspec(dllexport) extern int PrecedenceExternGlobalRedecl1;
+__declspec(dllimport) extern int PrecedenceExternGlobalRedecl1; // expected-warning{{'dllimport' attribute ignored}}
+
+__declspec(dllimport) extern int PrecedenceExternGlobalRedecl2; // expected-warning{{'dllimport' attribute ignored}}
+__declspec(dllexport) extern int PrecedenceExternGlobalRedecl2;
+
+__declspec(dllexport) extern int PrecedenceGlobalRedecl1;
+__declspec(dllimport) int PrecedenceGlobalRedecl1; // expected-warning{{'dllimport' attribute ignored}}
+
+__declspec(dllimport) extern int PrecedenceGlobalRedecl2; // expected-warning{{'dllimport' attribute ignored}}
+__declspec(dllexport) int PrecedenceGlobalRedecl2;
+
+void __attribute__((dllimport, dllexport)) precedence1A() {} // expected-warning{{'dllimport' attribute ignored}}
+void __declspec(dllimport) __declspec(dllexport) precedence1B() {} // expected-warning{{'dllimport' attribute ignored}}
+
+void __attribute__((dllexport, dllimport)) precedence2A() {} // expected-warning{{'dllimport' attribute ignored}}
+void __declspec(dllexport) __declspec(dllimport) precedence2B() {} // expected-warning{{'dllimport' attribute ignored}}
+
+void __declspec(dllimport) precedenceRedecl1(); // expected-warning{{'dllimport' attribute ignored}}
+void __declspec(dllexport) precedenceRedecl1() {}
+
+void __declspec(dllexport) precedenceRedecl2();
+void __declspec(dllimport) precedenceRedecl2() {} // expected-warning{{'dllimport' attribute ignored}}
diff --git a/test/Sema/dllimport-dllexport.c b/test/Sema/dllimport-dllexport.c
deleted file mode 100644
index 80810d696e8c..000000000000
--- a/test/Sema/dllimport-dllexport.c
+++ /dev/null
@@ -1,48 +0,0 @@
-// RUN: %clang_cc1 -triple i386-mingw32 -fsyntax-only -verify %s
-// RUN: %clang_cc1 -triple x86_64-mingw32 -fsyntax-only -verify %s
-
-inline void __attribute__((dllexport)) foo1(){} // expected-warning{{dllexport attribute ignored}}
-inline void __attribute__((dllimport)) foo2(){} // expected-warning{{dllimport attribute ignored}}
-
-void __attribute__((dllimport)) foo3(){} // expected-error{{dllimport attribute can be applied only to symbol declaration}}
-
-void __attribute__((dllimport, dllexport)) foo4(); // expected-warning{{dllimport attribute ignored}}
-
-void __attribute__((dllexport)) foo5();
-void __attribute__((dllimport)) foo5(); // expected-warning{{dllimport attribute ignored}}
-
-typedef int __attribute__((dllexport)) type6; // expected-warning{{'dllexport' attribute only applies to variables and functions}}
-
-typedef int __attribute__((dllimport)) type7; // expected-warning{{'dllimport' attribute only applies to variables and functions}}
-
-void __attribute__((dllimport)) foo6();
-void foo6(){} // expected-warning {{'foo6' redeclared without dllimport attribute: previous dllimport ignored}}
-
-// PR6269
-inline void __declspec(dllexport) foo7(){} // expected-warning{{dllexport attribute ignored}}
-inline void __declspec(dllimport) foo8(){} // expected-warning{{dllimport attribute ignored}}
-
-void __declspec(dllimport) foo9(){} // expected-error{{dllimport attribute can be applied only to symbol declaration}}
-
-void __declspec(dllimport) __declspec(dllexport) foo10(); // expected-warning{{dllimport attribute ignored}}
-
-void __declspec(dllexport) foo11();
-void __declspec(dllimport) foo11(); // expected-warning{{dllimport attribute ignored}}
-
-typedef int __declspec(dllexport) type1; // expected-warning{{'dllexport' attribute only applies to variables and functions}}
-
-typedef int __declspec(dllimport) type2; // expected-warning{{'dllimport' attribute only applies to variables and functions}}
-
-void __declspec(dllimport) foo12();
-void foo12(){} // expected-warning {{'foo12' redeclared without dllimport attribute: previous dllimport ignored}}
-
-void __attribute__((dllimport)) foo13(); // expected-warning{{dllimport attribute ignored}}
-void __attribute__((dllexport)) foo13();
-
-extern int foo14 __attribute__((dllexport));
-extern int foo14 __attribute__((dllimport)); // expected-warning{{dllimport attribute ignored}}
-
-__declspec(dllimport) int foo15 = 54; // expected-warning{{'dllimport' attribute cannot be specified on a definition}}
-
-extern __declspec(dllimport) int foo17;
-int foo17 = 54; // expected-warning{{'dllimport' attribute cannot be specified on a definition}}
diff --git a/test/Sema/dllimport.c b/test/Sema/dllimport.c
new file mode 100644
index 000000000000..2702453b61c0
--- /dev/null
+++ b/test/Sema/dllimport.c
@@ -0,0 +1,137 @@
+// RUN: %clang_cc1 -triple i686-win32 -fsyntax-only -verify -std=c99 %s
+// RUN: %clang_cc1 -triple x86_64-win32 -fsyntax-only -verify -std=c11 %s
+// RUN: %clang_cc1 -triple i686-mingw32 -fsyntax-only -verify -std=c11 %s
+// RUN: %clang_cc1 -triple x86_64-mingw32 -fsyntax-only -verify -std=c99 %s
+
+// Invalid usage.
+__declspec(dllimport) typedef int typedef1; // expected-warning{{'dllimport' attribute only applies to variables and functions}}
+typedef __declspec(dllimport) int typedef2; // expected-warning{{'dllimport' attribute only applies to variables and functions}}
+typedef int __declspec(dllimport) typedef3; // expected-warning{{'dllimport' attribute only applies to variables and functions}}
+typedef __declspec(dllimport) void (*FunTy)(); // expected-warning{{'dllimport' attribute only applies to variables and functions}}
+enum __declspec(dllimport) Enum { EnumVal }; // expected-warning{{'dllimport' attribute only applies to variables and functions}}
+struct __declspec(dllimport) Record {}; // expected-warning{{'dllimport' attribute only applies to variables and functions}}
+
+
+
+//===----------------------------------------------------------------------===//
+// Globals
+//===----------------------------------------------------------------------===//
+
+// Import declaration.
+__declspec(dllimport) extern int ExternGlobalDecl;
+
+// dllimport implies a declaration.
+__declspec(dllimport) int GlobalDecl;
+int **__attribute__((dllimport))* GlobalDeclChunkAttr;
+int GlobalDeclAttr __attribute__((dllimport));
+
+// Address of variables can't be used for initialization in C language modes.
+int *VarForInit = &GlobalDecl; // expected-error{{initializer element is not a compile-time constant}}
+
+// Not allowed on definitions.
+__declspec(dllimport) extern int ExternGlobalInit = 1; // expected-error{{definition of dllimport data}}
+__declspec(dllimport) int GlobalInit1 = 1; // expected-error{{definition of dllimport data}}
+int __declspec(dllimport) GlobalInit2 = 1; // expected-error{{definition of dllimport data}}
+
+// Declare, then reject definition.
+__declspec(dllimport) extern int ExternGlobalDeclInit; // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+int ExternGlobalDeclInit = 1; // expected-warning{{'ExternGlobalDeclInit' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+
+__declspec(dllimport) int GlobalDeclInit; // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+int GlobalDeclInit = 1; // expected-warning{{'GlobalDeclInit' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+
+int *__attribute__((dllimport)) GlobalDeclChunkAttrInit; // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+int *GlobalDeclChunkAttrInit = 0; // expected-warning{{'GlobalDeclChunkAttrInit' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+
+int GlobalDeclAttrInit __attribute__((dllimport)); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+int GlobalDeclAttrInit = 1; // expected-warning{{'GlobalDeclAttrInit' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+
+// Redeclarations
+__declspec(dllimport) extern int GlobalRedecl1;
+__declspec(dllimport) extern int GlobalRedecl1;
+
+__declspec(dllimport) int GlobalRedecl2a;
+__declspec(dllimport) int GlobalRedecl2a;
+
+int *__attribute__((dllimport)) GlobalRedecl2b;
+int *__attribute__((dllimport)) GlobalRedecl2b;
+
+int GlobalRedecl2c __attribute__((dllimport));
+int GlobalRedecl2c __attribute__((dllimport));
+
+// NB: MSVC issues a warning and makes GlobalRedecl3 dllexport. We follow GCC
+// and drop the dllimport with a warning.
+__declspec(dllimport) extern int GlobalRedecl3; // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+ extern int GlobalRedecl3; // expected-warning{{'GlobalRedecl3' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+
+ extern int GlobalRedecl4; // expected-note{{previous declaration is here}}
+__declspec(dllimport) extern int GlobalRedecl4; // expected-error{{redeclaration of 'GlobalRedecl4' cannot add 'dllimport' attribute}}
+
+// External linkage is required.
+__declspec(dllimport) static int StaticGlobal; // expected-error{{'StaticGlobal' must have external linkage when declared 'dllimport'}}
+
+// Import in local scope.
+__declspec(dllimport) float LocalRedecl1; // expected-note{{previous definition is here}}
+__declspec(dllimport) float LocalRedecl2; // expected-note{{previous definition is here}}
+__declspec(dllimport) float LocalRedecl3; // expected-note{{previous definition is here}}
+void functionScope() {
+ __declspec(dllimport) int LocalRedecl1; // expected-error{{redefinition of 'LocalRedecl1' with a different type: 'int' vs 'float'}}
+ int *__attribute__((dllimport)) LocalRedecl2; // expected-error{{redefinition of 'LocalRedecl2' with a different type: 'int *' vs 'float'}}
+ int LocalRedecl3 __attribute__((dllimport)); // expected-error{{redefinition of 'LocalRedecl3' with a different type: 'int' vs 'float'}}
+
+ __declspec(dllimport) int LocalVarDecl;
+ __declspec(dllimport) int LocalVarDef = 1; // expected-error{{definition of dllimport data}}
+ __declspec(dllimport) extern int ExternLocalVarDecl;
+ __declspec(dllimport) extern int ExternLocalVarDef = 1; // expected-error{{definition of dllimport data}}
+ __declspec(dllimport) static int StaticLocalVar; // expected-error{{'StaticLocalVar' must have external linkage when declared 'dllimport'}}
+}
+
+
+
+//===----------------------------------------------------------------------===//
+// Functions
+//===----------------------------------------------------------------------===//
+
+// Import function declaration. Check different placements.
+__attribute__((dllimport)) void decl1A(); // Sanity check with __attribute__
+__declspec(dllimport) void decl1B();
+
+void __attribute__((dllimport)) decl2A();
+void __declspec(dllimport) decl2B();
+
+// Address of functions can be used for initialization in C language modes.
+// However, the address of the thunk wrapping the function is used instead of
+// the address in the import address table.
+void (*FunForInit)() = &decl2A;
+
+// Not allowed on function definitions.
+__declspec(dllimport) void def() {} // expected-error{{dllimport cannot be applied to non-inline function definition}}
+
+// Import inline function.
+__declspec(dllimport) inline void inlineFunc1() {}
+inline void __attribute__((dllimport)) inlineFunc2() {}
+
+// Redeclarations
+__declspec(dllimport) void redecl1();
+__declspec(dllimport) void redecl1();
+
+// NB: MSVC issues a warning and makes redecl2/redecl3 dllexport. We follow GCC
+// and drop the dllimport with a warning.
+__declspec(dllimport) void redecl2(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+ void redecl2(); // expected-warning{{'redecl2' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+
+__declspec(dllimport) void redecl3(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+ void redecl3() {} // expected-warning{{'redecl3' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+
+ void redecl4(); // expected-note{{previous declaration is here}}
+__declspec(dllimport) void redecl4(); // expected-error{{redeclaration of 'redecl4' cannot add 'dllimport' attribute}}
+
+// Inline redeclarations are fine.
+__declspec(dllimport) void redecl5();
+ inline void redecl5() {}
+
+ void redecl6(); // expected-note{{previous declaration is here}}
+__declspec(dllimport) inline void redecl6() {} // expected-error{{redeclaration of 'redecl6' cannot add 'dllimport' attribute}}
+
+// External linkage is required.
+__declspec(dllimport) static int staticFunc(); // expected-error{{'staticFunc' must have external linkage when declared 'dllimport'}}
diff --git a/test/Sema/empty1.c b/test/Sema/empty1.c
index de922f775ef7..9a2fb678de66 100644
--- a/test/Sema/empty1.c
+++ b/test/Sema/empty1.c
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 %s -fsyntax-only -verify -Wc++-compat
+// RUN: %clang_cc1 %s -triple %itanium_abi_triple -fsyntax-only -verify -Wc++-compat
+
+// Note: Empty C structs are 4 bytes in the Microsoft ABI.
struct emp_1 { // expected-warning {{empty struct has size 0 in C, size 1 in C++}}
};
diff --git a/test/Sema/enable_if.c b/test/Sema/enable_if.c
new file mode 100644
index 000000000000..a3c4323c4c98
--- /dev/null
+++ b/test/Sema/enable_if.c
@@ -0,0 +1,97 @@
+// RUN: %clang_cc1 %s -verify
+// RUN: %clang_cc1 %s -DCODEGEN -emit-llvm -o - | FileCheck %s
+
+#define O_CREAT 0x100
+typedef int mode_t;
+typedef unsigned long size_t;
+
+int open(const char *pathname, int flags) __attribute__((enable_if(!(flags & O_CREAT), "must specify mode when using O_CREAT"))) __attribute__((overloadable)); // expected-note{{candidate disabled: must specify mode when using O_CREAT}}
+int open(const char *pathname, int flags, mode_t mode) __attribute__((overloadable)); // expected-note{{candidate function not viable: requires 3 arguments, but 2 were provided}}
+
+void test1() {
+#ifndef CODEGEN
+ open("path", O_CREAT); // expected-error{{no matching function for call to 'open'}}
+#endif
+ open("path", O_CREAT, 0660);
+ open("path", 0);
+ open("path", 0, 0);
+}
+
+size_t __strnlen_chk(const char *s, size_t requested_amount, size_t s_len);
+
+size_t strnlen(const char *s, size_t maxlen) // expected-note{{candidate function}}
+ __attribute__((overloadable))
+ __asm__("strnlen_real1");
+
+__attribute__((always_inline))
+inline size_t strnlen(const char *s, size_t maxlen) // expected-note{{candidate function}}
+ __attribute__((overloadable))
+ __attribute__((enable_if(__builtin_object_size(s, 0) != -1,
+ "chosen when target buffer size is known")))
+{
+ return __strnlen_chk(s, maxlen, __builtin_object_size(s, 0));
+}
+
+size_t strnlen(const char *s, size_t maxlen) // expected-note{{candidate disabled: chosen when 'maxlen' is known to be less than or equal to the buffer size}}
+ __attribute__((overloadable))
+ __attribute__((enable_if(__builtin_object_size(s, 0) != -1,
+ "chosen when target buffer size is known")))
+ __attribute__((enable_if(maxlen <= __builtin_object_size(s, 0),
+ "chosen when 'maxlen' is known to be less than or equal to the buffer size")))
+ __asm__("strnlen_real2");
+
+size_t strnlen(const char *s, size_t maxlen) // expected-note{{candidate function has been explicitly made unavailable}}
+ __attribute__((overloadable))
+ __attribute__((enable_if(__builtin_object_size(s, 0) != -1,
+ "chosen when target buffer size is known")))
+ __attribute__((enable_if(maxlen > __builtin_object_size(s, 0),
+ "chosen when 'maxlen' is larger than the buffer size")))
+ __attribute__((unavailable("'maxlen' is larger than the buffer size")));
+
+void test2(const char *s, int i) {
+// CHECK: define void @test2
+ const char c[123];
+ strnlen(s, i);
+// CHECK: call {{.*}}strnlen_real1
+ strnlen(s, 999);
+// CHECK: call {{.*}}strnlen_real1
+ strnlen(c, 1);
+// CHECK: call {{.*}}strnlen_real2
+ strnlen(c, i);
+// CHECK: call {{.*}}strnlen_chk
+#ifndef CODEGEN
+ strnlen(c, 999); // expected-error{{call to unavailable function 'strnlen': 'maxlen' is larger than the buffer size}}
+#endif
+}
+
+int isdigit(int c) __attribute__((overloadable)); // expected-note{{candidate function}}
+int isdigit(int c) __attribute__((overloadable)) // expected-note{{candidate function has been explicitly made unavailable}}
+ __attribute__((enable_if(c <= -1 || c > 255, "'c' must have the value of an unsigned char or EOF")))
+ __attribute__((unavailable("'c' must have the value of an unsigned char or EOF")));
+
+void test3(int c) {
+ isdigit(c);
+ isdigit(10);
+#ifndef CODEGEN
+ isdigit(-10); // expected-error{{call to unavailable function 'isdigit': 'c' must have the value of an unsigned char or EOF}}
+#endif
+}
+
+#ifndef CODEGEN
+__attribute__((enable_if(n == 0, "chosen when 'n' is zero"))) void f1(int n); // expected-error{{use of undeclared identifier 'n'}}
+
+int n __attribute__((enable_if(1, "always chosen"))); // expected-warning{{'enable_if' attribute only applies to functions}}
+
+void f(int n) __attribute__((enable_if("chosen when 'n' is zero", n == 0))); // expected-error{{'enable_if' attribute requires a string}}
+
+void f(int n) __attribute__((enable_if())); // expected-error{{'enable_if' attribute requires exactly 2 arguments}}
+
+void f(int n) __attribute__((enable_if(unresolvedid, "chosen when 'unresolvedid' is non-zero"))); // expected-error{{use of undeclared identifier 'unresolvedid'}}
+
+int global;
+void f(int n) __attribute__((enable_if(global == 0, "chosen when 'global' is zero"))); // expected-error{{'enable_if' attribute expression never produces a constant expression}} // expected-note{{subexpression not valid in a constant expression}}
+
+const int cst = 7;
+void return_cst(void) __attribute__((overloadable)) __attribute__((enable_if(cst == 7, "chosen when 'cst' is 7")));
+void test_return_cst() { return_cst(); }
+#endif
diff --git a/test/Sema/ext_vector_casts.c b/test/Sema/ext_vector_casts.c
index 66004b03ff8c..949d67311b36 100644
--- a/test/Sema/ext_vector_casts.c
+++ b/test/Sema/ext_vector_casts.c
@@ -1,6 +1,7 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -fsyntax-only -verify -fno-lax-vector-conversions %s
+// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -fsyntax-only -verify -fno-lax-vector-conversions -Wconversion %s
typedef __attribute__(( ext_vector_type(2) )) float float2;
+typedef __attribute__(( ext_vector_type(3) )) float float3;
typedef __attribute__(( ext_vector_type(4) )) int int4;
typedef __attribute__(( ext_vector_type(8) )) short short8;
typedef __attribute__(( ext_vector_type(4) )) float float4;
@@ -11,12 +12,16 @@ typedef size_t stride4 __attribute__((ext_vector_type(4)));
static void test() {
float2 vec2;
+ float3 vec3;
float4 vec4, vec4_2;
int4 ivec4;
short8 ish8;
t3 vec4_3;
int *ptr;
int i;
+
+ vec3 += vec2; // expected-error {{can't convert between vector values of different size}}
+ vec4 += vec3; // expected-error {{can't convert between vector values of different size}}
vec4 = 5.0f;
vec4 = (float4)5.0f;
@@ -27,31 +32,30 @@ static void test() {
ivec4 = (int4)5;
ivec4 = (int4)vec4_3;
- i = (int)ivec4; // expected-error {{invalid conversion between vector type 'int4' and integer type 'int' of different size}}
- i = ivec4; // expected-error {{assigning to 'int' from incompatible type 'int4'}}
-
- ivec4 = (int4)ptr; // expected-error {{invalid conversion between vector type 'int4' and scalar type 'int *'}}
+ i = (int)ivec4; // expected-error {{invalid conversion between vector type 'int4' (vector of 4 'int' values) and integer type 'int' of different size}}
+ i = ivec4; // expected-error {{assigning to 'int' from incompatible type 'int4' (vector of 4 'int' values)}}
- vec4 = (float4)vec2; // expected-error {{invalid conversion between ext-vector type 'float4' and 'float2'}}
+ ivec4 = (int4)ptr; // expected-error {{invalid conversion between vector type 'int4' (vector of 4 'int' values) and scalar type 'int *'}}
- ish8 += 5; // expected-error {{can't convert between vector values of different size ('short8' and 'int')}}
- ish8 += (short)5;
+ vec4 = (float4)vec2; // expected-error {{invalid conversion between ext-vector type 'float4' (vector of 4 'float' values) and 'float2' (vector of 2 'float' values)}}
+
+ ish8 += 5;
ivec4 *= 5;
vec4 /= 5.2f;
- vec4 %= 4; // expected-error {{invalid operands to binary expression ('float4' and 'int')}}
+ vec4 %= 4; // expected-error {{invalid operands to binary expression ('float4' (vector of 4 'float' values) and 'int')}}
ivec4 %= 4;
- ivec4 += vec4; // expected-error {{can't convert between vector values of different size ('int4' and 'float4')}}
+ ivec4 += vec4; // expected-error {{can't convert between vector values of different size ('int4' (vector of 4 'int' values) and 'float4' (vector of 4 'float' values))}}
ivec4 += (int4)vec4;
ivec4 -= ivec4;
ivec4 |= ivec4;
- ivec4 += ptr; // expected-error {{can't convert between vector values of different size ('int4' and 'int *')}}
+ ivec4 += ptr; // expected-error {{can't convert between vector and non-scalar values ('int4' (vector of 4 'int' values) and 'int *')}}
}
-typedef __attribute__(( ext_vector_type(2) )) float2 vecfloat2; // expected-error{{invalid vector element type 'float2'}}
+typedef __attribute__(( ext_vector_type(2) )) float2 vecfloat2; // expected-error{{invalid vector element type 'float2' (vector of 2 'float' values)}}
void inc(float2 f2) {
- f2++; // expected-error{{cannot increment value of type 'float2'}}
- __real f2; // expected-error{{invalid type 'float2' to __real operator}}
+ f2++; // expected-error{{cannot increment value of type 'float2' (vector of 2 'float' values)}}
+ __real f2; // expected-error{{invalid type 'float2' (vector of 2 'float' values) to __real operator}}
}
typedef enum
@@ -74,3 +78,47 @@ stride4 RDar15091442_get_stride4(int4 x, PixelByteStride pixelByteStride)
return stride;
}
+// rdar://16196902
+typedef __attribute__((ext_vector_type(4))) float float32x4_t;
+
+typedef float C3DVector3 __attribute__((ext_vector_type(3)));
+
+extern float32x4_t vabsq_f32(float32x4_t __a);
+
+C3DVector3 Func(const C3DVector3 a) {
+ return (C3DVector3)vabsq_f32((float32x4_t)a); // expected-error {{invalid conversion between ext-vector type 'float32x4_t' (vector of 4 'float' values) and 'C3DVector3' (vector of 3 'float' values)}}
+}
+
+// rdar://16350802
+typedef double double2 __attribute__ ((ext_vector_type(2)));
+
+static void splats(int i, long l, __uint128_t t, float f, double d) {
+ short8 vs = 0;
+ int4 vi = i;
+ ulong2 vl = (unsigned long)l;
+ float2 vf = f;
+ double2 vd = d;
+
+ vs = 65536 + vs; // expected-warning {{implicit conversion from 'int' to 'short8' (vector of 8 'short' values) changes value from 65536 to 0}}
+ vs = vs + i; // expected-warning {{implicit conversion loses integer precision}}
+ vs = vs + 1;
+ vs = vs + 1.f; // expected-error {{can't convert between vector values of different size}}
+
+ vi = l + vi; // expected-warning {{implicit conversion loses integer precision}}
+ vi = 1 + vi;
+ vi = vi + 2.0; // expected-error {{can't convert between vector values of different size}}
+ vi = vi + 0xffffffff; // expected-warning {{implicit conversion changes signedness}}
+
+ vl = l + vl; // expected-warning {{implicit conversion changes signedness}}
+ vl = vl + t; // expected-warning {{implicit conversion loses integer precision}}
+
+ vf = 1 + vf;
+ vf = l + vf;
+ vf = 2.0 + vf;
+ vf = d + vf; // expected-warning {{implicit conversion loses floating-point precision}}
+ vf = vf + 0xffffffff;
+ vf = vf + 2.1; // expected-warning {{implicit conversion loses floating-point precision}}
+
+ vd = l + vd;
+ vd = vd + t;
+}
diff --git a/test/Sema/fn-ptr-as-fn-prototype.c b/test/Sema/fn-ptr-as-fn-prototype.c
index cf95c9774681..4b01b1316e10 100644
--- a/test/Sema/fn-ptr-as-fn-prototype.c
+++ b/test/Sema/fn-ptr-as-fn-prototype.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1_only -ast-print %s | FileCheck %s
+// RUN: %clang_cc1 -ast-print %s | FileCheck %s
// This testcase checks the functionality of
// Sema::ActOn{Start,End}FunctionDeclarator, specifically checking that
diff --git a/test/Sema/format-strings-c90.c b/test/Sema/format-strings-c90.c
index 66ca5073475c..874d33eba443 100644
--- a/test/Sema/format-strings-c90.c
+++ b/test/Sema/format-strings-c90.c
@@ -1,4 +1,4 @@
-/* RUN: %clang_cc1 -fsyntax-only -verify -triple i386-apple-darwin9 -pedantic -std=c89 %s
+/* RUN: %clang_cc1 -fsyntax-only -verify -triple i386-apple-darwin9 -Wformat-non-iso -std=c89 %s
*/
int scanf(const char * restrict, ...);
diff --git a/test/Sema/format-strings-darwin.c b/test/Sema/format-strings-darwin.c
index 5daf3e5c8b67..46e717eb9d78 100644
--- a/test/Sema/format-strings-darwin.c
+++ b/test/Sema/format-strings-darwin.c
@@ -1,11 +1,11 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -triple i386-apple-darwin9 -pedantic -DALLOWED %s
-// RUN: %clang_cc1 -fsyntax-only -verify -triple thumbv6-apple-ios4.0 -pedantic -DALLOWED %s
+// RUN: %clang_cc1 -fsyntax-only -verify -triple i386-apple-darwin9 -Wformat-non-iso -DALLOWED %s
+// RUN: %clang_cc1 -fsyntax-only -verify -triple thumbv6-apple-ios4.0 -Wformat-non-iso -DALLOWED %s
-// RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-mingw32 -pedantic %s
-// RUN: %clang_cc1 -fsyntax-only -verify -triple i686-pc-win32 -pedantic %s
+// RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-mingw32 -Wformat-non-iso %s
+// RUN: %clang_cc1 -fsyntax-only -verify -triple i686-pc-win32 -Wformat-non-iso %s
-// RUN: %clang_cc1 -fsyntax-only -verify -triple i686-linux-gnu -pedantic %s
-// RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-unknown-freebsd -pedantic %s
+// RUN: %clang_cc1 -fsyntax-only -verify -triple i686-linux-gnu -Wformat-non-iso %s
+// RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-unknown-freebsd -Wformat-non-iso %s
int printf(const char *restrict, ...);
int scanf(const char * restrict, ...) ;
diff --git a/test/Sema/format-strings-enum-fixed-type.cpp b/test/Sema/format-strings-enum-fixed-type.cpp
index 8b6b23764520..0022ccbc66ba 100644
--- a/test/Sema/format-strings-enum-fixed-type.cpp
+++ b/test/Sema/format-strings-enum-fixed-type.cpp
@@ -16,7 +16,7 @@ typedef enum : short { Constant = 0 } TestEnum;
// This is why we don't check for that in the expected output.
void test(TestEnum input) {
- printf("%hhd", input); // expected-warning{{format specifies type 'char' but the argument has type 'TestEnum'}}
+ printf("%hhd", input); // expected-warning{{format specifies type 'char' but the argument has underlying type 'short'}}
printf("%hhd", Constant); // expected-warning{{format specifies type 'char'}}
printf("%hd", input); // no-warning
@@ -26,7 +26,7 @@ void test(TestEnum input) {
printf("%d", input); // no-warning
printf("%d", Constant); // no-warning
- printf("%lld", input); // expected-warning{{format specifies type 'long long' but the argument has type 'TestEnum'}}
+ printf("%lld", input); // expected-warning{{format specifies type 'long long' but the argument has underlying type 'short'}}
printf("%lld", Constant); // expected-warning{{format specifies type 'long long'}}
}
@@ -34,7 +34,7 @@ void test(TestEnum input) {
typedef enum : unsigned long { LongConstant = ~0UL } LongEnum;
void testLong(LongEnum input) {
- printf("%u", input); // expected-warning{{format specifies type 'unsigned int' but the argument has type 'LongEnum'}}
+ printf("%u", input); // expected-warning{{format specifies type 'unsigned int' but the argument has underlying type 'unsigned long'}}
printf("%u", LongConstant); // expected-warning{{format specifies type 'unsigned int'}}
printf("%lu", input);
@@ -46,7 +46,7 @@ typedef short short_t;
typedef enum : short_t { ShortConstant = 0 } ShortEnum;
void testUnderlyingTypedef(ShortEnum input) {
- printf("%hhd", input); // expected-warning{{format specifies type 'char' but the argument has type 'ShortEnum'}}
+ printf("%hhd", input); // expected-warning{{format specifies type 'char' but the argument has underlying type 'short_t' (aka 'short')}}
printf("%hhd", ShortConstant); // expected-warning{{format specifies type 'char'}}
printf("%hd", input); // no-warning
@@ -56,7 +56,7 @@ void testUnderlyingTypedef(ShortEnum input) {
printf("%d", input); // no-warning
printf("%d", ShortConstant); // no-warning
- printf("%lld", input); // expected-warning{{format specifies type 'long long' but the argument has type 'ShortEnum'}}
+ printf("%lld", input); // expected-warning{{format specifies type 'long long' but the argument has underlying type 'short_t' (aka 'short')}}
printf("%lld", ShortConstant); // expected-warning{{format specifies type 'long long'}}
}
@@ -64,10 +64,10 @@ void testUnderlyingTypedef(ShortEnum input) {
typedef ShortEnum ShortEnum2;
void testTypedefChain(ShortEnum2 input) {
- printf("%hhd", input); // expected-warning{{format specifies type 'char' but the argument has type 'ShortEnum2' (aka 'ShortEnum')}}
+ printf("%hhd", input); // expected-warning{{format specifies type 'char' but the argument has underlying type 'short_t' (aka 'short')}}
printf("%hd", input); // no-warning
printf("%d", input); // no-warning
- printf("%lld", input); // expected-warning{{format specifies type 'long long' but the argument has type 'ShortEnum2' (aka 'ShortEnum')}}
+ printf("%lld", input); // expected-warning{{format specifies type 'long long' but the argument has underlying type 'short_t' (aka 'short')}}
}
@@ -80,13 +80,13 @@ void testChar(CharEnum input) {
printf("%hhd", CharConstant); // no-warning
// This is not correct but it is safe. We warn because '%hd' shows intent.
- printf("%hd", input); // expected-warning{{format specifies type 'short' but the argument has type 'CharEnum'}}
+ printf("%hd", input); // expected-warning{{format specifies type 'short' but the argument has underlying type 'char'}}
printf("%hd", CharConstant); // expected-warning{{format specifies type 'short'}}
// This is not correct but it matches the promotion rules (and is safe).
printf("%d", input); // no-warning
printf("%d", CharConstant); // no-warning
- printf("%lld", input); // expected-warning{{format specifies type 'long long' but the argument has type 'CharEnum'}}
+ printf("%lld", input); // expected-warning{{format specifies type 'long long' but the argument has underlying type 'char'}}
printf("%lld", CharConstant); // expected-warning{{format specifies type 'long long'}}
}
diff --git a/test/Sema/format-strings-enum.c b/test/Sema/format-strings-enum.c
index a6c27d0b6eb3..e79f8598ab47 100644
--- a/test/Sema/format-strings-enum.c
+++ b/test/Sema/format-strings-enum.c
@@ -20,7 +20,7 @@ void test(TestEnum input) {
printf("%d", input); // no-warning
printf("%d", Constant); // no-warning
- printf("%lld", input); // expected-warning{{format specifies type 'long long' but the argument has type 'TestEnum'}}
+ printf("%lld", input); // expected-warning-re{{format specifies type 'long long' but the argument has underlying type '{{(unsigned)?}} int'}}
printf("%lld", Constant); // expected-warning{{format specifies type 'long long'}}
}
@@ -28,7 +28,7 @@ void test(TestEnum input) {
typedef enum { LongConstant = ~0UL } LongEnum;
void testLong(LongEnum input) {
- printf("%u", input); // expected-warning{{format specifies type 'unsigned int' but the argument has type 'LongEnum'}}
+ printf("%u", input); // expected-warning{{format specifies type 'unsigned int' but the argument has underlying type}}
printf("%u", LongConstant); // expected-warning{{format specifies type 'unsigned int'}}
printf("%lu", input);
diff --git a/test/Sema/format-strings-fixit.c b/test/Sema/format-strings-fixit.c
index 31274185cbc5..b982eb45e5f9 100644
--- a/test/Sema/format-strings-fixit.c
+++ b/test/Sema/format-strings-fixit.c
@@ -14,6 +14,7 @@ typedef __SIZE_TYPE__ size_t;
typedef __INTMAX_TYPE__ intmax_t;
typedef __UINTMAX_TYPE__ uintmax_t;
typedef __PTRDIFF_TYPE__ ptrdiff_t;
+typedef __WCHAR_TYPE__ wchar_t;
void test() {
// Basic types
@@ -97,11 +98,13 @@ void test() {
int scanf(char const *, ...);
-void test2() {
+void test2(int intSAParm[static 2]) {
char str[100];
+ char *vstr = "abc";
short shortVar;
unsigned short uShortVar;
int intVar;
+ int intAVar[2];
unsigned uIntVar;
float floatVar;
double doubleVar;
@@ -114,11 +117,20 @@ void test2() {
intmax_t intmaxVar;
uintmax_t uIntmaxVar;
ptrdiff_t ptrdiffVar;
+ enum {A, B, C} enumVar;
+ // Some string types.
scanf("%lf", str);
+ scanf("%lf", vstr);
+ scanf("%ls", str);
+ scanf("%ls", str);
+
+ // Some integer types.
scanf("%f", &shortVar);
scanf("%f", &uShortVar);
scanf("%p", &intVar);
+ scanf("%f", intAVar);
+ scanf("%f", intSAParm);
scanf("%Lf", &uIntVar);
scanf("%ld", &floatVar);
scanf("%f", &doubleVar);
@@ -127,6 +139,7 @@ void test2() {
scanf("%f", &uLongVar);
scanf("%f", &longLongVar);
scanf("%f", &uLongLongVar);
+ scanf("%d", &enumVar); // FIXME: We ought to fix specifiers for enums.
// Some named ints.
scanf("%f", &sizeVar);
@@ -206,10 +219,15 @@ void test2() {
// CHECK: printf("%La", (long double) 42);
// CHECK: printf("%LA", (long double) 42);
-// CHECK: scanf("%s", str);
+// CHECK: scanf("%99s", str);
+// CHECK: scanf("%s", vstr);
+// CHECK: scanf("%99s", str);
+// CHECK: scanf("%99s", str);
// CHECK: scanf("%hd", &shortVar);
// CHECK: scanf("%hu", &uShortVar);
// CHECK: scanf("%d", &intVar);
+// CHECK: scanf("%d", intAVar);
+// CHECK: scanf("%d", intSAParm);
// CHECK: scanf("%u", &uIntVar);
// CHECK: scanf("%f", &floatVar);
// CHECK: scanf("%lf", &doubleVar);
@@ -218,6 +236,7 @@ void test2() {
// CHECK: scanf("%lu", &uLongVar);
// CHECK: scanf("%lld", &longLongVar);
// CHECK: scanf("%llu", &uLongLongVar);
+// CHECK: scanf("%d", &enumVar);
// CHECK: scanf("%zu", &sizeVar);
// CHECK: scanf("%jd", &intmaxVar);
// CHECK: scanf("%ju", &uIntmaxVar);
diff --git a/test/Sema/format-strings-ms.c b/test/Sema/format-strings-ms.c
index b89ee421ced8..2ad8eae033d5 100644
--- a/test/Sema/format-strings-ms.c
+++ b/test/Sema/format-strings-ms.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -fms-compatibility -triple=i386-pc-win32 -pedantic %s
+// RUN: %clang_cc1 -fsyntax-only -verify -fms-compatibility -triple=i386-pc-win32 -Wformat-non-iso %s
int printf(const char *format, ...) __attribute__((format(printf, 1, 2)));
diff --git a/test/Sema/format-strings-non-iso.c b/test/Sema/format-strings-non-iso.c
index ee4594696138..429658c44093 100644
--- a/test/Sema/format-strings-non-iso.c
+++ b/test/Sema/format-strings-non-iso.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i686-linux-gnu -fsyntax-only -verify -std=c99 -pedantic %s
+// RUN: %clang_cc1 -triple i686-linux-gnu -fsyntax-only -verify -std=c99 -Wformat-non-iso %s
int printf(const char *restrict, ...);
int scanf(const char * restrict, ...);
diff --git a/test/Sema/format-strings-scanf.c b/test/Sema/format-strings-scanf.c
index d66bed5ffbd6..d3a03adf6195 100644
--- a/test/Sema/format-strings-scanf.c
+++ b/test/Sema/format-strings-scanf.c
@@ -86,6 +86,11 @@ void test_scanlist(int *ip, char *sp, wchar_t *ls) {
scanf("%h[abc]", sp); // expected-warning{{length modifier 'h' results in undefined behavior or no effect with '[' conversion specifier}}
scanf("%l[xyx]", ls); // no-warning
scanf("%ll[xyx]", ls); // expected-warning {{length modifier 'll' results in undefined behavior or no effect with '[' conversion specifier}}
+
+ // PR19559
+ scanf("%[]% ]", sp); // no-warning
+ scanf("%[^]% ]", sp); // no-warning
+ scanf("%[a^]% ]", sp); // expected-warning {{invalid conversion specifier ' '}}
}
void test_alloc_extension(char **sp, wchar_t **lsp, float *fp) {
@@ -107,9 +112,9 @@ void test_alloc_extension(char **sp, wchar_t **lsp, float *fp) {
// Test argument type check for the 'm' length modifier.
scanf("%ms", fp); // expected-warning{{format specifies type 'char **' but the argument has type 'float *'}}
- scanf("%mS", fp); // expected-warning-re{{format specifies type 'wchar_t \*\*' \(aka '[^']+'\) but the argument has type 'float \*'}}
+ scanf("%mS", fp); // expected-warning-re{{format specifies type 'wchar_t **' (aka '{{[^']+}}') but the argument has type 'float *'}}
scanf("%mc", fp); // expected-warning{{format specifies type 'char **' but the argument has type 'float *'}}
- scanf("%mC", fp); // expected-warning-re{{format specifies type 'wchar_t \*\*' \(aka '[^']+'\) but the argument has type 'float \*'}}
+ scanf("%mC", fp); // expected-warning-re{{format specifies type 'wchar_t **' (aka '{{[^']+}}') but the argument has type 'float *'}}
scanf("%m[abc]", fp); // expected-warning{{format specifies type 'char **' but the argument has type 'float *'}}
}
diff --git a/test/Sema/format-strings.c b/test/Sema/format-strings.c
index 6da027e02c65..e31644a98756 100644
--- a/test/Sema/format-strings.c
+++ b/test/Sema/format-strings.c
@@ -1,8 +1,9 @@
// RUN: %clang_cc1 -fsyntax-only -verify -Wformat-nonliteral -isystem %S/Inputs %s
// RUN: %clang_cc1 -fsyntax-only -verify -Wformat-nonliteral -isystem %S/Inputs -fno-signed-char %s
-#define __need_wint_t
#include <stdarg.h>
+#include <stddef.h>
+#define __need_wint_t
#include <stddef.h> // For wint_t and wchar_t
typedef struct _FILE FILE;
@@ -535,6 +536,21 @@ void pr9751() {
0.0); // expected-warning{{format specifies}}
}
+void pr18905() {
+ const char s1[] = "s\0%s"; // expected-note{{format string is defined here}}
+ const char s2[1] = "s"; // expected-note{{format string is defined here}}
+ const char s3[2] = "s\0%s"; // expected-warning{{initializer-string for char array is too long}}
+ const char s4[10] = "s";
+ const char s5[0] = "%s"; // expected-warning{{initializer-string for char array is too long}}
+ // expected-note@-1{{format string is defined here}}
+
+ printf(s1); // expected-warning{{format string contains '\0' within the string body}}
+ printf(s2); // expected-warning{{format string is not null-terminated}}
+ printf(s3); // no-warning
+ printf(s4); // no-warning
+ printf(s5); // expected-warning{{format string is not null-terminated}}
+}
+
void __attribute__((format(strfmon,1,2))) monformat(const char *fmt, ...);
void __attribute__((format(strftime,1,0))) dateformat(const char *fmt);
@@ -544,7 +560,7 @@ void test_other_formats() {
monformat("", 1); // expected-warning{{format string is empty}}
monformat(str); // expected-warning{{format string is not a string literal (potentially insecure)}}
dateformat(""); // expected-warning{{format string is empty}}
- dateformat(str); // no-warning (using strftime non literal is not unsafe)
+ dateformat(str); // no-warning (using strftime non-literal is not unsafe)
}
// Do not warn about unused arguments coming from system headers.
diff --git a/test/Sema/i-c-e.c b/test/Sema/i-c-e.c
index 7749b6c1a0f0..c6025f978e35 100644
--- a/test/Sema/i-c-e.c
+++ b/test/Sema/i-c-e.c
@@ -1,4 +1,4 @@
-// RUN: %clang %s -ffreestanding -Wno-int-to-pointer-cast -fsyntax-only -Xclang -verify -pedantic -fpascal-strings -std=c99
+// RUN: %clang_cc1 %s -ffreestanding -Wno-int-to-pointer-cast -fsyntax-only -verify -pedantic -fpascal-strings -std=c99
#include <stdint.h>
#include <limits.h>
diff --git a/test/Sema/implicit-builtin-decl.c b/test/Sema/implicit-builtin-decl.c
index d7ec16953a09..3c2ff94984c0 100644
--- a/test/Sema/implicit-builtin-decl.c
+++ b/test/Sema/implicit-builtin-decl.c
@@ -1,7 +1,9 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: not %clang_cc1 -fsyntax-only -ast-dump %s | FileCheck %s
+
void f() {
int *ptr = malloc(sizeof(int) * 10); // expected-warning{{implicitly declaring library function 'malloc' with type}} \
- // expected-note{{please include the header <stdlib.h> or explicitly provide a declaration for 'malloc'}} \
+ // expected-note{{include the header <stdlib.h> or explicitly provide a declaration for 'malloc'}} \
// expected-note{{'malloc' is a builtin with type 'void *}}
}
@@ -57,3 +59,10 @@ void snprintf() { }
void longjmp(); // expected-warning{{declaration of built-in function 'longjmp' requires inclusion of the header <setjmp.h>}}
extern float fmaxf(float, float);
+
+struct __jmp_buf_tag {};
+void sigsetjmp(struct __jmp_buf_tag[1], int); // expected-warning{{declaration of built-in function 'sigsetjmp' requires inclusion of the header <setjmp.h>}}
+
+// CHECK: FunctionDecl {{.*}} <line:[[@LINE-2]]:1, col:44> col:6 sigsetjmp '
+// CHECK-NOT: FunctionDecl
+// CHECK: ReturnsTwiceAttr {{.*}} <{{.*}}> Implicit
diff --git a/test/Sema/implicit-cast-dump.c b/test/Sema/implicit-cast-dump.c
index 87f15d0cf6f4..4cd855fb1d46 100644
--- a/test/Sema/implicit-cast-dump.c
+++ b/test/Sema/implicit-cast-dump.c
@@ -5,7 +5,7 @@ void foo2(void* const);
void bar() {
- // CHECK: FunctionDecl {{.*}} <line:{{.*}}, line:{{.*}}> bar 'void ()'
+ // CHECK: FunctionDecl {{.*}} <line:{{.*}}, line:{{.*}}> line:{{.*}} bar 'void ()'
foo1(0);
// CHECK: ImplicitCastExpr {{.*}} <col:{{.*}}> 'void *' <NullToPointer>
diff --git a/test/Sema/inline-asm-validate.c b/test/Sema/inline-asm-validate.c
new file mode 100644
index 000000000000..c32dedb65e8c
--- /dev/null
+++ b/test/Sema/inline-asm-validate.c
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -triple arm64-apple-macosx10.8.0 -fsyntax-only -verify %s
+// expected-no-diagnostics
+
+unsigned t, r, *p;
+
+int foo (void) {
+ __asm__ __volatile__( "stxr %w[_t], %[_r], [%[_p]]" : [_t] "=&r" (t) : [_p] "p" (p), [_r] "r" (r) : "memory");
+ return 1;
+}
diff --git a/test/Sema/invalid-decl.c b/test/Sema/invalid-decl.c
index 950d51deb4ce..f0954b01b98b 100644
--- a/test/Sema/invalid-decl.c
+++ b/test/Sema/invalid-decl.c
@@ -46,3 +46,5 @@ void test2() { }
void test3();
void test3; // expected-error {{incomplete type}}
void test3() { }
+
+void ellipsis1(...); // expected-error {{ISO C requires a named parameter before '...'}}
diff --git a/test/Sema/lit.local.cfg b/test/Sema/lit.local.cfg
new file mode 100644
index 000000000000..f4ef5d2fa02d
--- /dev/null
+++ b/test/Sema/lit.local.cfg
@@ -0,0 +1,4 @@
+config.substitutions = list(config.substitutions)
+config.substitutions.insert(0,
+ (r'%clang\b',
+ """*** Do not use the driver in Sema tests. ***""") )
diff --git a/test/Sema/loop-control.c b/test/Sema/loop-control.c
new file mode 100644
index 000000000000..6c33e8437bd0
--- /dev/null
+++ b/test/Sema/loop-control.c
@@ -0,0 +1,121 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -x c++ -Werror %s
+
+int pr8880_1() {
+ int first = 1;
+ for ( ; ({ if (first) { first = 0; continue; } 0; }); )
+ return 0;
+ return 1;
+}
+
+void pr8880_2(int first) {
+ for ( ; ({ if (first) { first = 0; break; } 0; }); ) {}
+}
+
+void pr8880_3(int first) {
+ for ( ; ; (void)({ if (first) { first = 0; continue; } 0; })) {}
+}
+
+void pr8880_4(int first) {
+ for ( ; ; (void)({ if (first) { first = 0; break; } 0; })) {}
+}
+
+void pr8880_5 (int first) {
+ while(({ if (first) { first = 0; continue; } 0; })) {}
+}
+
+void pr8880_6 (int first) {
+ while(({ if (first) { first = 0; break; } 0; })) {}
+}
+
+void pr8880_7 (int first) {
+ do {} while(({ if (first) { first = 0; continue; } 0; }));
+}
+
+void pr8880_8 (int first) {
+ do {} while(({ if (first) { first = 0; break; } 0; }));
+}
+
+void pr8880_10(int i) {
+ for ( ; i != 10 ; i++ )
+ for ( ; ; (void)({ ++i; continue; i;})) {} // expected-warning{{'continue' is bound to current loop, GCC binds it to the enclosing loop}}
+}
+
+void pr8880_11(int i) {
+ for ( ; i != 10 ; i++ )
+ for ( ; ; (void)({ ++i; break; i;})) {} // expected-warning{{'break' is bound to current loop, GCC binds it to the enclosing loop}}
+}
+
+void pr8880_12(int i, int j) {
+ for ( ; i != 10 ; i++ )
+ for ( ; ({if (i) continue; i;}); j++) {} // expected-warning {{'continue' is bound to current loop, GCC binds it to the enclosing loop}}
+}
+
+void pr8880_13(int i, int j) {
+ for ( ; i != 10 ; i++ )
+ for ( ; ({if (i) break; i;}); j++) {} // expected-warning{{'break' is bound to current loop, GCC binds it to the enclosing loop}}
+}
+
+void pr8880_14(int i) {
+ for ( ; i != 10 ; i++ )
+ while(({if (i) break; i;})) {} // expected-warning {{'break' is bound to current loop, GCC binds it to the enclosing loop}}
+}
+
+void pr8880_15(int i) {
+ while (--i)
+ while(({if (i) continue; i;})) {} // expected-warning {{'continue' is bound to current loop, GCC binds it to the enclosing loop}}
+}
+
+void pr8880_16(int i) {
+ for ( ; i != 10 ; i++ )
+ do {} while(({if (i) break; i;})); // expected-warning {{'break' is bound to current loop, GCC binds it to the enclosing loop}}
+}
+
+void pr8880_17(int i) {
+ for ( ; i != 10 ; i++ )
+ do {} while(({if (i) continue; i;})); // expected-warning {{'continue' is bound to current loop, GCC binds it to the enclosing loop}}
+}
+
+void pr8880_18(int x, int y) {
+ while(x > 0)
+ switch(({if(y) break; y;})) {
+ case 2: x = 0;
+ }
+}
+
+void pr8880_19(int x, int y) {
+ switch(x) {
+ case 1:
+ switch(({if(y) break; y;})) {
+ case 2: x = 0;
+ }
+ }
+}
+
+void pr8880_20(int x, int y) {
+ switch(x) {
+ case 1:
+ while(({if (y) break; y;})) {} //expected-warning {{'break' is bound to loop, GCC binds it to switch}}
+ }
+}
+
+void pr8880_21(int x, int y) {
+ switch(x) {
+ case 1:
+ do {} while(({if (y) break; y;})); //expected-warning {{'break' is bound to loop, GCC binds it to switch}}
+ }
+}
+
+void pr8880_22(int x, int y) {
+ switch(x) {
+ case 1:
+ for ( ; ; (void)({ ++y; break; y;})) {} // expected-warning{{'break' is bound to loop, GCC binds it to switc}}
+ }
+}
+
+void pr8880_23(int x, int y) {
+ switch(x) {
+ case 1:
+ for ( ; ({ ++y; break; y;}); ++y) {} // expected-warning{{'break' is bound to loop, GCC binds it to switch}}
+ }
+}
diff --git a/test/Sema/ms-inline-asm.c b/test/Sema/ms-inline-asm.c
index 69f234e5e9ae..66504aa08417 100644
--- a/test/Sema/ms-inline-asm.c
+++ b/test/Sema/ms-inline-asm.c
@@ -1,4 +1,4 @@
-// REQUIRES: x86-64-registered-target
+// REQUIRES: x86-registered-target
// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -fasm-blocks -Wno-microsoft -verify -fsyntax-only
void t1(void) {
@@ -32,3 +32,70 @@ void f() {
mov eax, TYPE bar // expected-error {{unable to lookup expression}}
}
}
+
+void rdar15318432(void) {
+ // We used to crash on this. When LLVM called back to Clang to parse a name
+ // and do name lookup, if parsing failed, we did not restore the lexer state
+ // properly.
+
+ __asm {
+ and ecx, ~15
+ }
+
+ int x = 0;
+ __asm {
+ and ecx, x
+ and ecx, ~15
+ }
+}
+
+static int global;
+
+int t2(int *arr, int i) {
+ __asm {
+ mov eax, arr;
+ mov eax, arr[0];
+ mov eax, arr[1 + 2];
+ mov eax, arr[1 + (2 * 5) - 3 + 1<<1];
+ }
+
+ // expected-error@+1 {{cannot use base register with variable reference}}
+ __asm mov eax, arr[ebp + 1 + (2 * 5) - 3 + 1<<1]
+ // expected-error@+1 {{cannot use index register with variable reference}}
+ __asm mov eax, arr[esi * 4]
+ // expected-error@+1 {{cannot use more than one symbol in memory operand}}
+ __asm mov eax, arr[i]
+ // expected-error@+1 {{cannot use more than one symbol in memory operand}}
+ __asm mov eax, global[i]
+
+ // FIXME: Why don't we diagnose this?
+ // expected-Xerror@+1 {{cannot reference multiple local variables in assembly operand}}
+ //__asm mov eax, [arr + i];
+ return 0;
+}
+
+typedef struct {
+ int a;
+ int b;
+} A;
+
+void t3() {
+ __asm mov eax, [eax] UndeclaredId // expected-error {{unknown token in expression}}
+
+ // FIXME: Only emit one diagnostic here.
+ // expected-error@+2 {{unexpected type name 'A': expected expression}}
+ // expected-error@+1 {{unknown token in expression}}
+ __asm mov eax, [eax] A
+}
+
+void t4() {
+ // The dot in the "intel dot operator" is optional in MSVC. MSVC also does
+ // global field lookup, but we don't.
+ __asm mov eax, [0] A.a
+ __asm mov eax, [0].A.a
+ __asm mov eax, [0].a // expected-error {{Unable to lookup field reference!}}
+ __asm mov eax, fs:[0] A.a
+ __asm mov eax, fs:[0].A.a
+ __asm mov eax, fs:[0].a // expected-error {{Unable to lookup field reference!}}
+ __asm mov eax, fs:[0]. A.a // expected-error {{Unexpected token type!}}
+}
diff --git a/test/Sema/ms-wchar.c b/test/Sema/ms-wchar.c
index febaf283b338..ead3d974d34f 100644
--- a/test/Sema/ms-wchar.c
+++ b/test/Sema/ms-wchar.c
@@ -12,7 +12,7 @@ __wchar_t g = L'a'; // expected-note {{previous}}
unsigned short g; // expected-error {{redefinition of 'g' with a different type: 'unsigned short' vs '__wchar_t'}}
// The type of a wide string literal is actually not __wchar_t.
-__wchar_t s[] = L"Hello world!"; // expected-error-re {{array initializer must be an initializer list$}}
+__wchar_t s[] = L"Hello world!"; // expected-error-re {{array initializer must be an initializer list{{$}}}}
// Do not suggest initializing with a string here, because it would not work.
-__wchar_t t[] = 1; // expected-error-re {{array initializer must be an initializer list$}}
+__wchar_t t[] = 1; // expected-error-re {{array initializer must be an initializer list{{$}}}}
diff --git a/test/Sema/ms_bitfield_layout.c b/test/Sema/ms_bitfield_layout.c
index 4a2076c1dbac..8444f469d59d 100644
--- a/test/Sema/ms_bitfield_layout.c
+++ b/test/Sema/ms_bitfield_layout.c
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -cxx-abi microsoft -fdump-record-layouts %s 2>/dev/null \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple i686-pc-win32 -fms-extensions -fdump-record-layouts %s 2>/dev/null \
// RUN: | FileCheck %s
-// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -cxx-abi microsoft -fdump-record-layouts %s 2>/dev/null \
+// RUN: %clang_cc1 -fno-rtti -emit-llvm-only -triple x86_64-pc-win32 -fms-extensions -fdump-record-layouts %s 2>/dev/null \
// RUN: | FileCheck %s
typedef struct A {
@@ -111,6 +111,16 @@ typedef struct H {
// CHECK: Alignment:16
// CHECK: FieldOffsets: [0, 16, 16, 16]>
+typedef struct I {
+ short : 8;
+ __declspec(align(16)) short : 8;
+} I;
+
+// CHECK: Type: struct I
+// CHECK: Size:16
+// CHECK: Alignment:16
+// CHECK: FieldOffsets: [0, 8]
+
#pragma pack(push, 1)
typedef struct A1 {
@@ -221,6 +231,16 @@ typedef struct H1 {
// CHECK: Alignment:8
// CHECK: FieldOffsets: [0, 32, 32, 32]>
+typedef struct I1 {
+ short : 8;
+ __declspec(align(16)) short : 8;
+} I1;
+
+// CHECK: Type: struct I1
+// CHECK: Size:16
+// CHECK: Alignment:8
+// CHECK: FieldOffsets: [0, 8]
+
#pragma pack(pop)
int x[
@@ -232,6 +252,7 @@ sizeof(E ) +
sizeof(F ) +
sizeof(G ) +
sizeof(H ) +
+sizeof(I ) +
sizeof(A1) +
sizeof(B1) +
sizeof(C1) +
@@ -240,4 +261,5 @@ sizeof(E1) +
sizeof(F1) +
sizeof(G1) +
sizeof(H1) +
+sizeof(I1) +
0];
diff --git a/test/Sema/ms_class_layout.cpp b/test/Sema/ms_class_layout.cpp
index bb8052e12ec3..896d3edfda38 100644
--- a/test/Sema/ms_class_layout.cpp
+++ b/test/Sema/ms_class_layout.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts -cxx-abi microsoft %s 2>&1 \
+// RUN: %clang_cc1 -emit-llvm-only -triple i686-pc-win32 -fdump-record-layouts %s 2>/dev/null \
// RUN: | FileCheck %s
#pragma pack(push, 8)
@@ -289,7 +289,7 @@ int main() {
// CHECK-NEXT: 8 | (D vftable pointer)
// CHECK-NEXT: 16 | double a
// CHECK-NEXT: sizeof=24, align=8
-// CHECK-NEXT: nvsize=8, nvalign=4
+// CHECK-NEXT: nvsize=8, nvalign=8
// CHECK: %struct.H = type { %struct.G, i32*, %class.D }
@@ -354,7 +354,7 @@ int main() {
// CHECK-NEXT: | [sizeof=40, align=8
// CHECK-NEXT: | nvsize=24, nvalign=8]
-// CHECK: struct.O = type { i32 (...)**, [4 x i8], %struct.H.base, %struct.G, [4 x i8], %class.D }
+// CHECK: struct.O = type { i32 (...)**, [4 x i8], %struct.H.base, %struct.G, %class.D }
// CHECK: struct.O.base = type { i32 (...)**, [4 x i8], %struct.H.base, %struct.G, [4 x i8] }
@@ -428,10 +428,10 @@ int main() {
// CHECK-NEXT: nvsize=12, nvalign=4
// CHECK: %struct.f = type { i32 (...)** }
-// CHECK: %struct.s = type { i32 (...)**, i32*, i32, [4 x i8], %struct.f }
+// CHECK: %struct.s = type { i32 (...)**, i32*, i32, i32, %struct.f }
// CHECK: %class.IA = type { i32 (...)** }
-// CHECK: %class.ICh = type { i32 (...)**, i32*, [4 x i8], %class.IA }
-// CHECK: %struct.sd = type { i32*, i32, i8, [7 x i8], %struct.f, %struct.s.base, [4 x i8], %class.IA, %class.ICh.base }
+// CHECK: %class.ICh = type { i32 (...)**, i32*, i32, %class.IA }
+// CHECK: %struct.sd = type { i32*, i32, i8, i32, %struct.f, %struct.s.base, i32, %class.IA, %class.ICh.base }
// CHECK: 0 | struct AV
// CHECK-NEXT: 0 | (AV vftable pointer)
@@ -457,7 +457,7 @@ int main() {
// CHECK: %struct.AV = type { i32 (...)** }
// CHECK: %struct.BV = type { %struct.AV }
-// CHECK: %struct.CV = type { i32*, [4 x i8], %struct.BV }
+// CHECK: %struct.CV = type { i32*, i32, %struct.BV }
// CHECK: %struct.CV.base = type { i32* }
// CHECK: 0 | struct DV
@@ -470,12 +470,12 @@ int main() {
// CHECK: %struct.DV = type { %struct.BV }
// CHECK: 0 | struct EV
-// CHECK-NEXT: 4 | struct CV (base)
-// CHECK-NEXT: 4 | (CV vbtable pointer)
// CHECK-NEXT: 0 | struct DV (primary base)
// CHECK-NEXT: 0 | struct BV (primary base)
// CHECK-NEXT: 0 | struct AV (primary base)
// CHECK-NEXT: 0 | (AV vftable pointer)
+// CHECK-NEXT: 4 | struct CV (base)
+// CHECK-NEXT: 4 | (CV vbtable pointer)
// CHECK-NEXT: 8 | (vtordisp for vbase BV)
// CHECK-NEXT: 12 | struct BV (virtual base)
// CHECK-NEXT: 12 | struct AV (primary base)
@@ -483,7 +483,7 @@ int main() {
// CHECK-NEXT: sizeof=16, align=4
// CHECK-NEXT: nvsize=8, nvalign=4
-// CHECK: %struct.EV = type { %struct.DV, %struct.CV.base, [4 x i8], %struct.BV }
+// CHECK: %struct.EV = type { %struct.DV, %struct.CV.base, i32, %struct.BV }
// CHECK: %struct.EV.base = type { %struct.DV, %struct.CV.base }
// Overriding a method means that all the vbases containing that
diff --git a/test/Sema/neon-vector-types.c b/test/Sema/neon-vector-types.c
index d8dd41225a32..03f669eb8416 100644
--- a/test/Sema/neon-vector-types.c
+++ b/test/Sema/neon-vector-types.c
@@ -4,7 +4,7 @@
typedef float float32_t;
typedef signed char poly8_t;
typedef short poly16_t;
-typedef unsigned long long uint64_t;
+typedef unsigned __INT64_TYPE__ uint64_t;
// Define some valid Neon types.
typedef __attribute__((neon_vector_type(2))) int int32x2_t;
@@ -23,7 +23,6 @@ typedef __attribute__((neon_vector_type(2, 4))) int only_one_arg; // expected-er
typedef __attribute__((neon_vector_type(2.0))) int non_int_width; // expected-error{{'neon_vector_type' attribute requires an integer constant}}
// Only certain element types are allowed.
-typedef __attribute__((neon_vector_type(2))) double double_elt; // expected-error{{invalid vector element type}}
typedef __attribute__((neon_vector_type(4))) void* ptr_elt; // expected-error{{invalid vector element type}}
typedef __attribute__((neon_polyvector_type(4))) float32_t bad_poly_elt; // expected-error{{invalid vector element type}}
struct aggr { signed char c; };
diff --git a/test/Sema/nonnull.c b/test/Sema/nonnull.c
index 4e6171160f64..b1f69208241b 100644
--- a/test/Sema/nonnull.c
+++ b/test/Sema/nonnull.c
@@ -20,3 +20,37 @@ int main(void) {
}
void foo(const char *str) __attribute__((nonnull("foo"))); // expected-error{{'nonnull' attribute requires parameter 1 to be an integer constant}}
+void bar(int i) __attribute__((nonnull(1))); // expected-warning {{'nonnull' attribute only applies to pointer arguments}} expected-warning {{'nonnull' attribute applied to function with no pointer arguments}}
+
+void baz(__attribute__((nonnull)) const char *str);
+void baz2(__attribute__((nonnull(1))) const char *str); // expected-warning {{'nonnull' attribute when used on parameters takes no arguments}}
+void baz3(__attribute__((nonnull)) int x); // expected-warning {{'nonnull' attribute only applies to pointer arguments}}
+
+void test_baz() {
+ baz(0); // expected-warning {{null passed to a callee which requires a non-null argument}}
+ baz2(0); // no-warning
+ baz3(0); // no-warning
+}
+
+void test_void_returns_nonnull(void) __attribute__((returns_nonnull)); // expected-warning {{'returns_nonnull' attribute only applies to return values that are pointers}}
+int test_int_returns_nonnull(void) __attribute__((returns_nonnull)); // expected-warning {{'returns_nonnull' attribute only applies to return values that are pointers}}
+void *test_ptr_returns_nonnull(void) __attribute__((returns_nonnull)); // no-warning
+
+int i __attribute__((nonnull)); // expected-warning {{'nonnull' attribute only applies to functions, methods, and parameters}}
+int j __attribute__((returns_nonnull)); // expected-warning {{'returns_nonnull' attribute only applies to functions and methods}}
+void *test_no_fn_proto() __attribute__((returns_nonnull)); // no-warning
+void *test_with_fn_proto(void) __attribute__((returns_nonnull)); // no-warning
+
+__attribute__((returns_nonnull))
+void *test_bad_returns_null(void) {
+ return 0; // expected-warning {{null returned from function that requires a non-null return value}}
+}
+
+void PR18795(int (*g)(const char *h, ...) __attribute__((nonnull(1))) __attribute__((nonnull))) {
+ g(0); // expected-warning{{null passed to a callee which requires a non-null argument}}
+}
+void PR18795_helper() {
+ PR18795(0); // expected-warning{{null passed to a callee which requires a non-null argument}}
+}
+
+
diff --git a/test/Sema/overloadable.c b/test/Sema/overloadable.c
index b93c39fc1a2d..bdd471477b47 100644
--- a/test/Sema/overloadable.c
+++ b/test/Sema/overloadable.c
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
-int var __attribute__((overloadable)); // expected-error{{'overloadable' attribute can only be applied to a function}}
+int var __attribute__((overloadable)); // expected-error{{'overloadable' attribute only applies to functions}}
void params(void) __attribute__((overloadable(12))); // expected-error {{'overloadable' attribute takes no arguments}}
int *f(int) __attribute__((overloadable)); // expected-note 2{{previous overload of function is here}}
diff --git a/test/Sema/pragma-ms_struct.c b/test/Sema/pragma-ms_struct.c
index 6533320e518d..e2c5ff1f481e 100644
--- a/test/Sema/pragma-ms_struct.c
+++ b/test/Sema/pragma-ms_struct.c
@@ -25,7 +25,7 @@ struct {
} __attribute__((__ms_struct__)) t1;
struct S {
- double __attribute__((ms_struct)) d; // expected-warning {{'ms_struct' attribute ignored}}
+ double __attribute__((ms_struct)) d; // expected-warning {{'ms_struct' attribute only applies to struct or union}}
unsigned long bf_1 : 12;
unsigned long : 0;
unsigned long bf_2 : 12;
@@ -36,7 +36,7 @@ enum
A = 0,
B,
C
-} __attribute__((ms_struct)) e1; // expected-warning {{'ms_struct' attribute ignored}}
+} __attribute__((ms_struct)) e1; // expected-warning {{'ms_struct' attribute only applies to struct or union}}
// rdar://10513599
#pragma ms_struct on
@@ -52,10 +52,12 @@ typedef struct
void *pv1;
Foo foo;
unsigned short fInited : 1;
-void *pv2;
-} PackOddity;
+void *pv2;
+} PackOddity;
#pragma ms_struct off
static int arr[sizeof(PackOddity) == 40 ? 1 : -1];
+struct __declspec(ms_struct) bad { // expected-warning {{__declspec attribute 'ms_struct' is not supported}}
+};
diff --git a/test/Sema/pragma-pack-apple.c b/test/Sema/pragma-pack-apple.c
index 5b33c03c38e7..426d984e8ae7 100644
--- a/test/Sema/pragma-pack-apple.c
+++ b/test/Sema/pragma-pack-apple.c
@@ -1,5 +1,5 @@
-// RUN: %clang -fsyntax-only %s 2>&1 | FileCheck %s
-// RUN: %clang -fsyntax-only -fapple-pragma-pack %s 2>&1 | FileCheck -check-prefix=CHECK-APPLE %s
+// RUN: %clang_cc1 -fsyntax-only %s 2>&1 | FileCheck %s
+// RUN: %clang_cc1 -fsyntax-only -fapple-pragma-pack %s 2>&1 | FileCheck -check-prefix=CHECK-APPLE %s
#pragma pack(push,1)
#pragma pack(2)
diff --git a/test/Sema/pragma-section.c b/test/Sema/pragma-section.c
new file mode 100644
index 000000000000..2906fabac1c9
--- /dev/null
+++ b/test/Sema/pragma-section.c
@@ -0,0 +1,44 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions %s -triple x86_64-pc-win32
+
+#pragma const_seg(".my_const") // expected-note 2 {{#pragma entered here}}
+extern const int a;
+const int a = 1; // expected-note 2 {{declared here}}
+#pragma data_seg(".my_const") // expected-note {{#pragma entered here}}
+int b = 1; // expected-error {{'b' causes a section type conflict with 'a'}}
+#pragma data_seg()
+int c = 1;
+__declspec(allocate(".my_const")) int d = 1; // expected-error {{'d' causes a section type conflict with 'a'}}
+#pragma data_seg("\u") // expected-error {{\u used with no following hex digits}}
+#pragma data_seg("a" L"b") // expected-warning {{expected non-wide string literal in '#pragma data_seg'}}
+
+#pragma section(".my_seg", execute) // expected-note 2 {{#pragma entered her}}
+__declspec(allocate(".my_seg")) int int_my_seg;
+#pragma code_seg(".my_seg")
+void fn_my_seg(void){}
+
+__declspec(allocate(".bad_seg")) int int_bad_seg = 1; // expected-note {{declared here}}
+#pragma code_seg(".bad_seg") // expected-note {{#pragma entered here}}
+void fn_bad_seg(void){} // expected-error {{'fn_bad_seg' causes a section type conflict with 'int_bad_seg'}}
+
+#pragma bss_seg // expected-warning {{missing '(' after '#pragma bss_seg' - ignoring}}
+#pragma bss_seg(L".my_seg") // expected-warning {{expected push, pop or a string literal for the section name in '#pragma bss_seg' - ignored}}
+#pragma bss_seg(1) // expected-warning {{expected push, pop or a string literal for the section name in '#pragma bss_seg' - ignored}}
+#pragma bss_seg(push)
+#pragma bss_seg(push, ".my_seg")
+#pragma bss_seg(push, 1) // expected-warning {{expected a stack label or a string literal for the section name in '#pragma bss_seg'}}
+#pragma bss_seg ".my_seg" // expected-warning {{missing '(' after '#pragma bss_seg' - ignoring}}
+#pragma bss_seg(push, my_label, 1) // expected-warning {{expected a string literal for the section name in '#pragma bss_seg' - ignored}}
+#pragma bss_seg(".my_seg", 1) // expected-warning {{missing ')' after '#pragma bss_seg' - ignoring}}
+#pragma bss_seg(".my_seg" // expected-warning {{missing ')' after '#pragma bss_seg' - ignoring}}
+
+#pragma section // expected-warning {{missing '(' after '#pragma section' - ignoring}}
+#pragma section( // expected-warning {{expected a string literal for the section name in '#pragma section' - ignored}}
+#pragma section(L".my_seg") // expected-warning {{expected a string literal for the section name in '#pragma section' - ignored}}
+#pragma section(".my_seg" // expected-warning {{missing ')' after '#pragma section' - ignoring}}
+#pragma section(".my_seg" 1 // expected-warning {{missing ')' after '#pragma section' - ignoring}}
+#pragma section(".my_seg", // expected-warning {{expected action or ')' in '#pragma section' - ignored}}
+#pragma section(".my_seg", read) // expected-error {{this causes a section type conflict with a prior #pragma section}}
+#pragma section(".my_seg", bogus) // expected-warning {{unknown action 'bogus' for '#pragma section' - ignored}}
+#pragma section(".my_seg", nopage) // expected-warning {{known but unsupported action 'nopage' for '#pragma section' - ignored}}
+#pragma section(".my_seg", read, write) // expected-error {{this causes a section type conflict with a prior #pragma section}}
+#pragma section(".my_seg", read, write, 1) // expected-warning {{expected action or ')' in '#pragma section' - ignored}}
diff --git a/test/Sema/private-extern.c b/test/Sema/private-extern.c
index e9b67d5070b5..0c13c92bba77 100644
--- a/test/Sema/private-extern.c
+++ b/test/Sema/private-extern.c
@@ -13,10 +13,10 @@ __private_extern__ int g2;
int g3; // expected-note{{previous definition}}
static int g3; // expected-error{{static declaration of 'g3' follows non-static declaration}}
-extern int g4; // expected-note{{previous definition}}
+extern int g4; // expected-note{{previous declaration}}
static int g4; // expected-error{{static declaration of 'g4' follows non-static declaration}}
-__private_extern__ int g5; // expected-note{{previous definition}}
+__private_extern__ int g5; // expected-note{{previous declaration}}
static int g5; // expected-error{{static declaration of 'g5' follows non-static declaration}}
void f0() {
@@ -30,12 +30,12 @@ void f1() {
}
void f2() {
- extern int g8; // expected-note{{previous definition}}
+ extern int g8; // expected-note{{previous declaration}}
int g8; // expected-error {{non-extern declaration of 'g8' follows extern declaration}}
}
void f3() {
- __private_extern__ int g9; // expected-note{{previous definition}}
+ __private_extern__ int g9; // expected-note{{previous declaration}}
int g9; // expected-error {{non-extern declaration of 'g9' follows extern declaration}}
}
diff --git a/test/Sema/return-noreturn.c b/test/Sema/return-noreturn.c
index 6d521eb017cb..2aa0b91115b8 100644
--- a/test/Sema/return-noreturn.c
+++ b/test/Sema/return-noreturn.c
@@ -2,7 +2,7 @@
int j;
void test1() { // expected-warning {{function 'test1' could be declared with attribute 'noreturn'}}
- ^ (void) { while (1) { } }(); // expected-warning {{block could be declared with attribute 'noreturn'}}
+ ^ (void) { while (1) { } }();
^ (void) { if (j) while (1) { } }();
while (1) { }
}
@@ -40,3 +40,13 @@ test4() {
_Noreturn void test5() {
test2_positive();
}
+
+// rdar://16274746
+void test6()
+{
+ (void)^{
+ for(;;)
+ ;
+ };
+}
+
diff --git a/test/Sema/return.c b/test/Sema/return.c
index 7e7c8b7b844e..2a58a6ef9e47 100644
--- a/test/Sema/return.c
+++ b/test/Sema/return.c
@@ -1,4 +1,4 @@
-// RUN: %clang %s -fsyntax-only -Wignored-qualifiers -Wno-error=return-type -Xclang -verify -fblocks -Wno-unreachable-code -Wno-unused-value
+// RUN: %clang_cc1 -triple x86_64-apple-darwin9 %s -fsyntax-only -Wignored-qualifiers -Wno-error=return-type -verify -fblocks -Wno-unreachable-code -Wno-unused-value
// clang emits the following warning by default.
// With GCC, -pedantic, -Wreturn-type or -Wall are required to produce the
@@ -275,3 +275,44 @@ int test34(int x) {
return 5;
}
}
+
+// PR18999
+int test35() {
+lbl:
+ if (1)
+ goto lbl;
+}
+
+// PR19074.
+void abort(void) __attribute__((noreturn));
+#define av_assert0(cond) do {\
+ if (!(cond)) {\
+ abort();\
+ }\
+ } while (0)
+
+int PR19074(int x) {
+ switch(x) {
+ case 0:
+ return 0;
+ default:
+ av_assert0(0);
+ } // no-warning
+}
+
+int PR19074_positive(int x) {
+ switch(x) {
+ case 0:
+ return 0;
+ default:
+ break;
+ }
+} // expected-warning {{control may reach end of non-void function}}
+
+// sizeof(long) test.
+int sizeof_long() {
+ if (sizeof(long) == 4)
+ return 1;
+ if (sizeof(long) == 8)
+ return 2;
+} // no-warning
diff --git a/test/Sema/sentinel-attribute.c b/test/Sema/sentinel-attribute.c
index e5cbf6ee04af..46f135041c1f 100644
--- a/test/Sema/sentinel-attribute.c
+++ b/test/Sema/sentinel-attribute.c
@@ -5,7 +5,7 @@ void f1(int a, ...) __attribute__ ((sentinel));
void f2(int a, ...) __attribute__ ((sentinel(1)));
void f3(int a, ...) __attribute__ ((sentinel("hello"))); //expected-error{{'sentinel' attribute requires parameter 1 to be an integer constant}}
-void f4(int a, ...) __attribute__ ((sentinel(1, 2, 3))); //expected-error{{attribute takes no more than 2 arguments}}
+void f4(int a, ...) __attribute__ ((sentinel(1, 2, 3))); //expected-error{{'sentinel' attribute takes no more than 2 arguments}}
void f4(int a, ...) __attribute__ ((sentinel(-1))); //expected-error{{parameter 1 less than zero}}
void f4(int a, ...) __attribute__ ((sentinel(0, 2))); // expected-error{{parameter 2 not 0 or 1}}
diff --git a/test/Sema/shift.c b/test/Sema/shift.c
index 142d83c43d92..d35554488513 100644
--- a/test/Sema/shift.c
+++ b/test/Sema/shift.c
@@ -1,4 +1,4 @@
-// RUN: %clang -Wall -Wshift-sign-overflow -ffreestanding -fsyntax-only -Xclang -verify %s
+// RUN: %clang_cc1 -Wall -Wshift-sign-overflow -ffreestanding -fsyntax-only -verify %s
#include <limits.h>
diff --git a/test/Sema/statements.c b/test/Sema/statements.c
index f01ee4086715..8cd30b0c93cd 100644
--- a/test/Sema/statements.c
+++ b/test/Sema/statements.c
@@ -36,7 +36,7 @@ bar:
// PR6034
void test11(int bit) {
- switch (bit) // expected-warning {{switch statement has empty body}} expected-note {{put the semicolon on a separate line to silence this warning}}
+ switch (bit)
switch (env->fpscr) // expected-error {{use of undeclared identifier 'env'}}
{
}
@@ -90,9 +90,6 @@ void foo(enum x X) {
}
}
-// PR 8880
-// FIXME: Clang should reject this, since GCC does. Previously this
-// was causing a crash in the CFG builder.
int test_pr8880() {
int first = 1;
for ( ; ({ if (first) { first = 0; continue; } 0; }); )
diff --git a/test/Sema/static-init.c b/test/Sema/static-init.c
index bbf9038ef381..a2ed55197bcb 100644
--- a/test/Sema/static-init.c
+++ b/test/Sema/static-init.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-bool-conversion %s
typedef __typeof((int*) 0 - (int*) 0) intptr_t;
diff --git a/test/Sema/struct-decl.c b/test/Sema/struct-decl.c
index 8d3d74de7671..055f14bf4dc6 100644
--- a/test/Sema/struct-decl.c
+++ b/test/Sema/struct-decl.c
@@ -66,3 +66,6 @@ void test_hiding() {
struct hiding_1 *p = hiding_1();
struct hiding_2 *q = hiding_2;
}
+
+struct PreserveAttributes {};
+typedef struct __attribute__((noreturn)) PreserveAttributes PreserveAttributes_t; // expected-warning {{'noreturn' attribute only applies to functions and methods}}
diff --git a/test/Sema/switch.c b/test/Sema/switch.c
index e37d5da25926..092378d48bc5 100644
--- a/test/Sema/switch.c
+++ b/test/Sema/switch.c
@@ -109,14 +109,14 @@ void test7() {
switch(a) {
case A:
case B:
- case 3: // expected-warning{{case value not in enumerated type 'enum <anonymous enum}}
+ case 3: // expected-warning{{case value not in enumerated type 'enum (anonymous enum}}
break;
}
switch(a) {
case A:
case B:
- case 3 ... //expected-warning{{case value not in enumerated type 'enum <anonymous enum}}
- 4: //expected-warning{{case value not in enumerated type 'enum <anonymous enum}}
+ case 3 ... //expected-warning{{case value not in enumerated type 'enum (anonymous enum}}
+ 4: //expected-warning{{case value not in enumerated type 'enum (anonymous enum}}
break;
}
switch(a) {
@@ -124,16 +124,16 @@ void test7() {
break;
}
switch(a) {
- case 0 ... 2: //expected-warning{{case value not in enumerated type 'enum <anonymous enum}}
+ case 0 ... 2: //expected-warning{{case value not in enumerated type 'enum (anonymous enum}}
break;
}
switch(a) {
- case 1 ... 3: //expected-warning{{case value not in enumerated type 'enum <anonymous enum}}
+ case 1 ... 3: //expected-warning{{case value not in enumerated type 'enum (anonymous enum}}
break;
}
switch(a) {
- case 0 ... //expected-warning{{case value not in enumerated type 'enum <anonymous enum}}
- 3: //expected-warning{{case value not in enumerated type 'enum <anonymous enum}}
+ case 0 ... //expected-warning{{case value not in enumerated type 'enum (anonymous enum}}
+ 3: //expected-warning{{case value not in enumerated type 'enum (anonymous enum}}
break;
}
@@ -167,11 +167,11 @@ void test9() {
C = 1
} a;
switch(a) {
- case 0: //expected-warning{{case value not in enumerated type 'enum <anonymous enum}}
+ case 0: //expected-warning{{case value not in enumerated type 'enum (anonymous enum}}
case 1:
- case 2: //expected-warning{{case value not in enumerated type 'enum <anonymous enum}}
+ case 2: //expected-warning{{case value not in enumerated type 'enum (anonymous enum}}
case 3:
- case 4: //expected-warning{{case value not in enumerated type 'enum <anonymous enum}}
+ case 4: //expected-warning{{case value not in enumerated type 'enum (anonymous enum}}
break;
}
}
@@ -184,14 +184,14 @@ void test10() {
D = 12
} a;
switch(a) {
- case 0 ... //expected-warning{{case value not in enumerated type 'enum <anonymous enum}}
- 1: //expected-warning{{case value not in enumerated type 'enum <anonymous enum}}
+ case 0 ... //expected-warning{{case value not in enumerated type 'enum (anonymous enum}}
+ 1: //expected-warning{{case value not in enumerated type 'enum (anonymous enum}}
case 2 ... 4:
- case 5 ... //expected-warning{{case value not in enumerated type 'enum <anonymous enum}}
- 9: //expected-warning{{case value not in enumerated type 'enum <anonymous enum}}
+ case 5 ... //expected-warning{{case value not in enumerated type 'enum (anonymous enum}}
+ 9: //expected-warning{{case value not in enumerated type 'enum (anonymous enum}}
case 10 ... 12:
- case 13 ... //expected-warning{{case value not in enumerated type 'enum <anonymous enum}}
- 16: //expected-warning{{case value not in enumerated type 'enum <anonymous enum}}
+ case 13 ... //expected-warning{{case value not in enumerated type 'enum (anonymous enum}}
+ 16: //expected-warning{{case value not in enumerated type 'enum (anonymous enum}}
break;
}
}
@@ -349,3 +349,29 @@ void test19(int i) {
break;
}
}
+
+// Allow the warning 'case value not in enumerated type' to be silenced with
+// the following pattern.
+//
+// If 'case' expression refers to a static const variable of the correct enum
+// type, then we count this as a sufficient declaration of intent by the user,
+// so we silence the warning.
+enum ExtendedEnum1 {
+ EE1_a,
+ EE1_b
+};
+
+enum ExtendedEnum1_unrelated { EE1_misc };
+
+static const enum ExtendedEnum1 EE1_c = 100;
+static const enum ExtendedEnum1_unrelated EE1_d = 101;
+
+void switch_on_ExtendedEnum1(enum ExtendedEnum1 e) {
+ switch(e) {
+ case EE1_a: break;
+ case EE1_b: break;
+ case EE1_c: break; // no-warning
+ case EE1_d: break; // expected-warning {{case value not in enumerated type 'enum ExtendedEnum1'}}
+ }
+}
+
diff --git a/test/Sema/tentative-decls.c b/test/Sema/tentative-decls.c
index bf2b1e4ee6a5..602624229d73 100644
--- a/test/Sema/tentative-decls.c
+++ b/test/Sema/tentative-decls.c
@@ -23,7 +23,7 @@ int i1 = 1; // expected-note {{previous definition is here}}
int i1 = 2; // expected-error {{redefinition of 'i1'}}
int i1;
int i1;
-extern int i5; // expected-note {{previous definition is here}}
+extern int i5; // expected-note {{previous declaration is here}}
static int i5; // expected-error{{static declaration of 'i5' follows non-static declaration}}
static int i2 = 5; // expected-note 1 {{previous definition is here}}
@@ -49,7 +49,7 @@ int redef[]; // expected-note {{previous definition is here}}
int redef[11]; // expected-error{{redefinition of 'redef'}}
void func() {
- extern int i6; // expected-note {{previous definition is here}}
+ extern int i6; // expected-note {{previous declaration is here}}
static int i6; // expected-error{{static declaration of 'i6' follows non-static declaration}}
}
diff --git a/test/Sema/thread-specifier.c b/test/Sema/thread-specifier.c
index bf1ce9e26e4a..3968ae14cf2a 100644
--- a/test/Sema/thread-specifier.c
+++ b/test/Sema/thread-specifier.c
@@ -21,7 +21,7 @@ __thread static int t3;
__thread __private_extern__ int t4;
struct t5 { __thread int x; };
#ifdef __cplusplus
-// expected-error-re@-2 {{'(__thread|_Thread_local|thread_local)' is only allowed on variable declarations}}
+// expected-error-re@-2 {{'{{__thread|_Thread_local|thread_local}}' is only allowed on variable declarations}}
#else
// FIXME: The 'is only allowed on variable declarations' diagnostic is better here.
// expected-error@-5 {{type name does not allow storage class to be specified}}
@@ -47,18 +47,18 @@ int f(__thread int t7) { // expected-error {{' is only allowed on variable decla
static __thread int t10;
__thread __private_extern__ int t11;
#if __cplusplus < 201103L
- __thread auto int t12a; // expected-error-re {{cannot combine with previous '(__thread|_Thread_local)' declaration specifier}}
+ __thread auto int t12a; // expected-error-re {{cannot combine with previous '{{__thread|_Thread_local}}' declaration specifier}}
auto __thread int t12b; // expected-error {{cannot combine with previous 'auto' declaration specifier}}
#elif !defined(CXX11)
- __thread auto t12a = 0; // expected-error-re {{'_Thread_local' variables must have global storage}}
- auto __thread t12b = 0; // expected-error-re {{'_Thread_local' variables must have global storage}}
+ __thread auto t12a = 0; // expected-error {{'_Thread_local' variables must have global storage}}
+ auto __thread t12b = 0; // expected-error {{'_Thread_local' variables must have global storage}}
#endif
- __thread register int t13a; // expected-error-re {{cannot combine with previous '(__thread|_Thread_local|thread_local)' declaration specifier}}
+ __thread register int t13a; // expected-error-re {{cannot combine with previous '{{__thread|_Thread_local|thread_local}}' declaration specifier}}
register __thread int t13b; // expected-error {{cannot combine with previous 'register' declaration specifier}}
}
-__thread typedef int t14; // expected-error-re {{cannot combine with previous '(__thread|_Thread_local|thread_local)' declaration specifier}}
-__thread int t15; // expected-note {{previous declaration is here}}
+__thread typedef int t14; // expected-error-re {{cannot combine with previous '{{__thread|_Thread_local|thread_local}}' declaration specifier}}
+__thread int t15; // expected-note {{previous definition is here}}
extern int t15; // expected-error {{non-thread-local declaration of 't15' follows thread-local declaration}}
extern int t16; // expected-note {{previous declaration is here}}
__thread int t16; // expected-error {{thread-local declaration of 't16' follows non-thread-local declaration}}
@@ -107,4 +107,17 @@ __thread S s;
#endif
#endif
+#ifdef __cplusplus
+struct HasCtor {
+ HasCtor();
+};
+__thread HasCtor var_with_ctor;
+#if !defined(CXX11)
+// expected-error@-2 {{initializer for thread-local variable must be a constant expression}}
+#if __cplusplus >= 201103L
+// expected-note@-4 {{use 'thread_local' to allow this}}
+#endif
+#endif
+#endif
+
__thread int aggregate[10] = {0};
diff --git a/test/Sema/tls.c b/test/Sema/tls.c
index 4e5cfef0a3f3..a3fdc8ea5132 100644
--- a/test/Sema/tls.c
+++ b/test/Sema/tls.c
@@ -9,9 +9,8 @@
// RUN: not %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only %s
// RUN: %clang_cc1 -triple x86_64-apple-macos10.7.0 -fsyntax-only %s
-// FIXME: I thought it was supported actually?
-// RUN: not %clang_cc1 -triple x86_64-pc-win32 -fsyntax-only %s
-// RUN: not %clang_cc1 -triple i386-pc-win32 -fsyntax-only %s
+// RUN: %clang_cc1 -triple x86_64-pc-win32 -fsyntax-only %s
+// RUN: %clang_cc1 -triple i386-pc-win32 -fsyntax-only %s
// OpenBSD does not suppport TLS.
// RUN: not %clang_cc1 -triple x86_64-pc-openbsd -fsyntax-only %s
@@ -20,4 +19,8 @@
// Haiku does not suppport TLS.
// RUN: not %clang_cc1 -triple i586-pc-haiku -fsyntax-only %s
+// Bitrig suppports TLS.
+// RUN: %clang_cc1 -triple x86_64-pc-bitrig -fsyntax-only %s
+// RUN: %clang_cc1 -triple armv6-unknown-bitrig -fsyntax-only %s
+
__thread int x;
diff --git a/test/Sema/transparent-union.c b/test/Sema/transparent-union.c
index ab1ba1867f47..8ef70bb1c7e3 100644
--- a/test/Sema/transparent-union.c
+++ b/test/Sema/transparent-union.c
@@ -1,4 +1,4 @@
-// RUN: %clang -fsyntax-only -Xclang -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
typedef union {
int *ip;
float *fp;
@@ -67,7 +67,25 @@ typedef union { } TU4 __attribute__((transparent_union)); // expected-warning{{f
typedef int int4 __attribute__((ext_vector_type(4)));
typedef union {
- int4 vec; // expected-warning{{first field of a transparent union cannot have vector type 'int4'; transparent_union attribute ignored}}
+ int4 vec; // expected-warning{{first field of a transparent union cannot have vector type 'int4' (vector of 4 'int' values); transparent_union attribute ignored}}
} TU5 __attribute__((transparent_union));
-
+union pr15134 {
+ unsigned int u;
+ struct {
+ unsigned int expo:2;
+ unsigned int mant:30;
+ } __attribute__((packed));
+ // The packed attribute is acceptable because it defines a less strict
+ // alignment than required by the first field of the transparent union.
+} __attribute__((transparent_union));
+
+union pr15134v2 {
+ struct { // expected-note {{alignment of first field is 32 bits}}
+ unsigned int u1;
+ unsigned int u2;
+ };
+ struct { // expected-warning {{alignment of field '' (64 bits) does not match the alignment of the first field in transparent union; transparent_union attribute ignored}}
+ unsigned int u3;
+ } __attribute__((aligned(8)));
+} __attribute__((transparent_union));
diff --git a/test/Sema/typedef-retain.c b/test/Sema/typedef-retain.c
index a7173b787791..d216466360b7 100644
--- a/test/Sema/typedef-retain.c
+++ b/test/Sema/typedef-retain.c
@@ -5,11 +5,11 @@ typedef int int4 __attribute__((vector_size(16)));
typedef int4* int4p;
void test1(float4 a, int4 *result, int i) {
- result[i] = a; // expected-error {{assigning to 'int4' from incompatible type 'float4'}}
+ result[i] = a; // expected-error {{assigning to 'int4' (vector of 4 'int' values) from incompatible type 'float4' (vector of 4 'float' values)}}
}
void test2(float4 a, int4p result, int i) {
- result[i] = a; // expected-error {{assigning to 'int4' from incompatible type 'float4'}}
+ result[i] = a; // expected-error {{assigning to 'int4' (vector of 4 'int' values) from incompatible type 'float4' (vector of 4 'float' values)}}
}
// PR2039
diff --git a/test/Sema/typeof-use-deprecated.c b/test/Sema/typeof-use-deprecated.c
index 1518c83701c1..ba72b126d7c7 100644
--- a/test/Sema/typeof-use-deprecated.c
+++ b/test/Sema/typeof-use-deprecated.c
@@ -1,25 +1,25 @@
// RUN: %clang_cc1 %s -verify -fsyntax-only
-struct s { int a; } __attribute__((deprecated)) x; // expected-warning {{'s' is deprecated}} expected-note 2 {{'s' declared here}}
+struct s { int a; } __attribute__((deprecated)) x; // expected-warning {{'s' is deprecated}} expected-note 2 {{'s' has been explicitly marked deprecated here}}
typeof(x) y; // expected-warning {{'s' is deprecated}}
-union un{ int a; } __attribute__((deprecated)) u; // expected-warning {{'un' is deprecated}} expected-note 2 {{'un' declared here}}
+union un{ int a; } __attribute__((deprecated)) u; // expected-warning {{'un' is deprecated}} expected-note 2 {{'un' has been explicitly marked deprecated here}}
typeof( u) z; // expected-warning {{'un' is deprecated}}
-enum E{ one} __attribute__((deprecated)) e; // expected-warning {{'E' is deprecated}} expected-note 2 {{'E' declared here}}
+enum E{ one} __attribute__((deprecated)) e; // expected-warning {{'E' is deprecated}} expected-note 2 {{'E' has been explicitly marked deprecated here}}
typeof( e) w; // expected-warning {{'E' is deprecated}}
-struct foo { int x; } __attribute__((deprecated)); // expected-note {{'foo' declared here}}
-typedef struct foo bar __attribute__((deprecated)); // expected-note {{'bar' declared here}}
+struct foo { int x; } __attribute__((deprecated)); // expected-note {{'foo' has been explicitly marked deprecated here}}
+typedef struct foo bar __attribute__((deprecated)); // expected-note {{'bar' has been explicitly marked deprecated here}}
bar x1; // expected-warning {{'bar' is deprecated}}
int main() { typeof(x1) y; } // expected-warning {{'foo' is deprecated}}
struct gorf { int x; };
-typedef struct gorf T __attribute__((deprecated)); // expected-note {{'T' declared here}}
+typedef struct gorf T __attribute__((deprecated)); // expected-note {{'T' has been explicitly marked deprecated here}}
T t; // expected-warning {{'T' is deprecated}}
void wee() { typeof(t) y; }
diff --git a/test/Sema/types.c b/test/Sema/types.c
index dac0bfe9fe82..778a5fe9f7ca 100644
--- a/test/Sema/types.c
+++ b/test/Sema/types.c
@@ -53,7 +53,7 @@ _Decimal32 x; // expected-error {{GNU decimal type extension not supported}}
int __attribute__ ((vector_size (8), vector_size (8))) v; // expected-error {{invalid vector element type}}
void test(int i) {
- char c = (char __attribute__((align(8)))) i; // expected-warning {{'align' attribute ignored when parsing type}}
+ char c = (char __attribute__((aligned(8)))) i; // expected-warning {{'aligned' attribute ignored when parsing type}}
}
// http://llvm.org/PR11082
@@ -72,3 +72,12 @@ typedef int __attribute__ ((ext_vector_type(8192))) x2; // expected-error {{vect
// no support for vector enum type
enum { e_2 } x3 __attribute__((vector_size(64))); // expected-error {{invalid vector element type}}
+int x4 __attribute__((ext_vector_type(64))); // expected-error {{'ext_vector_type' attribute only applies to types}}
+
+// rdar://16492792
+typedef __attribute__ ((ext_vector_type(32),__aligned__(32))) unsigned char uchar32;
+
+void convert() {
+ uchar32 r = 0;
+ r.s[ 1234 ] = 1; // expected-error {{illegal vector component name 's'}}
+}
diff --git a/test/Sema/unused-expr.c b/test/Sema/unused-expr.c
index ea08631ebae3..43d8150b02cb 100644
--- a/test/Sema/unused-expr.c
+++ b/test/Sema/unused-expr.c
@@ -7,11 +7,11 @@ double sqrt(double X); // implicitly const because of no -fmath-errno!
void bar(volatile int *VP, int *P, int A,
_Complex double C, volatile _Complex double VC) {
- VP < P; // expected-warning {{expression result unused}}
+ VP < P; // expected-warning {{relational comparison result unused}}
(void)A;
(void)foo(1,2); // no warning.
- A < foo(1, 2); // expected-warning {{expression result unused}}
+ A < foo(1, 2); // expected-warning {{relational comparison result unused}}
foo(1,2)+foo(4,3); // expected-warning {{expression result unused}}
@@ -54,23 +54,23 @@ void t4(int a) {
int b = 0;
if (a)
- b < 1; // expected-warning{{expression result unused}}
+ b < 1; // expected-warning{{relational comparison result unused}}
else
- b < 2; // expected-warning{{expression result unused}}
+ b < 2; // expected-warning{{relational comparison result unused}}
while (1)
- b < 3; // expected-warning{{expression result unused}}
+ b < 3; // expected-warning{{relational comparison result unused}}
do
- b < 4; // expected-warning{{expression result unused}}
+ b < 4; // expected-warning{{relational comparison result unused}}
while (1);
for (;;)
- b < 5; // expected-warning{{expression result unused}}
+ b < 5; // expected-warning{{relational comparison result unused}}
- for (b < 1;;) {} // expected-warning{{expression result unused}}
+ for (b < 1;;) {} // expected-warning{{relational comparison result unused}}
for (;b < 1;) {}
- for (;;b < 1) {} // expected-warning{{expression result unused}}
+ for (;;b < 1) {} // expected-warning{{relational comparison result unused}}
}
// rdar://7186119
@@ -91,7 +91,7 @@ int t6() {
fn1(); // expected-warning {{ignoring return value of function declared with warn_unused_result attribute}}
fn2(92, 21); // expected-warning {{ignoring return value of function declared with pure attribute}}
fn3(42); // expected-warning {{ignoring return value of function declared with const attribute}}
- __builtin_fabsf(0); // expected-warning {{ignoring return value of function declared with const attribute}}
+ __builtin_abs(0); // expected-warning {{ignoring return value of function declared with const attribute}}
(void)0, fn1(); // expected-warning {{ignoring return value of function declared with warn_unused_result attribute}}
return 0;
}
diff --git a/test/Sema/var-redecl.c b/test/Sema/var-redecl.c
index 363458b20172..0e30aa271379 100644
--- a/test/Sema/var-redecl.c
+++ b/test/Sema/var-redecl.c
@@ -58,5 +58,5 @@ int *p=&g19; // expected-error{{use of undeclared identifier 'g19'}} \
// PR3645
static int a;
-extern int a; // expected-note {{previous definition is here}}
+extern int a; // expected-note {{previous declaration is here}}
int a; // expected-error {{non-static declaration of 'a' follows static declaration}}
diff --git a/test/Sema/variadic-promotion.c b/test/Sema/variadic-promotion.c
index b24877443052..01d8e934b4eb 100644
--- a/test/Sema/variadic-promotion.c
+++ b/test/Sema/variadic-promotion.c
@@ -6,7 +6,7 @@ void test_floating_promotion(__fp16 *f16, float f32, double f64) {
variadic(3, *f16, f32, f64);
// CHECK: ImplicitCastExpr {{.*}} 'double' <FloatingCast>
-// CHECK-NEXT: 'half'
+// CHECK-NEXT: '__fp16'
// CHECK: ImplicitCastExpr {{.*}} 'double' <FloatingCast>
// CHECK-NEXT: 'float'
diff --git a/test/Sema/vector-assign.c b/test/Sema/vector-assign.c
index f01eb456a164..ad3406e304a7 100644
--- a/test/Sema/vector-assign.c
+++ b/test/Sema/vector-assign.c
@@ -12,30 +12,30 @@ void test1() {
v2f v4;
v4ss v5;
- v1 = v2; // expected-warning {{incompatible vector types assigning to 'v2s' from 'v2u'}}
- v1 = v3; // expected-error {{assigning to 'v2s' from incompatible type 'v1s'}}
- v1 = v4; // expected-warning {{incompatible vector types assigning to 'v2s' from 'v2f'}}
- v1 = v5; // expected-warning {{incompatible vector types assigning to 'v2s' from 'v4ss'}}
+ v1 = v2; // expected-warning {{incompatible vector types assigning to 'v2s' (vector of 2 'int' values) from 'v2u' (vector of 2 'unsigned int' values)}}
+ v1 = v3; // expected-error {{assigning to 'v2s' (vector of 2 'int' values) from incompatible type 'v1s' (vector of 1 'int' value)}}
+ v1 = v4; // expected-warning {{incompatible vector types assigning to 'v2s' (vector of 2 'int' values) from 'v2f' (vector of 2 'float' values)}}
+ v1 = v5; // expected-warning {{incompatible vector types assigning to 'v2s' (vector of 2 'int' values) from 'v4ss' (vector of 4 'short' values)}}
- v2 = v1; // expected-warning {{incompatible vector types assigning to 'v2u' from 'v2s'}}
- v2 = v3; // expected-error {{assigning to 'v2u' from incompatible type 'v1s'}}
- v2 = v4; // expected-warning {{incompatible vector types assigning to 'v2u' from 'v2f'}}
- v2 = v5; // expected-warning {{incompatible vector types assigning to 'v2u' from 'v4ss'}}
+ v2 = v1; // expected-warning {{incompatible vector types assigning to 'v2u' (vector of 2 'unsigned int' values) from 'v2s' (vector of 2 'int' values)}}
+ v2 = v3; // expected-error {{assigning to 'v2u' (vector of 2 'unsigned int' values) from incompatible type 'v1s' (vector of 1 'int' value)}}
+ v2 = v4; // expected-warning {{incompatible vector types assigning to 'v2u' (vector of 2 'unsigned int' values) from 'v2f' (vector of 2 'float' values)}}
+ v2 = v5; // expected-warning {{incompatible vector types assigning to 'v2u' (vector of 2 'unsigned int' values) from 'v4ss' (vector of 4 'short' values)}}
- v3 = v1; // expected-error {{assigning to 'v1s' from incompatible type 'v2s'}}
- v3 = v2; // expected-error {{assigning to 'v1s' from incompatible type 'v2u'}}
- v3 = v4; // expected-error {{assigning to 'v1s' from incompatible type 'v2f'}}
- v3 = v5; // expected-error {{assigning to 'v1s' from incompatible type 'v4ss'}}
+ v3 = v1; // expected-error {{assigning to 'v1s' (vector of 1 'int' value) from incompatible type 'v2s' (vector of 2 'int' values)}}
+ v3 = v2; // expected-error {{assigning to 'v1s' (vector of 1 'int' value) from incompatible type 'v2u' (vector of 2 'unsigned int' values)}}
+ v3 = v4; // expected-error {{assigning to 'v1s' (vector of 1 'int' value) from incompatible type 'v2f' (vector of 2 'float' values)}}
+ v3 = v5; // expected-error {{assigning to 'v1s' (vector of 1 'int' value) from incompatible type 'v4ss'}}
- v4 = v1; // expected-warning {{incompatible vector types assigning to 'v2f' from 'v2s'}}
- v4 = v2; // expected-warning {{incompatible vector types assigning to 'v2f' from 'v2u'}}
- v4 = v3; // expected-error {{assigning to 'v2f' from incompatible type 'v1s'}}
- v4 = v5; // expected-warning {{incompatible vector types assigning to 'v2f' from 'v4ss'}}
+ v4 = v1; // expected-warning {{incompatible vector types assigning to 'v2f' (vector of 2 'float' values) from 'v2s' (vector of 2 'int' values)}}
+ v4 = v2; // expected-warning {{incompatible vector types assigning to 'v2f' (vector of 2 'float' values) from 'v2u' (vector of 2 'unsigned int' values)}}
+ v4 = v3; // expected-error {{assigning to 'v2f' (vector of 2 'float' values) from incompatible type 'v1s' (vector of 1 'int' value)}}
+ v4 = v5; // expected-warning {{incompatible vector types assigning to 'v2f' (vector of 2 'float' values) from 'v4ss' (vector of 4 'short' values)}}
- v5 = v1; // expected-warning {{incompatible vector types assigning to 'v4ss' from 'v2s'}}
- v5 = v2; // expected-warning {{incompatible vector types assigning to 'v4ss' from 'v2u'}}
- v5 = v3; // expected-error {{assigning to 'v4ss' from incompatible type 'v1s'}}
- v5 = v4; // expected-warning {{incompatible vector types assigning to 'v4ss' from 'v2f'}}
+ v5 = v1; // expected-warning {{incompatible vector types assigning to 'v4ss' (vector of 4 'short' values) from 'v2s' (vector of 2 'int' values)}}
+ v5 = v2; // expected-warning {{incompatible vector types assigning to 'v4ss' (vector of 4 'short' values) from 'v2u' (vector of 2 'unsigned int' values)}}
+ v5 = v3; // expected-error {{assigning to 'v4ss' (vector of 4 'short' values) from incompatible type 'v1s' (vector of 1 'int' value)}}
+ v5 = v4; // expected-warning {{incompatible vector types assigning to 'v4ss' (vector of 4 'short' values) from 'v2f'}}
}
// PR2263
diff --git a/test/Sema/vector-cast.c b/test/Sema/vector-cast.c
index 7fa6e86aa10e..0415c13990c8 100644
--- a/test/Sema/vector-cast.c
+++ b/test/Sema/vector-cast.c
@@ -11,28 +11,46 @@ void f()
t3 v3;
v2 = (t2)v1; // expected-error {{invalid conversion between vector type \
-'t2' and 't1' of different size}}
+'t2' (vector of 16 'char' values) and 't1' (vector of 1 'long long' value) of different size}}
v1 = (t1)v2; // expected-error {{invalid conversion between vector type \
-'t1' and 't2' of different size}}
+'t1' (vector of 1 'long long' value) and 't2' (vector of 16 'char' values) of different size}}
v3 = (t3)v2;
v1 = (t1)(char *)10; // expected-error {{invalid conversion between vector \
-type 't1' and scalar type 'char *'}}
+type 't1' (vector of 1 'long long' value) and scalar type 'char *'}}
v1 = (t1)(long long)10;
v1 = (t1)(short)10; // expected-error {{invalid conversion between vector \
-type 't1' and integer type 'short' of different size}}
+type 't1' (vector of 1 'long long' value) and integer type 'short' of different size}}
long long r1 = (long long)v1;
short r2 = (short)v1; // expected-error {{invalid conversion between vector \
-type 't1' and integer type 'short' of different size}}
+type 't1' (vector of 1 'long long' value) and integer type 'short' of different size}}
char *r3 = (char *)v1; // expected-error {{invalid conversion between vector\
- type 't1' and scalar type 'char *'}}
+ type 't1' (vector of 1 'long long' value) and scalar type 'char *'}}
}
void f2(t2 X); // expected-note{{passing argument to parameter 'X' here}}
void f3(t3 Y) {
- f2(Y); // expected-warning {{incompatible vector types passing 't3' to parameter of type 't2'}}
+ f2(Y); // expected-warning {{incompatible vector types passing 't3' (vector of 4 'float' values) to parameter of type 't2' (vector of 16 'char' values)}}
}
+typedef float float2 __attribute__ ((vector_size (8)));
+
+void f4() {
+ float2 f2;
+ double d;
+ f2 += d;
+ d += f2;
+}
+
+// rdar://15931426
+// Don't permit a lax conversion to and from a pointer type.
+typedef short short_sizeof_pointer __attribute__((vector_size(sizeof(void*))));
+void f5() {
+ short_sizeof_pointer v;
+ void *ptr;
+ v = ptr; // expected-error-re {{assigning to 'short_sizeof_pointer' (vector of {{[0-9]+}} 'short' values) from incompatible type 'void *'}}
+ ptr = v; // expected-error {{assigning to 'void *' from incompatible type 'short_sizeof_pointer'}}
+}
diff --git a/test/Sema/vector-init.c b/test/Sema/vector-init.c
index 5be040ae6c11..9f27bb882e66 100644
--- a/test/Sema/vector-init.c
+++ b/test/Sema/vector-init.c
@@ -40,5 +40,5 @@ typedef short __attribute__((vector_size(8))) short4;
void test3() {
extern short8 test3_helper(void);
longlong2 arr1[2] = { test3_helper(), test3_helper() };
- short4 arr2[2] = { test3_helper(), test3_helper() }; // expected-error 2 {{initializing 'short4' with an expression of incompatible type 'short8'}}
+ short4 arr2[2] = { test3_helper(), test3_helper() }; // expected-error 2 {{initializing 'short4' (vector of 4 'short' values) with an expression of incompatible type 'short8' (vector of 8 'short' values)}}
}
diff --git a/test/Sema/vector-ops.c b/test/Sema/vector-ops.c
index 652a076c780f..f2953417f545 100644
--- a/test/Sema/vector-ops.c
+++ b/test/Sema/vector-ops.c
@@ -10,14 +10,14 @@ void test1(v2u v2ua, v2s v2sa, v2f v2fa) {
// Unary operators
(void)(~v2ua);
- (void)(~v2fa); // expected-error{{invalid argument type 'v2f' to unary}}
+ (void)(~v2fa); // expected-error{{invalid argument type 'v2f' (vector of 2 'float' values) to unary}}
// Comparison operators
- v2ua = (v2ua==v2sa); // expected-warning{{incompatible vector types assigning to 'v2u' from 'int __attribute__((ext_vector_type(2)))'}}
+ v2ua = (v2ua==v2sa); // expected-warning{{incompatible vector types assigning to 'v2u' (vector of 2 'unsigned int' values) from 'int __attribute__((ext_vector_type(2)))' (vector of 2 'int' values)}}
v2sa = (v2ua==v2sa);
// Arrays
- int array1[v2ua]; // expected-error{{size of array has non-integer type 'v2u'}}
+ int array1[v2ua]; // expected-error{{size of array has non-integer type 'v2u' (vector of 2 'unsigned int' values)}}
int array2[17];
// FIXME: error message below needs type!
(void)(array2[v2ua]); // expected-error{{array subscript is not an integer}}
diff --git a/test/Sema/vla.c b/test/Sema/vla.c
index 4fd636122f3c..e03dda8c5f6c 100644
--- a/test/Sema/vla.c
+++ b/test/Sema/vla.c
@@ -19,7 +19,7 @@ int x = sizeof(struct{char qq[x];}); // expected-error {{fields must have a cons
// PR2352
void f2(unsigned int m)
{
- extern int e1[2][m]; // expected-error {{variable length array declaration can not have 'extern' linkage}}
+ extern int e1[2][m]; // expected-error {{variable length array declaration cannot have 'extern' linkage}}
e1[0][0] = 0;
@@ -34,10 +34,10 @@ int (*e)[i]; // expected-error {{variably modified type declaration not allowed
void f3()
{
- static int a[i]; // expected-error {{variable length array declaration can not have 'static' storage duration}}
- extern int b[i]; // expected-error {{variable length array declaration can not have 'extern' linkage}}
+ static int a[i]; // expected-error {{variable length array declaration cannot have 'static' storage duration}}
+ extern int b[i]; // expected-error {{variable length array declaration cannot have 'extern' linkage}}
- extern int (*c1)[i]; // expected-error {{variably modified type declaration can not have 'extern' linkage}}
+ extern int (*c1)[i]; // expected-error {{variably modified type declaration cannot have 'extern' linkage}}
static int (*d)[i];
}
diff --git a/test/Sema/warn-absolute-value-header.c b/test/Sema/warn-absolute-value-header.c
new file mode 100644
index 000000000000..0c7c3a8b9003
--- /dev/null
+++ b/test/Sema/warn-absolute-value-header.c
@@ -0,0 +1,36 @@
+// RUN: %clang_cc1 -triple i686-pc-linux-gnu -fsyntax-only -verify %s -Wabsolute-value
+// RUN: %clang_cc1 -triple i686-pc-linux-gnu -fsyntax-only %s -Wabsolute-value -fdiagnostics-parseable-fixits 2>&1 | FileCheck %s
+
+int abs(int);
+
+// Wrong signature
+int fabsf(int);
+// expected-warning@-1{{incompatible redeclaration of library function 'fabsf'}}
+// expected-note@-2{{'fabsf' is a builtin with type 'float (float)'}}
+
+void test_int(int i, unsigned u, long long ll, float f, double d) {
+ (void)abs(i);
+
+ // Remove abs call
+ (void)abs(u);
+ // expected-warning@-1{{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2{{remove the call to 'abs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:""
+
+ int llabs;
+ (void)llabs;
+ // Conflict in names, no notes
+ (void)abs(ll);
+ // expected-warning@-1{{absolute value function 'abs' given an argument of type 'long long' but has parameter of type 'int' which may cause truncation of value}}
+
+ // Conflict in names, no notes
+ (void)abs(f);
+ // expected-warning@-1{{using integer absolute value function 'abs' when argument is of floating point type}}
+
+ // Suggest header.
+ (void)abs(d);
+ // expected-warning@-1{{using integer absolute value function 'abs' when argument is of floating point type}}
+ // expected-note@-2{{use function 'fabs' instead}}
+ // expected-note@-3{{include the header <math.h> or explicitly provide a declaration for 'fabs'}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-4]]:9-[[@LINE-4]]:12}:"fabs"
+}
diff --git a/test/Sema/warn-absolute-value.c b/test/Sema/warn-absolute-value.c
new file mode 100644
index 000000000000..70601db63a1f
--- /dev/null
+++ b/test/Sema/warn-absolute-value.c
@@ -0,0 +1,782 @@
+// RUN: %clang_cc1 -triple i686-pc-linux-gnu -fsyntax-only -verify %s -Wabsolute-value
+// RUN: %clang_cc1 -triple i686-pc-linux-gnu -fsyntax-only %s -Wabsolute-value -fdiagnostics-parseable-fixits 2>&1 | FileCheck %s
+
+int abs(int);
+long int labs(long int);
+long long int llabs(long long int);
+
+float fabsf(float);
+double fabs(double);
+long double fabsl(long double);
+
+float cabsf(float _Complex);
+double cabs(double _Complex);
+long double cabsl(long double _Complex);
+
+void test_int(int x) {
+ (void)abs(x);
+ (void)labs(x);
+ (void)llabs(x);
+
+ (void)fabsf(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabsf' when argument is of integer type}}
+ // expected-note@-2 {{use function 'abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"abs"
+ (void)fabs(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabs' when argument is of integer type}}
+ // expected-note@-2 {{use function 'abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"abs"
+ (void)fabsl(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabsl' when argument is of integer type}}
+ // expected-note@-2 {{use function 'abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"abs"
+
+ (void)cabsf(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabsf' when argument is of integer type}}
+ // expected-note@-2 {{use function 'abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"abs"
+ (void)cabs(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabs' when argument is of integer type}}
+ // expected-note@-2 {{use function 'abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"abs"
+ (void)cabsl(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabsl' when argument is of integer type}}
+ // expected-note@-2 {{use function 'abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"abs"
+
+ (void)__builtin_abs(x);
+ (void)__builtin_labs(x);
+ (void)__builtin_llabs(x);
+
+ (void)__builtin_fabsf(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsf' when argument is of integer type}}
+ // expected-note@-2 {{use function '__builtin_abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_abs"
+ (void)__builtin_fabs(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabs' when argument is of integer type}}
+ // expected-note@-2 {{use function '__builtin_abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_abs"
+ (void)__builtin_fabsl(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsl' when argument is of integer type}}
+ // expected-note@-2 {{use function '__builtin_abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_abs"
+
+ (void)__builtin_cabsf(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabsf' when argument is of integer type}}
+ // expected-note@-2 {{use function '__builtin_abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_abs"
+ (void)__builtin_cabs(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabs' when argument is of integer type}}
+ // expected-note@-2 {{use function '__builtin_abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_abs"
+ (void)__builtin_cabsl(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabsl' when argument is of integer type}}
+ // expected-note@-2 {{use function '__builtin_abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_abs"
+}
+
+void test_long(long x) {
+ (void)abs(x); // no warning - int and long are same length for this target
+ (void)labs(x);
+ (void)llabs(x);
+
+ (void)fabsf(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabsf' when argument is of integer type}}
+ // expected-note@-2 {{use function 'labs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"labs"
+ (void)fabs(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabs' when argument is of integer type}}
+ // expected-note@-2 {{use function 'labs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"labs"
+ (void)fabsl(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabsl' when argument is of integer type}}
+ // expected-note@-2 {{use function 'labs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"labs"
+
+ (void)cabsf(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabsf' when argument is of integer type}}
+ // expected-note@-2 {{use function 'labs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"labs"
+ (void)cabs(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabs' when argument is of integer type}}
+ // expected-note@-2 {{use function 'labs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"labs"
+ (void)cabsl(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabsl' when argument is of integer type}}
+ // expected-note@-2 {{use function 'labs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"labs"
+
+ (void)__builtin_abs(x); // no warning - int and long are same length for
+ // this target
+ (void)__builtin_labs(x);
+ (void)__builtin_llabs(x);
+
+ (void)__builtin_fabsf(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsf' when argument is of integer type}}
+ // expected-note@-2 {{use function '__builtin_labs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_labs"
+ (void)__builtin_fabs(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabs' when argument is of integer type}}
+ // expected-note@-2 {{use function '__builtin_labs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_labs"
+ (void)__builtin_fabsl(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsl' when argument is of integer type}}
+ // expected-note@-2 {{use function '__builtin_labs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_labs"
+
+ (void)__builtin_cabsf(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabsf' when argument is of integer type}}
+ // expected-note@-2 {{use function '__builtin_labs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_labs"
+ (void)__builtin_cabs(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabs' when argument is of integer type}}
+ // expected-note@-2 {{use function '__builtin_labs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_labs"
+ (void)__builtin_cabsl(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabsl' when argument is of integer type}}
+ // expected-note@-2 {{use function '__builtin_labs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_labs"
+}
+
+void test_long_long(long long x) {
+ (void)abs(x);
+ // expected-warning@-1{{absolute value function 'abs' given an argument of type 'long long' but has parameter of type 'int' which may cause truncation of value}}
+ // expected-note@-2{{use function 'llabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:"llabs"
+ (void)labs(x);
+ // expected-warning@-1{{absolute value function 'labs' given an argument of type 'long long' but has parameter of type 'long' which may cause truncation of value}}
+ // expected-note@-2{{use function 'llabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"llabs"
+ (void)llabs(x);
+
+ (void)fabsf(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabsf' when argument is of integer type}}
+ // expected-note@-2 {{use function 'llabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"llabs"
+ (void)fabs(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabs' when argument is of integer type}}
+ // expected-note@-2 {{use function 'llabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"llabs"
+ (void)fabsl(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabsl' when argument is of integer type}}
+ // expected-note@-2 {{use function 'llabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"llabs"
+
+ (void)cabsf(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabsf' when argument is of integer type}}
+ // expected-note@-2 {{use function 'llabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"llabs"
+ (void)cabs(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabs' when argument is of integer type}}
+ // expected-note@-2 {{use function 'llabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"llabs"
+ (void)cabsl(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabsl' when argument is of integer type}}
+ // expected-note@-2 {{use function 'llabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"llabs"
+
+ (void)__builtin_abs(x);
+ // expected-warning@-1{{absolute value function '__builtin_abs' given an argument of type 'long long' but has parameter of type 'int' which may cause truncation of value}}
+ // expected-note@-2{{use function '__builtin_llabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:"__builtin_llabs"
+ (void)__builtin_labs(x);
+ // expected-warning@-1{{absolute value function '__builtin_labs' given an argument of type 'long long' but has parameter of type 'long' which may cause truncation of value}}
+ // expected-note@-2{{use function '__builtin_llabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_llabs"
+ (void)__builtin_llabs(x);
+
+ (void)__builtin_fabsf(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsf' when argument is of integer type}}
+ // expected-note@-2 {{use function '__builtin_llabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_llabs"
+ (void)__builtin_fabs(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabs' when argument is of integer type}}
+ // expected-note@-2 {{use function '__builtin_llabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_llabs"
+ (void)__builtin_fabsl(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsl' when argument is of integer type}}
+ // expected-note@-2 {{use function '__builtin_llabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_llabs"
+
+ (void)__builtin_cabsf(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabsf' when argument is of integer type}}
+ // expected-note@-2 {{use function '__builtin_llabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_llabs"
+ (void)__builtin_cabs(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabs' when argument is of integer type}}
+ // expected-note@-2 {{use function '__builtin_llabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_llabs"
+ (void)__builtin_cabsl(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabsl' when argument is of integer type}}
+ // expected-note@-2 {{use function '__builtin_llabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_llabs"
+}
+
+void test_float(float x) {
+ (void)abs(x);
+ // expected-warning@-1 {{using integer absolute value function 'abs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'fabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:"fabsf"
+ (void)labs(x);
+ // expected-warning@-1 {{using integer absolute value function 'labs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'fabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"fabsf"
+ (void)llabs(x);
+ // expected-warning@-1 {{using integer absolute value function 'llabs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'fabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"fabsf"
+
+ (void)fabsf(x);
+ (void)fabs(x);
+ (void)fabsl(x);
+
+ (void)cabsf(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabsf' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'fabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"fabsf"
+ (void)cabs(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'fabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"fabsf"
+ (void)cabsl(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabsl' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'fabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"fabsf"
+
+ (void)__builtin_abs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_abs' when argument is of floating point type}}
+ // expected-note@-2 {{use function '__builtin_fabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:"__builtin_fabsf"
+ (void)__builtin_labs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_labs' when argument is of floating point type}}
+ // expected-note@-2 {{use function '__builtin_fabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_fabsf"
+ (void)__builtin_llabs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_llabs' when argument is of floating point type}}
+ // expected-note@-2 {{use function '__builtin_fabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_fabsf"
+
+ (void)__builtin_fabsf(x);
+ (void)__builtin_fabs(x);
+ (void)__builtin_fabsl(x);
+
+ (void)__builtin_cabsf(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabsf' when argument is of floating point type}}
+ // expected-note@-2 {{use function '__builtin_fabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_fabsf"
+ (void)__builtin_cabs(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabs' when argument is of floating point type}}
+ // expected-note@-2 {{use function '__builtin_fabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_fabsf"
+ (void)__builtin_cabsl(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabsl' when argument is of floating point type}}
+ // expected-note@-2 {{use function '__builtin_fabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_fabsf"
+}
+
+void test_double(double x) {
+ (void)abs(x);
+ // expected-warning@-1 {{using integer absolute value function 'abs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'fabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:"fabs"
+ (void)labs(x);
+ // expected-warning@-1 {{using integer absolute value function 'labs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'fabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"fabs"
+ (void)llabs(x);
+ // expected-warning@-1 {{using integer absolute value function 'llabs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'fabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"fabs"
+
+ (void)fabsf(x);
+ // expected-warning@-1{{absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value}}
+ // expected-note@-2{{use function 'fabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"fabs"
+ (void)fabs(x);
+ (void)fabsl(x);
+
+ (void)cabsf(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabsf' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'fabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"fabs"
+ (void)cabs(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'fabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"fabs"
+ (void)cabsl(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabsl' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'fabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"fabs"
+
+ (void)__builtin_abs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_abs' when argument is of floating point type}}
+ // expected-note@-2 {{use function '__builtin_fabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:"__builtin_fabs"
+ (void)__builtin_labs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_labs' when argument is of floating point type}}
+ // expected-note@-2 {{use function '__builtin_fabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_fabs"
+ (void)__builtin_llabs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_llabs' when argument is of floating point type}}
+ // expected-note@-2 {{use function '__builtin_fabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_fabs"
+
+ (void)__builtin_fabsf(x);
+ // expected-warning@-1{{absolute value function '__builtin_fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value}}
+ // expected-note@-2{{use function '__builtin_fabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_fabs"
+ (void)__builtin_fabs(x);
+ (void)__builtin_fabsl(x);
+
+ (void)__builtin_cabsf(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabsf' when argument is of floating point type}}
+ // expected-note@-2 {{use function '__builtin_fabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_fabs"
+ (void)__builtin_cabs(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabs' when argument is of floating point type}}
+ // expected-note@-2 {{use function '__builtin_fabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_fabs"
+ (void)__builtin_cabsl(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabsl' when argument is of floating point type}}
+ // expected-note@-2 {{use function '__builtin_fabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_fabs"
+}
+
+void test_long_double(long double x) {
+ (void)abs(x);
+ // expected-warning@-1 {{using integer absolute value function 'abs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'fabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:"fabsl"
+ (void)labs(x);
+ // expected-warning@-1 {{using integer absolute value function 'labs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'fabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"fabsl"
+ (void)llabs(x);
+ // expected-warning@-1 {{using integer absolute value function 'llabs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'fabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"fabsl"
+
+ (void)fabsf(x);
+ // expected-warning@-1{{absolute value function 'fabsf' given an argument of type 'long double' but has parameter of type 'float' which may cause truncation of value}}
+ // expected-note@-2{{use function 'fabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"fabsl"
+ (void)fabs(x);
+ // expected-warning@-1{{absolute value function 'fabs' given an argument of type 'long double' but has parameter of type 'double' which may cause truncation of value}}
+ // expected-note@-2{{use function 'fabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"fabsl"
+ (void)fabsl(x);
+
+ (void)cabsf(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabsf' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'fabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"fabsl"
+ (void)cabs(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'fabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"fabsl"
+ (void)cabsl(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabsl' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'fabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"fabsl"
+
+ (void)__builtin_abs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_abs' when argument is of floating point type}}
+ // expected-note@-2 {{use function '__builtin_fabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:"__builtin_fabsl"
+ (void)__builtin_labs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_labs' when argument is of floating point type}}
+ // expected-note@-2 {{use function '__builtin_fabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_fabsl"
+ (void)__builtin_llabs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_llabs' when argument is of floating point type}}
+ // expected-note@-2 {{use function '__builtin_fabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_fabsl"
+
+ (void)__builtin_fabsf(x);
+ // expected-warning@-1{{absolute value function '__builtin_fabsf' given an argument of type 'long double' but has parameter of type 'float' which may cause truncation of value}}
+ // expected-note@-2{{use function '__builtin_fabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_fabsl"
+ (void)__builtin_fabs(x);
+ // expected-warning@-1{{absolute value function '__builtin_fabs' given an argument of type 'long double' but has parameter of type 'double' which may cause truncation of value}}
+ // expected-note@-2{{use function '__builtin_fabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_fabsl"
+ (void)__builtin_fabsl(x);
+
+ (void)__builtin_cabsf(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabsf' when argument is of floating point type}}
+ // expected-note@-2 {{use function '__builtin_fabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_fabsl"
+ (void)__builtin_cabs(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabs' when argument is of floating point type}}
+ // expected-note@-2 {{use function '__builtin_fabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_fabsl"
+ (void)__builtin_cabsl(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabsl' when argument is of floating point type}}
+ // expected-note@-2 {{use function '__builtin_fabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_fabsl"
+}
+
+void test_complex_float(_Complex float x) {
+ (void)abs(x);
+ // expected-warning@-1 {{using integer absolute value function 'abs' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:"cabsf"
+ (void)labs(x);
+ // expected-warning@-1 {{using integer absolute value function 'labs' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"cabsf"
+ (void)llabs(x);
+ // expected-warning@-1 {{using integer absolute value function 'llabs' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabsf"
+
+ (void)fabsf(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabsf' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabsf"
+ (void)fabs(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabs' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"cabsf"
+ (void)fabsl(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabsl' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabsf"
+
+ (void)cabsf(x);
+ (void)cabs(x);
+ (void)cabsl(x);
+
+ (void)__builtin_abs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_abs' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:"__builtin_cabsf"
+ (void)__builtin_labs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_labs' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_cabsf"
+ (void)__builtin_llabs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_llabs' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabsf"
+
+ (void)__builtin_fabsf(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsf' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabsf"
+ (void)__builtin_fabs(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabs' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_cabsf"
+ (void)__builtin_fabsl(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsl' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabsf"
+
+ (void)__builtin_cabsf(x);
+ (void)__builtin_cabs(x);
+ (void)__builtin_cabsl(x);
+}
+
+void test_complex_double(_Complex double x) {
+ (void)abs(x);
+ // expected-warning@-1 {{using integer absolute value function 'abs' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:"cabs"
+ (void)labs(x);
+ // expected-warning@-1 {{using integer absolute value function 'labs' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"cabs"
+ (void)llabs(x);
+ // expected-warning@-1 {{using integer absolute value function 'llabs' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabs"
+
+ (void)fabsf(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabsf' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabs"
+ (void)fabs(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabs' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"cabs"
+ (void)fabsl(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabsl' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabs"
+
+ (void)cabsf(x);
+ // expected-warning@-1 {{absolute value function 'cabsf' given an argument of type '_Complex double' but has parameter of type '_Complex float' which may cause truncation of value}}
+ // expected-note@-2 {{use function 'cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabs"
+ (void)cabs(x);
+ (void)cabsl(x);
+
+ (void)__builtin_abs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_abs' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:"__builtin_cabs"
+ (void)__builtin_labs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_labs' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_cabs"
+ (void)__builtin_llabs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_llabs' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabs"
+
+ (void)__builtin_fabsf(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsf' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabs"
+ (void)__builtin_fabs(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabs' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_cabs"
+ (void)__builtin_fabsl(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsl' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabs"
+
+ (void)__builtin_cabsf(x);
+ // expected-warning@-1 {{absolute value function '__builtin_cabsf' given an argument of type '_Complex double' but has parameter of type '_Complex float' which may cause truncation of value}}
+ // expected-note@-2 {{use function '__builtin_cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabs"
+ (void)__builtin_cabs(x);
+ (void)__builtin_cabsl(x);
+}
+
+void test_complex_long_double(_Complex long double x) {
+ (void)abs(x);
+ // expected-warning@-1 {{using integer absolute value function 'abs' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:"cabsl"
+ (void)labs(x);
+ // expected-warning@-1 {{using integer absolute value function 'labs' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"cabsl"
+ (void)llabs(x);
+ // expected-warning@-1 {{using integer absolute value function 'llabs' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabsl"
+
+ (void)fabsf(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabsf' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabsl"
+ (void)fabs(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabs' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"cabsl"
+ (void)fabsl(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabsl' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabsl"
+
+ (void)cabsf(x);
+ // expected-warning@-1 {{absolute value function 'cabsf' given an argument of type '_Complex long double' but has parameter of type '_Complex float' which may cause truncation of value}}
+ // expected-note@-2 {{use function 'cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabsl"
+ (void)cabs(x);
+ // expected-warning@-1 {{absolute value function 'cabs' given an argument of type '_Complex long double' but has parameter of type '_Complex double' which may cause truncation of value}}
+ // expected-note@-2 {{use function 'cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"cabsl"
+ (void)cabsl(x);
+
+ (void)__builtin_abs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_abs' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:"__builtin_cabsl"
+ (void)__builtin_labs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_labs' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_cabsl"
+ (void)__builtin_llabs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_llabs' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabsl"
+
+ (void)__builtin_fabsf(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsf' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabsl"
+ (void)__builtin_fabs(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabs' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_cabsl"
+ (void)__builtin_fabsl(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsl' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabsl"
+
+ (void)__builtin_cabsf(x);
+ // expected-warning@-1 {{absolute value function '__builtin_cabsf' given an argument of type '_Complex long double' but has parameter of type '_Complex float' which may cause truncation of value}}
+ // expected-note@-2 {{use function '__builtin_cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabsl"
+ (void)__builtin_cabs(x);
+ // expected-warning@-1 {{absolute value function '__builtin_cabs' given an argument of type '_Complex long double' but has parameter of type '_Complex double' which may cause truncation of value}}
+ // expected-note@-2 {{use function '__builtin_cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_cabsl"
+ (void)__builtin_cabsl(x);
+}
+
+void test_unsigned_int(unsigned int x) {
+ (void)abs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to 'abs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:""
+ (void)labs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to 'labs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:""
+ (void)llabs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to 'llabs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
+
+ (void)fabsf(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to 'fabsf' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
+ (void)fabs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to 'fabs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:""
+ (void)fabsl(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to 'fabsl' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
+
+ (void)cabsf(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to 'cabsf' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
+ (void)cabs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to 'cabs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:""
+ (void)cabsl(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to 'cabsl' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
+
+ (void)__builtin_abs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_abs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:""
+ (void)__builtin_labs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_labs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:""
+ (void)__builtin_llabs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_llabs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
+
+ (void)__builtin_fabsf(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_fabsf' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
+ (void)__builtin_fabs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_fabs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:""
+ (void)__builtin_fabsl(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_fabsl' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
+
+ (void)__builtin_cabsf(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_cabsf' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
+ (void)__builtin_cabs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_cabs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:""
+ (void)__builtin_cabsl(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_cabsl' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
+}
+
+void test_unsigned_long(unsigned long x) {
+ (void)abs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to 'abs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:""
+ (void)labs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to 'labs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:""
+ (void)llabs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to 'llabs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
+
+ (void)fabsf(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to 'fabsf' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
+ (void)fabs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to 'fabs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:""
+ (void)fabsl(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to 'fabsl' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
+
+ (void)cabsf(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to 'cabsf' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
+ (void)cabs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to 'cabs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:""
+ (void)cabsl(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to 'cabsl' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
+
+ (void)__builtin_abs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_abs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:""
+ (void)__builtin_labs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_labs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:""
+ (void)__builtin_llabs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_llabs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
+
+ (void)__builtin_fabsf(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_fabsf' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
+ (void)__builtin_fabs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_fabs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:""
+ (void)__builtin_fabsl(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_fabsl' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
+
+ (void)__builtin_cabsf(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_cabsf' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
+ (void)__builtin_cabs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_cabs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:""
+ (void)__builtin_cabsl(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_cabsl' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
+}
+
diff --git a/test/Sema/warn-bitwise-compare.c b/test/Sema/warn-bitwise-compare.c
new file mode 100644
index 000000000000..175f8f5367f3
--- /dev/null
+++ b/test/Sema/warn-bitwise-compare.c
@@ -0,0 +1,28 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wtautological-compare %s
+
+#define mydefine 2
+
+void f(int x) {
+ if ((8 & x) == 3) {} // expected-warning {{bitwise comparison always evaluates to false}}
+ if ((x & 8) == 4) {} // expected-warning {{bitwise comparison always evaluates to false}}
+ if ((x & 8) != 4) {} // expected-warning {{bitwise comparison always evaluates to true}}
+ if ((2 & x) != 4) {} // expected-warning {{bitwise comparison always evaluates to true}}
+ if ((x | 4) == 3) {} // expected-warning {{bitwise comparison always evaluates to false}}
+ if ((x | 3) != 4) {} // expected-warning {{bitwise comparison always evaluates to true}}
+ if ((5 | x) != 3) {} // expected-warning {{bitwise comparison always evaluates to true}}
+ if ((x & 0x15) == 0x13) {} // expected-warning {{bitwise comparison always evaluates to false}}
+ if ((0x23 | x) == 0x155){} // expected-warning {{bitwise comparison always evaluates to false}}
+
+ if ((x & 8) == 8) {}
+ if ((x & 8) != 8) {}
+ if ((x | 4) == 4) {}
+ if ((x | 4) != 4) {}
+
+ if ((x & 9) == 8) {}
+ if ((x & 9) != 8) {}
+ if ((x | 4) == 5) {}
+ if ((x | 4) != 5) {}
+
+ if ((x & mydefine) == 8) {}
+ if ((x | mydefine) == 4) {}
+}
diff --git a/test/Sema/warn-documentation-almost-trailing.c b/test/Sema/warn-documentation-almost-trailing.c
index fa17cac83a9d..9ff71a3bce36 100644
--- a/test/Sema/warn-documentation-almost-trailing.c
+++ b/test/Sema/warn-documentation-almost-trailing.c
@@ -9,6 +9,5 @@ struct a {
int y; /*< comment */ // expected-warning {{not a Doxygen trailing comment}}
};
-// CHECK: fix-it:"{{.*}}":{8:10-8:13}:"///<"
-// CHECK: fix-it:"{{.*}}":{9:10-9:13}:"/**<"
-
+// CHECK: fix-it:"{{.*}}":{[[@LINE-4]]:10-[[@LINE-4]]:13}:"///<"
+// CHECK: fix-it:"{{.*}}":{[[@LINE-4]]:10-[[@LINE-4]]:13}:"/**<"
diff --git a/test/Sema/warn-documentation.cpp b/test/Sema/warn-documentation.cpp
index 7166a4990945..4375cfcf560a 100644
--- a/test/Sema/warn-documentation.cpp
+++ b/test/Sema/warn-documentation.cpp
@@ -4,35 +4,43 @@
// RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s | FileCheck %s -check-prefix=WRONG
// WRONG-NOT: CommentXMLInvalid
+// expected-warning@+2 {{HTML tag 'a' requires an end tag}}
// expected-warning@+1 {{expected quoted string after equals sign}}
/// <a href=>
int test_html1(int);
+// expected-warning@+2 {{HTML tag 'a' requires an end tag}}
// expected-warning@+1 {{expected quoted string after equals sign}}
/// <a href==>
int test_html2(int);
+// expected-warning@+3 {{HTML tag 'a' requires an end tag}}
// expected-warning@+2 {{expected quoted string after equals sign}}
// expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
/// <a href= blah
int test_html3(int);
+// expected-warning@+2 {{HTML tag 'a' requires an end tag}}
// expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
/// <a =>
int test_html4(int);
+// expected-warning@+2 {{HTML tag 'a' requires an end tag}}
// expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
/// <a "aaa">
int test_html5(int);
+// expected-warning@+2 {{HTML tag 'a' requires an end tag}}
// expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
/// <a a="b" =>
int test_html6(int);
+// expected-warning@+2 {{HTML tag 'a' requires an end tag}}
// expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
/// <a a="b" "aaa">
int test_html7(int);
+// expected-warning@+2 {{HTML tag 'a' requires an end tag}}
// expected-warning@+1 {{HTML start tag prematurely ended, expected attribute name or '>'}}
/// <a a="b" =
int test_html8(int);
@@ -67,6 +75,8 @@ int test_html_nesting3(int);
/// Bbb</p>
int test_html_nesting4(int);
+// expected-warning@+3 {{HTML tag 'b' requires an end tag}}
+// expected-warning@+2 {{HTML tag 'i' requires an end tag}}
// expected-warning@+1 {{HTML end tag does not match any start tag}}
/// <b><i>Meow</a>
int test_html_nesting5(int);
@@ -81,6 +91,9 @@ int test_html_nesting6(int);
/// <b><i>Meow</b></i>
int test_html_nesting7(int);
+// expected-warning@+1 {{HTML tag 'b' requires an end tag}}
+/// <b>Meow
+int test_html_nesting8(int);
// expected-warning@+1 {{empty paragraph passed to '\brief' command}}
/// \brief\returns Aaa
@@ -167,7 +180,13 @@ int test_multiple_returns4(int);
// expected-warning@+1 {{'\param' command used in a comment that is not attached to a function declaration}}
/// \param a Blah blah.
-int test_param1;
+int test_param1_backslash;
+
+// rdar://13066276
+// Check that the diagnostic uses the same command marker as the comment.
+// expected-warning@+1 {{'@param' command used in a comment that is not attached to a function declaration}}
+/// @param a Blah blah.
+int test_param1_at;
// expected-warning@+1 {{empty paragraph passed to '\param' command}}
/// \param
@@ -269,41 +288,85 @@ int test_param21(int a);
/// \param x2 Ccc.
int test_param22(int x1, int x2, int x3);
+//===---
+// Test that we treat typedefs to some non-function types as functions for the
+// purposes of documentation comment parsing.
+//===---
+
+namespace foo {
+ inline namespace bar {
+ template<typename>
+ struct function_wrapper {};
+
+ template<unsigned>
+ struct not_a_function_wrapper {};
+ }
+};
+
+// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
+/// \param aaa Meow.
+/// \param bbb Bbb.
+/// \returns aaa.
+typedef int test_function_like_typedef1(int aaa, int ccc);
+
+// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
+/// \param aaa Meow.
+/// \param bbb Bbb.
+/// \returns aaa.
+typedef int (*test_function_like_typedef2)(int aaa, int ccc);
+
+// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
+/// \param aaa Meow.
+/// \param bbb Bbb.
+/// \returns aaa.
+typedef int (* const test_function_like_typedef3)(int aaa, int ccc);
+
+// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
+/// \param aaa Meow.
+/// \param bbb Bbb.
+/// \returns aaa.
+typedef int (C::*test_function_like_typedef4)(int aaa, int ccc);
+
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \returns aaa.
-typedef int test_param23(int aaa, int ccc);
+typedef foo::function_wrapper<int (int aaa, int ccc)> test_function_like_typedef5;
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \returns aaa.
-typedef int (*test_param24)(int aaa, int ccc);
+typedef foo::function_wrapper<int (int aaa, int ccc)> *test_function_like_typedef6;
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \returns aaa.
-typedef int (* const test_param25)(int aaa, int ccc);
+typedef foo::function_wrapper<int (int aaa, int ccc)> &test_function_like_typedef7;
// expected-warning@+2 {{parameter 'bbb' not found in the function declaration}} expected-note@+2 {{did you mean 'ccc'?}}
/// \param aaa Meow.
/// \param bbb Bbb.
/// \returns aaa.
-typedef int (C::*test_param26)(int aaa, int ccc);
+typedef foo::function_wrapper<int (int aaa, int ccc)> &&test_function_like_typedef8;
-typedef int (*test_param27)(int aaa);
+
+typedef int (*test_not_function_like_typedef1)(int aaa);
// expected-warning@+1 {{'\param' command used in a comment that is not attached to a function declaration}}
/// \param aaa Meow.
-typedef test_param27 test_param28;
+typedef test_not_function_like_typedef1 test_not_function_like_typedef2;
// rdar://13066276
+// Check that the diagnostic uses the same command marker as the comment.
// expected-warning@+1 {{'@param' command used in a comment that is not attached to a function declaration}}
/// @param aaa Meow.
-typedef unsigned int test_param29;
+typedef unsigned int test_not_function_like_typedef3;
+// expected-warning@+1 {{'\param' command used in a comment that is not attached to a function declaration}}
+/// \param aaa Meow.
+typedef foo::not_a_function_wrapper<1> test_not_function_like_typedef4;
/// \param aaa Aaa
/// \param ... Vararg
@@ -321,6 +384,26 @@ int test_vararg_param3(int aaa);
int test_vararg_param4();
+/// \param aaa Aaa
+/// \param ... Vararg
+template<typename T>
+int test_template_vararg_param1(int aaa, ...);
+
+/// \param ... Vararg
+template<typename T>
+int test_template_vararg_param2(...);
+
+// expected-warning@+1 {{parameter '...' not found in the function declaration}} expected-note@+1 {{did you mean 'aaa'?}}
+/// \param ... Vararg
+template<typename T>
+int test_template_vararg_param3(int aaa);
+
+// expected-warning@+1 {{parameter '...' not found in the function declaration}}
+/// \param ... Vararg
+template<typename T>
+int test_template_vararg_param4();
+
+
// expected-warning@+1 {{'\tparam' command used in a comment that is not attached to a template declaration}}
/// \tparam T Aaa
int test_tparam1;
@@ -503,7 +586,13 @@ T test_returns_right_decl_5(T aaa);
// expected-warning@+1 {{'\returns' command used in a comment that is not attached to a function or method declaration}}
/// \returns Aaa
-int test_returns_wrong_decl_1;
+int test_returns_wrong_decl_1_backslash;
+
+// rdar://13066276
+// Check that the diagnostic uses the same command marker as the comment.
+// expected-warning@+1 {{'@returns' command used in a comment that is not attached to a function or method declaration}}
+/// @returns Aaa
+int test_returns_wrong_decl_1_at;
// expected-warning@+1 {{'\return' command used in a comment that is not attached to a function or method declaration}}
/// \return Aaa
@@ -555,11 +644,6 @@ enum test_returns_wrong_decl_8 {
/// \returns Aaa
namespace test_returns_wrong_decl_10 { };
-// rdar://13066276
-// expected-warning@+1 {{'@returns' command used in a comment that is not attached to a function or method declaration}}
-/// @returns Aaa
-typedef unsigned int test_returns_wrong_decl_11;
-
// rdar://13094352
// expected-warning@+1 {{'@function' command should be used in a comment attached to a function declaration}}
/*! @function test_function
diff --git a/test/Sema/warn-main-return-type.c b/test/Sema/warn-main-return-type.c
index c6f3a0c1011a..f8bcbc555fc5 100644
--- a/test/Sema/warn-main-return-type.c
+++ b/test/Sema/warn-main-return-type.c
@@ -22,8 +22,8 @@ double main() {
return 0.0;
}
-// Currently we suggest to replace only 'float' here because we don't store
-// enough source locations.
+// TODO: Store qualifier source locations for return types so
+// we can replace the full type with this fix-it.
//
// expected-error@+3 {{conflicting types for 'main}}
// expected-warning@+2 {{return type of 'main' is not 'int'}}
@@ -35,9 +35,11 @@ const float main() {
typedef void *(*fptr)(int a);
-// expected-error@+2 {{conflicting types for 'main}}
-// expected-warning@+1 {{return type of 'main' is not 'int'}}
+// expected-error@+3 {{conflicting types for 'main}}
+// expected-warning@+2 {{return type of 'main' is not 'int'}}
+// expected-note@+1 {{change return type to 'int'}}
fptr main() {
+// CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:1-[[@LINE-1]]:5}:"int"
return (fptr) 0;
}
diff --git a/test/Sema/warn-missing-variable-declarations.c b/test/Sema/warn-missing-variable-declarations.c
index 631d3d213b01..e5ce97da2164 100644
--- a/test/Sema/warn-missing-variable-declarations.c
+++ b/test/Sema/warn-missing-variable-declarations.c
@@ -1,4 +1,4 @@
-// RUN: %clang -Wmissing-variable-declarations -fsyntax-only -Xclang -verify %s
+// RUN: %clang_cc1 -Wmissing-variable-declarations -fsyntax-only -verify %s
int vbad1; // expected-warning{{no previous extern declaration for non-static variable 'vbad1'}}
diff --git a/test/Sema/warn-null.c b/test/Sema/warn-null.c
index 28fb6a5f691c..3bf2aedc445f 100644
--- a/test/Sema/warn-null.c
+++ b/test/Sema/warn-null.c
@@ -1,5 +1,7 @@
// RUN: %clang_cc1 %s -verify
+#define SOME_ADDR (unsigned long long)0
+
// PR10837: Warn if a non-pointer-typed expression is folded to a null pointer
int *p = 0;
int *q = '\0'; // expected-warning{{expression which evaluates to zero treated as a null pointer constant}}
@@ -8,4 +10,5 @@ void f() {
p = 0;
q = '\0'; // expected-warning{{expression which evaluates to zero treated as a null pointer constant}}
r = 1 - 1; // expected-warning{{expression which evaluates to zero treated as a null pointer constant}}
+ p = SOME_ADDR; // expected-warning{{expression which evaluates to zero treated as a null pointer constant}}
}
diff --git a/test/Sema/warn-outof-range-assign-enum.c b/test/Sema/warn-outof-range-assign-enum.c
index 43eea0cef41f..edd4e3722927 100644
--- a/test/Sema/warn-outof-range-assign-enum.c
+++ b/test/Sema/warn-outof-range-assign-enum.c
@@ -11,6 +11,24 @@ typedef enum CCTestEnum
CCTestEnum test = 50; // expected-warning {{integer constant not in range of enumerated type 'CCTestEnum'}}
CCTestEnum test1 = -50; // expected-warning {{integer constant not in range of enumerated type 'CCTestEnum'}}
+// Explicit cast should silence the warning.
+static const CCTestEnum SilenceWithCast1 = 51; // expected-warning {{integer constant not in range of enumerated type 'CCTestEnum'}}
+static const CCTestEnum SilenceWithCast2 = (CCTestEnum) 51; // no-warning
+static const CCTestEnum SilenceWithCast3 = (const CCTestEnum) 51; // no-warning
+static const CCTestEnum SilenceWithCast4 = (const volatile CCTestEnum) 51; // no-warning
+
+void SilenceWithCastLocalVar() {
+ CCTestEnum SilenceWithCast1 = 51; // expected-warning {{integer constant not in range of enumerated type 'CCTestEnum'}}
+ CCTestEnum SilenceWithCast2 = (CCTestEnum) 51; // no-warning
+ CCTestEnum SilenceWithCast3 = (const CCTestEnum) 51; // no-warning
+ CCTestEnum SilenceWithCast4 = (const volatile CCTestEnum) 51; // no-warning
+
+ const CCTestEnum SilenceWithCast1c = 51; // expected-warning {{integer constant not in range of enumerated type 'CCTestEnum'}}
+ const CCTestEnum SilenceWithCast2c = (CCTestEnum) 51; // no-warning
+ const CCTestEnum SilenceWithCast3c = (const CCTestEnum) 51; // no-warning
+ const CCTestEnum SilenceWithCast4c = (const volatile CCTestEnum) 51; // no-warning
+}
+
CCTestEnum foo(CCTestEnum r) {
return 20; // expected-warning {{integer constant not in range of enumerated type 'CCTestEnum'}}
}
diff --git a/test/Sema/warn-overlap.c b/test/Sema/warn-overlap.c
new file mode 100644
index 000000000000..44d6ad5efa5e
--- /dev/null
+++ b/test/Sema/warn-overlap.c
@@ -0,0 +1,64 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wtautological-overlap-compare %s
+
+#define mydefine 2
+
+void f(int x) {
+ int y = 0;
+
+ // > || <
+ if (x > 2 || x < 1) { }
+ if (x > 2 || x < 2) { }
+ if (x != 2 || x != 3) { } // expected-warning {{overlapping comparisons always evaluate to true}}
+ if (x > 2 || x < 3) { } // expected-warning {{overlapping comparisons always evaluate to true}}
+ if (x > 0 || x < 0) { }
+
+ if (x > 2 || x <= 1) { }
+ if (x > 2 || x <= 2) { } // expected-warning {{overlapping comparisons always evaluate to true}}
+ if (x > 2 || x <= 3) { } // expected-warning {{overlapping comparisons always evaluate to true}}
+
+ if (x >= 2 || x < 1) { }
+ if (x >= 2 || x < 2) { } // expected-warning {{overlapping comparisons always evaluate to true}}
+ if (x >= 2 || x < 3) { } // expected-warning {{overlapping comparisons always evaluate to true}}
+
+ if (x >= 2 || x <= 1) { } // expected-warning {{overlapping comparisons always evaluate to true}}
+ if (x >= 2 || x <= 2) { } // expected-warning {{overlapping comparisons always evaluate to true}}
+ if (x >= 2 || x <= 3) { } // expected-warning {{overlapping comparisons always evaluate to true}}
+ if (x >= 0 || x <= 0) { } // expected-warning {{overlapping comparisons always evaluate to true}}
+
+ // > && <
+ if (x > 2 && x < 1) { } // expected-warning {{overlapping comparisons always evaluate to false}}
+ if (x > 2 && x < 2) { } // expected-warning {{overlapping comparisons always evaluate to false}}
+ if (x > 2 && x < 3) { } // expected-warning {{overlapping comparisons always evaluate to false}}
+ if (x > 0 && x < 1) { } // expected-warning {{overlapping comparisons always evaluate to false}}
+
+ if (x > 2 && x <= 1) { } // expected-warning {{overlapping comparisons always evaluate to false}}
+ if (x > 2 && x <= 2) { } // expected-warning {{overlapping comparisons always evaluate to false}}
+ if (x > 2 && x <= 3) { }
+
+ if (x >= 2 && x < 1) { } // expected-warning {{overlapping comparisons always evaluate to false}}
+ if (x >= 2 && x < 2) { } // expected-warning {{overlapping comparisons always evaluate to false}}
+ if (x >= 2 && x < 3) { }
+ if (x >= 0 && x < 0) { } // expected-warning {{overlapping comparisons always evaluate to false}}
+
+ if (x >= 2 && x <= 1) { } // expected-warning {{overlapping comparisons always evaluate to false}}
+ if (x >= 2 && x <= 2) { }
+ if (x >= 2 && x <= 3) { }
+
+ // !=, ==, ..
+ if (x != 2 || x != 3) { } // expected-warning {{overlapping comparisons always evaluate to true}}
+ if (x != 2 || x < 3) { } // expected-warning {{overlapping comparisons always evaluate to true}}
+ if (x == 2 && x == 3) { } // expected-warning {{overlapping comparisons always evaluate to false}}
+ if (x == 2 && x > 3) { } // expected-warning {{overlapping comparisons always evaluate to false}}
+ if (x == 3 && x < 0) { } // expected-warning {{overlapping comparisons always evaluate to false}}
+ if (3 == x && x < 0) { } // expected-warning {{overlapping comparisons always evaluate to false}}
+
+ if (x == mydefine && x > 3) { }
+ if (x == (mydefine + 1) && x > 3) { }
+}
+
+// Don't generate a warning here.
+void array_out_of_bounds() {
+ int x;
+ int buffer[4];
+ x = (-7 > 0) ? (buffer[-7]) : 0;
+}
diff --git a/test/Sema/warn-thread-safety-analysis.c b/test/Sema/warn-thread-safety-analysis.c
index 1918aceee6da..6d41e40d303f 100644
--- a/test/Sema/warn-thread-safety-analysis.c
+++ b/test/Sema/warn-thread-safety-analysis.c
@@ -1,4 +1,4 @@
-// RUN: %clang -fsyntax-only -verify -Wthread-safety -Wthread-safety-beta -fcxx-exceptions %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wthread-safety -Wthread-safety-beta %s
#define LOCKABLE __attribute__ ((lockable))
#define SCOPED_LOCKABLE __attribute__ ((scoped_lockable))
@@ -31,15 +31,12 @@ struct Foo {
struct Mutex *mu_;
};
-// Define mutex lock/unlock functions.
-void mutex_exclusive_lock(struct Mutex *mu) EXCLUSIVE_LOCK_FUNCTION(mu) {
-}
-
-void mutex_shared_lock(struct Mutex *mu) SHARED_LOCK_FUNCTION(mu) {
-}
-
-void mutex_unlock(struct Mutex *mu) UNLOCK_FUNCTION(mu) {
-}
+// Declare mutex lock/unlock functions.
+void mutex_exclusive_lock(struct Mutex *mu) EXCLUSIVE_LOCK_FUNCTION(mu);
+void mutex_shared_lock(struct Mutex *mu) SHARED_LOCK_FUNCTION(mu);
+void mutex_unlock(struct Mutex *mu) UNLOCK_FUNCTION(mu);
+void mutex_shared_unlock(struct Mutex *mu) __attribute__((release_shared_capability(mu)));
+void mutex_exclusive_unlock(struct Mutex *mu) __attribute__((release_capability(mu)));
// Define global variables.
struct Mutex mu1;
@@ -77,14 +74,14 @@ int get_value(int *p) SHARED_LOCKS_REQUIRED(foo_.mu_){
int main() {
- Foo_fun1(1); // expected-warning{{calling function 'Foo_fun1' requires shared lock on 'mu2'}} \
- expected-warning{{calling function 'Foo_fun1' requires exclusive lock on 'mu1'}}
+ Foo_fun1(1); // expected-warning{{calling function 'Foo_fun1' requires holding mutex 'mu2'}} \
+ expected-warning{{calling function 'Foo_fun1' requires holding mutex 'mu1' exclusively}}
mutex_exclusive_lock(&mu1);
mutex_shared_lock(&mu2);
Foo_fun1(1);
- mutex_shared_lock(&mu1); // expected-warning{{locking 'mu1' that is already locked}}
+ mutex_shared_lock(&mu1); // expected-warning{{acquiring mutex 'mu1' that is already held}}
mutex_unlock(&mu1);
mutex_unlock(&mu2);
mutex_shared_lock(&mu1);
@@ -98,13 +95,13 @@ int main() {
mutex_unlock(&mu1);
mutex_exclusive_lock(&mu1);
- Foo_func3(4); // expected-warning{{cannot call function 'Foo_func3' while mutex 'mu1' is locked}}
+ Foo_func3(4); // expected-warning{{cannot call function 'Foo_func3' while mutex 'mu1' is held}}
mutex_unlock(&mu1);
Foo_func3(5);
- set_value(&a_, 0); // expected-warning{{calling function 'setA' requires exclusive lock on 'foo_.mu_'}}
- get_value(b_); // expected-warning{{calling function 'getB' requires shared lock on 'foo_.mu_'}}
+ set_value(&a_, 0); // expected-warning{{calling function 'set_value' requires holding mutex 'foo_.mu_' exclusively}}
+ get_value(b_); // expected-warning{{calling function 'get_value' requires holding mutex 'foo_.mu_'}}
mutex_exclusive_lock(foo_.mu_);
set_value(&a_, 1);
mutex_unlock(foo_.mu_);
@@ -112,12 +109,20 @@ int main() {
(void)(get_value(b_) == 1);
mutex_unlock(foo_.mu_);
- c_ = 0; // expected-warning{{writing variable 'c_' requires locking any mutex exclusively}}
- (void)(*d_ == 0); // expected-warning{{reading the value pointed to by 'd_' requires locking any mutex}}
+ c_ = 0; // expected-warning{{writing variable 'c_' requires holding any mutex exclusively}}
+ (void)(*d_ == 0); // expected-warning{{reading the value pointed to by 'd_' requires holding any mutex}}
mutex_exclusive_lock(foo_.mu_);
c_ = 1;
(void)(*d_ == 1);
mutex_unlock(foo_.mu_);
+ mutex_exclusive_lock(&mu1);
+ mutex_shared_unlock(&mu1); // expected-warning {{releasing mutex 'mu1' using shared access, expected exclusive access}}
+ mutex_exclusive_unlock(&mu1);
+
+ mutex_shared_lock(&mu1);
+ mutex_exclusive_unlock(&mu1); // expected-warning {{releasing mutex 'mu1' using exclusive access, expected shared access}}
+ mutex_shared_unlock(&mu1);
+
return 0;
}
diff --git a/test/Sema/warn-type-safety.c b/test/Sema/warn-type-safety.c
index dfab8f8c818b..04313865a8b8 100644
--- a/test/Sema/warn-type-safety.c
+++ b/test/Sema/warn-type-safety.c
@@ -57,6 +57,8 @@ extern struct A datatype_wrong6
__attribute__(( type_tag_for_datatype(mpi,int,layout_compatible,not_a_flag) )); // expected-error {{invalid comparison flag 'not_a_flag'}}
+void datatype_wrong7(void) __attribute__((type_tag_for_datatype(datatype_wrong7, int))); // expected-error {{'type_tag_for_datatype' attribute only applies to variables}}
+
// Using a tag with kind A in a place where the function requires kind B should
// warn.
@@ -156,5 +158,3 @@ void test_64bit_magic(int *int_ptr, float *float_ptr)
F_func(float_ptr, 0xFFFFFFFFFFFFFFFFULL); // expected-warning {{argument type 'float *' doesn't match specified 'f' type tag that requires 'int *'}}
F_func(float_ptr, 0xFFFFFFFFULL);
}
-
-
diff --git a/test/Sema/warn-unreachable.c b/test/Sema/warn-unreachable.c
index fd74b5c87175..31beff9cf1e0 100644
--- a/test/Sema/warn-unreachable.c
+++ b/test/Sema/warn-unreachable.c
@@ -1,4 +1,6 @@
-// RUN: %clang %s -fsyntax-only -Xclang -verify -fblocks -Wunreachable-code -Wno-unused-value -Wno-covered-switch-default
+// RUN: %clang_cc1 %s -fsyntax-only -verify -fblocks -Wunreachable-code-aggressive -Wno-unused-value -Wno-covered-switch-default -I %S/Inputs
+
+#include "warn-unreachable.h"
int halt() __attribute__((noreturn));
int live();
@@ -107,7 +109,7 @@ int test_enum_cases(enum Cases C) {
case C3:
return 1;
default: {
- int i = 0; // expected-warning{{will never be executed}}
+ int i = 0; // no-warning
++i;
return i;
}
@@ -134,10 +136,263 @@ void PR9774(int *s) {
// Test case for <rdar://problem/11005770>. We should treat code guarded
// by 'x & 0' and 'x * 0' as unreachable.
-void calledFun();
+int calledFun();
void test_mul_and_zero(int x) {
if (x & 0) calledFun(); // expected-warning {{will never be executed}}
if (0 & x) calledFun(); // expected-warning {{will never be executed}}
if (x * 0) calledFun(); // expected-warning {{will never be executed}}
if (0 * x) calledFun(); // expected-warning {{will never be executed}}
}
+
+void raze() __attribute__((noreturn));
+void warn_here();
+
+int test_break_preceded_by_noreturn(int i) {
+ switch (i) {
+ case 1:
+ raze();
+ break; // expected-warning {{'break' will never be executed}}
+ case 2:
+ raze();
+ break; // expected-warning {{'break' will never be executed}}
+ warn_here(); // expected-warning {{will never be executed}}
+ case 3:
+ return 1;
+ break; // expected-warning {{will never be executed}}
+ default:
+ break;
+ break; // expected-warning {{will never be executed}}
+ }
+ return i;
+}
+
+// Don't warn about unreachable 'default' cases, as that is covered
+// by -Wcovered-switch-default.
+typedef enum { Value1 = 1 } MyEnum;
+void unreachable_default(MyEnum e) {
+ switch (e) {
+ case Value1:
+ calledFun();
+ break;
+ case 2: // expected-warning {{case value not in enumerated type 'MyEnum'}}
+ calledFun();
+ break;
+ default:
+ calledFun(); // no-warning
+ break;
+ }
+}
+void unreachable_in_default(MyEnum e) {
+ switch (e) {
+ default:
+ raze();
+ calledFun(); // expected-warning {{will never be executed}}
+ break;
+ }
+}
+
+// Don't warn about trivial dead returns.
+int trivial_dead_return() {
+ raze();
+ return ((0)); // expected-warning {{'return' will never be executed}}
+}
+
+void trivial_dead_return_void() {
+ raze();
+ return; // expected-warning {{'return' will never be executed}}
+}
+
+MyEnum trivial_dead_return_enum() {
+ raze();
+ return Value1; // expected-warning {{'return' will never be executed}}
+}
+
+MyEnum trivial_dead_return_enum_2(int x) {
+ switch (x) {
+ case 1: return 1;
+ case 2: return 2;
+ case 3: return 3;
+ default: return 4;
+ }
+
+ return 2; // expected-warning {{will never be executed}}
+}
+
+const char *trivial_dead_return_cstr() {
+ raze();
+ return ""; // expected-warning {{return' will never be executed}}
+}
+
+char trivial_dead_return_char() {
+ raze();
+ return ' '; // expected-warning {{return' will never be executed}}
+}
+
+MyEnum nontrivial_dead_return_enum_2(int x) {
+ switch (x) {
+ case 1: return 1;
+ case 2: return 2;
+ case 3: return 3;
+ default: return 4;
+ }
+
+ return calledFun(); // expected-warning {{will never be executed}}
+}
+
+enum X { A, B, C };
+
+int covered_switch(enum X x) {
+ switch (x) {
+ case A: return 1;
+ case B: return 2;
+ case C: return 3;
+ }
+ return 4; // no-warning
+}
+
+// Test unreachable code depending on configuration values
+#define CONFIG_CONSTANT 1
+int test_config_constant(int x) {
+ if (!CONFIG_CONSTANT) {
+ calledFun(); // no-warning
+ return 1;
+ }
+ if (!1) { // expected-note {{silence by adding parentheses to mark code as explicitly dead}}
+ calledFun(); // expected-warning {{will never be executed}}
+ return 1;
+ }
+ if (sizeof(int) > sizeof(char)) {
+ calledFun(); // no-warning
+ return 1;
+ }
+ if (x > 10)
+ return CONFIG_CONSTANT ? calledFun() : calledFun(); // no-warning
+ else
+ return 1 ? // expected-note {{silence by adding parentheses to mark code as explicitly dead}}
+ calledFun() :
+ calledFun(); // expected-warning {{will never be executed}}
+}
+
+int sizeof_int(int x, int y) {
+ if (sizeof(long) == sizeof(int))
+ return 1; // no-warning
+ if (sizeof(long) != sizeof(int))
+ return 0; // no-warning
+ if (x && y && sizeof(long) < sizeof(char))
+ return 0; // no-warning
+ return 2; // no-warning
+}
+
+enum MyEnum2 {
+ ME_A = CONFIG_CONSTANT,
+ ME_B = 1
+};
+
+int test_MyEnum() {
+ if (!ME_A)
+ return 1; // no-warning
+ if (ME_A)
+ return 2; // no-warning
+ if (ME_B)
+ return 3;
+ if (!ME_B) // expected-warning {{will never be executed}}
+ return 4; // expected-warning {{will never be executed}}
+ return 5;
+}
+
+// Test for idiomatic do..while.
+int test_do_while(int x) {
+ do {
+ if (x == calledFun())
+ break;
+ ++x;
+ break;
+ }
+ while (0); // no-warning
+ return x;
+}
+
+int test_do_while_nontrivial_cond(int x) {
+ do {
+ if (x == calledFun())
+ break;
+ ++x;
+ break;
+ }
+ while (calledFun()); // expected-warning {{will never be executed}}
+ return x;
+}
+
+// Diagnostic control: -Wunreachable-code-return.
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunreachable-code-return"
+
+void trivial_dead_return_void_SUPPRESSED() {
+ raze();
+ return; // no-warning
+}
+
+MyEnum trivial_dead_return_enum_SUPPRESSED() {
+ raze();
+ return Value1; // no-warning
+}
+
+#pragma clang diagnostic pop
+
+// Diagnostic control: -Wunreachable-code-break.
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wunreachable-code-break"
+
+int test_break_preceded_by_noreturn_SUPPRESSED(int i) {
+ switch (i) {
+ case 1:
+ raze();
+ break; // no-warning
+ case 2:
+ raze();
+ break; // no-warning
+ warn_here(); // expected-warning {{will never be executed}}
+ case 3:
+ return 1;
+ break; // no-warning
+ default:
+ break;
+ break; // no-warning
+ }
+ return i;
+}
+
+#pragma clang diagnostic pop
+
+// Test "silencing" with parentheses.
+void test_with_paren_silencing(int x) {
+ if (0) calledFun(); // expected-warning {{will never be executed}} expected-note {{silence by adding parentheses to mark code as explicitly dead}}
+ if ((0)) calledFun(); // no-warning
+
+ if (1) // expected-note {{silence by adding parentheses to mark code as explicitly dead}}
+ calledFun();
+ else
+ calledFun(); // expected-warning {{will never be executed}}
+
+ if ((1))
+ calledFun();
+ else
+ calledFun(); // no-warning
+
+ if (!1) // expected-note {{silence by adding parentheses to mark code as explicitly dead}}
+ calledFun(); // expected-warning {{code will never be executed}}
+ else
+ calledFun();
+
+ if ((!1))
+ calledFun(); // no-warning
+ else
+ calledFun();
+
+ if (!(1))
+ calledFun(); // no-warning
+ else
+ calledFun();
+}
diff --git a/test/Sema/wchar.c b/test/Sema/wchar.c
index 13c2f5855d5e..74e482a2a0f8 100644
--- a/test/Sema/wchar.c
+++ b/test/Sema/wchar.c
@@ -1,5 +1,5 @@
-// RUN: %clang %s -fsyntax-only -Xclang -verify
-// RUN: %clang %s -fsyntax-only -fshort-wchar -Xclang -verify -DSHORT_WCHAR
+// RUN: %clang_cc1 %s -fsyntax-only -verify
+// RUN: %clang_cc1 %s -fsyntax-only -fshort-wchar -verify -DSHORT_WCHAR
typedef __WCHAR_TYPE__ wchar_t;
diff --git a/test/SemaCUDA/Inputs/cuda.h b/test/SemaCUDA/Inputs/cuda.h
new file mode 100644
index 000000000000..a9a4595a14a9
--- /dev/null
+++ b/test/SemaCUDA/Inputs/cuda.h
@@ -0,0 +1,20 @@
+/* Minimal declarations for CUDA support. Testing purposes only. */
+
+#include <stddef.h>
+
+#define __constant__ __attribute__((constant))
+#define __device__ __attribute__((device))
+#define __global__ __attribute__((global))
+#define __host__ __attribute__((host))
+#define __shared__ __attribute__((shared))
+#define __launch_bounds__(...) __attribute__((launch_bounds(__VA_ARGS__)))
+
+struct dim3 {
+ unsigned x, y, z;
+ __host__ __device__ dim3(unsigned x, unsigned y = 1, unsigned z = 1) : x(x), y(y), z(z) {}
+};
+
+typedef struct cudaStream *cudaStream_t;
+
+int cudaConfigureCall(dim3 gridSize, dim3 blockSize, size_t sharedSize = 0,
+ cudaStream_t stream = 0);
diff --git a/test/SemaCUDA/cuda.h b/test/SemaCUDA/cuda.h
deleted file mode 100644
index 26a8df0440f1..000000000000
--- a/test/SemaCUDA/cuda.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Minimal declarations for CUDA support. Testing purposes only. */
-
-#include <stddef.h>
-
-#define __constant__ __attribute__((constant))
-#define __device__ __attribute__((device))
-#define __global__ __attribute__((global))
-#define __host__ __attribute__((host))
-#define __shared__ __attribute__((shared))
-
-struct dim3 {
- unsigned x, y, z;
- __host__ __device__ dim3(unsigned x, unsigned y = 1, unsigned z = 1) : x(x), y(y), z(z) {}
-};
-
-typedef struct cudaStream *cudaStream_t;
-
-int cudaConfigureCall(dim3 gridSize, dim3 blockSize, size_t sharedSize = 0,
- cudaStream_t stream = 0);
diff --git a/test/SemaCUDA/function-target.cu b/test/SemaCUDA/function-target.cu
index c7a55e2fad83..51bc8c9f559e 100644
--- a/test/SemaCUDA/function-target.cu
+++ b/test/SemaCUDA/function-target.cu
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
-#include "cuda.h"
+#include "Inputs/cuda.h"
__host__ void h1h(void);
__device__ void h1d(void); // expected-note {{candidate function not viable: call to __device__ function from __host__ function}}
diff --git a/test/SemaCUDA/kernel-call.cu b/test/SemaCUDA/kernel-call.cu
index 91b1d49e2d06..9a3d86c47fa0 100644
--- a/test/SemaCUDA/kernel-call.cu
+++ b/test/SemaCUDA/kernel-call.cu
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
-#include "cuda.h"
+#include "Inputs/cuda.h"
__global__ void g1(int x) {}
diff --git a/test/SemaCUDA/launch_bounds.cu b/test/SemaCUDA/launch_bounds.cu
new file mode 100644
index 000000000000..bed7658aed59
--- /dev/null
+++ b/test/SemaCUDA/launch_bounds.cu
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+#include "Inputs/cuda.h"
+
+__launch_bounds__(128, 7) void Test1(void);
+__launch_bounds__(128) void Test2(void);
+
+__launch_bounds__(1, 2, 3) void Test3(void); // expected-error {{'launch_bounds' attribute takes no more than 2 arguments}}
+
+// FIXME: the error should read that the attribute takes exactly one or two arguments, but there
+// is no support for such a diagnostic currently.
+__launch_bounds__() void Test4(void); // expected-error {{'launch_bounds' attribute takes no more than 2 arguments}}
+
+int Test5 __launch_bounds__(128, 7); // expected-warning {{'launch_bounds' attribute only applies to functions and methods}}
diff --git a/test/SemaCUDA/lit.local.cfg b/test/SemaCUDA/lit.local.cfg
new file mode 100644
index 000000000000..f4ef5d2fa02d
--- /dev/null
+++ b/test/SemaCUDA/lit.local.cfg
@@ -0,0 +1,4 @@
+config.substitutions = list(config.substitutions)
+config.substitutions.insert(0,
+ (r'%clang\b',
+ """*** Do not use the driver in Sema tests. ***""") )
diff --git a/test/SemaCUDA/qualifiers.cu b/test/SemaCUDA/qualifiers.cu
index 1346d654b8c4..42a80b8b38c7 100644
--- a/test/SemaCUDA/qualifiers.cu
+++ b/test/SemaCUDA/qualifiers.cu
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
-#include "cuda.h"
+#include "Inputs/cuda.h"
__global__ void g1(int x) {}
__global__ int g2(int x) { // expected-error {{must have void return type}}
diff --git a/test/SemaCXX/MicrosoftCompatibility.cpp b/test/SemaCXX/MicrosoftCompatibility.cpp
index 05037ac6a0d0..fb7d9751d1a5 100644
--- a/test/SemaCXX/MicrosoftCompatibility.cpp
+++ b/test/SemaCXX/MicrosoftCompatibility.cpp
@@ -3,6 +3,7 @@
typedef unsigned short char16_t;
typedef unsigned int char32_t;
+struct _Atomic {};
typename decltype(3) a; // expected-warning {{expected a qualified name after 'typename'}}
@@ -21,6 +22,12 @@ void test()
}
+namespace ms_predefined_types {
+ // ::type_info is a built-in forward class declaration.
+ void f(const type_info &a);
+ void f(size_t);
+}
+
namespace ms_protected_scope {
struct C { C(); };
@@ -105,6 +112,9 @@ public:
class B : public A {
private:
using A::f;
+ void g() {
+ f(); // no diagnostic
+ }
};
class C : public B {
@@ -114,6 +124,27 @@ private:
}
+namespace using_tag_redeclaration
+{
+ struct S;
+ namespace N {
+ using ::using_tag_redeclaration::S;
+ struct S {}; // expected-note {{previous definition is here}}
+ }
+ void f() {
+ N::S s1;
+ S s2;
+ }
+ void g() {
+ struct S; // expected-note {{forward declaration of 'S'}}
+ S s3; // expected-error {{variable has incomplete type 'S'}}
+ }
+ void h() {
+ using ::using_tag_redeclaration::S;
+ struct S {}; // expected-error {{redefinition of 'S'}}
+ }
+}
+
namespace MissingTypename {
diff --git a/test/SemaCXX/MicrosoftExtensions.cpp b/test/SemaCXX/MicrosoftExtensions.cpp
index c5b45a2905c8..6d221a409e7b 100644
--- a/test/SemaCXX/MicrosoftExtensions.cpp
+++ b/test/SemaCXX/MicrosoftExtensions.cpp
@@ -1,10 +1,6 @@
// RUN: %clang_cc1 %s -triple i686-pc-win32 -fsyntax-only -Wmicrosoft -Wc++11-extensions -Wno-long-long -verify -fms-extensions -fexceptions -fcxx-exceptions
-// ::type_info is predeclared with forward class declartion
-void f(const type_info &a);
-
-
// Microsoft doesn't validate exception specification.
namespace microsoft_exception_spec {
@@ -37,11 +33,11 @@ class B : public A {
// MSVC allows type definition in anonymous union and struct
struct A
{
- union
+ union
{
int a;
struct B // expected-warning {{types declared in an anonymous union are a Microsoft extension}}
- {
+ {
int c;
} d;
@@ -63,7 +59,7 @@ struct A
{
int c2;
} d2;
-
+
union C2 // expected-warning {{types declared in an anonymous struct are a Microsoft extension}}
{
int e2;
@@ -78,7 +74,7 @@ struct A
// __stdcall handling
struct M {
int __stdcall addP();
- float __stdcall subtractP();
+ float __stdcall subtractP();
};
// __unaligned handling
@@ -90,7 +86,7 @@ template<typename T> void h1(T (__stdcall M::* const )()) { }
void m1() {
h1<int>(&M::addP);
h1(&M::subtractP);
-}
+}
@@ -98,7 +94,7 @@ void m1() {
void f(long long);
void f(int);
-
+
int main()
{
// This is an ambiguous call in standard C++.
@@ -123,10 +119,11 @@ enum : long long { // expected-warning{{enumeration types with a fixed underlyi
class AAA {
__declspec(dllimport) void f(void) { }
-void f2(void);
+void f2(void); // expected-note{{previous declaration is here}}
};
-__declspec(dllimport) void AAA::f2(void) { // expected-error {{dllimport attribute can be applied only to symbol}}
+__declspec(dllimport) void AAA::f2(void) { // expected-error{{dllimport cannot be applied to non-inline function definition}}
+ // expected-error@-1{{redeclaration of 'AAA::f2' cannot add 'dllimport' attribute}}
}
@@ -147,11 +144,14 @@ extern void static_func();
void static_func(); // expected-note {{previous declaration is here}}
-static void static_func() // expected-warning {{static declaration of 'static_func' follows non-static declaration}}
+static void static_func() // expected-warning {{redeclaring non-static 'static_func' as static is a Microsoft extension}}
{
}
+extern const int static_var; // expected-note {{previous declaration is here}}
+static const int static_var = 3; // expected-warning {{redeclaring non-static 'static_var' as static is a Microsoft extension}}
+
long function_prototype(int a);
long (*function_ptr)(int a);
@@ -176,29 +176,6 @@ void pointer_to_integral_type_conv(char* ptr) {
b = reinterpret_cast<bool>(ptr); // expected-error {{cast from pointer to smaller type 'bool' loses information}}
}
-namespace friend_as_a_forward_decl {
-
-class A {
- class Nested {
- friend class B;
- B* b;
- };
- B* b;
-};
-B* global_b;
-
-
-void f()
-{
- class Local {
- friend class Z;
- Z* b;
- };
- Z* b;
-}
-
-}
-
struct PR11150 {
class X {
virtual void f() = 0;
@@ -307,7 +284,7 @@ struct SP9 {
__declspec(property(get=GetV, put=SetV)) T V;
T GetV() { return 0; }
void SetV(T v) {}
- void f() { V = this->V; V < this->V; }
+ bool f() { V = this->V; return V < this->V; }
void g() { V++; }
void h() { V*=2; }
};
@@ -368,18 +345,18 @@ struct StructWithUnnamedMember {
namespace rdar14250378 {
class Bar {};
-
+
namespace NyNamespace {
class Foo {
public:
Bar* EnsureBar();
};
-
+
class Baz : public Foo {
public:
friend class Bar;
};
-
+
Bar* Foo::EnsureBar() {
return 0;
}
@@ -410,3 +387,14 @@ struct SealedType sealed : SomeBase {
// expected-error@+1 {{base 'SealedType' is marked 'sealed'}}
struct InheritFromSealed : SealedType {};
+
+void AfterClassBody() {
+ // expected-warning@+1 {{attribute 'deprecated' is ignored, place it after "struct" to apply attribute to type declaration}}
+ struct D {} __declspec(deprecated);
+
+ struct __declspec(align(4)) S {} __declspec(align(8)) s1;
+ S s2;
+ _Static_assert(__alignof(S) == 4, "");
+ _Static_assert(__alignof(s1) == 8, "");
+ _Static_assert(__alignof(s2) == 4, "");
+}
diff --git a/test/SemaCXX/PR19955.cpp b/test/SemaCXX/PR19955.cpp
new file mode 100644
index 000000000000..cbbe2fe9af16
--- /dev/null
+++ b/test/SemaCXX/PR19955.cpp
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -triple i686-win32 -verify -std=c++11 %s
+// RUN: %clang_cc1 -triple i686-mingw32 -verify -std=c++11 %s
+
+extern int __attribute__((dllimport)) var;
+constexpr int *varp = &var; // expected-error {{must be initialized by a constant expression}}
+
+extern __attribute__((dllimport)) void fun();
+constexpr void (*funp)(void) = &fun; // expected-error {{must be initialized by a constant expression}}
+
+template <void (*)()>
+struct S {};
+S<&fun> x;
+
+template <int *>
+struct U {};
+U<&var> y;
diff --git a/test/SemaCXX/PR20110.cpp b/test/SemaCXX/PR20110.cpp
new file mode 100644
index 000000000000..e540a738b87b
--- /dev/null
+++ b/test/SemaCXX/PR20110.cpp
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
+// expected-no-diagnostics
+
+// FIXME: These templates should trigger errors in C++11 mode.
+
+template <char const *p>
+class A {
+ char const *get_p() { return *p; }
+};
+template <int p>
+class B {
+ char const *get_p() { return p; }
+};
+
diff --git a/test/SemaCXX/PR8012.cpp b/test/SemaCXX/PR8012.cpp
index 9cfc2b000c01..0a43af7c297c 100644
--- a/test/SemaCXX/PR8012.cpp
+++ b/test/SemaCXX/PR8012.cpp
@@ -1,3 +1,3 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
-void foo (int operator+); // expected-error{{cannot be the name of a parameter}}
+void foo(int operator+); // expected-error{{'operator+' cannot be the name of a parameter}}
diff --git a/test/SemaCXX/__try.cpp b/test/SemaCXX/__try.cpp
index 1c45581b32f9..28a370148878 100644
--- a/test/SemaCXX/__try.cpp
+++ b/test/SemaCXX/__try.cpp
@@ -1,5 +1,4 @@
// RUN: %clang_cc1 -fsyntax-only -verify -fborland-extensions -fcxx-exceptions %s
-// expected-no-diagnostics
// This test is from http://docwiki.embarcadero.com/RADStudio/en/Try
@@ -77,3 +76,14 @@ template void Except<void>();
template void Finally<void>();
}
+
+void test___leave() {
+ // Most tests are in __try.c.
+
+ // Clang accepts try with __finally. MSVC doesn't. (Maybe a Borland thing?)
+ // __leave in mixed blocks isn't supported.
+ try {
+ __leave; // expected-error{{'__leave' statement not in __try block}}
+ } __finally {
+ }
+}
diff --git a/test/SemaCXX/abstract.cpp b/test/SemaCXX/abstract.cpp
index d7e2d0a3dcf9..b521196c23b6 100644
--- a/test/SemaCXX/abstract.cpp
+++ b/test/SemaCXX/abstract.cpp
@@ -268,16 +268,16 @@ namespace pr9247 {
}
namespace pr12658 {
- class C {
- public:
- C(int v){}
- virtual void f() = 0; // expected-note {{unimplemented pure virtual method 'f' in 'C'}}
- };
-
- void foo( C& c ) {}
-
- void bar( void ) {
- foo(C(99)); // expected-error {{allocating an object of abstract class type 'pr12658::C'}}
+ class C {
+ public:
+ C(int v){}
+ virtual void f() = 0; // expected-note {{unimplemented pure virtual method 'f' in 'C'}}
+ };
+
+ void foo( C& c ) {}
+
+ void bar( void ) {
+ foo(C(99)); // expected-error {{allocating an object of abstract class type 'pr12658::C'}}
}
}
diff --git a/test/SemaCXX/access.cpp b/test/SemaCXX/access.cpp
index 5ccd418c1b76..5fa1509c5302 100644
--- a/test/SemaCXX/access.cpp
+++ b/test/SemaCXX/access.cpp
@@ -136,3 +136,25 @@ namespace PR7434 {
};
}
}
+
+namespace LocalExternVar {
+ class test {
+ private:
+ struct private_struct { // expected-note 2{{here}}
+ int x;
+ };
+ int use_private();
+ };
+
+ int test::use_private() {
+ extern int array[sizeof(test::private_struct)]; // ok
+ return array[0];
+ }
+
+ int f() {
+ extern int array[sizeof(test::private_struct)]; // expected-error {{private}}
+ return array[0];
+ }
+
+ int array[sizeof(test::private_struct)]; // expected-error {{private}}
+}
diff --git a/test/SemaCXX/addr-of-overloaded-function-casting.cpp b/test/SemaCXX/addr-of-overloaded-function-casting.cpp
index 784c8a000744..edf4c138a840 100644
--- a/test/SemaCXX/addr-of-overloaded-function-casting.cpp
+++ b/test/SemaCXX/addr-of-overloaded-function-casting.cpp
@@ -1,8 +1,8 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
void g();
-void f(); // expected-note 9{{candidate function}}
-void f(int); // expected-note 9{{candidate function}}
+void f(); // expected-note 11{{candidate function}}
+void f(int); // expected-note 11{{candidate function}}
template <class T>
void t(T); // expected-note 3{{candidate function}} \
@@ -58,4 +58,13 @@ int main()
{ bool b = static_cast<int (&)(char)>(t); } // expected-error{{does not match required}}
{ bool b = static_cast<void (&)(char)>(f); } // expected-error{{does not match}}
+
+ {
+ // The error should be reported when casting overloaded function to the
+ // compatible function type (not to be confused with function pointer or
+ // function reference type.)
+ typedef void (FnType)(int);
+ FnType a = static_cast<FnType>(f); // expected-error{{address of overloaded function}}
+ FnType b = (FnType)(f); // expected-error{{address of overloaded function}}
+ }
}
diff --git a/test/SemaCXX/addr-of-overloaded-function.cpp b/test/SemaCXX/addr-of-overloaded-function.cpp
index 230a1eb994e1..358fe8d5b08e 100644
--- a/test/SemaCXX/addr-of-overloaded-function.cpp
+++ b/test/SemaCXX/addr-of-overloaded-function.cpp
@@ -84,7 +84,7 @@ struct C {
void h() {
// Do not suggest '()' since an int argument is required
- q1<int>; // expected-error-re{{reference to non-static member function must be called$}}
+ q1<int>; // expected-error-re{{reference to non-static member function must be called{{$}}}}
// Suggest '()' since there's a default value for the only argument & the
// type argument is already provided
q2<int>; // expected-error{{reference to non-static member function must be called; did you mean to call it with no arguments?}}
@@ -92,7 +92,7 @@ struct C {
// already provided
q3<int>; // expected-error{{reference to non-static member function must be called; did you mean to call it with no arguments?}}
// Do not suggest '()' since another type argument is required
- q4<int>; // expected-error-re{{reference to non-static member function must be called$}}
+ q4<int>; // expected-error-re{{reference to non-static member function must be called{{$}}}}
// Suggest '()' since the type parameter has a default value
q5; // expected-error{{reference to non-static member function must be called; did you mean to call it with no arguments?}}
}
@@ -220,20 +220,20 @@ namespace test1 {
void QualifierTest() {
void (Qualifiers::*X)();
- X = &Qualifiers::C; // expected-error {{assigning to 'void (test1::Qualifiers::*)()' from incompatible type 'void (test1::Qualifiers::*)() const': different qualifiers (none vs const)}}
- X = &Qualifiers::V; // expected-error{{assigning to 'void (test1::Qualifiers::*)()' from incompatible type 'void (test1::Qualifiers::*)() volatile': different qualifiers (none vs volatile)}}
- X = &Qualifiers::R; // expected-error{{assigning to 'void (test1::Qualifiers::*)()' from incompatible type 'void (test1::Qualifiers::*)() restrict': different qualifiers (none vs restrict)}}
- X = &Qualifiers::CV; // expected-error{{assigning to 'void (test1::Qualifiers::*)()' from incompatible type 'void (test1::Qualifiers::*)() const volatile': different qualifiers (none vs const and volatile)}}
- X = &Qualifiers::CR; // expected-error{{assigning to 'void (test1::Qualifiers::*)()' from incompatible type 'void (test1::Qualifiers::*)() const restrict': different qualifiers (none vs const and restrict)}}
- X = &Qualifiers::VR; // expected-error{{assigning to 'void (test1::Qualifiers::*)()' from incompatible type 'void (test1::Qualifiers::*)() volatile restrict': different qualifiers (none vs volatile and restrict)}}
- X = &Qualifiers::CVR; // expected-error{{assigning to 'void (test1::Qualifiers::*)()' from incompatible type 'void (test1::Qualifiers::*)() const volatile restrict': different qualifiers (none vs const, volatile, and restrict)}}
+ X = &Qualifiers::C; // expected-error-re {{assigning to 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}}' from incompatible type 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}} const': different qualifiers (none vs const)}}
+ X = &Qualifiers::V; // expected-error-re{{assigning to 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}}' from incompatible type 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}} volatile': different qualifiers (none vs volatile)}}
+ X = &Qualifiers::R; // expected-error-re{{assigning to 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}}' from incompatible type 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}} restrict': different qualifiers (none vs restrict)}}
+ X = &Qualifiers::CV; // expected-error-re{{assigning to 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}}' from incompatible type 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}} const volatile': different qualifiers (none vs const and volatile)}}
+ X = &Qualifiers::CR; // expected-error-re{{assigning to 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}}' from incompatible type 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}} const restrict': different qualifiers (none vs const and restrict)}}
+ X = &Qualifiers::VR; // expected-error-re{{assigning to 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}}' from incompatible type 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}} volatile restrict': different qualifiers (none vs volatile and restrict)}}
+ X = &Qualifiers::CVR; // expected-error-re{{assigning to 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}}' from incompatible type 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}} const volatile restrict': different qualifiers (none vs const, volatile, and restrict)}}
}
struct Dummy {
void N() {};
};
- void (Qualifiers::*X)() = &Dummy::N; // expected-error{{cannot initialize a variable of type 'void (test1::Qualifiers::*)()' with an rvalue of type 'void (test1::Dummy::*)()': different classes ('test1::Qualifiers' vs 'test1::Dummy')}}
+ void (Qualifiers::*X)() = &Dummy::N; // expected-error-re{{cannot initialize a variable of type 'void (test1::Qualifiers::*)(){{( __attribute__\(\(thiscall\)\))?}}' with an rvalue of type 'void (test1::Dummy::*)(){{( __attribute__\(\(thiscall\)\))?}}': different classes ('test1::Qualifiers' vs 'test1::Dummy')}}
}
template <typename T> class PR16561 {
diff --git a/test/SemaCXX/aggregate-initialization.cpp b/test/SemaCXX/aggregate-initialization.cpp
index 885bf703dc10..4e4177463f88 100644
--- a/test/SemaCXX/aggregate-initialization.cpp
+++ b/test/SemaCXX/aggregate-initialization.cpp
@@ -49,7 +49,7 @@ struct A {
A(int);
~A();
- A(const A&) = delete; // expected-note 2 {{function has been explicitly marked deleted here}}
+ A(const A&) = delete; // expected-note 2 {{'A' has been explicitly marked deleted here}}
};
struct B {
diff --git a/test/SemaCXX/alias-template.cpp b/test/SemaCXX/alias-template.cpp
index db9c82afd598..89efc501d82c 100644
--- a/test/SemaCXX/alias-template.cpp
+++ b/test/SemaCXX/alias-template.cpp
@@ -102,10 +102,10 @@ class CtorDtorName {
};
namespace TagName {
- template<typename Z> using S = struct { int n; }; // expected-error {{can not be defined}}
- template<typename Z> using T = class { int n; }; // expected-error {{can not be defined}}
- template<typename Z> using U = enum { a, b, c }; // expected-error {{can not be defined}}
- template<typename Z> using V = struct V { int n; }; // expected-error {{'TagName::V' can not be defined in a type alias template}}
+ template<typename Z> using S = struct { int n; }; // expected-error {{cannot be defined}}
+ template<typename Z> using T = class { int n; }; // expected-error {{cannot be defined}}
+ template<typename Z> using U = enum { a, b, c }; // expected-error {{cannot be defined}}
+ template<typename Z> using V = struct V { int n; }; // expected-error {{'TagName::V' cannot be defined in a type alias template}}
}
namespace StdExample {
@@ -136,7 +136,7 @@ namespace Access {
namespace VoidArg {
template<typename Z> using V = void;
V<int> f(int); // ok
- V<char> g(V<double>); // expected-error {{empty parameter list defined with a type alias of 'void' not allowed}}
+ V<char> g(V<double>); // ok (DR577)
}
namespace Curried {
diff --git a/test/SemaCXX/alignof.cpp b/test/SemaCXX/alignof.cpp
index f0b89eef656d..011f459abdf2 100644
--- a/test/SemaCXX/alignof.cpp
+++ b/test/SemaCXX/alignof.cpp
@@ -62,3 +62,18 @@ const int test8 = __alignof__(S5::x);
long long int test14[2];
static_assert(alignof(test14) == 8, "foo"); // expected-warning {{'alignof' applied to an expression is a GNU extension}}
+
+// PR19992
+static_assert(alignof(int[]) == alignof(int), ""); // ok
+
+namespace alignof_array_expr {
+ alignas(32) extern int n[];
+ static_assert(alignof(n) == 32, ""); // expected-warning {{GNU extension}}
+
+ template<int> struct S {
+ static int a[];
+ };
+ template<int N> int S<N>::a[N];
+ // ok, does not complete type of S<-1>::a
+ static_assert(alignof(S<-1>::a) == alignof(int), ""); // expected-warning {{GNU extension}}
+}
diff --git a/test/SemaCXX/anonymous-struct.cpp b/test/SemaCXX/anonymous-struct.cpp
index 8a61041463ba..1b5dc13cea01 100644
--- a/test/SemaCXX/anonymous-struct.cpp
+++ b/test/SemaCXX/anonymous-struct.cpp
@@ -14,3 +14,10 @@ struct E {
static struct {
};
};
+
+template <class T> void foo(T);
+typedef struct { // expected-note {{use a tag name here to establish linkage prior to definition}} expected-note {{declared here}}
+ void test() {
+ foo(this); // expected-warning {{template argument uses unnamed type}}
+ }
+} A; // expected-error {{unsupported: typedef changes linkage of anonymous type, but linkage was already computed}}
diff --git a/test/SemaCXX/anonymous-union-cxx11.cpp b/test/SemaCXX/anonymous-union-cxx11.cpp
index 9f987a9681cd..b0dd1a874deb 100644
--- a/test/SemaCXX/anonymous-union-cxx11.cpp
+++ b/test/SemaCXX/anonymous-union-cxx11.cpp
@@ -12,3 +12,12 @@ namespace PR12866 {
(void)sizeof(bar::member);
}
}
+
+namespace PR20021 {
+class C {
+ union {
+ static_assert(true, "");
+ int i;
+ };
+};
+}
diff --git a/test/SemaCXX/ast-print.cpp b/test/SemaCXX/ast-print.cpp
index a1975b4ac264..4851571283f4 100644
--- a/test/SemaCXX/ast-print.cpp
+++ b/test/SemaCXX/ast-print.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -ast-print %s | FileCheck %s
+// RUN: %clang_cc1 -ast-print %s -std=gnu++11 | FileCheck %s
// CHECK: r;
// CHECK-NEXT: (r->method());
@@ -164,3 +164,47 @@ void test13() {
void test14() {
struct X { union { int x; } x; };
}
+
+
+// CHECK: float test15() {
+// CHECK: return __builtin_asinf(1.F);
+// CHECK: }
+// CHECK-NOT: extern "C"
+float test15() {
+ return __builtin_asinf(1.0F);
+}
+
+namespace PR18776 {
+struct A {
+ operator void *();
+ explicit operator bool();
+ A operator&(A);
+};
+
+// CHECK: struct A
+// CHECK-NEXT: {{^[ ]*operator}} void *();
+// CHECK-NEXT: {{^[ ]*explicit}} operator bool();
+
+void bar(void *);
+
+void foo() {
+ A a, b;
+ bar(a & b);
+// CHECK: bar(a & b);
+ if (a & b)
+// CHECK: if (a & b)
+ return;
+}
+};
+
+namespace {
+void test(int i) {
+ switch (i) {
+ case 1:
+ // CHECK: {{\[\[clang::fallthrough\]\]}}
+ [[clang::fallthrough]];
+ case 2:
+ break;
+ }
+}
+}
diff --git a/test/SemaCXX/atomic-type.cpp b/test/SemaCXX/atomic-type.cpp
new file mode 100644
index 000000000000..ae18eab5b4a9
--- /dev/null
+++ b/test/SemaCXX/atomic-type.cpp
@@ -0,0 +1,85 @@
+// RUN: %clang_cc1 -verify -pedantic %s -std=c++98
+// RUN: %clang_cc1 -verify -pedantic %s -std=c++11
+
+template<typename T> struct atomic {
+ _Atomic(T) value;
+
+ void f() _Atomic; // expected-error {{expected ';' at end of declaration list}}
+};
+
+template<typename T> struct user {
+ struct inner { char n[sizeof(T)]; };
+ atomic<inner> i;
+};
+
+user<int> u;
+
+// Test overloading behavior of atomics.
+struct A { };
+
+int &ovl1(_Atomic(int));
+int &ovl1(_Atomic int); // ok, redeclaration
+long &ovl1(_Atomic(long));
+float &ovl1(_Atomic(float));
+double &ovl1(_Atomic(A const *const *));
+double &ovl1(A const *const *_Atomic);
+short &ovl1(_Atomic(A **));
+
+void test_overloading(int i, float f, _Atomic(int) ai, _Atomic(float) af,
+ long l, _Atomic(long) al, A const *const *acc,
+ A const ** ac, A **a) {
+ int& ir1 = ovl1(i);
+ int& ir2 = ovl1(ai);
+ long& lr1 = ovl1(l);
+ long& lr2 = ovl1(al);
+ float &fr1 = ovl1(f);
+ float &fr2 = ovl1(af);
+ double &dr1 = ovl1(acc);
+ double &dr2 = ovl1(ac);
+ short &sr1 = ovl1(a);
+}
+
+typedef int (A::*fp)() _Atomic; // expected-error {{expected ';' after top level declarator}} expected-warning {{does not declare anything}}
+
+typedef _Atomic(int(A::*)) atomic_mem_ptr_to_int;
+typedef int(A::*_Atomic atomic_mem_ptr_to_int);
+
+typedef _Atomic(int)(A::*mem_ptr_to_atomic_int);
+typedef _Atomic int(A::*mem_ptr_to_atomic_int);
+
+typedef _Atomic(int)&atomic_int_ref;
+typedef _Atomic int &atomic_int_ref;
+typedef _Atomic atomic_int_ref atomic_int_ref; // expected-warning {{'_Atomic' qualifier on reference type 'atomic_int_ref' (aka '_Atomic(int) &') has no effect}}
+
+typedef int &_Atomic atomic_reference_to_int; // expected-error {{'_Atomic' qualifier may not be applied to a reference}}
+typedef _Atomic(int &) atomic_reference_to_int; // expected-error {{_Atomic cannot be applied to reference type 'int &'}}
+
+struct S {
+ _Atomic union { int n; }; // expected-warning {{anonymous union cannot be '_Atomic'}}
+};
+
+namespace copy_init {
+ struct X {
+ X(int);
+ int n;
+ };
+ _Atomic(X) y = X(0);
+ _Atomic(X) z(X(0));
+ void f() { y = X(0); }
+
+ _Atomic(X) e1(0); // expected-error {{cannot initialize}}
+#if __cplusplus >= 201103L
+ _Atomic(X) e2{0}; // expected-error {{illegal initializer}}
+ _Atomic(X) a{X(0)};
+#endif
+
+ struct Y {
+ _Atomic(X) a;
+ _Atomic(int) b;
+ };
+ Y y1 = { X(0), 4 };
+ Y y2 = { 0, 4 }; // expected-error {{cannot initialize}}
+ // FIXME: It's not really clear if we should allow these. Generally, C++11
+ // allows extraneous braces around initializers.
+ Y y3 = { { X(0) }, { 4 } }; // expected-error 2{{illegal initializer type}}
+}
diff --git a/test/SemaCXX/atomic-type.cxx b/test/SemaCXX/atomic-type.cxx
deleted file mode 100644
index 947bb3c5f406..000000000000
--- a/test/SemaCXX/atomic-type.cxx
+++ /dev/null
@@ -1,58 +0,0 @@
-// RUN: %clang_cc1 -verify -pedantic %s
-
-template<typename T> struct atomic {
- _Atomic(T) value;
-
- void f() _Atomic; // expected-error {{expected ';' at end of declaration list}}
-};
-
-template<typename T> struct user {
- struct inner { char n[sizeof(T)]; };
- atomic<inner> i;
-};
-
-user<int> u;
-
-// Test overloading behavior of atomics.
-struct A { };
-
-int &ovl1(_Atomic(int));
-int &ovl1(_Atomic int); // ok, redeclaration
-long &ovl1(_Atomic(long));
-float &ovl1(_Atomic(float));
-double &ovl1(_Atomic(A const *const *));
-double &ovl1(A const *const *_Atomic);
-short &ovl1(_Atomic(A **));
-
-void test_overloading(int i, float f, _Atomic(int) ai, _Atomic(float) af,
- long l, _Atomic(long) al, A const *const *acc,
- A const ** ac, A **a) {
- int& ir1 = ovl1(i);
- int& ir2 = ovl1(ai);
- long& lr1 = ovl1(l);
- long& lr2 = ovl1(al);
- float &fr1 = ovl1(f);
- float &fr2 = ovl1(af);
- double &dr1 = ovl1(acc);
- double &dr2 = ovl1(ac);
- short &sr1 = ovl1(a);
-}
-
-typedef int (A::*fp)() _Atomic; // expected-error {{expected ';' after top level declarator}} expected-warning {{does not declare anything}}
-
-typedef _Atomic(int(A::*)) atomic_mem_ptr_to_int;
-typedef int(A::*_Atomic atomic_mem_ptr_to_int);
-
-typedef _Atomic(int)(A::*mem_ptr_to_atomic_int);
-typedef _Atomic int(A::*mem_ptr_to_atomic_int);
-
-typedef _Atomic(int)&atomic_int_ref;
-typedef _Atomic int &atomic_int_ref;
-typedef _Atomic atomic_int_ref atomic_int_ref; // ok, qualifiers on references ignored in this case.
-
-typedef int &_Atomic atomic_reference_to_int; // expected-error {{'_Atomic' qualifier may not be applied to a reference}}
-typedef _Atomic(int &) atomic_reference_to_int; // expected-error {{_Atomic cannot be applied to reference type 'int &'}}
-
-struct S {
- _Atomic union { int n; }; // expected-warning {{anonymous union cannot be '_Atomic'}}
-};
diff --git a/test/SemaCXX/attr-common.cpp b/test/SemaCXX/attr-common.cpp
index 58b30133f52f..fb98639d1b2c 100644
--- a/test/SemaCXX/attr-common.cpp
+++ b/test/SemaCXX/attr-common.cpp
@@ -1,3 +1,3 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
-__attribute__((common)) int x; // expected-error {{common attribute is not supported in C++}}
+__attribute__((common)) int x; // expected-error {{'common' attribute is not supported in C++}}
diff --git a/test/SemaCXX/attr-cxx0x.cpp b/test/SemaCXX/attr-cxx0x.cpp
index e24e12e50c4e..6ba89a62d70d 100644
--- a/test/SemaCXX/attr-cxx0x.cpp
+++ b/test/SemaCXX/attr-cxx0x.cpp
@@ -45,3 +45,8 @@ static_assert(alignof(align_class_temp_pack_expr<8, 16, 32>) == 32, "template's
static_assert(alignof(outer<int,char>::inner<double,short>) == alignof(int) * alignof(double), "template's alignment is wrong");
static_assert(alignof(int(int)) >= 1, "alignof(function) not positive"); // expected-error{{invalid application of 'alignof' to a function type}}
+
+[[__carries_dependency__]] // expected-warning{{unknown attribute '__carries_dependency__' ignored}}
+void func(void);
+
+alignas(4) auto PR19252 = 0;
diff --git a/test/SemaCXX/attr-deprecated.cpp b/test/SemaCXX/attr-deprecated.cpp
index b3223f399799..d28eb75cca65 100644
--- a/test/SemaCXX/attr-deprecated.cpp
+++ b/test/SemaCXX/attr-deprecated.cpp
@@ -1,10 +1,10 @@
// RUN: %clang_cc1 %s -verify -fexceptions
class A {
- void f() __attribute__((deprecated)); // expected-note 2 {{declared here}}
+ void f() __attribute__((deprecated)); // expected-note 2 {{'f' has been explicitly marked deprecated here}}
void g(A* a);
void h(A* a) __attribute__((deprecated));
- int b __attribute__((deprecated)); // expected-note 2 {{declared here}}
+ int b __attribute__((deprecated)); // expected-note 2 {{'b' has been explicitly marked deprecated here}}
};
void A::g(A* a)
@@ -26,7 +26,7 @@ void A::h(A* a)
}
struct B {
- virtual void f() __attribute__((deprecated)); // expected-note 4 {{declared here}}
+ virtual void f() __attribute__((deprecated)); // expected-note 4 {{'f' has been explicitly marked deprecated here}}
void g();
};
@@ -68,20 +68,20 @@ void f(D* d) {
// Overloaded namespace members.
namespace test1 {
- void foo(int) __attribute__((deprecated)); // expected-note {{declared here}}
+ void foo(int) __attribute__((deprecated)); // expected-note {{'foo' has been explicitly marked deprecated here}}
void test1() { foo(10); } // expected-warning {{deprecated}}
- void foo(short) __attribute__((deprecated)); // expected-note {{declared here}}
+ void foo(short) __attribute__((deprecated)); // expected-note {{'foo' has been explicitly marked deprecated here}}
void test2(short s) { foo(s); } // expected-warning {{deprecated}}
void foo(long);
void test3(long l) { foo(l); }
struct A {
- friend void foo(A*) __attribute__((deprecated)); // expected-note {{declared here}}
+ friend void foo(A*) __attribute__((deprecated)); // expected-note {{'foo' has been explicitly marked deprecated here}}
};
void test4(A *a) { foo(a); } // expected-warning {{deprecated}}
namespace ns {
struct Foo {};
- void foo(const Foo &f) __attribute__((deprecated)); // expected-note {{declared here}}
+ void foo(const Foo &f) __attribute__((deprecated)); // expected-note {{'foo' has been explicitly marked deprecated here}}
}
void test5() {
foo(ns::Foo()); // expected-warning {{deprecated}}
@@ -91,9 +91,9 @@ namespace test1 {
// Overloaded class members.
namespace test2 {
struct A {
- void foo(int) __attribute__((deprecated)); // expected-note 2 {{declared here}}
+ void foo(int) __attribute__((deprecated)); // expected-note 2 {{'foo' has been explicitly marked deprecated here}}
void foo(long);
- static void bar(int) __attribute__((deprecated)); // expected-note 3 {{declared here}}
+ static void bar(int) __attribute__((deprecated)); // expected-note 3 {{'bar' has been explicitly marked deprecated here}}
static void bar(long);
void test2(int i, long l);
@@ -120,12 +120,12 @@ namespace test2 {
namespace test3 {
struct A {
void operator*(const A &);
- void operator*(int) __attribute__((deprecated)); // expected-note {{declared here}}
+ void operator*(int) __attribute__((deprecated)); // expected-note {{'operator*' has been explicitly marked deprecated here}}
void operator-(const A &) const;
};
void operator+(const A &, const A &);
- void operator+(const A &, int) __attribute__((deprecated)); // expected-note {{declared here}}
- void operator-(const A &, int) __attribute__((deprecated)); // expected-note {{declared here}}
+ void operator+(const A &, int) __attribute__((deprecated)); // expected-note {{'operator+' has been explicitly marked deprecated here}}
+ void operator-(const A &, int) __attribute__((deprecated)); // expected-note {{'operator-' has been explicitly marked deprecated here}}
void test() {
A a, b;
@@ -143,9 +143,9 @@ namespace test4 {
struct A {
typedef void (*intfn)(int);
typedef void (*unintfn)(unsigned);
- operator intfn() __attribute__((deprecated)); // expected-note {{declared here}}
+ operator intfn() __attribute__((deprecated)); // expected-note {{'operator void (*)(int)' has been explicitly marked deprecated here}}
operator unintfn();
- void operator ()(A &) __attribute__((deprecated)); // expected-note {{declared here}}
+ void operator ()(A &) __attribute__((deprecated)); // expected-note {{'operator()' has been explicitly marked deprecated here}}
void operator ()(const A &);
};
@@ -163,7 +163,7 @@ namespace test4 {
namespace test5 {
struct A {
- operator int() __attribute__((deprecated)); // expected-note 3 {{declared here}}
+ operator int() __attribute__((deprecated)); // expected-note 3 {{'operator int' has been explicitly marked deprecated here}}
operator long();
};
void test1(A a) {
@@ -193,8 +193,8 @@ namespace test5 {
// rdar://problem/8518751
namespace test6 {
- enum __attribute__((deprecated)) A { // expected-note {{declared here}}
- a0 // expected-note {{declared here}}
+ enum __attribute__((deprecated)) A { // expected-note {{'A' has been explicitly marked deprecated here}}
+ a0 // expected-note {{'a0' has been explicitly marked deprecated here}}
};
void testA() {
A x; // expected-warning {{'A' is deprecated}}
@@ -202,7 +202,7 @@ namespace test6 {
}
enum B {
- b0 __attribute__((deprecated)), // expected-note {{declared here}}
+ b0 __attribute__((deprecated)), // expected-note {{'b0' has been explicitly marked deprecated here}}
b1
};
void testB() {
@@ -212,8 +212,8 @@ namespace test6 {
}
template <class T> struct C {
- enum __attribute__((deprecated)) Enum { // expected-note {{declared here}}
- c0 // expected-note {{declared here}}
+ enum __attribute__((deprecated)) Enum { // expected-note {{'Enum' has been explicitly marked deprecated here}}
+ c0 // expected-note {{'c0' has been explicitly marked deprecated here}}
};
};
void testC() {
@@ -224,7 +224,7 @@ namespace test6 {
template <class T> struct D {
enum Enum {
d0,
- d1 __attribute__((deprecated)), // expected-note {{declared here}}
+ d1 __attribute__((deprecated)), // expected-note {{'d1' has been explicitly marked deprecated here}}
};
};
void testD() {
@@ -236,8 +236,8 @@ namespace test6 {
namespace test7 {
struct X {
- void* operator new(typeof(sizeof(void*))) __attribute__((deprecated)); // expected-note{{'operator new' declared here}}
- void operator delete(void *) __attribute__((deprecated)); // expected-note{{'operator delete' declared here}}
+ void* operator new(typeof(sizeof(void*))) __attribute__((deprecated)); // expected-note{{'operator new' has been explicitly marked deprecated here}}
+ void operator delete(void *) __attribute__((deprecated)); // expected-note{{'operator delete' has been explicitly marked deprecated here}}
};
void test() {
@@ -247,6 +247,6 @@ namespace test7 {
// rdar://problem/15044218
typedef struct TDS {
-} TDS __attribute__((deprecated)); // expected-note {{'TDS' declared here}}
+} TDS __attribute__((deprecated)); // expected-note {{'TDS' has been explicitly marked deprecated here}}
TDS tds; // expected-warning {{'TDS' is deprecated}}
struct TDS tds2; // no warning, attribute only applies to the typedef.
diff --git a/test/SemaCXX/attr-flatten.cpp b/test/SemaCXX/attr-flatten.cpp
new file mode 100644
index 000000000000..afcba72b6429
--- /dev/null
+++ b/test/SemaCXX/attr-flatten.cpp
@@ -0,0 +1,34 @@
+// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
+
+int i __attribute__((flatten)); // expected-error {{'flatten' attribute only applies to functions}}
+
+void f1() __attribute__((flatten));
+void f2() __attribute__((flatten(1))); // expected-error {{'flatten' attribute takes no arguments}}
+
+template <typename T>
+void tf1() __attribute__((flatten));
+
+int f3(int __attribute__((flatten)), int); // expected-error{{'flatten' attribute only applies to functions}}
+
+struct A {
+ int f __attribute__((flatten)); // expected-error{{'flatten' attribute only applies to functions}}
+ void mf1() __attribute__((flatten));
+ static void mf2() __attribute__((flatten));
+};
+
+int ci [[gnu::flatten]]; // expected-error {{'flatten' attribute only applies to functions}}
+
+[[gnu::flatten]] void cf1();
+[[gnu::flatten(1)]] void cf2(); // expected-error {{'flatten' attribute takes no arguments}}
+
+template <typename T>
+[[gnu::flatten]]
+void ctf1();
+
+int cf3(int c[[gnu::flatten]], int); // expected-error{{'flatten' attribute only applies to functions}}
+
+struct CA {
+ int f [[gnu::flatten]]; // expected-error{{'flatten' attribute only applies to functions}}
+ [[gnu::flatten]] void mf1();
+ [[gnu::flatten]] static void mf2();
+};
diff --git a/test/SemaCXX/attr-no-sanitize-address.cpp b/test/SemaCXX/attr-no-sanitize-address.cpp
index f1803496fa55..9ca28630552b 100644
--- a/test/SemaCXX/attr-no-sanitize-address.cpp
+++ b/test/SemaCXX/attr-no-sanitize-address.cpp
@@ -15,23 +15,23 @@ int noanal_testfn(int y) NO_SANITIZE_ADDRESS;
int noanal_testfn(int y) {
int x NO_SANITIZE_ADDRESS = y; // \
- // expected-error {{'no_sanitize_address' attribute only applies to functions and methods}}
+ // expected-error {{'no_sanitize_address' attribute only applies to functions}}
return x;
}
int noanal_test_var NO_SANITIZE_ADDRESS; // \
- // expected-error {{'no_sanitize_address' attribute only applies to functions and methods}}
+ // expected-error {{'no_sanitize_address' attribute only applies to functions}}
class NoanalFoo {
private:
int test_field NO_SANITIZE_ADDRESS; // \
- // expected-error {{'no_sanitize_address' attribute only applies to functions and methods}}
+ // expected-error {{'no_sanitize_address' attribute only applies to functions}}
void test_method() NO_SANITIZE_ADDRESS;
};
class NO_SANITIZE_ADDRESS NoanalTestClass { // \
- // expected-error {{'no_sanitize_address' attribute only applies to functions and methods}}
+ // expected-error {{'no_sanitize_address' attribute only applies to functions}}
};
void noanal_fun_params(int lvar NO_SANITIZE_ADDRESS); // \
- // expected-error {{'no_sanitize_address' attribute only applies to functions and methods}}
+ // expected-error {{'no_sanitize_address' attribute only applies to functions}}
diff --git a/test/SemaCXX/attr-no-sanitize-memory.cpp b/test/SemaCXX/attr-no-sanitize-memory.cpp
index d6eca1b69dc1..9cbcb03d6ecf 100644
--- a/test/SemaCXX/attr-no-sanitize-memory.cpp
+++ b/test/SemaCXX/attr-no-sanitize-memory.cpp
@@ -15,23 +15,23 @@ int noanal_testfn(int y) NO_SANITIZE_MEMORY;
int noanal_testfn(int y) {
int x NO_SANITIZE_MEMORY = y; // \
- // expected-error {{'no_sanitize_memory' attribute only applies to functions and methods}}
+ // expected-error {{'no_sanitize_memory' attribute only applies to functions}}
return x;
}
int noanal_test_var NO_SANITIZE_MEMORY; // \
- // expected-error {{'no_sanitize_memory' attribute only applies to functions and methods}}
+ // expected-error {{'no_sanitize_memory' attribute only applies to functions}}
class NoanalFoo {
private:
int test_field NO_SANITIZE_MEMORY; // \
- // expected-error {{'no_sanitize_memory' attribute only applies to functions and methods}}
+ // expected-error {{'no_sanitize_memory' attribute only applies to functions}}
void test_method() NO_SANITIZE_MEMORY;
};
class NO_SANITIZE_MEMORY NoanalTestClass { // \
- // expected-error {{'no_sanitize_memory' attribute only applies to functions and methods}}
+ // expected-error {{'no_sanitize_memory' attribute only applies to functions}}
};
void noanal_fun_params(int lvar NO_SANITIZE_MEMORY); // \
- // expected-error {{'no_sanitize_memory' attribute only applies to functions and methods}}
+ // expected-error {{'no_sanitize_memory' attribute only applies to functions}}
diff --git a/test/SemaCXX/attr-no-sanitize-thread.cpp b/test/SemaCXX/attr-no-sanitize-thread.cpp
index d6372bceff8a..6cb9c715bf6c 100644
--- a/test/SemaCXX/attr-no-sanitize-thread.cpp
+++ b/test/SemaCXX/attr-no-sanitize-thread.cpp
@@ -15,23 +15,23 @@ int noanal_testfn(int y) NO_SANITIZE_THREAD;
int noanal_testfn(int y) {
int x NO_SANITIZE_THREAD = y; // \
- // expected-error {{'no_sanitize_thread' attribute only applies to functions and methods}}
+ // expected-error {{'no_sanitize_thread' attribute only applies to functions}}
return x;
}
int noanal_test_var NO_SANITIZE_THREAD; // \
- // expected-error {{'no_sanitize_thread' attribute only applies to functions and methods}}
+ // expected-error {{'no_sanitize_thread' attribute only applies to functions}}
class NoanalFoo {
private:
int test_field NO_SANITIZE_THREAD; // \
- // expected-error {{'no_sanitize_thread' attribute only applies to functions and methods}}
+ // expected-error {{'no_sanitize_thread' attribute only applies to functions}}
void test_method() NO_SANITIZE_THREAD;
};
class NO_SANITIZE_THREAD NoanalTestClass { // \
- // expected-error {{'no_sanitize_thread' attribute only applies to functions and methods}}
+ // expected-error {{'no_sanitize_thread' attribute only applies to functions}}
};
void noanal_fun_params(int lvar NO_SANITIZE_THREAD); // \
- // expected-error {{'no_sanitize_thread' attribute only applies to functions and methods}}
+ // expected-error {{'no_sanitize_thread' attribute only applies to functions}}
diff --git a/test/SemaCXX/attr-no-split-stack.cpp b/test/SemaCXX/attr-no-split-stack.cpp
new file mode 100644
index 000000000000..3575e9983f41
--- /dev/null
+++ b/test/SemaCXX/attr-no-split-stack.cpp
@@ -0,0 +1,34 @@
+// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
+
+int i __attribute__((no_split_stack)); // expected-error {{'no_split_stack' attribute only applies to functions}}
+
+void f1() __attribute__((no_split_stack));
+void f2() __attribute__((no_split_stack(1))); // expected-error {{'no_split_stack' attribute takes no arguments}}
+
+template <typename T>
+void tf1() __attribute__((no_split_stack));
+
+int f3(int __attribute__((no_split_stack)), int); // expected-error{{'no_split_stack' attribute only applies to functions}}
+
+struct A {
+ int f __attribute__((no_split_stack)); // expected-error{{'no_split_stack' attribute only applies to functions}}
+ void mf1() __attribute__((no_split_stack));
+ static void mf2() __attribute__((no_split_stack));
+};
+
+int ci [[gnu::no_split_stack]]; // expected-error {{'no_split_stack' attribute only applies to functions}}
+
+[[gnu::no_split_stack]] void cf1();
+[[gnu::no_split_stack(1)]] void cf2(); // expected-error {{'no_split_stack' attribute takes no arguments}}
+
+template <typename T>
+[[gnu::no_split_stack]]
+void ctf1();
+
+int cf3(int c[[gnu::no_split_stack]], int); // expected-error{{'no_split_stack' attribute only applies to functions}}
+
+struct CA {
+ int f [[gnu::no_split_stack]]; // expected-error{{'no_split_stack' attribute only applies to functions}}
+ [[gnu::no_split_stack]] void mf1();
+ [[gnu::no_split_stack]] static void mf2();
+};
diff --git a/test/SemaCXX/attr-optnone.cpp b/test/SemaCXX/attr-optnone.cpp
new file mode 100644
index 000000000000..eaa50004047c
--- /dev/null
+++ b/test/SemaCXX/attr-optnone.cpp
@@ -0,0 +1,47 @@
+// RUN: %clang_cc1 -std=c++11 -fms-compatibility -fsyntax-only -verify %s
+
+int foo() __attribute__((optnone));
+int bar() __attribute__((optnone)) __attribute__((noinline));
+
+int baz() __attribute__((always_inline)) __attribute__((optnone)); // expected-error{{'always_inline' and 'optnone' attributes are not compatible}}
+int quz() __attribute__((optnone)) __attribute__((always_inline)); // expected-error{{'optnone' and 'always_inline' attributes are not compatible}}
+
+__forceinline __attribute__((optnone)) int bax(); // expected-error{{'__forceinline' and 'optnone' attributes are not compatible}}
+__attribute__((optnone)) __forceinline int qux(); // expected-error{{'optnone' and '__forceinline' attributes are not compatible}}
+
+int globalVar __attribute__((optnone)); // expected-warning{{'optnone' attribute only applies to functions}}
+
+int fubar(int __attribute__((optnone)), int); // expected-warning{{'optnone' attribute only applies to functions}}
+
+struct A {
+ int aField __attribute__((optnone)); // expected-warning{{'optnone' attribute only applies to functions}}
+};
+
+struct B {
+ void foo() __attribute__((optnone));
+ static void bar() __attribute__((optnone));
+};
+
+// Verify that we can specify the [[clang::optnone]] syntax as well.
+
+[[clang::optnone]]
+int foo2();
+[[clang::optnone]]
+int bar2() __attribute__((noinline));
+
+[[clang::optnone]]
+int baz2() __attribute__((always_inline)); // expected-error{{'always_inline' and 'optnone' attributes are not compatible}}
+
+[[clang::optnone]] int globalVar2; //expected-warning{{'optnone' attribute only applies to functions}}
+
+struct A2 {
+ [[clang::optnone]] int aField; // expected-warning{{'optnone' attribute only applies to functions}}
+};
+
+struct B2 {
+ [[clang::optnone]]
+ void foo();
+ [[clang::optnone]]
+ static void bar();
+};
+
diff --git a/test/SemaCXX/attr-selectany.cpp b/test/SemaCXX/attr-selectany.cpp
index 0f9776dbf5db..c27a9159215f 100644
--- a/test/SemaCXX/attr-selectany.cpp
+++ b/test/SemaCXX/attr-selectany.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fms-extensions -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fms-extensions -fsyntax-only -verify -std=c++11 %s
// MSVC produces similar diagnostics.
__declspec(selectany) void foo() { } // expected-error{{'selectany' can only be applied to data items with external linkage}}
@@ -31,3 +31,6 @@ class X {
};
__declspec(selectany) X x(1);
+
+namespace { class Internal {}; }
+__declspec(selectany) auto x8 = Internal(); // expected-error {{'selectany' can only be applied to data items with external linkage}}
diff --git a/test/SemaCXX/attr-unavailable.cpp b/test/SemaCXX/attr-unavailable.cpp
index 2d82668a205a..51dc8fe3789e 100644
--- a/test/SemaCXX/attr-unavailable.cpp
+++ b/test/SemaCXX/attr-unavailable.cpp
@@ -3,7 +3,7 @@
int &foo(int); // expected-note {{candidate}}
double &foo(double); // expected-note {{candidate}}
void foo(...) __attribute__((__unavailable__)); // expected-note {{candidate function}} \
-// expected-note{{function has been explicitly marked unavailable here}}
+// expected-note{{'foo' has been explicitly marked unavailable here}}
void bar(...) __attribute__((__unavailable__)); // expected-note 2{{explicitly marked unavailable}}
@@ -37,3 +37,22 @@ void unavail(short* sp) {
foo(sp);
foo();
}
+
+// Show that delayed processing of 'unavailable' is the same
+// delayed process for 'deprecated'.
+// <rdar://problem/12241361> and <rdar://problem/15584219>
+enum DeprecatedEnum { DE_A, DE_B } __attribute__((deprecated)); // expected-note {{'DeprecatedEnum' has been explicitly marked deprecated here}}
+__attribute__((deprecated)) typedef enum DeprecatedEnum DeprecatedEnum;
+typedef enum DeprecatedEnum AnotherDeprecatedEnum; // expected-warning {{'DeprecatedEnum' is deprecated}}
+
+__attribute__((deprecated))
+DeprecatedEnum testDeprecated(DeprecatedEnum X) { return X; }
+
+
+enum UnavailableEnum { UE_A, UE_B } __attribute__((unavailable)); // expected-note {{'UnavailableEnum' has been explicitly marked unavailable here}}
+__attribute__((unavailable)) typedef enum UnavailableEnum UnavailableEnum;
+typedef enum UnavailableEnum AnotherUnavailableEnum; // expected-error {{'UnavailableEnum' is unavailable}}
+
+
+__attribute__((unavailable))
+UnavailableEnum testUnavailable(UnavailableEnum X) { return X; }
diff --git a/test/SemaCXX/attr-used.cpp b/test/SemaCXX/attr-used.cpp
index 9bae3edc7f8b..65df861f8321 100644
--- a/test/SemaCXX/attr-used.cpp
+++ b/test/SemaCXX/attr-used.cpp
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
-extern char test1[] __attribute__((used)); // expected-warning {{used attribute ignored}}
-extern const char test2[] __attribute__((used)); // expected-warning {{used attribute ignored}}
+extern char test1[] __attribute__((used)); // expected-warning {{'used' attribute ignored}}
+extern const char test2[] __attribute__((used)); // expected-warning {{'used' attribute ignored}}
extern const char test3[] __attribute__((used)) = "";
diff --git a/test/SemaCXX/attr-weak.cpp b/test/SemaCXX/attr-weak.cpp
index 8939a28d75e1..8ba3a954282d 100644
--- a/test/SemaCXX/attr-weak.cpp
+++ b/test/SemaCXX/attr-weak.cpp
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -verify -std=c++11 %s
static int test0 __attribute__((weak)); // expected-error {{weak declaration cannot have internal linkage}}
static void test1() __attribute__((weak)); // expected-error {{weak declaration cannot have internal linkage}}
-namespace test2 __attribute__((weak)) { // expected-warning {{'weak' attribute only applies to variables and functions}}
+namespace test2 __attribute__((weak)) { // expected-warning {{'weak' attribute only applies to variables, functions and classes}}
}
namespace {
@@ -31,6 +31,10 @@ template <class T> struct Test7 {
};
template <class T>
int Test7<T>::var;
-namespace { class Internal; }
+namespace { class Internal {}; }
template struct Test7<Internal>;
template struct Test7<int>;
+
+class __attribute__((weak)) Test8 {}; // OK
+
+__attribute__((weak)) auto Test9 = Internal(); // expected-error {{weak declaration cannot have internal linkage}}
diff --git a/test/SemaCXX/attr-weakref.cpp b/test/SemaCXX/attr-weakref.cpp
index 0c3f1d20e7f7..46ca5ab20682 100644
--- a/test/SemaCXX/attr-weakref.cpp
+++ b/test/SemaCXX/attr-weakref.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fsyntax-only -verify -std=c++11 %s
// GCC will accept anything as the argument of weakref. Should we
// check for an existing decl?
@@ -34,3 +34,5 @@ static int a10();
int a10() __attribute__((weakref ("foo")));
static int v __attribute__((weakref(a1), alias("foo"))); // expected-error {{'weakref' attribute requires a string}}
+
+__attribute__((weakref ("foo"))) auto a11 = 1; // expected-error {{weakref declaration must have internal linkage}}
diff --git a/test/SemaCXX/bool-compare.cpp b/test/SemaCXX/bool-compare.cpp
new file mode 100644
index 000000000000..fe47633bb23b
--- /dev/null
+++ b/test/SemaCXX/bool-compare.cpp
@@ -0,0 +1,207 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+
+void f(int x, int y, int z) {
+
+ bool a,b;
+
+ if(b > true) {} // expected-warning {{comparison of true with expression of type 'bool' is always false}}
+ if(b < true) {} // no warning
+ if(b >= true) {} // no warning
+ if(b <= true) {} // expected-warning {{comparison of true with expression of type 'bool' is always true}}
+ if(b == true) {} // no warning
+ if(b != true) {} // no warning
+
+ if(b > false) {} // no warning
+ if(b < false) {} // expected-warning {{comparison of false with expression of type 'bool' is always false}}
+ if(b >= false) {} // expected-warning {{comparison of false with expression of type 'bool' is always true}}
+ if(b <= false) {} // no warning
+ if(b == false) {} // no warning
+ if(b != false) {} // no warning
+
+ if(b > 1U){} // expected-warning {{comparison of constant 1 with expression of type 'bool' is always false}}
+
+ if (a > b) {} // no warning
+ if (a < b) {} // no warning
+ if (a >= b) {} // no warning
+ if (a <= b) {} // no warning
+ if (a == b) {} // no warning
+ if (a != b) {} // no warning
+
+ if (a > 0) {} // no warning
+ if (a > 1) {} // expected-warning {{comparison of constant 1 with expression of type 'bool' is always false}}
+ if (a > 2) {} // expected-warning {{comparison of constant 2 with expression of type 'bool' is always false}}
+
+ if (a >= 0) {} // expected-warning {{comparison of constant 0 with expression of type 'bool' is always true}}
+ if (a >= 1) {} // no warning
+ if (a >= 2) {} // expected-warning {{comparison of constant 2 with expression of type 'bool' is always false}}
+ if (a >= -1) {} // expected-warning {{comparison of constant -1 with expression of type 'bool' is always true}}
+
+ if (a <= 0) {} // no warning
+ if (a <= 1) {} // expected-warning {{comparison of constant 1 with expression of type 'bool' is always true}}
+ if (a <= 2) {} // expected-warning {{comparison of constant 2 with expression of type 'bool' is always true}}
+ if (a <= -1) {} // expected-warning {{comparison of constant -1 with expression of type 'bool' is always false}}
+
+ if (!a > 0) {} // no warning
+ if (!a > 1) {} // expected-warning {{comparison of constant 1 with expression of type 'bool' is always false}}
+ if (!a > 2) {} // expected-warning {{comparison of constant 2 with expression of type 'bool' is always false}}
+ if (!a > y) {} // no warning
+ if (!a > b) {} // no warning
+ if (!a > -1) {} // expected-warning {{comparison of constant -1 with expression of type 'bool' is always true}}
+
+ if (!a < 0) {} // expected-warning {{comparison of constant 0 with expression of type 'bool' is always false}}
+ if (!a < 1) {} // no warning
+ if (!a < 2) {} // expected-warning {{comparison of constant 2 with expression of type 'bool' is always true}}
+ if (!a < y) {} // no warning
+ if (!a < b) {} // no warning
+ if (!a < -1) {} // expected-warning {{comparison of constant -1 with expression of type 'bool' is always false}}
+
+ if (!a >= 0) {} // expected-warning {{comparison of constant 0 with expression of type 'bool' is always true}}
+ if (!a >= 1) {} // no warning
+ if (!a >= 2) {} // expected-warning {{comparison of constant 2 with expression of type 'bool' is always false}}
+ if (!a >= y) {} // no warning
+ if (!a >= b) {} // no warning
+ if (!a >= -1) {} // expected-warning {{comparison of constant -1 with expression of type 'bool' is always true}}
+
+ if (!a <= 0) {} // no warning
+ if (!a <= 1) {} // expected-warning {{comparison of constant 1 with expression of type 'bool' is always true}}
+ if (!a <= 2) {} // expected-warning {{comparison of constant 2 with expression of type 'bool' is always true}}
+ if (!a <= y) {} // no warning
+ if (!a <= b) {} // no warning
+ if (!a <= -1) {} // expected-warning {{comparison of constant -1 with expression of type 'bool' is always false}}
+
+ if ((a||b) > 0) {} // no warning
+ if ((a||b) > 1) {} // expected-warning {{comparison of constant 1 with expression of type 'bool' is always false}}
+ if ((a||b) > 4) {} // expected-warning {{comparison of constant 4 with expression of type 'bool' is always false}}
+ if ((a||b) > -1) {}// expected-warning {{comparison of constant -1 with expression of type 'bool' is always true}}
+
+ if ((a&&b) > 0) {} // no warning
+ if ((a&&b) > 1) {} // expected-warning {{comparison of constant 1 with expression of type 'bool' is always false}}
+ if ((a&&b) > 4) {} // expected-warning {{comparison of constant 4 with expression of type 'bool' is always false}}
+
+ if ((a<y) > 0) {} // no warning
+ if ((a<y) > 1) {} // expected-warning {{comparison of constant 1 with expression of type 'bool' is always false}}
+ if ((a<y) > 4) {} // expected-warning {{comparison of constant 4 with expression of type 'bool' is always false}}
+ if ((a<y) > z) {} // no warning
+ if ((a<y) > -1) {} // expected-warning {{comparison of constant -1 with expression of type 'bool' is always true}}
+
+ if ((a<y) == 0) {} // no warning
+ if ((a<y) == 1) {} // no warning
+ if ((a<y) == 2) {} // expected-warning {{comparison of constant 2 with expression of type 'bool' is always false}}
+ if ((a<y) == z) {} // no warning
+ if ((a<y) == -1) {}// expected-warning {{comparison of constant -1 with expression of type 'bool' is always false}}
+
+ if ((a<y) != 0) {} // no warning
+ if ((a<y) != 1) {} // no warning
+ if ((a<y) != 2) {} // expected-warning {{comparison of constant 2 with expression of type 'bool' is always true}}
+ if ((a<y) != z) {} // no warning
+ if ((a<y) != -1) {}// expected-warning {{comparison of constant -1 with expression of type 'bool' is always true}}
+
+ if ((a<y) == z) {} // no warning
+ if (a>y<z) {} // no warning
+ if ((a<y) > z) {} // no warning
+ if((a<y)>(z<y)) {} // no warning
+ if((a<y)==(z<y)){} // no warning
+ if((a<y)!=(z<y)){} // no warning
+ if((z==x)<(y==z)){} // no warning
+ if((a<y)!=((z==x)<(y==z))){} // no warning
+
+
+ if (0 > !a) {} // expected-warning {{comparison of constant 0 with expression of type 'bool' is always false}}
+ if (1 > !a) {} // no warning
+ if (2 > !a) {} // expected-warning {{comparison of constant 2 with expression of type 'bool' is always true}}
+ if (y > !a) {} // no warning
+ if (-1 > !a) {} // expected-warning {{comparison of constant -1 with expression of type 'bool' is always false}}
+
+ if (0 < !a) {} // no warning
+ if (1 < !a) {} // expected-warning {{comparison of constant 1 with expression of type 'bool' is always false}}
+ if (2 < !a) {} // expected-warning {{comparison of constant 2 with expression of type 'bool' is always false}}
+ if (y < !a) {} // no warning
+ if (-1 < !a) {} // expected-warning {{comparison of constant -1 with expression of type 'bool' is always true}}
+
+
+ if (0 >= !a) {} // no warning
+ if (1 >= !a) {} // expected-warning {{comparison of constant 1 with expression of type 'bool' is always true}}
+ if (2 >= !a) {} // expected-warning {{comparison of constant 2 with expression of type 'bool' is always true}}
+ if (y >= !a) {} // no warning
+ if (-1 >= !a) {} // expected-warning {{comparison of constant -1 with expression of type 'bool' is always false}}
+
+ if (0 <= !a) {} // expected-warning {{comparison of constant 0 with expression of type 'bool' is always true}}
+ if (1 <= !a) {} // no warning
+ if (2 <= !a) {} // expected-warning {{comparison of constant 2 with expression of type 'bool' is always false}}
+ if (y <= !a) {} //
+ if (-1 <= !a) {} // expected-warning {{comparison of constant -1 with expression of type 'bool' is always true}}
+
+ if (0 > (a||b)) {} // expected-warning {{comparison of constant 0 with expression of type 'bool' is always false}}
+ if (1 > (a||b)) {} // no warning
+ if (4 > (a||b)) {} // expected-warning {{comparison of constant 4 with expression of type 'bool' is always true}}
+
+ if (0 > (a&&b)) {} // expected-warning {{comparison of constant 0 with expression of type 'bool' is always false}}
+ if (1 > (a&&b)) {} // no warning
+ if (4 > (a&&b)) {} // expected-warning {{comparison of constant 4 with expression of type 'bool' is always true}}
+
+ if (0 > (a<y)) {} // expected-warning {{comparison of constant 0 with expression of type 'bool' is always false}}
+ if (1 > (a<y)) {} // no warning
+ if (4 > (a<y)) {} // expected-warning {{comparison of constant 4 with expression of type 'bool' is always true}}
+ if (z > (a<y)) {} //
+ if (-1 > (a<y)) {} // expected-warning {{comparison of constant -1 with expression of type 'bool' is always false}}
+
+ if (0 == (a<y)) {} // no warning
+ if (1 == (a<y)) {} // no warning
+ if (2 == (a<y)) {} // expected-warning {{comparison of constant 2 with expression of type 'bool' is always false}}
+ if (z == (a<y)) {} // no warning
+ if (-1 == (a<y)){} // expected-warning {{comparison of constant -1 with expression of type 'bool' is always false}}
+
+ if (0 !=(a<y)) {} // no warning
+ if (1 !=(a<y)) {} // no warning
+ if (2 !=(a<y)) {} // expected-warning {{comparison of constant 2 with expression of type 'bool' is always true}}
+ if (z !=(a<y)) {} // no warning
+ if (-1 !=(a<y)) {} // expected-warning {{comparison of constant -1 with expression of type 'bool' is always true}}
+
+ if (z ==(a<y)) {} // no warning
+ if (z<a>y) {} // no warning
+ if (z > (a<y)) {} // no warning
+ if((z<y)>(a<y)) {} // no warning
+ if((z<y)==(a<y)){} // no warning
+ if((z<y)!=(a<y)){} // no warning
+ if((y==z)<(z==x)){} // no warning
+ if(((z==x)<(y==z))!=(a<y)){} // no warning
+
+ if(((z==x)<(-1==z))!=(a<y)){} // no warning
+ if(((z==x)<(z==-1))!=(a<y)){} // no warning
+ if(((z==x)<-1)!=(a<y)){} // expected-warning {{comparison of constant -1 with expression of type 'bool' is always false}}
+ if(((z==x)< 2)!=(a<y)){} // expected-warning {{comparison of constant 2 with expression of type 'bool' is always true}}
+ if(((z==x)<(z>2))!=(a<y)){} // no warning
+
+}
+
+
+template<typename T, typename U, typename V> struct X6 {
+ U f(T t, U u, V v) {
+ // IfStmt
+ if (t > 0)
+ return u;
+ else {
+ if (t < 0)
+ return v; // expected-error{{cannot initialize return object of type}}
+ }
+ bool r;
+ // FIXME: We should warn here, DiagRuntimeBehavior does currently not detect this.
+ if(r<0){}
+
+ if (T x = t) {
+ t = x;
+ }
+ return v; // expected-error{{cannot initialize return object of type}}
+ }
+};
+
+struct ConvertibleToInt {
+ operator int() const;
+};
+
+template struct X6<ConvertibleToInt, float, char>;
+template struct X6<bool, int, int*>; // expected-note{{instantiation}}
+
+
+
diff --git a/test/SemaCXX/c99-variable-length-array.cpp b/test/SemaCXX/c99-variable-length-array.cpp
index bb620c71fa07..237f56458dab 100644
--- a/test/SemaCXX/c99-variable-length-array.cpp
+++ b/test/SemaCXX/c99-variable-length-array.cpp
@@ -140,3 +140,24 @@ namespace PR11744 {
}
int test = f<int>(0); // expected-note {{instantiation of}}
}
+
+namespace pr18633 {
+ struct A1 {
+ static const int sz;
+ static const int sz2;
+ };
+ const int A1::sz2 = 11;
+ template<typename T>
+ void func () {
+ int arr[A1::sz]; // expected-warning{{variable length arrays are a C99 feature}}
+ }
+ template<typename T>
+ void func2 () {
+ int arr[A1::sz2];
+ }
+ const int A1::sz = 12;
+ void func2() {
+ func<int>();
+ func2<int>();
+ }
+}
diff --git a/test/SemaCXX/calling-conv-compat.cpp b/test/SemaCXX/calling-conv-compat.cpp
index 2d52386add16..cebac9fad6cd 100644
--- a/test/SemaCXX/calling-conv-compat.cpp
+++ b/test/SemaCXX/calling-conv-compat.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -std=c++11 -fms-extensions -cxx-abi microsoft -verify -triple i686-pc-win32 %s
+// RUN: %clang_cc1 -fsyntax-only -std=c++11 -fms-extensions -verify -triple i686-pc-win32 %s
// Pointers to free functions
void free_func_default();
@@ -351,24 +351,25 @@ typedef void (__cdecl fun_cdecl)();
typedef void (__stdcall fun_stdcall)();
typedef void (__fastcall fun_fastcall)();
-// FIXME: Adjust cdecl to thiscall when forming a member pointer.
-//fun_default A::*td1 = &A::method_thiscall;
-fun_cdecl A::*td2 = &A::method_cdecl;
+fun_default A::*td1 = &A::method_thiscall;
+fun_cdecl A::*td2 = &A::method_thiscall;
fun_stdcall A::*td3 = &A::method_stdcall;
fun_fastcall A::*td4 = &A::method_fastcall;
// Round trip the function type through a template, and verify that only cdecl
// gets adjusted.
-template<typename Fn> struct X {
- typedef Fn A::*p;
-};
+template<typename Fn> struct X { typedef Fn A::*p; };
-// FIXME: Adjust cdecl to thiscall when forming a member pointer.
-//X<void ()>::p tmpl1 = &A::method_thiscall;
-//X<void __cdecl ()>::p tmpl2 = &A::method_thiscall;
+X<void ()>::p tmpl1 = &A::method_thiscall;
+X<void __cdecl ()>::p tmpl2 = &A::method_thiscall;
X<void __stdcall ()>::p tmpl3 = &A::method_stdcall;
X<void __fastcall ()>::p tmpl4 = &A::method_fastcall;
+X<fun_default >::p tmpl5 = &A::method_thiscall;
+X<fun_cdecl >::p tmpl6 = &A::method_thiscall;
+X<fun_stdcall >::p tmpl7 = &A::method_stdcall;
+X<fun_fastcall>::p tmpl8 = &A::method_fastcall;
+
} // end namespace MemberPointers
// Test that lambdas that capture nothing convert to cdecl function pointers.
diff --git a/test/SemaCXX/compare.cpp b/test/SemaCXX/compare.cpp
index 8214f7899ecf..ef0a524f92f1 100644
--- a/test/SemaCXX/compare.cpp
+++ b/test/SemaCXX/compare.cpp
@@ -225,7 +225,7 @@ void test3() {
}
// Test comparison of short to unsigned. If tautological compare does not
-// trigger, then the signed comparision warning will.
+// trigger, then the signed comparison warning will.
void test4(short s) {
// A is max short plus 1. All zero and positive shorts are smaller than it.
// All negative shorts are cast towards the max unsigned range. Relation
diff --git a/test/SemaCXX/conditional-expr.cpp b/test/SemaCXX/conditional-expr.cpp
index 5abee4a3c4f8..538de5847de8 100644
--- a/test/SemaCXX/conditional-expr.cpp
+++ b/test/SemaCXX/conditional-expr.cpp
@@ -75,6 +75,7 @@ void test()
int i1 = ToBool() ? 0 : 1;
// p2 (one or both void, and throwing)
+ Fields flds;
i1 ? throw 0 : throw 1;
i1 ? test() : throw 1;
i1 ? throw 0 : test();
@@ -85,8 +86,16 @@ void test()
i1 = i1 ? 0 : (throw 0);
i1 ? 0 : test(); // expected-error {{right operand to ? is void, but left operand is of type 'int'}}
i1 ? test() : 0; // expected-error {{left operand to ? is void, but right operand is of type 'int'}}
- (i1 ? throw 0 : i1) = 0; // expected-error {{expression is not assignable}}
- (i1 ? i1 : throw 0) = 0; // expected-error {{expression is not assignable}}
+ (i1 ? throw 0 : i1) = 0;
+ (i1 ? i1 : throw 0) = 0;
+ (i1 ? (throw 0) : i1) = 0;
+ (i1 ? i1 : (throw 0)) = 0;
+ (i1 ? (void)(throw 0) : i1) = 0; // expected-error {{left operand to ? is void, but right operand is of type 'int'}}
+ (i1 ? i1 : (void)(throw 0)) = 0; // expected-error {{right operand to ? is void, but left operand is of type 'int'}}
+ int &throwRef1 = (i1 ? flds.i1 : throw 0);
+ int &throwRef2 = (i1 ? throw 0 : flds.i1);
+ int &throwRef3 = (i1 ? flds.b1 : throw 0); // expected-error {{non-const reference cannot bind to bit-field}}
+ int &throwRef4 = (i1 ? throw 0 : flds.b1); // expected-error {{non-const reference cannot bind to bit-field}}
// p3 (one or both class type, convert to each other)
// b1 (lvalues)
@@ -151,7 +160,6 @@ void test()
&(i1 ? i1 : i2); // expected-error {{cannot take the address of an rvalue}}
// p4 (lvalue, same type)
- Fields flds;
int &ir1 = i1 ? flds.i1 : flds.i2;
(i1 ? flds.b1 : flds.i2) = 0;
(i1 ? flds.i1 : flds.b2) = 0;
@@ -219,8 +227,8 @@ void test()
// *must* create a separate temporary copy of class objects. This can only
// be properly tested at runtime, though.
- const Abstract &a = true ? static_cast<const Abstract&>(Derived1()) : Derived2(); // expected-error {{allocating an object of abstract class type 'const Abstract'}}
- true ? static_cast<const Abstract&>(Derived1()) : throw 3; // expected-error {{allocating an object of abstract class type 'const Abstract'}}
+ const Abstract &abstract1 = true ? static_cast<const Abstract&>(Derived1()) : Derived2(); // expected-error {{allocating an object of abstract class type 'const Abstract'}}
+ const Abstract &abstract2 = true ? static_cast<const Abstract&>(Derived1()) : throw 3; // ok
}
namespace PR6595 {
@@ -367,3 +375,12 @@ namespace DR587 {
const volatile int &cvir2 = b ? cvi : vi;
const volatile int &cvir3 = b ? ci : vi; // expected-error{{volatile lvalue reference to type 'const volatile int' cannot bind to a temporary of type 'int'}}
}
+
+namespace PR17052 {
+ struct X {
+ int i_;
+ bool b_;
+
+ int &test() { return b_ ? i_ : throw 1; }
+ };
+}
diff --git a/test/SemaCXX/const-cast.cpp b/test/SemaCXX/const-cast.cpp
index 1fe350d1977a..cb9937c50d50 100644
--- a/test/SemaCXX/const-cast.cpp
+++ b/test/SemaCXX/const-cast.cpp
@@ -60,7 +60,7 @@ short *bad_const_cast_test(char const *volatile *const volatile *var)
// Function pointers.
f fp2 = const_cast<f>(fp1); // expected-error {{const_cast to 'f' (aka 'int (*)(int)'), which is not a reference, pointer-to-object, or pointer-to-data-member}}
void (A::*mfn)() = 0;
- (void)const_cast<void (A::*)()>(mfn); // expected-error {{const_cast to 'void (A::*)()', which is not a reference, pointer-to-object, or pointer-to-data-member}}
+ (void)const_cast<void (A::*)()>(mfn); // expected-error-re {{const_cast to 'void (A::*)(){{( __attribute__\(\(thiscall\)\))?}}', which is not a reference, pointer-to-object, or pointer-to-data-member}}
(void)const_cast<int&&>(0); // expected-error {{const_cast from rvalue to reference type 'int &&'}} expected-warning {{C++11}}
return **var3;
}
diff --git a/test/SemaCXX/constant-expression-cxx11.cpp b/test/SemaCXX/constant-expression-cxx11.cpp
index d73ee4507f7b..09d93fa73af1 100644
--- a/test/SemaCXX/constant-expression-cxx11.cpp
+++ b/test/SemaCXX/constant-expression-cxx11.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i686-linux -Wno-string-plus-int -Wno-pointer-arith -Wno-zero-length-array -fsyntax-only -fcxx-exceptions -verify -std=c++11 -pedantic %s -Wno-comment
+// RUN: %clang_cc1 -triple i686-linux -Wno-string-plus-int -Wno-pointer-arith -Wno-zero-length-array -fsyntax-only -fcxx-exceptions -verify -std=c++11 -pedantic %s -Wno-comment -Wno-tautological-pointer-compare -Wno-bool-conversion
namespace StaticAssertFoldTest {
@@ -823,6 +823,19 @@ static_assert(X() == 0, "");
}
+struct This {
+ constexpr int f() const { return 0; }
+ static constexpr int g() { return 0; }
+ void h() {
+ constexpr int x = f(); // expected-error {{must be initialized by a constant}}
+ // expected-note@-1 {{implicit use of 'this' pointer is only allowed within the evaluation of a call to a 'constexpr' member function}}
+ constexpr int y = this->f(); // expected-error {{must be initialized by a constant}}
+ // expected-note-re@-1 {{{{^}}use of 'this' pointer}}
+ constexpr int z = g();
+ static_assert(z == 0, "");
+ }
+};
+
}
namespace Temporaries {
@@ -860,6 +873,12 @@ static_assert(f(T(5)) == 5, "");
constexpr bool b(int n) { return &n; }
static_assert(b(0), "");
+struct NonLiteral {
+ NonLiteral();
+ int f();
+};
+constexpr int k = NonLiteral().f(); // expected-error {{constant expression}} expected-note {{non-literal type 'Temporaries::NonLiteral'}}
+
}
namespace Union {
diff --git a/test/SemaCXX/constant-expression.cpp b/test/SemaCXX/constant-expression.cpp
index 942bf414742b..e01acdd46f93 100644
--- a/test/SemaCXX/constant-expression.cpp
+++ b/test/SemaCXX/constant-expression.cpp
@@ -124,3 +124,20 @@ namespace test3 {
struct Y { bool b; X x; }; // expected-error {{field has incomplete type 'test3::X'}}
int f() { return Y().b; }
}
+
+// PR18283
+namespace test4 {
+ template <int> struct A {};
+ int const i = { 42 };
+ // i can be used as non-type template-parameter as "const int x = { 42 };" is
+ // equivalent to "const int x = 42;" as per C++03 8.5/p13.
+ typedef A<i> Ai; // ok
+}
+
+// rdar://16064952
+namespace rdar16064952 {
+ template < typename T > void fn1() {
+ T b;
+ unsigned w = ({int a = b.val[sizeof(0)]; 0; }); // expected-warning {{use of GNU statement expression extension}}
+ }
+}
diff --git a/test/SemaCXX/constexpr-value-init.cpp b/test/SemaCXX/constexpr-value-init.cpp
index e5b7db50eb65..9ad11290190f 100644
--- a/test/SemaCXX/constexpr-value-init.cpp
+++ b/test/SemaCXX/constexpr-value-init.cpp
@@ -9,7 +9,7 @@ struct B {
A a;
};
-constexpr A a; // ok, zero initialization preceeds static initialization
+constexpr A a; // ok, zero initialization precedes static initialization
void f() {
constexpr A a; // expected-error {{constant expression}} expected-note {{in call to 'A()'}}
}
diff --git a/test/SemaCXX/constructor-initializer.cpp b/test/SemaCXX/constructor-initializer.cpp
index 17576328c11b..81dc19ea6dfc 100644
--- a/test/SemaCXX/constructor-initializer.cpp
+++ b/test/SemaCXX/constructor-initializer.cpp
@@ -94,7 +94,7 @@ struct Current : Derived {
Derived::Base1(), // expected-error {{type 'Derived::Base1' is not a direct or virtual base of 'Current'}}
Derived::V(),
::NonExisting(), // expected-error {{member initializer 'NonExisting' does not name a non-static data member or}}
- INT::NonExisting() {} // expected-error {{expected a class or namespace}} \
+ INT::NonExisting() {} // expected-error {{'INT' (aka 'int') is not a class, namespace, or scoped enumeration}} \
// expected-error {{member initializer 'NonExisting' does not name a non-static data member or}}
};
@@ -232,15 +232,14 @@ namespace PR7402 {
// <rdar://problem/8308215>: don't crash.
// Lots of questionable recovery here; errors can change.
namespace test3 {
- class A : public std::exception {}; // expected-error {{undeclared identifier}} expected-error {{expected class name}} expected-note 4 {{candidate}}
+ class A : public std::exception {}; // expected-error {{undeclared identifier}} expected-error {{expected class name}} expected-note 2 {{candidate}}
class B : public A {
public:
B(const String& s, int e=0) // expected-error {{unknown type name}}
: A(e), m_String(s) , m_ErrorStr(__null) {} // expected-error {{no matching constructor}} expected-error {{does not name}}
B(const B& e)
: A(e), m_String(e.m_String), m_ErrorStr(__null) { // expected-error {{does not name}} \
- // expected-error {{no member named 'm_String' in 'test3::B'}} \
- // expected-error {{no matching}}
+ // expected-error {{no member named 'm_String' in 'test3::B'}}
}
};
}
diff --git a/test/SemaCXX/constructor.cpp b/test/SemaCXX/constructor.cpp
index f3b910d2f5a3..fa930bdb95dc 100644
--- a/test/SemaCXX/constructor.cpp
+++ b/test/SemaCXX/constructor.cpp
@@ -17,6 +17,8 @@ class Foo {
int Foo(int, int); // expected-error{{constructor cannot have a return type}} \
// expected-error{{member 'Foo' has the same name as its class}}
+
+ volatile Foo(float); // expected-error{{constructor cannot have a return type}}
};
Foo::Foo(const Foo&) { }
diff --git a/test/SemaCXX/conversion-function.cpp b/test/SemaCXX/conversion-function.cpp
index 7eaed54934b3..40ac33b8eb0d 100644
--- a/test/SemaCXX/conversion-function.cpp
+++ b/test/SemaCXX/conversion-function.cpp
@@ -26,6 +26,9 @@ class Y {
public:
void operator bool(int, ...) const; // expected-error{{conversion function cannot have a return type}} \
// expected-error{{conversion function cannot have any parameters}}
+
+ operator bool(int a = 4, int b = 6) const; // expected-error{{conversion function cannot have any parameters}}
+
operator float(...) const; // expected-error{{conversion function cannot be variadic}}
@@ -405,3 +408,14 @@ namespace PR12712 {
A f(const C c) { return c; }
}
+
+namespace PR18234 {
+ struct A {
+ operator enum E { e } (); // expected-error {{'PR18234::A::E' cannot be defined in a type specifier}}
+ operator struct S { int n; } (); // expected-error {{'PR18234::A::S' cannot be defined in a type specifier}}
+ } a;
+ A::S s = a;
+ A::E e = a; // expected-note {{here}}
+ bool k1 = e == A::e; // expected-error {{no member named 'e'}}
+ bool k2 = e.n == 0;
+}
diff --git a/test/SemaCXX/crashes.cpp b/test/SemaCXX/crashes.cpp
index 0b15bb0386c2..1570d12eeb2f 100644
--- a/test/SemaCXX/crashes.cpp
+++ b/test/SemaCXX/crashes.cpp
@@ -218,3 +218,16 @@ namespace pr12791 {
template class basic_stringbuf<char>;
}
+namespace pr16989 {
+ class C {
+ template <class T>
+ C tpl_mem(T *) { return } // expected-error{{expected expression}}
+ void mem(int *p) {
+ tpl_mem(p);
+ }
+ };
+ class C2 {
+ void f();
+ };
+ void C2::f() {}
+}
diff --git a/test/SemaCXX/cstyle-cast.cpp b/test/SemaCXX/cstyle-cast.cpp
index 468c8ecb23c4..afac6a137ec4 100644
--- a/test/SemaCXX/cstyle-cast.cpp
+++ b/test/SemaCXX/cstyle-cast.cpp
@@ -227,6 +227,6 @@ void memptrs()
void (structure::*psf)() = 0;
(void)(int (structure::*)())(psf);
- (void)(void (structure::*)())(psi); // expected-error {{C-style cast from 'const int structure::*' to 'void (structure::*)()' is not allowed}}
- (void)(int structure::*)(psf); // expected-error {{C-style cast from 'void (structure::*)()' to 'int structure::*' is not allowed}}
+ (void)(void (structure::*)())(psi); // expected-error-re {{C-style cast from 'const int structure::*' to 'void (structure::*)(){{( __attribute__\(\(thiscall\)\))?}}' is not allowed}}
+ (void)(int structure::*)(psf); // expected-error-re {{C-style cast from 'void (structure::*)(){{( __attribute__\(\(thiscall\)\))?}}' to 'int structure::*' is not allowed}}
}
diff --git a/test/SemaCXX/cxx-altivec.cpp b/test/SemaCXX/cxx-altivec.cpp
new file mode 100644
index 000000000000..baacbac7d036
--- /dev/null
+++ b/test/SemaCXX/cxx-altivec.cpp
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -triple=powerpc-apple-darwin8 -faltivec -fsyntax-only -verify %s
+
+struct Vector {
+ __vector float xyzw;
+} __attribute__((vecreturn)) __attribute__((vecreturn)); // expected-error {{'vecreturn' attribute cannot be repeated}}
diff --git a/test/SemaCXX/cxx0x-compat.cpp b/test/SemaCXX/cxx0x-compat.cpp
index ffbd20fda373..a58a7f875cdb 100644
--- a/test/SemaCXX/cxx0x-compat.cpp
+++ b/test/SemaCXX/cxx0x-compat.cpp
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -std=c++98 -Wc++11-compat -verify %s
-// RUN: %clang_cc1 -fsyntax-only -std=c++1y -Wc++11-compat -verify %s
+// RUN: %clang_cc1 -fsyntax-only -std=c++1z -Wc++11-compat -verify %s
#if __cplusplus < 201103L
@@ -44,5 +44,6 @@ char c = 'x'_x; // expected-warning {{will be treated as a user-defined literal
#else
auto init_capture = [a(0)] {}; // expected-warning {{initialized lambda captures are incompatible with C++ standards before C++1y}}
+static_assert(true); // expected-warning {{incompatible with C++ standards before C++1z}}
#endif
diff --git a/test/SemaCXX/cxx0x-cursory-default-delete.cpp b/test/SemaCXX/cxx0x-cursory-default-delete.cpp
index b1078dc404b1..07a784226640 100644
--- a/test/SemaCXX/cxx0x-cursory-default-delete.cpp
+++ b/test/SemaCXX/cxx0x-cursory-default-delete.cpp
@@ -80,3 +80,7 @@ struct except_spec_d_match : except_spec_a, except_spec_b {
// (but not normal definitions)
struct S { S(); };
S::S() __attribute((pure)) = default;
+
+using size_t = decltype(sizeof(0));
+void *operator new(size_t) = delete; // expected-error {{deleted definition must be first declaration}} expected-note {{implicit}}
+void operator delete(void *) noexcept = delete; // expected-error {{deleted definition must be first declaration}} expected-note {{implicit}}
diff --git a/test/SemaCXX/cxx0x-delegating-ctors.cpp b/test/SemaCXX/cxx0x-delegating-ctors.cpp
index a34ee4fcb024..2e1abf53ae99 100644
--- a/test/SemaCXX/cxx0x-delegating-ctors.cpp
+++ b/test/SemaCXX/cxx0x-delegating-ctors.cpp
@@ -43,7 +43,7 @@ foo::foo (void*) : foo(4.0f) {
}
struct deleted_dtor {
- ~deleted_dtor() = delete; // expected-note{{function has been explicitly marked deleted here}}
+ ~deleted_dtor() = delete; // expected-note{{'~deleted_dtor' has been explicitly marked deleted here}}
deleted_dtor();
deleted_dtor(int) : deleted_dtor() // expected-error{{attempt to use a deleted function}}
{}
diff --git a/test/SemaCXX/cxx0x-deleted-default-ctor.cpp b/test/SemaCXX/cxx0x-deleted-default-ctor.cpp
index 0cebc10ade40..b9af67948bfc 100644
--- a/test/SemaCXX/cxx0x-deleted-default-ctor.cpp
+++ b/test/SemaCXX/cxx0x-deleted-default-ctor.cpp
@@ -59,7 +59,7 @@ struct good_const {
good_const gc;
struct no_default {
- no_default() = delete; // expected-note 3{{deleted here}}
+ no_default() = delete; // expected-note 4{{deleted here}}
};
struct no_dtor {
~no_dtor() = delete; // expected-note 2{{deleted here}}
@@ -114,7 +114,7 @@ struct defaulted_delete {
defaulted_delete dd; // expected-error {{call to implicitly-deleted default constructor}}
struct late_delete {
- no_default nd;
+ no_default nd; // expected-note {{because field 'nd' has a deleted default constructor}}
late_delete();
};
late_delete::late_delete() = default; // expected-error {{would delete it}}
diff --git a/test/SemaCXX/cxx0x-initializer-constructor.cpp b/test/SemaCXX/cxx0x-initializer-constructor.cpp
index dc179f81bd35..3ea53095d4ea 100644
--- a/test/SemaCXX/cxx0x-initializer-constructor.cpp
+++ b/test/SemaCXX/cxx0x-initializer-constructor.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s
+// RUN: %clang_cc1 -std=c++0x -fsyntax-only -fexceptions -verify %s
struct one { char c[1]; };
struct two { char c[2]; };
@@ -75,8 +75,8 @@ namespace objects {
{ F<0> f = {}; }
// Narrowing conversions don't affect viability. The next two choose
// the initializer_list constructor.
- { F<3> f{1, 1.0}; } // expected-error {{type 'double' cannot be narrowed to 'int' in initializer list}} expected-note {{override}}
- { F<3> f = {1, 1.0}; } // expected-error {{type 'double' cannot be narrowed to 'int' in initializer list}} expected-note {{override}}
+ { F<3> f{1, 1.0}; } // expected-error {{type 'double' cannot be narrowed to 'int' in initializer list}} expected-note {{silence}}
+ { F<3> f = {1, 1.0}; } // expected-error {{type 'double' cannot be narrowed to 'int' in initializer list}} expected-note {{silence}}
{ F<3> f{1, 2, 3, 4, 5, 6, 7, 8}; }
{ F<3> f = {1, 2, 3, 4, 5, 6, 7, 8}; }
{ F<3> f{1, 2, 3, 4, 5, 6, 7, 8}; }
@@ -304,7 +304,6 @@ namespace init_list_default {
B b {}; // calls default constructor
}
-
// PR13470, <rdar://problem/11974632>
namespace PR13470 {
struct W {
@@ -365,3 +364,42 @@ namespace PR13470 {
yi.h(); // ok, all diagnostics produced in template definition
}
}
+
+namespace PR19729 {
+ struct A {
+ A(int);
+ A(const A&) = delete;
+ };
+ struct B {
+ void *operator new(std::size_t, A);
+ };
+ B *p = new ({123}) B;
+}
+
+namespace PR11410 {
+ struct A {
+ A() = delete; // expected-note 2{{deleted here}}
+ A(int);
+ };
+
+ A a[3] = {
+ {1}, {2}
+ }; // expected-error {{call to deleted constructor}} \
+ expected-note {{in implicit initialization of array element 2 with omitted initializer}}
+
+ struct B {
+ A a; // expected-note {{in implicit initialization of field 'a'}}
+ } b = {
+ }; // expected-error {{call to deleted constructor}}
+
+ struct C {
+ C(int = 0); // expected-note 2{{candidate}}
+ C(float = 0); // expected-note 2{{candidate}}
+ };
+ C c[3] = {
+ 0, 1
+ }; // expected-error {{ambiguous}} expected-note {{in implicit initialization of array element 2}}
+ C c2[3] = {
+ [0] = 1, [2] = 3
+ }; // expected-error {{ambiguous}} expected-note {{in implicit initialization of array element 1}}
+}
diff --git a/test/SemaCXX/cxx0x-initializer-scalars.cpp b/test/SemaCXX/cxx0x-initializer-scalars.cpp
index 627855e96e8c..1475dcf911c9 100644
--- a/test/SemaCXX/cxx0x-initializer-scalars.cpp
+++ b/test/SemaCXX/cxx0x-initializer-scalars.cpp
@@ -45,8 +45,8 @@ namespace integral {
{ const int a{1, 2}; } // expected-error {{excess elements}}
{ const int a = {1, 2}; } // expected-error {{excess elements}}
// FIXME: Redundant warnings.
- { const short a{100000}; } // expected-error {{cannot be narrowed}} expected-note {{inserting an explicit cast}} expected-warning {{changes value}}
- { const short a = {100000}; } // expected-error {{cannot be narrowed}} expected-note {{inserting an explicit cast}} expected-warning {{changes value}}
+ { const short a{100000}; } // expected-error {{cannot be narrowed}} expected-note {{insert an explicit cast}} expected-warning {{changes value}}
+ { const short a = {100000}; } // expected-error {{cannot be narrowed}} expected-note {{insert an explicit cast}} expected-warning {{changes value}}
{ if (const int a{1}) static_assert(a == 1, ""); }
{ if (const int a = {1}) static_assert(a == 1, ""); }
}
diff --git a/test/SemaCXX/cxx0x-initializer-stdinitializerlist-system-header.cpp b/test/SemaCXX/cxx0x-initializer-stdinitializerlist-system-header.cpp
new file mode 100644
index 000000000000..774745777c17
--- /dev/null
+++ b/test/SemaCXX/cxx0x-initializer-stdinitializerlist-system-header.cpp
@@ -0,0 +1,23 @@
+// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -Wsystem-headers %s
+
+// libstdc++4.6 in debug mode has explicit default constructors.
+// stlport has this for all containers.
+#ifdef BE_THE_HEADER
+#pragma clang system_header
+namespace std {
+namespace __debug {
+template <class T>
+class vector {
+public:
+ explicit vector() {} // expected-warning{{should not be explicit}}
+};
+}
+}
+#else
+
+#define BE_THE_HEADER
+#include __FILE__
+
+struct { int a, b; std::__debug::vector<int> c; } e[] = { {1, 1} }; // expected-note{{used in initialization here}}
+
+#endif
diff --git a/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp b/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp
index 9d89cce67b38..70f7c642a545 100644
--- a/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp
+++ b/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp
@@ -230,3 +230,32 @@ namespace PR18013 {
int f();
std::initializer_list<long (*)()> x = {f}; // expected-error {{cannot initialize an array element of type 'long (*const)()' with an lvalue of type 'int ()': different return type ('long' vs 'int')}}
}
+
+namespace DR1070 {
+ struct S {
+ S(std::initializer_list<int>);
+ };
+ S s[3] = { {1, 2, 3}, {4, 5} }; // ok
+ S *p = new S[3] { {1, 2, 3}, {4, 5} }; // ok
+}
+
+namespace ListInitInstantiate {
+ struct A {
+ A(std::initializer_list<A>);
+ A(std::initializer_list<int>);
+ };
+ struct B : A {
+ B(int);
+ };
+ template<typename T> struct X {
+ X();
+ A a;
+ };
+ template<typename T> X<T>::X() : a{B{0}, B{1}} {}
+
+ X<int> x;
+
+ int f(const A&);
+ template<typename T> void g() { int k = f({0}); }
+ template void g<int>();
+}
diff --git a/test/SemaCXX/cxx0x-type-convert-construct.cpp b/test/SemaCXX/cxx0x-type-convert-construct.cpp
index 6a7fe45281f5..25a43d7053cc 100644
--- a/test/SemaCXX/cxx0x-type-convert-construct.cpp
+++ b/test/SemaCXX/cxx0x-type-convert-construct.cpp
@@ -9,9 +9,9 @@ void f() {
Ustr = U"a UTF-32 string"; // expected-error {{assigning to 'char32_t *' from incompatible type 'const char32_t [16]'}}
char *Rstr;
- Rstr = R"foo(a raw string)foo"; // expected-warning{{conversion from string literal to 'char *' is deprecated}}
+ Rstr = R"foo(a raw string)foo"; // expected-warning{{ISO C++11 does not allow conversion from string literal to 'char *'}}
wchar_t *LRstr;
- LRstr = LR"foo(a wide raw string)foo"; // expected-warning{{conversion from string literal to 'wchar_t *' is deprecated}}
+ LRstr = LR"foo(a wide raw string)foo"; // expected-warning{{ISO C++11 does not allow conversion from string literal to 'wchar_t *'}}
char *u8Rstr;
u8Rstr = u8R"foo(a UTF-8 raw string)foo"; // expected-error {{assigning to 'char *' from incompatible type 'const char [19]'}}
char16_t *uRstr;
diff --git a/test/SemaCXX/cxx11-attr-print.cpp b/test/SemaCXX/cxx11-attr-print.cpp
index 01325d3c8bf3..999eaed61802 100644
--- a/test/SemaCXX/cxx11-attr-print.cpp
+++ b/test/SemaCXX/cxx11-attr-print.cpp
@@ -42,9 +42,6 @@ int f3 [[gnu::warn_unused_result]] ();
// CHECK: {{\[}}[noreturn]];
void f4 [[noreturn]] ();
-// CHECK: {{\[}}[std::noreturn]];
-void f5 [[std::noreturn]] ();
-
// CHECK: __attribute__((gnu_inline));
inline void f6() __attribute__((gnu_inline));
diff --git a/test/SemaCXX/cxx11-gnu-attrs.cpp b/test/SemaCXX/cxx11-gnu-attrs.cpp
index 22d61a1978fb..9f182249a3e6 100644
--- a/test/SemaCXX/cxx11-gnu-attrs.cpp
+++ b/test/SemaCXX/cxx11-gnu-attrs.cpp
@@ -19,8 +19,6 @@ void aliasa [[gnu::alias("_Z6alias1v")]] ();
void aligned_fn [[gnu::aligned(32)]] ();
struct [[gnu::aligned(8)]] aligned_struct {};
-[[gnu::malloc, gnu::alloc_size(1,2)]] void *alloc_size(int a, int b);
-
void always_inline [[gnu::always_inline]] ();
__thread int tls_model [[gnu::tls_model("local-exec")]];
diff --git a/test/SemaCXX/cxx11-inheriting-ctors.cpp b/test/SemaCXX/cxx11-inheriting-ctors.cpp
index 67d55213a084..04aa117b29dd 100644
--- a/test/SemaCXX/cxx11-inheriting-ctors.cpp
+++ b/test/SemaCXX/cxx11-inheriting-ctors.cpp
@@ -26,3 +26,11 @@ namespace PR15757 {
return 0;
}
}
+
+namespace WrongIdent {
+ struct A {};
+ struct B : A {};
+ struct C : B {
+ using B::A;
+ };
+}
diff --git a/test/SemaCXX/cxx11-unused.cpp b/test/SemaCXX/cxx11-unused.cpp
new file mode 100644
index 000000000000..1e25bd515724
--- /dev/null
+++ b/test/SemaCXX/cxx11-unused.cpp
@@ -0,0 +1,33 @@
+// RUN: %clang_cc1 -std=c++11 -verify %s -Wunused-parameter
+
+// PR19303 : Make sure we don't get a unused expression warning for deleted and
+// defaulted functions
+
+// expected-no-diagnostics
+
+class A {
+public:
+ int x;
+ A() = default;
+ ~A() = default;
+ A(const A &other) = delete;
+
+ template <typename T>
+ void SetX(T x) {
+ this->x = x;
+ };
+
+ void SetX1(int x);
+};
+
+template <>
+void A::SetX(A x) = delete;
+
+class B {
+public:
+ B() = default;
+ ~B() = default;
+ B(const B &other);
+};
+
+B::B(const B &other) = default;
diff --git a/test/SemaCXX/cxx11-user-defined-literals.cpp b/test/SemaCXX/cxx11-user-defined-literals.cpp
index f8bbcd960fd3..cb7796418ee3 100644
--- a/test/SemaCXX/cxx11-user-defined-literals.cpp
+++ b/test/SemaCXX/cxx11-user-defined-literals.cpp
@@ -141,3 +141,27 @@ namespace PR14950 {
int operator"" _b(); // expected-error {{no function template matches function template specialization}}
int main() { return 0_b; } // expected-error {{no matching literal operator for call to 'operator "" _b'}}
}
+
+namespace bad_names {
+ template<char...> int operator""_x();
+
+ template<typename T> void f() {
+ class T:: // expected-error {{anonymous class}} expected-warning {{does not declare anything}}
+ operator // expected-error {{expected identifier}}
+ ""_q<'a'>;
+
+ T::template operator""_q<'a'>(); // expected-error {{non-namespace scope 'T::' cannot have a literal operator member}} expected-error +{{}}
+ T::template operator""_q<'a'>::X; // expected-error {{non-namespace scope 'T::' cannot have a literal operator member}} expected-error +{{}}
+ T::operator""_q<'a'>(); // expected-error {{non-namespace scope 'T::' cannot have a literal operator member}} expected-error +{{}}
+ typename T::template operator""_q<'a'> a; // expected-error {{non-namespace scope 'T::' cannot have a literal operator member}} expected-error +{{}}
+ typename T::operator""_q(""); // expected-error +{{}} expected-note {{to match}}
+ T::operator""_q(""); // expected-error {{non-namespace scope 'T::' cannot have a literal operator member}}
+
+ bad_names::operator""_x<'a', 'b', 'c'>();
+ };
+
+ struct S {};
+ void g() {
+ S::operator""_q(); // expected-error {{non-namespace scope 'S::' cannot have a literal operator member}}
+ }
+}
diff --git a/test/SemaCXX/cxx1y-deduced-return-type.cpp b/test/SemaCXX/cxx1y-deduced-return-type.cpp
index d3308b3fd50b..60864165954a 100644
--- a/test/SemaCXX/cxx1y-deduced-return-type.cpp
+++ b/test/SemaCXX/cxx1y-deduced-return-type.cpp
@@ -261,6 +261,13 @@ namespace DefaultedMethods {
namespace Constexpr {
constexpr auto f1(int n) { return n; }
+ template<typename T> struct X { constexpr auto f() {} }; // PR18746
+ template<typename T> struct Y { constexpr T f() {} }; // expected-note {{control reached end of constexpr function}}
+ void f() {
+ X<int>().f();
+ Y<void>().f();
+ constexpr int q = Y<int>().f(); // expected-error {{must be initialized by a constant expression}} expected-note {{in call to '&Y<int>()->f()'}}
+ }
struct NonLiteral { ~NonLiteral(); } nl; // expected-note {{user-provided destructor}}
constexpr auto f2(int n) { return nl; } // expected-error {{return type 'Constexpr::NonLiteral' is not a literal type}}
}
diff --git a/test/SemaCXX/cxx1y-generic-lambdas-capturing.cpp b/test/SemaCXX/cxx1y-generic-lambdas-capturing.cpp
index 8bd4f4242c1d..b08d58abd2a9 100644
--- a/test/SemaCXX/cxx1y-generic-lambdas-capturing.cpp
+++ b/test/SemaCXX/cxx1y-generic-lambdas-capturing.cpp
@@ -1358,6 +1358,21 @@ template<class R> struct X {
int run_char = X<int>{}.foo('a');
int run_int = X<double>{}.foo(4);
}
-
#endif // MS_EXTENSIONS
+namespace nsdmi_capturing_this {
+struct X {
+ int m = 10;
+ int n = [this](auto) { return m; }(20);
+};
+
+template<class T>
+struct XT {
+ T m = 10;
+ T n = [this](auto) { return m; }(20);
+};
+
+XT<int> xt{};
+
+
+}
diff --git a/test/SemaCXX/cxx1y-generic-lambdas-variadics.cpp b/test/SemaCXX/cxx1y-generic-lambdas-variadics.cpp
new file mode 100644
index 000000000000..b0b86e387721
--- /dev/null
+++ b/test/SemaCXX/cxx1y-generic-lambdas-variadics.cpp
@@ -0,0 +1,100 @@
+// RUN: %clang_cc1 -std=c++1y -verify -fsyntax-only -fblocks %s
+// RUN: %clang_cc1 -std=c++1y -verify -fsyntax-only -fblocks -fdelayed-template-parsing %s -DDELAYED_TEMPLATE_PARSING
+// RUN: %clang_cc1 -std=c++1y -verify -fsyntax-only -fblocks -fms-extensions %s -DMS_EXTENSIONS
+// RUN: %clang_cc1 -std=c++1y -verify -fsyntax-only -fblocks -fdelayed-template-parsing -fms-extensions %s -DMS_EXTENSIONS -DDELAYED_TEMPLATE_PARSING
+
+namespace explicit_argument_variadics {
+
+
+template<class ... Ts> void print(Ts ... ) { }
+
+struct X { };
+struct Y { };
+struct Z { };
+
+int test() {
+ {
+ auto L = [](auto ... as) { };
+ L.operator()<bool>(true);
+ }
+ {
+ auto L = [](auto a) { };
+ L.operator()<bool>(false);
+ }
+ {
+ auto L = [](auto a, auto b) { };
+ L.operator()<bool>(false, 'a');
+ }
+ {
+ auto L = [](auto a, auto b) { };
+ L.operator()<bool, char>(false, 'a');
+ }
+ {
+ auto L = [](auto a, auto b, auto ... cs) { };
+ L.operator()<bool, char>(false, 'a');
+ L.operator()<bool, char, const char*>(false, 'a', "jim");
+ }
+
+ {
+ auto L = [](auto ... As) {
+ };
+ L.operator()<bool, double>(false, 3.14, "abc");
+ }
+ {
+ auto L = [](auto A, auto B, auto ... As) {
+ };
+ L.operator()<bool>(false, 3.14, "abc");
+ L.operator()<bool, char>(false, 3.14, "abc"); //expected-warning{{implicit conversion}}
+ L.operator()<X, Y, bool, Z>(X{}, Y{}, 3.14, Z{}, X{}); //expected-warning{{implicit conversion}}
+ }
+ {
+ auto L = [](auto ... As) {
+ print("\nL::As = ", As ...);
+ return [](decltype(As) ... as, auto ... Bs) {
+ print("\nL::Inner::as = ", as ...);
+ print("\nL::Inner::Bs = ", Bs ...);
+ return 4;
+ };
+ };
+ auto M = L.operator()<bool, double>(false, 3.14, "abc");
+ M(false, 6.26, "jim", true);
+ M.operator()<bool>(true, 6.26, "jim", false, 3.14);
+ }
+ {
+ auto L = [](auto A, auto ... As) {
+ print("\nL::As = ", As ...);
+ return [](decltype(As) ... as, decltype(A) a, auto ... Bs) {
+ print("\nL::Inner::as = ", as ...);
+ print("\nL::Inner::Bs = ", Bs ...);
+ return 4;
+ };
+ };
+ auto M = L.operator()<bool, double>(false, 3.14, "abc");
+ M(6.26, "jim", true);
+ M.operator()<X>(6.26, "jim", false, X{}, Y{}, Z{});
+ }
+
+ return 0;
+}
+ int run = test();
+} // end ns explicit_argument_extension
+
+
+
+#ifdef PR18499_FIXED
+namespace variadic_expansion {
+ void f(int &, char &);
+
+ template <typename ... T> void g(T &... t) {
+ f([&a(t)]()->decltype(auto) {
+ return a;
+ }() ...);
+ f([&a(f([&b(t)]()->decltype(auto) { return b; }()...), t)]()->decltype(auto) {
+ return a;
+ }()...);
+ }
+
+ void h(int i, char c) { g(i, c); }
+}
+#endif
+
diff --git a/test/SemaCXX/cxx1y-generic-lambdas.cpp b/test/SemaCXX/cxx1y-generic-lambdas.cpp
index 20e06f48a1ce..dc8574825dd9 100644
--- a/test/SemaCXX/cxx1y-generic-lambdas.cpp
+++ b/test/SemaCXX/cxx1y-generic-lambdas.cpp
@@ -3,6 +3,17 @@
// RUN: %clang_cc1 -std=c++1y -verify -fsyntax-only -fblocks -fms-extensions %s -DMS_EXTENSIONS
// RUN: %clang_cc1 -std=c++1y -verify -fsyntax-only -fblocks -fdelayed-template-parsing -fms-extensions %s -DMS_EXTENSIONS -DDELAYED_TEMPLATE_PARSING
+template<class F, class ...Rest> struct first_impl { typedef F type; };
+template<class ...Args> using first = typename first_impl<Args...>::type;
+
+namespace simple_explicit_capture {
+ void test() {
+ int i;
+ auto L = [i](auto a) { return i + a; };
+ L(3.14);
+ }
+}
+
namespace explicit_call {
int test() {
auto L = [](auto a) { return a; };
@@ -489,8 +500,6 @@ int run = fooT('a') + fooT(3.14);
template<class ... Ts> void print(Ts ... ts) { }
-template<class F, class ... Rest> using first = F;
-
template<class ... Ts> auto fooV(Ts ... ts) {
auto L = [](auto ... a) {
auto M = [](decltype(a) ... b) {
@@ -560,7 +569,6 @@ int (*np2)(const char*, int, const char*, double, const char*, int) = O; // expe
namespace variadic_tests_1 {
template<class ... Ts> void print(Ts ... ts) { }
-template<class F, class ... Rest> using FirstType = F;
template<class F, class ... Rest> F& FirstArg(F& f, Rest...) { return f; }
template<class ... Ts> int fooV(Ts ... ts) {
@@ -574,7 +582,7 @@ template<class ... Ts> int fooV(Ts ... ts) {
};
N('a');
N(N);
- N(FirstType<Ts...>{});
+ N(first<Ts...>{});
};
M(a...);
print("a = ", a..., "\n");
@@ -599,7 +607,7 @@ template<class ... Ts> int fooV(Ts ... ts) {
};
N('a');
N(N);
- N(FirstType<Ts...>{});
+ N(first<Ts...>{});
};
M(a...);
return M;
@@ -619,7 +627,7 @@ template<class ... Ts> int fooV(Ts ... ts) {
};
N('a');
N(N);
- N(FirstType<Ts...>{});
+ N(first<Ts...>{});
return N;
};
M(a...);
@@ -763,7 +771,6 @@ int run = test();
namespace fptr_with_decltype_return_type {
-template<class F, class ... Ts> using FirstType = F;
template<class F, class ... Rest> F& FirstArg(F& f, Rest& ... r) { return f; };
template<class ... Ts> auto vfun(Ts&& ... ts) {
print(ts...);
@@ -774,7 +781,7 @@ int test()
{
auto L = [](auto ... As) {
return [](auto b) ->decltype(b) {
- vfun([](decltype(As) a) -> decltype(a) { return a; } ...)(FirstType<decltype(As)...>{});
+ vfun([](decltype(As) a) -> decltype(a) { return a; } ...)(first<decltype(As)...>{});
return decltype(b){};
};
};
@@ -905,4 +912,4 @@ int run2 = x2.fooG3();
-} //end ns inclass_lambdas_within_nested_classes \ No newline at end of file
+} //end ns inclass_lambdas_within_nested_classes
diff --git a/test/SemaCXX/cxx1y-init-captures.cpp b/test/SemaCXX/cxx1y-init-captures.cpp
index 2cb4d31ffc4b..64fe50a70e78 100644
--- a/test/SemaCXX/cxx1y-init-captures.cpp
+++ b/test/SemaCXX/cxx1y-init-captures.cpp
@@ -36,7 +36,7 @@ namespace variadic_expansion {
namespace odr_use_within_init_capture {
int test() {
-
+
{ // no captures
const int x = 10;
auto L = [z = x + 2](int a) {
diff --git a/test/SemaCXX/cxx1y-variable-templates_in_class.cpp b/test/SemaCXX/cxx1y-variable-templates_in_class.cpp
index 94d0f16f06ed..1e5e834b6d2a 100644
--- a/test/SemaCXX/cxx1y-variable-templates_in_class.cpp
+++ b/test/SemaCXX/cxx1y-variable-templates_in_class.cpp
@@ -39,11 +39,11 @@ namespace out_of_line {
template<typename T> CONST T B1::right<T,int> = T(5);
class B2 {
- template<typename T, typename T0> static CONST T right = T(100); // expected-note {{previous definition is here}}
- template<typename T> static CONST T right<T,int> = T(5); // expected-note {{previous definition is here}}
+ template<typename T, typename T0> static CONST T right = T(100); // expected-note {{previous initialization is here}}
+ template<typename T> static CONST T right<T,int> = T(5); // expected-note {{previous initialization is here}}
};
- template<typename T, typename T0> CONST T B2::right = T(100); // expected-error {{redefinition of 'right'}}
- template<typename T> CONST T B2::right<T,int> = T(5); // expected-error {{redefinition of 'right'}}
+ template<typename T, typename T0> CONST T B2::right = T(100); // expected-error {{static data member 'right' already has an initializer}}
+ template<typename T> CONST T B2::right<T,int> = T(5); // expected-error {{static data member 'right' already has an initializer}}
class B3 {
template<typename T, typename T0> static CONST T right = T(100);
@@ -291,6 +291,30 @@ namespace in_class_template {
template<typename T> template<typename...U> T A<T>::y<tuple<U...> >[] = { U()... };
static_assert(sizeof(A<int>::y<tuple<char, char, char> >) == 12, "");
}
+
+ namespace bad_reference {
+ struct S {
+ template<typename T> static int A; // expected-note 4{{here}}
+ };
+
+ template<typename T> void f() {
+ typename T::template A<int> a; // expected-error {{template name refers to non-type template 'S::A'}}
+ }
+ template<typename T> void g() {
+ T::template A<int>::B = 0; // expected-error {{template name refers to non-type template 'S::A'}}
+ }
+ template<typename T> void h() {
+ class T::template A<int> c; // expected-error {{template name refers to non-type template 'S::A'}}
+ }
+
+ template<typename T>
+ struct X : T::template A<int> {}; // expected-error {{template name refers to non-type template 'S::A'}}
+
+ template void f<S>(); // expected-note {{in instantiation of}}
+ template void g<S>(); // expected-note {{in instantiation of}}
+ template void h<S>(); // expected-note {{in instantiation of}}
+ template struct X<S>; // expected-note {{in instantiation of}}
+ }
}
namespace in_nested_classes {
diff --git a/test/SemaCXX/cxx1y-variable-templates_top_level.cpp b/test/SemaCXX/cxx1y-variable-templates_top_level.cpp
index b6e8762f5d59..4e62941e6818 100644
--- a/test/SemaCXX/cxx1y-variable-templates_top_level.cpp
+++ b/test/SemaCXX/cxx1y-variable-templates_top_level.cpp
@@ -81,7 +81,7 @@ namespace odr_tmpl {
template<typename T> T v; // expected-note {{previous definition is here}}
template<typename T> int v; // expected-error {{redefinition of 'v'}}
- template<typename T> int v1; // expected-note {{previous template declaration is here}}
+ template<typename T> extern int v1; // expected-note {{previous template declaration is here}}
template<int I> int v1; // expected-error {{template parameter has a different kind in template redeclaration}}
}
namespace pvt_use {
@@ -90,11 +90,8 @@ namespace odr_tmpl {
}
namespace pvt_diff_params {
- // FIXME: (?) Redefinitions should simply be not allowed, whether the
- // template parameters match or not. However, this current behaviour also
- // matches that of class templates...
- template<typename T, typename> T v; // expected-note 2{{previous template declaration is here}}
- template<typename T> T v; // expected-error {{too few template parameters in template redeclaration}}
+ template<typename T, typename> T v; // expected-note {{previous template declaration is here}}
+ template<typename T> T v; // expected-error {{too few template parameters in template redeclaration}} expected-note {{previous template declaration is here}}
template<typename T, typename, typename> T v; // expected-error {{too many template parameters in template redeclaration}}
}
@@ -327,7 +324,7 @@ namespace narrowing {
template<typename T> T v = {1234}; // expected-warning {{implicit conversion from 'int' to 'char' changes value from 1234 to}}
#ifndef PRECXX11
// expected-error@-2 {{constant expression evaluates to 1234 which cannot be narrowed to type 'char'}}\
- // expected-note@-2 {{override this message by inserting an explicit cast}}
+ // expected-note@-2 {{insert an explicit cast to silence this issue}}
#endif
int k = v<char>; // expected-note {{in instantiation of variable template specialization 'narrowing::v<char>' requested here}}
}
@@ -391,7 +388,7 @@ namespace nested {
namespace n1 {
template<typename T>
- T pi1a = T(3.1415926535897932385);
+ T pi1a = T(3.1415926535897932385); // expected-note {{explicitly specialized declaration is here}}
#ifndef PRECXX11
// expected-note@-2 {{explicit instantiation refers here}}
#endif
@@ -413,7 +410,7 @@ namespace nested {
#endif
float f1 = pi1a<float>;
- template<> double pi1a<double> = 5.2; // expected-error {{no variable template matches specialization}}
+ template<> double pi1a<double> = 5.2; // expected-error {{variable template specialization of 'pi1a' must originally be declared in namespace 'n1'}}
double d1 = pi1a<double>;
}
@@ -432,3 +429,32 @@ namespace nested {
}
}
+namespace nested_name {
+ template<typename T> int a; // expected-note {{variable template 'a' declared here}}
+ a<int>::b c; // expected-error {{qualified name refers into a specialization of variable template 'a'}}
+
+ class a<int> {}; // expected-error {{identifier followed by '<' indicates a class template specialization but 'a' refers to a variable template}}
+ enum a<int> {}; // expected-error {{expected identifier or '{'}} expected-warning {{does not declare anything}}
+}
+
+namespace PR18530 {
+ template<typename T> int a;
+ int a<int>; // expected-error {{requires 'template<>'}}
+}
+
+namespace PR19152 {
+#ifndef PRECXX11
+ template<typename T> const auto x = 1;
+ static_assert(x<int> == 1, "");
+#endif
+}
+
+namespace PR19169 {
+ template <typename T> int* f();
+ template <typename T> void f();
+ template<> int f<double>; // expected-error {{no variable template matches specialization; did you mean to use 'f' as function template instead?}}
+
+ template <typename T> void g();
+ template<> int g<double>; // expected-error {{no variable template matches specialization; did you mean to use 'g' as function template instead?}}
+}
+
diff --git a/test/SemaCXX/cxx98-compat.cpp b/test/SemaCXX/cxx98-compat.cpp
index 9690638ce025..96af95425aec 100644
--- a/test/SemaCXX/cxx98-compat.cpp
+++ b/test/SemaCXX/cxx98-compat.cpp
@@ -23,7 +23,7 @@ template<int ...I> // expected-warning {{variadic templates are incompatible wi
class Variadic3 {};
alignas(8) int with_alignas; // expected-warning {{'alignas' is incompatible with C++98}}
-int with_attribute [[ ]]; // expected-warning {{attributes are incompatible with C++98}}
+int with_attribute [[ ]]; // expected-warning {{C++11 attribute syntax is incompatible with C++98}}
void Literals() {
(void)u8"str"; // expected-warning {{unicode literals are incompatible with C++98}}
@@ -219,18 +219,11 @@ int n = {}; // expected-warning {{scalar initialized from empty initializer list
class PrivateMember {
struct ImPrivate {};
};
-template<typename T> typename T::ImPrivate SFINAEAccessControl(T t) { // expected-warning {{substitution failure due to access control is incompatible with C++98}} expected-note {{while substituting deduced template arguments into function template 'SFINAEAccessControl' [with T = PrivateMember]}}
+template<typename T> typename T::ImPrivate SFINAEAccessControl(T t) { // expected-warning {{substitution failure due to access control is incompatible with C++98}}
return typename T::ImPrivate();
}
int SFINAEAccessControl(...) { return 0; }
-int CheckSFINAEAccessControl = SFINAEAccessControl(PrivateMember());
-
-template<typename T>
-struct FriendRedefinition {
- friend void Friend() {} // expected-warning {{friend function 'Friend' would be implicitly redefined in C++98}} expected-note {{previous}}
-};
-FriendRedefinition<int> FriendRedef1;
-FriendRedefinition<char> FriendRedef2; // expected-note {{requested here}}
+int CheckSFINAEAccessControl = SFINAEAccessControl(PrivateMember()); // expected-note {{while substituting deduced template arguments into function template 'SFINAEAccessControl' [with T = PrivateMember]}}
namespace CopyCtorIssues {
struct Private {
@@ -386,38 +379,22 @@ template<typename T> T var = T(10);
// expected-warning@-4 {{variable templates are a C++1y extension}}
#endif
+// No diagnostic for specializations of variable templates; we will have
+// diagnosed the primary template.
template<typename T> T* var<T*> = new T();
-#ifdef CXX1YCOMPAT
-// expected-warning@-2 {{variable templates are incompatible with C++ standards before C++1y}}
-#else
-// expected-warning@-4 {{variable templates are a C++1y extension}}
-#endif
-
template<> int var<int> = 10;
-#ifdef CXX1YCOMPAT
-// expected-warning@-2 {{variable templates are incompatible with C++ standards before C++1y}}
-#else
-// expected-warning@-4 {{variable templates are a C++1y extension}}
-#endif
-
template int var<int>;
float fvar = var<float>;
-class A {
+class A {
template<typename T> static T var = T(10);
#ifdef CXX1YCOMPAT
// expected-warning@-2 {{variable templates are incompatible with C++ standards before C++1y}}
#else
// expected-warning@-4 {{variable templates are a C++1y extension}}
#endif
-
- template<typename T> static T* var<T*> = new T();
-#ifdef CXX1YCOMPAT
-// expected-warning@-2 {{variable templates are incompatible with C++ standards before C++1y}}
-#else
-// expected-warning@-4 {{variable templates are a C++1y extension}}
-#endif
+ template<typename T> static T* var<T*> = new T();
};
struct B { template<typename T> static T v; };
@@ -435,19 +412,7 @@ template<typename T> T B::v = T();
#endif
template<typename T> T* B::v<T*> = new T();
-#ifdef CXX1YCOMPAT
-// expected-warning@-2 {{variable templates are incompatible with C++ standards before C++1y}}
-#else
-// expected-warning@-4 {{variable templates are a C++1y extension}}
-#endif
-
template<> int B::v<int> = 10;
-#ifdef CXX1YCOMPAT
-// expected-warning@-2 {{variable templates are incompatible with C++ standards before C++1y}}
-#else
-// expected-warning@-4 {{variable templates are a C++1y extension}}
-#endif
-
template int B::v<int>;
float fsvar = B::v<float>;
diff --git a/test/SemaCXX/dcl_init_aggr.cpp b/test/SemaCXX/dcl_init_aggr.cpp
index 8c5e654fca2e..432c11646611 100644
--- a/test/SemaCXX/dcl_init_aggr.cpp
+++ b/test/SemaCXX/dcl_init_aggr.cpp
@@ -46,7 +46,7 @@ struct NoDefaultConstructor { // expected-note 3 {{candidate constructor (the im
};
struct TooFewError { // expected-error{{implicit default constructor for}}
int a;
- NoDefaultConstructor nodef; // expected-note{{member is declared here}}
+ NoDefaultConstructor nodef; // expected-note{{member is declared here}} expected-note 2{{in implicit initialization of field 'nodef'}}
};
TooFewError too_few_okay = { 1, 1 };
TooFewError too_few_error = { 1 }; // expected-error{{no matching constructor}}
@@ -54,7 +54,7 @@ TooFewError too_few_error = { 1 }; // expected-error{{no matching constructor}}
TooFewError too_few_okay2[2] = { 1, 1 }; // expected-note{{implicit default constructor for 'TooFewError' first required here}}
TooFewError too_few_error2[2] = { 1 }; // expected-error{{no matching constructor}}
-NoDefaultConstructor too_few_error3[3] = { }; // expected-error {{no matching constructor}}
+NoDefaultConstructor too_few_error3[3] = { }; // expected-error {{no matching constructor}} expected-note {{implicit initialization of array element 0}}
// C++ [dcl.init.aggr]p8
struct Empty { };
diff --git a/test/SemaCXX/decl-expr-ambiguity.cpp b/test/SemaCXX/decl-expr-ambiguity.cpp
index 8164b2bc91e7..6abfb2f32874 100644
--- a/test/SemaCXX/decl-expr-ambiguity.cpp
+++ b/test/SemaCXX/decl-expr-ambiguity.cpp
@@ -33,7 +33,7 @@ void f() {
extern T f3();
__typeof(*T()) f4(); // expected-warning {{empty parentheses interpreted as a function declaration}} expected-note {{replace parentheses with an initializer}}
typedef void *V;
- __typeof(*V()) f5();
+ __typeof(*V()) f5(); // expected-error {{ISO C++ does not allow indirection on operand of type 'V' (aka 'void *')}}
T multi1,
multi2(); // expected-warning {{empty parentheses interpreted as a function declaration}} expected-note {{replace parentheses with an initializer}}
T(d)[5]; // expected-error {{redefinition of 'd'}}
diff --git a/test/SemaCXX/decl-microsoft-call-conv.cpp b/test/SemaCXX/decl-microsoft-call-conv.cpp
index 9f1463245ba2..eb6c8507eddc 100644
--- a/test/SemaCXX/decl-microsoft-call-conv.cpp
+++ b/test/SemaCXX/decl-microsoft-call-conv.cpp
@@ -1,4 +1,6 @@
-// RUN: %clang_cc1 -triple i686-pc-win32 -cxx-abi microsoft -fms-extensions -verify %s
+// RUN: %clang_cc1 -triple i686-pc-win32 -fms-extensions -verify %s
+// RUN: %clang_cc1 -triple i686-pc-mingw32 -verify %s
+// RUN: %clang_cc1 -triple i686-pc-mingw32 -fms-extensions -verify %s
typedef void void_fun_t();
typedef void __cdecl cdecl_fun_t();
@@ -191,3 +193,41 @@ namespace test5 {
};
extern template void valarray<int>::bar();
}
+
+namespace test6 {
+ struct foo {
+ int bar();
+ };
+ typedef int bar_t();
+ void zed(bar_t foo::*) {
+ }
+ void baz() {
+ zed(&foo::bar);
+ }
+}
+
+namespace test7 {
+ template <typename T>
+ struct S {
+ void f(T t) {
+ t = 42;
+ }
+ };
+ template<> void S<void*>::f(void*);
+ void g(S<void*> s, void* p) {
+ s.f(p);
+ }
+}
+
+namespace test8 {
+ template <typename T>
+ struct S {
+ void f(T t) { // expected-note {{previous declaration is here}}
+ t = 42; // expected-error {{assigning to 'void *' from incompatible type 'int'}}
+ }
+ };
+ template<> void __cdecl S<void*>::f(void*); // expected-error {{function declared 'cdecl' here was previously declared without calling convention}}
+ void g(S<void*> s, void* p) {
+ s.f(p); // expected-note {{in instantiation of member function 'test8::S<void *>::f' requested here}}
+ }
+}
diff --git a/test/SemaCXX/declspec-thread.cpp b/test/SemaCXX/declspec-thread.cpp
new file mode 100644
index 000000000000..0ace9a65a4c5
--- /dev/null
+++ b/test/SemaCXX/declspec-thread.cpp
@@ -0,0 +1,42 @@
+// RUN: %clang_cc1 -triple i686-pc-win32 -std=c++11 -fms-extensions -verify %s
+
+__thread __declspec(thread) int a; // expected-error {{already has a thread-local storage specifier}}
+__declspec(thread) __thread int b; // expected-error {{already has a thread-local storage specifier}}
+__declspec(thread) int c(); // expected-warning {{only applies to variables}}
+__declspec(thread) int d;
+int foo();
+__declspec(thread) int e = foo(); // expected-error {{must be a constant expression}} expected-note {{thread_local}}
+
+struct HasCtor { HasCtor(); int x; };
+__declspec(thread) HasCtor f; // expected-error {{must be a constant expression}} expected-note {{thread_local}}
+
+struct HasDtor { ~HasDtor(); int x; };
+__declspec(thread) HasDtor g; // expected-error {{non-trivial destruction}} expected-note {{thread_local}}
+
+struct HasDefaultedDefaultCtor {
+ HasDefaultedDefaultCtor() = default;
+ int x;
+};
+__declspec(thread) HasDefaultedDefaultCtor h;
+
+struct HasConstexprCtor {
+ constexpr HasConstexprCtor(int x) : x(x) {}
+ int x;
+};
+__declspec(thread) HasConstexprCtor i(42);
+
+int foo() {
+ __declspec(thread) int a; // expected-error {{must have global storage}}
+ static __declspec(thread) int b;
+}
+
+extern __declspec(thread) int fwd_thread_var;
+__declspec(thread) int fwd_thread_var = 5;
+
+extern int fwd_thread_var_mismatch; // expected-note {{previous declaration}}
+__declspec(thread) int fwd_thread_var_mismatch = 5; // expected-error-re {{thread-local {{.*}} follows non-thread-local}}
+
+extern __declspec(thread) int thread_mismatch_2; // expected-note {{previous declaration}}
+int thread_mismatch_2 = 5; // expected-error-re {{non-thread-local {{.*}} follows thread-local}}
+
+typedef __declspec(thread) int tls_int_t; // expected-warning {{only applies to variables}}
diff --git a/test/SemaCXX/decltype.cpp b/test/SemaCXX/decltype.cpp
index d6e85d285dd1..f1900b2b830f 100644
--- a/test/SemaCXX/decltype.cpp
+++ b/test/SemaCXX/decltype.cpp
@@ -16,6 +16,27 @@ void test_f2() {
float &fr = f2(AC().a);
}
+template <class T>
+struct Future {
+ explicit Future(T v);
+
+ template <class F>
+ auto call(F&& fn) -> decltype(fn(T())) {
+ return fn(T());
+ }
+
+ template <class B, class F>
+ auto then(F&& fn) -> decltype(call(fn))
+ {
+ return fn(T());
+ }
+};
+
+void rdar16527205() {
+ Future<int> f1(42);
+ f1.call([](int){ return Future<float>(0); });
+}
+
namespace pr10154 {
class A{
A(decltype(nullptr) param);
@@ -45,6 +66,16 @@ namespace PR16529 {
U &r = S<int>::f();
}
+namespace PR18876 {
+ struct A { ~A() = delete; }; // expected-note +{{here}}
+ A f();
+ decltype(f()) *a; // ok, function call
+ decltype(A()) *b; // expected-error {{attempt to use a deleted function}}
+ decltype(0, f()) *c; // ok, function call on RHS of comma
+ decltype(0, A()) *d; // expected-error {{attempt to use a deleted function}}
+ decltype(f(), 0) *e; // expected-error {{attempt to use a deleted function}}
+}
+
template<typename>
class conditional {
};
diff --git a/test/SemaCXX/default1.cpp b/test/SemaCXX/default1.cpp
index b661776b6ef5..23466fac62aa 100644
--- a/test/SemaCXX/default1.cpp
+++ b/test/SemaCXX/default1.cpp
@@ -62,3 +62,6 @@ int i2() {
j(2, 3); // expected-error{{too many arguments to function call, expected at most single argument 'f', have 2}}
}
}
+
+int pr20055_f(int x = 0, int y = UNDEFINED); // expected-error{{use of undeclared identifier}}
+int pr20055_v = pr20055_f(0);
diff --git a/test/SemaCXX/deleted-function.cpp b/test/SemaCXX/deleted-function.cpp
index e78e7edc7199..d7ef9b263d88 100644
--- a/test/SemaCXX/deleted-function.cpp
+++ b/test/SemaCXX/deleted-function.cpp
@@ -15,9 +15,9 @@ void ov(int) {} // expected-note {{candidate function}}
void ov(double) = delete; // expected-note {{candidate function has been explicitly deleted}}
struct WithDel {
- WithDel() = delete; // expected-note {{function has been explicitly marked deleted here}}
- void fn() = delete; // expected-note {{function has been explicitly marked deleted here}}
- operator int() = delete; // expected-note {{function has been explicitly marked deleted here}}
+ WithDel() = delete; // expected-note {{'WithDel' has been explicitly marked deleted here}}
+ void fn() = delete; // expected-note {{'fn' has been explicitly marked deleted here}}
+ operator int() = delete; // expected-note {{'operator int' has been explicitly marked deleted here}}
void operator +(int) = delete;
int i = delete; // expected-error {{only functions can have deleted definitions}}
diff --git a/test/SemaCXX/deleted-operator.cpp b/test/SemaCXX/deleted-operator.cpp
index 9f53e71d456c..df67978a36d6 100644
--- a/test/SemaCXX/deleted-operator.cpp
+++ b/test/SemaCXX/deleted-operator.cpp
@@ -13,6 +13,7 @@ int PR10757f() {
}
struct DelOpDel {
- virtual ~DelOpDel() {} // expected-error {{deleted function}}
- void operator delete(void*) = delete; // expected-note {{deleted here}}
+ // FIXME: In MS ABI, we error twice below.
+ virtual ~DelOpDel() {} // expected-error 1-2 {{attempt to use a deleted function}}
+ void operator delete(void*) = delete; // expected-note 1-2 {{deleted here}}
};
diff --git a/test/SemaCXX/deprecated.cpp b/test/SemaCXX/deprecated.cpp
index 0335a80ffc5d..2fe6d59861ac 100644
--- a/test/SemaCXX/deprecated.cpp
+++ b/test/SemaCXX/deprecated.cpp
@@ -24,12 +24,15 @@ void stuff() {
register int m asm("rbx"); // no-warning
int k = to_int(n); // no-warning
-
bool b;
++b; // expected-warning {{incrementing expression of type bool is deprecated}}
- // FIXME: This is ill-formed in C++11.
- char *p = "foo"; // expected-warning {{conversion from string literal to 'char *' is deprecated}}
+ char *p = "foo";
+#if __cplusplus < 201103L
+ // expected-warning@-2 {{conversion from string literal to 'char *' is deprecated}}
+#else
+ // expected-warning@-4 {{ISO C++11 does not allow conversion from string literal to 'char *'}}
+#endif
}
struct S { int n; };
diff --git a/test/SemaCXX/destructor.cpp b/test/SemaCXX/destructor.cpp
index e511be011662..5305ff5f7ca6 100644
--- a/test/SemaCXX/destructor.cpp
+++ b/test/SemaCXX/destructor.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -std=c++11 -fsyntax-only -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -verify %s
+// RUN: %clang_cc1 -std=c++11 -triple %itanium_abi_triple -fsyntax-only -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -verify %s
+// RUN: %clang_cc1 -std=c++11 -triple %ms_abi_triple -DMSABI -fsyntax-only -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -verify %s
class A {
public:
~A();
@@ -83,6 +84,12 @@ namespace PR6421 {
}
namespace PR6709 {
+#ifdef MSABI
+ // This bug, "Clang instantiates destructor for function argument" is intended
+ // behaviour in the Microsoft ABI because the callee needs to destruct the arguments.
+ // expected-error@+3 {{indirection requires pointer operand ('int' invalid)}}
+ // expected-note@+3 {{in instantiation of member function 'PR6709::X<int>::~X' requested here}}
+#endif
template<class T> class X { T v; ~X() { ++*v; } };
void a(X<int> x) {}
}
@@ -100,10 +107,16 @@ namespace test6 {
T::deleteIt(p); // expected-error {{type 'int' cannot be used prior to '::'}}
}
+#ifdef MSABI
+ // expected-note@+2 {{in instantiation of member function 'test6::A<int>::operator delete' requested here}}
+#endif
virtual ~A() {}
};
- class B : A<int> { B(); }; // expected-note {{in instantiation of member function 'test6::A<int>::operator delete' requested here}}
+#ifndef MSABI
+ // expected-note@+2 {{in instantiation of member function 'test6::A<int>::operator delete' requested here}}
+#endif
+ class B : A<int> { B(); };
B::B() {}
}
@@ -182,7 +195,7 @@ struct B { // expected-warning {{has virtual functions but non-virtual destructo
struct D: B {}; // expected-warning {{has virtual functions but non-virtual destructor}}
-struct F final: B {}; // expected-warning {{has virtual functions but non-virtual destructor}}
+struct F final : B {};
struct VB {
virtual void foo();
@@ -367,3 +380,9 @@ namespace PR7900 {
namespace PR16892 {
auto p = &A::~A; // expected-error{{taking the address of a destructor}}
}
+
+namespace PR20238 {
+struct S {
+ volatile ~S() { } // expected-error{{destructor cannot have a return type}}
+};
+}
diff --git a/test/SemaCXX/dllexport.cpp b/test/SemaCXX/dllexport.cpp
new file mode 100644
index 000000000000..50d163a7f20f
--- /dev/null
+++ b/test/SemaCXX/dllexport.cpp
@@ -0,0 +1,1010 @@
+// RUN: %clang_cc1 -triple i686-win32 -fsyntax-only -verify -std=c++11 -DMS %s
+// RUN: %clang_cc1 -triple x86_64-win32 -fsyntax-only -verify -std=c++1y -DMS %s
+// RUN: %clang_cc1 -triple i686-mingw32 -fsyntax-only -verify -std=c++1y %s
+// RUN: %clang_cc1 -triple x86_64-mingw32 -fsyntax-only -verify -std=c++11 %s
+
+// Helper structs to make templates more expressive.
+struct ImplicitInst_Exported {};
+struct ExplicitDecl_Exported {};
+struct ExplicitInst_Exported {};
+struct ExplicitSpec_Exported {};
+struct ExplicitSpec_Def_Exported {};
+struct ExplicitSpec_InlineDef_Exported {};
+struct ExplicitSpec_NotExported {};
+namespace { struct Internal {}; }
+struct External { int v; };
+
+
+// Invalid usage.
+__declspec(dllexport) typedef int typedef1; // expected-warning{{'dllexport' attribute only applies to variables, functions and classes}}
+typedef __declspec(dllexport) int typedef2; // expected-warning{{'dllexport' attribute only applies to variables, functions and classes}}
+typedef int __declspec(dllexport) typedef3; // expected-warning{{'dllexport' attribute only applies to variables, functions and classes}}
+typedef __declspec(dllexport) void (*FunTy)(); // expected-warning{{'dllexport' attribute only applies to variables, functions and classes}}
+enum __declspec(dllexport) Enum {}; // expected-warning{{'dllexport' attribute only applies to variables, functions and classes}}
+#if __has_feature(cxx_strong_enums)
+ enum class __declspec(dllexport) EnumClass {}; // expected-warning{{'dllexport' attribute only applies to variables, functions and classes}}
+#endif
+
+
+
+//===----------------------------------------------------------------------===//
+// Globals
+//===----------------------------------------------------------------------===//
+
+// Export declaration.
+__declspec(dllexport) extern int ExternGlobalDecl;
+
+// dllexport implies a definition.
+__declspec(dllexport) int GlobalDef;
+
+// Export definition.
+__declspec(dllexport) int GlobalInit1 = 1;
+int __declspec(dllexport) GlobalInit2 = 1;
+
+// Declare, then export definition.
+__declspec(dllexport) extern int GlobalDeclInit;
+int GlobalDeclInit = 1;
+
+// Redeclarations
+__declspec(dllexport) extern int GlobalRedecl1;
+__declspec(dllexport) int GlobalRedecl1;
+
+__declspec(dllexport) extern int GlobalRedecl2;
+ int GlobalRedecl2;
+
+ extern int GlobalRedecl3; // expected-note{{previous declaration is here}}
+__declspec(dllexport) extern int GlobalRedecl3; // expected-error{{redeclaration of 'GlobalRedecl3' cannot add 'dllexport' attribute}}
+
+// External linkage is required.
+__declspec(dllexport) static int StaticGlobal; // expected-error{{'StaticGlobal' must have external linkage when declared 'dllexport'}}
+__declspec(dllexport) Internal InternalTypeGlobal; // expected-error{{'InternalTypeGlobal' must have external linkage when declared 'dllexport'}}
+namespace { __declspec(dllexport) int InternalGlobal; } // expected-error{{'(anonymous namespace)::InternalGlobal' must have external linkage when declared 'dllexport'}}
+namespace ns { __declspec(dllexport) int ExternalGlobal; }
+
+__declspec(dllexport) auto InternalAutoTypeGlobal = Internal(); // expected-error{{'InternalAutoTypeGlobal' must have external linkage when declared 'dllexport'}}
+__declspec(dllexport) auto ExternalAutoTypeGlobal = External();
+
+// Export in local scope.
+void functionScope() {
+ __declspec(dllexport) int LocalVarDecl; // expected-error{{'LocalVarDecl' must have external linkage when declared 'dllexport'}}
+ __declspec(dllexport) int LocalVarDef = 1; // expected-error{{'LocalVarDef' must have external linkage when declared 'dllexport'}}
+ __declspec(dllexport) extern int ExternLocalVarDecl;
+ __declspec(dllexport) static int StaticLocalVar; // expected-error{{'StaticLocalVar' must have external linkage when declared 'dllexport'}}
+}
+
+
+
+//===----------------------------------------------------------------------===//
+// Variable templates
+//===----------------------------------------------------------------------===//
+#if __has_feature(cxx_variable_templates)
+
+// Export declaration.
+template<typename T> __declspec(dllexport) extern int ExternVarTmplDecl;
+
+// dllexport implies a definition.
+template<typename T> __declspec(dllexport) int VarTmplDef;
+
+// Export definition.
+template<typename T> __declspec(dllexport) int VarTmplInit1 = 1;
+template<typename T> int __declspec(dllexport) VarTmplInit2 = 1;
+
+// Declare, then export definition.
+template<typename T> __declspec(dllexport) extern int VarTmplDeclInit;
+template<typename T> int VarTmplDeclInit = 1;
+
+// Redeclarations
+template<typename T> __declspec(dllexport) extern int VarTmplRedecl1;
+template<typename T> __declspec(dllexport) int VarTmplRedecl1 = 1;
+
+template<typename T> __declspec(dllexport) extern int VarTmplRedecl2;
+template<typename T> int VarTmplRedecl2 = 1;
+
+template<typename T> extern int VarTmplRedecl3; // expected-note{{previous declaration is here}}
+template<typename T> __declspec(dllexport) extern int VarTmplRedecl3; // expected-error{{redeclaration of 'VarTmplRedecl3' cannot add 'dllexport' attribute}}
+
+// External linkage is required.
+template<typename T> __declspec(dllexport) static int StaticVarTmpl; // expected-error{{'StaticVarTmpl' must have external linkage when declared 'dllexport'}}
+template<typename T> __declspec(dllexport) Internal InternalTypeVarTmpl; // expected-error{{'InternalTypeVarTmpl' must have external linkage when declared 'dllexport'}}
+namespace { template<typename T> __declspec(dllexport) int InternalVarTmpl; } // expected-error{{'(anonymous namespace)::InternalVarTmpl' must have external linkage when declared 'dllexport'}}
+namespace ns { template<typename T> __declspec(dllexport) int ExternalVarTmpl = 1; }
+
+template<typename T> __declspec(dllexport) auto InternalAutoTypeVarTmpl = Internal(); // expected-error{{'InternalAutoTypeVarTmpl' must have external linkage when declared 'dllexport'}}
+template<typename T> __declspec(dllexport) auto ExternalAutoTypeVarTmpl = External();
+template External ExternalAutoTypeVarTmpl<ExplicitInst_Exported>;
+
+
+template<typename T> int VarTmpl = 1;
+template<typename T> __declspec(dllexport) int ExportedVarTmpl = 1;
+
+// Export implicit instantiation of an exported variable template.
+int useVarTmpl() { return ExportedVarTmpl<ImplicitInst_Exported>; }
+
+// Export explicit instantiation declaration of an exported variable template.
+extern template int ExportedVarTmpl<ExplicitDecl_Exported>;
+ template int ExportedVarTmpl<ExplicitDecl_Exported>;
+
+// Export explicit instantiation definition of an exported variable template.
+template __declspec(dllexport) int ExportedVarTmpl<ExplicitInst_Exported>;
+
+// Export specialization of an exported variable template.
+template<> __declspec(dllexport) int ExportedVarTmpl<ExplicitSpec_Exported>;
+template<> __declspec(dllexport) int ExportedVarTmpl<ExplicitSpec_Def_Exported> = 1;
+
+// Not exporting specialization of an exported variable template without
+// explicit dllexport.
+template<> int ExportedVarTmpl<ExplicitSpec_NotExported>;
+
+
+// Export explicit instantiation declaration of a non-exported variable template.
+extern template __declspec(dllexport) int VarTmpl<ExplicitDecl_Exported>;
+ template __declspec(dllexport) int VarTmpl<ExplicitDecl_Exported>;
+
+// Export explicit instantiation definition of a non-exported variable template.
+template __declspec(dllexport) int VarTmpl<ExplicitInst_Exported>;
+
+// Export specialization of a non-exported variable template.
+template<> __declspec(dllexport) int VarTmpl<ExplicitSpec_Exported>;
+template<> __declspec(dllexport) int VarTmpl<ExplicitSpec_Def_Exported> = 1;
+
+#endif // __has_feature(cxx_variable_templates)
+
+
+
+//===----------------------------------------------------------------------===//
+// Functions
+//===----------------------------------------------------------------------===//
+
+// Export function declaration. Check different placements.
+__attribute__((dllexport)) void decl1A(); // Sanity check with __attribute__
+__declspec(dllexport) void decl1B();
+
+void __attribute__((dllexport)) decl2A();
+void __declspec(dllexport) decl2B();
+
+// Export function definition.
+__declspec(dllexport) void def() {}
+
+// extern "C"
+extern "C" __declspec(dllexport) void externC() {}
+
+// Export inline function.
+__declspec(dllexport) inline void inlineFunc1() {}
+inline void __attribute__((dllexport)) inlineFunc2() {}
+
+__declspec(dllexport) inline void inlineDecl();
+ void inlineDecl() {}
+
+__declspec(dllexport) void inlineDef();
+ inline void inlineDef() {}
+
+// Redeclarations
+__declspec(dllexport) void redecl1();
+__declspec(dllexport) void redecl1() {}
+
+__declspec(dllexport) void redecl2();
+ void redecl2() {}
+
+ void redecl3(); // expected-note{{previous declaration is here}}
+__declspec(dllexport) void redecl3(); // expected-error{{redeclaration of 'redecl3' cannot add 'dllexport' attribute}}
+
+ void redecl4(); // expected-note{{previous declaration is here}}
+__declspec(dllexport) inline void redecl4() {} // expected-error{{redeclaration of 'redecl4' cannot add 'dllexport' attribute}}
+
+// Friend functions
+struct FuncFriend {
+ friend __declspec(dllexport) void friend1();
+ friend __declspec(dllexport) void friend2();
+ friend void friend3(); // expected-note{{previous declaration is here}}
+ friend void friend4(); // expected-note{{previous declaration is here}}
+};
+__declspec(dllexport) void friend1() {}
+ void friend2() {}
+__declspec(dllexport) void friend3() {} // expected-error{{redeclaration of 'friend3' cannot add 'dllexport' attribute}}
+__declspec(dllexport) inline void friend4() {} // expected-error{{redeclaration of 'friend4' cannot add 'dllexport' attribute}}
+
+// Implicit declarations can be redeclared with dllexport.
+__declspec(dllexport) void* operator new(__SIZE_TYPE__ n);
+
+// External linkage is required.
+__declspec(dllexport) static int staticFunc(); // expected-error{{'staticFunc' must have external linkage when declared 'dllexport'}}
+__declspec(dllexport) Internal internalRetFunc(); // expected-error{{'internalRetFunc' must have external linkage when declared 'dllexport'}}
+namespace { __declspec(dllexport) void internalFunc() {} } // expected-error{{'(anonymous namespace)::internalFunc' must have external linkage when declared 'dllexport'}}
+namespace ns { __declspec(dllexport) void externalFunc() {} }
+
+// Export deleted function.
+__declspec(dllexport) void deletedFunc() = delete; // expected-error{{attribute 'dllexport' cannot be applied to a deleted function}}
+__declspec(dllexport) inline void deletedInlineFunc() = delete; // expected-error{{attribute 'dllexport' cannot be applied to a deleted function}}
+
+
+
+//===----------------------------------------------------------------------===//
+// Function templates
+//===----------------------------------------------------------------------===//
+
+// Export function template declaration. Check different placements.
+template<typename T> __declspec(dllexport) void funcTmplDecl1();
+template<typename T> void __declspec(dllexport) funcTmplDecl2();
+
+// Export function template definition.
+template<typename T> __declspec(dllexport) void funcTmplDef() {}
+
+// Export inline function template.
+template<typename T> __declspec(dllexport) inline void inlineFuncTmpl1() {}
+template<typename T> inline void __attribute__((dllexport)) inlineFuncTmpl2() {}
+
+template<typename T> __declspec(dllexport) inline void inlineFuncTmplDecl();
+template<typename T> void inlineFuncTmplDecl() {}
+
+template<typename T> __declspec(dllexport) void inlineFuncTmplDef();
+template<typename T> inline void inlineFuncTmplDef() {}
+
+// Redeclarations
+template<typename T> __declspec(dllexport) void funcTmplRedecl1();
+template<typename T> __declspec(dllexport) void funcTmplRedecl1() {}
+
+template<typename T> __declspec(dllexport) void funcTmplRedecl2();
+template<typename T> void funcTmplRedecl2() {}
+
+template<typename T> void funcTmplRedecl3(); // expected-note{{previous declaration is here}}
+template<typename T> __declspec(dllexport) void funcTmplRedecl3(); // expected-error{{redeclaration of 'funcTmplRedecl3' cannot add 'dllexport' attribute}}
+
+template<typename T> void funcTmplRedecl4(); // expected-note{{previous declaration is here}}
+template<typename T> __declspec(dllexport) inline void funcTmplRedecl4() {} // expected-error{{redeclaration of 'funcTmplRedecl4' cannot add 'dllexport' attribute}}
+
+// Function template friends
+struct FuncTmplFriend {
+ template<typename T> friend __declspec(dllexport) void funcTmplFriend1();
+ template<typename T> friend __declspec(dllexport) void funcTmplFriend2();
+ template<typename T> friend void funcTmplFriend3(); // expected-note{{previous declaration is here}}
+ template<typename T> friend void funcTmplFriend4(); // expected-note{{previous declaration is here}}
+};
+template<typename T> __declspec(dllexport) void funcTmplFriend1() {}
+template<typename T> void funcTmplFriend2() {}
+template<typename T> __declspec(dllexport) void funcTmplFriend3() {} // expected-error{{redeclaration of 'funcTmplFriend3' cannot add 'dllexport' attribute}}
+template<typename T> __declspec(dllexport) inline void funcTmplFriend4() {} // expected-error{{redeclaration of 'funcTmplFriend4' cannot add 'dllexport' attribute}}
+
+// External linkage is required.
+template<typename T> __declspec(dllexport) static int staticFuncTmpl(); // expected-error{{'staticFuncTmpl' must have external linkage when declared 'dllexport'}}
+template<typename T> __declspec(dllexport) Internal internalRetFuncTmpl(); // expected-error{{'internalRetFuncTmpl' must have external linkage when declared 'dllexport'}}
+namespace { template<typename T> __declspec(dllexport) void internalFuncTmpl(); } // expected-error{{'(anonymous namespace)::internalFuncTmpl' must have external linkage when declared 'dllexport'}}
+namespace ns { template<typename T> __declspec(dllexport) void externalFuncTmpl(); }
+
+
+template<typename T> void funcTmpl() {}
+template<typename T> __declspec(dllexport) void exportedFuncTmplDecl();
+template<typename T> __declspec(dllexport) void exportedFuncTmpl() {}
+
+// Export implicit instantiation of an exported function template.
+void useFunTmplDecl() { exportedFuncTmplDecl<ImplicitInst_Exported>(); }
+void useFunTmplDef() { exportedFuncTmpl<ImplicitInst_Exported>(); }
+
+// Export explicit instantiation declaration of an exported function template.
+extern template void exportedFuncTmpl<ExplicitDecl_Exported>();
+ template void exportedFuncTmpl<ExplicitDecl_Exported>();
+
+// Export explicit instantiation definition of an exported function template.
+template void exportedFuncTmpl<ExplicitInst_Exported>();
+
+// Export specialization of an exported function template.
+template<> __declspec(dllexport) void exportedFuncTmpl<ExplicitSpec_Exported>();
+template<> __declspec(dllexport) void exportedFuncTmpl<ExplicitSpec_Def_Exported>() {}
+template<> __declspec(dllexport) inline void exportedFuncTmpl<ExplicitSpec_InlineDef_Exported>() {}
+
+// Not exporting specialization of an exported function template without
+// explicit dllexport.
+template<> void exportedFuncTmpl<ExplicitSpec_NotExported>() {}
+
+
+// Export explicit instantiation declaration of a non-exported function template.
+extern template __declspec(dllexport) void funcTmpl<ExplicitDecl_Exported>();
+ template __declspec(dllexport) void funcTmpl<ExplicitDecl_Exported>();
+
+// Export explicit instantiation definition of a non-exported function template.
+template __declspec(dllexport) void funcTmpl<ExplicitInst_Exported>();
+
+// Export specialization of a non-exported function template.
+template<> __declspec(dllexport) void funcTmpl<ExplicitSpec_Exported>();
+template<> __declspec(dllexport) void funcTmpl<ExplicitSpec_Def_Exported>() {}
+template<> __declspec(dllexport) inline void funcTmpl<ExplicitSpec_InlineDef_Exported>() {}
+
+
+
+//===----------------------------------------------------------------------===//
+// Classes
+//===----------------------------------------------------------------------===//
+
+class __declspec(dllexport) ClassDecl;
+
+class __declspec(dllexport) ClassDef {};
+
+#ifdef MS
+// expected-warning@+3{{'dllexport' attribute ignored}}
+#endif
+template <typename T> struct PartiallySpecializedClassTemplate {};
+template <typename T> struct __declspec(dllexport) PartiallySpecializedClassTemplate<T*> { void f() {} };
+
+template <typename T> struct ExpliciallySpecializedClassTemplate {};
+template <> struct __declspec(dllexport) ExpliciallySpecializedClassTemplate<int> { void f() {} };
+
+
+//===----------------------------------------------------------------------===//
+// Classes with template base classes
+//===----------------------------------------------------------------------===//
+
+template <typename T> class ClassTemplate {};
+template <typename T> class __declspec(dllexport) ExportedClassTemplate {};
+template <typename T> class __declspec(dllimport) ImportedClassTemplate {};
+
+template <typename T> struct ExplicitlySpecializedTemplate { void func() {} };
+#ifdef MS
+// expected-note@+2{{class template 'ExplicitlySpecializedTemplate<int>' was explicitly specialized here}}
+#endif
+template <> struct ExplicitlySpecializedTemplate<int> { void func() {} };
+template <typename T> struct ExplicitlyExportSpecializedTemplate { void func() {} };
+template <> struct __declspec(dllexport) ExplicitlyExportSpecializedTemplate<int> { void func() {} };
+template <typename T> struct ExplicitlyImportSpecializedTemplate { void func() {} };
+template <> struct __declspec(dllimport) ExplicitlyImportSpecializedTemplate<int> { void func() {} };
+
+template <typename T> struct ExplicitlyInstantiatedTemplate { void func() {} };
+#ifdef MS
+// expected-note@+2{{class template 'ExplicitlyInstantiatedTemplate<int>' was instantiated here}}
+#endif
+template struct ExplicitlyInstantiatedTemplate<int>;
+template <typename T> struct ExplicitlyExportInstantiatedTemplate { void func() {} };
+template struct __declspec(dllexport) ExplicitlyExportInstantiatedTemplate<int>;
+template <typename T> struct ExplicitlyImportInstantiatedTemplate { void func() {} };
+template struct __declspec(dllimport) ExplicitlyImportInstantiatedTemplate<int>;
+
+// ClassTemplate<int> gets exported.
+class __declspec(dllexport) DerivedFromTemplate : public ClassTemplate<int> {};
+
+// ClassTemplate<int> is already exported.
+class __declspec(dllexport) DerivedFromTemplate2 : public ClassTemplate<int> {};
+
+// ExportedTemplate is explicitly exported.
+class __declspec(dllexport) DerivedFromExportedTemplate : public ExportedClassTemplate<int> {};
+
+// ImportedTemplate is explicitly imported.
+class __declspec(dllexport) DerivedFromImportedTemplate : public ImportedClassTemplate<int> {};
+
+#ifdef MS
+// expected-note@+4{{class template 'ClassTemplate<double>' was instantiated here}}
+// expected-warning@+4{{propagating dll attribute to already instantiated base class template without dll attribute is not supported}}
+// expected-note@+3{{attribute is here}}
+#endif
+class DerivedFromTemplateD : public ClassTemplate<double> {};
+class __declspec(dllexport) DerivedFromTemplateD2 : public ClassTemplate<double> {};
+
+#ifdef MS
+// expected-note@+4{{class template 'ClassTemplate<bool>' was instantiated here}}
+// expected-warning@+4{{propagating dll attribute to already instantiated base class template with different dll attribute is not supported}}
+// expected-note@+3{{attribute is here}}
+#endif
+class __declspec(dllimport) DerivedFromTemplateB : public ClassTemplate<bool> {};
+class __declspec(dllexport) DerivedFromTemplateB2 : public ClassTemplate<bool> {};
+
+#ifdef MS
+// expected-warning@+3{{propagating dll attribute to explicitly specialized base class template without dll attribute is not supported}}
+// expected-note@+2{{attribute is here}}
+#endif
+struct __declspec(dllexport) DerivedFromExplicitlySpecializedTemplate : public ExplicitlySpecializedTemplate<int> {};
+
+// Base class alredy specialized with export attribute.
+struct __declspec(dllexport) DerivedFromExplicitlyExportSpecializedTemplate : public ExplicitlyExportSpecializedTemplate<int> {};
+
+// Base class already specialized with import attribute.
+struct __declspec(dllexport) DerivedFromExplicitlyImportSpecializedTemplate : public ExplicitlyImportSpecializedTemplate<int> {};
+
+#ifdef MS
+// expected-warning@+3{{propagating dll attribute to already instantiated base class template without dll attribute is not supported}}
+// expected-note@+2{{attribute is here}}
+#endif
+struct __declspec(dllexport) DerivedFromExplicitlyInstantiatedTemplate : public ExplicitlyInstantiatedTemplate<int> {};
+
+// Base class already instantiated with export attribute.
+struct __declspec(dllexport) DerivedFromExplicitlyExportInstantiatedTemplate : public ExplicitlyExportInstantiatedTemplate<int> {};
+
+// Base class already instantiated with import attribute.
+struct __declspec(dllexport) DerivedFromExplicitlyImportInstantiatedTemplate : public ExplicitlyImportInstantiatedTemplate<int> {};
+
+
+//===----------------------------------------------------------------------===//
+// Precedence
+//===----------------------------------------------------------------------===//
+
+// dllexport takes precedence over dllimport if both are specified.
+__attribute__((dllimport, dllexport)) extern int PrecedenceExternGlobal1A; // expected-warning{{'dllimport' attribute ignored}}
+__declspec(dllimport) __declspec(dllexport) extern int PrecedenceExternGlobal1B; // expected-warning{{'dllimport' attribute ignored}}
+
+__attribute__((dllexport, dllimport)) extern int PrecedenceExternGlobal2A; // expected-warning{{'dllimport' attribute ignored}}
+__declspec(dllexport) __declspec(dllimport) extern int PrecedenceExternGlobal2B; // expected-warning{{'dllimport' attribute ignored}}
+
+__attribute__((dllimport, dllexport)) int PrecedenceGlobal1A; // expected-warning{{'dllimport' attribute ignored}}
+__declspec(dllimport) __declspec(dllexport) int PrecedenceGlobal1B; // expected-warning{{'dllimport' attribute ignored}}
+
+__attribute__((dllexport, dllimport)) int PrecedenceGlobal2A; // expected-warning{{'dllimport' attribute ignored}}
+__declspec(dllexport) __declspec(dllimport) int PrecedenceGlobal2B; // expected-warning{{'dllimport' attribute ignored}}
+
+__declspec(dllexport) extern int PrecedenceExternGlobalRedecl1;
+__declspec(dllimport) extern int PrecedenceExternGlobalRedecl1; // expected-warning{{'dllimport' attribute ignored}}
+
+__declspec(dllimport) extern int PrecedenceExternGlobalRedecl2; // expected-warning{{'dllimport' attribute ignored}}
+__declspec(dllexport) extern int PrecedenceExternGlobalRedecl2;
+
+__declspec(dllexport) extern int PrecedenceGlobalRedecl1;
+__declspec(dllimport) int PrecedenceGlobalRedecl1; // expected-warning{{'dllimport' attribute ignored}}
+
+__declspec(dllimport) extern int PrecedenceGlobalRedecl2; // expected-warning{{'dllimport' attribute ignored}}
+__declspec(dllexport) int PrecedenceGlobalRedecl2;
+
+void __attribute__((dllimport, dllexport)) precedence1A() {} // expected-warning{{'dllimport' attribute ignored}}
+void __declspec(dllimport) __declspec(dllexport) precedence1B() {} // expected-warning{{'dllimport' attribute ignored}}
+
+void __attribute__((dllexport, dllimport)) precedence2A() {} // expected-warning{{'dllimport' attribute ignored}}
+void __declspec(dllexport) __declspec(dllimport) precedence2B() {} // expected-warning{{'dllimport' attribute ignored}}
+
+void __declspec(dllimport) precedenceRedecl1(); // expected-warning{{'dllimport' attribute ignored}}
+void __declspec(dllexport) precedenceRedecl1() {}
+
+void __declspec(dllexport) precedenceRedecl2();
+void __declspec(dllimport) precedenceRedecl2() {} // expected-warning{{'dllimport' attribute ignored}}
+
+
+
+//===----------------------------------------------------------------------===//
+// Class members
+//===----------------------------------------------------------------------===//
+
+// Export individual members of a class.
+struct ExportMembers {
+ struct Nested {
+ __declspec(dllexport) void normalDef();
+ };
+
+ __declspec(dllexport) void normalDecl();
+ __declspec(dllexport) void normalDef();
+ __declspec(dllexport) void normalInclass() {}
+ __declspec(dllexport) void normalInlineDef();
+ __declspec(dllexport) inline void normalInlineDecl();
+ __declspec(dllexport) virtual void virtualDecl();
+ __declspec(dllexport) virtual void virtualDef();
+ __declspec(dllexport) virtual void virtualInclass() {}
+ __declspec(dllexport) virtual void virtualInlineDef();
+ __declspec(dllexport) virtual inline void virtualInlineDecl();
+ __declspec(dllexport) static void staticDecl();
+ __declspec(dllexport) static void staticDef();
+ __declspec(dllexport) static void staticInclass() {}
+ __declspec(dllexport) static void staticInlineDef();
+ __declspec(dllexport) static inline void staticInlineDecl();
+
+protected:
+ __declspec(dllexport) void protectedDef();
+private:
+ __declspec(dllexport) void privateDef();
+public:
+
+ __declspec(dllexport) int Field; // expected-warning{{'dllexport' attribute only applies to variables, functions and classes}}
+ __declspec(dllexport) static int StaticField;
+ __declspec(dllexport) static int StaticFieldDef;
+ __declspec(dllexport) static const int StaticConstField;
+ __declspec(dllexport) static const int StaticConstFieldDef;
+ __declspec(dllexport) static const int StaticConstFieldEqualInit = 1;
+ __declspec(dllexport) static const int StaticConstFieldBraceInit{1};
+ __declspec(dllexport) constexpr static int ConstexprField = 1;
+ __declspec(dllexport) constexpr static int ConstexprFieldDef = 1;
+};
+
+ void ExportMembers::Nested::normalDef() {}
+ void ExportMembers::normalDef() {}
+inline void ExportMembers::normalInlineDef() {}
+ void ExportMembers::normalInlineDecl() {}
+ void ExportMembers::virtualDef() {}
+inline void ExportMembers::virtualInlineDef() {}
+ void ExportMembers::virtualInlineDecl() {}
+ void ExportMembers::staticDef() {}
+inline void ExportMembers::staticInlineDef() {}
+ void ExportMembers::staticInlineDecl() {}
+ void ExportMembers::protectedDef() {}
+ void ExportMembers::privateDef() {}
+
+ int ExportMembers::StaticFieldDef;
+const int ExportMembers::StaticConstFieldDef = 1;
+constexpr int ExportMembers::ConstexprFieldDef;
+
+
+// Export on member definitions.
+struct ExportMemberDefs {
+ __declspec(dllexport) void normalDef();
+ __declspec(dllexport) void normalInlineDef();
+ __declspec(dllexport) inline void normalInlineDecl();
+ __declspec(dllexport) virtual void virtualDef();
+ __declspec(dllexport) virtual void virtualInlineDef();
+ __declspec(dllexport) virtual inline void virtualInlineDecl();
+ __declspec(dllexport) static void staticDef();
+ __declspec(dllexport) static void staticInlineDef();
+ __declspec(dllexport) static inline void staticInlineDecl();
+
+ __declspec(dllexport) static int StaticField;
+ __declspec(dllexport) static const int StaticConstField;
+ __declspec(dllexport) constexpr static int ConstexprField = 1;
+};
+
+__declspec(dllexport) void ExportMemberDefs::normalDef() {}
+__declspec(dllexport) inline void ExportMemberDefs::normalInlineDef() {}
+__declspec(dllexport) void ExportMemberDefs::normalInlineDecl() {}
+__declspec(dllexport) void ExportMemberDefs::virtualDef() {}
+__declspec(dllexport) inline void ExportMemberDefs::virtualInlineDef() {}
+__declspec(dllexport) void ExportMemberDefs::virtualInlineDecl() {}
+__declspec(dllexport) void ExportMemberDefs::staticDef() {}
+__declspec(dllexport) inline void ExportMemberDefs::staticInlineDef() {}
+__declspec(dllexport) void ExportMemberDefs::staticInlineDecl() {}
+
+__declspec(dllexport) int ExportMemberDefs::StaticField;
+__declspec(dllexport) const int ExportMemberDefs::StaticConstField = 1;
+__declspec(dllexport) constexpr int ExportMemberDefs::ConstexprField;
+
+
+// Export special member functions.
+struct ExportSpecials {
+ __declspec(dllexport) ExportSpecials() {}
+ __declspec(dllexport) ~ExportSpecials();
+ __declspec(dllexport) inline ExportSpecials(const ExportSpecials&);
+ __declspec(dllexport) ExportSpecials& operator=(const ExportSpecials&);
+ __declspec(dllexport) ExportSpecials(ExportSpecials&&);
+ __declspec(dllexport) ExportSpecials& operator=(ExportSpecials&&);
+};
+
+ExportSpecials::~ExportSpecials() {}
+ExportSpecials::ExportSpecials(const ExportSpecials&) {}
+inline ExportSpecials& ExportSpecials::operator=(const ExportSpecials&) { return *this; }
+ExportSpecials::ExportSpecials(ExportSpecials&&) {}
+ExportSpecials& ExportSpecials::operator=(ExportSpecials&&) { return *this; }
+
+
+// Export allocation functions.
+extern "C" void* malloc(__SIZE_TYPE__ size);
+extern "C" void free(void* p);
+struct ExportAlloc {
+ __declspec(dllexport) void* operator new(__SIZE_TYPE__);
+ __declspec(dllexport) void* operator new[](__SIZE_TYPE__);
+ __declspec(dllexport) void operator delete(void*);
+ __declspec(dllexport) void operator delete[](void*);
+};
+void* ExportAlloc::operator new(__SIZE_TYPE__ n) { return malloc(n); }
+void* ExportAlloc::operator new[](__SIZE_TYPE__ n) { return malloc(n); }
+void ExportAlloc::operator delete(void* p) { free(p); }
+void ExportAlloc::operator delete[](void* p) { free(p); }
+
+
+// Export deleted member functions.
+struct ExportDeleted {
+ __declspec(dllexport) ExportDeleted() = delete; // expected-error{{attribute 'dllexport' cannot be applied to a deleted function}}
+ __declspec(dllexport) ~ExportDeleted() = delete; // expected-error{{attribute 'dllexport' cannot be applied to a deleted function}}
+ __declspec(dllexport) ExportDeleted(const ExportDeleted&) = delete; // expected-error{{attribute 'dllexport' cannot be applied to a deleted function}}
+ __declspec(dllexport) ExportDeleted& operator=(const ExportDeleted&) = delete; // expected-error{{attribute 'dllexport' cannot be applied to a deleted function}}
+ __declspec(dllexport) ExportDeleted(ExportDeleted&&) = delete; // expected-error{{attribute 'dllexport' cannot be applied to a deleted function}}
+ __declspec(dllexport) ExportDeleted& operator=(ExportDeleted&&) = delete; // expected-error{{attribute 'dllexport' cannot be applied to a deleted function}}
+ __declspec(dllexport) void deleted() = delete; // expected-error{{attribute 'dllexport' cannot be applied to a deleted function}}
+};
+
+
+// Export defaulted member functions.
+struct ExportDefaulted {
+ __declspec(dllexport) ExportDefaulted() = default;
+ __declspec(dllexport) ~ExportDefaulted() = default;
+ __declspec(dllexport) ExportDefaulted(const ExportDefaulted&) = default;
+ __declspec(dllexport) ExportDefaulted& operator=(const ExportDefaulted&) = default;
+ __declspec(dllexport) ExportDefaulted(ExportDefaulted&&) = default;
+ __declspec(dllexport) ExportDefaulted& operator=(ExportDefaulted&&) = default;
+};
+
+
+// Export defaulted member function definitions.
+struct ExportDefaultedDefs {
+ __declspec(dllexport) ExportDefaultedDefs();
+ __declspec(dllexport) ~ExportDefaultedDefs();
+
+ __declspec(dllexport) inline ExportDefaultedDefs(const ExportDefaultedDefs&);
+ __declspec(dllexport) ExportDefaultedDefs& operator=(const ExportDefaultedDefs&);
+
+ __declspec(dllexport) ExportDefaultedDefs(ExportDefaultedDefs&&);
+ __declspec(dllexport) ExportDefaultedDefs& operator=(ExportDefaultedDefs&&);
+};
+
+// Export definitions.
+__declspec(dllexport) ExportDefaultedDefs::ExportDefaultedDefs() = default;
+ExportDefaultedDefs::~ExportDefaultedDefs() = default;
+
+// Export inline declaration and definition.
+__declspec(dllexport) ExportDefaultedDefs::ExportDefaultedDefs(const ExportDefaultedDefs&) = default;
+inline ExportDefaultedDefs& ExportDefaultedDefs::operator=(const ExportDefaultedDefs&) = default;
+
+__declspec(dllexport) ExportDefaultedDefs::ExportDefaultedDefs(ExportDefaultedDefs&&) = default;
+ExportDefaultedDefs& ExportDefaultedDefs::operator=(ExportDefaultedDefs&&) = default;
+
+
+// Redeclarations cannot add dllexport.
+struct MemberRedecl {
+ void normalDef(); // expected-note{{previous declaration is here}}
+ void normalInlineDef(); // expected-note{{previous declaration is here}}
+ inline void normalInlineDecl(); // expected-note{{previous declaration is here}}
+ virtual void virtualDef(); // expected-note{{previous declaration is here}}
+ virtual void virtualInlineDef(); // expected-note{{previous declaration is here}}
+ virtual inline void virtualInlineDecl(); // expected-note{{previous declaration is here}}
+ static void staticDef(); // expected-note{{previous declaration is here}}
+ static void staticInlineDef(); // expected-note{{previous declaration is here}}
+ static inline void staticInlineDecl(); // expected-note{{previous declaration is here}}
+
+ static int StaticField; // expected-note{{previous declaration is here}}
+ static const int StaticConstField; // expected-note{{previous declaration is here}}
+ constexpr static int ConstexprField = 1; // expected-note{{previous declaration is here}}
+};
+
+__declspec(dllexport) void MemberRedecl::normalDef() {} // expected-error{{redeclaration of 'MemberRedecl::normalDef' cannot add 'dllexport' attribute}}
+__declspec(dllexport) inline void MemberRedecl::normalInlineDef() {} // expected-error{{redeclaration of 'MemberRedecl::normalInlineDef' cannot add 'dllexport' attribute}}
+__declspec(dllexport) void MemberRedecl::normalInlineDecl() {} // expected-error{{redeclaration of 'MemberRedecl::normalInlineDecl' cannot add 'dllexport' attribute}}
+__declspec(dllexport) void MemberRedecl::virtualDef() {} // expected-error{{redeclaration of 'MemberRedecl::virtualDef' cannot add 'dllexport' attribute}}
+__declspec(dllexport) inline void MemberRedecl::virtualInlineDef() {} // expected-error{{redeclaration of 'MemberRedecl::virtualInlineDef' cannot add 'dllexport' attribute}}
+__declspec(dllexport) void MemberRedecl::virtualInlineDecl() {} // expected-error{{redeclaration of 'MemberRedecl::virtualInlineDecl' cannot add 'dllexport' attribute}}
+__declspec(dllexport) void MemberRedecl::staticDef() {} // expected-error{{redeclaration of 'MemberRedecl::staticDef' cannot add 'dllexport' attribute}}
+__declspec(dllexport) inline void MemberRedecl::staticInlineDef() {} // expected-error{{redeclaration of 'MemberRedecl::staticInlineDef' cannot add 'dllexport' attribute}}
+__declspec(dllexport) void MemberRedecl::staticInlineDecl() {} // expected-error{{redeclaration of 'MemberRedecl::staticInlineDecl' cannot add 'dllexport' attribute}}
+
+__declspec(dllexport) int MemberRedecl::StaticField = 1; // expected-error{{redeclaration of 'MemberRedecl::StaticField' cannot add 'dllexport' attribute}}
+__declspec(dllexport) const int MemberRedecl::StaticConstField = 1; // expected-error{{redeclaration of 'MemberRedecl::StaticConstField' cannot add 'dllexport' attribute}}
+__declspec(dllexport) constexpr int MemberRedecl::ConstexprField; // expected-error{{redeclaration of 'MemberRedecl::ConstexprField' cannot add 'dllexport' attribute}}
+
+
+
+//===----------------------------------------------------------------------===//
+// Class member templates
+//===----------------------------------------------------------------------===//
+
+struct ExportMemberTmpl {
+ template<typename T> __declspec(dllexport) void normalDecl();
+ template<typename T> __declspec(dllexport) void normalDef();
+ template<typename T> __declspec(dllexport) void normalInclass() {}
+ template<typename T> __declspec(dllexport) void normalInlineDef();
+ template<typename T> __declspec(dllexport) inline void normalInlineDecl();
+ template<typename T> __declspec(dllexport) static void staticDecl();
+ template<typename T> __declspec(dllexport) static void staticDef();
+ template<typename T> __declspec(dllexport) static void staticInclass() {}
+ template<typename T> __declspec(dllexport) static void staticInlineDef();
+ template<typename T> __declspec(dllexport) static inline void staticInlineDecl();
+
+#if __has_feature(cxx_variable_templates)
+ template<typename T> __declspec(dllexport) static int StaticField;
+ template<typename T> __declspec(dllexport) static int StaticFieldDef;
+ template<typename T> __declspec(dllexport) static const int StaticConstField;
+ template<typename T> __declspec(dllexport) static const int StaticConstFieldDef;
+ template<typename T> __declspec(dllexport) static const int StaticConstFieldEqualInit = 1;
+ template<typename T> __declspec(dllexport) static const int StaticConstFieldBraceInit{1};
+ template<typename T> __declspec(dllexport) constexpr static int ConstexprField = 1;
+ template<typename T> __declspec(dllexport) constexpr static int ConstexprFieldDef = 1;
+#endif // __has_feature(cxx_variable_templates)
+};
+
+template<typename T> void ExportMemberTmpl::normalDef() {}
+template<typename T> inline void ExportMemberTmpl::normalInlineDef() {}
+template<typename T> void ExportMemberTmpl::normalInlineDecl() {}
+template<typename T> void ExportMemberTmpl::staticDef() {}
+template<typename T> inline void ExportMemberTmpl::staticInlineDef() {}
+template<typename T> void ExportMemberTmpl::staticInlineDecl() {}
+
+#if __has_feature(cxx_variable_templates)
+template<typename T> int ExportMemberTmpl::StaticFieldDef;
+template<typename T> const int ExportMemberTmpl::StaticConstFieldDef = 1;
+template<typename T> constexpr int ExportMemberTmpl::ConstexprFieldDef;
+#endif // __has_feature(cxx_variable_templates)
+
+
+// Redeclarations cannot add dllexport.
+struct MemTmplRedecl {
+ template<typename T> void normalDef(); // expected-note{{previous declaration is here}}
+ template<typename T> void normalInlineDef(); // expected-note{{previous declaration is here}}
+ template<typename T> inline void normalInlineDecl(); // expected-note{{previous declaration is here}}
+ template<typename T> static void staticDef(); // expected-note{{previous declaration is here}}
+ template<typename T> static void staticInlineDef(); // expected-note{{previous declaration is here}}
+ template<typename T> static inline void staticInlineDecl(); // expected-note{{previous declaration is here}}
+
+#if __has_feature(cxx_variable_templates)
+ template<typename T> static int StaticField; // expected-note{{previous declaration is here}}
+ template<typename T> static const int StaticConstField; // expected-note{{previous declaration is here}}
+ template<typename T> constexpr static int ConstexprField = 1; // expected-note{{previous declaration is here}}
+#endif // __has_feature(cxx_variable_templates)
+};
+
+template<typename T> __declspec(dllexport) void MemTmplRedecl::normalDef() {} // expected-error{{redeclaration of 'MemTmplRedecl::normalDef' cannot add 'dllexport' attribute}}
+template<typename T> __declspec(dllexport) inline void MemTmplRedecl::normalInlineDef() {} // expected-error{{redeclaration of 'MemTmplRedecl::normalInlineDef' cannot add 'dllexport' attribute}}
+template<typename T> __declspec(dllexport) void MemTmplRedecl::normalInlineDecl() {} // expected-error{{redeclaration of 'MemTmplRedecl::normalInlineDecl' cannot add 'dllexport' attribute}}
+template<typename T> __declspec(dllexport) void MemTmplRedecl::staticDef() {} // expected-error{{redeclaration of 'MemTmplRedecl::staticDef' cannot add 'dllexport' attribute}}
+template<typename T> __declspec(dllexport) inline void MemTmplRedecl::staticInlineDef() {} // expected-error{{redeclaration of 'MemTmplRedecl::staticInlineDef' cannot add 'dllexport' attribute}}
+template<typename T> __declspec(dllexport) void MemTmplRedecl::staticInlineDecl() {} // expected-error{{redeclaration of 'MemTmplRedecl::staticInlineDecl' cannot add 'dllexport' attribute}}
+
+#if __has_feature(cxx_variable_templates)
+template<typename T> __declspec(dllexport) int MemTmplRedecl::StaticField = 1; // expected-error{{redeclaration of 'MemTmplRedecl::StaticField' cannot add 'dllexport' attribute}}
+template<typename T> __declspec(dllexport) const int MemTmplRedecl::StaticConstField = 1; // expected-error{{redeclaration of 'MemTmplRedecl::StaticConstField' cannot add 'dllexport' attribute}}
+template<typename T> __declspec(dllexport) constexpr int MemTmplRedecl::ConstexprField; // expected-error{{redeclaration of 'MemTmplRedecl::ConstexprField' cannot add 'dllexport' attribute}}
+#endif // __has_feature(cxx_variable_templates)
+
+
+
+struct MemFunTmpl {
+ template<typename T> void normalDef() {}
+ template<typename T> __declspec(dllexport) void exportedNormal() {}
+ template<typename T> static void staticDef() {}
+ template<typename T> __declspec(dllexport) static void exportedStatic() {}
+};
+
+// Export implicit instantiation of an exported member function template.
+void useMemFunTmpl() {
+ MemFunTmpl().exportedNormal<ImplicitInst_Exported>();
+ MemFunTmpl().exportedStatic<ImplicitInst_Exported>();
+}
+
+// Export explicit instantiation declaration of an exported member function
+// template.
+extern template void MemFunTmpl::exportedNormal<ExplicitDecl_Exported>();
+ template void MemFunTmpl::exportedNormal<ExplicitDecl_Exported>();
+
+extern template void MemFunTmpl::exportedStatic<ExplicitDecl_Exported>();
+ template void MemFunTmpl::exportedStatic<ExplicitDecl_Exported>();
+
+// Export explicit instantiation definition of an exported member function
+// template.
+template void MemFunTmpl::exportedNormal<ExplicitInst_Exported>();
+template void MemFunTmpl::exportedStatic<ExplicitInst_Exported>();
+
+// Export specialization of an exported member function template.
+template<> __declspec(dllexport) void MemFunTmpl::exportedNormal<ExplicitSpec_Exported>();
+template<> __declspec(dllexport) void MemFunTmpl::exportedNormal<ExplicitSpec_Def_Exported>() {}
+template<> __declspec(dllexport) inline void MemFunTmpl::exportedNormal<ExplicitSpec_InlineDef_Exported>() {}
+
+template<> __declspec(dllexport) void MemFunTmpl::exportedStatic<ExplicitSpec_Exported>();
+template<> __declspec(dllexport) void MemFunTmpl::exportedStatic<ExplicitSpec_Def_Exported>() {}
+template<> __declspec(dllexport) inline void MemFunTmpl::exportedStatic<ExplicitSpec_InlineDef_Exported>() {}
+
+// Not exporting specialization of an exported member function template without
+// explicit dllexport.
+template<> void MemFunTmpl::exportedNormal<ExplicitSpec_NotExported>() {}
+template<> void MemFunTmpl::exportedStatic<ExplicitSpec_NotExported>() {}
+
+
+// Export explicit instantiation declaration of a non-exported member function
+// template.
+extern template __declspec(dllexport) void MemFunTmpl::normalDef<ExplicitDecl_Exported>();
+ template __declspec(dllexport) void MemFunTmpl::normalDef<ExplicitDecl_Exported>();
+
+extern template __declspec(dllexport) void MemFunTmpl::staticDef<ExplicitDecl_Exported>();
+ template __declspec(dllexport) void MemFunTmpl::staticDef<ExplicitDecl_Exported>();
+
+// Export explicit instantiation definition of a non-exported member function
+// template.
+template __declspec(dllexport) void MemFunTmpl::normalDef<ExplicitInst_Exported>();
+template __declspec(dllexport) void MemFunTmpl::staticDef<ExplicitInst_Exported>();
+
+// Export specialization of a non-exported member function template.
+template<> __declspec(dllexport) void MemFunTmpl::normalDef<ExplicitSpec_Exported>();
+template<> __declspec(dllexport) void MemFunTmpl::normalDef<ExplicitSpec_Def_Exported>() {}
+template<> __declspec(dllexport) inline void MemFunTmpl::normalDef<ExplicitSpec_InlineDef_Exported>() {}
+
+template<> __declspec(dllexport) void MemFunTmpl::staticDef<ExplicitSpec_Exported>();
+template<> __declspec(dllexport) void MemFunTmpl::staticDef<ExplicitSpec_Def_Exported>() {}
+template<> __declspec(dllexport) inline void MemFunTmpl::staticDef<ExplicitSpec_InlineDef_Exported>() {}
+
+
+
+#if __has_feature(cxx_variable_templates)
+struct MemVarTmpl {
+ template<typename T> static const int StaticVar = 1;
+ template<typename T> __declspec(dllexport) static const int ExportedStaticVar = 1;
+};
+template<typename T> const int MemVarTmpl::StaticVar;
+template<typename T> const int MemVarTmpl::ExportedStaticVar;
+
+// Export implicit instantiation of an exported member variable template.
+int useMemVarTmpl() { return MemVarTmpl::ExportedStaticVar<ImplicitInst_Exported>; }
+
+// Export explicit instantiation declaration of an exported member variable
+// template.
+extern template const int MemVarTmpl::ExportedStaticVar<ExplicitDecl_Exported>;
+ template const int MemVarTmpl::ExportedStaticVar<ExplicitDecl_Exported>;
+
+// Export explicit instantiation definition of an exported member variable
+// template.
+template const int MemVarTmpl::ExportedStaticVar<ExplicitInst_Exported>;
+
+// Export specialization of an exported member variable template.
+template<> __declspec(dllexport) const int MemVarTmpl::ExportedStaticVar<ExplicitSpec_Exported>;
+template<> __declspec(dllexport) const int MemVarTmpl::ExportedStaticVar<ExplicitSpec_Def_Exported> = 1;
+
+// Not exporting specialization of an exported member variable template without
+// explicit dllexport.
+template<> const int MemVarTmpl::ExportedStaticVar<ExplicitSpec_NotExported>;
+
+
+// Export explicit instantiation declaration of a non-exported member variable
+// template.
+extern template __declspec(dllexport) const int MemVarTmpl::StaticVar<ExplicitDecl_Exported>;
+ template __declspec(dllexport) const int MemVarTmpl::StaticVar<ExplicitDecl_Exported>;
+
+// Export explicit instantiation definition of a non-exported member variable
+// template.
+template __declspec(dllexport) const int MemVarTmpl::StaticVar<ExplicitInst_Exported>;
+
+// Export specialization of a non-exported member variable template.
+template<> __declspec(dllexport) const int MemVarTmpl::StaticVar<ExplicitSpec_Exported>;
+template<> __declspec(dllexport) const int MemVarTmpl::StaticVar<ExplicitSpec_Def_Exported> = 1;
+
+#endif // __has_feature(cxx_variable_templates)
+
+
+
+//===----------------------------------------------------------------------===//
+// Class template members
+//===----------------------------------------------------------------------===//
+
+// Export individual members of a class template.
+template<typename T>
+struct ExportClassTmplMembers {
+ __declspec(dllexport) void normalDecl();
+ __declspec(dllexport) void normalDef();
+ __declspec(dllexport) void normalInclass() {}
+ __declspec(dllexport) void normalInlineDef();
+ __declspec(dllexport) inline void normalInlineDecl();
+ __declspec(dllexport) virtual void virtualDecl();
+ __declspec(dllexport) virtual void virtualDef();
+ __declspec(dllexport) virtual void virtualInclass() {}
+ __declspec(dllexport) virtual void virtualInlineDef();
+ __declspec(dllexport) virtual inline void virtualInlineDecl();
+ __declspec(dllexport) static void staticDecl();
+ __declspec(dllexport) static void staticDef();
+ __declspec(dllexport) static void staticInclass() {}
+ __declspec(dllexport) static void staticInlineDef();
+ __declspec(dllexport) static inline void staticInlineDecl();
+
+protected:
+ __declspec(dllexport) void protectedDef();
+private:
+ __declspec(dllexport) void privateDef();
+public:
+
+ __declspec(dllexport) int Field; // expected-warning{{'dllexport' attribute only applies to variables, functions and classes}}
+ __declspec(dllexport) static int StaticField;
+ __declspec(dllexport) static int StaticFieldDef;
+ __declspec(dllexport) static const int StaticConstField;
+ __declspec(dllexport) static const int StaticConstFieldDef;
+ __declspec(dllexport) static const int StaticConstFieldEqualInit = 1;
+ __declspec(dllexport) static const int StaticConstFieldBraceInit{1};
+ __declspec(dllexport) constexpr static int ConstexprField = 1;
+ __declspec(dllexport) constexpr static int ConstexprFieldDef = 1;
+};
+
+template<typename T> void ExportClassTmplMembers<T>::normalDef() {}
+template<typename T> inline void ExportClassTmplMembers<T>::normalInlineDef() {}
+template<typename T> void ExportClassTmplMembers<T>::normalInlineDecl() {}
+template<typename T> void ExportClassTmplMembers<T>::virtualDef() {}
+template<typename T> inline void ExportClassTmplMembers<T>::virtualInlineDef() {}
+template<typename T> void ExportClassTmplMembers<T>::virtualInlineDecl() {}
+template<typename T> void ExportClassTmplMembers<T>::staticDef() {}
+template<typename T> inline void ExportClassTmplMembers<T>::staticInlineDef() {}
+template<typename T> void ExportClassTmplMembers<T>::staticInlineDecl() {}
+template<typename T> void ExportClassTmplMembers<T>::protectedDef() {}
+template<typename T> void ExportClassTmplMembers<T>::privateDef() {}
+
+template<typename T> int ExportClassTmplMembers<T>::StaticFieldDef;
+template<typename T> const int ExportClassTmplMembers<T>::StaticConstFieldDef = 1;
+template<typename T> constexpr int ExportClassTmplMembers<T>::ConstexprFieldDef;
+
+template struct ExportClassTmplMembers<ImplicitInst_Exported>;
+
+
+// Redeclarations cannot add dllexport.
+template<typename T>
+struct CTMR /*ClassTmplMemberRedecl*/ {
+ void normalDef(); // expected-note{{previous declaration is here}}
+ void normalInlineDef(); // expected-note{{previous declaration is here}}
+ inline void normalInlineDecl(); // expected-note{{previous declaration is here}}
+ virtual void virtualDef(); // expected-note{{previous declaration is here}}
+ virtual void virtualInlineDef(); // expected-note{{previous declaration is here}}
+ virtual inline void virtualInlineDecl(); // expected-note{{previous declaration is here}}
+ static void staticDef(); // expected-note{{previous declaration is here}}
+ static void staticInlineDef(); // expected-note{{previous declaration is here}}
+ static inline void staticInlineDecl(); // expected-note{{previous declaration is here}}
+
+ static int StaticField; // expected-note{{previous declaration is here}}
+ static const int StaticConstField; // expected-note{{previous declaration is here}}
+ constexpr static int ConstexprField = 1; // expected-note{{previous declaration is here}}
+};
+
+template<typename T> __declspec(dllexport) void CTMR<T>::normalDef() {} // expected-error{{redeclaration of 'CTMR::normalDef' cannot add 'dllexport' attribute}}
+template<typename T> __declspec(dllexport) inline void CTMR<T>::normalInlineDef() {} // expected-error{{redeclaration of 'CTMR::normalInlineDef' cannot add 'dllexport' attribute}}
+template<typename T> __declspec(dllexport) void CTMR<T>::normalInlineDecl() {} // expected-error{{redeclaration of 'CTMR::normalInlineDecl' cannot add 'dllexport' attribute}}
+template<typename T> __declspec(dllexport) void CTMR<T>::virtualDef() {} // expected-error{{redeclaration of 'CTMR::virtualDef' cannot add 'dllexport' attribute}}
+template<typename T> __declspec(dllexport) inline void CTMR<T>::virtualInlineDef() {} // expected-error{{redeclaration of 'CTMR::virtualInlineDef' cannot add 'dllexport' attribute}}
+template<typename T> __declspec(dllexport) void CTMR<T>::virtualInlineDecl() {} // expected-error{{redeclaration of 'CTMR::virtualInlineDecl' cannot add 'dllexport' attribute}}
+template<typename T> __declspec(dllexport) void CTMR<T>::staticDef() {} // expected-error{{redeclaration of 'CTMR::staticDef' cannot add 'dllexport' attribute}}
+template<typename T> __declspec(dllexport) inline void CTMR<T>::staticInlineDef() {} // expected-error{{redeclaration of 'CTMR::staticInlineDef' cannot add 'dllexport' attribute}}
+template<typename T> __declspec(dllexport) void CTMR<T>::staticInlineDecl() {} // expected-error{{redeclaration of 'CTMR::staticInlineDecl' cannot add 'dllexport' attribute}}
+
+template<typename T> __declspec(dllexport) int CTMR<T>::StaticField = 1; // expected-error{{redeclaration of 'CTMR::StaticField' cannot add 'dllexport' attribute}}
+template<typename T> __declspec(dllexport) const int CTMR<T>::StaticConstField = 1; // expected-error{{redeclaration of 'CTMR::StaticConstField' cannot add 'dllexport' attribute}}
+template<typename T> __declspec(dllexport) constexpr int CTMR<T>::ConstexprField; // expected-error{{redeclaration of 'CTMR::ConstexprField' cannot add 'dllexport' attribute}}
+
+
+
+//===----------------------------------------------------------------------===//
+// Class template member templates
+//===----------------------------------------------------------------------===//
+
+template<typename T>
+struct ExportClsTmplMemTmpl {
+ template<typename U> __declspec(dllexport) void normalDecl();
+ template<typename U> __declspec(dllexport) void normalDef();
+ template<typename U> __declspec(dllexport) void normalInclass() {}
+ template<typename U> __declspec(dllexport) void normalInlineDef();
+ template<typename U> __declspec(dllexport) inline void normalInlineDecl();
+ template<typename U> __declspec(dllexport) static void staticDecl();
+ template<typename U> __declspec(dllexport) static void staticDef();
+ template<typename U> __declspec(dllexport) static void staticInclass() {}
+ template<typename U> __declspec(dllexport) static void staticInlineDef();
+ template<typename U> __declspec(dllexport) static inline void staticInlineDecl();
+
+#if __has_feature(cxx_variable_templates)
+ template<typename U> __declspec(dllexport) static int StaticField;
+ template<typename U> __declspec(dllexport) static int StaticFieldDef;
+ template<typename U> __declspec(dllexport) static const int StaticConstField;
+ template<typename U> __declspec(dllexport) static const int StaticConstFieldDef;
+ template<typename U> __declspec(dllexport) static const int StaticConstFieldEqualInit = 1;
+ template<typename U> __declspec(dllexport) static const int StaticConstFieldBraceInit{1};
+ template<typename U> __declspec(dllexport) constexpr static int ConstexprField = 1;
+ template<typename U> __declspec(dllexport) constexpr static int ConstexprFieldDef = 1;
+#endif // __has_feature(cxx_variable_templates)
+};
+
+template<typename T> template<typename U> void ExportClsTmplMemTmpl<T>::normalDef() {}
+template<typename T> template<typename U> inline void ExportClsTmplMemTmpl<T>::normalInlineDef() {}
+template<typename T> template<typename U> void ExportClsTmplMemTmpl<T>::normalInlineDecl() {}
+template<typename T> template<typename U> void ExportClsTmplMemTmpl<T>::staticDef() {}
+template<typename T> template<typename U> inline void ExportClsTmplMemTmpl<T>::staticInlineDef() {}
+template<typename T> template<typename U> void ExportClsTmplMemTmpl<T>::staticInlineDecl() {}
+
+#if __has_feature(cxx_variable_templates)
+template<typename T> template<typename U> int ExportClsTmplMemTmpl<T>::StaticFieldDef;
+template<typename T> template<typename U> const int ExportClsTmplMemTmpl<T>::StaticConstFieldDef = 1;
+template<typename T> template<typename U> constexpr int ExportClsTmplMemTmpl<T>::ConstexprFieldDef;
+#endif // __has_feature(cxx_variable_templates)
+
+
+// Redeclarations cannot add dllexport.
+template<typename T>
+struct CTMTR /*ClassTmplMemberTmplRedecl*/ {
+ template<typename U> void normalDef(); // expected-note{{previous declaration is here}}
+ template<typename U> void normalInlineDef(); // expected-note{{previous declaration is here}}
+ template<typename U> inline void normalInlineDecl(); // expected-note{{previous declaration is here}}
+ template<typename U> static void staticDef(); // expected-note{{previous declaration is here}}
+ template<typename U> static void staticInlineDef(); // expected-note{{previous declaration is here}}
+ template<typename U> static inline void staticInlineDecl(); // expected-note{{previous declaration is here}}
+
+#if __has_feature(cxx_variable_templates)
+ template<typename U> static int StaticField; // expected-note{{previous declaration is here}}
+ template<typename U> static const int StaticConstField; // expected-note{{previous declaration is here}}
+ template<typename U> constexpr static int ConstexprField = 1; // expected-note{{previous declaration is here}}
+#endif // __has_feature(cxx_variable_templates)
+};
+
+template<typename T> template<typename U> __declspec(dllexport) void CTMTR<T>::normalDef() {} // expected-error{{redeclaration of 'CTMTR::normalDef' cannot add 'dllexport' attribute}}
+template<typename T> template<typename U> __declspec(dllexport) inline void CTMTR<T>::normalInlineDef() {} // expected-error{{redeclaration of 'CTMTR::normalInlineDef' cannot add 'dllexport' attribute}}
+template<typename T> template<typename U> __declspec(dllexport) void CTMTR<T>::normalInlineDecl() {} // expected-error{{redeclaration of 'CTMTR::normalInlineDecl' cannot add 'dllexport' attribute}}
+template<typename T> template<typename U> __declspec(dllexport) void CTMTR<T>::staticDef() {} // expected-error{{redeclaration of 'CTMTR::staticDef' cannot add 'dllexport' attribute}}
+template<typename T> template<typename U> __declspec(dllexport) inline void CTMTR<T>::staticInlineDef() {} // expected-error{{redeclaration of 'CTMTR::staticInlineDef' cannot add 'dllexport' attribute}}
+template<typename T> template<typename U> __declspec(dllexport) void CTMTR<T>::staticInlineDecl() {} // expected-error{{redeclaration of 'CTMTR::staticInlineDecl' cannot add 'dllexport' attribute}}
+
+#if __has_feature(cxx_variable_templates)
+template<typename T> template<typename U> __declspec(dllexport) int CTMTR<T>::StaticField = 1; // expected-error{{redeclaration of 'CTMTR::StaticField' cannot add 'dllexport' attribute}}
+template<typename T> template<typename U> __declspec(dllexport) const int CTMTR<T>::StaticConstField = 1; // expected-error{{redeclaration of 'CTMTR::StaticConstField' cannot add 'dllexport' attribute}}
+template<typename T> template<typename U> __declspec(dllexport) constexpr int CTMTR<T>::ConstexprField; // expected-error{{redeclaration of 'CTMTR::ConstexprField' cannot add 'dllexport' attribute}}
+#endif // __has_feature(cxx_variable_templates)
+
+// FIXME: Precedence rules seem to be different for classes.
diff --git a/test/SemaCXX/dllimport.cpp b/test/SemaCXX/dllimport.cpp
new file mode 100644
index 000000000000..8e826f7ae6bf
--- /dev/null
+++ b/test/SemaCXX/dllimport.cpp
@@ -0,0 +1,1085 @@
+// RUN: %clang_cc1 -triple i686-win32 -fsyntax-only -verify -std=c++11 -DMS %s
+// RUN: %clang_cc1 -triple x86_64-win32 -fsyntax-only -verify -std=c++1y -DMS %s
+// RUN: %clang_cc1 -triple i686-mingw32 -fsyntax-only -verify -std=c++1y %s
+// RUN: %clang_cc1 -triple x86_64-mingw32 -fsyntax-only -verify -std=c++11 %s
+
+// Helper structs to make templates more expressive.
+struct ImplicitInst_Imported {};
+struct ExplicitDecl_Imported {};
+struct ExplicitInst_Imported {};
+struct ExplicitSpec_Imported {};
+struct ExplicitSpec_Def_Imported {};
+struct ExplicitSpec_InlineDef_Imported {};
+struct ExplicitSpec_NotImported {};
+namespace { struct Internal {}; }
+
+
+// Invalid usage.
+__declspec(dllimport) typedef int typedef1; // expected-warning{{'dllimport' attribute only applies to variables, functions and classes}}
+typedef __declspec(dllimport) int typedef2; // expected-warning{{'dllimport' attribute only applies to variables, functions and classes}}
+typedef int __declspec(dllimport) typedef3; // expected-warning{{'dllimport' attribute only applies to variables, functions and classes}}
+typedef __declspec(dllimport) void (*FunTy)(); // expected-warning{{'dllimport' attribute only applies to variables, functions and classes}}
+enum __declspec(dllimport) Enum {}; // expected-warning{{'dllimport' attribute only applies to variables, functions and classes}}
+#if __has_feature(cxx_strong_enums)
+ enum class __declspec(dllimport) EnumClass {}; // expected-warning{{'dllimport' attribute only applies to variables, functions and classes}}
+#endif
+
+
+
+//===----------------------------------------------------------------------===//
+// Globals
+//===----------------------------------------------------------------------===//
+
+// Import declaration.
+__declspec(dllimport) extern int ExternGlobalDecl;
+
+// dllimport implies a declaration.
+__declspec(dllimport) int GlobalDecl;
+int **__attribute__((dllimport))* GlobalDeclChunkAttr;
+int GlobalDeclAttr __attribute__((dllimport));
+
+// Not allowed on definitions.
+__declspec(dllimport) extern int ExternGlobalInit = 1; // expected-error{{definition of dllimport data}}
+__declspec(dllimport) int GlobalInit1 = 1; // expected-error{{definition of dllimport data}}
+int __declspec(dllimport) GlobalInit2 = 1; // expected-error{{definition of dllimport data}}
+
+// Declare, then reject definition.
+__declspec(dllimport) extern int ExternGlobalDeclInit; // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+int ExternGlobalDeclInit = 1; // expected-warning{{'ExternGlobalDeclInit' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+
+__declspec(dllimport) int GlobalDeclInit; // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+int GlobalDeclInit = 1; // expected-warning{{'GlobalDeclInit' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+
+int *__attribute__((dllimport)) GlobalDeclChunkAttrInit; // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+int *GlobalDeclChunkAttrInit = 0; // expected-warning{{'GlobalDeclChunkAttrInit' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+
+int GlobalDeclAttrInit __attribute__((dllimport)); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+int GlobalDeclAttrInit = 1; // expected-warning{{'GlobalDeclAttrInit' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+
+// Redeclarations
+__declspec(dllimport) extern int GlobalRedecl1;
+__declspec(dllimport) extern int GlobalRedecl1;
+
+__declspec(dllimport) int GlobalRedecl2a;
+__declspec(dllimport) int GlobalRedecl2a;
+
+int *__attribute__((dllimport)) GlobalRedecl2b;
+int *__attribute__((dllimport)) GlobalRedecl2b;
+
+int GlobalRedecl2c __attribute__((dllimport));
+int GlobalRedecl2c __attribute__((dllimport));
+
+// NB: MSVC issues a warning and makes GlobalRedecl3 dllexport. We follow GCC
+// and drop the dllimport with a warning.
+__declspec(dllimport) extern int GlobalRedecl3; // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+ extern int GlobalRedecl3; // expected-warning{{'GlobalRedecl3' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+
+ extern int GlobalRedecl4; // expected-note{{previous declaration is here}}
+__declspec(dllimport) extern int GlobalRedecl4; // expected-error{{redeclaration of 'GlobalRedecl4' cannot add 'dllimport' attribute}}
+
+// External linkage is required.
+__declspec(dllimport) static int StaticGlobal; // expected-error{{'StaticGlobal' must have external linkage when declared 'dllimport'}}
+__declspec(dllimport) Internal InternalTypeGlobal; // expected-error{{'InternalTypeGlobal' must have external linkage when declared 'dllimport'}}
+namespace { __declspec(dllimport) int InternalGlobal; } // expected-error{{'(anonymous namespace)::InternalGlobal' must have external linkage when declared 'dllimport'}}
+namespace ns { __declspec(dllimport) int ExternalGlobal; }
+
+__declspec(dllimport) auto InternalAutoTypeGlobal = Internal(); // expected-error{{'InternalAutoTypeGlobal' must have external linkage when declared 'dllimport'}}
+ // expected-error@-1{{definition of dllimport data}}
+
+// Import in local scope.
+__declspec(dllimport) float LocalRedecl1; // expected-note{{previous definition is here}}
+__declspec(dllimport) float LocalRedecl2; // expected-note{{previous definition is here}}
+__declspec(dllimport) float LocalRedecl3; // expected-note{{previous definition is here}}
+void functionScope() {
+ __declspec(dllimport) int LocalRedecl1; // expected-error{{redefinition of 'LocalRedecl1' with a different type: 'int' vs 'float'}}
+ int *__attribute__((dllimport)) LocalRedecl2; // expected-error{{redefinition of 'LocalRedecl2' with a different type: 'int *' vs 'float'}}
+ int LocalRedecl3 __attribute__((dllimport)); // expected-error{{redefinition of 'LocalRedecl3' with a different type: 'int' vs 'float'}}
+
+ __declspec(dllimport) int LocalVarDecl;
+ __declspec(dllimport) int LocalVarDef = 1; // expected-error{{definition of dllimport data}}
+ __declspec(dllimport) extern int ExternLocalVarDecl;
+ __declspec(dllimport) extern int ExternLocalVarDef = 1; // expected-error{{definition of dllimport data}}
+ __declspec(dllimport) static int StaticLocalVar; // expected-error{{'StaticLocalVar' must have external linkage when declared 'dllimport'}}
+}
+
+
+
+//===----------------------------------------------------------------------===//
+// Variable templates
+//===----------------------------------------------------------------------===//
+#if __has_feature(cxx_variable_templates)
+
+// Import declaration.
+template<typename T> __declspec(dllimport) extern int ExternVarTmplDecl;
+
+// dllimport implies a declaration.
+template<typename T> __declspec(dllimport) int VarTmplDecl;
+
+// Not allowed on definitions.
+template<typename T> __declspec(dllimport) extern int ExternVarTmplInit = 1; // expected-error{{definition of dllimport data}}
+template<typename T> __declspec(dllimport) int VarTmplInit1 = 1; // expected-error{{definition of dllimport data}}
+template<typename T> int __declspec(dllimport) VarTmplInit2 = 1; // expected-error{{definition of dllimport data}}
+
+// Declare, then reject definition.
+template<typename T> __declspec(dllimport) extern int ExternVarTmplDeclInit; // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+template<typename T> int ExternVarTmplDeclInit = 1; // expected-warning{{'ExternVarTmplDeclInit' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+
+template<typename T> __declspec(dllimport) int VarTmplDeclInit; // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+template<typename T> int VarTmplDeclInit = 1; // expected-warning{{'VarTmplDeclInit' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+
+// Redeclarations
+template<typename T> __declspec(dllimport) extern int VarTmplRedecl1;
+template<typename T> __declspec(dllimport) extern int VarTmplRedecl1;
+
+template<typename T> __declspec(dllimport) int VarTmplRedecl2;
+template<typename T> __declspec(dllimport) int VarTmplRedecl2;
+
+template<typename T> __declspec(dllimport) extern int VarTmplRedecl3; // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+template<typename T> extern int VarTmplRedecl3; // expected-warning{{'VarTmplRedecl3' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+
+template<typename T> extern int VarTmplRedecl4; // expected-note{{previous declaration is here}}
+template<typename T> __declspec(dllimport) extern int VarTmplRedecl4; // expected-error{{redeclaration of 'VarTmplRedecl4' cannot add 'dllimport' attribute}}
+
+// External linkage is required.
+template<typename T> __declspec(dllimport) static int StaticVarTmpl; // expected-error{{'StaticVarTmpl' must have external linkage when declared 'dllimport'}}
+template<typename T> __declspec(dllimport) Internal InternalTypeVarTmpl; // expected-error{{'InternalTypeVarTmpl' must have external linkage when declared 'dllimport'}}
+namespace { template<typename T> __declspec(dllimport) int InternalVarTmpl; } // expected-error{{'(anonymous namespace)::InternalVarTmpl' must have external linkage when declared 'dllimport'}}
+namespace ns { template<typename T> __declspec(dllimport) int ExternalVarTmpl; }
+
+template<typename T> __declspec(dllimport) auto InternalAutoTypeVarTmpl = Internal(); // expected-error{{definition of dllimport data}} // expected-error{{'InternalAutoTypeVarTmpl' must have external linkage when declared 'dllimport'}}
+
+
+template<typename T> int VarTmpl;
+template<typename T> __declspec(dllimport) int ImportedVarTmpl;
+
+// Import implicit instantiation of an imported variable template.
+int useVarTmpl() { return ImportedVarTmpl<ImplicitInst_Imported>; }
+
+// Import explicit instantiation declaration of an imported variable template.
+extern template int ImportedVarTmpl<ExplicitDecl_Imported>;
+
+// An explicit instantiation definition of an imported variable template cannot
+// be imported because the template must be defined which is illegal.
+
+// Import specialization of an imported variable template.
+template<> __declspec(dllimport) int ImportedVarTmpl<ExplicitSpec_Imported>;
+template<> __declspec(dllimport) int ImportedVarTmpl<ExplicitSpec_Def_Imported> = 1; // expected-error{{definition of dllimport data}}
+
+// Not importing specialization of an imported variable template without
+// explicit dllimport.
+template<> int ImportedVarTmpl<ExplicitSpec_NotImported>;
+
+
+// Import explicit instantiation declaration of a non-imported variable template.
+extern template __declspec(dllimport) int VarTmpl<ExplicitDecl_Imported>;
+
+// Import explicit instantiation definition of a non-imported variable template.
+template __declspec(dllimport) int VarTmpl<ExplicitInst_Imported>;
+
+// Import specialization of a non-imported variable template.
+template<> __declspec(dllimport) int VarTmpl<ExplicitSpec_Imported>;
+template<> __declspec(dllimport) int VarTmpl<ExplicitSpec_Def_Imported> = 1; // expected-error{{definition of dllimport data}}
+
+#endif // __has_feature(cxx_variable_templates)
+
+
+
+//===----------------------------------------------------------------------===//
+// Functions
+//===----------------------------------------------------------------------===//
+
+// Import function declaration. Check different placements.
+__attribute__((dllimport)) void decl1A(); // Sanity check with __attribute__
+__declspec(dllimport) void decl1B();
+
+void __attribute__((dllimport)) decl2A();
+void __declspec(dllimport) decl2B();
+
+// Not allowed on function definitions.
+__declspec(dllimport) void def() {} // expected-error{{dllimport cannot be applied to non-inline function definition}}
+
+// extern "C"
+extern "C" __declspec(dllimport) void externC();
+
+// Import inline function.
+__declspec(dllimport) inline void inlineFunc1() {}
+inline void __attribute__((dllimport)) inlineFunc2() {}
+
+__declspec(dllimport) inline void inlineDecl();
+ void inlineDecl() {}
+
+__declspec(dllimport) void inlineDef();
+ inline void inlineDef() {}
+
+// Redeclarations
+__declspec(dllimport) void redecl1();
+__declspec(dllimport) void redecl1();
+
+// NB: MSVC issues a warning and makes redecl2/redecl3 dllexport. We follow GCC
+// and drop the dllimport with a warning.
+__declspec(dllimport) void redecl2(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+ void redecl2(); // expected-warning{{'redecl2' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+
+__declspec(dllimport) void redecl3(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+ void redecl3() {} // expected-warning{{'redecl3' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+
+ void redecl4(); // expected-note{{previous declaration is here}}
+__declspec(dllimport) void redecl4(); // expected-error{{redeclaration of 'redecl4' cannot add 'dllimport' attribute}}
+
+ void redecl5(); // expected-note{{previous declaration is here}}
+__declspec(dllimport) inline void redecl5() {} // expected-error{{redeclaration of 'redecl5' cannot add 'dllimport' attribute}}
+
+// Friend functions
+struct FuncFriend {
+ friend __declspec(dllimport) void friend1();
+ friend __declspec(dllimport) void friend2(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+ friend __declspec(dllimport) void friend3(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+ friend void friend4(); // expected-note{{previous declaration is here}}
+ friend void friend5(); // expected-note{{previous declaration is here}}
+};
+__declspec(dllimport) void friend1();
+ void friend2(); // expected-warning{{'friend2' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+ void friend3() {} // expected-warning{{'friend3' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+__declspec(dllimport) void friend4(); // expected-error{{redeclaration of 'friend4' cannot add 'dllimport' attribute}}
+__declspec(dllimport) inline void friend5() {} // expected-error{{redeclaration of 'friend5' cannot add 'dllimport' attribute}}
+
+// Implicit declarations can be redeclared with dllimport.
+__declspec(dllimport) void* operator new(__SIZE_TYPE__ n);
+
+// External linkage is required.
+__declspec(dllimport) static int staticFunc(); // expected-error{{'staticFunc' must have external linkage when declared 'dllimport'}}
+__declspec(dllimport) Internal internalRetFunc(); // expected-error{{'internalRetFunc' must have external linkage when declared 'dllimport'}}
+namespace { __declspec(dllimport) void internalFunc(); } // expected-error{{'(anonymous namespace)::internalFunc' must have external linkage when declared 'dllimport'}}
+namespace ns { __declspec(dllimport) void externalFunc(); }
+
+// Import deleted functions.
+// FIXME: Deleted functions are definitions so a missing inline is diagnosed
+// here which is irrelevant. But because the delete keyword is parsed later
+// there is currently no straight-forward way to avoid this diagnostic.
+__declspec(dllimport) void deletedFunc() = delete; // expected-error{{attribute 'dllimport' cannot be applied to a deleted function}} expected-error{{dllimport cannot be applied to non-inline function definition}}
+__declspec(dllimport) inline void deletedInlineFunc() = delete; // expected-error{{attribute 'dllimport' cannot be applied to a deleted function}}
+
+
+
+//===----------------------------------------------------------------------===//
+// Function templates
+//===----------------------------------------------------------------------===//
+
+// Import function template declaration. Check different placements.
+template<typename T> __declspec(dllimport) void funcTmplDecl1();
+template<typename T> void __declspec(dllimport) funcTmplDecl2();
+
+// Import function template definition.
+template<typename T> __declspec(dllimport) void funcTmplDef() {} // expected-error{{dllimport cannot be applied to non-inline function definition}}
+
+// Import inline function template.
+template<typename T> __declspec(dllimport) inline void inlineFuncTmpl1() {}
+template<typename T> inline void __attribute__((dllimport)) inlineFuncTmpl2() {}
+
+template<typename T> __declspec(dllimport) inline void inlineFuncTmplDecl();
+template<typename T> void inlineFuncTmplDecl() {}
+
+template<typename T> __declspec(dllimport) void inlineFuncTmplDef();
+template<typename T> inline void inlineFuncTmplDef() {}
+
+// Redeclarations
+template<typename T> __declspec(dllimport) void funcTmplRedecl1();
+template<typename T> __declspec(dllimport) void funcTmplRedecl1();
+
+template<typename T> __declspec(dllimport) void funcTmplRedecl2(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+template<typename T> void funcTmplRedecl2(); // expected-warning{{'funcTmplRedecl2' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+
+template<typename T> __declspec(dllimport) void funcTmplRedecl3(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+template<typename T> void funcTmplRedecl3() {} // expected-warning{{'funcTmplRedecl3' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+
+template<typename T> void funcTmplRedecl4(); // expected-note{{previous declaration is here}}
+template<typename T> __declspec(dllimport) void funcTmplRedecl4(); // expected-error{{redeclaration of 'funcTmplRedecl4' cannot add 'dllimport' attribute}}
+
+template<typename T> void funcTmplRedecl5(); // expected-note{{previous declaration is here}}
+template<typename T> __declspec(dllimport) inline void funcTmplRedecl5() {} // expected-error{{redeclaration of 'funcTmplRedecl5' cannot add 'dllimport' attribute}}
+
+// Function template friends
+struct FuncTmplFriend {
+ template<typename T> friend __declspec(dllimport) void funcTmplFriend1();
+ template<typename T> friend __declspec(dllimport) void funcTmplFriend2(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+ template<typename T> friend __declspec(dllimport) void funcTmplFriend3(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+ template<typename T> friend void funcTmplFriend4(); // expected-note{{previous declaration is here}}
+ template<typename T> friend __declspec(dllimport) inline void funcTmplFriend5();
+};
+template<typename T> __declspec(dllimport) void funcTmplFriend1();
+template<typename T> void funcTmplFriend2(); // expected-warning{{'funcTmplFriend2' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+template<typename T> void funcTmplFriend3() {} // expected-warning{{'funcTmplFriend3' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+template<typename T> __declspec(dllimport) void funcTmplFriend4(); // expected-error{{redeclaration of 'funcTmplFriend4' cannot add 'dllimport' attribute}}
+template<typename T> inline void funcTmplFriend5() {}
+
+// External linkage is required.
+template<typename T> __declspec(dllimport) static int staticFuncTmpl(); // expected-error{{'staticFuncTmpl' must have external linkage when declared 'dllimport'}}
+template<typename T> __declspec(dllimport) Internal internalRetFuncTmpl(); // expected-error{{'internalRetFuncTmpl' must have external linkage when declared 'dllimport'}}
+namespace { template<typename T> __declspec(dllimport) void internalFuncTmpl(); } // expected-error{{'(anonymous namespace)::internalFuncTmpl' must have external linkage when declared 'dllimport'}}
+namespace ns { template<typename T> __declspec(dllimport) void externalFuncTmpl(); }
+
+
+template<typename T> void funcTmpl() {}
+template<typename T> inline void inlineFuncTmpl() {}
+template<typename T> __declspec(dllimport) void importedFuncTmplDecl();
+template<typename T> __declspec(dllimport) inline void importedFuncTmpl() {}
+
+// Import implicit instantiation of an imported function template.
+void useFunTmplDecl() { importedFuncTmplDecl<ImplicitInst_Imported>(); }
+void useFunTmplDef() { importedFuncTmpl<ImplicitInst_Imported>(); }
+
+// Import explicit instantiation declaration of an imported function template.
+extern template void importedFuncTmpl<ExplicitDecl_Imported>();
+
+// Import explicit instantiation definition of an imported function template.
+// NB: MSVC fails this instantiation without explicit dllimport which is most
+// likely a bug because an implicit instantiation is accepted.
+template void importedFuncTmpl<ExplicitInst_Imported>();
+
+// Import specialization of an imported function template. A definition must be
+// declared inline.
+template<> __declspec(dllimport) void importedFuncTmpl<ExplicitSpec_Imported>();
+template<> __declspec(dllimport) void importedFuncTmpl<ExplicitSpec_Def_Imported>() {} // expected-error{{dllimport cannot be applied to non-inline function definition}}
+template<> __declspec(dllimport) inline void importedFuncTmpl<ExplicitSpec_InlineDef_Imported>() {}
+
+// Not importing specialization of an imported function template without
+// explicit dllimport.
+template<> void importedFuncTmpl<ExplicitSpec_NotImported>() {}
+
+
+// Import explicit instantiation declaration of a non-imported function template.
+extern template __declspec(dllimport) void funcTmpl<ExplicitDecl_Imported>();
+extern template __declspec(dllimport) void inlineFuncTmpl<ExplicitDecl_Imported>();
+
+// Import explicit instantiation definition of a non-imported function template.
+template __declspec(dllimport) void funcTmpl<ExplicitInst_Imported>();
+template __declspec(dllimport) void inlineFuncTmpl<ExplicitInst_Imported>();
+
+// Import specialization of a non-imported function template. A definition must
+// be declared inline.
+template<> __declspec(dllimport) void funcTmpl<ExplicitSpec_Imported>();
+template<> __declspec(dllimport) void funcTmpl<ExplicitSpec_Def_Imported>() {} // expected-error{{dllimport cannot be applied to non-inline function definition}}
+template<> __declspec(dllimport) inline void funcTmpl<ExplicitSpec_InlineDef_Imported>() {}
+
+
+//===----------------------------------------------------------------------===//
+// Class members
+//===----------------------------------------------------------------------===//
+
+// Import individual members of a class.
+struct ImportMembers {
+ struct Nested {
+ __declspec(dllimport) void normalDecl();
+ __declspec(dllimport) void normalDef(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+ };
+
+ __declspec(dllimport) void normalDecl();
+ __declspec(dllimport) void normalDef(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+ __declspec(dllimport) void normalInclass() {}
+ __declspec(dllimport) void normalInlineDef();
+ __declspec(dllimport) inline void normalInlineDecl();
+ __declspec(dllimport) virtual void virtualDecl();
+ __declspec(dllimport) virtual void virtualDef(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+ __declspec(dllimport) virtual void virtualInclass() {}
+ __declspec(dllimport) virtual void virtualInlineDef();
+ __declspec(dllimport) virtual inline void virtualInlineDecl();
+ __declspec(dllimport) static void staticDecl();
+ __declspec(dllimport) static void staticDef(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+ __declspec(dllimport) static void staticInclass() {}
+ __declspec(dllimport) static void staticInlineDef();
+ __declspec(dllimport) static inline void staticInlineDecl();
+
+protected:
+ __declspec(dllimport) void protectedDecl();
+private:
+ __declspec(dllimport) void privateDecl();
+public:
+
+ __declspec(dllimport) int Field; // expected-warning{{'dllimport' attribute only applies to variables, functions and classes}}
+ __declspec(dllimport) static int StaticField;
+ __declspec(dllimport) static int StaticFieldDef; // expected-note{{attribute is here}}
+ __declspec(dllimport) static const int StaticConstField;
+ __declspec(dllimport) static const int StaticConstFieldDef; // expected-note{{attribute is here}}
+ __declspec(dllimport) static const int StaticConstFieldEqualInit = 1;
+ __declspec(dllimport) static const int StaticConstFieldBraceInit{1};
+ __declspec(dllimport) constexpr static int ConstexprField = 1;
+ __declspec(dllimport) constexpr static int ConstexprFieldDef = 1; // expected-note{{attribute is here}}
+};
+
+ void ImportMembers::Nested::normalDef() {} // expected-warning{{'ImportMembers::Nested::normalDef' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+ void ImportMembers::normalDef() {} // expected-warning{{'ImportMembers::normalDef' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+inline void ImportMembers::normalInlineDef() {}
+ void ImportMembers::normalInlineDecl() {}
+ void ImportMembers::virtualDef() {} // expected-warning{{'ImportMembers::virtualDef' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+inline void ImportMembers::virtualInlineDef() {}
+ void ImportMembers::virtualInlineDecl() {}
+ void ImportMembers::staticDef() {} // expected-warning{{'ImportMembers::staticDef' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+inline void ImportMembers::staticInlineDef() {}
+ void ImportMembers::staticInlineDecl() {}
+
+ int ImportMembers::StaticFieldDef; // expected-error{{definition of dllimport static field not allowed}}
+const int ImportMembers::StaticConstFieldDef = 1; // expected-error{{definition of dllimport static field not allowed}}
+constexpr int ImportMembers::ConstexprFieldDef; // expected-error{{definition of dllimport static field not allowed}}
+
+
+// Import on member definitions.
+struct ImportMemberDefs {
+ __declspec(dllimport) void normalDef();
+ __declspec(dllimport) void normalInlineDef();
+ __declspec(dllimport) inline void normalInlineDecl();
+ __declspec(dllimport) virtual void virtualDef();
+ __declspec(dllimport) virtual void virtualInlineDef();
+ __declspec(dllimport) virtual inline void virtualInlineDecl();
+ __declspec(dllimport) static void staticDef();
+ __declspec(dllimport) static void staticInlineDef();
+ __declspec(dllimport) static inline void staticInlineDecl();
+
+ __declspec(dllimport) static int StaticField;
+ __declspec(dllimport) static const int StaticConstField;
+ __declspec(dllimport) constexpr static int ConstexprField = 1;
+};
+
+__declspec(dllimport) void ImportMemberDefs::normalDef() {} // expected-error{{dllimport cannot be applied to non-inline function definition}}
+__declspec(dllimport) inline void ImportMemberDefs::normalInlineDef() {}
+__declspec(dllimport) void ImportMemberDefs::normalInlineDecl() {}
+__declspec(dllimport) void ImportMemberDefs::virtualDef() {} // expected-error{{dllimport cannot be applied to non-inline function definition}}
+__declspec(dllimport) inline void ImportMemberDefs::virtualInlineDef() {}
+__declspec(dllimport) void ImportMemberDefs::virtualInlineDecl() {}
+__declspec(dllimport) void ImportMemberDefs::staticDef() {} // expected-error{{dllimport cannot be applied to non-inline function definition}}
+__declspec(dllimport) inline void ImportMemberDefs::staticInlineDef() {}
+__declspec(dllimport) void ImportMemberDefs::staticInlineDecl() {}
+
+__declspec(dllimport) int ImportMemberDefs::StaticField; // expected-error{{definition of dllimport static field not allowed}} expected-note{{attribute is here}}
+__declspec(dllimport) const int ImportMemberDefs::StaticConstField = 1; // expected-error{{definition of dllimport static field not allowed}} expected-note{{attribute is here}}
+__declspec(dllimport) constexpr int ImportMemberDefs::ConstexprField; // expected-error{{definition of dllimport static field not allowed}} expected-note{{attribute is here}}
+
+
+// Import special member functions.
+struct ImportSpecials {
+ __declspec(dllimport) ImportSpecials();
+ __declspec(dllimport) ~ImportSpecials();
+ __declspec(dllimport) ImportSpecials(const ImportSpecials&);
+ __declspec(dllimport) ImportSpecials& operator=(const ImportSpecials&);
+ __declspec(dllimport) ImportSpecials(ImportSpecials&&);
+ __declspec(dllimport) ImportSpecials& operator=(ImportSpecials&&);
+};
+
+
+// Import deleted member functions.
+struct ImportDeleted {
+ __declspec(dllimport) ImportDeleted() = delete; // expected-error{{attribute 'dllimport' cannot be applied to a deleted function}}
+ __declspec(dllimport) ~ImportDeleted() = delete; // expected-error{{attribute 'dllimport' cannot be applied to a deleted function}}
+ __declspec(dllimport) ImportDeleted(const ImportDeleted&) = delete; // expected-error{{attribute 'dllimport' cannot be applied to a deleted function}}
+ __declspec(dllimport) ImportDeleted& operator=(const ImportDeleted&) = delete; // expected-error{{attribute 'dllimport' cannot be applied to a deleted function}}
+ __declspec(dllimport) ImportDeleted(ImportDeleted&&) = delete; // expected-error{{attribute 'dllimport' cannot be applied to a deleted function}}
+ __declspec(dllimport) ImportDeleted& operator=(ImportDeleted&&) = delete; // expected-error{{attribute 'dllimport' cannot be applied to a deleted function}}
+ __declspec(dllimport) void deleted() = delete; // expected-error{{attribute 'dllimport' cannot be applied to a deleted function}}
+};
+
+
+// Import allocation functions.
+struct ImportAlloc {
+ __declspec(dllimport) void* operator new(__SIZE_TYPE__);
+ __declspec(dllimport) void* operator new[](__SIZE_TYPE__);
+ __declspec(dllimport) void operator delete(void*);
+ __declspec(dllimport) void operator delete[](void*);
+};
+
+
+// Import defaulted member functions.
+struct ImportDefaulted {
+ __declspec(dllimport) ImportDefaulted() = default;
+ __declspec(dllimport) ~ImportDefaulted() = default;
+ __declspec(dllimport) ImportDefaulted(const ImportDefaulted&) = default;
+ __declspec(dllimport) ImportDefaulted& operator=(const ImportDefaulted&) = default;
+ __declspec(dllimport) ImportDefaulted(ImportDefaulted&&) = default;
+ __declspec(dllimport) ImportDefaulted& operator=(ImportDefaulted&&) = default;
+};
+
+
+// Import defaulted member function definitions.
+struct ImportDefaultedDefs {
+ __declspec(dllimport) ImportDefaultedDefs();
+ __declspec(dllimport) ~ImportDefaultedDefs(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+
+ __declspec(dllimport) inline ImportDefaultedDefs(const ImportDefaultedDefs&);
+ __declspec(dllimport) ImportDefaultedDefs& operator=(const ImportDefaultedDefs&);
+
+ __declspec(dllimport) ImportDefaultedDefs(ImportDefaultedDefs&&);
+ __declspec(dllimport) ImportDefaultedDefs& operator=(ImportDefaultedDefs&&); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+};
+
+// Not allowed on definitions.
+__declspec(dllimport) ImportDefaultedDefs::ImportDefaultedDefs() = default; // expected-error{{dllimport cannot be applied to non-inline function definition}}
+
+// dllimport cannot be dropped.
+ImportDefaultedDefs::~ImportDefaultedDefs() = default; // expected-warning{{'ImportDefaultedDefs::~ImportDefaultedDefs' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+
+// Import inline declaration and definition.
+__declspec(dllimport) ImportDefaultedDefs::ImportDefaultedDefs(const ImportDefaultedDefs&) = default;
+inline ImportDefaultedDefs& ImportDefaultedDefs::operator=(const ImportDefaultedDefs&) = default;
+
+__declspec(dllimport) ImportDefaultedDefs::ImportDefaultedDefs(ImportDefaultedDefs&&) = default; // expected-error{{dllimport cannot be applied to non-inline function definition}}
+ImportDefaultedDefs& ImportDefaultedDefs::operator=(ImportDefaultedDefs&&) = default; // expected-warning{{'ImportDefaultedDefs::operator=' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+
+
+// Redeclarations cannot add dllimport.
+struct MemberRedecl {
+ void normalDef(); // expected-note{{previous declaration is here}}
+ void normalInlineDef(); // expected-note{{previous declaration is here}}
+ inline void normalInlineDecl(); // expected-note{{previous declaration is here}}
+ virtual void virtualDef(); // expected-note{{previous declaration is here}}
+ virtual void virtualInlineDef(); // expected-note{{previous declaration is here}}
+ virtual inline void virtualInlineDecl(); // expected-note{{previous declaration is here}}
+ static void staticDef(); // expected-note{{previous declaration is here}}
+ static void staticInlineDef(); // expected-note{{previous declaration is here}}
+ static inline void staticInlineDecl(); // expected-note{{previous declaration is here}}
+
+ static int StaticField; // expected-note{{previous declaration is here}}
+ static const int StaticConstField; // expected-note{{previous declaration is here}}
+ constexpr static int ConstexprField = 1; // expected-note{{previous declaration is here}}
+};
+
+__declspec(dllimport) void MemberRedecl::normalDef() {} // expected-error{{redeclaration of 'MemberRedecl::normalDef' cannot add 'dllimport' attribute}}
+ // expected-error@-1{{dllimport cannot be applied to non-inline function definition}}
+__declspec(dllimport) inline void MemberRedecl::normalInlineDef() {} // expected-error{{redeclaration of 'MemberRedecl::normalInlineDef' cannot add 'dllimport' attribute}}
+__declspec(dllimport) void MemberRedecl::normalInlineDecl() {} // expected-error{{redeclaration of 'MemberRedecl::normalInlineDecl' cannot add 'dllimport' attribute}}
+__declspec(dllimport) void MemberRedecl::virtualDef() {} // expected-error{{redeclaration of 'MemberRedecl::virtualDef' cannot add 'dllimport' attribute}}
+ // expected-error@-1{{dllimport cannot be applied to non-inline function definition}}
+__declspec(dllimport) inline void MemberRedecl::virtualInlineDef() {} // expected-error{{redeclaration of 'MemberRedecl::virtualInlineDef' cannot add 'dllimport' attribute}}
+__declspec(dllimport) void MemberRedecl::virtualInlineDecl() {} // expected-error{{redeclaration of 'MemberRedecl::virtualInlineDecl' cannot add 'dllimport' attribute}}
+__declspec(dllimport) void MemberRedecl::staticDef() {} // expected-error{{redeclaration of 'MemberRedecl::staticDef' cannot add 'dllimport' attribute}}
+ // expected-error@-1{{dllimport cannot be applied to non-inline function definition}}
+__declspec(dllimport) inline void MemberRedecl::staticInlineDef() {} // expected-error{{redeclaration of 'MemberRedecl::staticInlineDef' cannot add 'dllimport' attribute}}
+__declspec(dllimport) void MemberRedecl::staticInlineDecl() {} // expected-error{{redeclaration of 'MemberRedecl::staticInlineDecl' cannot add 'dllimport' attribute}}
+
+__declspec(dllimport) int MemberRedecl::StaticField = 1; // expected-error{{redeclaration of 'MemberRedecl::StaticField' cannot add 'dllimport' attribute}}
+ // expected-error@-1{{definition of dllimport static field not allowed}}
+ // expected-note@-2{{attribute is here}}
+__declspec(dllimport) const int MemberRedecl::StaticConstField = 1; // expected-error{{redeclaration of 'MemberRedecl::StaticConstField' cannot add 'dllimport' attribute}}
+ // expected-error@-1{{definition of dllimport static field not allowed}}
+ // expected-note@-2{{attribute is here}}
+__declspec(dllimport) constexpr int MemberRedecl::ConstexprField; // expected-error{{redeclaration of 'MemberRedecl::ConstexprField' cannot add 'dllimport' attribute}}
+ // expected-error@-1{{definition of dllimport static field not allowed}}
+ // expected-note@-2{{attribute is here}}
+
+
+
+//===----------------------------------------------------------------------===//
+// Class member templates
+//===----------------------------------------------------------------------===//
+
+struct ImportMemberTmpl {
+ template<typename T> __declspec(dllimport) void normalDecl();
+ template<typename T> __declspec(dllimport) void normalDef(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+ template<typename T> __declspec(dllimport) void normalInclass() {}
+ template<typename T> __declspec(dllimport) void normalInlineDef();
+ template<typename T> __declspec(dllimport) inline void normalInlineDecl();
+ template<typename T> __declspec(dllimport) static void staticDecl();
+ template<typename T> __declspec(dllimport) static void staticDef(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+ template<typename T> __declspec(dllimport) static void staticInclass() {}
+ template<typename T> __declspec(dllimport) static void staticInlineDef();
+ template<typename T> __declspec(dllimport) static inline void staticInlineDecl();
+
+#if __has_feature(cxx_variable_templates)
+ template<typename T> __declspec(dllimport) static int StaticField;
+ template<typename T> __declspec(dllimport) static int StaticFieldDef; // expected-note{{attribute is here}}
+ template<typename T> __declspec(dllimport) static const int StaticConstField;
+ template<typename T> __declspec(dllimport) static const int StaticConstFieldDef; // expected-note{{attribute is here}}
+ template<typename T> __declspec(dllimport) static const int StaticConstFieldEqualInit = 1;
+ template<typename T> __declspec(dllimport) static const int StaticConstFieldBraceInit{1};
+ template<typename T> __declspec(dllimport) constexpr static int ConstexprField = 1;
+ template<typename T> __declspec(dllimport) constexpr static int ConstexprFieldDef = 1; // expected-note{{attribute is here}}
+#endif // __has_feature(cxx_variable_templates)
+};
+
+template<typename T> void ImportMemberTmpl::normalDef() {} // expected-warning{{'ImportMemberTmpl::normalDef' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+template<typename T> inline void ImportMemberTmpl::normalInlineDef() {}
+template<typename T> void ImportMemberTmpl::normalInlineDecl() {}
+template<typename T> void ImportMemberTmpl::staticDef() {} // expected-warning{{'ImportMemberTmpl::staticDef' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+template<typename T> inline void ImportMemberTmpl::staticInlineDef() {}
+template<typename T> void ImportMemberTmpl::staticInlineDecl() {}
+
+#if __has_feature(cxx_variable_templates)
+template<typename T> int ImportMemberTmpl::StaticFieldDef; // expected-error{{definition of dllimport static field not allowed}}
+template<typename T> const int ImportMemberTmpl::StaticConstFieldDef = 1; // expected-error{{definition of dllimport static field not allowed}}
+template<typename T> constexpr int ImportMemberTmpl::ConstexprFieldDef; // expected-error{{definition of dllimport static field not allowed}}
+#endif // __has_feature(cxx_variable_templates)
+
+
+// Redeclarations cannot add dllimport.
+struct MemTmplRedecl {
+ template<typename T> void normalDef(); // expected-note{{previous declaration is here}}
+ template<typename T> void normalInlineDef(); // expected-note{{previous declaration is here}}
+ template<typename T> inline void normalInlineDecl(); // expected-note{{previous declaration is here}}
+ template<typename T> static void staticDef(); // expected-note{{previous declaration is here}}
+ template<typename T> static void staticInlineDef(); // expected-note{{previous declaration is here}}
+ template<typename T> static inline void staticInlineDecl(); // expected-note{{previous declaration is here}}
+
+#if __has_feature(cxx_variable_templates)
+ template<typename T> static int StaticField; // expected-note{{previous declaration is here}}
+ template<typename T> static const int StaticConstField; // expected-note{{previous declaration is here}}
+ template<typename T> constexpr static int ConstexprField = 1; // expected-note{{previous declaration is here}}
+#endif // __has_feature(cxx_variable_templates)
+};
+
+template<typename T> __declspec(dllimport) void MemTmplRedecl::normalDef() {} // expected-error{{redeclaration of 'MemTmplRedecl::normalDef' cannot add 'dllimport' attribute}}
+ // expected-error@-1{{dllimport cannot be applied to non-inline function definition}}
+template<typename T> __declspec(dllimport) inline void MemTmplRedecl::normalInlineDef() {} // expected-error{{redeclaration of 'MemTmplRedecl::normalInlineDef' cannot add 'dllimport' attribute}}
+template<typename T> __declspec(dllimport) void MemTmplRedecl::normalInlineDecl() {} // expected-error{{redeclaration of 'MemTmplRedecl::normalInlineDecl' cannot add 'dllimport' attribute}}
+template<typename T> __declspec(dllimport) void MemTmplRedecl::staticDef() {} // expected-error{{redeclaration of 'MemTmplRedecl::staticDef' cannot add 'dllimport' attribute}}
+ // expected-error@-1{{dllimport cannot be applied to non-inline function definition}}
+template<typename T> __declspec(dllimport) inline void MemTmplRedecl::staticInlineDef() {} // expected-error{{redeclaration of 'MemTmplRedecl::staticInlineDef' cannot add 'dllimport' attribute}}
+template<typename T> __declspec(dllimport) void MemTmplRedecl::staticInlineDecl() {} // expected-error{{redeclaration of 'MemTmplRedecl::staticInlineDecl' cannot add 'dllimport' attribute}}
+
+#if __has_feature(cxx_variable_templates)
+template<typename T> __declspec(dllimport) int MemTmplRedecl::StaticField = 1; // expected-error{{redeclaration of 'MemTmplRedecl::StaticField' cannot add 'dllimport' attribute}}
+ // expected-error@-1{{definition of dllimport static field not allowed}}
+ // expected-note@-2{{attribute is here}}
+template<typename T> __declspec(dllimport) const int MemTmplRedecl::StaticConstField = 1; // expected-error{{redeclaration of 'MemTmplRedecl::StaticConstField' cannot add 'dllimport' attribute}}
+ // expected-error@-1{{definition of dllimport static field not allowed}}
+ // expected-note@-2{{attribute is here}}
+template<typename T> __declspec(dllimport) constexpr int MemTmplRedecl::ConstexprField; // expected-error{{redeclaration of 'MemTmplRedecl::ConstexprField' cannot add 'dllimport' attribute}}
+ // expected-error@-1{{definition of dllimport static field not allowed}}
+ // expected-note@-2{{attribute is here}}
+#endif // __has_feature(cxx_variable_templates)
+
+
+
+struct MemFunTmpl {
+ template<typename T> void normalDef() {}
+ template<typename T> __declspec(dllimport) void importedNormal() {}
+ template<typename T> static void staticDef() {}
+ template<typename T> __declspec(dllimport) static void importedStatic() {}
+};
+
+// Import implicit instantiation of an imported member function template.
+void useMemFunTmpl() {
+ MemFunTmpl().importedNormal<ImplicitInst_Imported>();
+ MemFunTmpl().importedStatic<ImplicitInst_Imported>();
+}
+
+// Import explicit instantiation declaration of an imported member function
+// template.
+extern template void MemFunTmpl::importedNormal<ExplicitDecl_Imported>();
+extern template void MemFunTmpl::importedStatic<ExplicitDecl_Imported>();
+
+// Import explicit instantiation definition of an imported member function
+// template.
+// NB: MSVC fails this instantiation without explicit dllimport.
+template void MemFunTmpl::importedNormal<ExplicitInst_Imported>();
+template void MemFunTmpl::importedStatic<ExplicitInst_Imported>();
+
+// Import specialization of an imported member function template.
+template<> __declspec(dllimport) void MemFunTmpl::importedNormal<ExplicitSpec_Imported>();
+template<> __declspec(dllimport) void MemFunTmpl::importedNormal<ExplicitSpec_Def_Imported>() {} // error on mingw
+template<> __declspec(dllimport) inline void MemFunTmpl::importedNormal<ExplicitSpec_InlineDef_Imported>() {}
+#ifndef MSABI
+// expected-error@-3{{dllimport cannot be applied to non-inline function definition}}
+#endif
+
+template<> __declspec(dllimport) void MemFunTmpl::importedStatic<ExplicitSpec_Imported>();
+template<> __declspec(dllimport) void MemFunTmpl::importedStatic<ExplicitSpec_Def_Imported>() {} // error on mingw
+template<> __declspec(dllimport) inline void MemFunTmpl::importedStatic<ExplicitSpec_InlineDef_Imported>() {}
+#ifndef MSABI
+// expected-error@-3{{dllimport cannot be applied to non-inline function definition}}
+#endif
+
+// Not importing specialization of an imported member function template without
+// explicit dllimport.
+template<> void MemFunTmpl::importedNormal<ExplicitSpec_NotImported>() {}
+template<> void MemFunTmpl::importedStatic<ExplicitSpec_NotImported>() {}
+
+
+// Import explicit instantiation declaration of a non-imported member function
+// template.
+extern template __declspec(dllimport) void MemFunTmpl::normalDef<ExplicitDecl_Imported>();
+extern template __declspec(dllimport) void MemFunTmpl::staticDef<ExplicitDecl_Imported>();
+
+// Import explicit instantiation definition of a non-imported member function
+// template.
+template __declspec(dllimport) void MemFunTmpl::normalDef<ExplicitInst_Imported>();
+template __declspec(dllimport) void MemFunTmpl::staticDef<ExplicitInst_Imported>();
+
+// Import specialization of a non-imported member function template.
+template<> __declspec(dllimport) void MemFunTmpl::normalDef<ExplicitSpec_Imported>();
+template<> __declspec(dllimport) void MemFunTmpl::normalDef<ExplicitSpec_Def_Imported>() {} // error on mingw
+template<> __declspec(dllimport) inline void MemFunTmpl::normalDef<ExplicitSpec_InlineDef_Imported>() {}
+#ifndef MSABI
+// expected-error@-3{{dllimport cannot be applied to non-inline function definition}}
+#endif
+
+template<> __declspec(dllimport) void MemFunTmpl::staticDef<ExplicitSpec_Imported>();
+template<> __declspec(dllimport) void MemFunTmpl::staticDef<ExplicitSpec_Def_Imported>() {} // error on mingw
+template<> __declspec(dllimport) inline void MemFunTmpl::staticDef<ExplicitSpec_InlineDef_Imported>() {}
+#ifndef MSABI
+// expected-error@-3{{dllimport cannot be applied to non-inline function definition}}
+#endif
+
+
+
+#if __has_feature(cxx_variable_templates)
+struct MemVarTmpl {
+ template<typename T> static const int StaticVar = 1;
+ template<typename T> __declspec(dllimport) static const int ImportedStaticVar = 1;
+};
+
+// Import implicit instantiation of an imported member variable template.
+int useMemVarTmpl() { return MemVarTmpl::ImportedStaticVar<ImplicitInst_Imported>; }
+
+// Import explicit instantiation declaration of an imported member variable
+// template.
+extern template const int MemVarTmpl::ImportedStaticVar<ExplicitDecl_Imported>;
+
+// An explicit instantiation definition of an imported member variable template
+// cannot be imported because the template must be defined which is illegal. The
+// in-class initializer does not count.
+
+// Import specialization of an imported member variable template.
+template<> __declspec(dllimport) const int MemVarTmpl::ImportedStaticVar<ExplicitSpec_Imported>;
+template<> __declspec(dllimport) const int MemVarTmpl::ImportedStaticVar<ExplicitSpec_Def_Imported> = 1;
+ // expected-error@-1{{definition of dllimport static field not allowed}}
+ // expected-note@-2{{attribute is here}}
+
+// Not importing specialization of a member variable template without explicit
+// dllimport.
+template<> const int MemVarTmpl::ImportedStaticVar<ExplicitSpec_NotImported>;
+
+
+// Import explicit instantiation declaration of a non-imported member variable
+// template.
+extern template __declspec(dllimport) const int MemVarTmpl::StaticVar<ExplicitDecl_Imported>;
+
+// An explicit instantiation definition of a non-imported member variable template
+// cannot be imported because the template must be defined which is illegal. The
+// in-class initializer does not count.
+
+// Import specialization of a non-imported member variable template.
+template<> __declspec(dllimport) const int MemVarTmpl::StaticVar<ExplicitSpec_Imported>;
+template<> __declspec(dllimport) const int MemVarTmpl::StaticVar<ExplicitSpec_Def_Imported> = 1;
+ // expected-error@-1{{definition of dllimport static field not allowed}}
+ // expected-note@-2{{attribute is here}}
+
+#endif // __has_feature(cxx_variable_templates)
+
+
+
+//===----------------------------------------------------------------------===//
+// Class template members
+//===----------------------------------------------------------------------===//
+
+// Import individual members of a class template.
+template<typename T>
+struct ImportClassTmplMembers {
+ __declspec(dllimport) void normalDecl();
+ __declspec(dllimport) void normalDef(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+ __declspec(dllimport) void normalInclass() {}
+ __declspec(dllimport) void normalInlineDef();
+ __declspec(dllimport) inline void normalInlineDecl();
+ __declspec(dllimport) virtual void virtualDecl();
+ __declspec(dllimport) virtual void virtualDef(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+ __declspec(dllimport) virtual void virtualInclass() {}
+ __declspec(dllimport) virtual void virtualInlineDef();
+ __declspec(dllimport) virtual inline void virtualInlineDecl();
+ __declspec(dllimport) static void staticDecl();
+ __declspec(dllimport) static void staticDef(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+ __declspec(dllimport) static void staticInclass() {}
+ __declspec(dllimport) static void staticInlineDef();
+ __declspec(dllimport) static inline void staticInlineDecl();
+
+protected:
+ __declspec(dllimport) void protectedDecl();
+private:
+ __declspec(dllimport) void privateDecl();
+public:
+
+ __declspec(dllimport) int Field; // expected-warning{{'dllimport' attribute only applies to variables, functions and classes}}
+ __declspec(dllimport) static int StaticField;
+ __declspec(dllimport) static int StaticFieldDef; // expected-note{{attribute is here}}
+ __declspec(dllimport) static const int StaticConstField;
+ __declspec(dllimport) static const int StaticConstFieldDef; // expected-note{{attribute is here}}
+ __declspec(dllimport) static const int StaticConstFieldEqualInit = 1;
+ __declspec(dllimport) static const int StaticConstFieldBraceInit{1};
+ __declspec(dllimport) constexpr static int ConstexprField = 1;
+ __declspec(dllimport) constexpr static int ConstexprFieldDef = 1; // expected-note{{attribute is here}}
+};
+
+// NB: MSVC is inconsistent here and disallows *InlineDef on class templates,
+// but allows it on classes. We allow both.
+template<typename T> void ImportClassTmplMembers<T>::normalDef() {} // expected-warning{{'ImportClassTmplMembers::normalDef' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+template<typename T> inline void ImportClassTmplMembers<T>::normalInlineDef() {}
+template<typename T> void ImportClassTmplMembers<T>::normalInlineDecl() {}
+template<typename T> void ImportClassTmplMembers<T>::virtualDef() {} // expected-warning{{'ImportClassTmplMembers::virtualDef' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+template<typename T> inline void ImportClassTmplMembers<T>::virtualInlineDef() {}
+template<typename T> void ImportClassTmplMembers<T>::virtualInlineDecl() {}
+template<typename T> void ImportClassTmplMembers<T>::staticDef() {} // expected-warning{{'ImportClassTmplMembers::staticDef' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+template<typename T> inline void ImportClassTmplMembers<T>::staticInlineDef() {}
+template<typename T> void ImportClassTmplMembers<T>::staticInlineDecl() {}
+
+template<typename T> int ImportClassTmplMembers<T>::StaticFieldDef; // expected-warning{{definition of dllimport static field}}
+template<typename T> const int ImportClassTmplMembers<T>::StaticConstFieldDef = 1; // expected-warning{{definition of dllimport static field}}
+template<typename T> constexpr int ImportClassTmplMembers<T>::ConstexprFieldDef; // expected-warning{{definition of dllimport static field}}
+
+
+// Redeclarations cannot add dllimport.
+template<typename T>
+struct CTMR /*ClassTmplMemberRedecl*/ {
+ void normalDef(); // expected-note{{previous declaration is here}}
+ void normalInlineDef(); // expected-note{{previous declaration is here}}
+ inline void normalInlineDecl(); // expected-note{{previous declaration is here}}
+ virtual void virtualDef(); // expected-note{{previous declaration is here}}
+ virtual void virtualInlineDef(); // expected-note{{previous declaration is here}}
+ virtual inline void virtualInlineDecl(); // expected-note{{previous declaration is here}}
+ static void staticDef(); // expected-note{{previous declaration is here}}
+ static void staticInlineDef(); // expected-note{{previous declaration is here}}
+ static inline void staticInlineDecl(); // expected-note{{previous declaration is here}}
+
+ static int StaticField; // expected-note{{previous declaration is here}}
+ static const int StaticConstField; // expected-note{{previous declaration is here}}
+ constexpr static int ConstexprField = 1; // expected-note{{previous declaration is here}}
+};
+
+template<typename T> __declspec(dllimport) void CTMR<T>::normalDef() {} // expected-error{{redeclaration of 'CTMR::normalDef' cannot add 'dllimport' attribute}}
+ // expected-error@-1{{dllimport cannot be applied to non-inline function definition}}
+template<typename T> __declspec(dllimport) inline void CTMR<T>::normalInlineDef() {} // expected-error{{redeclaration of 'CTMR::normalInlineDef' cannot add 'dllimport' attribute}}
+template<typename T> __declspec(dllimport) void CTMR<T>::normalInlineDecl() {} // expected-error{{redeclaration of 'CTMR::normalInlineDecl' cannot add 'dllimport' attribute}}
+template<typename T> __declspec(dllimport) void CTMR<T>::virtualDef() {} // expected-error{{redeclaration of 'CTMR::virtualDef' cannot add 'dllimport' attribute}}
+ // expected-error@-1{{dllimport cannot be applied to non-inline function definition}}
+template<typename T> __declspec(dllimport) inline void CTMR<T>::virtualInlineDef() {} // expected-error{{redeclaration of 'CTMR::virtualInlineDef' cannot add 'dllimport' attribute}}
+template<typename T> __declspec(dllimport) void CTMR<T>::virtualInlineDecl() {} // expected-error{{redeclaration of 'CTMR::virtualInlineDecl' cannot add 'dllimport' attribute}}
+template<typename T> __declspec(dllimport) void CTMR<T>::staticDef() {} // expected-error{{redeclaration of 'CTMR::staticDef' cannot add 'dllimport' attribute}}
+ // expected-error@-1{{dllimport cannot be applied to non-inline function definition}}
+template<typename T> __declspec(dllimport) inline void CTMR<T>::staticInlineDef() {} // expected-error{{redeclaration of 'CTMR::staticInlineDef' cannot add 'dllimport' attribute}}
+template<typename T> __declspec(dllimport) void CTMR<T>::staticInlineDecl() {} // expected-error{{redeclaration of 'CTMR::staticInlineDecl' cannot add 'dllimport' attribute}}
+
+template<typename T> __declspec(dllimport) int CTMR<T>::StaticField = 1; // expected-error{{redeclaration of 'CTMR::StaticField' cannot add 'dllimport' attribute}}
+ // expected-warning@-1{{definition of dllimport static field}}
+ // expected-note@-2{{attribute is here}}
+template<typename T> __declspec(dllimport) const int CTMR<T>::StaticConstField = 1; // expected-error{{redeclaration of 'CTMR::StaticConstField' cannot add 'dllimport' attribute}}
+ // expected-warning@-1{{definition of dllimport static field}}
+ // expected-note@-2{{attribute is here}}
+template<typename T> __declspec(dllimport) constexpr int CTMR<T>::ConstexprField; // expected-error{{redeclaration of 'CTMR::ConstexprField' cannot add 'dllimport' attribute}}
+ // expected-warning@-1{{definition of dllimport static field}}
+ // expected-note@-2{{attribute is here}}
+
+
+
+//===----------------------------------------------------------------------===//
+// Class template member templates
+//===----------------------------------------------------------------------===//
+
+template<typename T>
+struct ImportClsTmplMemTmpl {
+ template<typename U> __declspec(dllimport) void normalDecl();
+ template<typename U> __declspec(dllimport) void normalDef(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+ template<typename U> __declspec(dllimport) void normalInclass() {}
+ template<typename U> __declspec(dllimport) void normalInlineDef();
+ template<typename U> __declspec(dllimport) inline void normalInlineDecl();
+ template<typename U> __declspec(dllimport) static void staticDecl();
+ template<typename U> __declspec(dllimport) static void staticDef(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
+ template<typename U> __declspec(dllimport) static void staticInclass() {}
+ template<typename U> __declspec(dllimport) static void staticInlineDef();
+ template<typename U> __declspec(dllimport) static inline void staticInlineDecl();
+
+#if __has_feature(cxx_variable_templates)
+ template<typename U> __declspec(dllimport) static int StaticField;
+ template<typename U> __declspec(dllimport) static int StaticFieldDef; // expected-note{{attribute is here}}
+ template<typename U> __declspec(dllimport) static const int StaticConstField;
+ template<typename U> __declspec(dllimport) static const int StaticConstFieldDef; // expected-note{{attribute is here}}
+ template<typename U> __declspec(dllimport) static const int StaticConstFieldEqualInit = 1;
+ template<typename U> __declspec(dllimport) static const int StaticConstFieldBraceInit{1};
+ template<typename U> __declspec(dllimport) constexpr static int ConstexprField = 1;
+ template<typename U> __declspec(dllimport) constexpr static int ConstexprFieldDef = 1; // expected-note{{attribute is here}}
+#endif // __has_feature(cxx_variable_templates)
+};
+
+template<typename T> template<typename U> void ImportClsTmplMemTmpl<T>::normalDef() {} // expected-warning{{'ImportClsTmplMemTmpl::normalDef' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+template<typename T> template<typename U> inline void ImportClsTmplMemTmpl<T>::normalInlineDef() {}
+template<typename T> template<typename U> void ImportClsTmplMemTmpl<T>::normalInlineDecl() {}
+template<typename T> template<typename U> void ImportClsTmplMemTmpl<T>::staticDef() {} // expected-warning{{'ImportClsTmplMemTmpl::staticDef' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
+template<typename T> template<typename U> inline void ImportClsTmplMemTmpl<T>::staticInlineDef() {}
+template<typename T> template<typename U> void ImportClsTmplMemTmpl<T>::staticInlineDecl() {}
+
+#if __has_feature(cxx_variable_templates)
+template<typename T> template<typename U> int ImportClsTmplMemTmpl<T>::StaticFieldDef; // expected-warning{{definition of dllimport static field}}
+template<typename T> template<typename U> const int ImportClsTmplMemTmpl<T>::StaticConstFieldDef = 1; // expected-warning{{definition of dllimport static field}}
+template<typename T> template<typename U> constexpr int ImportClsTmplMemTmpl<T>::ConstexprFieldDef; // expected-warning{{definition of dllimport static field}}
+#endif // __has_feature(cxx_variable_templates)
+
+
+// Redeclarations cannot add dllimport.
+template<typename T>
+struct CTMTR /*ClassTmplMemberTmplRedecl*/ {
+ template<typename U> void normalDef(); // expected-note{{previous declaration is here}}
+ template<typename U> void normalInlineDef(); // expected-note{{previous declaration is here}}
+ template<typename U> inline void normalInlineDecl(); // expected-note{{previous declaration is here}}
+ template<typename U> static void staticDef(); // expected-note{{previous declaration is here}}
+ template<typename U> static void staticInlineDef(); // expected-note{{previous declaration is here}}
+ template<typename U> static inline void staticInlineDecl(); // expected-note{{previous declaration is here}}
+
+#if __has_feature(cxx_variable_templates)
+ template<typename U> static int StaticField; // expected-note{{previous declaration is here}}
+ template<typename U> static const int StaticConstField; // expected-note{{previous declaration is here}}
+ template<typename U> constexpr static int ConstexprField = 1; // expected-note{{previous declaration is here}}
+#endif // __has_feature(cxx_variable_templates)
+};
+
+template<typename T> template<typename U> __declspec(dllimport) void CTMTR<T>::normalDef() {} // expected-error{{redeclaration of 'CTMTR::normalDef' cannot add 'dllimport' attribute}}
+ // expected-error@-1{{dllimport cannot be applied to non-inline function definition}}
+template<typename T> template<typename U> __declspec(dllimport) inline void CTMTR<T>::normalInlineDef() {} // expected-error{{redeclaration of 'CTMTR::normalInlineDef' cannot add 'dllimport' attribute}}
+template<typename T> template<typename U> __declspec(dllimport) void CTMTR<T>::normalInlineDecl() {} // expected-error{{redeclaration of 'CTMTR::normalInlineDecl' cannot add 'dllimport' attribute}}
+template<typename T> template<typename U> __declspec(dllimport) void CTMTR<T>::staticDef() {} // expected-error{{redeclaration of 'CTMTR::staticDef' cannot add 'dllimport' attribute}}
+ // expected-error@-1{{dllimport cannot be applied to non-inline function definition}}
+template<typename T> template<typename U> __declspec(dllimport) inline void CTMTR<T>::staticInlineDef() {} // expected-error{{redeclaration of 'CTMTR::staticInlineDef' cannot add 'dllimport' attribute}}
+template<typename T> template<typename U> __declspec(dllimport) void CTMTR<T>::staticInlineDecl() {} // expected-error{{redeclaration of 'CTMTR::staticInlineDecl' cannot add 'dllimport' attribute}}
+
+#if __has_feature(cxx_variable_templates)
+template<typename T> template<typename U> __declspec(dllimport) int CTMTR<T>::StaticField = 1; // expected-error{{redeclaration of 'CTMTR::StaticField' cannot add 'dllimport' attribute}}
+ // expected-warning@-1{{definition of dllimport static field}}
+ // expected-note@-2{{attribute is here}}
+template<typename T> template<typename U> __declspec(dllimport) const int CTMTR<T>::StaticConstField = 1; // expected-error{{redeclaration of 'CTMTR::StaticConstField' cannot add 'dllimport' attribute}}
+ // expected-warning@-1{{definition of dllimport static field}}
+ // expected-note@-2{{attribute is here}}
+template<typename T> template<typename U> __declspec(dllimport) constexpr int CTMTR<T>::ConstexprField; // expected-error{{redeclaration of 'CTMTR::ConstexprField' cannot add 'dllimport' attribute}}
+ // expected-warning@-1{{definition of dllimport static field}}
+ // expected-note@-2{{attribute is here}}
+#endif // __has_feature(cxx_variable_templates)
+
+
+
+//===----------------------------------------------------------------------===//
+// Classes
+//===----------------------------------------------------------------------===//
+
+class __declspec(dllimport) ClassDecl;
+
+class __declspec(dllimport) ClassDef { };
+
+template <typename T> class ClassTemplate {};
+
+#ifdef MS
+// expected-note@+5{{previous attribute is here}}
+// expected-note@+4{{previous attribute is here}}
+// expected-error@+4{{attribute 'dllexport' cannot be applied to member of 'dllimport' class}}
+// expected-error@+4{{attribute 'dllimport' cannot be applied to member of 'dllimport' class}}
+#endif
+class __declspec(dllimport) ImportClassWithDllMember {
+ void __declspec(dllexport) foo();
+ void __declspec(dllimport) bar();
+};
+
+#ifdef MS
+// expected-note@+5{{previous attribute is here}}
+// expected-note@+4{{previous attribute is here}}
+// expected-error@+4{{attribute 'dllimport' cannot be applied to member of 'dllexport' class}}
+// expected-error@+4{{attribute 'dllexport' cannot be applied to member of 'dllexport' class}}
+#endif
+class __declspec(dllexport) ExportClassWithDllMember {
+ void __declspec(dllimport) foo();
+ void __declspec(dllexport) bar();
+};
+
+namespace ImportedExplicitSpecialization {
+template <typename T> struct S { static int x; };
+template <typename T> int S<T>::x = sizeof(T);
+template <> struct __declspec(dllimport) S<int> { static int x; }; // expected-note{{attribute is here}}
+int S<int>::x = -1; // expected-error{{definition of dllimport static field not allowed}}
+}
+
+namespace PR19988 {
+// Don't error about applying delete to dllimport member function when instantiating.
+template <typename> struct __declspec(dllimport) S {
+ void foo() = delete;
+};
+S<int> s;
+}
+
+#ifdef MS
+// expected-warning@+3{{'dllimport' attribute ignored}}
+#endif
+template <typename T> struct PartiallySpecializedClassTemplate {};
+template <typename T> struct __declspec(dllimport) PartiallySpecializedClassTemplate<T*> { void f() {} };
+
+template <typename T> struct ExpliciallySpecializedClassTemplate {};
+template <> struct __declspec(dllimport) ExpliciallySpecializedClassTemplate<int> { void f() {} };
+
+
+//===----------------------------------------------------------------------===//
+// Classes with template base classes
+//===----------------------------------------------------------------------===//
+
+template <typename T> class __declspec(dllexport) ExportedClassTemplate {};
+
+template <typename T> class __declspec(dllimport) ImportedClassTemplate {};
+
+// ClassTemplate<int> gets imported.
+class __declspec(dllimport) DerivedFromTemplate : public ClassTemplate<int> {};
+
+// ClassTemplate<int> is already imported.
+class __declspec(dllimport) DerivedFromTemplate2 : public ClassTemplate<int> {};
+
+// ImportedClassTemplate is expliitly imported.
+class __declspec(dllimport) DerivedFromImportedTemplate : public ImportedClassTemplate<int> {};
+
+// ExportedClassTemplate is explicitly exported.
+class __declspec(dllimport) DerivedFromExportedTemplate : public ExportedClassTemplate<int> {};
+
+#ifdef MS
+// expected-note@+4{{class template 'ClassTemplate<double>' was instantiated here}}
+// expected-warning@+4{{propagating dll attribute to already instantiated base class template without dll attribute is not supported}}
+// expected-note@+3{{attribute is here}}
+#endif
+class DerivedFromTemplateD : public ClassTemplate<double> {};
+class __declspec(dllimport) DerivedFromTemplateD2 : public ClassTemplate<double> {};
+
+#ifdef MS
+// expected-note@+4{{class template 'ClassTemplate<bool>' was instantiated here}}
+// expected-warning@+4{{propagating dll attribute to already instantiated base class template with different dll attribute is not supported}}
+// expected-note@+3{{attribute is here}}
+#endif
+class __declspec(dllexport) DerivedFromTemplateB : public ClassTemplate<bool> {};
+class __declspec(dllimport) DerivedFromTemplateB2 : public ClassTemplate<bool> {};
+
+template <typename T> struct ExplicitlySpecializedTemplate { void func() {} };
+#ifdef MS
+// expected-note@+2{{class template 'ExplicitlySpecializedTemplate<int>' was explicitly specialized here}}
+#endif
+template <> struct ExplicitlySpecializedTemplate<int> { void func() {} };
+template <typename T> struct ExplicitlyExportSpecializedTemplate { void func() {} };
+template <> struct __declspec(dllexport) ExplicitlyExportSpecializedTemplate<int> { void func() {} };
+template <typename T> struct ExplicitlyImportSpecializedTemplate { void func() {} };
+template <> struct __declspec(dllimport) ExplicitlyImportSpecializedTemplate<int> { void func() {} };
+
+template <typename T> struct ExplicitlyInstantiatedTemplate { void func() {} };
+#ifdef MS
+// expected-note@+2{{class template 'ExplicitlyInstantiatedTemplate<int>' was instantiated here}}
+#endif
+template struct ExplicitlyInstantiatedTemplate<int>;
+template <typename T> struct ExplicitlyExportInstantiatedTemplate { void func() {} };
+template struct __declspec(dllexport) ExplicitlyExportInstantiatedTemplate<int>;
+template <typename T> struct ExplicitlyImportInstantiatedTemplate { void func() {} };
+template struct __declspec(dllimport) ExplicitlyImportInstantiatedTemplate<int>;
+
+#ifdef MS
+// expected-warning@+3{{propagating dll attribute to explicitly specialized base class template without dll attribute is not supported}}
+// expected-note@+2{{attribute is here}}
+#endif
+struct __declspec(dllimport) DerivedFromExplicitlySpecializedTemplate : public ExplicitlySpecializedTemplate<int> {};
+
+// Base class already specialized with export attribute.
+struct __declspec(dllimport) DerivedFromExplicitlyExportSpecializedTemplate : public ExplicitlyExportSpecializedTemplate<int> {};
+
+// Base class already specialized with import attribute.
+struct __declspec(dllimport) DerivedFromExplicitlyImportSpecializedTemplate : public ExplicitlyImportSpecializedTemplate<int> {};
+
+#ifdef MS
+// expected-warning@+3{{propagating dll attribute to already instantiated base class template without dll attribute is not supported}}
+// expected-note@+2{{attribute is here}}
+#endif
+struct __declspec(dllimport) DerivedFromExplicitlyInstantiatedTemplate : public ExplicitlyInstantiatedTemplate<int> {};
+
+// Base class already instantiated with export attribute.
+struct __declspec(dllimport) DerivedFromExplicitlyExportInstantiatedTemplate : public ExplicitlyExportInstantiatedTemplate<int> {};
+
+// Base class already instantiated with import attribute.
+struct __declspec(dllimport) DerivedFromExplicitlyImportInstantiatedTemplate : public ExplicitlyImportInstantiatedTemplate<int> {};
diff --git a/test/SemaCXX/elaborated-type-specifier.cpp b/test/SemaCXX/elaborated-type-specifier.cpp
index 1b1770a89f85..81c5cb4eac59 100644
--- a/test/SemaCXX/elaborated-type-specifier.cpp
+++ b/test/SemaCXX/elaborated-type-specifier.cpp
@@ -43,3 +43,12 @@ int test_funcparam_scope(struct S5 * s5) {
if (s5 == s5_2) return 1; // expected-error {{comparison of distinct pointer types ('struct S5 *' and 'struct S5 *')}}
return 0;
}
+
+namespace test5 {
+ struct A {
+ class __attribute__((visibility("hidden"))) B {};
+
+ void test(class __attribute__((visibility("hidden"), noreturn)) B b) { // expected-warning {{'noreturn' attribute only applies to functions and methods}}
+ }
+ };
+}
diff --git a/test/SemaCXX/enable_if.cpp b/test/SemaCXX/enable_if.cpp
new file mode 100644
index 000000000000..e9dc24254f20
--- /dev/null
+++ b/test/SemaCXX/enable_if.cpp
@@ -0,0 +1,79 @@
+// RUN: %clang_cc1 -std=c++11 -verify %s
+
+typedef int (*fp)(int);
+int surrogate(int);
+
+struct X {
+ X() = default; // expected-note{{candidate constructor not viable: requires 0 arguments, but 1 was provided}}
+ X(const X&) = default; // expected-note{{candidate constructor not viable: no known conversion from 'bool' to 'const X' for 1st argument}}
+ X(bool b) __attribute__((enable_if(b, "chosen when 'b' is true"))); // expected-note{{candidate disabled: chosen when 'b' is true}}
+
+ void f(int n) __attribute__((enable_if(n == 0, "chosen when 'n' is zero")));
+ void f(int n) __attribute__((enable_if(n == 1, "chosen when 'n' is one"))); // expected-note{{member declaration nearly matches}} expected-note{{candidate disabled: chosen when 'n' is one}}
+
+ static void s(int n) __attribute__((enable_if(n == 0, "chosen when 'n' is zero"))); // expected-note2{{candidate disabled: chosen when 'n' is zero}}
+
+ void conflict(int n) __attribute__((enable_if(n+n == 10, "chosen when 'n' is five"))); // expected-note{{candidate function}}
+ void conflict(int n) __attribute__((enable_if(n*2 == 10, "chosen when 'n' is five"))); // expected-note{{candidate function}}
+
+ operator long() __attribute__((enable_if(true, "chosen on your platform")));
+ operator int() __attribute__((enable_if(false, "chosen on other platform")));
+
+ operator fp() __attribute__((enable_if(false, "never enabled"))) { return surrogate; } // expected-note{{conversion candidate of type 'int (*)(int)'}} // FIXME: the message is not displayed
+};
+
+void X::f(int n) __attribute__((enable_if(n == 0, "chosen when 'n' is zero"))) // expected-note{{member declaration nearly matches}} expected-note{{candidate disabled: chosen when 'n' is zero}}
+{
+}
+
+void X::f(int n) __attribute__((enable_if(n == 2, "chosen when 'n' is two"))) // expected-error{{out-of-line definition of 'f' does not match any declaration in 'X'}} expected-note{{candidate disabled: chosen when 'n' is two}}
+{
+}
+
+X x1(true);
+X x2(false); // expected-error{{no matching constructor for initialization of 'X'}}
+
+__attribute__((deprecated)) constexpr int old() { return 0; } // expected-note2{{'old' has been explicitly marked deprecated here}}
+void deprec1(int i) __attribute__((enable_if(old() == 0, "chosen when old() is zero"))); // expected-warning{{'old' is deprecated}}
+void deprec2(int i) __attribute__((enable_if(old() == 0, "chosen when old() is zero"))); // expected-warning{{'old' is deprecated}}
+
+void overloaded(int);
+void overloaded(long);
+
+struct Nothing { };
+template<typename T> void typedep(T t) __attribute__((enable_if(t, ""))); // expected-note{{candidate disabled:}} expected-error{{value of type 'Nothing' is not contextually convertible to 'bool'}}
+template<int N> void valuedep() __attribute__((enable_if(N == 1, "")));
+
+// FIXME: we skip potential constant expression evaluation on value dependent
+// enable-if expressions
+int not_constexpr();
+template<int N> void valuedep() __attribute__((enable_if(N == not_constexpr(), "")));
+
+template <typename T> void instantiationdep() __attribute__((enable_if(sizeof(sizeof(T)) != 0, "")));
+
+void test() {
+ X x;
+ x.f(0);
+ x.f(1);
+ x.f(2); // no error, suppressed by erroneous out-of-line definition
+ x.f(3); // expected-error{{no matching member function for call to 'f'}}
+
+ x.s(0);
+ x.s(1); // expected-error{{no matching member function for call to 's'}}
+
+ X::s(0);
+ X::s(1); // expected-error{{no matching member function for call to 's'}}
+
+ x.conflict(5); // expected-error{{call to member function 'conflict' is ambiguous}}
+
+ deprec2(0);
+
+ overloaded(x);
+
+ int i = x(1); // expected-error{{no matching function for call to object of type 'X'}}
+
+ Nothing n;
+ typedep(0); // expected-error{{no matching function for call to 'typedep'}}
+ typedep(1);
+ typedep(n); // expected-note{{in instantiation of function template specialization 'typedep<Nothing>' requested here}}
+}
diff --git a/test/SemaCXX/enum-bitfield.cpp b/test/SemaCXX/enum-bitfield.cpp
index 63445ca0583f..ec849b79a746 100644
--- a/test/SemaCXX/enum-bitfield.cpp
+++ b/test/SemaCXX/enum-bitfield.cpp
@@ -16,3 +16,15 @@ struct Y {
enum E : int(2);
enum E : Z(); // expected-error{{integral constant expression must have integral or unscoped enumeration type, not 'Z'}}
};
+
+namespace pr18587 {
+struct A {
+ enum class B {
+ C
+ };
+};
+const int C = 4;
+struct D {
+ A::B : C;
+};
+}
diff --git a/test/SemaCXX/enum-scoped.cpp b/test/SemaCXX/enum-scoped.cpp
index b4aad18b17c9..1eed2281e935 100644
--- a/test/SemaCXX/enum-scoped.cpp
+++ b/test/SemaCXX/enum-scoped.cpp
@@ -78,22 +78,22 @@ Complete2 complete2;
// All the redeclarations below are done twice on purpose. Tests that the type
// of the declaration isn't changed.
-enum class Redeclare2; // expected-note{{previous use is here}} expected-note{{previous use is here}}
+enum class Redeclare2; // expected-note{{previous declaration is here}} expected-note{{previous declaration is here}}
enum Redeclare2; // expected-error{{previously declared as scoped}}
enum Redeclare2; // expected-error{{previously declared as scoped}}
-enum Redeclare3 : int; // expected-note{{previous use is here}} expected-note{{previous use is here}}
+enum Redeclare3 : int; // expected-note{{previous declaration is here}} expected-note{{previous declaration is here}}
enum Redeclare3; // expected-error{{previously declared with fixed underlying type}}
enum Redeclare3; // expected-error{{previously declared with fixed underlying type}}
enum class Redeclare5;
enum class Redeclare5 : int; // ok
-enum Redeclare6 : int; // expected-note{{previous use is here}} expected-note{{previous use is here}}
+enum Redeclare6 : int; // expected-note{{previous declaration is here}} expected-note{{previous declaration is here}}
enum Redeclare6 : short; // expected-error{{redeclared with different underlying type}}
enum Redeclare6 : short; // expected-error{{redeclared with different underlying type}}
-enum class Redeclare7; // expected-note{{previous use is here}} expected-note{{previous use is here}}
+enum class Redeclare7; // expected-note{{previous declaration is here}} expected-note{{previous declaration is here}}
enum class Redeclare7 : short; // expected-error{{redeclared with different underlying type}}
enum class Redeclare7 : short; // expected-error{{redeclared with different underlying type}}
@@ -272,6 +272,11 @@ namespace PR16900 {
A f(A a) { return -a; } // expected-error {{invalid argument type 'PR16900::A' to unary expression}}
}
+namespace PR18551 {
+ enum class A { A };
+ bool f() { return !A::A; } // expected-error {{invalid argument type 'PR18551::A' to unary expression}}
+}
+
namespace rdar15124329 {
enum class B : bool { F, T };
diff --git a/test/SemaCXX/err_init_conversion_failed.cpp b/test/SemaCXX/err_init_conversion_failed.cpp
index 0652e7a9ea6a..e31f215b4528 100644
--- a/test/SemaCXX/err_init_conversion_failed.cpp
+++ b/test/SemaCXX/err_init_conversion_failed.cpp
@@ -43,3 +43,19 @@ void test14(const float2 in, const float2 out) {
const float4 V = (float4){ in, out };
// expected-error@-1{{cannot initialize a compound literal initializer}}
}
+
+namespace template_test {
+class S {
+public:
+ void foo(int);
+};
+
+template <class P> struct S2 {
+ void (P::*a)(const int &);
+};
+
+void test_15() {
+ S2<S> X = {&S::foo};
+ // expected-error-re@-1{{cannot initialize a member subobject of type 'void (template_test::S::*)(const int &){{( __attribute__\(\(thiscall\)\))?}}' with an rvalue of type 'void (template_test::S::*)(int){{( __attribute__\(\(thiscall\)\))?}}': type mismatch at 1st parameter ('const int &' vs 'int')}}
+}
+}
diff --git a/test/SemaCXX/explicit.cpp b/test/SemaCXX/explicit.cpp
index 1c4d7704511b..aa28bd85af46 100644
--- a/test/SemaCXX/explicit.cpp
+++ b/test/SemaCXX/explicit.cpp
@@ -246,3 +246,8 @@ namespace pr8264 {
explicit explicit Test(int x); // expected-warning{{duplicate 'explicit' declaration specifier}}
};
}
+
+namespace PR18777 {
+ struct S { explicit operator bool() const; } s;
+ int *p = new int(s); // expected-error {{no viable conversion}}
+}
diff --git a/test/SemaCXX/expression-traits.cpp b/test/SemaCXX/expression-traits.cpp
index 3a00687f1125..51bb90e8bbf9 100644
--- a/test/SemaCXX/expression-traits.cpp
+++ b/test/SemaCXX/expression-traits.cpp
@@ -520,20 +520,19 @@ void expr_cond(bool cond)
// 5.16 Conditional operator [expr.cond]
//
// 2 If either the second or the third operand has type (possibly
- // cv-qualified) void, then the lvalue-to-rvalue (4.1),
- // array-to-pointer (4.2), and function-to-pointer (4.3) standard
- // conversions are performed on the second and third operands, and one
- // of the following shall hold:
+ // cv-qualified) void, one of the following shall hold:
//
// - The second or the third operand (but not both) is a
- // throw-expression (15.1); the result is of the type of the other and
- // is an rvalue.
+ // (possibly parenthesized) throw-expression (15.1); the result
+ // is of the type and value category of the other.
Class classLvalue;
ASSERT_RVALUE(cond ? throw 1 : (void)0);
ASSERT_RVALUE(cond ? (void)0 : throw 1);
- ASSERT_RVALUE(cond ? throw 1 : classLvalue);
- ASSERT_RVALUE(cond ? classLvalue : throw 1);
+ ASSERT_RVALUE(cond ? throw 1 : 0);
+ ASSERT_RVALUE(cond ? 0 : throw 1);
+ ASSERT_LVALUE(cond ? throw 1 : classLvalue);
+ ASSERT_LVALUE(cond ? classLvalue : throw 1);
// - Both the second and the third operands have type void; the result
// is of type void and is an rvalue. [Note: this includes the case
diff --git a/test/SemaCXX/expressions.cpp b/test/SemaCXX/expressions.cpp
index 2635fb8d176a..1a50c99c5904 100644
--- a/test/SemaCXX/expressions.cpp
+++ b/test/SemaCXX/expressions.cpp
@@ -118,3 +118,20 @@ void test3() {
(void)s1.foo();
(void)s2.foo();
}
+
+namespace pr16992 {
+ typedef int T;
+ unsigned getsz() {
+ return (sizeof T());
+ }
+}
+
+void test4() {
+ #define X 0
+ #define Y 1
+ bool r1 = X || Y;
+
+ #define Y2 2
+ bool r2 = X || Y2; // expected-warning {{use of logical '||' with constant operand}} \
+ // expected-note {{use '|' for a bitwise operation}}
+}
diff --git a/test/SemaCXX/flexible-array-test.cpp b/test/SemaCXX/flexible-array-test.cpp
index f287711eeb6a..e58f19a62eca 100644
--- a/test/SemaCXX/flexible-array-test.cpp
+++ b/test/SemaCXX/flexible-array-test.cpp
@@ -36,14 +36,20 @@ void foo()
}
struct S {
- virtual void foo();
+ virtual void foo();
};
struct X {
int blah;
- S strings[]; // expected-error {{flexible array member 'strings' of non-POD element type 'S []'}}
+ S strings[];
};
+S a, b = a;
+S f(X &x) {
+ a = b;
+ return x.strings[0];
+}
+
class A {
int s;
char c[];
@@ -71,3 +77,14 @@ struct VirtStorage : virtual StorageBase {
};
}
+
+struct NonTrivDtor { ~NonTrivDtor(); };
+// FIXME: It's not clear whether we should disallow examples like this. GCC accepts.
+struct FlexNonTrivDtor {
+ int n;
+ NonTrivDtor ntd[]; // expected-error {{flexible array member 'ntd' of type 'NonTrivDtor []' with non-trivial destruction}}
+ ~FlexNonTrivDtor() {
+ for (int i = n; i != 0; --i)
+ ntd[i-1].~NonTrivDtor();
+ }
+};
diff --git a/test/SemaCXX/for-range-dereference.cpp b/test/SemaCXX/for-range-dereference.cpp
index bf3187da30e2..7377199024e5 100644
--- a/test/SemaCXX/for-range-dereference.cpp
+++ b/test/SemaCXX/for-range-dereference.cpp
@@ -11,7 +11,7 @@ struct NoBegin {
struct DeletedEnd : public T {
Data *begin();
- Data *end() = delete; //expected-note {{function has been explicitly marked deleted here}}
+ Data *end() = delete; //expected-note {{'end' has been explicitly marked deleted here}}
};
struct DeletedADLBegin { };
diff --git a/test/SemaCXX/for-range-examples.cpp b/test/SemaCXX/for-range-examples.cpp
index b3cf9c326421..2f777fb46df0 100644
--- a/test/SemaCXX/for-range-examples.cpp
+++ b/test/SemaCXX/for-range-examples.cpp
@@ -176,8 +176,9 @@ namespace test4 {
// Make sure these don't crash. Better diagnostics would be nice.
for (: {1, 2, 3}) {} // expected-error {{expected expression}} expected-error {{expected ';'}}
- for (x : {1, 2, 3}) {} // expected-error {{undeclared identifier}} expected-error {{expected ';'}}
- for (y : {1, 2, 3}) {} // expected-error {{must declare a variable}} expected-warning {{result unused}}
+ for (1 : {1, 2, 3}) {} // expected-error {{must declare a variable}} expected-warning {{result unused}}
+ for (+x : {1, 2, 3}) {} // expected-error {{undeclared identifier}} expected-error {{expected ';'}}
+ for (+y : {1, 2, 3}) {} // expected-error {{must declare a variable}} expected-warning {{result unused}}
}
}
@@ -209,3 +210,32 @@ namespace test6 {
// expected-error@-1 {{cannot build range expression with array function parameter 'arr' since parameter with array type 'test6::vector []' is treated as pointer type 'test6::vector *'}}
}
}
+
+namespace test7 {
+ void f() {
+ int arr[5], b;
+ for (a : arr) {} // expected-warning {{extension}}
+ // FIXME: Give a -Wshadow for this by default?
+ for (b : arr) {} // expected-warning {{extension}}
+ for (arr : arr) {} // expected-warning {{extension}}
+ for (c alignas(8) : arr) { // expected-warning {{extension}}
+ static_assert(alignof(c) == 8, ""); // expected-warning {{extension}}
+ }
+ // FIXME: We should reject this, but don't, because we only check the
+ // attribute before we deduce the 'auto' type.
+ for (d alignas(1) : arr) {} // expected-warning {{extension}}
+ for (e [[deprecated]] : arr) { e = 0; } // expected-warning {{deprecated}} expected-note {{here}} expected-warning {{extension}}
+ }
+}
+
+namespace pr18587 {
+ class Arg {};
+ struct Cont {
+ int *begin();
+ int *end();
+ };
+ void AddAllArgs(Cont &x) {
+ for (auto Arg: x) {
+ }
+ }
+}
diff --git a/test/SemaCXX/format-strings.cpp b/test/SemaCXX/format-strings.cpp
index 299aa81bb161..41775708feb7 100644
--- a/test/SemaCXX/format-strings.cpp
+++ b/test/SemaCXX/format-strings.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -Wformat-nonliteral -pedantic -fblocks %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wformat-nonliteral -Wformat-non-iso -fblocks %s
#include <stdarg.h>
diff --git a/test/SemaCXX/friend.cpp b/test/SemaCXX/friend.cpp
index aed2ab2c7d0c..03589101e1b8 100644
--- a/test/SemaCXX/friend.cpp
+++ b/test/SemaCXX/friend.cpp
@@ -288,3 +288,11 @@ namespace test10 {
::test10::f10_d(z);
}
}
+
+namespace test11 {
+ class __attribute__((visibility("hidden"))) B;
+
+ class A {
+ friend class __attribute__((visibility("hidden"), noreturn)) B; // expected-warning {{'noreturn' attribute only applies to functions and methods}}
+ };
+}
diff --git a/test/SemaCXX/funcdname.cpp b/test/SemaCXX/funcdname.cpp
new file mode 100644
index 000000000000..d63d3f54c339
--- /dev/null
+++ b/test/SemaCXX/funcdname.cpp
@@ -0,0 +1,32 @@
+// RUN: %clang_cc1 -std=c++1y -triple i386-pc-win32 -fms-compatibility -fms-extensions -fsyntax-only -verify %s
+// expected-no-diagnostics
+
+int foo() {
+ static_assert(sizeof(__FUNCDNAME__) == 12, "?foo@@YAHXZ");
+ return 0;
+}
+
+// Within templates.
+template <typename T>
+int baz() {
+ static_assert(sizeof(__FUNCDNAME__) == 16, "??$baz@H@@YAHXZ");
+
+ return 0;
+}
+
+struct A {
+ A() {
+ static_assert(sizeof(__FUNCDNAME__) == 13, "??0A@@QAE@XZ");
+ }
+ ~A() {
+ static_assert(sizeof(__FUNCDNAME__) == 13, "??1A@@QAE@XZ");
+ }
+};
+
+int main() {
+ static_assert(sizeof(__FUNCDNAME__) == 5, "main");
+
+ baz<int>();
+
+ return 0;
+}
diff --git a/test/SemaCXX/functional-cast.cpp b/test/SemaCXX/functional-cast.cpp
index f8e0c465875e..f5ca76c38c06 100644
--- a/test/SemaCXX/functional-cast.cpp
+++ b/test/SemaCXX/functional-cast.cpp
@@ -305,8 +305,8 @@ void memptrs()
(void)structureimfp(psf);
typedef void (structure::*structurevmfp)();
- (void)structurevmfp(psi); // expected-error {{functional-style cast from 'const int structure::*' to 'structurevmfp' (aka 'void (structure::*)()') is not allowed}}
- (void)structureimp(psf); // expected-error {{functional-style cast from 'void (structure::*)()' to 'structureimp' (aka 'int structure::*') is not allowed}}
+ (void)structurevmfp(psi); // expected-error-re {{functional-style cast from 'const int structure::*' to 'structurevmfp' (aka 'void (structure::*)(){{( __attribute__\(\(thiscall\)\))?}}') is not allowed}}
+ (void)structureimp(psf); // expected-error-re {{functional-style cast from 'void (structure::*)(){{( __attribute__\(\(thiscall\)\))?}}' to 'structureimp' (aka 'int structure::*') is not allowed}}
}
// ---------------- misc ------------------
diff --git a/test/SemaCXX/goto.cpp b/test/SemaCXX/goto.cpp
index 24bcb7c51673..042ec3cd8035 100644
--- a/test/SemaCXX/goto.cpp
+++ b/test/SemaCXX/goto.cpp
@@ -118,7 +118,7 @@ namespace PR10620 {
namespace test12 {
struct A { A(); A(const A&); ~A(); };
- void test(A a) { // expected-note {{jump enters lifetime of block}} FIXME: wierd location
+ void test(A a) { // expected-note {{jump enters lifetime of block}} FIXME: weird location
goto lbl; // expected-error {{goto into protected scope}}
(void) ^{ (void) a; };
lbl:
diff --git a/test/SemaCXX/implicit-member-functions.cpp b/test/SemaCXX/implicit-member-functions.cpp
index b5f7fe1016b9..de679fe14a06 100644
--- a/test/SemaCXX/implicit-member-functions.cpp
+++ b/test/SemaCXX/implicit-member-functions.cpp
@@ -58,13 +58,13 @@ namespace Recursion {
};
struct B;
struct A {
+ // expected-note@-1 {{while substituting deduced template arguments}}
typedef B type;
template<typename T,
typename = typename InvokeCopyConstructor<typename T::type>::type>
// expected-note@-1 {{in instantiation of template class}}
A(const T &);
// expected-note@-1 {{in instantiation of default argument}}
- // expected-note@-2 {{while substituting deduced template arguments}}
};
struct B { // expected-note {{candidate constructor (the implicit move }}
B(); // expected-note {{candidate constructor not viable}}
diff --git a/test/SemaCXX/implicit-virtual-member-functions.cpp b/test/SemaCXX/implicit-virtual-member-functions.cpp
index cd547f576459..f88a55c3d5b4 100644
--- a/test/SemaCXX/implicit-virtual-member-functions.cpp
+++ b/test/SemaCXX/implicit-virtual-member-functions.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -triple %itanium_abi_triple -verify %s
+// RUN: %clang_cc1 -fsyntax-only -triple %ms_abi_triple -DMSABI -verify %s
struct A {
virtual ~A();
};
@@ -9,8 +10,12 @@ struct B : A { // expected-error {{no suitable member 'operator delete' in 'B'}}
void operator delete (void *, int); // expected-note {{'operator delete' declared here}}
};
+#ifdef MSABI
+B b; // expected-note {{implicit destructor for 'B' first required here}}
+#else
void B::f() { // expected-note {{implicit destructor for 'B' first required here}}
}
+#endif
struct C : A { // expected-error {{no suitable member 'operator delete' in 'C'}}
C();
@@ -26,4 +31,3 @@ struct D : A { // expected-error {{no suitable member 'operator delete' in 'D'}}
void f() {
new D; // expected-note {{implicit destructor for 'D' first required here}}
}
-
diff --git a/test/SemaCXX/init-priority-attr.cpp b/test/SemaCXX/init-priority-attr.cpp
index a91eb60ba96c..a2e6df26ba1b 100644
--- a/test/SemaCXX/init-priority-attr.cpp
+++ b/test/SemaCXX/init-priority-attr.cpp
@@ -25,8 +25,7 @@ Two coo[2] __attribute__((init_priority(3))); // expected-error {{init_priority
Two koo[4] __attribute__((init_priority(1.13))); // expected-error {{'init_priority' attribute requires an integer constant}}
-
-Two func() __attribute__((init_priority(1001))); // expected-error {{can only use 'init_priority' attribute on file-scope definitions of objects of class type}}
+Two func() __attribute__((init_priority(1001))); // expected-error {{'init_priority' attribute only applies to variables}}
int i __attribute__((init_priority(1001))); // expected-error {{can only use 'init_priority' attribute on file-scope definitions of objects of class type}}
diff --git a/test/SemaCXX/lambda-expressions.cpp b/test/SemaCXX/lambda-expressions.cpp
index 65f4856dda24..9a53e4604f76 100644
--- a/test/SemaCXX/lambda-expressions.cpp
+++ b/test/SemaCXX/lambda-expressions.cpp
@@ -284,6 +284,67 @@ namespace lambdas_in_NSDMIs {
}
}
+// PR18477: don't try to capture 'this' from an NSDMI encountered while parsing
+// a lambda.
+namespace NSDMIs_in_lambdas {
+ template<typename T> struct S { int a = 0; int b = a; };
+ void f() { []() { S<int> s; }; }
+
+ auto x = []{ struct S { int n, m = n; }; };
+ auto y = [&]{ struct S { int n, m = n; }; }; // expected-error {{non-local lambda expression cannot have a capture-default}}
+ void g() { auto z = [&]{ struct S { int n, m = n; }; }; }
+}
+
+namespace CaptureIncomplete {
+ struct Incomplete; // expected-note 2{{forward decl}}
+ void g(const Incomplete &a);
+ void f(Incomplete &a) {
+ (void) [a] {}; // expected-error {{incomplete}}
+ (void) [&a] {};
+
+ (void) [=] { g(a); }; // expected-error {{incomplete}}
+ (void) [&] { f(a); };
+ }
+}
+
+namespace CaptureAbstract {
+ struct S {
+ virtual void f() = 0; // expected-note {{unimplemented}}
+ int n = 0;
+ };
+ struct T : S {
+ constexpr T() {}
+ void f();
+ };
+ void f() {
+ constexpr T t = T();
+ S &s = const_cast<T&>(t);
+ // FIXME: Once we properly compute odr-use per DR712, this should be
+ // accepted (and should not capture 's').
+ [=] { return s.n; }; // expected-error {{abstract}}
+ }
+}
+
+namespace PR18128 {
+ auto l = [=]{}; // expected-error {{non-local lambda expression cannot have a capture-default}}
+
+ struct S {
+ int n;
+ int (*f())[true ? 1 : ([=]{ return n; }(), 0)];
+ // expected-error@-1 {{non-local lambda expression cannot have a capture-default}}
+ // expected-error@-2 {{invalid use of non-static data member 'n'}}
+ // expected-error@-3 {{a lambda expression may not appear inside of a constant expression}}
+ int g(int k = ([=]{ return n; }(), 0));
+ // expected-error@-1 {{non-local lambda expression cannot have a capture-default}}
+ // expected-error@-2 {{invalid use of non-static data member 'n'}}
+
+ int a = [=]{ return n; }(); // ok
+ int b = [=]{ return [=]{ return n; }(); }(); // ok
+ int c = []{ int k = 0; return [=]{ return k; }(); }(); // ok
+ int d = []{ return [=]{ return n; }(); }(); // expected-error {{'this' cannot be implicitly captured in this context}}
+ };
+}
+
namespace PR18473 {
template<typename T> void f() {
T t(0);
@@ -298,3 +359,7 @@ namespace PR18473 {
};
template void f<NoCopy>(); // expected-note {{instantiation}}
}
+
+void PR19249() {
+ auto x = [&x]{}; // expected-error {{cannot appear in its own init}}
+}
diff --git a/test/SemaCXX/linkage.cpp b/test/SemaCXX/linkage.cpp
index 13d295a5d59b..8a2013fd52b4 100644
--- a/test/SemaCXX/linkage.cpp
+++ b/test/SemaCXX/linkage.cpp
@@ -5,6 +5,8 @@
// RUN: %clang_cc1 -Werror -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck %s
+// CHECK: @_ZZN5test61A3fooEvE3bar = linkonce_odr global i32 0, align 4
+
// PR8926
namespace test0 {
typedef struct {
@@ -103,3 +105,20 @@ namespace test5 {
};
}
}
+
+// Test that we don't compute linkage too hastily before we're done
+// processing a record decl. rdar://15928125
+namespace test6 {
+ typedef struct {
+ int foo() {
+ // Tested at top of file.
+ static int bar = 0;
+ return bar++;
+ }
+ } A;
+
+ void test() {
+ A a;
+ a.foo();
+ }
+}
diff --git a/test/SemaCXX/linkage2.cpp b/test/SemaCXX/linkage2.cpp
index 075f5e70c247..a7eb15f7c6be 100644
--- a/test/SemaCXX/linkage2.cpp
+++ b/test/SemaCXX/linkage2.cpp
@@ -213,3 +213,7 @@ namespace PR16247 {
void pr16247_bar(int) {}
void pr16247_bar(double) {}
}
+namespace PR18964 {
+ unsigned &*foo; //expected-error{{'foo' declared as a pointer to a reference of type}}
+ extern struct {} *foo; // don't assert
+}
diff --git a/test/SemaCXX/member-expr.cpp b/test/SemaCXX/member-expr.cpp
index 239aecff815d..e0955aeb9ce9 100644
--- a/test/SemaCXX/member-expr.cpp
+++ b/test/SemaCXX/member-expr.cpp
@@ -193,7 +193,7 @@ namespace PR15045 {
};
template <class T> void call_func(T t) {
- t->func(); // expected-error-re 2 {{member reference type 'PR15045::bar' is not a pointer$}} \
+ t->func(); // expected-error-re 2 {{member reference type 'PR15045::bar' is not a pointer{{$}}}} \
// expected-note {{did you mean to use '.' instead?}}
}
@@ -207,7 +207,7 @@ namespace PR15045 {
// Make sure a fixit isn't given in the case that the '->' isn't actually
// the problem (the problem is with the return value of an operator->).
- f->func(); // expected-error-re {{member reference type 'PR15045::bar' is not a pointer$}}
+ f->func(); // expected-error-re {{member reference type 'PR15045::bar' is not a pointer{{$}}}}
call_func(e); // expected-note {{in instantiation of function template specialization 'PR15045::call_func<PR15045::bar>' requested here}}
diff --git a/test/SemaCXX/member-init.cpp b/test/SemaCXX/member-init.cpp
index 6e4fd5df5a08..d8a00b3b1e24 100644
--- a/test/SemaCXX/member-init.cpp
+++ b/test/SemaCXX/member-init.cpp
@@ -100,3 +100,13 @@ namespace rdar14084171 {
};
void f(Sprite& x) { x = x; }
}
+
+namespace PR18560 {
+ struct X { int m; };
+
+ template<typename T = X,
+ typename U = decltype(T::m)>
+ int f();
+
+ struct Y { int b = f(); };
+}
diff --git a/test/SemaCXX/member-pointer-ms.cpp b/test/SemaCXX/member-pointer-ms.cpp
index aee8e2eca774..e7c4ae9409e0 100644
--- a/test/SemaCXX/member-pointer-ms.cpp
+++ b/test/SemaCXX/member-pointer-ms.cpp
@@ -1,5 +1,6 @@
-// RUN: %clang_cc1 -std=c++11 -cxx-abi microsoft -fms-compatibility -fsyntax-only -triple=i386-pc-win32 -verify %s
-// RUN: %clang_cc1 -std=c++11 -cxx-abi microsoft -fms-compatibility -fsyntax-only -triple=x86_64-pc-win32 -verify %s
+// RUN: %clang_cc1 -std=c++11 -fms-compatibility -fsyntax-only -triple=i386-pc-win32 -verify -DVMB %s
+// RUN: %clang_cc1 -std=c++11 -fms-compatibility -fsyntax-only -triple=x86_64-pc-win32 -verify -DVMB %s
+// RUN: %clang_cc1 -std=c++11 -fms-compatibility -fsyntax-only -triple=x86_64-pc-win32 -verify -DVMV -fms-memptr-rep=virtual %s
//
// This file should also give no diagnostics when run through cl.exe from MSVS
// 2012, which supports C++11 and static_assert. It should pass for both 64-bit
@@ -18,22 +19,73 @@ struct Foo {
int f;
};
+#ifdef VMB
enum {
+ kSingleDataAlign = 1 * sizeof(int),
+ kSingleFunctionAlign = 1 * sizeof(void *),
+ kMultipleDataAlign = 1 * sizeof(int),
+ // Everything with more than 1 field is 8 byte aligned, except virtual data
+ // member pointers on x64 (ugh).
+ kMultipleFunctionAlign = 8,
+#ifdef _M_X64
+ kVirtualDataAlign = 4,
+#else
+ kVirtualDataAlign = 8,
+#endif
+ kVirtualFunctionAlign = 8,
+ kUnspecifiedDataAlign = 8,
+ kUnspecifiedFunctionAlign = 8,
+
kSingleDataSize = 1 * sizeof(int),
kSingleFunctionSize = 1 * sizeof(void *),
kMultipleDataSize = 1 * sizeof(int),
kMultipleFunctionSize = 2 * sizeof(void *),
kVirtualDataSize = 2 * sizeof(int),
kVirtualFunctionSize = 2 * sizeof(int) + 1 * sizeof(void *),
- // Unspecified is weird, it's 1 more slot than virtual.
- kUnspecifiedDataSize = kVirtualDataSize + 1 * sizeof(int),
- kUnspecifiedFunctionSize = kVirtualFunctionSize + 1 * sizeof(void *),
+ kUnspecifiedDataSize = 3 * sizeof(int),
+ kUnspecifiedFunctionSize = 2 * sizeof(int) + 2 * sizeof(void *),
+};
+#elif VMV
+enum {
+ // Everything with more than 1 field is 8 byte aligned, except virtual data
+ // member pointers on x64 (ugh).
+#ifdef _M_X64
+ kVirtualDataAlign = 4,
+#else
+ kVirtualDataAlign = 8,
+#endif
+ kMultipleDataAlign = kVirtualDataAlign,
+ kSingleDataAlign = kVirtualDataAlign,
+
+ kUnspecifiedFunctionAlign = 8,
+ kVirtualFunctionAlign = kUnspecifiedFunctionAlign,
+ kMultipleFunctionAlign = kUnspecifiedFunctionAlign,
+ kSingleFunctionAlign = kUnspecifiedFunctionAlign,
+
+ kUnspecifiedDataSize = 3 * sizeof(int),
+ kVirtualDataSize = kUnspecifiedDataSize,
+ kMultipleDataSize = kUnspecifiedDataSize,
+ kSingleDataSize = kUnspecifiedDataSize,
+
+ kUnspecifiedFunctionSize = 2 * sizeof(int) + 2 * sizeof(void *),
+ kVirtualFunctionSize = kUnspecifiedFunctionSize,
+ kMultipleFunctionSize = kUnspecifiedFunctionSize,
+ kSingleFunctionSize = kUnspecifiedFunctionSize,
};
+#else
+#error "test doesn't yet support this mode!"
+#endif
// incomplete types
+#ifdef VMB
class __single_inheritance IncSingle;
class __multiple_inheritance IncMultiple;
class __virtual_inheritance IncVirtual;
+#else
+class IncSingle;
+class IncMultiple;
+class IncVirtual;
+#endif
static_assert(sizeof(int IncSingle::*) == kSingleDataSize, "");
static_assert(sizeof(int IncMultiple::*) == kMultipleDataSize, "");
static_assert(sizeof(int IncVirtual::*) == kVirtualDataSize, "");
@@ -41,6 +93,13 @@ static_assert(sizeof(void (IncSingle::*)()) == kSingleFunctionSize, "");
static_assert(sizeof(void (IncMultiple::*)()) == kMultipleFunctionSize, "");
static_assert(sizeof(void (IncVirtual::*)()) == kVirtualFunctionSize, "");
+static_assert(__alignof(int IncSingle::*) == kSingleDataAlign, "");
+static_assert(__alignof(int IncMultiple::*) == kMultipleDataAlign, "");
+static_assert(__alignof(int IncVirtual::*) == kVirtualDataAlign, "");
+static_assert(__alignof(void (IncSingle::*)()) == kSingleFunctionAlign, "");
+static_assert(__alignof(void (IncMultiple::*)()) == kMultipleFunctionAlign, "");
+static_assert(__alignof(void (IncVirtual::*)()) == kVirtualFunctionAlign, "");
+
// An incomplete type with an unspecified inheritance model seems to take one
// more slot than virtual. It's not clear what it's used for yet.
class IncUnspecified;
@@ -62,9 +121,15 @@ static_assert(sizeof(void (Virtual::*)()) == kVirtualFunctionSize, "");
// Test both declared and defined templates.
template <typename T> class X;
+#ifdef VMB
template <> class __single_inheritance X<IncSingle>;
template <> class __multiple_inheritance X<IncMultiple>;
template <> class __virtual_inheritance X<IncVirtual>;
+#else
+template <> class X<IncSingle>;
+template <> class X<IncMultiple>;
+template <> class X<IncVirtual>;
+#endif
// Don't declare X<IncUnspecified>.
static_assert(sizeof(int X<IncSingle>::*) == kSingleDataSize, "");
static_assert(sizeof(int X<IncMultiple>::*) == kMultipleDataSize, "");
@@ -117,9 +182,7 @@ struct ForwardDecl2 : B {
static_assert(sizeof(variable_forces_sizing) == kUnspecifiedDataSize, "");
static_assert(sizeof(MemPtr1) == kUnspecifiedDataSize, "");
-// FIXME: Clang fails this assert because it locks in the inheritance model at
-// the point of the typedef instead of the first usage, while MSVC does not.
-//static_assert(sizeof(MemPtr2) == kSingleDataSize, "");
+static_assert(sizeof(MemPtr2) == kSingleDataSize, "");
struct MemPtrInBody {
typedef int MemPtrInBody::*MemPtr;
@@ -164,5 +227,48 @@ struct MemPtrInTemplate {
void (T::*func_ptr)();
};
+#ifdef VMB
int Virtual::*CastTest = reinterpret_cast<int Virtual::*>(&AA::x);
// expected-error@-1 {{cannot reinterpret_cast from member pointer type}}
+#endif
+
+namespace ErrorTest {
+template <typename T, typename U> struct __single_inheritance A;
+ // expected-warning@-1 {{inheritance model ignored on primary template}}
+template <typename T> struct __multiple_inheritance A<T, T>;
+ // expected-warning@-1 {{inheritance model ignored on partial specialization}}
+template <> struct __single_inheritance A<int, float>;
+
+struct B {}; // expected-note {{B defined here}}
+struct __multiple_inheritance B; // expected-error{{inheritance model does not match definition}}
+
+struct __multiple_inheritance C {}; // expected-error{{inheritance model does not match definition}}
+ // expected-note@-1 {{C defined here}}
+
+struct __virtual_inheritance D;
+struct D : virtual B {};
+}
+#ifdef VMB
+#pragma pointers_to_members(full_generality, multiple_inheritance)
+struct TrulySingleInheritance;
+static_assert(sizeof(int TrulySingleInheritance::*) == kMultipleDataSize, "");
+#pragma pointers_to_members(best_case)
+// This definition shouldn't conflict with the increased generality that the
+// multiple_inheritance model gave to TrulySingleInheritance.
+struct TrulySingleInheritance {};
+
+// Even if a definition proceeds the first mention of a pointer to member, we
+// still give the record the fully general representation.
+#pragma pointers_to_members(full_generality, virtual_inheritance)
+struct SingleInheritanceAsVirtualAfterPragma {};
+static_assert(sizeof(int SingleInheritanceAsVirtualAfterPragma::*) == 12, "");
+
+#pragma pointers_to_members(best_case)
+
+// The above holds even if the pragma comes after the definition.
+struct SingleInheritanceAsVirtualBeforePragma {};
+#pragma pointers_to_members(virtual_inheritance)
+static_assert(sizeof(int SingleInheritanceAsVirtualBeforePragma::*) == 12, "");
+
+#pragma pointers_to_members(single) // expected-error{{unexpected 'single'}}
+#endif
diff --git a/test/SemaCXX/member-pointer.cpp b/test/SemaCXX/member-pointer.cpp
index 4e8b4a813ba7..b8631bcf3efc 100644
--- a/test/SemaCXX/member-pointer.cpp
+++ b/test/SemaCXX/member-pointer.cpp
@@ -7,12 +7,13 @@ struct D : A {};
struct E : A {};
struct F : D, E {};
struct G : virtual D {};
+class H : A {}; // expected-note 2{{implicitly declared private here}}
int A::*pdi1;
int (::A::*pdi2);
int (A::*pfi)(int);
-int B::*pbi; // expected-error {{expected a class or namespace}}
+int B::*pbi; // expected-error {{'B' is not a class, namespace, or scoped enumeration}}
int C::*pci; // expected-error {{'pci' does not point into a class}}
void A::*pdv; // expected-error {{'pdv' declared as a member pointer to void}}
int& A::*pdr; // expected-error {{'pdr' declared as a member pointer to a reference}}
@@ -115,8 +116,11 @@ void h() {
(void)(d.*pai);
(void)(pd->*pai);
F f, *ptrf = &f;
- (void)(f.*pai); // expected-error {{left hand operand to .* must be a class compatible with the right hand operand, but is 'F'}}
- (void)(ptrf->*pai); // expected-error {{left hand operand to ->* must be a pointer to class compatible with the right hand operand, but is 'F *'}}
+ (void)(f.*pai); // expected-error {{ambiguous conversion from derived class 'F' to base class 'A'}}
+ (void)(ptrf->*pai); // expected-error {{ambiguous conversion from derived class 'F' to base class 'A'}}
+ H h, *ptrh = &h;
+ (void)(h.*pai); // expected-error {{cannot cast 'H' to its private base class 'A'}}
+ (void)(ptrh->*pai); // expected-error {{cannot cast 'H' to its private base class 'A'}}
(void)(hm.*i); // expected-error {{pointer-to-member}}
(void)(phm->*i); // expected-error {{pointer-to-member}}
diff --git a/test/SemaCXX/microsoft-cxx0x.cpp b/test/SemaCXX/microsoft-cxx0x.cpp
index 79bd7c39e5a5..58ab940f583e 100644
--- a/test/SemaCXX/microsoft-cxx0x.cpp
+++ b/test/SemaCXX/microsoft-cxx0x.cpp
@@ -6,7 +6,7 @@ struct A {
unsigned int a;
};
int b = 3;
-A var = { b }; // expected-warning {{ cannot be narrowed }} expected-note {{override}}
+A var = { b }; // expected-warning {{ cannot be narrowed }} expected-note {{insert an explicit cast to silence this issue}}
namespace PR13433 {
diff --git a/test/SemaCXX/microsoft-dtor-lookup-cxx11.cpp b/test/SemaCXX/microsoft-dtor-lookup-cxx11.cpp
new file mode 100644
index 000000000000..5a399aa7eac2
--- /dev/null
+++ b/test/SemaCXX/microsoft-dtor-lookup-cxx11.cpp
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -triple i686-pc-win32 -std=c++11 -verify %s
+
+struct S {
+ virtual ~S() = delete; // expected-note {{'~S' has been explicitly marked deleted here}}
+ void operator delete(void*, int);
+ void operator delete(void*, double);
+} s; // expected-error {{attempt to use a deleted function}}
+
+struct T { // expected-note{{virtual destructor requires an unambiguous, accessible 'operator delete'}}
+ virtual ~T() = default; // expected-note {{explicitly defaulted function was implicitly deleted here}}
+ void operator delete(void*, int);
+ void operator delete(void*, double);
+} t; // expected-error {{attempt to use a deleted function}}
diff --git a/test/SemaCXX/microsoft-dtor-lookup.cpp b/test/SemaCXX/microsoft-dtor-lookup.cpp
index d264bab09bf7..412749f707ee 100644
--- a/test/SemaCXX/microsoft-dtor-lookup.cpp
+++ b/test/SemaCXX/microsoft-dtor-lookup.cpp
@@ -1,12 +1,11 @@
-// RUN: %clang_cc1 -triple i686-pc-win32 -cxx-abi itanium -fsyntax-only %s
-// RUN: %clang_cc1 -triple i686-pc-win32 -cxx-abi microsoft -verify -DMSVC_ABI %s
+// RUN: %clang_cc1 -fexceptions -fcxx-exceptions -std=c++11 -triple %itanium_abi_triple -fsyntax-only %s
+// RUN: %clang_cc1 -fexceptions -fcxx-exceptions -std=c++11 -triple %ms_abi_triple -verify %s
namespace Test1 {
// Should be accepted under the Itanium ABI (first RUN line) but rejected
// under the Microsoft ABI (second RUN line), as Microsoft ABI requires
-// operator delete() lookups to be done at all virtual destructor declaration
-// points.
+// operator delete() lookups to be done when vtables are marked used.
struct A {
void operator delete(void *); // expected-note {{member found by ambiguous name lookup}}
@@ -24,6 +23,10 @@ struct VC : A, B {
virtual ~VC(); // expected-error {{member 'operator delete' found in multiple base classes of different types}}
};
+void f(VC vc) {
+ // This marks VC's vtable used.
+}
+
}
namespace Test2 {
@@ -32,14 +35,13 @@ namespace Test2 {
// requires a dtor for B, but we can't implicitly define it because ~A is
// private. bar should be able to call A's private dtor without error, even
// though MSVC rejects bar.
-
class A {
private:
- ~A(); // expected-note 2{{declared private here}}
+ ~A();
int a;
};
-struct B : public A { // expected-error {{base class 'Test2::A' has private destructor}}
+struct B : public A { // expected-note {{destructor of 'B' is implicitly deleted because base class 'Test2::A' has an inaccessible destructor}}
int b;
};
@@ -53,8 +55,8 @@ struct D {
C o;
};
-void foo(B b) { } // expected-note {{implicit destructor for 'Test2::B' first required here}}
-void bar(A a) { } // expected-error {{variable of type 'Test2::A' has private destructor}}
+void foo(B b) { } // expected-error {{attempt to use a deleted function}}
+void bar(A a) { } // no error; MSVC rejects this, but we skip the direct access check.
void baz(D d) { } // no error
}
@@ -64,13 +66,13 @@ namespace Test3 {
class A {
A();
- ~A(); // expected-note 2{{implicitly declared private here}}
+ ~A(); // expected-note {{implicitly declared private here}}
friend void bar(A);
int a;
};
void bar(A a) { }
-void baz(A a) { } // expected-error {{variable of type 'Test3::A' has private destructor}}
+void baz(A a) { } // no error; MSVC rejects this, but the standard allows it.
// MSVC accepts foo() but we reject it for consistency with Itanium. MSVC also
// rejects this if A has a copy ctor or if we call A's ctor.
@@ -85,3 +87,45 @@ namespace Test4 {
class A;
void foo(A a);
}
+
+#ifdef MSVC_ABI
+namespace Test5 {
+// Do the operator delete access control check from the context of the dtor.
+class A {
+ protected:
+ void operator delete(void *);
+};
+class B : public A {
+ virtual ~B();
+};
+B *test() {
+ // Previously, marking the vtable used here would do the operator delete
+ // lookup from this context, which doesn't have access.
+ return new B;
+}
+}
+#endif
+
+namespace Test6 {
+class A {
+protected:
+ void operator delete(void *);
+};
+class B : public A {
+ virtual ~B();
+public:
+ virtual void m_fn1();
+};
+void fn1(B *b) { b->m_fn1(); }
+}
+
+namespace Test7 {
+class A {
+protected:
+ void operator delete(void *);
+};
+struct B : public A {
+ virtual ~B();
+};
+void fn1(B b) {}
+}
diff --git a/test/SemaCXX/microsoft-new-delete.cpp b/test/SemaCXX/microsoft-new-delete.cpp
index e0d25dcd86f7..6c9be228935e 100644
--- a/test/SemaCXX/microsoft-new-delete.cpp
+++ b/test/SemaCXX/microsoft-new-delete.cpp
@@ -1,5 +1,4 @@
-// RUN: %clang_cc1 -fms-compatibility -fsyntax-only -verify %s
-// expected-no-diagnostics
+// RUN: %clang_cc1 -fms-compatibility -fsyntax-only -verify -std=c++11 %s
#include <stddef.h>
@@ -10,3 +9,26 @@ void f() {
// Expect no error in MSVC compatibility mode
int *p = new(arbitrary) int[4];
}
+
+class noncopyable { noncopyable(const noncopyable&); } extern nc; // expected-note {{here}}
+void *operator new[](size_t, noncopyable);
+void *operator new(size_t, const noncopyable&);
+void *q = new (nc) int[4]; // expected-error {{calling a private constructor}}
+
+struct bitfield { int n : 3; } bf; // expected-note {{here}}
+void *operator new[](size_t, int &);
+void *operator new(size_t, const int &);
+void *r = new (bf.n) int[4]; // expected-error {{non-const reference cannot bind to bit-field}}
+
+struct base {};
+struct derived : private base {} der; // expected-note {{here}}
+void *operator new[](size_t, base &);
+void *operator new(size_t, derived &);
+void *s = new (der) int[4]; // expected-error {{private}}
+
+struct explicit_ctor { explicit explicit_ctor(int); };
+struct explicit_ctor_tag {} ect;
+void *operator new[](size_t, explicit_ctor_tag, explicit_ctor);
+void *operator new(size_t, explicit_ctor_tag, int);
+void *t = new (ect, 0) int[4];
+void *u = new (ect, {0}) int[4];
diff --git a/test/SemaCXX/microsoft-varargs-diagnostics.cpp b/test/SemaCXX/microsoft-varargs-diagnostics.cpp
new file mode 100644
index 000000000000..0b76fdd92dab
--- /dev/null
+++ b/test/SemaCXX/microsoft-varargs-diagnostics.cpp
@@ -0,0 +1,42 @@
+// RUN: %clang_cc1 -triple thumbv7-windows -fms-compatibility -fsyntax-only %s -verify
+
+extern "C" {
+typedef char * va_list;
+}
+
+void test_no_arguments(int i, ...) {
+ __va_start(); // expected-error{{too few arguments to function call, expected at least 3, have 0}}
+}
+
+void test_one_argument(int i, ...) {
+ va_list ap;
+ __va_start(&ap); // expected-error{{too few arguments to function call, expected at least 3, have 1}}
+}
+
+void test_two_arguments(int i, ...) {
+ va_list ap;
+ __va_start(&ap, &i); // expected-error{{too few arguments to function call, expected at least 3, have 2}}
+}
+
+void test_non_last_argument(int i, int j, ...) {
+ va_list ap;
+ __va_start(&ap, &i, 4);
+ // expected-error@-1{{passing 'int *' to parameter of incompatible type 'const char *': type mismatch at 2nd parameter ('int *' vs 'const char *')}}
+ // expected-error@-2{{passing 'int' to parameter of incompatible type 'unsigned int': type mismatch at 3rd parameter ('int' vs 'unsigned int')}}
+}
+
+void test_stack_allocated(int i, ...) {
+ va_list ap;
+ int j;
+ __va_start(&ap, &j, 4);
+ // expected-error@-1{{passing 'int *' to parameter of incompatible type 'const char *': type mismatch at 2nd parameter ('int *' vs 'const char *')}}
+ // expected-error@-2{{passing 'int' to parameter of incompatible type 'unsigned int': type mismatch at 3rd parameter ('int' vs 'unsigned int')}}
+}
+
+void test_non_pointer_addressof(int i, ...) {
+ va_list ap;
+ __va_start(&ap, 1, 4);
+ // expected-error@-1{{passing 'int' to parameter of incompatible type 'const char *': type mismatch at 2nd parameter ('int' vs 'const char *')}}
+ // expected-error@-2{{passing 'int' to parameter of incompatible type 'unsigned int': type mismatch at 3rd parameter ('int' vs 'unsigned int')}}
+}
+
diff --git a/test/SemaCXX/microsoft-varargs.cpp b/test/SemaCXX/microsoft-varargs.cpp
new file mode 100644
index 000000000000..35f31a97c4f1
--- /dev/null
+++ b/test/SemaCXX/microsoft-varargs.cpp
@@ -0,0 +1,22 @@
+// RUN: %clang_cc1 -triple thumbv7-windows -fms-compatibility -fsyntax-only %s -verify
+// expected-no-diagnostics
+
+extern "C" {
+typedef char * va_list;
+void __va_start(va_list *, ...);
+}
+
+int test___va_start(int i, ...) {
+ va_list ap;
+ __va_start(&ap, ( &reinterpret_cast<const char &>(i) ),
+ ( (sizeof(i) + 4 - 1) & ~(4 - 1) ),
+ ( &reinterpret_cast<const char &>(i) ));
+ return (*(int *)((ap += ( (sizeof(int) + 4 - 1) & ~(4 - 1) ) + ( ((va_list)0 - (ap)) & (__alignof(int) - 1) )) - ( (sizeof(int) + 4 - 1) & ~(4 - 1) )));
+}
+
+int builtin(int i, ...) {
+ __builtin_va_list ap;
+ __builtin_va_start(ap, i);
+ return __builtin_va_arg(ap, int);
+}
+
diff --git a/test/SemaCXX/missing-members.cpp b/test/SemaCXX/missing-members.cpp
index 619bc61f2501..96bed074db85 100644
--- a/test/SemaCXX/missing-members.cpp
+++ b/test/SemaCXX/missing-members.cpp
@@ -1,7 +1,7 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
namespace A {
namespace B {
- class C { }; // expected-note 2 {{'A::B::C' declared here}}
+ class C { }; // expected-note {{'A::B::C' declared here}}
struct S { };
union U { };
}
@@ -18,13 +18,12 @@ namespace B {
}
void g() {
- A::B::D::E; // expected-error {{no member named 'D' in namespace 'A::B'}}
+ A::B::D::E; // expected-error-re {{no member named 'D' in namespace 'A::B'{{$}}}}
// FIXME: The typo corrections below should be suppressed since A::B::C
// doesn't have a member named D.
B::B::C::D; // expected-error {{no member named 'C' in 'B::B'; did you mean 'A::B::C'?}} \
- // expected-error {{no member named 'D' in 'A::B::C'}}
- ::C::D; // expected-error {{no member named 'C' in the global namespace; did you mean 'A::B::C'?}}\
- // expected-error {{no member named 'D' in 'A::B::C'}}
+ // expected-error-re {{no member named 'D' in 'A::B::C'{{$}}}}
+ ::C::D; // expected-error-re {{no member named 'C' in the global namespace{{$}}}}
}
int A::B::i = 10; // expected-error {{no member named 'i' in namespace 'A::B'}}
diff --git a/test/SemaCXX/ms-friend-lookup.cpp b/test/SemaCXX/ms-friend-lookup.cpp
new file mode 100644
index 000000000000..c63160f5b9f9
--- /dev/null
+++ b/test/SemaCXX/ms-friend-lookup.cpp
@@ -0,0 +1,104 @@
+// RUN: %clang_cc1 %s -triple i686-pc-win32 -std=c++11 -Wmicrosoft -fms-compatibility -verify
+// RUN: not %clang_cc1 %s -triple i686-pc-win32 -std=c++11 -Wmicrosoft -fms-compatibility -fdiagnostics-parseable-fixits 2>&1 | FileCheck %s
+
+struct X;
+namespace name_at_tu_scope {
+struct Y {
+ friend struct X; // expected-warning-re {{unqualified friend declaration {{.*}} is a Microsoft extension}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:17-[[@LINE-1]]:17}:"::"
+};
+}
+
+namespace enclosing_friend_decl {
+struct B;
+namespace ns {
+struct A {
+ friend struct B; // expected-warning-re {{unqualified friend declaration {{.*}} is a Microsoft extension}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:17-[[@LINE-1]]:17}:"enclosing_friend_decl::"
+protected:
+ A();
+};
+}
+struct B {
+ static void f() { ns::A x; }
+};
+}
+
+namespace enclosing_friend_qualified {
+struct B;
+namespace ns {
+struct A {
+ friend struct enclosing_friend_qualified::B; // Adding name specifiers fixes it.
+protected:
+ A();
+};
+}
+struct B {
+ static void f() { ns::A x; }
+};
+}
+
+namespace enclosing_friend_no_tag {
+struct B;
+namespace ns {
+struct A {
+ friend B; // Removing the tag decl fixes it.
+protected:
+ A();
+};
+}
+struct B {
+ static void f() { ns::A x; }
+};
+}
+
+namespace enclosing_friend_func {
+void f();
+namespace ns {
+struct A {
+ // Amusingly, in MSVC, this declares ns::f(), and doesn't find the outer f().
+ friend void f();
+protected:
+ A(); // expected-note {{declared protected here}}
+};
+}
+void f() { ns::A x; } // expected-error {{calling a protected constructor of class 'enclosing_friend_func::ns::A'}}
+}
+
+namespace test_nns_fixit_hint {
+namespace name1 {
+namespace name2 {
+struct X;
+struct name2;
+namespace name3 {
+struct Y {
+ friend struct X; // expected-warning-re {{unqualified friend declaration {{.*}} is a Microsoft extension}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:17-[[@LINE-1]]:17}:"name1::name2::"
+};
+}
+}
+}
+}
+
+// A friend declaration injects a forward declaration into the nearest enclosing
+// non-member scope.
+namespace friend_as_a_forward_decl {
+
+class A {
+ class Nested {
+ friend class B;
+ B *b;
+ };
+ B *b;
+};
+B *global_b;
+
+void f() {
+ class Local {
+ friend class Z;
+ Z *b;
+ };
+ Z *b;
+}
+
+}
diff --git a/test/SemaCXX/ms-interface.cpp b/test/SemaCXX/ms-interface.cpp
index 3625f7027aa4..e7386ce5b8e7 100644
--- a/test/SemaCXX/ms-interface.cpp
+++ b/test/SemaCXX/ms-interface.cpp
@@ -10,7 +10,7 @@ __interface I1 {
bool operator!();
// expected-error@+1 {{operator 'operator int' is not permitted within an interface type}}
operator int();
- // expected-error@+1 {{nested class I1::<anonymous> is not permitted within an interface type}}
+ // expected-error@+1 {{nested class I1::(anonymous) is not permitted within an interface type}}
struct { int a; };
void fn2() {
struct A { }; // should be ignored: not a nested class
diff --git a/test/SemaCXX/ms_integer_suffix.cpp b/test/SemaCXX/ms_integer_suffix.cpp
new file mode 100644
index 000000000000..6b4594dd5b55
--- /dev/null
+++ b/test/SemaCXX/ms_integer_suffix.cpp
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -std=c++11 -fsyntax-only -fms-extensions -verify %s
+// expected-no-diagnostics
+
+#ifdef __SIZEOF_INT8__
+static_assert(sizeof(0i8) == __SIZEOF_INT8__, "");
+#endif
+#ifdef __SIZEOF_INT16__
+static_assert(sizeof(0i16) == __SIZEOF_INT16__, "");
+#endif
+#ifdef __SIZEOF_INT32__
+static_assert(sizeof(0i32) == __SIZEOF_INT32__, "");
+#endif
+#ifdef __SIZEOF_INT64__
+static_assert(sizeof(0i64) == __SIZEOF_INT64__, "");
+#endif
+#ifdef __SIZEOF_INT128__
+static_assert(sizeof(0i128) == __SIZEOF_INT128__, "");
+#endif
diff --git a/test/SemaCXX/ms_struct.cpp b/test/SemaCXX/ms_struct.cpp
index 37fa9a7c687c..2832b5620f3b 100644
--- a/test/SemaCXX/ms_struct.cpp
+++ b/test/SemaCXX/ms_struct.cpp
@@ -1,5 +1,6 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -triple i686-apple-darwin9 -std=c++11 %s
-// expected-no-diagnostics
+// RUN: %clang_cc1 -fsyntax-only -Wno-error=incompatible-ms-struct -verify -triple i686-apple-darwin9 -std=c++11 %s
+// RUN: %clang_cc1 -fsyntax-only -Wno-error=incompatible-ms-struct -verify -triple armv7-apple-darwin9 -std=c++11 %s
+// RUN: %clang_cc1 -fsyntax-only -DTEST_FOR_ERROR -verify -triple armv7-apple-darwin9 -std=c++11 %s
#pragma ms_struct on
@@ -9,10 +10,29 @@ struct A {
};
struct B : public A {
+#ifdef TEST_FOR_ERROR
+ // expected-error@-2 {{ms_struct may not produce MSVC-compatible layouts for classes with base classes or virtual functions}}
+#else
+ // expected-warning@-4 {{ms_struct may not produce MSVC-compatible layouts for classes with base classes or virtual functions}}
+#endif
unsigned long c:16;
int d;
B();
};
static_assert(__builtin_offsetof(B, d) == 12,
- "We can't allocate the bitfield into the padding under ms_struct"); \ No newline at end of file
+ "We can't allocate the bitfield into the padding under ms_struct");
+
+// rdar://16178895
+struct C {
+#ifdef TEST_FOR_ERROR
+ // expected-error@-2 {{ms_struct may not produce MSVC-compatible layouts for classes with base classes or virtual functions}}
+#else
+ // expected-warning@-4 {{ms_struct may not produce MSVC-compatible layouts for classes with base classes or virtual functions}}
+#endif
+ virtual void foo();
+ long long n;
+};
+
+static_assert(__builtin_offsetof(C, n) == 8,
+ "long long field in ms_struct should be 8-byte aligned");
diff --git a/test/SemaCXX/nested-name-spec.cpp b/test/SemaCXX/nested-name-spec.cpp
index df4f1b269d70..bdeb00d35734 100644
--- a/test/SemaCXX/nested-name-spec.cpp
+++ b/test/SemaCXX/nested-name-spec.cpp
@@ -8,13 +8,12 @@ namespace A {
static int Ag1();
static int Ag2();
};
- int ax;
+ int ax; // expected-note {{'ax' declared here}}
void Af();
}
A:: ; // expected-error {{expected unqualified-id}}
-// FIXME: there is a member 'ax'; it's just not a class.
-::A::ax::undef ex3; // expected-error {{no member named 'ax'}}
+::A::ax::undef ex3; // expected-error {{'ax' is not a class, namespace, or scoped enumeration}}
A::undef1::undef2 ex4; // expected-error {{no member named 'undef1'}}
int A::C::Ag1() { return 0; }
@@ -85,10 +84,13 @@ struct A2::CC::NC {
void f3() {
N::x = 0; // expected-error {{use of undeclared identifier 'N'}}
- int N;
- N::x = 0; // expected-error {{expected a class or namespace}}
+ // FIXME: Consider including the kind of entity that 'N' is ("variable 'N'
+ // declared here", "template 'X' declared here", etc) to help explain what it
+ // is if it's 'not a class, namespace, or scoped enumeration'.
+ int N; // expected-note {{'N' declared here}}
+ N::x = 0; // expected-error {{'N' is not a class, namespace, or scoped enumeration}}
{ int A; A::ax = 0; }
- { typedef int A; A::ax = 0; } // expected-error{{expected a class or namespace}}
+ { typedef int A; A::ax = 0; } // expected-error{{'A' (aka 'int') is not a class, namespace, or scoped enumeration}}
{ typedef A::C A; A::ax = 0; } // expected-error {{no member named 'ax'}}
{ typedef A::C A; A::cx = 0; }
}
@@ -114,7 +116,7 @@ namespace E {
};
void f() {
- return E::X; // expected-error{{expected a class or namespace}}
+ return E::X; // expected-error{{'E::Nested::E' is not a class, namespace, or scoped enumeration}}
}
}
}
@@ -143,7 +145,7 @@ namespace A {
void g(int&); // expected-note{{type of 1st parameter of member declaration does not match definition ('int &' vs 'const int &')}}
}
-void A::f() {} // expected-error-re{{out-of-line definition of 'f' does not match any declaration in namespace 'A'$}}
+void A::f() {} // expected-error-re{{out-of-line definition of 'f' does not match any declaration in namespace 'A'{{$}}}}
void A::g(const int&) { } // expected-error{{out-of-line definition of 'g' does not match any declaration in namespace 'A'}}
@@ -160,7 +162,7 @@ namespace N {
void f();
// FIXME: if we move this to a separate definition of N, things break!
}
-void ::global_func2(int) { } // expected-error{{extra qualification on member 'global_func2'}}
+void ::global_func2(int) { } // expected-warning{{extra qualification on member 'global_func2'}}
void N::f() { } // okay
@@ -308,4 +310,103 @@ namespace N {
}
namespace TypedefNamespace { typedef int F; };
-TypedefNamespace::F::NonexistentName BadNNSWithCXXScopeSpec; // expected-error {{expected a class or namespace}}
+TypedefNamespace::F::NonexistentName BadNNSWithCXXScopeSpec; // expected-error {{'F' (aka 'int') is not a class, namespace, or scoped enumeration}}
+
+namespace PR18587 {
+
+struct C1 {
+ int a, b, c;
+ typedef int C2;
+ struct B1 {
+ struct B2 {
+ int a, b, c;
+ };
+ };
+};
+struct C2 { static const unsigned N1 = 1; };
+struct B1 {
+ enum E1 { B2 = 2 };
+ static const int B3 = 3;
+};
+const int N1 = 2;
+
+// Function declarators
+struct S1a { int f(C1::C2); };
+struct S1b { int f(C1:C2); }; // expected-error{{unexpected ':' in nested name specifier; did you mean '::'?}}
+
+struct S2a {
+ C1::C2 f(C1::C2);
+};
+struct S2c {
+ C1::C2 f(C1:C2); // expected-error{{unexpected ':' in nested name specifier; did you mean '::'?}}
+};
+
+struct S3a {
+ int f(C1::C2), C2 : N1;
+ int g : B1::B2;
+};
+struct S3b {
+ int g : B1:B2; // expected-error{{unexpected ':' in nested name specifier; did you mean '::'?}}
+};
+
+// Inside square brackets
+struct S4a {
+ int f[C2::N1];
+};
+struct S4b {
+ int f[C2:N1]; // expected-error{{unexpected ':' in nested name specifier; did you mean '::'?}}
+};
+
+struct S5a {
+ int f(int xx[B1::B3 ? C2::N1 : B1::B2]);
+};
+struct S5b {
+ int f(int xx[B1::B3 ? C2::N1 : B1:B2]); // expected-error{{unexpected ':' in nested name specifier; did you mean '::'?}}
+};
+struct S5c {
+ int f(int xx[B1:B3 ? C2::N1 : B1::B2]); // expected-error{{unexpected ':' in nested name specifier; did you mean '::'?}}
+};
+
+// Bit fields
+struct S6a {
+ C1::C2 m1 : B1::B2;
+};
+struct S6c {
+ C1::C2 m1 : B1:B2; // expected-error{{unexpected ':' in nested name specifier; did you mean '::'?}}
+};
+struct S6d {
+ int C2:N1;
+};
+struct S6e {
+ static const int N = 3;
+ B1::E1 : N;
+};
+struct S6g {
+ C1::C2 : B1:B2; // expected-error{{unexpected ':' in nested name specifier; did you mean '::'?}}
+ B1::E1 : B1:B2; // expected-error{{unexpected ':' in nested name specifier; did you mean '::'?}}
+};
+
+// Template parameters
+template <int N> struct T1 {
+ int a,b,c;
+ static const unsigned N1 = N;
+ typedef unsigned C1;
+};
+T1<C2::N1> var_1a;
+T1<C2:N1> var_1b; // expected-error{{unexpected ':' in nested name specifier; did you mean '::'?}}
+template<int N> int F() {}
+int (*X1)() = (B1::B2 ? F<1> : F<2>);
+int (*X2)() = (B1:B2 ? F<1> : F<2>); // expected-error{{unexpected ':' in nested name specifier; did you mean '::'?}}
+
+// Bit fields + templates
+struct S7a {
+ T1<B1::B2>::C1 m1 : T1<B1::B2>::N1;
+};
+struct S7b {
+ T1<B1:B2>::C1 m1 : T1<B1::B2>::N1; // expected-error{{unexpected ':' in nested name specifier; did you mean '::'?}}
+};
+struct S7c {
+ T1<B1::B2>::C1 m1 : T1<B1:B2>::N1; // expected-error{{unexpected ':' in nested name specifier; did you mean '::'?}}
+};
+
+}
diff --git a/test/SemaCXX/new-delete-cxx0x.cpp b/test/SemaCXX/new-delete-cxx0x.cpp
index c404faba2a25..899cb4cda87a 100644
--- a/test/SemaCXX/new-delete-cxx0x.cpp
+++ b/test/SemaCXX/new-delete-cxx0x.cpp
@@ -2,8 +2,8 @@
void ugly_news(int *ip) {
// These are ill-formed according to one reading of C++98, and at the least
- // have undefined behavior. But they're well-formed, and defined to throw
- // std::bad_array_new_length, in C++11.
+ // have undefined behavior.
+ // FIXME: They're ill-formed in C++11.
(void)new int[-1]; // expected-warning {{array size is negative}}
(void)new int[2000000000]; // expected-warning {{array is too large}}
}
@@ -22,5 +22,12 @@ struct T { // expected-note 2 {{not viable}}
void fn() {
(void) new int[2] {1, 2};
(void) new S[2] {1, 2};
- (void) new T[2] {1, 2}; // expected-error {{no matching constructor}}
+ // C++11 [expr.new]p19:
+ // If the new-expression creates an object or an array of objects of class
+ // type, access and ambiguity control are done for the allocation function,
+ // the deallocation function (12.5), and the constructor (12.1).
+ //
+ // Note that this happens even if the array bound is constant and the
+ // initializer initializes every array element.
+ (void) new T[2] {1, 2}; // expected-error {{no matching constructor}} expected-note {{in implicit initialization of array element 2}}
}
diff --git a/test/SemaCXX/new-delete.cpp b/test/SemaCXX/new-delete.cpp
index 7facd10ca5fc..cb43458d4578 100644
--- a/test/SemaCXX/new-delete.cpp
+++ b/test/SemaCXX/new-delete.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s -triple=i686-pc-linux-gnu
+// RUN: %clang_cc1 -fsyntax-only -verify %s -triple=i686-pc-linux-gnu -Wno-new-returns-null
#include <stddef.h>
@@ -517,3 +517,10 @@ class DeletingPlaceholder {
return 0;
}
};
+
+namespace PR18544 {
+ inline void *operator new(size_t); // expected-error {{'operator new' cannot be declared inside a namespace}}
+}
+
+// PR19968
+inline void* operator new(); // expected-error {{'operator new' must have at least one parameter}}
diff --git a/test/SemaCXX/new-null.cpp b/test/SemaCXX/new-null.cpp
new file mode 100644
index 000000000000..b2be0c5b382f
--- /dev/null
+++ b/test/SemaCXX/new-null.cpp
@@ -0,0 +1,63 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++98
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
+
+typedef __SIZE_TYPE__ size_t;
+
+#if __cplusplus >= 201103L
+struct S1 {
+ void *operator new(size_t n) {
+ return nullptr; // expected-warning {{'operator new' should not return a null pointer unless it is declared 'throw()' or 'noexcept'}}
+ }
+ void *operator new[](size_t n) noexcept {
+ return __null;
+ }
+};
+#endif
+
+struct S2 {
+ static size_t x;
+ void *operator new(size_t n) throw() {
+ return 0;
+ }
+ void *operator new[](size_t n) {
+ return (void*)0;
+#if __cplusplus >= 201103L
+ // expected-warning@-2 {{'operator new[]' should not return a null pointer unless it is declared 'throw()' or 'noexcept'}}
+#else
+ // expected-warning-re@-4 {{'operator new[]' should not return a null pointer unless it is declared 'throw()'{{$}}}}
+#endif
+ }
+};
+
+struct S3 {
+ void *operator new(size_t n) {
+ return 1-1;
+#if __cplusplus >= 201103L
+ // expected-error@-2 {{cannot initialize return object of type 'void *' with an rvalue of type 'int'}}
+#else
+ // expected-warning@-4 {{expression which evaluates to zero treated as a null pointer constant of type 'void *'}}
+ // expected-warning@-5 {{'operator new' should not return a null pointer unless it is declared 'throw()'}}
+#endif
+ }
+ void *operator new[](size_t n) {
+ return (void*)(1-1); // expected-warning {{'operator new[]' should not return a null pointer unless it is declared 'throw()'}}
+ }
+};
+
+#if __cplusplus >= 201103L
+template<bool B> struct S4 {
+ void *operator new(size_t n) noexcept(B) {
+ return 0; // expected-warning {{'operator new' should not return a null pointer}}
+ }
+};
+template struct S4<true>;
+template struct S4<false>; // expected-note {{in instantiation of}}
+#endif
+
+template<typename ...T> struct S5 { // expected-warning 0-1{{extension}}
+ void *operator new(size_t n) throw(T...) {
+ return 0; // expected-warning {{'operator new' should not return a null pointer}}
+ }
+};
+template struct S5<>;
+template struct S5<int>; // expected-note {{in instantiation of}}
diff --git a/test/SemaCXX/nonnull.cpp b/test/SemaCXX/nonnull.cpp
new file mode 100644
index 000000000000..9ff6d115bd16
--- /dev/null
+++ b/test/SemaCXX/nonnull.cpp
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+template<int I>
+struct TS {
+ __attribute__((returns_nonnull))
+ void *value_dependent(void) {
+ return I; // no-warning
+ }
+
+ __attribute__((returns_nonnull))
+ void *value_independent(void) {
+ return 0; // expected-warning {{null returned from function that requires a non-null return value}}
+ }
+};
+
diff --git a/test/SemaCXX/ns_returns_retained_block_return.cpp b/test/SemaCXX/ns_returns_retained_block_return.cpp
new file mode 100644
index 000000000000..9d04536e0f1b
--- /dev/null
+++ b/test/SemaCXX/ns_returns_retained_block_return.cpp
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -fblocks -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fblocks -fobjc-arc -fsyntax-only -verify %s
+// expected-no-diagnostics
+// rdar://17259812
+
+typedef void (^BT) ();
+
+class S {
+ BT br() __attribute__((ns_returns_retained)) {
+ return ^{};
+ }
+ BT br1() __attribute__((ns_returns_retained));
+};
+
+BT S::br1() {
+ return ^{};
+}
diff --git a/test/SemaCXX/null_in_arithmetic_ops.cpp b/test/SemaCXX/null_in_arithmetic_ops.cpp
index a919213fb208..3b42ab44feb9 100644
--- a/test/SemaCXX/null_in_arithmetic_ops.cpp
+++ b/test/SemaCXX/null_in_arithmetic_ops.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -fblocks -Wnull-arithmetic -verify -Wno-string-plus-int %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fsyntax-only -fblocks -Wnull-arithmetic -verify -Wno-string-plus-int -Wno-tautological-pointer-compare %s
#include <stddef.h>
void f() {
diff --git a/test/SemaCXX/nullptr_in_arithmetic_ops.cpp b/test/SemaCXX/nullptr_in_arithmetic_ops.cpp
index 9671353907c7..60b4670b3a5e 100644
--- a/test/SemaCXX/nullptr_in_arithmetic_ops.cpp
+++ b/test/SemaCXX/nullptr_in_arithmetic_ops.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -fblocks -std=c++11 -verify %s
+// RUN: %clang_cc1 -fsyntax-only -Wno-tautological-pointer-compare -fblocks -std=c++11 -verify %s
void foo() {
int a;
diff --git a/test/SemaCXX/old-style-cast.cpp b/test/SemaCXX/old-style-cast.cpp
new file mode 100644
index 000000000000..73a78e40ac35
--- /dev/null
+++ b/test/SemaCXX/old-style-cast.cpp
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -fsyntax-only -verify -Wold-style-cast %s
+
+void test1() {
+ long x = (long)12; // expected-warning {{use of old-style cast}}
+ (long)x; // expected-warning {{use of old-style cast}} expected-warning {{expression result unused}}
+ (void**)x; // expected-warning {{use of old-style cast}} expected-warning {{expression result unused}}
+ long y = static_cast<long>(12);
+ (void)y;
+ typedef void VOID;
+ (VOID)y;
+}
diff --git a/test/SemaCXX/operator-arrow-depth.cpp b/test/SemaCXX/operator-arrow-depth.cpp
index 3e2ba8e45228..769dae0d2461 100644
--- a/test/SemaCXX/operator-arrow-depth.cpp
+++ b/test/SemaCXX/operator-arrow-depth.cpp
@@ -9,7 +9,7 @@ template<int N> struct A {
template<int N> struct B {
A<N-1> operator->(); // expected-note +{{'operator->' declared here produces an object of type 'A<}}
#if MAX != 2
- // expected-note-re@-2 {{(skipping (120|2) 'operator->'s in backtrace)}}
+ // expected-note-re@-2 {{(skipping {{120|2}} 'operator->'s in backtrace)}}
#endif
};
@@ -22,5 +22,5 @@ A<MAX/2> good;
int n = good->n;
B<MAX/2 + 1> bad;
-int m = bad->n; // expected-error-re {{use of 'operator->' on type 'B<(2|10|128) / 2 \+ 1>' would invoke a sequence of more than (2|10|128) 'operator->' calls}}
+int m = bad->n; // expected-error-re {{use of 'operator->' on type 'B<{{2|10|128}} / 2 + 1>' would invoke a sequence of more than {{2|10|128}} 'operator->' calls}}
// expected-note@-1 {{use -foperator-arrow-depth=N to increase 'operator->' limit}}
diff --git a/test/SemaCXX/overload-0x.cpp b/test/SemaCXX/overload-0x.cpp
index 677d16a32c12..1c185a5725bd 100644
--- a/test/SemaCXX/overload-0x.cpp
+++ b/test/SemaCXX/overload-0x.cpp
@@ -1,7 +1,11 @@
-// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
+// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
namespace test0 {
- struct A { // expected-note {{candidate function (the implicit copy assignment operator) not viable: 'this' argument has type 'const test0::A', but method is not marked const}} expected-note {{candidate function (the implicit move assignment operator) not viable: 'this' argument has type 'const test0::A', but method is not marked const}}
+ struct A { // expected-note {{candidate function (the implicit copy assignment operator) not viable: 'this' argument has type 'const test0::A', but method is not marked const}}
+#if __cplusplus >= 201103L
+ // expected-note@-2 {{candidate function (the implicit move assignment operator) not viable: 'this' argument has type 'const test0::A', but method is not marked const}}
+#endif
A &operator=(void*); // expected-note {{candidate function not viable: 'this' argument has type 'const test0::A', but method is not marked const}}
};
@@ -9,3 +13,79 @@ namespace test0 {
a = "help"; // expected-error {{no viable overloaded '='}}
}
}
+
+namespace PR16314 {
+ void f(char*);
+ int &f(...);
+ void x()
+ {
+ int &n = f("foo");
+#if __cplusplus < 201103L
+ // expected-warning@-2 {{conversion from string literal to 'char *' is deprecated}}
+ // expected-error@-3 {{non-const lvalue reference to type 'int' cannot bind to a temporary of type 'void'}}
+#endif
+ }
+}
+
+namespace warn_if_best {
+ int f(char *);
+ void f(double);
+ void x()
+ {
+ int n = f("foo");
+#if __cplusplus < 201103L
+ // expected-warning@-2 {{conversion from string literal to 'char *' is deprecated}}
+#else
+ // expected-warning@-4 {{ISO C++11 does not allow conversion from string literal to 'char *'}}
+#endif
+ }
+}
+
+namespace userdefined_vs_illformed {
+ struct X { X(const char *); };
+
+ void *f(char *p); // best for C++03
+ double f(X x); // best for C++11
+ void g()
+ {
+ double d = f("foo");
+#if __cplusplus < 201103L
+ // expected-warning@-2 {{conversion from string literal to 'char *' is deprecated}}
+ // expected-error@-3 {{cannot initialize a variable of type 'double' with an rvalue of type 'void *'}}
+#endif
+ }
+}
+
+namespace sfinae_test {
+ int f(int, char*);
+
+ template<int T>
+ struct S { typedef int type; };
+
+ template<>
+ struct S<sizeof(int)> { typedef void type; };
+
+ // C++11: SFINAE failure
+ // C++03: ok
+ template<typename T> int cxx11_ignored(T, typename S<sizeof(f(T(), "foo"))>::type *);
+#if __cplusplus < 201103L
+ // expected-warning@-2 {{conversion from string literal to 'char *' is deprecated}}
+#else
+ // expected-note@-4 {{candidate template ignored: substitution failure}}
+#endif
+
+ // C++11: better than latter
+ // C++03: worse than latter
+ template<typename T> void g(T, ...);
+ template<typename T> int g(T, typename S<sizeof(f(T(), "foo"))>::type *);
+#if __cplusplus < 201103L
+ // expected-warning@-2 {{conversion from string literal to 'char *' is deprecated}}
+#endif
+
+ int a = cxx11_ignored(0, 0);
+ int b = g(0, 0);
+#if __cplusplus >= 201103L
+ // expected-error@-3 {{no matching function for call to 'cxx11_ignored'}}
+ // expected-error@-3 {{cannot initialize a variable of type 'int' with an rvalue of type 'void'}}
+#endif
+}
diff --git a/test/SemaCXX/overload-call.cpp b/test/SemaCXX/overload-call.cpp
index 615b10a43971..19ce14481f8e 100644
--- a/test/SemaCXX/overload-call.cpp
+++ b/test/SemaCXX/overload-call.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s
+// RUN: %clang_cc1 -pedantic -verify %s
int* f(int) { return 0; }
float* f(float) { return 0; }
void f();
@@ -580,3 +580,31 @@ namespace PR12931 {
void f(const volatile int &, int);
void g() { f(0, 0); }
}
+
+void test5() {
+ struct {
+ typedef void F1(int);
+ typedef void F2(double);
+ operator F1*(); // expected-note{{conversion candidate}}
+ operator F2*(); // expected-note{{conversion candidate}}
+ } callable;
+ callable(); // expected-error{{no matching function for call}}
+}
+
+namespace PR20218 {
+ void f(void (*const &)()); // expected-note 2{{candidate}}
+ void f(void (&&)()) = delete; // expected-note 2{{candidate}} expected-warning 2{{extension}}
+ void g(void (&&)()) = delete; // expected-note 2{{candidate}} expected-warning 2{{extension}}
+ void g(void (*const &)()); // expected-note 2{{candidate}}
+
+ void x();
+ typedef void (&fr)();
+ struct Y { operator fr(); } y;
+
+ void h() {
+ f(x); // expected-error {{ambiguous}}
+ g(x); // expected-error {{ambiguous}}
+ f(y); // expected-error {{ambiguous}}
+ g(y); // expected-error {{ambiguous}}
+ }
+}
diff --git a/test/SemaCXX/overloaded-operator.cpp b/test/SemaCXX/overloaded-operator.cpp
index 99105cb5b60b..feb7c716ff00 100644
--- a/test/SemaCXX/overloaded-operator.cpp
+++ b/test/SemaCXX/overloaded-operator.cpp
@@ -452,3 +452,70 @@ namespace PR7681 {
Result = 1; // expected-error {{no viable overloaded '='}} // expected-note {{type 'PointerUnion<int *, float *>' is incomplete}}
}
}
+
+namespace PR14995 {
+ struct B {};
+ template<typename ...T> void operator++(B, T...) {}
+
+ void f() {
+ B b;
+ b++; // ok
+ ++b; // ok
+ }
+
+ template<typename... T>
+ struct C {
+ void operator-- (T...) {}
+ };
+
+ void g() {
+ C<int> postfix;
+ C<> prefix;
+ postfix--; // ok
+ --prefix; // ok
+ }
+
+ struct D {};
+ template<typename T> void operator++(D, T) {}
+
+ void h() {
+ D d;
+ d++; // ok
+ ++d; // expected-error{{cannot increment value of type 'PR14995::D'}}
+ }
+
+ template<typename...T> struct E {
+ void operator++(T...) {} // expected-error{{parameter of overloaded post-increment operator must have type 'int' (not 'char')}}
+ };
+
+ E<char> e; // expected-note {{in instantiation of template class 'PR14995::E<char>' requested here}}
+
+ struct F {
+ template<typename... T>
+ int operator++ (T...) {}
+ };
+
+ int k1 = F().operator++(0, 0);
+ int k2 = F().operator++('0');
+ // expected-error@-5 {{overloaded 'operator++' must be a unary or binary operator}}
+ // expected-note@-3 {{in instantiation of function template specialization 'PR14995::F::operator++<int, int>' requested here}}
+ // expected-error@-4 {{no matching member function for call to 'operator++'}}
+ // expected-note@-8 {{candidate template ignored: substitution failure}}
+ // expected-error@-9 {{parameter of overloaded post-increment operator must have type 'int' (not 'char')}}
+ // expected-note@-6 {{in instantiation of function template specialization 'PR14995::F::operator++<char>' requested here}}
+ // expected-error@-7 {{no matching member function for call to 'operator++'}}
+ // expected-note@-12 {{candidate template ignored: substitution failure}}
+} // namespace PR14995
+
+namespace ConversionVersusTemplateOrdering {
+ struct A {
+ operator short() = delete;
+ template <typename T> operator T();
+ } a;
+ struct B {
+ template <typename T> operator T();
+ operator short() = delete;
+ } b;
+ int x = a;
+ int y = b;
+}
diff --git a/test/SemaCXX/pr13394-crash-on-invalid.cpp b/test/SemaCXX/pr13394-crash-on-invalid.cpp
index 841e3c203402..304ee92f6a8d 100644
--- a/test/SemaCXX/pr13394-crash-on-invalid.cpp
+++ b/test/SemaCXX/pr13394-crash-on-invalid.cpp
@@ -8,12 +8,12 @@ namespace stretch_v1 {
}
namespace gatekeeper_v1 {
namespace gatekeeper_factory_v1 {
- struct closure_t { // expected-note {{'closure_t' declared here}}
+ struct closure_t { // expected-note {{'closure_t' declared here}} expected-note {{'gatekeeper_factory_v1::closure_t' declared here}}
gatekeeper_v1::closure_t* create(); // expected-error {{no type named 'closure_t' in namespace 'gatekeeper_v1'; did you mean simply 'closure_t'?}}
};
}
// FIXME: Typo correction should remove the 'gatekeeper_v1::' name specifier
- gatekeeper_v1::closure_t *x; // expected-error-re {{no type named 'closure_t' in namespace 'gatekeeper_v1'$}}
+ gatekeeper_v1::closure_t *x; // expected-error {{no type named 'closure_t' in namespace 'gatekeeper_v1'; did you mean 'gatekeeper_factory_v1::closure_t'}}
}
namespace Foo {
diff --git a/test/SemaCXX/pr18284-crash-on-invalid.cpp b/test/SemaCXX/pr18284-crash-on-invalid.cpp
new file mode 100644
index 000000000000..5b1cb21f4bb6
--- /dev/null
+++ b/test/SemaCXX/pr18284-crash-on-invalid.cpp
@@ -0,0 +1,24 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// Don't crash (PR18284).
+
+namespace n1 {
+class A { };
+class C { A a; };
+
+A::RunTest() {} // expected-error {{C++ requires a type specifier for all declarations}}
+
+void f() {
+ new C;
+}
+} // namespace n1
+
+namespace n2 {
+class A { };
+class C : public A { };
+
+A::RunTest() {} // expected-error {{C++ requires a type specifier for all declarations}}
+
+void f() {
+ new C;
+}
+} // namespace n2
diff --git a/test/SemaCXX/pr9812.c b/test/SemaCXX/pr9812.c
new file mode 100644
index 000000000000..cbbe44ba7ca0
--- /dev/null
+++ b/test/SemaCXX/pr9812.c
@@ -0,0 +1,21 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+#define bool _Bool
+int test1(int argc, char** argv)
+{
+ bool signed; // expected-error {{'bool' cannot be signed or unsigned}} expected-warning {{declaration does not declare anything}}
+
+ return 0;
+}
+#undef bool
+
+typedef int bool;
+
+int test2(int argc, char** argv)
+{
+ bool signed; // expected-error {{'type-name' cannot be signed or unsigned}} expected-warning {{declaration does not declare anything}}
+ _Bool signed; // expected-error {{'_Bool' cannot be signed or unsigned}} expected-warning {{declaration does not declare anything}}
+
+ return 0;
+}
+
diff --git a/test/SemaCXX/pr9812.cpp b/test/SemaCXX/pr9812.cpp
new file mode 100644
index 000000000000..2cd0bede0201
--- /dev/null
+++ b/test/SemaCXX/pr9812.cpp
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+int test(int, char**)
+{
+ bool signed; // expected-error {{'bool' cannot be signed or unsigned}} expected-warning {{declaration does not declare anything}}
+
+ return 0;
+}
+
diff --git a/test/SemaCXX/pragma-init_seg.cpp b/test/SemaCXX/pragma-init_seg.cpp
new file mode 100644
index 000000000000..e18d0e6814af
--- /dev/null
+++ b/test/SemaCXX/pragma-init_seg.cpp
@@ -0,0 +1,21 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions %s -triple x86_64-pc-win32
+// RUN: %clang_cc1 -fsyntax-only -verify -fms-extensions %s -triple i386-apple-darwin13.3.0
+
+#ifndef __APPLE__
+#pragma init_seg(L".my_seg") // expected-warning {{expected 'compiler', 'lib', 'user', or a string literal}}
+#pragma init_seg( // expected-warning {{expected 'compiler', 'lib', 'user', or a string literal}}
+#pragma init_seg asdf // expected-warning {{missing '('}}
+#pragma init_seg) // expected-warning {{missing '('}}
+#pragma init_seg("a" "b") // no warning
+#pragma init_seg("a", "b") // expected-warning {{missing ')'}}
+#pragma init_seg("a") asdf // expected-warning {{extra tokens at end of '#pragma init_seg'}}
+#pragma init_seg("\x") // expected-error {{\x used with no following hex digits}}
+#pragma init_seg("a" L"b") // expected-warning {{expected non-wide string literal in '#pragma init_seg'}}
+
+#pragma init_seg(compiler)
+#else
+#pragma init_seg(compiler) // expected-warning {{'#pragma init_seg' is only supported when targeting a Microsoft environment}}
+#endif
+
+int f();
+int __declspec(thread) x = f(); // expected-error {{initializer for thread-local variable must be a constant expression}}
diff --git a/test/SemaCXX/pragma-optimize.cpp b/test/SemaCXX/pragma-optimize.cpp
new file mode 100644
index 000000000000..0f03b81f5fff
--- /dev/null
+++ b/test/SemaCXX/pragma-optimize.cpp
@@ -0,0 +1,113 @@
+// RUN: %clang_cc1 -x c++ -std=c++11 -triple x86_64-unknown-linux -emit-llvm -O2 < %s | FileCheck %s
+
+#pragma clang optimize off
+
+// This is a macro definition and therefore its text is not present after
+// preprocessing. The pragma has no effect here.
+#define CREATE_FUNC(name) \
+int name (int param) { \
+ return param; \
+} \
+
+// This is a declaration and therefore it is not decorated with `optnone`.
+extern int foo(int a, int b);
+// CHECK-DAG: @_Z3fooii{{.*}} [[ATTRFOO:#[0-9]+]]
+
+// This is a definition and therefore it will be decorated with `optnone`.
+int bar(int x, int y) {
+ for(int i = 0; i < x; ++i)
+ y += x;
+ return y + foo(x, y);
+}
+// CHECK-DAG: @_Z3barii{{.*}} [[ATTRBAR:#[0-9]+]]
+
+// The function "int created (int param)" created by the macro invocation
+// is also decorated with the `optnone` attribute because it is within a
+// region of code affected by the functionality (not because of the position
+// of the macro definition).
+CREATE_FUNC (created)
+// CHECK-DAG: @_Z7createdi{{.*}} [[ATTRCREATED:#[0-9]+]]
+
+class MyClass {
+ public:
+ // The declaration of the method is not decorated with `optnone`.
+ int method(int blah);
+};
+
+// The definition of the method instead is decorated with `optnone`.
+int MyClass::method(int blah) {
+ return blah + 1;
+}
+// CHECK-DAG: @_ZN7MyClass6methodEi{{.*}} [[ATTRMETHOD:#[0-9]+]]
+
+// A template declaration will not be decorated with `optnone`.
+template <typename T> T twice (T param);
+
+// The template definition will be decorated with the attribute `optnone`.
+template <typename T> T thrice (T param) {
+ return 3 * param;
+}
+
+// This function definition will not be decorated with `optnone` because the
+// attribute would conflict with `always_inline`.
+int __attribute__((always_inline)) baz(int z) {
+ return foo(z, 2);
+}
+// CHECK-DAG: @_Z3bazi{{.*}} [[ATTRBAZ:#[0-9]+]]
+
+#pragma clang optimize on
+
+// The function "int wombat(int param)" created by the macro is not
+// decorated with `optnone`, because the pragma applies its effects only
+// after preprocessing. The position of the macro definition is not
+// relevant.
+CREATE_FUNC (wombat)
+// CHECK-DAG: @_Z6wombati{{.*}} [[ATTRWOMBAT:#[0-9]+]]
+
+// This instantiation of the "twice" template function with a "float" type
+// will not have an `optnone` attribute because the template declaration was
+// not affected by the pragma.
+float container (float par) {
+ return twice(par);
+}
+// CHECK-DAG: @_Z9containerf{{.*}} [[ATTRCONTAINER:#[0-9]+]]
+// CHECK-DAG: @_Z5twiceIfET_S0_{{.*}} [[ATTRTWICE:#[0-9]+]]
+
+// This instantiation of the "thrice" template function with a "float" type
+// will have an `optnone` attribute because the template definition was
+// affected by the pragma.
+float container2 (float par) {
+ return thrice(par);
+}
+// CHECK-DAG: @_Z10container2f{{.*}} [[ATTRCONTAINER2:#[0-9]+]]
+// CHECK-DAG: @_Z6thriceIfET_S0_{{.*}} [[ATTRTHRICEFLOAT:#[0-9]+]]
+
+
+// A template specialization is a new definition and it will not be
+// decorated with an `optnone` attribute because it is now outside of the
+// affected region.
+template<> int thrice(int par) {
+ return (par << 1) + par;
+}
+int container3 (int par) {
+ return thrice(par);
+}
+// CHECK-DAG: @_Z10container3i{{.*}} [[ATTRCONTAINER3:#[0-9]+]]
+// CHECK-DAG: @_Z6thriceIiET_S0_{{.*}} [[ATTRTHRICEINT:#[0-9]+]]
+
+
+// Check for both noinline and optnone on each function that should have them.
+// CHECK-DAG: attributes [[ATTRBAR]] = { {{.*}}noinline{{.*}}optnone{{.*}} }
+// CHECK-DAG: attributes [[ATTRCREATED]] = { {{.*}}noinline{{.*}}optnone{{.*}} }
+// CHECK-DAG: attributes [[ATTRMETHOD]] = { {{.*}}noinline{{.*}}optnone{{.*}} }
+// CHECK-DAG: attributes [[ATTRTHRICEFLOAT]] = { {{.*}}noinline{{.*}}optnone{{.*}} }
+
+// Check that the other functions do NOT have optnone.
+// CHECK-DAG-NOT: attributes [[ATTRFOO]] = { {{.*}}optnone{{.*}} }
+// CHECK-DAG-NOT: attributes [[ATTRBAZ]] = { {{.*}}optnone{{.*}} }
+// CHECK-DAG-NOT: attributes [[ATTRWOMBAT]] = { {{.*}}optnone{{.*}} }
+// CHECK-DAG-NOT: attributes [[ATTRCONTAINER]] = { {{.*}}optnone{{.*}} }
+// CHECK-DAG-NOT: attributes [[ATTRTWICE]] = { {{.*}}optnone{{.*}} }
+// CHECK-DAG-NOT: attributes [[ATTRCONTAINER2]] = { {{.*}}optnone{{.*}} }
+// CHECK-DAG-NOT: attributes [[ATTRCONTAINER3]] = { {{.*}}optnone{{.*}} }
+// CHECK-DAG-NOT: attributes [[ATTRTHRICEINT]] = { {{.*}}optnone{{.*}} }
diff --git a/test/SemaCXX/pragma-vtordisp.cpp b/test/SemaCXX/pragma-vtordisp.cpp
new file mode 100644
index 000000000000..49841c51ef05
--- /dev/null
+++ b/test/SemaCXX/pragma-vtordisp.cpp
@@ -0,0 +1,40 @@
+// RUN: %clang_cc1 -std=c++11 -fms-extensions -fms-compatibility -fsyntax-only -triple=i386-pc-win32 -verify %s
+
+struct A { int a; };
+
+#pragma vtordisp(pop) // expected-warning {{#pragma vtordisp(pop, ...) failed: stack empty}}
+#pragma vtordisp(push, 0)
+#pragma vtordisp(push, 1)
+#pragma vtordisp(push, 2)
+struct B : virtual A { int b; };
+#pragma vtordisp(pop)
+#pragma vtordisp(pop)
+#pragma vtordisp(pop)
+#pragma vtordisp(pop) // expected-warning {{#pragma vtordisp(pop, ...) failed: stack empty}}
+
+#pragma vtordisp(push, 3) // expected-warning {{expected integer between 0 and 2 inclusive in '#pragma vtordisp' - ignored}}
+#pragma vtordisp()
+
+#define ONE 1
+#pragma vtordisp(push, ONE)
+#define TWO 1
+#pragma vtordisp(push, TWO)
+
+// Test a reset.
+#pragma vtordisp()
+#pragma vtordisp(pop) // expected-warning {{#pragma vtordisp(pop, ...) failed: stack empty}}
+
+#pragma vtordisp( // expected-warning {{unknown action for '#pragma vtordisp' - ignored}}
+#pragma vtordisp(asdf) // expected-warning {{unknown action for '#pragma vtordisp' - ignored}}
+#pragma vtordisp(,) // expected-warning {{unknown action for '#pragma vtordisp' - ignored}}
+#pragma vtordisp // expected-warning {{missing '(' after '#pragma vtordisp' - ignoring}}
+#pragma vtordisp(3) // expected-warning {{expected integer between 0 and 2 inclusive in '#pragma vtordisp' - ignored}}
+#pragma vtordisp(), stuff // expected-warning {{extra tokens}}
+
+struct C {
+// FIXME: Our implementation based on token insertion makes it impossible for
+// the pragma to appear everywhere we should support it.
+//#pragma vtordisp()
+ struct D : virtual A {
+ };
+};
diff --git a/test/SemaCXX/pragma-weak.cpp b/test/SemaCXX/pragma-weak.cpp
index 057cf6b463f3..c1ff2062fcfa 100644
--- a/test/SemaCXX/pragma-weak.cpp
+++ b/test/SemaCXX/pragma-weak.cpp
@@ -6,3 +6,6 @@ extern "C" {
void foo() {
};
}
+
+extern "C" int Test;
+#pragma weak test = Test
diff --git a/test/SemaCXX/primary-base.cpp b/test/SemaCXX/primary-base.cpp
index 0b6aaef493cb..d305aa3b72db 100644
--- a/test/SemaCXX/primary-base.cpp
+++ b/test/SemaCXX/primary-base.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -fsyntax-only -verify %s
// expected-no-diagnostics
class A { virtual void f(); };
class B : virtual A { };
diff --git a/test/SemaCXX/qualified-id-lookup.cpp b/test/SemaCXX/qualified-id-lookup.cpp
index 23164fa42f32..8eef6f418274 100644
--- a/test/SemaCXX/qualified-id-lookup.cpp
+++ b/test/SemaCXX/qualified-id-lookup.cpp
@@ -94,7 +94,7 @@ namespace a {
void test_a() {
a::a::i = 3; // expected-error{{no member named 'i' in namespace 'a::a'; did you mean 'a::a::a::i'?}}
a::a::a::i = 4;
- a::a::j = 3; // expected-error-re{{no member named 'j' in namespace 'a::a'$}}
+ a::a::j = 3; // expected-error-re{{no member named 'j' in namespace 'a::a'{{$}}}}
}
struct Undef { // expected-note{{definition of 'Undef' is not complete until the closing '}'}}
diff --git a/test/SemaCXX/references.cpp b/test/SemaCXX/references.cpp
index 37fc2a856fd9..cfe7dc1f428b 100644
--- a/test/SemaCXX/references.cpp
+++ b/test/SemaCXX/references.cpp
@@ -85,9 +85,19 @@ void test8(int& const,// expected-error{{'const' qualifier may not be applied to
typedef int& intref;
typedef intref& intrefref; // C++ DR 106: reference collapsing
- typedef intref const intref_c; // okay. FIXME: how do we verify that this is the same type as intref?
+ typedef intref const intref_c; // expected-warning {{'const' qualifier on reference type 'intref' (aka 'int &') has no effect}}
+ typedef intref_c intref; // ok, same type
+
+ typedef intref volatile intref; // expected-warning {{'volatile' qualifier on reference type 'intref' (aka 'int &') has no effect}}
+ typedef intref _Atomic intref; // expected-warning {{'_Atomic' qualifier on reference type 'intref' (aka 'int &') has no effect}}
+
+ void restrict_ref(__restrict intref); // ok
+ void restrict_ref(int &__restrict); // ok
}
+template<typename T> int const_param(const T) {}
+int const_ref_param = const_param<int&>(const_ref_param); // no-warning
+
class string {
char *Data;
diff --git a/test/SemaCXX/reinterpret-cast.cpp b/test/SemaCXX/reinterpret-cast.cpp
index a4bc4325e655..4284032d9ba9 100644
--- a/test/SemaCXX/reinterpret-cast.cpp
+++ b/test/SemaCXX/reinterpret-cast.cpp
@@ -96,12 +96,12 @@ void memptrs()
void (structure::*psf)() = 0;
(void)reinterpret_cast<int (structure::*)()>(psf);
- (void)reinterpret_cast<void (structure::*)()>(psi); // expected-error {{reinterpret_cast from 'const int structure::*' to 'void (structure::*)()' is not allowed}}
- (void)reinterpret_cast<int structure::*>(psf); // expected-error {{reinterpret_cast from 'void (structure::*)()' to 'int structure::*' is not allowed}}
+ (void)reinterpret_cast<void (structure::*)()>(psi); // expected-error-re {{reinterpret_cast from 'const int structure::*' to 'void (structure::*)(){{( __attribute__\(\(thiscall\)\))?}}' is not allowed}}
+ (void)reinterpret_cast<int structure::*>(psf); // expected-error-re {{reinterpret_cast from 'void (structure::*)(){{( __attribute__\(\(thiscall\)\))?}}' to 'int structure::*' is not allowed}}
// Cannot cast from integers to member pointers, not even the null pointer
// literal.
- (void)reinterpret_cast<void (structure::*)()>(0); // expected-error {{reinterpret_cast from 'int' to 'void (structure::*)()' is not allowed}}
+ (void)reinterpret_cast<void (structure::*)()>(0); // expected-error-re {{reinterpret_cast from 'int' to 'void (structure::*)(){{( __attribute__\(\(thiscall\)\))?}}' is not allowed}}
(void)reinterpret_cast<int structure::*>(0); // expected-error {{reinterpret_cast from 'int' to 'int structure::*' is not allowed}}
}
diff --git a/test/SemaCXX/return-noreturn.cpp b/test/SemaCXX/return-noreturn.cpp
index 617de0089585..531dc23995d2 100644
--- a/test/SemaCXX/return-noreturn.cpp
+++ b/test/SemaCXX/return-noreturn.cpp
@@ -40,6 +40,14 @@ namespace abort_struct_complex_cfgs {
switch (x) default: L1: L2: case 4: { pr6884_abort_struct(); }
}
+ // FIXME: detect noreturn destructors triggered by calls to delete.
+ int f7(int x) {
+ switch (x) default: L1: L2: case 4: {
+ pr6884_abort_struct *p = new pr6884_abort_struct();
+ delete p;
+ }
+ } // expected-warning {{control reaches end of non-void function}}
+
// Test that these constructs work even when extraneous blocks are created
// before and after the switch due to implicit destructors.
int g1(int x) {
@@ -138,3 +146,25 @@ void PR9412_f() {
PR9412_t<PR9412_Exact>(); // expected-note {{in instantiation of function template specialization 'PR9412_t<0>' requested here}}
}
+#if __cplusplus >= 201103L
+namespace LambdaVsTemporaryDtor {
+ struct Y { ~Y(); };
+ struct X { template<typename T> X(T, Y = Y()) {} };
+
+ struct Fatal { ~Fatal() __attribute__((noreturn)); };
+ struct FatalCopy { FatalCopy(); FatalCopy(const FatalCopy&, Fatal F = Fatal()); };
+
+ void foo();
+
+ int bar() {
+ X work([](){ Fatal(); });
+ foo();
+ } // expected-warning {{control reaches end of non-void function}}
+
+ int baz() {
+ FatalCopy fc;
+ X work([fc](){});
+ foo();
+ } // ok, initialization of lambda does not return
+}
+#endif
diff --git a/test/SemaCXX/return-stack-addr.cpp b/test/SemaCXX/return-stack-addr.cpp
index fbbaf836f1ab..7670798ecb9c 100644
--- a/test/SemaCXX/return-stack-addr.cpp
+++ b/test/SemaCXX/return-stack-addr.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
int* ret_local() {
int x = 1;
@@ -108,6 +108,11 @@ int* ret_cpp_const_cast(const int x) {
return const_cast<int*>(&x); // expected-warning {{address of stack memory}}
}
+struct A { virtual ~A(); }; struct B : A {};
+A* ret_cpp_dynamic_cast(B b) {
+ return dynamic_cast<A*>(&b); // expected-warning {{address of stack memory}}
+}
+
// PR 7999 - handle the case where a field is itself a reference.
template <typename T> struct PR7999 {
PR7999(T& t) : value(t) {}
@@ -137,5 +142,17 @@ namespace PR8774 {
}
}
-// TODO: test case for dynamic_cast. clang does not yet have
-// support for C++ classes to write such a test case.
+// Don't warn about returning a local variable from a surrounding function if
+// we're within a lambda-expression.
+void ret_from_lambda() {
+ int a;
+ int &b = a;
+ (void) [&]() -> int& { return a; };
+ (void) [&]() -> int& { return b; };
+ (void) [=]() mutable -> int& { return a; };
+ (void) [=]() mutable -> int& { return b; };
+ (void) [&]() -> int& { int a; return a; }; // expected-warning {{reference to stack}}
+ (void) [=]() -> int& { int a; return a; }; // expected-warning {{reference to stack}}
+ (void) [&]() -> int& { int &a = b; return a; };
+ (void) [=]() mutable -> int& { int &a = b; return a; };
+}
diff --git a/test/SemaCXX/return.cpp b/test/SemaCXX/return.cpp
index 580f0a7233e2..98dbd51f5806 100644
--- a/test/SemaCXX/return.cpp
+++ b/test/SemaCXX/return.cpp
@@ -102,3 +102,13 @@ namespace return_has_expr {
}
};
}
+
+// rdar://15366494
+// pr17759
+namespace ctor_returns_void {
+ void f() {}
+ struct S {
+ S() { return f(); }; // expected-error {{constructor 'S' must not return void expression}}
+ ~S() { return f(); } // expected-error {{destructor '~S' must not return void expression}}
+ };
+}
diff --git a/test/SemaCXX/rval-references-examples.cpp b/test/SemaCXX/rval-references-examples.cpp
index 110ae26fb5d2..8a5b562bbb98 100644
--- a/test/SemaCXX/rval-references-examples.cpp
+++ b/test/SemaCXX/rval-references-examples.cpp
@@ -4,7 +4,7 @@ template<typename T>
class unique_ptr {
T *ptr;
- unique_ptr(const unique_ptr&) = delete; // expected-note 3{{function has been explicitly marked deleted here}}
+ unique_ptr(const unique_ptr&) = delete; // expected-note 3{{'unique_ptr' has been explicitly marked deleted here}}
unique_ptr &operator=(const unique_ptr&) = delete; // expected-note{{candidate function has been explicitly deleted}}
public:
unique_ptr() : ptr(0) { }
diff --git a/test/SemaCXX/scope-check.cpp b/test/SemaCXX/scope-check.cpp
index 90c9317ecdfb..dc15dc8b3e60 100644
--- a/test/SemaCXX/scope-check.cpp
+++ b/test/SemaCXX/scope-check.cpp
@@ -1,6 +1,18 @@
// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -fcxx-exceptions %s -Wno-unreachable-code
// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -fcxx-exceptions -std=gnu++11 %s -Wno-unreachable-code
+namespace testInvalid {
+Invalid inv; // expected-error {{unknown type name}}
+// Make sure this doesn't assert.
+void fn()
+{
+ int c = 0;
+ if (inv)
+Here: ;
+ goto Here;
+}
+}
+
namespace test0 {
struct D { ~D(); };
@@ -226,7 +238,7 @@ namespace test12 {
static void *ips[] = { &&l0 };
const C c0 = 17;
l0: // expected-note {{possible target of indirect goto}}
- const C &c1 = 42; // expected-note {{jump exits scope of variable with non-trivial destructor}}
+ const C &c1 = 42; // expected-note {{jump exits scope of lifetime-extended temporary with non-trivial destructor}}
const C &c2 = c0;
goto *ip; // expected-error {{indirect goto might cross protected scopes}}
}
@@ -241,7 +253,7 @@ namespace test13 {
void f(void **ip) {
static void *ips[] = { &&l0 };
l0: // expected-note {{possible target of indirect goto}}
- const int &c1 = C(1).i; // expected-note {{jump exits scope of variable with non-trivial destructor}}
+ const int &c1 = C(1).i; // expected-note {{jump exits scope of lifetime-extended temporary with non-trivial destructor}}
goto *ip; // expected-error {{indirect goto might cross protected scopes}}
}
}
@@ -295,15 +307,137 @@ x: return s.get();
}
#endif
-// This test must be last, because the error prohibits further jump diagnostics.
-namespace testInvalid {
-Invalid inv; // expected-error {{unknown type name}}
-// Make sure this doesn't assert.
-void fn()
-{
- int c = 0;
- if (inv)
-Here: ;
- goto Here;
+namespace test18 {
+ struct A { ~A(); };
+ struct B { const int &r; const A &a; };
+ int f() {
+ void *p = &&x;
+ const A a = A();
+ x:
+ B b = { 0, a }; // ok
+ goto *p;
+ }
+ int g() {
+ void *p = &&x;
+ x: // expected-note {{possible target of indirect goto}}
+ B b = { 0, A() }; // expected-note {{jump exits scope of lifetime-extended temporary with non-trivial destructor}}
+ goto *p; // expected-error {{indirect goto might cross protected scopes}}
+ }
+}
+
+#if __cplusplus >= 201103L
+namespace std {
+ typedef decltype(sizeof(int)) size_t;
+ template<typename T> struct initializer_list {
+ const T *begin;
+ size_t size;
+ initializer_list(const T *, size_t);
+ };
+}
+namespace test19 {
+ struct A { ~A(); };
+
+ int f() {
+ void *p = &&x;
+ A a;
+ x: // expected-note {{possible target of indirect goto}}
+ std::initializer_list<A> il = { a }; // expected-note {{jump exits scope of lifetime-extended temporary with non-trivial destructor}}
+ goto *p; // expected-error {{indirect goto might cross protected scopes}}
+ }
+}
+
+namespace test20 {
+ struct A { ~A(); };
+ struct B {
+ const A &a;
+ };
+
+ int f() {
+ void *p = &&x;
+ A a;
+ x:
+ std::initializer_list<B> il = {
+ a,
+ a
+ };
+ goto *p;
+ }
+ int g() {
+ void *p = &&x;
+ A a;
+ x: // expected-note {{possible target of indirect goto}}
+ std::initializer_list<B> il = {
+ a,
+ { A() } // expected-note {{jump exits scope of lifetime-extended temporary with non-trivial destructor}}
+ };
+ goto *p; // expected-error {{indirect goto might cross protected scopes}}
+ }
}
+#endif
+
+namespace test21 {
+ template<typename T> void f() {
+ goto x; // expected-error {{protected scope}}
+ T t; // expected-note {{bypasses}}
+ x: return;
+ }
+
+ template void f<int>();
+ struct X { ~X(); };
+ template void f<X>(); // expected-note {{instantiation of}}
+}
+
+namespace PR18217 {
+ typedef int *X;
+
+ template <typename T>
+ class MyCl {
+ T mem;
+ };
+
+ class Source {
+ MyCl<X> m;
+ public:
+ int getKind() const;
+ };
+
+ bool b;
+ template<typename TT>
+ static void foo(const Source &SF, MyCl<TT *> Source::*m) {
+ switch (SF.getKind()) {
+ case 1: return;
+ case 2: break;
+ case 3:
+ case 4: return;
+ };
+ if (b) {
+ auto &y = const_cast<MyCl<TT *> &>(SF.*m); // expected-warning 0-1{{extension}}
+ }
+ }
+
+ int Source::getKind() const {
+ foo(*this, &Source::m);
+ return 0;
+ }
+}
+
+namespace test_recovery {
+ // Test that jump scope checking recovers when there are unspecified errors
+ // in the function declaration or body.
+
+ void test(nexist, int c) { // expected-error {{}}
+ nexist_fn(); // expected-error {{}}
+ goto nexist_label; // expected-error {{use of undeclared label}}
+ goto a0; // expected-error {{goto into protected scope}}
+ int a = 0; // expected-note {{jump bypasses variable initialization}}
+ a0:;
+
+ switch (c) {
+ case $: // expected-error {{}}
+ case 0:
+ int x = 56; // expected-note {{jump bypasses variable initialization}}
+ case 1: // expected-error {{switch case is in protected scope}}
+ x = 10;
+ }
+ }
}
diff --git a/test/SemaCXX/sourceranges.cpp b/test/SemaCXX/sourceranges.cpp
index 1f25d5bce93c..9ba003aa204a 100644
--- a/test/SemaCXX/sourceranges.cpp
+++ b/test/SemaCXX/sourceranges.cpp
@@ -12,7 +12,7 @@ enum B {};
typedef int C;
}
-// CHECK: VarDecl {{0x[0-9a-fA-F]+}} <line:16:1, col:36> ImplicitConstrArray 'foo::A [2]'
+// CHECK: VarDecl {{0x[0-9a-fA-F]+}} <line:16:1, col:36> col:15 ImplicitConstrArray 'foo::A [2]'
static foo::A ImplicitConstrArray[2];
int main() {
@@ -28,3 +28,12 @@ foo::A getName() {
// CHECK: CXXConstructExpr {{0x[0-9a-fA-F]+}} <col:10, col:17> 'foo::A'
return foo::A();
}
+
+void destruct(foo::A *a1, foo::A *a2, P<int> *p1) {
+ // CHECK: MemberExpr {{0x[0-9a-fA-F]+}} <col:3, col:8> '<bound member function type>' ->~A
+ a1->~A();
+ // CHECK: MemberExpr {{0x[0-9a-fA-F]+}} <col:3, col:16> '<bound member function type>' ->~A
+ a2->foo::A::~A();
+ // CHECK: MemberExpr {{0x[0-9a-fA-F]+}} <col:3, col:13> '<bound member function type>' ->~P
+ p1->~P<int>();
+}
diff --git a/test/SemaCXX/static-assert.cpp b/test/SemaCXX/static-assert.cpp
index 4a7560ba5b6a..7de4d07b50b8 100644
--- a/test/SemaCXX/static-assert.cpp
+++ b/test/SemaCXX/static-assert.cpp
@@ -48,3 +48,6 @@ template<typename T> struct StaticAssertProtected {
struct X { ~X(); };
StaticAssertProtected<int> sap1;
StaticAssertProtected<X> sap2; // expected-note {{instantiation}}
+
+static_assert(true); // expected-warning {{C++1z extension}}
+static_assert(false); // expected-error-re {{failed{{$}}}} expected-warning {{extension}}
diff --git a/test/SemaCXX/static-cast.cpp b/test/SemaCXX/static-cast.cpp
index 7fb016ea86d8..06fd8636e5d6 100644
--- a/test/SemaCXX/static-cast.cpp
+++ b/test/SemaCXX/static-cast.cpp
@@ -9,6 +9,8 @@ struct F : public C1 {}; // Single path to B with virtual.
struct G1 : public B {};
struct G2 : public B {};
struct H : public G1, public G2 {}; // Ambiguous path to B.
+struct I; // Incomplete.
+struct J; // Incomplete.
enum Enum { En1, En2 };
enum Onom { On1, On2 };
@@ -131,6 +133,7 @@ void t_529_9()
// Bad code below
(void)static_cast<int A::*>((int H::*)0); // expected-error {{ambiguous conversion from pointer to member of derived class 'H' to pointer to member of base class 'A':}}
(void)static_cast<int A::*>((int F::*)0); // expected-error {{conversion from pointer to member of class 'F' to pointer to member of class 'A' via virtual base 'B' is not allowed}}
+ (void)static_cast<int I::*>((int J::*)0); // expected-error {{static_cast from 'int J::*' to 'int I::*' is not allowed}}
}
// PR 5261 - static_cast should instantiate template if possible
@@ -192,6 +195,6 @@ namespace PR6072 {
(void)static_cast<void (A::*)()>(&B::f);
(void)static_cast<void (B::*)()>(&B::f);
(void)static_cast<void (C::*)()>(&B::f);
- (void)static_cast<void (D::*)()>(&B::f); // expected-error{{address of overloaded function 'f' cannot be static_cast to type 'void (PR6072::D::*)()'}}
+ (void)static_cast<void (D::*)()>(&B::f); // expected-error-re{{address of overloaded function 'f' cannot be static_cast to type 'void (PR6072::D::*)(){{( __attribute__\(\(thiscall\)\))?}}'}}
}
}
diff --git a/test/SemaCXX/switch-implicit-fallthrough-blocks.cpp b/test/SemaCXX/switch-implicit-fallthrough-blocks.cpp
new file mode 100644
index 000000000000..9a16f2b4b402
--- /dev/null
+++ b/test/SemaCXX/switch-implicit-fallthrough-blocks.cpp
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -fblocks -std=c++11 -Wimplicit-fallthrough %s
+
+void fallthrough_in_blocks() {
+ void (^block)() = ^{
+ int x = 0;
+ switch (x) {
+ case 0:
+ x++;
+ [[clang::fallthrough]]; // no diagnostics
+ case 1:
+ x++;
+ default: // \
+ expected-warning{{unannotated fall-through between switch labels}} \
+ expected-note{{insert 'break;' to avoid fall-through}}
+ break;
+ }
+ };
+ block();
+}
diff --git a/test/SemaCXX/switch-implicit-fallthrough.cpp b/test/SemaCXX/switch-implicit-fallthrough.cpp
index d7959238c6b3..0bc43cdbd45b 100644
--- a/test/SemaCXX/switch-implicit-fallthrough.cpp
+++ b/test/SemaCXX/switch-implicit-fallthrough.cpp
@@ -229,6 +229,59 @@ int fallthrough_covered_enums(Enum e) {
return n;
}
+// Fallthrough annotations in local classes used to generate "fallthrough
+// annotation does not directly precede switch label" warning.
+void fallthrough_in_local_class() {
+ class C {
+ void f(int x) {
+ switch (x) {
+ case 0:
+ x++;
+ [[clang::fallthrough]]; // no diagnostics
+ case 1:
+ x++;
+ default: // \
+ expected-warning{{unannotated fall-through between switch labels}} \
+ expected-note{{insert 'break;' to avoid fall-through}}
+ break;
+ }
+ }
+ };
+}
+
+// Fallthrough annotations in lambdas used to generate "fallthrough
+// annotation does not directly precede switch label" warning.
+void fallthrough_in_lambda() {
+ (void)[] {
+ int x = 0;
+ switch (x) {
+ case 0:
+ x++;
+ [[clang::fallthrough]]; // no diagnostics
+ case 1:
+ x++;
+ default: // \
+ expected-warning{{unannotated fall-through between switch labels}} \
+ expected-note{{insert 'break;' to avoid fall-through}}
+ break;
+ }
+ };
+}
+
+namespace PR18983 {
+ void fatal() __attribute__((noreturn));
+ int num();
+ void test() {
+ switch (num()) {
+ case 1:
+ fatal();
+ // Don't issue a warning.
+ case 2:
+ break;
+ }
+ }
+}
+
int fallthrough_targets(int n) {
[[clang::fallthrough]]; // expected-error{{fallthrough annotation is outside switch statement}}
@@ -247,21 +300,3 @@ int fallthrough_targets(int n) {
}
return n;
}
-
-// Fallthrough annotations in local classes used to generate "fallthrough
-// annotation does not directly precede switch label" warning.
-void fallthrough_in_local_class() {
- class C {
- void f(int x) {
- switch (x) {
- case 0:
- x++;
- [[clang::fallthrough]]; // no diagnostics
- case 1:
- x++;
- break;
- }
- }
- };
-}
-
diff --git a/test/SemaCXX/template-implicit-vars.cpp b/test/SemaCXX/template-implicit-vars.cpp
new file mode 100644
index 000000000000..25d35fbdb84f
--- /dev/null
+++ b/test/SemaCXX/template-implicit-vars.cpp
@@ -0,0 +1,14 @@
+// RUN: %clang_cc1 -fsyntax-only %s -std=c++11 -ast-dump | FileCheck %s
+template<typename T>
+void f(T t) {
+ T a[] = {t};
+ for (auto x : a) {}
+}
+
+void g() {
+ f(1);
+}
+// CHECK: VarDecl {{.*}} implicit used __range
+// CHECK: VarDecl {{.*}} implicit used __range
+// CHECK: VarDecl {{.*}} implicit used __begin
+// CHECK: VarDecl {{.*}} implicit used __end
diff --git a/test/SemaCXX/trailing-return-0x.cpp b/test/SemaCXX/trailing-return-0x.cpp
index f7e3433a7608..cf5e659660eb 100644
--- a/test/SemaCXX/trailing-return-0x.cpp
+++ b/test/SemaCXX/trailing-return-0x.cpp
@@ -17,7 +17,9 @@ auto f() -> int
return 0;
}
-auto g(); // expected-error{{return without trailing return type}}
+auto g(); // expected-error{{return without trailing return type; deduced return types are a C++1y extension}}
+decltype(auto) g2(); // expected-warning{{extension}} expected-error-re{{{{^}}deduced return types are a C++1y extension}}
+auto badness = g2();
int h() -> int; // expected-error{{trailing return type must specify return type 'auto', not 'int'}}
diff --git a/test/SemaCXX/type-definition-in-specifier.cpp b/test/SemaCXX/type-definition-in-specifier.cpp
index a614e6c2812e..43443a00e44b 100644
--- a/test/SemaCXX/type-definition-in-specifier.cpp
+++ b/test/SemaCXX/type-definition-in-specifier.cpp
@@ -13,13 +13,54 @@ struct S0 { int x; };
void f0() {
typedef struct S1 { int x; } S1_typedef;
- (void)((struct S2 { int x; }*)0); // expected-error{{can not be defined}}
+ (void)((struct S2 { int x; }*)0); // expected-error{{cannot be defined}}
struct S3 { int x; } s3;
- (void)static_cast<struct S4 { int x; } *>(0); // expected-error{{can not be defined}}
+ (void)static_cast<struct S4 { int x; } *>(0); // expected-error{{cannot be defined}}
}
struct S5 { int x; } f1() { return S5(); } // expected-error{{result type}}
void f2(struct S6 { int x; } p); // expected-error{{parameter type}}
+
+struct pr19018 {
+ short foo6 (enum bar0 {qq} bar3); // expected-error{{cannot be defined in a parameter type}}
+};
+
+void pr19018_1 (enum e19018_1 {qq} x); // expected-error{{cannot be defined in a parameter type}}
+void pr19018_1a (enum e19018_1 {qq} x); // expected-error{{cannot be defined in a parameter type}}
+e19018_1 x2; // expected-error{{unknown type name 'e19018_1'}}
+
+void pr19018_2 (enum {qq} x); // expected-error{{cannot be defined in a parameter type}}
+void pr19018_3 (struct s19018_2 {int qq;} x); // expected-error{{cannot be defined in a parameter type}}
+void pr19018_4 (struct {int qq;} x); // expected-error{{cannot be defined in a parameter type}}
+void pr19018_5 (struct { void qq(); } x); // expected-error{{cannot be defined in a parameter type}}
+void pr19018_5 (struct s19018_2 { void qq(); } x); // expected-error{{cannot be defined in a parameter type}}
+
+struct pr19018a {
+ static int xx;
+ void func1(enum t19018 {qq} x); // expected-error{{cannot be defined in a parameter type}}
+ void func2(enum t19018 {qq} x); // expected-error{{cannot be defined in a parameter type}}
+ void func3(enum {qq} x); // expected-error{{cannot be defined in a parameter type}}
+ void func4(struct t19018 {int qq;} x); // expected-error{{cannot be defined in a parameter type}}
+ void func5(struct {int qq;} x); // expected-error{{cannot be defined in a parameter type}}
+ void func6(struct { void qq(); } x); // expected-error{{cannot be defined in a parameter type}}
+ void func7(struct t19018 { void qq(); } x); // expected-error{{cannot be defined in a parameter type}}
+ void func8(struct { int qq() { return xx; }; } x); // expected-error{{cannot be defined in a parameter type}}
+ void func9(struct t19018 { int qq() { return xx; }; } x); // expected-error{{cannot be defined in a parameter type}}
+};
+
+struct s19018b {
+ void func1 (enum en_2 {qq} x); // expected-error{{cannot be defined in a parameter type}}
+ en_2 x1; // expected-error{{unknown type name 'en_2'}}
+ void func2 (enum en_3 {qq} x); // expected-error{{cannot be defined in a parameter type}}
+ enum en_3 x2; // expected-error{{ISO C++ forbids forward references to 'enum' types}} \
+ // expected-error{{field has incomplete type 'enum en_3'}} \
+ // expected-note{{forward declaration of 'en_3'}}
+};
+
+struct pr18963 {
+ short bar5 (struct foo4 {} bar2); // expected-error{{'foo4' cannot be defined in a parameter type}}
+ long foo5 (float foo6 = foo4); // expected-error{{use of undeclared identifier 'foo4'}}
+};
diff --git a/test/SemaCXX/type-traits.cpp b/test/SemaCXX/type-traits.cpp
index 3e479215838e..3b94ef0951eb 100644
--- a/test/SemaCXX/type-traits.cpp
+++ b/test/SemaCXX/type-traits.cpp
@@ -112,6 +112,14 @@ struct HasNoThrowConstructor { HasNoThrowConstructor() throw(); };
struct HasNoThrowConstructorWithArgs {
HasNoThrowConstructorWithArgs(HasCons i = HasCons(0)) throw();
};
+struct HasMultipleDefaultConstructor1 {
+ HasMultipleDefaultConstructor1() throw();
+ HasMultipleDefaultConstructor1(int i = 0);
+};
+struct HasMultipleDefaultConstructor2 {
+ HasMultipleDefaultConstructor2(int i = 0);
+ HasMultipleDefaultConstructor2() throw();
+};
struct HasNoThrowCopy { HasNoThrowCopy(const HasNoThrowCopy&) throw(); };
struct HasMultipleCopy {
@@ -1475,6 +1483,10 @@ void has_nothrow_move_assign() {
{ int arr[F(__has_nothrow_move_assign(NoDefaultMoveAssignDueToUDCopyCtor))]; }
{ int arr[F(__has_nothrow_move_assign(NoDefaultMoveAssignDueToUDCopyAssign))]; }
{ int arr[F(__has_nothrow_move_assign(NoDefaultMoveAssignDueToDtor))]; }
+
+
+ { int arr[T(__is_nothrow_assignable(HasNoThrowMoveAssign, HasNoThrowMoveAssign))]; }
+ { int arr[F(__is_nothrow_assignable(HasThrowMoveAssign, HasThrowMoveAssign))]; }
}
void has_trivial_move_assign() {
@@ -1562,6 +1574,9 @@ void has_nothrow_constructor() {
{ int arr[F(__has_nothrow_constructor(void))]; }
{ int arr[F(__has_nothrow_constructor(cvoid))]; }
{ int arr[F(__has_nothrow_constructor(HasTemplateCons))]; }
+
+ { int arr[F(__has_nothrow_constructor(HasMultipleDefaultConstructor1))]; }
+ { int arr[F(__has_nothrow_constructor(HasMultipleDefaultConstructor2))]; }
}
void has_virtual_destructor() {
@@ -1931,6 +1946,30 @@ void trivial_checks()
TrivialMoveButNotCopy&&)))]; }
}
+void constructible_checks() {
+ { int arr[T(__is_constructible(HasNoThrowConstructorWithArgs))]; }
+ { int arr[F(__is_nothrow_constructible(HasNoThrowConstructorWithArgs))]; } // MSVC doesn't look into default args and gets this wrong.
+
+ { int arr[T(__is_constructible(HasNoThrowConstructorWithArgs, HasCons))]; }
+ { int arr[T(__is_nothrow_constructible(HasNoThrowConstructorWithArgs, HasCons))]; }
+
+ { int arr[T(__is_constructible(NonTrivialDefault))]; }
+ { int arr[F(__is_nothrow_constructible(NonTrivialDefault))]; }
+
+ { int arr[T(__is_constructible(int))]; }
+ { int arr[T(__is_nothrow_constructible(int))]; }
+
+ { int arr[F(__is_constructible(NonPOD))]; }
+ { int arr[F(__is_nothrow_constructible(NonPOD))]; }
+
+ { int arr[T(__is_constructible(NonPOD, int))]; }
+ { int arr[F(__is_nothrow_constructible(NonPOD, int))]; }
+
+ // PR19178
+ { int arr[F(__is_constructible(Abstract))]; }
+ { int arr[F(__is_nothrow_constructible(Abstract))]; }
+}
+
// Instantiation of __is_trivially_constructible
template<typename T, typename ...Args>
struct is_trivially_constructible {
@@ -1956,6 +1995,7 @@ void is_trivially_constructible_test() {
{ int arr[F((is_trivially_constructible<int, int*>::value))]; }
{ int arr[F((is_trivially_constructible<NonTrivialDefault>::value))]; }
{ int arr[F((is_trivially_constructible<ThreeArgCtor, int*, char*, int&>::value))]; }
+ { int arr[F((is_trivially_constructible<Abstract>::value))]; } // PR19178
}
void array_rank() {
diff --git a/test/SemaCXX/typeid-ref.cpp b/test/SemaCXX/typeid-ref.cpp
index d01fd316854c..7e5dbdd85ade 100644
--- a/test/SemaCXX/typeid-ref.cpp
+++ b/test/SemaCXX/typeid-ref.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
namespace std {
class type_info;
}
@@ -7,6 +7,6 @@ struct X { };
void f() {
// CHECK: @_ZTS1X = linkonce_odr constant
- // CHECK: @_ZTI1X = linkonce_odr unnamed_addr constant
+ // CHECK: @_ZTI1X = linkonce_odr constant
(void)typeid(X&);
}
diff --git a/test/SemaCXX/types_compatible_p.cpp b/test/SemaCXX/types_compatible_p.cpp
index 4aa9a1cfa939..29e06405adea 100644
--- a/test/SemaCXX/types_compatible_p.cpp
+++ b/test/SemaCXX/types_compatible_p.cpp
@@ -1,5 +1,9 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -x c++ %s
+// RUN: %clang_cc1 -fsyntax-only -x c %s
-bool f() {
- return __builtin_types_compatible_p(int, const int); // expected-error{{C++}}
+// Test that GNU C extension __builtin_types_compatible_p() is not available in C++ mode.
+
+int f() {
+ return __builtin_types_compatible_p(int, const int); // expected-error{{expected '(' for function-style cast or type construction}} \
+ // expected-error{{expected expression}}
}
diff --git a/test/SemaCXX/typo-correction-pt2.cpp b/test/SemaCXX/typo-correction-pt2.cpp
index 525d11b0a67b..88a7073f9946 100644
--- a/test/SemaCXX/typo-correction-pt2.cpp
+++ b/test/SemaCXX/typo-correction-pt2.cpp
@@ -5,10 +5,19 @@
// attempt within a single file (which is to avoid having very broken files take
// minutes to finally be rejected by the parser).
+namespace PR12951 {
+// If there are two corrections that have the same identifier and edit distance
+// and only differ by their namespaces, don't suggest either as a correction
+// since both are equally likely corrections.
+namespace foobar { struct Thing {}; }
+namespace bazquux { struct Thing {}; }
+void f() { Thing t; } // expected-error{{unknown type name 'Thing'}}
+}
+
namespace bogus_keyword_suggestion {
void test() {
- status = "OK"; // expected-error-re {{use of undeclared identifier 'status'$}}
- return status; // expected-error-re {{use of undeclared identifier 'status'$}}
+ status = "OK"; // expected-error-re {{use of undeclared identifier 'status'{{$}}}}
+ return status; // expected-error-re {{use of undeclared identifier 'status'{{$}}}}
}
}
@@ -33,7 +42,7 @@ struct T {
};
// should be void T::f();
void f() {
- data_struct->foo(); // expected-error-re{{use of undeclared identifier 'data_struct'$}}
+ data_struct->foo(); // expected-error-re{{use of undeclared identifier 'data_struct'{{$}}}}
}
namespace PR12287 {
@@ -116,9 +125,9 @@ public:
void testAccess() {
Figure obj;
switch (obj.type()) { // expected-warning {{enumeration values 'SQUARE', 'TRIANGLE', and 'CIRCLE' not handled in switch}}
- case SQUARE: // expected-error-re {{use of undeclared identifier 'SQUARE'$}}
- case TRIANGLE: // expected-error-re {{use of undeclared identifier 'TRIANGLE'$}}
- case CIRCE: // expected-error-re {{use of undeclared identifier 'CIRCE'$}}
+ case SQUARE: // expected-error-re {{use of undeclared identifier 'SQUARE'{{$}}}}
+ case TRIANGLE: // expected-error-re {{use of undeclared identifier 'TRIANGLE'{{$}}}}
+ case CIRCE: // expected-error-re {{use of undeclared identifier 'CIRCE'{{$}}}}
break;
}
}
@@ -126,13 +135,13 @@ void testAccess() {
long readline(const char *, char *, unsigned long);
void assign_to_unknown_var() {
- deadline_ = 1; // expected-error-re {{use of undeclared identifier 'deadline_'$}}
+ deadline_ = 1; // expected-error-re {{use of undeclared identifier 'deadline_'{{$}}}}
}
namespace no_ns_before_dot {
namespace re2 {}
void test() {
- req.set_check(false); // expected-error-re {{use of undeclared identifier 'req'$}}
+ req.set_check(false); // expected-error-re {{use of undeclared identifier 'req'{{$}}}}
}
}
@@ -199,3 +208,95 @@ template <>
PR18213::WrapperInfo ::PR18213::Wrappable<int>::kWrapperInfo = { 0 }; // expected-error {{no member named 'PR18213' in 'PR18213::WrapperInfo'; did you mean simply 'PR18213'?}} \
// expected-error {{C++ requires a type specifier for all declarations}}
}
+
+namespace PR18651 {
+struct {
+ int x;
+} a, b;
+
+int y = x; // expected-error-re {{use of undeclared identifier 'x'{{$}}}}
+}
+
+namespace PR18685 {
+template <class C, int I, int J>
+class SetVector {
+ public:
+ SetVector() {}
+};
+
+template <class C, int I>
+class SmallSetVector : public SetVector<C, I, 8> {};
+
+class foo {};
+SmallSetVector<foo*, 2> fooSet;
+}
+
+PR18685::BitVector Map; // expected-error-re {{no type named 'BitVector' in namespace 'PR18685'{{$}}}}
+
+namespace shadowed_template {
+template <typename T> class Fizbin {}; // expected-note {{'::shadowed_template::Fizbin' declared here}}
+class Baz {
+ int Fizbin();
+ // TODO: Teach the parser to recover from the typo correction instead of
+ // continuing to treat the template name as an implicit-int declaration.
+ Fizbin<int> qux; // expected-error {{unknown type name 'Fizbin'; did you mean '::shadowed_template::Fizbin'?}} \
+ // expected-error {{expected member name or ';' after declaration specifiers}}
+};
+}
+
+namespace PR18852 {
+void func() {
+ struct foo {
+ void bar() {}
+ };
+ bar(); // expected-error-re {{use of undeclared identifier 'bar'{{$}}}}
+}
+
+class Thread {
+ public:
+ void Start();
+ static void Stop(); // expected-note {{'Thread::Stop' declared here}}
+};
+
+class Manager {
+ public:
+ void Start(int); // expected-note {{'Start' declared here}}
+ void Stop(int); // expected-note {{'Stop' declared here}}
+};
+
+void test(Manager *m) {
+ // Don't suggest Thread::Start as a correction just because it has the same
+ // (unqualified) name and accepts the right number of args; this is a method
+ // call on an object in an unrelated class.
+ m->Start(); // expected-error-re {{too few arguments to function call, expected 1, have 0{{$}}}}
+ m->Stop(); // expected-error-re {{too few arguments to function call, expected 1, have 0{{$}}}}
+ Stop(); // expected-error {{use of undeclared identifier 'Stop'; did you mean 'Thread::Stop'?}}
+}
+
+}
+
+namespace std {
+class bernoulli_distribution {
+ public:
+ double p() const;
+};
+}
+void test() {
+ // Make sure that typo correction doesn't suggest changing 'p' to
+ // 'std::bernoulli_distribution::p' as that is most likely wrong.
+ if (p) // expected-error-re {{use of undeclared identifier 'p'{{$}}}}
+ return;
+}
+
+namespace PR19681 {
+ struct TypoA {};
+ struct TypoB {
+ void test();
+ private:
+ template<typename T> void private_memfn(T); // expected-note{{declared here}}
+ };
+ void TypoB::test() {
+ // FIXME: should suggest 'PR19681::TypoB::private_memfn' instead of '::PR19681::TypoB::private_memfn'
+ (void)static_cast<void(TypoB::*)(int)>(&TypoA::private_memfn); // expected-error{{no member named 'private_memfn' in 'PR19681::TypoA'; did you mean '::PR19681::TypoB::private_memfn'?}}
+ }
+}
diff --git a/test/SemaCXX/typo-correction.cpp b/test/SemaCXX/typo-correction.cpp
index 4047e6a18cee..e8160b066de4 100644
--- a/test/SemaCXX/typo-correction.cpp
+++ b/test/SemaCXX/typo-correction.cpp
@@ -202,15 +202,6 @@ namespace ImplicitInt {
};
}
-namespace PR12951 {
-// If there are two corrections that have the same identifier and edit distance
-// and only differ by their namespaces, don't suggest either as a correction
-// since both are equally likely corrections.
-namespace foobar { struct Thing {}; }
-namespace bazquux { struct Thing {}; }
-void f() { Thing t; } // expected-error{{unknown type name 'Thing'}}
-}
-
namespace PR13051 {
template<typename T> struct S {
template<typename U> void f();
@@ -282,13 +273,13 @@ namespace b6956809_test1 {
namespace b6956809_test2 {
template<typename T> struct Err { typename T::error n; }; // expected-error{{type 'void *' cannot be used prior to '::' because it has no members}}
struct S {
- template<typename T> typename Err<T>::type method(T); // expected-note{{in instantiation of template class 'b6956809_test2::Err<void *>' requested here}} expected-note{{while substituting deduced template arguments into function template 'method' [with T = void *]}}
+ template<typename T> typename Err<T>::type method(T); // expected-note{{in instantiation of template class 'b6956809_test2::Err<void *>' requested here}}
template<typename T> int method(T *);
};
void test() {
S s;
- int k = s.methodd((void*)0); // expected-error{{no member named 'methodd' in 'b6956809_test2::S'; did you mean 'method'?}}
+ int k = s.methodd((void*)0); // expected-error{{no member named 'methodd' in 'b6956809_test2::S'; did you mean 'method'?}} expected-note{{while substituting deduced template arguments into function template 'method' [with T = void *]}}
}
}
@@ -299,6 +290,6 @@ namespace CorrectTypo_has_reached_its_limit {
int flibberdy(); // expected-note{{'flibberdy' declared here}}
int no_correction() {
return hibberdy() + // expected-error{{use of undeclared identifier 'hibberdy'; did you mean 'flibberdy'?}}
- gibberdy(); // expected-error-re{{use of undeclared identifier 'gibberdy'$}}
+ gibberdy(); // expected-error-re{{use of undeclared identifier 'gibberdy'{{$}}}}
};
}
diff --git a/test/SemaCXX/undefined-inline.cpp b/test/SemaCXX/undefined-inline.cpp
index ad719ae03abb..18973ef8b79c 100644
--- a/test/SemaCXX/undefined-inline.cpp
+++ b/test/SemaCXX/undefined-inline.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -triple i686-pc-win32 -verify %s
// PR14993
namespace test1 {
@@ -55,3 +55,9 @@ namespace test10 {
void test() { foo(); }
inline void foo() __attribute__((gnu_inline));
}
+
+namespace test11 {
+ inline void foo() __attribute__((dllexport));
+ inline void bar() __attribute__((dllimport));
+ void test() { foo(); bar(); }
+}
diff --git a/test/SemaCXX/undefined-internal.cpp b/test/SemaCXX/undefined-internal.cpp
index 1b76a86dcb5a..f32036a025f4 100644
--- a/test/SemaCXX/undefined-internal.cpp
+++ b/test/SemaCXX/undefined-internal.cpp
@@ -15,9 +15,9 @@ namespace test1 {
namespace test2 {
namespace {
- void foo(); // expected-warning {{function 'test2::<anonymous namespace>::foo' has internal linkage but is not defined}}
- extern int var; // expected-warning {{variable 'test2::<anonymous namespace>::var' has internal linkage but is not defined}}
- template <class T> void bar(); // expected-warning {{function 'test2::<anonymous namespace>::bar<int>' has internal linkage but is not defined}}
+ void foo(); // expected-warning {{function 'test2::(anonymous namespace)::foo' has internal linkage but is not defined}}
+ extern int var; // expected-warning {{variable 'test2::(anonymous namespace)::var' has internal linkage but is not defined}}
+ template <class T> void bar(); // expected-warning {{function 'test2::(anonymous namespace)::bar<int>' has internal linkage but is not defined}}
}
void test() {
foo(); // expected-note {{used here}}
@@ -49,11 +49,11 @@ namespace test3 {
namespace test4 {
namespace {
struct A {
- A(); // expected-warning {{function 'test4::<anonymous namespace>::A::A' has internal linkage but is not defined}}
- ~A();// expected-warning {{function 'test4::<anonymous namespace>::A::~A' has internal linkage but is not defined}}
- virtual void foo(); // expected-warning {{function 'test4::<anonymous namespace>::A::foo' has internal linkage but is not defined}}
+ A(); // expected-warning {{function 'test4::(anonymous namespace)::A::A' has internal linkage but is not defined}}
+ ~A();// expected-warning {{function 'test4::(anonymous namespace)::A::~A' has internal linkage but is not defined}}
+ virtual void foo(); // expected-warning {{function 'test4::(anonymous namespace)::A::foo' has internal linkage but is not defined}}
virtual void bar() = 0;
- virtual void baz(); // expected-warning {{function 'test4::<anonymous namespace>::A::baz' has internal linkage but is not defined}}
+ virtual void baz(); // expected-warning {{function 'test4::(anonymous namespace)::A::baz' has internal linkage but is not defined}}
};
}
@@ -75,8 +75,8 @@ namespace test5 {
}
template <class N> struct B {
- static int var; // expected-warning {{variable 'test5::B<test5::<anonymous>::A>::var' has internal linkage but is not defined}}
- static void foo(); // expected-warning {{function 'test5::B<test5::<anonymous>::A>::foo' has internal linkage but is not defined}}
+ static int var; // expected-warning {{variable 'test5::B<test5::(anonymous namespace)::A>::var' has internal linkage but is not defined}}
+ static void foo(); // expected-warning {{function 'test5::B<test5::(anonymous namespace)::A>::foo' has internal linkage but is not defined}}
};
void test() {
@@ -175,7 +175,7 @@ namespace cxx11_odr_rules {
namespace OverloadUse {
namespace {
void f();
- void f(int); // expected-warning {{function 'OverloadUse::<anonymous namespace>::f' has internal linkage but is not defined}}
+ void f(int); // expected-warning {{function 'OverloadUse::(anonymous namespace)::f' has internal linkage but is not defined}}
}
template<void x()> void t(int*) { x(); }
template<void x(int)> void t(long*) { x(10); } // expected-note {{used here}}
@@ -193,7 +193,7 @@ namespace test7 {
namespace test8 {
typedef struct {
- void bar(); // expected-warning {{function 'test8::<anonymous struct>::bar' has internal linkage but is not defined}}
+ void bar(); // expected-warning {{function 'test8::(anonymous struct)::bar' has internal linkage but is not defined}}
void foo() {
bar(); // expected-note {{used here}}
}
@@ -204,7 +204,7 @@ namespace test9 {
namespace {
struct X {
virtual void notused() = 0;
- virtual void used() = 0; // expected-warning {{function 'test9::<anonymous namespace>::X::used' has internal linkage but is not defined}}
+ virtual void used() = 0; // expected-warning {{function 'test9::(anonymous namespace)::X::used' has internal linkage but is not defined}}
};
}
void test(X &x) {
@@ -217,7 +217,7 @@ namespace test10 {
namespace {
struct X {
virtual void notused() = 0;
- virtual void used() = 0; // expected-warning {{function 'test10::<anonymous namespace>::X::used' has internal linkage but is not defined}}
+ virtual void used() = 0; // expected-warning {{function 'test10::(anonymous namespace)::X::used' has internal linkage but is not defined}}
void test() {
notused();
@@ -244,11 +244,11 @@ namespace test11 {
};
struct B {
- bool operator()() const; // expected-warning {{function 'test11::<anonymous namespace>::B::operator()' has internal linkage but is not defined}}
- void operator!() const; // expected-warning {{function 'test11::<anonymous namespace>::B::operator!' has internal linkage but is not defined}}
- bool operator+(const B&) const; // expected-warning {{function 'test11::<anonymous namespace>::B::operator+' has internal linkage but is not defined}}
- int operator[](int) const; // expected-warning {{function 'test11::<anonymous namespace>::B::operator[]' has internal linkage but is not defined}}
- const B* operator->() const; // expected-warning {{function 'test11::<anonymous namespace>::B::operator->' has internal linkage but is not defined}}
+ bool operator()() const; // expected-warning {{function 'test11::(anonymous namespace)::B::operator()' has internal linkage but is not defined}}
+ void operator!() const; // expected-warning {{function 'test11::(anonymous namespace)::B::operator!' has internal linkage but is not defined}}
+ bool operator+(const B&) const; // expected-warning {{function 'test11::(anonymous namespace)::B::operator+' has internal linkage but is not defined}}
+ int operator[](int) const; // expected-warning {{function 'test11::(anonymous namespace)::B::operator[]' has internal linkage but is not defined}}
+ const B* operator->() const; // expected-warning {{function 'test11::(anonymous namespace)::B::operator->' has internal linkage but is not defined}}
int member;
};
}
@@ -278,18 +278,18 @@ namespace test12 {
struct Cls {
virtual void f(int) = 0;
virtual void f(int, double) = 0;
- void g(int); // expected-warning {{function 'test12::<anonymous namespace>::Cls::g' has internal linkage but is not defined}}
+ void g(int); // expected-warning {{function 'test12::(anonymous namespace)::Cls::g' has internal linkage but is not defined}}
void g(int, double);
virtual operator T1() = 0;
virtual operator T2() = 0;
virtual operator T3&() = 0;
- operator T4(); // expected-warning {{function 'test12::<anonymous namespace>::Cls::operator T4' has internal linkage but is not defined}}
- operator T5(); // expected-warning {{function 'test12::<anonymous namespace>::Cls::operator T5' has internal linkage but is not defined}}
- operator T6&(); // expected-warning {{function 'test12::<anonymous namespace>::Cls::operator class test12::T6 &' has internal linkage but is not defined}}
+ operator T4(); // expected-warning {{function 'test12::(anonymous namespace)::Cls::operator T4' has internal linkage but is not defined}}
+ operator T5(); // expected-warning {{function 'test12::(anonymous namespace)::Cls::operator T5' has internal linkage but is not defined}}
+ operator T6&(); // expected-warning {{function 'test12::(anonymous namespace)::Cls::operator test12::T6 &' has internal linkage but is not defined}}
};
struct Cls2 {
- Cls2(T7); // expected-warning {{function 'test12::<anonymous namespace>::Cls2::Cls2' has internal linkage but is not defined}}
+ Cls2(T7); // expected-warning {{function 'test12::(anonymous namespace)::Cls2::Cls2' has internal linkage but is not defined}}
};
}
diff --git a/test/SemaCXX/underlying_type.cpp b/test/SemaCXX/underlying_type.cpp
index 7bca06bf074e..2a972b174e86 100644
--- a/test/SemaCXX/underlying_type.cpp
+++ b/test/SemaCXX/underlying_type.cpp
@@ -41,3 +41,17 @@ enum class foo : uint { bar };
static_assert(is_same_type<underlying_type<foo>::type, unsigned>::value,
"foo has the wrong underlying type");
+
+namespace PR19966 {
+ void PR19966(enum Invalid) { // expected-note 2{{forward declaration of}}
+ // expected-error@-1 {{ISO C++ forbids forward references to 'enum'}}
+ // expected-error@-2 {{variable has incomplete type}}
+ __underlying_type(Invalid) dont_crash;
+ // expected-error@-1 {{cannot determine underlying type of incomplete enumeration type 'PR19966::Invalid'}}
+ }
+ enum E { // expected-note {{forward declaration of 'E'}}
+ a = (__underlying_type(E)){}
+ // expected-error@-1 {{cannot determine underlying type of incomplete enumeration type 'PR19966::E'}}
+ // expected-error@-2 {{constant expression}}
+ };
+}
diff --git a/test/SemaCXX/uninit-variables.cpp b/test/SemaCXX/uninit-variables.cpp
index 687bfd2638d4..4dcd34858abb 100644
--- a/test/SemaCXX/uninit-variables.cpp
+++ b/test/SemaCXX/uninit-variables.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -Wuninitialized -fsyntax-only -fcxx-exceptions %s -verify
+// RUN: %clang_cc1 -fsyntax-only -Wuninitialized -fsyntax-only -fcxx-exceptions %s -verify -std=c++1y
// Stub out types for 'typeid' to work.
namespace std { class type_info {}; }
@@ -147,3 +147,6 @@ int test_const_ref() {
consume_const_ref(n);
return n; // expected-warning {{uninitialized when used here}}
}
+
+// Don't crash here.
+auto PR19996 = [a=0]{int t; return a;};
diff --git a/test/SemaCXX/uninitialized.cpp b/test/SemaCXX/uninitialized.cpp
index 4991ebee8b31..677a141f3ec3 100644
--- a/test/SemaCXX/uninitialized.cpp
+++ b/test/SemaCXX/uninitialized.cpp
@@ -117,7 +117,7 @@ void setupA(bool x) {
A a20{a20}; // expected-warning {{variable 'a20' is uninitialized when used within its own initialization}}
A a21 = {a21}; // expected-warning {{variable 'a21' is uninitialized when used within its own initialization}}
- // FIXME: Make the local uninitialized warning consistant with the global
+ // FIXME: Make the local uninitialized warning consistent with the global
// uninitialized checking.
A *a22 = new A(a22->count); // expected-warning {{variable 'a22' is uninitialized when used within its own initialization}}
A *a23 = new A(a23->ONE); // expected-warning {{variable 'a23' is uninitialized when used within its own initialization}}
diff --git a/test/SemaCXX/unreachable-code.cpp b/test/SemaCXX/unreachable-code.cpp
index 743290e1b9e5..fd006c099e7d 100644
--- a/test/SemaCXX/unreachable-code.cpp
+++ b/test/SemaCXX/unreachable-code.cpp
@@ -1,17 +1,29 @@
-// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -fsyntax-only -Wunreachable-code -fblocks -verify %s
+// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -fsyntax-only -Wunreachable-code-aggressive -fblocks -verify %s
int j;
-void bar() { }
+int bar();
int test1() {
for (int i = 0;
i != 10;
- ++i) { // expected-warning {{will never be executed}}
+ ++i) { // expected-warning {{loop will run at most once (loop increment never executed)}}
if (j == 23) // missing {}'s
bar();
return 1;
}
return 0;
- return 1; // expected-warning {{will never be executed}}
+ return 1; // expected-warning {{will never be executed}}
+}
+
+int test1_B() {
+ for (int i = 0;
+ i != 10;
+ ++i) { // expected-warning {{loop will run at most once (loop increment never executed)}}
+ if (j == 23) // missing {}'s
+ bar();
+ return 1;
+ }
+ return 0;
+ return bar(); // expected-warning {{will never be executed}}
}
void test2(int i) {
diff --git a/test/SemaCXX/using-decl-1.cpp b/test/SemaCXX/using-decl-1.cpp
index 24d92f175c30..40f80a70ef37 100644
--- a/test/SemaCXX/using-decl-1.cpp
+++ b/test/SemaCXX/using-decl-1.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++98 %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
extern "C" { void f(bool); }
@@ -160,3 +161,97 @@ namespace M { }
}
using N::M::FFF; // expected-error {{no member named 'FFF' in namespace 'using_suggestion_val_dropped_nested_specifier::N::M'; did you mean 'N::FFF'?}}
}
+
+namespace UsingDeclVsHiddenName {
+ namespace A {
+ enum HiddenTag1 {}; // expected-note {{previous use is here}}
+ enum HiddenTag2 {}; // expected-note {{target}}
+ int HiddenFn1; // expected-note {{target}}
+ int HiddenFn2; // expected-note {{target}}
+ int HiddenLocalExtern1;
+ int HiddenLocalExtern2;
+ }
+
+ namespace B {
+ using A::HiddenTag1;
+ using A::HiddenFn1; // expected-note {{using declaration}}
+ using A::HiddenLocalExtern1;
+
+ struct S {
+ friend struct HiddenTag1; // expected-error {{tag type that does not match previous}}
+ friend struct HiddenTag2; // expected-note {{conflicting declaration}}
+ friend void HiddenFn1(); // expected-error {{cannot befriend target of using declaration}}
+ friend void HiddenFn2(); // expected-note {{conflicting declaration}}
+ void f() {
+ // OK, these are not in the scope of namespace B, even though they're
+ // members of the namespace.
+ void HiddenLocalExtern1();
+ void HiddenLocalExtern2();
+ }
+ };
+
+ using A::HiddenTag2; // expected-error {{conflicts with declaration already in scope}}
+ using A::HiddenFn2; // expected-error {{conflicts with declaration already in scope}}
+ using A::HiddenLocalExtern2;
+ }
+}
+
+namespace PR19171 {
+ struct Z {
+ Z();
+ };
+
+ typedef struct {
+ Z i;
+ } S;
+
+ struct Y : S {
+ using S::S;
+#if __cplusplus < 201103L
+ // expected-error@-2 {{no member named 'S' in 'PR19171::S'}}
+#endif
+ };
+
+ // [namespace.udecl]p3: In a using-declaration used as a member-declaration,
+ // the nested-name-specifier shall name a base class of the class being defined.
+ // If such a using-declaration names a constructor, the nested-name-specifier
+ // shall name a direct base class of the class being defined;
+
+ struct B_blah { };
+ struct C_blah : B_blah { C_blah(int); }; // expected-note 0-1{{declared here}}
+ struct D1 : C_blah {
+ // FIXME: We should be able to correct this in C++11 mode.
+ using B_blah::C_blah; // expected-error-re {{no member named 'C_blah' in 'PR19171::B_blah'{{$}}}}
+ };
+ struct D2 : C_blah {
+ // Somewhat bizarrely, this names the injected-class-name of B_blah within
+ // C_blah, and is valid.
+ using C_blah::B_blah;
+ };
+ struct D3 : C_blah {
+ using C_blah::D_blah;
+#if __cplusplus < 201103L
+ // expected-error-re@-2 {{no member named 'D_blah' in 'PR19171::C_blah'{{$}}}}
+#else
+ // expected-error@-4 {{no member named 'D_blah' in 'PR19171::C_blah'; did you mean 'C_blah'?}}
+#endif
+ };
+#if __cplusplus >= 201103L
+ D3 d3(0); // ok
+#endif
+
+ struct E { };
+ struct EE { int EE; };
+ struct F : E {
+ using E::EE; // expected-error-re {{no member named 'EE' in 'PR19171::E'{{$}}}}
+ };
+}
+
+namespace TypoCorrectTemplateMember {
+ struct A {
+ template<typename T> void foobar(T); // expected-note {{'foobar' declared here}}
+ };
+ struct B : A {
+ using A::goobar; // expected-error {{no member named 'goobar' in 'TypoCorrectTemplateMember::A'; did you mean 'foobar'?}}
+ };
+}
diff --git a/test/SemaCXX/vararg-class.cpp b/test/SemaCXX/vararg-class.cpp
new file mode 100644
index 000000000000..08f521cbd539
--- /dev/null
+++ b/test/SemaCXX/vararg-class.cpp
@@ -0,0 +1,48 @@
+// RUN: %clang_cc1 -verify -Wclass-varargs -std=c++98 %s
+// RUN: %clang_cc1 -verify -Wclass-varargs -std=c++11 %s
+
+struct A {};
+struct B { ~B(); };
+class C { char *c_str(); };
+struct D { char *c_str(); };
+struct E { E(); };
+struct F { F(); char *c_str(); };
+
+void v(...);
+void w(const char*, ...) __attribute__((format(printf, 1, 2)));
+
+void test(A a, B b, C c, D d, E e, F f) {
+ v(a); // expected-warning-re {{passing object of class type 'A' through variadic function{{$}}}}
+ v(b); // expected-error-re {{cannot pass object of non-{{POD|trivial}} type 'B' through variadic function; call will abort at runtime}}
+ v(c); // expected-warning {{passing object of class type 'C' through variadic function; did you mean to call '.c_str()'?}}
+ v(d); // expected-warning {{passing object of class type 'D' through variadic function; did you mean to call '.c_str()'?}}
+ v(e);
+ v(f);
+#if __cplusplus < 201103L
+ // expected-error@-3 {{cannot pass object of non-POD type 'E' through variadic function; call will abort at runtime}}
+ // expected-error@-3 {{cannot pass object of non-POD type 'F' through variadic function; call will abort at runtime}}
+#else
+ // expected-warning-re@-6 {{passing object of class type 'E' through variadic function{{$}}}}
+ // expected-warning@-6 {{passing object of class type 'F' through variadic function; did you mean to call '.c_str()'?}}
+#endif
+
+ v(d.c_str());
+ v(f.c_str());
+ v(0);
+ v('x');
+
+ w("%s", a); // expected-warning {{format specifies type 'char *' but the argument has type 'A'}}
+ w("%s", b); // expected-error-re {{cannot pass non-{{POD|trivial}} object of type 'B' to variadic function; expected type from format string was 'char *'}}
+ w("%s", c); // expected-warning {{format specifies type 'char *' but the argument has type 'C'}}
+ w("%s", d); // expected-warning {{format specifies type 'char *' but the argument has type 'D'}}
+ w("%s", e);
+ w("%s", f);
+#if __cplusplus < 201103L
+ // expected-error@-3 {{cannot pass non-POD object of type 'E' to variadic function; expected type from format string was 'char *'}}
+ // expected-error@-3 {{cannot pass non-POD object of type 'F' to variadic function; expected type from format string was 'char *'}}
+ // expected-note@-4 {{did you mean to call the c_str() method?}}
+#else
+ // expected-warning@-7 {{format specifies type 'char *' but the argument has type 'E'}}
+ // expected-warning@-7 {{format specifies type 'char *' but the argument has type 'F'}}
+#endif
+}
diff --git a/test/SemaCXX/vector-casts.cpp b/test/SemaCXX/vector-casts.cpp
index 681a07ea4707..2ccd5979c7f7 100644
--- a/test/SemaCXX/vector-casts.cpp
+++ b/test/SemaCXX/vector-casts.cpp
@@ -2,6 +2,7 @@
typedef int __v2si __attribute__((__vector_size__(8)));
typedef short __v4hi __attribute__((__vector_size__(8)));
typedef short __v8hi __attribute__((__vector_size__(16)));
+typedef short __v3hi __attribute__((__ext_vector_type__(3)));
struct S { }; // expected-note 2 {{candidate constructor}}
@@ -22,19 +23,43 @@ void f() {
(void)reinterpret_cast<__v2si>(ll);
(void)(__v2si)(ll);
- (void)reinterpret_cast<S>(v2si); // expected-error {{reinterpret_cast from '__v2si' to 'S' is not allowed}}
- (void)(S)v2si; // expected-error {{no matching conversion for C-style cast from '__v2si' to 'S'}}
- (void)reinterpret_cast<__v2si>(s); // expected-error {{reinterpret_cast from 'S' to '__v2si' is not allowed}}
- (void)(__v2si)s; // expected-error {{cannot convert 'S' to '__v2si' without a conversion operator}}
+ (void)reinterpret_cast<S>(v2si); // expected-error {{reinterpret_cast from '__v2si' (vector of 2 'int' values) to 'S' is not allowed}}
+ (void)(S)v2si; // expected-error {{no matching conversion for C-style cast from '__v2si' (vector of 2 'int' values) to 'S'}}
+ (void)reinterpret_cast<__v2si>(s); // expected-error {{reinterpret_cast from 'S' to '__v2si' (vector of 2 'int' values) is not allowed}}
+ (void)(__v2si)s; // expected-error {{cannot convert 'S' to '__v2si' (vector of 2 'int' values) without a conversion operator}}
- (void)reinterpret_cast<unsigned char>(v2si); // expected-error {{reinterpret_cast from vector '__v2si' to scalar 'unsigned char' of different size}}
- (void)(unsigned char)v2si; // expected-error {{C-style cast from vector '__v2si' to scalar 'unsigned char' of different size}}
- (void)reinterpret_cast<__v2si>(c); // expected-error {{reinterpret_cast from scalar 'unsigned char' to vector '__v2si' of different size}}
+ (void)reinterpret_cast<unsigned char>(v2si); // expected-error {{reinterpret_cast from vector '__v2si' (vector of 2 'int' values) to scalar 'unsigned char' of different size}}
+ (void)(unsigned char)v2si; // expected-error {{C-style cast from vector '__v2si' (vector of 2 'int' values) to scalar 'unsigned char' of different size}}
+ (void)reinterpret_cast<__v2si>(c); // expected-error {{reinterpret_cast from scalar 'unsigned char' to vector '__v2si' (vector of 2 'int' values) of different size}}
- (void)reinterpret_cast<__v8hi>(v4hi); // expected-error {{reinterpret_cast from vector '__v4hi' to vector '__v8hi' of different size}}
- (void)(__v8hi)v4hi; // expected-error {{C-style cast from vector '__v4hi' to vector '__v8hi' of different size}}
- (void)reinterpret_cast<__v4hi>(v8hi); // expected-error {{reinterpret_cast from vector '__v8hi' to vector '__v4hi' of different size}}
- (void)(__v4hi)v8hi; // expected-error {{C-style cast from vector '__v8hi' to vector '__v4hi' of different size}}
+ (void)reinterpret_cast<__v8hi>(v4hi); // expected-error {{reinterpret_cast from vector '__v4hi' (vector of 4 'short' values) to vector '__v8hi' (vector of 8 'short' values) of different size}}
+ (void)(__v8hi)v4hi; // expected-error {{C-style cast from vector '__v4hi' (vector of 4 'short' values) to vector '__v8hi' (vector of 8 'short' values) of different size}}
+ (void)reinterpret_cast<__v4hi>(v8hi); // expected-error {{reinterpret_cast from vector '__v8hi' (vector of 8 'short' values) to vector '__v4hi' (vector of 4 'short' values) of different size}}
+ (void)(__v4hi)v8hi; // expected-error {{C-style cast from vector '__v8hi' (vector of 8 'short' values) to vector '__v4hi' (vector of 4 'short' values) of different size}}
}
+struct testvec {
+ __v2si v;
+ void madd(const testvec& rhs) {
+ v = v + rhs; // expected-error {{can't convert between vector and non-scalar values}}
+ }
+ void madd2(testvec rhs) {
+ v = v + rhs; // expected-error {{can't convert between vector and non-scalar values}}
+ }
+};
+// rdar://15931426
+// Conversions for return values.
+__v4hi threeToFour(__v3hi v) { // expected-note {{not viable}}
+ return v; // expected-error {{cannot initialize return object}}
+}
+__v3hi fourToThree(__v4hi v) { // expected-note {{not viable}}
+ return v; // expected-error {{cannot initialize return object}}
+}
+// Conversions for calls.
+void call3to4(__v4hi v) {
+ (void) threeToFour(v); // expected-error {{no matching function for call}}
+}
+void call4to3(__v3hi v) {
+ (void) fourToThree(v); // expected-error {{no matching function for call}}
+}
diff --git a/test/SemaCXX/vector.cpp b/test/SemaCXX/vector.cpp
index 7957c23e3e24..bcd7fedb4df2 100644
--- a/test/SemaCXX/vector.cpp
+++ b/test/SemaCXX/vector.cpp
@@ -24,8 +24,8 @@ void f1_test(char16 c16, longlong16 ll16, char16_e c16e, longlong16_e ll16e) {
f1(ll16e); // expected-error{{call to 'f1' is ambiguous}}
}
-void f2(char16_e); // expected-note{{no known conversion from 'longlong16_e' to 'char16_e' for 1st argument}} \
- // expected-note{{candidate function not viable: no known conversion from 'convertible_to<longlong16_e>' to 'char16_e' for 1st argument}}
+void f2(char16_e); // expected-note{{no known conversion from 'longlong16_e' (vector of 2 'long long' values) to 'char16_e' (vector of 16 'char' values) for 1st argument}} \
+ // expected-note{{candidate function not viable: no known conversion from 'convertible_to<longlong16_e>' to 'char16_e' (vector of 16 'char' values) for 1st argument}}
void f2_test(char16 c16, longlong16 ll16, char16_e c16e, longlong16_e ll16e) {
f2(c16);
@@ -85,7 +85,7 @@ void casts(longlong16 ll16, longlong16_e ll16e) {
(void)static_cast<longlong16>(ll16);
(void)static_cast<longlong16_e>(ll16);
(void)static_cast<char16>(ll16e);
- (void)static_cast<char16_e>(ll16e); // expected-error{{static_cast from 'longlong16_e' to 'char16_e' is not allowed}}
+ (void)static_cast<char16_e>(ll16e); // expected-error{{static_cast from 'longlong16_e' (vector of 2 'long long' values) to 'char16_e' (vector of 16 'char' values) is not allowed}}
(void)static_cast<longlong16>(ll16e);
(void)static_cast<longlong16_e>(ll16e);
@@ -194,11 +194,11 @@ typedef float fltx4 __attribute__((__vector_size__(16)));
typedef double dblx2 __attribute__((__vector_size__(16)));
typedef double dblx4 __attribute__((__vector_size__(32)));
-void accept_fltx2(fltx2); // expected-note{{candidate function not viable: no known conversion from 'double' to 'fltx2' for 1st argument}}
+void accept_fltx2(fltx2); // expected-note{{candidate function not viable: no known conversion from 'double' to 'fltx2' (vector of 2 'float' values) for 1st argument}}
void accept_fltx4(fltx4);
void accept_dblx2(dblx2);
void accept_dblx4(dblx4);
-void accept_bool(bool); // expected-note{{candidate function not viable: no known conversion from 'fltx2' to 'bool' for 1st argument}}
+void accept_bool(bool); // expected-note{{candidate function not viable: no known conversion from 'fltx2' (vector of 2 'float' values) to 'bool' for 1st argument}}
void test(fltx2 fltx2_val, fltx4 fltx4_val, dblx2 dblx2_val, dblx4 dblx4_val) {
// Exact matches
diff --git a/test/SemaCXX/virtual-base-used.cpp b/test/SemaCXX/virtual-base-used.cpp
index 04518ce4d47b..c46cf5a8c9ef 100644
--- a/test/SemaCXX/virtual-base-used.cpp
+++ b/test/SemaCXX/virtual-base-used.cpp
@@ -1,42 +1,89 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -triple %itanium_abi_triple -verify %s
+// RUN: %clang_cc1 -fsyntax-only -triple %ms_abi_triple -DMSABI -verify %s
// PR7800
+// The Microsoft ABI doesn't have the concept of key functions, so we have different
+// expectations about when functions are first required for that case.
+
+#ifdef MSABI
+// expected-note@+2 3 {{declared private here}}
+#endif
class NoDestroy { ~NoDestroy(); }; // expected-note 3 {{declared private here}}
struct A {
virtual ~A();
};
+#ifdef MSABI
+// expected-error@+3 {{field of type 'NoDestroy' has private destructor}}
+#endif
struct B : public virtual A {
NoDestroy x; // expected-error {{field of type 'NoDestroy' has private destructor}}
};
+#ifdef MSABI
+// expected-note@+3 {{implicit default constructor for 'B' first required here}}
+// expected-note@+2 {{implicit destructor for 'B' first required here}}
+#endif
struct D : public virtual B {
virtual void foo();
~D();
};
+#ifdef MSABI
+D d; // expected-note {{implicit default constructor for 'D' first required here}}
+#else
void D::foo() { // expected-note {{implicit destructor for 'B' first required here}}
}
+#endif
+#ifdef MSABI
+// expected-error@+3 {{field of type 'NoDestroy' has private destructor}}
+#endif
struct E : public virtual A {
NoDestroy x; // expected-error {{field of type 'NoDestroy' has private destructor}}
};
+#ifdef MSABI
+// expected-note@+2 {{implicit default constructor for 'E' first required here}}
+#endif
struct F : public E { // expected-note {{implicit destructor for 'E' first required here}}
};
+#ifdef MSABI
+// expected-note@+2 {{implicit default constructor for 'F' first required here}}
+#endif
struct G : public virtual F {
virtual void foo();
~G();
};
+#ifdef MSABI
+G g; // expected-note {{implicit default constructor for 'G' first required here}}
+#else
void G::foo() { // expected-note {{implicit destructor for 'F' first required here}}
}
+#endif
+#ifdef MSABI
+// expected-note@+3 {{'H' declared here}}
+// expected-error@+3 {{field of type 'NoDestroy' has private destructor}}
+#endif
struct H : public virtual A {
NoDestroy x; // expected-error {{field of type 'NoDestroy' has private destructor}}
};
+#ifdef MSABI
+// expected-error@+3 {{implicit default constructor for 'I' must explicitly initialize the base class 'H' which does not have a default constructor}}
+// expected-note@+2 {{implicit destructor for 'H' first required here}}
+#endif
struct I : public virtual H {
~I();
};
+#ifdef MSABI
+// expected-note@+3 {{implicit default constructor for 'H' first required here}}
+// expected-note@+2 {{implicit default constructor for 'I' first required here}}
+#endif
struct J : public I {
virtual void foo();
~J();
};
+#ifdef MSABI
+J j; // expected-note {{implicit default constructor for 'J' first required here}}
+#else
void J::foo() { // expected-note {{implicit destructor for 'H' first required here}}
}
+#endif
diff --git a/test/SemaCXX/virtual-override-x86.cpp b/test/SemaCXX/virtual-override-x86.cpp
index 75d8af3b3ea3..1d9d1fbe53b6 100644
--- a/test/SemaCXX/virtual-override-x86.cpp
+++ b/test/SemaCXX/virtual-override-x86.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple=i686-pc-unknown -fsyntax-only -verify %s -std=c++11 -cxx-abi microsoft
+// RUN: %clang_cc1 -triple=i686-pc-win32 -fsyntax-only -verify %s -std=c++11
namespace PR14339 {
class A {
diff --git a/test/SemaCXX/virtual-override.cpp b/test/SemaCXX/virtual-override.cpp
index b477438ee988..e95acabad2b1 100644
--- a/test/SemaCXX/virtual-override.cpp
+++ b/test/SemaCXX/virtual-override.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11
+// RUN: %clang_cc1 -fsyntax-only -triple %itanium_abi_triple -verify %s -std=c++11
+// RUN: %clang_cc1 -fsyntax-only -triple %ms_abi_triple -verify %s -std=c++11
namespace T1 {
class A {
diff --git a/test/SemaCXX/vla.cpp b/test/SemaCXX/vla.cpp
index d63b6335f453..dae6450553aa 100644
--- a/test/SemaCXX/vla.cpp
+++ b/test/SemaCXX/vla.cpp
@@ -3,3 +3,17 @@
// PR11925
int n;
int (&f())[n]; // expected-error {{function declaration cannot have variably modified type}}
+
+namespace PR18581 {
+ template<typename T> struct pod {};
+ template<typename T> struct error {
+ typename T::error e; // expected-error {{cannot be used prior to '::'}}
+ };
+ struct incomplete; // expected-note {{forward declaration}}
+
+ void f(int n) {
+ pod<int> a[n];
+ error<int> b[n]; // expected-note {{instantiation}}
+ incomplete c[n]; // expected-error {{incomplete}}
+ }
+}
diff --git a/test/SemaCXX/vtordisp-mode.cpp b/test/SemaCXX/vtordisp-mode.cpp
new file mode 100644
index 000000000000..dc91534d26b7
--- /dev/null
+++ b/test/SemaCXX/vtordisp-mode.cpp
@@ -0,0 +1,26 @@
+// RUN: %clang_cc1 -triple i686-pc-win32 -std=c++11 -vtordisp-mode=0 -DVTORDISP_MODE=0 %s -verify
+// RUN: %clang_cc1 -triple i686-pc-win32 -std=c++11 -vtordisp-mode=1 -DVTORDISP_MODE=1 %s -verify
+// RUN: %clang_cc1 -triple i686-pc-win32 -std=c++11 -vtordisp-mode=2 -DVTORDISP_MODE=2 %s -verify
+
+// expected-no-diagnostics
+
+struct A {
+ A();
+ virtual void foo();
+};
+
+// At /vd1, there is a vtordisp before A.
+struct B : virtual A {
+ B();
+ virtual void foo();
+ virtual void bar();
+};
+
+// At /vd2, there is a vtordisp before B, but only because it has its own
+// vftable.
+struct C : virtual B {
+ C();
+};
+
+// There are two vfptrs, two vbptrs, and some number of vtordisps.
+static_assert(sizeof(C) == 2 * 4 + 2 * 4 + 4 * VTORDISP_MODE, "size mismatch");
diff --git a/test/SemaCXX/warn-absolute-value-header.cpp b/test/SemaCXX/warn-absolute-value-header.cpp
new file mode 100644
index 000000000000..925be38ace08
--- /dev/null
+++ b/test/SemaCXX/warn-absolute-value-header.cpp
@@ -0,0 +1,53 @@
+// RUN: %clang_cc1 -triple i686-pc-linux-gnu -fsyntax-only -verify %s -Wabsolute-value
+// RUN: %clang_cc1 -triple i686-pc-linux-gnu -fsyntax-only %s -Wabsolute-value -fdiagnostics-parseable-fixits 2>&1 | FileCheck %s
+
+extern "C" {
+ int abs(int);
+ float fabsf(float);
+}
+
+namespace std {
+ int abs(int);
+ float abs(float);
+}
+
+void test(long long ll, double d, int i, float f) {
+ // Suggest including cmath
+ (void)abs(d);
+ // expected-warning@-1{{using integer absolute value function 'abs' when argument is of floating point type}}
+ // expected-note@-2{{use function 'std::abs' instead}}
+ // expected-note@-3{{include the header <cmath> or explicitly provide a declaration for 'std::abs'}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-4]]:9-[[@LINE-4]]:12}:"std::abs"
+
+ (void)fabsf(d);
+ // expected-warning@-1{{absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value}}
+ // expected-note@-2{{use function 'std::abs' instead}}
+ // expected-note@-3{{include the header <cmath> or explicitly provide a declaration for 'std::abs'}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-4]]:9-[[@LINE-4]]:14}:"std::abs"
+
+ // Suggest including cstdlib
+ (void)abs(ll);
+ // expected-warning@-1{{absolute value function 'abs' given an argument of type 'long long' but has parameter of type 'int' which may cause truncation of value}}
+ // expected-note@-2{{use function 'std::abs' instead}}
+ // expected-note@-3{{include the header <cstdlib> or explicitly provide a declaration for 'std::abs'}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-4]]:9-[[@LINE-4]]:12}:"std::abs"
+ (void)fabsf(ll);
+ // expected-warning@-1{{using floating point absolute value function 'fabsf' when argument is of integer type}}
+ // expected-note@-2{{use function 'std::abs' instead}}
+ // expected-note@-3{{include the header <cstdlib> or explicitly provide a declaration for 'std::abs'}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-4]]:9-[[@LINE-4]]:14}:"std::abs"
+
+ // Proper function already called, no warnings.
+ (void)abs(i);
+ (void)fabsf(f);
+
+ // Declarations found, suggest name change.
+ (void)fabsf(i);
+ // expected-warning@-1{{using floating point absolute value function 'fabsf' when argument is of integer type}}
+ // expected-note@-2{{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"std::abs"
+ (void)abs(f);
+ // expected-warning@-1{{using integer absolute value function 'abs' when argument is of floating point type}}
+ // expected-note@-2{{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:"std::abs"
+}
diff --git a/test/SemaCXX/warn-absolute-value.cpp b/test/SemaCXX/warn-absolute-value.cpp
new file mode 100644
index 000000000000..8a8a6fd67d34
--- /dev/null
+++ b/test/SemaCXX/warn-absolute-value.cpp
@@ -0,0 +1,823 @@
+// RUN: %clang_cc1 -triple i686-pc-linux-gnu -fsyntax-only -verify %s -Wabsolute-value -std=c++11
+// RUN: %clang_cc1 -triple i686-pc-linux-gnu -fsyntax-only %s -Wabsolute-value -fdiagnostics-parseable-fixits -std=c++11 2>&1 | FileCheck %s
+
+extern "C" {
+int abs(int);
+long int labs(long int);
+long long int llabs(long long int);
+
+float fabsf(float);
+double fabs(double);
+long double fabsl(long double);
+
+float cabsf(float _Complex);
+double cabs(double _Complex);
+long double cabsl(long double _Complex);
+}
+
+namespace std {
+
+inline namespace __1 {
+int abs(int);
+long int abs(long int);
+long long int abs(long long int);
+}
+
+float abs(float);
+double abs(double);
+long double abs(long double);
+
+template <typename T>
+double abs(T);
+
+}
+
+void test_int(int x) {
+ (void)std::abs(x);
+
+ (void)abs(x);
+ (void)labs(x);
+ (void)llabs(x);
+
+ (void)fabsf(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabsf' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"std::abs"
+ (void)fabs(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabs' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"std::abs"
+ (void)fabsl(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabsl' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"std::abs"
+
+ (void)cabsf(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabsf' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"std::abs"
+ (void)cabs(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabs' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"std::abs"
+ (void)cabsl(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabsl' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"std::abs"
+
+ (void)__builtin_abs(x);
+ (void)__builtin_labs(x);
+ (void)__builtin_llabs(x);
+
+ (void)__builtin_fabsf(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsf' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"std::abs"
+ (void)__builtin_fabs(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabs' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"std::abs"
+ (void)__builtin_fabsl(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsl' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"std::abs"
+
+ (void)__builtin_cabsf(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabsf' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"std::abs"
+ (void)__builtin_cabs(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabs' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"std::abs"
+ (void)__builtin_cabsl(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabsl' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"std::abs"
+}
+
+void test_long(long x) {
+ (void)std::abs(x);
+
+ (void)abs(x); // no warning - int and long are same length for this target
+ (void)labs(x);
+ (void)llabs(x);
+
+ (void)fabsf(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabsf' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"std::abs"
+ (void)fabs(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabs' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"std::abs"
+ (void)fabsl(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabsl' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"std::abs"
+
+ (void)cabsf(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabsf' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"std::abs"
+ (void)cabs(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabs' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"std::abs"
+ (void)cabsl(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabsl' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"std::abs"
+
+ (void)__builtin_abs(x); // no warning - int and long are same length for
+ // this target
+ (void)__builtin_labs(x);
+ (void)__builtin_llabs(x);
+
+ (void)__builtin_fabsf(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsf' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"std::abs"
+ (void)__builtin_fabs(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabs' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"std::abs"
+ (void)__builtin_fabsl(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsl' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"std::abs"
+
+ (void)__builtin_cabsf(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabsf' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"std::abs"
+ (void)__builtin_cabs(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabs' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"std::abs"
+ (void)__builtin_cabsl(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabsl' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"std::abs"
+}
+
+void test_long_long(long long x) {
+ (void)std::abs(x);
+
+ (void)abs(x);
+ // expected-warning@-1{{absolute value function 'abs' given an argument of type 'long long' but has parameter of type 'int' which may cause truncation of value}}
+ // expected-note@-2{{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:"std::abs"
+ (void)labs(x);
+ // expected-warning@-1{{absolute value function 'labs' given an argument of type 'long long' but has parameter of type 'long' which may cause truncation of value}}
+ // expected-note@-2{{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"std::abs"
+ (void)llabs(x);
+
+ (void)fabsf(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabsf' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"std::abs"
+ (void)fabs(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabs' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"std::abs"
+ (void)fabsl(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabsl' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"std::abs"
+
+ (void)cabsf(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabsf' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"std::abs"
+ (void)cabs(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabs' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"std::abs"
+ (void)cabsl(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabsl' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"std::abs"
+
+ (void)__builtin_abs(x);
+ // expected-warning@-1{{absolute value function '__builtin_abs' given an argument of type 'long long' but has parameter of type 'int' which may cause truncation of value}}
+ // expected-note@-2{{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:"std::abs"
+ (void)__builtin_labs(x);
+ // expected-warning@-1{{absolute value function '__builtin_labs' given an argument of type 'long long' but has parameter of type 'long' which may cause truncation of value}}
+ // expected-note@-2{{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"std::abs"
+ (void)__builtin_llabs(x);
+
+ (void)__builtin_fabsf(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsf' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"std::abs"
+ (void)__builtin_fabs(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabs' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"std::abs"
+ (void)__builtin_fabsl(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsl' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"std::abs"
+
+ (void)__builtin_cabsf(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabsf' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"std::abs"
+ (void)__builtin_cabs(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabs' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"std::abs"
+ (void)__builtin_cabsl(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabsl' when argument is of integer type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"std::abs"
+}
+
+void test_float(float x) {
+ (void)std::abs(x);
+
+ (void)abs(x);
+ // expected-warning@-1 {{using integer absolute value function 'abs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:"std::abs"
+ (void)labs(x);
+ // expected-warning@-1 {{using integer absolute value function 'labs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"std::abs"
+ (void)llabs(x);
+ // expected-warning@-1 {{using integer absolute value function 'llabs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"std::abs"
+
+ (void)fabsf(x);
+ (void)fabs(x);
+ (void)fabsl(x);
+
+ (void)cabsf(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabsf' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"std::abs"
+ (void)cabs(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"std::abs"
+ (void)cabsl(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabsl' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"std::abs"
+
+ (void)__builtin_abs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_abs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:"std::abs"
+ (void)__builtin_labs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_labs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"std::abs"
+ (void)__builtin_llabs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_llabs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"std::abs"
+
+ (void)__builtin_fabsf(x);
+ (void)__builtin_fabs(x);
+ (void)__builtin_fabsl(x);
+
+ (void)__builtin_cabsf(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabsf' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"std::abs"
+ (void)__builtin_cabs(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"std::abs"
+ (void)__builtin_cabsl(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabsl' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"std::abs"
+}
+
+void test_double(double x) {
+ (void)std::abs(x);
+
+ (void)abs(x);
+ // expected-warning@-1 {{using integer absolute value function 'abs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:"std::abs"
+ (void)labs(x);
+ // expected-warning@-1 {{using integer absolute value function 'labs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"std::abs"
+ (void)llabs(x);
+ // expected-warning@-1 {{using integer absolute value function 'llabs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"std::abs"
+
+ (void)fabsf(x);
+ // expected-warning@-1{{absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value}}
+ // expected-note@-2{{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"std::abs"
+ (void)fabs(x);
+ (void)fabsl(x);
+
+ (void)cabsf(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabsf' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"std::abs"
+ (void)cabs(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"std::abs"
+ (void)cabsl(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabsl' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"std::abs"
+
+ (void)__builtin_abs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_abs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:"std::abs"
+ (void)__builtin_labs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_labs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"std::abs"
+ (void)__builtin_llabs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_llabs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"std::abs"
+
+ (void)__builtin_fabsf(x);
+ // expected-warning@-1{{absolute value function '__builtin_fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value}}
+ // expected-note@-2{{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"std::abs"
+ (void)__builtin_fabs(x);
+ (void)__builtin_fabsl(x);
+
+ (void)__builtin_cabsf(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabsf' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"std::abs"
+ (void)__builtin_cabs(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"std::abs"
+ (void)__builtin_cabsl(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabsl' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"std::abs"
+}
+
+void test_long_double(long double x) {
+ (void)std::abs(x);
+
+ (void)abs(x);
+ // expected-warning@-1 {{using integer absolute value function 'abs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:"std::abs"
+ (void)labs(x);
+ // expected-warning@-1 {{using integer absolute value function 'labs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"std::abs"
+ (void)llabs(x);
+ // expected-warning@-1 {{using integer absolute value function 'llabs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"std::abs"
+
+ (void)fabsf(x);
+ // expected-warning@-1{{absolute value function 'fabsf' given an argument of type 'long double' but has parameter of type 'float' which may cause truncation of value}}
+ // expected-note@-2{{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"std::abs"
+ (void)fabs(x);
+ // expected-warning@-1{{absolute value function 'fabs' given an argument of type 'long double' but has parameter of type 'double' which may cause truncation of value}}
+ // expected-note@-2{{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"std::abs"
+ (void)fabsl(x);
+
+ (void)cabsf(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabsf' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"std::abs"
+ (void)cabs(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"std::abs"
+ (void)cabsl(x);
+ // expected-warning@-1 {{using complex absolute value function 'cabsl' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"std::abs"
+
+ (void)__builtin_abs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_abs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:"std::abs"
+ (void)__builtin_labs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_labs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"std::abs"
+ (void)__builtin_llabs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_llabs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"std::abs"
+
+ (void)__builtin_fabsf(x);
+ // expected-warning@-1{{absolute value function '__builtin_fabsf' given an argument of type 'long double' but has parameter of type 'float' which may cause truncation of value}}
+ // expected-note@-2{{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"std::abs"
+ (void)__builtin_fabs(x);
+ // expected-warning@-1{{absolute value function '__builtin_fabs' given an argument of type 'long double' but has parameter of type 'double' which may cause truncation of value}}
+ // expected-note@-2{{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"std::abs"
+ (void)__builtin_fabsl(x);
+
+ (void)__builtin_cabsf(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabsf' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"std::abs"
+ (void)__builtin_cabs(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabs' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"std::abs"
+ (void)__builtin_cabsl(x);
+ // expected-warning@-1 {{using complex absolute value function '__builtin_cabsl' when argument is of floating point type}}
+ // expected-note@-2 {{use function 'std::abs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"std::abs"
+}
+
+void test_complex_float(_Complex float x) {
+ (void)abs(x);
+ // expected-warning@-1 {{using integer absolute value function 'abs' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:"cabsf"
+ (void)labs(x);
+ // expected-warning@-1 {{using integer absolute value function 'labs' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"cabsf"
+ (void)llabs(x);
+ // expected-warning@-1 {{using integer absolute value function 'llabs' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabsf"
+
+ (void)fabsf(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabsf' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabsf"
+ (void)fabs(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabs' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"cabsf"
+ (void)fabsl(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabsl' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabsf"
+
+ (void)cabsf(x);
+ (void)cabs(x);
+ (void)cabsl(x);
+
+ (void)__builtin_abs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_abs' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:"__builtin_cabsf"
+ (void)__builtin_labs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_labs' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_cabsf"
+ (void)__builtin_llabs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_llabs' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabsf"
+
+ (void)__builtin_fabsf(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsf' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabsf"
+ (void)__builtin_fabs(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabs' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_cabsf"
+ (void)__builtin_fabsl(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsl' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabsf' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabsf"
+
+ (void)__builtin_cabsf(x);
+ (void)__builtin_cabs(x);
+ (void)__builtin_cabsl(x);
+}
+
+void test_complex_double(_Complex double x) {
+ (void)abs(x);
+ // expected-warning@-1 {{using integer absolute value function 'abs' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:"cabs"
+ (void)labs(x);
+ // expected-warning@-1 {{using integer absolute value function 'labs' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"cabs"
+ (void)llabs(x);
+ // expected-warning@-1 {{using integer absolute value function 'llabs' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabs"
+
+ (void)fabsf(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabsf' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabs"
+ (void)fabs(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabs' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"cabs"
+ (void)fabsl(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabsl' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabs"
+
+ (void)cabsf(x);
+ // expected-warning@-1 {{absolute value function 'cabsf' given an argument of type '_Complex double' but has parameter of type '_Complex float' which may cause truncation of value}}
+ // expected-note@-2 {{use function 'cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabs"
+ (void)cabs(x);
+ (void)cabsl(x);
+
+ (void)__builtin_abs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_abs' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:"__builtin_cabs"
+ (void)__builtin_labs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_labs' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_cabs"
+ (void)__builtin_llabs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_llabs' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabs"
+
+ (void)__builtin_fabsf(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsf' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabs"
+ (void)__builtin_fabs(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabs' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_cabs"
+ (void)__builtin_fabsl(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsl' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabs"
+
+ (void)__builtin_cabsf(x);
+ // expected-warning@-1 {{absolute value function '__builtin_cabsf' given an argument of type '_Complex double' but has parameter of type '_Complex float' which may cause truncation of value}}
+ // expected-note@-2 {{use function '__builtin_cabs' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabs"
+ (void)__builtin_cabs(x);
+ (void)__builtin_cabsl(x);
+}
+
+void test_complex_long_double(_Complex long double x) {
+ (void)abs(x);
+ // expected-warning@-1 {{using integer absolute value function 'abs' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:"cabsl"
+ (void)labs(x);
+ // expected-warning@-1 {{using integer absolute value function 'labs' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"cabsl"
+ (void)llabs(x);
+ // expected-warning@-1 {{using integer absolute value function 'llabs' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabsl"
+
+ (void)fabsf(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabsf' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabsl"
+ (void)fabs(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabs' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"cabsl"
+ (void)fabsl(x);
+ // expected-warning@-1 {{using floating point absolute value function 'fabsl' when argument is of complex type}}
+ // expected-note@-2 {{use function 'cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabsl"
+
+ (void)cabsf(x);
+ // expected-warning@-1 {{absolute value function 'cabsf' given an argument of type '_Complex long double' but has parameter of type '_Complex float' which may cause truncation of value}}
+ // expected-note@-2 {{use function 'cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:"cabsl"
+ (void)cabs(x);
+ // expected-warning@-1 {{absolute value function 'cabs' given an argument of type '_Complex long double' but has parameter of type '_Complex double' which may cause truncation of value}}
+ // expected-note@-2 {{use function 'cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:"cabsl"
+ (void)cabsl(x);
+
+ (void)__builtin_abs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_abs' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:"__builtin_cabsl"
+ (void)__builtin_labs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_labs' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_cabsl"
+ (void)__builtin_llabs(x);
+ // expected-warning@-1 {{using integer absolute value function '__builtin_llabs' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabsl"
+
+ (void)__builtin_fabsf(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsf' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabsl"
+ (void)__builtin_fabs(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabs' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_cabsl"
+ (void)__builtin_fabsl(x);
+ // expected-warning@-1 {{using floating point absolute value function '__builtin_fabsl' when argument is of complex type}}
+ // expected-note@-2 {{use function '__builtin_cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabsl"
+
+ (void)__builtin_cabsf(x);
+ // expected-warning@-1 {{absolute value function '__builtin_cabsf' given an argument of type '_Complex long double' but has parameter of type '_Complex float' which may cause truncation of value}}
+ // expected-note@-2 {{use function '__builtin_cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:"__builtin_cabsl"
+ (void)__builtin_cabs(x);
+ // expected-warning@-1 {{absolute value function '__builtin_cabs' given an argument of type '_Complex long double' but has parameter of type '_Complex double' which may cause truncation of value}}
+ // expected-note@-2 {{use function '__builtin_cabsl' instead}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:"__builtin_cabsl"
+ (void)__builtin_cabsl(x);
+}
+
+void test_unsigned_int(unsigned int x) {
+ (void)std::abs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to 'std::abs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:17}:""
+
+ (void)abs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to 'abs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:""
+ (void)labs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to 'labs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:""
+ (void)llabs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to 'llabs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
+
+ (void)fabsf(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to 'fabsf' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
+ (void)fabs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to 'fabs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:""
+ (void)fabsl(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to 'fabsl' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
+
+ (void)cabsf(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to 'cabsf' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
+ (void)cabs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to 'cabs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:""
+ (void)cabsl(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to 'cabsl' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
+
+ (void)__builtin_abs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_abs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:""
+ (void)__builtin_labs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_labs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:""
+ (void)__builtin_llabs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_llabs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
+
+ (void)__builtin_fabsf(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_fabsf' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
+ (void)__builtin_fabs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_fabs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:""
+ (void)__builtin_fabsl(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_fabsl' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
+
+ (void)__builtin_cabsf(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_cabsf' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
+ (void)__builtin_cabs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_cabs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:""
+ (void)__builtin_cabsl(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned int' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_cabsl' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
+}
+
+void test_unsigned_long(unsigned long x) {
+ (void)std::abs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to 'std::abs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:17}:""
+
+ (void)abs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to 'abs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:12}:""
+ (void)labs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to 'labs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:""
+ (void)llabs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to 'llabs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
+
+ (void)fabsf(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to 'fabsf' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
+ (void)fabs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to 'fabs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:""
+ (void)fabsl(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to 'fabsl' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
+
+ (void)cabsf(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to 'cabsf' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
+ (void)cabs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to 'cabs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:13}:""
+ (void)cabsl(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to 'cabsl' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:14}:""
+
+ (void)__builtin_abs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_abs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:22}:""
+ (void)__builtin_labs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_labs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:""
+ (void)__builtin_llabs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_llabs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
+
+ (void)__builtin_fabsf(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_fabsf' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
+ (void)__builtin_fabs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_fabs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:""
+ (void)__builtin_fabsl(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_fabsl' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
+
+ (void)__builtin_cabsf(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_cabsf' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
+ (void)__builtin_cabs(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_cabs' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:23}:""
+ (void)__builtin_cabsl(x);
+ // expected-warning@-1 {{taking the absolute value of unsigned type 'unsigned long' has no effect}}
+ // expected-note@-2 {{remove the call to '__builtin_cabsl' since unsigned values cannot be negative}}
+ // CHECK: fix-it:"{{.*}}":{[[@LINE-3]]:9-[[@LINE-3]]:24}:""
+}
+
diff --git a/test/SemaCXX/warn-address.cpp b/test/SemaCXX/warn-address.cpp
new file mode 100644
index 000000000000..219edfdc80c2
--- /dev/null
+++ b/test/SemaCXX/warn-address.cpp
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-bool-conversion -Wno-string-compare -Wno-tautological-compare -Waddress %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+void foo();
+int arr[5];
+int global;
+const char* str = "";
+
+void test() {
+ if (foo) {} // expected-warning{{always evaluate to 'true'}} \
+ // expected-note{{silence}}
+ if (arr) {} // expected-warning{{always evaluate to 'true'}}
+ if (&global) {} // expected-warning{{always evaluate to 'true'}}
+ if (foo == 0) {} // expected-warning{{always false}} \
+ // expected-note{{silence}}
+ if (arr == 0) {} // expected-warning{{always false}}
+ if (&global == 0) {} // expected-warning{{always false}}
+
+ if (str == "foo") {} // expected-warning{{unspecified}}
+}
diff --git a/test/SemaCXX/warn-bad-memaccess.cpp b/test/SemaCXX/warn-bad-memaccess.cpp
index 7a7459acee1d..e86610ab64d9 100644
--- a/test/SemaCXX/warn-bad-memaccess.cpp
+++ b/test/SemaCXX/warn-bad-memaccess.cpp
@@ -24,6 +24,11 @@ public:
struct X1 { virtual void f(); } x1;
struct X2 : virtual S1 {} x2;
+struct ContainsDynamic { X1 dynamic; } contains_dynamic;
+struct DeepContainsDynamic { ContainsDynamic m; } deep_contains_dynamic;
+struct ContainsArrayDynamic { X1 dynamic[1]; } contains_array_dynamic;
+struct ContainsPointerDynamic { X1 *dynamic; } contains_pointer_dynamic;
+
void test_warn() {
memset(&x1, 0, sizeof x1); // \
// expected-warning {{destination for this 'memset' call is a pointer to dynamic class}} \
@@ -33,22 +38,22 @@ void test_warn() {
// expected-note {{explicitly cast the pointer to silence this warning}}
memmove(&x1, 0, sizeof x1); // \
- // expected-warning{{destination for this 'memmove' call is a pointer to dynamic class 'struct X1'; vtable pointer will be overwritten}} \
+ // expected-warning{{destination for this 'memmove' call is a pointer to dynamic class 'X1'; vtable pointer will be overwritten}} \
// expected-note {{explicitly cast the pointer to silence this warning}}
memmove(0, &x1, sizeof x1); // \
- // expected-warning{{source of this 'memmove' call is a pointer to dynamic class 'struct X1'; vtable pointer will be moved}} \
+ // expected-warning{{source of this 'memmove' call is a pointer to dynamic class 'X1'; vtable pointer will be moved}} \
// expected-note {{explicitly cast the pointer to silence this warning}}
memcpy(&x1, 0, sizeof x1); // \
- // expected-warning{{destination for this 'memcpy' call is a pointer to dynamic class 'struct X1'; vtable pointer will be overwritten}} \
+ // expected-warning{{destination for this 'memcpy' call is a pointer to dynamic class 'X1'; vtable pointer will be overwritten}} \
// expected-note {{explicitly cast the pointer to silence this warning}}
memcpy(0, &x1, sizeof x1); // \
- // expected-warning{{source of this 'memcpy' call is a pointer to dynamic class 'struct X1'; vtable pointer will be copied}} \
+ // expected-warning{{source of this 'memcpy' call is a pointer to dynamic class 'X1'; vtable pointer will be copied}} \
// expected-note {{explicitly cast the pointer to silence this warning}}
memcmp(&x1, 0, sizeof x1); // \
- // expected-warning{{first operand of this 'memcmp' call is a pointer to dynamic class 'struct X1'; vtable pointer will be compared}} \
+ // expected-warning{{first operand of this 'memcmp' call is a pointer to dynamic class 'X1'; vtable pointer will be compared}} \
// expected-note {{explicitly cast the pointer to silence this warning}}
memcmp(0, &x1, sizeof x1); // \
- // expected-warning{{second operand of this 'memcmp' call is a pointer to dynamic class 'struct X1'; vtable pointer will be compared}} \
+ // expected-warning{{second operand of this 'memcmp' call is a pointer to dynamic class 'X1'; vtable pointer will be compared}} \
// expected-note {{explicitly cast the pointer to silence this warning}}
__builtin_memset(&x1, 0, sizeof x1); // \
@@ -90,6 +95,16 @@ void test_warn() {
__builtin___memcpy_chk(0, &x1, sizeof x1, sizeof x1); // \
// expected-warning{{source of this '__builtin___memcpy_chk' call is a pointer to dynamic class}} \
// expected-note {{explicitly cast the pointer to silence this warning}}
+
+ // expected-warning@+2 {{destination for this 'memset' call is a pointer to class containing a dynamic class 'X1'}}
+ // expected-note@+1 {{explicitly cast the pointer to silence this warning}}
+ memset(&contains_dynamic, 0, sizeof(contains_dynamic));
+ // expected-warning@+2 {{destination for this 'memset' call is a pointer to class containing a dynamic class 'X1'}}
+ // expected-note@+1 {{explicitly cast the pointer to silence this warning}}
+ memset(&deep_contains_dynamic, 0, sizeof(deep_contains_dynamic));
+ // expected-warning@+2 {{destination for this 'memset' call is a pointer to class containing a dynamic class 'X1'}}
+ // expected-note@+1 {{explicitly cast the pointer to silence this warning}}
+ memset(&contains_array_dynamic, 0, sizeof(contains_array_dynamic));
}
void test_nowarn(void *void_ptr) {
@@ -107,6 +122,8 @@ void test_nowarn(void *void_ptr) {
memset(&s3, 0, sizeof s3);
memset(&c1, 0, sizeof c1);
+ memset(&contains_pointer_dynamic, 0, sizeof(contains_pointer_dynamic));
+
// Unevaluated code shouldn't warn.
(void)sizeof memset(&x1, 0, sizeof x1);
diff --git a/test/SemaCXX/warn-bool-conversion.cpp b/test/SemaCXX/warn-bool-conversion.cpp
index b3d136ecf2b1..b4628947f06e 100644
--- a/test/SemaCXX/warn-bool-conversion.cpp
+++ b/test/SemaCXX/warn-bool-conversion.cpp
@@ -1,5 +1,6 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
+namespace BooleanFalse {
int* j = false; // expected-warning{{initialization of pointer of type 'int *' to null from a constant boolean expression}}
void foo(int* i, int *j=(false)) // expected-warning{{initialization of pointer of type 'int *' to null from a constant boolean expression}}
@@ -22,3 +23,98 @@ double f(...);
// isn't flagged.
template <int N> struct S {};
S<sizeof(f(false))> s;
+
+}
+
+namespace Function {
+void f1();
+
+struct S {
+ static void f2();
+};
+
+extern void f3() __attribute__((weak_import));
+
+struct S2 {
+ static void f4() __attribute__((weak_import));
+};
+
+bool f5();
+bool f6(int);
+
+void bar() {
+ bool b;
+
+ b = f1; // expected-warning {{address of function 'f1' will always evaluate to 'true'}} \
+ expected-note {{prefix with the address-of operator to silence this warning}}
+ if (f1) {} // expected-warning {{address of function 'f1' will always evaluate to 'true'}} \
+ expected-note {{prefix with the address-of operator to silence this warning}}
+ b = S::f2; // expected-warning {{address of function 'S::f2' will always evaluate to 'true'}} \
+ expected-note {{prefix with the address-of operator to silence this warning}}
+ if (S::f2) {} // expected-warning {{address of function 'S::f2' will always evaluate to 'true'}} \
+ expected-note {{prefix with the address-of operator to silence this warning}}
+ b = f5; // expected-warning {{address of function 'f5' will always evaluate to 'true'}} \
+ expected-note {{prefix with the address-of operator to silence this warning}} \
+ expected-note {{suffix with parentheses to turn this into a function call}}
+ b = f6; // expected-warning {{address of function 'f6' will always evaluate to 'true'}} \
+ expected-note {{prefix with the address-of operator to silence this warning}}
+
+ // implicit casts of weakly imported symbols are ok:
+ b = f3;
+ if (f3) {}
+ b = S2::f4;
+ if (S2::f4) {}
+}
+}
+
+namespace Array {
+ #define GetValue(ptr) ((ptr) ? ptr[0] : 0)
+ extern int a[] __attribute__((weak));
+ int b[] = {8,13,21};
+ struct {
+ int x[10];
+ } c;
+ const char str[] = "text";
+ void ignore() {
+ if (a) {}
+ if (a) {}
+ (void)GetValue(b);
+ }
+ void test() {
+ if (b) {}
+ // expected-warning@-1{{address of array 'b' will always evaluate to 'true'}}
+ if (b) {}
+ // expected-warning@-1{{address of array 'b' will always evaluate to 'true'}}
+ if (c.x) {}
+ // expected-warning@-1{{address of array 'c.x' will always evaluate to 'true'}}
+ if (str) {}
+ // expected-warning@-1{{address of array 'str' will always evaluate to 'true'}}
+ }
+}
+
+namespace Pointer {
+ extern int a __attribute__((weak));
+ int b;
+ static int c;
+ class S {
+ public:
+ static int a;
+ int b;
+ };
+ void ignored() {
+ if (&a) {}
+ }
+ void test() {
+ S s;
+ if (&b) {}
+ // expected-warning@-1{{address of 'b' will always evaluate to 'true'}}
+ if (&c) {}
+ // expected-warning@-1{{address of 'c' will always evaluate to 'true'}}
+ if (&s.a) {}
+ // expected-warning@-1{{address of 's.a' will always evaluate to 'true'}}
+ if (&s.b) {}
+ // expected-warning@-1{{address of 's.b' will always evaluate to 'true'}}
+ if (&S::a) {}
+ // expected-warning@-1{{address of 'S::a' will always evaluate to 'true'}}
+ }
+}
diff --git a/test/SemaCXX/warn-consumed-analysis.cpp b/test/SemaCXX/warn-consumed-analysis.cpp
index 2c372c752baf..977b862a92b5 100644
--- a/test/SemaCXX/warn-consumed-analysis.cpp
+++ b/test/SemaCXX/warn-consumed-analysis.cpp
@@ -51,7 +51,7 @@ public:
class CONSUMABLE(unconsumed) DestructorTester {
public:
- DestructorTester() RETURN_TYPESTATE(unconsumed);
+ DestructorTester();
DestructorTester(int);
void operator*() CALLABLE_WHEN("unconsumed");
@@ -82,11 +82,21 @@ ConsumableClass<int> returnsUnknown() RETURN_TYPESTATE(unknown);
void testInitialization() {
ConsumableClass<int> var0;
ConsumableClass<int> var1 = ConsumableClass<int>();
-
- var0 = ConsumableClass<int>();
-
+ ConsumableClass<int> var2(42);
+ ConsumableClass<int> var3(var2); // copy constructor
+ ConsumableClass<int> var4(var0); // copy consumed value
+
*var0; // expected-warning {{invalid invocation of method 'operator*' on object 'var0' while it is in the 'consumed' state}}
*var1; // expected-warning {{invalid invocation of method 'operator*' on object 'var1' while it is in the 'consumed' state}}
+ *var2;
+ *var3;
+ *var4; // expected-warning {{invalid invocation of method 'operator*' on object 'var4' while it is in the 'consumed' state}}
+
+ var0 = ConsumableClass<int>(42);
+ *var0;
+
+ var0 = var1;
+ *var0; // expected-warning {{invalid invocation of method 'operator*' on object 'var0' while it is in the 'consumed' state}}
if (var0.isValid()) {
*var0;
@@ -98,19 +108,16 @@ void testInitialization() {
}
void testDestruction() {
- DestructorTester D0(42), D1(42);
+ DestructorTester D0(42), D1(42), D2;
*D0;
*D1;
-
- DestructorTester D2;
- *D2;
+ *D2; // expected-warning {{invalid invocation of method 'operator*' on object 'D2' while it is in the 'consumed' state}}
D0.~DestructorTester(); // expected-warning {{invalid invocation of method '~DestructorTester' on object 'D0' while it is in the 'unconsumed' state}}
return; // expected-warning {{invalid invocation of method '~DestructorTester' on object 'D0' while it is in the 'unconsumed' state}} \
- expected-warning {{invalid invocation of method '~DestructorTester' on object 'D1' while it is in the 'unconsumed' state}} \
- expected-warning {{invalid invocation of method '~DestructorTester' on object 'D2' while it is in the 'unconsumed' state}}
+ expected-warning {{invalid invocation of method '~DestructorTester' on object 'D1' while it is in the 'unconsumed' state}}
}
void testTempValue() {
@@ -427,6 +434,29 @@ void testParamTypestateCaller() {
testParamTypestateCallee(Var0, Var1); // expected-warning {{argument not in expected state; expected 'consumed', observed 'unconsumed'}}
}
+
+void consumeFunc(ConsumableClass<int> P PARAM_TYPESTATE(unconsumed));
+struct ParamTest {
+ static void consumeFuncStatic(ConsumableClass<int> P PARAM_TYPESTATE(unconsumed));
+ void consumeFuncMeth(ConsumableClass<int> P PARAM_TYPESTATE(unconsumed));
+ void operator<<(ConsumableClass<int> P PARAM_TYPESTATE(unconsumed));
+};
+
+void operator>>(ParamTest& pt, ConsumableClass<int> P PARAM_TYPESTATE(unconsumed));
+
+
+void testFunctionParams() {
+ // Make sure we handle the different kinds of functions.
+ ConsumableClass<int> P;
+
+ consumeFunc(P); // expected-warning {{argument not in expected state; expected 'unconsumed', observed 'consumed'}}
+ ParamTest::consumeFuncStatic(P); // expected-warning {{argument not in expected state; expected 'unconsumed', observed 'consumed'}}
+ ParamTest pt;
+ pt.consumeFuncMeth(P); // expected-warning {{argument not in expected state; expected 'unconsumed', observed 'consumed'}}
+ pt << P; // expected-warning {{argument not in expected state; expected 'unconsumed', observed 'consumed'}}
+ pt >> P; // expected-warning {{argument not in expected state; expected 'unconsumed', observed 'consumed'}}
+}
+
void baf3(ConsumableClass<int> var) {
*var;
}
@@ -645,12 +675,17 @@ void read(bool sf) {
} // end namespace ContinueICETest
-namespace InitializerAssertionFailTest {
+namespace StatusUseCaseTests {
-class CONSUMABLE(unconsumed) Status {
+class CONSUMABLE(unconsumed)
+ __attribute__((consumable_auto_cast_state))
+ __attribute__((consumable_set_state_on_read))
+ Status {
int code;
public:
+ static Status OK;
+
Status() RETURN_TYPESTATE(consumed);
Status(int c) RETURN_TYPESTATE(unconsumed);
@@ -660,6 +695,8 @@ public:
Status& operator=(const Status &other) CALLABLE_WHEN("unknown", "consumed");
Status& operator=(Status &&other) CALLABLE_WHEN("unknown", "consumed");
+ bool operator==(const Status &other) const SET_TYPESTATE(consumed);
+
bool check() const SET_TYPESTATE(consumed);
void ignore() const SET_TYPESTATE(consumed);
// Status& markAsChecked() { return *this; }
@@ -667,13 +704,22 @@ public:
void clear() CALLABLE_WHEN("unknown", "consumed") SET_TYPESTATE(consumed);
~Status() CALLABLE_WHEN("unknown", "consumed");
+
+ operator bool() const; // Will not consume the object.
};
bool cond();
Status doSomething();
void handleStatus(const Status& s RETURN_TYPESTATE(consumed));
-void handleStatusPtr(const Status* s);
+void handleStatusRef(Status& s);
+void handleStatusPtr(Status* s);
+void handleStatusUnmarked(const Status& s);
+
+void log(const char* msg);
+void fail() __attribute__((noreturn));
+void checkStat(const Status& s);
+
void testSimpleTemporaries0() {
doSomething(); // expected-warning {{invalid invocation of method '~Status' on a temporary object while it is in the 'unconsumed' state}}
@@ -691,6 +737,19 @@ void testSimpleTemporaries3() {
Status s = doSomething();
} // expected-warning {{invalid invocation of method '~Status' on object 's' while it is in the 'unconsumed' state}}
+void testTemporariesWithControlFlow(bool a) {
+ bool b = false || doSomething(); // expected-warning {{invalid invocation of method '~Status' on a temporary object while it is in the 'unconsumed' state}}
+}
+
+Status testSimpleTemporariesReturn0() {
+ return doSomething();
+}
+
+Status testSimpleTemporariesReturn1() {
+ Status s = doSomething();
+ return s;
+}
+
void testSimpleTemporaries4() {
Status s = doSomething();
s.check();
@@ -702,8 +761,17 @@ void testSimpleTemporaries5() {
}
void testSimpleTemporaries6() {
- Status s = doSomething();
- handleStatus(s);
+ Status s1 = doSomething();
+ handleStatus(s1);
+
+ Status s2 = doSomething();
+ handleStatusRef(s2);
+
+ Status s3 = doSomething();
+ handleStatusPtr(&s3);
+
+ Status s4 = doSomething();
+ handleStatusUnmarked(s4);
}
void testSimpleTemporaries7() {
@@ -745,38 +813,58 @@ void testTemporariesWithConditionals3() {
}
void testTemporariesAndConstructors0() {
- Status s(doSomething());
+ Status s(doSomething()); // Test the copy constructor.
s.check();
}
-void testTemporariesAndConstructors1() {
- // Test the copy constructor.
-
- Status s1 = doSomething();
+void testTemporariesAndConstructors1F() {
+ Status s1 = doSomething(); // Test the copy constructor.
+ Status s2 = s1;
+} // expected-warning {{invalid invocation of method '~Status' on object 's2' while it is in the 'unconsumed' state}}
+
+void testTemporariesAndConstructors1S() {
+ Status s1 = doSomething(); // Test the copy constructor.
Status s2(s1);
s2.check();
-} // expected-warning {{invalid invocation of method '~Status' on object 's1' while it is in the 'unconsumed' state}}
+}
-void testTemporariesAndConstructors2() {
+void testTemporariesAndConstructors2F() {
// Test the move constructor.
-
Status s1 = doSomething();
- Status s2(static_cast<Status&&>(s1));
+ Status s2 = static_cast<Status&&>(s1);
+} // expected-warning {{invalid invocation of method '~Status' on object 's2' while it is in the 'unconsumed' state}}
+
+void testTemporariesAndConstructors2S() {
+ // Test the move constructor.
+ Status s1 = doSomething();
+ Status s2 = static_cast<Status&&>(s1);
s2.check();
}
-void testTemporariesAndOperators0() {
+void testTemporariesAndOperators0F() {
+ // Test the assignment operator.
+ Status s1 = doSomething();
+ Status s2;
+ s2 = s1;
+} // expected-warning {{invalid invocation of method '~Status' on object 's2' while it is in the 'unconsumed' state}}
+
+void testTemporariesAndOperators0S() {
// Test the assignment operator.
-
Status s1 = doSomething();
Status s2;
s2 = s1;
s2.check();
-} // expected-warning {{invalid invocation of method '~Status' on object 's1' while it is in the 'unconsumed' state}}
+}
-void testTemporariesAndOperators1() {
+void testTemporariesAndOperators1F() {
+ // Test the move assignment operator.
+ Status s1 = doSomething();
+ Status s2;
+ s2 = static_cast<Status&&>(s1);
+} // expected-warning {{invalid invocation of method '~Status' on object 's2' while it is in the 'unconsumed' state}}
+
+void testTemporariesAndOperators1S() {
// Test the move assignment operator.
-
Status s1 = doSomething();
Status s2;
s2 = static_cast<Status&&>(s1);
@@ -791,6 +879,35 @@ void testTemporariesAndOperators2() {
s2.check();
}
+Status testReturnAutocast() {
+ Status s = doSomething();
+ s.check(); // consume s
+ return s; // should autocast back to unconsumed
+}
+
+
+namespace TestParens {
+
+void test3() {
+ checkStat((doSomething()));
+}
+
+void test4() {
+ Status s = (doSomething());
+ s.check();
+}
+
+void test5() {
+ (doSomething()).check();
+}
+
+void test6() {
+ if ((doSomething()) == Status::OK)
+ return;
+}
+
+} // end namespace TestParens
+
} // end namespace InitializerAssertionFailTest
@@ -820,3 +937,4 @@ namespace PR18260 {
std::__1::move(x);
}
} // end namespace PR18260
+
diff --git a/test/SemaCXX/warn-consumed-parsing.cpp b/test/SemaCXX/warn-consumed-parsing.cpp
index 0a91636ea949..5c0a04fffe36 100644
--- a/test/SemaCXX/warn-consumed-parsing.cpp
+++ b/test/SemaCXX/warn-consumed-parsing.cpp
@@ -17,9 +17,9 @@ int returnTypestateForUnconsumable() {
}
class AttrTester0 {
- void consumes() __attribute__ ((set_typestate())); // expected-error {{attribute takes one argument}}
- bool testUnconsumed() __attribute__ ((test_typestate())); // expected-error {{attribute takes one argument}}
- void callableWhen() __attribute__ ((callable_when())); // expected-error {{attribute takes at least 1 argument}}
+ void consumes() __attribute__ ((set_typestate())); // expected-error {{'set_typestate' attribute takes one argument}}
+ bool testUnconsumed() __attribute__ ((test_typestate())); // expected-error {{'test_typestate' attribute takes one argument}}
+ void callableWhen() __attribute__ ((callable_when())); // expected-error {{'callable_when' attribute takes at least 1 argument}}
};
int var0 SET_TYPESTATE(consumed); // expected-warning {{'set_typestate' attribute only applies to methods}}
@@ -53,3 +53,13 @@ class AttrTester2 {
};
class CONSUMABLE(42) AttrTester3; // expected-error {{'consumable' attribute requires an identifier}}
+
+
+class CONSUMABLE(unconsumed)
+ __attribute__((consumable_auto_cast_state))
+ __attribute__((consumable_set_state_on_read))
+ Status {
+};
+
+
+
diff --git a/test/SemaCXX/warn-exit-time-destructors.cpp b/test/SemaCXX/warn-exit-time-destructors.cpp
index f49134b71c97..124576aa95b6 100644
--- a/test/SemaCXX/warn-exit-time-destructors.cpp
+++ b/test/SemaCXX/warn-exit-time-destructors.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -Wexit-time-destructors %s -verify
+// RUN: %clang_cc1 -std=c++11 -fsyntax-only -Wexit-time-destructors %s -verify
namespace test1 {
struct A { ~A(); };
@@ -23,5 +23,23 @@ void f() {
static A &e = b[5];
static A &f = c[5][7];
}
+}
+
+namespace test3 {
+ struct A { ~A() = default; };
+ A a;
+
+ struct B { ~B(); };
+ struct C : B { ~C() = default; };
+ C c; // expected-warning {{exit-time destructor}}
+ class D {
+ friend struct E;
+ ~D() = default;
+ };
+ struct E : D {
+ D d;
+ ~E() = default;
+ };
+ E e;
}
diff --git a/test/SemaCXX/warn-float-conversion.cpp b/test/SemaCXX/warn-float-conversion.cpp
new file mode 100644
index 000000000000..22c33040b26b
--- /dev/null
+++ b/test/SemaCXX/warn-float-conversion.cpp
@@ -0,0 +1,38 @@
+// RUN: %clang_cc1 -verify -fsyntax-only %s -Wfloat-conversion
+
+bool ReturnBool(float f) {
+ return f; //expected-warning{{conversion}}
+}
+
+char ReturnChar(float f) {
+ return f; //expected-warning{{conversion}}
+}
+
+int ReturnInt(float f) {
+ return f; //expected-warning{{conversion}}
+}
+
+long ReturnLong(float f) {
+ return f; //expected-warning{{conversion}}
+}
+
+void Convert(float f, double d, long double ld) {
+ bool b;
+ char c;
+ int i;
+ long l;
+
+ b = f; //expected-warning{{conversion}}
+ b = d; //expected-warning{{conversion}}
+ b = ld; //expected-warning{{conversion}}
+ c = f; //expected-warning{{conversion}}
+ c = d; //expected-warning{{conversion}}
+ c = ld; //expected-warning{{conversion}}
+ i = f; //expected-warning{{conversion}}
+ i = d; //expected-warning{{conversion}}
+ i = ld; //expected-warning{{conversion}}
+ l = f; //expected-warning{{conversion}}
+ l = d; //expected-warning{{conversion}}
+ l = ld; //expected-warning{{conversion}}
+}
+
diff --git a/test/SemaCXX/warn-func-as-bool.cpp b/test/SemaCXX/warn-func-as-bool.cpp
deleted file mode 100644
index b5df744f9306..000000000000
--- a/test/SemaCXX/warn-func-as-bool.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-// RUN: %clang_cc1 -x c++ -verify -fsyntax-only %s
-
-void f1();
-
-struct S {
- static void f2();
-};
-
-extern void f3() __attribute__((weak_import));
-
-struct S2 {
- static void f4() __attribute__((weak_import));
-};
-
-bool f5();
-bool f6(int);
-
-void bar() {
- bool b;
-
- b = f1; // expected-warning {{address of function 'f1' will always evaluate to 'true'}} \
- expected-note {{prefix with the address-of operator to silence this warning}}
- if (f1) {} // expected-warning {{address of function 'f1' will always evaluate to 'true'}} \
- expected-note {{prefix with the address-of operator to silence this warning}}
- b = S::f2; // expected-warning {{address of function 'S::f2' will always evaluate to 'true'}} \
- expected-note {{prefix with the address-of operator to silence this warning}}
- if (S::f2) {} // expected-warning {{address of function 'S::f2' will always evaluate to 'true'}} \
- expected-note {{prefix with the address-of operator to silence this warning}}
- b = f5; // expected-warning {{address of function 'f5' will always evaluate to 'true'}} \
- expected-note {{prefix with the address-of operator to silence this warning}} \
- expected-note {{suffix with parentheses to turn this into a function call}}
- b = f6; // expected-warning {{address of function 'f6' will always evaluate to 'true'}} \
- expected-note {{prefix with the address-of operator to silence this warning}}
-
- // implicit casts of weakly imported symbols are ok:
- b = f3;
- if (f3) {}
- b = S2::f4;
- if (S2::f4) {}
-}
diff --git a/test/SemaCXX/warn-global-constructors.cpp b/test/SemaCXX/warn-global-constructors.cpp
index f57f0de70812..90d8558666c3 100644
--- a/test/SemaCXX/warn-global-constructors.cpp
+++ b/test/SemaCXX/warn-global-constructors.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -Wglobal-constructors %s -verify
+// RUN: %clang_cc1 -std=c++11 -fsyntax-only -Wglobal-constructors %s -verify
int opaque_int();
@@ -101,3 +101,22 @@ namespace referencemember {
int a;
A b = { a };
}
+
+namespace pr19253 {
+ struct A { ~A() = default; };
+ A a;
+
+ struct B { ~B(); };
+ struct C : B { ~C() = default; };
+ C c; // expected-warning {{global destructor}}
+
+ class D {
+ friend struct E;
+ ~D() = default;
+ };
+ struct E : D {
+ D d;
+ ~E() = default;
+ };
+ E e;
+}
diff --git a/test/SemaCXX/warn-infinite-recursion.cpp b/test/SemaCXX/warn-infinite-recursion.cpp
new file mode 100644
index 000000000000..e1b7c5412e1f
--- /dev/null
+++ b/test/SemaCXX/warn-infinite-recursion.cpp
@@ -0,0 +1,152 @@
+// RUN: %clang_cc1 %s -fsyntax-only -verify -Winfinite-recursion
+
+void a() { // expected-warning{{call itself}}
+ a();
+}
+
+void b(int x) { // expected-warning{{call itself}}
+ if (x)
+ b(x);
+ else
+ b(x+1);
+}
+
+void c(int x) {
+ if (x)
+ c(5);
+}
+
+void d(int x) { // expected-warning{{call itself}}
+ if (x)
+ ++x;
+ return d(x);
+}
+
+// Doesn't warn on mutually recursive functions
+void e();
+void f();
+
+void e() { f(); }
+void f() { e(); }
+
+// Don't warn on infinite loops
+void g() {
+ while (true)
+ g();
+
+ g();
+}
+
+void h(int x) {
+ while (x < 5) {
+ h(x+1);
+ }
+}
+
+void i(int x) { // expected-warning{{call itself}}
+ while (x < 5) {
+ --x;
+ }
+ i(0);
+}
+
+int j() { // expected-warning{{call itself}}
+ return 5 + j();
+}
+
+class S {
+ static void a();
+ void b();
+};
+
+void S::a() { // expected-warning{{call itself}}
+ return a();
+}
+
+void S::b() { // expected-warning{{call itself}}
+ int i = 0;
+ do {
+ ++i;
+ b();
+ } while (i > 5);
+}
+
+template<class member>
+struct T {
+ member m;
+ void a() { return a(); } // expected-warning{{call itself}}
+ static void b() { return b(); } // expected-warning{{call itself}}
+};
+
+void test_T() {
+ T<int> foo;
+ foo.a(); // expected-note{{in instantiation}}
+ foo.b(); // expected-note{{in instantiation}}
+}
+
+class U {
+ U* u;
+ void Fun() { // expected-warning{{call itself}}
+ u->Fun();
+ }
+};
+
+// No warnings on templated functions
+// sum<0>() is instantiated, does recursively call itself, but never runs.
+template <int value>
+int sum() {
+ return value + sum<value/2>();
+}
+
+template<>
+int sum<1>() { return 1; }
+
+template<int x, int y>
+int calculate_value() {
+ if (x != y)
+ return sum<x - y>(); // This instantiates sum<0>() even if never called.
+ else
+ return 0;
+}
+
+int value = calculate_value<1,1>();
+
+void DoSomethingHere();
+
+// DoStuff<0,0>() is instantiated, but never called.
+template<int First, int Last>
+int DoStuff() {
+ if (First + 1 == Last) {
+ // This branch gets removed during <0, 0> instantiation in so CFG for this
+ // function goes straight to the else branch.
+ DoSomethingHere();
+ } else {
+ DoStuff<First, (First + Last)/2>();
+ DoStuff<(First + Last)/2, Last>();
+ }
+ return 0;
+}
+int stuff = DoStuff<0, 1>();
+
+template<int x>
+struct Wrapper {
+ static int run() {
+ // Similar to the above, Wrapper<0>::run() will discard the if statement.
+ if (x == 1)
+ return 0;
+ return Wrapper<x/2>::run();
+ }
+ static int run2() { // expected-warning{{call itself}}
+ return run2();
+ }
+};
+
+template <int x>
+int test_wrapper() {
+ if (x != 0)
+ return Wrapper<x>::run() +
+ Wrapper<x>::run2(); // expected-note{{instantiation}}
+ return 0;
+}
+
+int wrapper_sum = test_wrapper<2>(); // expected-note{{instantiation}}
diff --git a/test/SemaCXX/warn-memsize-comparison.cpp b/test/SemaCXX/warn-memsize-comparison.cpp
new file mode 100644
index 000000000000..54c410e3dc0b
--- /dev/null
+++ b/test/SemaCXX/warn-memsize-comparison.cpp
@@ -0,0 +1,93 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+//
+
+typedef __SIZE_TYPE__ size_t;
+extern "C" void *memset(void *, int, size_t);
+extern "C" void *memmove(void *s1, const void *s2, size_t n);
+extern "C" void *memcpy(void *s1, const void *s2, size_t n);
+extern "C" void *memcmp(void *s1, const void *s2, size_t n);
+extern "C" int strncmp(const char *s1, const char *s2, size_t n);
+extern "C" int strncasecmp(const char *s1, const char *s2, size_t n);
+extern "C" char *strncpy(char *dst, const char *src, size_t n);
+extern "C" char *strncat(char *dst, const char *src, size_t n);
+extern "C" char *strndup(const char *src, size_t n);
+extern "C" size_t strlcpy(char *dst, const char *src, size_t size);
+extern "C" size_t strlcat(char *dst, const char *src, size_t size);
+
+void f() {
+ char b1[80], b2[80];
+ if (memset(b1, 0, sizeof(b1) != 0)) {} // \
+ expected-warning{{size argument in 'memset' call is a comparison}} \
+ expected-note {{did you mean to compare}} \
+ expected-note {{explicitly cast the argument}}
+ if (memset(b1, 0, sizeof(b1)) != 0) {}
+
+ if (memmove(b1, b2, sizeof(b1) == 0)) {} // \
+ expected-warning{{size argument in 'memmove' call is a comparison}} \
+ expected-note {{did you mean to compare}} \
+ expected-note {{explicitly cast the argument}}
+ if (memmove(b1, b2, sizeof(b1)) == 0) {}
+
+ if (memcpy(b1, b2, sizeof(b1) < 0)) {} // \
+ expected-warning{{size argument in 'memcpy' call is a comparison}} \
+ expected-note {{did you mean to compare}} \
+ expected-note {{explicitly cast the argument}}
+ if (memcpy(b1, b2, sizeof(b1)) < 0) {}
+
+ if (memcmp(b1, b2, sizeof(b1) <= 0)) {} // \
+ expected-warning{{size argument in 'memcmp' call is a comparison}} \
+ expected-note {{did you mean to compare}} \
+ expected-note {{explicitly cast the argument}}
+ if (memcmp(b1, b2, sizeof(b1)) <= 0) {}
+
+ if (strncmp(b1, b2, sizeof(b1) > 0)) {} // \
+ expected-warning{{size argument in 'strncmp' call is a comparison}} \
+ expected-note {{did you mean to compare}} \
+ expected-note {{explicitly cast the argument}}
+ if (strncmp(b1, b2, sizeof(b1)) > 0) {}
+
+ if (strncasecmp(b1, b2, sizeof(b1) >= 0)) {} // \
+ expected-warning{{size argument in 'strncasecmp' call is a comparison}} \
+ expected-note {{did you mean to compare}} \
+ expected-note {{explicitly cast the argument}}
+ if (strncasecmp(b1, b2, sizeof(b1)) >= 0) {}
+
+ if (strncpy(b1, b2, sizeof(b1) == 0 || true)) {} // \
+ expected-warning{{size argument in 'strncpy' call is a comparison}} \
+ expected-note {{did you mean to compare}} \
+ expected-note {{explicitly cast the argument}}
+ if (strncpy(b1, b2, sizeof(b1)) == 0 || true) {}
+
+ if (strncat(b1, b2, sizeof(b1) - 1 >= 0 && true)) {} // \
+ expected-warning{{size argument in 'strncat' call is a comparison}} \
+ expected-note {{did you mean to compare}} \
+ expected-note {{explicitly cast the argument}}
+ if (strncat(b1, b2, sizeof(b1) - 1) >= 0 && true) {}
+
+ if (strndup(b1, sizeof(b1) != 0)) {} // \
+ expected-warning{{size argument in 'strndup' call is a comparison}} \
+ expected-note {{did you mean to compare}} \
+ expected-note {{explicitly cast the argument}}
+ if (strndup(b1, sizeof(b1)) != 0) {}
+
+ if (strlcpy(b1, b2, sizeof(b1) != 0)) {} // \
+ expected-warning{{size argument in 'strlcpy' call is a comparison}} \
+ expected-note {{did you mean to compare}} \
+ expected-note {{explicitly cast the argument}}
+ if (strlcpy(b1, b2, sizeof(b1)) != 0) {}
+
+ if (strlcat(b1, b2, sizeof(b1) != 0)) {} // \
+ expected-warning{{size argument in 'strlcat' call is a comparison}} \
+ expected-note {{did you mean to compare}} \
+ expected-note {{explicitly cast the argument}}
+ if (strlcat(b1, b2, sizeof(b1)) != 0) {}
+
+ if (memset(b1, 0, sizeof(b1) / 2)) {}
+ if (memset(b1, 0, sizeof(b1) >> 2)) {}
+ if (memset(b1, 0, 4 << 2)) {}
+ if (memset(b1, 0, 4 + 2)) {}
+ if (memset(b1, 0, 4 - 2)) {}
+ if (memset(b1, 0, 4 * 2)) {}
+
+ if (memset(b1, 0, (size_t)(sizeof(b1) != 0))) {}
+}
diff --git a/test/SemaCXX/warn-new-overaligned.cpp b/test/SemaCXX/warn-new-overaligned.cpp
index 42a4e3523ad2..710973ccb32b 100644
--- a/test/SemaCXX/warn-new-overaligned.cpp
+++ b/test/SemaCXX/warn-new-overaligned.cpp
@@ -38,7 +38,7 @@ struct Test {
} __attribute__((aligned(256)));
void* operator new(unsigned long) {
- return 0;
+ return 0; // expected-warning {{'operator new' should not return a null pointer unless it is declared 'throw()'}}
}
SeparateCacheLines<int> high_contention_data[10];
@@ -59,7 +59,7 @@ struct Test {
} __attribute__((aligned(256)));
void* operator new[](unsigned long) {
- return 0;
+ return 0; // expected-warning {{'operator new[]' should not return a null pointer unless it is declared 'throw()'}}
}
SeparateCacheLines<int> high_contention_data[10];
diff --git a/test/SemaCXX/warn-reinterpret-base-class.cpp b/test/SemaCXX/warn-reinterpret-base-class.cpp
index 36b8fda55306..0231f194ace2 100644
--- a/test/SemaCXX/warn-reinterpret-base-class.cpp
+++ b/test/SemaCXX/warn-reinterpret-base-class.cpp
@@ -1,5 +1,8 @@
-// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify -Wreinterpret-base-class -Wno-unused-volatile-lvalue %s
-// RUN: not %clang_cc1 -std=c++11 -fsyntax-only -fdiagnostics-parseable-fixits -Wreinterpret-base-class -Wno-unused-volatile-lvalue %s 2>&1 | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -fsyntax-only -triple %itanium_abi_triple -verify -Wreinterpret-base-class -Wno-unused-volatile-lvalue %s
+// RUN: %clang_cc1 -std=c++11 -fsyntax-only -triple %ms_abi_triple -DMSABI -verify -Wreinterpret-base-class -Wno-unused-volatile-lvalue %s
+
+// RUN: not %clang_cc1 -std=c++11 -fsyntax-only -triple %itanium_abi_triple -fdiagnostics-parseable-fixits -Wreinterpret-base-class -Wno-unused-volatile-lvalue %s 2>&1 | FileCheck %s
+// RUN: not %clang_cc1 -std=c++11 -fsyntax-only -triple %ms_abi_triple -fdiagnostics-parseable-fixits -Wreinterpret-base-class -Wno-unused-volatile-lvalue %s 2>&1 | FileCheck %s
// PR 13824
class A {
@@ -288,6 +291,11 @@ void different_subobject_downcast(E *e, F *f, A *a) {
(void)reinterpret_cast<I *>(f);
// CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:9-[[@LINE-1]]:25}:"static_cast"
+#ifdef MSABI
+ // In MS ABI mode, A is at non-zero offset in H.
+ // expected-warning@+3 {{'reinterpret_cast' to class 'H *' from its base at non-zero offset 'A *' behaves differently from 'static_cast'}}
+ // expected-note@+2 {{use 'static_cast'}}
+#endif
(void)reinterpret_cast<H *>(a);
// expected-warning@+2 {{'reinterpret_cast' to class 'L' (aka 'const F *volatile') from its base at non-zero offset 'E *' behaves differently from 'static_cast'}}
@@ -309,6 +317,12 @@ void different_subobject_upcast(F *f, G *g, H *h, I *i) {
// CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:9-[[@LINE-1]]:25}:"static_cast"
(void)reinterpret_cast<E *>(h);
+
+#ifdef MSABI
+ // In MS ABI mode, A is at non-zero offset in H.
+ // expected-warning@+3 {{'reinterpret_cast' from class 'H *' to its base at non-zero offset 'A *' behaves differently from 'static_cast'}}
+ // expected-note@+2 {{use 'static_cast'}}
+#endif
(void)reinterpret_cast<A *>(h);
// expected-warning@+2 {{'reinterpret_cast' from class 'I *' to its virtual base 'F *' behaves differently from 'static_cast'}}
diff --git a/test/SemaCXX/warn-self-assign.cpp b/test/SemaCXX/warn-self-assign.cpp
index fcdb2ab6bc63..7d558c6a073e 100644
--- a/test/SemaCXX/warn-self-assign.cpp
+++ b/test/SemaCXX/warn-self-assign.cpp
@@ -8,6 +8,9 @@ void f() {
b = a = b;
a = a = a; // expected-warning{{explicitly assigning}}
a = b = b = a;
+ a &= a; // expected-warning{{explicitly assigning}}
+ a |= a; // expected-warning{{explicitly assigning}}
+ a ^= a;
}
// Dummy type.
diff --git a/test/SemaCXX/warn-shadow.cpp b/test/SemaCXX/warn-shadow.cpp
index 68e9467a937b..5ad2233d234a 100644
--- a/test/SemaCXX/warn-shadow.cpp
+++ b/test/SemaCXX/warn-shadow.cpp
@@ -22,7 +22,7 @@ using namespace xx;
using namespace yy;
void foo() {
- int i; // expected-warning {{declaration shadows a variable in namespace '<anonymous>'}}
+ int i; // expected-warning {{declaration shadows a variable in namespace '(anonymous)'}}
int j; // expected-warning {{declaration shadows a variable in namespace 'one::two'}}
int m;
}
diff --git a/test/SemaCXX/warn-sign-conversion.cpp b/test/SemaCXX/warn-sign-conversion.cpp
index ba2bc9b3d026..746b1242fe1b 100644
--- a/test/SemaCXX/warn-sign-conversion.cpp
+++ b/test/SemaCXX/warn-sign-conversion.cpp
@@ -25,23 +25,23 @@ namespace test1 {
int c1 = 1 ? i : Foo<bool>::C;
int c2 = 1 ? Foo<bool>::C : i;
- int d1a = 1 ? i : Foo<bool>::D; // expected-warning {{test1::Foo<bool>::<anonymous enum at }}
- int d1b = 1 ? i : Foo<bool>::D; // expected-warning {{warn-sign-conversion.cpp:13:5>' to 'int'}}
- int d2a = 1 ? Foo<bool>::D : i; // expected-warning {{operand of ? changes signedness: 'test1::Foo<bool>::<anonymous enum at }}
- int d2b = 1 ? Foo<bool>::D : i; // expected-warning {{warn-sign-conversion.cpp:13:5>' to 'int'}}
- int d3a = 1 ? B : Foo<bool>::D; // expected-warning {{operand of ? changes signedness: 'test1::Foo<bool>::<anonymous enum at }}
- int d3b = 1 ? B : Foo<bool>::D; // expected-warning {{warn-sign-conversion.cpp:13:5>' to 'int'}}
- int d4a = 1 ? Foo<bool>::D : B; // expected-warning {{operand of ? changes signedness: 'test1::Foo<bool>::<anonymous enum at }}
- int d4b = 1 ? Foo<bool>::D : B; // expected-warning {{warn-sign-conversion.cpp:13:5>' to 'int'}}
-
- int e1a = 1 ? i : E; // expected-warning {{operand of ? changes signedness: 'test1::<anonymous enum at }}
- int e1b = 1 ? i : E; // expected-warning {{warn-sign-conversion.cpp:16:3>' to 'int'}}
- int e2a = 1 ? E : i; // expected-warning {{operand of ? changes signedness: 'test1::<anonymous enum at }}
- int e2b = 1 ? E : i; // expected-warning {{warn-sign-conversion.cpp:16:3>' to 'int'}}
- int e3a = 1 ? E : B; // expected-warning {{operand of ? changes signedness: 'test1::<anonymous enum at }}
- int e3b = 1 ? E : B; // expected-warning {{warn-sign-conversion.cpp:16:3>' to 'int'}}
- int e4a = 1 ? B : E; // expected-warning {{operand of ? changes signedness: 'test1::<anonymous enum at }}
- int e4b = 1 ? B : E; // expected-warning {{warn-sign-conversion.cpp:16:3>' to 'int'}}
+ int d1a = 1 ? i : Foo<bool>::D; // expected-warning {{test1::Foo<bool>::(anonymous enum at }}
+ int d1b = 1 ? i : Foo<bool>::D; // expected-warning {{warn-sign-conversion.cpp:13:5)' to 'int'}}
+ int d2a = 1 ? Foo<bool>::D : i; // expected-warning {{operand of ? changes signedness: 'test1::Foo<bool>::(anonymous enum at }}
+ int d2b = 1 ? Foo<bool>::D : i; // expected-warning {{warn-sign-conversion.cpp:13:5)' to 'int'}}
+ int d3a = 1 ? B : Foo<bool>::D; // expected-warning {{operand of ? changes signedness: 'test1::Foo<bool>::(anonymous enum at }}
+ int d3b = 1 ? B : Foo<bool>::D; // expected-warning {{warn-sign-conversion.cpp:13:5)' to 'int'}}
+ int d4a = 1 ? Foo<bool>::D : B; // expected-warning {{operand of ? changes signedness: 'test1::Foo<bool>::(anonymous enum at }}
+ int d4b = 1 ? Foo<bool>::D : B; // expected-warning {{warn-sign-conversion.cpp:13:5)' to 'int'}}
+
+ int e1a = 1 ? i : E; // expected-warning {{operand of ? changes signedness: 'test1::(anonymous enum at }}
+ int e1b = 1 ? i : E; // expected-warning {{warn-sign-conversion.cpp:16:3)' to 'int'}}
+ int e2a = 1 ? E : i; // expected-warning {{operand of ? changes signedness: 'test1::(anonymous enum at }}
+ int e2b = 1 ? E : i; // expected-warning {{warn-sign-conversion.cpp:16:3)' to 'int'}}
+ int e3a = 1 ? E : B; // expected-warning {{operand of ? changes signedness: 'test1::(anonymous enum at }}
+ int e3b = 1 ? E : B; // expected-warning {{warn-sign-conversion.cpp:16:3)' to 'int'}}
+ int e4a = 1 ? B : E; // expected-warning {{operand of ? changes signedness: 'test1::(anonymous enum at }}
+ int e4b = 1 ? B : E; // expected-warning {{warn-sign-conversion.cpp:16:3)' to 'int'}}
}
}
diff --git a/test/SemaCXX/warn-string-conversion.cpp b/test/SemaCXX/warn-string-conversion.cpp
index 23960e48df61..b26126f6c72f 100644
--- a/test/SemaCXX/warn-string-conversion.cpp
+++ b/test/SemaCXX/warn-string-conversion.cpp
@@ -1,14 +1,20 @@
// RUN: %clang_cc1 -fsyntax-only -Wstring-conversion -verify %s
// Warn on cases where a string literal is converted into a bool.
-// An exception is made for this in logical operators.
+// An exception is made for this in logical and operators.
void assert(bool condition);
void test0() {
bool b0 = "hi"; // expected-warning{{implicit conversion turns string literal into bool: 'const char [3]' to 'bool'}}
b0 = ""; // expected-warning{{implicit conversion turns string literal into bool: 'const char [1]' to 'bool'}}
+ b0 = 0 || ""; // expected-warning{{implicit conversion turns string literal into bool: 'const char [1]' to 'bool'}}
+ b0 = "" || 0; // expected-warning{{implicit conversion turns string literal into bool: 'const char [1]' to 'bool'}}
b0 = 0 && "";
+ b0 = "" && 0;
assert("error"); // expected-warning{{implicit conversion turns string literal into bool: 'const char [6]' to 'bool'}}
+ assert(0 || "error"); // expected-warning{{implicit conversion turns string literal into bool: 'const char [6]' to 'bool'}}
+ assert("error" || 0); // expected-warning{{implicit conversion turns string literal into bool: 'const char [6]' to 'bool'}}
assert(0 && "error");
+ assert("error" && 0);
while("hi") {} // expected-warning{{implicit conversion turns string literal into bool: 'const char [3]' to 'bool'}}
do {} while("hi"); // expected-warning{{implicit conversion turns string literal into bool: 'const char [3]' to 'bool'}}
diff --git a/test/SemaCXX/warn-sysheader-macro.cpp b/test/SemaCXX/warn-sysheader-macro.cpp
new file mode 100644
index 000000000000..c88461720ad4
--- /dev/null
+++ b/test/SemaCXX/warn-sysheader-macro.cpp
@@ -0,0 +1,35 @@
+// RUN: %clang_cc1 -verify -fsyntax-only -Wshadow -Wold-style-cast %s
+
+// Test that macro expansions from system headers don't trigger 'syntactic'
+// warnings that are not actionable.
+
+#ifdef IS_SYSHEADER
+#pragma clang system_header
+
+#define SANITY(a) (a / 0)
+
+#define SHADOW(a) __extension__({ int v = a; v; })
+
+#define OLD_STYLE_CAST(a) ((int) (a))
+
+#else
+
+#define IS_SYSHEADER
+#include __FILE__
+
+void testSanity() {
+ // Validate that the test is set up correctly
+ int i = SANITY(0); // expected-warning {{division by zero is undefined}}
+}
+
+void PR16093() {
+ // no -Wshadow in system macro expansion
+ int i = SHADOW(SHADOW(1));
+}
+
+void PR18147() {
+ // no -Wold_style_cast in system macro expansion
+ int i = OLD_STYLE_CAST(0);
+}
+
+#endif
diff --git a/test/SemaCXX/warn-tautological-compare.cpp b/test/SemaCXX/warn-tautological-compare.cpp
new file mode 100644
index 000000000000..b44f3f9d8fa3
--- /dev/null
+++ b/test/SemaCXX/warn-tautological-compare.cpp
@@ -0,0 +1,138 @@
+// Force x86-64 because some of our heuristics are actually based
+// on integer sizes.
+
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -fsyntax-only -verify -std=c++11 %s
+
+namespace RuntimeBehavior {
+ // Avoid emitting tautological compare warnings when the code already has
+ // compile time checks on variable sizes.
+
+ const int kintmax = 2147483647;
+ void test0(short x) {
+ if (sizeof(x) < sizeof(int) || x < kintmax) {}
+
+ if (x < kintmax) {}
+ // expected-warning@-1{{comparison of constant 2147483647 with expression of type 'short' is always true}}
+ }
+
+ void test1(short x) {
+ if (x < kintmax) {}
+ // expected-warning@-1{{comparison of constant 2147483647 with expression of type 'short' is always true}}
+
+ if (sizeof(x) < sizeof(int))
+ return;
+
+ if (x < kintmax) {}
+ }
+}
+
+namespace ArrayCompare {
+ #define GetValue(ptr) ((ptr != 0) ? ptr[0] : 0)
+ extern int a[] __attribute__((weak));
+ int b[] = {8,13,21};
+ struct {
+ int x[10];
+ } c;
+ const char str[] = "text";
+ void ignore() {
+ if (a == 0) {}
+ if (a != 0) {}
+ (void)GetValue(b);
+ }
+ void test() {
+ if (b == 0) {}
+ // expected-warning@-1{{comparison of array 'b' equal to a null pointer is always false}}
+ if (b != 0) {}
+ // expected-warning@-1{{comparison of array 'b' not equal to a null pointer is always true}}
+ if (0 == b) {}
+ // expected-warning@-1{{comparison of array 'b' equal to a null pointer is always false}}
+ if (0 != b) {}
+ // expected-warning@-1{{comparison of array 'b' not equal to a null pointer is always true}}
+ if (c.x == 0) {}
+ // expected-warning@-1{{comparison of array 'c.x' equal to a null pointer is always false}}
+ if (c.x != 0) {}
+ // expected-warning@-1{{comparison of array 'c.x' not equal to a null pointer is always true}}
+ if (str == 0) {}
+ // expected-warning@-1{{comparison of array 'str' equal to a null pointer is always false}}
+ if (str != 0) {}
+ // expected-warning@-1{{comparison of array 'str' not equal to a null pointer is always true}}
+ }
+}
+
+namespace FunctionCompare {
+ #define CallFunction(f) ((f != 0) ? f() : 0)
+ extern void a() __attribute__((weak));
+ void fun1();
+ int fun2();
+ int* fun3();
+ int* fun4(int);
+ class S {
+ public:
+ static int foo();
+ };
+ void ignore() {
+ if (a == 0) {}
+ if (0 != a) {}
+ (void)CallFunction(fun2);
+ }
+ void test() {
+ if (fun1 == 0) {}
+ // expected-warning@-1{{comparison of function 'fun1' equal to a null pointer is always false}}
+ // expected-note@-2{{prefix with the address-of operator to silence this warning}}
+ if (fun2 == 0) {}
+ // expected-warning@-1{{comparison of function 'fun2' equal to a null pointer is always false}}
+ // expected-note@-2{{prefix with the address-of operator to silence this warning}}
+ // expected-note@-3{{suffix with parentheses to turn this into a function call}}
+ if (fun3 == 0) {}
+ // expected-warning@-1{{comparison of function 'fun3' equal to a null pointer is always false}}
+ // expected-note@-2{{prefix with the address-of operator to silence this warning}}
+ // expected-note@-3{{suffix with parentheses to turn this into a function call}}
+ if (fun4 == 0) {}
+ // expected-warning@-1{{comparison of function 'fun4' equal to a null pointer is always false}}
+ // expected-note@-2{{prefix with the address-of operator to silence this warning}}
+ if (nullptr != fun1) {}
+ // expected-warning@-1{{comparison of function 'fun1' not equal to a null pointer is always true}}
+ // expected-note@-2{{prefix with the address-of operator to silence this warning}}
+ if (nullptr != fun2) {}
+ // expected-warning@-1{{comparison of function 'fun2' not equal to a null pointer is always true}}
+ // expected-note@-2{{prefix with the address-of operator to silence this warning}}
+ if (nullptr != fun3) {}
+ // expected-warning@-1{{comparison of function 'fun3' not equal to a null pointer is always true}}
+ // expected-note@-2{{prefix with the address-of operator to silence this warning}}
+ // expected-note@-3{{suffix with parentheses to turn this into a function call}}
+ if (nullptr != fun4) {}
+ // expected-warning@-1{{comparison of function 'fun4' not equal to a null pointer is always true}}
+ // expected-note@-2{{prefix with the address-of operator to silence this warning}}
+ if (S::foo == 0) {}
+ // expected-warning@-1{{comparison of function 'S::foo' equal to a null pointer is always false}}
+ // expected-note@-2{{prefix with the address-of operator to silence this warning}}
+ // expected-note@-3{{suffix with parentheses to turn this into a function call}}
+ }
+}
+
+namespace PointerCompare {
+ extern int a __attribute__((weak));
+ int b;
+ static int c;
+ class S {
+ public:
+ static int a;
+ int b;
+ };
+ void ignored() {
+ if (&a == 0) {}
+ }
+ void test() {
+ S s;
+ if (&b == 0) {}
+ // expected-warning@-1{{comparison of address of 'b' equal to a null pointer is always false}}
+ if (&c == 0) {}
+ // expected-warning@-1{{comparison of address of 'c' equal to a null pointer is always false}}
+ if (&s.a == 0) {}
+ // expected-warning@-1{{comparison of address of 's.a' equal to a null pointer is always false}}
+ if (&s.b == 0) {}
+ // expected-warning@-1{{comparison of address of 's.b' equal to a null pointer is always false}}
+ if (&S::a == 0) {}
+ // expected-warning@-1{{comparison of address of 'S::a' equal to a null pointer is always false}}
+ }
+}
diff --git a/test/SemaCXX/warn-tautological-undefined-compare.cpp b/test/SemaCXX/warn-tautological-undefined-compare.cpp
new file mode 100644
index 000000000000..ce05bfc14d17
--- /dev/null
+++ b/test/SemaCXX/warn-tautological-undefined-compare.cpp
@@ -0,0 +1,112 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wtautological-undefined-compare %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-tautological-compare -Wtautological-undefined-compare %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wtautological-compare %s
+
+void test1(int &x) {
+ if (x == 1) { }
+ if (&x == 0) { }
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to false}}
+ if (&x != 0) { }
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true}}
+}
+
+class test2 {
+ test2() : x(y) {}
+
+ void foo() {
+ if (this == 0) { }
+ // expected-warning@-1{{'this' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to false}}
+ if (this != 0) { }
+ // expected-warning@-1{{'this' pointer cannot be null in well-defined C++ code; comparison may be assumed to always evaluate to true}}
+ }
+
+ void bar() {
+ if (x == 1) { }
+ if (&x == 0) { }
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to false}}
+ if (&x != 0) { }
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true}}
+ }
+
+ int &x;
+ int y;
+};
+
+namespace function_return_reference {
+ int& get_int();
+ // expected-note@-1 4{{'get_int' returns a reference}}
+ class B {
+ public:
+ static int &stat();
+ // expected-note@-1 4{{'stat' returns a reference}}
+ int &get();
+ // expected-note@-1 8{{'get' returns a reference}}
+ };
+
+ void test() {
+ if (&get_int() == 0) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to false}}
+ if (&(get_int()) == 0) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to false}}
+
+ if (&get_int() != 0) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true}}
+ if (&(get_int()) != 0) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true}}
+
+ if (&B::stat() == 0) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to false}}
+ if (&(B::stat()) == 0) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to false}}
+
+ if (&B::stat() != 0) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true}}
+ if (&(B::stat()) != 0) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true}}
+
+ B b;
+ if (&b.get() == 0) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to false}}
+ if (&(b.get()) == 0) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to false}}
+
+ if (&b.get() != 0) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true}}
+ if (&(b.get()) != 0) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true}}
+
+ B* b_ptr = &b;
+ if (&b_ptr->get() == 0) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to false}}
+ if (&(b_ptr->get()) == 0) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to false}}
+
+ if (&b_ptr->get() != 0) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true}}
+ if (&(b_ptr->get()) != 0) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true}}
+
+ int& (B::*m_ptr)() = &B::get;
+ if (&(b.*m_ptr)() == 0) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to false}}
+ if (&((b.*m_ptr)()) == 0) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to false}}
+
+ if (&(b.*m_ptr)() != 0) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true}}
+ if (&((b.*m_ptr)()) != 0) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true}}
+
+ int& (*f_ptr)() = &get_int;
+ if (&(*f_ptr)() == 0) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to false}}
+ if (&((*f_ptr)()) == 0) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to false}}
+
+ if (&(*f_ptr)() != 0) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true}}
+ if (&((*f_ptr)()) != 0) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; comparison may be assumed to always evaluate to true}}
+ }
+}
diff --git a/test/SemaCXX/warn-thread-safety-analysis.cpp b/test/SemaCXX/warn-thread-safety-analysis.cpp
index ce6250d6da90..34a33aab42d2 100644
--- a/test/SemaCXX/warn-thread-safety-analysis.cpp
+++ b/test/SemaCXX/warn-thread-safety-analysis.cpp
@@ -208,33 +208,33 @@ void sls_fun_good_8() {
void sls_fun_bad_1() {
sls_mu.Unlock(); // \
- // expected-warning{{unlocking 'sls_mu' that was not locked}}
+ // expected-warning{{releasing mutex 'sls_mu' that was not held}}
}
void sls_fun_bad_2() {
sls_mu.Lock();
sls_mu.Lock(); // \
- // expected-warning{{locking 'sls_mu' that is already locked}}
+ // expected-warning{{acquiring mutex 'sls_mu' that is already held}}
sls_mu.Unlock();
}
void sls_fun_bad_3() {
sls_mu.Lock(); // expected-note {{mutex acquired here}}
-} // expected-warning{{mutex 'sls_mu' is still locked at the end of function}}
+} // expected-warning{{mutex 'sls_mu' is still held at the end of function}}
void sls_fun_bad_4() {
if (getBool())
sls_mu.Lock(); // expected-note{{mutex acquired here}}
else
sls_mu2.Lock(); // expected-note{{mutex acquired here}}
-} // expected-warning{{mutex 'sls_mu' is not locked on every path through here}} \
- // expected-warning{{mutex 'sls_mu2' is not locked on every path through here}}
+} // expected-warning{{mutex 'sls_mu' is not held on every path through here}} \
+ // expected-warning{{mutex 'sls_mu2' is not held on every path through here}}
void sls_fun_bad_5() {
sls_mu.Lock(); // expected-note {{mutex acquired here}}
if (getBool())
sls_mu.Unlock();
-} // expected-warning{{mutex 'sls_mu' is not locked on every path through here}}
+} // expected-warning{{mutex 'sls_mu' is not held on every path through here}}
void sls_fun_bad_6() {
if (getBool()) {
@@ -247,8 +247,8 @@ void sls_fun_bad_6() {
}
}
sls_mu.Unlock(); // \
- expected-warning{{mutex 'sls_mu' is not locked on every path through here}}\
- expected-warning{{unlocking 'sls_mu' that was not locked}}
+ expected-warning{{mutex 'sls_mu' is not held on every path through here}}\
+ expected-warning{{releasing mutex 'sls_mu' that was not held}}
}
void sls_fun_bad_7() {
@@ -258,7 +258,7 @@ void sls_fun_bad_7() {
if (getBool()) {
if (getBool()) {
continue; // \
- expected-warning{{expecting mutex 'sls_mu' to be locked at start of each loop}}
+ expected-warning{{expecting mutex 'sls_mu' to be held at start of each loop}}
}
}
sls_mu.Lock(); // expected-note {{mutex acquired here}}
@@ -270,14 +270,14 @@ void sls_fun_bad_8() {
sls_mu.Lock(); // expected-note{{mutex acquired here}}
do {
- sls_mu.Unlock(); // expected-warning{{expecting mutex 'sls_mu' to be locked at start of each loop}}
+ sls_mu.Unlock(); // expected-warning{{expecting mutex 'sls_mu' to be held at start of each loop}}
} while (getBool());
}
void sls_fun_bad_9() {
do {
sls_mu.Lock(); // \
- // expected-warning{{expecting mutex 'sls_mu' to be locked at start of each loop}} \
+ // expected-warning{{expecting mutex 'sls_mu' to be held at start of each loop}} \
// expected-note{{mutex acquired here}}
} while (getBool());
sls_mu.Unlock();
@@ -285,18 +285,18 @@ void sls_fun_bad_9() {
void sls_fun_bad_10() {
sls_mu.Lock(); // expected-note 2{{mutex acquired here}}
- while(getBool()) { // expected-warning{{expecting mutex 'sls_mu' to be locked at start of each loop}}
+ while(getBool()) { // expected-warning{{expecting mutex 'sls_mu' to be held at start of each loop}}
sls_mu.Unlock();
}
-} // expected-warning{{mutex 'sls_mu' is still locked at the end of function}}
+} // expected-warning{{mutex 'sls_mu' is still held at the end of function}}
void sls_fun_bad_11() {
while (getBool()) { // \
- expected-warning{{expecting mutex 'sls_mu' to be locked at start of each loop}}
+ expected-warning{{expecting mutex 'sls_mu' to be held at start of each loop}}
sls_mu.Lock(); // expected-note {{mutex acquired here}}
}
sls_mu.Unlock(); // \
- // expected-warning{{unlocking 'sls_mu' that was not locked}}
+ // expected-warning{{releasing mutex 'sls_mu' that was not held}}
}
void sls_fun_bad_12() {
@@ -305,7 +305,7 @@ void sls_fun_bad_12() {
sls_mu.Unlock();
if (getBool()) {
if (getBool()) {
- break; // expected-warning{{mutex 'sls_mu' is not locked on every path through here}}
+ break; // expected-warning{{mutex 'sls_mu' is not held on every path through here}}
}
}
sls_mu.Lock();
@@ -334,19 +334,19 @@ void aa_fun_1() {
void aa_fun_bad_1() {
glock.globalUnlock(); // \
- // expected-warning{{unlocking 'aa_mu' that was not locked}}
+ // expected-warning{{releasing mutex 'aa_mu' that was not held}}
}
void aa_fun_bad_2() {
glock.globalLock();
glock.globalLock(); // \
- // expected-warning{{locking 'aa_mu' that is already locked}}
+ // expected-warning{{acquiring mutex 'aa_mu' that is already held}}
glock.globalUnlock();
}
void aa_fun_bad_3() {
glock.globalLock(); // expected-note{{mutex acquired here}}
-} // expected-warning{{mutex 'aa_mu' is still locked at the end of function}}
+} // expected-warning{{mutex 'aa_mu' is still held at the end of function}}
//--------------------------------------------------//
// Regression tests for unusual method names
@@ -359,17 +359,17 @@ class WeirdMethods {
// FIXME: can't currently check inside constructors and destructors.
WeirdMethods() {
wmu.Lock(); // EXPECTED-NOTE {{mutex acquired here}}
- } // EXPECTED-WARNING {{mutex 'wmu' is still locked at the end of function}}
+ } // EXPECTED-WARNING {{mutex 'wmu' is still held at the end of function}}
~WeirdMethods() {
wmu.Lock(); // EXPECTED-NOTE {{mutex acquired here}}
- } // EXPECTED-WARNING {{mutex 'wmu' is still locked at the end of function}}
+ } // EXPECTED-WARNING {{mutex 'wmu' is still held at the end of function}}
void operator++() {
wmu.Lock(); // expected-note {{mutex acquired here}}
- } // expected-warning {{mutex 'wmu' is still locked at the end of function}}
+ } // expected-warning {{mutex 'wmu' is still held at the end of function}}
operator int*() {
wmu.Lock(); // expected-note {{mutex acquired here}}
return 0;
- } // expected-warning {{mutex 'wmu' is still locked at the end of function}}
+ } // expected-warning {{mutex 'wmu' is still held at the end of function}}
};
//-----------------------------------------------//
@@ -386,13 +386,13 @@ class PGBFoo {
__attribute__((pt_guarded_by(sls_mu)));
void testFoo() {
pgb_field = &x; // \
- // expected-warning {{writing variable 'pgb_field' requires locking 'sls_mu2' exclusively}}
- *pgb_field = x; // expected-warning {{reading variable 'pgb_field' requires locking 'sls_mu2'}} \
- // expected-warning {{writing the value pointed to by 'pgb_field' requires locking 'sls_mu' exclusively}}
- x = *pgb_field; // expected-warning {{reading variable 'pgb_field' requires locking 'sls_mu2'}} \
- // expected-warning {{reading the value pointed to by 'pgb_field' requires locking 'sls_mu'}}
- (*pgb_field)++; // expected-warning {{reading variable 'pgb_field' requires locking 'sls_mu2'}} \
- // expected-warning {{writing the value pointed to by 'pgb_field' requires locking 'sls_mu' exclusively}}
+ // expected-warning {{writing variable 'pgb_field' requires holding mutex 'sls_mu2' exclusively}}
+ *pgb_field = x; // expected-warning {{reading variable 'pgb_field' requires holding mutex 'sls_mu2'}} \
+ // expected-warning {{writing the value pointed to by 'pgb_field' requires holding mutex 'sls_mu' exclusively}}
+ x = *pgb_field; // expected-warning {{reading variable 'pgb_field' requires holding mutex 'sls_mu2'}} \
+ // expected-warning {{reading the value pointed to by 'pgb_field' requires holding mutex 'sls_mu'}}
+ (*pgb_field)++; // expected-warning {{reading variable 'pgb_field' requires holding mutex 'sls_mu2'}} \
+ // expected-warning {{writing the value pointed to by 'pgb_field' requires holding mutex 'sls_mu' exclusively}}
}
};
@@ -402,7 +402,7 @@ class GBFoo {
void testFoo() {
gb_field = 0; // \
- // expected-warning {{writing variable 'gb_field' requires locking 'sls_mu' exclusively}}
+ // expected-warning {{writing variable 'gb_field' requires holding mutex 'sls_mu' exclusively}}
}
void testNoAnal() __attribute__((no_thread_safety_analysis)) {
@@ -435,59 +435,59 @@ void gb_fun_3() {
void gb_bad_0() {
sls_guard_var = 1; // \
- // expected-warning{{writing variable 'sls_guard_var' requires locking any mutex exclusively}}
+ // expected-warning{{writing variable 'sls_guard_var' requires holding any mutex exclusively}}
}
void gb_bad_1() {
int x = sls_guard_var; // \
- // expected-warning{{reading variable 'sls_guard_var' requires locking any mutex}}
+ // expected-warning{{reading variable 'sls_guard_var' requires holding any mutex}}
}
void gb_bad_2() {
sls_guardby_var = 1; // \
- // expected-warning {{writing variable 'sls_guardby_var' requires locking 'sls_mu' exclusively}}
+ // expected-warning {{writing variable 'sls_guardby_var' requires holding mutex 'sls_mu' exclusively}}
}
void gb_bad_3() {
int x = sls_guardby_var; // \
- // expected-warning {{reading variable 'sls_guardby_var' requires locking 'sls_mu'}}
+ // expected-warning {{reading variable 'sls_guardby_var' requires holding mutex 'sls_mu'}}
}
void gb_bad_4() {
*pgb_gvar = 1; // \
- // expected-warning {{writing the value pointed to by 'pgb_gvar' requires locking any mutex exclusively}}
+ // expected-warning {{writing the value pointed to by 'pgb_gvar' requires holding any mutex exclusively}}
}
void gb_bad_5() {
int x = *pgb_gvar; // \
- // expected-warning {{reading the value pointed to by 'pgb_gvar' requires locking any mutex}}
+ // expected-warning {{reading the value pointed to by 'pgb_gvar' requires holding any mutex}}
}
void gb_bad_6() {
*pgb_var = 1; // \
- // expected-warning {{writing the value pointed to by 'pgb_var' requires locking 'sls_mu' exclusively}}
+ // expected-warning {{writing the value pointed to by 'pgb_var' requires holding mutex 'sls_mu' exclusively}}
}
void gb_bad_7() {
int x = *pgb_var; // \
- // expected-warning {{reading the value pointed to by 'pgb_var' requires locking 'sls_mu'}}
+ // expected-warning {{reading the value pointed to by 'pgb_var' requires holding mutex 'sls_mu'}}
}
void gb_bad_8() {
GBFoo G;
G.gb_field = 0; // \
- // expected-warning {{writing variable 'gb_field' requires locking 'sls_mu'}}
+ // expected-warning {{writing variable 'gb_field' requires holding mutex 'sls_mu'}}
}
void gb_bad_9() {
sls_guard_var++; // \
- // expected-warning{{writing variable 'sls_guard_var' requires locking any mutex exclusively}}
+ // expected-warning{{writing variable 'sls_guard_var' requires holding any mutex exclusively}}
sls_guard_var--; // \
- // expected-warning{{writing variable 'sls_guard_var' requires locking any mutex exclusively}}
+ // expected-warning{{writing variable 'sls_guard_var' requires holding any mutex exclusively}}
++sls_guard_var; // \
- // expected-warning{{writing variable 'sls_guard_var' requires locking any mutex exclusively}}
+ // expected-warning{{writing variable 'sls_guard_var' requires holding any mutex exclusively}}
--sls_guard_var;// \
- // expected-warning{{writing variable 'sls_guard_var' requires locking any mutex exclusively}}
+ // expected-warning{{writing variable 'sls_guard_var' requires holding any mutex exclusively}}
}
//-----------------------------------------------//
@@ -503,11 +503,11 @@ public:
void test() {
a = 0; // \
- // expected-warning{{writing variable 'a' requires locking 'mu' exclusively}}
+ // expected-warning{{writing variable 'a' requires holding mutex 'mu' exclusively}}
b = a; // \
- // expected-warning {{reading variable 'a' requires locking 'mu'}}
+ // expected-warning {{reading variable 'a' requires holding mutex 'mu'}}
c = 0; // \
- // expected-warning {{writing variable 'c' requires locking 'mu' exclusively}}
+ // expected-warning {{writing variable 'c' requires holding mutex 'mu' exclusively}}
}
int c __attribute__((guarded_by(mu)));
@@ -549,7 +549,7 @@ void late_bad_0() {
LateFoo fooB;
fooA.mu.Lock();
fooB.a = 5; // \
- // expected-warning{{writing variable 'a' requires locking 'fooB.mu' exclusively}} \
+ // expected-warning{{writing variable 'a' requires holding mutex 'fooB.mu' exclusively}} \
// expected-note{{found near match 'fooA.mu'}}
fooA.mu.Unlock();
}
@@ -560,7 +560,7 @@ void late_bad_1() {
b1.mu1_.Lock();
int res = b1.a_ + b3->b_;
b3->b_ = *b1.q; // \
- // expected-warning{{reading the value pointed to by 'q' requires locking 'b1.mu'}}
+ // expected-warning{{reading the value pointed to by 'q' requires holding mutex 'b1.mu'}}
b1.mu1_.Unlock();
b1.b_ = res;
mu.Unlock();
@@ -570,7 +570,7 @@ void late_bad_2() {
LateBar BarA;
BarA.FooPointer->mu.Lock();
BarA.Foo.a = 2; // \
- // expected-warning{{writing variable 'a' requires locking 'BarA.Foo.mu' exclusively}} \
+ // expected-warning{{writing variable 'a' requires holding mutex 'BarA.Foo.mu' exclusively}} \
// expected-note{{found near match 'BarA.FooPointer->mu'}}
BarA.FooPointer->mu.Unlock();
}
@@ -579,7 +579,7 @@ void late_bad_3() {
LateBar BarA;
BarA.Foo.mu.Lock();
BarA.FooPointer->a = 2; // \
- // expected-warning{{writing variable 'a' requires locking 'BarA.FooPointer->mu' exclusively}} \
+ // expected-warning{{writing variable 'a' requires holding mutex 'BarA.FooPointer->mu' exclusively}} \
// expected-note{{found near match 'BarA.Foo.mu'}}
BarA.Foo.mu.Unlock();
}
@@ -588,7 +588,7 @@ void late_bad_4() {
LateBar BarA;
BarA.Foo.mu.Lock();
BarA.Foo2.a = 2; // \
- // expected-warning{{writing variable 'a' requires locking 'BarA.Foo2.mu' exclusively}} \
+ // expected-warning{{writing variable 'a' requires holding mutex 'BarA.Foo2.mu' exclusively}} \
// expected-note{{found near match 'BarA.Foo.mu'}}
BarA.Foo.mu.Unlock();
}
@@ -608,11 +608,11 @@ void shared_fun_0() {
void shared_fun_1() {
sls_mu.ReaderLock(); // \
- // expected-warning {{mutex 'sls_mu' is locked exclusively and shared in the same scope}}
+ // expected-warning {{mutex 'sls_mu' is acquired exclusively and shared in the same scope}}
do {
sls_mu.Unlock();
sls_mu.Lock(); // \
- // expected-note {{the other lock of mutex 'sls_mu' is here}}
+ // expected-note {{the other acquisition of mutex 'sls_mu' is here}}
} while (getBool());
sls_mu.Unlock();
}
@@ -638,20 +638,20 @@ void shared_fun_4() {
void shared_fun_8() {
if (getBool())
sls_mu.Lock(); // \
- // expected-warning {{mutex 'sls_mu' is locked exclusively and shared in the same scope}}
+ // expected-warning {{mutex 'sls_mu' is acquired exclusively and shared in the same scope}}
else
sls_mu.ReaderLock(); // \
- // expected-note {{the other lock of mutex 'sls_mu' is here}}
+ // expected-note {{the other acquisition of mutex 'sls_mu' is here}}
sls_mu.Unlock();
}
void shared_bad_0() {
sls_mu.Lock(); // \
- // expected-warning {{mutex 'sls_mu' is locked exclusively and shared in the same scope}}
+ // expected-warning {{mutex 'sls_mu' is acquired exclusively and shared in the same scope}}
do {
sls_mu.Unlock();
sls_mu.ReaderLock(); // \
- // expected-note {{the other lock of mutex 'sls_mu' is here}}
+ // expected-note {{the other acquisition of mutex 'sls_mu' is here}}
} while (getBool());
sls_mu.Unlock();
}
@@ -659,10 +659,10 @@ void shared_bad_0() {
void shared_bad_1() {
if (getBool())
sls_mu.Lock(); // \
- // expected-warning {{mutex 'sls_mu' is locked exclusively and shared in the same scope}}
+ // expected-warning {{mutex 'sls_mu' is acquired exclusively and shared in the same scope}}
else
sls_mu.ReaderLock(); // \
- // expected-note {{the other lock of mutex 'sls_mu' is here}}
+ // expected-note {{the other acquisition of mutex 'sls_mu' is here}}
*pgb_var = 1;
sls_mu.Unlock();
}
@@ -670,10 +670,10 @@ void shared_bad_1() {
void shared_bad_2() {
if (getBool())
sls_mu.ReaderLock(); // \
- // expected-warning {{mutex 'sls_mu' is locked exclusively and shared in the same scope}}
+ // expected-warning {{mutex 'sls_mu' is acquired exclusively and shared in the same scope}}
else
sls_mu.Lock(); // \
- // expected-note {{the other lock of mutex 'sls_mu' is here}}
+ // expected-note {{the other acquisition of mutex 'sls_mu' is here}}
*pgb_var = 1;
sls_mu.Unlock();
}
@@ -762,49 +762,49 @@ void es_fun_10() {
void es_bad_0() {
Bar.aa_elr_fun(); // \
- // expected-warning {{calling function 'aa_elr_fun' requires exclusive lock on 'aa_mu'}}
+ // expected-warning {{calling function 'aa_elr_fun' requires holding mutex 'aa_mu' exclusively}}
}
void es_bad_1() {
aa_mu.ReaderLock();
Bar.aa_elr_fun(); // \
- // expected-warning {{calling function 'aa_elr_fun' requires exclusive lock on 'aa_mu'}}
+ // expected-warning {{calling function 'aa_elr_fun' requires holding mutex 'aa_mu' exclusively}}
aa_mu.Unlock();
}
void es_bad_2() {
Bar.aa_elr_fun_s(); // \
- // expected-warning {{calling function 'aa_elr_fun_s' requires shared lock on 'aa_mu'}}
+ // expected-warning {{calling function 'aa_elr_fun_s' requires holding mutex 'aa_mu'}}
}
void es_bad_3() {
MyLRFoo.test(); // \
- // expected-warning {{calling function 'test' requires exclusive lock on 'sls_mu'}}
+ // expected-warning {{calling function 'test' requires holding mutex 'sls_mu' exclusively}}
}
void es_bad_4() {
MyLRFoo.testShared(); // \
- // expected-warning {{calling function 'testShared' requires shared lock on 'sls_mu2'}}
+ // expected-warning {{calling function 'testShared' requires holding mutex 'sls_mu2'}}
}
void es_bad_5() {
sls_mu.ReaderLock();
MyLRFoo.test(); // \
- // expected-warning {{calling function 'test' requires exclusive lock on 'sls_mu'}}
+ // expected-warning {{calling function 'test' requires holding mutex 'sls_mu' exclusively}}
sls_mu.Unlock();
}
void es_bad_6() {
sls_mu.Lock();
Bar.le_fun(); // \
- // expected-warning {{cannot call function 'le_fun' while mutex 'sls_mu' is locked}}
+ // expected-warning {{cannot call function 'le_fun' while mutex 'sls_mu' is held}}
sls_mu.Unlock();
}
void es_bad_7() {
sls_mu.ReaderLock();
Bar.le_fun(); // \
- // expected-warning {{cannot call function 'le_fun' while mutex 'sls_mu' is locked}}
+ // expected-warning {{cannot call function 'le_fun' while mutex 'sls_mu' is held}}
sls_mu.Unlock();
}
@@ -1209,7 +1209,7 @@ void Foo::bar()
{
int x;
mu_.Lock();
- x = foo(); // expected-warning {{calling function 'foo' requires exclusive lock on 'mu2'}}
+ x = foo(); // expected-warning {{calling function 'foo' requires holding mutex 'mu2' exclusively}}
a_ = x + 1;
mu_.Unlock();
if (x > 5) {
@@ -1223,13 +1223,13 @@ void main()
{
Foo f1, *f2;
f1.mu_.Lock();
- f1.bar(); // expected-warning {{cannot call function 'bar' while mutex 'f1.mu_' is locked}}
+ f1.bar(); // expected-warning {{cannot call function 'bar' while mutex 'f1.mu_' is held}}
mu2.Lock();
f1.foo();
mu2.Unlock();
f1.mu_.Unlock();
f2->mu_.Lock();
- f2->bar(); // expected-warning {{cannot call function 'bar' while mutex 'f2->mu_' is locked}}
+ f2->bar(); // expected-warning {{cannot call function 'bar' while mutex 'f2->mu_' is held}}
f2->mu_.Unlock();
mu2.Lock();
w = 2;
@@ -1258,7 +1258,7 @@ void func()
b1->MyLock();
b1->a_ = 5;
b2->a_ = 3; // \
- // expected-warning {{writing variable 'a_' requires locking 'b2->mu1_' exclusively}} \
+ // expected-warning {{writing variable 'a_' requires holding mutex 'b2->mu1_' exclusively}} \
// expected-note {{found near match 'b1->mu1_'}}
b2->MyLock();
b2->MyUnlock();
@@ -1288,18 +1288,18 @@ int func(int i)
{
int x;
b3->mu1_.Lock();
- res = b1.a_ + b3->b_; // expected-warning {{reading variable 'a_' requires locking 'b1.mu1_'}} \
- // expected-warning {{writing variable 'res' requires locking 'mu' exclusively}} \
+ res = b1.a_ + b3->b_; // expected-warning {{reading variable 'a_' requires holding mutex 'b1.mu1_'}} \
+ // expected-warning {{writing variable 'res' requires holding mutex 'mu' exclusively}} \
// expected-note {{found near match 'b3->mu1_'}}
- *p = i; // expected-warning {{reading variable 'p' requires locking 'mu'}} \
- // expected-warning {{writing the value pointed to by 'p' requires locking 'mu' exclusively}}
- b1.a_ = res + b3->b_; // expected-warning {{reading variable 'res' requires locking 'mu'}} \
- // expected-warning {{writing variable 'a_' requires locking 'b1.mu1_' exclusively}} \
+ *p = i; // expected-warning {{reading variable 'p' requires holding mutex 'mu'}} \
+ // expected-warning {{writing the value pointed to by 'p' requires holding mutex 'mu' exclusively}}
+ b1.a_ = res + b3->b_; // expected-warning {{reading variable 'res' requires holding mutex 'mu'}} \
+ // expected-warning {{writing variable 'a_' requires holding mutex 'b1.mu1_' exclusively}} \
// expected-note {{found near match 'b3->mu1_'}}
- b3->b_ = *b1.q; // expected-warning {{reading the value pointed to by 'q' requires locking 'mu'}}
+ b3->b_ = *b1.q; // expected-warning {{reading the value pointed to by 'q' requires holding mutex 'mu'}}
b3->mu1_.Unlock();
- b1.b_ = res; // expected-warning {{reading variable 'res' requires locking 'mu'}}
- x = res; // expected-warning {{reading variable 'res' requires locking 'mu'}}
+ b1.b_ = res; // expected-warning {{reading variable 'res' requires holding mutex 'mu'}}
+ x = res; // expected-warning {{reading variable 'res' requires holding mutex 'mu'}}
return x;
}
} // end namespace thread_annot_lock_21
@@ -1321,10 +1321,10 @@ class Foo {
child->Func(new_foo); // There shouldn't be any warning here as the
// acquired lock is not in child.
child->bar(7); // \
- // expected-warning {{calling function 'bar' requires exclusive lock on 'child->lock_'}} \
+ // expected-warning {{calling function 'bar' requires holding mutex 'child->lock_' exclusively}} \
// expected-note {{found near match 'lock_'}}
child->a_ = 5; // \
- // expected-warning {{writing variable 'a_' requires locking 'child->lock_' exclusively}} \
+ // expected-warning {{writing variable 'a_' requires holding mutex 'child->lock_' exclusively}} \
// expected-note {{found near match 'lock_'}}
lock_.Unlock();
}
@@ -1362,7 +1362,7 @@ void Foo::Func(Foo* child) {
lock_.Lock();
child->lock_.Lock();
- child->Func(new_foo); // expected-warning {{cannot call function 'Func' while mutex 'child->lock_' is locked}}
+ child->Func(new_foo); // expected-warning {{cannot call function 'Func' while mutex 'child->lock_' is held}}
child->bar(7);
child->a_ = 5;
child->lock_.Unlock();
@@ -1401,8 +1401,8 @@ class Foo {
public:
void f1() EXCLUSIVE_LOCKS_REQUIRED(mu2) EXCLUSIVE_LOCKS_REQUIRED(mu1) {
x = 5;
- f2(); // expected-warning {{cannot call function 'f2' while mutex 'mu1' is locked}} \
- // expected-warning {{cannot call function 'f2' while mutex 'mu2' is locked}}
+ f2(); // expected-warning {{cannot call function 'f2' while mutex 'mu1' is held}} \
+ // expected-warning {{cannot call function 'f2' while mutex 'mu2' is held}}
}
};
@@ -1410,8 +1410,8 @@ Foo *foo;
void func()
{
- foo->f1(); // expected-warning {{calling function 'f1' requires exclusive lock on 'foo->mu2'}} \
- // expected-warning {{calling function 'f1' requires exclusive lock on 'foo->mu1'}}
+ foo->f1(); // expected-warning {{calling function 'f1' requires holding mutex 'foo->mu2' exclusively}} \
+ // expected-warning {{calling function 'f1' requires holding mutex 'foo->mu1' exclusively}}
}
} // end namespace thread_annot_lock_42
@@ -1434,14 +1434,14 @@ void main() {
Child *c;
Base *b = c;
- b->func1(); // expected-warning {{calling function 'func1' requires exclusive lock on 'b->mu_'}}
+ b->func1(); // expected-warning {{calling function 'func1' requires holding mutex 'b->mu_' exclusively}}
b->mu_.Lock();
- b->func2(); // expected-warning {{cannot call function 'func2' while mutex 'b->mu_' is locked}}
+ b->func2(); // expected-warning {{cannot call function 'func2' while mutex 'b->mu_' is held}}
b->mu_.Unlock();
- c->func1(); // expected-warning {{calling function 'func1' requires exclusive lock on 'c->mu_'}}
+ c->func1(); // expected-warning {{calling function 'func1' requires holding mutex 'c->mu_' exclusively}}
c->mu_.Lock();
- c->func2(); // expected-warning {{cannot call function 'func2' while mutex 'c->mu_' is locked}}
+ c->func2(); // expected-warning {{cannot call function 'func2' while mutex 'c->mu_' is held}}
c->mu_.Unlock();
}
} // end namespace thread_annot_lock_46
@@ -1468,10 +1468,10 @@ int Foo::method1(int i) {
void main()
{
Foo a;
- a.method1(1); // expected-warning {{calling function 'method1' requires shared lock on 'a.mu1'}} \
- // expected-warning {{calling function 'method1' requires shared lock on 'mu'}} \
- // expected-warning {{calling function 'method1' requires shared lock on 'a.mu2'}} \
- // expected-warning {{calling function 'method1' requires shared lock on 'mu3'}}
+ a.method1(1); // expected-warning {{calling function 'method1' requires holding mutex 'a.mu1'}} \
+ // expected-warning {{calling function 'method1' requires holding mutex 'mu'}} \
+ // expected-warning {{calling function 'method1' requires holding mutex 'a.mu2'}} \
+ // expected-warning {{calling function 'method1' requires holding mutex 'mu3'}}
}
} // end namespace thread_annot_lock_67_modified
@@ -1516,14 +1516,14 @@ namespace substitution_test {
DataLocker dlr;
dlr.lockData(d1); // expected-note {{mutex acquired here}}
dlr.unlockData(d2); // \
- // expected-warning {{unlocking 'd2->mu' that was not locked}}
- } // expected-warning {{mutex 'd1->mu' is still locked at the end of function}}
+ // expected-warning {{releasing mutex 'd2->mu' that was not held}}
+ } // expected-warning {{mutex 'd1->mu' is still held at the end of function}}
void bar4(MyData* d1, MyData* d2) {
DataLocker dlr;
dlr.lockData(d1);
foo(d2); // \
- // expected-warning {{calling function 'foo' requires exclusive lock on 'd2->mu'}} \
+ // expected-warning {{calling function 'foo' requires holding mutex 'd2->mu' exclusively}} \
// expected-note {{found near match 'd1->mu'}}
dlr.unlockData(d1);
}
@@ -1566,8 +1566,8 @@ namespace template_member_test {
template<typename U>
struct IndirectLock {
int DoNaughtyThings(T *t) {
- u->n = 0; // expected-warning {{reading variable 'u' requires locking 'm'}}
- return t->s->n; // expected-warning {{reading variable 's' requires locking 't->m'}}
+ u->n = 0; // expected-warning {{reading variable 'u' requires holding mutex 'm'}}
+ return t->s->n; // expected-warning {{reading variable 's' requires holding mutex 't->m'}}
}
};
@@ -1583,7 +1583,7 @@ namespace template_member_test {
template<typename U> struct W {
V v;
void f(U u) {
- v.p->f(u); // expected-warning {{reading variable 'p' requires locking 'v.m'}}
+ v.p->f(u); // expected-warning {{reading variable 'p' requires holding mutex 'v.m'}}
}
};
template struct W<int>; // expected-note {{here}}
@@ -1620,7 +1620,7 @@ struct TestScopedLockable {
void foo3() {
MutexLock mulock_a(&mu1);
MutexLock mulock_b(&mu1); // \
- // expected-warning {{locking 'mu1' that is already locked}}
+ // expected-warning {{acquiring mutex 'mu1' that is already held}}
}
void foo4() {
@@ -1646,7 +1646,7 @@ Foo fooObj;
void foo() EXCLUSIVE_LOCKS_REQUIRED(fooObj.mu_);
void bar() {
- foo(); // expected-warning {{calling function 'foo' requires exclusive lock on 'fooObj.mu_'}}
+ foo(); // expected-warning {{calling function 'foo' requires holding mutex 'fooObj.mu_' exclusively}}
fooObj.mu_.Lock();
foo();
fooObj.mu_.Unlock();
@@ -1722,7 +1722,7 @@ struct TestTryLock {
if (cond)
b = true;
if (b) { // b should be unknown at this point, because of the join point
- a = 8; // expected-warning {{writing variable 'a' requires locking 'mu' exclusively}}
+ a = 8; // expected-warning {{writing variable 'a' requires holding mutex 'mu' exclusively}}
}
if (b2) { // b2 should be known at this point.
a = 8;
@@ -1748,7 +1748,7 @@ struct TestTryLock {
while (cond) {
if (b) { // b should be uknown at this point b/c of the loop
- a = 10; // expected-warning {{writing variable 'a' requires locking 'mu' exclusively}}
+ a = 10; // expected-warning {{writing variable 'a' requires holding mutex 'mu' exclusively}}
}
b = !b;
}
@@ -1876,7 +1876,7 @@ void test() {
f1.mu_.Unlock();
bt.barTD(&f1); // \
- // expected-warning {{calling function 'barTD' requires exclusive lock on 'f1.mu_'}} \
+ // expected-warning {{calling function 'barTD' requires holding mutex 'f1.mu_' exclusively}} \
// expected-note {{found near match 'bt.fooBase.mu_'}}
bt.fooBase.mu_.Unlock();
@@ -1885,7 +1885,7 @@ void test() {
Cell<int> cell;
cell.data = 0; // \
- // expected-warning {{writing variable 'data' requires locking 'cell.mu_' exclusively}}
+ // expected-warning {{writing variable 'data' requires holding mutex 'cell.mu_' exclusively}}
cell.foo();
cell.mu_.Lock();
cell.fooEx();
@@ -1954,7 +1954,7 @@ void Foo::foo1(Foo *f_defined) {
void test() {
Foo myfoo;
myfoo.foo1(&myfoo); // \
- // expected-warning {{calling function 'foo1' requires exclusive lock on 'myfoo.mu_'}}
+ // expected-warning {{calling function 'foo1' requires holding mutex 'myfoo.mu_' exclusively}}
myfoo.mu_.Lock();
myfoo.foo1(&myfoo);
myfoo.mu_.Unlock();
@@ -1980,7 +1980,7 @@ namespace GoingNative {
if (bar()) {
// ...
if (foo())
- continue; // expected-warning {{expecting mutex 'm' to be locked at start of each loop}}
+ continue; // expected-warning {{expecting mutex 'm' to be held at start of each loop}}
//...
}
// ...
@@ -2069,21 +2069,21 @@ void test() {
Foo myFoo;
myFoo.foo2(); // \
- // expected-warning {{calling function 'foo2' requires exclusive lock on 'myFoo.mu_'}}
+ // expected-warning {{calling function 'foo2' requires holding mutex 'myFoo.mu_' exclusively}}
myFoo.foo3(&myFoo); // \
- // expected-warning {{calling function 'foo3' requires exclusive lock on 'myFoo.mu_'}}
+ // expected-warning {{calling function 'foo3' requires holding mutex 'myFoo.mu_' exclusively}}
myFoo.fooT1(dummy); // \
- // expected-warning {{calling function 'fooT1' requires exclusive lock on 'myFoo.mu_'}}
+ // expected-warning {{calling function 'fooT1' requires holding mutex 'myFoo.mu_' exclusively}}
myFoo.fooT2(dummy); // \
- // expected-warning {{calling function 'fooT2' requires exclusive lock on 'myFoo.mu_'}}
+ // expected-warning {{calling function 'fooT2' requires holding mutex 'myFoo.mu_' exclusively}}
fooF1(&myFoo); // \
- // expected-warning {{calling function 'fooF1' requires exclusive lock on 'myFoo.mu_'}}
+ // expected-warning {{calling function 'fooF1' requires holding mutex 'myFoo.mu_' exclusively}}
fooF2(&myFoo); // \
- // expected-warning {{calling function 'fooF2' requires exclusive lock on 'myFoo.mu_'}}
+ // expected-warning {{calling function 'fooF2' requires holding mutex 'myFoo.mu_' exclusively}}
fooF3(&myFoo); // \
- // expected-warning {{calling function 'fooF3' requires exclusive lock on 'myFoo.mu_'}}
+ // expected-warning {{calling function 'fooF3' requires holding mutex 'myFoo.mu_' exclusively}}
myFoo.mu_.Lock();
myFoo.foo2();
@@ -2099,7 +2099,7 @@ void test() {
FooT<int> myFooT;
myFooT.foo(); // \
- // expected-warning {{calling function 'foo' requires exclusive lock on 'myFooT.mu_'}}
+ // expected-warning {{calling function 'foo' requires holding mutex 'myFooT.mu_' exclusively}}
}
} // end namespace FunctionDefinitionTest
@@ -2127,7 +2127,7 @@ public:
void test() {
foo = 2; // \
- // expected-warning {{writing variable 'foo' requires locking 'this' exclusively}}
+ // expected-warning {{writing variable 'foo' requires holding mutex 'this' exclusively}}
}
};
@@ -2192,11 +2192,11 @@ public:
void foo() {
a = 0; // \
- // expected-warning {{writing variable 'a' requires locking 'mu_' exclusively}}
+ // expected-warning {{writing variable 'a' requires holding mutex 'mu_' exclusively}}
b = 0; // \
- // expected-warning {{writing variable 'b' requires locking 'mu_' exclusively}}
+ // expected-warning {{writing variable 'b' requires holding mutex 'mu_' exclusively}}
c = 0; // \
- // expected-warning {{writing variable 'c' requires locking 'mu_' exclusively}}
+ // expected-warning {{writing variable 'c' requires holding mutex 'mu_' exclusively}}
}
private:
@@ -2283,31 +2283,31 @@ void test() {
bar.getFoo().mu_.Lock();
bar.getFooey().a = 0; // \
- // expected-warning {{writing variable 'a' requires locking 'bar.getFooey().mu_' exclusively}} \
+ // expected-warning {{writing variable 'a' requires holding mutex 'bar.getFooey().mu_' exclusively}} \
// expected-note {{found near match 'bar.getFoo().mu_'}}
bar.getFoo().mu_.Unlock();
bar.getFoo2(a).mu_.Lock();
bar.getFoo2(b).a = 0; // \
- // expected-warning {{writing variable 'a' requires locking 'bar.getFoo2(b).mu_' exclusively}} \
+ // expected-warning {{writing variable 'a' requires holding mutex 'bar.getFoo2(b).mu_' exclusively}} \
// expected-note {{found near match 'bar.getFoo2(a).mu_'}}
bar.getFoo2(a).mu_.Unlock();
bar.getFoo3(a, b).mu_.Lock();
bar.getFoo3(a, c).a = 0; // \
- // expected-warning {{writing variable 'a' requires locking 'bar.getFoo3(a,c).mu_' exclusively}} \
+ // expected-warning {{writing variable 'a' requires holding mutex 'bar.getFoo3(a,c).mu_' exclusively}} \
// expected-note {{'bar.getFoo3(a,b).mu_'}}
bar.getFoo3(a, b).mu_.Unlock();
getBarFoo(bar, a).mu_.Lock();
getBarFoo(bar, b).a = 0; // \
- // expected-warning {{writing variable 'a' requires locking 'getBarFoo(bar,b).mu_' exclusively}} \
+ // expected-warning {{writing variable 'a' requires holding mutex 'getBarFoo(bar,b).mu_' exclusively}} \
// expected-note {{'getBarFoo(bar,a).mu_'}}
getBarFoo(bar, a).mu_.Unlock();
(a > 0 ? fooArray[1] : fooArray[b]).mu_.Lock();
(a > 0 ? fooArray[b] : fooArray[c]).a = 0; // \
- // expected-warning {{writing variable 'a' requires locking '((a#_)#_#fooArray[b]).mu_' exclusively}} \
+ // expected-warning {{writing variable 'a' requires holding mutex '((a#_)#_#fooArray[b]).mu_' exclusively}} \
// expected-note {{'((a#_)#_#fooArray[_]).mu_'}}
(a > 0 ? fooArray[1] : fooArray[b]).mu_.Unlock();
}
@@ -2356,19 +2356,19 @@ public:
// Calls getMu() directly to lock and unlock
void test1(Foo* f1, Foo* f2) {
- f1->a = 0; // expected-warning {{writing variable 'a' requires locking 'f1->mu_' exclusively}}
- f1->foo(); // expected-warning {{calling function 'foo' requires exclusive lock on 'f1->mu_'}}
+ f1->a = 0; // expected-warning {{writing variable 'a' requires holding mutex 'f1->mu_' exclusively}}
+ f1->foo(); // expected-warning {{calling function 'foo' requires holding mutex 'f1->mu_' exclusively}}
- f1->foo2(f2); // expected-warning {{calling function 'foo2' requires exclusive lock on 'f1->mu_'}} \
- // expected-warning {{calling function 'foo2' requires exclusive lock on 'f2->mu_'}}
- Foo::sfoo(f1); // expected-warning {{calling function 'sfoo' requires exclusive lock on 'f1->mu_'}}
+ f1->foo2(f2); // expected-warning {{calling function 'foo2' requires holding mutex 'f1->mu_' exclusively}} \
+ // expected-warning {{calling function 'foo2' requires holding mutex 'f2->mu_' exclusively}}
+ Foo::sfoo(f1); // expected-warning {{calling function 'sfoo' requires holding mutex 'f1->mu_' exclusively}}
f1->getMu()->Lock();
f1->a = 0;
f1->foo();
f1->foo2(f2); // \
- // expected-warning {{calling function 'foo2' requires exclusive lock on 'f2->mu_'}} \
+ // expected-warning {{calling function 'foo2' requires holding mutex 'f2->mu_' exclusively}} \
// expected-note {{found near match 'f1->mu_'}}
Foo::getMu(f2)->Lock();
@@ -2398,19 +2398,19 @@ public:
// Use getMu() within other attributes.
// This requires at lest levels of substitution, more in the case of
void test2(Bar* b1, Bar* b2) {
- b1->b = 0; // expected-warning {{writing variable 'b' requires locking 'b1->mu_' exclusively}}
- b1->bar(); // expected-warning {{calling function 'bar' requires exclusive lock on 'b1->mu_'}}
- b1->bar2(b2); // expected-warning {{calling function 'bar2' requires exclusive lock on 'b1->mu_'}} \
- // expected-warning {{calling function 'bar2' requires exclusive lock on 'b2->mu_'}}
- Bar::sbar(b1); // expected-warning {{calling function 'sbar' requires exclusive lock on 'b1->mu_'}}
- Bar::sbar2(b1); // expected-warning {{calling function 'sbar2' requires exclusive lock on 'b1->mu_'}}
+ b1->b = 0; // expected-warning {{writing variable 'b' requires holding mutex 'b1->mu_' exclusively}}
+ b1->bar(); // expected-warning {{calling function 'bar' requires holding mutex 'b1->mu_' exclusively}}
+ b1->bar2(b2); // expected-warning {{calling function 'bar2' requires holding mutex 'b1->mu_' exclusively}} \
+ // expected-warning {{calling function 'bar2' requires holding mutex 'b2->mu_' exclusively}}
+ Bar::sbar(b1); // expected-warning {{calling function 'sbar' requires holding mutex 'b1->mu_' exclusively}}
+ Bar::sbar2(b1); // expected-warning {{calling function 'sbar2' requires holding mutex 'b1->mu_' exclusively}}
b1->getMu()->Lock();
b1->b = 0;
b1->bar();
b1->bar2(b2); // \
- // expected-warning {{calling function 'bar2' requires exclusive lock on 'b2->mu_'}} \
+ // expected-warning {{calling function 'bar2' requires holding mutex 'b2->mu_' exclusively}} \
// // expected-note {{found near match 'b1->mu_'}}
b2->getMu()->Lock();
@@ -2476,13 +2476,13 @@ void Foo::test3() {
ReleasableMutexLock rlock(&mu_);
a = 0;
rlock.Release();
- a = 1; // expected-warning {{writing variable 'a' requires locking 'mu_' exclusively}}
+ a = 1; // expected-warning {{writing variable 'a' requires holding mutex 'mu_' exclusively}}
}
void Foo::test4() {
ReleasableMutexLock rlock(&mu_);
rlock.Release();
- rlock.Release(); // expected-warning {{unlocking 'mu_' that was not locked}}
+ rlock.Release(); // expected-warning {{releasing mutex 'mu_' that was not held}}
}
void Foo::test5() {
@@ -2491,7 +2491,7 @@ void Foo::test5() {
rlock.Release();
}
// no warning on join point for managed lock.
- rlock.Release(); // expected-warning {{unlocking 'mu_' that was not locked}}
+ rlock.Release(); // expected-warning {{releasing mutex 'mu_' that was not held}}
}
@@ -2560,12 +2560,12 @@ public:
void foo1() EXCLUSIVE_LOCKS_REQUIRED(mutex_) { // expected-note {{mutex acquired here}}
mutex_.Unlock();
- } // expected-warning {{expecting mutex 'mutex_' to be locked at the end of function}}
+ } // expected-warning {{expecting mutex 'mutex_' to be held at the end of function}}
void foo2() SHARED_LOCKS_REQUIRED(mutex_) { // expected-note {{mutex acquired here}}
mutex_.Unlock();
- } // expected-warning {{expecting mutex 'mutex_' to be locked at the end of function}}
+ } // expected-warning {{expecting mutex 'mutex_' to be held at the end of function}}
};
} // end namespace UnlockBug
@@ -2599,7 +2599,7 @@ class Foo {
void test2() {
WTF_ScopedLockable wtf(&mu_); // expected-note {{mutex acquired here}}
- } // expected-warning {{mutex 'mu_' is still locked at the end of function}}
+ } // expected-warning {{mutex 'mu_' is still held at the end of function}}
void test3() {
if (c) {
@@ -2622,7 +2622,7 @@ class Foo {
if (c) {
WTF_ScopedLockable wtf(&mu_); // expected-note {{mutex acquired here}}
}
- } // expected-warning {{mutex 'mu_' is not locked on every path through here}}
+ } // expected-warning {{mutex 'mu_' is not held on every path through here}}
void test6() {
if (c) {
@@ -2631,7 +2631,7 @@ class Foo {
else {
WTF_ScopedLockable wtf(&mu_); // expected-note {{mutex acquired here}}
}
- } // expected-warning {{mutex 'mu_' is not locked on every path through here}}
+ } // expected-warning {{mutex 'mu_' is not held on every path through here}}
};
@@ -2655,7 +2655,7 @@ void Foo::test() {
ReaderMutexLock lock(getMutexPtr().get());
int b = a;
}
- int b = a; // expected-warning {{reading variable 'a' requires locking 'getMutexPtr()'}}
+ int b = a; // expected-warning {{reading variable 'a' requires holding mutex 'getMutexPtr()'}}
}
} // end namespace TemporaryCleanupExpr
@@ -2686,9 +2686,9 @@ public:
};
void Foo::test0() {
- a = 0; // expected-warning {{writing variable 'a' requires locking 'mu_' exclusively}}
- b = 0; // expected-warning {{writing variable 'b' requires locking 'mu_' exclusively}}
- c = 0; // expected-warning {{writing variable 'c' requires locking 'mu_' exclusively}}
+ a = 0; // expected-warning {{writing variable 'a' requires holding mutex 'mu_' exclusively}}
+ b = 0; // expected-warning {{writing variable 'b' requires holding mutex 'mu_' exclusively}}
+ c = 0; // expected-warning {{writing variable 'c' requires holding mutex 'mu_' exclusively}}
}
void Foo::test1() {
@@ -2772,10 +2772,10 @@ void Foo::test7() {
void Foo::test8() {
mu_->Lock();
- mu_.get()->Lock(); // expected-warning {{locking 'mu_' that is already locked}}
- (*mu_).Lock(); // expected-warning {{locking 'mu_' that is already locked}}
+ mu_.get()->Lock(); // expected-warning {{acquiring mutex 'mu_' that is already held}}
+ (*mu_).Lock(); // expected-warning {{acquiring mutex 'mu_' that is already held}}
mu_.get()->Unlock();
- Unlock(); // expected-warning {{unlocking 'mu_' that was not locked}}
+ Unlock(); // expected-warning {{releasing mutex 'mu_' that was not held}}
}
@@ -2790,9 +2790,9 @@ class Bar {
void Bar::test0() {
- foo->a = 0; // expected-warning {{writing variable 'a' requires locking 'foo->mu_' exclusively}}
- (*foo).b = 0; // expected-warning {{writing variable 'b' requires locking 'foo->mu_' exclusively}}
- foo.get()->c = 0; // expected-warning {{writing variable 'c' requires locking 'foo->mu_' exclusively}}
+ foo->a = 0; // expected-warning {{writing variable 'a' requires holding mutex 'foo->mu_' exclusively}}
+ (*foo).b = 0; // expected-warning {{writing variable 'b' requires holding mutex 'foo->mu_' exclusively}}
+ foo.get()->c = 0; // expected-warning {{writing variable 'c' requires holding mutex 'foo->mu_' exclusively}}
}
@@ -2906,9 +2906,9 @@ void test0() {
foo.unlock();
foo.lock();
- foo.lock(); // expected-warning {{locking 'foo' that is already locked}}
+ foo.lock(); // expected-warning {{acquiring mutex 'foo' that is already held}}
foo.unlock();
- foo.unlock(); // expected-warning {{unlocking 'foo' that was not locked}}
+ foo.unlock(); // expected-warning {{releasing mutex 'foo' that was not held}}
}
@@ -2919,10 +2919,10 @@ void test1() {
foo.unlock1();
foo.lock1();
- foo.lock1(); // expected-warning {{locking 'foo.mu1_' that is already locked}}
+ foo.lock1(); // expected-warning {{acquiring mutex 'foo.mu1_' that is already held}}
foo.a = 0;
foo.unlock1();
- foo.unlock1(); // expected-warning {{unlocking 'foo.mu1_' that was not locked}}
+ foo.unlock1(); // expected-warning {{releasing mutex 'foo.mu1_' that was not held}}
}
@@ -2933,10 +2933,10 @@ int test2() {
foo.unlock1();
foo.slock1();
- foo.slock1(); // expected-warning {{locking 'foo.mu1_' that is already locked}}
+ foo.slock1(); // expected-warning {{acquiring mutex 'foo.mu1_' that is already held}}
int d2 = foo.a;
foo.unlock1();
- foo.unlock1(); // expected-warning {{unlocking 'foo.mu1_' that was not locked}}
+ foo.unlock1(); // expected-warning {{releasing mutex 'foo.mu1_' that was not held}}
return d1 + d2;
}
@@ -2951,17 +2951,17 @@ void test3() {
foo.lock3();
foo.lock3(); // \
- // expected-warning {{locking 'foo.mu1_' that is already locked}} \
- // expected-warning {{locking 'foo.mu2_' that is already locked}} \
- // expected-warning {{locking 'foo.mu3_' that is already locked}}
+ // expected-warning {{acquiring mutex 'foo.mu1_' that is already held}} \
+ // expected-warning {{acquiring mutex 'foo.mu2_' that is already held}} \
+ // expected-warning {{acquiring mutex 'foo.mu3_' that is already held}}
foo.a = 0;
foo.b = 0;
foo.c = 0;
foo.unlock3();
foo.unlock3(); // \
- // expected-warning {{unlocking 'foo.mu1_' that was not locked}} \
- // expected-warning {{unlocking 'foo.mu2_' that was not locked}} \
- // expected-warning {{unlocking 'foo.mu3_' that was not locked}}
+ // expected-warning {{releasing mutex 'foo.mu1_' that was not held}} \
+ // expected-warning {{releasing mutex 'foo.mu2_' that was not held}} \
+ // expected-warning {{releasing mutex 'foo.mu3_' that was not held}}
}
@@ -2975,17 +2975,17 @@ void testlots() {
foo.locklots();
foo.locklots(); // \
- // expected-warning {{locking 'foo.mu1_' that is already locked}} \
- // expected-warning {{locking 'foo.mu2_' that is already locked}} \
- // expected-warning {{locking 'foo.mu3_' that is already locked}}
+ // expected-warning {{acquiring mutex 'foo.mu1_' that is already held}} \
+ // expected-warning {{acquiring mutex 'foo.mu2_' that is already held}} \
+ // expected-warning {{acquiring mutex 'foo.mu3_' that is already held}}
foo.a = 0;
foo.b = 0;
foo.c = 0;
foo.unlocklots();
foo.unlocklots(); // \
- // expected-warning {{unlocking 'foo.mu1_' that was not locked}} \
- // expected-warning {{unlocking 'foo.mu2_' that was not locked}} \
- // expected-warning {{unlocking 'foo.mu3_' that was not locked}}
+ // expected-warning {{releasing mutex 'foo.mu1_' that was not held}} \
+ // expected-warning {{releasing mutex 'foo.mu2_' that was not held}} \
+ // expected-warning {{releasing mutex 'foo.mu3_' that was not held}}
}
} // end namespace DuplicateAttributeTest
@@ -3010,7 +3010,7 @@ class Foo {
void Foo::test1() {
if (tryLockMutexP() == 0) {
- a = 0; // expected-warning {{writing variable 'a' requires locking 'mu_' exclusively}}
+ a = 0; // expected-warning {{writing variable 'a' requires holding mutex 'mu_' exclusively}}
return;
}
a = 0;
@@ -3032,14 +3032,14 @@ void Foo::test1() {
}
if (tryLockMutexI() == 0) {
- a = 0; // expected-warning {{writing variable 'a' requires locking 'mu_' exclusively}}
+ a = 0; // expected-warning {{writing variable 'a' requires holding mutex 'mu_' exclusively}}
return;
}
a = 0;
unlock();
if (0 == tryLockMutexI()) {
- a = 0; // expected-warning {{writing variable 'a' requires locking 'mu_' exclusively}}
+ a = 0; // expected-warning {{writing variable 'a' requires holding mutex 'mu_' exclusively}}
return;
}
a = 0;
@@ -3051,7 +3051,7 @@ void Foo::test1() {
}
if (mu_.TryLock() == false) {
- a = 0; // expected-warning {{writing variable 'a' requires locking 'mu_' exclusively}}
+ a = 0; // expected-warning {{writing variable 'a' requires holding mutex 'mu_' exclusively}}
return;
}
a = 0;
@@ -3062,12 +3062,12 @@ void Foo::test1() {
unlock();
}
else {
- a = 0; // expected-warning {{writing variable 'a' requires locking 'mu_' exclusively}}
+ a = 0; // expected-warning {{writing variable 'a' requires holding mutex 'mu_' exclusively}}
}
#if __has_feature(cxx_nullptr)
if (tryLockMutexP() == nullptr) {
- a = 0; // expected-warning {{writing variable 'a' requires locking 'mu_' exclusively}}
+ a = 0; // expected-warning {{writing variable 'a' requires holding mutex 'mu_' exclusively}}
return;
}
a = 0;
@@ -3103,26 +3103,26 @@ void test() {
Graph g2;
Node n1;
- n1.a = 0; // expected-warning {{writing variable 'a' requires locking '&ExistentialPatternMatching::Graph::mu_' exclusively}}
- n1.foo(); // expected-warning {{calling function 'foo' requires exclusive lock on '&ExistentialPatternMatching::Graph::mu_'}}
+ n1.a = 0; // expected-warning {{writing variable 'a' requires holding mutex '&ExistentialPatternMatching::Graph::mu_' exclusively}}
+ n1.foo(); // expected-warning {{calling function 'foo' requires holding mutex '&ExistentialPatternMatching::Graph::mu_' exclusively}}
n1.foo2();
g1.mu_.Lock();
n1.a = 0;
n1.foo();
- n1.foo2(); // expected-warning {{cannot call function 'foo2' while mutex '&ExistentialPatternMatching::Graph::mu_' is locked}}
+ n1.foo2(); // expected-warning {{cannot call function 'foo2' while mutex '&ExistentialPatternMatching::Graph::mu_' is held}}
g1.mu_.Unlock();
g2.mu_.Lock();
n1.a = 0;
n1.foo();
- n1.foo2(); // expected-warning {{cannot call function 'foo2' while mutex '&ExistentialPatternMatching::Graph::mu_' is locked}}
+ n1.foo2(); // expected-warning {{cannot call function 'foo2' while mutex '&ExistentialPatternMatching::Graph::mu_' is held}}
g2.mu_.Unlock();
LockAllGraphs();
n1.a = 0;
n1.foo();
- n1.foo2(); // expected-warning {{cannot call function 'foo2' while mutex '&ExistentialPatternMatching::Graph::mu_' is locked}}
+ n1.foo2(); // expected-warning {{cannot call function 'foo2' while mutex '&ExistentialPatternMatching::Graph::mu_' is held}}
UnlockAllGraphs();
LockAllGraphs();
@@ -3132,7 +3132,7 @@ void test() {
g2.mu_.Unlock();
LockAllGraphs();
- g1.mu_.Lock(); // expected-warning {{locking 'g1.mu_' that is already locked}}
+ g1.mu_.Lock(); // expected-warning {{acquiring mutex 'g1.mu_' that is already held}}
g1.mu_.Unlock();
}
@@ -3260,9 +3260,9 @@ class Foo {
beginNoWarnOnWrites();
}
a = 0; // \
- // expected-warning {{writing variable 'a' requires locking 'mu_' exclusively}}
+ // expected-warning {{writing variable 'a' requires holding mutex 'mu_' exclusively}}
endNoWarnOnWrites(); // \
- // expected-warning {{unlocking '*' that was not locked}}
+ // expected-warning {{releasing mutex '*' that was not held}}
}
@@ -3390,17 +3390,17 @@ public:
void test1() {
- Foo f; // expected-warning {{calling function 'Foo' requires exclusive lock on 'mu_'}}
- int a = f[0]; // expected-warning {{calling function 'operator[]' requires exclusive lock on 'mu_'}}
-} // expected-warning {{calling function '~Foo' requires exclusive lock on 'mu_'}}
+ Foo f; // expected-warning {{calling function 'Foo' requires holding mutex 'mu_' exclusively}}
+ int a = f[0]; // expected-warning {{calling function 'operator[]' requires holding mutex 'mu_' exclusively}}
+} // expected-warning {{calling function '~Foo' requires holding mutex 'mu_' exclusively}}
void test2() {
Bar::mu_.Lock();
{
- Bar b; // expected-warning {{cannot call function 'Bar' while mutex 'mu_' is locked}}
- int a = b[0]; // expected-warning {{cannot call function 'operator[]' while mutex 'mu_' is locked}}
- } // expected-warning {{cannot call function '~Bar' while mutex 'mu_' is locked}}
+ Bar b; // expected-warning {{cannot call function 'Bar' while mutex 'mu_' is held}}
+ int a = b[0]; // expected-warning {{cannot call function 'operator[]' while mutex 'mu_' is held}}
+ } // expected-warning {{cannot call function '~Bar' while mutex 'mu_' is held}}
Bar::mu_.Unlock();
}
@@ -3499,7 +3499,7 @@ void Foo::elr(Cell<T>* c1) { }
void Foo::test() {
Cell<int> cell;
elr(&cell); // \
- // expected-warning {{calling function 'elr' requires exclusive lock on 'cell.mu_'}}
+ // expected-warning {{calling function 'elr' requires holding mutex 'cell.mu_' exclusively}}
}
@@ -3512,7 +3512,7 @@ void globalELR(Cell<T>* c1) { }
void globalTest() {
Cell<int> cell;
globalELR(&cell); // \
- // expected-warning {{calling function 'globalELR' requires exclusive lock on 'cell.mu_'}}
+ // expected-warning {{calling function 'globalELR' requires holding mutex 'cell.mu_' exclusively}}
}
@@ -3533,7 +3533,7 @@ void globalELR2(Cell<T>* c4);
void globalTest2() {
Cell<int> cell;
globalELR2(&cell); // \
- // expected-warning {{calling function 'globalELR2' requires exclusive lock on 'cell.mu_'}}
+ // expected-warning {{calling function 'globalELR2' requires holding mutex 'cell.mu_' exclusively}}
}
@@ -3550,7 +3550,7 @@ void testFooT() {
Cell<int> cell;
FooT<int> foo;
foo.elr(&cell); // \
- // expected-warning {{calling function 'elr' requires exclusive lock on 'cell.mu_'}}
+ // expected-warning {{calling function 'elr' requires holding mutex 'cell.mu_' exclusively}}
}
} // end namespace TemplateFunctionParamRemapTest
@@ -3616,8 +3616,14 @@ class Foo {
EXCLUSIVE_TRYLOCK_FUNCTION(true, mu2_);
bool readertrylock() SHARED_TRYLOCK_FUNCTION(true, mu1_)
SHARED_TRYLOCK_FUNCTION(true, mu2_);
+ void assertBoth() ASSERT_EXCLUSIVE_LOCK(mu1_)
+ ASSERT_EXCLUSIVE_LOCK(mu2_);
+ void assertShared() ASSERT_SHARED_LOCK(mu1_)
+ ASSERT_SHARED_LOCK(mu2_);
void test();
+ void testAssert();
+ void testAssertShared();
};
@@ -3676,6 +3682,21 @@ void Foo::test() {
}
}
+// Force duplication of attributes
+void Foo::assertBoth() { }
+void Foo::assertShared() { }
+
+void Foo::testAssert() {
+ assertBoth();
+ a = 0;
+ b = 0;
+}
+
+void Foo::testAssertShared() {
+ assertShared();
+ int zz = a + b;
+}
+
} // end namespace MultipleAttributeTest
@@ -3717,24 +3738,24 @@ public:
// method call tests
void test() {
data_.setValue(0); // FIXME -- should be writing \
- // expected-warning {{reading variable 'data_' requires locking 'mu_'}}
+ // expected-warning {{reading variable 'data_' requires holding mutex 'mu_'}}
int a = data_.getValue(); // \
- // expected-warning {{reading variable 'data_' requires locking 'mu_'}}
+ // expected-warning {{reading variable 'data_' requires holding mutex 'mu_'}}
datap1_->setValue(0); // FIXME -- should be writing \
- // expected-warning {{reading variable 'datap1_' requires locking 'mu_'}}
+ // expected-warning {{reading variable 'datap1_' requires holding mutex 'mu_'}}
a = datap1_->getValue(); // \
- // expected-warning {{reading variable 'datap1_' requires locking 'mu_'}}
+ // expected-warning {{reading variable 'datap1_' requires holding mutex 'mu_'}}
datap2_->setValue(0); // FIXME -- should be writing \
- // expected-warning {{reading the value pointed to by 'datap2_' requires locking 'mu_'}}
+ // expected-warning {{reading the value pointed to by 'datap2_' requires holding mutex 'mu_'}}
a = datap2_->getValue(); // \
- // expected-warning {{reading the value pointed to by 'datap2_' requires locking 'mu_'}}
+ // expected-warning {{reading the value pointed to by 'datap2_' requires holding mutex 'mu_'}}
(*datap2_).setValue(0); // FIXME -- should be writing \
- // expected-warning {{reading the value pointed to by 'datap2_' requires locking 'mu_'}}
+ // expected-warning {{reading the value pointed to by 'datap2_' requires holding mutex 'mu_'}}
a = (*datap2_).getValue(); // \
- // expected-warning {{reading the value pointed to by 'datap2_' requires locking 'mu_'}}
+ // expected-warning {{reading the value pointed to by 'datap2_' requires holding mutex 'mu_'}}
mu_.Lock();
data_.setValue(1);
@@ -3752,31 +3773,31 @@ public:
// operator tests
void test2() {
- data_ = Data(1); // expected-warning {{writing variable 'data_' requires locking 'mu_' exclusively}}
- *datap1_ = data_; // expected-warning {{reading variable 'datap1_' requires locking 'mu_'}} \
- // expected-warning {{reading variable 'data_' requires locking 'mu_'}}
- *datap2_ = data_; // expected-warning {{writing the value pointed to by 'datap2_' requires locking 'mu_' exclusively}} \
- // expected-warning {{reading variable 'data_' requires locking 'mu_'}}
- data_ = *datap1_; // expected-warning {{writing variable 'data_' requires locking 'mu_' exclusively}} \
- // expected-warning {{reading variable 'datap1_' requires locking 'mu_'}}
- data_ = *datap2_; // expected-warning {{writing variable 'data_' requires locking 'mu_' exclusively}} \
- // expected-warning {{reading the value pointed to by 'datap2_' requires locking 'mu_'}}
-
- data_[0] = 0; // expected-warning {{reading variable 'data_' requires locking 'mu_'}}
- (*datap2_)[0] = 0; // expected-warning {{reading the value pointed to by 'datap2_' requires locking 'mu_'}}
-
- data_(); // expected-warning {{reading variable 'data_' requires locking 'mu_'}}
+ data_ = Data(1); // expected-warning {{writing variable 'data_' requires holding mutex 'mu_' exclusively}}
+ *datap1_ = data_; // expected-warning {{reading variable 'datap1_' requires holding mutex 'mu_'}} \
+ // expected-warning {{reading variable 'data_' requires holding mutex 'mu_'}}
+ *datap2_ = data_; // expected-warning {{writing the value pointed to by 'datap2_' requires holding mutex 'mu_' exclusively}} \
+ // expected-warning {{reading variable 'data_' requires holding mutex 'mu_'}}
+ data_ = *datap1_; // expected-warning {{writing variable 'data_' requires holding mutex 'mu_' exclusively}} \
+ // expected-warning {{reading variable 'datap1_' requires holding mutex 'mu_'}}
+ data_ = *datap2_; // expected-warning {{writing variable 'data_' requires holding mutex 'mu_' exclusively}} \
+ // expected-warning {{reading the value pointed to by 'datap2_' requires holding mutex 'mu_'}}
+
+ data_[0] = 0; // expected-warning {{reading variable 'data_' requires holding mutex 'mu_'}}
+ (*datap2_)[0] = 0; // expected-warning {{reading the value pointed to by 'datap2_' requires holding mutex 'mu_'}}
+
+ data_(); // expected-warning {{reading variable 'data_' requires holding mutex 'mu_'}}
}
// const operator tests
void test3() const {
- Data mydat(data_); // expected-warning {{reading variable 'data_' requires locking 'mu_'}}
+ Data mydat(data_); // expected-warning {{reading variable 'data_' requires holding mutex 'mu_'}}
//FIXME
- //showDataCell(data_); // xpected-warning {{reading variable 'data_' requires locking 'mu_'}}
- //showDataCell(*datap2_); // xpected-warning {{reading the value pointed to by 'datap2_' requires locking 'mu_'}}
+ //showDataCell(data_); // xpected-warning {{reading variable 'data_' requires holding mutex 'mu_'}}
+ //showDataCell(*datap2_); // xpected-warning {{reading the value pointed to by 'datap2_' requires holding mutex 'mu_'}}
- int a = data_[0]; // expected-warning {{reading variable 'data_' requires locking 'mu_'}}
+ int a = data_[0]; // expected-warning {{reading variable 'data_' requires holding mutex 'mu_'}}
}
private:
@@ -3820,31 +3841,31 @@ private:
Foo* foop PT_GUARDED_BY(mu_);
void test() {
- foo.myMethod(); // expected-warning {{reading variable 'foo' requires locking 'mu_'}}
+ foo.myMethod(); // expected-warning {{reading variable 'foo' requires holding mutex 'mu_'}}
- int fa = foo.a; // expected-warning {{reading variable 'foo' requires locking 'mu_'}}
- foo.a = fa; // expected-warning {{writing variable 'foo' requires locking 'mu_' exclusively}}
+ int fa = foo.a; // expected-warning {{reading variable 'foo' requires holding mutex 'mu_'}}
+ foo.a = fa; // expected-warning {{writing variable 'foo' requires holding mutex 'mu_' exclusively}}
- fa = foop->a; // expected-warning {{reading the value pointed to by 'foop' requires locking 'mu_'}}
- foop->a = fa; // expected-warning {{writing the value pointed to by 'foop' requires locking 'mu_' exclusively}}
+ fa = foop->a; // expected-warning {{reading the value pointed to by 'foop' requires holding mutex 'mu_'}}
+ foop->a = fa; // expected-warning {{writing the value pointed to by 'foop' requires holding mutex 'mu_' exclusively}}
- fa = (*foop).a; // expected-warning {{reading the value pointed to by 'foop' requires locking 'mu_'}}
- (*foop).a = fa; // expected-warning {{writing the value pointed to by 'foop' requires locking 'mu_' exclusively}}
+ fa = (*foop).a; // expected-warning {{reading the value pointed to by 'foop' requires holding mutex 'mu_'}}
+ (*foop).a = fa; // expected-warning {{writing the value pointed to by 'foop' requires holding mutex 'mu_' exclusively}}
- foo.c = Cell(0); // expected-warning {{writing variable 'foo' requires locking 'mu_'}} \
- // expected-warning {{writing variable 'c' requires locking 'foo.cell_mu_' exclusively}}
- foo.c.cellMethod(); // expected-warning {{reading variable 'foo' requires locking 'mu_'}} \
- // expected-warning {{reading variable 'c' requires locking 'foo.cell_mu_'}}
+ foo.c = Cell(0); // expected-warning {{writing variable 'foo' requires holding mutex 'mu_'}} \
+ // expected-warning {{writing variable 'c' requires holding mutex 'foo.cell_mu_' exclusively}}
+ foo.c.cellMethod(); // expected-warning {{reading variable 'foo' requires holding mutex 'mu_'}} \
+ // expected-warning {{reading variable 'c' requires holding mutex 'foo.cell_mu_'}}
- foop->c = Cell(0); // expected-warning {{writing the value pointed to by 'foop' requires locking 'mu_'}} \
- // expected-warning {{writing variable 'c' requires locking 'foop->cell_mu_' exclusively}}
- foop->c.cellMethod(); // expected-warning {{reading the value pointed to by 'foop' requires locking 'mu_'}} \
- // expected-warning {{reading variable 'c' requires locking 'foop->cell_mu_'}}
+ foop->c = Cell(0); // expected-warning {{writing the value pointed to by 'foop' requires holding mutex 'mu_'}} \
+ // expected-warning {{writing variable 'c' requires holding mutex 'foop->cell_mu_' exclusively}}
+ foop->c.cellMethod(); // expected-warning {{reading the value pointed to by 'foop' requires holding mutex 'mu_'}} \
+ // expected-warning {{reading variable 'c' requires holding mutex 'foop->cell_mu_'}}
- (*foop).c = Cell(0); // expected-warning {{writing the value pointed to by 'foop' requires locking 'mu_'}} \
- // expected-warning {{writing variable 'c' requires locking 'foop->cell_mu_' exclusively}}
- (*foop).c.cellMethod(); // expected-warning {{reading the value pointed to by 'foop' requires locking 'mu_'}} \
- // expected-warning {{reading variable 'c' requires locking 'foop->cell_mu_'}}
+ (*foop).c = Cell(0); // expected-warning {{writing the value pointed to by 'foop' requires holding mutex 'mu_'}} \
+ // expected-warning {{writing variable 'c' requires holding mutex 'foop->cell_mu_' exclusively}}
+ (*foop).c.cellMethod(); // expected-warning {{reading the value pointed to by 'foop' requires holding mutex 'mu_'}} \
+ // expected-warning {{reading variable 'c' requires holding mutex 'foop->cell_mu_'}}
};
};
@@ -3917,34 +3938,34 @@ public:
void lockBad() EXCLUSIVE_LOCK_FUNCTION(mu_) { // expected-note {{mutex acquired here}}
mu2_.Lock();
mu2_.Unlock();
- } // expected-warning {{expecting mutex 'mu_' to be locked at the end of function}}
+ } // expected-warning {{expecting mutex 'mu_' to be held at the end of function}}
void readerLockBad() SHARED_LOCK_FUNCTION(mu_) { // expected-note {{mutex acquired here}}
mu2_.Lock();
mu2_.Unlock();
- } // expected-warning {{expecting mutex 'mu_' to be locked at the end of function}}
+ } // expected-warning {{expecting mutex 'mu_' to be held at the end of function}}
void unlockBad() UNLOCK_FUNCTION(mu_) { // expected-note {{mutex acquired here}}
mu2_.Lock();
mu2_.Unlock();
- } // expected-warning {{mutex 'mu_' is still locked at the end of function}}
+ } // expected-warning {{mutex 'mu_' is still held at the end of function}}
// Check locking the wrong thing.
void lockBad2() EXCLUSIVE_LOCK_FUNCTION(mu_) { // expected-note {{mutex acquired here}}
mu2_.Lock(); // expected-note {{mutex acquired here}}
- } // expected-warning {{expecting mutex 'mu_' to be locked at the end of function}} \
- // expected-warning {{mutex 'mu2_' is still locked at the end of function}}
+ } // expected-warning {{expecting mutex 'mu_' to be held at the end of function}} \
+ // expected-warning {{mutex 'mu2_' is still held at the end of function}}
void readerLockBad2() SHARED_LOCK_FUNCTION(mu_) { // expected-note {{mutex acquired here}}
mu2_.ReaderLock(); // expected-note {{mutex acquired here}}
- } // expected-warning {{expecting mutex 'mu_' to be locked at the end of function}} \
- // expected-warning {{mutex 'mu2_' is still locked at the end of function}}
+ } // expected-warning {{expecting mutex 'mu_' to be held at the end of function}} \
+ // expected-warning {{mutex 'mu2_' is still held at the end of function}}
void unlockBad2() UNLOCK_FUNCTION(mu_) { // expected-note {{mutex acquired here}}
- mu2_.Unlock(); // expected-warning {{unlocking 'mu2_' that was not locked}}
- } // expected-warning {{mutex 'mu_' is still locked at the end of function}}
+ mu2_.Unlock(); // expected-warning {{releasing mutex 'mu2_' that was not held}}
+ } // expected-warning {{mutex 'mu_' is still held at the end of function}}
private:
Mutex mu_;
@@ -3971,7 +3992,7 @@ public:
void test2() {
mu_.AssertReaderHeld();
int b = a;
- a = 0; // expected-warning {{writing variable 'a' requires locking 'mu_' exclusively}}
+ a = 0; // expected-warning {{writing variable 'a' requires holding mutex 'mu_' exclusively}}
}
void test3() {
@@ -4032,7 +4053,7 @@ public:
else {
mu_.Lock(); // expected-note {{mutex acquired here}}
}
- } // expected-warning {{mutex 'mu_' is still locked at the end of function}}
+ } // expected-warning {{mutex 'mu_' is still held at the end of function}}
void test10() {
if (c) {
@@ -4041,7 +4062,7 @@ public:
else {
mu_.AssertHeld();
}
- } // expected-warning {{mutex 'mu_' is still locked at the end of function}}
+ } // expected-warning {{mutex 'mu_' is still held at the end of function}}
void assertMu() ASSERT_EXCLUSIVE_LOCK(mu_);
@@ -4178,52 +4199,52 @@ class PtGuardedBySanityTest {
void test2() {
mu1.ReaderLock();
- if (*a == 0) doSomething(); // expected-warning {{reading the value pointed to by 'a' requires locking 'mu2'}}
- *a = 0; // expected-warning {{writing the value pointed to by 'a' requires locking 'mu2' exclusively}}
+ if (*a == 0) doSomething(); // expected-warning {{reading the value pointed to by 'a' requires holding mutex 'mu2'}}
+ *a = 0; // expected-warning {{writing the value pointed to by 'a' requires holding mutex 'mu2' exclusively}}
- if (c->a == 0) doSomething(); // expected-warning {{reading the value pointed to by 'c' requires locking 'mu2'}}
- c->a = 0; // expected-warning {{writing the value pointed to by 'c' requires locking 'mu2' exclusively}}
+ if (c->a == 0) doSomething(); // expected-warning {{reading the value pointed to by 'c' requires holding mutex 'mu2'}}
+ c->a = 0; // expected-warning {{writing the value pointed to by 'c' requires holding mutex 'mu2' exclusively}}
- if ((*c).a == 0) doSomething(); // expected-warning {{reading the value pointed to by 'c' requires locking 'mu2'}}
- (*c).a = 0; // expected-warning {{writing the value pointed to by 'c' requires locking 'mu2' exclusively}}
+ if ((*c).a == 0) doSomething(); // expected-warning {{reading the value pointed to by 'c' requires holding mutex 'mu2'}}
+ (*c).a = 0; // expected-warning {{writing the value pointed to by 'c' requires holding mutex 'mu2' exclusively}}
- if (a[0] == 42) doSomething(); // expected-warning {{reading the value pointed to by 'a' requires locking 'mu2'}}
- a[0] = 57; // expected-warning {{writing the value pointed to by 'a' requires locking 'mu2' exclusively}}
- if (c[0].a == 42) doSomething(); // expected-warning {{reading the value pointed to by 'c' requires locking 'mu2'}}
- c[0].a = 57; // expected-warning {{writing the value pointed to by 'c' requires locking 'mu2' exclusively}}
+ if (a[0] == 42) doSomething(); // expected-warning {{reading the value pointed to by 'a' requires holding mutex 'mu2'}}
+ a[0] = 57; // expected-warning {{writing the value pointed to by 'a' requires holding mutex 'mu2' exclusively}}
+ if (c[0].a == 42) doSomething(); // expected-warning {{reading the value pointed to by 'c' requires holding mutex 'mu2'}}
+ c[0].a = 57; // expected-warning {{writing the value pointed to by 'c' requires holding mutex 'mu2' exclusively}}
mu1.Unlock();
}
void test3() {
mu2.Lock();
- if (*a == 0) doSomething(); // expected-warning {{reading variable 'a' requires locking 'mu1'}}
- *a = 0; // expected-warning {{reading variable 'a' requires locking 'mu1'}}
+ if (*a == 0) doSomething(); // expected-warning {{reading variable 'a' requires holding mutex 'mu1'}}
+ *a = 0; // expected-warning {{reading variable 'a' requires holding mutex 'mu1'}}
- if (c->a == 0) doSomething(); // expected-warning {{reading variable 'c' requires locking 'mu1'}}
- c->a = 0; // expected-warning {{reading variable 'c' requires locking 'mu1'}}
+ if (c->a == 0) doSomething(); // expected-warning {{reading variable 'c' requires holding mutex 'mu1'}}
+ c->a = 0; // expected-warning {{reading variable 'c' requires holding mutex 'mu1'}}
- if ((*c).a == 0) doSomething(); // expected-warning {{reading variable 'c' requires locking 'mu1'}}
- (*c).a = 0; // expected-warning {{reading variable 'c' requires locking 'mu1'}}
+ if ((*c).a == 0) doSomething(); // expected-warning {{reading variable 'c' requires holding mutex 'mu1'}}
+ (*c).a = 0; // expected-warning {{reading variable 'c' requires holding mutex 'mu1'}}
- if (a[0] == 42) doSomething(); // expected-warning {{reading variable 'a' requires locking 'mu1'}}
- a[0] = 57; // expected-warning {{reading variable 'a' requires locking 'mu1'}}
- if (c[0].a == 42) doSomething(); // expected-warning {{reading variable 'c' requires locking 'mu1'}}
- c[0].a = 57; // expected-warning {{reading variable 'c' requires locking 'mu1'}}
+ if (a[0] == 42) doSomething(); // expected-warning {{reading variable 'a' requires holding mutex 'mu1'}}
+ a[0] = 57; // expected-warning {{reading variable 'a' requires holding mutex 'mu1'}}
+ if (c[0].a == 42) doSomething(); // expected-warning {{reading variable 'c' requires holding mutex 'mu1'}}
+ c[0].a = 57; // expected-warning {{reading variable 'c' requires holding mutex 'mu1'}}
mu2.Unlock();
}
void test4() { // Literal arrays
- if (sa[0] == 42) doSomething(); // expected-warning {{reading variable 'sa' requires locking 'mu1'}}
- sa[0] = 57; // expected-warning {{writing variable 'sa' requires locking 'mu1' exclusively}}
- if (sc[0].a == 42) doSomething(); // expected-warning {{reading variable 'sc' requires locking 'mu1'}}
- sc[0].a = 57; // expected-warning {{writing variable 'sc' requires locking 'mu1' exclusively}}
-
- if (*sa == 42) doSomething(); // expected-warning {{reading variable 'sa' requires locking 'mu1'}}
- *sa = 57; // expected-warning {{writing variable 'sa' requires locking 'mu1' exclusively}}
- if ((*sc).a == 42) doSomething(); // expected-warning {{reading variable 'sc' requires locking 'mu1'}}
- (*sc).a = 57; // expected-warning {{writing variable 'sc' requires locking 'mu1' exclusively}}
- if (sc->a == 42) doSomething(); // expected-warning {{reading variable 'sc' requires locking 'mu1'}}
- sc->a = 57; // expected-warning {{writing variable 'sc' requires locking 'mu1' exclusively}}
+ if (sa[0] == 42) doSomething(); // expected-warning {{reading variable 'sa' requires holding mutex 'mu1'}}
+ sa[0] = 57; // expected-warning {{writing variable 'sa' requires holding mutex 'mu1' exclusively}}
+ if (sc[0].a == 42) doSomething(); // expected-warning {{reading variable 'sc' requires holding mutex 'mu1'}}
+ sc[0].a = 57; // expected-warning {{writing variable 'sc' requires holding mutex 'mu1' exclusively}}
+
+ if (*sa == 42) doSomething(); // expected-warning {{reading variable 'sa' requires holding mutex 'mu1'}}
+ *sa = 57; // expected-warning {{writing variable 'sa' requires holding mutex 'mu1' exclusively}}
+ if ((*sc).a == 42) doSomething(); // expected-warning {{reading variable 'sc' requires holding mutex 'mu1'}}
+ (*sc).a = 57; // expected-warning {{writing variable 'sc' requires holding mutex 'mu1' exclusively}}
+ if (sc->a == 42) doSomething(); // expected-warning {{reading variable 'sc' requires holding mutex 'mu1'}}
+ sc->a = 57; // expected-warning {{writing variable 'sc' requires holding mutex 'mu1' exclusively}}
}
void test5() {
@@ -4268,15 +4289,15 @@ class SmartPtr_PtGuardedBy_Test {
void test2() {
mu2.Lock();
- sp.get(); // expected-warning {{reading variable 'sp' requires locking 'mu1'}}
- if (*sp == 0) doSomething(); // expected-warning {{reading variable 'sp' requires locking 'mu1'}}
- *sp = 0; // expected-warning {{reading variable 'sp' requires locking 'mu1'}}
- sq->a = 0; // expected-warning {{reading variable 'sq' requires locking 'mu1'}}
+ sp.get(); // expected-warning {{reading variable 'sp' requires holding mutex 'mu1'}}
+ if (*sp == 0) doSomething(); // expected-warning {{reading variable 'sp' requires holding mutex 'mu1'}}
+ *sp = 0; // expected-warning {{reading variable 'sp' requires holding mutex 'mu1'}}
+ sq->a = 0; // expected-warning {{reading variable 'sq' requires holding mutex 'mu1'}}
- if (sp[0] == 0) doSomething(); // expected-warning {{reading variable 'sp' requires locking 'mu1'}}
- sp[0] = 0; // expected-warning {{reading variable 'sp' requires locking 'mu1'}}
- if (sq[0].a == 0) doSomething(); // expected-warning {{reading variable 'sq' requires locking 'mu1'}}
- sq[0].a = 0; // expected-warning {{reading variable 'sq' requires locking 'mu1'}}
+ if (sp[0] == 0) doSomething(); // expected-warning {{reading variable 'sp' requires holding mutex 'mu1'}}
+ sp[0] = 0; // expected-warning {{reading variable 'sp' requires holding mutex 'mu1'}}
+ if (sq[0].a == 0) doSomething(); // expected-warning {{reading variable 'sq' requires holding mutex 'mu1'}}
+ sq[0].a = 0; // expected-warning {{reading variable 'sq' requires holding mutex 'mu1'}}
mu2.Unlock();
}
@@ -4285,14 +4306,14 @@ class SmartPtr_PtGuardedBy_Test {
mu1.Lock();
sp.get();
- if (*sp == 0) doSomething(); // expected-warning {{reading the value pointed to by 'sp' requires locking 'mu2'}}
- *sp = 0; // expected-warning {{reading the value pointed to by 'sp' requires locking 'mu2'}}
- sq->a = 0; // expected-warning {{reading the value pointed to by 'sq' requires locking 'mu2'}}
+ if (*sp == 0) doSomething(); // expected-warning {{reading the value pointed to by 'sp' requires holding mutex 'mu2'}}
+ *sp = 0; // expected-warning {{reading the value pointed to by 'sp' requires holding mutex 'mu2'}}
+ sq->a = 0; // expected-warning {{reading the value pointed to by 'sq' requires holding mutex 'mu2'}}
- if (sp[0] == 0) doSomething(); // expected-warning {{reading the value pointed to by 'sp' requires locking 'mu2'}}
- sp[0] = 0; // expected-warning {{reading the value pointed to by 'sp' requires locking 'mu2'}}
- if (sq[0].a == 0) doSomething(); // expected-warning {{reading the value pointed to by 'sq' requires locking 'mu2'}}
- sq[0].a = 0; // expected-warning {{reading the value pointed to by 'sq' requires locking 'mu2'}}
+ if (sp[0] == 0) doSomething(); // expected-warning {{reading the value pointed to by 'sp' requires holding mutex 'mu2'}}
+ sp[0] = 0; // expected-warning {{reading the value pointed to by 'sp' requires holding mutex 'mu2'}}
+ if (sq[0].a == 0) doSomething(); // expected-warning {{reading the value pointed to by 'sq' requires holding mutex 'mu2'}}
+ sq[0].a = 0; // expected-warning {{reading the value pointed to by 'sq' requires holding mutex 'mu2'}}
mu1.Unlock();
}
@@ -4305,7 +4326,7 @@ namespace NonMemberCalleeICETest {
class A {
void Run() {
- (RunHelper)(); // expected-warning {{calling function 'RunHelper' requires exclusive lock on 'M'}}
+ (RunHelper)(); // expected-warning {{calling function 'RunHelper' requires holding mutex 'M' exclusively}}
}
void RunHelper() __attribute__((exclusive_locks_required(M)));
@@ -4314,3 +4335,46 @@ class A {
} // end namespace NonMemberCalleeICETest
+
+namespace pt_guard_attribute_type {
+ int i PT_GUARDED_BY(sls_mu); // expected-warning {{'pt_guarded_by' only applies to pointer types; type here is 'int'}}
+ int j PT_GUARDED_VAR; // expected-warning {{'pt_guarded_var' only applies to pointer types; type here is 'int'}}
+
+ void test() {
+ int i PT_GUARDED_BY(sls_mu); // expected-warning {{'pt_guarded_by' attribute only applies to fields and global variables}}
+ int j PT_GUARDED_VAR; // expected-warning {{'pt_guarded_var' attribute only applies to fields and global variables}}
+
+ typedef int PT_GUARDED_BY(sls_mu) bad1; // expected-warning {{'pt_guarded_by' attribute only applies to fields and global variables}}
+ typedef int PT_GUARDED_VAR bad2; // expected-warning {{'pt_guarded_var' attribute only applies to fields and global variables}}
+ }
+} // end namespace pt_guard_attribute_type
+
+
+namespace ThreadAttributesOnLambdas {
+
+class Foo {
+ Mutex mu_;
+
+ void LockedFunction() EXCLUSIVE_LOCKS_REQUIRED(mu_);
+
+ void test() {
+ auto func1 = [this]() EXCLUSIVE_LOCKS_REQUIRED(mu_) {
+ LockedFunction();
+ };
+
+ auto func2 = [this]() NO_THREAD_SAFETY_ANALYSIS {
+ LockedFunction();
+ };
+
+ auto func3 = [this]() EXCLUSIVE_LOCK_FUNCTION(mu_) {
+ mu_.Lock();
+ };
+
+ func1(); // expected-warning {{calling function 'operator()' requires holding mutex 'mu_' exclusively}}
+ func2();
+ func3();
+ mu_.Unlock();
+ }
+};
+
+} // end namespace ThreadAttributesOnLambdas
diff --git a/test/SemaCXX/warn-thread-safety-parsing.cpp b/test/SemaCXX/warn-thread-safety-parsing.cpp
index 1bd4e439b7b0..6f9e7de4176d 100644
--- a/test/SemaCXX/warn-thread-safety-parsing.cpp
+++ b/test/SemaCXX/warn-thread-safety-parsing.cpp
@@ -109,26 +109,26 @@ int noanal_testfn(int y) NO_THREAD_SAFETY_ANALYSIS;
int noanal_testfn(int y) {
int x NO_THREAD_SAFETY_ANALYSIS = y; // \
- // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions and methods}}
+ // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions}}
return x;
};
int noanal_test_var NO_THREAD_SAFETY_ANALYSIS; // \
- // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions and methods}}
+ // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions}}
class NoanalFoo {
private:
int test_field NO_THREAD_SAFETY_ANALYSIS; // \
- // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions and methods}}
+ // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions}}
void test_method() NO_THREAD_SAFETY_ANALYSIS;
};
class NO_THREAD_SAFETY_ANALYSIS NoanalTestClass { // \
- // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions and methods}}
+ // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions}}
};
void noanal_fun_params(int lvar NO_THREAD_SAFETY_ANALYSIS); // \
- // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions and methods}}
+ // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions}}
//-----------------------------------------//
@@ -229,28 +229,28 @@ class __attribute__((lockable (1))) LTestClass_args { // \
};
void l_test_function() LOCKABLE; // \
- // expected-warning {{'lockable' attribute only applies to classes}}
+ // expected-warning {{'lockable' attribute only applies to struct, union or class}}
int l_testfn(int y) {
int x LOCKABLE = y; // \
- // expected-warning {{'lockable' attribute only applies to classes}}
+ // expected-warning {{'lockable' attribute only applies to struct, union or class}}
return x;
}
int l_test_var LOCKABLE; // \
- // expected-warning {{'lockable' attribute only applies to classes}}
+ // expected-warning {{'lockable' attribute only applies to struct, union or class}}
class LFoo {
private:
int test_field LOCKABLE; // \
- // expected-warning {{'lockable' attribute only applies to classes}}
+ // expected-warning {{'lockable' attribute only applies to struct, union or class}}
void test_method() LOCKABLE; // \
- // expected-warning {{'lockable' attribute only applies to classes}}
+ // expected-warning {{'lockable' attribute only applies to struct, union or class}}
};
void l_function_params(int lvar LOCKABLE); // \
- // expected-warning {{'lockable' attribute only applies to classes}}
+ // expected-warning {{'lockable' attribute only applies to struct, union or class}}
//-----------------------------------------//
@@ -269,28 +269,28 @@ class __attribute__((scoped_lockable (1))) SLTestClass_args { // \
};
void sl_test_function() SCOPED_LOCKABLE; // \
- // expected-warning {{'scoped_lockable' attribute only applies to classes}}
+ // expected-warning {{'scoped_lockable' attribute only applies to struct, union or class}}
int sl_testfn(int y) {
int x SCOPED_LOCKABLE = y; // \
- // expected-warning {{'scoped_lockable' attribute only applies to classes}}
+ // expected-warning {{'scoped_lockable' attribute only applies to struct, union or class}}
return x;
}
int sl_test_var SCOPED_LOCKABLE; // \
- // expected-warning {{'scoped_lockable' attribute only applies to classes}}
+ // expected-warning {{'scoped_lockable' attribute only applies to struct, union or class}}
class SLFoo {
private:
int test_field SCOPED_LOCKABLE; // \
- // expected-warning {{'scoped_lockable' attribute only applies to classes}}
+ // expected-warning {{'scoped_lockable' attribute only applies to struct, union or class}}
void test_method() SCOPED_LOCKABLE; // \
- // expected-warning {{'scoped_lockable' attribute only applies to classes}}
+ // expected-warning {{'scoped_lockable' attribute only applies to struct, union or class}}
};
void sl_function_params(int lvar SCOPED_LOCKABLE); // \
- // expected-warning {{'scoped_lockable' attribute only applies to classes}}
+ // expected-warning {{'scoped_lockable' attribute only applies to struct, union or class}}
//-----------------------------------------//
@@ -353,13 +353,13 @@ int gb_var_arg_8 GUARDED_BY(muPointer);
// illegal attribute arguments
int gb_var_arg_bad_1 GUARDED_BY(1); // \
- // expected-warning {{'guarded_by' attribute requires arguments that are class type or point to class type; type here is 'int'}}
+ // expected-warning {{'guarded_by' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'int'}}
int gb_var_arg_bad_2 GUARDED_BY("mu"); // \
// expected-warning {{ignoring 'guarded_by' attribute because its argument is invalid}}
int gb_var_arg_bad_3 GUARDED_BY(muDoublePointer); // \
- // expected-warning {{'guarded_by' attribute requires arguments that are class type or point to class type; type here is 'class Mutex **'}}
+ // expected-warning {{'guarded_by' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}}
int gb_var_arg_bad_4 GUARDED_BY(umu); // \
- // expected-warning {{'guarded_by' attribute requires arguments whose type is annotated with 'lockable' attribute; type here is 'class UnlockableMu'}}
+ // expected-warning {{'guarded_by' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'UnlockableMu'}}
//3.
// Thread Safety analysis tests
@@ -424,13 +424,13 @@ int * pgb_var_arg_8 PT_GUARDED_BY(muPointer);
// illegal attribute arguments
int * pgb_var_arg_bad_1 PT_GUARDED_BY(1); // \
- // expected-warning {{'pt_guarded_by' attribute requires arguments that are class type or point to class type}}
+ // expected-warning {{'pt_guarded_by' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'int'}}
int * pgb_var_arg_bad_2 PT_GUARDED_BY("mu"); // \
// expected-warning {{ignoring 'pt_guarded_by' attribute because its argument is invalid}}
int * pgb_var_arg_bad_3 PT_GUARDED_BY(muDoublePointer); // \
- // expected-warning {{'pt_guarded_by' attribute requires arguments that are class type or point to class type}}
+ // expected-warning {{'pt_guarded_by' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}}
int * pgb_var_arg_bad_4 PT_GUARDED_BY(umu); // \
- // expected-warning {{'pt_guarded_by' attribute requires arguments whose type is annotated with 'lockable' attribute}}
+ // expected-warning {{'pt_guarded_by' attribute requires arguments whose type is annotated with 'capability' attribute}}
//-----------------------------------------//
@@ -446,12 +446,12 @@ int * pgb_var_arg_bad_4 PT_GUARDED_BY(umu); // \
Mutex mu_aa ACQUIRED_AFTER(mu1);
Mutex aa_var_noargs __attribute__((acquired_after)); // \
- // expected-error {{attribute takes at least 1 argument}}
+ // expected-error {{'acquired_after' attribute takes at least 1 argument}}
class AAFoo {
private:
Mutex aa_field_noargs __attribute__((acquired_after)); // \
- // expected-error {{attribute takes at least 1 argument}}
+ // expected-error {{'acquired_after' attribute takes at least 1 argument}}
Mutex aa_field_args ACQUIRED_AFTER(mu1);
};
@@ -485,15 +485,15 @@ Mutex aa_var_arg_8 ACQUIRED_AFTER(muPointer);
// illegal attribute arguments
Mutex aa_var_arg_bad_1 ACQUIRED_AFTER(1); // \
- // expected-warning {{'acquired_after' attribute requires arguments that are class type or point to class type}}
+ // expected-warning {{'acquired_after' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'int'}}
Mutex aa_var_arg_bad_2 ACQUIRED_AFTER("mu"); // \
// expected-warning {{ignoring 'acquired_after' attribute because its argument is invalid}}
Mutex aa_var_arg_bad_3 ACQUIRED_AFTER(muDoublePointer); // \
- // expected-warning {{'acquired_after' attribute requires arguments that are class type or point to class type}}
+ // expected-warning {{'acquired_after' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}}
Mutex aa_var_arg_bad_4 ACQUIRED_AFTER(umu); // \
- // expected-warning {{'acquired_after' attribute requires arguments whose type is annotated with 'lockable' attribute}}
+ // expected-warning {{'acquired_after' attribute requires arguments whose type is annotated with 'capability' attribute}}
UnlockableMu aa_var_arg_bad_5 ACQUIRED_AFTER(mu_aa); // \
- // expected-warning {{'acquired_after' attribute can only be applied in a context annotated with 'lockable' attribute}}
+ // expected-warning {{'acquired_after' attribute can only be applied in a context annotated with 'capability("mutex")' attribute}}
//-----------------------------------------//
// Acquired Before (ab)
@@ -506,12 +506,12 @@ UnlockableMu aa_var_arg_bad_5 ACQUIRED_AFTER(mu_aa); // \
Mutex mu_ab ACQUIRED_BEFORE(mu1);
Mutex ab_var_noargs __attribute__((acquired_before)); // \
- // expected-error {{attribute takes at least 1 argument}}
+ // expected-error {{'acquired_before' attribute takes at least 1 argument}}
class ABFoo {
private:
Mutex ab_field_noargs __attribute__((acquired_before)); // \
- // expected-error {{attribute takes at least 1 argument}}
+ // expected-error {{'acquired_before' attribute takes at least 1 argument}}
Mutex ab_field_args ACQUIRED_BEFORE(mu1);
};
@@ -548,15 +548,15 @@ Mutex ab_var_arg_8 ACQUIRED_BEFORE(muPointer);
// illegal attribute arguments
Mutex ab_var_arg_bad_1 ACQUIRED_BEFORE(1); // \
- // expected-warning {{'acquired_before' attribute requires arguments that are class type or point to class type}}
+ // expected-warning {{'acquired_before' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'int'}}
Mutex ab_var_arg_bad_2 ACQUIRED_BEFORE("mu"); // \
// expected-warning {{ignoring 'acquired_before' attribute because its argument is invalid}}
Mutex ab_var_arg_bad_3 ACQUIRED_BEFORE(muDoublePointer); // \
- // expected-warning {{'acquired_before' attribute requires arguments that are class type or point to class type}}
+ // expected-warning {{'acquired_before' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}}
Mutex ab_var_arg_bad_4 ACQUIRED_BEFORE(umu); // \
- // expected-warning {{'acquired_before' attribute requires arguments whose type is annotated with 'lockable' attribute}}
+ // expected-warning {{'acquired_before' attribute requires arguments whose type is annotated with 'capability' attribute}}
UnlockableMu ab_var_arg_bad_5 ACQUIRED_BEFORE(mu_ab); // \
- // expected-warning {{'acquired_before' attribute can only be applied in a context annotated with 'lockable' attribute}}
+ // expected-warning {{'acquired_before' attribute can only be applied in a context annotated with 'capability("mutex")' attribute}}
//-----------------------------------------//
@@ -577,26 +577,26 @@ int elf_testfn(int y) EXCLUSIVE_LOCK_FUNCTION();
int elf_testfn(int y) {
int x EXCLUSIVE_LOCK_FUNCTION() = y; // \
- // expected-warning {{'exclusive_lock_function' attribute only applies to functions and methods}}
+ // expected-warning {{'exclusive_lock_function' attribute only applies to functions}}
return x;
};
int elf_test_var EXCLUSIVE_LOCK_FUNCTION(); // \
- // expected-warning {{'exclusive_lock_function' attribute only applies to functions and methods}}
+ // expected-warning {{'exclusive_lock_function' attribute only applies to functions}}
class ElfFoo {
private:
int test_field EXCLUSIVE_LOCK_FUNCTION(); // \
- // expected-warning {{'exclusive_lock_function' attribute only applies to functions and methods}}
+ // expected-warning {{'exclusive_lock_function' attribute only applies to functions}}
void test_method() EXCLUSIVE_LOCK_FUNCTION();
};
class EXCLUSIVE_LOCK_FUNCTION() ElfTestClass { // \
- // expected-warning {{'exclusive_lock_function' attribute only applies to functions and methods}}
+ // expected-warning {{'exclusive_lock_function' attribute only applies to functions}}
};
void elf_fun_params(int lvar EXCLUSIVE_LOCK_FUNCTION()); // \
- // expected-warning {{'exclusive_lock_function' attribute only applies to functions and methods}}
+ // expected-warning {{'exclusive_lock_function' attribute only applies to functions}}
// Check argument parsing.
@@ -617,9 +617,9 @@ int elf_function_9(Mutex x, Mutex y) EXCLUSIVE_LOCK_FUNCTION(1,2);
int elf_function_bad_2() EXCLUSIVE_LOCK_FUNCTION("mu"); // \
// expected-warning {{ignoring 'exclusive_lock_function' attribute because its argument is invalid}}
int elf_function_bad_3() EXCLUSIVE_LOCK_FUNCTION(muDoublePointer); // \
- // expected-warning {{'exclusive_lock_function' attribute requires arguments that are class type or point to class type}}
+ // expected-warning {{'exclusive_lock_function' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}}
int elf_function_bad_4() EXCLUSIVE_LOCK_FUNCTION(umu); // \
- // expected-warning {{'exclusive_lock_function' attribute requires arguments whose type is annotated with 'lockable' attribute}}
+ // expected-warning {{'exclusive_lock_function' attribute requires arguments whose type is annotated with 'capability' attribute}}
int elf_function_bad_1() EXCLUSIVE_LOCK_FUNCTION(1); // \
// expected-error {{'exclusive_lock_function' attribute parameter 1 is out of bounds: no parameters to index into}}
@@ -649,25 +649,25 @@ int slf_testfn(int y) SHARED_LOCK_FUNCTION();
int slf_testfn(int y) {
int x SHARED_LOCK_FUNCTION() = y; // \
- // expected-warning {{'shared_lock_function' attribute only applies to functions and methods}}
+ // expected-warning {{'shared_lock_function' attribute only applies to functions}}
return x;
};
int slf_test_var SHARED_LOCK_FUNCTION(); // \
- // expected-warning {{'shared_lock_function' attribute only applies to functions and methods}}
+ // expected-warning {{'shared_lock_function' attribute only applies to functions}}
void slf_fun_params(int lvar SHARED_LOCK_FUNCTION()); // \
- // expected-warning {{'shared_lock_function' attribute only applies to functions and methods}}
+ // expected-warning {{'shared_lock_function' attribute only applies to functions}}
class SlfFoo {
private:
int test_field SHARED_LOCK_FUNCTION(); // \
- // expected-warning {{'shared_lock_function' attribute only applies to functions and methods}}
+ // expected-warning {{'shared_lock_function' attribute only applies to functions}}
void test_method() SHARED_LOCK_FUNCTION();
};
class SHARED_LOCK_FUNCTION() SlfTestClass { // \
- // expected-warning {{'shared_lock_function' attribute only applies to functions and methods}}
+ // expected-warning {{'shared_lock_function' attribute only applies to functions}}
};
// Check argument parsing.
@@ -689,9 +689,9 @@ int slf_function_9(Mutex x, Mutex y) SHARED_LOCK_FUNCTION(1,2);
int slf_function_bad_2() SHARED_LOCK_FUNCTION("mu"); // \
// expected-warning {{ignoring 'shared_lock_function' attribute because its argument is invalid}}
int slf_function_bad_3() SHARED_LOCK_FUNCTION(muDoublePointer); // \
- // expected-warning {{'shared_lock_function' attribute requires arguments that are class type or point to class type}}
+ // expected-warning {{'shared_lock_function' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}}
int slf_function_bad_4() SHARED_LOCK_FUNCTION(umu); // \
- // expected-warning {{'shared_lock_function' attribute requires arguments whose type is annotated with 'lockable' attribute}}
+ // expected-warning {{'shared_lock_function' attribute requires arguments whose type is annotated with 'capability' attribute}}
int slf_function_bad_1() SHARED_LOCK_FUNCTION(1); // \
// expected-error {{'shared_lock_function' attribute parameter 1 is out of bounds: no parameters to index into}}
@@ -715,7 +715,7 @@ int slf_function_bad_7() SHARED_LOCK_FUNCTION(0); // \
// plus an optional list of locks (vars/fields)
void etf_function() __attribute__((exclusive_trylock_function)); // \
- // expected-error {{attribute takes at least 1 argument}}
+ // expected-error {{'exclusive_trylock_function' attribute takes at least 1 argument}}
void etf_function_args() EXCLUSIVE_TRYLOCK_FUNCTION(1, mu2);
@@ -725,26 +725,26 @@ int etf_testfn(int y) EXCLUSIVE_TRYLOCK_FUNCTION(1);
int etf_testfn(int y) {
int x EXCLUSIVE_TRYLOCK_FUNCTION(1) = y; // \
- // expected-warning {{'exclusive_trylock_function' attribute only applies to functions and methods}}
+ // expected-warning {{'exclusive_trylock_function' attribute only applies to functions}}
return x;
};
int etf_test_var EXCLUSIVE_TRYLOCK_FUNCTION(1); // \
- // expected-warning {{'exclusive_trylock_function' attribute only applies to functions and methods}}
+ // expected-warning {{'exclusive_trylock_function' attribute only applies to functions}}
class EtfFoo {
private:
int test_field EXCLUSIVE_TRYLOCK_FUNCTION(1); // \
- // expected-warning {{'exclusive_trylock_function' attribute only applies to functions and methods}}
+ // expected-warning {{'exclusive_trylock_function' attribute only applies to functions}}
void test_method() EXCLUSIVE_TRYLOCK_FUNCTION(1);
};
class EXCLUSIVE_TRYLOCK_FUNCTION(1) EtfTestClass { // \
- // expected-warning {{'exclusive_trylock_function' attribute only applies to functions and methods}}
+ // expected-warning {{'exclusive_trylock_function' attribute only applies to functions}}
};
void etf_fun_params(int lvar EXCLUSIVE_TRYLOCK_FUNCTION(1)); // \
- // expected-warning {{'exclusive_trylock_function' attribute only applies to functions and methods}}
+ // expected-warning {{'exclusive_trylock_function' attribute only applies to functions}}
// Check argument parsing.
@@ -771,9 +771,9 @@ int etf_function_bad_3() EXCLUSIVE_TRYLOCK_FUNCTION(muDoublePointer); // \
int etf_function_bad_4() EXCLUSIVE_TRYLOCK_FUNCTION(1, "mu"); // \
// expected-warning {{ignoring 'exclusive_trylock_function' attribute because its argument is invalid}}
int etf_function_bad_5() EXCLUSIVE_TRYLOCK_FUNCTION(1, muDoublePointer); // \
- // expected-warning {{'exclusive_trylock_function' attribute requires arguments that are class type or point to class type}}
+ // expected-warning {{'exclusive_trylock_function' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}}
int etf_function_bad_6() EXCLUSIVE_TRYLOCK_FUNCTION(1, umu); // \
- // expected-warning {{'exclusive_trylock_function' attribute requires arguments whose type is annotated with 'lockable' attribute}}
+ // expected-warning {{'exclusive_trylock_function' attribute requires arguments whose type is annotated with 'capability' attribute}}
//-----------------------------------------//
@@ -788,7 +788,7 @@ int etf_function_bad_6() EXCLUSIVE_TRYLOCK_FUNCTION(1, umu); // \
// plus an optional list of locks (vars/fields)
void stf_function() __attribute__((shared_trylock_function)); // \
- // expected-error {{attribute takes at least 1 argument}}
+ // expected-error {{'shared_trylock_function' attribute takes at least 1 argument}}
void stf_function_args() SHARED_TRYLOCK_FUNCTION(1, mu2);
@@ -798,26 +798,26 @@ int stf_testfn(int y) SHARED_TRYLOCK_FUNCTION(1);
int stf_testfn(int y) {
int x SHARED_TRYLOCK_FUNCTION(1) = y; // \
- // expected-warning {{'shared_trylock_function' attribute only applies to functions and methods}}
+ // expected-warning {{'shared_trylock_function' attribute only applies to functions}}
return x;
};
int stf_test_var SHARED_TRYLOCK_FUNCTION(1); // \
- // expected-warning {{'shared_trylock_function' attribute only applies to functions and methods}}
+ // expected-warning {{'shared_trylock_function' attribute only applies to functions}}
void stf_fun_params(int lvar SHARED_TRYLOCK_FUNCTION(1)); // \
- // expected-warning {{'shared_trylock_function' attribute only applies to functions and methods}}
+ // expected-warning {{'shared_trylock_function' attribute only applies to functions}}
class StfFoo {
private:
int test_field SHARED_TRYLOCK_FUNCTION(1); // \
- // expected-warning {{'shared_trylock_function' attribute only applies to functions and methods}}
+ // expected-warning {{'shared_trylock_function' attribute only applies to functions}}
void test_method() SHARED_TRYLOCK_FUNCTION(1);
};
class SHARED_TRYLOCK_FUNCTION(1) StfTestClass { // \
- // expected-warning {{'shared_trylock_function' attribute only applies to functions and methods}}
+ // expected-warning {{'shared_trylock_function' attribute only applies to functions}}
};
// Check argument parsing.
@@ -845,9 +845,9 @@ int stf_function_bad_3() SHARED_TRYLOCK_FUNCTION(muDoublePointer); // \
int stf_function_bad_4() SHARED_TRYLOCK_FUNCTION(1, "mu"); // \
// expected-warning {{ignoring 'shared_trylock_function' attribute because its argument is invalid}}
int stf_function_bad_5() SHARED_TRYLOCK_FUNCTION(1, muDoublePointer); // \
- // expected-warning {{'shared_trylock_function' attribute requires arguments that are class type or point to class type}}
+ // expected-warning {{'shared_trylock_function' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}}
int stf_function_bad_6() SHARED_TRYLOCK_FUNCTION(1, umu); // \
- // expected-warning {{'shared_trylock_function' attribute requires arguments whose type is annotated with 'lockable' attribute}}
+ // expected-warning {{'shared_trylock_function' attribute requires arguments whose type is annotated with 'capability' attribute}}
//-----------------------------------------//
@@ -868,26 +868,26 @@ int uf_testfn(int y) UNLOCK_FUNCTION();
int uf_testfn(int y) {
int x UNLOCK_FUNCTION() = y; // \
- // expected-warning {{'unlock_function' attribute only applies to functions and methods}}
+ // expected-warning {{'unlock_function' attribute only applies to functions}}
return x;
};
int uf_test_var UNLOCK_FUNCTION(); // \
- // expected-warning {{'unlock_function' attribute only applies to functions and methods}}
+ // expected-warning {{'unlock_function' attribute only applies to functions}}
class UfFoo {
private:
int test_field UNLOCK_FUNCTION(); // \
- // expected-warning {{'unlock_function' attribute only applies to functions and methods}}
+ // expected-warning {{'unlock_function' attribute only applies to functions}}
void test_method() UNLOCK_FUNCTION();
};
class NO_THREAD_SAFETY_ANALYSIS UfTestClass { // \
- // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions and methods}}
+ // expected-warning {{'no_thread_safety_analysis' attribute only applies to functions}}
};
void uf_fun_params(int lvar UNLOCK_FUNCTION()); // \
- // expected-warning {{'unlock_function' attribute only applies to functions and methods}}
+ // expected-warning {{'unlock_function' attribute only applies to functions}}
// Check argument parsing.
@@ -908,9 +908,9 @@ int uf_function_9(Mutex x, Mutex y) UNLOCK_FUNCTION(1,2);
int uf_function_bad_2() UNLOCK_FUNCTION("mu"); // \
// expected-warning {{ignoring 'unlock_function' attribute because its argument is invalid}}
int uf_function_bad_3() UNLOCK_FUNCTION(muDoublePointer); // \
- // expected-warning {{'unlock_function' attribute requires arguments that are class type or point to class type}}
+ // expected-warning {{'unlock_function' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}}
int uf_function_bad_4() UNLOCK_FUNCTION(umu); // \
- // expected-warning {{'unlock_function' attribute requires arguments whose type is annotated with 'lockable' attribute}}
+ // expected-warning {{'unlock_function' attribute requires arguments whose type is annotated with 'capability' attribute}}
int uf_function_bad_1() UNLOCK_FUNCTION(1); // \
// expected-error {{'unlock_function' attribute parameter 1 is out of bounds: no parameters to index into}}
@@ -944,25 +944,25 @@ int lr_testfn(int y) LOCK_RETURNED(mu1);
int lr_testfn(int y) {
int x LOCK_RETURNED(mu1) = y; // \
- // expected-warning {{'lock_returned' attribute only applies to functions and methods}}
+ // expected-warning {{'lock_returned' attribute only applies to functions}}
return x;
};
int lr_test_var LOCK_RETURNED(mu1); // \
- // expected-warning {{'lock_returned' attribute only applies to functions and methods}}
+ // expected-warning {{'lock_returned' attribute only applies to functions}}
void lr_fun_params(int lvar LOCK_RETURNED(mu1)); // \
- // expected-warning {{'lock_returned' attribute only applies to functions and methods}}
+ // expected-warning {{'lock_returned' attribute only applies to functions}}
class LrFoo {
private:
int test_field LOCK_RETURNED(mu1); // \
- // expected-warning {{'lock_returned' attribute only applies to functions and methods}}
+ // expected-warning {{'lock_returned' attribute only applies to functions}}
void test_method() LOCK_RETURNED(mu1);
};
class LOCK_RETURNED(mu1) LrTestClass { // \
- // expected-warning {{'lock_returned' attribute only applies to functions and methods}}
+ // expected-warning {{'lock_returned' attribute only applies to functions}}
};
// Check argument parsing.
@@ -980,13 +980,13 @@ int lr_function_8() LOCK_RETURNED(muPointer);
// illegal attribute arguments
int lr_function_bad_1() LOCK_RETURNED(1); // \
- // expected-warning {{'lock_returned' attribute requires arguments that are class type or point to class type}}
+ // expected-warning {{'lock_returned' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'int'}}
int lr_function_bad_2() LOCK_RETURNED("mu"); // \
// expected-warning {{ignoring 'lock_returned' attribute because its argument is invalid}}
int lr_function_bad_3() LOCK_RETURNED(muDoublePointer); // \
- // expected-warning {{'lock_returned' attribute requires arguments that are class type or point to class type}}
+ // expected-warning {{'lock_returned' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}}
int lr_function_bad_4() LOCK_RETURNED(umu); // \
- // expected-warning {{'lock_returned' attribute requires arguments whose type is annotated with 'lockable' attribute}}
+ // expected-warning {{'lock_returned' attribute requires arguments whose type is annotated with 'capability' attribute}}
@@ -1001,7 +1001,7 @@ int lr_function_bad_4() LOCK_RETURNED(umu); // \
// takes one or more arguments, all locks (vars/fields)
void le_function() __attribute__((locks_excluded)); // \
- // expected-error {{attribute takes at least 1 argument}}
+ // expected-error {{'locks_excluded' attribute takes at least 1 argument}}
void le_function_arg() LOCKS_EXCLUDED(mu1);
@@ -1011,25 +1011,25 @@ int le_testfn(int y) LOCKS_EXCLUDED(mu1);
int le_testfn(int y) {
int x LOCKS_EXCLUDED(mu1) = y; // \
- // expected-warning {{'locks_excluded' attribute only applies to functions and methods}}
+ // expected-warning {{'locks_excluded' attribute only applies to functions}}
return x;
};
int le_test_var LOCKS_EXCLUDED(mu1); // \
- // expected-warning {{'locks_excluded' attribute only applies to functions and methods}}
+ // expected-warning {{'locks_excluded' attribute only applies to functions}}
void le_fun_params(int lvar LOCKS_EXCLUDED(mu1)); // \
- // expected-warning {{'locks_excluded' attribute only applies to functions and methods}}
+ // expected-warning {{'locks_excluded' attribute only applies to functions}}
class LeFoo {
private:
int test_field LOCKS_EXCLUDED(mu1); // \
- // expected-warning {{'locks_excluded' attribute only applies to functions and methods}}
+ // expected-warning {{'locks_excluded' attribute only applies to functions}}
void test_method() LOCKS_EXCLUDED(mu1);
};
class LOCKS_EXCLUDED(mu1) LeTestClass { // \
- // expected-warning {{'locks_excluded' attribute only applies to functions and methods}}
+ // expected-warning {{'locks_excluded' attribute only applies to functions}}
};
// Check argument parsing.
@@ -1047,13 +1047,13 @@ int le_function_8() LOCKS_EXCLUDED(muPointer);
// illegal attribute arguments
int le_function_bad_1() LOCKS_EXCLUDED(1); // \
- // expected-warning {{'locks_excluded' attribute requires arguments that are class type or point to class type}}
+ // expected-warning {{'locks_excluded' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'int'}}
int le_function_bad_2() LOCKS_EXCLUDED("mu"); // \
// expected-warning {{ignoring 'locks_excluded' attribute because its argument is invalid}}
int le_function_bad_3() LOCKS_EXCLUDED(muDoublePointer); // \
- // expected-warning {{'locks_excluded' attribute requires arguments that are class type or point to class type}}
+ // expected-warning {{'locks_excluded' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}}
int le_function_bad_4() LOCKS_EXCLUDED(umu); // \
- // expected-warning {{'locks_excluded' attribute requires arguments whose type is annotated with 'lockable' attribute}}
+ // expected-warning {{'locks_excluded' attribute requires arguments whose type is annotated with 'capability' attribute}}
@@ -1068,7 +1068,7 @@ int le_function_bad_4() LOCKS_EXCLUDED(umu); // \
// takes one or more arguments, all locks (vars/fields)
void elr_function() __attribute__((exclusive_locks_required)); // \
- // expected-error {{attribute takes at least 1 argument}}
+ // expected-error {{'exclusive_locks_required' attribute takes at least 1 argument}}
void elr_function_arg() EXCLUSIVE_LOCKS_REQUIRED(mu1);
@@ -1078,25 +1078,25 @@ int elr_testfn(int y) EXCLUSIVE_LOCKS_REQUIRED(mu1);
int elr_testfn(int y) {
int x EXCLUSIVE_LOCKS_REQUIRED(mu1) = y; // \
- // expected-warning {{'exclusive_locks_required' attribute only applies to functions and methods}}
+ // expected-warning {{'exclusive_locks_required' attribute only applies to functions}}
return x;
};
int elr_test_var EXCLUSIVE_LOCKS_REQUIRED(mu1); // \
- // expected-warning {{'exclusive_locks_required' attribute only applies to functions and methods}}
+ // expected-warning {{'exclusive_locks_required' attribute only applies to functions}}
void elr_fun_params(int lvar EXCLUSIVE_LOCKS_REQUIRED(mu1)); // \
- // expected-warning {{'exclusive_locks_required' attribute only applies to functions and methods}}
+ // expected-warning {{'exclusive_locks_required' attribute only applies to functions}}
class ElrFoo {
private:
int test_field EXCLUSIVE_LOCKS_REQUIRED(mu1); // \
- // expected-warning {{'exclusive_locks_required' attribute only applies to functions and methods}}
+ // expected-warning {{'exclusive_locks_required' attribute only applies to functions}}
void test_method() EXCLUSIVE_LOCKS_REQUIRED(mu1);
};
class EXCLUSIVE_LOCKS_REQUIRED(mu1) ElrTestClass { // \
- // expected-warning {{'exclusive_locks_required' attribute only applies to functions and methods}}
+ // expected-warning {{'exclusive_locks_required' attribute only applies to functions}}
};
// Check argument parsing.
@@ -1114,13 +1114,13 @@ int elr_function_8() EXCLUSIVE_LOCKS_REQUIRED(muPointer);
// illegal attribute arguments
int elr_function_bad_1() EXCLUSIVE_LOCKS_REQUIRED(1); // \
- // expected-warning {{'exclusive_locks_required' attribute requires arguments that are class type or point to class type}}
+ // expected-warning {{'exclusive_locks_required' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'int'}}
int elr_function_bad_2() EXCLUSIVE_LOCKS_REQUIRED("mu"); // \
// expected-warning {{ignoring 'exclusive_locks_required' attribute because its argument is invalid}}
int elr_function_bad_3() EXCLUSIVE_LOCKS_REQUIRED(muDoublePointer); // \
- // expected-warning {{'exclusive_locks_required' attribute requires arguments that are class type or point to class type}}
+ // expected-warning {{'exclusive_locks_required' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}}
int elr_function_bad_4() EXCLUSIVE_LOCKS_REQUIRED(umu); // \
- // expected-warning {{'exclusive_locks_required' attribute requires arguments whose type is annotated with 'lockable' attribute}}
+ // expected-warning {{'exclusive_locks_required' attribute requires arguments whose type is annotated with 'capability' attribute}}
@@ -1136,7 +1136,7 @@ int elr_function_bad_4() EXCLUSIVE_LOCKS_REQUIRED(umu); // \
// takes one or more arguments, all locks (vars/fields)
void slr_function() __attribute__((shared_locks_required)); // \
- // expected-error {{attribute takes at least 1 argument}}
+ // expected-error {{'shared_locks_required' attribute takes at least 1 argument}}
void slr_function_arg() SHARED_LOCKS_REQUIRED(mu1);
@@ -1146,25 +1146,25 @@ int slr_testfn(int y) SHARED_LOCKS_REQUIRED(mu1);
int slr_testfn(int y) {
int x SHARED_LOCKS_REQUIRED(mu1) = y; // \
- // expected-warning {{'shared_locks_required' attribute only applies to functions and methods}}
+ // expected-warning {{'shared_locks_required' attribute only applies to functions}}
return x;
};
int slr_test_var SHARED_LOCKS_REQUIRED(mu1); // \
- // expected-warning {{'shared_locks_required' attribute only applies to functions and methods}}
+ // expected-warning {{'shared_locks_required' attribute only applies to functions}}
void slr_fun_params(int lvar SHARED_LOCKS_REQUIRED(mu1)); // \
- // expected-warning {{'shared_locks_required' attribute only applies to functions and methods}}
+ // expected-warning {{'shared_locks_required' attribute only applies to functions}}
class SlrFoo {
private:
int test_field SHARED_LOCKS_REQUIRED(mu1); // \
- // expected-warning {{'shared_locks_required' attribute only applies to functions and methods}}
+ // expected-warning {{'shared_locks_required' attribute only applies to functions}}
void test_method() SHARED_LOCKS_REQUIRED(mu1);
};
class SHARED_LOCKS_REQUIRED(mu1) SlrTestClass { // \
- // expected-warning {{'shared_locks_required' attribute only applies to functions and methods}}
+ // expected-warning {{'shared_locks_required' attribute only applies to functions}}
};
// Check argument parsing.
@@ -1182,13 +1182,13 @@ int slr_function_8() SHARED_LOCKS_REQUIRED(muPointer);
// illegal attribute arguments
int slr_function_bad_1() SHARED_LOCKS_REQUIRED(1); // \
- // expected-warning {{'shared_locks_required' attribute requires arguments that are class type or point to class type}}
+ // expected-warning {{'shared_locks_required' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'int'}}
int slr_function_bad_2() SHARED_LOCKS_REQUIRED("mu"); // \
// expected-warning {{ignoring 'shared_locks_required' attribute because its argument is invalid}}
int slr_function_bad_3() SHARED_LOCKS_REQUIRED(muDoublePointer); // \
- // expected-warning {{'shared_locks_required' attribute requires arguments that are class type or point to class type}}
+ // expected-warning {{'shared_locks_required' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'Mutex **'}}
int slr_function_bad_4() SHARED_LOCKS_REQUIRED(umu); // \
- // expected-warning {{'shared_locks_required' attribute requires arguments whose type is annotated with 'lockable' attribute}}
+ // expected-warning {{'shared_locks_required' attribute requires arguments whose type is annotated with 'capability' attribute}}
//-----------------------------------------//
@@ -1430,7 +1430,7 @@ class Foo {
int a GUARDED_BY(mu1_);
int b GUARDED_BY(mu2_);
int c GUARDED_BY(mu3_); // \
- // expected-warning {{'guarded_by' attribute requires arguments whose type is annotated with 'lockable' attribute; type here is 'class InheritanceTest::Derived3'}}
+ // expected-warning {{'guarded_by' attribute requires arguments whose type is annotated with 'capability' attribute; type here is 'InheritanceTest::Derived3'}}
void foo() EXCLUSIVE_LOCKS_REQUIRED(mu1_, mu2_) {
a = 0;
diff --git a/test/SemaCXX/warn-undefined-bool-conversion.cpp b/test/SemaCXX/warn-undefined-bool-conversion.cpp
new file mode 100644
index 000000000000..1f8baa0e8d8a
--- /dev/null
+++ b/test/SemaCXX/warn-undefined-bool-conversion.cpp
@@ -0,0 +1,97 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wundefined-bool-conversion %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-bool-conversion -Wundefined-bool-conversion %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wbool-conversion %s
+
+void test1(int &x) {
+ if (x == 1) { }
+ if (&x) { }
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true}}
+
+ if (!&x) { }
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true}}
+}
+
+class test2 {
+ test2() : x(y) {}
+
+ void foo() {
+ if (this) { }
+ // expected-warning@-1{{'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true}}
+
+ if (!this) { }
+ // expected-warning@-1{{'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true}}
+ }
+
+ void bar() {
+ if (x == 1) { }
+ if (&x) { }
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true}}
+
+ if (!&x) { }
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true}}
+ }
+
+ int &x;
+ int y;
+};
+
+namespace function_return_reference {
+ int& get_int();
+ // expected-note@-1 3{{'get_int' returns a reference}}
+ class B {
+ public:
+ static int &stat();
+ // expected-note@-1 3{{'stat' returns a reference}}
+ int &get();
+ // expected-note@-1 6{{'get' returns a reference}}
+ };
+
+ void test() {
+ if (&get_int()) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true}}
+ if (&(get_int())) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true}}
+ if (!&get_int()) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true}}
+
+ if (&B::stat()) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true}}
+ if (&(B::stat())) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true}}
+ if (!&B::stat()) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true}}
+
+ B b;
+ if (&b.get()) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true}}
+ if (&(b.get())) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true}}
+ if (!&b.get()) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true}}
+
+ B* b_ptr = &b;
+ if (&b_ptr->get()) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true}}
+ if (&(b_ptr->get())) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true}}
+ if (!&b_ptr->get()) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true}}
+
+ int& (B::*m_ptr)() = &B::get;
+ if (&(b.*m_ptr)()) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true}}
+ if (&((b.*m_ptr)())) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true}}
+ if (!&(b.*m_ptr)()) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true}}
+
+ int& (*f_ptr)() = &get_int;
+ if (&(*f_ptr)()) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true}}
+ if (&((*f_ptr)())) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true}}
+ if (!&(*f_ptr)()) {}
+ // expected-warning@-1{{reference cannot be bound to dereferenced null pointer in well-defined C++ code; pointer may be assumed to always convert to true}}
+ }
+}
diff --git a/test/SemaCXX/warn-unreachable.cpp b/test/SemaCXX/warn-unreachable.cpp
index dd071258e29d..b08467ab51e6 100644
--- a/test/SemaCXX/warn-unreachable.cpp
+++ b/test/SemaCXX/warn-unreachable.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -fcxx-exceptions -fexceptions -fsyntax-only -verify -fblocks -Wunreachable-code -Wno-unused-value
+// RUN: %clang_cc1 %s -fcxx-exceptions -fexceptions -fsyntax-only -verify -fblocks -std=c++11 -Wunreachable-code-aggressive -Wno-unused-value -Wno-tautological-compare
int &halt() __attribute__((noreturn));
int &live();
@@ -107,3 +107,303 @@ template <> void funcToSpecialize<int>() {
dead(); // expected-warning {{will never be executed}}
}
+// Handle 'try' code dominating a dead return.
+enum PR19040_test_return_t
+{ PR19040_TEST_FAILURE };
+namespace PR19040_libtest
+{
+ class A {
+ public:
+ ~A ();
+ };
+}
+PR19040_test_return_t PR19040_fn1 ()
+{
+ try
+ {
+ throw PR19040_libtest::A ();
+ } catch (...)
+ {
+ return PR19040_TEST_FAILURE;
+ }
+ return PR19040_TEST_FAILURE; // expected-warning {{will never be executed}}
+}
+
+__attribute__((noreturn))
+void raze();
+
+namespace std {
+template<typename T> struct basic_string {
+ basic_string(const T* x) {}
+ ~basic_string() {};
+};
+typedef basic_string<char> string;
+}
+
+std::string testStr() {
+ raze();
+ return ""; // expected-warning {{'return' will never be executed}}
+}
+
+std::string testStrWarn(const char *s) {
+ raze();
+ return s; // expected-warning {{will never be executed}}
+}
+
+bool testBool() {
+ raze();
+ return true; // expected-warning {{'return' will never be executed}}
+}
+
+static const bool ConditionVar = 1;
+int test_global_as_conditionVariable() {
+ if (ConditionVar)
+ return 1;
+ return 0; // no-warning
+}
+
+// Handle unreachable temporary destructors.
+class A {
+public:
+ A();
+ ~A();
+};
+
+__attribute__((noreturn))
+void raze(const A& x);
+
+void test_with_unreachable_tmp_dtors(int x) {
+ raze(x ? A() : A()); // no-warning
+}
+
+// Test sizeof - sizeof in enum declaration.
+enum { BrownCow = sizeof(long) - sizeof(char) };
+enum { CowBrown = 8 - 1 };
+
+
+int test_enum_sizeof_arithmetic() {
+ if (BrownCow)
+ return 1;
+ return 2;
+}
+
+int test_enum_arithmetic() {
+ if (CowBrown)
+ return 1;
+ return 2; // expected-warning {{never be executed}}
+}
+
+int test_arithmetic() {
+ if (8 -1)
+ return 1;
+ return 2; // expected-warning {{never be executed}}
+}
+
+int test_treat_const_bool_local_as_config_value() {
+ const bool controlValue = false;
+ if (!controlValue)
+ return 1;
+ test_treat_const_bool_local_as_config_value(); // no-warning
+ return 0;
+}
+
+int test_treat_non_const_bool_local_as_non_config_value() {
+ bool controlValue = false;
+ if (!controlValue)
+ return 1;
+ // There is no warning here because 'controlValue' isn't really
+ // a control value at all. The CFG will not treat this
+ // branch as unreachable.
+ test_treat_non_const_bool_local_as_non_config_value(); // no-warning
+ return 0;
+}
+
+void test_do_while(int x) {
+ // Handle trivial expressions with
+ // implicit casts to bool.
+ do {
+ break;
+ } while (0); // no-warning
+}
+
+class Frobozz {
+public:
+ Frobozz(int x);
+ ~Frobozz();
+};
+
+Frobozz test_return_object(int flag) {
+ return Frobozz(flag);
+ return Frobozz(42); // expected-warning {{'return' will never be executed}}
+}
+
+Frobozz test_return_object_control_flow(int flag) {
+ return Frobozz(flag);
+ return Frobozz(flag ? 42 : 24); // expected-warning {{code will never be executed}}
+}
+
+void somethingToCall();
+
+static constexpr bool isConstExprConfigValue() { return true; }
+
+int test_const_expr_config_value() {
+ if (isConstExprConfigValue()) {
+ somethingToCall();
+ return 0;
+ }
+ somethingToCall(); // no-warning
+ return 1;
+}
+int test_const_expr_config_value_2() {
+ if (!isConstExprConfigValue()) {
+ somethingToCall(); // no-warning
+ return 0;
+ }
+ somethingToCall();
+ return 1;
+}
+
+class Frodo {
+public:
+ static const bool aHobbit = true;
+};
+
+void test_static_class_var() {
+ if (Frodo::aHobbit)
+ somethingToCall();
+ else
+ somethingToCall(); // no-warning
+}
+
+void test_static_class_var(Frodo &F) {
+ if (F.aHobbit)
+ somethingToCall();
+ else
+ somethingToCall(); // no-warning
+}
+
+void test_unreachable_for_null_increment() {
+ for (unsigned i = 0; i < 10 ; ) // no-warning
+ break;
+}
+
+void test_unreachable_forrange_increment() {
+ int x[10] = { 0 };
+ for (auto i : x) { // expected-warning {{loop will run at most once (loop increment never executed)}}
+ break;
+ }
+}
+
+void calledFun() {}
+
+// Test "silencing" with parentheses.
+void test_with_paren_silencing(int x) {
+ if (false) calledFun(); // expected-warning {{will never be executed}} expected-note {{silence by adding parentheses to mark code as explicitly dead}}
+ if ((false)) calledFun(); // no-warning
+
+ if (true) // expected-note {{silence by adding parentheses to mark code as explicitly dead}}
+ calledFun();
+ else
+ calledFun(); // expected-warning {{will never be executed}}
+
+ if ((true))
+ calledFun();
+ else
+ calledFun(); // no-warning
+
+ if (!true) // expected-note {{silence by adding parentheses to mark code as explicitly dead}}
+ calledFun(); // expected-warning {{code will never be executed}}
+ else
+ calledFun();
+
+ if ((!true))
+ calledFun(); // no-warning
+ else
+ calledFun();
+
+ if (!(true))
+ calledFun(); // no-warning
+ else
+ calledFun();
+}
+
+void test_with_paren_silencing_impcast(int x) {
+ if (0) calledFun(); // expected-warning {{will never be executed}} expected-note {{silence by adding parentheses to mark code as explicitly dead}}
+ if ((0)) calledFun(); // no-warning
+
+ if (1) // expected-note {{silence by adding parentheses to mark code as explicitly dead}}
+ calledFun();
+ else
+ calledFun(); // expected-warning {{will never be executed}}
+
+ if ((1))
+ calledFun();
+ else
+ calledFun(); // no-warning
+
+ if (!1) // expected-note {{silence by adding parentheses to mark code as explicitly dead}}
+ calledFun(); // expected-warning {{code will never be executed}}
+ else
+ calledFun();
+
+ if ((!1))
+ calledFun(); // no-warning
+ else
+ calledFun();
+
+ if (!(1))
+ calledFun(); // no-warning
+ else
+ calledFun();
+}
+
+void tautological_compare(bool x, int y) {
+ if (x > 10) // expected-note {{silence}}
+ calledFun(); // expected-warning {{will never be executed}}
+ if (10 < x) // expected-note {{silence}}
+ calledFun(); // expected-warning {{will never be executed}}
+ if (x == 10) // expected-note {{silence}}
+ calledFun(); // expected-warning {{will never be executed}}
+
+ if (x < 10) // expected-note {{silence}}
+ calledFun();
+ else
+ calledFun(); // expected-warning {{will never be executed}}
+ if (10 > x) // expected-note {{silence}}
+ calledFun();
+ else
+ calledFun(); // expected-warning {{will never be executed}}
+ if (x != 10) // expected-note {{silence}}
+ calledFun();
+ else
+ calledFun(); // expected-warning {{will never be executed}}
+
+ if (y != 5 && y == 5) // expected-note {{silence}}
+ calledFun(); // expected-warning {{will never be executed}}
+
+ if (y > 5 && y < 4) // expected-note {{silence}}
+ calledFun(); // expected-warning {{will never be executed}}
+
+ if (y < 10 || y > 5) // expected-note {{silence}}
+ calledFun();
+ else
+ calledFun(); // expected-warning {{will never be executed}}
+
+ // TODO: Extend warning to the following code:
+ if (x < -1)
+ calledFun();
+ if (x == -1)
+ calledFun();
+
+ if (x != -1)
+ calledFun();
+ else
+ calledFun();
+ if (-1 > x)
+ calledFun();
+ else
+ calledFun();
+
+ if (y == -1 && y != -1)
+ calledFun();
+}
diff --git a/test/SemaCXX/warn-unused-attribute.cpp b/test/SemaCXX/warn-unused-attribute.cpp
index 72f96eea0b31..f52de3b931b0 100644
--- a/test/SemaCXX/warn-unused-attribute.cpp
+++ b/test/SemaCXX/warn-unused-attribute.cpp
@@ -1,20 +1,20 @@
// RUN: %clang_cc1 -fsyntax-only -Wunused-variable -verify %s
-struct __attribute__((warn_unused)) Test
-{
- Test();
- ~Test();
- void use();
+struct __attribute__((warn_unused)) Test {
+ Test();
+ ~Test();
+ void use();
};
-struct TestNormal
-{
- TestNormal();
+struct TestNormal {
+ TestNormal();
};
-int main()
-{
- Test unused; // expected-warning {{unused variable 'unused'}}
- Test used;
- TestNormal normal;
- used.use();
+int main(void) {
+ Test unused; // expected-warning {{unused variable 'unused'}}
+ Test used;
+ TestNormal normal;
+ used.use();
+
+ int i __attribute__((warn_unused)) = 12; // expected-warning {{'warn_unused' attribute only applies to struct, union or class}}
+ return i;
}
diff --git a/test/SemaCXX/warn-unused-comparison.cpp b/test/SemaCXX/warn-unused-comparison.cpp
index 0153f213ba1f..3afad585b668 100644
--- a/test/SemaCXX/warn-unused-comparison.cpp
+++ b/test/SemaCXX/warn-unused-comparison.cpp
@@ -3,6 +3,10 @@
struct A {
bool operator==(const A&);
bool operator!=(const A&);
+ bool operator<(const A&);
+ bool operator>(const A&);
+ bool operator<=(const A&);
+ bool operator>=(const A&);
A operator|=(const A&);
operator bool();
};
@@ -15,6 +19,11 @@ void test() {
// expected-note {{use '=' to turn this equality comparison into an assignment}}
x != 7; // expected-warning {{inequality comparison result unused}} \
// expected-note {{use '|=' to turn this inequality comparison into an or-assignment}}
+ x < 7; // expected-warning {{relational comparison result unused}}
+ x > 7; // expected-warning {{relational comparison result unused}}
+ x <= 7; // expected-warning {{relational comparison result unused}}
+ x >= 7; // expected-warning {{relational comparison result unused}}
+
7 == x; // expected-warning {{equality comparison result unused}}
p == p; // expected-warning {{equality comparison result unused}} \
// expected-note {{use '=' to turn this equality comparison into an assignment}} \
@@ -25,6 +34,11 @@ void test() {
// expected-note {{use '=' to turn this equality comparison into an assignment}}
a != b; // expected-warning {{inequality comparison result unused}} \
// expected-note {{use '|=' to turn this inequality comparison into an or-assignment}}
+ a < b; // expected-warning {{relational comparison result unused}}
+ a > b; // expected-warning {{relational comparison result unused}}
+ a <= b; // expected-warning {{relational comparison result unused}}
+ a >= b; // expected-warning {{relational comparison result unused}}
+
A() == b; // expected-warning {{equality comparison result unused}}
if (42) x == 7; // expected-warning {{equality comparison result unused}} \
// expected-note {{use '=' to turn this equality comparison into an assignment}}
@@ -92,3 +106,30 @@ namespace PR10291 {
X<int> x;
}
+
+namespace PR19724 {
+class stream {
+} cout, cin;
+
+stream &operator<(stream &s, int);
+bool operator<(stream &s, stream &s2);
+
+void test() {
+ cout < 5; // no warning, operator returns a reference
+ cout < cin; // expected-warning {{relational comparison result unused}}
+}
+}
+
+namespace PR19791 {
+struct S {
+ void operator!=(int);
+ int operator==(int);
+};
+
+void test() {
+ S s;
+ s != 1;
+ s == 1; // expected-warning{{equality comparison result unused}}
+ // expected-note@-1{{use '=' to turn this equality comparison into an assignment}}
+}
+}
diff --git a/test/SemaCXX/warn-unused-filescoped.cpp b/test/SemaCXX/warn-unused-filescoped.cpp
index b0af5b332270..df4c47e71787 100644
--- a/test/SemaCXX/warn-unused-filescoped.cpp
+++ b/test/SemaCXX/warn-unused-filescoped.cpp
@@ -32,6 +32,13 @@ namespace test7
inline void bar(int, int) { }
};
+namespace pr19713 {
+#if __cplusplus >= 201103L
+ static constexpr int constexpr1() { return 1; }
+ constexpr int constexpr2() { return 2; }
+#endif
+}
+
#else
#define HEADER
#include "warn-unused-filescoped.cpp"
@@ -193,4 +200,12 @@ void bar() { void func() __attribute__((used)); }
static void func() {}
}
+namespace pr19713 {
+#if __cplusplus >= 201103L
+ // FIXME: We should warn on both of these.
+ static constexpr int constexpr3() { return 1; } // expected-warning {{unused}}
+ constexpr int constexpr4() { return 2; }
+#endif
+}
+
#endif
diff --git a/test/SemaCXX/warn-unused-label-error.cpp b/test/SemaCXX/warn-unused-label-error.cpp
new file mode 100644
index 000000000000..66b616f3cf28
--- /dev/null
+++ b/test/SemaCXX/warn-unused-label-error.cpp
@@ -0,0 +1,26 @@
+// RUN: %clang_cc1 -fsyntax-only -Wunused-variable -Wunused-label -verify %s
+
+static int unused_local_static;
+
+namespace PR8455 {
+ void f() {
+ A: // expected-warning {{unused label 'A'}}
+ __attribute__((unused)) int i; // attribute applies to variable
+ B: // attribute applies to label
+ __attribute__((unused)); int j; // expected-warning {{unused variable 'j'}}
+ }
+
+ void g() {
+ C: // unused label 'C' will not appear here because an error has occurred
+ __attribute__((unused))
+ #pragma weak unused_local_static // expected-error {{expected ';' after __attribute__}}
+ ;
+ }
+
+ void h() {
+ D: // expected-warning {{unused label 'D'}}
+ #pragma weak unused_local_static
+ __attribute__((unused)) // expected-warning {{declaration does not declare anything}}
+ ;
+ }
+}
diff --git a/test/SemaCXX/warn-unused-value.cpp b/test/SemaCXX/warn-unused-value.cpp
index 5e43d3ec0422..4e1347cc307a 100644
--- a/test/SemaCXX/warn-unused-value.cpp
+++ b/test/SemaCXX/warn-unused-value.cpp
@@ -32,7 +32,7 @@ void b(Foo f1, Foo f2) {
}
namespace test2 {
- extern "C" {
+ extern "C++" {
namespace std {
template<typename T> struct basic_string {
struct X {};
diff --git a/test/SemaCXX/warn-unused-variables.cpp b/test/SemaCXX/warn-unused-variables.cpp
index 93d2f6f9563b..8dcbe7271d69 100644
--- a/test/SemaCXX/warn-unused-variables.cpp
+++ b/test/SemaCXX/warn-unused-variables.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -Wunused-variable -Wunused-label -verify %s
+// RUN: %clang_cc1 -fsyntax-only -Wunused-variable -Wunused-label -Wno-c++1y-extensions -verify %s
template<typename T> void f() {
T t;
t = 17;
@@ -115,6 +115,28 @@ namespace PR11550 {
}
}
+namespace PR19305 {
+ template<typename T> int n = 0; // no warning
+ int a = n<int>;
+
+ template<typename T> const int l = 0; // no warning
+ int b = l<int>;
+
+ // PR19558
+ template<typename T> const int o = 0; // no warning
+ template<typename T> const int o<T*> = 0; // no warning
+ int c = o<int*>;
+
+ template<> int o<void> = 0; // no warning
+ int d = o<void>;
+
+ // FIXME: It'd be nice to warn here.
+ template<typename T> int m = 0;
+ template<typename T> int m<T*> = 0;
+
+ template<> const int m<void> = 0; // expected-warning {{unused variable}}
+}
+
namespace ctor_with_cleanups {
struct S1 {
~S1();
@@ -128,26 +150,3 @@ namespace ctor_with_cleanups {
}
#include "Inputs/warn-unused-variables.h"
-
-namespace PR8455 {
- void f() {
- A: // expected-warning {{unused label 'A'}}
- __attribute__((unused)) int i; // attribute applies to variable
- B: // attribute applies to label
- __attribute__((unused)); int j; // expected-warning {{unused variable 'j'}}
- }
-
- void g() {
- C: // unused label 'C' will not appear here because an error occurs
- __attribute__((unused))
- #pragma weak unused_local_static // expected-error {{expected ';' after __attribute__}}
- ;
- }
-
- void h() {
- D: // expected-warning {{unused label 'D'}}
- #pragma weak unused_local_static
- __attribute__((unused)) // expected-warning {{declaration does not declare anything}}
- ;
- }
-}
diff --git a/test/SemaCXX/warn-weak-vtables.cpp b/test/SemaCXX/warn-weak-vtables.cpp
index 135e0342596c..671ff297cfa1 100644
--- a/test/SemaCXX/warn-weak-vtables.cpp
+++ b/test/SemaCXX/warn-weak-vtables.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 %s -fsyntax-only -verify -Wweak-vtables -Wweak-template-vtables
+// RUN: %clang_cc1 %s -fsyntax-only -verify -triple %itanium_abi_triple -Wweak-vtables -Wweak-template-vtables
+// RUN: %clang_cc1 %s -fsyntax-only -triple %ms_abi_triple -Werror -Wno-weak-vtables -Wno-weak-template-vtables
struct A { // expected-warning {{'A' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit}}
virtual void f() { }
diff --git a/test/SemaCXX/windows-arm-valist.cpp b/test/SemaCXX/windows-arm-valist.cpp
new file mode 100644
index 000000000000..d12be65e4f9f
--- /dev/null
+++ b/test/SemaCXX/windows-arm-valist.cpp
@@ -0,0 +1,17 @@
+// RUN: %clang_cc1 -triple thumbv7--windows-msvc -std=c++11 -verify -fsyntax-only %s
+// expected-no-diagnostics
+
+#include <stdarg.h>
+
+template <typename lhs_, typename rhs_>
+struct is_same { enum { value = 0 }; };
+
+template <typename type_>
+struct is_same<type_, type_> { enum { value = 1 }; };
+
+void check() {
+ va_list va;
+ char *cp;
+ static_assert(is_same<decltype(va), decltype(cp)>::value,
+ "type mismatch for va_list");
+}
diff --git a/test/SemaCXX/writable-strings-deprecated.cpp b/test/SemaCXX/writable-strings-deprecated.cpp
index b8f605b63d66..f9258334980b 100644
--- a/test/SemaCXX/writable-strings-deprecated.cpp
+++ b/test/SemaCXX/writable-strings-deprecated.cpp
@@ -1,14 +1,25 @@
// RUN: %clang_cc1 -fsyntax-only -Wno-deprecated-writable-strings -verify %s
+// RUN: %clang_cc1 -fsyntax-only -Wno-deprecated -Wdeprecated-increment-bool -verify %s
// RUN: %clang_cc1 -fsyntax-only -fwritable-strings -verify %s
// RUN: %clang_cc1 -fsyntax-only -Wno-write-strings -verify %s
// RUN: %clang_cc1 -fsyntax-only -Werror=c++11-compat -verify %s -DERROR
+// RUN: %clang_cc1 -fsyntax-only -Werror=deprecated -Wno-error=deprecated-increment-bool -verify %s -DERROR
+// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
+// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s -Wno-deprecated -Wdeprecated-increment-bool
+// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s -pedantic-errors -DERROR
// rdar://8827606
char *fun(void)
{
return "foo";
+#if __cplusplus >= 201103L
#ifdef ERROR
- // expected-error@-2 {{deprecated}}
+ // expected-error@-3 {{ISO C++11 does not allow conversion from string literal to 'char *'}}
+#else
+ // expected-warning@-5 {{ISO C++11 does not allow conversion from string literal to 'char *'}}
+#endif
+#elif defined(ERROR)
+ // expected-error@-8 {{deprecated}}
#endif
}
diff --git a/test/SemaObjC/arc-decls.m b/test/SemaObjC/arc-decls.m
index 903cea2a0e8a..7fcf576f7000 100644
--- a/test/SemaObjC/arc-decls.m
+++ b/test/SemaObjC/arc-decls.m
@@ -51,20 +51,28 @@ void func()
}
// rdar://9157348
+// rdar://15757510
@interface J
-@property (retain) id newFoo; // expected-note {{property declared here}}
-@property (strong) id copyBar; // expected-note {{property declared here}}
-@property (copy) id allocBaz; // expected-note {{property declared here}}
+@property (retain) id newFoo; // expected-error {{property follows Cocoa naming convention for returning 'owned' objects}}
+@property (strong) id copyBar; // expected-error {{property follows Cocoa naming convention for returning 'owned' objects}}
+@property (copy) id allocBaz; // expected-error {{property follows Cocoa naming convention for returning 'owned' objects}}
@property (copy, nonatomic) id new;
+@property (retain) id newDFoo; // expected-error {{property follows Cocoa naming convention for returning 'owned' objects}}
+@property (strong) id copyDBar; // expected-error {{property follows Cocoa naming convention for returning 'owned' objects}}
+@property (copy) id allocDBaz; // expected-error {{property follows Cocoa naming convention for returning 'owned' objects}}
@end
@implementation J
-@synthesize newFoo; // expected-error {{property's synthesized getter follows Cocoa naming convention for returning}}
-@synthesize copyBar; // expected-error {{property's synthesized getter follows Cocoa naming convention for returning}}
-@synthesize allocBaz; // expected-error {{property's synthesized getter follows Cocoa naming convention for returning}}
+@synthesize newFoo;
+@synthesize copyBar;
+@synthesize allocBaz;
@synthesize new;
- new {return 0; };
+
+@dynamic newDFoo;
+@dynamic copyDBar;
+@dynamic allocDBaz;
@end
diff --git a/test/SemaObjC/arc-invalid.m b/test/SemaObjC/arc-invalid.m
index c736ed4a167c..07b6480c1f9b 100644
--- a/test/SemaObjC/arc-invalid.m
+++ b/test/SemaObjC/arc-invalid.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -fobjc-arc -fblocks -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fobjc-arc -fblocks -Wno-objc-root-class -verify %s
// rdar://problem/10982793
// [p foo] in ARC creates a cleanup.
@@ -16,3 +16,29 @@ void test1(void) {
__autoreleasing id p; // expected-note {{'p' declared here}}
takeBlock(^{ (void) p; }); // expected-error {{cannot capture __autoreleasing variable in a block}}
}
+
+// rdar://17024681
+@class WebFrame;
+@interface WebView // expected-note {{previous definition is here}}
+- (WebFrame *)mainFrame;
+@end
+
+@interface WebView // expected-error {{duplicate interface definition for class 'WebView'}}
+@property (nonatomic, readonly, strong) WebFrame *mainFrame;
+@end
+
+@interface UIWebDocumentView
+- (WebView *)webView;
+@end
+
+@interface UIWebBrowserView : UIWebDocumentView
+@end
+
+@interface StoreBanner @end
+
+@implementation StoreBanner
++ (void)readMetaTagContentForUIWebBrowserView:(UIWebBrowserView *)browserView
+{
+ [[browserView webView] mainFrame];
+}
+@end
diff --git a/test/SemaObjC/arc-jump-block.m b/test/SemaObjC/arc-jump-block.m
index 26a1fc839d73..9b06c5a780cc 100644
--- a/test/SemaObjC/arc-jump-block.m
+++ b/test/SemaObjC/arc-jump-block.m
@@ -84,7 +84,7 @@ extern __attribute__((visibility("default"))) struct dispatch_queue_s _dispatch_
@end
// Test 2. rdar://problem/11150919
-int test2(id obj, int state) { // expected-note {{jump enters lifetime of block}} FIXME: wierd location
+int test2(id obj, int state) { // expected-note {{jump enters lifetime of block}} FIXME: weird location
switch (state) {
case 0:
(void) ^{ (void) obj; };
diff --git a/test/SemaObjC/arc-objcbridge-related-attribute.m b/test/SemaObjC/arc-objcbridge-related-attribute.m
new file mode 100644
index 000000000000..59daef1ce64b
--- /dev/null
+++ b/test/SemaObjC/arc-objcbridge-related-attribute.m
@@ -0,0 +1,41 @@
+// RUN: %clang_cc1 -fsyntax-only -x objective-c -fobjc-arc -verify -Wno-objc-root-class %s
+// rdar://15499111
+
+typedef struct __attribute__((objc_bridge_related(NSColor,colorWithCGColor:,CGColor))) CGColor *CGColorRef; // expected-note 5 {{declared here}}
+typedef struct __attribute__((objc_bridge_related(NSColor,,CGColor1))) CGColor1 *CGColorRef1;
+typedef struct __attribute__((objc_bridge_related(NSColor,,))) CGColor2 *CGColorRef2;
+
+@interface NSColor // expected-note 5 {{declared here}}
++ (NSColor *)colorWithCGColor:(CGColorRef)cgColor;
+- (CGColorRef)CGColor;
+- (CGColorRef1)CGColor1;
+@end
+
+@interface NSTextField
+- (void)setBackgroundColor:(NSColor *)color;
+- (NSColor *)backgroundColor;
+@end
+
+void foo(NSColor*); // expected-note {{passing argument to parameter here}}
+
+NSColor * Test1(NSTextField *textField, CGColorRef newColor) {
+ foo(newColor); // expected-error {{'CGColorRef' (aka 'struct CGColor *') must be explicitly converted to 'NSColor *'; use '+colorWithCGColor:' method for this conversion}}
+ textField.backgroundColor = newColor; // expected-error {{'CGColorRef' (aka 'struct CGColor *') must be explicitly converted to 'NSColor *__strong'; use '+colorWithCGColor:' method for this conversion}}
+ return newColor; // expected-error {{'CGColorRef' (aka 'struct CGColor *') must be explicitly converted to 'NSColor *'; use '+colorWithCGColor:' method for this conversion}}
+}
+
+NSColor * Test2(NSTextField *textField, CGColorRef1 newColor) {
+ foo(newColor); // expected-warning {{incompatible pointer types passing 'CGColorRef1' (aka 'struct CGColor1 *') to parameter of type 'NSColor *'}}
+ textField.backgroundColor = newColor; // expected-warning {{incompatible pointer types assigning to 'NSColor *__strong' from 'CGColorRef1' (aka 'struct CGColor1 *')}}
+ return newColor; // expected-warning {{incompatible pointer types returning 'CGColorRef1' (aka 'struct CGColor1 *') from a function with result type 'NSColor *'}}
+}
+
+CGColorRef Test3(NSTextField *textField, CGColorRef newColor) {
+ newColor = textField.backgroundColor; // expected-error {{'NSColor *' must be explicitly converted to 'CGColorRef' (aka 'struct CGColor *'); use '-CGColor' method for this conversion}}
+ return textField.backgroundColor; // expected-error {{'NSColor *' must be explicitly converted to 'CGColorRef' (aka 'struct CGColor *'); use '-CGColor' method for this conversion}}
+}
+
+CGColorRef2 Test4(NSTextField *textField, CGColorRef2 newColor) {
+ newColor = textField.backgroundColor; // expected-warning {{incompatible pointer types assigning}}
+ return textField.backgroundColor; // expected-warning {{incompatible pointer types returning}}
+}
diff --git a/test/SemaObjC/arc-property-lifetime.m b/test/SemaObjC/arc-property-lifetime.m
index ed72e8c7d811..4874ff3a35eb 100644
--- a/test/SemaObjC/arc-property-lifetime.m
+++ b/test/SemaObjC/arc-property-lifetime.m
@@ -154,7 +154,7 @@
@property id prop;
@property __strong id strong_prop;
@property (strong) id strong_attr_prop;
-@property (strong) __strong id realy_strong_attr_prop;
+@property (strong) __strong id really_strong_attr_prop;
+ (id) alloc;
- (id) init;
- (id) implicit;
@@ -165,7 +165,7 @@ void foo(Baz *f) {
f.prop = [[Baz alloc] init];
f.strong_prop = [[Baz alloc] init];
f.strong_attr_prop = [[Baz alloc] init];
- f.realy_strong_attr_prop = [[Baz alloc] init];
+ f.really_strong_attr_prop = [[Baz alloc] init];
f.implicit = [[Baz alloc] init];
}
diff --git a/test/SemaObjC/arc-unavailable-for-weakref.m b/test/SemaObjC/arc-unavailable-for-weakref.m
index eab5f2ca746e..82748027435e 100644
--- a/test/SemaObjC/arc-unavailable-for-weakref.m
+++ b/test/SemaObjC/arc-unavailable-for-weakref.m
@@ -90,3 +90,5 @@ __attribute__((objc_arc_weak_reference_unavailable))
__attribute__((objc_arc_weak_reference_unavailable(1))) // expected-error {{'objc_arc_weak_reference_unavailable' attribute takes no arguments}}
@interface I3
@end
+
+int I4 __attribute__((objc_arc_weak_reference_unavailable)); // expected-error {{'objc_arc_weak_reference_unavailable' attribute only applies to Objective-C interfaces}}
diff --git a/test/SemaObjC/arc-unavailable-system-function.m b/test/SemaObjC/arc-unavailable-system-function.m
index b0b70db641cb..54ceaafbd699 100644
--- a/test/SemaObjC/arc-unavailable-system-function.m
+++ b/test/SemaObjC/arc-unavailable-system-function.m
@@ -3,7 +3,7 @@
# 1 "<command line>"
# 1 "/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h" 1 3
-id * foo(); // expected-note {{function has been explicitly marked unavailable here}}
+id * foo(); // expected-note {{'foo' has been explicitly marked unavailable here}}
# 1 "arc-unavailable-system-function.m" 2
void ret() {
diff --git a/test/SemaObjC/arc.m b/test/SemaObjC/arc.m
index 060af24fa0d9..ba7c09f4f9d7 100644
--- a/test/SemaObjC/arc.m
+++ b/test/SemaObjC/arc.m
@@ -285,7 +285,7 @@ void test11(id op, void *vp) {
b = (nil == vp);
b = (vp == op); // expected-error {{implicit conversion of Objective-C pointer type 'id' to C pointer type 'void *' requires a bridged cast}} expected-note {{use __bridge}} expected-note {{use CFBridgingRetain call}}
- b = (op == vp); // expected-error {{implicit conversion of C pointer type 'void *' to Objective-C pointer type 'id' requires a bridged cast}} expected-note {{use __bridge}} expected-note {{use CFBridgingRelease call}}
+ b = (op == vp);
}
void test12(id collection) {
@@ -782,3 +782,19 @@ void foo(NSArray *array) {
}
}
}
+
+// rdar://16627903
+extern void abort();
+#define TKAssertEqual(a, b) do{\
+ __typeof(a) a_res = (a);\
+ __typeof(b) b_res = (b);\
+ if ((a_res) != (b_res)) {\
+ abort();\
+ }\
+}while(0)
+
+int garf() {
+ id object;
+ TKAssertEqual(object, nil);
+ TKAssertEqual(object, (id)nil);
+}
diff --git a/test/SemaObjC/attr-availability.m b/test/SemaObjC/attr-availability.m
index fddcd506d44d..7990b1202e8f 100644
--- a/test/SemaObjC/attr-availability.m
+++ b/test/SemaObjC/attr-availability.m
@@ -1,11 +1,11 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin9.0.0 -fsyntax-only -verify %s
@protocol P
-- (void)proto_method __attribute__((availability(macosx,introduced=10.1,deprecated=10.2))); // expected-note 2 {{method 'proto_method' declared here}}
+- (void)proto_method __attribute__((availability(macosx,introduced=10.1,deprecated=10.2))); // expected-note 2 {{'proto_method' has been explicitly marked deprecated here}}
@end
@interface A <P>
-- (void)method __attribute__((availability(macosx,introduced=10.1,deprecated=10.2))); // expected-note {{method 'method' declared here}}
+- (void)method __attribute__((availability(macosx,introduced=10.1,deprecated=10.2))); // expected-note {{'method' has been explicitly marked deprecated here}}
- (void)overridden __attribute__((availability(macosx,introduced=10.3))); // expected-note{{overridden method is here}}
- (void)overridden2 __attribute__((availability(macosx,introduced=10.3)));
@@ -37,7 +37,7 @@ void f(A *a, B *b) {
// using a deprecated method when that method is re-implemented in a
// subclass where the redeclared method is not deprecated.
@interface C
-- (void) method __attribute__((availability(macosx,introduced=10.1,deprecated=10.2))); // expected-note {{method 'method' declared here}}
+- (void) method __attribute__((availability(macosx,introduced=10.1,deprecated=10.2))); // expected-note {{'method' has been explicitly marked deprecated here}}
@end
@interface D : C
diff --git a/test/SemaObjC/attr-deprecated.m b/test/SemaObjC/attr-deprecated.m
index aa4b479e0022..ca30d0a27d88 100644
--- a/test/SemaObjC/attr-deprecated.m
+++ b/test/SemaObjC/attr-deprecated.m
@@ -2,10 +2,10 @@
// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -verify -Wno-objc-root-class %s
@interface A {
- int X __attribute__((deprecated)); // expected-note 2 {{declared here}}
+ int X __attribute__((deprecated)); // expected-note 2 {{'X' has been explicitly marked deprecated here}}
}
-+ (void)F __attribute__((deprecated)); // expected-note 2 {{declared here}}
-- (void)f __attribute__((deprecated)); // expected-note 4 {{declared here}}
++ (void)F __attribute__((deprecated)); // expected-note 2 {{'F' has been explicitly marked deprecated here}}
+- (void)f __attribute__((deprecated)); // expected-note 4 {{'f' has been explicitly marked deprecated here}}
@end
@implementation A
@@ -43,7 +43,7 @@
@end
@protocol P
-- (void)p __attribute__((deprecated)); // expected-note {{declared here}}
+- (void)p __attribute__((deprecated)); // expected-note {{'p' has been explicitly marked deprecated here}}
@end
void t1(A *a)
@@ -72,7 +72,7 @@ void t4(Class c)
@interface Bar
-@property (assign, setter = MySetter:) int FooBar __attribute__ ((deprecated)); // expected-note 2 {{declared here}}
+@property (assign, setter = MySetter:) int FooBar __attribute__ ((deprecated)); // expected-note 2 {{'FooBar' has been explicitly marked deprecated here}}
- (void) MySetter : (int) value;
@end
@@ -84,7 +84,7 @@ int t5() {
__attribute ((deprecated))
-@interface DEPRECATED { // expected-note 2 {{declared here}}
+@interface DEPRECATED { // expected-note 2 {{'DEPRECATED' has been explicitly marked deprecated here}}
@public int ivar;
DEPRECATED *ivar2; // no warning.
}
@@ -108,8 +108,8 @@ __attribute ((deprecated))
@interface Test2
-@property int test2 __attribute__((deprecated)); // expected-note 4 {{declared here}} \
- // expected-note 2 {{property 'test2' is declared deprecated here}}
+@property int test2 __attribute__((deprecated)); // expected-note 2 {{property 'test2' is declared deprecated here}} expected-note 3 {{'test2' has been explicitly marked deprecated here}} \
+ // expected-note {{'setTest2:' has been explicitly marked deprecated here}}
@end
void test(Test2 *foo) {
@@ -127,7 +127,7 @@ __attribute__((deprecated))
typedef struct {
int x;
-} footype __attribute((deprecated)); // expected-note 2 {{declared here}}
+} footype __attribute((deprecated)); // expected-note 2 {{'footype' has been explicitly marked deprecated here}}
@interface foo {
footype a; // expected-warning {{'footype' is deprecated}}
@@ -142,7 +142,7 @@ typedef struct {
+(void)cmeth;
@end
-typedef NewI DeprI __attribute__((deprecated("blah"))); // expected-note 4 {{'DeprI' declared here}}
+typedef NewI DeprI __attribute__((deprecated("blah"))); // expected-note 4 {{'DeprI' has been explicitly marked deprecated here}}
@interface SI : DeprI // expected-warning {{'DeprI' is deprecated: blah}}
-(DeprI*)meth; // expected-warning {{'DeprI' is deprecated: blah}}
@@ -154,3 +154,76 @@ typedef NewI DeprI __attribute__((deprecated("blah"))); // expected-note 4 {{'De
return 0;
}
@end
+
+// <rdar://problem/15407366> and <rdar://problem/15466783>:
+// - Using deprecated class name inside class should not warn about deprecation.
+// - Implementations of deprecated classes should not result in deprecation warnings.
+__attribute__((deprecated))
+@interface DeprecatedClassA
+@end
+
+__attribute__((deprecated))
+@interface DeprecatedClassB
+// The self-reference return value should not be
+// flagged as the use of a deprecated declaration.
++ (DeprecatedClassB *)sharedInstance; // no-warning
+
+// Since this class is deprecated, returning a reference
+// to another deprecated class is fine as they may
+// have been deprecated together. From a user's
+// perspective they are all deprecated.
++ (DeprecatedClassA *)somethingElse; // no-warning
+@end
+
+@implementation DeprecatedClassB
++ (DeprecatedClassB *)sharedInstance
+{
+ // This self-reference should not
+ // be flagged as a use of a deprecated
+ // declaration.
+ static DeprecatedClassB *x; // no-warning
+ return x;
+}
++ (DeprecatedClassA *)somethingElse {
+ // Since this class is deprecated, referencing
+ // another deprecated class is also OK.
+ static DeprecatedClassA *x; // no-warning
+ return x;
+}
+
+@end
+
+// rdar://16068470
+@interface TestBase
+@property (nonatomic, strong) id object __attribute__((deprecated("deprecated"))); // expected-note {{'object' has been explicitly marked deprecated here}} \
+expected-note {{property 'object' is declared deprecated here}} \
+expected-note {{'setObject:' has been explicitly marked deprecated here}}
+@end
+
+@interface TestDerived : TestBase
+@property (nonatomic, strong) id object;
+@end
+
+@interface TestUse @end
+
+@implementation TestBase @end
+
+@implementation TestDerived @end
+
+@implementation TestUse
+
+- (void) use
+{
+ TestBase *base = (id)0;
+ TestDerived *derived = (id)0;
+ id object = (id)0;
+
+ base.object = object; // expected-warning {{'object' is deprecated: deprecated}}
+ derived.object = object;
+
+ [base setObject:object]; // expected-warning {{'setObject:' is deprecated: deprecated}}
+ [derived setObject:object];
+}
+
+@end
+
diff --git a/test/SemaObjC/attr-designated-init.m b/test/SemaObjC/attr-designated-init.m
new file mode 100644
index 000000000000..535065769404
--- /dev/null
+++ b/test/SemaObjC/attr-designated-init.m
@@ -0,0 +1,412 @@
+// RUN: %clang_cc1 -fsyntax-only -Wno-incomplete-implementation -verify -fblocks %s
+
+#define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
+
+void fnfoo(void) NS_DESIGNATED_INITIALIZER; // expected-error {{only applies to init methods of interface or class extension declarations}}
+
+@protocol P1
+-(id)init NS_DESIGNATED_INITIALIZER; // expected-error {{only applies to init methods of interface or class extension declarations}}
+@end
+
+__attribute__((objc_root_class))
+@interface I1
+-(void)meth NS_DESIGNATED_INITIALIZER; // expected-error {{only applies to init methods of interface or class extension declarations}}
+-(id)init NS_DESIGNATED_INITIALIZER;
++(id)init NS_DESIGNATED_INITIALIZER; // expected-error {{only applies to init methods of interface or class extension declarations}}
+@end
+
+@interface I1(cat)
+-(id)init2 NS_DESIGNATED_INITIALIZER; // expected-error {{only applies to init methods of interface or class extension declarations}}
+@end
+
+@interface I1()
+-(id)init3 NS_DESIGNATED_INITIALIZER;
+@end
+
+@implementation I1
+-(void)meth {}
+-(id)init NS_DESIGNATED_INITIALIZER { return 0; } // expected-error {{only applies to init methods of interface or class extension declarations}}
++(id)init { return 0; }
+-(id)init3 { return 0; }
+-(id)init4 NS_DESIGNATED_INITIALIZER { return 0; } // expected-error {{only applies to init methods of interface or class extension declarations}} \
+ // expected-warning {{convenience initializer missing a 'self' call to another initializer}}
+@end
+
+__attribute__((objc_root_class))
+@interface B1
+-(id)initB1 NS_DESIGNATED_INITIALIZER; // expected-note 6 {{method marked as designated initializer of the class here}}
+-(id)initB2;
+@end
+
+@interface B1()
+-(id)initB3 NS_DESIGNATED_INITIALIZER; // expected-note 4 {{method marked as designated initializer of the class here}}
+@end;
+
+@implementation B1
+-(id)initB1 { return 0; }
+-(id)initB2 { return 0; } // expected-warning {{convenience initializer missing a 'self' call to another initializer}}
+-(id)initB3 { return 0; }
+@end
+
+@interface S1 : B1
+-(id)initS1 NS_DESIGNATED_INITIALIZER; // expected-note {{method marked as designated initializer of the class here}}
+-(id)initS2 NS_DESIGNATED_INITIALIZER;
+-(id)initS3 NS_DESIGNATED_INITIALIZER; // expected-note 2 {{method marked as designated initializer of the class here}}
+-(id)initB1;
+@end
+
+@interface S1()
+-(id)initS4 NS_DESIGNATED_INITIALIZER; // expected-note 2 {{method marked as designated initializer of the class here}}
+@end
+
+@implementation S1
+-(id)initS1 { // expected-warning {{designated initializer missing a 'super' call to a designated initializer of the super class}}
+ return 0;
+}
+-(id)initS2 {
+ return [super initB1];
+}
+-(id)initS3 { // expected-warning {{designated initializer missing a 'super' call to a designated initializer of the super class}}
+ return [super initB2]; // expected-warning {{designated initializer invoked a non-designated initializer}}
+}
+-(id)initS4 { // expected-warning {{designated initializer missing a 'super' call to a designated initializer of the super class}}
+ return [self initB1]; // expected-warning {{designated initializer should only invoke a designated initializer on 'super'}}
+}
+-(id)initB1 {
+ return [self initS1];
+}
+-(id)initB3 {
+ return [self initS1];
+}
+@end
+
+@interface S2 : B1
+-(id)initB1;
+@end
+
+@interface SS2 : S2
+-(id)initSS1 NS_DESIGNATED_INITIALIZER;
+@end
+
+@implementation SS2 // expected-warning {{method override for the designated initializer of the superclass '-initB1' not found}} \
+ // expected-warning {{method override for the designated initializer of the superclass '-initB3' not found}}
+-(id)initSS1 {
+ return [super initB1];
+}
+@end
+
+@interface S3 : B1
+-(id)initS1 NS_DESIGNATED_INITIALIZER; // expected-note {{method marked as designated initializer of the class here}}
+@end
+
+@interface SS3 : S3
+-(id)initSS1 NS_DESIGNATED_INITIALIZER; // expected-note 2 {{method marked as designated initializer of the class here}}
+@end
+
+@implementation SS3 // expected-warning {{method override for the designated initializer of the superclass '-initS1' not found}}
+-(id)initSS1 { // expected-warning {{designated initializer missing a 'super' call to a designated initializer of the super class}}
+ return [super initB1]; // expected-warning {{designated initializer invoked a non-designated initializer}}
+}
+@end
+
+@interface S4 : B1
+-(id)initB1;
+-(id)initB3;
+@end
+
+@implementation S4
+-(id)initB1 { // expected-warning {{designated initializer missing a 'super' call to a designated initializer of the super class}}
+ return 0;
+}
+-(id)initB3 {
+ return [super initB3];
+}
+@end
+
+@interface S5 : B1
+-(void)meth;
+@end
+
+@implementation S5
+-(id)initB1 { // expected-warning {{designated initializer missing a 'super' call to a designated initializer of the super class}}
+ return 0;
+}
+-(id)initB3 {
+ [self initB1]; // expected-warning {{designated initializer should only invoke a designated initializer on 'super'}}
+ S5 *s;
+ [s initB1];
+ [self meth];
+ void (^blk)(void) = ^{
+ [self initB1]; // expected-warning {{designated initializer should only invoke a designated initializer on 'super'}}
+ };
+ return [super initB3];
+}
+-(void)meth {}
+@end
+
+@interface S6 : B1
+-(id)initS1 NS_DESIGNATED_INITIALIZER;
+-(id)initS2;
+-(id)initS3;
+-(id)initS4;
+@end
+
+@implementation S6 // expected-warning {{method override for the designated initializer of the superclass '-initB1' not found}} \
+ // expected-warning {{method override for the designated initializer of the superclass '-initB3' not found}}
+-(id)initS1 {
+ return [super initB1];
+}
+-(id)initS2 { // expected-warning {{convenience initializer missing a 'self' call to another initializer}}
+ return [super initB1]; // expected-warning {{convenience initializer should not invoke an initializer on 'super'}}
+}
+-(id)initS3 {
+ return [self initB1];
+}
+-(id)initS4 {
+ return [self initS1];
+}
+-(id)initS5 {
+ [super initB1]; // expected-warning {{convenience initializer should not invoke an initializer on 'super'}}
+ void (^blk)(void) = ^{
+ [super initB1]; // expected-warning {{convenience initializer should not invoke an initializer on 'super'}}
+ };
+ return [self initS1];
+}
+-(id)initS6 { // expected-warning {{convenience initializer missing a 'self' call to another initializer}}
+ S6 *s;
+ return [s initS1];
+}
+@end
+
+@interface SS4 : S4
+-(id)initB1;
+@end
+
+@implementation SS4
+-(id)initB1 { // expected-warning {{designated initializer missing a 'super' call to a designated initializer of the super class}}
+ return 0;
+}
+@end
+
+@interface S7 : B1
+-(id)initB1;
+-(id)initB3;
+-(id)initNewOne;
+@end
+
+@interface SS7 : S7
+-(id)initB1;
+@end
+
+@implementation SS7
+-(id)initB1 {
+ return 0;
+}
+@end
+
+__attribute__((objc_root_class))
+@interface B2
+-(id)init;
+@end
+
+@interface S8: B2
+-(id)initS8 NS_DESIGNATED_INITIALIZER;
+@end
+
+@implementation S8
+-(id)initS8
+{
+ return [super init];
+}
+@end
+
+@interface S9 : B1
+-(id)initB1;
+-(id)initB3;
+@end
+
+@interface S9(secondInit)
+-(id)initNewOne;
+@end
+
+@interface SS9 : S9
+-(id)initB1;
+@end
+
+@implementation SS9
+-(id)initB1 { // expected-warning {{designated initializer missing a 'super' call to a designated initializer of the super class}}
+ return 0;
+}
+@end
+
+// rdar://16261494
+@class GEOPDAnalyticMetadata; // expected-note {{forward declaration of class here}}
+
+@implementation GEOPDAnalyticMetadata (PlaceCardExtras) // expected-error {{cannot find interface declaration for 'GEOPDAnalyticMetadata'}}
+- (instancetype)initInProcess
+{
+ return ((void*)0);
+}
+@end
+
+// rdar://16305460
+__attribute__((objc_root_class))
+@interface MyObject
+- (instancetype)initWithStuff:(id)stuff __attribute__((objc_designated_initializer));
+- (instancetype)init __attribute__((unavailable));
+@end
+
+@implementation MyObject
+- (instancetype)init
+{
+ return ((void*)0);
+}
+@end
+
+// rdar://16323233
+__attribute__((objc_root_class))
+@interface B4
+-(id)initB4 NS_DESIGNATED_INITIALIZER; // expected-note 4 {{method marked as designated initializer of the class here}}
+-(id)initNonDI;
+@end
+
+@interface rdar16323233 : B4
+-(id)initS4 NS_DESIGNATED_INITIALIZER;
+@end
+
+@implementation rdar16323233
+-(id)initS4 {
+ static id sSharedObject = (void*)0;
+ (void)^(void) {
+ sSharedObject = [super initB4];
+ };
+ return 0;
+}
+-(id)initB4 {
+ return [self initS4];
+}
+@end
+
+@interface S1B4 : B4
+@end
+@implementation S1B4
+-(id)initB4 { // expected-warning {{designated initializer missing a 'super' call to a designated initializer of the super class}}
+ return [super initNonDI]; // expected-warning {{designated initializer invoked a non-designated initializer}}
+}
+@end
+
+@interface S2B4 : B4
+-(id)initB4;
+@end
+@implementation S2B4
+-(id)initB4 { // expected-warning {{designated initializer missing a 'super' call to a designated initializer of the super class}}
+ return [super initNonDI]; // expected-warning {{designated initializer invoked a non-designated initializer}}
+}
+@end
+
+@interface S3B4 : B4
+@end
+@implementation S3B4
+-(id)initNew {
+ return [super initB4];
+}
+-(id)initB4 {
+ return [self initNew];
+}
+@end
+
+@interface S4B4 : B4
+-(id)initNew;
+@end
+@implementation S4B4
+-(id)initNew {
+ return [super initB4];
+}
+-(id)initB4 {
+ return [self initNew];
+}
+@end
+
+@interface S5B4 : B4
+-(id)initB4;
+@end
+@implementation S5B4
+-(id)initNew {
+ return [super initB4];
+}
+-(id)initB4 {
+ return [self initNew];
+}
+@end
+
+@interface S6B4 : B4
+-(id)initNew;
+-(id)initB4;
+@end
+@implementation S6B4
+-(id)initNew {
+ return [super initB4];
+}
+-(id)initB4 {
+ return [self initNew];
+}
+@end
+
+__attribute__((objc_root_class))
+@interface NSObject
+-(instancetype) init NS_DESIGNATED_INITIALIZER; // expected-note {{method marked as designated initializer of the class here}}
+@end
+
+@interface Test3 : NSObject
+@end
+
+@implementation Test3
+-(instancetype) initWithBasePath:(id)path {
+ return [super init];
+}
+-(instancetype) init {
+ return [self initWithBasePath:0];
+}
+@end
+
+@interface Test1 : NSObject
+-(instancetype) init NS_DESIGNATED_INITIALIZER;
+@end
+@implementation Test1
+-(instancetype) init {
+ return self;
+}
+@end
+
+
+@interface Test2 : NSObject
+@end
+@interface SubTest2 : Test2
+@end
+@implementation SubTest2
+-(instancetype) init { // expected-warning {{designated initializer missing a 'super' call to a designated initializer of the super class}}
+ return self;
+}
+@end
+
+__attribute__((objc_root_class))
+@interface RootNoDI
+-(id)init;
+@end
+
+@interface Base : RootNoDI
+@end
+
+@implementation Base
+@end
+
+@interface Derived : Base
+- (instancetype)initWithInt:(int)n NS_DESIGNATED_INITIALIZER;
+@end
+
+@implementation Derived
+- (instancetype)initWithInt:(int)n
+{
+ return [super init];
+}
+@end
diff --git a/test/SemaObjC/attr-ns-bridged.m b/test/SemaObjC/attr-ns-bridged.m
deleted file mode 100644
index 1ab60a2b0d80..000000000000
--- a/test/SemaObjC/attr-ns-bridged.m
+++ /dev/null
@@ -1,15 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
-
-typedef struct __attribute__((ns_bridged)) test0s *test0ref;
-
-void test0func(void) __attribute__((ns_bridged)); // expected-error {{'ns_bridged' attribute only applies to structs}}
-
-union __attribute__((ns_bridged)) test0u; // expected-error {{'ns_bridged' attribute only applies to structs}}
-
-struct __attribute__((ns_bridged(Test1))) test1s;
-
-@class Test2;
-struct __attribute__((ns_bridged(Test2))) test2s;
-
-void Test3(void); // expected-note {{declared here}}
-struct __attribute__((ns_bridged(Test3))) test3s; // expected-error {{parameter of 'ns_bridged' attribute does not name an Objective-C class}}
diff --git a/test/SemaObjC/block-type-safety.m b/test/SemaObjC/block-type-safety.m
index 56342baae528..b2c4398dc3c5 100644
--- a/test/SemaObjC/block-type-safety.m
+++ b/test/SemaObjC/block-type-safety.m
@@ -23,6 +23,7 @@ void r1(Sub* (^f)()) { // expected-note{{passing argument to parameter 'f' here}
}
@protocol NSObject;
+@class NSObject;
void r2 (id<NSObject> (^f) (void)) {
id o = f();
@@ -155,3 +156,45 @@ void f() {
return NSOrderedSame;
}];
}
+
+// rdar://16739120
+@protocol P1 @end
+@protocol P2 @end
+
+void Test() {
+void (^aBlock)();
+id anId = aBlock; // OK
+
+id<P1,P2> anQualId = aBlock; // expected-error {{initializing 'id<P1,P2>' with an expression of incompatible type 'void (^)()'}}
+
+NSArray* anArray = aBlock; // expected-error {{initializing 'NSArray *' with an expression of incompatible type 'void (^)()'}}
+
+aBlock = anId; // OK
+
+id<P1,P2> anQualId1;
+aBlock = anQualId1; // expected-error {{assigning to 'void (^)()' from incompatible type 'id<P1,P2>'}}
+
+NSArray* anArray1;
+aBlock = anArray1; // expected-error {{assigning to 'void (^)()' from incompatible type 'NSArray *'}}
+}
+
+void Test2() {
+ void (^aBlock)();
+ id<NSObject> anQualId1 = aBlock; // Ok
+ id<NSObject, NSCopying> anQualId2 = aBlock; // Ok
+ id<NSObject, NSCopying, NSObject, NSCopying> anQualId3 = aBlock; // Ok
+ id <P1> anQualId4 = aBlock; // expected-error {{initializing 'id<P1>' with an expression of incompatible type 'void (^)()'}}
+ id<NSObject, P1, NSCopying> anQualId5 = aBlock; // expected-error {{initializing 'id<NSObject,P1,NSCopying>' with an expression of incompatible type 'void (^)()'}}
+ id<NSCopying> anQualId6 = aBlock; // Ok
+}
+
+void Test3() {
+ void (^aBlock)();
+ NSObject *NSO = aBlock; // Ok
+ NSObject<NSObject> *NSO1 = aBlock; // Ok
+ NSObject<NSObject, NSCopying> *NSO2 = aBlock; // Ok
+ NSObject<NSObject, NSCopying, NSObject, NSCopying> *NSO3 = aBlock; // Ok
+ NSObject <P1> *NSO4 = aBlock; // expected-error {{initializing 'NSObject<P1> *' with an expression of incompatible type 'void (^)()'}}
+ NSObject<NSObject, P1, NSCopying> *NSO5 = aBlock; // expected-error {{initializing 'NSObject<NSObject,P1,NSCopying> *' with an expression of incompatible type 'void (^)()'}}
+ NSObject<NSCopying> *NSO6 = aBlock; // Ok
+}
diff --git a/test/SemaObjC/builtin_objc_lib_functions.m b/test/SemaObjC/builtin_objc_lib_functions.m
index d8713ddfb416..2496bf2b1cf7 100644
--- a/test/SemaObjC/builtin_objc_lib_functions.m
+++ b/test/SemaObjC/builtin_objc_lib_functions.m
@@ -1,29 +1,29 @@
// RUN: %clang_cc1 -x objective-c %s -fsyntax-only -verify
// rdar://8592641
Class f0() { return objc_getClass("a"); } // expected-warning {{implicitly declaring library function 'objc_getClass' with type 'id (const char *)'}} \
- // expected-note {{please include the header <objc/runtime.h> or explicitly provide a declaration for 'objc_getClass'}}
+ // expected-note {{include the header <objc/runtime.h> or explicitly provide a declaration for 'objc_getClass'}}
// rdar://8735023
Class f1() { return objc_getMetaClass("a"); } // expected-warning {{implicitly declaring library function 'objc_getMetaClass' with type 'id (const char *)'}} \
- // expected-note {{please include the header <objc/runtime.h> or explicitly provide a declaration for 'objc_getMetaClass'}}
+ // expected-note {{include the header <objc/runtime.h> or explicitly provide a declaration for 'objc_getMetaClass'}}
void f2(id val) { objc_enumerationMutation(val); } // expected-warning {{implicitly declaring library function 'objc_enumerationMutation' with type 'void (id)'}} \
- // expected-note {{please include the header <objc/runtime.h> or explicitly provide a declaration for 'objc_enumerationMutation'}}
+ // expected-note {{include the header <objc/runtime.h> or explicitly provide a declaration for 'objc_enumerationMutation'}}
long double f3(id self, SEL op) { return objc_msgSend_fpret(self, op); } // expected-warning {{implicitly declaring library function 'objc_msgSend_fpret' with type 'long double (id, SEL, ...)'}} \
- // expected-note {{please include the header <objc/message.h> or explicitly provide a declaration for 'objc_msgSend_fpret'}}
+ // expected-note {{include the header <objc/message.h> or explicitly provide a declaration for 'objc_msgSend_fpret'}}
id f4(struct objc_super *super, SEL op) { // expected-warning {{declaration of 'struct objc_super' will not be visible outside of this function}}
return objc_msgSendSuper(super, op); // expected-warning {{implicitly declaring library function 'objc_msgSendSuper' with type 'id (struct objc_super *, SEL, ...)'}} \
- // expected-note {{please include the header <objc/message.h> or explicitly provide a declaration for 'objc_msgSendSuper'}}
+ // expected-note {{include the header <objc/message.h> or explicitly provide a declaration for 'objc_msgSendSuper'}}
}
id f5(id val, id *dest) {
return objc_assign_strongCast(val, dest); // expected-warning {{implicitly declaring library function 'objc_assign_strongCast' with type 'id (id, id *)'}} \
- // expected-note {{please include the header <objc/objc-auto.h> or explicitly provide a declaration for 'objc_assign_strongCast'}}
+ // expected-note {{include the header <objc/objc-auto.h> or explicitly provide a declaration for 'objc_assign_strongCast'}}
}
int f6(Class exceptionClass, id exception) {
return objc_exception_match(exceptionClass, exception); // expected-warning {{implicitly declaring library function 'objc_exception_match' with type 'int (id, id)'}} \
- // expected-note {{please include the header <objc/objc-exception.h> or explicitly provide a declaration for 'objc_exception_match'}}
+ // expected-note {{include the header <objc/objc-exception.h> or explicitly provide a declaration for 'objc_exception_match'}}
}
diff --git a/test/SemaObjC/builtin_objc_nslog.m b/test/SemaObjC/builtin_objc_nslog.m
index c940b16cdc3a..cc6f194c898d 100644
--- a/test/SemaObjC/builtin_objc_nslog.m
+++ b/test/SemaObjC/builtin_objc_nslog.m
@@ -4,10 +4,10 @@
void f1(id arg) {
NSLog(@"%@", arg); // expected-warning {{implicitly declaring library function 'NSLog' with type 'void (id, ...)'}} \
- // expected-note {{please include the header <Foundation/NSObjCRuntime.h> or explicitly provide a declaration for 'NSLog'}}
+ // expected-note {{include the header <Foundation/NSObjCRuntime.h> or explicitly provide a declaration for 'NSLog'}}
}
void f2(id str, va_list args) {
NSLogv(@"%@", args); // expected-warning {{implicitly declaring library function 'NSLogv' with type }} \
- // expected-note {{please include the header <Foundation/NSObjCRuntime.h> or explicitly provide a declaration for 'NSLogv'}}
+ // expected-note {{include the header <Foundation/NSObjCRuntime.h> or explicitly provide a declaration for 'NSLogv'}}
}
diff --git a/test/SemaObjC/category-1.m b/test/SemaObjC/category-1.m
index 18b872aa8b8a..89ac550578c5 100644
--- a/test/SemaObjC/category-1.m
+++ b/test/SemaObjC/category-1.m
@@ -2,7 +2,8 @@
@interface MyClass1 @end
-@protocol p1,p2,p3;
+@protocol p1,p2,p3; // expected-note {{protocol 'p1' has no definition}} \
+ // expected-note {{protocol 'p2' has no definition}}
@interface MyClass1 (Category1) <p1> // expected-warning {{cannot find protocol definition for 'p1'}} expected-note {{previous definition is here}}
@end
@@ -65,13 +66,13 @@
-(void) im0; // expected-note {{method 'im0' declared here}}
@end
-@interface MultipleCat_I @end // expected-note {{required for direct or indirect protocol 'MultipleCat_P'}}
+@interface MultipleCat_I @end
@interface MultipleCat_I() @end
@interface MultipleCat_I() <MultipleCat_P> @end
-@implementation MultipleCat_I // expected-warning {{method 'im0' in protocol not implemented}}
+@implementation MultipleCat_I // expected-warning {{method 'im0' in protocol 'MultipleCat_P' not implemented}}
@end
// <rdar://problem/7680391> - Handle nameless categories with no name that refer
diff --git a/test/SemaObjC/check-objcbridge-related-attribute-lookup.m b/test/SemaObjC/check-objcbridge-related-attribute-lookup.m
new file mode 100644
index 000000000000..39b66bc8e88f
--- /dev/null
+++ b/test/SemaObjC/check-objcbridge-related-attribute-lookup.m
@@ -0,0 +1,41 @@
+// RUN: %clang_cc1 -fsyntax-only -x objective-c -verify -Wno-objc-root-class %s
+// rdar://15499111
+
+typedef struct __attribute__((objc_bridge_related(NSColor,colorXWithCGColor:,CXGColor))) CGColor *CGColorRef; // expected-note 2 {{declared here}}
+
+typedef struct __attribute__((objc_bridge_related(XNSColor,colorWithCGColor:,CGColor))) CGColor1 *CGColorRef1; // expected-note 2 {{declared here}}
+
+typedef struct __attribute__((objc_bridge_related(PNsColor,colorWithCGColor:,CGColor))) CGColor2 *CGColorRef2; // expected-note 2 {{declared here}}
+
+@interface NSColor
++ (NSColor *)colorWithCGColor:(CGColorRef)cgColor;
+- (CGColorRef)CGColor;
+@end
+
+@interface NSTextField
+- (void)setBackgroundColor:(NSColor *)color;
+- (NSColor *)backgroundColor;
+@end
+
+typedef int PNsColor; // expected-note 2 {{declared here}}
+
+NSColor * Test1(NSTextField *textField, CGColorRef newColor) {
+ textField.backgroundColor = newColor; // expected-error {{'CGColorRef' (aka 'struct CGColor *') must be explicitly converted to 'NSColor *'; use '+colorXWithCGColor:' method for this conversion}} \
+ // expected-warning {{incompatible pointer types assigning to 'NSColor *' from 'CGColorRef' (aka 'struct CGColor *')}}
+ newColor = textField.backgroundColor; // expected-error {{'NSColor *' must be explicitly converted to 'CGColorRef' (aka 'struct CGColor *'); use '-CXGColor' method for this conversion}} \
+ // expected-warning {{incompatible pointer types assigning to 'CGColorRef' (aka 'struct CGColor *') from 'NSColor *'}}
+}
+NSColor * Test2(NSTextField *textField, CGColorRef1 newColor) {
+ textField.backgroundColor = newColor; // expected-error {{could not find Objective-C class 'XNSColor' to convert 'CGColorRef1' (aka 'struct CGColor1 *') to 'NSColor *'}} \
+ // expected-warning {{incompatible pointer types assigning to 'NSColor *' from 'CGColorRef1' (aka 'struct CGColor1 *')}}
+ newColor = textField.backgroundColor ; // expected-error {{could not find Objective-C class 'XNSColor' to convert 'NSColor *' to 'CGColorRef1' (aka 'struct CGColor1 *')}} \
+ // expected-warning {{incompatible pointer types assigning to 'CGColorRef1' (aka 'struct CGColor1 *') from 'NSColor *'}}
+}
+
+NSColor * Test3(NSTextField *textField, CGColorRef2 newColor) {
+ textField.backgroundColor = newColor; // expected-error {{'PNsColor' must be name of an Objective-C class to be able to convert 'CGColorRef2' (aka 'struct CGColor2 *') to 'NSColor *'}} \
+ // expected-warning {{incompatible pointer types assigning to 'NSColor *' from 'CGColorRef2' (aka 'struct CGColor2 *')}}
+ newColor = textField.backgroundColor; // expected-error {{'PNsColor' must be name of an Objective-C class to be able to convert 'NSColor *' to 'CGColorRef2' (aka 'struct CGColor2 *')}} \
+ // expected-warning {{incompatible pointer types assigning to 'CGColorRef2' (aka 'struct CGColor2 *') from 'NSColor *'}}
+}
+
diff --git a/test/SemaObjC/class-def-test-1.m b/test/SemaObjC/class-def-test-1.m
index 7931cc3fdce4..98a887ecab1f 100644
--- a/test/SemaObjC/class-def-test-1.m
+++ b/test/SemaObjC/class-def-test-1.m
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
-@protocol SUPER;
+@protocol SUPER; // expected-note {{protocol 'SUPER' has no definition}}
@interface SUPER <SUPER> @end // expected-warning {{cannot find protocol definition for 'SUPER'}}
diff --git a/test/SemaObjC/class-extension-dup-methods.m b/test/SemaObjC/class-extension-dup-methods.m
index 692ff8c68a0a..5f463aed168c 100644
--- a/test/SemaObjC/class-extension-dup-methods.m
+++ b/test/SemaObjC/class-extension-dup-methods.m
@@ -13,3 +13,16 @@
+ (int) InstMeth;
- (int) OK;
@end
+
+// rdar://16312105
+@class NSObject;
+
+__attribute__((objc_root_class)) @interface AppDelegate
++ (void)someMethodWithArgument:(NSObject *)argument;
++ (void)someMethodWithArgument:(NSObject *)argument : (NSObject*) argument2; // expected-note {{previous declaration is here}}
+@end
+
+@interface AppDelegate ()
+- (void)someMethodWithArgument:(float)argument; // OK. No warning to be issued here.
++ (void)someMethodWithArgument:(float)argument : (float)argument2; // expected-error {{duplicate declaration of method 'someMethodWithArgument::'}}
+@end
diff --git a/test/SemaObjC/class-property-access.m b/test/SemaObjC/class-property-access.m
index 735b51a3c432..d57b986c3eac 100644
--- a/test/SemaObjC/class-property-access.m
+++ b/test/SemaObjC/class-property-access.m
@@ -11,3 +11,46 @@ int main ()
return Test.one.two;
}
+// rdar://16650575
+__attribute__((objc_root_class))
+@interface RootClass {
+ Class isa;
+}
+
+@property int property;
+-(int)method;
+- (void) setMethod : (int)arg;
++(int)classMethod;
+@end
+
+@interface Subclass : RootClass @end
+void Test1() {
+ // now okay
+ (void)RootClass.property;
+ (void)Subclass.property;
+ (void)RootClass.method;
+ (void)Subclass.method;
+
+ RootClass.property = 1;
+ Subclass.property = 2;
+ RootClass.method = 3;
+ Subclass.method = 4;
+
+ // okay
+ (void)RootClass.classMethod;
+ (void)Subclass.classMethod;
+
+ // also okay
+ (void)[RootClass property];
+ (void)[Subclass property];
+ [RootClass method];
+ [Subclass method];
+ [RootClass classMethod];
+ [Subclass classMethod];
+
+ // also okay
+ [RootClass setProperty : 1];
+ [Subclass setProperty : 2];
+ [RootClass setMethod : 3];
+ [Subclass setMethod : 4];
+}
diff --git a/test/SemaObjC/class-proto-1.m b/test/SemaObjC/class-proto-1.m
index 02c40aab6599..51a899341e31 100644
--- a/test/SemaObjC/class-proto-1.m
+++ b/test/SemaObjC/class-proto-1.m
@@ -2,7 +2,8 @@
@interface INTF1 @end
-@protocol p1,p2,p3;
+@protocol p1,p2,p3; // expected-note {{protocol 'p2' has no definition}} \
+ // expected-note {{protocol 'p3' has no definition}}
@protocol p1;
@@ -34,3 +35,14 @@
@interface I4 : U2 <p1,p2>
@end
+
+// rdar://16111182
+@interface NSObject @end
+
+@protocol UndefinedParentProtocol; // expected-note {{protocol 'UndefinedParentProtocol' has no definition}}
+
+@protocol UndefinedProtocol <UndefinedParentProtocol>
+@end
+
+@interface SomeObject : NSObject <UndefinedProtocol> // expected-warning {{cannot find protocol definition for 'UndefinedProtocol'}}
+@end
diff --git a/test/SemaObjC/class-unavail-warning.m b/test/SemaObjC/class-unavail-warning.m
index b2bd38831101..3ebf3e7815f3 100644
--- a/test/SemaObjC/class-unavail-warning.m
+++ b/test/SemaObjC/class-unavail-warning.m
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -triple x86_64-apple-darwin10 -verify %s
// rdar://9092208
__attribute__((unavailable("not available")))
-@interface MyClass { // expected-note 8 {{declaration has been explicitly marked unavailable here}}
+@interface MyClass { // expected-note 8 {{'MyClass' has been explicitly marked unavailable here}}
@public
void *_test;
MyClass *ivar; // no error.
@@ -15,7 +15,7 @@ __attribute__((unavailable("not available")))
@end
-@interface Foo {
+@interface Gorf {
MyClass *ivar; // expected-error {{unavailable}}
}
- (MyClass *)meth; // expected-error {{unavailable}}
@@ -40,3 +40,30 @@ int main() {
return 0;
}
+
+// rdar://16681279
+@interface NSObject @end
+
+__attribute__((visibility("default"))) __attribute__((availability(macosx,unavailable)))
+@interface Foo : NSObject @end // expected-note 3 {{'Foo' has been explicitly marked unavailable here}}
+@interface AppDelegate : NSObject
+@end
+
+@class Foo;
+
+@implementation AppDelegate
+- (void) applicationDidFinishLaunching
+{
+ Foo *foo = 0; // expected-error {{'Foo' is unavailable}}
+}
+@end
+
+@class Foo;
+Foo *g_foo = 0; // expected-error {{'Foo' is unavailable}}
+
+@class Foo;
+@class Foo;
+@class Foo;
+Foo * f_func() { // expected-error {{'Foo' is unavailable}}
+ return 0;
+}
diff --git a/test/SemaObjC/cocoa.m b/test/SemaObjC/cocoa.m
deleted file mode 100644
index a8cfb72e1ea8..000000000000
--- a/test/SemaObjC/cocoa.m
+++ /dev/null
@@ -1,5 +0,0 @@
-// RUN: %clang -arch x86_64 %s -fsyntax-only -Xclang -print-stats
-#ifdef __APPLE__
-#include <Cocoa/Cocoa.h>
-#endif
-
diff --git a/test/SemaObjC/compare-qualified-class.m b/test/SemaObjC/compare-qualified-class.m
index 0f415b607dd7..60ef851e1f3f 100644
--- a/test/SemaObjC/compare-qualified-class.m
+++ b/test/SemaObjC/compare-qualified-class.m
@@ -25,6 +25,6 @@ int main () {
return classA == classB || classA == classC ||
classC == classA ||
- classA == classD; // expected-warning {{comparison of distinct pointer types ('Class<SomeProtocol> *' and 'Class<SomeProtocol1> *')}}
+ classA == classD; // expected-warning {{comparison of distinct pointer types ('Class<SomeProtocol>' and 'Class<SomeProtocol1>')}}
}
diff --git a/test/SemaObjC/compare-qualified-id.m b/test/SemaObjC/compare-qualified-id.m
index 02fa86ec8d9e..7da774957e58 100644
--- a/test/SemaObjC/compare-qualified-id.m
+++ b/test/SemaObjC/compare-qualified-id.m
@@ -15,7 +15,7 @@ typedef struct {} NSFastEnumerationState;
@interface NSMutableDictionary : NSDictionary - (void)removeObjectForKey:(id)aKey; @end // expected-note {{receiver is instance of class declared here}}
extern NSString * const NSTaskDidTerminateNotification;
-@interface XCPropertyExpansionContext : NSObject <NSCopying> { // expected-note {{required for direct or indirect protocol 'NSCopying'}}
+@interface XCPropertyExpansionContext : NSObject <NSCopying> {
NSMutableDictionary * _propNamesToPropValuesCache;
} @end
@@ -23,7 +23,7 @@ extern NSString * const NSTaskDidTerminateNotification;
- (NSString *)evaluateAsStringInContext:(XCPropertyExpansionContext *)context withNestingState:(const void *)state;
@end
-@implementation XCPropertyExpansionContext // expected-warning {{method 'copyWithZone:' in protocol not implemented}}
+@implementation XCPropertyExpansionContext // expected-warning {{method 'copyWithZone:' in protocol 'NSCopying' not implemented}}
- (NSString *)expandedValueForProperty:(NSString *)property {
id <XCPropertyValues> cachedValueNode = [_propNamesToPropValuesCache objectForKey:property]; // expected-warning {{method '-objectForKey:' not found (return type defaults to 'id')}}
if (cachedValueNode == ((void *)0)) { }
diff --git a/test/SemaObjC/comptypes-legal.m b/test/SemaObjC/comptypes-legal.m
index d83d559ee64c..05f18977cc4e 100644
--- a/test/SemaObjC/comptypes-legal.m
+++ b/test/SemaObjC/comptypes-legal.m
@@ -35,3 +35,20 @@ void foo(void)
// Since registerFunc: expects a Derived object as it's second argument, I don't know why this would be legal.
[Derived registerFunc: ExternFunc]; // expected-warning{{incompatible pointer types sending 'NSObject *(NSObject *, NSObject *)' to parameter of type 'FuncSignature *'}}
}
+
+// rdar://10751015
+@protocol NSCopying @end
+@interface I
+- (void) Meth : (id <NSCopying>)aKey; // expected-note {{passing argument to parameter 'aKey' here}}
+@end
+
+@class ForwarClass; // expected-note 3 {{conformance of forward class ForwarClass to protocol NSCopying can not be confirmed}}
+
+ForwarClass *Test10751015 (I* pi, ForwarClass *ns_forward) {
+
+ [pi Meth : ns_forward ]; // expected-warning {{sending 'ForwarClass *' to parameter of incompatible type 'id<NSCopying>'}}
+
+ id <NSCopying> id_ns = ns_forward; // expected-warning {{initializing 'id<NSCopying>' with an expression of incompatible type 'ForwarClass *'}}
+
+ return id_ns; // expected-warning {{returning 'id<NSCopying>' from a function with incompatible result type 'ForwarClass *'}}
+}
diff --git a/test/SemaObjC/conditional-expr.m b/test/SemaObjC/conditional-expr.m
index 049a095ce37c..d8862c584a0d 100644
--- a/test/SemaObjC/conditional-expr.m
+++ b/test/SemaObjC/conditional-expr.m
@@ -96,8 +96,8 @@ id f7(int a, id<P0> x, A* p) {
return a ? x : p;
}
-void f8(int a, A<P0> *x, A *y) {
- [ (a ? x : y ) intProp ];
+int f8(int a, A<P0> *x, A *y) {
+ return [ (a ? x : y ) intProp ];
}
void f9(int a, A<P0> *x, A<P1> *y) {
diff --git a/test/SemaObjC/continuation-class-property.m b/test/SemaObjC/continuation-class-property.m
index 2a8e5085fe7f..83aa796309f5 100644
--- a/test/SemaObjC/continuation-class-property.m
+++ b/test/SemaObjC/continuation-class-property.m
@@ -61,3 +61,15 @@ struct S1;
@property (nonatomic, readwrite, assign) struct S1 *httpRequest3;
@property (nonatomic, readwrite, assign) struct S2 *httpRequest4;
@end
+
+// rdar://15859862
+@protocol ADCameraJSO_Bindings
+@property (nonatomic, readonly) NSString *currentPictureURI;
+@end
+
+@interface ADCameraJSO
+@end
+
+@interface ADCameraJSO() <ADCameraJSO_Bindings>
+@property (nonatomic, copy) NSString *currentPictureURI;
+@end
diff --git a/test/SemaObjC/dealloc.m b/test/SemaObjC/dealloc.m
index 59218d2d0733..c1bd0b5ed463 100644
--- a/test/SemaObjC/dealloc.m
+++ b/test/SemaObjC/dealloc.m
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-arc -fblocks -verify %s
-// RUN: not %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-arc -fblocks -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-arc -fblocks -Wdealloc-in-category -verify %s
+// RUN: not %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-arc -fblocks -Wdealloc-in-category -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
// rdar://11987838
@protocol NSObject
@@ -23,3 +23,33 @@
@end
+// rdar://15397430
+@interface Base
+- (void)dealloc;
+@end
+
+@interface Subclass : Base
+@end
+
+@interface Subclass (CAT)
+- (void)dealloc;
+@end
+
+@implementation Subclass (CAT)
+- (void)dealloc { // expected-warning {{-dealloc is being overridden in a category}}
+}
+@end
+
+// rdar://15919775
+@interface NSObject @end
+@interface NSError:NSObject
+@end
+
+@interface NSError(CAT)
+- (NSError *)MCCopyAsPrimaryError __attribute__((objc_method_family(new)));
+@end
+@implementation NSError(CAT)
+- (NSError *)MCCopyAsPrimaryError {
+ return 0;
+}
+@end
diff --git a/test/SemaObjC/default-synthesize-3.m b/test/SemaObjC/default-synthesize-3.m
index 1c32665a2dd7..c91597462d91 100644
--- a/test/SemaObjC/default-synthesize-3.m
+++ b/test/SemaObjC/default-synthesize-3.m
@@ -37,7 +37,7 @@ __attribute ((objc_requires_property_definitions))
@interface Deep(CAT) // expected-error {{attributes may not be specified on a category}}
@end
-__attribute ((objc_requires_property_definitions)) // expected-error {{objc_requires_property_definitions attribute may only be specified on a class}}
+__attribute ((objc_requires_property_definitions)) // expected-error {{'objc_requires_property_definitions' attribute only applies to Objective-C interfaces}}
@protocol P @end
// rdar://13388503
@@ -172,12 +172,44 @@ typedef NSObject<Fooing> FooObject;
@interface Okay : NSObject<Fooing>
@end
-@implementation Okay // expected-warning 2 {{auto property synthesis will not synthesize property declared in a protocol}}
+@implementation Okay // expected-warning {{auto property synthesis will not synthesize property 'muahahaha' declared in protocol 'Fooing'}} expected-warning {{auto property synthesis will not synthesize property 'hoho' declared in protocol 'SubFooling'}}
@end
@interface Fail : FooObject
@end
-@implementation Fail // expected-warning 2 {{auto property synthesis will not synthesize property declared in a protocol}}
+@implementation Fail // expected-warning {{auto property synthesis will not synthesize property 'muahahaha' declared in protocol 'Fooing'}} expected-warning {{auto property synthesis will not synthesize property 'hoho' declared in protocol 'SubFooling'}}
@end
+// rdar://16089191
+@class NSURL;
+
+@interface Root
+- (void)setFileURL : (NSURL *) arg;
+- (void)setFile : (NSURL *) arg;
+- (NSURL *)fileSys;
+- (void)setFileSys : (NSURL *) arg;
+- (NSURL *)fileKerl;
+@end
+
+@interface SuperClass : Root
+- (NSURL *)fileURL;
+- (NSURL *)file;
+- (NSURL *)fileLog;
+- (void)setFileLog : (NSURL *) arg;
+- (void)setFileKerl : (NSURL *) arg;
+@end
+
+@protocol r16089191Protocol
+@property (readonly) NSURL *fileURL;
+@property (copy) NSURL *file;
+@property (copy) NSURL *fileSys;
+@property (copy) NSURL *fileLog;
+@property (copy) NSURL *fileKerl;
+@end
+
+@interface SubClass : SuperClass <r16089191Protocol>
+@end
+
+@implementation SubClass
+@end
diff --git a/test/SemaObjC/default-synthesize.m b/test/SemaObjC/default-synthesize.m
index dd16c1361d89..9356b9f5b3a3 100644
--- a/test/SemaObjC/default-synthesize.m
+++ b/test/SemaObjC/default-synthesize.m
@@ -136,5 +136,5 @@
@interface MyClass <MyProtocol>
@end
-@implementation MyClass // expected-warning {{auto property synthesis will not synthesize property declared in a protocol}}
+@implementation MyClass // expected-warning {{auto property synthesis will not synthesize property 'requiredString' declared in protocol 'MyProtocol'}}
@end
diff --git a/test/SemaObjC/deprecate_function_containers.m b/test/SemaObjC/deprecate_function_containers.m
new file mode 100644
index 000000000000..531cf11d2704
--- /dev/null
+++ b/test/SemaObjC/deprecate_function_containers.m
@@ -0,0 +1,37 @@
+// RUN: %clang_cc1 -fsyntax-only -fblocks -verify -Wno-objc-root-class %s
+// rdar://10414277
+
+@protocol P
+void p_foo() {} // expected-warning {{function definition inside an Objective-C container is deprecated}}
+@end
+
+@interface I
+void foo() {} // expected-warning {{function definition inside an Objective-C container is deprecated}}
+inline void v_foo() {} // expected-warning {{function definition inside an Objective-C container is deprecated}}
+static int s_foo() {return 0; } // expected-warning {{function definition inside an Objective-C container is deprecated}}
+static inline int si_val() { return 1; } // expected-warning {{function definition inside an Objective-C container is deprecated}}
+@end
+
+@interface I(CAT)
+void cat_foo() {} // expected-warning {{function definition inside an Objective-C container is deprecated}}
+@end
+
+@implementation I
+inline void v_imp_foo() {}
+@end
+
+@implementation I(CAT)
+void cat_imp_foo() {}
+@end
+
+// rdar://16859666
+@interface PrototypeState
+
+@property (strong, readwrite) id moin1; // expected-note {{property declared here}}
+
+static inline void prototype_observe_moin1(void (^callback)(id)) { // expected-warning {{function definition inside an Objective-C container is deprecated}}
+ (void)^(PrototypeState *prototypeState){
+ callback(prototypeState.moin1); // expected-error {{use of Objective-C property in function nested in Objective-C container not supported, move function outside its container}}
+ };
+}
+@end
diff --git a/test/SemaObjC/encode-typeof-test.m b/test/SemaObjC/encode-typeof-test.m
new file mode 100644
index 000000000000..2cda9739681b
--- /dev/null
+++ b/test/SemaObjC/encode-typeof-test.m
@@ -0,0 +1,26 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
+// rdar://16655340
+@protocol X, Y, Z;
+@class Foo;
+
+@protocol Proto
+@end
+
+@interface Intf <Proto>
+{
+id <X> IVAR_x;
+id <X, Y> IVAR_xy;
+id <X, Y, Z> IVAR_xyz;
+Foo <X, Y, Z> *IVAR_Fooxyz;
+Class <X> IVAR_Classx;
+}
+@end
+
+@implementation Intf
+@end
+
+int main()
+{
+ int i;
+ typeof(@encode(typeof(i))) e = @encode(typeof(Intf)); // expected-warning {{initializer-string for char array is too long}}
+}
diff --git a/test/SemaObjC/error-missing-getter.m b/test/SemaObjC/error-missing-getter.m
index 3dce858837aa..13dc8e5bb13f 100644
--- a/test/SemaObjC/error-missing-getter.m
+++ b/test/SemaObjC/error-missing-getter.m
@@ -27,7 +27,8 @@ int func2 (int arg) {
if (TestClass.setterOnly) { // expected-error {{no getter method for read from property}}
TestClass.setterOnly = 1;
}
- func(TestClass.setterOnly + 1, x); // expected-error {{no getter method for read from property}}
+ func(TestClass.setterOnly + 1, x); // expected-error {{no getter method for read from property}} \
+ // expected-error {{use of undeclared identifier 'x'}}
int i = TestClass.setterOnly + 1; // expected-error {{no getter method for read from property}}
return TestClass.setterOnly + 1; // expected-error {{no getter method for read from property}}
}
diff --git a/test/SemaObjC/format-arg-attribute.m b/test/SemaObjC/format-arg-attribute.m
index e770373a055b..79f5656decc0 100644
--- a/test/SemaObjC/format-arg-attribute.m
+++ b/test/SemaObjC/format-arg-attribute.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -Werror -Wformat-nonliteral -verify -fsyntax-only %s
+// RUN: %clang_cc1 -verify -fsyntax-only %s
@class NSString;
@@ -9,9 +9,9 @@ extern void fc1 (const NSString *) __attribute__((format_arg)); // expected-err
extern void fc2 (const NSString *) __attribute__((format_arg())); // expected-error {{'format_arg' attribute takes one argument}}
extern void fc3 (const NSString *) __attribute__((format_arg(1, 2))); // expected-error {{'format_arg' attribute takes one argument}}
-struct s1 { int i; } __attribute__((format_arg(1))); // expected-error {{'format_arg' attribute only applies to functions}}
-union u1 { int i; } __attribute__((format_arg(1))); // expected-error {{'format_arg' attribute only applies to functions}}
-enum e1 { E1V0 } __attribute__((format_arg(1))); // expected-error {{'format_arg' attribute only applies to functions}}
+struct s1 { int i; } __attribute__((format_arg(1))); // expected-warning {{'format_arg' attribute only applies to functions}}
+union u1 { int i; } __attribute__((format_arg(1))); // expected-warning {{'format_arg' attribute only applies to functions}}
+enum e1 { E1V0 } __attribute__((format_arg(1))); // expected-warning {{'format_arg' attribute only applies to functions}}
extern NSString *ff3 (const NSString *) __attribute__((format_arg(3-2)));
extern NSString *ff4 (const NSString *) __attribute__((format_arg(foo))); // expected-error {{use of undeclared identifier 'foo'}}
@@ -25,23 +25,3 @@ extern NSString *fi2 (NSString *) __attribute__((format_arg(1)));
extern int fi3 (const NSString *) __attribute__((format_arg(1))); // expected-error {{function does not return NSString}}
extern NSString *fi4 (const NSString *) __attribute__((format_arg(1)));
extern NSString *fi5 (const NSString *) __attribute__((format_arg(1)));
-
-// rdar://15242010
-@interface NSString
-+ (id)stringWithFormat:(NSString *)format, ... __attribute__((format(__NSString__, 1, 2)));
-@end
-
-@interface NSBundle
-- (NSString *)localizedStringForKey:(NSString *)key value:(NSString *)value table:(NSString *)tableName __attribute__ ((format_arg(1)));
-+ (NSBundle *)mainBundle;
-@end
-
-
-NSString* localizedFormat(NSString* string) __attribute__ ((format_arg(1)));
-
-int main()
-{
- [NSString stringWithFormat:[[NSBundle mainBundle] localizedStringForKey:@"foo %d" value:@"bar %d" table:0], 42];
-
- [NSString stringWithFormat:localizedFormat(@"foo %d"), 42];
-}
diff --git a/test/SemaObjC/format-strings-objc.m b/test/SemaObjC/format-strings-objc.m
index 2667e3047aae..49567a710c3a 100644
--- a/test/SemaObjC/format-strings-objc.m
+++ b/test/SemaObjC/format-strings-objc.m
@@ -116,6 +116,9 @@ NSString *test_literal_propagation(void) {
NSLog(ns2); // expected-warning {{more '%' conversions than data arguments}}
NSString * ns3 = ns1;
NSLog(ns3); // expected-warning {{format string is not a string literal}}}
+
+ NSString * const ns6 = @"split" " string " @"%s"; // expected-note {{format string is defined here}}
+ NSLog(ns6); // expected-warning {{more '%' conversions than data arguments}}
}
// Do not emit warnings when using NSLocalizedString
diff --git a/test/SemaObjC/forward-protocol-incomplete-impl-warn.m b/test/SemaObjC/forward-protocol-incomplete-impl-warn.m
index c3efeba4f9ec..c235e32316a9 100644
--- a/test/SemaObjC/forward-protocol-incomplete-impl-warn.m
+++ b/test/SemaObjC/forward-protocol-incomplete-impl-warn.m
@@ -12,9 +12,9 @@
@protocol DVTInvalidation;
-@interface IBImageCatalogDocument : NSObject <DVTInvalidation> // expected-note {{required for direct or indirect protocol 'DVTInvalidation'}}
+@interface IBImageCatalogDocument : NSObject <DVTInvalidation>
@end
-@implementation IBImageCatalogDocument // expected-warning {{auto property synthesis will not synthesize property declared in a protocol}} \
- // expected-warning {{method 'invalidate' in protocol not implemented}}
+@implementation IBImageCatalogDocument // expected-warning {{auto property synthesis will not synthesize property 'Prop' declared in protocol 'DVTInvalidation'}} \
+ // expected-warning {{method 'invalidate' in protocol 'DVTInvalidation' not implemented}}
@end
diff --git a/test/SemaObjC/ibaction.m b/test/SemaObjC/ibaction.m
index 9c59d7aaec5b..43c927ce264f 100644
--- a/test/SemaObjC/ibaction.m
+++ b/test/SemaObjC/ibaction.m
@@ -4,12 +4,12 @@
{
__attribute__((iboutlet)) id myoutlet;
}
-+ (void) __attribute__((ibaction)) myClassMethod:(id)msg; // expected-warning{{ibaction attribute can only be applied to Objective-C instance methods}}
++ (void) __attribute__((ibaction)) myClassMethod:(id)msg; // expected-warning{{'ibaction' attribute only applies to Objective-C instance methods}}
- (void) __attribute__((ibaction)) myMessage:(id)msg;
@end
@implementation Foo
-+ (void) __attribute__((ibaction)) myClassMethod:(id)msg {} // expected-warning{{ibaction attribute can only be applied to Objective-C instance methods}}
++ (void) __attribute__((ibaction)) myClassMethod:(id)msg {} // expected-warning{{'ibaction' attribute only applies to Objective-C instance methods}}
// Normally attributes should not be attached to method definitions, but
// we allow 'ibaction' to be attached because it can be expanded from
// the IBAction macro.
diff --git a/test/SemaObjC/iboutlet.m b/test/SemaObjC/iboutlet.m
index 3c7f9581e663..63eac9af8a52 100644
--- a/test/SemaObjC/iboutlet.m
+++ b/test/SemaObjC/iboutlet.m
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -Wno-objc-root-class -verify %s
-// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -Wno-objc-root-class -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fobjc-arc -Wno-objc-root-class -Wreceiver-is-weak -Warc-repeated-use-of-weak -fobjc-runtime-has-weak -verify %s
+// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -fobjc-arc -Wno-objc-root-class -Wreceiver-is-weak -Warc-repeated-use-of-weak -fobjc-runtime-has-weak -verify %s
// rdar://11448209
#define READONLY readonly
@@ -40,3 +40,15 @@
@implementation RKTFHView
@synthesize synthReadOnlyReadWrite=_synthReadOnlyReadWrite;
@end
+
+// rdar://15885642
+@interface WeakOutlet
+@property IBOutlet __weak WeakOutlet* WeakProp;
+@end
+
+WeakOutlet* func() {
+ __weak WeakOutlet* pwi;
+ pwi.WeakProp = (WeakOutlet*)0;
+ pwi.WeakProp = pwi.WeakProp;
+ return pwi.WeakProp;
+}
diff --git a/test/SemaObjC/incomplete-implementation.m b/test/SemaObjC/incomplete-implementation.m
index 4b8d600cb8b4..74dea2aa86b9 100644
--- a/test/SemaObjC/incomplete-implementation.m
+++ b/test/SemaObjC/incomplete-implementation.m
@@ -39,3 +39,29 @@ __attribute__((visibility("default")))
@end
+// rdar://15580969
+typedef char BOOL;
+
+@protocol NSObject
+- (BOOL)isEqual:(id)object;
+@end
+
+@interface NSObject <NSObject>
+@end
+
+@protocol NSApplicationDelegate <NSObject>
+- (void)ImpleThisMethod; // expected-note {{method 'ImpleThisMethod' declared here}}
+@end
+
+@interface AppDelegate : NSObject <NSApplicationDelegate>
+@end
+
+@implementation AppDelegate (MRRCategory)
+
+- (BOOL)isEqual:(id)object
+{
+ return __objc_no;
+}
+
+- (void)ImpleThisMethod {} // expected-warning {{category is implementing a method which will also be implemented by its primary class}}
+@end
diff --git a/test/SemaObjC/ivar-lookup-resolution-builtin.m b/test/SemaObjC/ivar-lookup-resolution-builtin.m
index dd11b51459d7..94ed3256e8df 100644
--- a/test/SemaObjC/ivar-lookup-resolution-builtin.m
+++ b/test/SemaObjC/ivar-lookup-resolution-builtin.m
@@ -29,7 +29,7 @@
- (int) InstMethod
{
return index; // expected-warning {{implicitly declaring library function 'index'}} \
- // expected-note {{please include the header <strings.h> or explicitly provide a declaration for 'index'}} \
+ // expected-note {{include the header <strings.h> or explicitly provide a declaration for 'index'}} \
// expected-warning {{incompatible pointer to integer conversion returning}}
}
+ (int) ClassMethod
diff --git a/test/SemaObjC/method-attributes.m b/test/SemaObjC/method-attributes.m
index b402d52a42a1..1b0a900da81d 100644
--- a/test/SemaObjC/method-attributes.m
+++ b/test/SemaObjC/method-attributes.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -fsyntax-only -Wno-objc-root-class %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -verify -fsyntax-only -Wno-objc-root-class %s
@class NSString;
@@ -7,26 +7,28 @@
- (NSString *)stringByAppendingFormat:(NSString *)format, ... __attribute__((format(__NSString__, 1, 2)));
-(void) m0 __attribute__((noreturn));
-(void) m1 __attribute__((unused));
+-(void) m2 __attribute__((stdcall));
+-(void) m3 __attribute__((optnone));
@end
@interface INTF
- (int) foo1: (int)arg1 __attribute__((deprecated));
-- (int) foo: (int)arg1; // expected-note {{method 'foo:' declared here}}
+- (int) foo: (int)arg1;
-- (int) foo2: (int)arg1 __attribute__((deprecated)) __attribute__((unavailable)); // expected-note {{method 'foo2:' declared here}}
+- (int) foo2: (int)arg1 __attribute__((deprecated)) __attribute__((unavailable));
- (int) foo3: (int)arg1 __attribute__((deprecated)) __attribute__((unavailable)) __attribute__((ns_consumes_self));
@end
@implementation INTF
-- (int) foo: (int)arg1 __attribute__((deprecated)){ // expected-warning {{attributes on method implementation and its declaration must match}}
+- (int) foo: (int)arg1 __attribute__((deprecated)){
return 10;
}
- (int) foo1: (int)arg1 {
return 10;
}
-- (int) foo2: (int)arg1 __attribute__((deprecated)) { // expected-warning {{attributes on method implementation and its declaration must match}}
+- (int) foo2: (int)arg1 __attribute__((deprecated)) {
return 10;
}
- (int) foo3: (int)arg1 __attribute__((deprecated)) __attribute__((unavailable)) __attribute__((ns_consumes_self)) {return 0; }
@@ -39,7 +41,7 @@
@interface Foo
- (void)doSomething1:(id)sender;
-- (void)doSomething2:(id)sender; // expected-note {{method 'doSomething2:' declared here}}
+- (void)doSomething2:(id)sender;
@end
@implementation Foo
@@ -52,7 +54,7 @@
@end
@implementation Bar
- (IBAction)doSomething1:(id)sender {}
-- (IBAction)doSomething2:(id)sender {} // expected-warning {{attributes on method implementation and its declaration must match}}
+- (IBAction)doSomething2:(id)sender {}
- (IBAction)doSomething3:(id)sender {}
@end
@@ -63,7 +65,7 @@
-(id)method __attribute__((deprecated));
-(id)method1;
-(id)method2 __attribute__((aligned(16)));
-- (id) method3: (int)arg1 __attribute__((aligned(16))) __attribute__((deprecated)) __attribute__((unavailable)); // expected-note {{method 'method3:' declared here}}
+- (id) method3: (int)arg1 __attribute__((aligned(16))) __attribute__((deprecated)) __attribute__((unavailable));
- (id) method4: (int)arg1 __attribute__((aligned(16))) __attribute__((deprecated)) __attribute__((unavailable));
@end
@@ -77,10 +79,23 @@
-(id)method2 {
return self;
}
-- (id) method3: (int)arg1 __attribute__((deprecated)) __attribute__((unavailable)) { // expected-warning {{attributes on method implementation and its declaration must match}}
+- (id) method3: (int)arg1 __attribute__((deprecated)) __attribute__((unavailable)) {
return self;
}
- (id) method4: (int)arg1 __attribute__((aligned(16))) __attribute__((deprecated)) __attribute__((unavailable)) {
return self;
}
@end
+
+__attribute__((cdecl)) // expected-warning {{'cdecl' attribute only applies to functions and methods}}
+@interface Complain
+@end
+
+// rdar://15450637
+@interface rdar15450637 : NSObject
+@property int p __attribute__((section("__TEXT,foo")));
+
+- (id) IMethod :(int) count, ... __attribute__((section("__TEXT,foo")));
+
++ (void) CMethod : (id) Obj __attribute__((section("__TEXT,fee")));
+@end
diff --git a/test/SemaObjC/method-sentinel-attr.m b/test/SemaObjC/method-sentinel-attr.m
index d230be5805be..82ee373c2fef 100644
--- a/test/SemaObjC/method-sentinel-attr.m
+++ b/test/SemaObjC/method-sentinel-attr.m
@@ -13,7 +13,7 @@
- (void) foo8 : (int)x, ... __attribute__ ((__sentinel__("a"))); // expected-error {{'__sentinel__' attribute requires parameter 1 to be an integer constant}}
- (void) foo9 : (int)x, ... __attribute__ ((__sentinel__(-1))); // expected-error {{'sentinel' parameter 1 less than zero}}
- (void) foo10 : (int)x, ... __attribute__ ((__sentinel__(1,1)));
-- (void) foo11 : (int)x, ... __attribute__ ((__sentinel__(1,1,3))); // expected-error {{attribute takes no more than 2 arguments}}
+- (void) foo11 : (int)x, ... __attribute__ ((__sentinel__(1,1,3))); // expected-error {{'__sentinel__' attribute takes no more than 2 arguments}}
- (void) foo12 : (int)x, ... ATTR; // expected-note {{method has been explicitly marked sentinel here}}
// rdar://7975788
diff --git a/test/SemaObjC/method-undef-category-warn-1.m b/test/SemaObjC/method-undef-category-warn-1.m
index 98d732babb93..c951db2ca1a3 100644
--- a/test/SemaObjC/method-undef-category-warn-1.m
+++ b/test/SemaObjC/method-undef-category-warn-1.m
@@ -8,20 +8,20 @@
- (void) Pmeth1; // expected-note {{method 'Pmeth1' declared here}}
@end
-@interface MyClass1(CAT) <P> // expected-note {{required for direct or indirect protocol 'P'}}
+@interface MyClass1(CAT) <P>
- (void) meth2; // expected-note {{method 'meth2' declared here}}
@end
-@implementation MyClass1(CAT) // expected-warning {{method 'Pmeth' in protocol not implemented}} \
+@implementation MyClass1(CAT) // expected-warning {{method 'Pmeth' in protocol 'P' not implemented}} \
// expected-warning {{method definition for 'meth2' not found}}
- (void) Pmeth1{}
@end
-@interface MyClass1(DOG) <P> // expected-note {{required for direct or indirect protocol 'P'}}
+@interface MyClass1(DOG) <P>
- (void)ppp; // expected-note {{method 'ppp' declared here}}
@end
-@implementation MyClass1(DOG) // expected-warning {{method 'Pmeth1' in protocol not implemented}} \
+@implementation MyClass1(DOG) // expected-warning {{method 'Pmeth1' in protocol 'P' not implemented}} \
// expected-warning {{method definition for 'ppp' not found}}
- (void) Pmeth {}
@end
diff --git a/test/SemaObjC/method-undef-extension-warn-1.m b/test/SemaObjC/method-undef-extension-warn-1.m
index fbc21bd39f6a..819d6ed86ff3 100644
--- a/test/SemaObjC/method-undef-extension-warn-1.m
+++ b/test/SemaObjC/method-undef-extension-warn-1.m
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
-@interface MyClass // expected-note {{required for direct or indirect protocol 'P'}}
+@interface MyClass
@end
@protocol P
@@ -18,7 +18,7 @@
- (void)categoryMethod;
@end
-@implementation MyClass // expected-warning {{method 'Pmeth1' in protocol not implemented}} \
+@implementation MyClass // expected-warning {{method 'Pmeth1' in protocol 'P' not implemented}} \
// expected-warning {{method definition for 'meth2' not found}}
- (void)Pmeth {}
@end
diff --git a/test/SemaObjC/nonnull.m b/test/SemaObjC/nonnull.m
index 902105b924dd..a345eddbf1e4 100644
--- a/test/SemaObjC/nonnull.m
+++ b/test/SemaObjC/nonnull.m
@@ -74,6 +74,9 @@ void func6(dispatch_object_t _head) {
@interface NSObject
- (void)doSomethingWithNonNullPointer:(void *)ptr :(int)iarg : (void*)ptr1 __attribute__((nonnull(1, 3)));
+ (void)doSomethingClassyWithNonNullPointer:(void *)ptr __attribute__((nonnull(1)));
+- (void*)returnsCNonNull __attribute__((returns_nonnull)); // no-warning
+- (id)returnsObjCNonNull __attribute__((returns_nonnull)); // no-warning
+- (int)returnsIntNonNull __attribute__((returns_nonnull)); // expected-warning {{'returns_nonnull' attribute only applies to return values that are pointers}}
@end
extern void DoSomethingNotNull(void *db) __attribute__((nonnull(1)));
@@ -82,6 +85,7 @@ extern void DoSomethingNotNull(void *db) __attribute__((nonnull(1)));
{
void * vp;
}
+- (void*) testRetNull __attribute__((returns_nonnull));
@end
@implementation IMP
@@ -93,5 +97,29 @@ extern void DoSomethingNotNull(void *db) __attribute__((nonnull(1)));
DoSomethingNotNull(NULL); // expected-warning {{null passed to a callee which requires a non-null argument}}
[object doSomethingWithNonNullPointer:vp:1:vp];
}
+- (void*) testRetNull {
+ return 0; // expected-warning {{null returned from method that requires a non-null return value}}
+}
+@end
+
+__attribute__((objc_root_class))
+@interface TestNonNullParameters
+- (void) doNotPassNullParameterNonPointerArg:(int)__attribute__((nonnull))x; // expected-warning {{'nonnull' attribute only applies to pointer arguments}}
+- (void) doNotPassNullParameter:(id)__attribute__((nonnull))x;
+- (void) doNotPassNullParameterArgIndex:(id)__attribute__((nonnull(1)))x; // expected-warning {{'nonnull' attribute when used on parameters takes no arguments}}
+- (void) doNotPassNullOnMethod:(id)x __attribute__((nonnull(1)));
@end
+void test(TestNonNullParameters *f) {
+ [f doNotPassNullParameter:0]; // expected-warning {{null passed to a callee which requires a non-null argument}}
+ [f doNotPassNullParameterArgIndex:0]; // no-warning
+ [f doNotPassNullOnMethod:0]; // expected-warning {{null passed to a callee which requires a non-null argument}}
+}
+
+
+void PR18795(int (^g)(const char *h, ...) __attribute__((nonnull(1))) __attribute__((nonnull))) {
+ g(0); // expected-warning{{null passed to a callee which requires a non-null argument}}
+}
+void PR18795_helper() {
+ PR18795(0); // expected-warning{{null passed to a callee which requires a non-null argument}}
+}
diff --git a/test/SemaObjC/ns_returns_retained_block_return.m b/test/SemaObjC/ns_returns_retained_block_return.m
new file mode 100644
index 000000000000..e5a96ca8af18
--- /dev/null
+++ b/test/SemaObjC/ns_returns_retained_block_return.m
@@ -0,0 +1,22 @@
+// RUN: %clang_cc1 -fblocks -fsyntax-only -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -x objective-c++ -fblocks -fsyntax-only -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -fblocks -fobjc-arc -fsyntax-only -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -x objective-c++ -fblocks -fobjc-arc -fsyntax-only -verify -Wno-objc-root-class %s
+// expected-no-diagnostics
+// rdar://17259812
+
+typedef void (^BT) ();
+
+BT foo() __attribute__((ns_returns_retained));
+
+@interface I
+BT foo() __attribute__((ns_returns_retained));
+- (BT) Meth __attribute__((ns_returns_retained));
++ (BT) ClsMeth __attribute__((ns_returns_retained));
+@end
+
+@implementation I
+BT foo() __attribute__((ns_returns_retained)) {return ^{}; }
+- (BT) Meth {return ^{}; }
++ (BT) ClsMeth {return ^{}; }
+@end
diff --git a/test/SemaObjC/nsobject-attribute.m b/test/SemaObjC/nsobject-attribute.m
index ead222c3310b..6bd2d5dabc4b 100644
--- a/test/SemaObjC/nsobject-attribute.m
+++ b/test/SemaObjC/nsobject-attribute.m
@@ -6,7 +6,7 @@ typedef struct CGColor * __attribute__((NSObject(12))) Illegal; // expected-err
static int count;
static CGColorRef tmp = 0;
-typedef struct S1 __attribute__ ((NSObject)) CGColorRef1; // expected-error {{__attribute ((NSObject)) is for pointer types only}}
+typedef struct S1 __attribute__ ((NSObject)) CGColorRef1; // expected-error {{'NSObject' attribute is for pointer types only}}
typedef void * __attribute__ ((NSObject)) CGColorRef2; // no-warning
typedef void * CFTypeRef;
@@ -48,18 +48,18 @@ int main(int argc, char *argv[]) {
// rdar://10453342
@interface I
{
- __attribute__((NSObject)) void * color; // expected-warning {{__attribute ((NSObject)) may be put on a typedef only, attribute is ignored}}
+ __attribute__((NSObject)) void * color; // expected-warning {{'NSObject' attribute may be put on a typedef only; attribute is ignored}}
}
// <rdar://problem/10930507>
@property (nonatomic, retain) __attribute__((NSObject)) CGColorRefNoNSObject color; // // no-warning
@end
void test_10453342() {
- char* __attribute__((NSObject)) string2 = 0; // expected-warning {{__attribute ((NSObject)) may be put on a typedef only, attribute is ignored}}
+ char* __attribute__((NSObject)) string2 = 0; // expected-warning {{'NSObject' attribute may be put on a typedef only; attribute is ignored}}
}
// rdar://11569860
@interface A { int i; }
-@property(retain) __attribute__((NSObject)) int i; // expected-error {{__attribute ((NSObject)) is for pointer types only}} \
+@property(retain) __attribute__((NSObject)) int i; // expected-error {{'NSObject' attribute is for pointer types only}} \
// expected-error {{property with 'retain (or strong)' attribute must be of object type}}
@end
diff --git a/test/SemaObjC/objc-asm-attribute-neg-test.m b/test/SemaObjC/objc-asm-attribute-neg-test.m
new file mode 100644
index 000000000000..2fb6643adde4
--- /dev/null
+++ b/test/SemaObjC/objc-asm-attribute-neg-test.m
@@ -0,0 +1,42 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
+// rdar://16462586
+
+__attribute__((objc_runtime_name)) // expected-error {{'objc_runtime_name' attribute takes one argument}}
+@interface BInterface
+@end
+
+__attribute__((objc_runtime_name(123))) // expected-error {{'objc_runtime_name' attribute requires a string}}
+@protocol BProtocol1
+@end
+
+__attribute__((objc_runtime_name("MySecretNamespace.Protocol")))
+@protocol Protocol
+@end
+
+__attribute__((objc_runtime_name("MySecretNamespace.Message")))
+@interface Message <Protocol> {
+__attribute__((objc_runtime_name("MySecretNamespace.Message"))) // expected-error {{'objc_runtime_name' attribute only applies to interface or protocol declarations}}
+ id MyIVAR;
+}
+__attribute__((objc_runtime_name("MySecretNamespace.Message")))
+@property int MyProperty; // expected-error {{prefix attribute must be followed by an interface or protocol}}}}
+
+- (int) getMyProperty __attribute__((objc_runtime_name("MySecretNamespace.Message"))); // expected-error {{'objc_runtime_name' attribute only applies to interface or protocol declarations}}
+
+- (void) setMyProperty : (int) arg __attribute__((objc_runtime_name("MySecretNamespace.Message"))); // expected-error {{'objc_runtime_name' attribute only applies to interface or protocol declarations}}
+
+@end
+
+__attribute__((objc_runtime_name("MySecretNamespace.ForwardClass")))
+@class ForwardClass; // expected-error {{prefix attribute must be followed by an interface or protocol}}
+
+__attribute__((objc_runtime_name("MySecretNamespace.ForwardProtocol")))
+@protocol ForwardProtocol;
+
+__attribute__((objc_runtime_name("MySecretNamespace.Message")))
+@implementation Message // expected-error {{prefix attribute must be followed by an interface or protocol}}
+__attribute__((objc_runtime_name("MySecretNamespace.Message")))
+- (id) MyMethod {
+ return MyIVAR;
+}
+@end
diff --git a/test/SemaObjC/objc-container-subscripting-attr.m b/test/SemaObjC/objc-container-subscripting-attr.m
new file mode 100644
index 000000000000..17110c47576e
--- /dev/null
+++ b/test/SemaObjC/objc-container-subscripting-attr.m
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
+// rdar://16842487
+// pr19682
+
+@interface Subscriptable
+- (id)objectForKeyedSubscript:(id)sub __attribute__((unavailable)); // expected-note 2 {{'objectForKeyedSubscript:' has been explicitly marked unavailable here}}
+- (void)setObject:(id)object forKeyedSubscript:(id)key __attribute__((unavailable)); // expected-note {{'setObject:forKeyedSubscript:' has been explicitly marked unavailable here}}
+@end
+
+id test(Subscriptable *obj) {
+ obj[obj] = obj; // expected-error {{'setObject:forKeyedSubscript:' is unavailable}}
+ return obj[obj]; // expected-error {{'objectForKeyedSubscript:' is unavailable}}
+}
+
+id control(Subscriptable *obj) {
+ return [obj objectForKeyedSubscript:obj]; // expected-error {{'objectForKeyedSubscript:' is unavailable}}
+}
+
diff --git a/test/SemaObjC/objc-literal-nsnumber.m b/test/SemaObjC/objc-literal-nsnumber.m
index 26bca189d1f6..a2d37282b716 100644
--- a/test/SemaObjC/objc-literal-nsnumber.m
+++ b/test/SemaObjC/objc-literal-nsnumber.m
@@ -1,10 +1,12 @@
-// RUN: %clang_cc1 -fsyntax-only -fblocks -verify %s
+// RUN: %clang_cc1 -fsyntax-only -fblocks -triple x86_64-apple-darwin10 -verify %s
// rdar://10111397
#if __LP64__
typedef unsigned long NSUInteger;
+typedef long NSInteger;
#else
typedef unsigned int NSUInteger;
+typedef int NSInteger;
#endif
@interface NSObject
@@ -13,10 +15,23 @@ typedef unsigned int NSUInteger;
@interface NSNumber : NSObject
+ (NSNumber *)numberWithChar:(char)value;
++ (NSNumber *)numberWithUnsignedChar:(unsigned char)value;
++ (NSNumber *)numberWithShort:(short)value;
++ (NSNumber *)numberWithUnsignedShort:(unsigned short)value;
+ (NSNumber *)numberWithInt:(int)value;
++ (NSNumber *)numberWithUnsignedInt:(unsigned int)value;
++ (NSNumber *)numberWithLong:(long)value;
++ (NSNumber *)numberWithUnsignedLong:(unsigned long)value;
++ (NSNumber *)numberWithLongLong:(long long)value;
++ (NSNumber *)numberWithUnsignedLongLong:(unsigned long long)value;
+ (NSNumber *)numberWithFloat:(float)value;
++ (NSNumber *)numberWithInteger:(NSInteger)value ;
++ (NSNumber *)numberWithUnsignedInteger:(NSUInteger)value ;
@end
+// rdar://16417427
+int big = 1391126400;
+int thousand = 1000;
int main() {
NSNumber * N = @3.1415926535; // expected-error {{declaration of 'numberWithDouble:' is missing in NSNumber class}}
NSNumber *noNumber = @__objc_yes; // expected-error {{declaration of 'numberWithBool:' is missing in NSNumber class}}
@@ -32,6 +47,9 @@ int main() {
int five = 5;
@-five; // expected-error{{@- must be followed by a number to form an NSNumber object}}
@+five; // expected-error{{@+ must be followed by a number to form an NSNumber object}}
+ NSNumber *av = @(1391126400000);
+ NSNumber *bv = @(1391126400 * 1000); // expected-warning {{overflow in expression; result is -443003904 with type 'int'}}
+ NSNumber *cv = @(big * thousand);
}
// Dictionary test
diff --git a/test/SemaObjC/objc-mixed-bridge-attribute.m b/test/SemaObjC/objc-mixed-bridge-attribute.m
new file mode 100644
index 000000000000..83fb4d3cc497
--- /dev/null
+++ b/test/SemaObjC/objc-mixed-bridge-attribute.m
@@ -0,0 +1,51 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
+// expected-no-diagnostics
+// rdar://17238954
+
+typedef const struct __attribute__((objc_bridge(NSAttributedString))) __CFAttributedString *CFAttributedStringRef;
+
+typedef struct __attribute__((objc_bridge_mutable(NSMutableAttributedString))) __CFAttributedString *CFMutableAttributedStringRef;
+
+@interface NSAttributedString
+@end
+
+@interface NSMutableAttributedString
+@end
+
+struct __CFAttributedString {
+};
+
+void Test1(CFAttributedStringRef attrStr, CFMutableAttributedStringRef mutable_attrStr)
+{
+ id x = (NSAttributedString *) attrStr;
+ id x1 =(NSAttributedString *) mutable_attrStr;
+ id x2 = (NSMutableAttributedString *) attrStr;
+ id x3 = (NSMutableAttributedString *) mutable_attrStr;
+}
+
+void Test2(NSAttributedString *ns_attrStr, NSMutableAttributedString *ns_mutable_attr_Str) {
+ CFAttributedStringRef cfsr = (CFAttributedStringRef) ns_attrStr;
+ CFMutableAttributedStringRef cfsr1 = (CFMutableAttributedStringRef) ns_attrStr;
+ CFAttributedStringRef cfsr2 = (CFAttributedStringRef) ns_mutable_attr_Str;
+ CFMutableAttributedStringRef cfsr3 = (CFMutableAttributedStringRef) ns_mutable_attr_Str;
+}
+
+// Tests with no definition declaration for struct __NDCFAttributedString.
+typedef const struct __attribute__((objc_bridge(NSAttributedString))) __NDCFAttributedString *NDCFAttributedStringRef;
+
+typedef struct __attribute__((objc_bridge_mutable(NSMutableAttributedString))) __NDCFAttributedString *NDCFMutableAttributedStringRef;
+
+void Test3(NDCFAttributedStringRef attrStr, NDCFMutableAttributedStringRef mutable_attrStr)
+{
+ id x = (NSAttributedString *) attrStr;
+ id x1 =(NSAttributedString *) mutable_attrStr;
+ id x2 = (NSMutableAttributedString *) attrStr;
+ id x3 = (NSMutableAttributedString *) mutable_attrStr;
+}
+
+void Test4(NSAttributedString *ns_attrStr, NSMutableAttributedString *ns_mutable_attr_Str) {
+ NDCFAttributedStringRef cfsr = (NDCFAttributedStringRef) ns_attrStr;
+ NDCFMutableAttributedStringRef cfsr1 = (NDCFMutableAttributedStringRef) ns_attrStr;
+ NDCFAttributedStringRef cfsr2 = (NDCFAttributedStringRef) ns_mutable_attr_Str;
+ NDCFMutableAttributedStringRef cfsr3 = (NDCFMutableAttributedStringRef) ns_mutable_attr_Str;
+}
diff --git a/test/SemaObjC/objcbridge-attribute-arc.m b/test/SemaObjC/objcbridge-attribute-arc.m
new file mode 100644
index 000000000000..ee2bf07ed47e
--- /dev/null
+++ b/test/SemaObjC/objcbridge-attribute-arc.m
@@ -0,0 +1,223 @@
+// RUN: %clang_cc1 -fsyntax-only -x objective-c -fobjc-arc -verify -Wno-objc-root-class %s
+// rdar://15454846
+
+typedef struct __attribute__ ((objc_bridge(NSError))) __CFErrorRef * CFErrorRef; // expected-note 5 {{declared here}}
+
+typedef struct __attribute__ ((objc_bridge(MyError))) __CFMyErrorRef * CFMyErrorRef; // expected-note 1 {{declared here}}
+
+typedef struct __attribute__((objc_bridge(12))) __CFMyColor *CFMyColorRef; // expected-error {{parameter of 'objc_bridge' attribute must be a single name of an Objective-C class}}
+
+typedef struct __attribute__ ((objc_bridge)) __CFArray *CFArrayRef; // expected-error {{'objc_bridge' attribute takes one argument}}
+
+typedef void * __attribute__ ((objc_bridge(NSURL))) CFURLRef; // expected-error {{'objc_bridge' attribute only applies to struct or union}}
+
+typedef void * CFStringRef __attribute__ ((objc_bridge(NSString))); // expected-error {{'objc_bridge' attribute only applies to struct or union}}
+
+typedef struct __attribute__((objc_bridge(NSLocale, NSError))) __CFLocale *CFLocaleRef;// expected-error {{use of undeclared identifier 'NSError'}}
+
+typedef struct __CFData __attribute__((objc_bridge(NSData))) CFDataRef; // expected-error {{'objc_bridge' attribute only applies to struct or union}}
+
+typedef struct __attribute__((objc_bridge(NSDictionary))) __CFDictionary * CFDictionaryRef;
+
+typedef struct __CFSetRef * CFSetRef __attribute__((objc_bridge(NSSet))); // expected-error {{'objc_bridge' attribute only applies to struct or union}};
+
+typedef union __CFUColor __attribute__((objc_bridge(NSUColor))) * CFUColorRef; // expected-error {{'objc_bridge' attribute only applies to struct or union}};
+
+typedef union __CFUColor __attribute__((objc_bridge(NSUColor))) *CFUColor1Ref; // expected-error {{'objc_bridge' attribute only applies to struct or union}};
+
+typedef union __attribute__((objc_bridge(NSUColor))) __CFUPrimeColor XXX;
+typedef XXX *CFUColor2Ref;
+
+@interface I
+{
+ __attribute__((objc_bridge(NSError))) void * color; // expected-error {{'objc_bridge' attribute only applies to struct or union}};
+}
+@end
+
+@protocol NSTesting @end
+@class NSString;
+
+typedef struct __attribute__((objc_bridge(NSTesting))) __CFError *CFTestingRef; // expected-note {{declared here}}
+
+id Test1(CFTestingRef cf) {
+ return (NSString *)cf; // expected-error {{CF object of type 'CFTestingRef' (aka 'struct __CFError *') is bridged to 'NSTesting', which is not an Objective-C class}} \
+ // expected-error {{cast of C pointer type 'CFTestingRef' (aka 'struct __CFError *') to Objective-C pointer type 'NSString *' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFTestingRef' (aka 'struct __CFError *') into ARC}}
+}
+
+typedef CFErrorRef CFErrorRef1;
+
+typedef CFErrorRef1 CFErrorRef2; // expected-note 2 {{declared here}}
+
+@protocol P1 @end
+@protocol P2 @end
+@protocol P3 @end
+@protocol P4 @end
+@protocol P5 @end
+
+@interface NSError<P1, P2, P3> @end // expected-note 5 {{declared here}}
+
+@interface MyError : NSError // expected-note 1 {{declared here}}
+@end
+
+@interface NSUColor @end
+
+@class NSString;
+
+void Test2(CFErrorRef2 cf, NSError *ns, NSString *str, Class c, CFUColor2Ref cf2) {
+ (void)(NSString *)cf; // expected-warning {{'CFErrorRef2' (aka 'struct __CFErrorRef *') bridges to NSError, not 'NSString'}} \
+ // expected-error {{cast of C pointer type 'CFErrorRef2' (aka 'struct __CFErrorRef *') to Objective-C pointer type 'NSString *' requires a bridged cast}} \
+ // expected-note {{__bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef2' (aka 'struct __CFErrorRef *') into ARC}}
+ (void)(NSError *)cf; // expected-error {{cast of C pointer type 'CFErrorRef2' (aka 'struct __CFErrorRef *') to Objective-C pointer type 'NSError *' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef2' (aka 'struct __CFErrorRef *') into ARC}}
+ (void)(MyError*)cf; // expected-error {{cast of C pointer type 'CFErrorRef2' (aka 'struct __CFErrorRef *') to Objective-C pointer type 'MyError *' requires a bridged cast}} \
+ // expected-note {{__bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef2' (aka 'struct __CFErrorRef *') into ARC}}
+ (void)(NSUColor *)cf2; // expected-error {{cast of C pointer type 'CFUColor2Ref' (aka 'union __CFUPrimeColor *') to Objective-C pointer type 'NSUColor *' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFUColor2Ref' (aka 'union __CFUPrimeColor *') into ARC}}
+ (void)(CFErrorRef)ns; // expected-error {{cast of Objective-C pointer type 'NSError *' to C pointer type 'CFErrorRef' (aka 'struct __CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka 'struct __CFErrorRef *')}}
+ (void)(CFErrorRef)str; // expected-warning {{'NSString' cannot bridge to 'CFErrorRef' (aka 'struct __CFErrorRef *')}} \\
+ // expected-error {{cast of Objective-C pointer type 'NSString *' to C pointer type 'CFErrorRef' (aka 'struct __CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka 'struct __CFErrorRef *')}}
+ (void)(Class)cf; // expected-warning {{'CFErrorRef2' (aka 'struct __CFErrorRef *') bridges to NSError, not 'Class'}} \\
+ // expected-error {{cast of C pointer type 'CFErrorRef2' (aka 'struct __CFErrorRef *') to Objective-C pointer type 'Class' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef2' (aka 'struct __CFErrorRef *') into ARC}}
+ (void)(CFErrorRef)c; // expected-warning {{'__unsafe_unretained Class' cannot bridge to 'CFErrorRef' (aka 'struct __CFErrorRef *}} \\
+ // expected-error {{cast of Objective-C pointer type 'Class' to C pointer type 'CFErrorRef' (aka 'struct __CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka 'struct __CFErrorRef *')}}
+}
+
+
+void Test3(CFErrorRef cf, NSError *ns) {
+ (void)(id)cf; // expected-error {{cast of C pointer type 'CFErrorRef' (aka 'struct __CFErrorRef *') to Objective-C pointer type 'id' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef' (aka 'struct __CFErrorRef *') into ARC}}
+ (void)(id<P1, P2>)cf; // expected-error {{cast of C pointer type 'CFErrorRef' (aka 'struct __CFErrorRef *') to Objective-C pointer type 'id<P1,P2>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef' (aka 'struct __CFErrorRef *') into ARC}}
+ (void)(id<P1, P2, P4>)cf; // expected-warning {{'CFErrorRef' (aka 'struct __CFErrorRef *') bridges to NSError, not 'id<P1,P2,P4>'}} \
+ // expected-error {{cast of C pointer type 'CFErrorRef' (aka 'struct __CFErrorRef *') to Objective-C pointer type 'id<P1,P2,P4>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef' (aka 'struct __CFErrorRef *') into ARC}}
+}
+
+void Test4(CFMyErrorRef cf) {
+ (void)(id)cf; // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka 'struct __CFMyErrorRef *') to Objective-C pointer type 'id' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka 'struct __CFMyErrorRef *') into ARC}}
+ (void)(id<P1, P2>)cf; // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka 'struct __CFMyErrorRef *') to Objective-C pointer type 'id<P1,P2>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka 'struct __CFMyErrorRef *') into ARC}}
+ (void)(id<P1, P2, P3>)cf; // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka 'struct __CFMyErrorRef *') to Objective-C pointer type 'id<P1,P2,P3>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka 'struct __CFMyErrorRef *') into ARC}}
+ (void)(id<P2, P3>)cf; // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka 'struct __CFMyErrorRef *') to Objective-C pointer type 'id<P2,P3>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka 'struct __CFMyErrorRef *') into ARC}}
+ (void)(id<P1, P2, P4>)cf; // expected-warning {{'CFMyErrorRef' (aka 'struct __CFMyErrorRef *') bridges to MyError, not 'id<P1,P2,P4>'}} \
+ // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka 'struct __CFMyErrorRef *') to Objective-C pointer type 'id<P1,P2,P4>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka 'struct __CFMyErrorRef *') into ARC}}
+}
+
+void Test5(id<P1, P2, P3> P123, id ID, id<P1, P2, P3, P4> P1234, id<P1, P2> P12, id<P2, P3> P23) {
+ (void)(CFErrorRef)ID; // expected-error {{cast of Objective-C pointer type 'id' to C pointer type 'CFErrorRef' (aka 'struct __CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka 'struct __CFErrorRef *')}}
+ (void)(CFErrorRef)P123; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3>' to C pointer type 'CFErrorRef' (aka 'struct __CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka 'struct __CFErrorRef *')}}
+ (void)(CFErrorRef)P1234; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3,P4>' to C pointer type 'CFErrorRef' (aka 'struct __CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka 'struct __CFErrorRef *')}}
+ (void)(CFErrorRef)P12; // expected-error {{cast of Objective-C pointer type 'id<P1,P2>' to C pointer type 'CFErrorRef' (aka 'struct __CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka 'struct __CFErrorRef *')}}
+ (void)(CFErrorRef)P23; // expected-error {{cast of Objective-C pointer type 'id<P2,P3>' to C pointer type 'CFErrorRef' (aka 'struct __CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka 'struct __CFErrorRef *')}}
+}
+
+void Test6(id<P1, P2, P3> P123, id ID, id<P1, P2, P3, P4> P1234, id<P1, P2> P12, id<P2, P3> P23) {
+
+ (void)(CFMyErrorRef)ID; // expected-error {{cast of Objective-C pointer type 'id' to C pointer type 'CFMyErrorRef' (aka 'struct __CFMyErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (aka 'struct __CFMyErrorRef *')}}
+ (void)(CFMyErrorRef)P123; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3>' to C pointer type 'CFMyErrorRef' (aka 'struct __CFMyErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (aka 'struct __CFMyErrorRef *')}}
+ (void)(CFMyErrorRef)P1234; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3,P4>' to C pointer type 'CFMyErrorRef' (aka 'struct __CFMyErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (aka 'struct __CFMyErrorRef *')}}
+ (void)(CFMyErrorRef)P12; // expected-error {{cast of Objective-C pointer type 'id<P1,P2>' to C pointer type 'CFMyErrorRef' (aka 'struct __CFMyErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (aka 'struct __CFMyErrorRef *')}}
+ (void)(CFMyErrorRef)P23; // expected-error {{cast of Objective-C pointer type 'id<P2,P3>' to C pointer type 'CFMyErrorRef' (aka 'struct __CFMyErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (aka 'struct __CFMyErrorRef *')}}
+}
+
+typedef struct __attribute__ ((objc_bridge(MyPersonalError))) __CFMyPersonalErrorRef * CFMyPersonalErrorRef; // expected-note 1 {{declared here}}
+
+@interface MyPersonalError : NSError <P4> // expected-note 1 {{declared here}}
+@end
+
+void Test7(id<P1, P2, P3> P123, id ID, id<P1, P2, P3, P4> P1234, id<P1, P2> P12, id<P2, P3> P23) {
+ (void)(CFMyPersonalErrorRef)ID; // expected-error {{cast of Objective-C pointer type 'id' to C pointer type 'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalErrorRef *')}}
+ (void)(CFMyPersonalErrorRef)P123; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3>' to C pointer type 'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalErrorRef *')}}
+ (void)(CFMyPersonalErrorRef)P1234; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3,P4>' to C pointer type 'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalErrorRef *')}}
+ (void)(CFMyPersonalErrorRef)P12; // expected-error {{cast of Objective-C pointer type 'id<P1,P2>' to C pointer type 'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalErrorRef *')}}
+ (void)(CFMyPersonalErrorRef)P23; // expected-error {{cast of Objective-C pointer type 'id<P2,P3>' to C pointer type 'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalErrorRef *')}}
+}
+
+void Test8(CFMyPersonalErrorRef cf) {
+ (void)(id)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalErrorRef *') to Objective-C pointer type 'id' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalErrorRef *') into ARC}}
+ (void)(id<P1>)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalErrorRef *') to Objective-C pointer type 'id<P1>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalErrorRef *') into ARC}}
+ (void)(id<P1, P2>)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalErrorRef *') to Objective-C pointer type 'id<P1,P2>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalErrorRef *') into ARC}}
+ (void)(id<P1, P2, P3>)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalErrorRef *') to Objective-C pointer type 'id<P1,P2,P3>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalErrorRef *') into ARC}}
+ (void)(id<P1, P2, P3, P4>)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalErrorRef *') to Objective-C pointer type 'id<P1,P2,P3,P4>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalErrorRef *') into ARC}}
+ (void)(id<P1, P2, P3, P4, P5>)cf; // expected-warning {{'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalErrorRef *') bridges to MyPersonalError, not 'id<P1,P2,P3,P4,P5>'}} \
+ // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalErrorRef *') to Objective-C pointer type 'id<P1,P2,P3,P4,P5>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalErrorRef *') into ARC}}
+}
+
+void Test9(CFErrorRef2 cf, NSError *ns, NSString *str, Class c, CFUColor2Ref cf2) {
+ (void)(__bridge NSString *)cf; // expected-warning {{'CFErrorRef2' (aka 'struct __CFErrorRef *') bridges to NSError, not 'NSString'}}
+ (void)(__bridge NSError *)cf; // okay
+ (void)(__bridge MyError*)cf; // okay,
+ (void)(__bridge NSUColor *)cf2; // okay
+ (void)(__bridge CFErrorRef)ns; // okay
+ (void)(__bridge CFErrorRef)str; // expected-warning {{'NSString' cannot bridge to 'CFErrorRef' (aka 'struct __CFErrorRef *')}}
+ (void)(__bridge Class)cf; // expected-warning {{'CFErrorRef2' (aka 'struct __CFErrorRef *') bridges to NSError, not 'Class'}}
+ (void)(__bridge CFErrorRef)c; // expected-warning {{'__unsafe_unretained Class' cannot bridge to 'CFErrorRef' (aka 'struct __CFErrorRef *')}}
+}
diff --git a/test/SemaObjC/objcbridge-attribute.m b/test/SemaObjC/objcbridge-attribute.m
index 2db2ff4929e8..a268caef8a50 100644
--- a/test/SemaObjC/objcbridge-attribute.m
+++ b/test/SemaObjC/objcbridge-attribute.m
@@ -1,11 +1,13 @@
-// RUN: %clang_cc1 -fsyntax-only -fobjc-arc -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
// rdar://15454846
-typedef struct __attribute__ ((objc_bridge(NSError))) __CFErrorRef * CFErrorRef; // expected-note 2 {{declared here}}
+typedef struct __attribute__ ((objc_bridge(NSError))) __CFErrorRef * CFErrorRef; // expected-note 3 {{declared here}}
+
+typedef struct __attribute__ ((objc_bridge(MyError))) __CFMyErrorRef * CFMyErrorRef; // expected-note 1 {{declared here}}
typedef struct __attribute__((objc_bridge(12))) __CFMyColor *CFMyColorRef; // expected-error {{parameter of 'objc_bridge' attribute must be a single name of an Objective-C class}}
-typedef struct __attribute__ ((objc_bridge)) __CFArray *CFArrayRef; // expected-error {{parameter of 'objc_bridge' attribute must be a single name of an Objective-C class}}
+typedef struct __attribute__ ((objc_bridge)) __CFArray *CFArrayRef; // expected-error {{'objc_bridge' attribute takes one argument}}
typedef void * __attribute__ ((objc_bridge(NSURL))) CFURLRef; // expected-error {{'objc_bridge' attribute only applies to struct or union}}
@@ -15,7 +17,7 @@ typedef struct __attribute__((objc_bridge(NSLocale, NSError))) __CFLocale *CFLoc
typedef struct __CFData __attribute__((objc_bridge(NSData))) CFDataRef; // expected-error {{'objc_bridge' attribute only applies to struct or union}}
-typedef struct __attribute__((objc_bridge(NSDictionary))) __CFDictionary * CFDictionaryRef;
+typedef struct __attribute__((objc_bridge(NSDictionary))) __CFDictionary * CFDictionaryRef; // expected-note {{declared here}}
typedef struct __CFSetRef * CFSetRef __attribute__((objc_bridge(NSSet))); // expected-error {{'objc_bridge' attribute only applies to struct or union}};
@@ -43,11 +45,17 @@ id Test1(CFTestingRef cf) {
typedef CFErrorRef CFErrorRef1;
-typedef CFErrorRef1 CFErrorRef2;
+typedef CFErrorRef1 CFErrorRef2; // expected-note {{declared here}}
+
+@protocol P1 @end
+@protocol P2 @end
+@protocol P3 @end
+@protocol P4 @end
+@protocol P5 @end
-@interface NSError @end
+@interface NSError<P1, P2, P3> @end // expected-note 3 {{declared here}}
-@interface MyError : NSError
+@interface MyError : NSError // expected-note 1 {{declared here}}
@end
@interface NSUColor @end
@@ -64,3 +72,64 @@ void Test2(CFErrorRef2 cf, NSError *ns, NSString *str, Class c, CFUColor2Ref cf2
(void)(Class)cf; // expected-warning {{'CFErrorRef2' (aka 'struct __CFErrorRef *') bridges to NSError, not 'Class'}}
(void)(CFErrorRef)c; // expected-warning {{'Class' cannot bridge to 'CFErrorRef'}}
}
+
+
+void Test3(CFErrorRef cf, NSError *ns) {
+ (void)(id)cf; // okay
+ (void)(id<P1, P2>)cf; // okay
+ (void)(id<P1, P2, P4>)cf; // expected-warning {{'CFErrorRef' (aka 'struct __CFErrorRef *') bridges to NSError, not 'id<P1,P2,P4>'}}
+}
+
+void Test4(CFMyErrorRef cf) {
+ (void)(id)cf; // okay
+ (void)(id<P1, P2>)cf; // ok
+ (void)(id<P1, P2, P3>)cf; // ok
+ (void)(id<P2, P3>)cf; // ok
+ (void)(id<P1, P2, P4>)cf; // expected-warning {{'CFMyErrorRef' (aka 'struct __CFMyErrorRef *') bridges to MyError, not 'id<P1,P2,P4>'}}
+}
+
+void Test5(id<P1, P2, P3> P123, id ID, id<P1, P2, P3, P4> P1234, id<P1, P2> P12, id<P2, P3> P23) {
+ (void)(CFErrorRef)ID; // ok
+ (void)(CFErrorRef)P123; // ok
+ (void)(CFErrorRef)P1234; // ok
+ (void)(CFErrorRef)P12; // ok
+ (void)(CFErrorRef)P23; // ok
+}
+
+void Test6(id<P1, P2, P3> P123, id ID, id<P1, P2, P3, P4> P1234, id<P1, P2> P12, id<P2, P3> P23) {
+
+ (void)(CFMyErrorRef)ID; // ok
+ (void)(CFMyErrorRef)P123; // ok
+ (void)(CFMyErrorRef)P1234; // ok
+ (void)(CFMyErrorRef)P12; // ok
+ (void)(CFMyErrorRef)P23; // ok
+}
+
+typedef struct __attribute__ ((objc_bridge(MyPersonalError))) __CFMyPersonalErrorRef * CFMyPersonalErrorRef; // expected-note 1 {{declared here}}
+
+@interface MyPersonalError : NSError <P4> // expected-note 1 {{declared here}}
+@end
+
+void Test7(id<P1, P2, P3> P123, id ID, id<P1, P2, P3, P4> P1234, id<P1, P2> P12, id<P2, P3> P23) {
+ (void)(CFMyPersonalErrorRef)ID; // ok
+ (void)(CFMyPersonalErrorRef)P123; // ok
+ (void)(CFMyPersonalErrorRef)P1234; // ok
+ (void)(CFMyPersonalErrorRef)P12; // ok
+ (void)(CFMyPersonalErrorRef)P23; // ok
+}
+
+void Test8(CFMyPersonalErrorRef cf) {
+ (void)(id)cf; // ok
+ (void)(id<P1>)cf; // ok
+ (void)(id<P1, P2>)cf; // ok
+ (void)(id<P1, P2, P3>)cf; // ok
+ (void)(id<P1, P2, P3, P4>)cf; // ok
+ (void)(id<P1, P2, P3, P4, P5>)cf; // expected-warning {{'CFMyPersonalErrorRef' (aka 'struct __CFMyPersonalErrorRef *') bridges to MyPersonalError, not 'id<P1,P2,P3,P4,P5>'}}
+}
+
+CFDictionaryRef bar() __attribute__((cf_returns_not_retained));
+@class NSNumber;
+
+void Test9() {
+ NSNumber *w2 = (NSNumber*) bar(); // expected-error {{CF object of type 'CFDictionaryRef' (aka 'struct __CFDictionary *') is bridged to 'NSDictionary', which is not an Objective-C class}}
+}
diff --git a/test/SemaObjC/objcbridge-related-attribute.m b/test/SemaObjC/objcbridge-related-attribute.m
new file mode 100644
index 000000000000..06c2e87c5b1f
--- /dev/null
+++ b/test/SemaObjC/objcbridge-related-attribute.m
@@ -0,0 +1,41 @@
+// RUN: %clang_cc1 -fsyntax-only -x objective-c -verify -Wno-objc-root-class %s
+// rdar://15499111
+
+typedef struct __attribute__((objc_bridge_related(NSColor,colorWithCGColor:,CGColor))) CGColor *CGColorRef; // expected-note 5 {{declared here}}
+typedef struct __attribute__((objc_bridge_related(NSColor,,CGColor1))) CGColor1 *CGColorRef1;
+typedef struct __attribute__((objc_bridge_related(NSColor,,))) CGColor2 *CGColorRef2;
+
+@interface NSColor // expected-note 5 {{declared here}}
++ (NSColor *)colorWithCGColor:(CGColorRef)cgColor;
+- (CGColorRef)CGColor;
+- (CGColorRef1)CGColor1;
+@end
+
+@interface NSTextField
+- (void)setBackgroundColor:(NSColor *)color;
+- (NSColor *)backgroundColor;
+@end
+
+void foo(NSColor*); // expected-note {{passing argument to parameter here}}
+
+NSColor * Test1(NSTextField *textField, CGColorRef newColor) {
+ foo(newColor); // expected-error {{'CGColorRef' (aka 'struct CGColor *') must be explicitly converted to 'NSColor *'; use '+colorWithCGColor:' method for this conversion}}
+ textField.backgroundColor = newColor; // expected-error {{'CGColorRef' (aka 'struct CGColor *') must be explicitly converted to 'NSColor *'; use '+colorWithCGColor:' method for this conversion}}
+ return newColor; // expected-error {{'CGColorRef' (aka 'struct CGColor *') must be explicitly converted to 'NSColor *'; use '+colorWithCGColor:' method for this conversion}}
+}
+
+NSColor * Test2(NSTextField *textField, CGColorRef1 newColor) {
+ foo(newColor); // expected-warning {{incompatible pointer types passing 'CGColorRef1'}}
+ textField.backgroundColor = newColor; // expected-warning {{incompatible pointer types assigning}}
+ return newColor; // expected-warning {{incompatible pointer types returning}}
+}
+
+CGColorRef Test3(NSTextField *textField, CGColorRef newColor) {
+ newColor = textField.backgroundColor; // expected-error {{'NSColor *' must be explicitly converted to 'CGColorRef' (aka 'struct CGColor *'); use '-CGColor' method for this conversion}}
+ return textField.backgroundColor; // expected-error {{'NSColor *' must be explicitly converted to 'CGColorRef' (aka 'struct CGColor *'); use '-CGColor' method for this conversion}}
+}
+
+CGColorRef2 Test4(NSTextField *textField, CGColorRef2 newColor) {
+ newColor = textField.backgroundColor; // expected-warning {{incompatible pointer types assigning}}
+ return textField.backgroundColor; // expected-warning {{incompatible pointer types returning}}
+}
diff --git a/test/SemaObjC/objcbridgemutable-attribute.m b/test/SemaObjC/objcbridgemutable-attribute.m
new file mode 100644
index 000000000000..4ec8de0b5488
--- /dev/null
+++ b/test/SemaObjC/objcbridgemutable-attribute.m
@@ -0,0 +1,31 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
+// rdar://15498044
+
+typedef struct __attribute__((objc_bridge_mutable(NSMutableDictionary))) __CFDictionary * CFMutableDictionaryRef; // expected-note {{declared here}}
+
+typedef struct __attribute__((objc_bridge_mutable(12))) __CFDictionaryB1 * CFMutableDictionaryB1Ref; // expected-error {{parameter of 'objc_bridge_mutable' attribute must be a single name of an Objective-C class}}
+
+typedef struct __attribute__((objc_bridge_mutable(P))) __CFDictionaryB2 * CFMutableDictionaryB2Ref; // expected-note {{declared here}}
+
+typedef struct __attribute__((objc_bridge_mutable(NSMutableDictionary, Unknown))) __CFDictionaryB3 * CFMutableDictionaryB3Ref; // expected-error {{use of undeclared identifier 'Unknown'}}
+
+typedef struct __attribute__((objc_bridge_mutable)) __CFDictionaryB4 * CFMutableDictionaryB4Ref; // expected-error {{'objc_bridge_mutable' attribute takes one argument}}
+
+@interface NSDictionary
+@end
+
+@interface NSMutableDictionary : NSDictionary
+@end
+
+@protocol P @end
+
+void Test(NSMutableDictionary *md, NSDictionary *nd, CFMutableDictionaryRef mcf, CFMutableDictionaryB2Ref bmcf) {
+
+ (void) (CFMutableDictionaryRef)md;
+ (void) (CFMutableDictionaryRef)nd; // expected-warning {{'NSDictionary' cannot bridge to 'CFMutableDictionaryRef' (aka 'struct __CFDictionary *')}}
+ (void) (NSDictionary *)mcf; // expected-warning {{'CFMutableDictionaryRef' (aka 'struct __CFDictionary *') bridges to NSMutableDictionary, not 'NSDictionary'}}
+ (void) (NSMutableDictionary *)mcf; // ok;
+ (void) (NSMutableDictionary *)bmcf; // expected-error {{CF object of type 'CFMutableDictionaryB2Ref' (aka 'struct __CFDictionaryB2 *') is bridged to 'P', which is not an Objective-C class}}
+
+}
+
diff --git a/test/SemaObjC/opaque-is-access-warn.m b/test/SemaObjC/opaque-is-access-warn.m
new file mode 100644
index 000000000000..ac0f724df6f6
--- /dev/null
+++ b/test/SemaObjC/opaque-is-access-warn.m
@@ -0,0 +1,24 @@
+// RUN: %clang -target x86_64-apple-darwin -arch arm64 -mios-version-min=7 -fsyntax-only -Wdeprecated-objc-isa-usage %s -Xclang -verify
+// RUN: %clang -target x86_64-apple-darwin -arch arm64 -mios-version-min=7 -fsyntax-only %s -Xclang -verify
+// RUN: %clang -target x86_64-apple-darwin -mios-simulator-version-min=7 -fsyntax-only -Wdeprecated-objc-isa-usage %s -Xclang -verify
+// rdar://10709102
+
+typedef struct objc_object {
+ struct objc_class *isa;
+} *id;
+
+@interface NSObject {
+ struct objc_class *isa;
+}
+@end
+@interface Whatever : NSObject
++self;
+@end
+
+static void func() {
+
+ id x;
+
+ [(*x).isa self]; // expected-error {{direct access to Objective-C's isa is deprecated in favor of object_getClass()}}
+ [x->isa self]; // expected-error {{direct access to Objective-C's isa is deprecated in favor of object_getClass()}}
+}
diff --git a/test/SemaObjC/opaque-is-access.m b/test/SemaObjC/opaque-is-access.m
new file mode 100644
index 000000000000..89d91b356063
--- /dev/null
+++ b/test/SemaObjC/opaque-is-access.m
@@ -0,0 +1,23 @@
+// RUN: %clang -target x86_64-apple-darwin -arch arm64 -mios-version-min=7 -fsyntax-only %s -Xclang -verify
+// RUN: %clang -target x86_64-apple-darwin -arch x86_64 -mios-simulator-version-min=7 -fsyntax-only %s -Xclang -verify
+// rdar://10709102
+
+typedef struct objc_object {
+ struct objc_class *isa;
+} *id;
+
+@interface NSObject {
+ struct objc_class *isa;
+}
+@end
+@interface Whatever : NSObject
++self;
+@end
+
+static void func() {
+
+ id x;
+
+ [(*x).isa self]; // expected-error {{direct access to Objective-C's isa is deprecated in favor of object_getClass()}}
+ [x->isa self]; // expected-error {{direct access to Objective-C's isa is deprecated in favor of object_getClass()}}
+}
diff --git a/test/SemaObjC/overriding-property-in-class-extension.m b/test/SemaObjC/overriding-property-in-class-extension.m
index 8c0e1b98a572..77efd556928c 100644
--- a/test/SemaObjC/overriding-property-in-class-extension.m
+++ b/test/SemaObjC/overriding-property-in-class-extension.m
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -fsyntax-only -verify -Weverything %s
+// expected-no-diagnostics
// rdar://12103434
@class NSString;
@@ -7,7 +8,7 @@
@interface MyClass : NSObject
-@property (nonatomic, copy, readonly) NSString* name; // expected-warning {{property attributes 'readonly' and 'copy' are mutually exclusive}}
+@property (nonatomic, copy, readonly) NSString* name;
@end
diff --git a/test/SemaObjC/property-10.m b/test/SemaObjC/property-10.m
index 8cb8ec63a916..b2aaf2b1a180 100644
--- a/test/SemaObjC/property-10.m
+++ b/test/SemaObjC/property-10.m
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -Wreadonly-setter-attrs -verify %s -fblocks
+// RUN: %clang_cc1 -fsyntax-only -verify %s -fblocks
// Check property attribute consistency.
diff --git a/test/SemaObjC/property-12.m b/test/SemaObjC/property-12.m
index c4a755555629..5fc311aa90ad 100644
--- a/test/SemaObjC/property-12.m
+++ b/test/SemaObjC/property-12.m
@@ -1,15 +1,15 @@
-// RUN: %clang_cc1 -fsyntax-only -Wno-objc-root-class -Wreadonly-setter-attrs -verify %s
+// RUN: %clang_cc1 -fsyntax-only -Wno-objc-root-class -verify %s
@protocol P0
-@property(readonly,assign) id X; // expected-warning {{property attributes 'readonly' and 'assign' are mutually exclusive}}
+@property(readonly,assign) id X;
@end
@protocol P1
-@property(readonly,retain) id X; // expected-warning {{property attributes 'readonly' and 'retain' are mutually exclusive}}
+@property(readonly,retain) id X;
@end
@protocol P2
-@property(readonly,copy) id X; // expected-warning {{property attributes 'readonly' and 'copy' are mutually exclusive}}
+@property(readonly,copy) id X;
@end
@protocol P3
diff --git a/test/SemaObjC/property-deprecated-warning.m b/test/SemaObjC/property-deprecated-warning.m
index 7e10356ac577..4beb23ada33a 100644
--- a/test/SemaObjC/property-deprecated-warning.m
+++ b/test/SemaObjC/property-deprecated-warning.m
@@ -5,7 +5,7 @@
typedef signed char BOOL;
@protocol P
-@property(nonatomic,assign) id ptarget __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note {{property 'ptarget' is declared deprecated here}} expected-note {{method 'ptarget' declared here}}
+@property(nonatomic,assign) id ptarget __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note {{property 'ptarget' is declared deprecated here}} expected-note {{'ptarget' has been explicitly marked deprecated here}}
@end
@protocol P1<P>
@@ -14,7 +14,7 @@ typedef signed char BOOL;
@interface UITableViewCell<P1>
-@property(nonatomic,assign) id target __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note {{property 'target' is declared deprecated here}} expected-note {{method 'setTarget:' declared here}}
+@property(nonatomic,assign) id target __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note {{property 'target' is declared deprecated here}} expected-note {{'setTarget:' has been explicitly marked deprecated here}}
@end
@interface PSTableCell : UITableViewCell
@@ -22,9 +22,9 @@ typedef signed char BOOL;
@end
@interface UITableViewCell(UIDeprecated)
-@property(nonatomic,assign) id dep_target __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note 2 {{method 'dep_target' declared here}} \
+@property(nonatomic,assign) id dep_target __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note 2 {{'dep_target' has been explicitly marked deprecated here}} \
// expected-note 4 {{property 'dep_target' is declared deprecated here}} \
- // expected-note 2 {{method 'setDep_target:' declared here}}
+ // expected-note 2 {{'setDep_target:' has been explicitly marked deprecated here}}
@end
@implementation PSTableCell
@@ -55,9 +55,9 @@ typedef signed char BOOL;
@interface CustomAccessorNames
-@property(getter=isEnabled,assign) BOOL enabled __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note {{method 'isEnabled' declared here}} expected-note {{property 'enabled' is declared deprecated here}}
+@property(getter=isEnabled,assign) BOOL enabled __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note {{'isEnabled' has been explicitly marked deprecated here}} expected-note {{property 'enabled' is declared deprecated here}}
-@property(setter=setNewDelegate:,assign) id delegate __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note {{method 'setNewDelegate:' declared here}} expected-note {{property 'delegate' is declared deprecated here}}
+@property(setter=setNewDelegate:,assign) id delegate __attribute__((availability(ios,introduced=2.0,deprecated=3.0))); // expected-note {{'setNewDelegate:' has been explicitly marked deprecated here}} expected-note {{property 'delegate' is declared deprecated here}}
@end
void testCustomAccessorNames(CustomAccessorNames *obj) {
@@ -78,3 +78,28 @@ id useDeprecatedProperty(ProtocolInCategory *obj, id<P> obj2, int flag) {
return [obj ptarget]; // no-warning
return [obj2 ptarget]; // expected-warning {{'ptarget' is deprecated: first deprecated in iOS 3.0}}
}
+
+// rdar://15951801
+@interface Foo
+{
+ int _x;
+}
+@property(nonatomic,readonly) int x;
+- (void)setX:(int)x __attribute__ ((deprecated)); // expected-note 2 {{'setX:' has been explicitly marked deprecated here}}
+- (int)x __attribute__ ((unavailable)); // expected-note {{'x' has been explicitly marked unavailable here}}
+@end
+
+@implementation Foo
+- (void)setX:(int)x {
+ _x = x;
+}
+- (int)x {
+ return _x;
+}
+@end
+
+void testUserAccessorAttributes(Foo *foo) {
+ [foo setX:5678]; // expected-warning {{'setX:' is deprecated}}
+ foo.x = foo.x; // expected-error {{property access is using 'x' method which is unavailable}} \
+ // expected-warning {{property access is using 'setX:' method which is deprecated}}
+}
diff --git a/test/SemaObjC/property-in-class-extension-1.m b/test/SemaObjC/property-in-class-extension-1.m
index 51837fd212ca..ab461ef6c191 100644
--- a/test/SemaObjC/property-in-class-extension-1.m
+++ b/test/SemaObjC/property-in-class-extension-1.m
@@ -8,20 +8,19 @@
@property (nonatomic, readonly) NSString* addingMemoryModel;
-@property (nonatomic, copy, readonly) NSString* matchingMemoryModel; // expected-warning {{property attributes 'readonly' and 'copy' are mutually exclusive}}
+@property (nonatomic, copy, readonly) NSString* matchingMemoryModel;
-@property (nonatomic, retain, readonly) NSString* addingNoNewMemoryModel; // expected-warning {{property attributes 'readonly' and 'retain' are mutually exclusive}}
+@property (nonatomic, retain, readonly) NSString* addingNoNewMemoryModel;
@property (readonly) NSString* none;
@property (readonly) NSString* none1;
-@property (assign, readonly) NSString* changeMemoryModel; // expected-note {{property declared here}} \
- // expected-warning {{property attributes 'readonly' and 'assign' are mutually exclusive}}
+@property (assign, readonly) NSString* changeMemoryModel; // expected-note {{property declared here}}
@property (readonly) __weak id weak_prop;
@property (readonly) __weak id weak_prop1;
-@property (assign, readonly) NSString* assignProperty; // expected-warning {{property attributes 'readonly' and 'assign' are mutually exclusive}}
+@property (assign, readonly) NSString* assignProperty;
@property (readonly) NSString* readonlyProp;
diff --git a/test/SemaObjC/property-inherited.m b/test/SemaObjC/property-inherited.m
index f5f1b420c229..cd223ddd1ff3 100644
--- a/test/SemaObjC/property-inherited.m
+++ b/test/SemaObjC/property-inherited.m
@@ -44,3 +44,29 @@
@property(assign) Data *p_base;
@property(assign) NSData *p_data; // expected-warning{{property type 'NSData *' is incompatible with type 'NSMutableData *' inherited from 'Base'}}
@end
+
+// rdar://15967517
+@protocol P1
+@property (nonatomic) void* selected;
+@end
+
+@protocol P2
+@property (nonatomic) void* selected; // expected-note {{property declared here}}
+@end
+
+@interface MKAnnotationView <P1>
+@property (nonatomic) void* selected; // expected-note {{property declared here}}
+@property (nonatomic) char selected2;
+@end
+
+@interface Parent : MKAnnotationView <P2>
+@property (nonatomic) void* selected1; // expected-note {{property declared here}}
+@property (nonatomic) char selected2;
+@end
+
+@interface Child : Parent
+@property (nonatomic) char selected; // expected-warning {{property type 'char' is incompatible with type 'void *' inherited from 'MKAnnotationView'}} \
+ // expected-warning {{property type 'char' is incompatible with type 'void *' inherited from 'P2'}}
+@property (nonatomic) char selected1; // expected-warning {{property type 'char' is incompatible with type 'void *' inherited from 'Parent'}}
+@property (nonatomic) char selected2;
+@end
diff --git a/test/SemaObjC/property-noninherited-availability-attr.m b/test/SemaObjC/property-noninherited-availability-attr.m
index 0c2a5d385307..dfa72d1077ef 100644
--- a/test/SemaObjC/property-noninherited-availability-attr.m
+++ b/test/SemaObjC/property-noninherited-availability-attr.m
@@ -1,17 +1,16 @@
// RUN: %clang_cc1 -triple x86_64-apple-macosx10.8.0 -fsyntax-only -verify %s
-// This test case shows that 'availablity' and 'deprecated' does not inherit
+// This test case shows that 'availability' and 'deprecated' do not inherit
// when a property is redeclared in a subclass. This is intentional.
@interface NSObject @end
@protocol myProtocol
-@property int myProtocolProperty __attribute__((availability(macosx,introduced=10.7,deprecated=10.8))); // expected-note {{method 'myProtocolProperty' declared here}} \
+@property int myProtocolProperty __attribute__((availability(macosx,introduced=10.7,deprecated=10.8))); // expected-note {{'myProtocolProperty' has been explicitly marked deprecated here}} \
// expected-note {{property 'myProtocolProperty' is declared deprecated here}}
@end
@interface Foo : NSObject
-@property int myProperty __attribute__((availability(macosx,introduced=10.7,deprecated=10.8))); // expected-note {{'myProperty' declared here}} \
- // expected-note {{method 'myProperty' declared here}} \
+@property int myProperty __attribute__((availability(macosx,introduced=10.7,deprecated=10.8))); // expected-note 2 {{'myProperty' has been explicitly marked deprecated here}} \
// expected-note {{property 'myProperty' is declared deprecated here}}
@end
@@ -22,13 +21,13 @@
void test(Foo *y, Bar *x, id<myProtocol> z) {
y.myProperty = 0; // expected-warning {{'myProperty' is deprecated: first deprecated in OS X 10.8}}
- [y myProperty]; // expected-warning {{'myProperty' is deprecated: first deprecated in OS X 10.8}}
+ (void)[y myProperty]; // expected-warning {{'myProperty' is deprecated: first deprecated in OS X 10.8}}
x.myProperty = 1; // no-warning
- [x myProperty]; // no-warning
+ (void)[x myProperty]; // no-warning
x.myProtocolProperty = 0; // no-warning
- [x myProtocolProperty]; // no-warning
- [z myProtocolProperty]; // expected-warning {{'myProtocolProperty' is deprecated: first deprecated in OS X 10.8}}
+ (void)[x myProtocolProperty]; // no-warning
+ (void)[z myProtocolProperty]; // expected-warning {{'myProtocolProperty' is deprecated: first deprecated in OS X 10.8}}
}
diff --git a/test/SemaObjC/property-typecheck-1.m b/test/SemaObjC/property-typecheck-1.m
index 58d0f215cd92..5fb05c8bd384 100644
--- a/test/SemaObjC/property-typecheck-1.m
+++ b/test/SemaObjC/property-typecheck-1.m
@@ -93,7 +93,7 @@ typedef void (F)(void);
return container.pieces; // expected-warning {{type of property 'pieces' does not match type of accessor 'pieces'}}
}
-- (id)firstPeice
+- (id)firstPiece
{
return container.first;
}
diff --git a/test/SemaObjC/protocol-attribute.m b/test/SemaObjC/protocol-attribute.m
index b2aecc209f1b..52bd44110fc9 100644
--- a/test/SemaObjC/protocol-attribute.m
+++ b/test/SemaObjC/protocol-attribute.m
@@ -6,7 +6,7 @@ __attribute ((unavailable))
Class <FwProto> cFw = 0; // expected-error {{'FwProto' is unavailable}}
-__attribute ((deprecated)) @protocol MyProto1 // expected-note 7 {{declared here}}
+__attribute ((deprecated)) @protocol MyProto1 // expected-note 7 {{'MyProto1' has been explicitly marked deprecated here}}
@end
@protocol Proto2 <MyProto1> // expected-warning {{'MyProto1' is deprecated}}
diff --git a/test/SemaObjC/protocols-suppress-conformance.m b/test/SemaObjC/protocols-suppress-conformance.m
new file mode 100644
index 000000000000..299e44e8074e
--- /dev/null
+++ b/test/SemaObjC/protocols-suppress-conformance.m
@@ -0,0 +1,207 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -verify %s -Wno-objc-root-class
+
+// Mark this protocol as requiring all of its methods and properties
+// to be explicitly implemented in the adopting class.
+__attribute__((objc_protocol_requires_explicit_implementation))
+@protocol Protocol
+- (void) theBestOfTimes; // expected-note {{method 'theBestOfTimes' declared here}}
+@property (readonly) id theWorstOfTimes; // expected-note {{property declared here}}
+@end
+
+// In this example, ClassA adopts the protocol. We won't
+// provide the implementation here, but this protocol will
+// be adopted later by a subclass.
+@interface ClassA <Protocol>
+- (void) theBestOfTimes;
+@property (readonly) id theWorstOfTimes;
+@end
+
+// This class subclasses ClassA (which also adopts 'Protocol').
+@interface ClassB : ClassA <Protocol>
+@end
+
+@implementation ClassB // expected-warning {{property 'theWorstOfTimes' requires method 'theWorstOfTimes' to be defined - use @synthesize, @dynamic or provide a method implementation in this class implementation}}
+@end
+
+@interface ClassB_Good : ClassA <Protocol>
+@end
+
+@implementation ClassB_Good // no-warning
+- (void) theBestOfTimes {}
+@dynamic theWorstOfTimes;
+@end
+
+@interface ClassB_AlsoGood : ClassA <Protocol>
+@property (readonly) id theWorstOfTimes;
+@end
+
+// Default synthesis acts as if @dynamic
+// had been written for 'theWorstOfTimes' because
+// it is declared in ClassA. This is okay, since
+// the author of ClassB_AlsoGood needs explicitly
+// write @property in the @interface.
+@implementation ClassB_AlsoGood // no-warning
+- (void) theBestOfTimes {}
+@end
+
+// Test that inherited protocols do not get the explicit conformance requirement.
+@protocol Inherited
+- (void) fairIsFoul;
+@end
+
+__attribute__((objc_protocol_requires_explicit_implementation))
+@protocol Derived <Inherited>
+- (void) foulIsFair; // expected-note {{method 'foulIsFair' declared here}}
+@end
+
+@interface ClassC <Inherited>
+@end
+
+@interface ClassD : ClassC <Derived>
+@end
+
+@implementation ClassD // expected-warning {{method 'foulIsFair' in protocol 'Derived' not implemented}}
+@end
+
+// Test that the attribute is used correctly.
+__attribute__((objc_protocol_requires_explicit_implementation(1+2))) // expected-error {{attribute takes no arguments}}
+@protocol AnotherProtocol @end
+
+// Cannot put the attribute on classes or other non-protocol declarations.
+__attribute__((objc_protocol_requires_explicit_implementation)) // expected-error {{attribute only applies to Objective-C protocols}}
+@interface AnotherClass @end
+
+__attribute__((objc_protocol_requires_explicit_implementation)) // expected-error {{attribute only applies to Objective-C protocols}}
+int x;
+
+// Test that inherited protocols with the attribute
+// are treated properly.
+__attribute__((objc_protocol_requires_explicit_implementation))
+@protocol ProtocolA
+@required
+- (void)rlyeh; // expected-note 2 {{method 'rlyeh' declared here}}
+- (void)innsmouth; // expected-note 2 {{method 'innsmouth' declared here}}
+@end
+
+@protocol ProtocolB <ProtocolA>
+@required
+- (void)dunwich;
+- (void)innsmouth; // expected-note {{method 'innsmouth' declared here}}
+@end
+
+__attribute__((objc_protocol_requires_explicit_implementation))
+@protocol ProtocolB_Explicit <ProtocolA>
+@required
+- (void)dunwich;
+- (void)innsmouth; // expected-note 2 {{method 'innsmouth' declared here}}
+@end
+
+@protocol ProtocolC
+@required
+- (void)rlyeh;
+- (void)innsmouth;
+- (void)dunwich;
+@end
+
+@interface MyObject <ProtocolC> @end
+
+// Provide two variants of a base class, one that adopts ProtocolA and
+// one that does not.
+@interface Lovecraft <ProtocolA> @end
+@interface Lovecraft_2 @end
+
+// Provide two variants of a subclass that conform to ProtocolB. One
+// subclasses from a class that conforms to ProtocolA, the other that
+// does not.
+//
+// From those, provide two variants that conformat to ProtocolB_Explicit
+// instead.
+@interface Shoggoth : Lovecraft <ProtocolB> @end
+@interface Shoggoth_2 : Lovecraft_2 <ProtocolB> @end
+@interface Shoggoth_Explicit : Lovecraft <ProtocolB_Explicit> @end
+@interface Shoggoth_2_Explicit : Lovecraft_2 <ProtocolB_Explicit> @end
+
+@implementation MyObject
+- (void)innsmouth {}
+- (void)rlyeh {}
+- (void)dunwich {}
+@end
+
+@implementation Lovecraft
+- (void)innsmouth {}
+- (void)rlyeh {}
+@end
+
+@implementation Shoggoth
+- (void)dunwich {}
+@end
+
+@implementation Shoggoth_2 // expected-warning {{method 'innsmouth' in protocol 'ProtocolB' not implemented}}\
+ // expected-warning {{method 'rlyeh' in protocol 'ProtocolA' not implemented}}\
+ // expected-warning {{'innsmouth' in protocol 'ProtocolA' not implemented}}
+- (void)dunwich {}
+@end
+
+@implementation Shoggoth_Explicit // expected-warning {{method 'innsmouth' in protocol 'ProtocolB_Explicit' not implemented}}
+- (void)dunwich {}
+@end
+
+@implementation Shoggoth_2_Explicit // expected-warning {{method 'innsmouth' in protocol 'ProtocolB_Explicit' not implemented}}\
+ // expected-warning {{method 'rlyeh' in protocol 'ProtocolA' not implemented}}\
+ // expected-warning {{method 'innsmouth' in protocol 'ProtocolA' not implemented}}
+- (void)dunwich {}
+@end
+
+// Categories adopting a protocol with explicit conformance need to implement that protocol.
+@interface Parent
+- (void) theBestOfTimes;
+@property (readonly) id theWorstOfTimes;
+@end
+
+@interface Derived : Parent
+@end
+
+@interface Derived (MyCat) <Protocol>
+@end
+
+@implementation Derived (MyCat) // expected-warning {{method 'theBestOfTimes' in protocol 'Protocol' not implemented}}
+@end
+
+__attribute__((objc_protocol_requires_explicit_implementation)) // expected-error{{attribute 'objc_protocol_requires_explicit_implementation' can only be applied to @protocol definitions, not forward declarations}}
+@protocol NotDefined;
+
+// Another complete hierarchy.
+ __attribute__((objc_protocol_requires_explicit_implementation))
+@protocol Ex2FooBar
+- (void)methodA;
+@end
+
+ __attribute__((objc_protocol_requires_explicit_implementation))
+@protocol Ex2ProtocolA
+- (void)methodB;
+@end
+
+ __attribute__((objc_protocol_requires_explicit_implementation))
+@protocol Ex2ProtocolB <Ex2ProtocolA>
+- (void)methodA; // expected-note {{method 'methodA' declared here}}
+@end
+
+// NOT required
+@protocol Ex2ProtocolC <Ex2ProtocolA>
+- (void)methodB;
+- (void)methodA;
+@end
+
+@interface Ex2ClassA <Ex2ProtocolC, Ex2FooBar>
+@end
+@implementation Ex2ClassA
+- (void)methodB {}
+- (void)methodA {}
+@end
+
+@interface Ex2ClassB : Ex2ClassA <Ex2ProtocolB>
+@end
+
+@implementation Ex2ClassB // expected-warning {{method 'methodA' in protocol 'Ex2ProtocolB' not implemented}}
+@end
+
diff --git a/test/SemaObjC/selector-1.m b/test/SemaObjC/selector-1.m
index 186e19fead83..4efa0d711787 100644
--- a/test/SemaObjC/selector-1.m
+++ b/test/SemaObjC/selector-1.m
@@ -1,20 +1,31 @@
-// RUN: %clang_cc1 -verify %s
-// expected-no-diagnostics
+// RUN: %clang_cc1 -Wselector-type-mismatch -verify %s
@interface I
-- (id) compare: (char) arg1;
+- (id) compare: (char) arg1; // expected-note {{method 'compare:' declared here}}
- length;
@end
@interface J
-- (id) compare: (id) arg1;
+- (id) compare: (id) arg1; // expected-note {{method 'compare:' declared here}}
@end
SEL func()
{
- return @selector(compare:); // Non warning on multiple selector found.
+ return @selector(compare:); // expected-warning {{several methods with selector 'compare:' of mismatched types are found for the @selector expression}}
}
+// rdar://16458579
+void Test16458579() {
+ SEL s = @selector((retain));
+ SEL s1 = @selector((meth1:));
+ SEL s2 = @selector((retainArgument::));
+ SEL s3 = @selector((retainArgument:::::));
+ SEL s4 = @selector((retainArgument:with:));
+ SEL s5 = @selector((meth1:with:with:));
+ SEL s6 = @selector((getEnum:enum:bool:));
+ SEL s7 = @selector((char:float:double:unsigned:short:long:));
+ SEL s9 = @selector((:enum:bool:));
+}
int main() {
SEL s = @selector(retain);
SEL s1 = @selector(meth1:);
@@ -27,3 +38,26 @@ int main() {
SEL s9 = @selector(:enum:bool:);
}
+
+// rdar://15794055
+@interface NSObject @end
+
+@class NSNumber;
+
+@interface XBRecipe : NSObject
+@property (nonatomic, assign) float finalVolume; // expected-note {{method 'setFinalVolume:' declared here}}
+@end
+
+@interface XBDocument : NSObject
+@end
+
+@interface XBDocument ()
+- (void)setFinalVolume:(NSNumber *)finalVolumeNumber; // expected-note {{method 'setFinalVolume:' declared here}}
+@end
+
+@implementation XBDocument
+- (void)setFinalVolume:(NSNumber *)finalVolumeNumber
+{
+ (void)@selector(setFinalVolume:); // expected-warning {{several methods with selector 'setFinalVolume:' of mismatched types are found for the @selector expression}}
+}
+@end
diff --git a/test/SemaObjC/selector-3.m b/test/SemaObjC/selector-3.m
index d782c784f1de..dfd216a16fa9 100644
--- a/test/SemaObjC/selector-3.m
+++ b/test/SemaObjC/selector-3.m
@@ -14,7 +14,7 @@
- (void) foo
{
SEL a,b,c;
- a = @selector(b1ar); // expected-warning {{creating selector for nonexistent method 'b1ar'}}
+ a = @selector(b1ar);
b = @selector(bar);
}
@end
@@ -25,7 +25,7 @@
SEL func()
{
- return @selector(length); // expected-warning {{creating selector for nonexistent method 'length'}}
+ return @selector(length); // expected-warning {{no method with selector 'length' is implemented in this translation unit}}
}
// rdar://9545564
@@ -69,7 +69,7 @@ extern SEL MySelector(SEL s);
@implementation INTF
- (void) Meth {
- if( [cnx respondsToSelector:MySelector(@selector( _setQueue: ))] ) // expected-warning {{creating selector for nonexistent method '_setQueue:'}}
+ if( [cnx respondsToSelector:MySelector(@selector( _setQueue: ))] )
{
}
@@ -84,23 +84,23 @@ extern SEL MySelector(SEL s);
// rdar://14007194
@interface UxTechTest : NSObject
-- (int) invalidate : (id)Arg; // expected-warning {{multiple selectors named 'invalidate:' found}}
-+ (int) C_invalidate : (int)arg; // expected-warning {{multiple selectors named 'C_invalidate:' found}}
+- (int) invalidate : (id)Arg;
++ (int) C_invalidate : (int)arg;
@end
@interface UxTechTest(CAT)
-- (char) invalidate : (int)arg; // expected-note {{also found}}
-+ (int) C_invalidate : (char)arg; // expected-note {{also found}}
+- (char) invalidate : (int)arg;
++ (int) C_invalidate : (char)arg;
@end
@interface NSPort : NSObject
-- (double) invalidate : (void*)Arg1; // expected-note {{also found}}
-+ (int) C_invalidate : (id*)arg; // expected-note {{also found}}
+- (double) invalidate : (void*)Arg1;
++ (int) C_invalidate : (id*)arg;
@end
@interface USEText : NSPort
-- (int) invalidate : (int)arg; // expected-note {{also found}}
+- (int) invalidate : (int)arg;
@end
@implementation USEText
@@ -110,3 +110,27 @@ extern SEL MySelector(SEL s);
@interface USETextSub : USEText
- (int) invalidate : (id)arg;
@end
+
+// rdar://16428638
+@interface I16428638
+- (int) compare: (I16428638 *) arg1; // commenting out this line avoids the warning
+@end
+
+@interface J16428638
+- (int) compare: (J16428638 *) arg1;
+@end
+
+@implementation J16428638
+- (void)method {
+ SEL s = @selector(compare:); // spurious warning
+ (void)s;
+}
+- (int) compare: (J16428638 *) arg1 {
+ return 0;
+}
+@end
+
+void test16428638() {
+ SEL s = @selector(compare:);
+ (void)s;
+}
diff --git a/test/SemaObjC/selector-4.m b/test/SemaObjC/selector-4.m
new file mode 100644
index 000000000000..59a8233f6bc1
--- /dev/null
+++ b/test/SemaObjC/selector-4.m
@@ -0,0 +1,28 @@
+// RUN: %clang_cc1 -Wselector -x objective-c %s -include %s -verify
+// expected-no-diagnostics
+// rdar://16600230
+
+#ifndef INCLUDED
+#define INCLUDED
+
+#pragma clang system_header
+
+@interface NSObject @end
+@interface NSString @end
+
+@interface NSString (NSStringExtensionMethods)
+- (void)compare:(NSString *)string;
+@end
+
+@interface MyObject : NSObject
+@end
+
+#else
+int main() {
+ (void)@selector(compare:);
+}
+
+@implementation MyObject
+
+@end
+#endif
diff --git a/test/SemaObjC/selector-overload.m b/test/SemaObjC/selector-overload.m
index 53ba6f7e7e32..447607a1f754 100644
--- a/test/SemaObjC/selector-overload.m
+++ b/test/SemaObjC/selector-overload.m
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 %s -fsyntax-only
+// FIXME: This test needs needs to be run with -verify
@interface NSObject
+ alloc;
diff --git a/test/SemaObjC/special-dep-unavail-warning.m b/test/SemaObjC/special-dep-unavail-warning.m
index a179647ebccd..9e16b331c23c 100644
--- a/test/SemaObjC/special-dep-unavail-warning.m
+++ b/test/SemaObjC/special-dep-unavail-warning.m
@@ -4,48 +4,48 @@
@interface B
- (void) depInA;
- (void) unavailMeth __attribute__((unavailable)); // expected-note {{has been explicitly marked unavailable here}}
-- (void) depInA1 __attribute__((deprecated));
+- (void) depInA1 __attribute__((deprecated)); // expected-note {{'depInA1' has been explicitly marked deprecated here}}
- (void) unavailMeth1;
-- (void) depInA2 __attribute__((deprecated));
+- (void) depInA2 __attribute__((deprecated)); // expected-note {{'depInA2' has been explicitly marked deprecated here}}
- (void) unavailMeth2 __attribute__((unavailable)); // expected-note {{has been explicitly marked unavailable here}}
- (void) depunavailInA;
- (void) depunavailInA1 __attribute__((deprecated)) __attribute__((unavailable)); // expected-note {{has been explicitly marked unavailable here}}
-- (void)FuzzyMeth __attribute__((deprecated));
+- (void)FuzzyMeth __attribute__((deprecated)); // expected-note {{'FuzzyMeth' has been explicitly marked deprecated here}}
- (void)FuzzyMeth1 __attribute__((unavailable));
@end
@interface A
- (void) unavailMeth1 __attribute__((unavailable)); // expected-note {{has been explicitly marked unavailable here}}
-- (void) depInA __attribute__((deprecated));
+- (void) depInA __attribute__((deprecated)); // expected-note {{'depInA' has been explicitly marked deprecated here}}
- (void) depInA2 __attribute__((deprecated));
- (void) depInA1;
- (void) unavailMeth2 __attribute__((unavailable));
- (void) depunavailInA __attribute__((deprecated)) __attribute__((unavailable)); // expected-note {{has been explicitly marked unavailable here}}
- (void) depunavailInA1;
- (void)FuzzyMeth __attribute__((unavailable));
-- (void)FuzzyMeth1 __attribute__((deprecated));
+- (void)FuzzyMeth1 __attribute__((deprecated)); // expected-note {{'FuzzyMeth1' has been explicitly marked deprecated here}}
@end
-@class C; // expected-note 5 {{forward declaration of class here}}
+@class C; // expected-note 10 {{forward declaration of class here}}
void test(C *c) {
- [c depInA]; // expected-warning {{'depInA' maybe deprecated because receiver type is unknown}}
- [c unavailMeth]; // expected-warning {{'unavailMeth' maybe unavailable because receiver type is unknown}}
- [c depInA1]; // expected-warning {{'depInA1' maybe deprecated because receiver type is unknown}}
- [c unavailMeth1]; // expected-warning {{'unavailMeth1' maybe unavailable because receiver type is unknown}}
- [c depInA2]; // expected-warning {{'depInA2' maybe deprecated because receiver type is unknown}}
- [c unavailMeth2]; // expected-warning {{'unavailMeth2' maybe unavailable because receiver type is unknown}}
- [c depunavailInA]; // expected-warning {{'depunavailInA' maybe unavailable because receiver type is unknown}}
- [c depunavailInA1];// expected-warning {{'depunavailInA1' maybe unavailable because receiver type is unknown}}
- [c FuzzyMeth]; // expected-warning {{'FuzzyMeth' maybe deprecated because receiver type is unknown}}
- [c FuzzyMeth1]; // expected-warning {{'FuzzyMeth1' maybe deprecated because receiver type is unknown}}
+ [c depInA]; // expected-warning {{'depInA' may be deprecated because the receiver type is unknown}}
+ [c unavailMeth]; // expected-warning {{'unavailMeth' may be unavailable because the receiver type is unknown}}
+ [c depInA1]; // expected-warning {{'depInA1' may be deprecated because the receiver type is unknown}}
+ [c unavailMeth1]; // expected-warning {{'unavailMeth1' may be unavailable because the receiver type is unknown}}
+ [c depInA2]; // expected-warning {{'depInA2' may be deprecated because the receiver type is unknown}}
+ [c unavailMeth2]; // expected-warning {{'unavailMeth2' may be unavailable because the receiver type is unknown}}
+ [c depunavailInA]; // expected-warning {{'depunavailInA' may be unavailable because the receiver type is unknown}}
+ [c depunavailInA1];// expected-warning {{'depunavailInA1' may be unavailable because the receiver type is unknown}}
+ [c FuzzyMeth]; // expected-warning {{'FuzzyMeth' may be deprecated because the receiver type is unknown}}
+ [c FuzzyMeth1]; // expected-warning {{'FuzzyMeth1' may be deprecated because the receiver type is unknown}}
}
// rdar://10268422
__attribute ((deprecated))
-@interface DEPRECATED // expected-note {{declared here}}
+@interface DEPRECATED // expected-note {{'DEPRECATED' has been explicitly marked deprecated here}}
+(id)new;
@end
diff --git a/test/SemaObjC/tentative-property-decl.m b/test/SemaObjC/tentative-property-decl.m
index aa7df5294a8a..a9649b644c31 100644
--- a/test/SemaObjC/tentative-property-decl.m
+++ b/test/SemaObjC/tentative-property-decl.m
@@ -1,10 +1,11 @@
// RUN: %clang_cc1 -fsyntax-only -Weverything -verify %s
+// expected-no-diagnostics
// rdar://11656982
-/** Normally, a property cannot be both 'readonly' and having a "write" attribute
+/** A property may not be both 'readonly' and having a memory management attribute
(copy/retain/etc.). But, property declaration in primary class and protcols
are tentative as they may be overridden into a 'readwrite' property in class
- extensions. Postpone diagnosing such warnings until the class implementation
- is seen.
+ extensions. So, do not issue any warning on 'readonly' and memory management
+ attributes in a property.
*/
@interface Super {
@@ -14,8 +15,8 @@
@class NSString;
@interface MyClass : Super
-@property(nonatomic, copy, readonly) NSString *prop; // expected-warning {{property attributes 'readonly' and 'copy' are mutually exclusive}}
-@property(nonatomic, copy, readonly) id warnProp; // expected-warning {{property attributes 'readonly' and 'copy' are mutually exclusive}}
+@property(nonatomic, copy, readonly) NSString *prop;
+@property(nonatomic, copy, readonly) id warnProp;
@end
@interface MyClass ()
@@ -29,8 +30,8 @@
@protocol P
-@property(nonatomic, copy, readonly) NSString *prop; // expected-warning {{property attributes 'readonly' and 'copy' are mutually exclusive}}
-@property(nonatomic, copy, readonly) id warnProp; // expected-warning {{property attributes 'readonly' and 'copy' are mutually exclusive}}
+@property(nonatomic, copy, readonly) NSString *prop;
+@property(nonatomic, copy, readonly) id warnProp;
@end
@interface YourClass : Super <P>
diff --git a/test/SemaObjC/undef-protocol-methods-1.m b/test/SemaObjC/undef-protocol-methods-1.m
index 25b1dadb7cce..4858faf28031 100644
--- a/test/SemaObjC/undef-protocol-methods-1.m
+++ b/test/SemaObjC/undef-protocol-methods-1.m
@@ -22,13 +22,10 @@
+ (void) cls_meth : (int) arg1; // expected-note {{method 'cls_meth:' declared here}}
@end
-@interface INTF <PROTO> // expected-note 3 {{required for direct or indirect protocol 'PROTO'}} \
- // expected-note 2 {{required for direct or indirect protocol 'P1'}} \
- // expected-note 2 {{required for direct or indirect protocol 'P3'}} \
- // expected-note 2 {{required for direct or indirect protocol 'P2'}}
+@interface INTF <PROTO>
@end
-@implementation INTF // expected-warning 9 {{in protocol not implemented}}
+@implementation INTF // expected-warning 9 {{in protocol '}}
- (void) DefP1proto{}
+ (void) DefClsP3Proto{}
@end
diff --git a/test/SemaObjC/unsued-backing-ivar-warning.m b/test/SemaObjC/unsued-backing-ivar-warning.m
deleted file mode 100644
index c07dea71a7e1..000000000000
--- a/test/SemaObjC/unsued-backing-ivar-warning.m
+++ /dev/null
@@ -1,76 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -Wunused-property-ivar -verify -Wno-objc-root-class %s
-// rdar://14989999
-
-@interface NSObject @end
-
-@interface Example : NSObject
-@property (nonatomic, copy) id t; // expected-note {{property declared here}}
-@property (nonatomic, copy) id u; // expected-note {{property declared here}}
-@property (nonatomic, copy) id v; // expected-note {{property declared here}}
-@property (nonatomic, copy) id w;
-@property (nonatomic, copy) id x; // expected-note {{property declared here}}
-@property (nonatomic, copy) id y; // expected-note {{property declared here}}
-@property (nonatomic, copy) id z;
-@property (nonatomic, copy) id ok;
-@end
-
-@implementation Example
-- (void) setX:(id)newX { // expected-warning {{ivar '_x' which backs the property is not referenced in this property's accessor}}
- _y = newX;
-}
-- (id) y { // expected-warning {{ivar '_y' which backs the property is not referenced in this property's accessor}}
- return _v;
-}
-
-- (void) setV:(id)newV { // expected-warning {{ivar '_v' which backs the property is not referenced in this property's accessor}}
- _y = newV;
-}
-
-// No warning here because there is no backing ivar.
-// both setter/getter are user defined.
-- (void) setW:(id)newW {
- _y = newW;
-}
-- (id) w {
- return _v;
-}
-
-- (id) u { // expected-warning {{ivar '_u' which backs the property is not referenced in this property's accessor}}
- return _v;
-}
-
-@synthesize ok = okIvar;
-- (void) setOk:(id)newOk {
- okIvar = newOk;
-}
-
-@synthesize t = tIvar;
-- (void) setT:(id)newT { // expected-warning {{ivar 'tIvar' which backs the property is not referenced in this property's accessor}}
- okIvar = newT;
-}
-@end
-
-// rdar://15473432
-typedef char BOOL;
-@interface CalDAVServerVersion {
- BOOL _supportsTimeRangeFilterWithoutEndDate;
-}
-@property (nonatomic, readonly,nonatomic) BOOL supportsTimeRangeFilterWithoutEndDate;
-@end
-
-@interface CalDAVConcreteServerVersion : CalDAVServerVersion {
-}
-@end
-
-@interface CalendarServerVersion : CalDAVConcreteServerVersion
-@end
-
-@implementation CalDAVServerVersion
-@synthesize supportsTimeRangeFilterWithoutEndDate=_supportsTimeRangeFilterWithoutEndDate;
-@end
-
-@implementation CalendarServerVersion
--(BOOL)supportsTimeRangeFilterWithoutEndDate {
- return 0;
-}
-@end
diff --git a/test/SemaObjC/unused-backing-ivar-warning.m b/test/SemaObjC/unused-backing-ivar-warning.m
new file mode 100644
index 000000000000..52067c73d981
--- /dev/null
+++ b/test/SemaObjC/unused-backing-ivar-warning.m
@@ -0,0 +1,203 @@
+// RUN: %clang_cc1 -fsyntax-only -Wunused-property-ivar -verify -Wno-objc-root-class %s
+// rdar://14989999
+
+@interface NSObject @end
+
+@interface Example : NSObject
+@property (nonatomic, copy) id t; // expected-note {{property declared here}}
+@property (nonatomic, copy) id u; // expected-note {{property declared here}}
+@property (nonatomic, copy) id v; // expected-note {{property declared here}}
+@property (nonatomic, copy) id w;
+@property (nonatomic, copy) id x; // expected-note {{property declared here}}
+@property (nonatomic, copy) id y; // expected-note {{property declared here}}
+@property (nonatomic, copy) id z;
+@property (nonatomic, copy) id ok;
+@end
+
+@implementation Example
+- (void) setX:(id)newX { // expected-warning {{ivar '_x' which backs the property is not referenced in this property's accessor}}
+ _y = newX;
+}
+- (id) y { // expected-warning {{ivar '_y' which backs the property is not referenced in this property's accessor}}
+ return _v;
+}
+
+- (void) setV:(id)newV { // expected-warning {{ivar '_v' which backs the property is not referenced in this property's accessor}}
+ _y = newV;
+}
+
+// No warning here because there is no backing ivar.
+// both setter/getter are user defined.
+- (void) setW:(id)newW {
+ _y = newW;
+}
+- (id) w {
+ return _v;
+}
+
+- (id) u { // expected-warning {{ivar '_u' which backs the property is not referenced in this property's accessor}}
+ return _v;
+}
+
+@synthesize ok = okIvar;
+- (void) setOk:(id)newOk {
+ okIvar = newOk;
+}
+
+@synthesize t = tIvar;
+- (void) setT:(id)newT { // expected-warning {{ivar 'tIvar' which backs the property is not referenced in this property's accessor}}
+ okIvar = newT;
+}
+@end
+
+// rdar://15473432
+typedef char BOOL;
+@interface CalDAVServerVersion {
+ BOOL _supportsTimeRangeFilterWithoutEndDate;
+}
+@property (nonatomic, readonly,nonatomic) BOOL supportsTimeRangeFilterWithoutEndDate;
+@end
+
+@interface CalDAVConcreteServerVersion : CalDAVServerVersion {
+}
+@end
+
+@interface CalendarServerVersion : CalDAVConcreteServerVersion
+@end
+
+@implementation CalDAVServerVersion
+@synthesize supportsTimeRangeFilterWithoutEndDate=_supportsTimeRangeFilterWithoutEndDate;
+@end
+
+@implementation CalendarServerVersion
+-(BOOL)supportsTimeRangeFilterWithoutEndDate {
+ return 0;
+}
+@end
+
+// rdar://15630719
+@interface CDBModifyRecordsOperation : NSObject
+@property (nonatomic, assign) BOOL atomic;
+@end
+
+@class NSString;
+
+@implementation CDBModifyRecordsOperation
+- (void)setAtomic:(BOOL)atomic {
+ if (atomic == __objc_yes) {
+ NSString *recordZoneID = 0;
+ }
+ _atomic = atomic;
+}
+@end
+
+// rdar://15728901
+@interface GATTOperation : NSObject {
+ long operation;
+}
+@property(assign) long operation;
+@end
+
+@implementation GATTOperation
+@synthesize operation;
++ (id) operation {
+ return 0;
+}
+@end
+
+// rdar://15727327
+@interface Radar15727327 : NSObject
+@property (assign, readonly) long p;
+@property (assign) long q; // expected-note 2 {{property declared here}}
+@property (assign, readonly) long r; // expected-note {{property declared here}}
+- (long)Meth;
+@end
+
+@implementation Radar15727327
+@synthesize p;
+@synthesize q;
+@synthesize r;
+- (long)Meth { return p; }
+- (long) p { [self Meth]; return 0; }
+- (long) q { return 0; } // expected-warning {{ivar 'q' which backs the property is not referenced in this property's accessor}}
+- (void) setQ : (long) val { } // expected-warning {{ivar 'q' which backs the property is not referenced in this property's accessor}}
+- (long) r { [self Meth]; return p; } // expected-warning {{ivar 'r' which backs the property is not referenced in this property's accessor}}
+@end
+
+@interface I1
+@property (readonly) int p1;
+@property (readonly) int p2; // expected-note {{property declared here}}
+@end
+
+@implementation I1
+@synthesize p1=_p1;
+@synthesize p2=_p2;
+
+-(int)p1 {
+ return [self getP1];
+}
+-(int)getP1 {
+ return _p1;
+}
+-(int)getP2 {
+ return _p2;
+}
+-(int)p2 { // expected-warning {{ivar '_p2' which backs the property is not referenced in this property's accessor}}
+ Radar15727327 *o;
+ return [o Meth];
+}
+@end
+
+// rdar://15873425
+@protocol MyProtocol
+@property (nonatomic, readonly) int myProperty;
+@end
+
+@interface MyFirstClass : NSObject <MyProtocol>
+@end
+
+@interface MySecondClass : NSObject <MyProtocol>
+@end
+
+@implementation MyFirstClass
+@synthesize myProperty;
+@end
+
+@implementation MySecondClass
+@dynamic myProperty;
+-(int)myProperty // should not warn; property is dynamic
+{
+ return 0;
+}
+@end
+
+// rdar://15890251
+@class NSURL;
+
+@protocol MCCIDURLProtocolDataProvider
+@required
+@property(strong, atomic, readonly) NSURL *cidURL;
+@property(strong, atomic, readonly) NSURL *cidURL1; // expected-note {{property declared here}}
+@end
+
+@interface UnrelatedClass : NSObject <MCCIDURLProtocolDataProvider>
+@end
+
+@implementation UnrelatedClass
+@synthesize cidURL = _cidURL;
+@synthesize cidURL1 = _cidURL1;
+@end
+
+@interface MUIWebAttachmentController : NSObject <MCCIDURLProtocolDataProvider>
+@end
+
+
+@implementation MUIWebAttachmentController
+- (NSURL *)cidURL {
+ return 0;
+}
+@synthesize cidURL1 = _cidURL1;
+- (NSURL *)cidURL1 { // expected-warning {{ivar '_cidURL1' which backs the property is not referenced in this property's accessor}}
+ return 0;
+}
+@end
diff --git a/test/SemaObjC/unused.m b/test/SemaObjC/unused.m
index 3fd1cf04673f..6ea3fe8e00ab 100644
--- a/test/SemaObjC/unused.m
+++ b/test/SemaObjC/unused.m
@@ -72,3 +72,35 @@ static NSString *x = @"hi"; // expected-warning {{unused variable 'x'}}
- (void) b {}
- (void) a { [self b]; }
@end
+
+// Test that objc_precise_lifetime suppresses
+// unused variable warnings.
+extern void rdar15596883_foo(void);
+void rdar15596883(id x) {
+ __attribute__((objc_precise_lifetime)) id y = x; // no-warning
+ rdar15596883_foo();
+}
+
+@interface PropertyObject : NSObject
+@property int length;
+@end
+
+@protocol P
+@property int property;
+@end
+
+void test3(PropertyObject *o)
+{
+ [o length]; // expected-warning {{property access result unused - getters should not be used for side effects}}
+ (void)[o length];
+}
+
+void test4(id o)
+{
+ [o length]; // No warning.
+}
+
+void test5(id <P> p)
+{
+ [p property]; // expected-warning {{property access result unused - getters should not be used for side effects}}
+}
diff --git a/test/SemaObjC/warn-deprecated-implementations.m b/test/SemaObjC/warn-deprecated-implementations.m
index f63962f96180..6e208b5be795 100644
--- a/test/SemaObjC/warn-deprecated-implementations.m
+++ b/test/SemaObjC/warn-deprecated-implementations.m
@@ -11,13 +11,13 @@
@end
@interface A()
-- (void) E __attribute__((deprecated)); // expected-note {{method 'E' declared here}}
+- (void) E __attribute__((deprecated));
@end
@implementation A
+ (void)F { } // No warning, implementing its own deprecated method
- (void) D {} // expected-warning {{Implementing deprecated method}}
-- (void) E {} // expected-warning {{Implementing deprecated method}}
+- (void) E {} // No warning, implementing deprecated method in its class extension.
@end
@interface A(CAT)
@@ -29,7 +29,7 @@
@end
__attribute__((deprecated))
-@interface CL // expected-note 2 {{class declared here}} // expected-note 2 {{declared here}}
+@interface CL // expected-note 2 {{class declared here}} // expected-note 2 {{'CL' has been explicitly marked deprecated here}}
@end
@implementation CL // expected-warning {{Implementing deprecated class}}
@@ -53,3 +53,15 @@ __attribute__((deprecated))
- (void) B {} // expected-warning {{Implementing deprecated method}}
@end
+@interface Test
+@end
+
+@interface Test()
+- (id)initSpecialInPrivateHeader __attribute__((deprecated));
+@end
+
+@implementation Test
+- (id)initSpecialInPrivateHeader {
+ return (void *)0;
+}
+@end
diff --git a/test/SemaObjC/warn-forward-class-attr-deprecated.m b/test/SemaObjC/warn-forward-class-attr-deprecated.m
index 854ff699eed4..cb118c3caf4b 100644
--- a/test/SemaObjC/warn-forward-class-attr-deprecated.m
+++ b/test/SemaObjC/warn-forward-class-attr-deprecated.m
@@ -4,7 +4,7 @@
@class ABGroupImportFilesScope; // expected-note {{forward declaration of class here}}
@interface I1
-- (id) filenames __attribute__((deprecated));
+- (id) filenames __attribute__((deprecated)); // expected-note {{'filenames' has been explicitly marked deprecated here}}
@end
@interface I2
@@ -16,7 +16,7 @@
@implementation I2
- (id) Meth : (ABGroupImportFilesScope*) scope
{
- id p = [self initWithAccount : 0 filenames :[scope filenames]]; // expected-warning {{'filenames' maybe deprecated because receiver type is unknown}}
+ id p = [self initWithAccount : 0 filenames :[scope filenames]]; // expected-warning {{'filenames' may be deprecated because the receiver type is unknown}}
return 0;
}
- (id) filenames { return 0; }
diff --git a/test/SemaObjC/warn-protocol-method-deprecated.m b/test/SemaObjC/warn-protocol-method-deprecated.m
index 928694db2528..70dd394845ce 100644
--- a/test/SemaObjC/warn-protocol-method-deprecated.m
+++ b/test/SemaObjC/warn-protocol-method-deprecated.m
@@ -3,7 +3,7 @@
@protocol TestProtocol
- (void)newProtocolMethod;
-- (void)deprecatedProtocolMethod __attribute__((deprecated)); // expected-note 2 {{method 'deprecatedProtocolMethod' declared here}}
+- (void)deprecatedProtocolMethod __attribute__((deprecated)); // expected-note 2 {{'deprecatedProtocolMethod' has been explicitly marked deprecated here}}
@end
@interface NSObject @end
@@ -11,7 +11,7 @@
@interface TestClass : NSObject <TestProtocol>
- (void)newInstanceMethod;
-- (void)deprecatedInstanceMethod __attribute__((deprecated)); // expected-note {{method 'deprecatedInstanceMethod' declared here}}
+- (void)deprecatedInstanceMethod __attribute__((deprecated)); // expected-note {{'deprecatedInstanceMethod' has been explicitly marked deprecated here}}
@end
diff --git a/test/SemaObjC/warn-retain-cycle.m b/test/SemaObjC/warn-retain-cycle.m
index eb4e966c7726..4398d29e4a8c 100644
--- a/test/SemaObjC/warn-retain-cycle.m
+++ b/test/SemaObjC/warn-retain-cycle.m
@@ -122,8 +122,8 @@ void doSomething(unsigned v);
// Sanity check that we are really whitelisting 'addOperationWithBlock:' and not doing
// something funny.
[myOperationQueue addSomethingElse:^() { // expected-note {{block will be retained by an object strongly retained by the captured object}}
- if (count > 20) { // expected-warning {{capturing 'self' strongly in this block is likely to lead to a retain cycle}}
- doSomething(count);
+ if (count > 20) {
+ doSomething(count); // expected-warning {{capturing 'self' strongly in this block is likely to lead to a retain cycle}}
}
}];
}
@@ -184,3 +184,17 @@ void testCopying(Test0 *obj) {
})];
}
+// rdar://16944538
+void func(int someCondition) {
+
+__block void(^myBlock)(void) = ^{
+ if (someCondition) {
+ doSomething(1);
+ myBlock();
+ }
+ else {
+ myBlock = ((void*)0);
+ }
+ };
+
+}
diff --git a/test/SemaObjC/warn-thread-safety-analysis.m b/test/SemaObjC/warn-thread-safety-analysis.m
new file mode 100644
index 000000000000..0e29ff253527
--- /dev/null
+++ b/test/SemaObjC/warn-thread-safety-analysis.m
@@ -0,0 +1,19 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wthread-safety -Wthread-safety-beta -Wno-objc-root-class %s
+
+struct __attribute__ ((lockable)) Mutex {};
+
+struct Mutex mu1;
+
+int Foo_fun1(int i) __attribute__ ((exclusive_locks_required((mu1)))) {
+ return i;
+}
+
+@interface test
+@end
+
+@implementation test
+- (void) PR19541 {
+ Foo_fun1(1); // expected-warning{{calling function 'Foo_fun1' requires holding mutex 'mu1' exclusively}}
+}
+
+@end
diff --git a/test/SemaObjC/warn-unreachable.m b/test/SemaObjC/warn-unreachable.m
index 832cbd23d27e..366767629d2d 100644
--- a/test/SemaObjC/warn-unreachable.m
+++ b/test/SemaObjC/warn-unreachable.m
@@ -1,4 +1,4 @@
-// RUN: %clang %s -fsyntax-only -Xclang -verify -fblocks -Wunreachable-code -Wno-unused-value -Wno-covered-switch-default
+// RUN: %clang %s -fsyntax-only -Xclang -verify -fblocks -Wunreachable-code-aggressive -Wno-unused-value -Wno-covered-switch-default
// This previously triggered a warning from -Wunreachable-code because of
// a busted CFG.
@@ -15,3 +15,70 @@ void test_unreachable() {
return; // expected-warning {{will never be executed}}
}
+#define NO __objc_no
+#define YES __objc_yes
+#define CONFIG NO
+
+// Test that 'NO' and 'YES' are not treated as configuration macros.
+int test_NO() {
+ if (NO)
+ return 1; // expected-warning {{will never be executed}}
+ else
+ return 0;
+}
+
+int test_YES() {
+ if (YES)
+ return 1;
+ else
+ return 0; // expected-warning {{will never be executed}}
+}
+
+int test_CONFIG() {
+ if (CONFIG)
+ return 1;
+ else
+ return 0;
+}
+
+// FIXME: This should at some point report a warning
+// that the loop increment is unreachable.
+void test_loop_increment(id container) {
+ for (id x in container) { // no-warning
+ break;
+ }
+}
+
+void calledFun() {}
+
+// Test "silencing" with parentheses.
+void test_with_paren_silencing(int x) {
+ if (NO) calledFun(); // expected-warning {{will never be executed}} expected-note {{silence by adding parentheses to mark code as explicitly dead}}
+ if ((NO)) calledFun(); // no-warning
+
+ if (YES) // expected-note {{silence by adding parentheses to mark code as explicitly dead}}
+ calledFun();
+ else
+ calledFun(); // expected-warning {{will never be executed}}
+
+ if ((YES))
+ calledFun();
+ else
+ calledFun(); // no-warning
+
+ if (!YES) // expected-note {{silence by adding parentheses to mark code as explicitly dead}}
+ calledFun(); // expected-warning {{code will never be executed}}
+ else
+ calledFun();
+
+ if ((!YES))
+ calledFun(); // no-warning
+ else
+ calledFun();
+
+ if (!(YES))
+ calledFun(); // no-warning
+ else
+ calledFun();
+}
+
diff --git a/test/SemaObjCXX/arc-system-header.mm b/test/SemaObjCXX/arc-system-header.mm
index 3358e5fc1277..b97e2f3b1eb4 100644
--- a/test/SemaObjCXX/arc-system-header.mm
+++ b/test/SemaObjCXX/arc-system-header.mm
@@ -6,4 +6,4 @@ void f(A* a) {
a->data.void_ptr = 0;
a->data.a_b.b = 0; // expected-error{{'a_b' is unavailable: this system field has retaining ownership}}
}
-// expected-note@arc-system-header.h:10{{declaration has been explicitly marked unavailable here}}
+// expected-note@arc-system-header.h:10{{'a_b' has been explicitly marked unavailable here}}
diff --git a/test/SemaObjCXX/arc-templates.mm b/test/SemaObjCXX/arc-templates.mm
index b3519b957372..ebede6404f90 100644
--- a/test/SemaObjCXX/arc-templates.mm
+++ b/test/SemaObjCXX/arc-templates.mm
@@ -302,3 +302,19 @@ namespace rdar14467941 {
float &fr2 = takePtr<A>(a);
}
}
+
+namespace rdar15713945 {
+ template <class T> int &f(__strong T &);
+ template <class T> float &f(__weak T &);
+ template <class T> double &f(__unsafe_unretained T &);
+ template <class T> char &f(T &);
+
+ void foo() {
+ __strong NSString * const strong = 0;
+ int &ir = (f)(strong);
+ __weak NSString * const weak = 0;
+ float &fr = (f)(weak);
+ __unsafe_unretained NSString * const unsafe = 0;
+ double &dr = (f)(unsafe);
+ }
+}
diff --git a/test/SemaObjCXX/contextual-convert-to-id.mm b/test/SemaObjCXX/contextual-convert-to-id.mm
index 602d6c24a8d6..47a9d07d41c2 100644
--- a/test/SemaObjCXX/contextual-convert-to-id.mm
+++ b/test/SemaObjCXX/contextual-convert-to-id.mm
@@ -8,6 +8,10 @@
- unknownMethod;
@end
+@interface C : A
+- knownMethod;
+@end
+
template<typename T> struct RetainPtr {
explicit operator T*() const;
};
@@ -17,6 +21,16 @@ void methodCallToSpecific(RetainPtr<A> a) {
[a unknownMethod]; // expected-warning{{'A' may not respond to 'unknownMethod'}}
}
+void explicitCast(RetainPtr<A> a, RetainPtr<B> b, RetainPtr<C> c) {
+ (void)(A*)a;
+ (void)(A*)b; // expected-error{{cannot convert 'RetainPtr<B>' to 'A *' without a conversion operator}}
+ (void)(A*)c;
+ (void)(C*)a;
+ (void)static_cast<A*>(a);
+ (void)static_cast<A*>(b); // expected-error{{cannot convert 'RetainPtr<B>' to 'A *' without a conversion operator}}
+ (void)static_cast<A*>(c);
+}
+
struct Incomplete; // expected-note{{forward declaration}}
void methodCallToIncomplete(Incomplete &incomplete) {
@@ -31,3 +45,8 @@ void methodCallToId(IdPtr a) {
[a knownMethod];
[a unknownMethod];
}
+
+void explicitCast(IdPtr a) {
+ (void)(A*)a;
+ (void)static_cast<A*>(a);
+}
diff --git a/test/SemaObjCXX/crash.mm b/test/SemaObjCXX/crash.mm
index 345f72e6093e..521b923cc00d 100644
--- a/test/SemaObjCXX/crash.mm
+++ b/test/SemaObjCXX/crash.mm
@@ -14,10 +14,10 @@ namespace std {
@implementation Test
struct EvilStruct {
-} // note the missing semicolon
+} // expected-error {{expected ';' after struct}}
- typedef std::pair<int, int> IntegerPair; // expected-error{{typedef declarator cannot be qualified}} \
-// expected-error{{typedef name must be an identifier}} \
-// expected-error{{expected ';' after top level declarator}}
+ typedef std::pair<int, int> IntegerPair;
+
+template<typename...Ts> void f(Ts); // expected-error {{unexpanded}} expected-warning {{extension}}
@end
diff --git a/test/SemaObjCXX/exceptions-fragile.mm b/test/SemaObjCXX/exceptions-fragile.mm
index 54d9f83ed5a1..ff5a0cb4cd3c 100644
--- a/test/SemaObjCXX/exceptions-fragile.mm
+++ b/test/SemaObjCXX/exceptions-fragile.mm
@@ -6,7 +6,7 @@ void opaque();
namespace test0 {
void test() {
try {
- } catch (NSException *e) { // expected-warning {{can not catch an exception thrown with @throw in C++ in the non-unified exception model}}
+ } catch (NSException *e) { // expected-warning {{cannot catch an exception thrown with @throw in C++ in the non-unified exception model}}
}
}
}
diff --git a/test/SemaObjCXX/instantiate-property-access.mm b/test/SemaObjCXX/instantiate-property-access.mm
new file mode 100644
index 000000000000..8d5c201a80a1
--- /dev/null
+++ b/test/SemaObjCXX/instantiate-property-access.mm
@@ -0,0 +1,35 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// expected-no-diagnostics
+
+class C {};
+bool operator == (C c1, C c2);
+
+bool operator == (C c1, int i);
+bool operator == (int i, C c2);
+
+C operator += (C c1, C c2);
+
+enum TextureType { TextureType3D };
+
+@interface Texture
+@property int textureType;
+@property C c;
+@end
+
+template <typename> class Framebuffer {
+public:
+ Texture **color_attachment;
+ Framebuffer();
+};
+
+template <typename T> Framebuffer<T>::Framebuffer() {
+ (void)(color_attachment[0].textureType == TextureType3D);
+ color_attachment[0].textureType += 1;
+ (void)(color_attachment[0].c == color_attachment[0].c);
+ (void)(color_attachment[0].c == 1);
+ (void)(1 == color_attachment[0].c);
+}
+
+void foo() {
+ Framebuffer<int>();
+}
diff --git a/test/SemaObjCXX/lit.local.cfg b/test/SemaObjCXX/lit.local.cfg
new file mode 100644
index 000000000000..f4ef5d2fa02d
--- /dev/null
+++ b/test/SemaObjCXX/lit.local.cfg
@@ -0,0 +1,4 @@
+config.substitutions = list(config.substitutions)
+config.substitutions.insert(0,
+ (r'%clang\b',
+ """*** Do not use the driver in Sema tests. ***""") )
diff --git a/test/SemaObjCXX/microsoft-abi-byval.mm b/test/SemaObjCXX/microsoft-abi-byval.mm
index f0c4caa9e06d..a44f24085dc2 100644
--- a/test/SemaObjCXX/microsoft-abi-byval.mm
+++ b/test/SemaObjCXX/microsoft-abi-byval.mm
@@ -1,7 +1,8 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -cxx-abi microsoft -Wno-objc-root-class %s
+// RUN: %clang_cc1 -fsyntax-only -verify -triple %ms_abi_triple -Wno-objc-root-class %s
+// expected-no-diagnostics
class Foo {
- ~Foo(); // expected-note {{implicitly declared private here}}
+ ~Foo();
};
@interface bar
@@ -9,6 +10,6 @@ class Foo {
@end
@implementation bar
-- (void) my_method: (Foo)arg { // expected-error {{variable of type 'Foo' has private destructor}}
+- (void) my_method: (Foo)arg { // no error; MS ABI will call Foo's dtor, but we skip the access check.
}
@end
diff --git a/test/SemaObjCXX/objcbridge-attribute-arc.mm b/test/SemaObjCXX/objcbridge-attribute-arc.mm
new file mode 100644
index 000000000000..43c8e2b4d2a9
--- /dev/null
+++ b/test/SemaObjCXX/objcbridge-attribute-arc.mm
@@ -0,0 +1,210 @@
+// RUN: %clang_cc1 -fsyntax-only -x objective-c++ -fobjc-arc -verify -Wno-objc-root-class %s
+// rdar://15454846
+
+typedef struct __attribute__ ((objc_bridge(NSError))) __CFErrorRef * CFErrorRef; // expected-note 5 {{declared here}}
+
+typedef struct __attribute__ ((objc_bridge(MyError))) __CFMyErrorRef * CFMyErrorRef; // expected-note 1 {{declared here}}
+
+typedef struct __attribute__((objc_bridge(12))) __CFMyColor *CFMyColorRef; // expected-error {{parameter of 'objc_bridge' attribute must be a single name of an Objective-C class}}
+
+typedef struct __attribute__ ((objc_bridge)) __CFArray *CFArrayRef; // expected-error {{'objc_bridge' attribute takes one argument}}
+
+typedef struct __attribute__((objc_bridge(NSLocale, NSError))) __CFLocale *CFLocaleRef;// expected-error {{use of undeclared identifier 'NSError'}}
+
+typedef struct __attribute__((objc_bridge(NSDictionary))) __CFDictionary * CFDictionaryRef;
+
+typedef union __attribute__((objc_bridge(NSUColor))) __CFUPrimeColor XXX;
+typedef XXX *CFUColor2Ref;
+
+@interface I
+{
+}
+@end
+
+@protocol NSTesting @end
+@class NSString;
+
+typedef struct __attribute__((objc_bridge(NSTesting))) __CFError *CFTestingRef; // expected-note {{declared here}}
+
+id Test1(CFTestingRef cf) {
+ return (NSString *)cf; // expected-error {{CF object of type 'CFTestingRef' (aka '__CFError *') is bridged to 'NSTesting', which is not an Objective-C class}} \
+ // expected-error {{cast of C pointer type 'CFTestingRef' (aka '__CFError *') to Objective-C pointer type 'NSString *' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFTestingRef' (aka '__CFError *') into ARC}}
+}
+
+typedef CFErrorRef CFErrorRef1;
+
+typedef CFErrorRef1 CFErrorRef2; // expected-note 2 {{declared here}}
+
+@protocol P1 @end
+@protocol P2 @end
+@protocol P3 @end
+@protocol P4 @end
+@protocol P5 @end
+
+@interface NSError<P1, P2, P3> @end // expected-note 5 {{declared here}}
+
+@interface MyError : NSError // expected-note 1 {{declared here}}
+@end
+
+@interface NSUColor @end
+
+@class NSString;
+
+void Test2(CFErrorRef2 cf, NSError *ns, NSString *str, Class c, CFUColor2Ref cf2) {
+ (void)(NSString *)cf; // expected-warning {{'CFErrorRef2' (aka '__CFErrorRef *') bridges to NSError, not 'NSString'}} \
+ // expected-error {{cast of C pointer type 'CFErrorRef2' (aka '__CFErrorRef *') to Objective-C pointer type 'NSString *' requires a bridged cast}} \
+ // expected-note {{__bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef2' (aka '__CFErrorRef *') into ARC}}
+ (void)(NSError *)cf; // expected-error {{cast of C pointer type 'CFErrorRef2' (aka '__CFErrorRef *') to Objective-C pointer type 'NSError *' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef2' (aka '__CFErrorRef *') into ARC}}
+ (void)(MyError*)cf; // expected-error {{cast of C pointer type 'CFErrorRef2' (aka '__CFErrorRef *') to Objective-C pointer type 'MyError *' requires a bridged cast}} \
+ // expected-note {{__bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef2' (aka '__CFErrorRef *') into ARC}}
+ (void)(NSUColor *)cf2; // expected-error {{cast of C pointer type 'CFUColor2Ref' (aka '__CFUPrimeColor *') to Objective-C pointer type 'NSUColor *' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFUColor2Ref' (aka '__CFUPrimeColor *') into ARC}}
+ (void)(CFErrorRef)ns; // expected-error {{cast of Objective-C pointer type 'NSError *' to C pointer type 'CFErrorRef' (aka '__CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka '__CFErrorRef *')}}
+ (void)(CFErrorRef)str; // expected-warning {{'NSString' cannot bridge to 'CFErrorRef' (aka '__CFErrorRef *')}} \\
+ // expected-error {{cast of Objective-C pointer type 'NSString *' to C pointer type 'CFErrorRef' (aka '__CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka '__CFErrorRef *')}}
+ (void)(Class)cf; // expected-warning {{'CFErrorRef2' (aka '__CFErrorRef *') bridges to NSError, not 'Class'}} \\
+ // expected-error {{cast of C pointer type 'CFErrorRef2' (aka '__CFErrorRef *') to Objective-C pointer type 'Class' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef2' (aka '__CFErrorRef *') into ARC}}
+ (void)(CFErrorRef)c; // expected-warning {{'__unsafe_unretained Class' cannot bridge to 'CFErrorRef' (aka '__CFErrorRef *}} \\
+ // expected-error {{cast of Objective-C pointer type 'Class' to C pointer type 'CFErrorRef' (aka '__CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka '__CFErrorRef *')}}
+}
+
+
+void Test3(CFErrorRef cf, NSError *ns) {
+ (void)(id)cf; // expected-error {{cast of C pointer type 'CFErrorRef' (aka '__CFErrorRef *') to Objective-C pointer type 'id' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef' (aka '__CFErrorRef *') into ARC}}
+ (void)(id<P1, P2>)cf; // expected-error {{cast of C pointer type 'CFErrorRef' (aka '__CFErrorRef *') to Objective-C pointer type 'id<P1,P2>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef' (aka '__CFErrorRef *') into ARC}}
+ (void)(id<P1, P2, P4>)cf; // expected-warning {{'CFErrorRef' (aka '__CFErrorRef *') bridges to NSError, not 'id<P1,P2,P4>'}} \
+ // expected-error {{cast of C pointer type 'CFErrorRef' (aka '__CFErrorRef *') to Objective-C pointer type 'id<P1,P2,P4>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef' (aka '__CFErrorRef *') into ARC}}
+}
+
+void Test4(CFMyErrorRef cf) {
+ (void)(id)cf; // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') to Objective-C pointer type 'id' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *') into ARC}}
+ (void)(id<P1, P2>)cf; // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') to Objective-C pointer type 'id<P1,P2>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *') into ARC}}
+ (void)(id<P1, P2, P3>)cf; // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') to Objective-C pointer type 'id<P1,P2,P3>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *') into ARC}}
+ (void)(id<P2, P3>)cf; // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') to Objective-C pointer type 'id<P2,P3>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *') into ARC}}
+ (void)(id<P1, P2, P4>)cf; // expected-warning {{'CFMyErrorRef' (aka '__CFMyErrorRef *') bridges to MyError, not 'id<P1,P2,P4>'}} \
+ // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') to Objective-C pointer type 'id<P1,P2,P4>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *') into ARC}}
+}
+
+void Test5(id<P1, P2, P3> P123, id ID, id<P1, P2, P3, P4> P1234, id<P1, P2> P12, id<P2, P3> P23) {
+ (void)(CFErrorRef)ID; // expected-error {{cast of Objective-C pointer type 'id' to C pointer type 'CFErrorRef' (aka '__CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka '__CFErrorRef *')}}
+ (void)(CFErrorRef)P123; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3>' to C pointer type 'CFErrorRef' (aka '__CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka '__CFErrorRef *')}}
+ (void)(CFErrorRef)P1234; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3,P4>' to C pointer type 'CFErrorRef' (aka '__CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka '__CFErrorRef *')}}
+ (void)(CFErrorRef)P12; // expected-error {{cast of Objective-C pointer type 'id<P1,P2>' to C pointer type 'CFErrorRef' (aka '__CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka '__CFErrorRef *')}}
+ (void)(CFErrorRef)P23; // expected-error {{cast of Objective-C pointer type 'id<P2,P3>' to C pointer type 'CFErrorRef' (aka '__CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka '__CFErrorRef *')}}
+}
+
+void Test6(id<P1, P2, P3> P123, id ID, id<P1, P2, P3, P4> P1234, id<P1, P2> P12, id<P2, P3> P23) {
+
+ (void)(CFMyErrorRef)ID; // expected-error {{cast of Objective-C pointer type 'id' to C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *')}}
+ (void)(CFMyErrorRef)P123; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3>' to C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *')}}
+ (void)(CFMyErrorRef)P1234; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3,P4>' to C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *')}}
+ (void)(CFMyErrorRef)P12; // expected-error {{cast of Objective-C pointer type 'id<P1,P2>' to C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *')}}
+ (void)(CFMyErrorRef)P23; // expected-error {{cast of Objective-C pointer type 'id<P2,P3>' to C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *')}}
+}
+
+typedef struct __attribute__ ((objc_bridge(MyPersonalError))) __CFMyPersonalErrorRef * CFMyPersonalErrorRef; // expected-note 1 {{declared here}}
+
+@interface MyPersonalError : NSError <P4> // expected-note 1 {{declared here}}
+@end
+
+void Test7(id<P1, P2, P3> P123, id ID, id<P1, P2, P3, P4> P1234, id<P1, P2> P12, id<P2, P3> P23) {
+ (void)(CFMyPersonalErrorRef)ID; // expected-error {{cast of Objective-C pointer type 'id' to C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *')}}
+ (void)(CFMyPersonalErrorRef)P123; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3>' to C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *')}}
+ (void)(CFMyPersonalErrorRef)P1234; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3,P4>' to C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *')}}
+ (void)(CFMyPersonalErrorRef)P12; // expected-error {{cast of Objective-C pointer type 'id<P1,P2>' to C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *')}}
+ (void)(CFMyPersonalErrorRef)P23; // expected-error {{cast of Objective-C pointer type 'id<P2,P3>' to C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *')}}
+}
+
+void Test8(CFMyPersonalErrorRef cf) {
+ (void)(id)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') to Objective-C pointer type 'id' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') into ARC}}
+ (void)(id<P1>)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') to Objective-C pointer type 'id<P1>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') into ARC}}
+ (void)(id<P1, P2>)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') to Objective-C pointer type 'id<P1,P2>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') into ARC}}
+ (void)(id<P1, P2, P3>)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') to Objective-C pointer type 'id<P1,P2,P3>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') into ARC}}
+ (void)(id<P1, P2, P3, P4>)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') to Objective-C pointer type 'id<P1,P2,P3,P4>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') into ARC}}
+ (void)(id<P1, P2, P3, P4, P5>)cf; // expected-warning {{'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') bridges to MyPersonalError, not 'id<P1,P2,P3,P4,P5>'}} \
+ // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') to Objective-C pointer type 'id<P1,P2,P3,P4,P5>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') into ARC}}
+}
+
+void Test9(CFErrorRef2 cf, NSError *ns, NSString *str, Class c, CFUColor2Ref cf2) {
+ (void)(__bridge NSString *)cf; // expected-warning {{'CFErrorRef2' (aka '__CFErrorRef *') bridges to NSError, not 'NSString'}}
+ (void)(__bridge NSError *)cf; // okay
+ (void)(__bridge MyError*)cf; // okay,
+ (void)(__bridge NSUColor *)cf2; // okay
+ (void)(__bridge CFErrorRef)ns; // okay
+ (void)(__bridge CFErrorRef)str; // expected-warning {{'NSString' cannot bridge to 'CFErrorRef' (aka '__CFErrorRef *')}}
+ (void)(__bridge Class)cf; // expected-warning {{'CFErrorRef2' (aka '__CFErrorRef *') bridges to NSError, not 'Class'}}
+ (void)(__bridge CFErrorRef)c; // expected-warning {{'__unsafe_unretained Class' cannot bridge to 'CFErrorRef' (aka '__CFErrorRef *')}}
+}
diff --git a/test/SemaObjCXX/objcbridge-attribute.mm b/test/SemaObjCXX/objcbridge-attribute.mm
new file mode 100644
index 000000000000..e777774d136f
--- /dev/null
+++ b/test/SemaObjCXX/objcbridge-attribute.mm
@@ -0,0 +1,210 @@
+// RUN: %clang_cc1 -fsyntax-only -x objective-c++ -fobjc-arc -verify -Wno-objc-root-class %s
+// rdar://15454846
+
+typedef struct __attribute__ ((objc_bridge(NSError))) __CFErrorRef * CFErrorRef; // expected-note 5 {{declared here}}
+
+typedef struct __attribute__ ((objc_bridge(MyError))) __CFMyErrorRef * CFMyErrorRef; // expected-note 1 {{declared here}}
+
+typedef struct __attribute__((objc_bridge(12))) __CFMyColor *CFMyColorRef; // expected-error {{parameter of 'objc_bridge' attribute must be a single name of an Objective-C class}}
+
+typedef struct __attribute__ ((objc_bridge)) __CFArray *CFArrayRef; // expected-error {{'objc_bridge' attribute takes one argument}}
+
+typedef struct __attribute__((objc_bridge(NSLocale, NSError))) __CFLocale *CFLocaleRef;// expected-error {{use of undeclared identifier 'NSError'}}
+
+typedef struct __attribute__((objc_bridge(NSDictionary))) __CFDictionary * CFDictionaryRef;
+
+typedef union __attribute__((objc_bridge(NSUColor))) __CFUPrimeColor XXX;
+typedef XXX *CFUColor2Ref;
+
+@interface I
+{
+}
+@end
+
+@protocol NSTesting @end
+@class NSString;
+
+typedef struct __attribute__((objc_bridge(NSTesting))) __CFError *CFTestingRef; // expected-note {{declared here}}
+
+id Test1(CFTestingRef cf) {
+ return (NSString *)cf; // expected-error {{CF object of type 'CFTestingRef' (aka '__CFError *') is bridged to 'NSTesting', which is not an Objective-C class}} \
+ // expected-error {{cast of C pointer type 'CFTestingRef' (aka '__CFError *') to Objective-C pointer type 'NSString *' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFTestingRef' (aka '__CFError *') into ARC}}
+}
+
+typedef CFErrorRef CFErrorRef1;
+
+typedef CFErrorRef1 CFErrorRef2; // expected-note 2 {{declared here}}
+
+@protocol P1 @end
+@protocol P2 @end
+@protocol P3 @end
+@protocol P4 @end
+@protocol P5 @end
+
+@interface NSError<P1, P2, P3> @end // expected-note 5 {{declared here}}
+
+@interface MyError : NSError // expected-note 1 {{declared here}}
+@end
+
+@interface NSUColor @end
+
+@class NSString;
+
+void Test2(CFErrorRef2 cf, NSError *ns, NSString *str, Class c, CFUColor2Ref cf2) {
+ (void)(NSString *)cf; // expected-warning {{'CFErrorRef2' (aka '__CFErrorRef *') bridges to NSError, not 'NSString'}} \
+ // expected-error {{cast of C pointer type 'CFErrorRef2' (aka '__CFErrorRef *') to Objective-C pointer type 'NSString *' requires a bridged cast}} \
+ // expected-note {{__bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef2' (aka '__CFErrorRef *') into ARC}}
+ (void)(NSError *)cf; // expected-error {{cast of C pointer type 'CFErrorRef2' (aka '__CFErrorRef *') to Objective-C pointer type 'NSError *' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef2' (aka '__CFErrorRef *') into ARC}}
+ (void)(MyError*)cf; // expected-error {{cast of C pointer type 'CFErrorRef2' (aka '__CFErrorRef *') to Objective-C pointer type 'MyError *' requires a bridged cast}} \
+ // expected-note {{__bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef2' (aka '__CFErrorRef *') into ARC}}
+ (void)(NSUColor *)cf2; // expected-error {{cast of C pointer type 'CFUColor2Ref' (aka '__CFUPrimeColor *') to Objective-C pointer type 'NSUColor *' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFUColor2Ref' (aka '__CFUPrimeColor *') into ARC}}
+ (void)(CFErrorRef)ns; // expected-error {{cast of Objective-C pointer type 'NSError *' to C pointer type 'CFErrorRef' (aka '__CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka '__CFErrorRef *')}}
+ (void)(CFErrorRef)str; // expected-warning {{'NSString' cannot bridge to 'CFErrorRef' (aka '__CFErrorRef *')}} \\
+ // expected-error {{cast of Objective-C pointer type 'NSString *' to C pointer type 'CFErrorRef' (aka '__CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka '__CFErrorRef *')}}
+ (void)(Class)cf; // expected-warning {{'CFErrorRef2' (aka '__CFErrorRef *') bridges to NSError, not 'Class'}} \\
+ // expected-error {{cast of C pointer type 'CFErrorRef2' (aka '__CFErrorRef *') to Objective-C pointer type 'Class' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef2' (aka '__CFErrorRef *') into ARC}}
+ (void)(CFErrorRef)c; // expected-warning {{'__unsafe_unretained Class' cannot bridge to 'CFErrorRef' (aka '__CFErrorRef *')}} \
+ // expected-error {{cast of Objective-C pointer type 'Class' to C pointer type 'CFErrorRef' (aka '__CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka '__CFErrorRef *')}}
+}
+
+
+void Test3(CFErrorRef cf, NSError *ns) {
+ (void)(id)cf; // expected-error {{cast of C pointer type 'CFErrorRef' (aka '__CFErrorRef *') to Objective-C pointer type 'id' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef' (aka '__CFErrorRef *') into ARC}}
+ (void)(id<P1, P2>)cf; // expected-error {{cast of C pointer type 'CFErrorRef' (aka '__CFErrorRef *') to Objective-C pointer type 'id<P1,P2>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef' (aka '__CFErrorRef *') into ARC}}
+ (void)(id<P1, P2, P4>)cf; // expected-warning {{'CFErrorRef' (aka '__CFErrorRef *') bridges to NSError, not 'id<P1,P2,P4>'}} \
+ // expected-error {{cast of C pointer type 'CFErrorRef' (aka '__CFErrorRef *') to Objective-C pointer type 'id<P1,P2,P4>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFErrorRef' (aka '__CFErrorRef *') into ARC}}
+}
+
+void Test4(CFMyErrorRef cf) {
+ (void)(id)cf; // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') to Objective-C pointer type 'id' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *') into ARC}}
+ (void)(id<P1, P2>)cf; // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') to Objective-C pointer type 'id<P1,P2>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *') into ARC}}
+ (void)(id<P1, P2, P3>)cf; // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') to Objective-C pointer type 'id<P1,P2,P3>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *') into ARC}}
+ (void)(id<P2, P3>)cf; // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') to Objective-C pointer type 'id<P2,P3>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *') into ARC}}
+ (void)(id<P1, P2, P4>)cf; // expected-warning {{'CFMyErrorRef' (aka '__CFMyErrorRef *') bridges to MyError, not 'id<P1,P2,P4>'}} \
+ // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') to Objective-C pointer type 'id<P1,P2,P4>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *') into ARC}}
+}
+
+void Test5(id<P1, P2, P3> P123, id ID, id<P1, P2, P3, P4> P1234, id<P1, P2> P12, id<P2, P3> P23) {
+ (void)(CFErrorRef)ID; // expected-error {{cast of Objective-C pointer type 'id' to C pointer type 'CFErrorRef' (aka '__CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka '__CFErrorRef *')}}
+ (void)(CFErrorRef)P123; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3>' to C pointer type 'CFErrorRef' (aka '__CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka '__CFErrorRef *')}}
+ (void)(CFErrorRef)P1234; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3,P4>' to C pointer type 'CFErrorRef' (aka '__CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka '__CFErrorRef *')}}
+ (void)(CFErrorRef)P12; // expected-error {{cast of Objective-C pointer type 'id<P1,P2>' to C pointer type 'CFErrorRef' (aka '__CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka '__CFErrorRef *')}}
+ (void)(CFErrorRef)P23; // expected-error {{cast of Objective-C pointer type 'id<P2,P3>' to C pointer type 'CFErrorRef' (aka '__CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFErrorRef' (aka '__CFErrorRef *')}}
+}
+
+void Test6(id<P1, P2, P3> P123, id ID, id<P1, P2, P3, P4> P1234, id<P1, P2> P12, id<P2, P3> P23) {
+
+ (void)(CFMyErrorRef)ID; // expected-error {{cast of Objective-C pointer type 'id' to C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *')}}
+ (void)(CFMyErrorRef)P123; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3>' to C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *')}}
+ (void)(CFMyErrorRef)P1234; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3,P4>' to C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *')}}
+ (void)(CFMyErrorRef)P12; // expected-error {{cast of Objective-C pointer type 'id<P1,P2>' to C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *')}}
+ (void)(CFMyErrorRef)P23; // expected-error {{cast of Objective-C pointer type 'id<P2,P3>' to C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *')}}
+}
+
+typedef struct __attribute__ ((objc_bridge(MyPersonalError))) __CFMyPersonalErrorRef * CFMyPersonalErrorRef; // expected-note 1 {{declared here}}
+
+@interface MyPersonalError : NSError <P4> // expected-note 1 {{declared here}}
+@end
+
+void Test7(id<P1, P2, P3> P123, id ID, id<P1, P2, P3, P4> P1234, id<P1, P2> P12, id<P2, P3> P23) {
+ (void)(CFMyPersonalErrorRef)ID; // expected-error {{cast of Objective-C pointer type 'id' to C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *')}}
+ (void)(CFMyPersonalErrorRef)P123; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3>' to C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *')}}
+ (void)(CFMyPersonalErrorRef)P1234; // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3,P4>' to C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *')}}
+ (void)(CFMyPersonalErrorRef)P12; // expected-error {{cast of Objective-C pointer type 'id<P1,P2>' to C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *')}}
+ (void)(CFMyPersonalErrorRef)P23; // expected-error {{cast of Objective-C pointer type 'id<P2,P3>' to C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained to make an ARC object available as a +1 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *')}}
+}
+
+void Test8(CFMyPersonalErrorRef cf) {
+ (void)(id)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') to Objective-C pointer type 'id' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') into ARC}}
+ (void)(id<P1>)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') to Objective-C pointer type 'id<P1>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') into ARC}}
+ (void)(id<P1, P2>)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') to Objective-C pointer type 'id<P1,P2>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') into ARC}}
+ (void)(id<P1, P2, P3>)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') to Objective-C pointer type 'id<P1,P2,P3>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') into ARC}}
+ (void)(id<P1, P2, P3, P4>)cf; // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') to Objective-C pointer type 'id<P1,P2,P3,P4>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') into ARC}}
+ (void)(id<P1, P2, P3, P4, P5>)cf; // expected-warning {{'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') bridges to MyPersonalError, not 'id<P1,P2,P3,P4,P5>'}} \
+ // expected-error {{cast of C pointer type 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') to Objective-C pointer type 'id<P1,P2,P3,P4,P5>' requires a bridged cast}} \
+ // expected-note {{use __bridge to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer to transfer ownership of a +1 'CFMyPersonalErrorRef' (aka '__CFMyPersonalErrorRef *') into ARC}}
+}
+
+void Test9(CFErrorRef2 cf, NSError *ns, NSString *str, Class c, CFUColor2Ref cf2) {
+ (void)(__bridge NSString *)cf; // expected-warning {{'CFErrorRef2' (aka '__CFErrorRef *') bridges to NSError, not 'NSString'}}
+ (void)(__bridge NSError *)cf; // okay
+ (void)(__bridge MyError*)cf; // okay,
+ (void)(__bridge NSUColor *)cf2; // okay
+ (void)(__bridge CFErrorRef)ns; // okay
+ (void)(__bridge CFErrorRef)str; // expected-warning {{'NSString' cannot bridge to 'CFErrorRef' (aka '__CFErrorRef *')}}
+ (void)(__bridge Class)cf; // expected-warning {{'CFErrorRef2' (aka '__CFErrorRef *') bridges to NSError, not 'Class'}}
+ (void)(__bridge CFErrorRef)c; // expected-warning {{'__unsafe_unretained Class' cannot bridge to 'CFErrorRef' (aka '__CFErrorRef *')}}
+}
diff --git a/test/SemaObjCXX/objcbridge-related-attribute.mm b/test/SemaObjCXX/objcbridge-related-attribute.mm
new file mode 100644
index 000000000000..51fd03eb5368
--- /dev/null
+++ b/test/SemaObjCXX/objcbridge-related-attribute.mm
@@ -0,0 +1,27 @@
+// RUN: %clang_cc1 -fsyntax-only -x objective-c++ -verify -Wno-objc-root-class %s
+// rdar://15499111
+typedef struct __attribute__((objc_bridge_related(NSColor,colorWithCGColor:,CGColor))) CGColor *CGColorRef; // expected-note 6 {{declared here}}
+
+@interface NSColor // expected-note 6 {{declared here}}
++ (NSColor *)colorWithCGColor:(CGColorRef)cgColor;
+- (CGColorRef)CGColor;
+@end
+
+@interface NSTextField
+- (void)setBackgroundColor:(NSColor *)color;
+- (NSColor *)backgroundColor;
+@end
+
+
+NSColor *Test1(NSColor *nsColor, CGColorRef newColor) {
+ nsColor = newColor; // expected-error {{'CGColorRef' (aka 'CGColor *') must be explicitly converted to 'NSColor *'; use '+colorWithCGColor:' method for this conversion}}
+ NSColor *ns = newColor; // expected-error {{'CGColorRef' (aka 'CGColor *') must be explicitly converted to 'NSColor *'; use '+colorWithCGColor:' method for this conversion}}
+ return newColor; // expected-error {{'CGColorRef' (aka 'CGColor *') must be explicitly converted to 'NSColor *'; use '+colorWithCGColor:' method for this conversion}}
+}
+
+CGColorRef Test2(NSColor *newColor, CGColorRef cgColor) {
+ cgColor = newColor; // expected-error {{'NSColor *' must be explicitly converted to 'CGColorRef' (aka 'CGColor *'); use '-CGColor' method for this conversion}}
+ CGColorRef cg = newColor; // expected-error {{'NSColor *' must be explicitly converted to 'CGColorRef' (aka 'CGColor *'); use '-CGColor' method for this conversion}}
+ return newColor; // expected-error {{'NSColor *' must be explicitly converted to 'CGColorRef' (aka 'CGColor *'); use '-CGColor' method for this conversion}}
+}
+
diff --git a/test/SemaObjCXX/objcbridge-static-cast.mm b/test/SemaObjCXX/objcbridge-static-cast.mm
new file mode 100644
index 000000000000..97cc5c010a3f
--- /dev/null
+++ b/test/SemaObjCXX/objcbridge-static-cast.mm
@@ -0,0 +1,135 @@
+// RUN: %clang_cc1 -fsyntax-only -x objective-c++ -fobjc-arc -verify -Wno-objc-root-class %s
+// rdar://16756639
+
+typedef struct __attribute__ ((objc_bridge(NSError))) __CFErrorRef * CFErrorRef; // expected-note 3 {{declared here}}
+
+typedef struct __attribute__ ((objc_bridge(MyError))) __CFMyErrorRef * CFMyErrorRef; // expected-note 1 {{declared here}}
+
+typedef struct __attribute__((objc_bridge(12))) __CFMyColor *CFMyColorRef; // expected-error {{parameter of 'objc_bridge' attribute must be a single name of an Objective-C class}}
+
+typedef struct __attribute__ ((objc_bridge)) __CFArray *CFArrayRef; // expected-error {{'objc_bridge' attribute takes one argument}}
+
+typedef struct __attribute__((objc_bridge(NSLocale, NSError))) __CFLocale *CFLocaleRef;// expected-error {{use of undeclared identifier 'NSError'}}
+
+typedef struct __attribute__((objc_bridge(NSDictionary))) __CFDictionary * CFDictionaryRef;
+
+typedef union __attribute__((objc_bridge(NSUColor))) __CFUPrimeColor XXX;
+typedef XXX *CFUColor2Ref;
+
+@interface I
+{
+}
+@end
+
+@protocol NSTesting @end
+@class NSString;
+
+typedef struct __attribute__((objc_bridge(NSTesting))) __CFError *CFTestingRef; // expected-note {{declared here}}
+
+id Test1(CFTestingRef cf) {
+ return static_cast<NSString *>(cf); // expected-error {{CF object of type 'CFTestingRef' (aka '__CFError *') is bridged to 'NSTesting', which is not an Objective-C class}} \
+ // expected-error {{cast of C pointer type 'CFTestingRef' (aka '__CFError *') to Objective-C pointer type 'NSString *' requires a bridged cast}} \
+ // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFTestingRef' (aka '__CFError *') into ARC}}
+}
+
+typedef CFErrorRef CFErrorRef1;
+
+typedef CFErrorRef1 CFErrorRef2; // expected-note 1 {{declared here}}
+
+@protocol P1 @end
+@protocol P2 @end
+@protocol P3 @end
+@protocol P4 @end
+@protocol P5 @end
+
+@interface NSError<P1, P2, P3> @end // expected-note 3 {{declared here}}
+
+@interface MyError : NSError // expected-note 1 {{declared here}}
+@end
+
+@interface NSUColor @end
+
+@class NSString;
+
+void Test2(CFErrorRef2 cf, NSError *ns, NSString *str, Class c, CFUColor2Ref cf2) {
+ (void)static_cast<NSString *>(cf); // expected-warning {{'CFErrorRef2' (aka '__CFErrorRef *') bridges to NSError, not 'NSString'}} \
+ // expected-error {{cast of C pointer type 'CFErrorRef2' (aka '__CFErrorRef *') to Objective-C pointer type 'NSString *' requires a bridged cast}} \
+ // expected-note {{__bridge with C-style cast to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFErrorRef2' (aka '__CFErrorRef *') into ARC}}
+ (void)static_cast<NSError *>(cf); // expected-error {{cast of C pointer type 'CFErrorRef2' (aka '__CFErrorRef *') to Objective-C pointer type 'NSError *' requires a bridged cast}} \
+ // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFErrorRef2' (aka '__CFErrorRef *') into ARC}}
+ (void)static_cast<MyError*>(cf); // expected-error {{cast of C pointer type 'CFErrorRef2' (aka '__CFErrorRef *') to Objective-C pointer type 'MyError *' requires a bridged cast}} \
+ // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFErrorRef2' (aka '__CFErrorRef *') into ARC}}
+ (void)static_cast<NSUColor *>(cf2); // expected-error {{cast of C pointer type 'CFUColor2Ref' (aka '__CFUPrimeColor *') to Objective-C pointer type 'NSUColor *' requires a bridged cast}} \
+ // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFUColor2Ref' (aka '__CFUPrimeColor *') into ARC}}
+ (void)static_cast<CFErrorRef>(ns); // expected-error {{cast of Objective-C pointer type 'NSError *' to C pointer type 'CFErrorRef' (aka '__CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained with C-style cast to make an ARC object available as a +1 'CFErrorRef' (aka '__CFErrorRef *')}}
+ (void)static_cast<CFErrorRef>(str); // expected-warning {{'NSString' cannot bridge to 'CFErrorRef' (aka '__CFErrorRef *')}} \\
+ // expected-error {{cast of Objective-C pointer type 'NSString *' to C pointer type 'CFErrorRef' (aka '__CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained with C-style cast to make an ARC object available as a +1 'CFErrorRef' (aka '__CFErrorRef *')}}
+ (void)static_cast<Class>(cf); // expected-warning {{'CFErrorRef2' (aka '__CFErrorRef *') bridges to NSError, not 'Class'}} \\
+ // expected-error {{cast of C pointer type 'CFErrorRef2' (aka '__CFErrorRef *') to Objective-C pointer type 'Class' requires a bridged cast}} \
+ // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFErrorRef2' (aka '__CFErrorRef *') into ARC}}
+ (void)static_cast<CFErrorRef>(c); // expected-warning {{'Class' cannot bridge to 'CFErrorRef' (aka '__CFErrorRef *}} \\
+ // expected-error {{cast of Objective-C pointer type 'Class' to C pointer type 'CFErrorRef' (aka '__CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained with C-style cast to make an ARC object available as a +1 'CFErrorRef' (aka '__CFErrorRef *')}}
+}
+
+
+void Test3(CFErrorRef cf, NSError *ns) {
+ (void)static_cast<id>(cf); // expected-error {{cast of C pointer type 'CFErrorRef' (aka '__CFErrorRef *') to Objective-C pointer type 'id' requires a bridged cast}} \
+ // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFErrorRef' (aka '__CFErrorRef *') into ARC}}
+ (void)static_cast< id<P1, P2> >(cf); // expected-error {{cast of C pointer type 'CFErrorRef' (aka '__CFErrorRef *') to Objective-C pointer type 'id<P1,P2>' requires a bridged cast}} \
+ // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFErrorRef' (aka '__CFErrorRef *') into ARC}}
+ (void)static_cast< id<P1, P2, P4> >(cf); // expected-warning {{'CFErrorRef' (aka '__CFErrorRef *') bridges to NSError, not 'id<P1,P2,P4>'}} \
+ // expected-error {{cast of C pointer type 'CFErrorRef' (aka '__CFErrorRef *') to Objective-C pointer type 'id<P1,P2,P4>' requires a bridged cast}} \
+ // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFErrorRef' (aka '__CFErrorRef *') into ARC}}
+}
+
+void Test4(CFMyErrorRef cf) {
+ (void)static_cast<id>(cf); // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') to Objective-C pointer type 'id' requires a bridged cast}} \
+ // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *') into ARC}}
+ (void)static_cast< id<P1, P2> >(cf); // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') to Objective-C pointer type 'id<P1,P2>' requires a bridged cast}} \
+ // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *') into ARC}}
+ (void)static_cast< id<P1, P2, P3> >(cf); // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') to Objective-C pointer type 'id<P1,P2,P3>' requires a bridged cast}} \
+ // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *') into ARC}}
+ (void)static_cast< id<P2, P3> >(cf); // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') to Objective-C pointer type 'id<P2,P3>' requires a bridged cast}} \
+ // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *') into ARC}}
+ (void)static_cast< id<P1, P2, P4> >(cf); // expected-warning {{'CFMyErrorRef' (aka '__CFMyErrorRef *') bridges to MyError, not 'id<P1,P2,P4>'}} \
+ // expected-error {{cast of C pointer type 'CFMyErrorRef' (aka '__CFMyErrorRef *') to Objective-C pointer type 'id<P1,P2,P4>' requires a bridged cast}} \
+ // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_transfer with C-style cast to transfer ownership of a +1 'CFMyErrorRef' (aka '__CFMyErrorRef *') into ARC}}
+}
+
+void Test5(id<P1, P2, P3> P123, id ID, id<P1, P2, P3, P4> P1234, id<P1, P2> P12, id<P2, P3> P23) {
+ (void)static_cast<CFErrorRef>(ID); // expected-error {{cast of Objective-C pointer type 'id' to C pointer type 'CFErrorRef' (aka '__CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained with C-style cast to make an ARC object available as a +1 'CFErrorRef' (aka '__CFErrorRef *')}}
+ (void)static_cast<CFErrorRef>(P123); // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3>' to C pointer type 'CFErrorRef' (aka '__CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained with C-style cast to make an ARC object available as a +1 'CFErrorRef' (aka '__CFErrorRef *')}}
+ (void)static_cast<CFErrorRef>(P1234); // expected-error {{cast of Objective-C pointer type 'id<P1,P2,P3,P4>' to C pointer type 'CFErrorRef' (aka '__CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained with C-style cast to make an ARC object available as a +1 'CFErrorRef' (aka '__CFErrorRef *')}}
+ (void)static_cast<CFErrorRef>(P12); // expected-error {{cast of Objective-C pointer type 'id<P1,P2>' to C pointer type 'CFErrorRef' (aka '__CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained with C-style cast to make an ARC object available as a +1 'CFErrorRef' (aka '__CFErrorRef *')}}
+ (void)static_cast<CFErrorRef>(P23); // expected-error {{cast of Objective-C pointer type 'id<P2,P3>' to C pointer type 'CFErrorRef' (aka '__CFErrorRef *') requires a bridged cast}} \
+ // expected-note {{use __bridge with C-style cast to convert directly (no change in ownership)}} \
+ // expected-note {{use __bridge_retained with C-style cast to make an ARC object available as a +1 'CFErrorRef' (aka '__CFErrorRef *')}}
+}
diff --git a/test/SemaObjCXX/old-style-cast.mm b/test/SemaObjCXX/old-style-cast.mm
new file mode 100644
index 000000000000..5dbac097054b
--- /dev/null
+++ b/test/SemaObjCXX/old-style-cast.mm
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-arc -Wold-style-cast -verify %s
+// expected-no-diagnostics
+
+// We don't currently have a way to write ARC/C++ bridge casts in terms of C++
+// casts, so ensure we don't emit an old-style-cast warning in these cases.
+
+id test(void *opaqueInput) {
+ id someObjCObject = (__bridge id)opaqueInput;
+ void *someCFObject = (__bridge_retained void *)someObjCObject;
+ return (__bridge_transfer id)someCFObject;
+}
diff --git a/test/SemaObjCXX/propert-dot-error.mm b/test/SemaObjCXX/propert-dot-error.mm
index 2a462e4ffa37..e28204c665fc 100644
--- a/test/SemaObjCXX/propert-dot-error.mm
+++ b/test/SemaObjCXX/propert-dot-error.mm
@@ -53,7 +53,7 @@ void g(B *b) {
// PR9759
class Forward;
-@interface D {
+@interface D { // expected-note 2 {{'D' declared here}}
@public
int ivar;
}
@@ -64,6 +64,6 @@ class Forward;
void testD(D *d) {
d.Forward::property = 17; // expected-error{{property access cannot be qualified with 'Forward::'}}
d->Forward::ivar = 12; // expected-error{{instance variable access cannot be qualified with 'Forward::'}}
- d.D::property = 17; // expected-error{{expected a class or namespace}}
- d->D::ivar = 12; // expected-error{{expected a class or namespace}}
+ d.D::property = 17; // expected-error{{'D' is not a class, namespace, or scoped enumeration}}
+ d->D::ivar = 12; // expected-error{{'D' is not a class, namespace, or scoped enumeration}}
}
diff --git a/test/SemaObjCXX/property-invalid-type.mm b/test/SemaObjCXX/property-invalid-type.mm
new file mode 100644
index 000000000000..5b8a848df46d
--- /dev/null
+++ b/test/SemaObjCXX/property-invalid-type.mm
@@ -0,0 +1,23 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
+
+@interface I
+{
+ A* response; // expected-error {{unknown type name 'A'}}
+}
+@end
+@interface I ()
+@property A* response; // expected-error {{unknown type name 'A'}}
+@property int helper;
+@end
+@implementation I
+@synthesize response;
+- (void) foo :(A*) a // expected-error {{expected a type}}
+{
+ self.response = a;
+}
+@end
+
+void foo(I *i)
+{
+ i.helper;
+}
diff --git a/test/SemaObjCXX/warn-objc-literal-conversion.mm b/test/SemaObjCXX/warn-objc-literal-conversion.mm
new file mode 100644
index 000000000000..44645613e314
--- /dev/null
+++ b/test/SemaObjCXX/warn-objc-literal-conversion.mm
@@ -0,0 +1,74 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wobjc-literal-conversion %s
+
+@class NSString;
+
+@interface NSNumber
++ (NSNumber *)numberWithChar:(char)value;
++ (NSNumber *)numberWithInt:(int)value;
++ (NSNumber *)numberWithLongLong:(long long)value;
++ (NSNumber *)numberWithFloat:(float)value;
++ (NSNumber *)numberWithDouble:(double)value;
++ (NSNumber *)numberWithBool:(bool)value;
+@end
+
+@interface NSArray
++ (id)arrayWithObjects:(const id [])objects count:(int)cnt;
+@end
+
+@interface NSDictionary
++ (id)dictionaryWithObjects:(const id [])objects forKeys:(const id [])keys count:(unsigned long)cnt;
+@end
+
+void char_test() {
+ if (@'a') {}
+ // expected-warning@-1{{implicit boolean conversion of Objective-C object literal always evaluates to true}}
+}
+
+void int_test() {
+ if (@12) {}
+ // expected-warning@-1{{implicit boolean conversion of Objective-C object literal always evaluates to true}}
+ if (@-12) {}
+ // expected-warning@-1{{implicit boolean conversion of Objective-C object literal always evaluates to true}}
+ if (@12LL) {}
+ // expected-warning@-1{{implicit boolean conversion of Objective-C object literal always evaluates to true}}
+ if (@-12LL) {}
+ // expected-warning@-1{{implicit boolean conversion of Objective-C object literal always evaluates to true}}
+}
+
+void float_test() {
+ if (@12.55) {}
+ // expected-warning@-1{{implicit boolean conversion of Objective-C object literal always evaluates to true}}
+ if (@-12.55) {}
+ // expected-warning@-1{{implicit boolean conversion of Objective-C object literal always evaluates to true}}
+ if (@12.55F) {}
+ // expected-warning@-1{{implicit boolean conversion of Objective-C object literal always evaluates to true}}
+ if (@-12.55F) {}
+ // expected-warning@-1{{implicit boolean conversion of Objective-C object literal always evaluates to true}}
+}
+
+void bool_test() {
+ if (@true) {}
+ // expected-warning@-1{{implicit boolean conversion of Objective-C object literal always evaluates to true}}
+ if (@false) {}
+ // expected-warning@-1{{implicit boolean conversion of Objective-C object literal always evaluates to true}}
+}
+
+void string_test() {
+ if (@"asdf") {}
+ // expected-warning@-1{{implicit boolean conversion of Objective-C object literal always evaluates to true}}
+}
+
+void array_test() {
+ if (@[ @313, @331, @367, @379 ]) {}
+ // expected-warning@-1{{implicit boolean conversion of Objective-C object literal always evaluates to true}}
+}
+
+void dictionary_test() {
+ if (@{ @0: @0, @1: @1, @2: @1, @3: @3 }) {}
+ // expected-warning@-1{{implicit boolean conversion of Objective-C object literal always evaluates to true}}
+}
+
+void objc_bool_test () {
+ if (__objc_yes) {}
+ if (__objc_no) {}
+}
diff --git a/test/SemaOpenCL/address-spaces.cl b/test/SemaOpenCL/address-spaces.cl
index 6ab10b3507f7..b188ea4576f1 100644
--- a/test/SemaOpenCL/address-spaces.cl
+++ b/test/SemaOpenCL/address-spaces.cl
@@ -11,3 +11,29 @@ __kernel void foo(__global int *gip) {
ip = &li; // expected-error {{assigning '__local int *' to 'int *' changes address space of pointer}}
ip = &ci; // expected-error {{assigning '__constant int *' to 'int *' changes address space of pointer}}
}
+
+void explicit_cast(global int* g, local int* l, constant int* c, private int* p)
+{
+ g = (global int*) l; // expected-error {{casting '__local int *' to type '__global int *' changes address space of pointer}}
+ g = (global int*) c; // expected-error {{casting '__constant int *' to type '__global int *' changes address space of pointer}}
+ g = (global int*) p; // expected-error {{casting 'int *' to type '__global int *' changes address space of pointer}}
+
+ l = (local int*) g; // expected-error {{casting '__global int *' to type '__local int *' changes address space of pointer}}
+ l = (local int*) c; // expected-error {{casting '__constant int *' to type '__local int *' changes address space of pointer}}
+ l = (local int*) p; // expected-error {{casting 'int *' to type '__local int *' changes address space of pointer}}
+
+ c = (constant int*) g; // expected-error {{casting '__global int *' to type '__constant int *' changes address space of pointer}}
+ c = (constant int*) l; // expected-error {{casting '__local int *' to type '__constant int *' changes address space of pointer}}
+ c = (constant int*) p; // expected-error {{casting 'int *' to type '__constant int *' changes address space of pointer}}
+
+ p = (private int*) g; // expected-error {{casting '__global int *' to type 'int *' changes address space of pointer}}
+ p = (private int*) l; // expected-error {{casting '__local int *' to type 'int *' changes address space of pointer}}
+ p = (private int*) c; // expected-error {{casting '__constant int *' to type 'int *' changes address space of pointer}}
+}
+
+void ok_explicit_casts(global int *g, global int* g2, local int* l, local int* l2, private int* p, private int* p2)
+{
+ g = (global int*) g2;
+ l = (local int*) l2;
+ p = (private int*) p2;
+}
diff --git a/test/SemaOpenCL/array-parameters.cl b/test/SemaOpenCL/array-parameters.cl
new file mode 100644
index 000000000000..200acacfad4c
--- /dev/null
+++ b/test/SemaOpenCL/array-parameters.cl
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only
+// expected-no-diagnostics
+
+kernel void foo(global int a[], local int b[], constant int c[4]) { }
+
+void bar(global int a[], local int b[], constant int c[4], int d[]) { }
diff --git a/test/SemaOpenCL/event_t.cl b/test/SemaOpenCL/event_t.cl
index 5ab5c1011a62..e09883948cc6 100644
--- a/test/SemaOpenCL/event_t.cl
+++ b/test/SemaOpenCL/event_t.cl
@@ -4,7 +4,7 @@ event_t glb_evt; // expected-error {{the event_t type cannot be used to declare
constant struct evt_s {
event_t evt; // expected-error {{the event_t type cannot be used to declare a structure or union field}}
-} evt_str;
+} evt_str = {0};
void foo(event_t evt); // expected-note {{passing argument to parameter 'evt' here}}
diff --git a/test/SemaOpenCL/extern.cl b/test/SemaOpenCL/extern.cl
new file mode 100644
index 000000000000..ee5e07237f06
--- /dev/null
+++ b/test/SemaOpenCL/extern.cl
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -x cl -cl-std=CL1.2 -emit-llvm %s -o - -verify | FileCheck %s
+// expected-no-diagnostics
+
+// CHECK: @foo = external global float
+extern constant float foo;
+
+kernel void test(global float* buf) {
+ buf[0] += foo;
+}
diff --git a/test/SemaOpenCL/func_ptr.cl b/test/SemaOpenCL/func_ptr.cl
new file mode 100644
index 000000000000..f21a3d3265a5
--- /dev/null
+++ b/test/SemaOpenCL/func_ptr.cl
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only
+
+void foo(void*);
+
+void bar()
+{
+ // declaring a function pointer is an error
+ void (*fptr)(int); // expected-error{{pointers to functions are not allowed}}
+
+ // taking the address of a function is an error
+ foo((void*)foo); // expected-error{{taking address of function is not allowed}}
+ foo(&foo); // expected-error{{taking address of function is not allowed}}
+
+ // just calling a function is correct
+ foo(0);
+}
diff --git a/test/SemaOpenCL/half.cl b/test/SemaOpenCL/half.cl
index 0e6acb78c45c..11abf64633be 100644
--- a/test/SemaOpenCL/half.cl
+++ b/test/SemaOpenCL/half.cl
@@ -3,7 +3,7 @@
#pragma OPENCL EXTENSION cl_khr_fp16 : disable
half half_disabled(half *p, // expected-error{{declaring function return value of type 'half' is not allowed}}
- half h) // expected-error{{declaring function argument of type 'half' is not allowed}}
+ half h) // expected-error{{declaring function parameter of type 'half' is not allowed}}
{
half a[2]; // expected-error{{declaring variable of type 'half [2]' is not allowed}}
half b; // expected-error{{declaring variable of type 'half' is not allowed}}
diff --git a/test/SemaOpenCL/invalid-constant.cl b/test/SemaOpenCL/invalid-constant.cl
new file mode 100644
index 000000000000..c45811f40251
--- /dev/null
+++ b/test/SemaOpenCL/invalid-constant.cl
@@ -0,0 +1,2 @@
+// RUN: %clang_cc1 -verify %s
+constant int no_init; // expected-error {{variable in constant address space must be initialized}}
diff --git a/test/SemaOpenCL/invalid-kernel-attrs.cl b/test/SemaOpenCL/invalid-kernel-attrs.cl
index 668dc2a54d00..4b4fdf79e3d1 100644
--- a/test/SemaOpenCL/invalid-kernel-attrs.cl
+++ b/test/SemaOpenCL/invalid-kernel-attrs.cl
@@ -14,3 +14,24 @@ kernel __attribute__((work_group_size_hint(8,16,32,4))) void kernel6() {} //expe
kernel __attribute__((work_group_size_hint(1,2,3))) __attribute__((work_group_size_hint(3,2,1))) void kernel7() {} //expected-warning{{attribute 'work_group_size_hint' is already applied with different parameters}}
+__attribute__((reqd_work_group_size(8,16,32))) void kernel8(){} // expected-error {{attribute 'reqd_work_group_size' can only be applied to a kernel}}
+
+__attribute__((work_group_size_hint(8,16,32))) void kernel9(){} // expected-error {{attribute 'work_group_size_hint' can only be applied to a kernel}}
+
+__attribute__((vec_type_hint(char))) void kernel10(){} // expected-error {{attribute 'vec_type_hint' can only be applied to a kernel}}
+
+constant int foo1 __attribute__((reqd_work_group_size(8,16,32))) = 0; // expected-error {{'reqd_work_group_size' attribute only applies to functions}}
+
+constant int foo2 __attribute__((work_group_size_hint(8,16,32))) = 0; // expected-error {{'work_group_size_hint' attribute only applies to functions}}
+
+constant int foo3 __attribute__((vec_type_hint(char))) = 0; // expected-error {{'vec_type_hint' attribute only applies to functions}}
+
+void f_kernel_image2d_t( kernel image2d_t image ) { // expected-error {{'kernel' attribute only applies to functions}}
+ int __kernel x; // expected-error {{'__kernel' attribute only applies to functions}}
+ read_only int i; // expected-error {{'read_only' attribute only applies to parameters}}
+ __write_only int j; // expected-error {{'__write_only' attribute only applies to parameters}}
+}
+
+kernel __attribute__((reqd_work_group_size(1,2,0))) void kernel11(){} // expected-error {{'reqd_work_group_size' attribute must be greater than 0}}
+kernel __attribute__((reqd_work_group_size(1,0,2))) void kernel12(){} // expected-error {{'reqd_work_group_size' attribute must be greater than 0}}
+kernel __attribute__((reqd_work_group_size(0,1,2))) void kernel13(){} // expected-error {{'reqd_work_group_size' attribute must be greater than 0}}
diff --git a/test/SemaOpenCL/invalid-kernel.cl b/test/SemaOpenCL/invalid-kernel.cl
index c12bd8414e27..9a50673ecdfa 100644
--- a/test/SemaOpenCL/invalid-kernel.cl
+++ b/test/SemaOpenCL/invalid-kernel.cl
@@ -2,6 +2,10 @@
kernel void no_ptrptr(global int **i) { } // expected-error{{kernel parameter cannot be declared as a pointer to a pointer}}
+__kernel void no_privateptr(__private int *i) { } // expected-error {{kernel parameter cannot be declared as a pointer to the __private address space}}
+
+__kernel void no_privatearray(__private int i[]) { } // expected-error {{kernel parameter cannot be declared as a pointer to the __private address space}}
+
kernel int bar() { // expected-error {{kernel must have void return type}}
return 6;
}
@@ -13,3 +17,15 @@ kernel void main() { // expected-error {{kernel cannot be called 'main'}}
int main() { // expected-error {{function cannot be called 'main'}}
return 0;
}
+
+int* global x(int* x) { // expected-error {{return value cannot be qualified with address space}}
+ return x + 1;
+}
+
+int* local x(int* x) { // expected-error {{return value cannot be qualified with address space}}
+ return x + 1;
+}
+
+int* constant x(int* x) { // expected-error {{return value cannot be qualified with address space}}
+ return x + 1;
+}
diff --git a/test/SemaOpenCL/lit.local.cfg b/test/SemaOpenCL/lit.local.cfg
new file mode 100644
index 000000000000..f4ef5d2fa02d
--- /dev/null
+++ b/test/SemaOpenCL/lit.local.cfg
@@ -0,0 +1,4 @@
+config.substitutions = list(config.substitutions)
+config.substitutions.insert(0,
+ (r'%clang\b',
+ """*** Do not use the driver in Sema tests. ***""") )
diff --git a/test/SemaOpenCL/sizeof.cl b/test/SemaOpenCL/sizeof.cl
new file mode 100644
index 000000000000..69fc4309ce2e
--- /dev/null
+++ b/test/SemaOpenCL/sizeof.cl
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 %s -verify -fsyntax-only
+
+kernel void test(global int* buf) {
+ buf[0] = sizeof(void); // expected-error {{invalid application of 'sizeof' to a void type}}
+}
diff --git a/test/SemaOpenCL/vector_conv_invalid.cl b/test/SemaOpenCL/vector_conv_invalid.cl
index e6ef5a492f8c..90cec26a605a 100644
--- a/test/SemaOpenCL/vector_conv_invalid.cl
+++ b/test/SemaOpenCL/vector_conv_invalid.cl
@@ -7,8 +7,8 @@ typedef unsigned uint3 __attribute((ext_vector_type(3)));
void vector_conv_invalid() {
uint4 u = (uint4)(1);
- int4 i = u; // expected-error{{initializing 'int4' with an expression of incompatible type 'uint4'}}
- int4 e = (int4)u; // expected-error{{invalid conversion between ext-vector type 'int4' and 'uint4'}}
+ int4 i = u; // expected-error{{initializing 'int4' (vector of 4 'int' values) with an expression of incompatible type 'uint4' (vector of 4 'unsigned int' values)}}
+ int4 e = (int4)u; // expected-error{{invalid conversion between ext-vector type 'int4' (vector of 4 'int' values) and 'uint4' (vector of 4 'unsigned int' values)}}
- uint3 u4 = (uint3)u; // expected-error{{invalid conversion between ext-vector type 'uint3' and 'uint4'}}
+ uint3 u4 = (uint3)u; // expected-error{{invalid conversion between ext-vector type 'uint3' (vector of 3 'unsigned int' values) and 'uint4' (vector of 4 'unsigned int' values)}}
}
diff --git a/test/SemaTemplate/attributes.cpp b/test/SemaTemplate/attributes.cpp
index 5a06a706aa84..1d46058b0191 100644
--- a/test/SemaTemplate/attributes.cpp
+++ b/test/SemaTemplate/attributes.cpp
@@ -22,7 +22,7 @@ namespace attribute_aligned {
template<unsigned Size, unsigned Align>
class my_aligned_storage
{
- __attribute__((align(Align))) char storage[Size];
+ __attribute__((aligned(Align))) char storage[Size];
};
template<typename T>
diff --git a/test/SemaTemplate/class-template-decl.cpp b/test/SemaTemplate/class-template-decl.cpp
index e65da2b312f6..b721aab35464 100644
--- a/test/SemaTemplate/class-template-decl.cpp
+++ b/test/SemaTemplate/class-template-decl.cpp
@@ -14,6 +14,13 @@ extern "C" {
template<typename T> class D; // expected-error{{templates must have C++ linkage}}
}
+extern "C" {
+ class PR17968 {
+ template<typename T> class D; // expected-error{{templates must have C++ linkage}}
+ template<typename T> void f(); // expected-error{{templates must have C++ linkage}}
+ };
+}
+
template<class U> class A; // expected-note{{previous template declaration is here}}
template<int N> class A; // expected-error{{template parameter has a different kind in template redeclaration}}
diff --git a/test/SemaTemplate/class-template-spec.cpp b/test/SemaTemplate/class-template-spec.cpp
index f9015b37ea09..0292c1b8ff20 100644
--- a/test/SemaTemplate/class-template-spec.cpp
+++ b/test/SemaTemplate/class-template-spec.cpp
@@ -91,7 +91,7 @@ template<> struct N::B<float> { }; // expected-warning{{C++11 extension}}
namespace M {
template<> struct ::N::B<short> { }; // expected-error{{class template specialization of 'B' not in a namespace enclosing 'N'}}
- template<> struct ::A<long double>; // expected-error{{originally}}
+ template<> struct ::A<long double>; // expected-error{{must occur at global scope}}
}
template<> struct N::B<char> {
@@ -119,3 +119,61 @@ namespace rdar9676205 {
};
}
+
+namespace PR18009 {
+ template <typename T> struct A {
+ template <int N, int M> struct S;
+ template <int N> struct S<N, sizeof(T)> {};
+ };
+ A<int>::S<8, sizeof(int)> a; // ok
+
+ template <typename T> struct B {
+ template <int N, int M> struct S; // expected-note {{declared here}}
+ template <int N> struct S<N, sizeof(T) +
+ N // expected-error {{non-type template argument depends on a template parameter of the partial specialization}}
+ > {};
+ };
+ B<int>::S<8, sizeof(int) + 8> s; // expected-error {{undefined}}
+
+ template<int A> struct outer {
+ template<int B, int C> struct inner {};
+ template<int C> struct inner<A * 2, C> {};
+ };
+}
+
+namespace PR16519 {
+ template<typename T, T...N> struct integer_sequence { typedef T value_type; }; // expected-warning {{extension}}
+
+ template<typename T> struct __make_integer_sequence;
+ template<typename T, T N> using make_integer_sequence = typename __make_integer_sequence<T>::template make<N, N % 2>::type; // expected-warning {{extension}}
+
+ template<typename T, typename T::value_type ...Extra> struct __make_integer_sequence_impl; // expected-warning {{extension}}
+ template<typename T, T ...N, T ...Extra> struct __make_integer_sequence_impl<integer_sequence<T, N...>, Extra...> { // expected-warning 2{{extension}}
+ typedef integer_sequence<T, N..., sizeof...(N) + N..., Extra...> type;
+ };
+
+ template<typename T> struct __make_integer_sequence {
+ template<T N, T Parity, typename = void> struct make;
+ template<typename Dummy> struct make<0, 0, Dummy> { typedef integer_sequence<T> type; };
+ template<typename Dummy> struct make<1, 1, Dummy> { typedef integer_sequence<T, 0> type; };
+ template<T N, typename Dummy> struct make<N, 0, Dummy> : __make_integer_sequence_impl<make_integer_sequence<T, N/2> > {};
+ template<T N, typename Dummy> struct make<N, 1, Dummy> : __make_integer_sequence_impl<make_integer_sequence<T, N/2>, N - 1> {};
+ };
+
+ using X = make_integer_sequence<int, 5>; // expected-warning {{extension}}
+ using X = integer_sequence<int, 0, 1, 2, 3, 4>; // expected-warning {{extension}}
+}
+
+namespace DefaultArgVsPartialSpec {
+ // Check that the diagnostic points at the partial specialization, not just at
+ // the default argument.
+ template<typename T, int N =
+ sizeof(T) // expected-note {{template parameter is used in default argument declared here}}
+ > struct X {};
+ template<typename T> struct X<T> {}; // expected-error {{non-type template argument depends on a template parameter of the partial specialization}}
+
+ template<typename T,
+ T N = 0 // expected-note {{template parameter is declared here}}
+ > struct S;
+ template<typename T> struct S<T> {}; // expected-error {{non-type template argument specializes a template parameter with dependent type 'T'}}
+}
diff --git a/test/SemaTemplate/constexpr-instantiate.cpp b/test/SemaTemplate/constexpr-instantiate.cpp
index 95d6c23b9e98..e8e3e7dd5a08 100644
--- a/test/SemaTemplate/constexpr-instantiate.cpp
+++ b/test/SemaTemplate/constexpr-instantiate.cpp
@@ -154,7 +154,7 @@ namespace Unevaluated {
constexpr S2() {}
constexpr operator int() const { return 123456; }
};
- int k2 = sizeof(short{S2(S2())}); // expected-error {{cannot be narrowed}} expected-note {{override}}
+ int k2 = sizeof(short{S2(S2())}); // expected-error {{cannot be narrowed}} expected-note {{insert an explicit cast to silence this issue}}
}
namespace PR12288 {
diff --git a/test/SemaTemplate/dependent-expr.cpp b/test/SemaTemplate/dependent-expr.cpp
index 2c26ec53a0ae..7195c9d48d76 100644
--- a/test/SemaTemplate/dependent-expr.cpp
+++ b/test/SemaTemplate/dependent-expr.cpp
@@ -93,3 +93,10 @@ namespace PR10837 {
}
template struct A<int>;
}
+
+namespace PR18152 {
+ template<int N> struct A {
+ static const int n = {N};
+ };
+ template struct A<0>;
+}
diff --git a/test/SemaTemplate/dependent-names.cpp b/test/SemaTemplate/dependent-names.cpp
index 4d4aafa918cb..011e073a727a 100644
--- a/test/SemaTemplate/dependent-names.cpp
+++ b/test/SemaTemplate/dependent-names.cpp
@@ -232,7 +232,7 @@ namespace PR10053 {
struct Data {};
}
- std::ostream &print(std::ostream &out, int); // expected-note-re {{should be declared prior to the call site$}}
+ std::ostream &print(std::ostream &out, int); // expected-note-re {{should be declared prior to the call site{{$}}}}
std::ostream &print(std::ostream &out, ns::Data); // expected-note {{should be declared prior to the call site or in namespace 'PR10053::my_file2_a::ns'}}
std::ostream &print(std::ostream &out, std::vector<ns2::Data>); // expected-note {{should be declared prior to the call site or in namespace 'PR10053::my_file2_a::ns2'}}
std::ostream &print(std::ostream &out, std::pair<ns::Data, ns2::Data>); // expected-note {{should be declared prior to the call site or in an associated namespace of one of its arguments}}
@@ -397,5 +397,20 @@ namespace OperatorNew {
struct X {};
};
using size_t = decltype(sizeof(0));
-void *operator new(size_t, OperatorNew::X); // expected-note-re {{should be declared prior to the call site$}}
+void *operator new(size_t, OperatorNew::X); // expected-note-re {{should be declared prior to the call site{{$}}}}
template void OperatorNew::f(OperatorNew::X); // expected-note {{instantiation of}}
+
+namespace PR19936 {
+ template<typename T> decltype(*T()) f() {} // expected-note {{previous}}
+ template<typename T> decltype(T() * T()) g() {} // expected-note {{previous}}
+
+ // Create some overloaded operators so we build an overload operator call
+ // instead of a builtin operator call for the dependent expression.
+ enum E {};
+ int operator*(E);
+ int operator*(E, E);
+
+ // Check that they still profile the same.
+ template<typename T> decltype(*T()) f() {} // expected-error {{redefinition}}
+ template<typename T> decltype(T() * T()) g() {} // expected-error {{redefinition}}
+}
diff --git a/test/SemaTemplate/dependent-type-identity.cpp b/test/SemaTemplate/dependent-type-identity.cpp
index 731013c86387..a796834ce01a 100644
--- a/test/SemaTemplate/dependent-type-identity.cpp
+++ b/test/SemaTemplate/dependent-type-identity.cpp
@@ -98,3 +98,27 @@ namespace PR7460 {
template <typename T>
T TemplateClass2<T>::member[TemplateClass2<T>::SIZE];
}
+
+namespace PR18275 {
+ template<typename T> struct A {
+ void f(const int);
+ void g(int);
+ void h(const T);
+ void i(T);
+ };
+
+ template<typename T>
+ void A<T>::f(int x) { x = 0; }
+
+ template<typename T>
+ void A<T>::g(const int x) { x = 0; } // expected-error {{not assignable}}
+
+ template<typename T>
+ void A<T>::h(T) {} // FIXME: Should reject this. Type is different from prior decl if T is an array type.
+
+ template<typename T>
+ void A<T>::i(const T) {} // FIXME: Should reject this. Type is different from prior decl if T is an array type.
+
+ template struct A<int>;
+ template struct A<int[1]>;
+}
diff --git a/test/SemaTemplate/explicit-instantiation.cpp b/test/SemaTemplate/explicit-instantiation.cpp
index d04046462a04..c28c5d183150 100644
--- a/test/SemaTemplate/explicit-instantiation.cpp
+++ b/test/SemaTemplate/explicit-instantiation.cpp
@@ -16,7 +16,7 @@ struct X0 {
}
T* f0(T*, T*) { return T(); } // expected-warning{{expression which evaluates to zero treated as a null pointer constant of type 'int *'}}
- template <typename U> T f0(T, U) { return T(); } // expected-note {{candidate template ignored: could not match 'int (int, U)' against 'int (int) const'}} \
+ template <typename U> T f0(T, U) { return T(); } // expected-note-re {{candidate template ignored: could not match 'int (int, U){{( __attribute__\(\(thiscall\)\))?}}' against 'int (int){{( __attribute__\(\(thiscall\)\))?}} const'}} \
// expected-note {{candidate template ignored: could not match 'int' against 'int *'}}
};
diff --git a/test/SemaTemplate/explicit-specialization-member.cpp b/test/SemaTemplate/explicit-specialization-member.cpp
index 07d73894468f..e8dc4d219acb 100644
--- a/test/SemaTemplate/explicit-specialization-member.cpp
+++ b/test/SemaTemplate/explicit-specialization-member.cpp
@@ -38,12 +38,22 @@ namespace PR18246 {
template<typename T>
template<int N>
- void Baz<T>::bar() {
+ void Baz<T>::bar() { // expected-note {{couldn't infer template argument 'N'}}
}
- // FIXME: Don't suggest the 'template<>' correction here, because this cannot
- // be an explicit specialization.
+ // FIXME: We shouldn't try to match this against a prior declaration if
+ // template parameter matching failed.
template<typename T>
- void Baz<T>::bar<0>() { // expected-error {{requires 'template<>'}}
+ void Baz<T>::bar<0>() { // expected-error {{cannot specialize a member of an unspecialized template}} \
+ // expected-error {{no function template matches}}
}
}
+
+namespace PR19340 {
+template<typename T> struct Helper {
+ template<int N> static void func(const T *m) {} // expected-note {{failed template argument deduction}}
+};
+
+template<typename T> void Helper<T>::func<2>() {} // expected-error {{cannot specialize a member}} \
+ // expected-error {{no function template matches}}
+}
diff --git a/test/SemaTemplate/inject-templated-friend-post.cpp b/test/SemaTemplate/inject-templated-friend-post.cpp
index c86f718bb5f1..b8b9a32fc20a 100644
--- a/test/SemaTemplate/inject-templated-friend-post.cpp
+++ b/test/SemaTemplate/inject-templated-friend-post.cpp
@@ -1,12 +1,17 @@
-// RUN: %clang %s -std=c++98 -S -emit-llvm -o - | grep -e "define linkonce_odr.*_ZlsR11std_ostreamRK8StreamerI3FooE"
-// RUN: %clang %s -std=c++98 -S -emit-llvm -o - -DPROTOTYPE | grep -e "define linkonce_odr.*_ZlsR11std_ostreamRK8StreamerI3FooE"
-// RUN: %clang %s -std=c++98 -S -emit-llvm -o - -DINSTANTIATE | grep -e "define linkonce_odr.*_ZlsR11std_ostreamRK8StreamerI3FooE"
-// RUN: %clang %s -std=c++98 -S -emit-llvm -o - -DPROTOTYPE -DINSTANTIATE | grep -e "define linkonce_odr.*_ZlsR11std_ostreamRK8StreamerI3FooE"
+// RUN: %clang_cc1 %s -std=c++98 -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -std=c++98 -triple %itanium_abi_triple -emit-llvm -o - -DPROTOTYPE | FileCheck --check-prefix=CHECK-PROTOTYPE %s
+// RUN: %clang_cc1 %s -std=c++98 -triple %itanium_abi_triple -emit-llvm -o - -DINSTANTIATE | FileCheck --check-prefix=CHECK-INSTANTIATE %s
+// RUN: %clang_cc1 %s -std=c++98 -triple %itanium_abi_triple -emit-llvm -o - -DPROTOTYPE -DINSTANTIATE | FileCheck --check-prefix=CHECK-PROTOTYPE-INSTANTIATE %s
// RUN: %clang_cc1 %s -DREDEFINE -verify
// RUN: %clang_cc1 %s -DPROTOTYPE -DREDEFINE -verify
// PR8007: friend function not instantiated, reordered version.
// Corresponds to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38392
+// CHECK: define linkonce_odr{{.*}}_ZlsR11std_ostreamRK8StreamerI3FooE
+// CHECK-PROTOTYPE: define linkonce_odr{{.*}}_ZlsR11std_ostreamRK8StreamerI3FooE
+// CHECK-INSTANTIATE: define linkonce_odr{{.*}}_ZlsR11std_ostreamRK8StreamerI3FooE
+// CHECK-PROTOTYPE-INSTANTIATE: define linkonce_odr{{.*}}_ZlsR11std_ostreamRK8StreamerI3FooE
+
struct std_ostream
{
int dummy;
@@ -19,7 +24,7 @@ struct Streamer;
typedef struct Foo {} Foo;
-std_ostream& operator << (std_ostream&, const Streamer<Foo>&);
+inline std_ostream& operator << (std_ostream&, const Streamer<Foo>&);
void test(const Streamer<Foo>& foo)
{
diff --git a/test/SemaTemplate/inject-templated-friend.cpp b/test/SemaTemplate/inject-templated-friend.cpp
index 7be613b6d314..f0f287ce144d 100644
--- a/test/SemaTemplate/inject-templated-friend.cpp
+++ b/test/SemaTemplate/inject-templated-friend.cpp
@@ -1,7 +1,9 @@
-// RUN: %clang %s -S -emit-llvm -o - | grep -e "define linkonce_odr.*_ZlsR11std_ostreamRK8StreamerI3FooE"
+// RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
// RUN: %clang_cc1 %s -DREDEFINE -verify
// PR8007: friend function not instantiated.
+// CHECK: define linkonce_odr{{.*}}_ZlsR11std_ostreamRK8StreamerI3FooE
+
struct std_ostream
{
int dummy;
@@ -27,7 +29,7 @@ struct Streamer
typedef struct Foo {} Foo;
-std_ostream& operator << (std_ostream&, const Streamer<Foo>&);
+inline std_ostream& operator << (std_ostream&, const Streamer<Foo>&);
#ifdef REDEFINE
std_ostream& operator << (std_ostream& o, const Streamer<Foo>&) // expected-note{{is here}}
{
diff --git a/test/SemaTemplate/instantiate-complete.cpp b/test/SemaTemplate/instantiate-complete.cpp
index 68d5ae3cfb48..a29e9d3a7496 100644
--- a/test/SemaTemplate/instantiate-complete.cpp
+++ b/test/SemaTemplate/instantiate-complete.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple %ms_abi_triple -DMSABI -fsyntax-only -verify %s
// Tests various places where requiring a complete type involves
// instantiation of that type.
@@ -7,6 +8,9 @@ template<typename T>
struct X {
X(T);
+#ifdef MSABI
+// expected-error@+2{{data member instantiated with function type 'long (long)'}}
+#endif
T f; // expected-error{{data member instantiated with function type 'float (int)'}} \
// expected-error{{data member instantiated with function type 'int (int)'}} \
// expected-error{{data member instantiated with function type 'char (char)'}} \
@@ -40,7 +44,11 @@ void test_new() {
void test_memptr(X<long> *p1, long X<long>::*pm1,
X<long(long)> *p2,
+#ifdef MSABI
+ long (X<long(long)>::*pm2)(long)) { // expected-note{{in instantiation of template class 'X<long (long)>' requested here}}
+#else
long (X<long(long)>::*pm2)(long)) {
+#endif
(void)(p1->*pm1);
}
diff --git a/test/SemaTemplate/instantiate-decl-init.cpp b/test/SemaTemplate/instantiate-decl-init.cpp
index 9658fc1465cd..f5daa7901fa8 100644
--- a/test/SemaTemplate/instantiate-decl-init.cpp
+++ b/test/SemaTemplate/instantiate-decl-init.cpp
@@ -45,3 +45,23 @@ template<int N> void f1() {
NonTrivial array[N];
}
template<> void f1<2>();
+
+namespace PR20346 {
+ struct S { short inner_s; };
+
+ struct outer_struct {
+ wchar_t arr[32];
+ S outer_s;
+ };
+
+ template <class T>
+ void OpenFileSession() {
+ // Ensure that we don't think the ImplicitValueInitExpr generated here
+ // during the initial parse only initializes the first array element!
+ outer_struct asdfasdf = {};
+ };
+
+ void foo() {
+ OpenFileSession<int>();
+ }
+}
diff --git a/test/SemaTemplate/instantiate-default-assignment-operator.cpp b/test/SemaTemplate/instantiate-default-assignment-operator.cpp
index 31cdef59d9fd..67946713c019 100644
--- a/test/SemaTemplate/instantiate-default-assignment-operator.cpp
+++ b/test/SemaTemplate/instantiate-default-assignment-operator.cpp
@@ -13,5 +13,5 @@ void f() {
a1 = a2;
B b1, b2;
- b1 = b2;
+ b1 = b2;
}
diff --git a/test/SemaTemplate/instantiate-enum.cpp b/test/SemaTemplate/instantiate-enum.cpp
index 5353a92a90bc..3da8eb4a6c0a 100644
--- a/test/SemaTemplate/instantiate-enum.cpp
+++ b/test/SemaTemplate/instantiate-enum.cpp
@@ -25,3 +25,18 @@ namespace PR6375 {
template void f<int>();
}
+
+namespace EnumScoping {
+
+template <typename T>
+class C {
+ enum {
+ value = 42
+ };
+};
+
+void f(int i, C<int>::C c) {
+ int value;
+}
+
+}
diff --git a/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp b/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp
index 5f43ea2c27a1..a376f0e5fd5b 100644
--- a/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp
+++ b/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp
@@ -1,8 +1,11 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -ftemplate-depth 16 -fcxx-exceptions -fexceptions %s
+// RUN: %clang_cc1 -fsyntax-only -verify -triple %itanium_abi_triple -std=c++11 -ftemplate-depth 16 -fcxx-exceptions -fexceptions %s
// DR1330: an exception specification for a function template is only
// instantiated when it is needed.
+// Note: the test is Itanium-specific because it depends on key functions in the
+// PR12763 namespace.
+
template<typename T> void f1(T*) throw(T); // expected-error{{incomplete type 'Incomplete' is not allowed in exception specification}}
struct Incomplete; // expected-note{{forward}}
diff --git a/test/SemaTemplate/instantiate-exception-spec.cpp b/test/SemaTemplate/instantiate-exception-spec.cpp
index d4f12df22ec2..993ee8dfae1f 100644
--- a/test/SemaTemplate/instantiate-exception-spec.cpp
+++ b/test/SemaTemplate/instantiate-exception-spec.cpp
@@ -1,11 +1,9 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
-// FIXME: the "note" should be down at the call site!
-template<typename T> void f1(T*) throw(T); // expected-error{{incomplete type 'Incomplete' is not allowed in exception specification}} \
- // expected-note{{instantiation of}}
+template<typename T> void f1(T*) throw(T); // expected-error{{incomplete type 'Incomplete' is not allowed in exception specification}}
struct Incomplete; // expected-note{{forward}}
void test_f1(Incomplete *incomplete_p, int *int_p) {
f1(int_p);
- f1(incomplete_p);
+ f1(incomplete_p); // expected-note{{instantiation of}}
}
diff --git a/test/SemaTemplate/instantiate-function-2.cpp b/test/SemaTemplate/instantiate-function-2.cpp
index 19a8b61ff193..f5089c962397 100644
--- a/test/SemaTemplate/instantiate-function-2.cpp
+++ b/test/SemaTemplate/instantiate-function-2.cpp
@@ -64,3 +64,28 @@ namespace PR10273 {
(f)(17);
}
}
+
+namespace rdar15464547 {
+ class A {
+ A();
+ };
+
+ template <typename R> class B {
+ public:
+ static void meth1();
+ static void meth2();
+ };
+
+ A::A() {
+ extern int compile_time_assert_failed;
+ B<int>::meth2();
+ }
+
+ template <typename R> void B<R>::meth1() {
+ extern int compile_time_assert_failed;
+ }
+
+ template <typename R> void B<R>::meth2() {
+ extern int compile_time_assert_failed;
+ }
+}
diff --git a/test/SemaTemplate/instantiate-function-params.cpp b/test/SemaTemplate/instantiate-function-params.cpp
index 5bfae537c04d..556a8181f043 100644
--- a/test/SemaTemplate/instantiate-function-params.cpp
+++ b/test/SemaTemplate/instantiate-function-params.cpp
@@ -7,12 +7,12 @@ template<typename T1> struct if_ {
};
template <class Model, void (Model::*)()> struct wrap_constraints { };
template <class Model>
-inline char has_constraints_(Model* , // expected-note 2{{while substituting deduced template arguments into function template 'has_constraints_' [with }} \
- // expected-note 3{{candidate template ignored}}
+inline char has_constraints_(Model* , // expected-note 3{{candidate template ignored}}
wrap_constraints<Model,&Model::constraints>* = 0); // expected-note 2{{in instantiation}}
template <class Model> struct not_satisfied {
- static const bool value = sizeof( has_constraints_((Model*)0) == 1); // expected-error 3{{no matching function}}
+ static const bool value = sizeof( has_constraints_((Model*)0) == 1); // expected-error 3{{no matching function}} \
+ // expected-note 2{{while substituting deduced template arguments into function template 'has_constraints_' [with }}
};
template <class ModelFn> struct requirement_;
template <void(*)()> struct instantiate {
diff --git a/test/SemaTemplate/instantiate-local-class.cpp b/test/SemaTemplate/instantiate-local-class.cpp
index 2bf24c2188e6..c9897b9c614b 100644
--- a/test/SemaTemplate/instantiate-local-class.cpp
+++ b/test/SemaTemplate/instantiate-local-class.cpp
@@ -1,5 +1,4 @@
// RUN: %clang_cc1 -verify -std=c++11 %s
-// expected-no-diagnostics
template<typename T>
void f0() {
struct X;
@@ -181,3 +180,17 @@ namespace PR14373 {
return 0;
}
}
+
+namespace PR18907 {
+template <typename>
+class C : public C<int> {}; // expected-error{{within its own definition}}
+
+template <typename X>
+void F() {
+ struct A : C<X> {};
+}
+
+struct B {
+ void f() { F<int>(); }
+};
+}
diff --git a/test/SemaTemplate/instantiate-method.cpp b/test/SemaTemplate/instantiate-method.cpp
index 5e9da3f688e8..58cb89795558 100644
--- a/test/SemaTemplate/instantiate-method.cpp
+++ b/test/SemaTemplate/instantiate-method.cpp
@@ -178,7 +178,7 @@ namespace PR7022 {
namespace SameSignatureAfterInstantiation {
template<typename T> struct S {
void f(T *); // expected-note {{previous}}
- void f(const T*); // expected-error {{multiple overloads of 'f' instantiate to the same signature 'void (const int *)'}}
+ void f(const T*); // expected-error-re {{multiple overloads of 'f' instantiate to the same signature 'void (const int *){{( __attribute__\(\(thiscall\)\))?}}'}}
};
S<const int> s; // expected-note {{instantiation}}
}
diff --git a/test/SemaTemplate/instantiate-var-template.cpp b/test/SemaTemplate/instantiate-var-template.cpp
new file mode 100644
index 000000000000..bd7c43334f7d
--- /dev/null
+++ b/test/SemaTemplate/instantiate-var-template.cpp
@@ -0,0 +1,36 @@
+// RUN: %clang_cc1 -verify -std=c++1y %s
+
+namespace PR17846 {
+ template <typename T> constexpr T pi = T(3.14);
+ template <typename T> constexpr T tau = 2 * pi<T>;
+ constexpr double tau_double = tau<double>;
+ static_assert(tau_double == 6.28, "");
+}
+
+namespace PR17848 {
+ template<typename T> constexpr T var = 12345;
+ template<typename T> constexpr T f() { return var<T>; }
+ constexpr int k = f<int>();
+ static_assert(k == 12345, "");
+}
+
+namespace NonDependent {
+ template<typename T> constexpr T a = 0;
+ template<typename T> constexpr T b = a<int>;
+ static_assert(b<int> == 0, "");
+}
+
+namespace InstantiationDependent {
+ int f(int);
+ void f(char);
+
+ template<int> constexpr int a = 1;
+ template<typename T> constexpr T b = a<sizeof(sizeof(f(T())))>; // expected-error {{invalid application of 'sizeof' to an incomplete type 'void'}}
+
+ static_assert(b<int> == 1, "");
+ static_assert(b<char> == 1, ""); // expected-note {{in instantiation of}} expected-error {{not an integral constant}}
+
+ template<typename T> void f() {
+ static_assert(a<sizeof(sizeof(f(T())))> == 0, ""); // expected-error {{static_assert failed}}
+ }
+}
diff --git a/test/SemaTemplate/instantiation-backtrace.cpp b/test/SemaTemplate/instantiation-backtrace.cpp
index f640836b7681..39dfb0b32a2f 100644
--- a/test/SemaTemplate/instantiation-backtrace.cpp
+++ b/test/SemaTemplate/instantiation-backtrace.cpp
@@ -39,13 +39,13 @@ namespace PR13365 {
template <class T1, class T2>
typename ResultTy<T2>::error Deduce( void (T1::*member)(T2) ) {} // \
// expected-note {{instantiation of template class 'PR13365::ResultTy<int &>'}} \
- // expected-note {{substituting deduced template arguments into function template 'Deduce' [with T1 = PR13365::Cls, T2 = int &]}} \
// expected-note {{substitution failure [with T1 = PR13365::Cls, T2 = int &]}}
struct Cls {
void method(int&);
};
void test() {
- Deduce(&Cls::method); // expected-error {{no matching function}}
+ Deduce(&Cls::method); // expected-error {{no matching function}} \
+ // expected-note {{substituting deduced template arguments into function template 'Deduce' [with T1 = PR13365::Cls, T2 = int &]}}
}
}
diff --git a/test/SemaTemplate/instantiation-depth-subst-2.cpp b/test/SemaTemplate/instantiation-depth-subst-2.cpp
index ef2a5c765d9c..c9df093b1f7a 100644
--- a/test/SemaTemplate/instantiation-depth-subst-2.cpp
+++ b/test/SemaTemplate/instantiation-depth-subst-2.cpp
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -verify %s -ftemplate-depth 2
template<int N> struct S { };
-template<typename T> S<T() + T()> operator+(T, T); // expected-error {{instantiation exceeded maximum depth}} expected-note 3{{while substituting}}
+template<typename T> S<T() + T()> operator+(T, T); // expected-error {{instantiation exceeded maximum depth}} expected-note 2{{while substituting}}
S<0> s;
-int k = s + s;
+int k = s + s; // expected-note {{while substituting}}
diff --git a/test/SemaTemplate/instantiation-depth-subst.cpp b/test/SemaTemplate/instantiation-depth-subst.cpp
index 06795f9514d3..2a3e422ac7af 100644
--- a/test/SemaTemplate/instantiation-depth-subst.cpp
+++ b/test/SemaTemplate/instantiation-depth-subst.cpp
@@ -3,7 +3,7 @@
// PR9793
template<typename T> auto f(T t) -> decltype(f(t)); // \
// expected-error {{recursive template instantiation exceeded maximum depth of 2}} \
-// expected-note 3 {{while substituting}}
+// expected-note 2 {{while substituting}}
struct S {};
-int k = f(S{});
+int k = f(S{}); // expected-note {{while substituting}}
diff --git a/test/SemaTemplate/instantiation-order.cpp b/test/SemaTemplate/instantiation-order.cpp
index e058a5bc1873..9cac256ad458 100644
--- a/test/SemaTemplate/instantiation-order.cpp
+++ b/test/SemaTemplate/instantiation-order.cpp
@@ -5,11 +5,11 @@
template <class T> struct A { using X = typename T::X; }; // expected-error {{no members}}
template <class T> typename T::X f(typename A<T>::X);
template <class T> void f(...) {}
-template <class T> auto g(typename A<T>::X) -> typename T::X; // expected-note {{here}} expected-note {{substituting}}
+template <class T> auto g(typename A<T>::X) -> typename T::X; // expected-note {{here}}
template <class T> void g(...) {}
void h()
{
f<int>(0); // ok, SFINAE in return type
- g<int>(0); // not ok, substitution inside A<int> is a hard error
+ g<int>(0); // not ok, substitution inside A<int> is a hard error // expected-note {{substituting}}
}
diff --git a/test/SemaTemplate/ms-class-specialization-duplicate.cpp b/test/SemaTemplate/ms-class-specialization-duplicate.cpp
new file mode 100644
index 000000000000..183fdfc9bfb6
--- /dev/null
+++ b/test/SemaTemplate/ms-class-specialization-duplicate.cpp
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -fms-compatibility -fdelayed-template-parsing -fsyntax-only -verify %s
+
+template <typename T>
+class A {
+};
+typedef int TInt;
+
+template class A<int>; // expected-note {{previous explicit instantiation is here}}
+template class A<TInt>; // expected-warning {{duplicate explicit instantiation of 'A<int>' ignored as a Microsoft extension}}
diff --git a/test/SemaTemplate/ms-delayed-default-template-args.cpp b/test/SemaTemplate/ms-delayed-default-template-args.cpp
new file mode 100644
index 000000000000..ca9ddb0d9d15
--- /dev/null
+++ b/test/SemaTemplate/ms-delayed-default-template-args.cpp
@@ -0,0 +1,96 @@
+// RUN: %clang_cc1 -fms-compatibility -std=c++11 %s -verify
+
+// MSVC should compile this file without errors.
+
+namespace test_basic {
+template <typename T = Baz> // expected-warning {{using the undeclared type 'Baz' as a default template argument is a Microsoft extension}}
+struct Foo { T x; };
+typedef int Baz;
+template struct Foo<>;
+}
+
+namespace test_namespace {
+namespace nested {
+template <typename T = Baz> // expected-warning {{using the undeclared type 'Baz' as a default template argument is a Microsoft extension}}
+struct Foo {
+ static_assert(sizeof(T) == 4, "should get int, not double");
+};
+typedef int Baz;
+}
+typedef double Baz;
+template struct nested::Foo<>;
+}
+
+namespace test_inner_class_template {
+struct Outer {
+ template <typename T = Baz> // expected-warning {{using the undeclared type 'Baz' as a default template argument is a Microsoft extension}}
+ struct Foo {
+ static_assert(sizeof(T) == 4, "should get int, not double");
+ };
+ typedef int Baz;
+};
+typedef double Baz;
+template struct Outer::Foo<>;
+}
+
+namespace test_nontype_param {
+template <typename T> struct Bar { T x; };
+typedef int Qux;
+template <Bar<Qux> *P>
+struct Foo {
+};
+Bar<int> g;
+template struct Foo<&g>;
+}
+
+// MSVC accepts this, but Clang doesn't.
+namespace test_template_instantiation_arg {
+template <typename T> struct Bar { T x; };
+template <typename T = Bar<Weber>> // expected-error {{use of undeclared identifier 'Weber'}}
+struct Foo {
+ static_assert(sizeof(T) == 4, "Bar should have gotten int");
+ // FIXME: These diagnostics are bad.
+}; // expected-error {{expected ',' or '>' in template-parameter-list}}
+// expected-warning@-1 {{does not declare anything}}
+typedef int Weber;
+}
+
+#ifdef __clang__
+// These are negative test cases that MSVC doesn't compile either. Try to use
+// unique undeclared identifiers so typo correction doesn't find types declared
+// above.
+
+namespace test_undeclared_nontype_parm_type {
+template <Zargon N> // expected-error {{unknown type name 'Zargon'}}
+struct Foo { int x[N]; };
+typedef int Zargon;
+template struct Foo<4>;
+}
+
+namespace test_undeclared_nontype_parm_type_no_name {
+template <typename T, Asdf> // expected-error {{unknown type name 'Asdf'}}
+struct Foo { T x; };
+template struct Foo<int, 0>;
+}
+
+namespace test_undeclared_type_arg {
+template <typename T>
+struct Foo { T x; };
+template struct Foo<Yodel>; // expected-error {{use of undeclared identifier 'Yodel'}}
+}
+
+namespace test_undeclared_nontype_parm_arg {
+// Bury an undeclared type as a template argument to the type of a non-type
+// template parameter.
+template <typename T> struct Bar { T x; };
+
+template <Bar<Xylophone> *P> // expected-error {{use of undeclared identifier 'Xylophone'}}
+// expected-note@-1 {{template parameter is declared here}}
+struct Foo { };
+
+typedef int Xylophone;
+Bar<Xylophone> g;
+template struct Foo<&g>; // expected-error {{cannot be converted}}
+}
+
+#endif
diff --git a/test/SemaTemplate/ms-function-specialization-class-scope.cpp b/test/SemaTemplate/ms-function-specialization-class-scope.cpp
index 9efb02ce5f51..5da00837cc09 100644
--- a/test/SemaTemplate/ms-function-specialization-class-scope.cpp
+++ b/test/SemaTemplate/ms-function-specialization-class-scope.cpp
@@ -1,93 +1,77 @@
// RUN: %clang_cc1 -fms-extensions -fsyntax-only -verify %s
// RUN: %clang_cc1 -fms-extensions -fdelayed-template-parsing -fsyntax-only -verify %s
-
class A {
public:
- template <class U>
- A(U p) {
- }
- template <>
- A(int p) { // expected-warning{{explicit specialization of 'A' within class scope is a Microsoft extension}}
- }
-
- template <class U>
- void f(U p) {
- }
-
- template <>
- void f(int p) { // expected-warning{{explicit specialization of 'f' within class scope is a Microsoft extension}}
- }
-
- void f(int p) {
- }
+ template<class U> A(U p) {}
+ template<> A(int p) {
+ // expected-warning@-1 {{explicit specialization of 'A' within class scope is a Microsoft extension}}
+ }
+
+ template<class U> void f(U p) {}
+
+ template<> void f(int p) {
+ // expected-warning@-1 {{explicit specialization of 'f' within class scope is a Microsoft extension}}
+ }
+
+ void f(int p) {}
};
-void test1()
-{
- A a(3);
- char* b ;
- a.f(b);
- a.f<int>(99);
- a.f(100);
+void test1() {
+ A a(3);
+ char *b;
+ a.f(b);
+ a.f<int>(99);
+ a.f(100);
}
+template<class T> class B {
+public:
+ template<class U> B(U p) {}
+ template<> B(int p) {
+ // expected-warning@-1 {{explicit specialization of 'B<T>' within class scope is a Microsoft extension}}
+ }
+ template<class U> void f(U p) { T y = 9; }
+ template<> void f(int p) {
+ // expected-warning@-1 {{explicit specialization of 'f' within class scope is a Microsoft extension}}
+ T a = 3;
+ }
-template <class T>
-class B {
-public:
- template <class U>
- B(U p) {
- }
- template <>
- B(int p) { // expected-warning{{explicit specialization of 'B<T>' within class scope is a Microsoft extension}}
- }
-
- template <class U>
- void f(U p) {
- T y = 9;
- }
-
-
- template <>
- void f(int p) { // expected-warning{{explicit specialization of 'f' within class scope is a Microsoft extension}}
- T a = 3;
- }
-
- void f(int p) {
- T a = 3;
- }
+ void f(int p) { T a = 3; }
};
-void test2()
-{
- B<char> b(3);
- char* ptr;
- b.f(ptr);
- b.f<int>(99);
- b.f(100);
+void test2() {
+ B<char> b(3);
+ char *ptr;
+ b.f(ptr);
+ b.f<int>(99);
+ b.f(100);
}
-
namespace PR12709 {
+ template<class T> class TemplateClass {
+ void member_function() { specialized_member_template<false>(); }
-template<class T>
-class TemplateClass {
- void member_function() {
- specialized_member_template<false>();
- }
+ template<bool b> void specialized_member_template() {}
- template<bool b>
- void specialized_member_template() {}
-
- template<>
- void specialized_member_template<false>() {} // expected-warning{{explicit specialization of 'specialized_member_template' within class scope is a Microsoft extension}}
-};
+ template<> void specialized_member_template<false>() {
+ // expected-warning@-1 {{explicit specialization of 'specialized_member_template' within class scope is a Microsoft extension}}
+ }
+ };
-void f() {
- TemplateClass<int> t;
+ void f() { TemplateClass<int> t; }
}
+namespace Duplicates {
+ template<typename T> struct A {
+ template<typename U> void f();
+ template<> void f<int>() {} // expected-warning {{Microsoft extension}}
+ template<> void f<T>() {} // expected-warning {{Microsoft extension}}
+ };
+
+ // FIXME: We should diagnose the duplicate explicit specialization definitions
+ // here.
+ template struct A<int>;
}
diff --git a/test/SemaTemplate/ms-if-exists.cpp b/test/SemaTemplate/ms-if-exists.cpp
index 04f4a6362361..9b95bba5068a 100644
--- a/test/SemaTemplate/ms-if-exists.cpp
+++ b/test/SemaTemplate/ms-if-exists.cpp
@@ -48,11 +48,11 @@ void f(T t) {
{ }
}
- int array2[] = {
- 0,
- __if_exists(T::bar) {2, }// expected-warning{{dependent __if_exists declarations are ignored}}
- 3
- };
+ int array2[] = {
+ 0,
+ __if_exists(T::bar) {2, }// expected-warning{{dependent __if_exists declarations are ignored}}
+ 3
+ };
}
template void f(HasFoo); // expected-note{{in instantiation of function template specialization 'f<HasFoo>' requested here}}
diff --git a/test/SemaTemplate/ms-lookup-template-base-classes.cpp b/test/SemaTemplate/ms-lookup-template-base-classes.cpp
index 72ce056063ea..40f73c0d9e64 100644
--- a/test/SemaTemplate/ms-lookup-template-base-classes.cpp
+++ b/test/SemaTemplate/ms-lookup-template-base-classes.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fms-compatibility -fsyntax-only -verify %s
+// RUN: %clang_cc1 -std=c++1y -fms-compatibility -fno-spell-checking -fsyntax-only -verify %s
template <class T>
@@ -64,7 +64,7 @@ template<class T>
class B : public A<T> {
public:
void f() {
- var = 3;
+ var = 3; // expected-warning {{use of undeclared identifier 'var'; unqualified lookup into dependent bases of class template 'B' is a Microsoft extension}}
}
};
@@ -160,7 +160,7 @@ template <class T>
class A : public T {
public:
void f(int hWnd) {
- m_hWnd = 1;
+ m_hWnd = 1; // expected-warning {{use of undeclared identifier 'm_hWnd'; unqualified lookup into dependent bases of class template 'A' is a Microsoft extension}}
}
};
@@ -176,7 +176,7 @@ class B {};
template <class T>
class Base {
public:
- bool base_fun(void* p) { return false; } // expected-note {{must qualify identifier to find this declaration in dependent base clas}}
+ bool base_fun(void* p) { return false; } // expected-note {{must qualify identifier to find this declaration in dependent base class}}
operator T*() const { return 0; }
};
@@ -204,25 +204,27 @@ struct A {
static int sa;
};
template <typename T> struct B : T {
- int foo() { return a; }
- int *bar() { return &a; }
+ int foo() { return a; } // expected-warning {{lookup into dependent bases}}
+ int *bar() { return &a; } // expected-warning {{lookup into dependent bases}}
int baz() { return T::a; }
int T::*qux() { return &T::a; }
static int T::*stuff() { return &T::a; }
static int stuff1() { return T::sa; }
static int *stuff2() { return &T::sa; }
+ static int stuff3() { return sa; } // expected-warning {{lookup into dependent bases}}
+ static int *stuff4() { return &sa; } // expected-warning {{lookup into dependent bases}}
};
template <typename T> struct C : T {
- int foo() { return b; } // expected-error {{no member named 'b' in 'PR16014::C<PR16014::A>'}}
- int *bar() { return &b; } // expected-error {{no member named 'b' in 'PR16014::C<PR16014::A>'}}
+ int foo() { return b; } // expected-error {{no member named 'b' in 'PR16014::C<PR16014::A>'}} expected-warning {{lookup into dependent bases}}
+ int *bar() { return &b; } // expected-error {{no member named 'b' in 'PR16014::C<PR16014::A>'}} expected-warning {{lookup into dependent bases}}
int baz() { return T::b; } // expected-error {{no member named 'b' in 'PR16014::A'}}
int T::*qux() { return &T::b; } // expected-error {{no member named 'b' in 'PR16014::A'}}
int T::*fuz() { return &U::a; } // expected-error {{use of undeclared identifier 'U'}}
};
template struct B<A>;
-template struct C<A>; // expected-note-re 1+ {{in instantiation of member function 'PR16014::C<PR16014::A>::.*' requested here}}
+template struct C<A>; // expected-note-re 1+ {{in instantiation of member function 'PR16014::C<PR16014::A>::{{.*}}' requested here}}
template <typename T> struct D : T {
struct Inner {
@@ -236,3 +238,225 @@ template <typename T> struct D : T {
template struct D<A>;
}
+
+namespace PR19233 {
+template <class T>
+struct A : T {
+ void foo() {
+ ::undef(); // expected-error {{no member named 'undef' in the global namespace}}
+ }
+ void bar() {
+ ::UndefClass::undef(); // expected-error {{no member named 'UndefClass' in the global namespace}}
+ }
+ void baz() {
+ B::qux(); // expected-error {{use of undeclared identifier 'B'}}
+ }
+};
+
+struct B { void qux(); };
+struct C : B { };
+template struct A<C>; // No error! B is a base of A<C>, and qux is available.
+
+struct D { };
+template struct A<D>; // expected-note {{in instantiation of member function 'PR19233::A<PR19233::D>::baz' requested here}}
+
+}
+
+namespace nonmethod_missing_this {
+template <typename T> struct Base { int y = 42; };
+template <typename T> struct Derived : Base<T> {
+ int x = y; // expected-warning {{lookup into dependent bases}}
+ auto foo(int j) -> decltype(y * j) { // expected-warning {{lookup into dependent bases}}
+ return y * j; // expected-warning {{lookup into dependent bases}}
+ }
+ int bar() {
+ return [&] { return y; }(); // expected-warning {{lookup into dependent bases}}
+ }
+};
+template struct Derived<int>;
+}
+
+namespace typedef_in_base {
+template <typename T> struct A { typedef T NameFromBase; };
+template <typename T> struct B : A<T> {
+ NameFromBase m; // expected-warning {{found via unqualified lookup into dependent bases}}
+};
+static_assert(sizeof(B<int>) == 4, "");
+}
+
+namespace struct_in_base {
+template <typename T> struct A { struct NameFromBase {}; };
+template <typename T> struct B : A<T> {
+ NameFromBase m; // expected-warning {{found via unqualified lookup into dependent bases}}
+};
+static_assert(sizeof(B<int>) == 1, "");
+}
+
+namespace enum_in_base {
+template <typename T> struct A { enum NameFromBase { X }; };
+template <typename T> struct B : A<T> {
+ NameFromBase m; // expected-warning {{found via unqualified lookup into dependent bases}}
+};
+static_assert(sizeof(B<int>) == sizeof(A<int>::NameFromBase), "");
+}
+
+namespace two_types_in_base {
+template <typename T> struct A { typedef T NameFromBase; };
+template <typename T> struct B { struct NameFromBase { T m; }; };
+template <typename T> struct C : A<T>, B<T> {
+ NameFromBase m; // expected-error {{unknown type name 'NameFromBase'}}
+};
+static_assert(sizeof(C<int>) == 4, "");
+}
+
+namespace type_and_decl_in_base {
+template <typename T> struct A { typedef T NameFromBase; };
+template <typename T> struct B { static const T NameFromBase = 42; };
+template <typename T> struct C : A<T>, B<T> {
+ NameFromBase m; // expected-error {{unknown type name 'NameFromBase'}}
+};
+}
+
+namespace classify_type_from_base {
+template <typename T> struct A { struct NameFromBase {}; };
+template <typename T> struct B : A<T> {
+ A<NameFromBase> m; // expected-warning {{found via unqualified lookup into dependent bases}}
+};
+}
+
+namespace classify_nontype_from_base {
+// MSVC does not do lookup of non-type declarations from dependent template base
+// classes. The extra lookup only applies to types.
+template <typename T> struct A { void NameFromBase() {} };
+template <void (*F)()> struct B { };
+template <typename T> struct C : A<T> {
+ B<C::NameFromBase> a; // correct
+ B<NameFromBase> b; // expected-error {{use of undeclared identifier 'NameFromBase'}}
+};
+}
+
+namespace template_in_base {
+template <typename T> struct A {
+ template <typename U> struct NameFromBase { U x; };
+};
+template <typename T> struct B : A<T> {
+ // Correct form.
+ typename B::template NameFromBase<T> m;
+};
+template <typename T> struct C : A<T> {
+ // Incorrect form.
+ NameFromBase<T> m; // expected-error {{unknown type name 'NameFromBase'}}
+ //expected-error@-1 {{expected member name or ';' after declaration specifiers}}
+};
+}
+
+namespace type_in_inner_class_in_base {
+template <typename T>
+struct A {
+ struct B { typedef T NameFromBase; };
+};
+template <typename T>
+struct C : A<T>::B { NameFromBase m; }; // expected-error {{unknown type name 'NameFromBase'}}
+}
+
+namespace type_in_inner_template_class_in_base {
+template <typename T>
+struct A {
+ template <typename U> struct B { typedef U InnerType; };
+};
+template <typename T>
+struct C : A<T>::template B<T> {
+ NameFromBase m; // expected-error {{unknown type name 'NameFromBase'}}
+};
+}
+
+namespace have_nondependent_base {
+template <typename T>
+struct A {
+ // Nothing, lookup should fail.
+};
+template <typename T>
+struct B : A<T> { NameFromBase m; }; // expected-error {{unknown type name 'NameFromBase'}}
+struct C : A<int> { NameFromBase m; }; // expected-error {{unknown type name 'NameFromBase'}}
+}
+
+namespace type_in_base_of_dependent_base {
+struct A { typedef int NameFromBase; };
+template <typename T>
+struct B : A {};
+// FIXME: MSVC accepts this.
+template <typename T>
+struct C : B<T> { NameFromBase m; }; // expected-error {{unknown type name 'NameFromBase'}}
+}
+
+namespace lookup_in_function_contexts {
+template <typename T> struct A { typedef T NameFromBase; };
+template <typename T>
+struct B : A<T> {
+ // expected-warning@+1 {{lookup into dependent bases}}
+ static auto lateSpecifiedFunc() -> decltype(NameFromBase()) {
+ return {};
+ }
+
+ static void memberFunc() {
+ NameFromBase x; // expected-warning {{lookup into dependent bases}}
+ }
+
+ static void funcLocalClass() {
+ struct X {
+ NameFromBase x; // expected-warning {{lookup into dependent bases}}
+ } y;
+ }
+
+ void localClassMethod() {
+ struct X {
+ void bar() {
+ NameFromBase m; // expected-warning {{lookup into dependent bases}}
+ }
+ } x;
+ x.bar();
+ }
+
+ static void funcLambda() {
+ auto l = []() {
+ NameFromBase x; // expected-warning {{lookup into dependent bases}}
+ };
+ l();
+ }
+
+ static constexpr int constexprFunc() {
+ NameFromBase x = {}; // expected-warning {{lookup into dependent bases}}
+ return sizeof(x);
+ }
+
+ static auto autoFunc() {
+ NameFromBase x; // expected-warning {{lookup into dependent bases}}
+ return x;
+ }
+};
+
+// Force us to parse the methods.
+template struct B<int>;
+}
+
+namespace function_template_deduction {
+// Overloaded function templates.
+template <int N> int f() { return N; }
+template <typename T> int f() { return sizeof(T); }
+
+// Dependent base class with type.
+template <typename T>
+struct A { typedef T NameFromBase; };
+template <typename T>
+struct B : A<T> {
+ // expected-warning@+1 {{found via unqualified lookup into dependent bases}}
+ int x = f<NameFromBase>();
+};
+
+// Dependent base class with enum.
+template <typename T> struct C { enum { NameFromBase = 4 }; };
+template <typename T> struct D : C<T> {
+ // expected-warning@+1 {{use of undeclared identifier 'NameFromBase'; unqualified lookup into dependent bases}}
+ int x = f<NameFromBase>();
+};
+}
diff --git a/test/SemaTemplate/ms-sizeof-missing-typename.cpp b/test/SemaTemplate/ms-sizeof-missing-typename.cpp
new file mode 100644
index 000000000000..ff8984feb795
--- /dev/null
+++ b/test/SemaTemplate/ms-sizeof-missing-typename.cpp
@@ -0,0 +1,61 @@
+// RUN: %clang_cc1 -std=c++11 -fms-compatibility -fsyntax-only -verify %s
+
+// If we were even more clever, we'd tell the user to use one set of parens to
+// get the size of this type, so they don't get errors after inserting typename.
+
+namespace basic {
+template <typename T> int type_f() { return sizeof T::type; } // expected-error {{missing 'typename' prior to dependent type name 'X::type'}}
+template <typename T> int type_g() { return sizeof(T::type); } // expected-warning {{missing 'typename' prior to dependent type name 'X::type'}}
+template <typename T> int type_h() { return sizeof((T::type)); } // expected-error {{missing 'typename' prior to dependent type name 'X::type'}}
+template <typename T> int value_f() { return sizeof T::not_a_type; }
+template <typename T> int value_g() { return sizeof(T::not_a_type); }
+template <typename T> int value_h() { return sizeof((T::not_a_type)); }
+struct X {
+ typedef int type;
+ static const int not_a_type;
+};
+int bar() {
+ return
+ type_f<X>() + // expected-note-re {{in instantiation {{.*}} requested here}}
+ type_g<X>() + // expected-note-re {{in instantiation {{.*}} requested here}}
+ type_h<X>() + // expected-note-re {{in instantiation {{.*}} requested here}}
+ value_f<X>() +
+ value_f<X>() +
+ value_f<X>();
+}
+}
+
+namespace nested_sizeof {
+template <typename T>
+struct Foo {
+ enum {
+ // expected-warning@+2 {{use 'template' keyword to treat 'InnerTemplate' as a dependent template name}}
+ // expected-warning@+1 {{missing 'typename' prior to dependent type name 'Bar::InnerType'}}
+ x1 = sizeof(typename T::/*template*/ InnerTemplate<sizeof(/*typename*/ T::InnerType)>),
+ // expected-warning@+1 {{missing 'typename' prior to dependent type name 'Bar::InnerType'}}
+ x2 = sizeof(typename T::template InnerTemplate<sizeof(/*typename*/ T::InnerType)>),
+ // expected-warning@+1 {{use 'template' keyword to treat 'InnerTemplate' as a dependent template name}}
+ y1 = sizeof(typename T::/*template*/ InnerTemplate<sizeof(T::InnerVar)>),
+ y2 = sizeof(typename T::template InnerTemplate<sizeof(T::InnerVar)>),
+ z = sizeof(T::template InnerTemplate<sizeof(T::InnerVar)>::x),
+ };
+};
+struct Bar {
+ template <int N>
+ struct InnerTemplate { int x[N]; };
+ typedef double InnerType;
+ static const int InnerVar = 42;
+};
+template struct Foo<Bar>; // expected-note-re {{in instantiation {{.*}} requested here}}
+}
+
+namespace ambiguous_missing_parens {
+// expected-error@+1 {{'Q::U' instantiated to a class template, not a function template}}
+template <typename T> void f() { int a = sizeof T::template U<0> + 4; }
+struct Q {
+ // expected-error@+1 {{class template declared here}}
+ template <int> struct U {};
+};
+// expected-note-re@+1 {{in instantiation {{.*}} requested here}}
+template void f<Q>();
+}
diff --git a/test/SemaTemplate/operator-template.cpp b/test/SemaTemplate/operator-template.cpp
index 30d6ccfb9597..416625097064 100644
--- a/test/SemaTemplate/operator-template.cpp
+++ b/test/SemaTemplate/operator-template.cpp
@@ -12,7 +12,6 @@ int a0(A<int> x) { return x == 1; }
template<class X>struct B{typedef X Y;};
template<class X>bool operator==(B<X>*,typename B<X>::Y); // \
// expected-error{{overloaded 'operator==' must have at least one parameter of class or enumeration type}} \
-// expected-note{{in instantiation of function template specialization}} \
// expected-note{{candidate template ignored: substitution failure [with X = int]}}
-int a(B<int> x) { return operator==(&x,1); } // expected-error{{no matching function for call to 'operator=='}}
-
+int a(B<int> x) { return operator==(&x,1); } // expected-error{{no matching function for call to 'operator=='}} \
+// expected-note{{in instantiation of function template specialization}}
diff --git a/test/SemaTemplate/pack-deduction.cpp b/test/SemaTemplate/pack-deduction.cpp
new file mode 100644
index 000000000000..f3f969e9af00
--- /dev/null
+++ b/test/SemaTemplate/pack-deduction.cpp
@@ -0,0 +1,39 @@
+// RUN: %clang_cc1 -std=c++11 -verify %s
+
+template<typename ...T> struct X {};
+
+template<typename T, typename U> struct P {};
+
+namespace Nested {
+ template<typename ...T> int f1(X<T, T...>... a); // expected-note +{{conflicting types for parameter 'T'}}
+ template<typename ...T> int f2(P<X<T...>, T> ...a); // expected-note +{{conflicting types for parameter 'T'}}
+
+ int a1 = f1(X<int, int, double>(), X<double, int, double>());
+ int a2 = f1(X<int, int>());
+ int a3 = f1(X<int>(), X<double>()); // expected-error {{no matching}}
+ int a4 = f1(X<int, int>(), X<int>()); // expected-error {{no matching}}
+ int a5 = f1(X<int>(), X<int, int>()); // expected-error {{no matching}}
+ int a6 = f1(X<int, int, int>(), X<int, int, int>(), X<int, int, int, int>()); // expected-error {{no matching}}
+
+ int b1 = f2(P<X<int, double>, int>(), P<X<int, double>, double>());
+ int b2 = f2(P<X<int, double>, int>(), P<X<int, double>, double>(), P<X<int, double>, char>()); // expected-error {{no matching}}
+}
+
+namespace PR14841 {
+ template<typename T, typename U> struct A {};
+ template<typename ...Ts> void f(A<Ts...>); // expected-note {{substitution failure [with Ts = <char, short, int>]: too many template arg}}
+
+ void g(A<char, short> a) {
+ f(a);
+ f<char>(a);
+ f<char, short>(a);
+ f<char, short, int>(a); // expected-error {{no matching function}}
+ }
+}
+
+namespace RetainExprPacks {
+ int f(int a, int b, int c);
+ template<typename ...Ts> struct X {};
+ template<typename ...Ts> int g(X<Ts...>, decltype(f(Ts()...)));
+ int n = g<int, int>(X<int, int, int>(), 0);
+}
diff --git a/test/SemaTemplate/resolve-single-template-id.cpp b/test/SemaTemplate/resolve-single-template-id.cpp
index 7fb16eb46745..bebca76c4f64 100644
--- a/test/SemaTemplate/resolve-single-template-id.cpp
+++ b/test/SemaTemplate/resolve-single-template-id.cpp
@@ -45,9 +45,15 @@ int main()
+oneT<int>; // expected-warning {{expression result unused}}
-oneT<int>; //expected-error {{invalid argument type}}
oneT<int> == 0; // expected-warning {{equality comparison result unused}} \
- // expected-note {{use '=' to turn this equality comparison into an assignment}}
- 0 == oneT<int>; // expected-warning {{equality comparison result unused}}
- 0 != oneT<int>; // expected-warning {{inequality comparison result unused}}
+ // expected-note {{use '=' to turn this equality comparison into an assignment}} \
+ // expected-warning {{comparison of function 'oneT<int>' equal to a null pointer is always false}} \
+ // expected-note {{prefix with the address-of operator to silence this warning}}
+ 0 == oneT<int>; // expected-warning {{equality comparison result unused}} \
+ // expected-warning {{comparison of function 'oneT<int>' equal to a null pointer is always false}} \
+ // expected-note {{prefix with the address-of operator to silence this warning}}
+ 0 != oneT<int>; // expected-warning {{inequality comparison result unused}} \
+ // expected-warning {{comparison of function 'oneT<int>' not equal to a null pointer is always true}} \
+ // expected-note {{prefix with the address-of operator to silence this warning}}
(false ? one : oneT<int>); // expected-warning {{expression result unused}}
void (*p1)(int); p1 = oneT<int>;
@@ -61,15 +67,17 @@ int main()
b = (void (*)()) twoT<int>;
one < one; //expected-warning {{self-comparison always evaluates to false}} \
- //expected-warning {{expression result unused}}
+ //expected-warning {{relational comparison result unused}}
oneT<int> < oneT<int>; //expected-warning {{self-comparison always evaluates to false}} \
- //expected-warning {{expression result unused}}
+ //expected-warning {{relational comparison result unused}}
two < two; //expected-error 2 {{reference to overloaded function could not be resolved; did you mean to call it with no arguments?}} expected-error {{invalid operands to binary expression ('void' and 'void')}}
twoT<int> < twoT<int>; //expected-error {{reference to overloaded function could not be resolved; did you mean to call it?}} {{cannot resolve overloaded function 'twoT' from context}}
oneT<int> == 0; // expected-warning {{equality comparison result unused}} \
- // expected-note {{use '=' to turn this equality comparison into an assignment}}
+ // expected-note {{use '=' to turn this equality comparison into an assignment}} \
+ // expected-warning {{comparison of function 'oneT<int>' equal to a null pointer is always false}} \
+ // expected-note {{prefix with the address-of operator to silence this warning}}
}
diff --git a/test/SemaTemplate/temp_arg_nontype.cpp b/test/SemaTemplate/temp_arg_nontype.cpp
index 8f6cc192fa8b..91b0c6e76508 100644
--- a/test/SemaTemplate/temp_arg_nontype.cpp
+++ b/test/SemaTemplate/temp_arg_nontype.cpp
@@ -82,7 +82,7 @@ struct Z {
template<int (Z::*pmf)(int)> struct A6; // expected-note{{template parameter is declared here}}
A6<&Z::foo> *a17_1;
A6<&Z::bar> *a17_2;
-A6<&Z::baz> *a17_3; // expected-error{{non-type template argument of type 'double (Z::*)(double)' cannot be converted to a value of type 'int (Z::*)(int)'}}
+A6<&Z::baz> *a17_3; // expected-error-re{{non-type template argument of type 'double (Z::*)(double){{( __attribute__\(\(thiscall\)\))?}}' cannot be converted to a value of type 'int (Z::*)(int){{( __attribute__\(\(thiscall\)\))?}}'}}
template<int Z::*pm> struct A7; // expected-note{{template parameter is declared here}}
diff --git a/test/SemaTemplate/temp_arg_nontype_cxx11.cpp b/test/SemaTemplate/temp_arg_nontype_cxx11.cpp
index d773c6436fb3..15c9c2560a96 100644
--- a/test/SemaTemplate/temp_arg_nontype_cxx11.cpp
+++ b/test/SemaTemplate/temp_arg_nontype_cxx11.cpp
@@ -8,3 +8,18 @@ namespace PR15360 {
f<int[3], int*, nullptr>(); // expected-note{{in instantiation of}}
}
}
+
+namespace CanonicalNullptr {
+ template<typename T> struct get { typedef T type; };
+ struct X {};
+ template<typename T, typename get<T *>::type P = nullptr> struct A {};
+ template<typename T, typename get<decltype((T(), nullptr))>::type P = nullptr> struct B {};
+ template<typename T, typename get<T X::*>::type P = nullptr> struct C {};
+
+ template<typename T> A<T> MakeA();
+ template<typename T> B<T> MakeB();
+ template<typename T> C<T> MakeC();
+ A<int> a = MakeA<int>();
+ B<int> b = MakeB<int>();
+ C<int> c = MakeC<int>();
+}
diff --git a/test/SemaTemplate/typename-specifier.cpp b/test/SemaTemplate/typename-specifier.cpp
index 733dc7fa184e..602e9030636d 100644
--- a/test/SemaTemplate/typename-specifier.cpp
+++ b/test/SemaTemplate/typename-specifier.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -verify %s -Wno-unused
+// RUN: %clang_cc1 -fsyntax-only -verify %s -Wno-unused -fms-compatibility -DMSVC
namespace N {
struct A {
typedef int type;
@@ -136,19 +137,106 @@ class ExampleClass1 {
};
void foo() {
- pair<ExampleItemSet::iterator, int> i; // expected-error {{template argument for template type parameter must be a type; did you forget 'typename'?}}
- pair<this->ExampleItemSet::iterator, int> i; // expected-error-re {{template argument for template type parameter must be a type$}}
- pair<ExampleItemSet::operator[], int> i; // expected-error-re {{template argument for template type parameter must be a type$}}
+#ifdef MSVC
+ // expected-warning@+4 {{omitted 'typename' is a Microsoft extension}}
+#else
+ // expected-error@+2 {{template argument for template type parameter must be a type; did you forget 'typename'?}}
+#endif
+ pair<ExampleItemSet::iterator, int> i;
+ pair<this->ExampleItemSet::iterator, int> i; // expected-error-re {{template argument for template type parameter must be a type{{$}}}}
+ pair<ExampleItemSet::operator[], int> i; // expected-error-re {{template argument for template type parameter must be a type{{$}}}}
}
- pair<ExampleItemSet::iterator, int> elt; // expected-error {{template argument for template type parameter must be a type; did you forget 'typename'?}}
+#ifdef MSVC
+ // expected-warning@+4 {{omitted 'typename' is a Microsoft extension}}
+#else
+ // expected-error@+2 {{template argument for template type parameter must be a type; did you forget 'typename'?}}
+#endif
+ pair<ExampleItemSet::iterator, int> elt;
typedef map<int, ExampleItem*> ExampleItemMap;
static void bar() {
- pair<ExampleItemMap::iterator, int> i; // expected-error {{template argument for template type parameter must be a type; did you forget 'typename'?}}
+#ifdef MSVC
+ // expected-warning@+4 {{omitted 'typename' is a Microsoft extension}}
+#else
+ // expected-error@+2 {{template argument for template type parameter must be a type; did you forget 'typename'?}}
+#endif
+ pair<ExampleItemMap::iterator, int> i;
}
- pair<ExampleItemMap::iterator, int> entry; // expected-error {{template argument for template type parameter must be a type; did you forget 'typename'?}}
+#ifdef MSVC
+ // expected-warning@+4 {{omitted 'typename' is a Microsoft extension}}
+#else
+ // expected-error@+2 {{template argument for template type parameter must be a type; did you forget 'typename'?}}
+#endif
+ pair<ExampleItemMap::iterator, int> entry;
pair<bar, int> foobar; // expected-error {{template argument for template type parameter must be a type}}
};
} // namespace missing_typename
+
+namespace missing_typename_and_base {
+template <class T> struct Bar {}; // expected-note 1+ {{template parameter is declared here}}
+template <typename T>
+struct Foo : T {
+
+ // FIXME: MSVC accepts this code.
+ Bar<TypeInBase> x; // expected-error {{use of undeclared identifier 'TypeInBase'}}
+
+#ifdef MSVC
+ // expected-warning@+4 {{omitted 'typename' is a Microsoft extension}}
+#else
+ // expected-error@+2 {{must be a type; did you forget 'typename'?}}
+#endif
+ Bar<T::TypeInBase> y;
+
+#ifdef MSVC
+ // expected-warning@+4 {{omitted 'typename' is a Microsoft extension}}
+#else
+ // expected-error@+2 {{must be a type; did you forget 'typename'?}}
+#endif
+ Bar<T::NestedRD::TypeInNestedRD> z;
+
+};
+struct Base {
+ typedef int TypeInBase;
+ struct NestedRD {
+ typedef int TypeInNestedRD;
+ };
+};
+Foo<Base> x;
+} // namespace missing_typename_and_base
+
+namespace func_type_vs_construct_tmp {
+template <typename> struct S { typedef int type; };
+template <typename T> void f();
+template <int N> void f();
+
+// expected-error@+1 {{missing 'typename' prior to dependent type name 'S<int>::type'}}
+template <typename T> void g() { f</*typename*/ S<T>::type(int())>(); }
+
+// Adding typename does fix the diagnostic.
+template <typename T> void h() { f<typename S<T>::type(int())>(); }
+
+void j() {
+ g<int>(); // expected-note-re {{in instantiation {{.*}} requested here}}
+ h<int>();
+}
+} // namespace func_type_vs_construct_tmp
+
+namespace pointer_vs_multiply {
+int x;
+// expected-error@+1 {{missing 'typename' prior to dependent type name 'B::type_or_int'}}
+template <typename T> void g() { T::type_or_int * x; }
+// expected-error@+1 {{typename specifier refers to non-type member 'type_or_int' in 'pointer_vs_multiply::A'}}
+template <typename T> void h() { typename T::type_or_int * x; }
+
+struct A { static const int type_or_int = 5; }; // expected-note {{referenced member 'type_or_int' is declared here}}
+struct B { typedef int type_or_int; };
+
+void j() {
+ g<A>();
+ g<B>(); // expected-note-re {{in instantiation {{.*}} requested here}}
+ h<A>(); // expected-note-re {{in instantiation {{.*}} requested here}}
+ h<B>();
+}
+} // namespace pointer_vs_multiply
diff --git a/test/SemaTemplate/virtual-member-functions.cpp b/test/SemaTemplate/virtual-member-functions.cpp
index 439d8f836f9f..a23bf4e3ee5e 100644
--- a/test/SemaTemplate/virtual-member-functions.cpp
+++ b/test/SemaTemplate/virtual-member-functions.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple %ms_abi_triple -DMSABI -fsyntax-only -verify %s
namespace PR5557 {
template <class T> struct A {
@@ -43,7 +44,7 @@ template struct Derived<int>; // expected-note {{in instantiation of member func
template<typename T>
struct HasOutOfLineKey {
- HasOutOfLineKey() { }
+ HasOutOfLineKey() { } // expected-note{{in instantiation of member function 'HasOutOfLineKey<int>::f' requested here}}
virtual T *f(float *fp);
};
@@ -52,7 +53,7 @@ T *HasOutOfLineKey<T>::f(float *fp) {
return fp; // expected-error{{cannot initialize return object of type 'int *' with an lvalue of type 'float *'}}
}
-HasOutOfLineKey<int> out_of_line; // expected-note{{in instantiation of member function 'HasOutOfLineKey<int>::f' requested here}}
+HasOutOfLineKey<int> out_of_line; // expected-note{{in instantiation of member function 'HasOutOfLineKey<int>::HasOutOfLineKey' requested here}}
namespace std {
class type_info;
@@ -71,8 +72,13 @@ namespace PR7114 {
int f() { return B<int>::value; }
+#ifdef MSABI
+ void test_typeid(B<float>::Inner bfi) { // expected-note{{implicit destructor}}
+ (void)typeid(bfi);
+#else
void test_typeid(B<float>::Inner bfi) {
(void)typeid(bfi); // expected-note{{implicit destructor}}
+#endif
}
template<typename T>
@@ -80,7 +86,7 @@ namespace PR7114 {
void f() { }
};
- void test_X(X<int> xi, X<float> xf) {
+ void test_X(X<int> &xi, X<float> &xf) {
xi.f();
}
}
@@ -96,3 +102,53 @@ namespace DynamicCast {
Y* f(X<void>* x) { return dynamic_cast<Y*>(x); } // expected-note {{in instantiation of member function 'DynamicCast::X<void>::foo' requested here}}
Y* f2(X<void>* x) { return dynamic_cast<Y*>(x); }
}
+
+namespace avoid_using_vtable {
+// We shouldn't emit the vtable for this code, in any ABI. If we emit the
+// vtable, we emit an implicit virtual dtor, which calls ~RefPtr, which requires
+// a complete type for DeclaredOnly.
+//
+// Previously we would reference the vtable in the MS C++ ABI, even though we
+// don't need to emit either the ctor or the dtor. In the Itanium C++ ABI, the
+// 'trace' method is the key function, so even though we use the vtable, we
+// don't emit it.
+
+template <typename T>
+struct RefPtr {
+ T *m_ptr;
+ ~RefPtr() { m_ptr->deref(); }
+};
+struct DeclaredOnly;
+struct Base {
+ virtual ~Base();
+};
+
+struct AvoidVTable : Base {
+ RefPtr<DeclaredOnly> m_insertionStyle;
+ virtual void trace();
+ AvoidVTable();
+};
+// Don't call the dtor, because that will emit an implicit dtor, and require a
+// complete type for DeclaredOnly.
+void foo() { new AvoidVTable; }
+}
+
+namespace vtable_uses_incomplete {
+// Opposite of the previous test that avoids a vtable, this one tests that we
+// use the vtable when the ctor is defined inline.
+template <typename T>
+struct RefPtr {
+ T *m_ptr;
+ ~RefPtr() { m_ptr->deref(); } // expected-error {{member access into incomplete type 'vtable_uses_incomplete::DeclaredOnly'}}
+};
+struct DeclaredOnly; // expected-note {{forward declaration of 'vtable_uses_incomplete::DeclaredOnly'}}
+struct Base {
+ virtual ~Base();
+};
+
+struct UsesVTable : Base {
+ RefPtr<DeclaredOnly> m_insertionStyle;
+ virtual void trace();
+ UsesVTable() {} // expected-note {{in instantiation of member function 'vtable_uses_incomplete::RefPtr<vtable_uses_incomplete::DeclaredOnly>::~RefPtr' requested here}}
+};
+}
diff --git a/test/Tooling/lit.local.cfg b/test/Tooling/lit.local.cfg
new file mode 100644
index 000000000000..da2a68b378cc
--- /dev/null
+++ b/test/Tooling/lit.local.cfg
@@ -0,0 +1,2 @@
+if config.root.clang_staticanalyzer == 0:
+ config.unsupported = True
diff --git a/test/Tooling/multi-jobs.cpp b/test/Tooling/multi-jobs.cpp
index cef84439f0da..980ade41fdf6 100644
--- a/test/Tooling/multi-jobs.cpp
+++ b/test/Tooling/multi-jobs.cpp
@@ -1,7 +1,6 @@
// RUN: not clang-check "%s" -- -no-integrated-as -c 2>&1 | FileCheck %s
+// The following test uses multiple time the same '-no-integrated-as' flag in order to make sure those flags are really skipped, and not just overwritten by luck :
+// RUN: not clang-check "%s" -- -target x86_64-win32 -c -no-integrated-as -no-integrated-as -no-integrated-as 2>&1 | FileCheck %s
// CHECK: C++ requires
invalid;
-
-// MSVC targeted drivers (*-win32) are incapable of invoking external assembler.
-// XFAIL: win32
diff --git a/test/Unit/lit.cfg b/test/Unit/lit.cfg
index f39fded3acc7..4fa6e78ed63b 100644
--- a/test/Unit/lit.cfg
+++ b/test/Unit/lit.cfg
@@ -3,6 +3,7 @@
# Configuration file for the 'lit' test runner.
import os
+import platform
import lit.formats
import lit.util
@@ -85,10 +86,23 @@ if config.test_exec_root is None:
lit_config.load_config(config, site_cfg)
raise SystemExit
-# If necessary, point the dynamic loader at libLLVM.so.
-if config.enable_shared:
- shlibpath = config.environment.get(config.shlibpath_var,'')
- if shlibpath:
- shlibpath = os.pathsep + shlibpath
- shlibpath = config.shlibdir + shlibpath
- config.environment[config.shlibpath_var] = shlibpath
+shlibpath_var = ''
+if platform.system() == 'Linux':
+ shlibpath_var = 'LD_LIBRARY_PATH'
+elif platform.system() == 'Darwin':
+ shlibpath_var = 'DYLD_LIBRARY_PATH'
+elif platform.system() == 'Windows':
+ shlibpath_var = 'PATH'
+
+# Point the dynamic loader at dynamic libraries in 'lib'.
+llvm_libs_dir = getattr(config, 'llvm_libs_dir', None)
+if not llvm_libs_dir:
+ lit_config.fatal('No LLVM libs dir set!')
+shlibpath = os.path.pathsep.join((llvm_libs_dir,
+ config.environment.get(shlibpath_var,'')))
+
+# Win32 seeks DLLs along %PATH%.
+if sys.platform in ['win32', 'cygwin'] and os.path.isdir(config.shlibdir):
+ shlibpath = os.path.pathsep.join((config.shlibdir, shlibpath))
+
+config.environment[shlibpath_var] = shlibpath
diff --git a/test/Unit/lit.site.cfg.in b/test/Unit/lit.site.cfg.in
index a255cdce0de8..37e8cb011ebb 100644
--- a/test/Unit/lit.site.cfg.in
+++ b/test/Unit/lit.site.cfg.in
@@ -10,7 +10,6 @@ config.llvm_build_mode = "@LLVM_BUILD_MODE@"
config.clang_obj_root = "@CLANG_BINARY_DIR@"
config.enable_shared = @ENABLE_SHARED@
config.shlibdir = "@SHLIBDIR@"
-config.shlibpath_var = "@SHLIBPATH_VAR@"
config.target_triple = "@TARGET_TRIPLE@"
# Support substitution of the tools_dir, libs_dirs, and build_mode with user
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/fp64/usr/lib/crtn.o b/test/VFS/Inputs/Foo.framework/Headers/Foo.h
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64/fp64/usr/lib/crtn.o
+++ b/test/VFS/Inputs/Foo.framework/Headers/Foo.h
diff --git a/test/VFS/Inputs/Foo.framework/Modules/module.modulemap b/test/VFS/Inputs/Foo.framework/Modules/module.modulemap
new file mode 100644
index 000000000000..0aab69f0af42
--- /dev/null
+++ b/test/VFS/Inputs/Foo.framework/Modules/module.modulemap
@@ -0,0 +1,3 @@
+framework module Foo {
+ umbrella header "Foo.h"
+}
diff --git a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/el/fp64/nan2008/usr/lib/crt1.o b/test/VFS/Inputs/Foo.h
index e69de29bb2d1..e69de29bb2d1 100644
--- a/test/Driver/Inputs/mips_fsf_tree/sysroot/mips64r2/64/el/fp64/nan2008/usr/lib/crt1.o
+++ b/test/VFS/Inputs/Foo.h
diff --git a/test/VFS/Inputs/Incomplete.h b/test/VFS/Inputs/Incomplete.h
new file mode 100644
index 000000000000..29fafc3ccf8c
--- /dev/null
+++ b/test/VFS/Inputs/Incomplete.h
@@ -0,0 +1 @@
+// does not include IncompleteVFS.h or IncompleteReal.h
diff --git a/test/VFS/Inputs/IncompleteVFS.h b/test/VFS/Inputs/IncompleteVFS.h
new file mode 100644
index 000000000000..22cfe7d6ad54
--- /dev/null
+++ b/test/VFS/Inputs/IncompleteVFS.h
@@ -0,0 +1 @@
+// IncompleteVFS.h
diff --git a/test/VFS/Inputs/actual_header.h b/test/VFS/Inputs/actual_header.h
new file mode 100644
index 000000000000..f61e58620c65
--- /dev/null
+++ b/test/VFS/Inputs/actual_header.h
@@ -0,0 +1 @@
+void bar(void);
diff --git a/test/VFS/Inputs/actual_module.map b/test/VFS/Inputs/actual_module.map
new file mode 100644
index 000000000000..d2f5b64a38d3
--- /dev/null
+++ b/test/VFS/Inputs/actual_module.map
@@ -0,0 +1,8 @@
+module not_real {
+ header "not_real.h"
+ export *
+}
+module import_some_frame {
+ header "import_some_frame.h"
+ export *
+}
diff --git a/test/VFS/Inputs/actual_module2.map b/test/VFS/Inputs/actual_module2.map
new file mode 100644
index 000000000000..24f860299f3a
--- /dev/null
+++ b/test/VFS/Inputs/actual_module2.map
@@ -0,0 +1,5 @@
+module not_real {
+ header "not_real.h"
+ export *
+ explicit module from_second_vfs { }
+}
diff --git a/test/VFS/Inputs/external-names.h b/test/VFS/Inputs/external-names.h
new file mode 100644
index 000000000000..8b0baa3f0234
--- /dev/null
+++ b/test/VFS/Inputs/external-names.h
@@ -0,0 +1,4 @@
+void foo(char **c) {
+ *c = __FILE__;
+ int x = c; // produce a diagnostic
+}
diff --git a/test/VFS/Inputs/import_some_frame.h b/test/VFS/Inputs/import_some_frame.h
new file mode 100644
index 000000000000..c1f68c83fc58
--- /dev/null
+++ b/test/VFS/Inputs/import_some_frame.h
@@ -0,0 +1,2 @@
+#import <SomeFramework/public_header.h>
+#import <SomeFramework/public_header2.h>
diff --git a/test/VFS/Inputs/include_real.h b/test/VFS/Inputs/include_real.h
new file mode 100644
index 000000000000..0750c6527221
--- /dev/null
+++ b/test/VFS/Inputs/include_real.h
@@ -0,0 +1 @@
+#include "real.h"
diff --git a/test/VFS/Inputs/incomplete-umbrella.modulemap b/test/VFS/Inputs/incomplete-umbrella.modulemap
new file mode 100644
index 000000000000..5afac9272298
--- /dev/null
+++ b/test/VFS/Inputs/incomplete-umbrella.modulemap
@@ -0,0 +1,5 @@
+framework module Incomplete {
+ umbrella header "Incomplete.h"
+ export *
+ module * { export * }
+}
diff --git a/test/VFS/Inputs/invalid-yaml.yaml b/test/VFS/Inputs/invalid-yaml.yaml
new file mode 100644
index 000000000000..2a6c6667ce4d
--- /dev/null
+++ b/test/VFS/Inputs/invalid-yaml.yaml
@@ -0,0 +1,4 @@
+{
+ 'version': 0,
+ 'roots': []
+]
diff --git a/test/VFS/Inputs/missing-key.yaml b/test/VFS/Inputs/missing-key.yaml
new file mode 100644
index 000000000000..5d18c244ee56
--- /dev/null
+++ b/test/VFS/Inputs/missing-key.yaml
@@ -0,0 +1,4 @@
+{
+ 'version': 0,
+ 'roots': [ { 'name' : 'foo', 'external-contents': 'bar' } ]
+}
diff --git a/test/VFS/Inputs/public_header.h b/test/VFS/Inputs/public_header.h
new file mode 100644
index 000000000000..09d9969d319d
--- /dev/null
+++ b/test/VFS/Inputs/public_header.h
@@ -0,0 +1,2 @@
+#import <SomeFramework/public_header2.h>
+void from_framework(void);
diff --git a/test/VFS/Inputs/public_header2.h b/test/VFS/Inputs/public_header2.h
new file mode 100644
index 000000000000..d883613ac120
--- /dev/null
+++ b/test/VFS/Inputs/public_header2.h
@@ -0,0 +1 @@
+// public_header2.h
diff --git a/test/VFS/Inputs/some_frame_module.map b/test/VFS/Inputs/some_frame_module.map
new file mode 100644
index 000000000000..3ce59b254d83
--- /dev/null
+++ b/test/VFS/Inputs/some_frame_module.map
@@ -0,0 +1,5 @@
+framework module SomeFramework {
+ umbrella header "public_header.h"
+ export *
+ module * { export * }
+}
diff --git a/test/VFS/Inputs/unknown-key.yaml b/test/VFS/Inputs/unknown-key.yaml
new file mode 100644
index 000000000000..ec7d8261d95f
--- /dev/null
+++ b/test/VFS/Inputs/unknown-key.yaml
@@ -0,0 +1,5 @@
+{
+ 'version': 0,
+ 'unknown-key': 'value',
+ 'roots': []
+}
diff --git a/test/VFS/Inputs/unknown-value.yaml b/test/VFS/Inputs/unknown-value.yaml
new file mode 100644
index 000000000000..4e90b2134cc8
--- /dev/null
+++ b/test/VFS/Inputs/unknown-value.yaml
@@ -0,0 +1,5 @@
+{
+ 'version': 0,
+ 'case-sensitive': 'Maybe?',
+ 'roots': []
+}
diff --git a/test/VFS/Inputs/use-external-names.yaml b/test/VFS/Inputs/use-external-names.yaml
new file mode 100644
index 000000000000..b9ea6342cf0b
--- /dev/null
+++ b/test/VFS/Inputs/use-external-names.yaml
@@ -0,0 +1,7 @@
+{
+ 'version': 0,
+ 'use-external-names': EXTERNAL_NAMES,
+ 'roots': [{ 'type': 'file', 'name': 'OUT_DIR/external-names.h',
+ 'external-contents': 'INPUT_DIR/external-names.h'
+ }]
+}
diff --git a/test/VFS/Inputs/vfsoverlay.yaml b/test/VFS/Inputs/vfsoverlay.yaml
new file mode 100644
index 000000000000..f395d45ee3b7
--- /dev/null
+++ b/test/VFS/Inputs/vfsoverlay.yaml
@@ -0,0 +1,53 @@
+{
+ 'version': 0,
+ 'roots': [
+ { 'name': 'OUT_DIR', 'type': 'directory',
+ 'contents': [
+ { 'name': 'not_real.h', 'type': 'file',
+ 'external-contents': 'INPUT_DIR/actual_header.h'
+ },
+ { 'name': 'import_some_frame.h', 'type': 'file',
+ 'external-contents': 'INPUT_DIR/import_some_frame.h'
+ },
+ { 'name': 'module.map', 'type': 'file',
+ 'external-contents': 'INPUT_DIR/actual_module.map'
+ },
+ { 'name': 'include_real.h', 'type': 'file',
+ 'external-contents': 'INPUT_DIR/include_real.h'
+ },
+ { 'name': 'SomeFramework.framework', 'type': 'directory',
+ 'contents': [
+ { 'name': 'Headers', 'type': 'directory',
+ 'contents': [
+ { 'name': 'public_header.h', 'type': 'file',
+ 'external-contents': 'INPUT_DIR/public_header.h' },
+ { 'name': 'public_header2.h', 'type': 'file',
+ 'external-contents': 'INPUT_DIR/public_header2.h' }
+ ]
+ }
+ ]
+ },
+ { 'name': 'Foo.framework/Headers/Foo.h', 'type': 'file',
+ 'external-contents': 'INPUT_DIR/Foo.h'
+ },
+ { 'name': 'Incomplete.framework', 'type': 'directory',
+ 'contents': [
+ { 'name': 'Headers', 'type': 'directory',
+ 'contents': [
+ { 'name': 'Incomplete.h', 'type': 'file',
+ 'external-contents': 'INPUT_DIR/Incomplete.h'
+ },
+ { 'name': 'IncompleteVFS.h', 'type': 'file',
+ 'external-contents': 'INPUT_DIR/IncompleteVFS.h'
+ }
+ ]
+ },
+ { 'name': 'Modules/module.modulemap', 'type': 'file',
+ 'external-contents': 'INPUT_DIR/incomplete-umbrella.modulemap'
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/test/VFS/Inputs/vfsoverlay2.yaml b/test/VFS/Inputs/vfsoverlay2.yaml
new file mode 100644
index 000000000000..ae2a0ce4ec98
--- /dev/null
+++ b/test/VFS/Inputs/vfsoverlay2.yaml
@@ -0,0 +1,12 @@
+{
+ 'version': 0,
+ 'roots': [
+ { 'name': 'OUT_DIR', 'type': 'directory',
+ 'contents': [
+ { 'name': 'module.map', 'type': 'file',
+ 'external-contents': 'INPUT_DIR/actual_module2.map'
+ }
+ ]
+ }
+ ]
+}
diff --git a/test/VFS/external-names.c b/test/VFS/external-names.c
new file mode 100644
index 000000000000..aa0bd6745309
--- /dev/null
+++ b/test/VFS/external-names.c
@@ -0,0 +1,35 @@
+// RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%t:g" -e "s:EXTERNAL_NAMES:true:" %S/Inputs/use-external-names.yaml > %t.external.yaml
+// RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%t:g" -e "s:EXTERNAL_NAMES:false:" %S/Inputs/use-external-names.yaml > %t.yaml
+// REQUIRES: shell
+
+#include "external-names.h"
+
+////
+// Preprocessor (__FILE__ macro and # directives):
+
+// RUN: %clang_cc1 -I %t -ivfsoverlay %t.external.yaml -E %s | FileCheck -check-prefix=CHECK-PP-EXTERNAL %s
+// CHECK-PP-EXTERNAL: # {{[0-9]*}} "[[NAME:.*Inputs.external-names.h]]"
+// CHECK-PP-EXTERNAL-NEXT: void foo(char **c) {
+// CHECK-PP-EXTERNAL-NEXT: *c = "[[NAME]]";
+
+// RUN: %clang_cc1 -I %t -ivfsoverlay %t.yaml -E %s | FileCheck -check-prefix=CHECK-PP %s
+// CHECK-PP-NOT: Inputs
+
+////
+// Diagnostics:
+
+// RUN: %clang_cc1 -I %t -ivfsoverlay %t.external.yaml -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-DIAG-EXTERNAL %s
+// CHECK-DIAG-EXTERNAL: {{.*}}Inputs{{.}}external-names.h:{{[0-9]*:[0-9]*}}: warning: incompatible pointer
+
+// RUN: %clang_cc1 -I %t -ivfsoverlay %t.yaml -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-DIAG %s
+// CHECK-DIAG-NOT: Inputs
+
+////
+// Debug info
+
+// RUN: %clang_cc1 -I %t -ivfsoverlay %t.external.yaml -triple %itanium_abi_triple -g -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-DEBUG-EXTERNAL %s
+// CHECK-DEBUG-EXTERNAL: ![[Num:[0-9]*]] = metadata !{metadata !"{{.*}}Inputs{{.}}external-names.h
+// CHECK-DEBUG-EXTERNAL: metadata !{i32 {{[0-9]*}}, metadata ![[Num]]{{.*}}DW_TAG_file_type
+
+// RUN: %clang_cc1 -I %t -ivfsoverlay %t.yaml -triple %itanium_abi_triple -g -emit-llvm %s -o - | FileCheck -check-prefix=CHECK-DEBUG %s
+// CHECK-DEBUG-NOT: Inputs
diff --git a/test/VFS/framework-import.m b/test/VFS/framework-import.m
new file mode 100644
index 000000000000..b40bc549c0a9
--- /dev/null
+++ b/test/VFS/framework-import.m
@@ -0,0 +1,9 @@
+// RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%t:g" %S/Inputs/vfsoverlay.yaml > %t.yaml
+// RUN: %clang_cc1 -Werror -F %t -ivfsoverlay %t.yaml -fsyntax-only %s
+// REQUIRES: shell
+
+#import <SomeFramework/public_header.h>
+
+void foo() {
+ from_framework();
+}
diff --git a/test/VFS/implicit-include.c b/test/VFS/implicit-include.c
new file mode 100644
index 000000000000..acf665bee248
--- /dev/null
+++ b/test/VFS/implicit-include.c
@@ -0,0 +1,7 @@
+// RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%t:g" %S/Inputs/vfsoverlay.yaml > %t.yaml
+// RUN: %clang_cc1 -Werror -ivfsoverlay %t.yaml -I %t -include "not_real.h" -fsyntax-only %s
+// REQUIRES: shell
+
+void foo() {
+ bar();
+}
diff --git a/test/VFS/include-mixed-real-and-virtual.c b/test/VFS/include-mixed-real-and-virtual.c
new file mode 100644
index 000000000000..e1f5f952cd4e
--- /dev/null
+++ b/test/VFS/include-mixed-real-and-virtual.c
@@ -0,0 +1,14 @@
+// RUN: rm -rf %t
+// RUN: mkdir -p %t
+// RUN: echo "void baz(void);" > %t/real.h
+// RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%t:g" %S/Inputs/vfsoverlay.yaml > %t.yaml
+// RUN: %clang_cc1 -Werror -ivfsoverlay %t.yaml -I %t -fsyntax-only %s
+// REQUIRES: shell
+
+#include "not_real.h"
+#include "real.h"
+
+void foo() {
+ bar();
+ baz();
+}
diff --git a/test/VFS/include-real-from-virtual.c b/test/VFS/include-real-from-virtual.c
new file mode 100644
index 000000000000..65707b551643
--- /dev/null
+++ b/test/VFS/include-real-from-virtual.c
@@ -0,0 +1,12 @@
+// RUN: rm -rf %t
+// RUN: mkdir -p %t
+// RUN: echo "void baz(void);" > %t/real.h
+// RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%t:g" %S/Inputs/vfsoverlay.yaml > %t.yaml
+// RUN: %clang_cc1 -Werror -ivfsoverlay %t.yaml -I %t -fsyntax-only %s
+// REQUIRES: shell
+
+#include "include_real.h"
+
+void foo() {
+ baz();
+}
diff --git a/test/VFS/include-virtual-from-real.c b/test/VFS/include-virtual-from-real.c
new file mode 100644
index 000000000000..c8f6059608d7
--- /dev/null
+++ b/test/VFS/include-virtual-from-real.c
@@ -0,0 +1,12 @@
+// RUN: rm -rf %t
+// RUN: mkdir -p %t
+// RUN: echo '#include "not_real.h"' > %t/include_not_real.h
+// RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%t:g" %S/Inputs/vfsoverlay.yaml > %t.yaml
+// RUN: %clang_cc1 -Werror -ivfsoverlay %t.yaml -I %t -fsyntax-only %s
+// REQUIRES: shell
+
+#include "include_not_real.h"
+
+void foo() {
+ bar();
+}
diff --git a/test/VFS/include.c b/test/VFS/include.c
new file mode 100644
index 000000000000..8cd04dd45212
--- /dev/null
+++ b/test/VFS/include.c
@@ -0,0 +1,9 @@
+// RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%t:g" %S/Inputs/vfsoverlay.yaml > %t.yaml
+// RUN: %clang_cc1 -Werror -I %t -ivfsoverlay %t.yaml -fsyntax-only %s
+// REQUIRES: shell
+
+#include "not_real.h"
+
+void foo() {
+ bar();
+}
diff --git a/test/VFS/incomplete-umbrella.m b/test/VFS/incomplete-umbrella.m
new file mode 100644
index 000000000000..4e138cc0f338
--- /dev/null
+++ b/test/VFS/incomplete-umbrella.m
@@ -0,0 +1,12 @@
+// RUN: rm -rf %t
+// RUN: mkdir -p %t/Incomplete.framework/Headers
+// RUN: echo '// IncompleteReal.h' > %t/Incomplete.framework/Headers/IncompleteReal.h
+// RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%t:g" %S/Inputs/vfsoverlay.yaml > %t.yaml
+// RUN: not %clang_cc1 -Werror -fmodules -fmodules-cache-path=%t \
+// RUN: -ivfsoverlay %t.yaml -F %t -fsyntax-only %s 2>&1 | FileCheck %s
+// REQUIRES: shell
+
+@import Incomplete;
+// CHECK: umbrella header for module 'Incomplete' {{.*}}IncompleteVFS.h
+// CHECK: umbrella header for module 'Incomplete' {{.*}}IncompleteReal.h
+// CHECK: could not build module 'Incomplete'
diff --git a/test/VFS/module-import.m b/test/VFS/module-import.m
new file mode 100644
index 000000000000..d2adcfedfaa8
--- /dev/null
+++ b/test/VFS/module-import.m
@@ -0,0 +1,27 @@
+// RUN: rm -rf %t
+// RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%t:g" %S/Inputs/vfsoverlay.yaml > %t.yaml
+// RUN: %clang_cc1 -Werror -fmodules -fmodules-cache-path=%t -ivfsoverlay %t.yaml -I %t -fsyntax-only %s
+// REQUIRES: shell
+
+@import not_real;
+
+void foo() {
+ bar();
+}
+
+// Import a submodule that is defined in actual_module2.map, which is only
+// mapped in vfsoverlay2.yaml.
+#ifdef IMPORT2
+@import not_real.from_second_module;
+// CHECK-VFS2: error: no submodule
+#endif
+
+// Override the module map (vfsoverlay2 on top)
+// RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%t:g" %S/Inputs/vfsoverlay2.yaml > %t2.yaml
+// RUN: %clang_cc1 -Werror -fmodules -fmodules-cache-path=%t -ivfsoverlay %t.yaml -ivfsoverlay %t2.yaml -I %t -fsyntax-only %s
+
+// vfsoverlay2 not present
+// RUN: not %clang_cc1 -Werror -fmodules -fmodules-cache-path=%t -ivfsoverlay %t.yaml -I %t -fsyntax-only %s -DIMPORT2 2>&1 | FileCheck -check-prefix=CHECK-VFS2 %s
+
+// vfsoverlay2 on the bottom
+// RUN: not %clang_cc1 -Werror -fmodules -fmodules-cache-path=%t -ivfsoverlay %t2.yaml -ivfsoverlay %t.yaml -I %t -fsyntax-only %s -DIMPORT2 2>&1 | FileCheck -check-prefix=CHECK-VFS2 %s
diff --git a/test/VFS/parse-errors.c b/test/VFS/parse-errors.c
new file mode 100644
index 000000000000..7194efc65a5d
--- /dev/null
+++ b/test/VFS/parse-errors.c
@@ -0,0 +1,14 @@
+// RUN: not %clang_cc1 -ivfsoverlay %S/Inputs/invalid-yaml.yaml -fsyntax-only %s 2>&1 | FileCheck %s
+// CHECK: invalid virtual filesystem overlay file
+
+// RUN: not %clang_cc1 -ivfsoverlay %S/Inputs/missing-key.yaml -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-MISSING-TYPE %s
+// CHECK-MISSING-TYPE: missing key 'type'
+// CHECK-MISSING-TYPE: invalid virtual filesystem overlay file
+
+// RUN: not %clang_cc1 -ivfsoverlay %S/Inputs/unknown-key.yaml -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-UNKNOWN-KEY %s
+// CHECK-UNKNOWN-KEY: unknown key
+// CHECK-UNKNOWN-KEY: invalid virtual filesystem overlay file
+
+// RUN: not %clang_cc1 -ivfsoverlay %S/Inputs/unknown-value.yaml -fsyntax-only %s 2>&1 | FileCheck -check-prefix=CHECK-UNKNOWN-VALUE %s
+// CHECK-UNKNOWN-VALUE: expected boolean value
+// CHECK-UNKNOWN-VALUE: invalid virtual filesystem overlay file
diff --git a/test/VFS/real-path-found-first.m b/test/VFS/real-path-found-first.m
new file mode 100644
index 000000000000..f494c6eb1534
--- /dev/null
+++ b/test/VFS/real-path-found-first.m
@@ -0,0 +1,74 @@
+// This test is for cases where we lookup a file by its 'real' path before we
+// use its VFS-mapped path. If we accidentally use the real path in header
+// search, we will not find a module for the headers. To test that we
+// intentionally rebuild modules, since the precompiled module file refers to
+// the dependency files by real path.
+
+// REQUIRES: shell
+// RUN: rm -rf %t %t-cache %t.pch
+// RUN: mkdir -p %t/SomeFramework.framework/Modules
+// RUN: cp %S/Inputs/some_frame_module.map %t/SomeFramework.framework/Modules/module.modulemap
+// RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%t:g" %S/Inputs/vfsoverlay.yaml > %t.yaml
+
+// Build
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t-cache -F %t \
+// RUN: -ivfsoverlay %t.yaml -fsyntax-only %s -verify -Wauto-import \
+// RUN: -Werror=non-modular-include-in-framework-module
+
+// Rebuild
+// RUN: echo ' ' >> %t/SomeFramework.framework/Modules/module.modulemap
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t-cache -F %t \
+// RUN: -ivfsoverlay %t.yaml -fsyntax-only %s -verify -Wauto-import \
+// RUN: -Werror=non-modular-include-in-framework-module
+
+// Load from PCH
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t-cache -F %t \
+// RUN: -ivfsoverlay %t.yaml -emit-pch %s -o %t.pch \
+// RUN: -Werror=non-modular-include-in-framework-module \
+// RUN: -fmodules-ignore-macro=WITH_PREFIX
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t-cache -F %t \
+// RUN: -ivfsoverlay %t.yaml -include-pch %t.pch -fsyntax-only %s \
+// RUN: -Werror=non-modular-include-in-framework-module -DWITH_PREFIX \
+// RUN: -fmodules-ignore-macro=WITH_PREFIX
+
+// While indexing
+// RUN: c-index-test -index-file %s -fmodules -fmodules-cache-path=%t-cache -F %t \
+// RUN: -ivfsoverlay %t.yaml -fsyntax-only -Wauto-import \
+// RUN: -Werror=non-modular-include-in-framework-module | FileCheck %s
+// RUN: echo ' ' >> %t/SomeFramework.framework/Modules/module.modulemap
+// RUN: c-index-test -index-file %s -fmodules -fmodules-cache-path=%t-cache -F %t \
+// RUN: -ivfsoverlay %t.yaml -fsyntax-only -Wauto-import \
+// RUN: -Werror=non-modular-include-in-framework-module | FileCheck %s
+// CHECK: warning: treating
+// CHECK-NOT: error
+
+// With a VFS-mapped module map file
+// RUN: mv %t/SomeFramework.framework/Modules/module.modulemap %t/hide_module.map
+// RUN: echo "{ 'version': 0, 'roots': [ { " > %t2.yaml
+// RUN: echo "'name': '%t/SomeFramework.framework/Modules/module.modulemap'," >> %t2.yaml
+// RUN: echo "'type': 'file', 'external-contents': '%t/hide_module.map' } ] }" >> %t2.yaml
+
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t-cache -F %t \
+// RUN: -ivfsoverlay %t.yaml -ivfsoverlay %t2.yaml -fsyntax-only %s -verify \
+// RUN: -Wauto-import -Werror=non-modular-include-in-framework-module
+// RUN: echo ' ' >> %t/hide_module.map
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t-cache -F %t \
+// RUN: -ivfsoverlay %t.yaml -ivfsoverlay %t2.yaml -fsyntax-only %s -verify \
+// RUN: -Wauto-import -Werror=non-modular-include-in-framework-module
+
+// Within a module build
+// RUN: echo '@import import_some_frame;' | \
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t-cache -F %t \
+// RUN: -ivfsoverlay %t.yaml -ivfsoverlay %t2.yaml -fsyntax-only - \
+// RUN: -Werror=non-modular-include-in-framework-module -x objective-c -I %t
+// RUN: echo ' ' >> %t/hide_module.map
+// RUN: echo '@import import_some_frame;' | \
+// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t-cache -F %t \
+// RUN: -ivfsoverlay %t.yaml -ivfsoverlay %t2.yaml -fsyntax-only - \
+// RUN: -Werror=non-modular-include-in-framework-module -x objective-c -I %t
+
+#ifndef WITH_PREFIX
+#import <SomeFramework/public_header.h> // expected-warning{{treating}}
+#import <SomeFramework/public_header2.h> // expected-warning{{treating}}
+@import SomeFramework.public_header2;
+#endif
diff --git a/test/VFS/relative-path.c b/test/VFS/relative-path.c
new file mode 100644
index 000000000000..e7101fb3a826
--- /dev/null
+++ b/test/VFS/relative-path.c
@@ -0,0 +1,11 @@
+// RUN: mkdir -p %t
+// RUN: cd %t
+// RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%t:g" %S/Inputs/vfsoverlay.yaml > %t.yaml
+// RUN: %clang_cc1 -Werror -I . -ivfsoverlay %t.yaml -fsyntax-only %s
+// REQUIRES: shell
+
+#include "not_real.h"
+
+void foo() {
+ bar();
+}
diff --git a/test/VFS/umbrella-mismatch.m b/test/VFS/umbrella-mismatch.m
new file mode 100644
index 000000000000..c73129448c55
--- /dev/null
+++ b/test/VFS/umbrella-mismatch.m
@@ -0,0 +1,8 @@
+// RUN: rm -rf %t
+// RUN: sed -e "s:INPUT_DIR:%S/Inputs:g" -e "s:OUT_DIR:%S/Inputs:g" %S/Inputs/vfsoverlay.yaml > %t.yaml
+// REQUIRES: shell
+
+// RUN: %clang_cc1 -Werror -fmodules -fmodules-cache-path=%t -ivfsoverlay %t.yaml -F %S/Inputs -fsyntax-only %s -verify
+// RUN: %clang_cc1 -Werror -fmodules -fmodules-cache-path=%t -F %S/Inputs -fsyntax-only %s -verify
+// expected-no-diagnostics
+@import Foo;
diff --git a/test/lit.cfg b/test/lit.cfg
index 19daa61a64ff..b5c5628a5806 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -44,7 +44,7 @@ else:
config.test_format = lit.formats.ShTest(execute_external)
# suffixes: A list of file extensions to treat as test files.
-config.suffixes = ['.c', '.cpp', '.m', '.mm', '.cu', '.ll', '.cl', '.s']
+config.suffixes = ['.c', '.cpp', '.m', '.mm', '.cu', '.ll', '.cl', '.s', '.S']
# excludes: A list of directories to exclude from the testsuite. The 'Inputs'
# subdirectories contain auxiliary inputs for various tests in their parent
@@ -94,10 +94,14 @@ for name in possibly_dangerous_env_vars:
# Tweak the PATH to include the tools dir and the scripts dir.
if clang_obj_root is not None:
+ clang_tools_dir = getattr(config, 'clang_tools_dir', None)
+ if not clang_tools_dir:
+ lit_config.fatal('No Clang tools dir set!')
llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)
if not llvm_tools_dir:
lit_config.fatal('No LLVM tools dir set!')
- path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH']))
+ path = os.path.pathsep.join((
+ clang_tools_dir, llvm_tools_dir, config.environment['PATH']))
config.environment['PATH'] = path
llvm_libs_dir = getattr(config, 'llvm_libs_dir', None)
if not llvm_libs_dir:
@@ -111,6 +115,11 @@ for symbolizer in ['ASAN_SYMBOLIZER_PATH', 'MSAN_SYMBOLIZER_PATH']:
if symbolizer in os.environ:
config.environment[symbolizer] = os.environ[symbolizer]
+# Propagate options for sanitizers.
+for options in ['ASAN_OPTIONS']:
+ if options in os.environ:
+ config.environment[options] = os.environ[options]
+
###
# Check that the object root is known.
@@ -191,6 +200,22 @@ config.clang = inferClang(config.environment['PATH']).replace('\\', '/')
if not lit_config.quiet:
lit_config.note('using clang: %r' % config.clang)
+# Plugins (loadable modules)
+# TODO: This should be supplied by Makefile or autoconf.
+if sys.platform in ['win32', 'cygwin']:
+ has_plugins = (config.enable_shared == 1)
+else:
+ has_plugins = True
+
+if has_plugins and config.llvm_plugin_ext:
+ config.available_features.add('plugins')
+
+config.substitutions.append( ('%llvmshlibdir', config.llvm_shlib_dir) )
+config.substitutions.append( ('%pluginext', config.llvm_plugin_ext) )
+
+if config.clang_examples:
+ config.available_features.add('examples')
+
# Note that when substituting %clang_cc1 also fill in the include directory of
# the builtin headers. Those are part of even a freestanding environment, but
# Clang relies on the driver to locate them.
@@ -208,6 +233,31 @@ def getClangBuiltinIncludeDir(clang):
# Ensure the result is an ascii string, across Python2.5+ - Python3.
return str(dir.decode('ascii'))
+def makeItaniumABITriple(triple):
+ m = re.match(r'(\w+)-(\w+)-(\w+)', triple)
+ if not m:
+ lit_config.fatal("Could not turn '%s' into Itanium ABI triple" % triple)
+ if m.group(3).lower() != 'win32':
+ # All non-win32 triples use the Itanium ABI.
+ return triple
+ return m.group(1) + '-' + m.group(2) + '-mingw32'
+
+def makeMSABITriple(triple):
+ m = re.match(r'(\w+)-(\w+)-(\w+)', triple)
+ if not m:
+ lit_config.fatal("Could not turn '%s' into MS ABI triple" % triple)
+ isa = m.group(1).lower()
+ vendor = m.group(2).lower()
+ os = m.group(3).lower()
+ if os == 'win32':
+ # If the OS is win32, we're done.
+ return triple
+ if isa.startswith('x86') or isa == 'amd64' or re.match(r'i\d86', isa):
+ # For x86 ISAs, adjust the OS.
+ return isa + '-' + vendor + '-win32'
+ # -win32 is not supported for non-x86 targets; use a default.
+ return 'i686-pc-win32'
+
config.substitutions.append( ('%clang_cc1', '%s -cc1 -internal-isystem %s'
% (config.clang,
getClangBuiltinIncludeDir(config.clang))) )
@@ -219,6 +269,8 @@ config.substitutions.append( ('%clangxx', ' ' + config.clang +
' --driver-mode=g++ '))
config.substitutions.append( ('%clang', ' ' + config.clang + ' ') )
config.substitutions.append( ('%test_debuginfo', ' ' + config.llvm_src_root + '/utils/test_debuginfo.pl ') )
+config.substitutions.append( ('%itanium_abi_triple', makeItaniumABITriple(config.target_triple)) )
+config.substitutions.append( ('%ms_abi_triple', makeMSABITriple(config.target_triple)) )
# FIXME: Find nicer way to prohibit this.
config.substitutions.append(
@@ -241,10 +293,51 @@ config.substitutions.append(
(' %clang-cl ',
"""*** invalid substitution, use '%clang_cl'. ***""") )
+# For each occurrence of a clang tool name as its own word, replace it
+# with the full path to the build directory holding that tool. This
+# ensures that we are testing the tools just built and not some random
+# tools that might happen to be in the user's PATH.
+tool_dirs = os.path.pathsep.join((clang_tools_dir, llvm_tools_dir))
+
+# Regex assertions to reject neighbor hyphens/dots (seen in some tests).
+# For example, don't match 'clang-check-' or '.clang-format'.
+NoPreHyphenDot = r"(?<!(-|\.))"
+NoPostHyphenDot = r"(?!(-|\.))"
+
+for pattern in [r"\bFileCheck\b",
+ r"\bc-index-test\b",
+ NoPreHyphenDot + r"\bclang-check\b" + NoPostHyphenDot,
+ NoPreHyphenDot + r"\bclang-format\b" + NoPostHyphenDot,
+ NoPreHyphenDot + r"\bclang-interpreter\b" + NoPostHyphenDot,
+ # FIXME: Some clang test uses opt?
+ NoPreHyphenDot + r"\bopt\b" + NoPostHyphenDot,
+ # Handle these specially as they are strings searched
+ # for during testing.
+ r"\| \bcount\b",
+ r"\| \bnot\b"]:
+ # Extract the tool name from the pattern. This relies on the tool
+ # name being surrounded by \b word match operators. If the
+ # pattern starts with "| ", include it in the string to be
+ # substituted.
+ tool_match = re.match(r"^(\\)?((\| )?)\W+b([0-9A-Za-z-_]+)\\b\W*$",
+ pattern)
+ tool_pipe = tool_match.group(2)
+ tool_name = tool_match.group(4)
+ tool_path = lit.util.which(tool_name, tool_dirs)
+ if not tool_path:
+ # Warn, but still provide a substitution.
+ lit_config.note('Did not find ' + tool_name + ' in ' + tool_dirs)
+ tool_path = clang_tools_dir + '/' + tool_name
+ config.substitutions.append((pattern, tool_pipe + tool_path))
+
###
# Set available features we allow tests to conditionalize on.
#
+# Enabled/disabled features
+if config.clang_staticanalyzer != 0:
+ config.available_features.add("staticanalyzer")
+
# As of 2011.08, crash-recovery tests still do not pass on FreeBSD.
if platform.system() not in ['FreeBSD']:
config.available_features.add('crash-recovery')
@@ -257,12 +350,27 @@ if execute_external:
if not platform.system() in ['Windows'] or not execute_external:
config.available_features.add('shell-preserves-root')
+# For tests that require Darwin to run.
+# This is used by debuginfo-tests/*block*.m and debuginfo-tests/foreach.m.
+if platform.system() in ['Darwin']:
+ config.available_features.add('system-darwin')
+elif platform.system() in ['Windows']:
+ # For tests that require Windows to run.
+ config.available_features.add('system-windows')
+
# ANSI escape sequences in non-dumb terminal
if platform.system() not in ['Windows']:
config.available_features.add('ansi-escape-sequences')
-# Native compilation: host arch == target arch
-if config.host_arch in config.target_triple:
+# Capability to print utf8 to the terminal.
+# Windows expects codepage, unless Wide API.
+if platform.system() not in ['Windows']:
+ config.available_features.add('utf8-capable-terminal')
+
+# Native compilation: Check if triples match.
+# FIXME: Consider cases that target can be executed
+# even if host_triple were different from target_triple.
+if config.host_triple == config.target_triple:
config.available_features.add("native")
# Case-insensitive file system
@@ -284,6 +392,14 @@ if is_filesystem_case_insensitive():
if os.path.exists("/dev/fd/0") and sys.platform not in ['cygwin']:
config.available_features.add('dev-fd-fs')
+# DW2 Target
+if not re.match(r'.*-win32$', config.target_triple):
+ config.available_features.add('dw2')
+
+# Not set on native MS environment.
+if not re.match(r'.*-win32$', config.target_triple):
+ config.available_features.add('non-ms-sdk')
+
# [PR8833] LLP64-incompatible tests
if not re.match(r'^x86_64.*-(win32|mingw32)$', config.target_triple):
config.available_features.add('LP64')
@@ -292,40 +408,36 @@ if not re.match(r'^x86_64.*-(win32|mingw32)$', config.target_triple):
if not re.match(r'.*-(cygwin|mingw32)$', config.target_triple):
config.available_features.add('clang-driver')
-# Registered Targets
-def get_llc_props(tool):
- set_of_targets = set()
- enable_assertions = False
-
- cmd = subprocess.Popen([tool, '-version'], stdout=subprocess.PIPE)
-
- # Parse the stdout to get the list of registered targets.
- parse_targets = False
- for line in cmd.stdout:
- line = line.decode('ascii')
- if parse_targets:
- m = re.match( r'(.*) - ', line)
- if m is not None:
- set_of_targets.add(m.group(1).strip() + '-registered-target')
- else:
- break
- elif "Registered Targets:" in line:
- parse_targets = True
-
- if re.search(r'with assertions', line):
- enable_assertions = True
-
- return {"set_of_targets": set_of_targets,
- "enable_assertions": enable_assertions}
-
-llc_props = get_llc_props(os.path.join(llvm_tools_dir, 'llc'))
-if len(llc_props['set_of_targets']) > 0:
- config.available_features.update(llc_props['set_of_targets'])
-else:
- lit_config.fatal('No Targets Registered with the LLVM Tools!')
-
-if llc_props['enable_assertions']:
- config.available_features.add('asserts')
+# [PR18856] Depends to remove opened file. On win32, a file could be removed
+# only if all handles were closed.
+if platform.system() not in ['Windows']:
+ config.available_features.add('can-remove-opened-file')
+
+# Returns set of available features, registered-target(s) and asserts.
+def get_llvm_config_props():
+ set_of_features = set()
+
+ cmd = subprocess.Popen(
+ [
+ os.path.join(llvm_tools_dir, 'llvm-config'),
+ '--assertion-mode',
+ '--targets-built',
+ ],
+ stdout=subprocess.PIPE
+ )
+ # 1st line corresponds to --assertion-mode, "ON" or "OFF".
+ line = cmd.stdout.readline().strip().decode('ascii')
+ if line == "ON":
+ set_of_features.add('asserts')
+
+ # 2nd line corresponds to --targets-built, like;
+ # AArch64 ARM CppBackend X86
+ for arch in cmd.stdout.readline().decode('ascii').split():
+ set_of_features.add(arch.lower() + '-registered-target')
+
+ return set_of_features
+
+config.available_features.update(get_llvm_config_props())
if lit.util.which('xmllint'):
config.available_features.add('xmllint')
@@ -333,6 +445,8 @@ if lit.util.which('xmllint'):
# Sanitizers.
if config.llvm_use_sanitizer == "Address":
config.available_features.add("asan")
+else:
+ config.available_features.add("not_asan")
if (config.llvm_use_sanitizer == "Memory" or
config.llvm_use_sanitizer == "MemoryWithOrigins"):
config.available_features.add("msan")
@@ -361,18 +475,4 @@ gmalloc_path_str = lit_config.params.get('gmalloc_path',
if use_gmalloc:
config.environment.update({'DYLD_INSERT_LIBRARIES' : gmalloc_path_str})
-# On Darwin, support relocatable SDKs by providing Clang with a
-# default system root path.
-if 'darwin' in config.target_triple:
- try:
- cmd = subprocess.Popen(['xcrun', '--show-sdk-path'],
- stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- out, err = cmd.communicate()
- out = out.strip()
- res = cmd.wait()
- except OSError:
- res = -1
- if res == 0 and out:
- sdk_path = out
- lit_config.note('using SDKROOT: %r' % sdk_path)
- config.environment['SDKROOT'] = sdk_path
+lit.util.usePlatformSdkOnDarwin(config, lit_config)
diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in
index 9a4fa33cdc1c..1f0b9600d67d 100644
--- a/test/lit.site.cfg.in
+++ b/test/lit.site.cfg.in
@@ -6,19 +6,26 @@ config.llvm_src_root = "@LLVM_SOURCE_DIR@"
config.llvm_obj_root = "@LLVM_BINARY_DIR@"
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
+config.llvm_shlib_dir = "@SHLIBDIR@"
+config.llvm_plugin_ext = "@LLVM_PLUGIN_EXT@"
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.clang_obj_root = "@CLANG_BINARY_DIR@"
+config.clang_tools_dir = "@CLANG_TOOLS_DIR@"
+config.host_triple = "@LLVM_HOST_TRIPLE@"
config.target_triple = "@TARGET_TRIPLE@"
config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
config.clang_arcmt = @ENABLE_CLANG_ARCMT@
config.clang_staticanalyzer = @ENABLE_CLANG_STATIC_ANALYZER@
-config.clang_rewriter = @ENABLE_CLANG_REWRITER@
+config.clang_examples = @ENABLE_CLANG_EXAMPLES@
+config.enable_shared = @ENABLE_SHARED@
config.host_arch = "@HOST_ARCH@"
# Support substitution of the tools and libs dirs with user parameters. This is
# used when we can't determine the tool dir at configuration time.
try:
+ config.clang_tools_dir = config.clang_tools_dir % lit_config.params
config.llvm_tools_dir = config.llvm_tools_dir % lit_config.params
+ config.llvm_shlib_dir = config.llvm_shlib_dir % lit_config.params
config.llvm_libs_dir = config.llvm_libs_dir % lit_config.params
except KeyError:
e = sys.exc_info()[1]