summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Reorganize the value-dominance metaprogram and introduce a specializationJohn McCall2011-01-282-121/+119
| | | | | | for CodeGen's RValue type. llvm-svn: 124483
* Convert the exception-freeing cleanup over to the conditional cleanups code,John McCall2011-01-284-119/+88
| | | | | | | | | fixing a crash which probably nobody was ever going to see. In doing so, fix a horrendous number of problems with the conditional-cleanups code. Also, make conditional cleanups re-use the cleanup's activation variable, which avoids some unfortunate repetitiveness. llvm-svn: 124481
* PR9037: Allow override, final, and new as an extension on inline members.Nico Weber2011-01-282-6/+17
| | | | llvm-svn: 124477
* Give OpaqueValueExpr a source location, because its source locationDouglas Gregor2011-01-287-9/+17
| | | | | | | | might be queried in places where we absolutely require a valid location (e.g., for template instantiation). Fixes some major brokenness in the use of __is_convertible_to. llvm-svn: 124465
* Allow elision of invocations of move constructors from temporary objects.Douglas Gregor2011-01-271-1/+1
| | | | llvm-svn: 124455
* When producing IR for a lvalue-to-rvalue cast *as an lvalue*, onlyDouglas Gregor2011-01-271-2/+3
| | | | | | | | | non-class prvalues actually require the realization of a temporary. For everything else, we already have an lvalue (or class prvalue) in the subexpression. Note: we're missing some move elision in this case. I'll tackle that next. llvm-svn: 124453
* Fix an objective-c rewriter bug rewriting a __block Fariborz Jahanian2011-01-271-5/+7
| | | | | | | variable declaration of a struct declared type. // rdar://8918702 llvm-svn: 124451
* Teach the evaluation of the __is_convertible_to trait to translateDouglas Gregor2011-01-273-26/+68
| | | | | | | | | | | | | | | access control errors into SFINAE errors, so that the trait provides enough support to implement the C++0x std::is_convertible type trait. To get there, the SFINAETrap now knows how to set up a SFINAE context independent of any template instantiations or template argument deduction steps, and (separately) can set a Sema flag to translate access control errors into SFINAE errors. The latter can also be useful if we decide that access control errors during template argument deduction should cause substitution failure (rather than a hard error) as has been proposed for C++0x. llvm-svn: 124446
* Separate the access-control diagnostics from other diagnostics that do not ↵Douglas Gregor2011-01-272-5/+11
| | | | | | have SFINAE behavior. llvm-svn: 124441
* Document some serious badness in our evaluation of the type traits: we need ↵Douglas Gregor2011-01-271-0/+2
| | | | | | to be sure we have complete types in many cases llvm-svn: 124428
* Implement the Microsoft __is_convertible_to type trait, modeling theDouglas Gregor2011-01-275-4/+54
| | | | | | | | | | semantics after the C++0x is_convertible type trait. This implementation is not 100% complete, because it allows access errors to be hard errors (rather than just evaluating false). Original patch by Steven Watanabe! llvm-svn: 124425
* Fixed parameter names.Abramo Bagnara2011-01-272-9/+9
| | | | llvm-svn: 124408
* Revert r124217 because it didn't catch the actual error case it was trying toJeffrey Yasskin2011-01-273-25/+1
| | | | | | | | | | catch: lock_guard(my_mutex); declares a variable instead of creating a temporary. llvm-svn: 124398
* Teach -Wuninitialized about indirect goto. Fixes PR 9071.Ted Kremenek2011-01-271-2/+2
| | | | llvm-svn: 124394
* Wire up attributes 'ns_consumed' and 'cf_consumed' in the static analyzer's ↵Ted Kremenek2011-01-272-1/+36
| | | | | | ObjC retain/release checker. llvm-svn: 124386
* Allow #pragma unused to be used on global variables like gcc. Fixes ↵Argyrios Kyrtzidis2011-01-271-2/+2
| | | | | | rdar://8793832. llvm-svn: 124383
* Teach ASTUnit to save the specified target features, sinceDouglas Gregor2011-01-271-0/+6
| | | | | | | TargetInfo::CreateTargetInfo() mangles the target options in a way that is not idempotent. Fixes <rdar://problem/8807535>. llvm-svn: 124382
* [analyzer] Fix crash when handling dot syntax on 'super'.Argyrios Kyrtzidis2011-01-271-6/+6
| | | | llvm-svn: 124376
* TextDiagnosticPrinter.cpp: Show diagnostics as far as possible even with ↵Axel Naumann2011-01-273-77/+102
| | | | | | | | | | | | | | invalid PresomedLoc, instead of just silencing it. FileManager.cpp: Allow virtual files in nonexistent directories. FileManager.cpp: Close FileDescriptor for virtual files that correspond to actual files. FileManager.cpp: Enable virtual files to be created even for files that were flagged as NON_EXISTENT_FILE, e.g. by a prior (unsuccessful) addFile(). ASTReader.cpp: Read a PCH even if the original source files cannot be found. Add a test for reading a PCH of a file that has been removed and diagnostics referencing that file. llvm-svn: 124374
* Do a proper recursive lookup when deciding whether a class's usualJohn McCall2011-01-278-71/+154
| | | | | | | | | deallocation function has a two-argument form. Store the result of this check in new[] and delete[] nodes. Fixes rdar://problem/8913519 llvm-svn: 124373
* Fix whitespace.NAKAMURA Takumi2011-01-279-2110/+2109
| | | | llvm-svn: 124364
* 7bit-ize.NAKAMURA Takumi2011-01-279-36/+36
| | | | llvm-svn: 124363
* Hook up attribute ns_consumes_self in the ObjC retain/release checker in the ↵Ted Kremenek2011-01-272-0/+10
| | | | | | static analyzer. llvm-svn: 124360
* Tweak -Wuninitialized fixit for '_Bool' types to be initialized to 0, and ↵Ted Kremenek2011-01-271-1/+1
| | | | | | C++ 'bool' types to false. llvm-svn: 124356
* Teach -Wuninitialized to suggest "= false" for initializing bool variables.Ted Kremenek2011-01-271-0/+3
| | | | llvm-svn: 124352
* Notes on dynamic array cookies in MSVC.John McCall2011-01-271-0/+23
| | | | | | My thanks to chapuni for his help in investigating this. llvm-svn: 124351
* Import three interesting bits that apply only to C++ methods.John McCall2011-01-271-0/+3
| | | | llvm-svn: 124349
* Teach -Wuninitialized not to assert when analyzingTed Kremenek2011-01-271-8/+15
| | | | | | blocks that reference captured variables. llvm-svn: 124348
* Teach -Wuninitialized about ObjC fast enumeration loops.Ted Kremenek2011-01-271-9/+38
| | | | llvm-svn: 124347
* When we run into a template parameter that should have a defaultDouglas Gregor2011-01-271-1/+19
| | | | | | | | | | argument but doesn't (because previous template parameters had default arguments), clear out all of the default arguments so that we maintain the invariant that a template parameter has a default argument only if subsequence template parameters also have default arguments. Fixes a crash-on-invalid <rdar://problem/8913649>. llvm-svn: 124345
* Cope with parenthesized function declarators when emitting aDouglas Gregor2011-01-271-2/+10
| | | | | | diagnostic about ref-qualifiers where they do not belong. llvm-svn: 124344
* Fix a horrible bug in our handling of C-style casting, where a C-styleDouglas Gregor2011-01-275-41/+52
| | | | | | | | | | | derived-to-base cast that also casts away constness (one of the cases for static_cast followed by const_cast) would be treated as a bit-cast rather than a derived-to-base class, causing miscompiles and heartburn. Fixes <rdar://problem/8913298>. llvm-svn: 124340
* Fixes an IRgen bug where __block variable isFariborz Jahanian2011-01-263-10/+35
| | | | | | | referenced in the block-literal initializer of that variable. // rdar://8893785 llvm-svn: 124332
* Add __has_feature(cxx_reference_qualified_functions); update tests andDouglas Gregor2011-01-261-0/+1
| | | | | | documentation. llvm-svn: 124322
* Implement the restriction that a function with a ref-qualifier cannotDouglas Gregor2011-01-261-1/+17
| | | | | | | | overload a function without a ref-qualifier (C++0x [over.load]p2). This, apparently, completes the implementation of rvalue references for *this. llvm-svn: 124321
* Handle C-style casts to rvalue reference types that cast away constness.Douglas Gregor2011-01-261-4/+14
| | | | llvm-svn: 124319
* Improve the extension warning for the use of ref-qualifiers, toDouglas Gregor2011-01-261-2/+2
| | | | | | | distinguish them from rvalue references. Using the rvalue-references warning was weird when the ref-qualifier was '&'. llvm-svn: 124316
* When mangling a qualified array type, push the qualifiers down to theJohn McCall2011-01-261-11/+25
| | | | | | element type. Fixes rdar://problem/8913416. llvm-svn: 124315
* Rvalue references for *this: explicitly keep track of whether aDouglas Gregor2011-01-261-8/+12
| | | | | | | | | reference binding is for the implicit object parameter of a member function with a ref-qualifier. My previous comment, that we didn't need to track this explicitly, was wrong: we do in fact get rvalue-references-prefer-rvalues overloading with ref-qualifiers. llvm-svn: 124313
* Rvalue references for *this: implement the implicit conversion rulesDouglas Gregor2011-01-261-43/+104
| | | | | | | for the implicit object argument to a non-static member function with a ref-qualifier (C++0x [over.match.funcs]p4). llvm-svn: 124311
* Un-nest the meat of this function.John McCall2011-01-261-54/+53
| | | | llvm-svn: 124310
* Fix some obvious bugs in the conditional-cleanup code and then make theJohn McCall2011-01-263-56/+15
| | | | | | dtor cleanup use it. llvm-svn: 124309
* Rvalue references for *this: allow functions to be overloaded based onDouglas Gregor2011-01-261-2/+3
| | | | | | | | | the presence and form of a ref-qualifier. Note that we do *not* yet implement the restriction in C++0x [over.load]p2 that requires either all non-static functions with a given parameter-type-list to have a ref-qualifier or none of them to have a ref-qualifier. llvm-svn: 124297
* Rvalue references for *this: add name mangling for ref-qualifiers,Douglas Gregor2011-01-261-4/+28
| | | | | | | | using rules that I just made up this morning. This encoding has now been proposed to the Itanium C++ ABI group for inclusion, but of course it's still possible that the mangling will change. llvm-svn: 124296
* Rvalue references for *this: tentative parsing and template argument deduction.Douglas Gregor2011-01-262-5/+9
| | | | llvm-svn: 124295
* Reference qualifiers for *this: implement C++0x [expr.mptr.oper]p6,Douglas Gregor2011-01-261-0/+26
| | | | | | | the restrictions on .* and ->* for ref-qualified pointer-to-member functions. llvm-svn: 124294
* Clean up the C++0x __has_feature tests. Specifically:Douglas Gregor2011-01-261-10/+11
| | | | | | | | | | | | | - Don't publicize a C++0x feature through __has_feature if we aren't in C++0x mode (even if the feature is available only with a warning). - "auto" is not implemented well enough for its __has_feature to be turned on. - Fix the test of C++0x __has_feature to actually test what we're trying to test. Searching for the substring "foo" when our options are "foo" and "no_foo" doesn't work :) llvm-svn: 124291
* Reinstate r124236 (tweaking the rvalue-reference overload resolutionDouglas Gregor2011-01-261-18/+53
| | | | | | rules), now that we've actually have a clean build for me to sully. llvm-svn: 124290
* Rvalue references for *this: Douglas Gregor2011-01-268-17/+86
| | | | | | | | | | | | - Add ref-qualifiers to the type system; they are part of the canonical type. Print & profile ref-qualifiers - Translate the ref-qualifier from the Declarator chunk for functions to the function type. - Diagnose mis-uses of ref-qualifiers w.r.t. static member functions, free functions, constructors, destructors, etc. - Add serialization and deserialization of ref-qualifiers. llvm-svn: 124281
* Teach -Wreturn-type that destructors can appearTed Kremenek2011-01-261-11/+14
| | | | | | | | | after a 'return' in a CFGBlock. This accidentally was working before, but the false assumption that 'return' always appeared at the end of the block was uncovered by a recent change. llvm-svn: 124280
OpenPOWER on IntegriCloud