summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse
Commit message (Collapse)AuthorAgeFilesLines
...
* objective-C: minor refactoring in methodFariborz Jahanian2012-08-091-9/+4
| | | | | | definition parsing logic. llvm-svn: 161593
* Minor simplification for r161534.Eli Friedman2012-08-082-8/+5
| | | | llvm-svn: 161544
* objective-C: refactor/simplify parsing of delayedFariborz Jahanian2012-08-081-1/+4
| | | | | | | method/c-funcs defined in objc class implementation. No intended functionality change. llvm-svn: 161540
* Fix r161534 so it actually builds.Eli Friedman2012-08-081-2/+1
| | | | llvm-svn: 161539
* PR13558: Fix typo 'compatiblity'. Thinking of the children. Apparently.Richard Smith2012-08-081-2/+2
| | | | llvm-svn: 161537
* Handle deprecation diagnostics correctly for C struct fields and Objective-C ↵Eli Friedman2012-08-083-12/+37
| | | | | | properties/ivars. <rdar://problem/6642337>. llvm-svn: 161534
* [ms-inline asm] Refactor the logic to generate the AsmString into Sema. NoChad Rosier2012-08-081-59/+2
| | | | | | functional change intended. llvm-svn: 161518
* [ms-inline asm] Stmt destructors are never called, so allocate the AsmToks usingChad Rosier2012-08-071-1/+2
| | | | | | the ASTContext BumpPtr. Also use the preferred llvm::ArrayRef interface. llvm-svn: 161373
* [ms-inline asm] Pass Tokens to Sema and store them in the AST. No functionalChad Rosier2012-08-061-5/+2
| | | | | | change intended. No test case as there's no real way to test at this time. llvm-svn: 161342
* Tweak code-completion heuristics deciding between a lambdaDouglas Gregor2012-07-311-1/+3
| | | | | | | code-completion and an Objective-C message send, based on Jordan's feedback. llvm-svn: 161049
* When we encounter a code-completion token while parsing an ill-formedDouglas Gregor2012-07-311-1/+5
| | | | | | | | lambda-introducer in Objective-C++11, fall back to treating the tokens as an Objective-C message send to provide those (more likely) completions. Fixes <rdar://problem/11980263>. llvm-svn: 161015
* Improvements to vexing-parse warnings. Make the no-parameters case moreRichard Smith2012-07-304-29/+18
| | | | | | | | | | | | | accurate by asking the parser whether there was an ambiguity rather than trying to reverse-engineer it from the DeclSpec. Make the with-parameters case have better diagnostics by using semantic information to drive the warning, improving the diagnostics and adding a fixit. Patch by Nikola Smiljanic. Some minor changes by me to suppress diagnostics for declarations of the form 'T (*x)(...)', which seem to have a very high false positive rate, and to reduce indentation in 'warnAboutAmbiguousFunction'. llvm-svn: 160998
* Fix an assertion failure when code completing an auto variable's initialiser.Peter Collingbourne2012-07-271-0/+1
| | | | llvm-svn: 160857
* clang/lib: [CMake] Update tblgen'd dependencies.NAKAMURA Takumi2012-07-271-0/+2
| | | | llvm-svn: 160851
* clang/lib: [CMake] Reformat, alphabetize lists.NAKAMURA Takumi2012-07-271-1/+1
| | | | llvm-svn: 160850
* objective-c parsing. Don't crash when selector nameFariborz Jahanian2012-07-261-5/+5
| | | | | | is missing in method prototype. // rdar://11939584 llvm-svn: 160789
* Pedantic -pedantic correction. Duplicate cv-qualifiers are permitted in C++11Richard Smith2012-07-241-6/+6
| | | | | | unless they appear in a decl-specifier-seq. llvm-svn: 160688
* Do not warn about a function decl / direct init ambiguity if the function ↵Richard Smith2012-07-231-1/+1
| | | | | | has a trailing return type. llvm-svn: 160646
* Fix a typo (the the => the)Sylvestre Ledru2012-07-231-1/+1
| | | | llvm-svn: 160622
* Add diagnostics for comma at end of enum and for extra semicolon at namespaceRichard Smith2012-07-233-20/+27
| | | | | | | | scope to -Wc++11-extensions. Move extra semicolon after member function definition diagnostic out of -pedantic, since C++ allows a single semicolon there. Keep it in -Wextra-semi, though, since it's still questionable. llvm-svn: 160618
* Allow the parser to recover gracefully if a typename is used to introduce a ↵Francois Pichet2012-07-221-3/+5
| | | | | | | | | | decltype type. In Microsoft mode, we emit a warning instead of an error. This fixes a couple of errors when parsing the MSVC 11 RC headers with clang. llvm-svn: 160613
* Fixes an ObjC++ parse crash caused by delayed parsingFariborz Jahanian2012-07-201-1/+4
| | | | | | | | of c-functions nested in namespace in method implementations by turning off its delayed parsing until a proper solution is figured out. pr13418 llvm-svn: 160552
* Move helper class into an anonymous namespace.Benjamin Kramer2012-07-131-0/+2
| | | | llvm-svn: 160172
* 80-column violations and whitespace.Chad Rosier2012-07-101-13/+15
| | | | llvm-svn: 160017
* objective-c: provide fixit hint for @autoreleasepoolFariborz Jahanian2012-07-091-2/+17
| | | | | | and similar other keywords. // rdar://10723084 llvm-svn: 159956
* Better parser recovery in Objective-C containers.Jordan Rose2012-07-092-5/+23
| | | | | | | | | | | | | | Previously it was possible to get an infinite-loop-on-invalid with a namespace decl within @interface. Since 'namespace' is normally a safe place to retry top-level parsing, we just didn't consume the token. This adds a flag that tracks whether we have temporarily left Objective-C scope to parse a C-like declaration, and uses that to better recover from parse problems by stopping at possible method declarations and at @end. To fix the original problem, we do /not/ stop at 'namespace' when in an Objective-C @interface or @protocol context (but still do in @implementation). llvm-svn: 159941
* Added a new memberfor Parser, to be used soonFariborz Jahanian2012-07-061-0/+21
| | | | | | | for doing delayed parsing of c++ method defined in objc class implementations. llvm-svn: 159792
* Implement AST classes for comments, a real parser for Doxygen comments and aDmitri Gribenko2012-07-061-0/+1
| | | | | | | | | | | | | | very simple semantic analysis that just builds the AST; minor changes for lexer to pick up source locations I didn't think about before. Comments AST is modelled along the ideas of HTML AST: block and inline content. * Block content is a paragraph or a command that has a paragraph as an argument or verbatim command. * Inline content is placed within some block. Inline content includes plain text, inline commands and HTML as tag soup. llvm-svn: 159790
* objective-c++ parsing. Turn off delayed parsingFariborz Jahanian2012-07-052-4/+4
| | | | | | | | | of out-of-line c++ method definition which happens to be inside an objc class implementation until I can figure out how to do it. This is to fix a broken project. llvm-svn: 159772
* Drop the ASTContext.h include from Stmt.h and fix up transitive users.Benjamin Kramer2012-07-041-0/+1
| | | | | | | | | | | | | | This required moving the ctors for IntegerLiteral and FloatingLiteral out of line which shouldn't change anything as they are usually called through Create methods that are already out of line. ASTContext::Deallocate has been a nop for a long time, drop it from ASTVector and make it independent from ASTContext.h Pass the StorageAllocator directly to AccessedEntity so it doesn't need to have a definition of ASTContext around. llvm-svn: 159718
* Obj-C++11 parser: handle a fall out of delayed Fariborz Jahanian2012-07-031-1/+1
| | | | | | | c-function parsing when a declaration with C++0x braced-init-list is inside an @implementation. llvm-svn: 159693
* Obj-C++11 parser: fix broken parsing of c-functionFariborz Jahanian2012-07-032-5/+3
| | | | | | defined in class implementations. llvm-svn: 159691
* Obj-C++11 parser: turn off buffering ofFariborz Jahanian2012-07-032-1/+4
| | | | | | | c-function defined in objc class implementation for now. llvm-svn: 159690
* objective-c: Refactor parse/sema portion ofFariborz Jahanian2012-07-031-8/+8
| | | | | | | objective-c's fast enumeration statement, for more work to come. llvm-svn: 159689
* objective-c: just as we have done for method definitions,Fariborz Jahanian2012-07-023-24/+53
| | | | | | | | c-functions declared in implementation should have their parsing delayed until the end so, they can access forward declared private methods. // rdar://10387088 llvm-svn: 159626
* A ':' after an enum-specifier at class scope is a bitfield, not a typo for a ↵Richard Smith2012-07-022-6/+11
| | | | | | ';'. llvm-svn: 159549
* Add support for the C11 _Alignof keyword.Jordan Rose2012-06-303-10/+19
| | | | | | | This behaves like the existing GNU __alignof and C++11 alignof keywords; most of the patch is simply adding the third token spelling to various places. llvm-svn: 159494
* Use -frewrite-includes for crash reports.David Blaikie2012-06-291-0/+2
| | | | | | | | | | | In future changes we should: * use __builtin_trap rather than derefing 'random' volatile pointers. * avoid dumping temporary files into /tmp when running tests, instead preferring a location that is properly cleaned up by lit. Review by Chandler Carruth. llvm-svn: 159469
* Support the use of "=delete" and "=default" with delayed templateDouglas Gregor2012-06-282-0/+2
| | | | | | parsing. Fixes <rdar://problem/11700604>. llvm-svn: 159380
* Whitespace.Chad Rosier2012-06-261-147/+147
| | | | llvm-svn: 159235
* Extend the "expected ';' after struct" logic to also apply to enums, and toRichard Smith2012-06-252-77/+106
| | | | | | struct and enum forward-declarations. llvm-svn: 159164
* Recognize GNU attributes after 'enum class'. Fixes the libc++ build.John McCall2012-06-231-1/+8
| | | | llvm-svn: 159089
* Clean up a large number of C++11 attribute parse issues, including parsingAlexis Hunt2012-06-237-37/+119
| | | | | | | | | | | | | | | | | | attributes in more places where we didn't and catching a lot more issues. This implements nearly every aspect of C++11 attribute parsing, except for: - Attributes are permitted on explicit instantiations inside the declarator (but not preceding the decl-spec) - Attributes are permitted on friend declarations of functions. - Multiple instances of the same attribute in an attribute-list (e.g. [[noreturn, noreturn]], not [[noreturn]] [[noreturn]] which is conforming) are allowed. The first two are marked as expected-FIXME in the test file and the latter is probably a defect and is currently untested. Thanks to Richard Smith for providing the lion's share of the testcases. llvm-svn: 159072
* Support L__FUNCTION__ in microsoft mode, PR11789Nico Weber2012-06-232-0/+2
| | | | | | | | | | Heavily based on a patch from Aaron Wishnick <aaron.s.wishnick@gmail.com>. I'll clean up the duplicated function in CodeGen as a follow-up, later today or tomorrow. llvm-svn: 159060
* Perform typo correction for base class specifiers.Kaelyn Uhrain2012-06-221-1/+3
| | | | llvm-svn: 159046
* objective-c: deprecated C-like parameters in Objective-C Fariborz Jahanian2012-06-211-2/+5
| | | | | | | method declarations. // rdar://11578353. llvm-svn: 158929
* Remove a goofy CMake hack and use the standard CMake facilities toChandler Carruth2012-06-211-3/+15
| | | | | | | | | express library-level dependencies within Clang. This is no more verbose really, and plays nicer with the rest of the CMake facilities. It should also have no change in functionality. llvm-svn: 158888
* Unbreak GCC build: GCC doesn't like clang::Parser::CommentHandler and class ↵Dmitri Gribenko2012-06-201-3/+3
| | | | | | clang::CommentHandler to have same name. llvm-svn: 158780
* Structured comment parsing, first step.Dmitri Gribenko2012-06-201-1/+21
| | | | | | | | | * Retain comments in the AST * Serialize/deserialize comments * Find comments attached to a certain Decl * Expose raw comment text and SourceRange via libclang llvm-svn: 158771
* Reapply r158700 and fixup patches, minus one hunk that slipped through andAlexis Hunt2012-06-192-5/+8
| | | | | | | caused a crash in an obscure case. On the plus side, it caused me to catch another bug by inspection. llvm-svn: 158767
OpenPOWER on IntegriCloud