summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Address minor FIXME in RedeclLink to contain a PointerIntPair instead of ↵David Blaikie2012-05-281-11/+10
| | | | | | | | derive from it. Use actual factory functions rather than derived classes acting as named constructors/factories. llvm-svn: 157588
* Fix mangling of integral template arguments between 1 and 10. Add a test caseCharles Davis2012-05-281-2/+2
| | | | | | for this. Reported by Timur Iskhodzhanov. llvm-svn: 157583
* Fix Lang's fix. This should fix the tests for +Asserts builds.Charles Davis2012-05-281-1/+1
| | | | llvm-svn: 157561
* adjust to mainline llvm API change.Chris Lattner2012-05-282-6/+3
| | | | llvm-svn: 157557
* Fix PR12960 by not attempting to correct cases when we're not actually ↵David Blaikie2012-05-281-1/+2
| | | | | | | | | | instantiatiating a template. This comes up in the begin/end calls of a range-for (see the included test case). Other suggestions are welcome, though this seems to do the trick without regressing anything. llvm-svn: 157553
* PR12962: Fix a rare use after free when collecting virtual overrides.Benjamin Kramer2012-05-271-2/+7
| | | | | | | The DenseMap reallocates after 64 insertions so this only happened in large test cases under very specific circumstances. llvm-svn: 157549
* Fix call to APSInt constructor - it doesn't take an initial value, just aLang Hames2012-05-271-3/+4
| | | | | | | | bitwidth and signedness. Also rename the variable to reflect its purpose. No test case - discovered during random code exploration. llvm-svn: 157547
* -Wdeprecated warning to include reference (as a note)Fariborz Jahanian2012-05-271-1/+5
| | | | | | to the declaration in this patch. // rdar://10893232 llvm-svn: 157537
* Use the SelectorSet typedef more widely throughout Sema.Benjamin Kramer2012-05-272-12/+12
| | | | | | While there make it a SmallPtrSet. llvm-svn: 157532
* Replace some custom hash combines with the standard stuff from DenseMapInfo.Benjamin Kramer2012-05-271-8/+5
| | | | llvm-svn: 157531
* clang/lib/Rewrite/Rewriter.cpp: Don't try to rename opened files on Win32. ↵NAKAMURA Takumi2012-05-271-0/+4
| | | | | | Win32 doesn't allow rename/removing opened files. llvm-svn: 157528
* Mangle template instantiations properly (as of VC 7.x) when compiling forCharles Davis2012-05-261-7/+132
| | | | | | | the Microsoft Visual C++ ABI. Currently limited to type and integral non-type arguments. Based on a patch by Timur Iskhodzhanov! llvm-svn: 157524
* Only emit one set of braces for __VERSION__, getClangFullRepositoryVersion ↵Benjamin Kramer2012-05-261-2/+1
| | | | | | | | already adds some. No test as the output is highly dependend on the local configuration. llvm-svn: 157520
* Change warning to error when property setter names conflict.Fariborz Jahanian2012-05-261-1/+1
| | | | | | // rdar://11528439 llvm-svn: 157517
* In response to some discussions on IRC, tweak the wording of the newRichard Smith2012-05-261-44/+112
| | | | | | | | | | | | | | | -Wsometimes-uninitialized diagnostics to make it clearer that the cause of the issue may be a condition which must always evaluate to true or false, rather than an uninitialized variable. To emphasize this, add a new note with a fixit which removes the impossible condition or replaces it with a constant. Also, downgrade the diagnostic from -Wsometimes-uninitialized to -Wconditional-uninitialized when it applies to a range-based for loop, since the condition is not written explicitly in the code in that case. llvm-svn: 157511
* Fix indentation.David Blaikie2012-05-261-3/+3
| | | | llvm-svn: 157510
* Don't offer '[[clang::fallthrough]];' fix-it when a fall-through occurs to aAlexander Kornienko2012-05-261-2/+5
| | | | | | switch label immediately followed by a 'break;'. llvm-svn: 157508
* fix codegen support for alloc_size attribute for static C++ methodsNuno Lopes2012-05-251-2/+4
| | | | | | add test case for C++ codegen llvm-svn: 157500
* Don't ignore linkage when ignoring visibility in the instantiation of aRafael Espindola2012-05-251-4/+12
| | | | | | method template. llvm-svn: 157486
* add CodeGen support for the alloc_size attributeNuno Lopes2012-05-251-0/+17
| | | | llvm-svn: 157483
* Don't ignore linkage when ignoring visibility in the instantiation of aRafael Espindola2012-05-251-8/+12
| | | | | | function template. llvm-svn: 157480
* [analyzer] Don't crash on LValBitCastAnna Zaks2012-05-251-2/+2
| | | | llvm-svn: 157478
* Consider the linkage for member class templates even when we have to ignoreRafael Espindola2012-05-251-6/+14
| | | | | | the visibility. llvm-svn: 157475
* When ignoring visibility in an instantiation, still consider the linkage.Rafael Espindola2012-05-251-10/+16
| | | | | | | Similar fixes for function and member template to follow as I write the testcases. llvm-svn: 157470
* Whitespace fixes.Rafael Espindola2012-05-251-5/+4
| | | | llvm-svn: 157469
* Split a chunk of -Wconditional-uninitialized warnings out into a separate flag,Richard Smith2012-05-252-29/+256
| | | | | | | | | | | -Wsometimes-uninitialized. This detects cases where an explicitly-written branch inevitably leads to an uninitialized variable use (so either the branch is dead code or there is an uninitialized use bug). This chunk of warnings tentatively lives within -Wuninitialized, in order to give it more visibility to existing Clang users. llvm-svn: 157458
* ensure value passed to is space is representable as unsigned charSeth Cantrell2012-05-251-8/+12
| | | | | | | if the value isn't an unsigned char or EOF behavior is undefined (and on Windows there's an assertion) llvm-svn: 157445
* Some cleanups around the uninitialized variables warning, and a FIXME. No ↵Richard Smith2012-05-242-22/+20
| | | | | | functional change. llvm-svn: 157440
* cleanup some code.Fariborz Jahanian2012-05-241-3/+2
| | | | llvm-svn: 157436
* objective-c: warn on use of property settersFariborz Jahanian2012-05-242-9/+26
| | | | | | | | backing two propeties because proprty names match except for first letter being of different case. // rdar://11528439, [PR12936]. llvm-svn: 157435
* Get rid of some non-ASCII en-dashes that crept in.Eli Friedman2012-05-241-7/+7
| | | | llvm-svn: 157434
* Implement the C++11 discarded value expression rules for volatile lvalues. ↵Eli Friedman2012-05-241-2/+70
| | | | | | <rdar://problem/10790820>. llvm-svn: 157420
* A minor tweak to the new volatile lvalue warning: don't warn on "(void)x", ↵Eli Friedman2012-05-241-25/+22
| | | | | | where "x" refers to a local variable. This should silence a useless warning in compiler-rt and other places. llvm-svn: 157414
* objective-c: Fixes a corner case and interesting bug.Fariborz Jahanian2012-05-241-1/+6
| | | | | | | | | Where diagnostic about unfound property is not issued in the context where a setter is looked up in situation in which name and property name differ in their first letter case. // rdar://11363363 llvm-svn: 157407
* Replace PTX back-end with NVPTX back-end in all places where Clang caresJustin Holewinski2012-05-242-158/+48
| | | | | | NV_CONTRIB llvm-svn: 157403
* [analyzer] Minor cleanup to checkers' help text.Anna Zaks2012-05-241-4/+4
| | | | llvm-svn: 157402
* [analyzer] Treat cast of array to reference in the same way as array toAnna Zaks2012-05-241-1/+1
| | | | | | | | pointer. Fixes one of the crashes reported in PR12874. llvm-svn: 157401
* [objcmt] Warn when modern objc migrator does not convert a NSNumber message ↵Argyrios Kyrtzidis2012-05-242-1/+8
| | | | | | | | because it requires a cast. rdar://11525138 llvm-svn: 157395
* fix Bug 12924Seth Cantrell2012-05-241-0/+16
| | | | | | | | | | | | | http://llvm.org/bugs/show_bug.cgi?id=12924 This issue was that the source location was pointing to a non-printable character and so CaretEnd was pointing one _column_ past the caret but not one _character_ past the caret. So the conversion between column and byte locations wasn't working (because the conversion is only valid from the first column or byte of a character). llvm-svn: 157372
* DR1152 / PR12931 / PR6177: A candidate function which requires binding a constRichard Smith2012-05-241-1/+1
| | | | | | | | volatile reference to a temporary is not viable. My interpretation is that DR1152 was a bugfix, not a rule change for C++11, so this is not conditional on the language mode. This matches g++'s behavior. llvm-svn: 157370
* Add a warning to diagnose statements in C++ like "*(volatile int*)x;". ↵Eli Friedman2012-05-243-52/+83
| | | | | | Conceptually, this is part of -Wunused-value, but I added a separate flag -Wunused-volatile-lvalue so it doesn't get turned off by accident with -Wno-unused-value. I also made a few minor improvements to existing unused value warnings in the process. <rdar://problem/11516811>. llvm-svn: 157362
* implement Sema support for the alloc_size attributeNuno Lopes2012-05-241-0/+76
| | | | | | | | Portions of this patch by Xi Wang. Reviewed by Jordy Rose. Thank you both. Codegen support will follow soon. llvm-svn: 157360
* modern objc translation: Add translation of @autoreleasepoolFariborz Jahanian2012-05-231-0/+25
| | | | | | statement. // rdar://11474836. llvm-svn: 157359
* Tooling: Canonicalize Key in IndexByFile[]. llvm::sys::path::native() may be ↵NAKAMURA Takumi2012-05-232-4/+12
| | | | | | | | used here. It fixes test/Tooling on Win32 hosts. llvm-svn: 157350
* [arcmt] Remove an unused -autorelease, without failing with error, for thisArgyrios Kyrtzidis2012-05-234-18/+129
| | | | | | | | | | | idiom that is used commonly in setters: [backingValue autorelease]; backingValue = [newValue retain]; // in general a +1 assign rdar://9914061 llvm-svn: 157347
* [driver] Have the crash diagnostics print the clang version information.Chad Rosier2012-05-231-0/+3
| | | | | | rdar://11518308 llvm-svn: 157346
* Adds the Refactoring library, which is a layer on top of the Tooling libraryManuel Klimek2012-05-232-1/+180
| | | | | | that allows easy refactoring across translation units. llvm-svn: 157331
* Correct the starting location for instantiations of field declarations whichRichard Smith2012-05-231-1/+1
| | | | | | | | | | | | | start with a cv-qualifier. DeclaratorDecl::getTypeSpecStartLoc() does not produce the location of the first type-specifier (the cv-qualifier) in this case, because we don't track source locations for cv-qualifiers. No test here: I've not found a way to test this with a lit-style test, and introducing a gtest test for this seems unwarranted. Suggestions welcome! Patch by Daniel Jasper! llvm-svn: 157311
* If the first argument of __builtin_object_size can be folded to a constantRichard Smith2012-05-232-4/+17
| | | | | | | | pointer, but such folding encounters side-effects, ignore the side-effects rather than performing them at runtime: CodeGen generates wrong code for __builtin_object_size in that case. llvm-svn: 157310
* Emit C++11 enum class information if it exists.Eric Christopher2012-05-231-1/+4
| | | | | | Part of rdar://11496790 llvm-svn: 157304
OpenPOWER on IntegriCloud