summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Add another terrible VC++ compatibility hack: allow users toChris Lattner2010-07-171-2/+7
| | | | | | | allow invalid token pastes (when in -fms-extensions mode) with -Wno-invalid-token-paste llvm-svn: 108624
* Revert r108617, it broke the build.Benjamin Kramer2010-07-177-42/+75
| | | | llvm-svn: 108621
* Prepare the analyzer for the callee in another translation unit:Zhongxing Xu2010-07-177-75/+42
| | | | | | | Let AnalysisContext contain a TranslationUnit. Let CallEnter refer to an AnalysisContext instead of a FunctionDecl. llvm-svn: 108617
* Fix '<rdar://problem/8202272> __imag passed non-complex should not crash' by ↵Ted Kremenek2010-07-171-2/+1
| | | | | | removing a bogus assertion. llvm-svn: 108602
* Patch to synthesize property ivars on demand asFariborz Jahanian2010-07-173-3/+60
| | | | | | | part of the new property synthesis by default. wip. llvm-svn: 108599
* The GNU-runtime ObjC personality function doesn't let us rethrow with URR forJohn McCall2010-07-172-43/+92
| | | | | | multiple reasons. Rethrow with _objc_exception_throw instead. Fixes PR7656. llvm-svn: 108595
* Fix APFloat assertion failure in IdempotentOperationChecker resulting in havingTed Kremenek2010-07-171-4/+6
| | | | | | an APFloat with different "float semantics" than the compared float literal. llvm-svn: 108590
* Teach the PCH reader to load the dependency when encountering a chain ↵Sebastian Redl2010-07-171-77/+86
| | | | | | metadata record. WIP llvm-svn: 108578
* When checking whether to bind an expression to a temporary, don't bind Obj-C ↵Anders Carlsson2010-07-161-20/+8
| | | | | | message send expressions who call methods that return references. llvm-svn: 108559
* Separate out the initial loading of a PCH so that loading chained PCHs can ↵Sebastian Redl2010-07-161-32/+51
| | | | | | reuse it. llvm-svn: 108551
* Improved false positive rate for the idempotent operations checker and moved ↵Tom Care2010-07-166-11/+82
| | | | | | | | | | it into the default path-sensitive analysis options. - Added checks for static local variables, self assigned parameters, and truncating/extending self assignments - Removed command line option (now default with --analyze) - Updated test cases to pass with idempotent operation warnings llvm-svn: 108550
* Hook up warning for an incomplete scanlist in scanf format strings.Ted Kremenek2010-07-162-2/+10
| | | | llvm-svn: 108542
* First baby steps towards PCHReader being able to keep track of multiple PCH ↵Sebastian Redl2010-07-163-20/+50
| | | | | | files. WIP llvm-svn: 108537
* When performing template name lookup for a dependent member accessDouglas Gregor2010-07-161-5/+5
| | | | | | | | | expression such as the "foo" in "this->blah.foo<1, 2>", and we can't look into the type of "this->blah" (e.g., because it is dependent), look into the local scope of a template of the same name. Fixes <rdar://problem/8198511>. llvm-svn: 108531
* Add a little more data to chained PCHs. WIPSebastian Redl2010-07-163-36/+55
| | | | llvm-svn: 108528
* Revert Microsoft-specific override of the "typedef requires a name"Douglas Gregor2010-07-161-4/+3
| | | | | | | diagnostic. Instead, put it and the "declaration does not declare anything" warning into -Wmissing-declarations. llvm-svn: 108527
* Suppress the "typedef requires a name" warning in Microsoft-extensions modeDouglas Gregor2010-07-161-2/+3
| | | | llvm-svn: 108526
* Treat template parameters as part of the declaration-specifiers for theJohn McCall2010-07-163-8/+22
| | | | | | | | purpose of access control. Fixes PR7644. I can't actually find anything directly justifying this, but it seems obvious. llvm-svn: 108521
* Sema: Fix a bug with #pragma options align=reset, reset against an empty stackDaniel Dunbar2010-07-161-14/+23
| | | | | | is well defined, it resets to the default alignment. llvm-svn: 108508
* Butcher a perfectly reasonable diagnostic to pacify old versions of SWIG.Chandler Carruth2010-07-161-5/+5
| | | | llvm-svn: 108505
* Add the main scanf-parsing logic that I meant to include in my previous commit.Ted Kremenek2010-07-161-0/+214
| | | | llvm-svn: 108502
* Add missing header file.Ted Kremenek2010-07-161-0/+71
| | | | llvm-svn: 108501
* Add most of the boilerplate support for scanf format string checking. This ↵Ted Kremenek2010-07-165-606/+729
| | | | | | | | | | | | | includes handling the parsing of scanf format strings and hooking the checking into Sema. Most of this checking logic piggybacks on what was already there for checking printf format strings, but the checking logic has been refactored to support both. What is left to be done is to support argument type checking in format strings and of course fix the usual tail of bugs that will follow. llvm-svn: 108500
* Add builtin definition for scanf, including extending the builtin encoding toTed Kremenek2010-07-162-0/+26
| | | | | | | | | | represent builtins that have the "scanf" attribution (via the format attribute) just like we do with printf functions. Follow-up work is needed to add similar support for fscanf et al. This is to support format-string checking for scanf functions. llvm-svn: 108499
* Fix for PR3800: make sure not to evaluate the expression for a read-writeEli Friedman2010-07-162-16/+32
| | | | | | asm operand twice. llvm-svn: 108489
* IRgen: Support user defined attributes on block runtime functions.Daniel Dunbar2010-07-162-0/+60
| | | | | | | | | | | | | | | | | | - This issue here is that /usr/include/Blocks.h wants to define some of the block runtime globals as weak, depending on the target. This doesn't work in Clang because we aren't using the AST decl for these globals. - The fix is a pretty gross hack which just watches all the decls for the specific blocks globals we need to know about; if we see one we use it, otherwise we use the hand coded type. In time, I would like to clean this up by changing IRgen to ask Sema/AST for the decl, which would then be lazily loaded from the builtin table if necessary. This could be used in a whole host of places in IRgen and would get rid of a lot of grotty hand coding of LLVM IR; however, we need some extra Sema support for this as well as support for builtin global variables. llvm-svn: 108482
* IRgen: Move blocks runtime interfaces to CodeGenModule.Daniel Dunbar2010-07-164-67/+80
| | | | llvm-svn: 108481
* Suppress !+Asserts warning.Daniel Dunbar2010-07-161-0/+1
| | | | llvm-svn: 108480
* When deferring the emission of declarations with initializers in C++, rememberJohn McCall2010-07-154-7/+39
| | | | | | | the order they appeared in the translation unit. If they get emitted, put them in their proper order. Fixes rdar://problem/7458115 llvm-svn: 108477
* Set "optimization is ON" and supply other optional parameters. This helps ↵Devang Patel2010-07-151-2/+6
| | | | | | codegenerator preserve info in case the symbol is deleted. llvm-svn: 108471
* Don't suppress the emission of available_externally functions markedDouglas Gregor2010-07-151-1/+2
| | | | | | with always_inline attribute. Thanks to Howard for the tip. llvm-svn: 108469
* Mark implementation generated methods as artificial.Devang Patel2010-07-151-1/+2
| | | | | | Tested by namespace.exp and virtfunc.exp from gdb testsuite. llvm-svn: 108468
* After some discussion, the ABI list settled on a much more sensible manglingJohn McCall2010-07-151-6/+3
| | | | | | for string literals. llvm-svn: 108464
* When we're performing tentative parsing to determine whether theDouglas Gregor2010-07-151-15/+8
| | | | | | | | | | | | | | | | parser is looking at a declaration or an expression, use a '=' to conclude that we are parsing a declaration. This is wrong. However, our previous approach of finding a comma after the '=' is also wrong, because the ',' could be part of a template-argument-list. So, for now we're going to use the same wrong heuristic as GCC and Visual C++, because less real-world code is likely to be broken this way. I've opened PR7655 to keep track of our wrongness; note also the XFAIL'd test. Fixes <rdar://problem/8193163>. llvm-svn: 108459
* Reinstate the scalar-cast-to-const-reference improvements, this timeDouglas Gregor2010-07-151-12/+43
| | | | | | | | | with the proper spelling of "non-class prvalue". Silly me, I think class rvalues were xvalues rather than prvalues! Hah hah hah. llvm-svn: 108443
* Make the "unused result" warning a warning about run-time behavior, soDouglas Gregor2010-07-151-1/+1
| | | | | | that we don't warn when there isn't going to be any computation anyway. llvm-svn: 108442
* Revert r108431 and r108433 (the cast-to-const-reference fixes), whichDouglas Gregor2010-07-151-42/+12
| | | | | | broke nightlytest. llvm-svn: 108439
* Revert 108220 and subsequent patch. Devang Patel2010-07-151-12/+0
| | | | | | This is not required (I am not 100% sure why) but method.exp from gdb testsuite flagged regression due to this patch. llvm-svn: 108434
* Spell isPRValue() properly.Douglas Gregor2010-07-151-2/+1
| | | | llvm-svn: 108433
* Teach CodeGenFunction::EmitCastLValue() to handle casts to an lvalueDouglas Gregor2010-07-151-12/+43
| | | | | | | | that involve binding a reference to a pure rvalue temporary (e.g., not a class temporary), by creating a new temporary and copying the result there. Fixes PR6024. llvm-svn: 108431
* CK_BitCast is not an lvalue bitcast any longerDouglas Gregor2010-07-151-1/+0
| | | | llvm-svn: 108428
* Driver/Darwin: Resolve deployment target defaulting to be more predictable;Daniel Dunbar2010-07-151-13/+4
| | | | | | assume we are targetting OS X unless an explicit option is given. llvm-svn: 108426
* CodeGen: Tweak ABI handling for Minix, patch by Kees van Reeuwijk!Daniel Dunbar2010-07-151-1/+0
| | | | llvm-svn: 108423
* restrict the && -> & warning to cover a case daniel noted.Chris Lattner2010-07-151-0/+4
| | | | | | | Don't warn about "logically bool" expressions on the RHS, even if they fold to a constant. llvm-svn: 108388
* Add a callback interface that allows interested parties to get notified ↵Sebastian Redl2010-07-144-34/+50
| | | | | | whenever PCHReader deserializes a type or decl (and possibly other things in the future). Have PCHWriter implement these callbacks as noops and register to receive them if we're chaining PCHs. This will allow PCHWriter to track the IDs of these things, which it needs to write the dependent files. WIP llvm-svn: 108383
* CodeGen/ObjC/NeXT: Fix Obj-C message send to match llvm-gcc when choosingDaniel Dunbar2010-07-146-32/+48
| | | | | | | | whether to use objc_msgSend_fpret; the choice is target dependent, not Obj-C ABI dependent. - <rdar://problem/8139758> arm objc _objc_msgSend_fpret bug llvm-svn: 108379
* There is another implementation of PCHReaderListener around. Update it to ↵Sebastian Redl2010-07-141-3/+5
| | | | | | the new interface. llvm-svn: 108377
* When determining whether an overload set with explicit templateDouglas Gregor2010-07-141-1/+2
| | | | | | | arguments only resolves to a single specialization, make sure to look through using declarations. Fixes PR7641. llvm-svn: 108376
* Pass StringRefs by value.Benjamin Kramer2010-07-144-8/+8
| | | | llvm-svn: 108375
* When there are extra or missing template parameter lists in a templateDouglas Gregor2010-07-143-9/+37
| | | | | | | | | | definition, we're likely going to end up breaking the invariants of the template system, e.g., that the depths of template parameter lists match up with the nesting template of the template. So, make sure we mark such ill-formed declarations as invalid or don't even build them at all. llvm-svn: 108372
OpenPOWER on IntegriCloud