summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDecl.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Support decltype in nested-name-specifiers.David Blaikie2011-12-041-12/+19
| | | | llvm-svn: 145785
* Revert most of r145372 for now. Lookahead beyond the ';' in a functionRichard Smith2011-11-301-16/+1
| | | | | | | | | declaration tickles a bug in the way we handle visibility pragmas. The improvement to error recovery for template function definitions declared with the 'typedef' specifier in r145372 is unrelated and not reverted here. llvm-svn: 145541
* PR10101: Recover better from a common copy-paste error: if a functionRichard Smith2011-11-291-1/+16
| | | | | | | | declaration at namespace scope is followed by a semicolon and an open-brace (or in C++, a 'try', ':' or '='), then the error is probably a function definition with a spurious ';', rather than a mysterious '{'. llvm-svn: 145372
* Tighten up the conditions under which we consider ourselves to beDouglas Gregor2011-11-071-5/+14
| | | | | | | entering the context of a nested-name-specifier. Fixes <rdar://problem/10397846>. llvm-svn: 143967
* Simplify parsing ellipsis in Parser::ParseAlignArgument, spotted by Doug.Peter Collingbourne2011-10-241-4/+2
| | | | llvm-svn: 142814
* Fix grammar for C++11 alignment specifiers, and add a few FIXMEs.Peter Collingbourne2011-10-231-11/+27
| | | | llvm-svn: 142760
* Improve the diagnostic when a comma ends up at the end of a declarator groupRichard Smith2011-10-191-3/+72
| | | | | | | | | instead of a semicolon (as sometimes happens during refactorings). When such a comma is seen at the end of a line, and is followed by something which can't possibly be a declarator (or even something which might be a plausible typo for a declarator), suggest that a semicolon was intended. llvm-svn: 142544
* Improve the warning for cv-qualifiers on free functions, from Ahmed Charles!Douglas Gregor2011-10-191-2/+8
| | | | llvm-svn: 142478
* objc: allow class name qualified with protocols inFariborz Jahanian2011-10-181-1/+11
| | | | | | | iboutletcollection attribute. But ignore protocol list. // rdar://10296078 llvm-svn: 142459
* objc: diagnose invalid argument to anFariborz Jahanian2011-10-181-0/+7
| | | | | | | iboutletcollection attribute intead of crashing. // rdar://10296078 llvm-svn: 142364
* Refactor __attribute__ parsing, and add a diagnostic if the r_paren at the endRichard Smith2011-10-171-95/+61
| | | | | | of an attrib is missing. gcc does not allow the closing parenthesis to be omitted. llvm-svn: 142255
* Implement -Wc++98-compat warnings for the parser.Richard Smith2011-10-151-9/+22
| | | | llvm-svn: 142056
* Provide half floating point support as a storage only type.Anton Korobeynikov2011-10-141-0/+10
| | | | | | Lack of half FP was a regression compared to llvm-gcc. llvm-svn: 142016
* Introduce BalancedDelimiterTracker, to better track open/closeDouglas Gregor2011-10-121-68/+80
| | | | | | | delimiter pairs and detect when we exceed the implementation limit for nesting depth, from Aaron Ballman! llvm-svn: 141782
* Add typo correction for type names.Kaelyn Uhrain2011-10-111-2/+4
| | | | | | | | The main motivation was to do typo correction in C++ "new" statements, though picking it up in other places where type names are expected was pretty much a freebie. llvm-svn: 141621
* Support for C1x _Atomic specifier (see testcase). This is primarily being ↵Eli Friedman2011-10-061-0/+58
| | | | | | | | committed at the moment to help support C++0x <atomic>, but it should be a solid base for implementing the full specification of C1x _Atomic. Thanks to Jeffrey Yasskin for the thorough review! llvm-svn: 141330
* OpenCL: add a non-standard extension, cl_clang_storage_class_specifiers,Peter Collingbourne2011-10-061-16/+16
| | | | | | | | | which enables support for C99 storage-class specifiers. This extension is intended to be used by implementations to implement OpenCL C built-in functions. llvm-svn: 141271
* Parse attributes written in an ObjC method parameter type asJohn McCall2011-10-011-2/+0
| | | | | | attributes on the parameter declaration. llvm-svn: 140944
* Add support for alignment-specifiers in C1X and C++11, removePeter Collingbourne2011-09-291-0/+65
| | | | | | | support for the C++0x draft [[align]] attribute and add the C1X standard header file stdalign.h llvm-svn: 140796
* Add support for parsing the optional attribute-specifier-seq at thePeter Collingbourne2011-09-291-0/+3
| | | | | | end of a decl-specifier-seq llvm-svn: 140793
* ArrayRef-ifying the fields passed to Sema::ActOnFieldsDavid Blaikie2011-09-221-1/+1
| | | | llvm-svn: 140293
* Rename LangOptions::Microsoft to LangOptions::MicrosoftExt to make it clear ↵Francois Pichet2011-09-171-2/+2
| | | | | | | | that this flag must be used only for Microsoft extensions and not emulation; to avoid confusion with the new LangOptions::MicrosoftMode flag. Many of the code now under LangOptions::MicrosoftExt will eventually be moved under the LangOptions::MicrosoftMode flag. llvm-svn: 139987
* Record the full source range of an attribute.Argyrios Kyrtzidis2011-09-131-17/+18
| | | | llvm-svn: 139599
* __module_private__ is inherited by redeclarations of an entity, andDouglas Gregor2011-09-091-1/+1
| | | | | | must also be present of the first declaration of that entity. llvm-svn: 139384
* Modules: introduce the __module_private__ declaration specifier, whichDouglas Gregor2011-09-091-1/+10
| | | | | | | indicates that a declaration is only visible within the module it is declared in. llvm-svn: 139348
* Thread safety: added support for function scopes in attribute arguments.Caitlin Sadowski2011-09-081-0/+20
| | | | | | This patch was written by DeLesley Hutchins. llvm-svn: 139302
* Thread Safety: Patch to implement delayed parsing of attributes within aCaitlin Sadowski2011-09-081-141/+259
| | | | | | | | class scope. This patch was also written by DeLesley Hutchins. llvm-svn: 139301
* Allow C++0x enumerations with a fixed underlying type inDouglas Gregor2011-09-081-2/+3
| | | | | | | Objective-C. The @encode'ing of such an enumeration type is the same as its underlying type. <rdar://problem/5276348>. llvm-svn: 139297
* PR10458: Last part of providing 'auto' type specifier as an extension in ↵Richard Smith2011-09-041-1/+5
| | | | | | C++98: permit it within type-ids. llvm-svn: 139103
* PR10458: Finesse behaviour of C++0x features when in pre-0x mode. Accept ↵Richard Smith2011-09-041-6/+4
| | | | | | for-range and auto with an ExtWarn, and produce a -Wc++0x-compat warning in C++98 mode when auto is used as a storage class. llvm-svn: 139102
* Support code-completion for C++ inline methods and ObjC buffering methods.Argyrios Kyrtzidis2011-09-041-10/+6
| | | | | | | | | | | | | | Previously we would cut off the source file buffer at the code-completion point; this impeded code-completion inside C++ inline methods and, recently, with buffering ObjC methods. Have the code-completion inserted into the source buffer so that it can be buffered along with a method body. When we actually hit the code-completion point the cut-off lexing or parsing. Fixes rdar://10056932&8319466 llvm-svn: 139086
* objc - fixes a regression in declaring c decls nested inFariborz Jahanian2011-08-301-0/+3
| | | | | | | objective-c containers due to recent changes to objc decl contexts. // rdar://10041908 llvm-svn: 138803
* Add support for Microsoft __ptr32 keyword. Francois Pichet2011-08-251-2/+9
| | | | | | Patch by Chris Cudmore! llvm-svn: 138533
* Restore patch I reversed in r138040. Known buildbotFariborz Jahanian2011-08-221-0/+1
| | | | | | failures are resolved. llvm-svn: 138234
* Revers r138040. Need to look at a few buildbot failures.Fariborz Jahanian2011-08-191-1/+0
| | | | llvm-svn: 138049
* objective-c: Bring objective-c handling of decl contextFariborz Jahanian2011-08-191-0/+1
| | | | | | | | | | to modernity. Instead of passing down individual context objects from parser to sema, establish decl context in parser and have sema access current context as needed. I still need to take of Doug's comment for minor cleanups. llvm-svn: 138040
* Add support for MSVC __unaligned attribute. Necessary to parse MSVC headers ↵Francois Pichet2011-08-181-2/+9
| | | | | | | | in 64-bit mode (ie: when _M_IA64 or _M_AMD64 is defined) more info: http://msdn.microsoft.com/en-us/library/ms177389.aspx llvm-svn: 137935
* Thread Safety: Added basic argument parsing for all new attributes.Caitlin Sadowski2011-08-091-0/+80
| | | | | | | | | | | | This patch special cases the parser for thread safety attributes so that all attribute arguments are put in the argument list (instead of a special parameter) since arguments may not otherwise resolve correctly without two-token lookahead. This patch also adds checks to make sure that attribute arguments are lockable objects. llvm-svn: 137130
* Parsing of C++0x lambda expressions, from John Freeman with help fromDouglas Gregor2011-08-041-1/+4
| | | | | | David Blaikie! llvm-svn: 136876
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-11/+11
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Add 'mutable' to the function declarator chunk, to be used whenDouglas Gregor2011-07-131-0/+1
| | | | | | parsing lambda expressions, from John Freeman! llvm-svn: 135090
* Properly protect colons when parsing a nested-name-specifier as partJohn McCall2011-07-061-11/+16
| | | | | | | of an enum specifier in dialects which permit fixed underlying types. Fixes the rejects-valid part of PR10264. llvm-svn: 134468
* Clean up and refactor ParseFunctionDeclarator to reduce codeDouglas Gregor2011-07-051-250/+188
| | | | | | repetition and better reflect the actual grammar, from John Freeman! llvm-svn: 134417
* Fix AST representations of alias-declarations which define tag types. Inside ↵Richard Smith2011-07-011-7/+13
| | | | | | classes, the tag types need to have an associated access specifier, and inside function definitions, they need to be included in the declarations of the DeclStmt. These issues manifested as assertions during template instantiation, and also in a WIP constexpr patch. llvm-svn: 134250
* Introduce DelayedCleanupPool useful for simplifying clean-up of certain ↵Argyrios Kyrtzidis2011-06-221-4/+2
| | | | | | | | | | resources that, while their lifetime is well-known and restricted, cleaning them up manually is easy to miss and cause a leak. Use it to plug the leaking of TemplateIdAnnotation objects. rdar://9634138. llvm-svn: 133610
* Handle decltype keyword in Parser::isDeclarationSpecifier.Francois Pichet2011-06-191-0/+4
| | | | | | Fixes PR10154. Found by parsing MFC 2010 code with clang. llvm-svn: 133380
* Automatic Reference Counting.John McCall2011-06-151-1/+3
| | | | | | | | | | Language-design credit goes to a lot of people, but I particularly want to single out Blaine Garst and Patrick Beard for their contributions. Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself, in no particular order. llvm-svn: 133103
* Parse C++0x generalized initializers.Sebastian Redl2011-06-051-2/+25
| | | | llvm-svn: 132662
* Implement __underlying_type for libc++.Alexis Hunt2011-05-191-0/+8
| | | | llvm-svn: 131633
* Properly parse the 'default' and 'delete' keywords.Alexis Hunt2011-05-121-7/+10
| | | | | | | | | | | | | | | | | They are actually grammatically considered definitions and parsed accordingly. This fixes the outstanding bugs regarding defaulting functions after their declarations. We now really nicely diagnose the following construct (try it!) int foo() = delete, bar; Still todo: Defaulted functions other than default constructors Test cases (including for the above construct) llvm-svn: 131228
OpenPOWER on IntegriCloud