summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Parser: Don't manage TemplateAnnotationIds in a delayed cleanup pool.Benjamin Kramer2012-04-143-6/+26
| | | | | | | | | | Instead, make it the allocation function's responsibility to add them to a list and clear it when a top-level decl is finished. This plugs leakage of TemplateAnnotationIds. DelayedCleanupPool is ugly and unused, remove it. llvm-svn: 154743
* ASTUnit: Don't clone the new DiagnosticConsumer, causing it to get leaked.Benjamin Kramer2012-04-141-2/+4
| | | | llvm-svn: 154739
* Directly store TypoResultsMaps in the TypoEditDistanceMap, getting rid of ↵Benjamin Kramer2012-04-141-27/+15
| | | | | | manual deletion. llvm-svn: 154736
* Add an AttributedStmt type to represent a statement with C++11 attributesRichard Smith2012-04-1417-108/+235
| | | | | | | | | attached. Since we do not support any attributes which appertain to a statement (yet), testing of this is necessarily quite minimal. Patch by Alexander Kornienko! llvm-svn: 154723
* Delete the TypoResultsMap when erasing the pointer to it.Benjamin Kramer2012-04-131-7/+6
| | | | | | | This manual deleting is error-prone, but we can't just put an OwningPtr in a std::map :( llvm-svn: 154707
* Don't enter cleanups for unreachable variables. It's impossible toJohn McCall2012-04-132-0/+6
| | | | | | | | jump into these scopes, and the cleanup-entering code sometimes wants to do some operations first (e.g. a GEP), which can leave us with unparented IR. llvm-svn: 154684
* modern objective-c translator: Fixes translation ofFariborz Jahanian2012-04-131-1/+4
| | | | | | | __typeof which is a regression by reverting r154360. // rdar://11233924 llvm-svn: 154679
* Avoid string thrashing when we can concatenate them in the final buffer.Benjamin Kramer2012-04-131-8/+8
| | | | llvm-svn: 154678
* Serialize and deserialize some missing bits from BlockDecl.John McCall2012-04-132-0/+7
| | | | llvm-svn: 154676
* Remove the unused, unmaintained, incomplete 'Index' library.Douglas Gregor2012-04-1322-1798/+3
| | | | llvm-svn: 154672
* modern objective-c translator: When translatingFariborz Jahanian2012-04-131-37/+23
| | | | | | | | call to 'super' use __rw_objc_super as type of the 'super' meta-data instead of objc_super. // rdar://11239894 llvm-svn: 154670
* Make control flow more explicit for rebuilding property reference ↵Douglas Gregor2012-04-131-7/+7
| | | | | | expressions without their OpaqueValueExprs llvm-svn: 154669
* Remove the -cc1-level option "-pubnames-dump". Such things should stayDouglas Gregor2012-04-133-76/+0
| | | | | | out of the tree and use the tooling infrastructure. llvm-svn: 154668
* super and class property reference expressions don't need to beDouglas Gregor2012-04-131-2/+7
| | | | | | rebuilt. Fixes <rdar://problem/11052352>. llvm-svn: 154667
* Step forward with supporting of ARM homogenous aggregates:Anton Korobeynikov2012-04-134-43/+119
| | | | | | | - Handle unions - Handle C++ classes llvm-svn: 154664
* Implement __atomic_fetch_nand and __atomic_nand_fetch to complete our set ofRichard Smith2012-04-133-1/+15
| | | | | | GNU __atomic builtins. llvm-svn: 154659
* PR12500: Improve the wording of the diagnostic for a redefinition of a nameRichard Smith2012-04-131-1/+1
| | | | | | in the wrong namespace scope. Patch by Jonathan Sauer! llvm-svn: 154656
* Support -Wc++98-compat-pedantic as requested:Seth Cantrell2012-04-131-4/+4
| | | | | | http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120409/056126.html llvm-svn: 154655
* Fix a trivial oversight with apple-kext static local destructorsJohn McCall2012-04-131-0/+1
| | | | | | and add a test case. llvm-svn: 154653
* When we're flagging a protected scope to prevent jumps into theJohn McCall2012-04-131-10/+14
| | | | | | | | shadow of a block expression with non-trivial destructed cleanups, we should flag that in the enclosing function, not in the block that we're about to pop. llvm-svn: 154646
* C++11 no longer requires files to end with a newlineSeth Cantrell2012-04-131-1/+2
| | | | llvm-svn: 154643
* Implement the missing pieces needed to support libstdc++4.7's <atomic>:Richard Smith2012-04-134-30/+245
| | | | | | | | | | | | | | | | | | | | | | | | __atomic_test_and_set, __atomic_clear, plus a pile of undocumented __GCC_* predefined macros. Implement library fallback for __atomic_is_lock_free and __c11_atomic_is_lock_free, and implement __atomic_always_lock_free. Contrary to their documentation, GCC's __atomic_fetch_add family don't multiply the operand by sizeof(T) when operating on a pointer type. libstdc++ relies on this quirk. Remove this handling for all but the __c11_atomic_fetch_add and __c11_atomic_fetch_sub builtins. Contrary to their documentation, __atomic_test_and_set and __atomic_clear take a first argument of type 'volatile void *', not 'void *' or 'bool *', and __atomic_is_lock_free and __atomic_always_lock_free have an argument of type 'const volatile void *', not 'void *'. With this change, libstdc++4.7's <atomic> passes libc++'s atomic test suite, except for a couple of libstdc++ bugs and some cases where libc++'s test suite tests for properties which implementations have latitude to vary. llvm-svn: 154640
* objective-c modern translator: beautify rewrite ofFariborz Jahanian2012-04-121-7/+7
| | | | | | struct __rw_objc_super; no functionality change. llvm-svn: 154632
* Warn on 64-to-32 for source value of x bits where 64 >= x > 32.David Blaikie2012-04-121-1/+1
| | | | | | | | | The codepath already only works for source bits > target bits, it's just that it was testing for the source expr bits to be exactly 64. This meant simple cases (int i = x_long / 2) were missed & ended up under the general -Wconversion warning, which a user might not have enabled. llvm-svn: 154626
* [analyzer] PCH deserialization optimization.Anna Zaks2012-04-123-81/+100
| | | | | | | | | | | | | | | | We should not deserialize unused declarations from the PCH file. Achieve this by storing the top level declarations during parsing (HandleTopLevelDecl ASTConsumer callback) and analyzing/building a call graph only for those. Tested the patch on a sample ObjC file that uses PCH. With the patch, the analyzes is 17.5% faster and clang consumes 40% less memory. Got about 10% overall build/analyzes time decrease on a large Objective C project. A bit of CallGraph refactoring/cleanup as well.. llvm-svn: 154625
* objective-c literals: Issue warning and ignoreFariborz Jahanian2012-04-121-3/+7
| | | | | | | when BOOL is not of an intergal type when boolean literals are used. // rdar://11231426 llvm-svn: 154619
* s/isAtomicConversion/tryAtomicConversion/g, per Jordy's suggestion.Douglas Gregor2012-04-121-11/+11
| | | | llvm-svn: 154613
* Fix some i1/i8 confusion within _Atomic(bool) in IR generation, bothDouglas Gregor2012-04-123-6/+17
| | | | | | | | | | | | | | in general (such an atomic has boolean representation) and specifically for IR generation of __c11_atomic_init. The latter also means actually using initialization semantics for this initialization, rather than just creating a store. On a related note, make sure we actually put in non-atomic-to-atomic conversions when performing an implicit conversion sequence. IR generation is far too kind here, but we still want the ASTs to make sense. llvm-svn: 154612
* Include lambda capture init expressions in CFG.Ted Kremenek2012-04-121-1/+17
| | | | llvm-svn: 154611
* Fix CFGBuilder to not include the body of a LambdaExpr in the CFG of the ↵Ted Kremenek2012-04-121-3/+5
| | | | | | enclosing function. llvm-svn: 154607
* MIPS: Initialize MIPS CPU's name by default value.Simon Atanasyan2012-04-121-3/+6
| | | | | | | Otherwise MipsTargetInfoBase::getDefaultFeatures() might return an invalid features set with an empty feature name. llvm-svn: 154606
* Compute standard conversion sequences for conversions to atomicDouglas Gregor2012-04-122-11/+53
| | | | | | | | | | | | types. The second and third conversions in the sequence are based on the conversion for the underlying type, so that we get sensible overloading behavior for, e.g., _Atomic(int) vs. _Atomic(float). As part of this, actually implement the lvalue-to-rvalue conversion for atomic types. There is probably a pile of code in SemaExpr that can now be deleted, but I haven't tracked it down yet. llvm-svn: 154596
* objective-c numeric literal: type of boolean isFariborz Jahanian2012-04-121-1/+13
| | | | | | | that of typedef BOOL if found. // rdar://11231426 llvm-svn: 154595
* modern objective-c translator. ifdef'out Fariborz Jahanian2012-04-121-0/+5
| | | | | | | __weak and __block when rewriting. // rdar://11236342 llvm-svn: 154592
* Fix the signatures for the _mm256_storeu2_* intrinsics.Chad Rosier2012-04-121-3/+3
| | | | | | PR12532 llvm-svn: 154591
* Changed all direct calls to CompletionConsumer.reset(..) to go callErik Verbruggen2012-04-121-4/+4
| | | | | | | | CompilerInstance::setCodeCompletionConsumer instead, in order to change the SkipFunctionBodies flag accordingly. Also fixed setCodeCompletionConsumer to take a reset() to null into account. llvm-svn: 154585
* Added a flag to the parser to skip method bodies.Erik Verbruggen2012-04-127-28/+32
| | | | llvm-svn: 154584
* Implement support for 18 of the GNU-compatible __atomic builtins.Richard Smith2012-04-124-195/+440
| | | | | | | | | | | | This is not quite sufficient for libstdc++'s <atomic>: we still need __atomic_test_and_set and __atomic_clear, and may need a more complete __atomic_is_lock_free implementation. We are also missing an implementation of __atomic_always_lock_free, __atomic_nand_fetch, and __atomic_fetch_nand, but those aren't needed for libstdc++. llvm-svn: 154579
* These functions too have no prototypes. Audited the rest of Sema forEric Christopher2012-04-122-4/+4
| | | | | | | | FunctionDecl::Create calls as well. rdar://11079003 llvm-svn: 154578
* static functions have a need for mangled name debug information too.Eric Christopher2012-04-121-3/+4
| | | | | | | | | The mangler doesn't like non-prototyped functions so only use a mangled name for prototyped functions. rdar://11079003 llvm-svn: 154570
* The copy and destroy helper functions aren't prototyped, don't call themEric Christopher2012-04-121-2/+2
| | | | | | so. llvm-svn: 154569
* modern objective-c translator. Fixes a mis-translation whenFariborz Jahanian2012-04-111-0/+4
| | | | | | of a __block struct object. // rdar://11230308 llvm-svn: 154566
* [analyzer] dynamic_cast Simplify null value generation.Anna Zaks2012-04-111-8/+2
| | | | | | | | As per Jordy's review. Creating a symbol here is more flexible; however I could not come up with an example where it was needed. (What constrains can be added on of the symbol constrained to 0?) llvm-svn: 154542
* modern objective-c translator. Fixes a translation bug when Fariborz Jahanian2012-04-111-18/+6
| | | | | | | first ivar in the list is a bitfield. // rdar://11229770 llvm-svn: 154534
* Part of PR10101: after a parse error in a declaration, try harder to find theRichard Smith2012-04-111-4/+62
| | | | | | | right place to pick up parsing. In C++, this had a tendency to skip everything declared within headers if the TU starts with garbage. llvm-svn: 154530
* Provide, and document, a set of __c11_atomic_* intrinsics to implement C11'sRichard Smith2012-04-114-19/+34
| | | | | | | | | <stdatomic.h> header. In passing, fix LanguageExtensions to note that C11 and C++11 are no longer "upcoming standards" but are now actually standardized. llvm-svn: 154513
* Make __atomic_init() (soon to be __c11_atomic_init()) work with non-scalar ↵David Chisnall2012-04-111-4/+15
| | | | | | types. llvm-svn: 154507
* Clean up last commit as per dgregor's comments.David Chisnall2012-04-111-7/+7
| | | | llvm-svn: 154501
* Allow c++ initialisers to initialise _Atomic fields.David Chisnall2012-04-111-0/+7
| | | | llvm-svn: 154499
* Enable debug info for objective c implementations that may not haveEric Christopher2012-04-113-1/+22
| | | | | | | | an explicit instance variable. rdar://10590352 llvm-svn: 154481
OpenPOWER on IntegriCloud