summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "Allow newlines in AST Matchers in clang-query files"Stephen Kelly2019-12-263-208/+57
| | | | This reverts commit 6a3ecf4dc7ec299394e71b3124df2b3a34ed4ac3.
* Allow newlines in AST Matchers in clang-query filesStephen Kelly2019-12-263-57/+208
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71842
* [OpenMP][NFCI] Use the libFrontend ProcBindKind in ClangJohannes Doerfert2019-12-2614-74/+36
| | | | | | | | | | | | This removes the OpenMPProcBindClauseKind enum in favor of llvm::omp::ProcBindKind which lives in OpenMPConstants.h and was introduced in D70109. No change in behavior is expected. Reviewed By: JonChesterfield Differential Revision: https://reviews.llvm.org/D70289
* [clang][test] Minor fixes in testcase absolute-paths-symlinks.cKarl-Johan Karlsson2019-12-261-3/+5
| | | | This is a follow up commit to address post-commit comment in D70527.
* [OpenMP][IR-Builder] Introduce the finalization stackJohannes Doerfert2019-12-251-15/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a permanent and generic solution to the problem of variable finalization (destructors, lastprivate, ...), this patch introduces the finalization stack. The objects on the stack describe (1) the (structured) regions the OpenMP-IR-Builder is currently constructing, (2) if these are cancellable, and (3) the callback that will perform the finalization (=cleanup) when necessary. As the finalization can be necessary multiple times, at different source locations, the callback takes the position at which code is currently generated. This position will also encode the destination of the "region exit" block *iff* the finalization call was issues for a region generated by the OpenMPIRBuilder. For regions generated through the old Clang OpenMP code geneneration, the "region exit" is determined by Clang inside the finalization call instead (see getOMPCancelDestination). As a first user, the parallel + cancel barrier interaction is changed. In contrast to the temporary solution before, the barrier generation in Clang does not need to be aware of the "CancelDestination" block. Instead, the finalization callback is and, as described above, later even that one does not need to be. D70109 will be updated to use this scheme. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D70258
* Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" ↵Fangrui Song2019-12-241-1/+1
| | | | as cleanups after D56351
* [OPENMP]Add extra checks and initialization for clause modifier.Alexey Bataev2019-12-242-2/+15
| | | | | Added initialization of the extra modifier to silence sanitizer. Added extra checks to avoid such trouble in future.
* [OPENMP][DOCS]Update status of OpenMP 5.0 features, NFC.Alexey Bataev2019-12-241-2/+2
|
* [OPENMP50]Basic support for conditional lastprivate.Alexey Bataev2019-12-2447-153/+434
| | | | Added parsing/sema checks for conditional lastprivates.
* [NFC] Remove some dead code from CGBuiltin.cpp.Kevin P. Neal2019-12-241-14/+0
|
* [clang] [ast] CXXRecordDecl::getVisibleConversionFunctions() could be constWhisperity2019-12-242-13/+12
| | | | | | | | | | The function and its called static helpers don't modify the received CXXRecordDecl arguments at all as the method's result is put into an output parameter. Thus they can be const which allows for neatly grabbing the conversion methods in a context where we only have a const ASTUnit at hand. Differential Revision: https://reviews.llvm.org/D71805
* [CFG] Fix an assertion failure with static initializersGabor Horvath2019-12-233-14/+39
| | | | | | | | | | | | | The CFGBlock::getLastCondition was not prepared for static initializer branches. This patch also revamps CFG unit tests. Earlier the lifetime of the AST was smaller than the CFG. So all the AST pointers within the CFG blocks were dangling. This was OK, since none of the tests dereferenced those pointers. This was, however, a timed bomb. There were patches in the past that were reverted partially due to this problem. Differential revision: https://reviews.llvm.org/D71791
* ASTContext: fix declaration of ParsedTargetAttr [-Wmismatched-tags] after D68627Fangrui Song2019-12-231-1/+1
|
* [Sema][X86] Consider target attribute into the checks in validateOutputSize ↵Craig Topper2019-12-2310-84/+146
| | | | | | | | | | | | | and validateInputSize. The validateOutputSize and validateInputSize need to check whether AVX or AVX512 are enabled. But this can be affected by the target attribute so we need to factor that in. This patch moves some of the code from CodeGen to create an appropriate feature map that we can pass to the function. Differential Revision: https://reviews.llvm.org/D68627
* [OPENMP50]Codegen for nontemporal clause.Alexey Bataev2019-12-2320-115/+339
| | | | | | | | | | | | | | | | Summary: Basic codegen for the declarations marked as nontemporal. Also, if the base declaration in the member expression is marked as nontemporal, lvalue for member decl access inherits nonteporal flag from the base lvalue. Reviewers: rjmccall, hfinkel, jdoerfert Subscribers: guansong, arphaman, caomhin, kkwli0, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71708
* [NFC] Move OptionUtils from Basic to DriverYaxun (Sam) Liu2019-12-235-7/+6
| | | | Differential Revision: https://reviews.llvm.org/D71802
* [OpenCL] Add atomic builtin functionsSven van Haastregt2019-12-232-2/+87
| | | | | | Add atomic builtin functions from the OpenCL C specification. Patch by Pierre Gondois and Sven van Haastregt.
* [ItaniumCXXABI] Don't mark an extern_weak init function as dso_local on windowsMartin Storsjö2019-12-232-1/+12
| | | | | | | | | Since 6bf108d77a3c, we try to not mark extern_weak symbols as dso_local, to allow using COFF stubs for references to those symbols (as the symbol may be missing, resolving to an absolute address zero, outside of the current DSO). Differential Revision: https://reviews.llvm.org/D71716
* [Concepts] Constrained partial specializations and function overloads.Saar Raz2019-12-2318-102/+1026
| | | | | | | Added support for constraint satisfaction checking and partial ordering of constraints in constrained partial specialization and function template overloads. Re-commit after fixing another crash (added regression test). Differential Revision: https://reviews.llvm.org/D41910
* [AST] Add missing MultiplexConsumer::CompleteExternalDeclarationReid Kleckner2019-12-222-0/+6
|
* reland "[DebugInfo] Support to emit debugInfo for extern variables"Yonghong Song2019-12-2216-2/+160
| | | | | | | | | | | | | Commit d77ae1552fc21a9f3877f3ed7e13d631f517c825 ("[DebugInfo] Support to emit debugInfo for extern variables") added deebugInfo for extern variables for BPF target. The commit is reverted by 891e25b02d760d0de18c7d46947913b3166047e7 as the committed tests using %clang instead of %clang_cc1 causing test failed in certain scenarios as reported by Reid Kleckner. This patch fixed the tests by using %clang_cc1. Differential Revision: https://reviews.llvm.org/D71818
* Revert "[DebugInfo] Support to emit debugInfo for extern variables"Reid Kleckner2019-12-2216-164/+2
| | | | | | | This reverts commit d77ae1552fc21a9f3877f3ed7e13d631f517c825. The tests committed along with this change do not pass, and should be changed to use %clang_cc1.
* Revert "[Concepts] Constrained partial specializations and function overloads."Reid Kleckner2019-12-2218-1021/+102
| | | | | | This reverts commit d3f5769d5e93b30d4a8b4696381d5e4a304992fa. Causes crashes on Chromium. Have reproducer, will reduce and send along.
* [Analyzer] Fixes -Wrange-loop-analysis warningsMark de Wever2019-12-223-5/+6
| | | | | | This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D71809
* [ms] [X86] Use "P" modifier on operands to call instructions in inline X86 ↵Eric Astor2019-12-224-4/+8
| | | | | | | | | | | | | | | | | | | | assembly. Summary: This is documented as the appropriate template modifier for call operands. Fixes PR44272, and adds a regression test. Also adds support for operand modifiers in Intel-style inline assembly. Reviewers: rnk Reviewed By: rnk Subscribers: merge_guards_bot, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D71677
* [Sema] SequenceChecker: C++17 sequencing rules for built-in operators <<, ↵Bruno Ricci2019-12-224-48/+164
| | | | | | | | | | | >>, .*, ->*, =, op= Implement the C++17 sequencing rules for the built-in operators <<, >>, .*, ->*, = and op=. Differential Revision: https://reviews.llvm.org/D58297 Reviewed By: rsmith
* [Sema] SequenceChecker: Fix handling of operator ||, && and ?:Bruno Ricci2019-12-223-46/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | The current handling of the operators ||, && and ?: has a number of false positive and false negative. The issues for operator || and && are: 1. We need to add sequencing regions for the LHS and RHS as is done for the comma operator. Not doing so causes false positives in expressions like `((a++, false) || (a++, false))` (from PR39779, see PR22197 for another example). 2. In the current implementation when the evaluation of the LHS fails, the RHS is added to a worklist to be processed later. This results in false negatives in expressions like `(a && a++) + a`. Fix these issues by introducing sequencing regions for the LHS and RHS, and by not deferring the visitation of the RHS. The issues with the ternary operator ?: are similar, with the added twist that we should not warn on expressions like `(x ? y += 1 : y += 2)` since exactly one of the 2nd and 3rd expression is going to be evaluated, but we should still warn on expressions like `(x ? y += 1 : y += 2) = y`. Differential Revision: https://reviews.llvm.org/D57747 Reviewed By: rsmith
* [Sema] SequenceChecker: Add some comments + related small NFCsBruno Ricci2019-12-222-74/+123
| | | | | | | | | | | | NFCs factored out of the following patches: - Change all of the `Expr *` to `const Expr *` in SequenceChecker for const-correctness. SequenceChecker should not modify AST nodes. - Add some comments. - clang-format Differential Revision: https://reviews.llvm.org/D57659 Reviewed By: xbolva00
* [Concepts] Constrained partial specializations and function overloads.Saar Raz2019-12-2218-102/+1021
| | | | | | | Added support for constraint satisfaction checking and partial ordering of constraints in constrained partial specialization and function template overloads. Re-commit after fixing some crashes and warnings. Differential Revision: https://reviews.llvm.org/D41910
* [Driver] Allow -mnop-mcount for SystemZ and -mfentry for X86 and SystemZFangrui Song2019-12-223-12/+34
| | | | | | | | | | | | | | | | | | | | | | | gcc/config/{i386,s390} support -mnop-mcount. We currently only support -mnop-mcount for SystemZ. The function attribute "mnop-mcount" is ignored on other targets. gcc/config/{i386,s390} support -mfentry. We currently only support -mfentry for X86 and SystemZ. TargetOpcode::FENTRY_CALL is not handled on other targets. % clang -target aarch64 -pg -mfentry a.c -c fatal error: error in backend: Not supported instr: <MCInst 21> -mfentry, -mrecord-mcount, and -mnop-mcount were invented for Linux ftrace. Linux uses $(call cc-option-yn,-mrecord-mcount) to detect if the specific feature is available. Reject unsupported features so that Linux build system will not wrongly consider them available and cause build/runtime failures. Note, GCC has stricter checks that we do not implement, e.g. -fpic/-fpie -fnop-mcount is not allowed on x86, -fpic/-fpie -mfentry is not allowed on x86-32.
* [Driver] Verify -mrecord-mcount in Driver, instead of CodeGen after D71627Fangrui Song2019-12-215-16/+17
| | | | | | | | | | | GCC's x86 and s390 ports support -mrecord-mcount. Other ports reject the option. aarch64-linux-gnu-gcc: error: unrecognized command line option ‘-mrecord-mcount’ Allowing this option can cause failures when building Linux kernel for aarch64, powerpc64, etc, which will think the feature is available if the clang command returns 0.
* [NFC] Separate getLastArgIntValue to BasicYaxun (Sam) Liu2019-12-215-56/+108
| | | | | | | | getLastArgIntValue is a useful utility function to get command line argument as an integer. Currently it is in Frontend so that it can only be used by clang -cc1. Move it to basic so that it can also be used by clang driver. Differential Revision: https://reviews.llvm.org/D71080
* [analyzer] exploded-graph-rewriter: Fix string encodings in python3.Artem Dergachev2019-12-211-1/+5
| | | | | | | | Makes sure that the script works fine both in python2 and python3. Patch by Pavel Samolysov! Differential Revision: https://reviews.llvm.org/D71746
* [NFC] test commit revertedStepan Dyatkovskiy2019-12-211-1/+0
|
* [NFC] test commitStepan Dyatkovskiy2019-12-211-0/+1
|
* Fix `-Wunused-variable` warning. NFC.Michael Liao2019-12-211-1/+1
|
* [Analyzer] Use a reference in a range-based forMark de Wever2019-12-213-15/+15
| | | | | | | | This avoids unneeded copies when using a range-based for loops. This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D70869
* [Wdocumentation] Implement \anchorMark de Wever2019-12-2115-10/+80
| | | | Differential revision: https://reviews.llvm.org/D69223
* Add missing `REQUIRES: hexagon-registered-target`David Zarzycki2019-12-211-0/+1
| | | | | After d567b0ba841d4b6f4b0d906da350a3bb2b2f769f, the test suite no longer passes if hexagon is disabled.
* Customize simplified dumping and matching of LambdaExprStephen Kelly2019-12-214-10/+223
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71680
* features.html: Remove some old infoSylvestre Ledru2019-12-211-3/+0
|
* clang is now under the apache2 licenseSylvestre Ledru2019-12-212-10/+9
|
* Remove a gcc 4.9 comparison as it doesn't make senseSylvestre Ledru2019-12-211-8/+2
|
* fix a doc typo to cycle botsNico Weber2019-12-201-1/+1
|
* Revert "Customize simplified dumping and matching of LambdaExpr"Stephen Kelly2019-12-204-204/+4
| | | | This reverts commit 494b1318ca77927e919bbf9a61749a58553d738c.
* Customize simplified dumping and matching of LambdaExprStephen Kelly2019-12-204-4/+204
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71680
* Rename DW_AT_LLVM_isysroot to DW_AT_LLVM_sysrootAdrian Prantl2019-12-201-1/+1
| | | | | | | | | | | | This is a purely cosmetic change that is NFC in terms of the binary output. I bugs me that I called the attribute DW_AT_LLVM_isysroot since the "i" is an artifact of GCC command line option syntax (-isysroot is in the category of -i options) and doesn't carry any useful information otherwise. This attribute only appears in Clang module debug info. Differential Revision: https://reviews.llvm.org/D71722
* [analyzer] Add path notes to FuchsiaHandleCheck.Gabor Horvath2019-12-203-12/+126
| | | | Differential Revision: https://reviews.llvm.org/D70725
* [analyzer] Add Fuchsia Handle checkerGabor Horvath2019-12-207-0/+830
| | | | | | | The checker can diagnose handle use after releases, double releases, and handle leaks. Differential Revision: https://reviews.llvm.org/D70470
* Avoid unsupported LLD optionsSid Manning2019-12-203-3/+30
| | | | Differential Revision: https://reviews.llvm.org/D70919
OpenPOWER on IntegriCloud