summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Implement some framework for defaulted constructors.Alexis Hunt2011-05-057-11/+39
| | | | | | There's some unused stuff for now. llvm-svn: 130912
* Frontend: Fix a crash in CC_LOG_DIAGNOSTICS handling.Daniel Dunbar2011-05-051-2/+2
| | | | llvm-svn: 130909
* Look through block pointers and ObjC object pointersMatt Beaumont-Gay2011-05-051-4/+3
| | | | llvm-svn: 130906
* With invalid overloaded operators, we can get into funny cases whereDouglas Gregor2011-05-051-0/+9
| | | | | | | | | | the overloading of member and non-member functions results in arity mismatches that don't fit well into our overload-printing scheme. This only happens for invalid code (which breaks the arity invariants for these cases), so just suppress the diagnostic rather than inventing anything new. Fixes <rdar://problem/9222009>. llvm-svn: 130902
* Preserve the full name of the file, so that '-c -o foo.pic.o' producesNick Lewycky2011-05-054-15/+11
| | | | | | foo.pic.gcno instead of foo.gcno. llvm-svn: 130899
* Change cycle detection to be based off of a warning flag.Alexis Hunt2011-05-053-9/+6
| | | | llvm-svn: 130898
* When adding KVC code completions, keep track of all of the selectorsDouglas Gregor2011-05-041-23/+30
| | | | | | | that we've previously seen, both in declared methods and from previous KVC completions, to eliminate duplicates. Fixes <rdar://problem/9162207>. llvm-svn: 130890
* there i fixed itAlexis Hunt2011-05-043-50/+120
| | | | | | | | | Increase robustness of the delegating constructor cycle detection mechanism. No more infinite loops on invalid or logic errors leading to false results. Ensure that this is maintained correctly accross serialization. llvm-svn: 130887
* ASTUnit::LoadFromASTFile(): recover the resources from an ASTReader if it ↵Ted Kremenek2011-05-041-0/+10
| | | | | | crashes during PCH validation. llvm-svn: 130886
* Clean up Sema::BuildCXXNestedNameSpecifier()'s creation of TypeLocDouglas Gregor2011-05-041-7/+15
| | | | | | | | information. Rather than looking at the declaration kind to figure out what TypeLoc to build, look at the type; it makes so much more sense. Fixes <rdar://problem/9086649>. llvm-svn: 130882
* Implement Sema::isExprCallable.Matt Beaumont-Gay2011-05-042-107/+139
| | | | | | | | We can use this to produce nice diagnostics (and try to fixit-and-recover) in various cases where we might see "MyFunction" instead of "MyFunction()". The changes in SemaExpr are an example of how to use isExprCallable. llvm-svn: 130878
* When converting an integral template argument value to a non-typeDouglas Gregor2011-05-041-15/+22
| | | | | | | template parameter of type 'bool', force the value to be zero or one. Fixes <rdar://problem/9169404>. llvm-svn: 130873
* Pack ivar offsets together.Bill Wendling2011-05-041-1/+1
| | | | | | | | | | Ivar offsets for synthesized ivars are wrong, which could end up with a large number of dirty pages because of ivar fixups at runtime. When we pack all of the synthesized ivars into the same section, it limits the number of dirty pages created. Place them in the "__DATA,__objc_ivar" section. <rdar://problem/9374905> llvm-svn: 130870
* Record where the GCOV data files should be placed.Nick Lewycky2011-05-044-0/+37
| | | | llvm-svn: 130866
* Simplification noticed by Chris.Bill Wendling2011-05-041-3/+2
| | | | llvm-svn: 130864
* More ms_struct bitfield stuff:Fariborz Jahanian2011-05-042-1/+33
| | | | | | | | Adjacent bit fields are packed into the same 1-, 2-, or 4-byte allocation unit if the integral types are the same size. // rdar://8823265. llvm-svn: 130851
* From Vassil Vassilev:Axel Naumann2011-05-041-0/+2
| | | | | | Like in r126648, provide (empty) default implementation for pure virtual getMemoryBufferSizes(). Not all use cases have meaningful implementations. llvm-svn: 130838
* Add C++ include paths for libstdc++ with Ubuntu 11.04 and Debian's ↵Axel Naumann2011-05-041-0/+10
| | | | | | | | libstdc++6-4.5, as collected from http://packages.ubuntu.com/search?mode=exactfilename&suite=natty&section=all&arch=any&searchon=contents&keywords=c%2B%2Blocale.h and http://packages.debian.org/wheezy/armel/libstdc++6-4.5-dev/filelist Fixes compilation with clang++ on Ubuntu 11.04. llvm-svn: 130837
* Implement a better version of delegating constructor cycle detection.Alexis Hunt2011-05-043-20/+65
| | | | | | | | | | | | | This is more efficient as it's all done at once at the end of the TU. This could still get expensive, so a flag is provided to disable it. As an added bonus, the diagnostics will now print out a cycle. The PCH test is XFAILed because we currently can't deal with a note emitted in the header and I, being tired, see no other way to verify the serialization of delegating constructors. We should probably address this problem /somehow/ but no good solution comes to mind. llvm-svn: 130836
* No, fix this use after free properly.Nick Lewycky2011-05-041-3/+2
| | | | llvm-svn: 130833
* Convert the non-temporal store builtins to LLVM-native IR.Bill Wendling2011-05-041-0/+17
| | | | llvm-svn: 130830
* Fix use after free through StringRef.Nick Lewycky2011-05-041-2/+3
| | | | llvm-svn: 130828
* Type prefixes of unresolved-names should only be mangled as unresolved-typesJohn McCall2011-05-041-15/+92
| | | | | | | | if they match that production, i.e. if they're template type parameters or decltypes (or, as an obvious case not yet described in the ABI document, if they're template template parameters applied to template arguments). llvm-svn: 130824
* Implement serialization of delegating constructors.Alexis Hunt2011-05-042-15/+31
| | | | llvm-svn: 130822
* Ensure that delegating constructor loop detection uses canonicalAlexis Hunt2011-05-041-2/+2
| | | | | | declarations. llvm-svn: 130821
* When tag lookup finds something ambiguous, and we're defining a newDouglas Gregor2011-05-041-0/+13
| | | | | | | | | | | | | tag, filter out those ambiguous names that we found if they aren't within the declaration context where this newly-defined tag will be visible. This is basically a hack, because we really need to fix the lookup of tag declarations in this case to not find things it shouldn't. However, it's better than what we had before, and it fixes <rdar://problem/9168556>. llvm-svn: 130810
* Introduce a new libclang API, clang_isFileMultipleIncludeGuarded(),Douglas Gregor2011-05-043-2/+19
| | | | | | | | which determines whether a particular file is actually a header that is intended to be guarded from multiple inclusions within the same translation unit. llvm-svn: 130808
* Introduce ASTUnit::LoadFromCompilerInvocationAction that allows one to ↵Argyrios Kyrtzidis2011-05-031-0/+113
| | | | | | | | | create an ASTUnit from a CompilerInvocation along with an ASTFrontendAction to invoke, and without all the goo about the precompiled preamble. llvm-svn: 130805
* Ensure that destructors are properly inovked when an exception leavesAlexis Hunt2011-05-032-1/+32
| | | | | | | | | | the body of a delegating constructor call. This means that the delegating constructor implementation should be complete and correct, though there are some rough edges (diagnostic quality with the cycle detection and using a deleted destructor). llvm-svn: 130803
* Only the first zero-length bitfield decides alignment ofFariborz Jahanian2011-05-032-3/+6
| | | | | | | the followup data member in an ms_struct struct. // rdar:// 8823265 llvm-svn: 130795
* Move the AST modifications to after the cycle detection inAlexis Hunt2011-05-031-6/+12
| | | | | | | lib/Sema/SemaDeclCXX.cpp to avoid getting stuck in an infinite loop. See the comment for more explanation. llvm-svn: 130788
* Extend -Wnon-pod-memset to also encompass memcpy() and memmove(),Douglas Gregor2011-05-031-36/+44
| | | | | | | | checking both the source and the destination operands, renaming the warning group to -Wnon-pod-memaccess and tweaking the diagnostic text in the process. llvm-svn: 130786
* Finish off rules for z-length bitfields in ms_structFariborz Jahanian2011-05-035-26/+40
| | | | | | structs. // rdar://8823265 llvm-svn: 130783
* Fix delegating constructors stylistic issues.Alexis Hunt2011-05-033-14/+22
| | | | | | Material bugfixes to come this afternoon. llvm-svn: 130782
* Separate the -Wnon-pod-memset warnings into two separate warnings:Douglas Gregor2011-05-031-10/+20
| | | | | | | - a default-on warning for pointers to dynamic classes (= classes with vtables) - a default-off warning for other non-POD types llvm-svn: 130781
* Remove unused but set variable.Benjamin Kramer2011-05-031-1/+0
| | | | llvm-svn: 130776
* Fix a double free when parsing malformed code. Fixes rdar://9173693.Argyrios Kyrtzidis2011-05-031-2/+5
| | | | llvm-svn: 130775
* When parsing a template friend declaration we dropped the templateChandler Carruth2011-05-032-2/+12
| | | | | | | | | | | | | | | | | | | | parameters on the floor in certain cases: class X { template <typename T> friend typename A<T>::Foo; }; This was parsed as a *non* template friend declaration some how, and received an ExtWarn. Fixing the parser to actually provide the template parameters to the freestanding declaration parse triggers the code which specifically looks for such constructs and hard errors on them. Along the way, this prevents us from trying to instantiate constructs like the above inside of a outer template. This is important as loosing the template parameters means we don't have a well formed declaration and template instantiation will be unable to rebuild the AST. That fixes a crash in the GCC test suite. llvm-svn: 130772
* Only check the use of memset() if we're refering to a C function namedDouglas Gregor2011-05-031-1/+3
| | | | | | 'memset' with external linkage. llvm-svn: 130770
* Removing strncpy() checking in CString checker for now. Some significant ↵Lenny Maiorani2011-05-031-1/+1
| | | | | | changes need to be made to properly support modeling of it since it potentially leaves strings non-null terminated. llvm-svn: 130758
* Revert r130750, "Make the mno flags match GCC. Patch by Alexander Best!", it ↵Daniel Dunbar2011-05-031-45/+29
| | | | | | breaks tests. llvm-svn: 130753
* Make the mno flags match GCC. Patch by Alexander Best!Michael J. Spencer2011-05-031-29/+45
| | | | llvm-svn: 130750
* Added an assert to IntegerLiteral to ensure that the integer type passed in ↵Richard Trieu2011-05-021-1/+2
| | | | | | | | has the same size as the APInt passed in. Also, updated the comments around IntegerLiteral. Changed the integer type that range-based for-loops used. Switched to pointer difference type, which satisfies the new assert in IntegerLiteral. llvm-svn: 130739
* Function with internal linkage name do not have mangled name.Devang Patel2011-05-021-2/+1
| | | | llvm-svn: 130736
* Do not try to get mangled name of block helpers. Apply a stopgap measure to ↵Devang Patel2011-05-021-1/+3
| | | | | | fix SingleSource/UnitTests/block-copied-in-cxxobj compile time crash. llvm-svn: 130734
* Tweak the retain/release checker to not stop tracking retained objects when ↵Ted Kremenek2011-05-021-0/+7
| | | | | | calling C++ methods. This is a temporary solution to prune false positives until we have a general story using annotations. llvm-svn: 130726
* Add the -mstackrealign option which just communicates the need toEric Christopher2011-05-021-0/+6
| | | | | | | | force align the stack to the backend. Fixes rdar://9289631 llvm-svn: 130725
* Driver/Darwin: Honor --sysroot= when invoking the linker, on Darwin.Daniel Dunbar2011-05-021-6/+11
| | | | llvm-svn: 130723
* Emit debug info for __destroy_helper_block_ and __copy_helper_block.Devang Patel2011-05-021-0/+8
| | | | llvm-svn: 130719
* Skip extra copy from aggregate where it isn't necessary; ↵Eli Friedman2011-05-022-4/+18
| | | | | | rdar://problem/8139919 . This shouldn't make much of a difference at -O3, but should substantially reduce the number of generated memcpy's at -O0. llvm-svn: 130717
OpenPOWER on IntegriCloud