summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
* When we generate a redeclaration for anJohn McCall2014-05-141-1/+9
| | | | | | | elaborated-type-specifier, place it in the correct context. llvm-svn: 208799
* clang-cl: Fall back immediately if /GR and /fallback were both passedReid Kleckner2014-05-141-1/+9
| | | | | | | None of our tests use /fallback, so this lets us gradually add RTTI support without breaking projects using /fallback. llvm-svn: 208787
* Don't copy objects with trivial, deleted copy ctorsReid Kleckner2014-05-144-10/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This affects both the Itanium and Microsoft C++ ABIs. This is in anticipation of a change to the Itanium C++ ABI, and should match GCC's current behavior. The new text will likely be: """ Pass an object of class type by value if every copy constructor and move constructor is deleted or trivial and at least one of them is not deleted, and the destructor is trivial. """ http://sourcerytools.com/pipermail/cxx-abi-dev/2014-May/002728.html On x86 Windows, we can mostly use the same logic, where we use inalloca instead of passing by address. However, on Win64, there are register parameters, and we have to do what MSVC does. MSVC ignores the presence of non-trivial move constructors and only considers the presence of non-trivial or deleted copy constructors. If a non-trivial or deleted copy ctor is present, it passes the argument indirectly. This change fixes bugs and makes us more ABI compatible with both GCC and MSVC. Fixes PR19668. Reviewers: rsmith Differential Revision: http://reviews.llvm.org/D3660 llvm-svn: 208786
* Replacing some manual iterations with standard algorithms. No functional ↵Aaron Ballman2014-05-141-29/+22
| | | | | | changes intended. llvm-svn: 208783
* Formatting and style changes; no functional changes intended.Aaron Ballman2014-05-141-8/+7
| | | | llvm-svn: 208774
* [OPENMP] Fix warning in Release builds.Alexey Bataev2014-05-141-0/+9
| | | | llvm-svn: 208768
* clang-format: Add option to allow short blocks on a single line.Daniel Jasper2014-05-141-10/+29
| | | | | | | | | With AllowShortBlocksOnASingleLine, clang-format allows: if (a) { return; } Based on patch by Gonzalo BG, thank you! llvm-svn: 208765
* [ARM64]Fix the bug right shift uint64_t by 64 generates incorrect result.Hao Liu2014-05-141-13/+16
| | | | llvm-svn: 208761
* Sema::FindAllocationFunctions(): Fix \param. [-Wdocumentation]NAKAMURA Takumi2014-05-141-1/+1
| | | | llvm-svn: 208758
* Create a redeclaration when an elaborated type specifierJohn McCall2014-05-141-3/+6
| | | | | | | | | resolves to an existing declaration if there are attributes present. This gives us something to apply the attributes to. llvm-svn: 208756
* DebugInfo: Avoid creating DILexicalScopeFiles when the filename in the ↵David Blaikie2014-05-141-7/+11
| | | | | | | | | | | | | | | | | | | current scope has not changed. This looks like the right way for this check to work, but there is another semi-obvious bug, I would think: why is CurLoc not zero'd out between functions? The possibility for it to bleed between them seems problematic. (& indeed I caused tests to fail when I fixed this a different way, by setting CurLoc to SourceLocation() and the end of EmitFunctionEnd... ) The changes to debug-info-blocks.m are due to a mismatch between the source manager's file naming and CGDebugInfo's default handling when no -main-file-name is specified. This actually reveals somewhat of a bug in the debug info when using source files from standard in, too. See the comment in CGDebugInfo::CreateCompileUnit for more details. llvm-svn: 208742
* Push record return type classification into CGCXXABIReid Kleckner2014-05-134-113/+84
| | | | | | | | | | | | In the Microsoft C++ ABI, instance methods always return records indirectly via the second hidden parameter. This was implemented in X86_32ABIInfo, but not WinX86_64ABIInfo. Rather than exposing a handful of boolean methods in the CGCXXABI interface, we can expose a single method that applies C++ ABI return value classification rules. llvm-svn: 208733
* PR19729: Delete a bunch of bogus code in Sema::FindAllocationOverload. ThisRichard Smith2014-05-132-48/+28
| | | | | | | | | caused us to perform copy-initialization for the parameters of an allocation function called by a new-expression multiple times, resulting in us rejecting allocations that passed non-copyable parameters (and much worse things in MSVC compat mode, where we potentially called this function multiple times). llvm-svn: 208724
* Add __ARM_DWARF_EH__ to signify the use of Itanium ABI for unwindJoerg Sonnenberger2014-05-131-0/+11
| | | | | | instructions. llvm-svn: 208719
* Update for llvm API change.Rafael Espindola2014-05-132-6/+5
| | | | llvm-svn: 208717
* Fix the AST printer for attributed statements so that it does not print ↵Aaron Ballman2014-05-131-13/+2
| | | | | | duplicate attribute introducers. Eg) [[clang::fallthrough]] instead of [[[[clang::fallthrough]]]] llvm-svn: 208706
* No longer triggering a checked iterator assert on Windows when using ↵Aaron Ballman2014-05-132-5/+4
| | | | | | std::copy while deserializing attributed statements with more than one attribute. llvm-svn: 208702
* Define the InterlockedCompareExchange64 intrinsic on 32-bits tooTimur Iskhodzhanov2014-05-131-2/+0
| | | | llvm-svn: 208699
* Drop AST's version of ARMCXXABI, it doesn't differ from the Itanium baseJoerg Sonnenberger2014-05-133-13/+2
| | | | | | class. llvm-svn: 208687
* Support -masm= flag for x86 targets.Nico Weber2014-05-131-0/+11
| | | | | | | `clang -S -o - file.c -masm=att` will write assembly to stdout in at&t syntax (the default), `-masm=intel` will instead output intel style asm. llvm-svn: 208683
* clang-format: Don't break in the middle of ">>".Daniel Jasper2014-05-131-2/+2
| | | | | | | | | | | | | | | Before: zzzzzzzzzz = bbbbbbbbbbbbbbbbb > > aaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaa); After: zzzzzzzzzz = bbbbbbbbbbbbbbbbb >> aaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaaaaaaaaa); This fixes llvm.org/PR19731. llvm-svn: 208672
* MS ABI: Tighten RTTI manglingDavid Majnemer2014-05-131-21/+21
| | | | | | r208661 contained WIP code, commit the *actual* manglings. llvm-svn: 208668
* Patched clang to emit x86 blends as shufflevectors.Filipe Cabecinhas2014-05-133-8/+62
| | | | | | | | | | | | | | | | | Summary: Most of the clang header patch by Simon Pilgrim @ SCEE. Also fixed (or added) clang tests for these intrinsics. LLVM tests to make sure we get the blend instruction out of these shufflevectors are at http://reviews.llvm.org/D3600 Reviewers: eli.friedman, craig.topper, rafael Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3601 llvm-svn: 208664
* Refactor to avoid explicitly listing all the different flavours of redeclarableRichard Smith2014-05-131-56/+43
| | | | | | declarations, and duplicating code between them. llvm-svn: 208662
* MS ABI: Preliminary RTTI manglingDavid Majnemer2014-05-131-14/+69
| | | | | | | | Implement what we currently believe is the mangling scheme for RTTI data. Tests will be added in a later commit which actually generate RTTI data. llvm-svn: 208661
* Refactor and fix a latent bug (found by inspection) where an external ASTRichard Smith2014-05-131-21/+18
| | | | | | | | | source that provides a declaration from a hidden module would not have the visibility of the produced definition checked. This might matter if an external source chose to import a new module to provide an extra definition, but is not observable with our current external sources. llvm-svn: 208659
* [ASan] Fixup for r208610: link in asan_cxx library on WindowsAlexey Samsonov2014-05-121-6/+14
| | | | llvm-svn: 208625
* [ASan] Split static ASan runtime in two parts: asan and asan_cxx.Alexey Samsonov2014-05-121-6/+11
| | | | | | | | | | | asan_cxx containts replacements for new/delete operators, and should only be linked in C++ mode. We plan to start building this part with exception support to make new more standard-compliant. See https://code.google.com/p/address-sanitizer/issues/detail?id=295 for more details. llvm-svn: 208610
* clang-format: [JS] Basic support for escape sequences in regex literals.Daniel Jasper2014-05-121-1/+21
| | | | | | | | | | Before: var regex = /\\/ g; // This isn't even recognized as regex. After: var regex = /\\/g; // It now is. llvm-svn: 208539
* [Driver] Do not lose already detected set of toolchain's multilibs whileSimon Atanasyan2014-05-122-33/+41
| | | | | | | | | | | | | | | | | iterating over different library path suffixes and different library versions. To find the most appropriate library for the given command line flags we iterate over a set of disk paths. Before probe each path the already detected set of multilibs are cleared. If the set of paths contains existing paths which do not satisfy command line flags or do not contain necessary libraries and object files at all we might lose found multilibs. The patch updates variables which hold detected multilibs if we really find a new multilib matches command line flags. The patch reviewed by Jon Roelofs. llvm-svn: 208523
* [C++11] Use 'nullptr'. AST edition.Craig Topper2014-05-1243-1019/+1069
| | | | llvm-svn: 208517
* [OPENMP] Removed unnecessary enums from OpenMP constructsAlexey Bataev2014-05-123-28/+12
| | | | llvm-svn: 208516
* Make DiagnosticsEngine non-copyableAlp Toker2014-05-112-2/+4
| | | | | | | | Also provide an out-of-line dtor for CompilerInvocation. Cleanup work that may help reduce header inclusion for IntrusiveRefCntPtr. llvm-svn: 208512
* PR19713: Don't warn on unused static inline functions, even if the 'inline' wasRichard Smith2014-05-111-2/+3
| | | | | | implied by 'constexpr'. llvm-svn: 208511
* Driver: Don't leak the -Xarch argument when its use is incorrect.Nico Weber2014-05-111-2/+2
| | | | | | | (LLVM's lib/Option looks like it might appreciate being hit with the std::unique_ptr stick.) llvm-svn: 208505
* Parameter/argument terminology fixesAlp Toker2014-05-111-25/+25
| | | | llvm-svn: 208499
* Consolidate single void paramter checkingAlp Toker2014-05-114-19/+5
| | | | | | | | Also correct argument/parameter terminology. No change in functionality. llvm-svn: 208498
* Silence warning in Release builds. This function is only used in an assert.Benjamin Kramer2014-05-111-0/+2
| | | | llvm-svn: 208491
* Wrap at 80 columns. No code change.Nico Weber2014-05-111-7/+13
| | | | llvm-svn: 208485
* Wrap to 80 columns. No behavior change.Nico Weber2014-05-101-8/+12
| | | | llvm-svn: 208475
* Objective-C ARC. Add support for toll-free bridge Fariborz Jahanian2014-05-102-0/+21
| | | | | | | type ,and bridge attribute, checking with static_cast. // rdar://16756639 llvm-svn: 208474
* Analyzer: Make helper function static.Benjamin Kramer2014-05-101-1/+1
| | | | llvm-svn: 208473
* Decouple ExprCXX.h and DeclCXX.h and clean up includes a bit.Benjamin Kramer2014-05-1016-22/+27
| | | | | | | Required pulling LambdaExpr::Capture into its own header. No functionality change. llvm-svn: 208470
* Add FIXME describing the limitation of using column info to disambiguate ↵David Blaikie2014-05-101-0/+8
| | | | | | | | | | | | | | | | | | | | inlining. Also tidy up, simplify, and extend the test coverage to demonstrate the limitations. This test should now fail if the bugs are fixed (& hopefully whoever ends up in this situation sees the FIXMEs and realizes that the test needs to be updated to positively test their change that has fixed some or all of these issues). I do wonder whether I could demonstrate breakage without a macro here, but any way I slice it I can't think of a way to get two calls to the same function on the same line/column in non-macro C++ - implicit conversions happen at the same location as an explicit function, but you'd never get an implicit conversion on the result of an explicit call to the same implicit conversion operator (since the value is already converted to the desired result)... llvm-svn: 208468
* Stop all the Decl classes poking at Redeclarable's data member directly, and ↵Richard Smith2014-05-102-3/+3
| | | | | | make getNextRedeclaration follow the pattern of its friends getPreviousDecl and getMostRecentDecl. llvm-svn: 208467
* MS ABI: Pass 'sret' as the second parameter of instance methodsReid Kleckner2014-05-095-20/+76
| | | | | | | | | | | | | | | | | Summary: MSVC always passes 'sret' after 'this', unlike GCC. This required changing a number of places in Clang that assumed the sret parameter was always first in LLVM IR. This fixes win64 MSVC ABI compatibility for methods returning structs. Reviewers: rsmith, majnemer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3618 llvm-svn: 208458
* Don't emit -Wnon-virtual-dtor on final classes, since it's not a problem there.David Blaikie2014-05-091-1/+2
| | | | | | | | | The base class is the culprit/risk here - a sealed/final derived class with virtual functions and a non-virtual dtor can't accidentally be polymorphically destroyed (if the base class's dtor is protected - which also suppresses this warning). llvm-svn: 208449
* PR19698, PR19674: enable __has_feature checks for cxx_generic_lambdas andRichard Smith2014-05-091-3/+8
| | | | | | | cxx_decltype_auto, and fix documentation of cxx_generic_lambdas and cxx_init_captures to specify the right feature-check name. llvm-svn: 208445
* Objective-C. Reduce false positive warnings with -Wselector by issuing warning Fariborz Jahanian2014-05-091-2/+3
| | | | | | | only when named selector is declared in TU and it is not declared in a system header. rdar://16600230 llvm-svn: 208443
* Amending r208439 to remove buildLExpr; this code isn't strictly required ↵Aaron Ballman2014-05-091-46/+0
| | | | | | yet, and fixes a dead code warning. llvm-svn: 208440
OpenPOWER on IntegriCloud