summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* [Coverage] Suppress creating a code region if the same area is covered by an ↵Igor Kudrin2016-08-312-7/+10
| | | | | | | | | | | | expansion region. In most cases these code regions are just redundant, but sometimes they could be assigned to the counter of the parent code region instead of the counter of the nested block. Differential Revision: https://reviews.llvm.org/D23987 llvm-svn: 280199
* [AVX-512] Implement masked floating point logical operations with native IR ↵Craig Topper2016-08-312-49/+121
| | | | | | and remove the builtins. llvm-svn: 280197
* [X86] Use v2i64 vectors to implement _mm_and/andn/or/xor_pd.Craig Topper2016-08-311-5/+5
| | | | | | These will be reused when removing some builtins from avx512vldqintrin.h and this will make the tests for that change show a better number of vector elements. llvm-svn: 280196
* PR12298 et al: don't recursively instantiate a template specialization fromRichard Smith2016-08-313-22/+105
| | | | | | | | | | | | | | | within the instantiation of that same specialization. This could previously happen for eagerly-instantiated function templates, variable templates, exception specifications, default arguments, and a handful of other cases. We still have an issue here for default template arguments that recursively make use of themselves and likewise for substitution into the type of a non-type template parameter, but in those cases we're producing a different entity each time, so they should instead be caught by the instantiation depth limit. However, currently we will typically run out of stack before we reach it. :( llvm-svn: 280190
* Concatenate two FileCheck lines in a test.Richard Trieu2016-08-311-8/+4
| | | | | | | | | 'cc1' is a valid sequence of hexadecimal and sometimes can occur in the path when testing. This can lead to FileCheck matching the incorrect occurance of the 'cc1' string and causing a test failure. Join two adjacent flags together into one check to prevent this. llvm-svn: 280189
* Don't try to run a test that generates code for x86 if it's not a registered ↵Richard Smith2016-08-301-0/+2
| | | | | | target. llvm-svn: 280178
* [analyzer] Use lazily created buffer in EmptyLocalizationContextCheckerDevin Coughlin2016-08-302-1/+12
| | | | | | | | | | | Fix a crash when relexing the underlying memory buffer to find incorrect arguments to NSLocalizedString(). With precompiled headers, the raw buffer may be NULL. Instead, use the source manager to get the buffer, which will lazily create the buffer for precompiled headers. rdar://problem/27429091 llvm-svn: 280174
* Driver: use the canonical static library namingSaleem Abdulrasool2016-08-302-6/+6
| | | | | | | | | | On Windows, static libraries are named lib<name>.lib while import libraries are named <name>.lib. Use the appropriate naming on itanium and msvc environments. This is setup properly so that if a dynamic builtins is used on Windows, it would do the right thing, although this is not currently wired through the driver (i.e. there is no equivalent to -{shared,static}-gcc). llvm-svn: 280169
* [Modules] Add 'gnuinlineasm' to the 'requires-declaration' feature-list.Bruno Cardoso Lopes2016-08-304-0/+26
| | | | | | | | | | | | | This adds support for modules that require (no-)gnu-inline-asm environment, such as the compiler builtin cpuid submodule. This is the gnu-inline-asm variant of https://reviews.llvm.org/D23871 Differential Revision: https://reviews.llvm.org/D23905 rdar://problem/26931199 llvm-svn: 280159
* [test] Pass a fake libLTO.dylib to a driver test which depends on itVedant Kumar2016-08-301-7/+7
| | | | | | | This makes it possible to run 'check-clang' on Darwin without building libLTO.dylib. See r280142 for more context. llvm-svn: 280150
* Revert "[test] Add libLTO as a clang test dependency on Darwin"Vedant Kumar2016-08-301-4/+0
| | | | | | | | This reverts commit r280142. Mehdi suggested a better way to fix up the test: just create a fake libLTO.dylib and tell the driver where to find it. Patch incoming... llvm-svn: 280149
* [test] Add libLTO as a clang test dependency on DarwinVedant Kumar2016-08-301-0/+4
| | | | | | | | | | | | | Running 'check-clang' on a stock checkout of llvm+clang doesn't work on Darwin, because test/Driver/darwin-ld-lto.c can't find libLTO.dylib. Add libLTO as a clang test dependency on Darwin to fix the problem. Note: We don't have this issue with check-all because libLTO is in the test-depends target. Differential Revision: https://reviews.llvm.org/D24042 llvm-svn: 280142
* PR29166: when merging declarations with typedef names for linkage purposes,Richard Smith2016-08-301-0/+1
| | | | | | | don't assume that the anonymous struct will be part of the most recent declaration of the typedef. llvm-svn: 280136
* Unrevert r280035 now that the clang-cl bug it exposed has been fixed byRichard Smith2016-08-302-2/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r280133. Original commit message: C++ Modules TS: driver support for building modules. This works as follows: we add --precompile to the existing gamut of options for specifying how far to go when compiling an input (-E, -c, -S, etc.). This flag specifies that an input is taken to the precompilation step and no further, and this can be specified when building a .pcm from a module interface or when building a .pch from a header file. The .cppm extension (and some related extensions) are implicitly recognized as C++ module interface files. If --precompile is /not/ specified, the file is compiled (via a .pcm) to a .o file containing the code for the module (and then potentially also assembled and linked, if -S, -c, etc. are not specified). We do not yet suppress the emission of object code for other users of the module interface, so for now this will only work if everything in the .cppm file has vague linkage. As with the existing support for module-map modules, prebuilt modules can be provided as compiler inputs either via the -fmodule-file= command-line argument or via files named ModuleName.pcm in one of the directories specified via -fprebuilt-module-path=. This also exposes the -fmodules-ts cc1 flag in the driver. This is still experimental, and in particular, the concrete syntax is subject to change as the Modules TS evolves in the C++ committee. Unlike -fmodules, this flag does not enable support for implicitly loading module maps nor building modules via the module cache, but those features can be turned on separately and used in conjunction with the Modules TS support. llvm-svn: 280134
* PR30195: Fix clang-cl attempting to precompile bogus (non-precompilable) ↵Richard Smith2016-08-301-24/+27
| | | | | | input types. llvm-svn: 280133
* Disable clang/test/SemaTemplate/instantiation-depth-default.cpp temporarily ↵NAKAMURA Takumi2016-08-301-0/+3
| | | | | | for targeting mingw32. It crashes. Investigating. llvm-svn: 280104
* Fix typo in commentNico Weber2016-08-301-1/+1
| | | | llvm-svn: 280094
* Revert r280035 (and followups r280057, r280085), it caused PR30195Nico Weber2016-08-302-40/+2
| | | | llvm-svn: 280091
* Handle -mlong-calls on HexagonKrzysztof Parzyszek2016-08-301-0/+15
| | | | | | Differential Revision:://reviews.llvm.org/D22766 llvm-svn: 280089
* clang/test/Driver/modules-ts.cpp: Satisfy quoted filename.NAKAMURA Takumi2016-08-301-1/+1
| | | | | | | | On win32, backslashed filename is emitted like; -o "C:\\bb-win\\ninja-clang-i686-msc19-R\\build\\tools\\clang\\test\\Driver\\Output\\modules-ts.cpp.tmp.o" llvm-svn: 280085
* Fix for commit 280064 that break the build.Sjoerd Meijer2016-08-301-7/+0
| | | | llvm-svn: 280065
* This adds new options -fdenormal-fp-math and passes through option -ffast-mathSjoerd Meijer2016-08-303-0/+37
| | | | | | | | | | to CC1, which are translated to function attributes and can e.g. be mapped on build attributes FP_exceptions and FP_denormal. Setting these build attributes allows better selection of floating point libraries. Differential Revision: https://reviews.llvm.org/D23840 llvm-svn: 280064
* Combine two FileCheck patterns to prevent overzealous matching of .*Richard Smith2016-08-301-2/+1
| | | | llvm-svn: 280057
* [PowerPC] Update the DWARF register-size tableHal Finkel2016-08-301-0/+129
| | | | | | | | | The PPC64 DWARF register-size table did not match the ABI specification (or GCC, for that matter). Fix that, and add a regression test. Fixes PR27931. llvm-svn: 280053
* [sanitizer-coverage] add two more modes of instrumentation: trace-div and ↵Kostya Serebryany2016-08-301-1/+3
| | | | | | trace-gep, mostly usaful for value-profile-based fuzzing; clang part llvm-svn: 280044
* [PowerPC] Add support for -mlongcallHal Finkel2016-08-301-0/+6
| | | | | | | | | Add support for GCC's PowerPC -mlongcall option; the backend supports the corresponding target feature as of r280040. Fixes PR19098. llvm-svn: 280041
* C++ Modules TS: driver support for building modules.Richard Smith2016-08-302-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This works as follows: we add --precompile to the existing gamut of options for specifying how far to go when compiling an input (-E, -c, -S, etc.). This flag specifies that an input is taken to the precompilation step and no further, and this can be specified when building a .pcm from a module interface or when building a .pch from a header file. The .cppm extension (and some related extensions) are implicitly recognized as C++ module interface files. If --precompile is /not/ specified, the file is compiled (via a .pcm) to a .o file containing the code for the module (and then potentially also assembled and linked, if -S, -c, etc. are not specified). We do not yet suppress the emission of object code for other users of the module interface, so for now this will only work if everything in the .cppm file has vague linkage. As with the existing support for module-map modules, prebuilt modules can be provided as compiler inputs either via the -fmodule-file= command-line argument or via files named ModuleName.pcm in one of the directories specified via -fprebuilt-module-path=. This also exposes the -fmodules-ts cc1 flag in the driver. This is still experimental, and in particular, the concrete syntax is subject to change as the Modules TS evolves in the C++ committee. Unlike -fmodules, this flag does not enable support for implicitly loading module maps nor building modules via the module cache, but those features can be turned on separately and used in conjunction with the Modules TS support. llvm-svn: 280035
* [cfi] Export __cfi_check when linking with -fsanitize-cfi-cross-dso.Evgeniy Stepanov2016-08-291-0/+22
| | | | | | Multi-DSO CFI model requires every DSO to export a __cfi_check function. llvm-svn: 280031
* Fix typo in test.Evgeniy Stepanov2016-08-291-1/+1
| | | | llvm-svn: 280028
* Fix a bug preventing the cause for a module file-not-found from being displayedAdrian Prantl2016-08-291-1/+1
| | | | llvm-svn: 280010
* Fix a bug preventing the cause of a module-out-of-date error from being printedAdrian Prantl2016-08-291-1/+1
| | | | llvm-svn: 280009
* Try to fix clang-offload-bunder.c test once moreReid Kleckner2016-08-291-2/+2
| | | | llvm-svn: 279978
* [Coverage] Prevent creating a redundant counter if a nested body ends with a ↵Igor Kudrin2016-08-291-0/+12
| | | | | | | | | | | | | | | | | macro. If there were several nested statements arranged in a way that all of them end up with the same macro, then the expansion of this macro was assigned with all the corresponding counters of these statements. As a result, the wrong counter value was shown for the macro in llvm-cov. This patch fixes the issue by preventing adding a counter for an expanded source range if it already has an assigned counter, which is expected to come from the most specific statement. Differential Revision: https://reviews.llvm.org/D23160 llvm-svn: 279962
* clang-cl: Support MSVC2015's /validate-charset flag.Nico Weber2016-08-261-0/+6
| | | | | | | | | | | | | | | | | | | Clang always assumes that files are utf-8. If an invalidly encoded character is used in an identifier, clang always errors. If it's used in a character literal, clang warns Winvalid-source-encoding (on by default). Clang never checks the encoding of things in comments (adding this seems like a nice feature if it doesn't impact performance). For cl.exe /utf-8 (which enables /validate-charset), if a bad character is used in an identifier, it emits both an error and a warning. If it's used in a literal or a comment, it emits a warning. So mapping /validate-charset to -Winvalid-source-encoding seems like a fairly decent fit. https://reviews.llvm.org/D23945 llvm-svn: 279872
* clang-cl: Accept MSVC2015's '/utf-8' flag.Nico Weber2016-08-261-0/+1
| | | | | | Clang always behaves as if that's passed, so just ignore the flag. llvm-svn: 279869
* clang-cl: Accept MSVC 2015's `/execution-charset:utf-8` flag.Nico Weber2016-08-261-0/+5
| | | | | | | | | | Also makes -fexec-charset accept utf-8 case-insensitively. Like https://reviews.llvm.org/D23807, but for execution-charset. Also replace a few .lower() comparisons with equals_lower(). https://reviews.llvm.org/D23938 llvm-svn: 279866
* Don't diagnose non-modular includes when we are not compiling a module.Manman Ren2016-08-266-0/+59
| | | | | | | | | | | | | | This is triggered when we are compiling an implementation of a module, it has relative includes to a VFS-mapped module with umbrella headers. Currently we will find the real path to headers under the umbrella directory, but the umbrella directories are using virtual path. rdar://27951255 Thanks Ben and Richard for reviewing the patch! Differential Revision: http://reviews.llvm.org/D23858 llvm-svn: 279838
* Add support for -fdiagnostics-absolute-paths: printing absolute paths in ↵Hans Wennborg2016-08-263-1/+21
| | | | | | | | diagnostics Differential Revision: https://reviews.llvm.org/D23816 llvm-svn: 279827
* C++ Modules TS: add frontend support for building pcm files from moduleRichard Smith2016-08-263-12/+38
| | | | | | | interface files. At the moment, all declarations (and no macros) are exported, and 'export' declarations are not supported yet. llvm-svn: 279794
* Widen type of __offset_flags in RTTI on Mingw64Reid Kleckner2016-08-251-0/+13
| | | | | | | | | | | | Otherwise we can't handle secondary base classes at offsets greater than 2**24. This agrees with libstdc++abi. We could extend this change to other LLP64 platforms, but then we would want to update libc++abi and it would require additional review. Fixes PR29116 llvm-svn: 279786
* [MS] Win64 va_arg should expect large arguments to be passed indirectlyReid Kleckner2016-08-251-8/+11
| | | | | | Fixes PR20569 llvm-svn: 279774
* Fix clang-offload-bundler.c test on WindowsReid Kleckner2016-08-251-1/+1
| | | | llvm-svn: 279772
* Omit column info for CodeView by defaultAdrian McCarthy2016-08-251-0/+9
| | | | | | | | | | | | Clang tracks only start columns, not start-end ranges. CodeView allows for that, but the VS debugger doesn't handle anything less than a complete range well--it either highlights the wrong part of a statement or truncates source lines in the assembly view. It's better to have no column information at all. So by default, we'll omit the column information for CodeView targeting Windows. Since the column info is still useful for sanitizers, I've promoted -gcolumn-info (and -gno-column-info) to a CoreOption and added a couple tests to make sure that works for clang-cl. Differential Revision: https://reviews.llvm.org/D23720 llvm-svn: 279765
* [MS] Pass non-trivially-copyable objects indirectly on Windows ARMReid Kleckner2016-08-251-0/+15
| | | | | | | | | | This isn't exactly what MSVC does, unfortunately. MSVC does not pass objects with destructors but no copy constructors by address. More ARM expertise is required to really understand what should be done here. Fixes PR29136. llvm-svn: 279764
* [Sema][Comments] Add support for TypeAliasTemplateBruno Cardoso Lopes2016-08-251-0/+32
| | | | | | | | | | | | | | | | Emit proper diagnostics when -Wdocumentation is used with constructs such as: template<typename T> using fn = int(T aaa, int ccc); Previously clang wouldn't recognize the function and complain with 'comment that is not attached to a function declaration'. Differential Revision: https://reviews.llvm.org/D23860 rdar://problem/27300695 llvm-svn: 279754
* Fix offload bundler test to support Windows new lines.Samuel Antao2016-08-251-2/+2
| | | | llvm-svn: 279741
* Lazily load the ContextDecl for a lambda's DefinitionData, to fix aRichard Smith2016-08-252-0/+29
| | | | | | | deserialization cycle caused by the ContextDecl recursively importing members of the lambda's closure type. llvm-svn: 279694
* DebugInfo: Let -gsplit-dwarf and -gmlt compose if -fno-split-dwarf-inlining ↵David Blaikie2016-08-241-2/+23
| | | | | | | | | | | is used If the inline info is not duplicated into the skeleton CU, then there's value in using -gsplit-dwarf and -gmlt together (to keep all those extra subprograms out of the skeleton CU, while also producing smaller .dwo files) llvm-svn: 279687
* Disable test under asan: it uses a lot of stack, and asan increases theRichard Smith2016-08-241-4/+9
| | | | | | | | per-frame stack usage enough to cause it to hit our stack limit. This is not ideal; we should find a better way of dealing with this, such as increasing our stack allocation when built with ASan. llvm-svn: 279668
* PR29097: add an update record when we instantiate the default memberRichard Smith2016-08-241-6/+21
| | | | | | initializer of an imported field. llvm-svn: 279667
OpenPOWER on IntegriCloud