summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseDecl.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* *this is const in a trailing-return-type for a constexpr member function.Richard Smith2013-01-141-1/+3
| | | | llvm-svn: 172375
* 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
* Pass false instead of 0 since isStar parameter of getArray has type bool. No ↵Nikola Smiljanic2013-01-111-1/+1
| | | | | | functionality change. llvm-svn: 172185
* PR14855: don't silently swallow a nested-name-specifier after a type name.Richard Smith2013-01-081-1/+5
| | | | llvm-svn: 171908
* s/CXX0X/CXX11/g, except for __GNU_EXPERIMENTAL_CXX0X__, and update a few ↵Richard Smith2013-01-021-12/+12
| | | | | | nearby 'C++0x' comments. llvm-svn: 171372
* s/CPlusPlus0x/CPlusPlus11/gRichard Smith2013-01-021-17/+17
| | | | llvm-svn: 171367
* Remove unused arguments and rename to conform to coding standards.Chad Rosier2012-12-211-4/+4
| | | | llvm-svn: 170933
* Indent.Chad Rosier2012-12-211-2/+1
| | | | llvm-svn: 170925
* Remove unnecessary checks.Chad Rosier2012-12-211-6/+3
| | | | llvm-svn: 170924
* Use the MaybeParseMicrosoftAttributes function.Chad Rosier2012-12-201-2/+1
| | | | llvm-svn: 170761
* Revert r170500. It over-zealously converted *ALL* things named Attributes, ↵Bill Wendling2012-12-201-8/+8
| | | | | | which is wrong here. llvm-svn: 170721
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-191-8/+8
| | | | | | single attribute in the future. llvm-svn: 170500
* Re-commit r170428 changes with Linux style file endings.Guy Benyei2012-12-181-0/+48
| | | | | | Add OpenCL images as clang builtin types. llvm-svn: 170432
* Revert changes from r170428, as I accidentally changed the line endings of ↵Guy Benyei2012-12-181-48/+0
| | | | | | these files to Windows style. llvm-svn: 170431
* Add OpenCL images as clang builtin types.Guy Benyei2012-12-181-0/+48
| | | | llvm-svn: 170428
* 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
* Don't include Type.h in DeclarationName.h.Benjamin Kramer2012-12-011-0/+1
| | | | | | Recursively prune some includes. llvm-svn: 169094
* Improve diagnostic on C++11 attribute specifiers that appear at wrong ↵Michael Han2012-11-261-5/+32
| | | | | | | | | | | | | 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
* Accept and pass arguments to __unknown_anytype in argumentJohn McCall2012-11-141-0/+6
| | | | | | | | | | | | | | | | | | | | | positions of Objective-C methods. It is possible to recover a lot of type information about Objective-C methods from the reflective metadata for their implementations. This information is not rich when it comes to struct types, however, and it is not possible to produce a type in the debugger's round-tripped AST which will really do anything useful during type-checking. Therefore we allow __unknown_anytype in these positions, which essentially disables type-checking for that argument. We infer the parameter type to be the unqualified type of the argument expression unless that expression is an explicit cast, in which case it becomes the type-as-written of that cast. rdar://problem/12565338 llvm-svn: 167896
* Teach Clang parser to reject C++11 attributes that appertain to declaration ↵Michael Han2012-11-061-1/+19
| | | | | | | | | specifiers. We don't support any C++11 attributes that appertain to declaration specifiers so reject the attributes in parser until we support them; this also conforms to what g++ 4.8 is doing. llvm-svn: 167481
* Thread safety analysis: Fixed ICE caused by double delete when late parsedDeLesley Hutchins2012-11-021-2/+5
| | | | | | attributes are attached to function declarations nested inside a class method. llvm-svn: 167321
* Change diagnostics for enums with fixed underlying type so in C++98 mode, we ↵Eli Friedman2012-11-021-4/+7
| | | | | | cite C++11. llvm-svn: 167273
* 'constexpr' and 'friend' are both declaration specifiers. Teach the parser ↵Richard Smith2012-10-251-3/+5
| | | | | | this, for better error recovery. llvm-svn: 166645
* DR1528: C++11 doesn't allow repeated cv-qualifiers in declarators after all.Richard Smith2012-10-171-6/+6
| | | | llvm-svn: 166152
* Fixed FunctionTypeLoc range for trailing return type.Abramo Bagnara2012-10-151-3/+10
| | | | llvm-svn: 165974
* Fix a crash-on-invalid when parsing a reference to an invalid auto declarationDavid Blaikie2012-10-101-0/+1
| | | | | | | | | auto x((unknown)); int& y = x; would crash because we were not flagging 'x' as an invalid declaration here. llvm-svn: 165675
* Fixed FunctionTypeLoc source range.Abramo Bagnara2012-10-041-9/+16
| | | | llvm-svn: 165259
* Fix scope location when parsing GNU attributes.Michael Han2012-10-041-4/+5
| | | | | | | | For GNU attributes, instead of reusing attribute source location for the scope location, use SourceLocation() since GNU attributes don not have scope tokens. llvm-svn: 165234
* Improve C++11 attribute parsing.Michael Han2012-10-031-8/+15
| | | | | | | | - 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
* Fix an edge case of mangling involving the combination of a lambda and typeid.Eli Friedman2012-09-261-1/+2
| | | | | | | | | | | | | typeid (and a couple other non-standard places where we can transform an unevaluated expression into an evaluated expression) is special because it introduces an an expression evaluation context, which conflicts with the mechanism to compute the current lambda mangling context. PR12123. I would appreciate if someone would double-check that we get the mangling correct with this patch. llvm-svn: 164658
* Fix some dead stores which the static analyzer warned about. No functionalityRichard Smith2012-09-141-2/+4
| | | | | | change (the problematic cases in ParseDecl.cpp are currently impossible). llvm-svn: 163920
* Improved MSVC __interface support by adding first class support for it, ↵Joao Matos2012-08-311-0/+7
| | | | | | instead of aliasing to "struct" which had some incorrect behaviour. Patch by David Robins. llvm-svn: 163013
* Now that ASTMultiPtr is nothing more than a array reference, make it a ↵Benjamin Kramer2012-08-231-3/+1
| | | | | | | | MutableArrayRef. This required changing all get() calls to data() and using the simpler constructors. llvm-svn: 162501
* Remove ASTOwningVector, it doesn't own anything and provides no value over ↵Benjamin Kramer2012-08-231-7/+7
| | | | | | SmallVector. llvm-svn: 162492
* Rip out remnants of move semantic emulation and smart pointers in Sema.Benjamin Kramer2012-08-231-1/+1
| | | | | | | These were nops for quite a while and only lead to confusion. ASTMultiPtr now behaves like a proper dumb array reference. llvm-svn: 162475
* Use LLVM_BUILTIN_TRAP instead of lame volatile int traps.David Blaikie2012-08-211-1/+1
| | | | | | (from a todo mentioned in r159469 & originally suggested by Chandler Carruth) llvm-svn: 162302
* Thread-safety analysis: fix scoping issues related to 'this', including anDeLesley Hutchins2012-08-201-29/+34
| | | | | | ICE in friend functions. llvm-svn: 162229
* PR41111, PR5925, PR13210: Teach tentative parsing to annotate identifiers andRichard Smith2012-08-181-3/+11
| | | | | | | | | | | | | | | | | nested names as id-expressions, using the annot_primary_expr annotation, where possible. This removes some redundant lookups, and also allows us to typo-correct within tentative parsing, and to carry on disambiguating past an identifier which we can determine will fail lookup as both a type and as a non-type, allowing us to disambiguate more declarations (and thus offer improved error recovery for such cases). This also introduces to the parser the notion of a tentatively-declared name, which is an identifier which we *might* have seen a declaration for in a tentative parse (but only if we end up disambiguating the tokens as a declaration). This is necessary to correctly disambiguate cases where a variable is used within its own initializer. llvm-svn: 162159
* Add support for "type safety" attributes that allow checking that 'void *'Dmitri Gribenko2012-08-171-1/+69
| | | | | | | | | | | | | | function arguments and arguments for variadic functions are of a particular type which is determined by some other argument to the same function call. Usecases include: * MPI library implementations, where these attributes enable checking that buffer type matches the passed MPI_Datatype; * for HDF5 library there is a similar usecase as MPI; * checking types of variadic functions' arguments for functions like fcntl() and ioctl(). llvm-svn: 162067
* Thread safety analysis: prevent a compiler error in cases where aDeLesley Hutchins2012-08-151-1/+2
| | | | | | late-parsed attribute is attached to an invalid declaration. llvm-svn: 161997
* objective-C++: Delayed parsing of most commonFariborz Jahanian2012-08-101-14/+1
| | | | | | | member functions defined inside an objc class implementation. wip. llvm-svn: 161667
* Minor simplification for r161534.Eli Friedman2012-08-081-2/+1
| | | | llvm-svn: 161544
* Fix r161534 so it actually builds.Eli Friedman2012-08-081-2/+1
| | | | llvm-svn: 161539
* Handle deprecation diagnostics correctly for C struct fields and Objective-C ↵Eli Friedman2012-08-081-8/+9
| | | | | | properties/ivars. <rdar://problem/6642337>. llvm-svn: 161534
* Improvements to vexing-parse warnings. Make the no-parameters case moreRichard Smith2012-07-301-10/+8
| | | | | | | | | | | | | 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
* 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
* 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-231-4/+4
| | | | | | | | 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
OpenPOWER on IntegriCloud