summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Revert "[Driver] Update default sanitizer blacklist location"Petr Hosek2018-01-114-0/+0
| | | | | | This reverts commit r322258: broke the dfsan build. llvm-svn: 322260
* Reland "[Driver] Update default sanitizer blacklist location"Petr Hosek2018-01-114-0/+0
| | | | | | | | | This is related to moving the sanitizer blacklists to share/ subdirectory. Differential Revision: https://reviews.llvm.org/D41706 llvm-svn: 322258
* [X86][Sema] Range check the constant argument for the vpshld/vpshrd builtins ↵Craig Topper2018-01-111-0/+76
| | | | | | to ensure it fits in 8-bits. llvm-svn: 322247
* Revert "[Driver] Update default sanitizer blacklist location"Petr Hosek2018-01-114-0/+0
| | | | | | This reverts commit r322233: this is breaking dfsan tests. llvm-svn: 322242
* In C++17, when instantiating an out-of-line definition of an inline static dataRichard Smith2018-01-102-0/+19
| | | | | | member, don't forget to instantiate the initializer too. llvm-svn: 322236
* Reland "[Driver] Update default sanitizer blacklist location"Petr Hosek2018-01-104-0/+0
| | | | | | | | | This is related to moving the sanitizer blacklists to share/ subdirectory. Differential Revision: https://reviews.llvm.org/D41706 llvm-svn: 322233
* [MSan] Enable use-after-dtor instrumentation by default.Matt Morehouse2018-01-102-3/+5
| | | | | | | | | | | | | | | | | Summary: Enable the compile-time flag -fsanitize-memory-use-after-dtor by default. Note that the run-time option MSAN_OPTIONS=poison_in_dtor=1 still needs to be enabled for destructors to be poisoned. Reviewers: eugenis, vitalybuka, kcc Reviewed By: eugenis, vitalybuka Subscribers: cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D37860 llvm-svn: 322221
* [Driver] Test for correct '--version' suggestionBrian Gesiak2018-01-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The `llvm::OptTable::findNearest` bug fixed in https://reviews.llvm.org/D41873 manifested itself as the following erroneous message when invoking Clang: ``` clang -version clang-6.0: error: unknown argument '-version', did you mean 'version'? ``` Add a test to catch any future regressions to the now correct behavior, which asks "did you mean '--version'?". Test Plan: `check-clang` Reviewers: v.g.vassilev, teemperor, ruiu, jroelofs, yamaguchi Reviewed By: v.g.vassilev Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D41912 llvm-svn: 322220
* Revert "[Driver] Update default sanitizer blacklist location"Petr Hosek2018-01-104-0/+0
| | | | | | This reverts commit r322154 because it broke sanitizer bots. llvm-svn: 322155
* [Driver] Update default sanitizer blacklist locationPetr Hosek2018-01-104-0/+0
| | | | | | | | | This is related to moving the sanitizer blacklists to share/ subdirectory. Differential Revision: https://reviews.llvm.org/D41706 llvm-svn: 322154
* [analyzer] suppress nullability inference from a macro when result is used ↵George Karpenkov2018-01-101-0/+10
| | | | | | | | | | | | | | | | | | in another macro The current code used to not suppress the report, if the dereference was performed in a macro, assuming it is that same macro. However, the assumption might not be correct, and XNU has quite a bit of code where dereference is actually performed in a different macro. As the code uses macro name and not a unique identifier it might be fragile, but in a worst-case scenario we would simply emit an extra diagnostic. rdar://36160245 Differential Revision: https://reviews.llvm.org/D41749 llvm-svn: 322149
* Wire up GCOV to the new pass managerDavid Blaikie2018-01-091-1/+4
| | | | | | | | | | GCOV in the old pass manager also strips debug info (if debug info is disabled/only produced for profiling anyway) after the GCOV pass runs. I think the strip pass hasn't been ported to the new pass manager, so it might take me a little while to wire that up. llvm-svn: 322126
* [OpenMP] Fix handling of clause on wrong directive, by Joel. E. DennyAlexey Bataev2018-01-096-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: First, this patch fixes an assert failure when, for example, "omp for" has num_teams. Second, this patch prevents duplicate diagnostics when, for example, "omp for" has uniform. This patch makes the general assumption (even where it doesn't necessarily fix an existing bug) that it is worthless to perform sema for a clause that appears on a directive on which OpenMP does not permit that clause. However, due to this assumption, this patch suppresses some diagnostics that were expected in the test suite. I assert that those diagnostics were likely just distracting to the user. Reviewers: ABataev Reviewed By: ABataev Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D41841 llvm-svn: 322107
* Explicitly specify output file.Alexander Kornienko2018-01-091-2/+2
| | | | | | Otherwise the test fails when LLVM sources are on a read-only partition. llvm-svn: 322082
* [ASTImporter] Fix missing SourceLoc import for ObjCMethodDecl selectorsAleksei Sidorin2018-01-091-1/+3
| | | | | | | | Patch by Nico Rieck, test case by Sean Callanan! Differential Revision: https://reviews.llvm.org/D6550 llvm-svn: 322079
* Track in the AST whether the operand to a UnaryOperator can overflow and ↵Aaron Ballman2018-01-091-3/+35
| | | | | | then use that logic when evaluating constant expressions and emitting codegen. llvm-svn: 322074
* Avoid assumption that lit tests are writable (in a couple more places). NFCSam McCall2018-01-092-4/+4
| | | | llvm-svn: 322065
* ananas: Add shared library supportEd Schouten2018-01-091-0/+8
| | | | | | | | | | | | | The Ananas Operating System (https://github.com/zhmu/ananas) has shared library support as of commit 57739c0b6ece56dd4872aedf30264ed4b9412c77. This change adds the necessary settings to clang so that shared executables and libraries can be build correctly. Submitted by: Rink Springer Differential Revision: https://reviews.llvm.org/D41500 llvm-svn: 322064
* Added Control Flow Protection FlagOren Ben Simhon2018-01-092-0/+20
| | | | | | | | | | Cf-protection is a target independent flag that instructs the back-end to instrument control flow mechanisms like: Branch, Return, etc. For example in X86 this flag will be used to instrument Indirect Branch Tracking instructions. Differential Revision: https://reviews.llvm.org/D40478 Change-Id: I5126e766c0e6b84118cae0ee8a20fe78cc373dea llvm-svn: 322063
* [X86] Replace cvt*2mask intrinsics with native IR using 'icmp slt X, ↵Craig Topper2018-01-084-12/+27
| | | | | | zeroinitializer. llvm-svn: 322038
* PR35862: Suppress -Wmissing-variable-declarations warning on inline variables,Richard Smith2018-01-081-1/+22
| | | | | | variable templates, and instantiations thereof. llvm-svn: 322030
* Implement Attribute Target MultiVersioningErich Keane2018-01-0812-0/+782
| | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC's attribute 'target', in addition to being an optimization hint, also allows function multiversioning. We currently have the former implemented, this is the latter's implementation. This works by enabling functions with the same name/signature to coexist, so that they can all be emitted. Multiversion state is stored in the FunctionDecl itself, and SemaDecl manages the definitions. Note that it ends up having to permit redefinition of functions so that they can all be emitted. Additionally, all versions of the function must be emitted, so this also manages that. Note that this includes some additional rules that GCC does not, since defining something as a MultiVersion function after a usage has been made illegal. The only 'history rewriting' that happens is if a function is emitted before it has been converted to a multiversion'ed function, at which point its name needs to be changed. Function templates and virtual functions are NOT yet supported (not supported in GCC either). Additionally, constructors/destructors are disallowed, but the former is planned. llvm-svn: 322028
* Factor out comparison handling for arithmetic types.Richard Smith2018-01-081-1/+1
| | | | | | | | | | This is not quite NFC: we don't perform the usual arithmetic conversions unless we have an operand of arithmetic or enumeration type any more. This matches the standard rule, but actually has no effect other than to marginally improve our diagnostics for the non-arithmetic, non-enumeration cases (by not performing integral promotions on one operand if the other is a pointer). llvm-svn: 322024
* [Myriad] Remove invalidated -elf flag for MoviAsmWalter Lee2018-01-081-1/+1
| | | | | | | | | | | | | | Summary: The flag has been deprecated, and is becoming invalid in the latest MDK. Reviewers: jyknight Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D41713 llvm-svn: 322023
* [OPENMP] Fix debug info for outlined functions in NVPTX + add more tests.Alexey Bataev2018-01-086-68/+110
| | | | | | | Fixed name of emitted outlined functions in NVPTX target + extra tests for the debug info. llvm-svn: 322022
* Fix test added in r321992 failing on some buildbots (again), test requires x86.Sean Eveson2018-01-081-0/+2
| | | | llvm-svn: 322000
* [CodeGen] Fix TBAA info for accesses to members of base classesIvan A. Kosarev2018-01-081-0/+53
| | | | | | | | | | | Resolves: Bug 35724 - regression (r315984): fatal error: error in backend: Broken function found (Did not see access type in access path!) https://bugs.llvm.org/show_bug.cgi?id=35724 Differential Revision: https://reviews.llvm.org/D41547 llvm-svn: 321999
* Avoid assumption that lit tests are writable. NFCSam McCall2018-01-086-6/+6
| | | | llvm-svn: 321997
* Fix test added in r321992 failing on some buildbots.Sean Eveson2018-01-081-2/+2
| | | | llvm-svn: 321995
* [Driver] Add flag enabling the function stack size section that was added in ↵Sean Eveson2018-01-082-0/+16
| | | | | | | | | | r319430 Adds the -fstack-size-section flag to enable the .stack_sizes section. The flag defaults to on for the PS4 triple. Differential Revision: https://reviews.llvm.org/D40712 llvm-svn: 321992
* Remove bogus check for template specialization from self-comparison warning.Richard Smith2018-01-071-1/+16
| | | | | | | The important check is that we're not within a template *instantiation*, which we check separately. llvm-svn: 321977
* Fix a couple of wrong self-comparison diagnostics.Richard Smith2018-01-072-0/+9
| | | | | | | | Check whether we are comparing the same entity, not merely the same declaration, and don't assume that weak declarations resolve to distinct entities. llvm-svn: 321976
* Add tests for three-way self- and array comparison.Richard Smith2018-01-071-0/+8
| | | | llvm-svn: 321973
* Factor out common tautological comparison code from scalar and vector ↵Richard Smith2018-01-071-6/+6
| | | | | | | | compare checking. In passing, improve vector compare diagnostic to match scalar compare diagnostic. llvm-svn: 321972
* Add support for a limited subset of TS 18661-3 math builtins.Benjamin Kramer2018-01-062-10/+35
| | | | | | | | | | | | | | | | | These just overloads for _Float128. They're supported by GCC 7 and used by glibc. APFloat support is already there so just add the overloads. __builtin_copysignf128 __builtin_fabsf128 __builtin_huge_valf128 __builtin_inff128 __builtin_nanf128 __builtin_nansf128 This is the same support that GCC has, according to the documentation, but limited to _Float128. llvm-svn: 321948
* [analyzer] Fix some check's output plist not containing the check nameGabor Horvath2018-01-061-7/+0
| | | | | | Differential Revision: https://reviews.llvm.org/D41538 llvm-svn: 321933
* Test case for r321396Richard Trieu2018-01-0611-0/+77
| | | | | | | | Any hashing for methods should be able to compile this test case without emitting an error. Since the class and method come from the same header from each module, there should be no messages about ODR violations. llvm-svn: 321924
* Serialize the IDNS for a UsingShadowDecl rather than recomputing it.Richard Smith2018-01-061-0/+39
| | | | | | | | | Attempting to recompute it are doomed to fail because the IDNS of a declaration is not necessarily preserved across serialization and deserialization (in turn because whether a friend declaration is visible depends on whether some prior non-friend declaration exists). llvm-svn: 321921
* [Driver] Suggest correctly spelled driver optionsBrian Gesiak2018-01-063-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Depends on https://reviews.llvm.org/D41732. Utilities such as `opt`, when invoked with arguments that are very nearly spelled correctly, suggest the correctly spelled options: ``` bin/opt -hel opt: Unknown command line argument '-hel'. Try: 'bin/opt -help' opt: Did you mean '-help'? ``` Clang, on the other hand, prior to this commit, does not: ``` bin/clang -hel clang-6.0: error: unknown argument: '-hel' ``` This commit makes use of the new libLLVMOption API from https://reviews.llvm.org/D41732 in order to provide correct suggestions: ``` bin/clang -hel clang-6.0: error: unknown argument: '-hel', did you mean '-help'? ``` Test Plan: `check-clang` Reviewers: yamaguchi, v.g.vassilev, teemperor, ruiu, bruno Reviewed By: bruno Subscribers: bruno, jroelofs, cfe-commits Differential Revision: https://reviews.llvm.org/D41733 llvm-svn: 321917
* When name lookup finds a non-imported declaration and looks back along theRichard Smith2018-01-061-0/+37
| | | | | | | | | | redecl chain for an imported declaration, make sure to check the IDNS of prior imported decls. Otherwise we can end up finding an invisible friend declaration and incorrectly believing that it should be visible. llvm-svn: 321916
* Preserve unknown STDC pragma through preprocessorSteven Wu2018-01-051-2/+18
| | | | | | | | | | | | | | | | | | | Summary: #pragma STDC FP_CONTRACT handler is only registered in parser so we should keep the unknown STDC pragma through preprocessor and we also should not emit warning for unknown STDC pragma during preprocessor. rdar://problem/35724351 Reviewers: efriedma, rsmith, arphaman Reviewed By: efriedma Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D41780 llvm-svn: 321909
* Fix TLS support check for Darwin 32-bit simulator targets.Volodymyr Sapsai2018-01-051-0/+6
| | | | | | | | | | | | | | | | | Also instead of checking architecture explicitly, use recently added "simulator" environment in the triple. rdar://problem/35083787 Reviewers: arphaman, bob.wilson Reviewed By: arphaman Subscribers: gparker42, cfe-commits Differential Revision: https://reviews.llvm.org/D41750 llvm-svn: 321890
* Commit new test file forgotten in previous commitStephan Bergmann2018-01-051-0/+15
| | | | llvm-svn: 321861
* Reapply r321781: [Modules] Allow modules specified by -fmodule-map-file to ↵Bruno Cardoso Lopes2018-01-0515-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | shadow implicitly found ones When modules come from module map files explicitly specified by -fmodule-map-file= arguments, allow those to override/shadow modules with the same name that are found implicitly by header search. If such a module is looked up by name (e.g. @import), we will always find the one from -fmodule-map-file. If we try to use a shadowed module by including one of its headers report an error. This enables developers to force use of a specific copy of their module to be used if there are multiple copies that would otherwise be visible, for example if they develop modules that are installed in the default search paths. Patch originally by Ben Langmuir, http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20151116/143425.html Based on cfe-dev discussion: http://lists.llvm.org/pipermail/cfe-dev/2015-November/046164.html Differential Revision: https://reviews.llvm.org/D31269 rdar://problem/23612102 llvm-svn: 321855
* Remove redundant testAdrian Prantl2018-01-051-8/+0
| | | | llvm-svn: 321846
* Debug Info: Support DW_AT_calling_convention on composite types.Adrian Prantl2018-01-051-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | This implements the DWARF 5 feature described at http://www.dwarfstd.org/ShowIssue.php?issue=141215.1 This allows a consumer to understand whether a composite data type is trivially copyable and thus should be passed by value instead of by reference. The canonical example is being able to distinguish the following two types: // S is not trivially copyable because of the explicit destructor. struct S { ~S() {} }; // T is a POD type. struct T { ~T() = default; }; <rdar://problem/36034993> Differential Revision: https://reviews.llvm.org/D41039 llvm-svn: 321845
* Make attribute instantiation instantiate all attributes, not just the first ofRichard Smith2018-01-042-0/+41
| | | | | | | | | | | | | | | | | | | | each kind. Attribute instantiation would previously default to instantiating each kind of attribute only once. This was overridden by a flag whose intended purpose was to permit attributes from a prior declaration to be inherited onto a new declaration even if that new declaration had its own copy of the attribute. This is the wrong behavior: when instantiating attributes from a template, we should always instantiate all the attributes that were written on that template. This patch renames the flag in the Attr class (and TableGen sources) to more clearly identify what it's actually for, and removes the usage of the flag from template instantiation. I also removed the flag from AlignedAttr, which was only added to work around the incorrect suppression of duplicate attribute instantiation. llvm-svn: 321834
* Use POSIX argument syntax in test rewrite-includes-messages.cHubert Tong2018-01-041-1/+1
| | | | | | | Invoke diff such that options precede operands. Not doing so leads to unspecified behaviour under the LSB. llvm-svn: 321830
* Use backslash escape, replacing xargs -0 in test macro-multiline.cHubert Tong2018-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: xargs supports escaping of newline characters with backslash. xargs -0 is neither part of POSIX nor the LSB. This patch removes the -0 option and adjusts the input to xargs accordingly; that is, the input is a text file not ending in an incomplete line, and the newline of interest is preceded by a backslash. Note: The treatment of escaped newline characters is not as clearly specified by POSIX as for escaped blank characters; however, the same can be said for escaped backslashes. It is slightly more clear for the case where the -I option is used; however, -I is also of limited portability. Reviewers: bruno Reviewed By: bruno Subscribers: bruno, rcraik, cfe-commits Differential Revision: https://reviews.llvm.org/D41544 llvm-svn: 321828
* [OPENMP] Fix capturing of expressions in clauses.Alexey Bataev2018-01-041-36/+47
| | | | | | | | Patch fixes incorrect capturing of the expressions in clauses with expressions that must be captured for the combined constructs. Incorrect capturing may lead to compiler crash during codegen phase. llvm-svn: 321820
OpenPOWER on IntegriCloud