summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308433 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips] Add warning test for -mgpopt option.Simon Dardis2017-07-191-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308432 91177308-0d34-0410-b5e6-96231b3b80d8
* [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308431 91177308-0d34-0410-b5e6-96231b3b80d8
* Update clang-cl options in the users manualHans Wennborg2017-07-191-0/+47
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308427 91177308-0d34-0410-b5e6-96231b3b80d8
* [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308416 91177308-0d34-0410-b5e6-96231b3b80d8
* [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308412 91177308-0d34-0410-b5e6-96231b3b80d8
* [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308401 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308399 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308397 91177308-0d34-0410-b5e6-96231b3b80d8
* [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308390 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308357 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sema] NFC: Move all availability checking code to SemaDeclAttr.cppErik Pilkington2017-07-183-106/+102
| | | | | | Previously, this was awkwardly split up between SemaExpr.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308356 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Initial support for 'task_reduction' clause.Alexey Bataev2017-07-1821-60/+929
| | | | | | Parsing/sema analysis of the 'task_reduction' clause. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308352 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308340 91177308-0d34-0410-b5e6-96231b3b80d8
* 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308333 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r308327Alex Lorenz2017-07-1821-253/+30
| | | | | | | I forgot to test clang-tools-extra which is now failing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308328 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a warning for missing '#pragma pack (pop)' and suspicious usesAlex Lorenz2017-07-1821-30/+253
| | | | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308327 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Generalization of sema analysis of reduction-based clauses,Alexey Bataev2017-07-181-132/+172
| | | | | | NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308317 91177308-0d34-0410-b5e6-96231b3b80d8
* CodeGen: Insert addr space cast for automatic/temp var at right positionYaxun Liu2017-07-182-6/+30
| | | | | | | | | | | | The uses of alloca may be in different blocks other than the block containing the alloca. Therefore if the alloca addr space is non-zero and it needs to be casted to default address space, the cast needs to be inserted in the same BB as the alloca insted of the current builder insert point since the current insert point may be in a different BB. Differential Revision: https://reviews.llvm.org/D35438 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308313 91177308-0d34-0410-b5e6-96231b3b80d8
* clang-format: [JS] Correctly format JavaScript imports with long module pathsMartin Probst2017-07-183-1/+29
| | | | | | | | | | | | | | | | | | | | | | | Currently the `UnwrappedLineParser` fails to correctly unwrap JavaScript imports where the module path is not on the same line as the `from` keyword. For example: import {A} from 'some/path/longer/than/column/limit/module.js';``` This causes issues when in the middle a list of imports because the formatter thinks it has reached the end of the imports, and therefore will not sort any imports lower in the list. The formatter will, however, split the `from` keyword and the module path if the path exceeds the column limit, which triggers the issue the next time the file is formatted. Patch originally by Jared Neil - thanks! Differential Revision: https://reviews.llvm.org/D34920 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308306 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Move CLANG_ENABLE_(ARCMT|OBJC_REWRITER|STATIC_ANALYZER) into ↵NAKAMURA Takumi2017-07-187-5/+11
| | | | | | | | | | | | | | clang/Config/config.h. LLVM_ENABLE_MODULES is sensitive of -D. Move them into config.h. FIXME: It'd be better that they are #cmakedefine01 rather than #cmakedefine. (#if FOO rather than #if defined(FOO)) Then we can find missing #include "clang/Config/config.h" in the future. Differential Revision: https://reviews.llvm.org/D35527 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308277 91177308-0d34-0410-b5e6-96231b3b80d8
* [Index] Prevent canonical decl becoming nullptrKrasimir Georgiev2017-07-182-2/+8
| | | | | | | | | | | | | | | | | | Summary: This patch prevents getCanonicalDecl returning nullptr in case it finds a canonical TemplateDeclaration with no attached TemplatedDecl. Found by running the indexer over a version of the standard library deep inside a template metaprogramming mess. Reviewers: klimek, vsk Reviewed By: vsk Subscribers: vsk, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D35212 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308269 91177308-0d34-0410-b5e6-96231b3b80d8
* Also add the option -no-pie (like -nopie)Sylvestre Ledru2017-07-182-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: For example, this option is expected by ghc (haskell compiler). Currently, building with ghc will fail with: ``` clang: error: unknown argument: '-no-pie' `gcc' failed in phase `Linker'. (Exit code: 1) . /usr/share/haskell-devscripts/Dh_Haskell.sh && \ configure_recipe ``` This won't do anything (but won't fail with an error) Reviewers: rafael, joerg Reviewed By: joerg Subscribers: joerg, cfe-commits Differential Revision: https://reviews.llvm.org/D35462 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308268 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Added extended tests on metadata generation for half data type and ↵Egor Churaev2017-07-181-9/+28
| | | | | | | | | | | | | | arrays. Reviewers: Anastasia Reviewed By: Anastasia Subscribers: bader, cfe-commits, yaxunl Differential Revision: https://reviews.llvm.org/D35000 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308266 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Pacify windows buildbots, NFC.Alexey Bataev2017-07-182-74/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308243 91177308-0d34-0410-b5e6-96231b3b80d8
* [analyzer] Add missing documentation for static analyzer checkersDevin Coughlin2017-07-183-151/+456
| | | | | | | | | | | Some checks did not have documentation in the www/analyzer/ folder and also some alpha checks became non-alpha. Patch by Dominik Szabó! Differential Revision: https://reviews.llvm.org/D33645 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308242 91177308-0d34-0410-b5e6-96231b3b80d8
* [COFF, ARM64] Set the data type widths and the data layout stringMandeep Singh Grang2017-07-172-1/+102
| | | | | | | | | | | | | | Summary: COFF ARM64 is LLP64 platform. So int is 4 bytes, long is 4 bytes and long long is 8 bytes. Reviewers: compnerd, ruiu, rnk, efriedma Reviewed By: compnerd, efriedma Subscribers: efriedma, javed.absar, cfe-commits, aemerson, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D34859 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308222 91177308-0d34-0410-b5e6-96231b3b80d8
* [AArch64] Add support for __builtin_ms_va_list on aarch64Martin Storsjo2017-07-1719-54/+138
| | | | | | | | | | | Move builtins from the x86 specific scope into the global scope. Their use is still limited to x86_64 and aarch64 though. This allows wine on aarch64 to properly handle variadic functions. Differential Revision: https://reviews.llvm.org/D34475 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308218 91177308-0d34-0410-b5e6-96231b3b80d8
* Update use of llvm::CallingConv:X86_64_Win64 after LLVM commit r308208Martin Storsjo2017-07-173-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308209 91177308-0d34-0410-b5e6-96231b3b80d8
* [Basic] Detect Git submodule version in CMakeBrian Gesiak2017-07-171-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When searching for Git version control information, libBasic's CMake checks for the path '.git/logs/HEAD'. However, when LLVM is included as a Git submodule, this path does not exist. Instead, it contains a '.git' file with the following: ``` gitdir: ../../.git/modules/external/llvm ``` Where '../..' is the relative path to the root repository that contains the LLVM Git submodule. Because of this discrepancy, `clang --version` does not output source control information if built from a Git submodule. To fix, check whether '.git' is a directory or a file. If it's a directory, simply use the '.git/logs/HEAD' path. If it's a file, read it and check for the tell-tale sign of a Git submodule: the text "gitdir:". If it exists, follow that path and use the 'logs/HEAD' at that location instead. This allows not only the correct revision information to be retrieved, but also uses a file that will change with each source control revision. Test Plan: 1. Before applying this change, build Clang as a Git submodule in a repository that places it in external/clang, and confirm no revision information is output when `clang --version` is invoked (just "clang 5.0.0" is output, no Git hashes). 2. Apply these changes and build Clang as a Git repository nested under llvm/tools/clang, and confirm that `clang --version` displays correct version information. 3. Apply these changes and build Clang as a Git submodule using the structure described in (1), and confirm version control information is output as in (2). Reviewers: jordan_rose, beanz, probinson Reviewed By: jordan_rose Subscribers: chapuni, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D34955 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308205 91177308-0d34-0410-b5e6-96231b3b80d8
* [SystemZ] Add support for IBM z14 processor (3/3)Ulrich Weigand2017-07-175-43/+2353
| | | | | | | | | | | | | | | This patch updates the vecintrin.h header file to provide the new set of high-level vector built-in functions. This matches the updated definition implemented by other compilers for the platform, indicated by the pre-defined macro __VEC__ == 10302. Note that some of the new functions (notably those involving the vector float data type) are only available with -march=z14 (indicated by __ARCH__ == 12). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308199 91177308-0d34-0410-b5e6-96231b3b80d8
* [SystemZ] Add support for IBM z14 processor (2/3)Ulrich Weigand2017-07-175-4/+411
| | | | | | | | | | | | This patch extends the -fzvector language feature to enable the new "vector float" data type when compiling at -march=z14. This matches the updated extension definition implemented by other compilers for the platform, which is indicated to applications by pre-defining __VEC__ to 10302 (instead of 10301). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308198 91177308-0d34-0410-b5e6-96231b3b80d8
* [SystemZ] Add support for IBM z14 processor (1/3)Ulrich Weigand2017-07-1711-3/+366
| | | | | | | | | | | | | This patch series adds support for the IBM z14 processor. This part includes: - Basic support for the new processor and its features. - Support for low-level builtins mapped to new LLVM intrinsics. Support for the -fzvector extension to vector float and the new high-level vector intrinsics is provided by separate patches. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308197 91177308-0d34-0410-b5e6-96231b3b80d8
* [clang] Remove redundant check-prefix=CHECK from tests. NFC.Mandeep Singh Grang2017-07-178-9/+9
| | | | | | | | | | | | Reviewers: t.p.northover, mstorsjo, rsmith, mcrosier Reviewed By: mstorsjo, mcrosier Subscribers: mcrosier, javed.absar, cfe-commits Differential Revision: https://reviews.llvm.org/D35465 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308192 91177308-0d34-0410-b5e6-96231b3b80d8
* [NFC] Refactor the Preprocessor function that handles Macro definitions and ↵Faisal Vali2017-07-1714-104/+134
| | | | | | | | | | | | | | | | | rename Arguments to Parameters in Macro Definitions. - Extracted the reading of the tokens out into a separate function. - Replace 'Argument' with 'Parameter' when referring to the identifiers of the macro definition (as opposed to the supplied arguments - MacroArgs - during the macro invocation). This is in preparation for submitting patches for review to implement __VA_OPT__ which will otherwise just keep lengthening the HandleDefineDirective function and making it less comprehensible. I will also directly update some extra clang tooling that is broken by the change from Argument to Parameter. Hopefully the bots will stay appeased. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308190 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix dereference of pointers in throw statements.Manuel Klimek2017-07-172-1/+3
| | | | | | | | | | | | Before: throw * x; After: throw *x; Patch by Erik Uhlmann. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308185 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Fix reduction combiner testAlexey Bataev2017-07-172-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308183 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Further fixes of the reduction codegen testsAlexey Bataev2017-07-172-140/+140
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308182 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Further test fixes.Alexey Bataev2017-07-172-116/+116
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308178 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Rework tests to pacify buildbots.Alexey Bataev2017-07-172-6/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308176 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Codegen for reduction clauses in 'taskloop' directives.Alexey Bataev2017-07-1716-54/+1066
| | | | | | Adds codegen for taskloop-based directives. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308174 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert changes from my previous refactoring - will need to fix dependencies ↵Faisal Vali2017-07-1714-134/+104
| | | | | | | | | in clang's extra tooling (such as clang-tidy etc.). Sorry about that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308158 91177308-0d34-0410-b5e6-96231b3b80d8
* [NFC] Refactor the Preprocessor function that handles Macro definitions and ↵Faisal Vali2017-07-1714-104/+134
| | | | | | | | | | | | | | rename Arguments to Parameters in Macro Definitions. - Extracted the reading of the tokens out into a separate function. - Replace 'Argument' with 'Parameter' when referring to the identifiers of the macro definition (as opposed to the supplied arguments - MacroArgs - during the macro invocation). This is in preparation for submitting patches for review to implement __VA_OPT__ which will otherwise just keep lengthening the HandleDefineDirective function and making it less comprehensible. Thanks! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308157 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable TLS support on OpenBSD.Brad Smith2017-07-171-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308156 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable TLS support on OpenBSD, but default to the emulatated TLS model.Brad Smith2017-07-173-6/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308155 91177308-0d34-0410-b5e6-96231b3b80d8
* [Bash-autocompletion] Add support for -W<warning> and -Wno<warning>Yuka Takahashi2017-07-164-0/+31
| | | | | | | | | | Summary: `-W[tab]` will autocomplete warnings defined in this link: https://clang.llvm.org/docs/DiagnosticsReference.html#wweak-vtables Differential Revision: https://reviews.llvm.org/D35447 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308139 91177308-0d34-0410-b5e6-96231b3b80d8
* [c++2a] Add option -std=c++2a to enable support for potential/transitional ↵Faisal Vali2017-07-168-6/+54
| | | | | | | | | | | C++2a features - as usual C++2a implies all the C++'s that came before it. Thank you Aaron for the feedback here: https://reviews.llvm.org/D35454 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308118 91177308-0d34-0410-b5e6-96231b3b80d8
* [cxx_status] Fix typos.Richard Smith2017-07-151-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308101 91177308-0d34-0410-b5e6-96231b3b80d8
* [cxx_status] Add approved Toronto WG21 motions.Richard Smith2017-07-151-10/+71
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308099 91177308-0d34-0410-b5e6-96231b3b80d8
* Use ARC parsing rules for ns_returns_retained in MRC so that code canJohn McCall2017-07-159-47/+107
| | | | | | | | be shared without warnings. Build AttributedTypes to leave breadcrumbs for tools like the static analyzer. Warn about attempting to use the attribute with incompatible return types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@308092 91177308-0d34-0410-b5e6-96231b3b80d8