summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Model getters of known-@synthesized Objective-C properties.Jordan Rose2014-01-105-7/+116
| | | | | | | | | | | | | | | | | | | | | ...by synthesizing their body to be "return self->_prop;", with an extra nudge to RetainCountChecker to still treat the value as +0 if we have no other information. This doesn't handle weak properties, but that's mostly correct anyway, since they can go to nil at any time. This also doesn't apply to properties whose implementations we can't see, since they may not be backed by an ivar at all. And finally, this doesn't handle properties of C++ class type, because we can't invoke the copy constructor. (Sema has actually done this work already, but the AST it synthesizes is one the analyzer doesn't quite handle -- it has an rvalue DeclRefExpr.) Modeling setters is likely to be more difficult (since it requires handling strong/copy), but not impossible. <rdar://problem/11956898> llvm-svn: 198953
* ObjectiveC. Remove warning on mismatched methodsFariborz Jahanian2014-01-101-47/+0
| | | | | | | | | which may belong to unrelated classes. It was primarily intended for miuse of @selector expression. But warning is too noisy and will be issued when an actual @selector is used. // rdar://15740134 llvm-svn: 198952
* Implement -m32 and -m64 with llvm::Triple functions.Jakob Stoklund Olesen2014-01-101-12/+7
| | | | | | Don't repeat the 32 <-> 64 architecture mapping incompletely. llvm-svn: 198943
* Enable -fuse-init-array for all AArch64 ELF targets by default, not just linux.Kristof Beyls2014-01-103-15/+22
| | | | llvm-svn: 198940
* Use 'w' instead of 'c' to represent the win32 mangling.Rafael Espindola2014-01-101-2/+2
| | | | | | | This change was requested to avoid confusion if we ever support non windows coff systems. llvm-svn: 198939
* TryConsume parser cleanupsAlp Toker2014-01-104-62/+28
| | | | | | Also move some comments into the block they were meant to describe. llvm-svn: 198935
* clang-format: Slightly adapt line break in edge case.Daniel Jasper2014-01-101-1/+1
| | | | | | | | | | | | | | | Before: SomeMap[std::pair(aaaaaaaaaaaa, bbbbbbbbbbbbbbb)] .insert(ccccccccccccccccccccccc); After: SomeMap[std::pair(aaaaaaaaaaaa, bbbbbbbbbbbbbbb)].insert( ccccccccccccccccccccccc); This seems to be about 3:1 more common in Google and Chromium style and I found only a handful of instances inside the LLVM codebase. llvm-svn: 198924
* Use the right dynamic linker for SPARC Linux executables.Jakob Stoklund Olesen2014-01-101-1/+4
| | | | llvm-svn: 198923
* clang-format: Understand ObjC boxed expressions.Daniel Jasper2014-01-101-0/+1
| | | | | | | | | Before: [dictionary setObject:@(1)forKey:@"number"]; After: [dictionary setObject:@(1) forKey:@"number"]; llvm-svn: 198920
* Locate GCC installations on SPARC systems.Jakob Stoklund Olesen2014-01-101-0/+28
| | | | llvm-svn: 198918
* Make the tautological out of range warning use Sema::DiagRuntimeBehavior so thatRichard Trieu2014-01-101-3/+5
| | | | | | the warning will not trigger on code protected by compile time checks. llvm-svn: 198913
* Give the linker the right ELF type for SPARC targets.Jakob Stoklund Olesen2014-01-101-0/+4
| | | | llvm-svn: 198912
* Pass -32/-64 to the assembler when building for sparc/sparc64.Jakob Stoklund Olesen2014-01-101-0/+4
| | | | llvm-svn: 198911
* [ms-abi] Handle __declspec(align) on bitfields "properly"Warren Hunt2014-01-101-25/+36
| | | | | | | | | | __declspec(align), when applied to bitfields affects their perferred alignment instead of their required alignment. We don't know why. Also, #pragma pack(n) turns packing *off* if n is greater than the pointer size. This is now observable because of the impact of declspec(align) on bitfields. llvm-svn: 198907
* CGRecordLayoutBuilder.cpp: Clarify if-else. [-Wdangling-else]NAKAMURA Takumi2014-01-101-1/+2
| | | | llvm-svn: 198906
* ObjectiveC. 1) Warn when @dynamic (as well as synthesize) Fariborz Jahanian2014-01-101-6/+2
| | | | | | | | | property has the naming convention that implies 'ownership'. 2) improve on diagnostic and make it property specific. 3) fix the line number in the case of default property synthesis. // rdar://15757510 llvm-svn: 198905
* Reapply r198845, reverted in r198849, with a fix to make it valid C++98, notRichard Smith2014-01-101-35/+39
| | | | | | | | | | | just valid C++11 =) Original commit message: PR18427: Use an appropriately-aligned buffer in APValue, to avoid a crash on SPARC, where uint64_t apparently requires higher alignment than void*. llvm-svn: 198903
* [ms-abi] Fixing CGRecordLayoutBuilder w.r.t. MS NonVirutalBase LayoutWarren Hunt2014-01-092-7/+81
| | | | | | | | | | | | | | The MS abi lays out *all* non-virtual bases with leading vfptrs before laying out non-virutal bases without vfptrs. This guarantees that the primary base is laid out first. r198818 fixed RecordLayoutBuilder to produce compatiable layouts. This patch fixes CGRecordLayoutBuilder to be able to consume those layouts and produce meaningful output without tripping any asserts about assumed incoming layout. A test case is included that shows CGRecordLayoutBuilder in fact produces output in the compatiable order. llvm-svn: 198900
* __has_attribute now understands target-specific attributes. So when you ask ↵Aaron Ballman2014-01-091-2/+2
| | | | | | whether an ARM target has the "interrupt" attribute, it will return true for ARM and MSP430 targets, and false for others. llvm-svn: 198897
* Removing the notion of TargetAttributesSema and replacing it with one where ↵Aaron Ballman2014-01-097-359/+219
| | | | | | the parsed attributes are responsible for knowing their target-specific nature, instead of letting Sema figure it out. This is necessary so that __has_attribute can eventually determine whether a parsed attribute applies to the given target or not. llvm-svn: 198896
* Use getPointerSizeInBits.Rafael Espindola2014-01-091-2/+3
| | | | | | | I introduced this bug in 198815. Thanks for Mark Lacey for noticing. Unfortunately, I have no idea how to test this code. llvm-svn: 198891
* Have attribute 'objc_precise_lifetime' suppress -Wunused.Ted Kremenek2014-01-091-1/+2
| | | | | | | | | | Fixes <rdar://problem/15596883> In ARC, __attribute__((objc_precise_lifetime)) guarantees that the object stored in it will survive to the end of the variable's formal lifetime. It is therefore useful even if it completely unused. llvm-svn: 198888
* Attempting to appease the build bots on systems with ansi escape sequences.Aaron Ballman2014-01-091-5/+8
| | | | llvm-svn: 198887
* Removing a bit of custom parsing functionality used by the thread safety ↵Aaron Ballman2014-01-092-55/+14
| | | | | | analysis APIs. Now using tablegen to determine whether an attribute's arguments should be parsed in an unevaluated context instead of relying on a separate, hard-coded list of attributes. llvm-svn: 198883
* clang-format: Add @s when breaking NSString literals.Daniel Jasper2014-01-092-3/+11
| | | | | | | | While it is allowed to not have an @ on subsequent lines, it seems general practice to add them. If undesired, the code author can easily remove them again and clang-format won't re-add them. llvm-svn: 198871
* clang-format: Understand #pragma markDaniel Jasper2014-01-091-0/+15
| | | | | | | | | Before: #pragma mark Any non - hyphenated or hyphenated string(including parentheses). After: #pragma mark Any non-hyphenated or hyphenated string (including parentheses). llvm-svn: 198870
* clang-format: Some tweaks to braces list formatting:Daniel Jasper2014-01-093-19/+46
| | | | | | | | | - Format a braced list with one element per line if it has nested braced lists. - Use a column layout only when the list has 6+ elements (instead of the current 4+ elements). llvm-svn: 198869
* The OpenCL specification states that images are allocated Pekka Jaaskelainen2014-01-092-9/+17
| | | | | | | | | | | from the global address space (6.5.1 of the OpenCL 1.2 specification). This makes clang construct the image arguments in the global address space and generate the argument metadata with the correct address space descriptor. Patch by Pedro Ferreira! llvm-svn: 198868
* Fix leak in lib/CodeGen/CGException.cpp, PR18318Kostya Serebryany2014-01-092-0/+10
| | | | | | | | | | | | | | Summary: This fixes the leak described in http://llvm.org/bugs/show_bug.cgi?id=18318 Reviewers: chandlerc, dblaikie Reviewed By: chandlerc CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2474 llvm-svn: 198857
* In areVectorOperandsLaxBitCastable() allow bitcast between a vector and scalar.Argyrios Kyrtzidis2014-01-091-8/+16
| | | | | | rdar://15779837. llvm-svn: 198856
* Revert "PR18427: Use an appropriately-aligned buffer in APValue, to avoid a ↵Argyrios Kyrtzidis2014-01-091-40/+34
| | | | | | | | | crash on" It broke building. This reverts commit r198845. llvm-svn: 198849
* PR18427: Use an appropriately-aligned buffer in APValue, to avoid a crash onRichard Smith2014-01-091-34/+40
| | | | | | SPARC, where uint64_t apparently requires higher alignment than void*. llvm-svn: 198845
* Fix the clang -Werror build after r198818David Blaikie2014-01-091-1/+1
| | | | llvm-svn: 198837
* PR18401: Fix assert by implementing the current proposed direction of coreRichard Smith2014-01-092-17/+20
| | | | | | | issue 1430. Don't allow a pack expansion to be used as an argument to an alias template unless the corresponding parameter is a parameter pack. llvm-svn: 198833
* [ms-abi] Refactor Microsoft Record LayoutWarren Hunt2014-01-094-343/+382
| | | | | | | | | This patch refactors microsoft record layout to be more "natural". The most dominant change is that vbptrs and vfptrs are injected after the fact. This simplifies the implementation and the math for the offest for the first base/field after the vbptr. llvm-svn: 198818
* Used the DataLayout methods instead of the Module methods.Rafael Espindola2014-01-091-4/+2
| | | | llvm-svn: 198815
* Implement isCXX11FinalKeyword() in terms of isCXX11VirtSpecifier()Alp Toker2014-01-091-34/+19
| | | | | | | | | | | | It's not worth keeping two copies of the identifier init and comparison code just to save a pointer coparison. This should reduce further once we get proper contextual keywords in the token stream, so having the identifier checks in one place is a step towards that. Cleanup only. llvm-svn: 198814
* [Serialization] In ASTReader::getInputFile record it when we didn't find the ↵Argyrios Kyrtzidis2014-01-081-0/+5
| | | | | | | | file to avoid looking it up again. Hopefully addresses rdar://14514222. llvm-svn: 198781
* [analyzer] Warn about double-delete in C++ at the second delete...Jordan Rose2014-01-082-3/+47
| | | | | | | | | | ...rather somewhere in the destructor when we try to access something and realize the object has already been deleted. This is necessary because the destructor is processed before the 'delete' itself. Patch by Karthik Bhat! llvm-svn: 198779
* clang-format: Don't hang forever when encountering a stray "}" in an ↵Benjamin Kramer2014-01-081-0/+4
| | | | | | | | @implementation block. PR18406. llvm-svn: 198770
* clang-format: Fix spacing in Cpp11 braced lists:Daniel Jasper2014-01-081-1/+1
| | | | | | | | | | Before: vector<int> foo{ ::SomeFunction()}; After: vector<int> foo{::SomeFunction()}; llvm-svn: 198769
* Treating the RegParmAttr as a TypeAttr because that is what it is.Aaron Ballman2014-01-081-19/+1
| | | | | | Patch reviewed by Rafael Espindola. llvm-svn: 198765
* For AArch64, support builtin neon vector type with 'long' as base element type.Jiangning Liu2014-01-081-0/+3
| | | | llvm-svn: 198741
* RP18408: If a member template is used as a template template argument, it doesRichard Smith2014-01-081-1/+8
| | | | | | not cause the template specialization to have no linkage. llvm-svn: 198726
* PR18400: ignore cv-qualifiers on the underlying type of an enumeration.Richard Smith2014-01-081-1/+1
| | | | llvm-svn: 198723
* [Driver] Fix a typo in the setting of the arch name when -arch x86_64h is used.Quentin Colombet2014-01-081-1/+1
| | | | | | <rdar://problem/15711488> llvm-svn: 198722
* PR18234: Mark a tag definition as invalid early if it appears in aRichard Smith2014-01-085-16/+33
| | | | | | | | type-specifier in C++. Some checks will assert in this case otherwise (in particular, the access specifier may be missing if this happens inside a class definition, due to a violation of an AST invariant). llvm-svn: 198721
* Re-applying r198699 after reverting r198461.Adrian Prantl2014-01-071-1/+2
| | | | | | | | Debug info: Implement a cleaner version of r198461. For symmetry with C and C++ don't emit an extra lexical scope for the compound statement that is the body of an Objective-C method. llvm-svn: 198715
* Revert "Debug info: Ensure that the last stop point in a function is still ↵Adrian Prantl2014-01-075-16/+8
| | | | | | | | within" This reverts commit r198461. llvm-svn: 198714
* Revert "Debug info: Implement a cleaner version of r198461. For symmetry with"Adrian Prantl2014-01-076-10/+15
| | | | | | This reverts commit 198699 so we can get a cleaner patch. llvm-svn: 198713
OpenPOWER on IntegriCloud