summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseExprCXX.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* More lambda work. Fixes a minor bug Richard pointed out, makes lookup for ↵Eli Friedman2012-01-061-5/+6
| | | | | | lambda parameters work correctly, recording more information into the AST. llvm-svn: 147650
* More lambda work. Tweak the Sema interface slightly. Start adding the ↵Eli Friedman2012-01-051-5/+2
| | | | | | pieces to build the lambda class and its call operator. Create an actual scope for the lambda body. llvm-svn: 147595
* Add an explicit LambdaExprContext to Declarator, to parallel ↵Eli Friedman2012-01-041-1/+1
| | | | | | BlockLiteralContext. Use it to ensure semantic analysis of types isn't confused by the lack of a type specifier. llvm-svn: 147522
* Fix messed-up indentation in r147515.Eli Friedman2012-01-041-7/+7
| | | | llvm-svn: 147517
* Stub out the Sema interface for lambda expressions, and change the parser to ↵Eli Friedman2012-01-041-17/+42
| | | | | | use it. Unconditionally error on lambda expressions because they don't work in any meaningful way yet. llvm-svn: 147515
* Remove unused variables.Rafael Espindola2011-12-251-1/+1
| | | | llvm-svn: 147260
* Silence gcc warnings.Benjamin Kramer2011-12-181-1/+1
| | | | llvm-svn: 146847
* Support decltype in pseudo destructors and dependent destructor calls.David Blaikie2011-12-161-0/+11
| | | | | | Reviewed by Eli Friedman. llvm-svn: 146738
* Decltype in non-pseudo (& non-dependent) dtor calls.David Blaikie2011-12-081-0/+10
| | | | llvm-svn: 146155
* Support decltype in nested-name-specifiers.David Blaikie2011-12-041-0/+16
| | | | llvm-svn: 145785
* Implement support for the __is_final type trait, to determine whetherDouglas Gregor2011-12-031-0/+1
| | | | | | | a class is marked 'final', from Alberto Ganesh Barbati! Fixes PR11462. llvm-svn: 145775
* Tighten up the conditions under which we consider ourselves to beDouglas Gregor2011-11-071-1/+1
| | | | | | | entering the context of a nested-name-specifier. Fixes <rdar://problem/10397846>. llvm-svn: 143967
* Remove duplicate word & unnecessary conditional.David Blaikie2011-11-071-3/+2
| | | | llvm-svn: 143907
* Improve the warning for cv-qualifiers on free functions, from Ahmed Charles!Douglas Gregor2011-10-191-0/+2
| | | | llvm-svn: 142478
* Implement -Wc++98-compat warnings for the parser.Richard Smith2011-10-151-0/+5
| | | | llvm-svn: 142056
* Don't warn about use of 'final' in ill-formed C++98 code which didn't useRichard Smith2011-10-151-1/+1
| | | | | | | 'final', and don't accept (then silently discard) braced init lists in C++98 new-expressions. llvm-svn: 142048
* Provide half floating point support as a storage only type.Anton Korobeynikov2011-10-141-0/+4
| | | | | | Lack of half FP was a regression compared to llvm-gcc. llvm-svn: 142016
* Introduce BalancedDelimiterTracker, to better track open/closeDouglas Gregor2011-10-121-105/+126
| | | | | | | delimiter pairs and detect when we exceed the implementation limit for nesting depth, from Aaron Ballman! llvm-svn: 141782
* Catch placeholder types in DefaultLvalueConversionJohn McCall2011-10-111-8/+0
| | | | | | | | | | | and DefaultFunctionArrayLvalueConversion. To prevent significant regression for should-this-be-a-call fixits, and to repair some such regression from the introduction of bound member placeholders, make those placeholder checks try to build calls appropriately. Harden the build-a-call logic while we're at it. llvm-svn: 141738
* Removing a bunch of dead returns/breaks after llvm_unreachables.David Blaikie2011-09-231-3/+1
| | | | llvm-svn: 140407
* Switch assert(0/false) llvm_unreachable.David Blaikie2011-09-231-6/+6
| | | | llvm-svn: 140367
* Fix a problem in digraph handling where "[:" might be treated as "<::" andRichard Trieu2011-09-201-1/+1
| | | | | | | erronously trigger the digraph correction fix-it. Include a new test to catch this in the future. llvm-svn: 140175
* Rename SourceLocation::getFileLocWithOffset -> getLocWithOffset.Argyrios Kyrtzidis2011-09-191-2/+2
| | | | | | It already works (and is useful with) macro locs as well. llvm-svn: 140057
* Changes to the name lookup have caused a regression in the digraph fix-it hint.Richard Trieu2011-09-191-22/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For instance: template <class T> void E() {}; class F {}; void test() { ::E<::F>(); E<::F>(); } Gives the following error messages: error: found '<::' after a template name which forms the digraph '<:' (aka '[') and a ':', did you mean '< ::'? ::E<::F>(); ^~~ < :: error: expected expression E<::F>(); ^ error: expected ']' note: to match this '[' E<::F>(); This patch adds the digraph fix-it check right before the name lookup, moves the shared checking code to a new function, and adds new tests to catch future regressions. llvm-svn: 140039
* 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
* Support code-completion for C++ inline methods and ObjC buffering methods.Argyrios Kyrtzidis2011-09-041-7/+6
| | | | | | | | | | | | | | 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
* Parsing of C++0x lambda expressions, from John Freeman with help fromDouglas Gregor2011-08-041-0/+261
| | | | | | David Blaikie! llvm-svn: 136876
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-1/+1
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Properly implement the scope restriction on the NRVO forDouglas Gregor2011-07-061-2/+2
| | | | | | | | | | | | throw-expressions, such that we don't consider the NRVO when the non-volatile automatic object comes from outside the innermost try scope (C++0x [class.copymove]p13). In C++98/03, our ASTs were incorrect but it didn't matter because IR generation doesn't actually apply the NRVO here. In C++0x, however, we were moving from an object when in fact we should have copied from it. Fixes PR10142 / <rdar://problem/9714312>. llvm-svn: 134548
* [ARC] When casting from a pointer to an objective-c object with known ↵Argyrios Kyrtzidis2011-07-011-7/+12
| | | | | | | | | | | | ownership, if the cast type has no ownership specified, implicitly "transfer" the ownership of the cast'ed type to the cast type: id x; (NSString**)&x; // Casting as (__strong NSString**). llvm-svn: 134275
* [ARC] When casting from a pointer to an objective-c object with known ↵Argyrios Kyrtzidis2011-07-011-3/+10
| | | | | | | | | | | | | | ownership, if the cast type has no ownership specified, implicitly "transfer" the ownership of the cast'ed type to the cast type: id x; static_cast<NSString**>(&x); // Casting as (__strong NSString**). This currently only works for C++ named casts, C casts to follow. llvm-svn: 134273
* Introduce Declarator::CXXNewContext and remove 'AutoAllowedInTypeName' parameterArgyrios Kyrtzidis2011-06-281-1/+1
| | | | | | from Sema::GetTypeForDeclarator. No functionality change. llvm-svn: 133987
* Introduce DelayedCleanupPool useful for simplifying clean-up of certain ↵Argyrios Kyrtzidis2011-06-221-9/+2
| | | | | | | | | | 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
* Parse C++0x generalized initializers.Sebastian Redl2011-06-051-22/+38
| | | | llvm-svn: 132662
* Implement __underlying_type for libc++.Alexis Hunt2011-05-191-0/+1
| | | | llvm-svn: 131633
* Implement the __is_trivially_copyable type traitAlexis Hunt2011-05-131-0/+1
| | | | llvm-svn: 131270
* Rename "hasTrivialConstructor" to "hasTrivialDefaultConstructor" andAlexis Hunt2011-05-091-1/+2
| | | | | | | modify the semantics slightly to accomodate default constructors (I hope). llvm-svn: 131087
* Fix a double free when parsing malformed code. Fixes rdar://9173693.Argyrios Kyrtzidis2011-05-031-2/+5
| | | | llvm-svn: 130775
* Remove the type traits UTT_IsLvalueExpr and UTT_IsRvalueExpr.Chandler Carruth2011-05-011-2/+0
| | | | | | | | | | | As might be surmised from their names, these aren't type traits, they're expression traits. Amazingly enough, they're expression traits that we have, and fully implement. These "type" traits are even parsed from the same tokens as the expression traits. Luckily, the parser only tried the expression trait parsing for these tokens, so this was all just a pile of dead code. llvm-svn: 130643
* Upgrade Microsoft's __int8, __int16, __int32 and __int64 types from builtin ↵Francois Pichet2011-04-281-0/+4
| | | | | | | | | | | | | | defines to real types. Otherwise statements like: __int64 var = __int64(0); would be expanded to: long long var = long long(0); and fail to compile. llvm-svn: 130369
* Implementation of Embarcadero array type traitsJohn Wiegley2011-04-281-0/+52
| | | | | | | | | | Patch authored by John Wiegley. These are array type traits used for parsing code that employs certain features of the Embarcadero C++ compiler: __array_rank(T) and __array_extent(T, Dim). llvm-svn: 130351
* t/clang/type-traitsJohn Wiegley2011-04-271-4/+31
| | | | | | | | | | Patch authored by John Wiegley. These type traits are used for parsing code that employs certain features of the Embarcadero C++ compiler. Several of these constructs are also desired by libc++, according to its project pages (such as __is_standard_layout). llvm-svn: 130342
* Simplify the parser's handling of Sema::ClassifyName() for types, byDouglas Gregor2011-04-271-2/+1
| | | | | | | creating a type-annotation token rather than jumping into the declaration parsing. llvm-svn: 130293
* t/clang/expr-traitsJohn Wiegley2011-04-251-0/+30
| | | | | | | | | Patch authored by David Abrahams. These two expression traits (__is_lvalue_expr, __is_rvalue_expr) are used for parsing code that employs certain features of the Embarcadero C++ compiler. llvm-svn: 130122
* Add support for '__is_literal_type' spelling of the existingChandler Carruth2011-04-241-0/+1
| | | | | | | | '__is_literal' type trait for GCC compatibility. At least one relased version if libstdc++ uses this name for the trait despite it not being documented anywhere. llvm-svn: 130078
* Implement basic __is_trivial type-trait support, enough to close PR9472.Chandler Carruth2011-04-231-0/+1
| | | | | | | | | | | | | | | | | | This introduces a few APIs on the AST to bundle up the standard-based logic so that programmatic clients have access to exactly the same behavior. There is only one serious FIXME here: checking for non-trivial move constructors and move assignment operators. Those bits need to be added to the declaration and accessors provided. This implementation should be enough for the uses of __is_trivial in libstdc++ 4.6's C++98 library implementation. Ideas for more thorough test cases or any edge cases missing would be appreciated. =D llvm-svn: 130057
* Sort the type traits in a few places where they weren't previouslyChandler Carruth2011-04-231-1/+1
| | | | | | sorted in order to prepare for adding some new ones. llvm-svn: 130056
* Fix an assertion when code-completing, rdar://9288730 & http://llvm.org/PR9728.Argyrios Kyrtzidis2011-04-231-1/+6
| | | | llvm-svn: 130042
* For consistency, change suffix from war_ to warn_ for some Microsoft ↵Francois Pichet2011-04-221-1/+1
| | | | | | warnings I introduced lately. llvm-svn: 129986
* Parse GNU-style attributes prior to the type-id/new-type-id in a C++Douglas Gregor2011-04-151-0/+4
| | | | | | "new" expression. This matches GCC's parser. Test is forthcoming. llvm-svn: 129592
OpenPOWER on IntegriCloud