summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Update the remaining comments in Frontend to 'expansion'.Chandler Carruth2011-07-141-2/+2
| | | | llvm-svn: 135150
* Add extra sanity checking in FormatString::matchesType() that we are ↵Ted Kremenek2011-07-141-3/+6
| | | | | | comparing integers to integers. This happens not to be an issue now, but the extra check helps future proof in case of future refactorings. llvm-svn: 135147
* NestedMacroInstantiations -> NestedMacroExpansionsChandler Carruth2011-07-142-8/+8
| | | | | | | | | | | | | | | | This is switches all the interfaces points (and most of the commenst / local variables I saw on my way through) regarding the NestedMacroInstantiations bit. The libclang enums corresponding to this state were renamed, but a legacy enum was added with the old name, and the same value to keep existing clients working. I've added a documentation blurb for it, but let me know if there is a canonical way to document legacy elemenst of the libclang interface. No functionality changed here, even in tests. llvm-svn: 135141
* Move the rest of the preprocessor terminology from 'instantiate' andChandler Carruth2011-07-146-36/+35
| | | | | | | | | | | | | variants to 'expand'. This changed a couple of public APIs, including one public type "MacroInstantiation" which is now "MacroExpansion". The rest of the codebase was updated to reflect this, especially the libclang code. Two of the C++ (and thus easily changed) libclang APIs were updated as well because they pertained directly to the old MacroInstantiation class. No functionality changed. llvm-svn: 135139
* Convert terminology in the Lexer from 'instantiate' and variants toChandler Carruth2011-07-144-30/+31
| | | | | | | | | 'expand'. Also update the public API it provides to the new term, and propagate that update to the various clients. No functionality changed. llvm-svn: 135138
* Switch the TokenLexer's terminology from various forms of 'instantiate'Chandler Carruth2011-07-141-21/+21
| | | | | | | | | to 'expand' for macros. Only comments and uses local to the TokenLexer are updated. No functionality changed. llvm-svn: 135137
* Switch all local code and comments from '[Ii]nstantiat(ion|ed)' toChandler Carruth2011-07-141-14/+14
| | | | | | | | '[Ee]xpan(sion|ded)' in the TextDiagnosticPrinter. No functionality changed. llvm-svn: 135136
* Switch the diagnostic messages about macros to use the terms 'expanded'Chandler Carruth2011-07-141-2/+2
| | | | | | | | | and 'expansions' rather than 'instantiated' and 'contexts'. This is the first of several patches migrating Clang's terminology surrounding macros from 'instantiation' to 'expansion'. llvm-svn: 135135
* Reapply r135075, but modify format-strings.c and format-strings-fixit.c test ↵Ted Kremenek2011-07-141-10/+9
| | | | | | cases to be more portable with an explicit target triple. llvm-svn: 135134
* Revert r135075, "format string checking: long and int have the same widths ↵NAKAMURA Takumi2011-07-141-9/+10
| | | | | | | | on 32-bit, so we shouldn't warn about using" It fails on freebsd, mingw and msvc10. llvm-svn: 135129
* Add a hackaround to avoid the crash in PR10355. However, our recoveryDouglas Gregor2011-07-141-2/+4
| | | | | | | is still terrible here because typo correction is not behaving well in the presence of overloaded functions. llvm-svn: 135128
* [arcmt] Make sure migrating to ARC works even if '-fobjc-arc' is included in ↵Argyrios Kyrtzidis2011-07-141-1/+9
| | | | | | command-line flags. rdar://9567824 llvm-svn: 135115
* PR8800: When building a conversion to A& using a member operatorA&(), do not ↵Richard Smith2011-07-131-4/+4
| | | | | | require A to be a complete type. llvm-svn: 135101
* Reapply r134946 with fixes. Tested on Benjamin testcase and other test-suite ↵Bruno Cardoso Lopes2011-07-131-2/+10
| | | | | | failures. llvm-svn: 135091
* Add 'mutable' to the function declarator chunk, to be used whenDouglas Gregor2011-07-135-0/+6
| | | | | | parsing lambda expressions, from John Freeman! llvm-svn: 135090
* Fix an incorrect namespace typo-correction diagnostic, from KaelynDouglas Gregor2011-07-131-3/+0
| | | | | | Uhrain! Fixes PR10318. llvm-svn: 135086
* Emit debug info for extended vectors.Devang Patel2011-07-131-3/+0
| | | | llvm-svn: 135083
* format string checking: long and int have the same widths on 32-bit, so we ↵Ted Kremenek2011-07-131-10/+9
| | | | | | | | shouldn't warn about using an "int" format specifier with a "long" type in 32-bit. llvm-svn: 135075
* Enforce access control for the destructor in a new[] expression and markJohn McCall2011-07-131-1/+11
| | | | | | | it as used. Otherwise, we can fail to instantiate or validate the destructor, which can lead to crashes in IR gen like PR10351. llvm-svn: 135073
* [arcmt] Add weak/unsafe_unretained for "@property (readonly)" when we are ↵Argyrios Kyrtzidis2011-07-131-1/+1
| | | | | | @synthesizing it. llvm-svn: 135067
* [arcmt] For properties rewrite 'assign' -> 'weak or unsafe_unretained', ↵Argyrios Kyrtzidis2011-07-133-135/+239
| | | | | | | | 'retain' -> 'strong', and add 'weak or unsafe_unretained' when 'assign' is missing. rdar://9496219&9602589. llvm-svn: 135065
* With -Wselector, don't warn about unimplemented optional methodFariborz Jahanian2011-07-131-5/+8
| | | | | | | used in @selector expression because, well, their implementation is optional. // rdar://9545564 llvm-svn: 135057
* Don't crash if defining -dealloc in a category.John McCall2011-07-131-3/+5
| | | | llvm-svn: 135054
* In debugger mode, make ObjC message sends to unknown selectors returnJohn McCall2011-07-133-6/+16
| | | | | | | | | | __unknown_anytype, and rewrite such message sends correctly. I had to bite the bullet and actually add a debugger support mode for this one, which is a bit unfortunate, but there really isn't anything else I could imagine doing; this is clearly just debugger-specific behavior. llvm-svn: 135051
* objc++: Some level of covariance is allowed in ObjC properties.Fariborz Jahanian2011-07-131-6/+9
| | | | | | | Make it also available in ObjC++ propeties. Use common code for objc and objc++ so they don't diverge. // rdar://9740328 llvm-svn: 135050
* Re-relax conversion specifier checking for printf format strings and ↵Ted Kremenek2011-07-131-3/+4
| | | | | | conversion specifiers. My recent change was a mistake. llvm-svn: 135048
* Fix inversion in argument type checking for format strings with conversion ↵Ted Kremenek2011-07-131-2/+2
| | | | | | specifiers for character types. llvm-svn: 135046
* Okay, that rule about zero-length arrays applies to destroyingJohn McCall2011-07-133-53/+38
| | | | | | them, too. llvm-svn: 135038
* Arrays are permitted to be zero-length in some situations.John McCall2011-07-132-27/+27
| | | | llvm-svn: 135036
* Make the integer-range analysis recognize ^= correctly,John McCall2011-07-131-2/+11
| | | | | | | | | and (while I'm at it) teach it to grok the results of simple assignments. The first is PR10336. llvm-svn: 135034
* Convert the standard default-construction loops to use phis andJohn McCall2011-07-132-84/+103
| | | | | | partial destruction. llvm-svn: 135033
* per john's advice, speculatively lower uses of forward-declared enums toChris Lattner2011-07-131-5/+12
| | | | | | | i32. They almost always end up this way in the end anyway, and if we get lucky, this avoids generating some bitcasts. llvm-svn: 135032
* PR10337 reminds me that calls return values, lets handle them justChris Lattner2011-07-131-3/+9
| | | | | | like arguments. Thanks PR10337! :) llvm-svn: 135030
* Aggressive dead code elimination.John McCall2011-07-132-80/+0
| | | | llvm-svn: 135029
* Generalize the routine for destroying an object with staticJohn McCall2011-07-132-49/+55
| | | | | | | storage duration, then explicitly exempt ownership-qualified types from it. llvm-svn: 135028
* Eliminate an incomplete/incorrect attempt to provide support for C++0xDouglas Gregor2011-07-131-5/+2
| | | | | | | unrestricted unions, which ended up attempting to initialize objects in a union (which CodeGen isn't prepared for). Fixes PR9683. llvm-svn: 135027
* Silliness with commas, as reported at http://blog.regehr.org/archives/558 . ↵Eli Friedman2011-07-131-1/+5
| | | | | | As it turns out, this is my fault for not noticing this was an issue when I was looking at this a long time ago. :( llvm-svn: 135026
* Switch delete[] IR-generation over to the destroy framework,John McCall2011-07-131-78/+38
| | | | | | which implicitly makes it EH-safe as well. llvm-svn: 135025
* When compiling ::delete for a class with a virtual destructor, callDouglas Gregor2011-07-131-4/+19
| | | | | | | | the complete destructor and then invoke the global delete operator. Previously, we would invoke the deleting destructor, which calls the wrong delete operator. Fixes PR10341. llvm-svn: 135021
* Correctly set up the list of virtual base classes for a CXXRecordDecl. ↵Richard Smith2011-07-121-16/+2
| | | | | | Previously we got the source range wrong for everything in the virtual bases list. llvm-svn: 135011
* revert fix for // rdar://9740328Fariborz Jahanian2011-07-121-1/+1
| | | | llvm-svn: 135010
* Revert r134946Bruno Cardoso Lopes2011-07-121-8/+1
| | | | llvm-svn: 135004
* [arcmt] Also avoid 'weak' for forward references to objc classes.Argyrios Kyrtzidis2011-07-121-0/+2
| | | | llvm-svn: 135003
* [arcmt] Before applying '__weak' check whether the objc class is annotated ↵Argyrios Kyrtzidis2011-07-124-4/+62
| | | | | | | | | | with objc_arc_weak_reference_unavailable or is in a list of classes not supporting 'weak'. rdar://9489367. llvm-svn: 135002
* objc++: Some level of covariance is allowed in ObjC properties.Fariborz Jahanian2011-07-122-1/+5
| | | | | | Make it also available in ObjC++ propeties. // rdar://9740328 llvm-svn: 135001
* Generalize Cleanup::Emit's "isForEH" parameter into a setJohn McCall2011-07-1212-54/+89
| | | | | | of flags. No functionality change. llvm-svn: 134997
* Implement -MG. Fixes PR9613Peter Collingbourne2011-07-125-8/+53
| | | | llvm-svn: 134996
* Add more compiler workarounds. Should fix the build with old GCCs and MSVC.Benjamin Kramer2011-07-121-6/+10
| | | | llvm-svn: 134995
* In ARC mode, consider Objective-C lifetime types (object pointers andDouglas Gregor2011-07-121-2/+0
| | | | | | | | | | | | | | block pointers) that don't have any qualification to be POD types. We were previously considering them to be non-POD types, because this was convenient in C++ for is_pod-like traits. However, we now end up inferring lifetime in such cases (template arguments infer __strong), so it is not necessary. Moreover, we want rvalues of object type (which have their lifetime stripped) to be PODs to allow, e.g., va_arg(arglist, id) to function properly. Fixes <rdar://problem/9758798>. llvm-svn: 134993
* Fix a bug where a local variable named 'self' is causingFariborz Jahanian2011-07-125-23/+13
| | | | | | | implicit ivar accesses to go through the 'self' variable rather than the real 'self' for the method. // rdar://9730771 llvm-svn: 134992
OpenPOWER on IntegriCloud