summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* tidy up comment.Chris Lattner2010-07-191-2/+1
| | | | llvm-svn: 108676
* remove CallInliner.cpp.Zhongxing Xu2010-07-191-0/+0
| | | | llvm-svn: 108670
* Add double close check to StreamChecker. Patch by Lei Zhang.Zhongxing Xu2010-07-191-4/+87
| | | | llvm-svn: 108669
* Reapply r108617.Zhongxing Xu2010-07-198-75/+73
| | | | llvm-svn: 108668
* Driver: Change the driver to take the path to the main executable, instead ofDaniel Dunbar2010-07-192-8/+7
| | | | | | | | | taking it in pieces. - Fixes a problem where the Clang executable path was not initialized properly on Win32, because sys::Path::getBasename() doesn't do what I always think it does. Imagine that, a sys::Path interface that is confusing! llvm-svn: 108667
* Driver: Fix a possible use after free.Daniel Dunbar2010-07-181-4/+4
| | | | llvm-svn: 108659
* Fix a goof in my previous patch -- not all of the builtins return a value, someChandler Carruth2010-07-181-1/+7
| | | | | | fixed return types. llvm-svn: 108657
* Fix mangling for static member variables of classes inside an extern "C"Eli Friedman2010-07-181-0/+4
| | | | | | | linkage specification. Not sure if this is the ideal fix, but I'm reasonably sure it's correct vs. gcc. llvm-svn: 108656
* When instantiating function definitions set parameter names to those used in ↵Peter Collingbourne2010-07-181-4/+8
| | | | | | | | | | | | | | template The rationale is that we are copying the entire definition including parameter names which may differ between the declaration and the definition. This is particularly important if any parameters are unnamed in the declaration, as a DeclRef to an unnamed ParmVarDecl would cause the pretty printer to produce invalid output. llvm-svn: 108643
* Improve the representation of the atomic builtins in a few ways. First, we makeChandler Carruth2010-07-182-64/+93
| | | | | | | | | | | | | | | their call expressions synthetically have the "deduced" types based on their first argument. We only insert conversions in the AST for arguments whose values require conversion to match the value type expected. This keeps PR7600 closed by maintaining the return type, but avoids assertions due to unexpected implicit casts making the type unsigned (test case added from Daniel). The magic is moved into the codegen for the atomic builtin which inserts the casts as needed at the IR level to raise the type to an integer suitable for the LLVM intrinsic. This shouldn't cause any real change in functionality, but now we can make the builtin be more truly polymorphic. llvm-svn: 108638
* BUILD_ARCHIVE is the default for libraries, no need to set it.Chris Lattner2010-07-1812-12/+0
| | | | llvm-svn: 108633
* Fix crash initializing a bit-field with a non-constant in a place where weEli Friedman2010-07-171-4/+3
| | | | | | try to evaluate the initializer as a constant. llvm-svn: 108632
* Check for casts to an incomplete type in C. Improves diagnostics for cast toEli Friedman2010-07-171-0/+4
| | | | | | | incomplete union (PR5692) and incomplete enum, and fixes obscure accepts-invalid on cast to incomplete struct. llvm-svn: 108630
* Added PCH/ASTImporter code for ObjCIvarDecl's field.Fariborz Jahanian2010-07-173-1/+4
| | | | llvm-svn: 108627
* 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
OpenPOWER on IntegriCloud