summaryrefslogtreecommitdiff
path: root/lib/Parse/ParseExpr.cpp
Commit message (Collapse)AuthorAgeFilesLines
* mplement __has_unique_object_representationsErich Keane2017-10-241-0/+1
| | | | | | | | | | | | | A helper builtin to facilitate implementing the std::has_unique_object_representations type trait. Requested here: https://bugs.llvm.org/show_bug.cgi?id=34942 Also already exists in GCC and MSVC. Differential Revision: https://reviews.llvm.org/D39064 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316518 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly parse a postfix expression following a Boolean literal. Fixes PR34273.Aaron Ballman2017-09-281-1/+2
| | | | | | Patch by Nicolas Lesser. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314463 91177308-0d34-0410-b5e6-96231b3b80d8
* Recommit "Add _Float16 as a C/C++ source language type"Sjoerd Meijer2017-09-081-0/+1
| | | | | | | | | This is a recommit of r312781; in some build configurations variable names are omitted, so changed the new regression test accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312794 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Add _Float16 as a C/C++ source language type"Sjoerd Meijer2017-09-081-1/+0
| | | | | | | | The clang-with-lto-ubuntu bot didn't like the new regression test, revert while I investigate the issue. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312784 91177308-0d34-0410-b5e6-96231b3b80d8
* Add _Float16 as a C/C++ source language typeSjoerd Meijer2017-09-081-0/+1
| | | | | | | | | | | | This adds _Float16 as a source language type, which is a 16-bit floating point type defined in C11 extension ISO/IEC TS 18661-3. In follow up patches documentation and more tests will be added. Differential Revision: https://reviews.llvm.org/D33719 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312781 91177308-0d34-0410-b5e6-96231b3b80d8
* std::function -> llvm::function_ref. NFC.Benjamin Kramer2017-09-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@312336 91177308-0d34-0410-b5e6-96231b3b80d8
* Place implictly declared functions at block scopeMomchil Velikov2017-08-101-1/+1
| | | | | | | | | | | | | | Such implicitly declared functions behave as if the enclosing block contained the declaration extern int name() (C90, 6.3.3.2 Function calls), thus their names should have block scope (C90, 6.1.2.1 Scope of identifiers). This patch fixes https://bugs.llvm.org/show_bug.cgi?id=33224 Differential Revision: https://reviews.llvm.org/D33676 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310616 91177308-0d34-0410-b5e6-96231b3b80d8
* fix trivial typos in comments; NFCHiroshi Inoue2017-07-021-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306969 91177308-0d34-0410-b5e6-96231b3b80d8
* Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova2017-06-011-2/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304475 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR25627: constant expressions being odr-used in template arguments.Faisal Vali2017-05-201-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch ensures that clang processes the expression-nodes that are generated when disambiguating between types and expressions within template arguments as constant-expressions by installing the ConstantEvaluated ExpressionEvaluationContext just before attempting the disambiguation - and then making sure that Context carries through into ParseConstantExpression (by refactoring it out into a function that does not create its own EvaluationContext: ParseConstantExpressionInExprEvalContext) Note, prior to this patch, trunk would correctly disambiguate and identify the expression as an expression - and while it would annotate the token with the expression - it would fail to complete the odr-use processing (specifically, failing to trigger Sema::UpdateMarkingForLValueToRValue as is done for all Constant Expressions, which would remove it from being considered odr-used). By installing the ConstantExpression Evaluation Context prior to disambiguation, and making sure it carries though, we ensure correct processing of the expression-node. For e.g: template<int> struct X { }; void f() { const int N = 10; X<N> x; // should be OK. [] { return X<N>{}; }; // Should be OK - no capture - but clang errors! } See a related bug: https://bugs.llvm.org//show_bug.cgi?id=25627 In summary (and reiteration), the fix is as follows: - Remove the EnteredConstantEvaluatedContext action from ParseTemplateArgumentList (relying on ParseTemplateArgument getting it right) - Add the EnteredConstantEvaluatedContext action just prior to undergoing the disambiguating parse, and if the parse succeeds for an expression, carry the context though into a refactored version of ParseConstantExpression that does not create its own ExpressionEvaluationContext. See https://reviews.llvm.org/D31588 for additional context regarding some of the more fragile and complicated approaches attempted, and Richard's feedback that eventually shaped the simpler and more robust rendition that is being committed. Thanks Richard! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303492 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the location of "missing ';'" suggestions after annotation tokens.Richard Smith2017-05-181-2/+2
| | | | | | | | | | | We were incorrectly setting PrevTokLocation to the first token in the annotation token instead of the last when consuming it. To fix this without adding a complex switch to the hot path through ConsumeToken, we now have a ConsumeAnnotationToken function for consuming annotation tokens in addition to the other Consume*Token special case functions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@303372 91177308-0d34-0410-b5e6-96231b3b80d8
* When we see a '<' operator, check whether it's a probable typo for a ↵Richard Smith2017-05-101-0/+34
| | | | | | | | | | | | | | | | | | | | template-id. The heuristic that we use here is: * the left-hand side must be a simple identifier or a class member access * the right-hand side must be '<' followed by either a '>' or by a type-id that cannot be an expression (in particular, not followed by '(' or '{') * there is a '>' token matching the '<' token The second condition guarantees the expression would otherwise be ill-formed. If we're confident that the user intended the name before the '<' to be interpreted as a template, diagnose the fact that we didn't interpret it that way, rather than diagnosing that the template arguments are not valid expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302615 91177308-0d34-0410-b5e6-96231b3b80d8
* [CodeCompletion] Complete platform names in @available expressionsAlex Lorenz2017-05-091-0/+5
| | | | | | | rdar://32074504 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302545 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for pretty platform names to `@available`/Alex Lorenz2017-05-091-2/+4
| | | | | | | | | | | | | | `__builtin_available` This commit allows us to use the macOS/iOS/tvOS/watchOS platform names in `@available`/`__builtin_available`. rdar://32067795 Differential Revision: https://reviews.llvm.org/D33000 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302540 91177308-0d34-0410-b5e6-96231b3b80d8
* Parse: cleanup some bleeding whitespaceSaleem Abdulrasool2017-04-201-2/+3
| | | | | | Clean up some bleeding whitespace that I noticed. NFC git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300908 91177308-0d34-0410-b5e6-96231b3b80d8
* [Sema] Add __is_aggregate type-traitEric Fiselier2017-04-121-0/+2
| | | | | | | | | | | | | | | | Summary: [LWG 2911](http://cplusplus.github.io/LWG/lwg-defects.html#2911) adds `std::is_aggregate` to the library, which requires a new builtin trait. This patch implements `__is_aggregate`. Reviewers: rsmith, majnemer, aaron.ballman Reviewed By: aaron.ballman Subscribers: STL_MSFT, cfe-commits Differential Revision: https://reviews.llvm.org/D31513 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300116 91177308-0d34-0410-b5e6-96231b3b80d8
* [NFC, Scoped Enum] Convert Sema::ExpressionEvaluationContext into a scoped EnumFaisal Vali2017-04-011-9/+13
| | | | | | | | | - also replace direct equality checks against the ConstantEvaluated enumerator with isConstantEvaluted(), in anticipation of adding finer granularity to the various ConstantEvaluated contexts and reinstating certain restrictions on where lambda expressions can occur in C++17. - update the clang tablegen backend that uses these Enumerators, and add the relevant scope where needed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@299316 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapplied r298976 [OpenCL] Added parsing for OpenCL vector types.Egor Churaev2017-03-291-3/+51
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298992 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverted r298976 [OpenCL] Added parsing for OpenCL vector types.Egor Churaev2017-03-291-55/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298978 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Added parsing for OpenCL vector types.Egor Churaev2017-03-291-4/+55
| | | | | | | | | | | | Reviewers: cfe-commits, Anastasia Reviewed By: Anastasia Subscribers: yaxunl, bader Differential Revision: https://reviews.llvm.org/D31183 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298976 91177308-0d34-0410-b5e6-96231b3b80d8
* Publish RAIIObjectsForParser.h for external usage.Vassil Vassilev2017-03-231-2/+2
| | | | | | | | | | Some clients (eg the cling interpreter) need to recover their parser from errors. Patch by Axel Naumann (D31190)! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@298606 91177308-0d34-0410-b5e6-96231b3b80d8
* PR24440: Do not silently discard a fold-expression appearing as the operand ↵Richard Smith2017-02-151-1/+1
| | | | | | of a cast-expression. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@295224 91177308-0d34-0410-b5e6-96231b3b80d8
* P0091R3: Implement basic parsing support for C++17 deduction-guides.Richard Smith2017-02-071-0/+1
| | | | | | | | | | | | We model deduction-guides as functions with a new kind of name that identifies the template whose deduction they guide; the bulk of this patch is adding the new name kind. This gives us a clean way to attach an extensible list of guides to a class template in a way that doesn't require any special handling in AST files etc (and we're going to need these functions we come to performing deduction). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294266 91177308-0d34-0410-b5e6-96231b3b80d8
* [code-completion] Fix crash when trying to do postfix completion of instance ↵Argyrios Kyrtzidis2017-01-151-3/+4
| | | | | | member inside a static function. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@292052 91177308-0d34-0410-b5e6-96231b3b80d8
* [NFC] Rename RAII ExpressionEvaluationContext variable from Unevaluated to ↵Faisal Vali2017-01-101-1/+1
| | | | | | | | | ConstantEvaluated when parsing a constant expression. This renaming makes it consistent with the context it actually sets: Sema::ConstantEvaluated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291525 91177308-0d34-0410-b5e6-96231b3b80d8
* [ObjC] The declarator for a block literal should be a definitionAlex Lorenz2017-01-061-0/+2
| | | | | | | | | | | | This change avoids the -Wstrict-prototypes warning for block literals with an empty argument list or without argument lists. rdar://15060615 Differential Revision: https://reviews.llvm.org/D28296 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@291231 91177308-0d34-0410-b5e6-96231b3b80d8
* Store decls in prototypes on the declarator instead of in the ASTReid Kleckner2016-12-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This saves two pointers from FunctionDecl that were being used for some rare and questionable C-only functionality. The DeclsInPrototypeScope ArrayRef was added in r151712 in order to parse this kind of C code: enum e {x, y}; int f(enum {y, x} n) { return x; // should return 1, not 0 } The challenge is that we parse 'int f(enum {y, x} n)' it its own function prototype scope that gets popped before we build the FunctionDecl for 'f'. The original change was doing two questionable things: 1. Saving all tag decls introduced in prototype scope on a TU-global Sema variable. This is problematic when you have cases like this, where 'x' and 'y' shouldn't be visible in 'f': void f(void (*fp)(enum { x, y } e)) { /* no x */ } This patch fixes that, so now 'f' can't see 'x', which is consistent with GCC. 2. Storing the decls in FunctionDecl in ActOnFunctionDeclarator so that they could be used in ActOnStartOfFunctionDef. This is just an inefficient way to move information around. The AST lives forever, but the list of non-parameter decls in prototype scope is short lived. Moving these things to the Declarator solves both of these issues. Reviewers: rsmith Subscribers: jmolloy, cfe-commits Differential Revision: https://reviews.llvm.org/D27279 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289225 91177308-0d34-0410-b5e6-96231b3b80d8
* [CodeCompletion] Provide Objective-C class property completion resultsAlex Lorenz2016-12-081-1/+7
| | | | | | | | | | | | | This commit provides class property code completion results. It supports explicit and implicit class properties, but the special block completion is done only for explicit properties right now. rdar://25636195 Differential Revision: https://reviews.llvm.org/D27053 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289058 91177308-0d34-0410-b5e6-96231b3b80d8
* [CodeCompletion] Add a block property setter completion resultAlex Lorenz2016-10-181-3/+4
| | | | | | | | | | | | | | | | | | | This commit changes code completion results for Objective-C block properties: clang now suggests an additional completion result that displays the block property together with '=' and the block literal placeholder for the appropriate readwrite block properties. This commit uses a simple heuristic to determine when it's appropriate to suggest a setter completion for block properties: the additional block setter completion is provided iff the member access that's being completed is a standalone statement. rdar://28481726 Differential Revision: https://reviews.llvm.org/D25520 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284472 91177308-0d34-0410-b5e6-96231b3b80d8
* [Parser] Fix bug where delayed typo in conditional expression was corrected ↵Erik Pilkington2016-07-291-3/+4
| | | | | | | | | | twice Patch by David Tarditi! Differential revision: https://reviews.llvm.org/D22930 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@277095 91177308-0d34-0410-b5e6-96231b3b80d8
* [NFC] Header cleanupMehdi Amini2016-07-181-2/+1
| | | | | | | | | | Summary: Removed unused headers, replaced some headers with forward class declarations Patch by: Eugene <claprix@yandex.ru> Differential Revision: https://reviews.llvm.org/D20100 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275882 91177308-0d34-0410-b5e6-96231b3b80d8
* [ObjC] Implement @available in the Parser and ASTErik Pilkington2016-07-161-0/+116
| | | | | | | | | | | | | | | | This patch adds a new AST node: ObjCAvailabilityCheckExpr, and teaches the Parser and Sema to generate it. This node represents an availability check of the form: @available(macos 10.10, *); Which will eventually compile to a runtime check of the host's OS version. This is the first patch of the feature I proposed here: http://lists.llvm.org/pipermail/cfe-dev/2016-July/049851.html Differential Revision: https://reviews.llvm.org/D22171 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275654 91177308-0d34-0410-b5e6-96231b3b80d8
* [Parser] Only correct delayed typos when neededErik Pilkington2016-06-131-0/+4
| | | | | | | | | ActOnBinOp corrects delayed typos when in C mode; don't correct them in that case. Fixes PR26700. Differential Revision: http://reviews.llvm.org/D20490 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272587 91177308-0d34-0410-b5e6-96231b3b80d8
* Clang support for __is_assignable intrinsicDavid Majnemer2016-05-231-0/+1
| | | | | | | | | | | | | | | | | | | MSVC now supports the __is_assignable type trait intrinsic, to enable easier and more efficient implementation of the Standard Library's is_assignable trait. As of Visual Studio 2015 Update 3, the VC Standard Library implementation uses the new intrinsic unconditionally. The implementation is pretty straightforward due to the previously existing is_nothrow_assignable and is_trivially_assignable. We handle __is_assignable via the same code as the other two except that we skip the extra checks for nothrow or triviality. Patch by Dave Bartolomeo! Differential Revision: http://reviews.llvm.org/D20492 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270458 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable support for __float128 in Clang and enable it on pertinent platformsNemanja Ivanovic2016-05-091-0/+1
| | | | | | | | | | | | | | | | | | | This patch corresponds to reviews: http://reviews.llvm.org/D15120 http://reviews.llvm.org/D19125 It adds support for the __float128 keyword, literals and target feature to enable it. Based on the latter of the two aforementioned reviews, this feature is enabled on Linux on i386/X86 as well as SystemZ. This is also the second attempt in commiting this feature. The first attempt did not enable it on required platforms which caused failures when compiling type_traits with -std=gnu++11. If you see failures with compiling this header on your platform after this commit, it is likely that your platform needs to have this feature enabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268898 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 266186 as it breaks anything that includes type_traits on some platformsNemanja Ivanovic2016-04-151-1/+0
| | | | | | | | | | | Since this patch provided support for the __float128 type but disabled it on all platforms by default, some platforms can't compile type_traits with -std=gnu++11 since there is a specialization with __float128. This reverts the patch until D19125 is approved (i.e. we know which platforms need this support enabled). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266460 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable support for __float128 in ClangNemanja Ivanovic2016-04-131-0/+1
| | | | | | | | | | | | | | | | | This patch corresponds to review: http://reviews.llvm.org/D15120 It adds support for the __float128 keyword, literals and a target feature to enable it. This support is disabled by default on all targets and any target that has support for this type is free to add it. Based on feedback that I've received from target maintainers, this appears to be the right thing for most targets. I have not heard from the maintainers of X86 which I believe supports this type. I will subsequently investigate the impact of enabling this on X86. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266186 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Move OpenCLImageTypes.def from clangAST to clangBasic library.Alexey Bader2016-04-131-1/+1
| | | | | | | | | | Putting OpenCLImageTypes.def to clangAST library violates layering requirement: "It's not OK for a Basic/ header to include an AST/ header". This fixes the modules build. Differential revision: http://reviews.llvm.org/D18954 Reviewers: Richard Smith, Vassil Vassilev. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@266180 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Complete image types support.Alexey Bader2016-04-081-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I. Current implementation of images is not conformant to spec in the following points: 1. It makes no distinction with respect to access qualifiers and therefore allows to use images with different access type interchangeably. The following code would compile just fine: void write_image(write_only image2d_t img); kernel void foo(read_only image2d_t img) { write_image(img); } // Accepted code which is disallowed according to s6.13.14. 2. It discards access qualifier on generated code, which leads to generated code for the above example: call void @write_image(%opencl.image2d_t* %img); In OpenCL2.0 however we can have different calls into write_image with read_only and wite_only images. Also generally following compiler steps have no easy way to take different path depending on the image access: linking to the right implementation of image types, performing IR opts and backend codegen differently. 3. Image types are language keywords and can't be redeclared s6.1.9, which can happen currently as they are just typedef names. 4. Default access qualifier read_only is to be added if not provided explicitly. II. This patch corrects the above points as follows: 1. All images are encapsulated into a separate .def file that is inserted in different points where image handling is required. This avoid a lot of code repetition as all images are handled the same way in the code with no distinction of their exact type. 2. The Cartesian product of image types and image access qualifiers is added to the builtin types. This simplifies a lot handling of access type mismatch as no operations are allowed by default on distinct Builtin types. Also spec intended access qualifier as special type qualifier that are combined with an image type to form a distinct type (see statement above - images can't be created w/o access qualifiers). 3. Improves testing of images in Clang. Author: Anastasia Stulova Reviewers: bader, mgrang. Subscribers: pxli168, pekka.jaaskelainen, yaxunl. Differential Revision: http://reviews.llvm.org/D17821 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265783 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct typos after acting on invalid subscript expressionsDavid Majnemer2016-02-191-2/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261312 91177308-0d34-0410-b5e6-96231b3b80d8
* [Parse] Make sure we don't forget to diagnose typos in exprsDavid Majnemer2016-02-181-3/+7
| | | | | | | If ActOn*Op fails, we will forget to diagnose typos in the LHS of expressions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261191 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct more typos in conditional expressionsDavid Majnemer2016-02-171-2/+4
| | | | | | | We didn't correctly handle some edge cases, causing us to bail out before correcting all the typos. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@261109 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix regression from r259622: the operand of an increment that is the operand ofRichard Smith2016-02-031-2/+2
| | | | | | | | a cast expression is not the operand of a cast expression itself, so if it's parenthesized we need to form a ParenExpr not a ParenListExpr. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259677 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Adding reserved operator logical xor for OpenCLAnastasia Stulova2016-02-031-0/+3
| | | | | | | | | | | | | | | | | | | This patch adds the reserved operator ^^ when compiling for OpenCL (spec v1.1 s6.3.g), which results in a more meaningful error message. Patch by Neil Hickey! Review: http://reviews.llvm.org/D13280 M test/SemaOpenCL/unsupported.cl M include/clang/Basic/TokenKinds.def M include/clang/Basic/DiagnosticParseKinds.td M lib/Basic/OperatorPrecedence.cpp M lib/Lex/Lexer.cpp M lib/Parse/ParseExpr.cpp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259651 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix miscompile and rejects-valids when disambiguating after an ambiguousRichard Smith2016-02-031-3/+12
| | | | | | | | C-style-cast to function/array type or parenthesized function-style cast/array indexing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@259622 91177308-0d34-0410-b5e6-96231b3b80d8
* OpaquePtr: Use nullptr construction for ParsedType OpaquePtr typedefDavid Blaikie2016-01-151-6/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@257958 91177308-0d34-0410-b5e6-96231b3b80d8
* [OpenCL] Disallow taking an address of a function.Anastasia Stulova2016-01-051-1/+16
| | | | | | | | | | | | | | An undecorated function designator implies taking the address of a function, which is illegal in OpenCL. Implementing a check for this earlier to allow the error to be reported even in the presence of other more obvious errors. Patch by Neil Hickey! http://reviews.llvm.org/D15691 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256838 91177308-0d34-0410-b5e6-96231b3b80d8
* [coroutines] Creation of promise object, lookup of operator co_await, buildingRichard Smith2015-10-271-1/+1
| | | | | | | of await_* calls, and AST representation for same. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251387 91177308-0d34-0410-b5e6-96231b3b80d8
* [coroutines] Initial stub Sema functionality for handling coroutine await / ↵Richard Smith2015-10-221-3/+3
| | | | | | yield / return. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250993 91177308-0d34-0410-b5e6-96231b3b80d8
* Use an ArrayRef<OffsetOfComponent> instead of pointer and size throughout ↵Craig Topper2015-10-221-1/+1
| | | | | | offsetof handling code. Also use a range-based for loop. NFC git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250989 91177308-0d34-0410-b5e6-96231b3b80d8