summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Fix for bug 38508 - Don't do PCH processing when only generating ↵Erich Keane2018-08-174-0/+32
| | | | | | | | | | | | preprocessor output This clang-cl driver change removes the PCH options when we are only generating preprocessed output. This is similar to the behavior of Y-. Patch by: mikerice Differential Revision: https://reviews.llvm.org/D50640 llvm-svn: 340025
* clang-cl: Expose -fno-crash-diagnostics (PR38574)Hans Wennborg2018-08-171-0/+1
| | | | llvm-svn: 340023
* [AArch64] - return address signingLuke Cheeseman2018-08-171-0/+14
| | | | | | | | | | | | | | - Add a command line options -msign-return-address to enable return address signing - Armv8.3a added instructions to sign the return address to help mitigate against ROP attacks - This patch adds command line options to generate function attributes that signal to the back whether return address signing instructions should be added Differential revision: https://reviews.llvm.org/D49793 llvm-svn: 340019
* [NFC] Some small test updates for Implicit Conversion sanitizer.Roman Lebedev2018-08-173-46/+288
| | | | | | Split off from D50250. llvm-svn: 339995
* [hexagon] restore -fuse-cxa-atexit by defaultBrian Cain2018-08-171-1/+1
| | | | | | | | | | | | | "-fno-use-cxa-atexit" was a default provided by the initial commit offering hexagon support. This is no longer required. Reviewers: bcahoon, sidneym Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D50816 llvm-svn: 339979
* Disable pubnames in NVPTX debug info using metadataDavid Blaikie2018-08-161-0/+6
| | | | llvm-svn: 339968
* Relax a CHECK line to allow for dso_localVedant Kumar2018-08-161-1/+1
| | | | | | | Fixes a bot failure: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/11806 llvm-svn: 339964
* [InstrProf] Use atomic profile counter updates for TSanVedant Kumar2018-08-161-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Thread sanitizer instrumentation fails to skip all loads and stores to profile counters. This can happen if profile counter updates are merged: %.sink = phi i64* ... %pgocount5 = load i64, i64* %.sink %27 = add i64 %pgocount5, 1 %28 = bitcast i64* %.sink to i8* call void @__tsan_write8(i8* %28) store i64 %27, i64* %.sink To suppress TSan diagnostics about racy counter updates, make the counter updates atomic when TSan is enabled. If there's general interest in this mode it can be surfaced as a clang/swift driver option. Testing: check-{llvm,clang,profile} rdar://40477803 Differential Revision: https://reviews.llvm.org/D50867 llvm-svn: 339955
* [ASTImporter] Add test for member pointer types.Raphael Isemann2018-08-162-0/+23
| | | | | | | | | | | | Reviewers: a.sidorin, martong Reviewed By: martong Subscribers: rnkovacs, martong, cfe-commits Differential Revision: https://reviews.llvm.org/D50792 llvm-svn: 339919
* [ASTImporter] Add test for importing CompoundAssignOperatorsRaphael Isemann2018-08-162-0/+63
| | | | | | | | | | | | Reviewers: a.sidorin, martong Reviewed By: martong Subscribers: rnkovacs, cfe-commits, martong Differential Revision: https://reviews.llvm.org/D50793 llvm-svn: 339918
* [ASTImporter] Add test for DoStmtRaphael Isemann2018-08-162-0/+22
| | | | | | | | | | | | Reviewers: a.sidorin, martong Reviewed By: martong Subscribers: rnkovacs, martong, cfe-commits Differential Revision: https://reviews.llvm.org/D50810 llvm-svn: 339917
* [ASTImporter] Add test for WhileStmtRaphael Isemann2018-08-162-0/+31
| | | | | | | | | | | | Reviewers: a.sidorin, martong Reviewed By: martong Subscribers: rnkovacs, martong, cfe-commits Differential Revision: https://reviews.llvm.org/D50811 llvm-svn: 339916
* [ASTImporter] Add test for IndirectGotoStmtRaphael Isemann2018-08-162-0/+16
| | | | | | | | | | | | Reviewers: a.sidorin, martong Reviewed By: martong Subscribers: rnkovacs, martong, cfe-commits Differential Revision: https://reviews.llvm.org/D50813 llvm-svn: 339915
* [X86] Remove masking from the 512-bit padds and psubs builtins. Use select ↵Craig Topper2018-08-161-12/+20
| | | | | | builtin instead. llvm-svn: 339843
* [ASTImporter] Add test for CXXDefaultInitExprRaphael Isemann2018-08-162-0/+31
| | | | | | | | | | | | Reviewers: a.sidorin, a_sidorin Reviewed By: a_sidorin Subscribers: a_sidorin, martong, cfe-commits Differential Revision: https://reviews.llvm.org/D50732 llvm-svn: 339839
* [ASTImporter] Add test for CXXScalarValueInitRaphael Isemann2018-08-162-0/+13
| | | | | | | | | | | | Reviewers: a.sidorin, a_sidorin Reviewed By: a_sidorin Subscribers: martong, cfe-commits Differential Revision: https://reviews.llvm.org/D50735 llvm-svn: 339838
* [ASTImporter] Add test for ForStmt and ContinueStmtRaphael Isemann2018-08-162-0/+47
| | | | | | | | | | | | Reviewers: a.sidorin, a_sidorin Reviewed By: a_sidorin Subscribers: martong, cfe-commits Differential Revision: https://reviews.llvm.org/D50812 llvm-svn: 339837
* [Driver] -print-target-triple and -print-effective-triple optionsPetr Hosek2018-08-162-0/+12
| | | | | | | | These can be used to print Clang target and effective triple. Differential Revision: https://reviews.llvm.org/D50755 llvm-svn: 339834
* [ASTImporter] Add test for ArrayInitLoopExprRaphael Isemann2018-08-152-0/+14
| | | | | | | | | | | | Reviewers: a.sidorin, a_sidorin Reviewed By: a_sidorin Subscribers: martong, cfe-commits Differential Revision: https://reviews.llvm.org/D50733 llvm-svn: 339831
* [ASTImporter] Add test for ExprWithCleanupsRaphael Isemann2018-08-152-0/+16
| | | | | | | | | | | | Reviewers: a.sidorin, a_sidorin Reviewed By: a_sidorin Subscribers: a_sidorin, martong, cfe-commits Differential Revision: https://reviews.llvm.org/D50731 llvm-svn: 339830
* [Darwin Driver] Fix Simulator builtins and test casesChris Bieneman2018-08-159-48/+21
| | | | | | | | In r339807, I broke linking the builtins libraries for simulator targets, which itself was bad, but turns out it was all completely untested and marked with FIXME in the test suite. This fixes all the test cases so they actually work, and fixes the bug I introduced in r339807. llvm-svn: 339829
* [ASTImporter] Add test for IfStmtRaphael Isemann2018-08-152-0/+68
| | | | | | | | | | | | Reviewers: a.sidorin, hiraditya Reviewed By: hiraditya Subscribers: hiraditya, martong, cfe-commits Differential Revision: https://reviews.llvm.org/D50796 llvm-svn: 339827
* [CStringSyntaxChecker] Reduces space around error message for strlcat.David Carlier2018-08-151-1/+1
| | | | llvm-svn: 339808
* [OPENMP] FIx processing of declare target variables.Alexey Bataev2018-08-152-5/+27
| | | | | | | | The compiler may produce unexpected error messages/crashes when declare target variables were used. Patch fixes problems with the declarations marked as declare target to or link. llvm-svn: 339805
* Use .cpp extension for certain tests instead of .ccMomchil Velikov2018-08-152-0/+0
| | | | | | | | | | | | The tests `CodeGen/aapcs[64]-align.cc` are not run since files with a `.cc` suffix aren't recognisze as tests. This patch renames the above two files to `.cpp`. Differential Revision: https://reviews.llvm.org/D46013 Comitting as obvious. llvm-svn: 339766
* [analyzer] Add support for constructors of arguments.Artem Dergachev2018-08-153-17/+234
| | | | | | | | | | | | | | | | | | | | | Once CFG-side support for argument construction contexts landed in r338436, the analyzer could make use of them to evaluate argument constructors properly. When evaluated as calls, constructors of arguments now use the variable region of the parameter as their target. The corresponding stack frame does not yet exist when the parameter is constructed, and this stack frame is created eagerly. Construction of functions whose body is unavailable and of virtual functions is not yet supported. Part of the reason is the analyzer doesn't consistently use canonical declarations o identify the function in these cases, and every re-declaration or potential override comes with its own set of parameter declarations. Also it is less important because if the function is not inlined, there's usually no benefit in inlining the argument constructor. Differential Revision: https://reviews.llvm.org/D49443 llvm-svn: 339745
* Fix lit fatal errors about requiring a USE_Z3_SOLVER paramReid Kleckner2018-08-141-2/+1
| | | | llvm-svn: 339728
* [CFG] [analyzer] Find argument constructors in CXXTemporaryObjectExprs.Artem Dergachev2018-08-141-0/+33
| | | | | | | | | | | CXXTemporaryObjectExpr is a sub-class of CXXConstructExpr. If it has arguments that are structures passed by value, their respective constructors need to be handled by providing a ConstructionContext, like for regular function calls and for regular constructors. Differential Revision: https://reviews.llvm.org/D50487 llvm-svn: 339727
* [analyzer] Add a test forgotten in r339088.Artem Dergachev2018-08-141-0/+17
| | | | | | Differential Revision: https://reviews.llvm.org/D50363 llvm-svn: 339726
* [InlineAsm] Update the min-legal-vector-width function attribute based on ↵Craig Topper2018-08-141-0/+45
| | | | | | | | | | | | | | | | | | | | | inputs and outputs to inline assembly Summary: Another piece of my ongoing to work for prefer-vector-width. min-legal-vector-width will eventually be used by the X86 backend to know whether it needs to make 512 bits type legal when prefer-vector-width=256. If the user used inline assembly that passed in/out a 512-bit register, we need to make sure 512 bits are considered legal. Otherwise we'll get an assert failure when we try to wire up the inline assembly to the rest of the code. This patch just checks the LLVM IR types to see if they are vectors and then updates the attribute based on their total width. I'm not sure if this is the best way to do this or if there's any subtlety I might have missed. So if anyone has other opinions on how to do this I'm open to suggestions. Reviewers: chandlerc, rsmith, rnk Reviewed By: rnk Subscribers: eraman, cfe-commits Differential Revision: https://reviews.llvm.org/D50678 llvm-svn: 339721
* [analyzer] Fix bots by removing new check-clang-analyzer commands from CHECK-ALLGeorge Karpenkov2018-08-141-0/+4
| | | | llvm-svn: 339709
* [OPENMP] Fix processing of declare target construct.Alexey Bataev2018-08-141-0/+24
| | | | | | | The attribute marked as inheritable since OpenMP 5.0 supports it + additional fixes to support new functionality. llvm-svn: 339704
* [OpenCL] Add test for constant sampler argumentSven van Haastregt2018-08-141-0/+2
| | | | llvm-svn: 339678
* [gnu-objc] Make selector order deterministic.David Chisnall2018-08-141-0/+16
| | | | | | | | | | | | | | | | | | | Summary: This probably fixes PR35277, though there may be other sources of nondeterminism (this was the only case of iterating over a DenseMap). It's difficult to provide a test case for this, because it shows up only on systems with ASLR enabled. Reviewers: rjmccall Reviewed By: rjmccall Subscribers: bmwiedemann, mgrang, cfe-commits Differential Revision: https://reviews.llvm.org/D50559 llvm-svn: 339668
* [XRay][clang] Add more test cases of -fxray-modes= (NFC)Dean Michael Berris2018-08-141-0/+14
| | | | | | | | | | This confirms expectations for multiple values provided through the driver when selecting specific modes and the order of appearance of individual values for the `-fxray-modes=` flag. This change just adds more test cases to an existing test file. llvm-svn: 339662
* [analyzer][UninitializedObjectChecker] Void pointers are casted back to ↵Kristof Umann2018-08-141-6/+6
| | | | | | | | their dynamic type in note message Differential Revision: https://reviews.llvm.org/D49228 llvm-svn: 339653
* [X86] Lowering addus/subus intrinsics to native IRTomasz Krupa2018-08-144-51/+167
| | | | | | | | | | | | | | Summary: This is the patch that lowers x86 intrinsics to native IR in order to enable optimizations. Reviewers: craig.topper, spatel, RKSimon Reviewed By: craig.topper Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D46892 llvm-svn: 339651
* [CStringSyntaxChecker] Check strlcat sizeof checkDavid Carlier2018-08-141-0/+17
| | | | | | | | | | | | | - Assuming strlcat is used with strlcpy we check as we can if the last argument does not equal os not larger than the buffer. - Advising the proper usual pattern. Reviewers: NoQ, george.karpenkov Reviewed By: george.karpenkov Differential Revision: https://reviews.llvm.org/D49722 llvm-svn: 339641
* Move test inputs into Inputs directory.Richard Smith2018-08-1461-28/+28
| | | | | | | We don't need a new ExpectedOutputs/ convention. Expected outputs are just another form of test input. llvm-svn: 339634
* [CodeGen] Before returning a copy/dispose helper function, bitcast it toAkira Hatanaka2018-08-142-14/+15
| | | | | | | | a void pointer type. This fixes a bug introduced in r339438. llvm-svn: 339633
* Fix check strings in test/CodeGenObjC/arc-blocks.m in preperation forAkira Hatanaka2018-08-141-14/+14
| | | | | | | | fixing a bug introduced in r339438. Check the descriptor global variables in the IR at both -O0 and -O2. llvm-svn: 339632
* [analyzer] Fix UninitializedObjectChecker to not crash on uninitialized "id" ↵George Karpenkov2018-08-131-0/+10
| | | | | | | | fields Differential Revision: https://reviews.llvm.org/D50673 llvm-svn: 339631
* [analyzer] [NFC] Introduce separate targets for testing the analyzer: ↵George Karpenkov2018-08-134-2/+34
| | | | | | | | | | | | | | | | | | | | | | | | check-clang-analyzer and check-clang-analyzer-z3 Current testing setup for analyzer tests with Z3 is rather inconvenient: There's no way to run the analyzer tests separately (I use LIT_FILTER=Analysis ninja check-clang, but a direct target is nicer). When Clang is built with Z3 support, there's no way to *not* run tests with Z3 solver, and this is often desired, as tests with Z3 solver take a very long time. This patch introduces two extra targets: - check-clang-analyzer - check-clang-analyzer-z3 which solve those problems. Differential Revision: https://reviews.llvm.org/D50594 llvm-svn: 339629
* [OPENMP] Fix emission of the loop doacross constructs.Alexey Bataev2018-08-133-37/+100
| | | | | | | The number of loops associated with the OpenMP loop constructs should not be considered as the number loops to collapse. llvm-svn: 339603
* [analyzer][UninitializedObjectChecker] Refactoring p4.: Wrap FieldRegions ↵Kristof Umann2018-08-132-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and reduce weight on FieldChainInfo Before this patch, FieldChainInfo used a spaghetti: it took care of way too many cases, even though it was always meant as a lightweight wrapper around ImmutableList<const FieldRegion *>. This problem is solved by introducing a lightweight polymorphic wrapper around const FieldRegion *, FieldNode. It is an interface that abstracts away special cases like pointers/references, objects that need to be casted to another type for a proper note messages. Changes to FieldChainInfo: * Now wraps ImmutableList<const FieldNode &>. * Any pointer/reference related fields and methods were removed * Got a new add method. This replaces it's former constructors as a way to create a new FieldChainInfo objects with a new element. Changes to FindUninitializedField: * In order not to deal with dynamic memory management, when an uninitialized field is found, the note message for it is constructed and is stored instead of a FieldChainInfo object. (see doc around addFieldToUninits). Some of the test files are changed too, from now on uninitialized pointees of references always print "uninitialized pointee" instead of "uninitialized field" (which should've really been like this from the beginning). I also updated every comment according to these changes. Differential Revision: https://reviews.llvm.org/D50506 llvm-svn: 339599
* Enforce instantiation of template multiversion functionsErich Keane2018-08-131-2/+10
| | | | | | | | | Multiversioned member functions inside of a template type were not properly being emitted. The solution to this is to simply ensure that their bodies are correctly evaluated/assigned during template instantiation. llvm-svn: 339597
* [Sema] fix -Wfloat-conversion test case.Nick Desaulniers2018-08-131-1/+1
| | | | | | | | | | | | | | | | | | Summary: Fixes r339581 ("[SEMA] add more -Wfloat-conversion to compound assigment analysis"). This test case was caught in postsubmit testing. Reviewers: aaron.ballman, gkistanova Reviewed By: aaron.ballman Subscribers: cfe-commits, srhines Differential Revision: https://reviews.llvm.org/D50647 llvm-svn: 339593
* [SEMA] add more -Wfloat-conversion to compound assigment analysisNick Desaulniers2018-08-131-0/+26
| | | | | | | | | | | | | | Summary: Fixes Bug: https://bugs.llvm.org/show_bug.cgi?id=27061 Reviewers: aaron.ballman, acoomans Reviewed By: aaron.ballman, acoomans Subscribers: acoomans, cfe-commits, srhines, pirama Differential Revision: https://reviews.llvm.org/D50467 llvm-svn: 339581
* Revert "[OPENMP] Fix emission of the loop doacross constructs."Alexey Bataev2018-08-133-100/+37
| | | | | | This reverts commit r339568 because of the problems with the buildbots. llvm-svn: 339574
* Summary:Add clang::reinitializes attributeMartin Bohme2018-08-131-0/+15
| | | | | | | | | | | | | | | | Summary: This is for use by clang-tidy's bugprone-use-after-move check -- see corresponding clang-tidy patch at https://reviews.llvm.org/D49910. Reviewers: aaron.ballman, rsmith Reviewed By: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D49911 llvm-svn: 339569
OpenPOWER on IntegriCloud