summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Fix indentation. No functional change.Craig Topper2013-08-021-1/+1
| | | | llvm-svn: 187644
* Revert r187537 "clang-cl: add more options"Hans Wennborg2013-08-023-190/+7
| | | | | | | | | It broke the "phase1 - sanity" buildbot. Reverting until we can figure out what's going on. And Eric says it broke all current Mac builds actually. llvm-svn: 187640
* When merging redeclaration chains across modules, if a declaration is visibleRichard Smith2013-08-026-9/+26
| | | | | | | | | | | | | | | | | | | in one module but is only declared as a friend in another module, keep it visible in the result of the merge. This is incomplete on two axes: 1) Our handling of local extern declarations is basically broken (we put them in the wrong decl context, and don't find them in redeclaration lookup, unless they've previously been declared), and this results in them making friends visible after a merge. 2) Eventually we'll need to mark that this has happened, and more carefully check whether a declaration should be visible if it was only visible in some of the modules in which it was declared. Fortunately it's rare for the identifier namespace of a declaration to change along its redeclaration chain. llvm-svn: 187639
* clang-cl: add more optionsHans Wennborg2013-08-023-7/+190
| | | | | | | | | | | This adds a bunch of options to clang-cl. Notably, this includes all the options that get passed when doing a default build of a command-line project with msbuild.exe in Debug and Release modes, and I believe all flags from Reid's original patch. Differential Revision: http://llvm-reviews.chandlerc.com/D1264 llvm-svn: 187637
* Revert "ObjectiveC migrator. Migrate to instancetype return type for mehods ↵Rafael Espindola2013-08-025-141/+30
| | | | | | | | | | with certain prefix selector matching their class names' suffix." This reverts commit r187626. It is breaking the bots. llvm-svn: 187634
* Revert "If -fslp-vectorize or -fno-slp-vectorize are given, honor this ↵Rafael Espindola2013-08-011-17/+3
| | | | | | | | | | selection. If no flag is given, enable it for -O3." This reverts commit r187630. Looks like it is breaking the bots. llvm-svn: 187633
* clang-format: Operator precendence in ObjC method exprs.Daniel Jasper2013-08-012-4/+13
| | | | | | | | | | | | | | | | | | | | Patch (mostly) by Adam Strzelecki. Thanks! Before: [self aaaaaa:bbbbbbbbbbbbb aaaaaaaaaa:bbbbbbbbbbbbbbbbb aaaaa:bbbbbbbbbbb + bbbbbbbbbbbb aaaa:bbb]; After: [self aaaaaa:bbbbbbbbbbbbb aaaaaaaaaa:bbbbbbbbbbbbbbbbb aaaaa:bbbbbbbbbbb + bbbbbbbbbbbb aaaa:bbb]; This fixes llvm.org/PR16150. llvm-svn: 187631
* If -fslp-vectorize or -fno-slp-vectorize are given, honor this selection. If ↵Nadav Rotem2013-08-011-3/+17
| | | | | | no flag is given, enable it for -O3. llvm-svn: 187630
* ObjectiveC migrator. Migrate to instancetype return typeFariborz Jahanian2013-08-015-30/+141
| | | | | | | for mehods with certain prefix selector matching their class names' suffix. llvm-svn: 187626
* [analyzer] Don't process autorelease counts in synthesized function bodies.Jordan Rose2013-08-012-3/+409
| | | | | | | | | | | | | | | We process autorelease counts when we exit functions, but if there's an issue in a synthesized body the report will get dropped. Just skip the processing for now and let it get handled when the caller gets around to processing autoreleases. (This is still suboptimal: objects autoreleased in the caller context should never be warned about when exiting a callee context, synthesized or not.) Second half of <rdar://problem/14611722> llvm-svn: 187625
* [analyzer] Silently drop all reports within synthesized bodies.Jordan Rose2013-08-012-157/+196
| | | | | | | | | | | | | | | | | | | | | Much of our diagnostic machinery is set up to assume that the report end path location is valid. Moreover, the user may be quite confused when something goes wrong in our BodyFarm-synthesized function bodies, which may be simplified or modified from the real implementations. Rather than try to make this all work somehow, just drop the report so that we don't try to go on with an invalid source location. Note that we still handle reports whose /paths/ go through invalid locations, just not those that are reported in one. We do have to be careful not to lose warnings because of this. The impetus for this change was an autorelease being processed within the synthesized body, and there may be other possible issues that are worth reporting in some way. We'll take these as they come, however. <rdar://problem/14611722> llvm-svn: 187624
* clang-format: Don't break empty 2nd operand of ternary expr.Daniel Jasper2013-08-013-5/+25
| | | | | | | | | | | | | | | | Before: some_quite_long_variable_name_ptr ? : argv[9] ? ptr : argv[8] ? : argv[7] ? ptr : argv[6]; After: some_quite_long_variable_name_ptr ?: argv[9] ? ptr : argv[8] ?: argv[7] ? ptr : argv[6]; Patch by Adam Strzelecki, thank you!! This fixed llvm.org/PR16758. llvm-svn: 187622
* Use llvm::sys::fs::UniqueID for windows and unix.Rafael Espindola2013-08-0110-249/+197
| | | | | | | | | | | | | | | | | | | This unifies the unix and windows versions of FileManager::UniqueDirContainer and FileManager::UniqueFileContainer by using UniqueID. We cannot just replace "struct stat" with llvm::sys::fs::file_status, since we want to be able to construct fake ones, and file_status has different members on unix and windows. What the patch does is: * Record only the information that clang is actually using. * Use llvm::sys::fs::status instead of stat and fstat. * Use llvm::sys::fs::UniqueID * Delete the old windows versions of UniqueDirContainer and UniqueFileContainer since the "unix" one now works on windows too. llvm-svn: 187619
* Use function attributes to indicate if we don't want to realign the stack.Bill Wendling2013-08-012-1/+3
| | | | llvm-svn: 187617
* DebugInfo: Don't prefer declarations over definitions in -flimit-debug-info in CDavid Blaikie2013-08-013-7/+17
| | | | | | | | | Without an ODR, the -flimit-debug-info debug info size optimization of emitting declarations for fully defined types when only a declaration is needed by the TU, is incorrect. Emit the full definition whenever it's available in non-C++. llvm-svn: 187611
* DebugInfo: Emit template arguments for limited types used for context.David Blaikie2013-08-012-11/+14
| | | | | | | | We emit definitions with no members when a nested type is referenced/required (GCC does the same, to be fair) but failed to attach the template arguments in such a case. llvm-svn: 187608
* Options.td: O0 and O4 are not Joined optionsHans Wennborg2013-08-011-2/+2
| | | | | | | (I'm not sure how to test this because the Driver will still accept e.g. "-O4foo", but it goes in the catch-all -O option instead of -O4.) llvm-svn: 187602
* Enable the SLP-vectorizer by defaultNadav Rotem2013-08-011-2/+2
| | | | llvm-svn: 187596
* Reduce a variable's scope (no functionality change)David Blaikie2013-08-011-2/+1
| | | | llvm-svn: 187594
* Simplify git-clang-format by using new -lines option.Daniel Jasper2013-08-011-44/+12
| | | | | | Patch by Mark Lodato. Thank you! llvm-svn: 187592
* Teach clang-format to understand static_asserts better.Daniel Jasper2013-08-013-1/+9
| | | | | | | | | | | | | | | | | | | Before: template <bool B, bool C> class A { static_assert(B &&C, "Something is wrong"); }; After: template <bool B, bool C> class A { static_assert(B && C, "Something is wrong"); }; (Note the spacing around '&&'). Also change the identifier table to always understand all C++11 keywords (which seems like the right thing to do). llvm-svn: 187589
* Fix typo in comment.Joey Gouly2013-08-011-1/+1
| | | | | | Thanks Artyom Skrobov! llvm-svn: 187588
* AST: Treat inline function declarations in -fms-compatibility as if it were ↵David Majnemer2013-08-012-2/+12
| | | | | | | | in C++ when in C mode This essentially fixes PR16766. llvm-svn: 187586
* Options: Use AliasArgs for -O -> -O2 translation.Hans Wennborg2013-08-013-5/+12
| | | | | | This way we can do the translation in the .td file rather than manually. llvm-svn: 187583
* clang-format: Improve line breaks in @property.Daniel Jasper2013-08-012-1/+8
| | | | | | | | | | | | Before: @property(nonatomic, assign, readonly) NSString *looooooooooooooooooooooooooooongName; After: @property(nonatomic, assign, readonly) NSString *looooooooooooooooooooooooooooongName; llvm-svn: 187577
* Make helper function static.Benjamin Kramer2013-08-011-2/+2
| | | | llvm-svn: 187574
* Silence unused variable warning in non-assert builds.Daniel Jasper2013-08-011-0/+1
| | | | llvm-svn: 187572
* AArch64: initial NEON supportTim Northover2013-08-0117-150/+4169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch by Ana Pazos - Completed implementation of instruction formats: AdvSIMD three same AdvSIMD modified immediate AdvSIMD scalar pairwise - Completed implementation of instruction classes (some of the instructions in these classes belong to yet unfinished instruction formats): Vector Arithmetic Vector Immediate Vector Pairwise Arithmetic - Initial implementation of instruction formats: AdvSIMD scalar two-reg misc AdvSIMD scalar three same - Intial implementation of instruction class: Scalar Arithmetic - Initial clang changes to support arm v8 intrinsics. Note: no clang changes for scalar intrinsics function name mangling yet. - Comprehensive test cases for added instructions To verify auto codegen, encoding, decoding, diagnosis, intrinsics. llvm-svn: 187568
* Check dynamic_cast is not used with -fno-rtti, unless it is a noop or can be ↵Arnaud A. de Grandmaison2013-08-014-0/+49
| | | | | | resolved statically. llvm-svn: 187564
* Remove more odd code that tries to account for an off by 1 problem in vec3 ↵Craig Topper2013-08-011-8/+0
| | | | | | shuffles that doesn't really exist. llvm-svn: 187561
* Fix to handle all non-power-of-2 vector sizes in the mask form of ↵Craig Topper2013-08-011-10/+2
| | | | | | | | _builtin_shuffle_vector. Previously a 2-bit mask was used to mask each element of a vec6 mask before doing the extracts instead of 3-bit mask necessary to cover 0-5. vec3 was the only non-power-of-2 that worked correctly because a +1 conditionally added before calculating floor(log2(elements)). llvm-svn: 187560
* Sema: Diagnose explicitly bound unresolved member expressions decaying into ↵David Majnemer2013-08-012-25/+43
| | | | | | | | | | | | | pointers to function type We would disallow the case where the overloaded member expression is coming from an address-of operator but we wouldn't issue any diagnostics when the overloaded member expression comes by way of a function to pointer decay cast. Clang's implementation of DR61 is now seemingly complete. llvm-svn: 187559
* Remove broken and unnecessary vec3 handling from VisitShuffleVectorExpr.Craig Topper2013-08-011-5/+1
| | | | llvm-svn: 187558
* Parse: Don't consider attributes of broken member declaratorsDavid Majnemer2013-08-012-32/+36
| | | | | | | | | | | | | | ParseCXXClassMemberDeclaration was trying to use the result of ActOnCXXMemberDeclarator to attach it to some late parsed attributes. However when failures arise, we have no decl to attach to which eventually leads us to a NULL pointer dereference. While we are here, clean up the code a bit. Fixes PR16765 llvm-svn: 187557
* Fix assert when instantiating a default argument of a template defined in aRichard Smith2013-08-013-1/+9
| | | | | | module. llvm-svn: 187556
* Remove the SUPPORT_ALIASARGS defineHans Wennborg2013-08-014-8/+0
| | | | | | It is not needed after LLVM r187546. llvm-svn: 187550
* clang-format: Make alignment of trailing comments optional ..Daniel Jasper2013-07-314-6/+15
| | | | | | .. in order to support WebKit style properly. llvm-svn: 187549
* Make -m[no-]pascal-strings an alias of -f[no]pascal-strings in the .td fileHans Wennborg2013-07-313-10/+10
| | | | | | | | This way we don't have to translate it manually in Clang::ConstructJob. Differential Revision: http://llvm-reviews.chandlerc.com/D1249 llvm-svn: 187547
* ObjectiveC ARC: finishing off issuing error whenFariborz Jahanian2013-07-315-7/+39
| | | | | | | retainable pointer is passed to an audited CF function expecting CF type. // rdar://14569171 llvm-svn: 187543
* clang-format: Add more options to namespace indentation.Daniel Jasper2013-07-315-12/+88
| | | | | | | | | | | | | With this patch, clang-format can be configured to: * not indent in namespace at all (former behavior). * indent in namespace as in other blocks. * indent only in inner namespaces (as required by WebKit style). Also fix alignment of access specifiers in WebKit style. Patch started by Marek Kurdej. Thank you! llvm-svn: 187540
* Option parsing tables: pick up AliasArgs from the OPTION macro.Hans Wennborg2013-07-314-6/+14
| | | | | | | | | This depends on LLVM r187537. The SUPPORT_ALIASARGS macro will be removed once all option parsing clients have been updated. llvm-svn: 187538
* ObjectiveC ARC: Do not issue bridge cast diagnostic whenFariborz Jahanian2013-07-314-8/+20
| | | | | | | | passing a retainable object arg to a CF audited function expecting a CF object type. Issue a normal type mismatch diagnostic. This is wip // rdar://14569171 llvm-svn: 187532
* Fix declaring class template methods with an attributed typedefReid Kleckner2013-07-314-56/+74
| | | | | | | | | | | | | | This change unifies the logic for template instantiation of methods and functions declared with typedefs. It ensures that SubstFunctionType() always fills the Params out param with non-null ParmVarDecls or returns null. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D1135 llvm-svn: 187528
* clang-cl: add the /c, /W0 and /W1 optionsHans Wennborg2013-07-315-11/+32
| | | | | | | | | | This adds a few more clang-cl options. It also exposes two core clang options to the clang-cl mode: we need to be able to claim --driver_mode so it doesn't show up as unused in cl mode, and we need -### for tests. Differential Revision: http://llvm-reviews.chandlerc.com/D1232 llvm-svn: 187527
* A few small cleanups to r187504. Thanks to dblaikie for the assist.Kaelyn Uhrain2013-07-313-8/+21
| | | | llvm-svn: 187521
* ObjectiveC arc: minor refactoring in my last patchFariborz Jahanian2013-07-311-2/+5
| | | | | | to avoid future false positives. // rdar://14569171 llvm-svn: 187509
* ObjectiveC arc: Introduce a new initialization kindFariborz Jahanian2013-07-313-11/+38
| | | | | | | | for parameters passed to CF audited functions to be used for better diagnostics. Current set but unused. // rdar://14569171 llvm-svn: 187508
* Improve the diagnostic experience, including adding recovery, forKaelyn Uhrain2013-07-316-15/+80
| | | | | | changing '->' to '.' when there is no operator-> defined for a class. llvm-svn: 187504
* ObjectiveC arc: Move check for type conversions in arcFariborz Jahanian2013-07-313-11/+21
| | | | | | | | out of ImpCastExprToType and to the caller site as appropriate. This is in prep. to do more work for // rdar://14569171 llvm-svn: 187503
* Fix a comment.Hans Wennborg2013-07-311-1/+1
| | | | llvm-svn: 187502
OpenPOWER on IntegriCloud