summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixed failing assert in code completion.Ilya Biryukov2017-07-212-4/+14
| | | | | | | | | | | | | | | | Summary: The code was accessing uninstantiated default argument. This resulted in failing assertion at ParmVarDecl::getDefaultArg(). Reviewers: erikjv, klimek, bkramer, krasimir Reviewed By: krasimir Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D35682 llvm-svn: 308722
* [mips] Add `short_call` to the set of `long_call/far/near` attributesSimon Atanasyan2017-07-214-9/+20
| | | | | | | | MIPS gcc supports `long_call/far/near` attributes only, but other targets have the `short_call` attribut, so let's support it for MIPS for consistency. llvm-svn: 308719
* Fix tblgen error.Richard Trieu2017-07-212-3/+24
| | | | | | | | tblgen couldn't determing a unique name between "long_call" and "far", so it errored out when generating documentation. Copy the documentation, and give an explicit header for "long_call". llvm-svn: 308714
* [Driver] Consider -fno-sanitize=... state when filtering out ↵Petr Hosek2017-07-212-1/+13
| | | | | | | | | | | | | | | | -fsanitize-coverage=... The driver ignores -fsanitize-coverage=... flags when also given -fsanitize=... flags for sanitizer flavors that don't support the coverage runtime. This logic failed to account for subsequent -fno-sanitize=... flags that disable the sanitizer flavors that conflict with -fsanitize-coverage=... flags. Patch by Roland McGrath Differential Revision: https://reviews.llvm.org/D35603 llvm-svn: 308707
* [CMake] Use ABI version 2 for C++ library in FuchsiaPetr Hosek2017-07-211-0/+1
| | | | | | | | | Fuchsia has always been using ABI version 2 but I forgot this option when setting up the cache file for runtimes build. Differential Revision: https://reviews.llvm.org/D35705 llvm-svn: 308705
* [clang-format] Put '/**' and '*/' on own lines in multiline jsdocsKrasimir Georgiev2017-07-205-3/+205
| | | | | | | | | | | | Reviewers: mprobst Reviewed By: mprobst Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D35683 llvm-svn: 308684
* [mips] Add support for -m(no-)local-sdataSimon Dardis2017-07-203-0/+32
| | | | | | | | | | | Teach the driver to support -mlocal-sdata. The backend already matches GCC's default behaviour. Reviewers: atanasyan, slthakur Differential Revision: https://reviews.llvm.org/D35549 llvm-svn: 308683
* [NVPTX] Add lowering of i128 params.Artem Belevich2017-07-202-4/+4
| | | | | | | | | | | | | | | | | The patch adds support of i128 params lowering. The changes are quite trivial to support i128 as a "special case" of integer type. With this patch, we lower i128 params the same way as aggregates of size 16 bytes: .param .b8 _ [16]. Currently, NVPTX can't deal with the 128 bit integers: * in some cases because of failed assertions like ValVTs.size() == OutVals.size() && "Bad return value decomposition" * in other cases emitting PTX with .i128 or .u128 types (which are not valid [1]) [1] http://docs.nvidia.com/cuda/parallel-thread-execution/index.html#fundamental-types Differential Revision: https://reviews.llvm.org/D34555 Patch by: Denys Zariaiev (denys.zariaiev@gmail.com) llvm-svn: 308675
* [CodeGen][mips] Support `long_call/far/near` attributesSimon Atanasyan2017-07-2010-45/+176
| | | | | | | | | | | This patch adds support for the `long_call`, `far`, and `near` attributes for MIPS targets. The `long_call` and `far` attributes are synonyms. All these attributes override `-mlong-calls` / `-mno-long-calls` command line options for particular function. Differential revision: https://reviews.llvm.org/D35479 llvm-svn: 308667
* [clang] Fix handling of "%zd" in scanfAlexander Shaposhnikov2017-07-203-9/+40
| | | | | | | | | | | | | This diff addresses FIXMEs in lib/Analysis/ScanfFormatString.cpp for the case of ssize_t format specifier and adds tests. In particular, this change enables Clang to emit a warning on incorrect using of "%zd"/"%zn". Test plan: make check-all Differential revision: https://reviews.llvm.org/D35652 llvm-svn: 308662
* [Docs] Regenerate the command line option reference.Craig Topper2017-07-201-6/+48
| | | | llvm-svn: 308641
* [OPENMP] Fix DSA processing for member declaration.Alexey Bataev2017-07-2054-139/+147
| | | | | | | | If the member declaration is captured in the OMPCapturedExprDecl, we may loose data-sharing attribute info for this declaration. Patch fixes this bug. llvm-svn: 308629
* Reland "[mips] Teach the driver to accept -m(no-)gpopt."Simon Dardis2017-07-206-0/+66
| | | | | | | | | | | | | | This patch teaches the driver to pass -mgpopt by default to the backend when it is supported, i.e. we are using -mno-abicalls. Reviewers: atanasyan, slthakur Differential Revision: https://reviews.llvm.org/D35548 This version fixes a logic error that generated warnings incorrectly and gets rid of spurious arguments to the backend when -mgpopt is not used. llvm-svn: 308619
* [vfs] Assert that the status is known in equivalent().Benjamin Kramer2017-07-201-0/+1
| | | | | | Otherwise we'd silently compare uninitialized data. llvm-svn: 308604
* clang/module.modulemap: Clang_Diagnostics: Activate "Sema/SemaDiagnostic.h".NAKAMURA Takumi2017-07-201-2/+1
| | | | | | It seems issues were resolved. llvm-svn: 308593
* Revert "[StaticAnalyzer] Completely unrolling specific loops with known ↵Peter Szecsi2017-07-2010-461/+4
| | | | | | | | | | bound option" Revert r308561 and r308558. Clang-ppc64be-linux seems to crash while running the test cases. llvm-svn: 308592
* clang/module.modulemap: Split out Clang_RewriteFrontend from Clang_Rewrite.NAKAMURA Takumi2017-07-201-1/+2
| | | | | FIXME: Both Rewrite(Core) and RewriteFrontend don't cover just under clang/Rewrite. There's no file, though. llvm-svn: 308587
* [AArch64] Produce correct defaultlib directives for windows in MSVC styleMartin Storsjo2017-07-202-1/+19
| | | | | | Differential Revision: https://reviews.llvm.org/D35546 llvm-svn: 308584
* [NFC] Update local variable names to upper-case as per LLVM Coding Standards.Faisal Vali2017-07-201-9/+9
| | | | llvm-svn: 308574
* [StaticAnalyzer] Completely unrolling specific loops with known bound option Peter Szecsi2017-07-203-0/+417
| | | | | | Missing files added to rL308558. llvm-svn: 308561
* This feature allows the analyzer to consider loops to completely unroll. NewPeter Szecsi2017-07-197-4/+44
| | | | | | | | | | | | | | | | requirements/rules (for unrolling) can be added easily via ASTMatchers. The current implementation is hidden behind a flag. Right now the blocks which belong to an unrolled loop are marked by the LoopVisitor which adds them to the ProgramState. Then whenever we encounter a CFGBlock in the processCFGBlockEntrance which is marked then we skip its investigating. That means, it won't be considered to be visited more than the maximal bound for visiting since it won't be checked. Differential Revision: https://reviews.llvm.org/D34260 llvm-svn: 308558
* [X86] Put avx512vpopcntdq in the right spot in the validateCpuSupports ↵Craig Topper2017-07-191-1/+1
| | | | | | | | string switch. The validateCpuSupports switch is in the order of the enum defined in CGBuiltin.cpp and libgcc/compiler-rt. llvm-svn: 308546
* Improve SEMA for attribute-targetErich Keane2017-07-194-13/+41
| | | | | | | | Add more diagnosis for the non-multiversioning case. Differential Revision: https://reviews.llvm.org/D35573 llvm-svn: 308539
* Add isValidCPUName and isValidFeature to TargetInfoErich Keane2017-07-192-95/+233
| | | | | | | These two functions are really useful for implementations of attributes (including attribute-target), so add the functionality. llvm-svn: 308530
* Add AlignedAllocation.h.Akira Hatanaka2017-07-191-0/+44
| | | | | | I forgot to "git add" it in r308496. llvm-svn: 308498
* [Sema] Improve diagnostic message for unavailable C++17 alignedAkira Hatanaka2017-07-194-22/+66
| | | | | | | | | | | | | | | | | | allocation functions. This changes the error message Sema prints when an unavailable C++17 aligned allocation function is selected. Original message: "... possibly unavailable on x86_64-apple-macos10.12" New message: "... only available on macOS 10.13 or newer" This is a follow-up to r306722. rdar://problem/32664169 Differential Revision: https://reviews.llvm.org/D35520 llvm-svn: 308496
* Clear release notes for 6.0.0Hans Wennborg2017-07-191-79/+9
| | | | llvm-svn: 308478
* Bump docs version to 6.0Hans Wennborg2017-07-192-4/+4
| | | | llvm-svn: 308466
* Revert "Reland "[mips] Teach the driver to accept -m(no-)gpopt.""Simon Dardis2017-07-196-69/+0
| | | | | | This reverts r308458. Investigating further buildbot breakage. llvm-svn: 308459
* Reland "[mips] Teach the driver to accept -m(no-)gpopt."Simon Dardis2017-07-196-0/+69
| | | | | | | | | | | | | This patch teaches the driver to pass -mgpopt by default to the backend when it is supported, i.e. we are using -mno-abicalls. Reviewers: atanasyan, slthakur Differential Revision: https://reviews.llvm.org/D35548 This version fixes a logic error that generated warnings incorrectly. llvm-svn: 308458
* Revert r308441 "Recommit r308327: Add a warning for missing '#pragma pack ↵Hans Wennborg2017-07-1922-259/+30
| | | | | | | | | | | | | | | | | | | | | (pop)' and suspicious uses of '#pragma pack' in included files" This seems to have broken the sanitizer-x86_64-linux buildbot. Reverting until it's fixed, especially since this landed just before the 5.0 branch. > This commit adds a new -Wpragma-pack warning. It warns in the following cases: > > - When a translation unit is missing terminating #pragma pack (pop) directives. > - When entering an included file if the current alignment value as determined > by '#pragma pack' directives is different from the default alignment value. > - When leaving an included file that changed the state of the current alignment > value. > > rdar://10184173 > > Differential Revision: https://reviews.llvm.org/D35484 llvm-svn: 308455
* Recommit r308327: Add a warning for missing '#pragma pack (pop)'Alex Lorenz2017-07-1922-30/+259
| | | | | | | | | | | | | | | | | | and suspicious uses of '#pragma pack' in included files This commit adds a new -Wpragma-pack warning. It warns in the following cases: - When a translation unit is missing terminating #pragma pack (pop) directives. - When entering an included file if the current alignment value as determined by '#pragma pack' directives is different from the default alignment value. - When leaving an included file that changed the state of the current alignment value. rdar://10184173 Differential Revision: https://reviews.llvm.org/D35484 llvm-svn: 308441
* Fix compilation problem introduced in r308433Erik Verbruggen2017-07-191-1/+1
| | | | llvm-svn: 308438
* Revert "[mips] Teach the driver to accept -m(no-)gpopt."Simon Dardis2017-07-196-68/+0
| | | | | | Revert r308431 and r308432, these caused broke some buildbots. llvm-svn: 308436
* Add default values for function parameter chunksErik Verbruggen2017-07-194-16/+69
| | | | | | | | | | | Append optional chunks with their default values. For example: before - "int i", after - "int i = 10" Patch by Ivan Donchevskii! Differential Revision: https://reviews.llvm.org/D33644 llvm-svn: 308433
* [mips] Add warning test for -mgpopt option.Simon Dardis2017-07-191-0/+6
| | | | llvm-svn: 308432
* [mips] Teach the driver to accept -m(no-)gpopt.Simon Dardis2017-07-195-0/+62
| | | | | | | | | | | This patch teaches the driver to pass -mgpopt by default to the backend when it is supported, i.e. we are using -mno-abicalls. Reviewers: atanasyan, slthakur Differential Revision: https://reviews.llvm.org/D35548 llvm-svn: 308431
* Update clang-cl options in the users manualHans Wennborg2017-07-191-0/+47
| | | | llvm-svn: 308427
* [analyzer] Add annotation attribute to trust retain count implementationDevin Coughlin2017-07-192-5/+86
| | | | | | | | | | | | | | | | | Add support to the retain-count checker for an annotation indicating that a function's implementation should be trusted by the retain count checker. Functions with these attributes will not be inlined and the arguments will be treating as escaping. Adding this annotation avoids spurious diagnostics when the implementation of a reference counting operation is visible but the analyzer can't reason precisely about the ref count. Patch by Malhar Thakkar! Differential Revision: https://reviews.llvm.org/D34937 llvm-svn: 308416
* [CMake] Build runtimes for Fuchsia targetsPetr Hosek2017-07-192-11/+30
| | | | | | | | This relies on the multi-target runtimes build support. Differential Revision: https://reviews.llvm.org/D32817 llvm-svn: 308412
* [scan-build-py] Patch to fix "-analyzer-config" optionPetr Hosek2017-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | I noticed that when I use "-analyze-config" option in scan-build-py, it behaves differently from original perl based scan-build. For example, command: $ scan-build -analyzer-config ipa=basic-inlining make Will work without any issues on perl version of scan-build. But on scan-build-py it will throw an error message "error reading 'ipa=basic-inlining'". After debugging, it turns out that the scan-build-py does not put "-analyzer-config" flag in front of the analyzer config flags (in this case is the "ipa=basic-inlining") in the final clang command line. This patch fixes this issue. Patch by Haowei Wu Differential Revision: https://reviews.llvm.org/D34489 llvm-svn: 308401
* Update for LLVM IR metadata changes (DIImportedEntity now needs a DIFile).Adrian Prantl2017-07-1910-21/+58
| | | | | | | | | <rdar://problem/33357889> https://bugs.llvm.org/show_bug.cgi?id=33822 Differential Revision: https://reviews.llvm.org/D35583 llvm-svn: 308399
* Debug Info: Set the MainFileName when generating -gmodules debug info for PCM.Adrian Prantl2017-07-182-2/+7
| | | | | | | Previously it was uninitialized and thus always defaulted to "<stdin>". This is mostly a cosmetic change that helps making the debug info more readable. llvm-svn: 308397
* [Driver] Always use -z rodynamic for FuchsiaPetr Hosek2017-07-183-0/+5
| | | | | | | | Fuchsia uses read-only .dynamic section. Differential Revision: https://reviews.llvm.org/D35582 llvm-svn: 308390
* Convert attribute 'target' parsing from a 'pair' to a 'struct' to make ↵Erich Keane2017-07-183-13/+24
| | | | | | | | | | | | | | further improvements easier Convert attribute 'target' parsing from a 'pair' to a 'struct' to make further improvements easier The attribute 'target' parse function previously returned a pair. Convert this to a 'pair' in order to add more functionality, and improve usability. Differential Revision: https://reviews.llvm.org/D35574 llvm-svn: 308357
* [Sema] NFC: Move all availability checking code to SemaDeclAttr.cppErik Pilkington2017-07-183-106/+102
| | | | | | Previously, this was awkwardly split up between SemaExpr.cpp. llvm-svn: 308356
* [OPENMP] Initial support for 'task_reduction' clause.Alexey Bataev2017-07-1821-60/+929
| | | | | | Parsing/sema analysis of the 'task_reduction' clause. llvm-svn: 308352
* Add GCC's noexcept-type alias for c++1z-compat-manglingRaphael Isemann2017-07-182-0/+3
| | | | | | | | | | | | | | Summary: GCC has named this `-Wnoexcept-type`, so let's add an alias to stay compatible with the GCC flags. Reviewers: rsmith, dexonsmith Reviewed By: dexonsmith Subscribers: cfe-commits, karies, v.g.vassilev, ahatanak Differential Revision: https://reviews.llvm.org/D34439 llvm-svn: 308340
* Don't set TUScope to null when generating a module in incremental processing ↵Raphael Isemann2017-07-181-1/+2
| | | | | | | | | | | | | | | | mode. Summary: When in incremental processing mode, we should never set `TUScope` to a nullptr otherwise any future lookups fail. We already have similar checks in the rest of the code, but we never hit this one because so far we didn't try to generate a module from the AST that Cling generates. Reviewers: rsmith, v.g.vassilev Reviewed By: v.g.vassilev Subscribers: cfe-commits, v.g.vassilev Differential Revision: https://reviews.llvm.org/D35536 llvm-svn: 308333
* Revert r308327Alex Lorenz2017-07-1821-253/+30
| | | | | | I forgot to test clang-tools-extra which is now failing. llvm-svn: 308328
OpenPOWER on IntegriCloud