summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* Sema: Don't crash when __try/__except/__finally appears in a template functionDavid Majnemer2013-10-151-3/+6
| | | | | | | | | | | We wouldn't transform the compound statement in any of these forms, causing crashes when it got time to act on them. Additionally, we wouldn't check to see if the handler was invalid before deciding whether or not we should continue acting on the __try. This fixes PR17584. llvm-svn: 192682
* Sema: Consider it an error to apply __builtin_offsetof to a member in a ↵David Majnemer2013-10-151-2/+8
| | | | | | | | | | virtual base icc 13 and g++ 4.9 both reject this while we would crash. Fixes PR17578. llvm-svn: 192674
* Special case '%C' handling in ObjC format strings to handle integer literals ↵Ted Kremenek2013-10-151-1/+9
| | | | | | | | that can represent unicode characters Fixes <rdar://problem/13991617>. llvm-svn: 192673
* Correctly skip type sugar when determining the width of an enum type. DerivedRichard Smith2013-10-151-1/+1
| | | | | | from a patch by Justin Bogner. llvm-svn: 192671
* Tidy up and improve error recovery for C++11 attributes in bad places. Based onRichard Smith2013-10-153-18/+65
| | | | | | a patch by Michael Han. llvm-svn: 192666
* [ms-cxxabi] Fix assert in unspecified inheritance memptr emissionReid Kleckner2013-10-151-2/+4
| | | | | | | | | If a class is using the unspecified inheritance model for member pointers and later we find the class is defined to use single inheritance, zero out the vbptr offset field of the member pointer when it is formed. llvm-svn: 192664
* ObjectiveC migrator: Support for more possibility ofFariborz Jahanian2013-10-151-28/+84
| | | | | | | | migration to NS_ENUM/NS_OPTIONS macros; when typedef'ed to NSInteger/NSUInteger preceeds well before of the enum declaration. // rdar://15201056 llvm-svn: 192645
* PR17567: Improve diagnostic for a mistyped constructor name. If we see somethingRichard Smith2013-10-152-15/+58
| | | | | | | | | | | that looks like a function declaration, except that it's missing a return type, try typo-correcting it to the relevant constructor name. In passing, fix a bug where the missing-type-specifier recovery codepath would drop a preceding scope specifier on the floor, leading to follow-on diagnostics and incorrect recovery for the auto-in-c++98 hack. llvm-svn: 192644
* Add has_feature support for reflecting the presence of refined Objective-C ↵Ted Kremenek2013-10-141-0/+1
| | | | | | ABI mangling for qualified id<...>. Fixes <rdar://problem/14799110>. llvm-svn: 192643
* Trivial formatting changes; no functional changes intended.Aaron Ballman2013-10-141-4/+6
| | | | llvm-svn: 192640
* Switching some custom logic to using table-generated helper methods. This ↵Aaron Ballman2013-10-141-23/+11
| | | | | | also removes an unnecessary diagnostic. llvm-svn: 192639
* PR17576: Fix assertion on polymorphic classes with small alignmentReid Kleckner2013-10-141-1/+1
| | | | | | | | We have to reserve at least the width of a pointer for the vfptr. For classes with small alignment, we weren't reserving enough space, and were overlapping the first field with the vfptr. llvm-svn: 192626
* Correctly check for distructors when realizing vtordispsWarren Hunt2013-10-141-1/+1
| | | | | | | | | | This patch fixes the distructor test when checking for vtordisp requirements in microsoft record layout. A test case is also included. Addresses: http://llvm.org/bugs/show_bug.cgi?id=16406#c7 llvm-svn: 192616
* For NetBSD/current on X86 do not use libgcc and default to libc++.Joerg Sonnenberger2013-10-142-18/+29
| | | | | | Adjust linkage to make more sense for older releases. llvm-svn: 192615
* Move comment to its proper place.Ted Kremenek2013-10-141-2/+2
| | | | llvm-svn: 192613
* GetExprRange() (used by -Wconversion checking) should look through ↵Ted Kremenek2013-10-141-0/+3
| | | | | | | | | | OpaqueValueExprs. Fixes a false positive with -Wconversion involving Objective-C properties. Fixes <rdar://problem/14415662>. llvm-svn: 192611
* Reduce double set lookups by using the result of insert.Benjamin Kramer2013-10-142-10/+8
| | | | | | No functionality change. llvm-svn: 192598
* [AArch64] Add support for NEON scalar integer compare instructions.Chad Rosier2013-10-141-5/+74
| | | | llvm-svn: 192597
* Do not use typo correction that is unaccessible.Serge Pavlov2013-10-141-2/+9
| | | | | | | | This patch fixes PR17019. When doing typo correction, Sema::CorrectTypo uses correction already seen for the same typo. This causes problems if that correction is from another scope and cannot be accessed in the current. llvm-svn: 192594
* Fixed "ArgSize may be used uninitialised" error when compiling with gcc.Andy Gibbs2013-10-141-1/+1
| | | | llvm-svn: 192570
* Keep track of indentation levels in static initializers for correct ↵Alexander Kornienko2013-10-143-28/+36
| | | | | | | | | | | | | | | | | | | indentation with tabs. Summary: Store IndentationLevel in ParentState and use it instead of the Line::Level when indening. Also fixed incorrect indentation level calculation in formatFirstToken. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D1797 llvm-svn: 192563
* Merge common pointers for redeclarations of the same template across modules.Richard Smith2013-10-131-0/+5
| | | | llvm-svn: 192560
* Don't get confused by a virt-specifier after a trailing-return-type - it's notRichard Smith2013-10-131-5/+10
| | | | | | an accidentally-included name for the declarator. llvm-svn: 192559
* Fix typo: inccrementallyBenjamin Kramer2013-10-131-1/+1
| | | | llvm-svn: 192551
* Relax header guard mismatch warning with edit distance heuristic.Ismail Pazarbasi2013-10-121-13/+26
| | | | | | If the edit distance between the two macros is more than 50%, DefinedMacro may not be header guard or can be header guard of another header file or it might be defining something completely different set by the build environment. llvm-svn: 192547
* Automatically munch semicolons after blocks.Manuel Klimek2013-10-122-3/+8
| | | | | | | | While it is mostly a user error to have the extra semicolon, formatting it graciously will correctly format in the cases where we do not fully understand the code (macros). llvm-svn: 192543
* clang-format: Fix assertion on unterminated #ifs.Daniel Jasper2013-10-121-1/+1
| | | | llvm-svn: 192535
* Callback support for OpenCL extension pragmas.Pekka Jaaskelainen2013-10-121-0/+5
| | | | | | Patch from Rami Ylimäki and Mikael Lepistö! llvm-svn: 192531
* clang-format: No space in "<::" in C++11 mode.Daniel Jasper2013-10-122-6/+11
| | | | llvm-svn: 192524
* Consumed analysis: replace the consumes attribute with a set_typestateDeLesley Hutchins2013-10-112-62/+102
| | | | | | attribute. Patch by chris.wailes@gmail.com; reviewed and edited by delesley. llvm-svn: 192515
* Consumed analysis: switch from tests_consumed/unconsumed to a generalDeLesley Hutchins2013-10-113-52/+43
| | | | | | tests_typestate attribute. Patch by chris.wailes@gmail.com. llvm-svn: 192513
* Improve the error message for attempting to build a for range loop using aRichard Trieu2013-10-111-2/+17
| | | | | | | | | function parameter that has array type. Such a parameter will be treated as a pointer type instead, resulting in a missing begin function error is a suggestion to dereference the pointer. This provides a different, more informative diagnostic as well as point to the parameter declaration. llvm-svn: 192512
* Consumed analysis: check destructor calls.DeLesley Hutchins2013-10-111-20/+55
| | | | | | | This allows the callable_when attribute to be attached to destructors. Original patch by chris.wailes@gmail.com, reviewed and edited by delesley. llvm-svn: 192508
* Don't break string literals inside preprocessor directives.Alexander Kornienko2013-10-112-3/+14
| | | | | | | | | | | | | | | | | | Summary: This way we avoid breaking code which uses unknown preprocessor directives with long string literals. The specific use case in http://llvm.org/PR17035 isn't very common, but it seems to be a good idea to avoid this kind of problem anyway. Reviewers: djasper Reviewed By: djasper CC: cfe-commits, klimek Differential Revision: http://llvm-reviews.chandlerc.com/D1813 llvm-svn: 192507
* ObjectiveC migrator. also support migration toFariborz Jahanian2013-10-111-10/+24
| | | | | | | NS_ENUM/NS_OPTIONS macros when typedef declaration precedes enum declaration. // rdar://15200915 llvm-svn: 192506
* Support formatting of preprocessor branches.Manuel Klimek2013-10-1110-58/+211
| | | | | | | | | | | | | | | | | | | | | We now correctly format: void SomeFunction(int param1, #ifdef X NoTemplate param2, #else template < #ifdef A MyType<Some> > #else Type1, Type2> #endif param2, #endif param3) { f(); } llvm-svn: 192503
* Only use the MS record layout when using the MS C++ ABIReid Kleckner2013-10-111-5/+5
| | | | | | We're not ready to use it everywhere we use a win32 triple yet. llvm-svn: 192502
* Turn struct-path aware TBAA on by default.Manman Ren2013-10-112-3/+4
| | | | | | | | Use -no-struct-path-tbaa to turn it off. This is the same as r191695, which was reverted because it depends on a commit that has issues. llvm-svn: 192497
* Use castAs instead of cast in thunk generationReid Kleckner2013-10-111-1/+1
| | | | | | | | Calling convention attributes can add sugar to methods that we have to look through. This fixes an assertion failure in the provided test case. llvm-svn: 192496
* Fix unused variable warning in MS record layout.Reid Kleckner2013-10-111-3/+1
| | | | llvm-svn: 192495
* Adds Microsoft compatiable C++ record layout code to clang.Warren Hunt2013-10-116-41/+747
| | | | llvm-svn: 192494
* clang-format: Don't remove 'unknown' tokens.Daniel Jasper2013-10-112-1/+18
| | | | | | | | | | | In certain macros or incorrect string literals, the token stream can contain 'unknown' tokens, e.g. a single backslash or a set of empty ticks. clang-format simply treated them as whitespace and removed them prior to this patch. This fixes llvm.org/PR17215 llvm-svn: 192490
* Remove extra braces.Eric Christopher2013-10-111-2/+1
| | | | llvm-svn: 192473
* ObjectiveC migrator: fixes a bug when in NS_ENUM/NS_OPTIONSFariborz Jahanian2013-10-113-8/+17
| | | | | | | migration, the typedef has annotations. // rdar://15200602 llvm-svn: 192468
* XCore target: add an xcore toolchain implementationRobert Lytton2013-10-115-0/+190
| | | | llvm-svn: 192437
* XCore : Fix bug in XCoreABIInfo::EmitVAArg()Robert Lytton2013-10-111-13/+27
| | | | | | Incorrect handling of 'double' and 'long long int' llvm-svn: 192436
* Diagnose by-copy captures of abstract classes.Douglas Gregor2013-10-111-0/+4
| | | | | | Fixes <rdar://problem/14468891>. llvm-svn: 192419
* Add -fno-function-sections and -fno-data-sections. SinceNick Lewycky2013-10-111-2/+4
| | | | | | | -f{function,data}-sections had no tests at all, add some, and verify that the -fno variants work as well. llvm-svn: 192413
* Fix typo in comment. No functionality change.Nick Lewycky2013-10-111-2/+2
| | | | llvm-svn: 192412
* Implemented aarch64 SIMD copy related ACLE intrinsic :Kevin Qin2013-10-111-0/+28
| | | | | | vget_lane, vset_lane, vcopy_lane, vcreate, vdup_n, vdup_lane, vmov_n. llvm-svn: 192411
OpenPOWER on IntegriCloud