summaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
* [COFF, ARM64] Set the data type widths and the data layout stringMandeep Singh Grang2017-07-171-0/+88
| | | | | | | | | | | | | | Summary: COFF ARM64 is LLP64 platform. So int is 4 bytes, long is 4 bytes and long long is 8 bytes. Reviewers: compnerd, ruiu, rnk, efriedma Reviewed By: compnerd, efriedma Subscribers: efriedma, javed.absar, cfe-commits, aemerson, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D34859 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308222 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64] Add support for __builtin_ms_va_list on aarch64Martin Storsjo2017-07-173-1/+80
| | | | | | | | | | | Move builtins from the x86 specific scope into the global scope. Their use is still limited to x86_64 and aarch64 though. This allows wine on aarch64 to properly handle variadic functions. Differential Revision: https://reviews.llvm.org/D34475 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308218 91177308-0d34-0410-b5e6-96231b3b80d8
* Update use of llvm::CallingConv:X86_64_Win64 after LLVM commit r308208Martin Storsjo2017-07-172-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308209 91177308-0d34-0410-b5e6-96231b3b80d8
* [SystemZ] Add support for IBM z14 processor (3/3)Ulrich Weigand2017-07-174-19/+805
| | | | | | | | | | | | | | | This patch updates the vecintrin.h header file to provide the new set of high-level vector built-in functions. This matches the updated definition implemented by other compilers for the platform, indicated by the pre-defined macro __VEC__ == 10302. Note that some of the new functions (notably those involving the vector float data type) are only available with -march=z14 (indicated by __ARCH__ == 12). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308199 91177308-0d34-0410-b5e6-96231b3b80d8
* [SystemZ] Add support for IBM z14 processor (2/3)Ulrich Weigand2017-07-173-1/+406
| | | | | | | | | | | | This patch extends the -fzvector language feature to enable the new "vector float" data type when compiling at -march=z14. This matches the updated extension definition implemented by other compilers for the platform, which is indicated to applications by pre-defining __VEC__ to 10302 (instead of 10301). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308198 91177308-0d34-0410-b5e6-96231b3b80d8
* [SystemZ] Add support for IBM z14 processor (1/3)Ulrich Weigand2017-07-177-0/+232
| | | | | | | | | | | | | This patch series adds support for the IBM z14 processor. This part includes: - Basic support for the new processor and its features. - Support for low-level builtins mapped to new LLVM intrinsics. Support for the -fzvector extension to vector float and the new high-level vector intrinsics is provided by separate patches. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308197 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang] Remove redundant check-prefix=CHECK from tests. NFC.Mandeep Singh Grang2017-07-178-9/+9
| | | | | | | | | | | | Reviewers: t.p.northover, mstorsjo, rsmith, mcrosier Reviewed By: mstorsjo, mcrosier Subscribers: mcrosier, javed.absar, cfe-commits Differential Revision: https://reviews.llvm.org/D35465 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308192 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Fix reduction combiner testAlexey Bataev2017-07-172-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308183 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Further fixes of the reduction codegen testsAlexey Bataev2017-07-172-140/+140
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308182 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Further test fixes.Alexey Bataev2017-07-172-116/+116
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308178 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Rework tests to pacify buildbots.Alexey Bataev2017-07-172-6/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308176 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Codegen for reduction clauses in 'taskloop' directives.Alexey Bataev2017-07-1712-34/+504
| | | | | | Adds codegen for taskloop-based directives. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308174 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable TLS support on OpenBSD.Brad Smith2017-07-171-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308156 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable TLS support on OpenBSD, but default to the emulatated TLS model.Brad Smith2017-07-171-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308155 91177308-0d34-0410-b5e6-96231b3b80d8
* [Bash-autocompletion] Add support for -W<warning> and -Wno<warning>Yuka Takahashi2017-07-161-0/+4
| | | | | | | | | | Summary: `-W[tab]` will autocomplete warnings defined in this link: https://clang.llvm.org/docs/DiagnosticsReference.html#wweak-vtables Differential Revision: https://reviews.llvm.org/D35447 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308139 91177308-0d34-0410-b5e6-96231b3b80d8
* [c++2a] Add option -std=c++2a to enable support for potential/transitional ↵Faisal Vali2017-07-163-0/+28
| | | | | | | | | | | C++2a features - as usual C++2a implies all the C++'s that came before it. Thank you Aaron for the feedback here: https://reviews.llvm.org/D35454 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308118 91177308-0d34-0410-b5e6-96231b3b80d8
* Use ARC parsing rules for ns_returns_retained in MRC so that code canJohn McCall2017-07-153-2/+20
| | | | | | | | be shared without warnings. Build AttributedTypes to leave breadcrumbs for tools like the static analyzer. Warn about attempting to use the attribute with incompatible return types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308092 91177308-0d34-0410-b5e6-96231b3b80d8
* clang/test/FixIt/format.m: Tweak for i686, where ssize_t is int. (r308067)NAKAMURA Takumi2017-07-151-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308084 91177308-0d34-0410-b5e6-96231b3b80d8
* [ODRHash] Revert r307743 which reverted r307720Richard Trieu2017-07-151-0/+69
| | | | | | | | Reapply r307720 to allow processing of constructors and destructors. Reuse the diagnostics for CXXMethodDecl for them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308077 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang] Fix format test Alexander Shaposhnikov2017-07-151-3/+3
| | | | | | | | | | This diff makes the test FixIt/format.m more robust. The issue was caught by the build bot clang-cmake-thumbv7-a15. Test plan: make check-all git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308073 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang] Fix handling of "%zd" format specifierAlexander Shaposhnikov2017-07-141-0/+13
| | | | | | | | | | | | | | This diff addresses FIXME in lib/Analysis/PrintfFormatString.cpp and makes PrintfSpecifier::getArgType return the correct type. In particular, this change enables Clang to emit a warning on incorrect using of "%zd"/"%zn" format specifiers. Differential revision: https://reviews.llvm.org/D35427 Test plan: make check-all git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308067 91177308-0d34-0410-b5e6-96231b3b80d8
* Unconditionally use .init_array instead of .ctors on Solaris.Aaron Ballman2017-07-141-0/+8
| | | | | | Patch by Fedor Sergeev git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308038 91177308-0d34-0410-b5e6-96231b3b80d8
* [Hexagon] Add intrinsics for data cache operationsKrzysztof Parzyszek2017-07-141-0/+12
| | | | | | | | | | | | | | This is the clang part, adding support for void __builtin_HEXAGON_Y2_dccleana(void*); void __builtin_HEXAGON_Y2_dccleaninva(void*); void __builtin_HEXAGON_Y2_dcinva(void*); void __builtin_HEXAGON_Y2_dczeroa(void*); void __builtin_HEXAGON_Y4_l2fetch(void*, unsigned); void __builtin_HEXAGON_Y5_l2fetch(void*, unsigned long long); Requires r308032. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308035 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Add annotation for functions taking user-facing stringsErik Verbruggen2017-07-141-0/+19
| | | | | | | | | | | | | | | | | There was already a returns_localized_nsstring annotation to indicate that the return value could be passed to UIKit methods that would display them. However, those UIKit methods were hard-coded, and it was not possible to indicate that other classes/methods in a code-base would do the same. The takes_localized_nsstring annotation can be put on function parameters and selector parameters to indicate that those will also show the string to the user. Differential Revision: https://reviews.llvm.org/D35186 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308012 91177308-0d34-0410-b5e6-96231b3b80d8
* Keep the IdentifierInfo in the Token for alternative operator keywordOlivier Goffart2017-07-142-3/+13
| | | | | | | | | | | | | | | | | | | The goal of this commit is to fix clang-format so it does not merge tokens when using the alternative spelling keywords. (eg: "not foo" should not become "notfoo") The problem is that Preprocessor::HandleIdentifier used to drop the identifier info from the token for these keyword. This means the first condition of TokenAnnotator::spaceRequiredBefore is not met. We could add explicit check for the spelling in that condition, but I think it is better to keep the IdentifierInfo and handle the operator keyword explicitly when needed. That actually leads to simpler code, and probably slightly more efficient as well. Another side effect of this change is that __identifier(and) will now work as one would expect, removing a FIXME from the MicrosoftExtensions.cpp test Differential Revision: https://reviews.llvm.org/D35172 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308008 91177308-0d34-0410-b5e6-96231b3b80d8
* [ODRHash] Avoid taking the types of FunctionDecl'sRichard Trieu2017-07-141-0/+14
| | | | | | | | | FunctionDecl already hashes most of the information in the function's type. Add hashing of the return type, and skip hashing the function's type to avoid redundancy and extra work when computing the hash. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307986 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver] Respect -target when determining target platform on AppleAkira Hatanaka2017-07-141-0/+12
| | | | | | | | | | | | | | platforms. Set the target OS based on -target if it is present on the command line and -arch is not. With this commit, "-target x86_64-apple-ios8.0" does the same thing as "-arch x86_64 -mios-version-min=8.0". rdar://problem/21012522 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307982 91177308-0d34-0410-b5e6-96231b3b80d8
* [PS4] Disable LTO unit features under ThinLTO, like for Darwin.Paul Robinson2017-07-131-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307964 91177308-0d34-0410-b5e6-96231b3b80d8
* [ubsan] Teach the pointer overflow check that "p - <unsigned> <= p" (PR33430)Vedant Kumar2017-07-131-4/+11
| | | | | | | | | | | | | | | | | | | | | The pointer overflow check gives false negatives when dealing with expressions in which an unsigned value is subtracted from a pointer. This is summarized in PR33430 [1]: ubsan permits the result of the subtraction to be greater than "p", but it should not. To fix the issue, we should track whether or not the pointer expression is a subtraction. If it is, and the indices are unsigned, we know to expect "p - <unsigned> <= p". I've tested this by running check-{llvm,clang} with a stage2 ubsan-enabled build. I've also added some tests to compiler-rt, which are in D34122. [1] https://bugs.llvm.org/show_bug.cgi?id=33430 Differential Revision: https://reviews.llvm.org/D34121 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307955 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64] Produce the right kind of va_arg for windowsMartin Storsjo2017-07-131-0/+11
| | | | | | | | On windows on arm64, the va_list is a plain pointer. Differential Revision: https://reviews.llvm.org/D35008 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307933 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend -Wdeprecated-implementations to warn about unavailable methodsAlex Lorenz2017-07-131-1/+8
| | | | | | | rdar://22867595 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307924 91177308-0d34-0410-b5e6-96231b3b80d8
* NFC, Cleanup the code for -Wdeprecated-implementationsAlex Lorenz2017-07-131-5/+5
| | | | | | | | | and void capitalization of the warning message rdar://22867595 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307923 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64] Add support for handling the +sve target feature.Amara Emerson2017-07-131-0/+5
| | | | | | | | This also adds the appropriate predefine for SVE if enabled. Differential Revision: https://reviews.llvm.org/D35118 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307919 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Fix reduction tests, NFC.Alexey Bataev2017-07-132-10/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307916 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Fix reduction tests, NFC.Alexey Bataev2017-07-132-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307915 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Further reduction test fix, NFC.Alexey Bataev2017-07-132-18/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307914 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Fix reduction tests, NFC.Alexey Bataev2017-07-132-12/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307912 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Fix reduction tests, NFC.Alexey Bataev2017-07-132-8/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307911 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Generalization of codegen for reduction clauses.Alexey Bataev2017-07-132-14/+15
| | | | | | | Reworked codegen for reduction clauses for future support of reductions in task-based directives. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307910 91177308-0d34-0410-b5e6-96231b3b80d8
* [ObjC] Pick a 'readwrite' property when synthesizing ambiguousAlex Lorenz2017-07-133-1/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | property and check for incompatible attributes This commit changes the way ambiguous property synthesis (i.e. when synthesizing a property that's declared in multiple protocols) is performed. Previously, Clang synthesized the first property that was found. This lead to problems when the property was synthesized in a class that conformed to two protocols that declared that property and a second protocols had a 'readwrite' declaration - the setter was not synthesized so the class didn't really conform to the second protocol and user's code would crash at runtime when they would try to set the property. This commit ensures that a first readwrite property is selected. This is a semantic change that changes users code in this manner: ``` @protocol P @property(readonly) int p; @end @protocol P2 @property(readwrite) id p; @end @interface I <P2> @end @implementation I @syntesize p; // Users previously got a warning here, and Clang synthesized // readonly 'int p' here. Now Clang synthesizes readwrite 'id' p.. @end ``` To ensure that this change is safe, the warning about incompatible types is promoted to an error when this kind of readonly/readwrite ambiguity is detected in the @implementation. This will ensure that previous code that had this subtle bug and ignored the warning now will fail to compile with an error, and users should not get suprises at runtime once they resolve the error. The commit also extends the ambiguity checker, and now it can detect conflicts among the different property attributes. An error diagnostic is used for conflicting attributes, to ensure that the user won't get "suprises" at runtime. ProtocolPropertyMap is removed in favour of a a set + vector because the map's order of iteration is non-deterministic, so it couldn't be used to select the readwrite property. rdar://31579994 Differential Revision: https://reviews.llvm.org/D35268 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307903 91177308-0d34-0410-b5e6-96231b3b80d8
* [index] Objective-C method declarations and message sends withAlex Lorenz2017-07-131-0/+25
| | | | | | | | | an empty first selector piece should store the location of the first ':' rdar://33188656 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307901 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sema] Mark a virtual CXXMethodDecl as used if a call to it can beAkira Hatanaka2017-07-133-5/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devirtualized. The code to detect devirtualized calls is already in IRGen, so move the code to lib/AST and make it a shared utility between Sema and IRGen. This commit fixes a linkage error I was seeing when compiling the following code: $ cat test1.cpp struct Base { virtual void operator()() {} }; template<class T> struct Derived final : Base { void operator()() override {} }; Derived<int> *d; int main() { if (d) (*d)(); return 0; } rdar://problem/33195657 Differential Revision: https://reviews.llvm.org/D34301 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307883 91177308-0d34-0410-b5e6-96231b3b80d8
* Reland "[Driver] Update Fuchsia driver path handling"Petr Hosek2017-07-122-3/+4
| | | | | | | | | | | | | | | | | Several improvements to the Fuchsia driver: * Search for C++ library headers and libraries in directories that are part of the toolchain distribution rather than sysroot. * Use LLVM support utlities to construct paths to make sure the driver is also usable on Windows for cross-compiling. * Change the driver to inherit directly from ToolChain rather than Generic_GCC since we don't need any of the GCC related multilib logic. Differential Revision: https://reviews.llvm.org/D35328 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307856 91177308-0d34-0410-b5e6-96231b3b80d8
* [index] Don't add relation to a NamedDecl with no nameBen Langmuir2017-07-121-0/+13
| | | | | | | | | | | | Unless it's one of the special cases (tag, category) that we can handle. This syncs up the check between handling a decl and handling a relation. This would cause invalid nameless decls to end up in relations despite having no name or USR. rdar://problem/32474406 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307855 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[analyzer] Support generating and reasoning over more symbolic ↵Dominic Chen2017-07-129-1787/+39
| | | | | | | | | | constraint types" Assertion `Loc::isLocType(SSE->getLHS()->getType())' failed in Analysis/PR3991.m This reverts commit e469ff2759275e67f9072b3d67fac90f647c0fe6. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307853 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips][mt][7/7] Add driver option for the MIPS MT ASE.Simon Dardis2017-07-121-0/+12
| | | | | | | | | Reviewers: atanasyan, slthakur Differential Revision: https://reviews.llvm.org/D35254 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307847 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[Driver] Update Fuchsia driver path handling"Petr Hosek2017-07-121-2/+1
| | | | | | | | The tests are failing on Windows. This reverts commit 429fe8229496f639df6b0b4734beedb1d4317aa5. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307845 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Support generating and reasoning over more symbolic constraint typesDominic Chen2017-07-129-39/+1787
| | | | | | | | | | | | Summary: Generate more IntSymExpr constraints, perform SVal simplification for IntSymExpr and SymbolCast constraints, and create fully symbolic SymExprs Reviewers: zaks.anna, dcoughlin, NoQ, xazax.hun Subscribers: mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D28953 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307833 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver] Update Fuchsia driver path handlingPetr Hosek2017-07-121-1/+2
| | | | | | | | | | | | | | | | | Several improvements to the Fuchsia driver: * Search for C++ library headers and libraries in directories that are part of the toolchain distribution rather than sysroot. * Use LLVM support utlities to construct paths to make sure the driver is also usable on Windows for cross-compiling. * Change the driver to inherit directly from ToolChain rather than Generic_GCC since we don't need any of the GCC related multilib logic. Differential Revision: https://reviews.llvm.org/D32613 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307830 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Emit implicit taskgroup block around taskloop directives.Alexey Bataev2017-07-122-2/+10
| | | | | | | | | If taskloop directive has no associated nogroup clause, it must emitted inside implicit taskgroup block. Runtime supports it, but we need to generate implicit taskgroup block explicitly to support future reductions codegen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307822 91177308-0d34-0410-b5e6-96231b3b80d8