summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/DeclSpec.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert most of r154844, which was disabled in r155975. Keep around theRichard Smith2012-05-021-5/+0
| | | | | | | refactorings in that revision, and some of the subsequent bugfixes, which seem to be relevant even without delayed exception specification parsing. llvm-svn: 156031
* Implement the last part of C++ [class.mem]p2, delaying the parsing ofDouglas Gregor2012-04-161-0/+5
| | | | | | | | | exception specifications on member functions until after the closing '}' for the containing class. This allows, for example, a member function to throw an instance of its own class. Fixes PR12564 and a fairly embarassing oversight in our C++98/03 support. llvm-svn: 154844
* For PR11916: Add support for g++'s __int128 keyword. Unlike __int128_t, this isRichard Smith2012-04-041-1/+3
| | | | | | | | | | a type specifier and can be combined with unsigned. This allows libstdc++4.7 to be used with clang in c++98 mode. Several other changes are still required for libstdc++4.7 to work with clang in c++11 mode. llvm-svn: 153999
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-111-6/+6
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* __decltype is a GNU extension, not a C++11 extension.Richard Smith2012-02-241-2/+0
| | | | llvm-svn: 151377
* Remove unreachable code in Clang. (replace with llvm_unreachable where ↵David Blaikie2012-01-171-3/+2
| | | | | | appropriate or when GCC requires it) llvm-svn: 148292
* Implement the missing pieces of Evaluate for _Complex types. With that ↵Eli Friedman2012-01-101-1/+2
| | | | | | complete, remove some code from CGExprConstant which is no longer necessary. While I'm here, a couple minor tweaks to _Complex-in-C++. (Specifically, make _Complex types literal types, and don't warn for _Complex int.) llvm-svn: 147840
* Improve the warning for cv-qualifiers on free functions, from Ahmed Charles!Douglas Gregor2011-10-191-0/+5
| | | | llvm-svn: 142478
* Add -Wc++98-compat warnings for uses of the new keywords 'alignof', 'char16_t',Richard Smith2011-10-171-0/+8
| | | | | | 'char32_t', 'constexpr', 'decltype', 'noexcept', 'nullptr' and 'static_assert'. llvm-svn: 142302
* Provide half floating point support as a storage only type.Anton Korobeynikov2011-10-141-0/+2
| | | | | | Lack of half FP was a regression compared to llvm-gcc. llvm-svn: 142016
* Support for C1x _Atomic specifier (see testcase). This is primarily being ↵Eli Friedman2011-10-061-0/+2
| | | | | | | | 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-13/+17
| | | | | | | | | 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
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-251-2/+2
| | | | llvm-svn: 140478
* Switch assert(0/false) llvm_unreachable.David Blaikie2011-09-231-3/+3
| | | | llvm-svn: 140367
* Rename SourceLocation::getFileLocWithOffset -> getLocWithOffset.Argyrios Kyrtzidis2011-09-191-1/+1
| | | | | | It already works (and is useful with) macro locs as well. llvm-svn: 140057
* Rename LangOptions::Microsoft to LangOptions::MicrosoftExt to make it clear ↵Francois Pichet2011-09-171-1/+1
| | | | | | | | 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
* Remove the restriction on module-private friends. Since the friendDouglas Gregor2011-09-121-7/+0
| | | | | | | declaration may be the first declaration, we want the ability to that declaration to be marked module-private. llvm-svn: 139497
* Friends cannot be declared module-privateDouglas Gregor2011-09-091-1/+8
| | | | llvm-svn: 139411
* Modules: introduce the __module_private__ declaration specifier, whichDouglas Gregor2011-09-091-0/+12
| | | | | | | indicates that a declaration is only visible within the module it is declared in. llvm-svn: 139348
* PR10458: Finesse behaviour of C++0x features when in pre-0x mode. Accept ↵Richard Smith2011-09-041-1/+35
| | | | | | 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 'mutable' to the function declarator chunk, to be used whenDouglas Gregor2011-07-131-0/+2
| | | | | | parsing lambda expressions, from John Freeman! llvm-svn: 135090
* Fixed enum types can be complete without actually being valid to useJohn McCall2011-07-061-0/+6
| | | | | | | as scope specifiers; diagnose the attempt, rather than letting it go to an assert. The rest of PR10264. llvm-svn: 134479
* Fix a couple more issues related to r133854:Richard Smith2011-06-251-2/+16
| | | | | | | | When performing semantic analysis on a member declaration, fix the check for whether we are declaring a function to check for parenthesized declarators, declaration via decltype, etc. Also fix the semantic check to not treat FuncType* as a function type. llvm-svn: 133862
* When deciding how to parse "= something" as part of a memberDouglas Gregor2011-06-251-0/+55
| | | | | | | | | declaration, determine whether the declaration will end up declaring a function using semantic criteria (e.g., it will have function type) rather than purely syntactic criteria (e.g., it has the form of a function declarator). Fixes <rdar://problem/9670557>. llvm-svn: 133854
* Introduce DelayedCleanupPool useful for simplifying clean-up of certain ↵Argyrios Kyrtzidis2011-06-221-3/+0
| | | | | | | | | | 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
* Implement a new type node, UnaryTransformType, designed to represent aAlexis Hunt2011-05-241-1/+1
| | | | | | | | type that turns one type into another. This is used as the basis to implement __underlying_type properly - with TypeSourceInfo and proper behavior in the face of templates. llvm-svn: 132017
* Implement __underlying_type for libc++.Alexis Hunt2011-05-191-0/+1
| | | | llvm-svn: 131633
* Fix a bunch of major problems with __unknown_anytype and properly testJohn McCall2011-04-091-0/+1
| | | | | | for them. The only major missing feature is references. llvm-svn: 129234
* Remove the last of ClassVirtSpecifiers.Anders Carlsson2011-03-251-27/+0
| | | | llvm-svn: 128279
* Remove 'new' from virt-specifier since it's going to be removed in the next ↵Anders Carlsson2011-03-251-2/+0
| | | | | | C++0x draft llvm-svn: 128271
* Insomniac refactoring: change how the parser allocates attributes so thatJohn McCall2011-03-241-3/+2
| | | | | | | | | AttributeLists do not accumulate over the lifetime of parsing, but are instead reused. Also make the arguments array not require a separate allocation, and make availability attributes store their stuff in augmented memory, too. llvm-svn: 128209
* Use ElaboratedType also for C.Abramo Bagnara2011-03-161-4/+25
| | | | llvm-svn: 127755
* Forgotten part of previous commit.Abramo Bagnara2011-03-121-4/+4
| | | | llvm-svn: 127536
* Teach libclang's token-annotation logic about context-sensitiveDouglas Gregor2011-03-081-0/+2
| | | | | | keywords for Objective-C+ and C++0x. llvm-svn: 127253
* Improved type source location for long long type.Abramo Bagnara2011-03-061-4/+6
| | | | llvm-svn: 127132
* Propagate new-style exception spec information to Declarator.Sebastian Redl2011-03-051-26/+39
| | | | llvm-svn: 127111
* Fix PR9390 in not one, but two ways:Douglas Gregor2011-03-031-1/+1
| | | | | | | | | | | | | | 1) When we do an instantiation of the injected-class-name type, provide a proper source location. This is just plain good hygiene. 2) When we're building a NestedNameSpecifierLoc from a CXXScopeSpec, only return an empty NestedNameSpecifierLoc if there's no representation. Both problems contributed to the horrible test case in PR9390 that I couldn't reduce down to something palatable. llvm-svn: 126961
* Refactor the construction of nested-name-specifiers withDouglas Gregor2011-02-281-167/+19
| | | | | | | | | | source-location information into a NestedNameSpecifierLocBuilder class, which lives within the AST library and centralize all knowledge of the format of nested-name-specifier location information here. No functionality change. llvm-svn: 126716
* Use NestedNameSpecifierLoc within out-of-line variables, function, andDouglas Gregor2011-02-251-1/+2
| | | | | | | tag definitions. Also, add support for template instantiation of NestedNameSpecifierLocs. llvm-svn: 126470
* Retain complete source-location information for C++Douglas Gregor2011-02-241-0/+189
| | | | | | | | | | | | nested-name-specifiers throughout the parser, and provide a new class (NestedNameSpecifierLoc) that contains a nested-name-specifier along with its type-source information. Right now, this information is completely useless, because we don't actually store the source-location information anywhere in the AST. Call this Step 1/N. llvm-svn: 126391
* Teach NestedNameSpecifier to keep track of namespace aliases the sameDouglas Gregor2011-02-241-0/+9
| | | | | | | | way it keeps track of namespaces. Previously, we would map from the namespace alias to its underlying namespace when building a nested-name-specifier, losing source information in the process. llvm-svn: 126358
* Teach CXXScopeSpec to handle the extension of a nested-name-specifierDouglas Gregor2011-02-241-0/+37
| | | | | | | | | with another component in the nested-name-specifiers, updating its representation (a NestedNameSpecifier) and source-location information (currently a SourceRange) simultaneously. This is groundwork for adding source-location information to nested-name-specifiers. llvm-svn: 126346
* Reject forbidden storage class specifiers in OpenCL. Patch by George Russell!Peter Collingbourne2011-02-111-1/+19
| | | | llvm-svn: 125399
* Rvalue references for *this: parse ref-qualifiers.Douglas Gregor2011-01-261-0/+4
| | | | llvm-svn: 124276
* Parse class-virt-specifier-seqs.Anders Carlsson2011-01-221-5/+4
| | | | llvm-svn: 124036
* More work on ClassVirtSpecifiers.Anders Carlsson2011-01-221-2/+31
| | | | llvm-svn: 124035
* Start stubbing out a ClassVirtSpecifiers class.Anders Carlsson2011-01-221-9/+8
| | | | llvm-svn: 124032
* Change ParseOptionalCXX0XVirtSpecifierSeq to take a VirtSpecifiers struct.Anders Carlsson2011-01-171-0/+28
| | | | | | | Enforce C++[class.mem]p8: A virt-specifier-seq shall contain at most one of each virt-specifier. llvm-svn: 123611
* Refactor how we collect attributes during parsing, and add slots for attributesJohn McCall2010-12-241-2/+4
| | | | | | | on array and function declarators. This is pretty far from complete, and I'll revisit it later if someone doesn't beat me to it. llvm-svn: 122535
* Refactoring of Diagnostic class.Argyrios Kyrtzidis2010-11-181-13/+12
| | | | | | | | | | | -Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class. -DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units. -The rest of the state in Diagnostic object is considered related and tied to one translation unit. -Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a SourceLocation instead of a FullSourceLoc. -Reflect the changes to various interfaces. llvm-svn: 119730
OpenPOWER on IntegriCloud