summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Pass parameters in the correct order when assembling an AtomicExpr.David Chisnall2012-03-291-1/+1
| | | | llvm-svn: 153665
* modern objective-c translator: fix up assortment ofFariborz Jahanian2012-03-291-10/+20
| | | | | | | visibility directives for a variety of exported meta-data symbols. // rdar://11144048 llvm-svn: 153663
* Revert r153613 as it's causing large compile-time regressions on the nightly ↵Chad Rosier2012-03-2913-205/+126
| | | | | | testers. llvm-svn: 153660
* Go back to using just the selector name for the getter and setterEric Christopher2012-03-291-8/+13
| | | | | | | | in the property debug info. Any more isn't necessary after all. rdar://11144023 llvm-svn: 153659
* Tidy.Eric Christopher2012-03-291-13/+19
| | | | llvm-svn: 153658
* Make ModuleMapParser own its TargetInfo, so it doesn't get leaked.Benjamin Kramer2012-03-291-2/+2
| | | | llvm-svn: 153648
* Add support for objc property decls according to the page at:Eric Christopher2012-03-291-17/+22
| | | | | | | | | | | http://llvm.org/docs/SourceLevelDebugging.html#objcproperty including type and DECL. Expand the getter and setter names into the fully qualified names. rdar://11144023 llvm-svn: 153640
* unwind.h fix for -fvisibility=hidden users. This fixes firefox build in a systemRafael Espindola2012-03-291-1/+13
| | | | | | | with libunwind installed. Patch by Jeffrey Yasskin! llvm-svn: 153633
* Reject 'template<typename...Ts> void f(Ts ...(x));'. Add a special-caseRichard Smith2012-03-291-11/+52
| | | | | | | diagnostic and a fix-it to explain to the user where the ellipsis is supposed to go. llvm-svn: 153622
* [arcmt] Fix a bug where a property in a class extension, that did not existArgyrios Kyrtzidis2012-03-291-3/+8
| | | | | | | | | in the interface, got its attribute rewritten twice, resulting in 'weakweak' or 'strongstrong'. rdar://11047179 llvm-svn: 153621
* Define __LITTLE_ENDIAN__ for le32, since "le" stands for little endian.Jan Wen Voung2012-03-291-0/+1
| | | | | | Add a test for this too. llvm-svn: 153616
* When we can't prove that the target of an aggregate copy isJohn McCall2012-03-2813-126/+205
| | | | | | | a complete object, the memcpy needs to use the data size of the structure instead of its sizeof() value. Fixes PR12204. llvm-svn: 153613
* [analyzer] Enable retry exhausted without inlining by default.Anna Zaks2012-03-284-8/+8
| | | | llvm-svn: 153591
* Fix the type of wchar_t on Solaris.David Chisnall2012-03-281-1/+1
| | | | | | Patch by Dmitri Shubin! llvm-svn: 153585
* objective-c: Improve diagnostics andFariborz Jahanian2012-03-282-10/+16
| | | | | | | provide 'fixit' hint when dictionary index is not of proper type. // rdar://11062080 llvm-svn: 153584
* [analyser] Stats checker: do not mark a node as exhausted if we willAnna Zaks2012-03-282-26/+20
| | | | | | | | retry without inlining. (+ other minor cleanups) llvm-svn: 153581
* [analyzer] Refactor: Use Decl when determining if the Block belongs toAnna Zaks2012-03-281-7/+6
| | | | | | | | the root function. (This is a bit cleaner then using the StackFrame.) llvm-svn: 153580
* CodeGen/CGDeclCXX.cpp: Twine-ize CreateGlobalInitOrDestructFunction().NAKAMURA Takumi2012-03-281-1/+1
| | | | llvm-svn: 153578
* Unify and fix our checking of C++ [dcl.meaning]p1's requirementsDouglas Gregor2012-03-283-92/+119
| | | | | | | | | concerning qualified declarator-ids. We now diagnose extraneous qualification at namespace scope (which we had previously missed) and diagnose these qualification errors for all kinds of declarations; it was rather uneven before. Fixes <rdar://problem/11135644>. llvm-svn: 153577
* When we form a new function/class template specialization, we firstDouglas Gregor2012-03-283-24/+27
| | | | | | | | | | | search for the specialization (in a folding set) and, if not found form a *Decl that is then inserted into that folding set. In rare cases, the folding set may be reallocated between the search and the insertion, causing a crash. No test case, because triggering rehashing consistently in a small test case is not feasible. Fixes <rdar://problem/11115071>. llvm-svn: 153575
* Fix suspicious comparison reported by PVS-Studio!Ted Kremenek2012-03-281-1/+1
| | | | llvm-svn: 153568
* Move the emission of strict enum range metadata behind a flag (the sameChandler Carruth2012-03-273-2/+9
| | | | | | | | | | | | | | | | | | | | | flag as GCC uses: -fstrict-enums). There is a *lot* of code making unwarranted assumptions about the underlying type of enums, and it doesn't seem entirely reasonable to eagerly break all of it. Much more importantly, the current state of affairs is *very* good at optimizing based upon this information, which causes failures that are very distant from the actual enum. Before we push for enabling this by default, I think we need to implement -fcatch-undefined-behavior support for instrumenting and trapping whenever we store or load a value outside of the range. That way we can track down the misbehaving code very quickly. I discussed this with Rafael, and currently the only important cases he is aware of are the bool range-based optimizations which are staying hard enabled. We've not seen any issue with those either, and they are much more important for performance. llvm-svn: 153550
* Introduce a new libclang API to determine the parent context of a codeDouglas Gregor2012-03-273-44/+103
| | | | | | | | | completion item. For example, if the code completion itself represents a declaration in a namespace (say, std::vector), then this API retrieves the cursor kind and name of the namespace (std). Implements <rdar://problem/11121951>. llvm-svn: 153545
* If we see '(...' where we're expecting an abstract-declarator, that doesn'tRichard Smith2012-03-272-7/+17
| | | | | | | necessarily mean we've found a function declarator. If the next token is not a ')', this is actually a parenthesized pack expansion. llvm-svn: 153544
* modern objective-c translator: writing objc boolean literals.Fariborz Jahanian2012-03-271-0/+19
| | | | | | // rdar://11124775 llvm-svn: 153535
* [analyzer] Add an option to re-analyze a dead-end path without inlining.Anna Zaks2012-03-276-71/+185
| | | | | | | | | | | | | | | | | | | | | The analyzer gives up path exploration under certain conditions. For example, when the same basic block has been visited more than 4 times. With inlining turned on, this could lead to decrease in code coverage. Specifically, if we give up inside the inlined function, the rest of parent's basic blocks will not get analyzed. This commit introduces an option to enable re-run along the failed path, in which we do not inline the last inlined call site. This is done by enqueueing the node before the processing of the inlined call site with a special policy encoded in the state. The policy tells us not to inline the call site along the path. This lead to ~10% increase in the number of paths analyzed. Even though we expected a much greater coverage improvement. The option is turned off by default for now. llvm-svn: 153534
* [analyzer] Stats checker: minor interprocedural tweaks.Anna Zaks2012-03-271-15/+20
| | | | | | | | | Report root function name with exhausted block diagnostic. Also, use stack frames, not just any location context when checking if the basic block is in the same context. llvm-svn: 153532
* [analyzer] Stats: Only count the number of times we run path sensitiveAnna Zaks2012-03-271-2/+3
| | | | | | | | analyzes. (This method can be called twice on the same function.) llvm-svn: 153531
* Add better support for $fp and $sp for mips inline asm support.Eric Christopher2012-03-271-5/+9
| | | | | | Patch by Jack Carter. llvm-svn: 153530
* [preprocessor] Handle correctly inclusion directives that have macro ↵Argyrios Kyrtzidis2012-03-272-18/+45
| | | | | | | | | | | | | | | | | | expansions, e.g "#include MACRO(STUFF)". -As an inclusion position for the included file, use the file location of the file where it was included but *after* the macro expansions. We want the macro expansions to be considered as before-in-translation-unit for everything in the included file. -In the preprocessing record take into account that only inclusion directives can be encountered as "out-of-order" (by comparing the start of the range which for inclusions is the hash location) and use binary search if there is an extreme number of macro expansions in the include directive. Fixes rdar://11111779 llvm-svn: 153527
* objective-c modern translator: move all inithooks into a single arrayFariborz Jahanian2012-03-271-24/+47
| | | | | | // rdar://11124354 llvm-svn: 153526
* Even more careful consideration of C++11 13.3.3.1p4. Fixes PR12241.Sebastian Redl2012-03-271-11/+21
| | | | llvm-svn: 153523
* Introduce a -cc1-level option -pubnames-dump, which simply dumps theDouglas Gregor2012-03-273-0/+76
| | | | | | | | list of identifiers that that 'public' names at the end of the translation unit, e.g., defined macros or identifiers with top-level names, in sorted order. Meant to support <rdar://problem/10921596>. llvm-svn: 153522
* Remove few if-then-else when both branches are theFariborz Jahanian2012-03-272-16/+8
| | | | | | same. pr12357. llvm-svn: 153515
* Commit patch reverted in r153454 with the modified testFariborz Jahanian2012-03-271-6/+11
| | | | | | case that I forgot to check in. llvm-svn: 153512
* Add cross-referencing comments to ParseDirectDeclarator to note thatRichard Smith2012-03-271-2/+6
| | | | | | | isConstructorDeclaration also needs updating for any extension to the grammar of a direct-declarator. llvm-svn: 153490
* Change RetainCountChecker to eagerly "escape" retained objects when they areTed Kremenek2012-03-271-0/+6
| | | | | | | | | | | | assigned to a struct. This is fallout from inlining results, which expose far more patterns where people stuff CF objects into structs and pass them around (and we can reason about it). The problem is that we don't have a general way to detect when values have escaped, so as an intermediate step we need to eagerly prune out such tracking. Fixes <rdar://problem/11104566>. llvm-svn: 153489
* When we see 'Class(X' or 'Class::Class(X' and we suspect that it names aRichard Smith2012-03-271-1/+36
| | | | | | | | | | | | | constructor, but X is not a known typename, check whether the tokens could possibly match the syntax of a declarator before concluding that it isn't a constructor. If it's definitely ill-formed, assume it is a constructor. Empirical evidence suggests that this pattern is much more often a constructor with a typoed (or not-yet-declared) type name than any of the other possibilities, so the extra cost of the check is not expected to be problematic. llvm-svn: 153488
* [driver] Fix unused argument warnings.Chad Rosier2012-03-261-11/+19
| | | | | | | | | | | | 1. Don't short-circuit conditional statements that are checking flags. Otherwise, the driver emits warnings about unused arguments. 2. -mkernel and -fapple-kext imply no exceptions, so claim exception related arguments now to avoid warnings about unused arguments. rdar://11120518 llvm-svn: 153478
* [driver] -mkernel implies -fno-common, so claim the arg to avoid an unusedChad Rosier2012-03-261-0/+1
| | | | | | | argument warning. Part of rdar://11120518 llvm-svn: 153470
* [driver] -mkernel implies -fno-builtin, so claim the arg to avoid an unusedChad Rosier2012-03-261-0/+1
| | | | | | | argument warning. Part of rdar://11120518 llvm-svn: 153469
* Add a special-case diagnostic for one of the more obnoxious special cases ofRichard Smith2012-03-261-0/+14
| | | | | | | | | | | | | | | unscoped enumeration members: an enumerator name which is visible in the out-of-class definition of a member of a templated class might not actually exist in the instantiation of that class, if the enumeration is also lexically defined outside the class definition and is explicitly specialized. Depending on the result of a CWG discussion, we may have a different resolution for a class of problems in this area, but this fixes the immediate issue of a crash-on-invalid / accepts-invalid (depending on +Asserts). Thanks to Johannes Schaub for digging into the standard wording to find how this case is currently specified to behave. llvm-svn: 153461
* Revert r153443 "objective-c modern translator: extern "C" exported", it ↵Daniel Dunbar2012-03-261-11/+6
| | | | | | fails in testing. llvm-svn: 153454
* [analyzer] Malloc: Allow a pointer to escape through OSAtomicEnqueue.Anna Zaks2012-03-261-1/+2
| | | | llvm-svn: 153453
* add tbaa metadata to vtable pointer loads/storesKostya Serebryany2012-03-265-2/+20
| | | | llvm-svn: 153447
* Move CodeCompletionBuilder's chunk adding methods out of line.Benjamin Kramer2012-03-262-38/+65
| | | | | | | This makes sense because chunk's ctor is also out of line and simplifies considerably when inlined with a constant parameter. Shrinks clang on i386-linux-Release+Asserts by 65k. llvm-svn: 153446
* When diagnosing an invalid out-of-line redeclaration, don't permitDouglas Gregor2012-03-262-5/+19
| | | | | | | typo correction to introduce a nested-name-specifier; we aren't prepared to handle it here. Fixes PR12297 / <rdar://problem/11075219>. llvm-svn: 153445
* objective-c modern translator: extern "C" exportedFariborz Jahanian2012-03-261-6/+11
| | | | | | symbols. // rdar://11103982 llvm-svn: 153443
* Canonicalize the declaration we write to a PCH file for anDouglas Gregor2012-03-261-1/+1
| | | | | | | | InjectedClassNameType; otherwise, it won't be properly wired to the original (canonical) declaration when it is deserialized. Fixes <rdar://problem/11112464>. llvm-svn: 153442
* Driver: Factor string vector push_back into a helper class and optimize it.Benjamin Kramer2012-03-261-264/+174
| | | | | | | | | | Due to lack of move semantics we would create a temporary std::string from the string literal, copy it into the vector and discard the temporary. This leads to massive code bloat, optimizing it saves 50k on i386-linux-Release+Asserts. While there add a two-element overload for push_back, simplifying code a bit. llvm-svn: 153441
OpenPOWER on IntegriCloud