summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse
Commit message (Collapse)AuthorAgeFilesLines
...
* Rename LangOptions::Microsoft to LangOptions::MicrosoftExt to make it clear ↵Francois Pichet2011-09-176-10/+10
| | | | | | | | 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
* Specializations cannot be module-hidden. Diagnose attempts to do so.Douglas Gregor2011-09-091-1/+1
| | | | llvm-svn: 139406
* __module_private__ is inherited by redeclarations of an entity, andDouglas Gregor2011-09-092-2/+2
| | | | | | must also be present of the first declaration of that entity. llvm-svn: 139384
* Changed references of BaseTy, MemInitTy, CXXScopeTy, TemplateParamsTy to ↵Richard Trieu2011-09-091-1/+1
| | | | | | CXXBaseSpecifier, CXXCtorInitializer, NestedNameSpecifier, TemplateParameterList and removed their typedefs. llvm-svn: 139350
* Change references to StmtTy to Stmt and removed typedefs of StmtTy. Also ↵Richard Trieu2011-09-091-1/+1
| | | | | | removed typedef of AttrTy since it is not used. llvm-svn: 139349
* Modules: introduce the __module_private__ declaration specifier, whichDouglas Gregor2011-09-093-4/+17
| | | | | | | indicates that a declaration is only visible within the module it is declared in. llvm-svn: 139348
* Change all references of type ExprTy to Expr and get rid of the typedefs.Richard Trieu2011-09-091-2/+2
| | | | llvm-svn: 139347
* 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-083-146/+281
| | | | | | | | 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
* Implement the Objective-C 'instancetype' type, which is an alias ofDouglas Gregor2011-09-082-1/+10
| | | | | | | | | | 'id' that can be used (only!) via a contextual keyword as the result type of an Objective-C message send. 'instancetype' then gives the method a related result type, which we have already been inferring for a variety of methods (new, alloc, init, self, retain). Addresses <rdar://problem/9267640>. llvm-svn: 139275
* When parsing a function-try-block that does not have aDouglas Gregor2011-09-071-1/+3
| | | | | | | | ctor-initializer, remember to call the Sema action to generate default ctor-initializers. What a delightful little miscompile. Fixes PR10578 / <rdar://problem/9877267>. llvm-svn: 139253
* 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-042-6/+7
| | | | | | 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
* Add test case for defaulted copy and move structure validation.Sebastian Redl2011-09-041-1/+0
| | | | | | | | Fix bug this uncovered. Address minor comments from Doug. Enable cxx_implicit_moves feature. llvm-svn: 139101
* Support code-completion for C++ inline methods and ObjC buffering methods.Argyrios Kyrtzidis2011-09-048-90/+120
| | | | | | | | | | | | | | 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
* Don't try keeping a 'LeadingEmptyMacroLoc' in NullStmt. This failsArgyrios Kyrtzidis2011-09-011-4/+2
| | | | | | in the face of buffering C++/ObjC method bodies. llvm-svn: 138972
* objective-c: this patch (re)introduces objective-c's default propertyFariborz Jahanian2011-08-311-5/+6
| | | | | | | | | | synthesis. This new feature is currently placed under -fobjc-default-synthesize-properties option and is off by default pending further testing. It will become the default feature soon. // rdar://8843851 llvm-svn: 138913
* Switch __import__ over to __import_module__, so we don't conflict withDouglas Gregor2011-08-311-2/+3
| | | | | | | | existing practice with Python extension modules. Not that Python extension modules should be using a double-underscored identifier anyway, but... llvm-svn: 138870
* objective-c - This patch buffers method implementations Fariborz Jahanian2011-08-311-33/+69
| | | | | | | | | | | | | and does the Sema on their body after the entire class/category @implementation is seen. This change allows messaging of forward private methods, as well as, access to synthesized ivars of properties with foward synthesize declarations; among others. In effect, this patch removes several restrictions placed on objective-c due to in-place semantics processing of methods. This is part of // rdar://8843851. llvm-svn: 138865
* 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
* Minor clean up of objc's decl context stuff.Fariborz Jahanian2011-08-291-5/+2
| | | | | | No change in functionality. llvm-svn: 138742
* objective-c: Treat top-level objective-c declarationsFariborz Jahanian2011-08-272-17/+26
| | | | | | | | | | , such as list of forward @class decls, in a DeclGroup node. Deal with its consequence throught clang. This is in preparation for more Sema work ahead. // rdar://8843851. Feel free to reverse if it breaks something important and I am unavailable. llvm-svn: 138709
* Improve caret location for the GNU old-style field designator warning, from ↵Douglas Gregor2011-08-271-1/+1
| | | | | | David Blaikie llvm-svn: 138684
* Introduce support for a simple module import declaration, whichDouglas Gregor2011-08-261-0/+24
| | | | | | | | | | | | | | | | | | | | | | loads the named module. The syntax itself is intentionally hideous and will be replaced at some later point with something more palatable. For now, we're focusing on the semantics: - Module imports are handled first by the preprocessor (to get macro definitions) and then the same tokens are also handled by the parser (to get declarations). If both happen (as in normal compilation), the second one is redundant, because we currently have no way to hide macros or declarations when loading a module. Chris gets credit for this mad-but-workable scheme. - The Preprocessor now holds on to a reference to a module loader, which is responsible for loading named modules. CompilerInstance is the only important module loader: it now knows how to create and wire up an AST reader on demand to actually perform the module load. - We search for modules in the include path, using the module name with the suffix ".pcm" (precompiled module) for the file name. This is a temporary hack; we hope to improve the situation in the future. llvm-svn: 138679
* Introduce a -cc1 option "-emit-module", that creates a binary moduleDouglas Gregor2011-08-251-2/+2
| | | | | | | | | from the given source. -emit-module behaves similarly to -emit-pch, except that Sema is somewhat more strict about the contents of -emit-module. In the future, there are likely to be more interesting differences. llvm-svn: 138595
* Reverse r138567 until a buildbot failure is investigated.Fariborz Jahanian2011-08-252-26/+17
| | | | llvm-svn: 138584
* objc -arse: Use DeclGroup for forward class declarations;Fariborz Jahanian2011-08-252-17/+26
| | | | | | as in @class foo, bar. More cleanup to follow. llvm-svn: 138567
* Add support for Microsoft __ptr32 keyword. Francois Pichet2011-08-252-2/+10
| | | | | | Patch by Chris Cudmore! llvm-svn: 138533
* objc refactoring - minor clean up.Fariborz Jahanian2011-08-221-12/+8
| | | | llvm-svn: 138276
* objc - Simplify switing objc decl context by usingFariborz Jahanian2011-08-224-50/+18
| | | | | | a context switching object. llvm-svn: 138248
* Restore patch I reversed in r138040. Known buildbotFariborz Jahanian2011-08-225-69/+113
| | | | | | failures are resolved. llvm-svn: 138234
* Revers r138040. Need to look at a few buildbot failures.Fariborz Jahanian2011-08-193-66/+56
| | | | llvm-svn: 138049
* objective-c: Bring objective-c handling of decl contextFariborz Jahanian2011-08-193-56/+66
| | | | | | | | | | 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-182-3/+13
| | | | | | | | 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
* Track in the AST whether a function is constexpr.Richard Smith2011-08-151-1/+2
| | | | llvm-svn: 137653
* 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-044-4/+276
| | | | | | David Blaikie! llvm-svn: 136876
* Add code completion to produce "else" blocks after an "if"Douglas Gregor2011-07-301-0/+3
| | | | | | statement. Fixes <rdar://problem/9229438>. llvm-svn: 136564
* Turn off __has_feature(is_empty) and __has_feature(is_pod) if theDouglas Gregor2011-07-301-1/+1
| | | | | | | libstdc++ hack has reverted these type traits to keywords. Icky, but fixes <rdar://problem/9836262>. llvm-svn: 136560
* The lock operand to an @synchronized statement is also John McCall2011-07-271-18/+33
| | | | | | | supposed to be a full-expression; make it so. In ARC, make sure we retain the lock for the entire protected block. llvm-svn: 136271
* Add support for C++0x unicode string and character literals, from Craig Topper!Douglas Gregor2011-07-274-0/+18
| | | | llvm-svn: 136210
* Clean up the analysis of the collection operand to ObjCJohn McCall2011-07-271-3/+10
| | | | | | | | | | | for-in statements; specifically, make sure to close over any temporaries or cleanups it might require. In ARC, this has implications for the lifetime of the collection, so emit it with a retain and release it upon exit from the loop. rdar://problem/9817306 llvm-svn: 136204
* Fix a stray instantiation comment in Parse.Chandler Carruth2011-07-261-3/+3
| | | | llvm-svn: 136059
* Rename getInstantiationLineNumber to getExpansionLineNumber in bothChandler Carruth2011-07-251-2/+2
| | | | | | SourceManager and FullSourceLoc. llvm-svn: 135969
* Mechanically rename SourceManager::getInstantiationLoc andChandler Carruth2011-07-251-1/+1
| | | | | | | | FullSourceLoc::getInstantiationLoc to ...::getExpansionLoc. This is part of the API and documentation update from 'instantiation' as the term for macros to 'expansion'. llvm-svn: 135914
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-2310-64/+64
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* PR10392: "#pragma GCC visibility" must not expand macros in itsJoerg Sonnenberger2011-07-201-5/+5
| | | | | | arguments. llvm-svn: 135552
* PR10359: Template declarations which define classes are not permitted to ↵Richard Smith2011-07-141-0/+5
| | | | | | | | | | | | also contain declarators. Previously we would accept code like this: template<typename T> struct S { } f() { return 0; } This case now produces a missing ';' diagnostic, since that seems like a much more likely error than an attempt to declare a function or variable in addition to the class template. Treat this llvm-svn: 135195
OpenPOWER on IntegriCloud