summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* ObjectiveC. Remove warning diagnostic which checksFariborz Jahanian2013-11-231-67/+0
| | | | | | | | | | | | | | attribute on method declaration and implementation match. This makes no sense. Most annotations are meant for declarations only and one is for implementation. This has been constant source of regresions and hackery to get around special cases. I am removing this check. Such checks must be done on a case by case basis and when it makes sense. For example, it makes sense for availability/deprecated and I will file a radar for that. // rdar://15531984 llvm-svn: 195524
* Whitespace. No functional change intended.Aaron Ballman2013-11-221-4/+4
| | | | llvm-svn: 195503
* Adjust r194296 to not apply the alias replacement for externallyJoerg Sonnenberger2013-11-221-1/+8
| | | | | | | | available always-inline functions. This breaks libc++'s locale implementation. Code generation for this case should be fixed, but this is a stop gap fix for clang 3.4. llvm-svn: 195501
* Debug Info: add a "Debug Info Version" module flag to output the current debugManman Ren2013-11-221-0/+5
| | | | | | | | info version number. Will error out when modules have different version numbers. llvm-svn: 195495
* ObjectiveC modern translator. Fixes a translation bugFariborz Jahanian2013-11-221-6/+3
| | | | | | tranalation @protocol expression. // rdar://15517895 llvm-svn: 195480
* Add support for the 'unless' matcher in the dynamic layer.Samuel Benzaquen2013-11-223-7/+42
| | | | | | | | | | | | Summary: Add support for the 'unless' matcher in the dynamic layer. Reviewers: klimek CC: cfe-commits, revane, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2247 llvm-svn: 195466
* Add support for Cortex-A12.Richard Barton2013-11-221-1/+1
| | | | | | Patch by Oliver Stannard! llvm-svn: 195449
* Revert r193994 and part of r193995Justin Bogner2013-11-221-2/+4
| | | | | | | | | | | | | Not long ago I made the CodeGen of for loops simplify the condition at -O0 in the same way we do for if and conditionals. Unfortunately this ties how loops and simple conditions work together too tightly, which makes features such as instrumentation based PGO awkward. Ultimately, we should find a more general way to simplify the logic in a given condition, but for now we'll just avoid using EmitBranchOnBool for loops, like we already do for while and do loops. llvm-svn: 195438
* CodeGen: WhitespaceJustin Bogner2013-11-223-9/+9
| | | | llvm-svn: 195437
* Add class-specific operator new to Decl hierarchy. This guarantees that DeclsRichard Smith2013-11-229-384/+289
| | | | | | | | | | | | | can't accidentally be allocated the wrong way (missing prefix data for decls from AST files, for instance) and simplifies the CreateDeserialized functions a little. An extra DeclContext* parameter to the not-from-AST-file operator new allows us to ensure that we don't accidentally call the wrong one when deserializing (when we don't have a DeclContext), allows some extra checks, and prepares for some planned modules-related changes to Decl allocation. No functionality change intended. llvm-svn: 195426
* Tidy up the no-external-assembler diagAlp Toker2013-11-221-1/+1
| | | | | | | | Diags aren't usually in the first person, and 'windows' isn't the correct product spelling to use in prose. Sidestep issues completely by making this error message platform-neutral. llvm-svn: 195422
* Make ASTUnit structure stable with NDEBUGAlp Toker2013-11-221-1/+1
| | | | | | | | | ASTUnit instances are allocated infrequently so it's fine to keep this field around in all build configurations. Assigns null to silence -Wunused-private-field in Release. llvm-svn: 195419
* clang-format: Fix bug in alignment of complex template parameters.Daniel Jasper2013-11-221-1/+2
| | | | | | | | | | | | | | | Before: template <typename aaaaaaaaaaa, typename bbbbbbbbbbbbb, template <typename> class cccccccccccccccccccccc, typename ddddddddddddd> class C {}; After: template <typename aaaaaaaaaaa, typename bbbbbbbbbbbbb, template <typename> class cccccccccccccccccccccc, typename ddddddddddddd> class C {}; llvm-svn: 195418
* clang-format: Recognize braced lists with trailing function call.Daniel Jasper2013-11-221-1/+1
| | | | | | | | | | | Before: int count = set<int> { f(), g(), h() } .size(); After: int count = set<int>{f(), g(), h()}.size(); llvm-svn: 195417
* ObjectiveC migrator. Improve on definition, useFariborz Jahanian2013-11-221-6/+2
| | | | | | | | and testing of objc_bridgmutable attribute per Aaron Ballman's comments. // rdar://15498044 llvm-svn: 195396
* PR18013: Don't assert diagnosing a bad std::initializer_list construction.Richard Smith2013-11-211-7/+25
| | | | llvm-svn: 195384
* Test commit for the user "kromanova" to verify commit access. I removed ↵Ekaterina Romanova2013-11-211-1/+1
| | | | | | "UNSUPPORTED" comment because unsigned __int128 type is in fact supported. llvm-svn: 195378
* ObjectiveC. Implement attribute 'objc_bridge_mutable'Fariborz Jahanian2013-11-212-11/+47
| | | | | | | | whose semantic is currently identical to objc_bridge, but their differences may manifest down the road with further enhancements. // rdar://15498044 llvm-svn: 195376
* ObjectiveC migrator. delegate property must be Fariborz Jahanian2013-11-211-7/+7
| | | | | | | inferred as 'assign', not 'assign' and 'strong'. // rdar://15509831 llvm-svn: 195368
* Fix a crash in EmitStoreThroughExtVectorComponentLValue for vectors of odd ↵Joey Gouly2013-11-211-0/+6
| | | | | | | | | | | | | | | | | | | sizes. In OpenCL a vector of 3 elements, acts like a vector of four elements. So for a vector of size 3 the '.hi' and '.odd' accessors, would access the elements {2, 3} and {1, 3} respectively. However, in EmitStoreThroughExtVectorComponentLValue we are still operating on a vector of size 3, so we should only access {2} and {1}. We do this by checking the last element to be accessed, and ignore it if it is out-of-bounds. EmitLoadOfExtVectorElementLValue doesn't have a similar problem, because it does a direct shufflevector with undef, so an out-of-bounds access just gives an undef value. Patch by Anastasia Stulova! llvm-svn: 195367
* [ARM] add basic support for Cortex-A7 and VFPv4 to ClangArtyom Skrobov2013-11-211-3/+10
| | | | llvm-svn: 195359
* Better implementation of JavaScript === and !== operators.Alexander Kornienko2013-11-212-14/+30
| | | | | | | | | | | | | | | | Summary: Now based on token merging. Now they are not only prevented from being split, but are actually formatted as comparison operators. Reviewers: djasper, klimek Reviewed By: klimek CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2240 llvm-svn: 195354
* ARM: define & use __ARM_NEON on ARM32 (as per ACLE)Tim Northover2013-11-211-1/+3
| | | | | | | | | There seem to be quite a few references to the old macro __ARM_NEON__ on the internet, so I don't think it's a good idea to remove it entirely (at least yet), but the canonical name does not have the trailing underscores so we should use that ourselves. llvm-svn: 195353
* Implemented Neon scalar vdup_lane intrinsics.Ana Pazos2013-11-211-0/+25
| | | | | | Fixed scalar dup alias and added test case. llvm-svn: 195329
* Revert "Add new attribute 'objc_suppress_protocol' to suppress protocol ↵Ted Kremenek2013-11-213-59/+9
| | | | | | | | | | | conformance for a class." After implementing this patch, a few concerns about the language feature itself emerged in my head that I had previously not considered. I want to resolve those design concerns first before having a half-designed language feature in the tree. llvm-svn: 195328
* Implemented Neon scalar by element intrinsics.Ana Pazos2013-11-211-6/+45
| | | | | | | Intrinsics implemented: vqdmull_lane, vqdmulh_lane, vqrdmulh_lane, vqdmlal_lane, vqdmlsl_lane scalar Neon intrinsics. llvm-svn: 195326
* Add new attribute 'objc_suppress_protocol' to suppress protocol conformance ↵Ted Kremenek2013-11-213-9/+59
| | | | | | | | | | | | | | | | | | | | | | | for a class. The idea is to allow a class to stipulate that its methods (and those of its parents) cannot be used for protocol conformance in a subclass. A subclass is then explicitly required to re-implement those methods of they are present in the class marked with this attribute. Currently the attribute can only be applied to an @interface, and not a category or class extension. This is by design. Unlike protocol conformance, where a category can add explicit conformance of a protocol to class, this anti-conformance really needs to be observed uniformly by all clients of the class. That's because the absence of the attribute implies more permissive checking of protocol conformance. This unfortunately required changing method lookup in ObjCInterfaceDecl to take an optional protocol parameter. This should not slow down method lookup in most cases, and is just used for protocol conformance. llvm-svn: 195323
* Refactor some of handleObjCBridgeAttr to make it more concise and the ↵Ted Kremenek2013-11-211-8/+7
| | | | | | diagnostic reusable. llvm-svn: 195322
* Provide better diagnostic wording for initializers on staticHans Wennborg2013-11-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | data member definitions when the variable has an initializer in its declaration. For the following code: struct S { static const int x = 42; }; const int S::x = 42; This patch changes the diagnostic from: a.cc:4:14: error: redefinition of 'x' const int S::x = 42; ^ a.cc:2:20: note: previous definition is here static const int x = 42; ^ to: a.cc:4:18: error: static data member 'x' already has an initializer const int S::x = 42; ^ a.cc:2:24: note: previous initialization is here static const int x = 42; ^ Differential Revision: http://llvm-reviews.chandlerc.com/D2235 llvm-svn: 195306
* PR10837: Warn if a null pointer constant is formed by a zero integer constantRichard Smith2013-11-211-6/+8
| | | | | | | expression that is not a zero literal, in C. This is a different, and more targeted, approach than that in r194540. llvm-svn: 195303
* Refactored integer argument checking code into a helper method. Removes a ↵Aaron Ballman2013-11-211-111/+61
| | | | | | considerable amount of duplicated code. llvm-svn: 195302
* clang-format: Improve formatting of ObjC method expressions.Daniel Jasper2013-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In particular, make breaking after a parameter's ":" more of a last resort choice as it significantly affects the readability gained by aligning the parameters. Before (in Chromium style - which doesn't allow bin-packing): { popup_window_.reset([[RenderWidgetPopupWindow alloc] initWithContentRect: NSMakeRect( origin_global.x, origin_global.y, pos.width(), pos.height()) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]); } After: { popup_window_.reset([[RenderWidgetPopupWindow alloc] initWithContentRect:NSMakeRect(origin_global.x, origin_global.y, pos.width(), pos.height()) styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]); } llvm-svn: 195301
* ObjectiveC migrator. use strong instead of Fariborz Jahanian2013-11-211-2/+2
| | | | | | | retain attribute for inferred properties. // rdar://15519923 llvm-svn: 195292
* ObjectiveC. Allow toll free bridge cast warnings outsideFariborz Jahanian2013-11-212-9/+17
| | | | | | | ARC and in objectiveC/ObjectiveC++ MRR mode as well. // rdar://15454846 llvm-svn: 195288
* Implemented DefaultIntArgument in the table generator and start using it in ↵Aaron Ballman2013-11-211-4/+4
| | | | | | semantic analysis. Removes some magic numbers. llvm-svn: 195287
* [-cxx-abi microsoft] Emit linkonce_odr definitions for declarations of ↵Hans Wennborg2013-11-213-0/+21
| | | | | | | | | | | | | | | static data members with inline initializers (PR17689) This makes Clang emit a linkonce_odr definition for 'val' in the code below, to be compatible with MSVC-compiled code: struct Foo { static const int val = 1; }; Differential Revision: http://llvm-reviews.chandlerc.com/D2233 llvm-svn: 195283
* Fix new check for missing semicolon after struct definition to deal with theRichard Smith2013-11-201-43/+55
| | | | | | | case where the type in the following declaration is specified as a template-id, and refactor for clarity. llvm-svn: 195280
* ObjectiveC ARC. warn in presense of __bridge casting to Fariborz Jahanian2013-11-201-0/+9
| | | | | | or from a toll free bridge cast. // rdar://15454846 llvm-svn: 195278
* There is no such thing as __declspec(ms_struct), this is a GNU attribute. ↵Aaron Ballman2013-11-201-1/+2
| | | | | | Switched the attribute to have the proper spelling, gave it a subject, updated the warning to be more accurate, and updated the test case as appropriate. llvm-svn: 195277
* Removed a duplicate diagnostic related to attribute subjects for thread ↵Aaron Ballman2013-11-201-28/+22
| | | | | | safety annotations, and replaced it with the more general attribute diagnostic. Updated the test case in the one instance where wording changed. No functional change intended. llvm-svn: 195275
* [NVPTX] Update ABI handlingJustin Holewinski2013-11-201-6/+16
| | | | | | For PTX, we want the target to handle struct returns directly. llvm-svn: 195268
* Set default Dwarf Version for -gline-tables-only on Darwin to 2.Manman Ren2013-11-201-4/+9
| | | | | | | | | We are still using Dwarf Version 2 for Darwin systems, make it consistent with -gline-tables-only. This should fix an internal buildbot. llvm-svn: 195267
* ObjectiveC ARC. Better checking of toll free briding Fariborz Jahanian2013-11-201-11/+9
| | | | | | | from qualified-id objects to CF types with objc_bridge annotation. // rdar://15454846 llvm-svn: 195264
* Refine 'deprecated' checking for Objective-C classes/methods.Ted Kremenek2013-11-202-1/+19
| | | | | | | | | - If a deprecated class refers to another deprecated class, do not warn. - @implementations of a deprecated class can refer to other deprecated things. Fixes <rdar://problem/15407366> and <rdar://problem/15466783>. llvm-svn: 195259
* Added an option to allow short function bodies be placed on a single line.Alexander Kornienko2013-11-204-24/+53
| | | | | | | | | | | | | | | | | | | Summary: The AllowShortFunctionsOnASingleLine option now controls short function body placement on a single line independent of the BreakBeforeBraces option. Updated tests using BreakBeforeBraces other than BS_Attach. Addresses http://llvm.org/PR17888 Reviewers: klimek, djasper Reviewed By: klimek CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2230 llvm-svn: 195256
* When wrapping lazily generated builtins in an extern "C" context,Enea Zaffanella2013-11-201-0/+1
| | | | | | flag the LinkageSpecDecl as being implicitly generated too. llvm-svn: 195255
* Simplify fix proposed in r195240.Daniel Jasper2013-11-202-18/+10
| | | | llvm-svn: 195253
* Support for JavaScript === and !== operators.Alexander Kornienko2013-11-201-0/+7
| | | | | | | | | | | | Reviewers: klimek, djasper Reviewed By: klimek CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D2231 llvm-svn: 195251
* [Mips] Take in account the -mfp64 command line option when build pathsSimon Atanasyan2013-11-202-2/+19
| | | | | | to the crt*.o files, libraries and headers for the MIPS FSFS toolchain. llvm-svn: 195249
* Fix bug where optimization would lead to strange line breaks.Manuel Klimek2013-11-202-8/+18
| | | | | | | | | | | | | | | | | Before: void f() { CHECK_EQ(aaaa, ( *bbbbbbbbb)->cccccc) << "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq"; } After: void f() { CHECK_EQ(aaaa, (*bbbbbbbbb)->cccccc) << "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq"; } llvm-svn: 195240
OpenPOWER on IntegriCloud