summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDeclCXX.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [-fms-extensions] Permit 'override' in C++98 and 'sealed' as a synonym for ↵David Majnemer2013-10-181-15/+36
| | | | | | | | | | | | | | 'final' Summary: Some MS headers use these features. Reviewers: rnk, rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1948 llvm-svn: 192936
* Tidy up and improve error recovery for C++11 attributes in bad places. Based onRichard Smith2013-10-151-7/+49
| | | | | | a patch by Michael Han. llvm-svn: 192666
* Consolidating the notion of a GNU attribute parameter with the attribute ↵Aaron Ballman2013-08-311-4/+3
| | | | | | argument list. llvm-svn: 189711
* Remove Inheritable/NonInheritable flags from ProcessDeclAttributes. They don'tRichard Smith2013-08-291-2/+1
| | | | | | do anything useful. llvm-svn: 189548
* Avoid spurious error messages if parent template class cannot be instantiatedSerge Pavlov2013-08-101-1/+6
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D924 llvm-svn: 188133
* Started implementing variable templates. Top level declarations should be ↵Larisse Voufo2013-08-061-0/+8
| | | | | | fully supported, up to some limitations documented as FIXMEs or TODO. Static data member templates work very partially. Static data member templates of class templates need particular attention... llvm-svn: 187762
* Parse: Don't consider attributes of broken member declaratorsDavid Majnemer2013-08-011-31/+32
| | | | | | | | | | | | | | ParseCXXClassMemberDeclaration was trying to use the result of ActOnCXXMemberDeclarator to attach it to some late parsed attributes. However when failures arise, we have no decl to attach to which eventually leads us to a NULL pointer dereference. While we are here, clean up the code a bit. Fixes PR16765 llvm-svn: 187557
* Improve clarity/consistency of a few UsingDecl methods and related helpers.Enea Zaffanella2013-07-221-11/+13
| | | | | | | | | | | | No functionality change. In Sema helper functions: * renamed isTypeName as HasTypenameKeyword In UsingDecl: * renamed get/setUsingLocation to get/setUsingLoc * renamed is/setTypeName as has/setTypename llvm-svn: 186816
* ArrayRef'ize Sema::FinalizeDeclaratorGroup, Sema::BuildDeclaratorGroup andRafael Espindola2013-07-091-2/+1
| | | | | | | | Sema::ActOnDocumentableDecls. Patch by Robert Wilhelm. llvm-svn: 185931
* Fixed source location info for UnaryTransformTypeLoc nodes.Enea Zaffanella2013-07-061-0/+1
| | | | llvm-svn: 185765
* Use SmallVectorImpl instead of SmallVector for iterators and references to ↵Craig Topper2013-07-041-1/+1
| | | | | | avoid specifying the vector size unnecessarily. llvm-svn: 185610
* ArrayRef'ize Sema::CodeCompleteConstructorInitializerDmitri Gribenko2013-06-231-3/+2
| | | | | | Patch by Robert Wilhelm. llvm-svn: 184675
* Instantiation bug fix extension (cf. r184503) -- minor code fixes, including ↵Larisse Voufo2013-06-221-20/+30
| | | | | | a typo that caused a runtime assertion after firing diagnosis for class definitions, with the 'template' keyword as template header, in friend declarations. llvm-svn: 184634
* Bug Fix: Template explicit instantiations should not have definitions ↵Larisse Voufo2013-06-211-0/+8
| | | | | | (FixIts yet to be tested.) llvm-svn: 184503
* Fix for PR 16367, display the name of a function in a diagnostic instead ofRichard Trieu2013-06-191-1/+1
| | | | | | showing "(null)". llvm-svn: 184377
* Add -Wdeprecated warnings and fixits for things deprecated in C++11:Richard Smith2013-06-131-0/+13
| | | | | | | | | - 'register' storage class - dynamic exception specifications Only the former check is enabled by default for now (the latter might be quite noisy). llvm-svn: 183881
* ArrayRef'ize Sema::ActOnMemInitializerDmitri Gribenko2013-05-091-3/+2
| | | | llvm-svn: 181565
* Implement C++1y decltype(auto).Richard Smith2013-04-261-30/+49
| | | | llvm-svn: 180610
* Implement special-case name lookup for inheriting constructors: memberRichard Smith2013-03-261-10/+26
| | | | | | | using-declarations with names which look constructor-like are interpreted as constructor names. llvm-svn: 177957
* OpenMP threadprivate directive parsing and semantic analysisAlexey Bataev2013-03-221-0/+5
| | | | llvm-svn: 177705
* Don't accidentally and silently accept C++11 attributes in decl-specifier-seqsRichard Smith2013-02-221-0/+2
| | | | | | in C++98. llvm-svn: 175879
* Don't skip '_Alignas' when disambiguating 'final'. '_Alignas' can't appear here,Richard Smith2013-02-221-10/+3
| | | | | | and we used to assert if it did. llvm-svn: 175866
* Process and handle attributes on conditions and for loop variables. Process andRichard Smith2013-02-201-20/+17
| | | | | | | diagnose attributes on alias declarations, using directives, and attribute declarations. llvm-svn: 175649
* PR15300: Support C++11 attributes on base-specifiers. We don't support any suchRichard Smith2013-02-191-25/+25
| | | | | | | | attributes yet, so just issue the appropriate diagnostics. Also generalize the fixit for attributes-in-the-wrong-place code and reuse it here, if attributes are placed after the access-specifier or 'virtual' in a base specifier. llvm-svn: 175575
* Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h.Jordan Rose2013-02-081-1/+2
| | | | | | | Nearly all of these changes are one-to-one replacements; the few that aren't have to do with custom identifier validation. llvm-svn: 174768
* Provide a fixit for constexpr non-static data members.David Blaikie2013-01-301-3/+3
| | | | | | | | | | | | | | | | If the member has an initializer, assume it was probably intended to be static and suggest/recover with that. If the member doesn't have an initializer, assume it was probably intended to be const instead of constexpr and suggest that. (if the attempt to apply these changes fails, don't make any suggestion & produce the same diagnostic experience as before. The only case where this can come up that I know of is with a mutable constexpr with an initializer, since mutable is incompatible with static (but it's already incompatible with const anyway)) llvm-svn: 173873
* Downgrade 'attribute ignored when parsing type' from error to warning, to matchRichard Smith2013-01-291-3/+3
| | | | | | | | | the diagnostic's warn_ name. Switch some places (notably C++11 attributes) which really wanted an error over to a different diagnostic. Finally, suppress the diagnostic entirely for __ptr32, __ptr64 and __w64, to avoid producing diagnostics in important system headers. llvm-svn: 173788
* PR15017: A '>' can appear after a type-specifier in a template-argument-list.Richard Smith2013-01-291-0/+3
| | | | | | | It turns out that there's no correctness bug here (because we can't have a type definition in this location), but there was a diagnostic bug. llvm-svn: 173766
* Fix five more cases of tokens which can legally follow a type specifier.Richard Smith2013-01-191-2/+13
| | | | llvm-svn: 172886
* Fix parsing of class specifiers before '\n' 'operator'.Nico Weber2013-01-181-0/+1
| | | | | | | | | | | | | r159549 / r159164 regressed clang to reject struct s {}; struct s operator++(struct s a) { return a; } This fixes the regression. Richard, pleas check if this looks right. llvm-svn: 172834
* ArrayRef-ize some ctor initializer related APIsDavid Blaikie2013-01-171-2/+1
| | | | llvm-svn: 172701
* Implement C++11 semantics for [[noreturn]] attribute. This required splittingRichard Smith2013-01-171-1/+8
| | | | | | | | it apart from [[gnu::noreturn]] / __attribute__((noreturn)), since their semantics are not equivalent (for instance, we treat [[gnu::noreturn]] as affecting the function type, whereas [[noreturn]] does not). llvm-svn: 172691
* Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko2013-01-121-1/+1
| | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
* Tighten types a bit. No functionality change.Rafael Espindola2013-01-081-1/+1
| | | | llvm-svn: 171894
* Add fixit hints for misplaced C++11 attributes around class specifiers.Michael Han2013-01-071-8/+45
| | | | | | | | | | Following r168626, in class declaration or definition, there are a combination of syntactic locations where C++11 attributes could appear, and among those the only valid location permitted by standard is between class-key and class-name. So for those attributes appear at wrong locations, fixit is used to move them to expected location and we recover by applying them to the class specifier. llvm-svn: 171757
* s/CXX0X/CXX11/g, except for __GNU_EXPERIMENTAL_CXX0X__, and update a few ↵Richard Smith2013-01-021-23/+23
| | | | | | nearby 'C++0x' comments. llvm-svn: 171372
* s/CPlusPlus0x/CPlusPlus11/gRichard Smith2013-01-021-8/+8
| | | | llvm-svn: 171367
* Revert r170500. It over-zealously converted *ALL* things named Attributes, ↵Bill Wendling2012-12-201-4/+4
| | | | | | which is wrong here. llvm-svn: 170721
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-191-4/+4
| | | | | | single attribute in the future. llvm-svn: 170500
* [parser] Push a semi token for recovery only when it is actually missing.Argyrios Kyrtzidis2012-12-171-7/+9
| | | | llvm-svn: 170363
* PR14549. Don't assert if we see an incomplete decltype specifier at the end ↵Richard Smith2012-12-091-2/+1
| | | | | | of the file. llvm-svn: 169688
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-3/+3
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Implement C++11 [dcl.attr.grammar] p4: If an attribute-specifier-seq ↵Michael Han2012-11-281-1/+35
| | | | | | appertains to a friend declaration, that declaration shall be a definition. llvm-svn: 168826
* Improve diagnostic on C++11 attribute specifiers that appear at wrong ↵Michael Han2012-11-261-1/+58
| | | | | | | | | | | | | syntactic locations around class specifiers. This change list implemented logic that explicitly detects several combinations of locations where C++11 attribute specifiers might be incorrectly placed within a class specifier. Previously we emit generic diagnostics like "expected identifier" for such cases; now we emit specific diagnostic against the misplaced attributes, this also fixed a bug in old code where attributes appear at legitimate locations were incorrectly rejected. Thanks to Richard Smith for reviewing! llvm-svn: 168626
* Made the "expected string literal" diagnostic more expressiveAndy Gibbs2012-11-171-1/+2
| | | | llvm-svn: 168267
* PR9903: Recover from a member functon declared with the 'typedef' specifier byRichard Smith2012-11-151-9/+2
| | | | | | | dropping the specifier, just like we do for non-member functions and function templates declared 'typedef'. Patch by Brian Brooks! llvm-svn: 168108
* Fix crash on missing namespace name in namespace alias definition -- PR14085.Nico Weber2012-10-271-0/+6
| | | | | | Patch from Brian Brooks <brooks.brian@gmail.com>! llvm-svn: 166893
* In Parser::ParseDecltypeSpecifier, make sure the end location it returnsArgyrios Kyrtzidis2012-10-261-2/+15
| | | | | | | is at the end of parsed tokens when an error occurs, otherwise we'll hit an assertion when trying to annotate the decltype tokens. llvm-svn: 166826
* Handle a "#pragma options align" inside a class.Argyrios Kyrtzidis2012-10-121-0/+5
| | | | llvm-svn: 165810
* Improve C++11 attribute parsing.Michael Han2012-10-031-29/+36
| | | | | | | | - General C++11 attributes were previously parsed and ignored. Now they are parsed and stored in AST. - Add support to parse arguments of attributes that in 'gnu' namespace. - Differentiate unknown attributes and known attributes that can't be applied to statements when emitting diagnostic. llvm-svn: 165082
OpenPOWER on IntegriCloud