summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* On platforms which do not support ARC natively, do not mark ↵Michael Gottesman2013-02-021-4/+6
| | | | | | | | | objc_retain/objc_release as "nonlazybind". rdar://13108298. rdar://13129783. llvm-svn: 174253
* Revert r174246, accidentally committed.David Blaikie2013-02-024-20/+2
| | | | | | This reverts commit 1513eb9284c23acfd19cf742b95996fbb11ca741. llvm-svn: 174249
* Sentenc-ify comment added in r174206.David Blaikie2013-02-021-2/+2
| | | | | | Based on post-commit review by Paul Robinson. llvm-svn: 174248
* BasicsDavid Blaikie2013-02-024-2/+20
| | | | llvm-svn: 174246
* [analyzer] Always inline functions with bodies generated by BodyFarm.Anna Zaks2013-02-022-3/+30
| | | | | | | | Inlining these functions is essential for correctness. We often have cases where we do not inline calls. For example, the shallow mode and when reanalyzing previously inlined ObjC methods as top level. llvm-svn: 174245
* [analyzer] Print Inline mode with -analyzer-display-progress.Anna Zaks2013-02-021-4/+15
| | | | llvm-svn: 174244
* [analyzer] Fix typo.Anna Zaks2013-02-021-1/+1
| | | | llvm-svn: 174243
* This patch makes "&Cls::purevfn" not an odr use. This isn't what the standardNick Lewycky2013-02-023-17/+30
| | | | | | | | | says, but that's a defect (to be filed). "Cls::purevfn()" is still an odr use. Also fixes a bug that caused us to not mark the function referenced just because we didn't want to mark it odr used. llvm-svn: 174242
* Merge "special" types from different modules in the AST reader.Douglas Gregor2013-02-011-2/+18
| | | | | | | | | Different modules may have different views of the various "special" types in the AST, such as the redefinition type for "id". Merge those types rather than only considering the redefinition types for the first AST file loaded. llvm-svn: 174234
* Comment parsing: improve the fidelity of XML output for many block commandsDmitri Gribenko2013-02-011-0/+1
| | | | | | | | | | | | | | This change introduces a 'kind' attribute for the <Para> tag, that captures the kind of the parent block command. For example: \todo Meow. used to be just <Para>Meow.</Para>, but now it is <Para kind="todo">Meow.</Para> llvm-svn: 174216
* Add some missing PPC cpusBill Schmidt2013-02-012-9/+98
| | | | llvm-svn: 174215
* objc: Provide correct fixit instruction when two mismatchedFariborz Jahanian2013-02-011-2/+3
| | | | | | nsstringis are compared without. // rdar://12716301 llvm-svn: 174214
* Re-apply "[analyzer] Model trivial copy/move ctors with an aggregate bind."Jordan Rose2013-02-012-14/+75
| | | | | | | | With the optimization in the previous commit, this should be safe again. Originally applied in r173951, then reverted in r174069. llvm-svn: 174212
* [analyzer] Reuse a LazyCompoundVal if its type matches the new region.Jordan Rose2013-02-012-35/+26
| | | | | | | | | | | | | | | | | This allows us to keep from chaining LazyCompoundVals in cases like this: CGRect r = CGRectMake(0, 0, 640, 480); CGRect r2 = r; CGRect r3 = r2; Previously we only made this optimization if the struct did not begin with an aggregate member, to make sure that we weren't picking up an LCV for the first field of the struct. But since LazyCompoundVals are typed, we can make that inference directly by comparing types. This is a pure optimization; the test changes are to guard against possible future regressions. llvm-svn: 174211
* Fix exception handling line table problems introduced by r173593David Blaikie2013-02-013-8/+13
| | | | | | | | | | | | | r173593 made us a little too eager to associate all code at the end of a function with the user-written 'return' line. This caused problems with breakpoints as they'd be set in exception handling code preceeding the actual non-exception return handling code, leading to the breakpoint never being hit in non-exceptional execution. This change restores the pre-r173593 exception handling line information where the cleanup code is associated with the '}' not the return line. llvm-svn: 174206
* Add -mqpx and -mno-qpx feature flags to toggle use of the PPC QPX vector ↵Hal Finkel2013-02-012-1/+8
| | | | | | | | instruction set I've renamed the altivec test to ppc-features (because now there is more than one feature to test). llvm-svn: 174204
* [driver] Don't try to generate diagnostic information for dsymutil crashes.Chad Rosier2013-02-012-2/+4
| | | | | | Part of rdar://13134273 llvm-svn: 174203
* Micro change: moved '{' for better readability (+don't confuse ↵Alexander Kornienko2013-02-011-5/+5
| | | | | | -Wimplicit-fallthrough) llvm-svn: 174202
* [modules] Introduce ModuleFile::DirectImportLoc which is the source locationArgyrios Kyrtzidis2013-02-011-0/+1
| | | | | | where the module was explicitly or implicitly imported in the local translation unit. llvm-svn: 174192
* For ModuleLoader::makeModuleVisible() also pass the source location where theArgyrios Kyrtzidis2013-02-013-7/+11
| | | | | | module import occurred. llvm-svn: 174191
* Introduce SourceManager::PredefinesFileID, to allow each checking of whetherArgyrios Kyrtzidis2013-02-011-0/+1
| | | | | | a source location came from the predefines buffer. llvm-svn: 174190
* Fixed segmentation fault when a CFGBlock has NULL successor.Alexander Kornienko2013-02-011-1/+1
| | | | llvm-svn: 174182
* Fix PR14881 by implementing conversion rules between int and complex int.Bill Schmidt2013-02-011-54/+68
| | | | | | | | | | | | | | Prior to the patch, Clang does not properly promote types when a complex integer operand is combined with an integer via a binary operator, or when one is assigned to the other in either order. This patch detects when promotion is needed (and permissible) and generates the necessary code. The test assmes no target has the same size operands for "char" and "long long," and that no target performs arithmetic on char operands without extending them to a larger format first. If there are any targets for which this is not the case, they should be XFAILed. llvm-svn: 174181
* Re-design the convenience interfaces on MatchFinder.Manuel Klimek2013-02-011-26/+23
| | | | | | | | | | | | First, this implements a match() method on MatchFinder; this allows us to get rid of the findAll implementation, as findAll is really a special case of recursive matchers on match. Instead of findAll, provide a convenience function match() that lets users iterate easily over the results instead of needing to implement callbacks. llvm-svn: 174172
* Use const visitors in ASTDumper.Alexander Kornienko2013-02-012-226/+243
| | | | | | | http://llvm-reviews.chandlerc.com/D355 Patch by Philip Craig! llvm-svn: 174171
* Hopefully fix windows build due to non-standard pair implementation.Daniel Jasper2013-02-011-1/+1
| | | | llvm-svn: 174169
* Revamp of the basic layouting algorithm in clang-format.Daniel Jasper2013-02-011-117/+122
| | | | | | | | | | | | | | | | | | | | In order to end up with good solutions, clang-format needs to try "all" combinations of line breaks, evaluate them and select the best one. Before, we have done this using a DFS with memoization and cut-off conditions. However, this approach is very limited as shown by the huge static initializer in the attachment of llvm.org/PR14959. Instead, this new implementation uses a variant of Dijkstra's algorithm to do a prioritized BFS over the solution space. Some numbers: lib/Format/TokenAnnotator.cpp: 1.5s -> 0.15s Attachment of PR14959: 10min+ (didn't finish) -> 10s No functional changes intended. llvm-svn: 174166
* Fix diagnostic for bad alignas use: it can't be applied to functions.Richard Smith2013-02-011-2/+5
| | | | llvm-svn: 174160
* Add a new -Wundefined-inline warning for inline functions which are used but notNick Lewycky2013-02-016-51/+90
| | | | | | defined. Fixes PR14993! llvm-svn: 174158
* Implement [dcl.align]p5 and C11 6.7.5/4: alignas cannot underalign.Richard Smith2013-02-013-38/+99
| | | | | | Also support alignas(0), which C++11 and C11 require us to ignore. llvm-svn: 174157
* Add PPC A2Q core and BG/Q preprocessor definitionsHal Finkel2013-02-012-2/+21
| | | | | | The a2q core is the variant of the a2 core used on the BG/Q supercomputers. llvm-svn: 174151
* Destroy arrays and ARC fields when throwing out of ctors.John McCall2013-02-013-31/+20
| | | | | | | | Previously we were only handling non-array fields of class type. Testcases derived from a patch by WenHan Gu. llvm-svn: 174146
* Don't do delayed exception-specification checking on an invalidDouglas Gregor2013-02-011-0/+8
| | | | | | class. Fixes <rdar://problem/13017229>. llvm-svn: 174145
* Enable -fno-altivec, -mno-altivec for PowerPC.Bill Schmidt2013-02-012-0/+37
| | | | | | | | | | | Introduces these negation forms explicitly and uses them to control a new "altivec" target feature for PowerPC. This allows avoiding generating Altivec instructions on processors that support Altivec. The new test case verifies that the Altivec "lvx" instruction is not used when -fno-altivec is present on the command line. llvm-svn: 174140
* [Sema][Attr]Fix alignment attribute printing.Michael Han2013-02-012-21/+21
| | | | | | | | | Remove "IsMSDeclspec" argument from Align attribute since the arguments in Attr.td should only model those appear in source code. Introduce attribute Accessor, and teach TableGen to generate syntax kind accessors for Align attribute, and use those accessors to decide if an alignment attribute is a declspec attribute. llvm-svn: 174133
* [Comment parsing] Add support for recognizingFariborz Jahanian2013-01-311-1/+8
| | | | | | | | \headerfile command and representing it in an xml document. Patch reviewed by Dmitri Gribenko. // rdar://12397511 llvm-svn: 174109
* [analyzer]RetainCount: Fix an autorelease related false positive.Anna Zaks2013-01-311-1/+1
| | | | | | | The Cnt variable is adjusted (incremented) for simplification of checking logic. The increment should not be stored in the state. llvm-svn: 174104
* [analyzer] Don't track autorelease pools created by +new.Jordan Rose2013-01-311-14/+2
| | | | | | | | | | | | | This matches our behavior for autorelease pools created by +alloc. Some people like to create autorelease pools in one method and release them somewhere else. If you want safe autorelease pool semantics, use the new ARC-compatible syntax: @autoreleasepool { ... } <rdar://problem/13121353> llvm-svn: 174096
* Lexer: Don't warn about Unicode in preprocessor directives.Jordan Rose2013-01-311-2/+4
| | | | | | | | | This allows people to use Unicode in their #pragma mark and in macros that exist only to be string-ized. <rdar://problem/13107323&13121362> llvm-svn: 174081
* Preprocessor: initialize member introduced in r173881.Jordan Rose2013-01-311-0/+1
| | | | | | | Compilation always sets this explicitly, but creating a preprocessor manually should still put the 'IsPreprocessedOutput' flag in a valid state. llvm-svn: 174077
* Micro-change: moved a brace for better readabilityAlexander Kornienko2013-01-311-2/+2
| | | | llvm-svn: 174075
* Revert "[analyzer] Model trivial copy/move ctors with an aggregate bind."Jordan Rose2013-01-312-75/+14
| | | | | | | | | It's causing hangs on our internal analyzer buildbot. Will restore after investigating. This reverts r173951 / baa7ca1142990e1ad6d4e9d2c73adb749ff50789. llvm-svn: 174069
* Never break inside something that was a preprocessor directive.Manuel Klimek2013-01-311-1/+1
| | | | | | Just put it in one unwrapped line and let the formatter handle it. llvm-svn: 174063
* Several improvements to the formatting of static initializers.Daniel Jasper2013-01-312-11/+41
| | | | | | | | | | | | | 1. Never avoid bin packing in static initializers as this can lead to terrible results. 2. If an element has to be broken over multiple lines, break after the following comma. This should be a step forward, but there are still many cases especially with nested static initializers that we handle badly. More patches will follow. llvm-svn: 174061
* Add support for AArch64 target.Tim Northover2013-01-319-6/+737
| | | | | | | | | | | | | In cooperation with the LLVM patch, this should implement all scalar front-end parts of the C and C++ ABIs for AArch64. This patch excludes the NEON support also reviewed due to an outbreak of batshit insanity in our legal department. That will be committed soon bringing the changes to precisely what has been approved. Further reviews would be gratefully received. llvm-svn: 174055
* Added outer template parameter lists to friend type AST nodes.Enea Zaffanella2013-01-315-19/+43
| | | | llvm-svn: 174050
* [msan] Run more optimizations after MemorySanitizer pass.Evgeniy Stepanov2013-01-311-0/+12
| | | | | | | | | | | | MSan instrumentation is driven by the original code. We take every incoming instruction and emit another instruction (or ten) next to it, operating on the shadow values (but sometimes on the real values, too). Two programs in one, essentially. There can be any kinds of redundancies in the second one, so we just run whatever is normally run at -O2, and then exclude some passes that do not help much with benchmarks. llvm-svn: 174049
* When we're emitting a constructor or destructor call from a delegatingDouglas Gregor2013-01-314-21/+39
| | | | | | | constructor, retrieve our VTT parameter directly. Fixes PR14588 / <rdar://problem/12867962>. llvm-svn: 174042
* Improve 'failed template argument deduction' diagnostic for the case where weRichard Smith2013-01-312-39/+71
| | | | | | | | have a direct mismatch between some component of the template and some component of the argument. The diagnostic now says what the mismatch was, but doesn't yet say which part of the template doesn't match. llvm-svn: 174039
* When code completing in a statement, parenthesized expression, orDouglas Gregor2013-01-311-1/+9
| | | | | | | | Objective-C message receiver, the user is as likely to want to write a type name as any other declaration, so give types the same priority as other declarations. Fixes <rdar://problem/12480600>. llvm-svn: 174038
OpenPOWER on IntegriCloud