summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse
Commit message (Collapse)AuthorAgeFilesLines
...
* [c++1z] N4295: fold-expressions.Richard Smith2014-11-081-2/+81
| | | | | | | | | | | | | | | | This is a new form of expression of the form: (expr op ... op expr) where one of the exprs is a parameter pack. It expands into (expr1 op (expr2onwards op ... op expr)) (and likewise if the pack is on the right). The non-pack operand can be omitted; in that case, an empty pack gives a fallback value or an error, depending on the operator. llvm-svn: 221573
* Patch for small addition to availability attribute.Fariborz Jahanian2014-11-051-0/+13
| | | | | | | | | This is to accept "NA" in place of vesion number for availability attribute. Used on introduced=NA to mean unavailable and deprecated=NA to mean nothing (not deprecated). rdar://18804883 llvm-svn: 221417
* Filter out non-static class members when correcting non-member-references.Kaelyn Takata2014-11-051-7/+23
| | | | llvm-svn: 221319
* Remove a couple typedefs for things in the clang namespace with the same ↵Craig Topper2014-10-312-6/+6
| | | | | | name. Remove a typedef that matches an identical one in the clang namespace. llvm-svn: 220954
* Remove the last couple uses of the ExprArg(just Expr*) typedef in Parser.Craig Topper2014-10-302-2/+2
| | | | llvm-svn: 220897
* PR21367: Don't accept rvalue references as an extension in C++98 mode if ↵Richard Smith2014-10-281-5/+17
| | | | | | we're in a new-type-id or conversion-type-id, since those things can legitimately be followed by a binary && operator. llvm-svn: 220785
* Pass around CorrectionCandidateCallbacks as unique_ptrs soKaelyn Takata2014-10-274-15/+15
| | | | | | TypoCorrectionConsumer can keep the callback around as long as needed. llvm-svn: 220693
* Add frontend support for __vectorcallReid Kleckner2014-10-242-9/+29
| | | | | | | | | | | | | Wire it through everywhere we have support for fastcall, essentially. This allows us to parse the MSVC "14" CTP headers, but we will miscompile them because LLVM doesn't support __vectorcall yet. Reviewed By: Aaron Ballman Differential Revision: http://reviews.llvm.org/D5808 llvm-svn: 220573
* Parse: Ignore "long" and "short" in #pragma sectionDavid Majnemer2014-10-221-1/+15
| | | | | | This fixes PR21337. llvm-svn: 220429
* Reland r219810 "Fix late template parsing leak with incremental processing"Reid Kleckner2014-10-221-1/+11
| | | | | | | | | | | | | | Original message: Add a second late template parser callback meant to cleanup any resources allocated by late template parsing. Call it from the Sema::ActOnEndOfTranslationUnit method after all pending template instantiations have been completed. Teach Parser::ParseTopLevelDecl to install the cleanup callback when incremental processing is enabled so that Parser::TemplateIds can be freed. Patch by Brad King! llvm-svn: 220400
* Remove unused StmtVector& parameters from declaration parsing functions.Rafael Espindola2014-10-223-18/+11
| | | | | | Patch by Eelis van der Weegen! llvm-svn: 220387
* Add RestrictQualifierLoc to DeclaratorChunk::FunctionTypeInfoHal Finkel2014-10-203-0/+6
| | | | | | | | | | | | | | Clang supports __restrict__ as a function qualifier, but DeclaratorChunk::FunctionTypeInfo lacked a field to track the qualifier's source location (as we do with volatile, etc.). This was the subject of a FIXME in GetFullTypeForDeclarator (in SemaType.cpp). This should also prove useful as we add more warnings regarding questionable uses of the restrict qualifier. There is no significant functional change (except for an improved source range associated with the err_invalid_qualified_function_type diagnostic fixit generated by GetFullTypeForDeclarator). llvm-svn: 220215
* MS Compat: mark globals emitted in read-only sections constHans Wennborg2014-10-161-13/+14
| | | | | | | | | | | | | | | | | | | | They cannot be written to, so marking them const makes sense and may improve optimisation. As a side-effect, SectionInfos has to be moved from Sema to ASTContext. It also fixes this problem, that occurs when compiling ATL: warning LNK4254: section 'ATL' (C0000040) merged into '.rdata' (40000040) with different attributes The ATL headers are putting variables in a special section that's marked read-only. However, Clang currently can't model that read-onlyness in the IR. But, by making the variables const, the section does become read-only, and the linker warning is avoided. Differential Revision: http://reviews.llvm.org/D5812 llvm-svn: 219960
* Revert "Fix late template parsing leak with incremental processing"Reid Kleckner2014-10-151-11/+1
| | | | | | | | This reverts commit r219810. The test suite appears broken. llvm-svn: 219813
* Fix late template parsing leak with incremental processingReid Kleckner2014-10-151-1/+11
| | | | | | | | | | | | | Add a second late template parser callback meant to cleanup any resources allocated by late template parsing. Call it from the Sema::ActOnEndOfTranslationUnit method after all pending template instantiations have been completed. Teach Parser::ParseTopLevelDecl to install the cleanup callback when incremental processing is enabled so that Parser::TemplateIds can be freed. Patch by Brad King! llvm-svn: 219810
* Be smarter when parsing variable declarations with unknown types.Kaelyn Takata2014-10-141-1/+4
| | | | | | | | | Specifically, avoid typo-correcting the variable name into a type before typo-correcting the actual type name in the declaration. Doing so results in a very unpleasant cascade of errors, with the typo correction of the actual type name being buried in the middle. llvm-svn: 219732
* Fixed a problem in r19589.Tyler Nowicki2014-10-121-2/+2
| | | | | | Several systems failed to compile the array allocation of the TokenArray. llvm-svn: 219590
* Allow constant expressions in pragma loop hints.Tyler Nowicki2014-10-121-47/+96
| | | | | | | | Previously loop hints such as #pragma loop vectorize_width(#) required a constant. This patch allows a constant expression to be used as well. Such as a non-type template parameter or an expression (2 * c + 1). Reviewed by Richard Smith llvm-svn: 219589
* [OPENMP] 'omp teams' directive basic support.Alexey Bataev2014-10-091-2/+4
| | | | | | Includes parsing and semantic analysis for 'omp teams' directive support from OpenMP 4.0. Adds additional analysis to 'omp target' directive with 'omp teams' directive. llvm-svn: 219385
* Revert "[OPENMP] 'omp teams' directive basic support. Includes parsing and ↵Renato Golin2014-10-081-4/+2
| | | | | | | | | semantic analysis for 'omp teams' directive support from OpenMP 4.0. Adds additional analysis to 'omp target' directive with 'omp teams' directive." This reverts commit r219197 because it broke ARM self-hosting buildbots with segmentation fault errors in many tests. llvm-svn: 219289
* [OPENMP] 'omp teams' directive basic support.Alexey Bataev2014-10-071-2/+4
| | | | | | Includes parsing and semantic analysis for 'omp teams' directive support from OpenMP 4.0. Adds additional analysis to 'omp target' directive with 'omp teams' directive. llvm-svn: 219197
* Patch to wrap up '_' as separator in version numbersFariborz Jahanian2014-10-061-2/+2
| | | | | | | | | in availability attribute by preserving this info. in VersionTuple and using it in pretty printing of attributes and yet using '.' as separator when diagnosing unavailable message calls. rdar://18490958 llvm-svn: 219124
* PR20991: ::decltype is not valid.Richard Smith2014-10-041-1/+2
| | | | llvm-svn: 219043
* Initialize MCObjectFileInfo when parsing ms-style asm.Benjamin Kramer2014-10-031-0/+2
| | | | | | | Otherwise we're left with an half-initialized bag of variables that may or may not explode later on. Should bring the MSVC buildbot back to life. llvm-svn: 219023
* Add comment about separators must match inFariborz Jahanian2014-10-031-0/+1
| | | | | | version numbers. llvm-svn: 218993
* Diagnose mixed use of '_' and '.' as versionFariborz Jahanian2014-10-021-2/+7
| | | | | | separators in my previous patch. llvm-svn: 218895
* Patch to accept '_' in addition to '.' as versionFariborz Jahanian2014-10-021-3/+8
| | | | | | | number separator in "availability" attribute. rdar://18490958 llvm-svn: 218884
* -ms-extensions: Implement __super scope specifier (PR13236).Nikola Smiljanic2014-09-266-8/+30
| | | | | | | | | We build a NestedNameSpecifier that records the CXXRecordDecl in which __super appeared. Name lookup is performed in all base classes of the recorded CXXRecordDecl. Use of __super is allowed only inside class and member function scope. llvm-svn: 218484
* Suggest fix-it for missing '{' after base-clauseIsmail Pazarbasi2014-09-251-6/+36
| | | | llvm-svn: 218468
* Follow-up to r218292: Add more REVERTIBLE_TYPE_TRAITs.Nico Weber2014-09-242-2/+68
| | | | | | | | | r218292 reverted r197496 because it broke things. In addition to breaking things, r197496 also made all traits starting with __is_ revertible. Reinstantiate that part of r197496 because code out there (e.g. libc++) depends on this behavior. Fixes PR21045. llvm-svn: 218365
* [OPENMP] Parsing/Sema of directive omp parallel for simdAlexander Musman2014-09-231-1/+4
| | | | llvm-svn: 218299
* Revert r197496, as it broke REVERTIBLE_TYPE_TRAITs from PCH files.Nico Weber2014-09-233-37/+70
| | | | | | Also add a test to make sure that this doesn't break again. Fixes PR21036. llvm-svn: 218292
* ms-inline-asm: Scope inline asm labels to functionsEhsan Akhgari2014-09-221-4/+18
| | | | | | | | | | | | | | | | Summary: This fixes PR20023. In order to implement this scoping rule, we piggy back on the existing LabelDecl machinery, by creating LabelDecl's that will carry the "internal" name of the inline assembly label, which we will rewrite the asm label to. Reviewers: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4589 llvm-svn: 218230
* [OPENMP] Initial parsing/sema analysis of 'target' directive.Alexey Bataev2014-09-191-2/+4
| | | | llvm-svn: 218110
* Parsing/Sema of directive omp for simdAlexander Musman2014-09-181-13/+23
| | | | llvm-svn: 218029
* Don't crash on access decls with invalid scope specifier, PR20887.Nico Weber2014-09-101-0/+5
| | | | llvm-svn: 217472
* Add error, recovery and fixit for "~A::A() {...}".Richard Smith2014-09-061-2/+21
| | | | llvm-svn: 217302
* Parse: Replace polymorphic functor objects with lambdas and llvm::function_ref.Benjamin Kramer2014-09-033-125/+63
| | | | | | No change in functionality. llvm-svn: 217025
* Update for LLVM api change.Rafael Espindola2014-08-271-2/+2
| | | | llvm-svn: 216585
* PR20760: Don't assert (and produce better diagnostics) if a default initializerRichard Smith2014-08-272-20/+30
| | | | | | contains an unmatched closing bracket token. llvm-svn: 216518
* Update Clang for LLVM API change to use unique_ptr in ↵David Blaikie2014-08-211-3/+3
| | | | | | SourceManager::AddNewSourceBuffer llvm-svn: 216226
* C++1y is now C++14!Aaron Ballman2014-08-194-5/+5
| | | | | | Changes diagnostic options, language standard options, diagnostic identifiers, diagnostic wording to use c++14 instead of c++1y. It also modifies related test cases to use the updated diagnostic wording. llvm-svn: 215982
* Uniformed parsing of GNU attributes at line beginnning and added GNU ↵Abramo Bagnara2014-08-161-0/+3
| | | | | | attributes parsing FIXMEs. llvm-svn: 215814
* Wrap to 80 columns, no behavior change.Nico Weber2014-08-151-1/+2
| | | | llvm-svn: 215776
* Parse: Don't attempt to act on #pragma init_seg when not targeting MSVCDavid Majnemer2014-08-141-0/+6
| | | | | | | | | | It doesn't really make sense to try and do stuff with #pragma init_seg when targeting non-Microsoft platforms; notions like library vs user initializers don't exist for other targets. This fixes PR20639. llvm-svn: 215618
* Header guard canonicalization, clang part.Benjamin Kramer2014-08-131-2/+2
| | | | | | Modifications made by clang-tidy with minor tweaks. llvm-svn: 215557
* PR20634: add some more cases that can legitimately come after a struct ↵Richard Smith2014-08-131-4/+7
| | | | | | declaration to our list of special cases. llvm-svn: 215520
* Reject virt-specifiers on friend declarations. Give anonymous bitfields aRichard Smith2014-08-122-5/+23
| | | | | | location so their diagnostics have somewhere to point. llvm-svn: 215416
* Reject varargs '...' in function prototype if there are more parameters afterRichard Smith2014-08-111-5/+36
| | | | | | | | | | | it. Diagnose with recovery if it appears after a function parameter that was obviously supposed to be a parameter pack. Otherwise, warn if it immediately follows a function parameter pack, because the user most likely didn't intend to write a parameter pack followed by a C-style varargs ellipsis. This warning can be syntactically disabled by using ", ..." instead of "...". llvm-svn: 215408
* Parser: Array decls with static but without array size are illformedDavid Majnemer2014-08-081-0/+5
| | | | | | | | | | | | Array declarators involving the static keyword take on two forms: D[ static type-qualifier-listopt assignment-expression ] D[ type-qualifier-list static assignment-expression ] Raise a diagnostic if the assignment-expression is missing. This fixes PR20584. llvm-svn: 215187
OpenPOWER on IntegriCloud