summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Use scope qualifiers in Clang's tblgen backends to get usefulJohn McCall2019-10-0111-64/+37
| | | | | | redeclaration checking. NFC. llvm-svn: 373406
* [clang][OpenMP][NFC] #include GlobalDecl.h to avoid incomplete class typeJordan Rupprecht2019-10-011-1/+1
| | | | llvm-svn: 373400
* CGVTables - silence static analyzer getAs<FunctionProtoType> null ↵Simon Pilgrim2019-10-011-3/+2
| | | | | | | | dereference warnings. NFCI. The static analyzer is warning about potential null dereferences, but we should be able to use castAs<FunctionProtoType> directly and if not assert will fire for us. llvm-svn: 373398
* CGExprAgg - remove duplicate code. NFCI.Simon Pilgrim2019-10-011-1/+1
| | | | | | Remove duplicate getAs<> call, avoiding a clang static analyzer null dereference warning. llvm-svn: 373396
* [clang-format] [PR43372] - clang-format shows replacements in DOS files when ↵Paul Hoad2019-10-013-3/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | no replacement is needed Summary: This is a patch to fix PR43372 (https://bugs.llvm.org/show_bug.cgi?id=43372) - clang-format can't format file with includes, ( which really keep providing replacements for already sorted headers.) A similar issue was addressed by @krasimir in {D60199}, however, this seemingly only prevented the issue when the files being formatted did not contain windows line endings (\r\n) It's possible this is related to https://twitter.com/StephanTLavavej/status/1176722938243895296 given who @STL_MSFT works for! As people often used the existence of replacements to determine if a file needs clang-formatting, this is probably pretty important for windows users There may be a better way of comparing 2 strings and ignoring \r (which appear in both Results and Code), I couldn't choose between this idiom or the copy_if approach, but I'm happy to change it to whatever people consider more performant. Reviewers: krasimir, klimek, owenpan, ioeric Reviewed By: krasimir Subscribers: cfe-commits, STL_MSFT, krasimir Tags: #clang-format, #clang, #clang-tools-extra Differential Revision: https://reviews.llvm.org/D68227 llvm-svn: 373388
* [OPENMP50]Initial codegen for declare variant implementation vendor.Alexey Bataev2019-10-014-0/+241
| | | | | | | Initial implementation of global aliases emission for the declare variant pragma with implementation vendor context selector set. llvm-svn: 373387
* [NFC] Updated tests after rL373371David Bolvansky2019-10-011-4/+0
| | | | | | Forgot to run check-clang-semacxx. llvm-svn: 373375
* [OPENMP]Fix PR43330: OpenMP target: Mapping of partial arrays fails.Alexey Bataev2019-10-012-59/+102
| | | | | | Fixed calculation the size of the array sections. llvm-svn: 373374
* [Diagnostics] Make -Wenum-compare-conditional off by defaultDavid Bolvansky2019-10-013-6/+2
| | | | | | Too many false positives, eg. in Chromium. llvm-svn: 373371
* [ThinLTO] Enable index-only WPD from clangTeresa Johnson2019-10-012-7/+6
| | | | | | | | | | | | | | | | | | Summary: To trigger the index-only Whole Program Devirt support added to LLVM, we need to be able to specify -fno-split-lto-unit in conjunction with -fwhole-program-vtables. Keep the default for -fwhole-program-vtables as -fsplit-lto-unit, but don't error on that option combination. Reviewers: pcc Subscribers: mehdi_amini, inglorion, steven_wu, dexonsmith, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68029 llvm-svn: 373370
* [OPENMP]Fix PR43516: Compiler crash with collapse(2) on non-rectangularAlexey Bataev2019-10-012-22/+29
| | | | | | | | | loop. Missed check if the condition is also dependent when building final expressions for the collapsed loop directives. llvm-svn: 373348
* [Diagnostics] Move warning into the subgroup (-Wenum-compare-conditional)David Bolvansky2019-10-013-2/+5
| | | | llvm-svn: 373345
* [clang] Make handling of unnamed template params similar to function paramsKadir Cetinkaya2019-10-019-51/+32
| | | | | | | | | | | | | | | | | | | | | Summary: Clang uses the location identifier should be inserted for declarator decls when a decl is unnamed. But for type template and template template paramaters it uses the location of "typename/class" keyword, which makes it hard for tooling to insert/change parameter names. This change tries to unify these two cases by making template parameter parsing and sourcerange operations similar to function params/declarator decls. Reviewers: ilya-biryukov Subscribers: arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68143 llvm-svn: 373340
* [clang] Ignore builtin namespaces in test/Import/cxx-anon-namespaceRaphael Isemann2019-10-011-1/+5
| | | | | | | | | Some platforms (e.g. AArch64) put __va_list in the 'std' namespace which might end up being the first namespace we match in this test. Instead let the first namespace match via file name/line so that we skip the builtin namespaces. llvm-svn: 373327
* [clang][lldb][NFC] Encapsulate ExternalASTMerger::ImporterSourceRaphael Isemann2019-10-013-16/+24
| | | | | | NFC preparation work for upcoming ExternalASTMerger patches. llvm-svn: 373312
* Decrease the verbosity of the -ftime-trace optionSylvestre Ledru2019-10-012-4/+2
| | | | | | | | | | | | | | | | | | | | | And move the relevant information in the doc. Summary: Currently, building a large software like Firefox shows 'Use chrome://tracing or Speedscope App (https://www.speedscope.app) for flamegraph visualization' for each file. Reviewers: anton-afanasyev Reviewed By: anton-afanasyev Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D68260 llvm-svn: 373308
* Don't elide the use of the thread wrapper for a thread_local constinitRichard Smith2019-10-012-7/+30
| | | | | | | | | variable with non-trivial destruction. We still need to invoke the thread wrapper to trigger registration of the destructor call on thread shutdown. llvm-svn: 373289
* [c++20] Add a C++20 version of the existing turing machine test.Richard Smith2019-10-011-0/+66
| | | | | | | | Unlike the C++11 version, this one uese mutable state and dynamic allocation instead of a carefully balanced and ever-accumulating pile of temporaries. llvm-svn: 373281
* During constant evaluation, handle CXXBindTemporaryExprs forRichard Smith2019-10-012-7/+11
| | | | | | array-of-class types, not just for class types. llvm-svn: 373279
* [c++20] Fix crash when constant-evaluating an assignment with aRichard Smith2019-10-012-1/+26
| | | | | | reference member access on its left-hand side. llvm-svn: 373276
* Fix Driver/modules.cpp test to work when build directory name contains '.s'Tom Stellard2019-09-301-1/+1
| | | | | | | | | | | | Reviewers: dyung, rsmith, hansw Subscribers: mati865, mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66176 llvm-svn: 373275
* Fix crash on value-dependent delete-expressions.Richard Smith2019-09-302-2/+8
| | | | | | | We used to miscompute the 'value-dependent' bit, and would crash if we tried to evaluate a delete expression that should be value-dependent. llvm-svn: 373272
* Make function static that didn't need linkage.Erich Keane2019-09-301-1/+1
| | | | | | In r373247 I added a helper function, but neglected to make it static. llvm-svn: 373268
* Fix failure caused by r373247Erich Keane2019-09-301-1/+5
| | | | | | | | | | | I incorrectly thought that the 'isLambda' check never fired, so when splitting up a helper function, I lost the 'nullptr' return value. ClangD Hover functionality apparently uses this, so the Unittest caught that. This patch correctly propogates the nullptr from the helper function. llvm-svn: 373259
* [NFC] Fix tests, second tryDavid Bolvansky2019-09-301-4/+4
| | | | llvm-svn: 373258
* [OPENMP50]Mark declare variant attribute as inheritable.Alexey Bataev2019-09-302-1/+11
| | | | | | Attribute must be inherited by the redeclarations. llvm-svn: 373257
* [NFCI] Updated broken testDavid Bolvansky2019-09-301-0/+4
| | | | llvm-svn: 373256
* [Diagnostics] Warn if enumeration type mismatch in conditional expressionDavid Bolvansky2019-09-302-0/+67
| | | | | | | | | | | | | | | | | | Summary: - Useful warning - GCC compatibility (GCC warns in C++ mode) Reviewers: rsmith, aaron.ballman Reviewed By: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67919 llvm-svn: 373252
* Teach CallGraph to look into Generic Lambdas.Erich Keane2019-09-306-8/+49
| | | | | | | | | | | | | | | | | | | | CallGraph visited LambdaExpr by getting the Call Operator from CXXRecordDecl (LambdaExpr::getCallOperator calls CXXRecordDecl::getLambdaCallOperator), which replaced generic lambda call operators with the non-instantiated FunctionDecl. The result was that the CallGraph would only pick up non-dependent calls. This patch does a few things: 1- Extend CXXRecordDecl to have a getDependentLambdaCallOperator, which will get the FunctionTemplateDecl, rather than immediately getting the TemplateDecl. 2- Define getLambdaCallOperator and getDependentLambdaCallOperator in terms of a common function. 3- Extend LambdaExpr with a getDependentCallOperator, which just calls the above function. 4- Changes CallGraph to handle Generic LambdaExprs. llvm-svn: 373247
* [OPENMP50]Do not emit warning for the function with the currentlyAlexey Bataev2019-09-303-4/+13
| | | | | | | | | defined body. If the function is currently defined, we should not emit a warning that it might be emitted already because it was not really emitted. llvm-svn: 373243
* Fix buildbot failure from r373217 (don't match metadata id exactly)Teresa Johnson2019-09-301-1/+1
| | | | | | | Fix this failure by ignoring the id of the metadata being checked: http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/3046/consoleFull#-21332887158254eaf0-7326-4999-85b0-388101f2d404 llvm-svn: 373237
* [Clang] Use -main-file-name for source filename if not setTeresa Johnson2019-09-303-3/+18
| | | | | | | | | | | | | | | | | | | -main-file-name is currently used to set the source name used in debug information. If the source filename is "-" and -main-file-name is set, then use the filename also for source_filename and ModuleID of the output. The argument is generally used outside the internal clang calls when running clang in a wrapper like icecc which gives the source via stdin but still wants to get a object file with the original source filename both in debug info and IR code. Patch by: the_jk (Joel Klinghed) Differential Revision: https://reviews.llvm.org/D67592 llvm-svn: 373217
* Correct function declarations; NFC.Aaron Ballman2019-09-302-4/+6
| | | | | | This header is included by C code so the functions need to have a prototype. Also, fix the function definitions so that they have C linkage rather than C++ linkage. llvm-svn: 373213
* [OPENMP] Fix comment, NFC.Alexey Bataev2019-09-301-1/+1
| | | | llvm-svn: 373210
* [Alignment][NFC] Remove AllocaInst::setAlignment(unsigned)Guillaume Chatelet2019-09-304-5/+5
| | | | | | | | | | | | | | | | | Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: courbet Subscribers: jholewinski, arsenm, jvesely, nhaehnle, eraman, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D68141 llvm-svn: 373207
* DeclCXX/ExprCXX - silence static analyzer getAs<> null dereference warnings. ↵Simon Pilgrim2019-09-302-5/+4
| | | | | | | | NFCI. The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us. llvm-svn: 373198
* [Alignment][NFC] Remove LoadInst::setAlignment(unsigned)Guillaume Chatelet2019-09-301-1/+1
| | | | | | | | | | | | | | | | | Summary: This is patch is part of a series to introduce an Alignment type. See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html See this patch for the introduction of the type: https://reviews.llvm.org/D64790 Reviewers: courbet, jdoerfert Subscribers: hiraditya, asbirlea, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D68142 llvm-svn: 373195
* [lldb][clang][modern-type-lookup] Use ASTImporterSharedState in ↵Raphael Isemann2019-09-302-4/+14
| | | | | | | | | | | | | | | | | | ExternalASTMerger Summary: The ExternalASTMerger should use the ASTImporterSharedState. This allows it to handle std::pair in LLDB (but the rest of libc++ is still work in progress). Reviewers: martong, shafik, a.sidorin Subscribers: rnkovacs, christof, JDevlieghere, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68140 llvm-svn: 373193
* Don't crash if a variable with a constexpr destructor has aRichard Smith2019-09-292-1/+11
| | | | | | value-dependent initializer. llvm-svn: 373173
* [clang-format] Reference qualifiers in member templates causing extra ↵Paul Hoad2019-09-292-4/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | indentation. Summary: The following code ``` struct f { template <class T> void bar() && noexcept {} }; ``` will be formatted to the following with LLVM style, and `AlwaysBreakTemplateDeclarations: Yes` ``` struct f { template <class T> void bar() && noexcept {} }; ``` The indentation of the `void bar()` line is wrong. Reviewers: klimek, owenpan, krasimir, timwoj, MyDeveloperDay Reviewed By: klimek, MyDeveloperDay Subscribers: MyDeveloperDay, ilya-biryukov, llvm-commits, cfe-commits Patch By: AndWass Tags: #clang-format, #clang, #llvm Differential Revision: https://reviews.llvm.org/D68072 llvm-svn: 373165
* [cxx_status] Mark P0784R7 as partially complete.Richard Smith2019-09-291-1/+1
| | | | llvm-svn: 373162
* For now, disallow lifetime-extended temporaries with non-trivial (butRichard Smith2019-09-293-1/+31
| | | | | | | | | | | | constexpr) destructors from being used in the values of constexpr variables. The standard rules here are unclear at best, so rejecting the problematic cases seems prudent. Prior to this change, we would fail to run the destructors for these temporaries, even if they had side-effects, which is certainly not the right behavior. llvm-svn: 373161
* Fix checking for permitted results of constant expressions.Richard Smith2019-09-292-25/+73
| | | | | | | | | In the presence of mutable state, we need to check whether temporaries involved in a constant expression have permissible values at the end of the overall evaluation, rather than at the end of the evaluation of the initializer of the temporary. llvm-svn: 373160
* For P0784R7: compute whether a variable has constant destruction if itRichard Smith2019-09-2923-75/+325
| | | | | | | | | | has a constexpr destructor. For constexpr variables, reject if the variable does not have constant destruction. In all cases, do not emit runtime calls to the destructor for variables with constant destruction. llvm-svn: 373159
* SemaExpr - silence static analyzer getAs<> null dereference warnings. NFCI.Simon Pilgrim2019-09-281-30/+30
| | | | | | The static analyzer is warning about potential null dereferences, but in these cases we should be able to use castAs<> directly and if not assert will fire for us. llvm-svn: 373150
* Don't install example analyzer pluginsAaron Puchert2019-09-283-3/+3
| | | | | | | | | | | | Summary: Fixes PR43430. Reviewers: hintonda, NoQ, Szelethus, lebedev.ri Reviewed By: lebedev.ri Differential Revision: https://reviews.llvm.org/D68172 llvm-svn: 373148
* Driver tests: set `--sysroot=""` to support clang with `DEFAULT_SYSROOT`Serge Pavlov2019-09-285-21/+39
| | | | | | | | | | | | When testing clang that has been compiled with `-DDEFAULT_SYSROOT` set to some path, some tests would fail. Override sysroot to be empty string for the tests to succeed when clang is configured with `DEFAULT_SYSROOT`. Differential Revision: https://reviews.llvm.org/D66834 Patch by Sergej Jaskiewicz <jaskiewiczs@icloud.com>. llvm-svn: 373147
* [TimeProfiler] Fix "OptModule" section and add new "Backend" sectionsAnton Afanasyev2019-09-281-0/+3
| | | | | | | Remove unnecessary "OptModule" section. Add "PerFunctionPasses", "PerModulePasses" and "CodeGenPasses" sections under "Backend" section. llvm-svn: 373142
* For P0784R7: add support for explicit destructor calls andRichard Smith2019-09-275-45/+298
| | | | | | pseudo-destructor calls in constant evaluation. llvm-svn: 373122
* [Clang][OpenMP Offload] Create start/end symbols for the offloading entry ↵Sergey Dmitriev2019-09-2738-316/+296
| | | | | | | | | | | | table with a help of a linker Linker automatically provides __start_<section name> and __stop_<section name> symbols to satisfy unresolved references if <section name> is representable as a C identifier (see https://sourceware.org/binutils/docs/ld/Input-Section-Example.html for details). These symbols indicate the start address and end address of the output section respectively. Therefore, renaming OpenMP offload entries section name from ".omp.offloading_entries" to "omp_offloading_entries" to use this feature. This is the first part of the patch for eliminating OpenMP linker script (please see https://reviews.llvm.org/D64943). Differential Revision: https://reviews.llvm.org/D68070 llvm-svn: 373118
OpenPOWER on IntegriCloud