From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/SemaCXX/2008-01-11-BadWarning.cpp | 5 + .../SemaCXX/Inputs/array-bounds-system-header.h | 11 + clang/test/SemaCXX/Inputs/lit.local.cfg | 1 + clang/test/SemaCXX/Inputs/malloc.h | 3 + clang/test/SemaCXX/Inputs/warn-new-overaligned-3.h | 19 + .../test/SemaCXX/MicrosoftCompatibility-cxx98.cpp | 8 + clang/test/SemaCXX/MicrosoftCompatibility.cpp | 176 ++ clang/test/SemaCXX/MicrosoftExtensions.cpp | 205 ++ clang/test/SemaCXX/PR10177.cpp | 40 + clang/test/SemaCXX/PR10243.cpp | 23 + clang/test/SemaCXX/PR10447.cpp | 22 + clang/test/SemaCXX/PR10458.cpp | 7 + clang/test/SemaCXX/PR11358.cpp | 51 + clang/test/SemaCXX/PR12481.cpp | 17 + .../test/SemaCXX/PR5086-ambig-resolution-enum.cpp | 13 + clang/test/SemaCXX/PR6562.cpp | 10 + clang/test/SemaCXX/PR6618.cpp | 13 + clang/test/SemaCXX/PR7410.cpp | 13 + clang/test/SemaCXX/PR7944.cpp | 12 + clang/test/SemaCXX/PR8012.cpp | 3 + clang/test/SemaCXX/PR8385.cpp | 7 + clang/test/SemaCXX/PR8755.cpp | 16 + clang/test/SemaCXX/PR8884.cpp | 12 + clang/test/SemaCXX/PR9459.cpp | 7 + clang/test/SemaCXX/PR9460.cpp | 19 + clang/test/SemaCXX/PR9461.cpp | 32 + clang/test/SemaCXX/PR9572.cpp | 15 + clang/test/SemaCXX/PR9884.cpp | 17 + clang/test/SemaCXX/PR9902.cpp | 28 + clang/test/SemaCXX/PR9908.cpp | 32 + clang/test/SemaCXX/__null.cpp | 21 + clang/test/SemaCXX/__try.cpp | 58 + clang/test/SemaCXX/abstract.cpp | 261 +++ clang/test/SemaCXX/access-base-class.cpp | 91 + clang/test/SemaCXX/access-control-check.cpp | 15 + clang/test/SemaCXX/access-member-pointer.cpp | 11 + clang/test/SemaCXX/access.cpp | 34 + .../addr-of-overloaded-function-casting.cpp | 57 + clang/test/SemaCXX/addr-of-overloaded-function.cpp | 210 ++ clang/test/SemaCXX/address-of-temporary.cpp | 12 + clang/test/SemaCXX/address-of.cpp | 46 + clang/test/SemaCXX/address-space-conversion.cpp | 197 ++ clang/test/SemaCXX/address-space-newdelete.cpp | 24 + clang/test/SemaCXX/address-space-references.cpp | 19 + clang/test/SemaCXX/aggregate-initialization.cpp | 84 + clang/test/SemaCXX/alias-template.cpp | 147 ++ clang/test/SemaCXX/alignof-sizeof-reference.cpp | 22 + clang/test/SemaCXX/altivec.cpp | 78 + .../SemaCXX/ambig-user-defined-conversions.cpp | 67 + .../SemaCXX/ambiguous-builtin-unary-operator.cpp | 34 + clang/test/SemaCXX/anonymous-struct.cpp | 16 + clang/test/SemaCXX/anonymous-union.cpp | 199 ++ clang/test/SemaCXX/array-bound-merge.cpp | 9 + clang/test/SemaCXX/array-bounds-ptr-arith.cpp | 33 + clang/test/SemaCXX/array-bounds-system-header.cpp | 9 + clang/test/SemaCXX/array-bounds.cpp | 255 +++ clang/test/SemaCXX/arrow-operator.cpp | 38 + clang/test/SemaCXX/atomic-type.cxx | 35 + clang/test/SemaCXX/attr-after-definition.cpp | 9 + clang/test/SemaCXX/attr-cxx0x.cpp | 32 + clang/test/SemaCXX/attr-declspec-ignored.cpp | 19 + clang/test/SemaCXX/attr-deprecated.cpp | 235 ++ clang/test/SemaCXX/attr-format.cpp | 35 + clang/test/SemaCXX/attr-nonnull.cpp | 33 + clang/test/SemaCXX/attr-noreturn.cpp | 56 + clang/test/SemaCXX/attr-regparm.cpp | 15 + clang/test/SemaCXX/attr-sentinel.cpp | 23 + clang/test/SemaCXX/attr-unavailable.cpp | 39 + clang/test/SemaCXX/attr-weak.cpp | 29 + clang/test/SemaCXX/attr-weakref.cpp | 31 + clang/test/SemaCXX/auto-cxx0x.cpp | 5 + clang/test/SemaCXX/auto-cxx98.cpp | 8 + clang/test/SemaCXX/auto-subst-failure.cpp | 15 + clang/test/SemaCXX/bitfield-layout.cpp | 30 + clang/test/SemaCXX/block-call.cpp | 52 + clang/test/SemaCXX/blocks-1.cpp | 58 + clang/test/SemaCXX/blocks.cpp | 70 + clang/test/SemaCXX/bool.cpp | 33 + clang/test/SemaCXX/borland-extensions.cpp | 53 + clang/test/SemaCXX/builtin-exception-spec.cpp | 6 + clang/test/SemaCXX/builtin-ptrtomember-ambig.cpp | 27 + .../SemaCXX/builtin-ptrtomember-overload-1.cpp | 46 + .../test/SemaCXX/builtin-ptrtomember-overload.cpp | 30 + clang/test/SemaCXX/builtin_objc_msgSend.cpp | 14 + clang/test/SemaCXX/builtins.cpp | 9 + clang/test/SemaCXX/c99-variable-length-array.cpp | 141 ++ clang/test/SemaCXX/c99.cpp | 9 + clang/test/SemaCXX/cast-conversion.cpp | 47 + clang/test/SemaCXX/cast-explicit-ctor.cpp | 6 + clang/test/SemaCXX/class-base-member-init.cpp | 92 + clang/test/SemaCXX/class-layout.cpp | 104 + clang/test/SemaCXX/class-names.cpp | 52 + clang/test/SemaCXX/class.cpp | 197 ++ clang/test/SemaCXX/comma.cpp | 8 + clang/test/SemaCXX/compare.cpp | 225 ++ clang/test/SemaCXX/complex-init-list.cpp | 14 + clang/test/SemaCXX/complex-overload.cpp | 50 + clang/test/SemaCXX/composite-pointer-type.cpp | 60 + clang/test/SemaCXX/compound-literal.cpp | 14 + clang/test/SemaCXX/condition.cpp | 60 + clang/test/SemaCXX/conditional-expr.cpp | 330 +++ clang/test/SemaCXX/const-cast.cpp | 64 + clang/test/SemaCXX/constant-expression-cxx11.cpp | 1250 +++++++++++ clang/test/SemaCXX/constant-expression.cpp | 119 ++ clang/test/SemaCXX/constexpr-ackermann.cpp | 8 + clang/test/SemaCXX/constexpr-backtrace-limit.cpp | 34 + clang/test/SemaCXX/constexpr-depth.cpp | 8 + clang/test/SemaCXX/constexpr-factorial.cpp | 9 + clang/test/SemaCXX/constexpr-nqueens.cpp | 73 + clang/test/SemaCXX/constexpr-printing.cpp | 102 + clang/test/SemaCXX/constexpr-strlen.cpp | 15 + clang/test/SemaCXX/constexpr-turing.cpp | 55 + clang/test/SemaCXX/constexpr-value-init.cpp | 37 + clang/test/SemaCXX/constructor-initializer.cpp | 282 +++ clang/test/SemaCXX/constructor-recovery.cpp | 9 + clang/test/SemaCXX/constructor.cpp | 87 + clang/test/SemaCXX/conversion-delete-expr.cpp | 109 + clang/test/SemaCXX/conversion-function.cpp | 394 ++++ clang/test/SemaCXX/conversion.cpp | 83 + clang/test/SemaCXX/convert-to-bool.cpp | 67 + clang/test/SemaCXX/converting-constructor.cpp | 47 + clang/test/SemaCXX/copy-assignment.cpp | 110 + clang/test/SemaCXX/copy-constructor-error.cpp | 25 + clang/test/SemaCXX/copy-initialization.cpp | 67 + clang/test/SemaCXX/crashes.cpp | 106 + clang/test/SemaCXX/cstyle-cast.cpp | 231 ++ clang/test/SemaCXX/cv-unqual-rvalues.cpp | 24 + clang/test/SemaCXX/cxx-member-pointer-op.cpp | 21 + clang/test/SemaCXX/cxx0x-class.cpp | 39 + clang/test/SemaCXX/cxx0x-compat.cpp | 39 + clang/test/SemaCXX/cxx0x-constexpr-const.cpp | 10 + .../test/SemaCXX/cxx0x-cursory-default-delete.cpp | 75 + clang/test/SemaCXX/cxx0x-defaulted-functions.cpp | 53 + clang/test/SemaCXX/cxx0x-delegating-ctors.cpp | 48 + clang/test/SemaCXX/cxx0x-deleted-default-ctor.cpp | 131 ++ .../test/SemaCXX/cxx0x-initializer-aggregates.cpp | 89 + .../test/SemaCXX/cxx0x-initializer-constructor.cpp | 283 +++ .../test/SemaCXX/cxx0x-initializer-references.cpp | 92 + clang/test/SemaCXX/cxx0x-initializer-scalars.cpp | 116 + .../cxx0x-initializer-stdinitializerlist.cpp | 177 ++ clang/test/SemaCXX/cxx0x-nontrivial-union.cpp | 124 ++ clang/test/SemaCXX/cxx0x-return-init-list.cpp | 16 + .../test/SemaCXX/cxx0x-type-convert-construct.cpp | 21 + clang/test/SemaCXX/cxx11-ast-print.cpp | 41 + clang/test/SemaCXX/cxx11-user-defined-literals.cpp | 137 ++ clang/test/SemaCXX/cxx98-compat-flags.cpp | 35 + clang/test/SemaCXX/cxx98-compat-pedantic.cpp | 34 + clang/test/SemaCXX/cxx98-compat.cpp | 305 +++ clang/test/SemaCXX/dcl_ambig_res.cpp | 76 + clang/test/SemaCXX/dcl_init_aggr.cpp | 123 ++ clang/test/SemaCXX/decl-expr-ambiguity.cpp | 72 + clang/test/SemaCXX/decl-init-ref.cpp | 29 + clang/test/SemaCXX/decltype-98.cpp | 3 + clang/test/SemaCXX/decltype-crash.cpp | 7 + .../test/SemaCXX/decltype-overloaded-functions.cpp | 15 + clang/test/SemaCXX/decltype-pr4444.cpp | 6 + clang/test/SemaCXX/decltype-pr4448.cpp | 8 + clang/test/SemaCXX/decltype-this.cpp | 16 + clang/test/SemaCXX/decltype.cpp | 30 + clang/test/SemaCXX/default-arg-special-member.cpp | 12 + .../test/SemaCXX/default-argument-temporaries.cpp | 11 + clang/test/SemaCXX/default-assignment-operator.cpp | 118 + .../SemaCXX/default-constructor-initializers.cpp | 68 + clang/test/SemaCXX/default1.cpp | 52 + clang/test/SemaCXX/default2.cpp | 124 ++ clang/test/SemaCXX/defaulted-ctor-loop.cpp | 14 + clang/test/SemaCXX/defaulted-private-dtor.cpp | 56 + clang/test/SemaCXX/delete.cpp | 9 + clang/test/SemaCXX/deleted-function.cpp | 57 + clang/test/SemaCXX/deleted-operator.cpp | 18 + clang/test/SemaCXX/dependent-auto.cpp | 59 + .../SemaCXX/dependent-noexcept-unevaluated.cpp | 40 + clang/test/SemaCXX/dependent-types.cpp | 13 + clang/test/SemaCXX/derived-to-base-ambig.cpp | 33 + clang/test/SemaCXX/destructor.cpp | 365 ++++ clang/test/SemaCXX/direct-initializer.cpp | 50 + clang/test/SemaCXX/discrim-union.cpp | 118 + clang/test/SemaCXX/do-while-scope.cpp | 8 + clang/test/SemaCXX/dr1301.cpp | 67 + clang/test/SemaCXX/dynamic-cast.cpp | 74 + clang/test/SemaCXX/elaborated-type-specifier.cpp | 48 + clang/test/SemaCXX/empty-class-layout.cpp | 157 ++ clang/test/SemaCXX/enum-bitfield.cpp | 18 + clang/test/SemaCXX/enum-scoped.cpp | 247 +++ clang/test/SemaCXX/enum-unscoped-nonexistent.cpp | 39 + clang/test/SemaCXX/enum.cpp | 97 + .../test/SemaCXX/exception-spec-no-exceptions.cpp | 33 + clang/test/SemaCXX/exceptions.cpp | 122 ++ clang/test/SemaCXX/explicit.cpp | 175 ++ clang/test/SemaCXX/expression-traits.cpp | 620 ++++++ clang/test/SemaCXX/expressions.cpp | 120 ++ clang/test/SemaCXX/flexible-array-test.cpp | 69 + clang/test/SemaCXX/fntype-decl.cpp | 20 + clang/test/SemaCXX/for-range-examples.cpp | 182 ++ clang/test/SemaCXX/for-range-no-std.cpp | 43 + clang/test/SemaCXX/for-range-unused.cpp | 21 + clang/test/SemaCXX/format-strings-0x.cpp | 15 + clang/test/SemaCXX/format-strings.cpp | 77 + clang/test/SemaCXX/friend-class-nodecl.cpp | 10 + clang/test/SemaCXX/friend-out-of-line.cpp | 12 + clang/test/SemaCXX/friend.cpp | 140 ++ clang/test/SemaCXX/function-extern-c.cpp | 38 + .../test/SemaCXX/function-overload-typo-crash.cpp | 28 + clang/test/SemaCXX/function-overloaded-redecl.cpp | 10 + clang/test/SemaCXX/function-redecl.cpp | 100 + clang/test/SemaCXX/function-type-qual.cpp | 28 + clang/test/SemaCXX/functional-cast.cpp | 320 +++ clang/test/SemaCXX/generic-selection.cpp | 46 + clang/test/SemaCXX/gnu-case-ranges.cpp | 24 + clang/test/SemaCXX/goto.cpp | 127 ++ clang/test/SemaCXX/goto2.cpp | 47 + clang/test/SemaCXX/i-c-e-cxx.cpp | 68 + .../test/SemaCXX/illegal-member-initialization.cpp | 31 + clang/test/SemaCXX/implicit-exception-spec.cpp | 89 + clang/test/SemaCXX/implicit-int.cpp | 5 + clang/test/SemaCXX/implicit-member-functions.cpp | 52 + .../SemaCXX/implicit-virtual-member-functions.cpp | 29 + clang/test/SemaCXX/incomplete-call.cpp | 49 + clang/test/SemaCXX/increment-decrement.cpp | 14 + clang/test/SemaCXX/indirect-goto.cpp | 7 + clang/test/SemaCXX/inherit.cpp | 32 + clang/test/SemaCXX/init-priority-attr.cpp | 36 + clang/test/SemaCXX/inline.cpp | 5 + clang/test/SemaCXX/instantiate-blocks.cpp | 32 + .../SemaCXX/invalid-instantiated-field-decl.cpp | 35 + clang/test/SemaCXX/invalid-member-expr.cpp | 39 + clang/test/SemaCXX/invalid-template-specifier.cpp | 12 + clang/test/SemaCXX/issue547.cpp | 66 + clang/test/SemaCXX/lambda-expressions.cpp | 150 ++ clang/test/SemaCXX/libstdcxx_is_pod_hack.cpp | 33 + clang/test/SemaCXX/libstdcxx_map_base_hack.cpp | 25 + clang/test/SemaCXX/linkage-spec.cpp | 104 + clang/test/SemaCXX/linkage.cpp | 96 + clang/test/SemaCXX/literal-operators.cpp | 43 + clang/test/SemaCXX/literal-type.cpp | 77 + clang/test/SemaCXX/local-classes.cpp | 41 + clang/test/SemaCXX/lookup-member.cpp | 13 + clang/test/SemaCXX/member-class-11.cpp | 8 + clang/test/SemaCXX/member-expr-anonymous-union.cpp | 9 + clang/test/SemaCXX/member-expr-static.cpp | 19 + clang/test/SemaCXX/member-expr.cpp | 159 ++ clang/test/SemaCXX/member-init.cpp | 75 + clang/test/SemaCXX/member-location.cpp | 8 + clang/test/SemaCXX/member-name-lookup.cpp | 158 ++ clang/test/SemaCXX/member-operator-expr.cpp | 29 + clang/test/SemaCXX/member-pointer-ms.cpp | 14 + clang/test/SemaCXX/member-pointer-size.cpp | 15 + clang/test/SemaCXX/member-pointer.cpp | 314 +++ clang/test/SemaCXX/member-pointers-2.cpp | 51 + clang/test/SemaCXX/microsoft-cxx0x.cpp | 8 + clang/test/SemaCXX/missing-header.cpp | 9 + clang/test/SemaCXX/missing-members.cpp | 36 + ...issing-namespace-qualifier-typo-corrections.cpp | 121 ++ clang/test/SemaCXX/ms-exception-spec.cpp | 3 + clang/test/SemaCXX/namespace-alias.cpp | 127 ++ clang/test/SemaCXX/namespace.cpp | 92 + clang/test/SemaCXX/neon-vector-types.cpp | 27 + clang/test/SemaCXX/nested-name-spec-locations.cpp | 162 ++ clang/test/SemaCXX/nested-name-spec.cpp | 288 +++ clang/test/SemaCXX/new-array-size-conv.cpp | 27 + clang/test/SemaCXX/new-delete-0x.cpp | 32 + clang/test/SemaCXX/new-delete-cxx0x.cpp | 26 + .../test/SemaCXX/new-delete-predefined-decl-2.cpp | 13 + clang/test/SemaCXX/new-delete-predefined-decl.cpp | 19 + clang/test/SemaCXX/new-delete.cpp | 501 +++++ clang/test/SemaCXX/no-exceptions.cpp | 35 + clang/test/SemaCXX/no-implicit-builtin-decls.cpp | 7 + clang/test/SemaCXX/non-empty-class-size-zero.cpp | 18 + clang/test/SemaCXX/null_in_arithmetic_ops.cpp | 93 + clang/test/SemaCXX/nullptr-98.cpp | 3 + clang/test/SemaCXX/nullptr.cpp | 185 ++ clang/test/SemaCXX/nullptr_in_arithmetic_ops.cpp | 73 + clang/test/SemaCXX/offsetof.cpp | 75 + clang/test/SemaCXX/operator-arrow-temporary.cpp | 19 + clang/test/SemaCXX/out-of-line-def-mismatch.cpp | 24 + clang/test/SemaCXX/overload-0x.cpp | 11 + clang/test/SemaCXX/overload-call-copycon.cpp | 51 + clang/test/SemaCXX/overload-call.cpp | 570 +++++ clang/test/SemaCXX/overload-decl.cpp | 31 + clang/test/SemaCXX/overload-member-call.cpp | 98 + clang/test/SemaCXX/overload-value-dep-arg.cpp | 13 + .../SemaCXX/overloaded-builtin-operators-0x.cpp | 11 + .../test/SemaCXX/overloaded-builtin-operators.cpp | 239 +++ clang/test/SemaCXX/overloaded-name.cpp | 30 + clang/test/SemaCXX/overloaded-operator-decl.cpp | 50 + clang/test/SemaCXX/overloaded-operator.cpp | 417 ++++ clang/test/SemaCXX/pascal-strings.cpp | 6 + clang/test/SemaCXX/pragma-pack.cpp | 34 + clang/test/SemaCXX/pragma-unused.cpp | 8 + clang/test/SemaCXX/pragma-visibility.cpp | 23 + clang/test/SemaCXX/prefetch-enum.cpp | 9 + clang/test/SemaCXX/primary-base.cpp | 11 + clang/test/SemaCXX/pseudo-destructors.cpp | 82 + .../SemaCXX/ptrtomember-overload-resolution.cpp | 44 + clang/test/SemaCXX/ptrtomember.cpp | 33 + clang/test/SemaCXX/qual-id-test.cpp | 149 ++ clang/test/SemaCXX/qualification-conversion.cpp | 34 + clang/test/SemaCXX/qualified-id-lookup.cpp | 153 ++ clang/test/SemaCXX/qualified-member-enum.cpp | 10 + clang/test/SemaCXX/qualified-names-diag.cpp | 33 + clang/test/SemaCXX/qualified-names-print.cpp | 15 + clang/test/SemaCXX/redeclared-alias-template.cpp | 23 + clang/test/SemaCXX/redeclared-auto.cpp | 26 + clang/test/SemaCXX/ref-init-ambiguous.cpp | 28 + clang/test/SemaCXX/references.cpp | 139 ++ clang/test/SemaCXX/reinterpret-cast.cpp | 292 +++ clang/test/SemaCXX/reinterpret-fn-obj-pedantic.cpp | 9 + clang/test/SemaCXX/return-noreturn.cpp | 140 ++ clang/test/SemaCXX/return-stack-addr.cpp | 141 ++ clang/test/SemaCXX/return.cpp | 82 + clang/test/SemaCXX/runtimediag-ppe.cpp | 18 + clang/test/SemaCXX/rval-references-examples.cpp | 112 + clang/test/SemaCXX/rval-references.cpp | 94 + clang/test/SemaCXX/scope-check.cpp | 209 ++ clang/test/SemaCXX/shift.cpp | 14 + clang/test/SemaCXX/short-enums.cpp | 17 + clang/test/SemaCXX/short-wchar-sign.cpp | 6 + clang/test/SemaCXX/sourceranges.cpp | 27 + clang/test/SemaCXX/statements.cpp | 22 + clang/test/SemaCXX/static-array-member.cpp | 18 + clang/test/SemaCXX/static-assert.cpp | 36 + clang/test/SemaCXX/static-cast-complete-type.cpp | 13 + clang/test/SemaCXX/static-cast.cpp | 197 ++ clang/test/SemaCXX/static-initializers.cpp | 10 + clang/test/SemaCXX/storage-class.cpp | 7 + clang/test/SemaCXX/string-plus-int.cpp | 66 + clang/test/SemaCXX/struct-class-redecl.cpp | 164 ++ clang/test/SemaCXX/switch-0x.cpp | 11 + clang/test/SemaCXX/switch.cpp | 87 + clang/test/SemaCXX/tag-ambig.cpp | 28 + clang/test/SemaCXX/templated-friend-decl.cpp | 15 + clang/test/SemaCXX/this.cpp | 6 + clang/test/SemaCXX/trailing-return-0x.cpp | 71 + clang/test/SemaCXX/trivial-constructor.cpp | 38 + clang/test/SemaCXX/trivial-destructor.cpp | 38 + clang/test/SemaCXX/type-convert-construct.cpp | 17 + .../test/SemaCXX/type-definition-in-specifier.cpp | 25 + clang/test/SemaCXX/type-dependent-exprs.cpp | 35 + clang/test/SemaCXX/type-formatting.cpp | 10 + clang/test/SemaCXX/type-traits-incomplete.cpp | 8 + clang/test/SemaCXX/type-traits.cpp | 1818 ++++++++++++++++ clang/test/SemaCXX/typedef-redecl.cpp | 95 + clang/test/SemaCXX/typeid-ref.cpp | 12 + clang/test/SemaCXX/typeid.cpp | 23 + clang/test/SemaCXX/types_compatible_p.cpp | 5 + clang/test/SemaCXX/typo-correction.cpp | 192 ++ clang/test/SemaCXX/unary-real-imag.cpp | 6 + clang/test/SemaCXX/undefined-internal.cpp | 183 ++ clang/test/SemaCXX/underlying_type.cpp | 43 + .../test/SemaCXX/uninit-variables-conditional.cpp | 23 + clang/test/SemaCXX/uninit-variables.cpp | 143 ++ clang/test/SemaCXX/uninitialized.cpp | 169 ++ clang/test/SemaCXX/unknown-anytype-blocks.cpp | 11 + clang/test/SemaCXX/unknown-anytype.cpp | 47 + clang/test/SemaCXX/unknown-type-name.cpp | 29 + clang/test/SemaCXX/unreachable-catch-clauses.cpp | 14 + clang/test/SemaCXX/unreachable-code.cpp | 58 + clang/test/SemaCXX/unused-functions.cpp | 10 + clang/test/SemaCXX/unused-with-error.cpp | 8 + clang/test/SemaCXX/unused.cpp | 24 + clang/test/SemaCXX/user-defined-conversions.cpp | 99 + clang/test/SemaCXX/using-decl-1.cpp | 120 ++ clang/test/SemaCXX/using-decl-pr4441.cpp | 8 + clang/test/SemaCXX/using-decl-pr4450.cpp | 15 + clang/test/SemaCXX/using-decl-templates.cpp | 82 + clang/test/SemaCXX/using-directive.cpp | 135 ++ clang/test/SemaCXX/value-dependent-exprs.cpp | 47 + clang/test/SemaCXX/value-initialization.cpp | 10 + clang/test/SemaCXX/vararg-default-arg.cpp | 10 + clang/test/SemaCXX/vararg-non-pod.cpp | 125 ++ clang/test/SemaCXX/vector-casts.cpp | 40 + clang/test/SemaCXX/vector-no-lax.cpp | 9 + clang/test/SemaCXX/vector.cpp | 269 +++ clang/test/SemaCXX/virtual-base-used.cpp | 42 + .../virtual-member-functions-key-function.cpp | 29 + clang/test/SemaCXX/virtual-override.cpp | 290 +++ clang/test/SemaCXX/virtuals.cpp | 47 + clang/test/SemaCXX/vla.cpp | 5 + clang/test/SemaCXX/vtable-instantiation.cc | 68 + clang/test/SemaCXX/warn-assignment-condition.cpp | 146 ++ clang/test/SemaCXX/warn-bad-memaccess.cpp | 117 + clang/test/SemaCXX/warn-bool-conversion.cpp | 24 + clang/test/SemaCXX/warn-cast-align.cpp | 45 + clang/test/SemaCXX/warn-char-subscripts.cpp | 21 + clang/test/SemaCXX/warn-dangling-field.cpp | 37 + clang/test/SemaCXX/warn-deprecated-header.cpp | 6 + clang/test/SemaCXX/warn-empty-body.cpp | 271 +++ clang/test/SemaCXX/warn-enum-compare.cpp | 212 ++ clang/test/SemaCXX/warn-everthing.cpp | 13 + clang/test/SemaCXX/warn-exit-time-destructors.cpp | 27 + clang/test/SemaCXX/warn-func-as-bool.cpp | 40 + clang/test/SemaCXX/warn-global-constructors.cpp | 97 + clang/test/SemaCXX/warn-large-by-value-copy.cpp | 47 + clang/test/SemaCXX/warn-literal-conversion.cpp | 40 + clang/test/SemaCXX/warn-memset-bad-sizeof.cpp | 145 ++ clang/test/SemaCXX/warn-missing-noreturn.cpp | 125 ++ clang/test/SemaCXX/warn-missing-prototypes.cpp | 32 + clang/test/SemaCXX/warn-new-overaligned-2.cpp | 22 + clang/test/SemaCXX/warn-new-overaligned-3.cpp | 33 + clang/test/SemaCXX/warn-new-overaligned.cpp | 73 + clang/test/SemaCXX/warn-overloaded-virtual.cpp | 66 + .../warn-pure-virtual-call-from-ctor-dtor.cpp | 14 + .../SemaCXX/warn-reorder-ctor-initialization.cpp | 132 ++ clang/test/SemaCXX/warn-self-assign.cpp | 47 + clang/test/SemaCXX/warn-self-comparisons.cpp | 5 + clang/test/SemaCXX/warn-shadow.cpp | 83 + clang/test/SemaCXX/warn-sign-conversion.cpp | 80 + clang/test/SemaCXX/warn-string-conversion.cpp | 18 + clang/test/SemaCXX/warn-thread-safety-analysis.cpp | 2243 ++++++++++++++++++++ clang/test/SemaCXX/warn-thread-safety-parsing.cpp | 1345 ++++++++++++ clang/test/SemaCXX/warn-unreachable.cpp | 109 + clang/test/SemaCXX/warn-unused-comparison.cpp | 94 + clang/test/SemaCXX/warn-unused-filescoped.cpp | 89 + clang/test/SemaCXX/warn-unused-parameters.cpp | 34 + clang/test/SemaCXX/warn-unused-result.cpp | 44 + clang/test/SemaCXX/warn-unused-value.cpp | 51 + clang/test/SemaCXX/warn-unused-variables.cpp | 124 ++ .../SemaCXX/warn-using-namespace-in-header.cpp | 54 + .../test/SemaCXX/warn-using-namespace-in-header.h | 50 + clang/test/SemaCXX/warn-weak-vtables.cpp | 78 + clang/test/SemaCXX/wchar_t.cpp | 32 + clang/test/SemaCXX/writable-strings-deprecated.cpp | 14 + clang/test/SemaCXX/zero-length-arrays.cpp | 26 + 423 files changed, 34722 insertions(+) create mode 100644 clang/test/SemaCXX/2008-01-11-BadWarning.cpp create mode 100644 clang/test/SemaCXX/Inputs/array-bounds-system-header.h create mode 100644 clang/test/SemaCXX/Inputs/lit.local.cfg create mode 100644 clang/test/SemaCXX/Inputs/malloc.h create mode 100644 clang/test/SemaCXX/Inputs/warn-new-overaligned-3.h create mode 100644 clang/test/SemaCXX/MicrosoftCompatibility-cxx98.cpp create mode 100644 clang/test/SemaCXX/MicrosoftCompatibility.cpp create mode 100644 clang/test/SemaCXX/MicrosoftExtensions.cpp create mode 100644 clang/test/SemaCXX/PR10177.cpp create mode 100644 clang/test/SemaCXX/PR10243.cpp create mode 100644 clang/test/SemaCXX/PR10447.cpp create mode 100644 clang/test/SemaCXX/PR10458.cpp create mode 100644 clang/test/SemaCXX/PR11358.cpp create mode 100644 clang/test/SemaCXX/PR12481.cpp create mode 100644 clang/test/SemaCXX/PR5086-ambig-resolution-enum.cpp create mode 100644 clang/test/SemaCXX/PR6562.cpp create mode 100644 clang/test/SemaCXX/PR6618.cpp create mode 100644 clang/test/SemaCXX/PR7410.cpp create mode 100644 clang/test/SemaCXX/PR7944.cpp create mode 100644 clang/test/SemaCXX/PR8012.cpp create mode 100644 clang/test/SemaCXX/PR8385.cpp create mode 100644 clang/test/SemaCXX/PR8755.cpp create mode 100644 clang/test/SemaCXX/PR8884.cpp create mode 100644 clang/test/SemaCXX/PR9459.cpp create mode 100644 clang/test/SemaCXX/PR9460.cpp create mode 100644 clang/test/SemaCXX/PR9461.cpp create mode 100644 clang/test/SemaCXX/PR9572.cpp create mode 100644 clang/test/SemaCXX/PR9884.cpp create mode 100644 clang/test/SemaCXX/PR9902.cpp create mode 100644 clang/test/SemaCXX/PR9908.cpp create mode 100644 clang/test/SemaCXX/__null.cpp create mode 100644 clang/test/SemaCXX/__try.cpp create mode 100644 clang/test/SemaCXX/abstract.cpp create mode 100644 clang/test/SemaCXX/access-base-class.cpp create mode 100644 clang/test/SemaCXX/access-control-check.cpp create mode 100644 clang/test/SemaCXX/access-member-pointer.cpp create mode 100644 clang/test/SemaCXX/access.cpp create mode 100644 clang/test/SemaCXX/addr-of-overloaded-function-casting.cpp create mode 100644 clang/test/SemaCXX/addr-of-overloaded-function.cpp create mode 100644 clang/test/SemaCXX/address-of-temporary.cpp create mode 100644 clang/test/SemaCXX/address-of.cpp create mode 100644 clang/test/SemaCXX/address-space-conversion.cpp create mode 100644 clang/test/SemaCXX/address-space-newdelete.cpp create mode 100644 clang/test/SemaCXX/address-space-references.cpp create mode 100644 clang/test/SemaCXX/aggregate-initialization.cpp create mode 100644 clang/test/SemaCXX/alias-template.cpp create mode 100644 clang/test/SemaCXX/alignof-sizeof-reference.cpp create mode 100644 clang/test/SemaCXX/altivec.cpp create mode 100644 clang/test/SemaCXX/ambig-user-defined-conversions.cpp create mode 100644 clang/test/SemaCXX/ambiguous-builtin-unary-operator.cpp create mode 100644 clang/test/SemaCXX/anonymous-struct.cpp create mode 100644 clang/test/SemaCXX/anonymous-union.cpp create mode 100644 clang/test/SemaCXX/array-bound-merge.cpp create mode 100644 clang/test/SemaCXX/array-bounds-ptr-arith.cpp create mode 100644 clang/test/SemaCXX/array-bounds-system-header.cpp create mode 100644 clang/test/SemaCXX/array-bounds.cpp create mode 100644 clang/test/SemaCXX/arrow-operator.cpp create mode 100644 clang/test/SemaCXX/atomic-type.cxx create mode 100644 clang/test/SemaCXX/attr-after-definition.cpp create mode 100644 clang/test/SemaCXX/attr-cxx0x.cpp create mode 100644 clang/test/SemaCXX/attr-declspec-ignored.cpp create mode 100644 clang/test/SemaCXX/attr-deprecated.cpp create mode 100644 clang/test/SemaCXX/attr-format.cpp create mode 100644 clang/test/SemaCXX/attr-nonnull.cpp create mode 100644 clang/test/SemaCXX/attr-noreturn.cpp create mode 100644 clang/test/SemaCXX/attr-regparm.cpp create mode 100644 clang/test/SemaCXX/attr-sentinel.cpp create mode 100644 clang/test/SemaCXX/attr-unavailable.cpp create mode 100644 clang/test/SemaCXX/attr-weak.cpp create mode 100644 clang/test/SemaCXX/attr-weakref.cpp create mode 100644 clang/test/SemaCXX/auto-cxx0x.cpp create mode 100644 clang/test/SemaCXX/auto-cxx98.cpp create mode 100644 clang/test/SemaCXX/auto-subst-failure.cpp create mode 100644 clang/test/SemaCXX/bitfield-layout.cpp create mode 100644 clang/test/SemaCXX/block-call.cpp create mode 100644 clang/test/SemaCXX/blocks-1.cpp create mode 100644 clang/test/SemaCXX/blocks.cpp create mode 100644 clang/test/SemaCXX/bool.cpp create mode 100644 clang/test/SemaCXX/borland-extensions.cpp create mode 100644 clang/test/SemaCXX/builtin-exception-spec.cpp create mode 100644 clang/test/SemaCXX/builtin-ptrtomember-ambig.cpp create mode 100644 clang/test/SemaCXX/builtin-ptrtomember-overload-1.cpp create mode 100644 clang/test/SemaCXX/builtin-ptrtomember-overload.cpp create mode 100644 clang/test/SemaCXX/builtin_objc_msgSend.cpp create mode 100644 clang/test/SemaCXX/builtins.cpp create mode 100644 clang/test/SemaCXX/c99-variable-length-array.cpp create mode 100644 clang/test/SemaCXX/c99.cpp create mode 100644 clang/test/SemaCXX/cast-conversion.cpp create mode 100644 clang/test/SemaCXX/cast-explicit-ctor.cpp create mode 100644 clang/test/SemaCXX/class-base-member-init.cpp create mode 100644 clang/test/SemaCXX/class-layout.cpp create mode 100644 clang/test/SemaCXX/class-names.cpp create mode 100644 clang/test/SemaCXX/class.cpp create mode 100644 clang/test/SemaCXX/comma.cpp create mode 100644 clang/test/SemaCXX/compare.cpp create mode 100644 clang/test/SemaCXX/complex-init-list.cpp create mode 100644 clang/test/SemaCXX/complex-overload.cpp create mode 100644 clang/test/SemaCXX/composite-pointer-type.cpp create mode 100644 clang/test/SemaCXX/compound-literal.cpp create mode 100644 clang/test/SemaCXX/condition.cpp create mode 100644 clang/test/SemaCXX/conditional-expr.cpp create mode 100644 clang/test/SemaCXX/const-cast.cpp create mode 100644 clang/test/SemaCXX/constant-expression-cxx11.cpp create mode 100644 clang/test/SemaCXX/constant-expression.cpp create mode 100644 clang/test/SemaCXX/constexpr-ackermann.cpp create mode 100644 clang/test/SemaCXX/constexpr-backtrace-limit.cpp create mode 100644 clang/test/SemaCXX/constexpr-depth.cpp create mode 100644 clang/test/SemaCXX/constexpr-factorial.cpp create mode 100644 clang/test/SemaCXX/constexpr-nqueens.cpp create mode 100644 clang/test/SemaCXX/constexpr-printing.cpp create mode 100644 clang/test/SemaCXX/constexpr-strlen.cpp create mode 100644 clang/test/SemaCXX/constexpr-turing.cpp create mode 100644 clang/test/SemaCXX/constexpr-value-init.cpp create mode 100644 clang/test/SemaCXX/constructor-initializer.cpp create mode 100644 clang/test/SemaCXX/constructor-recovery.cpp create mode 100644 clang/test/SemaCXX/constructor.cpp create mode 100644 clang/test/SemaCXX/conversion-delete-expr.cpp create mode 100644 clang/test/SemaCXX/conversion-function.cpp create mode 100644 clang/test/SemaCXX/conversion.cpp create mode 100644 clang/test/SemaCXX/convert-to-bool.cpp create mode 100644 clang/test/SemaCXX/converting-constructor.cpp create mode 100644 clang/test/SemaCXX/copy-assignment.cpp create mode 100644 clang/test/SemaCXX/copy-constructor-error.cpp create mode 100644 clang/test/SemaCXX/copy-initialization.cpp create mode 100644 clang/test/SemaCXX/crashes.cpp create mode 100644 clang/test/SemaCXX/cstyle-cast.cpp create mode 100644 clang/test/SemaCXX/cv-unqual-rvalues.cpp create mode 100644 clang/test/SemaCXX/cxx-member-pointer-op.cpp create mode 100644 clang/test/SemaCXX/cxx0x-class.cpp create mode 100644 clang/test/SemaCXX/cxx0x-compat.cpp create mode 100644 clang/test/SemaCXX/cxx0x-constexpr-const.cpp create mode 100644 clang/test/SemaCXX/cxx0x-cursory-default-delete.cpp create mode 100644 clang/test/SemaCXX/cxx0x-defaulted-functions.cpp create mode 100644 clang/test/SemaCXX/cxx0x-delegating-ctors.cpp create mode 100644 clang/test/SemaCXX/cxx0x-deleted-default-ctor.cpp create mode 100644 clang/test/SemaCXX/cxx0x-initializer-aggregates.cpp create mode 100644 clang/test/SemaCXX/cxx0x-initializer-constructor.cpp create mode 100644 clang/test/SemaCXX/cxx0x-initializer-references.cpp create mode 100644 clang/test/SemaCXX/cxx0x-initializer-scalars.cpp create mode 100644 clang/test/SemaCXX/cxx0x-initializer-stdinitializerlist.cpp create mode 100644 clang/test/SemaCXX/cxx0x-nontrivial-union.cpp create mode 100644 clang/test/SemaCXX/cxx0x-return-init-list.cpp create mode 100644 clang/test/SemaCXX/cxx0x-type-convert-construct.cpp create mode 100644 clang/test/SemaCXX/cxx11-ast-print.cpp create mode 100644 clang/test/SemaCXX/cxx11-user-defined-literals.cpp create mode 100644 clang/test/SemaCXX/cxx98-compat-flags.cpp create mode 100644 clang/test/SemaCXX/cxx98-compat-pedantic.cpp create mode 100644 clang/test/SemaCXX/cxx98-compat.cpp create mode 100644 clang/test/SemaCXX/dcl_ambig_res.cpp create mode 100644 clang/test/SemaCXX/dcl_init_aggr.cpp create mode 100644 clang/test/SemaCXX/decl-expr-ambiguity.cpp create mode 100644 clang/test/SemaCXX/decl-init-ref.cpp create mode 100644 clang/test/SemaCXX/decltype-98.cpp create mode 100644 clang/test/SemaCXX/decltype-crash.cpp create mode 100644 clang/test/SemaCXX/decltype-overloaded-functions.cpp create mode 100644 clang/test/SemaCXX/decltype-pr4444.cpp create mode 100644 clang/test/SemaCXX/decltype-pr4448.cpp create mode 100644 clang/test/SemaCXX/decltype-this.cpp create mode 100644 clang/test/SemaCXX/decltype.cpp create mode 100644 clang/test/SemaCXX/default-arg-special-member.cpp create mode 100644 clang/test/SemaCXX/default-argument-temporaries.cpp create mode 100644 clang/test/SemaCXX/default-assignment-operator.cpp create mode 100644 clang/test/SemaCXX/default-constructor-initializers.cpp create mode 100644 clang/test/SemaCXX/default1.cpp create mode 100644 clang/test/SemaCXX/default2.cpp create mode 100644 clang/test/SemaCXX/defaulted-ctor-loop.cpp create mode 100644 clang/test/SemaCXX/defaulted-private-dtor.cpp create mode 100644 clang/test/SemaCXX/delete.cpp create mode 100644 clang/test/SemaCXX/deleted-function.cpp create mode 100644 clang/test/SemaCXX/deleted-operator.cpp create mode 100644 clang/test/SemaCXX/dependent-auto.cpp create mode 100644 clang/test/SemaCXX/dependent-noexcept-unevaluated.cpp create mode 100644 clang/test/SemaCXX/dependent-types.cpp create mode 100644 clang/test/SemaCXX/derived-to-base-ambig.cpp create mode 100644 clang/test/SemaCXX/destructor.cpp create mode 100644 clang/test/SemaCXX/direct-initializer.cpp create mode 100644 clang/test/SemaCXX/discrim-union.cpp create mode 100644 clang/test/SemaCXX/do-while-scope.cpp create mode 100644 clang/test/SemaCXX/dr1301.cpp create mode 100644 clang/test/SemaCXX/dynamic-cast.cpp create mode 100644 clang/test/SemaCXX/elaborated-type-specifier.cpp create mode 100644 clang/test/SemaCXX/empty-class-layout.cpp create mode 100644 clang/test/SemaCXX/enum-bitfield.cpp create mode 100644 clang/test/SemaCXX/enum-scoped.cpp create mode 100644 clang/test/SemaCXX/enum-unscoped-nonexistent.cpp create mode 100644 clang/test/SemaCXX/enum.cpp create mode 100644 clang/test/SemaCXX/exception-spec-no-exceptions.cpp create mode 100644 clang/test/SemaCXX/exceptions.cpp create mode 100644 clang/test/SemaCXX/explicit.cpp create mode 100644 clang/test/SemaCXX/expression-traits.cpp create mode 100644 clang/test/SemaCXX/expressions.cpp create mode 100644 clang/test/SemaCXX/flexible-array-test.cpp create mode 100644 clang/test/SemaCXX/fntype-decl.cpp create mode 100644 clang/test/SemaCXX/for-range-examples.cpp create mode 100644 clang/test/SemaCXX/for-range-no-std.cpp create mode 100644 clang/test/SemaCXX/for-range-unused.cpp create mode 100644 clang/test/SemaCXX/format-strings-0x.cpp create mode 100644 clang/test/SemaCXX/format-strings.cpp create mode 100644 clang/test/SemaCXX/friend-class-nodecl.cpp create mode 100644 clang/test/SemaCXX/friend-out-of-line.cpp create mode 100644 clang/test/SemaCXX/friend.cpp create mode 100644 clang/test/SemaCXX/function-extern-c.cpp create mode 100644 clang/test/SemaCXX/function-overload-typo-crash.cpp create mode 100644 clang/test/SemaCXX/function-overloaded-redecl.cpp create mode 100644 clang/test/SemaCXX/function-redecl.cpp create mode 100644 clang/test/SemaCXX/function-type-qual.cpp create mode 100644 clang/test/SemaCXX/functional-cast.cpp create mode 100644 clang/test/SemaCXX/generic-selection.cpp create mode 100644 clang/test/SemaCXX/gnu-case-ranges.cpp create mode 100644 clang/test/SemaCXX/goto.cpp create mode 100644 clang/test/SemaCXX/goto2.cpp create mode 100644 clang/test/SemaCXX/i-c-e-cxx.cpp create mode 100644 clang/test/SemaCXX/illegal-member-initialization.cpp create mode 100644 clang/test/SemaCXX/implicit-exception-spec.cpp create mode 100644 clang/test/SemaCXX/implicit-int.cpp create mode 100644 clang/test/SemaCXX/implicit-member-functions.cpp create mode 100644 clang/test/SemaCXX/implicit-virtual-member-functions.cpp create mode 100644 clang/test/SemaCXX/incomplete-call.cpp create mode 100644 clang/test/SemaCXX/increment-decrement.cpp create mode 100644 clang/test/SemaCXX/indirect-goto.cpp create mode 100644 clang/test/SemaCXX/inherit.cpp create mode 100644 clang/test/SemaCXX/init-priority-attr.cpp create mode 100644 clang/test/SemaCXX/inline.cpp create mode 100644 clang/test/SemaCXX/instantiate-blocks.cpp create mode 100644 clang/test/SemaCXX/invalid-instantiated-field-decl.cpp create mode 100644 clang/test/SemaCXX/invalid-member-expr.cpp create mode 100644 clang/test/SemaCXX/invalid-template-specifier.cpp create mode 100644 clang/test/SemaCXX/issue547.cpp create mode 100644 clang/test/SemaCXX/lambda-expressions.cpp create mode 100644 clang/test/SemaCXX/libstdcxx_is_pod_hack.cpp create mode 100644 clang/test/SemaCXX/libstdcxx_map_base_hack.cpp create mode 100644 clang/test/SemaCXX/linkage-spec.cpp create mode 100644 clang/test/SemaCXX/linkage.cpp create mode 100644 clang/test/SemaCXX/literal-operators.cpp create mode 100644 clang/test/SemaCXX/literal-type.cpp create mode 100644 clang/test/SemaCXX/local-classes.cpp create mode 100644 clang/test/SemaCXX/lookup-member.cpp create mode 100644 clang/test/SemaCXX/member-class-11.cpp create mode 100644 clang/test/SemaCXX/member-expr-anonymous-union.cpp create mode 100644 clang/test/SemaCXX/member-expr-static.cpp create mode 100644 clang/test/SemaCXX/member-expr.cpp create mode 100644 clang/test/SemaCXX/member-init.cpp create mode 100644 clang/test/SemaCXX/member-location.cpp create mode 100644 clang/test/SemaCXX/member-name-lookup.cpp create mode 100644 clang/test/SemaCXX/member-operator-expr.cpp create mode 100644 clang/test/SemaCXX/member-pointer-ms.cpp create mode 100644 clang/test/SemaCXX/member-pointer-size.cpp create mode 100644 clang/test/SemaCXX/member-pointer.cpp create mode 100644 clang/test/SemaCXX/member-pointers-2.cpp create mode 100644 clang/test/SemaCXX/microsoft-cxx0x.cpp create mode 100644 clang/test/SemaCXX/missing-header.cpp create mode 100644 clang/test/SemaCXX/missing-members.cpp create mode 100644 clang/test/SemaCXX/missing-namespace-qualifier-typo-corrections.cpp create mode 100644 clang/test/SemaCXX/ms-exception-spec.cpp create mode 100644 clang/test/SemaCXX/namespace-alias.cpp create mode 100644 clang/test/SemaCXX/namespace.cpp create mode 100644 clang/test/SemaCXX/neon-vector-types.cpp create mode 100644 clang/test/SemaCXX/nested-name-spec-locations.cpp create mode 100644 clang/test/SemaCXX/nested-name-spec.cpp create mode 100644 clang/test/SemaCXX/new-array-size-conv.cpp create mode 100644 clang/test/SemaCXX/new-delete-0x.cpp create mode 100644 clang/test/SemaCXX/new-delete-cxx0x.cpp create mode 100644 clang/test/SemaCXX/new-delete-predefined-decl-2.cpp create mode 100644 clang/test/SemaCXX/new-delete-predefined-decl.cpp create mode 100644 clang/test/SemaCXX/new-delete.cpp create mode 100644 clang/test/SemaCXX/no-exceptions.cpp create mode 100644 clang/test/SemaCXX/no-implicit-builtin-decls.cpp create mode 100644 clang/test/SemaCXX/non-empty-class-size-zero.cpp create mode 100644 clang/test/SemaCXX/null_in_arithmetic_ops.cpp create mode 100644 clang/test/SemaCXX/nullptr-98.cpp create mode 100644 clang/test/SemaCXX/nullptr.cpp create mode 100644 clang/test/SemaCXX/nullptr_in_arithmetic_ops.cpp create mode 100644 clang/test/SemaCXX/offsetof.cpp create mode 100644 clang/test/SemaCXX/operator-arrow-temporary.cpp create mode 100644 clang/test/SemaCXX/out-of-line-def-mismatch.cpp create mode 100644 clang/test/SemaCXX/overload-0x.cpp create mode 100644 clang/test/SemaCXX/overload-call-copycon.cpp create mode 100644 clang/test/SemaCXX/overload-call.cpp create mode 100644 clang/test/SemaCXX/overload-decl.cpp create mode 100644 clang/test/SemaCXX/overload-member-call.cpp create mode 100644 clang/test/SemaCXX/overload-value-dep-arg.cpp create mode 100644 clang/test/SemaCXX/overloaded-builtin-operators-0x.cpp create mode 100644 clang/test/SemaCXX/overloaded-builtin-operators.cpp create mode 100644 clang/test/SemaCXX/overloaded-name.cpp create mode 100644 clang/test/SemaCXX/overloaded-operator-decl.cpp create mode 100644 clang/test/SemaCXX/overloaded-operator.cpp create mode 100644 clang/test/SemaCXX/pascal-strings.cpp create mode 100644 clang/test/SemaCXX/pragma-pack.cpp create mode 100644 clang/test/SemaCXX/pragma-unused.cpp create mode 100644 clang/test/SemaCXX/pragma-visibility.cpp create mode 100644 clang/test/SemaCXX/prefetch-enum.cpp create mode 100644 clang/test/SemaCXX/primary-base.cpp create mode 100644 clang/test/SemaCXX/pseudo-destructors.cpp create mode 100644 clang/test/SemaCXX/ptrtomember-overload-resolution.cpp create mode 100644 clang/test/SemaCXX/ptrtomember.cpp create mode 100644 clang/test/SemaCXX/qual-id-test.cpp create mode 100644 clang/test/SemaCXX/qualification-conversion.cpp create mode 100644 clang/test/SemaCXX/qualified-id-lookup.cpp create mode 100644 clang/test/SemaCXX/qualified-member-enum.cpp create mode 100644 clang/test/SemaCXX/qualified-names-diag.cpp create mode 100644 clang/test/SemaCXX/qualified-names-print.cpp create mode 100644 clang/test/SemaCXX/redeclared-alias-template.cpp create mode 100644 clang/test/SemaCXX/redeclared-auto.cpp create mode 100644 clang/test/SemaCXX/ref-init-ambiguous.cpp create mode 100644 clang/test/SemaCXX/references.cpp create mode 100644 clang/test/SemaCXX/reinterpret-cast.cpp create mode 100644 clang/test/SemaCXX/reinterpret-fn-obj-pedantic.cpp create mode 100644 clang/test/SemaCXX/return-noreturn.cpp create mode 100644 clang/test/SemaCXX/return-stack-addr.cpp create mode 100644 clang/test/SemaCXX/return.cpp create mode 100644 clang/test/SemaCXX/runtimediag-ppe.cpp create mode 100644 clang/test/SemaCXX/rval-references-examples.cpp create mode 100644 clang/test/SemaCXX/rval-references.cpp create mode 100644 clang/test/SemaCXX/scope-check.cpp create mode 100644 clang/test/SemaCXX/shift.cpp create mode 100644 clang/test/SemaCXX/short-enums.cpp create mode 100644 clang/test/SemaCXX/short-wchar-sign.cpp create mode 100644 clang/test/SemaCXX/sourceranges.cpp create mode 100644 clang/test/SemaCXX/statements.cpp create mode 100644 clang/test/SemaCXX/static-array-member.cpp create mode 100644 clang/test/SemaCXX/static-assert.cpp create mode 100644 clang/test/SemaCXX/static-cast-complete-type.cpp create mode 100644 clang/test/SemaCXX/static-cast.cpp create mode 100644 clang/test/SemaCXX/static-initializers.cpp create mode 100644 clang/test/SemaCXX/storage-class.cpp create mode 100644 clang/test/SemaCXX/string-plus-int.cpp create mode 100644 clang/test/SemaCXX/struct-class-redecl.cpp create mode 100644 clang/test/SemaCXX/switch-0x.cpp create mode 100644 clang/test/SemaCXX/switch.cpp create mode 100644 clang/test/SemaCXX/tag-ambig.cpp create mode 100644 clang/test/SemaCXX/templated-friend-decl.cpp create mode 100644 clang/test/SemaCXX/this.cpp create mode 100644 clang/test/SemaCXX/trailing-return-0x.cpp create mode 100644 clang/test/SemaCXX/trivial-constructor.cpp create mode 100644 clang/test/SemaCXX/trivial-destructor.cpp create mode 100644 clang/test/SemaCXX/type-convert-construct.cpp create mode 100644 clang/test/SemaCXX/type-definition-in-specifier.cpp create mode 100644 clang/test/SemaCXX/type-dependent-exprs.cpp create mode 100644 clang/test/SemaCXX/type-formatting.cpp create mode 100644 clang/test/SemaCXX/type-traits-incomplete.cpp create mode 100644 clang/test/SemaCXX/type-traits.cpp create mode 100644 clang/test/SemaCXX/typedef-redecl.cpp create mode 100644 clang/test/SemaCXX/typeid-ref.cpp create mode 100644 clang/test/SemaCXX/typeid.cpp create mode 100644 clang/test/SemaCXX/types_compatible_p.cpp create mode 100644 clang/test/SemaCXX/typo-correction.cpp create mode 100644 clang/test/SemaCXX/unary-real-imag.cpp create mode 100644 clang/test/SemaCXX/undefined-internal.cpp create mode 100644 clang/test/SemaCXX/underlying_type.cpp create mode 100644 clang/test/SemaCXX/uninit-variables-conditional.cpp create mode 100644 clang/test/SemaCXX/uninit-variables.cpp create mode 100644 clang/test/SemaCXX/uninitialized.cpp create mode 100644 clang/test/SemaCXX/unknown-anytype-blocks.cpp create mode 100644 clang/test/SemaCXX/unknown-anytype.cpp create mode 100644 clang/test/SemaCXX/unknown-type-name.cpp create mode 100644 clang/test/SemaCXX/unreachable-catch-clauses.cpp create mode 100644 clang/test/SemaCXX/unreachable-code.cpp create mode 100644 clang/test/SemaCXX/unused-functions.cpp create mode 100644 clang/test/SemaCXX/unused-with-error.cpp create mode 100644 clang/test/SemaCXX/unused.cpp create mode 100644 clang/test/SemaCXX/user-defined-conversions.cpp create mode 100644 clang/test/SemaCXX/using-decl-1.cpp create mode 100644 clang/test/SemaCXX/using-decl-pr4441.cpp create mode 100644 clang/test/SemaCXX/using-decl-pr4450.cpp create mode 100644 clang/test/SemaCXX/using-decl-templates.cpp create mode 100644 clang/test/SemaCXX/using-directive.cpp create mode 100644 clang/test/SemaCXX/value-dependent-exprs.cpp create mode 100644 clang/test/SemaCXX/value-initialization.cpp create mode 100644 clang/test/SemaCXX/vararg-default-arg.cpp create mode 100644 clang/test/SemaCXX/vararg-non-pod.cpp create mode 100644 clang/test/SemaCXX/vector-casts.cpp create mode 100644 clang/test/SemaCXX/vector-no-lax.cpp create mode 100644 clang/test/SemaCXX/vector.cpp create mode 100644 clang/test/SemaCXX/virtual-base-used.cpp create mode 100644 clang/test/SemaCXX/virtual-member-functions-key-function.cpp create mode 100644 clang/test/SemaCXX/virtual-override.cpp create mode 100644 clang/test/SemaCXX/virtuals.cpp create mode 100644 clang/test/SemaCXX/vla.cpp create mode 100644 clang/test/SemaCXX/vtable-instantiation.cc create mode 100644 clang/test/SemaCXX/warn-assignment-condition.cpp create mode 100644 clang/test/SemaCXX/warn-bad-memaccess.cpp create mode 100644 clang/test/SemaCXX/warn-bool-conversion.cpp create mode 100644 clang/test/SemaCXX/warn-cast-align.cpp create mode 100644 clang/test/SemaCXX/warn-char-subscripts.cpp create mode 100644 clang/test/SemaCXX/warn-dangling-field.cpp create mode 100644 clang/test/SemaCXX/warn-deprecated-header.cpp create mode 100644 clang/test/SemaCXX/warn-empty-body.cpp create mode 100644 clang/test/SemaCXX/warn-enum-compare.cpp create mode 100644 clang/test/SemaCXX/warn-everthing.cpp create mode 100644 clang/test/SemaCXX/warn-exit-time-destructors.cpp create mode 100644 clang/test/SemaCXX/warn-func-as-bool.cpp create mode 100644 clang/test/SemaCXX/warn-global-constructors.cpp create mode 100644 clang/test/SemaCXX/warn-large-by-value-copy.cpp create mode 100644 clang/test/SemaCXX/warn-literal-conversion.cpp create mode 100644 clang/test/SemaCXX/warn-memset-bad-sizeof.cpp create mode 100644 clang/test/SemaCXX/warn-missing-noreturn.cpp create mode 100644 clang/test/SemaCXX/warn-missing-prototypes.cpp create mode 100644 clang/test/SemaCXX/warn-new-overaligned-2.cpp create mode 100644 clang/test/SemaCXX/warn-new-overaligned-3.cpp create mode 100644 clang/test/SemaCXX/warn-new-overaligned.cpp create mode 100644 clang/test/SemaCXX/warn-overloaded-virtual.cpp create mode 100644 clang/test/SemaCXX/warn-pure-virtual-call-from-ctor-dtor.cpp create mode 100644 clang/test/SemaCXX/warn-reorder-ctor-initialization.cpp create mode 100644 clang/test/SemaCXX/warn-self-assign.cpp create mode 100644 clang/test/SemaCXX/warn-self-comparisons.cpp create mode 100644 clang/test/SemaCXX/warn-shadow.cpp create mode 100644 clang/test/SemaCXX/warn-sign-conversion.cpp create mode 100644 clang/test/SemaCXX/warn-string-conversion.cpp create mode 100644 clang/test/SemaCXX/warn-thread-safety-analysis.cpp create mode 100644 clang/test/SemaCXX/warn-thread-safety-parsing.cpp create mode 100644 clang/test/SemaCXX/warn-unreachable.cpp create mode 100644 clang/test/SemaCXX/warn-unused-comparison.cpp create mode 100644 clang/test/SemaCXX/warn-unused-filescoped.cpp create mode 100644 clang/test/SemaCXX/warn-unused-parameters.cpp create mode 100644 clang/test/SemaCXX/warn-unused-result.cpp create mode 100644 clang/test/SemaCXX/warn-unused-value.cpp create mode 100644 clang/test/SemaCXX/warn-unused-variables.cpp create mode 100644 clang/test/SemaCXX/warn-using-namespace-in-header.cpp create mode 100644 clang/test/SemaCXX/warn-using-namespace-in-header.h create mode 100644 clang/test/SemaCXX/warn-weak-vtables.cpp create mode 100644 clang/test/SemaCXX/wchar_t.cpp create mode 100644 clang/test/SemaCXX/writable-strings-deprecated.cpp create mode 100644 clang/test/SemaCXX/zero-length-arrays.cpp (limited to 'clang/test/SemaCXX') diff --git a/clang/test/SemaCXX/2008-01-11-BadWarning.cpp b/clang/test/SemaCXX/2008-01-11-BadWarning.cpp new file mode 100644 index 0000000..b84e7c1 --- /dev/null +++ b/clang/test/SemaCXX/2008-01-11-BadWarning.cpp @@ -0,0 +1,5 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -Wall %s +// rdar://5683899 +void** f(void **Buckets, unsigned NumBuckets) { + return Buckets + NumBuckets; +} diff --git a/clang/test/SemaCXX/Inputs/array-bounds-system-header.h b/clang/test/SemaCXX/Inputs/array-bounds-system-header.h new file mode 100644 index 0000000..07cde80 --- /dev/null +++ b/clang/test/SemaCXX/Inputs/array-bounds-system-header.h @@ -0,0 +1,11 @@ +// "System header" for testing that -Warray-bounds is properly suppressed in +// certain cases. + +#define BAD_MACRO_1 \ + int i[3]; \ + i[3] = 5 +#define BAD_MACRO_2(_b, _i) \ + (_b)[(_i)] = 5 +#define QUESTIONABLE_MACRO(_a) \ + sizeof(_a) > 3 ? (_a)[3] = 5 : 5 +#define NOP(x) (x) diff --git a/clang/test/SemaCXX/Inputs/lit.local.cfg b/clang/test/SemaCXX/Inputs/lit.local.cfg new file mode 100644 index 0000000..e6f55ee --- /dev/null +++ b/clang/test/SemaCXX/Inputs/lit.local.cfg @@ -0,0 +1 @@ +config.suffixes = [] diff --git a/clang/test/SemaCXX/Inputs/malloc.h b/clang/test/SemaCXX/Inputs/malloc.h new file mode 100644 index 0000000..c54d621 --- /dev/null +++ b/clang/test/SemaCXX/Inputs/malloc.h @@ -0,0 +1,3 @@ +extern "C" { +extern void *malloc (__SIZE_TYPE__ __size) throw () __attribute__ ((__malloc__)) ; +} diff --git a/clang/test/SemaCXX/Inputs/warn-new-overaligned-3.h b/clang/test/SemaCXX/Inputs/warn-new-overaligned-3.h new file mode 100644 index 0000000..d2bd4d5 --- /dev/null +++ b/clang/test/SemaCXX/Inputs/warn-new-overaligned-3.h @@ -0,0 +1,19 @@ +#pragma GCC system_header + +// This header file pretends to be from the system library, for the +// purpose of the over-aligned warnings test. + +void* operator new(unsigned long) { + return 0; +} +void* operator new[](unsigned long) { + return 0; +} + +void* operator new(unsigned long, void *) { + return 0; +} + +void* operator new[](unsigned long, void *) { + return 0; +} diff --git a/clang/test/SemaCXX/MicrosoftCompatibility-cxx98.cpp b/clang/test/SemaCXX/MicrosoftCompatibility-cxx98.cpp new file mode 100644 index 0000000..0c7d354 --- /dev/null +++ b/clang/test/SemaCXX/MicrosoftCompatibility-cxx98.cpp @@ -0,0 +1,8 @@ +// RUN: %clang_cc1 %s -triple i686-pc-win32 -fsyntax-only -std=c++98 -Wmicrosoft -verify -fms-compatibility -fexceptions -fcxx-exceptions + + +//MSVC allows forward enum declaration +enum ENUM; // expected-warning {{forward references to 'enum' types are a Microsoft extension}} +ENUM *var = 0; +ENUM var2 = (ENUM)3; +enum ENUM1* var3 = 0;// expected-warning {{forward references to 'enum' types are a Microsoft extension}} diff --git a/clang/test/SemaCXX/MicrosoftCompatibility.cpp b/clang/test/SemaCXX/MicrosoftCompatibility.cpp new file mode 100644 index 0000000..3634fa3 --- /dev/null +++ b/clang/test/SemaCXX/MicrosoftCompatibility.cpp @@ -0,0 +1,176 @@ +// RUN: %clang_cc1 %s -triple i686-pc-win32 -fsyntax-only -std=c++11 -Wmicrosoft -verify -fms-compatibility -fexceptions -fcxx-exceptions + + + +namespace ms_conversion_rules { + +void f(float a); +void f(int a); + +void test() +{ + long a = 0; + f((long)0); + f(a); +} + +} + + + +namespace ms_protected_scope { + struct C { C(); }; + + int jump_over_variable_init(bool b) { + if (b) + goto foo; // expected-warning {{goto into protected scope}} + C c; // expected-note {{jump bypasses variable initialization}} + foo: + return 1; + } + +struct Y { + ~Y(); +}; + +void jump_over_var_with_dtor() { + goto end; // expected-warning{{goto into protected scope}} + Y y; // expected-note {{jump bypasses variable with a non-trivial destructor}} + end: + ; +} + + void jump_over_variable_case(int c) { + switch (c) { + case 0: + int x = 56; // expected-note {{jump bypasses variable initialization}} + case 1: // expected-error {{switch case is in protected scope}} + x = 10; + } + } + + +void exception_jump() { + goto l2; // expected-error {{goto into protected scope}} + try { // expected-note {{jump bypasses initialization of try block}} + l2: ; + } catch(int) { + } +} + +int jump_over_indirect_goto() { + static void *ps[] = { &&a0 }; + goto *&&a0; // expected-warning {{goto into protected scope}} + int a = 3; // expected-note {{jump bypasses variable initialization}} + a0: + return 0; +} + +} + +namespace PR11826 { + struct pair { + pair(int v) { } + void operator=(pair&& rhs) { } + }; + void f() { + pair p0(3); + pair p = p0; + } +} + +namespace PR11826_for_symmetry { + struct pair { + pair(int v) { } + pair(pair&& rhs) { } + }; + void f() { + pair p0(3); + pair p(4); + p = p0; + } +} + +namespace ms_using_declaration_bug { + +class A { +public: + int f(); +}; + +class B : public A { +private: + using A::f; +}; + +class C : public B { +private: + using B::f; // expected-warning {{using declaration referring to inaccessible member 'ms_using_declaration_bug::B::f' (which refers to accessible member 'ms_using_declaration_bug::A::f') is a Microsoft compatibility extension}} +}; + +} + + +namespace MissingTypename { + +template class A { +public: + typedef int TYPE; +}; + +template class B { +public: + typedef int TYPE; +}; + + +template +class C : private A, public B { +public: + typedef A Base1; + typedef B Base2; + typedef A Base3; + + A::TYPE a1; // expected-warning {{missing 'typename' prior to dependent type name}} + Base1::TYPE a2; // expected-warning {{missing 'typename' prior to dependent type name}} + + B::TYPE a3; // expected-warning {{missing 'typename' prior to dependent type name}} + Base2::TYPE a4; // expected-warning {{missing 'typename' prior to dependent type name}} + + A::TYPE a5; // expected-error {{missing 'typename' prior to dependent type name}} + Base3::TYPE a6; // expected-error {{missing 'typename' prior to dependent type name}} + }; + +class D { +public: + typedef int Type; +}; + +template +void function_missing_typename(const T::Type param)// expected-warning {{missing 'typename' prior to dependent type name}} +{ + const T::Type var = 2; // expected-warning {{missing 'typename' prior to dependent type name}} +} + +template void function_missing_typename(const D::Type param); + +} + +enum ENUM2 { + ENUM2_a = (enum ENUM2) 4, + ENUM2_b = 0x9FFFFFFF, // expected-warning {{enumerator value is not representable in the underlying type 'int'}} + ENUM2_c = 0x100000000 // expected-warning {{enumerator value is not representable in the underlying type 'int'}} +}; + + +namespace PR11791 { + template + void del(_Ty *_Ptr) { + _Ptr->~_Ty(); // expected-warning {{pseudo-destructors on type void are a Microsoft extension}} + } + + void f() { + int* a = 0; + del((void*)a); // expected-note {{in instantiation of function template specialization}} + } +} diff --git a/clang/test/SemaCXX/MicrosoftExtensions.cpp b/clang/test/SemaCXX/MicrosoftExtensions.cpp new file mode 100644 index 0000000..0b72cd3 --- /dev/null +++ b/clang/test/SemaCXX/MicrosoftExtensions.cpp @@ -0,0 +1,205 @@ +// RUN: %clang_cc1 %s -triple i686-pc-win32 -fsyntax-only -Wmicrosoft -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 { + +void foo(); // expected-note {{previous declaration}} +void foo() throw(); // expected-warning {{exception specification in declaration does not match previous declaration}} + +void r6() throw(...); // expected-note {{previous declaration}} +void r6() throw(int); // expected-warning {{exception specification in declaration does not match previous declaration}} + +struct Base { + virtual void f2(); + virtual void f3() throw(...); +}; + +struct Derived : Base { + virtual void f2() throw(...); + virtual void f3(); +}; + +class A { + virtual ~A() throw(); // expected-note {{overridden virtual function is here}} +}; + +class B : public A { + virtual ~B(); // expected-warning {{exception specification of overriding function is more lax than base version}} +}; + +} + +// MSVC allows type definition in anonymous union and struct +struct A +{ + union + { + int a; + struct B // expected-warning {{types declared in an anonymous union are a Microsoft extension}} + { + int c; + } d; + + union C // expected-warning {{types declared in an anonymous union are a Microsoft extension}} + { + int e; + int ee; + } f; + + typedef int D; // expected-warning {{types declared in an anonymous union are a Microsoft extension}} + struct F; // expected-warning {{types declared in an anonymous union are a Microsoft extension}} + }; + + struct + { + int a2; + + struct B2 // expected-warning {{types declared in an anonymous struct are a Microsoft extension}} + { + int c2; + } d2; + + union C2 // expected-warning {{types declared in an anonymous struct are a Microsoft extension}} + { + int e2; + int ee2; + } f2; + + typedef int D2; // expected-warning {{types declared in an anonymous struct are a Microsoft extension}} + struct F2; // expected-warning {{types declared in an anonymous struct are a Microsoft extension}} + }; +}; + +// __stdcall handling +struct M { + int __stdcall addP(); + float __stdcall subtractP(); +}; + +// __unaligned handling +typedef char __unaligned *aligned_type; + + +template void h1(T (__stdcall M::* const )()) { } + +void m1() { + h1(&M::addP); + h1(&M::subtractP); +} + + + + + +void f(long long); +void f(int); + +int main() +{ + // This is an ambiguous call in standard C++. + // This calls f(long long) in Microsoft mode because LL is always signed. + f(0xffffffffffffffffLL); + f(0xffffffffffffffffi64); +} + +// Enumeration types with a fixed underlying type. +const int seventeen = 17; +typedef int Int; + +struct X0 { + enum E1 : Int { SomeOtherValue } field; // expected-warning{{enumeration types with a fixed underlying type are a Microsoft extension}} + enum E1 : seventeen; +}; + +enum : long long { // expected-warning{{enumeration types with a fixed underlying type are a Microsoft extension}} + SomeValue = 0x100000000 +}; + + +class AAA { +__declspec(dllimport) void f(void) { } +void f2(void); +}; + +__declspec(dllimport) void AAA::f2(void) { // expected-error {{dllimport attribute can be applied only to symbol}} + +} + + + +template +class BB { +public: + void f(int g = 10 ); // expected-note {{previous definition is here}} +}; + +template +void BB::f(int g = 0) { } // expected-warning {{redefinition of default argument}} + + + +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}} +{ + +} + +long function_prototype(int a); +long (*function_ptr)(int a); + +void function_to_voidptr_conv() { + void *a1 = function_prototype; + void *a2 = &function_prototype; + void *a3 = function_ptr; +} + + +void pointer_to_integral_type_conv(char* ptr) { + char ch = (char)ptr; + short sh = (short)ptr; + ch = (char)ptr; + sh = (short)ptr; +} + + +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; + }; + + int array[__is_abstract(X)? 1 : -1]; +}; + +void f() { int __except = 0; } + diff --git a/clang/test/SemaCXX/PR10177.cpp b/clang/test/SemaCXX/PR10177.cpp new file mode 100644 index 0000000..8d745de --- /dev/null +++ b/clang/test/SemaCXX/PR10177.cpp @@ -0,0 +1,40 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s + +template using alias_ref = T; +template void func_ref() {} +template struct class_ref {}; + +template +struct U { + static int a; +}; + +template struct S; // expected-note 2{{here}} + +template +int U::a = S::kError; // expected-error 2{{undefined}} + +template +void f() { + // FIXME: The standard suggests that U<0>::a is odr-used by this expression, + // but it's not entirely clear that's the right behaviour. + (void)alias_ref::a>(); + (void)func_ref::a>(); // expected-note {{here}} + (void)class_ref::a>(); // expected-note {{here}} +}; + +int main() { + f(); // expected-note 2{{here}} +} + +namespace N { + template struct S { static int n; }; + template int S::n = 5; + void g(int*); + template int f() { + int k[S::n]; + g(k); + return k[3]; + } + int j = f(); +} diff --git a/clang/test/SemaCXX/PR10243.cpp b/clang/test/SemaCXX/PR10243.cpp new file mode 100644 index 0000000..129ff80 --- /dev/null +++ b/clang/test/SemaCXX/PR10243.cpp @@ -0,0 +1,23 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s + +struct S; // expected-note 4{{forward declaration of 'S'}} + +struct T0 { + S s; // expected-error{{field has incomplete type 'S'}} + T0() = default; +}; + +struct T1 { + S s; // expected-error{{field has incomplete type 'S'}} + T1(T1&) = default; +}; + +struct T2 { + S s; // expected-error{{field has incomplete type 'S'}} + T2& operator=(T2&) = default; +}; + +struct T3 { + S s; // expected-error{{field has incomplete type 'S'}} + ~T3() = default; +}; diff --git a/clang/test/SemaCXX/PR10447.cpp b/clang/test/SemaCXX/PR10447.cpp new file mode 100644 index 0000000..08644ad --- /dev/null +++ b/clang/test/SemaCXX/PR10447.cpp @@ -0,0 +1,22 @@ +// RUN: %clang_cc1 -verify %s + +// PR12223 +namespace test1 { + namespace N { + extern "C" void f(struct S*); + void g(S*); + } + namespace N { + void f(struct S *s) { + g(s); + } + } +} + +// PR10447 +namespace test2 { + extern "C" { + void f(struct Bar*) { } + test2::Bar *ptr; + } +} diff --git a/clang/test/SemaCXX/PR10458.cpp b/clang/test/SemaCXX/PR10458.cpp new file mode 100644 index 0000000..57588eb --- /dev/null +++ b/clang/test/SemaCXX/PR10458.cpp @@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++98 + +void f() { + int arr[] = { 1, 2, 3 }; + for (auto &i : arr) { // expected-warning {{'auto' type specifier is a C++11 extension}} expected-warning {{range-based for loop is a C++11 extension}} + } +} diff --git a/clang/test/SemaCXX/PR11358.cpp b/clang/test/SemaCXX/PR11358.cpp new file mode 100644 index 0000000..9c49227 --- /dev/null +++ b/clang/test/SemaCXX/PR11358.cpp @@ -0,0 +1,51 @@ +// RUN: %clang_cc1 %s -verify +// PR11358 + +namespace test1 { + template + struct container { + class iterator {}; + iterator begin() { return iterator(); } + }; + + template + struct Test { + typedef container Container; + void test() { + Container::iterator i = c.begin(); // expected-error{{missing 'typename'}} + } + Container c; + }; +} + +namespace test2 { + template + class hash_map { + class const_iterator { void operator++(); }; + const_iterator begin() const; + const_iterator end() const; + }; + + template + void MapTest(hash_map map) { + for (hash_map::const_iterator it = map.begin(); // expected-error{{missing 'typename'}} + it != map.end(); it++) { + } + } +} + +namespace test3 { + template + struct container { + class iterator {}; + }; + + template + struct Test { + typedef container Container; + void test() { + Container::iterator const i; // expected-error{{missing 'typename'}} + } + Container c; + }; +} diff --git a/clang/test/SemaCXX/PR12481.cpp b/clang/test/SemaCXX/PR12481.cpp new file mode 100644 index 0000000..9487e4d --- /dev/null +++ b/clang/test/SemaCXX/PR12481.cpp @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -x c++ -fsyntax-only %s + +class C1 { }; +class C2 { }; +template struct BinaryTrie { + ~BinaryTrie() { + (void)(({ + static int x = 5; + } + )); + } +}; +class FooTable { + BinaryTrie c1_trie_; + BinaryTrie c2_trie_; +}; +FooTable* foo = new FooTable; diff --git a/clang/test/SemaCXX/PR5086-ambig-resolution-enum.cpp b/clang/test/SemaCXX/PR5086-ambig-resolution-enum.cpp new file mode 100644 index 0000000..b5aac5f --- /dev/null +++ b/clang/test/SemaCXX/PR5086-ambig-resolution-enum.cpp @@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11 + +class C { +public: + enum E { e1=0 }; + const char * fun1(int , enum E) const; + int fun1(unsigned, const char *) const; +}; + +void foo(const C& rc) { + enum {BUFLEN = 128 }; + const char *p = rc.fun1(BUFLEN - 2, C::e1); +} diff --git a/clang/test/SemaCXX/PR6562.cpp b/clang/test/SemaCXX/PR6562.cpp new file mode 100644 index 0000000..854d9b0 --- /dev/null +++ b/clang/test/SemaCXX/PR6562.cpp @@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +struct X { ~X(); }; +template +struct A { + struct B { X x; }; + struct C : public B { + C() : B() { } + }; +}; diff --git a/clang/test/SemaCXX/PR6618.cpp b/clang/test/SemaCXX/PR6618.cpp new file mode 100644 index 0000000..10d4dc8 --- /dev/null +++ b/clang/test/SemaCXX/PR6618.cpp @@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +class bar; // expected-note {{forward declaration of 'bar'}} +struct zed { + bar g; // expected-error {{field has incomplete type}} +}; +class baz { + zed h; +}; +void f() { + enum { + e = sizeof(baz) + }; +} diff --git a/clang/test/SemaCXX/PR7410.cpp b/clang/test/SemaCXX/PR7410.cpp new file mode 100644 index 0000000..6d2cda9 --- /dev/null +++ b/clang/test/SemaCXX/PR7410.cpp @@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +struct BaseReturn {}; + +struct Base { + virtual BaseReturn Foo() = 0; // expected-note{{overridden virtual function is here}} +}; +struct X {}; +struct Derived : Base { + X Foo(); // expected-error{{virtual function 'Foo' has a different return type ('X') than the function it overrides (which has return type 'BaseReturn')}} +}; + +Derived d; diff --git a/clang/test/SemaCXX/PR7944.cpp b/clang/test/SemaCXX/PR7944.cpp new file mode 100644 index 0000000..51b3f6b --- /dev/null +++ b/clang/test/SemaCXX/PR7944.cpp @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +// PR7944 + +#define MACRO(x) x + +struct B { int f() { return 0; } }; +struct A { B* b() { return new B; } }; + +void g() { + A a; + MACRO(a.b->f()); // expected-error{{reference to non-static member function must be called; did you mean to call it with no arguments?}} +} diff --git a/clang/test/SemaCXX/PR8012.cpp b/clang/test/SemaCXX/PR8012.cpp new file mode 100644 index 0000000..9cfc2b0 --- /dev/null +++ b/clang/test/SemaCXX/PR8012.cpp @@ -0,0 +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}} diff --git a/clang/test/SemaCXX/PR8385.cpp b/clang/test/SemaCXX/PR8385.cpp new file mode 100644 index 0000000..77a117a --- /dev/null +++ b/clang/test/SemaCXX/PR8385.cpp @@ -0,0 +1,7 @@ +// RUN: not %clang_cc1 -fsyntax-only %s + +// don't crash on this, but don't constrain our diagnostics here as they're +// currently rather poor (we even accept things like "template struct {}"). +// Other, explicit tests, should verify the relevant behavior of template +// instantiation. +struct{template struct{ diff --git a/clang/test/SemaCXX/PR8755.cpp b/clang/test/SemaCXX/PR8755.cpp new file mode 100644 index 0000000..07778dd --- /dev/null +++ b/clang/test/SemaCXX/PR8755.cpp @@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +template +struct A { + typedef int iterator; // expected-note{{declared here}} +}; + +template +void f() { + class A ::iterator foo; // expected-error{{elaborated type refers to a typedef}} +} + +void g() { + f(); // expected-note{{in instantiation of function template}} +} + diff --git a/clang/test/SemaCXX/PR8884.cpp b/clang/test/SemaCXX/PR8884.cpp new file mode 100644 index 0000000..4026465 --- /dev/null +++ b/clang/test/SemaCXX/PR8884.cpp @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -fsyntax-only %s +extern "C" { + class bar { + friend struct foo; + static struct foo& baz (); + }; + struct foo { + void zed () { + bar::baz(); + } + }; +} diff --git a/clang/test/SemaCXX/PR9459.cpp b/clang/test/SemaCXX/PR9459.cpp new file mode 100644 index 0000000..2b96f34 --- /dev/null +++ b/clang/test/SemaCXX/PR9459.cpp @@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +// Don't crash. + +templatestruct ae_same; +templatestruct ts{}ap() // expected-error {{expected ';' after struct}} expected-error {{requires a type specifier}} +{ts::ap::&ae_same<>>::p(a); }; // expected-error {{use of undeclared identifier 'a'}} diff --git a/clang/test/SemaCXX/PR9460.cpp b/clang/test/SemaCXX/PR9460.cpp new file mode 100644 index 0000000..0dd8446 --- /dev/null +++ b/clang/test/SemaCXX/PR9460.cpp @@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +// Don't crash. + +template +struct basic_string{ + a; // expected-error {{requires a type specifier}} + basic_string(aT*); +}; + +struct runtime_error{ + runtime_error( +basic_string struct{ // expected-error {{cannot combine with previous 'type-name' declaration specifier}} +a(){ // expected-error {{requires a type specifier}} + runtime_error(0); +} +} +); +}; diff --git a/clang/test/SemaCXX/PR9461.cpp b/clang/test/SemaCXX/PR9461.cpp new file mode 100644 index 0000000..beed348 --- /dev/null +++ b/clang/test/SemaCXX/PR9461.cpp @@ -0,0 +1,32 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +// Don't crash. + +templatestruct basic_string; + +typedef basic_string string; + + + +template +struct basic_string +{ +int us; +basic_string(const aT*,const oc&a=int()); + +int _S_construct(); + +int _S_construct(int); + +_S_construct(); // expected-error {{requires}} +}; + +template +basic_string<_CharT,_Traits,_Alloc>::basic_string(const _CharT*,const _Alloc&) +:us(_S_construct) +{string a;} + +struct runtime_error{runtime_error(string);}; + +struct system_error:runtime_error{ // expected-note {{to match}} +system_error():time_error("" // expected-error 3 {{expected}} expected-note {{to match}} diff --git a/clang/test/SemaCXX/PR9572.cpp b/clang/test/SemaCXX/PR9572.cpp new file mode 100644 index 0000000..b475b57 --- /dev/null +++ b/clang/test/SemaCXX/PR9572.cpp @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +class Base { + virtual ~Base(); // expected-note {{implicitly declared private here}} +}; +struct Foo : public Base { // expected-error {{base class 'Base' has private destructor}} + const int kBlah = 3; // expected-warning {{is a C++11 extension}} + Foo(); +}; +struct Bar : public Foo { + Bar() { } // expected-note {{implicit default destructor for 'Foo' first required here}} +}; +struct Baz { + Foo f; + Baz() { } +}; diff --git a/clang/test/SemaCXX/PR9884.cpp b/clang/test/SemaCXX/PR9884.cpp new file mode 100644 index 0000000..ab883c4 --- /dev/null +++ b/clang/test/SemaCXX/PR9884.cpp @@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +class Base { +protected: + Base(int val); +}; + + +class Derived : public Base { +public: + Derived(int val); +}; + + +Derived::Derived(int val) + : Base( val ) +{ +} diff --git a/clang/test/SemaCXX/PR9902.cpp b/clang/test/SemaCXX/PR9902.cpp new file mode 100644 index 0000000..80086e4 --- /dev/null +++ b/clang/test/SemaCXX/PR9902.cpp @@ -0,0 +1,28 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s + +template +struct __allocator_traits_rebind +{ +}; + +template