summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* [index] For an ObjC message call, also record as receivers the protocols if ↵Argyrios Kyrtzidis2018-08-172-4/+38
| | | | | | they are present in the ObjC type llvm-svn: 340109
* [ObjC] Error out when using forward-declared protocol in a @protocolAlex Lorenz2018-08-1715-38/+50
| | | | | | | | | | | | | | | | | | | | | | expression Clang emits invalid protocol metadata when a @protocol expression is used with a forward-declared protocol. The protocol metadata is missing protocol conformance list of the protocol since we don't have access to the definition of it in the compiled translation unit. The linker then might end up picking the invalid metadata when linking which will lead to incorrect runtime protocol conformance checks. This commit makes sure that Clang fails to compile code that uses a @protocol expression with a forward-declared protocol. This ensures that Clang does not emit invalid protocol metadata. I added an extra assert in CodeGen to ensure that this kind of issue won't happen in other places. rdar://32787811 Differential Revision: https://reviews.llvm.org/D49462 llvm-svn: 340102
* Don't warn on returning the address of a label from a statement expressionReid Kleckner2018-08-172-0/+13
| | | | | | | | | | | | | | | | | Summary: There isn't anything inherently wrong with returning a label from a statement expression. In practice, the Linux kernel uses this pattern to materialize PCs. Fixes PR38569 Reviewers: niravd, rsmith, nickdesaulniers Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50805 llvm-svn: 340101
* [analyzer] [NFC] Minor refactoring of ISL-specific code in RetainCountCheckerGeorge Karpenkov2018-08-172-14/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D50879 llvm-svn: 340098
* [analyzer] Re-instate support for MakeCollectable is RetainCountCheckerGeorge Karpenkov2018-08-177-522/+679
| | | | | | Differential Revision: https://reviews.llvm.org/D50872 llvm-svn: 340097
* [analyzer] [NFC] Move ObjCRetainCount to include/AnalysisGeorge Karpenkov2018-08-174-3/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D50869 llvm-svn: 340096
* [analyzer] [NFC] Move canEval function from RetainCountChecker to ↵George Karpenkov2018-08-173-72/+85
| | | | | | | | RetainCountSummaries Differential Revision: https://reviews.llvm.org/D50863 llvm-svn: 340094
* [analyzer] [NFC] Split up summary generation in RetainCountChecker in two ↵George Karpenkov2018-08-172-204/+195
| | | | | | | | methods Differential Revision: https://reviews.llvm.org/D50830 llvm-svn: 340093
* [analyzer] [NFC] Split up RetainCountCheckerGeorge Karpenkov2018-08-178-3894/+4036
| | | | | | | | At some point, staring at 4k+ LOC file becomes a bit hard. Differential Revision: https://reviews.llvm.org/D50821 llvm-svn: 340092
* [analyzer] Drop support for GC mode in RetainCountCheckerGeorge Karpenkov2018-08-1710-2961/+579
| | | | | | | | | | | | A lot of code in RetainCountChecker deals with GC mode. Given that GC mode is deprecated, Apple does not ship runtime for it, and modern compiler toolchain does not support it, it makes sense to remove the code dealing with it in order to aid understanding of RetainCountChecker. Differential Revision: https://reviews.llvm.org/D50747 llvm-svn: 340091
* test commit: add a commentMike Rice2018-08-171-0/+1
| | | | llvm-svn: 340082
* Update comments in CGDebugInfo to reflect changes in the MS mangler, NFCReid Kleckner2018-08-171-12/+26
| | | | | | | I've tried to elaborate on the purpose of these type identifiers and why and when clang uses them. llvm-svn: 340080
* [MS] Mangle a hash of the main file path into anonymous namespacesReid Kleckner2018-08-1714-33/+68
| | | | | | | | | | | | | | | | | | | | | | | Summary: This is needed to avoid conflicts in mangled names for codeview types in anonymous namespaces. In CodeView, types refer to each other typically through forward declarations, which contain mangled names. These names have to be unique, otherwise the debugger will look up the mangled name and find the wrong definition. Furthermore, ThinLTO will deduplicate the types, and debug info verification can fail when the types have the wrong sizes. This is PR38608. Fixes PR38609. Reviewers: majnemer, inglorion, hans Subscribers: mehdi_amini, aprantl, JDevlieghere, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D50877 llvm-svn: 340079
* Improve diagnostic for missing comma in template parameter list.Richard Smith2018-08-172-18/+29
| | | | | | | | | | Given 'typename T typename U', we would correctly diagnose the missing comma, but incorrectly disambiguate the first parameter as being a non-type parameter and complain that the 'T' is not a qualified-id. See also gcc.gnu.org/PR86998. llvm-svn: 340074
* [HIP] Make __hip_gpubin_handle hidden to avoid being merged across different ↵Yaxun Liu2018-08-172-1/+3
| | | | | | | | | | | | | | | | shared libraries Different shared libraries contain different fat binary, which is stored in a global variable __hip_gpubin_handle. Since different compilation units share the same fat binary, this variable has linkonce linkage. However, it should not be merged across different shared libraries. This patch set the visibility of the global variable to be hidden, which will make it invisible in the shared library, therefore preventing it from being merged. Differential Revision: https://reviews.llvm.org/D50596 llvm-svn: 340056
* Make __shiftleft128 / __shiftright128 real compiler built-ins.Nico Weber2018-08-175-17/+54
| | | | | | | | | | | | r337619 added __shiftleft128 / __shiftright128 as functions in intrin.h. Microsoft's STL plans on using these functions, and they're using intrin0.h which just has declarations of built-ins to not pull in the huge intrin.h header in the standard library headers. That requires that these functions are real built-ins. https://reviews.llvm.org/D50907 llvm-svn: 340048
* [CodeGen] Merge identical block descriptor global variables.Akira Hatanaka2018-08-179-148/+359
| | | | | | | | | | | | | | | | | | Currently, clang generates a new block descriptor global variable for each new block literal. This commit merges block descriptors that are identical inside and across translation units using the same approach taken in r339438. To enable merging identical block descriptors, the size and signature of the block and information about the captures are encoded into the name of the block descriptor variable. Also, the block descriptor variable is marked as linkonce_odr and unnamed_addr. rdar://problem/42640703 Differential Revision: https://reviews.llvm.org/D50783 llvm-svn: 340041
* [Preamble] Empty preamble is not an error.Haojian Wu2018-08-173-11/+1
| | | | | | | | | | | | | | | | | | | | Summary: Empty preamble is valid for source file which doesn't have any preprocessor and #includes. This patch makes clang treat an empty preamble as a normal preamble. Check: ninja check-clang A testcase is added in https://reviews.llvm.org/D50627. Reviewers: ilya-biryukov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50628 llvm-svn: 340029
* Fix for bug 38508 - Don't do PCH processing when only generating ↵Erich Keane2018-08-175-3/+36
| | | | | | | | | | | | 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-172-1/+2
| | | | llvm-svn: 340023
* [ThinLTO] Correct documentation on default number of threadsTeresa Johnson2018-08-171-1/+3
| | | | | | | | | | | | | | | | | | Summary: The number of threads used for ThinLTO backend parallelism was dropped to the number of cores in r284618 to avoid oversubscribing physical cores due to hyperthreading. This updates the documentation to reflect that change. Fixes PR38610. Reviewers: pcc Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D50882 llvm-svn: 340021
* [AArch64] - return address signingLuke Cheeseman2018-08-177-0/+61
| | | | | | | | | | | | | | - 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-172-2/+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-162-2/+11
| | | | 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-162-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Update for LLVM API changeDavid Blaikie2018-08-161-1/+2
| | | | llvm-svn: 339941
* AMDGPU: Correct errors in device tableMatt Arsenault2018-08-161-2/+2
| | | | llvm-svn: 339934
* Update README and Dockerfile to include llvm-proto-fuzzerEmmett Neyman2018-08-162-0/+38
| | | | | | | | | | | | | | Summary: Added commands to Dockerfile to build llvm-proto-fuzzer and the other related tools. Also added a section to the bottom of the README describing what llvm-proto-fuzzer does and how to run it. Reviewers: morehouse, kcc Reviewed By: morehouse Subscribers: cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D50829 llvm-svn: 339933
* [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
* [AST] Store the OwnedTagDecl as a trailing object in ElaboratedType.Bruno Ricci2018-08-162-20/+44
| | | | | | | | | | | | | | The TagDecl *OwnedTagDecl in ElaboratedType is quite commonly null (at least when parsing all of Boost, it is non-null for only about 600 of the 66k ElaboratedType). Therefore we can save a pointer in the common case by storing it as a trailing object, and storing a bit in the bit-fields of Type indicating when the pointer is null. Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D50715 llvm-svn: 339862
* [AST] Pack the unsigned of SubstTemplateTypeParmPackType into TypeBruno Ricci2018-08-162-6/+27
| | | | | | | | | | | The bit-fields of Type have enough space for the member unsigned NumArgs of SubstTemplateTypeParmPackType. Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D50713 llvm-svn: 339861
* [AST] Pack the unsigned of DependentTemplateSpecializationType into TypeBruno Ricci2018-08-162-8/+30
| | | | | | | | | | | The bit-fields of `Type` have enough space for the member `unsigned NumArgs` of `DependentTemplateSpecializationType`. Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D50712 llvm-svn: 339860
* [X86] Remove masking from the 512-bit paddus/psubus builtins. Use a select ↵Craig Topper2018-08-163-70/+40
| | | | | | builtin instead. llvm-svn: 339845
* [X86] Remove masking from the 512-bit padds and psubs builtins. Use select ↵Craig Topper2018-08-163-72/+56
| | | | | | 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-164-0/+28
| | | | | | | | These can be used to print Clang target and effective triple. Differential Revision: https://reviews.llvm.org/D50755 llvm-svn: 339834
* Implementation of nested loops in cxx_loop_protoEmmett Neyman2018-08-153-35/+116
| | | | | | | | | | | | | | Summary: Extended `cxx_loop_proto` to have neste for loops. Modified `loop_proto_to_llvm` and `loop_proto_to_cxx` to handle the new protos. All protos have a set of statements designated as "inner loop" statements and a set of statements designated as "outer loop" statements. Reviewers: morehouse, kcc Reviewed By: morehouse Subscribers: cfe-commits, llvm-commits Differential Revision: https://reviews.llvm.org/D50670 llvm-svn: 339832
* [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-1511-57/+37
| | | | | | | | 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
* Add a newline to SourceLocation dump outputStephen Kelly2018-08-156-7/+8
| | | | | | | | | | | | | | Summary: Migrate callers to print(). dump() should be useful to downstreams and third parties as a debugging aid. Everyone trips up on this and creates confusing output. Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D50661 llvm-svn: 339810
OpenPOWER on IntegriCloud