summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Change SValBuilder::getConditionType() to return BoolTy in C++. Fixes ↵Ted Kremenek2012-11-291-1/+1
| | | | | | <rdar://problem/12772656>. llvm-svn: 168846
* Correctly handle IntegralToBool casts in C++ in the static analyzer. Fixes ↵Ted Kremenek2012-11-292-2/+19
| | | | | | <rdar://problem/12759044>. llvm-svn: 168843
* [driver] -mkernel implies -mstrict-align; don't add the redundant option.Chad Rosier2012-11-292-2/+4
| | | | | | rdar://12771737 llvm-svn: 168841
* Implement C++11 [dcl.attr.grammar] p4: If an attribute-specifier-seq ↵Michael Han2012-11-283-2/+53
| | | | | | appertains to a friend declaration, that declaration shall be a definition. llvm-svn: 168826
* objective-C blocks: Make sure that identical logic is usedFariborz Jahanian2012-11-288-88/+53
| | | | | | | | | | in deciding a copy/dispose field is needed in a byref structure and when generating the copy/dispose helpers. In certain cases, these fields were being added but no copy/dispose was being generated. This was uncovered in ARC, but not in MRR. // rdar://12759433 llvm-svn: 168825
* Per C++11 [except.spec]p2, rvalue references are not permitted in exception ↵Richard Smith2012-11-283-33/+38
| | | | | | specifications. llvm-svn: 168824
* PR14388: An array or function type in an exception specification should beRichard Smith2012-11-284-13/+80
| | | | | | | decayed to a pointer type. Patch by WenHan Gu, with a little tweaking and additional testcases by me. llvm-svn: 168822
* ABI: comments from Eli on r168820.Manman Ren2012-11-282-2/+4
| | | | | | rdar://12723368 llvm-svn: 168821
* ABI: modify CreateCoercedLoad and CreateCoercedStore to not use load or store ofManman Ren2012-11-282-12/+32
| | | | | | | | | | | | | | | the original parameter or return type. Since we do not accurately represent the data fields of a union, we should not directly load or store a union type. As an exmple, if we have i8,i8, i32, i32 as one field type and i32,i32 as another field type, the first field type will be chosen to represent the union. If we load with the union's type, the 3rd byte and the 4th byte will be skipped. rdar://12723368 llvm-svn: 168820
* PR13098: If we're instantiating an overloaded binary operator and we couldRichard Smith2012-11-282-1/+28
| | | | | | | | | determine which member function would be the callee from within the template definition, don't pass that function as a "non-member function" to CreateOverloadedBinOp. Instead, just rely on it to select the member function for itself. llvm-svn: 168818
* [analyzer] scan-build: Don't forget to close our temp file for Clang's output.Jordan Rose2012-11-281-7/+8
| | | | | | | | Also, minor whitespace/indentation fixes. Patch by Peeter Joot! llvm-svn: 168805
* [analyzer] scan-build: Treat '.C' files as C++.Jordan Rose2012-11-281-0/+1
| | | | | | Part of PR14443. llvm-svn: 168804
* Refactor -fsanitize, -f*-sanitizer arguments parsing. Provide a more careful ↵Alexey Samsonov2012-11-283-46/+72
| | | | | | diagnostic for invalid sets of sanitizers llvm-svn: 168794
* [asan] Split AddressSanitizer into two passes (FunctionPass, ModulePass), ↵Kostya Serebryany2012-11-281-1/+2
| | | | | | Clang part. llvm-svn: 168782
* Remove obsolete comment missed by r162937Andy Gibbs2012-11-281-4/+0
| | | | llvm-svn: 168778
* Teach Lexer::getSpelling about raw string literals. Specifically, if a rawRichard Smith2012-11-283-42/+81
| | | | | | | | string literal needs cleaning (because it contains line-splicing in the encoding prefix or in the ud-suffix), do not clean the section between the double-quotes -- that's the "raw" bit! llvm-svn: 168776
* Store on the CXXRecordDecl whether the class has, or would have, a copyRichard Smith2012-11-289-249/+277
| | | | | | | constructor/assignment operator with a const-qualified parameter type. The prior method for determining this incorrectly used overload resolution. llvm-svn: 168775
* Remove workaround in RegionStore in r168741 since it is handled more ↵Ted Kremenek2012-11-281-10/+8
| | | | | | generally by r168757. llvm-svn: 168774
* Introduce ASTUnresolvedSet, an UnresolvedSet-like class, whose contents areArgyrios Kyrtzidis2012-11-2811-25/+117
| | | | | | | | | | | allocated using the allocator associated with an ASTContext. Use this inside CXXRecordDecl::DefinitionData instead of an UnresolvedSet to avoid a potential memory leak. rdar://12761275 llvm-svn: 168771
* Don't return a pointer to an UnresolvedSetImpl in the CXXRecordDecl interface,Argyrios Kyrtzidis2012-11-288-77/+79
| | | | | | expose only the iterators instead. llvm-svn: 168770
* C++ core issue 1344, PR10618: promote "addition of default argument makes thisRichard Smith2012-11-286-33/+56
| | | | | | | | | | | | a special member" diagnostic from warning to error, and fix the cases where it produced diagnostics with incorrect wording. We don't support this as an extension, and we ban it even in C++98 mode. This breaks too much (for instance, the ABI-specified calling convention for a type can change if it acquires a copy constructor through the addition of a default argument). llvm-svn: 168769
* Fix another false positive due to a CXX temporary object appearing in a C ↵Ted Kremenek2012-11-282-2/+42
| | | | | | | | | | | initializer. The stop-gap here is to just drop such objects when processing the InitListExpr. We still need a better solution. Fixes <rdar://problem/12755044>. llvm-svn: 168757
* objective-C arc: Underline the selector when issuingFariborz Jahanian2012-11-281-1/+2
| | | | | | | arc specific diagnostic on the selector. This is objc-arc part of // rdar://11303469 llvm-svn: 168756
* docs: [CMake] Add Xcode to the list of project formats CMake can generate.NAKAMURA Takumi2012-11-271-1/+1
| | | | | | Suggested by Sean McBride, thanks! llvm-svn: 168745
* clang/www/get_started.html: s/cmake/CMake/NAKAMURA Takumi2012-11-271-5/+5
| | | | | | Suggested by Sean McBride, thanks! llvm-svn: 168744
* Provide stop-gap solution to crash reported in PR 14436.Ted Kremenek2012-11-272-8/+33
| | | | | | | | | | | | | This was also covered by <rdar://problem/12753384>. The static analyzer evaluates a CXXConstructExpr within an initializer expression and RegionStore doesn't know how to handle the resulting CXXTempObjectRegion that gets created. We need a better solution than just dropping the value, but we need to better understand how to implement the right semantics here. Thanks to Jordan for his help diagnosing the behavior here. llvm-svn: 168741
* objective-C arc: load of a __weak object happens via call toFariborz Jahanian2012-11-279-18/+136
| | | | | | | | | | | objc_loadWeak. This retains and autorelease the weakly-refereced object. This hidden autorelease sometimes makes __weak variable alive even after the weak reference is erased, because the object is still referenced by an autorelease pool. This patch overcomes this behavior by loading a weak object via call to objc_loadWeakRetained(), followng it by objc_release at appropriate place, thereby removing the hidden autorelease. // rdar://10849570 llvm-svn: 168740
* [libclang] Remove WorkingDir field from CIndexer, it has been rendered useless.Argyrios Kyrtzidis2012-11-272-5/+0
| | | | | | No functionality change. llvm-svn: 168738
* Move PrettyStackTraceParserEntry to ParseAST.cppNico Weber2012-11-273-35/+35
| | | | | | | r128056 moved PrettyStackTraceParserEntry construction from Parser.h to ParseAST.cpp, so there's no need to keep this class in a header. llvm-svn: 168731
* Allow an ASTConsumer to selectively skip function bodies while parsing. PatchRichard Smith2012-11-273-0/+36
| | | | | | by Olivier Goffart! llvm-svn: 168726
* Simplify checking for whether we should implicitly declare special members andRichard Smith2012-11-272-17/+13
| | | | | | add some assertions. No functionality change. llvm-svn: 168725
* Remove an extra semicolon.Chad Rosier2012-11-271-1/+1
| | | | llvm-svn: 168707
* Fix examples.Rafael Espindola2012-11-271-1/+1
| | | | llvm-svn: 168705
* Remove some dead code. CLANG_IS_PRODUCTION is now just a build flag andRafael Espindola2012-11-276-15/+3
| | | | | | is not used in any #ifdef. llvm-svn: 168703
* Add -fsanitize=integer for reporting suspicious integer behaviors.Will Dietz2012-11-2710-44/+403
| | | | | | Introduces new sanitizer "unsigned-integer-overflow". llvm-svn: 168701
* Remove outdated FIXME; should have removed that in r160782Timur Iskhodzhanov2012-11-271-2/+0
| | | | llvm-svn: 168698
* clang/test/lit.cfg: Disable dev-fd-fs on cygwin for now.NAKAMURA Takumi2012-11-271-1/+1
| | | | | | open("/dev/fd/1-foobar") fails with EEXIST on cygwin. llvm-svn: 168676
* Test for r168674.Eli Friedman2012-11-271-0/+11
| | | | llvm-svn: 168675
* Fix the definition of the vfork() builtin on Haiku. PR14378.Eli Friedman2012-11-276-3/+20
| | | | llvm-svn: 168674
* This patch addresses an incompatibility relative to the 64-bit PowerPCBill Schmidt2012-11-272-0/+185
| | | | | | | | | | | | | | | ELF ABI. Complex values are to be passed in registers as though the real and imaginary parts were passed as separate parameters. Prior to this patch, complex values were passed as byval aggregates. It turns out that specifying getDirect() for all complex types when classifying the argument type results in the desired behavior. The new Clang test case verifies that the correct LLVM IR is generated for caller and callee for each of the underlying types for _Complex. llvm-svn: 168673
* scan-build: Respect TMPDIR on all platforms, not just Darwin (PR14438).Jordan Rose2012-11-271-7/+2
| | | | llvm-svn: 168672
* [analyzer] Fix test to work on non-LP64 systems.Jordan Rose2012-11-271-5/+8
| | | | | | Thanks for the original catch in r168303, Takumi. llvm-svn: 168671
* Add a testcase that r168411 would break.Rafael Espindola2012-11-271-0/+11
| | | | llvm-svn: 168669
* Revert r168411 for now.Rafael Espindola2012-11-271-4/+6
| | | | llvm-svn: 168667
* Duplicate some common owners between Clang and LLVM.Richard Smith2012-11-271-0/+17
| | | | llvm-svn: 168650
* Move Clang code owners list from llvm/ to cfe/.Richard Smith2012-11-271-0/+23
| | | | llvm-svn: 168639
* Frontend: Create a virtual file for named pipe inputs.Daniel Dunbar2012-11-272-4/+5
| | | | | | - This ensures we see the right buffer size for the file. llvm-svn: 168636
* Improve diagnostic on C++11 attribute specifiers that appear at wrong ↵Michael Han2012-11-264-8/+117
| | | | | | | | | | | | | syntactic locations around class specifiers. This change list implemented logic that explicitly detects several combinations of locations where C++11 attribute specifiers might be incorrectly placed within a class specifier. Previously we emit generic diagnostics like "expected identifier" for such cases; now we emit specific diagnostic against the misplaced attributes, this also fixed a bug in old code where attributes appear at legitimate locations were incorrectly rejected. Thanks to Richard Smith for reviewing! llvm-svn: 168626
* Add missing "break". Thanks to Craig for spotting it.Eli Friedman2012-11-261-0/+1
| | | | | | I'm looking at ways to fix the relevant test so it can catch this sort of mistake. llvm-svn: 168618
* check that always_inline attribute works with -fno-inlineSebastian Pop2012-11-261-1/+4
| | | | | | Clean up the existing test to use FileCheck. llvm-svn: 168607
OpenPOWER on IntegriCloud