- Jun 16, 2017
-
-
Dean Michael Berris authored
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305544 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 15, 2017
-
-
Alex Lorenz authored
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305511 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Fiselier authored
Reviewers: GorNishanov, rsmith Reviewed By: GorNishanov Differential Revision: https://reviews.llvm.org/D34216 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305498 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 14, 2017
-
-
Serge Pavlov authored
It broke clang-x86_64-linux-selfhost-modules-2 and some other buildbots. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305381 91177308-0d34-0410-b5e6-96231b3b80d8
-
Serge Pavlov authored
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305379 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Fiselier authored
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305363 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 13, 2017
-
-
Yi Kong authored
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305315 91177308-0d34-0410-b5e6-96231b3b80d8
-
Diana Picus authored
This reverts commit r305239 because it broke the buildbots (the diag-flags.cpp test is failing). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305287 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 12, 2017
-
-
Nick Lewycky authored
This patch also exposed pre-existing bugs in clang, see PR32864 and PR33140#c3 . git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305239 91177308-0d34-0410-b5e6-96231b3b80d8
-
Erik Pilkington authored
Fixes PR32172 Differential revision: https://reviews.llvm.org/D34096 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305195 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 11, 2017
-
-
John McCall authored
Fixes PR25156. Patch by Don Hinton! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305169 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 10, 2017
-
-
Roman Lebedev authored
Breaks -Werror builders. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305148 91177308-0d34-0410-b5e6-96231b3b80d8
-
Roman Lebedev authored
Summary: This way, the behavior of that warning flag more closely resembles that of GCC. Do note that there is at least one false-negative (see FIXME in tests). Fixes PR4802. Testing: ``` ninja check-clang-sema check-clang-semacxx ``` Reviewers: dblaikie, majnemer, rnk Reviewed By: dblaikie, rnk Subscribers: cfe-commits, alexfh, rnk Differential Revision: https://reviews.llvm.org/D33102 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305147 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
Patch by Taiju Tsuiki! Differential Revision: https://reviews.llvm.org/D33875 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305126 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 09, 2017
-
-
Vassil Vassilev authored
n the current local-submodule-visibility mode, as soon as we discover a virtual destructor, we declare on demand a global delete operator. However, this causes that this delete operator is owned by the submodule which contains said virtual destructor. This means that other modules no longer can see the global delete operator which is hidden inside another submodule and fail to compile. This patch unhides those global allocation function once they're created to prevent this issue. Patch by Raphael Isemann (D33366)! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305118 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bataev authored
Summary: If the first parameter of the function is the ImplicitParamDecl, codegen automatically marks it as an implicit argument with `this` or `self` pointer. Added internal kind of the ImplicitParamDecl to separate 'this', 'self', 'vtt' and other implicit parameters from other kind of parameters. Reviewers: rjmccall, aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33735 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305075 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 08, 2017
-
-
George Burgess IV authored
As promised in r304996. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305013 91177308-0d34-0410-b5e6-96231b3b80d8
-
Galina Kistanova authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304997 91177308-0d34-0410-b5e6-96231b3b80d8
-
George Burgess IV authored
The only use in-tree I can find for BuiltinTypes.ResultTy is a single store to it. We otherwise just recompute what it should be later on (and sometimes do things like argument conversions in the process of recomputing it). Since it's impossible to test if the value stored there is sane, and we don't use it anyway, we should probably just drop the field. I'll do a follow-up patch to rename BuiltinTypes.ParamTypes -> BuiltinParamTypes in a bit. Wanted to keep this patch relatively minimal. Thanks to Petr Kudryavtsev for bringing this up! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304996 91177308-0d34-0410-b5e6-96231b3b80d8
-
Serge Pavlov authored
A function declared in a friend declaration may have declarations prior to the containing class definition. If such declaration defines default argument, the friend function declaration inherits them. This behavior causes problems if the class where the friend is declared is a template: during the class instantiation the friend function looks like if it had default arguments, so error is triggered. With this change friend functions declared in class templates do not inherit default arguments. Actual set of them will be defined at the point where the containing class is instantiated. This change fixes PR12724. Differential Revision: https://reviews.llvm.org/D30393 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304965 91177308-0d34-0410-b5e6-96231b3b80d8
-
Serge Pavlov authored
Clang makes check for function redefinition after it merged the new declaration with the existing one. As a result, it produces poor diagnostics in the case of a friend function defined inline, as in the code: ``` void func() {} class C { friend void func() {} }; ``` Error message in this case states that `inline declaration of 'func' follows non-inline definition`, which is misleading, as `func` does not have explicit `inline` specifier. With this changes compiler reports function redefinition if the new function is a friend defined inline and it does not have explicit `inline` specifier. Differential Revision: https://reviews.llvm.org/D26065 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304964 91177308-0d34-0410-b5e6-96231b3b80d8
-
Serge Pavlov authored
Bitwise complement applied to vector of floats described with attribute `ext_vector_type` is not diagnosed as error. Attempt to compile such construct causes assertion violation in Instruction.cpp. With this change the complement is treated similar to the case of vector type described with attribute `vector_size`. Differential Revision: https://reviews.llvm.org/D33732 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304963 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304960 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
the injected-class-name of a specialization that uses a partial / explicit specialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304957 91177308-0d34-0410-b5e6-96231b3b80d8
-
John McCall authored
sure that non-template functions don't end up in the candidate set. Fixes PR14211. Patch by Don Hinton! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304951 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 07, 2017
-
-
Richard Smith authored
This is not required by the standard (yet), but there seems to be reasonable support for this being a defect according to CWG discussion, and libstdc++ 7.1 relies on it working. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304946 91177308-0d34-0410-b5e6-96231b3b80d8
-
Benjamin Kramer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304892 91177308-0d34-0410-b5e6-96231b3b80d8
-
Galina Kistanova authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304872 91177308-0d34-0410-b5e6-96231b3b80d8
-
Galina Kistanova authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304870 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
RecursiveASTVisitor was not properly recursing through a SubstTemplateTypeParmTypes, resulting in crashes in pack expansion where we couldn't always find an unexpanded pack within a pack expansion. We also have an issue where substitution of deduced template arguments for an implicit deduction guide creates the "impossible" case of naming a non-dependent member of the current instantiation, but within a specialization that is actually instantiated from a different (partial/explicit) specialization of the template. We resolve this by declaring that constructors that do so can only be used to deduce specializations of the primary template. I'm running this past CWG to see if people agree this is the right thing to do. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304862 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
template is valid with or without it (with different meanings). If we see "dependent.x<...", and what follows the '<' is a valid expression, we must parse the '<' as a comparison rather than a template angle bracket. When we later come to instantiate, if we find that the LHS of the '<' actually names an overload set containing function templates, produce a diagnostic suggesting that the 'template' keyword was missed rather than producing a mysterious diagnostic saying that the function must be called (and pointing at what looks to already be a function call!). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304852 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 06, 2017
-
-
Mandeep Singh Grang authored
Reviewers: rsmith, craig.topper, efriedma Reviewed By: efriedma Subscribers: efriedma, cfe-commits Tags: #clang-c Differential Revision: https://reviews.llvm.org/D33926 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304823 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
This fixes missing lambda-captures for variables referenced only inside a static_assert (!), among other things. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304760 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
replaced by visible decls. Make sure that all paths through checkCorrectionVisibility set the RequiresImport flag appropriately, so we don't end up using a stale value. Patch by Jorge Gorbe! Differential Revision: https://reviews.llvm.org/D30963 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304745 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 05, 2017
-
-
Javed Absar authored
This patch provides a means to specify section-names for global variables, functions and static variables, using #pragma directives. This feature is only defined to work sensibly for ELF targets. One can specify section names as: #pragma clang section bss="myBSS" data="myData" rodata="myRodata" text="myText" One can "unspecify" a section name with empty string e.g. #pragma clang section bss="" data="" text="" rodata="" Reviewers: Roger Ferrer, Jonathan Roelofs, Reid Kleckner Differential Revision: https://reviews.llvm.org/D33412 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304705 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 03, 2017
-
-
Galina Kistanova authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304651 91177308-0d34-0410-b5e6-96231b3b80d8
-
Eric Fiselier authored
Summary: We were not handling correctly rebuilding of parameter and were not creating copies for them. Now we will always rebuild parameter moves in TreeTransform's TransformCoroutineBodyStmt. Reviewers: rsmith, GorNishanov Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33797 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304620 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
template partial specialization. In passing, fix the deduction-crash.cpp test to actually run all the tests. Due to a typo, the last third of the file was being skipped by the parser and some of the tests were not actually testing anything as a result. Switch from FileCheck to -verify to make the problem more obvious and prevent this happening again. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304604 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Jun 02, 2017
-
-
Alexey Bader authored
Summary: Improve OpenCL type checking by rejecting function pointer types. Reviewers: Anastasia, yaxunl Reviewed By: Anastasia Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33821 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304575 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Trieu authored
The warning for unchanged loop variables outputted a diagnostic that was dependent on iteration order from a pointer set, which is not always deterministic. Switch to a set vector, which allows fast querying and preserves ordering. Also make other minor changes in this area. Use more range-based for-loops. Remove limitation on SourceRanges that no logner exists. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304519 91177308-0d34-0410-b5e6-96231b3b80d8
-