summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [Driver] Do a PATH lookup if needed when using -no-canonical-prefixesPetr Hosek2017-06-161-2/+9
| | | | | | | | | | | | | When -no-canonical-prefixes option is used and argv0 contains only a program name, we need to do a PATH lookup to get an executable path, otherwise the return value won't be a valid path and any subsequent uses of it (e.g. when invoking -cc1) will fail with an error. This patch fixes PR9576. Differential Revision: https://reviews.llvm.org/D34290 llvm-svn: 305600
* [index] Fix typo: inferface -> interfaceMarc-Andre Laperle2017-06-162-2/+2
| | | | | | | | | | | | Reviewers: arphaman Reviewed By: arphaman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33253 llvm-svn: 305588
* Killing a tab and some other spurious whitespace; NFC.Aaron Ballman2017-06-161-1/+1
| | | | llvm-svn: 305586
* [PR33394] Avoid lexing editor placeholders when Clang is used onlyAlex Lorenz2017-06-164-41/+64
| | | | | | | | | | | | | | | | for preprocessing r300667 added support for editor placeholder to Clang. That commit didn’t take into account that users who use Clang for preprocessing only (-E) will get the "editor placeholder in source file" error when preprocessing their source (PR33394). This commit ensures that Clang doesn't lex editor placeholders when running a preprocessor only action. rdar://32718000 Differential Revision: https://reviews.llvm.org/D34256 llvm-svn: 305576
* Ignore return value in test.Daniel Jasper2017-06-161-1/+1
| | | | llvm-svn: 305574
* [ubsan] docs: Add a note about pointers to volatileVedant Kumar2017-06-161-0/+6
| | | | llvm-svn: 305568
* Fix a bug that warnings generated with -M or -MM flagsYuka Takahashi2017-06-162-0/+15
| | | | | | | | | This is a patch for bug: https://bugs.llvm.org/show_bug.cgi?id=6817 Warnings should not be emitted with -M and -MM flags, because this mode is only used for generate MakeFiles. llvm-svn: 305561
* Expand vector oparation to as IR constants, PR28129.Dinar Temirbulatov2017-06-162-0/+69
| | | | llvm-svn: 305551
* [ubsan] PR33081: Skip the standard type checks for volatileVedant Kumar2017-06-162-0/+12
| | | | | | | | | | Skip checks for null dereference, alignment violation, object size violation, and dynamic type violation if the pointer points to volatile data. Differential Revision: https://reviews.llvm.org/D34262 llvm-svn: 305546
* [XRay][clang] Support capturing the implicit `this` argument to C++ class ↵Dean Michael Berris2017-06-162-6/+15
| | | | | | | | | | | | | | | | | | member functions Summary: Before this change, we couldn't capture the `this` pointer that's implicitly the first argument of class member functions. There are some interesting things we can do with capturing even just this single argument for zero-argument member functions. Reviewers: rnk, pelikan Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D34052 llvm-svn: 305544
* [ODRHash] Hash VarDecl members.Richard Trieu2017-06-164-8/+326
| | | | | | | These VarDecl's are static data members of classes. Since the initializers are also hashed, this also provides checking for default arguments to methods. llvm-svn: 305543
* [Completion] Code complete the members for a dependent type after a '::'Alex Lorenz2017-06-152-3/+25
| | | | | | | | | | This commit is a follow up to r302797 which added support for dependent completions after the '.' and '->' operators. This commit adds support for dependent completions after the '::' operator. Differential Revision: https://reviews.llvm.org/D34173 llvm-svn: 305511
* [index] Record C++17 global binding declarationsAlex Lorenz2017-06-153-1/+37
| | | | | | | | The global C++17 binding declarations should be indexed as variable symbols. Differential Revision: https://reviews.llvm.org/D33920 llvm-svn: 305508
* Added braces to work around gcc warning in googletest: suggest explicit ↵Galina Kistanova2017-06-154-8/+16
| | | | | | braces to avoid ambiguous 'else'. NFC. llvm-svn: 305507
* [index] Index static_assert declarationsAlex Lorenz2017-06-152-0/+23
| | | | | | | | | | static_assert declarations have to be visited while indexing so that we can gather the references to declarations that are present in their assert expression. Differential Revision: https://reviews.llvm.org/D33913 llvm-svn: 305504
* [coroutines] Remove pass-through operator co_await; Replace it with the ↵Eric Fiselier2017-06-152-14/+7
| | | | | | | | | | | | input expression Reviewers: GorNishanov, rsmith Reviewed By: GorNishanov Differential Revision: https://reviews.llvm.org/D34216 llvm-svn: 305498
* [coroutines] Allow co_await and co_yield expressions that return an lvalue ↵Eric Fiselier2017-06-155-8/+106
| | | | | | | | | | | | | | | | | | to compile Summary: The title says it all. Reviewers: GorNishanov, rsmith Reviewed By: GorNishanov Subscribers: rjmccall, cfe-commits Differential Revision: https://reviews.llvm.org/D34194 llvm-svn: 305496
* LexerTest memory leak fix-Erich Keane2017-06-151-1/+3
| | | | | | | | A new LexerTest unittest introduced a memory leak. This patch uses a unique_ptr with a custom deleter to ensure it is properly deleted. llvm-svn: 305491
* Apply summary-based dead stripping to regular LTO modules with summaries.Peter Collingbourne2017-06-153-6/+15
| | | | | | | | | | | | | | | If a regular LTO module has a summary index, then instead of linking it into the combined regular LTO module right away, add it to the combined summary index and associate it with a special module that represents the combined regular LTO module. Any such modules are linked during LTO::run(), at which time we use the results of summary-based dead stripping to control whether to link prevailing symbols. Differential Revision: https://reviews.llvm.org/D33922 llvm-svn: 305482
* [analyzer]: Improve test handling with multiple constraint managersDominic Chen2017-06-151-8/+23
| | | | | | | | | | | | Summary: Modify the test infrastructure to properly handle tests that require z3, and merge together the output of all tests on success. This is required for D28954. Reviewers: dcoughlin, zaks.anna, NoQ, xazax.hun Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33308 llvm-svn: 305480
* Revert "Load lazily the template specialization in multi-module setups."Vassil Vassilev2017-06-151-47/+38
| | | | | | This broke our libcxx modules builds. llvm-svn: 305460
* Revert "Define _GNU_SOURCE for rtems c++"Daniel Jasper2017-06-152-4/+0
| | | | | | | | | | | | | | | | | This reverts commit r305399. This breaks a build in libcxx: libcxx/src/system_error.cpp:90:16: error: assigning to 'int' from incompatible type 'char *' if ((ret = ::strerror_r(ev, buffer, strerror_buff_size)) != 0) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. Which makes sense according to: https://linux.die.net/man/3/strerror_r Not entirely sure how this needs to be fixed. llvm-svn: 305456
* Correct documentation about the AfterClass clang-format optionEric Fiselier2017-06-151-5/+5
| | | | llvm-svn: 305450
* [ODRHash] Hash TemplateArgument::Pack and TemplateTypeParmTypeRichard Trieu2017-06-152-0/+52
| | | | llvm-svn: 305440
* [Basic] Use a static_assert instead of using the old array of size -1 trick.Craig Topper2017-06-151-1/+1
| | | | llvm-svn: 305439
* [clang-format] Allow git-clang-format to handle empty extensions.Eric Fiselier2017-06-151-0/+2
| | | | | | | | | | | Most of libc++'s header files don't use extension. This prevents using git-clang-format on them, which is frustrating. This patch allows empty extensions to be passed using either the --extensions option, or the clangformat.extensions git-config value. llvm-svn: 305437
* Fix LexerTest signed/unsigned comparison.Erich Keane2017-06-151-1/+1
| | | | | | | | Werror was catching a signed/unsigned compare in an assert, correct the signed 'expected' value to be unsigned. llvm-svn: 305435
* Handle -ast-dump-all when passed as the only option.Aaron Ballman2017-06-153-1/+3
| | | | | | Patch by Don Hinton llvm-svn: 305432
* [Preprocessor]Correct Macro-Arg allocation of StringifiedArguments, Erich Keane2017-06-143-26/+81
| | | | | | | | | | | | | | | | | | | | | correct getNumArguments StringifiedArguments is allocated (resized) based on the size the getNumArguments function. However, this function ACTUALLY currently returns the amount of total UnexpArgTokens which is minimum the same as the new implementation of getNumMacroArguments, since empty/omitted arguments result in 1 UnexpArgToken, and included ones at minimum include 2 (1 for the arg itself, 1 for eof). This patch renames the otherwise unused getNumArguments to be more clear that it is the number of arguments that the Macro expects, and thus the maximum number that can be stringified. This patch also replaces the explicit memset (which results in value instantiation of the new tokens, PLUS clearing the memory) with brace initialization. Differential Revision: https://reviews.llvm.org/D32046 llvm-svn: 305425
* AST: Add missing break at end of switchDuncan P. N. Exon Smith2017-06-141-0/+1
| | | | llvm-svn: 305418
* [PPC] Enhance altivec conversion function macros implementation.Tony Jiang2017-06-142-4/+37
| | | | | | | | | | Add checking for the second parameter of altivec conversion builtin to make sure it is compile-time constant int. This patch fixes PR33212: PPC vec_cst useless at -O0 Differential Revision: https://reviews.llvm.org/D34092 llvm-svn: 305401
* Define _GNU_SOURCE for rtems c++James Y Knight2017-06-142-0/+4
| | | | | | | | | | This is required by the libc++ locale support. Patch by Walter Lee. Differential Revision: https://reviews.llvm.org/D34105 llvm-svn: 305399
* Be more strict when checking the -flto option valueYuka Takahashi2017-06-142-4/+12
| | | | | | | | | | | | | | Summary: It seems -flto must be either "thin" or "full". I think the use of containValue is just a typo. Reviewers: ruiu, tejohnson Subscribers: mehdi_amini, inglorion Differential Revision: https://reviews.llvm.org/D34055 llvm-svn: 305392
* Corrected some comment typos; NFC.Aaron Ballman2017-06-141-2/+2
| | | | llvm-svn: 305385
* clang-format: Add CompactNamespaces optionFrancois Ferrand2017-06-147-23/+339
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add CompactNamespaces option, to pack namespace declarations on the same line (somewhat similar to C++17 nested namespace definition). With this option, consecutive namespace declarations are kept on the same line: namespace foo { namespace bar { ... }} // namespace foo::bar Reviewers: krasimir, djasper, klimek Reviewed By: djasper Subscribers: kimgr, cfe-commits, klimek Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D32480 llvm-svn: 305384
* Reverted 305379 (Function with unparsed body is a definition)Serge Pavlov2017-06-146-23/+8
| | | | | | It broke clang-x86_64-linux-selfhost-modules-2 and some other buildbots. llvm-svn: 305381
* Function with unparsed body is a definitionSerge Pavlov2017-06-146-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | While a function body is being parsed, the function declaration is not considered as a definition because it does not have a body yet. In some cases it leads to incorrect interpretation, the case is presented in https://bugs.llvm.org/show_bug.cgi?id=14785: ``` template<typename T> struct Somewhat { void internal() const {} friend void operator+(int const &, Somewhat<T> const &) {} }; void operator+(int const &, Somewhat<char> const &x) { x.internal(); } ``` When statement `x.internal()` in the body of global `operator+` is parsed, the type of `x` must be completed, so the instantiation of `Somewhat<char>` is started. It instantiates the declaration of `operator+` defined inline, and makes a check for redefinition. The check does not detect another definition because the declaration of `operator+` is still not defining as does not have a body yet. To solves this problem the function `isThisDeclarationADefinition` considers a function declaration as a definition if it has flag `WillHaveBody` set. This change fixes PR14785. Differential Revision: https://reviews.llvm.org/D30375 llvm-svn: 305379
* Fix for Itanium mangler issue with templatesDmitry Polukhin2017-06-141-0/+2
| | | | | | | | Patch by Serge Preis Differential Revision: https://reviews.llvm.org/D32428 llvm-svn: 305377
* [coroutines] Fix co_await for range statementEric Fiselier2017-06-144-37/+217
| | | | | | | | | | | | | | | | | Summary: Currently we build the co_await expressions on the wrong implicit statements of the implicit ranged for; Specifically we build the co_await expression wrapping the range declaration, but it should wrap the begin expression. This patch fixes co_await on range for. Reviewers: rsmith, GorNishanov Reviewed By: GorNishanov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D34021 llvm-svn: 305363
* [ODRHash] Remove debugging code from r305361Richard Trieu2017-06-141-1/+0
| | | | llvm-svn: 305362
* [ODRHash] Hash Template and TemplateExpansion in TemplateArgument.Richard Trieu2017-06-142-0/+21
| | | | llvm-svn: 305361
* [ODRHash] Hash Expr for TemplateArgument::ExpressionRichard Trieu2017-06-142-0/+49
| | | | llvm-svn: 305360
* [ODRHash] Add TemplateArgument kind to hash.Richard Trieu2017-06-132-1/+23
| | | | llvm-svn: 305328
* Preserve cold attribute for function declsXinliang David Li2017-06-132-0/+12
| | | | | | Differential Revision: http://reviews.llvm.org/D34133 llvm-svn: 305325
* Fix spurious Wunused-lambda-capture warningYi Kong2017-06-132-5/+16
| | | | | | | | | | | | | | | | | Summary: Clang emits unused-lambda-capture warning for captures in generic lambdas even though they are actually used. Fixes PR31815. Reviewers: malcolm.parsons, aaron.ballman, rsmith Reviewed By: malcolm.parsons Subscribers: ahatanak, cfe-commits Differential Revision: https://reviews.llvm.org/D33526 llvm-svn: 305315
* Align definition of DW_OP_plus with DWARF spec [2/3]Florian Hahn2017-06-131-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is part of 3 patches that together form a single patch, but must be introduced in stages in order not to break things.   The way that LLVM interprets DW_OP_plus in DIExpression nodes is basically that of the DW_OP_plus_uconst operator since LLVM expects an unsigned constant operand. This unnecessarily restricts the DW_OP_plus operator, preventing it from being used to describe the evaluation of runtime values on the expression stack. These patches try to align the semantics of DW_OP_plus and DW_OP_minus with that of the DWARF definition, which pops two elements off the expression stack, performs the operation and pushes the result back on the stack.   This is done in three stages: • The first patch (LLVM) adds support for DW_OP_plus_uconst and changes all uses (and tests) of DW_OP_plus to use DW_OP_plus_uconst.   • The second patch (Clang) contains changes to use DW_OP_plus_uconst instead of DW_OP_plus.   • The third patch (LLVM) changes the semantics of DW_OP_plus to be in line with it’s DWARF meaning. It also does this for DW_OP_minus. Patch by Sander de Smalen. Reviewers: echristo, pcc, aprantl Reviewed By: aprantl Subscribers: aprantl, cfe-commits Differential Revision: https://reviews.llvm.org/D33893 llvm-svn: 305312
* Add comma to comment.Gheorghe-Teodor Bercea2017-06-131-1/+1
| | | | llvm-svn: 305294
* [clang-format] Document the StartOfTokenColumn parameter, NFCKrasimir Georgiev2017-06-131-0/+4
| | | | llvm-svn: 305293
* Revert "Revert r301742 which made ExprConstant checking apply to all ↵Diana Picus2017-06-1316-65/+41
| | | | | | | | | full-exprs." This reverts commit r305239 because it broke the buildbots (the diag-flags.cpp test is failing). llvm-svn: 305287
* clang-format: add option to merge empty function bodyFrancois Ferrand2017-06-134-4/+152
| | | | | | | | | | | | | | | | | | | | Summary: This option supplements the AllowShortFunctionsOnASingleLine flag, to merge empty function body at the beginning of the line: e.g. when the function is not short-enough and breaking braces after function. int f() {} Reviewers: krasimir, djasper Reviewed By: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D33447 llvm-svn: 305272
OpenPOWER on IntegriCloud